{"info":{"_postman_id":"50192f04-2565-4e9c-bc3c-e8932cad98d8","name":"ChatSystem","description":"<html><head></head><body><p>Laravel ChatSystem Api</p>\n<h2 id=\"features\">Features</h2>\n<ul>\n<li>Message Broadcasting Events</li>\n<li>Message State Events</li>\n<li>Conversation Support</li>\n<li>Multiple Conversation Users\n<em>...more</em></li>\n</ul>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"9558301","collectionId":"50192f04-2565-4e9c-bc3c-e8932cad98d8","publishedId":"TzXwEyDq","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"publishDate":"2021-05-25T19:26:05.000Z"},"item":[{"name":"User","item":[{"name":"get","event":[{"listen":"test","script":{"id":"8c7da66e-3c64-4f60-a6a6-f1f16b9e26b9","exec":["pm.test(\"Status code is 200\", function () {","    pm.response.to.have.status(200);","});","","const res = JSON.parse(responseBody);","if(res.data && res.data.length){","    postman.setEnvironmentVariable(\"other_user_id\", res.data[0].id)","    postman.setEnvironmentVariable(\"user_name\", res.data[0].name)","    postman.setEnvironmentVariable(\"user_email\", res.data[0].email)","}",""],"type":"text/javascript"}}],"id":"3547217b-bed0-4e0f-925a-7b0de5b83b99","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"http://127.0.0.1:8000/api/users","description":"<p>Get random list of mocked users</p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{token}}"}]},"isInherited":true,"source":{"_postman_id":"50192f04-2565-4e9c-bc3c-e8932cad98d8","id":"50192f04-2565-4e9c-bc3c-e8932cad98d8","name":"ChatSystem","type":"collection"}},"urlObject":{"path":["users"],"host":["http://127.0.0.1:8000/api"],"query":[],"variable":[]}},"response":[{"id":"06bd7991-1955-48d3-9ade-5a1f0f82268d","name":"get","originalRequest":{"method":"GET","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"http://127.0.0.1:8000/api/users"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Cache-Control","value":"no-cache, private"},{"key":"Date","value":"Tue, 25 May 2021 18:43:12 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"X-Ratelimit-Limit","value":"60"},{"key":"X-Ratelimit-Remaining","value":"58"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Server","value":"swoole-http-server"},{"key":"Connection","value":"keep-alive"},{"key":"Transfer-Encoding","value":"chunked"}],"cookie":[],"responseTime":null,"body":"{\n    \"current_page\": 1,\n    \"data\": [\n        {\n            \"id\": 13,\n            \"name\": \"Miss Jackie Rohan III\",\n            \"email\": \"lavada11@example.org\"\n        },\n        {\n            \"id\": 2,\n            \"name\": \"Dr. Davin Brown Jr.\",\n            \"email\": \"jwill@example.com\"\n        },\n        {\n            \"id\": 3,\n            \"name\": \"Katlyn Nitzsche\",\n            \"email\": \"irau@example.net\"\n        },\n        {\n            \"id\": 28,\n            \"name\": \"Brianne Rempel\",\n            \"email\": \"cordie35@example.org\"\n        },\n        {\n            \"id\": 4,\n            \"name\": \"Everardo Batz\",\n            \"email\": \"antonette.kovacek@example.net\"\n        },\n        {\n            \"id\": 17,\n            \"name\": \"Darian Spinka\",\n            \"email\": \"mara55@example.net\"\n        },\n        {\n            \"id\": 23,\n            \"name\": \"Dr. Dell Sipes\",\n            \"email\": \"mwelch@example.com\"\n        },\n        {\n            \"id\": 10,\n            \"name\": \"Letha Cummerata\",\n            \"email\": \"olson.enid@example.net\"\n        },\n        {\n            \"id\": 20,\n            \"name\": \"Jonathon Ebert\",\n            \"email\": \"delphia.stracke@example.net\"\n        },\n        {\n            \"id\": 14,\n            \"name\": \"Boyd Moen\",\n            \"email\": \"price.tobin@example.com\"\n        },\n        {\n            \"id\": 25,\n            \"name\": \"Dusty Quitzon Jr.\",\n            \"email\": \"modesto.bechtelar@example.org\"\n        },\n        {\n            \"id\": 24,\n            \"name\": \"Adelle Bogisich\",\n            \"email\": \"virginia35@example.com\"\n        },\n        {\n            \"id\": 30,\n            \"name\": \"Mr. Fern Walsh Jr.\",\n            \"email\": \"howell.antwon@example.com\"\n        },\n        {\n            \"id\": 7,\n            \"name\": \"Holly Johnson V\",\n            \"email\": \"rhianna.pfannerstill@example.net\"\n        },\n        {\n            \"id\": 16,\n            \"name\": \"Euna Collier Jr.\",\n            \"email\": \"mueller.everette@example.org\"\n        }\n    ],\n    \"first_page_url\": \"http://127.0.0.1:8000/api/users?page=1\",\n    \"from\": 1,\n    \"last_page\": 2,\n    \"last_page_url\": \"http://127.0.0.1:8000/api/users?page=2\",\n    \"links\": [\n        {\n            \"url\": null,\n            \"label\": \"&laquo; Previous\",\n            \"active\": false\n        },\n        {\n            \"url\": \"http://127.0.0.1:8000/api/users?page=1\",\n            \"label\": \"1\",\n            \"active\": true\n        },\n        {\n            \"url\": \"http://127.0.0.1:8000/api/users?page=2\",\n            \"label\": \"2\",\n            \"active\": false\n        },\n        {\n            \"url\": \"http://127.0.0.1:8000/api/users?page=2\",\n            \"label\": \"Next &raquo;\",\n            \"active\": false\n        }\n    ],\n    \"next_page_url\": \"http://127.0.0.1:8000/api/users?page=2\",\n    \"path\": \"http://127.0.0.1:8000/api/users\",\n    \"per_page\": 15,\n    \"prev_page_url\": null,\n    \"to\": 15,\n    \"total\": 30\n}"}],"_postman_id":"3547217b-bed0-4e0f-925a-7b0de5b83b99"},{"name":"login","event":[{"listen":"test","script":{"id":"285cfdd8-0eb3-4506-8765-335881a4055f","exec":["var data = JSON.parse(responseBody);","if(data.token){","    postman.setEnvironmentVariable(\"token\", data.token);","}","","pm.test(\"Status test\", function () {","    pm.response.to.have.status(200);","});"],"type":"text/javascript"}}],"id":"83bc243b-8297-417d-9fd8-18a557e4826e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"url":"http://127.0.0.1:8000/api/login?name={{user_name}}&email={{user_email}}&password=password","description":"<p>Account login endpoint</p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{token}}"}]},"isInherited":true,"source":{"_postman_id":"50192f04-2565-4e9c-bc3c-e8932cad98d8","id":"50192f04-2565-4e9c-bc3c-e8932cad98d8","name":"ChatSystem","type":"collection"}},"urlObject":{"path":["login"],"host":["http://127.0.0.1:8000/api"],"query":[{"description":{"content":"<p><code>requiredIfNot:email|min:3</code></p>\n<blockquote>\n<p>User name</p>\n</blockquote>\n","type":"text/plain"},"key":"name","value":"{{user_name}}"},{"description":{"content":"<p><code>requiredIfNot:name|email</code></p>\n<blockquote>\n<p>User email address</p>\n</blockquote>\n","type":"text/plain"},"key":"email","value":"{{user_email}}"},{"description":{"content":"<p><code>required</code></p>\n<blockquote>\n<p>User password</p>\n</blockquote>\n","type":"text/plain"},"key":"password","value":"password"}],"variable":[]}},"response":[{"id":"dee90e27-655c-4834-a8f3-6370a2b46e6a","name":"login","originalRequest":{"method":"POST","header":[],"url":{"raw":"http://127.0.0.1:8000/api/login?name={{user_name}}&email={{user_email}}&password=password","host":["http://127.0.0.1:8000/api"],"path":["login"],"query":[{"key":"name","value":"{{user_name}}","description":"requiredIfNot:email|min:3\n> User name"},{"key":"email","value":"{{user_email}}","description":"requiredIfNot:name|email\n> User email address"},{"key":"password","value":"password","description":"required\n> User password"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Cache-Control","value":"no-cache, private"},{"key":"Date","value":"Fri, 25 Jun 2021 10:02:11 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"X-Ratelimit-Limit","value":"60"},{"key":"X-Ratelimit-Remaining","value":"59"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Server","value":"swoole-http-server"},{"key":"Connection","value":"keep-alive"},{"key":"Transfer-Encoding","value":"chunked"}],"cookie":[],"responseTime":null,"body":"{\n    \"user\": {\n        \"id\": 214,\n        \"name\": \"Keshaun Monahan\",\n        \"email\": \"mattie76@example.com\",\n        \"email_verified_at\": \"2021-04-06T22:57:05.000000Z\",\n        \"created_at\": \"2021-04-06T22:57:05.000000Z\",\n        \"updated_at\": \"2021-04-06T22:57:05.000000Z\"\n    },\n    \"token\": \"2|wmhcNU1nMxHrMZ3oBJEyN9hOlSNrOsSQco2TXBtA\",\n    \"token_type\": \"Bearer\"\n}"}],"_postman_id":"83bc243b-8297-417d-9fd8-18a557e4826e"},{"name":"whoami","event":[{"listen":"test","script":{"id":"63c32a11-1189-4410-8a39-519c80fdc383","exec":["pm.test(\"Status test\", function () {","    pm.response.to.have.status(200);","});","","var data = JSON.parse(responseBody);","data.id && postman.setEnvironmentVariable(\"user_id\", data.id);","data.country_id && postman.setEnvironmentVariable(\"country_id\", data.country_id);","data.state_id && postman.setEnvironmentVariable(\"state_id\", data.state_id);","data.other_gender && postman.setEnvironmentVariable(\"other_gender\", data.other_gender);"],"type":"text/javascript"}}],"id":"797c0d41-1c2c-4a48-a2a9-2d19b37b457b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://127.0.0.1:8000/api/whoami","description":"<p>Get The Authenticated User</p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{token}}"}]},"isInherited":true,"source":{"_postman_id":"50192f04-2565-4e9c-bc3c-e8932cad98d8","id":"50192f04-2565-4e9c-bc3c-e8932cad98d8","name":"ChatSystem","type":"collection"}},"urlObject":{"path":["whoami"],"host":["http://127.0.0.1:8000/api"],"query":[],"variable":[]}},"response":[{"id":"9e3960f5-3370-423c-a468-3baeb078b3fe","name":"whoami","originalRequest":{"method":"GET","header":[],"url":"http://127.0.0.1:8000/api/whoami"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Host","value":"127.0.0.1:8000"},{"key":"Date","value":"Tue, 09 Mar 2021 00:16:15 GMT"},{"key":"Date","value":"Tue, 09 Mar 2021 00:16:15 GMT"},{"key":"Connection","value":"close"},{"key":"X-Powered-By","value":"PHP/8.0.2"},{"key":"Cache-Control","value":"no-cache, private"},{"key":"Content-Type","value":"application/json"},{"key":"X-RateLimit-Limit","value":"60"},{"key":"X-RateLimit-Remaining","value":"59"},{"key":"Access-Control-Allow-Origin","value":"*"}],"cookie":[],"responseTime":null,"body":"{\n    \"id\": 289,\n    \"name\": \"Rocio Tremblay\",\n    \"email\": \"wvolkman@example.net\",\n    \"email_verified_at\": \"2021-03-08T22:16:23.000000Z\",\n    \"created_at\": \"2021-03-08T22:16:23.000000Z\",\n    \"updated_at\": \"2021-03-08T22:16:23.000000Z\"\n}"}],"_postman_id":"797c0d41-1c2c-4a48-a2a9-2d19b37b457b"}],"id":"bfa20d87-6bc4-412b-9a0b-45a2327bef76","_postman_id":"bfa20d87-6bc4-412b-9a0b-45a2327bef76","description":"","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{token}}"}]},"isInherited":true,"source":{"_postman_id":"50192f04-2565-4e9c-bc3c-e8932cad98d8","id":"50192f04-2565-4e9c-bc3c-e8932cad98d8","name":"ChatSystem","type":"collection"}}},{"name":"Conversation","item":[{"name":"Add","event":[{"listen":"test","script":{"id":"07b67e91-c41f-436d-af59-fb6b5899bd49","exec":["pm.test(\"Status code is 201|404\", function () {","    pm.expect(pm.response.code).to.be.oneOf([201, 200, 404]);","});","","setProp('id', 'conversation_id', postman)","","getProp(\"id\") && postman.setEnvironmentVariable(\"made_type\", \"App\\\\Models\\\\Conversation\");"],"type":"text/javascript"}}],"id":"1ee83ea1-1281-412b-81fd-52f624570666","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"url":"http://127.0.0.1:8000/api/conversations?name=Shade&type=group","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{token}}"}]},"isInherited":true,"source":{"_postman_id":"50192f04-2565-4e9c-bc3c-e8932cad98d8","id":"50192f04-2565-4e9c-bc3c-e8932cad98d8","name":"ChatSystem","type":"collection"}},"urlObject":{"path":["conversations"],"host":["http://127.0.0.1:8000/api"],"query":[{"description":{"content":"<p><code>string|min:3,max:50</code></p>\n<blockquote>\n<p>Optional conversation name</p>\n</blockquote>\n","type":"text/plain"},"key":"name","value":"Shade"},{"description":{"content":"<p><code>in:private,group,issue</code></p>\n<blockquote>\n<p>Conversation type</p>\n</blockquote>\n","type":"text/plain"},"key":"type","value":"group"}],"variable":[]}},"response":[{"id":"4b9c0146-af27-4c17-91c3-5f3cbf7ea60c","name":"Add","originalRequest":{"method":"POST","header":[],"url":{"raw":"http://127.0.0.1:8000/api/conversations?name=Shade&type=group","host":["http://127.0.0.1:8000/api"],"path":["conversations"],"query":[{"key":"name","value":"Shade","description":"string|min:3,max:50\n> Optional conversation name"},{"key":"type","value":"group","description":"in:private,group,issue\n> Conversation type"}]}},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"Cache-Control","value":"no-cache, private"},{"key":"Date","value":"Fri, 25 Jun 2021 10:08:38 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"X-Ratelimit-Limit","value":"60"},{"key":"X-Ratelimit-Remaining","value":"59"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Server","value":"swoole-http-server"},{"key":"Connection","value":"keep-alive"},{"key":"Transfer-Encoding","value":"chunked"}],"cookie":[],"responseTime":null,"body":"{\n    \"user_id\": 214,\n    \"name\": \"Shade\",\n    \"type\": \"group\",\n    \"updated_at\": \"2021-06-25T10:08:37.000000Z\",\n    \"created_at\": \"2021-06-25T10:08:37.000000Z\",\n    \"id\": 1445\n}"}],"_postman_id":"1ee83ea1-1281-412b-81fd-52f624570666"},{"name":"Get","event":[{"listen":"test","script":{"id":"b10f5372-af78-4e46-9f24-56a06e049537","exec":["pm.test(\"Status code is 200\", function () {","    pm.response.to.have.status(200);","});","","const res = JSON.parse(responseBody);","","res?.data?.[0] && postman.setEnvironmentVariable(\"made_type\", \"App\\\\Models\\\\Conversation\");","res?.data?.[0] && postman.setEnvironmentVariable(\"conversation_id\", res.data[0].id);"],"type":"text/javascript"}}],"id":"ffb1daaf-4c13-4c65-b5af-701b0fec2a85","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://127.0.0.1:8000/api/conversations?pageSize=10&order=desc&page=1","description":"<p>Get list of paginated conversations</p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{token}}"}]},"isInherited":true,"source":{"_postman_id":"50192f04-2565-4e9c-bc3c-e8932cad98d8","id":"50192f04-2565-4e9c-bc3c-e8932cad98d8","name":"ChatSystem","type":"collection"}},"urlObject":{"path":["conversations"],"host":["http://127.0.0.1:8000/api"],"query":[{"description":{"content":"<p><code>int</code></p>\n<blockquote>\n<p>page size</p>\n</blockquote>\n","type":"text/plain"},"key":"pageSize","value":"10"},{"description":{"content":"<p><code>in:desc,asc</code></p>\n<blockquote>\n<p>page order</p>\n</blockquote>\n","type":"text/plain"},"key":"order","value":"desc"},{"description":{"content":"<p><code>int</code></p>\n<blockquote>\n<p>page number</p>\n</blockquote>\n","type":"text/plain"},"key":"page","value":"1"}],"variable":[]}},"response":[{"id":"c4007338-ab1c-4b3e-b4eb-edbd51d749a7","name":"Get","originalRequest":{"method":"GET","header":[],"url":{"raw":"http://127.0.0.1:8000/api/conversations?pageSize=10&order=desc&page=1","host":["http://127.0.0.1:8000/api"],"path":["conversations"],"query":[{"key":"pageSize","value":"10"},{"key":"order","value":"desc"},{"key":"page","value":"1"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Host","value":"127.0.0.1:8000"},{"key":"Date","value":"Mon, 28 Dec 2020 16:29:37 GMT"},{"key":"Date","value":"Mon, 28 Dec 2020 16:29:37 GMT"},{"key":"Connection","value":"close"},{"key":"X-Powered-By","value":"PHP/7.4.6"},{"key":"Cache-Control","value":"no-cache, private"},{"key":"Content-Type","value":"application/json"},{"key":"X-RateLimit-Limit","value":"60"},{"key":"X-RateLimit-Remaining","value":"59"},{"key":"Access-Control-Allow-Origin","value":"*"}],"cookie":[],"responseTime":null,"body":"{\n    \"current_page\": 1,\n    \"data\": [\n        {\n            \"id\": 64,\n            \"user_id\": 13,\n            \"deleted_at\": null,\n            \"created_at\": \"2020-12-28T04:33:03.000000Z\",\n            \"updated_at\": \"2020-12-28T04:33:03.000000Z\",\n            \"latest_message_at\": \"2020-12-28 15:15:41\",\n            \"unread_count\": 0,\n            \"chat_events\": [\n                {\n                    \"type\": \"delete\",\n                    \"made_id\": 64\n                },\n                {\n                    \"type\": \"deliver\",\n                    \"made_id\": 64\n                },\n                {\n                    \"type\": \"read\",\n                    \"made_id\": 64\n                }\n            ],\n            \"delivery\": {\n                \"id\": 3081,\n                \"made_type\": \"App\\\\Models\\\\Conversation\",\n                \"made_id\": 64,\n                \"created_at\": \"2020-12-28T15:15:50.000000Z\"\n            },\n            \"last_message\": {\n                \"id\": 1985,\n                \"user_id\": 1,\n                \"message\": \"I love you too\",\n                \"conversation_id\": 64,\n                \"isSender\": true,\n                \"latest_media\": null,\n                \"trashed\": null\n            },\n            \"participant\": {\n                \"id\": 126,\n                \"user_id\": 13,\n                \"conversation_id\": 64,\n                \"user\": {\n                    \"id\": 13,\n                    \"name\": \"Mr. Jaylen Torp Jr.\",\n                    \"active_at\": \"2020-12-17 07:54:37\",\n                    \"isBlocked\": null,\n                    \"age\": 0\n                }\n            }\n        },\n        {\n            \"id\": 1,\n            \"user_id\": 1,\n            \"deleted_at\": null,\n            \"created_at\": \"2020-12-21T12:22:12.000000Z\",\n            \"updated_at\": \"2020-12-21T12:22:12.000000Z\",\n            \"latest_message_at\": \"2020-12-28 01:53:09\",\n            \"unread_count\": 0,\n            \"chat_events\": [],\n            \"delivery\": {\n                \"id\": 3066,\n                \"made_type\": \"App\\\\Models\\\\Conversation\",\n                \"made_id\": 1,\n                \"created_at\": \"2020-12-28T12:11:05.000000Z\"\n            },\n            \"last_message\": {\n                \"id\": 1967,\n                \"user_id\": 1,\n                \"message\": \"my message\",\n                \"conversation_id\": 1,\n                \"isSender\": true,\n                \"latest_media\": null,\n                \"trashed\": null\n            },\n            \"participant\": {\n                \"id\": 2,\n                \"user_id\": 26,\n                \"conversation_id\": 1,\n                \"user\": {\n                    \"id\": 26,\n                    \"name\": \"Scarlett Herzog\",\n                    \"active_at\": \"2020-12-19 18:21:43\",\n                    \"isBlocked\": null,\n                    \"age\": 0\n                }\n            }\n        },\n        {\n            \"id\": 62,\n            \"user_id\": 1,\n            \"deleted_at\": null,\n            \"created_at\": \"2020-12-21T15:14:53.000000Z\",\n            \"updated_at\": \"2020-12-21T15:14:53.000000Z\",\n            \"latest_message_at\": \"2020-12-23 12:28:11\",\n            \"unread_count\": 0,\n            \"chat_events\": [],\n            \"delivery\": {\n                \"id\": 3067,\n                \"made_type\": \"App\\\\Models\\\\Conversation\",\n                \"made_id\": 62,\n                \"created_at\": \"2020-12-28T12:13:36.000000Z\"\n            },\n            \"last_message\": {\n                \"id\": 1962,\n                \"user_id\": 1,\n                \"message\": \"Wwww\",\n                \"conversation_id\": 62,\n                \"isSender\": true,\n                \"latest_media\": null,\n                \"trashed\": null\n            },\n            \"participant\": {\n                \"id\": 124,\n                \"user_id\": 50,\n                \"conversation_id\": 62,\n                \"user\": {\n                    \"id\": 50,\n                    \"name\": \"Andres Farrell\",\n                    \"active_at\": \"2020-12-18 22:19:51\",\n                    \"isBlocked\": null,\n                    \"age\": 0\n                }\n            }\n        },\n        {\n            \"id\": 24,\n            \"user_id\": 83,\n            \"deleted_at\": null,\n            \"created_at\": \"2020-12-21T12:56:48.000000Z\",\n            \"updated_at\": \"2020-12-21T12:56:48.000000Z\",\n            \"latest_message_at\": \"2020-12-21 12:56:49\",\n            \"unread_count\": 36,\n            \"chat_events\": [],\n            \"delivery\": {\n                \"id\": 3068,\n                \"made_type\": \"App\\\\Models\\\\Conversation\",\n                \"made_id\": 24,\n                \"created_at\": \"2020-12-28T12:16:07.000000Z\"\n            },\n            \"last_message\": {\n                \"id\": 676,\n                \"user_id\": 83,\n                \"message\": \"Adventures of hers would, in the sea. The master was an old Crab took the thimble, looking as solemn as she could. 'The game's going on rather better now,' she said, 'and see whether it's marked.\",\n                \"conversation_id\": 24,\n                \"isSender\": false,\n                \"latest_media\": null,\n                \"trashed\": null\n            },\n            \"participant\": {\n                \"id\": 47,\n                \"user_id\": 83,\n                \"conversation_id\": 24,\n                \"user\": {\n                    \"id\": 83,\n                    \"name\": \"Jeanette Wyman II\",\n                    \"active_at\": \"2020-12-16 04:46:46\",\n                    \"isBlocked\": null,\n                    \"age\": 0\n                }\n            }\n        },\n        {\n            \"id\": 14,\n            \"user_id\": 74,\n            \"deleted_at\": null,\n            \"created_at\": \"2020-12-21T12:56:36.000000Z\",\n            \"updated_at\": \"2020-12-21T12:56:36.000000Z\",\n            \"latest_message_at\": \"2020-12-21 12:56:36\",\n            \"unread_count\": 11,\n            \"chat_events\": [],\n            \"delivery\": {\n                \"id\": 3069,\n                \"made_type\": \"App\\\\Models\\\\Conversation\",\n                \"made_id\": 14,\n                \"created_at\": \"2020-12-28T12:16:07.000000Z\"\n            },\n            \"last_message\": {\n                \"id\": 346,\n                \"user_id\": 74,\n                \"message\": \"I ask! It's always six o'clock now.' A bright idea came into Alice's head. 'Is that the reason is--' here the Mock Turtle yawned and shut his eyes.--'Tell her about the twentieth time that day. 'No.\",\n                \"conversation_id\": 14,\n                \"isSender\": false,\n                \"latest_media\": null,\n                \"trashed\": null\n            },\n            \"participant\": {\n                \"id\": 27,\n                \"user_id\": 74,\n                \"conversation_id\": 14,\n                \"user\": {\n                    \"id\": 74,\n                    \"name\": \"Reginald Tremblay V\",\n                    \"active_at\": \"2020-12-20 10:11:49\",\n                    \"isBlocked\": null,\n                    \"age\": 0\n                }\n            }\n        },\n        {\n            \"id\": 13,\n            \"user_id\": 47,\n            \"deleted_at\": null,\n            \"created_at\": \"2020-12-21T12:56:35.000000Z\",\n            \"updated_at\": \"2020-12-21T12:56:35.000000Z\",\n            \"latest_message_at\": \"2020-12-21 12:56:35\",\n            \"unread_count\": 26,\n            \"chat_events\": [],\n            \"delivery\": {\n                \"id\": 3070,\n                \"made_type\": \"App\\\\Models\\\\Conversation\",\n                \"made_id\": 13,\n                \"created_at\": \"2020-12-28T12:16:07.000000Z\"\n            },\n            \"last_message\": {\n                \"id\": 320,\n                \"user_id\": 47,\n                \"message\": \"Queen, who was reading the list of the conversation. Alice replied, rather shyly, 'I--I hardly know, sir, just at first, but, after watching it a violent shake at the sudden change, but she added.\",\n                \"conversation_id\": 13,\n                \"isSender\": false,\n                \"latest_media\": null,\n                \"trashed\": null\n            },\n            \"participant\": {\n                \"id\": 25,\n                \"user_id\": 47,\n                \"conversation_id\": 13,\n                \"user\": {\n                    \"id\": 47,\n                    \"name\": \"Mrs. Magnolia Connelly I\",\n                    \"active_at\": \"2020-12-15 06:05:45\",\n                    \"isBlocked\": null,\n                    \"age\": 0\n                }\n            }\n        },\n        {\n            \"id\": 10,\n            \"user_id\": 122,\n            \"deleted_at\": null,\n            \"created_at\": \"2020-12-21T12:56:29.000000Z\",\n            \"updated_at\": \"2020-12-21T12:56:29.000000Z\",\n            \"latest_message_at\": \"2020-12-21 12:56:29\",\n            \"unread_count\": 40,\n            \"chat_events\": [],\n            \"delivery\": {\n                \"id\": 3071,\n                \"made_type\": \"App\\\\Models\\\\Conversation\",\n                \"made_id\": 10,\n                \"created_at\": \"2020-12-28T12:16:07.000000Z\"\n            },\n            \"last_message\": {\n                \"id\": 202,\n                \"user_id\": 122,\n                \"message\": \"I'm talking!' Just then she noticed that they must needs come wriggling down from the time he was gone, and, by the end of the bill, \\\"French, music, AND WASHING--extra.\\\"' 'You couldn't have done.\",\n                \"conversation_id\": 10,\n                \"isSender\": false,\n                \"latest_media\": null,\n                \"trashed\": null\n            },\n            \"participant\": {\n                \"id\": 19,\n                \"user_id\": 122,\n                \"conversation_id\": 10,\n                \"user\": {\n                    \"id\": 122,\n                    \"name\": \"Ms. Abigale Shields MD\",\n                    \"active_at\": \"2020-12-15 02:27:55\",\n                    \"isBlocked\": null,\n                    \"age\": 0\n                }\n            }\n        }\n    ],\n    \"first_page_url\": \"http://127.0.0.1:8000/api/conversations?page=1\",\n    \"from\": 1,\n    \"last_page\": 1,\n    \"last_page_url\": \"http://127.0.0.1:8000/api/conversations?page=1\",\n    \"links\": [\n        {\n            \"url\": null,\n            \"label\": \"&laquo; Previous\",\n            \"active\": false\n        },\n        {\n            \"url\": \"http://127.0.0.1:8000/api/conversations?page=1\",\n            \"label\": 1,\n            \"active\": true\n        },\n        {\n            \"url\": null,\n            \"label\": \"Next &raquo;\",\n            \"active\": false\n        }\n    ],\n    \"next_page_url\": null,\n    \"path\": \"http://127.0.0.1:8000/api/conversations\",\n    \"per_page\": 15,\n    \"prev_page_url\": null,\n    \"to\": 7,\n    \"total\": 7\n}"}],"_postman_id":"ffb1daaf-4c13-4c65-b5af-701b0fec2a85"},{"name":"View","event":[{"listen":"test","script":{"id":"6b8d31e6-8c84-4f1c-835b-094c3701d1a1","exec":["pm.test(\"Status code is 200|404\", function () {","    pm.expect(pm.response.code).to.be.oneOf([200, 404]);","});"],"type":"text/javascript"}}],"id":"31264871-9e9b-4021-8b12-2812f07e0b09","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://127.0.0.1:8000/api/conversations/{{conversation_id}}","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{token}}"}]},"isInherited":true,"source":{"_postman_id":"50192f04-2565-4e9c-bc3c-e8932cad98d8","id":"50192f04-2565-4e9c-bc3c-e8932cad98d8","name":"ChatSystem","type":"collection"}},"urlObject":{"path":["conversations","{{conversation_id}}"],"host":["http://127.0.0.1:8000/api"],"query":[],"variable":[]}},"response":[{"id":"e2ac6123-8fb3-4bec-a832-087f44f3332f","name":"View","originalRequest":{"method":"GET","header":[],"url":"http://127.0.0.1:8000/api/conversations/{{conversation_id}}"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Cache-Control","value":"no-cache, private"},{"key":"Date","value":"Fri, 25 Jun 2021 10:26:22 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"X-Ratelimit-Limit","value":"60"},{"key":"X-Ratelimit-Remaining","value":"59"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Server","value":"swoole-http-server"},{"key":"Connection","value":"keep-alive"},{"key":"Transfer-Encoding","value":"chunked"}],"cookie":[],"responseTime":null,"body":"{\n    \"id\": 1445,\n    \"user_id\": 214,\n    \"name\": \"Shade\",\n    \"type\": \"group\",\n    \"created_at\": \"2021-06-25T10:08:37.000000Z\",\n    \"updated_at\": \"2021-06-25T10:08:37.000000Z\"\n}"},{"id":"e8f14cec-f45c-44f4-8027-dcf4b933fa82","name":"View","originalRequest":{"method":"GET","header":[],"url":"http://127.0.0.1:8000/api/conversations/{{conversation_id}}"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Cache-Control","value":"no-cache, private"},{"key":"Date","value":"Fri, 25 Jun 2021 10:27:50 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"X-Ratelimit-Limit","value":"60"},{"key":"X-Ratelimit-Remaining","value":"59"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Server","value":"swoole-http-server"},{"key":"Connection","value":"keep-alive"},{"key":"Transfer-Encoding","value":"chunked"}],"cookie":[],"responseTime":null,"body":"{\n    \"id\": 1414,\n    \"user_id\": 85,\n    \"name\": \"Ottis Bayer\",\n    \"type\": \"private\",\n    \"created_at\": \"2021-04-07T00:37:57.000000Z\",\n    \"updated_at\": \"2021-04-07T00:37:57.000000Z\",\n    \"participant\": {\n        \"id\": 4780,\n        \"conversation_id\": 1414,\n        \"user_id\": 292,\n        \"user\": {\n            \"id\": 292,\n            \"name\": \"Ottis Bayer\"\n        }\n    }\n}"}],"_postman_id":"31264871-9e9b-4021-8b12-2812f07e0b09"},{"name":"Update","event":[{"listen":"test","script":{"id":"678f738a-9e01-44bc-8106-1123e86fe485","exec":["pm.test(\"Status code is 200|404\", function () {","    pm.expect(pm.response.code).to.be.oneOf([200, 404]);","});"],"type":"text/javascript"}}],"id":"79d4b921-a0ea-47a6-97c2-011679dac801","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[],"url":"http://127.0.0.1:8000/api/conversations/{{conversation_id}}?name=My Updated&type=group","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{token}}"}]},"isInherited":true,"source":{"_postman_id":"50192f04-2565-4e9c-bc3c-e8932cad98d8","id":"50192f04-2565-4e9c-bc3c-e8932cad98d8","name":"ChatSystem","type":"collection"}},"urlObject":{"path":["conversations","{{conversation_id}}"],"host":["http://127.0.0.1:8000/api"],"query":[{"description":{"content":"<p><code>string|min:3,max:50</code></p>\n<blockquote>\n<p>Optional conversation name</p>\n</blockquote>\n","type":"text/plain"},"key":"name","value":"My Updated"},{"description":{"content":"<p><code>in:private,group,issue</code></p>\n<blockquote>\n<p>Conversation type</p>\n</blockquote>\n","type":"text/plain"},"key":"type","value":"group"}],"variable":[]}},"response":[{"id":"c1272ab3-cf11-43ad-a51b-d06b3a2cb63a","name":"Update","originalRequest":{"method":"PUT","header":[],"url":{"raw":"http://127.0.0.1:8000/api/conversations/{{conversation_id}}?name=My Updated&type=group","host":["http://127.0.0.1:8000/api"],"path":["conversations","{{conversation_id}}"],"query":[{"key":"name","value":"My Updated","description":"`string|min:3,max:50`\n> Optional conversation name"},{"key":"type","value":"group","description":"`in:private,group,issue`\n> Conversation type"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Cache-Control","value":"no-cache, private"},{"key":"Date","value":"Sat, 16 Oct 2021 17:49:35 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"X-Ratelimit-Limit","value":"60"},{"key":"X-Ratelimit-Remaining","value":"36"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Server","value":"swoole-http-server"},{"key":"Connection","value":"keep-alive"},{"key":"Transfer-Encoding","value":"chunked"}],"cookie":[],"responseTime":null,"body":"{\n    \"id\": 584,\n    \"user_id\": 62,\n    \"name\": \"My Updated\",\n    \"type\": \"group\",\n    \"created_at\": \"2021-10-16T17:49:28.000000Z\",\n    \"updated_at\": \"2021-10-16T17:49:35.000000Z\"\n}"}],"_postman_id":"79d4b921-a0ea-47a6-97c2-011679dac801"},{"name":"Count","event":[{"listen":"test","script":{"id":"549e43dc-7ef8-4556-9d5f-1a18e5dd399a","exec":["pm.test(\"Status code is 200|404\", function () {","    pm.expect(pm.response.code).to.be.oneOf([200, 404]);","});"],"type":"text/javascript"}}],"id":"c1a4bf23-45cd-4655-8ea8-e5b923643c65","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://127.0.0.1:8000/api/conversations/count?type=unread","description":"<p>Count conversations with customized parameters</p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{token}}"}]},"isInherited":true,"source":{"_postman_id":"50192f04-2565-4e9c-bc3c-e8932cad98d8","id":"50192f04-2565-4e9c-bc3c-e8932cad98d8","name":"ChatSystem","type":"collection"}},"urlObject":{"path":["conversations","count"],"host":["http://127.0.0.1:8000/api"],"query":[{"description":{"content":"<p>in:unread|undelivered</p>\n","type":"text/plain"},"key":"type","value":"unread"}],"variable":[]}},"response":[{"id":"44863271-8329-419e-8b67-d2d3d6bd6372","name":"Count","originalRequest":{"method":"GET","header":[],"url":{"raw":"http://127.0.0.1:8000/api/conversations/count?type=unread","host":["http://127.0.0.1:8000/api"],"path":["conversations","count"],"query":[{"key":"type","value":"unread","description":"in:unread|undelivered"}]}},"status":"OK","code":200,"_postman_previewlanguage":"html","header":[{"key":"Host","value":"127.0.0.1:8000"},{"key":"Date","value":"Tue, 02 Feb 2021 09:44:05 GMT"},{"key":"Date","value":"Tue, 02 Feb 2021 09:44:05 GMT"},{"key":"Connection","value":"close"},{"key":"X-Powered-By","value":"PHP/8.0.1"},{"key":"Content-Type","value":"text/html; charset=UTF-8"},{"key":"Cache-Control","value":"no-cache, private"},{"key":"X-RateLimit-Limit","value":"60"},{"key":"X-RateLimit-Remaining","value":"57"},{"key":"Access-Control-Allow-Origin","value":"*"}],"cookie":[],"responseTime":null,"body":"2"}],"_postman_id":"c1a4bf23-45cd-4655-8ea8-e5b923643c65"},{"name":"Join","event":[{"listen":"test","script":{"id":"4d4fa669-9d75-4236-b228-821e211e43b2","exec":["pm.test(\"Status code is 200\", function () {","    pm.expect(pm.response.code).to.be.oneOf([200, 404]);","});"],"type":"text/javascript"}}],"id":"ecc5c25a-5d84-4384-961d-2a0f927c0025","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"url":"http://127.0.0.1:8000/api/conversations/{{conversation_id}}/join","description":"<p>Join Conversation which is not private</p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{token}}"}]},"isInherited":true,"source":{"_postman_id":"50192f04-2565-4e9c-bc3c-e8932cad98d8","id":"50192f04-2565-4e9c-bc3c-e8932cad98d8","name":"ChatSystem","type":"collection"}},"urlObject":{"path":["conversations","{{conversation_id}}","join"],"host":["http://127.0.0.1:8000/api"],"query":[],"variable":[]}},"response":[{"id":"bc05948c-61de-451b-adb4-eb5c9312774a","name":"Join","originalRequest":{"method":"POST","header":[],"url":"http://127.0.0.1:8000/api/conversations/{{conversation_id}}/join"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Cache-Control","value":"no-cache, private"},{"key":"Date","value":"Wed, 07 Jul 2021 16:06:37 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"X-Ratelimit-Limit","value":"60"},{"key":"X-Ratelimit-Remaining","value":"58"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Server","value":"swoole-http-server"},{"key":"Connection","value":"keep-alive"},{"key":"Transfer-Encoding","value":"chunked"}],"cookie":[],"responseTime":null,"body":"{\n    \"id\": 2949,\n    \"user_id\": 4004,\n    \"conversation_id\": 1806,\n    \"created_at\": \"2021-07-07T15:52:57.000000Z\",\n    \"updated_at\": \"2021-07-07T15:52:57.000000Z\"\n}"}],"_postman_id":"ecc5c25a-5d84-4384-961d-2a0f927c0025"},{"name":"Leave","event":[{"listen":"test","script":{"id":"08793397-8f67-4ed7-b1a8-b199482a946e","exec":["pm.test(\"Status code is 200\", function () {","    pm.expect(pm.response.code).to.be.oneOf([200, 404]);","});"],"type":"text/javascript"}}],"id":"9f14b118-a37f-4741-8ef9-c30e5229a733","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[],"url":"http://127.0.0.1:8000/api/conversations/{{conversation_id}}/join","description":"<p>Leave Conversation which is not private</p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{token}}"}]},"isInherited":true,"source":{"_postman_id":"50192f04-2565-4e9c-bc3c-e8932cad98d8","id":"50192f04-2565-4e9c-bc3c-e8932cad98d8","name":"ChatSystem","type":"collection"}},"urlObject":{"path":["conversations","{{conversation_id}}","join"],"host":["http://127.0.0.1:8000/api"],"query":[],"variable":[]}},"response":[{"id":"06e1818b-67ad-4b21-8ae4-a20a51d82514","name":"Leave","originalRequest":{"method":"DELETE","header":[],"url":"http://127.0.0.1:8000/api/conversations/{{conversation_id}}/join"},"status":"OK","code":200,"_postman_previewlanguage":"html","header":[{"key":"Content-Type","value":"text/html; charset=UTF-8"},{"key":"Cache-Control","value":"no-cache, private"},{"key":"Date","value":"Wed, 07 Jul 2021 15:52:20 GMT"},{"key":"X-Ratelimit-Limit","value":"60"},{"key":"X-Ratelimit-Remaining","value":"59"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Server","value":"swoole-http-server"},{"key":"Connection","value":"keep-alive"},{"key":"Transfer-Encoding","value":"chunked"}],"cookie":[],"responseTime":null,"body":"1"}],"_postman_id":"9f14b118-a37f-4741-8ef9-c30e5229a733"},{"name":"Delete","event":[{"listen":"test","script":{"id":"363dab95-3f8c-4b01-9e2d-887fb77556e6","exec":["pm.test(\"Status code is 200\", function () {","    pm.expect(pm.response.code).to.be.oneOf([200, 404]);","});"],"type":"text/javascript"}}],"id":"d680b779-8e5d-49fc-99d5-87eb3ff22e2c","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[],"url":"http://127.0.0.1:8000/api/conversations/{{conversation_id}}","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{token}}"}]},"isInherited":true,"source":{"_postman_id":"50192f04-2565-4e9c-bc3c-e8932cad98d8","id":"50192f04-2565-4e9c-bc3c-e8932cad98d8","name":"ChatSystem","type":"collection"}},"urlObject":{"path":["conversations","{{conversation_id}}"],"host":["http://127.0.0.1:8000/api"],"query":[],"variable":[]}},"response":[{"id":"650ff880-1bc2-4782-9fb1-de4568cf9ea4","name":"Delete","originalRequest":{"method":"DELETE","header":[],"url":"http://127.0.0.1:8000/api/conversations/{{conversation_id}}"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Host","value":"127.0.0.1:8000"},{"key":"Date","value":"Wed, 09 Dec 2020 18:41:34 GMT"},{"key":"Date","value":"Wed, 09 Dec 2020 18:41:34 GMT"},{"key":"Connection","value":"close"},{"key":"X-Powered-By","value":"PHP/8.0.0"},{"key":"Cache-Control","value":"no-cache, private"},{"key":"Content-Type","value":"application/json"},{"key":"X-RateLimit-Limit","value":"60"},{"key":"X-RateLimit-Remaining","value":"58"},{"key":"Access-Control-Allow-Origin","value":"*"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": {\n        \"user_id\": 220,\n        \"type\": \"delete\",\n        \"conversation_id\": 5490,\n        \"updated_at\": \"2020-12-09T18:41:34.000000Z\",\n        \"created_at\": \"2020-12-09T18:41:34.000000Z\",\n        \"id\": 2\n    }\n}"}],"_postman_id":"d680b779-8e5d-49fc-99d5-87eb3ff22e2c"}],"id":"769fec06-0d3f-4e49-b604-f50ad5b89147","description":"<p>Conversation Endpoints</p>\n","event":[{"listen":"prerequest","script":{"id":"01053bde-68fb-4131-b94a-4f736d4519d9","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"af819b35-9a4d-4b0c-a307-2a368a213132","type":"text/javascript","exec":[""]}}],"_postman_id":"769fec06-0d3f-4e49-b604-f50ad5b89147","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{token}}"}]},"isInherited":true,"source":{"_postman_id":"50192f04-2565-4e9c-bc3c-e8932cad98d8","id":"50192f04-2565-4e9c-bc3c-e8932cad98d8","name":"ChatSystem","type":"collection"}}},{"name":"Message","item":[{"name":"Events","item":[{"name":"CreatedEvent","event":[{"listen":"test","script":{"id":"1cc73dca-c041-4b3b-903a-888985fc6269","exec":["pm.test(\"Status code is 200, 403\", function () {","    pm.expect(pm.response.code).to.be.oneOf([200, 403]);","});"],"type":"text/javascript"}}],"id":"4aad478f-bf3c-4cb1-be7d-64f8a383b842","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://127.0.0.1:8000/api/broadcasting/auth?channel_name=message-created.{{conversation_id}}&socket_id=327108.11343802","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{token}}"}]},"isInherited":true,"source":{"_postman_id":"50192f04-2565-4e9c-bc3c-e8932cad98d8","id":"50192f04-2565-4e9c-bc3c-e8932cad98d8","name":"ChatSystem","type":"collection"}},"urlObject":{"path":["broadcasting","auth"],"host":["http://127.0.0.1:8000/api"],"query":[{"key":"channel_name","value":"message-created.{{conversation_id}}"},{"key":"socket_id","value":"327108.11343802"}],"variable":[]}},"response":[{"id":"ec4b4915-074d-4f4e-9dad-6baea4a9f953","name":"CreatedEvent","originalRequest":{"method":"GET","header":[],"url":{"raw":"http://127.0.0.1:8000/api/broadcasting/auth?channel_name=message-created.{{conversation_id}}","host":["http://127.0.0.1:8000/api"],"path":["broadcasting","auth"],"query":[{"key":"channel_name","value":"message-created.{{conversation_id}}"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Host","value":"127.0.0.1:8000"},{"key":"Date","value":"Thu, 10 Dec 2020 15:28:10 GMT"},{"key":"Date","value":"Thu, 10 Dec 2020 15:28:10 GMT"},{"key":"Connection","value":"close"},{"key":"X-Powered-By","value":"PHP/8.0.0"},{"key":"Cache-Control","value":"no-cache, private"},{"key":"Content-Type","value":"application/json"},{"key":"Access-Control-Allow-Origin","value":"*"}],"cookie":[],"responseTime":null,"body":"{\n    \"auth\": \"b97ebf181ca0e3b5abbc:3ff4929f57a09a18964b968f0f810b245fb7f57bf12bd809bf9b307ac1d16ba1\",\n    \"channel_data\": \"{\\\"user_id\\\":3163,\\\"user_info\\\":true}\"\n}"}],"_postman_id":"4aad478f-bf3c-4cb1-be7d-64f8a383b842"},{"name":"NewMessage","event":[{"listen":"test","script":{"id":"22bd1ebf-2314-417e-9271-da9a52abe757","exec":["pm.test(\"Status code is 200, 403\", function () {","    pm.expect(pm.response.code).to.be.oneOf([200, 403]);","});"],"type":"text/javascript"}}],"id":"a2150e40-0108-42a5-8717-50965a340b9b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://127.0.0.1:8000/api/broadcasting/auth?channel_name=message-new.user.{{user_id}}&socket_id=327108.11343802","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{token}}"}]},"isInherited":true,"source":{"_postman_id":"50192f04-2565-4e9c-bc3c-e8932cad98d8","id":"50192f04-2565-4e9c-bc3c-e8932cad98d8","name":"ChatSystem","type":"collection"}},"urlObject":{"path":["broadcasting","auth"],"host":["http://127.0.0.1:8000/api"],"query":[{"key":"channel_name","value":"message-new.user.{{user_id}}"},{"key":"socket_id","value":"327108.11343802"}],"variable":[]}},"response":[{"id":"245e90b5-b842-48ed-980f-aad9fcaee715","name":"MessageCreated","originalRequest":{"method":"GET","header":[],"url":{"raw":"http://127.0.0.1:8000/api/broadcasting/auth?channel_name=message-new.user.{{user_id}}","host":["http://127.0.0.1:8000/api"],"path":["broadcasting","auth"],"query":[{"key":"channel_name","value":"message-new.user.{{user_id}}"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Host","value":"127.0.0.1:8000"},{"key":"Date","value":"Mon, 14 Dec 2020 16:26:15 GMT"},{"key":"Date","value":"Mon, 14 Dec 2020 16:26:15 GMT"},{"key":"Connection","value":"close"},{"key":"X-Powered-By","value":"PHP/8.0.0"},{"key":"Cache-Control","value":"no-cache, private"},{"key":"Content-Type","value":"application/json"},{"key":"Access-Control-Allow-Origin","value":"*"}],"cookie":[],"responseTime":null,"body":"{\n    \"auth\": \"b97ebf181ca0e3b5abbc:f8a1ea503034589c9031f26ecb405ef45b371c57920eed1c6490f56501fdd735\",\n    \"channel_data\": \"{\\\"user_id\\\":3163,\\\"user_info\\\":true}\"\n}"}],"_postman_id":"a2150e40-0108-42a5-8717-50965a340b9b"},{"name":"User Message Event","event":[{"listen":"test","script":{"id":"e9b1cacc-7862-4b72-9ee5-f2fe13b6bd16","exec":["pm.test(\"Status code is 200, 403\", function () {","    pm.expect(pm.response.code).to.be.oneOf([200, 403]);","});"],"type":"text/javascript"}}],"id":"2da82c2c-77dc-4230-be95-911245f0123f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://127.0.0.1:8000/api/broadcasting/auth?channel_name=message-event.user.{{user_id}}&socket_id=327108.11343802","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{token}}"}]},"isInherited":true,"source":{"_postman_id":"50192f04-2565-4e9c-bc3c-e8932cad98d8","id":"50192f04-2565-4e9c-bc3c-e8932cad98d8","name":"ChatSystem","type":"collection"}},"urlObject":{"path":["broadcasting","auth"],"host":["http://127.0.0.1:8000/api"],"query":[{"key":"channel_name","value":"message-event.user.{{user_id}}"},{"key":"socket_id","value":"327108.11343802"}],"variable":[]}},"response":[{"id":"7fca17d7-82c8-4f5c-8a9d-848ed7182099","name":"User Message Event","originalRequest":{"method":"GET","header":[],"url":{"raw":"http://127.0.0.1:8000/api/broadcasting/auth?channel_name=message-event.user.{{user_id}}","host":["http://127.0.0.1:8000/api"],"path":["broadcasting","auth"],"query":[{"key":"channel_name","value":"message-event.user.{{user_id}}"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Host","value":"127.0.0.1:8000"},{"key":"Date","value":"Wed, 06 Jan 2021 08:07:03 GMT"},{"key":"Date","value":"Wed, 06 Jan 2021 08:07:03 GMT"},{"key":"Connection","value":"close"},{"key":"X-Powered-By","value":"PHP/7.4.6"},{"key":"Cache-Control","value":"no-cache, private"},{"key":"Content-Type","value":"application/json"},{"key":"Access-Control-Allow-Origin","value":"*"}],"cookie":[],"responseTime":null,"body":"{\n    \"auth\": \"b97ebf181ca0e3b5abbc:8acd72882fd2525bba2d9fc30c6d20889c2a92f2ab89e73465f01a82e0ebd73e\",\n    \"channel_data\": \"{\\\"user_id\\\":1,\\\"user_info\\\":true}\"\n}"}],"_postman_id":"2da82c2c-77dc-4230-be95-911245f0123f"}],"id":"a7be3416-0ff8-42bc-96e3-3164a6a7cf51","_postman_id":"a7be3416-0ff8-42bc-96e3-3164a6a7cf51","description":"","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{token}}"}]},"isInherited":true,"source":{"_postman_id":"50192f04-2565-4e9c-bc3c-e8932cad98d8","id":"50192f04-2565-4e9c-bc3c-e8932cad98d8","name":"ChatSystem","type":"collection"}}},{"name":"Add","event":[{"listen":"test","script":{"id":"166e4caa-e8de-41b5-b046-d8b76b94e1b4","exec":["pm.test(\"Status code is 201\", function () {","    pm.expect(pm.response.code).to.be.oneOf([200, 201, 404, 403]);","});","","const res = JSON.parse(responseBody);","res.id && postman.setEnvironmentVariable(\"message_id\", res.id);","res.id && postman.setEnvironmentVariable(\"made_id\", res.id);","res.id && postman.setEnvironmentVariable(\"reply_id\", res.id);","res.id && postman.setEnvironmentVariable(\"reply_type\", \"App\\\\Models\\\\Message\");","res.id && postman.setEnvironmentVariable(\"made_type\", \"App\\\\Models\\\\Message\");","res.conversation_id && postman.setEnvironmentVariable(\"conversation_id\", res.conversation_id);",""],"type":"text/javascript"}},{"listen":"prerequest","script":{"id":"6391465e-b3cf-469f-a8d8-5d86529239c3","exec":["const token = pm.globals.get('token');","","postman.setEnvironmentVariable(\"message_token\", new Date().getTime());",""],"type":"text/javascript"}}],"id":"30d984e7-b718-4d87-9807-c4c1c3b1bfa1","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"formdata","formdata":[{"key":"image","value":"{{base64_image}}","type":"text","disabled":true},{"key":"videos[]","type":"file","src":"/Users/martinsosodi/Downloads/40 sec.mp4","disabled":true},{"key":"videos[]","type":"file","src":"/Users/martinsosodi/Downloads/10 sec.mp4","disabled":true}]},"url":"http://127.0.0.1:8000/api/messages?conversation_id={{conversation_id}}&message={{message_text}}&token={{message_token}}","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{token}}"}]},"isInherited":true,"source":{"_postman_id":"50192f04-2565-4e9c-bc3c-e8932cad98d8","id":"50192f04-2565-4e9c-bc3c-e8932cad98d8","name":"ChatSystem","type":"collection"}},"urlObject":{"path":["messages"],"host":["http://127.0.0.1:8000/api"],"query":[{"key":"conversation_id","value":"{{conversation_id}}"},{"key":"message","value":"{{message_text}}"},{"disabled":true,"key":"reply_id","value":"{{message_id}}"},{"disabled":true,"key":"other_user_id","value":"{{other_user_id}}"},{"disabled":true,"description":{"content":"<p>in:App\\Models\\Message,App\\Models\\Story</p>\n","type":"text/plain"},"key":"reply_type","value":"App\\Models\\Message"},{"key":"token","value":"{{message_token}}"}],"variable":[]}},"response":[{"id":"b5b7f946-4314-4c1c-bc0a-275069580529","name":"Add","originalRequest":{"method":"POST","header":[],"body":{"mode":"formdata","formdata":[{"key":"image","value":"{{base64_image}}","type":"text","disabled":true},{"key":"videos[]","type":"file","src":"/Users/martinsosodi/Downloads/40 sec.mp4","disabled":true},{"key":"videos[]","type":"file","src":"/Users/martinsosodi/Downloads/10 sec.mp4","disabled":true}]},"url":{"raw":"http://127.0.0.1:8000/api/messages?conversation_id={{conversation_id}}&message={{message_text}}&token={{message_token}}","host":["http://127.0.0.1:8000/api"],"path":["messages"],"query":[{"key":"conversation_id","value":"{{conversation_id}}"},{"key":"message","value":"{{message_text}}"},{"key":"reply_id","value":"{{message_id}}","disabled":true},{"key":"other_user_id","value":"{{other_user_id}}","disabled":true},{"key":"reply_type","value":"App\\Models\\Message","description":"in:App\\Models\\Message,App\\Models\\Story","disabled":true},{"key":"token","value":"{{message_token}}"}]}},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"Cache-Control","value":"no-cache, private"},{"key":"Date","value":"Thu, 01 Jul 2021 11:23:27 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"X-Ratelimit-Limit","value":"60"},{"key":"X-Ratelimit-Remaining","value":"59"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Server","value":"swoole-http-server"},{"key":"Connection","value":"keep-alive"},{"key":"Transfer-Encoding","value":"chunked"}],"cookie":[],"responseTime":null,"body":"{\n    \"reply_id\": null,\n    \"reply_type\": null,\n    \"user_id\": 214,\n    \"message\": \"how are you\",\n    \"type\": \"user\",\n    \"metas\": {\n        \"token\": \"1625138607027\"\n    },\n    \"conversation_id\": 1445,\n    \"updated_at\": \"2021-07-01T11:23:27.000000Z\",\n    \"created_at\": \"2021-07-01T11:23:27.000000Z\",\n    \"id\": 4816,\n    \"isSender\": true,\n    \"reply\": null\n}"}],"_postman_id":"30d984e7-b718-4d87-9807-c4c1c3b1bfa1"},{"name":"Get","event":[{"listen":"test","script":{"id":"e1e854bd-e905-4752-a2b6-5bd75f1b56a8","exec":["pm.test(\"Status code is 200\", function () {","    pm.response.to.have.status(200);","});","","const res = JSON.parse(responseBody);","if(res && res.data && res.data.length){","    postman.setEnvironmentVariable(\"message_id\", res.data[0].id)","}"],"type":"text/javascript"}}],"id":"3c0b914a-112e-4ea0-aa77-6636388438b5","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://127.0.0.1:8000/api/messages?pageSize=40&order=desc&conversation_id={{conversation_id}}&other_user_id={{other_user_id}}&reply_type={{reply_type}}&reply_id={{message_id}}","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{token}}"}]},"isInherited":true,"source":{"_postman_id":"50192f04-2565-4e9c-bc3c-e8932cad98d8","id":"50192f04-2565-4e9c-bc3c-e8932cad98d8","name":"ChatSystem","type":"collection"}},"urlObject":{"path":["messages"],"host":["http://127.0.0.1:8000/api"],"query":[{"key":"pageSize","value":"40"},{"key":"order","value":"desc"},{"description":{"content":"<p>int</p>\n","type":"text/plain"},"key":"conversation_id","value":"{{conversation_id}}"},{"description":{"content":"<p>int</p>\n","type":"text/plain"},"key":"other_user_id","value":"{{other_user_id}}"},{"description":{"content":"<p>in:(App\\Models\\Story,App\\Models\\Message)</p>\n","type":"text/plain"},"key":"reply_type","value":"{{reply_type}}"},{"key":"reply_id","value":"{{message_id}}"}],"variable":[]}},"response":[{"id":"bfc25122-1036-454a-8dcf-94b7d29b6131","name":"Get","originalRequest":{"method":"GET","header":[],"url":{"raw":"http://127.0.0.1:8000/api/messages?pageSize=40&order=desc&conversation_id={{conversation_id}}&other_user_id={{other_user_id}}&reply_type=App\\Models\\Story&reply_id=6117","host":["http://127.0.0.1:8000/api"],"path":["messages"],"query":[{"key":"pageSize","value":"40"},{"key":"order","value":"desc"},{"key":"conversation_id","value":"{{conversation_id}}","description":"int"},{"key":"other_user_id","value":"{{other_user_id}}","description":"int"},{"key":"reply_type","value":"App\\Models\\Story","description":"in:(App\\\\Models\\\\Story,App\\\\Models\\\\Message)"},{"key":"reply_id","value":"6117"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Host","value":"127.0.0.1:8000"},{"key":"Date","value":"Mon, 28 Dec 2020 16:28:12 GMT"},{"key":"Date","value":"Mon, 28 Dec 2020 16:28:12 GMT"},{"key":"Connection","value":"close"},{"key":"X-Powered-By","value":"PHP/7.4.6"},{"key":"Cache-Control","value":"no-cache, private"},{"key":"Content-Type","value":"application/json"},{"key":"X-RateLimit-Limit","value":"60"},{"key":"X-RateLimit-Remaining","value":"59"},{"key":"Access-Control-Allow-Origin","value":"*"}],"cookie":[],"responseTime":null,"body":"{\n    \"current_page\": 1,\n    \"data\": [\n        {\n            \"conversation_id\": 64,\n            \"message\": \"For your safety and privacy, do not share sensitive \\ninformation like bank details, credit cards, personal \\naddress or current location to strangers. \\nTap to learn more\",\n            \"id\": 1,\n            \"system\": true\n        },\n        {\n            \"conversation_id\": 64,\n            \"message\": \"Swipe left on a message to reply, \\nTap and hold for more options\",\n            \"id\": 2,\n            \"system\": true\n        },\n        {\n            \"id\": 1985,\n            \"conversation_id\": 64,\n            \"user_id\": 1,\n            \"reply_type\": null,\n            \"reply_id\": null,\n            \"message\": \"I love you too\",\n            \"created_at\": \"2020-12-28T15:15:41.000000Z\",\n            \"updated_at\": \"2020-12-28T15:15:41.000000Z\",\n            \"isSender\": true,\n            \"chat_events\": [\n                {\n                    \"id\": 3076,\n                    \"maker_type\": \"App\\\\User\",\n                    \"maker_id\": 1,\n                    \"made_type\": \"App\\\\Models\\\\Conversation\",\n                    \"made_id\": 64,\n                    \"type\": \"delete\",\n                    \"created_at\": \"2020-12-28T13:09:44.000000Z\",\n                    \"updated_at\": \"2020-12-28T13:09:44.000000Z\",\n                    \"laravel_through_key\": 64\n                },\n                {\n                    \"id\": 3062,\n                    \"maker_type\": \"App\\\\User\",\n                    \"maker_id\": 1,\n                    \"made_type\": \"App\\\\Models\\\\Conversation\",\n                    \"made_id\": 64,\n                    \"type\": \"deliver\",\n                    \"created_at\": \"2020-12-28T04:58:13.000000Z\",\n                    \"updated_at\": \"2020-12-28T04:58:13.000000Z\",\n                    \"laravel_through_key\": 64\n                },\n                {\n                    \"id\": 3061,\n                    \"maker_type\": \"App\\\\User\",\n                    \"maker_id\": 1,\n                    \"made_type\": \"App\\\\Models\\\\Conversation\",\n                    \"made_id\": 64,\n                    \"type\": \"read\",\n                    \"created_at\": \"2020-12-28T04:47:06.000000Z\",\n                    \"updated_at\": \"2020-12-28T04:47:06.000000Z\",\n                    \"laravel_through_key\": 64\n                }\n            ],\n            \"reply\": null,\n            \"trashed\": {\n                \"id\": 3082,\n                \"maker_id\": 1,\n                \"maker_type\": \"App\\\\User\",\n                \"made_id\": 1985,\n                \"made_type\": \"App\\\\Models\\\\Message\"\n            },\n            \"sender\": {\n                \"id\": 1,\n                \"name\": \"myckhel\",\n                \"isBlocked\": null,\n                \"age\": 0\n            }\n        },\n        {\n            \"id\": 1984,\n            \"conversation_id\": 64,\n            \"user_id\": 13,\n            \"reply_type\": null,\n            \"reply_id\": null,\n            \"message\": \"my message\",\n            \"created_at\": \"2020-12-28T13:48:49.000000Z\",\n            \"updated_at\": \"2020-12-28T13:48:49.000000Z\",\n            \"isSender\": false,\n            \"chat_events\": [\n                {\n                    \"id\": 3076,\n                    \"maker_type\": \"App\\\\User\",\n                    \"maker_id\": 1,\n                    \"made_type\": \"App\\\\Models\\\\Conversation\",\n                    \"made_id\": 64,\n                    \"type\": \"delete\",\n                    \"created_at\": \"2020-12-28T13:09:44.000000Z\",\n                    \"updated_at\": \"2020-12-28T13:09:44.000000Z\",\n                    \"laravel_through_key\": 64\n                },\n                {\n                    \"id\": 3062,\n                    \"maker_type\": \"App\\\\User\",\n                    \"maker_id\": 1,\n                    \"made_type\": \"App\\\\Models\\\\Conversation\",\n                    \"made_id\": 64,\n                    \"type\": \"deliver\",\n                    \"created_at\": \"2020-12-28T04:58:13.000000Z\",\n                    \"updated_at\": \"2020-12-28T04:58:13.000000Z\",\n                    \"laravel_through_key\": 64\n                },\n                {\n                    \"id\": 3061,\n                    \"maker_type\": \"App\\\\User\",\n                    \"maker_id\": 1,\n                    \"made_type\": \"App\\\\Models\\\\Conversation\",\n                    \"made_id\": 64,\n                    \"type\": \"read\",\n                    \"created_at\": \"2020-12-28T04:47:06.000000Z\",\n                    \"updated_at\": \"2020-12-28T04:47:06.000000Z\",\n                    \"laravel_through_key\": 64\n                }\n            ],\n            \"reply\": null,\n            \"trashed\": null,\n            \"sender\": {\n                \"id\": 13,\n                \"name\": \"Mr. Jaylen Torp Jr.\",\n                \"isBlocked\": null,\n                \"age\": 0\n            }\n        },\n        {\n            \"id\": 1983,\n            \"conversation_id\": 64,\n            \"user_id\": 1,\n            \"reply_type\": null,\n            \"reply_id\": null,\n            \"message\": \"how are you\",\n            \"created_at\": \"2020-12-28T13:48:43.000000Z\",\n            \"updated_at\": \"2020-12-28T13:48:43.000000Z\",\n            \"isSender\": true,\n            \"chat_events\": [\n                {\n                    \"id\": 3076,\n                    \"maker_type\": \"App\\\\User\",\n                    \"maker_id\": 1,\n                    \"made_type\": \"App\\\\Models\\\\Conversation\",\n                    \"made_id\": 64,\n                    \"type\": \"delete\",\n                    \"created_at\": \"2020-12-28T13:09:44.000000Z\",\n                    \"updated_at\": \"2020-12-28T13:09:44.000000Z\",\n                    \"laravel_through_key\": 64\n                },\n                {\n                    \"id\": 3062,\n                    \"maker_type\": \"App\\\\User\",\n                    \"maker_id\": 1,\n                    \"made_type\": \"App\\\\Models\\\\Conversation\",\n                    \"made_id\": 64,\n                    \"type\": \"deliver\",\n                    \"created_at\": \"2020-12-28T04:58:13.000000Z\",\n                    \"updated_at\": \"2020-12-28T04:58:13.000000Z\",\n                    \"laravel_through_key\": 64\n                },\n                {\n                    \"id\": 3061,\n                    \"maker_type\": \"App\\\\User\",\n                    \"maker_id\": 1,\n                    \"made_type\": \"App\\\\Models\\\\Conversation\",\n                    \"made_id\": 64,\n                    \"type\": \"read\",\n                    \"created_at\": \"2020-12-28T04:47:06.000000Z\",\n                    \"updated_at\": \"2020-12-28T04:47:06.000000Z\",\n                    \"laravel_through_key\": 64\n                }\n            ],\n            \"reply\": null,\n            \"trashed\": null,\n            \"sender\": {\n                \"id\": 1,\n                \"name\": \"myckhel\",\n                \"isBlocked\": null,\n                \"age\": 0\n            }\n        },\n        {\n            \"id\": 1982,\n            \"conversation_id\": 64,\n            \"user_id\": 1,\n            \"reply_type\": null,\n            \"reply_id\": null,\n            \"message\": \"i am good\",\n            \"created_at\": \"2020-12-28T13:10:17.000000Z\",\n            \"updated_at\": \"2020-12-28T13:10:17.000000Z\",\n            \"isSender\": true,\n            \"chat_events\": [\n                {\n                    \"id\": 3076,\n                    \"maker_type\": \"App\\\\User\",\n                    \"maker_id\": 1,\n                    \"made_type\": \"App\\\\Models\\\\Conversation\",\n                    \"made_id\": 64,\n                    \"type\": \"delete\",\n                    \"created_at\": \"2020-12-28T13:09:44.000000Z\",\n                    \"updated_at\": \"2020-12-28T13:09:44.000000Z\",\n                    \"laravel_through_key\": 64\n                },\n                {\n                    \"id\": 3062,\n                    \"maker_type\": \"App\\\\User\",\n                    \"maker_id\": 1,\n                    \"made_type\": \"App\\\\Models\\\\Conversation\",\n                    \"made_id\": 64,\n                    \"type\": \"deliver\",\n                    \"created_at\": \"2020-12-28T04:58:13.000000Z\",\n                    \"updated_at\": \"2020-12-28T04:58:13.000000Z\",\n                    \"laravel_through_key\": 64\n                },\n                {\n                    \"id\": 3061,\n                    \"maker_type\": \"App\\\\User\",\n                    \"maker_id\": 1,\n                    \"made_type\": \"App\\\\Models\\\\Conversation\",\n                    \"made_id\": 64,\n                    \"type\": \"read\",\n                    \"created_at\": \"2020-12-28T04:47:06.000000Z\",\n                    \"updated_at\": \"2020-12-28T04:47:06.000000Z\",\n                    \"laravel_through_key\": 64\n                }\n            ],\n            \"reply\": null,\n            \"trashed\": null,\n            \"sender\": {\n                \"id\": 1,\n                \"name\": \"myckhel\",\n                \"isBlocked\": null,\n                \"age\": 0\n            }\n        }\n    ],\n    \"first_page_url\": \"http://127.0.0.1:8000/api/messages?page=1\",\n    \"from\": 1,\n    \"last_page\": 1,\n    \"last_page_url\": \"http://127.0.0.1:8000/api/messages?page=1\",\n    \"links\": [\n        {\n            \"url\": null,\n            \"label\": \"&laquo; Previous\",\n            \"active\": false\n        },\n        {\n            \"url\": \"http://127.0.0.1:8000/api/messages?page=1\",\n            \"label\": 1,\n            \"active\": true\n        },\n        {\n            \"url\": null,\n            \"label\": \"Next &raquo;\",\n            \"active\": false\n        }\n    ],\n    \"next_page_url\": null,\n    \"path\": \"http://127.0.0.1:8000/api/messages\",\n    \"per_page\": \"40\",\n    \"prev_page_url\": null,\n    \"to\": 6,\n    \"total\": 4\n}"}],"_postman_id":"3c0b914a-112e-4ea0-aa77-6636388438b5"},{"name":"View","event":[{"listen":"test","script":{"id":"35a6e50c-af1f-425c-b574-ea7f2fd24f9d","exec":["pm.test(\"Status code is 200\", function () {","    pm.response.to.have.status(200);","});","","const res = JSON.parse(responseBody);","if(res && res.data && res.data.length){","    postman.setEnvironmentVariable(\"message_id\", res.data[0].id)","}"],"type":"text/javascript"}}],"id":"95583f2f-23e0-49c4-b108-b9ed7e033a15","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://127.0.0.1:8000/api/messages/{{message_id}}","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{token}}"}]},"isInherited":true,"source":{"_postman_id":"50192f04-2565-4e9c-bc3c-e8932cad98d8","id":"50192f04-2565-4e9c-bc3c-e8932cad98d8","name":"ChatSystem","type":"collection"}},"urlObject":{"path":["messages","{{message_id}}"],"host":["http://127.0.0.1:8000/api"],"query":[],"variable":[]}},"response":[{"id":"ca811aeb-9f86-4af3-8b3a-fd50eabb1aec","name":"Get","originalRequest":{"method":"GET","header":[],"url":{"raw":"http://127.0.0.1:8000/api/messages?pageSize=40&order=desc&conversation_id={{conversation_id}}&other_user_id={{other_user_id}}&reply_type=App\\Models\\Story&reply_id=6117","host":["http://127.0.0.1:8000/api"],"path":["messages"],"query":[{"key":"pageSize","value":"40"},{"key":"order","value":"desc"},{"key":"conversation_id","value":"{{conversation_id}}","description":"int"},{"key":"other_user_id","value":"{{other_user_id}}","description":"int"},{"key":"reply_type","value":"App\\Models\\Story","description":"in:(App\\\\Models\\\\Story,App\\\\Models\\\\Message)"},{"key":"reply_id","value":"6117"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Host","value":"127.0.0.1:8000"},{"key":"Date","value":"Mon, 28 Dec 2020 16:28:12 GMT"},{"key":"Date","value":"Mon, 28 Dec 2020 16:28:12 GMT"},{"key":"Connection","value":"close"},{"key":"X-Powered-By","value":"PHP/7.4.6"},{"key":"Cache-Control","value":"no-cache, private"},{"key":"Content-Type","value":"application/json"},{"key":"X-RateLimit-Limit","value":"60"},{"key":"X-RateLimit-Remaining","value":"59"},{"key":"Access-Control-Allow-Origin","value":"*"}],"cookie":[],"responseTime":null,"body":"{\n    \"current_page\": 1,\n    \"data\": [\n        {\n            \"conversation_id\": 64,\n            \"message\": \"For your safety and privacy, do not share sensitive \\ninformation like bank details, credit cards, personal \\naddress or current location to strangers. \\nTap to learn more\",\n            \"id\": 1,\n            \"system\": true\n        },\n        {\n            \"conversation_id\": 64,\n            \"message\": \"Swipe left on a message to reply, \\nTap and hold for more options\",\n            \"id\": 2,\n            \"system\": true\n        },\n        {\n            \"id\": 1985,\n            \"conversation_id\": 64,\n            \"user_id\": 1,\n            \"reply_type\": null,\n            \"reply_id\": null,\n            \"message\": \"I love you too\",\n            \"created_at\": \"2020-12-28T15:15:41.000000Z\",\n            \"updated_at\": \"2020-12-28T15:15:41.000000Z\",\n            \"isSender\": true,\n            \"chat_events\": [\n                {\n                    \"id\": 3076,\n                    \"maker_type\": \"App\\\\User\",\n                    \"maker_id\": 1,\n                    \"made_type\": \"App\\\\Models\\\\Conversation\",\n                    \"made_id\": 64,\n                    \"type\": \"delete\",\n                    \"created_at\": \"2020-12-28T13:09:44.000000Z\",\n                    \"updated_at\": \"2020-12-28T13:09:44.000000Z\",\n                    \"laravel_through_key\": 64\n                },\n                {\n                    \"id\": 3062,\n                    \"maker_type\": \"App\\\\User\",\n                    \"maker_id\": 1,\n                    \"made_type\": \"App\\\\Models\\\\Conversation\",\n                    \"made_id\": 64,\n                    \"type\": \"deliver\",\n                    \"created_at\": \"2020-12-28T04:58:13.000000Z\",\n                    \"updated_at\": \"2020-12-28T04:58:13.000000Z\",\n                    \"laravel_through_key\": 64\n                },\n                {\n                    \"id\": 3061,\n                    \"maker_type\": \"App\\\\User\",\n                    \"maker_id\": 1,\n                    \"made_type\": \"App\\\\Models\\\\Conversation\",\n                    \"made_id\": 64,\n                    \"type\": \"read\",\n                    \"created_at\": \"2020-12-28T04:47:06.000000Z\",\n                    \"updated_at\": \"2020-12-28T04:47:06.000000Z\",\n                    \"laravel_through_key\": 64\n                }\n            ],\n            \"reply\": null,\n            \"trashed\": {\n                \"id\": 3082,\n                \"maker_id\": 1,\n                \"maker_type\": \"App\\\\User\",\n                \"made_id\": 1985,\n                \"made_type\": \"App\\\\Models\\\\Message\"\n            },\n            \"sender\": {\n                \"id\": 1,\n                \"name\": \"myckhel\",\n                \"isBlocked\": null,\n                \"age\": 0\n            }\n        },\n        {\n            \"id\": 1984,\n            \"conversation_id\": 64,\n            \"user_id\": 13,\n            \"reply_type\": null,\n            \"reply_id\": null,\n            \"message\": \"my message\",\n            \"created_at\": \"2020-12-28T13:48:49.000000Z\",\n            \"updated_at\": \"2020-12-28T13:48:49.000000Z\",\n            \"isSender\": false,\n            \"chat_events\": [\n                {\n                    \"id\": 3076,\n                    \"maker_type\": \"App\\\\User\",\n                    \"maker_id\": 1,\n                    \"made_type\": \"App\\\\Models\\\\Conversation\",\n                    \"made_id\": 64,\n                    \"type\": \"delete\",\n                    \"created_at\": \"2020-12-28T13:09:44.000000Z\",\n                    \"updated_at\": \"2020-12-28T13:09:44.000000Z\",\n                    \"laravel_through_key\": 64\n                },\n                {\n                    \"id\": 3062,\n                    \"maker_type\": \"App\\\\User\",\n                    \"maker_id\": 1,\n                    \"made_type\": \"App\\\\Models\\\\Conversation\",\n                    \"made_id\": 64,\n                    \"type\": \"deliver\",\n                    \"created_at\": \"2020-12-28T04:58:13.000000Z\",\n                    \"updated_at\": \"2020-12-28T04:58:13.000000Z\",\n                    \"laravel_through_key\": 64\n                },\n                {\n                    \"id\": 3061,\n                    \"maker_type\": \"App\\\\User\",\n                    \"maker_id\": 1,\n                    \"made_type\": \"App\\\\Models\\\\Conversation\",\n                    \"made_id\": 64,\n                    \"type\": \"read\",\n                    \"created_at\": \"2020-12-28T04:47:06.000000Z\",\n                    \"updated_at\": \"2020-12-28T04:47:06.000000Z\",\n                    \"laravel_through_key\": 64\n                }\n            ],\n            \"reply\": null,\n            \"trashed\": null,\n            \"sender\": {\n                \"id\": 13,\n                \"name\": \"Mr. Jaylen Torp Jr.\",\n                \"isBlocked\": null,\n                \"age\": 0\n            }\n        },\n        {\n            \"id\": 1983,\n            \"conversation_id\": 64,\n            \"user_id\": 1,\n            \"reply_type\": null,\n            \"reply_id\": null,\n            \"message\": \"how are you\",\n            \"created_at\": \"2020-12-28T13:48:43.000000Z\",\n            \"updated_at\": \"2020-12-28T13:48:43.000000Z\",\n            \"isSender\": true,\n            \"chat_events\": [\n                {\n                    \"id\": 3076,\n                    \"maker_type\": \"App\\\\User\",\n                    \"maker_id\": 1,\n                    \"made_type\": \"App\\\\Models\\\\Conversation\",\n                    \"made_id\": 64,\n                    \"type\": \"delete\",\n                    \"created_at\": \"2020-12-28T13:09:44.000000Z\",\n                    \"updated_at\": \"2020-12-28T13:09:44.000000Z\",\n                    \"laravel_through_key\": 64\n                },\n                {\n                    \"id\": 3062,\n                    \"maker_type\": \"App\\\\User\",\n                    \"maker_id\": 1,\n                    \"made_type\": \"App\\\\Models\\\\Conversation\",\n                    \"made_id\": 64,\n                    \"type\": \"deliver\",\n                    \"created_at\": \"2020-12-28T04:58:13.000000Z\",\n                    \"updated_at\": \"2020-12-28T04:58:13.000000Z\",\n                    \"laravel_through_key\": 64\n                },\n                {\n                    \"id\": 3061,\n                    \"maker_type\": \"App\\\\User\",\n                    \"maker_id\": 1,\n                    \"made_type\": \"App\\\\Models\\\\Conversation\",\n                    \"made_id\": 64,\n                    \"type\": \"read\",\n                    \"created_at\": \"2020-12-28T04:47:06.000000Z\",\n                    \"updated_at\": \"2020-12-28T04:47:06.000000Z\",\n                    \"laravel_through_key\": 64\n                }\n            ],\n            \"reply\": null,\n            \"trashed\": null,\n            \"sender\": {\n                \"id\": 1,\n                \"name\": \"myckhel\",\n                \"isBlocked\": null,\n                \"age\": 0\n            }\n        },\n        {\n            \"id\": 1982,\n            \"conversation_id\": 64,\n            \"user_id\": 1,\n            \"reply_type\": null,\n            \"reply_id\": null,\n            \"message\": \"i am good\",\n            \"created_at\": \"2020-12-28T13:10:17.000000Z\",\n            \"updated_at\": \"2020-12-28T13:10:17.000000Z\",\n            \"isSender\": true,\n            \"chat_events\": [\n                {\n                    \"id\": 3076,\n                    \"maker_type\": \"App\\\\User\",\n                    \"maker_id\": 1,\n                    \"made_type\": \"App\\\\Models\\\\Conversation\",\n                    \"made_id\": 64,\n                    \"type\": \"delete\",\n                    \"created_at\": \"2020-12-28T13:09:44.000000Z\",\n                    \"updated_at\": \"2020-12-28T13:09:44.000000Z\",\n                    \"laravel_through_key\": 64\n                },\n                {\n                    \"id\": 3062,\n                    \"maker_type\": \"App\\\\User\",\n                    \"maker_id\": 1,\n                    \"made_type\": \"App\\\\Models\\\\Conversation\",\n                    \"made_id\": 64,\n                    \"type\": \"deliver\",\n                    \"created_at\": \"2020-12-28T04:58:13.000000Z\",\n                    \"updated_at\": \"2020-12-28T04:58:13.000000Z\",\n                    \"laravel_through_key\": 64\n                },\n                {\n                    \"id\": 3061,\n                    \"maker_type\": \"App\\\\User\",\n                    \"maker_id\": 1,\n                    \"made_type\": \"App\\\\Models\\\\Conversation\",\n                    \"made_id\": 64,\n                    \"type\": \"read\",\n                    \"created_at\": \"2020-12-28T04:47:06.000000Z\",\n                    \"updated_at\": \"2020-12-28T04:47:06.000000Z\",\n                    \"laravel_through_key\": 64\n                }\n            ],\n            \"reply\": null,\n            \"trashed\": null,\n            \"sender\": {\n                \"id\": 1,\n                \"name\": \"myckhel\",\n                \"isBlocked\": null,\n                \"age\": 0\n            }\n        }\n    ],\n    \"first_page_url\": \"http://127.0.0.1:8000/api/messages?page=1\",\n    \"from\": 1,\n    \"last_page\": 1,\n    \"last_page_url\": \"http://127.0.0.1:8000/api/messages?page=1\",\n    \"links\": [\n        {\n            \"url\": null,\n            \"label\": \"&laquo; Previous\",\n            \"active\": false\n        },\n        {\n            \"url\": \"http://127.0.0.1:8000/api/messages?page=1\",\n            \"label\": 1,\n            \"active\": true\n        },\n        {\n            \"url\": null,\n            \"label\": \"Next &raquo;\",\n            \"active\": false\n        }\n    ],\n    \"next_page_url\": null,\n    \"path\": \"http://127.0.0.1:8000/api/messages\",\n    \"per_page\": \"40\",\n    \"prev_page_url\": null,\n    \"to\": 6,\n    \"total\": 4\n}"}],"_postman_id":"95583f2f-23e0-49c4-b108-b9ed7e033a15"},{"name":"Delete","event":[{"listen":"test","script":{"id":"6f330784-d99a-4627-ab7c-0cec41830bf6","exec":["pm.test(\"Status code is 200\", function () {","    pm.expect(pm.response.code).to.be.oneOf([200, 404]);","});"],"type":"text/javascript"}}],"id":"cd870547-b083-494b-b8ae-7a2df69c906f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[],"url":"http://127.0.0.1:8000/api/messages/{{message_id}}?everyone=1","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{token}}"}]},"isInherited":true,"source":{"_postman_id":"50192f04-2565-4e9c-bc3c-e8932cad98d8","id":"50192f04-2565-4e9c-bc3c-e8932cad98d8","name":"ChatSystem","type":"collection"}},"urlObject":{"path":["messages","{{message_id}}"],"host":["http://127.0.0.1:8000/api"],"query":[{"description":{"content":"<p>bool\ndelete for everyone</p>\n","type":"text/plain"},"key":"everyone","value":"1"}],"variable":[]}},"response":[{"id":"b365fcfe-da69-4e7a-b336-ea1313371b51","name":"Delete","originalRequest":{"method":"DELETE","header":[],"url":{"raw":"http://127.0.0.1:8000/api/messages/{{message_id}}?everyone=1","host":["http://127.0.0.1:8000/api"],"path":["messages","{{message_id}}"],"query":[{"key":"everyone","value":"1"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Host","value":"127.0.0.1:8000"},{"key":"Date","value":"Thu, 07 Jan 2021 11:39:24 GMT"},{"key":"Date","value":"Thu, 07 Jan 2021 11:39:24 GMT"},{"key":"Connection","value":"close"},{"key":"X-Powered-By","value":"PHP/8.0.0"},{"key":"Cache-Control","value":"no-cache, private"},{"key":"Content-Type","value":"application/json"},{"key":"X-RateLimit-Limit","value":"60"},{"key":"X-RateLimit-Remaining","value":"54"},{"key":"Access-Control-Allow-Origin","value":"*"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": {\n        \"made_id\": 225280,\n        \"made_type\": \"App\\\\Models\\\\Message\",\n        \"type\": \"delete\",\n        \"all\": true,\n        \"maker_id\": 3163,\n        \"maker_type\": \"App\\\\User\",\n        \"updated_at\": \"2021-01-07T11:39:24.000000Z\",\n        \"created_at\": \"2021-01-07T11:39:24.000000Z\",\n        \"id\": 337780\n    }\n}"}],"_postman_id":"cd870547-b083-494b-b8ae-7a2df69c906f"},{"name":"Delete Multi","event":[{"listen":"test","script":{"id":"ebeb9d30-b69e-472c-a036-26812895a2df","exec":["pm.test(\"Status code is 200\", function () {","    pm.expect(pm.response.code).to.be.oneOf([200, 404]);","});"],"type":"text/javascript"}}],"id":"c57b373b-37a8-4983-9d60-31c768241a1c","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[],"url":"http://127.0.0.1:8000/api/messages?everyone=1&messages[]={{message_id}}&messages[]=225282&messages[]=225283","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{token}}"}]},"isInherited":true,"source":{"_postman_id":"50192f04-2565-4e9c-bc3c-e8932cad98d8","id":"50192f04-2565-4e9c-bc3c-e8932cad98d8","name":"ChatSystem","type":"collection"}},"urlObject":{"path":["messages"],"host":["http://127.0.0.1:8000/api"],"query":[{"description":{"content":"<p>bool\ndelete for everyone</p>\n","type":"text/plain"},"key":"everyone","value":"1"},{"description":{"content":"<p>required|arrayOf(int)</p>\n","type":"text/plain"},"key":"messages[]","value":"{{message_id}}"},{"key":"messages[]","value":"225282"},{"key":"messages[]","value":"225283"}],"variable":[]}},"response":[{"id":"ca74a25b-85bc-4ada-b315-10fddfb12082","name":"Delete Multi","originalRequest":{"method":"DELETE","header":[],"url":{"raw":"http://127.0.0.1:8000/api/messages?everyone=1&messages[]={{message_id}}&messages[]=225282&messages[]=225283","host":["http://127.0.0.1:8000/api"],"path":["messages"],"query":[{"key":"everyone","value":"1","description":"bool\ndelete for everyone"},{"key":"messages[]","value":"{{message_id}}","description":"required|arrayOf(int)"},{"key":"messages[]","value":"225282"},{"key":"messages[]","value":"225283"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Host","value":"127.0.0.1:8000"},{"key":"Date","value":"Thu, 07 Jan 2021 14:07:11 GMT"},{"key":"Date","value":"Thu, 07 Jan 2021 14:07:11 GMT"},{"key":"Connection","value":"close"},{"key":"X-Powered-By","value":"PHP/8.0.0"},{"key":"Cache-Control","value":"no-cache, private"},{"key":"Content-Type","value":"application/json"},{"key":"X-RateLimit-Limit","value":"60"},{"key":"X-RateLimit-Remaining","value":"59"},{"key":"Access-Control-Allow-Origin","value":"*"}],"cookie":[],"responseTime":null,"body":"[\n    {\n        \"made_id\": 225283,\n        \"made_type\": \"App\\\\Models\\\\Message\",\n        \"type\": \"delete\",\n        \"all\": true,\n        \"maker_id\": 3163,\n        \"maker_type\": \"App\\\\User\",\n        \"updated_at\": \"2021-01-07T14:07:11.000000Z\",\n        \"created_at\": \"2021-01-07T14:07:11.000000Z\",\n        \"id\": 337786\n    },\n    {\n        \"made_id\": 225282,\n        \"made_type\": \"App\\\\Models\\\\Message\",\n        \"type\": \"delete\",\n        \"all\": true,\n        \"maker_id\": 3163,\n        \"maker_type\": \"App\\\\User\",\n        \"updated_at\": \"2021-01-07T14:07:11.000000Z\",\n        \"created_at\": \"2021-01-07T14:07:11.000000Z\",\n        \"id\": 337787\n    }\n]"}],"_postman_id":"c57b373b-37a8-4983-9d60-31c768241a1c"}],"id":"353352f3-06a7-4c39-908e-16fbf44314fc","description":"<p>Message Endpoints</p>\n","event":[{"listen":"prerequest","script":{"id":"c2bcb56f-5894-4ab5-b9c0-b5c4d75079ae","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"7efb6539-21b1-4599-a078-4e022688c12d","type":"text/javascript","exec":[""]}}],"_postman_id":"353352f3-06a7-4c39-908e-16fbf44314fc","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{token}}"}]},"isInherited":true,"source":{"_postman_id":"50192f04-2565-4e9c-bc3c-e8932cad98d8","id":"50192f04-2565-4e9c-bc3c-e8932cad98d8","name":"ChatSystem","type":"collection"}}},{"name":"Chat Event","item":[{"name":"Add","event":[{"listen":"test","script":{"id":"6305f7c8-dba7-4884-b8ab-b730deb5425b","exec":["pm.test(\"Status code is 201\", function () {","    pm.expect(pm.response.code).to.be.oneOf([201]);","});","","const res = JSON.parse(responseBody);","res.maker_id && postman.setEnvironmentVariable(\"maker_id\", res.maker_id);","res.made_id && postman.setEnvironmentVariable(\"made_id\", res.made_id);","res.made_type && postman.setEnvironmentVariable(\"made_type\", res.made_type);","res.id && postman.setEnvironmentVariable(\"chat_event_id\", res.id);","res.type && postman.setEnvironmentVariable(\"chat_event_type\", res.type);"],"type":"text/javascript"}},{"listen":"prerequest","script":{"id":"e9cebff8-f7ef-4e00-b70a-68636d5c2273","exec":["postman.setEnvironmentVariable(\"maker_type\", randomElement(['read', 'deliver', 'delete']));","// res.made_id && postman.setEnvironmentVariable(\"made_id\", res.made_id);","// res.made_type && postman.setEnvironmentVariable(\"made_type\", res.made_type);","// res.id && postman.setEnvironmentVariable(\"chat_event_id\", res.id);","// res.type && postman.setEnvironmentVariable(\"chat_event_type\", res.type);"],"type":"text/javascript"}}],"id":"af831164-201c-4746-a568-bd0145ad2253","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"formdata","formdata":[{"key":"image","value":"{{base64_image}}","type":"text","disabled":true},{"key":"videos[]","type":"file","src":"/Users/martinsosodi/Downloads/40 sec.mp4","disabled":true},{"key":"videos[]","type":"file","src":"/Users/martinsosodi/Downloads/10 sec.mp4","disabled":true}]},"url":"http://127.0.0.1:8000/api/chat_events?type={{maker_type}}&made_id={{made_id}}&made_type={{made_type}}","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{token}}"}]},"isInherited":true,"source":{"_postman_id":"50192f04-2565-4e9c-bc3c-e8932cad98d8","id":"50192f04-2565-4e9c-bc3c-e8932cad98d8","name":"ChatSystem","type":"collection"}},"urlObject":{"path":["chat_events"],"host":["http://127.0.0.1:8000/api"],"query":[{"description":{"content":"<p>required|in:read,delete,deliver</p>\n","type":"text/plain"},"key":"type","value":"{{maker_type}}"},{"description":{"content":"<p>required|int</p>\n","type":"text/plain"},"key":"made_id","value":"{{made_id}}"},{"description":{"content":"<p>required|string</p>\n","type":"text/plain"},"key":"made_type","value":"{{made_type}}"}],"variable":[]}},"response":[{"id":"16cbdbc0-7d58-4890-bf55-64269156281e","name":"Add","originalRequest":{"method":"POST","header":[],"body":{"mode":"formdata","formdata":[{"key":"image","value":"{{base64_image}}","type":"text","disabled":true},{"key":"videos[]","type":"file","src":["/Users/martinsosodi/Downloads/40 sec.mp4"],"disabled":true},{"key":"videos[]","type":"file","src":["/Users/martinsosodi/Downloads/10 sec.mp4"],"disabled":true}]},"url":{"raw":"http://127.0.0.1:8000/api/chat_events?type={{maker_type}}&made_id={{made_id}}&made_type={{made_type}}","host":["http://127.0.0.1:8000/api"],"path":["chat_events"],"query":[{"key":"type","value":"{{maker_type}}","description":"required|in:read,delete,deliver"},{"key":"made_id","value":"{{made_id}}","description":"required|int"},{"key":"made_type","value":"{{made_type}}","description":"required|string"}]}},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"Host","value":"127.0.0.1:8000"},{"key":"Date","value":"Mon, 11 Jan 2021 10:10:21 GMT"},{"key":"Date","value":"Mon, 11 Jan 2021 10:10:21 GMT"},{"key":"Connection","value":"close"},{"key":"X-Powered-By","value":"PHP/8.0.0"},{"key":"Cache-Control","value":"no-cache, private"},{"key":"Content-Type","value":"application/json"},{"key":"X-RateLimit-Limit","value":"60"},{"key":"X-RateLimit-Remaining","value":"59"},{"key":"Access-Control-Allow-Origin","value":"*"}],"cookie":[],"responseTime":null,"body":"{\n    \"made_type\": \"App\\\\Models\\\\Message\",\n    \"made_id\": 225290,\n    \"type\": \"delete\",\n    \"maker_id\": 3163,\n    \"maker_type\": \"App\\\\User\",\n    \"updated_at\": \"2021-01-11T10:10:21.000000Z\",\n    \"created_at\": \"2021-01-11T10:10:21.000000Z\",\n    \"id\": 337855\n}"}],"_postman_id":"af831164-201c-4746-a568-bd0145ad2253"},{"name":"Get","event":[{"listen":"test","script":{"id":"36ae2529-e297-4971-b2be-2a6e6ea8da42","exec":["pm.test(\"Status code is 200\", function () {","    pm.response.to.have.status(200);","});"],"type":"text/javascript"}},{"listen":"prerequest","script":{"id":"194a9aa5-570f-450e-8706-12e79296426b","exec":["postman.setEnvironmentVariable(\"maker_type\", randomElement(['read', 'deliver', 'delete']));"],"type":"text/javascript"}}],"id":"f0c0a866-eeee-415b-ac11-d546b9f61ce2","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://127.0.0.1:8000/api/chat_events?type={{maker_type}}&made_type={{made_type}}&made_id={{made_id}}","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{token}}"}]},"isInherited":true,"source":{"_postman_id":"50192f04-2565-4e9c-bc3c-e8932cad98d8","id":"50192f04-2565-4e9c-bc3c-e8932cad98d8","name":"ChatSystem","type":"collection"}},"urlObject":{"path":["chat_events"],"host":["http://127.0.0.1:8000/api"],"query":[{"description":{"content":"<p>in:read,delete,deliver</p>\n","type":"text/plain"},"key":"type","value":"{{maker_type}}"},{"description":{"content":"<p>in:App\\Models\\Message,App\\Models\\Conversation</p>\n","type":"text/plain"},"key":"made_type","value":"{{made_type}}"},{"description":{"content":"<p>int</p>\n","type":"text/plain"},"key":"made_id","value":"{{made_id}}"}],"variable":[]}},"response":[{"id":"ae80f64b-a051-4f7d-8ac3-c451953287a8","name":"Get","originalRequest":{"method":"GET","header":[],"url":{"raw":"http://127.0.0.1:8000/api/chat_events?type=read&made_type=App\\Models\\Message&made_id=18","host":["http://127.0.0.1:8000/api"],"path":["chat_events"],"query":[{"key":"type","value":"read","description":"in:read,delete,deliver"},{"key":"made_type","value":"App\\Models\\Message","description":"App\\Models\\Message"},{"key":"made_id","value":"18","description":"int"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Host","value":"127.0.0.1:8000"},{"key":"Date","value":"Thu, 10 Dec 2020 12:47:47 GMT"},{"key":"Date","value":"Thu, 10 Dec 2020 12:47:47 GMT"},{"key":"Connection","value":"close"},{"key":"X-Powered-By","value":"PHP/8.0.0"},{"key":"Cache-Control","value":"no-cache, private"},{"key":"Content-Type","value":"application/json"},{"key":"X-RateLimit-Limit","value":"60"},{"key":"X-RateLimit-Remaining","value":"59"},{"key":"Access-Control-Allow-Origin","value":"*"}],"cookie":[],"responseTime":null,"body":"{\n    \"current_page\": 1,\n    \"data\": [\n        {\n            \"id\": 1,\n            \"maker_id\": 220,\n            \"maker_type\": \"App\\\\User\",\n            \"made_id\": 1,\n            \"made_type\": \"App\\\\Models\\\\Message\",\n            \"type\": \"deliver\",\n            \"created_at\": \"2020-12-08T16:48:30.000000Z\",\n            \"updated_at\": \"2020-12-08T16:48:30.000000Z\"\n        },\n        {\n            \"id\": 2,\n            \"maker_id\": 220,\n            \"maker_type\": \"App\\\\User\",\n            \"made_id\": 1,\n            \"made_type\": \"App\\\\Models\\\\Message\",\n            \"type\": \"deliver\",\n            \"created_at\": \"2020-12-08T16:48:30.000000Z\",\n            \"updated_at\": \"2020-12-08T16:48:30.000000Z\"\n        },\n        {\n            \"id\": 3,\n            \"maker_id\": 220,\n            \"maker_type\": \"App\\\\User\",\n            \"made_id\": 2,\n            \"made_type\": \"App\\\\Models\\\\Message\",\n            \"type\": \"read\",\n            \"created_at\": \"2020-12-08T16:48:31.000000Z\",\n            \"updated_at\": \"2020-12-08T16:48:31.000000Z\"\n        },\n        {\n            \"id\": 4,\n            \"maker_id\": 220,\n            \"maker_type\": \"App\\\\User\",\n            \"made_id\": 2,\n            \"made_type\": \"App\\\\Models\\\\Message\",\n            \"type\": \"read\",\n            \"created_at\": \"2020-12-08T16:48:31.000000Z\",\n            \"updated_at\": \"2020-12-08T16:48:31.000000Z\"\n        },\n        {\n            \"id\": 5,\n            \"maker_id\": 220,\n            \"maker_type\": \"App\\\\User\",\n            \"made_id\": 2,\n            \"made_type\": \"App\\\\Models\\\\Message\",\n            \"type\": \"read\",\n            \"created_at\": \"2020-12-08T16:48:32.000000Z\",\n            \"updated_at\": \"2020-12-08T16:48:32.000000Z\"\n        },\n        {\n            \"id\": 6,\n            \"maker_id\": 220,\n            \"maker_type\": \"App\\\\User\",\n            \"made_id\": 5,\n            \"made_type\": \"App\\\\Models\\\\Message\",\n            \"type\": \"delete\",\n            \"created_at\": \"2020-12-08T16:48:33.000000Z\",\n            \"updated_at\": \"2020-12-08T16:48:33.000000Z\"\n        },\n        {\n            \"id\": 7,\n            \"maker_id\": 220,\n            \"maker_type\": \"App\\\\User\",\n            \"made_id\": 5,\n            \"made_type\": \"App\\\\Models\\\\Message\",\n            \"type\": \"delete\",\n            \"created_at\": \"2020-12-08T16:48:33.000000Z\",\n            \"updated_at\": \"2020-12-08T16:48:33.000000Z\"\n        },\n        {\n            \"id\": 8,\n            \"maker_id\": 220,\n            \"maker_type\": \"App\\\\User\",\n            \"made_id\": 5,\n            \"made_type\": \"App\\\\Models\\\\Message\",\n            \"type\": \"delete\",\n            \"created_at\": \"2020-12-08T16:48:33.000000Z\",\n            \"updated_at\": \"2020-12-08T16:48:33.000000Z\"\n        },\n        {\n            \"id\": 9,\n            \"maker_id\": 220,\n            \"maker_type\": \"App\\\\User\",\n            \"made_id\": 6,\n            \"made_type\": \"App\\\\Models\\\\Message\",\n            \"type\": \"delete\",\n            \"created_at\": \"2020-12-08T16:48:33.000000Z\",\n            \"updated_at\": \"2020-12-08T16:48:33.000000Z\"\n        },\n        {\n            \"id\": 10,\n            \"maker_id\": 220,\n            \"maker_type\": \"App\\\\User\",\n            \"made_id\": 6,\n            \"made_type\": \"App\\\\Models\\\\Message\",\n            \"type\": \"delete\",\n            \"created_at\": \"2020-12-08T16:48:33.000000Z\",\n            \"updated_at\": \"2020-12-08T16:48:33.000000Z\"\n        },\n        {\n            \"id\": 11,\n            \"maker_id\": 220,\n            \"maker_type\": \"App\\\\User\",\n            \"made_id\": 6,\n            \"made_type\": \"App\\\\Models\\\\Message\",\n            \"type\": \"read\",\n            \"created_at\": \"2020-12-08T16:48:33.000000Z\",\n            \"updated_at\": \"2020-12-08T16:48:33.000000Z\"\n        },\n        {\n            \"id\": 12,\n            \"maker_id\": 220,\n            \"maker_type\": \"App\\\\User\",\n            \"made_id\": 7,\n            \"made_type\": \"App\\\\Models\\\\Message\",\n            \"type\": \"deliver\",\n            \"created_at\": \"2020-12-08T16:48:33.000000Z\",\n            \"updated_at\": \"2020-12-08T16:48:33.000000Z\"\n        },\n        {\n            \"id\": 13,\n            \"maker_id\": 220,\n            \"maker_type\": \"App\\\\User\",\n            \"made_id\": 7,\n            \"made_type\": \"App\\\\Models\\\\Message\",\n            \"type\": \"deliver\",\n            \"created_at\": \"2020-12-08T16:48:33.000000Z\",\n            \"updated_at\": \"2020-12-08T16:48:33.000000Z\"\n        },\n        {\n            \"id\": 14,\n            \"maker_id\": 220,\n            \"maker_type\": \"App\\\\User\",\n            \"made_id\": 7,\n            \"made_type\": \"App\\\\Models\\\\Message\",\n            \"type\": \"read\",\n            \"created_at\": \"2020-12-08T16:48:33.000000Z\",\n            \"updated_at\": \"2020-12-08T16:48:33.000000Z\"\n        },\n        {\n            \"id\": 15,\n            \"maker_id\": 220,\n            \"maker_type\": \"App\\\\User\",\n            \"made_id\": 9,\n            \"made_type\": \"App\\\\Models\\\\Message\",\n            \"type\": \"read\",\n            \"created_at\": \"2020-12-08T16:48:33.000000Z\",\n            \"updated_at\": \"2020-12-08T16:48:33.000000Z\"\n        }\n    ],\n    \"first_page_url\": \"http://127.0.0.1:8000/api/chat_events?page=1\",\n    \"from\": 1,\n    \"last_page\": 1682,\n    \"last_page_url\": \"http://127.0.0.1:8000/api/chat_events?page=1682\",\n    \"links\": [\n        {\n            \"url\": null,\n            \"label\": \"&laquo; Previous\",\n            \"active\": false\n        },\n        {\n            \"url\": \"http://127.0.0.1:8000/api/chat_events?page=1\",\n            \"label\": 1,\n            \"active\": true\n        },\n        {\n            \"url\": \"http://127.0.0.1:8000/api/chat_events?page=2\",\n            \"label\": 2,\n            \"active\": false\n        },\n        {\n            \"url\": \"http://127.0.0.1:8000/api/chat_events?page=3\",\n            \"label\": 3,\n            \"active\": false\n        },\n        {\n            \"url\": \"http://127.0.0.1:8000/api/chat_events?page=4\",\n            \"label\": 4,\n            \"active\": false\n        },\n        {\n            \"url\": \"http://127.0.0.1:8000/api/chat_events?page=5\",\n            \"label\": 5,\n            \"active\": false\n        },\n        {\n            \"url\": \"http://127.0.0.1:8000/api/chat_events?page=6\",\n            \"label\": 6,\n            \"active\": false\n        },\n        {\n            \"url\": \"http://127.0.0.1:8000/api/chat_events?page=7\",\n            \"label\": 7,\n            \"active\": false\n        },\n        {\n            \"url\": \"http://127.0.0.1:8000/api/chat_events?page=8\",\n            \"label\": 8,\n            \"active\": false\n        },\n        {\n            \"url\": \"http://127.0.0.1:8000/api/chat_events?page=9\",\n            \"label\": 9,\n            \"active\": false\n        },\n        {\n            \"url\": \"http://127.0.0.1:8000/api/chat_events?page=10\",\n            \"label\": 10,\n            \"active\": false\n        },\n        {\n            \"url\": null,\n            \"label\": \"...\",\n            \"active\": false\n        },\n        {\n            \"url\": \"http://127.0.0.1:8000/api/chat_events?page=1681\",\n            \"label\": 1681,\n            \"active\": false\n        },\n        {\n            \"url\": \"http://127.0.0.1:8000/api/chat_events?page=1682\",\n            \"label\": 1682,\n            \"active\": false\n        },\n        {\n            \"url\": \"http://127.0.0.1:8000/api/chat_events?page=2\",\n            \"label\": \"Next &raquo;\",\n            \"active\": false\n        }\n    ],\n    \"next_page_url\": \"http://127.0.0.1:8000/api/chat_events?page=2\",\n    \"path\": \"http://127.0.0.1:8000/api/chat_events\",\n    \"per_page\": 15,\n    \"prev_page_url\": null,\n    \"to\": 15,\n    \"total\": 25230\n}"}],"_postman_id":"f0c0a866-eeee-415b-ac11-d546b9f61ce2"},{"name":"Delete","event":[{"listen":"test","script":{"id":"d7195613-8e35-42af-bd15-e13c38f752ef","exec":["pm.test(\"Status code is 200\", function () {","    pm.expect(pm.response.code).to.be.oneOf([200, 404]);","});"],"type":"text/javascript"}}],"id":"baf23cad-2531-4ae2-ba21-3dba59167641","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[],"url":"http://127.0.0.1:8000/api/chat_events/{{chat_event_id}}","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{token}}"}]},"isInherited":true,"source":{"_postman_id":"50192f04-2565-4e9c-bc3c-e8932cad98d8","id":"50192f04-2565-4e9c-bc3c-e8932cad98d8","name":"ChatSystem","type":"collection"}},"urlObject":{"path":["chat_events","{{chat_event_id}}"],"host":["http://127.0.0.1:8000/api"],"query":[],"variable":[]}},"response":[{"id":"7467fe99-f7b2-448b-b853-fafc75ce5055","name":"Delete","originalRequest":{"method":"DELETE","header":[],"url":"http://127.0.0.1:8000/api/chat_events/{{chat_event_id}}"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Host","value":"127.0.0.1:8000"},{"key":"Date","value":"Thu, 10 Dec 2020 13:19:08 GMT"},{"key":"Date","value":"Thu, 10 Dec 2020 13:19:08 GMT"},{"key":"Connection","value":"close"},{"key":"X-Powered-By","value":"PHP/8.0.0"},{"key":"Cache-Control","value":"no-cache, private"},{"key":"Content-Type","value":"application/json"},{"key":"X-RateLimit-Limit","value":"60"},{"key":"X-RateLimit-Remaining","value":"59"},{"key":"Access-Control-Allow-Origin","value":"*"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": true\n}"}],"_postman_id":"baf23cad-2531-4ae2-ba21-3dba59167641"},{"name":"View","event":[{"listen":"test","script":{"id":"fec79a67-886a-4227-9682-674109672ad4","exec":["pm.test(\"Status code is 200\", function () {","    pm.expect(pm.response.code).to.be.oneOf([200, 404]);","});"],"type":"text/javascript"}}],"id":"c92009c4-b8c5-4ba4-9319-484bd5efee64","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://127.0.0.1:8000/api/chat_events/{{chat_event_id}}","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{token}}"}]},"isInherited":true,"source":{"_postman_id":"50192f04-2565-4e9c-bc3c-e8932cad98d8","id":"50192f04-2565-4e9c-bc3c-e8932cad98d8","name":"ChatSystem","type":"collection"}},"urlObject":{"path":["chat_events","{{chat_event_id}}"],"host":["http://127.0.0.1:8000/api"],"query":[],"variable":[]}},"response":[{"id":"b9d93be2-6673-4873-b08d-8d868c6413ea","name":"View","originalRequest":{"method":"GET","header":[],"url":"http://127.0.0.1:8000/api/chat_events/{{chat_event_id}}"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Host","value":"127.0.0.1:8000"},{"key":"Date","value":"Fri, 16 Apr 2021 21:23:44 GMT"},{"key":"Date","value":"Fri, 16 Apr 2021 21:23:44 GMT"},{"key":"Connection","value":"close"},{"key":"X-Powered-By","value":"PHP/8.0.0"},{"key":"Cache-Control","value":"no-cache, private"},{"key":"Content-Type","value":"application/json"},{"key":"X-RateLimit-Limit","value":"60"},{"key":"X-RateLimit-Remaining","value":"59"},{"key":"Access-Control-Allow-Origin","value":"*"}],"cookie":[],"responseTime":null,"body":"{\n    \"id\": 50,\n    \"maker_type\": \"App\\\\Models\\\\User\",\n    \"maker_id\": 20,\n    \"made_type\": \"App\\\\Models\\\\Conversation\",\n    \"made_id\": 51,\n    \"type\": \"deliver\",\n    \"all\": false,\n    \"created_at\": \"2021-04-16T21:00:58.000000Z\",\n    \"updated_at\": \"2021-04-16T21:00:58.000000Z\"\n}"}],"_postman_id":"c92009c4-b8c5-4ba4-9319-484bd5efee64"}],"id":"3e89aae6-f38e-435d-9cb2-043c76505f92","description":"<p>Chat Event Endpoints</p>\n","event":[{"listen":"prerequest","script":{"id":"6d6e2530-6459-42e3-935c-95d2ed7aa718","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"51198400-4e3f-45ca-89b6-fa6af6d5a9a1","type":"text/javascript","exec":[""]}}],"_postman_id":"3e89aae6-f38e-435d-9cb2-043c76505f92","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{token}}"}]},"isInherited":true,"source":{"_postman_id":"50192f04-2565-4e9c-bc3c-e8932cad98d8","id":"50192f04-2565-4e9c-bc3c-e8932cad98d8","name":"ChatSystem","type":"collection"}}}],"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{token}}"}]}},"event":[{"listen":"prerequest","script":{"id":"c56e5c03-bb5b-4f7b-b70f-9ffc86e2ea42","type":"text/javascript","exec":["const token = pm.globals.get('token');","","pm.request.headers.add({key: 'Content-Type', value: 'application/json' })","","pm.request.headers.add({key: 'Accept', value: 'application/json' })","","pm.request.headers.add({key: 'X-Requested-With', value: 'XMLHttpRequest' })","pm.request.headers.add({key: 'X-localization', value: 'en' })","","randomElement = (items) => {","    return items[Math.floor(Math.random() * items.length)]","}",""]}},{"listen":"test","script":{"id":"cf4124c4-e849-4051-88af-95c969010eec","type":"text/javascript","exec":["get = (object, path, index = 0) => {","  // if path is not array then split path with .","  const paths = path.map ? path : path.split('.')","  // if at the object's property","  if (index + 1 >= paths.length) {","    return object[paths[index]]","  }","  // try to set propery from the next index","  return get(object[paths[index]], paths, ++index)","}","","getProp = (path) => {","    return get(JSON.parse(responseBody), path)","}","","setProp = (path, variable, postmanD = postman) => {","    const prop = getProp(path)","    prop && postmanD.setEnvironmentVariable(variable, prop)","}"]}}],"variable":[{"key":"url","value":"http://127.0.0.1:8000/api"}]}