|
287 | 287 | } |
288 | 288 | } |
289 | 289 | }, |
290 | | - "/search": { |
291 | | - "get": { |
292 | | - "summary": "Get user's search history", |
293 | | - "tags": ["Search"], |
294 | | - "security": [{ "bearerAuth": [] }], |
295 | | - "parameters": [ |
296 | | - { |
297 | | - "name": "limit", |
298 | | - "in": "query", |
299 | | - "required": false, |
300 | | - "schema": { |
301 | | - "type": "integer", |
302 | | - "default": 20 |
303 | | - }, |
304 | | - "description": "Maximum number of searches to return" |
305 | | - } |
306 | | - ], |
307 | | - "responses": { |
308 | | - "200": { |
309 | | - "description": "Search history retrieved successfully", |
310 | | - "content": { |
311 | | - "application/json": { |
312 | | - "schema": { |
313 | | - "$ref": "#/components/schemas/GetSearchesResponse" |
314 | | - } |
315 | | - } |
316 | | - } |
317 | | - } |
318 | | - } |
319 | | - } |
320 | | - }, |
321 | 290 | "/post/filter": { |
322 | 291 | "post": { |
323 | 292 | "summary": "Filter posts (all filters) ", |
|
971 | 940 | } |
972 | 941 | } |
973 | 942 | }, |
| 943 | + "/post/suggested": { |
| 944 | + "get": { |
| 945 | + "summary": "Get suggested posts", |
| 946 | + "tags": ["Post"], |
| 947 | + "security": [{ "bearerAuth": [] }], |
| 948 | + "parameters": [ |
| 949 | + { |
| 950 | + "name": "limit", |
| 951 | + "in": "query", |
| 952 | + "required": false, |
| 953 | + "description": "Limit of posts to return", |
| 954 | + "schema": { |
| 955 | + "type": "integer", |
| 956 | + "default": 10 } |
| 957 | + } |
| 958 | + ], |
| 959 | + "responses": { |
| 960 | + "200": { |
| 961 | + "description": "Suggested posts retrieved successfully", |
| 962 | + "content": { |
| 963 | + "application/json": { |
| 964 | + "schema": { |
| 965 | + "type": "object", |
| 966 | + "properties": { |
| 967 | + "posts": { |
| 968 | + "type": "array", |
| 969 | + "items": { |
| 970 | + "$ref": "#/components/schemas/GetPostResponse" |
| 971 | + } |
| 972 | + } |
| 973 | + } |
| 974 | + } |
| 975 | + } |
| 976 | + } |
| 977 | + } |
| 978 | + } |
| 979 | + } |
| 980 | + }, |
| 981 | + "/post/purchaseSuggestions": { |
| 982 | + "get": { |
| 983 | + "summary": "Get purchase suggestions", |
| 984 | + "tags": ["Post"], |
| 985 | + "security": [{ "bearerAuth": [] }], |
| 986 | + "parameters": [ |
| 987 | + { |
| 988 | + "name": "limit", |
| 989 | + "in": "query", |
| 990 | + "required": false, |
| 991 | + "description": "Limit of posts to return", |
| 992 | + "schema": { |
| 993 | + "type": "integer", |
| 994 | + "default": 10 } |
| 995 | + } |
| 996 | + ], |
| 997 | + "responses": { |
| 998 | + "200": { |
| 999 | + "description": "Purchase suggestions retrieved successfully", |
| 1000 | + "content": { |
| 1001 | + "application/json": { |
| 1002 | + "schema": { |
| 1003 | + "type": "object", |
| 1004 | + "properties": { |
| 1005 | + "postIds": { |
| 1006 | + "type": "array", |
| 1007 | + "items": { "type": "string" }, |
| 1008 | + "description": "Array of post IDs" |
| 1009 | + } |
| 1010 | + } |
| 1011 | + } |
| 1012 | + } |
| 1013 | + } |
| 1014 | + } |
| 1015 | + } |
| 1016 | + } |
| 1017 | + }, |
| 1018 | + "/search": { |
| 1019 | + "get": { |
| 1020 | + "summary": "Get user's search history", |
| 1021 | + "tags": ["Search"], |
| 1022 | + "security": [{ "bearerAuth": [] }], |
| 1023 | + "parameters": [ |
| 1024 | + { |
| 1025 | + "name": "limit", |
| 1026 | + "in": "query", |
| 1027 | + "required": false, |
| 1028 | + "schema": { |
| 1029 | + "type": "integer", |
| 1030 | + "default": 20 |
| 1031 | + }, |
| 1032 | + "description": "Maximum number of searches to return" |
| 1033 | + } |
| 1034 | + ], |
| 1035 | + "responses": { |
| 1036 | + "200": { |
| 1037 | + "description": "Search history retrieved successfully", |
| 1038 | + "content": { |
| 1039 | + "application/json": { |
| 1040 | + "schema": { |
| 1041 | + "$ref": "#/components/schemas/GetSearchesResponse" |
| 1042 | + } |
| 1043 | + } |
| 1044 | + } |
| 1045 | + } |
| 1046 | + } |
| 1047 | + }, |
| 1048 | + "post": { |
| 1049 | + "summary": "Create a new search record", |
| 1050 | + "tags": ["Search"], |
| 1051 | + "security": [{ "bearerAuth": [] }], |
| 1052 | + "parameters": [ |
| 1053 | + { |
| 1054 | + "name": "searchRequest", |
| 1055 | + "in": "body", |
| 1056 | + "required": true, |
| 1057 | + "schema": { |
| 1058 | + "type": "string" |
| 1059 | + }, |
| 1060 | + "description": "The search text to be stored" |
| 1061 | + } |
| 1062 | + ], |
| 1063 | + "responses": { |
| 1064 | + "201": { |
| 1065 | + "description": "Search record successfully created", |
| 1066 | + "content": { |
| 1067 | + "application/json": { |
| 1068 | + "schema": { |
| 1069 | + "type": "object", |
| 1070 | + "properties": { |
| 1071 | + "searchId": { |
| 1072 | + "type": "string", |
| 1073 | + "description": "Unique identifier for the created search record" |
| 1074 | + }, |
| 1075 | + "searchText": { |
| 1076 | + "type": "string", |
| 1077 | + "description": "The search text that was stored" |
| 1078 | + } |
| 1079 | + } |
| 1080 | + } |
| 1081 | + } |
| 1082 | + } |
| 1083 | + } |
| 1084 | + } |
| 1085 | + } |
| 1086 | + }, |
974 | 1087 | "/user/create": { |
975 | 1088 | "post": { |
976 | 1089 | "tags": ["User"], |
|
1506 | 1619 | } |
1507 | 1620 | } |
1508 | 1621 | }, |
| 1622 | + "/notif/new": { |
| 1623 | + "get": { |
| 1624 | + "summary": "Get unread notifications", |
| 1625 | + "tags": ["Notification"], |
| 1626 | + "security": [{ "bearerAuth": [] }], |
| 1627 | + "responses": { |
| 1628 | + "200": { |
| 1629 | + "description": "Unread notifications retrieved successfully", |
| 1630 | + "content": { |
| 1631 | + "application/json": { |
| 1632 | + "schema": { |
| 1633 | + "type": "array", |
| 1634 | + "items": { "$ref": "#/components/schemas/Notification" } |
| 1635 | + } |
| 1636 | + } |
| 1637 | + } |
| 1638 | + }, |
| 1639 | + "401": { |
| 1640 | + "description": "Unauthorized - user not authenticated" |
| 1641 | + } |
| 1642 | + } |
| 1643 | + } |
| 1644 | + }, |
| 1645 | + "/notif/last7days": { |
| 1646 | + "get": { |
| 1647 | + "summary": "Get notifications from last 7 days", |
| 1648 | + "tags": ["Notification"], |
| 1649 | + "security": [{ "bearerAuth": [] }], |
| 1650 | + "responses": { |
| 1651 | + "200": { |
| 1652 | + "description": "Notifications from last 7 days retrieved successfully", |
| 1653 | + "content": { |
| 1654 | + "application/json": { |
| 1655 | + "schema": { |
| 1656 | + "type": "array", |
| 1657 | + "items": { "$ref": "#/components/schemas/Notification" } |
| 1658 | + } |
| 1659 | + } |
| 1660 | + } |
| 1661 | + }, |
| 1662 | + "401": { |
| 1663 | + "description": "Unauthorized - user not authenticated" |
| 1664 | + } |
| 1665 | + } |
| 1666 | + } |
| 1667 | + }, |
| 1668 | + "/notif/last30days": { |
| 1669 | + "get": { |
| 1670 | + "summary": "Get notifications from last 30 days", |
| 1671 | + "tags": ["Notification"], |
| 1672 | + "security": [{ "bearerAuth": [] }], |
| 1673 | + "responses": { |
| 1674 | + "200": { |
| 1675 | + "description": "Notifications from last 30 days retrieved successfully", |
| 1676 | + "content": { |
| 1677 | + "application/json": { |
| 1678 | + "schema": { |
| 1679 | + "type": "array", |
| 1680 | + "items": { "$ref": "#/components/schemas/Notification" } |
| 1681 | + } |
| 1682 | + } |
| 1683 | + } |
| 1684 | + }, |
| 1685 | + "401": { |
| 1686 | + "description": "Unauthorized - user not authenticated" |
| 1687 | + } |
| 1688 | + } |
| 1689 | + } |
| 1690 | + }, |
| 1691 | + "/notif/id/{id}": { |
| 1692 | + "delete": { |
| 1693 | + "summary": "Delete notification", |
| 1694 | + "tags": ["Notification"], |
| 1695 | + "security": [{ "bearerAuth": [] }], |
| 1696 | + "parameters": [ |
| 1697 | + { |
| 1698 | + "in": "path", |
| 1699 | + "name": "id", |
| 1700 | + "required": true, |
| 1701 | + "schema": { |
| 1702 | + "type": "string", |
| 1703 | + "format": "uuid" |
| 1704 | + }, |
| 1705 | + "description": "Notification ID" |
| 1706 | + } |
| 1707 | + ], |
| 1708 | + "responses": { |
| 1709 | + "200": { |
| 1710 | + "description": "Notification deleted successfully" |
| 1711 | + }, |
| 1712 | + "401": { |
| 1713 | + "description": "Unauthorized - user not authenticated" |
| 1714 | + }, |
| 1715 | + "404": { |
| 1716 | + "description": "Notification not found" |
| 1717 | + } |
| 1718 | + } |
| 1719 | + } |
| 1720 | + }, |
1509 | 1721 | "/request": { |
1510 | 1722 | "get": { |
1511 | 1723 | "tags": ["Request"], |
|
0 commit comments