@shipengine/elements 2.11.1 → 2.13.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.
Files changed (109) hide show
  1. package/actions-menu.js +5 -5
  2. package/canada-ddp.js +1 -0
  3. package/carrier.js +1 -1
  4. package/components.js +1 -1
  5. package/elements.js +1 -1
  6. package/hooks.js +1 -1
  7. package/index.js +1 -1
  8. package/package.json +4 -4
  9. package/shipment.js +1 -1
  10. package/src/components/actions-menu/actions-menu.d.ts +2 -1
  11. package/src/components/add-funds-form/add-funds-form.d.ts +9 -1
  12. package/src/components/carrier-connection-card/carrier-connection-card.styles.d.ts +1 -1
  13. package/src/components/collapsible-panel/collapsible-panel.d.ts +15 -1
  14. package/src/components/field/date-picker/date-picker.d.ts +3 -1
  15. package/src/components/field/rate-select/rate-card/cost-breakdown/cost-breakdown.styles.d.ts +2 -1
  16. package/src/components/field/rate-select/rate-card/rate-card.styles.d.ts +1 -1
  17. package/src/components/field/select/select-with-categories.d.ts +1 -0
  18. package/src/components/grid-controller/grid-controller.styles.d.ts +8 -3
  19. package/src/components/grid-filters/components/label-id-filter/label-id-filter.styles.d.ts +1 -1
  20. package/src/components/grid-filters/grid-filters.d.ts +2 -1
  21. package/src/components/history/history-card/history-card.styles.d.ts +1 -1
  22. package/src/components/index.d.ts +1 -0
  23. package/src/components/save-status/save-status.d.ts +15 -1
  24. package/src/components/ship-from-address-form/index.d.ts +1 -0
  25. package/src/components/ship-from-address-form/ship-from-address-form-schema.d.ts +436 -0
  26. package/src/components/ship-from-address-form/ship-from-address-form.d.ts +20 -0
  27. package/src/components/ship-from-address-form/ship-from-address-form.styles.d.ts +20 -0
  28. package/src/components/templates/index.d.ts +1 -1
  29. package/src/components/templates/label-display/label-card.styles.d.ts +1 -1
  30. package/src/components/templates/rate-form/rate-form.d.ts +3 -2
  31. package/src/components/templates/shipment-form/sections/customs-forms/customs-forms.d.ts +2 -1
  32. package/src/components/templates/shipment-form/shipment-form.d.ts +10 -6
  33. package/src/components/templates/shipment-form/shipment-form.styles.d.ts +1 -0
  34. package/src/components/templates/shipment-form/shipment-schema.d.ts +41 -121
  35. package/src/components/templates/suspend-purchase/index.d.ts +1 -0
  36. package/src/components/templates/suspend-purchase/suspend-purchase.d.ts +8 -0
  37. package/src/components/templates/theme-creator/theme-creator.styles.d.ts +1 -1
  38. package/src/components/warehouse-form/warehouse-form-schema.d.ts +148 -34
  39. package/src/elements/labels-grid/hooks/use-labels-grid.d.ts +4 -0
  40. package/src/elements/labels-grid/labels-grid.d.ts +47 -23
  41. package/src/elements/manage-carriers/manage-carriers.d.ts +25 -1
  42. package/src/elements/manage-external-carriers/manage-external-carriers.d.ts +25 -1
  43. package/src/elements/manage-funding/manage-funding-element.d.ts +25 -1
  44. package/src/elements/manage-warehouses/manage-warehouses.d.ts +25 -1
  45. package/src/elements/payment-method-settings/payment-method-settings-element.d.ts +25 -1
  46. package/src/elements/purchase-label/configure-shipment.d.ts +3 -2
  47. package/src/elements/purchase-label/hooks/index.d.ts +0 -2
  48. package/src/elements/purchase-label/hooks/use-address.d.ts +1 -1
  49. package/src/elements/purchase-label/hooks/use-configure-shipment.d.ts +23 -12
  50. package/src/elements/purchase-label/hooks/use-customs.d.ts +1 -1
  51. package/src/elements/purchase-label/hooks/use-import-sales-order.d.ts +2 -1
  52. package/src/elements/purchase-label/hooks/use-shipment-form.d.ts +14 -5
  53. package/src/elements/purchase-label/purchase-label.d.ts +102 -49
  54. package/src/elements/select-label-layout/select-label-layout-element.d.ts +25 -1
  55. package/src/elements/shipment-summary/shipment-summary.d.ts +40 -8
  56. package/src/elements/shipments-grid/shipments-grid.d.ts +101 -21
  57. package/src/elements/theme-creator/theme-creator.d.ts +25 -1
  58. package/src/elements/transaction-history/transaction-history-element.d.ts +25 -1
  59. package/src/elements/unit-settings/unit-settings-element.d.ts +25 -1
  60. package/src/elements/vat-settings/vat-settings-element.d.ts +25 -1
  61. package/src/elements/void-label/components/actions/actions.d.ts +2 -1
  62. package/src/elements/void-label/void-label.d.ts +80 -25
  63. package/src/elements-provider/elements-context-provider.d.ts +10 -3
  64. package/src/elements-provider/elements-provider.d.ts +7 -2
  65. package/src/features/manage-carriers/index.d.ts +1 -0
  66. package/src/features/manage-carriers/manage-carriers.d.ts +12 -1
  67. package/src/features/manage-carriers/use-manage-carriers.d.ts +15 -0
  68. package/src/features/manage-funding/manage-funding.d.ts +10 -1
  69. package/src/features/vat-settings/use-vat-settings.d.ts +1 -1
  70. package/src/hooks/options/index.d.ts +1 -1
  71. package/src/hooks/options/use-insurance-provider-options.d.ts +1 -1
  72. package/src/hooks/options/use-ship-from-address-options.d.ts +19 -0
  73. package/src/hooks/options/use-shipment-metadata.d.ts +1 -0
  74. package/src/hooks/use-root-portal.d.ts +3 -2
  75. package/src/locales/en/index.d.ts +25 -1
  76. package/src/types/canada-ddp.d.ts +4 -0
  77. package/src/types/index.d.ts +2 -0
  78. package/src/types/ship-from-address.d.ts +4 -0
  79. package/src/utilities/feature-flags/types.d.ts +7 -1
  80. package/src/utilities/shipengine/address.d.ts +32 -0
  81. package/src/utilities/shipengine/sales-order.d.ts +2 -2
  82. package/src/utilities/shipengine/warehouses.d.ts +2 -1
  83. package/src/utilities/styles.d.ts +6 -2
  84. package/src/workflows/account-settings/account-settings.d.ts +25 -1
  85. package/src/workflows/account-settings/use-get-panel-props.d.ts +2 -2
  86. package/src/workflows/carrier-services/carrier-services.d.ts +75 -2
  87. package/src/workflows/connect-external-carrier/connect-external-carrier.d.ts +48 -1
  88. package/src/workflows/label-workflow/label-workflow.d.ts +10 -0
  89. package/src/workflows/onboarding/onboarding.d.ts +33 -2
  90. package/suspend-text.js +1 -1
  91. package/transaction-history-element.js +1 -1
  92. package/types.js +1 -1
  93. package/use-scrub-errors.js +1 -1
  94. package/use-toggle.js +1 -1
  95. package/use-unit-settings.js +1 -1
  96. package/usePager.js +1 -1
  97. package/utilities.js +1 -1
  98. package/validation.js +1 -1
  99. package/vat.js +1 -1
  100. package/wallet-form.js +1 -1
  101. package/workflows.js +1 -1
  102. package/src/components/templates/suspend-shipment/index.d.ts +0 -1
  103. package/src/components/templates/suspend-shipment/suspend-shipment.d.ts +0 -8
  104. package/src/elements/purchase-label/hooks/use-get-or-create-shipment.d.ts +0 -13
  105. package/src/elements/purchase-label/hooks/use-load-shipment.d.ts +0 -9
  106. package/src/elements/purchase-label/hooks/use-pending-shipment.d.ts +0 -13
  107. package/src/elements/purchase-label/purchase-label-by-sales-order.d.ts +0 -11
  108. package/src/elements/purchase-label/purchase-label-by-shipment.d.ts +0 -8
  109. 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: {
@@ -70,6 +80,7 @@ export declare const Element: ({ resources, ...props }: LabelsGridProps & {
70
80
  };
71
81
  errorMessages: {
72
82
  labelIdRequired: string;
83
+ request_failed_to_complete: string;
73
84
  };
74
85
  resultMessages: {
75
86
  approved: string;
@@ -83,7 +94,10 @@ export declare const Element: ({ resources, ...props }: LabelsGridProps & {
83
94
  rejected: string;
84
95
  };
85
96
  voidedOn: string;
86
- };
97
+ }; /**
98
+ * `onClickExternalOrderId` is an optional callback function that will be invoked when the user clicks the id number within the
99
+ * `External Order ID` column, if present.
100
+ */
87
101
  "view-shipment": {
88
102
  title: string;
89
103
  actions: {
@@ -128,9 +142,7 @@ export declare const Element: ({ resources, ...props }: LabelsGridProps & {
128
142
  highVolumeForms: string;
129
143
  multipleShippingServices: string;
130
144
  sections: {
131
- labels: string; /**
132
- * `onRowClick` callback invoked when a row is clicked.
133
- */
145
+ labels: string;
134
146
  shipmentSummary: string;
135
147
  };
136
148
  noLabels: string;
@@ -266,10 +278,7 @@ export declare const Element: ({ resources, ...props }: LabelsGridProps & {
266
278
  auctane_service_fee: string;
267
279
  product_price: string;
268
280
  };
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
- */
281
+ };
273
282
  "purchase-label": {
274
283
  title: string;
275
284
  actions: {
@@ -292,10 +301,7 @@ export declare const Element: ({ resources, ...props }: LabelsGridProps & {
292
301
  parcelguard: string;
293
302
  };
294
303
  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
- */
304
+ customsItemsRequired: string;
299
305
  invalidAddress: string;
300
306
  noRates: string;
301
307
  salesOrderNotLoaded: string;
@@ -539,10 +545,7 @@ export declare const Element: ({ resources, ...props }: LabelsGridProps & {
539
545
  insufficientFunds: string;
540
546
  insufficientFundsTitle: string;
541
547
  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
- */
548
+ negativeBalanceTitle: string;
546
549
  newBalance: string;
547
550
  };
548
551
  errors: {
@@ -639,6 +642,8 @@ export declare const Element: ({ resources, ...props }: LabelsGridProps & {
639
642
  status: string;
640
643
  trackingStatus: string;
641
644
  labelId: string;
645
+ externalOrderId: string;
646
+ externalShipmentId: string;
642
647
  };
643
648
  empty: {
644
649
  title: string;
@@ -662,10 +667,11 @@ export declare const Element: ({ resources, ...props }: LabelsGridProps & {
662
667
  error: string;
663
668
  };
664
669
  actions: {
665
- title: string; /**
670
+ /**
666
671
  * `labelStatus` is the status of the labels you wish to view.
667
672
  * If no value is defined, all labels will be rendered.
668
673
  */
674
+ title: string;
669
675
  print: string;
670
676
  void: string;
671
677
  printForms: string;
@@ -836,6 +842,7 @@ export declare const Element: ({ resources, ...props }: LabelsGridProps & {
836
842
  description: string;
837
843
  harmonizedTariffCode: string;
838
844
  ifDeliveryFails: string;
845
+ dutiesTaxes: string;
839
846
  quantity: string;
840
847
  sku: string;
841
848
  value: string;
@@ -850,6 +857,17 @@ export declare const Element: ({ resources, ...props }: LabelsGridProps & {
850
857
  returnToSender: string;
851
858
  treatAsAbandoned: string;
852
859
  };
860
+ canadaDeliveredDuty: {
861
+ senderPrepay: string;
862
+ recipientPays: string;
863
+ tooltip: {
864
+ title: string;
865
+ restriction: string;
866
+ requirement1: string;
867
+ requirement2: string;
868
+ requirement3: string;
869
+ };
870
+ };
853
871
  removeAllDeclarations: string;
854
872
  total: string;
855
873
  };
@@ -999,6 +1017,9 @@ export declare const Element: ({ resources, ...props }: LabelsGridProps & {
999
1017
  tooManyCharacters: string;
1000
1018
  requiredShipmentId: string;
1001
1019
  requiredLabelId: string;
1020
+ heightExceeded: string;
1021
+ widthExceeded: string;
1022
+ lengthExceeded: string;
1002
1023
  };
1003
1024
  shippingPresets: {
1004
1025
  apply: string;
@@ -1042,6 +1063,7 @@ export declare const Element: ({ resources, ...props }: LabelsGridProps & {
1042
1063
  edit: string;
1043
1064
  remove: string;
1044
1065
  viewDetails: string;
1066
+ cancelShipment: string;
1045
1067
  };
1046
1068
  };
1047
1069
  ZnVuZGluZ19zb3VyY2VfaWQgbXVzdCBiZSBhbiBpbnRlZ2Vy: string;
@@ -1072,13 +1094,15 @@ export declare const Element: ({ resources, ...props }: LabelsGridProps & {
1072
1094
  transactionHistory: string;
1073
1095
  adjustmentHistory: string;
1074
1096
  warehouses: string;
1075
- carriers: string;
1097
+ carriers: {
1098
+ title: string;
1099
+ customStatusMessages: {
1100
+ success: string;
1101
+ };
1102
+ };
1076
1103
  externalCarriers: string;
1077
1104
  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
- */
1105
+ unitSettings: string;
1082
1106
  vatSettings: string;
1083
1107
  };
1084
1108
  };
@@ -56,6 +56,7 @@ export declare const Element: ({ resources, ...props }: ShipEngineCarriersProps
56
56
  };
57
57
  errorMessages: {
58
58
  labelIdRequired: string;
59
+ request_failed_to_complete: string;
59
60
  };
60
61
  resultMessages: {
61
62
  approved: string;
@@ -636,6 +637,8 @@ export declare const Element: ({ resources, ...props }: ShipEngineCarriersProps
636
637
  status: string;
637
638
  trackingStatus: string;
638
639
  labelId: string;
640
+ externalOrderId: string;
641
+ externalShipmentId: string;
639
642
  };
640
643
  empty: {
641
644
  title: string;
@@ -852,6 +855,7 @@ export declare const Element: ({ resources, ...props }: ShipEngineCarriersProps
852
855
  description: string;
853
856
  harmonizedTariffCode: string;
854
857
  ifDeliveryFails: string;
858
+ dutiesTaxes: string;
855
859
  quantity: string;
856
860
  sku: string;
857
861
  value: string;
@@ -866,6 +870,17 @@ export declare const Element: ({ resources, ...props }: ShipEngineCarriersProps
866
870
  returnToSender: string;
867
871
  treatAsAbandoned: string;
868
872
  };
873
+ canadaDeliveredDuty: {
874
+ senderPrepay: string;
875
+ recipientPays: string;
876
+ tooltip: {
877
+ title: string;
878
+ restriction: string;
879
+ requirement1: string;
880
+ requirement2: string;
881
+ requirement3: string;
882
+ };
883
+ };
869
884
  removeAllDeclarations: string;
870
885
  total: string;
871
886
  };
@@ -1015,6 +1030,9 @@ export declare const Element: ({ resources, ...props }: ShipEngineCarriersProps
1015
1030
  tooManyCharacters: string;
1016
1031
  requiredShipmentId: string;
1017
1032
  requiredLabelId: string;
1033
+ heightExceeded: string;
1034
+ widthExceeded: string;
1035
+ lengthExceeded: string;
1018
1036
  };
1019
1037
  shippingPresets: {
1020
1038
  apply: string;
@@ -1058,6 +1076,7 @@ export declare const Element: ({ resources, ...props }: ShipEngineCarriersProps
1058
1076
  edit: string;
1059
1077
  remove: string;
1060
1078
  viewDetails: string;
1079
+ cancelShipment: string;
1061
1080
  };
1062
1081
  };
1063
1082
  ZnVuZGluZ19zb3VyY2VfaWQgbXVzdCBiZSBhbiBpbnRlZ2Vy: string;
@@ -1088,7 +1107,12 @@ export declare const Element: ({ resources, ...props }: ShipEngineCarriersProps
1088
1107
  transactionHistory: string;
1089
1108
  adjustmentHistory: string;
1090
1109
  warehouses: string;
1091
- carriers: string;
1110
+ carriers: {
1111
+ title: string;
1112
+ customStatusMessages: {
1113
+ success: string;
1114
+ };
1115
+ };
1092
1116
  externalCarriers: string;
1093
1117
  labelLayout: string;
1094
1118
  unitSettings: string;
@@ -56,6 +56,7 @@ export declare const Element: ({ resources, ...props }: ExternalCarriersProps &
56
56
  };
57
57
  errorMessages: {
58
58
  labelIdRequired: string;
59
+ request_failed_to_complete: string;
59
60
  };
60
61
  resultMessages: {
61
62
  approved: string;
@@ -658,6 +659,8 @@ export declare const Element: ({ resources, ...props }: ExternalCarriersProps &
658
659
  status: string;
659
660
  trackingStatus: string;
660
661
  labelId: string;
662
+ externalOrderId: string;
663
+ externalShipmentId: string;
661
664
  };
662
665
  empty: {
663
666
  title: string;
@@ -852,6 +855,7 @@ export declare const Element: ({ resources, ...props }: ExternalCarriersProps &
852
855
  description: string;
853
856
  harmonizedTariffCode: string;
854
857
  ifDeliveryFails: string;
858
+ dutiesTaxes: string;
855
859
  quantity: string;
856
860
  sku: string;
857
861
  value: string;
@@ -866,6 +870,17 @@ export declare const Element: ({ resources, ...props }: ExternalCarriersProps &
866
870
  returnToSender: string;
867
871
  treatAsAbandoned: string;
868
872
  };
873
+ canadaDeliveredDuty: {
874
+ senderPrepay: string;
875
+ recipientPays: string;
876
+ tooltip: {
877
+ title: string;
878
+ restriction: string;
879
+ requirement1: string;
880
+ requirement2: string;
881
+ requirement3: string;
882
+ };
883
+ };
869
884
  removeAllDeclarations: string;
870
885
  total: string;
871
886
  };
@@ -1015,6 +1030,9 @@ export declare const Element: ({ resources, ...props }: ExternalCarriersProps &
1015
1030
  tooManyCharacters: string;
1016
1031
  requiredShipmentId: string;
1017
1032
  requiredLabelId: string;
1033
+ heightExceeded: string;
1034
+ widthExceeded: string;
1035
+ lengthExceeded: string;
1018
1036
  };
1019
1037
  shippingPresets: {
1020
1038
  apply: string;
@@ -1058,6 +1076,7 @@ export declare const Element: ({ resources, ...props }: ExternalCarriersProps &
1058
1076
  edit: string;
1059
1077
  remove: string;
1060
1078
  viewDetails: string;
1079
+ cancelShipment: string;
1061
1080
  };
1062
1081
  };
1063
1082
  ZnVuZGluZ19zb3VyY2VfaWQgbXVzdCBiZSBhbiBpbnRlZ2Vy: string;
@@ -1088,7 +1107,12 @@ export declare const Element: ({ resources, ...props }: ExternalCarriersProps &
1088
1107
  transactionHistory: string;
1089
1108
  adjustmentHistory: string;
1090
1109
  warehouses: string;
1091
- carriers: string;
1110
+ carriers: {
1111
+ title: string;
1112
+ customStatusMessages: {
1113
+ success: string;
1114
+ };
1115
+ };
1092
1116
  externalCarriers: string;
1093
1117
  labelLayout: string;
1094
1118
  unitSettings: string;
@@ -33,6 +33,7 @@ export declare const Element: ({ resources, ...props }: ManageFundingProps & {
33
33
  };
34
34
  errorMessages: {
35
35
  labelIdRequired: string;
36
+ request_failed_to_complete: string;
36
37
  };
37
38
  resultMessages: {
38
39
  approved: string;
@@ -591,6 +592,8 @@ export declare const Element: ({ resources, ...props }: ManageFundingProps & {
591
592
  status: string;
592
593
  trackingStatus: string;
593
594
  labelId: string;
595
+ externalOrderId: string;
596
+ externalShipmentId: string;
594
597
  };
595
598
  empty: {
596
599
  title: string;
@@ -785,6 +788,7 @@ export declare const Element: ({ resources, ...props }: ManageFundingProps & {
785
788
  description: string;
786
789
  harmonizedTariffCode: string;
787
790
  ifDeliveryFails: string;
791
+ dutiesTaxes: string;
788
792
  quantity: string;
789
793
  sku: string;
790
794
  value: string;
@@ -799,6 +803,17 @@ export declare const Element: ({ resources, ...props }: ManageFundingProps & {
799
803
  returnToSender: string;
800
804
  treatAsAbandoned: string;
801
805
  };
806
+ canadaDeliveredDuty: {
807
+ senderPrepay: string;
808
+ recipientPays: string;
809
+ tooltip: {
810
+ title: string;
811
+ restriction: string;
812
+ requirement1: string;
813
+ requirement2: string;
814
+ requirement3: string;
815
+ };
816
+ };
802
817
  removeAllDeclarations: string;
803
818
  total: string;
804
819
  };
@@ -948,6 +963,9 @@ export declare const Element: ({ resources, ...props }: ManageFundingProps & {
948
963
  tooManyCharacters: string;
949
964
  requiredShipmentId: string;
950
965
  requiredLabelId: string;
966
+ heightExceeded: string;
967
+ widthExceeded: string;
968
+ lengthExceeded: string;
951
969
  };
952
970
  shippingPresets: {
953
971
  apply: string;
@@ -991,6 +1009,7 @@ export declare const Element: ({ resources, ...props }: ManageFundingProps & {
991
1009
  edit: string;
992
1010
  remove: string;
993
1011
  viewDetails: string;
1012
+ cancelShipment: string;
994
1013
  };
995
1014
  };
996
1015
  ZnVuZGluZ19zb3VyY2VfaWQgbXVzdCBiZSBhbiBpbnRlZ2Vy: string;
@@ -1021,7 +1040,12 @@ export declare const Element: ({ resources, ...props }: ManageFundingProps & {
1021
1040
  transactionHistory: string;
1022
1041
  adjustmentHistory: string;
1023
1042
  warehouses: string;
1024
- carriers: string;
1043
+ carriers: {
1044
+ title: string;
1045
+ customStatusMessages: {
1046
+ success: string;
1047
+ };
1048
+ };
1025
1049
  externalCarriers: string;
1026
1050
  labelLayout: string;
1027
1051
  unitSettings: string;
@@ -50,6 +50,7 @@ export declare const Element: ({ resources, ...props }: object & {
50
50
  };
51
51
  errorMessages: {
52
52
  labelIdRequired: string;
53
+ request_failed_to_complete: string;
53
54
  };
54
55
  resultMessages: {
55
56
  approved: string;
@@ -608,6 +609,8 @@ export declare const Element: ({ resources, ...props }: object & {
608
609
  status: string;
609
610
  trackingStatus: string;
610
611
  labelId: string;
612
+ externalOrderId: string;
613
+ externalShipmentId: string;
611
614
  };
612
615
  empty: {
613
616
  title: string;
@@ -819,6 +822,7 @@ export declare const Element: ({ resources, ...props }: object & {
819
822
  description: string;
820
823
  harmonizedTariffCode: string;
821
824
  ifDeliveryFails: string;
825
+ dutiesTaxes: string;
822
826
  quantity: string;
823
827
  sku: string;
824
828
  value: string;
@@ -833,6 +837,17 @@ export declare const Element: ({ resources, ...props }: object & {
833
837
  returnToSender: string;
834
838
  treatAsAbandoned: string;
835
839
  };
840
+ canadaDeliveredDuty: {
841
+ senderPrepay: string;
842
+ recipientPays: string;
843
+ tooltip: {
844
+ title: string;
845
+ restriction: string;
846
+ requirement1: string;
847
+ requirement2: string;
848
+ requirement3: string;
849
+ };
850
+ };
836
851
  removeAllDeclarations: string;
837
852
  total: string;
838
853
  };
@@ -982,6 +997,9 @@ export declare const Element: ({ resources, ...props }: object & {
982
997
  tooManyCharacters: string;
983
998
  requiredShipmentId: string;
984
999
  requiredLabelId: string;
1000
+ heightExceeded: string;
1001
+ widthExceeded: string;
1002
+ lengthExceeded: string;
985
1003
  };
986
1004
  shippingPresets: {
987
1005
  apply: string;
@@ -1025,6 +1043,7 @@ export declare const Element: ({ resources, ...props }: object & {
1025
1043
  edit: string;
1026
1044
  remove: string;
1027
1045
  viewDetails: string;
1046
+ cancelShipment: string;
1028
1047
  };
1029
1048
  };
1030
1049
  ZnVuZGluZ19zb3VyY2VfaWQgbXVzdCBiZSBhbiBpbnRlZ2Vy: string;
@@ -1055,7 +1074,12 @@ export declare const Element: ({ resources, ...props }: object & {
1055
1074
  transactionHistory: string;
1056
1075
  adjustmentHistory: string;
1057
1076
  warehouses: string;
1058
- carriers: string;
1077
+ carriers: {
1078
+ title: string;
1079
+ customStatusMessages: {
1080
+ success: string;
1081
+ };
1082
+ };
1059
1083
  externalCarriers: string;
1060
1084
  labelLayout: string;
1061
1085
  unitSettings: string;
@@ -33,6 +33,7 @@ export declare const Element: ({ resources, ...props }: PaymentMethodSettingsPro
33
33
  };
34
34
  errorMessages: {
35
35
  labelIdRequired: string;
36
+ request_failed_to_complete: string;
36
37
  };
37
38
  resultMessages: {
38
39
  approved: string;
@@ -591,6 +592,8 @@ export declare const Element: ({ resources, ...props }: PaymentMethodSettingsPro
591
592
  status: string;
592
593
  trackingStatus: string;
593
594
  labelId: string;
595
+ externalOrderId: string;
596
+ externalShipmentId: string;
594
597
  };
595
598
  empty: {
596
599
  title: string;
@@ -785,6 +788,7 @@ export declare const Element: ({ resources, ...props }: PaymentMethodSettingsPro
785
788
  description: string;
786
789
  harmonizedTariffCode: string;
787
790
  ifDeliveryFails: string;
791
+ dutiesTaxes: string;
788
792
  quantity: string;
789
793
  sku: string;
790
794
  value: string;
@@ -799,6 +803,17 @@ export declare const Element: ({ resources, ...props }: PaymentMethodSettingsPro
799
803
  returnToSender: string;
800
804
  treatAsAbandoned: string;
801
805
  };
806
+ canadaDeliveredDuty: {
807
+ senderPrepay: string;
808
+ recipientPays: string;
809
+ tooltip: {
810
+ title: string;
811
+ restriction: string;
812
+ requirement1: string;
813
+ requirement2: string;
814
+ requirement3: string;
815
+ };
816
+ };
802
817
  removeAllDeclarations: string;
803
818
  total: string;
804
819
  };
@@ -948,6 +963,9 @@ export declare const Element: ({ resources, ...props }: PaymentMethodSettingsPro
948
963
  tooManyCharacters: string;
949
964
  requiredShipmentId: string;
950
965
  requiredLabelId: string;
966
+ heightExceeded: string;
967
+ widthExceeded: string;
968
+ lengthExceeded: string;
951
969
  };
952
970
  shippingPresets: {
953
971
  apply: string;
@@ -991,6 +1009,7 @@ export declare const Element: ({ resources, ...props }: PaymentMethodSettingsPro
991
1009
  edit: string;
992
1010
  remove: string;
993
1011
  viewDetails: string;
1012
+ cancelShipment: string;
994
1013
  };
995
1014
  };
996
1015
  ZnVuZGluZ19zb3VyY2VfaWQgbXVzdCBiZSBhbiBpbnRlZ2Vy: string;
@@ -1021,7 +1040,12 @@ export declare const Element: ({ resources, ...props }: PaymentMethodSettingsPro
1021
1040
  transactionHistory: string;
1022
1041
  adjustmentHistory: string;
1023
1042
  warehouses: string;
1024
- carriers: string;
1043
+ carriers: {
1044
+ title: string;
1045
+ customStatusMessages: {
1046
+ success: string;
1047
+ };
1048
+ };
1025
1049
  externalCarriers: string;
1026
1050
  labelLayout: string;
1027
1051
  unitSettings: 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
- handleParseShipTo: ({ fullAddress }: AddressParserPayload) => Promise<SE.AddressExtraction>;
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
- onLoad?: UsePendingShipmentProps["onLoad"];
7
- onShipmentUpdated?: ConfigureShipmentProps["onShipmentUpdated"];
8
- printLabelLayout?: SE.LabelLayout;
9
- salesOrder?: SE.SalesOrder;
10
- warehouseId?: UsePendingShipmentProps["warehouseId"];
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
- export declare const useConfigureShipment: ({ onLoad, errorWhenShipmentCancelled, onShipmentUpdated, salesOrder, warehouseId, printLabelLayout, }: UseConfigureShipmentProps) => {
13
- errors: SE.CodedError[] | undefined;
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
- onShipmentUpdated: (shipment: SE.SalesOrderShipment) => Promise<void>;
16
- printLabelLayout: SE.LabelLayout;
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
  };