@burdenoff/microfe-movethewheels 2026.1016.3 → 2026.1016.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/README.md +10 -0
- package/dist/MoveTheWheelsRoot.js +5 -0
- package/dist/MoveTheWheelsRoutes.js +25 -21
- package/dist/components/ContainerEvidencePicker.js +55 -55
- package/dist/components/FleetAlertsPanel.js +2 -2
- package/dist/components/freight-invoice/InvoiceForm.js +366 -0
- package/dist/components/freight-invoice/InvoiceResults.js +240 -0
- package/dist/generated/consolidation-operations.d.ts +195 -265
- package/dist/generated/container-condition-operations.d.ts +124 -187
- package/dist/generated/container-operations.d.ts +59 -85
- package/dist/generated/empty-reuse-operations.d.ts +165 -271
- package/dist/generated/free-time-operations.d.ts +120 -184
- package/dist/generated/freight-cost-operations.d.ts +307 -476
- package/dist/generated/freight-invoice-operations.d.ts +1447 -0
- package/dist/generated/logistics-procedure-operations.d.ts +100 -156
- package/dist/generated/pending-pick-operations.d.ts +769 -1025
- package/dist/generated/shipment-status-authority-operations.d.ts +82 -103
- package/dist/generated/stock-binding-operations.d.ts +188 -260
- package/dist/generated/stock-observation-operations.d.ts +103 -138
- package/dist/generated/tracking-quality-operations.d.ts +27 -41
- package/dist/generated/trip-utilization-operations.d.ts +137 -185
- package/dist/generated/wspace-operations.d.ts +628 -2272
- package/dist/generated/wspace-types.d.ts +4 -23
- package/dist/hooks/useInvoiceComparisonRecovery.js +118 -0
- package/dist/movethewheels/components/ContainerEvidencePicker.d.ts +2 -1
- package/dist/movethewheels/components/freight-invoice/InvoiceForm.d.ts +19 -0
- package/dist/movethewheels/components/freight-invoice/InvoiceResults.d.ts +9 -0
- package/dist/movethewheels/hooks/useFleet.d.ts +1 -1
- package/dist/movethewheels/hooks/useFleetIntelligence.d.ts +1 -1
- package/dist/movethewheels/hooks/useInvoiceComparisonRecovery.d.ts +22 -0
- package/dist/movethewheels/hooks/useProcedureSelection.d.ts +1 -3
- package/dist/movethewheels/pages/FreightInvoicePage.d.ts +10 -0
- package/dist/movethewheels/utils/driverLicenseExpiry.d.ts +6 -0
- package/dist/movethewheels/utils/invoiceComparison.d.ts +32 -0
- package/dist/pages/DriverDetailsPage.js +306 -282
- package/dist/pages/FreightEstimatePage.js +1 -0
- package/dist/pages/FreightInvoicePage.js +346 -0
- package/dist/src/generated/consolidation-operations.js +3961 -503
- package/dist/src/generated/container-condition-operations.js +2968 -206
- package/dist/src/generated/container-operations.js +997 -99
- package/dist/src/generated/empty-reuse-operations.js +4811 -747
- package/dist/src/generated/free-time-operations.js +2824 -233
- package/dist/src/generated/freight-cost-operations.js +4852 -812
- package/dist/src/generated/freight-invoice-operations.js +4894 -0
- package/dist/src/generated/logistics-procedure-operations.js +2707 -360
- package/dist/src/generated/pending-pick-operations.js +8244 -1196
- package/dist/src/generated/shipment-status-authority-operations.js +1157 -84
- package/dist/src/generated/stock-binding-operations.js +2779 -173
- package/dist/src/generated/stock-observation-operations.js +1274 -91
- package/dist/src/generated/tracking-quality-operations.js +407 -42
- package/dist/src/generated/trip-utilization-operations.js +1765 -138
- package/dist/src/generated/wspace-operations.js +428 -706
- package/dist/utils/driverLicenseExpiry.js +14 -0
- package/dist/utils/invoiceComparison.js +272 -0
- package/package.json +29 -29
- package/src/generated/consolidation-operations.ts +60 -559
- package/src/generated/container-condition-operations.ts +63 -265
- package/src/generated/container-operations.ts +37 -132
- package/src/generated/empty-reuse-operations.ts +83 -824
- package/src/generated/free-time-operations.ts +55 -284
- package/src/generated/freight-cost-operations.ts +42 -848
- package/src/generated/freight-invoice-operations.ts +830 -0
- package/src/generated/logistics-procedure-operations.ts +60 -414
- package/src/generated/pending-pick-operations.ts +48 -1239
- package/src/generated/shipment-status-authority-operations.ts +33 -113
- package/src/generated/stock-binding-operations.ts +29 -198
- package/src/generated/stock-observation-operations.ts +24 -111
- package/src/generated/tracking-quality-operations.ts +19 -57
- package/src/generated/trip-utilization-operations.ts +32 -166
- package/src/generated/wspace-operations.ts +284 -2906
- package/src/generated/wspace-types.ts +2 -8
- package/src/movethewheels/MoveTheWheelsRoot.tsx +6 -0
- package/src/movethewheels/MoveTheWheelsRoutes.tsx +2 -0
- package/src/movethewheels/components/ContainerEvidencePicker.tsx +12 -4
- package/src/movethewheels/components/FleetAlertsPanel.tsx +4 -2
- package/src/movethewheels/components/freight-invoice/InvoiceForm.tsx +412 -0
- package/src/movethewheels/components/freight-invoice/InvoiceResults.tsx +162 -0
- package/src/movethewheels/hooks/useFleet.ts +1 -1
- package/src/movethewheels/hooks/useFleetIntelligence.ts +5 -1
- package/src/movethewheels/hooks/useInvoiceComparisonRecovery.ts +227 -0
- package/src/movethewheels/pages/DriverDetailsPage.tsx +35 -9
- package/src/movethewheels/pages/FreightEstimatePage.tsx +1 -0
- package/src/movethewheels/pages/FreightInvoicePage.tsx +477 -0
- package/src/movethewheels/utils/driverLicenseExpiry.ts +25 -0
- package/src/movethewheels/utils/invoiceComparison.ts +520 -0
- package/src/operations/freight-invoice/comparison.graphql +40 -0
- package/src/operations/wspace/freight-invoice-evidence.graphql +6 -0
- package/patches/braces@3.0.3.patch +0 -87
|
@@ -1,24 +1,5 @@
|
|
|
1
1
|
export type Maybe<T> = T | null;
|
|
2
2
|
export type InputMaybe<T> = Maybe<T>;
|
|
3
|
-
export type Exact<T extends {
|
|
4
|
-
[key: string]: unknown;
|
|
5
|
-
}> = {
|
|
6
|
-
[K in keyof T]: T[K];
|
|
7
|
-
};
|
|
8
|
-
export type MakeOptional<T, K extends keyof T> = Omit<T, K> & {
|
|
9
|
-
[SubKey in K]?: Maybe<T[SubKey]>;
|
|
10
|
-
};
|
|
11
|
-
export type MakeMaybe<T, K extends keyof T> = Omit<T, K> & {
|
|
12
|
-
[SubKey in K]: Maybe<T[SubKey]>;
|
|
13
|
-
};
|
|
14
|
-
export type MakeEmpty<T extends {
|
|
15
|
-
[key: string]: unknown;
|
|
16
|
-
}, K extends keyof T> = {
|
|
17
|
-
[_ in K]?: never;
|
|
18
|
-
};
|
|
19
|
-
export type Incremental<T> = T | {
|
|
20
|
-
[P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never;
|
|
21
|
-
};
|
|
22
3
|
/** All built-in and custom scalars, mapped to their actual values */
|
|
23
4
|
export type Scalars = {
|
|
24
5
|
ID: {
|
|
@@ -72,12 +53,12 @@ export type Scalars = {
|
|
|
72
53
|
output: File;
|
|
73
54
|
};
|
|
74
55
|
_ScalarsPlaceholder: {
|
|
75
|
-
input:
|
|
76
|
-
output:
|
|
56
|
+
input: unknown;
|
|
57
|
+
output: unknown;
|
|
77
58
|
};
|
|
78
59
|
_SecurityMainPlaceholder: {
|
|
79
|
-
input:
|
|
80
|
-
output:
|
|
60
|
+
input: unknown;
|
|
61
|
+
output: unknown;
|
|
81
62
|
};
|
|
82
63
|
};
|
|
83
64
|
export type A2AConnection = {
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import { useMoveTheWheels as e } from "../providers/MoveTheWheelsProvider.js";
|
|
2
|
+
import { resolveGraphqlUrl as t } from "../utils/graphqlClient.js";
|
|
3
|
+
import { useConditionApi as n } from "./useContainerCondition.js";
|
|
4
|
+
import { INVOICE_RECOVERY_STORAGE as r, decodeInvoiceIntent as i, encodeInvoiceIntent as a, invoiceCanonical as o, invoiceRecordInput as s, matchesInvoiceReceipt as c, sameInvoiceScope as l } from "../utils/invoiceComparison.js";
|
|
5
|
+
import { InvoiceComparisonExactDocument as u, RecordInvoiceComparisonDocument as d, RecoverInvoiceComparisonDocument as f } from "../src/generated/freight-invoice-operations.js";
|
|
6
|
+
import { useLayoutEffect as p, useRef as m, useState as h } from "react";
|
|
7
|
+
import { useActiveContext as g } from "@burdenoff/fe-libs/shared/providers/shell";
|
|
8
|
+
//#region src/movethewheels/hooks/useInvoiceComparisonRecovery.ts
|
|
9
|
+
function _() {
|
|
10
|
+
try {
|
|
11
|
+
let e = sessionStorage.getItem(r), t = i(e);
|
|
12
|
+
return {
|
|
13
|
+
intent: t,
|
|
14
|
+
blocked: e !== null && t === null
|
|
15
|
+
};
|
|
16
|
+
} catch {
|
|
17
|
+
return {
|
|
18
|
+
intent: null,
|
|
19
|
+
blocked: !0
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
function v(n) {
|
|
24
|
+
let r = e(), i = g();
|
|
25
|
+
return !n || !r.currentUser?.id || !r.workspaceId || i.workspaceId !== r.workspaceId || !i.organizationId || r.tenantId && i.tenantId !== r.tenantId ? null : {
|
|
26
|
+
actorId: r.currentUser.id,
|
|
27
|
+
workspaceId: r.workspaceId,
|
|
28
|
+
tenantId: i.tenantId,
|
|
29
|
+
organizationId: i.organizationId,
|
|
30
|
+
projectId: i.projectId,
|
|
31
|
+
gateway: t(r.apiGatewayUrl)
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
function y(e, t) {
|
|
35
|
+
let g = n("SINGLE_ATTEMPT"), [v] = h(_), [y, b] = h(v.intent), x = m(y), [S, C] = h(v.blocked), w = m(!1), [T, E] = h(!1), [D, O] = h(0), k = o(e), A = m(e), [j, M] = h(null);
|
|
36
|
+
p(() => (A.current = e, () => {
|
|
37
|
+
A.current = null;
|
|
38
|
+
}), [k]);
|
|
39
|
+
let N = (e, t = !0) => M({
|
|
40
|
+
scopeKey: k,
|
|
41
|
+
message: e,
|
|
42
|
+
error: t
|
|
43
|
+
}), P = (e, t) => {
|
|
44
|
+
if (!e || !c(e, t) || !l(t.scope, A.current)) throw Error("UNCONFIRMED");
|
|
45
|
+
let n = i(sessionStorage.getItem(r));
|
|
46
|
+
if (!n || o(n) !== o(t)) throw Error("RETAINED_INTENT_CHANGED");
|
|
47
|
+
return sessionStorage.removeItem(r), x.current = null, b(null), C(!1), O((e) => e + 1), N("The exact immutable comparison receipt is confirmed.", !1), e;
|
|
48
|
+
};
|
|
49
|
+
return {
|
|
50
|
+
run: async (n, c) => {
|
|
51
|
+
if (w.current || x.current || S) return N("Resolve the original request before starting another."), null;
|
|
52
|
+
if (!e || !l(e, A.current) || !t()) return N("Current shipment update permission and workspace context are required. Nothing was sent."), null;
|
|
53
|
+
let u;
|
|
54
|
+
try {
|
|
55
|
+
if (sessionStorage.getItem("movethewheels.freight-invoice.unresolved.v1") !== null) throw Error("EXISTING");
|
|
56
|
+
u = {
|
|
57
|
+
version: 1,
|
|
58
|
+
scope: structuredClone(e),
|
|
59
|
+
input: s({
|
|
60
|
+
...n,
|
|
61
|
+
idempotencyKey: crypto.randomUUID()
|
|
62
|
+
}),
|
|
63
|
+
estimate: structuredClone(c)
|
|
64
|
+
}, sessionStorage.setItem(r, a(u)), x.current = u, b(u);
|
|
65
|
+
} catch {
|
|
66
|
+
return N("The original request could not be retained safely. Nothing was sent; reload and inspect any retained request."), null;
|
|
67
|
+
}
|
|
68
|
+
w.current = !0, E(!0), M(null);
|
|
69
|
+
try {
|
|
70
|
+
if (!l(u.scope, A.current) || !t()) {
|
|
71
|
+
let e = i(sessionStorage.getItem(r));
|
|
72
|
+
return e && o(e) === o(u) && (sessionStorage.removeItem(r), x.current = null, b(null)), N("Context or permission changed before dispatch. Nothing was sent."), null;
|
|
73
|
+
}
|
|
74
|
+
return P((await g(d, { input: u.input })).compareMtwFreightInvoice, u);
|
|
75
|
+
} catch {
|
|
76
|
+
return N("Save outcome is UNKNOWN. Keep the original intent and use read-only recovery; do not resend it."), null;
|
|
77
|
+
} finally {
|
|
78
|
+
w.current = !1, E(!1);
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
reconcile: async () => {
|
|
82
|
+
let e = x.current;
|
|
83
|
+
if (w.current || !e) return null;
|
|
84
|
+
if (!l(e.scope, A.current)) return N("Return to the original account, organization, workspace and project to inspect its request."), null;
|
|
85
|
+
w.current = !0, E(!0), M(null);
|
|
86
|
+
try {
|
|
87
|
+
let t = (await g(f, {
|
|
88
|
+
shipmentId: e.input.shipmentId,
|
|
89
|
+
requestKey: e.input.idempotencyKey
|
|
90
|
+
})).mtwFreightInvoiceComparisonByRequestKey;
|
|
91
|
+
if (!t) return N("No original-context receipt was returned. This does not prove no effect; the request stays UNKNOWN and cannot be resent."), null;
|
|
92
|
+
if (!c(t, e)) throw Error("MISMATCH");
|
|
93
|
+
if (!l(e.scope, A.current)) throw Error("CONTEXT_CHANGED");
|
|
94
|
+
let n = await g(u, {
|
|
95
|
+
shipmentId: e.input.shipmentId,
|
|
96
|
+
id: t.id
|
|
97
|
+
});
|
|
98
|
+
if (!c(n.mtwFreightInvoiceComparison, e) || n.mtwFreightInvoiceComparison.requestFingerprint !== t.requestFingerprint || o(n.mtwFreightInvoiceComparison) !== o(t)) throw Error("MISMATCH");
|
|
99
|
+
return P(n.mtwFreightInvoiceComparison, e);
|
|
100
|
+
} catch {
|
|
101
|
+
return N("Read-only recovery could not confirm the exact original receipt. Keep the intent; no save was sent."), null;
|
|
102
|
+
} finally {
|
|
103
|
+
w.current = !1, E(!1);
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
busy: T,
|
|
107
|
+
pending: y,
|
|
108
|
+
blocked: S,
|
|
109
|
+
uncertain: y !== null || S,
|
|
110
|
+
revision: D,
|
|
111
|
+
scopeKey: k,
|
|
112
|
+
canReconcile: !!y && l(y.scope, e),
|
|
113
|
+
feedback: j?.scopeKey === k ? j : null,
|
|
114
|
+
refresh: () => O((e) => e + 1)
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
//#endregion
|
|
118
|
+
export { y as useInvoiceComparisonRecovery, v as useInvoiceComparisonScope };
|
|
@@ -2,8 +2,9 @@ import { MtwContainerEvidenceInput } from '../../generated/container-condition-o
|
|
|
2
2
|
export interface SelectedEvidence extends MtwContainerEvidenceInput {
|
|
3
3
|
label: string;
|
|
4
4
|
}
|
|
5
|
-
export declare function ContainerEvidencePicker({ value, onChange, description, }: {
|
|
5
|
+
export declare function ContainerEvidencePicker({ value, onChange, currentOnly, description, }: {
|
|
6
6
|
value: SelectedEvidence[];
|
|
7
7
|
onChange: (value: SelectedEvidence[]) => void;
|
|
8
8
|
description?: string;
|
|
9
|
+
currentOnly?: boolean;
|
|
9
10
|
}): import('react').JSX.Element;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { CompareMtwFreightInvoiceInput, InvoiceEstimatePinFragment, InvoiceEstimateVersionQuery, InvoiceReceiptFragment, InvoiceStructuralPreviewQuery, MtwFreightInvoiceFactsInput } from '../../../generated/freight-invoice-operations';
|
|
2
|
+
export type InvoiceEstimate = InvoiceEstimateVersionQuery['mtwFreightEstimateVersion'];
|
|
3
|
+
export declare function invoiceEstimatePin(estimate: InvoiceEstimate): InvoiceEstimatePinFragment;
|
|
4
|
+
export declare function InvoiceForm({ estimate, previous, disabled, canRecord, onPreview, onSave, }: {
|
|
5
|
+
estimate: InvoiceEstimate;
|
|
6
|
+
previous: InvoiceReceiptFragment | null;
|
|
7
|
+
disabled: boolean;
|
|
8
|
+
canRecord: boolean;
|
|
9
|
+
onPreview: (input: {
|
|
10
|
+
shipmentId: string;
|
|
11
|
+
estimateVersionId: string;
|
|
12
|
+
facts: MtwFreightInvoiceFactsInput;
|
|
13
|
+
evidence: {
|
|
14
|
+
fileId: string;
|
|
15
|
+
versionId: string;
|
|
16
|
+
}[];
|
|
17
|
+
}) => Promise<InvoiceStructuralPreviewQuery['previewMtwFreightInvoice']>;
|
|
18
|
+
onSave: (input: Omit<CompareMtwFreightInvoiceInput, 'idempotencyKey'>, pin: InvoiceEstimatePinFragment) => Promise<InvoiceReceiptFragment | null | undefined>;
|
|
19
|
+
}): import('react').JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { InvoiceReceiptFragment, InvoiceStructuralPreviewQuery } from '../../../generated/freight-invoice-operations';
|
|
2
|
+
type Preview = InvoiceStructuralPreviewQuery['previewMtwFreightInvoice'];
|
|
3
|
+
export declare function InvoiceResults({ value }: {
|
|
4
|
+
value: Preview | InvoiceReceiptFragment;
|
|
5
|
+
}): import('react').JSX.Element;
|
|
6
|
+
export declare function InvoiceHistoryRecord({ record }: {
|
|
7
|
+
record: InvoiceReceiptFragment;
|
|
8
|
+
}): import('react').JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -32,7 +32,7 @@ export interface CreateDriverInput {
|
|
|
32
32
|
phone?: string;
|
|
33
33
|
licenseNumber?: string;
|
|
34
34
|
licenseClass?: string;
|
|
35
|
-
licenseExpiry?: string;
|
|
35
|
+
licenseExpiry?: string | null;
|
|
36
36
|
/** DriverStatus enum value, e.g. `AVAILABLE`, `OFF_DUTY`. */
|
|
37
37
|
status?: string;
|
|
38
38
|
vehicleId?: string | null;
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* All three sit on top of wspace-movethewheels-svc's fleet module; the ranking
|
|
6
6
|
* and alert rules live server-side so every surface (web, CLI, MCP) agrees.
|
|
7
7
|
*/
|
|
8
|
-
export type FleetAlertType = 'LICENSE_EXPIRED' | 'LICENSE_EXPIRING' | 'MAINTENANCE_OVERDUE' | 'MAINTENANCE_DUE_SOON';
|
|
8
|
+
export type FleetAlertType = 'LICENSE_UNKNOWN' | 'LICENSE_EXPIRED' | 'LICENSE_EXPIRING' | 'MAINTENANCE_OVERDUE' | 'MAINTENANCE_DUE_SOON';
|
|
9
9
|
export type FleetAlertSeverity = 'CRITICAL' | 'WARNING';
|
|
10
10
|
export type FleetAlertSubjectType = 'VEHICLE' | 'DRIVER';
|
|
11
11
|
export interface FleetAlert {
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { CompareMtwFreightInvoiceInput, InvoiceEstimatePinFragment, InvoiceReceiptFragment } from '../../generated/freight-invoice-operations';
|
|
2
|
+
import { InvoiceIntent, InvoiceScope } from '../utils/invoiceComparison';
|
|
3
|
+
/** Canonical visible context only; never decode credentials or claim the full server context. */
|
|
4
|
+
export declare function useInvoiceComparisonScope(canRead: boolean): InvoiceScope | null;
|
|
5
|
+
/** One original business intent. UNKNOWN permits reads only, never a retry/new key or automatic resend. */
|
|
6
|
+
export declare function useInvoiceComparisonRecovery(scope: InvoiceScope | null, allowsWrite: () => boolean): {
|
|
7
|
+
run: (supplied: Omit<CompareMtwFreightInvoiceInput, "idempotencyKey">, estimate: InvoiceEstimatePinFragment) => Promise<InvoiceReceiptFragment | null>;
|
|
8
|
+
reconcile: () => Promise<InvoiceReceiptFragment | null>;
|
|
9
|
+
busy: boolean;
|
|
10
|
+
pending: InvoiceIntent | null;
|
|
11
|
+
blocked: boolean;
|
|
12
|
+
uncertain: boolean;
|
|
13
|
+
revision: number;
|
|
14
|
+
scopeKey: string;
|
|
15
|
+
canReconcile: boolean;
|
|
16
|
+
feedback: {
|
|
17
|
+
scopeKey: string;
|
|
18
|
+
message: string;
|
|
19
|
+
error: boolean;
|
|
20
|
+
} | null;
|
|
21
|
+
refresh: () => void;
|
|
22
|
+
};
|
|
@@ -22,15 +22,13 @@ export declare function useProcedureSelection(revision: number): {
|
|
|
22
22
|
loading: boolean;
|
|
23
23
|
};
|
|
24
24
|
cycle: {
|
|
25
|
-
__typename?: "MtwContainerCycle";
|
|
26
25
|
id: string;
|
|
27
26
|
version: number;
|
|
28
27
|
status: import('../../generated/logistics-procedure-operations').MtwContainerCycleStatus;
|
|
29
|
-
bookingReference
|
|
28
|
+
bookingReference: string | null;
|
|
30
29
|
openedAt: string;
|
|
31
30
|
} | null;
|
|
32
31
|
proposal: {
|
|
33
|
-
__typename?: "MtwReuseProposal";
|
|
34
32
|
id: string;
|
|
35
33
|
proposalReference: string;
|
|
36
34
|
revision: number;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { InvoiceIntent, InvoiceScope } from '../utils/invoiceComparison';
|
|
2
|
+
export default function FreightInvoicePage(): import('react').JSX.Element;
|
|
3
|
+
/** Retain the unresolved intent across context changes without displaying another context's source facts. */
|
|
4
|
+
export declare function InvoiceRequestRecovery({ pending, scope, busy, canReconcile, onRead, }: {
|
|
5
|
+
pending: InvoiceIntent | null;
|
|
6
|
+
scope: InvoiceScope | null;
|
|
7
|
+
busy: boolean;
|
|
8
|
+
canReconcile: boolean;
|
|
9
|
+
onRead: () => void;
|
|
10
|
+
}): import('react').JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/** The expiry control is explicitly UTC, independent of the browser timezone. */
|
|
2
|
+
export declare const driverLicenseExpiryInput: (recorded: Date | undefined) => string;
|
|
3
|
+
/** Empty means unrecorded; never substitute noon, end of day or the current time. */
|
|
4
|
+
export declare const parseDriverLicenseExpiry: (value: string) => string | null;
|
|
5
|
+
/** Omit unchanged updates so even server precision beyond this display is retained. */
|
|
6
|
+
export declare const driverLicenseExpiryUpdate: (value: string, recorded: Date | undefined) => string | null | undefined;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { CompareMtwFreightInvoiceInput, InvoiceEstimatePinFragment, InvoiceReceiptFragment, InvoiceStructuralPreviewQuery, MtwFreightInvoiceFactsInput } from '../../generated/freight-invoice-operations';
|
|
2
|
+
export declare const INVOICE_RECOVERY_STORAGE = "movethewheels.freight-invoice.unresolved.v1";
|
|
3
|
+
export interface InvoiceScope {
|
|
4
|
+
actorId: string;
|
|
5
|
+
workspaceId: string;
|
|
6
|
+
tenantId: string | null;
|
|
7
|
+
organizationId: string;
|
|
8
|
+
projectId: string | null;
|
|
9
|
+
gateway: string;
|
|
10
|
+
}
|
|
11
|
+
export interface InvoiceIntent {
|
|
12
|
+
version: 1;
|
|
13
|
+
scope: InvoiceScope;
|
|
14
|
+
input: CompareMtwFreightInvoiceInput;
|
|
15
|
+
estimate: InvoiceEstimatePinFragment;
|
|
16
|
+
}
|
|
17
|
+
export declare function invoiceCanonical(value: unknown): string;
|
|
18
|
+
export declare function invoiceFactsInput(value: unknown): MtwFreightInvoiceFactsInput;
|
|
19
|
+
export declare function invoiceRecordInput(value: unknown): CompareMtwFreightInvoiceInput;
|
|
20
|
+
export declare function sameInvoiceScope(a: InvoiceScope, b: InvoiceScope | null): boolean;
|
|
21
|
+
export declare function decodeInvoiceIntent(raw: string | null): InvoiceIntent | null;
|
|
22
|
+
export declare function encodeInvoiceIntent(value: InvoiceIntent): string;
|
|
23
|
+
/** Server owns full trusted context and fingerprint; validate visible business facts, never invent its hash. */
|
|
24
|
+
export declare function matchesInvoiceReceipt(receipt: InvoiceReceiptFragment | null | undefined, intent: InvoiceIntent): boolean;
|
|
25
|
+
/** Structural preview must match the selected exact version and current draft; it grants no save authority. */
|
|
26
|
+
export declare function matchesInvoicePreview(value: InvoiceStructuralPreviewQuery['previewMtwFreightInvoice'], facts: MtwFreightInvoiceFactsInput, estimate: InvoiceEstimatePinFragment): boolean;
|
|
27
|
+
/** Exact decimal display including signed differences; money never enters Number. */
|
|
28
|
+
export declare function invoiceMoney(minor: string | null | undefined, currency: {
|
|
29
|
+
code: string;
|
|
30
|
+
minorUnitDigits: number;
|
|
31
|
+
}): string;
|
|
32
|
+
export declare function invoiceRowDifference(value: Pick<InvoiceReceiptFragment, 'facts' | 'outcome'>, rowId: string): string;
|