{"info":{"_postman_id":"2962be4f-f284-4723-ae87-07df4d8afb3e","name":"shopping-list","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"description":"<html><head></head><body></body></html>","owner":"35059519","collectionId":"2962be4f-f284-4723-ae87-07df4d8afb3e","publishedId":"2sAXjGbDuy","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"publishDate":"2024-08-26T09:58:53.000Z"},"item":[{"name":"Login","id":"a3027c1a-9813-47f8-ab4b-3f88511e5432","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\"userName\":\"John\",\"password\":\"12345\"}","options":{"raw":{"language":"json"}}},"url":"https://localhost:3001/api/auth/login","description":"<p><code>https://{{API_SERVER_URL}}/api/auth/login</code></p>\n","urlObject":{"protocol":"https","port":"3001","path":["api","auth","login"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"a3027c1a-9813-47f8-ab4b-3f88511e5432"},{"name":"Logout","id":"df8754ef-a417-48c0-be90-622c03ed5337","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"url":"https://localhost:3001/api/auth/logout","description":"<p><code>https://{{API_SERVER_URL}}/api/auth/logout</code></p>\n","urlObject":{"protocol":"https","port":"3001","path":["api","auth","logout"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"df8754ef-a417-48c0-be90-622c03ed5337"},{"name":"Register","id":"5b128baf-3e02-4456-b2be-4cdf6d8fc08b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\"user\":{\"userName\":\"Tom\",\"email\":\"tom@localhost.test\",\"password\":\"12345\",\"confirmPassword\":\"12345\"}}","options":{"raw":{"language":"json"}}},"url":"https://localhost:3001/api/auth/register","description":"<p><code>https://{{API_SERVER_URL}}/api/auth/register</code></p>\n","urlObject":{"protocol":"https","port":"3001","path":["api","auth","register"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"5b128baf-3e02-4456-b2be-4cdf6d8fc08b"},{"name":"Forget password","id":"7f989b99-ebdb-43f6-94f4-3fd62a0f6f6c","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\"email\":\"john@localhost.test\"}","options":{"raw":{"language":"json"}}},"url":"https://localhost:3001/api/auth/forget","description":"<p><strong>not ready</strong> (for now returns a message only)</p>\n<p><code>https://{{API_SERVER_URL}}/api/auth/forget</code></p>\n","urlObject":{"protocol":"https","port":"3001","path":["api","auth","forget"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"7f989b99-ebdb-43f6-94f4-3fd62a0f6f6c"},{"name":"Get all friends","id":"bdf37f30-911a-4c41-bcb1-d10195e03315","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://localhost:3001/api/users","description":"<p><code>https://{{API_SERVER_URL}}/api/users</code></p>\n","urlObject":{"protocol":"https","port":"3001","path":["api","users"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"bdf37f30-911a-4c41-bcb1-d10195e03315"},{"name":"Get friend by id","id":"41a8c857-fb74-49ec-9ece-9e5af49771f5","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://localhost:3001/api/users/66c86be7873b4eee405e51c6","description":"<p><code>https://{{API_SERVER_URL}}/api/users/{{FRIEND_ID}}</code></p>\n","urlObject":{"protocol":"https","port":"3001","path":["api","users","66c86be7873b4eee405e51c6"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"41a8c857-fb74-49ec-9ece-9e5af49771f5"},{"name":"Get requests","id":"758b305c-f6b3-4cb2-86f8-f6c83f051de0","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://localhost:3001/api/users/requests","description":"<p><code>https://{{API_SERVER_URL}}/api/users/requests</code></p>\n","urlObject":{"protocol":"https","port":"3001","path":["api","users","requests"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"758b305c-f6b3-4cb2-86f8-f6c83f051de0"},{"name":"Get friend-requests","id":"283276a7-cd2f-4c7f-a58a-ce132df2a340","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://localhost:3001/api/users/requests/become-friend","description":"<p><code>https://{{API_SERVER_URL}}/api/users/requests/{{REQUEST_TYPE}}</code></p>\n","urlObject":{"protocol":"https","port":"3001","path":["api","users","requests","become-friend"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"283276a7-cd2f-4c7f-a58a-ce132df2a340"},{"name":"Invite friend / send friend-request","id":"8a13a509-8b0a-42ac-85f2-274b11bcf428","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\"userEmail\":\"tom@localhost.test\"}","options":{"raw":{"language":"json"}}},"url":"https://localhost:3001/api/users/invite","description":"<ul>\n<li>Invite friend (sends email if friend doesn't have app account)</li>\n<li>Send friend-request (shows user's request in the app if friend has app account)</li>\n</ul>\n<p><strong>not ready</strong> (part with sending email doesn't work now)</p>\n<p><code>https://{{API_SERVER_URL}}/api/users/invite</code></p>\n","urlObject":{"protocol":"https","port":"3001","path":["api","users","invite"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"8a13a509-8b0a-42ac-85f2-274b11bcf428"},{"name":"Approve friendship","id":"d4aa71ce-66b9-424f-b134-85452bea28b4","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[],"url":"https://localhost:3001/api/users/664b5f82ed1eb026e542400b/friendship/request","description":"<p><code>https://{{API_SERVER_URL}}/api/users/{{USER_ID}}/friendship/request</code></p>\n","urlObject":{"protocol":"https","port":"3001","path":["api","users","664b5f82ed1eb026e542400b","friendship","request"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"d4aa71ce-66b9-424f-b134-85452bea28b4"},{"name":"Decline friendship","id":"eccb56c0-7eaf-4c66-9a45-9795ff3e251c","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[],"url":"https://localhost:3001/api/users/664b5f82ed1eb026e542400b/friendship/request","description":"<p><code>https://{{API_SERVER_URL}}/api/users/{{USER_ID}}/friendship/request</code></p>\n","urlObject":{"protocol":"https","port":"3001","path":["api","users","664b5f82ed1eb026e542400b","friendship","request"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"eccb56c0-7eaf-4c66-9a45-9795ff3e251c"},{"name":"Remove friend","id":"28643a1f-c9b7-4cd5-8e46-f562eb0ba9be","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[],"url":"https://localhost:3001/api/users/664b844a26e0e57273e1c689/friendship","description":"<p><code>https://{{API_SERVER_URL}}/api/users/{{USER_ID}}/friendship</code></p>\n","urlObject":{"protocol":"https","port":"3001","path":["api","users","664b844a26e0e57273e1c689","friendship"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"28643a1f-c9b7-4cd5-8e46-f562eb0ba9be"},{"name":"Remove a few friends","id":"2f6e2b5c-324f-4b70-85b5-536ecf304a38","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[],"body":{"mode":"raw","raw":"{\"friendIds\":[\"664b844a26e0e57273e1c689\",\"664b844a26e0e57273e1c745\"]}","options":{"raw":{"language":"json"}}},"url":"https://localhost:3001/api/users/few/friendship","description":"<p><code>https://{{API_SERVER_URL}}/api/users/few/friendship</code></p>\n","urlObject":{"protocol":"https","port":"3001","path":["api","users","few","friendship"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"2f6e2b5c-324f-4b70-85b5-536ecf304a38"},{"name":"Get cards","id":"e8c615f7-1988-48cf-b742-94d4fe5c7d86","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://localhost:3001/api/cards","description":"<p><code>https://{{API_SERVER_URL}}/api/cards</code></p>\n","urlObject":{"protocol":"https","port":"3001","path":["api","cards"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"e8c615f7-1988-48cf-b742-94d4fe5c7d86"},{"name":"Get card by id","id":"ad32ae09-e5b8-4259-95f2-7b4c8fc2922f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://localhost:3001/api/cards/664b694f6f22cf688976e77b","description":"<p><code>https://{{API_SERVER_URL}}/api/cards/{{CARD_ID}}</code></p>\n","urlObject":{"protocol":"https","port":"3001","path":["api","cards","664b694f6f22cf688976e77b"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"ad32ae09-e5b8-4259-95f2-7b4c8fc2922f"},{"name":"Create card","id":"427833fb-e20c-4fa4-bc26-60b63a142cb1","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\"card\": {\"name\":\"Card Name #1\",\"notes\":\"promocode: 123-123-123\\nloyal user: username1\",\"products\":[{\"name\":\"apple\",\"photo\":null,\"note\":\"1kg\",\"got\":false}],\"isDone\":false}}","options":{"raw":{"language":"json"}}},"url":"https://localhost:3001/api/cards/new","description":"<p><code>https://{{API_SERVER_URL}}/api/cards/new</code></p>\n","urlObject":{"protocol":"https","port":"3001","path":["api","cards","new"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"427833fb-e20c-4fa4-bc26-60b63a142cb1"},{"name":"Update card","id":"0e7dd243-c8e4-430b-9647-9c1d6a5f1dd2","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\"card\": {\"name\":\"Updated Card Name\"}}","options":{"raw":{"language":"json"}}},"url":"https://localhost:3001/api/cards/664b694f6f22cf688976e77b","description":"<p><code>https://{{API_SERVER_URL}}/api/cards/{{CARD_ID}}</code></p>\n","urlObject":{"protocol":"https","port":"3001","path":["api","cards","664b694f6f22cf688976e77b"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"0e7dd243-c8e4-430b-9647-9c1d6a5f1dd2"},{"name":"Share card","id":"c4d246f1-69fb-414f-94b5-527136cdae9e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\"targetUserId\": \"66585ea91c46d9238eb78a1a\",\"targetUserRole\":\"BUYER\"}","options":{"raw":{"language":"json"}}},"url":"https://localhost:3001/api/cards/66560583244ad4e6c6623cbf/share","description":"<p><code>https://{{API_SERVER_URL}}/api/cards/{{CARD_ID}}/share</code></p>\n","urlObject":{"protocol":"https","port":"3001","path":["api","cards","66560583244ad4e6c6623cbf","share"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"c4d246f1-69fb-414f-94b5-527136cdae9e"},{"name":"Stop card sharing","id":"59c05e2a-1783-443a-8e7e-7091cdc91183","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[],"body":{"mode":"raw","raw":"{\"targetUserId\": \"66585ea91c46d9238eb78a1a\",\"targetUserRole\":\"BUYER\"}","options":{"raw":{"language":"json"}}},"url":"https://localhost:3001/api/cards/66560583244ad4e6c6623cbf/share","description":"<p><code>https://{{API_SERVER_URL}}/api/cards/{{CARD_ID}}/share</code></p>\n","urlObject":{"protocol":"https","port":"3001","path":["api","cards","66560583244ad4e6c6623cbf","share"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"59c05e2a-1783-443a-8e7e-7091cdc91183"},{"name":"Delete card","id":"ea209776-774f-4034-87f6-a25188d86171","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[],"url":"https://localhost:3001/api/cards/664b805826e0e57273e1c667","description":"<p><code>https://{{API_SERVER_URL}}/api/cards/{{CARD_ID}}</code></p>\n","urlObject":{"protocol":"https","port":"3001","path":["api","cards","664b805826e0e57273e1c667"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"ea209776-774f-4034-87f6-a25188d86171"},{"name":"Get updates (SSE)","id":"7c8c7eae-ee60-477e-9e57-66a3d59fdf67","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://localhost:3001/api/updates-stream","description":"<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>const abortCtrl = new AbortController();\nconst { signal } = abortCtrl;\nconst res = await fetch(`${API_URL}/api/updates-stream`, {\n      method: \"GET\",\n      cache: \"no-cache\",\n      credentials: \"include\",\n      mode: \"cors\",\n      headers: {\n        Cookie: `${await getAuthCookie()}${await getCurrentLangCookie()}`,\n      },\n      signal,\n    });\n\n</code></pre>","urlObject":{"protocol":"https","port":"3001","path":["api","updates-stream"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"7c8c7eae-ee60-477e-9e57-66a3d59fdf67"}]}