@shipengine/elements 0.24.0 → 0.26.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 (74) hide show
  1. package/index.cjs +1442 -654
  2. package/index.js +1449 -668
  3. package/package.json +13 -4
  4. package/src/components/error-display/error-display.d.ts +1 -0
  5. package/src/components/error-display/error-display.styles.d.ts +19 -0
  6. package/src/components/error-display/index.d.ts +1 -0
  7. package/src/components/field/field.styles.d.ts +2 -12
  8. package/src/components/field/rate-card/rate-card.d.ts +1 -1
  9. package/src/components/history/history-card/history-card.styles.d.ts +12 -14
  10. package/src/components/history/history-card-extension/history-card-extension.d.ts +1 -0
  11. package/src/components/history/history-card-extension/history-card-extension.styles.d.ts +26 -0
  12. package/src/components/history/history-card-extension/index.d.ts +1 -0
  13. package/src/components/history/index.d.ts +1 -0
  14. package/src/components/index.d.ts +1 -0
  15. package/src/components/label/label.d.ts +1 -1
  16. package/src/components/label/label.styles.d.ts +5 -1
  17. package/src/components/label-layout/label-layout-settings.d.ts +3 -1
  18. package/src/components/link-action/link-action.d.ts +3 -1
  19. package/src/components/powered-by-shipengine/index.d.ts +1 -0
  20. package/src/components/powered-by-shipengine/powered-by-shipengine.d.ts +1 -0
  21. package/src/components/powered-by-shipengine/powered-by-shipengine.styles.d.ts +11 -0
  22. package/src/components/save-status/index.d.ts +2 -0
  23. package/src/components/save-status/save-status-styles.d.ts +43 -0
  24. package/src/components/save-status/save-status.d.ts +6 -0
  25. package/src/components/templates/index.d.ts +0 -1
  26. package/src/components/templates/rate-form/rate-form.d.ts +4 -1
  27. package/src/components/unit-settings/unit-settings.d.ts +1 -4
  28. package/src/constants/shipengine/address.d.ts +2 -0
  29. package/src/elements/configure-shipment/hooks/use-rates-form.d.ts +2 -0
  30. package/src/elements/list-carriers/list-carriers.d.ts +29 -14
  31. package/src/elements/manage-warehouses/manage-warehouses.d.ts +29 -14
  32. package/src/elements/onboarding/onboarding.d.ts +29 -14
  33. package/src/elements/purchase-label/hooks/use-load-or-create-shipment.d.ts +6 -0
  34. package/src/elements/purchase-label/purchase-label-by-shipment.d.ts +5 -2
  35. package/src/elements/purchase-label/purchase-label.d.ts +41 -20
  36. package/src/elements/view-shipment/view-shipment.d.ts +29 -14
  37. package/src/{components/templates/void-label/void-label.d.ts → elements/void-label/components/actions/actions.d.ts} +3 -3
  38. package/src/elements/void-label/components/actions/index.d.ts +1 -0
  39. package/src/elements/void-label/components/index.d.ts +2 -0
  40. package/src/elements/void-label/components/message/index.d.ts +1 -0
  41. package/src/elements/void-label/components/message/message.d.ts +6 -0
  42. package/src/elements/void-label/void-label.d.ts +29 -14
  43. package/src/factories/shipengine/wallet-history.d.ts +52 -0
  44. package/src/features/wallet-history/wallet-history.styles.d.ts +4 -0
  45. package/src/hooks/options/index.d.ts +1 -0
  46. package/src/hooks/options/use-package-options.d.ts +1 -1
  47. package/src/hooks/options/use-service-code-options.d.ts +1 -1
  48. package/src/hooks/options/use-shipment-metadata.d.ts +8 -0
  49. package/src/hooks/options/use-shipping-presets-options.d.ts +2 -1
  50. package/src/hooks/use-get-or-create-shipment.d.ts +2 -0
  51. package/src/locales/en/index.d.ts +29 -14
  52. package/src/mocks/account-settings/handlers.d.ts +8 -0
  53. package/src/mocks/account-settings/index.d.ts +1 -0
  54. package/src/mocks/index.d.ts +1 -0
  55. package/src/mocks/server.d.ts +1 -0
  56. package/src/testing/extensions/index.d.ts +2 -0
  57. package/src/testing/extensions/matchers/extend-matchers.d.ts +8 -0
  58. package/src/testing/extensions/matchers/index.d.ts +1 -0
  59. package/src/testing/extensions/matchers/matchers.d.ts +1 -0
  60. package/src/testing/extensions/matchers/to-have-loading-spinner.d.ts +2 -0
  61. package/src/testing/extensions/queries/by-icon-name.d.ts +4 -0
  62. package/src/testing/extensions/queries/index.d.ts +57 -0
  63. package/src/testing/extensions/queries/queries.d.ts +1 -0
  64. package/src/testing/index.d.ts +1 -1
  65. package/src/testing/test-utils.d.ts +292 -0
  66. package/src/utilities/error.d.ts +13 -0
  67. package/src/utilities/i18nDateUtils.d.ts +16 -0
  68. package/src/utilities/rates.d.ts +1 -1
  69. package/src/utilities/shipengine/address.d.ts +4 -0
  70. package/src/utilities/shipengine/carrier.d.ts +1 -0
  71. package/vite.config.d.ts +2 -0
  72. package/src/components/templates/void-label/index.d.ts +0 -1
  73. package/src/public-sdk.d.ts +0 -38
  74. package/src/testing/render.d.ts +0 -6
