@de./sdk 1.0.4 → 2.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/allend/Access.d.ts +39 -3
- package/dist/allend/Access.js +147 -114
- package/dist/allend/Access.js.map +1 -1
- package/dist/allend/Agent/consolidation.d.ts +16 -0
- package/dist/allend/Agent/consolidation.js +38 -0
- package/dist/allend/Agent/consolidation.js.map +1 -0
- package/dist/allend/Agent/delivery.d.ts +11 -0
- package/dist/allend/Agent/delivery.js +43 -0
- package/dist/allend/Agent/delivery.js.map +1 -0
- package/dist/allend/Agent/dispatch.d.ts +8 -0
- package/dist/allend/Agent/dispatch.js +24 -0
- package/dist/allend/Agent/dispatch.js.map +1 -0
- package/dist/allend/Agent/index.d.ts +49 -0
- package/dist/allend/Agent/index.js +74 -0
- package/dist/allend/Agent/index.js.map +1 -0
- package/dist/allend/Agent/navigation.d.ts +8 -0
- package/dist/allend/Agent/navigation.js +25 -0
- package/dist/allend/Agent/navigation.js.map +1 -0
- package/dist/allend/Agent/origin.d.ts +9 -0
- package/dist/allend/Agent/origin.js +31 -0
- package/dist/allend/Agent/origin.js.map +1 -0
- package/dist/allend/Agent/reallocation.d.ts +7 -0
- package/dist/allend/Agent/reallocation.js +17 -0
- package/dist/allend/Agent/reallocation.js.map +1 -0
- package/dist/allend/Agent/realtime.d.ts +36 -0
- package/dist/allend/Agent/realtime.js +111 -0
- package/dist/allend/Agent/realtime.js.map +1 -0
- package/dist/allend/Agent/rides.d.ts +12 -0
- package/dist/allend/Agent/rides.js +51 -0
- package/dist/allend/Agent/rides.js.map +1 -0
- package/dist/allend/Agent/shipping.d.ts +11 -0
- package/dist/allend/Agent/shipping.js +43 -0
- package/dist/allend/Agent/shipping.js.map +1 -0
- package/dist/allend/CSP/analytics.d.ts +12 -0
- package/dist/allend/CSP/analytics.js +51 -0
- package/dist/allend/CSP/analytics.js.map +1 -0
- package/dist/allend/CSP/index.d.ts +25 -0
- package/dist/allend/CSP/index.js +43 -0
- package/dist/allend/CSP/index.js.map +1 -0
- package/dist/allend/CSP/inventory.d.ts +16 -0
- package/dist/allend/CSP/inventory.js +78 -0
- package/dist/allend/CSP/inventory.js.map +1 -0
- package/dist/allend/CSP/orders.d.ts +19 -0
- package/dist/allend/CSP/orders.js +97 -0
- package/dist/allend/CSP/orders.js.map +1 -0
- package/dist/allend/CSP/webhooks.d.ts +13 -0
- package/dist/allend/CSP/webhooks.js +56 -0
- package/dist/allend/CSP/webhooks.js.map +1 -0
- package/dist/allend/Customer/index.d.ts +27 -0
- package/dist/allend/Customer/index.js +39 -0
- package/dist/allend/Customer/index.js.map +1 -0
- package/dist/allend/Customer/intents.d.ts +12 -0
- package/dist/allend/Customer/intents.js +55 -0
- package/dist/allend/Customer/intents.js.map +1 -0
- package/dist/allend/Customer/orders.d.ts +11 -0
- package/dist/allend/Customer/orders.js +43 -0
- package/dist/allend/Customer/orders.js.map +1 -0
- package/dist/allend/Customer/rides.d.ts +12 -0
- package/dist/allend/Customer/rides.js +50 -0
- package/dist/allend/Customer/rides.js.map +1 -0
- package/dist/allend/DEV/developers.d.ts +11 -0
- package/dist/allend/DEV/developers.js +35 -0
- package/dist/allend/DEV/developers.js.map +1 -0
- package/dist/allend/DEV/index.d.ts +19 -0
- package/dist/allend/DEV/index.js +37 -0
- package/dist/allend/DEV/index.js.map +1 -0
- package/dist/allend/IoTClient.js +29 -35
- package/dist/allend/IoTClient.js.map +1 -1
- package/dist/allend/IoTSP/backend.d.ts +29 -0
- package/dist/allend/IoTSP/backend.js +75 -0
- package/dist/allend/IoTSP/backend.js.map +1 -0
- package/dist/allend/IoTSP/devices.d.ts +14 -0
- package/dist/allend/IoTSP/devices.js +61 -0
- package/dist/allend/IoTSP/devices.js.map +1 -0
- package/dist/allend/IoTSP/index.d.ts +28 -0
- package/dist/allend/IoTSP/index.js +84 -0
- package/dist/allend/IoTSP/index.js.map +1 -0
- package/dist/allend/IoTSP/rules.d.ts +17 -0
- package/dist/allend/IoTSP/rules.js +81 -0
- package/dist/allend/IoTSP/rules.js.map +1 -0
- package/dist/allend/IoTSP/topics.d.ts +17 -0
- package/dist/allend/IoTSP/topics.js +81 -0
- package/dist/allend/IoTSP/topics.js.map +1 -0
- package/dist/allend/LSP/agents.d.ts +20 -0
- package/dist/allend/LSP/agents.js +89 -0
- package/dist/allend/LSP/agents.js.map +1 -0
- package/dist/allend/LSP/carriers.d.ts +54 -0
- package/dist/allend/LSP/carriers.js +315 -0
- package/dist/allend/LSP/carriers.js.map +1 -0
- package/dist/allend/LSP/coverage.d.ts +44 -0
- package/dist/allend/LSP/coverage.js +135 -0
- package/dist/allend/LSP/coverage.js.map +1 -0
- package/dist/allend/LSP/fleets.d.ts +66 -0
- package/dist/allend/LSP/fleets.js +381 -0
- package/dist/allend/LSP/fleets.js.map +1 -0
- package/dist/allend/LSP/hubs.d.ts +39 -0
- package/dist/allend/LSP/hubs.js +186 -0
- package/dist/allend/LSP/hubs.js.map +1 -0
- package/dist/allend/LSP/index.d.ts +37 -0
- package/dist/allend/LSP/index.js +55 -0
- package/dist/allend/LSP/index.js.map +1 -0
- package/dist/allend/LSP/inventory.d.ts +13 -0
- package/dist/allend/LSP/inventory.js +56 -0
- package/dist/allend/LSP/inventory.js.map +1 -0
- package/dist/allend/LSP/operations.d.ts +47 -0
- package/dist/allend/LSP/operations.js +156 -0
- package/dist/allend/LSP/operations.js.map +1 -0
- package/dist/allend/LSP/orders.d.ts +69 -0
- package/dist/allend/LSP/orders.js +303 -0
- package/dist/allend/LSP/orders.js.map +1 -0
- package/dist/allend/LSP/pods.d.ts +26 -0
- package/dist/allend/LSP/pods.js +137 -0
- package/dist/allend/LSP/pods.js.map +1 -0
- package/dist/allend/LSP/pricing.d.ts +35 -0
- package/dist/allend/LSP/pricing.js +151 -0
- package/dist/allend/LSP/pricing.js.map +1 -0
- package/dist/allend/LSP/psl.d.ts +15 -0
- package/dist/allend/LSP/psl.js +68 -0
- package/dist/allend/LSP/psl.js.map +1 -0
- package/dist/allend/LSP/warehouses.d.ts +23 -0
- package/dist/allend/LSP/warehouses.js +94 -0
- package/dist/allend/LSP/warehouses.js.map +1 -0
- package/dist/allend/MSI/Controls.d.ts +9 -5
- package/dist/allend/MSI/Controls.js +269 -297
- package/dist/allend/MSI/Controls.js.map +1 -1
- package/dist/allend/MSI/Handles.d.ts +5 -4
- package/dist/allend/MSI/Handles.js +136 -233
- package/dist/allend/MSI/Handles.js.map +1 -1
- package/dist/allend/MSI/Plugins.d.ts +2 -2
- package/dist/allend/MSI/Plugins.js +12 -15
- package/dist/allend/MSI/Plugins.js.map +1 -1
- package/dist/allend/MSI/index.d.ts +4 -3
- package/dist/allend/MSI/index.js +123 -87
- package/dist/allend/MSI/index.js.map +1 -1
- package/dist/allend/MSI/native.d.ts +32 -0
- package/dist/allend/MSI/native.js +246 -0
- package/dist/allend/MSI/native.js.map +1 -0
- package/dist/allend/MSI/token.d.ts +12 -0
- package/dist/allend/MSI/token.js +21 -0
- package/dist/allend/MSI/token.js.map +1 -0
- package/dist/allend/OTPAuth/index.d.ts +77 -0
- package/dist/allend/OTPAuth/index.js +69 -0
- package/dist/allend/OTPAuth/index.js.map +1 -0
- package/dist/allend/Pipelines/analytics.d.ts +8 -0
- package/dist/allend/Pipelines/analytics.js +24 -0
- package/dist/allend/Pipelines/analytics.js.map +1 -0
- package/dist/allend/Pipelines/escalations.d.ts +8 -0
- package/dist/allend/Pipelines/escalations.js +25 -0
- package/dist/allend/Pipelines/escalations.js.map +1 -0
- package/dist/allend/Pipelines/executions.d.ts +11 -0
- package/dist/allend/Pipelines/executions.js +44 -0
- package/dist/allend/Pipelines/executions.js.map +1 -0
- package/dist/allend/Pipelines/index.d.ts +42 -0
- package/dist/allend/Pipelines/index.js +88 -0
- package/dist/allend/Pipelines/index.js.map +1 -0
- package/dist/allend/Pipelines/interventions.d.ts +8 -0
- package/dist/allend/Pipelines/interventions.js +25 -0
- package/dist/allend/Pipelines/interventions.js.map +1 -0
- package/dist/allend/Pipelines/monitor.d.ts +9 -0
- package/dist/allend/Pipelines/monitor.js +30 -0
- package/dist/allend/Pipelines/monitor.js.map +1 -0
- package/dist/allend/Pipelines/queries.d.ts +8 -0
- package/dist/allend/Pipelines/queries.js +25 -0
- package/dist/allend/Pipelines/queries.js.map +1 -0
- package/dist/allend/Pipelines/templates.d.ts +11 -0
- package/dist/allend/Pipelines/templates.js +46 -0
- package/dist/allend/Pipelines/templates.js.map +1 -0
- package/dist/allend/Pipelines/utils.d.ts +0 -0
- package/dist/allend/Pipelines/utils.js +2 -0
- package/dist/allend/Pipelines/utils.js.map +1 -0
- package/dist/allend/Pipelines/webhooks.d.ts +9 -0
- package/dist/allend/Pipelines/webhooks.js +35 -0
- package/dist/allend/Pipelines/webhooks.js.map +1 -0
- package/dist/allend/Pipelines/workers.d.ts +11 -0
- package/dist/allend/Pipelines/workers.js +45 -0
- package/dist/allend/Pipelines/workers.js.map +1 -0
- package/dist/allend/Queries/capacity.d.ts +11 -0
- package/dist/allend/Queries/capacity.js +44 -0
- package/dist/allend/Queries/capacity.js.map +1 -0
- package/dist/allend/Queries/discovery.d.ts +11 -0
- package/dist/allend/Queries/discovery.js +45 -0
- package/dist/allend/Queries/discovery.js.map +1 -0
- package/dist/allend/Queries/index.d.ts +27 -0
- package/dist/allend/Queries/index.js +40 -0
- package/dist/allend/Queries/index.js.map +1 -0
- package/dist/allend/Queries/matching.d.ts +7 -0
- package/dist/allend/Queries/matching.js +18 -0
- package/dist/allend/Queries/matching.js.map +1 -0
- package/dist/allend/Queries/performance.d.ts +9 -0
- package/dist/allend/Queries/performance.js +31 -0
- package/dist/allend/Queries/performance.js.map +1 -0
- package/dist/allend/Queries/pricing.d.ts +11 -0
- package/dist/allend/Queries/pricing.js +43 -0
- package/dist/allend/Queries/pricing.js.map +1 -0
- package/dist/allend/{DClient/Event.d.ts → Realtime/index.d.ts} +2 -6
- package/dist/allend/Realtime/index.js +62 -0
- package/dist/allend/Realtime/index.js.map +1 -0
- package/dist/allend/Shared/account.d.ts +10 -0
- package/dist/allend/Shared/account.js +22 -0
- package/dist/allend/Shared/account.js.map +1 -0
- package/dist/allend/Shared/buckets.d.ts +21 -0
- package/dist/allend/Shared/buckets.js +95 -0
- package/dist/allend/Shared/buckets.js.map +1 -0
- package/dist/allend/Shared/context.d.ts +14 -0
- package/dist/allend/Shared/context.js +33 -0
- package/dist/allend/Shared/context.js.map +1 -0
- package/dist/allend/Shared/faqs.d.ts +20 -0
- package/dist/allend/Shared/faqs.js +87 -0
- package/dist/allend/Shared/faqs.js.map +1 -0
- package/dist/allend/Shared/invitation.d.ts +42 -0
- package/dist/allend/Shared/invitation.js +40 -0
- package/dist/allend/Shared/invitation.js.map +1 -0
- package/dist/allend/Shared/operators.d.ts +39 -0
- package/dist/allend/Shared/operators.js +37 -0
- package/dist/allend/Shared/operators.js.map +1 -0
- package/dist/allend/Shared/users.d.ts +11 -0
- package/dist/allend/Shared/users.js +29 -0
- package/dist/allend/Shared/users.js.map +1 -0
- package/dist/allend/Tracking/index.d.ts +17 -0
- package/dist/allend/Tracking/index.js +39 -0
- package/dist/allend/Tracking/index.js.map +1 -0
- package/dist/allend/Utilities/common.d.ts +12 -0
- package/dist/allend/Utilities/common.js +53 -0
- package/dist/allend/Utilities/common.js.map +1 -0
- package/dist/allend/Utilities/fares.d.ts +10 -0
- package/dist/allend/Utilities/fares.js +39 -0
- package/dist/allend/Utilities/fares.js.map +1 -0
- package/dist/allend/Utilities/index.d.ts +23 -0
- package/dist/allend/Utilities/index.js +36 -0
- package/dist/allend/Utilities/index.js.map +1 -0
- package/dist/allend/Utilities/nearby.d.ts +9 -0
- package/dist/allend/Utilities/nearby.js +32 -0
- package/dist/allend/Utilities/nearby.js.map +1 -0
- package/dist/allend/Workflows/Client.d.ts +17 -0
- package/dist/allend/Workflows/Client.js +50 -0
- package/dist/allend/Workflows/Client.js.map +1 -0
- package/dist/allend/Workflows/Delivery.d.ts +36 -0
- package/dist/allend/Workflows/Delivery.js +16 -0
- package/dist/allend/Workflows/Delivery.js.map +1 -0
- package/dist/allend/Workflows/index.d.ts +11 -0
- package/dist/allend/Workflows/index.js +25 -0
- package/dist/allend/Workflows/index.js.map +1 -0
- package/dist/allend/Workspace/index.d.ts +162 -0
- package/dist/allend/Workspace/index.js +220 -0
- package/dist/allend/Workspace/index.js.map +1 -0
- package/dist/allend/index.d.ts +8 -5
- package/dist/allend/index.js +15 -8
- package/dist/allend/index.js.map +1 -1
- package/dist/backend/Auth.d.ts +28 -4
- package/dist/backend/Auth.js +125 -245
- package/dist/backend/Auth.js.map +1 -1
- package/dist/baseUrl.d.ts +56 -0
- package/dist/baseUrl.js +72 -4
- package/dist/baseUrl.js.map +1 -1
- package/dist/core.d.ts +88 -0
- package/dist/core.js +121 -0
- package/dist/core.js.map +1 -0
- package/dist/error.d.ts +17 -0
- package/dist/error.js +26 -0
- package/dist/error.js.map +1 -0
- package/dist/index.d.ts +30 -12
- package/dist/index.js +38 -14
- package/dist/index.js.map +1 -1
- package/dist/react-native.d.ts +30 -0
- package/dist/react-native.js +55 -0
- package/dist/react-native.js.map +1 -0
- package/dist/types/access.d.ts +64 -7
- package/dist/types/auth.d.ts +17 -17
- package/dist/types/channel.d.ts +45 -0
- package/dist/types/index.d.ts +379 -237
- package/dist/utils/index.d.ts +25 -0
- package/dist/utils/index.js +11 -1
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/stream.js +25 -26
- package/dist/utils/stream.js.map +1 -1
- package/package.json +38 -18
- package/src/allend/Access.ts +143 -13
- package/src/allend/Agent/consolidation.ts +43 -0
- package/src/allend/Agent/delivery.ts +51 -0
- package/src/allend/Agent/dispatch.ts +27 -0
- package/src/allend/Agent/index.ts +113 -0
- package/src/allend/Agent/navigation.ts +27 -0
- package/src/allend/Agent/origin.ts +36 -0
- package/src/allend/Agent/reallocation.ts +16 -0
- package/src/allend/Agent/realtime.ts +140 -0
- package/src/allend/Agent/rides.ts +61 -0
- package/src/allend/Agent/shipping.ts +51 -0
- package/src/allend/CSP/analytics.ts +61 -0
- package/src/allend/CSP/index.ts +57 -0
- package/src/allend/CSP/inventory.ts +96 -0
- package/src/allend/CSP/orders.ts +121 -0
- package/src/allend/CSP/webhooks.ts +68 -0
- package/src/allend/Customer/index.ts +56 -0
- package/src/allend/Customer/intents.ts +66 -0
- package/src/allend/Customer/orders.ts +51 -0
- package/src/allend/Customer/rides.ts +60 -0
- package/src/allend/DEV/developers.ts +42 -0
- package/src/allend/DEV/index.ts +48 -0
- package/src/allend/IoTSP/backend.ts +103 -0
- package/src/allend/IoTSP/devices.ts +74 -0
- package/src/allend/IoTSP/index.ts +69 -0
- package/src/allend/IoTSP/rules.ts +99 -0
- package/src/allend/IoTSP/topics.ts +99 -0
- package/src/allend/LSP/agents.ts +115 -0
- package/src/allend/LSP/carriers.ts +408 -0
- package/src/allend/LSP/coverage.ts +212 -0
- package/src/allend/LSP/fleets.ts +505 -0
- package/src/allend/LSP/hubs.ts +245 -0
- package/src/allend/LSP/index.ts +75 -0
- package/src/allend/LSP/inventory.ts +65 -0
- package/src/allend/LSP/operations.ts +202 -0
- package/src/allend/LSP/orders.ts +397 -0
- package/src/allend/LSP/pods.ts +176 -0
- package/src/allend/LSP/pricing.ts +192 -0
- package/src/allend/LSP/psl.ts +81 -0
- package/src/allend/LSP/warehouses.ts +118 -0
- package/src/allend/MSI/Controls.ts +109 -90
- package/src/allend/MSI/Handles.ts +24 -15
- package/src/allend/MSI/Plugins.ts +3 -3
- package/src/allend/MSI/index.ts +85 -16
- package/src/allend/MSI/native.tsx +314 -0
- package/src/allend/MSI/token.ts +20 -0
- package/src/allend/OTPAuth/index.ts +130 -0
- package/src/allend/Pipelines/analytics.ts +25 -0
- package/src/allend/Pipelines/escalations.ts +26 -0
- package/src/allend/Pipelines/executions.ts +51 -0
- package/src/allend/Pipelines/index.ts +125 -0
- package/src/allend/Pipelines/interventions.ts +27 -0
- package/src/allend/Pipelines/monitor.ts +33 -0
- package/src/allend/Pipelines/queries.ts +27 -0
- package/src/allend/Pipelines/templates.ts +51 -0
- package/src/allend/Pipelines/utils.ts +0 -0
- package/src/allend/Pipelines/webhooks.ts +36 -0
- package/src/allend/Pipelines/workers.ts +49 -0
- package/src/allend/Queries/capacity.ts +51 -0
- package/src/allend/Queries/discovery.ts +53 -0
- package/src/allend/Queries/index.ts +58 -0
- package/src/allend/Queries/matching.ts +16 -0
- package/src/allend/Queries/performance.ts +35 -0
- package/src/allend/Queries/pricing.ts +51 -0
- package/src/allend/{DClient/Event.ts → Realtime/index.ts} +23 -22
- package/src/allend/Shared/account.ts +24 -0
- package/src/allend/Shared/buckets.ts +117 -0
- package/src/allend/Shared/context.ts +36 -0
- package/src/allend/Shared/faqs.ts +106 -0
- package/src/allend/Shared/invitation.ts +77 -0
- package/src/allend/Shared/operators.ts +84 -0
- package/src/allend/Shared/users.ts +32 -0
- package/src/allend/Tracking/index.ts +48 -0
- package/src/allend/Utilities/common.ts +63 -0
- package/src/allend/Utilities/fares.ts +45 -0
- package/src/allend/Utilities/index.ts +52 -0
- package/src/allend/Utilities/nearby.ts +36 -0
- package/src/allend/{DClient → Workflows}/Client.ts +12 -22
- package/src/allend/Workflows/Delivery.ts +94 -0
- package/src/allend/Workflows/index.ts +31 -0
- package/src/allend/Workspace/index.ts +302 -0
- package/src/allend/index.ts +23 -10
- package/src/backend/Auth.ts +68 -35
- package/src/baseUrl.ts +81 -7
- package/src/core.ts +145 -0
- package/src/error.ts +27 -0
- package/src/index.ts +25 -17
- package/src/react-native.ts +43 -0
- package/src/types/access.d.ts +64 -7
- package/src/types/auth.d.ts +17 -17
- package/src/types/channel.d.ts +45 -0
- package/src/types/index.d.ts +379 -237
- package/src/utils/index.ts +33 -1
- package/dist/allend/DAuth/index.d.ts +0 -20
- package/dist/allend/DAuth/index.js +0 -92
- package/dist/allend/DAuth/index.js.map +0 -1
- package/dist/allend/DClient/Client.d.ts +0 -10
- package/dist/allend/DClient/Client.js +0 -144
- package/dist/allend/DClient/Client.js.map +0 -1
- package/dist/allend/DClient/Event.js +0 -100
- package/dist/allend/DClient/Event.js.map +0 -1
- package/dist/allend/DClient/Order.d.ts +0 -49
- package/dist/allend/DClient/Order.js +0 -601
- package/dist/allend/DClient/Order.js.map +0 -1
- package/dist/bundle.js +0 -1
- package/src/allend/DAuth/index.ts +0 -39
- package/src/allend/DClient/Order.ts +0 -452
package/dist/types/index.d.ts
CHANGED
|
@@ -1,293 +1,435 @@
|
|
|
1
|
+
// ─── @de./sdk — public type surface ──────────────────────────────────────────
|
|
2
|
+
|
|
3
|
+
// Stream is a runtime class in this package; the public surface references it
|
|
4
|
+
// structurally, so it has to be imported here rather than assumed global.
|
|
5
|
+
import type Stream from '../utils/stream'
|
|
6
|
+
import type MSI from '../allend/MSI'
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* The map engine an MSI extension receives.
|
|
10
|
+
*
|
|
11
|
+
* REVIEW: this alias replaces a dangling `Engine` reference that never
|
|
12
|
+
* resolved to a declaration anywhere in the package — the public surface
|
|
13
|
+
* simply did not compile for consumers. MSI is the only engine the SDK
|
|
14
|
+
* exposes, so it is the intended target as far as can be determined.
|
|
15
|
+
*/
|
|
16
|
+
export type Engine = MSI
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Styling options for custom map points.
|
|
20
|
+
*
|
|
21
|
+
* REVIEW: also previously dangling. Kept permissive so no existing caller
|
|
22
|
+
* breaks; narrow it once the intended shape is known.
|
|
23
|
+
*/
|
|
24
|
+
export type CustomPointOptions = Record<string, unknown>
|
|
25
|
+
//
|
|
26
|
+
// Rule: import from @de./types whenever the type exists there.
|
|
27
|
+
// Only define types here that are genuinely SDK-specific (MSI map UI, HTTP
|
|
28
|
+
// envelope, constructor configs, realtime session helpers) and have no
|
|
29
|
+
// equivalent in de.types.
|
|
30
|
+
//
|
|
31
|
+
// Consumers can always import domain types directly:
|
|
32
|
+
// import type { Waypoint, OrderPackage } from '@de./types'
|
|
33
|
+
// or via the SDK barrel (re-exported below):
|
|
34
|
+
// import type { Waypoint, OrderPackage } from '@de./sdk'
|
|
35
|
+
//
|
|
36
|
+
// ─────────────────────────────────────────────────────────────────────────────
|
|
37
|
+
|
|
38
|
+
import type {
|
|
39
|
+
// ── geo ───────────────────────────────────────────────────────────────────
|
|
40
|
+
RTLocation,
|
|
41
|
+
Address,
|
|
42
|
+
Contacts,
|
|
43
|
+
BoundingBox,
|
|
44
|
+
GeoBoundary,
|
|
45
|
+
|
|
46
|
+
// ── routing ───────────────────────────────────────────────────────────────
|
|
47
|
+
Waypoint,
|
|
48
|
+
WaypointAction,
|
|
49
|
+
WaypointLocationType,
|
|
50
|
+
Routing,
|
|
51
|
+
RoutingSegment,
|
|
52
|
+
|
|
53
|
+
// ── entity ────────────────────────────────────────────────────────────────
|
|
54
|
+
EntityBase,
|
|
55
|
+
EntityType,
|
|
56
|
+
EntityStatus,
|
|
57
|
+
EntityGrade,
|
|
58
|
+
|
|
59
|
+
// ── order ─────────────────────────────────────────────────────────────────
|
|
60
|
+
OrderPriority,
|
|
61
|
+
OrderPackage,
|
|
62
|
+
OrderPackageType,
|
|
63
|
+
OrderPackageCategory,
|
|
64
|
+
OrderPackageItem,
|
|
65
|
+
OrderItem,
|
|
66
|
+
OrderItemStatus,
|
|
67
|
+
OrderPayment,
|
|
68
|
+
OrderOperation,
|
|
69
|
+
OrderIntent,
|
|
70
|
+
OrderTracking,
|
|
71
|
+
OrderAssignee,
|
|
72
|
+
OrderException,
|
|
73
|
+
BaseOrder,
|
|
74
|
+
BaseOrderStatus,
|
|
75
|
+
|
|
76
|
+
// ── events ────────────────────────────────────────────────────────────────
|
|
77
|
+
OrderEventType,
|
|
78
|
+
OrderTrackingEvent,
|
|
79
|
+
LocationUpdateEvent,
|
|
80
|
+
MessageEvent,
|
|
81
|
+
RouteChangeEvent,
|
|
82
|
+
PresenceEvent,
|
|
83
|
+
|
|
84
|
+
// ── AUX customer / order-building ─────────────────────────────────────────
|
|
85
|
+
CustomerOrderIntent,
|
|
86
|
+
CustomerOrderIntentService,
|
|
87
|
+
AddWaypoints,
|
|
88
|
+
AddPackages,
|
|
89
|
+
SubmitIntent
|
|
90
|
+
} from '@de./types'
|
|
91
|
+
|
|
92
|
+
// ─── Re-export domain types ───────────────────────────────────────────────────
|
|
93
|
+
|
|
94
|
+
export type {
|
|
95
|
+
RTLocation,
|
|
96
|
+
Address,
|
|
97
|
+
Contacts,
|
|
98
|
+
BoundingBox,
|
|
99
|
+
GeoBoundary,
|
|
100
|
+
|
|
101
|
+
Waypoint,
|
|
102
|
+
WaypointAction,
|
|
103
|
+
WaypointLocationType,
|
|
104
|
+
Routing,
|
|
105
|
+
RoutingSegment,
|
|
106
|
+
|
|
107
|
+
EntityBase,
|
|
108
|
+
EntityType,
|
|
109
|
+
EntityStatus,
|
|
110
|
+
EntityGrade,
|
|
111
|
+
|
|
112
|
+
OrderPriority,
|
|
113
|
+
OrderPackage,
|
|
114
|
+
OrderPackageType,
|
|
115
|
+
OrderPackageCategory,
|
|
116
|
+
OrderPackageItem,
|
|
117
|
+
OrderItem,
|
|
118
|
+
OrderItemStatus,
|
|
119
|
+
OrderPayment,
|
|
120
|
+
OrderOperation,
|
|
121
|
+
OrderIntent,
|
|
122
|
+
OrderTracking,
|
|
123
|
+
OrderAssignee,
|
|
124
|
+
OrderException,
|
|
125
|
+
BaseOrder,
|
|
126
|
+
BaseOrderStatus,
|
|
127
|
+
|
|
128
|
+
OrderEventType,
|
|
129
|
+
OrderTrackingEvent,
|
|
130
|
+
LocationUpdateEvent,
|
|
131
|
+
MessageEvent,
|
|
132
|
+
RouteChangeEvent,
|
|
133
|
+
PresenceEvent,
|
|
134
|
+
|
|
135
|
+
CustomerOrderIntent,
|
|
136
|
+
CustomerOrderIntentService,
|
|
137
|
+
AddWaypoints,
|
|
138
|
+
AddPackages,
|
|
139
|
+
SubmitIntent
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
// ─── HTTP utilities ───────────────────────────────────────────────────────────
|
|
143
|
+
//
|
|
144
|
+
// APIResponseBase from de.types covers the base error/status fields.
|
|
145
|
+
// HTTPResponse<T> adds the generic data wrapper the SDK uses internally.
|
|
146
|
+
|
|
1
147
|
export type HTTPRequestOptions = {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
148
|
+
url: string
|
|
149
|
+
method: 'GET' | 'POST' | 'PATCH' | 'PUT' | 'DELETE'
|
|
150
|
+
headers?: { [index: string]: string }
|
|
151
|
+
body?: any
|
|
152
|
+
/** Per-call deadline in ms, overriding the client's own. */
|
|
153
|
+
timeout?: number
|
|
154
|
+
}
|
|
155
|
+
export type HTTPResponse<T = Record<string, never>> = {
|
|
156
|
+
error: boolean
|
|
157
|
+
message?: string
|
|
158
|
+
data: T
|
|
6
159
|
}
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
160
|
+
|
|
161
|
+
// ─── SDK config types ─────────────────────────────────────────────────────────
|
|
162
|
+
//
|
|
163
|
+
// Constructor option shapes for each named export.
|
|
164
|
+
// These are SDK-specific — de.types has no concept of SDK client configs.
|
|
165
|
+
|
|
166
|
+
export type Env = 'dev' | 'staging' | 'prod'
|
|
167
|
+
export type Platform = 'web' | 'mobile' | 'server' | 'proxy'
|
|
168
|
+
|
|
169
|
+
export type CoreConfig = {
|
|
170
|
+
context: string
|
|
171
|
+
accessToken: string
|
|
172
|
+
env?: Env
|
|
173
|
+
platform?: Platform
|
|
174
|
+
remoteOrigin?: string
|
|
175
|
+
version?: number
|
|
10
176
|
}
|
|
11
177
|
|
|
12
|
-
export type
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
178
|
+
export type AuthConfig = {
|
|
179
|
+
context: string
|
|
180
|
+
cid: string
|
|
181
|
+
secret: string
|
|
182
|
+
remoteOrigin?: string
|
|
183
|
+
env?: Env
|
|
184
|
+
version?: number
|
|
185
|
+
autorefresh?: boolean
|
|
186
|
+
onNewToken?: ( token: string ) => void
|
|
16
187
|
}
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
188
|
+
|
|
189
|
+
export type OTPAuthConfig = {
|
|
190
|
+
context: string
|
|
191
|
+
accessToken: string
|
|
192
|
+
env?: Env
|
|
193
|
+
platform?: Platform
|
|
194
|
+
remoteOrigin?: string
|
|
23
195
|
}
|
|
24
|
-
|
|
25
|
-
|
|
196
|
+
|
|
197
|
+
export type IoTConfig = {
|
|
198
|
+
channel: string
|
|
199
|
+
accessToken: string
|
|
200
|
+
env?: Env
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
export type WorkflowsConfig = {
|
|
204
|
+
core: { orders: any, request: Function }
|
|
205
|
+
msi?: any
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
// ─── MSI map coordinate types ─────────────────────────────────────────────────
|
|
209
|
+
//
|
|
210
|
+
// de.types Coordinates is a readonly [lat, lng] tuple (internal storage).
|
|
211
|
+
// MSI uses { lng, lat } map-point objects — a different shape and convention.
|
|
212
|
+
// LngLat = [number, number] is the MSI polyline/route-path coordinate array.
|
|
213
|
+
|
|
214
|
+
export type LngLat = [number, number]
|
|
215
|
+
export type Coordinates = { lng: number, lat: number }
|
|
216
|
+
|
|
217
|
+
export type PickedLocation = {
|
|
218
|
+
point: { x: number, y: number }
|
|
219
|
+
coordinates: Coordinates
|
|
26
220
|
}
|
|
27
221
|
export type ActivePosition = {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
222
|
+
id: string
|
|
223
|
+
position: RTLocation
|
|
224
|
+
caption?: Caption
|
|
225
|
+
focus?: boolean
|
|
32
226
|
}
|
|
33
227
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
*/
|
|
228
|
+
// ─── MSI animated route ───────────────────────────────────────────────────────
|
|
229
|
+
|
|
37
230
|
export type AnimatedRouteNativePathType = 'dot' | 'solid'
|
|
38
|
-
export type AnimatedRouteNativeMethods =
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
| 'dot:directional'
|
|
42
|
-
| 'solid:flow'
|
|
43
|
-
| 'solid:fade'
|
|
44
|
-
| 'solid:pulse'
|
|
45
|
-
| 'solid:directional'
|
|
231
|
+
export type AnimatedRouteNativeMethods =
|
|
232
|
+
| 'dot:flow' | 'dot:fade' | 'dot:pulse' | 'dot:directional'
|
|
233
|
+
| 'solid:flow' | 'solid:fade' | 'solid:pulse' | 'solid:directional'
|
|
46
234
|
export interface AnimatedRouteRules {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
235
|
+
styles?: any
|
|
236
|
+
speed?: number
|
|
237
|
+
fadeLength?: number
|
|
50
238
|
}
|
|
51
239
|
export interface AnimatedRoute {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
create( pathType?: AnimatedRouteNativePathType ): void;
|
|
64
|
-
|
|
65
|
-
/**
|
|
66
|
-
* Animation methods
|
|
67
|
-
*/
|
|
68
|
-
apply: Record<string, () => void>;
|
|
69
|
-
|
|
70
|
-
/**
|
|
71
|
-
* Stop the current animation
|
|
72
|
-
*/
|
|
73
|
-
stop(): void;
|
|
74
|
-
|
|
75
|
-
/**
|
|
76
|
-
* Remove the polyline from the map and stop animation
|
|
77
|
-
*/
|
|
78
|
-
remove(): void;
|
|
240
|
+
key: number | null
|
|
241
|
+
currentOffset: number
|
|
242
|
+
rules: Required<AnimatedRouteRules>
|
|
243
|
+
startTime?: number
|
|
244
|
+
polyline?: any
|
|
245
|
+
engine: any
|
|
246
|
+
path: Coordinates[]
|
|
247
|
+
create( pathType?: AnimatedRouteNativePathType ): void
|
|
248
|
+
apply: Record<string, () => void>
|
|
249
|
+
stop(): void
|
|
250
|
+
remove(): void
|
|
79
251
|
}
|
|
80
252
|
export type AnimatedRouteOptions = AnimatedRouteNativeMethods | {
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
253
|
+
handler?: new ( engine: Engine, path: Coordinates[], rules?: AnimatedRouteRules ) => AnimatedRoute
|
|
254
|
+
method?: string
|
|
255
|
+
rules?: AnimatedRouteRules
|
|
84
256
|
}
|
|
85
257
|
|
|
258
|
+
// ─── MSI routing / directions ─────────────────────────────────────────────────
|
|
259
|
+
|
|
260
|
+
export type MapWaypoint = {
|
|
261
|
+
index?: number
|
|
262
|
+
coords: Coordinates
|
|
263
|
+
caption?: Caption
|
|
264
|
+
}
|
|
86
265
|
export type Journey = {
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
266
|
+
routeId: string | number
|
|
267
|
+
origin?: MapWaypoint
|
|
268
|
+
destination?: MapWaypoint
|
|
269
|
+
waypoints?: MapWaypoint[]
|
|
270
|
+
options?: RouteOptions
|
|
92
271
|
}
|
|
93
272
|
export type ActiveDirection<RouteSpec> = {
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
273
|
+
routeId: string | number
|
|
274
|
+
profile: string
|
|
275
|
+
origin?: Coordinates
|
|
276
|
+
destination?: Coordinates
|
|
277
|
+
waypoints: Coordinates[]
|
|
278
|
+
route: RouteSpec | null
|
|
100
279
|
}
|
|
101
|
-
|
|
102
280
|
export type RouteID = string | number
|
|
103
281
|
export type RoutesFitBoundsOptions = {
|
|
104
282
|
includes?: RouteID[]
|
|
105
283
|
margin?: number
|
|
106
284
|
}
|
|
107
285
|
export type RouteOptions = {
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
286
|
+
id?: string | number
|
|
287
|
+
mode?: 'default' | 'navigation'
|
|
288
|
+
profile?: 'driving-traffic' | 'driving' | 'cycling' | 'biking' | 'walking' | 'transit'
|
|
289
|
+
unit?: 'metric' | 'imperial'
|
|
290
|
+
preference?: 'TRAFFIC_AWARE' | 'TRAFFIC_UNAWARE'
|
|
291
|
+
pointless?: boolean
|
|
292
|
+
styles?: any
|
|
293
|
+
animation?: AnimatedRouteOptions
|
|
116
294
|
}
|
|
117
295
|
|
|
296
|
+
// ─── MSI place search ─────────────────────────────────────────────────────────
|
|
297
|
+
|
|
118
298
|
export type SearchPlaceSuggestion = {
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
299
|
+
id: string
|
|
300
|
+
name: string
|
|
301
|
+
description: string
|
|
302
|
+
distance: number | null
|
|
123
303
|
}
|
|
124
304
|
export type SearchPlace = {
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
305
|
+
name: string
|
|
306
|
+
location: Coordinates
|
|
307
|
+
address: string
|
|
128
308
|
}
|
|
129
309
|
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
type: string
|
|
138
|
-
reference: string
|
|
139
|
-
phone?: string
|
|
140
|
-
email?: string
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
export type WaypointIndex = 'origin' | 'destination' | number
|
|
144
|
-
export type WaypointOptions = {
|
|
145
|
-
no?: number
|
|
146
|
-
type?: 'pickup' | 'dropoff'
|
|
147
|
-
description?: string
|
|
148
|
-
coordinates?: Coordinates
|
|
149
|
-
address?: string
|
|
150
|
-
'contact.type'?: string
|
|
151
|
-
'contact.reference'?: string
|
|
152
|
-
'contact.phone'?: string
|
|
153
|
-
'contact.email'?: string
|
|
154
|
-
}
|
|
310
|
+
// ─── MSI entity display types ─────────────────────────────────────────────────
|
|
311
|
+
//
|
|
312
|
+
// MSIEntity is the MSI map-layer entity shape used to display and move markers.
|
|
313
|
+
// It is intentionally simpler than de.types EntityBase:
|
|
314
|
+
// - adds 'person' and 'bus' vehicle types not in de.types EntityType
|
|
315
|
+
// - status narrows to the two states MSI renders ('ACTIVE' | 'BUSY')
|
|
316
|
+
// - grade reuses de.types EntityGrade
|
|
155
317
|
|
|
156
|
-
export type
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
category: string
|
|
160
|
-
weight: number
|
|
161
|
-
note?: string
|
|
162
|
-
}
|
|
163
|
-
export type PackageOptions = {
|
|
164
|
-
waypointNo?: number
|
|
165
|
-
careLevel?: number
|
|
166
|
-
category?: string
|
|
167
|
-
weight?: number
|
|
168
|
-
note?: string
|
|
169
|
-
}
|
|
318
|
+
export type MobileEntityType = 'person' | 'moto' | 'car' | 'bus' | 'bike' | 'truck' | 'plane' | 'ship'
|
|
319
|
+
export type StaticEntityType = 'restaurant' | 'hotel' | 'store' | 'office' | 'warehouse'
|
|
320
|
+
export type MSIEntityType = MobileEntityType | StaticEntityType
|
|
170
321
|
|
|
171
|
-
export type
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
tax: number
|
|
179
|
-
discount: number
|
|
180
|
-
}
|
|
181
|
-
payment: {
|
|
182
|
-
mode: PaymentMode
|
|
183
|
-
paid: boolean
|
|
184
|
-
}
|
|
185
|
-
xpress: string
|
|
186
|
-
}
|
|
187
|
-
export type OrderServiceOptions = {
|
|
188
|
-
'fees.total.amount'?: number
|
|
189
|
-
'fees.total.currency'?: string
|
|
190
|
-
'fees.tax'?: string
|
|
191
|
-
'fees.discount'?: string
|
|
192
|
-
'payment.mode'?: PaymentMode
|
|
193
|
-
'payment.option'?: string
|
|
194
|
-
'payment.paid'?: boolean
|
|
195
|
-
xpress?: string
|
|
196
|
-
}
|
|
197
|
-
export type OrderOperator = {}
|
|
198
|
-
export type OrderStage = {
|
|
199
|
-
current: string
|
|
200
|
-
status: string
|
|
322
|
+
export type MSIEntity = {
|
|
323
|
+
id: string
|
|
324
|
+
type: MSIEntityType
|
|
325
|
+
status: 'ACTIVE' | 'BUSY'
|
|
326
|
+
grade: EntityGrade
|
|
327
|
+
currentLocation: RTLocation
|
|
328
|
+
static?: boolean
|
|
201
329
|
}
|
|
202
330
|
|
|
203
|
-
export
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
}
|
|
209
|
-
export type Caption = {
|
|
210
|
-
duration?: number
|
|
211
|
-
unit?: string
|
|
212
|
-
label?: string
|
|
331
|
+
export interface ControlEntity {
|
|
332
|
+
add( entity: MSIEntity, callback?: () => void ): void
|
|
333
|
+
remove( id: string, callback?: () => void ): void
|
|
334
|
+
focus( id: string, callback?: () => void ): void
|
|
335
|
+
move( update: ActivePosition, callback?: () => void ): void
|
|
213
336
|
}
|
|
214
|
-
export type
|
|
215
|
-
|
|
216
|
-
|
|
337
|
+
export type LRSControlsListener = ( controls: ControlEntity ) => void
|
|
338
|
+
export type LRSErrorListener = ( error?: Error | boolean ) => void
|
|
339
|
+
export interface LRStreamer {
|
|
340
|
+
live( fn: LRSControlsListener ): Stream
|
|
341
|
+
close( fn?: LRSErrorListener ): void
|
|
342
|
+
pipe( stream: Stream ): void
|
|
217
343
|
}
|
|
218
344
|
|
|
345
|
+
// ─── MSI map interface config ─────────────────────────────────────────────────
|
|
346
|
+
|
|
219
347
|
export type MapOptions = {
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
348
|
+
/**
|
|
349
|
+
* Id of the container element to mount the gateway into.
|
|
350
|
+
* Web only -- the React Native entry renders a component instead.
|
|
351
|
+
*/
|
|
352
|
+
element?: string
|
|
353
|
+
/**
|
|
354
|
+
* Static access token.
|
|
355
|
+
*
|
|
356
|
+
* Prefer `getAccessToken` for long-lived sessions: it is read at every bind
|
|
357
|
+
* and rebind, so a rotated token is picked up without tearing the map down.
|
|
358
|
+
* Supply one or the other -- both entry points reject when neither yields a
|
|
359
|
+
* token.
|
|
360
|
+
*/
|
|
361
|
+
accessToken?: string
|
|
362
|
+
getAccessToken?: () => string
|
|
363
|
+
version?: number
|
|
364
|
+
env?: 'dev' | 'prod'
|
|
365
|
+
/**
|
|
366
|
+
* Host to substitute for `localhost` when `env` is `dev`. Native apps cannot
|
|
367
|
+
* reach the host machine on localhost.
|
|
368
|
+
*/
|
|
369
|
+
devHostname?: string
|
|
224
370
|
}
|
|
225
371
|
export type MapLayerStyle = 'streets' | 'outdoors' | 'light' | 'dark' | 'satellite'
|
|
226
|
-
export type MapWaypoint = {
|
|
227
|
-
index?: number
|
|
228
|
-
coords: Coordinates
|
|
229
|
-
caption?: Caption
|
|
230
|
-
}
|
|
231
372
|
|
|
232
|
-
|
|
233
|
-
id: string
|
|
234
|
-
status: 'ACTIVE' | 'BUSY'
|
|
235
|
-
grade: '1H' | '2H' | '3H'
|
|
236
|
-
currentLocation: RTLocation
|
|
237
|
-
static?: boolean
|
|
238
|
-
type: 'moto' | 'car' | 'bus' | 'bike' | 'truck' | 'plane' | 'ship' | 'restaurant' | 'hotel' | 'store' | 'office' | 'warehouse'
|
|
239
|
-
}
|
|
240
|
-
export interface ControlEntity {
|
|
241
|
-
add: ( entity: Entity, callback?: () => void ) => void
|
|
242
|
-
remove: ( id: string, callback?: () => void ) => void
|
|
243
|
-
focus: ( id: string, callback?: () => void ) => void
|
|
244
|
-
move: ( update: ActivePosition, callback?: () => void ) => void
|
|
245
|
-
}
|
|
246
|
-
export type LRSControlsListener = ( controls: ControlEntity ) => void
|
|
247
|
-
export type LRSErrorListener = ( error?: Error | boolean ) => void
|
|
248
|
-
export interface LRStreamer {
|
|
249
|
-
live: ( fn: LRSControlsListener ) => Stream
|
|
250
|
-
close: ( fn?: LRSErrorListener ) => void
|
|
251
|
-
pipe: ( stream: Stream ) => void
|
|
252
|
-
}
|
|
373
|
+
// ─── MSI user location display ────────────────────────────────────────────────
|
|
253
374
|
|
|
254
375
|
export interface UserLocationOptions {
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
accuracyOpacity?: number
|
|
271
|
-
|
|
272
|
-
// Callbacks
|
|
273
|
-
onLocationUpdate?: ( location: RTLocation ) => void
|
|
274
|
-
onLocationError?: ( error: GeolocationPositionError ) => void
|
|
376
|
+
borderRadius?: number
|
|
377
|
+
borderColor?: string
|
|
378
|
+
borderOpacity?: number
|
|
379
|
+
dotColor?: string
|
|
380
|
+
showInnerDot?: boolean
|
|
381
|
+
noRing?: boolean
|
|
382
|
+
showDirectionArrow?: boolean
|
|
383
|
+
arrowColor?: string
|
|
384
|
+
arrowSize?: number
|
|
385
|
+
pulseAnimation?: boolean
|
|
386
|
+
accuracyCircle?: boolean
|
|
387
|
+
accuracyColor?: string
|
|
388
|
+
accuracyOpacity?: number
|
|
389
|
+
onLocationUpdate?: ( location: RTLocation ) => void
|
|
390
|
+
onLocationError?: ( error: GeolocationPositionError ) => void
|
|
275
391
|
}
|
|
392
|
+
|
|
393
|
+
// ─── MSI drag-pick ────────────────────────────────────────────────────────────
|
|
394
|
+
|
|
276
395
|
export type DragPickOptions = {
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
396
|
+
snapToRoad?: boolean
|
|
397
|
+
pinPoints?: boolean
|
|
398
|
+
pointOptions?: CustomPointOptions
|
|
280
399
|
}
|
|
281
400
|
export type DragPickContentType = 'duration' | 'distance' | 'preloader'
|
|
282
401
|
export type DragPickContent = {
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
402
|
+
time?: number
|
|
403
|
+
unit?: 'min' | 'sec' | 'hr' | 'km' | 'mi' | 'm'
|
|
404
|
+
distance?: number
|
|
405
|
+
preloader?: boolean
|
|
287
406
|
}
|
|
288
407
|
export type DragPickEvent = 'dragstart' | 'dragend' | 'zoom_changed' | 'idle'
|
|
289
408
|
export interface DragPickInterface {
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
}
|
|
409
|
+
enable( origin?: Coordinates ): void
|
|
410
|
+
disable(): void
|
|
411
|
+
content( type: DragPickContentType, content: DragPickContent ): void
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
// ─── Realtime session helpers ─────────────────────────────────────────────────
|
|
415
|
+
//
|
|
416
|
+
// Peer: session participant reference (subset of PresenceEvent from de.types).
|
|
417
|
+
// Caption: MSI map overlay annotation.
|
|
418
|
+
// Message: direct-chat payload (distinct from de.types MessageEvent which is
|
|
419
|
+
// order-tracking scoped; Message here is a generic chat shape).
|
|
420
|
+
|
|
421
|
+
export type Peer = {
|
|
422
|
+
utype: string
|
|
423
|
+
id: string
|
|
424
|
+
}
|
|
425
|
+
export type Caption = {
|
|
426
|
+
duration?: number
|
|
427
|
+
unit?: string
|
|
428
|
+
label?: string
|
|
429
|
+
}
|
|
430
|
+
export type Message = {
|
|
431
|
+
type: 'text' | 'location' | 'media'
|
|
432
|
+
sender: string
|
|
433
|
+
content: string
|
|
434
|
+
timestamp: string
|
|
435
|
+
}
|