{"openapi":"3.0.0","paths":{"/api/twilio/send-message":{"post":{"operationId":"TwilioController_sendWhatsAppMessage","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TwilioWhatsappInputs"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/api/agencies":{"get":{"operationId":"AgencyCompaniesController_findAll","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AgencyCompany"}}}}}}},"post":{"operationId":"AgencyCompaniesController_createAgencyCompany","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAgencyCompanyInput"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgencyCompany"}}}}}},"put":{"operationId":"AgencyCompaniesController_updateAgencyCompany","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAgencyCompanyInput"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgencyCompany"}}}}}}},"/api/agencies/{id}":{"get":{"operationId":"AgencyCompaniesController_getAgencyCompany","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgencyCompany"}}}}}},"delete":{"operationId":"AgencyCompaniesController_deleteAgencyCompany","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgencyCompany"}}}}}}},"/api/agencies/bulk":{"post":{"operationId":"AgencyCompaniesController_bulkCreateAgencyCompanies","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CreateAgencyCompanyInput"}}}}},"responses":{"201":{"description":""}}}},"/api/packages/external/{externalId}":{"get":{"operationId":"PackagesController_getPackageByExternal","parameters":[{"name":"externalId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Package"}}}}},"tags":["Bultos"]}},"/api/packages/{id}":{"get":{"operationId":"PackagesController_getPackage","parameters":[{"name":"id","required":true,"in":"path","description":"Identificador del bulto en la base de datos","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Package"}}}}},"tags":["Bultos"]}},"/api/packages/{id}/label":{"get":{"operationId":"PackagesController_getLabelsForPackage","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}},"tags":["Bultos"]}},"/api/packages/return-state/{id}":{"get":{"operationId":"PackagesController_returnState","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}},"tags":["Bultos"]}},"/api/packages/charts/service-level/{id}/{companyType}":{"get":{"operationId":"PackagesController_getServiceLevelByCompany","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"companyType","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}},"tags":["Bultos"]}},"/api/packages/charts/ecommerce/{id}/courier":{"get":{"operationId":"PackagesController_getServiceLevelByCourier","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}},"tags":["Bultos"]}},"/api/packages/charts/performance-month/{id}/{month}":{"get":{"operationId":"PackagesController_getPerformanceByMonthApp","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"month","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}},"tags":["Bultos"]}},"/api/packages/delivered/ecommerce/{id}":{"get":{"operationId":"PackagesController_getDeliveredPackagesEcommerceCurrentDay","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}},"tags":["Bultos"]}},"/api/packages/charts/general-app/{id}":{"get":{"operationId":"PackagesController_getStatisticsGeneralForApp","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}},"tags":["Bultos"]}},"/api/packages/courier/{id}/report":{"get":{"operationId":"PackagesController_getGeneralReportCourier","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"type":"object"}}}}}},"tags":["Bultos"]}},"/api/packages/state/bulk":{"post":{"operationId":"PackagesController_bulkState","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkUpdatePackageStatusInput"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkStateUpdate"}}}}},"tags":["Bultos"]}},"/api/packages/seed/{count}":{"post":{"operationId":"PackagesController_seedPackages","parameters":[{"name":"count","required":true,"in":"path","schema":{"type":"number"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SeedPayload"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"type":"number"}}}}},"tags":["Bultos"]}},"/api/packages/companyKind/{companyKind}/companyId/{id}/detail-report":{"get":{"operationId":"PackagesController_getDetailReportCourier","parameters":[{"name":"companyKind","required":true,"in":"path","schema":{"type":"string"}},{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"startDate","required":true,"in":"query","schema":{"format":"date-time","type":"string"}},{"name":"endDate","required":true,"in":"query","schema":{"format":"date-time","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"type":"object"}}}}}},"tags":["Bultos"]}},"/api/webhooks/mapbox/test/matrix":{"get":{"operationId":"MapboxWebhookController_testMatrix","parameters":[],"responses":{"200":{"description":""}}}},"/api/webhooks/mapbox/test/optimization/{routeType}":{"get":{"operationId":"MapboxWebhookController_testOptimization","parameters":[{"name":"routeType","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}}}},"/api/webhooks/mapbox/test/debug-mvrp/{routeType}":{"get":{"operationId":"MapboxWebhookController_debugMVRP","parameters":[{"name":"routeType","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}}}},"/api/zones/distribution":{"get":{"operationId":"DistributionZonesController_findAllDistribution","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Zone"}}}}}},"tags":["Zonas"]},"post":{"operationId":"DistributionZonesController_createDistributionZone","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateZoneInput"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Zone"}}}}},"tags":["Zonas"]},"put":{"operationId":"DistributionZonesController_updateDistributionZone","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateZoneInput"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Zone"}}}}},"tags":["Zonas"]},"delete":{"operationId":"DistributionZonesController_deleteDistributionZone","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Zone"}}}}},"tags":["Zonas"]}},"/api/zones/distribution/{id}":{"get":{"operationId":"DistributionZonesController_getZoneDistribution","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Zone"}}}}},"tags":["Zonas"]}},"/api/zones/operation":{"get":{"operationId":"OperationZonesController_findAllOperation","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Zone"}}}}}},"tags":["Zonas"]},"post":{"operationId":"OperationZonesController_createZone","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateZoneInput"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Zone"}}}}},"tags":["Zonas"]}},"/api/zones/operation/{id}":{"get":{"operationId":"OperationZonesController_findOneOperation","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Zone"}}}}},"tags":["Zonas"]}},"/api/zones/operation/packages/{id}":{"get":{"operationId":"OperationZonesController_getPackagesFromZone","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Package"}}}}}},"tags":["Zonas"]}},"/api/zones/operation/update":{"post":{"operationId":"OperationZonesController_updateZone","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateZoneInput"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Zone"}}}}},"tags":["Zonas"]}},"/api/zones/operation/delete":{"post":{"operationId":"OperationZonesController_deleteZone","parameters":[],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Zone"}}}}},"tags":["Zonas"]}},"/api/rates":{"get":{"operationId":"RatesController_findAll","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Rate"}}}}}},"tags":["Tarifas"]},"post":{"operationId":"RatesController_createRate","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRateInput"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Rate"}}}}},"tags":["Tarifas"]},"put":{"operationId":"RatesController_updateRate","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateRateInput"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Rate"}}}}},"tags":["Tarifas"]},"delete":{"operationId":"RatesController_deleteRate","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Rate"}}}}},"tags":["Tarifas"]}},"/api/rates/by-company":{"get":{"operationId":"RatesController_findByCompany","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Rate"}}}}}},"tags":["Tarifas"],"security":[{"Api-Key":[]}]}},"/api/rates/{id}":{"get":{"operationId":"RatesController_getRate","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Rate"}}}}},"tags":["Tarifas"]}},"/api/rates/create":{"post":{"operationId":"RatesController_create","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRateInput"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Rate"}}}},"201":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}},"tags":["Tarifas"],"security":[{"Api-Key":[]}]}},"/api/rates/courier":{"post":{"operationId":"RatesController_createRateForCourier","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRateForCourierInput"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Rate"}}}}},"tags":["Tarifas"]}},"/api/tags":{"get":{"operationId":"TagController_findAll","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"type":"object"}}}}}}},"put":{"operationId":"TagController_update","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateTagInput"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/api/tags/{id}":{"get":{"operationId":"TagController_findById","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}}},"delete":{"operationId":"TagController_delete","parameters":[],"responses":{"200":{"description":""}}}},"/api/tags/create":{"post":{"operationId":"TagController_create","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TagInput"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/api/tags/title/{title}":{"get":{"operationId":"TagController_findByName","parameters":[{"name":"title","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/api/notifications/{id}":{"get":{"operationId":"NotificationsController_getNotification","parameters":[{"name":"id","required":true,"in":"path","description":"Identificador de la notificación en la base de datos","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Notification"}}}}},"tags":["Notificaciones"]}},"/api/notifications/driver":{"post":{"operationId":"NotificationsController_createDriverNotification","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDriverNotificationInput"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DriverNotification"}}}}},"tags":["Notificaciones"]}},"/api/notifications/driver/{driverId}":{"get":{"operationId":"NotificationsController_getNotificationsByShift","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}},"tags":["Notificaciones"]}},"/api/notifications/accept":{"put":{"operationId":"NotificationsController_acceptNotification","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateDriverNotificationInput"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Trip"}}}}},"tags":["Notificaciones"]}},"/api/notifications/driver-notify/{id}":{"get":{"operationId":"NotificationsController_getNotificationsById","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DriverNotification"}}}}},"tags":["Notificaciones"]}},"/api/notifications/reject":{"put":{"operationId":"NotificationsController_rejectNotification","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DriverNotification"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DriverNotification"}}}}},"tags":["Notificaciones"]}},"/api/notifications/pushNotify":{"post":{"operationId":"NotificationsController_resendPushNotify","parameters":[],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"type":"string"}}}}},"tags":["Notificaciones"]}},"/api/health":{"get":{"operationId":"HealthController_healthCheck","parameters":[],"responses":{"200":{"description":""}}}},"/api/load-providers/create-load":{"post":{"operationId":"LoadProvidersWebhookController_createLoad","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateLoadPayload"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Package"}}}}},"tags":["Generadores de carga"],"security":[{"Api-Key":[]}]}},"/api/load-providers/webhook-url":{"post":{"operationId":"LoadProvidersWebhookController_changeWebhook","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChangeWebhookInput"}}}},"responses":{"201":{"description":""}},"tags":["Generadores de carga"],"security":[{"Api-Key":[]}]}},"/api/load-providers/notify/{packageId}":{"get":{"operationId":"LoadProvidersWebhookController_notify","parameters":[{"name":"packageId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"tags":["Generadores de carga"],"security":[{"Api-Key":[]}]}},"/api/load-providers/states/failed/{loadProviderId}":{"get":{"operationId":"LoadProvidersWebhookController_returnStates","parameters":[],"responses":{"200":{"description":""}},"tags":["Generadores de carga"]}},"/api/load-providers/states/success/{loadProviderId}":{"get":{"operationId":"LoadProvidersWebhookController_successfulStates","parameters":[],"responses":{"200":{"description":""}},"tags":["Generadores de carga"]}},"/api/webhooks/meli/notifications":{"post":{"operationId":"MercadoLibreWebhookController_notificationHandler","parameters":[],"responses":{"201":{"description":""}},"tags":["Webhook MercadoLibre"]}},"/api/webhooks/meli/auth/callback":{"get":{"operationId":"MercadoLibreWebhookController_authCallback","parameters":[],"responses":{"200":{"description":""}},"tags":["Webhook MercadoLibre"]}},"/api/webhooks/meli/auth/{companyId}":{"get":{"operationId":"MercadoLibreWebhookController_auth","parameters":[],"responses":{"200":{"description":""}},"tags":["Webhook MercadoLibre"]}},"/api/webhooks/meli/notifications/payments":{"post":{"operationId":"MercadoLibreWebhookController_paymentNotificationHandler","parameters":[],"responses":{"201":{"description":""}},"tags":["Webhook MercadoLibre"]}},"/api/webhooks/meli/ecommerce/{ecommerceId}/shipment/{shipmentId}":{"get":{"operationId":"MercadoLibreWebhookController_getShipmentLabel","parameters":[{"name":"shipmentId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"tags":["Webhook MercadoLibre"]}},"/api/webhooks/meli/batch-processing":{"get":{"operationId":"MercadoLibreWebhookController_batchProcessing","parameters":[],"responses":{"200":{"description":""}},"tags":["Webhook MercadoLibre"]}},"/api/webhooks/meli/get-shipment-status":{"get":{"operationId":"MercadoLibreWebhookController_getShipmentStatus","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Package"}}}},"responses":{"200":{"description":""}},"tags":["Webhook MercadoLibre"]}},"/api/webhooks/meli/update-package-state-by-external-id":{"put":{"operationId":"MercadoLibreWebhookController_updatePackageStateByExternalId","parameters":[],"responses":{"200":{"description":""}},"tags":["Webhook MercadoLibre"]}},"/api/webhooks/chilexpress":{"post":{"operationId":"ChilexpressWebhookController_createLoad","parameters":[],"responses":{"201":{"description":""}},"tags":["Webhook Chilexpress"]}},"/api/webhooks/chilexpress/99minutos":{"post":{"operationId":"Chilexpress99WebhookController_createLoad","parameters":[],"responses":{"201":{"description":""}},"tags":["Webhook Chilexpress"]}},"/api/webhooks/falabella/upload":{"post":{"operationId":"FalabellaWebhookController_getExcelToLoad","parameters":[],"responses":{"201":{"description":""}},"tags":["Webhook Falabella"]}},"/api/webhooks/99minutos/token":{"get":{"operationId":"C99MinutosWebhookController_getToken","parameters":[],"responses":{"200":{"description":""}},"tags":["Webhook 99Minutos"]}},"/api/webhooks/99minutos/test/{packageId}":{"get":{"operationId":"C99MinutosWebhookController_test","parameters":[],"responses":{"200":{"description":""}},"tags":["Webhook 99Minutos"]}},"/api/webhooks/99minutos/coverage":{"get":{"operationId":"C99MinutosWebhookController_getCoverage","parameters":[],"responses":{"200":{"description":""}},"tags":["Webhook 99Minutos"]}},"/api/webhooks/99minutos/orders/{orderId}":{"get":{"operationId":"C99MinutosWebhookController_getOrder","parameters":[{"name":"orderId","required":true,"in":"path","schema":{"type":"string"}},{"name":"client","required":true,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"tags":["Webhook 99Minutos"]}},"/api/webhooks/99minutos/evidences/{trackingId}":{"get":{"operationId":"C99MinutosWebhookController_getEvidences","parameters":[{"name":"trackingId","required":true,"in":"path","schema":{"type":"string"}},{"name":"client","required":true,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"tags":["Webhook 99Minutos"]}},"/api/webhooks/99minutos/orders/confirm/{orderId}":{"post":{"operationId":"C99MinutosWebhookController_confirmOrder","parameters":[{"name":"orderId","required":true,"in":"path","schema":{"type":"string"}},{"name":"client","required":true,"in":"query","schema":{"type":"string"}}],"responses":{"201":{"description":""}},"tags":["Webhook 99Minutos"]}},"/api/webhooks/99minutos":{"post":{"operationId":"C99MinutosWebhookController_webhook","parameters":[],"responses":{"201":{"description":""}},"tags":["Webhook 99Minutos"]}},"/api/webhooks/alas/test/{packageId}":{"get":{"operationId":"AlasExpressWebhookController_test","parameters":[],"responses":{"200":{"description":""}},"tags":["Webhook Alas Express"]}},"/api/webhooks/alas/notifications":{"post":{"operationId":"AlasExpressWebhookController_webhook","parameters":[],"responses":{"201":{"description":""}},"tags":["Webhook Alas Express"]}},"/api/shopify/auth":{"get":{"operationId":"ShopifyAuthController_oAuthConnect","summary":"","description":"Inicia el flujo oAuth para conectar con la app de shopify","parameters":[{"name":"shop","required":true,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/api/shopify/auth/callback":{"get":{"operationId":"ShopifyAuthController_callback","summary":"","description":"OAuth shopify callback","parameters":[{"name":"shop","required":true,"in":"query","schema":{"type":"string"}},{"name":"shop","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/api/shopify/auth/success/{shop}":{"get":{"operationId":"ShopifyAuthController_success","summary":"","description":"Called if OAuth was success","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/api/shopify/auth/failure/{shop}":{"get":{"operationId":"ShopifyAuthController_failure","summary":"","description":"Called if OAuth fails","parameters":[],"responses":{"200":{"description":""}}}},"/api/shopify/webhook/create":{"get":{"operationId":"ShopifyWebhookController_createWebhook","summary":"","description":"Create a webhook","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/api/shopify/webhook/{company}/{resource}/{event}":{"post":{"operationId":"ShopifyWebhookController_catchWebhook","summary":"","description":"Catch-all method for all webhooks of the form topic = :resource/:event, i.e. orders/updated","parameters":[{"name":"X-Shopify-Shop-Domain","required":true,"in":"header","schema":{"type":"string"}},{"name":"X-Shopify-Hmac-Sha256","required":true,"in":"header","schema":{"type":"string"}},{"name":"X-Shopify-API-Version","required":true,"in":"header","schema":{"type":"string"}},{"name":"X-Shopify-Topic","required":true,"in":"header","schema":{"type":"string"}},{"name":"resource","required":true,"in":"path","schema":{"type":"string"}},{"name":"event","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/api/shopify/webhook":{"get":{"operationId":"ShopifyWebhookController_installApp","parameters":[{"name":"shop","required":true,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":""}}}},"/api/webhooks/woocommerce":{"post":{"operationId":"WooCommerceController_handleWebhook","parameters":[],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/api/woocommerce/auth":{"get":{"operationId":"WooAuthController_authConnect","summary":"","description":"Inicia el flujo oAuth para conectar con la app de shopify","parameters":[{"name":"shop","required":true,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":""}}}},"/api/woocommerce/auth/return":{"get":{"operationId":"WooAuthController_authReturn","parameters":[{"name":"success","required":true,"in":"query","schema":{"type":"number"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"boolean"}}}}}}},"/api/woocommerce/auth/callback":{"post":{"operationId":"WooAuthController_authCallback","parameters":[],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/api/auth/login":{"post":{"operationId":"AuthController_login","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginInput"}}}},"responses":{"200":{"description":"Login realizado exitosamente"},"201":{"description":""}},"tags":["Autenticación"]}},"/api/auth/me":{"get":{"operationId":"AuthController_me","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}}},"default":{"description":"Información actual del usuario logueado","content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}}}},"tags":["Autenticación"]}},"/api/auth/generate/key":{"post":{"operationId":"AuthController_generateApiKey","parameters":[],"responses":{"201":{"description":""},"default":{"description":"Genera api key","content":{"application/json":{"schema":{"type":"string"}}}}},"tags":["Autenticación"]}},"/api/auth/api-key":{"get":{"operationId":"AuthController_apiKey","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}}},"default":{"description":"Información actual del usuario","content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}}}},"tags":["Autenticación"]}},"/api/sections":{"get":{"operationId":"SectionsController_findAll","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Section"}}}}}},"tags":["Secciones de bodega"]},"post":{"operationId":"SectionsController_createSection","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSectionInput"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Section"}}}}},"tags":["Secciones de bodega"]},"put":{"operationId":"SectionsController_updateSection","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSectionInput"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Section"}}}}},"tags":["Secciones de bodega"]},"delete":{"operationId":"SectionsController_deleteSection","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Section"}}}}},"tags":["Secciones de bodega"]}},"/api/sections/{id}":{"get":{"operationId":"SectionsController_getSection","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Section"}}}}},"tags":["Secciones de bodega"]}},"/api/sections/notify/{id}":{"get":{"operationId":"SectionsController_notifySection","parameters":[],"responses":{"200":{"description":""}},"tags":["Secciones de bodega"]}},"/api/leads":{"get":{"operationId":"LeadsController_findAll","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Lead"}}}}}}},"post":{"operationId":"LeadsController_createLead","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateLeadInput"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Lead"}}}}}},"put":{"operationId":"LeadsController_updateLead","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateLeadInput"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Lead"}}}}}},"delete":{"operationId":"LeadsController_deleteLead","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Lead"}}}}}}},"/api/leads/{id}":{"get":{"operationId":"LeadsController_getLead","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Lead"}}}}}}},"/api/layout-configs":{"get":{"operationId":"LayoutConfigsController_findAll","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/LayoutConfig"}}}}}}},"post":{"operationId":"LayoutConfigsController_createLayoutConfig","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateLayoutConfigInput"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LayoutConfig"}}}}}},"put":{"operationId":"LayoutConfigsController_updateLayoutConfig","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateLayoutConfigInput"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LayoutConfig"}}}}}},"delete":{"operationId":"LayoutConfigsController_deleteLayoutConfig","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LayoutConfig"}}}}}}},"/api/layout-configs/{id}":{"get":{"operationId":"LayoutConfigsController_getLayoutConfigById","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LayoutConfig"}}}}}}},"/api/layout-configs/model/{model}":{"get":{"operationId":"LayoutConfigsController_getLayoutConfig","parameters":[{"name":"model","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LayoutConfig"}}}}}}},"/api/messages":{"get":{"operationId":"MessagesController_findAll","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Message"}}}}}},"tags":["messages"]},"post":{"operationId":"MessagesController_createMessage","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateMessageInput"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Message"}}}}},"tags":["messages"]},"put":{"operationId":"MessagesController_updateMessage","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateMessageInput"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Message"}}}}},"tags":["messages"]},"delete":{"operationId":"MessagesController_deleteMessage","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Message"}}}}},"tags":["messages"]}},"/api/messages/{id}":{"get":{"operationId":"MessagesController_getMessage","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Message"}}}}},"tags":["messages"]}}},"info":{"title":"PHERO CORE (phero.app) API","description":"Transport Core Management PHERO API","version":"1.1.263","contact":{}},"tags":[],"servers":[],"components":{"securitySchemes":{"Api-Key":{"type":"apiKey","in":"header","name":"PHERO-API-KEY"},"bearer":{"scheme":"bearer","bearerFormat":"JWT","type":"http"}},"schemas":{"ObjectId":{"type":"object","properties":{}},"TwilioWhatsappInputs":{"type":"object","properties":{"_id":{"$ref":"#/components/schemas/ObjectId"}},"required":["_id"]},"AgencyCompany":{"type":"object","properties":{"name":{"type":"string","description":"Nombre de la agencia","example":"A14-OBISPO UMAÑA"},"address":{"type":"string","description":"Dirección de la agencia","example":"Obispo Umaña N°1307"},"_id":{"$ref":"#/components/schemas/ObjectId"},"rut":{"type":"string"},"website":{"type":"string"},"subdomain":{"type":"string"},"customCode":{"type":"boolean"},"webhooksURL":{"type":"string"},"webhookToken":{"type":"string"},"apiKey":{"type":"string"},"logo":{"type":"object"},"primaryColor":{"type":"string"},"secondaryColor":{"type":"string"},"bank":{"type":"string"},"accountType":{"type":"string"},"accountNumber":{"type":"string"},"emailBank":{"type":"string"},"isFirstTime":{"type":"boolean"},"kind":{"type":"string","default":"AgencyCompany"},"admin":{"$ref":"#/components/schemas/ObjectId"},"collaborators":{"type":"object"},"config":{"type":"object"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"isDeleted":{"type":"boolean"},"type":{"enum":["Propia","Comisionista"],"type":"string"},"office":{"type":"string"},"agencyName":{"type":"string"},"region":{"enum":["METRO","NORTE","SUR","CENTRO"],"type":"string"},"officeDelivery":{"enum":["SI","SI, CON RESTRICCIONES","NO"],"type":"string"},"agencyType":{"enum":["DUAL","EXPRESS","STANDARD"],"type":"string"},"businessHours":{"type":"string"},"agent":{"type":"string"},"responsiblePerson":{"type":"string"},"clientPhone":{"type":"string"},"corporateEmail":{"type":"string"},"district":{"type":"string"},"assignedCourier":{"type":"object"},"assignedAgent":{"type":"object"},"warehouses":{"type":"object"}},"required":["_id","isFirstTime","kind","createdAt","updatedAt","isDeleted","warehouses"]},"CourierConfig":{"type":"object","properties":{"subStates":{"type":"array","items":{"type":"object"}},"customPayload":{"type":"array","items":{"type":"string"}},"pods":{"type":"array","items":{"type":"object"}},"mailStatusNotifications":{"type":"array","items":{"type":"object"}},"labels":{"type":"array","items":{"type":"object"}},"services":{"type":"array","items":{"type":"object"}},"notifications":{"type":"array","items":{"type":"object"}},"template":{"type":"string"}}},"CreateAgencyCompanyInput":{"type":"object","properties":{"type":{"enum":["Propia","Comisionista"],"type":"string"},"office":{"type":"string"},"agencyName":{"type":"string"},"region":{"enum":["METRO","NORTE","SUR","CENTRO"],"type":"string"},"officeDelivery":{"enum":["SI","SI, CON RESTRICCIONES","NO"],"type":"string"},"agencyType":{"enum":["DUAL","EXPRESS","STANDARD"],"type":"string"},"businessHours":{"type":"string"},"agent":{"type":"string"},"responsiblePerson":{"type":"string"},"clientPhone":{"type":"string"},"corporateEmail":{"type":"string"},"district":{"type":"string"},"assignedCourier":{"$ref":"#/components/schemas/ObjectId"},"assignedAgent":{"$ref":"#/components/schemas/ObjectId"},"name":{"type":"string"},"email":{"type":"string"},"rut":{"type":"string"},"address":{"type":"string"},"website":{"type":"string"},"subdomain":{"type":"string"},"customCode":{"type":"boolean"},"webhooksURL":{"type":"string"},"webhookToken":{"type":"string"},"apiKey":{"type":"string"},"kind":{"type":"string"},"logo":{"$ref":"#/components/schemas/ObjectId"},"phone":{"type":"string"},"primaryColor":{"type":"string"},"secondaryColor":{"type":"string"},"bank":{"type":"string"},"accountType":{"type":"string"},"accountNumber":{"type":"string"},"emailBank":{"type":"string"},"isFirstTime":{"type":"boolean"},"admin":{"$ref":"#/components/schemas/ObjectId"},"collaborators":{"type":"array","items":{"$ref":"#/components/schemas/ObjectId"}},"warehouses":{"type":"array","items":{"$ref":"#/components/schemas/ObjectId"}},"tripTypes":{"type":"array","items":{"type":"string"}},"config":{"$ref":"#/components/schemas/CourierConfig"},"rates":{"type":"array","items":{"$ref":"#/components/schemas/ObjectId"}}}},"UpdateAgencyCompanyInput":{"type":"object","properties":{"type":{"enum":["Propia","Comisionista"],"type":"string"},"office":{"type":"string"},"agencyName":{"type":"string"},"region":{"enum":["METRO","NORTE","SUR","CENTRO"],"type":"string"},"officeDelivery":{"enum":["SI","SI, CON RESTRICCIONES","NO"],"type":"string"},"agencyType":{"enum":["DUAL","EXPRESS","STANDARD"],"type":"string"},"businessHours":{"type":"string"},"agent":{"type":"string"},"responsiblePerson":{"type":"string"},"clientPhone":{"type":"string"},"corporateEmail":{"type":"string"},"district":{"type":"string"},"assignedCourier":{"$ref":"#/components/schemas/ObjectId"},"assignedAgent":{"$ref":"#/components/schemas/ObjectId"},"name":{"type":"string"},"email":{"type":"string"},"rut":{"type":"string"},"address":{"type":"string"},"website":{"type":"string"},"subdomain":{"type":"string"},"customCode":{"type":"boolean"},"webhooksURL":{"type":"string"},"webhookToken":{"type":"string"},"apiKey":{"type":"string"},"kind":{"type":"string"},"logo":{"$ref":"#/components/schemas/ObjectId"},"phone":{"type":"string"},"primaryColor":{"type":"string"},"secondaryColor":{"type":"string"},"bank":{"type":"string"},"accountType":{"type":"string"},"accountNumber":{"type":"string"},"emailBank":{"type":"string"},"isFirstTime":{"type":"boolean"},"admin":{"$ref":"#/components/schemas/ObjectId"},"collaborators":{"type":"array","items":{"$ref":"#/components/schemas/ObjectId"}},"warehouses":{"type":"array","items":{"$ref":"#/components/schemas/ObjectId"}},"tripTypes":{"type":"array","items":{"type":"string"}},"config":{"$ref":"#/components/schemas/CourierConfig"},"rates":{"type":"array","items":{"$ref":"#/components/schemas/ObjectId"}},"_id":{"$ref":"#/components/schemas/ObjectId"}},"required":["_id"]},"History":{"type":"object","properties":{"what":{"type":"string","description":"Tipo de evento","example":"PENDING"},"when":{"format":"date-time","type":"string","description":"Fecha de cuando ocurrio el evento","example":"2023-02-02T21:38:00.693Z"},"extra":{"type":"object"}}},"PackageState":{"type":"object","properties":{}},"Package":{"type":"object","properties":{"_id":{"type":"string","description":"Identificador del bulto en la base de datos","example":"63d5bcd2dd2ff604b23b4f5f"},"provider":{"type":"string","description":"Proveedor de Carga","example":"Generic"},"code":{"type":"string","description":"Código externo","example":"343243243"},"externalCode":{"type":"string","description":"Código externo 2","example":"6445645645"},"status":{"enum":["PENDING","ASSIGNED","CANCELLED","ON_ROUTE_TO_ECOMMERCE","PICKED_AT_SENDER","IN_TRANSIT_TO_WAREHOUSE","RECEIVED_AT_WAREHOUSE","PICKED_AT_WAREHOUSE","ON_ROUTE_TO_ADDRESSEE","CURRENT_DELIVERY","DELIVERED","ADDED_TO_QUEUE","RETURNED","ABANDONED","FAILED","DELAYED","CHECK_LOCATION","DRAFT","UNDER_REVIEW","REVIEWED","ON_HOLD","RETURNED_TO_SENDER"],"type":"string","description":"Estado del bulto","example":"PENDING"},"history":{"description":"Historial del bulto","type":"array","items":{"$ref":"#/components/schemas/History"}},"trackingCode":{"type":"string","description":"Código de seguimiento","example":"PH112345678CL"},"quantity":{"type":"number","description":"Cantidad de bultos","example":4},"sender":{"type":"object"},"serviceType":{"type":"string"},"zone":{"type":"object"},"state":{"$ref":"#/components/schemas/PackageState"}},"required":["_id","quantity","state"]},"BulkUpdatePackageStatusInput":{"type":"object","properties":{"packages":{"type":"array","items":{"$ref":"#/components/schemas/ObjectId"}},"state":{"type":"string","enum":["PENDING","ASSIGNED","CANCELLED","ON_ROUTE_TO_ECOMMERCE","PICKED_AT_SENDER","IN_TRANSIT_TO_WAREHOUSE","RECEIVED_AT_WAREHOUSE","PICKED_AT_WAREHOUSE","ON_ROUTE_TO_ADDRESSEE","CURRENT_DELIVERY","DELIVERED","ADDED_TO_QUEUE","RETURNED","ABANDONED","FAILED","DELAYED","CHECK_LOCATION","DRAFT","UNDER_REVIEW","REVIEWED","ON_HOLD","RETURNED_TO_SENDER"]},"extra":{"type":"object"}},"required":["packages","state"]},"BulkStateUpdate":{"type":"object","properties":{"acknowledged":{"type":"boolean"},"modifiedCount":{"type":"number"},"upsertedCount":{"type":"number"},"matchedCount":{"type":"number"}},"required":["acknowledged","modifiedCount","upsertedCount","matchedCount"]},"SeedEcommerce":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/ObjectId"},"origin":{"$ref":"#/components/schemas/ObjectId"},"count":{"type":"number"}},"required":["id","origin","count"]},"SeedPayload":{"type":"object","properties":{"courier":{"$ref":"#/components/schemas/ObjectId"},"assignedWarehouse":{"$ref":"#/components/schemas/ObjectId"},"rate":{"$ref":"#/components/schemas/ObjectId"},"ecommerces":{"type":"array","items":{"$ref":"#/components/schemas/SeedEcommerce"}}},"required":["courier","assignedWarehouse","rate","ecommerces"]},"Location":{"type":"object","properties":{"type":{"type":"string","description":"Tipo","example":"Point"},"coordinates":{"description":"Coordenadas","example":[-70.60257299999999,-33.4210367],"type":"array","items":{"type":"number"}}},"required":["type","coordinates"]},"Zone":{"type":"object","properties":{"location":{"description":"Coordenadas","allOf":[{"$ref":"#/components/schemas/Location"}]},"_id":{"$ref":"#/components/schemas/ObjectId"},"name":{"type":"string"},"type":{"enum":["OPERATION","DISTRIBUTION","COVERAGE"],"type":"string"},"polyline":{"type":"string"},"area":{"type":"number"},"subZones":{"type":"object"},"courier":{"type":"object"},"warehouse":{"type":"object"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"isActive":{"type":"boolean"}},"required":["_id","name","type","polyline","area","subZones","courier","warehouse","createdAt","updatedAt","isActive"]},"CreateZoneInput":{"type":"object","properties":{"name":{"type":"string"},"polyline":{"type":"string"},"type":{"enum":["OPERATION","DISTRIBUTION","COVERAGE"],"type":"string"},"courier":{"$ref":"#/components/schemas/ObjectId"},"warehouse":{"$ref":"#/components/schemas/ObjectId"},"subZones":{"type":"array","items":{"$ref":"#/components/schemas/ObjectId"}}}},"UpdateZoneInput":{"type":"object","properties":{"name":{"type":"string"},"polyline":{"type":"string"},"type":{"enum":["OPERATION","DISTRIBUTION","COVERAGE"],"type":"string"},"courier":{"$ref":"#/components/schemas/ObjectId"},"warehouse":{"$ref":"#/components/schemas/ObjectId"},"subZones":{"type":"array","items":{"$ref":"#/components/schemas/ObjectId"}},"_id":{"$ref":"#/components/schemas/ObjectId"},"area":{"type":"number"},"location":{"type":"object"}},"required":["_id"]},"Rate":{"type":"object","properties":{"_id":{"$ref":"#/components/schemas/ObjectId"},"name":{"type":"string"},"type":{"type":"string"},"definition":{"type":"object"},"amount":{"type":"number"},"status":{"type":"boolean"},"owner":{"type":"object"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"isDeleted":{"type":"boolean"}},"required":["_id","type","amount","status","owner","createdAt","updatedAt","isDeleted"]},"CreateRateInput":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string"},"owner":{"$ref":"#/components/schemas/ObjectId"},"definition":{"type":"object"},"amount":{"type":"number"},"status":{"type":"boolean"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}}},"CreateRateForCourierInput":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string"},"owner":{"$ref":"#/components/schemas/ObjectId"},"definition":{"type":"object"},"amount":{"type":"number"},"status":{"type":"boolean"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"courier":{"$ref":"#/components/schemas/ObjectId"}}},"UpdateRateInput":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string"},"owner":{"$ref":"#/components/schemas/ObjectId"},"definition":{"type":"object"},"amount":{"type":"number"},"status":{"type":"boolean"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"_id":{"$ref":"#/components/schemas/ObjectId"}},"required":["_id"]},"TagInput":{"type":"object","properties":{"title":{"type":"string"}},"required":["title"]},"UpdateTagInput":{"type":"object","properties":{"title":{"type":"string"},"_id":{"$ref":"#/components/schemas/ObjectId"}},"required":["title","_id"]},"Notification":{"type":"object","properties":{"_id":{"description":"'Identificador de la notificación en nuestro sistema'\r\rexample: '63e13230831582268f483691'","allOf":[{"$ref":"#/components/schemas/ObjectId"}]},"event":{"type":"string"},"when":{"format":"date-time","type":"string"},"trackingCode":{"type":"string"},"trackingURL":{"type":"string"},"externalId":{"type":"string"},"packageId":{"type":"string"},"acknowledge":{"type":"boolean"},"retry":{"type":"number"},"responsePayload":{"type":"object"},"notifiedAt":{"format":"date-time","type":"string"},"loadGeneratedBy":{"type":"object"},"customPayload":{"type":"object"}},"required":["_id","event","when","trackingCode","trackingURL","externalId","packageId","acknowledge","retry","notifiedAt","loadGeneratedBy"]},"CreateDriverNotificationInput":{"type":"object","properties":{"tripId":{"$ref":"#/components/schemas/ObjectId"},"shiftId":{"$ref":"#/components/schemas/ObjectId"},"zone":{"$ref":"#/components/schemas/ObjectId"},"accepted":{"type":"boolean"},"rejected":{"type":"boolean"},"notifiedAt":{"format":"date-time","type":"string"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}}},"DriverNotification":{"type":"object","properties":{"_id":{"description":"'Identificador de la notificación en nuestro sistema'\r\rexample: '63e13230831582268f483691'","allOf":[{"$ref":"#/components/schemas/ObjectId"}]},"tripId":{"type":"object"},"accepted":{"type":"boolean"},"rejected":{"type":"boolean"},"retry":{"type":"number"},"shiftId":{"type":"object"},"zone":{"type":"object"},"notifiedAt":{"format":"date-time","type":"string"}},"required":["_id"]},"UpdateDriverNotificationInput":{"type":"object","properties":{"tripId":{"$ref":"#/components/schemas/ObjectId"},"shiftId":{"$ref":"#/components/schemas/ObjectId"},"zone":{"$ref":"#/components/schemas/ObjectId"},"accepted":{"type":"boolean"},"rejected":{"type":"boolean"},"notifiedAt":{"format":"date-time","type":"string"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"_id":{"$ref":"#/components/schemas/ObjectId"}}},"Routes":{"type":"object","properties":{}},"MVRPRoute":{"type":"object","properties":{}},"TripInfo":{"type":"object","properties":{"solution":{"$ref":"#/components/schemas/Routes"},"route":{"$ref":"#/components/schemas/MVRPRoute"}}},"HistoryLatestLocation":{"type":"object","properties":{"when":{"format":"date-time","type":"string"},"extra":{"type":"object"}}},"LatestLocation":{"type":"object","properties":{"lat":{"type":"object"},"lng":{"type":"object"},"speed":{"type":"object"},"bearing":{"type":"object"},"altitude":{"type":"object"},"driverId":{"$ref":"#/components/schemas/ObjectId"},"history":{"type":"array","items":{"$ref":"#/components/schemas/HistoryLatestLocation"}},"when":{"format":"date-time","type":"string"},"timestamp":{"type":"string"}}},"TripState":{"type":"object","properties":{}},"Trip":{"type":"object","properties":{"history":{"description":"Historial del viaje","type":"array","items":{"$ref":"#/components/schemas/History"}},"_id":{"$ref":"#/components/schemas/ObjectId"},"type":{"type":"string"},"includesDriverEnd":{"type":"boolean"},"shift":{"type":"object"},"courier":{"description":"@ApiProperty({\r\n    description: 'Información del courier',\r\n    type: CourierCompany,\r\n  })","allOf":[{"$ref":"#/components/schemas/ObjectId"}]},"origin":{"type":"object"},"destination":{"type":"object"},"packages":{"type":"object"},"startAt":{"format":"date-time","type":"string"},"startedAt":{"format":"date-time","type":"string"},"endedAt":{"format":"date-time","type":"string"},"status":{"type":"string","enum":["TRIP_CREATED","TRIP_ASSIGNED","TRIP_STARTED","CLIENT_PICKUP_ARRIVAL","TRIP_PACKAGE_PICKED","TRIP_PACKAGE_DELIVERED","TRIP_PACKAGE_RETURNED","TRIP_PACKAGE_CHANGED","TRIP_ROUTE_UPDATE","TRIP_LAST_ROUTE","TRIP_ENDED","TRIP_EMPTY","TRIP_STATUS_UPDATED","TRIP_CHANGE","TRIP_WATCH_CHANGES"]},"info":{"$ref":"#/components/schemas/TripInfo"},"latestLocation":{"$ref":"#/components/schemas/LatestLocation"},"isClosed":{"type":"boolean"},"tags":{"type":"object"},"zone":{"type":"object"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"isDeleted":{"type":"boolean"},"state":{"$ref":"#/components/schemas/TripState"}},"required":["_id","type","shift","courier","origin","destination","packages","status","createdAt","updatedAt","isDeleted","state"]},"CreateLoadEcommerce":{"type":"object","properties":{"name":{"type":"string","description":"Nombre del Comercio","example":"La Tiendita"},"externalId":{"type":"string","description":"Identificador del Comercio","example":"345678"}},"required":["name","externalId"]},"CreateLoadAddress":{"type":"object","properties":{"externalId":{"type":"string","description":"Identificador de la dirección","example":"123456"},"name":{"type":"string","description":"Dirección completa sin especificar piso, depto, nro de casa","example":"vicuña mackena 120"},"optionalAddress":{"type":"string","description":"Dirección opcional detalla número de casa, piso, depto","example":"casa esquina"},"streetName":{"type":"string","description":"Nombre de la calle","example":"vicuña mackena"},"streetNumber":{"type":"string","description":"Número de la calle","example":"123"},"city":{"type":"string","description":"Ciudad","example":"Santiago"},"country":{"type":"string","description":"País","example":"Chile"},"zipCode":{"type":"string","description":"Código postal","example":"3830000"},"latitude":{"type":"number","description":"Latitud","example":-33.456},"longitude":{"type":"number","description":"Longitud","example":-70.123}},"required":["name"]},"CreateLoadOrigin":{"type":"object","properties":{"externalId":{"type":"string","description":"Identificador de la bodega","example":"566788"},"name":{"type":"string","description":"Nombre de la bodega"},"address":{"description":"Información sobre la dirección de la Bodega","allOf":[{"$ref":"#/components/schemas/CreateLoadAddress"}]}},"required":["externalId","address"]},"CreateLoadAddressee":{"type":"object","properties":{"name":{"type":"string","description":"Nombre del destinatario","example":"Jhon Doe"},"rut":{"type":"string","description":"Rut del destinatario","example":"61802689-2"},"email":{"type":"string","description":"Email del destinatario","example":"jhondoe@test.com"},"phone":{"type":"string","description":"Número de teléfono del destinatario","example":"+56956712345"},"address":{"description":"Dirección del destinatario","allOf":[{"$ref":"#/components/schemas/CreateLoadAddress"}]}},"required":["name","phone","address"]},"CreateLoadPackage":{"type":"object","properties":{"description":{"type":"string","description":"Descripción del bulto","example":"Zapatillas"},"declaredValue":{"type":"number","description":"Valor declarado del bulto","example":19990},"quantity":{"type":"number"},"provider":{"type":"string"}},"required":["description","declaredValue"]},"CreateLoadPayload":{"type":"object","properties":{"ecommerce":{"description":"Información del Comercio","allOf":[{"$ref":"#/components/schemas/CreateLoadEcommerce"}]},"externalId":{"type":"string","description":"Identificador externo del envío en tu base de datos","example":"4677893"},"externalId2":{"type":"string"},"rate":{"description":"Identificador de la tarifa del paquete","example":"64cbbed3556d686bfd79881c","allOf":[{"$ref":"#/components/schemas/ObjectId"}]},"initialStatus":{"type":"string","enum":["PENDING","ASSIGNED","CANCELLED","ON_ROUTE_TO_ECOMMERCE","PICKED_AT_SENDER","IN_TRANSIT_TO_WAREHOUSE","RECEIVED_AT_WAREHOUSE","PICKED_AT_WAREHOUSE","ON_ROUTE_TO_ADDRESSEE","CURRENT_DELIVERY","DELIVERED","ADDED_TO_QUEUE","RETURNED","ABANDONED","FAILED","DELAYED","CHECK_LOCATION","DRAFT","UNDER_REVIEW","REVIEWED","ON_HOLD","RETURNED_TO_SENDER"]},"serviceType":{"type":"string","description":"Tipo de servicio","example":"ON_DEMAND"},"origin":{"description":"Información de la bodega de origen","allOf":[{"$ref":"#/components/schemas/CreateLoadOrigin"}]},"addressee":{"description":"Información de la dirección de destino","allOf":[{"$ref":"#/components/schemas/CreateLoadAddressee"}]},"packages":{"description":"Una lista de paquetes","type":"array","items":{"$ref":"#/components/schemas/CreateLoadPackage"}},"requiresVerification":{"type":"boolean","description":"Si se requiere verificar la mayoría de edad del destinatario","example":false,"default":false}},"required":["ecommerce","externalId","rate","origin","addressee","packages","requiresVerification"]},"ChangeWebhookInput":{"type":"object","properties":{"url":{"type":"string","description":"URL de webhook para recibir notificaciones por los cambios de estado de los paquetes","example":"https://midominio.com/mi/webhook"}},"required":["url"]},"LoginInput":{"type":"object","properties":{"email":{"type":"string"},"password":{"type":"string"}},"required":["email","password"]},"User":{"type":"object","properties":{"_id":{"$ref":"#/components/schemas/ObjectId"},"name":{"type":"string"},"rut":{"type":"string"},"email":{"type":"string"},"isFirstTime":{"type":"boolean"},"emailVerified":{"type":"boolean"},"acceptedTerms":{"type":"boolean"},"fcmToken":{"type":"string"},"verificationToken":{"type":"string"},"password":{"type":"string"},"position":{"type":"string"},"phone":{"type":"string"},"roles":{"type":"array","items":{"type":"string"}},"avatar":{"type":"object"},"company":{"type":"object"},"assignedAgency":{"type":"object"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"isDeleted":{"type":"boolean"},"checkPassword":{"type":"object"}},"required":["_id","name","email","isFirstTime","emailVerified","acceptedTerms","roles","createdAt","updatedAt","isDeleted","checkPassword"]},"SectionHistory":{"type":"object","properties":{"what":{"type":"string","enum":["AVAILABLE","ASSIGNED","UNFILLED","COMPLETED"]},"when":{"format":"date-time","type":"string"},"extra":{"type":"object"}}},"IOTConfig":{"type":"object","properties":{"id":{"type":"number"},"start":{"type":"number"},"stop":{"type":"number"},"length":{"type":"number"},"url":{"type":"string"}},"required":["id","start","stop","length","url"]},"SectionState":{"type":"object","properties":{}},"Section":{"type":"object","properties":{"_id":{"$ref":"#/components/schemas/ObjectId"},"name":{"type":"string"},"code":{"type":"string"},"description":{"type":"string"},"height":{"type":"number"},"width":{"type":"number"},"depth":{"type":"number"},"occupancy":{"type":"number"},"status":{"type":"string"},"type":{"type":"string"},"packages":{"type":"object"},"warehouse":{"type":"object"},"trip":{"type":"object"},"history":{"type":"array","items":{"$ref":"#/components/schemas/SectionHistory"}},"iotConfig":{"$ref":"#/components/schemas/IOTConfig"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"isDeleted":{"type":"boolean"},"state":{"$ref":"#/components/schemas/SectionState"}},"required":["_id","name","code","description","height","width","depth","occupancy","status","type","packages","createdAt","updatedAt","isDeleted","state"]},"CreateSectionInput":{"type":"object","properties":{"name":{"type":"string"},"code":{"type":"string"},"description":{"type":"string"},"height":{"type":"number"},"width":{"type":"number"},"depth":{"type":"number"},"occupancy":{"type":"number"},"status":{"type":"string"},"type":{"type":"string"},"warehouse":{"$ref":"#/components/schemas/ObjectId"},"trip":{"$ref":"#/components/schemas/ObjectId"},"packages":{"type":"array","items":{"$ref":"#/components/schemas/ObjectId"}},"iotConfig":{"$ref":"#/components/schemas/IOTConfig"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}}},"UpdateSectionInput":{"type":"object","properties":{"name":{"type":"string"},"code":{"type":"string"},"description":{"type":"string"},"height":{"type":"number"},"width":{"type":"number"},"depth":{"type":"number"},"occupancy":{"type":"number"},"status":{"type":"string"},"type":{"type":"string"},"warehouse":{"$ref":"#/components/schemas/ObjectId"},"trip":{"$ref":"#/components/schemas/ObjectId"},"packages":{"type":"array","items":{"$ref":"#/components/schemas/ObjectId"}},"iotConfig":{"$ref":"#/components/schemas/IOTConfig"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"_id":{"$ref":"#/components/schemas/ObjectId"}},"required":["_id"]},"Lead":{"type":"object","properties":{"_id":{"$ref":"#/components/schemas/ObjectId"},"name":{"type":"string"},"email":{"type":"string"},"companyName":{"type":"string"},"state":{"type":"string"},"phone":{"type":"string"},"contacted":{"type":"boolean"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"isDeleted":{"type":"boolean"}},"required":["_id","name","email","companyName","state","phone","contacted","createdAt","updatedAt","isDeleted"]},"CreateLeadInput":{"type":"object","properties":{"name":{"type":"string"},"email":{"type":"string"},"companyName":{"type":"string"},"state":{"type":"string"},"phone":{"type":"string"},"contacted":{"type":"boolean","default":false},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"isDeleted":{"type":"boolean","default":false}}},"UpdateLeadInput":{"type":"object","properties":{"name":{"type":"string"},"email":{"type":"string"},"companyName":{"type":"string"},"state":{"type":"string"},"phone":{"type":"string"},"contacted":{"type":"boolean","default":false},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"isDeleted":{"type":"boolean","default":false},"_id":{"$ref":"#/components/schemas/ObjectId"}},"required":["_id"]},"LayoutConfig":{"type":"object","properties":{"_id":{"$ref":"#/components/schemas/ObjectId"},"model":{"type":"string"},"type":{"type":"string"},"config":{"type":"object"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"isDeleted":{"type":"boolean"}},"required":["_id","model","type","createdAt","updatedAt","isDeleted"]},"CreateLayoutConfigInput":{"type":"object","properties":{"model":{"type":"string"},"type":{"type":"string"},"config":{"type":"object"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}}},"UpdateLayoutConfigInput":{"type":"object","properties":{"_id":{"$ref":"#/components/schemas/ObjectId"},"model":{"type":"string"},"type":{"type":"string"},"config":{"type":"object"},"updatedAt":{"format":"date-time","type":"string"},"isDeleted":{"type":"boolean"}},"required":["_id"]},"Message":{"type":"object","properties":{"_id":{"$ref":"#/components/schemas/ObjectId"},"sender":{"type":"object"},"chat":{"type":"object"},"text":{"type":"string"},"isRead":{"type":"boolean"},"readTimestamp":{"format":"date-time","type":"string"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"isDeleted":{"type":"boolean"}},"required":["_id","sender","chat","text","createdAt","updatedAt","isDeleted"]},"CreateMessageInput":{"type":"object","properties":{"sender":{"$ref":"#/components/schemas/ObjectId"},"chat":{"$ref":"#/components/schemas/ObjectId"},"text":{"type":"string"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"isDeleted":{"type":"boolean","default":false},"isRead":{"type":"boolean"},"readTimestamp":{"format":"date-time","type":"string"}}},"UpdateMessageInput":{"type":"object","properties":{"sender":{"$ref":"#/components/schemas/ObjectId"},"chat":{"$ref":"#/components/schemas/ObjectId"},"text":{"type":"string"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"isDeleted":{"type":"boolean","default":false},"isRead":{"type":"boolean"},"readTimestamp":{"format":"date-time","type":"string"},"_id":{"$ref":"#/components/schemas/ObjectId"}},"required":["_id"]}}}}