diff --git a/api.json b/api.json index 5e29f00..1b67484 100644 --- a/api.json +++ b/api.json @@ -1 +1 @@ -{"_type":"export","__export_format":4,"__export_date":"2021-07-12T23:14:40.507Z","__export_source":"insomnia.desktop.app:v2021.3.0","resources":[{"_id":"req_aa4f04af413e42e98b6c7ff8f15b2d9f","parentId":"fld_4b16c803edfb47008a4c88981b5088c0","modified":1626101183538,"created":1623864931076,"url":"{{ _.base_url }}/restaurantes/136be61f-201b-4dac-a9b1-72a57c5093b6/canales-venta","name":"All Canales de Venta","description":"","method":"GET","body":{},"parameters":[{"name":"page","value":"1","description":"","id":"pair_7c7c1cb4df8741e2b3af58c7928cd1d3","disabled":true},{"name":"per_page","value":"1","description":"","id":"pair_3a162ce44cc94062a9d1afbcab2cfc7c","disabled":true}],"headers":[],"authentication":{"type":"oauth2","grantType":"authorization_code","authorizationUrl":"{{ _.auth0.auth_url }}","accessTokenUrl":"{{ _.auth0.token_url }}","clientId":"{{ _.auth0.client_id }}","clientSecret":"{{ _.auth0.client_secret }}","usePkce":true,"redirectUrl":"{{ _.auth0.redirect_uri }}","audience":"{{ _.auth0.audience }}"},"metaSortKey":-1619205371046.375,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"fld_4b16c803edfb47008a4c88981b5088c0","parentId":"wrk_07f30ee2dcc148b1a0d91f1c2f4debec","modified":1626100854066,"created":1623864914848,"name":"Canales de Venta","description":"","environment":{},"environmentPropertyOrder":null,"metaSortKey":-1623864914848,"_type":"request_group"},{"_id":"wrk_07f30ee2dcc148b1a0d91f1c2f4debec","parentId":null,"modified":1625804982911,"created":1618956632139,"name":"Unified Restaurant","description":"","scope":"collection","_type":"workspace"},{"_id":"req_00bc36f0bb6a48dabae37a2eb59d45ef","parentId":"fld_4b16c803edfb47008a4c88981b5088c0","modified":1626124239633,"created":1623870507092,"url":"{{ _.base_url }}/restaurantes/136be61f-201b-4dac-a9b1-72a57c5093b6/canales-venta","name":"Create Canal de Venta","description":"","method":"POST","body":{"mimeType":"application/json","text":"{\n\t\"nombre\": \"1\",\n\t\"sector_id\": \"82f8d4f4-c026-40b0-ad3b-bdcc8ad68211\",\n\t\"tipo_canal_id\": \"be7b4092-3688-4e4a-99b9-eca48704dc1e\"\n}"},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json","id":"pair_1e159f6fa1694f28a7f42dfc8343e73b"}],"authentication":{"type":"oauth2","grantType":"authorization_code","authorizationUrl":"{{ _.auth0.auth_url }}","accessTokenUrl":"{{ _.auth0.token_url }}","clientId":"{{ _.auth0.client_id }}","clientSecret":"{{ _.auth0.client_secret }}","usePkce":true,"redirectUrl":"{{ _.auth0.redirect_uri }}","audience":"{{ _.auth0.audience }}"},"metaSortKey":-1619205371033.875,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_c1f8f261c0df45d682ff619cc335fb79","parentId":"fld_4b16c803edfb47008a4c88981b5088c0","modified":1626101185841,"created":1623870410352,"url":"{{ _.base_url }}/restaurantes/136be61f-201b-4dac-a9b1-72a57c5093b6/canales-venta/4abd36ee-5a26-4b38-8cc7-767ef6a820b2","name":"Get Canal de Venta","description":"","method":"GET","body":{},"parameters":[],"headers":[],"authentication":{"type":"oauth2","grantType":"authorization_code","authorizationUrl":"{{ _.auth0.auth_url }}","accessTokenUrl":"{{ _.auth0.token_url }}","clientId":"{{ _.auth0.client_id }}","clientSecret":"{{ _.auth0.client_secret }}","usePkce":true,"redirectUrl":"{{ _.auth0.redirect_uri }}","audience":"{{ _.auth0.audience }}"},"metaSortKey":-1619205371021.375,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_bfb9991817234e69ba16207138ee708b","parentId":"fld_4b16c803edfb47008a4c88981b5088c0","modified":1626101189573,"created":1626099439207,"url":"{{ _.base_url }}/restaurantes/136be61f-201b-4dac-a9b1-72a57c5093b6/canales-venta/4abd36ee-5a26-4b38-8cc7-767ef6a820b2","name":"Update Canal de Venta","description":"","method":"PUT","body":{"mimeType":"application/json","text":"{\n\t\"nombre\": \"2\",\n\t\"sector_id\": \"82f8d4f4-c026-40b0-ad3b-bdcc8ad68211\",\n\t\"tipo_canal_id\": \"be7b4092-3688-4e4a-99b9-eca48704dc1e\"\n}"},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json","id":"pair_1e159f6fa1694f28a7f42dfc8343e73b"}],"authentication":{"type":"oauth2","grantType":"authorization_code","authorizationUrl":"{{ _.auth0.auth_url }}","accessTokenUrl":"{{ _.auth0.token_url }}","clientId":"{{ _.auth0.client_id }}","clientSecret":"{{ _.auth0.client_secret }}","usePkce":true,"redirectUrl":"{{ _.auth0.redirect_uri }}","audience":"{{ _.auth0.audience }}"},"metaSortKey":-1619205370905.3438,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_7aa0252f5ca44043b4e44af1a52036fc","parentId":"fld_4b16c803edfb47008a4c88981b5088c0","modified":1626101191313,"created":1626099739694,"url":"{{ _.base_url }}/restaurantes/136be61f-201b-4dac-a9b1-72a57c5093b6/canales-venta/4abd36ee-5a26-4b38-8cc7-767ef6a820b2","name":"Delete Canal de Venta","description":"","method":"DELETE","body":{"mimeType":"application/json","text":""},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json","id":"pair_1e159f6fa1694f28a7f42dfc8343e73b"}],"authentication":{"type":"oauth2","grantType":"authorization_code","authorizationUrl":"{{ _.auth0.auth_url }}","accessTokenUrl":"{{ _.auth0.token_url }}","clientId":"{{ _.auth0.client_id }}","clientSecret":"{{ _.auth0.client_secret }}","usePkce":true,"redirectUrl":"{{ _.auth0.redirect_uri }}","audience":"{{ _.auth0.audience }}"},"metaSortKey":-1619205370859.8281,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_85af88553451468684d58d89a10f6d95","parentId":"fld_556c8426ee994ece88ae322735381e6f","modified":1626096910172,"created":1626096879877,"url":"{{ _.base_url }}/restaurantes/136be61f-201b-4dac-a9b1-72a57c5093b6/sectores","name":"All Sectores","description":"","method":"GET","body":{},"parameters":[{"name":"page","value":"1","description":"","id":"pair_7c7c1cb4df8741e2b3af58c7928cd1d3","disabled":true},{"name":"per_page","value":"1","description":"","id":"pair_3a162ce44cc94062a9d1afbcab2cfc7c","disabled":true}],"headers":[],"authentication":{"type":"oauth2","grantType":"authorization_code","authorizationUrl":"{{ _.auth0.auth_url }}","accessTokenUrl":"{{ _.auth0.token_url }}","clientId":"{{ _.auth0.client_id }}","clientSecret":"{{ _.auth0.client_secret }}","usePkce":true,"redirectUrl":"{{ _.auth0.redirect_uri }}","audience":"{{ _.auth0.audience }}"},"metaSortKey":-1619205371046.375,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"fld_556c8426ee994ece88ae322735381e6f","parentId":"wrk_07f30ee2dcc148b1a0d91f1c2f4debec","modified":1626096879869,"created":1626096879870,"name":"Sectores","description":"","environment":{},"environmentPropertyOrder":null,"metaSortKey":-1622142484730,"_type":"request_group"},{"_id":"req_925f7fa50106493d85c80b7e4468c33a","parentId":"fld_556c8426ee994ece88ae322735381e6f","modified":1626124237844,"created":1626096879886,"url":"{{ _.base_url }}/restaurantes/136be61f-201b-4dac-a9b1-72a57c5093b6/sectores","name":"Create Sector","description":"","method":"POST","body":{"mimeType":"application/json","text":"{\n\t\"nombre\": \"Terraza\"\n}"},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json","id":"pair_f2e71cc25e3441ad8263f4aa19210d49"}],"authentication":{"type":"oauth2","grantType":"authorization_code","authorizationUrl":"{{ _.auth0.auth_url }}","accessTokenUrl":"{{ _.auth0.token_url }}","clientId":"{{ _.auth0.client_id }}","clientSecret":"{{ _.auth0.client_secret }}","usePkce":true,"redirectUrl":"{{ _.auth0.redirect_uri }}","audience":"{{ _.auth0.audience }}"},"metaSortKey":-1619205371033.875,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_ba8bd99d73d24d5fa13bfebe3173a716","parentId":"fld_556c8426ee994ece88ae322735381e6f","modified":1626097798491,"created":1626096879884,"url":"{{ _.base_url }}/restaurantes/136be61f-201b-4dac-a9b1-72a57c5093b6/sectores/aa162454-d507-4cdb-b727-57e01b71e7ad","name":"Get Sectores","description":"","method":"GET","body":{},"parameters":[],"headers":[],"authentication":{"type":"oauth2","grantType":"authorization_code","authorizationUrl":"{{ _.auth0.auth_url }}","accessTokenUrl":"{{ _.auth0.token_url }}","clientId":"{{ _.auth0.client_id }}","clientSecret":"{{ _.auth0.client_secret }}","usePkce":true,"redirectUrl":"{{ _.auth0.redirect_uri }}","audience":"{{ _.auth0.audience }}"},"metaSortKey":-1619205371021.375,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_e0e0e15fcc004a5292c2d21117d07cf8","parentId":"fld_556c8426ee994ece88ae322735381e6f","modified":1626101251139,"created":1626097865184,"url":"{{ _.base_url }}/restaurantes/136be61f-201b-4dac-a9b1-72a57c5093b6/sectores/82f8d4f4-c026-40b0-ad3b-bdcc8ad68211","name":"Update Sector","description":"","method":"PUT","body":{"mimeType":"application/json","text":"{\n\t\"nombre\": \"Salon Principal\"\n}"},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json","id":"pair_f2e71cc25e3441ad8263f4aa19210d49"}],"authentication":{"type":"oauth2","grantType":"authorization_code","authorizationUrl":"{{ _.auth0.auth_url }}","accessTokenUrl":"{{ _.auth0.token_url }}","clientId":"{{ _.auth0.client_id }}","clientSecret":"{{ _.auth0.client_secret }}","usePkce":true,"redirectUrl":"{{ _.auth0.redirect_uri }}","audience":"{{ _.auth0.audience }}"},"metaSortKey":-1619205370814.3125,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_05616d77833d4213a5313c65dea28190","parentId":"fld_556c8426ee994ece88ae322735381e6f","modified":1626101560124,"created":1626097988054,"url":"{{ _.base_url }}/restaurantes/136be61f-201b-4dac-a9b1-72a57c5093b6/sectores/82f8d4f4-c026-40b0-ad3b-bdcc8ad68211","name":"Delete Sector","description":"","method":"DELETE","body":{"mimeType":"application/json","text":""},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json","id":"pair_f2e71cc25e3441ad8263f4aa19210d49"}],"authentication":{"type":"oauth2","grantType":"authorization_code","authorizationUrl":"{{ _.auth0.auth_url }}","accessTokenUrl":"{{ _.auth0.token_url }}","clientId":"{{ _.auth0.client_id }}","clientSecret":"{{ _.auth0.client_secret }}","usePkce":true,"redirectUrl":"{{ _.auth0.redirect_uri }}","audience":"{{ _.auth0.audience }}"},"metaSortKey":-1619205370723.2812,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_4a944a11bb1f4f62a51d26f6ffcf4c5f","parentId":"fld_6f35aaa389a249e8a827f20b263ba299","modified":1626101152636,"created":1626100849209,"url":"{{ _.base_url }}/restaurantes/136be61f-201b-4dac-a9b1-72a57c5093b6/zonas-produccion","name":"All Zonas de Produccion","description":"","method":"GET","body":{},"parameters":[{"name":"page","value":"1","description":"","id":"pair_7c7c1cb4df8741e2b3af58c7928cd1d3","disabled":true},{"name":"per_page","value":"1","description":"","id":"pair_3a162ce44cc94062a9d1afbcab2cfc7c","disabled":true}],"headers":[],"authentication":{"type":"oauth2","grantType":"authorization_code","authorizationUrl":"{{ _.auth0.auth_url }}","accessTokenUrl":"{{ _.auth0.token_url }}","clientId":"{{ _.auth0.client_id }}","clientSecret":"{{ _.auth0.client_secret }}","usePkce":true,"redirectUrl":"{{ _.auth0.redirect_uri }}","audience":"{{ _.auth0.audience }}"},"metaSortKey":-1619205371046.375,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"fld_6f35aaa389a249e8a827f20b263ba299","parentId":"wrk_07f30ee2dcc148b1a0d91f1c2f4debec","modified":1626100849202,"created":1626100849202,"name":"Zonas de Produccion","description":"","environment":{},"environmentPropertyOrder":null,"metaSortKey":-1621281269671,"_type":"request_group"},{"_id":"req_c39597eb8f4144eea0ca0df155f23003","parentId":"fld_6f35aaa389a249e8a827f20b263ba299","modified":1626124236170,"created":1626100849219,"url":"{{ _.base_url }}/restaurantes/136be61f-201b-4dac-a9b1-72a57c5093b6/zonas-produccion","name":"Create Zona de Produccion","description":"","method":"POST","body":{"mimeType":"application/json","text":"{\n\t\"nombre\": \"Barra\"\n}"},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json","id":"pair_f2e71cc25e3441ad8263f4aa19210d49"}],"authentication":{"type":"oauth2","grantType":"authorization_code","authorizationUrl":"{{ _.auth0.auth_url }}","accessTokenUrl":"{{ _.auth0.token_url }}","clientId":"{{ _.auth0.client_id }}","clientSecret":"{{ _.auth0.client_secret }}","usePkce":true,"redirectUrl":"{{ _.auth0.redirect_uri }}","audience":"{{ _.auth0.audience }}"},"metaSortKey":-1619205371033.875,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_2fe5879904004485bf1db2f313e122a8","parentId":"fld_6f35aaa389a249e8a827f20b263ba299","modified":1626101155690,"created":1626100849217,"url":"{{ _.base_url }}/restaurantes/136be61f-201b-4dac-a9b1-72a57c5093b6/zonas-produccion/8ca27646-7b15-44d4-acd8-c417b5f2b7fb","name":"Get Zona de Produccion","description":"","method":"GET","body":{},"parameters":[],"headers":[],"authentication":{"type":"oauth2","grantType":"authorization_code","authorizationUrl":"{{ _.auth0.auth_url }}","accessTokenUrl":"{{ _.auth0.token_url }}","clientId":"{{ _.auth0.client_id }}","clientSecret":"{{ _.auth0.client_secret }}","usePkce":true,"redirectUrl":"{{ _.auth0.redirect_uri }}","audience":"{{ _.auth0.audience }}"},"metaSortKey":-1619205371021.375,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_03c92b4d20824466a8e4eb2c702b060b","parentId":"fld_6f35aaa389a249e8a827f20b263ba299","modified":1626101171582,"created":1626100849221,"url":"{{ _.base_url }}/restaurantes/136be61f-201b-4dac-a9b1-72a57c5093b6/zonas-produccion/8ca27646-7b15-44d4-acd8-c417b5f2b7fb","name":"Update Zona de Produccion","description":"","method":"PUT","body":{"mimeType":"application/json","text":"{\n\t\"nombre\": \"Barra\"\n}"},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json","id":"pair_f2e71cc25e3441ad8263f4aa19210d49"}],"authentication":{"type":"oauth2","grantType":"authorization_code","authorizationUrl":"{{ _.auth0.auth_url }}","accessTokenUrl":"{{ _.auth0.token_url }}","clientId":"{{ _.auth0.client_id }}","clientSecret":"{{ _.auth0.client_secret }}","usePkce":true,"redirectUrl":"{{ _.auth0.redirect_uri }}","audience":"{{ _.auth0.audience }}"},"metaSortKey":-1619205370814.3125,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_fa4861c748814c7d8f5e35dcbc396f84","parentId":"fld_6f35aaa389a249e8a827f20b263ba299","modified":1626101178643,"created":1626100849222,"url":"{{ _.base_url }}/restaurantes/136be61f-201b-4dac-a9b1-72a57c5093b6/zonas-produccion/8ca27646-7b15-44d4-acd8-c417b5f2b7fb","name":"Delete Zona de Produccion","description":"","method":"DELETE","body":{"mimeType":"application/json","text":""},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json","id":"pair_f2e71cc25e3441ad8263f4aa19210d49"}],"authentication":{"type":"oauth2","grantType":"authorization_code","authorizationUrl":"{{ _.auth0.auth_url }}","accessTokenUrl":"{{ _.auth0.token_url }}","clientId":"{{ _.auth0.client_id }}","clientSecret":"{{ _.auth0.client_secret }}","usePkce":true,"redirectUrl":"{{ _.auth0.redirect_uri }}","audience":"{{ _.auth0.audience }}"},"metaSortKey":-1619205370723.2812,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_1080aebb5a5a45f6bd0a0f442fa5edf7","parentId":"fld_cf7c19d3f8964fcdaee98b38ed3157d9","modified":1626122886546,"created":1626122837213,"url":"{{ _.base_url }}/restaurantes/136be61f-201b-4dac-a9b1-72a57c5093b6/categorias","name":"All Categorias","description":"","method":"GET","body":{},"parameters":[{"name":"page","value":"1","description":"","id":"pair_7c7c1cb4df8741e2b3af58c7928cd1d3","disabled":true},{"name":"per_page","value":"1","description":"","id":"pair_3a162ce44cc94062a9d1afbcab2cfc7c","disabled":true}],"headers":[],"authentication":{"type":"oauth2","grantType":"authorization_code","authorizationUrl":"{{ _.auth0.auth_url }}","accessTokenUrl":"{{ _.auth0.token_url }}","clientId":"{{ _.auth0.client_id }}","clientSecret":"{{ _.auth0.client_secret }}","usePkce":true,"redirectUrl":"{{ _.auth0.redirect_uri }}","audience":"{{ _.auth0.audience }}"},"metaSortKey":-1619205371046.375,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"fld_cf7c19d3f8964fcdaee98b38ed3157d9","parentId":"wrk_07f30ee2dcc148b1a0d91f1c2f4debec","modified":1626122837204,"created":1626122837204,"name":"Categorias","description":"","environment":{},"environmentPropertyOrder":null,"metaSortKey":-1620850662141.5,"_type":"request_group"},{"_id":"req_4a4ee41a7b96480b9cbe8d2a56745b4c","parentId":"fld_cf7c19d3f8964fcdaee98b38ed3157d9","modified":1626126605739,"created":1626122837220,"url":"{{ _.base_url }}/restaurantes/136be61f-201b-4dac-a9b1-72a57c5093b6/categorias","name":"Create Categoria","description":"","method":"POST","body":{"mimeType":"application/json","text":"{\n\t\"nombre\": \"Para Picar\"\n}"},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json","id":"pair_f2e71cc25e3441ad8263f4aa19210d49"}],"authentication":{"type":"oauth2","grantType":"authorization_code","authorizationUrl":"{{ _.auth0.auth_url }}","accessTokenUrl":"{{ _.auth0.token_url }}","clientId":"{{ _.auth0.client_id }}","clientSecret":"{{ _.auth0.client_secret }}","usePkce":true,"redirectUrl":"{{ _.auth0.redirect_uri }}","audience":"{{ _.auth0.audience }}"},"metaSortKey":-1619205371033.875,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_b1593f5c02264f1fbe298f7215e480a3","parentId":"fld_cf7c19d3f8964fcdaee98b38ed3157d9","modified":1626123102194,"created":1626122837218,"url":"{{ _.base_url }}/restaurantes/136be61f-201b-4dac-a9b1-72a57c5093b6/categorias/1320c4a5-674e-4cdb-95f3-59c68b3e67ef","name":"Get Categorias","description":"","method":"GET","body":{},"parameters":[],"headers":[],"authentication":{"type":"oauth2","grantType":"authorization_code","authorizationUrl":"{{ _.auth0.auth_url }}","accessTokenUrl":"{{ _.auth0.token_url }}","clientId":"{{ _.auth0.client_id }}","clientSecret":"{{ _.auth0.client_secret }}","usePkce":true,"redirectUrl":"{{ _.auth0.redirect_uri }}","audience":"{{ _.auth0.audience }}"},"metaSortKey":-1619205371021.375,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_d4b5649429044883a82360768a5e502d","parentId":"fld_cf7c19d3f8964fcdaee98b38ed3157d9","modified":1626123119284,"created":1626122837221,"url":"{{ _.base_url }}/restaurantes/136be61f-201b-4dac-a9b1-72a57c5093b6/categorias/1320c4a5-674e-4cdb-95f3-59c68b3e67ef","name":"Update Categoria","description":"","method":"PUT","body":{"mimeType":"application/json","text":"{\n\t\"nombre\": \"Bebidas\"\n}"},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json","id":"pair_f2e71cc25e3441ad8263f4aa19210d49"}],"authentication":{"type":"oauth2","grantType":"authorization_code","authorizationUrl":"{{ _.auth0.auth_url }}","accessTokenUrl":"{{ _.auth0.token_url }}","clientId":"{{ _.auth0.client_id }}","clientSecret":"{{ _.auth0.client_secret }}","usePkce":true,"redirectUrl":"{{ _.auth0.redirect_uri }}","audience":"{{ _.auth0.audience }}"},"metaSortKey":-1619205370814.3125,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_d2acb3e2594145d6858644f2a0ef0eac","parentId":"fld_cf7c19d3f8964fcdaee98b38ed3157d9","modified":1626123161491,"created":1626122837223,"url":"{{ _.base_url }}/restaurantes/136be61f-201b-4dac-a9b1-72a57c5093b6/categorias/1320c4a5-674e-4cdb-95f3-59c68b3e67ef","name":"Delete Categoria","description":"","method":"DELETE","body":{"mimeType":"application/json","text":""},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json","id":"pair_f2e71cc25e3441ad8263f4aa19210d49"}],"authentication":{"type":"oauth2","grantType":"authorization_code","authorizationUrl":"{{ _.auth0.auth_url }}","accessTokenUrl":"{{ _.auth0.token_url }}","clientId":"{{ _.auth0.client_id }}","clientSecret":"{{ _.auth0.client_secret }}","usePkce":true,"redirectUrl":"{{ _.auth0.redirect_uri }}","audience":"{{ _.auth0.audience }}"},"metaSortKey":-1619205370723.2812,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_e9e72d4685e84cc7997f55a70f2f74c9","parentId":"fld_7e4bd916a6d14dfbaa9ae0fd92ac5e7e","modified":1626123780265,"created":1626123770873,"url":"{{ _.base_url }}/restaurantes/136be61f-201b-4dac-a9b1-72a57c5093b6/proveedores","name":"All Proveedores","description":"","method":"GET","body":{},"parameters":[{"name":"page","value":"1","description":"","id":"pair_7c7c1cb4df8741e2b3af58c7928cd1d3","disabled":true},{"name":"per_page","value":"1","description":"","id":"pair_3a162ce44cc94062a9d1afbcab2cfc7c","disabled":true}],"headers":[],"authentication":{"type":"oauth2","grantType":"authorization_code","authorizationUrl":"{{ _.auth0.auth_url }}","accessTokenUrl":"{{ _.auth0.token_url }}","clientId":"{{ _.auth0.client_id }}","clientSecret":"{{ _.auth0.client_secret }}","usePkce":true,"redirectUrl":"{{ _.auth0.redirect_uri }}","audience":"{{ _.auth0.audience }}"},"metaSortKey":-1619205371046.375,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"fld_7e4bd916a6d14dfbaa9ae0fd92ac5e7e","parentId":"wrk_07f30ee2dcc148b1a0d91f1c2f4debec","modified":1626123770871,"created":1626123770871,"name":"Proveedores","description":"","environment":{},"environmentPropertyOrder":null,"metaSortKey":-1620635358376.75,"_type":"request_group"},{"_id":"req_a0a5fece03f944d9b026eab55d5c2b8b","parentId":"fld_7e4bd916a6d14dfbaa9ae0fd92ac5e7e","modified":1626124232590,"created":1626123770874,"url":"{{ _.base_url }}/restaurantes/136be61f-201b-4dac-a9b1-72a57c5093b6/proveedores","name":"Create Proveedor","description":"","method":"POST","body":{"mimeType":"application/json","text":"{\n\t\"rut\": \"19763899-0\",\n\t\"nombre\": \"Daniel Cortés\",\n\t\"descripcion\": \"No vende nada :c\",\n\t\"direccion\": \"Quitratue #635\",\n\t\"telefono\": \"+56986570622\"\n}"},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json","id":"pair_f2e71cc25e3441ad8263f4aa19210d49"}],"authentication":{"type":"oauth2","grantType":"authorization_code","authorizationUrl":"{{ _.auth0.auth_url }}","accessTokenUrl":"{{ _.auth0.token_url }}","clientId":"{{ _.auth0.client_id }}","clientSecret":"{{ _.auth0.client_secret }}","usePkce":true,"redirectUrl":"{{ _.auth0.redirect_uri }}","audience":"{{ _.auth0.audience }}"},"metaSortKey":-1619205371033.875,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_61f2e22c72ec46ad88f7a9ab97a93f48","parentId":"fld_7e4bd916a6d14dfbaa9ae0fd92ac5e7e","modified":1626123844100,"created":1626123770873,"url":"{{ _.base_url }}/restaurantes/136be61f-201b-4dac-a9b1-72a57c5093b6/proveedores/1320c4a5-674e-4cdb-95f3-59c68b3e67ef","name":"Get Proveedor","description":"","method":"GET","body":{},"parameters":[],"headers":[],"authentication":{"type":"oauth2","grantType":"authorization_code","authorizationUrl":"{{ _.auth0.auth_url }}","accessTokenUrl":"{{ _.auth0.token_url }}","clientId":"{{ _.auth0.client_id }}","clientSecret":"{{ _.auth0.client_secret }}","usePkce":true,"redirectUrl":"{{ _.auth0.redirect_uri }}","audience":"{{ _.auth0.audience }}"},"metaSortKey":-1619205371021.375,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_d2db9d9baae94dc0940dc3bd561c479c","parentId":"fld_7e4bd916a6d14dfbaa9ae0fd92ac5e7e","modified":1626124219092,"created":1626123770875,"url":"{{ _.base_url }}/restaurantes/136be61f-201b-4dac-a9b1-72a57c5093b6/proveedores/f3577a66-8258-4fa5-b85b-b6bcece4f471","name":"Update Proveedor","description":"","method":"PUT","body":{"mimeType":"application/json","text":"{\n\t\"rut\": \"19763899-0\",\n\t\"nombre\": \"Daniel Cortés\",\n\t\"descripcion\": \"No vende nada :c\",\n\t\"direccion\": \"Quitratue #635\",\n\t\"telefono\": \"+56986570622\"\n}"},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json","id":"pair_f2e71cc25e3441ad8263f4aa19210d49"}],"authentication":{"type":"oauth2","grantType":"authorization_code","authorizationUrl":"{{ _.auth0.auth_url }}","accessTokenUrl":"{{ _.auth0.token_url }}","clientId":"{{ _.auth0.client_id }}","clientSecret":"{{ _.auth0.client_secret }}","usePkce":true,"redirectUrl":"{{ _.auth0.redirect_uri }}","audience":"{{ _.auth0.audience }}"},"metaSortKey":-1619205370814.3125,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_afe6407e1f4c41c894f5a29d72b8325f","parentId":"fld_7e4bd916a6d14dfbaa9ae0fd92ac5e7e","modified":1626124196775,"created":1626123770876,"url":"{{ _.base_url }}/restaurantes/136be61f-201b-4dac-a9b1-72a57c5093b6/proveedores/e24c9472-51d7-42d4-a7f4-99484a444ca7","name":"Delete Proveedor","description":"","method":"DELETE","body":{"mimeType":"application/json","text":""},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json","id":"pair_f2e71cc25e3441ad8263f4aa19210d49"}],"authentication":{"type":"oauth2","grantType":"authorization_code","authorizationUrl":"{{ _.auth0.auth_url }}","accessTokenUrl":"{{ _.auth0.token_url }}","clientId":"{{ _.auth0.client_id }}","clientSecret":"{{ _.auth0.client_secret }}","usePkce":true,"redirectUrl":"{{ _.auth0.redirect_uri }}","audience":"{{ _.auth0.audience }}"},"metaSortKey":-1619205370723.2812,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_a8c7a0d43bb0446d87f9dc7dbe6d4efe","parentId":"fld_ad3bae5495484a6e8a6fca2ca5f44ae5","modified":1626124843232,"created":1626124814155,"url":"{{ _.base_url }}/restaurantes/136be61f-201b-4dac-a9b1-72a57c5093b6/ingredientes","name":"All Ingredientes","description":"","method":"GET","body":{},"parameters":[{"name":"page","value":"1","description":"","id":"pair_7c7c1cb4df8741e2b3af58c7928cd1d3","disabled":true},{"name":"per_page","value":"1","description":"","id":"pair_3a162ce44cc94062a9d1afbcab2cfc7c","disabled":true}],"headers":[],"authentication":{"type":"oauth2","grantType":"authorization_code","authorizationUrl":"{{ _.auth0.auth_url }}","accessTokenUrl":"{{ _.auth0.token_url }}","clientId":"{{ _.auth0.client_id }}","clientSecret":"{{ _.auth0.client_secret }}","usePkce":true,"redirectUrl":"{{ _.auth0.redirect_uri }}","audience":"{{ _.auth0.audience }}"},"metaSortKey":-1619205371046.375,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"fld_ad3bae5495484a6e8a6fca2ca5f44ae5","parentId":"wrk_07f30ee2dcc148b1a0d91f1c2f4debec","modified":1626124814142,"created":1626124814142,"name":"Ingredientes","description":"","environment":{},"environmentPropertyOrder":null,"metaSortKey":-1620527706494.375,"_type":"request_group"},{"_id":"req_7d96db0b5d7c493d92d288354e78e853","parentId":"fld_ad3bae5495484a6e8a6fca2ca5f44ae5","modified":1626124922426,"created":1626124814157,"url":"{{ _.base_url }}/restaurantes/136be61f-201b-4dac-a9b1-72a57c5093b6/ingredientes","name":"Create Ingrediente","description":"","method":"POST","body":{"mimeType":"application/json","text":"{\n\t\"nombre\": \"Papas\",\n\t\"medida\": \"KG\"\n}"},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json","id":"pair_f2e71cc25e3441ad8263f4aa19210d49"}],"authentication":{"type":"oauth2","grantType":"authorization_code","authorizationUrl":"{{ _.auth0.auth_url }}","accessTokenUrl":"{{ _.auth0.token_url }}","clientId":"{{ _.auth0.client_id }}","clientSecret":"{{ _.auth0.client_secret }}","usePkce":true,"redirectUrl":"{{ _.auth0.redirect_uri }}","audience":"{{ _.auth0.audience }}"},"metaSortKey":-1619205371033.875,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_edaa9062ac0d47c19b1a055919317013","parentId":"fld_ad3bae5495484a6e8a6fca2ca5f44ae5","modified":1626125057303,"created":1626124814150,"url":"{{ _.base_url }}/restaurantes/136be61f-201b-4dac-a9b1-72a57c5093b6/ingredientes/a0966248-c47b-4015-879a-d0f15a8469a8","name":"Get Ingrediente","description":"","method":"GET","body":{},"parameters":[],"headers":[],"authentication":{"type":"oauth2","grantType":"authorization_code","authorizationUrl":"{{ _.auth0.auth_url }}","accessTokenUrl":"{{ _.auth0.token_url }}","clientId":"{{ _.auth0.client_id }}","clientSecret":"{{ _.auth0.client_secret }}","usePkce":true,"redirectUrl":"{{ _.auth0.redirect_uri }}","audience":"{{ _.auth0.audience }}"},"metaSortKey":-1619205371021.375,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_64c4691a9f58457b813f9a47d7f008d1","parentId":"fld_ad3bae5495484a6e8a6fca2ca5f44ae5","modified":1626125063158,"created":1626124814158,"url":"{{ _.base_url }}/restaurantes/136be61f-201b-4dac-a9b1-72a57c5093b6/ingredientes/a0966248-c47b-4015-879a-d0f15a8469a8","name":"Update Ingrediente","description":"","method":"PUT","body":{"mimeType":"application/json","text":"{\n\t\"nombre\": \"Papas KG\",\n\t\"medida\": \"KG\"\n}"},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json","id":"pair_f2e71cc25e3441ad8263f4aa19210d49"}],"authentication":{"type":"oauth2","grantType":"authorization_code","authorizationUrl":"{{ _.auth0.auth_url }}","accessTokenUrl":"{{ _.auth0.token_url }}","clientId":"{{ _.auth0.client_id }}","clientSecret":"{{ _.auth0.client_secret }}","usePkce":true,"redirectUrl":"{{ _.auth0.redirect_uri }}","audience":"{{ _.auth0.audience }}"},"metaSortKey":-1619205370814.3125,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_ec6bcddd7d704662b9a2e78df8dfa947","parentId":"fld_ad3bae5495484a6e8a6fca2ca5f44ae5","modified":1626125069196,"created":1626124814159,"url":"{{ _.base_url }}/restaurantes/136be61f-201b-4dac-a9b1-72a57c5093b6/ingredientes/a0966248-c47b-4015-879a-d0f15a8469a8","name":"Delete Ingrediente","description":"","method":"DELETE","body":{"mimeType":"application/json","text":""},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json","id":"pair_f2e71cc25e3441ad8263f4aa19210d49"}],"authentication":{"type":"oauth2","grantType":"authorization_code","authorizationUrl":"{{ _.auth0.auth_url }}","accessTokenUrl":"{{ _.auth0.token_url }}","clientId":"{{ _.auth0.client_id }}","clientSecret":"{{ _.auth0.client_secret }}","usePkce":true,"redirectUrl":"{{ _.auth0.redirect_uri }}","audience":"{{ _.auth0.audience }}"},"metaSortKey":-1619205370723.2812,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_775da3ed6c3d47e095f52795258bc325","parentId":"fld_9c294c575c3a49c99209ed0e3a79f446","modified":1626126513401,"created":1626126501639,"url":"{{ _.base_url }}/restaurantes/136be61f-201b-4dac-a9b1-72a57c5093b6/productos","name":"All Productos","description":"","method":"GET","body":{},"parameters":[{"name":"page","value":"1","description":"","id":"pair_7c7c1cb4df8741e2b3af58c7928cd1d3","disabled":true},{"name":"per_page","value":"1","description":"","id":"pair_3a162ce44cc94062a9d1afbcab2cfc7c","disabled":true}],"headers":[],"authentication":{"type":"oauth2","grantType":"authorization_code","authorizationUrl":"{{ _.auth0.auth_url }}","accessTokenUrl":"{{ _.auth0.token_url }}","clientId":"{{ _.auth0.client_id }}","clientSecret":"{{ _.auth0.client_secret }}","usePkce":true,"redirectUrl":"{{ _.auth0.redirect_uri }}","audience":"{{ _.auth0.audience }}"},"metaSortKey":-1619205371046.375,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"fld_9c294c575c3a49c99209ed0e3a79f446","parentId":"wrk_07f30ee2dcc148b1a0d91f1c2f4debec","modified":1626126501614,"created":1626126501614,"name":"Productos","description":"","environment":{},"environmentPropertyOrder":null,"metaSortKey":-1620473880553.1875,"_type":"request_group"},{"_id":"req_54da0f449ab844a1b5edb36476caf0aa","parentId":"fld_9c294c575c3a49c99209ed0e3a79f446","modified":1626126625611,"created":1626126501641,"url":"{{ _.base_url }}/restaurantes/136be61f-201b-4dac-a9b1-72a57c5093b6/productos","name":"Create Producto","description":"","method":"POST","body":{"mimeType":"application/json","text":"{\n\t\"nombre\": \"Papas Fritas\",\n\t\"precio_venta\": 3000,\n\t\"categoria_id\": \"f6e300a1-484c-4878-b575-24d90997d1c6\",\n\t\"zona_produccion_id\": \"a72866a3-4bd6-44a3-a49d-7921ffe0dc67\"\n}"},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json","id":"pair_f2e71cc25e3441ad8263f4aa19210d49"}],"authentication":{"type":"oauth2","grantType":"authorization_code","authorizationUrl":"{{ _.auth0.auth_url }}","accessTokenUrl":"{{ _.auth0.token_url }}","clientId":"{{ _.auth0.client_id }}","clientSecret":"{{ _.auth0.client_secret }}","usePkce":true,"redirectUrl":"{{ _.auth0.redirect_uri }}","audience":"{{ _.auth0.audience }}"},"metaSortKey":-1619205371033.875,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_959e2a6bd01e4eb9b9a33d1b71cfddeb","parentId":"fld_9c294c575c3a49c99209ed0e3a79f446","modified":1626127020382,"created":1626126501629,"url":"{{ _.base_url }}/restaurantes/136be61f-201b-4dac-a9b1-72a57c5093b6/productos/88f4a4e5-fe06-4e50-89f7-9558699fef9f","name":"Get Producto","description":"","method":"GET","body":{},"parameters":[],"headers":[],"authentication":{"type":"oauth2","grantType":"authorization_code","authorizationUrl":"{{ _.auth0.auth_url }}","accessTokenUrl":"{{ _.auth0.token_url }}","clientId":"{{ _.auth0.client_id }}","clientSecret":"{{ _.auth0.client_secret }}","usePkce":true,"redirectUrl":"{{ _.auth0.redirect_uri }}","audience":"{{ _.auth0.audience }}"},"metaSortKey":-1619205371021.375,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_592c888b407645f88434f10dcbb3b216","parentId":"fld_9c294c575c3a49c99209ed0e3a79f446","modified":1626127072504,"created":1626126501643,"url":"{{ _.base_url }}/restaurantes/136be61f-201b-4dac-a9b1-72a57c5093b6/productos/88f4a4e5-fe06-4e50-89f7-9558699fef9f","name":"Update Producto","description":"","method":"PUT","body":{"mimeType":"application/json","text":"{\n\t\"nombre\": \"Papas Fritas\",\n\t\"precio_venta\": 5000,\n\t\"categoria_id\": \"f6e300a1-484c-4878-b575-24d90997d1c6\",\n\t\"zona_produccion_id\": \"a72866a3-4bd6-44a3-a49d-7921ffe0dc67\"\n}"},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json","id":"pair_f2e71cc25e3441ad8263f4aa19210d49"}],"authentication":{"type":"oauth2","grantType":"authorization_code","authorizationUrl":"{{ _.auth0.auth_url }}","accessTokenUrl":"{{ _.auth0.token_url }}","clientId":"{{ _.auth0.client_id }}","clientSecret":"{{ _.auth0.client_secret }}","usePkce":true,"redirectUrl":"{{ _.auth0.redirect_uri }}","audience":"{{ _.auth0.audience }}"},"metaSortKey":-1619205370814.3125,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_fe735132f5414c1798117bb3f70ee2ed","parentId":"fld_9c294c575c3a49c99209ed0e3a79f446","modified":1626127092082,"created":1626126501645,"url":"{{ _.base_url }}/restaurantes/136be61f-201b-4dac-a9b1-72a57c5093b6/productos/88f4a4e5-fe06-4e50-89f7-9558699fef9f","name":"Delete Producto","description":"","method":"DELETE","body":{"mimeType":"application/json","text":""},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json","id":"pair_f2e71cc25e3441ad8263f4aa19210d49"}],"authentication":{"type":"oauth2","grantType":"authorization_code","authorizationUrl":"{{ _.auth0.auth_url }}","accessTokenUrl":"{{ _.auth0.token_url }}","clientId":"{{ _.auth0.client_id }}","clientSecret":"{{ _.auth0.client_secret }}","usePkce":true,"redirectUrl":"{{ _.auth0.redirect_uri }}","audience":"{{ _.auth0.audience }}"},"metaSortKey":-1619205370723.2812,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_d845d0f1057a44ebbc5b0208a6f95821","parentId":"fld_18767c6268c04ea08f2602b34108061d","modified":1626130053216,"created":1626129963655,"url":"{{ _.base_url }}/restaurantes/136be61f-201b-4dac-a9b1-72a57c5093b6/productos/8de8e1b0-4300-4ad1-afcb-ed18c6e4a157/ingredientes","name":"Receta de un producto","description":"","method":"GET","body":{},"parameters":[{"name":"page","value":"1","description":"","id":"pair_7c7c1cb4df8741e2b3af58c7928cd1d3","disabled":true},{"name":"per_page","value":"1","description":"","id":"pair_3a162ce44cc94062a9d1afbcab2cfc7c","disabled":true}],"headers":[],"authentication":{"type":"oauth2","grantType":"authorization_code","authorizationUrl":"{{ _.auth0.auth_url }}","accessTokenUrl":"{{ _.auth0.token_url }}","clientId":"{{ _.auth0.client_id }}","clientSecret":"{{ _.auth0.client_secret }}","usePkce":true,"redirectUrl":"{{ _.auth0.redirect_uri }}","audience":"{{ _.auth0.audience }}"},"metaSortKey":-1619205371046.375,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"fld_18767c6268c04ea08f2602b34108061d","parentId":"wrk_07f30ee2dcc148b1a0d91f1c2f4debec","modified":1626129963625,"created":1626129963625,"name":"Recetas","description":"","environment":{},"environmentPropertyOrder":null,"metaSortKey":-1620446967582.5938,"_type":"request_group"},{"_id":"req_ee66cf0c37874b299aa3ffb2914512f4","parentId":"fld_18767c6268c04ea08f2602b34108061d","modified":1626130196614,"created":1626129963642,"url":"{{ _.base_url }}/restaurantes/136be61f-201b-4dac-a9b1-72a57c5093b6/productos/8de8e1b0-4300-4ad1-afcb-ed18c6e4a157/ingredientes/4aa5e656-4b4e-4770-94b6-cafdfb3ad279","name":"Detalle de un ingrediente de la receta de un producto","description":"","method":"GET","body":{},"parameters":[],"headers":[],"authentication":{"type":"oauth2","grantType":"authorization_code","authorizationUrl":"{{ _.auth0.auth_url }}","accessTokenUrl":"{{ _.auth0.token_url }}","clientId":"{{ _.auth0.client_id }}","clientSecret":"{{ _.auth0.client_secret }}","usePkce":true,"redirectUrl":"{{ _.auth0.redirect_uri }}","audience":"{{ _.auth0.audience }}"},"metaSortKey":-1619205371021.375,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_61c5fcb5950548efa25735a7a05f42d2","parentId":"fld_18767c6268c04ea08f2602b34108061d","modified":1626130734000,"created":1626129963658,"url":"{{ _.base_url }}/restaurantes/136be61f-201b-4dac-a9b1-72a57c5093b6/productos/8de8e1b0-4300-4ad1-afcb-ed18c6e4a157/ingredientes/4aa5e656-4b4e-4770-94b6-cafdfb3ad279","name":"Agregar ingrediente a la receta de un producto","description":"","method":"POST","body":{"mimeType":"application/json","text":"{\n\t\"unidades\": 0.25\n}"},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json","id":"pair_f2e71cc25e3441ad8263f4aa19210d49"}],"authentication":{"type":"oauth2","grantType":"authorization_code","authorizationUrl":"{{ _.auth0.auth_url }}","accessTokenUrl":"{{ _.auth0.token_url }}","clientId":"{{ _.auth0.client_id }}","clientSecret":"{{ _.auth0.client_secret }}","usePkce":true,"redirectUrl":"{{ _.auth0.redirect_uri }}","audience":"{{ _.auth0.audience }}"},"metaSortKey":-1619205370917.8438,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_680247f64a644c5193aa5b3c11828d26","parentId":"fld_18767c6268c04ea08f2602b34108061d","modified":1626130956531,"created":1626129963660,"url":"{{ _.base_url }}/restaurantes/136be61f-201b-4dac-a9b1-72a57c5093b6/productos/8de8e1b0-4300-4ad1-afcb-ed18c6e4a157/ingredientes/4aa5e656-4b4e-4770-94b6-cafdfb3ad279","name":"Modificar ingrediente de la receta de un producto","description":"","method":"PUT","body":{"mimeType":"application/json","text":"{\n\t\"unidades\": 0.2\n}"},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json","id":"pair_f2e71cc25e3441ad8263f4aa19210d49"}],"authentication":{"type":"oauth2","grantType":"authorization_code","authorizationUrl":"{{ _.auth0.auth_url }}","accessTokenUrl":"{{ _.auth0.token_url }}","clientId":"{{ _.auth0.client_id }}","clientSecret":"{{ _.auth0.client_secret }}","usePkce":true,"redirectUrl":"{{ _.auth0.redirect_uri }}","audience":"{{ _.auth0.audience }}"},"metaSortKey":-1619205370814.3125,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_e130807eb74849c09af4259fb4e37bc6","parentId":"fld_18767c6268c04ea08f2602b34108061d","modified":1626131314411,"created":1626129963663,"url":"{{ _.base_url }}/restaurantes/136be61f-201b-4dac-a9b1-72a57c5093b6/productos/8de8e1b0-4300-4ad1-afcb-ed18c6e4a157/ingredientes/4aa5e656-4b4e-4770-94b6-cafdfb3ad279","name":"Eliminar ingrediente de la receta de un producto","description":"","method":"DELETE","body":{"mimeType":"application/json","text":""},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json","id":"pair_f2e71cc25e3441ad8263f4aa19210d49"}],"authentication":{"type":"oauth2","grantType":"authorization_code","authorizationUrl":"{{ _.auth0.auth_url }}","accessTokenUrl":"{{ _.auth0.token_url }}","clientId":"{{ _.auth0.client_id }}","clientSecret":"{{ _.auth0.client_secret }}","usePkce":true,"redirectUrl":"{{ _.auth0.redirect_uri }}","audience":"{{ _.auth0.audience }}"},"metaSortKey":-1619205370723.2812,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_296d76bfd9a24a0dbf7055469538c756","parentId":"fld_bacd2b299b584c69b809f651b2cdbc01","modified":1625842101868,"created":1619205352864,"url":"{{ _.base_url }}/users","name":"All Users","description":"Help\n","method":"GET","body":{},"parameters":[{"name":"page","value":"1","description":"","id":"pair_7c7c1cb4df8741e2b3af58c7928cd1d3","disabled":true},{"name":"per_page","value":"1","description":"","id":"pair_3a162ce44cc94062a9d1afbcab2cfc7c","disabled":true}],"headers":[],"authentication":{"type":"oauth2","grantType":"authorization_code","authorizationUrl":"{{ _.auth0.auth_url }}","accessTokenUrl":"{{ _.auth0.token_url }}","clientId":"{{ _.auth0.client_id }}","clientSecret":"{{ _.auth0.client_secret }}","usePkce":true,"redirectUrl":"{{ _.auth0.redirect_uri }}","audience":"{{ _.auth0.audience }}"},"metaSortKey":-1619205371460.5,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"fld_bacd2b299b584c69b809f651b2cdbc01","parentId":"wrk_07f30ee2dcc148b1a0d91f1c2f4debec","modified":1620704135170,"created":1619205340049,"name":"Users","description":"","environment":{},"environmentPropertyOrder":null,"metaSortKey":-1619205340049,"_type":"request_group"},{"_id":"req_4bfe2481b06b4b3fbcfa14ca95d5c3e5","parentId":"fld_bacd2b299b584c69b809f651b2cdbc01","modified":1626124243993,"created":1619205365462,"url":"{{ _.base_url }}/users","name":"Create User","description":"","method":"POST","body":{"mimeType":"application/json","text":"{\n\t\"nombre\": \"John Doe\",\n\t\"email\": \"john.doe@gmail.com\",\n\t\"username\": \"johndoe\",\n\t\"password\": \"superPasswordWith123NumbersAnd----Symbols\",\n\t\"roles\": [\n\t\t\"admin\", \"recaudador\"\n\t],\n\t\"restaurant\": \"136be61f-201b-4dac-a9b1-72a57c5093b6\"\n}"},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json","id":"pair_8ea173f0c52d4742826111cb99fa8084"}],"authentication":{"type":"oauth2","grantType":"authorization_code","authorizationUrl":"{{ _.auth0.auth_url }}","accessTokenUrl":"{{ _.auth0.token_url }}","clientId":"{{ _.auth0.client_id }}","clientSecret":"{{ _.auth0.client_secret }}","usePkce":true,"redirectUrl":"{{ _.auth0.redirect_uri }}","audience":"{{ _.auth0.audience }}"},"metaSortKey":-1619205371046.375,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_14439e12fd6944fb923d7975f5dcae18","parentId":"fld_bacd2b299b584c69b809f651b2cdbc01","modified":1625841124601,"created":1619205346326,"url":"{{ _.base_url }}/users/0d383e70-0439-4fd6-b7f5-1ae4f8641675","name":"Get User with ID","description":"","method":"GET","body":{},"parameters":[{"name":"","value":"","description":"","id":"pair_a302e60ffd554de79a73d89d19d16901"}],"headers":[],"authentication":{"type":"oauth2","grantType":"authorization_code","authorizationUrl":"{{ _.auth0.auth_url }}","accessTokenUrl":"{{ _.auth0.token_url }}","clientId":"{{ _.auth0.client_id }}","clientSecret":"{{ _.auth0.client_secret }}","usePkce":true,"redirectUrl":"{{ _.auth0.redirect_uri }}","audience":"{{ _.auth0.audience }}"},"metaSortKey":-1619205370632.25,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_f546af49097049ec85e4ecf8a10a5e24","parentId":"fld_bacd2b299b584c69b809f651b2cdbc01","modified":1625806608662,"created":1623863254779,"url":"{{ _.base_url }}/users/auth0|6083af726b4de900695cb232","name":"Get User with Auth0 ID","description":"","method":"GET","body":{},"parameters":[],"headers":[],"authentication":{"type":"oauth2","grantType":"authorization_code","authorizationUrl":"{{ _.auth0.auth_url }}","accessTokenUrl":"{{ _.auth0.token_url }}","clientId":"{{ _.auth0.client_id }}","clientSecret":"{{ _.auth0.client_secret }}","usePkce":true,"redirectUrl":"{{ _.auth0.redirect_uri }}","audience":"{{ _.auth0.audience }}"},"metaSortKey":-1619205370218.125,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_5f16a64979e94ec78eb1c38b53f959ee","parentId":"fld_bacd2b299b584c69b809f651b2cdbc01","modified":1625841423375,"created":1619205368160,"url":"{{ _.base_url }}/users/fe7029b4-df0e-4755-8197-81a64f20745a","name":"Update User","description":"","method":"PUT","body":{"mimeType":"application/json","text":"{\n\t\"nombre\": \"Jhon 2\",\n\t\"roles\": [\n\t\t\"admin\"\n\t]\n}"},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json","id":"pair_6ffcb9f5a8f44f058886f0993c64d3d2"}],"authentication":{"type":"oauth2","grantType":"authorization_code","authorizationUrl":"{{ _.auth0.auth_url }}","accessTokenUrl":"{{ _.auth0.token_url }}","clientId":"{{ _.auth0.client_id }}","clientSecret":"{{ _.auth0.client_secret }}","usePkce":true,"redirectUrl":"{{ _.auth0.redirect_uri }}","audience":"{{ _.auth0.audience }}"},"metaSortKey":-1619205368160,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_877481c68c224e979fd8f800380fc8ee","parentId":"fld_bacd2b299b584c69b809f651b2cdbc01","modified":1625842051539,"created":1619836477096,"url":"{{ _.base_url }}/users/fe7029b4-df0e-4755-8197-81a64f20745a/restaurantes/0f8618c5-3b18-4006-9697-d796921113cf","name":"Add to Restaurant","description":"","method":"PUT","body":{"mimeType":"application/json","text":""},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json","id":"pair_a8d5b644cb2043a1ac1251e84af3b30f"}],"authentication":{"type":"oauth2","grantType":"authorization_code","authorizationUrl":"{{ _.auth0.auth_url }}","accessTokenUrl":"{{ _.auth0.token_url }}","clientId":"{{ _.auth0.client_id }}","clientSecret":"{{ _.auth0.client_secret }}","usePkce":true,"redirectUrl":"{{ _.auth0.redirect_uri }}","audience":"{{ _.auth0.audience }}"},"metaSortKey":-1619205366786,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_60aa45de070547bc8ead62e75850a6f0","parentId":"fld_bacd2b299b584c69b809f651b2cdbc01","modified":1625842073383,"created":1619836996180,"url":"{{ _.base_url }}/users/fe7029b4-df0e-4755-8197-81a64f20745a/restaurantes/0f8618c5-3b18-4006-9697-d796921113cf","name":"Remove from Restaurant","description":"","method":"DELETE","body":{"mimeType":"application/json","text":""},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json","id":"pair_a8d5b644cb2043a1ac1251e84af3b30f"}],"authentication":{"type":"oauth2","grantType":"authorization_code","authorizationUrl":"{{ _.auth0.auth_url }}","accessTokenUrl":"{{ _.auth0.token_url }}","clientId":"{{ _.auth0.client_id }}","clientSecret":"{{ _.auth0.client_secret }}","usePkce":true,"redirectUrl":"{{ _.auth0.redirect_uri }}","audience":"{{ _.auth0.audience }}"},"metaSortKey":-1619205366099,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_9e4450009771406cae96fa403a140b4f","parentId":"fld_bacd2b299b584c69b809f651b2cdbc01","modified":1625842075731,"created":1619205371423,"url":"{{ _.base_url }}/users/fe7029b4-df0e-4755-8197-81a64f20745a","name":"Delete User","description":"","method":"DELETE","body":{},"parameters":[],"headers":[],"authentication":{"type":"oauth2","grantType":"authorization_code","authorizationUrl":"{{ _.auth0.auth_url }}","accessTokenUrl":"{{ _.auth0.token_url }}","clientId":"{{ _.auth0.client_id }}","clientSecret":"{{ _.auth0.client_secret }}","usePkce":true,"redirectUrl":"{{ _.auth0.redirect_uri }}","audience":"{{ _.auth0.audience }}"},"metaSortKey":-1619205365412,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_bb53e00d3f254f7fbfe78317fe1968a2","parentId":"fld_041ef290a606475f947ba2a22fd25d17","modified":1625806811290,"created":1619994417387,"url":"{{ _.base_url }}/restaurantes","name":"All Restaurantes","description":"","method":"GET","body":{},"parameters":[],"headers":[],"authentication":{"type":"oauth2","grantType":"authorization_code","authorizationUrl":"{{ _.auth0.auth_url }}","accessTokenUrl":"{{ _.auth0.token_url }}","clientId":"{{ _.auth0.client_id }}","clientSecret":"{{ _.auth0.client_secret }}","usePkce":true,"redirectUrl":"{{ _.auth0.redirect_uri }}","audience":"{{ _.auth0.audience }}"},"metaSortKey":-1619994417387,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"fld_041ef290a606475f947ba2a22fd25d17","parentId":"wrk_07f30ee2dcc148b1a0d91f1c2f4debec","modified":1619994390433,"created":1619994385631,"name":"Restaurantes","description":"","environment":{},"environmentPropertyOrder":null,"metaSortKey":-1619018897351,"_type":"request_group"},{"_id":"req_30a4713329224d009e8ef839f14eb866","parentId":"fld_041ef290a606475f947ba2a22fd25d17","modified":1626124247053,"created":1619995171350,"url":"{{ _.base_url }}/restaurantes","name":"Create Restaurante","description":"","method":"POST","body":{"mimeType":"application/json","text":"{\n\t\"nombre\": \"Todo Rico Restaurant: Mackena\"\n}"},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json","id":"pair_a52630b25bdf4f8a847aac849df9c1e4"}],"authentication":{"type":"oauth2","grantType":"authorization_code","authorizationUrl":"{{ _.auth0.auth_url }}","accessTokenUrl":"{{ _.auth0.token_url }}","clientId":"{{ _.auth0.client_id }}","clientSecret":"{{ _.auth0.client_secret }}","usePkce":true,"redirectUrl":"{{ _.auth0.redirect_uri }}","audience":"{{ _.auth0.audience }}"},"metaSortKey":-1619806503594,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_00c1743ddad34dd499f648e2ac3cc162","parentId":"fld_041ef290a606475f947ba2a22fd25d17","modified":1625806831343,"created":1619994603339,"url":"{{ _.base_url }}/restaurantes/510055e0-3cab-429b-b71b-5a943646cec8","name":"Get Restaurante","description":"","method":"GET","body":{},"parameters":[],"headers":[],"authentication":{"type":"oauth2","grantType":"authorization_code","authorizationUrl":"{{ _.auth0.auth_url }}","accessTokenUrl":"{{ _.auth0.token_url }}","clientId":"{{ _.auth0.client_id }}","clientSecret":"{{ _.auth0.client_secret }}","usePkce":true,"redirectUrl":"{{ _.auth0.redirect_uri }}","audience":"{{ _.auth0.audience }}"},"metaSortKey":-1619618589801,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_3af1dfcee02548a7abd53f643a2ca4cc","parentId":"fld_041ef290a606475f947ba2a22fd25d17","modified":1625841257062,"created":1619995589467,"url":"{{ _.base_url }}/restaurantes/612ee91e-97f4-48a3-b9f1-c0cc8b246d30","name":"Update Restaurante","description":"","method":"PUT","body":{"mimeType":"application/json","text":"{\n\t\"nombre\": \"Todo Rico Restaurant 2\"\n}"},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json","id":"pair_a52630b25bdf4f8a847aac849df9c1e4"}],"authentication":{"type":"oauth2","grantType":"authorization_code","authorizationUrl":"{{ _.auth0.auth_url }}","accessTokenUrl":"{{ _.auth0.token_url }}","clientId":"{{ _.auth0.client_id }}","clientSecret":"{{ _.auth0.client_secret }}","usePkce":true,"redirectUrl":"{{ _.auth0.redirect_uri }}","audience":"{{ _.auth0.audience }}"},"metaSortKey":-1619430675983,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_73030c4def144f15b841b1e77143c4dc","parentId":"fld_041ef290a606475f947ba2a22fd25d17","modified":1626101921512,"created":1619995652735,"url":"{{ _.base_url }}/restaurantes/136be61f-201b-4dac-a9b1-72a57c5093b6","name":"Delete Restaurante","description":"","method":"DELETE","body":{"mimeType":"application/json","text":""},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json","id":"pair_a52630b25bdf4f8a847aac849df9c1e4"}],"authentication":{"type":"oauth2","grantType":"authorization_code","authorizationUrl":"{{ _.auth0.auth_url }}","accessTokenUrl":"{{ _.auth0.token_url }}","clientId":"{{ _.auth0.client_id }}","clientSecret":"{{ _.auth0.client_secret }}","redirectUrl":"{{ _.auth0.redirect_uri }}","usePkce":true,"audience":"{{ _.auth0.audience }}"},"metaSortKey":-1619336719099,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_f8b303f807b94067abc80abe81c64878","parentId":"fld_20211198ef5548e585276a9fc6c2d8c3","modified":1623880133181,"created":1623862723082,"url":"https://dev-ygnrzo5i.us.auth0.com/oauth/token ","name":"Get Admin Token","description":"","method":"POST","body":{"mimeType":"application/x-www-form-urlencoded","params":[{"name":"grant_type","value":"password","description":"","id":"pair_c202372f578b4c06904ac1543e863807"},{"name":"password","value":"superPasswordWith123NumbersAnd----Symbols","description":"","id":"pair_3375474304ee4e6a99fe025e3f06dd7c"},{"name":"username","value":"john.doe@gmail.com","description":"","id":"pair_fed6ac63d6bd490897339291270f6fd8"},{"name":"audience","value":"https://api.unified.restaurant","description":"","id":"pair_1a9cca2a200d4ac291389b24495359c9"},{"name":"client_id","value":"unlxNoowQTk4V0JAD8Bv3j3kVKq3sdog","description":"","id":"pair_1a66a9e3e9e54ba79ef979a2dd91cb08"},{"name":"client_secret","value":"khvDShr6yHGPCX1p_OpJPeQ1rG5ZGgLJV2ahu-cE0b3pVUn6WS5-9YnQGJfQBKmj","description":"","id":"pair_0cb45df9505d4215b72f95d074d5310c"}]},"parameters":[],"headers":[{"name":"Content-Type","value":"application/x-www-form-urlencoded","id":"pair_ea81b84996b14a3abe99c76551568528"}],"authentication":{},"metaSortKey":-1623862723082,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"fld_20211198ef5548e585276a9fc6c2d8c3","parentId":"wrk_07f30ee2dcc148b1a0d91f1c2f4debec","modified":1623862719158,"created":1623862715805,"name":"Auth0","description":"","environment":{},"environmentPropertyOrder":null,"metaSortKey":-1618956749685,"_type":"request_group"},{"_id":"req_b94d4df26c2244299d3a11853f4b7fb0","parentId":"fld_20211198ef5548e585276a9fc6c2d8c3","modified":1625804883460,"created":1623877980738,"url":"https://dev-ygnrzo5i.us.auth0.com/oauth/token ","name":"Get Global Admin Token","description":"","method":"POST","body":{"mimeType":"application/x-www-form-urlencoded","params":[{"name":"grant_type","value":"password","description":"","id":"pair_c202372f578b4c06904ac1543e863807"},{"name":"password","value":"ff9800s_a_d","description":"","id":"pair_3375474304ee4e6a99fe025e3f06dd7c"},{"name":"username","value":"register@danielcortes.xyz","description":"","id":"pair_336272efd280454abfaade129949e7ef"},{"name":"audience","value":"https://api.unified.restaurant","description":"","id":"pair_1a9cca2a200d4ac291389b24495359c9"},{"name":"client_id","value":"unlxNoowQTk4V0JAD8Bv3j3kVKq3sdog","description":"","id":"pair_1a66a9e3e9e54ba79ef979a2dd91cb08"},{"name":"client_secret","value":"khvDShr6yHGPCX1p_OpJPeQ1rG5ZGgLJV2ahu-cE0b3pVUn6WS5-9YnQGJfQBKmj","description":"","id":"pair_0cb45df9505d4215b72f95d074d5310c"}]},"parameters":[],"headers":[{"name":"Content-Type","value":"application/x-www-form-urlencoded","id":"pair_ea81b84996b14a3abe99c76551568528"}],"authentication":{},"metaSortKey":-1623688070335,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_7dca789f2c93484aba4a306bbecfafc9","parentId":"fld_20211198ef5548e585276a9fc6c2d8c3","modified":1623862720559,"created":1619206250828,"url":"https://dev-ygnrzo5i.us.auth0.com/oauth/token ","name":"Get Client Token","description":"","method":"POST","body":{"mimeType":"application/json","text":"{\n\t\"client_id\": \"7jP8ZreA9Vmj1MTGc4HIbr8Wp5GDVzT7\",\n\t\"client_secret\": \"Z6xnSjItXJX1yqISn7RZTlgKvGNfv8rKMIeMznMpivKYuxxjOLQiGT2d0OPaxynU\",\n\t\"audience\": \"https://api.unified.restaurant\",\n\t\"grant_type\": \"client_credentials\"\n}"},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json","id":"pair_5b755a57d3714d30af8d177cb7d6f349"}],"authentication":{},"metaSortKey":-1618956749735,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"env_204c33a0808095e3efd1dbf6e7269cbca45232c6","parentId":"wrk_07f30ee2dcc148b1a0d91f1c2f4debec","modified":1620704001452,"created":1618956632180,"name":"Base Environment","data":{},"dataPropertyOrder":{},"color":null,"isPrivate":false,"metaSortKey":1618956632180,"_type":"environment"},{"_id":"jar_204c33a0808095e3efd1dbf6e7269cbca45232c6","parentId":"wrk_07f30ee2dcc148b1a0d91f1c2f4debec","modified":1619206274437,"created":1618956632182,"name":"Default Jar","cookies":[{"key":"__cfduid","value":"d4de3b27eb821e319a80136d1fec0bc771619206275","expires":"2021-05-23T19:31:15.000Z","domain":"us.auth0.com","path":"/","secure":true,"httpOnly":true,"extensions":["SameSite=Lax"],"hostOnly":false,"creation":"2021-04-23T19:31:14.433Z","lastAccessed":"2021-04-23T19:31:14.433Z","id":"3591506857326605"},{"key":"did","value":"s%3Av0%3A78535d30-a46a-11eb-b883-17455a04318d.z6Oig1APIfmXXyYfK99ZA1nob6WyC1fuqeVeavF5IZM","expires":"2022-04-24T01:31:15.000Z","maxAge":31557600,"domain":"dev-ygnrzo5i.us.auth0.com","path":"/","secure":true,"httpOnly":true,"extensions":["SameSite=None"],"hostOnly":true,"creation":"2021-04-23T19:31:14.434Z","lastAccessed":"2021-04-23T19:31:14.434Z","id":"6130484282560063"},{"key":"did_compat","value":"s%3Av0%3A78535d30-a46a-11eb-b883-17455a04318d.z6Oig1APIfmXXyYfK99ZA1nob6WyC1fuqeVeavF5IZM","expires":"2022-04-24T01:31:15.000Z","maxAge":31557600,"domain":"dev-ygnrzo5i.us.auth0.com","path":"/","secure":true,"httpOnly":true,"hostOnly":true,"creation":"2021-04-23T19:31:14.434Z","lastAccessed":"2021-04-23T19:31:14.434Z","id":"7310520988679066"}],"_type":"cookie_jar"},{"_id":"spc_b547dbb8370d46cb9a51a4dea953936d","parentId":"wrk_07f30ee2dcc148b1a0d91f1c2f4debec","modified":1618956632140,"created":1618956632140,"fileName":"Insomnia","contents":"","contentType":"yaml","_type":"api_spec"},{"_id":"env_f2c226abfe9446fa945965dd7b29f04c","parentId":"env_204c33a0808095e3efd1dbf6e7269cbca45232c6","modified":1625809831540,"created":1620703995253,"name":"Dev","data":{"base_url":"localhost:8080/api/v1","auth0":{"client_id":"unlxNoowQTk4V0JAD8Bv3j3kVKq3sdog","client_secret":"khvDShr6yHGPCX1p_OpJPeQ1rG5ZGgLJV2ahu-cE0b3pVUn6WS5-9YnQGJfQBKmj","auth_url":"https://dev-ygnrzo5i.us.auth0.com/authorize","token_url":"https://dev-ygnrzo5i.us.auth0.com/oauth/token","audience":"https://api.unified.restaurant","redirect_uri":"http://dev.localhost.callback"},"token":"eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6IlhJRWFxOXJBVkpFVU5zekI5alJaMSJ9.eyJpc3MiOiJodHRwczovL2Rldi15Z25yem81aS51cy5hdXRoMC5jb20vIiwic3ViIjoiYXV0aDB8NjA2ZGY0ZGVhMzJlOTcwMDY5NzU1YmQ4IiwiYXVkIjoiaHR0cHM6Ly9hcGkudW5pZmllZC5yZXN0YXVyYW50IiwiaWF0IjoxNjIzODc4MDAzLCJleHAiOjE2MjM5NjQ0MDMsImF6cCI6InVubHhOb293UVRrNFYwSkFEOEJ2M2oza1ZLcTNzZG9nIiwiZ3R5IjoicGFzc3dvcmQifQ.TxoIINR_7jxlC8Qg9P0eWrfqnnW8eHNVlZRFjTn83a4WkBWvD1YJSGzKMT6KRrk9G097hEOv-8LQboIJjFlg5eU7p5P7jesrz1bvErCE4sr9ljuHyNhPNQLCn33nCf56XqilCuBGnO1DZ3nKbuBdQMyfMp3ZccikVq43hc8b1ce1dOG-nV026urI_yjgT66M_bT7OZesR22xn6ai4egauX5dzgBc8rvETq04yQ2y-fH7zvQ0g5Memdb0XWr4DKE44yIsIxfOjub3O8mVLxEpMIk0jknt5KQvsr_BnqfADqI3w2XekkLAiFRr3XnHzKMlK_U-lLSPOcmCBWRN5NbaHg","token_admin":"eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6IlhJRWFxOXJBVkpFVU5zekI5alJaMSJ9.eyJpc3MiOiJodHRwczovL2Rldi15Z25yem81aS51cy5hdXRoMC5jb20vIiwic3ViIjoiYXV0aDB8NjBjYTVlMTIxNDIwODgwMDY4MGFiZDM2IiwiYXVkIjoiaHR0cHM6Ly9hcGkudW5pZmllZC5yZXN0YXVyYW50IiwiaWF0IjoxNjIzODc1MTI2LCJleHAiOjE2MjM5NjE1MjYsImF6cCI6InVubHhOb293UVRrNFYwSkFEOEJ2M2oza1ZLcTNzZG9nIiwiZ3R5IjoicGFzc3dvcmQifQ.iZLaDLdobUkP_ohSXskYLdV3ikackY_ie3lnfjb34_1ebMZ8u_3JJOr4gdlnlJqWwMCJ_rRAHbg0N6GJ2ZH5UjqYkiqAzmCiMDmWKvFJ7kFtjkmJBtlybY0SV8rRaUdNBmHKE4aVqg2ktYYyjJE1m5Lm1gOQK0Hd0vHxoNJzZBVDH1ilNgPpbBP1OuB8fLGYm0q_IYMke69rjmimPR03_qGUCcPBO-1s9RXnm2Bfqjq38yBdCssR6ubnXo_FqZDKNiK19YQgx6i6grnvwJyrakQXJHbHXB-DZD3Z5no_SHlyuLfqAF9cg0P5dd-fnLLA7PkJRbhof48agxs5Wmp5pw"},"dataPropertyOrder":{"&":["base_url","auth0","token","token_admin"],"&~|auth0":["client_id","client_secret","auth_url","token_url","audience","redirect_uri"]},"color":null,"isPrivate":false,"metaSortKey":1620703995253,"_type":"environment"},{"_id":"env_8f006c56490e4794a8c98e9102c33805","parentId":"env_204c33a0808095e3efd1dbf6e7269cbca45232c6","modified":1626131587703,"created":1625809817748,"name":"Production","data":{"base_url":"api.unified.restaurant/api/v1","auth0":{"client_id":"unlxNoowQTk4V0JAD8Bv3j3kVKq3sdog","client_secret":"khvDShr6yHGPCX1p_OpJPeQ1rG5ZGgLJV2ahu-cE0b3pVUn6WS5-9YnQGJfQBKmj","auth_url":"https://dev-ygnrzo5i.us.auth0.com/authorize","token_url":"https://dev-ygnrzo5i.us.auth0.com/oauth/token","audience":"https://api.unified.restaurant","redirect_uri":"http://dev.localhost.callback"}},"dataPropertyOrder":{"&":["base_url","auth0"],"&~|auth0":["client_id","client_secret","auth_url","token_url","audience","redirect_uri"]},"color":"#001eff","isPrivate":false,"metaSortKey":1625809817748,"_type":"environment"}]} \ No newline at end of file +{"_type":"export","__export_format":4,"__export_date":"2021-07-14T07:58:53.574Z","__export_source":"insomnia.desktop.app:v2021.3.0","resources":[{"_id":"req_aa4f04af413e42e98b6c7ff8f15b2d9f","parentId":"fld_4b16c803edfb47008a4c88981b5088c0","modified":1626101183538,"created":1623864931076,"url":"{{ _.base_url }}/restaurantes/136be61f-201b-4dac-a9b1-72a57c5093b6/canales-venta","name":"All Canales de Venta","description":"","method":"GET","body":{},"parameters":[{"name":"page","value":"1","description":"","id":"pair_7c7c1cb4df8741e2b3af58c7928cd1d3","disabled":true},{"name":"per_page","value":"1","description":"","id":"pair_3a162ce44cc94062a9d1afbcab2cfc7c","disabled":true}],"headers":[],"authentication":{"type":"oauth2","grantType":"authorization_code","authorizationUrl":"{{ _.auth0.auth_url }}","accessTokenUrl":"{{ _.auth0.token_url }}","clientId":"{{ _.auth0.client_id }}","clientSecret":"{{ _.auth0.client_secret }}","usePkce":true,"redirectUrl":"{{ _.auth0.redirect_uri }}","audience":"{{ _.auth0.audience }}"},"metaSortKey":-1619205371046.375,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"fld_4b16c803edfb47008a4c88981b5088c0","parentId":"wrk_07f30ee2dcc148b1a0d91f1c2f4debec","modified":1626100854066,"created":1623864914848,"name":"Canales de Venta","description":"","environment":{},"environmentPropertyOrder":null,"metaSortKey":-1623864914848,"_type":"request_group"},{"_id":"wrk_07f30ee2dcc148b1a0d91f1c2f4debec","parentId":null,"modified":1625804982911,"created":1618956632139,"name":"Unified Restaurant","description":"","scope":"collection","_type":"workspace"},{"_id":"req_00bc36f0bb6a48dabae37a2eb59d45ef","parentId":"fld_4b16c803edfb47008a4c88981b5088c0","modified":1626124239633,"created":1623870507092,"url":"{{ _.base_url }}/restaurantes/136be61f-201b-4dac-a9b1-72a57c5093b6/canales-venta","name":"Create Canal de Venta","description":"","method":"POST","body":{"mimeType":"application/json","text":"{\n\t\"nombre\": \"1\",\n\t\"sector_id\": \"82f8d4f4-c026-40b0-ad3b-bdcc8ad68211\",\n\t\"tipo_canal_id\": \"be7b4092-3688-4e4a-99b9-eca48704dc1e\"\n}"},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json","id":"pair_1e159f6fa1694f28a7f42dfc8343e73b"}],"authentication":{"type":"oauth2","grantType":"authorization_code","authorizationUrl":"{{ _.auth0.auth_url }}","accessTokenUrl":"{{ _.auth0.token_url }}","clientId":"{{ _.auth0.client_id }}","clientSecret":"{{ _.auth0.client_secret }}","usePkce":true,"redirectUrl":"{{ _.auth0.redirect_uri }}","audience":"{{ _.auth0.audience }}"},"metaSortKey":-1619205371033.875,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_c1f8f261c0df45d682ff619cc335fb79","parentId":"fld_4b16c803edfb47008a4c88981b5088c0","modified":1626101185841,"created":1623870410352,"url":"{{ _.base_url }}/restaurantes/136be61f-201b-4dac-a9b1-72a57c5093b6/canales-venta/4abd36ee-5a26-4b38-8cc7-767ef6a820b2","name":"Get Canal de Venta","description":"","method":"GET","body":{},"parameters":[],"headers":[],"authentication":{"type":"oauth2","grantType":"authorization_code","authorizationUrl":"{{ _.auth0.auth_url }}","accessTokenUrl":"{{ _.auth0.token_url }}","clientId":"{{ _.auth0.client_id }}","clientSecret":"{{ _.auth0.client_secret }}","usePkce":true,"redirectUrl":"{{ _.auth0.redirect_uri }}","audience":"{{ _.auth0.audience }}"},"metaSortKey":-1619205371021.375,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_bfb9991817234e69ba16207138ee708b","parentId":"fld_4b16c803edfb47008a4c88981b5088c0","modified":1626101189573,"created":1626099439207,"url":"{{ _.base_url }}/restaurantes/136be61f-201b-4dac-a9b1-72a57c5093b6/canales-venta/4abd36ee-5a26-4b38-8cc7-767ef6a820b2","name":"Update Canal de Venta","description":"","method":"PUT","body":{"mimeType":"application/json","text":"{\n\t\"nombre\": \"2\",\n\t\"sector_id\": \"82f8d4f4-c026-40b0-ad3b-bdcc8ad68211\",\n\t\"tipo_canal_id\": \"be7b4092-3688-4e4a-99b9-eca48704dc1e\"\n}"},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json","id":"pair_1e159f6fa1694f28a7f42dfc8343e73b"}],"authentication":{"type":"oauth2","grantType":"authorization_code","authorizationUrl":"{{ _.auth0.auth_url }}","accessTokenUrl":"{{ _.auth0.token_url }}","clientId":"{{ _.auth0.client_id }}","clientSecret":"{{ _.auth0.client_secret }}","usePkce":true,"redirectUrl":"{{ _.auth0.redirect_uri }}","audience":"{{ _.auth0.audience }}"},"metaSortKey":-1619205370905.3438,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_7aa0252f5ca44043b4e44af1a52036fc","parentId":"fld_4b16c803edfb47008a4c88981b5088c0","modified":1626101191313,"created":1626099739694,"url":"{{ _.base_url }}/restaurantes/136be61f-201b-4dac-a9b1-72a57c5093b6/canales-venta/4abd36ee-5a26-4b38-8cc7-767ef6a820b2","name":"Delete Canal de Venta","description":"","method":"DELETE","body":{"mimeType":"application/json","text":""},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json","id":"pair_1e159f6fa1694f28a7f42dfc8343e73b"}],"authentication":{"type":"oauth2","grantType":"authorization_code","authorizationUrl":"{{ _.auth0.auth_url }}","accessTokenUrl":"{{ _.auth0.token_url }}","clientId":"{{ _.auth0.client_id }}","clientSecret":"{{ _.auth0.client_secret }}","usePkce":true,"redirectUrl":"{{ _.auth0.redirect_uri }}","audience":"{{ _.auth0.audience }}"},"metaSortKey":-1619205370859.8281,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_85af88553451468684d58d89a10f6d95","parentId":"fld_556c8426ee994ece88ae322735381e6f","modified":1626096910172,"created":1626096879877,"url":"{{ _.base_url }}/restaurantes/136be61f-201b-4dac-a9b1-72a57c5093b6/sectores","name":"All Sectores","description":"","method":"GET","body":{},"parameters":[{"name":"page","value":"1","description":"","id":"pair_7c7c1cb4df8741e2b3af58c7928cd1d3","disabled":true},{"name":"per_page","value":"1","description":"","id":"pair_3a162ce44cc94062a9d1afbcab2cfc7c","disabled":true}],"headers":[],"authentication":{"type":"oauth2","grantType":"authorization_code","authorizationUrl":"{{ _.auth0.auth_url }}","accessTokenUrl":"{{ _.auth0.token_url }}","clientId":"{{ _.auth0.client_id }}","clientSecret":"{{ _.auth0.client_secret }}","usePkce":true,"redirectUrl":"{{ _.auth0.redirect_uri }}","audience":"{{ _.auth0.audience }}"},"metaSortKey":-1619205371046.375,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"fld_556c8426ee994ece88ae322735381e6f","parentId":"wrk_07f30ee2dcc148b1a0d91f1c2f4debec","modified":1626096879869,"created":1626096879870,"name":"Sectores","description":"","environment":{},"environmentPropertyOrder":null,"metaSortKey":-1622142484730,"_type":"request_group"},{"_id":"req_925f7fa50106493d85c80b7e4468c33a","parentId":"fld_556c8426ee994ece88ae322735381e6f","modified":1626124237844,"created":1626096879886,"url":"{{ _.base_url }}/restaurantes/136be61f-201b-4dac-a9b1-72a57c5093b6/sectores","name":"Create Sector","description":"","method":"POST","body":{"mimeType":"application/json","text":"{\n\t\"nombre\": \"Terraza\"\n}"},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json","id":"pair_f2e71cc25e3441ad8263f4aa19210d49"}],"authentication":{"type":"oauth2","grantType":"authorization_code","authorizationUrl":"{{ _.auth0.auth_url }}","accessTokenUrl":"{{ _.auth0.token_url }}","clientId":"{{ _.auth0.client_id }}","clientSecret":"{{ _.auth0.client_secret }}","usePkce":true,"redirectUrl":"{{ _.auth0.redirect_uri }}","audience":"{{ _.auth0.audience }}"},"metaSortKey":-1619205371033.875,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_ba8bd99d73d24d5fa13bfebe3173a716","parentId":"fld_556c8426ee994ece88ae322735381e6f","modified":1626097798491,"created":1626096879884,"url":"{{ _.base_url }}/restaurantes/136be61f-201b-4dac-a9b1-72a57c5093b6/sectores/aa162454-d507-4cdb-b727-57e01b71e7ad","name":"Get Sectores","description":"","method":"GET","body":{},"parameters":[],"headers":[],"authentication":{"type":"oauth2","grantType":"authorization_code","authorizationUrl":"{{ _.auth0.auth_url }}","accessTokenUrl":"{{ _.auth0.token_url }}","clientId":"{{ _.auth0.client_id }}","clientSecret":"{{ _.auth0.client_secret }}","usePkce":true,"redirectUrl":"{{ _.auth0.redirect_uri }}","audience":"{{ _.auth0.audience }}"},"metaSortKey":-1619205371021.375,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_e0e0e15fcc004a5292c2d21117d07cf8","parentId":"fld_556c8426ee994ece88ae322735381e6f","modified":1626101251139,"created":1626097865184,"url":"{{ _.base_url }}/restaurantes/136be61f-201b-4dac-a9b1-72a57c5093b6/sectores/82f8d4f4-c026-40b0-ad3b-bdcc8ad68211","name":"Update Sector","description":"","method":"PUT","body":{"mimeType":"application/json","text":"{\n\t\"nombre\": \"Salon Principal\"\n}"},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json","id":"pair_f2e71cc25e3441ad8263f4aa19210d49"}],"authentication":{"type":"oauth2","grantType":"authorization_code","authorizationUrl":"{{ _.auth0.auth_url }}","accessTokenUrl":"{{ _.auth0.token_url }}","clientId":"{{ _.auth0.client_id }}","clientSecret":"{{ _.auth0.client_secret }}","usePkce":true,"redirectUrl":"{{ _.auth0.redirect_uri }}","audience":"{{ _.auth0.audience }}"},"metaSortKey":-1619205370814.3125,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_05616d77833d4213a5313c65dea28190","parentId":"fld_556c8426ee994ece88ae322735381e6f","modified":1626101560124,"created":1626097988054,"url":"{{ _.base_url }}/restaurantes/136be61f-201b-4dac-a9b1-72a57c5093b6/sectores/82f8d4f4-c026-40b0-ad3b-bdcc8ad68211","name":"Delete Sector","description":"","method":"DELETE","body":{"mimeType":"application/json","text":""},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json","id":"pair_f2e71cc25e3441ad8263f4aa19210d49"}],"authentication":{"type":"oauth2","grantType":"authorization_code","authorizationUrl":"{{ _.auth0.auth_url }}","accessTokenUrl":"{{ _.auth0.token_url }}","clientId":"{{ _.auth0.client_id }}","clientSecret":"{{ _.auth0.client_secret }}","usePkce":true,"redirectUrl":"{{ _.auth0.redirect_uri }}","audience":"{{ _.auth0.audience }}"},"metaSortKey":-1619205370723.2812,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_4a944a11bb1f4f62a51d26f6ffcf4c5f","parentId":"fld_6f35aaa389a249e8a827f20b263ba299","modified":1626101152636,"created":1626100849209,"url":"{{ _.base_url }}/restaurantes/136be61f-201b-4dac-a9b1-72a57c5093b6/zonas-produccion","name":"All Zonas de Produccion","description":"","method":"GET","body":{},"parameters":[{"name":"page","value":"1","description":"","id":"pair_7c7c1cb4df8741e2b3af58c7928cd1d3","disabled":true},{"name":"per_page","value":"1","description":"","id":"pair_3a162ce44cc94062a9d1afbcab2cfc7c","disabled":true}],"headers":[],"authentication":{"type":"oauth2","grantType":"authorization_code","authorizationUrl":"{{ _.auth0.auth_url }}","accessTokenUrl":"{{ _.auth0.token_url }}","clientId":"{{ _.auth0.client_id }}","clientSecret":"{{ _.auth0.client_secret }}","usePkce":true,"redirectUrl":"{{ _.auth0.redirect_uri }}","audience":"{{ _.auth0.audience }}"},"metaSortKey":-1619205371046.375,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"fld_6f35aaa389a249e8a827f20b263ba299","parentId":"wrk_07f30ee2dcc148b1a0d91f1c2f4debec","modified":1626100849202,"created":1626100849202,"name":"Zonas de Produccion","description":"","environment":{},"environmentPropertyOrder":null,"metaSortKey":-1621281269671,"_type":"request_group"},{"_id":"req_c39597eb8f4144eea0ca0df155f23003","parentId":"fld_6f35aaa389a249e8a827f20b263ba299","modified":1626124236170,"created":1626100849219,"url":"{{ _.base_url }}/restaurantes/136be61f-201b-4dac-a9b1-72a57c5093b6/zonas-produccion","name":"Create Zona de Produccion","description":"","method":"POST","body":{"mimeType":"application/json","text":"{\n\t\"nombre\": \"Barra\"\n}"},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json","id":"pair_f2e71cc25e3441ad8263f4aa19210d49"}],"authentication":{"type":"oauth2","grantType":"authorization_code","authorizationUrl":"{{ _.auth0.auth_url }}","accessTokenUrl":"{{ _.auth0.token_url }}","clientId":"{{ _.auth0.client_id }}","clientSecret":"{{ _.auth0.client_secret }}","usePkce":true,"redirectUrl":"{{ _.auth0.redirect_uri }}","audience":"{{ _.auth0.audience }}"},"metaSortKey":-1619205371033.875,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_2fe5879904004485bf1db2f313e122a8","parentId":"fld_6f35aaa389a249e8a827f20b263ba299","modified":1626101155690,"created":1626100849217,"url":"{{ _.base_url }}/restaurantes/136be61f-201b-4dac-a9b1-72a57c5093b6/zonas-produccion/8ca27646-7b15-44d4-acd8-c417b5f2b7fb","name":"Get Zona de Produccion","description":"","method":"GET","body":{},"parameters":[],"headers":[],"authentication":{"type":"oauth2","grantType":"authorization_code","authorizationUrl":"{{ _.auth0.auth_url }}","accessTokenUrl":"{{ _.auth0.token_url }}","clientId":"{{ _.auth0.client_id }}","clientSecret":"{{ _.auth0.client_secret }}","usePkce":true,"redirectUrl":"{{ _.auth0.redirect_uri }}","audience":"{{ _.auth0.audience }}"},"metaSortKey":-1619205371021.375,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_03c92b4d20824466a8e4eb2c702b060b","parentId":"fld_6f35aaa389a249e8a827f20b263ba299","modified":1626101171582,"created":1626100849221,"url":"{{ _.base_url }}/restaurantes/136be61f-201b-4dac-a9b1-72a57c5093b6/zonas-produccion/8ca27646-7b15-44d4-acd8-c417b5f2b7fb","name":"Update Zona de Produccion","description":"","method":"PUT","body":{"mimeType":"application/json","text":"{\n\t\"nombre\": \"Barra\"\n}"},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json","id":"pair_f2e71cc25e3441ad8263f4aa19210d49"}],"authentication":{"type":"oauth2","grantType":"authorization_code","authorizationUrl":"{{ _.auth0.auth_url }}","accessTokenUrl":"{{ _.auth0.token_url }}","clientId":"{{ _.auth0.client_id }}","clientSecret":"{{ _.auth0.client_secret }}","usePkce":true,"redirectUrl":"{{ _.auth0.redirect_uri }}","audience":"{{ _.auth0.audience }}"},"metaSortKey":-1619205370814.3125,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_fa4861c748814c7d8f5e35dcbc396f84","parentId":"fld_6f35aaa389a249e8a827f20b263ba299","modified":1626101178643,"created":1626100849222,"url":"{{ _.base_url }}/restaurantes/136be61f-201b-4dac-a9b1-72a57c5093b6/zonas-produccion/8ca27646-7b15-44d4-acd8-c417b5f2b7fb","name":"Delete Zona de Produccion","description":"","method":"DELETE","body":{"mimeType":"application/json","text":""},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json","id":"pair_f2e71cc25e3441ad8263f4aa19210d49"}],"authentication":{"type":"oauth2","grantType":"authorization_code","authorizationUrl":"{{ _.auth0.auth_url }}","accessTokenUrl":"{{ _.auth0.token_url }}","clientId":"{{ _.auth0.client_id }}","clientSecret":"{{ _.auth0.client_secret }}","usePkce":true,"redirectUrl":"{{ _.auth0.redirect_uri }}","audience":"{{ _.auth0.audience }}"},"metaSortKey":-1619205370723.2812,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_1080aebb5a5a45f6bd0a0f442fa5edf7","parentId":"fld_cf7c19d3f8964fcdaee98b38ed3157d9","modified":1626122886546,"created":1626122837213,"url":"{{ _.base_url }}/restaurantes/136be61f-201b-4dac-a9b1-72a57c5093b6/categorias","name":"All Categorias","description":"","method":"GET","body":{},"parameters":[{"name":"page","value":"1","description":"","id":"pair_7c7c1cb4df8741e2b3af58c7928cd1d3","disabled":true},{"name":"per_page","value":"1","description":"","id":"pair_3a162ce44cc94062a9d1afbcab2cfc7c","disabled":true}],"headers":[],"authentication":{"type":"oauth2","grantType":"authorization_code","authorizationUrl":"{{ _.auth0.auth_url }}","accessTokenUrl":"{{ _.auth0.token_url }}","clientId":"{{ _.auth0.client_id }}","clientSecret":"{{ _.auth0.client_secret }}","usePkce":true,"redirectUrl":"{{ _.auth0.redirect_uri }}","audience":"{{ _.auth0.audience }}"},"metaSortKey":-1619205371046.375,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"fld_cf7c19d3f8964fcdaee98b38ed3157d9","parentId":"wrk_07f30ee2dcc148b1a0d91f1c2f4debec","modified":1626122837204,"created":1626122837204,"name":"Categorias","description":"","environment":{},"environmentPropertyOrder":null,"metaSortKey":-1620850662141.5,"_type":"request_group"},{"_id":"req_4a4ee41a7b96480b9cbe8d2a56745b4c","parentId":"fld_cf7c19d3f8964fcdaee98b38ed3157d9","modified":1626126605739,"created":1626122837220,"url":"{{ _.base_url }}/restaurantes/136be61f-201b-4dac-a9b1-72a57c5093b6/categorias","name":"Create Categoria","description":"","method":"POST","body":{"mimeType":"application/json","text":"{\n\t\"nombre\": \"Para Picar\"\n}"},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json","id":"pair_f2e71cc25e3441ad8263f4aa19210d49"}],"authentication":{"type":"oauth2","grantType":"authorization_code","authorizationUrl":"{{ _.auth0.auth_url }}","accessTokenUrl":"{{ _.auth0.token_url }}","clientId":"{{ _.auth0.client_id }}","clientSecret":"{{ _.auth0.client_secret }}","usePkce":true,"redirectUrl":"{{ _.auth0.redirect_uri }}","audience":"{{ _.auth0.audience }}"},"metaSortKey":-1619205371033.875,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_b1593f5c02264f1fbe298f7215e480a3","parentId":"fld_cf7c19d3f8964fcdaee98b38ed3157d9","modified":1626123102194,"created":1626122837218,"url":"{{ _.base_url }}/restaurantes/136be61f-201b-4dac-a9b1-72a57c5093b6/categorias/1320c4a5-674e-4cdb-95f3-59c68b3e67ef","name":"Get Categorias","description":"","method":"GET","body":{},"parameters":[],"headers":[],"authentication":{"type":"oauth2","grantType":"authorization_code","authorizationUrl":"{{ _.auth0.auth_url }}","accessTokenUrl":"{{ _.auth0.token_url }}","clientId":"{{ _.auth0.client_id }}","clientSecret":"{{ _.auth0.client_secret }}","usePkce":true,"redirectUrl":"{{ _.auth0.redirect_uri }}","audience":"{{ _.auth0.audience }}"},"metaSortKey":-1619205371021.375,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_d4b5649429044883a82360768a5e502d","parentId":"fld_cf7c19d3f8964fcdaee98b38ed3157d9","modified":1626123119284,"created":1626122837221,"url":"{{ _.base_url }}/restaurantes/136be61f-201b-4dac-a9b1-72a57c5093b6/categorias/1320c4a5-674e-4cdb-95f3-59c68b3e67ef","name":"Update Categoria","description":"","method":"PUT","body":{"mimeType":"application/json","text":"{\n\t\"nombre\": \"Bebidas\"\n}"},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json","id":"pair_f2e71cc25e3441ad8263f4aa19210d49"}],"authentication":{"type":"oauth2","grantType":"authorization_code","authorizationUrl":"{{ _.auth0.auth_url }}","accessTokenUrl":"{{ _.auth0.token_url }}","clientId":"{{ _.auth0.client_id }}","clientSecret":"{{ _.auth0.client_secret }}","usePkce":true,"redirectUrl":"{{ _.auth0.redirect_uri }}","audience":"{{ _.auth0.audience }}"},"metaSortKey":-1619205370814.3125,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_d2acb3e2594145d6858644f2a0ef0eac","parentId":"fld_cf7c19d3f8964fcdaee98b38ed3157d9","modified":1626123161491,"created":1626122837223,"url":"{{ _.base_url }}/restaurantes/136be61f-201b-4dac-a9b1-72a57c5093b6/categorias/1320c4a5-674e-4cdb-95f3-59c68b3e67ef","name":"Delete Categoria","description":"","method":"DELETE","body":{"mimeType":"application/json","text":""},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json","id":"pair_f2e71cc25e3441ad8263f4aa19210d49"}],"authentication":{"type":"oauth2","grantType":"authorization_code","authorizationUrl":"{{ _.auth0.auth_url }}","accessTokenUrl":"{{ _.auth0.token_url }}","clientId":"{{ _.auth0.client_id }}","clientSecret":"{{ _.auth0.client_secret }}","usePkce":true,"redirectUrl":"{{ _.auth0.redirect_uri }}","audience":"{{ _.auth0.audience }}"},"metaSortKey":-1619205370723.2812,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_e9e72d4685e84cc7997f55a70f2f74c9","parentId":"fld_7e4bd916a6d14dfbaa9ae0fd92ac5e7e","modified":1626123780265,"created":1626123770873,"url":"{{ _.base_url }}/restaurantes/136be61f-201b-4dac-a9b1-72a57c5093b6/proveedores","name":"All Proveedores","description":"","method":"GET","body":{},"parameters":[{"name":"page","value":"1","description":"","id":"pair_7c7c1cb4df8741e2b3af58c7928cd1d3","disabled":true},{"name":"per_page","value":"1","description":"","id":"pair_3a162ce44cc94062a9d1afbcab2cfc7c","disabled":true}],"headers":[],"authentication":{"type":"oauth2","grantType":"authorization_code","authorizationUrl":"{{ _.auth0.auth_url }}","accessTokenUrl":"{{ _.auth0.token_url }}","clientId":"{{ _.auth0.client_id }}","clientSecret":"{{ _.auth0.client_secret }}","usePkce":true,"redirectUrl":"{{ _.auth0.redirect_uri }}","audience":"{{ _.auth0.audience }}"},"metaSortKey":-1619205371046.375,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"fld_7e4bd916a6d14dfbaa9ae0fd92ac5e7e","parentId":"wrk_07f30ee2dcc148b1a0d91f1c2f4debec","modified":1626123770871,"created":1626123770871,"name":"Proveedores","description":"","environment":{},"environmentPropertyOrder":null,"metaSortKey":-1620635358376.75,"_type":"request_group"},{"_id":"req_a0a5fece03f944d9b026eab55d5c2b8b","parentId":"fld_7e4bd916a6d14dfbaa9ae0fd92ac5e7e","modified":1626211815427,"created":1626123770874,"url":"{{ _.base_url }}/restaurantes/136be61f-201b-4dac-a9b1-72a57c5093b6/proveedores","name":"Create Proveedor","description":"","method":"POST","body":{"mimeType":"application/json","text":"{\n\t\"rut\": \"12341234-0\",\n\t\"nombre\": \"Coca-Cola\",\n\t\"descripcion\": \"Bebidas y esas cosas\"\n}"},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json","id":"pair_f2e71cc25e3441ad8263f4aa19210d49"}],"authentication":{"type":"oauth2","grantType":"authorization_code","authorizationUrl":"{{ _.auth0.auth_url }}","accessTokenUrl":"{{ _.auth0.token_url }}","clientId":"{{ _.auth0.client_id }}","clientSecret":"{{ _.auth0.client_secret }}","usePkce":true,"redirectUrl":"{{ _.auth0.redirect_uri }}","audience":"{{ _.auth0.audience }}"},"metaSortKey":-1619205371033.875,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_61f2e22c72ec46ad88f7a9ab97a93f48","parentId":"fld_7e4bd916a6d14dfbaa9ae0fd92ac5e7e","modified":1626123844100,"created":1626123770873,"url":"{{ _.base_url }}/restaurantes/136be61f-201b-4dac-a9b1-72a57c5093b6/proveedores/1320c4a5-674e-4cdb-95f3-59c68b3e67ef","name":"Get Proveedor","description":"","method":"GET","body":{},"parameters":[],"headers":[],"authentication":{"type":"oauth2","grantType":"authorization_code","authorizationUrl":"{{ _.auth0.auth_url }}","accessTokenUrl":"{{ _.auth0.token_url }}","clientId":"{{ _.auth0.client_id }}","clientSecret":"{{ _.auth0.client_secret }}","usePkce":true,"redirectUrl":"{{ _.auth0.redirect_uri }}","audience":"{{ _.auth0.audience }}"},"metaSortKey":-1619205371021.375,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_d2db9d9baae94dc0940dc3bd561c479c","parentId":"fld_7e4bd916a6d14dfbaa9ae0fd92ac5e7e","modified":1626124219092,"created":1626123770875,"url":"{{ _.base_url }}/restaurantes/136be61f-201b-4dac-a9b1-72a57c5093b6/proveedores/f3577a66-8258-4fa5-b85b-b6bcece4f471","name":"Update Proveedor","description":"","method":"PUT","body":{"mimeType":"application/json","text":"{\n\t\"rut\": \"19763899-0\",\n\t\"nombre\": \"Daniel Cortés\",\n\t\"descripcion\": \"No vende nada :c\",\n\t\"direccion\": \"Quitratue #635\",\n\t\"telefono\": \"+56986570622\"\n}"},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json","id":"pair_f2e71cc25e3441ad8263f4aa19210d49"}],"authentication":{"type":"oauth2","grantType":"authorization_code","authorizationUrl":"{{ _.auth0.auth_url }}","accessTokenUrl":"{{ _.auth0.token_url }}","clientId":"{{ _.auth0.client_id }}","clientSecret":"{{ _.auth0.client_secret }}","usePkce":true,"redirectUrl":"{{ _.auth0.redirect_uri }}","audience":"{{ _.auth0.audience }}"},"metaSortKey":-1619205370814.3125,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_afe6407e1f4c41c894f5a29d72b8325f","parentId":"fld_7e4bd916a6d14dfbaa9ae0fd92ac5e7e","modified":1626124196775,"created":1626123770876,"url":"{{ _.base_url }}/restaurantes/136be61f-201b-4dac-a9b1-72a57c5093b6/proveedores/e24c9472-51d7-42d4-a7f4-99484a444ca7","name":"Delete Proveedor","description":"","method":"DELETE","body":{"mimeType":"application/json","text":""},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json","id":"pair_f2e71cc25e3441ad8263f4aa19210d49"}],"authentication":{"type":"oauth2","grantType":"authorization_code","authorizationUrl":"{{ _.auth0.auth_url }}","accessTokenUrl":"{{ _.auth0.token_url }}","clientId":"{{ _.auth0.client_id }}","clientSecret":"{{ _.auth0.client_secret }}","usePkce":true,"redirectUrl":"{{ _.auth0.redirect_uri }}","audience":"{{ _.auth0.audience }}"},"metaSortKey":-1619205370723.2812,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_03af7746de7a468f9ffc7a6c1fa73190","parentId":"fld_88d689859b344f509123d26cc974b0ae","modified":1626249178455,"created":1626248118417,"url":"{{ _.base_url }}/restaurantes/136be61f-201b-4dac-a9b1-72a57c5093b6/compras/8e0478dd-bcb5-44de-ba07-192900da9b39/ingredientes/","name":"Obtener Ingredientes de una Compra","description":"","method":"GET","body":{"mimeType":"application/json","text":""},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json","id":"pair_f2e71cc25e3441ad8263f4aa19210d49"}],"authentication":{"type":"oauth2","grantType":"authorization_code","authorizationUrl":"{{ _.auth0.auth_url }}","accessTokenUrl":"{{ _.auth0.token_url }}","clientId":"{{ _.auth0.client_id }}","clientSecret":"{{ _.auth0.client_secret }}","usePkce":true,"redirectUrl":"{{ _.auth0.redirect_uri }}","audience":"{{ _.auth0.audience }}"},"metaSortKey":-1619205371084.1133,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"fld_88d689859b344f509123d26cc974b0ae","parentId":"fld_0a9ed678fa094bd7b774849c821879b6","modified":1626247629042,"created":1626247629042,"name":"Ingredientes","description":"","environment":{},"environmentPropertyOrder":null,"metaSortKey":-1626247629042,"_type":"request_group"},{"_id":"fld_0a9ed678fa094bd7b774849c821879b6","parentId":"wrk_07f30ee2dcc148b1a0d91f1c2f4debec","modified":1626211713019,"created":1626211713019,"name":"Compras","description":"","environment":{},"environmentPropertyOrder":null,"metaSortKey":-1620581532435.5625,"_type":"request_group"},{"_id":"req_80cf6fa92d854cf7b5328a7cd60481ff","parentId":"fld_88d689859b344f509123d26cc974b0ae","modified":1626249183718,"created":1626236732246,"url":"{{ _.base_url }}/restaurantes/136be61f-201b-4dac-a9b1-72a57c5093b6/compras/8e0478dd-bcb5-44de-ba07-192900da9b39/ingredientes/57d24511-f650-4ee9-94fc-7d0e4ac7eb3c","name":"Agregar Ingrediente a Compra","description":"","method":"POST","body":{"mimeType":"application/json","text":"{\n\t\t\"unidades\": 10,\n\t\t\"monto_unitario\": 1000\n}"},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json","id":"pair_f2e71cc25e3441ad8263f4aa19210d49"}],"authentication":{"type":"oauth2","grantType":"authorization_code","authorizationUrl":"{{ _.auth0.auth_url }}","accessTokenUrl":"{{ _.auth0.token_url }}","clientId":"{{ _.auth0.client_id }}","clientSecret":"{{ _.auth0.client_secret }}","usePkce":true,"redirectUrl":"{{ _.auth0.redirect_uri }}","audience":"{{ _.auth0.audience }}"},"metaSortKey":-1619205371034.1133,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_5cc8ab05fd7248618f04be6f1da86bbf","parentId":"fld_88d689859b344f509123d26cc974b0ae","modified":1626249312535,"created":1626241676244,"url":"{{ _.base_url }}/restaurantes/136be61f-201b-4dac-a9b1-72a57c5093b6/compras/8e0478dd-bcb5-44de-ba07-192900da9b39/ingredientes/57d24511-f650-4ee9-94fc-7d0e4ac7eb3c","name":"Eliminar Ingrediente de la Compra","description":"","method":"DELETE","body":{"mimeType":"application/json","text":""},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json","id":"pair_f2e71cc25e3441ad8263f4aa19210d49"}],"authentication":{"type":"oauth2","grantType":"authorization_code","authorizationUrl":"{{ _.auth0.auth_url }}","accessTokenUrl":"{{ _.auth0.token_url }}","clientId":"{{ _.auth0.client_id }}","clientSecret":"{{ _.auth0.client_secret }}","usePkce":true,"redirectUrl":"{{ _.auth0.redirect_uri }}","audience":"{{ _.auth0.audience }}"},"metaSortKey":-1619205370984.1133,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_b55b6aae8ebf4c62b409c07f500c5cf1","parentId":"fld_9d6ddb51917a46b5a83bd422b81f93a6","modified":1626247656775,"created":1626247172380,"url":"{{ _.base_url }}/restaurantes/136be61f-201b-4dac-a9b1-72a57c5093b6/compras/414b4015-82ba-412a-b6df-8bcc6297e466/factura","name":"Get Factura de la Compra","description":"","method":"GET","body":{"mimeType":"application/json","text":""},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json","id":"pair_c63e1c8d995743c5b88893fddd240780"}],"authentication":{"type":"oauth2","grantType":"authorization_code","authorizationUrl":"{{ _.auth0.auth_url }}","accessTokenUrl":"{{ _.auth0.token_url }}","clientId":"{{ _.auth0.client_id }}","clientSecret":"{{ _.auth0.client_secret }}","usePkce":true,"redirectUrl":"{{ _.auth0.redirect_uri }}","audience":"{{ _.auth0.audience }}"},"metaSortKey":-1619205370997.0547,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"fld_9d6ddb51917a46b5a83bd422b81f93a6","parentId":"fld_0a9ed678fa094bd7b774849c821879b6","modified":1626247624295,"created":1626247624295,"name":"Factura","description":"","environment":{},"environmentPropertyOrder":null,"metaSortKey":-1626247624295,"_type":"request_group"},{"_id":"req_7ca883e73aba43ca8bb80ec7f677dc81","parentId":"fld_9d6ddb51917a46b5a83bd422b81f93a6","modified":1626247652658,"created":1626212064503,"url":"{{ _.base_url }}/restaurantes/136be61f-201b-4dac-a9b1-72a57c5093b6/compras/414b4015-82ba-412a-b6df-8bcc6297e466/factura","name":"Agregar Factura a la Compra","description":"","method":"POST","body":{"mimeType":"application/json","text":"{\n\t\"numero\": \"123\",\n\t\"monto_bruto\": 30000\n}"},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json","id":"pair_c63e1c8d995743c5b88893fddd240780"}],"authentication":{"type":"oauth2","grantType":"authorization_code","authorizationUrl":"{{ _.auth0.auth_url }}","accessTokenUrl":"{{ _.auth0.token_url }}","clientId":"{{ _.auth0.client_id }}","clientSecret":"{{ _.auth0.client_secret }}","usePkce":true,"redirectUrl":"{{ _.auth0.redirect_uri }}","audience":"{{ _.auth0.audience }}"},"metaSortKey":-1619205370947.0547,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_a708b3325af5494abda5b6e4ceaea614","parentId":"fld_9d6ddb51917a46b5a83bd422b81f93a6","modified":1626247657987,"created":1626247527038,"url":"{{ _.base_url }}/restaurantes/136be61f-201b-4dac-a9b1-72a57c5093b6/compras/414b4015-82ba-412a-b6df-8bcc6297e466/factura","name":"Modifica Factura de la Compra","description":"","method":"PUT","body":{"mimeType":"application/json","text":"{\n\t\"numero\": \"123\",\n\t\"monto_bruto\": 30000\n}"},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json","id":"pair_c63e1c8d995743c5b88893fddd240780"}],"authentication":{"type":"oauth2","grantType":"authorization_code","authorizationUrl":"{{ _.auth0.auth_url }}","accessTokenUrl":"{{ _.auth0.token_url }}","clientId":"{{ _.auth0.client_id }}","clientSecret":"{{ _.auth0.client_secret }}","usePkce":true,"redirectUrl":"{{ _.auth0.redirect_uri }}","audience":"{{ _.auth0.audience }}"},"metaSortKey":-1619205370897.0547,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_695676c921a44804b0dd27466cf70442","parentId":"fld_9d6ddb51917a46b5a83bd422b81f93a6","modified":1626247729543,"created":1626212199173,"url":"{{ _.base_url }}/restaurantes/136be61f-201b-4dac-a9b1-72a57c5093b6/compras/414b4015-82ba-412a-b6df-8bcc6297e466/factura","name":"Eliminar Factura de la Compra","description":"","method":"DELETE","body":{"mimeType":"application/json","text":""},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json","id":"pair_c63e1c8d995743c5b88893fddd240780"}],"authentication":{"type":"oauth2","grantType":"authorization_code","authorizationUrl":"{{ _.auth0.auth_url }}","accessTokenUrl":"{{ _.auth0.token_url }}","clientId":"{{ _.auth0.client_id }}","clientSecret":"{{ _.auth0.client_secret }}","usePkce":true,"redirectUrl":"{{ _.auth0.redirect_uri }}","audience":"{{ _.auth0.audience }}"},"metaSortKey":-1619205370847.0547,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_9a8c8298ad0a4cb988fb6764b99a7bb0","parentId":"fld_0a9ed678fa094bd7b774849c821879b6","modified":1626211719950,"created":1626211713073,"url":"{{ _.base_url }}/restaurantes/136be61f-201b-4dac-a9b1-72a57c5093b6/compras","name":"All Compras","description":"","method":"GET","body":{},"parameters":[{"name":"page","value":"1","description":"","id":"pair_7c7c1cb4df8741e2b3af58c7928cd1d3","disabled":true},{"name":"per_page","value":"1","description":"","id":"pair_3a162ce44cc94062a9d1afbcab2cfc7c","disabled":true}],"headers":[],"authentication":{"type":"oauth2","grantType":"authorization_code","authorizationUrl":"{{ _.auth0.auth_url }}","accessTokenUrl":"{{ _.auth0.token_url }}","clientId":"{{ _.auth0.client_id }}","clientSecret":"{{ _.auth0.client_secret }}","usePkce":true,"redirectUrl":"{{ _.auth0.redirect_uri }}","audience":"{{ _.auth0.audience }}"},"metaSortKey":-1619205371046.375,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_63e88680219f4ea791f39d19a1d1045c","parentId":"fld_0a9ed678fa094bd7b774849c821879b6","modified":1626242420375,"created":1626211713076,"url":"{{ _.base_url }}/restaurantes/136be61f-201b-4dac-a9b1-72a57c5093b6/compras","name":"Create Compra","description":"","method":"POST","body":{"mimeType":"application/json","text":"{\n\t\"fecha_compra\": \"2021-07-13\",\n\t\"proveedor_id\": \"82ba44b3-30c8-4741-be69-8b276425fb20\",\n\t\"en_arqueo\": true\n}"},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json","id":"pair_f2e71cc25e3441ad8263f4aa19210d49"}],"authentication":{"type":"oauth2","grantType":"authorization_code","authorizationUrl":"{{ _.auth0.auth_url }}","accessTokenUrl":"{{ _.auth0.token_url }}","clientId":"{{ _.auth0.client_id }}","clientSecret":"{{ _.auth0.client_secret }}","usePkce":true,"redirectUrl":"{{ _.auth0.redirect_uri }}","audience":"{{ _.auth0.audience }}"},"metaSortKey":-1619205371033.875,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_70e39c2218e64f478b1106d55943595f","parentId":"fld_0a9ed678fa094bd7b774849c821879b6","modified":1626247704497,"created":1626211713055,"url":"{{ _.base_url }}/restaurantes/136be61f-201b-4dac-a9b1-72a57c5093b6/compras/414b4015-82ba-412a-b6df-8bcc6297e466","name":"Get Compra","description":"","method":"GET","body":{},"parameters":[],"headers":[],"authentication":{"type":"oauth2","grantType":"authorization_code","authorizationUrl":"{{ _.auth0.auth_url }}","accessTokenUrl":"{{ _.auth0.token_url }}","clientId":"{{ _.auth0.client_id }}","clientSecret":"{{ _.auth0.client_secret }}","usePkce":true,"redirectUrl":"{{ _.auth0.redirect_uri }}","audience":"{{ _.auth0.audience }}"},"metaSortKey":-1619205371031.5312,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_36d69111460e4d559288f9f46d3c79d2","parentId":"fld_0a9ed678fa094bd7b774849c821879b6","modified":1626247237125,"created":1626242429329,"url":"{{ _.base_url }}/restaurantes/136be61f-201b-4dac-a9b1-72a57c5093b6/compras/414b4015-82ba-412a-b6df-8bcc6297e466","name":"Update Compra","description":"","method":"PUT","body":{"mimeType":"application/json","text":"{\n\t\"fecha_compra\": \"2021-07-12\",\n\t\"proveedor_id\": \"82ba44b3-30c8-4741-be69-8b276425fb20\",\n\t\"en_arqueo\": true\n}"},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json","id":"pair_f2e71cc25e3441ad8263f4aa19210d49"}],"authentication":{"type":"oauth2","grantType":"authorization_code","authorizationUrl":"{{ _.auth0.auth_url }}","accessTokenUrl":"{{ _.auth0.token_url }}","clientId":"{{ _.auth0.client_id }}","clientSecret":"{{ _.auth0.client_secret }}","usePkce":true,"redirectUrl":"{{ _.auth0.redirect_uri }}","audience":"{{ _.auth0.audience }}"},"metaSortKey":-1619205371029.1875,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_a74fd640fef04df98db152cee4f31a0f","parentId":"fld_0a9ed678fa094bd7b774849c821879b6","modified":1626243688330,"created":1626211713080,"url":"{{ _.base_url }}/restaurantes/136be61f-201b-4dac-a9b1-72a57c5093b6/compras/e1d64b89-da34-450a-82c6-0b006c2de1bf","name":"Delete Compra","description":"","method":"DELETE","body":{"mimeType":"application/json","text":""},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json","id":"pair_f2e71cc25e3441ad8263f4aa19210d49"}],"authentication":{"type":"oauth2","grantType":"authorization_code","authorizationUrl":"{{ _.auth0.auth_url }}","accessTokenUrl":"{{ _.auth0.token_url }}","clientId":"{{ _.auth0.client_id }}","clientSecret":"{{ _.auth0.client_secret }}","usePkce":true,"redirectUrl":"{{ _.auth0.redirect_uri }}","audience":"{{ _.auth0.audience }}"},"metaSortKey":-1619205370723.2812,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_a8c7a0d43bb0446d87f9dc7dbe6d4efe","parentId":"fld_ad3bae5495484a6e8a6fca2ca5f44ae5","modified":1626124843232,"created":1626124814155,"url":"{{ _.base_url }}/restaurantes/136be61f-201b-4dac-a9b1-72a57c5093b6/ingredientes","name":"All Ingredientes","description":"","method":"GET","body":{},"parameters":[{"name":"page","value":"1","description":"","id":"pair_7c7c1cb4df8741e2b3af58c7928cd1d3","disabled":true},{"name":"per_page","value":"1","description":"","id":"pair_3a162ce44cc94062a9d1afbcab2cfc7c","disabled":true}],"headers":[],"authentication":{"type":"oauth2","grantType":"authorization_code","authorizationUrl":"{{ _.auth0.auth_url }}","accessTokenUrl":"{{ _.auth0.token_url }}","clientId":"{{ _.auth0.client_id }}","clientSecret":"{{ _.auth0.client_secret }}","usePkce":true,"redirectUrl":"{{ _.auth0.redirect_uri }}","audience":"{{ _.auth0.audience }}"},"metaSortKey":-1619205371046.375,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"fld_ad3bae5495484a6e8a6fca2ca5f44ae5","parentId":"wrk_07f30ee2dcc148b1a0d91f1c2f4debec","modified":1626124814142,"created":1626124814142,"name":"Ingredientes","description":"","environment":{},"environmentPropertyOrder":null,"metaSortKey":-1620527706494.375,"_type":"request_group"},{"_id":"req_7d96db0b5d7c493d92d288354e78e853","parentId":"fld_ad3bae5495484a6e8a6fca2ca5f44ae5","modified":1626211929562,"created":1626124814157,"url":"{{ _.base_url }}/restaurantes/136be61f-201b-4dac-a9b1-72a57c5093b6/ingredientes","name":"Create Ingrediente","description":"","method":"POST","body":{"mimeType":"application/json","text":"{\n\t\"nombre\": \"Coca-Cola Individual\",\n\t\"medida\": \"Unidad\"\n}"},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json","id":"pair_f2e71cc25e3441ad8263f4aa19210d49"}],"authentication":{"type":"oauth2","grantType":"authorization_code","authorizationUrl":"{{ _.auth0.auth_url }}","accessTokenUrl":"{{ _.auth0.token_url }}","clientId":"{{ _.auth0.client_id }}","clientSecret":"{{ _.auth0.client_secret }}","usePkce":true,"redirectUrl":"{{ _.auth0.redirect_uri }}","audience":"{{ _.auth0.audience }}"},"metaSortKey":-1619205371033.875,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_edaa9062ac0d47c19b1a055919317013","parentId":"fld_ad3bae5495484a6e8a6fca2ca5f44ae5","modified":1626125057303,"created":1626124814150,"url":"{{ _.base_url }}/restaurantes/136be61f-201b-4dac-a9b1-72a57c5093b6/ingredientes/a0966248-c47b-4015-879a-d0f15a8469a8","name":"Get Ingrediente","description":"","method":"GET","body":{},"parameters":[],"headers":[],"authentication":{"type":"oauth2","grantType":"authorization_code","authorizationUrl":"{{ _.auth0.auth_url }}","accessTokenUrl":"{{ _.auth0.token_url }}","clientId":"{{ _.auth0.client_id }}","clientSecret":"{{ _.auth0.client_secret }}","usePkce":true,"redirectUrl":"{{ _.auth0.redirect_uri }}","audience":"{{ _.auth0.audience }}"},"metaSortKey":-1619205371021.375,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_64c4691a9f58457b813f9a47d7f008d1","parentId":"fld_ad3bae5495484a6e8a6fca2ca5f44ae5","modified":1626125063158,"created":1626124814158,"url":"{{ _.base_url }}/restaurantes/136be61f-201b-4dac-a9b1-72a57c5093b6/ingredientes/a0966248-c47b-4015-879a-d0f15a8469a8","name":"Update Ingrediente","description":"","method":"PUT","body":{"mimeType":"application/json","text":"{\n\t\"nombre\": \"Papas KG\",\n\t\"medida\": \"KG\"\n}"},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json","id":"pair_f2e71cc25e3441ad8263f4aa19210d49"}],"authentication":{"type":"oauth2","grantType":"authorization_code","authorizationUrl":"{{ _.auth0.auth_url }}","accessTokenUrl":"{{ _.auth0.token_url }}","clientId":"{{ _.auth0.client_id }}","clientSecret":"{{ _.auth0.client_secret }}","usePkce":true,"redirectUrl":"{{ _.auth0.redirect_uri }}","audience":"{{ _.auth0.audience }}"},"metaSortKey":-1619205370814.3125,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_ec6bcddd7d704662b9a2e78df8dfa947","parentId":"fld_ad3bae5495484a6e8a6fca2ca5f44ae5","modified":1626125069196,"created":1626124814159,"url":"{{ _.base_url }}/restaurantes/136be61f-201b-4dac-a9b1-72a57c5093b6/ingredientes/a0966248-c47b-4015-879a-d0f15a8469a8","name":"Delete Ingrediente","description":"","method":"DELETE","body":{"mimeType":"application/json","text":""},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json","id":"pair_f2e71cc25e3441ad8263f4aa19210d49"}],"authentication":{"type":"oauth2","grantType":"authorization_code","authorizationUrl":"{{ _.auth0.auth_url }}","accessTokenUrl":"{{ _.auth0.token_url }}","clientId":"{{ _.auth0.client_id }}","clientSecret":"{{ _.auth0.client_secret }}","usePkce":true,"redirectUrl":"{{ _.auth0.redirect_uri }}","audience":"{{ _.auth0.audience }}"},"metaSortKey":-1619205370723.2812,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_775da3ed6c3d47e095f52795258bc325","parentId":"fld_9c294c575c3a49c99209ed0e3a79f446","modified":1626126513401,"created":1626126501639,"url":"{{ _.base_url }}/restaurantes/136be61f-201b-4dac-a9b1-72a57c5093b6/productos","name":"All Productos","description":"","method":"GET","body":{},"parameters":[{"name":"page","value":"1","description":"","id":"pair_7c7c1cb4df8741e2b3af58c7928cd1d3","disabled":true},{"name":"per_page","value":"1","description":"","id":"pair_3a162ce44cc94062a9d1afbcab2cfc7c","disabled":true}],"headers":[],"authentication":{"type":"oauth2","grantType":"authorization_code","authorizationUrl":"{{ _.auth0.auth_url }}","accessTokenUrl":"{{ _.auth0.token_url }}","clientId":"{{ _.auth0.client_id }}","clientSecret":"{{ _.auth0.client_secret }}","usePkce":true,"redirectUrl":"{{ _.auth0.redirect_uri }}","audience":"{{ _.auth0.audience }}"},"metaSortKey":-1619205371046.375,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"fld_9c294c575c3a49c99209ed0e3a79f446","parentId":"wrk_07f30ee2dcc148b1a0d91f1c2f4debec","modified":1626126501614,"created":1626126501614,"name":"Productos","description":"","environment":{},"environmentPropertyOrder":null,"metaSortKey":-1620473880553.1875,"_type":"request_group"},{"_id":"req_54da0f449ab844a1b5edb36476caf0aa","parentId":"fld_9c294c575c3a49c99209ed0e3a79f446","modified":1626126625611,"created":1626126501641,"url":"{{ _.base_url }}/restaurantes/136be61f-201b-4dac-a9b1-72a57c5093b6/productos","name":"Create Producto","description":"","method":"POST","body":{"mimeType":"application/json","text":"{\n\t\"nombre\": \"Papas Fritas\",\n\t\"precio_venta\": 3000,\n\t\"categoria_id\": \"f6e300a1-484c-4878-b575-24d90997d1c6\",\n\t\"zona_produccion_id\": \"a72866a3-4bd6-44a3-a49d-7921ffe0dc67\"\n}"},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json","id":"pair_f2e71cc25e3441ad8263f4aa19210d49"}],"authentication":{"type":"oauth2","grantType":"authorization_code","authorizationUrl":"{{ _.auth0.auth_url }}","accessTokenUrl":"{{ _.auth0.token_url }}","clientId":"{{ _.auth0.client_id }}","clientSecret":"{{ _.auth0.client_secret }}","usePkce":true,"redirectUrl":"{{ _.auth0.redirect_uri }}","audience":"{{ _.auth0.audience }}"},"metaSortKey":-1619205371033.875,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_959e2a6bd01e4eb9b9a33d1b71cfddeb","parentId":"fld_9c294c575c3a49c99209ed0e3a79f446","modified":1626127020382,"created":1626126501629,"url":"{{ _.base_url }}/restaurantes/136be61f-201b-4dac-a9b1-72a57c5093b6/productos/88f4a4e5-fe06-4e50-89f7-9558699fef9f","name":"Get Producto","description":"","method":"GET","body":{},"parameters":[],"headers":[],"authentication":{"type":"oauth2","grantType":"authorization_code","authorizationUrl":"{{ _.auth0.auth_url }}","accessTokenUrl":"{{ _.auth0.token_url }}","clientId":"{{ _.auth0.client_id }}","clientSecret":"{{ _.auth0.client_secret }}","usePkce":true,"redirectUrl":"{{ _.auth0.redirect_uri }}","audience":"{{ _.auth0.audience }}"},"metaSortKey":-1619205371021.375,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_592c888b407645f88434f10dcbb3b216","parentId":"fld_9c294c575c3a49c99209ed0e3a79f446","modified":1626127072504,"created":1626126501643,"url":"{{ _.base_url }}/restaurantes/136be61f-201b-4dac-a9b1-72a57c5093b6/productos/88f4a4e5-fe06-4e50-89f7-9558699fef9f","name":"Update Producto","description":"","method":"PUT","body":{"mimeType":"application/json","text":"{\n\t\"nombre\": \"Papas Fritas\",\n\t\"precio_venta\": 5000,\n\t\"categoria_id\": \"f6e300a1-484c-4878-b575-24d90997d1c6\",\n\t\"zona_produccion_id\": \"a72866a3-4bd6-44a3-a49d-7921ffe0dc67\"\n}"},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json","id":"pair_f2e71cc25e3441ad8263f4aa19210d49"}],"authentication":{"type":"oauth2","grantType":"authorization_code","authorizationUrl":"{{ _.auth0.auth_url }}","accessTokenUrl":"{{ _.auth0.token_url }}","clientId":"{{ _.auth0.client_id }}","clientSecret":"{{ _.auth0.client_secret }}","usePkce":true,"redirectUrl":"{{ _.auth0.redirect_uri }}","audience":"{{ _.auth0.audience }}"},"metaSortKey":-1619205370814.3125,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_fe735132f5414c1798117bb3f70ee2ed","parentId":"fld_9c294c575c3a49c99209ed0e3a79f446","modified":1626127092082,"created":1626126501645,"url":"{{ _.base_url }}/restaurantes/136be61f-201b-4dac-a9b1-72a57c5093b6/productos/88f4a4e5-fe06-4e50-89f7-9558699fef9f","name":"Delete Producto","description":"","method":"DELETE","body":{"mimeType":"application/json","text":""},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json","id":"pair_f2e71cc25e3441ad8263f4aa19210d49"}],"authentication":{"type":"oauth2","grantType":"authorization_code","authorizationUrl":"{{ _.auth0.auth_url }}","accessTokenUrl":"{{ _.auth0.token_url }}","clientId":"{{ _.auth0.client_id }}","clientSecret":"{{ _.auth0.client_secret }}","usePkce":true,"redirectUrl":"{{ _.auth0.redirect_uri }}","audience":"{{ _.auth0.audience }}"},"metaSortKey":-1619205370723.2812,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_d845d0f1057a44ebbc5b0208a6f95821","parentId":"fld_18767c6268c04ea08f2602b34108061d","modified":1626130053216,"created":1626129963655,"url":"{{ _.base_url }}/restaurantes/136be61f-201b-4dac-a9b1-72a57c5093b6/productos/8de8e1b0-4300-4ad1-afcb-ed18c6e4a157/ingredientes","name":"Receta de un producto","description":"","method":"GET","body":{},"parameters":[{"name":"page","value":"1","description":"","id":"pair_7c7c1cb4df8741e2b3af58c7928cd1d3","disabled":true},{"name":"per_page","value":"1","description":"","id":"pair_3a162ce44cc94062a9d1afbcab2cfc7c","disabled":true}],"headers":[],"authentication":{"type":"oauth2","grantType":"authorization_code","authorizationUrl":"{{ _.auth0.auth_url }}","accessTokenUrl":"{{ _.auth0.token_url }}","clientId":"{{ _.auth0.client_id }}","clientSecret":"{{ _.auth0.client_secret }}","usePkce":true,"redirectUrl":"{{ _.auth0.redirect_uri }}","audience":"{{ _.auth0.audience }}"},"metaSortKey":-1619205371046.375,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"fld_18767c6268c04ea08f2602b34108061d","parentId":"wrk_07f30ee2dcc148b1a0d91f1c2f4debec","modified":1626129963625,"created":1626129963625,"name":"Recetas","description":"","environment":{},"environmentPropertyOrder":null,"metaSortKey":-1620446967582.5938,"_type":"request_group"},{"_id":"req_ee66cf0c37874b299aa3ffb2914512f4","parentId":"fld_18767c6268c04ea08f2602b34108061d","modified":1626130196614,"created":1626129963642,"url":"{{ _.base_url }}/restaurantes/136be61f-201b-4dac-a9b1-72a57c5093b6/productos/8de8e1b0-4300-4ad1-afcb-ed18c6e4a157/ingredientes/4aa5e656-4b4e-4770-94b6-cafdfb3ad279","name":"Detalle de un ingrediente de la receta de un producto","description":"","method":"GET","body":{},"parameters":[],"headers":[],"authentication":{"type":"oauth2","grantType":"authorization_code","authorizationUrl":"{{ _.auth0.auth_url }}","accessTokenUrl":"{{ _.auth0.token_url }}","clientId":"{{ _.auth0.client_id }}","clientSecret":"{{ _.auth0.client_secret }}","usePkce":true,"redirectUrl":"{{ _.auth0.redirect_uri }}","audience":"{{ _.auth0.audience }}"},"metaSortKey":-1619205371021.375,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_61c5fcb5950548efa25735a7a05f42d2","parentId":"fld_18767c6268c04ea08f2602b34108061d","modified":1626130734000,"created":1626129963658,"url":"{{ _.base_url }}/restaurantes/136be61f-201b-4dac-a9b1-72a57c5093b6/productos/8de8e1b0-4300-4ad1-afcb-ed18c6e4a157/ingredientes/4aa5e656-4b4e-4770-94b6-cafdfb3ad279","name":"Agregar ingrediente a la receta de un producto","description":"","method":"POST","body":{"mimeType":"application/json","text":"{\n\t\"unidades\": 0.25\n}"},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json","id":"pair_f2e71cc25e3441ad8263f4aa19210d49"}],"authentication":{"type":"oauth2","grantType":"authorization_code","authorizationUrl":"{{ _.auth0.auth_url }}","accessTokenUrl":"{{ _.auth0.token_url }}","clientId":"{{ _.auth0.client_id }}","clientSecret":"{{ _.auth0.client_secret }}","usePkce":true,"redirectUrl":"{{ _.auth0.redirect_uri }}","audience":"{{ _.auth0.audience }}"},"metaSortKey":-1619205370917.8438,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_680247f64a644c5193aa5b3c11828d26","parentId":"fld_18767c6268c04ea08f2602b34108061d","modified":1626130956531,"created":1626129963660,"url":"{{ _.base_url }}/restaurantes/136be61f-201b-4dac-a9b1-72a57c5093b6/productos/8de8e1b0-4300-4ad1-afcb-ed18c6e4a157/ingredientes/4aa5e656-4b4e-4770-94b6-cafdfb3ad279","name":"Modificar ingrediente de la receta de un producto","description":"","method":"PUT","body":{"mimeType":"application/json","text":"{\n\t\"unidades\": 0.2\n}"},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json","id":"pair_f2e71cc25e3441ad8263f4aa19210d49"}],"authentication":{"type":"oauth2","grantType":"authorization_code","authorizationUrl":"{{ _.auth0.auth_url }}","accessTokenUrl":"{{ _.auth0.token_url }}","clientId":"{{ _.auth0.client_id }}","clientSecret":"{{ _.auth0.client_secret }}","usePkce":true,"redirectUrl":"{{ _.auth0.redirect_uri }}","audience":"{{ _.auth0.audience }}"},"metaSortKey":-1619205370814.3125,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_e130807eb74849c09af4259fb4e37bc6","parentId":"fld_18767c6268c04ea08f2602b34108061d","modified":1626131314411,"created":1626129963663,"url":"{{ _.base_url }}/restaurantes/136be61f-201b-4dac-a9b1-72a57c5093b6/productos/8de8e1b0-4300-4ad1-afcb-ed18c6e4a157/ingredientes/4aa5e656-4b4e-4770-94b6-cafdfb3ad279","name":"Eliminar ingrediente de la receta de un producto","description":"","method":"DELETE","body":{"mimeType":"application/json","text":""},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json","id":"pair_f2e71cc25e3441ad8263f4aa19210d49"}],"authentication":{"type":"oauth2","grantType":"authorization_code","authorizationUrl":"{{ _.auth0.auth_url }}","accessTokenUrl":"{{ _.auth0.token_url }}","clientId":"{{ _.auth0.client_id }}","clientSecret":"{{ _.auth0.client_secret }}","usePkce":true,"redirectUrl":"{{ _.auth0.redirect_uri }}","audience":"{{ _.auth0.audience }}"},"metaSortKey":-1619205370723.2812,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_296d76bfd9a24a0dbf7055469538c756","parentId":"fld_bacd2b299b584c69b809f651b2cdbc01","modified":1625842101868,"created":1619205352864,"url":"{{ _.base_url }}/users","name":"All Users","description":"Help\n","method":"GET","body":{},"parameters":[{"name":"page","value":"1","description":"","id":"pair_7c7c1cb4df8741e2b3af58c7928cd1d3","disabled":true},{"name":"per_page","value":"1","description":"","id":"pair_3a162ce44cc94062a9d1afbcab2cfc7c","disabled":true}],"headers":[],"authentication":{"type":"oauth2","grantType":"authorization_code","authorizationUrl":"{{ _.auth0.auth_url }}","accessTokenUrl":"{{ _.auth0.token_url }}","clientId":"{{ _.auth0.client_id }}","clientSecret":"{{ _.auth0.client_secret }}","usePkce":true,"redirectUrl":"{{ _.auth0.redirect_uri }}","audience":"{{ _.auth0.audience }}"},"metaSortKey":-1619205371460.5,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"fld_bacd2b299b584c69b809f651b2cdbc01","parentId":"wrk_07f30ee2dcc148b1a0d91f1c2f4debec","modified":1620704135170,"created":1619205340049,"name":"Users","description":"","environment":{},"environmentPropertyOrder":null,"metaSortKey":-1619205340049,"_type":"request_group"},{"_id":"req_4bfe2481b06b4b3fbcfa14ca95d5c3e5","parentId":"fld_bacd2b299b584c69b809f651b2cdbc01","modified":1626210854823,"created":1619205365462,"url":"{{ _.base_url }}/users","name":"Create User","description":"","method":"POST","body":{"mimeType":"application/json","text":"{\n\t\"nombre\": \"John Doe\",\n\t\"email\": \"john.doe@gmail.com\",\n\t\"username\": \"johndoe\",\n\t\"password\": \"superPasswordWith123NumbersAnd----Symbols\",\n\t\"roles\": [\n\t\t\"admin\", \"recaudador\"\n\t],\n\t\"restaurant\": \"136be61f-201b-4dac-a9b1-72a57c5093b6\"\n}"},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json","id":"pair_8ea173f0c52d4742826111cb99fa8084"}],"authentication":{"type":"oauth2","grantType":"authorization_code","authorizationUrl":"{{ _.auth0.auth_url }}","accessTokenUrl":"{{ _.auth0.token_url }}","clientId":"{{ _.auth0.client_id }}","clientSecret":"{{ _.auth0.client_secret }}","usePkce":true,"redirectUrl":"{{ _.auth0.redirect_uri }}","audience":"{{ _.auth0.audience }}"},"metaSortKey":-1619205371046.375,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_14439e12fd6944fb923d7975f5dcae18","parentId":"fld_bacd2b299b584c69b809f651b2cdbc01","modified":1625841124601,"created":1619205346326,"url":"{{ _.base_url }}/users/0d383e70-0439-4fd6-b7f5-1ae4f8641675","name":"Get User with ID","description":"","method":"GET","body":{},"parameters":[{"name":"","value":"","description":"","id":"pair_a302e60ffd554de79a73d89d19d16901"}],"headers":[],"authentication":{"type":"oauth2","grantType":"authorization_code","authorizationUrl":"{{ _.auth0.auth_url }}","accessTokenUrl":"{{ _.auth0.token_url }}","clientId":"{{ _.auth0.client_id }}","clientSecret":"{{ _.auth0.client_secret }}","usePkce":true,"redirectUrl":"{{ _.auth0.redirect_uri }}","audience":"{{ _.auth0.audience }}"},"metaSortKey":-1619205370632.25,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_f546af49097049ec85e4ecf8a10a5e24","parentId":"fld_bacd2b299b584c69b809f651b2cdbc01","modified":1626159142647,"created":1623863254779,"url":"{{ _.base_url }}/users/auth0%7C6083af726b4de900695cb232","name":"Get User with Auth0 ID","description":"","method":"GET","body":{},"parameters":[],"headers":[],"authentication":{"type":"oauth2","grantType":"authorization_code","authorizationUrl":"{{ _.auth0.auth_url }}","accessTokenUrl":"{{ _.auth0.token_url }}","clientId":"{{ _.auth0.client_id }}","clientSecret":"{{ _.auth0.client_secret }}","usePkce":true,"redirectUrl":"{{ _.auth0.redirect_uri }}","audience":"{{ _.auth0.audience }}"},"metaSortKey":-1619205370218.125,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_5f16a64979e94ec78eb1c38b53f959ee","parentId":"fld_bacd2b299b584c69b809f651b2cdbc01","modified":1625841423375,"created":1619205368160,"url":"{{ _.base_url }}/users/fe7029b4-df0e-4755-8197-81a64f20745a","name":"Update User","description":"","method":"PUT","body":{"mimeType":"application/json","text":"{\n\t\"nombre\": \"Jhon 2\",\n\t\"roles\": [\n\t\t\"admin\"\n\t]\n}"},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json","id":"pair_6ffcb9f5a8f44f058886f0993c64d3d2"}],"authentication":{"type":"oauth2","grantType":"authorization_code","authorizationUrl":"{{ _.auth0.auth_url }}","accessTokenUrl":"{{ _.auth0.token_url }}","clientId":"{{ _.auth0.client_id }}","clientSecret":"{{ _.auth0.client_secret }}","usePkce":true,"redirectUrl":"{{ _.auth0.redirect_uri }}","audience":"{{ _.auth0.audience }}"},"metaSortKey":-1619205368160,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_e3fd5e0a4fee438a91c6bcb1ed1b5a59","parentId":"fld_bacd2b299b584c69b809f651b2cdbc01","modified":1626210867394,"created":1626210269921,"url":"{{ _.base_url }}/users/77cc11f1-54a1-4938-8714-4592f75ea069/restaurantes/","name":"Get Restaurantes","description":"","method":"GET","body":{"mimeType":"application/json","text":""},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json","id":"pair_a8d5b644cb2043a1ac1251e84af3b30f"}],"authentication":{"type":"oauth2","grantType":"authorization_code","authorizationUrl":"{{ _.auth0.auth_url }}","accessTokenUrl":"{{ _.auth0.token_url }}","clientId":"{{ _.auth0.client_id }}","clientSecret":"{{ _.auth0.client_secret }}","usePkce":true,"redirectUrl":"{{ _.auth0.redirect_uri }}","audience":"{{ _.auth0.audience }}"},"metaSortKey":-1619205367473,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_877481c68c224e979fd8f800380fc8ee","parentId":"fld_bacd2b299b584c69b809f651b2cdbc01","modified":1625842051539,"created":1619836477096,"url":"{{ _.base_url }}/users/fe7029b4-df0e-4755-8197-81a64f20745a/restaurantes/0f8618c5-3b18-4006-9697-d796921113cf","name":"Add to Restaurant","description":"","method":"PUT","body":{"mimeType":"application/json","text":""},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json","id":"pair_a8d5b644cb2043a1ac1251e84af3b30f"}],"authentication":{"type":"oauth2","grantType":"authorization_code","authorizationUrl":"{{ _.auth0.auth_url }}","accessTokenUrl":"{{ _.auth0.token_url }}","clientId":"{{ _.auth0.client_id }}","clientSecret":"{{ _.auth0.client_secret }}","usePkce":true,"redirectUrl":"{{ _.auth0.redirect_uri }}","audience":"{{ _.auth0.audience }}"},"metaSortKey":-1619205366786,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_60aa45de070547bc8ead62e75850a6f0","parentId":"fld_bacd2b299b584c69b809f651b2cdbc01","modified":1625842073383,"created":1619836996180,"url":"{{ _.base_url }}/users/fe7029b4-df0e-4755-8197-81a64f20745a/restaurantes/0f8618c5-3b18-4006-9697-d796921113cf","name":"Remove from Restaurant","description":"","method":"DELETE","body":{"mimeType":"application/json","text":""},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json","id":"pair_a8d5b644cb2043a1ac1251e84af3b30f"}],"authentication":{"type":"oauth2","grantType":"authorization_code","authorizationUrl":"{{ _.auth0.auth_url }}","accessTokenUrl":"{{ _.auth0.token_url }}","clientId":"{{ _.auth0.client_id }}","clientSecret":"{{ _.auth0.client_secret }}","usePkce":true,"redirectUrl":"{{ _.auth0.redirect_uri }}","audience":"{{ _.auth0.audience }}"},"metaSortKey":-1619205366099,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_9e4450009771406cae96fa403a140b4f","parentId":"fld_bacd2b299b584c69b809f651b2cdbc01","modified":1625842075731,"created":1619205371423,"url":"{{ _.base_url }}/users/fe7029b4-df0e-4755-8197-81a64f20745a","name":"Delete User","description":"","method":"DELETE","body":{},"parameters":[],"headers":[],"authentication":{"type":"oauth2","grantType":"authorization_code","authorizationUrl":"{{ _.auth0.auth_url }}","accessTokenUrl":"{{ _.auth0.token_url }}","clientId":"{{ _.auth0.client_id }}","clientSecret":"{{ _.auth0.client_secret }}","usePkce":true,"redirectUrl":"{{ _.auth0.redirect_uri }}","audience":"{{ _.auth0.audience }}"},"metaSortKey":-1619205365412,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_bb53e00d3f254f7fbfe78317fe1968a2","parentId":"fld_041ef290a606475f947ba2a22fd25d17","modified":1625806811290,"created":1619994417387,"url":"{{ _.base_url }}/restaurantes","name":"All Restaurantes","description":"","method":"GET","body":{},"parameters":[],"headers":[],"authentication":{"type":"oauth2","grantType":"authorization_code","authorizationUrl":"{{ _.auth0.auth_url }}","accessTokenUrl":"{{ _.auth0.token_url }}","clientId":"{{ _.auth0.client_id }}","clientSecret":"{{ _.auth0.client_secret }}","usePkce":true,"redirectUrl":"{{ _.auth0.redirect_uri }}","audience":"{{ _.auth0.audience }}"},"metaSortKey":-1619994417387,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"fld_041ef290a606475f947ba2a22fd25d17","parentId":"wrk_07f30ee2dcc148b1a0d91f1c2f4debec","modified":1619994390433,"created":1619994385631,"name":"Restaurantes","description":"","environment":{},"environmentPropertyOrder":null,"metaSortKey":-1619018897351,"_type":"request_group"},{"_id":"req_30a4713329224d009e8ef839f14eb866","parentId":"fld_041ef290a606475f947ba2a22fd25d17","modified":1626124247053,"created":1619995171350,"url":"{{ _.base_url }}/restaurantes","name":"Create Restaurante","description":"","method":"POST","body":{"mimeType":"application/json","text":"{\n\t\"nombre\": \"Todo Rico Restaurant: Mackena\"\n}"},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json","id":"pair_a52630b25bdf4f8a847aac849df9c1e4"}],"authentication":{"type":"oauth2","grantType":"authorization_code","authorizationUrl":"{{ _.auth0.auth_url }}","accessTokenUrl":"{{ _.auth0.token_url }}","clientId":"{{ _.auth0.client_id }}","clientSecret":"{{ _.auth0.client_secret }}","usePkce":true,"redirectUrl":"{{ _.auth0.redirect_uri }}","audience":"{{ _.auth0.audience }}"},"metaSortKey":-1619806503594,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_00c1743ddad34dd499f648e2ac3cc162","parentId":"fld_041ef290a606475f947ba2a22fd25d17","modified":1625806831343,"created":1619994603339,"url":"{{ _.base_url }}/restaurantes/510055e0-3cab-429b-b71b-5a943646cec8","name":"Get Restaurante","description":"","method":"GET","body":{},"parameters":[],"headers":[],"authentication":{"type":"oauth2","grantType":"authorization_code","authorizationUrl":"{{ _.auth0.auth_url }}","accessTokenUrl":"{{ _.auth0.token_url }}","clientId":"{{ _.auth0.client_id }}","clientSecret":"{{ _.auth0.client_secret }}","usePkce":true,"redirectUrl":"{{ _.auth0.redirect_uri }}","audience":"{{ _.auth0.audience }}"},"metaSortKey":-1619618589801,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_3af1dfcee02548a7abd53f643a2ca4cc","parentId":"fld_041ef290a606475f947ba2a22fd25d17","modified":1625841257062,"created":1619995589467,"url":"{{ _.base_url }}/restaurantes/612ee91e-97f4-48a3-b9f1-c0cc8b246d30","name":"Update Restaurante","description":"","method":"PUT","body":{"mimeType":"application/json","text":"{\n\t\"nombre\": \"Todo Rico Restaurant 2\"\n}"},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json","id":"pair_a52630b25bdf4f8a847aac849df9c1e4"}],"authentication":{"type":"oauth2","grantType":"authorization_code","authorizationUrl":"{{ _.auth0.auth_url }}","accessTokenUrl":"{{ _.auth0.token_url }}","clientId":"{{ _.auth0.client_id }}","clientSecret":"{{ _.auth0.client_secret }}","usePkce":true,"redirectUrl":"{{ _.auth0.redirect_uri }}","audience":"{{ _.auth0.audience }}"},"metaSortKey":-1619430675983,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_73030c4def144f15b841b1e77143c4dc","parentId":"fld_041ef290a606475f947ba2a22fd25d17","modified":1626101921512,"created":1619995652735,"url":"{{ _.base_url }}/restaurantes/136be61f-201b-4dac-a9b1-72a57c5093b6","name":"Delete Restaurante","description":"","method":"DELETE","body":{"mimeType":"application/json","text":""},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json","id":"pair_a52630b25bdf4f8a847aac849df9c1e4"}],"authentication":{"type":"oauth2","grantType":"authorization_code","authorizationUrl":"{{ _.auth0.auth_url }}","accessTokenUrl":"{{ _.auth0.token_url }}","clientId":"{{ _.auth0.client_id }}","clientSecret":"{{ _.auth0.client_secret }}","redirectUrl":"{{ _.auth0.redirect_uri }}","usePkce":true,"audience":"{{ _.auth0.audience }}"},"metaSortKey":-1619336719099,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_cc4108b17b454daa84c7eb6ecdae401c","parentId":"fld_20211198ef5548e585276a9fc6c2d8c3","modified":1626154249138,"created":1626154236341,"url":"{{ _.base_url }}","name":"Cors","description":"","method":"OPTIONS","body":{},"parameters":[],"headers":[],"authentication":{},"metaSortKey":-1626154236341,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"fld_20211198ef5548e585276a9fc6c2d8c3","parentId":"wrk_07f30ee2dcc148b1a0d91f1c2f4debec","modified":1626154231002,"created":1623862715805,"name":"General","description":"","environment":{},"environmentPropertyOrder":null,"metaSortKey":-1618956749685,"_type":"request_group"},{"_id":"req_f8b303f807b94067abc80abe81c64878","parentId":"fld_20211198ef5548e585276a9fc6c2d8c3","modified":1623880133181,"created":1623862723082,"url":"https://dev-ygnrzo5i.us.auth0.com/oauth/token ","name":"Get Admin Token","description":"","method":"POST","body":{"mimeType":"application/x-www-form-urlencoded","params":[{"name":"grant_type","value":"password","description":"","id":"pair_c202372f578b4c06904ac1543e863807"},{"name":"password","value":"superPasswordWith123NumbersAnd----Symbols","description":"","id":"pair_3375474304ee4e6a99fe025e3f06dd7c"},{"name":"username","value":"john.doe@gmail.com","description":"","id":"pair_fed6ac63d6bd490897339291270f6fd8"},{"name":"audience","value":"https://api.unified.restaurant","description":"","id":"pair_1a9cca2a200d4ac291389b24495359c9"},{"name":"client_id","value":"unlxNoowQTk4V0JAD8Bv3j3kVKq3sdog","description":"","id":"pair_1a66a9e3e9e54ba79ef979a2dd91cb08"},{"name":"client_secret","value":"khvDShr6yHGPCX1p_OpJPeQ1rG5ZGgLJV2ahu-cE0b3pVUn6WS5-9YnQGJfQBKmj","description":"","id":"pair_0cb45df9505d4215b72f95d074d5310c"}]},"parameters":[],"headers":[{"name":"Content-Type","value":"application/x-www-form-urlencoded","id":"pair_ea81b84996b14a3abe99c76551568528"}],"authentication":{},"metaSortKey":-1623862723082,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_b94d4df26c2244299d3a11853f4b7fb0","parentId":"fld_20211198ef5548e585276a9fc6c2d8c3","modified":1625804883460,"created":1623877980738,"url":"https://dev-ygnrzo5i.us.auth0.com/oauth/token ","name":"Get Global Admin Token","description":"","method":"POST","body":{"mimeType":"application/x-www-form-urlencoded","params":[{"name":"grant_type","value":"password","description":"","id":"pair_c202372f578b4c06904ac1543e863807"},{"name":"password","value":"ff9800s_a_d","description":"","id":"pair_3375474304ee4e6a99fe025e3f06dd7c"},{"name":"username","value":"register@danielcortes.xyz","description":"","id":"pair_336272efd280454abfaade129949e7ef"},{"name":"audience","value":"https://api.unified.restaurant","description":"","id":"pair_1a9cca2a200d4ac291389b24495359c9"},{"name":"client_id","value":"unlxNoowQTk4V0JAD8Bv3j3kVKq3sdog","description":"","id":"pair_1a66a9e3e9e54ba79ef979a2dd91cb08"},{"name":"client_secret","value":"khvDShr6yHGPCX1p_OpJPeQ1rG5ZGgLJV2ahu-cE0b3pVUn6WS5-9YnQGJfQBKmj","description":"","id":"pair_0cb45df9505d4215b72f95d074d5310c"}]},"parameters":[],"headers":[{"name":"Content-Type","value":"application/x-www-form-urlencoded","id":"pair_ea81b84996b14a3abe99c76551568528"}],"authentication":{},"metaSortKey":-1623688070335,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_7dca789f2c93484aba4a306bbecfafc9","parentId":"fld_20211198ef5548e585276a9fc6c2d8c3","modified":1623862720559,"created":1619206250828,"url":"https://dev-ygnrzo5i.us.auth0.com/oauth/token ","name":"Get Client Token","description":"","method":"POST","body":{"mimeType":"application/json","text":"{\n\t\"client_id\": \"7jP8ZreA9Vmj1MTGc4HIbr8Wp5GDVzT7\",\n\t\"client_secret\": \"Z6xnSjItXJX1yqISn7RZTlgKvGNfv8rKMIeMznMpivKYuxxjOLQiGT2d0OPaxynU\",\n\t\"audience\": \"https://api.unified.restaurant\",\n\t\"grant_type\": \"client_credentials\"\n}"},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json","id":"pair_5b755a57d3714d30af8d177cb7d6f349"}],"authentication":{},"metaSortKey":-1618956749735,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"env_204c33a0808095e3efd1dbf6e7269cbca45232c6","parentId":"wrk_07f30ee2dcc148b1a0d91f1c2f4debec","modified":1620704001452,"created":1618956632180,"name":"Base Environment","data":{},"dataPropertyOrder":{},"color":null,"isPrivate":false,"metaSortKey":1618956632180,"_type":"environment"},{"_id":"jar_204c33a0808095e3efd1dbf6e7269cbca45232c6","parentId":"wrk_07f30ee2dcc148b1a0d91f1c2f4debec","modified":1619206274437,"created":1618956632182,"name":"Default Jar","cookies":[{"key":"__cfduid","value":"d4de3b27eb821e319a80136d1fec0bc771619206275","expires":"2021-05-23T19:31:15.000Z","domain":"us.auth0.com","path":"/","secure":true,"httpOnly":true,"extensions":["SameSite=Lax"],"hostOnly":false,"creation":"2021-04-23T19:31:14.433Z","lastAccessed":"2021-04-23T19:31:14.433Z","id":"3591506857326605"},{"key":"did","value":"s%3Av0%3A78535d30-a46a-11eb-b883-17455a04318d.z6Oig1APIfmXXyYfK99ZA1nob6WyC1fuqeVeavF5IZM","expires":"2022-04-24T01:31:15.000Z","maxAge":31557600,"domain":"dev-ygnrzo5i.us.auth0.com","path":"/","secure":true,"httpOnly":true,"extensions":["SameSite=None"],"hostOnly":true,"creation":"2021-04-23T19:31:14.434Z","lastAccessed":"2021-04-23T19:31:14.434Z","id":"6130484282560063"},{"key":"did_compat","value":"s%3Av0%3A78535d30-a46a-11eb-b883-17455a04318d.z6Oig1APIfmXXyYfK99ZA1nob6WyC1fuqeVeavF5IZM","expires":"2022-04-24T01:31:15.000Z","maxAge":31557600,"domain":"dev-ygnrzo5i.us.auth0.com","path":"/","secure":true,"httpOnly":true,"hostOnly":true,"creation":"2021-04-23T19:31:14.434Z","lastAccessed":"2021-04-23T19:31:14.434Z","id":"7310520988679066"}],"_type":"cookie_jar"},{"_id":"spc_b547dbb8370d46cb9a51a4dea953936d","parentId":"wrk_07f30ee2dcc148b1a0d91f1c2f4debec","modified":1618956632140,"created":1618956632140,"fileName":"Insomnia","contents":"","contentType":"yaml","_type":"api_spec"},{"_id":"env_f2c226abfe9446fa945965dd7b29f04c","parentId":"env_204c33a0808095e3efd1dbf6e7269cbca45232c6","modified":1625809831540,"created":1620703995253,"name":"Dev","data":{"base_url":"localhost:8080/api/v1","auth0":{"client_id":"unlxNoowQTk4V0JAD8Bv3j3kVKq3sdog","client_secret":"khvDShr6yHGPCX1p_OpJPeQ1rG5ZGgLJV2ahu-cE0b3pVUn6WS5-9YnQGJfQBKmj","auth_url":"https://dev-ygnrzo5i.us.auth0.com/authorize","token_url":"https://dev-ygnrzo5i.us.auth0.com/oauth/token","audience":"https://api.unified.restaurant","redirect_uri":"http://dev.localhost.callback"},"token":"eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6IlhJRWFxOXJBVkpFVU5zekI5alJaMSJ9.eyJpc3MiOiJodHRwczovL2Rldi15Z25yem81aS51cy5hdXRoMC5jb20vIiwic3ViIjoiYXV0aDB8NjA2ZGY0ZGVhMzJlOTcwMDY5NzU1YmQ4IiwiYXVkIjoiaHR0cHM6Ly9hcGkudW5pZmllZC5yZXN0YXVyYW50IiwiaWF0IjoxNjIzODc4MDAzLCJleHAiOjE2MjM5NjQ0MDMsImF6cCI6InVubHhOb293UVRrNFYwSkFEOEJ2M2oza1ZLcTNzZG9nIiwiZ3R5IjoicGFzc3dvcmQifQ.TxoIINR_7jxlC8Qg9P0eWrfqnnW8eHNVlZRFjTn83a4WkBWvD1YJSGzKMT6KRrk9G097hEOv-8LQboIJjFlg5eU7p5P7jesrz1bvErCE4sr9ljuHyNhPNQLCn33nCf56XqilCuBGnO1DZ3nKbuBdQMyfMp3ZccikVq43hc8b1ce1dOG-nV026urI_yjgT66M_bT7OZesR22xn6ai4egauX5dzgBc8rvETq04yQ2y-fH7zvQ0g5Memdb0XWr4DKE44yIsIxfOjub3O8mVLxEpMIk0jknt5KQvsr_BnqfADqI3w2XekkLAiFRr3XnHzKMlK_U-lLSPOcmCBWRN5NbaHg","token_admin":"eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6IlhJRWFxOXJBVkpFVU5zekI5alJaMSJ9.eyJpc3MiOiJodHRwczovL2Rldi15Z25yem81aS51cy5hdXRoMC5jb20vIiwic3ViIjoiYXV0aDB8NjBjYTVlMTIxNDIwODgwMDY4MGFiZDM2IiwiYXVkIjoiaHR0cHM6Ly9hcGkudW5pZmllZC5yZXN0YXVyYW50IiwiaWF0IjoxNjIzODc1MTI2LCJleHAiOjE2MjM5NjE1MjYsImF6cCI6InVubHhOb293UVRrNFYwSkFEOEJ2M2oza1ZLcTNzZG9nIiwiZ3R5IjoicGFzc3dvcmQifQ.iZLaDLdobUkP_ohSXskYLdV3ikackY_ie3lnfjb34_1ebMZ8u_3JJOr4gdlnlJqWwMCJ_rRAHbg0N6GJ2ZH5UjqYkiqAzmCiMDmWKvFJ7kFtjkmJBtlybY0SV8rRaUdNBmHKE4aVqg2ktYYyjJE1m5Lm1gOQK0Hd0vHxoNJzZBVDH1ilNgPpbBP1OuB8fLGYm0q_IYMke69rjmimPR03_qGUCcPBO-1s9RXnm2Bfqjq38yBdCssR6ubnXo_FqZDKNiK19YQgx6i6grnvwJyrakQXJHbHXB-DZD3Z5no_SHlyuLfqAF9cg0P5dd-fnLLA7PkJRbhof48agxs5Wmp5pw"},"dataPropertyOrder":{"&":["base_url","auth0","token","token_admin"],"&~|auth0":["client_id","client_secret","auth_url","token_url","audience","redirect_uri"]},"color":null,"isPrivate":false,"metaSortKey":1620703995253,"_type":"environment"},{"_id":"env_8f006c56490e4794a8c98e9102c33805","parentId":"env_204c33a0808095e3efd1dbf6e7269cbca45232c6","modified":1626159735450,"created":1625809817748,"name":"Production","data":{"base_url":"https://api.unified.restaurant/api/v1","auth0":{"client_id":"unlxNoowQTk4V0JAD8Bv3j3kVKq3sdog","client_secret":"khvDShr6yHGPCX1p_OpJPeQ1rG5ZGgLJV2ahu-cE0b3pVUn6WS5-9YnQGJfQBKmj","auth_url":"https://dev-ygnrzo5i.us.auth0.com/authorize","token_url":"https://dev-ygnrzo5i.us.auth0.com/oauth/token","audience":"https://api.unified.restaurant","redirect_uri":"http://dev.localhost.callback"}},"dataPropertyOrder":{"&":["base_url","auth0"],"&~|auth0":["client_id","client_secret","auth_url","token_url","audience","redirect_uri"]},"color":"#001eff","isPrivate":false,"metaSortKey":1625809817748,"_type":"environment"}]} \ No newline at end of file diff --git a/backend/app/Exceptions/NotAuthorizedException.php b/backend/app/Exceptions/NotAuthorizedException.php new file mode 100644 index 0000000..591a45c --- /dev/null +++ b/backend/app/Exceptions/NotAuthorizedException.php @@ -0,0 +1,22 @@ +user = $user; + } + + public function render($request) { + $path = $request->getPathInfo(); + + return response()->json([ + 'error' => 'not_authorized', + 'message' => 'El usuario ' . $this->user->id . ' no tiene permiso para acceder al endpoint ' . $path + ], 401); + } +} diff --git a/backend/app/Http/Controllers/BodegaController.php b/backend/app/Http/Controllers/BodegaController.php new file mode 100644 index 0000000..8ffca68 --- /dev/null +++ b/backend/app/Http/Controllers/BodegaController.php @@ -0,0 +1,233 @@ +validOrFail($restaurante_id); + $restaurante = Restaurante::findOrFail($restaurante_id); + + $ingresos = $restaurante->bodegaIngresos() + ->orderBy('fecha', 'desc') + ->with('ingrediente'); + + $paginate = app(PaginatorService::class)->paginate( + perPage: $request->input('per_page', 15), + page: $request->input('page', 1), + total: $ingresos->count(), + route: 'bodega.ingresos', + data: ['restaurante_id' => $restaurante_id], + ); + + $data = $ingresos->get() + ->skip($paginate['from'] - 1) + ->take($paginate['per_page']) + ->all(); + + return response()->json([ + 'pagination' => $paginate, + 'data' => $data + ]); + } + + /** + * Obtiene los ingresos de un ingrediente + */ + public function ingresos_ingrediente(Request $request, $restaurante_id, $ingrediente_id) { + app(UuidService::class)->validOrFail($restaurante_id); + $restaurante = Restaurante::findOrFail($restaurante_id); + + $ingresos = $restaurante->bodegaIngresos() + ->where('ingrediente_id', $ingrediente_id) + ->with('ingrediente'); + + $paginate = app(PaginatorService::class)->paginate( + perPage: $request->input('per_page', 15), + page: $request->input('page', 1), + total: $ingresos->count(), + route: 'bodega.ingresos', + data: ['restaurante_id' => $restaurante_id], + ); + + $data = $ingresos->get() + ->skip($paginate['from'] - 1) + ->take($paginate['per_page']) + ->all(); + + return response()->json([ + 'pagination' => $paginate, + 'data' => $data + ]); + } + + /** + * Obtiene de forma paginada los egresos de ingredientes + */ + public function egresos(Request $request, $restaurante_id) { + app(UuidService::class)->validOrFail($restaurante_id); + $restaurante = Restaurante::findOrFail($restaurante_id); + + $egresos = $restaurante->bodegaEgresos()->with('ingrediente'); + + $paginate = app(PaginatorService::class)->paginate( + perPage: $request->input('per_page', 15), + page: $request->input('page', 1), + total: $egresos->count(), + route: 'bodega.egresos', + data: ['restaurante_id' => $restaurante_id], + ); + + $data = $egresos->get() + ->skip($paginate['from'] - 1) + ->take($paginate['per_page']) + ->all(); + + return response()->json([ + 'pagination' => $paginate, + 'data' => $data + ]); + } + + /** + * Obtiene los egresos de un ingrediente + */ + public function egresos_ingrediente(Request $request, $restaurante_id, $ingrediente_id) { + app(UuidService::class)->validOrFail($restaurante_id); + $restaurante = Restaurante::findOrFail($restaurante_id); + + $egresos = $restaurante->bodegaEgresos() + ->where('ingrediente_id', $ingrediente_id) + ->with('ingrediente'); + + $paginate = app(PaginatorService::class)->paginate( + perPage: $request->input('per_page', 15), + page: $request->input('page', 1), + total: $egresos->count(), + route: 'bodega.egresos', + data: ['restaurante_id' => $restaurante_id], + ); + + $data = $egresos->get() + ->skip($paginate['from'] - 1) + ->take($paginate['per_page']) + ->all(); + + return response()->json([ + 'pagination' => $paginate, + 'data' => $data + ]); + } + + /** + * Obtiene de forma paginada los movimientos de ingredientes + */ + public function movimientos(Request $request, $restaurante_id) { + app(UuidService::class)->validOrFail($restaurante_id); + $restaurante = Restaurante::findOrFail($restaurante_id); + + $movimientos = $restaurante->bodegaMovimientos()->with('ingrediente'); + + $paginate = app(PaginatorService::class)->paginate( + perPage: $request->input('per_page', 15), + page: $request->input('page', 1), + total: $movimientos->count(), + route: 'bodega.movimientos', + data: ['restaurante_id' => $restaurante_id], + ); + + $data = $movimientos->get() + ->skip($paginate['from'] - 1) + ->take($paginate['per_page']) + ->all(); + + return response()->json([ + 'pagination' => $paginate, + 'data' => $data + ]); + } + + /** + * Obtiene de forma paginada los movimientos de un ingrediente + */ + public function movimientos_ingrediente(Request $request, $restaurante_id, $ingrediente_id) { + app(UuidService::class)->validOrFail($restaurante_id); + $restaurante = Restaurante::findOrFail($restaurante_id); + + $movimientos = $restaurante->bodegaMovimientos() + ->where('ingrediente_id', $ingrediente_id) + ->with('ingrediente'); + + $paginate = app(PaginatorService::class)->paginate( + perPage: $request->input('per_page', 15), + page: $request->input('page', 1), + total: $movimientos->count(), + route: 'bodega.movimientos', + data: ['restaurante_id' => $restaurante_id], + ); + + $data = $movimientos->get() + ->skip($paginate['from'] - 1) + ->take($paginate['per_page']) + ->all(); + + return response()->json([ + 'pagination' => $paginate, + 'data' => $data + ]); + } + + /** + * Obtiene de forma paginada el estado actual de la bodega + */ + public function actual(Request $request, $restaurante_id) { + app(UuidService::class)->validOrFail($restaurante_id); + $restaurante = Restaurante::findOrFail($restaurante_id); + + $actual = $restaurante->bodegaActual()->with('ingrediente'); + + $paginate = app(PaginatorService::class)->paginate( + perPage: $request->input('per_page', 15), + page: $request->input('page', 1), + total: $actual->count(), + route: 'bodega.actual', + data: ['restaurante_id' => $restaurante_id], + ); + + $data = $actual->get() + ->skip($paginate['from'] - 1) + ->take($paginate['per_page']) + ->all(); + + return response()->json([ + 'pagination' => $paginate, + 'data' => $data + ]); + } + + /** + * Obtiene el estado actual de un ingrediente + */ + public function actual_ingrediente(Request $request, $restaurante_id, $ingrediente_id) { + app(UuidService::class)->validOrFail($restaurante_id); + $restaurante = Restaurante::findOrFail($restaurante_id); + + $actual = $restaurante->bodegaActual() + ->where('ingrediente_id', $ingrediente_id) + ->with('ingrediente') + ->first(); + + return response()->json($actual); + } +} diff --git a/backend/app/Http/Controllers/ComprasController.php b/backend/app/Http/Controllers/ComprasController.php new file mode 100644 index 0000000..2aabf04 --- /dev/null +++ b/backend/app/Http/Controllers/ComprasController.php @@ -0,0 +1,245 @@ +validOrFail($restaurante_id); + $restaurante = Restaurante::findOrFail($restaurante_id); + + $compras = $restaurante->compras(); + + $paginate = app(PaginatorService::class)->paginate( + perPage: $request->input('per_page', 15), + page: $request->input('page', 1), + total: $compras->count(), + route: 'compras.all', + data: ['restaurante_id' => $restaurante_id] + ); + + $data = $compras->get() + ->skip($paginate['from'] - 1) + ->take($paginate['per_page']) + ->all(); + + return response()->json([ + 'pagination' => $paginate, + 'data' => $data + ]); + } + + /** + * Obtiene una compra por su id + */ + public function get(Request $request, $restaurante_id, $id) { + app(UuidService::class)->validOrFail($restaurante_id); + app(UuidService::class)->validOrFail($id); + + $restaurante = Restaurante::findOrFail($restaurante_id); + $compra = Compra::findOrFail($id); + + if($compra->restaurante != $restaurante) { + throw new ModelNotFoundException("compra", $id); + } + + return response()->json($compra); + } + + /** + * Crea una nueva compra + */ + public function create(Request $request, $restaurante_id) { + $this->validate($request, [ + 'fecha_compra' => 'required|date', + 'en_arqueo' => 'required|boolean', + 'proveedor_id' => 'required' + ]); + + app(UuidService::class)->validOrFail($restaurante_id); + app(UuidService::class)->validOrFail($request->input('proveedor_id')); + + $restaurante = Restaurante::findOrFail($restaurante_id); + $proveedor = Proveedor::findOrFail($request->input('proveedor_id')); + + if($proveedor->restaurante != $restaurante) { + throw new ModelNotFoundException("proveedor", $request->input('proveedor_id')); + } + + $compra = Compra::create([ + 'id' => Uuid::uuid4(), + 'fecha_compra' => $request->input('fecha_compra'), + 'proveedor_id' => $proveedor->id, + 'en_arqueo' => $request->input('en_arqueo'), + 'restaurante_id' => $restaurante->id + ]); + + return response()->json($compra, 201); + } + + /** + * Actualiza una compra + */ + public function update(Request $request, $restaurante_id, $id) { + $this->validate($request, [ + 'fecha_compra' => 'required|date', + 'en_arqueo' => 'required|boolean', + 'proveedor_id' => 'required' + ]); + + app(UuidService::class)->validOrFail($restaurante_id); + app(UuidService::class)->validOrFail($id); + app(UuidService::class)->validOrFail($request->input('proveedor_id')); + + $restaurante = Restaurante::findOrFail($restaurante_id); + $proveedor = Proveedor::findOrFail($request->input('proveedor_id')); + $compra = Compra::findOrFail($id); + + if($proveedor->restaurante != $restaurante) { + throw new ModelNotFoundException("proveedor", $proveedor->id); + } + + if($compra->restaurante != $restaurante) { + throw new ModelNotFoundException("compra", $compra->id); + } + + $compra->fecha_compra= $request->input('fecha_compra'); + $compra->en_arqueo = $request->input('en_arqueo'); + $compra->proveedor_id = $proveedor->id; + $compra->save(); + + return response()->json($compra); + } + + /** + * Elimina una compra + */ + public function delete(Request $request, $restaurante_id, $id) { + app(UuidService::class)->validOrFail($restaurante_id); + app(UuidService::class)->validOrFail($id); + + $restaurante = Restaurante::findOrFail($restaurante_id); + $compra = Compra::findOrFail($id); + + if($compra->restaurante != $restaurante) { + throw new ModelNotFoundException("compra", $id); + } + + $compra->ingredientes()->delete(); + $compra->facturas()->delete(); + + $compra->delete(); + + return response()->json([], 204); + } + + /** + * Obtiene los ingredientes de una compra + */ + public function getIngredientes(Request $request, $restaurante_id, $id) { + app(UuidService::class)->validOrFail($restaurante_id); + app(UuidService::class)->validOrFail($id); + + $restaurante = Restaurante::findOrFail($restaurante_id); + $compra = Compra::findOrFail($id); + + if($compra->restaurante != $restaurante) { + throw new ModelNotFoundException("compra", $id); + } + + return response()->json($compra->ingredientes); + } + + /** + * Agrega un ingrediente a una compra + */ + public function addIngrediente(Request $request, $restaurante_id, $id, $ingrediente_id) { + $this->validate($request, [ + 'unidades' => 'required|numeric', + 'monto_unitario' => 'required|numeric' + ]); + + app(UuidService::class)->validOrFail($restaurante_id); + app(UuidService::class)->validOrFail($id); + app(UuidService::class)->validOrFail($ingrediente_id); + + $restaurante = Restaurante::findOrFail($restaurante_id); + $compra = Compra::findOrFail($id); + $ingrediente = Ingrediente::findOrFail($ingrediente_id); + + if($compra->restaurante != $restaurante) { + throw new ModelNotFoundException("compra", $compra->id); + } + + if($ingrediente->restaurante != $restaurante) { + throw new ModelNotFoundException("ingrediente", $ingrediente->id); + } + + foreach($compra->ingredientes as $ci){ + if($ci->ingrediente->id == $ingrediente->id) { + throw new AlreadyExistsException("ingrediente"); + } + } + + $compraIngrediente = CompraIngrediente::create([ + 'id' => Uuid::uuid4(), + 'unidades' => $request->input('unidades'), + 'monto_unitario' => $request->input('monto_unitario'), + 'compra_id' => $compra->id, + 'ingrediente_id' => $ingrediente->id + ]); + + return response()->json($compraIngrediente, 201); + } + + /** + * Elimina un ingrediente de una compra + */ + public function deleteIngrediente(Request $request, $restaurante_id, $id, $ingrediente_id) { + app(UuidService::class)->validOrFail($restaurante_id); + app(UuidService::class)->validOrFail($id); + app(UuidService::class)->validOrFail($ingrediente_id); + + $restaurante = Restaurante::findOrFail($restaurante_id); + $compra = Compra::findOrFail($id); + $ingrediente = Ingrediente::findOrFail($ingrediente_id); + + if($compra->restaurante != $restaurante) { + throw new ModelNotFoundException("compra", $compra->id); + } + + if($ingrediente->restaurante != $restaurante) { + throw new ModelNotFoundException("ingrediente", $ingrediente->id); + } + + $toDelete = CompraIngrediente::where('compra_id', $compra->id)->where('ingrediente_id', $ingrediente->id); + + if($toDelete->count() == 0) { + throw new ModelNotFoundException("compra_ingrediente", null); + } + + $toDelete->delete(); + + return response()->json([], 204); + } +} diff --git a/backend/app/Http/Controllers/FacturasController.php b/backend/app/Http/Controllers/FacturasController.php new file mode 100644 index 0000000..b78936f --- /dev/null +++ b/backend/app/Http/Controllers/FacturasController.php @@ -0,0 +1,131 @@ +validOrFail($restaurante_id); + app(UuidService::class)->validOrFail($id); + + $restaurante = Restaurante::findOrFail($restaurante_id); + $compra = Compra::findOrFail($id); + + if($compra->restaurante != $restaurante) { + throw new ModelNotFoundException("compra", $id); + } + + if($compra->facturas()->count() == 0) { + throw new ModelNotFoundException("factura", null); + } + + return response()->json($compra->facturas()->first()); + } + + /** + * Crea una factura a una compra + */ + public function create(Request $request, $restaurante_id, $id) { + $this->validate($request, [ + 'numero' => 'required', + 'monto_bruto' => 'required|numeric', + ]); + + app(UuidService::class)->validOrFail($restaurante_id); + app(UuidService::class)->validOrFail($id); + + $restaurante = Restaurante::findOrFail($restaurante_id); + $compra = Compra::findOrFail($id); + + if($compra->restaurante != $restaurante) { + throw new ModelNotFoundException("compra", $id); + } + + if($compra->facturas()->count() > 0) { + throw new AlreadyExistsException("factura"); + } + + $factura = Factura::create([ + 'id' => Uuid::uuid4(), + 'numero' => $request->input('numero'), + 'monto_bruto' => $request->input('monto_bruto'), + 'compra_id' => $compra->id + ]); + + return response()->json($factura, 201); + } + + /** + * Modifica la factura a una compra + */ + public function update(Request $request, $restaurante_id, $id) { + $this->validate($request, [ + 'numero' => 'required', + 'monto_bruto' => 'required|numeric', + ]); + + app(UuidService::class)->validOrFail($restaurante_id); + app(UuidService::class)->validOrFail($id); + + $restaurante = Restaurante::findOrFail($restaurante_id); + $compra = Compra::findOrFail($id); + + if($compra->restaurante != $restaurante) { + throw new ModelNotFoundException("compra", $id); + } + + if($compra->facturas()->count() == 0) { + throw new ModelNotFoundException("factura", null); + } + + $factura = $compra->facturas()->first(); + $factura->numero = $request->input('numero'); + $factura->monto_bruto = $request->input('monto_bruto'); + $factura->save(); + + return response()->json($factura, 201); + } + + + /** + * Elimina la factura de una compra + */ + public function delete(Request $request, $restaurante_id, $id) { + app(UuidService::class)->validOrFail($restaurante_id); + app(UuidService::class)->validOrFail($id); + + $restaurante = Restaurante::findOrFail($restaurante_id); + $compra = Compra::findOrFail($id); + + if($compra->restaurante != $restaurante) { + throw new ModelNotFoundException("compra", $id); + } + + if($compra->facturas()->count() == 0) { + throw new ModelNotFoundException("factura", null); + } + + $factura = $compra->facturas()->first(); + $factura->delete(); + + return response()->json([], 204); + } +} diff --git a/backend/app/Http/Controllers/RestaurantesController.php b/backend/app/Http/Controllers/RestaurantesController.php index 43d71bb..76171a8 100644 --- a/backend/app/Http/Controllers/RestaurantesController.php +++ b/backend/app/Http/Controllers/RestaurantesController.php @@ -19,7 +19,11 @@ class RestaurantesController extends Controller { * Obtiene de forma paginada los restaurantes registrados en el backend */ public function all(Request $request) { - $restaurantes = Restaurante::all(); + if($request->user->isGlobalAdmin()) { + $restaurantes = Restaurante::all(); + } else { + $restaurantes = $request->user->restaurantes; + } $paginate = app(PaginatorService::class)->paginate( perPage: $request->input('per_page', 15), @@ -46,8 +50,8 @@ class RestaurantesController extends Controller { app(UuidService::class)->validOrFail($id); $restaurante = Restaurante::findOrFail($id); - if(!$request->user->isOnRestaurant($restaurante)){ - return ModelNotFoundException('restaurante', $restaurante->id); + if(!$request->user->isOnRestaurante($restaurante)){ + throw new ModelNotFoundException('restaurante', $restaurante->id); } return response()->json($restaurante); @@ -80,6 +84,11 @@ class RestaurantesController extends Controller { ]); $restaurant = Restaurante::findOrFail($id); + + if(!$request->user->isOnRestaurante($restaurant)){ + throw new ModelNotFoundException('restaurante', $restaurant->id); + } + $restaurant->nombre = $request->input('nombre'); $restaurant->save(); @@ -94,12 +103,19 @@ class RestaurantesController extends Controller { $restaurant = Restaurante::findOrFail($id); - if($restaurant->usuarios()->count() > 0) throw new CantDeleteHasChildException("restaurant", "usuario"); - if($restaurant->canalesVenta()->count() > 0) throw new CantDeleteHasChildException("restaurant", "canal_venta"); - if($restaurant->sectores()->count() > 0) throw new CantDeleteHasChildException("restaurant", "sector"); - if($restaurant->zonasProduccion()->count() > 0) throw new CantDeleteHasChildException("restaurant", "zona_produccion"); - if($restaurant->categorias()->count() > 0) throw new CantDeleteHasChildException("restaurant", "categoria"); - + if($restaurant->canalesVenta()->count() > 0) throw new CantDeleteHasChildException("restaurant", "canal_venta"); + if($restaurant->categorias()->count() > 0) throw new CantDeleteHasChildException("restaurant", "categoria"); + if($restaurant->compras()->count() > 0) throw new CantDeleteHasChildException("restaurant", "compra"); + if($restaurant->usuarios()->count() > 0) throw new CantDeleteHasChildException("restaurant", "usuario"); + if($restaurant->sectores()->count() > 0) throw new CantDeleteHasChildException("restaurant", "sector"); + if($restaurant->zonasProduccion()->count() > 0) throw new CantDeleteHasChildException("restaurant", "zona_produccion"); + if($restaurant->proveedores()->count() > 0) throw new CantDeleteHasChildException("restaurant", "proveedor"); + if($restaurant->ingredientes()->count() > 0) throw new CantDeleteHasChildException("restaurant", "ingrediente"); + if($restaurant->productos()->count() > 0) throw new CantDeleteHasChildException("restaurant", "producto"); + if($restaurant->ventas()->count() > 0) throw new CantDeleteHasChildException("restaurant", "venta"); + if($restaurant->boletasElectronicas()->count() > 0) throw new CantDeleteHasChildException("restaurant", "boleta_electronica"); + if($restaurant->boletasExentas()->count() > 0) throw new CantDeleteHasChildException("restaurant", "boleta_exenta"); + if($restaurant->cajas()->count() > 0) throw new CantDeleteHasChildException("restaurant", "caja"); $restaurant->delete(); return response()->json([], 204); diff --git a/backend/app/Http/Controllers/UsuariosController.php b/backend/app/Http/Controllers/UsuariosController.php index 4f0804b..c783649 100644 --- a/backend/app/Http/Controllers/UsuariosController.php +++ b/backend/app/Http/Controllers/UsuariosController.php @@ -21,7 +21,11 @@ class UsuariosController extends Controller { * Obtiene de forma paginada los usuarios registrados en el backend */ public function all(Request $request) { - $usuarios = Usuario::all(); + if($request->user->isGlobalAdmin()) { + $usuarios = Usuario::all(); + } else { + $usuarios = Restaurante::all()->intersect($request->user->restaurantes); + } $paginate = app(PaginatorService::class)->paginate( perPage: $request->input('per_page', 15), @@ -44,8 +48,11 @@ class UsuariosController extends Controller { * Obtiene un usuario por su id */ public function get(Request $request, $id) { - if (!str_starts_with($id, 'auth0')) app(UuidService::class)->validOrFail($id); - $usuario = Usuario::findOrFail(urldecode($id)); + if (!str_starts_with($id, 'auth0') && $id != 'me') app(UuidService::class)->validOrFail($id); + + if ($id == 'me') $usuario = $request->user; + else $usuario = Usuario::findOrFail(urldecode($id)); + return response()->json($usuario); } @@ -96,7 +103,7 @@ class UsuariosController extends Controller { * Actualiza un usuario */ public function update(Request $request, $id) { - if (!str_starts_with($id, 'auth0')) app(UuidService::class)->validOrFail($id); + if (!str_starts_with($id, 'auth0') && $id != 'me') app(UuidService::class)->validOrFail($id); $this->validate($request, [ 'nombre' => 'sometimes', @@ -107,7 +114,8 @@ class UsuariosController extends Controller { 'roles.*' => ['sometimes', Rule::in(['admin', 'mesero', 'recaudador', 'productor'])], ]); - $usuario = Usuario::findOrFail(urldecode($id)); + if ($id == 'me') $usuario = $request->user; + else $usuario = Usuario::findOrFail(urldecode($id)); $metadata = []; if ($request->input('roles')) $metadata['roles'] = $request->input('roles'); @@ -138,9 +146,10 @@ class UsuariosController extends Controller { * Elimina un usuario */ public function delete(Request $request, $id) { - if (!str_starts_with($id, 'auth0')) app(UuidService::class)->validOrFail($id); + if (!str_starts_with($id, 'auth0') && $id != 'me') app(UuidService::class)->validOrFail($id); - $usuario = Usuario::findOrFail(urldecode($id)); + if ($id == 'me') $usuario = $request->user; + else $usuario = Usuario::findOrFail(urldecode($id)); $auth0 = app(Auth0Service::class); $auth0Response = $auth0->deleteUser($usuario->auth0_id); @@ -161,8 +170,10 @@ class UsuariosController extends Controller { * Obtiene los usuarios de un restaurant */ public function getRestaurantes(Request $request, $id) { - if (!str_starts_with($id, 'auth0')) app(UuidService::class)->validOrFail($id); - $usuario = Usuario::findOrFail(urldecode($id)); + if (!str_starts_with($id, 'auth0') && $id != 'me') app(UuidService::class)->validOrFail($id); + + if ($id == 'me') $usuario = $request->user; + else $usuario = Usuario::findOrFail(urldecode($id)); return response()->json($usuario->restaurantes); } @@ -171,10 +182,12 @@ class UsuariosController extends Controller { * Agrega usuario a un restaurant */ public function addToRestaurant(Request $request, $id, $restaurant) { - if (!str_starts_with($id, 'auth0')) app(UuidService::class)->validOrFail($id); + if (!str_starts_with($id, 'auth0') && $id != 'me') app(UuidService::class)->validOrFail($id); app(UuidService::class)->validOrFail($restaurant); - $usuario = Usuario::findOrFail(urldecode($id)); + if ($id == 'me') $usuario = $request->user; + else $usuario = Usuario::findOrFail(urldecode($id)); + $restaurant = Restaurante::findOrFail($restaurant); if ($usuario->restaurantes->contains($restaurant)) { @@ -193,10 +206,12 @@ class UsuariosController extends Controller { * Saca a un usuario de un restaurant */ public function removeFromRestaurant(Request $request, $id, $restaurant) { - if (!str_starts_with($id, 'auth0')) app(UuidService::class)->validOrFail($id); - app(UuidService::class)->validOrFail($restaurant); + if (!str_starts_with($id, 'auth0') && $id != 'me') app(UuidService::class)->validOrFail($id); + app(UuidService::class)->validOrFail($restaurant); + + if ($id == 'me') $usuario = $request->user; + else $usuario = Usuario::findOrFail(urldecode($id)); - $usuario = Usuario::findOrFail(urldecode($id)); $restaurant = Restaurante::findOrFail($restaurant); if (!$usuario->restaurantes->contains($restaurant)) { diff --git a/backend/app/Http/Controllers/ZonasProduccionController.php b/backend/app/Http/Controllers/ZonasProduccionController.php index ff6ca53..ea4f838 100644 --- a/backend/app/Http/Controllers/ZonasProduccionController.php +++ b/backend/app/Http/Controllers/ZonasProduccionController.php @@ -60,6 +60,23 @@ class ZonasProduccionController extends Controller { return response()->json($zonaProduccion); } + /** + * Obtiene los usuarios de una zona de produccion + */ + public function users(Request $request, $restaurante_id, $id) { + app(UuidService::class)->validOrFail($restaurante_id); + app(UuidService::class)->validOrFail($id); + + $restaurante = Restaurante::findOrFail($restaurante_id); + $zonaProduccion = ZonaProduccion::findOrFail($id); + + if($zonaProduccion->restaurante != $restaurante) { + throw new ModelNotFoundException("zona_produccion", $id); + } + + return response()->json($zonaProduccion->usuarios); + } + /** * Crea una nueva zona de produccion */ diff --git a/backend/app/Http/Middleware/Auth0Middleware.php b/backend/app/Http/Middleware/Auth0Middleware.php index 5744dd9..2a9ba50 100644 --- a/backend/app/Http/Middleware/Auth0Middleware.php +++ b/backend/app/Http/Middleware/Auth0Middleware.php @@ -17,12 +17,20 @@ class Auth0Middleware { $token = $request->bearerToken(); if (!$token) { + Log::warning('Se intento acceder a una ruta protegida sin un token', [ + 'path' => $request->getPathInfo() + ]); return response()->json(['error' => 'no_token', 'message' => 'No se envío el token'], 401); } try { $validated = $this->validateToken($token); } catch (InvalidTokenException $e) { + Log::warning('Se intento acceder a una ruta protegida con un token invalido', [ + 'path' => $request->getPathInfo(), + 'message' => $e->getMessage(), + 'token' => $token + ]); return response()->json([ 'error' => 'auth0_invalid_token', 'message' => $e->getMessage() @@ -30,6 +38,7 @@ class Auth0Middleware { } $user = Usuario::where('auth0_id', $validated['sub'])->first(); + Log::debug('Se identifico al usuario', ['id' => $user->id, 'auth0_id' => $user->auth0_id]); return $next($request->merge(['user' => $user])); } diff --git a/backend/app/Http/Middleware/Authenticate.php b/backend/app/Http/Middleware/Authenticate.php deleted file mode 100644 index 4a88761..0000000 --- a/backend/app/Http/Middleware/Authenticate.php +++ /dev/null @@ -1,22 +0,0 @@ -auth = $auth; - } - - public function handle($request, Closure $next, $guard = null) { - if ($this->auth->guard($guard)->guest()) { - return response('Unauthorized.', 401); - } - - return $next($request); - } -} diff --git a/backend/app/Http/Middleware/CorsMiddleware.php b/backend/app/Http/Middleware/CorsMiddleware.php index 58a9a99..2722a8d 100644 --- a/backend/app/Http/Middleware/CorsMiddleware.php +++ b/backend/app/Http/Middleware/CorsMiddleware.php @@ -14,15 +14,13 @@ class CorsMiddleware { 'Access-Control-Allow-Headers' => 'Content-Type, Authorization, X-Requested-With' ]; - if ($request->isMethod('OPTIONS')) - { + if ($request->isMethod('OPTIONS')) { return response()->json([], 200, $headers); } $response = $next($request); - foreach($headers as $key => $value) - { + foreach($headers as $key => $value) { $response->header($key, $value); } diff --git a/backend/app/Http/Middleware/InRestauranteMiddleware.php b/backend/app/Http/Middleware/InRestauranteMiddleware.php new file mode 100644 index 0000000..eb013f6 --- /dev/null +++ b/backend/app/Http/Middleware/InRestauranteMiddleware.php @@ -0,0 +1,30 @@ +route('restaurante_id')); + $user = $request->user; + + if(!$user->isOnRestaurante($restaurante)) { + Log::debug('El usuario intento acceder a un restaurante que no le pertenece', [ + 'user' => $user->id, + 'restaurante' => $restaurante->id + ]); + throw new ModelNotFoundException('restaurante', $restaurante->id); + } else { + Log::debug('El usuario accedio a un restaurante que si le pertenece', [ + 'user' => $user->id, + 'restaurante' => $restaurante->id + ]); + } + + return $next($request); + } +} diff --git a/backend/app/Http/Middleware/LogEndpointHitMiddleware.php b/backend/app/Http/Middleware/LogEndpointHitMiddleware.php index 47eac84..4b152f4 100644 --- a/backend/app/Http/Middleware/LogEndpointHitMiddleware.php +++ b/backend/app/Http/Middleware/LogEndpointHitMiddleware.php @@ -7,17 +7,16 @@ use Illuminate\Support\Facades\Log; class LogEndpointHitMiddleware { public function handle($request, Closure $next) { - $userId = $request->user ? $request->user->id : null; + $user = $request->user; $method = $request->getMethod(); $path = $request->getPathInfo(); - Log::debug('User ' . $userId . ' hitting ' . $method . ' ' . $path . ' endpoint', [ - 'user' => $userId, + Log::debug('User ' . $user->id . ' hitting ' . $method . ' ' . $path . ' endpoint', [ + 'user' => $user->id, + 'roles' => implode('|', $user->roles), 'method' => $method, 'path' => $path, - 'input' => array_filter($request->input(), function ($key) { - return $key !== 'user'; - }, ARRAY_FILTER_USE_KEY) + 'input' => array_filter($request->input(), function ($key) { return $key !== 'user'; }, ARRAY_FILTER_USE_KEY) ]); return $next($request); diff --git a/backend/app/Http/Middleware/RoleMiddleware.php b/backend/app/Http/Middleware/RoleMiddleware.php new file mode 100644 index 0000000..d9787f8 --- /dev/null +++ b/backend/app/Http/Middleware/RoleMiddleware.php @@ -0,0 +1,30 @@ +user; + $roles = explode('|', $raw_roles); + $has_permission = false; + + foreach($roles as $role){ + $has_permission = $has_permission || $user->hasRole($role); + } + + if(!$has_permission) { + Log::warning('El usuario intento acceder a una ruta sin los roles necesarios', [ + 'user' => $user->id, + 'required_roles' => $raw_roles, + 'user_roles' => implode('|', $user->roles) + ]); + throw new NotAuthorizedException($request->user); + } + + return $next($request); + } +} diff --git a/backend/app/Models/Administrador.php b/backend/app/Models/Administrador.php deleted file mode 100644 index cc3a484..0000000 --- a/backend/app/Models/Administrador.php +++ /dev/null @@ -1,18 +0,0 @@ -belongsTo(Usuario::class); - } -} diff --git a/backend/app/Models/BodegaActual.php b/backend/app/Models/BodegaActual.php new file mode 100644 index 0000000..e07f985 --- /dev/null +++ b/backend/app/Models/BodegaActual.php @@ -0,0 +1,20 @@ +belongsTo(Restaurante::class); + } + + public function ingrediente() { + return $this->belongsTo(Ingrediente::class); + } +} diff --git a/backend/app/Models/BodegaEgreso.php b/backend/app/Models/BodegaEgreso.php new file mode 100644 index 0000000..b37b27b --- /dev/null +++ b/backend/app/Models/BodegaEgreso.php @@ -0,0 +1,21 @@ +belongsTo(Restaurante::class); + } + + public function ingrediente() { + return $this->belongsTo(Ingrediente::class); + } +} diff --git a/backend/app/Models/BodegaIngreso.php b/backend/app/Models/BodegaIngreso.php new file mode 100644 index 0000000..5f43dbe --- /dev/null +++ b/backend/app/Models/BodegaIngreso.php @@ -0,0 +1,21 @@ +belongsTo(Restaurante::class); + } + + public function ingrediente() { + return $this->belongsTo(Ingrediente::class); + } +} diff --git a/backend/app/Models/BodegaMovimiento.php b/backend/app/Models/BodegaMovimiento.php new file mode 100644 index 0000000..da77c2f --- /dev/null +++ b/backend/app/Models/BodegaMovimiento.php @@ -0,0 +1,20 @@ +belongsTo(Restaurante::class); + } + + public function ingrediente() { + return $this->belongsTo(Ingrediente::class); + } +} diff --git a/backend/app/Models/BoletaElectronica.php b/backend/app/Models/BoletaElectronica.php index dccffcd..b75faf6 100644 --- a/backend/app/Models/BoletaElectronica.php +++ b/backend/app/Models/BoletaElectronica.php @@ -11,6 +11,7 @@ class BoletaElectronica extends Model { use UuidPrimaryKey, SoftDeletes; protected $table = 'boletas_electronicas'; + protected $hidden = ['created_at', 'updated_at', 'deleted_at', 'pivot']; public function venta() { return $this->belongsTo(Venta::class); diff --git a/backend/app/Models/BoletaExenta.php b/backend/app/Models/BoletaExenta.php index 5499930..a74a8df 100644 --- a/backend/app/Models/BoletaExenta.php +++ b/backend/app/Models/BoletaExenta.php @@ -11,6 +11,7 @@ class BoletaExenta extends Model { use UuidPrimaryKey, SoftDeletes; protected $table = 'boletas_exentas'; + protected $hidden = ['created_at', 'updated_at', 'deleted_at', 'pivot']; public function venta() { return $this->belongsTo(Venta::class); diff --git a/backend/app/Models/Caja.php b/backend/app/Models/Caja.php index 120ee75..f7e2b32 100644 --- a/backend/app/Models/Caja.php +++ b/backend/app/Models/Caja.php @@ -11,6 +11,7 @@ class Caja extends Model { use UuidPrimaryKey, SoftDeletes; protected $table = 'cajas'; + protected $hidden = ['created_at', 'updated_at', 'deleted_at', 'pivot']; public function restaurante() { return $this->belongsTo(Restaurante::class); diff --git a/backend/app/Models/CanalVenta.php b/backend/app/Models/CanalVenta.php index 7818eea..11176f2 100644 --- a/backend/app/Models/CanalVenta.php +++ b/backend/app/Models/CanalVenta.php @@ -11,6 +11,7 @@ class CanalVenta extends Model { use UuidPrimaryKey, SoftDeletes; protected $table = 'canales_venta'; + protected $hidden = ['created_at', 'updated_at', 'deleted_at', 'pivot']; protected $fillable = ['id', 'nombre', 'restaurante_id', 'sector_id', 'tipo_canal_id']; public static function findOrFail($id) { diff --git a/backend/app/Models/Categoria.php b/backend/app/Models/Categoria.php index 4af8929..fe6f4fd 100644 --- a/backend/app/Models/Categoria.php +++ b/backend/app/Models/Categoria.php @@ -11,6 +11,7 @@ class Categoria extends Model { use UuidPrimaryKey, SoftDeletes; protected $table = 'categorias'; + protected $hidden = ['created_at', 'updated_at', 'deleted_at', 'pivot']; protected $fillable = ['id', 'nombre', 'restaurante_id']; public static function findOrFail($id) { diff --git a/backend/app/Models/Compra.php b/backend/app/Models/Compra.php index 575a4bf..e78e0c7 100644 --- a/backend/app/Models/Compra.php +++ b/backend/app/Models/Compra.php @@ -11,8 +11,18 @@ class Compra extends Model { use UuidPrimaryKey, SoftDeletes; protected $table = 'compras'; + protected $hidden = ['created_at', 'updated_at', 'deleted_at', 'pivot']; + protected $fillable = [ + 'id', 'fecha_compra', 'proveedor_id', 'en_arqueo', 'restaurante_id' + ]; - public function compraIngredientes() { + public static function findOrFail($id) { + $compra = Compra::find($id); + if(!$compra) throw new ModelNotFoundException("compra", $id); + return $compra; + } + + public function ingredientes() { return $this->hasMany(CompraIngrediente::class); } diff --git a/backend/app/Models/CompraIngrediente.php b/backend/app/Models/CompraIngrediente.php index ce2907f..26f9e1f 100644 --- a/backend/app/Models/CompraIngrediente.php +++ b/backend/app/Models/CompraIngrediente.php @@ -11,6 +11,8 @@ class CompraIngrediente extends Model { use UuidPrimaryKey, SoftDeletes; protected $table = 'compra_ingredientes'; + protected $hidden = ['created_at', 'updated_at', 'deleted_at', 'pivot']; + protected $fillable = ['id', 'unidades', 'monto_unitario', 'compra_id', 'ingrediente_id']; public function ingrediente() { return $this->belongsTo(Ingrediente::class); diff --git a/backend/app/Models/Efectivo.php b/backend/app/Models/Efectivo.php index d929fbb..ed037de 100644 --- a/backend/app/Models/Efectivo.php +++ b/backend/app/Models/Efectivo.php @@ -11,6 +11,7 @@ class Efectivo extends Model { use UuidPrimaryKey, SoftDeletes; protected $table = 'efectivos'; + protected $hidden = ['created_at', 'updated_at', 'deleted_at', 'pivot']; public function caja() { return $this->belongsTo(Caja::class); diff --git a/backend/app/Models/EstadoProduccion.php b/backend/app/Models/EstadoProduccion.php index 4038757..44122c8 100644 --- a/backend/app/Models/EstadoProduccion.php +++ b/backend/app/Models/EstadoProduccion.php @@ -11,4 +11,5 @@ class EstadoProduccion extends Model { use UuidPrimaryKey, SoftDeletes; protected $table = 'estados_produccion'; + protected $hidden = ['created_at', 'updated_at', 'deleted_at', 'pivot']; } diff --git a/backend/app/Models/Factura.php b/backend/app/Models/Factura.php index a4f7550..68f989c 100644 --- a/backend/app/Models/Factura.php +++ b/backend/app/Models/Factura.php @@ -11,6 +11,14 @@ class Factura extends Model { use UuidPrimaryKey, SoftDeletes; protected $table = 'facturas'; + protected $hidden = ['created_at', 'updated_at', 'deleted_at', 'pivot']; + protected $fillable = ['id', 'numero', 'monto_bruto', 'compra_id']; + + public static function findOrFail($id) { + $factura = Factura::find($id); + if(!$factura) throw new ModelNotFoundException("factura", $id); + return $factura; + } public function compra() { return $this->belongsTo(Compra::class); diff --git a/backend/app/Models/Ingrediente.php b/backend/app/Models/Ingrediente.php index c68612c..497516b 100644 --- a/backend/app/Models/Ingrediente.php +++ b/backend/app/Models/Ingrediente.php @@ -11,6 +11,7 @@ class Ingrediente extends Model { use UuidPrimaryKey, SoftDeletes; protected $table = 'ingredientes'; + protected $hidden = ['created_at', 'updated_at', 'deleted_at', 'pivot']; protected $fillable = ['id', 'nombre', 'medida', 'restaurante_id']; public static function findOrFail($id) { diff --git a/backend/app/Models/MedioPago.php b/backend/app/Models/MedioPago.php index 0a34c9a..0b12f3e 100644 --- a/backend/app/Models/MedioPago.php +++ b/backend/app/Models/MedioPago.php @@ -11,4 +11,5 @@ class MedioPago extends Model { use UuidPrimaryKey, SoftDeletes; protected $table = 'medios_pago'; + protected $hidden = ['created_at', 'updated_at', 'deleted_at', 'pivot']; } diff --git a/backend/app/Models/Mesero.php b/backend/app/Models/Mesero.php deleted file mode 100644 index f787e2a..0000000 --- a/backend/app/Models/Mesero.php +++ /dev/null @@ -1,18 +0,0 @@ -belongsTo(Usuario::class); - } -} diff --git a/backend/app/Models/Producto.php b/backend/app/Models/Producto.php index a938c65..2ffd88d 100644 --- a/backend/app/Models/Producto.php +++ b/backend/app/Models/Producto.php @@ -11,6 +11,7 @@ class Producto extends Model { use UuidPrimaryKey, SoftDeletes; protected $table = 'productos'; + protected $hidden = ['created_at', 'updated_at', 'deleted_at', 'pivot']; protected $fillable = [ 'id', 'nombre', 'precio_venta', 'categoria_id', 'zona_produccion_id', 'restaurante_id' diff --git a/backend/app/Models/Productor.php b/backend/app/Models/Productor.php deleted file mode 100644 index 4fb02a2..0000000 --- a/backend/app/Models/Productor.php +++ /dev/null @@ -1,22 +0,0 @@ -belongsTo(Usuario::class); - } - - public function zonaProduccion() { - return $this->belongsTo(ZonaProduccion::class); - } -} diff --git a/backend/app/Models/Proveedor.php b/backend/app/Models/Proveedor.php index b43788a..d6631bf 100644 --- a/backend/app/Models/Proveedor.php +++ b/backend/app/Models/Proveedor.php @@ -11,6 +11,7 @@ class Proveedor extends Model { use UuidPrimaryKey, SoftDeletes; protected $table = 'proveedores'; + protected $hidden = ['created_at', 'updated_at', 'deleted_at', 'pivot']; protected $fillable = [ 'id', 'rut', 'nombre', 'descripcion', 'direccion', 'telefono', 'restaurante_id' diff --git a/backend/app/Models/Recaudador.php b/backend/app/Models/Recaudador.php deleted file mode 100644 index 44ad161..0000000 --- a/backend/app/Models/Recaudador.php +++ /dev/null @@ -1,18 +0,0 @@ -belongsTo(Usuario::class); - } -} diff --git a/backend/app/Models/Receta.php b/backend/app/Models/Receta.php index f8834e8..aea1261 100644 --- a/backend/app/Models/Receta.php +++ b/backend/app/Models/Receta.php @@ -10,6 +10,7 @@ class Receta extends Model { use UuidPrimaryKey; protected $table = 'recetas'; + protected $hidden = ['created_at', 'updated_at', 'deleted_at', 'pivot']; protected $fillable = ['unidades', 'producto_id', 'ingrediente_id']; public function ingrediente() { diff --git a/backend/app/Models/Restaurante.php b/backend/app/Models/Restaurante.php index d1ca84a..83deb8d 100644 --- a/backend/app/Models/Restaurante.php +++ b/backend/app/Models/Restaurante.php @@ -2,13 +2,6 @@ namespace App\Models; -use App\Models\CanalVenta; -use App\Models\Sector; -use App\Models\ZonaProduccion; -use App\Models\Categoria; -use App\Models\Proveedor; -use App\Models\Ingrediente; -use App\Models\Producto; use App\Traits\UuidPrimaryKey; use App\Exceptions\ModelNotFoundException; use Illuminate\Database\Eloquent\Model; @@ -20,7 +13,7 @@ class Restaurante extends Model { use UuidPrimaryKey, SoftDeletes; protected $table = 'restaurantes'; - + protected $hidden = ['created_at', 'updated_at', 'deleted_at', 'pivot']; protected $fillable = ['id', 'nombre']; public static function findOrFail($id) { @@ -29,14 +22,22 @@ class Restaurante extends Model { return $restaurante; } - public function usuarios() { - return $this->belongsToMany(Usuario::class, 'usuarios_restaurantes', 'restaurante_id', 'usuario_id'); - } - public function canalesVenta() { return $this->hasMany(CanalVenta::class, 'restaurante_id'); } + public function categorias() { + return $this->hasMany(Categoria::class, 'restaurante_id'); + } + + public function compras() { + return $this->hasMany(Compra::class, 'restaurante_id'); + } + + public function usuarios() { + return $this->belongsToMany(Usuario::class, 'usuarios_restaurantes', 'restaurante_id', 'usuario_id'); + } + public function sectores() { return $this->hasMany(Sector::class, 'restaurante_id'); } @@ -45,10 +46,6 @@ class Restaurante extends Model { return $this->hasMany(ZonaProduccion::class, 'restaurante_id'); } - public function categorias() { - return $this->hasMany(Categoria::class, 'restaurante_id'); - } - public function proveedores() { return $this->hasMany(Proveedor::class, 'restaurante_id'); } @@ -60,4 +57,36 @@ class Restaurante extends Model { public function productos() { return $this->hasMany(Producto::class, 'restaurante_id'); } + + public function ventas() { + return $this->hasMany(Venta::class, 'restaurante_id'); + } + + public function boletasElectronicas() { + return $this->hasMany(BoletaElectronica::class, 'restaurante_id'); + } + + public function boletasExentas() { + return $this->hasMany(BoletaExenta::class, 'restaurante_id'); + } + + public function cajas() { + return $this->hasMany(Caja::class, 'restaurante_id'); + } + + public function bodegaIngresos() { + return $this->hasMany(BodegaIngreso::class, 'restaurante_id'); + } + + public function bodegaEgresos() { + return $this->hasMany(BodegaEgreso::class, 'restaurante_id'); + } + + public function bodegaMovimientos() { + return $this->hasMany(BodegaMovimiento::class, 'restaurante_id'); + } + + public function bodegaActual() { + return $this->hasMany(BodegaActual::class, 'restaurante_id'); + } } diff --git a/backend/app/Models/Sector.php b/backend/app/Models/Sector.php index b36d2ba..0b2f918 100644 --- a/backend/app/Models/Sector.php +++ b/backend/app/Models/Sector.php @@ -11,6 +11,7 @@ class Sector extends Model { use UuidPrimaryKey, SoftDeletes; protected $table = 'sectores'; + protected $hidden = ['created_at', 'updated_at', 'deleted_at', 'pivot']; protected $fillable = ['id', 'nombre', 'restaurante_id']; public static function findOrFail($id) { diff --git a/backend/app/Models/TipoCanal.php b/backend/app/Models/TipoCanal.php index d08f5df..38283a3 100644 --- a/backend/app/Models/TipoCanal.php +++ b/backend/app/Models/TipoCanal.php @@ -11,4 +11,5 @@ class TipoCanal extends Model { use UuidPrimaryKey, SoftDeletes; protected $table = 'tipos_canal'; + protected $hidden = ['created_at', 'updated_at', 'deleted_at', 'pivot']; } diff --git a/backend/app/Models/Usuario.php b/backend/app/Models/Usuario.php index 804db47..e2a487f 100644 --- a/backend/app/Models/Usuario.php +++ b/backend/app/Models/Usuario.php @@ -16,6 +16,7 @@ class Usuario extends Model { use UuidPrimaryKey, SoftDeletes; protected $table = 'usuarios'; + protected $hidden = ['created_at', 'updated_at', 'deleted_at', 'pivot']; protected $fillable = ['id', 'auth0_id', 'nombre']; protected $appends = ['roles']; @@ -32,32 +33,30 @@ class Usuario extends Model { } public function isGlobalAdmin() { - return in_array('global_admin', $this->roles); + return $this->hasRole('global_admin'); } public function isAdmin() { - return in_array('admin', $this->roles); + return $this->hasRole('admin'); + } + + public function hasRole($role) { + return in_array($role, $this->roles); + } + + public function isOnRestaurante($restaurante) { + if($this->isGlobalAdmin()) return true; + return $this->restaurantes()->where('id', $restaurante->id)->count() > 0; } public function restaurantes() { return $this->belongsToMany(Restaurante::class, 'usuarios_restaurantes', 'usuario_id', 'restaurante_id'); } - public function administrador() { - return $this->hasOne(Administrador::class); + public function zonasProduccion() { + return $this->belongsToMany(ZonaProduccion::class, 'productores', 'usuario_id', 'zona_produccion_id'); } - public function recaudador() { - return $this->hasOne(Recaudador::class); - } - - public function mesero() { - return $this->hasOne(Mesero::class); - } - - public function productor() { - return $this->hasOne(Productor::class); - } public function getRolesAttribute() { $auth0Service = app(Auth0Service::class); diff --git a/backend/app/Models/Venta.php b/backend/app/Models/Venta.php index 4ba7854..8fcce20 100644 --- a/backend/app/Models/Venta.php +++ b/backend/app/Models/Venta.php @@ -11,6 +11,7 @@ class Venta extends Model { use UuidPrimaryKey, SoftDeletes; protected $table = 'ventas'; + protected $hidden = ['created_at', 'updated_at', 'deleted_at', 'pivot']; public function mesero() { return $this->belongsTo(Mesero::class); diff --git a/backend/app/Models/VentaProducto.php b/backend/app/Models/VentaProducto.php index 5b3c929..20eb00c 100644 --- a/backend/app/Models/VentaProducto.php +++ b/backend/app/Models/VentaProducto.php @@ -11,6 +11,7 @@ class VentaProducto extends Model { use UuidPrimaryKey, SoftDeletes; protected $table = 'venta_productos'; + protected $hidden = ['created_at', 'updated_at', 'deleted_at', 'pivot']; public function venta() { return $this->belongsTo(Venta::class); diff --git a/backend/app/Models/ZonaProduccion.php b/backend/app/Models/ZonaProduccion.php index 95bc971..c98ee76 100644 --- a/backend/app/Models/ZonaProduccion.php +++ b/backend/app/Models/ZonaProduccion.php @@ -11,6 +11,7 @@ class ZonaProduccion extends Model { use UuidPrimaryKey, SoftDeletes; protected $table = 'zonas_produccion'; + protected $hidden = ['created_at', 'updated_at', 'deleted_at', 'pivot']; protected $fillable = ['id', 'nombre', 'restaurante_id']; public static function findOrFail($id) { @@ -22,4 +23,8 @@ class ZonaProduccion extends Model { public function restaurante() { return $this->belongsTo(Restaurante::class); } + + public function usuarios() { + return $this->belongsToMany(Usuario::class, 'productores', 'zona_produccion_id', 'usuario_id'); + } } diff --git a/backend/bootstrap/app.php b/backend/bootstrap/app.php index 891d15e..7d54447 100644 --- a/backend/bootstrap/app.php +++ b/backend/bootstrap/app.php @@ -76,7 +76,9 @@ $app->configure('logging'); $app->routeMiddleware([ 'auth' => App\Http\Middleware\Auth0Middleware::class, - 'log_endpoint' => App\Http\Middleware\LogEndpointHitMiddleware::class + 'log_endpoint' => App\Http\Middleware\LogEndpointHitMiddleware::class, + 'role' => App\Http\Middleware\RoleMiddleware::class, + 'in_restaurante' => App\Http\Middleware\InRestauranteMiddleware::class ]); $app->middleware([ diff --git a/backend/routes/web.php b/backend/routes/web.php index ce37526..511659a 100644 --- a/backend/routes/web.php +++ b/backend/routes/web.php @@ -8,69 +8,94 @@ $router->get('/', function () use ($router) { $router->group(['prefix' => 'api/v1', 'middleware' => ['auth', 'log_endpoint']], function () use ($router) { $router->group(['prefix' => '/users'], function () use ($router) { - $router->get( '/', ['as' => 'users.all', 'uses' => 'UsuariosController@all']); - $router->get( '/{id}', ['as' => 'users.get', 'uses' => 'UsuariosController@get']); - $router->post( '/', ['as' => 'users.create', 'uses' => 'UsuariosController@create']); - $router->put( '/{id}', ['as' => 'users.update', 'uses' => 'UsuariosController@update']); - $router->delete('/{id}', ['as' => 'users.delete', 'uses' => 'UsuariosController@delete']); - $router->get( '/{id}/restaurantes/', ['as' => 'users.get_restaurantes', 'uses' => 'UsuariosController@getRestaurantes']); - $router->put( '/{id}/restaurantes/{restaurant}', ['as' => 'users.add_to_restaurant', 'uses' => 'UsuariosController@addToRestaurant']); - $router->delete('/{id}/restaurantes/{restaurant}', ['as' => 'users.remove_from_restaurant', 'uses' => 'UsuariosController@removeFromRestaurant']); + $router->get( '/', ['as' => 'users.all', 'uses' => 'UsuariosController@all', 'middleware' => ['role:admin|global_admin']]); + $router->get( '/{id}', ['as' => 'users.get', 'uses' => 'UsuariosController@get', 'middleware' => ['role:admin|global_admin']]); + $router->post( '/', ['as' => 'users.create', 'uses' => 'UsuariosController@create', 'middleware' => ['role:admin|global_admin']]); + $router->put( '/{id}', ['as' => 'users.update', 'uses' => 'UsuariosController@update', 'middleware' => ['role:admin|global_admin']]); + $router->delete('/{id}', ['as' => 'users.delete', 'uses' => 'UsuariosController@delete', 'middleware' => ['role:admin|global_admin']]); + $router->get( '/{id}/restaurantes/', ['as' => 'users.get_restaurantes', 'uses' => 'UsuariosController@getRestaurantes', 'middleware' => ['role:admin|global_admin']]); + $router->put( '/{id}/restaurantes/{restaurant}', ['as' => 'users.add_to_restaurant', 'uses' => 'UsuariosController@addToRestaurant', 'middleware' => ['role:admin|global_admin']]); + $router->delete('/{id}/restaurantes/{restaurant}', ['as' => 'users.remove_from_restaurant', 'uses' => 'UsuariosController@removeFromRestaurant', 'middleware' => ['role:admin|global_admin']]); }); $router->group(['prefix' => '/restaurantes'], function () use ($router) { $router->get( '/', ['as' => 'restaurant.all', 'uses' => 'RestaurantesController@all']); $router->get( '/{id}', ['as' => 'restaurant.get', 'uses' => 'RestaurantesController@get']); - $router->post( '/', ['as' => 'restaurant.create', 'uses' => 'RestaurantesController@create']); - $router->put( '/{id}', ['as' => 'restaurant.update', 'uses' => 'RestaurantesController@update']); - $router->delete('/{id}', ['as' => 'restaurant.delete', 'uses' => 'RestaurantesController@delete']); + $router->post( '/', ['as' => 'restaurant.create', 'uses' => 'RestaurantesController@create', 'middleware' => ['role:global_admin']]); + $router->put( '/{id}', ['as' => 'restaurant.update', 'uses' => 'RestaurantesController@update', 'middleware' => ['role:admin|global_admin']]); + $router->delete('/{id}', ['as' => 'restaurant.delete', 'uses' => 'RestaurantesController@delete', 'middleware' => ['role:global_admin']]); - $router->get( '/{restaurante_id}/canales-venta', ['as' => 'canales-venta.all', 'uses' => 'CanalesVentaController@all']); - $router->get( '/{restaurante_id}/canales-venta/{id}', ['as' => 'canales-venta.get', 'uses' => 'CanalesVentaController@get']); - $router->post( '/{restaurante_id}/canales-venta', ['as' => 'canales-venta.create', 'uses' => 'CanalesVentaController@create']); - $router->put( '/{restaurante_id}/canales-venta/{id}', ['as' => 'canales-venta.update', 'uses' => 'CanalesVentaController@update']); - $router->delete('/{restaurante_id}/canales-venta/{id}', ['as' => 'canales-venta.delete', 'uses' => 'CanalesVentaController@delete']); + $router->get( '/{restaurante_id}/canales-venta', ['as' => 'canales-venta.all', 'uses' => 'CanalesVentaController@all', 'middleware' => ['in_restaurante']]); + $router->get( '/{restaurante_id}/canales-venta/{id}', ['as' => 'canales-venta.get', 'uses' => 'CanalesVentaController@get', 'middleware' => ['in_restaurante']]); + $router->post( '/{restaurante_id}/canales-venta', ['as' => 'canales-venta.create', 'uses' => 'CanalesVentaController@create', 'middleware' => ['role:admin|global_admin', 'in_restaurante']]); + $router->put( '/{restaurante_id}/canales-venta/{id}', ['as' => 'canales-venta.update', 'uses' => 'CanalesVentaController@update', 'middleware' => ['role:admin|global_admin', 'in_restaurante']]); + $router->delete('/{restaurante_id}/canales-venta/{id}', ['as' => 'canales-venta.delete', 'uses' => 'CanalesVentaController@delete', 'middleware' => ['role:admin|global_admin', 'in_restaurante']]); - $router->get( '/{restaurante_id}/sectores', ['as' => 'sectores.all', 'uses' => 'SectoresController@all']); - $router->get( '/{restaurante_id}/sectores/{id}', ['as' => 'sectores.get', 'uses' => 'SectoresController@get']); - $router->post( '/{restaurante_id}/sectores', ['as' => 'sectores.create', 'uses' => 'SectoresController@create']); - $router->put( '/{restaurante_id}/sectores/{id}', ['as' => 'sectores.update', 'uses' => 'SectoresController@update']); - $router->delete('/{restaurante_id}/sectores/{id}', ['as' => 'sectores.delete', 'uses' => 'SectoresController@delete']); + $router->get( '/{restaurante_id}/sectores', ['as' => 'sectores.all', 'uses' => 'SectoresController@all', 'middleware' => ['in_restaurante']]); + $router->get( '/{restaurante_id}/sectores/{id}', ['as' => 'sectores.get', 'uses' => 'SectoresController@get', 'middleware' => ['in_restaurante']]); + $router->post( '/{restaurante_id}/sectores', ['as' => 'sectores.create', 'uses' => 'SectoresController@create', 'middleware' => ['role:admin|global_admin', 'in_restaurante']]); + $router->put( '/{restaurante_id}/sectores/{id}', ['as' => 'sectores.update', 'uses' => 'SectoresController@update', 'middleware' => ['role:admin|global_admin', 'in_restaurante']]); + $router->delete('/{restaurante_id}/sectores/{id}', ['as' => 'sectores.delete', 'uses' => 'SectoresController@delete', 'middleware' => ['role:admin|global_admin', 'in_restaurante']]); - $router->get( '/{restaurante_id}/zonas-produccion', ['as' => 'zonas-produccion.all', 'uses' => 'ZonasProduccionController@all']); - $router->get( '/{restaurante_id}/zonas-produccion/{id}', ['as' => 'zonas-produccion.get', 'uses' => 'ZonasProduccionController@get']); - $router->post( '/{restaurante_id}/zonas-produccion', ['as' => 'zonas-produccion.create', 'uses' => 'ZonasProduccionController@create']); - $router->put( '/{restaurante_id}/zonas-produccion/{id}', ['as' => 'zonas-produccion.update', 'uses' => 'ZonasProduccionController@update']); - $router->delete('/{restaurante_id}/zonas-produccion/{id}', ['as' => 'zonas-produccion.delete', 'uses' => 'ZonasProduccionController@delete']); + $router->get( '/{restaurante_id}/zonas-produccion', ['as' => 'zonas-produccion.all', 'uses' => 'ZonasProduccionController@all', 'middleware' => ['in_restaurante']]); + $router->get( '/{restaurante_id}/zonas-produccion/{id}', ['as' => 'zonas-produccion.get', 'uses' => 'ZonasProduccionController@get', 'middleware' => ['in_restaurante']]); + $router->get( '/{restaurante_id}/zonas-produccion/{id}/users', ['as' => 'zonas-produccion.users', 'uses' => 'ZonasProduccionController@users', 'middleware' => ['in_restaurante']]); + $router->post( '/{restaurante_id}/zonas-produccion', ['as' => 'zonas-produccion.create', 'uses' => 'ZonasProduccionController@create', 'middleware' => ['role:admin|global_admin', 'in_restaurante']]); + $router->put( '/{restaurante_id}/zonas-produccion/{id}', ['as' => 'zonas-produccion.update', 'uses' => 'ZonasProduccionController@update', 'middleware' => ['role:admin|global_admin', 'in_restaurante']]); + $router->delete('/{restaurante_id}/zonas-produccion/{id}', ['as' => 'zonas-produccion.delete', 'uses' => 'ZonasProduccionController@delete', 'middleware' => ['role:admin|global_admin', 'in_restaurante']]); - $router->get( '/{restaurante_id}/categorias', ['as' => 'categorias.all', 'uses' => 'CategoriasController@all']); - $router->get( '/{restaurante_id}/categorias/{id}', ['as' => 'categorias.get', 'uses' => 'CategoriasController@get']); - $router->post( '/{restaurante_id}/categorias', ['as' => 'categorias.create', 'uses' => 'CategoriasController@create']); - $router->put( '/{restaurante_id}/categorias/{id}', ['as' => 'categorias.update', 'uses' => 'CategoriasController@update']); - $router->delete('/{restaurante_id}/categorias/{id}', ['as' => 'categorias.delete', 'uses' => 'CategoriasController@delete']); + $router->get( '/{restaurante_id}/categorias', ['as' => 'categorias.all', 'uses' => 'CategoriasController@all', 'middleware' => ['in_restaurante']]); + $router->get( '/{restaurante_id}/categorias/{id}', ['as' => 'categorias.get', 'uses' => 'CategoriasController@get', 'middleware' => ['in_restaurante']]); + $router->post( '/{restaurante_id}/categorias', ['as' => 'categorias.create', 'uses' => 'CategoriasController@create', 'middleware' => ['role:admin|global_admin', 'in_restaurante']]); + $router->put( '/{restaurante_id}/categorias/{id}', ['as' => 'categorias.update', 'uses' => 'CategoriasController@update', 'middleware' => ['role:admin|global_admin', 'in_restaurante']]); + $router->delete('/{restaurante_id}/categorias/{id}', ['as' => 'categorias.delete', 'uses' => 'CategoriasController@delete', 'middleware' => ['role:admin|global_admin', 'in_restaurante']]); - $router->get( '/{restaurante_id}/proveedores', ['as' => 'proveedores.all', 'uses' => 'ProveedoresController@all']); - $router->get( '/{restaurante_id}/proveedores/{id}', ['as' => 'proveedores.get', 'uses' => 'ProveedoresController@get']); - $router->post( '/{restaurante_id}/proveedores', ['as' => 'proveedores.create', 'uses' => 'ProveedoresController@create']); - $router->put( '/{restaurante_id}/proveedores/{id}', ['as' => 'proveedores.update', 'uses' => 'ProveedoresController@update']); - $router->delete('/{restaurante_id}/proveedores/{id}', ['as' => 'proveedores.delete', 'uses' => 'ProveedoresController@delete']); + $router->get( '/{restaurante_id}/proveedores', ['as' => 'proveedores.all', 'uses' => 'ProveedoresController@all', 'middleware' => ['in_restaurante']]); + $router->get( '/{restaurante_id}/proveedores/{id}', ['as' => 'proveedores.get', 'uses' => 'ProveedoresController@get', 'middleware' => ['in_restaurante']]); + $router->post( '/{restaurante_id}/proveedores', ['as' => 'proveedores.create', 'uses' => 'ProveedoresController@create', 'middleware' => ['role:admin|global_admin', 'in_restaurante']]); + $router->put( '/{restaurante_id}/proveedores/{id}', ['as' => 'proveedores.update', 'uses' => 'ProveedoresController@update', 'middleware' => ['role:admin|global_admin', 'in_restaurante']]); + $router->delete('/{restaurante_id}/proveedores/{id}', ['as' => 'proveedores.delete', 'uses' => 'ProveedoresController@delete', 'middleware' => ['role:admin|global_admin', 'in_restaurante']]); - $router->get( '/{restaurante_id}/ingredientes', ['as' => 'ingredientes.all', 'uses' => 'IngredientesController@all']); - $router->get( '/{restaurante_id}/ingredientes/{id}', ['as' => 'ingredientes.get', 'uses' => 'IngredientesController@get']); - $router->post( '/{restaurante_id}/ingredientes', ['as' => 'ingredientes.create', 'uses' => 'IngredientesController@create']); - $router->put( '/{restaurante_id}/ingredientes/{id}', ['as' => 'ingredientes.update', 'uses' => 'IngredientesController@update']); - $router->delete('/{restaurante_id}/ingredientes/{id}', ['as' => 'ingredientes.delete', 'uses' => 'IngredientesController@delete']); + $router->get( '/{restaurante_id}/ingredientes', ['as' => 'ingredientes.all', 'uses' => 'IngredientesController@all', 'middleware' => ['in_restaurante']]); + $router->get( '/{restaurante_id}/ingredientes/{id}', ['as' => 'ingredientes.get', 'uses' => 'IngredientesController@get', 'middleware' => ['in_restaurante']]); + $router->post( '/{restaurante_id}/ingredientes', ['as' => 'ingredientes.create', 'uses' => 'IngredientesController@create', 'middleware' => ['role:admin|global_admin', 'in_restaurante']]); + $router->put( '/{restaurante_id}/ingredientes/{id}', ['as' => 'ingredientes.update', 'uses' => 'IngredientesController@update', 'middleware' => ['role:admin|global_admin', 'in_restaurante']]); + $router->delete('/{restaurante_id}/ingredientes/{id}', ['as' => 'ingredientes.delete', 'uses' => 'IngredientesController@delete', 'middleware' => ['role:admin|global_admin', 'in_restaurante']]); - $router->get( '/{restaurante_id}/productos', ['as' => 'productos.all', 'uses' => 'ProductosController@all']); - $router->get( '/{restaurante_id}/productos/{id}', ['as' => 'productos.get', 'uses' => 'ProductosController@get']); - $router->post( '/{restaurante_id}/productos', ['as' => 'productos.create', 'uses' => 'ProductosController@create']); - $router->put( '/{restaurante_id}/productos/{id}', ['as' => 'productos.update', 'uses' => 'ProductosController@update']); - $router->delete('/{restaurante_id}/productos/{id}', ['as' => 'productos.delete', 'uses' => 'ProductosController@delete']); + $router->get( '/{restaurante_id}/productos', ['as' => 'productos.all', 'uses' => 'ProductosController@all', 'middleware' => ['in_restaurante']]); + $router->get( '/{restaurante_id}/productos/{id}', ['as' => 'productos.get', 'uses' => 'ProductosController@get', 'middleware' => ['in_restaurante']]); + $router->post( '/{restaurante_id}/productos', ['as' => 'productos.create', 'uses' => 'ProductosController@create', 'middleware' => ['role:admin|global_admin', 'in_restaurante']]); + $router->put( '/{restaurante_id}/productos/{id}', ['as' => 'productos.update', 'uses' => 'ProductosController@update', 'middleware' => ['role:admin|global_admin', 'in_restaurante']]); + $router->delete('/{restaurante_id}/productos/{id}', ['as' => 'productos.delete', 'uses' => 'ProductosController@delete', 'middleware' => ['role:admin|global_admin', 'in_restaurante']]); - $router->get( '/{restaurante_id}/productos/{producto_id}/ingredientes/', ['as' => 'productos.receta.all', 'uses' => 'RecetasController@all']); - $router->get( '/{restaurante_id}/productos/{producto_id}/ingredientes/{ingrediente_id}', ['as' => 'productos.receta.get', 'uses' => 'RecetasController@get']); - $router->post( '/{restaurante_id}/productos/{producto_id}/ingredientes/{ingrediente_id}', ['as' => 'productos.receta.add_ingrediente', 'uses' => 'RecetasController@create']); - $router->put( '/{restaurante_id}/productos/{producto_id}/ingredientes/{ingrediente_id}', ['as' => 'productos.receta.update_ingrediente', 'uses' => 'RecetasController@update']); - $router->delete('/{restaurante_id}/productos/{producto_id}/ingredientes/{ingrediente_id}', ['as' => 'productos.receta.remove_ingrediente', 'uses' => 'RecetasController@delete']); + $router->get( '/{restaurante_id}/productos/{producto_id}/ingredientes/', ['as' => 'productos.receta.all', 'uses' => 'RecetasController@all', 'middleware' => ['in_restaurante']]); + $router->get( '/{restaurante_id}/productos/{producto_id}/ingredientes/{ingrediente_id}', ['as' => 'productos.receta.get', 'uses' => 'RecetasController@get', 'middleware' => ['in_restaurante']]); + $router->post( '/{restaurante_id}/productos/{producto_id}/ingredientes/{ingrediente_id}', ['as' => 'productos.receta.add_ingrediente', 'uses' => 'RecetasController@create', 'middleware' => ['role:admin|global_admin', 'in_restaurante']]); + $router->put( '/{restaurante_id}/productos/{producto_id}/ingredientes/{ingrediente_id}', ['as' => 'productos.receta.update_ingrediente', 'uses' => 'RecetasController@update', 'middleware' => ['role:admin|global_admin', 'in_restaurante']]); + $router->delete('/{restaurante_id}/productos/{producto_id}/ingredientes/{ingrediente_id}', ['as' => 'productos.receta.remove_ingrediente', 'uses' => 'RecetasController@delete', 'middleware' => ['role:admin|global_admin', 'in_restaurante']]); + + $router->get( '/{restaurante_id}/compras', ['as' => 'compras.all', 'uses' => 'ComprasController@all', 'middleware' => ['in_restaurante']]); + $router->get( '/{restaurante_id}/compras/{id}', ['as' => 'compras.get', 'uses' => 'ComprasController@get', 'middleware' => ['in_restaurante']]); + $router->post( '/{restaurante_id}/compras', ['as' => 'compras.create', 'uses' => 'ComprasController@create', 'middleware' => ['role:admin|global_admin', 'in_restaurante']]); + $router->put( '/{restaurante_id}/compras/{id}', ['as' => 'compras.update', 'uses' => 'ComprasController@update', 'middleware' => ['role:admin|global_admin', 'in_restaurante']]); + $router->delete('/{restaurante_id}/compras/{id}', ['as' => 'compras.delete', 'uses' => 'ComprasController@delete', 'middleware' => ['role:admin|global_admin', 'in_restaurante']]); + + $router->get( '/{restaurante_id}/compras/{id}/ingredientes', ['as' => 'compras.ingredientes.get', 'uses' => 'ComprasController@getIngredientes', 'middleware' => ['in_restaurante']]); + $router->post( '/{restaurante_id}/compras/{id}/ingredientes/{ingrediente_id}', ['as' => 'compras.ingredientes.add', 'uses' => 'ComprasController@addIngrediente', 'middleware' => ['role:admin|global_admin', 'in_restaurante']]); + $router->delete('/{restaurante_id}/compras/{id}/ingredientes/{ingrediente_id}', ['as' => 'compras.ingredientes.delete', 'uses' => 'ComprasController@deleteIngrediente','middleware' => ['role:admin|global_admin', 'in_restaurante']]); + + $router->get( '/{restaurante_id}/compras/{id}/factura', ['as' => 'factura.get', 'uses' => 'FacturasController@get', 'middleware' => ['in_restaurante']]); + $router->post( '/{restaurante_id}/compras/{id}/factura', ['as' => 'factura.create', 'uses' => 'FacturasController@create', 'middleware' => ['role:admin|global_admin', 'in_restaurante']]); + $router->put( '/{restaurante_id}/compras/{id}/factura', ['as' => 'factura.update', 'uses' => 'FacturasController@update', 'middleware' => ['role:admin|global_admin', 'in_restaurante']]); + $router->delete('/{restaurante_id}/compras/{id}/factura', ['as' => 'factura.delete', 'uses' => 'FacturasController@delete', 'middleware' => ['role:admin|global_admin', 'in_restaurante']]); + + $router->get( '/{restaurante_id}/bodega/ingresos', ['as' => 'bodega.ingresos', 'uses' => 'BodegaController@ingresos', 'middleware' => ['in_restaurante']]); + $router->get( '/{restaurante_id}/bodega/ingresos/{ingrediente_id}', ['as' => 'bodega.ingresos_ingrediente', 'uses' => 'BodegaController@ingresos_ingrediente', 'middleware' => ['in_restaurante']]); + $router->get( '/{restaurante_id}/bodega/egresos', ['as' => 'bodega.egresos', 'uses' => 'BodegaController@egresos', 'middleware' => ['in_restaurante']]); + $router->get( '/{restaurante_id}/bodega/egresos/{ingrediente_id}', ['as' => 'bodega.egresos_ingrediente', 'uses' => 'BodegaController@egresos_ingrediente', 'middleware' => ['in_restaurante']]); + $router->get( '/{restaurante_id}/bodega/movimientos', ['as' => 'bodega.movimientos', 'uses' => 'BodegaController@movimientos', 'middleware' => ['in_restaurante']]); + $router->get( '/{restaurante_id}/bodega/movimientos/{ingrediente_id}', ['as' => 'bodega.movimientos_ingrediente', 'uses' => 'BodegaController@movimientos_ingrediente', 'middleware' => ['in_restaurante']]); + $router->get( '/{restaurante_id}/bodega/actual', ['as' => 'bodega.actual', 'uses' => 'BodegaController@actual', 'middleware' => ['in_restaurante']]); + $router->get( '/{restaurante_id}/bodega/actual/{ingrediente_id}', ['as' => 'bodega.actual_ingrediente', 'uses' => 'BodegaController@actual_ingrediente', 'middleware' => ['in_restaurante']]); }); }); diff --git a/database/init/00-schema.sql b/database/init/00-schema.sql index 4f419b6..90b5563 100644 --- a/database/init/00-schema.sql +++ b/database/init/00-schema.sql @@ -183,31 +183,25 @@ create table compras create table facturas ( - id uuid primary key default gen_random_uuid(), - numero text not null, - monto_bruto bigint not null, - iva bigint not null default 0, - ila bigint not null default 0, - monto_neto bigint not null, - fecha_emision date not null, - fecha_vencimiento date not null, - compra_id uuid references compras, - created_at timestamptz not null default current_timestamp, - updated_at timestamptz not null default current_timestamp, - deleted_at timestamptz + id uuid primary key default gen_random_uuid(), + numero text not null, + monto_bruto bigint not null, + compra_id uuid references compras, + created_at timestamptz not null default current_timestamp, + updated_at timestamptz not null default current_timestamp, + deleted_at timestamptz ); create table compra_ingredientes ( - id uuid primary key default gen_random_uuid(), - unidades numeric not null, - monto_unitario_bruto bigint not null, - monto_unitario_neto bigint not null, - compra_id uuid references compras, - ingrediente_id uuid references ingredientes, - created_at timestamptz not null default current_timestamp, - updated_at timestamptz not null default current_timestamp, - deleted_at timestamptz + id uuid primary key default gen_random_uuid(), + unidades numeric not null, + monto_unitario bigint not null, + compra_id uuid references compras, + ingrediente_id uuid references ingredientes, + created_at timestamptz not null default current_timestamp, + updated_at timestamptz not null default current_timestamp, + deleted_at timestamptz ); create table sectores @@ -340,8 +334,8 @@ create table bodega_egresos ( unidades numeric not null, fecha timestamptz not null, - ingrediente_id uuid references ingredientes, - restaurante_id uuid references restaurantes, + ingrediente_id uuid not null, + restaurante_id uuid not null, created_at timestamptz not null default current_timestamp, updated_at timestamptz not null default current_timestamp, deleted_at timestamptz @@ -351,8 +345,8 @@ create table bodega_ingresos ( unidades numeric not null, fecha timestamptz not null, - ingrediente_id uuid references ingredientes, - restaurante_id uuid references restaurantes, + ingrediente_id uuid not null, + restaurante_id uuid not null, created_at timestamptz not null default current_timestamp, updated_at timestamptz not null default current_timestamp, deleted_at timestamptz diff --git a/database/modelo.vpp b/database/modelo.vpp index ddb1d9f..26e2ba9 100644 Binary files a/database/modelo.vpp and b/database/modelo.vpp differ diff --git a/database/modifications/03-simplify-facturas.sql b/database/modifications/03-simplify-facturas.sql new file mode 100644 index 0000000..fab4bb3 --- /dev/null +++ b/database/modifications/03-simplify-facturas.sql @@ -0,0 +1,8 @@ +alter table facturas drop column iva; +alter table facturas drop column ila; +alter table facturas drop column monto_neto; +alter table facturas drop column fecha_emision; +alter table facturas drop column fecha_vencimiento; + +alter table compra_ingredientes rename column monto_unitario_bruto to monto_unitario; +alter table compra_ingredientes drop column monto_unitario_neto; \ No newline at end of file diff --git a/database/modifications/04-remove-references-from-bodega.sql b/database/modifications/04-remove-references-from-bodega.sql new file mode 100644 index 0000000..52c0f1f --- /dev/null +++ b/database/modifications/04-remove-references-from-bodega.sql @@ -0,0 +1,11 @@ +alter table bodega_egresos drop constraint bodega_egresos_ingrediente_id_fkey; +alter table bodega_egresos drop constraint bodega_egresos_restaurante_id_fkey; + +alter table bodega_ingresos drop constraint bodega_ingresos_ingrediente_id_fkey; +alter table bodega_ingresos drop constraint bodega_ingresos_restaurante_id_fkey; + +alter table bodega_ingresos alter column restaurante_id set not null; +alter table bodega_ingresos alter column ingrediente_id set not null; + +alter table bodega_egresos alter column restaurante_id set not null; +alter table bodega_egresos alter column ingrediente_id set not null; \ No newline at end of file diff --git a/database/modifications/05-simplify-usuario.sql b/database/modifications/05-simplify-usuario.sql new file mode 100644 index 0000000..47fbdc7 --- /dev/null +++ b/database/modifications/05-simplify-usuario.sql @@ -0,0 +1,6 @@ +alter table ventas drop column mesero_id; +alter table ventas add column usuario_id uuid references usuarios; + +drop table meseros; +drop table administradores; +drop table recaudadores; \ No newline at end of file diff --git a/database/selects.sql b/database/selects.sql deleted file mode 100644 index 34559cf..0000000 --- a/database/selects.sql +++ /dev/null @@ -1,8 +0,0 @@ -select * -from bodega_ingresos; -select * -from bodega_egresos; -select * -from bodega_movimientos; -select * -from bodega_actual; \ No newline at end of file