@shipengine/elements 0.20.1 → 0.21.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 (159) hide show
  1. package/index.cjs +1131 -949
  2. package/index.js +995 -817
  3. package/package.json +3 -3
  4. package/src/components/add-funds-form/add-funds-schema.d.ts +7 -7
  5. package/src/components/address-preference-context/address-preference-context.d.ts +42 -0
  6. package/src/components/address-preference-context/index.d.ts +1 -0
  7. package/src/components/auto-funding-form/auto-funding-schema.d.ts +10 -10
  8. package/src/components/date-range-combo/date-range-combo.d.ts +12 -0
  9. package/src/components/date-range-combo/index.d.ts +1 -0
  10. package/src/components/date-range-select/date-range-select.d.ts +8 -0
  11. package/src/components/date-range-select/date-range-select.styles.d.ts +1 -0
  12. package/src/components/date-range-select/index.d.ts +1 -0
  13. package/src/components/field/fields.d.ts +2 -1
  14. package/src/components/field/money-input/hooks/use-utils.d.ts +1 -1
  15. package/src/components/field/money-input/money-input.d.ts +1 -1
  16. package/src/components/field/rate-card/cost-breakdown/cost-breakdown.d.ts +1 -1
  17. package/src/components/field/select-auto-complete/index.d.ts +1 -0
  18. package/src/components/field/select-auto-complete/select-auto-complete.d.ts +7 -0
  19. package/src/components/history/history-card/history-card.d.ts +5 -0
  20. package/src/components/history/history-card/history-card.styles.d.ts +1 -0
  21. package/src/components/history/history-card/index.d.ts +1 -0
  22. package/src/components/history/index.d.ts +1 -1
  23. package/src/components/index.d.ts +3 -1
  24. package/src/components/inline-label/inline-label.d.ts +5 -1
  25. package/src/components/inline-label/inline-label.styles.d.ts +1 -0
  26. package/src/components/items-breakdown/items-breakdown.d.ts +1 -1
  27. package/src/components/label/index.d.ts +1 -0
  28. package/src/components/label/label.d.ts +10 -0
  29. package/src/components/label/label.styles.d.ts +2 -0
  30. package/src/components/label-layout/index.d.ts +2 -0
  31. package/src/components/label-layout/label-layout-purchase.d.ts +4 -3
  32. package/src/components/label-layout/label-layout-settings.d.ts +3 -2
  33. package/src/components/label-layout/label-layout.styles.d.ts +1 -1
  34. package/src/components/section/index.d.ts +1 -0
  35. package/src/components/section/section.d.ts +10 -0
  36. package/src/components/section/section.styles.d.ts +1 -0
  37. package/src/components/templates/add-carrier-form/add-carrier-form-schema.d.ts +1 -1
  38. package/src/components/templates/add-carrier-form/add-carrier-form.d.ts +1 -1
  39. package/src/components/templates/address-display/address-display.d.ts +1 -1
  40. package/src/components/templates/address-form/address-form-schema.d.ts +1 -1
  41. package/src/components/templates/address-form/address-form.d.ts +1 -1
  42. package/src/components/templates/address-form/address-schema.d.ts +2 -1
  43. package/src/components/templates/address-preference-display/address-preference-display.d.ts +1 -1
  44. package/src/components/templates/address-preference-select/address-preference-select.d.ts +24 -0
  45. package/src/components/templates/address-preference-select/index.d.ts +1 -0
  46. package/src/components/templates/carrier-recovery-form/carrier-recovery-form-schema.d.ts +2 -2
  47. package/src/components/templates/carrier-recovery-form/carrier-recovery-form.d.ts +1 -1
  48. package/src/components/templates/carrier-terms-form/carrier-terms-form.d.ts +1 -1
  49. package/src/components/templates/customs-item-form/customs-item-form-schema.d.ts +20 -20
  50. package/src/components/templates/customs-item-form/customs-item-form.d.ts +1 -1
  51. package/src/components/templates/customs-items-display/customs-items-display.d.ts +1 -1
  52. package/src/components/templates/edit-billing-form/edit-billing-form.styles.d.ts +1 -1
  53. package/src/components/templates/index.d.ts +2 -3
  54. package/src/components/templates/label/label.d.ts +1 -1
  55. package/src/components/templates/list-carriers/list-carriers.d.ts +1 -1
  56. package/src/components/templates/list-carriers-row/list-carriers-row.d.ts +1 -1
  57. package/src/components/templates/manage-wallet/manage-wallet.styles.d.ts +1 -1
  58. package/src/components/templates/manage-warehouses/manage-warehouses.d.ts +2 -6
  59. package/src/components/templates/onboarding/onboarding.d.ts +14 -8
  60. package/src/components/templates/onboarding/onboarding.styles.d.ts +1 -1
  61. package/src/components/templates/rate-form/rate-form.d.ts +1 -1
  62. package/src/components/templates/shipment/shipment.d.ts +1 -1
  63. package/src/components/templates/shipment-form/shipment-form.d.ts +1 -1
  64. package/src/components/templates/shipment-form/shipment-schema.d.ts +26 -2
  65. package/src/components/templates/suspend-sales-order/suspend-sales-order.d.ts +1 -1
  66. package/src/components/templates/suspend-shipment/suspend-shipment.d.ts +1 -1
  67. package/src/components/templates/void-label/void-label.d.ts +1 -1
  68. package/src/components/templates/wallet-card/wallet-card.styles.d.ts +1 -1
  69. package/src/components/templates/wallet-form/edit-wallet-address-form.d.ts +1 -1
  70. package/src/components/templates/wallet-form/wallet-form.d.ts +7 -6
  71. package/src/components/templates/wallet-form/wallet-form.styles.d.ts +1 -1
  72. package/src/components/templates/wallet-form/wallet-schema.d.ts +3 -3
  73. package/src/components/templates/warehouse-display/warehouse-display.d.ts +1 -1
  74. package/src/components/templates/warehouse-form/warehouse-form-schema.d.ts +3 -3
  75. package/src/components/templates/warehouse-form/warehouse-form.d.ts +1 -1
  76. package/src/components/unit-settings/index.d.ts +1 -0
  77. package/src/components/unit-settings/unit-settings.d.ts +4 -0
  78. package/src/elements/components/configure-shipment/configure-shipment.d.ts +1 -1
  79. package/src/elements/components/configure-shipment/hooks/use-address.d.ts +1 -1
  80. package/src/elements/components/configure-shipment/hooks/use-customs.d.ts +1 -1
  81. package/src/elements/components/configure-shipment/hooks/use-presets.d.ts +1 -1
  82. package/src/elements/components/configure-shipment/hooks/use-rates-form.d.ts +1 -1
  83. package/src/elements/components/configure-shipment/hooks/use-request-rates.d.ts +1 -1
  84. package/src/elements/components/configure-shipment/hooks/use-shipment-form.d.ts +1 -1
  85. package/src/elements/components/index.d.ts +0 -1
  86. package/src/elements/components/list-carriers/hooks/use-list-connected-carriers.d.ts +2 -2
  87. package/src/elements/components/purchase-label/hooks/use-configure-shipment.d.ts +1 -1
  88. package/src/elements/components/purchase-label/hooks/use-import-sales-order.d.ts +2 -2
  89. package/src/elements/components/purchase-label/hooks/use-load-shipment.d.ts +3 -3
  90. package/src/elements/components/purchase-label/hooks/use-pending-shipment.d.ts +1 -1
  91. package/src/elements/components/shipment/shipment.d.ts +1 -1
  92. package/src/elements/components/void-label/void-label.d.ts +1 -1
  93. package/src/elements/index.d.ts +0 -1
  94. package/src/factories/shipengine/address.d.ts +8 -1
  95. package/src/factories/shipengine/carrier.d.ts +1 -1
  96. package/src/factories/shipengine/label.d.ts +1 -1
  97. package/src/factories/shipengine/money.d.ts +1 -1
  98. package/src/factories/shipengine/order-source.d.ts +1 -1
  99. package/src/factories/shipengine/package.d.ts +1 -1
  100. package/src/factories/shipengine/resource.d.ts +1 -1
  101. package/src/factories/shipengine/sales-order.d.ts +1 -1
  102. package/src/factories/shipengine/service.d.ts +1 -1
  103. package/src/factories/shipengine/shipment.d.ts +1 -1
  104. package/src/factories/shipengine/wallet-history.d.ts +1 -1
  105. package/src/factories/shipengine/warehouse.d.ts +1 -3
  106. package/src/factories/shipengine/weight.d.ts +1 -1
  107. package/src/features/wallet-history/wallet-history.styles.d.ts +1 -0
  108. package/src/hooks/index.d.ts +1 -1
  109. package/src/hooks/options/index.d.ts +1 -0
  110. package/src/hooks/options/use-confirmation-options.d.ts +1 -1
  111. package/src/hooks/options/use-customs-contents-options.d.ts +1 -1
  112. package/src/hooks/options/use-customs-non-delivery-options.d.ts +1 -1
  113. package/src/hooks/options/use-date-range-options.d.ts +14 -0
  114. package/src/hooks/options/use-insurance-provider-options.d.ts +1 -1
  115. package/src/hooks/options/use-package-options.d.ts +1 -1
  116. package/src/hooks/options/use-rate-options.d.ts +1 -1
  117. package/src/hooks/options/use-service-code-options.d.ts +1 -1
  118. package/src/hooks/options/use-warehouse-options.d.ts +1 -1
  119. package/src/hooks/use-address-validation.d.ts +12 -0
  120. package/src/hooks/use-carrier-metadata.d.ts +1 -1
  121. package/src/hooks/use-elements.d.ts +2 -2
  122. package/src/hooks/use-scrub-errors.d.ts +1 -1
  123. package/src/locales/en/index.d.ts +32 -5
  124. package/src/mocks/carriers/handlers.d.ts +1 -1
  125. package/src/mocks/warehouses/handlers.d.ts +1 -1
  126. package/src/schemas/shipengine/money.d.ts +1 -1
  127. package/src/types/carrier-metadata.d.ts +1 -1
  128. package/src/types/shipping-preset/shipping-preset.d.ts +1 -1
  129. package/src/utilities/date.d.ts +8 -0
  130. package/src/utilities/money.d.ts +1 -1
  131. package/src/utilities/rates.d.ts +2 -1
  132. package/src/utilities/shipengine/address.d.ts +1 -1
  133. package/src/utilities/shipengine/dimensions.d.ts +1 -1
  134. package/src/utilities/shipengine/sales-order.d.ts +1 -1
  135. package/src/utilities/shipengine/shipment.d.ts +1 -1
  136. package/src/utilities/shipengine/weight.d.ts +1 -1
  137. package/src/components/accordion/accordion.d.ts +0 -12
  138. package/src/components/accordion/accordion.styles.d.ts +0 -7
  139. package/src/components/accordion/index.d.ts +0 -1
  140. package/src/components/history/history-actions/history-actions.d.ts +0 -1
  141. package/src/components/history/history-actions/history-actions.styles.d.ts +0 -1
  142. package/src/components/history/history-actions/index.d.ts +0 -1
  143. package/src/components/history/history-body/history-body.d.ts +0 -6
  144. package/src/components/history/history-body/index.d.ts +0 -1
  145. package/src/components/history/history-list/history-list.d.ts +0 -12
  146. package/src/components/history/history-list/index.d.ts +0 -1
  147. package/src/components/history/history-row/history-row.d.ts +0 -6
  148. package/src/components/history/history-row/index.d.ts +0 -1
  149. package/src/components/history/history.d.ts +0 -11
  150. package/src/components/templates/wallet-history/wallet-history.d.ts +0 -6
  151. package/src/components/templates/warehouse-preference-select/index.d.ts +0 -1
  152. package/src/components/templates/warehouse-preference-select/warehouse-preference-select.d.ts +0 -24
  153. package/src/components/templates/warehouse-preference-wizard/index.d.ts +0 -1
  154. package/src/components/templates/warehouse-preference-wizard/warehouse-preference-wizard.d.ts +0 -23
  155. package/src/elements/wallet-history.d.ts +0 -1
  156. package/src/hooks/use-warehouse-validation.d.ts +0 -14
  157. /package/src/{components/templates/wallet-history → features}/index.d.ts +0 -0
  158. /package/src/{elements/components → features}/wallet-history/index.d.ts +0 -0
  159. /package/src/{elements/components → features}/wallet-history/wallet-history.d.ts +0 -0
