@burdenoff/microfe-movethewheels 2026.1028.1 → 2026.1031.1

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.
Files changed (40) hide show
  1. package/dist/MoveTheWheelsRoot.js +130 -122
  2. package/dist/MoveTheWheelsRoutes.js +55 -51
  3. package/dist/components/ExportStatusBanner.js +53 -0
  4. package/dist/components/marketplace/MarketplaceDialogs.js +524 -0
  5. package/dist/generated/wspace-types.d.ts +30737 -8505
  6. package/dist/hooks/useEntityExport.js +85 -0
  7. package/dist/hooks/useMarketplace.js +265 -0
  8. package/dist/movethewheels/components/ExportStatusBanner.d.ts +7 -0
  9. package/dist/movethewheels/components/marketplace/MarketplaceDialogs.d.ts +18 -0
  10. package/dist/movethewheels/hooks/useEntityExport.d.ts +32 -0
  11. package/dist/movethewheels/hooks/useMarketplace.d.ts +121 -0
  12. package/dist/movethewheels/pages/MarketplacePage.d.ts +1 -0
  13. package/dist/movethewheels/utils/entityExport.d.ts +64 -0
  14. package/dist/node_modules/lucide-react/dist/esm/icons/badge-check.js +11 -0
  15. package/dist/node_modules/lucide-react/dist/esm/icons/chevron-down.js +8 -0
  16. package/dist/node_modules/lucide-react/dist/esm/icons/chevron-up.js +8 -0
  17. package/dist/node_modules/lucide-react/dist/esm/icons/pencil.js +11 -0
  18. package/dist/node_modules/lucide-react/dist/esm/icons/store.js +26 -0
  19. package/dist/pages/CustomersPage.js +64 -58
  20. package/dist/pages/DriversPage.js +113 -107
  21. package/dist/pages/MarketplacePage.js +503 -0
  22. package/dist/pages/OrdersListPage.js +85 -79
  23. package/dist/pages/ProductsPage.js +63 -57
  24. package/dist/pages/VehiclesPage.js +91 -85
  25. package/dist/utils/entityExport.js +54 -0
  26. package/package.json +3 -2
  27. package/src/generated/wspace-types.ts +34017 -8803
  28. package/src/movethewheels/MoveTheWheelsRoot.tsx +8 -0
  29. package/src/movethewheels/MoveTheWheelsRoutes.tsx +4 -0
  30. package/src/movethewheels/components/ExportStatusBanner.tsx +78 -0
  31. package/src/movethewheels/components/marketplace/MarketplaceDialogs.tsx +633 -0
  32. package/src/movethewheels/hooks/useEntityExport.ts +130 -0
  33. package/src/movethewheels/hooks/useMarketplace.ts +526 -0
  34. package/src/movethewheels/pages/CustomersPage.tsx +11 -2
  35. package/src/movethewheels/pages/DriversPage.tsx +11 -2
  36. package/src/movethewheels/pages/MarketplacePage.tsx +571 -0
  37. package/src/movethewheels/pages/OrdersListPage.tsx +13 -2
  38. package/src/movethewheels/pages/ProductsPage.tsx +11 -2
  39. package/src/movethewheels/pages/VehiclesPage.tsx +11 -2
  40. package/src/movethewheels/utils/entityExport.ts +140 -0
