@burdenoff/microfe-movethewheels 2026.1108.4 → 2026.1108.5

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.
@@ -17,15 +17,16 @@ var r = [
17
17
  id: "DESCARTES",
18
18
  label: "Descartes"
19
19
  }
20
- ], i = ["Motive"], a = [
20
+ ], i = [
21
21
  "ACTIVE",
22
22
  "PAUSED",
23
23
  "DISABLED"
24
24
  ];
25
- function o(e) {
25
+ function a(e) {
26
26
  switch (e) {
27
27
  case "GENERIC_WEBHOOK": return "Signed webhook";
28
28
  case "SAMSARA": return "Samsara";
29
+ case "MOTIVE": return "Motive";
29
30
  case "GEOTAB": return "Geotab";
30
31
  case "SHIPROCKET": return "Shiprocket";
31
32
  case "PROJECT44": return "project44";
@@ -33,7 +34,7 @@ function o(e) {
33
34
  case "DESCARTES": return "Descartes";
34
35
  }
35
36
  }
36
- var s = [
37
+ var o = [
37
38
  {
38
39
  type: "RouteStopArrival",
39
40
  becomes: "ARRIVED"
@@ -50,18 +51,24 @@ var s = [
50
51
  type: "GeofenceExit",
51
52
  becomes: "DEPARTED"
52
53
  }
53
- ], c = "mtwShipment";
54
- function l(e) {
54
+ ], s = [{
55
+ action: "vehicle_geofence_event",
56
+ becomes: "Arrived on geofence entry, Departed on exit"
57
+ }, {
58
+ action: "vehicle_location_updated",
59
+ becomes: "In transit, with the reported position"
60
+ }], c = "X-KT-Webhook-Signature", l = "mtwShipment";
61
+ function u(e) {
55
62
  let t = e.trim(), n = "Paste the secret key exactly as Samsara shows it on the webhook page.";
56
63
  if (!t || t.length % 4 != 0 || !/^[A-Za-z0-9+/]+={0,2}$/.test(t)) return n;
57
64
  let r = t.endsWith("==") ? 2 : +!!t.endsWith("=");
58
65
  return t.length / 4 * 3 - r < 16 ? n : null;
59
66
  }
60
- function u(e) {
67
+ function d(e) {
61
68
  let t = e.trim();
62
69
  return t && (t.length > 64 || !/^[A-Za-z0-9_.-]+$/.test(t)) ? "Use letters, numbers, dots, dashes or underscores (up to 64) for the external ID key." : null;
63
70
  }
64
- var d = "my.geotab.com", f = [
71
+ var f = "my.geotab.com", p = [
65
72
  "PICKED_UP",
66
73
  "IN_TRANSIT",
67
74
  "ARRIVED",
@@ -70,26 +77,26 @@ var d = "my.geotab.com", f = [
70
77
  "DELIVERED",
71
78
  "FAILED",
72
79
  "RETURNED"
73
- ], p = /^(?=.{1,253}$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\.geotab\.com$/, m = /^[A-Za-z0-9_.-]{1,64}$/;
74
- function h(e) {
80
+ ], m = /^(?=.{1,253}$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\.geotab\.com$/, h = /^[A-Za-z0-9_.-]{1,64}$/;
81
+ function g(e) {
75
82
  let t = e.trim().toLowerCase();
76
- if (!t) return d;
83
+ if (!t) return f;
77
84
  let n = t.replace(/^https:\/\//, "").replace(/\/(apiv1\/?)?$/, "");
78
- return p.test(n) ? n : null;
85
+ return m.test(n) ? n : null;
79
86
  }
80
- function g(e) {
87
+ function _(e) {
81
88
  let t = {}, n = e.split(/\r?\n/);
82
89
  for (let [e, r] of n.entries()) {
83
90
  let n = r.trim();
84
91
  if (!n || n.startsWith("#")) continue;
85
92
  let i = /^([^=:]+)[=:](.+)$/.exec(n), a = i?.[1]?.trim() ?? "", o = (i?.[2]?.trim() ?? "").toUpperCase().replace(/[\s-]+/g, "_");
86
- if (!i || !m.test(a)) return {
93
+ if (!i || !h.test(a)) return {
87
94
  ok: !1,
88
95
  error: `Line ${e + 1}: write each mapping as <rule id> = <event>, e.g. RuleArriveId = ARRIVED.`
89
96
  };
90
- if (!f.includes(o)) return {
97
+ if (!p.includes(o)) return {
91
98
  ok: !1,
92
- error: `Line ${e + 1}: use one of ${f.join(", ")}.`
99
+ error: `Line ${e + 1}: use one of ${p.join(", ")}.`
93
100
  };
94
101
  t[a] = o;
95
102
  }
@@ -101,8 +108,8 @@ function g(e) {
101
108
  ruleEvents: t
102
109
  };
103
110
  }
104
- function _(e) {
105
- let t = h(e.server);
111
+ function v(e) {
112
+ let t = g(e.server);
106
113
  if (!t) return {
107
114
  ok: !1,
108
115
  error: "Use your MyGeotab server, e.g. my.geotab.com."
@@ -117,7 +124,7 @@ function _(e) {
117
124
  ok: !1,
118
125
  error: "Enter the MyGeotab user name."
119
126
  };
120
- let i = g(e.ruleMappings);
127
+ let i = _(e.ruleMappings);
121
128
  return i.ok ? !e.locationUpdates && Object.keys(i.ruleEvents).length === 0 ? {
122
129
  ok: !1,
123
130
  error: "Turn on GPS position updates or map at least one exception rule, or nothing is read."
@@ -132,10 +139,10 @@ function _(e) {
132
139
  }
133
140
  } : i;
134
141
  }
135
- function v(e) {
142
+ function y(e) {
136
143
  return e ? e.length > 255 ? "The password can be at most 255 characters." : null : "Enter the MyGeotab password.";
137
144
  }
138
- var y = ["X-Samsara-Signature", "X-Samsara-Timestamp"], b = [
145
+ var b = ["X-Samsara-Signature", "X-Samsara-Timestamp"], x = [
139
146
  "CREATED",
140
147
  "PICKED_UP",
141
148
  "IN_TRANSIT",
@@ -145,41 +152,41 @@ var y = ["X-Samsara-Signature", "X-Samsara-Timestamp"], b = [
145
152
  "DELIVERED",
146
153
  "FAILED",
147
154
  "RETURNED"
148
- ], x = "x-webhook-signature", S = "\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", C = `
155
+ ], S = "x-webhook-signature", C = "\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", w = `
149
156
  query MtwCarrierIntegrations($filter: IntegrationFilterInput, $pagination: PaginationInput) {
150
157
  integrations(filter: $filter, pagination: $pagination) {
151
- ${S}
158
+ ${C}
152
159
  }
153
160
  integrationsCount(filter: $filter)
154
161
  }
155
- `, w = "\n query MtwCarrierIntegrationCounts {\n all: integrationsCount\n active: integrationsCount(filter: { status: ACTIVE })\n }\n", T = "\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", E = `
162
+ `, T = "\n query MtwCarrierIntegrationCounts {\n all: integrationsCount\n active: integrationsCount(filter: { status: ACTIVE })\n }\n", E = "\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", D = `
156
163
  mutation CreateMtwCarrierIntegration($input: CreateIntegrationInput!) {
157
164
  createIntegration(input: $input) {
158
- ${S}
165
+ ${C}
159
166
  }
160
167
  }
161
- `, D = `
168
+ `, O = `
162
169
  mutation UpdateMtwCarrierIntegration($id: ID!, $input: UpdateIntegrationInput!) {
163
170
  updateIntegration(id: $id, input: $input) {
164
- ${S}
171
+ ${C}
165
172
  }
166
173
  }
167
- `, O = "\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", k = "\n mutation DeleteMtwCarrierIntegration($id: ID!) {\n deleteIntegration(id: $id)\n }\n";
168
- function A(e = globalThis.crypto) {
174
+ `, k = "\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", A = "\n mutation DeleteMtwCarrierIntegration($id: ID!) {\n deleteIntegration(id: $id)\n }\n";
175
+ function j(e = globalThis.crypto) {
169
176
  let t = e.getRandomValues(new Uint8Array(32));
170
177
  return Array.from(t, (e) => e.toString(16).padStart(2, "0")).join("");
171
178
  }
172
- function j(e) {
179
+ function M(e) {
173
180
  return e.trim().length < 32 ? "Use a signing secret of at least 32 characters." : null;
174
181
  }
175
- function M(e) {
182
+ function N(e) {
176
183
  let t = e.trim();
177
184
  return t ? t.length > 120 ? "Keep the name under 120 characters." : null : "Give the integration a name.";
178
185
  }
179
- function N(t, n, r, i) {
186
+ function P(t, n, r, i) {
180
187
  return `${new URL(e(t), i).origin}/api/integrations/webhook/${n}/${r}`;
181
188
  }
182
- function P(e = /* @__PURE__ */ new Date()) {
189
+ function F(e = /* @__PURE__ */ new Date()) {
183
190
  return JSON.stringify({
184
191
  externalEventId: "evt_0001",
185
192
  trackingNumber: "YOUR-TRACKING-NUMBER",
@@ -193,30 +200,30 @@ function P(e = /* @__PURE__ */ new Date()) {
193
200
  details: "Departed origin hub"
194
201
  }, null, 2);
195
202
  }
196
- function F(e) {
203
+ function I(e) {
197
204
  return `'${e.split("'").join("'\\''")}'`;
198
205
  }
199
- function I(e) {
206
+ function L(e) {
200
207
  return [
201
208
  "BODY='{\"externalEventId\":\"evt_0001\",\"trackingNumber\":\"YOUR-TRACKING-NUMBER\",\"eventType\":\"IN_TRANSIT\"}'",
202
209
  "SIG=$(printf '%s' \"$BODY\" | openssl dgst -sha256 -hmac \"$MTW_WEBHOOK_SECRET\" -hex | sed 's/^.* //')",
203
- `curl -X POST ${F(e)} \\`,
210
+ `curl -X POST ${I(e)} \\`,
204
211
  " -H 'Content-Type: application/json' \\",
205
- ` -H "${x}: sha256=$SIG" \\`,
212
+ ` -H "${S}: sha256=$SIG" \\`,
206
213
  " --data \"$BODY\""
207
214
  ].join("\n");
208
215
  }
209
- function L(e) {
216
+ function R(e) {
210
217
  let t = e.toLowerCase().split("_").join(" ");
211
218
  return t.charAt(0).toUpperCase() + t.slice(1);
212
219
  }
213
- function R(e) {
220
+ function z(e) {
214
221
  return e === "ACTIVE" ? "default" : e === "PAUSED" ? "secondary" : "outline";
215
222
  }
216
- function z(e) {
223
+ function B(e) {
217
224
  return e === "OK" ? "default" : e === "PARTIAL" ? "secondary" : e === "FAILED" ? "destructive" : "outline";
218
225
  }
219
- function B(e, t) {
226
+ function V(e, t) {
220
227
  if (!e?.lastPollAt) return "Not polled yet; the first poll runs within a few minutes.";
221
228
  let n = t(e.lastPollAt);
222
229
  if (e.lastPollStatus === "FAILED") {
@@ -225,17 +232,17 @@ function B(e, t) {
225
232
  }
226
233
  return `Last poll ${n}: ${e.lastRecordsFetched} records read, ${e.lastUpdatesAccepted} tracking events added, ${e.lastUpdatesSkipped} skipped (vehicle not matched or not on an in-progress route).`;
227
234
  }
228
- function V(e, t) {
229
- if (t.status === "SKIPPED") return t.skippedReason === "POLL_IN_PROGRESS" ? `${e} is being polled right now; refresh in a moment.` : `${e} was not polled (${L(t.skippedReason ?? "skipped")}).`;
235
+ function H(e, t) {
236
+ if (t.status === "SKIPPED") return t.skippedReason === "POLL_IN_PROGRESS" ? `${e} is being polled right now; refresh in a moment.` : `${e} was not polled (${R(t.skippedReason ?? "skipped")}).`;
230
237
  if (t.status === "FAILED") return `Polling ${e} failed: ${t.error ?? "unknown error"}`;
231
238
  let n = t.status === "PARTIAL" ? " Some updates were refused; see the log." : "";
232
239
  return `Polled ${e}: ${t.recordsFetched} records read, ${t.updatesAccepted} tracking events added.${n}`;
233
240
  }
234
- function H(e) {
241
+ function U(e) {
235
242
  return e === "ACCEPTED" ? "default" : e === "DUPLICATE" || e === "PARTIAL" || e === "RECEIVED" ? "secondary" : "destructive";
236
243
  }
237
- function U(e, t = "GENERIC_WEBHOOK") {
244
+ function W(e, t = "GENERIC_WEBHOOK") {
238
245
  return n(t) ? e === "ACTIVE" ? "Polled every 5 minutes; new records become tracking events." : "Not polled. Resume to start reading the feed again from where it stopped." : e === "ACTIVE" ? "Signed deliveries are accepted and become tracking events." : e === "PAUSED" ? "Deliveries are refused with HTTP 423 so the sender can retry after you resume." : "Deliveries are refused with HTTP 410. Resume to accept them again.";
239
246
  }
240
247
  //#endregion
241
- export { E as CREATE_INTEGRATION_MUTATION, d as DEFAULT_GEOTAB_SERVER, c as DEFAULT_SAMSARA_SHIPMENT_KEY, k as DELETE_INTEGRATION_MUTATION, f as GEOTAB_RULE_EVENT_TYPES, w as INTEGRATION_COUNTS_QUERY, T as INTEGRATION_EVENTS_QUERY, a as INTEGRATION_STATUSES, C as LIST_INTEGRATIONS_QUERY, i as PLANNED_ELD_PROVIDERS, O as POLL_INTEGRATION_NOW_MUTATION, r as ROADMAP_PROVIDERS, s as SAMSARA_EVENT_TYPES, y as SAMSARA_SIGNATURE_HEADERS, x as SIGNATURE_HEADER, b as TRACKING_EVENT_TYPES, D as UPDATE_INTEGRATION_MUTATION, _ as buildGeotabConfig, I as curlExample, H as eventStatusTone, P as examplePayload, u as externalIdKeyError, A as generateSigningSecret, v as geotabPasswordError, L as humanize, M as integrationNameError, R as integrationStatusTone, n as isPolledProvider, V as pollResultMessage, B as pollStatusSummary, z as pollStatusTone, o as providerLabel, l as samsaraSecretError, j as signingSecretError, U as statusExplanation, N as webhookUrl };
248
+ export { D as CREATE_INTEGRATION_MUTATION, f as DEFAULT_GEOTAB_SERVER, l as DEFAULT_SAMSARA_SHIPMENT_KEY, A as DELETE_INTEGRATION_MUTATION, p as GEOTAB_RULE_EVENT_TYPES, T as INTEGRATION_COUNTS_QUERY, E as INTEGRATION_EVENTS_QUERY, i as INTEGRATION_STATUSES, w as LIST_INTEGRATIONS_QUERY, s as MOTIVE_ACTIONS, c as MOTIVE_SIGNATURE_HEADER, k as POLL_INTEGRATION_NOW_MUTATION, r as ROADMAP_PROVIDERS, o as SAMSARA_EVENT_TYPES, b as SAMSARA_SIGNATURE_HEADERS, S as SIGNATURE_HEADER, x as TRACKING_EVENT_TYPES, O as UPDATE_INTEGRATION_MUTATION, v as buildGeotabConfig, L as curlExample, U as eventStatusTone, F as examplePayload, d as externalIdKeyError, j as generateSigningSecret, y as geotabPasswordError, R as humanize, N as integrationNameError, z as integrationStatusTone, n as isPolledProvider, H as pollResultMessage, V as pollStatusSummary, B as pollStatusTone, a as providerLabel, u as samsaraSecretError, M as signingSecretError, W as statusExplanation, P as webhookUrl };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@burdenoff/microfe-movethewheels",
3
- "version": "2026.1108.4",
3
+ "version": "2026.1108.5",
4
4
  "description": "Burdenoff MoveTheWheels Microfrontend - Logistics & Supply Chain Management Platform",
5
5
  "type": "module",
6
6
  "files": [
@@ -3280,6 +3280,7 @@ export type MtwIntegrationProvider =
3280
3280
  | 'FOURKITES'
3281
3281
  | 'GENERIC_WEBHOOK'
3282
3282
  | 'GEOTAB'
3283
+ | 'MOTIVE'
3283
3284
  | 'PROJECT44'
3284
3285
  | 'SAMSARA'
3285
3286
  | 'SHIPROCKET';
@@ -18324,6 +18324,8 @@ export enum ColEventType {
18324
18324
 
18325
18325
  export type ColFamilyTree = {
18326
18326
  __typename?: 'ColFamilyTree';
18327
+ /** Per-tree opt-in for the weekly autonomous AI digest (BOFF-3783 consent gate). Default OFF pre-launch — the scheduled Kin Intelligence loop skips any tree that has not explicitly asked for it. Editable by tree OWNER/STEWARD via colUpdateFamilyTree. */
18328
+ aiDigestEnabled: Scalars['Boolean']['output'];
18327
18329
  /** Cover image — references a wspace-files-svc File (blobs live there). */
18328
18330
  coverFile?: Maybe<File>;
18329
18331
  createdAt: Scalars['DateTime']['output'];
@@ -18555,6 +18557,8 @@ export enum ColMemberRole {
18555
18557
  export type ColMembership = {
18556
18558
  __typename?: 'ColMembership';
18557
18559
  acceptedAt?: Maybe<Scalars['DateTime']['output']>;
18560
+ /** Per-member preference for the weekly autonomous AI digest (BOFF-3783). The loop only notifies members whose tree opted in (aiDigestEnabled), whose membership is ACTIVE, and who have not muted themselves here. A member may change this on their own membership; admins may change it for any member. */
18561
+ aiDigestNotifications: Scalars['Boolean']['output'];
18558
18562
  createdAt: Scalars['DateTime']['output'];
18559
18563
  id: Scalars['ID']['output'];
18560
18564
  invitedAt: Scalars['DateTime']['output'];
@@ -18930,6 +18934,7 @@ export type ColUpdateEventInput = {
18930
18934
  };
18931
18935
 
18932
18936
  export type ColUpdateFamilyTreeInput = {
18937
+ aiDigestEnabled?: InputMaybe<Scalars['Boolean']['input']>;
18933
18938
  coverFileId?: InputMaybe<Scalars['ID']['input']>;
18934
18939
  description?: InputMaybe<Scalars['String']['input']>;
18935
18940
  name?: InputMaybe<Scalars['String']['input']>;
@@ -18937,8 +18942,9 @@ export type ColUpdateFamilyTreeInput = {
18937
18942
  tags?: InputMaybe<Array<Scalars['String']['input']>>;
18938
18943
  };
18939
18944
 
18940
- /** Change a family-circle member's tree role and/or linked Person (BOFF-3972). Omitted fields are left unchanged; an explicit null personId unlinks the member from their Person record. */
18945
+ /** Change a family-circle member's tree role and/or linked Person (BOFF-3972). Omitted fields are left unchanged; an explicit null personId unlinks the member from their Person record. `aiDigestNotifications` is the member's weekly AI-digest preference (BOFF-3783): admins may set it for any member, and a member may set it on their OWN membership without holding a tree role (the service rejects a non-admin trying to change anything else). */
18941
18946
  export type ColUpdateMembershipInput = {
18947
+ aiDigestNotifications?: InputMaybe<Scalars['Boolean']['input']>;
18942
18948
  personId?: InputMaybe<Scalars['ID']['input']>;
18943
18949
  role?: InputMaybe<ColMemberRole>;
18944
18950
  };
@@ -73260,7 +73266,7 @@ export type Mutation = {
73260
73266
  colUntagStory: Scalars['Boolean']['output'];
73261
73267
  colUpdateEvent: ColEvent;
73262
73268
  colUpdateFamilyTree: ColFamilyTree;
73263
- /** Change a member's tree role and/or linked Person (BOFF-3972). Beyond the workspace-level directive below, the service layer requires the caller to be an ACTIVE OWNER/STEWARD of the tree, forbids changing one's own role, and reserves granting or changing OWNER for tree OWNERs. */
73269
+ /** Change a member's tree role, linked Person, and/or weekly AI-digest preference (BOFF-3972 / BOFF-3783). Beyond the workspace-level directive below, the service layer requires the caller to be an ACTIVE OWNER/STEWARD of the tree, forbids changing one's own role, and reserves granting or changing OWNER for tree OWNERs — EXCEPT that any member may change aiDigestNotifications on their own membership, with no tree role required. */
73264
73270
  colUpdateMembership: ColMembership;
73265
73271
  colUpdateMemory: ColMemory;
73266
73272
  colUpdatePerson: ColPerson;
@@ -12,6 +12,8 @@
12
12
  * (BOFF-10922) is pulled instead: MyGeotab has no push webhooks, so the
13
13
  * service signs in with the credentials entered here and polls its data feeds
14
14
  * every few minutes; the card shows the latest poll and offers "Poll now".
15
+ * A Motive feed (BOFF-10921) uses a secret generated here, shown once and
16
+ * entered on the Motive webhook, which signs with HMAC-SHA1.
15
17
  * Named carrier
16
18
  * networks (project44, FourKites, Descartes) are listed as not yet available:
17
19
  * they need vendor agreements before an adapter can ship, and the service
@@ -78,7 +80,8 @@ import {
78
80
  GEOTAB_RULE_EVENT_TYPES,
79
81
  INTEGRATION_STATUSES,
80
82
  MAX_UPDATES_PER_DELIVERY,
81
- PLANNED_ELD_PROVIDERS,
83
+ MOTIVE_ACTIONS,
84
+ MOTIVE_SIGNATURE_HEADER,
82
85
  ROADMAP_PROVIDERS,
83
86
  SAMSARA_EVENT_TYPES,
84
87
  SAMSARA_SIGNATURE_HEADERS,
@@ -218,6 +221,7 @@ function CreateIntegrationDialog({
218
221
  const [isSaving, setIsSaving] = useState(false);
219
222
  const isSamsara = provider === 'SAMSARA';
220
223
  const isGeotab = provider === 'GEOTAB';
224
+ const isMotive = provider === 'MOTIVE';
221
225
 
222
226
  const reset = () => {
223
227
  setProvider('GENERIC_WEBHOOK');
@@ -284,7 +288,7 @@ function CreateIntegrationDialog({
284
288
  apiSecret: samsaraSecret.trim(),
285
289
  ...(key ? { config: { shipmentExternalIdKey: key } } : {}),
286
290
  }
287
- : { provider: 'GENERIC_WEBHOOK', name, apiSecret: secret }
291
+ : { provider: isMotive ? 'MOTIVE' : 'GENERIC_WEBHOOK', name, apiSecret: secret }
288
292
  );
289
293
  onCreated(created, isSamsara || isGeotab ? null : secret);
290
294
  reset();
@@ -325,7 +329,9 @@ function CreateIntegrationDialog({
325
329
  ? 'e.g. Samsara fleet'
326
330
  : isGeotab
327
331
  ? 'e.g. Geotab fleet'
328
- : 'e.g. Fleet GPS feed'
332
+ : isMotive
333
+ ? 'e.g. Motive fleet'
334
+ : 'e.g. Fleet GPS feed'
329
335
  }
330
336
  onChange={(event) => setName(event.target.value)}
331
337
  autoFocus
@@ -348,6 +354,9 @@ function CreateIntegrationDialog({
348
354
  Signed webhook (any system that can send HTTPS POSTs)
349
355
  </SelectItem>
350
356
  <SelectItem value="SAMSARA">Samsara (ELD and telematics)</SelectItem>
357
+ <SelectItem value="MOTIVE">
358
+ Motive, formerly KeepTruckin (ELD and telematics)
359
+ </SelectItem>
351
360
  <SelectItem value="GEOTAB">Geotab / MyGeotab (telematics, polled)</SelectItem>
352
361
  </SelectContent>
353
362
  </Select>
@@ -485,7 +494,9 @@ function CreateIntegrationDialog({
485
494
  {secret}
486
495
  </code>
487
496
  <p className="text-xs text-text-secondary">
488
- Generated in your browser. You can copy it on the next step.
497
+ {isMotive
498
+ ? 'Generated in your browser. You can copy it on the next step and enter it as the secret on the Motive webhook.'
499
+ : 'Generated in your browser. You can copy it on the next step.'}
489
500
  </p>
490
501
  </div>
491
502
  )}
@@ -627,6 +638,43 @@ function SamsaraSetupInstructions({ url }: { url: string }) {
627
638
  );
628
639
  }
629
640
 
641
+ function MotiveSetupInstructions({ url }: { url: string }) {
642
+ return (
643
+ <div className="space-y-3">
644
+ <p className="text-sm font-medium">How to connect Motive</p>
645
+ <CopyField label="Webhook URL" value={url} />
646
+ <ol className="list-decimal space-y-1 pl-5 text-xs text-text-secondary">
647
+ <li>
648
+ In the Motive dashboard, open Admin → Developer → Webhooks and add a webhook with the URL
649
+ above, the JSON format and the signing secret shown when this feed was connected (rotate
650
+ the secret here to get a new one).
651
+ </li>
652
+ <li>
653
+ Subscribe it to{' '}
654
+ {MOTIVE_ACTIONS.map((entry, index) => (
655
+ <span key={entry.action}>
656
+ {index > 0 ? ' and ' : ''}
657
+ <code className="font-mono">{entry.action}</code> ({entry.becomes.toLowerCase()})
658
+ </span>
659
+ ))}
660
+ , then enable it. Motive sends an activation test that this feed answers automatically.
661
+ </li>
662
+ <li>
663
+ Motive deliveries carry no shipment reference, so the Motive vehicle number (or VIN) is
664
+ matched to a MoveTheWheels vehicle by its vehicle number or licence plate, and the event
665
+ goes to that vehicle&apos;s single in-progress route. Ambiguous matches are refused, never
666
+ guessed.
667
+ </li>
668
+ <li>
669
+ Motive signs every delivery with an HMAC-SHA1 of the body in{' '}
670
+ <code className="font-mono">{MOTIVE_SIGNATURE_HEADER}</code>; deliveries with a wrong
671
+ signature are refused, and a repeated Motive event is recorded once.
672
+ </li>
673
+ </ol>
674
+ </div>
675
+ );
676
+ }
677
+
630
678
  function GeotabSetupInstructions({ integration }: { integration: CarrierIntegration }) {
631
679
  return (
632
680
  <div className="space-y-3">
@@ -871,6 +919,8 @@ function IntegrationCard({
871
919
  <GeotabSetupInstructions integration={integration} />
872
920
  ) : integration.provider === 'SAMSARA' ? (
873
921
  <SamsaraSetupInstructions url={url} />
922
+ ) : integration.provider === 'MOTIVE' ? (
923
+ <MotiveSetupInstructions url={url} />
874
924
  ) : (
875
925
  <SetupInstructions url={url} />
876
926
  )}
@@ -1180,23 +1230,15 @@ function WorkspaceIntegrationsPage() {
1180
1230
  <CardContent className="space-y-2 p-5">
1181
1231
  <p className="text-sm font-medium">Carrier and ELD networks</p>
1182
1232
  <p className="text-sm text-text-secondary">
1183
- Samsara and Geotab connect directly: choose them when you connect a feed. Direct
1184
- connections to{' '}
1185
- {[
1186
- ...ROADMAP_PROVIDERS.map((provider) => provider.label),
1187
- ...PLANNED_ELD_PROVIDERS,
1188
- ].join(', ')}{' '}
1189
- are not available yet. Until they are, any carrier or telematics system that can send
1190
- HTTPS webhooks connects through a signed feed above.
1233
+ Samsara, Motive and Geotab connect directly: choose them when you connect a feed. Direct
1234
+ connections to {ROADMAP_PROVIDERS.map((provider) => provider.label).join(', ')} are not
1235
+ available yet. Until they are, any carrier or telematics system that can send HTTPS
1236
+ webhooks connects through a signed feed above.
1191
1237
  </p>
1192
1238
  <div className="flex flex-wrap gap-2">
1193
1239
  <Badge variant="default">Samsara · available</Badge>
1240
+ <Badge variant="default">Motive · available</Badge>
1194
1241
  <Badge variant="default">Geotab · available</Badge>
1195
- {PLANNED_ELD_PROVIDERS.map((label) => (
1196
- <Badge key={label} variant="outline">
1197
- {label} · not available yet
1198
- </Badge>
1199
- ))}
1200
1242
  {ROADMAP_PROVIDERS.map((provider) => (
1201
1243
  <Badge key={provider.id} variant="outline">
1202
1244
  {provider.label} · not available yet
@@ -1,11 +1,13 @@
1
1
  /**
2
2
  * Carrier and telematics integrations (BOFF-4404, Samsara in BOFF-10703,
3
- * Geotab in BOFF-10922).
3
+ * Geotab in BOFF-10922, Motive in BOFF-10921).
4
4
  *
5
5
  * A workspace connects an external carrier, ELD or GPS feed to MoveTheWheels.
6
6
  * Webhook feeds push: a generic feed is verified with HMAC-SHA256 over the
7
7
  * raw request body using a secret generated here; a Samsara feed is verified
8
- * with Samsara's own timestamped signature using the secret Samsara issues.
8
+ * with Samsara's own timestamped signature using the secret Samsara issues; a
9
+ * Motive feed is verified with Motive's HMAC-SHA1 signature using a secret
10
+ * generated here and entered on the Motive webhook.
9
11
  * Geotab has no push webhooks, so a Geotab feed is pulled: the service signs
10
12
  * in to MyGeotab with the credentials entered here and polls its data feeds
11
13
  * every few minutes. Every accepted update becomes a tracking event on the
@@ -20,7 +22,7 @@ import { resolveGraphqlUrl } from './graphqlClient';
20
22
  * Providers this page can connect. The service also ingests SHIPROCKET, which
21
23
  * is set up from the Shiprocket carrier flow rather than here.
22
24
  */
23
- export const SUPPORTED_PROVIDERS = ['GENERIC_WEBHOOK', 'SAMSARA', 'GEOTAB'] as const;
25
+ export const SUPPORTED_PROVIDERS = ['GENERIC_WEBHOOK', 'SAMSARA', 'MOTIVE', 'GEOTAB'] as const;
24
26
  export type SupportedProvider = (typeof SUPPORTED_PROVIDERS)[number];
25
27
 
26
28
  /** Providers the service pulls on a schedule instead of receiving webhooks. */
@@ -37,14 +39,18 @@ export const ROADMAP_PROVIDERS = [
37
39
  { id: 'DESCARTES', label: 'Descartes' },
38
40
  ] as const;
39
41
 
40
- /** ELD networks planned after Samsara and Geotab (BOFF-10703 follow-ups); not in the schema yet. */
41
- export const PLANNED_ELD_PROVIDERS = ['Motive'] as const;
42
-
43
42
  export const INTEGRATION_STATUSES = ['ACTIVE', 'PAUSED', 'DISABLED'] as const;
44
43
  export type IntegrationStatus = (typeof INTEGRATION_STATUSES)[number];
45
44
 
46
45
  export type IntegrationProvider =
47
- 'GENERIC_WEBHOOK' | 'SAMSARA' | 'GEOTAB' | 'SHIPROCKET' | 'PROJECT44' | 'FOURKITES' | 'DESCARTES';
46
+ | 'GENERIC_WEBHOOK'
47
+ | 'SAMSARA'
48
+ | 'MOTIVE'
49
+ | 'GEOTAB'
50
+ | 'SHIPROCKET'
51
+ | 'PROJECT44'
52
+ | 'FOURKITES'
53
+ | 'DESCARTES';
48
54
 
49
55
  /** How each provider is named on the page. */
50
56
  export function providerLabel(provider: IntegrationProvider): string {
@@ -53,6 +59,8 @@ export function providerLabel(provider: IntegrationProvider): string {
53
59
  return 'Signed webhook';
54
60
  case 'SAMSARA':
55
61
  return 'Samsara';
62
+ case 'MOTIVE':
63
+ return 'Motive';
56
64
  case 'GEOTAB':
57
65
  return 'Geotab';
58
66
  case 'SHIPROCKET':
@@ -74,6 +82,15 @@ export const SAMSARA_EVENT_TYPES = [
74
82
  { type: 'GeofenceExit', becomes: 'DEPARTED' },
75
83
  ] as const;
76
84
 
85
+ /** Motive webhook actions the service turns into tracking events. */
86
+ export const MOTIVE_ACTIONS = [
87
+ { action: 'vehicle_geofence_event', becomes: 'Arrived on geofence entry, Departed on exit' },
88
+ { action: 'vehicle_location_updated', becomes: 'In transit, with the reported position' },
89
+ ] as const;
90
+
91
+ /** Header Motive signs each delivery with (hex HMAC-SHA1 of the raw body); the gateway forwards it. */
92
+ export const MOTIVE_SIGNATURE_HEADER = 'X-KT-Webhook-Signature';
93
+
77
94
  /** Route or stop external id key the service reads the shipment reference from by default. */
78
95
  export const DEFAULT_SAMSARA_SHIPMENT_KEY = 'mtwShipment';
79
96