{"info":{"_postman_id":"c78207ec-da4a-4827-b856-e473d653002b","name":"TrackMyFix","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"description":"<html><head></head><body></body></html>","owner":"27409208","collectionId":"c78207ec-da4a-4827-b856-e473d653002b","publishedId":"2sAYX2LiFz","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"publishDate":"2025-01-29T22:24:07.000Z"},"item":[{"name":"Order","item":[{"name":"get work order","event":[{"listen":"test","script":{"id":"ad3fd1d3-70d0-4666-ac88-983c39157ea2","exec":["pm.test(\"Status code is 200\", function () {\r","    pm.response.to.have.status(200);\r","});"],"type":"text/javascript","packages":{}}}],"id":"9119ee9d-1657-439c-83d8-bb78f5966c25","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":false},"method":"GET","header":[],"url":"http://localhost:9091/work-order","urlObject":{"protocol":"http","port":"9091","path":["work-order"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"9119ee9d-1657-439c-83d8-bb78f5966c25"},{"name":"get work order  by number","id":"fe98f47f-4758-413d-82f4-235363488c04","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":false},"method":"GET","header":[],"url":"http://localhost:9091/work-order/number/ORD-00004","urlObject":{"protocol":"http","port":"9091","path":["work-order","number","ORD-00004"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"fe98f47f-4758-413d-82f4-235363488c04"},{"name":"get work order  by id","id":"1b16a2c0-472b-47de-9c81-7bc1b7cdd5d3","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":false},"method":"GET","header":[],"url":"http://localhost:9091/work-order/8","urlObject":{"protocol":"http","port":"9091","path":["work-order","8"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"1b16a2c0-472b-47de-9c81-7bc1b7cdd5d3"},{"name":"delete work order  by id","id":"9d8efc91-f90c-4603-bd30-17093e91a79a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":false},"method":"PATCH","header":[],"body":{"mode":"raw","raw":"{\r\n  \"active\": false\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:9091/work-order/5/set-active","urlObject":{"protocol":"http","port":"9091","path":["work-order","5","set-active"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"9d8efc91-f90c-4603-bd30-17093e91a79a"},{"name":"update work order by id","id":"9e50c577-5071-487c-8887-016a094cf6da","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":false},"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\r\n  \"observations\": \"Observation56\",\r\n  \"devices\": [\r\n    {\r\n      \"model\": \"Samsung Galaxy S21\",\r\n      \"serialNumber\": \"SN1246777\",\r\n      \"accessories\": \"Cargador, Auriculares\",\r\n      \"initialPrice\": 1500.00,\r\n      \"finalPrice\": 30000.00,\r\n      \"clientDescription\": \"La pantalla no responde al tacto.\",\r\n      \"technicalReport\": \"Se requiere reemplazo del digitalizador.\",\r\n      \"type\": \"SMARTPHONE\",\r\n      \"state\": \"EN_REPARACION\"\r\n    }\r\n  ]\r\n}\r\n","options":{"raw":{"language":"json"}}},"url":"http://localhost:9091/work-order/8","urlObject":{"protocol":"http","port":"9091","path":["work-order","8"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"9e50c577-5071-487c-8887-016a094cf6da"},{"name":"create work order","id":"62b7fa9d-402a-4971-94d0-cc9c00081c1c","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n  \"dni\": \"94808008\",\r\n  \"observations\": \"This is an observation text with more than 10 characters.\",\r\n  \"devices\": [\r\n    {\r\n      \"model\": \"DeviceModel1\",\r\n      \"serialNumber\": \"SN123456776\",\r\n      \"accessories\": \"Accessory1, Accessory2\",\r\n      \"initialPrice\": 2000,\r\n      \"finalPrice\": 25000,\r\n      \"clientDescription\": \"This is a description from the client.\",\r\n      \"technicalReport\": \"Technical report description.\",\r\n      \"type\": \"SMARTPHONE\", \r\n      \"state\": \"RECIBIDO\"\r\n    }\r\n  ]\r\n}\r\n","options":{"raw":{"language":"json"}}},"url":"http://localhost:9091/work-order","urlObject":{"protocol":"http","port":"9091","path":["work-order"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"62b7fa9d-402a-4971-94d0-cc9c00081c1c"}],"id":"4c36771d-8b81-4166-9cfe-9689c793628f","_postman_id":"4c36771d-8b81-4166-9cfe-9689c793628f","description":""},{"name":"User","item":[{"name":"create user","event":[{"listen":"test","script":{"id":"63d76fe7-83f6-4acb-b3b3-d1e6bde5a665","exec":["pm.test(\"Successful POST request\", function () {","    pm.expect(pm.response.code).to.be.oneOf([200, 201]);","});",""],"type":"text/javascript","packages":{}}}],"id":"365f364a-1207-4dc9-bc4e-57505482586e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n\t\"name\": \"Ragnar\",\n    \"lastName\": \"Lothbrok\",\n    \"email\": \"ragnar@lothbrok.com\",\n    \"dni\": 44350651,\n    \"address\": \"cathegat 101\",\n    \"role\": \"ADMIN\",\n    \"phone\": \"+11385598738\",\n    \"password\": \"ragnarok9\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:9091/user/register","description":"<p>This is a POST request, submitting data to an API via the request body. This request submits JSON data, and the data is reflected in the response.</p>\n<p>A successful POST request typically returns a <code>200 OK</code> or <code>201 Created</code> response code.</p>\n","urlObject":{"protocol":"http","port":"9091","path":["user","register"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"365f364a-1207-4dc9-bc4e-57505482586e"},{"name":"get user by id","event":[{"listen":"test","script":{"id":"34323910-67b3-4ca4-b66d-10cb5aef2f5d","exec":["pm.test(\"Status code is 200\", function () {","    pm.response.to.have.status(200);","});"],"type":"text/javascript","packages":{}}}],"id":"5f82623e-29fb-4682-9863-b2e64923d8d1","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":false},"method":"GET","header":[],"url":"http://localhost:9091/user/1","description":"<p>This is a GET request and it is used to \"get\" data from an endpoint. There is no request body for a GET request, but you can use query parameters to help specify the resource you want data on (e.g., in this request, we have <code>id=1</code>).</p>\n<p>A successful GET response will have a <code>200 OK</code> status, and should include some kind of response body - for example, HTML web content or JSON data.</p>\n","urlObject":{"protocol":"http","port":"9091","path":["user","1"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"5f82623e-29fb-4682-9863-b2e64923d8d1"},{"name":"get user","event":[{"listen":"test","script":{"id":"34323910-67b3-4ca4-b66d-10cb5aef2f5d","exec":["pm.test(\"Status code is 200\", function () {","    pm.response.to.have.status(200);","});"],"type":"text/javascript","packages":{}}}],"id":"6b64945a-414e-4fca-ab05-d407ebd84b14","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":false},"method":"GET","header":[],"url":"http://localhost:9091/user/all","description":"<p>This is a GET request and it is used to \"get\" data from an endpoint. There is no request body for a GET request, but you can use query parameters to help specify the resource you want data on (e.g., in this request, we have <code>id=1</code>).</p>\n<p>A successful GET response will have a <code>200 OK</code> status, and should include some kind of response body - for example, HTML web content or JSON data.</p>\n","urlObject":{"protocol":"http","port":"9091","path":["user","all"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"6b64945a-414e-4fca-ab05-d407ebd84b14"},{"name":"get client","event":[{"listen":"test","script":{"id":"34323910-67b3-4ca4-b66d-10cb5aef2f5d","exec":["pm.test(\"Status code is 200\", function () {","    pm.response.to.have.status(200);","});"],"type":"text/javascript","packages":{}}}],"id":"0c78e41c-21d0-4df5-a1a4-841723fb457c","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":false},"method":"GET","header":[],"url":"http://localhost:9091/user/all?role=CLIENT","description":"<p>This is a GET request and it is used to \"get\" data from an endpoint. There is no request body for a GET request, but you can use query parameters to help specify the resource you want data on (e.g., in this request, we have <code>id=1</code>).</p>\n<p>A successful GET response will have a <code>200 OK</code> status, and should include some kind of response body - for example, HTML web content or JSON data.</p>\n","urlObject":{"protocol":"http","port":"9091","path":["user","all"],"host":["localhost"],"query":[{"key":"role","value":"CLIENT"}],"variable":[]}},"response":[],"_postman_id":"0c78e41c-21d0-4df5-a1a4-841723fb457c"},{"name":"get technician","event":[{"listen":"test","script":{"id":"34323910-67b3-4ca4-b66d-10cb5aef2f5d","exec":["pm.test(\"Status code is 200\", function () {","    pm.response.to.have.status(200);","});"],"type":"text/javascript","packages":{}}}],"id":"461564f7-5d7f-45c7-82e1-03612a8ac021","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":false},"method":"GET","header":[],"url":"http://localhost:9091/user/all?role=TECHNICIAN ","description":"<p>This is a GET request and it is used to \"get\" data from an endpoint. There is no request body for a GET request, but you can use query parameters to help specify the resource you want data on (e.g., in this request, we have <code>id=1</code>).</p>\n<p>A successful GET response will have a <code>200 OK</code> status, and should include some kind of response body - for example, HTML web content or JSON data.</p>\n","urlObject":{"protocol":"http","port":"9091","path":["user","all"],"host":["localhost"],"query":[{"key":"role","value":"TECHNICIAN "}],"variable":[]}},"response":[],"_postman_id":"461564f7-5d7f-45c7-82e1-03612a8ac021"},{"name":"get admin","event":[{"listen":"test","script":{"id":"34323910-67b3-4ca4-b66d-10cb5aef2f5d","exec":["pm.test(\"Status code is 200\", function () {","    pm.response.to.have.status(200);","});"],"type":"text/javascript","packages":{}}}],"id":"8fe8b7aa-40b0-42cb-9162-19f2f6fd9b31","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":false},"method":"GET","header":[],"url":"http://localhost:9091/user/all?role=ADMIN","description":"<p>This is a GET request and it is used to \"get\" data from an endpoint. There is no request body for a GET request, but you can use query parameters to help specify the resource you want data on (e.g., in this request, we have <code>id=1</code>).</p>\n<p>A successful GET response will have a <code>200 OK</code> status, and should include some kind of response body - for example, HTML web content or JSON data.</p>\n","urlObject":{"protocol":"http","port":"9091","path":["user","all"],"host":["localhost"],"query":[{"key":"role","value":"ADMIN"}],"variable":[]}},"response":[],"_postman_id":"8fe8b7aa-40b0-42cb-9162-19f2f6fd9b31"},{"name":"update user","event":[{"listen":"prerequest","script":{"id":"da135cbe-f232-489f-acf1-81392ea85099","exec":["let issued_at = pm.collectionVariables.get(\"issued_at\")?.replace(\"ART\",\"UTC-3\");\r","let expires_in = pm.collectionVariables.get(\"expires_in\");\r","let refresh_expires = pm.collectionVariables.get(\"refresh_expires\");\r","let now = new Date()\r","\r","issued_at = new Date(issued_at);\r","expires_in = new Date(Date.now()+ +expires_in);\r","refresh_expires = new Date(Date.now()+ +refresh_expires);\r","if (now > expires_in) {\r","    console.log('access token expirado')\r","}\r","if (now > refresh_expires){\r","    console.log('Refresh Token expirado\\n')\r","}"],"type":"text/javascript","packages":{}}},{"listen":"test","script":{"id":"b81c9e57-af06-45b2-a3f8-6cbafbf1e2e5","exec":["pm.test(\"Successful PUT request\", function () {","    pm.expect(pm.response.code).to.be.oneOf([200, 201, 204]);","});",""],"type":"text/javascript","packages":{}}}],"id":"a57421ed-5112-4332-bd2e-0ccbccf1faca","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":false},"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\n    \"id\": 13,\n    \"name\": \"jaime\",\n    \"lastName\": \"ClientLastName8\",\n    \"dni\": \"94808100\",\n    \"address\": \"calle client 8\",\n    \"phone\": \"1122540468\",\n    \"email\": \"client16@example.com\",\n    \"active\": true,\n    \"role\": \"CLIENT\",\n    \"password\": \"client\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:9091/user/update","description":"<p>This is a PUT request and it is used to overwrite an existing piece of data. For instance, after you create an entity with a POST request, you may want to modify that later. You can do that using a PUT request. You typically identify the entity being updated by including an identifier in the URL (eg. <code>id=1</code>).</p>\n<p>A successful PUT request typically returns a <code>200 OK</code>, <code>201 Created</code>, or <code>204 No Content</code> response code.</p>\n","urlObject":{"protocol":"http","port":"9091","path":["user","update"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"a57421ed-5112-4332-bd2e-0ccbccf1faca"},{"name":"delete user by id","event":[{"listen":"test","script":{"id":"cae794e7-80cd-421a-83b3-92ba9262a806","exec":["pm.test(\"Successful DELETE request\", function () {","    pm.expect(pm.response.code).to.be.oneOf([200, 202, 204]);","});",""],"type":"text/javascript","packages":{}}},{"listen":"prerequest","script":{"id":"485b89cc-1d3f-4493-b84d-852062faa76b","exec":["let issued_at = pm.collectionVariables.get(\"issued_at\")?.replace(\"ART\",\"UTC-3\");\r","let expires_in = pm.collectionVariables.get(\"expires_in\");\r","let refresh_expires = pm.collectionVariables.get(\"refresh_expires\");\r","let now = new Date()\r","\r","issued_at = new Date(issued_at);\r","expires_in = new Date(Date.now()+ +expires_in);\r","refresh_expires = new Date(Date.now()+ +refresh_expires);\r","if (now > expires_in) {\r","    console.log('access token expirado')\r","}\r","if (now > refresh_expires){\r","    console.log('Refresh Token expirado\\n')\r","}"],"type":"text/javascript","packages":{}}}],"id":"96225d14-256b-405d-a9a6-491f0c94cfe7","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":false},"method":"DELETE","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"http://localhost:9091/user/11","description":"<p>This is a DELETE request, and it is used to delete data that was previously created via a POST request. You typically identify the entity being updated by including an identifier in the URL (eg. <code>id=1</code>).</p>\n<p>A successful DELETE request typically returns a <code>200 OK</code>, <code>202 Accepted</code>, or <code>204 No Content</code> response code.</p>\n","urlObject":{"protocol":"http","port":"9091","path":["user","11"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"96225d14-256b-405d-a9a6-491f0c94cfe7"}],"id":"caa56229-694d-4af6-afc3-31d72598c1ca","_postman_id":"caa56229-694d-4af6-afc3-31d72598c1ca","description":""},{"name":"Device","item":[{"name":"get device","id":"51510f5d-2d37-4bc8-b68c-7f556fea4810","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":false},"method":"GET","header":[],"url":"http://localhost:9091/device","urlObject":{"protocol":"http","port":"9091","path":["device"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"51510f5d-2d37-4bc8-b68c-7f556fea4810"},{"name":"get enum  states","id":"af2acb42-62dc-4e18-966c-5c51a6f42942","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":false},"method":"GET","header":[],"url":"http://localhost:9091/device/states","urlObject":{"protocol":"http","port":"9091","path":["device","states"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"af2acb42-62dc-4e18-966c-5c51a6f42942"},{"name":"get enum types","id":"c1ab45a3-a5af-40d1-b24d-b6959e88007c","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":false},"method":"GET","header":[],"url":"http://localhost:9091/device/types","urlObject":{"protocol":"http","port":"9091","path":["device","types"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"c1ab45a3-a5af-40d1-b24d-b6959e88007c"},{"name":"get device by id","id":"2b956e8c-df4d-41a7-949d-74764cc20f0d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":false},"method":"GET","header":[],"url":"http://localhost:9091/device/1","urlObject":{"protocol":"http","port":"9091","path":["device","1"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"2b956e8c-df4d-41a7-949d-74764cc20f0d"},{"name":"get device by type","id":"7fcc3f49-430b-420d-970c-cf88586180a4","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":false},"method":"GET","header":[],"url":"http://localhost:9091/device/type/SMARTPHONE","urlObject":{"protocol":"http","port":"9091","path":["device","type","SMARTPHONE"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"7fcc3f49-430b-420d-970c-cf88586180a4"},{"name":"get device by state","id":"b9317df8-31e2-469f-a2d8-19a6c6381aef","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":false},"method":"GET","header":[],"url":"http://localhost:9091/device/state/RECIBIDO","urlObject":{"protocol":"http","port":"9091","path":["device","state","RECIBIDO"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"b9317df8-31e2-469f-a2d8-19a6c6381aef"}],"id":"079a6039-5dfe-4e3c-8bb6-67adb6265866","_postman_id":"079a6039-5dfe-4e3c-8bb6-67adb6265866","description":""},{"name":"Movement","item":[{"name":"get movement","id":"b5c51978-2903-44f9-a4be-6c32d504ea8c","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":false},"method":"GET","header":[],"url":"http://localhost:9091/movement","urlObject":{"protocol":"http","port":"9091","path":["movement"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"b5c51978-2903-44f9-a4be-6c32d504ea8c"},{"name":"get movement by id","id":"fb7fd5fa-c4e9-49d0-bf72-07c21f24352c","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":false},"method":"GET","header":[],"url":"http://localhost:9091/movement/2","urlObject":{"protocol":"http","port":"9091","path":["movement","2"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"fb7fd5fa-c4e9-49d0-bf72-07c21f24352c"},{"name":"get movement by action","id":"3f18d1ad-f677-4831-81d6-4ec76d51c715","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":false},"method":"GET","header":[],"url":"http://localhost:9091/movement/action/AGREGO_DISPOSITIVO","urlObject":{"protocol":"http","port":"9091","path":["movement","action","AGREGO_DISPOSITIVO"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"3f18d1ad-f677-4831-81d6-4ec76d51c715"},{"name":"get enum actions","id":"bea1b92f-c8ef-4134-a8c8-6522335eb6d1","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":false},"method":"GET","header":[],"url":"http://localhost:9091/movement/actions","urlObject":{"protocol":"http","port":"9091","path":["movement","actions"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"bea1b92f-c8ef-4134-a8c8-6522335eb6d1"}],"id":"7a82d5c9-da04-454a-97b1-00f6e8e3cac9","_postman_id":"7a82d5c9-da04-454a-97b1-00f6e8e3cac9","description":""},{"name":"User Change","item":[{"name":"get user change","event":[{"listen":"test","script":{"exec":["let issued_at = pm.collectionVariables.get(\"issued_at\")?.replace(\"ART\",\"UTC-3\");","let expires_in = pm.collectionVariables.get(\"expires_in\");","let refresh_expires = pm.collectionVariables.get(\"refresh_expires\");","let now = new Date()","","issued_at = new Date(issued_at);","expires_in = new Date(Date.now()+ +expires_in);","refresh_expires = new Date(Date.now()+ +refresh_expires);","if (now > expires_in) {","    console.log('access token expirado')","}","if (now > refresh_expires){","    console.log('Refresh Token expirado\\n')","}"],"type":"text/javascript","packages":{},"id":"379fc1b6-4937-40d8-bda0-755cb02cba9a"}}],"id":"a9a944d7-6278-4d5c-ab1f-eb46d84bdeb1","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":""}]},"isInherited":false},"method":"GET","header":[],"url":"{{base_url}}/logs/userchanges","description":"<p>This is a GET request and it is used to \"get\" data from an endpoint. There is no request body for a GET request, but you can use query parameters to help specify the resource you want data on (e.g., in this request, we have <code>id=1</code>).</p>\n<p>A successful GET response will have a <code>200 OK</code> status, and should include some kind of response body - for example, HTML web content or JSON data.</p>\n","urlObject":{"path":["logs","userchanges"],"host":["{{base_url}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"a9a944d7-6278-4d5c-ab1f-eb46d84bdeb1"}],"id":"e98c0b62-d0b8-4652-8807-c9fba633851b","_postman_id":"e98c0b62-d0b8-4652-8807-c9fba633851b","description":""},{"name":"login technician","event":[{"listen":"test","script":{"id":"b30ad4fb-59b5-4c17-b490-98217775fd82","exec":["var response = JSON.parse(responseBody);","pm.collectionVariables.set(\"beare_token\", response.access_token);","console.log(pm.collectionVariables.get(\"beare_token\"));",""],"type":"text/javascript","packages":{}}}],"id":"54e76c1c-2701-4b11-8f43-b7a0cc4268cd","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"urlencoded","urlencoded":[{"key":"username","value":"tech1@example.com","type":"text","uuid":"4c5dcb51-7207-47d8-b23d-57d42918ff26"},{"key":"password","value":"techpassword1","type":"text","uuid":"f755951e-cfb8-4bd2-a484-acebc1f39d74"},{"key":"refresh_token","value":"","type":"text","uuid":"14dfa47b-0101-4605-aea1-9ef2a375b82e","disabled":true}]},"url":"http://localhost:9091/user/login","description":"<p>This is a POST request, submitting data to an API via the request body. This request submits JSON data, and the data is reflected in the response.</p>\n<p>A successful POST request typically returns a <code>200 OK</code> or <code>201 Created</code> response code.</p>\n","urlObject":{"protocol":"http","port":"9091","path":["user","login"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"54e76c1c-2701-4b11-8f43-b7a0cc4268cd"},{"name":"login admin","event":[{"listen":"test","script":{"id":"b30ad4fb-59b5-4c17-b490-98217775fd82","exec":["var response = JSON.parse(responseBody);","pm.collectionVariables.set(\"beare_token\", response.access_token);","console.log(pm.collectionVariables.get(\"beare_token\"));",""],"type":"text/javascript","packages":{}}}],"id":"8c5718a1-7cd7-414a-a035-18c3b199abb7","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"urlencoded","urlencoded":[{"key":"username","value":"jindrg@gmail.com","type":"text","uuid":"2dd12268-f85b-46d7-836f-affa598ca918"},{"key":"password","value":"adminpassword1","type":"text","uuid":"d14076cf-3b69-43b7-98a1-e5be407d2497"},{"key":"refresh_token","value":"","type":"text","uuid":"7b4d6923-5265-4c39-8968-bce649a196b7","disabled":true}]},"url":"http://localhost:9091/user/login","description":"<p>This is a POST request, submitting data to an API via the request body. This request submits JSON data, and the data is reflected in the response.</p>\n<p>A successful POST request typically returns a <code>200 OK</code> or <code>201 Created</code> response code.</p>\n","urlObject":{"protocol":"http","port":"9091","path":["user","login"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"8c5718a1-7cd7-414a-a035-18c3b199abb7"},{"name":"refresh token request","event":[{"listen":"test","script":{"exec":["if (pm.response.code == 200) {","    var response = JSON.parse(pm.response.text());","    pm.collectionVariables.set(\"beare_token\", response.access_token);","    pm.collectionVariables.set(\"refresh_token\", response.refresh_token);","    pm.collectionVariables.set(\"issued_at\", response.issued_at);","    pm.collectionVariables.set(\"expires_in\", response.expires_in);","    pm.collectionVariables.set(\"refresh_expires\", response.refresh_expires);","}",""],"type":"text/javascript","packages":{},"id":"e0564fff-361a-4320-bc55-cf717b939a94"}},{"listen":"prerequest","script":{"exec":[""],"type":"text/javascript","packages":{},"id":"4f167f0c-9d8c-4b46-8ce9-aaad2c1d1ea5"}}],"id":"62d2a6dc-7117-40d2-a3e5-7ea9e6ee390e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"urlencoded","urlencoded":[{"key":"refresh_token","value":"{{refresh_token}}","type":"text"}]},"url":"{{base_url}}/user/token","description":"<p>This is a POST request, submitting data to an API via the request body. This request submits JSON data, and the data is reflected in the response.</p>\n<p>A successful POST request typically returns a <code>200 OK</code> or <code>201 Created</code> response code.</p>\n","urlObject":{"path":["user","token"],"host":["{{base_url}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"62d2a6dc-7117-40d2-a3e5-7ea9e6ee390e"}],"variable":[{"key":"beare_token","value":""}]}