@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
package/src/entity.ts
ADDED
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
import { Type, Static } from '@sinclair/typebox'
|
|
2
|
+
import { RTLocationSchema } from './geo'
|
|
3
|
+
import { DateTimeZoneSchema, WeekDaySchema } from './time'
|
|
4
|
+
import { SeverityLevelSchema } from './measure'
|
|
5
|
+
|
|
6
|
+
// ─── Entity types ─────────────────────────────────────────────────────────────
|
|
7
|
+
|
|
8
|
+
export const EntityTypeSchema = Type.Union([
|
|
9
|
+
// Mobile
|
|
10
|
+
Type.Literal('moto'),
|
|
11
|
+
Type.Literal('car'),
|
|
12
|
+
Type.Literal('bike'),
|
|
13
|
+
Type.Literal('truck'),
|
|
14
|
+
Type.Literal('plane'),
|
|
15
|
+
Type.Literal('ship'),
|
|
16
|
+
// Static
|
|
17
|
+
Type.Literal('restaurant'),
|
|
18
|
+
Type.Literal('hotel'),
|
|
19
|
+
Type.Literal('store'),
|
|
20
|
+
Type.Literal('office'),
|
|
21
|
+
Type.Literal('warehouse')
|
|
22
|
+
])
|
|
23
|
+
export const EntityStatusSchema = Type.Union([
|
|
24
|
+
Type.Literal('INACTIVE'),
|
|
25
|
+
Type.Literal('ACTIVE'),
|
|
26
|
+
Type.Literal('AVAILABLE'),
|
|
27
|
+
Type.Literal('ON_DUTY'),
|
|
28
|
+
Type.Literal('OFF_DUTY'),
|
|
29
|
+
Type.Literal('BREAK'),
|
|
30
|
+
Type.Literal('OPENED'),
|
|
31
|
+
Type.Literal('CLOSED'),
|
|
32
|
+
Type.Literal('SUSPENDED'),
|
|
33
|
+
Type.Literal('MAINTENANCE'),
|
|
34
|
+
Type.Literal('EXPANSION'),
|
|
35
|
+
Type.Literal('UPGRADE'),
|
|
36
|
+
Type.Literal('DECOMMISSIONED')
|
|
37
|
+
])
|
|
38
|
+
export const EntityGradeSchema = Type.Union([
|
|
39
|
+
Type.Literal('1H'),
|
|
40
|
+
Type.Literal('2H'),
|
|
41
|
+
Type.Literal('3H')
|
|
42
|
+
])
|
|
43
|
+
export const EntityBaseSchema = Type.Object({
|
|
44
|
+
id: Type.String(),
|
|
45
|
+
status: EntityStatusSchema,
|
|
46
|
+
grade: EntityGradeSchema,
|
|
47
|
+
static: Type.Optional(Type.Boolean()),
|
|
48
|
+
currentLocation: Type.Optional(RTLocationSchema),
|
|
49
|
+
utilization: Type.Optional(Type.Number({ minimum: 0, maximum: 100 }))
|
|
50
|
+
})
|
|
51
|
+
|
|
52
|
+
// ─── Ratings ──────────────────────────────────────────────────────────────────
|
|
53
|
+
|
|
54
|
+
export const RatingSchema = Type.Object({
|
|
55
|
+
standard: Type.Optional(Type.Number({ minimum: 1, maximum: 5, description: 'Performance rating' })),
|
|
56
|
+
safety: Type.Optional(Type.Number({ minimum: 0, maximum: 100, description: 'Safety score' }))
|
|
57
|
+
})
|
|
58
|
+
|
|
59
|
+
// ─── Operating hours ──────────────────────────────────────────────────────────
|
|
60
|
+
|
|
61
|
+
export const OperatingModeSchema = Type.Union([
|
|
62
|
+
Type.Literal('24_7'),
|
|
63
|
+
Type.Literal('BUSINESS_HOURS'),
|
|
64
|
+
Type.Literal('EXTENDED_HOURS'),
|
|
65
|
+
Type.Literal('SCHEDULED'),
|
|
66
|
+
Type.Literal('ON_DEMAND')
|
|
67
|
+
])
|
|
68
|
+
export const OperatingHoursSchema = Type.Object({
|
|
69
|
+
dayOfWeek: WeekDaySchema,
|
|
70
|
+
openTime: Type.String({ pattern: '^([0-1]?[0-9]|2[0-3]):[0-5][0-9]$', description: '24h HH:MM' }),
|
|
71
|
+
closeTime: Type.String({ pattern: '^([0-1]?[0-9]|2[0-3]):[0-5][0-9]$', description: '24h HH:MM' }),
|
|
72
|
+
isClosed: Type.Optional(Type.Boolean())
|
|
73
|
+
})
|
|
74
|
+
|
|
75
|
+
// ─── Compliance ───────────────────────────────────────────────────────────────
|
|
76
|
+
|
|
77
|
+
export const ComplianceSchema = Type.Union([
|
|
78
|
+
Type.Literal('hazmat-certified'),
|
|
79
|
+
Type.Literal('food-grade'),
|
|
80
|
+
Type.Literal('climate-controlled')
|
|
81
|
+
])
|
|
82
|
+
export const ComplianceFlagSchema = Type.Union([
|
|
83
|
+
Type.Literal('FDA'),
|
|
84
|
+
Type.Literal('GDP')
|
|
85
|
+
])
|
|
86
|
+
|
|
87
|
+
// ─── Alerts & subscriptions ───────────────────────────────────────────────────
|
|
88
|
+
|
|
89
|
+
export const AlertSchema = Type.Object({
|
|
90
|
+
type: Type.String(),
|
|
91
|
+
severity: SeverityLevelSchema,
|
|
92
|
+
message: Type.String(),
|
|
93
|
+
datetime: DateTimeZoneSchema
|
|
94
|
+
})
|
|
95
|
+
// export const SubscriptionSchema = Type.Object({
|
|
96
|
+
// status: Type.String(),
|
|
97
|
+
// package: Type.String(),
|
|
98
|
+
// history: Type.Array(Type.Any()),
|
|
99
|
+
// datetime: DateTimeZoneSchema
|
|
100
|
+
// })
|
|
101
|
+
|
|
102
|
+
// ─── Nearby search ────────────────────────────────────────────────────────────
|
|
103
|
+
|
|
104
|
+
export const NearbySearchQuerySchema = Type.Object({
|
|
105
|
+
center: RTLocationSchema,
|
|
106
|
+
type: EntityTypeSchema,
|
|
107
|
+
status: Type.Optional(EntityStatusSchema),
|
|
108
|
+
grade: Type.Optional(EntityGradeSchema),
|
|
109
|
+
scale: Type.Optional(Type.Number({ description: 'Radius in km' })),
|
|
110
|
+
maxResults: Type.Optional(Type.Number()),
|
|
111
|
+
maxDistance: Type.Optional(Type.Number()),
|
|
112
|
+
maxRetries: Type.Optional(Type.Number()),
|
|
113
|
+
scaleMultiplier: Type.Optional(Type.Number())
|
|
114
|
+
})
|
|
115
|
+
export const NearbyWithinBoundsQuerySchema = Type.Object({
|
|
116
|
+
northEast: RTLocationSchema,
|
|
117
|
+
southWest: RTLocationSchema,
|
|
118
|
+
status: Type.Optional(Type.Union([
|
|
119
|
+
Type.String(),
|
|
120
|
+
Type.Object({ $in: Type.Array(Type.String()) })
|
|
121
|
+
])),
|
|
122
|
+
grade: Type.Optional(EntityGradeSchema),
|
|
123
|
+
maxResults: Type.Optional(Type.Number())
|
|
124
|
+
})
|
|
125
|
+
export const NearestVehicleQuerySchema = Type.Object({
|
|
126
|
+
center: RTLocationSchema,
|
|
127
|
+
count: Type.Optional(Type.Number()),
|
|
128
|
+
status: Type.Optional(Type.Union([
|
|
129
|
+
Type.String(),
|
|
130
|
+
Type.Object({ $in: Type.Array(Type.String()) })
|
|
131
|
+
])),
|
|
132
|
+
grade: Type.Optional(EntityGradeSchema),
|
|
133
|
+
maxDistance: Type.Optional(Type.Number())
|
|
134
|
+
})
|
|
135
|
+
export const NearbySearchResultsSchema = Type.Array(EntityBaseSchema)
|
|
136
|
+
|
|
137
|
+
// ─── TypeScript types ─────────────────────────────────────────────────────────
|
|
138
|
+
|
|
139
|
+
export type EntityType = Static<typeof EntityTypeSchema>
|
|
140
|
+
export type EntityStatus = Static<typeof EntityStatusSchema>
|
|
141
|
+
export type EntityGrade = Static<typeof EntityGradeSchema>
|
|
142
|
+
export type EntityBase = Static<typeof EntityBaseSchema>
|
|
143
|
+
export type Rating = Static<typeof RatingSchema>
|
|
144
|
+
export type OperatingMode = Static<typeof OperatingModeSchema>
|
|
145
|
+
export type OperatingHours = Static<typeof OperatingHoursSchema>
|
|
146
|
+
export type Compliance = Static<typeof ComplianceSchema>
|
|
147
|
+
export type ComplianceFlag = Static<typeof ComplianceFlagSchema>
|
|
148
|
+
export type Alert = Static<typeof AlertSchema>
|
|
149
|
+
// export type Subscription = Static<typeof SubscriptionSchema>
|
|
150
|
+
export type NearbySearchQuery = Static<typeof NearbySearchQuerySchema>
|
|
151
|
+
export type NearbyWithinBoundsQuery = Static<typeof NearbyWithinBoundsQuerySchema>
|
|
152
|
+
export type NearestVehicleQuery = Static<typeof NearestVehicleQuerySchema>
|
|
153
|
+
export type NearbySearchResults = Static<typeof NearbySearchResultsSchema>
|
|
154
|
+
|
package/src/events.ts
ADDED
|
@@ -0,0 +1,349 @@
|
|
|
1
|
+
import { Type, Static } from '@sinclair/typebox'
|
|
2
|
+
import { RTLocationSchema, CoordinatesSchema } from './geo'
|
|
3
|
+
import { ContextSchema } from './context'
|
|
4
|
+
import { OrderAssigneeSchema } from './order'
|
|
5
|
+
import { DateTimeZoneSchema } from './time'
|
|
6
|
+
import { DeliveryRallyClientSchema, DeliveryDispatchableOrderSchema } from './lsp/order/delivery'
|
|
7
|
+
import { AgentIdSchema, ZoneIdSchema, OfferIdSchema, CPointIdSchema, ConsolidationOfferSchema, ConsolidationPointSchema } from './lsp/consolidation'
|
|
8
|
+
|
|
9
|
+
// ─── Order tracking events ────────────────────────────────────────────────────
|
|
10
|
+
|
|
11
|
+
export const OrderEventTypeSchema = Type.Union([
|
|
12
|
+
Type.Literal('order.created'),
|
|
13
|
+
Type.Literal('order.updated'),
|
|
14
|
+
Type.Literal('order.assigned'),
|
|
15
|
+
Type.Literal('order.dispatched'),
|
|
16
|
+
Type.Literal('order.completed'),
|
|
17
|
+
Type.Literal('order.cancelled'),
|
|
18
|
+
Type.Literal('order.location.changed'),
|
|
19
|
+
Type.Literal('order.process.changed'),
|
|
20
|
+
Type.Literal('order.stage.changed'),
|
|
21
|
+
Type.Literal('order.status.changed')
|
|
22
|
+
])
|
|
23
|
+
export const OrderTrackingEventSchema = Type.Object({
|
|
24
|
+
event: OrderEventTypeSchema,
|
|
25
|
+
reference: Type.String(),
|
|
26
|
+
status: Type.String(),
|
|
27
|
+
stage: Type.String(),
|
|
28
|
+
process: Type.String(),
|
|
29
|
+
timestamp: Type.Number(),
|
|
30
|
+
location: Type.Optional(Type.Intersect([
|
|
31
|
+
RTLocationSchema,
|
|
32
|
+
Type.Object({ updatedAt: Type.Number() })
|
|
33
|
+
])),
|
|
34
|
+
assignee: Type.Optional(OrderAssigneeSchema),
|
|
35
|
+
eta: Type.Optional(Type.Number({ description: 'Estimated arrival timestamp' })),
|
|
36
|
+
metadata: Type.Optional(Type.Record(Type.String(), Type.Any()))
|
|
37
|
+
})
|
|
38
|
+
|
|
39
|
+
// ─── Rally events ─────────────────────────────────────────────────────────────
|
|
40
|
+
// Contract for the `RALLY_EVENT` socket.io channel: everything pushed to the
|
|
41
|
+
// `{workspace}:rally` room by Rally sub-systems (Batch, Dispatch, Balance,
|
|
42
|
+
// Zones, Consolidation) is one of the discriminated variants below. External
|
|
43
|
+
// services (socket `utype: 'service'`) consume these. Payloads mirror exactly
|
|
44
|
+
// what de.arch emits — do not reshape without a coordinated de.arch change.
|
|
45
|
+
|
|
46
|
+
export const RallyEventTypeSchema = Type.Union([
|
|
47
|
+
Type.Literal('rally.dispatch.offer'),
|
|
48
|
+
Type.Literal('rally.consolidation.offer'),
|
|
49
|
+
Type.Literal('rally.handoff.instruction'),
|
|
50
|
+
Type.Literal('rally.reallocation.offer'),
|
|
51
|
+
Type.Literal('rally.eta.update'),
|
|
52
|
+
Type.Literal('rally.custody.transferred'),
|
|
53
|
+
Type.Literal('rally.custody.unconfirmed'),
|
|
54
|
+
Type.Literal('rally.route.assigned'),
|
|
55
|
+
Type.Literal('rally.agent.freed'),
|
|
56
|
+
Type.Literal('rally.zone.split'),
|
|
57
|
+
Type.Literal('rally.zone.merged'),
|
|
58
|
+
Type.Literal('rally.zone.dormant'),
|
|
59
|
+
Type.Literal('rally.swarm.assigned'),
|
|
60
|
+
Type.Literal('rally.pod.bucket.fired'),
|
|
61
|
+
Type.Literal('rally.pod.unavailable')
|
|
62
|
+
])
|
|
63
|
+
|
|
64
|
+
// Rider receives a fully sequenced multi-order route (Dispatch)
|
|
65
|
+
export const RallyDispatchOfferPayloadSchema = Type.Object({
|
|
66
|
+
offerId: OfferIdSchema,
|
|
67
|
+
riderId: Type.String(),
|
|
68
|
+
expiresAt: Type.String({ description: 'ISO-8601 — offer expiry' }),
|
|
69
|
+
orders: Type.Array(Type.Intersect([
|
|
70
|
+
DeliveryDispatchableOrderSchema,
|
|
71
|
+
Type.Object({ estimatedPickupAt: Type.String({ description: 'ISO-8601' }) })
|
|
72
|
+
]))
|
|
73
|
+
})
|
|
74
|
+
|
|
75
|
+
// Mid-route consolidation proposal (Consolidation engine)
|
|
76
|
+
export const RallyConsolidationOfferPayloadSchema = Type.Object({
|
|
77
|
+
offerId: OfferIdSchema,
|
|
78
|
+
offer: ConsolidationOfferSchema
|
|
79
|
+
})
|
|
80
|
+
|
|
81
|
+
// Handoff instruction — three emitter variants coexist (de.arch wins policy):
|
|
82
|
+
// relay legs (cross-zone), scheduled meetups (LSP consolidation routes) and
|
|
83
|
+
// the consolidation state adapter. Discriminate on the fields present.
|
|
84
|
+
export const RallyHandoffRelayPayloadSchema = Type.Object({
|
|
85
|
+
consolidationId: Type.String(),
|
|
86
|
+
leg: Type.Union([ Type.Literal(1), Type.Literal(2) ]),
|
|
87
|
+
orderRefs: Type.Array(Type.String()),
|
|
88
|
+
riderId: Type.String(),
|
|
89
|
+
counterpartRiderId: Type.String(),
|
|
90
|
+
handoffPoint: Type.Object({
|
|
91
|
+
name: Type.String(),
|
|
92
|
+
coordinates: CoordinatesSchema,
|
|
93
|
+
radiusMeters: Type.Number()
|
|
94
|
+
}),
|
|
95
|
+
handoffCode: Type.String({ description: 'Shared 4-digit code exchanged physically at handoff' }),
|
|
96
|
+
estimatedArrivalAt: Type.String({ description: 'ISO-8601' }),
|
|
97
|
+
instructions: Type.String()
|
|
98
|
+
})
|
|
99
|
+
export const RallyHandoffMeetupPayloadSchema = Type.Object({
|
|
100
|
+
consolidationId: Type.String(),
|
|
101
|
+
leg: Type.Union([ Type.Literal(1), Type.Literal(2) ]),
|
|
102
|
+
orderRefs: Type.Array(Type.String()),
|
|
103
|
+
riderId: Type.String(),
|
|
104
|
+
counterpartRiderId: Type.Optional(Type.String({ description: 'Set on leg 2' })),
|
|
105
|
+
counterpartRiderIds: Type.Optional(Type.Array(Type.String(), { description: 'Set on leg 1' })),
|
|
106
|
+
cpointId: CPointIdSchema,
|
|
107
|
+
scheduledAt: Type.String({ description: 'ISO-8601' }),
|
|
108
|
+
instructions: Type.String()
|
|
109
|
+
})
|
|
110
|
+
export const RallyHandoffAdapterPayloadSchema = Type.Object({
|
|
111
|
+
offerId: OfferIdSchema,
|
|
112
|
+
agentId: AgentIdSchema,
|
|
113
|
+
cpoint: ConsolidationPointSchema,
|
|
114
|
+
arriveBy: DateTimeZoneSchema
|
|
115
|
+
})
|
|
116
|
+
export const RallyHandoffInstructionPayloadSchema = Type.Union([
|
|
117
|
+
RallyHandoffRelayPayloadSchema,
|
|
118
|
+
RallyHandoffMeetupPayloadSchema,
|
|
119
|
+
RallyHandoffAdapterPayloadSchema
|
|
120
|
+
])
|
|
121
|
+
|
|
122
|
+
// Rider asked to move to a higher-demand zone (Balance)
|
|
123
|
+
export const RallyReallocationOfferPayloadSchema = Type.Object({
|
|
124
|
+
riderId: Type.String(),
|
|
125
|
+
fromZoneId: Type.String(),
|
|
126
|
+
fromZoneName: Type.String(),
|
|
127
|
+
toZoneId: Type.String(),
|
|
128
|
+
toZoneName: Type.String(),
|
|
129
|
+
reason: Type.String({ description: "e.g. 'HIGH_DEMAND'" }),
|
|
130
|
+
targetDemand: Type.Number(),
|
|
131
|
+
sourceSupply: Type.Number(),
|
|
132
|
+
targetPool: Type.String({ description: "Rider pool — 'ANY' when unrestricted" }),
|
|
133
|
+
expiresAt: Type.Number({ description: 'Unix ms' })
|
|
134
|
+
})
|
|
135
|
+
|
|
136
|
+
// Per-order ETA push (Dispatch) — `client` echoes the consuming service's own
|
|
137
|
+
// order reference + branch id, which is how external services route the event
|
|
138
|
+
export const RallyEtaUpdatePayloadSchema = Type.Object({
|
|
139
|
+
orderRef: Type.String(),
|
|
140
|
+
client: DeliveryRallyClientSchema,
|
|
141
|
+
eta: Type.String({ description: 'ISO-8601 — estimated delivery time' }),
|
|
142
|
+
riderLocation: CoordinatesSchema
|
|
143
|
+
})
|
|
144
|
+
|
|
145
|
+
// Custody lifecycle (Consolidation)
|
|
146
|
+
export const RallyCustodyTransferredPayloadSchema = Type.Object({
|
|
147
|
+
consolidationId: Type.String(),
|
|
148
|
+
orderRefs: Type.Array(Type.String()),
|
|
149
|
+
leg2RiderId: Type.String(),
|
|
150
|
+
message: Type.String()
|
|
151
|
+
})
|
|
152
|
+
export const RallyCustodyUnconfirmedPayloadSchema = Type.Object({
|
|
153
|
+
orderRef: Type.String(),
|
|
154
|
+
reason: Type.String(),
|
|
155
|
+
severity: Type.Union([ Type.Literal('low'), Type.Literal('medium'), Type.Literal('critical') ])
|
|
156
|
+
})
|
|
157
|
+
|
|
158
|
+
// Route confirmed after a rider accepts a dispatch/consolidation offer
|
|
159
|
+
export const RallyRouteAssignedPayloadSchema = Type.Object({
|
|
160
|
+
offerId: Type.String(),
|
|
161
|
+
riderId: Type.String(),
|
|
162
|
+
orders: Type.Array(Type.Pick(DeliveryDispatchableOrderSchema, [ 'reference', 'pickup', 'dropoff' ]))
|
|
163
|
+
})
|
|
164
|
+
|
|
165
|
+
// Reserved — declared in the contract but not yet emitted by de.arch
|
|
166
|
+
// (internal AGENT_FREED events stay on the CONSOLIDATION_EVENT channel)
|
|
167
|
+
export const RallyAgentFreedPayloadSchema = Type.Object({
|
|
168
|
+
agentId: AgentIdSchema,
|
|
169
|
+
zoneId: ZoneIdSchema,
|
|
170
|
+
availableAt: DateTimeZoneSchema
|
|
171
|
+
})
|
|
172
|
+
|
|
173
|
+
// Zone reshaping (Zones)
|
|
174
|
+
export const RallyZoneSplitPayloadSchema = Type.Object({
|
|
175
|
+
parentZoneId: Type.String(),
|
|
176
|
+
zoneA: Type.Object({ id: Type.String(), name: Type.String() }),
|
|
177
|
+
zoneB: Type.Object({ id: Type.String(), name: Type.String() })
|
|
178
|
+
})
|
|
179
|
+
export const RallyZoneMergedPayloadSchema = Type.Object({
|
|
180
|
+
sourceZoneIds: Type.Array(Type.String()),
|
|
181
|
+
newZone: Type.Object({ id: Type.String(), name: Type.String() })
|
|
182
|
+
})
|
|
183
|
+
export const RallyZoneDormantPayloadSchema = Type.Object({
|
|
184
|
+
zoneId: Type.String(),
|
|
185
|
+
reason: Type.String()
|
|
186
|
+
})
|
|
187
|
+
|
|
188
|
+
// Swarm + pod signals (Batch/Dispatch)
|
|
189
|
+
export const RallySwarmAssignedPayloadSchema = Type.Object({
|
|
190
|
+
riderId: Type.String(),
|
|
191
|
+
orderCount: Type.Number(),
|
|
192
|
+
pool: Type.Literal('SWARM')
|
|
193
|
+
})
|
|
194
|
+
export const RallyPodBucketFiredPayloadSchema = Type.Object({
|
|
195
|
+
podId: Type.Optional(Type.String()),
|
|
196
|
+
orderCount: Type.Number()
|
|
197
|
+
})
|
|
198
|
+
export const RallyPodUnavailablePayloadSchema = Type.Object({
|
|
199
|
+
podId: Type.String(),
|
|
200
|
+
orderRef: Type.String(),
|
|
201
|
+
zoneId: Type.String()
|
|
202
|
+
})
|
|
203
|
+
|
|
204
|
+
// Discriminated event union — switch on `type` to narrow `payload`
|
|
205
|
+
export const RallyDispatchOfferEventSchema = Type.Object({
|
|
206
|
+
type: Type.Literal('rally.dispatch.offer'),
|
|
207
|
+
payload: RallyDispatchOfferPayloadSchema
|
|
208
|
+
})
|
|
209
|
+
export const RallyConsolidationOfferEventSchema = Type.Object({
|
|
210
|
+
type: Type.Literal('rally.consolidation.offer'),
|
|
211
|
+
payload: RallyConsolidationOfferPayloadSchema
|
|
212
|
+
})
|
|
213
|
+
export const RallyHandoffInstructionEventSchema = Type.Object({
|
|
214
|
+
type: Type.Literal('rally.handoff.instruction'),
|
|
215
|
+
payload: RallyHandoffInstructionPayloadSchema
|
|
216
|
+
})
|
|
217
|
+
export const RallyReallocationOfferEventSchema = Type.Object({
|
|
218
|
+
type: Type.Literal('rally.reallocation.offer'),
|
|
219
|
+
payload: RallyReallocationOfferPayloadSchema
|
|
220
|
+
})
|
|
221
|
+
export const RallyEtaUpdateEventSchema = Type.Object({
|
|
222
|
+
type: Type.Literal('rally.eta.update'),
|
|
223
|
+
payload: RallyEtaUpdatePayloadSchema
|
|
224
|
+
})
|
|
225
|
+
export const RallyCustodyTransferredEventSchema = Type.Object({
|
|
226
|
+
type: Type.Literal('rally.custody.transferred'),
|
|
227
|
+
payload: RallyCustodyTransferredPayloadSchema
|
|
228
|
+
})
|
|
229
|
+
export const RallyCustodyUnconfirmedEventSchema = Type.Object({
|
|
230
|
+
type: Type.Literal('rally.custody.unconfirmed'),
|
|
231
|
+
payload: RallyCustodyUnconfirmedPayloadSchema
|
|
232
|
+
})
|
|
233
|
+
export const RallyRouteAssignedEventSchema = Type.Object({
|
|
234
|
+
type: Type.Literal('rally.route.assigned'),
|
|
235
|
+
payload: RallyRouteAssignedPayloadSchema
|
|
236
|
+
})
|
|
237
|
+
export const RallyAgentFreedEventSchema = Type.Object({
|
|
238
|
+
type: Type.Literal('rally.agent.freed'),
|
|
239
|
+
payload: RallyAgentFreedPayloadSchema
|
|
240
|
+
})
|
|
241
|
+
export const RallyZoneSplitEventSchema = Type.Object({
|
|
242
|
+
type: Type.Literal('rally.zone.split'),
|
|
243
|
+
payload: RallyZoneSplitPayloadSchema
|
|
244
|
+
})
|
|
245
|
+
export const RallyZoneMergedEventSchema = Type.Object({
|
|
246
|
+
type: Type.Literal('rally.zone.merged'),
|
|
247
|
+
payload: RallyZoneMergedPayloadSchema
|
|
248
|
+
})
|
|
249
|
+
export const RallyZoneDormantEventSchema = Type.Object({
|
|
250
|
+
type: Type.Literal('rally.zone.dormant'),
|
|
251
|
+
payload: RallyZoneDormantPayloadSchema
|
|
252
|
+
})
|
|
253
|
+
export const RallySwarmAssignedEventSchema = Type.Object({
|
|
254
|
+
type: Type.Literal('rally.swarm.assigned'),
|
|
255
|
+
payload: RallySwarmAssignedPayloadSchema
|
|
256
|
+
})
|
|
257
|
+
export const RallyPodBucketFiredEventSchema = Type.Object({
|
|
258
|
+
type: Type.Literal('rally.pod.bucket.fired'),
|
|
259
|
+
payload: RallyPodBucketFiredPayloadSchema
|
|
260
|
+
})
|
|
261
|
+
export const RallyPodUnavailableEventSchema = Type.Object({
|
|
262
|
+
type: Type.Literal('rally.pod.unavailable'),
|
|
263
|
+
payload: RallyPodUnavailablePayloadSchema
|
|
264
|
+
})
|
|
265
|
+
|
|
266
|
+
export const RallyEventSchema = Type.Union([
|
|
267
|
+
RallyDispatchOfferEventSchema,
|
|
268
|
+
RallyConsolidationOfferEventSchema,
|
|
269
|
+
RallyHandoffInstructionEventSchema,
|
|
270
|
+
RallyReallocationOfferEventSchema,
|
|
271
|
+
RallyEtaUpdateEventSchema,
|
|
272
|
+
RallyCustodyTransferredEventSchema,
|
|
273
|
+
RallyCustodyUnconfirmedEventSchema,
|
|
274
|
+
RallyRouteAssignedEventSchema,
|
|
275
|
+
RallyAgentFreedEventSchema,
|
|
276
|
+
RallyZoneSplitEventSchema,
|
|
277
|
+
RallyZoneMergedEventSchema,
|
|
278
|
+
RallyZoneDormantEventSchema,
|
|
279
|
+
RallySwarmAssignedEventSchema,
|
|
280
|
+
RallyPodBucketFiredEventSchema,
|
|
281
|
+
RallyPodUnavailableEventSchema
|
|
282
|
+
])
|
|
283
|
+
|
|
284
|
+
// ─── Location update ──────────────────────────────────────────────────────────
|
|
285
|
+
|
|
286
|
+
export const LocationUpdateEventSchema = Type.Object({
|
|
287
|
+
orderReference: Type.String(),
|
|
288
|
+
agentId: Type.String(),
|
|
289
|
+
context: ContextSchema,
|
|
290
|
+
location: RTLocationSchema,
|
|
291
|
+
eta: Type.Optional(Type.Number({ description: 'Estimated arrival timestamp' }))
|
|
292
|
+
})
|
|
293
|
+
|
|
294
|
+
// ─── Messaging ────────────────────────────────────────────────────────────────
|
|
295
|
+
|
|
296
|
+
export const MessageEventSchema = Type.Object({
|
|
297
|
+
orderReference: Type.String(),
|
|
298
|
+
from: Type.Object({
|
|
299
|
+
id: Type.String(),
|
|
300
|
+
utype: Type.String(),
|
|
301
|
+
name: Type.Optional(Type.String())
|
|
302
|
+
}),
|
|
303
|
+
body: Type.String(),
|
|
304
|
+
timestamp: Type.Number()
|
|
305
|
+
})
|
|
306
|
+
|
|
307
|
+
// ─── Route change ─────────────────────────────────────────────────────────────
|
|
308
|
+
|
|
309
|
+
export const RouteChangeEventSchema = Type.Object({
|
|
310
|
+
orderReference: Type.String(),
|
|
311
|
+
agentId: Type.String(),
|
|
312
|
+
route: Type.Array(Type.Tuple([Type.Number(), Type.Number()])),
|
|
313
|
+
timestamp: Type.Number()
|
|
314
|
+
})
|
|
315
|
+
|
|
316
|
+
// ─── Presence ─────────────────────────────────────────────────────────────────
|
|
317
|
+
|
|
318
|
+
export const PresenceEventSchema = Type.Object({
|
|
319
|
+
utype: Type.String(),
|
|
320
|
+
id: Type.String(),
|
|
321
|
+
status: Type.Union([Type.Literal('online'), Type.Literal('offline')]),
|
|
322
|
+
timestamp: Type.Number()
|
|
323
|
+
})
|
|
324
|
+
|
|
325
|
+
// ─── TypeScript types ─────────────────────────────────────────────────────────
|
|
326
|
+
|
|
327
|
+
export type OrderEventType = Static<typeof OrderEventTypeSchema>
|
|
328
|
+
export type OrderTrackingEvent = Static<typeof OrderTrackingEventSchema>
|
|
329
|
+
export type RallyEventType = Static<typeof RallyEventTypeSchema>
|
|
330
|
+
export type RallyEvent = Static<typeof RallyEventSchema>
|
|
331
|
+
export type RallyDispatchOfferPayload = Static<typeof RallyDispatchOfferPayloadSchema>
|
|
332
|
+
export type RallyConsolidationOfferPayload = Static<typeof RallyConsolidationOfferPayloadSchema>
|
|
333
|
+
export type RallyHandoffInstructionPayload = Static<typeof RallyHandoffInstructionPayloadSchema>
|
|
334
|
+
export type RallyReallocationOfferPayload = Static<typeof RallyReallocationOfferPayloadSchema>
|
|
335
|
+
export type RallyEtaUpdatePayload = Static<typeof RallyEtaUpdatePayloadSchema>
|
|
336
|
+
export type RallyCustodyTransferredPayload = Static<typeof RallyCustodyTransferredPayloadSchema>
|
|
337
|
+
export type RallyCustodyUnconfirmedPayload = Static<typeof RallyCustodyUnconfirmedPayloadSchema>
|
|
338
|
+
export type RallyRouteAssignedPayload = Static<typeof RallyRouteAssignedPayloadSchema>
|
|
339
|
+
export type RallyAgentFreedPayload = Static<typeof RallyAgentFreedPayloadSchema>
|
|
340
|
+
export type RallyZoneSplitPayload = Static<typeof RallyZoneSplitPayloadSchema>
|
|
341
|
+
export type RallyZoneMergedPayload = Static<typeof RallyZoneMergedPayloadSchema>
|
|
342
|
+
export type RallyZoneDormantPayload = Static<typeof RallyZoneDormantPayloadSchema>
|
|
343
|
+
export type RallySwarmAssignedPayload = Static<typeof RallySwarmAssignedPayloadSchema>
|
|
344
|
+
export type RallyPodBucketFiredPayload = Static<typeof RallyPodBucketFiredPayloadSchema>
|
|
345
|
+
export type RallyPodUnavailablePayload = Static<typeof RallyPodUnavailablePayloadSchema>
|
|
346
|
+
export type LocationUpdateEvent = Static<typeof LocationUpdateEventSchema>
|
|
347
|
+
export type MessageEvent = Static<typeof MessageEventSchema>
|
|
348
|
+
export type RouteChangeEvent = Static<typeof RouteChangeEventSchema>
|
|
349
|
+
export type PresenceEvent = Static<typeof PresenceEventSchema>
|
package/src/faq.ts
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { Type, Static } from '@sinclair/typebox'
|
|
2
|
+
import { ActionRecordSchema } from './time'
|
|
3
|
+
import { ContextSchema, GenericServiceContextSchema } from './context'
|
|
4
|
+
|
|
5
|
+
// ─── FAQ ──────────────────────────────────────────────────────────────────────
|
|
6
|
+
|
|
7
|
+
export const FAQDefinitionStatusSchema = Type.Union([
|
|
8
|
+
Type.Literal('ACTIVE'),
|
|
9
|
+
Type.Literal('ARCHIVED'),
|
|
10
|
+
Type.Literal('DEPRECATED')
|
|
11
|
+
])
|
|
12
|
+
|
|
13
|
+
export const FAQDefinitionSchema = Type.Object({
|
|
14
|
+
context: ContextSchema,
|
|
15
|
+
reference: Type.String(),
|
|
16
|
+
question: Type.String(),
|
|
17
|
+
answer: Type.String(),
|
|
18
|
+
version: Type.String({
|
|
19
|
+
pattern: '^20\\d{2}\\.(0[1-9]|1[0-2])(?:\\.(0[1-9]|[12]\\d|3[01]))?$',
|
|
20
|
+
description: 'Date-based version format — 2024.01 or 2024.12.15'
|
|
21
|
+
}),
|
|
22
|
+
status: FAQDefinitionStatusSchema,
|
|
23
|
+
contexts: Type.Optional(Type.Array(GenericServiceContextSchema)),
|
|
24
|
+
source: Type.Optional(Type.String({ format: 'uri' })),
|
|
25
|
+
tags: Type.Optional(Type.Array(Type.String())),
|
|
26
|
+
locked: Type.Boolean(),
|
|
27
|
+
added: ActionRecordSchema,
|
|
28
|
+
updated: Type.Optional(ActionRecordSchema)
|
|
29
|
+
}, { additionalProperties: false })
|
|
30
|
+
|
|
31
|
+
export const FAQDefinitionUpdateSchema = Type.Partial(
|
|
32
|
+
Type.Omit(FAQDefinitionSchema, ['reference', 'context', 'contexts', 'added', 'updated'])
|
|
33
|
+
)
|
|
34
|
+
|
|
35
|
+
// ─── TypeScript types ─────────────────────────────────────────────────────────
|
|
36
|
+
|
|
37
|
+
export type FAQDefinitionStatus = Static<typeof FAQDefinitionStatusSchema>
|
|
38
|
+
export type FAQDefinition = Static<typeof FAQDefinitionSchema>
|
|
39
|
+
export type FAQDefinitionUpdate = Static<typeof FAQDefinitionUpdateSchema>
|
package/src/geo.ts
ADDED
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { Type, Static } from '@sinclair/typebox'
|
|
2
|
+
import { DistanceSchema } from './measure'
|
|
3
|
+
import { DateTimeZoneSchema } from './time'
|
|
4
|
+
|
|
5
|
+
// ─── Coordinates ──────────────────────────────────────────────────────────────
|
|
6
|
+
//
|
|
7
|
+
// De. uses two coordinate representations:
|
|
8
|
+
// Coordinates — [lat, lng] tuple, De. internal convention (NOT GeoJSON order)
|
|
9
|
+
// RTLocation — { lng, lat, ... } object, used for realtime tracking & SDK
|
|
10
|
+
|
|
11
|
+
export const LatLng = Type.Readonly(Type.Tuple(
|
|
12
|
+
[Type.Number(), Type.Number()],
|
|
13
|
+
{ description: '[latitude, longitude]', example: [5.6037, -0.1870] }
|
|
14
|
+
))
|
|
15
|
+
export const CoordinatesSchema = Type.Readonly(Type.Object({
|
|
16
|
+
lat: Type.Number({ example: 48.8566 }),
|
|
17
|
+
lng: Type.Number({ example: 2.3522 })
|
|
18
|
+
}))
|
|
19
|
+
|
|
20
|
+
export const RTLocationSchema = Type.Object({
|
|
21
|
+
lng: Type.Number({ example: 2.3522 }),
|
|
22
|
+
lat: Type.Number({ example: 48.8566 }),
|
|
23
|
+
heading: Type.Optional(Type.Number({ minimum: 0, maximum: 360, description: 'Degrees clockwise from north' })),
|
|
24
|
+
altitude: Type.Optional(Type.Number({ example: 35 })),
|
|
25
|
+
accuracy: Type.Optional(Type.Number({ minimum: 0, description: 'Metres' })),
|
|
26
|
+
speed: Type.Optional(Type.Number({ example: 42 })),
|
|
27
|
+
at: Type.Optional(DateTimeZoneSchema)
|
|
28
|
+
})
|
|
29
|
+
|
|
30
|
+
export const LocationInputSchema = Type.Object({
|
|
31
|
+
landmarkText: Type.Optional(Type.String()),
|
|
32
|
+
coordinates: Type.Optional(CoordinatesSchema),
|
|
33
|
+
city: Type.Optional(Type.String()),
|
|
34
|
+
country: Type.String(),
|
|
35
|
+
zip: Type.Optional(Type.String())
|
|
36
|
+
})
|
|
37
|
+
|
|
38
|
+
// ─── Address ──────────────────────────────────────────────────────────────────
|
|
39
|
+
|
|
40
|
+
export const AddressSchema = Type.Object({
|
|
41
|
+
name: Type.String({ example: 'Headquarters' }),
|
|
42
|
+
street1: Type.String({ example: '12 Rue de Rivoli' }),
|
|
43
|
+
street2: Type.Optional(Type.String({ example: 'Floor 3' })),
|
|
44
|
+
city: Type.String({ example: 'Paris' }),
|
|
45
|
+
state: Type.String({ example: 'Île-de-France' }),
|
|
46
|
+
coordinates: CoordinatesSchema,
|
|
47
|
+
geocode: Type.Optional(Type.String()),
|
|
48
|
+
postalCode: Type.Optional(Type.String({ example: '75001' })),
|
|
49
|
+
country: Type.String({ description: 'ISO 3166-1 alpha-2', example: 'FR' }),
|
|
50
|
+
isHeadquarter: Type.Optional(Type.Boolean()),
|
|
51
|
+
isResidential: Type.Optional(Type.Boolean()),
|
|
52
|
+
addressValidated: Type.Optional(Type.Boolean())
|
|
53
|
+
})
|
|
54
|
+
|
|
55
|
+
export const ContactsSchema = Type.Object({
|
|
56
|
+
name: Type.Optional(Type.String({ example: 'Jean Dupont' })),
|
|
57
|
+
emails: Type.Array(Type.String({ format: 'email', example: 'contact@example.com' })),
|
|
58
|
+
phones: Type.Array(Type.String({ example: '+33612345678' }))
|
|
59
|
+
})
|
|
60
|
+
|
|
61
|
+
export const CompanySchema = Type.Object({
|
|
62
|
+
type: Type.String(),
|
|
63
|
+
registrationId: Type.String(),
|
|
64
|
+
name: Type.String(),
|
|
65
|
+
hqCountry: Type.String()
|
|
66
|
+
})
|
|
67
|
+
|
|
68
|
+
// ─── Bounding areas ───────────────────────────────────────────────────────────
|
|
69
|
+
|
|
70
|
+
export const BoundingBoxSchema = Type.Object({
|
|
71
|
+
minLat: Type.Number(),
|
|
72
|
+
maxLat: Type.Number(),
|
|
73
|
+
minLng: Type.Number(),
|
|
74
|
+
maxLng: Type.Number()
|
|
75
|
+
})
|
|
76
|
+
|
|
77
|
+
export const PolygonalBoundarySchema = Type.Object({
|
|
78
|
+
type: Type.Literal('POLYGON'),
|
|
79
|
+
geofence: Type.Boolean(),
|
|
80
|
+
coordinates: Type.Array(Type.Array(CoordinatesSchema))
|
|
81
|
+
})
|
|
82
|
+
export const CircularBoundarySchema = Type.Object({
|
|
83
|
+
type: Type.Literal('CIRCLE'),
|
|
84
|
+
center: CoordinatesSchema,
|
|
85
|
+
radius: DistanceSchema,
|
|
86
|
+
geofence: Type.Boolean()
|
|
87
|
+
})
|
|
88
|
+
export const CustomBoundarySchema = Type.Object({
|
|
89
|
+
type: Type.Literal('CUSTOM'),
|
|
90
|
+
areas: Type.Array(Type.String()),
|
|
91
|
+
description: Type.Optional(Type.String())
|
|
92
|
+
})
|
|
93
|
+
export const GeoBoundarySchema = Type.Union([
|
|
94
|
+
PolygonalBoundarySchema,
|
|
95
|
+
CircularBoundarySchema,
|
|
96
|
+
CustomBoundarySchema
|
|
97
|
+
])
|
|
98
|
+
|
|
99
|
+
// ─── TypeScript types ─────────────────────────────────────────────────────────
|
|
100
|
+
|
|
101
|
+
export type Coordinates = Static<typeof CoordinatesSchema>
|
|
102
|
+
export type RTLocation = Static<typeof RTLocationSchema>
|
|
103
|
+
export type LocationInput = Static<typeof LocationInputSchema>
|
|
104
|
+
export type Address = Static<typeof AddressSchema>
|
|
105
|
+
export type Contacts = Static<typeof ContactsSchema>
|
|
106
|
+
export type Company = Static<typeof CompanySchema>
|
|
107
|
+
export type BoundingBox = Static<typeof BoundingBoxSchema>
|
|
108
|
+
export type PolygonalBoundary = Static<typeof PolygonalBoundarySchema>
|
|
109
|
+
export type CircularBoundary = Static<typeof CircularBoundarySchema>
|
|
110
|
+
export type CustomBoundary = Static<typeof CustomBoundarySchema>
|
|
111
|
+
export type GeoBoundary = Static<typeof GeoBoundarySchema>
|