Update postman collection
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
"info": {
|
||||
"_postman_id": "76fd6fd2-53b9-4d92-8e02-1ddcc6207fa2",
|
||||
"name": "ShopIt API — Complete",
|
||||
"description": "Colección canónica generada desde las rutas reales de Laravel. Incluye 137 operaciones HTTP, ejemplos de payload, filtros, archivos y tokens separados para Storefront, Admin App y Scanner.\n\nUso rápido:\n1. Ajustá `base_url` y las credenciales.\n2. Ejecutá el Login de la aplicación correspondiente; el token se guarda automáticamente.\n3. Ajustá los IDs y códigos de las variables de colección.\n\nRegeneración: `php postman/generate-shopit-collection.php`.",
|
||||
"description": "Colección canónica generada desde las rutas reales de Laravel. Incluye 137 operaciones HTTP, presets de configuración para cada integración, ejemplos de payload, filtros, archivos y tokens separados para Storefront, Admin App y Scanner.\n\nUso rápido:\n1. Ajustá `base_url` y las credenciales.\n2. Ejecutá el Login de la aplicación correspondiente; el token se guarda automáticamente.\n3. Ajustá los IDs y códigos de las variables de colección.\n\nRegeneración: `php postman/generate-shopit-collection.php`.",
|
||||
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
|
||||
},
|
||||
"item": [
|
||||
@@ -1425,14 +1425,14 @@
|
||||
],
|
||||
"description": "Ruta Laravel: `GET /api/clients/{client}`\n\nControlador: `App\\Domains\\Client\\Controllers\\ClientController@show`",
|
||||
"url": {
|
||||
"raw": "{{base_url}}/api/clients/{{client_id}}",
|
||||
"raw": "{{base_url}}/api/clients/{{client_code}}",
|
||||
"host": [
|
||||
"{{base_url}}"
|
||||
],
|
||||
"path": [
|
||||
"api",
|
||||
"clients",
|
||||
"{{client_id}}"
|
||||
"{{client_code}}"
|
||||
]
|
||||
}
|
||||
},
|
||||
@@ -1456,14 +1456,14 @@
|
||||
],
|
||||
"description": "Ruta Laravel: `PUT /api/clients/{client}`\n\nControlador: `App\\Domains\\Client\\Controllers\\ClientController@update`",
|
||||
"url": {
|
||||
"raw": "{{base_url}}/api/clients/{{client_id}}",
|
||||
"raw": "{{base_url}}/api/clients/{{client_code}}",
|
||||
"host": [
|
||||
"{{base_url}}"
|
||||
],
|
||||
"path": [
|
||||
"api",
|
||||
"clients",
|
||||
"{{client_id}}"
|
||||
"{{client_code}}"
|
||||
]
|
||||
},
|
||||
"body": {
|
||||
@@ -1496,14 +1496,14 @@
|
||||
],
|
||||
"description": "Ruta Laravel: `PATCH /api/clients/{client}`\n\nControlador: `App\\Domains\\Client\\Controllers\\ClientController@update`",
|
||||
"url": {
|
||||
"raw": "{{base_url}}/api/clients/{{client_id}}",
|
||||
"raw": "{{base_url}}/api/clients/{{client_code}}",
|
||||
"host": [
|
||||
"{{base_url}}"
|
||||
],
|
||||
"path": [
|
||||
"api",
|
||||
"clients",
|
||||
"{{client_id}}"
|
||||
"{{client_code}}"
|
||||
]
|
||||
},
|
||||
"body": {
|
||||
@@ -1531,14 +1531,14 @@
|
||||
],
|
||||
"description": "Ruta Laravel: `DELETE /api/clients/{client}`\n\nControlador: `App\\Domains\\Client\\Controllers\\ClientController@destroy`",
|
||||
"url": {
|
||||
"raw": "{{base_url}}/api/clients/{{client_id}}",
|
||||
"raw": "{{base_url}}/api/clients/{{client_code}}",
|
||||
"host": [
|
||||
"{{base_url}}"
|
||||
],
|
||||
"path": [
|
||||
"api",
|
||||
"clients",
|
||||
"{{client_id}}"
|
||||
"{{client_code}}"
|
||||
]
|
||||
}
|
||||
},
|
||||
@@ -1548,6 +1548,13 @@
|
||||
},
|
||||
{
|
||||
"name": "Integration",
|
||||
"item": [
|
||||
{
|
||||
"name": "Client",
|
||||
"item": [
|
||||
{
|
||||
"name": "Management",
|
||||
"description": "Consulta, configura o desvincula cualquier integración usando `{{integration_code}}`.",
|
||||
"item": [
|
||||
{
|
||||
"name": "List Client Integration",
|
||||
@@ -1560,18 +1567,28 @@
|
||||
"type": "text"
|
||||
}
|
||||
],
|
||||
"description": "Ruta Laravel: `GET /api/clients/{client}/integrations`\n\nControlador: `App\\Domains\\Integration\\Controllers\\ClientIntegrationController@index`",
|
||||
"description": "Ruta Laravel: `GET /api/clients/{client}/integrations`\n\nControlador: `App\\Domains\\Integration\\Controllers\\ClientIntegrationController@index`\n\nRequiere autenticación Sanctum.",
|
||||
"url": {
|
||||
"raw": "{{base_url}}/api/clients/{{client_id}}/integrations",
|
||||
"raw": "{{base_url}}/api/clients/{{client_code}}/integrations",
|
||||
"host": [
|
||||
"{{base_url}}"
|
||||
],
|
||||
"path": [
|
||||
"api",
|
||||
"clients",
|
||||
"{{client_id}}",
|
||||
"{{client_code}}",
|
||||
"integrations"
|
||||
]
|
||||
},
|
||||
"auth": {
|
||||
"type": "bearer",
|
||||
"bearer": [
|
||||
{
|
||||
"key": "token",
|
||||
"value": "{{token}}",
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"response": []
|
||||
@@ -1587,25 +1604,35 @@
|
||||
"type": "text"
|
||||
}
|
||||
],
|
||||
"description": "Ruta Laravel: `GET /api/clients/{client}/integrations/{integration_code}`\n\nControlador: `App\\Domains\\Integration\\Controllers\\ClientIntegrationController@show`",
|
||||
"description": "Ruta Laravel: `GET /api/clients/{client}/integrations/{integration_code}`\n\nControlador: `App\\Domains\\Integration\\Controllers\\ClientIntegrationController@show`\n\nRequiere autenticación Sanctum.",
|
||||
"url": {
|
||||
"raw": "{{base_url}}/api/clients/{{client_id}}/integrations/{{integration_code}}",
|
||||
"raw": "{{base_url}}/api/clients/{{client_code}}/integrations/{{integration_code}}",
|
||||
"host": [
|
||||
"{{base_url}}"
|
||||
],
|
||||
"path": [
|
||||
"api",
|
||||
"clients",
|
||||
"{{client_id}}",
|
||||
"{{client_code}}",
|
||||
"integrations",
|
||||
"{{integration_code}}"
|
||||
]
|
||||
},
|
||||
"auth": {
|
||||
"type": "bearer",
|
||||
"bearer": [
|
||||
{
|
||||
"key": "token",
|
||||
"value": "{{token}}",
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"response": []
|
||||
},
|
||||
{
|
||||
"name": "Create Client Integration",
|
||||
"name": "Configure Integration (generic)",
|
||||
"request": {
|
||||
"method": "PUT",
|
||||
"header": [
|
||||
@@ -1620,16 +1647,16 @@
|
||||
"type": "text"
|
||||
}
|
||||
],
|
||||
"description": "Ruta Laravel: `PUT /api/clients/{client}/integrations/{integration_code}`\n\nControlador: `App\\Domains\\Integration\\Controllers\\ClientIntegrationController@store`",
|
||||
"description": "Ruta Laravel: `PUT /api/clients/{client}/integrations/{integration_code}`\n\nControlador: `App\\Domains\\Integration\\Controllers\\ClientIntegrationController@store`\n\nRequiere autenticación Sanctum.",
|
||||
"url": {
|
||||
"raw": "{{base_url}}/api/clients/{{client_id}}/integrations/{{integration_code}}",
|
||||
"raw": "{{base_url}}/api/clients/{{client_code}}/integrations/{{integration_code}}",
|
||||
"host": [
|
||||
"{{base_url}}"
|
||||
],
|
||||
"path": [
|
||||
"api",
|
||||
"clients",
|
||||
"{{client_id}}",
|
||||
"{{client_code}}",
|
||||
"integrations",
|
||||
"{{integration_code}}"
|
||||
]
|
||||
@@ -1642,78 +1669,24 @@
|
||||
"language": "json"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"response": []
|
||||
},
|
||||
"auth": {
|
||||
"type": "bearer",
|
||||
"bearer": [
|
||||
{
|
||||
"name": "List Integration",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [
|
||||
{
|
||||
"key": "Accept",
|
||||
"value": "application/json",
|
||||
"type": "text"
|
||||
"key": "token",
|
||||
"value": "{{token}}",
|
||||
"type": "string"
|
||||
}
|
||||
],
|
||||
"description": "Ruta Laravel: `GET /api/integrations`\n\nControlador: `App\\Domains\\Integration\\Controllers\\IntegrationController@index`",
|
||||
"url": {
|
||||
"raw": "{{base_url}}/api/integrations",
|
||||
"host": [
|
||||
"{{base_url}}"
|
||||
],
|
||||
"path": [
|
||||
"api",
|
||||
"integrations"
|
||||
]
|
||||
}
|
||||
},
|
||||
"response": []
|
||||
},
|
||||
{
|
||||
"name": "Create Integration",
|
||||
"name": "Delete Client Integration",
|
||||
"request": {
|
||||
"method": "POST",
|
||||
"header": [
|
||||
{
|
||||
"key": "Accept",
|
||||
"value": "application/json",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"key": "Content-Type",
|
||||
"value": "application/json",
|
||||
"type": "text"
|
||||
}
|
||||
],
|
||||
"description": "Ruta Laravel: `POST /api/integrations`\n\nControlador: `App\\Domains\\Integration\\Controllers\\IntegrationController@store`",
|
||||
"url": {
|
||||
"raw": "{{base_url}}/api/integrations",
|
||||
"host": [
|
||||
"{{base_url}}"
|
||||
],
|
||||
"path": [
|
||||
"api",
|
||||
"integrations"
|
||||
]
|
||||
},
|
||||
"body": {
|
||||
"mode": "raw",
|
||||
"raw": "{\n \"integration_code\": \"telepagos\",\n \"name\": \"Telepagos\",\n \"url\": \"https://api.example.com\",\n \"integration_data_schema\": {\n \"api_key\": [\n \"required\",\n \"string\"\n ]\n },\n \"requires_client_configuration\": true\n}",
|
||||
"options": {
|
||||
"raw": {
|
||||
"language": "json"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"response": []
|
||||
},
|
||||
{
|
||||
"name": "Get Integration",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"method": "DELETE",
|
||||
"header": [
|
||||
{
|
||||
"key": "Accept",
|
||||
@@ -1721,23 +1694,41 @@
|
||||
"type": "text"
|
||||
}
|
||||
],
|
||||
"description": "Ruta Laravel: `GET /api/integrations/{integration}`\n\nControlador: `App\\Domains\\Integration\\Controllers\\IntegrationController@show`",
|
||||
"description": "Ruta Laravel: `DELETE /api/clients/{client}/integrations/{integration_code}`\n\nControlador: `App\\Domains\\Integration\\Controllers\\ClientIntegrationController@destroy`\n\nRequiere autenticación Sanctum.",
|
||||
"url": {
|
||||
"raw": "{{base_url}}/api/integrations/{{integration_id}}",
|
||||
"raw": "{{base_url}}/api/clients/{{client_code}}/integrations/{{integration_code}}",
|
||||
"host": [
|
||||
"{{base_url}}"
|
||||
],
|
||||
"path": [
|
||||
"api",
|
||||
"clients",
|
||||
"{{client_code}}",
|
||||
"integrations",
|
||||
"{{integration_id}}"
|
||||
"{{integration_code}}"
|
||||
]
|
||||
},
|
||||
"auth": {
|
||||
"type": "bearer",
|
||||
"bearer": [
|
||||
{
|
||||
"key": "token",
|
||||
"value": "{{token}}",
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"response": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Update Integration",
|
||||
"name": "Email (SMTP)",
|
||||
"description": "Configura el transporte SMTP usado para el envío de correos.",
|
||||
"item": [
|
||||
{
|
||||
"name": "Configure Email (SMTP)",
|
||||
"request": {
|
||||
"method": "PUT",
|
||||
"header": [
|
||||
@@ -1752,32 +1743,298 @@
|
||||
"type": "text"
|
||||
}
|
||||
],
|
||||
"description": "Ruta Laravel: `PUT /api/integrations/{integration}`\n\nControlador: `App\\Domains\\Integration\\Controllers\\IntegrationController@update`",
|
||||
"description": "Ruta Laravel: `PUT /api/clients/{client}/integrations/{integration_code}`\n\nControlador: `App\\Domains\\Integration\\Controllers\\ClientIntegrationController@store`\n\nRequiere autenticación Sanctum.\n\nPreset: `email`. Configura el transporte SMTP usado para el envío de correos.",
|
||||
"url": {
|
||||
"raw": "{{base_url}}/api/integrations/{{integration_id}}",
|
||||
"raw": "{{base_url}}/api/clients/{{client_code}}/integrations/email",
|
||||
"host": [
|
||||
"{{base_url}}"
|
||||
],
|
||||
"path": [
|
||||
"api",
|
||||
"clients",
|
||||
"{{client_code}}",
|
||||
"integrations",
|
||||
"{{integration_id}}"
|
||||
"email"
|
||||
]
|
||||
},
|
||||
"body": {
|
||||
"mode": "raw",
|
||||
"raw": "{\n \"name\": \"Telepagos\",\n \"url\": \"https://api.example.com\",\n \"requires_client_configuration\": true\n}",
|
||||
"raw": "{\n \"integration_data\": {\n \"MAIL_MAILER\": \"smtp\",\n \"MAIL_SCHEME\": \"smtp\",\n \"MAIL_HOST\": \"smtp.example.com\",\n \"MAIL_PORT\": 587,\n \"MAIL_USERNAME\": \"usuario@example.com\",\n \"MAIL_PASSWORD\": \"replace-me\",\n \"MAIL_FROM_ADDRESS\": \"no-reply@example.com\",\n \"MAIL_FROM_NAME\": \"ShopIt\"\n }\n}",
|
||||
"options": {
|
||||
"raw": {
|
||||
"language": "json"
|
||||
}
|
||||
}
|
||||
},
|
||||
"auth": {
|
||||
"type": "bearer",
|
||||
"bearer": [
|
||||
{
|
||||
"key": "token",
|
||||
"value": "{{token}}",
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"response": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Telepagos Producción",
|
||||
"description": "Configura las credenciales productivas de Telepagos.",
|
||||
"item": [
|
||||
{
|
||||
"name": "Configure Telepagos Producción",
|
||||
"request": {
|
||||
"method": "PUT",
|
||||
"header": [
|
||||
{
|
||||
"key": "Accept",
|
||||
"value": "application/json",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"key": "Content-Type",
|
||||
"value": "application/json",
|
||||
"type": "text"
|
||||
}
|
||||
],
|
||||
"description": "Ruta Laravel: `PUT /api/clients/{client}/integrations/{integration_code}`\n\nControlador: `App\\Domains\\Integration\\Controllers\\ClientIntegrationController@store`\n\nRequiere autenticación Sanctum.\n\nPreset: `telepagos`. Configura las credenciales productivas de Telepagos.",
|
||||
"url": {
|
||||
"raw": "{{base_url}}/api/clients/{{client_code}}/integrations/telepagos",
|
||||
"host": [
|
||||
"{{base_url}}"
|
||||
],
|
||||
"path": [
|
||||
"api",
|
||||
"clients",
|
||||
"{{client_code}}",
|
||||
"integrations",
|
||||
"telepagos"
|
||||
]
|
||||
},
|
||||
"body": {
|
||||
"mode": "raw",
|
||||
"raw": "{\n \"integration_data\": {\n \"username\": \"replace-me\",\n \"password\": \"replace-me\"\n }\n}",
|
||||
"options": {
|
||||
"raw": {
|
||||
"language": "json"
|
||||
}
|
||||
}
|
||||
},
|
||||
"auth": {
|
||||
"type": "bearer",
|
||||
"bearer": [
|
||||
{
|
||||
"key": "token",
|
||||
"value": "{{token}}",
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"response": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Telepagos Homologación",
|
||||
"description": "Configura las credenciales del entorno de homologación de Telepagos.",
|
||||
"item": [
|
||||
{
|
||||
"name": "Configure Telepagos Homologación",
|
||||
"request": {
|
||||
"method": "PUT",
|
||||
"header": [
|
||||
{
|
||||
"key": "Accept",
|
||||
"value": "application/json",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"key": "Content-Type",
|
||||
"value": "application/json",
|
||||
"type": "text"
|
||||
}
|
||||
],
|
||||
"description": "Ruta Laravel: `PUT /api/clients/{client}/integrations/{integration_code}`\n\nControlador: `App\\Domains\\Integration\\Controllers\\ClientIntegrationController@store`\n\nRequiere autenticación Sanctum.\n\nPreset: `telepagos_homo`. Configura las credenciales del entorno de homologación de Telepagos.",
|
||||
"url": {
|
||||
"raw": "{{base_url}}/api/clients/{{client_code}}/integrations/telepagos_homo",
|
||||
"host": [
|
||||
"{{base_url}}"
|
||||
],
|
||||
"path": [
|
||||
"api",
|
||||
"clients",
|
||||
"{{client_code}}",
|
||||
"integrations",
|
||||
"telepagos_homo"
|
||||
]
|
||||
},
|
||||
"body": {
|
||||
"mode": "raw",
|
||||
"raw": "{\n \"integration_data\": {\n \"username\": \"replace-me\",\n \"password\": \"replace-me\"\n }\n}",
|
||||
"options": {
|
||||
"raw": {
|
||||
"language": "json"
|
||||
}
|
||||
}
|
||||
},
|
||||
"auth": {
|
||||
"type": "bearer",
|
||||
"bearer": [
|
||||
{
|
||||
"key": "token",
|
||||
"value": "{{token}}",
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"response": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Website Type",
|
||||
"item": [
|
||||
{
|
||||
"name": "Management",
|
||||
"description": "Consulta, configura o desvincula cualquier integración usando `{{integration_code}}`.",
|
||||
"item": [
|
||||
{
|
||||
"name": "List Website Type Integration",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [
|
||||
{
|
||||
"key": "Accept",
|
||||
"value": "application/json",
|
||||
"type": "text"
|
||||
}
|
||||
],
|
||||
"description": "Ruta Laravel: `GET /api/website-types/{websiteType:codigo}/integrations`\n\nControlador: `App\\Domains\\Integration\\Controllers\\WebsiteTypeIntegrationController@index`\n\nRequiere autenticación Sanctum.",
|
||||
"url": {
|
||||
"raw": "{{base_url}}/api/website-types/{{website_type_code}}/integrations",
|
||||
"host": [
|
||||
"{{base_url}}"
|
||||
],
|
||||
"path": [
|
||||
"api",
|
||||
"website-types",
|
||||
"{{website_type_code}}",
|
||||
"integrations"
|
||||
]
|
||||
},
|
||||
"auth": {
|
||||
"type": "bearer",
|
||||
"bearer": [
|
||||
{
|
||||
"key": "token",
|
||||
"value": "{{token}}",
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"response": []
|
||||
},
|
||||
{
|
||||
"name": "Delete Integration",
|
||||
"name": "Get Website Type Integration",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [
|
||||
{
|
||||
"key": "Accept",
|
||||
"value": "application/json",
|
||||
"type": "text"
|
||||
}
|
||||
],
|
||||
"description": "Ruta Laravel: `GET /api/website-types/{websiteType:codigo}/integrations/{integration_code}`\n\nControlador: `App\\Domains\\Integration\\Controllers\\WebsiteTypeIntegrationController@show`\n\nRequiere autenticación Sanctum.",
|
||||
"url": {
|
||||
"raw": "{{base_url}}/api/website-types/{{website_type_code}}/integrations/{{integration_code}}",
|
||||
"host": [
|
||||
"{{base_url}}"
|
||||
],
|
||||
"path": [
|
||||
"api",
|
||||
"website-types",
|
||||
"{{website_type_code}}",
|
||||
"integrations",
|
||||
"{{integration_code}}"
|
||||
]
|
||||
},
|
||||
"auth": {
|
||||
"type": "bearer",
|
||||
"bearer": [
|
||||
{
|
||||
"key": "token",
|
||||
"value": "{{token}}",
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"response": []
|
||||
},
|
||||
{
|
||||
"name": "Configure Integration (generic)",
|
||||
"request": {
|
||||
"method": "PUT",
|
||||
"header": [
|
||||
{
|
||||
"key": "Accept",
|
||||
"value": "application/json",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"key": "Content-Type",
|
||||
"value": "application/json",
|
||||
"type": "text"
|
||||
}
|
||||
],
|
||||
"description": "Ruta Laravel: `PUT /api/website-types/{websiteType:codigo}/integrations/{integration_code}`\n\nControlador: `App\\Domains\\Integration\\Controllers\\WebsiteTypeIntegrationController@store`\n\nRequiere autenticación Sanctum.",
|
||||
"url": {
|
||||
"raw": "{{base_url}}/api/website-types/{{website_type_code}}/integrations/{{integration_code}}",
|
||||
"host": [
|
||||
"{{base_url}}"
|
||||
],
|
||||
"path": [
|
||||
"api",
|
||||
"website-types",
|
||||
"{{website_type_code}}",
|
||||
"integrations",
|
||||
"{{integration_code}}"
|
||||
]
|
||||
},
|
||||
"body": {
|
||||
"mode": "raw",
|
||||
"raw": "{\n \"integration_data\": {\n \"api_key\": \"replace-me\"\n }\n}",
|
||||
"options": {
|
||||
"raw": {
|
||||
"language": "json"
|
||||
}
|
||||
}
|
||||
},
|
||||
"auth": {
|
||||
"type": "bearer",
|
||||
"bearer": [
|
||||
{
|
||||
"key": "token",
|
||||
"value": "{{token}}",
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"response": []
|
||||
},
|
||||
{
|
||||
"name": "Delete Website Type Integration",
|
||||
"request": {
|
||||
"method": "DELETE",
|
||||
"header": [
|
||||
@@ -1787,16 +2044,28 @@
|
||||
"type": "text"
|
||||
}
|
||||
],
|
||||
"description": "Ruta Laravel: `DELETE /api/integrations/{integration}`\n\nControlador: `App\\Domains\\Integration\\Controllers\\IntegrationController@destroy`",
|
||||
"description": "Ruta Laravel: `DELETE /api/website-types/{websiteType:codigo}/integrations/{integration_code}`\n\nControlador: `App\\Domains\\Integration\\Controllers\\WebsiteTypeIntegrationController@destroy`\n\nRequiere autenticación Sanctum.",
|
||||
"url": {
|
||||
"raw": "{{base_url}}/api/integrations/{{integration_id}}",
|
||||
"raw": "{{base_url}}/api/website-types/{{website_type_code}}/integrations/{{integration_code}}",
|
||||
"host": [
|
||||
"{{base_url}}"
|
||||
],
|
||||
"path": [
|
||||
"api",
|
||||
"website-types",
|
||||
"{{website_type_code}}",
|
||||
"integrations",
|
||||
"{{integration_id}}"
|
||||
"{{integration_code}}"
|
||||
]
|
||||
},
|
||||
"auth": {
|
||||
"type": "bearer",
|
||||
"bearer": [
|
||||
{
|
||||
"key": "token",
|
||||
"value": "{{token}}",
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
@@ -1804,6 +2073,184 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Email (SMTP)",
|
||||
"description": "Configura el transporte SMTP usado para el envío de correos.",
|
||||
"item": [
|
||||
{
|
||||
"name": "Configure Email (SMTP)",
|
||||
"request": {
|
||||
"method": "PUT",
|
||||
"header": [
|
||||
{
|
||||
"key": "Accept",
|
||||
"value": "application/json",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"key": "Content-Type",
|
||||
"value": "application/json",
|
||||
"type": "text"
|
||||
}
|
||||
],
|
||||
"description": "Ruta Laravel: `PUT /api/website-types/{websiteType:codigo}/integrations/{integration_code}`\n\nControlador: `App\\Domains\\Integration\\Controllers\\WebsiteTypeIntegrationController@store`\n\nRequiere autenticación Sanctum.\n\nPreset: `email`. Configura el transporte SMTP usado para el envío de correos.",
|
||||
"url": {
|
||||
"raw": "{{base_url}}/api/website-types/{{website_type_code}}/integrations/email",
|
||||
"host": [
|
||||
"{{base_url}}"
|
||||
],
|
||||
"path": [
|
||||
"api",
|
||||
"website-types",
|
||||
"{{website_type_code}}",
|
||||
"integrations",
|
||||
"email"
|
||||
]
|
||||
},
|
||||
"body": {
|
||||
"mode": "raw",
|
||||
"raw": "{\n \"integration_data\": {\n \"MAIL_MAILER\": \"smtp\",\n \"MAIL_SCHEME\": \"smtp\",\n \"MAIL_HOST\": \"smtp.example.com\",\n \"MAIL_PORT\": 587,\n \"MAIL_USERNAME\": \"usuario@example.com\",\n \"MAIL_PASSWORD\": \"replace-me\",\n \"MAIL_FROM_ADDRESS\": \"no-reply@example.com\",\n \"MAIL_FROM_NAME\": \"ShopIt\"\n }\n}",
|
||||
"options": {
|
||||
"raw": {
|
||||
"language": "json"
|
||||
}
|
||||
}
|
||||
},
|
||||
"auth": {
|
||||
"type": "bearer",
|
||||
"bearer": [
|
||||
{
|
||||
"key": "token",
|
||||
"value": "{{token}}",
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"response": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Telepagos Producción",
|
||||
"description": "Configura las credenciales productivas de Telepagos.",
|
||||
"item": [
|
||||
{
|
||||
"name": "Configure Telepagos Producción",
|
||||
"request": {
|
||||
"method": "PUT",
|
||||
"header": [
|
||||
{
|
||||
"key": "Accept",
|
||||
"value": "application/json",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"key": "Content-Type",
|
||||
"value": "application/json",
|
||||
"type": "text"
|
||||
}
|
||||
],
|
||||
"description": "Ruta Laravel: `PUT /api/website-types/{websiteType:codigo}/integrations/{integration_code}`\n\nControlador: `App\\Domains\\Integration\\Controllers\\WebsiteTypeIntegrationController@store`\n\nRequiere autenticación Sanctum.\n\nPreset: `telepagos`. Configura las credenciales productivas de Telepagos.",
|
||||
"url": {
|
||||
"raw": "{{base_url}}/api/website-types/{{website_type_code}}/integrations/telepagos",
|
||||
"host": [
|
||||
"{{base_url}}"
|
||||
],
|
||||
"path": [
|
||||
"api",
|
||||
"website-types",
|
||||
"{{website_type_code}}",
|
||||
"integrations",
|
||||
"telepagos"
|
||||
]
|
||||
},
|
||||
"body": {
|
||||
"mode": "raw",
|
||||
"raw": "{\n \"integration_data\": {\n \"username\": \"replace-me\",\n \"password\": \"replace-me\"\n }\n}",
|
||||
"options": {
|
||||
"raw": {
|
||||
"language": "json"
|
||||
}
|
||||
}
|
||||
},
|
||||
"auth": {
|
||||
"type": "bearer",
|
||||
"bearer": [
|
||||
{
|
||||
"key": "token",
|
||||
"value": "{{token}}",
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"response": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Telepagos Homologación",
|
||||
"description": "Configura las credenciales del entorno de homologación de Telepagos.",
|
||||
"item": [
|
||||
{
|
||||
"name": "Configure Telepagos Homologación",
|
||||
"request": {
|
||||
"method": "PUT",
|
||||
"header": [
|
||||
{
|
||||
"key": "Accept",
|
||||
"value": "application/json",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"key": "Content-Type",
|
||||
"value": "application/json",
|
||||
"type": "text"
|
||||
}
|
||||
],
|
||||
"description": "Ruta Laravel: `PUT /api/website-types/{websiteType:codigo}/integrations/{integration_code}`\n\nControlador: `App\\Domains\\Integration\\Controllers\\WebsiteTypeIntegrationController@store`\n\nRequiere autenticación Sanctum.\n\nPreset: `telepagos_homo`. Configura las credenciales del entorno de homologación de Telepagos.",
|
||||
"url": {
|
||||
"raw": "{{base_url}}/api/website-types/{{website_type_code}}/integrations/telepagos_homo",
|
||||
"host": [
|
||||
"{{base_url}}"
|
||||
],
|
||||
"path": [
|
||||
"api",
|
||||
"website-types",
|
||||
"{{website_type_code}}",
|
||||
"integrations",
|
||||
"telepagos_homo"
|
||||
]
|
||||
},
|
||||
"body": {
|
||||
"mode": "raw",
|
||||
"raw": "{\n \"integration_data\": {\n \"username\": \"replace-me\",\n \"password\": \"replace-me\"\n }\n}",
|
||||
"options": {
|
||||
"raw": {
|
||||
"language": "json"
|
||||
}
|
||||
}
|
||||
},
|
||||
"auth": {
|
||||
"type": "bearer",
|
||||
"bearer": [
|
||||
{
|
||||
"key": "token",
|
||||
"value": "{{token}}",
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"response": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Menu",
|
||||
"item": [
|
||||
@@ -5698,7 +6145,7 @@
|
||||
],
|
||||
"description": "Ruta Laravel: `POST /api/webhooks/telepagos/{client}`\n\nControlador: `App\\Domains\\Integration\\Controllers\\TelepagosWebhookController@handle`",
|
||||
"url": {
|
||||
"raw": "{{base_url}}/api/webhooks/telepagos/{{client_id}}",
|
||||
"raw": "{{base_url}}/api/webhooks/telepagos/{{client_code}}",
|
||||
"host": [
|
||||
"{{base_url}}"
|
||||
],
|
||||
@@ -5706,7 +6153,7 @@
|
||||
"api",
|
||||
"webhooks",
|
||||
"telepagos",
|
||||
"{{client_id}}"
|
||||
"{{client_code}}"
|
||||
]
|
||||
},
|
||||
"body": {
|
||||
@@ -5803,8 +6250,13 @@
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"key": "integration_id",
|
||||
"value": "1",
|
||||
"key": "client_code",
|
||||
"value": "cliente-demo",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"key": "website_type_code",
|
||||
"value": "shopit",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
|
||||
@@ -75,9 +75,8 @@ function bodyFor(string $method, string $uri): ?array
|
||||
'POST api/clients' => ['code' => 'cliente-demo', 'name' => 'Cliente Demo'],
|
||||
'PUT api/clients/{client}' => ['code' => 'cliente-demo', 'name' => 'Cliente Demo Actualizado'],
|
||||
'PATCH api/clients/{client}' => ['name' => 'Cliente Demo Actualizado'],
|
||||
'POST api/integrations' => ['integration_code' => 'telepagos', 'name' => 'Telepagos', 'url' => 'https://api.example.com', 'integration_data_schema' => ['api_key' => ['required', 'string']], 'requires_client_configuration' => true],
|
||||
'PUT api/integrations/{integration}' => ['name' => 'Telepagos', 'url' => 'https://api.example.com', 'requires_client_configuration' => true],
|
||||
'PUT api/clients/{client}/integrations/{integration_code}' => ['integration_data' => ['api_key' => 'replace-me']],
|
||||
'PUT api/website-types/{websiteType:codigo}/integrations/{integration_code}' => ['integration_data' => ['api_key' => 'replace-me']],
|
||||
'POST api/menues' => ['code' => 'demo', 'label' => 'Demo', 'parent_menu_code' => null, 'content_type' => 'static', 'static_content_schema' => ['title' => ['required', 'string']], 'route' => '/demo'],
|
||||
'PUT api/menues/{menue}' => ['label' => 'Demo actualizado', 'route' => '/demo'],
|
||||
'PATCH api/menues/{menue}' => ['label' => 'Demo actualizado'],
|
||||
@@ -276,7 +275,8 @@ function requestName(string $method, string $action, bool $multiMethod): string
|
||||
function pathFor(string $uri): string
|
||||
{
|
||||
$variables = [
|
||||
'tenant:codigo' => 'tenant_code', 'tenant' => 'tenant_id', 'client' => 'client_id',
|
||||
'tenant:codigo' => 'tenant_code', 'tenant' => 'tenant_id', 'client' => 'client_code',
|
||||
'websiteType:codigo' => 'website_type_code',
|
||||
'integration_code' => 'integration_code', 'integration' => 'integration_id', 'menue' => 'menu_id',
|
||||
'menu_code' => 'menu_code', 'tenant_code' => 'tenant_code', 'catalogItem' => 'catalog_item_id',
|
||||
'featuredGroup' => 'featured_group_id', 'category' => 'category_id', 'cartItem' => 'cart_item_id',
|
||||
@@ -331,6 +331,111 @@ function tokenCaptureEvent(string $uri): array
|
||||
];
|
||||
}
|
||||
|
||||
/** @return array<string, array{name: string, description: string, integration_data: array<string, mixed>}> */
|
||||
function integrationConfigurationPresets(): array
|
||||
{
|
||||
return [
|
||||
'email' => [
|
||||
'name' => 'Email (SMTP)',
|
||||
'description' => 'Configura el transporte SMTP usado para el envío de correos.',
|
||||
'integration_data' => [
|
||||
'MAIL_MAILER' => 'smtp',
|
||||
'MAIL_SCHEME' => 'smtp',
|
||||
'MAIL_HOST' => 'smtp.example.com',
|
||||
'MAIL_PORT' => 587,
|
||||
'MAIL_USERNAME' => 'usuario@example.com',
|
||||
'MAIL_PASSWORD' => 'replace-me',
|
||||
'MAIL_FROM_ADDRESS' => 'no-reply@example.com',
|
||||
'MAIL_FROM_NAME' => 'ShopIt',
|
||||
],
|
||||
],
|
||||
'telepagos' => [
|
||||
'name' => 'Telepagos Producción',
|
||||
'description' => 'Configura las credenciales productivas de Telepagos.',
|
||||
'integration_data' => [
|
||||
'username' => 'replace-me',
|
||||
'password' => 'replace-me',
|
||||
],
|
||||
],
|
||||
'telepagos_homo' => [
|
||||
'name' => 'Telepagos Homologación',
|
||||
'description' => 'Configura las credenciales del entorno de homologación de Telepagos.',
|
||||
'integration_data' => [
|
||||
'username' => 'replace-me',
|
||||
'password' => 'replace-me',
|
||||
],
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
/** @param array<int, array<string, mixed>> $requests
|
||||
* @return array<int, array<string, mixed>>
|
||||
*/
|
||||
function integrationOwnerFolders(array $requests): array
|
||||
{
|
||||
$owners = [
|
||||
'Client' => '/api/clients/',
|
||||
'Website Type' => '/api/website-types/',
|
||||
];
|
||||
$folders = [];
|
||||
|
||||
foreach ($owners as $ownerName => $pathFragment) {
|
||||
$ownerRequests = array_values(array_filter(
|
||||
$requests,
|
||||
fn (array $item): bool => str_contains($item['request']['url']['raw'], $pathFragment),
|
||||
));
|
||||
$putTemplate = null;
|
||||
foreach ($ownerRequests as $ownerRequest) {
|
||||
if ($ownerRequest['request']['method'] === 'PUT') {
|
||||
$putTemplate = $ownerRequest;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if ($putTemplate === null) {
|
||||
continue;
|
||||
}
|
||||
|
||||
foreach ($ownerRequests as &$request) {
|
||||
if ($request['request']['method'] === 'PUT') {
|
||||
$request['name'] = 'Configure Integration (generic)';
|
||||
}
|
||||
}
|
||||
unset($request);
|
||||
|
||||
$ownerItems = [[
|
||||
'name' => 'Management',
|
||||
'description' => 'Consulta, configura o desvincula cualquier integración usando `{{integration_code}}`.',
|
||||
'item' => $ownerRequests,
|
||||
]];
|
||||
|
||||
foreach (integrationConfigurationPresets() as $integrationCode => $preset) {
|
||||
$request = $putTemplate;
|
||||
$request['name'] = 'Configure '.$preset['name'];
|
||||
$request['request']['description'] .= "\n\nPreset: `{$integrationCode}`. {$preset['description']}";
|
||||
$request['request']['url']['raw'] = str_replace('{{integration_code}}', $integrationCode, $request['request']['url']['raw']);
|
||||
$request['request']['url']['path'] = array_map(
|
||||
fn (string $segment): string => $segment === '{{integration_code}}' ? $integrationCode : $segment,
|
||||
$request['request']['url']['path'],
|
||||
);
|
||||
$request['request']['body'] = jsonBody(['integration_data' => $preset['integration_data']]);
|
||||
|
||||
$ownerItems[] = [
|
||||
'name' => $preset['name'],
|
||||
'description' => $preset['description'],
|
||||
'item' => [$request],
|
||||
];
|
||||
}
|
||||
|
||||
$folders[] = [
|
||||
'name' => $ownerName,
|
||||
'item' => $ownerItems,
|
||||
];
|
||||
}
|
||||
|
||||
return $folders;
|
||||
}
|
||||
|
||||
$tree = [];
|
||||
$registeredOperations = 0;
|
||||
|
||||
@@ -412,7 +517,9 @@ $items = [];
|
||||
foreach ($tree as $section => $folders) {
|
||||
$children = [];
|
||||
foreach ($folders as $folder => $requests) {
|
||||
$children[] = ['name' => humanize($folder), 'item' => $requests];
|
||||
$children[] = $section === 'Platform Management' && $folder === 'Integration'
|
||||
? ['name' => 'Integration', 'item' => integrationOwnerFolders($requests)]
|
||||
: ['name' => humanize($folder), 'item' => $requests];
|
||||
}
|
||||
|
||||
$items[] = [
|
||||
@@ -430,7 +537,8 @@ $variables = [
|
||||
'admin_email' => 'admin@example.com', 'admin_password' => 'Password!123',
|
||||
'scanner_email' => 'scanner@example.com', 'scanner_password' => 'Password!123',
|
||||
'tenant_code' => 'demo', 'tenant_id' => '1', 'tenant_domain' => 'demo.test',
|
||||
'client_id' => '1', 'integration_id' => '1', 'integration_code' => 'telepagos',
|
||||
'client_id' => '1', 'client_code' => 'cliente-demo', 'website_type_code' => 'shopit',
|
||||
'integration_code' => 'telepagos',
|
||||
'menu_id' => '1', 'menu_code' => 'demo', 'catalog_item_id' => '1', 'variant_id' => '1',
|
||||
'category_id' => '1', 'featured_group_id' => '1', 'cart_id' => '1', 'cart_item_id' => '1',
|
||||
'purchase_id' => '1', 'purchase_item_id' => '1', 'sale_id' => '1', 'staff_id' => '1',
|
||||
@@ -444,7 +552,7 @@ $collection = [
|
||||
'info' => [
|
||||
'_postman_id' => '76fd6fd2-53b9-4d92-8e02-1ddcc6207fa2',
|
||||
'name' => 'ShopIt API — Complete',
|
||||
'description' => "Colección canónica generada desde las rutas reales de Laravel. Incluye {$registeredOperations} operaciones HTTP, ejemplos de payload, filtros, archivos y tokens separados para Storefront, Admin App y Scanner.\n\nUso rápido:\n1. Ajustá `base_url` y las credenciales.\n2. Ejecutá el Login de la aplicación correspondiente; el token se guarda automáticamente.\n3. Ajustá los IDs y códigos de las variables de colección.\n\nRegeneración: `php postman/generate-shopit-collection.php`.",
|
||||
'description' => "Colección canónica generada desde las rutas reales de Laravel. Incluye {$registeredOperations} operaciones HTTP, presets de configuración para cada integración, ejemplos de payload, filtros, archivos y tokens separados para Storefront, Admin App y Scanner.\n\nUso rápido:\n1. Ajustá `base_url` y las credenciales.\n2. Ejecutá el Login de la aplicación correspondiente; el token se guarda automáticamente.\n3. Ajustá los IDs y códigos de las variables de colección.\n\nRegeneración: `php postman/generate-shopit-collection.php`.",
|
||||
'schema' => 'https://schema.getpostman.com/json/collection/v2.1.0/collection.json',
|
||||
],
|
||||
'item' => $items,
|
||||
|
||||
Reference in New Issue
Block a user