@shipengine/elements 0.11.1 → 0.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/accordion/accordion.d.ts +12 -0
- package/components/accordion/accordion.styles.d.ts +7 -0
- package/components/accordion/index.d.ts +1 -0
- package/components/button-group/button-group.d.ts +7 -0
- package/components/button-group/index.d.ts +1 -0
- package/components/cube/cube.d.ts +5 -0
- package/components/cube/index.d.ts +1 -0
- package/components/disclosure/disclosure.d.ts +9 -0
- package/components/disclosure/disclosure.styles.d.ts +1 -0
- package/components/disclosure/index.d.ts +1 -0
- package/components/error-boundary/error-boundary.d.ts +31 -0
- package/components/error-boundary/index.d.ts +1 -0
- package/components/field/checkbox-input/checkbox-input.d.ts +6 -0
- package/components/field/checkbox-input/index.d.ts +1 -0
- package/components/field/create-field-controller.d.ts +23 -0
- package/components/field/date-picker/date-picker.d.ts +7 -0
- package/components/field/date-picker/date-picker.styles.d.ts +3 -0
- package/components/field/date-picker/index.d.ts +1 -0
- package/components/field/field.styles.d.ts +7 -0
- package/components/field/fields.d.ts +11 -0
- package/components/field/index.d.ts +1 -0
- package/components/field/input-group/index.d.ts +1 -0
- package/components/field/input-group/input-group.d.ts +13 -0
- package/components/field/input-group/input-group.styles.d.ts +2 -0
- package/components/field/money-input/hooks/index.d.ts +1 -0
- package/components/field/money-input/hooks/use-utils.d.ts +6 -0
- package/components/field/money-input/index.d.ts +1 -0
- package/components/field/money-input/money-input-styles.d.ts +2 -0
- package/components/field/money-input/money-input.d.ts +30 -0
- package/components/field/number-input/index.d.ts +1 -0
- package/components/field/number-input/number-input.d.ts +10 -0
- package/components/field/rate-card/cost-breakdown/cost-breakdown.d.ts +11 -0
- package/components/field/rate-card/cost-breakdown/cost-breakdown.styles.d.ts +6 -0
- package/components/field/rate-card/cost-breakdown/index.d.ts +1 -0
- package/components/field/rate-card/index.d.ts +1 -0
- package/components/field/rate-card/rate-card.d.ts +12 -0
- package/components/field/rate-card/rate-card.styles.d.ts +21 -0
- package/components/field/rate-select/index.d.ts +1 -0
- package/components/field/rate-select/rate-select.d.ts +11 -0
- package/components/field/rate-select/rate-select.styles.d.ts +3 -0
- package/components/field/select/index.d.ts +1 -0
- package/components/field/select/select.d.ts +20 -0
- package/components/field/submit-button/index.d.ts +1 -0
- package/components/field/submit-button/submit-button.d.ts +13 -0
- package/components/field/switch/index.d.ts +1 -0
- package/components/field/switch/switch.d.ts +9 -0
- package/components/field/text-area/index.d.ts +1 -0
- package/components/field/text-area/text-area.d.ts +3 -0
- package/components/field/text-input/index.d.ts +1 -0
- package/components/field/text-input/text-input.d.ts +3 -0
- package/components/field-label/field-label.d.ts +9 -0
- package/components/field-label/index.d.ts +1 -0
- package/components/index.d.ts +11 -4
- package/components/items-breakdown/index.d.ts +1 -0
- package/components/items-breakdown/items-breakdown.d.ts +14 -0
- package/components/items-breakdown/items-breakdown.styles.d.ts +3 -0
- package/components/loader/index.d.ts +1 -0
- package/components/loader/loader.d.ts +2 -0
- package/components/organisms/auto-funding-form/auto-funding-form.d.ts +15 -0
- package/components/organisms/auto-funding-form/auto-funding-schema.d.ts +53 -0
- package/components/organisms/auto-funding-form/index.d.ts +1 -0
- package/components/organisms/index.d.ts +2 -0
- package/components/organisms/manual-funding-form/index.d.ts +1 -0
- package/components/organisms/manual-funding-form/manual-funding-form.d.ts +14 -0
- package/components/organisms/manual-funding-form/manual-funding-schema.d.ts +27 -0
- package/components/portal/index.d.ts +1 -0
- package/components/portal/portal.d.ts +13 -0
- package/components/preset-descriptor/index.d.ts +1 -0
- package/components/preset-descriptor/preset-descriptor.d.ts +2 -0
- package/components/preset-descriptor/preset-descriptor.styles.d.ts +6 -0
- package/components/settings-card/index.d.ts +1 -0
- package/components/settings-card/settings-card.d.ts +11 -0
- package/components/settings-card/settings-card.styles.d.ts +6 -0
- package/components/spacer/index.d.ts +1 -0
- package/components/spacer/spacer.d.ts +6 -0
- package/components/templates/add-carriers/add-carriers.d.ts +5 -0
- package/components/templates/add-carriers/index.d.ts +1 -0
- package/components/templates/address-display/address-display.d.ts +9 -0
- package/components/templates/address-display/index.d.ts +1 -0
- package/components/templates/address-form/address-form.d.ts +18 -0
- package/components/templates/address-form/address-schema.d.ts +250 -0
- package/components/templates/address-form/index.d.ts +2 -0
- package/components/templates/address-parser/address-parser-schema.d.ts +10 -0
- package/components/templates/address-parser/address-parser.d.ts +13 -0
- package/components/templates/address-parser/index.d.ts +2 -0
- package/components/templates/address-preference-display/address-preference-display.d.ts +16 -0
- package/components/templates/address-preference-display/index.d.ts +1 -0
- package/components/templates/agreement-form/agreement-form-schema.d.ts +10 -0
- package/components/templates/agreement-form/agreement-form.d.ts +8 -0
- package/components/templates/agreement-form/agreement-form.styles.d.ts +1 -0
- package/components/templates/agreement-form/index.d.ts +1 -0
- package/components/templates/billing-form/billing-form-stories.d.ts +6 -0
- package/components/templates/billing-form/billing-form.d.ts +9 -0
- package/components/templates/billing-form/billing-schema.d.ts +76 -0
- package/components/templates/billing-form/index.d.ts +2 -0
- package/components/templates/customs-item-form/customs-item-form-schema.d.ts +80 -0
- package/components/templates/customs-item-form/customs-item-form.d.ts +14 -0
- package/components/templates/customs-item-form/index.d.ts +2 -0
- package/components/templates/customs-items-display/customs-items-display.d.ts +7 -0
- package/components/templates/customs-items-display/customs-items-display.styles.d.ts +6 -0
- package/components/templates/customs-items-display/index.d.ts +1 -0
- package/components/templates/funding-methods/funding-methods.d.ts +10 -0
- package/components/templates/funding-methods/index.d.ts +1 -0
- package/components/templates/index.d.ts +16 -0
- package/components/templates/label/index.d.ts +1 -0
- package/components/templates/label/label.d.ts +12 -0
- package/components/templates/manage-warehouses/index.d.ts +1 -0
- package/components/templates/manage-warehouses/manage-warehouses.d.ts +5 -0
- package/components/templates/rate-form/index.d.ts +1 -0
- package/components/templates/rate-form/rate-form.d.ts +21 -0
- package/components/templates/rate-form/rate-schema.d.ts +30 -0
- package/components/templates/register-wallet/index.d.ts +1 -0
- package/components/templates/register-wallet/register-wallet.d.ts +3 -0
- package/components/templates/register-wallet/register-wallet.styles.d.ts +6 -0
- package/components/templates/sales-order/sales-order.d.ts +8 -0
- package/components/templates/shipment/shipment.d.ts +17 -0
- package/components/templates/shipment-form/index.d.ts +1 -0
- package/components/templates/shipment-form/shipment-form.d.ts +51 -0
- package/components/templates/shipment-form/shipment-schema.d.ts +943 -0
- package/components/templates/void-label/void-label.d.ts +9 -0
- package/components/templates/warehouse-display/index.d.ts +1 -0
- package/components/templates/warehouse-display/warehouse-display.d.ts +6 -0
- package/constants/index.d.ts +1 -0
- package/constants/shipengine/address.d.ts +39 -0
- package/constants/shipengine/index.d.ts +1 -0
- package/elements/add-carriers.d.ts +1 -0
- package/elements/components/add-carriers/add-carriers.d.ts +8 -0
- package/elements/components/add-carriers/index.d.ts +1 -0
- package/{components → elements/components}/configure-shipment/configure-shipment.d.ts +5 -4
- package/{components → elements/components}/configure-shipment/hooks/use-address.d.ts +4 -2
- package/{components → elements/components}/configure-shipment/hooks/use-presets.d.ts +1 -1
- package/{components → elements/components}/configure-shipment/hooks/use-shipment-form.d.ts +6 -5
- package/elements/components/index.d.ts +8 -0
- package/elements/components/manage-funding/index.d.ts +1 -0
- package/elements/components/manage-funding/manage-funding.d.ts +2 -0
- package/elements/components/manage-warehouses/index.d.ts +1 -0
- package/elements/components/manage-warehouses/manage-warehouses.d.ts +2 -0
- package/elements/components/register-wallet/index.d.ts +1 -0
- package/elements/components/register-wallet/register-wallet.d.ts +9 -0
- package/elements/components/sales-order/index.d.ts +1 -0
- package/{components → elements/components}/sales-order/sales-order.d.ts +3 -2
- package/elements/components/shipment/index.d.ts +1 -0
- package/{components → elements/components}/shipment/shipment.d.ts +1 -1
- package/elements/components/void-label/index.d.ts +1 -0
- package/elements/index.d.ts +7 -0
- package/elements/manage-funding.d.ts +1 -0
- package/elements/manage-warehouses.d.ts +1 -0
- package/elements/register-wallet.d.ts +1 -0
- package/extensions/index.d.ts +1 -0
- package/extensions/zod.d.ts +18 -0
- package/factories/index.d.ts +2 -0
- package/factories/shipengine/address.d.ts +28 -0
- package/factories/shipengine/carrier.d.ts +10 -0
- package/factories/shipengine/index.d.ts +12 -0
- package/factories/shipengine/label.d.ts +10 -0
- package/factories/shipengine/money.d.ts +9 -0
- package/factories/shipengine/order-source.d.ts +11 -0
- package/factories/shipengine/package.d.ts +9 -0
- package/factories/shipengine/resource.d.ts +10 -0
- package/factories/shipengine/sales-order.d.ts +16 -0
- package/factories/shipengine/service.d.ts +9 -0
- package/factories/shipengine/shipment.d.ts +38 -0
- package/factories/shipengine/warehouse.d.ts +6 -0
- package/factories/shipengine/weight.d.ts +15 -0
- package/factories/utils.d.ts +3 -0
- package/hooks/index.d.ts +7 -0
- package/hooks/options/index.d.ts +12 -0
- package/hooks/options/use-confirmation-options.d.ts +5 -0
- package/hooks/options/use-country-code-options.d.ts +4 -0
- package/hooks/options/use-customs-contents-options.d.ts +5 -0
- package/hooks/options/use-customs-non-delivery-options.d.ts +5 -0
- package/hooks/options/use-expiration-month-options.d.ts +4 -0
- package/hooks/options/use-insurance-provider-options.d.ts +10 -0
- package/hooks/options/use-package-options.d.ts +3 -0
- package/hooks/options/use-rate-options.d.ts +21 -0
- package/hooks/options/use-service-code-options.d.ts +3 -0
- package/hooks/options/use-shipping-presets-options.d.ts +19 -0
- package/hooks/options/use-state-code-options.d.ts +4 -0
- package/hooks/options/use-warehouse-options.d.ts +5 -0
- package/hooks/use-carrier-metadata.d.ts +6 -0
- package/hooks/use-elements.d.ts +36 -0
- package/hooks/use-nested-form.d.ts +22 -0
- package/hooks/use-page-layout.d.ts +11 -0
- package/hooks/use-root-portal.d.ts +19 -0
- package/hooks/use-run-once-on-true.d.ts +7 -0
- package/index.cjs +24035 -14817
- package/index.d.ts +12 -3
- package/index.js +24343 -15279
- package/locales/en/index.d.ts +386 -0
- package/locales/index.d.ts +1 -0
- package/package.json +24 -5
- package/providers/giger-provider.d.ts +8 -0
- package/providers/index.d.ts +1 -0
- package/register.d.ts +19 -0
- package/schemas/index.d.ts +1 -0
- package/schemas/shipengine/address.d.ts +17 -0
- package/schemas/shipengine/index.d.ts +3 -0
- package/schemas/shipengine/money.d.ts +15 -0
- package/schemas/shipengine/phone.d.ts +10 -0
- package/testing/index.d.ts +2 -0
- package/testing/render.d.ts +1 -0
- package/testing/swr.d.ts +15 -0
- package/types/carrier-metadata.d.ts +7 -0
- package/types/index.d.ts +2 -0
- package/types/shipping-preset/index.d.ts +1 -0
- package/types/shipping-preset/shipping-preset.d.ts +17 -0
- package/utilities/create-dictionary.d.ts +4 -0
- package/utilities/date.d.ts +24 -0
- package/utilities/error.d.ts +4 -0
- package/utilities/form-logger.d.ts +16 -0
- package/utilities/index.d.ts +11 -0
- package/utilities/money.d.ts +4 -0
- package/utilities/predicates/index.d.ts +1 -0
- package/utilities/predicates/isString.d.ts +1 -0
- package/utilities/rates.d.ts +9 -0
- package/utilities/shipengine/address.d.ts +21 -0
- package/utilities/shipengine/carrier.d.ts +1 -0
- package/utilities/shipengine/dimensions.d.ts +10 -0
- package/utilities/shipengine/index.d.ts +7 -0
- package/utilities/shipengine/package.d.ts +4 -0
- package/utilities/shipengine/sales-order.d.ts +13 -0
- package/utilities/shipengine/shipment.d.ts +13 -0
- package/utilities/shipengine/weight.d.ts +13 -0
- package/utilities/string.d.ts +1 -0
- package/utilities/styles.d.ts +18 -0
- package/utilities/validation.d.ts +10 -0
- /package/components/{sales-order → templates/sales-order}/index.d.ts +0 -0
- /package/components/{shipment → templates/shipment}/index.d.ts +0 -0
- /package/components/{void-label → templates/void-label}/index.d.ts +0 -0
- /package/{components → elements/components}/configure-shipment/hooks/index.d.ts +0 -0
- /package/{components → elements/components}/configure-shipment/hooks/use-customs.d.ts +0 -0
- /package/{components → elements/components}/configure-shipment/hooks/use-rates-form.d.ts +0 -0
- /package/{components → elements/components}/configure-shipment/hooks/use-request-rates.d.ts +0 -0
- /package/{components → elements/components}/configure-shipment/index.d.ts +0 -0
- /package/{components → elements/components}/sales-order/hooks/index.d.ts +0 -0
- /package/{components → elements/components}/sales-order/hooks/use-configure-shipment.d.ts +0 -0
- /package/{components → elements/components}/sales-order/hooks/use-import-sales-order.d.ts +0 -0
- /package/{components → elements/components}/sales-order/hooks/use-pending-shipment.d.ts +0 -0
- /package/{components → elements/components}/void-label/void-label.d.ts +0 -0
- /package/{purchase-label.d.ts → elements/purchase-label.d.ts} +0 -0
- /package/{view-shipment.d.ts → elements/view-shipment.d.ts} +0 -0
- /package/{void-label.d.ts → elements/void-label.d.ts} +0 -0
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as SE from "@shipengine/types";
|
|
2
|
+
export type VoidLabelProps = {
|
|
3
|
+
onComplete: (request: SE.VoidRequest, shipment: SE.SalesOrderShipment) => void;
|
|
4
|
+
onSubmit: () => Promise<void>;
|
|
5
|
+
onViewShipment: (shipment: SE.SalesOrderShipment) => void;
|
|
6
|
+
shipment?: SE.SalesOrderShipment;
|
|
7
|
+
voidRequest?: SE.VoidRequest;
|
|
8
|
+
};
|
|
9
|
+
export declare const VoidLabel: ({ onComplete, onSubmit, onViewShipment, shipment, voidRequest, }: VoidLabelProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./warehouse-display";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./shipengine";
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
export type CountryRules = {
|
|
2
|
+
hasProvinces?: boolean;
|
|
3
|
+
isUnitedStatesTerritory?: boolean;
|
|
4
|
+
supportsByoa?: boolean;
|
|
5
|
+
};
|
|
6
|
+
export declare class Country<T extends string, U extends string> {
|
|
7
|
+
name: T;
|
|
8
|
+
code: U;
|
|
9
|
+
hasProvinces: boolean;
|
|
10
|
+
isUnitedStatesTerritory: boolean;
|
|
11
|
+
supportsByoa: boolean;
|
|
12
|
+
constructor(name: T, code: U, rules?: CountryRules);
|
|
13
|
+
}
|
|
14
|
+
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
|
+
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
|
+
export type CountryCode = typeof countryCodes[number];
|
|
17
|
+
export type UsStateRules = {
|
|
18
|
+
isMilitary?: boolean;
|
|
19
|
+
isUnitedStatesTerritory?: boolean;
|
|
20
|
+
};
|
|
21
|
+
export declare class UsState<T extends string, U extends string> {
|
|
22
|
+
name: T;
|
|
23
|
+
code: U;
|
|
24
|
+
isMilitary: boolean;
|
|
25
|
+
isUnitedStatesTerritory: boolean;
|
|
26
|
+
constructor(name: T, code: U, rules?: UsStateRules);
|
|
27
|
+
}
|
|
28
|
+
export declare const usStates: readonly [UsState<"Alabama", "AL">, UsState<"Alaska", "AK">, UsState<"American Samoa", "AS">, UsState<"Arizona", "AZ">, UsState<"Arkansas", "AR">, UsState<"Armed Forces Americas", "AA">, UsState<"Armed Forces Europe", "AE">, UsState<"Armed Forces Pacific", "AP">, UsState<"California", "CA">, UsState<"Colorado", "CO">, UsState<"Connecticut", "CT">, UsState<"Delaware", "DE">, UsState<"District of Columbia", "DC">, UsState<"Florida", "FL">, UsState<"Georgia", "GA">, UsState<"Guam", "GU">, UsState<"Hawaii", "HI">, UsState<"Idaho", "ID">, UsState<"Illinois", "IL">, UsState<"Indiana", "IN">, UsState<"Iowa", "IA">, UsState<"Kansas", "KS">, UsState<"Kentucky", "KY">, UsState<"Louisiana", "LA">, UsState<"Maine", "ME">, UsState<"Maryland", "MD">, UsState<"Massachusetts", "MA">, UsState<"Michigan", "MI">, UsState<"Minnesota", "MN">, UsState<"Mississippi", "MS">, UsState<"Missouri", "MO">, UsState<"Montana", "MT">, UsState<"Nebraska", "NE">, UsState<"Nevada", "NV">, UsState<"New Hampshire", "NH">, UsState<"New Jersey", "NJ">, UsState<"New Mexico", "NM">, UsState<"New York", "NY">, UsState<"North Carolina", "NC">, UsState<"North Dakota", "ND">, UsState<"Ohio", "OH">, UsState<"Oklahoma", "OK">, UsState<"Oregon", "OR">, UsState<"Pennsylvania", "PA">, UsState<"Puerto Rico", "PR">, UsState<"Rhode Island", "RI">, UsState<"South Carolina", "SC">, UsState<"South Dakota", "SD">, UsState<"Tennessee", "TN">, UsState<"Texas", "TX">, UsState<"Utah", "UT">, UsState<"Vermont", "VT">, UsState<"Virgin Islands", "VI">, UsState<"Virginia", "VA">, UsState<"Washington", "WA">, UsState<"West Virginia", "WV">, UsState<"Wisconsin", "WI">, UsState<"Wyoming", "WY">, UsState<"Northern Mariana Islands", "MP">, UsState<"U.S. Minor Outlying Islands", "UM">];
|
|
29
|
+
export declare const usStateCodes: ["AL", "AK", "AS", "AZ", "AR", "AA", "AE", "AP", "CA", "CO", "CT", "DE", "DC", "FL", "GA", "GU", "HI", "ID", "IL", "IN", "IA", "KS", "KY", "LA", "ME", "MD", "MA", "MI", "MN", "MS", "MO", "MT", "NE", "NV", "NH", "NJ", "NM", "NY", "NC", "ND", "OH", "OK", "OR", "PA", "PR", "RI", "SC", "SD", "TN", "TX", "UT", "VT", "VI", "VA", "WA", "WV", "WI", "WY", "MP", "UM"];
|
|
30
|
+
export type UsaCityRules = {
|
|
31
|
+
isMilitary?: boolean;
|
|
32
|
+
};
|
|
33
|
+
export declare class UsaCity<T extends string, U extends string> {
|
|
34
|
+
name: T;
|
|
35
|
+
code: U;
|
|
36
|
+
isMilitary: boolean;
|
|
37
|
+
constructor(name: T, code: U, rules?: UsaCityRules);
|
|
38
|
+
}
|
|
39
|
+
export declare const usCities: readonly [UsaCity<"Army Post Office", "APO">, UsaCity<"Diplomatic Post Office", "DPO">, UsaCity<"Fleet Post Office", "FPO">];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./address";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const Element: (props: import("./components").AddCarriersProps & Record<string, unknown>) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { CarriersFeatures } from "../../../types";
|
|
2
|
+
export type AddCarriersFeatures = {
|
|
3
|
+
carriers?: CarriersFeatures;
|
|
4
|
+
};
|
|
5
|
+
export type AddCarriersProps = {
|
|
6
|
+
features?: AddCarriersFeatures;
|
|
7
|
+
};
|
|
8
|
+
export declare const AddCarriers: ({ features }: AddCarriersProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './add-carriers';
|
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
import { Templates } from "@shipengine/elements-ui";
|
|
2
1
|
import * as SE from "@shipengine/types";
|
|
3
|
-
import { UseShippingPresetsOptionsProps } from "
|
|
2
|
+
import { UseShippingPresetsOptionsProps } from "../../../hooks";
|
|
3
|
+
import { Templates } from "../../../components";
|
|
4
4
|
import { UseRatesFormProps, UseShipmentFormProps } from "./hooks";
|
|
5
5
|
export type ShipmentFormMode = "browse_rates" | "select_service";
|
|
6
|
-
export type
|
|
6
|
+
export type ConfigureShipmentFeatures = {
|
|
7
|
+
compatibleCountryCodes?: UseShipmentFormProps["compatibleCountryCodes"];
|
|
7
8
|
rateForm?: Templates.RateFormFeatures;
|
|
8
9
|
shipmentForm?: Templates.ShipmentFormFeatures;
|
|
9
10
|
};
|
|
10
11
|
export type ConfigureShipmentProps = {
|
|
11
12
|
errors?: Templates.ShipmentFormProps["errors"];
|
|
12
|
-
features?:
|
|
13
|
+
features?: ConfigureShipmentFeatures;
|
|
13
14
|
isLoading?: Templates.ShipmentFormProps["isLoading"];
|
|
14
15
|
onAddressValidation?: UseShipmentFormProps["onAddressValidation"];
|
|
15
16
|
onApplyPreset?: UseShipmentFormProps["onApplyPreset"];
|
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
import { Templates } from "@shipengine/elements-ui";
|
|
2
1
|
import * as SE from "@shipengine/types";
|
|
2
|
+
import { CountryCode } from "../../../../constants";
|
|
3
|
+
import { Templates } from "../../../../components";
|
|
3
4
|
export type UseAddressProps = {
|
|
5
|
+
compatibleCountryCodes?: CountryCode[];
|
|
4
6
|
onChange?: (oldShipment: SE.SalesOrderShipment, updatedShipment: SE.SalesOrderShipment) => Promise<void> | void;
|
|
5
7
|
onValidation?: (addressPreference: Templates.AddressPreference) => Promise<void> | void;
|
|
6
8
|
salesOrder: SE.SalesOrder;
|
|
7
9
|
shipment?: SE.SalesOrderShipment;
|
|
8
10
|
};
|
|
9
|
-
export declare const useAddress: ({ onChange, onValidation, salesOrder, shipment }: UseAddressProps) => {
|
|
11
|
+
export declare const useAddress: ({ compatibleCountryCodes, onChange, onValidation, salesOrder, shipment, }: UseAddressProps) => {
|
|
10
12
|
addressErrors: SE.CodedError[] | undefined;
|
|
11
13
|
addressPreference: Templates.AddressPreference | undefined;
|
|
12
14
|
charsetWarning: Templates.CharsetWarning | undefined;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ShippingPreset } from "
|
|
1
|
+
import { ShippingPreset } from "../../../../types";
|
|
2
2
|
import * as SE from "@shipengine/types";
|
|
3
3
|
export type UsePresetsProps = {
|
|
4
4
|
onApply?: (preset: ShippingPreset, shipment: SE.SalesOrderShipment) => Promise<void> | void;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { ShippingPreset } from "
|
|
1
|
+
import { ShippingPreset } from "../../../../types";
|
|
2
2
|
import * as SE from "@shipengine/types";
|
|
3
3
|
import { UseAddressProps } from "./use-address";
|
|
4
4
|
import { UsePresetsProps } from "./use-presets";
|
|
5
5
|
export type UseShipmentFormProps = {
|
|
6
|
+
compatibleCountryCodes?: UseAddressProps["compatibleCountryCodes"];
|
|
6
7
|
onAddressValidation?: UseAddressProps["onValidation"];
|
|
7
8
|
onApplyPreset?: UsePresetsProps["onApply"];
|
|
8
9
|
onChangeAddress?: UseAddressProps["onChange"];
|
|
@@ -11,14 +12,14 @@ export type UseShipmentFormProps = {
|
|
|
11
12
|
salesOrder: SE.SalesOrder;
|
|
12
13
|
shipment?: SE.SalesOrderShipment;
|
|
13
14
|
};
|
|
14
|
-
export declare const useShipmentForm: ({ onAddressValidation, onApplyPreset, onChangeAddress, onShipmentUpdated, onSubmit, salesOrder, shipment, }: UseShipmentFormProps) => {
|
|
15
|
-
addressPreference: import("
|
|
16
|
-
charsetWarning: import("
|
|
15
|
+
export declare const useShipmentForm: ({ compatibleCountryCodes, onAddressValidation, onApplyPreset, onChangeAddress, onShipmentUpdated, onSubmit, salesOrder, shipment, }: UseShipmentFormProps) => {
|
|
16
|
+
addressPreference: import("../../../../components/templates").AddressPreference | undefined;
|
|
17
|
+
charsetWarning: import("../../../../components/templates").CharsetWarning | undefined;
|
|
17
18
|
carriers: SE.Carrier[] | undefined;
|
|
18
19
|
customPackageTypes: SE.Package[] | undefined;
|
|
19
20
|
errors: SE.CodedError[] | undefined;
|
|
20
21
|
onApplyPreset: (preset: ShippingPreset) => Promise<void>;
|
|
21
|
-
onChangeAddress: (shipTo: SE.Address, { shouldValidate }: import("
|
|
22
|
+
onChangeAddress: (shipTo: SE.Address, { shouldValidate }: import("../../../../components/templates").OnChangeAddressOptions) => Promise<SE.SalesOrderShipment | undefined>;
|
|
22
23
|
onSubmit: (values: Partial<SE.SalesOrderShipment>) => Promise<SE.SalesOrderShipment | undefined>;
|
|
23
24
|
onSubmitParseShipTo: ({ fullAddress }: {
|
|
24
25
|
fullAddress: string;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export * from "./add-carriers";
|
|
2
|
+
export * from "./configure-shipment";
|
|
3
|
+
export * from "./manage-funding";
|
|
4
|
+
export * from "./manage-warehouses";
|
|
5
|
+
export * from "./register-wallet";
|
|
6
|
+
export * from "./sales-order";
|
|
7
|
+
export * from "./shipment";
|
|
8
|
+
export * from "./void-label";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./manage-funding";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./manage-warehouses";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./register-wallet";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Templates } from "../../../components";
|
|
2
|
+
export type WalletFeatures = {
|
|
3
|
+
wallet?: Templates.RegisterWalletFeatures;
|
|
4
|
+
};
|
|
5
|
+
export type RegisterWalletProps = {
|
|
6
|
+
features: WalletFeatures;
|
|
7
|
+
onRegisterWallet: () => void;
|
|
8
|
+
};
|
|
9
|
+
export declare const RegisterWallet: ({ features, onRegisterWallet }: RegisterWalletProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./sales-order";
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { UseShippingPresetsOptionsProps } from "
|
|
1
|
+
import { UseShippingPresetsOptionsProps } from "../../../hooks";
|
|
2
2
|
import { ConfigureShipmentProps } from "../configure-shipment";
|
|
3
3
|
import { UseConfigureShipmentProps, UseImportSalesOrderProps } from "./hooks";
|
|
4
4
|
export type SalesOrderProps = {
|
|
5
5
|
externalOrderId?: UseImportSalesOrderProps["externalOrderId"];
|
|
6
6
|
externalOrderNumber?: UseImportSalesOrderProps["externalOrderNumber"];
|
|
7
|
+
features?: ConfigureShipmentProps["features"];
|
|
7
8
|
onAddressValidation?: ConfigureShipmentProps["onAddressValidation"];
|
|
8
9
|
onApplyPreset?: ConfigureShipmentProps["onApplyPreset"];
|
|
9
10
|
onBeforeLabelCreate?: ConfigureShipmentProps["onBeforeLabelCreate"];
|
|
@@ -22,4 +23,4 @@ export type SalesOrderProps = {
|
|
|
22
23
|
shippingPresets?: UseShippingPresetsOptionsProps;
|
|
23
24
|
warehouseId?: UseConfigureShipmentProps["warehouseId"];
|
|
24
25
|
};
|
|
25
|
-
export declare const SalesOrder: ({ 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, ...props }: SalesOrderProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./shipment";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./void-label";
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { Element as AddCarriers } from "./add-carriers";
|
|
2
|
+
export { Element as ManageFunding } from "./manage-funding";
|
|
3
|
+
export { Element as ManageWarehouses } from "./manage-warehouses";
|
|
4
|
+
export { Element as PurchaseLabel } from "./purchase-label";
|
|
5
|
+
export { Element as RegisterWallet } from "./register-wallet";
|
|
6
|
+
export { Element as ViewShipment } from "./view-shipment";
|
|
7
|
+
export { Element as VoidLabel } from "./void-label";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const Element: (props: Record<string, unknown>) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const Element: (props: Record<string, unknown>) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const Element: (props: import("./components").RegisterWalletProps & Record<string, unknown>) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./zod";
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
declare function nullishDefault<T extends z.ZodTypeAny, U>(this: T, defaultValue: U): z.ZodEffects<z.ZodNullable<z.ZodOptional<T>>, U | NonNullable<T["_output"]>, T["_input"] | null | undefined>;
|
|
3
|
+
declare module "zod" {
|
|
4
|
+
interface ZodString {
|
|
5
|
+
nullishDefault: typeof nullishDefault;
|
|
6
|
+
}
|
|
7
|
+
interface ZodNumber {
|
|
8
|
+
nullishDefault: typeof nullishDefault;
|
|
9
|
+
}
|
|
10
|
+
interface ZodObject<T extends z.ZodRawShape, UnknownKeys extends "passthrough" | "strict" | "strip" = "strip", Catchall extends z.ZodTypeAny = z.ZodTypeAny, Output = z.objectOutputType<T, Catchall>, Input = z.objectInputType<T, Catchall>> {
|
|
11
|
+
nullishDefault: typeof nullishDefault;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* @category Form Validation
|
|
16
|
+
*/
|
|
17
|
+
export declare const extendZod: () => void;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Factory } from "fishery";
|
|
2
|
+
import * as SE from "@shipengine/types";
|
|
3
|
+
export type AddressTransientParams = {
|
|
4
|
+
isInternational?: boolean;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* @category Factories
|
|
8
|
+
*/
|
|
9
|
+
export declare const addressFactory: Factory<SE.Address, AddressTransientParams, SE.Address>;
|
|
10
|
+
/**
|
|
11
|
+
* @category Factories
|
|
12
|
+
*/
|
|
13
|
+
export declare const addressValidationFactory: Factory<SE.AddressValidation, any, SE.AddressValidation>;
|
|
14
|
+
type AddressPreference = SE.AddressValidation & {
|
|
15
|
+
alternative?: SE.Address;
|
|
16
|
+
alternativeSource: "originalAddress" | "matchedAddress";
|
|
17
|
+
isModified: boolean;
|
|
18
|
+
toggle: () => SE.Address;
|
|
19
|
+
selection: SE.Address;
|
|
20
|
+
selectionSource: "originalAddress" | "matchedAddress";
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* Mock the addressValidation object used to hyrdate address valiation feature
|
|
24
|
+
* on the shipment form.
|
|
25
|
+
* @category Factory
|
|
26
|
+
*/
|
|
27
|
+
export declare const addressPreferenceFactory: Factory<AddressPreference, any, AddressPreference>;
|
|
28
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Factory } from "fishery";
|
|
2
|
+
import * as SE from "@shipengine/types";
|
|
3
|
+
/**
|
|
4
|
+
* @category Factories
|
|
5
|
+
*/
|
|
6
|
+
export declare const carrierOptionFactory: Factory<SE.CarrierOption, any, SE.CarrierOption>;
|
|
7
|
+
/**
|
|
8
|
+
* @category Factories
|
|
9
|
+
*/
|
|
10
|
+
export declare const carrierFactory: Factory<SE.Carrier, any, SE.Carrier>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export * from "./address";
|
|
2
|
+
export * from "./carrier";
|
|
3
|
+
export * from "./label";
|
|
4
|
+
export * from "./money";
|
|
5
|
+
export * from "./order-source";
|
|
6
|
+
export * from "./package";
|
|
7
|
+
export * from "./resource";
|
|
8
|
+
export * from "./sales-order";
|
|
9
|
+
export * from "./service";
|
|
10
|
+
export * from "./shipment";
|
|
11
|
+
export * from "./warehouse";
|
|
12
|
+
export * from "./weight";
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Factory } from "fishery";
|
|
2
|
+
import * as SE from "@shipengine/types";
|
|
3
|
+
export type LabelTransientParams = {
|
|
4
|
+
carrier: SE.Carrier;
|
|
5
|
+
shipment: SE.SalesOrderShipment;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* @category Factories
|
|
9
|
+
*/
|
|
10
|
+
export declare const labelFactory: Factory<SE.Label, LabelTransientParams, SE.Label>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Factory } from "fishery";
|
|
2
|
+
import * as SE from "@shipengine/types";
|
|
3
|
+
export type MoneyTransientParams = {
|
|
4
|
+
isInternational?: boolean;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* @category Factories
|
|
8
|
+
*/
|
|
9
|
+
export declare const moneyFactory: Factory<SE.Money, MoneyTransientParams, SE.Money>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Factory } from "fishery";
|
|
2
|
+
import * as SE from "@shipengine/types";
|
|
3
|
+
export declare const randomOrderSourceCode: () => SE.OrderSourceCode;
|
|
4
|
+
/**
|
|
5
|
+
* @category Factories
|
|
6
|
+
*/
|
|
7
|
+
export declare const orderSourceRefreshInfoFactory: Factory<SE.OrderSourceRefreshInfo, any, SE.OrderSourceRefreshInfo>;
|
|
8
|
+
/**
|
|
9
|
+
* @category Factories
|
|
10
|
+
*/
|
|
11
|
+
export declare const orderSourceFactory: Factory<SE.OrderSource, any, SE.OrderSource>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Factory } from "fishery";
|
|
2
|
+
import * as SE from "@shipengine/types";
|
|
3
|
+
export type PackageTransientParams = {
|
|
4
|
+
noDimensions?: boolean;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* @category Factories
|
|
8
|
+
*/
|
|
9
|
+
export declare const packageFactory: Factory<SE.Package, PackageTransientParams, SE.Package>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Factory } from "fishery";
|
|
2
|
+
import * as SE from "@shipengine/types";
|
|
3
|
+
/**
|
|
4
|
+
* @category Factories
|
|
5
|
+
*/
|
|
6
|
+
export declare const downloadFactory: Factory<SE.Download, any, SE.Download>;
|
|
7
|
+
/**
|
|
8
|
+
* @category Factories
|
|
9
|
+
*/
|
|
10
|
+
export declare const linkedResourceFactory: Factory<SE.LinkedResource, any, SE.LinkedResource>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Factory } from "fishery";
|
|
2
|
+
import { MoneyTransientParams } from "./money";
|
|
3
|
+
import * as SE from "@shipengine/types";
|
|
4
|
+
export declare const randomPaymentStatus: () => SE.PaymentStatus;
|
|
5
|
+
export declare const randomFulfillmentStatus: () => SE.FulfillmentStatus;
|
|
6
|
+
/**
|
|
7
|
+
* @category Factories
|
|
8
|
+
*/
|
|
9
|
+
export declare const salesOrderItemFactory: Factory<SE.SalesOrderItem, MoneyTransientParams, SE.SalesOrderItem>;
|
|
10
|
+
export type SalesOrderTransientParams = {
|
|
11
|
+
isInternational?: boolean;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* @category Factories
|
|
15
|
+
*/
|
|
16
|
+
export declare const salesOrderFactory: Factory<SE.SalesOrder, SalesOrderTransientParams, SE.SalesOrder>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Factory } from "fishery";
|
|
2
|
+
import * as SE from "@shipengine/types";
|
|
3
|
+
export type ServiceTransientParams = {
|
|
4
|
+
carrier?: SE.Carrier;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* @category Factories
|
|
8
|
+
*/
|
|
9
|
+
export declare const serviceFactory: Factory<SE.Service, ServiceTransientParams, SE.Service>;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { Factory } from "fishery";
|
|
2
|
+
import { MoneyTransientParams } from "./money";
|
|
3
|
+
import * as SE from "@shipengine/types";
|
|
4
|
+
export declare const randomDeliveryConfirmation: () => SE.ConfirmationType;
|
|
5
|
+
export declare const randomInsuranceProvider: (allowNone?: boolean) => SE.InsuranceProvider;
|
|
6
|
+
/**
|
|
7
|
+
* @category Factories
|
|
8
|
+
*/
|
|
9
|
+
export declare const customsItemFactory: Factory<SE.CustomsItem, MoneyTransientParams, SE.CustomsItem>;
|
|
10
|
+
/**
|
|
11
|
+
* @category Factories
|
|
12
|
+
*/
|
|
13
|
+
export declare const shipmentItemFactory: Factory<SE.ShipmentItem, any, SE.ShipmentItem>;
|
|
14
|
+
export type ShipmentPackageTransientParams = {
|
|
15
|
+
isInsured?: boolean;
|
|
16
|
+
isShipped?: boolean;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* @category Factories
|
|
20
|
+
*/
|
|
21
|
+
export declare const shipmentPackageFactory: Factory<SE.ShipmentPackage, ShipmentPackageTransientParams, SE.ShipmentPackage>;
|
|
22
|
+
export type ShipmentTransientParams = {
|
|
23
|
+
insuredValue?: number;
|
|
24
|
+
isInsured?: boolean;
|
|
25
|
+
isInternational?: boolean;
|
|
26
|
+
isShipped?: boolean;
|
|
27
|
+
service?: SE.Service;
|
|
28
|
+
salesOrder?: SE.SalesOrder;
|
|
29
|
+
warehouse?: SE.Warehouse;
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* @category Factories
|
|
33
|
+
*/
|
|
34
|
+
export declare const shipmentFactory: Factory<SE.Shipment, ShipmentTransientParams, SE.Shipment>;
|
|
35
|
+
/**
|
|
36
|
+
* @category Factories
|
|
37
|
+
*/
|
|
38
|
+
export declare const salesOrderShipmentFactory: Factory<SE.SalesOrderShipment, ShipmentTransientParams, SE.SalesOrderShipment>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Factory } from "fishery";
|
|
2
|
+
import * as SE from "@shipengine/types";
|
|
3
|
+
export declare const randomWeightUnit: () => SE.WeightUnit;
|
|
4
|
+
/**
|
|
5
|
+
* @category Factories
|
|
6
|
+
*/
|
|
7
|
+
export declare const fractionalWeightFactory: Factory<SE.FractionalWeight, any, SE.FractionalWeight>;
|
|
8
|
+
/**
|
|
9
|
+
* @category Factories
|
|
10
|
+
*/
|
|
11
|
+
export declare const weightFactory: Factory<SE.Weight, any, SE.Weight>;
|
|
12
|
+
/**
|
|
13
|
+
* @category Factories
|
|
14
|
+
*/
|
|
15
|
+
export declare const weightWithUnitFactory: Factory<SE.WeightWithUnit, any, SE.WeightWithUnit>;
|
package/hooks/index.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export * from "./use-confirmation-options";
|
|
2
|
+
export * from "./use-country-code-options";
|
|
3
|
+
export * from "./use-customs-contents-options";
|
|
4
|
+
export * from "./use-customs-non-delivery-options";
|
|
5
|
+
export * from "./use-expiration-month-options";
|
|
6
|
+
export * from "./use-insurance-provider-options";
|
|
7
|
+
export * from "./use-package-options";
|
|
8
|
+
export * from "./use-rate-options";
|
|
9
|
+
export * from "./use-service-code-options";
|
|
10
|
+
export * from "./use-shipping-presets-options";
|
|
11
|
+
export * from "./use-state-code-options";
|
|
12
|
+
export * from "./use-warehouse-options";
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare const useCountryCodeOptions: (domestic?: boolean) => {
|
|
2
|
+
label: "Afghanistan" | "Aland Islands" | "Albania" | "Algeria" | "American Samoa" | "Andorra" | "Angola" | "Anguilla" | "Antarctica" | "Antigua Barbuda" | "Argentina" | "Armenia" | "Aruba" | "Australia" | "Austria" | "Azerbaijan" | "Bahamas" | "Bahrain" | "Bangladesh" | "Barbados" | "Belarus" | "Belgium" | "Belize" | "Benin" | "Bermuda" | "Bhutan" | "Bolivia" | "Bonaire, Sint Eustatius And Saba" | "Bosnia and Herzegovina" | "Botswana" | "Brazil" | "British Indian Ocean Territory" | "British Virgin Islands" | "Brunei Darussalam" | "Bulgaria" | "Burkina Faso" | "Burundi" | "Canada" | "Cambodia" | "Cameroon" | "Cape Verde Islands" | "Cayman Islands" | "Central African Republic" | "Chad" | "Chile" | "China" | "Christmas Island" | "Cocos(Keeling) Islands" | "Colombia" | "Comoros" | "Congo" | "Congo, The Democratic Republic of" | "Cook Islands" | "Costa Rica" | "Croatia" | "Cuba" | "Curacao" | "Cyprus" | "Czech Republic" | "Denmark" | "Djibouti" | "Dominica" | "Dominican Republic" | "Ecuador" | "Egypt" | "El Salvador" | "Equatorial Guinea" | "Eritrea" | "Estonia" | "Ethiopia" | "Falkland Islands" | "Faroe Islands" | "Federated States of Micronesia" | "Fiji" | "Finland" | "France" | "French Guiana" | "French Polynesia" | "French Southern Territories" | "Gabon" | "Gambia" | "Georgia" | "Germany" | "Ghana" | "Gibraltar" | "Greece" | "Greenland" | "Grenada" | "Guadeloupe" | "Guam" | "Guatemala" | "Guernsey" | "Guinea" | "Guinea - Bissau" | "Guyana" | "Haiti" | "Holy See" | "Honduras" | "Hong Kong" | "Hungary" | "Iceland" | "India" | "Indonesia" | "Iran" | "Iraq" | "Ireland" | "Isle of Man" | "Israel" | "Italy" | "Ivory Coast" | "Jamaica" | "Japan" | "Jersey" | "Jordan" | "Kazakhstan" | "Kenya" | "Kiribati" | "Korea, Republic of" | "Kuwait" | "Kyrgyzstan" | "Laos" | "Latvia" | "Lebanon" | "Lesotho" | "Liberia" | "Libya" | "Liechtenstein" | "Lithuania" | "Luxembourg" | "Macao" | "Macedonia" | "Madagascar" | "Malawi" | "Malaysia" | "Maldives" | "Mali" | "Malta" | "Marshall Islands" | "Martinique" | "Mauritania" | "Mauritius0" | "Mayotte" | "Mexico" | "Moldova" | "Monaco" | "Mongolia" | "Montenegro" | "Montserrat" | "Morocco" | "Mozambique" | "Myanmar" | "Namibia" | "Nauru" | "Nepal" | "Netherlands" | "Netherlands Antilles" | "New Caledonia" | "New Zealand" | "Nicaragua" | "Niger" | "Nigeria" | "Niue" | "Norfolk Island" | "North Korea" | "Northern Mariana Islands" | "Norway" | "Oman" | "Pakistan" | "Palau" | "Palestinian Territory" | "Panama" | "Papua New Guinea" | "Paraguay" | "Peru" | "Philippines" | "Pitcairn Island" | "Poland" | "Portugal" | "Puerto Rico" | "Qatar" | "Reunion" | "Romania" | "Russia" | "Rwanda" | "Saint Barthelemy" | "Saint Helena" | "Saint Kitts and Nevis" | "Saint Lucia" | "Saint Martin" | "Saint Pierre and Miquelon" | "Saint Vincent & the Grenadines" | "Samoa" | "San Marino" | "Sao Tome and Principe" | "Saudi Arabia" | "Senegal" | "Serbia" | "Seychelles" | "Sierra Leone" | "Singapore" | "Sint Maarten(Dutch)" | "Slovakia" | "Slovenia" | "Solomon Islands" | "Somalia" | "South Africa" | "South Georgia & the South Sandwich Islands" | "South Sudan" | "Spain" | "Sri Lanka" | "Sudan" | "Suriname" | "Svalbard & Jan Mayen Islands" | "Swaziland" | "Sweden" | "Switzerland" | "Syria" | "Taiwan" | "Tajikistan" | "Tanzania" | "Thailand" | "Timor - Leste(formerly East Timor)" | "Togo" | "Tokelau" | "Tonga" | "Trinidad and Tobago" | "Tunisia" | "Turkey" | "Turkmenistan" | "Turks and Caicos Islands" | "Tuvalu" | "Uganda" | "Ukraine" | "United Arab Emirates" | "United Kingdom" | "United States Virgin Islands" | "U.S. Minor Outlying Islands" | "United States of America" | "Uruguay" | "Uzbekistan" | "Vanuatu" | "Venezuela" | "Vietnam" | "Wallis and Futuna Islands" | "Western Sahara" | "Yemen" | "Zambia" | "Zimbabwe";
|
|
3
|
+
value: "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";
|
|
4
|
+
}[];
|