@shipengine/elements 0.15.0 → 0.16.1

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 (207) hide show
  1. package/components/add-funds-form/add-funds-form.d.ts +22 -0
  2. package/components/add-funds-form/add-funds-form.styles.d.ts +6 -0
  3. package/components/add-funds-form/add-funds-schema.d.ts +37 -0
  4. package/components/add-funds-form/index.d.ts +2 -0
  5. package/components/auto-funding-form/auto-funding-form.d.ts +8 -0
  6. package/components/auto-funding-form/auto-funding-form.styles.d.ts +1 -0
  7. package/components/{organisms/auto-funding-form → auto-funding-form}/auto-funding-schema.d.ts +10 -10
  8. package/components/auto-funding-form/index.d.ts +2 -0
  9. package/components/carrier-balance/carrier-balance.d.ts +4 -0
  10. package/components/carrier-balance/carrier-balance.styles.d.ts +1 -0
  11. package/components/carrier-balance/index.d.ts +1 -0
  12. package/components/field/create-field-controller.d.ts +4 -1
  13. package/components/field/credit-card-input/credit-card-input.d.ts +3 -0
  14. package/components/field/credit-card-input/index.d.ts +1 -0
  15. package/components/field/fields.d.ts +1 -0
  16. package/components/field/money-input/hooks/use-utils.d.ts +1 -1
  17. package/components/field/money-input/money-input.d.ts +1 -1
  18. package/components/field/rate-card/cost-breakdown/cost-breakdown.d.ts +1 -1
  19. package/components/form-portal/form-portal.d.ts +18 -0
  20. package/components/form-portal/index.d.ts +1 -0
  21. package/components/fund-and-purchase/fund-and-purchase.d.ts +15 -0
  22. package/components/fund-and-purchase/fund-and-purchase.styles.d.ts +1 -0
  23. package/components/fund-and-purchase/index.d.ts +1 -0
  24. package/components/index.d.ts +10 -0
  25. package/components/inline-label/index.d.ts +1 -0
  26. package/components/inline-label/inline-label.d.ts +6 -0
  27. package/components/items-breakdown/items-breakdown.d.ts +1 -1
  28. package/components/link-action/index.d.ts +1 -0
  29. package/components/link-action/link-action.d.ts +12 -0
  30. package/components/manage-funding/manage-funding.d.ts +4 -0
  31. package/components/portal/portal.d.ts +1 -1
  32. package/components/settings-card/settings-card.d.ts +6 -1
  33. package/components/settings-card/settings-card.styles.d.ts +1 -6
  34. package/components/spread/index.d.ts +1 -0
  35. package/components/spread/spread.d.ts +5 -0
  36. package/components/story-notes/index.d.ts +1 -0
  37. package/components/story-notes/story-notes.d.ts +11 -0
  38. package/components/templates/{billing-form/billing-schema.d.ts → add-carrier-form/add-carrier-form-schema.d.ts} +38 -109
  39. package/components/templates/add-carrier-form/add-carrier-form-test.d.ts +1 -0
  40. package/components/templates/add-carrier-form/add-carrier-form.d.ts +10 -0
  41. package/components/templates/add-carrier-form/index.d.ts +2 -0
  42. package/components/templates/address-display/address-display.d.ts +1 -1
  43. package/components/templates/address-form/address-fields.d.ts +2 -1
  44. package/components/templates/address-form/address-form-schema.d.ts +0 -9
  45. package/components/templates/address-form/address-form.d.ts +2 -2
  46. package/components/templates/address-form/address-schema.d.ts +2 -3
  47. package/components/templates/address-preference-display/address-preference-display.d.ts +1 -1
  48. package/components/templates/carrier-recovery-form/carrier-recovery-form-schema.d.ts +238 -0
  49. package/components/templates/carrier-recovery-form/carrier-recovery-form.d.ts +10 -0
  50. package/components/templates/carrier-recovery-form/carrier-recovery-form.styles.d.ts +1 -0
  51. package/components/templates/carrier-recovery-form/index.d.ts +2 -0
  52. package/components/templates/carrier-terms-form/carrier-terms-form-schema.d.ts +10 -0
  53. package/components/templates/carrier-terms-form/carrier-terms-form.d.ts +6 -0
  54. package/components/templates/carrier-terms-form/carrier-terms-form.styles.d.ts +1 -0
  55. package/components/templates/carrier-terms-form/index.d.ts +1 -0
  56. package/components/templates/customs-item-form/customs-item-form-schema.d.ts +112 -12
  57. package/components/templates/customs-item-form/customs-item-form.d.ts +3 -2
  58. package/components/templates/customs-items-display/customs-items-display.d.ts +1 -1
  59. package/components/templates/display-carrier-terms/display-carrier-terms.d.ts +6 -0
  60. package/components/templates/display-carrier-terms/index.d.ts +1 -0
  61. package/components/templates/edit-billing-form/edit-billing-form.d.ts +6 -0
  62. package/components/templates/edit-billing-form/edit-billing-form.styles.d.ts +1 -0
  63. package/components/templates/edit-billing-form/index.d.ts +1 -0
  64. package/components/templates/index.d.ts +8 -4
  65. package/components/templates/label/label.d.ts +2 -2
  66. package/components/templates/landing-page/index.d.ts +1 -0
  67. package/components/templates/landing-page/landing-page-form-schema.d.ts +10 -0
  68. package/components/templates/landing-page/landing-page-form.d.ts +4 -0
  69. package/components/templates/landing-page/landing-page.d.ts +4 -0
  70. package/components/templates/landing-page/landing-page.styles.d.ts +1 -0
  71. package/components/templates/list-carriers/index.d.ts +1 -0
  72. package/components/templates/list-carriers/list-carriers.d.ts +9 -0
  73. package/components/templates/list-carriers/list-carriers.styles.d.ts +1 -0
  74. package/components/templates/list-carriers-row/index.d.ts +1 -0
  75. package/components/templates/list-carriers-row/list-carriers-row.d.ts +9 -0
  76. package/components/templates/list-carriers-row/list-carriers-row.styles.d.ts +1 -0
  77. package/components/templates/manage-wallet/index.d.ts +1 -0
  78. package/components/templates/manage-wallet/manage-wallet.d.ts +1 -0
  79. package/components/templates/manage-wallet/manage-wallet.styles.d.ts +1 -0
  80. package/components/templates/manage-warehouses/manage-warehouses.d.ts +7 -2
  81. package/components/templates/onboarding/index.d.ts +1 -0
  82. package/components/templates/onboarding/onboarding.d.ts +18 -0
  83. package/components/templates/onboarding/onboarding.styles.d.ts +1 -0
  84. package/components/templates/rate-form/rate-form.d.ts +2 -2
  85. package/components/templates/rate-form/rate-form.styles.d.ts +1 -0
  86. package/components/templates/sales-order/sales-order.d.ts +1 -1
  87. package/components/templates/shipment/shipment.d.ts +1 -1
  88. package/components/templates/shipment-form/shipment-form.d.ts +3 -3
  89. package/components/templates/shipment-form/shipment-schema.d.ts +11 -11
  90. package/components/templates/void-label/void-label.d.ts +1 -1
  91. package/components/templates/wallet-card/index.d.ts +1 -0
  92. package/components/templates/wallet-card/wallet-card.d.ts +4 -0
  93. package/components/templates/wallet-card/wallet-card.styles.d.ts +1 -0
  94. package/components/templates/wallet-form/billing-fields.d.ts +6 -0
  95. package/components/templates/wallet-form/edit-wallet-address-form.d.ts +16 -0
  96. package/components/templates/wallet-form/index.d.ts +4 -0
  97. package/components/templates/wallet-form/wallet-form.d.ts +11 -0
  98. package/components/templates/wallet-form/wallet-form.styles.d.ts +1 -0
  99. package/components/templates/wallet-form/wallet-schema.d.ts +269 -0
  100. package/components/templates/warehouse-display/warehouse-display.d.ts +1 -1
  101. package/components/templates/warehouse-form/index.d.ts +1 -0
  102. package/components/templates/warehouse-form/warehouse-form-schema.d.ts +503 -0
  103. package/components/templates/warehouse-form/warehouse-form.d.ts +10 -0
  104. package/components/templates/warehouse-form/warehouse-form.styles.d.ts +1 -0
  105. package/constants/shipengine/address.d.ts +4 -0
  106. package/elements/components/configure-shipment/configure-shipment.d.ts +1 -1
  107. package/elements/components/configure-shipment/hooks/use-address.d.ts +3 -3
  108. package/elements/components/configure-shipment/hooks/use-customs.d.ts +3 -3
  109. package/elements/components/configure-shipment/hooks/use-presets.d.ts +2 -2
  110. package/elements/components/configure-shipment/hooks/use-rates-form.d.ts +1 -1
  111. package/elements/components/configure-shipment/hooks/use-request-rates.d.ts +2 -2
  112. package/elements/components/configure-shipment/hooks/use-shipment-form.d.ts +6 -6
  113. package/elements/components/index.d.ts +2 -3
  114. package/elements/components/list-carriers/hooks/use-list-connected-carriers.d.ts +11 -0
  115. package/elements/components/list-carriers/index.d.ts +1 -0
  116. package/elements/components/list-carriers/list-carriers.d.ts +1 -0
  117. package/elements/components/onboarding/index.d.ts +1 -0
  118. package/elements/components/onboarding/onboarding.d.ts +4 -0
  119. package/elements/components/sales-order/hooks/use-configure-shipment.d.ts +3 -1
  120. package/elements/components/sales-order/hooks/use-import-sales-order.d.ts +2 -2
  121. package/elements/components/sales-order/hooks/use-pending-shipment.d.ts +1 -1
  122. package/elements/components/sales-order/sales-order.d.ts +1 -1
  123. package/elements/components/shipment/shipment.d.ts +1 -1
  124. package/elements/components/void-label/void-label.d.ts +1 -1
  125. package/elements/index.d.ts +2 -3
  126. package/elements/onboarding.d.ts +1 -0
  127. package/factories/shipengine/address.d.ts +1 -1
  128. package/factories/shipengine/carrier.d.ts +1 -1
  129. package/factories/shipengine/label.d.ts +1 -1
  130. package/factories/shipengine/money.d.ts +1 -1
  131. package/factories/shipengine/order-source.d.ts +10 -2
  132. package/factories/shipengine/package.d.ts +2 -2
  133. package/factories/shipengine/resource.d.ts +1 -1
  134. package/factories/shipengine/sales-order.d.ts +1 -1
  135. package/factories/shipengine/service.d.ts +2 -2
  136. package/factories/shipengine/shipment.d.ts +4 -4
  137. package/factories/shipengine/warehouse.d.ts +1 -1
  138. package/factories/shipengine/weight.d.ts +1 -1
  139. package/hooks/index.d.ts +1 -0
  140. package/hooks/options/use-confirmation-options.d.ts +1 -1
  141. package/hooks/options/use-customs-contents-options.d.ts +1 -1
  142. package/hooks/options/use-customs-non-delivery-options.d.ts +1 -1
  143. package/hooks/options/use-insurance-provider-options.d.ts +2 -2
  144. package/hooks/options/use-package-options.d.ts +2 -2
  145. package/hooks/options/use-rate-options.d.ts +1 -1
  146. package/hooks/options/use-service-code-options.d.ts +1 -1
  147. package/hooks/options/use-warehouse-options.d.ts +1 -1
  148. package/hooks/use-carrier-metadata.d.ts +2 -5
  149. package/hooks/use-nested-form.d.ts +2 -2
  150. package/hooks/use-toggle.d.ts +12 -0
  151. package/index.cjs +20093 -17773
  152. package/index.js +20769 -18460
  153. package/locales/en/index.d.ts +122 -6
  154. package/mocks/browser.d.ts +1 -0
  155. package/mocks/carriers/handlers.d.ts +12 -0
  156. package/mocks/carriers/index.d.ts +1 -0
  157. package/mocks/index.d.ts +2 -0
  158. package/mocks/server.d.ts +2 -0
  159. package/mocks/warehouses/handlers.d.ts +1 -0
  160. package/mocks/warehouses/index.d.ts +1 -0
  161. package/package.json +10 -7
  162. package/register.d.ts +1 -4
  163. package/schemas/shipengine/index.d.ts +0 -1
  164. package/schemas/shipengine/money.d.ts +1 -1
  165. package/testing/index.d.ts +0 -1
  166. package/testing/render.d.ts +5 -0
  167. package/types/carrier-metadata.d.ts +10 -5
  168. package/types/shipping-preset/shipping-preset.d.ts +2 -2
  169. package/utilities/date.d.ts +13 -1
  170. package/utilities/money.d.ts +2 -1
  171. package/utilities/rates.d.ts +2 -2
  172. package/utilities/shipengine/address.d.ts +1 -1
  173. package/utilities/shipengine/dimensions.d.ts +1 -1
  174. package/utilities/shipengine/sales-order.d.ts +1 -1
  175. package/utilities/shipengine/shipment.d.ts +1 -1
  176. package/utilities/shipengine/weight.d.ts +1 -1
  177. package/components/organisms/auto-funding-form/auto-funding-form.d.ts +0 -15
  178. package/components/organisms/auto-funding-form/index.d.ts +0 -1
  179. package/components/organisms/index.d.ts +0 -2
  180. package/components/organisms/manual-funding-form/index.d.ts +0 -2
  181. package/components/organisms/manual-funding-form/manual-funding-form.d.ts +0 -17
  182. package/components/organisms/manual-funding-form/manual-funding-schema.d.ts +0 -27
  183. package/components/templates/add-carriers/add-carriers.d.ts +0 -5
  184. package/components/templates/add-carriers/index.d.ts +0 -1
  185. package/components/templates/agreement-form/agreement-form-schema.d.ts +0 -10
  186. package/components/templates/agreement-form/agreement-form.d.ts +0 -8
  187. package/components/templates/agreement-form/agreement-form.styles.d.ts +0 -1
  188. package/components/templates/agreement-form/index.d.ts +0 -1
  189. package/components/templates/billing-form/billing-form-stories.d.ts +0 -6
  190. package/components/templates/billing-form/billing-form.d.ts +0 -9
  191. package/components/templates/billing-form/index.d.ts +0 -2
  192. package/components/templates/funding-methods/funding-methods.d.ts +0 -17
  193. package/components/templates/funding-methods/index.d.ts +0 -1
  194. package/components/templates/register-wallet/index.d.ts +0 -1
  195. package/components/templates/register-wallet/register-wallet.d.ts +0 -3
  196. package/components/templates/register-wallet/register-wallet.styles.d.ts +0 -6
  197. package/elements/add-carriers.d.ts +0 -1
  198. package/elements/components/add-carriers/add-carriers.d.ts +0 -8
  199. package/elements/components/add-carriers/index.d.ts +0 -1
  200. package/elements/components/manage-funding/manage-funding.d.ts +0 -2
  201. package/elements/components/register-wallet/index.d.ts +0 -1
  202. package/elements/components/register-wallet/register-wallet.d.ts +0 -9
  203. package/elements/register-wallet.d.ts +0 -1
  204. package/schemas/shipengine/address.d.ts +0 -17
  205. package/testing/swr.d.ts +0 -15
  206. /package/{elements/components → components}/manage-funding/index.d.ts +0 -0
  207. /package/elements/{manage-funding.d.ts → list-carriers.d.ts} +0 -0
