@burdenoff/microfe-movethewheels 2026.1107.3 → 2026.1107.4
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/generated/tracking-quality-operations.d.ts +1 -1
- package/dist/generated/wspace-types.d.ts +448 -8
- package/dist/movethewheels/hooks/useCarrierIntegrations.d.ts +2 -0
- package/dist/movethewheels/utils/carrierIntegrations.d.ts +38 -4
- package/dist/pages/IntegrationsPage.js +324 -129
- package/dist/utils/carrierIntegrations.js +62 -23
- package/package.json +1 -1
- package/src/generated/tracking-quality-operations.ts +1 -0
- package/src/generated/wspace-types.ts +518 -8
- package/src/movethewheels/hooks/useCarrierIntegrations.ts +2 -0
- package/src/movethewheels/pages/IntegrationsPage.tsx +266 -44
- package/src/movethewheels/utils/carrierIntegrations.ts +76 -8
|
@@ -3,6 +3,8 @@ export interface CreateCarrierIntegrationInput {
|
|
|
3
3
|
provider: SupportedProvider;
|
|
4
4
|
name: string;
|
|
5
5
|
apiSecret: string;
|
|
6
|
+
/** Provider mapping settings (e.g. Samsara's shipment external id key). Never secrets. */
|
|
7
|
+
config?: Record<string, string>;
|
|
6
8
|
}
|
|
7
9
|
export interface UpdateCarrierIntegrationInput {
|
|
8
10
|
name?: string;
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
/**
|
|
2
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Providers this page can connect. The service also ingests SHIPROCKET, which
|
|
3
|
+
* is set up from the Shiprocket carrier flow rather than here.
|
|
4
|
+
*/
|
|
5
|
+
export declare const SUPPORTED_PROVIDERS: readonly ["GENERIC_WEBHOOK", "SAMSARA"];
|
|
3
6
|
export type SupportedProvider = (typeof SUPPORTED_PROVIDERS)[number];
|
|
4
|
-
/** Named networks
|
|
7
|
+
/** Named networks without an adapter yet; the service refuses the reserved ones. */
|
|
5
8
|
export declare const ROADMAP_PROVIDERS: readonly [{
|
|
6
9
|
readonly id: "PROJECT44";
|
|
7
10
|
readonly label: "project44";
|
|
@@ -12,9 +15,40 @@ export declare const ROADMAP_PROVIDERS: readonly [{
|
|
|
12
15
|
readonly id: "DESCARTES";
|
|
13
16
|
readonly label: "Descartes";
|
|
14
17
|
}];
|
|
18
|
+
/** ELD networks planned after Samsara (BOFF-10703 follow-ups); not in the schema yet. */
|
|
19
|
+
export declare const PLANNED_ELD_PROVIDERS: readonly ["Motive", "Geotab"];
|
|
15
20
|
export declare const INTEGRATION_STATUSES: readonly ["ACTIVE", "PAUSED", "DISABLED"];
|
|
16
21
|
export type IntegrationStatus = (typeof INTEGRATION_STATUSES)[number];
|
|
17
|
-
export type IntegrationProvider = 'GENERIC_WEBHOOK' | 'PROJECT44' | 'FOURKITES' | 'DESCARTES';
|
|
22
|
+
export type IntegrationProvider = 'GENERIC_WEBHOOK' | 'SAMSARA' | 'SHIPROCKET' | 'PROJECT44' | 'FOURKITES' | 'DESCARTES';
|
|
23
|
+
/** How each provider is named on the page. */
|
|
24
|
+
export declare function providerLabel(provider: IntegrationProvider): string;
|
|
25
|
+
/** Samsara webhook event types the service turns into tracking events. */
|
|
26
|
+
export declare const SAMSARA_EVENT_TYPES: readonly [{
|
|
27
|
+
readonly type: "RouteStopArrival";
|
|
28
|
+
readonly becomes: "ARRIVED";
|
|
29
|
+
}, {
|
|
30
|
+
readonly type: "RouteStopDeparture";
|
|
31
|
+
readonly becomes: "DEPARTED";
|
|
32
|
+
}, {
|
|
33
|
+
readonly type: "GeofenceEntry";
|
|
34
|
+
readonly becomes: "ARRIVED";
|
|
35
|
+
}, {
|
|
36
|
+
readonly type: "GeofenceExit";
|
|
37
|
+
readonly becomes: "DEPARTED";
|
|
38
|
+
}];
|
|
39
|
+
/** Route or stop external id key the service reads the shipment reference from by default. */
|
|
40
|
+
export declare const DEFAULT_SAMSARA_SHIPMENT_KEY = "mtwShipment";
|
|
41
|
+
/** The service refuses Samsara secrets that decode to fewer bytes than this. */
|
|
42
|
+
export declare const MIN_SAMSARA_SECRET_BYTES = 16;
|
|
43
|
+
/**
|
|
44
|
+
* Returns an error message for an unusable Samsara webhook secret, or null.
|
|
45
|
+
* Samsara shows the secret Base64-encoded; it must be pasted exactly.
|
|
46
|
+
*/
|
|
47
|
+
export declare function samsaraSecretError(secret: string): string | null;
|
|
48
|
+
/** Returns an error message for an unusable external id key, or null. */
|
|
49
|
+
export declare function externalIdKeyError(key: string): string | null;
|
|
50
|
+
/** Headers Samsara signs each delivery with; the workspace gateway forwards both. */
|
|
51
|
+
export declare const SAMSARA_SIGNATURE_HEADERS: readonly ["X-Samsara-Signature", "X-Samsara-Timestamp"];
|
|
18
52
|
export type IntegrationEventStatus = 'RECEIVED' | 'ACCEPTED' | 'PARTIAL' | 'REJECTED' | 'DUPLICATE' | 'CONFLICT';
|
|
19
53
|
/** Tracking event types a delivery may carry (the service's TrackingEventType). */
|
|
20
54
|
export declare const TRACKING_EVENT_TYPES: readonly ["CREATED", "PICKED_UP", "IN_TRANSIT", "ARRIVED", "DEPARTED", "OUT_FOR_DELIVERY", "DELIVERED", "FAILED", "RETURNED"];
|