@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.
@@ -13,11 +13,50 @@ var t = [
13
13
  id: "DESCARTES",
14
14
  label: "Descartes"
15
15
  }
16
- ], n = [
16
+ ], n = ["Motive", "Geotab"], r = [
17
17
  "ACTIVE",
18
18
  "PAUSED",
19
19
  "DISABLED"
20
- ], r = [
20
+ ];
21
+ function i(e) {
22
+ switch (e) {
23
+ case "GENERIC_WEBHOOK": return "Signed webhook";
24
+ case "SAMSARA": return "Samsara";
25
+ case "SHIPROCKET": return "Shiprocket";
26
+ case "PROJECT44": return "project44";
27
+ case "FOURKITES": return "FourKites";
28
+ case "DESCARTES": return "Descartes";
29
+ }
30
+ }
31
+ var a = [
32
+ {
33
+ type: "RouteStopArrival",
34
+ becomes: "ARRIVED"
35
+ },
36
+ {
37
+ type: "RouteStopDeparture",
38
+ becomes: "DEPARTED"
39
+ },
40
+ {
41
+ type: "GeofenceEntry",
42
+ becomes: "ARRIVED"
43
+ },
44
+ {
45
+ type: "GeofenceExit",
46
+ becomes: "DEPARTED"
47
+ }
48
+ ], o = "mtwShipment";
49
+ function s(e) {
50
+ let t = e.trim(), n = "Paste the secret key exactly as Samsara shows it on the webhook page.";
51
+ if (!t || t.length % 4 != 0 || !/^[A-Za-z0-9+/]+={0,2}$/.test(t)) return n;
52
+ let r = t.endsWith("==") ? 2 : +!!t.endsWith("=");
53
+ return t.length / 4 * 3 - r < 16 ? n : null;
54
+ }
55
+ function c(e) {
56
+ let t = e.trim();
57
+ 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;
58
+ }
59
+ var l = ["X-Samsara-Signature", "X-Samsara-Timestamp"], u = [
21
60
  "CREATED",
22
61
  "PICKED_UP",
23
62
  "IN_TRANSIT",
@@ -27,41 +66,41 @@ var t = [
27
66
  "DELIVERED",
28
67
  "FAILED",
29
68
  "RETURNED"
30
- ], i = "x-webhook-signature", a = "\n id\n workspaceId\n provider\n name\n status\n lastSyncAt\n lastErrorAt\n lastErrorMessage\n createdAt\n updatedAt\n", o = `
69
+ ], d = "x-webhook-signature", f = "\n id\n workspaceId\n provider\n name\n status\n lastSyncAt\n lastErrorAt\n lastErrorMessage\n createdAt\n updatedAt\n", p = `
31
70
  query MtwCarrierIntegrations($filter: IntegrationFilterInput, $pagination: PaginationInput) {
32
71
  integrations(filter: $filter, pagination: $pagination) {
33
- ${a}
72
+ ${f}
34
73
  }
35
74
  integrationsCount(filter: $filter)
36
75
  }
37
- `, s = "\n query MtwCarrierIntegrationCounts {\n all: integrationsCount\n active: integrationsCount(filter: { status: ACTIVE })\n }\n", c = "\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", l = `
76
+ `, m = "\n query MtwCarrierIntegrationCounts {\n all: integrationsCount\n active: integrationsCount(filter: { status: ACTIVE })\n }\n", h = "\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", g = `
38
77
  mutation CreateMtwCarrierIntegration($input: CreateIntegrationInput!) {
39
78
  createIntegration(input: $input) {
40
- ${a}
79
+ ${f}
41
80
  }
42
81
  }
43
- `, u = `
82
+ `, _ = `
44
83
  mutation UpdateMtwCarrierIntegration($id: ID!, $input: UpdateIntegrationInput!) {
45
84
  updateIntegration(id: $id, input: $input) {
46
- ${a}
85
+ ${f}
47
86
  }
48
87
  }
49
- `, d = "\n mutation DeleteMtwCarrierIntegration($id: ID!) {\n deleteIntegration(id: $id)\n }\n";
50
- function f(e = globalThis.crypto) {
88
+ `, v = "\n mutation DeleteMtwCarrierIntegration($id: ID!) {\n deleteIntegration(id: $id)\n }\n";
89
+ function y(e = globalThis.crypto) {
51
90
  let t = e.getRandomValues(new Uint8Array(32));
52
91
  return Array.from(t, (e) => e.toString(16).padStart(2, "0")).join("");
53
92
  }
54
- function p(e) {
93
+ function b(e) {
55
94
  return e.trim().length < 32 ? "Use a signing secret of at least 32 characters." : null;
56
95
  }
57
- function m(e) {
96
+ function x(e) {
58
97
  let t = e.trim();
59
98
  return t ? t.length > 120 ? "Keep the name under 120 characters." : null : "Give the integration a name.";
60
99
  }
61
- function h(t, n, r, i) {
100
+ function S(t, n, r, i) {
62
101
  return `${new URL(e(t), i).origin}/api/integrations/webhook/${n}/${r}`;
63
102
  }
64
- function g(e = /* @__PURE__ */ new Date()) {
103
+ function C(e = /* @__PURE__ */ new Date()) {
65
104
  return JSON.stringify({
66
105
  externalEventId: "evt_0001",
67
106
  trackingNumber: "YOUR-TRACKING-NUMBER",
@@ -75,31 +114,31 @@ function g(e = /* @__PURE__ */ new Date()) {
75
114
  details: "Departed origin hub"
76
115
  }, null, 2);
77
116
  }
78
- function _(e) {
117
+ function w(e) {
79
118
  return `'${e.split("'").join("'\\''")}'`;
80
119
  }
81
- function v(e) {
120
+ function T(e) {
82
121
  return [
83
122
  "BODY='{\"externalEventId\":\"evt_0001\",\"trackingNumber\":\"YOUR-TRACKING-NUMBER\",\"eventType\":\"IN_TRANSIT\"}'",
84
123
  "SIG=$(printf '%s' \"$BODY\" | openssl dgst -sha256 -hmac \"$MTW_WEBHOOK_SECRET\" -hex | sed 's/^.* //')",
85
- `curl -X POST ${_(e)} \\`,
124
+ `curl -X POST ${w(e)} \\`,
86
125
  " -H 'Content-Type: application/json' \\",
87
- ` -H "${i}: sha256=$SIG" \\`,
126
+ ` -H "${d}: sha256=$SIG" \\`,
88
127
  " --data \"$BODY\""
89
128
  ].join("\n");
90
129
  }
91
- function y(e) {
130
+ function E(e) {
92
131
  let t = e.toLowerCase().split("_").join(" ");
93
132
  return t.charAt(0).toUpperCase() + t.slice(1);
94
133
  }
95
- function b(e) {
134
+ function D(e) {
96
135
  return e === "ACTIVE" ? "default" : e === "PAUSED" ? "secondary" : "outline";
97
136
  }
98
- function x(e) {
137
+ function O(e) {
99
138
  return e === "ACCEPTED" ? "default" : e === "DUPLICATE" || e === "PARTIAL" || e === "RECEIVED" ? "secondary" : "destructive";
100
139
  }
101
- function S(e) {
140
+ function k(e) {
102
141
  return 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.";
103
142
  }
104
143
  //#endregion
105
- export { l as CREATE_INTEGRATION_MUTATION, d as DELETE_INTEGRATION_MUTATION, s as INTEGRATION_COUNTS_QUERY, c as INTEGRATION_EVENTS_QUERY, n as INTEGRATION_STATUSES, o as LIST_INTEGRATIONS_QUERY, t as ROADMAP_PROVIDERS, i as SIGNATURE_HEADER, r as TRACKING_EVENT_TYPES, u as UPDATE_INTEGRATION_MUTATION, v as curlExample, x as eventStatusTone, g as examplePayload, f as generateSigningSecret, y as humanize, m as integrationNameError, b as integrationStatusTone, p as signingSecretError, S as statusExplanation, h as webhookUrl };
144
+ export { g as CREATE_INTEGRATION_MUTATION, o as DEFAULT_SAMSARA_SHIPMENT_KEY, v as DELETE_INTEGRATION_MUTATION, m as INTEGRATION_COUNTS_QUERY, h as INTEGRATION_EVENTS_QUERY, r as INTEGRATION_STATUSES, p as LIST_INTEGRATIONS_QUERY, n as PLANNED_ELD_PROVIDERS, t as ROADMAP_PROVIDERS, a as SAMSARA_EVENT_TYPES, l as SAMSARA_SIGNATURE_HEADERS, d as SIGNATURE_HEADER, u as TRACKING_EVENT_TYPES, _ as UPDATE_INTEGRATION_MUTATION, T as curlExample, O as eventStatusTone, C as examplePayload, c as externalIdKeyError, y as generateSigningSecret, E as humanize, x as integrationNameError, D as integrationStatusTone, i as providerLabel, s as samsaraSecretError, b as signingSecretError, k as statusExplanation, S as webhookUrl };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@burdenoff/microfe-movethewheels",
3
- "version": "2026.1107.3",
3
+ "version": "2026.1107.4",
4
4
  "description": "Burdenoff MoveTheWheels Microfrontend - Logistics & Supply Chain Management Platform",
5
5
  "type": "module",
6
6
  "files": [
@@ -3036,6 +3036,7 @@ export type MtwIntegrationProvider =
3036
3036
  | 'FOURKITES'
3037
3037
  | 'GENERIC_WEBHOOK'
3038
3038
  | 'PROJECT44'
3039
+ | 'SAMSARA'
3039
3040
  | 'SHIPROCKET';
3040
3041
 
3041
3042
  export type MtwInventoryItem = {