@@ -6,7 +6,7 @@ export declare const warehouseSchema: z.ZodDiscriminatedUnion<"returnToAddressIs
6
6
  addressLine1: z.ZodString;
7
7
  addressLine2: z.ZodEffects<z.ZodNullable<z.ZodOptional<z.ZodString>>, string | undefined, string | null | undefined>;
8
8
  cityLocality: z.ZodString;
9
- companyName: z.ZodEffects<z.ZodNullable<z.ZodOptional<z.ZodString>>, string | undefined, string | null | undefined>;
9
+ companyName: z.ZodEffects<z.ZodUnion<[z.ZodEffects<z.ZodNullable<z.ZodOptional<z.ZodString>>, string | undefined, string | null | undefined>, z.ZodLiteral<"">]>, string | undefined, string | null | undefined>;
10
10
  countryCode: z.ZodEnum<["AF", "AX", "AL", "DZ", "AS", "AD", "AO", "AI", "AQ", "AG", "AR", "AM", "AW", "AU", "AT", "AZ", "BS", "BH", "BD", "BB", "BY", "BE", "BZ", "BJ", "BM", "BT", "BO", "BQ", "BA", "BW", "BR", "IO", "VG", "BN", "BG", "BF", "BI", "CA", "KH", "CM", "CV", "KY", "CF", "TD", "CL", "CN", "CX", "CC", "CO", "KM", "CG", "CD", "CK", "CR", "HR", "CU", "CW", "CY", "CZ", "DK", "DJ", "DM", "DO", "EC", "EG", "SV", "GQ", "ER", "EE", "ET", "FK", "FO", "FM", "FJ", "FI", "FR", "GF", "PF", "TF", "GA", "GM", "GE", "DE", "GH", "GI", "GR", "GL", "GD", "GP", "GU", "GT", "GG", "GN", "GW", "GY", "HT", "VA", "HN", "HK", "HU", "IS", "IN", "ID", "IR", "IQ", "IE", "IM", "IL", "IT", "CI", "JM", "JP", "JE", "JO", "KZ", "KE", "KI", "KR", "KW", "KG", "LA", "LV", "LB", "LS", "LR", "LY", "LI", "LT", "LU", "MO", "MK", "MG", "MW", "MY", "MV", "ML", "MT", "MH", "MQ", "MR", "MU", "YT", "MX", "MD", "MC", "MN", "ME", "MS", "MA", "MZ", "MM", "NA", "NR", "NP", "NL", "AN", "NC", "NZ", "NI", "NE", "NG", "NU", "NF", "KP", "MP", "NO", "OM", "PK", "PW", "PS", "PA", "PG", "PY", "PE", "PH", "PN", "PL", "PT", "PR", "QA", "RE", "RO", "RU", "RW", "BL", "SH", "KN", "LC", "MF", "PM", "VC", "WS", "SM", "ST", "SA", "SN", "RS", "SC", "SL", "SG", "SX", "SK", "SI", "SB", "SO", "ZA", "GS", "SS", "ES", "LK", "SD", "SR", "SJ", "SZ", "SE", "CH", "SY", "TW", "TJ", "TZ", "TH", "TL", "TG", "TK", "TO", "TT", "TN", "TR", "TM", "TC", "TV", "UG", "UA", "AE", "GB", "VI", "UM", "US", "UY", "UZ", "VU", "VE", "VN", "WF", "EH", "YE", "ZM", "ZW"]>;