@@ -26,6 +26,9 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
26
26
  confirmVoid: string;
27
27
  viewShipment: string;
28
28
  };
29
+ errorMessages: {
30
+ labelIdRequired: string;
31
+ };
29
32
  resultMessages: {
30
33
  approved: string;
31
34
  rejected: string;
@@ -171,6 +174,7 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
171
174
  shipDate: string;
172
175
  service: string;
173
176
  shipTo: string;
177
+ addShipToAddress: string;
174
178
  warehouse: string;
175
179
  weight: {
176
180
  whole: string;
@@ -197,6 +201,7 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
197
201
  };
198
202
  rates: {
199
203
  uspsMediaMailAcknowledgement: string;
204
+ uspsFirstClassMailAcknowledgement_leof: string;
200
205
  };
201
206
  shipToAddressFormFields: string;
202
207
  sections: {
@@ -235,21 +240,8 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
235
240
  };
236
241
  };
237
242
  "manage-defaults": {
238
- units: {
239
- title: string;
240
- dimensions: {
241
- title: string;
242
- standard: string;
243
- metric: string;
244
- };
245
- weight: {
246
- title: string;
247
- standard: string;
248
- g: string;
249
- kg: string;
250
- };
251
- };
252
243
  label: {
244
+ title: string;
253
245
  letter: {
254
246
  title: string;
255
247
  description: string;
@@ -262,7 +254,25 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
262
254
  title: string;
263
255
  description: string;
264
256
  };
257
+ };
258
+ status: {
259
+ saving: string;
260
+ saved: string;
261
+ savingFailed: string;
262
+ };
263
+ units: {
265
264
  title: string;
265
+ dimensions: {
266
+ title: string;
267
+ standard: string;
268
+ metric: string;
269
+ };
270
+ weight: {
271
+ title: string;
272
+ standard: string;
273
+ g: string;
274
+ kg: string;
275
+ };
266
276
  };
267
277
  };
