@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,1097 @@
|
|
|
1
|
+
import { Type, Static } from '@sinclair/typebox'
|
|
2
|
+
import { ContextSchema } from '../context'
|
|
3
|
+
import { CurrencySchema } from '../measure'
|
|
4
|
+
import { ActionRecordSchema, DateTimeRangeSchema, DateTimeZoneSchema } from '../time'
|
|
5
|
+
import {
|
|
6
|
+
APIErrorSchema,
|
|
7
|
+
APIHeadersSchema,
|
|
8
|
+
APIResponseBaseSchema,
|
|
9
|
+
APIResponseDataSchemaFactory
|
|
10
|
+
} from '../api'
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
// Labor & Personnel
|
|
14
|
+
export const LaborChargeTypeSchema = Type.Union([
|
|
15
|
+
Type.Literal('STANDARD_LABOR'),
|
|
16
|
+
Type.Literal('SKILLED_LABOR'),
|
|
17
|
+
Type.Literal('SPECIALIZED_LABOR'),
|
|
18
|
+
Type.Literal('SUPERVISORY_LABOR'),
|
|
19
|
+
Type.Literal('OVERTIME_LABOR'),
|
|
20
|
+
Type.Literal('HOLIDAY_LABOR'),
|
|
21
|
+
Type.Literal('LABOR_SURCHARGE')
|
|
22
|
+
])
|
|
23
|
+
// Transportation & Delivery
|
|
24
|
+
export const TransportationChargeTypeSchema = Type.Union([
|
|
25
|
+
Type.Literal('BASE_RATE'),
|
|
26
|
+
Type.Literal('FUEL_SURCHARGE'),
|
|
27
|
+
Type.Literal('DELIVERY_CONFIRMATION'),
|
|
28
|
+
Type.Literal('RESIDENTIAL_DELIVERY'),
|
|
29
|
+
Type.Literal('OVERSIZE_FEE'),
|
|
30
|
+
Type.Literal('HAZMAT_FEE'),
|
|
31
|
+
Type.Literal('PEAK_SEASON_SURCHARGE'),
|
|
32
|
+
Type.Literal('INSURANCE')
|
|
33
|
+
])
|
|
34
|
+
// Ride Hailing
|
|
35
|
+
export const RideHailingChargeTypeSchema = Type.Union([
|
|
36
|
+
Type.Literal('PASSENGER_FARE'),
|
|
37
|
+
Type.Literal('SEAT_RESERVATION_FEE'),
|
|
38
|
+
Type.Literal('ROUTE_PREMIUM'),
|
|
39
|
+
Type.Literal('EXPRESS_SERVICE_FEE'),
|
|
40
|
+
Type.Literal('COMFORT_CLASS_UPGRADE'),
|
|
41
|
+
Type.Literal('BOOKING_FEE'),
|
|
42
|
+
Type.Literal('CANCELLATION_FEE'),
|
|
43
|
+
Type.Literal('PEAK_HOUR_SURCHARGE'),
|
|
44
|
+
Type.Literal('DYNAMIC_PRICING_ADJUSTMENT')
|
|
45
|
+
])
|
|
46
|
+
|
|
47
|
+
// Warehouse Operations - Inbound
|
|
48
|
+
export const InboundOperationsChargeTypeSchema = Type.Union([
|
|
49
|
+
Type.Literal('RECEIVING_FEE'),
|
|
50
|
+
Type.Literal('PUTAWAY_FEE'),
|
|
51
|
+
Type.Literal('INVENTORY_COUNT_FEE'),
|
|
52
|
+
Type.Literal('QUALITY_CONTROL_FEE'),
|
|
53
|
+
Type.Literal('DECONSOLIDATION_FEE')
|
|
54
|
+
])
|
|
55
|
+
// Warehouse Operations - Storage
|
|
56
|
+
export const StorageChargeTypeSchema = Type.Union([
|
|
57
|
+
Type.Literal('STORAGE_FEE'),
|
|
58
|
+
Type.Literal('AMBIENT_STORAGE_FEE'),
|
|
59
|
+
Type.Literal('REFRIGERATED_STORAGE_FEE'),
|
|
60
|
+
Type.Literal('FROZEN_STORAGE_FEE'),
|
|
61
|
+
Type.Literal('CLIMATE_CONTROLLED_STORAGE_FEE'),
|
|
62
|
+
Type.Literal('HAZMAT_STORAGE_FEE'),
|
|
63
|
+
Type.Literal('SECURE_STORAGE_FEE')
|
|
64
|
+
])
|
|
65
|
+
// Warehouse Operations - Outbound
|
|
66
|
+
export const OutboundOperationsChargeTypeSchema = Type.Union([
|
|
67
|
+
Type.Literal('PICKING_FEE'),
|
|
68
|
+
Type.Literal('PACKING_FEE'),
|
|
69
|
+
Type.Literal('SHIPPING_FEE'),
|
|
70
|
+
Type.Literal('KITTING_FEE'),
|
|
71
|
+
Type.Literal('ASSEMBLY_FEE'),
|
|
72
|
+
Type.Literal('LABELING_FEE'),
|
|
73
|
+
Type.Literal('CONSOLIDATION_FEE'),
|
|
74
|
+
Type.Literal('CROSS_DOCK_FEE')
|
|
75
|
+
])
|
|
76
|
+
// Value-Added Services
|
|
77
|
+
export const ValueAddedServicesChargeTypeSchema = Type.Union([
|
|
78
|
+
Type.Literal('SORTING_FEE'),
|
|
79
|
+
Type.Literal('RETURNS_PROCESSING_FEE'),
|
|
80
|
+
Type.Literal('HANDLING_FEE'),
|
|
81
|
+
Type.Literal('SPECIALIZED_HANDLING'),
|
|
82
|
+
Type.Literal('RUSH_ORDER_FEE')
|
|
83
|
+
])
|
|
84
|
+
// Equipment & Space
|
|
85
|
+
export const EquipmentSpaceChargeTypeSchema = Type.Union([
|
|
86
|
+
Type.Literal('EQUIPMENT_RENTAL'),
|
|
87
|
+
Type.Literal('SPACE_RENTAL'),
|
|
88
|
+
Type.Literal('FORKLIFT'),
|
|
89
|
+
Type.Literal('PALLET_JACK'),
|
|
90
|
+
Type.Literal('CONVEYOR'),
|
|
91
|
+
Type.Literal('DOCK_EQUIPMENT'),
|
|
92
|
+
Type.Literal('PACKAGING_EQUIPMENT'),
|
|
93
|
+
Type.Literal('SCANNING_EQUIPMENT')
|
|
94
|
+
])
|
|
95
|
+
// Administrative & Compliance
|
|
96
|
+
export const AdministrativeChargeTypeSchema = Type.Union([
|
|
97
|
+
Type.Literal('DOCUMENTATION_FEE'),
|
|
98
|
+
Type.Literal('CUSTOMS_DUTY'),
|
|
99
|
+
Type.Literal('CUSTOMS_CLEARANCE_FEE'),
|
|
100
|
+
Type.Literal('SETUP_FEE'),
|
|
101
|
+
Type.Literal('ACCOUNT_MANAGEMENT_FEE'),
|
|
102
|
+
Type.Literal('TECHNOLOGY_FEE'),
|
|
103
|
+
Type.Literal('MINIMUM_ACTIVITY_FEE')
|
|
104
|
+
])
|
|
105
|
+
|
|
106
|
+
// Main charge category schema
|
|
107
|
+
export const ChargeCategorySchema = Type.Union([
|
|
108
|
+
Type.Literal('LABOR'),
|
|
109
|
+
Type.Literal('RIDE_HAILING'),
|
|
110
|
+
Type.Literal('TRANSPORTATION'),
|
|
111
|
+
Type.Literal('INBOUND_OPERATIONS'),
|
|
112
|
+
Type.Literal('STORAGE'),
|
|
113
|
+
Type.Literal('OUTBOUND_OPERATIONS'),
|
|
114
|
+
Type.Literal('VALUE_ADDED_SERVICES'),
|
|
115
|
+
Type.Literal('EQUIPMENT_SPACE'),
|
|
116
|
+
Type.Literal('ADMINISTRATIVE')
|
|
117
|
+
])
|
|
118
|
+
// Combined charge types
|
|
119
|
+
export const ChargeTypeSchema = Type.Union([
|
|
120
|
+
LaborChargeTypeSchema,
|
|
121
|
+
RideHailingChargeTypeSchema,
|
|
122
|
+
TransportationChargeTypeSchema,
|
|
123
|
+
InboundOperationsChargeTypeSchema,
|
|
124
|
+
StorageChargeTypeSchema,
|
|
125
|
+
OutboundOperationsChargeTypeSchema,
|
|
126
|
+
ValueAddedServicesChargeTypeSchema,
|
|
127
|
+
EquipmentSpaceChargeTypeSchema,
|
|
128
|
+
AdministrativeChargeTypeSchema
|
|
129
|
+
])
|
|
130
|
+
|
|
131
|
+
// Type exports
|
|
132
|
+
export type LaborChargeType = Static<typeof LaborChargeTypeSchema>
|
|
133
|
+
export type RideHailingChargeType = Static<typeof RideHailingChargeTypeSchema>
|
|
134
|
+
export type TransportationChargeType = Static<typeof TransportationChargeTypeSchema>
|
|
135
|
+
export type InboundOperationsChargeType = Static<typeof InboundOperationsChargeTypeSchema>
|
|
136
|
+
export type StorageChargeType = Static<typeof StorageChargeTypeSchema>
|
|
137
|
+
export type OutboundOperationsChargeType = Static<typeof OutboundOperationsChargeTypeSchema>
|
|
138
|
+
export type ValueAddedServicesChargeType = Static<typeof ValueAddedServicesChargeTypeSchema>
|
|
139
|
+
export type EquipmentSpaceChargeType = Static<typeof EquipmentSpaceChargeTypeSchema>
|
|
140
|
+
export type AdministrativeChargeType = Static<typeof AdministrativeChargeTypeSchema>
|
|
141
|
+
export type ChargeCategory = Static<typeof ChargeCategorySchema>
|
|
142
|
+
export type ChargeType = Static<typeof ChargeTypeSchema>
|
|
143
|
+
|
|
144
|
+
// Helper function for UI/API consumers
|
|
145
|
+
export const ChargeTypeToCategory = {
|
|
146
|
+
// Labor
|
|
147
|
+
'STANDARD_LABOR': 'LABOR',
|
|
148
|
+
'SKILLED_LABOR': 'LABOR',
|
|
149
|
+
'SPECIALIZED_LABOR': 'LABOR',
|
|
150
|
+
'SUPERVISORY_LABOR': 'LABOR',
|
|
151
|
+
'OVERTIME_LABOR': 'LABOR',
|
|
152
|
+
'HOLIDAY_LABOR': 'LABOR',
|
|
153
|
+
'LABOR_SURCHARGE': 'LABOR',
|
|
154
|
+
|
|
155
|
+
// Add to ChargeTypeToCategory mapping
|
|
156
|
+
'PASSENGER_FARE': 'RIDE_HAILING',
|
|
157
|
+
'SEAT_RESERVATION_FEE': 'RIDE_HAILING',
|
|
158
|
+
'ROUTE_PREMIUM': 'RIDE_HAILING',
|
|
159
|
+
'EXPRESS_SERVICE_FEE': 'RIDE_HAILING',
|
|
160
|
+
'COMFORT_CLASS_UPGRADE': 'RIDE_HAILING',
|
|
161
|
+
'BOOKING_FEE': 'RIDE_HAILING',
|
|
162
|
+
'CANCELLATION_FEE': 'RIDE_HAILING',
|
|
163
|
+
'PEAK_HOUR_SURCHARGE': 'RIDE_HAILING',
|
|
164
|
+
'DYNAMIC_PRICING_ADJUSTMENT': 'RIDE_HAILING',
|
|
165
|
+
|
|
166
|
+
// Transportation
|
|
167
|
+
'BASE_RATE': 'TRANSPORTATION',
|
|
168
|
+
'FUEL_SURCHARGE': 'TRANSPORTATION',
|
|
169
|
+
'DELIVERY_CONFIRMATION': 'TRANSPORTATION',
|
|
170
|
+
'RESIDENTIAL_DELIVERY': 'TRANSPORTATION',
|
|
171
|
+
'OVERSIZE_FEE': 'TRANSPORTATION',
|
|
172
|
+
'HAZMAT_FEE': 'TRANSPORTATION',
|
|
173
|
+
'PEAK_SEASON_SURCHARGE': 'TRANSPORTATION',
|
|
174
|
+
'INSURANCE': 'TRANSPORTATION',
|
|
175
|
+
|
|
176
|
+
// Inbound Operations
|
|
177
|
+
'RECEIVING_FEE': 'INBOUND_OPERATIONS',
|
|
178
|
+
'PUTAWAY_FEE': 'INBOUND_OPERATIONS',
|
|
179
|
+
'INVENTORY_COUNT_FEE': 'INBOUND_OPERATIONS',
|
|
180
|
+
'QUALITY_CONTROL_FEE': 'INBOUND_OPERATIONS',
|
|
181
|
+
'DECONSOLIDATION_FEE': 'INBOUND_OPERATIONS',
|
|
182
|
+
|
|
183
|
+
// Storage
|
|
184
|
+
'STORAGE_FEE': 'STORAGE',
|
|
185
|
+
'AMBIENT_STORAGE_FEE': 'STORAGE',
|
|
186
|
+
'REFRIGERATED_STORAGE_FEE': 'STORAGE',
|
|
187
|
+
'FROZEN_STORAGE_FEE': 'STORAGE',
|
|
188
|
+
'CLIMATE_CONTROLLED_STORAGE_FEE': 'STORAGE',
|
|
189
|
+
'HAZMAT_STORAGE_FEE': 'STORAGE',
|
|
190
|
+
'SECURE_STORAGE_FEE': 'STORAGE',
|
|
191
|
+
|
|
192
|
+
// Outbound Operations
|
|
193
|
+
'PICKING_FEE': 'OUTBOUND_OPERATIONS',
|
|
194
|
+
'PACKING_FEE': 'OUTBOUND_OPERATIONS',
|
|
195
|
+
'SHIPPING_FEE': 'OUTBOUND_OPERATIONS',
|
|
196
|
+
'KITTING_FEE': 'OUTBOUND_OPERATIONS',
|
|
197
|
+
'ASSEMBLY_FEE': 'OUTBOUND_OPERATIONS',
|
|
198
|
+
'LABELING_FEE': 'OUTBOUND_OPERATIONS',
|
|
199
|
+
'CONSOLIDATION_FEE': 'OUTBOUND_OPERATIONS',
|
|
200
|
+
'CROSS_DOCK_FEE': 'OUTBOUND_OPERATIONS',
|
|
201
|
+
|
|
202
|
+
// Value-Added Services
|
|
203
|
+
'SORTING_FEE': 'VALUE_ADDED_SERVICES',
|
|
204
|
+
'RETURNS_PROCESSING_FEE': 'VALUE_ADDED_SERVICES',
|
|
205
|
+
'HANDLING_FEE': 'VALUE_ADDED_SERVICES',
|
|
206
|
+
'SPECIALIZED_HANDLING': 'VALUE_ADDED_SERVICES',
|
|
207
|
+
'RUSH_ORDER_FEE': 'VALUE_ADDED_SERVICES',
|
|
208
|
+
|
|
209
|
+
// Equipment & Space
|
|
210
|
+
'EQUIPMENT_RENTAL': 'EQUIPMENT_SPACE',
|
|
211
|
+
'SPACE_RENTAL': 'EQUIPMENT_SPACE',
|
|
212
|
+
'FORKLIFT': 'EQUIPMENT_SPACE',
|
|
213
|
+
'PALLET_JACK': 'EQUIPMENT_SPACE',
|
|
214
|
+
'CONVEYOR': 'EQUIPMENT_SPACE',
|
|
215
|
+
'DOCK_EQUIPMENT': 'EQUIPMENT_SPACE',
|
|
216
|
+
'PACKAGING_EQUIPMENT': 'EQUIPMENT_SPACE',
|
|
217
|
+
'SCANNING_EQUIPMENT': 'EQUIPMENT_SPACE',
|
|
218
|
+
|
|
219
|
+
// Administrative
|
|
220
|
+
'DOCUMENTATION_FEE': 'ADMINISTRATIVE',
|
|
221
|
+
'CUSTOMS_DUTY': 'ADMINISTRATIVE',
|
|
222
|
+
'CUSTOMS_CLEARANCE_FEE': 'ADMINISTRATIVE',
|
|
223
|
+
'SETUP_FEE': 'ADMINISTRATIVE',
|
|
224
|
+
'ACCOUNT_MANAGEMENT_FEE': 'ADMINISTRATIVE',
|
|
225
|
+
'TECHNOLOGY_FEE': 'ADMINISTRATIVE',
|
|
226
|
+
'MINIMUM_ACTIVITY_FEE': 'ADMINISTRATIVE'
|
|
227
|
+
} as const
|
|
228
|
+
|
|
229
|
+
// Core pricing components
|
|
230
|
+
export const PricingTierCommodityMultiplierSchema = Type.Object({
|
|
231
|
+
multiplier: Type.Number(),
|
|
232
|
+
additionalFee: Type.Optional(Type.Number()),
|
|
233
|
+
specialHandlingRequired: Type.Optional(Type.Boolean())
|
|
234
|
+
})
|
|
235
|
+
export const PricingTierDimensionMultiplierSchema = Type.Object({
|
|
236
|
+
multiplier: Type.Number(), // Default: 1.0 - Eg. Dimensional weight pricing => cubic cm per kg
|
|
237
|
+
applyIfGreater: Type.Boolean()
|
|
238
|
+
})
|
|
239
|
+
export const PricingTierTimeMultiplierSchema = Type.Object({
|
|
240
|
+
timeSlot: Type.Union([
|
|
241
|
+
Type.Literal('AFTER_HOURS'),
|
|
242
|
+
Type.Literal('PEAK_HOURS'),
|
|
243
|
+
Type.Literal('OFF_HOURS'),
|
|
244
|
+
Type.Literal('WEEKEND'),
|
|
245
|
+
Type.Literal('HOLIDAY')
|
|
246
|
+
]),
|
|
247
|
+
minimumFee: Type.Optional(Type.Number()),
|
|
248
|
+
minimumHours: Type.Optional(Type.Number()),
|
|
249
|
+
multiplier: Type.Number()
|
|
250
|
+
})
|
|
251
|
+
|
|
252
|
+
export const PricingTierSchema = Type.Object({
|
|
253
|
+
type: ChargeTypeSchema,
|
|
254
|
+
category: ChargeCategorySchema,
|
|
255
|
+
title: Type.String(),
|
|
256
|
+
description: Type.Optional(Type.String()),
|
|
257
|
+
minThreshold: Type.Number(),
|
|
258
|
+
maxThreshold: Type.Optional(Type.Number()),
|
|
259
|
+
multipliers: Type.Optional(Type.Array(Type.Union([
|
|
260
|
+
PricingTierCommodityMultiplierSchema,
|
|
261
|
+
PricingTierDimensionMultiplierSchema,
|
|
262
|
+
PricingTierTimeMultiplierSchema
|
|
263
|
+
]))),
|
|
264
|
+
unit: Type.String(), // 'kg', 'km', 'cbm', 'pallet', 'shipment', 'sqm', 'units', 'orders'
|
|
265
|
+
rate: Type.Number(),
|
|
266
|
+
conditions: Type.Optional(Type.Array(Type.String())),
|
|
267
|
+
isOptional: Type.Boolean()
|
|
268
|
+
})
|
|
269
|
+
export const PricingModelSchema = Type.Union([
|
|
270
|
+
// General models
|
|
271
|
+
Type.Literal('FLAT_RATE'),
|
|
272
|
+
Type.Literal('TIERED'),
|
|
273
|
+
Type.Literal('ZONE_BASED'),
|
|
274
|
+
Type.Literal('WEIGHT_BASED'),
|
|
275
|
+
Type.Literal('DISTANCE_BASED'),
|
|
276
|
+
Type.Literal('PRODUCTIVITY_BASED'),
|
|
277
|
+
Type.Literal('DIMENSIONAL_WEIGHT'),
|
|
278
|
+
Type.Literal('THROUGHPUT_BASED'),
|
|
279
|
+
Type.Literal('ACTIVITY_BASED'),
|
|
280
|
+
Type.Literal('RENTAL_BASED'),
|
|
281
|
+
Type.Literal('VALUE_BASED'),
|
|
282
|
+
Type.Literal('USAGE_BASED'),
|
|
283
|
+
Type.Literal('TIME_BASED'),
|
|
284
|
+
Type.Literal('HYBRID'),
|
|
285
|
+
|
|
286
|
+
// Warehouse/Hub specific models
|
|
287
|
+
Type.Literal('PER_ORDER'),
|
|
288
|
+
Type.Literal('PER_HOUR'),
|
|
289
|
+
Type.Literal('PER_DAY'),
|
|
290
|
+
Type.Literal('PER_UNIT'),
|
|
291
|
+
Type.Literal('PER_PALLET'),
|
|
292
|
+
Type.Literal('PER_CUBIC_METER'),
|
|
293
|
+
Type.Literal('PER_SQUARE_METER'),
|
|
294
|
+
Type.Literal('PER_TRANSACTION'),
|
|
295
|
+
Type.Literal('PER_LABOR_HOUR'),
|
|
296
|
+
Type.Literal('PER_HANDLING_UNIT'),
|
|
297
|
+
Type.Literal('STORAGE_DURATION'),
|
|
298
|
+
Type.Literal('TIERED_DURATION')
|
|
299
|
+
])
|
|
300
|
+
|
|
301
|
+
export const AdditionalFeeSchema = Type.Object({
|
|
302
|
+
type: Type.String(),
|
|
303
|
+
amount: Type.Number()
|
|
304
|
+
})
|
|
305
|
+
|
|
306
|
+
export const FuelSurchargeAdjustmentSchema = Type.Object({
|
|
307
|
+
effectiveDate: Type.String({ format: 'date' }),
|
|
308
|
+
percentage: Type.Number(),
|
|
309
|
+
basePrice: Type.Number(), // fuel price baseline
|
|
310
|
+
calculationMethod: Type.String(),
|
|
311
|
+
currency: CurrencySchema
|
|
312
|
+
})
|
|
313
|
+
export const SeasonalPricingAdjustmentSchema = Type.Composite([
|
|
314
|
+
DateTimeRangeSchema,
|
|
315
|
+
Type.Object({
|
|
316
|
+
adjustmentType: Type.Union([
|
|
317
|
+
Type.Literal('MULTIPLIER'),
|
|
318
|
+
Type.Literal('FIXED_AMOUNT')
|
|
319
|
+
]),
|
|
320
|
+
value: Type.Number(),
|
|
321
|
+
description: Type.String()
|
|
322
|
+
})
|
|
323
|
+
])
|
|
324
|
+
export const ContractTermsSchema = Type.Object({
|
|
325
|
+
type: Type.Union([
|
|
326
|
+
Type.Literal('SPOT'),
|
|
327
|
+
Type.Literal('CONTRACT'),
|
|
328
|
+
Type.Literal('FRAMEWORK')
|
|
329
|
+
]),
|
|
330
|
+
minimumVolume: Type.Optional(Type.Object({
|
|
331
|
+
quantity: Type.Number(),
|
|
332
|
+
unit: Type.String(),
|
|
333
|
+
period: Type.String() // 'monthly', 'quarterly', 'annually'
|
|
334
|
+
})),
|
|
335
|
+
currency: CurrencySchema,
|
|
336
|
+
payment: Type.Object({
|
|
337
|
+
net: Type.Number(), // Default: 30
|
|
338
|
+
invoiceFrequency: Type.String() // Default: monthly
|
|
339
|
+
}),
|
|
340
|
+
sla: Type.Object({
|
|
341
|
+
onTimeDelivery: Type.Number(), // percentage
|
|
342
|
+
damageRate: Type.Number(), // percentage
|
|
343
|
+
lossRate: Type.Number(), // percentage
|
|
344
|
+
penalties: Type.Optional(Type.Array(Type.Object({
|
|
345
|
+
metric: Type.String(),
|
|
346
|
+
threshold: Type.Number(),
|
|
347
|
+
penalty: Type.Number(),
|
|
348
|
+
unit: Type.String()
|
|
349
|
+
})))
|
|
350
|
+
}),
|
|
351
|
+
liabilityLimits: Type.Object({
|
|
352
|
+
maxLiabilityPerShipment: Type.Number(),
|
|
353
|
+
maxLiabilityPerIncident: Type.Number()
|
|
354
|
+
})
|
|
355
|
+
})
|
|
356
|
+
|
|
357
|
+
// Competitor Pricing Integration && Adjustments
|
|
358
|
+
export const CompetitorPricingSchema = Type.Object({
|
|
359
|
+
id: Type.String(),
|
|
360
|
+
serviceName: Type.String(),
|
|
361
|
+
pricePoint: Type.Number(),
|
|
362
|
+
currency: Type.String(),
|
|
363
|
+
route: Type.Optional(Type.String()),
|
|
364
|
+
serviceLevel: Type.String(),
|
|
365
|
+
lastUpdated: DateTimeZoneSchema,
|
|
366
|
+
source: Type.Union([
|
|
367
|
+
Type.Literal('API_INTEGRATION'),
|
|
368
|
+
Type.Literal('MANUAL_ENTRY'),
|
|
369
|
+
Type.Literal('WEB_SCRAPING'),
|
|
370
|
+
Type.Literal('MARKET_RESEARCH')
|
|
371
|
+
]),
|
|
372
|
+
reliability: Type.Number({ minimum: 0, maximum: 100 }) // Data reliability score
|
|
373
|
+
})
|
|
374
|
+
export const CompetitivePricingAdjustmentSchema = Type.Object({
|
|
375
|
+
isEnabled: Type.Boolean(),
|
|
376
|
+
strategy: Type.Union([
|
|
377
|
+
Type.Literal('MATCH'), // Match competitor prices
|
|
378
|
+
Type.Literal('UNDERCUT'), // Price below competitors
|
|
379
|
+
Type.Literal('PREMIUM'), // Price above competitors
|
|
380
|
+
Type.Literal('DYNAMIC_RESPONSE') // Respond based on market position
|
|
381
|
+
]),
|
|
382
|
+
adjustmentPercentage: Type.Number({ minimum: -50, maximum: 50 }),
|
|
383
|
+
minimumMargin: Type.Number({ minimum: 0 }), // Don't go below this margin
|
|
384
|
+
competitorWeights: Type.Record(Type.String(), Type.Number()), // Competitor importance weighting
|
|
385
|
+
priceFloor: Type.Number({ minimum: 0 }),
|
|
386
|
+
priceCeiling: Type.Number({ minimum: 0 }),
|
|
387
|
+
updateTriggers: Type.Array(Type.Object({
|
|
388
|
+
competitorId: Type.String(),
|
|
389
|
+
priceChangeThreshold: Type.Number() // Percentage change to trigger adjustment
|
|
390
|
+
}))
|
|
391
|
+
})
|
|
392
|
+
|
|
393
|
+
// Pricing rule structure
|
|
394
|
+
export const PricingRuleSchema = Type.Object({
|
|
395
|
+
context: ContextSchema,
|
|
396
|
+
id: Type.String(),
|
|
397
|
+
code: Type.String(),
|
|
398
|
+
name: Type.String(),
|
|
399
|
+
version: Type.String(), // Default: 1.0
|
|
400
|
+
model: PricingModelSchema,
|
|
401
|
+
// Base pricing
|
|
402
|
+
currency: CurrencySchema,
|
|
403
|
+
baseRate: Type.Number(),
|
|
404
|
+
minimumCharge: Type.Optional(Type.Number()),
|
|
405
|
+
/**
|
|
406
|
+
* Pricing tiers
|
|
407
|
+
*
|
|
408
|
+
* Transportation => Weight, distance, volume, value, dimension
|
|
409
|
+
* Hub/Warehouse => inbound, sorting, routing, packaging, ...
|
|
410
|
+
*/
|
|
411
|
+
tiers: Type.Array(PricingTierSchema),
|
|
412
|
+
// Conditions
|
|
413
|
+
conditions: Type.Optional(Type.Array(Type.String())),
|
|
414
|
+
exclusions: Type.Optional(Type.Array(Type.String())),
|
|
415
|
+
// Special handling
|
|
416
|
+
additionalFees: Type.Optional(Type.Array(AdditionalFeeSchema)),
|
|
417
|
+
// Seasonal/time-based adjustments
|
|
418
|
+
seasonalAdjustments: Type.Optional(Type.Array(SeasonalPricingAdjustmentSchema)),
|
|
419
|
+
// Contact terms
|
|
420
|
+
contractTerms: Type.Optional(ContractTermsSchema),
|
|
421
|
+
|
|
422
|
+
// Metadata
|
|
423
|
+
tags: Type.Optional(Type.Array(Type.String())),
|
|
424
|
+
metadata: Type.Optional(Type.Record(Type.String(), Type.Any())),
|
|
425
|
+
|
|
426
|
+
// Validity
|
|
427
|
+
effective: DateTimeZoneSchema,
|
|
428
|
+
expiry: Type.Optional(DateTimeZoneSchema),
|
|
429
|
+
|
|
430
|
+
added: ActionRecordSchema,
|
|
431
|
+
updated: Type.Optional(ActionRecordSchema)
|
|
432
|
+
})
|
|
433
|
+
export const PricingRuleTemplateSchema = Type.Object({
|
|
434
|
+
id: Type.String(),
|
|
435
|
+
name: Type.String(),
|
|
436
|
+
description: Type.Optional(Type.String()),
|
|
437
|
+
category: ChargeCategorySchema,
|
|
438
|
+
rule: Type.Omit(PricingRuleSchema, ['id', 'context', 'name', 'code', 'added', 'updated'])
|
|
439
|
+
})
|
|
440
|
+
|
|
441
|
+
// Validation Body schema
|
|
442
|
+
export const PricingRuleValidationScenarioSchema = Type.Array(Type.Object({
|
|
443
|
+
description: Type.String(),
|
|
444
|
+
input: Type.Record(Type.String(), Type.Any()), // By tier unit - 'kg', 'km', 'cbm', 'pallet', 'shipment', 'sqm', 'units', 'orders'
|
|
445
|
+
expectedOutput: Type.Optional(Type.Number())
|
|
446
|
+
}))
|
|
447
|
+
|
|
448
|
+
// Real - time Market Factors Schema
|
|
449
|
+
export const MarketFactorSchema = Type.Object({
|
|
450
|
+
factorType: Type.Union([
|
|
451
|
+
Type.Literal('DEMAND_SURGE'),
|
|
452
|
+
Type.Literal('CAPACITY_UTILIZATION'),
|
|
453
|
+
Type.Literal('FUEL_PRICE_FLUCTUATION'),
|
|
454
|
+
Type.Literal('COMPETITOR_RATE_CHANGE'),
|
|
455
|
+
Type.Literal('WEATHER_IMPACT'),
|
|
456
|
+
Type.Literal('TRAFFIC_CONGESTION'),
|
|
457
|
+
Type.Literal('DRIVER_AVAILABILITY'),
|
|
458
|
+
Type.Literal('EQUIPMENT_SHORTAGE'),
|
|
459
|
+
Type.Literal('MARKET_VOLATILITY')
|
|
460
|
+
]),
|
|
461
|
+
currentValue: Type.Number(),
|
|
462
|
+
threshold: Type.Object({
|
|
463
|
+
min: Type.Number(),
|
|
464
|
+
max: Type.Number(),
|
|
465
|
+
trigger: Type.Number() // Value that triggers pricing adjustment
|
|
466
|
+
}),
|
|
467
|
+
multiplier: Type.Number({ minimum: 0.1, maximum: 10 }),
|
|
468
|
+
maxImpact: Type.Number({ minimum: 0, maximum: 500 }), // Max percentage impact
|
|
469
|
+
refreshInterval: Type.Number({ description: 'minutes' }),
|
|
470
|
+
isActive: Type.Boolean(),
|
|
471
|
+
validityPeriod: Type.Optional(Type.Object({
|
|
472
|
+
start: DateTimeZoneSchema,
|
|
473
|
+
end: DateTimeZoneSchema
|
|
474
|
+
}))
|
|
475
|
+
})
|
|
476
|
+
export const DynamicPricingEngineSchema = Type.Object({
|
|
477
|
+
id: Type.String(),
|
|
478
|
+
name: Type.String(),
|
|
479
|
+
isEnabled: Type.Boolean(),
|
|
480
|
+
|
|
481
|
+
// Market-driven adjustments
|
|
482
|
+
marketFactors: Type.Array(MarketFactorSchema),
|
|
483
|
+
|
|
484
|
+
// Surge pricing configuration
|
|
485
|
+
surgePricing: Type.Object({
|
|
486
|
+
isEnabled: Type.Boolean(),
|
|
487
|
+
demandThresholds: Type.Array(Type.Object({
|
|
488
|
+
demandLevel: Type.Number({ minimum: 0, maximum: 100 }),
|
|
489
|
+
multiplier: Type.Number({ minimum: 1, maximum: 5 }),
|
|
490
|
+
description: Type.String()
|
|
491
|
+
})),
|
|
492
|
+
maxSurgeMultiplier: Type.Number({ minimum: 1, maximum: 10 }),
|
|
493
|
+
cooldownPeriod: Type.Number({ description: 'minutes after surge ends' })
|
|
494
|
+
}),
|
|
495
|
+
|
|
496
|
+
// Capacity-based adjustments
|
|
497
|
+
capacityPricing: Type.Object({
|
|
498
|
+
utilizationBands: Type.Array(Type.Object({
|
|
499
|
+
minUtilization: Type.Number({ minimum: 0, maximum: 100 }),
|
|
500
|
+
maxUtilization: Type.Number({ minimum: 0, maximum: 100 }),
|
|
501
|
+
priceAdjustment: Type.Number(), // Positive or negative percentage
|
|
502
|
+
description: Type.String()
|
|
503
|
+
})),
|
|
504
|
+
realTimeCapacityTracking: Type.Boolean()
|
|
505
|
+
}),
|
|
506
|
+
|
|
507
|
+
updateFrequency: Type.Number({ description: 'seconds between price recalculations' }),
|
|
508
|
+
created: ActionRecordSchema,
|
|
509
|
+
updated: Type.Optional(ActionRecordSchema)
|
|
510
|
+
})
|
|
511
|
+
|
|
512
|
+
// Performance-based Pricing Adjustments
|
|
513
|
+
export const PricingPerformanceMetricSchema = Type.Object({
|
|
514
|
+
metricType: Type.Union([
|
|
515
|
+
Type.Literal('ON_TIME_PERFORMANCE'),
|
|
516
|
+
Type.Literal('DELIVERY_SUCCESS_RATE'),
|
|
517
|
+
Type.Literal('DAMAGE_RATE'),
|
|
518
|
+
Type.Literal('CUSTOMER_SATISFACTION'),
|
|
519
|
+
Type.Literal('VEHICLE_UTILIZATION'),
|
|
520
|
+
Type.Literal('FUEL_EFFICIENCY'),
|
|
521
|
+
Type.Literal('DRIVER_RATING'),
|
|
522
|
+
Type.Literal('RESPONSE_TIME')
|
|
523
|
+
]),
|
|
524
|
+
currentValue: Type.Number(),
|
|
525
|
+
targetValue: Type.Number(),
|
|
526
|
+
benchmark: Type.Number(), // Industry or company benchmark
|
|
527
|
+
trend: Type.Union([
|
|
528
|
+
Type.Literal('IMPROVING'),
|
|
529
|
+
Type.Literal('DECLINING'),
|
|
530
|
+
Type.Literal('STABLE')
|
|
531
|
+
]),
|
|
532
|
+
impact: Type.Union([
|
|
533
|
+
Type.Literal('POSITIVE'), // Good performance = lower prices or premium service
|
|
534
|
+
Type.Literal('NEGATIVE') // Poor performance = higher prices or discounts
|
|
535
|
+
])
|
|
536
|
+
})
|
|
537
|
+
export const PricingPerformanceBasedAdjustmentSchema = Type.Object({
|
|
538
|
+
isEnabled: Type.Boolean(),
|
|
539
|
+
metrics: Type.Array(PricingPerformanceMetricSchema),
|
|
540
|
+
adjustmentRules: Type.Array(Type.Object({
|
|
541
|
+
metricType: Type.String(),
|
|
542
|
+
threshold: Type.Number(),
|
|
543
|
+
operator: Type.Union([
|
|
544
|
+
Type.Literal('GREATER_THAN'),
|
|
545
|
+
Type.Literal('LESS_THAN'),
|
|
546
|
+
Type.Literal('EQUALS'),
|
|
547
|
+
Type.Literal('BETWEEN')
|
|
548
|
+
]),
|
|
549
|
+
adjustment: Type.Object({
|
|
550
|
+
type: Type.Union([
|
|
551
|
+
Type.Literal('PERCENTAGE'),
|
|
552
|
+
Type.Literal('FIXED_AMOUNT'),
|
|
553
|
+
Type.Literal('TIER_CHANGE')
|
|
554
|
+
]),
|
|
555
|
+
value: Type.Number(),
|
|
556
|
+
maxImpact: Type.Number() // Maximum adjustment allowed
|
|
557
|
+
}),
|
|
558
|
+
duration: Type.Optional(Type.Number()) // How long adjustment lasts (hours)
|
|
559
|
+
})),
|
|
560
|
+
evaluationFrequency: Type.Number({ description: 'hours between performance evaluations' })
|
|
561
|
+
})
|
|
562
|
+
|
|
563
|
+
// Advanced Real - time Capacity Management
|
|
564
|
+
export const PricingRealTimeCapacitySchema = Type.Object({
|
|
565
|
+
resourceType: Type.Union([
|
|
566
|
+
Type.Literal('VEHICLES'),
|
|
567
|
+
Type.Literal('DRIVERS'),
|
|
568
|
+
Type.Literal('WAREHOUSE_SPACE'),
|
|
569
|
+
Type.Literal('LOADING_DOCKS'),
|
|
570
|
+
Type.Literal('EQUIPMENT'),
|
|
571
|
+
Type.Literal('ROUTE_SLOTS')
|
|
572
|
+
]),
|
|
573
|
+
totalCapacity: Type.Number(),
|
|
574
|
+
availableCapacity: Type.Number(),
|
|
575
|
+
reservedCapacity: Type.Number(),
|
|
576
|
+
utilizationRate: Type.Number({ minimum: 0, maximum: 100 }),
|
|
577
|
+
|
|
578
|
+
// Forecasting
|
|
579
|
+
projectedDemand: Type.Object({
|
|
580
|
+
nextHour: Type.Number(),
|
|
581
|
+
next4Hours: Type.Number(),
|
|
582
|
+
next24Hours: Type.Number()
|
|
583
|
+
}),
|
|
584
|
+
|
|
585
|
+
// Capacity constraints
|
|
586
|
+
constraints: Type.Array(Type.Object({
|
|
587
|
+
constraintType: Type.String(),
|
|
588
|
+
description: Type.String(),
|
|
589
|
+
impact: Type.Number(), // Percentage reduction in effective capacity
|
|
590
|
+
startTime: Type.Optional(DateTimeZoneSchema),
|
|
591
|
+
endTime: Type.Optional(DateTimeZoneSchema)
|
|
592
|
+
})),
|
|
593
|
+
|
|
594
|
+
lastUpdated: DateTimeZoneSchema
|
|
595
|
+
})
|
|
596
|
+
|
|
597
|
+
// Dynamic Pricing Rule Capability
|
|
598
|
+
export const DynamicPricingRuleSchema = Type.Composite([
|
|
599
|
+
PricingRuleSchema,
|
|
600
|
+
Type.Object({
|
|
601
|
+
engine: Type.Optional(Type.String()), // Reference to DynamicPricingEngine ID
|
|
602
|
+
|
|
603
|
+
// Real-time adjustments
|
|
604
|
+
realTimeFactors: Type.Optional(Type.Array(Type.String())), // MarketFactor IDs
|
|
605
|
+
competitivePricing: Type.Optional(CompetitivePricingAdjustmentSchema),
|
|
606
|
+
performanceAdjustments: Type.Optional(PricingPerformanceBasedAdjustmentSchema),
|
|
607
|
+
|
|
608
|
+
// Advanced constraints
|
|
609
|
+
constraints: Type.Object({
|
|
610
|
+
maxDailyAdjustments: Type.Optional(Type.Number()),
|
|
611
|
+
maxAdjustmentPercentage: Type.Optional(Type.Number()),
|
|
612
|
+
priceStabilityPeriod: Type.Optional(Type.Number()), // Minutes before new adjustment
|
|
613
|
+
blackoutPeriods: Type.Optional(Type.Array(Type.Object({
|
|
614
|
+
start: DateTimeZoneSchema,
|
|
615
|
+
end: DateTimeZoneSchema,
|
|
616
|
+
reason: Type.String()
|
|
617
|
+
})))
|
|
618
|
+
}),
|
|
619
|
+
|
|
620
|
+
// A/B Testing support
|
|
621
|
+
experimentalPricing: Type.Optional(Type.Object({
|
|
622
|
+
isActive: Type.Boolean(),
|
|
623
|
+
testVariants: Type.Array(Type.Object({
|
|
624
|
+
variantId: Type.String(),
|
|
625
|
+
name: Type.String(),
|
|
626
|
+
adjustmentPercentage: Type.Number(),
|
|
627
|
+
trafficAllocation: Type.Number({ minimum: 0, maximum: 100 }),
|
|
628
|
+
startDate: DateTimeZoneSchema,
|
|
629
|
+
endDate: DateTimeZoneSchema
|
|
630
|
+
})),
|
|
631
|
+
successMetric: Type.String()
|
|
632
|
+
}))
|
|
633
|
+
})
|
|
634
|
+
])
|
|
635
|
+
|
|
636
|
+
// Pricing Analytics and Monitoring
|
|
637
|
+
export const PricingAnalyticsSchema = Type.Object({
|
|
638
|
+
ruleId: Type.String(),
|
|
639
|
+
period: Type.Object({
|
|
640
|
+
start: DateTimeZoneSchema,
|
|
641
|
+
end: DateTimeZoneSchema
|
|
642
|
+
}),
|
|
643
|
+
|
|
644
|
+
// Performance metrics
|
|
645
|
+
metrics: Type.Object({
|
|
646
|
+
totalQuotes: Type.Number(),
|
|
647
|
+
acceptanceRate: Type.Number({ minimum: 0, maximum: 100 }),
|
|
648
|
+
averagePricePoint: Type.Number(),
|
|
649
|
+
revenueGenerated: Type.Number(),
|
|
650
|
+
marginPercentage: Type.Number(),
|
|
651
|
+
competitivenessScore: Type.Number({ minimum: 0, maximum: 100 })
|
|
652
|
+
}),
|
|
653
|
+
|
|
654
|
+
// Dynamic adjustments made
|
|
655
|
+
adjustments: Type.Array(Type.Object({
|
|
656
|
+
timestamp: DateTimeZoneSchema,
|
|
657
|
+
triggerType: Type.String(),
|
|
658
|
+
triggerValue: Type.Number(),
|
|
659
|
+
adjustmentPercentage: Type.Number(),
|
|
660
|
+
duration: Type.Number(), // Minutes adjustment was active
|
|
661
|
+
impact: Type.Object({
|
|
662
|
+
quoteVolume: Type.Number(),
|
|
663
|
+
acceptanceRate: Type.Number()
|
|
664
|
+
})
|
|
665
|
+
})),
|
|
666
|
+
|
|
667
|
+
// Optimization recommendations
|
|
668
|
+
recommendations: Type.Optional(Type.Array(Type.Object({
|
|
669
|
+
type: Type.Union([
|
|
670
|
+
Type.Literal('PRICE_INCREASE'),
|
|
671
|
+
Type.Literal('PRICE_DECREASE'),
|
|
672
|
+
Type.Literal('TIER_ADJUSTMENT'),
|
|
673
|
+
Type.Literal('TIME_MULTIPLIER_CHANGE'),
|
|
674
|
+
Type.Literal('CAPACITY_OPTIMIZATION')
|
|
675
|
+
]),
|
|
676
|
+
confidence: Type.Number({ minimum: 0, maximum: 100 }),
|
|
677
|
+
expectedImpact: Type.String(),
|
|
678
|
+
implementation: Type.String()
|
|
679
|
+
})))
|
|
680
|
+
})
|
|
681
|
+
|
|
682
|
+
// Type exports
|
|
683
|
+
export type PricingTierCommodityMultiplier = Static<typeof PricingTierCommodityMultiplierSchema>
|
|
684
|
+
export type PricingTierDimensionMultiplier = Static<typeof PricingTierDimensionMultiplierSchema>
|
|
685
|
+
export type PricingTierTimeMultiplier = Static<typeof PricingTierTimeMultiplierSchema>
|
|
686
|
+
export type PricingTier = Static<typeof PricingTierSchema>
|
|
687
|
+
export type PricingModel = Static<typeof PricingModelSchema>
|
|
688
|
+
export type PricingRule = Static<typeof PricingRuleSchema>
|
|
689
|
+
export type DynamicPricingEngine = Static<typeof DynamicPricingEngineSchema>
|
|
690
|
+
export type DynamicPricingRule = Static<typeof DynamicPricingRuleSchema>
|
|
691
|
+
export type PricingRuleTemplate = Static<typeof PricingRuleTemplateSchema>
|
|
692
|
+
export type PricingRuleValidationScenario = Static<typeof PricingRuleValidationScenarioSchema>
|
|
693
|
+
export type MarketFactor = Static<typeof MarketFactorSchema>
|
|
694
|
+
export type CompetitorPricing = Static<typeof CompetitorPricingSchema>
|
|
695
|
+
export type CompetitivePricingAdjustment = Static<typeof CompetitivePricingAdjustmentSchema>
|
|
696
|
+
export type PricingPerformanceMetric = Static<typeof PricingPerformanceMetricSchema>
|
|
697
|
+
export type PricingPerformanceBasedAdjustment = Static<typeof PricingPerformanceBasedAdjustmentSchema>
|
|
698
|
+
export type PricingRealTimeCapacity = Static<typeof PricingRealTimeCapacitySchema>
|
|
699
|
+
export type PricingAnalytics = Static<typeof PricingAnalyticsSchema>
|
|
700
|
+
export type AdditionalFee = Static<typeof AdditionalFeeSchema>
|
|
701
|
+
export type ContractTerms = Static<typeof ContractTermsSchema>
|
|
702
|
+
export type FuelSurchargeAdjustment = Static<typeof FuelSurchargeAdjustmentSchema>
|
|
703
|
+
export type SeasonalPricingAdjustment = Static<typeof SeasonalPricingAdjustmentSchema>
|
|
704
|
+
|
|
705
|
+
// ─── Request Validation Schemas ───────────────────────────────────────────────
|
|
706
|
+
|
|
707
|
+
const OMIT_PRICING_FIELDS = ['id', 'context', 'tiers', 'contactTerms', 'seasonnalAdjustments', 'added', 'updated'] as const
|
|
708
|
+
|
|
709
|
+
const PricingRuleQuerySchema = Type.Object({
|
|
710
|
+
category: Type.Optional(ChargeCategorySchema),
|
|
711
|
+
model: Type.Optional(PricingModelSchema),
|
|
712
|
+
active: Type.Optional(Type.Boolean()),
|
|
713
|
+
tags: Type.Optional(Type.String()),
|
|
714
|
+
limit: Type.Optional(Type.Number({ minimum: 1, maximum: 100, default: 20 })),
|
|
715
|
+
offset: Type.Optional(Type.Number({ minimum: 0, default: 0 }))
|
|
716
|
+
})
|
|
717
|
+
|
|
718
|
+
export const LSPPricingAddRVS = {
|
|
719
|
+
headers: APIHeadersSchema,
|
|
720
|
+
body: Type.Omit(PricingRuleSchema, OMIT_PRICING_FIELDS),
|
|
721
|
+
response: {
|
|
722
|
+
201: APIResponseDataSchemaFactory({ ruleId: Type.String() }),
|
|
723
|
+
'4XX': APIErrorSchema
|
|
724
|
+
}
|
|
725
|
+
}
|
|
726
|
+
|
|
727
|
+
export const LSPPricingRetrieveRVS = {
|
|
728
|
+
headers: APIHeadersSchema,
|
|
729
|
+
params: Type.Object({ id: Type.String() }),
|
|
730
|
+
response: {
|
|
731
|
+
200: APIResponseDataSchemaFactory({ rule: PricingRuleSchema }),
|
|
732
|
+
'4XX': APIErrorSchema
|
|
733
|
+
}
|
|
734
|
+
}
|
|
735
|
+
|
|
736
|
+
export const LSPPricingFetchRVS = {
|
|
737
|
+
headers: APIHeadersSchema,
|
|
738
|
+
querystring: PricingRuleQuerySchema,
|
|
739
|
+
response: {
|
|
740
|
+
200: APIResponseDataSchemaFactory({ rules: Type.Array(PricingRuleSchema), total: Type.Number(), hasMore: Type.Boolean() }),
|
|
741
|
+
'4XX': APIErrorSchema
|
|
742
|
+
}
|
|
743
|
+
}
|
|
744
|
+
|
|
745
|
+
export const LSPPricingUpdateRVS = {
|
|
746
|
+
headers: APIHeadersSchema,
|
|
747
|
+
params: Type.Object({ id: Type.String() }),
|
|
748
|
+
body: Type.Partial(Type.Omit(PricingRuleSchema, OMIT_PRICING_FIELDS)),
|
|
749
|
+
response: {
|
|
750
|
+
200: APIResponseDataSchemaFactory({ rule: PricingRuleSchema }),
|
|
751
|
+
'4XX': APIErrorSchema
|
|
752
|
+
}
|
|
753
|
+
}
|
|
754
|
+
|
|
755
|
+
export const LSPPricingRemoveRVS = {
|
|
756
|
+
headers: APIHeadersSchema,
|
|
757
|
+
params: Type.Object({ id: Type.String() }),
|
|
758
|
+
response: {
|
|
759
|
+
200: APIResponseBaseSchema,
|
|
760
|
+
'4XX': APIErrorSchema
|
|
761
|
+
}
|
|
762
|
+
}
|
|
763
|
+
|
|
764
|
+
export const LSPPricingAddTierRVS = {
|
|
765
|
+
headers: APIHeadersSchema,
|
|
766
|
+
params: Type.Object({ id: Type.String() }),
|
|
767
|
+
body: PricingTierSchema,
|
|
768
|
+
response: {
|
|
769
|
+
201: APIResponseBaseSchema,
|
|
770
|
+
'4XX': APIErrorSchema
|
|
771
|
+
}
|
|
772
|
+
}
|
|
773
|
+
|
|
774
|
+
export const LSPPricingUpdateTierRVS = {
|
|
775
|
+
headers: APIHeadersSchema,
|
|
776
|
+
params: Type.Object({ id: Type.String(), index: Type.Number() }),
|
|
777
|
+
body: Type.Partial(PricingTierSchema),
|
|
778
|
+
response: {
|
|
779
|
+
200: APIResponseDataSchemaFactory({ tier: PricingTierSchema }),
|
|
780
|
+
'4XX': APIErrorSchema
|
|
781
|
+
}
|
|
782
|
+
}
|
|
783
|
+
|
|
784
|
+
export const LSPPricingRemoveTierRVS = {
|
|
785
|
+
headers: APIHeadersSchema,
|
|
786
|
+
params: Type.Object({ id: Type.String(), index: Type.Number() }),
|
|
787
|
+
response: {
|
|
788
|
+
200: APIResponseBaseSchema,
|
|
789
|
+
'4XX': APIErrorSchema
|
|
790
|
+
}
|
|
791
|
+
}
|
|
792
|
+
|
|
793
|
+
export const LSPPricingAddSeasonalAdjustmentRVS = {
|
|
794
|
+
headers: APIHeadersSchema,
|
|
795
|
+
params: Type.Object({ id: Type.String() }),
|
|
796
|
+
body: SeasonalPricingAdjustmentSchema,
|
|
797
|
+
response: {
|
|
798
|
+
201: APIResponseBaseSchema,
|
|
799
|
+
'4XX': APIErrorSchema
|
|
800
|
+
}
|
|
801
|
+
}
|
|
802
|
+
|
|
803
|
+
export const LSPPricingRemoveSeasonalAdjustmentRVS = {
|
|
804
|
+
headers: APIHeadersSchema,
|
|
805
|
+
params: Type.Object({ id: Type.String(), index: Type.Number() }),
|
|
806
|
+
response: {
|
|
807
|
+
200: APIResponseBaseSchema,
|
|
808
|
+
'4XX': APIErrorSchema
|
|
809
|
+
}
|
|
810
|
+
}
|
|
811
|
+
|
|
812
|
+
export const LSPPricingUpdateFuelSurchargeRVS = {
|
|
813
|
+
headers: APIHeadersSchema,
|
|
814
|
+
params: Type.Object({ id: Type.String() }),
|
|
815
|
+
body: FuelSurchargeAdjustmentSchema,
|
|
816
|
+
response: {
|
|
817
|
+
200: APIResponseDataSchemaFactory({ fuelSurcharge: FuelSurchargeAdjustmentSchema }),
|
|
818
|
+
'4XX': APIErrorSchema
|
|
819
|
+
}
|
|
820
|
+
}
|
|
821
|
+
|
|
822
|
+
export const LSPPricingBulkUpdateByCategoryRVS = {
|
|
823
|
+
headers: APIHeadersSchema,
|
|
824
|
+
body: Type.Object({
|
|
825
|
+
category: ChargeCategorySchema,
|
|
826
|
+
updates: Type.Object({
|
|
827
|
+
multiplier: Type.Optional(Type.Number()),
|
|
828
|
+
additionalFee: Type.Optional(Type.Number()),
|
|
829
|
+
tags: Type.Optional(Type.Array(Type.String()))
|
|
830
|
+
}),
|
|
831
|
+
filters: Type.Optional(Type.Object({
|
|
832
|
+
tags: Type.Optional(Type.Array(Type.String())),
|
|
833
|
+
model: Type.Optional(PricingModelSchema)
|
|
834
|
+
}))
|
|
835
|
+
}),
|
|
836
|
+
response: {
|
|
837
|
+
200: APIResponseDataSchemaFactory({ updatedCount: Type.Number() }),
|
|
838
|
+
'4XX': APIErrorSchema
|
|
839
|
+
}
|
|
840
|
+
}
|
|
841
|
+
|
|
842
|
+
export const LSPPricingAddContractTermsRVS = {
|
|
843
|
+
headers: APIHeadersSchema,
|
|
844
|
+
params: Type.Object({ id: Type.String() }),
|
|
845
|
+
body: ContractTermsSchema,
|
|
846
|
+
response: {
|
|
847
|
+
201: APIResponseBaseSchema,
|
|
848
|
+
'4XX': APIErrorSchema
|
|
849
|
+
}
|
|
850
|
+
}
|
|
851
|
+
|
|
852
|
+
export const LSPPricingUpdateContractTermsRVS = {
|
|
853
|
+
headers: APIHeadersSchema,
|
|
854
|
+
params: Type.Object({ id: Type.String() }),
|
|
855
|
+
body: Type.Partial(ContractTermsSchema),
|
|
856
|
+
response: {
|
|
857
|
+
200: APIResponseDataSchemaFactory({ contract: ContractTermsSchema, message: Type.String() }),
|
|
858
|
+
'4XX': APIErrorSchema
|
|
859
|
+
}
|
|
860
|
+
}
|
|
861
|
+
|
|
862
|
+
export const LSPPricingValidateRVS = {
|
|
863
|
+
headers: APIHeadersSchema,
|
|
864
|
+
body: PricingRuleValidationScenarioSchema,
|
|
865
|
+
response: {
|
|
866
|
+
200: APIResponseDataSchemaFactory({
|
|
867
|
+
isValid: Type.Boolean(),
|
|
868
|
+
errors: Type.Array(Type.String()),
|
|
869
|
+
warnings: Type.Array(Type.String()),
|
|
870
|
+
results: Type.Optional(Type.Array(Type.Object({
|
|
871
|
+
scenario: Type.String(),
|
|
872
|
+
passed: Type.Boolean(),
|
|
873
|
+
calculatedPrice: Type.Number(),
|
|
874
|
+
expectedPrice: Type.Optional(Type.Number()),
|
|
875
|
+
details: Type.String()
|
|
876
|
+
})))
|
|
877
|
+
}),
|
|
878
|
+
'4XX': APIErrorSchema
|
|
879
|
+
}
|
|
880
|
+
}
|
|
881
|
+
|
|
882
|
+
export const LSPPricingGetTemplatesRVS = {
|
|
883
|
+
headers: APIHeadersSchema,
|
|
884
|
+
querystring: Type.Object({
|
|
885
|
+
category: Type.Optional(ChargeCategorySchema),
|
|
886
|
+
tag: Type.Optional(Type.String())
|
|
887
|
+
}),
|
|
888
|
+
response: {
|
|
889
|
+
200: APIResponseDataSchemaFactory({
|
|
890
|
+
templates: Type.Array(Type.Object({
|
|
891
|
+
id: Type.String(),
|
|
892
|
+
name: Type.String(),
|
|
893
|
+
description: Type.String(),
|
|
894
|
+
category: ChargeCategorySchema,
|
|
895
|
+
template: PricingRuleSchema
|
|
896
|
+
}))
|
|
897
|
+
}),
|
|
898
|
+
'4XX': APIErrorSchema
|
|
899
|
+
}
|
|
900
|
+
}
|
|
901
|
+
|
|
902
|
+
export const LSPPricingCreateFromTemplateRVS = {
|
|
903
|
+
headers: APIHeadersSchema,
|
|
904
|
+
body: Type.Object({
|
|
905
|
+
templateId: Type.String(),
|
|
906
|
+
customizations: Type.Optional(Type.Record(Type.String(), Type.Any())),
|
|
907
|
+
name: Type.String(),
|
|
908
|
+
code: Type.String()
|
|
909
|
+
}),
|
|
910
|
+
response: {
|
|
911
|
+
201: APIResponseDataSchemaFactory({ ruleId: Type.String(), rule: PricingRuleSchema, message: Type.String() }),
|
|
912
|
+
'4XX': APIErrorSchema
|
|
913
|
+
}
|
|
914
|
+
}
|
|
915
|
+
|
|
916
|
+
export const LSPPricingBindToRVS = {
|
|
917
|
+
headers: APIHeadersSchema,
|
|
918
|
+
params: Type.Object({
|
|
919
|
+
id: Type.String(),
|
|
920
|
+
action: Type.Union([Type.Literal('add'), Type.Literal('remove')])
|
|
921
|
+
}),
|
|
922
|
+
body: Type.Object({
|
|
923
|
+
id: Type.Optional(Type.String()),
|
|
924
|
+
code: Type.Optional(Type.String())
|
|
925
|
+
}),
|
|
926
|
+
response: {
|
|
927
|
+
200: APIResponseBaseSchema,
|
|
928
|
+
'4XX': APIErrorSchema
|
|
929
|
+
}
|
|
930
|
+
}
|
|
931
|
+
|
|
932
|
+
export type LSPPricingAddValidation = { body: Static<typeof LSPPricingAddRVS.body>, response: Static<(typeof LSPPricingAddRVS.response)[201]> }
|
|
933
|
+
export type LSPPricingRetrieveValidation = { params: Static<typeof LSPPricingRetrieveRVS.params>, response: Static<(typeof LSPPricingRetrieveRVS.response)[200]> }
|
|
934
|
+
export type LSPPricingFetchValidation = { querystring: Static<typeof LSPPricingFetchRVS.querystring>, response: Static<(typeof LSPPricingFetchRVS.response)[200]> }
|
|
935
|
+
export type LSPPricingUpdateValidation = { params: Static<typeof LSPPricingUpdateRVS.params>, body: Static<typeof LSPPricingUpdateRVS.body>, response: Static<(typeof LSPPricingUpdateRVS.response)[200]> }
|
|
936
|
+
export type LSPPricingRemoveValidation = { params: Static<typeof LSPPricingRemoveRVS.params>, response: Static<(typeof LSPPricingRemoveRVS.response)[200]> }
|
|
937
|
+
export type LSPPricingAddTierValidation = { params: Static<typeof LSPPricingAddTierRVS.params>, body: Static<typeof LSPPricingAddTierRVS.body>, response: Static<(typeof LSPPricingAddTierRVS.response)[201]> }
|
|
938
|
+
export type LSPPricingUpdateTierValidation = { params: Static<typeof LSPPricingUpdateTierRVS.params>, body: Static<typeof LSPPricingUpdateTierRVS.body>, response: Static<(typeof LSPPricingUpdateTierRVS.response)[200]> }
|
|
939
|
+
export type LSPPricingRemoveTierValidation = { params: Static<typeof LSPPricingRemoveTierRVS.params>, response: Static<(typeof LSPPricingRemoveTierRVS.response)[200]> }
|
|
940
|
+
export type LSPPricingAddSeasonalAdjustmentValidation = { params: Static<typeof LSPPricingAddSeasonalAdjustmentRVS.params>, body: Static<typeof LSPPricingAddSeasonalAdjustmentRVS.body>, response: Static<(typeof LSPPricingAddSeasonalAdjustmentRVS.response)[201]> }
|
|
941
|
+
export type LSPPricingRemoveSeasonalAdjustmentValidation = { params: Static<typeof LSPPricingRemoveSeasonalAdjustmentRVS.params>, response: Static<(typeof LSPPricingRemoveSeasonalAdjustmentRVS.response)[200]> }
|
|
942
|
+
export type LSPPricingUpdateFuelSurchargeValidation = { params: Static<typeof LSPPricingUpdateFuelSurchargeRVS.params>, body: Static<typeof LSPPricingUpdateFuelSurchargeRVS.body>, response: Static<(typeof LSPPricingUpdateFuelSurchargeRVS.response)[200]> }
|
|
943
|
+
export type LSPPricingBulkUpdateByCategoryValidation = { body: Static<typeof LSPPricingBulkUpdateByCategoryRVS.body>, response: Static<(typeof LSPPricingBulkUpdateByCategoryRVS.response)[200]> }
|
|
944
|
+
export type LSPPricingAddContractTermsValidation = { params: Static<typeof LSPPricingAddContractTermsRVS.params>, body: Static<typeof LSPPricingAddContractTermsRVS.body>, response: Static<(typeof LSPPricingAddContractTermsRVS.response)[201]> }
|
|
945
|
+
export type LSPPricingUpdateContractTermsValidation = { params: Static<typeof LSPPricingUpdateContractTermsRVS.params>, body: Static<typeof LSPPricingUpdateContractTermsRVS.body>, response: Static<(typeof LSPPricingUpdateContractTermsRVS.response)[200]> }
|
|
946
|
+
export type LSPPricingValidateValidation = { body: Static<typeof LSPPricingValidateRVS.body>, response: Static<(typeof LSPPricingValidateRVS.response)[200]> }
|
|
947
|
+
export type LSPPricingGetTemplatesValidation = { querystring: Static<typeof LSPPricingGetTemplatesRVS.querystring>, response: Static<(typeof LSPPricingGetTemplatesRVS.response)[200]> }
|
|
948
|
+
export type LSPPricingCreateFromTemplateValidation = { body: Static<typeof LSPPricingCreateFromTemplateRVS.body>, response: Static<(typeof LSPPricingCreateFromTemplateRVS.response)[201]> }
|
|
949
|
+
export type LSPPricingBindToValidation = { params: Static<typeof LSPPricingBindToRVS.params>, body: Static<typeof LSPPricingBindToRVS.body>, response: Static<(typeof LSPPricingBindToRVS.response)[200]> }
|
|
950
|
+
|
|
951
|
+
// export type PricingQuote = Static<typeof PricingQuoteSchema>
|
|
952
|
+
// export type StoragePricing = Static<typeof StoragePricingSchema>
|
|
953
|
+
// export type LaborPricing = Static<typeof LaborPricingSchema>
|
|
954
|
+
// export type EquipmentPricing = Static<typeof EquipmentPricingSchema>
|
|
955
|
+
// export type ThroughputPricing = Static<typeof ThroughputPricingSchema>
|
|
956
|
+
|
|
957
|
+
// Helper schemas for different LSP quote requests
|
|
958
|
+
// export const TransportationQuoteRequestSchema = Type.Object({
|
|
959
|
+
// shipment: Type.Object({
|
|
960
|
+
// origin: Type.Object({
|
|
961
|
+
// postalCode: Type.String(),
|
|
962
|
+
// city: Type.String(),
|
|
963
|
+
// country: Type.String()
|
|
964
|
+
// }),
|
|
965
|
+
// destination: Type.Object({
|
|
966
|
+
// postalCode: Type.String(),
|
|
967
|
+
// city: Type.String(),
|
|
968
|
+
// country: Type.String()
|
|
969
|
+
// }),
|
|
970
|
+
// packages: Type.Array(Type.Object({
|
|
971
|
+
// weight: Type.Number(),
|
|
972
|
+
// weightUnit: Type.String({ default: 'kg' }),
|
|
973
|
+
// dimensions: Type.Object({
|
|
974
|
+
// length: Type.Number(),
|
|
975
|
+
// width: Type.Number(),
|
|
976
|
+
// height: Type.Number(),
|
|
977
|
+
// unit: Type.String({ default: 'cm' })
|
|
978
|
+
// }),
|
|
979
|
+
// value: Type.Optional(Type.Number()),
|
|
980
|
+
// commodityCode: Type.Optional(Type.String())
|
|
981
|
+
// })),
|
|
982
|
+
// serviceCode: Type.Optional(Type.String()),
|
|
983
|
+
// shipDate: Type.String({ format: 'date' }),
|
|
984
|
+
// deliveryDate: Type.Optional(Type.String({ format: 'date' }))
|
|
985
|
+
// }),
|
|
986
|
+
// options: Type.Optional(Type.Object({
|
|
987
|
+
// insurance: Type.Optional(Type.Boolean()),
|
|
988
|
+
// signatureRequired: Type.Optional(Type.Boolean()),
|
|
989
|
+
// residentialDelivery: Type.Optional(Type.Boolean()),
|
|
990
|
+
// customsClearance: Type.Optional(Type.Boolean())
|
|
991
|
+
// }))
|
|
992
|
+
// })
|
|
993
|
+
// export const WarehouseQuoteRequestSchema = Type.Object({
|
|
994
|
+
// services: Type.Array(Type.Object({
|
|
995
|
+
// serviceType: ServiceTypeSchema,
|
|
996
|
+
// quantity: Type.Number(),
|
|
997
|
+
// unit: Type.String(), // 'pallets', 'units', 'cbm', 'orders'
|
|
998
|
+
// duration: Type.Optional(Type.Object({
|
|
999
|
+
// value: Type.Number(),
|
|
1000
|
+
// unit: Type.String() // 'days', 'months', 'ongoing'
|
|
1001
|
+
// })),
|
|
1002
|
+
// specialRequirements: Type.Optional(Type.Array(Type.String()))
|
|
1003
|
+
// })),
|
|
1004
|
+
// facilityRequirements: Type.Optional(Type.Object({
|
|
1005
|
+
// storageType: Type.Optional(Type.Array(Type.String())),
|
|
1006
|
+
// location: Type.Optional(Type.Object({
|
|
1007
|
+
// city: Type.String(),
|
|
1008
|
+
// country: Type.String(),
|
|
1009
|
+
// proximityRequirements: Type.Optional(Type.Array(Type.String()))
|
|
1010
|
+
// })),
|
|
1011
|
+
// equipmentNeeded: Type.Optional(Type.Array(Type.String()))
|
|
1012
|
+
// })),
|
|
1013
|
+
// volumeProjections: Type.Optional(Type.Object({
|
|
1014
|
+
// monthly: Type.Number(),
|
|
1015
|
+
// seasonal: Type.Optional(Type.Array(Type.Object({
|
|
1016
|
+
// month: Type.String(),
|
|
1017
|
+
// multiplier: Type.Number()
|
|
1018
|
+
// })))
|
|
1019
|
+
// })),
|
|
1020
|
+
// startDate: Type.String({ format: 'date' }),
|
|
1021
|
+
// contractDuration: Type.Optional(Type.String())
|
|
1022
|
+
// })
|
|
1023
|
+
|
|
1024
|
+
// Updated main quote request to handle both types
|
|
1025
|
+
// export const PriceRequestSchema = Type.Object({
|
|
1026
|
+
// requestType: Type.Union([
|
|
1027
|
+
// Type.Literal('TRANSPORTATION'),
|
|
1028
|
+
// Type.Literal('WAREHOUSING'),
|
|
1029
|
+
// Type.Literal('FULFILLMENT'),
|
|
1030
|
+
// Type.Literal('MIXED_SERVICES')
|
|
1031
|
+
// ]),
|
|
1032
|
+
// transportationRequest: Type.Optional(TransportationQuoteRequestSchema),
|
|
1033
|
+
// warehouseRequest: Type.Optional(WarehouseQuoteRequestSchema),
|
|
1034
|
+
// requestId: Type.Optional(Type.String()),
|
|
1035
|
+
// customerId: Type.Optional(Type.String()),
|
|
1036
|
+
// urgency: Type.Optional(Type.Union([
|
|
1037
|
+
// Type.Literal('STANDARD'),
|
|
1038
|
+
// Type.Literal('URGENT'),
|
|
1039
|
+
// Type.Literal('RUSH')
|
|
1040
|
+
// ]))
|
|
1041
|
+
// })
|
|
1042
|
+
// export const PriceResponseSchema = Type.Object({
|
|
1043
|
+
// quotes: Type.Array(Type.Object({
|
|
1044
|
+
// serviceCode: Type.String(),
|
|
1045
|
+
// serviceName: Type.String(),
|
|
1046
|
+
// serviceType: ServiceTypeSchema,
|
|
1047
|
+
// totalCost: Type.Number(),
|
|
1048
|
+
// currency: Type.String(),
|
|
1049
|
+
// transitTime: Type.Optional(Type.Object({
|
|
1050
|
+
// min: Type.Number(),
|
|
1051
|
+
// max: Type.Number(),
|
|
1052
|
+
// unit: Type.String()
|
|
1053
|
+
// })),
|
|
1054
|
+
// breakdown: Type.Object({
|
|
1055
|
+
// baseRate: Type.Number(),
|
|
1056
|
+
|
|
1057
|
+
// // Transportation specific
|
|
1058
|
+
// fuelSurcharge: Type.Optional(Type.Number()),
|
|
1059
|
+
|
|
1060
|
+
// // Warehouse specific
|
|
1061
|
+
// storageCosts: Type.Optional(Type.Array(Type.Object({
|
|
1062
|
+
// storageType: Type.String(),
|
|
1063
|
+
// amount: Type.Number(),
|
|
1064
|
+
// unit: Type.String(),
|
|
1065
|
+
// duration: Type.Optional(Type.String())
|
|
1066
|
+
// }))),
|
|
1067
|
+
// laborCosts: Type.Optional(Type.Array(Type.Object({
|
|
1068
|
+
// laborType: Type.String(),
|
|
1069
|
+
// amount: Type.Number(),
|
|
1070
|
+
// hours: Type.Optional(Type.Number())
|
|
1071
|
+
// }))),
|
|
1072
|
+
// equipmentCosts: Type.Optional(Type.Array(Type.Object({
|
|
1073
|
+
// equipmentType: Type.String(),
|
|
1074
|
+
// amount: Type.Number(),
|
|
1075
|
+
// usage: Type.Optional(Type.String())
|
|
1076
|
+
// }))),
|
|
1077
|
+
|
|
1078
|
+
// // Common
|
|
1079
|
+
// accessorialCharges: Type.Array(Type.Object({
|
|
1080
|
+
// chargeCode: Type.String(),
|
|
1081
|
+
// chargeName: Type.String(),
|
|
1082
|
+
// amount: Type.Number()
|
|
1083
|
+
// })),
|
|
1084
|
+
// taxes: Type.Optional(Type.Number())
|
|
1085
|
+
// }),
|
|
1086
|
+
// capacity: Type.Optional(Type.Object({
|
|
1087
|
+
// available: Type.Boolean(),
|
|
1088
|
+
// constraints: Type.Optional(Type.Array(Type.String()))
|
|
1089
|
+
// })),
|
|
1090
|
+
// validUntil: Type.String({ format: 'date-time' })
|
|
1091
|
+
// }))
|
|
1092
|
+
// })
|
|
1093
|
+
|
|
1094
|
+
// export type PriceRequest = Static<typeof PriceRequestSchema>
|
|
1095
|
+
// export type PriceResponse = Static<typeof PriceResponseSchema>
|
|
1096
|
+
// export type TransportationQuoteRequest = Static<typeof TransportationQuoteRequestSchema>
|
|
1097
|
+
// export type WarehouseQuoteRequest = Static<typeof WarehouseQuoteRequestSchema>
|