11
11
  name: z.ZodEffects<z.ZodString, string, string>;
12
12
  phone: z.ZodEffects<z.ZodNullable<z.ZodOptional<z.ZodString>>, string, string | null | undefined>;
@@ -109,7 +109,7 @@ export declare const warehouseSchema: z.ZodDiscriminatedUnion<"returnToAddressIs
109
109
  addressLine1: z.ZodString;
110
110
  addressLine2: z.ZodEffects<z.ZodNullable<z.ZodOptional<z.ZodString>>, string | undefined, string | null | undefined>;
111
111
  cityLocality: z.ZodString;
112
- companyName: z.ZodEffects<z.ZodNullable<z.ZodOptional<z.ZodString>>, string | undefined, string | null | undefined>;
112
+ companyName: z.ZodEffects<z.ZodUnion<[z.ZodEffects<z.ZodNullable<z.ZodOptional<z.ZodString>>, string | undefined, string | null | undefined>, z.ZodLiteral<"">]>, string | undefined, string | null | undefined>;
113
113
  countryCode: z.ZodEnum<["AF", "AX", "AL", "DZ", "AS", "AD", "AO", "AI", "AQ", "AG", "AR", "AM", "AW", "AU", "AT", "AZ", "BS", "BH", "BD", "BB", "BY", "BE", "BZ", "BJ", "BM", "BT", "BO", "BQ", "BA", "BW", "BR", "IO", "VG", "BN", "BG", "BF", "BI", "CA", "KH", "CM", "CV", "KY", "CF", "TD", "CL", "CN", "CX", "CC", "CO", "KM", "CG", "CD", "CK", "CR", "HR", "CU", "CW", "CY", "CZ", "DK", "DJ", "DM", "DO", "EC", "EG", "SV", "GQ", "ER", "EE", "ET", "FK", "FO", "FM", "FJ", "FI", "FR", "GF", "PF", "TF", "GA", "GM", "GE", "DE", "GH", "GI", "GR", "GL", "GD", "GP", "GU", "GT", "GG", "GN", "GW", "GY", "HT", "VA", "HN", "HK", "HU", "IS", "IN", "ID", "IR", "IQ", "IE", "IM", "IL", "IT", "CI", "JM", "JP", "JE", "JO", "KZ", "KE", "KI", "KR", "KW", "KG", "LA", "LV", "LB", "LS", "LR", "LY", "LI", "LT", "LU", "MO", "MK", "MG", "MW", "MY", "MV", "ML", "MT", "MH", "MQ", "MR", "MU", "YT", "MX", "MD", "MC", "MN", "ME", "MS", "MA", "MZ", "MM", "NA", "NR", "NP", "NL", "AN", "NC", "NZ", "NI", "NE", "NG", "NU", "NF", "KP", "MP", "NO", "OM", "PK", "PW", "PS", "PA", "PG", "PY", "PE", "PH", "PN", "PL", "PT", "PR", "QA", "RE", "RO", "RU", "RW", "BL", "SH", "KN", "LC", "MF", "PM", "VC", "WS", "SM", "ST", "SA", "SN", "RS", "SC", "SL", "SG", "SX", "SK", "SI", "SB", "SO", "ZA", "GS", "SS", "ES", "LK", "SD", "SR", "SJ", "SZ", "SE", "CH", "SY", "TW", "TJ", "TZ", "TH", "TL", "TG", "TK", "TO", "TT", "TN", "TR", "TM", "TC", "TV", "UG", "UA", "AE", "GB", "VI", "UM", "US", "UY", "UZ", "VU", "VE", "VN", "WF", "EH", "YE", "ZM", "ZW"]>;