@@ -0,0 +1,85 @@
1
+ import { useMoveTheWheels as e } from "../providers/MoveTheWheelsProvider.js";
2
+ import { executeGraphQL as t } from "../utils/graphqlClient.js";
3
+ import { GET_MTW_EXPORT_JOB_QUERY as n, MTW_EXPORT_ENTITY_TYPES as r, START_MTW_EXPORT_MUTATION as i, triggerUrlDownload as a, waitForExportJob as o } from "../utils/entityExport.js";
4
+ import { useCallback as s, useEffect as c, useMemo as l, useRef as u, useState as d } from "react";
5
+ //#region src/movethewheels/hooks/useEntityExport.ts
6
+ function f(f, p) {
7
+ let { apiGatewayUrl: m, authToken: h, workspaceToken: g, workspaceId: _, tenantId: v, currentUser: y } = e(), [b, x] = d({ phase: "idle" }), S = u(null), C = u(!1), w = l(() => ({
8
+ apiGatewayUrl: m,
9
+ authToken: h,
10
+ workspaceToken: g,
11
+ workspaceId: _,
12
+ tenantId: v,
13
+ actorId: y?.id
14
+ }), [
15
+ m,
16
+ h,
17
+ g,
18
+ _,
19
+ v,
20
+ y?.id
21
+ ]);
22
+ c(() => () => S.current?.abort(), []);
23
+ let T = s(() => {
24
+ if (C.current) return;
25
+ if (!_) {
26
+ x({
27
+ phase: "error",
28
+ message: "Select a workspace before exporting."
29
+ });
30
+ return;
31
+ }
32
+ S.current?.abort();
33
+ let e = new AbortController();
34
+ S.current = e, x({
35
+ phase: "running",
36
+ message: `Preparing your ${p} export…`
37
+ }), (async () => {
38
+ C.current = !0;
39
+ try {
40
+ let s = await o((await t(w, i, { input: {
41
+ workspaceId: _,
42
+ entityTypes: [r[f]],
43
+ format: "CSV",
44
+ includeMetadata: !0
45
+ } }, "SINGLE_ATTEMPT")).exportMtwEntities, async (r) => (await t({
46
+ ...w,
47
+ signal: e.signal
48
+ }, n, { id: r })).getExportJob, { signal: e.signal });
49
+ if (e.signal.aborted) return;
50
+ s.kind === "ready" ? (a(s.downloadUrl), x({
51
+ phase: "ready",
52
+ message: `Your ${p} export is downloading.`
53
+ })) : s.kind === "pending" ? x({
54
+ phase: "pending",
55
+ jobId: s.jobId,
56
+ message: `Your ${p} export is still being prepared. It will be available on the Exports page when it finishes.`
57
+ }) : x({
58
+ phase: "error",
59
+ message: `Export failed: ${s.message}`
60
+ });
61
+ } catch (t) {
62
+ if (e.signal.aborted) return;
63
+ x({
64
+ phase: "error",
65
+ message: t instanceof Error && t.message ? `Export failed: ${t.message}` : "Export failed. Please try again."
66
+ });
67
+ } finally {
68
+ C.current = !1;
69
+ }
70
+ })();
71
+ }, [
72
+ f,
73
+ w,
74
+ p,
75
+ _
76
+ ]), E = s(() => x({ phase: "idle" }), []);
77
+ return {
78
+ state: b,
79
+ isExporting: b.phase === "running",
80
+ startExport: T,
81
+ dismiss: E
82
+ };
83
+ }
84
+ //#endregion
85
+ export { f as useEntityExport };
@@ -0,0 +1,265 @@
1
+ import { useMoveTheWheels as e } from "../providers/MoveTheWheelsProvider.js";
2
+ import { executeGraphQL as t } from "../utils/graphqlClient.js";
3
+ import { useCallback as n, useEffect as r, useMemo as i, useState as a } from "react";
4
+ //#region src/movethewheels/hooks/useMarketplace.ts
5
+ var o = [
6
+ "CARRIER",
7
+ "FREIGHT_FORWARDER",
8
+ "THIRD_PARTY_LOGISTICS",
9
+ "WAREHOUSE",
10
+ "CUSTOMS_BROKER",
11
+ "LAST_MILE",
12
+ "COURIER",
13
+ "OTHER"
14
+ ], s = [
15
+ "FULL_TRUCKLOAD",
16
+ "LESS_THAN_TRUCKLOAD",
17
+ "LAST_MILE",
18
+ "EXPRESS",
19
+ "OCEAN_FREIGHT",
20
+ "AIR_FREIGHT",
21
+ "RAIL_FREIGHT",
22
+ "WAREHOUSING",
23
+ "CUSTOMS_CLEARANCE",
24
+ "COLD_CHAIN",
25
+ "OTHER"
26
+ ], c = [
27
+ "AVAILABLE",
28
+ "LIMITED",
29
+ "UNAVAILABLE"
30
+ ];
31
+ function l(e) {
32
+ let t = e.toLowerCase().split("_").join(" ");
33
+ return t.charAt(0).toUpperCase() + t.slice(1);
34
+ }
35
+ var u = "\n id\n name\n type\n description\n rating\n contactInfo\n services\n serviceAreas\n isVerified\n isActive\n offeringsCount\n createdAt\n", d = "\n id\n providerId\n name\n description\n category\n price\n currency\n pricingUnit\n transitDays\n availability\n isActive\n", f = `
36
+ query ListMtwServiceProviders($filter: MtwServiceProviderFilterInput, $pagination: PaginationInput) {
37
+ serviceProviders(filter: $filter, pagination: $pagination) {
38
+ ${u}
39
+ }
40
+ serviceProvidersCount(filter: $filter)
41
+ }
42
+ `, p = "\n query MtwMarketplaceStats {\n marketplaceStats {\n providers\n verifiedProviders\n activeProviders\n offerings\n avgRating\n }\n }\n", m = `
43
+ query ListMtwServiceOfferings($filter: MtwServiceOfferingFilterInput, $pagination: PaginationInput) {
44
+ serviceOfferings(filter: $filter, pagination: $pagination) {
45
+ ${d}
46
+ }
47
+ }
48
+ `, h = "\n query MtwProviderShipments($filter: ShipmentFilterInput, $pagination: PaginationInput) {\n shipments(filter: $filter, pagination: $pagination) {\n id\n shipmentNumber\n status\n }\n shipmentsCount(filter: $filter)\n }\n", g = `
49
+ mutation CreateMtwServiceProvider($input: MtwCreateServiceProviderInput!) {
50
+ createServiceProvider(input: $input) {
51
+ ${u}
52
+ }
53
+ }
54
+ `, _ = `
55
+ mutation UpdateMtwServiceProvider($id: ID!, $input: MtwUpdateServiceProviderInput!) {
56
+ updateServiceProvider(id: $id, input: $input) {
57
+ ${u}
58
+ }
59
+ }
60
+ `, v = "\n mutation DeleteMtwServiceProvider($id: ID!) {\n deleteServiceProvider(id: $id)\n }\n", y = `
61
+ mutation CreateMtwServiceOffering($input: MtwCreateServiceOfferingInput!) {
62
+ createServiceOffering(input: $input) {
63
+ ${d}
64
+ }
65
+ }
66
+ `, b = `
67
+ mutation UpdateMtwServiceOffering($id: ID!, $input: MtwUpdateServiceOfferingInput!) {
68
+ updateServiceOffering(id: $id, input: $input) {
69
+ ${d}
70
+ }
71
+ }
72
+ `, x = "\n mutation DeleteMtwServiceOffering($id: ID!) {\n deleteServiceOffering(id: $id)\n }\n", S = "\n mutation AssignMtwShipmentServiceProvider($shipmentId: ID!, $providerId: ID) {\n assignShipmentServiceProvider(shipmentId: $shipmentId, providerId: $providerId) {\n id\n shipmentNumber\n carrierId\n }\n }\n";
73
+ function C(e) {
74
+ if (!e || typeof e != "object" || Array.isArray(e)) return {};
75
+ let t = e, n = (e) => typeof t[e] == "string" && t[e].trim() ? t[e] : void 0;
76
+ return {
77
+ contactName: n("contactName"),
78
+ email: n("email"),
79
+ phone: n("phone"),
80
+ website: n("website")
81
+ };
82
+ }
83
+ function w(e) {
84
+ return {
85
+ id: e.id,
86
+ name: e.name,
87
+ type: e.type,
88
+ description: e.description ?? null,
89
+ rating: e.rating ?? null,
90
+ contact: C(e.contactInfo),
91
+ services: e.services,
92
+ serviceAreas: e.serviceAreas,
93
+ isVerified: e.isVerified,
94
+ isActive: e.isActive,
95
+ offeringsCount: e.offeringsCount,
96
+ createdAt: e.createdAt
97
+ };
98
+ }
99
+ function T() {
100
+ let { apiGatewayUrl: t, authToken: n, workspaceToken: r, workspaceId: a, tenantId: o, currentUser: s } = e();
101
+ return i(() => ({
102
+ apiGatewayUrl: t,
103
+ authToken: n,
104
+ workspaceToken: r,
105
+ workspaceId: a,
106
+ tenantId: o,
107
+ actorId: s?.id
108
+ }), [
109
+ t,
110
+ n,
111
+ r,
112
+ a,
113
+ o,
114
+ s?.id
115
+ ]);
116
+ }
117
+ function E(e, t) {
118
+ return e instanceof Error ? e : Error(t);
119
+ }
120
+ function D(e) {
121
+ let i = T(), { limit: o, offset: s } = e, { search: c, type: l, isVerified: u } = e.filters, [d, p] = a([]), [m, h] = a(0), [g, _] = a(!1), [v, y] = a(null), b = n(async () => {
122
+ _(!0), y(null);
123
+ try {
124
+ let e = await t(i, f, {
125
+ filter: {
126
+ search: c?.trim() || void 0,
127
+ type: l,
128
+ isVerified: u
129
+ },
130
+ pagination: {
131
+ limit: o,
132
+ offset: s
133
+ }
134
+ });
135
+ p(e.serviceProviders.map(w)), h(e.serviceProvidersCount);
136
+ } catch (e) {
137
+ y(E(e, "Failed to load service providers"));
138
+ } finally {
139
+ _(!1);
140
+ }
141
+ }, [
142
+ i,
143
+ c,
144
+ l,
145
+ u,
146
+ o,
147
+ s
148
+ ]);
149
+ return r(() => {
150
+ b();
151
+ }, [b]), {
152
+ providers: d,
153
+ total: m,
154
+ isLoading: g,
155
+ error: v,
156
+ refetch: b
157
+ };
158
+ }
159
+ function O(e) {
160
+ let n = T(), [i, o] = a(null);
161
+ return r(() => {
162
+ let e = !1;
163
+ return t(n, p).then((t) => {
164
+ e || o(t.marketplaceStats);
165
+ }).catch(() => {
166
+ e || o(null);
167
+ }), () => {
168
+ e = !0;
169
+ };
170
+ }, [n, e]), i;
171
+ }
172
+ function k(e, n) {
173
+ let i = T(), [o, s] = a([]), [c, l] = a(!1), [u, d] = a(null);
174
+ return r(() => {
175
+ if (!e) {
176
+ s([]);
177
+ return;
178
+ }
179
+ let n = !1;
180
+ return l(!0), d(null), t(i, m, {
181
+ filter: { providerId: e },
182
+ pagination: {
183
+ limit: 100,
184
+ offset: 0
185
+ }
186
+ }).then((e) => {
187
+ n || s(e.serviceOfferings);
188
+ }).catch((e) => {
189
+ n || d(E(e, "Failed to load offerings"));
190
+ }).finally(() => {
191
+ n || l(!1);
192
+ }), () => {
193
+ n = !0;
194
+ };
195
+ }, [
196
+ i,
197
+ e,
198
+ n
199
+ ]), {
200
+ offerings: o,
201
+ isLoading: c,
202
+ error: u
203
+ };
204
+ }
205
+ function A(e) {
206
+ let i = T(), { search: o, carrierId: s, limit: c } = e, [l, u] = a([]), [d, f] = a(0), [p, m] = a(!1), g = n(async () => {
207
+ m(!0);
208
+ try {
209
+ let e = await t(i, h, {
210
+ filter: {
211
+ search: o?.trim() || void 0,
212
+ carrierId: s
213
+ },
214
+ pagination: {
215
+ limit: c,
216
+ offset: 0
217
+ }
218
+ });
219
+ u(e.shipments), f(e.shipmentsCount);
220
+ } catch {
221
+ u([]), f(0);
222
+ } finally {
223
+ m(!1);
224
+ }
225
+ }, [
226
+ i,
227
+ o,
228
+ s,
229
+ c
230
+ ]);
231
+ return r(() => {
232
+ g();
233
+ }, [g]), {
234
+ shipments: l,
235
+ total: d,
236
+ isLoading: p,
237
+ refetch: g
238
+ };
239
+ }
240
+ function j() {
241
+ let e = T();
242
+ return i(() => ({
243
+ createProvider: async (n) => w((await t(e, g, { input: n })).createServiceProvider),
244
+ updateProvider: async (n, r) => w((await t(e, _, {
245
+ id: n,
246
+ input: r
247
+ })).updateServiceProvider),
248
+ deleteProvider: async (n) => (await t(e, v, { id: n })).deleteServiceProvider,
249
+ createOffering: async (n, r) => (await t(e, y, { input: {
250
+ ...r,
251
+ providerId: n
252
+ } })).createServiceOffering,
253
+ updateOffering: async (n, r) => (await t(e, b, {
254
+ id: n,
255
+ input: r
256
+ })).updateServiceOffering,
257
+ deleteOffering: async (n) => (await t(e, x, { id: n })).deleteServiceOffering,
258
+ assignShipment: async (n, r) => (await t(e, S, {
259
+ shipmentId: n,
260
+ providerId: r
261
+ })).assignShipmentServiceProvider
262
+ }), [e]);
263
+ }
264
+ //#endregion
265
+ export { c as AVAILABILITIES, s as OFFERING_CATEGORIES, o as PROVIDER_TYPES, l as humanizeEnum, j as useMarketplaceActions, O as useMarketplaceStats, k as useProviderOfferings, D as useServiceProviders, A as useShipmentOptions };
@@ -0,0 +1,7 @@
1
+ import { EntityExportState } from '../hooks/useEntityExport';
2
+ interface ExportStatusBannerProps {
3
+ state: EntityExportState;
4
+ onDismiss: () => void;
5
+ }
6
+ export declare function ExportStatusBanner({ state, onDismiss }: ExportStatusBannerProps): import('react').JSX.Element | null;
7
+ export {};
@@ -0,0 +1,18 @@
1
+ import { ServiceOffering, ServiceProvider } from '../../hooks/useMarketplace';
2
+ interface DialogBaseProps {
3
+ open: boolean;
4
+ onOpenChange: (open: boolean) => void;
5
+ /** Called after a successful write with a short human-readable summary. */
6
+ onDone: (message: string) => void;
7
+ }
8
+ export declare function ProviderDialog({ open, onOpenChange, onDone, provider, }: DialogBaseProps & {
9
+ provider: ServiceProvider | null;
10
+ }): import('react').JSX.Element;
11
+ export declare function OfferingDialog({ open, onOpenChange, onDone, provider, offering, }: DialogBaseProps & {
12
+ provider: ServiceProvider | null;
13
+ offering: ServiceOffering | null;
14
+ }): import('react').JSX.Element;
15
+ export declare function AssignShipmentDialog({ open, onOpenChange, onDone, provider, }: DialogBaseProps & {
16
+ provider: ServiceProvider | null;
17
+ }): import('react').JSX.Element;
18
+ export {};
@@ -0,0 +1,32 @@
1
+ import { MtwExportEntity } from '../utils/entityExport';
2
+ export type EntityExportState = {
3
+ phase: 'idle';
4
+ } | {
5
+ phase: 'running';
6
+ message: string;
7
+ } | {
8
+ phase: 'ready';
9
+ message: string;
10
+ } | {
11
+ phase: 'pending';
12
+ message: string;
13
+ jobId: string;
14
+ } | {
15
+ phase: 'error';
16
+ message: string;
17
+ };
18
+ export interface UseEntityExportResult {
19
+ state: EntityExportState;
20
+ isExporting: boolean;
21
+ /** Start a CSV export of every record of this entity in the workspace. */
22
+ startExport: () => void;
23
+ dismiss: () => void;
24
+ }
25
+ /**
26
+ * Drives the list-page "Export" action: starts an `exportMtwEntities` job for
27
+ * the page's entity type, waits for wspace-export-svc to build the archive and
28
+ * starts the download. A job that takes longer than the wait budget keeps
29
+ * running and is reported as pending, with its id, so the user can collect it
30
+ * from the shared Exports page.
31
+ */
32
+ export declare function useEntityExport(entity: MtwExportEntity, label: string): UseEntityExportResult;
@@ -0,0 +1,121 @@
1
+ export declare const PROVIDER_TYPES: readonly ["CARRIER", "FREIGHT_FORWARDER", "THIRD_PARTY_LOGISTICS", "WAREHOUSE", "CUSTOMS_BROKER", "LAST_MILE", "COURIER", "OTHER"];
2
+ export type ProviderType = (typeof PROVIDER_TYPES)[number];
3
+ export declare const OFFERING_CATEGORIES: readonly ["FULL_TRUCKLOAD", "LESS_THAN_TRUCKLOAD", "LAST_MILE", "EXPRESS", "OCEAN_FREIGHT", "AIR_FREIGHT", "RAIL_FREIGHT", "WAREHOUSING", "CUSTOMS_CLEARANCE", "COLD_CHAIN", "OTHER"];
4
+ export type OfferingCategory = (typeof OFFERING_CATEGORIES)[number];
5
+ export declare const AVAILABILITIES: readonly ["AVAILABLE", "LIMITED", "UNAVAILABLE"];
6
+ export type Availability = (typeof AVAILABILITIES)[number];
7
+ /** "THIRD_PARTY_LOGISTICS" → "Third party logistics". */
8
+ export declare function humanizeEnum(value: string): string;
9
+ export interface ProviderContact {
10
+ contactName?: string;
11
+ email?: string;
12
+ phone?: string;
13
+ website?: string;
14
+ }
15
+ export interface ServiceOffering {
16
+ id: string;
17
+ providerId: string;
18
+ name: string;
19
+ description: string | null;
20
+ category: OfferingCategory;
21
+ price: number | null;
22
+ currency: string;
23
+ pricingUnit: string | null;
24
+ transitDays: number | null;
25
+ availability: Availability;
26
+ isActive: boolean;
27
+ }
28
+ export interface ServiceProvider {
29
+ id: string;
30
+ name: string;
31
+ type: ProviderType;
32
+ description: string | null;
33
+ rating: number | null;
34
+ contact: ProviderContact;
35
+ services: string[];
36
+ serviceAreas: string[];
37
+ isVerified: boolean;
38
+ isActive: boolean;
39
+ offeringsCount: number;
40
+ createdAt: string;
41
+ }
42
+ export interface MarketplaceStats {
43
+ providers: number;
44
+ verifiedProviders: number;
45
+ activeProviders: number;
46
+ offerings: number;
47
+ avgRating: number | null;
48
+ }
49
+ export interface ProviderFilters {
50
+ search?: string;
51
+ type?: ProviderType;
52
+ isVerified?: boolean;
53
+ }
54
+ export interface ProviderInput {
55
+ name: string;
56
+ type: ProviderType;
57
+ description: string | null;
58
+ rating: number | null;
59
+ contactInfo: ProviderContact | null;
60
+ services: string[];
61
+ serviceAreas: string[];
62
+ isVerified: boolean;
63
+ isActive: boolean;
64
+ }
65
+ export interface OfferingInput {
66
+ name: string;
67
+ category: OfferingCategory;
68
+ description: string | null;
69
+ price: number | null;
70
+ currency: string;
71
+ pricingUnit: string | null;
72
+ transitDays: number | null;
73
+ availability: Availability;
74
+ isActive: boolean;
75
+ }
76
+ export declare function useServiceProviders(options: {
77
+ filters: ProviderFilters;
78
+ limit: number;
79
+ offset: number;
80
+ }): {
81
+ providers: ServiceProvider[];
82
+ total: number;
83
+ isLoading: boolean;
84
+ error: Error | null;
85
+ refetch: () => Promise<void>;
86
+ };
87
+ export declare function useMarketplaceStats(refreshKey: number): MarketplaceStats | null;
88
+ export declare function useProviderOfferings(providerId: string | null, refreshKey: number): {
89
+ offerings: ServiceOffering[];
90
+ isLoading: boolean;
91
+ error: Error | null;
92
+ };
93
+ export interface ShipmentOption {
94
+ id: string;
95
+ shipmentNumber: string;
96
+ status: string;
97
+ }
98
+ /** Shipments, optionally only those whose carrier is the given provider. */
99
+ export declare function useShipmentOptions(options: {
100
+ search?: string;
101
+ carrierId?: string;
102
+ limit: number;
103
+ }): {
104
+ shipments: ShipmentOption[];
105
+ total: number;
106
+ isLoading: boolean;
107
+ refetch: () => Promise<void>;
108
+ };
109
+ export declare function useMarketplaceActions(): {
110
+ createProvider: (input: ProviderInput) => Promise<ServiceProvider>;
111
+ updateProvider: (id: string, input: Partial<ProviderInput>) => Promise<ServiceProvider>;
112
+ deleteProvider: (id: string) => Promise<boolean>;
113
+ createOffering: (providerId: string, input: OfferingInput) => Promise<ServiceOffering>;
114
+ updateOffering: (id: string, input: Partial<OfferingInput>) => Promise<ServiceOffering>;
115
+ deleteOffering: (id: string) => Promise<boolean>;
116
+ assignShipment: (shipmentId: string, providerId: string | null) => Promise<{
117
+ id: string;
118
+ shipmentNumber: string;
119
+ carrierId: string | null;
120
+ }>;
121
+ };
@@ -0,0 +1 @@
1
+ export default function MarketplacePage(): import('react').JSX.Element;
@@ -0,0 +1,64 @@
1
+ /**
2
+ * Entity export — starts a MoveTheWheels export job and waits for its archive.
3
+ *
4
+ * `exportMtwEntities` hands the request to wspace-export-svc, which builds a
5
+ * ZIP of the workspace's records in the background. The job is read back with
6
+ * `getExportJob` until it reports COMPLETED (with a presigned `downloadUrl`),
7
+ * FAILED/CANCELLED/EXPIRED, or the wait budget runs out. A job that is still
8
+ * running when the budget is spent keeps going server side and stays
9
+ * downloadable from the shared Exports page.
10
+ *
11
+ * Kept free of React so the polling contract can be unit-tested.
12
+ */
13
+ /** List pages that offer an export, mapped to wspace-export-svc entity types. */
14
+ export declare const MTW_EXPORT_ENTITY_TYPES: {
15
+ readonly customers: "movethewheels_customers";
16
+ readonly drivers: "movethewheels_drivers";
17
+ readonly orders: "movethewheels_delivery_jobs";
18
+ readonly products: "movethewheels_cargo_items";
19
+ readonly vehicles: "movethewheels_vehicles";
20
+ };
21
+ export type MtwExportEntity = keyof typeof MTW_EXPORT_ENTITY_TYPES;
22
+ export declare const START_MTW_EXPORT_MUTATION = "\n mutation StartMovethewheelsEntityExport($input: ExportMtwEntitiesInput!) {\n exportMtwEntities(input: $input) {\n id\n status\n downloadUrl\n }\n }\n";
23
+ export declare const GET_MTW_EXPORT_JOB_QUERY = "\n query GetMovethewheelsExportJob($id: ID!) {\n getExportJob(id: $id) {\n id\n status\n progress\n downloadUrl\n errorMessage\n }\n }\n";
24
+ export interface ExportJobSnapshot {
25
+ id: string;
26
+ status: string;
27
+ progress?: number | null;
28
+ downloadUrl?: string | null;
29
+ errorMessage?: string | null;
30
+ }
31
+ export type ExportJobOutcome = {
32
+ kind: 'ready';
33
+ jobId: string;
34
+ downloadUrl: string;
35
+ } | {
36
+ kind: 'failed';
37
+ jobId: string;
38
+ message: string;
39
+ } | {
40
+ kind: 'pending';
41
+ jobId: string;
42
+ };
43
+ /** Classify one job snapshot; `null` means keep waiting. */
44
+ export declare function classifyExportJob(job: ExportJobSnapshot): ExportJobOutcome | null;
45
+ export interface WaitForExportOptions {
46
+ /** Delay between reads of the job. */
47
+ intervalMs?: number;
48
+ /** Total time to wait before reporting the job as still pending. */
49
+ timeoutMs?: number;
50
+ /** Injectable for tests. */
51
+ sleep?: (ms: number) => Promise<void>;
52
+ /** Injectable for tests. */
53
+ now?: () => number;
54
+ /** Stops waiting (e.g. the page unmounted); resolves as pending. */
55
+ signal?: AbortSignal;
56
+ }
57
+ /**
58
+ * Read the job until it settles or the wait budget is spent. `initial` is the
59
+ * snapshot returned by the start mutation, so an already-finished job resolves
60
+ * without another round trip.
61
+ */
62
+ export declare function waitForExportJob(initial: ExportJobSnapshot, fetchJob: (id: string) => Promise<ExportJobSnapshot | null>, { intervalMs, timeoutMs, sleep, now, signal, }?: WaitForExportOptions): Promise<ExportJobOutcome>;
63
+ /** Start the archive download in the current tab without navigating away. */
64
+ export declare function triggerUrlDownload(url: string): void;
@@ -0,0 +1,11 @@
1
+ import { createLucideIcon as e } from "../createLucideIcon.js";
2
+ //#region node_modules/lucide-react/dist/esm/icons/badge-check.js
3
+ var t = e("BadgeCheck", [["path", {
4
+ d: "M3.85 8.62a4 4 0 0 1 4.78-4.77 4 4 0 0 1 6.74 0 4 4 0 0 1 4.78 4.78 4 4 0 0 1 0 6.74 4 4 0 0 1-4.77 4.78 4 4 0 0 1-6.75 0 4 4 0 0 1-4.78-4.77 4 4 0 0 1 0-6.76Z",
5
+ key: "3c2336"
6
+ }], ["path", {
7
+ d: "m9 12 2 2 4-4",
8
+ key: "dzmm74"
9
+ }]]);
10
+ //#endregion
11
+ export { t as BadgeCheck };
@@ -0,0 +1,8 @@
1
+ import { createLucideIcon as e } from "../createLucideIcon.js";
2
+ //#region node_modules/lucide-react/dist/esm/icons/chevron-down.js
3
+ var t = e("ChevronDown", [["path", {
4
+ d: "m6 9 6 6 6-6",
5
+ key: "qrunsl"
6
+ }]]);
7
+ //#endregion
8
+ export { t as ChevronDown };
@@ -0,0 +1,8 @@
1
+ import { createLucideIcon as e } from "../createLucideIcon.js";
2
+ //#region node_modules/lucide-react/dist/esm/icons/chevron-up.js
3
+ var t = e("ChevronUp", [["path", {
4
+ d: "m18 15-6-6-6 6",
5
+ key: "153udz"
6
+ }]]);
7
+ //#endregion
8
+ export { t as ChevronUp };
@@ -0,0 +1,11 @@
1
+ import { createLucideIcon as e } from "../createLucideIcon.js";
2
+ //#region node_modules/lucide-react/dist/esm/icons/pencil.js
3
+ var t = e("Pencil", [["path", {
4
+ d: "M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",
5
+ key: "1a8usu"
6
+ }], ["path", {
7
+ d: "m15 5 4 4",
8
+ key: "1mk7zo"
9
+ }]]);
10
+ //#endregion
11
+ export { t as Pencil };
@@ -0,0 +1,26 @@
1
+ import { createLucideIcon as e } from "../createLucideIcon.js";
2
+ //#region node_modules/lucide-react/dist/esm/icons/store.js
3
+ var t = e("Store", [
4
+ ["path", {
5
+ d: "m2 7 4.41-4.41A2 2 0 0 1 7.83 2h8.34a2 2 0 0 1 1.42.59L22 7",
6
+ key: "ztvudi"
7
+ }],
8
+ ["path", {
9
+ d: "M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8",
10
+ key: "1b2hhj"
11
+ }],
12
+ ["path", {
13
+ d: "M15 22v-4a2 2 0 0 0-2-2h-2a2 2 0 0 0-2 2v4",
14
+ key: "2ebpfo"
15
+ }],
16
+ ["path", {
17
+ d: "M2 7h20",
18
+ key: "1fcdvo"
19
+ }],
20
+ ["path", {
21
+ d: "M22 7v3a2 2 0 0 1-2 2a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 16 12a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 12 12a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 8 12a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 4 12a2 2 0 0 1-2-2V7",
22
+ key: "6c3vgh"
23
+ }]
24
+ ]);
25
+ //#endregion
26
+ export { t as Store };