@shipengine/elements 2.11.1 → 2.12.0
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/actions-menu.js +5 -5
- package/canada-ddp.js +1 -0
- package/carrier.js +1 -1
- package/components.js +1 -1
- package/elements.js +1 -1
- package/hooks.js +1 -1
- package/index.js +1 -1
- package/package.json +4 -4
- package/shipment.js +1 -1
- package/src/components/actions-menu/actions-menu.d.ts +2 -1
- package/src/components/field/select/select-with-categories.d.ts +1 -0
- package/src/components/grid-filters/grid-filters.d.ts +2 -1
- package/src/components/index.d.ts +1 -0
- package/src/components/ship-from-address-form/index.d.ts +1 -0
- package/src/components/ship-from-address-form/ship-from-address-form-schema.d.ts +436 -0
- package/src/components/ship-from-address-form/ship-from-address-form.d.ts +20 -0
- package/src/components/ship-from-address-form/ship-from-address-form.styles.d.ts +20 -0
- package/src/components/templates/index.d.ts +1 -1
- package/src/components/templates/rate-form/rate-form.d.ts +3 -2
- package/src/components/templates/shipment-form/sections/customs-forms/customs-forms.d.ts +2 -1
- package/src/components/templates/shipment-form/shipment-form.d.ts +10 -6
- package/src/components/templates/shipment-form/shipment-form.styles.d.ts +1 -0
- package/src/components/templates/shipment-form/shipment-schema.d.ts +26 -12
- package/src/components/templates/suspend-purchase/index.d.ts +1 -0
- package/src/components/templates/suspend-purchase/suspend-purchase.d.ts +8 -0
- package/src/components/warehouse-form/warehouse-form-schema.d.ts +148 -34
- package/src/elements/labels-grid/hooks/use-labels-grid.d.ts +4 -0
- package/src/elements/labels-grid/labels-grid.d.ts +37 -22
- package/src/elements/manage-carriers/manage-carriers.d.ts +15 -0
- package/src/elements/manage-external-carriers/manage-external-carriers.d.ts +15 -0
- package/src/elements/manage-funding/manage-funding-element.d.ts +15 -0
- package/src/elements/manage-warehouses/manage-warehouses.d.ts +15 -0
- package/src/elements/payment-method-settings/payment-method-settings-element.d.ts +15 -0
- package/src/elements/purchase-label/configure-shipment.d.ts +3 -2
- package/src/elements/purchase-label/hooks/index.d.ts +0 -2
- package/src/elements/purchase-label/hooks/use-address.d.ts +1 -1
- package/src/elements/purchase-label/hooks/use-configure-shipment.d.ts +23 -12
- package/src/elements/purchase-label/hooks/use-customs.d.ts +1 -1
- package/src/elements/purchase-label/hooks/use-import-sales-order.d.ts +2 -1
- package/src/elements/purchase-label/hooks/use-shipment-form.d.ts +14 -5
- package/src/elements/purchase-label/purchase-label.d.ts +88 -47
- package/src/elements/select-label-layout/select-label-layout-element.d.ts +15 -0
- package/src/elements/shipment-summary/shipment-summary.d.ts +27 -6
- package/src/elements/shipments-grid/shipments-grid.d.ts +91 -20
- package/src/elements/theme-creator/theme-creator.d.ts +15 -0
- package/src/elements/transaction-history/transaction-history-element.d.ts +15 -0
- package/src/elements/unit-settings/unit-settings-element.d.ts +15 -0
- package/src/elements/vat-settings/vat-settings-element.d.ts +15 -0
- package/src/elements/void-label/void-label.d.ts +15 -0
- package/src/hooks/options/index.d.ts +1 -1
- package/src/hooks/options/use-ship-from-address-options.d.ts +19 -0
- package/src/hooks/options/use-shipment-metadata.d.ts +1 -0
- package/src/locales/en/index.d.ts +15 -0
- package/src/types/canada-ddp.d.ts +4 -0
- package/src/types/index.d.ts +2 -0
- package/src/types/ship-from-address.d.ts +4 -0
- package/src/utilities/feature-flags/types.d.ts +7 -1
- package/src/utilities/shipengine/address.d.ts +32 -0
- package/src/utilities/shipengine/sales-order.d.ts +2 -2
- package/src/utilities/shipengine/warehouses.d.ts +2 -1
- package/src/workflows/account-settings/account-settings.d.ts +15 -0
- package/src/workflows/carrier-services/carrier-services.d.ts +15 -0
- package/src/workflows/connect-external-carrier/connect-external-carrier.d.ts +15 -0
- package/src/workflows/onboarding/onboarding.d.ts +16 -1
- package/suspend-text.js +1 -1
- package/transaction-history-element.js +1 -1
- package/types.js +1 -1
- package/use-scrub-errors.js +1 -1
- package/use-toggle.js +1 -1
- package/use-unit-settings.js +1 -1
- package/usePager.js +1 -1
- package/utilities.js +1 -1
- package/validation.js +1 -1
- package/vat.js +1 -1
- package/wallet-form.js +1 -1
- package/workflows.js +1 -1
- package/src/components/templates/suspend-shipment/index.d.ts +0 -1
- package/src/components/templates/suspend-shipment/suspend-shipment.d.ts +0 -8
- package/src/elements/purchase-label/hooks/use-get-or-create-shipment.d.ts +0 -13
- package/src/elements/purchase-label/hooks/use-load-shipment.d.ts +0 -9
- package/src/elements/purchase-label/hooks/use-pending-shipment.d.ts +0 -13
- package/src/elements/purchase-label/purchase-label-by-sales-order.d.ts +0 -11
- package/src/elements/purchase-label/purchase-label-by-shipment.d.ts +0 -8
- package/src/hooks/options/use-warehouse-options.d.ts +0 -13
|
@@ -17,6 +17,8 @@ export declare const useLabelsGrid: ({ labelStatus, showShipmentIdFilter, showLa
|
|
|
17
17
|
chargeEvent: SE.LabelChargeEvent;
|
|
18
18
|
createdAt: string;
|
|
19
19
|
displayScheme: SE.LabelDisplayScheme;
|
|
20
|
+
externalOrderId: string | null;
|
|
21
|
+
externalShipmentId: string | null;
|
|
20
22
|
formDownload: SE.LinkedResource;
|
|
21
23
|
insuranceClaim: SE.LinkedResource;
|
|
22
24
|
insuranceCost: SE.Money;
|
|
@@ -64,6 +66,8 @@ export declare const useLabelsGrid: ({ labelStatus, showShipmentIdFilter, showLa
|
|
|
64
66
|
chargeEvent: SE.LabelChargeEvent;
|
|
65
67
|
createdAt: string;
|
|
66
68
|
displayScheme: SE.LabelDisplayScheme;
|
|
69
|
+
externalOrderId: string | null;
|
|
70
|
+
externalShipmentId: string | null;
|
|
67
71
|
formDownload: SE.LinkedResource;
|
|
68
72
|
insuranceClaim: SE.LinkedResource;
|
|
69
73
|
insuranceCost: SE.Money;
|
|
@@ -12,6 +12,16 @@ export type LabelsGridProps = {
|
|
|
12
12
|
* If no value is defined, all labels will be rendered.
|
|
13
13
|
*/
|
|
14
14
|
labelStatus?: SE.LabelStatus;
|
|
15
|
+
/**
|
|
16
|
+
* `onClickExternalOrderId` is an optional callback function that will be invoked when the user clicks the id number within the
|
|
17
|
+
* `External Order ID` column, if present.
|
|
18
|
+
*/
|
|
19
|
+
onClickExternalOrderId?: (externalOrderId?: string) => void;
|
|
20
|
+
/**
|
|
21
|
+
* `onClickExternalShipmentId` is an optional callback function that will be invoked when the user clicks the id number within
|
|
22
|
+
* `External Shipment Id` column, if present.
|
|
23
|
+
*/
|
|
24
|
+
onClickExternalShipmentId?: (externalShipmentId?: string) => void;
|
|
15
25
|
/**
|
|
16
26
|
* `onClickPrintForm` is an optional callback function that will be invoked when the user clicks the
|
|
17
27
|
* `Print Forms` button.
|
|
@@ -37,7 +47,7 @@ export type LabelsGridProps = {
|
|
|
37
47
|
*/
|
|
38
48
|
onRowClick?: (label: SE.Label) => void;
|
|
39
49
|
};
|
|
40
|
-
export declare const Component: ({ labelStatus, features, onClickPrintLabel, onClickVoidLabel, onClickPrintForms, onClickViewDetails, onRowClick, }: LabelsGridProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
50
|
+
export declare const Component: ({ labelStatus, features, onClickPrintLabel, onClickVoidLabel, onClickPrintForms, onClickViewDetails, onRowClick, onClickExternalOrderId, onClickExternalShipmentId, }: LabelsGridProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
41
51
|
export declare const Element: ({ resources, ...props }: LabelsGridProps & {
|
|
42
52
|
resources?: {
|
|
43
53
|
en: {
|
|
@@ -81,7 +91,10 @@ export declare const Element: ({ resources, ...props }: LabelsGridProps & {
|
|
|
81
91
|
resultTitles: {
|
|
82
92
|
approved: string;
|
|
83
93
|
rejected: string;
|
|
84
|
-
};
|
|
94
|
+
}; /**
|
|
95
|
+
* `labelStatus` is the status of the labels you wish to view.
|
|
96
|
+
* If no value is defined, all labels will be rendered.
|
|
97
|
+
*/
|
|
85
98
|
voidedOn: string;
|
|
86
99
|
};
|
|
87
100
|
"view-shipment": {
|
|
@@ -128,9 +141,7 @@ export declare const Element: ({ resources, ...props }: LabelsGridProps & {
|
|
|
128
141
|
highVolumeForms: string;
|
|
129
142
|
multipleShippingServices: string;
|
|
130
143
|
sections: {
|
|
131
|
-
labels: string;
|
|
132
|
-
* `onRowClick` callback invoked when a row is clicked.
|
|
133
|
-
*/
|
|
144
|
+
labels: string;
|
|
134
145
|
shipmentSummary: string;
|
|
135
146
|
};
|
|
136
147
|
noLabels: string;
|
|
@@ -266,10 +277,7 @@ export declare const Element: ({ resources, ...props }: LabelsGridProps & {
|
|
|
266
277
|
auctane_service_fee: string;
|
|
267
278
|
product_price: string;
|
|
268
279
|
};
|
|
269
|
-
};
|
|
270
|
-
* `labelStatus` is the status of the labels you wish to view.
|
|
271
|
-
* If no value is defined, all labels will be rendered.
|
|
272
|
-
*/
|
|
280
|
+
};
|
|
273
281
|
"purchase-label": {
|
|
274
282
|
title: string;
|
|
275
283
|
actions: {
|
|
@@ -292,10 +300,7 @@ export declare const Element: ({ resources, ...props }: LabelsGridProps & {
|
|
|
292
300
|
parcelguard: string;
|
|
293
301
|
};
|
|
294
302
|
errorMessages: {
|
|
295
|
-
customsItemsRequired: string;
|
|
296
|
-
* `features` provides optional feature configuration for the Element
|
|
297
|
-
* If no value is defined, default configuration will be used.
|
|
298
|
-
*/
|
|
303
|
+
customsItemsRequired: string;
|
|
299
304
|
invalidAddress: string;
|
|
300
305
|
noRates: string;
|
|
301
306
|
salesOrderNotLoaded: string;
|
|
@@ -539,10 +544,7 @@ export declare const Element: ({ resources, ...props }: LabelsGridProps & {
|
|
|
539
544
|
insufficientFunds: string;
|
|
540
545
|
insufficientFundsTitle: string;
|
|
541
546
|
negativeBalance: string;
|
|
542
|
-
negativeBalanceTitle: string;
|
|
543
|
-
* `onClickVoidLabel` is a callback function that controls the display of `Void Label` button and
|
|
544
|
-
* will be invoked when the user clicks on it.
|
|
545
|
-
*/
|
|
547
|
+
negativeBalanceTitle: string;
|
|
546
548
|
newBalance: string;
|
|
547
549
|
};
|
|
548
550
|
errors: {
|
|
@@ -639,6 +641,8 @@ export declare const Element: ({ resources, ...props }: LabelsGridProps & {
|
|
|
639
641
|
status: string;
|
|
640
642
|
trackingStatus: string;
|
|
641
643
|
labelId: string;
|
|
644
|
+
externalOrderId: string;
|
|
645
|
+
externalShipmentId: string;
|
|
642
646
|
};
|
|
643
647
|
empty: {
|
|
644
648
|
title: string;
|
|
@@ -662,10 +666,11 @@ export declare const Element: ({ resources, ...props }: LabelsGridProps & {
|
|
|
662
666
|
error: string;
|
|
663
667
|
};
|
|
664
668
|
actions: {
|
|
665
|
-
|
|
669
|
+
/**
|
|
666
670
|
* `labelStatus` is the status of the labels you wish to view.
|
|
667
671
|
* If no value is defined, all labels will be rendered.
|
|
668
672
|
*/
|
|
673
|
+
title: string;
|
|
669
674
|
print: string;
|
|
670
675
|
void: string;
|
|
671
676
|
printForms: string;
|
|
@@ -836,6 +841,7 @@ export declare const Element: ({ resources, ...props }: LabelsGridProps & {
|
|
|
836
841
|
description: string;
|
|
837
842
|
harmonizedTariffCode: string;
|
|
838
843
|
ifDeliveryFails: string;
|
|
844
|
+
dutiesTaxes: string;
|
|
839
845
|
quantity: string;
|
|
840
846
|
sku: string;
|
|
841
847
|
value: string;
|
|
@@ -850,6 +856,17 @@ export declare const Element: ({ resources, ...props }: LabelsGridProps & {
|
|
|
850
856
|
returnToSender: string;
|
|
851
857
|
treatAsAbandoned: string;
|
|
852
858
|
};
|
|
859
|
+
canadaDeliveredDuty: {
|
|
860
|
+
senderPrepay: string;
|
|
861
|
+
recipientPays: string;
|
|
862
|
+
tooltip: {
|
|
863
|
+
title: string;
|
|
864
|
+
restriction: string;
|
|
865
|
+
requirement1: string;
|
|
866
|
+
requirement2: string;
|
|
867
|
+
requirement3: string;
|
|
868
|
+
};
|
|
869
|
+
};
|
|
853
870
|
removeAllDeclarations: string;
|
|
854
871
|
total: string;
|
|
855
872
|
};
|
|
@@ -1042,6 +1059,7 @@ export declare const Element: ({ resources, ...props }: LabelsGridProps & {
|
|
|
1042
1059
|
edit: string;
|
|
1043
1060
|
remove: string;
|
|
1044
1061
|
viewDetails: string;
|
|
1062
|
+
cancelShipment: string;
|
|
1045
1063
|
};
|
|
1046
1064
|
};
|
|
1047
1065
|
ZnVuZGluZ19zb3VyY2VfaWQgbXVzdCBiZSBhbiBpbnRlZ2Vy: string;
|
|
@@ -1075,10 +1093,7 @@ export declare const Element: ({ resources, ...props }: LabelsGridProps & {
|
|
|
1075
1093
|
carriers: string;
|
|
1076
1094
|
externalCarriers: string;
|
|
1077
1095
|
labelLayout: string;
|
|
1078
|
-
unitSettings: string;
|
|
1079
|
-
* `features` provides optional feature configuration for the Element
|
|
1080
|
-
* If no value is defined, default configuration will be used.
|
|
1081
|
-
*/
|
|
1096
|
+
unitSettings: string;
|
|
1082
1097
|
vatSettings: string;
|
|
1083
1098
|
};
|
|
1084
1099
|
};
|
|
@@ -636,6 +636,8 @@ export declare const Element: ({ resources, ...props }: ShipEngineCarriersProps
|
|
|
636
636
|
status: string;
|
|
637
637
|
trackingStatus: string;
|
|
638
638
|
labelId: string;
|
|
639
|
+
externalOrderId: string;
|
|
640
|
+
externalShipmentId: string;
|
|
639
641
|
};
|
|
640
642
|
empty: {
|
|
641
643
|
title: string;
|
|
@@ -852,6 +854,7 @@ export declare const Element: ({ resources, ...props }: ShipEngineCarriersProps
|
|
|
852
854
|
description: string;
|
|
853
855
|
harmonizedTariffCode: string;
|
|
854
856
|
ifDeliveryFails: string;
|
|
857
|
+
dutiesTaxes: string;
|
|
855
858
|
quantity: string;
|
|
856
859
|
sku: string;
|
|
857
860
|
value: string;
|
|
@@ -866,6 +869,17 @@ export declare const Element: ({ resources, ...props }: ShipEngineCarriersProps
|
|
|
866
869
|
returnToSender: string;
|
|
867
870
|
treatAsAbandoned: string;
|
|
868
871
|
};
|
|
872
|
+
canadaDeliveredDuty: {
|
|
873
|
+
senderPrepay: string;
|
|
874
|
+
recipientPays: string;
|
|
875
|
+
tooltip: {
|
|
876
|
+
title: string;
|
|
877
|
+
restriction: string;
|
|
878
|
+
requirement1: string;
|
|
879
|
+
requirement2: string;
|
|
880
|
+
requirement3: string;
|
|
881
|
+
};
|
|
882
|
+
};
|
|
869
883
|
removeAllDeclarations: string;
|
|
870
884
|
total: string;
|
|
871
885
|
};
|
|
@@ -1058,6 +1072,7 @@ export declare const Element: ({ resources, ...props }: ShipEngineCarriersProps
|
|
|
1058
1072
|
edit: string;
|
|
1059
1073
|
remove: string;
|
|
1060
1074
|
viewDetails: string;
|
|
1075
|
+
cancelShipment: string;
|
|
1061
1076
|
};
|
|
1062
1077
|
};
|
|
1063
1078
|
ZnVuZGluZ19zb3VyY2VfaWQgbXVzdCBiZSBhbiBpbnRlZ2Vy: string;
|
|
@@ -658,6 +658,8 @@ export declare const Element: ({ resources, ...props }: ExternalCarriersProps &
|
|
|
658
658
|
status: string;
|
|
659
659
|
trackingStatus: string;
|
|
660
660
|
labelId: string;
|
|
661
|
+
externalOrderId: string;
|
|
662
|
+
externalShipmentId: string;
|
|
661
663
|
};
|
|
662
664
|
empty: {
|
|
663
665
|
title: string;
|
|
@@ -852,6 +854,7 @@ export declare const Element: ({ resources, ...props }: ExternalCarriersProps &
|
|
|
852
854
|
description: string;
|
|
853
855
|
harmonizedTariffCode: string;
|
|
854
856
|
ifDeliveryFails: string;
|
|
857
|
+
dutiesTaxes: string;
|
|
855
858
|
quantity: string;
|
|
856
859
|
sku: string;
|
|
857
860
|
value: string;
|
|
@@ -866,6 +869,17 @@ export declare const Element: ({ resources, ...props }: ExternalCarriersProps &
|
|
|
866
869
|
returnToSender: string;
|
|
867
870
|
treatAsAbandoned: string;
|
|
868
871
|
};
|
|
872
|
+
canadaDeliveredDuty: {
|
|
873
|
+
senderPrepay: string;
|
|
874
|
+
recipientPays: string;
|
|
875
|
+
tooltip: {
|
|
876
|
+
title: string;
|
|
877
|
+
restriction: string;
|
|
878
|
+
requirement1: string;
|
|
879
|
+
requirement2: string;
|
|
880
|
+
requirement3: string;
|
|
881
|
+
};
|
|
882
|
+
};
|
|
869
883
|
removeAllDeclarations: string;
|
|
870
884
|
total: string;
|
|
871
885
|
};
|
|
@@ -1058,6 +1072,7 @@ export declare const Element: ({ resources, ...props }: ExternalCarriersProps &
|
|
|
1058
1072
|
edit: string;
|
|
1059
1073
|
remove: string;
|
|
1060
1074
|
viewDetails: string;
|
|
1075
|
+
cancelShipment: string;
|
|
1061
1076
|
};
|
|
1062
1077
|
};
|
|
1063
1078
|
ZnVuZGluZ19zb3VyY2VfaWQgbXVzdCBiZSBhbiBpbnRlZ2Vy: string;
|
|
@@ -591,6 +591,8 @@ export declare const Element: ({ resources, ...props }: ManageFundingProps & {
|
|
|
591
591
|
status: string;
|
|
592
592
|
trackingStatus: string;
|
|
593
593
|
labelId: string;
|
|
594
|
+
externalOrderId: string;
|
|
595
|
+
externalShipmentId: string;
|
|
594
596
|
};
|
|
595
597
|
empty: {
|
|
596
598
|
title: string;
|
|
@@ -785,6 +787,7 @@ export declare const Element: ({ resources, ...props }: ManageFundingProps & {
|
|
|
785
787
|
description: string;
|
|
786
788
|
harmonizedTariffCode: string;
|
|
787
789
|
ifDeliveryFails: string;
|
|
790
|
+
dutiesTaxes: string;
|
|
788
791
|
quantity: string;
|
|
789
792
|
sku: string;
|
|
790
793
|
value: string;
|
|
@@ -799,6 +802,17 @@ export declare const Element: ({ resources, ...props }: ManageFundingProps & {
|
|
|
799
802
|
returnToSender: string;
|
|
800
803
|
treatAsAbandoned: string;
|
|
801
804
|
};
|
|
805
|
+
canadaDeliveredDuty: {
|
|
806
|
+
senderPrepay: string;
|
|
807
|
+
recipientPays: string;
|
|
808
|
+
tooltip: {
|
|
809
|
+
title: string;
|
|
810
|
+
restriction: string;
|
|
811
|
+
requirement1: string;
|
|
812
|
+
requirement2: string;
|
|
813
|
+
requirement3: string;
|
|
814
|
+
};
|
|
815
|
+
};
|
|
802
816
|
removeAllDeclarations: string;
|
|
803
817
|
total: string;
|
|
804
818
|
};
|
|
@@ -991,6 +1005,7 @@ export declare const Element: ({ resources, ...props }: ManageFundingProps & {
|
|
|
991
1005
|
edit: string;
|
|
992
1006
|
remove: string;
|
|
993
1007
|
viewDetails: string;
|
|
1008
|
+
cancelShipment: string;
|
|
994
1009
|
};
|
|
995
1010
|
};
|
|
996
1011
|
ZnVuZGluZ19zb3VyY2VfaWQgbXVzdCBiZSBhbiBpbnRlZ2Vy: string;
|
|
@@ -608,6 +608,8 @@ export declare const Element: ({ resources, ...props }: object & {
|
|
|
608
608
|
status: string;
|
|
609
609
|
trackingStatus: string;
|
|
610
610
|
labelId: string;
|
|
611
|
+
externalOrderId: string;
|
|
612
|
+
externalShipmentId: string;
|
|
611
613
|
};
|
|
612
614
|
empty: {
|
|
613
615
|
title: string;
|
|
@@ -819,6 +821,7 @@ export declare const Element: ({ resources, ...props }: object & {
|
|
|
819
821
|
description: string;
|
|
820
822
|
harmonizedTariffCode: string;
|
|
821
823
|
ifDeliveryFails: string;
|
|
824
|
+
dutiesTaxes: string;
|
|
822
825
|
quantity: string;
|
|
823
826
|
sku: string;
|
|
824
827
|
value: string;
|
|
@@ -833,6 +836,17 @@ export declare const Element: ({ resources, ...props }: object & {
|
|
|
833
836
|
returnToSender: string;
|
|
834
837
|
treatAsAbandoned: string;
|
|
835
838
|
};
|
|
839
|
+
canadaDeliveredDuty: {
|
|
840
|
+
senderPrepay: string;
|
|
841
|
+
recipientPays: string;
|
|
842
|
+
tooltip: {
|
|
843
|
+
title: string;
|
|
844
|
+
restriction: string;
|
|
845
|
+
requirement1: string;
|
|
846
|
+
requirement2: string;
|
|
847
|
+
requirement3: string;
|
|
848
|
+
};
|
|
849
|
+
};
|
|
836
850
|
removeAllDeclarations: string;
|
|
837
851
|
total: string;
|
|
838
852
|
};
|
|
@@ -1025,6 +1039,7 @@ export declare const Element: ({ resources, ...props }: object & {
|
|
|
1025
1039
|
edit: string;
|
|
1026
1040
|
remove: string;
|
|
1027
1041
|
viewDetails: string;
|
|
1042
|
+
cancelShipment: string;
|
|
1028
1043
|
};
|
|
1029
1044
|
};
|
|
1030
1045
|
ZnVuZGluZ19zb3VyY2VfaWQgbXVzdCBiZSBhbiBpbnRlZ2Vy: string;
|
|
@@ -591,6 +591,8 @@ export declare const Element: ({ resources, ...props }: PaymentMethodSettingsPro
|
|
|
591
591
|
status: string;
|
|
592
592
|
trackingStatus: string;
|
|
593
593
|
labelId: string;
|
|
594
|
+
externalOrderId: string;
|
|
595
|
+
externalShipmentId: string;
|
|
594
596
|
};
|
|
595
597
|
empty: {
|
|
596
598
|
title: string;
|
|
@@ -785,6 +787,7 @@ export declare const Element: ({ resources, ...props }: PaymentMethodSettingsPro
|
|
|
785
787
|
description: string;
|
|
786
788
|
harmonizedTariffCode: string;
|
|
787
789
|
ifDeliveryFails: string;
|
|
790
|
+
dutiesTaxes: string;
|
|
788
791
|
quantity: string;
|
|
789
792
|
sku: string;
|
|
790
793
|
value: string;
|
|
@@ -799,6 +802,17 @@ export declare const Element: ({ resources, ...props }: PaymentMethodSettingsPro
|
|
|
799
802
|
returnToSender: string;
|
|
800
803
|
treatAsAbandoned: string;
|
|
801
804
|
};
|
|
805
|
+
canadaDeliveredDuty: {
|
|
806
|
+
senderPrepay: string;
|
|
807
|
+
recipientPays: string;
|
|
808
|
+
tooltip: {
|
|
809
|
+
title: string;
|
|
810
|
+
restriction: string;
|
|
811
|
+
requirement1: string;
|
|
812
|
+
requirement2: string;
|
|
813
|
+
requirement3: string;
|
|
814
|
+
};
|
|
815
|
+
};
|
|
802
816
|
removeAllDeclarations: string;
|
|
803
817
|
total: string;
|
|
804
818
|
};
|
|
@@ -991,6 +1005,7 @@ export declare const Element: ({ resources, ...props }: PaymentMethodSettingsPro
|
|
|
991
1005
|
edit: string;
|
|
992
1006
|
remove: string;
|
|
993
1007
|
viewDetails: string;
|
|
1008
|
+
cancelShipment: string;
|
|
994
1009
|
};
|
|
995
1010
|
};
|
|
996
1011
|
ZnVuZGluZ19zb3VyY2VfaWQgbXVzdCBiZSBhbiBpbnRlZ2Vy: string;
|
|
@@ -2,7 +2,7 @@ import { SE } from "@shipengine/react-api";
|
|
|
2
2
|
import { RateFormProps } from "../../components/templates/rate-form";
|
|
3
3
|
import { ShipmentFormProps } from "../../components/templates/shipment-form";
|
|
4
4
|
import { UseShippingPresetsOptionsProps } from "../../hooks";
|
|
5
|
-
import { PreferredRatesResponse } from "../../types";
|
|
5
|
+
import { PreferredRatesResponse, ShipFromAddress } from "../../types";
|
|
6
6
|
import { PurchaseLabelFeatures } from "../../utilities";
|
|
7
7
|
import { UseRatesFormProps, UseShipmentFormProps } from "./hooks";
|
|
8
8
|
export type ShipmentFormMode = "browse_rates" | "select_service";
|
|
@@ -28,8 +28,9 @@ export type ConfigureShipmentProps = {
|
|
|
28
28
|
preferredServiceCodes?: RateFormProps["preferredServiceCodes"];
|
|
29
29
|
printLabelLayout?: UseRatesFormProps["printLabelLayout"];
|
|
30
30
|
salesOrder?: SE.SalesOrder;
|
|
31
|
+
shipFromAddresses?: ShipFromAddress[];
|
|
31
32
|
shipment?: SE.SalesOrderShipment;
|
|
32
33
|
shippingPresets?: UseShippingPresetsOptionsProps;
|
|
33
34
|
warehouseId?: string;
|
|
34
35
|
};
|
|
35
|
-
export declare const ConfigureShipment: ({ errors, features, currency, getPreferredRates, onAddressValidation, onApplyPreset, onBeforeLabelCreate, onChangeAddress, onLabelCreateFailure, onLabelCreateSuccess, onRateSaved, onRatesCalculated, onShipmentUpdated, printLabelLayout, preferredServiceCodes, salesOrder, shipment, onBeforeRateSaved, ...props }: ConfigureShipmentProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
36
|
+
export declare const ConfigureShipment: ({ errors, features, currency, getPreferredRates, onAddressValidation, onApplyPreset, onBeforeLabelCreate, onChangeAddress, onLabelCreateFailure, onLabelCreateSuccess, onRateSaved, onRatesCalculated, onShipmentUpdated, printLabelLayout, preferredServiceCodes, salesOrder, shipment, onBeforeRateSaved, shipFromAddresses, ...props }: ConfigureShipmentProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
export * from "./use-configure-shipment";
|
|
2
2
|
export * from "./use-import-sales-order";
|
|
3
|
-
export * from "./use-pending-shipment";
|
|
4
3
|
export * from "./use-address";
|
|
5
4
|
export * from "./use-customs";
|
|
6
5
|
export * from "./use-presets";
|
|
@@ -9,4 +8,3 @@ export * from "./use-shipment-form";
|
|
|
9
8
|
export * from "./use-rates-with-cache";
|
|
10
9
|
export * from "./use-request-rates";
|
|
11
10
|
export * from "./use-request-preferred-rates";
|
|
12
|
-
export * from "./use-get-or-create-shipment";
|
|
@@ -16,7 +16,7 @@ export declare const useAddress: ({ compatibleCountryCodes, onChange, onValidati
|
|
|
16
16
|
addressPreference: AddressPreference | undefined;
|
|
17
17
|
charsetWarning: CharsetWarning | undefined;
|
|
18
18
|
handleChangeAddress: (shipTo: SE.Address, { shouldValidate }: OnChangeAddressOptions) => Promise<SE.SalesOrderShipment>;
|
|
19
|
-
|
|
19
|
+
handleParseAddress: ({ fullAddress }: AddressParserPayload) => Promise<SE.AddressExtraction>;
|
|
20
20
|
parseAddressErrors: SE.CodedError[] | undefined;
|
|
21
21
|
resetParseAddress: () => void;
|
|
22
22
|
};
|
|
@@ -1,19 +1,30 @@
|
|
|
1
|
-
import { SE } from "@shipengine/react-api";
|
|
1
|
+
import { CodedError, SE } from "@shipengine/react-api";
|
|
2
2
|
import { ConfigureShipmentProps } from "../configure-shipment";
|
|
3
|
-
import { UsePendingShipmentProps } from "./use-pending-shipment";
|
|
4
3
|
export type UseConfigureShipmentProps = {
|
|
5
4
|
errorWhenShipmentCancelled?: boolean;
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
salesOrder?: SE.SalesOrder;
|
|
10
|
-
|
|
5
|
+
externalOrderId?: string;
|
|
6
|
+
externalOrderNumber?: string;
|
|
7
|
+
externalShipmentId?: string;
|
|
8
|
+
onLoad?: (shipments: SE.SalesOrderShipment[], salesOrder?: SE.SalesOrder, pendingShipment?: SE.SalesOrderShipment) => Promise<void> | void;
|
|
9
|
+
onShipmentUpdated: ConfigureShipmentProps["onShipmentUpdated"];
|
|
10
|
+
orderSourceCode?: string;
|
|
11
|
+
salesOrderId?: string;
|
|
12
|
+
shipFromAddresses?: ConfigureShipmentProps["shipFromAddresses"];
|
|
13
|
+
shipmentId?: string;
|
|
14
|
+
useWarehouses?: boolean;
|
|
15
|
+
warehouseId?: string;
|
|
11
16
|
};
|
|
12
|
-
|
|
13
|
-
|
|
17
|
+
/**
|
|
18
|
+
* The high-level goal of this hook is to get or create the required data to run the Configure shipment component.
|
|
19
|
+
* To run the Configure Shipment Component you need shipments. To get a shipment you either need a Shipment ID or
|
|
20
|
+
* a Sales Order Id (or other relevant Sales Order entity id, external order id, order source code, external order number).
|
|
21
|
+
* My initial thought is to combine the hooks used in useGetOrCreateShipment and useImportSalesOrder to pull in all
|
|
22
|
+
* the relevant information. I will leverage the built-in functionality of the React Query Hooks to optimize this custom hook.
|
|
23
|
+
*/
|
|
24
|
+
export declare const useConfigureShipment: ({ onShipmentUpdated, onLoad, errorWhenShipmentCancelled, externalOrderId, externalOrderNumber, externalShipmentId, orderSourceCode, salesOrderId, shipFromAddresses, shipmentId, warehouseId, useWarehouses, }: UseConfigureShipmentProps) => {
|
|
25
|
+
errors: CodedError[] | undefined;
|
|
14
26
|
isLoading: boolean;
|
|
15
|
-
|
|
16
|
-
|
|
27
|
+
refetchPendingSalesOrderShipments: () => Promise<SE.SalesOrderShipment | undefined>;
|
|
28
|
+
salesOrder: SE.SalesOrder | undefined;
|
|
17
29
|
shipment: SE.SalesOrderShipment | undefined;
|
|
18
|
-
warehouseId: string | undefined;
|
|
19
30
|
};
|
|
@@ -5,6 +5,6 @@ export type UseCustomsProps = {
|
|
|
5
5
|
};
|
|
6
6
|
export declare const useCustoms: ({ onUpdate, shipment }: UseCustomsProps) => {
|
|
7
7
|
customsErrors: SE.CodedError[] | null;
|
|
8
|
-
handleUpdateCustoms: (customs: SE.Customs, products: SE.Product[]) => Promise<SE.SalesOrderShipment>;
|
|
8
|
+
handleUpdateCustoms: (customs: SE.Customs, products: SE.Product[], canadaDdpValue?: string | null) => Promise<SE.SalesOrderShipment>;
|
|
9
9
|
handleUpdateTaxableIds: (taxIds: SE.TaxIdentifier[], onError: (errors: SE.CodedError[]) => void) => Promise<SE.SalesOrderShipment>;
|
|
10
10
|
};
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
export type UseImportSalesOrderProps = {
|
|
2
|
+
enabled: boolean;
|
|
2
3
|
externalOrderId?: string;
|
|
3
4
|
externalOrderNumber?: string;
|
|
4
5
|
orderSourceCode?: string;
|
|
5
6
|
salesOrderId?: string;
|
|
6
7
|
};
|
|
7
|
-
export declare const useImportSalesOrder: ({ externalOrderId, externalOrderNumber, orderSourceCode, salesOrderId, }: UseImportSalesOrderProps) => {
|
|
8
|
+
export declare const useImportSalesOrder: ({ enabled, externalOrderId, externalOrderNumber, orderSourceCode, salesOrderId, }: UseImportSalesOrderProps) => {
|
|
8
9
|
errors: import("@shipengine/react-api").CodedError[] | undefined;
|
|
9
10
|
isLoading: boolean;
|
|
10
11
|
salesOrder: import("@shipengine/react-api").SalesOrder | undefined;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SE } from "@shipengine/react-api";
|
|
2
|
-
import { ShippingPreset } from "../../../types";
|
|
2
|
+
import { ShipFromAddress, ShippingPreset } from "../../../types";
|
|
3
3
|
import { UseAddressProps } from "./use-address";
|
|
4
4
|
import { UsePresetsProps } from "./use-presets";
|
|
5
5
|
export type UseShipmentFormProps = {
|
|
@@ -10,9 +10,11 @@ export type UseShipmentFormProps = {
|
|
|
10
10
|
onShipmentUpdated?: (shipment: SE.SalesOrderShipment) => Promise<void> | void;
|
|
11
11
|
onSubmit?: (shipment: SE.SalesOrderShipment) => Promise<void> | void;
|
|
12
12
|
salesOrder?: SE.SalesOrder;
|
|
13
|
+
shipFromAddresses?: ShipFromAddress[];
|
|
13
14
|
shipment?: SE.SalesOrderShipment;
|
|
15
|
+
useWarehouses?: boolean;
|
|
14
16
|
};
|
|
15
|
-
export declare const useShipmentForm: ({ compatibleCountryCodes, onAddressValidation, onApplyPreset, onChangeAddress, onShipmentUpdated, onSubmit, salesOrder, shipment, }: UseShipmentFormProps) => {
|
|
17
|
+
export declare const useShipmentForm: ({ compatibleCountryCodes, onAddressValidation, onApplyPreset, onChangeAddress, onShipmentUpdated, onSubmit, salesOrder, shipment, shipFromAddresses: shipFromAddressesProp, useWarehouses, }: UseShipmentFormProps) => {
|
|
16
18
|
accountSettings: SE.ShipEngineAccountSettings | undefined;
|
|
17
19
|
addressLoading: boolean;
|
|
18
20
|
addressPreference: import("../../../components/templates").AddressPreference | undefined;
|
|
@@ -23,17 +25,24 @@ export declare const useShipmentForm: ({ compatibleCountryCodes, onAddressValida
|
|
|
23
25
|
errors: SE.CodedError[] | undefined;
|
|
24
26
|
onApplyPreset: (preset: ShippingPreset) => Promise<void>;
|
|
25
27
|
onChangeAddress: (shipTo: SE.Address, { shouldValidate }: import("../../../components/templates").OnChangeAddressOptions) => Promise<SE.SalesOrderShipment>;
|
|
26
|
-
|
|
28
|
+
onChangeShipFromAddress: (id?: string, shipFromAddress?: ShipFromAddress) => Promise<void>;
|
|
27
29
|
onSubmit: (values: Partial<SE.SalesOrderShipment>) => Promise<SE.SalesOrderShipment>;
|
|
28
|
-
|
|
30
|
+
onSubmitParseAddress: ({ fullAddress }: {
|
|
29
31
|
fullAddress: string;
|
|
30
32
|
}) => Promise<SE.AddressExtraction>;
|
|
31
|
-
onUpdateCustoms: (customs: SE.Customs, products: SE.Product[]) => Promise<SE.SalesOrderShipment>;
|
|
33
|
+
onUpdateCustoms: (customs: SE.Customs, products: SE.Product[], canadaDdpValue?: string | null | undefined) => Promise<SE.SalesOrderShipment>;
|
|
32
34
|
onUpdateTaxableIds: (taxIds: SE.TaxIdentifier[], onError: (errors: SE.CodedError[]) => void) => Promise<SE.SalesOrderShipment>;
|
|
33
35
|
parseAddressErrors: SE.CodedError[] | undefined;
|
|
34
36
|
resetParseAddress: () => void;
|
|
35
37
|
resetSalesOrderShipment: () => void;
|
|
36
38
|
salesOrder: SE.SalesOrder | undefined;
|
|
39
|
+
shipFromAddresses: {
|
|
40
|
+
addressId: string;
|
|
41
|
+
originAddress: SE.Address;
|
|
42
|
+
returnAddress: SE.Address;
|
|
43
|
+
isDefault: boolean;
|
|
44
|
+
name?: string | undefined;
|
|
45
|
+
}[] | undefined;
|
|
37
46
|
shipment: SE.SalesOrderShipment | undefined;
|
|
38
47
|
warehouses: SE.Warehouse[] | undefined;
|
|
39
48
|
};
|