@burdenoff/microfe-movethewheels 2026.1108.3 → 2026.1108.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.
@@ -2,8 +2,11 @@
2
2
  * Providers this page can connect. The service also ingests SHIPROCKET, which
3
3
  * is set up from the Shiprocket carrier flow rather than here.
4
4
  */
5
- export declare const SUPPORTED_PROVIDERS: readonly ["GENERIC_WEBHOOK", "SAMSARA"];
5
+ export declare const SUPPORTED_PROVIDERS: readonly ["GENERIC_WEBHOOK", "SAMSARA", "GEOTAB"];
6
6
  export type SupportedProvider = (typeof SUPPORTED_PROVIDERS)[number];
7
+ /** Providers the service pulls on a schedule instead of receiving webhooks. */
8
+ export declare const POLLED_PROVIDERS: ReadonlySet<string>;
9
+ export declare function isPolledProvider(provider: string): boolean;
7
10
  /** Named networks without an adapter yet; the service refuses the reserved ones. */
8
11
  export declare const ROADMAP_PROVIDERS: readonly [{
9
12
  readonly id: "PROJECT44";
@@ -15,11 +18,11 @@ export declare const ROADMAP_PROVIDERS: readonly [{
15
18
  readonly id: "DESCARTES";
16
19
  readonly label: "Descartes";
17
20
  }];
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"];
21
+ /** ELD networks planned after Samsara and Geotab (BOFF-10703 follow-ups); not in the schema yet. */
22
+ export declare const PLANNED_ELD_PROVIDERS: readonly ["Motive"];
20
23
  export declare const INTEGRATION_STATUSES: readonly ["ACTIVE", "PAUSED", "DISABLED"];
21
24
  export type IntegrationStatus = (typeof INTEGRATION_STATUSES)[number];
22
- export type IntegrationProvider = 'GENERIC_WEBHOOK' | 'SAMSARA' | 'SHIPROCKET' | 'PROJECT44' | 'FOURKITES' | 'DESCARTES';
25
+ export type IntegrationProvider = 'GENERIC_WEBHOOK' | 'SAMSARA' | 'GEOTAB' | 'SHIPROCKET' | 'PROJECT44' | 'FOURKITES' | 'DESCARTES';
23
26
  /** How each provider is named on the page. */
24
27
  export declare function providerLabel(provider: IntegrationProvider): string;
25
28
  /** Samsara webhook event types the service turns into tracking events. */
@@ -47,6 +50,55 @@ export declare const MIN_SAMSARA_SECRET_BYTES = 16;
47
50
  export declare function samsaraSecretError(secret: string): string | null;
48
51
  /** Returns an error message for an unusable external id key, or null. */
49
52
  export declare function externalIdKeyError(key: string): string | null;
53
+ /** MyGeotab host used when the server field is left blank. */
54
+ export declare const DEFAULT_GEOTAB_SERVER = "my.geotab.com";
55
+ /** How often the service polls each Geotab feed. */
56
+ export declare const GEOTAB_POLL_INTERVAL_MINUTES = 5;
57
+ /** Tracking events a Geotab exception rule may be mapped to. */
58
+ export declare const GEOTAB_RULE_EVENT_TYPES: readonly ["PICKED_UP", "IN_TRANSIT", "ARRIVED", "DEPARTED", "OUT_FOR_DELIVERY", "DELIVERED", "FAILED", "RETURNED"];
59
+ export type GeotabRuleEventType = (typeof GEOTAB_RULE_EVENT_TYPES)[number];
60
+ /** The service accepts at most this many rule mappings per Geotab feed. */
61
+ export declare const MAX_GEOTAB_RULE_MAPPINGS = 50;
62
+ /** The service refuses MyGeotab passwords longer than this. */
63
+ export declare const MAX_GEOTAB_PASSWORD_LENGTH = 255;
64
+ export interface GeotabConnectionInput {
65
+ server: string;
66
+ database: string;
67
+ userName: string;
68
+ /** One `<rule id> = <EVENT_TYPE>` per line. */
69
+ ruleMappings: string;
70
+ locationUpdates: boolean;
71
+ }
72
+ export interface GeotabConfig {
73
+ server: string;
74
+ database: string;
75
+ userName: string;
76
+ ruleEvents: Record<string, GeotabRuleEventType>;
77
+ locationUpdates: boolean;
78
+ }
79
+ /** The MyGeotab host the service will contact, or null when it is not a geotab.com host. */
80
+ export declare function normalizeGeotabServer(value: string): string | null;
81
+ /**
82
+ * Parses rule mappings typed one per line as `<rule id> = <EVENT_TYPE>` (a
83
+ * colon works too; blank lines and `#` comments are ignored).
84
+ */
85
+ export declare function parseGeotabRuleMappings(text: string): {
86
+ ok: true;
87
+ ruleEvents: Record<string, GeotabRuleEventType>;
88
+ } | {
89
+ ok: false;
90
+ error: string;
91
+ };
92
+ /** Validates the Geotab connection fields and builds the config the service stores. */
93
+ export declare function buildGeotabConfig(input: GeotabConnectionInput): {
94
+ ok: true;
95
+ config: GeotabConfig;
96
+ } | {
97
+ ok: false;
98
+ error: string;
99
+ };
100
+ /** Returns an error message for an unusable MyGeotab password, or null. */
101
+ export declare function geotabPasswordError(password: string): string | null;
50
102
  /** Headers Samsara signs each delivery with; the workspace gateway forwards both. */
51
103
  export declare const SAMSARA_SIGNATURE_HEADERS: readonly ["X-Samsara-Signature", "X-Samsara-Timestamp"];
52
104
  export type IntegrationEventStatus = 'RECEIVED' | 'ACCEPTED' | 'PARTIAL' | 'REJECTED' | 'DUPLICATE' | 'CONFLICT';
@@ -58,6 +110,28 @@ export declare const MIN_SECRET_LENGTH = 32;
58
110
  export declare const SIGNATURE_HEADER = "x-webhook-signature";
59
111
  /** Updates accepted in one delivery (a JSON array of at most this many objects). */
60
112
  export declare const MAX_UPDATES_PER_DELIVERY = 5;
113
+ export type PollStatus = 'OK' | 'PARTIAL' | 'FAILED';
114
+ export type PollResultStatus = PollStatus | 'SKIPPED';
115
+ /** Latest poll of a pulled feed (Geotab); null for webhook feeds. */
116
+ export interface IntegrationPollStatus {
117
+ lastPollAt: string | null;
118
+ lastSuccessAt: string | null;
119
+ lastPollStatus: PollStatus | null;
120
+ lastPollError: string | null;
121
+ consecutiveFailures: number;
122
+ lastRecordsFetched: number;
123
+ lastUpdatesAccepted: number;
124
+ lastUpdatesSkipped: number;
125
+ }
126
+ export interface IntegrationPollResult {
127
+ integrationId: string;
128
+ status: PollResultStatus;
129
+ skippedReason: string | null;
130
+ recordsFetched: number;
131
+ updatesAccepted: number;
132
+ updatesSkipped: number;
133
+ error: string | null;
134
+ }
61
135
  export interface CarrierIntegration {
62
136
  id: string;
63
137
  workspaceId: string;
@@ -69,6 +143,7 @@ export interface CarrierIntegration {
69
143
  lastErrorMessage: string | null;
70
144
  createdAt: string;
71
145
  updatedAt: string;
146
+ pollStatus: IntegrationPollStatus | null;
72
147
  }
73
148
  export interface CarrierIntegrationEvent {
74
149
  id: string;
@@ -81,11 +156,12 @@ export interface CarrierIntegrationEvent {
81
156
  receivedAt: string;
82
157
  processedAt: string | null;
83
158
  }
84
- export declare const LIST_INTEGRATIONS_QUERY = "\n query MtwCarrierIntegrations($filter: IntegrationFilterInput, $pagination: PaginationInput) {\n integrations(filter: $filter, pagination: $pagination) {\n \n id\n workspaceId\n provider\n name\n status\n lastSyncAt\n lastErrorAt\n lastErrorMessage\n createdAt\n updatedAt\n\n }\n integrationsCount(filter: $filter)\n }\n";
159
+ export declare const LIST_INTEGRATIONS_QUERY = "\n query MtwCarrierIntegrations($filter: IntegrationFilterInput, $pagination: PaginationInput) {\n integrations(filter: $filter, pagination: $pagination) {\n \n id\n workspaceId\n provider\n name\n status\n lastSyncAt\n lastErrorAt\n lastErrorMessage\n createdAt\n updatedAt\n pollStatus {\n lastPollAt\n lastSuccessAt\n lastPollStatus\n lastPollError\n consecutiveFailures\n lastRecordsFetched\n lastUpdatesAccepted\n lastUpdatesSkipped\n }\n\n }\n integrationsCount(filter: $filter)\n }\n";
85
160
  export declare const INTEGRATION_COUNTS_QUERY = "\n query MtwCarrierIntegrationCounts {\n all: integrationsCount\n active: integrationsCount(filter: { status: ACTIVE })\n }\n";
86
161
  export declare const INTEGRATION_EVENTS_QUERY = "\n query MtwCarrierIntegrationEvents($integrationId: ID, $pagination: PaginationInput) {\n integrationEvents(integrationId: $integrationId, pagination: $pagination) {\n id\n integrationId\n externalEventId\n shipmentId\n eventType\n status\n errorMessage\n receivedAt\n processedAt\n }\n }\n";
87
- export declare const CREATE_INTEGRATION_MUTATION = "\n mutation CreateMtwCarrierIntegration($input: CreateIntegrationInput!) {\n createIntegration(input: $input) {\n \n id\n workspaceId\n provider\n name\n status\n lastSyncAt\n lastErrorAt\n lastErrorMessage\n createdAt\n updatedAt\n\n }\n }\n";
88
- export declare const UPDATE_INTEGRATION_MUTATION = "\n mutation UpdateMtwCarrierIntegration($id: ID!, $input: UpdateIntegrationInput!) {\n updateIntegration(id: $id, input: $input) {\n \n id\n workspaceId\n provider\n name\n status\n lastSyncAt\n lastErrorAt\n lastErrorMessage\n createdAt\n updatedAt\n\n }\n }\n";
162
+ export declare const CREATE_INTEGRATION_MUTATION = "\n mutation CreateMtwCarrierIntegration($input: CreateIntegrationInput!) {\n createIntegration(input: $input) {\n \n id\n workspaceId\n provider\n name\n status\n lastSyncAt\n lastErrorAt\n lastErrorMessage\n createdAt\n updatedAt\n pollStatus {\n lastPollAt\n lastSuccessAt\n lastPollStatus\n lastPollError\n consecutiveFailures\n lastRecordsFetched\n lastUpdatesAccepted\n lastUpdatesSkipped\n }\n\n }\n }\n";
163
+ export declare const UPDATE_INTEGRATION_MUTATION = "\n mutation UpdateMtwCarrierIntegration($id: ID!, $input: UpdateIntegrationInput!) {\n updateIntegration(id: $id, input: $input) {\n \n id\n workspaceId\n provider\n name\n status\n lastSyncAt\n lastErrorAt\n lastErrorMessage\n createdAt\n updatedAt\n pollStatus {\n lastPollAt\n lastSuccessAt\n lastPollStatus\n lastPollError\n consecutiveFailures\n lastRecordsFetched\n lastUpdatesAccepted\n lastUpdatesSkipped\n }\n\n }\n }\n";
164
+ export declare const POLL_INTEGRATION_NOW_MUTATION = "\n mutation PollMtwCarrierIntegrationNow($id: ID!) {\n pollIntegrationNow(id: $id) {\n integrationId\n status\n skippedReason\n recordsFetched\n updatesAccepted\n updatesSkipped\n error\n }\n }\n";
89
165
  export declare const DELETE_INTEGRATION_MUTATION = "\n mutation DeleteMtwCarrierIntegration($id: ID!) {\n deleteIntegration(id: $id)\n }\n";
90
166
  /** Minimal source of randomness, so tests can supply a deterministic one. */
91
167
  export interface RandomSource {
@@ -117,6 +193,11 @@ export declare function curlExample(url: string): string;
117
193
  export declare function humanize(value: string): string;
118
194
  export type BadgeTone = 'default' | 'secondary' | 'outline' | 'destructive';
119
195
  export declare function integrationStatusTone(status: IntegrationStatus): BadgeTone;
196
+ export declare function pollStatusTone(status: PollStatus | null): BadgeTone;
197
+ /** One line describing the latest poll, for the integration card. */
198
+ export declare function pollStatusSummary(pollStatus: IntegrationPollStatus | null, format: (iso: string) => string): string;
199
+ /** The notice shown after "Poll now". */
200
+ export declare function pollResultMessage(name: string, result: IntegrationPollResult): string;
120
201
  export declare function eventStatusTone(status: IntegrationEventStatus): BadgeTone;
121
- /** What a webhook sender sees for each status, shown next to the status control. */
122
- export declare function statusExplanation(status: IntegrationStatus): string;
202
+ /** What each status means for a feed, shown next to the status control. */
203
+ export declare function statusExplanation(status: IntegrationStatus, provider?: IntegrationProvider): string;
@@ -0,0 +1,18 @@
1
+ import { createLucideIcon as e } from "../createLucideIcon.js";
2
+ //#region node_modules/lucide-react/dist/esm/icons/cloud-download.js
3
+ var t = e("CloudDownload", [
4
+ ["path", {
5
+ d: "M12 13v8l-4-4",
6
+ key: "1f5nwf"
7
+ }],
8
+ ["path", {
9
+ d: "m12 21 4-4",
10
+ key: "1lfcce"
11
+ }],
12
+ ["path", {
13
+ d: "M4.393 15.269A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.436 8.284",
14
+ key: "ui1hmy"
15
+ }]
16
+ ]);
17
+ //#endregion
18
+ export { t as CloudDownload };