@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,334 @@
|
|
|
1
|
+
import { Type, Static } from '@sinclair/typebox'
|
|
2
|
+
import { ActionRecordSchema } from '../time'
|
|
3
|
+
import { ContextSchema } from '../context'
|
|
4
|
+
import { APIResponseBaseSchema, APIResponseDataSchemaFactory, FetchByQueryRequestSchema } from '../api'
|
|
5
|
+
|
|
6
|
+
// Device Specs Schema (expandable structure)
|
|
7
|
+
export const IoTDeviceSpecsSchema = Type.Object({
|
|
8
|
+
manufacturer: Type.Optional(Type.String({ maxLength: 100 })),
|
|
9
|
+
model: Type.Optional(Type.String({ maxLength: 100 })),
|
|
10
|
+
firmwareVersion: Type.Optional(Type.String({ maxLength: 50 })),
|
|
11
|
+
hardwareVersion: Type.Optional(Type.String({ maxLength: 50 })),
|
|
12
|
+
serialNumber: Type.Optional(Type.String({ maxLength: 100 })),
|
|
13
|
+
capabilities: Type.Optional(Type.Array(Type.String())),
|
|
14
|
+
sensors: Type.Optional(Type.Array(Type.Object({
|
|
15
|
+
type: Type.String(),
|
|
16
|
+
model: Type.Optional(Type.String()),
|
|
17
|
+
accuracy: Type.Optional(Type.String()),
|
|
18
|
+
range: Type.Optional(Type.String())
|
|
19
|
+
}))),
|
|
20
|
+
connectivity: Type.Optional(Type.Object({
|
|
21
|
+
protocols: Type.Optional(Type.Array(Type.String())),
|
|
22
|
+
networkTypes: Type.Optional(Type.Array(Type.String())),
|
|
23
|
+
maxConnections: Type.Optional(Type.Number({ minimum: 1 }))
|
|
24
|
+
})),
|
|
25
|
+
power: Type.Optional(Type.Object({
|
|
26
|
+
type: Type.Optional(Type.Union([
|
|
27
|
+
Type.Literal('BATTERY'),
|
|
28
|
+
Type.Literal('WIRED'),
|
|
29
|
+
Type.Literal('SOLAR'),
|
|
30
|
+
Type.Literal('HYBRID')
|
|
31
|
+
])),
|
|
32
|
+
voltage: Type.Optional(Type.Number({ minimum: 0 })),
|
|
33
|
+
capacity: Type.Optional(Type.Number({ minimum: 0, description: 'mAh for batteries' }))
|
|
34
|
+
})),
|
|
35
|
+
physical: Type.Optional(Type.Object({
|
|
36
|
+
weight: Type.Optional(Type.Number({ minimum: 0, description: 'grams' })),
|
|
37
|
+
dimensions: Type.Optional(Type.Object({
|
|
38
|
+
length: Type.Number({ minimum: 0 }),
|
|
39
|
+
width: Type.Number({ minimum: 0 }),
|
|
40
|
+
height: Type.Number({ minimum: 0 }),
|
|
41
|
+
unit: Type.Union([Type.Literal('mm'), Type.Literal('cm')])
|
|
42
|
+
})),
|
|
43
|
+
operatingTemperature: Type.Optional(Type.Object({
|
|
44
|
+
min: Type.Number(),
|
|
45
|
+
max: Type.Number(),
|
|
46
|
+
unit: Type.Union([Type.Literal('C'), Type.Literal('F')])
|
|
47
|
+
})),
|
|
48
|
+
ipRating: Type.Optional(Type.String({ description: 'IP protection rating (e.g., IP67)' }))
|
|
49
|
+
}))
|
|
50
|
+
}, {
|
|
51
|
+
additionalProperties: true,
|
|
52
|
+
description: 'Device specifications - extensible structure'
|
|
53
|
+
})
|
|
54
|
+
|
|
55
|
+
// Device State Schema (expandable structure)
|
|
56
|
+
export const IoTDeviceStateSchema = Type.Object({
|
|
57
|
+
online: Type.Optional(Type.Boolean()),
|
|
58
|
+
lastSeen: Type.Optional(Type.Number({ description: 'Last communication timestamp' })),
|
|
59
|
+
batteryLevel: Type.Optional(Type.Number({
|
|
60
|
+
minimum: 0,
|
|
61
|
+
maximum: 100,
|
|
62
|
+
description: 'Battery percentage'
|
|
63
|
+
})),
|
|
64
|
+
signalStrength: Type.Optional(Type.Number({
|
|
65
|
+
minimum: -150,
|
|
66
|
+
maximum: 0,
|
|
67
|
+
description: 'Signal strength in dBm'
|
|
68
|
+
})),
|
|
69
|
+
location: Type.Optional(Type.Object({
|
|
70
|
+
latitude: Type.Number(),
|
|
71
|
+
longitude: Type.Number(),
|
|
72
|
+
altitude: Type.Optional(Type.Number()),
|
|
73
|
+
accuracy: Type.Optional(Type.Number()),
|
|
74
|
+
timestamp: Type.Optional(Type.Number())
|
|
75
|
+
})),
|
|
76
|
+
temperature: Type.Optional(Type.Number()),
|
|
77
|
+
errors: Type.Optional(Type.Array(Type.Object({
|
|
78
|
+
code: Type.String(),
|
|
79
|
+
message: Type.String(),
|
|
80
|
+
timestamp: Type.Number(),
|
|
81
|
+
severity: Type.Union([
|
|
82
|
+
Type.Literal('LOW'),
|
|
83
|
+
Type.Literal('MEDIUM'),
|
|
84
|
+
Type.Literal('HIGH'),
|
|
85
|
+
Type.Literal('CRITICAL')
|
|
86
|
+
])
|
|
87
|
+
}))),
|
|
88
|
+
diagnostics: Type.Optional(Type.Object({
|
|
89
|
+
uptime: Type.Optional(Type.Number({ description: 'Device uptime in seconds' })),
|
|
90
|
+
memoryUsage: Type.Optional(Type.Number({ minimum: 0, maximum: 100 })),
|
|
91
|
+
cpuUsage: Type.Optional(Type.Number({ minimum: 0, maximum: 100 })),
|
|
92
|
+
networkLatency: Type.Optional(Type.Number({ minimum: 0, description: 'ms' }))
|
|
93
|
+
})),
|
|
94
|
+
customState: Type.Optional(Type.Record(Type.String(), Type.Any()))
|
|
95
|
+
}, {
|
|
96
|
+
additionalProperties: true,
|
|
97
|
+
description: 'Device state - extensible structure'
|
|
98
|
+
})
|
|
99
|
+
|
|
100
|
+
// Device Schema
|
|
101
|
+
export const IoTDeviceSchema = Type.Object({
|
|
102
|
+
id: Type.String(),
|
|
103
|
+
context: ContextSchema,
|
|
104
|
+
commands: Type.Record(Type.String(), Type.String(), {
|
|
105
|
+
description: 'Assigned commands rule id mapping'
|
|
106
|
+
}),
|
|
107
|
+
specs: IoTDeviceSpecsSchema,
|
|
108
|
+
state: IoTDeviceStateSchema,
|
|
109
|
+
tags: Type.Optional(Type.Array(Type.String())),
|
|
110
|
+
tested: Type.Boolean(),
|
|
111
|
+
enabled: Type.Boolean(),
|
|
112
|
+
added: ActionRecordSchema,
|
|
113
|
+
updated: Type.Optional(ActionRecordSchema)
|
|
114
|
+
}, { additionalProperties: false })
|
|
115
|
+
|
|
116
|
+
export const IoTDeviceAddSchema = Type.Omit( IoTDeviceSchema, [
|
|
117
|
+
'context',
|
|
118
|
+
'commands', 'state',
|
|
119
|
+
'tested', 'enabled',
|
|
120
|
+
'added', 'updated'
|
|
121
|
+
])
|
|
122
|
+
export const IoTDeviceUpdateSchema = Type.Partial(IoTDeviceAddSchema)
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
// Generate TypeScript types from schemas
|
|
126
|
+
export type IoTDeviceSpecs = Static<typeof IoTDeviceSpecsSchema>
|
|
127
|
+
export type IoTDeviceState = Static<typeof IoTDeviceStateSchema>
|
|
128
|
+
export type IoTDevice = Static<typeof IoTDeviceSchema>
|
|
129
|
+
export type IoTDeviceAdd = Static<typeof IoTDeviceAddSchema>
|
|
130
|
+
export type IoTDeviceUpdate = Static<typeof IoTDeviceUpdateSchema>
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
// Additional utility schemas for IoT management
|
|
134
|
+
export const IoTDeviceCommandStatusSchema = Type.Union([
|
|
135
|
+
Type.Literal('PENDING'),
|
|
136
|
+
Type.Literal('SENT'),
|
|
137
|
+
Type.Literal('ACKNOWLEDGED'),
|
|
138
|
+
Type.Literal('EXECUTED'),
|
|
139
|
+
Type.Literal('FAILED'),
|
|
140
|
+
Type.Literal('TIMEOUT'),
|
|
141
|
+
Type.Literal('CANCELLED')
|
|
142
|
+
])
|
|
143
|
+
export const IoTDeviceCommandSchema = Type.Object({
|
|
144
|
+
deviceId: Type.String(),
|
|
145
|
+
ruleReference: Type.String({ description: 'Rule reference like device.unlock' }),
|
|
146
|
+
parameters: Type.Optional(Type.Record(Type.String(), Type.Any())),
|
|
147
|
+
priority: Type.Union([
|
|
148
|
+
Type.Literal('LOW'),
|
|
149
|
+
Type.Literal('NORMAL'),
|
|
150
|
+
Type.Literal('HIGH'),
|
|
151
|
+
Type.Literal('URGENT')
|
|
152
|
+
]),
|
|
153
|
+
timeout: Type.Optional(Type.Number({
|
|
154
|
+
minimum: 1000,
|
|
155
|
+
maximum: 300000,
|
|
156
|
+
description: 'Command timeout in milliseconds'
|
|
157
|
+
})),
|
|
158
|
+
retryCount: Type.Optional(Type.Number({ minimum: 0, maximum: 5 })),
|
|
159
|
+
scheduledAt: Type.Optional(Type.Number({ description: 'Scheduled execution timestamp' })),
|
|
160
|
+
executedAt: Type.Optional(Type.Number({ description: 'Actual execution timestamp' })),
|
|
161
|
+
status: IoTDeviceCommandStatusSchema,
|
|
162
|
+
response: Type.Optional(Type.Any()),
|
|
163
|
+
error: Type.Optional(Type.String()),
|
|
164
|
+
initiatedBy: Type.String(),
|
|
165
|
+
created: ActionRecordSchema
|
|
166
|
+
})
|
|
167
|
+
|
|
168
|
+
export const IoTDeviceReportSchema = Type.Object({
|
|
169
|
+
deviceId: Type.String(),
|
|
170
|
+
ruleReference: Type.String({ description: 'Rule reference like position.report' }),
|
|
171
|
+
payload: Type.Record(Type.String(), Type.Any()),
|
|
172
|
+
receivedAt: Type.Number({ description: 'Server receipt timestamp' }),
|
|
173
|
+
deviceTimestamp: Type.Optional(Type.Number({ description: 'Device generation timestamp' })),
|
|
174
|
+
topicPath: Type.String(),
|
|
175
|
+
qos: Type.Number({ minimum: 0, maximum: 2 }),
|
|
176
|
+
processed: Type.Boolean(),
|
|
177
|
+
processedAt: Type.Optional(Type.Number()),
|
|
178
|
+
processingErrors: Type.Optional(Type.Array(Type.String()))
|
|
179
|
+
})
|
|
180
|
+
|
|
181
|
+
export const IoTDeviceQuerySchema = Type.Object({
|
|
182
|
+
online: Type.Optional(Type.Boolean()),
|
|
183
|
+
enabled: Type.Optional(Type.Boolean()),
|
|
184
|
+
tested: Type.Optional(Type.Boolean()),
|
|
185
|
+
tags: Type.Optional(Type.Array(Type.String())),
|
|
186
|
+
manufacturer: Type.Optional(Type.String()),
|
|
187
|
+
model: Type.Optional(Type.String()),
|
|
188
|
+
batteryLevel: Type.Optional(Type.Object({
|
|
189
|
+
min: Type.Number({ minimum: 0, maximum: 100 }),
|
|
190
|
+
max: Type.Number({ minimum: 0, maximum: 100 })
|
|
191
|
+
})),
|
|
192
|
+
lastSeenAfter: Type.Optional(Type.Number({ description: 'Timestamp' })),
|
|
193
|
+
lastSeenBefore: Type.Optional(Type.Number({ description: 'Timestamp' })),
|
|
194
|
+
location: Type.Optional(Type.Object({
|
|
195
|
+
center: Type.Object({
|
|
196
|
+
latitude: Type.Number(),
|
|
197
|
+
longitude: Type.Number()
|
|
198
|
+
}),
|
|
199
|
+
radius: Type.Number({ minimum: 0.1, description: 'Radius in kilometers' })
|
|
200
|
+
})),
|
|
201
|
+
limit: Type.Optional(Type.Number({ minimum: 1, maximum: 1000 })),
|
|
202
|
+
offset: Type.Optional(Type.Number({ minimum: 0 }))
|
|
203
|
+
})
|
|
204
|
+
|
|
205
|
+
export const IoTDeviceStatsSchema = Type.Object({
|
|
206
|
+
total: Type.Number({ minimum: 0 }),
|
|
207
|
+
online: Type.Number({ minimum: 0 }),
|
|
208
|
+
offline: Type.Number({ minimum: 0 }),
|
|
209
|
+
enabled: Type.Number({ minimum: 0 }),
|
|
210
|
+
disabled: Type.Number({ minimum: 0 }),
|
|
211
|
+
tested: Type.Number({ minimum: 0 }),
|
|
212
|
+
untested: Type.Number({ minimum: 0 }),
|
|
213
|
+
byManufacturer: Type.Optional(Type.Record(Type.String(), Type.Number({ minimum: 0 }))),
|
|
214
|
+
byModel: Type.Optional(Type.Record(Type.String(), Type.Number({ minimum: 0 }))),
|
|
215
|
+
averageBatteryLevel: Type.Optional(Type.Number({ minimum: 0, maximum: 100 })),
|
|
216
|
+
averageSignalStrength: Type.Optional(Type.Number()),
|
|
217
|
+
recentlyAdded: Type.Number({ minimum: 0, description: 'Added in last 24 hours' }),
|
|
218
|
+
lastActivity: Type.Optional(Type.Number({ description: 'Last device activity timestamp' }))
|
|
219
|
+
})
|
|
220
|
+
|
|
221
|
+
export type IoTDeviceCommandStatus = Static<typeof IoTDeviceCommandStatusSchema>
|
|
222
|
+
export type IoTDeviceCommand = Static<typeof IoTDeviceCommandSchema>
|
|
223
|
+
export type IoTDeviceReport = Static<typeof IoTDeviceReportSchema>
|
|
224
|
+
export type IoTDeviceQuery = Static<typeof IoTDeviceQuerySchema>
|
|
225
|
+
export type IoTDeviceStats = Static<typeof IoTDeviceStatsSchema>
|
|
226
|
+
|
|
227
|
+
|
|
228
|
+
// ============================================================================
|
|
229
|
+
// REQUEST VALIDATION SCHEMAS
|
|
230
|
+
// ============================================================================
|
|
231
|
+
// The sufix `RVS` stands for `Request Validation Schema` to keep it short
|
|
232
|
+
|
|
233
|
+
export const IoTDeviceAddRVS = {
|
|
234
|
+
body: IoTDeviceAddSchema,
|
|
235
|
+
response: Type.Intersect([
|
|
236
|
+
APIResponseBaseSchema,
|
|
237
|
+
APIResponseDataSchemaFactory({
|
|
238
|
+
id: Type.String()
|
|
239
|
+
})
|
|
240
|
+
])
|
|
241
|
+
}
|
|
242
|
+
export type IoTDeviceAddValidation = {
|
|
243
|
+
body: Static<typeof IoTDeviceAddRVS.body>
|
|
244
|
+
response: Static<typeof IoTDeviceAddRVS.response>
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
export const IoTDeviceUpdateRVS = {
|
|
248
|
+
params: Type.Object({ id: Type.String() }),
|
|
249
|
+
body: IoTDeviceUpdateSchema,
|
|
250
|
+
response: Type.Intersect([
|
|
251
|
+
APIResponseBaseSchema,
|
|
252
|
+
APIResponseDataSchemaFactory({
|
|
253
|
+
device: IoTDeviceSchema
|
|
254
|
+
})
|
|
255
|
+
])
|
|
256
|
+
}
|
|
257
|
+
export type IoTDeviceUpdateValidation = {
|
|
258
|
+
params: Static<typeof IoTDeviceUpdateRVS.params>
|
|
259
|
+
body: Static<typeof IoTDeviceUpdateRVS.body>
|
|
260
|
+
response: Static<typeof IoTDeviceUpdateRVS.response>
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
export const IoTDeviceRetrieveRVS = {
|
|
264
|
+
params: Type.Object({ id: Type.String() }),
|
|
265
|
+
response: Type.Intersect([
|
|
266
|
+
APIResponseBaseSchema,
|
|
267
|
+
APIResponseDataSchemaFactory({
|
|
268
|
+
device: IoTDeviceSchema
|
|
269
|
+
})
|
|
270
|
+
])
|
|
271
|
+
}
|
|
272
|
+
export type IoTDeviceRetrieveValidation = {
|
|
273
|
+
params: Static<typeof IoTDeviceRetrieveRVS.params>
|
|
274
|
+
response: Static<typeof IoTDeviceRetrieveRVS.response>
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
export const IoTDeviceStatusRVS = {
|
|
278
|
+
params: Type.Object({
|
|
279
|
+
id: Type.String(),
|
|
280
|
+
status: Type.String()
|
|
281
|
+
}),
|
|
282
|
+
response: Type.Intersect([
|
|
283
|
+
APIResponseBaseSchema,
|
|
284
|
+
APIResponseDataSchemaFactory({
|
|
285
|
+
device: IoTDeviceSchema
|
|
286
|
+
})
|
|
287
|
+
])
|
|
288
|
+
}
|
|
289
|
+
export type IoTDeviceStatusValidation = {
|
|
290
|
+
params: Static<typeof IoTDeviceStatusRVS.params>
|
|
291
|
+
response: Static<typeof IoTDeviceStatusRVS.response>
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
export const IoTDeviceListRVS = {
|
|
295
|
+
querystring: FetchByQueryRequestSchema,
|
|
296
|
+
response: Type.Intersect([
|
|
297
|
+
APIResponseBaseSchema,
|
|
298
|
+
APIResponseDataSchemaFactory({
|
|
299
|
+
devices: Type.Array(IoTDeviceSchema)
|
|
300
|
+
})
|
|
301
|
+
])
|
|
302
|
+
}
|
|
303
|
+
export type IoTDeviceListValidation = {
|
|
304
|
+
querystring: Static<typeof IoTDeviceListRVS.querystring>
|
|
305
|
+
response: Static<typeof IoTDeviceListRVS.response>
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
export const IoTDeviceFindRVS = {
|
|
309
|
+
querystring: Type.Intersect([
|
|
310
|
+
FetchByQueryRequestSchema,
|
|
311
|
+
Type.Object({
|
|
312
|
+
query: Type.String()
|
|
313
|
+
})
|
|
314
|
+
]),
|
|
315
|
+
response: Type.Intersect([
|
|
316
|
+
APIResponseBaseSchema,
|
|
317
|
+
APIResponseDataSchemaFactory({
|
|
318
|
+
devices: Type.Array(IoTDeviceSchema)
|
|
319
|
+
})
|
|
320
|
+
])
|
|
321
|
+
}
|
|
322
|
+
export type IoTDeviceFindValidation = {
|
|
323
|
+
querystring: Static<typeof IoTDeviceFindRVS.querystring>
|
|
324
|
+
response: Static<typeof IoTDeviceFindRVS.response>
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
export const IoTDeviceRemoveRVS = {
|
|
328
|
+
params: Type.Object({ id: Type.String() }),
|
|
329
|
+
response: APIResponseBaseSchema
|
|
330
|
+
}
|
|
331
|
+
export type IoTDeviceRemoveValidation = {
|
|
332
|
+
params: Static<typeof IoTDeviceRemoveRVS.params>
|
|
333
|
+
response: Static<typeof IoTDeviceRemoveRVS.response>
|
|
334
|
+
}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { Type, Static } from '@sinclair/typebox'
|
|
2
|
+
import {
|
|
3
|
+
SPProfileSchema,
|
|
4
|
+
SPProfileUpdateSchema
|
|
5
|
+
} from '../context'
|
|
6
|
+
|
|
7
|
+
export const IoTSPTypeSchema = Type.Union([
|
|
8
|
+
// TRACKING & MONITORING
|
|
9
|
+
Type.Literal('ASSET_TRACKING'), // GPS tracking devices/platforms
|
|
10
|
+
Type.Literal('FLEET_TRACKING'), // Vehicle/fleet monitoring
|
|
11
|
+
Type.Literal('CARGO_MONITORING'), // Shipment condition monitoring
|
|
12
|
+
Type.Literal('COLD_CHAIN'), // Temperature/humidity monitoring
|
|
13
|
+
Type.Literal('LOCATION_SERVICES'), // Real-time location tracking
|
|
14
|
+
|
|
15
|
+
// TELEMATICS
|
|
16
|
+
Type.Literal('TELEMATICS'), // Vehicle telematics systems
|
|
17
|
+
Type.Literal('DRIVER_BEHAVIOR'), // Driver monitoring/scoring
|
|
18
|
+
Type.Literal('VEHICLE_DIAGNOSTICS'), // Engine/vehicle health monitoring
|
|
19
|
+
Type.Literal('FUEL_MONITORING'), // Fuel consumption tracking
|
|
20
|
+
|
|
21
|
+
// SENSORS & CONDITIONS
|
|
22
|
+
Type.Literal('ENVIRONMENTAL_SENSORS'), // Temperature, humidity, pressure
|
|
23
|
+
Type.Literal('SECURITY_SENSORS'), // Door, motion, tampering detection
|
|
24
|
+
Type.Literal('SHOCK_VIBRATION'), // Impact/handling monitoring
|
|
25
|
+
Type.Literal('LIGHT_EXPOSURE'), // Light/UV monitoring
|
|
26
|
+
|
|
27
|
+
// CONNECTIVITY
|
|
28
|
+
Type.Literal('CONNECTIVITY_PROVIDER'), // IoT network connectivity (cellular, LoRaWAN, etc.)
|
|
29
|
+
Type.Literal('SATELLITE_IOT'), // Satellite-based IoT
|
|
30
|
+
Type.Literal('EDGE_COMPUTING'), // Edge processing devices
|
|
31
|
+
|
|
32
|
+
// PLATFORMS & SOFTWARE
|
|
33
|
+
Type.Literal('IOT_PLATFORM'), // IoT data platform/dashboard
|
|
34
|
+
Type.Literal('ANALYTICS'), // IoT data analytics
|
|
35
|
+
Type.Literal('INTEGRATION'), // IoT system integration
|
|
36
|
+
|
|
37
|
+
// SPECIALIZED
|
|
38
|
+
Type.Literal('WAREHOUSE_IOT'), // Warehouse automation sensors
|
|
39
|
+
Type.Literal('YARD_MANAGEMENT'), // Yard/dock IoT systems
|
|
40
|
+
Type.Literal('SMART_LOCKS'), // Electronic locks/seals
|
|
41
|
+
Type.Literal('RFID'), // RFID tracking systems
|
|
42
|
+
Type.Literal('BARCODE_SCANNING'), // Barcode/QR scanning systems
|
|
43
|
+
|
|
44
|
+
// GENERAL
|
|
45
|
+
Type.Literal('HARDWARE_PROVIDER'), // IoT hardware manufacturer
|
|
46
|
+
Type.Literal('SOFTWARE_PROVIDER'), // IoT software/SaaS
|
|
47
|
+
Type.Literal('FULL_SOLUTION'), // End-to-end IoT solution
|
|
48
|
+
Type.Literal('OTHER')
|
|
49
|
+
])
|
|
50
|
+
|
|
51
|
+
// LSP Schema
|
|
52
|
+
export const IoTSPSchema = Type.Composite([
|
|
53
|
+
SPProfileSchema,
|
|
54
|
+
Type.Object({
|
|
55
|
+
type: IoTSPTypeSchema
|
|
56
|
+
})
|
|
57
|
+
])
|
|
58
|
+
export const IoTSPUpdateSchema = Type.Composite([
|
|
59
|
+
SPProfileUpdateSchema,
|
|
60
|
+
Type.Object({
|
|
61
|
+
type: Type.Optional(IoTSPTypeSchema)
|
|
62
|
+
})
|
|
63
|
+
])
|
|
64
|
+
|
|
65
|
+
// Service Provider Schema
|
|
66
|
+
export const IoTSPServiceContextSchema = Type.Object({
|
|
67
|
+
providerType: IoTSPTypeSchema,
|
|
68
|
+
type: Type.Union([
|
|
69
|
+
// ...CarrierTypeSchema.anyOf,
|
|
70
|
+
// ...HubTypeSchema.anyOf,
|
|
71
|
+
// ...WarehouseTypeSchema.anyOf,
|
|
72
|
+
// ...TerminalTypeSchema.anyOf
|
|
73
|
+
]),
|
|
74
|
+
id: Type.String(),
|
|
75
|
+
description: Type.Optional(Type.String({ minLength: 10, maxLength: 250 }))
|
|
76
|
+
})
|
|
77
|
+
|
|
78
|
+
export const IoTSPOperatorRoleSchema = Type.Union([
|
|
79
|
+
Type.Literal('ADMIN'),
|
|
80
|
+
Type.Literal('READONLY'),
|
|
81
|
+
Type.Literal('MANAGER'),
|
|
82
|
+
Type.Literal('SUPERVISOR'),
|
|
83
|
+
Type.Literal('TECHNICIAN'),
|
|
84
|
+
Type.Literal('DEVELOPER')
|
|
85
|
+
])
|
|
86
|
+
|
|
87
|
+
export type IoTSP = Static<typeof IoTSPSchema>
|
|
88
|
+
export type IoTSPType = Static<typeof IoTSPTypeSchema>
|
|
89
|
+
export type IoTSPUpdate = Static<typeof IoTSPUpdateSchema>
|
|
90
|
+
export type IoTSPServiceContext = Static<typeof IoTSPServiceContextSchema>
|
|
91
|
+
export type IoTSPOperatorRole = Static<typeof IoTSPOperatorRoleSchema>
|
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
import { Type, Static } from '@sinclair/typebox'
|
|
2
|
+
import { ActionRecordSchema } from '../time'
|
|
3
|
+
import { ContextSchema } from '../context'
|
|
4
|
+
import { APIResponseBaseSchema, APIResponseDataSchemaFactory, FetchByQueryRequestSchema } from '../api'
|
|
5
|
+
import { ConnectorSchema } from '../workspace/connector'
|
|
6
|
+
|
|
7
|
+
// Param Schema
|
|
8
|
+
export const IoTParamSchema = Type.Object({
|
|
9
|
+
type: Type.Union([
|
|
10
|
+
Type.Literal('boolean'),
|
|
11
|
+
Type.Literal('string'),
|
|
12
|
+
Type.Literal('number')
|
|
13
|
+
]),
|
|
14
|
+
unit: Type.String({ maxLength: 20 }),
|
|
15
|
+
description: Type.Optional(Type.String({ maxLength: 200 })),
|
|
16
|
+
sources: Type.Optional(Type.Array(Type.String()))
|
|
17
|
+
})
|
|
18
|
+
export const IoTRuleTypeSchema = Type.Union([
|
|
19
|
+
Type.Literal('REPORT'),
|
|
20
|
+
Type.Literal('COMMAND')
|
|
21
|
+
])
|
|
22
|
+
|
|
23
|
+
// Rule Schema
|
|
24
|
+
export const IoTRuleSchema = Type.Object({
|
|
25
|
+
context: ContextSchema,
|
|
26
|
+
type: IoTRuleTypeSchema,
|
|
27
|
+
/**
|
|
28
|
+
* Specific `reference` of the rule that can be use
|
|
29
|
+
* to identify a given report from devices or to initiate
|
|
30
|
+
* a single or composed command(s) to a device.
|
|
31
|
+
*
|
|
32
|
+
* For a payload:
|
|
33
|
+
* - `position.report` to receive device's position report
|
|
34
|
+
* - `network.report` to receive device's network status info
|
|
35
|
+
*
|
|
36
|
+
* For a command:
|
|
37
|
+
* - `network.config`
|
|
38
|
+
* - `device.unlock` to initiate a composed command to unlock *helmet*, *ecu*, enable *wireless charge*, ...
|
|
39
|
+
*
|
|
40
|
+
* NOTE:
|
|
41
|
+
* The validation only match strings like:
|
|
42
|
+
*
|
|
43
|
+
* ✅ realtime-operation.report
|
|
44
|
+
* ✅ device.unlock
|
|
45
|
+
* ✅ position_tracking-v2.beta
|
|
46
|
+
* ✅ ABC123
|
|
47
|
+
*
|
|
48
|
+
* And reject strings with other characters:
|
|
49
|
+
*
|
|
50
|
+
* ❌ real time (space)
|
|
51
|
+
* ❌ report@v1 (@ symbol)
|
|
52
|
+
* ❌ tracking/route (/ symbol)
|
|
53
|
+
*/
|
|
54
|
+
reference: Type.String({
|
|
55
|
+
minLength: 1,
|
|
56
|
+
maxLength: 100,
|
|
57
|
+
pattern: '^[a-zA-Z0-9._-]+$',
|
|
58
|
+
description: 'Rule reference for identification (e.g., position.report, device.unlock)'
|
|
59
|
+
}),
|
|
60
|
+
description: Type.String({ maxLength: 1000 }),
|
|
61
|
+
connectors: Type.Array(Type.String(), {
|
|
62
|
+
description: 'List of connector IDs'
|
|
63
|
+
}),
|
|
64
|
+
tags: Type.Optional(Type.Array(Type.String())),
|
|
65
|
+
struct: Type.String(),
|
|
66
|
+
schema: Type.Record(Type.String(), IoTParamSchema, {
|
|
67
|
+
description: 'Parameter schema definition'
|
|
68
|
+
}),
|
|
69
|
+
tested: Type.Boolean(),
|
|
70
|
+
enabled: Type.Boolean(),
|
|
71
|
+
added: ActionRecordSchema,
|
|
72
|
+
updated: Type.Optional(ActionRecordSchema)
|
|
73
|
+
}, { additionalProperties: false })
|
|
74
|
+
|
|
75
|
+
export const IoTRuleAddSchema = Type.Omit( IoTRuleSchema, ['context', 'connectors', 'tested', 'enabled', 'added', 'updated'])
|
|
76
|
+
export const IoTRuleUpdateSchema = Type.Partial( IoTRuleAddSchema )
|
|
77
|
+
|
|
78
|
+
// Generate TypeScript types from schemas
|
|
79
|
+
export type IoTParam = Static<typeof IoTParamSchema>
|
|
80
|
+
export type IoTRule = Static<typeof IoTRuleSchema>
|
|
81
|
+
export type IoTRuleType = Static<typeof IoTRuleTypeSchema>
|
|
82
|
+
export type IoTRuleAdd = Static<typeof IoTRuleAddSchema>
|
|
83
|
+
export type IoTRuleUpdate = Static<typeof IoTRuleUpdateSchema>
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
// ============================================================================
|
|
87
|
+
// REQUEST VALIDATION SCHEMAS
|
|
88
|
+
// ============================================================================
|
|
89
|
+
// The sufix `RVS` stands for `Request Validation Schema` to keep it short
|
|
90
|
+
|
|
91
|
+
export const IoTRuleAddRVS = {
|
|
92
|
+
body: IoTRuleAddSchema,
|
|
93
|
+
response: Type.Intersect([
|
|
94
|
+
APIResponseBaseSchema,
|
|
95
|
+
APIResponseDataSchemaFactory({
|
|
96
|
+
reference: Type.String()
|
|
97
|
+
})
|
|
98
|
+
])
|
|
99
|
+
}
|
|
100
|
+
export type IoTRuleAddValidation = {
|
|
101
|
+
body: Static<typeof IoTRuleAddRVS.body>
|
|
102
|
+
response: Static<typeof IoTRuleAddRVS.response>
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
export const IoTRuleUpdateRVS = {
|
|
106
|
+
params: Type.Object({ reference: Type.String() }),
|
|
107
|
+
body: IoTRuleUpdateSchema,
|
|
108
|
+
response: Type.Intersect([
|
|
109
|
+
APIResponseBaseSchema,
|
|
110
|
+
APIResponseDataSchemaFactory({
|
|
111
|
+
rule: IoTRuleSchema
|
|
112
|
+
})
|
|
113
|
+
])
|
|
114
|
+
}
|
|
115
|
+
export type IoTRuleUpdateValidation = {
|
|
116
|
+
params: Static<typeof IoTRuleUpdateRVS.params>
|
|
117
|
+
body: Static<typeof IoTRuleUpdateRVS.body>
|
|
118
|
+
response: Static<typeof IoTRuleUpdateRVS.response>
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
export const IoTRuleRetrieveRVS = {
|
|
122
|
+
params: Type.Object({ reference: Type.String() }),
|
|
123
|
+
response: Type.Intersect([
|
|
124
|
+
APIResponseBaseSchema,
|
|
125
|
+
APIResponseDataSchemaFactory({
|
|
126
|
+
rule: IoTRuleSchema
|
|
127
|
+
})
|
|
128
|
+
])
|
|
129
|
+
}
|
|
130
|
+
export type IoTRuleRetrieveValidation = {
|
|
131
|
+
params: Static<typeof IoTRuleRetrieveRVS.params>
|
|
132
|
+
response: Static<typeof IoTRuleRetrieveRVS.response>
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
export const IoTRuleStatusRVS = {
|
|
136
|
+
params: Type.Object({
|
|
137
|
+
reference: Type.String(),
|
|
138
|
+
status: Type.String()
|
|
139
|
+
}),
|
|
140
|
+
response: Type.Intersect([
|
|
141
|
+
APIResponseBaseSchema,
|
|
142
|
+
APIResponseDataSchemaFactory({
|
|
143
|
+
rule: IoTRuleSchema
|
|
144
|
+
})
|
|
145
|
+
])
|
|
146
|
+
}
|
|
147
|
+
export type IoTRuleStatusValidation = {
|
|
148
|
+
params: Static<typeof IoTRuleStatusRVS.params>
|
|
149
|
+
response: Static<typeof IoTRuleStatusRVS.response>
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
export const IoTRuleListRVS = {
|
|
153
|
+
querystring: Type.Intersect([
|
|
154
|
+
FetchByQueryRequestSchema,
|
|
155
|
+
Type.Object({
|
|
156
|
+
type: IoTRuleTypeSchema
|
|
157
|
+
})
|
|
158
|
+
]),
|
|
159
|
+
response: Type.Intersect([
|
|
160
|
+
APIResponseBaseSchema,
|
|
161
|
+
APIResponseDataSchemaFactory({
|
|
162
|
+
rules: Type.Array(IoTRuleSchema)
|
|
163
|
+
})
|
|
164
|
+
])
|
|
165
|
+
}
|
|
166
|
+
export type IoTRuleListValidation = {
|
|
167
|
+
querystring: Static<typeof IoTRuleListRVS.querystring>
|
|
168
|
+
response: Static<typeof IoTRuleListRVS.response>
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
export const IoTRuleFindRVS = {
|
|
172
|
+
querystring: Type.Intersect([
|
|
173
|
+
FetchByQueryRequestSchema,
|
|
174
|
+
Type.Object({
|
|
175
|
+
query: Type.String()
|
|
176
|
+
})
|
|
177
|
+
]),
|
|
178
|
+
response: Type.Intersect([
|
|
179
|
+
APIResponseBaseSchema,
|
|
180
|
+
APIResponseDataSchemaFactory({
|
|
181
|
+
rules: Type.Array(IoTRuleSchema)
|
|
182
|
+
})
|
|
183
|
+
])
|
|
184
|
+
}
|
|
185
|
+
export type IoTRuleFindValidation = {
|
|
186
|
+
querystring: Static<typeof IoTRuleFindRVS.querystring>
|
|
187
|
+
response: Static<typeof IoTRuleFindRVS.response>
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
export const IoTRuleRemoveRVS = {
|
|
191
|
+
params: Type.Object({ reference: Type.String() }),
|
|
192
|
+
response: APIResponseBaseSchema
|
|
193
|
+
}
|
|
194
|
+
export type IoTRuleRemoveValidation = {
|
|
195
|
+
params: Static<typeof IoTRuleRemoveRVS.params>
|
|
196
|
+
response: Static<typeof IoTRuleRemoveRVS.response>
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
export const IoTRuleConnectorsRVS = {
|
|
200
|
+
params: Type.Object({ reference: Type.String() }),
|
|
201
|
+
response: Type.Intersect([
|
|
202
|
+
APIResponseBaseSchema,
|
|
203
|
+
APIResponseDataSchemaFactory({
|
|
204
|
+
connectors: Type.Array(ConnectorSchema)
|
|
205
|
+
})
|
|
206
|
+
])
|
|
207
|
+
}
|
|
208
|
+
export type IoTRuleConnectorsValidation = {
|
|
209
|
+
params: Static<typeof IoTRuleConnectorsRVS.params>
|
|
210
|
+
response: Static<typeof IoTRuleConnectorsRVS.response>
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
export const IoTRuleXssignConnectorRVS = {
|
|
214
|
+
params: Type.Object({ reference: Type.String() }),
|
|
215
|
+
body: Type.Object({ cid: Type.String() }),
|
|
216
|
+
response: Type.Intersect([
|
|
217
|
+
APIResponseBaseSchema,
|
|
218
|
+
APIResponseDataSchemaFactory({
|
|
219
|
+
rule: IoTRuleSchema
|
|
220
|
+
})
|
|
221
|
+
])
|
|
222
|
+
}
|
|
223
|
+
export type IoTRuleXssignConnectorValidation = {
|
|
224
|
+
params: Static<typeof IoTRuleXssignConnectorRVS.params>
|
|
225
|
+
body: Static<typeof IoTRuleXssignConnectorRVS.body>
|
|
226
|
+
response: Static<typeof IoTRuleXssignConnectorRVS.response>
|
|
227
|
+
}
|