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