@de./types 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api.d.ts +113 -0
- package/dist/api.d.ts.map +1 -0
- package/dist/api.js +92 -0
- package/dist/api.js.map +1 -0
- package/dist/auth.d.ts +109 -0
- package/dist/auth.d.ts.map +1 -0
- package/dist/auth.js +80 -0
- package/dist/auth.js.map +1 -0
- package/dist/aux/agent-rvs.d.ts +1205 -0
- package/dist/aux/agent-rvs.d.ts.map +1 -0
- package/dist/aux/agent-rvs.js +444 -0
- package/dist/aux/agent-rvs.js.map +1 -0
- package/dist/aux/agents.d.ts +1573 -0
- package/dist/aux/agents.d.ts.map +1 -0
- package/dist/aux/agents.js +487 -0
- package/dist/aux/agents.js.map +1 -0
- package/dist/aux/customer-rvs.d.ts +711 -0
- package/dist/aux/customer-rvs.d.ts.map +1 -0
- package/dist/aux/customer-rvs.js +321 -0
- package/dist/aux/customer-rvs.js.map +1 -0
- package/dist/aux/customers.d.ts +379 -0
- package/dist/aux/customers.d.ts.map +1 -0
- package/dist/aux/customers.js +67 -0
- package/dist/aux/customers.js.map +1 -0
- package/dist/aux/index.d.ts +5 -0
- package/dist/aux/index.d.ts.map +1 -0
- package/dist/aux/index.js +21 -0
- package/dist/aux/index.js.map +1 -0
- package/dist/billing.d.ts +367 -0
- package/dist/billing.d.ts.map +1 -0
- package/dist/billing.js +308 -0
- package/dist/billing.js.map +1 -0
- package/dist/bucket.d.ts +97 -0
- package/dist/bucket.d.ts.map +1 -0
- package/dist/bucket.js +52 -0
- package/dist/bucket.js.map +1 -0
- package/dist/context.d.ts +148 -0
- package/dist/context.d.ts.map +1 -0
- package/dist/context.js +148 -0
- package/dist/context.js.map +1 -0
- package/dist/csp/analytics.d.ts +270 -0
- package/dist/csp/analytics.d.ts.map +1 -0
- package/dist/csp/analytics.js +185 -0
- package/dist/csp/analytics.js.map +1 -0
- package/dist/csp/base.d.ts +11 -0
- package/dist/csp/base.d.ts.map +1 -0
- package/dist/csp/base.js +17 -0
- package/dist/csp/base.js.map +1 -0
- package/dist/csp/index.d.ts +107 -0
- package/dist/csp/index.d.ts.map +1 -0
- package/dist/csp/index.js +48 -0
- package/dist/csp/index.js.map +1 -0
- package/dist/csp/inventory.d.ts +361 -0
- package/dist/csp/inventory.d.ts.map +1 -0
- package/dist/csp/inventory.js +267 -0
- package/dist/csp/inventory.js.map +1 -0
- package/dist/csp/order.d.ts +1457 -0
- package/dist/csp/order.d.ts.map +1 -0
- package/dist/csp/order.js +367 -0
- package/dist/csp/order.js.map +1 -0
- package/dist/csp/webhook.d.ts +381 -0
- package/dist/csp/webhook.d.ts.map +1 -0
- package/dist/csp/webhook.js +207 -0
- package/dist/csp/webhook.js.map +1 -0
- package/dist/de.profile.d.ts +411 -0
- package/dist/de.profile.d.ts.map +1 -0
- package/dist/de.profile.js +98 -0
- package/dist/de.profile.js.map +1 -0
- package/dist/dev/developer.d.ts +211 -0
- package/dist/dev/developer.d.ts.map +1 -0
- package/dist/dev/developer.js +55 -0
- package/dist/dev/developer.js.map +1 -0
- package/dist/dev/index.d.ts +133 -0
- package/dist/dev/index.d.ts.map +1 -0
- package/dist/dev/index.js +79 -0
- package/dist/dev/index.js.map +1 -0
- package/dist/entity.d.ts +159 -0
- package/dist/entity.d.ts.map +1 -0
- package/dist/entity.js +127 -0
- package/dist/entity.js.map +1 -0
- package/dist/events.d.ts +1844 -0
- package/dist/events.d.ts.map +1 -0
- package/dist/events.js +303 -0
- package/dist/events.js.map +1 -0
- package/dist/faq.d.ts +60 -0
- package/dist/faq.d.ts.map +1 -0
- package/dist/faq.js +31 -0
- package/dist/faq.js.map +1 -0
- package/dist/geo.d.ts +123 -0
- package/dist/geo.d.ts.map +1 -0
- package/dist/geo.js +87 -0
- package/dist/geo.js.map +1 -0
- package/dist/index.d.ts +28 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +59 -0
- package/dist/index.js.map +1 -0
- package/dist/inventory.d.ts +1347 -0
- package/dist/inventory.d.ts.map +1 -0
- package/dist/inventory.js +356 -0
- package/dist/inventory.js.map +1 -0
- package/dist/invoice.d.ts +46 -0
- package/dist/invoice.d.ts.map +1 -0
- package/dist/invoice.js +33 -0
- package/dist/invoice.js.map +1 -0
- package/dist/iotsp/device.d.ts +581 -0
- package/dist/iotsp/device.d.ts.map +1 -0
- package/dist/iotsp/device.js +277 -0
- package/dist/iotsp/device.js.map +1 -0
- package/dist/iotsp/index.d.ts +111 -0
- package/dist/iotsp/index.d.ts.map +1 -0
- package/dist/iotsp/index.js +76 -0
- package/dist/iotsp/index.js.map +1 -0
- package/dist/iotsp/rule.d.ts +340 -0
- package/dist/iotsp/rule.d.ts.map +1 -0
- package/dist/iotsp/rule.js +172 -0
- package/dist/iotsp/rule.js.map +1 -0
- package/dist/iotsp/topic.d.ts +249 -0
- package/dist/iotsp/topic.d.ts.map +1 -0
- package/dist/iotsp/topic.js +139 -0
- package/dist/iotsp/topic.js.map +1 -0
- package/dist/lsp/carrier/analytics.d.ts +1191 -0
- package/dist/lsp/carrier/analytics.d.ts.map +1 -0
- package/dist/lsp/carrier/analytics.js +354 -0
- package/dist/lsp/carrier/analytics.js.map +1 -0
- package/dist/lsp/carrier/capabilities.d.ts +3603 -0
- package/dist/lsp/carrier/capabilities.d.ts.map +1 -0
- package/dist/lsp/carrier/capabilities.js +880 -0
- package/dist/lsp/carrier/capabilities.js.map +1 -0
- package/dist/lsp/carrier/capacities.d.ts +4436 -0
- package/dist/lsp/carrier/capacities.d.ts.map +1 -0
- package/dist/lsp/carrier/capacities.js +615 -0
- package/dist/lsp/carrier/capacities.js.map +1 -0
- package/dist/lsp/carrier/index.d.ts +734 -0
- package/dist/lsp/carrier/index.d.ts.map +1 -0
- package/dist/lsp/carrier/index.js +150 -0
- package/dist/lsp/carrier/index.js.map +1 -0
- package/dist/lsp/carrier/performance.d.ts +567 -0
- package/dist/lsp/carrier/performance.d.ts.map +1 -0
- package/dist/lsp/carrier/performance.js +127 -0
- package/dist/lsp/carrier/performance.js.map +1 -0
- package/dist/lsp/carrier/utilities.d.ts +6671 -0
- package/dist/lsp/carrier/utilities.d.ts.map +1 -0
- package/dist/lsp/carrier/utilities.js +597 -0
- package/dist/lsp/carrier/utilities.js.map +1 -0
- package/dist/lsp/consolidation.d.ts +793 -0
- package/dist/lsp/consolidation.d.ts.map +1 -0
- package/dist/lsp/consolidation.js +343 -0
- package/dist/lsp/consolidation.js.map +1 -0
- package/dist/lsp/coverage.d.ts +7449 -0
- package/dist/lsp/coverage.d.ts.map +1 -0
- package/dist/lsp/coverage.js +706 -0
- package/dist/lsp/coverage.js.map +1 -0
- package/dist/lsp/fleet/index.d.ts +1128 -0
- package/dist/lsp/fleet/index.d.ts.map +1 -0
- package/dist/lsp/fleet/index.js +269 -0
- package/dist/lsp/fleet/index.js.map +1 -0
- package/dist/lsp/fleet/maintenance.d.ts +2022 -0
- package/dist/lsp/fleet/maintenance.d.ts.map +1 -0
- package/dist/lsp/fleet/maintenance.js +386 -0
- package/dist/lsp/fleet/maintenance.js.map +1 -0
- package/dist/lsp/fleet/parking.d.ts +2043 -0
- package/dist/lsp/fleet/parking.d.ts.map +1 -0
- package/dist/lsp/fleet/parking.js +458 -0
- package/dist/lsp/fleet/parking.js.map +1 -0
- package/dist/lsp/fleet/vehicle.d.ts +783 -0
- package/dist/lsp/fleet/vehicle.d.ts.map +1 -0
- package/dist/lsp/fleet/vehicle.js +314 -0
- package/dist/lsp/fleet/vehicle.js.map +1 -0
- package/dist/lsp/graph.d.ts +212 -0
- package/dist/lsp/graph.d.ts.map +1 -0
- package/dist/lsp/graph.js +92 -0
- package/dist/lsp/graph.js.map +1 -0
- package/dist/lsp/hub/analytics.d.ts +4294 -0
- package/dist/lsp/hub/analytics.d.ts.map +1 -0
- package/dist/lsp/hub/analytics.js +219 -0
- package/dist/lsp/hub/analytics.js.map +1 -0
- package/dist/lsp/hub/capabilities.d.ts +1467 -0
- package/dist/lsp/hub/capabilities.d.ts.map +1 -0
- package/dist/lsp/hub/capabilities.js +464 -0
- package/dist/lsp/hub/capabilities.js.map +1 -0
- package/dist/lsp/hub/capacities.d.ts +4278 -0
- package/dist/lsp/hub/capacities.d.ts.map +1 -0
- package/dist/lsp/hub/capacities.js +495 -0
- package/dist/lsp/hub/capacities.js.map +1 -0
- package/dist/lsp/hub/index.d.ts +2784 -0
- package/dist/lsp/hub/index.d.ts.map +1 -0
- package/dist/lsp/hub/index.js +268 -0
- package/dist/lsp/hub/index.js.map +1 -0
- package/dist/lsp/hub/performance.d.ts +391 -0
- package/dist/lsp/hub/performance.d.ts.map +1 -0
- package/dist/lsp/hub/performance.js +78 -0
- package/dist/lsp/hub/performance.js.map +1 -0
- package/dist/lsp/hub/utilities.d.ts +2996 -0
- package/dist/lsp/hub/utilities.d.ts.map +1 -0
- package/dist/lsp/hub/utilities.js +521 -0
- package/dist/lsp/hub/utilities.js.map +1 -0
- package/dist/lsp/index.d.ts +157 -0
- package/dist/lsp/index.d.ts.map +1 -0
- package/dist/lsp/index.js +121 -0
- package/dist/lsp/index.js.map +1 -0
- package/dist/lsp/operations.d.ts +563 -0
- package/dist/lsp/operations.d.ts.map +1 -0
- package/dist/lsp/operations.js +265 -0
- package/dist/lsp/operations.js.map +1 -0
- package/dist/lsp/order/delivery.d.ts +1119 -0
- package/dist/lsp/order/delivery.d.ts.map +1 -0
- package/dist/lsp/order/delivery.js +169 -0
- package/dist/lsp/order/delivery.js.map +1 -0
- package/dist/lsp/order/flow/processes.d.ts +8 -0
- package/dist/lsp/order/flow/processes.d.ts.map +1 -0
- package/dist/lsp/order/flow/processes.js +67 -0
- package/dist/lsp/order/flow/processes.js.map +1 -0
- package/dist/lsp/order/flow/stages.d.ts +8 -0
- package/dist/lsp/order/flow/stages.d.ts.map +1 -0
- package/dist/lsp/order/flow/stages.js +111 -0
- package/dist/lsp/order/flow/stages.js.map +1 -0
- package/dist/lsp/order/inbound.d.ts +1165 -0
- package/dist/lsp/order/inbound.d.ts.map +1 -0
- package/dist/lsp/order/inbound.js +185 -0
- package/dist/lsp/order/inbound.js.map +1 -0
- package/dist/lsp/order/internal.d.ts +1404 -0
- package/dist/lsp/order/internal.d.ts.map +1 -0
- package/dist/lsp/order/internal.js +255 -0
- package/dist/lsp/order/internal.js.map +1 -0
- package/dist/lsp/order/management.d.ts +541 -0
- package/dist/lsp/order/management.d.ts.map +1 -0
- package/dist/lsp/order/management.js +326 -0
- package/dist/lsp/order/management.js.map +1 -0
- package/dist/lsp/order/outbound.d.ts +909 -0
- package/dist/lsp/order/outbound.d.ts.map +1 -0
- package/dist/lsp/order/outbound.js +105 -0
- package/dist/lsp/order/outbound.js.map +1 -0
- package/dist/lsp/order/passthrough.d.ts +1816 -0
- package/dist/lsp/order/passthrough.d.ts.map +1 -0
- package/dist/lsp/order/passthrough.js +360 -0
- package/dist/lsp/order/passthrough.js.map +1 -0
- package/dist/lsp/order/ride.d.ts +1056 -0
- package/dist/lsp/order/ride.d.ts.map +1 -0
- package/dist/lsp/order/ride.js +166 -0
- package/dist/lsp/order/ride.js.map +1 -0
- package/dist/lsp/order/shipping.d.ts +1524 -0
- package/dist/lsp/order/shipping.d.ts.map +1 -0
- package/dist/lsp/order/shipping.js +223 -0
- package/dist/lsp/order/shipping.js.map +1 -0
- package/dist/lsp/performance.d.ts +2 -0
- package/dist/lsp/performance.d.ts.map +1 -0
- package/dist/lsp/performance.js +3 -0
- package/dist/lsp/performance.js.map +1 -0
- package/dist/lsp/pod/index.d.ts +805 -0
- package/dist/lsp/pod/index.d.ts.map +1 -0
- package/dist/lsp/pod/index.js +250 -0
- package/dist/lsp/pod/index.js.map +1 -0
- package/dist/lsp/pricing.d.ts +1811 -0
- package/dist/lsp/pricing.d.ts.map +1 -0
- package/dist/lsp/pricing.js +972 -0
- package/dist/lsp/pricing.js.map +1 -0
- package/dist/lsp/processing.d.ts +893 -0
- package/dist/lsp/processing.d.ts.map +1 -0
- package/dist/lsp/processing.js +202 -0
- package/dist/lsp/processing.js.map +1 -0
- package/dist/lsp/product.d.ts +76 -0
- package/dist/lsp/product.d.ts.map +1 -0
- package/dist/lsp/product.js +3 -0
- package/dist/lsp/product.js.map +1 -0
- package/dist/lsp/psl.d.ts +785 -0
- package/dist/lsp/psl.d.ts.map +1 -0
- package/dist/lsp/psl.js +333 -0
- package/dist/lsp/psl.js.map +1 -0
- package/dist/lsp/terminal/analytics.d.ts +278 -0
- package/dist/lsp/terminal/analytics.d.ts.map +1 -0
- package/dist/lsp/terminal/analytics.js +310 -0
- package/dist/lsp/terminal/analytics.js.map +1 -0
- package/dist/lsp/terminal/capabilities.d.ts +797 -0
- package/dist/lsp/terminal/capabilities.d.ts.map +1 -0
- package/dist/lsp/terminal/capabilities.js +506 -0
- package/dist/lsp/terminal/capabilities.js.map +1 -0
- package/dist/lsp/terminal/capacities.d.ts +3152 -0
- package/dist/lsp/terminal/capacities.d.ts.map +1 -0
- package/dist/lsp/terminal/capacities.js +504 -0
- package/dist/lsp/terminal/capacities.js.map +1 -0
- package/dist/lsp/terminal/index.d.ts +1056 -0
- package/dist/lsp/terminal/index.d.ts.map +1 -0
- package/dist/lsp/terminal/index.js +394 -0
- package/dist/lsp/terminal/index.js.map +1 -0
- package/dist/lsp/terminal/performance.d.ts +955 -0
- package/dist/lsp/terminal/performance.d.ts.map +1 -0
- package/dist/lsp/terminal/performance.js +159 -0
- package/dist/lsp/terminal/performance.js.map +1 -0
- package/dist/lsp/terminal/utilities.d.ts +2374 -0
- package/dist/lsp/terminal/utilities.d.ts.map +1 -0
- package/dist/lsp/terminal/utilities.js +161 -0
- package/dist/lsp/terminal/utilities.js.map +1 -0
- package/dist/lsp/warehouse/analytics.d.ts +3088 -0
- package/dist/lsp/warehouse/analytics.d.ts.map +1 -0
- package/dist/lsp/warehouse/analytics.js +229 -0
- package/dist/lsp/warehouse/analytics.js.map +1 -0
- package/dist/lsp/warehouse/capabilities.d.ts +1384 -0
- package/dist/lsp/warehouse/capabilities.d.ts.map +1 -0
- package/dist/lsp/warehouse/capabilities.js +567 -0
- package/dist/lsp/warehouse/capabilities.js.map +1 -0
- package/dist/lsp/warehouse/capacities.d.ts +2921 -0
- package/dist/lsp/warehouse/capacities.d.ts.map +1 -0
- package/dist/lsp/warehouse/capacities.js +450 -0
- package/dist/lsp/warehouse/capacities.js.map +1 -0
- package/dist/lsp/warehouse/index.d.ts +2566 -0
- package/dist/lsp/warehouse/index.d.ts.map +1 -0
- package/dist/lsp/warehouse/index.js +264 -0
- package/dist/lsp/warehouse/index.js.map +1 -0
- package/dist/lsp/warehouse/performance.d.ts +287 -0
- package/dist/lsp/warehouse/performance.d.ts.map +1 -0
- package/dist/lsp/warehouse/performance.js +72 -0
- package/dist/lsp/warehouse/performance.js.map +1 -0
- package/dist/lsp/warehouse/utilities.d.ts +5174 -0
- package/dist/lsp/warehouse/utilities.d.ts.map +1 -0
- package/dist/lsp/warehouse/utilities.js +588 -0
- package/dist/lsp/warehouse/utilities.js.map +1 -0
- package/dist/lsp/zones.d.ts +305 -0
- package/dist/lsp/zones.d.ts.map +1 -0
- package/dist/lsp/zones.js +118 -0
- package/dist/lsp/zones.js.map +1 -0
- package/dist/measure.d.ts +139 -0
- package/dist/measure.d.ts.map +1 -0
- package/dist/measure.js +190 -0
- package/dist/measure.js.map +1 -0
- package/dist/operator.d.ts +103 -0
- package/dist/operator.d.ts.map +1 -0
- package/dist/operator.js +38 -0
- package/dist/operator.js.map +1 -0
- package/dist/order.d.ts +2739 -0
- package/dist/order.d.ts.map +1 -0
- package/dist/order.js +1078 -0
- package/dist/order.js.map +1 -0
- package/dist/realm/index.d.ts +4 -0
- package/dist/realm/index.d.ts.map +1 -0
- package/dist/realm/index.js +20 -0
- package/dist/realm/index.js.map +1 -0
- package/dist/realm/pipelines.d.ts +32567 -0
- package/dist/realm/pipelines.d.ts.map +1 -0
- package/dist/realm/pipelines.js +1273 -0
- package/dist/realm/pipelines.js.map +1 -0
- package/dist/realm/queries.d.ts +1327 -0
- package/dist/realm/queries.d.ts.map +1 -0
- package/dist/realm/queries.js +456 -0
- package/dist/realm/queries.js.map +1 -0
- package/dist/realm/utilities.d.ts +1794 -0
- package/dist/realm/utilities.d.ts.map +1 -0
- package/dist/realm/utilities.js +594 -0
- package/dist/realm/utilities.js.map +1 -0
- package/dist/routing.d.ts +428 -0
- package/dist/routing.d.ts.map +1 -0
- package/dist/routing.js +60 -0
- package/dist/routing.js.map +1 -0
- package/dist/service.d.ts +264 -0
- package/dist/service.d.ts.map +1 -0
- package/dist/service.js +60 -0
- package/dist/service.js.map +1 -0
- package/dist/shared/access.d.ts +102 -0
- package/dist/shared/access.d.ts.map +1 -0
- package/dist/shared/access.js +30 -0
- package/dist/shared/access.js.map +1 -0
- package/dist/shared/account.d.ts +44 -0
- package/dist/shared/account.d.ts.map +1 -0
- package/dist/shared/account.js +15 -0
- package/dist/shared/account.js.map +1 -0
- package/dist/shared/auth.d.ts +45 -0
- package/dist/shared/auth.d.ts.map +1 -0
- package/dist/shared/auth.js +19 -0
- package/dist/shared/auth.js.map +1 -0
- package/dist/shared/bucket.d.ts +294 -0
- package/dist/shared/bucket.d.ts.map +1 -0
- package/dist/shared/bucket.js +79 -0
- package/dist/shared/bucket.js.map +1 -0
- package/dist/shared/faq.d.ts +280 -0
- package/dist/shared/faq.d.ts.map +1 -0
- package/dist/shared/faq.js +73 -0
- package/dist/shared/faq.js.map +1 -0
- package/dist/shared/index.d.ts +10 -0
- package/dist/shared/index.d.ts.map +1 -0
- package/dist/shared/index.js +26 -0
- package/dist/shared/index.js.map +1 -0
- package/dist/shared/invitation.d.ts +1525 -0
- package/dist/shared/invitation.d.ts.map +1 -0
- package/dist/shared/invitation.js +60 -0
- package/dist/shared/invitation.js.map +1 -0
- package/dist/shared/operator.d.ts +956 -0
- package/dist/shared/operator.d.ts.map +1 -0
- package/dist/shared/operator.js +48 -0
- package/dist/shared/operator.js.map +1 -0
- package/dist/shared/tracking.d.ts +31 -0
- package/dist/shared/tracking.d.ts.map +1 -0
- package/dist/shared/tracking.js +23 -0
- package/dist/shared/tracking.js.map +1 -0
- package/dist/shared/user.d.ts +77 -0
- package/dist/shared/user.d.ts.map +1 -0
- package/dist/shared/user.js +22 -0
- package/dist/shared/user.js.map +1 -0
- package/dist/sync.d.ts +539 -0
- package/dist/sync.d.ts.map +1 -0
- package/dist/sync.js +329 -0
- package/dist/sync.js.map +1 -0
- package/dist/time.d.ts +139 -0
- package/dist/time.d.ts.map +1 -0
- package/dist/time.js +93 -0
- package/dist/time.js.map +1 -0
- package/dist/user.d.ts +394 -0
- package/dist/user.d.ts.map +1 -0
- package/dist/user.js +205 -0
- package/dist/user.js.map +1 -0
- package/dist/workspace/admin.d.ts +91 -0
- package/dist/workspace/admin.d.ts.map +1 -0
- package/dist/workspace/admin.js +33 -0
- package/dist/workspace/admin.js.map +1 -0
- package/dist/workspace/billing.d.ts +2 -0
- package/dist/workspace/billing.d.ts.map +1 -0
- package/dist/workspace/billing.js +18 -0
- package/dist/workspace/billing.js.map +1 -0
- package/dist/workspace/connector.d.ts +595 -0
- package/dist/workspace/connector.d.ts.map +1 -0
- package/dist/workspace/connector.js +229 -0
- package/dist/workspace/connector.js.map +1 -0
- package/dist/workspace/index.d.ts +36 -0
- package/dist/workspace/index.d.ts.map +1 -0
- package/dist/workspace/index.js +21 -0
- package/dist/workspace/index.js.map +1 -0
- package/package.json +70 -0
- package/src/api.ts +147 -0
- package/src/auth.ts +103 -0
- package/src/aux/agent-rvs.ts +596 -0
- package/src/aux/agents.ts +542 -0
- package/src/aux/customer-rvs.ts +421 -0
- package/src/aux/customers.ts +80 -0
- package/src/aux/index.ts +4 -0
- package/src/billing.ts +330 -0
- package/src/bucket.ts +58 -0
- package/src/context.ts +167 -0
- package/src/csp/analytics.ts +238 -0
- package/src/csp/base.ts +18 -0
- package/src/csp/index.ts +41 -0
- package/src/csp/inventory.ts +325 -0
- package/src/csp/order.ts +485 -0
- package/src/csp/webhook.ts +269 -0
- package/src/de.profile.ts +123 -0
- package/src/dev/developer.ts +90 -0
- package/src/dev/index.ts +81 -0
- package/src/entity.ts +154 -0
- package/src/events.ts +349 -0
- package/src/faq.ts +39 -0
- package/src/geo.ts +111 -0
- package/src/index.ts +48 -0
- package/src/inventory.ts +405 -0
- package/src/invoice.ts +37 -0
- package/src/iotsp/device.ts +334 -0
- package/src/iotsp/index.ts +91 -0
- package/src/iotsp/rule.ts +227 -0
- package/src/iotsp/topic.ts +191 -0
- package/src/lsp/carrier/analytics.ts +393 -0
- package/src/lsp/carrier/capabilities.ts +1009 -0
- package/src/lsp/carrier/capacities.ts +723 -0
- package/src/lsp/carrier/index.ts +175 -0
- package/src/lsp/carrier/performance.ts +145 -0
- package/src/lsp/carrier/utilities.ts +654 -0
- package/src/lsp/consolidation.ts +420 -0
- package/src/lsp/coverage.ts +869 -0
- package/src/lsp/fleet/index.ts +327 -0
- package/src/lsp/fleet/maintenance.ts +478 -0
- package/src/lsp/fleet/parking.ts +582 -0
- package/src/lsp/fleet/vehicle.ts +381 -0
- package/src/lsp/graph.ts +113 -0
- package/src/lsp/hub/analytics.ts +236 -0
- package/src/lsp/hub/capabilities.ts +549 -0
- package/src/lsp/hub/capacities.ts +590 -0
- package/src/lsp/hub/index.ts +298 -0
- package/src/lsp/hub/performance.ts +89 -0
- package/src/lsp/hub/utilities.ts +560 -0
- package/src/lsp/index.ts +125 -0
- package/src/lsp/operations.ts +304 -0
- package/src/lsp/order/delivery.ts +212 -0
- package/src/lsp/order/flow/processes.ts +70 -0
- package/src/lsp/order/flow/stages.ts +119 -0
- package/src/lsp/order/inbound.ts +231 -0
- package/src/lsp/order/internal.ts +305 -0
- package/src/lsp/order/management.ts +367 -0
- package/src/lsp/order/outbound.ts +128 -0
- package/src/lsp/order/passthrough.ts +434 -0
- package/src/lsp/order/ride.ts +190 -0
- package/src/lsp/order/shipping.ts +263 -0
- package/src/lsp/performance.ts +2 -0
- package/src/lsp/pod/index.ts +323 -0
- package/src/lsp/pricing.ts +1097 -0
- package/src/lsp/processing.ts +243 -0
- package/src/lsp/product.ts +104 -0
- package/src/lsp/psl.ts +399 -0
- package/src/lsp/terminal/analytics.ts +334 -0
- package/src/lsp/terminal/capabilities.ts +541 -0
- package/src/lsp/terminal/capacities.ts +556 -0
- package/src/lsp/terminal/index.ts +442 -0
- package/src/lsp/terminal/performance.ts +168 -0
- package/src/lsp/terminal/utilities.ts +173 -0
- package/src/lsp/warehouse/analytics.ts +248 -0
- package/src/lsp/warehouse/capabilities.ts +673 -0
- package/src/lsp/warehouse/capacities.ts +538 -0
- package/src/lsp/warehouse/index.ts +298 -0
- package/src/lsp/warehouse/performance.ts +83 -0
- package/src/lsp/warehouse/utilities.ts +634 -0
- package/src/lsp/zones.ts +148 -0
- package/src/measure.ts +240 -0
- package/src/operator.ts +39 -0
- package/src/order.ts +1207 -0
- package/src/realm/index.ts +3 -0
- package/src/realm/pipelines.ts +1607 -0
- package/src/realm/queries.ts +608 -0
- package/src/realm/utilities.ts +730 -0
- package/src/routing.ts +69 -0
- package/src/service.ts +66 -0
- package/src/shared/access.ts +58 -0
- package/src/shared/account.ts +25 -0
- package/src/shared/auth.ts +30 -0
- package/src/shared/bucket.ts +153 -0
- package/src/shared/faq.ts +139 -0
- package/src/shared/index.ts +9 -0
- package/src/shared/invitation.ts +124 -0
- package/src/shared/operator.ts +159 -0
- package/src/shared/tracking.ts +30 -0
- package/src/shared/user.ts +42 -0
- package/src/sync.ts +364 -0
- package/src/time.ts +113 -0
- package/src/user.ts +243 -0
- package/src/workspace/admin.ts +38 -0
- package/src/workspace/billing.ts +1 -0
- package/src/workspace/connector.ts +270 -0
- package/src/workspace/index.ts +22 -0
|
@@ -0,0 +1,542 @@
|
|
|
1
|
+
import { Type, Static } from '@sinclair/typebox'
|
|
2
|
+
import { ContextSchema } from '../context'
|
|
3
|
+
import { ActionRecordSchema, DurationSchema, WeekDaySchema, TimeSchema, DateTimeZoneSchema } from '../time'
|
|
4
|
+
import { DistanceSchema, CurrencySchema, WeightSchema, VolumeSchema } from '../measure'
|
|
5
|
+
import { ContactsSchema, AddressSchema, RTLocationSchema, CoordinatesSchema } from '../geo'
|
|
6
|
+
import { EntityGradeSchema, EntityBaseSchema, EntityStatusSchema, OperatingHoursSchema, OperatingModeSchema, RatingSchema } from '../entity'
|
|
7
|
+
import {
|
|
8
|
+
APIErrorSchema,
|
|
9
|
+
APIHeadersSchema,
|
|
10
|
+
APIResponseBaseSchema,
|
|
11
|
+
APIResponseDataSchemaFactory
|
|
12
|
+
} from '../api'
|
|
13
|
+
|
|
14
|
+
export const AgentTypeSchema = Type.Union([
|
|
15
|
+
Type.Literal('DRIVER'),
|
|
16
|
+
Type.Literal('RIDER'),
|
|
17
|
+
Type.Literal('PILOTE'),
|
|
18
|
+
Type.Literal('CAPITAIN')
|
|
19
|
+
])
|
|
20
|
+
export const AgentLicenseViolationSchema = Type.Object({
|
|
21
|
+
id: Type.String(),
|
|
22
|
+
type: Type.Union([
|
|
23
|
+
Type.Literal('SPEEDING'),
|
|
24
|
+
Type.Literal('RECKLESS_DRIVING'),
|
|
25
|
+
Type.Literal('DUI_DWI'),
|
|
26
|
+
Type.Literal('DISTRACTED_DRIVING'),
|
|
27
|
+
Type.Literal('HOURS_OF_SERVICE'),
|
|
28
|
+
Type.Literal('VEHICLE_INSPECTION'),
|
|
29
|
+
Type.Literal('WEIGHT_VIOLATION'),
|
|
30
|
+
Type.Literal('HAZMAT_VIOLATION'),
|
|
31
|
+
Type.Literal('LOG_BOOK_VIOLATION'),
|
|
32
|
+
Type.Literal('EQUIPMENT_VIOLATION'),
|
|
33
|
+
Type.Literal('DOCUMENTATION'),
|
|
34
|
+
Type.Literal('OTHER')
|
|
35
|
+
]),
|
|
36
|
+
severity: Type.Union([
|
|
37
|
+
Type.Literal('MINOR'),
|
|
38
|
+
Type.Literal('MAJOR'),
|
|
39
|
+
Type.Literal('SEVERE'),
|
|
40
|
+
Type.Literal('OUT_OF_SERVICE')
|
|
41
|
+
]),
|
|
42
|
+
date: Type.Number(),
|
|
43
|
+
location: Type.Optional(Type.String()),
|
|
44
|
+
description: Type.String({ maxLength: 500 }),
|
|
45
|
+
fineAmount: Type.Optional(Type.Number()),
|
|
46
|
+
points: Type.Optional(Type.Number()),
|
|
47
|
+
status: Type.Union([
|
|
48
|
+
Type.Literal('PENDING'),
|
|
49
|
+
Type.Literal('PAID'),
|
|
50
|
+
Type.Literal('CONTESTED'),
|
|
51
|
+
Type.Literal('DISMISSED'),
|
|
52
|
+
Type.Literal('RESOLVED')
|
|
53
|
+
]),
|
|
54
|
+
impactOnOperations: Type.Object({
|
|
55
|
+
suspendLicense: Type.Boolean(),
|
|
56
|
+
restrictOperations: Type.Boolean(),
|
|
57
|
+
requiresTraining: Type.Boolean(),
|
|
58
|
+
affectsInsurance: Type.Boolean()
|
|
59
|
+
}),
|
|
60
|
+
resolution: Type.Optional(Type.Object({
|
|
61
|
+
date: Type.Number(),
|
|
62
|
+
method: Type.String(),
|
|
63
|
+
notes: Type.Optional(Type.String())
|
|
64
|
+
})),
|
|
65
|
+
recorded: ActionRecordSchema
|
|
66
|
+
})
|
|
67
|
+
export const AgentLicenseSchema = Type.Object({
|
|
68
|
+
type: Type.Union([
|
|
69
|
+
Type.Literal('REGULAR'),
|
|
70
|
+
Type.Literal('CDL_A'),
|
|
71
|
+
Type.Literal('CDL_B'),
|
|
72
|
+
Type.Literal('CDL_C'),
|
|
73
|
+
Type.Literal('MOTORCYCLE'),
|
|
74
|
+
Type.Literal('COMMERCIAL_PILOT'),
|
|
75
|
+
Type.Literal('CHAUFFEUR'),
|
|
76
|
+
Type.Literal('HAZMAT'),
|
|
77
|
+
Type.Literal('PASSENGER_TRANSPORT')
|
|
78
|
+
]),
|
|
79
|
+
number: Type.String({
|
|
80
|
+
minLength: 5,
|
|
81
|
+
maxLength: 50,
|
|
82
|
+
description: 'Driver license or professional license number'
|
|
83
|
+
}),
|
|
84
|
+
issuingAuthority: Type.String({ description: 'State/Country that issued license' }),
|
|
85
|
+
issueDate: DateTimeZoneSchema,
|
|
86
|
+
expiry: DateTimeZoneSchema,
|
|
87
|
+
|
|
88
|
+
// License status and restrictions
|
|
89
|
+
status: Type.Union([
|
|
90
|
+
Type.Literal('ACTIVE'),
|
|
91
|
+
Type.Literal('SUSPENDED'),
|
|
92
|
+
Type.Literal('REVOKED'),
|
|
93
|
+
Type.Literal('EXPIRED'),
|
|
94
|
+
Type.Literal('PROVISIONAL')
|
|
95
|
+
]),
|
|
96
|
+
restrictions: Type.Array(Type.Union([
|
|
97
|
+
Type.Literal('CORRECTIVE_LENSES'),
|
|
98
|
+
Type.Literal('DAYLIGHT_ONLY'),
|
|
99
|
+
Type.Literal('NO_INTERSTATE'),
|
|
100
|
+
Type.Literal('AUTOMATIC_TRANSMISSION'),
|
|
101
|
+
Type.Literal('HEARING_AID'),
|
|
102
|
+
Type.Literal('PROSTHETIC_AID'),
|
|
103
|
+
Type.Literal('VEHICLE_SPECIFIC')
|
|
104
|
+
])),
|
|
105
|
+
endorsements: Type.Array(Type.Union([
|
|
106
|
+
Type.Literal('PASSENGER'),
|
|
107
|
+
Type.Literal('SCHOOL_BUS'),
|
|
108
|
+
Type.Literal('HAZMAT'),
|
|
109
|
+
Type.Literal('TANK_VEHICLE'),
|
|
110
|
+
Type.Literal('DOUBLE_TRIPLE'),
|
|
111
|
+
Type.Literal('MOTORCYCLE')
|
|
112
|
+
])),
|
|
113
|
+
|
|
114
|
+
// Compliance tracking
|
|
115
|
+
medicalCertification: Type.Optional(Type.Object({
|
|
116
|
+
number: Type.String(),
|
|
117
|
+
expiry: Type.Number(),
|
|
118
|
+
restrictions: Type.Array(Type.String())
|
|
119
|
+
})),
|
|
120
|
+
renewalHistory: Type.Array(Type.Object({
|
|
121
|
+
date: Type.Number(),
|
|
122
|
+
previousExpiry: Type.Number(),
|
|
123
|
+
renewalType: Type.Union([
|
|
124
|
+
Type.Literal('STANDARD'),
|
|
125
|
+
Type.Literal('EARLY'),
|
|
126
|
+
Type.Literal('LATE'),
|
|
127
|
+
Type.Literal('REINSTATEMENT')
|
|
128
|
+
])
|
|
129
|
+
})),
|
|
130
|
+
violations: Type.Array(AgentLicenseViolationSchema),
|
|
131
|
+
|
|
132
|
+
// Point system tracking
|
|
133
|
+
points: Type.Object({
|
|
134
|
+
current: Type.Number({ minimum: 0 }),
|
|
135
|
+
lifetime: Type.Number({ minimum: 0 }),
|
|
136
|
+
lastReset: Type.Optional(Type.Number())
|
|
137
|
+
}),
|
|
138
|
+
// Verification and documentation
|
|
139
|
+
verification: Type.Object({
|
|
140
|
+
verified: Type.Boolean(),
|
|
141
|
+
by: Type.Optional(Type.String()),
|
|
142
|
+
at: DateTimeZoneSchema,
|
|
143
|
+
documentUrl: Type.Optional(Type.String()),
|
|
144
|
+
nextVerificationDue: Type.Optional(Type.Number())
|
|
145
|
+
}),
|
|
146
|
+
|
|
147
|
+
added: ActionRecordSchema,
|
|
148
|
+
updated: Type.Optional(ActionRecordSchema)
|
|
149
|
+
})
|
|
150
|
+
export const AgentWalletSchema = Type.Object({
|
|
151
|
+
balance: Type.Number(),
|
|
152
|
+
earnings: Type.Optional(Type.Number()),
|
|
153
|
+
currency: CurrencySchema,
|
|
154
|
+
paymentOptions: Type.Object({
|
|
155
|
+
method: Type.String(),
|
|
156
|
+
accountNumber: Type.String(),
|
|
157
|
+
schedules: Type.Array(Type.Object({
|
|
158
|
+
day: Type.Optional(WeekDaySchema),
|
|
159
|
+
time: Type.Optional(TimeSchema)
|
|
160
|
+
}))
|
|
161
|
+
})
|
|
162
|
+
})
|
|
163
|
+
export const Agent2VehicleBindingSchema = Type.Object({
|
|
164
|
+
vid: Type.String(), // Vehicle ID
|
|
165
|
+
status: Type.Union([
|
|
166
|
+
Type.Literal('PENDING'),
|
|
167
|
+
Type.Literal('BINDED'),
|
|
168
|
+
Type.Literal('UNBINDED'),
|
|
169
|
+
]),
|
|
170
|
+
isOwner: Type.Boolean(),
|
|
171
|
+
terms: Type.Array(Type.String()),
|
|
172
|
+
assigned: ActionRecordSchema,
|
|
173
|
+
confirmed: Type.Optional(ActionRecordSchema)
|
|
174
|
+
})
|
|
175
|
+
export const AgentCommunicationSchema = Type.Object({
|
|
176
|
+
languages: Type.Array(Type.String()),
|
|
177
|
+
notificationPreferences: Type.Object({
|
|
178
|
+
sms: Type.Boolean(),
|
|
179
|
+
email: Type.Boolean(),
|
|
180
|
+
push: Type.Boolean(),
|
|
181
|
+
calls: Type.Boolean()
|
|
182
|
+
}),
|
|
183
|
+
emergencyContact: ContactsSchema
|
|
184
|
+
})
|
|
185
|
+
export const AgentBackgroundCheckSchema = Type.Object({
|
|
186
|
+
status: Type.Union([
|
|
187
|
+
Type.Literal('PENDING'),
|
|
188
|
+
Type.Literal('APPROVED'),
|
|
189
|
+
Type.Literal('REJECTED'),
|
|
190
|
+
Type.Literal('EXPIRED')
|
|
191
|
+
]),
|
|
192
|
+
completedAt: Type.Optional(Type.Number()),
|
|
193
|
+
expiryDate: Type.Optional(Type.Number()),
|
|
194
|
+
checkTypes: Type.Array(Type.Union([
|
|
195
|
+
Type.Literal('CRIMINAL'),
|
|
196
|
+
Type.Literal('DRIVING_RECORD'),
|
|
197
|
+
Type.Literal('EMPLOYMENT'),
|
|
198
|
+
Type.Literal('DRUG_TEST')
|
|
199
|
+
]))
|
|
200
|
+
})
|
|
201
|
+
export const AgentTrainingStatusSchema = Type.Union([
|
|
202
|
+
Type.Literal('PENDING'),
|
|
203
|
+
Type.Literal('COMPLETED'),
|
|
204
|
+
Type.Literal('EXPIRED')
|
|
205
|
+
])
|
|
206
|
+
export const AgentTrainingSchema = Type.Object({
|
|
207
|
+
type: AgentTypeSchema,
|
|
208
|
+
status: AgentTrainingStatusSchema,
|
|
209
|
+
required: Type.Boolean(),
|
|
210
|
+
nextTrainingDue: Type.Optional(DateTimeZoneSchema),
|
|
211
|
+
courses: Type.Array(Type.Object({
|
|
212
|
+
id: Type.String(),
|
|
213
|
+
status: AgentTrainingStatusSchema,
|
|
214
|
+
completed: Type.Optional(DateTimeZoneSchema),
|
|
215
|
+
certificateUrl: Type.Optional(Type.String()),
|
|
216
|
+
expiry: Type.Optional(DateTimeZoneSchema)
|
|
217
|
+
})),
|
|
218
|
+
completed: Type.Optional(DateTimeZoneSchema),
|
|
219
|
+
expiry: Type.Optional(DateTimeZoneSchema)
|
|
220
|
+
})
|
|
221
|
+
export const AgentMedicalSchema = Type.Object({
|
|
222
|
+
fitnessForDuty: Type.Boolean(),
|
|
223
|
+
lastMedicalExam: Type.Optional(DateTimeZoneSchema),
|
|
224
|
+
nextExamDue: Type.Optional(DateTimeZoneSchema),
|
|
225
|
+
restrictions: Type.Array(Type.String()),
|
|
226
|
+
emergencyMedicalInfo: Type.Optional(Type.String())
|
|
227
|
+
})
|
|
228
|
+
export const AgentShiftsSchema = Type.Object({
|
|
229
|
+
current: Type.Optional(Type.String()),
|
|
230
|
+
preferred: Type.Array(Type.String()),
|
|
231
|
+
assignedRoutes: Type.Array(Type.String()),
|
|
232
|
+
routePreferences: Type.Array(Type.String())
|
|
233
|
+
})
|
|
234
|
+
|
|
235
|
+
// ---------------------------------------------------------------------------
|
|
236
|
+
// Rally sub-document — stamped on RIDER agents by the Rally dispatch engine
|
|
237
|
+
// ---------------------------------------------------------------------------
|
|
238
|
+
export const AgentRallySchema = Type.Object({
|
|
239
|
+
zoneId: Type.Optional(Type.String({ description: 'Rally zone this agent is currently assigned to' })),
|
|
240
|
+
available: Type.Optional(Type.Boolean({ description: 'True when agent is in the active dispatch pool' })),
|
|
241
|
+
agentRole: Type.Optional(Type.String({ description: 'Agent capability role set by the consuming service (e.g. SHOPPER, DRIVER). Absent = unrestricted.' })),
|
|
242
|
+
})
|
|
243
|
+
export const AgentRallyStatusSchema = Type.Union([
|
|
244
|
+
Type.Literal('IDLE'),
|
|
245
|
+
Type.Literal('IN_TRANSIT'),
|
|
246
|
+
Type.Literal('DELIVERING'),
|
|
247
|
+
Type.Literal('AT_CONSOLIDATION_POINT'),
|
|
248
|
+
Type.Literal('CONSOLIDATING'),
|
|
249
|
+
Type.Literal('OFFLINE'),
|
|
250
|
+
Type.Literal('EMERGENCY')
|
|
251
|
+
])
|
|
252
|
+
|
|
253
|
+
export const AgentCommittedWaypointSchema = Type.Object({
|
|
254
|
+
position: CoordinatesSchema,
|
|
255
|
+
orderId: Type.Optional(Type.String()),
|
|
256
|
+
eta: DateTimeZoneSchema,
|
|
257
|
+
stopType: Type.Union([
|
|
258
|
+
Type.Literal('PICKUP'),
|
|
259
|
+
Type.Literal('BOARDING'),
|
|
260
|
+
Type.Literal('DELIVERY'),
|
|
261
|
+
Type.Literal('DROPOFF'),
|
|
262
|
+
Type.Literal('CONSOLIDATION_POINT'),
|
|
263
|
+
Type.Literal('DEPOT')
|
|
264
|
+
])
|
|
265
|
+
})
|
|
266
|
+
export const AgentSnapshotSchema = Type.Object({
|
|
267
|
+
agentId: Type.String(),
|
|
268
|
+
position: RTLocationSchema,
|
|
269
|
+
status: AgentRallyStatusSchema,
|
|
270
|
+
committedWaypoints: Type.Array(AgentCommittedWaypointSchema),
|
|
271
|
+
packagesInCustody: Type.Array(Type.String()),
|
|
272
|
+
capacityRemaining: Type.Object({
|
|
273
|
+
weight: WeightSchema, // Kg
|
|
274
|
+
volume: VolumeSchema // cbm
|
|
275
|
+
}),
|
|
276
|
+
sessionNackCount: Type.Number({ minimum: 0 }), // resets each shift
|
|
277
|
+
cooldownUntil: Type.Optional(DateTimeZoneSchema), // no offers before this
|
|
278
|
+
slaSlack: Type.Optional(DurationSchema), // slack to tightest in-custody SLA (ms)
|
|
279
|
+
at: DateTimeZoneSchema
|
|
280
|
+
})
|
|
281
|
+
|
|
282
|
+
// Agent Schema (extends EntitySpecs)
|
|
283
|
+
export const AgentSchema = Type.Composite([
|
|
284
|
+
EntityBaseSchema,
|
|
285
|
+
Type.Object({
|
|
286
|
+
type: AgentTypeSchema,
|
|
287
|
+
context: ContextSchema,
|
|
288
|
+
bio: Type.String({ maxLength: 1000 }),
|
|
289
|
+
contacts: ContactsSchema,
|
|
290
|
+
address: Type.Optional(AddressSchema),
|
|
291
|
+
license: AgentLicenseSchema,
|
|
292
|
+
vehicles: Type.Array(Agent2VehicleBindingSchema),
|
|
293
|
+
certifications: Type.Array(Type.Union([
|
|
294
|
+
Type.Literal('HAZMAT'),
|
|
295
|
+
Type.Literal('PASSENGER'),
|
|
296
|
+
Type.Literal('SCHOOL_BUS'),
|
|
297
|
+
Type.Literal('DOUBLE_TRIPLE'),
|
|
298
|
+
Type.Literal('TANK_VEHICLE'),
|
|
299
|
+
Type.Literal('DANGEROUS_GOODS'),
|
|
300
|
+
Type.Literal('FIRST_AID')
|
|
301
|
+
])),
|
|
302
|
+
base: Type.String({ description: 'Hub or facility ID' }),
|
|
303
|
+
experience: DurationSchema, // Years
|
|
304
|
+
communication: AgentCommunicationSchema,
|
|
305
|
+
wallet: AgentWalletSchema,
|
|
306
|
+
rating: RatingSchema,
|
|
307
|
+
workingMode: OperatingModeSchema,
|
|
308
|
+
workingHours: Type.Optional(OperatingHoursSchema),
|
|
309
|
+
shifts: Type.Optional(AgentShiftsSchema),
|
|
310
|
+
medical: Type.Optional(AgentMedicalSchema),
|
|
311
|
+
training: Type.Optional(Type.Array(AgentTrainingSchema)),
|
|
312
|
+
backgroundCheck: Type.Optional(Type.Array(AgentBackgroundCheckSchema)),
|
|
313
|
+
// Rally fields — present on RIDER agents only
|
|
314
|
+
rally: Type.Optional(AgentRallySchema),
|
|
315
|
+
added: ActionRecordSchema,
|
|
316
|
+
updated: Type.Optional(ActionRecordSchema)
|
|
317
|
+
})
|
|
318
|
+
])
|
|
319
|
+
export const AgentProfileSchema = Type.Omit(AgentSchema, [
|
|
320
|
+
'context',
|
|
321
|
+
'license',
|
|
322
|
+
'vehicles',
|
|
323
|
+
'certifications',
|
|
324
|
+
'wallet',
|
|
325
|
+
'base', 'rating',
|
|
326
|
+
'workingHours',
|
|
327
|
+
'workingMode',
|
|
328
|
+
'shifts',
|
|
329
|
+
'medical',
|
|
330
|
+
'training',
|
|
331
|
+
'backgroundCheck',
|
|
332
|
+
'added', 'updated'
|
|
333
|
+
], { additionalProperties: false })
|
|
334
|
+
export const AgentUpdateSchema = Type.Partial(Type.Omit(AgentSchema, ['id', 'context', 'vehicles', 'wallet', 'rating', 'added', 'updated']))
|
|
335
|
+
|
|
336
|
+
// Generate TypeScript type from schema
|
|
337
|
+
export type Agent = Static<typeof AgentSchema>
|
|
338
|
+
export type AgentProfile = Static<typeof AgentProfileSchema>
|
|
339
|
+
export type AgentUpdate = Static<typeof AgentUpdateSchema>
|
|
340
|
+
export type AgentLicense = Static<typeof AgentLicenseSchema>
|
|
341
|
+
export type AgentWallet = Static<typeof AgentWalletSchema>
|
|
342
|
+
export type Agent2VehicleBinding = Static<typeof Agent2VehicleBindingSchema>
|
|
343
|
+
export type AgentTraining = Static<typeof AgentTrainingSchema>
|
|
344
|
+
export type AgentCommunication = Static<typeof AgentCommunicationSchema>
|
|
345
|
+
export type AgentBackgroundCheck = Static<typeof AgentBackgroundCheckSchema>
|
|
346
|
+
export type AgentMedical = Static<typeof AgentMedicalSchema>
|
|
347
|
+
export type AgentShifts = Static<typeof AgentShiftsSchema>
|
|
348
|
+
|
|
349
|
+
// Additional utility schemas for agent management
|
|
350
|
+
export const AgentStatusUpdateSchema = Type.Object({
|
|
351
|
+
agentId: Type.String(),
|
|
352
|
+
status: Type.Union([
|
|
353
|
+
Type.Literal('ACTIVE'),
|
|
354
|
+
Type.Literal('BUSY'),
|
|
355
|
+
Type.Literal('CLOSED'),
|
|
356
|
+
Type.Literal('SUSPENDED')
|
|
357
|
+
]),
|
|
358
|
+
reason: Type.Optional(Type.String({ maxLength: 200 })),
|
|
359
|
+
updatedBy: Type.String(),
|
|
360
|
+
timestamp: Type.Number()
|
|
361
|
+
})
|
|
362
|
+
|
|
363
|
+
export const AgentLocationUpdateSchema = Type.Object({
|
|
364
|
+
agentId: Type.String(),
|
|
365
|
+
location: Type.Object({
|
|
366
|
+
lng: Type.Number(),
|
|
367
|
+
lat: Type.Number(),
|
|
368
|
+
heading: Type.Optional(Type.Number()),
|
|
369
|
+
altitude: Type.Optional(Type.Number()),
|
|
370
|
+
accuracy: Type.Optional(Type.Number())
|
|
371
|
+
}),
|
|
372
|
+
timestamp: Type.Number()
|
|
373
|
+
})
|
|
374
|
+
|
|
375
|
+
export const AgentPerformanceSchema = Type.Object({
|
|
376
|
+
agentId: Type.String(),
|
|
377
|
+
period: Type.Object({
|
|
378
|
+
start: Type.Number(),
|
|
379
|
+
end: Type.Number()
|
|
380
|
+
}),
|
|
381
|
+
metrics: Type.Object({
|
|
382
|
+
totalOrders: Type.Number({ minimum: 0 }),
|
|
383
|
+
completedOrders: Type.Number({ minimum: 0 }),
|
|
384
|
+
cancelledOrders: Type.Number({ minimum: 0 }),
|
|
385
|
+
averageRating: Type.Number({ minimum: 1, maximum: 5 }),
|
|
386
|
+
totalDistance: DistanceSchema, // Kilometers
|
|
387
|
+
averageDeliveryTime: DurationSchema, // Minutes
|
|
388
|
+
onTimeDeliveryRate: Type.Number({ minimum: 0, maximum: 100, description: 'Percentage' }),
|
|
389
|
+
customerComplaints: Type.Number({ minimum: 0 }),
|
|
390
|
+
activeHours: Type.Number({ minimum: 0, description: 'Hours worked' })
|
|
391
|
+
}),
|
|
392
|
+
rankings: Type.Optional(Type.Object({
|
|
393
|
+
overallRank: Type.Number({ minimum: 1 }),
|
|
394
|
+
categoryRanks: Type.Optional(Type.Record(Type.String(), Type.Number({ minimum: 1 }))),
|
|
395
|
+
totalAgents: Type.Number({ minimum: 1 })
|
|
396
|
+
}))
|
|
397
|
+
})
|
|
398
|
+
|
|
399
|
+
export const AgentAvailabilitySchema = Type.Object({
|
|
400
|
+
agentId: Type.String(),
|
|
401
|
+
available: Type.Boolean(),
|
|
402
|
+
currentOrder: Type.Optional(Type.String({ description: 'Current order reference' })),
|
|
403
|
+
estimatedFreeTime: Type.Optional(Type.Number({ description: 'Minutes until available' })),
|
|
404
|
+
workingHours: Type.Object({
|
|
405
|
+
start: Type.String({
|
|
406
|
+
pattern: '^([0-1]?[0-9]|2[0-3]):[0-5][0-9]$',
|
|
407
|
+
description: '24h format, e.g. "08:00"'
|
|
408
|
+
}),
|
|
409
|
+
end: Type.String({
|
|
410
|
+
pattern: '^([0-1]?[0-9]|2[0-3]):[0-5][0-9]$',
|
|
411
|
+
description: '24h format, e.g. "17:00"'
|
|
412
|
+
}),
|
|
413
|
+
timezone: Type.String({ description: 'IANA timezone' })
|
|
414
|
+
}),
|
|
415
|
+
breakSchedule: Type.Optional(Type.Array(Type.Object({
|
|
416
|
+
start: Type.String(),
|
|
417
|
+
end: Type.String(),
|
|
418
|
+
type: Type.Union([
|
|
419
|
+
Type.Literal('LUNCH'),
|
|
420
|
+
Type.Literal('REST'),
|
|
421
|
+
Type.Literal('MAINTENANCE')
|
|
422
|
+
])
|
|
423
|
+
})))
|
|
424
|
+
})
|
|
425
|
+
|
|
426
|
+
export const AgentQuerySchema = Type.Object({
|
|
427
|
+
contextId: Type.Optional(Type.String()),
|
|
428
|
+
status: Type.Optional(Type.Array(Type.Union([
|
|
429
|
+
Type.Literal('ACTIVE'),
|
|
430
|
+
Type.Literal('BUSY'),
|
|
431
|
+
Type.Literal('CLOSED'),
|
|
432
|
+
Type.Literal('SUSPENDED')
|
|
433
|
+
]))),
|
|
434
|
+
grade: Type.Optional(Type.Array(EntityGradeSchema)),
|
|
435
|
+
minRating: Type.Optional(Type.Number({ minimum: 1, maximum: 5 })),
|
|
436
|
+
hasVehicle: Type.Optional(Type.Boolean()),
|
|
437
|
+
available: Type.Optional(Type.Boolean()),
|
|
438
|
+
agentRole: Type.Optional(Type.String({ description: 'Filter agents by their Rally dispatch role (e.g. SHOPPER, DRIVER)' })),
|
|
439
|
+
nearLocation: Type.Optional(Type.Object({
|
|
440
|
+
lat: Type.Number(),
|
|
441
|
+
lng: Type.Number(),
|
|
442
|
+
radius: Type.Number({ minimum: 0.1, maximum: 100, description: 'Radius in kilometers' })
|
|
443
|
+
})),
|
|
444
|
+
limit: Type.Optional(Type.Number({ minimum: 1, maximum: 100 })),
|
|
445
|
+
offset: Type.Optional(Type.Number({ minimum: 0 }))
|
|
446
|
+
})
|
|
447
|
+
|
|
448
|
+
export type AgentRally = Static<typeof AgentRallySchema>
|
|
449
|
+
export type AgentRallyStatus = Static<typeof AgentRallyStatusSchema>
|
|
450
|
+
export type AgentCommittedWaypoint = Static<typeof AgentCommittedWaypointSchema>
|
|
451
|
+
export type AgentSnapshot = Static<typeof AgentSnapshotSchema>
|
|
452
|
+
export type AgentStatusUpdate = Static<typeof AgentStatusUpdateSchema>
|
|
453
|
+
export type AgentLocationUpdate = Static<typeof AgentLocationUpdateSchema>
|
|
454
|
+
export type AgentPerformance = Static<typeof AgentPerformanceSchema>
|
|
455
|
+
export type AgentAvailability = Static<typeof AgentAvailabilitySchema>
|
|
456
|
+
export type AgentQuery = Static<typeof AgentQuerySchema>
|
|
457
|
+
|
|
458
|
+
// ─── Request Validation Schemas ───────────────────────────────────────────────
|
|
459
|
+
|
|
460
|
+
export const AgentRetrieveQuerySchema = Type.Object({
|
|
461
|
+
verbose: Type.Optional(Type.Boolean())
|
|
462
|
+
})
|
|
463
|
+
|
|
464
|
+
export const AgentListQuerySchema = Type.Object({
|
|
465
|
+
status: Type.Optional(EntityStatusSchema),
|
|
466
|
+
limit: Type.Optional(Type.Number({ minimum: 1, maximum: 200, default: 20 })),
|
|
467
|
+
offset: Type.Optional(Type.Number({ minimum: 0, default: 0 }))
|
|
468
|
+
})
|
|
469
|
+
|
|
470
|
+
export const AgentAssignVehicleBodySchema = Type.Omit(Agent2VehicleBindingSchema, ['status', 'assigned', 'confirmed'])
|
|
471
|
+
|
|
472
|
+
export const AgentUnassignVehicleBodySchema = Type.Object({ vid: Type.String() })
|
|
473
|
+
|
|
474
|
+
export const LSPAgentRetrieveRVS = {
|
|
475
|
+
headers: APIHeadersSchema,
|
|
476
|
+
params: Type.Object({ id: Type.String() }),
|
|
477
|
+
querystring: AgentRetrieveQuerySchema,
|
|
478
|
+
response: {
|
|
479
|
+
200: APIResponseDataSchemaFactory({ agent: AgentProfileSchema }),
|
|
480
|
+
'4XX': APIErrorSchema
|
|
481
|
+
}
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
export const LSPAgentListRVS = {
|
|
485
|
+
headers: APIHeadersSchema,
|
|
486
|
+
querystring: AgentListQuerySchema,
|
|
487
|
+
response: {
|
|
488
|
+
200: APIResponseDataSchemaFactory({
|
|
489
|
+
agents: Type.Array(AgentProfileSchema),
|
|
490
|
+
total: Type.Number(),
|
|
491
|
+
limit: Type.Number(),
|
|
492
|
+
offset: Type.Number()
|
|
493
|
+
}),
|
|
494
|
+
'4XX': APIErrorSchema
|
|
495
|
+
}
|
|
496
|
+
}
|
|
497
|
+
|
|
498
|
+
export const LSPAgentUpdateRVS = {
|
|
499
|
+
headers: APIHeadersSchema,
|
|
500
|
+
params: Type.Object({ id: Type.String() }),
|
|
501
|
+
body: AgentUpdateSchema,
|
|
502
|
+
response: {
|
|
503
|
+
200: APIResponseDataSchemaFactory({ agent: AgentProfileSchema }),
|
|
504
|
+
'4XX': APIErrorSchema
|
|
505
|
+
}
|
|
506
|
+
}
|
|
507
|
+
|
|
508
|
+
export const LSPAgentAssignVehicleRVS = {
|
|
509
|
+
headers: APIHeadersSchema,
|
|
510
|
+
params: Type.Object({ id: Type.String() }),
|
|
511
|
+
body: AgentAssignVehicleBodySchema,
|
|
512
|
+
response: {
|
|
513
|
+
200: APIResponseBaseSchema,
|
|
514
|
+
'4XX': APIErrorSchema
|
|
515
|
+
}
|
|
516
|
+
}
|
|
517
|
+
|
|
518
|
+
export const LSPAgentUnassignVehicleRVS = {
|
|
519
|
+
headers: APIHeadersSchema,
|
|
520
|
+
params: Type.Object({ id: Type.String() }),
|
|
521
|
+
body: AgentUnassignVehicleBodySchema,
|
|
522
|
+
response: {
|
|
523
|
+
200: APIResponseBaseSchema,
|
|
524
|
+
'4XX': APIErrorSchema
|
|
525
|
+
}
|
|
526
|
+
}
|
|
527
|
+
|
|
528
|
+
export const LSPAgentRemoveRVS = {
|
|
529
|
+
headers: APIHeadersSchema,
|
|
530
|
+
params: Type.Object({ id: Type.String() }),
|
|
531
|
+
response: {
|
|
532
|
+
200: APIResponseBaseSchema,
|
|
533
|
+
'4XX': APIErrorSchema
|
|
534
|
+
}
|
|
535
|
+
}
|
|
536
|
+
|
|
537
|
+
export type LSPAgentRetrieveValidation = { params: Static<typeof LSPAgentRetrieveRVS.params>, querystring: Static<typeof LSPAgentRetrieveRVS.querystring>, response: Static<(typeof LSPAgentRetrieveRVS.response)[200]> }
|
|
538
|
+
export type LSPAgentListValidation = { querystring: Static<typeof LSPAgentListRVS.querystring>, response: Static<(typeof LSPAgentListRVS.response)[200]> }
|
|
539
|
+
export type LSPAgentUpdateValidation = { params: Static<typeof LSPAgentUpdateRVS.params>, body: Static<typeof LSPAgentUpdateRVS.body>, response: Static<(typeof LSPAgentUpdateRVS.response)[200]> }
|
|
540
|
+
export type LSPAgentAssignVehicleValidation = { params: Static<typeof LSPAgentAssignVehicleRVS.params>, body: Static<typeof LSPAgentAssignVehicleRVS.body>, response: Static<(typeof LSPAgentAssignVehicleRVS.response)[200]> }
|
|
541
|
+
export type LSPAgentUnassignVehicleValidation = { params: Static<typeof LSPAgentUnassignVehicleRVS.params>, body: Static<typeof LSPAgentUnassignVehicleRVS.body>, response: Static<(typeof LSPAgentUnassignVehicleRVS.response)[200]> }
|
|
542
|
+
export type LSPAgentRemoveValidation = { params: Static<typeof LSPAgentRemoveRVS.params>, response: Static<(typeof LSPAgentRemoveRVS.response)[200]> }
|