268
278
  "manage-warehouses": {
@@ -473,9 +483,11 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
473
483
  invalidNameOrCompany: string;
474
484
  noWarehouses: string;
475
485
  unableToLoad: {
486
+ accountSettings: string;
476
487
  autoFundingSettings: string;
477
488
  carrier: string;
478
489
  carriers: string;
490
+ label: string;
479
491
  salesOrder: string;
480
492
  shipment: string;
481
493
  warehouses: string;
@@ -501,10 +513,12 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
501
513
  thirdParty: string;
502
514
  };
503
515
  loading: {
516
+ accountSettings: string;
504
517
  carrier: string;
505
518
  carriers: string;
506
519
  data: string;
507
520
  importingSalesOrder: string;
521
+ label: string;
508
522
  onboarding: string;
509
523
  salesOrder: string;
510
524
  shipment: string;
@@ -531,6 +545,7 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
531
545
  packageCodes: {
532
546
  package: string;
533
547
  };
548
+ "powered-by": string;
534
549
  schema: {
535
550
  optionalLabel: string;
536
551
  };
@@ -0,0 +1,6 @@
1
+ export declare const useLoadOrCreateShipment: (shipmentId?: string) => {
2
+ errors: import("@shipengine/js-api").CodedError[] | undefined;
3
+ isLoading: boolean;
4
+ refetchShipment: <TPageData>(options?: (import("react-query").RefetchOptions & import("react-query").RefetchQueryFilters<TPageData>) | undefined) => Promise<import("react-query").QueryObserverResult<import("@shipengine/js-api").SalesOrderShipment, import("@shipengine/js-api").CodedError[]>>;
5
+ shipment: import("@shipengine/js-api").SalesOrderShipment | undefined;
6
+ };
@@ -2,8 +2,11 @@ import { ReactNode } from "react";
2
2
  import { SalesOrderProps } from "./purchase-label-by-sales-order";
3
3
  type ShipmentOrderProps = {
4
4
  children?: ReactNode;
5
+ } & ({
5
6
  shipmentId: string;
6
- };
7
+ } | {
8
+ oneOff: true;
9
+ });
7
10
  type PurchaseLabelByShipmentProps = Partial<SalesOrderProps> & ShipmentOrderProps;
8
- export declare const PurchaseLabelByShipment: ({ shipmentId, onLoad, onShipmentUpdated, features, ...props }: PurchaseLabelByShipmentProps) => import("@emotion/react/jsx-runtime").JSX.Element;
11
+ export declare const PurchaseLabelByShipment: ({ onLoad, onShipmentUpdated, features, ...props }: PurchaseLabelByShipmentProps) => import("@emotion/react/jsx-runtime").JSX.Element;
9
12
  export {};
@@ -1,12 +1,17 @@
1
1
  /// <reference types="react" />
2
2
  import { SalesOrderProps } from "./purchase-label-by-sales-order";
3
- export type ComponentProps = SalesOrderProps & {
4
- shipmentId?: string;
3
+ type ComponentShipmentProps = SalesOrderProps & {
4
+ shipmentId: string;
5
5
  };
6
- export declare const Component: ({ shipmentId, ...props }: ComponentProps) => import("@emotion/react/jsx-runtime").JSX.Element;
7
- export declare const Element: ({ resources, ...props }: SalesOrderProps & {
8
- shipmentId?: string | undefined;
9
- } & {
6
+ type ComponentOneOffProps = SalesOrderProps & {
7
+ oneOff: true;
8
+ };
9
+ type ComponentSalesOrderProps = SalesOrderProps & {
10
+ salesOrderId: string;
11
+ };
12
+ export type ComponentProps = ComponentShipmentProps | ComponentOneOffProps | ComponentSalesOrderProps;
13
+ export declare const Component: ({ ...props }: ComponentProps) => import("@emotion/react/jsx-runtime").JSX.Element;
14
+ export declare const Element: ({ resources, ...props }: ComponentProps & {
10
15
  resources?: {
11
16
  en: {
12
17
  "wallet-history": {
@@ -29,6 +34,9 @@ export declare const Element: ({ resources, ...props }: SalesOrderProps & {
29
34
  confirmVoid: string;
30
35
  viewShipment: string;
31
36
  };
37
+ errorMessages: {
38
+ labelIdRequired: string;
39
+ };
32
40
  resultMessages: {
33
41
  approved: string;
34
42
  rejected: string;
@@ -174,6 +182,7 @@ export declare const Element: ({ resources, ...props }: SalesOrderProps & {
174
182
  shipDate: string;
175
183
  service: string;
176
184
  shipTo: string;
185
+ addShipToAddress: string;
177
186
  warehouse: string;
178
187
  weight: {
179
188
  whole: string;
@@ -200,6 +209,7 @@ export declare const Element: ({ resources, ...props }: SalesOrderProps & {
200
209
  };
201
210
  rates: {
202
211
  uspsMediaMailAcknowledgement: string;
212
+ uspsFirstClassMailAcknowledgement_leof: string;
203
213
  };
204
214
  shipToAddressFormFields: string;
205
215
  sections: {
@@ -238,21 +248,8 @@ export declare const Element: ({ resources, ...props }: SalesOrderProps & {
238
248
  };
239
249
  };
240
250
  "manage-defaults": {
241
- units: {
242
- title: string;
243
- dimensions: {
244
- title: string;
245
- standard: string;
246
- metric: string;
247
- };
248
- weight: {
249
- title: string;
250
- standard: string;
251
- g: string;
252
- kg: string;
253
- };
254
- };
255
251
  label: {
252
+ title: string;
256
253
  letter: {
257
254
  title: string;
258
255
  description: string;
@@ -265,7 +262,25 @@ export declare const Element: ({ resources, ...props }: SalesOrderProps & {
265
262
  title: string;
266
263
  description: string;
267
264
  };
265
+ };
266
+ status: {
267
+ saving: string;
268
+ saved: string;
269
+ savingFailed: string;
270
+ };
271
+ units: {
268
272
  title: string;
273
+ dimensions: {
274
+ title: string;
275
+ standard: string;
276
+ metric: string;
277
+ };
278
+ weight: {
279
+ title: string;
280
+ standard: string;
281
+ g: string;
282
+ kg: string;
283
+ };
269
284
  };
270
285
  };
271
286
  "manage-warehouses": {
@@ -476,9 +491,11 @@ export declare const Element: ({ resources, ...props }: SalesOrderProps & {
476
491
  invalidNameOrCompany: string;
477
492
  noWarehouses: string;
478
493
  unableToLoad: {
494
+ accountSettings: string;
479
495
  autoFundingSettings: string;
480
496
  carrier: string;
481
497
  carriers: string;
498
+ label: string;
482
499
  salesOrder: string;
483
500
  shipment: string;
484
501
  warehouses: string;
@@ -504,10 +521,12 @@ export declare const Element: ({ resources, ...props }: SalesOrderProps & {
504
521
  thirdParty: string;
505
522
  };
506
523
  loading: {
524
+ accountSettings: string;
507
525
  carrier: string;
508
526
  carriers: string;
509
527
  data: string;
510
528
  importingSalesOrder: string;
529
+ label: string;
511
530
  onboarding: string;
512
531
  salesOrder: string;
513
532
  shipment: string;
@@ -534,6 +553,7 @@ export declare const Element: ({ resources, ...props }: SalesOrderProps & {
534
553
  packageCodes: {
535
554
  package: string;
536
555
  };
556
+ "powered-by": string;
537
557
  schema: {
538
558
  optionalLabel: string;
539
559
  };
@@ -585,3 +605,4 @@ export declare const Element: ({ resources, ...props }: SalesOrderProps & {
585
605
  } | undefined;
586
606
  }) => import("@emotion/react/jsx-runtime").JSX.Element;
587
607
  export type ElementProps = React.ComponentProps<typeof Element>;
608
+ export {};
@@ -35,6 +35,9 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
35
35
  confirmVoid: string;
36
36
  viewShipment: string;
37
37
  };
38
+ errorMessages: {
39
+ labelIdRequired: string;
40
+ };
38
41
  resultMessages: {
39
42
  approved: string;
40
43
  rejected: string;
@@ -180,6 +183,7 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
180
183
  shipDate: string;
181
184
  service: string;
182
185
  shipTo: string;
186
+ addShipToAddress: string;
183
187
  warehouse: string;
184
188
  weight: {
185
189
  whole: string;
@@ -206,6 +210,7 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
206
210
  };
207
211
  rates: {
208
212
  uspsMediaMailAcknowledgement: string;
213
+ uspsFirstClassMailAcknowledgement_leof: string;
209
214
  };
210
215
  shipToAddressFormFields: string;
211
216
  sections: {
@@ -244,21 +249,8 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
244
249
  };
245
250
  };
246
251
  "manage-defaults": {
247
- units: {
248
- title: string;
249
- dimensions: {
250
- title: string;
251
- standard: string;
252
- metric: string;
253
- };
254
- weight: {
255
- title: string;
256
- standard: string;
257
- g: string;
258
- kg: string;
259
- };
260
- };
261
252
  label: {
253
+ title: string;
262
254
  letter: {
263
255
  title: string;
264
256
  description: string;
@@ -271,7 +263,25 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
271
263
  title: string;
272
264
  description: string;
273
265
  };
266
+ };
267
+ status: {
268
+ saving: string;
269
+ saved: string;
270
+ savingFailed: string;
271
+ };
272
+ units: {
274
273
  title: string;
274
+ dimensions: {
275
+ title: string;
276
+ standard: string;
277
+ metric: string;
278
+ };
279
+ weight: {
280
+ title: string;
281
+ standard: string;
282
+ g: string;
283
+ kg: string;
284
+ };
275
285
  };
276
286
  };
277
287
  "manage-warehouses": {
@@ -482,9 +492,11 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
482
492
  invalidNameOrCompany: string;
483
493
  noWarehouses: string;
484
494
  unableToLoad: {
495
+ accountSettings: string;
485
496
  autoFundingSettings: string;
486
497
  carrier: string;
487
498
  carriers: string;
499
+ label: string;
488
500
  salesOrder: string;
489
501
  shipment: string;
490
502
  warehouses: string;
@@ -510,10 +522,12 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
510
522
  thirdParty: string;
511
523
  };
512
524
  loading: {
525
+ accountSettings: string;
513
526
  carrier: string;
514
527
  carriers: string;
515
528
  data: string;
516
529
  importingSalesOrder: string;
530
+ label: string;
517
531
  onboarding: string;
518
532
  salesOrder: string;
519
533
  shipment: string;
@@ -540,6 +554,7 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
540
554
  packageCodes: {
541
555
  package: string;
542
556
  };
557
+ "powered-by": string;
543
558
  schema: {
544
559
  optionalLabel: string;
545
560
  };
@@ -1,9 +1,9 @@
1
1
  import { SE } from "@shipengine/alchemy";
2
- export type VoidLabelProps = {
2
+ export type ActionsProps = {
3
3
  onComplete: (request: SE.VoidRequest, shipment: SE.SalesOrderShipment) => void;
4
4
  onSubmit: () => Promise<void>;
5
5
  onViewShipment: (shipment: SE.SalesOrderShipment) => void;
6
- shipment?: SE.SalesOrderShipment;
6
+ shipment: SE.SalesOrderShipment;
7
7
  voidRequest?: SE.VoidRequest;
8
8
  };
9
- export declare const VoidLabel: ({ onComplete, onSubmit, onViewShipment, shipment, voidRequest, }: VoidLabelProps) => import("@emotion/react/jsx-runtime").JSX.Element;
9
+ export declare const Actions: ({ onComplete, onSubmit, onViewShipment, shipment, voidRequest, }: ActionsProps) => import("@emotion/react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export * from "./actions";
@@ -0,0 +1,2 @@
1
+ export * from "./actions";
2
+ export * from "./message";
@@ -0,0 +1 @@
1
+ export * from "./message";
@@ -0,0 +1,6 @@
1
+ import { SE } from "@shipengine/alchemy";
2
+ type MessageProps = {
3
+ voidRequest?: SE.VoidRequest;
4
+ };
5
+ export declare const Message: ({ voidRequest }: MessageProps) => import("@emotion/react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -30,6 +30,9 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
30
30
  confirmVoid: string;
31
31
  viewShipment: string;
32
32
  };
33
+ errorMessages: {
34
+ labelIdRequired: string;
35
+ };
33
36
  resultMessages: {
34
37
  approved: string;
35
38
  rejected: string;
@@ -175,6 +178,7 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
175
178
  shipDate: string;
176
179
  service: string;
177
180
  shipTo: string;
181
+ addShipToAddress: string;
178
182
  warehouse: string;
179
183
  weight: {
180
184
  whole: string;
@@ -201,6 +205,7 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
201
205
  };
202
206
  rates: {
203
207
  uspsMediaMailAcknowledgement: string;
208
+ uspsFirstClassMailAcknowledgement_leof: string;
204
209
  };
205
210
  shipToAddressFormFields: string;
206
211
  sections: {
@@ -239,21 +244,8 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
239
244
  };
240
245
  };
241
246
  "manage-defaults": {
242
- units: {
243
- title: string;
244
- dimensions: {
245
- title: string;
246
- standard: string;
247
- metric: string;
248
- };
249
- weight: {
250
- title: string;
251
- standard: string;
252
- g: string;
253
- kg: string;
254
- };
255
- };
256
247
  label: {
248
+ title: string;
257
249
  letter: {
258
250
  title: string;
259
251
  description: string;
@@ -266,7 +258,25 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
266
258
  title: string;
267
259
  description: string;
268
260
  };
261
+ };
262
+ status: {
263
+ saving: string;
264
+ saved: string;
265
+ savingFailed: string;
266
+ };
267
+ units: {
269
268
  title: string;
269
+ dimensions: {
270
+ title: string;
271
+ standard: string;
272
+ metric: string;
273
+ };
274
+ weight: {
275
+ title: string;
276
+ standard: string;
277
+ g: string;
278
+ kg: string;
279
+ };
270
280
  };
271
281
  };
272
282
  "manage-warehouses": {
@@ -477,9 +487,11 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
477
487
  invalidNameOrCompany: string;
478
488
  noWarehouses: string;
479
489
  unableToLoad: {
490
+ accountSettings: string;
480
491
  autoFundingSettings: string;
481
492
  carrier: string;
482
493
  carriers: string;
494
+ label: string;
483
495
  salesOrder: string;
484
496
  shipment: string;
485
497
  warehouses: string;
@@ -505,10 +517,12 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
505
517
  thirdParty: string;
506
518
  };
507
519
  loading: {
520
+ accountSettings: string;
508
521
  carrier: string;
509
522
  carriers: string;
510
523
  data: string;
511
524
  importingSalesOrder: string;
525
+ label: string;
512
526
  onboarding: string;
513
527
  salesOrder: string;
514
528
  shipment: string;
@@ -535,6 +549,7 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
535
549
  packageCodes: {
536
550
  package: string;
537
551
  };
552
+ "powered-by": string;
538
553
  schema: {
539
554
  optionalLabel: string;
540
555
  };
@@ -12,3 +12,55 @@ export declare const walletTransactionFactory: Factory<SE.WalletTransaction, any
12
12
  * @category Factories
13
13
  */
14
14
  export declare const walletHistoryFactory: (currentPage?: number, count?: number) => Factory<SE.WalletTransactionHistory, any, SE.WalletTransactionHistory>;
15
+ export type WalletAdjustment = {
16
+ actualShipment: TransactionShipment;
17
+ adjustment: TransactionCost;
18
+ adjustmentId: string;
19
+ originalShipment: TransactionShipment;
20
+ trackingNumber: string;
21
+ transactionId: string;
22
+ };
23
+ type TransactionShipment = {
24
+ dimensions: {
25
+ height: number;
26
+ length: number;
27
+ unit: string;
28
+ width: number;
29
+ };
30
+ insuranceCost: TransactionCost;
31
+ packageCode: string;
32
+ rateDetails: TransactionRateDetail[];
33
+ serviceCode: string;
34
+ shipFrom: TransactionShipDestination;
35
+ shipmentCost: TransactionCost;
36
+ shipTo: TransactionShipDestination;
37
+ weight: {
38
+ unit: string;
39
+ value: number;
40
+ };
41
+ };
42
+ type TransactionShipDestination = {
43
+ addressLine1: string;
44
+ addressLine2: string;
45
+ addressResidentialIndicator: "yes" | "no";
46
+ cityLocality: string;
47
+ companyName: string;
48
+ countryCode: string;
49
+ name: string;
50
+ phone: string;
51
+ postalCode: string;
52
+ stateProvince: string;
53
+ };
54
+ type TransactionRateDetail = {
55
+ amount: TransactionCost;
56
+ carrierBillingCode: string;
57
+ carrierDescription: string;
58
+ carrierMemo: string | null;
59
+ rateDetailType: string;
60
+ };
61
+ type TransactionCost = {
62
+ amount: number;
63
+ currency: string;
64
+ };
65
+ export declare const walletAdjustmentFactory: Factory<WalletAdjustment, any, WalletAdjustment>;
66
+ export {};
@@ -66,6 +66,10 @@ export declare const styles: {
66
66
  columnGap: number;
67
67
  display: "flex";
68
68
  };
69
+ skeletonCardTransactionRow: (theme: import("@packlink/giger-theme/dist/lib/Theme").Theme) => {
70
+ columnGap: string;
71
+ display: "flex";
72
+ };
69
73
  skeletonPagination: (theme: import("@packlink/giger-theme/dist/lib/Theme").Theme) => {
70
74
  alignItems: "center";
71
75
  display: "flex";
@@ -8,6 +8,7 @@ export * from "./use-insurance-provider-options";
8
8
  export * from "./use-package-options";
9
9
  export * from "./use-rate-options";
10
10
  export * from "./use-service-code-options";
11
+ export * from "./use-shipment-metadata";
11
12
  export * from "./use-shipping-presets-options";
12
13
  export * from "./use-state-code-options";
13
14
  export * from "./use-warehouse-options";
@@ -1,3 +1,3 @@
1
1
  import { SE } from "@shipengine/alchemy";
2
2
  import { SelectCategory } from "../../components/field/select";
3
- export declare const usePackageOptions: (carriers?: SE.Carrier[], customPackageTypes?: SE.CustomPackage[], poBox?: boolean) => SelectCategory[] | undefined;
3
+ export declare const usePackageOptions: (carriers?: SE.Carrier[], customPackageTypes?: SE.CustomPackage[], shipment?: SE.SalesOrderShipment) => SelectCategory[] | undefined;
@@ -1,3 +1,3 @@
1
1
  import { SE } from "@shipengine/alchemy";
2
2
  import { SelectCategory } from "../../components/field/select";
3
- export declare const useServiceCodeOptions: (carriers?: SE.Carrier[], domestic?: boolean, poBox?: boolean) => SelectCategory[];
3
+ export declare const useServiceCodeOptions: (carriers?: SE.Carrier[], shipment?: SE.SalesOrderShipment) => SelectCategory[];
@@ -0,0 +1,8 @@
1
+ import { SE } from "@shipengine/alchemy";
2
+ export declare const useShipmentMetadata: (shipment?: SE.SalesOrderShipment) => {
3
+ isContentDescriptionRequired: boolean;
4
+ isCustomsRequired: boolean;
5
+ isInternational: boolean;
6
+ isPoBox: boolean | undefined;
7
+ isUnsupportedUpsCountry: boolean | undefined;
8
+ };
@@ -1,3 +1,4 @@
1
+ import { SE } from "@shipengine/alchemy";
1
2
  import { ShippingPreset } from "../../types";
2
3
  export type UseShippingPresetsOptionsProps = {
3
4
  platform?: {
@@ -9,7 +10,7 @@ export type UseShippingPresetsOptionsProps = {
9
10
  international: ShippingPreset[];
10
11
  };
11
12
  };
12
- export declare const useShippingPresetsOptions: ({ platform, user }: UseShippingPresetsOptionsProps | undefined, isInternationalShipment: boolean) => {
13
+ export declare const useShippingPresetsOptions: ({ platform, user }?: UseShippingPresetsOptionsProps, shipment?: SE.SalesOrderShipment) => {
13
14
  categoryName: string;
14
15
  options: {
15
16
  description: import("@emotion/react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { CodedError, SalesOrderShipment } from "@shipengine/alchemy";
2
+ export declare const useGetOrCreateShipment: (shipmentId?: string) => import("react-query").UseQueryResult<SalesOrderShipment, CodedError[]>;