114
114
  name: z.ZodEffects<z.ZodString, string, string>;
115
115
  phone: z.ZodEffects<z.ZodNullable<z.ZodOptional<z.ZodString>>, string, string | null | undefined>;
@@ -272,7 +272,7 @@ export declare const warehouseSchema: z.ZodDiscriminatedUnion<"returnToAddressIs
272
272
  addressLine1: z.ZodString;
273
273
  addressLine2: z.ZodEffects<z.ZodNullable<z.ZodOptional<z.ZodString>>, string | undefined, string | null | undefined>;
274
274
  cityLocality: z.ZodString;
275
- companyName: z.ZodEffects<z.ZodNullable<z.ZodOptional<z.ZodString>>, string | undefined, string | null | undefined>;
275
+ companyName: z.ZodEffects<z.ZodUnion<[z.ZodEffects<z.ZodNullable<z.ZodOptional<z.ZodString>>, string | undefined, string | null | undefined>, z.ZodLiteral<"">]>, string | undefined, string | null | undefined>;
276
276
  countryCode: z.ZodEnum<["AF", "AX", "AL", "DZ", "AS", "AD", "AO", "AI", "AQ", "AG", "AR", "AM", "AW", "AU", "AT", "AZ", "BS", "BH", "BD", "BB", "BY", "BE", "BZ", "BJ", "BM", "BT", "BO", "BQ", "BA", "BW", "BR", "IO", "VG", "BN", "BG", "BF", "BI", "CA", "KH", "CM", "CV", "KY", "CF", "TD", "CL", "CN", "CX", "CC", "CO", "KM", "CG", "CD", "CK", "CR", "HR", "CU", "CW", "CY", "CZ", "DK", "DJ", "DM", "DO", "EC", "EG", "SV", "GQ", "ER", "EE", "ET", "FK", "FO", "FM", "FJ", "FI", "FR", "GF", "PF", "TF", "GA", "GM", "GE", "DE", "GH", "GI", "GR", "GL", "GD", "GP", "GU", "GT", "GG", "GN", "GW", "GY", "HT", "VA", "HN", "HK", "HU", "IS", "IN", "ID", "IR", "IQ", "IE", "IM", "IL", "IT", "CI", "JM", "JP", "JE", "JO", "KZ", "KE", "KI", "KR", "KW", "KG", "LA", "LV", "LB", "LS", "LR", "LY", "LI", "LT", "LU", "MO", "MK", "MG", "MW", "MY", "MV", "ML", "MT", "MH", "MQ", "MR", "MU", "YT", "MX", "MD", "MC", "MN", "ME", "MS", "MA", "MZ", "MM", "NA", "NR", "NP", "NL", "AN", "NC", "NZ", "NI", "NE", "NG", "NU", "NF", "KP", "MP", "NO", "OM", "PK", "PW", "PS", "PA", "PG", "PY", "PE", "PH", "PN", "PL", "PT", "PR", "QA", "RE", "RO", "RU", "RW", "BL", "SH", "KN", "LC", "MF", "PM", "VC", "WS", "SM", "ST", "SA", "SN", "RS", "SC", "SL", "SG", "SX", "SK", "SI", "SB", "SO", "ZA", "GS", "SS", "ES", "LK", "SD", "SR", "SJ", "SZ", "SE", "CH", "SY", "TW", "TJ", "TZ", "TH", "TL", "TG", "TK", "TO", "TT", "TN", "TR", "TM", "TC", "TV", "UG", "UA", "AE", "GB", "VI", "UM", "US", "UY", "UZ", "VU", "VE", "VN", "WF", "EH", "YE", "ZM", "ZW"]>;
277
277
  name: z.ZodEffects<z.ZodString, string, string>;
278
278
  phone: z.ZodEffects<z.ZodNullable<z.ZodOptional<z.ZodString>>, string, string | null | undefined>;
@@ -1,4 +1,4 @@
1
- import { SE } from "@shipengine/api";
1
+ import { SE } from "@shipengine/js-api";
2
2
  import { WarehousePayload } from "../manage-warehouses";
