@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,159 @@
|
|
|
1
|
+
import { Type, Static, type TSchema } from '@sinclair/typebox'
|
|
2
|
+
import {
|
|
3
|
+
APIHeadersSchema,
|
|
4
|
+
APIResponseBaseSchema,
|
|
5
|
+
APIResponseDataSchemaFactory,
|
|
6
|
+
FetchByQueryRequestSchema
|
|
7
|
+
} from '../api'
|
|
8
|
+
import { OperatorSchema, OperatorUpdateSchema } from '../operator'
|
|
9
|
+
import { type ContextType, CSPOperatorRoleSchema, DEVOperatorRoleSchema, LSPOperatorRoleSchema } from '..'
|
|
10
|
+
|
|
11
|
+
// ─── Builder ──────────────────────────────────────────────────────────────────
|
|
12
|
+
|
|
13
|
+
const buildOperatorRVS = <Role extends TSchema, Update extends TSchema>(
|
|
14
|
+
roleSchema: Role,
|
|
15
|
+
updateSchema: Update
|
|
16
|
+
) => ({
|
|
17
|
+
retrieve: {
|
|
18
|
+
headers: APIHeadersSchema,
|
|
19
|
+
params: Type.Object({ id: Type.String() }),
|
|
20
|
+
response: APIResponseDataSchemaFactory({ operator: roleSchema })
|
|
21
|
+
},
|
|
22
|
+
fetch: {
|
|
23
|
+
headers: APIHeadersSchema,
|
|
24
|
+
querystring: FetchByQueryRequestSchema,
|
|
25
|
+
response: APIResponseDataSchemaFactory({ operators: Type.Array(roleSchema) })
|
|
26
|
+
},
|
|
27
|
+
update: {
|
|
28
|
+
headers: APIHeadersSchema,
|
|
29
|
+
params: Type.Object({ id: Type.String() }),
|
|
30
|
+
body: updateSchema,
|
|
31
|
+
response: APIResponseDataSchemaFactory({ operator: roleSchema })
|
|
32
|
+
},
|
|
33
|
+
remove: {
|
|
34
|
+
headers: APIHeadersSchema,
|
|
35
|
+
params: Type.Object({ id: Type.String() }),
|
|
36
|
+
response: APIResponseBaseSchema
|
|
37
|
+
}
|
|
38
|
+
})
|
|
39
|
+
|
|
40
|
+
// ─── Per-context RVS ──────────────────────────────────────────────────────────
|
|
41
|
+
|
|
42
|
+
export const DEVSharedOperatorRVS = buildOperatorRVS(
|
|
43
|
+
OperatorSchema(DEVOperatorRoleSchema),
|
|
44
|
+
OperatorUpdateSchema(DEVOperatorRoleSchema)
|
|
45
|
+
)
|
|
46
|
+
export const CSPSharedOperatorRVS = buildOperatorRVS(
|
|
47
|
+
OperatorSchema(CSPOperatorRoleSchema),
|
|
48
|
+
OperatorUpdateSchema(CSPOperatorRoleSchema)
|
|
49
|
+
)
|
|
50
|
+
export const LSPSharedOperatorRVS = buildOperatorRVS(
|
|
51
|
+
OperatorSchema(LSPOperatorRoleSchema),
|
|
52
|
+
OperatorUpdateSchema(LSPOperatorRoleSchema)
|
|
53
|
+
)
|
|
54
|
+
export const IoTSPSharedOperatorRVS = buildOperatorRVS(
|
|
55
|
+
OperatorSchema(Type.String()),
|
|
56
|
+
OperatorUpdateSchema(Type.String())
|
|
57
|
+
)
|
|
58
|
+
|
|
59
|
+
// ─── ctype dispatcher ─────────────────────────────────────────────────────────
|
|
60
|
+
|
|
61
|
+
export const SharedOperatorRVS = ( ctype: ContextType ) => {
|
|
62
|
+
switch( ctype ){
|
|
63
|
+
case 'DEV': return DEVSharedOperatorRVS
|
|
64
|
+
case 'CSP': return CSPSharedOperatorRVS
|
|
65
|
+
case 'LSP': return LSPSharedOperatorRVS
|
|
66
|
+
case 'IoTSP': return IoTSPSharedOperatorRVS
|
|
67
|
+
default: return buildOperatorRVS(OperatorSchema(Type.String()), OperatorUpdateSchema(Type.String()))
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
// ─── Validation types ─────────────────────────────────────────────────────────
|
|
72
|
+
|
|
73
|
+
export type DEVSharedOperatorRetrieveValidation = {
|
|
74
|
+
headers: Static<typeof DEVSharedOperatorRVS.retrieve.headers>
|
|
75
|
+
params: Static<typeof DEVSharedOperatorRVS.retrieve.params>
|
|
76
|
+
response: Static<typeof DEVSharedOperatorRVS.retrieve.response>
|
|
77
|
+
}
|
|
78
|
+
export type DEVSharedOperatorFetchValidation = {
|
|
79
|
+
headers: Static<typeof DEVSharedOperatorRVS.fetch.headers>
|
|
80
|
+
querystring: Static<typeof DEVSharedOperatorRVS.fetch.querystring>
|
|
81
|
+
response: Static<typeof DEVSharedOperatorRVS.fetch.response>
|
|
82
|
+
}
|
|
83
|
+
export type DEVSharedOperatorUpdateValidation = {
|
|
84
|
+
headers: Static<typeof DEVSharedOperatorRVS.update.headers>
|
|
85
|
+
params: Static<typeof DEVSharedOperatorRVS.update.params>
|
|
86
|
+
body: Static<typeof DEVSharedOperatorRVS.update.body>
|
|
87
|
+
response: Static<typeof DEVSharedOperatorRVS.update.response>
|
|
88
|
+
}
|
|
89
|
+
export type DEVSharedOperatorRemoveValidation = {
|
|
90
|
+
headers: Static<typeof DEVSharedOperatorRVS.remove.headers>
|
|
91
|
+
params: Static<typeof DEVSharedOperatorRVS.remove.params>
|
|
92
|
+
response: Static<typeof DEVSharedOperatorRVS.remove.response>
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
export type CSPSharedOperatorRetrieveValidation = {
|
|
96
|
+
headers: Static<typeof CSPSharedOperatorRVS.retrieve.headers>
|
|
97
|
+
params: Static<typeof CSPSharedOperatorRVS.retrieve.params>
|
|
98
|
+
response: Static<typeof CSPSharedOperatorRVS.retrieve.response>
|
|
99
|
+
}
|
|
100
|
+
export type CSPSharedOperatorFetchValidation = {
|
|
101
|
+
headers: Static<typeof CSPSharedOperatorRVS.fetch.headers>
|
|
102
|
+
querystring: Static<typeof CSPSharedOperatorRVS.fetch.querystring>
|
|
103
|
+
response: Static<typeof CSPSharedOperatorRVS.fetch.response>
|
|
104
|
+
}
|
|
105
|
+
export type CSPSharedOperatorUpdateValidation = {
|
|
106
|
+
headers: Static<typeof CSPSharedOperatorRVS.update.headers>
|
|
107
|
+
params: Static<typeof CSPSharedOperatorRVS.update.params>
|
|
108
|
+
body: Static<typeof CSPSharedOperatorRVS.update.body>
|
|
109
|
+
response: Static<typeof CSPSharedOperatorRVS.update.response>
|
|
110
|
+
}
|
|
111
|
+
export type CSPSharedOperatorRemoveValidation = {
|
|
112
|
+
headers: Static<typeof CSPSharedOperatorRVS.remove.headers>
|
|
113
|
+
params: Static<typeof CSPSharedOperatorRVS.remove.params>
|
|
114
|
+
response: Static<typeof CSPSharedOperatorRVS.remove.response>
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
export type LSPSharedOperatorRetrieveValidation = {
|
|
118
|
+
headers: Static<typeof LSPSharedOperatorRVS.retrieve.headers>
|
|
119
|
+
params: Static<typeof LSPSharedOperatorRVS.retrieve.params>
|
|
120
|
+
response: Static<typeof LSPSharedOperatorRVS.retrieve.response>
|
|
121
|
+
}
|
|
122
|
+
export type LSPSharedOperatorFetchValidation = {
|
|
123
|
+
headers: Static<typeof LSPSharedOperatorRVS.fetch.headers>
|
|
124
|
+
querystring: Static<typeof LSPSharedOperatorRVS.fetch.querystring>
|
|
125
|
+
response: Static<typeof LSPSharedOperatorRVS.fetch.response>
|
|
126
|
+
}
|
|
127
|
+
export type LSPSharedOperatorUpdateValidation = {
|
|
128
|
+
headers: Static<typeof LSPSharedOperatorRVS.update.headers>
|
|
129
|
+
params: Static<typeof LSPSharedOperatorRVS.update.params>
|
|
130
|
+
body: Static<typeof LSPSharedOperatorRVS.update.body>
|
|
131
|
+
response: Static<typeof LSPSharedOperatorRVS.update.response>
|
|
132
|
+
}
|
|
133
|
+
export type LSPSharedOperatorRemoveValidation = {
|
|
134
|
+
headers: Static<typeof LSPSharedOperatorRVS.remove.headers>
|
|
135
|
+
params: Static<typeof LSPSharedOperatorRVS.remove.params>
|
|
136
|
+
response: Static<typeof LSPSharedOperatorRVS.remove.response>
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
export type IoTSPSharedOperatorRetrieveValidation = {
|
|
140
|
+
headers: Static<typeof IoTSPSharedOperatorRVS.retrieve.headers>
|
|
141
|
+
params: Static<typeof IoTSPSharedOperatorRVS.retrieve.params>
|
|
142
|
+
response: Static<typeof IoTSPSharedOperatorRVS.retrieve.response>
|
|
143
|
+
}
|
|
144
|
+
export type IoTSPSharedOperatorFetchValidation = {
|
|
145
|
+
headers: Static<typeof IoTSPSharedOperatorRVS.fetch.headers>
|
|
146
|
+
querystring: Static<typeof IoTSPSharedOperatorRVS.fetch.querystring>
|
|
147
|
+
response: Static<typeof IoTSPSharedOperatorRVS.fetch.response>
|
|
148
|
+
}
|
|
149
|
+
export type IoTSPSharedOperatorUpdateValidation = {
|
|
150
|
+
headers: Static<typeof IoTSPSharedOperatorRVS.update.headers>
|
|
151
|
+
params: Static<typeof IoTSPSharedOperatorRVS.update.params>
|
|
152
|
+
body: Static<typeof IoTSPSharedOperatorRVS.update.body>
|
|
153
|
+
response: Static<typeof IoTSPSharedOperatorRVS.update.response>
|
|
154
|
+
}
|
|
155
|
+
export type IoTSPSharedOperatorRemoveValidation = {
|
|
156
|
+
headers: Static<typeof IoTSPSharedOperatorRVS.remove.headers>
|
|
157
|
+
params: Static<typeof IoTSPSharedOperatorRVS.remove.params>
|
|
158
|
+
response: Static<typeof IoTSPSharedOperatorRVS.remove.response>
|
|
159
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { Static, Type } from '@sinclair/typebox'
|
|
2
|
+
import {
|
|
3
|
+
APIHeadersSchema,
|
|
4
|
+
APIResponseDataSchemaFactory
|
|
5
|
+
} from '../api'
|
|
6
|
+
import { RTLocationSchema } from '../geo'
|
|
7
|
+
|
|
8
|
+
export const SharedTrackingSessionRVS = {
|
|
9
|
+
headers: APIHeadersSchema,
|
|
10
|
+
params: Type.Object({ reference: Type.String({ example: 'ORD-XK9M2P' }) }),
|
|
11
|
+
querystring: Type.Object({
|
|
12
|
+
role: Type.Union([
|
|
13
|
+
Type.Literal('agent'),
|
|
14
|
+
Type.Literal('customer')
|
|
15
|
+
], { description: 'Must match the utype used at Socket.IO connect time' })
|
|
16
|
+
}),
|
|
17
|
+
response: APIResponseDataSchemaFactory({
|
|
18
|
+
jrtoken: Type.String({ description: 'Join Room Token for Socket.IO order room', example: 'jrt.eyJyb29tIjoiT1JELVhLOU0yUCIsInJvbGUiOiJjdXN0b21lciJ9.sig' }),
|
|
19
|
+
lastLocation: Type.Optional(RTLocationSchema),
|
|
20
|
+
agentOnline: Type.Boolean({ example: true }),
|
|
21
|
+
since: Type.Number({ description: 'Timestamp to use for REPLAY event since param', example: 1741219200000 })
|
|
22
|
+
})
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export type SharedTrackingSessionValidation = {
|
|
26
|
+
headers: Static<typeof SharedTrackingSessionRVS.headers>,
|
|
27
|
+
params: Static<typeof SharedTrackingSessionRVS.params>,
|
|
28
|
+
querystring: Static<typeof SharedTrackingSessionRVS.querystring>,
|
|
29
|
+
response: Static<typeof SharedTrackingSessionRVS.response>
|
|
30
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { Type, Static } from '@sinclair/typebox'
|
|
2
|
+
import {
|
|
3
|
+
APIHeadersSchema,
|
|
4
|
+
APIResponseBaseSchema,
|
|
5
|
+
APIResponseDataSchemaFactory,
|
|
6
|
+
FetchByQueryRequestSchema
|
|
7
|
+
} from '../api'
|
|
8
|
+
import { UserAccountPublicSchema } from '../user'
|
|
9
|
+
|
|
10
|
+
export const SharedUserRetrieveRVS = {
|
|
11
|
+
headers: APIHeadersSchema,
|
|
12
|
+
params: Type.Object({ uid: Type.String() }),
|
|
13
|
+
response: APIResponseDataSchemaFactory({ user: Type.Omit(UserAccountPublicSchema, ['_id', 'contexts']) })
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export const SharedUserFetchRVS = {
|
|
17
|
+
headers: APIHeadersSchema,
|
|
18
|
+
querystring: FetchByQueryRequestSchema,
|
|
19
|
+
response: APIResponseDataSchemaFactory({ users: Type.Array(Type.Omit(UserAccountPublicSchema, ['_id', 'contexts'])) })
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export const SharedUserRemoveRVS = {
|
|
23
|
+
headers: APIHeadersSchema,
|
|
24
|
+
params: Type.Object({ uid: Type.String() }),
|
|
25
|
+
response: APIResponseBaseSchema
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export type SharedUserRetrieveValidation = {
|
|
29
|
+
headers: Static<typeof SharedUserRetrieveRVS.headers>,
|
|
30
|
+
params: Static<typeof SharedUserRetrieveRVS.params>,
|
|
31
|
+
response: Static<typeof SharedUserRetrieveRVS.response>
|
|
32
|
+
}
|
|
33
|
+
export type SharedUserFetchValidation = {
|
|
34
|
+
headers: Static<typeof SharedUserFetchRVS.headers>,
|
|
35
|
+
querystring: Static<typeof SharedUserFetchRVS.querystring>,
|
|
36
|
+
response: Static<typeof SharedUserFetchRVS.response>
|
|
37
|
+
}
|
|
38
|
+
export type SharedUserRemoveValidation = {
|
|
39
|
+
headers: Static<typeof SharedUserRemoveRVS.headers>,
|
|
40
|
+
params: Static<typeof SharedUserRemoveRVS.params>,
|
|
41
|
+
response: Static<typeof SharedUserRemoveRVS.response>
|
|
42
|
+
}
|
package/src/sync.ts
ADDED
|
@@ -0,0 +1,364 @@
|
|
|
1
|
+
import { Type, Static } from '@sinclair/typebox'
|
|
2
|
+
import { ActionRecordSchema, DateTimeRangeSchema, DateTimeZoneSchema } from './time'
|
|
3
|
+
import { ContextSchema } from './context'
|
|
4
|
+
import { LSPServiceContextSchema } from './lsp'
|
|
5
|
+
import { CSPServiceContextSchema } from './csp/base'
|
|
6
|
+
|
|
7
|
+
export const SyncDirectionSchema = Type.Union([
|
|
8
|
+
Type.Literal('PUSH'),
|
|
9
|
+
Type.Literal('PULL')
|
|
10
|
+
])
|
|
11
|
+
|
|
12
|
+
// Sync Status Schema
|
|
13
|
+
export const SyncStatusSchema = Type.Union([
|
|
14
|
+
Type.Literal('SYNCED'),
|
|
15
|
+
Type.Literal('PENDING'),
|
|
16
|
+
Type.Literal('IN_PROGRESS'),
|
|
17
|
+
Type.Literal('CONFLICT'),
|
|
18
|
+
Type.Literal('ERROR'),
|
|
19
|
+
Type.Literal('MANUAL_REVIEW')
|
|
20
|
+
])
|
|
21
|
+
|
|
22
|
+
// Sync Alert Type Schema
|
|
23
|
+
export const SyncAlertTypeSchema = Type.Union([
|
|
24
|
+
Type.Literal('LOW_STOCK'),
|
|
25
|
+
Type.Literal('REORDER_POINT'),
|
|
26
|
+
Type.Literal('EXPIRY_WARNING'),
|
|
27
|
+
Type.Literal('SYNC_FAILURE'),
|
|
28
|
+
Type.Literal('QUALITY_ISSUE')
|
|
29
|
+
])
|
|
30
|
+
|
|
31
|
+
// Sync Alert Severity Schema
|
|
32
|
+
export const SyncAlertSeveritySchema = Type.Union([
|
|
33
|
+
Type.Literal('INFO'),
|
|
34
|
+
Type.Literal('WARNING'),
|
|
35
|
+
Type.Literal('CRITICAL')
|
|
36
|
+
])
|
|
37
|
+
|
|
38
|
+
// Sync Conflict Type Schema
|
|
39
|
+
export const SyncConflictTypeSchema = Type.Union([
|
|
40
|
+
Type.Literal('PRICE_MISMATCH'),
|
|
41
|
+
Type.Literal('DESCRIPTION_MISMATCH'),
|
|
42
|
+
Type.Literal('SKU_CONFLICT'),
|
|
43
|
+
Type.Literal('QUANTITY_MISMATCH'),
|
|
44
|
+
Type.Literal('STATUS_MISMATCH'),
|
|
45
|
+
Type.Literal('MISSING_IN_LSP'),
|
|
46
|
+
Type.Literal('ORPHANED_IN_LSP'),
|
|
47
|
+
Type.Literal('SKU_MAPPING_CONFLICT'),
|
|
48
|
+
Type.Literal('DUPLICATE_SKU')
|
|
49
|
+
])
|
|
50
|
+
|
|
51
|
+
// Sync Conflict Schema
|
|
52
|
+
export const SyncConflictSchema = Type.Object({
|
|
53
|
+
id: Type.String(),
|
|
54
|
+
type: SyncConflictTypeSchema,
|
|
55
|
+
sku: Type.String(),
|
|
56
|
+
productId: Type.Optional(Type.String()),
|
|
57
|
+
field: Type.String(),
|
|
58
|
+
providerValue: Type.Any(),
|
|
59
|
+
clientValue: Type.Any(),
|
|
60
|
+
delta: Type.Optional(Type.Number()),
|
|
61
|
+
detected: ActionRecordSchema,
|
|
62
|
+
resolved: Type.Optional(ActionRecordSchema),
|
|
63
|
+
resolution: Type.Optional(Type.Object({
|
|
64
|
+
strategy: Type.Union([
|
|
65
|
+
Type.Literal('PROVIDER_WINS'),
|
|
66
|
+
Type.Literal('CLIENT_WINS'),
|
|
67
|
+
Type.Literal('MANUAL_OVERRIDE'),
|
|
68
|
+
Type.Literal('AVERAGE'),
|
|
69
|
+
Type.Literal('NO_ACTION')
|
|
70
|
+
]),
|
|
71
|
+
action: Type.Optional(Type.String()),
|
|
72
|
+
performed: Type.Optional(ActionRecordSchema)
|
|
73
|
+
})),
|
|
74
|
+
notes: Type.Optional(Type.String({ maxLength: 1000 }))
|
|
75
|
+
})
|
|
76
|
+
|
|
77
|
+
// Sync Event Type Schema
|
|
78
|
+
export const SyncEventTypeSchema = Type.Union([
|
|
79
|
+
Type.Literal('INVENTORY_UPDATE'),
|
|
80
|
+
Type.Literal('PRODUCT_UPDATE'),
|
|
81
|
+
Type.Literal('PRICE_CHANGE'),
|
|
82
|
+
Type.Literal('STATUS_CHANGE'),
|
|
83
|
+
Type.Literal('BULK_SYNC')
|
|
84
|
+
])
|
|
85
|
+
|
|
86
|
+
// Sync Event Schema
|
|
87
|
+
export const SyncEventSchema = Type.Object({
|
|
88
|
+
id: Type.String(),
|
|
89
|
+
type: SyncEventTypeSchema,
|
|
90
|
+
provider: ContextSchema,
|
|
91
|
+
client: CSPServiceContextSchema,
|
|
92
|
+
system: Type.Object({
|
|
93
|
+
source: Type.Union([Type.Literal('PROVIDER'), Type.Literal('CLIENT')]),
|
|
94
|
+
target: Type.Union([Type.Literal('PROVIDER'), Type.Literal('CLIENT')])
|
|
95
|
+
}),
|
|
96
|
+
productIds: Type.Array(Type.String()),
|
|
97
|
+
inventoryItemIds: Type.Optional(Type.Array(Type.String())),
|
|
98
|
+
changes: Type.Record(Type.String(), Type.Any()),
|
|
99
|
+
conflicts: Type.Optional(Type.Array(SyncConflictSchema)),
|
|
100
|
+
status: Type.Union([
|
|
101
|
+
Type.Literal('PENDING'),
|
|
102
|
+
Type.Literal('IN_PROGRESS'),
|
|
103
|
+
Type.Literal('COMPLETED'),
|
|
104
|
+
Type.Literal('FAILED'),
|
|
105
|
+
Type.Literal('PARTIAL')
|
|
106
|
+
]),
|
|
107
|
+
initiated: ActionRecordSchema,
|
|
108
|
+
completed: Type.Optional(ActionRecordSchema),
|
|
109
|
+
successCount: Type.Number({ minimum: 0 }),
|
|
110
|
+
failureCount: Type.Number({ minimum: 0 }),
|
|
111
|
+
conflictCount: Type.Number({ minimum: 0 }),
|
|
112
|
+
errors: Type.Optional(Type.Array(Type.String())),
|
|
113
|
+
retryCount: Type.Number({ minimum: 0 }),
|
|
114
|
+
maxRetries: Type.Number({ minimum: 0 }),
|
|
115
|
+
nextRetryAt: Type.Optional(DateTimeZoneSchema)
|
|
116
|
+
})
|
|
117
|
+
|
|
118
|
+
// Generate TypeScript types from schemas
|
|
119
|
+
export type SyncDirection = Static<typeof SyncDirectionSchema>
|
|
120
|
+
export type SyncStatus = Static<typeof SyncStatusSchema>
|
|
121
|
+
export type SyncAlertType = Static<typeof SyncAlertTypeSchema>
|
|
122
|
+
export type SyncAlertSeverity = Static<typeof SyncAlertSeveritySchema>
|
|
123
|
+
export type SyncConflictType = Static<typeof SyncConflictTypeSchema>
|
|
124
|
+
export type SyncConflict = Static<typeof SyncConflictSchema>
|
|
125
|
+
export type SyncEventType = Static<typeof SyncEventTypeSchema>
|
|
126
|
+
export type SyncEvent = Static<typeof SyncEventSchema>
|
|
127
|
+
|
|
128
|
+
// Additional utility schemas for sync operations
|
|
129
|
+
export const SyncConfigSchema = Type.Object({
|
|
130
|
+
provider: ContextSchema,
|
|
131
|
+
client: CSPServiceContextSchema,
|
|
132
|
+
connectorId: Type.String(),
|
|
133
|
+
syncDirection: Type.Union([
|
|
134
|
+
Type.Literal('PROVIDER_TO_CLIENT'),
|
|
135
|
+
Type.Literal('CLIENT_TO_PROVIDER'),
|
|
136
|
+
Type.Literal('BIDIRECTIONAL')
|
|
137
|
+
]),
|
|
138
|
+
autoResolveConflicts: Type.Boolean(),
|
|
139
|
+
conflictResolutionStrategy: Type.Union([
|
|
140
|
+
Type.Literal('PROVIDER_PRIORITY'),
|
|
141
|
+
Type.Literal('CLIENT_PRIORITY'),
|
|
142
|
+
Type.Literal('MANUAL_REVIEW'),
|
|
143
|
+
Type.Literal('LATEST_WINS')
|
|
144
|
+
]),
|
|
145
|
+
syncFrequency: Type.Object({
|
|
146
|
+
inventory: Type.String({ description: 'Cron expression for inventory sync' }),
|
|
147
|
+
products: Type.String({ description: 'Cron expression for product sync' }),
|
|
148
|
+
prices: Type.String({ description: 'Cron expression for price sync' })
|
|
149
|
+
}),
|
|
150
|
+
filters: Type.Optional(Type.Object({
|
|
151
|
+
productCategories: Type.Optional(Type.Array(Type.String())),
|
|
152
|
+
locationIds: Type.Optional(Type.Array(Type.String())),
|
|
153
|
+
minimumStock: Type.Optional(Type.Number({ minimum: 0 })),
|
|
154
|
+
syncOnlyActive: Type.Optional(Type.Boolean())
|
|
155
|
+
})),
|
|
156
|
+
retryPolicy: Type.Object({
|
|
157
|
+
maxRetries: Type.Number({ minimum: 0, maximum: 10 }),
|
|
158
|
+
retryDelay: Type.Number({ minimum: 1, description: 'Delay in seconds' }),
|
|
159
|
+
backoffMultiplier: Type.Number({ minimum: 1, maximum: 5 })
|
|
160
|
+
}),
|
|
161
|
+
notifications: Type.Object({
|
|
162
|
+
onSuccess: Type.Boolean(),
|
|
163
|
+
onFailure: Type.Boolean(),
|
|
164
|
+
onConflict: Type.Boolean(),
|
|
165
|
+
recipients: Type.Array(Type.String({ format: 'email' }))
|
|
166
|
+
})
|
|
167
|
+
})
|
|
168
|
+
|
|
169
|
+
export const SyncAlertSchema = Type.Object({
|
|
170
|
+
id: Type.String(),
|
|
171
|
+
type: SyncAlertTypeSchema,
|
|
172
|
+
severity: SyncAlertSeveritySchema,
|
|
173
|
+
title: Type.String({ maxLength: 200 }),
|
|
174
|
+
message: Type.String({ maxLength: 1000 }),
|
|
175
|
+
provider: ContextSchema,
|
|
176
|
+
client: Type.String(),
|
|
177
|
+
productIds: Type.Optional(Type.Array(Type.String())),
|
|
178
|
+
locationIds: Type.Optional(Type.Array(Type.String())),
|
|
179
|
+
metadata: Type.Optional(Type.Record(Type.String(), Type.Any())),
|
|
180
|
+
acknowledged: Type.Boolean(),
|
|
181
|
+
acknowledgedBy: Type.Optional(Type.String()),
|
|
182
|
+
acknowledgedAt: Type.Optional(DateTimeZoneSchema),
|
|
183
|
+
resolved: Type.Boolean(),
|
|
184
|
+
resolvedBy: Type.Optional(Type.String()),
|
|
185
|
+
resolvedAt: Type.Optional(DateTimeZoneSchema),
|
|
186
|
+
created: ActionRecordSchema,
|
|
187
|
+
expiresAt: Type.Optional(DateTimeZoneSchema)
|
|
188
|
+
})
|
|
189
|
+
|
|
190
|
+
export const SyncLogSchema = Type.Object({
|
|
191
|
+
id: Type.String(),
|
|
192
|
+
direction: SyncDirectionSchema,
|
|
193
|
+
provider: ContextSchema,
|
|
194
|
+
client: CSPServiceContextSchema,
|
|
195
|
+
status: SyncStatusSchema,
|
|
196
|
+
eventId: Type.String(),
|
|
197
|
+
level: Type.Union([
|
|
198
|
+
Type.Literal('DEBUG'),
|
|
199
|
+
Type.Literal('INFO'),
|
|
200
|
+
Type.Literal('WARN'),
|
|
201
|
+
Type.Literal('ERROR')
|
|
202
|
+
]),
|
|
203
|
+
message: Type.String({ maxLength: 2000 }),
|
|
204
|
+
component: Type.String({ description: 'Sync component that generated the log' }),
|
|
205
|
+
metadata: Type.Optional(Type.Record(Type.String(), Type.Any())),
|
|
206
|
+
stackTrace: Type.Optional(Type.String()),
|
|
207
|
+
itemsProcessed: Type.Number({ minimum: 0 }),
|
|
208
|
+
itemsFailed: Type.Number({ minimum: 0 }),
|
|
209
|
+
errorLog: Type.Optional(Type.Array(Type.Object({
|
|
210
|
+
productId: Type.String(),
|
|
211
|
+
sku: Type.String(),
|
|
212
|
+
error: Type.String()
|
|
213
|
+
}))),
|
|
214
|
+
schedule: DateTimeRangeSchema
|
|
215
|
+
})
|
|
216
|
+
|
|
217
|
+
export const SyncStatsSchema = Type.Object({
|
|
218
|
+
provider: ContextSchema,
|
|
219
|
+
client: CSPServiceContextSchema,
|
|
220
|
+
period: Type.Object({
|
|
221
|
+
start: DateTimeZoneSchema,
|
|
222
|
+
end: DateTimeZoneSchema
|
|
223
|
+
}),
|
|
224
|
+
events: Type.Object({
|
|
225
|
+
total: Type.Number({ minimum: 0 }),
|
|
226
|
+
successful: Type.Number({ minimum: 0 }),
|
|
227
|
+
failed: Type.Number({ minimum: 0 }),
|
|
228
|
+
partial: Type.Number({ minimum: 0 }),
|
|
229
|
+
byType: Type.Record(SyncEventTypeSchema, Type.Number({ minimum: 0 }))
|
|
230
|
+
}),
|
|
231
|
+
conflicts: Type.Object({
|
|
232
|
+
total: Type.Number({ minimum: 0 }),
|
|
233
|
+
resolved: Type.Number({ minimum: 0 }),
|
|
234
|
+
pending: Type.Number({ minimum: 0 }),
|
|
235
|
+
byType: Type.Record(SyncConflictTypeSchema, Type.Number({ minimum: 0 }))
|
|
236
|
+
}),
|
|
237
|
+
performance: Type.Object({
|
|
238
|
+
averageSyncTime: Type.Number({ minimum: 0, description: 'Average sync time in seconds' }),
|
|
239
|
+
throughput: Type.Number({ minimum: 0, description: 'Records processed per minute' }),
|
|
240
|
+
errorRate: Type.Number({ minimum: 0, maximum: 100, description: 'Error rate percentage' }),
|
|
241
|
+
uptime: Type.Number({ minimum: 0, maximum: 100, description: 'Sync uptime percentage' })
|
|
242
|
+
}),
|
|
243
|
+
lastSync: Type.Optional(DateTimeZoneSchema),
|
|
244
|
+
nextScheduledSync: Type.Optional(DateTimeZoneSchema)
|
|
245
|
+
})
|
|
246
|
+
|
|
247
|
+
export const SyncHealthCheckSchema = Type.Object({
|
|
248
|
+
provider: ContextSchema,
|
|
249
|
+
client: CSPServiceContextSchema,
|
|
250
|
+
connectorId: Type.String(),
|
|
251
|
+
status: Type.Union([
|
|
252
|
+
Type.Literal('HEALTHY'),
|
|
253
|
+
Type.Literal('DEGRADED'),
|
|
254
|
+
Type.Literal('UNHEALTHY'),
|
|
255
|
+
Type.Literal('OFFLINE')
|
|
256
|
+
]),
|
|
257
|
+
lastCheck: DateTimeZoneSchema,
|
|
258
|
+
checks: Type.Object({
|
|
259
|
+
connectivity: Type.Boolean(),
|
|
260
|
+
authentication: Type.Boolean(),
|
|
261
|
+
dataConsistency: Type.Boolean(),
|
|
262
|
+
performance: Type.Boolean()
|
|
263
|
+
}),
|
|
264
|
+
issues: Type.Optional(Type.Array(Type.String())),
|
|
265
|
+
recommendations: Type.Optional(Type.Array(Type.String())),
|
|
266
|
+
metrics: Type.Object({
|
|
267
|
+
responseTime: Type.Number({ minimum: 0, description: 'Response time in milliseconds' }),
|
|
268
|
+
lastSuccessfulSync: Type.Optional(DateTimeZoneSchema),
|
|
269
|
+
consecutiveFailures: Type.Number({ minimum: 0 }),
|
|
270
|
+
dataLag: Type.Optional(Type.Number({ minimum: 0, description: 'Data lag in minutes' }))
|
|
271
|
+
})
|
|
272
|
+
})
|
|
273
|
+
|
|
274
|
+
export type SyncConfig = Static<typeof SyncConfigSchema>
|
|
275
|
+
export type SyncAlert = Static<typeof SyncAlertSchema>
|
|
276
|
+
export type SyncLog = Static<typeof SyncLogSchema>
|
|
277
|
+
export type SyncStats = Static<typeof SyncStatsSchema>
|
|
278
|
+
export type SyncHealthCheck = Static<typeof SyncHealthCheckSchema>
|
|
279
|
+
|
|
280
|
+
// ===== ENTERPRISE FEATURES =====
|
|
281
|
+
|
|
282
|
+
// LSP Inventory Webhook Events
|
|
283
|
+
export const LSPInventoryWebhookEventSchema = Type.Union([
|
|
284
|
+
Type.Literal('INVENTORY_RECEIVED'),
|
|
285
|
+
Type.Literal('INVENTORY_ADJUSTED'),
|
|
286
|
+
Type.Literal('INVENTORY_PICKED'),
|
|
287
|
+
Type.Literal('INVENTORY_DAMAGED'),
|
|
288
|
+
Type.Literal('INVENTORY_EXPIRED'),
|
|
289
|
+
Type.Literal('INVENTORY_TRANSFERRED'),
|
|
290
|
+
Type.Literal('LOW_STOCK_ALERT'),
|
|
291
|
+
Type.Literal('SYNC_CONFLICT'),
|
|
292
|
+
Type.Literal('RESERVATION_EXPIRED')
|
|
293
|
+
])
|
|
294
|
+
|
|
295
|
+
// Inventory Reservation Schema
|
|
296
|
+
export const LSPInventoryReservationSchema = Type.Object({
|
|
297
|
+
id: Type.String(),
|
|
298
|
+
orderReference: Type.String(),
|
|
299
|
+
client: CSPServiceContextSchema,
|
|
300
|
+
provider: LSPServiceContextSchema,
|
|
301
|
+
items: Type.Array(Type.Object({
|
|
302
|
+
sku: Type.String(),
|
|
303
|
+
productId: Type.String(),
|
|
304
|
+
inventoryItemId: Type.String(),
|
|
305
|
+
requestedQuantity: Type.Number({ minimum: 0 }),
|
|
306
|
+
reservedQuantity: Type.Number({ minimum: 0 })
|
|
307
|
+
})),
|
|
308
|
+
status: Type.Union([
|
|
309
|
+
Type.Literal('ACTIVE'),
|
|
310
|
+
Type.Literal('COMMITTED'),
|
|
311
|
+
Type.Literal('RELEASED'),
|
|
312
|
+
Type.Literal('EXPIRED')
|
|
313
|
+
]),
|
|
314
|
+
expiry: Type.Number(),
|
|
315
|
+
created: ActionRecordSchema,
|
|
316
|
+
committed: Type.Optional(ActionRecordSchema),
|
|
317
|
+
released: Type.Optional(ActionRecordSchema)
|
|
318
|
+
})
|
|
319
|
+
|
|
320
|
+
// Batch Operation Schema
|
|
321
|
+
export const BatchOperationSchema = Type.Object({
|
|
322
|
+
batchId: Type.String(),
|
|
323
|
+
client: CSPServiceContextSchema,
|
|
324
|
+
provider: LSPServiceContextSchema,
|
|
325
|
+
totalOperations: Type.Number({ minimum: 0 }),
|
|
326
|
+
status: Type.Union([
|
|
327
|
+
Type.Literal('PENDING'),
|
|
328
|
+
Type.Literal('VALIDATING'),
|
|
329
|
+
Type.Literal('IN_PROGRESS'),
|
|
330
|
+
Type.Literal('COMPLETED'),
|
|
331
|
+
Type.Literal('FAILED'),
|
|
332
|
+
Type.Literal('PARTIAL')
|
|
333
|
+
]),
|
|
334
|
+
progress: Type.Object({
|
|
335
|
+
processed: Type.Number({ minimum: 0 }),
|
|
336
|
+
successful: Type.Number({ minimum: 0 }),
|
|
337
|
+
failed: Type.Number({ minimum: 0 }),
|
|
338
|
+
percentage: Type.Number({ minimum: 0, maximum: 100 })
|
|
339
|
+
}),
|
|
340
|
+
errors: Type.Optional(Type.Array(Type.Object({
|
|
341
|
+
sku: Type.String(),
|
|
342
|
+
action: Type.String(),
|
|
343
|
+
error: Type.String()
|
|
344
|
+
}))),
|
|
345
|
+
started: ActionRecordSchema,
|
|
346
|
+
completed: Type.Optional(ActionRecordSchema)
|
|
347
|
+
})
|
|
348
|
+
|
|
349
|
+
// Batch Operation Item Schema
|
|
350
|
+
export const BatchOperationItemSchema = Type.Object({
|
|
351
|
+
sku: Type.String(),
|
|
352
|
+
action: Type.Union([
|
|
353
|
+
Type.Literal('CREATE'),
|
|
354
|
+
Type.Literal('ADJUST'),
|
|
355
|
+
Type.Literal('UPDATE'),
|
|
356
|
+
Type.Literal('DELETE')
|
|
357
|
+
]),
|
|
358
|
+
data: Type.Any()
|
|
359
|
+
})
|
|
360
|
+
|
|
361
|
+
export type LSPInventoryWebhookEvent = Static<typeof LSPInventoryWebhookEventSchema>
|
|
362
|
+
export type LSPInventoryReservation = Static<typeof LSPInventoryReservationSchema>
|
|
363
|
+
export type BatchOperation = Static<typeof BatchOperationSchema>
|
|
364
|
+
export type BatchOperationItem = Static<typeof BatchOperationItemSchema>
|