@@ -0,0 +1,10 @@
1
+ import { SE } from "@shipengine/api";
2
+ export type WarehouseFormProps = {
3
+ isOnboarding?: boolean;
4
+ onCancel?: () => void;
5
+ onDelete?: () => void;
6
+ onSubmit: (payload: Omit<SE.Warehouse, "createdAt" | "warehouseId">) => void;
7
+ submitButtonTitle: string;
8
+ warehouse?: SE.Warehouse;
9
+ };
10
+ export declare const WarehouseForm: ({ isOnboarding, onCancel, onDelete, onSubmit, submitButtonTitle, warehouse, }: WarehouseFormProps) => import("@emotion/react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare const styles: Record<"header" | "onboardingWell" | "well", import("@emotion/serialize").Interpolation<import("@packlink/brands/dist/js/theme/Theme").Theme>>;
@@ -1,4 +1,5 @@
1
1
  export type CountryRules = {
2
+ hasEuCustomsRules?: boolean;
2
3
  hasProvinces?: boolean;
3
4
  isUnitedStatesTerritory?: boolean;
4
5
  supportsByoa?: boolean;
@@ -6,6 +7,7 @@ export type CountryRules = {
6
7
  export declare class Country<T extends string, U extends string> {
7
8
  name: T;
8
9
  code: U;
10
+ hasEuCustomsRules: boolean;
9
11
  hasProvinces: boolean;
10
12
  isUnitedStatesTerritory: boolean;
11
13
  supportsByoa: boolean;
@@ -14,6 +16,8 @@ export declare class Country<T extends string, U extends string> {
14
16
  export declare const countries: readonly [Country<"Afghanistan", "AF">, Country<"Aland Islands", "AX">, Country<"Albania", "AL">, Country<"Algeria", "DZ">, Country<"American Samoa", "AS">, Country<"Andorra", "AD">, Country<"Angola", "AO">, Country<"Anguilla", "AI">, Country<"Antarctica", "AQ">, Country<"Antigua Barbuda", "AG">, Country<"Argentina", "AR">, Country<"Armenia", "AM">, Country<"Aruba", "AW">, Country<"Australia", "AU">, Country<"Austria", "AT">, Country<"Azerbaijan", "AZ">, Country<"Bahamas", "BS">, Country<"Bahrain", "BH">, Country<"Bangladesh", "BD">, Country<"Barbados", "BB">, Country<"Belarus", "BY">, Country<"Belgium", "BE">, Country<"Belize", "BZ">, Country<"Benin", "BJ">, Country<"Bermuda", "BM">, Country<"Bhutan", "BT">, Country<"Bolivia", "BO">, Country<"Bonaire, Sint Eustatius And Saba", "BQ">, Country<"Bosnia and Herzegovina", "BA">, Country<"Botswana", "BW">, Country<"Brazil", "BR">, Country<"British Indian Ocean Territory", "IO">, Country<"British Virgin Islands", "VG">, Country<"Brunei Darussalam", "BN">, Country<"Bulgaria", "BG">, Country<"Burkina Faso", "BF">, Country<"Burundi", "BI">, Country<"Canada", "CA">, Country<"Cambodia", "KH">, Country<"Cameroon", "CM">, Country<"Cape Verde Islands", "CV">, Country<"Cayman Islands", "KY">, Country<"Central African Republic", "CF">, Country<"Chad", "TD">, Country<"Chile", "CL">, Country<"China", "CN">, Country<"Christmas Island", "CX">, Country<"Cocos(Keeling) Islands", "CC">, Country<"Colombia", "CO">, Country<"Comoros", "KM">, Country<"Congo", "CG">, Country<"Congo, The Democratic Republic of", "CD">, Country<"Cook Islands", "CK">, Country<"Costa Rica", "CR">, Country<"Croatia", "HR">, Country<"Cuba", "CU">, Country<"Curacao", "CW">, Country<"Cyprus", "CY">, Country<"Czech Republic", "CZ">, Country<"Denmark", "DK">, Country<"Djibouti", "DJ">, Country<"Dominica", "DM">, Country<"Dominican Republic", "DO">, Country<"Ecuador", "EC">, Country<"Egypt", "EG">, Country<"El Salvador", "SV">, Country<"Equatorial Guinea", "GQ">, Country<"Eritrea", "ER">, Country<"Estonia", "EE">, Country<"Ethiopia", "ET">, Country<"Falkland Islands", "FK">, Country<"Faroe Islands", "FO">, Country<"Federated States of Micronesia", "FM">, Country<"Fiji", "FJ">, Country<"Finland", "FI">, Country<"France", "FR">, Country<"French Guiana", "GF">, Country<"French Polynesia", "PF">, Country<"French Southern Territories", "TF">, Country<"Gabon", "GA">, Country<"Gambia", "GM">, Country<"Georgia", "GE">, Country<"Germany", "DE">, Country<"Ghana", "GH">, Country<"Gibraltar", "GI">, Country<"Greece", "GR">, Country<"Greenland", "GL">, Country<"Grenada", "GD">, Country<"Guadeloupe", "GP">, Country<"Guam", "GU">, Country<"Guatemala", "GT">, Country<"Guernsey", "GG">, Country<"Guinea", "GN">, Country<"Guinea - Bissau", "GW">, Country<"Guyana", "GY">, Country<"Haiti", "HT">, Country<"Holy See", "VA">, Country<"Honduras", "HN">, Country<"Hong Kong", "HK">, Country<"Hungary", "HU">, Country<"Iceland", "IS">, Country<"India", "IN">, Country<"Indonesia", "ID">, Country<"Iran", "IR">, Country<"Iraq", "IQ">, Country<"Ireland", "IE">, Country<"Isle of Man", "IM">, Country<"Israel", "IL">, Country<"Italy", "IT">, Country<"Ivory Coast", "CI">, Country<"Jamaica", "JM">, Country<"Japan", "JP">, Country<"Jersey", "JE">, Country<"Jordan", "JO">, Country<"Kazakhstan", "KZ">, Country<"Kenya", "KE">, Country<"Kiribati", "KI">, Country<"Korea, Republic of", "KR">, Country<"Kuwait", "KW">, Country<"Kyrgyzstan", "KG">, Country<"Laos", "LA">, Country<"Latvia", "LV">, Country<"Lebanon", "LB">, Country<"Lesotho", "LS">, Country<"Liberia", "LR">, Country<"Libya", "LY">, Country<"Liechtenstein", "LI">, Country<"Lithuania", "LT">, Country<"Luxembourg", "LU">, Country<"Macao", "MO">, Country<"Macedonia", "MK">, Country<"Madagascar", "MG">, Country<"Malawi", "MW">, Country<"Malaysia", "MY">, Country<"Maldives", "MV">, Country<"Mali", "ML">, Country<"Malta", "MT">, Country<"Marshall Islands", "MH">, Country<"Martinique", "MQ">, Country<"Mauritania", "MR">, Country<"Mauritius0", "MU">, Country<"Mayotte", "YT">, Country<"Mexico", "MX">, Country<"Moldova", "MD">, Country<"Monaco", "MC">, Country<"Mongolia", "MN">, Country<"Montenegro", "ME">, Country<"Montserrat", "MS">, Country<"Morocco", "MA">, Country<"Mozambique", "MZ">, Country<"Myanmar", "MM">, Country<"Namibia", "NA">, Country<"Nauru", "NR">, Country<"Nepal", "NP">, Country<"Netherlands", "NL">, Country<"Netherlands Antilles", "AN">, Country<"New Caledonia", "NC">, Country<"New Zealand", "NZ">, Country<"Nicaragua", "NI">, Country<"Niger", "NE">, Country<"Nigeria", "NG">, Country<"Niue", "NU">, Country<"Norfolk Island", "NF">, Country<"North Korea", "KP">, Country<"Northern Mariana Islands", "MP">, Country<"Norway", "NO">, Country<"Oman", "OM">, Country<"Pakistan", "PK">, Country<"Palau", "PW">, Country<"Palestinian Territory", "PS">, Country<"Panama", "PA">, Country<"Papua New Guinea", "PG">, Country<"Paraguay", "PY">, Country<"Peru", "PE">, Country<"Philippines", "PH">, Country<"Pitcairn Island", "PN">, Country<"Poland", "PL">, Country<"Portugal", "PT">, Country<"Puerto Rico", "PR">, Country<"Qatar", "QA">, Country<"Reunion", "RE">, Country<"Romania", "RO">, Country<"Russia", "RU">, Country<"Rwanda", "RW">, Country<"Saint Barthelemy", "BL">, Country<"Saint Helena", "SH">, Country<"Saint Kitts and Nevis", "KN">, Country<"Saint Lucia", "LC">, Country<"Saint Martin", "MF">, Country<"Saint Pierre and Miquelon", "PM">, Country<"Saint Vincent & the Grenadines", "VC">, Country<"Samoa", "WS">, Country<"San Marino", "SM">, Country<"Sao Tome and Principe", "ST">, Country<"Saudi Arabia", "SA">, Country<"Senegal", "SN">, Country<"Serbia", "RS">, Country<"Seychelles", "SC">, Country<"Sierra Leone", "SL">, Country<"Singapore", "SG">, Country<"Sint Maarten(Dutch)", "SX">, Country<"Slovakia", "SK">, Country<"Slovenia", "SI">, Country<"Solomon Islands", "SB">, Country<"Somalia", "SO">, Country<"South Africa", "ZA">, Country<"South Georgia & the South Sandwich Islands", "GS">, Country<"South Sudan", "SS">, Country<"Spain", "ES">, Country<"Sri Lanka", "LK">, Country<"Sudan", "SD">, Country<"Suriname", "SR">, Country<"Svalbard & Jan Mayen Islands", "SJ">, Country<"Swaziland", "SZ">, Country<"Sweden", "SE">, Country<"Switzerland", "CH">, Country<"Syria", "SY">, Country<"Taiwan", "TW">, Country<"Tajikistan", "TJ">, Country<"Tanzania", "TZ">, Country<"Thailand", "TH">, Country<"Timor - Leste(formerly East Timor)", "TL">, Country<"Togo", "TG">, Country<"Tokelau", "TK">, Country<"Tonga", "TO">, Country<"Trinidad and Tobago", "TT">, Country<"Tunisia", "TN">, Country<"Turkey", "TR">, Country<"Turkmenistan", "TM">, Country<"Turks and Caicos Islands", "TC">, Country<"Tuvalu", "TV">, Country<"Uganda", "UG">, Country<"Ukraine", "UA">, Country<"United Arab Emirates", "AE">, Country<"United Kingdom", "GB">, Country<"United States Virgin Islands", "VI">, Country<"U.S. Minor Outlying Islands", "UM">, Country<"United States of America", "US">, Country<"Uruguay", "UY">, Country<"Uzbekistan", "UZ">, Country<"Vanuatu", "VU">, Country<"Venezuela", "VE">, Country<"Vietnam", "VN">, Country<"Wallis and Futuna Islands", "WF">, Country<"Western Sahara", "EH">, Country<"Yemen", "YE">, Country<"Zambia", "ZM">, Country<"Zimbabwe", "ZW">];
15
17
  export declare const countryCodes: ["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"];
16
18
  export type CountryCode = typeof countryCodes[number];
19
+ export declare const euCountryCodes: ("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")[];
20
+ export declare const postalCodeRegex: RegExp;
17
21
  export type UsStateRules = {
18
22
  isMilitary?: boolean;
19
23
  isUnitedStatesTerritory?: boolean;
@@ -1,4 +1,4 @@
1
- import * as SE from "@shipengine/types";
1
+ import { SE } from "@shipengine/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 * as SE from "@shipengine/types";
1
+ import { SE } from "@shipengine/api";
2
2
  import { Templates } from "../../../../components";
3
3
  import { CountryCode } from "../../../../constants";
4
4
  export type UseAddressProps = {
@@ -12,6 +12,6 @@ export declare const useAddress: ({ compatibleCountryCodes, onChange, onValidati
12
12
  addressErrors: SE.CodedError[] | undefined;
13
13
  addressPreference: Templates.AddressPreference | undefined;
14
14
  charsetWarning: Templates.CharsetWarning | undefined;
15
- handleChangeAddress: (shipTo: SE.Address, { shouldValidate }: Templates.OnChangeAddressOptions) => Promise<SE.SalesOrderShipment | undefined>;
16
- handleParseShipTo: ({ fullAddress }: Templates.AddressParserPayload) => Promise<SE.AddressParseResponse | undefined>;
15
+ handleChangeAddress: (shipTo: SE.Address, { shouldValidate }: Templates.OnChangeAddressOptions) => Promise<SE.SalesOrderShipment>;
16
+ handleParseShipTo: ({ fullAddress }: Templates.AddressParserPayload) => Promise<SE.AddressExtraction>;
17
17
  };
@@ -1,9 +1,9 @@
1
- import * as SE from "@shipengine/types";
1
+ import { SE } from "@shipengine/api";
2
2
  export type UseCustomsProps = {
3
3
  onUpdate?: (shipment: SE.SalesOrderShipment) => Promise<void> | void;
4
4
  shipment?: SE.SalesOrderShipment;
5
5
  };
6
6
  export declare const useCustoms: ({ onUpdate, shipment }: UseCustomsProps) => {
7
- customsErrors: SE.CodedError[] | undefined;
8
- handleUpdateCustoms: (customs: SE.Customs) => Promise<SE.SalesOrderShipment | undefined>;
7
+ customsErrors: SE.CodedError[] | null;
8
+ handleUpdateCustoms: (customs: SE.Customs) => Promise<SE.SalesOrderShipment>;
9
9
  };
@@ -1,4 +1,4 @@
1
- import * as SE from "@shipengine/types";
1
+ import { SE } from "@shipengine/api";
2
2
  import { ShippingPreset } from "../../../../types";
3
3
  export type UsePresetsProps = {
4
4
  onApply?: (preset: ShippingPreset, shipment: SE.SalesOrderShipment) => Promise<void> | void;
@@ -6,5 +6,5 @@ export type UsePresetsProps = {
6
6
  };
7
7
  export declare const usePresets: ({ onApply, shipment }: UsePresetsProps) => {
8
8
  handleApplyPreset: (preset: ShippingPreset) => Promise<void>;
9
- presetErrors: SE.CodedError[] | undefined;
9
+ presetErrors: SE.CodedError[] | null;
10
10
  };
@@ -1,4 +1,4 @@
1
- import * as SE from "@shipengine/types";
1
+ import { SE } from "@shipengine/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,10 +1,10 @@
1
- import * as SE from "@shipengine/types";
1
+ import { SE } from "@shipengine/api";
2
2
  export type UseRequestRatesProps = {
3
3
  onRatesCalculated?: (rates: SE.Rate[], shipment: SE.SalesOrderShipment) => Promise<void> | void;
4
4
  };
5
5
  export declare const useRequestRates: ({ onRatesCalculated }: UseRequestRatesProps) => {
6
6
  ratesCalculating: boolean;
7
- ratesErrors: SE.CodedError[] | undefined;
7
+ ratesErrors: SE.CodedError[] | null;
8
8
  ratesResponse: SE.RateResponse | undefined;
9
9
  requestRates: (shipment: SE.SalesOrderShipment) => Promise<void>;
10
10
  resetRates: () => void;
@@ -1,4 +1,4 @@
1
- import * as SE from "@shipengine/types";
1
+ import { SE } from "@shipengine/api";
2
2
  import { ShippingPreset } from "../../../../types";
3
3
  import { UseAddressProps } from "./use-address";
4
4
  import { UsePresetsProps } from "./use-presets";
@@ -16,15 +16,15 @@ export declare const useShipmentForm: ({ compatibleCountryCodes, onAddressValida
16
16
  addressPreference: import("../../../../components/templates").AddressPreference | undefined;
17
17
  carriers: SE.Carrier[] | undefined;
18
18
  charsetWarning: import("../../../../components/templates").CharsetWarning | undefined;
19
- customPackageTypes: SE.Package[] | undefined;
19
+ customPackageTypes: SE.CustomPackage[] | undefined;
20
20
  errors: SE.CodedError[] | undefined;
21
21
  onApplyPreset: (preset: ShippingPreset) => Promise<void>;
22
- onChangeAddress: (shipTo: SE.Address, { shouldValidate }: import("../../../../components/templates").OnChangeAddressOptions) => Promise<SE.SalesOrderShipment | undefined>;
23
- onSubmit: (values: Partial<SE.SalesOrderShipment>) => Promise<SE.SalesOrderShipment | undefined>;
22
+ onChangeAddress: (shipTo: SE.Address, { shouldValidate }: import("../../../../components/templates").OnChangeAddressOptions) => Promise<SE.SalesOrderShipment>;
23
+ onSubmit: (values: Partial<SE.SalesOrderShipment>) => Promise<SE.SalesOrderShipment>;
24
24
  onSubmitParseShipTo: ({ fullAddress }: {
25
25
  fullAddress: string;
26
- }) => Promise<SE.AddressParseResponse | undefined>;
27
- onUpdateCustoms: (customs: SE.Customs) => Promise<SE.SalesOrderShipment | undefined>;
26
+ }) => Promise<SE.AddressExtraction>;
27
+ onUpdateCustoms: (customs: SE.Customs) => Promise<SE.SalesOrderShipment>;
28
28
  salesOrder: SE.SalesOrder;
29
29
  shipment: SE.SalesOrderShipment | undefined;
30
30
  warehouses: SE.Warehouse[] | undefined;
@@ -1,8 +1,7 @@
1
- export * from "./add-carriers";
2
1
  export * from "./configure-shipment";
3
- export * from "./manage-funding";
2
+ export * from "./list-carriers";
4
3
  export * from "./manage-warehouses";
5
- export * from "./register-wallet";
4
+ export * from "./onboarding";
6
5
  export * from "./sales-order";
7
6
  export * from "./shipment";
8
7
  export * from "./void-label";
@@ -0,0 +1,11 @@
1
+ import { CarrierMetadata } from "../../../../types";
2
+ export type ConnectedCarrierMetadata = {
3
+ carrier: CarrierMetadata;
4
+ isConnected: boolean;
5
+ };
6
+ export declare const useListConnectedCarriers: () => {
7
+ data: ConnectedCarrierMetadata[];
8
+ error: import("@shipengine/api").CodedError[] | null;
9
+ isLoading: boolean;
10
+ refetch: <TPageData>(options?: (import("react-query").RefetchOptions & import("react-query").RefetchQueryFilters<TPageData>) | undefined) => Promise<import("react-query").QueryObserverResult<import("@shipengine/api").Carrier[], import("@shipengine/api").CodedError[]>>;
11
+ };
@@ -0,0 +1 @@
1
+ export * from "./list-carriers";
@@ -0,0 +1 @@
1
+ export declare const ListCarriers: () => import("@emotion/react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export * from "./onboarding";
@@ -0,0 +1,4 @@
1
+ export type OnboardingProps = {
2
+ onCompleteOnboarding: () => void;
3
+ };
4
+ export declare const Onboarding: ({ onCompleteOnboarding }: OnboardingProps) => import("@emotion/react/jsx-runtime").JSX.Element;
@@ -1,9 +1,10 @@
1
- import * as SE from "@shipengine/types";
1
+ import { SE } from "@shipengine/api";
2
2
  import { ConfigureShipmentProps } from "../../configure-shipment";
3
3
  import { UsePendingShipmentProps } from "./use-pending-shipment";
4
4
  export type UseConfigureShipmentProps = {
5
5
  onLoad?: UsePendingShipmentProps["onLoad"];
6
6
  onShipmentUpdated?: ConfigureShipmentProps["onShipmentUpdated"];
7
+ printLabelLayout?: SE.LabelLayout;
7
8
  salesOrder?: SE.SalesOrder;
8
9
  warehouseId?: UsePendingShipmentProps["warehouseId"];
9
10
  };
@@ -11,6 +12,7 @@ export declare const useConfigureShipment: ({ onLoad, onShipmentUpdated, salesOr
11
12
  errors: SE.CodedError[] | undefined;
12
13
  isLoading: boolean;
13
14
  onShipmentUpdated: (shipment: SE.SalesOrderShipment) => Promise<void>;
15
+ printLabelLayout: SE.LabelLayout;
14
16
  shipment: SE.SalesOrderShipment | undefined;
15
17
  warehouseId: string | undefined;
16
18
  };
@@ -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-types/src").CodedError[] | undefined;
8
+ errors: import("@shipengine/api").CodedError[] | undefined;
9
9
  isLoading: boolean;
10
- salesOrder: import("dist/shipengine-types/src").SalesOrder | undefined;
10
+ salesOrder: import("@shipengine/api").SalesOrder | undefined;
11
11
  };
@@ -1,4 +1,4 @@
1
- import * as SE from "@shipengine/types";
1
+ import { SE } from "@shipengine/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;
@@ -23,4 +23,4 @@ export type SalesOrderProps = {
23
23
  shippingPresets?: UseShippingPresetsOptionsProps;
24
24
  warehouseId?: UseConfigureShipmentProps["warehouseId"];
25
25
  };
26
- export declare const SalesOrder: ({ features, externalOrderId, externalOrderNumber, onLoad, onShipmentUpdated, orderSourceCode, salesOrderId, warehouseId, ...props }: SalesOrderProps) => import("@emotion/react/jsx-runtime").JSX.Element;
26
+ export declare const SalesOrder: ({ features, externalOrderId, externalOrderNumber, onLoad, onShipmentUpdated, orderSourceCode, salesOrderId, warehouseId, printLabelLayout, ...props }: SalesOrderProps) => import("@emotion/react/jsx-runtime").JSX.Element;
@@ -1,4 +1,4 @@
1
- import * as SE from "@shipengine/types";
1
+ import { SE } from "@shipengine/api";
2
2
  import { Templates } from "../../../components";
3
3
  export type ShipmentFeatures = {
4
4
  shipment?: Templates.ShipmentFeatures;
@@ -1,4 +1,4 @@
1
- import * as SE from "@shipengine/types";
1
+ import { SE } from "@shipengine/api";
2
2
  export type VoidLabelProps = {
3
3
  labelId?: string;
4
4
  onComplete: (request: SE.VoidRequest, shipment: SE.SalesOrderShipment) => void;
@@ -1,7 +1,6 @@
1
- export { Element as AddCarriers } from "./add-carriers";
2
- export { Element as ManageFunding } from "./manage-funding";
1
+ export { Element as ListCarriers } from "./list-carriers";
3
2
  export { Element as ManageWarehouses } from "./manage-warehouses";
4
3
  export { Element as PurchaseLabel } from "./purchase-label";
5
- export { Element as RegisterWallet } from "./register-wallet";
4
+ export { Element as Onboarding } from "./onboarding";
6
5
  export { Element as ViewShipment } from "./view-shipment";
7
6
  export { Element as VoidLabel } from "./void-label";
@@ -0,0 +1 @@
1
+ export declare const Element: (props: import("./components").OnboardingProps & Record<string, unknown>) => import("@emotion/react/jsx-runtime").JSX.Element;
@@ -1,5 +1,5 @@
1
1
  import { Factory } from "fishery";
2
- import * as SE from "@shipengine/types";
2
+ import { SE } from "@shipengine/api";
3
3
  export type AddressTransientParams = {
4
4
  isInternational?: boolean;
5
5
  };
@@ -1,5 +1,5 @@
1
1
  import { Factory } from "fishery";
2
- import * as SE from "@shipengine/types";
2
+ import { SE } from "@shipengine/api";
3
3
  /**
4
4
  * @category Factories
5
5
  */
@@ -1,5 +1,5 @@
1
1
  import { Factory } from "fishery";
2
- import * as SE from "@shipengine/types";
2
+ import { SE } from "@shipengine/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 * as SE from "@shipengine/types";
2
+ import { SE } from "@shipengine/api";
3
3
  export type MoneyTransientParams = {
4
4
  isInternational?: boolean;
5
5
  };
@@ -1,10 +1,18 @@
1
1
  import { Factory } from "fishery";
2
- import * as SE from "@shipengine/types";
2
+ import { SE } from "@shipengine/api";
3
3
  export declare const randomOrderSourceCode: () => SE.OrderSourceCode;
4
4
  /**
5
5
  * @category Factories
6
6
  */
7
- export declare const orderSourceRefreshInfoFactory: Factory<SE.OrderSourceRefreshInfo, any, SE.OrderSourceRefreshInfo>;
7
+ export declare const orderSourceRefreshInfoFactory: Factory<{
8
+ lastRefreshAttempt?: string | undefined;
9
+ refreshDate?: string | undefined;
10
+ status: SE.OrderSourceStatus;
11
+ }, any, {
12
+ lastRefreshAttempt?: string | undefined;
13
+ refreshDate?: string | undefined;
14
+ status: SE.OrderSourceStatus;
15
+ }>;
8
16
  /**
9
17
  * @category Factories
10
18
  */
@@ -1,9 +1,9 @@
1
1
  import { Factory } from "fishery";
2
- import * as SE from "@shipengine/types";
2
+ import { SE } from "@shipengine/api";
3
3
  export type PackageTransientParams = {
4
4
  noDimensions?: boolean;
5
5
  };
6
6
  /**
7
7
  * @category Factories
8
8
  */
9
- export declare const packageFactory: Factory<SE.Package, PackageTransientParams, SE.Package>;
9
+ export declare const packageFactory: Factory<SE.CarrierPackage, PackageTransientParams, SE.CarrierPackage>;
@@ -1,5 +1,5 @@
1
1
  import { Factory } from "fishery";
2
- import * as SE from "@shipengine/types";
2
+ import { SE } from "@shipengine/api";
3
3
  /**
4
4
  * @category Factories
5
5
  */
@@ -1,5 +1,5 @@
1
1
  import { Factory } from "fishery";
2
- import * as SE from "@shipengine/types";
2
+ import { SE } from "@shipengine/api";
3
3
  import { MoneyTransientParams } from "./money";
4
4
  export declare const randomPaymentStatus: () => SE.PaymentStatus;
5
5
  export declare const randomFulfillmentStatus: () => SE.FulfillmentStatus;
@@ -1,9 +1,9 @@
1
1
  import { Factory } from "fishery";
2
- import * as SE from "@shipengine/types";
2
+ import { SE } from "@shipengine/api";
3
3
  export type ServiceTransientParams = {
4
4
  carrier?: SE.Carrier;
5
5
  };
6
6
  /**
7
7
  * @category Factories
8
8
  */
9
- export declare const serviceFactory: Factory<SE.Service, ServiceTransientParams, SE.Service>;
9
+ export declare const serviceFactory: Factory<SE.CarrierService, ServiceTransientParams, SE.CarrierService>;
@@ -1,8 +1,8 @@
1
1
  import { Factory } from "fishery";
2
- import * as SE from "@shipengine/types";
2
+ import { SE } from "@shipengine/api";
3
3
  import { MoneyTransientParams } from "./money";
4
4
  export declare const randomDeliveryConfirmation: () => SE.ConfirmationType;
5
- export declare const randomInsuranceProvider: (allowNone?: boolean) => SE.InsuranceProvider;
5
+ export declare const randomInsuranceProvider: (allowNone?: boolean) => SE.InsuranceProviderType;
6
6
  /**
7
7
  * @category Factories
8
8
  */
@@ -10,7 +10,7 @@ export declare const customsItemFactory: Factory<SE.CustomsItem, MoneyTransientP
10
10
  /**
11
11
  * @category Factories
12
12
  */
13
- export declare const shipmentItemFactory: Factory<SE.ShipmentItem, any, SE.ShipmentItem>;
13
+ export declare const shipmentItemFactory: Factory<SE.SalesOrderShipmentItem, any, SE.SalesOrderShipmentItem>;
14
14
  export type ShipmentPackageTransientParams = {
15
15
  isInsured?: boolean;
16
16
  isShipped?: boolean;
@@ -25,7 +25,7 @@ export type ShipmentTransientParams = {
25
25
  isInternational?: boolean;
26
26
  isShipped?: boolean;
27
27
  salesOrder?: SE.SalesOrder;
28
- service?: SE.Service;
28
+ service?: SE.CarrierService;
29
29
  warehouse?: SE.Warehouse;
30
30
  };
31
31
  /**
@@ -1,5 +1,5 @@
1
1
  import { Factory } from "fishery";
2
- import * as SE from "@shipengine/types";
2
+ import { SE } from "@shipengine/api";
3
3
  /**
4
4
  * @category Factories
5
5
  */
@@ -1,5 +1,5 @@
1
1
  import { Factory } from "fishery";
2
- import * as SE from "@shipengine/types";
2
+ import { SE } from "@shipengine/api";
3
3
  export declare const randomWeightUnit: () => SE.WeightUnit;
4
4
  /**
5
5
  * @category Factories
package/hooks/index.d.ts CHANGED
@@ -5,3 +5,4 @@ export * from "./use-nested-form";
5
5
  export * from "./use-page-layout";
6
6
  export * from "./use-root-portal";
7
7
  export * from "./use-run-once-on-true";
8
+ export * from "./use-toggle";
@@ -1,4 +1,4 @@
1
- import * as SE from "@shipengine/types";
1
+ import { SE } from "@shipengine/api";
2
2
  export declare const useConfirmationOptions: () => {
3
3
  label: string;
4
4
  value: SE.ConfirmationType;
@@ -1,4 +1,4 @@
1
- import * as SE from "@shipengine/types";
1
+ import { SE } from "@shipengine/api";
2
2
  export declare const useCustomsContentsOptions: () => {
3
3
  label: string;
4
4
  value: SE.CustomsContentsType;
@@ -1,4 +1,4 @@
1
- import * as SE from "@shipengine/types";
1
+ import { SE } from "@shipengine/api";
2
2
  export declare const useCustomsNonDeliveryOptions: () => {
3
3
  label: string;
4
4
  value: SE.CustomsNonDeliveryType;
@@ -1,10 +1,10 @@
1
- import * as SE from "@shipengine/types";
1
+ import { SE } from "@shipengine/api";
2
2
  interface InsuranceFeatures {
3
3
  includeShipsuranceInsurance?: boolean;
4
4
  includeThirdPartyInsurance?: boolean;
5
5
  }
6
6
  export declare const useInsuranceProviderOptions: (insuranceAccount?: SE.InsuranceAccount, features?: InsuranceFeatures) => {
7
7
  label: string;
8
- value: SE.InsuranceProvider;
8
+ value: SE.InsuranceProviderType;
9
9
  }[];
10
10
  export {};
@@ -1,3 +1,3 @@
1
- import * as SE from "@shipengine/types";
1
+ import { SE } from "@shipengine/api";
2
2
  import { SelectCategory } from "../../components/field/select";
3
- export declare const usePackageOptions: (carriers?: SE.Carrier[], customPackageTypes?: SE.Package[], poBox?: boolean) => SelectCategory[] | undefined;
3
+ export declare const usePackageOptions: (carriers?: SE.Carrier[], customPackageTypes?: SE.CustomPackage[], poBox?: boolean) => SelectCategory[] | undefined;
@@ -1,4 +1,4 @@
1
- import * as SE from "@shipengine/types";
1
+ import { SE } from "@shipengine/api";
2
2
  export type RateOption = Omit<SE.Rate, "warningMessages"> & {
3
3
  balance?: number;
4
4
  messages: string[];
@@ -1,3 +1,3 @@
1
- import * as SE from "@shipengine/types";
1
+ import { SE } from "@shipengine/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 * as SE from "@shipengine/types";
1
+ import { SE } from "@shipengine/api";
2
2
  export declare const useWarehouseOptions: (warehouses?: SE.Warehouse[]) => {
3
3
  label: string;
4
4
  value: string;
@@ -1,6 +1,3 @@
1
+ import { CarrierConnection } from "@shipengine/api";
1
2
  import { CarrierMetadata } from "../types";
2
- type UseCarrierMetadataReturn = {
3
- carrierMetadatas: CarrierMetadata[];
4
- };
5
- export declare const useCarrierMetadata: () => UseCarrierMetadataReturn;
6
- export {};
3
+ export declare const useCarrierMetadata: (carrierCodes?: CarrierConnection["carrierCode"][]) => CarrierMetadata[];
@@ -2,7 +2,7 @@ import React from "react";
2
2
  export type NestedFormProps<T, U> = {
3
3
  formId: string;
4
4
  onCancel?: () => void;
5
- onSubmit: (payload: U) => Promise<void>;
5
+ onSubmit: (payload: U) => Promise<void> | void;
6
6
  } & T;
7
7
  /**
8
8
  * Returns a nested form element that can be rendered within another form
@@ -16,7 +16,7 @@ export type NestedFormProps<T, U> = {
16
16
  export declare const useNestedForm: <T, U>(form: React.FC<NestedFormProps<T, U>>, props: {
17
17
  formId: string;
18
18
  onCancel?: (() => void) | undefined;
19
- onSubmit: (payload: U) => Promise<void>;
19
+ onSubmit: (payload: U) => Promise<void> | void;
20
20
  } & T & {
21
21
  portalRef?: undefined;
22
22
  }) => readonly [import("@emotion/react/jsx-runtime").JSX.Element, boolean, React.DispatchWithoutAction];
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Create a boolean that can be toggled or set to a specific value
3
+ *
4
+ * @example
5
+ * ```tsx
6
+ * const [isOn, toggle] = useToggle();
7
+ * toggle(); // isOn = true
8
+ * toggle(); // isOn = false
9
+ * toggle(false); // isOn = false
10
+ * ```
11
+ */
12
+ export declare const useToggle: (initialValue?: boolean) => [boolean, React.DispatchWithoutAction & React.Dispatch<boolean>];