3
3
  export type WarehouseFormProps = {
4
4
  isOnboarding?: boolean;
@@ -0,0 +1 @@
1
+ export * from "./unit-settings";
@@ -0,0 +1,4 @@
1
+ export type UnitSettingsProps = {
2
+ onChange?: () => void;
3
+ };
4
+ export declare const UnitSettings: ({ onChange }: UnitSettingsProps) => import("@emotion/react/jsx-runtime").JSX.Element;
@@ -1,4 +1,4 @@
1
- import { SE } from "@shipengine/api";
1
+ import { SE } from "@shipengine/js-api";
2
2
  import { Templates } from "../../../components";
3
3
  import { UseShippingPresetsOptionsProps } from "../../../hooks";
4
4
  import { UseRatesFormProps, UseShipmentFormProps } from "./hooks";
@@ -1,4 +1,4 @@
1
- import { SE } from "@shipengine/api";
1
+ import { SE } from "@shipengine/js-api";
2
2
  import { Templates } from "../../../../components";
3
3
  import { CountryCode } from "../../../../constants";
4
4
  export type UseAddressProps = {
@@ -1,4 +1,4 @@
1
- import { SE } from "@shipengine/api";
1
+ import { SE } from "@shipengine/js-api";
2
2
  export type UseCustomsProps = {
3
3
  onUpdate?: (shipment: SE.SalesOrderShipment) => Promise<void> | void;
4
4
  shipment?: SE.SalesOrderShipment;
@@ -1,4 +1,4 @@
1
- import { SE } from "@shipengine/api";
1
+ import { SE } from "@shipengine/js-api";
2
2
  import { ShippingPreset } from "../../../../types";
3
3
  export type UsePresetsProps = {
4
4
  onApply?: (preset: ShippingPreset, shipment: SE.SalesOrderShipment) => Promise<void> | void;
@@ -1,4 +1,4 @@
1
- import { SE } from "@shipengine/api";
1
+ import { SE } from "@shipengine/js-api";
2
2
  import { UseRequestRatesProps } from "./use-request-rates";
3
3
  export type UseRatesFormProps = {
4
4
  onBeforeLabelCreate?: (rate: SE.Rate, shipment: SE.SalesOrderShipment) => Promise<void> | void;
@@ -1,4 +1,4 @@
1
- import { SE } from "@shipengine/api";
1
+ import { SE } from "@shipengine/js-api";
2
2
  export type UseRequestRatesProps = {
3
3
  onRatesCalculated?: (rates: SE.Rate[], shipment: SE.SalesOrderShipment) => Promise<void> | void;
4
4
  };
@@ -1,4 +1,4 @@
1
- import { SE } from "@shipengine/api";
1
+ import { SE } from "@shipengine/js-api";
2
2
  import { ShippingPreset } from "../../../../types";
3
3
  import { UseAddressProps } from "./use-address";
4
4
  import { UsePresetsProps } from "./use-presets";
@@ -4,5 +4,4 @@ export * from "./manage-warehouses";
4
4
  export * from "./onboarding";
5
5
  export * from "./purchase-label";
6
6
  export * from "./shipment";
7
- export * from "./wallet-history";
8
7
  export * from "./void-label";
@@ -5,7 +5,7 @@ export type ConnectedCarrierMetadata = {
5
5
  };
6
6
  export declare const useListConnectedCarriers: () => {
7
7
  data: ConnectedCarrierMetadata[];
8
- error: import("dist/shipengine-api/src").CodedError[] | null;
8
+ error: import("@shipengine/react-api").CodedError[] | null;
9
9
  isLoading: boolean;
10
- refetch: <TPageData>(options?: (import("react-query").RefetchOptions & import("react-query").RefetchQueryFilters<TPageData>) | undefined) => Promise<import("react-query").QueryObserverResult<import("dist/shipengine-api/src").Carrier[], import("dist/shipengine-api/src").CodedError[]>>;
10
+ refetch: <TPageData>(options?: (import("react-query").RefetchOptions & import("react-query").RefetchQueryFilters<TPageData>) | undefined) => Promise<import("react-query").QueryObserverResult<import("@shipengine/react-api").Carrier[], import("@shipengine/react-api").CodedError[]>>;
11
11
  };
@@ -1,4 +1,4 @@
1
- import { SE } from "@shipengine/api";
1
+ import { SE } from "@shipengine/js-api";
2
2
  import { ConfigureShipmentProps } from "../../configure-shipment";
3
3
  import { UsePendingShipmentProps } from "./use-pending-shipment";
4
4
  export type UseConfigureShipmentProps = {
@@ -5,7 +5,7 @@ export type UseImportSalesOrderProps = {
5
5
  salesOrderId?: string;
6
6
  };
7
7
  export declare const useImportSalesOrder: ({ externalOrderId, externalOrderNumber, orderSourceCode, salesOrderId, }: UseImportSalesOrderProps) => {
8
- errors: import("dist/shipengine-api/src").CodedError[] | undefined;
8
+ errors: import("@shipengine/react-api").CodedError[] | undefined;
9
9
  isLoading: boolean;
10
- salesOrder: import("dist/shipengine-api/src").SalesOrder | undefined;
10
+ salesOrder: import("@shipengine/react-api").SalesOrder | undefined;
11
11
  };
@@ -2,8 +2,8 @@ export type UseLoadShipmentProps = {
2
2
  shipmentId: string;
3
3
  };
4
4
  export declare const useLoadShipment: ({ shipmentId }: UseLoadShipmentProps) => {
5
- errors: import("dist/shipengine-api/src").CodedError[] | undefined;
5
+ errors: import("@shipengine/react-api").CodedError[] | undefined;
6
6
  isLoading: boolean;
7
- refetchShipment: <TPageData>(options?: (import("react-query").RefetchOptions & import("react-query").RefetchQueryFilters<TPageData>) | undefined) => Promise<import("react-query").QueryObserverResult<import("dist/shipengine-api/src").SalesOrderShipment, import("dist/shipengine-api/src").CodedError[]>>;
8
- shipment: import("dist/shipengine-api/src").SalesOrderShipment | undefined;
7
+ refetchShipment: <TPageData>(options?: (import("react-query").RefetchOptions & import("react-query").RefetchQueryFilters<TPageData>) | undefined) => Promise<import("react-query").QueryObserverResult<import("@shipengine/react-api").SalesOrderShipment, import("@shipengine/react-api").CodedError[]>>;
8
+ shipment: import("@shipengine/react-api").SalesOrderShipment | undefined;
9
9
  };
@@ -1,4 +1,4 @@
1
- import { SE } from "@shipengine/api";
1
+ import { SE } from "@shipengine/js-api";
2
2
  export type UsePendingShipmentProps = {
3
3
  onLoad?: (salesOrder: SE.SalesOrder, shipments: SE.SalesOrderShipment[], pendingShipment?: SE.SalesOrderShipment) => Promise<void> | void;
4
4
  salesOrder?: SE.SalesOrder;
@@ -1,4 +1,4 @@
1
- import { SE } from "@shipengine/api";
1
+ import { SE } from "@shipengine/js-api";
2
2
  import { Templates } from "../../../components";
3
3
  export type ShipmentFeatures = {
4
4
  shipment?: Templates.ShipmentFeatures;
@@ -1,4 +1,4 @@
1
- import { SE } from "@shipengine/api";
1
+ import { SE } from "@shipengine/js-api";
2
2
  export type VoidLabelProps = {
3
3
  labelId?: string;
4
4
  onComplete: (request: SE.VoidRequest, shipment: SE.SalesOrderShipment) => void;
@@ -2,6 +2,5 @@ export { Element as ListCarriers } from "./list-carriers";
2
2
  export { Element as ManageWarehouses } from "./manage-warehouses";
3
3
  export { Element as PurchaseLabel } from "./purchase-label";
4
4
  export { Element as Onboarding } from "./onboarding";
5
- export { Element as WalletHistory } from "./wallet-history";
6
5
  export { Element as ViewShipment } from "./view-shipment";
7
6
  export { Element as VoidLabel } from "./void-label";
@@ -1,5 +1,6 @@
1
1
  import { Factory } from "fishery";
2
- import { SE } from "@shipengine/api";
2
+ import { SE } from "@shipengine/js-api";
3
+ import { Templates } from "../../components";
3
4
  export type AddressTransientParams = {
4
5
  isInternational?: boolean;
5
6
  };
@@ -25,4 +26,10 @@ type AddressPreference = SE.AddressValidation & {
25
26
  * @category Factory
26
27
  */
27
28
  export declare const addressPreferenceFactory: Factory<AddressPreference, any, AddressPreference>;
29
+ /**
30
+ * Mock the addressValidationPreference object used to hyrdate the address valiation feature
31
+ * used for warehouse management and onboarding.
32
+ * @category Factory
33
+ */
34
+ export declare const addressValidationWithTypeFactory: Factory<Templates.AddressValidationPreference, any, Templates.AddressValidationPreference>;
28
35
  export {};
@@ -1,5 +1,5 @@
1
1
  import { Factory } from "fishery";
2
- import { SE } from "@shipengine/api";
2
+ import { SE } from "@shipengine/js-api";
3
3
  /**
4
4
  * @category Factories
5
5
  */
@@ -1,5 +1,5 @@
1
1
  import { Factory } from "fishery";
2
- import { SE } from "@shipengine/api";
2
+ import { SE } from "@shipengine/js-api";
3
3
  export type LabelTransientParams = {
4
4
  carrier: SE.Carrier;
5
5
  shipment: SE.SalesOrderShipment;
@@ -1,5 +1,5 @@
1
1
  import { Factory } from "fishery";
2
- import { SE } from "@shipengine/api";
2
+ import { SE } from "@shipengine/js-api";
3
3
  export type MoneyTransientParams = {
4
4
  isInternational?: boolean;
5
5
  };
@@ -1,5 +1,5 @@
1
1
  import { Factory } from "fishery";
2
- import { SE } from "@shipengine/api";
2
+ import { SE } from "@shipengine/js-api";
3
3
  export declare const randomOrderSourceCode: () => SE.OrderSourceCode;
4
4
  /**
5
5
  * @category Factories
@@ -1,5 +1,5 @@
1
1
  import { Factory } from "fishery";
2
- import { SE } from "@shipengine/api";
2
+ import { SE } from "@shipengine/js-api";
3
3
  export type PackageTransientParams = {
4
4
  noDimensions?: boolean;
5
5
  };
@@ -1,5 +1,5 @@
1
1
  import { Factory } from "fishery";
2
- import { SE } from "@shipengine/api";
2
+ import { SE } from "@shipengine/js-api";
3
3
  /**
4
4
  * @category Factories
5
5
  */
@@ -1,5 +1,5 @@
1
1
  import { Factory } from "fishery";
2
- import { SE } from "@shipengine/api";
2
+ import { SE } from "@shipengine/js-api";
3
3
  import { MoneyTransientParams } from "./money";
4
4
  export declare const randomPaymentStatus: () => SE.PaymentStatus;
5
5
  export declare const randomFulfillmentStatus: () => SE.FulfillmentStatus;
@@ -1,5 +1,5 @@
1
1
  import { Factory } from "fishery";
2
- import { SE } from "@shipengine/api";
2
+ import { SE } from "@shipengine/js-api";
3
3
  export type ServiceTransientParams = {
4
4
  carrier?: SE.Carrier;
5
5
  };
@@ -1,5 +1,5 @@
1
1
  import { Factory } from "fishery";
2
- import { SE } from "@shipengine/api";
2
+ import { SE } from "@shipengine/js-api";
3
3
  import { MoneyTransientParams } from "./money";
4
4
  export declare const randomDeliveryConfirmation: () => SE.ConfirmationType;
5
5
  export declare const randomInsuranceProvider: (allowNone?: boolean) => SE.InsuranceProviderType;
@@ -1,5 +1,5 @@
1
1
  import { Factory } from "fishery";
2
- import { SE } from "@shipengine/api";
2
+ import { SE } from "@shipengine/react-api";
3
3
  /**
4
4
  * Wallet Transaction Factory
5
5
  *
@@ -1,8 +1,6 @@
1
1
  import { Factory } from "fishery";
2
- import { SE } from "@shipengine/api";
3
- import { Templates } from "../../components";
2
+ import { SE } from "@shipengine/js-api";
4
3
  /**
5
4
  * @category Factories
6
5
  */
7
6
  export declare const warehouseFactory: Factory<SE.Warehouse, any, SE.Warehouse>;
8
- export declare const warehouseAddressPreferenceFactory: Factory<Templates.WarehouseAddressPreference, any, Templates.WarehouseAddressPreference>;
@@ -1,5 +1,5 @@
1
1
  import { Factory } from "fishery";
2
- import { SE } from "@shipengine/api";
2
+ import { SE } from "@shipengine/js-api";
3
3
  export declare const randomWeightUnit: () => SE.WeightUnit;
4
4
  /**
5
5
  * @category Factories
@@ -0,0 +1 @@
1
+ export declare const styles: Record<"action" | "displayStateContainer" | "emptyStateContainer" | "gridContainer" | "linkAction" | "pagination" | "skeletonCard" | "skeletonCardColumnLeft" | "skeletonCardColumnRight" | "skeletonCardList" | "skeletonCardLogo" | "skeletonPagination", import("@emotion/serialize").Interpolation<import("@packlink/giger-theme/dist/lib/Theme").Theme>>;
@@ -6,4 +6,4 @@ export * from "./use-page-layout";
6
6
  export * from "./use-root-portal";
7
7
  export * from "./use-run-once-on-true";
8
8
  export * from "./use-toggle";
9
- export * from "./use-warehouse-validation";
9
+ export * from "./use-address-validation";
@@ -2,6 +2,7 @@ export * from "./use-confirmation-options";
2
2
  export * from "./use-country-code-options";
3
3
  export * from "./use-customs-contents-options";
4
4
  export * from "./use-customs-non-delivery-options";
5
+ export * from "./use-date-range-options";
5
6
  export * from "./use-expiration-month-options";
6
7
  export * from "./use-insurance-provider-options";
7
8
  export * from "./use-package-options";
@@ -1,4 +1,4 @@
1
- import { SE } from "@shipengine/api";
1
+ import { SE } from "@shipengine/js-api";
2
2
  export declare const useConfirmationOptions: () => {
3
3
  label: string;
4
4
  value: SE.ConfirmationType;
@@ -1,4 +1,4 @@
1
- import { SE } from "@shipengine/api";
1
+ import { SE } from "@shipengine/js-api";
2
2
  export declare const useCustomsContentsOptions: () => {
3
3
  label: string;
4
4
  value: SE.CustomsContentsType;
@@ -1,4 +1,4 @@
1
- import { SE } from "@shipengine/api";
1
+ import { SE } from "@shipengine/js-api";
2
2
  export declare const useCustomsNonDeliveryOptions: () => {
3
3
  label: string;
4
4
  value: SE.CustomsNonDeliveryType;
@@ -0,0 +1,14 @@
1
+ export type DateRange = [Date, Date];
2
+ export type DateRangeOption = {
3
+ label: string;
4
+ } & ({
5
+ range: undefined;
6
+ value: "custom";
7
+ } | {
8
+ range: DateRange;
9
+ value: "last30days" | "thisMonth" | "lastMonth";
10
+ });
11
+ /**
12
+ * A curated list of date range options relative to the immediate date
13
+ */
14
+ export declare const useDateRangeOptions: () => [DateRangeOption[], Record<"custom" | "last30days" | "thisMonth" | "lastMonth", DateRangeOption>];
@@ -1,4 +1,4 @@
1
- import { SE } from "@shipengine/api";
1
+ import { SE } from "@shipengine/js-api";
2
2
  interface InsuranceFeatures {
3
3
  includeShipsuranceInsurance?: boolean;
4
4
  includeThirdPartyInsurance?: boolean;
@@ -1,3 +1,3 @@
1
- import { SE } from "@shipengine/api";
1
+ import { SE } from "@shipengine/js-api";
2
2
  import { SelectCategory } from "../../components/field/select";
3
3
  export declare const usePackageOptions: (carriers?: SE.Carrier[], customPackageTypes?: SE.CustomPackage[], poBox?: boolean) => SelectCategory[] | undefined;
@@ -1,4 +1,4 @@
1
- import { SE } from "@shipengine/api";
1
+ import { SE } from "@shipengine/js-api";
2
2
  export type RateOption = Omit<SE.Rate, "warningMessages"> & {
3
3
  balance?: number;
4
4
  messages: string[];
@@ -1,3 +1,3 @@
1
- import { SE } from "@shipengine/api";
1
+ import { SE } from "@shipengine/js-api";
2
2
  import { SelectCategory } from "../../components/field/select";
3
3
  export declare const useServiceCodeOptions: (carriers?: SE.Carrier[], domestic?: boolean, poBox?: boolean) => SelectCategory[];
@@ -1,4 +1,4 @@
1
- import { SE } from "@shipengine/api";
1
+ import { SE } from "@shipengine/js-api";
2
2
  export declare const useWarehouseOptions: (warehouses?: SE.Warehouse[]) => {
3
3
  label: string;
4
4
  value: string;
@@ -0,0 +1,12 @@
1
+ /// <reference types="react" />
2
+ import { SE } from "@shipengine/js-api";
3
+ import { Templates } from "../components";
4
+ export declare const useAddressValidation: () => {
5
+ errors: SE.CodedError[] | null;
6
+ setValidationPreference: import("react").Dispatch<import("react").SetStateAction<Templates.ValidationPreference | undefined>>;
7
+ validate: (addresses: {
8
+ originAddress: SE.Address;
9
+ returnAddress?: SE.Address;
10
+ }) => Promise<Templates.ValidationPreference>;
11
+ validationPreference: Templates.ValidationPreference | undefined;
12
+ };
@@ -1,3 +1,3 @@
1
- import { CarrierConnection } from "@shipengine/api";
1
+ import { CarrierConnection } from "@shipengine/js-api";
2
2
  import { CarrierMetadata } from "../types";
3
3
  export declare const useCarrierMetadata: (carrierCodes?: CarrierConnection["carrierCode"][]) => CarrierMetadata[];
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { ShipEngineProviderProps } from "@shipengine/react";
2
+ import { ShipEngineProps } from "@shipengine/react-api";
3
3
  export type ElementsEnvironment = `dde:${string}` | "development" | "staging" | "production";
4
4
  export type ElementsErrorHandler = (err: Error, context: {
5
5
  componentStack: string;
@@ -19,7 +19,7 @@ export interface ElementsProviderProps {
19
19
  brandName?: string;
20
20
  children: JSX.Element;
21
21
  environment?: ElementsEnvironment;
22
- getToken: ShipEngineProviderProps["getToken"];
22
+ getToken: ShipEngineProps["getToken"];
23
23
  onError?: ElementsErrorHandler;
24
24
  proxyTarget?: string;
25
25
  }
@@ -1,4 +1,4 @@
1
- import { SE } from "@shipengine/api";
1
+ import { SE } from "@shipengine/js-api";
2
2
  type UseScrubErrorsProps = {
3
3
  errors?: SE.CodedError[];
4
4
  predicate?: (e: SE.CodedError) => boolean;
@@ -2,7 +2,9 @@ declare const _default: {
2
2
  "wallet-history": {
3
3
  actions: {
4
4
  downloadCsv: string;
5
+ chooseDate: string;
5
6
  };
7
+ dateRange: string;
6
8
  historyOptions: {
7
9
  custom: string;
8
10
  last30days: string;
@@ -140,6 +142,7 @@ declare const _default: {
140
142
  };
141
143
  fields: {
142
144
  addOns: string;
145
+ contentDescription: string;
143
146
  confirmation: string;
144
147
  dimensions: {
145
148
  length: string;
@@ -166,6 +169,9 @@ declare const _default: {
166
169
  };
167
170
  weightGroup: string;
168
171
  };
172
+ hints: {
173
+ contentDescription: string;
174
+ };
169
175
  loading: {
170
176
  calculatingRates: string;
171
177
  };
@@ -200,8 +206,9 @@ declare const _default: {
200
206
  action: string;
201
207
  title: string;
202
208
  subtitle: string;
203
- descriptionTitle: string;
204
- description: string;
209
+ welcome: string;
210
+ messageLine1: string;
211
+ messageLine2: string;
205
212
  };
206
213
  steps: {
207
214
  login: string;
@@ -221,13 +228,26 @@ declare const _default: {
221
228
  };
222
229
  };
223
230
  "manage-defaults": {
231
+ units: {
232
+ title: string;
233
+ dimensions: {
234
+ title: string;
235
+ standard: string;
236
+ metric: string;
237
+ };
238
+ weight: {
239
+ title: string;
240
+ standard: string;
241
+ g: string;
242
+ kg: string;
243
+ };
244
+ };
224
245
  label: {
225
- purchase: {
246
+ letter: {
226
247
  title: string;
227
248
  description: string;
228
249
  };
229
- title: string;
230
- letter: {
250
+ purchase: {
231
251
  title: string;
232
252
  description: string;
233
253
  };
@@ -235,6 +255,7 @@ declare const _default: {
235
255
  title: string;
236
256
  description: string;
237
257
  };
258
+ title: string;
238
259
  };
239
260
  };
240
261
  "manage-warehouses": {
@@ -345,6 +366,7 @@ declare const _default: {
345
366
  email: string;
346
367
  addressResidentialIndicator: string;
347
368
  };
369
+ noResults: string;
348
370
  subFields: {
349
371
  optional: string;
350
372
  };
@@ -377,6 +399,9 @@ declare const _default: {
377
399
  cardNumber: string;
378
400
  expiration: string;
379
401
  cvv: string;
402
+ cvvPlaceholder: string;
403
+ expirationPlaceholder: string;
404
+ cardNumberPlaceholder: string;
380
405
  };
381
406
  };
382
407
  carriers: {
@@ -471,6 +496,7 @@ declare const _default: {
471
496
  carriers: string;
472
497
  data: string;
473
498
  importingSalesOrder: string;
499
+ onboarding: string;
474
500
  salesOrder: string;
475
501
  shipment: string;
476
502
  warehouses: string;
@@ -508,6 +534,7 @@ declare const _default: {
508
534
  invalidAddressName: string;
509
535
  invalidAddressPoBox: string;
510
536
  invalidCreditCardType: string;
537
+ invalidExpiration: string;
511
538
  invalidPostalCode: string;
512
539
  invalidStateProvince: string;
513
540
  invalidString: string;
@@ -1,5 +1,5 @@
1
1
  import { DeepPartial } from "fishery";
2
- import { SE } from "@shipengine/api";
2
+ import { SE } from "@shipengine/js-api";
3
3
  export type CreateCarrierHandlersParams = {
4
4
  get?: DeepPartial<SE.Carrier>;
5
5
  list?: [count: number, listParams?: DeepPartial<SE.Carrier>];
@@ -1,5 +1,5 @@
1
1
  import { DeepPartial } from "fishery";
2
- import { SE } from "@shipengine/api";
2
+ import { SE } from "@shipengine/js-api";
3
3
  export type CreateWarehouseHandlersParams = {
4
4
  get?: DeepPartial<SE.Warehouse>;
5
5
  list?: [count: number, listParams?: DeepPartial<SE.Warehouse>];
@@ -1,5 +1,5 @@
1
1
  import { z } from "zod";
2
- import { SE } from "@shipengine/api";
2
+ import { SE } from "@shipengine/js-api";
3
3
  /**
4
4
  * @category Form Validation
5
5
  */
@@ -1,4 +1,4 @@
1
- import { CarrierConnection, SE } from "@shipengine/api";
1
+ import { CarrierConnection, SE } from "@shipengine/js-api";
2
2
  export type CarrierTerm = {
3
3
  description: string;
4
4
  name: string;
@@ -1,4 +1,4 @@
1
- import { SE } from "@shipengine/api";
1
+ import { SE } from "@shipengine/js-api";
2
2
  export type ShippingPreset = {
3
3
  confirmation?: SE.ConfirmationType;
4
4
  dimensions?: SE.DimensionsWithUnit;
@@ -33,4 +33,12 @@ export declare const sortByCreationDate: (a: HasCreationDate, b: HasCreationDate
33
33
  * @category Utilities
34
34
  */
35
35
  export declare const isNowOrInTheFuture: (shipDate?: string) => boolean;
36
+ export declare const getRelativeDates: (from?: Date) => {
37
+ firstDayOfMonth: Date;
38
+ lastDayOfTheMonth: Date;
39
+ origin: Date;
40
+ previousMonthFirstDay: Date;
41
+ previousMonthLastDay: Date;
42
+ thirtyDaysAgo: Date;
43
+ };
36
44
  export {};