@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,10 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const agreementFormSchema: z.ZodObject<{
|
|
3
|
+
agreement: z.ZodLiteral<boolean>;
|
|
4
|
+
}, "strip", z.ZodTypeAny, {
|
|
5
|
+
agreement: boolean;
|
|
6
|
+
}, {
|
|
7
|
+
agreement: boolean;
|
|
8
|
+
}>;
|
|
9
|
+
export type AgreementFormFields = z.input<typeof agreementFormSchema>;
|
|
10
|
+
export type AgreementFormPayload = z.output<typeof agreementFormSchema>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
import { AgreementFormPayload } from "./agreement-form-schema";
|
|
3
|
+
export type AgreementFormProps = {
|
|
4
|
+
checkboxLabel: ReactNode;
|
|
5
|
+
onAgree: (values: AgreementFormPayload) => Promise<void>;
|
|
6
|
+
onSkip?: () => void;
|
|
7
|
+
};
|
|
8
|
+
export declare const AgreementForm: ({ checkboxLabel, onAgree, onSkip }: AgreementFormProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const getAgreementStyles: () => import("@emotion/utils").SerializedStyles;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./agreement-form";
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ComponentMeta, ComponentStory } from "@storybook/react";
|
|
2
|
+
import { BillingFormProps } from "./billing-form";
|
|
3
|
+
declare const _default: ComponentMeta<({ onSkip, onSubmit }: BillingFormProps) => import("@emotion/react/jsx-runtime").JSX.Element>;
|
|
4
|
+
export default _default;
|
|
5
|
+
export declare const Default: ComponentStory<({ onSkip, onSubmit }: BillingFormProps) => import("@emotion/react/jsx-runtime").JSX.Element>;
|
|
6
|
+
export declare const WithLabels: ComponentStory<({ onSkip, onSubmit }: BillingFormProps) => import("@emotion/react/jsx-runtime").JSX.Element>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as SE from "@shipengine/types";
|
|
2
|
+
import { BillingFormPayload } from "./billing-schema";
|
|
3
|
+
export type BillingFormProps = {
|
|
4
|
+
address?: SE.Address;
|
|
5
|
+
onCancel?: () => void;
|
|
6
|
+
onSkip: () => void;
|
|
7
|
+
onSubmit: (billingPayload: BillingFormPayload) => void;
|
|
8
|
+
};
|
|
9
|
+
export declare const BillingForm: ({ onSkip, onSubmit }: BillingFormProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const billingSchema: z.ZodEffects<z.ZodObject<z.extendShape<{
|
|
3
|
+
name: z.ZodString;
|
|
4
|
+
companyName: z.ZodEffects<z.ZodNullable<z.ZodOptional<z.ZodString>>, string | undefined, string | null | undefined>;
|
|
5
|
+
countryCode: z.ZodEnum<["AF", "AX", "AL", "DZ", "AS", "AD", "AO", "AI", "AQ", "AG", "AR", "AM", "AW", "AU", "AT", "AZ", "BS", "BH", "BD", "BB", "BY", "BE", "BZ", "BJ", "BM", "BT", "BO", "BQ", "BA", "BW", "BR", "IO", "VG", "BN", "BG", "BF", "BI", "CA", "KH", "CM", "CV", "KY", "CF", "TD", "CL", "CN", "CX", "CC", "CO", "KM", "CG", "CD", "CK", "CR", "HR", "CU", "CW", "CY", "CZ", "DK", "DJ", "DM", "DO", "EC", "EG", "SV", "GQ", "ER", "EE", "ET", "FK", "FO", "FM", "FJ", "FI", "FR", "GF", "PF", "TF", "GA", "GM", "GE", "DE", "GH", "GI", "GR", "GL", "GD", "GP", "GU", "GT", "GG", "GN", "GW", "GY", "HT", "VA", "HN", "HK", "HU", "IS", "IN", "ID", "IR", "IQ", "IE", "IM", "IL", "IT", "CI", "JM", "JP", "JE", "JO", "KZ", "KE", "KI", "KR", "KW", "KG", "LA", "LV", "LB", "LS", "LR", "LY", "LI", "LT", "LU", "MO", "MK", "MG", "MW", "MY", "MV", "ML", "MT", "MH", "MQ", "MR", "MU", "YT", "MX", "MD", "MC", "MN", "ME", "MS", "MA", "MZ", "MM", "NA", "NR", "NP", "NL", "AN", "NC", "NZ", "NI", "NE", "NG", "NU", "NF", "KP", "MP", "NO", "OM", "PK", "PW", "PS", "PA", "PG", "PY", "PE", "PH", "PN", "PL", "PT", "PR", "QA", "RE", "RO", "RU", "RW", "BL", "SH", "KN", "LC", "MF", "PM", "VC", "WS", "SM", "ST", "SA", "SN", "RS", "SC", "SL", "SG", "SX", "SK", "SI", "SB", "SO", "ZA", "GS", "SS", "ES", "LK", "SD", "SR", "SJ", "SZ", "SE", "CH", "SY", "TW", "TJ", "TZ", "TH", "TL", "TG", "TK", "TO", "TT", "TN", "TR", "TM", "TC", "TV", "UG", "UA", "AE", "GB", "VI", "UM", "US", "UY", "UZ", "VU", "VE", "VN", "WF", "EH", "YE", "ZM", "ZW"]>;
|
|
6
|
+
addressLine1: z.ZodString;
|
|
7
|
+
addressLine2: z.ZodEffects<z.ZodNullable<z.ZodOptional<z.ZodString>>, string | undefined, string | null | undefined>;
|
|
8
|
+
cityLocality: z.ZodString;
|
|
9
|
+
phone: z.ZodEffects<z.ZodNullable<z.ZodOptional<z.ZodString>>, string, string | null | undefined>;
|
|
10
|
+
email: z.ZodEffects<z.ZodNullable<z.ZodOptional<z.ZodString>>, string, string | null | undefined>;
|
|
11
|
+
}, {
|
|
12
|
+
number: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
13
|
+
expirationMonth: z.ZodEnum<["01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12"]>;
|
|
14
|
+
expirationYear: z.ZodEffects<z.ZodString, string, string>;
|
|
15
|
+
cvv: z.ZodEffects<z.ZodString, string, string>;
|
|
16
|
+
setAsDefaultAddress: z.ZodOptional<z.ZodBoolean>;
|
|
17
|
+
}>, "strip", z.ZodTypeAny, {
|
|
18
|
+
companyName?: string | undefined;
|
|
19
|
+
addressLine2?: string | undefined;
|
|
20
|
+
setAsDefaultAddress?: boolean | undefined;
|
|
21
|
+
number: string;
|
|
22
|
+
name: string;
|
|
23
|
+
countryCode: "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";
|
|
24
|
+
addressLine1: string;
|
|
25
|
+
cityLocality: string;
|
|
26
|
+
phone: string;
|
|
27
|
+
email: string;
|
|
28
|
+
expirationMonth: "10" | "11" | "12" | "01" | "02" | "03" | "04" | "05" | "06" | "07" | "08" | "09";
|
|
29
|
+
expirationYear: string;
|
|
30
|
+
cvv: string;
|
|
31
|
+
}, {
|
|
32
|
+
companyName?: string | null | undefined;
|
|
33
|
+
addressLine2?: string | null | undefined;
|
|
34
|
+
phone?: string | null | undefined;
|
|
35
|
+
email?: string | null | undefined;
|
|
36
|
+
setAsDefaultAddress?: boolean | undefined;
|
|
37
|
+
number: string;
|
|
38
|
+
name: string;
|
|
39
|
+
countryCode: "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";
|
|
40
|
+
addressLine1: string;
|
|
41
|
+
cityLocality: string;
|
|
42
|
+
expirationMonth: "10" | "11" | "12" | "01" | "02" | "03" | "04" | "05" | "06" | "07" | "08" | "09";
|
|
43
|
+
expirationYear: string;
|
|
44
|
+
cvv: string;
|
|
45
|
+
}>, {
|
|
46
|
+
type: string | undefined;
|
|
47
|
+
companyName?: string | undefined;
|
|
48
|
+
addressLine2?: string | undefined;
|
|
49
|
+
setAsDefaultAddress?: boolean | undefined;
|
|
50
|
+
number: string;
|
|
51
|
+
name: string;
|
|
52
|
+
countryCode: "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";
|
|
53
|
+
addressLine1: string;
|
|
54
|
+
cityLocality: string;
|
|
55
|
+
phone: string;
|
|
56
|
+
email: string;
|
|
57
|
+
expirationMonth: "10" | "11" | "12" | "01" | "02" | "03" | "04" | "05" | "06" | "07" | "08" | "09";
|
|
58
|
+
expirationYear: string;
|
|
59
|
+
cvv: string;
|
|
60
|
+
}, {
|
|
61
|
+
companyName?: string | null | undefined;
|
|
62
|
+
addressLine2?: string | null | undefined;
|
|
63
|
+
phone?: string | null | undefined;
|
|
64
|
+
email?: string | null | undefined;
|
|
65
|
+
setAsDefaultAddress?: boolean | undefined;
|
|
66
|
+
number: string;
|
|
67
|
+
name: string;
|
|
68
|
+
countryCode: "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";
|
|
69
|
+
addressLine1: string;
|
|
70
|
+
cityLocality: string;
|
|
71
|
+
expirationMonth: "10" | "11" | "12" | "01" | "02" | "03" | "04" | "05" | "06" | "07" | "08" | "09";
|
|
72
|
+
expirationYear: string;
|
|
73
|
+
cvv: string;
|
|
74
|
+
}>;
|
|
75
|
+
export type BillingFormFields = z.input<typeof billingSchema>;
|
|
76
|
+
export type BillingFormPayload = z.output<typeof billingSchema>;
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const customsItemFormSchema: z.ZodEffects<z.ZodObject<{
|
|
3
|
+
countryOfOrigin: z.ZodEnum<["AF", "AX", "AL", "DZ", "AS", "AD", "AO", "AI", "AQ", "AG", "AR", "AM", "AW", "AU", "AT", "AZ", "BS", "BH", "BD", "BB", "BY", "BE", "BZ", "BJ", "BM", "BT", "BO", "BQ", "BA", "BW", "BR", "IO", "VG", "BN", "BG", "BF", "BI", "CA", "KH", "CM", "CV", "KY", "CF", "TD", "CL", "CN", "CX", "CC", "CO", "KM", "CG", "CD", "CK", "CR", "HR", "CU", "CW", "CY", "CZ", "DK", "DJ", "DM", "DO", "EC", "EG", "SV", "GQ", "ER", "EE", "ET", "FK", "FO", "FM", "FJ", "FI", "FR", "GF", "PF", "TF", "GA", "GM", "GE", "DE", "GH", "GI", "GR", "GL", "GD", "GP", "GU", "GT", "GG", "GN", "GW", "GY", "HT", "VA", "HN", "HK", "HU", "IS", "IN", "ID", "IR", "IQ", "IE", "IM", "IL", "IT", "CI", "JM", "JP", "JE", "JO", "KZ", "KE", "KI", "KR", "KW", "KG", "LA", "LV", "LB", "LS", "LR", "LY", "LI", "LT", "LU", "MO", "MK", "MG", "MW", "MY", "MV", "ML", "MT", "MH", "MQ", "MR", "MU", "YT", "MX", "MD", "MC", "MN", "ME", "MS", "MA", "MZ", "MM", "NA", "NR", "NP", "NL", "AN", "NC", "NZ", "NI", "NE", "NG", "NU", "NF", "KP", "MP", "NO", "OM", "PK", "PW", "PS", "PA", "PG", "PY", "PE", "PH", "PN", "PL", "PT", "PR", "QA", "RE", "RO", "RU", "RW", "BL", "SH", "KN", "LC", "MF", "PM", "VC", "WS", "SM", "ST", "SA", "SN", "RS", "SC", "SL", "SG", "SX", "SK", "SI", "SB", "SO", "ZA", "GS", "SS", "ES", "LK", "SD", "SR", "SJ", "SZ", "SE", "CH", "SY", "TW", "TJ", "TZ", "TH", "TL", "TG", "TK", "TO", "TT", "TN", "TR", "TM", "TC", "TV", "UG", "UA", "AE", "GB", "VI", "UM", "US", "UY", "UZ", "VU", "VE", "VN", "WF", "EH", "YE", "ZM", "ZW"]>;
|
|
4
|
+
customsItemId: z.ZodEffects<z.ZodNullable<z.ZodOptional<z.ZodString>>, string | undefined, string | null | undefined>;
|
|
5
|
+
description: z.ZodString;
|
|
6
|
+
harmonizedTariffCode: z.ZodEffects<z.ZodNullable<z.ZodOptional<z.ZodString>>, string | undefined, string | null | undefined>;
|
|
7
|
+
valueQuantity: z.ZodObject<{
|
|
8
|
+
value: z.ZodObject<{
|
|
9
|
+
amount: z.ZodNumber;
|
|
10
|
+
currency: z.ZodNativeEnum<typeof import("dist/shipengine-types/src").Currency>;
|
|
11
|
+
}, "strip", z.ZodTypeAny, {
|
|
12
|
+
amount: number;
|
|
13
|
+
currency: import("dist/shipengine-types/src").Currency;
|
|
14
|
+
}, {
|
|
15
|
+
amount: number;
|
|
16
|
+
currency: import("dist/shipengine-types/src").Currency;
|
|
17
|
+
}>;
|
|
18
|
+
quantity: z.ZodNumber;
|
|
19
|
+
}, "strip", z.ZodTypeAny, {
|
|
20
|
+
value: {
|
|
21
|
+
amount: number;
|
|
22
|
+
currency: import("dist/shipengine-types/src").Currency;
|
|
23
|
+
};
|
|
24
|
+
quantity: number;
|
|
25
|
+
}, {
|
|
26
|
+
value: {
|
|
27
|
+
amount: number;
|
|
28
|
+
currency: import("dist/shipengine-types/src").Currency;
|
|
29
|
+
};
|
|
30
|
+
quantity: number;
|
|
31
|
+
}>;
|
|
32
|
+
}, "strip", z.ZodTypeAny, {
|
|
33
|
+
customsItemId?: string | undefined;
|
|
34
|
+
harmonizedTariffCode?: string | undefined;
|
|
35
|
+
countryOfOrigin: "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";
|
|
36
|
+
description: string;
|
|
37
|
+
valueQuantity: {
|
|
38
|
+
value: {
|
|
39
|
+
amount: number;
|
|
40
|
+
currency: import("dist/shipengine-types/src").Currency;
|
|
41
|
+
};
|
|
42
|
+
quantity: number;
|
|
43
|
+
};
|
|
44
|
+
}, {
|
|
45
|
+
customsItemId?: string | null | undefined;
|
|
46
|
+
harmonizedTariffCode?: string | null | undefined;
|
|
47
|
+
countryOfOrigin: "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";
|
|
48
|
+
description: string;
|
|
49
|
+
valueQuantity: {
|
|
50
|
+
value: {
|
|
51
|
+
amount: number;
|
|
52
|
+
currency: import("dist/shipengine-types/src").Currency;
|
|
53
|
+
};
|
|
54
|
+
quantity: number;
|
|
55
|
+
};
|
|
56
|
+
}>, {
|
|
57
|
+
value: {
|
|
58
|
+
amount: number;
|
|
59
|
+
currency: import("dist/shipengine-types/src").Currency;
|
|
60
|
+
};
|
|
61
|
+
quantity: number;
|
|
62
|
+
customsItemId?: string | undefined;
|
|
63
|
+
harmonizedTariffCode?: string | undefined;
|
|
64
|
+
countryOfOrigin: "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";
|
|
65
|
+
description: string;
|
|
66
|
+
}, {
|
|
67
|
+
customsItemId?: string | null | undefined;
|
|
68
|
+
harmonizedTariffCode?: string | null | undefined;
|
|
69
|
+
countryOfOrigin: "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";
|
|
70
|
+
description: string;
|
|
71
|
+
valueQuantity: {
|
|
72
|
+
value: {
|
|
73
|
+
amount: number;
|
|
74
|
+
currency: import("dist/shipengine-types/src").Currency;
|
|
75
|
+
};
|
|
76
|
+
quantity: number;
|
|
77
|
+
};
|
|
78
|
+
}>;
|
|
79
|
+
export type CustomsItemFormFields = z.input<typeof customsItemFormSchema>;
|
|
80
|
+
export type CustomsItemFormPayload = z.output<typeof customsItemFormSchema>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import * as SE from "@shipengine/types";
|
|
3
|
+
export type CustomsItemFormProps<T = undefined> = {
|
|
4
|
+
customsItem?: SE.CustomsItem;
|
|
5
|
+
onCancel?: () => void;
|
|
6
|
+
onSubmit: (values: SE.CustomsItem) => Promise<void>;
|
|
7
|
+
} & ({
|
|
8
|
+
formId: string;
|
|
9
|
+
portalRef: React.RefObject<T>;
|
|
10
|
+
} | {
|
|
11
|
+
formId?: string;
|
|
12
|
+
portalRef?: never;
|
|
13
|
+
});
|
|
14
|
+
export declare const CustomsItemForm: <T extends Element>({ customsItem, formId, onCancel, onSubmit, portalRef, }: CustomsItemFormProps<T>) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as SE from "@shipengine/types";
|
|
2
|
+
type CustomsItemsDisplayProps = {
|
|
3
|
+
onUpdate: (customsItems: SE.CustomsItem[]) => Promise<void>;
|
|
4
|
+
shipment: SE.SalesOrderShipment;
|
|
5
|
+
};
|
|
6
|
+
export declare const CustomsItemsDisplay: ({ onUpdate, shipment }: CustomsItemsDisplayProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const getCustomsActionsStyles: () => import("@emotion/utils").SerializedStyles;
|
|
2
|
+
export declare const getCustomsDescriptionStyle: () => import("@emotion/utils").SerializedStyles;
|
|
3
|
+
export declare const getCustomsItemInfoLeftStyle: () => import("@emotion/utils").SerializedStyles;
|
|
4
|
+
export declare const getCustomsItemInfoRightStyle: () => import("@emotion/utils").SerializedStyles;
|
|
5
|
+
export declare const getCustomsHeaderStyle: () => import("@emotion/utils").SerializedStyles;
|
|
6
|
+
export declare const getNumericCellStyle: () => import("@emotion/utils").SerializedStyles;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./customs-items-display";
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { CarrierAutoFunding } from "@shipengine/types";
|
|
2
|
+
export type FundingMethodsProps = {
|
|
3
|
+
autoFundingData: CarrierAutoFunding;
|
|
4
|
+
autoFundingErrorMessage?: string;
|
|
5
|
+
hasAutoFundingError: boolean;
|
|
6
|
+
isAutoFundingLoading: boolean;
|
|
7
|
+
onSubmitAutoFunding: (payload: CarrierAutoFunding) => Promise<void> | void;
|
|
8
|
+
onToggleAutoFunding: (enabled: boolean) => Promise<void> | void;
|
|
9
|
+
};
|
|
10
|
+
export declare const FundingMethods: ({ autoFundingData, autoFundingErrorMessage, hasAutoFundingError, isAutoFundingLoading, onSubmitAutoFunding, onToggleAutoFunding, }: FundingMethodsProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./funding-methods";
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export * from "./add-carriers";
|
|
2
|
+
export * from "./address-display";
|
|
3
|
+
export * from "./address-form";
|
|
4
|
+
export * from "./address-parser";
|
|
5
|
+
export * from "./address-preference-display";
|
|
6
|
+
export * from "./agreement-form";
|
|
7
|
+
export * from "./customs-item-form";
|
|
8
|
+
export * from "./funding-methods";
|
|
9
|
+
export * from "./label";
|
|
10
|
+
export * from "./manage-warehouses";
|
|
11
|
+
export * from "./rate-form";
|
|
12
|
+
export * from "./register-wallet";
|
|
13
|
+
export * from "./sales-order";
|
|
14
|
+
export * from "./shipment-form";
|
|
15
|
+
export * from "./shipment";
|
|
16
|
+
export * from "./void-label";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./label";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as SE from "@shipengine/types";
|
|
2
|
+
export type LabelProps = {
|
|
3
|
+
label: SE.Label & {
|
|
4
|
+
carrier?: SE.Carrier;
|
|
5
|
+
service?: SE.Service;
|
|
6
|
+
insuredValue?: SE.Money;
|
|
7
|
+
deliveryConfirmation?: SE.ConfirmationType;
|
|
8
|
+
};
|
|
9
|
+
onClickVoid?: (label: SE.Label) => void;
|
|
10
|
+
onClickPrintLabel?: () => void;
|
|
11
|
+
};
|
|
12
|
+
export declare const Label: ({ label, onClickVoid, onClickPrintLabel }: LabelProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./manage-warehouses";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./rate-form";
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import * as SE from "@shipengine/types";
|
|
2
|
+
export type RateFormFeatures = {
|
|
3
|
+
enableGlobalPostFiltering?: boolean;
|
|
4
|
+
includeRecommendedRates?: boolean;
|
|
5
|
+
nicknameRate?: boolean;
|
|
6
|
+
saveRate?: boolean;
|
|
7
|
+
};
|
|
8
|
+
export type RateFormProps = {
|
|
9
|
+
carriers?: SE.Carrier[];
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
errors?: SE.CodedError[];
|
|
12
|
+
labelErrors?: SE.CodedError[];
|
|
13
|
+
isLoading?: boolean;
|
|
14
|
+
onSave?: (rate: Pick<SE.Rate, "carrierId" | "serviceCode">) => Promise<void> | void;
|
|
15
|
+
onSelectRate: (rateId: string) => void;
|
|
16
|
+
onSubmit?: (rateId: string) => Promise<void> | void;
|
|
17
|
+
rates?: SE.Rate[];
|
|
18
|
+
shipment?: SE.SalesOrderShipment;
|
|
19
|
+
features?: RateFormFeatures;
|
|
20
|
+
};
|
|
21
|
+
export declare const RateForm: ({ carriers, disabled, errors, features, labelErrors, isLoading, onSave, onSelectRate, onSubmit, rates, shipment, }: RateFormProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const rateSchema: z.ZodEffects<z.ZodObject<{
|
|
3
|
+
rate: z.ZodObject<{
|
|
4
|
+
isAcknowledged: z.ZodEffects<z.ZodBoolean, boolean, boolean>;
|
|
5
|
+
rateId: z.ZodString;
|
|
6
|
+
}, "strip", z.ZodTypeAny, {
|
|
7
|
+
isAcknowledged: boolean;
|
|
8
|
+
rateId: string;
|
|
9
|
+
}, {
|
|
10
|
+
isAcknowledged: boolean;
|
|
11
|
+
rateId: string;
|
|
12
|
+
}>;
|
|
13
|
+
}, "strip", z.ZodTypeAny, {
|
|
14
|
+
rate: {
|
|
15
|
+
isAcknowledged: boolean;
|
|
16
|
+
rateId: string;
|
|
17
|
+
};
|
|
18
|
+
}, {
|
|
19
|
+
rate: {
|
|
20
|
+
isAcknowledged: boolean;
|
|
21
|
+
rateId: string;
|
|
22
|
+
};
|
|
23
|
+
}>, string, {
|
|
24
|
+
rate: {
|
|
25
|
+
isAcknowledged: boolean;
|
|
26
|
+
rateId: string;
|
|
27
|
+
};
|
|
28
|
+
}>;
|
|
29
|
+
export type RateFormFields = z.input<typeof rateSchema>;
|
|
30
|
+
export type RateFormPayload = z.output<typeof rateSchema>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./register-wallet";
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Theme } from "@packlink/brands";
|
|
2
|
+
export declare const getBillingFormStyles: (theme: Theme) => import("@emotion/utils").SerializedStyles;
|
|
3
|
+
export declare const getHeadingStyles: (theme: Theme) => import("@emotion/utils").SerializedStyles;
|
|
4
|
+
export declare const getRegisterWalletStyles: () => import("@emotion/utils").SerializedStyles;
|
|
5
|
+
export declare const getStampsWalletTermsStyles: (theme: Theme) => import("@emotion/utils").SerializedStyles;
|
|
6
|
+
export declare const getSubHeadingStyles: (theme: Theme) => import("@emotion/utils").SerializedStyles;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as SE from "@shipengine/types";
|
|
2
|
+
import { WithChildrenCommonProps } from "@packlink/giger";
|
|
3
|
+
export type SalesOrderProps = WithChildrenCommonProps<{
|
|
4
|
+
errors?: SE.CodedError[];
|
|
5
|
+
isLoading?: boolean;
|
|
6
|
+
salesOrder?: SE.SalesOrder;
|
|
7
|
+
}>;
|
|
8
|
+
export declare const SalesOrder: ({ children, errors, isLoading, salesOrder }: SalesOrderProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as SE from "@shipengine/types";
|
|
2
|
+
export declare const schedulePickupForCarrier: (carrierCode?: string, plaftformSchedulePickupUrl?: string) => string | undefined;
|
|
3
|
+
export type ShipmentFeatures = {
|
|
4
|
+
schedulePickup?: boolean;
|
|
5
|
+
};
|
|
6
|
+
export type ShipmentProps = {
|
|
7
|
+
carriers?: SE.Carrier[];
|
|
8
|
+
features?: ShipmentFeatures;
|
|
9
|
+
labels?: SE.Label[];
|
|
10
|
+
onClickPrintLabel?: () => void;
|
|
11
|
+
onClickPurchaseLabel?: (order: SE.SalesOrder) => void;
|
|
12
|
+
onClickVoidLabel?: (label: SE.Label) => void;
|
|
13
|
+
salesOrder?: SE.SalesOrder;
|
|
14
|
+
shipment: SE.SalesOrderShipment;
|
|
15
|
+
warehouse?: SE.Warehouse;
|
|
16
|
+
};
|
|
17
|
+
export declare const Shipment: ({ carriers, features, labels, onClickPrintLabel, onClickPurchaseLabel, onClickVoidLabel, salesOrder, shipment, warehouse, }: ShipmentProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./shipment-form";
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import * as SE from "@shipengine/types";
|
|
3
|
+
import { ShippingPreset } from "../../../types";
|
|
4
|
+
import { AddressParserPayload } from "../address-parser";
|
|
5
|
+
import { AddressPreference, AddressPreferenceDisplayProps } from "../address-preference-display";
|
|
6
|
+
import { UseShippingPresetsOptionsProps } from "../../../hooks";
|
|
7
|
+
export type OnChangeAddressOptions = {
|
|
8
|
+
shouldValidate?: boolean;
|
|
9
|
+
};
|
|
10
|
+
export type ShipmentFormMode = "browse_rates" | "select_service";
|
|
11
|
+
export type ShipmentFormProps = {
|
|
12
|
+
addressPreference?: AddressPreference;
|
|
13
|
+
charsetWarning?: CharsetWarning;
|
|
14
|
+
carriers?: SE.Carrier[];
|
|
15
|
+
customPackageTypes?: SE.Package[];
|
|
16
|
+
errors?: SE.CodedError[];
|
|
17
|
+
features?: ShipmentFormFeatures;
|
|
18
|
+
hydrateRef: React.MutableRefObject<((updatedShipment: SE.SalesOrderShipment) => void) | undefined>;
|
|
19
|
+
insuranceAccount?: SE.InsuranceAccount;
|
|
20
|
+
isLoading?: boolean;
|
|
21
|
+
onApplyPreset?: (values: ShippingPreset) => Promise<void> | void;
|
|
22
|
+
onChangeAddress: (payload: SE.Address, options: OnChangeAddressOptions) => Promise<SE.SalesOrderShipment | undefined> | void;
|
|
23
|
+
onChangeMode?: (trackMode: {
|
|
24
|
+
defaultMode: ShipmentFormMode;
|
|
25
|
+
previousMode: ShipmentFormMode;
|
|
26
|
+
selectedMode: ShipmentFormMode;
|
|
27
|
+
}) => Promise<void> | void;
|
|
28
|
+
onDirty: () => void;
|
|
29
|
+
onSubmit: (values: Partial<SE.SalesOrderShipment>) => Promise<SE.SalesOrderShipment | undefined>;
|
|
30
|
+
onSubmitParseShipTo: (payload: AddressParserPayload) => Promise<SE.AddressParseResponse | undefined>;
|
|
31
|
+
onToggleAddressPreferenceDisclosure?: AddressPreferenceDisplayProps["onToggleDisclosure"];
|
|
32
|
+
onUpdateCustoms?: (customs: SE.Customs) => Promise<SE.SalesOrderShipment | undefined>;
|
|
33
|
+
salesOrder: SE.SalesOrder;
|
|
34
|
+
shipment?: SE.SalesOrderShipment;
|
|
35
|
+
shippingPresets?: UseShippingPresetsOptionsProps;
|
|
36
|
+
warehouseId?: string;
|
|
37
|
+
warehouses?: SE.Warehouse[];
|
|
38
|
+
};
|
|
39
|
+
export type CharsetWarning = {
|
|
40
|
+
error: boolean;
|
|
41
|
+
message: string;
|
|
42
|
+
title?: string;
|
|
43
|
+
};
|
|
44
|
+
export type ShipmentFormFeatures = {
|
|
45
|
+
browseRates?: boolean;
|
|
46
|
+
selectService?: boolean;
|
|
47
|
+
includeThirdPartyInsurance?: boolean;
|
|
48
|
+
includeShipsuranceInsurance?: boolean;
|
|
49
|
+
shippingPresets?: boolean;
|
|
50
|
+
};
|
|
51
|
+
export declare const ShipmentForm: ({ addressPreference, charsetWarning, carriers, customPackageTypes, errors, features, hydrateRef, insuranceAccount, isLoading, onApplyPreset, onChangeAddress, onChangeMode, onDirty, onSubmit, onSubmitParseShipTo, onToggleAddressPreferenceDisclosure, onUpdateCustoms, salesOrder, shipment, shippingPresets, warehouseId, warehouses, }: ShipmentFormProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|