@shipengine/elements 0.20.1 → 0.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.cjs +1131 -949
- package/index.js +995 -817
- package/package.json +3 -3
- package/src/components/add-funds-form/add-funds-schema.d.ts +7 -7
- package/src/components/address-preference-context/address-preference-context.d.ts +42 -0
- package/src/components/address-preference-context/index.d.ts +1 -0
- package/src/components/auto-funding-form/auto-funding-schema.d.ts +10 -10
- package/src/components/date-range-combo/date-range-combo.d.ts +12 -0
- package/src/components/date-range-combo/index.d.ts +1 -0
- package/src/components/date-range-select/date-range-select.d.ts +8 -0
- package/src/components/date-range-select/date-range-select.styles.d.ts +1 -0
- package/src/components/date-range-select/index.d.ts +1 -0
- package/src/components/field/fields.d.ts +2 -1
- package/src/components/field/money-input/hooks/use-utils.d.ts +1 -1
- package/src/components/field/money-input/money-input.d.ts +1 -1
- package/src/components/field/rate-card/cost-breakdown/cost-breakdown.d.ts +1 -1
- package/src/components/field/select-auto-complete/index.d.ts +1 -0
- package/src/components/field/select-auto-complete/select-auto-complete.d.ts +7 -0
- package/src/components/history/history-card/history-card.d.ts +5 -0
- package/src/components/history/history-card/history-card.styles.d.ts +1 -0
- package/src/components/history/history-card/index.d.ts +1 -0
- package/src/components/history/index.d.ts +1 -1
- package/src/components/index.d.ts +3 -1
- package/src/components/inline-label/inline-label.d.ts +5 -1
- package/src/components/inline-label/inline-label.styles.d.ts +1 -0
- package/src/components/items-breakdown/items-breakdown.d.ts +1 -1
- package/src/components/label/index.d.ts +1 -0
- package/src/components/label/label.d.ts +10 -0
- package/src/components/label/label.styles.d.ts +2 -0
- package/src/components/label-layout/index.d.ts +2 -0
- package/src/components/label-layout/label-layout-purchase.d.ts +4 -3
- package/src/components/label-layout/label-layout-settings.d.ts +3 -2
- package/src/components/label-layout/label-layout.styles.d.ts +1 -1
- package/src/components/section/index.d.ts +1 -0
- package/src/components/section/section.d.ts +10 -0
- package/src/components/section/section.styles.d.ts +1 -0
- package/src/components/templates/add-carrier-form/add-carrier-form-schema.d.ts +1 -1
- package/src/components/templates/add-carrier-form/add-carrier-form.d.ts +1 -1
- package/src/components/templates/address-display/address-display.d.ts +1 -1
- package/src/components/templates/address-form/address-form-schema.d.ts +1 -1
- package/src/components/templates/address-form/address-form.d.ts +1 -1
- package/src/components/templates/address-form/address-schema.d.ts +2 -1
- package/src/components/templates/address-preference-display/address-preference-display.d.ts +1 -1
- package/src/components/templates/address-preference-select/address-preference-select.d.ts +24 -0
- package/src/components/templates/address-preference-select/index.d.ts +1 -0
- package/src/components/templates/carrier-recovery-form/carrier-recovery-form-schema.d.ts +2 -2
- package/src/components/templates/carrier-recovery-form/carrier-recovery-form.d.ts +1 -1
- package/src/components/templates/carrier-terms-form/carrier-terms-form.d.ts +1 -1
- package/src/components/templates/customs-item-form/customs-item-form-schema.d.ts +20 -20
- package/src/components/templates/customs-item-form/customs-item-form.d.ts +1 -1
- package/src/components/templates/customs-items-display/customs-items-display.d.ts +1 -1
- package/src/components/templates/edit-billing-form/edit-billing-form.styles.d.ts +1 -1
- package/src/components/templates/index.d.ts +2 -3
- package/src/components/templates/label/label.d.ts +1 -1
- package/src/components/templates/list-carriers/list-carriers.d.ts +1 -1
- package/src/components/templates/list-carriers-row/list-carriers-row.d.ts +1 -1
- package/src/components/templates/manage-wallet/manage-wallet.styles.d.ts +1 -1
- package/src/components/templates/manage-warehouses/manage-warehouses.d.ts +2 -6
- package/src/components/templates/onboarding/onboarding.d.ts +14 -8
- package/src/components/templates/onboarding/onboarding.styles.d.ts +1 -1
- package/src/components/templates/rate-form/rate-form.d.ts +1 -1
- package/src/components/templates/shipment/shipment.d.ts +1 -1
- package/src/components/templates/shipment-form/shipment-form.d.ts +1 -1
- package/src/components/templates/shipment-form/shipment-schema.d.ts +26 -2
- package/src/components/templates/suspend-sales-order/suspend-sales-order.d.ts +1 -1
- package/src/components/templates/suspend-shipment/suspend-shipment.d.ts +1 -1
- package/src/components/templates/void-label/void-label.d.ts +1 -1
- package/src/components/templates/wallet-card/wallet-card.styles.d.ts +1 -1
- package/src/components/templates/wallet-form/edit-wallet-address-form.d.ts +1 -1
- package/src/components/templates/wallet-form/wallet-form.d.ts +7 -6
- package/src/components/templates/wallet-form/wallet-form.styles.d.ts +1 -1
- package/src/components/templates/wallet-form/wallet-schema.d.ts +3 -3
- package/src/components/templates/warehouse-display/warehouse-display.d.ts +1 -1
- package/src/components/templates/warehouse-form/warehouse-form-schema.d.ts +3 -3
- package/src/components/templates/warehouse-form/warehouse-form.d.ts +1 -1
- package/src/components/unit-settings/index.d.ts +1 -0
- package/src/components/unit-settings/unit-settings.d.ts +4 -0
- package/src/elements/components/configure-shipment/configure-shipment.d.ts +1 -1
- package/src/elements/components/configure-shipment/hooks/use-address.d.ts +1 -1
- package/src/elements/components/configure-shipment/hooks/use-customs.d.ts +1 -1
- package/src/elements/components/configure-shipment/hooks/use-presets.d.ts +1 -1
- package/src/elements/components/configure-shipment/hooks/use-rates-form.d.ts +1 -1
- package/src/elements/components/configure-shipment/hooks/use-request-rates.d.ts +1 -1
- package/src/elements/components/configure-shipment/hooks/use-shipment-form.d.ts +1 -1
- package/src/elements/components/index.d.ts +0 -1
- package/src/elements/components/list-carriers/hooks/use-list-connected-carriers.d.ts +2 -2
- package/src/elements/components/purchase-label/hooks/use-configure-shipment.d.ts +1 -1
- package/src/elements/components/purchase-label/hooks/use-import-sales-order.d.ts +2 -2
- package/src/elements/components/purchase-label/hooks/use-load-shipment.d.ts +3 -3
- package/src/elements/components/purchase-label/hooks/use-pending-shipment.d.ts +1 -1
- package/src/elements/components/shipment/shipment.d.ts +1 -1
- package/src/elements/components/void-label/void-label.d.ts +1 -1
- package/src/elements/index.d.ts +0 -1
- package/src/factories/shipengine/address.d.ts +8 -1
- package/src/factories/shipengine/carrier.d.ts +1 -1
- package/src/factories/shipengine/label.d.ts +1 -1
- package/src/factories/shipengine/money.d.ts +1 -1
- package/src/factories/shipengine/order-source.d.ts +1 -1
- package/src/factories/shipengine/package.d.ts +1 -1
- package/src/factories/shipengine/resource.d.ts +1 -1
- package/src/factories/shipengine/sales-order.d.ts +1 -1
- package/src/factories/shipengine/service.d.ts +1 -1
- package/src/factories/shipengine/shipment.d.ts +1 -1
- package/src/factories/shipengine/wallet-history.d.ts +1 -1
- package/src/factories/shipengine/warehouse.d.ts +1 -3
- package/src/factories/shipengine/weight.d.ts +1 -1
- package/src/features/wallet-history/wallet-history.styles.d.ts +1 -0
- package/src/hooks/index.d.ts +1 -1
- package/src/hooks/options/index.d.ts +1 -0
- package/src/hooks/options/use-confirmation-options.d.ts +1 -1
- package/src/hooks/options/use-customs-contents-options.d.ts +1 -1
- package/src/hooks/options/use-customs-non-delivery-options.d.ts +1 -1
- package/src/hooks/options/use-date-range-options.d.ts +14 -0
- package/src/hooks/options/use-insurance-provider-options.d.ts +1 -1
- package/src/hooks/options/use-package-options.d.ts +1 -1
- package/src/hooks/options/use-rate-options.d.ts +1 -1
- package/src/hooks/options/use-service-code-options.d.ts +1 -1
- package/src/hooks/options/use-warehouse-options.d.ts +1 -1
- package/src/hooks/use-address-validation.d.ts +12 -0
- package/src/hooks/use-carrier-metadata.d.ts +1 -1
- package/src/hooks/use-elements.d.ts +2 -2
- package/src/hooks/use-scrub-errors.d.ts +1 -1
- package/src/locales/en/index.d.ts +32 -5
- package/src/mocks/carriers/handlers.d.ts +1 -1
- package/src/mocks/warehouses/handlers.d.ts +1 -1
- package/src/schemas/shipengine/money.d.ts +1 -1
- package/src/types/carrier-metadata.d.ts +1 -1
- package/src/types/shipping-preset/shipping-preset.d.ts +1 -1
- package/src/utilities/date.d.ts +8 -0
- package/src/utilities/money.d.ts +1 -1
- package/src/utilities/rates.d.ts +2 -1
- package/src/utilities/shipengine/address.d.ts +1 -1
- package/src/utilities/shipengine/dimensions.d.ts +1 -1
- package/src/utilities/shipengine/sales-order.d.ts +1 -1
- package/src/utilities/shipengine/shipment.d.ts +1 -1
- package/src/utilities/shipengine/weight.d.ts +1 -1
- package/src/components/accordion/accordion.d.ts +0 -12
- package/src/components/accordion/accordion.styles.d.ts +0 -7
- package/src/components/accordion/index.d.ts +0 -1
- package/src/components/history/history-actions/history-actions.d.ts +0 -1
- package/src/components/history/history-actions/history-actions.styles.d.ts +0 -1
- package/src/components/history/history-actions/index.d.ts +0 -1
- package/src/components/history/history-body/history-body.d.ts +0 -6
- package/src/components/history/history-body/index.d.ts +0 -1
- package/src/components/history/history-list/history-list.d.ts +0 -12
- package/src/components/history/history-list/index.d.ts +0 -1
- package/src/components/history/history-row/history-row.d.ts +0 -6
- package/src/components/history/history-row/index.d.ts +0 -1
- package/src/components/history/history.d.ts +0 -11
- package/src/components/templates/wallet-history/wallet-history.d.ts +0 -6
- package/src/components/templates/warehouse-preference-select/index.d.ts +0 -1
- package/src/components/templates/warehouse-preference-select/warehouse-preference-select.d.ts +0 -24
- package/src/components/templates/warehouse-preference-wizard/index.d.ts +0 -1
- package/src/components/templates/warehouse-preference-wizard/warehouse-preference-wizard.d.ts +0 -23
- package/src/elements/wallet-history.d.ts +0 -1
- package/src/hooks/use-warehouse-validation.d.ts +0 -14
- /package/src/{components/templates/wallet-history → features}/index.d.ts +0 -0
- /package/src/{elements/components → features}/wallet-history/index.d.ts +0 -0
- /package/src/{elements/components → features}/wallet-history/wallet-history.d.ts +0 -0
|
@@ -6,7 +6,7 @@ export declare const warehouseSchema: z.ZodDiscriminatedUnion<"returnToAddressIs
|
|
|
6
6
|
addressLine1: z.ZodString;
|
|
7
7
|
addressLine2: z.ZodEffects<z.ZodNullable<z.ZodOptional<z.ZodString>>, string | undefined, string | null | undefined>;
|
|
8
8
|
cityLocality: z.ZodString;
|
|
9
|
-
companyName: z.ZodEffects<z.ZodNullable<z.ZodOptional<z.ZodString>>, string | undefined, string | null | undefined>;
|
|
9
|
+
companyName: z.ZodEffects<z.ZodUnion<[z.ZodEffects<z.ZodNullable<z.ZodOptional<z.ZodString>>, string | undefined, string | null | undefined>, z.ZodLiteral<"">]>, string | undefined, string | null | undefined>;
|
|
10
10
|
countryCode: z.ZodEnum<["AF", "AX", "AL", "DZ", "AS", "AD", "AO", "AI", "AQ", "AG", "AR", "AM", "AW", "AU", "AT", "AZ", "BS", "BH", "BD", "BB", "BY", "BE", "BZ", "BJ", "BM", "BT", "BO", "BQ", "BA", "BW", "BR", "IO", "VG", "BN", "BG", "BF", "BI", "CA", "KH", "CM", "CV", "KY", "CF", "TD", "CL", "CN", "CX", "CC", "CO", "KM", "CG", "CD", "CK", "CR", "HR", "CU", "CW", "CY", "CZ", "DK", "DJ", "DM", "DO", "EC", "EG", "SV", "GQ", "ER", "EE", "ET", "FK", "FO", "FM", "FJ", "FI", "FR", "GF", "PF", "TF", "GA", "GM", "GE", "DE", "GH", "GI", "GR", "GL", "GD", "GP", "GU", "GT", "GG", "GN", "GW", "GY", "HT", "VA", "HN", "HK", "HU", "IS", "IN", "ID", "IR", "IQ", "IE", "IM", "IL", "IT", "CI", "JM", "JP", "JE", "JO", "KZ", "KE", "KI", "KR", "KW", "KG", "LA", "LV", "LB", "LS", "LR", "LY", "LI", "LT", "LU", "MO", "MK", "MG", "MW", "MY", "MV", "ML", "MT", "MH", "MQ", "MR", "MU", "YT", "MX", "MD", "MC", "MN", "ME", "MS", "MA", "MZ", "MM", "NA", "NR", "NP", "NL", "AN", "NC", "NZ", "NI", "NE", "NG", "NU", "NF", "KP", "MP", "NO", "OM", "PK", "PW", "PS", "PA", "PG", "PY", "PE", "PH", "PN", "PL", "PT", "PR", "QA", "RE", "RO", "RU", "RW", "BL", "SH", "KN", "LC", "MF", "PM", "VC", "WS", "SM", "ST", "SA", "SN", "RS", "SC", "SL", "SG", "SX", "SK", "SI", "SB", "SO", "ZA", "GS", "SS", "ES", "LK", "SD", "SR", "SJ", "SZ", "SE", "CH", "SY", "TW", "TJ", "TZ", "TH", "TL", "TG", "TK", "TO", "TT", "TN", "TR", "TM", "TC", "TV", "UG", "UA", "AE", "GB", "VI", "UM", "US", "UY", "UZ", "VU", "VE", "VN", "WF", "EH", "YE", "ZM", "ZW"]>;
|
|
11
11
|
name: z.ZodEffects<z.ZodString, string, string>;
|
|
12
12
|
phone: z.ZodEffects<z.ZodNullable<z.ZodOptional<z.ZodString>>, string, string | null | undefined>;
|
|
@@ -109,7 +109,7 @@ export declare const warehouseSchema: z.ZodDiscriminatedUnion<"returnToAddressIs
|
|
|
109
109
|
addressLine1: z.ZodString;
|
|
110
110
|
addressLine2: z.ZodEffects<z.ZodNullable<z.ZodOptional<z.ZodString>>, string | undefined, string | null | undefined>;
|
|
111
111
|
cityLocality: z.ZodString;
|
|
112
|
-
companyName: z.ZodEffects<z.ZodNullable<z.ZodOptional<z.ZodString>>, string | undefined, string | null | undefined>;
|
|
112
|
+
companyName: z.ZodEffects<z.ZodUnion<[z.ZodEffects<z.ZodNullable<z.ZodOptional<z.ZodString>>, string | undefined, string | null | undefined>, z.ZodLiteral<"">]>, string | undefined, string | null | undefined>;
|
|
113
113
|
countryCode: z.ZodEnum<["AF", "AX", "AL", "DZ", "AS", "AD", "AO", "AI", "AQ", "AG", "AR", "AM", "AW", "AU", "AT", "AZ", "BS", "BH", "BD", "BB", "BY", "BE", "BZ", "BJ", "BM", "BT", "BO", "BQ", "BA", "BW", "BR", "IO", "VG", "BN", "BG", "BF", "BI", "CA", "KH", "CM", "CV", "KY", "CF", "TD", "CL", "CN", "CX", "CC", "CO", "KM", "CG", "CD", "CK", "CR", "HR", "CU", "CW", "CY", "CZ", "DK", "DJ", "DM", "DO", "EC", "EG", "SV", "GQ", "ER", "EE", "ET", "FK", "FO", "FM", "FJ", "FI", "FR", "GF", "PF", "TF", "GA", "GM", "GE", "DE", "GH", "GI", "GR", "GL", "GD", "GP", "GU", "GT", "GG", "GN", "GW", "GY", "HT", "VA", "HN", "HK", "HU", "IS", "IN", "ID", "IR", "IQ", "IE", "IM", "IL", "IT", "CI", "JM", "JP", "JE", "JO", "KZ", "KE", "KI", "KR", "KW", "KG", "LA", "LV", "LB", "LS", "LR", "LY", "LI", "LT", "LU", "MO", "MK", "MG", "MW", "MY", "MV", "ML", "MT", "MH", "MQ", "MR", "MU", "YT", "MX", "MD", "MC", "MN", "ME", "MS", "MA", "MZ", "MM", "NA", "NR", "NP", "NL", "AN", "NC", "NZ", "NI", "NE", "NG", "NU", "NF", "KP", "MP", "NO", "OM", "PK", "PW", "PS", "PA", "PG", "PY", "PE", "PH", "PN", "PL", "PT", "PR", "QA", "RE", "RO", "RU", "RW", "BL", "SH", "KN", "LC", "MF", "PM", "VC", "WS", "SM", "ST", "SA", "SN", "RS", "SC", "SL", "SG", "SX", "SK", "SI", "SB", "SO", "ZA", "GS", "SS", "ES", "LK", "SD", "SR", "SJ", "SZ", "SE", "CH", "SY", "TW", "TJ", "TZ", "TH", "TL", "TG", "TK", "TO", "TT", "TN", "TR", "TM", "TC", "TV", "UG", "UA", "AE", "GB", "VI", "UM", "US", "UY", "UZ", "VU", "VE", "VN", "WF", "EH", "YE", "ZM", "ZW"]>;
|
|
114
114
|
name: z.ZodEffects<z.ZodString, string, string>;
|
|
115
115
|
phone: z.ZodEffects<z.ZodNullable<z.ZodOptional<z.ZodString>>, string, string | null | undefined>;
|
|
@@ -272,7 +272,7 @@ export declare const warehouseSchema: z.ZodDiscriminatedUnion<"returnToAddressIs
|
|
|
272
272
|
addressLine1: z.ZodString;
|
|
273
273
|
addressLine2: z.ZodEffects<z.ZodNullable<z.ZodOptional<z.ZodString>>, string | undefined, string | null | undefined>;
|
|
274
274
|
cityLocality: z.ZodString;
|
|
275
|
-
companyName: z.ZodEffects<z.ZodNullable<z.ZodOptional<z.ZodString>>, string | undefined, string | null | undefined>;
|
|
275
|
+
companyName: z.ZodEffects<z.ZodUnion<[z.ZodEffects<z.ZodNullable<z.ZodOptional<z.ZodString>>, string | undefined, string | null | undefined>, z.ZodLiteral<"">]>, string | undefined, string | null | undefined>;
|
|
276
276
|
countryCode: z.ZodEnum<["AF", "AX", "AL", "DZ", "AS", "AD", "AO", "AI", "AQ", "AG", "AR", "AM", "AW", "AU", "AT", "AZ", "BS", "BH", "BD", "BB", "BY", "BE", "BZ", "BJ", "BM", "BT", "BO", "BQ", "BA", "BW", "BR", "IO", "VG", "BN", "BG", "BF", "BI", "CA", "KH", "CM", "CV", "KY", "CF", "TD", "CL", "CN", "CX", "CC", "CO", "KM", "CG", "CD", "CK", "CR", "HR", "CU", "CW", "CY", "CZ", "DK", "DJ", "DM", "DO", "EC", "EG", "SV", "GQ", "ER", "EE", "ET", "FK", "FO", "FM", "FJ", "FI", "FR", "GF", "PF", "TF", "GA", "GM", "GE", "DE", "GH", "GI", "GR", "GL", "GD", "GP", "GU", "GT", "GG", "GN", "GW", "GY", "HT", "VA", "HN", "HK", "HU", "IS", "IN", "ID", "IR", "IQ", "IE", "IM", "IL", "IT", "CI", "JM", "JP", "JE", "JO", "KZ", "KE", "KI", "KR", "KW", "KG", "LA", "LV", "LB", "LS", "LR", "LY", "LI", "LT", "LU", "MO", "MK", "MG", "MW", "MY", "MV", "ML", "MT", "MH", "MQ", "MR", "MU", "YT", "MX", "MD", "MC", "MN", "ME", "MS", "MA", "MZ", "MM", "NA", "NR", "NP", "NL", "AN", "NC", "NZ", "NI", "NE", "NG", "NU", "NF", "KP", "MP", "NO", "OM", "PK", "PW", "PS", "PA", "PG", "PY", "PE", "PH", "PN", "PL", "PT", "PR", "QA", "RE", "RO", "RU", "RW", "BL", "SH", "KN", "LC", "MF", "PM", "VC", "WS", "SM", "ST", "SA", "SN", "RS", "SC", "SL", "SG", "SX", "SK", "SI", "SB", "SO", "ZA", "GS", "SS", "ES", "LK", "SD", "SR", "SJ", "SZ", "SE", "CH", "SY", "TW", "TJ", "TZ", "TH", "TL", "TG", "TK", "TO", "TT", "TN", "TR", "TM", "TC", "TV", "UG", "UA", "AE", "GB", "VI", "UM", "US", "UY", "UZ", "VU", "VE", "VN", "WF", "EH", "YE", "ZM", "ZW"]>;
|
|
277
277
|
name: z.ZodEffects<z.ZodString, string, string>;
|
|
278
278
|
phone: z.ZodEffects<z.ZodNullable<z.ZodOptional<z.ZodString>>, string, string | null | undefined>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./unit-settings";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SE } from "@shipengine/api";
|
|
1
|
+
import { SE } from "@shipengine/js-api";
|
|
2
2
|
import { UseRequestRatesProps } from "./use-request-rates";
|
|
3
3
|
export type UseRatesFormProps = {
|
|
4
4
|
onBeforeLabelCreate?: (rate: SE.Rate, shipment: SE.SalesOrderShipment) => Promise<void> | void;
|
|
@@ -5,7 +5,7 @@ export type ConnectedCarrierMetadata = {
|
|
|
5
5
|
};
|
|
6
6
|
export declare const useListConnectedCarriers: () => {
|
|
7
7
|
data: ConnectedCarrierMetadata[];
|
|
8
|
-
error: import("
|
|
8
|
+
error: import("@shipengine/react-api").CodedError[] | null;
|
|
9
9
|
isLoading: boolean;
|
|
10
|
-
refetch: <TPageData>(options?: (import("react-query").RefetchOptions & import("react-query").RefetchQueryFilters<TPageData>) | undefined) => Promise<import("react-query").QueryObserverResult<import("
|
|
10
|
+
refetch: <TPageData>(options?: (import("react-query").RefetchOptions & import("react-query").RefetchQueryFilters<TPageData>) | undefined) => Promise<import("react-query").QueryObserverResult<import("@shipengine/react-api").Carrier[], import("@shipengine/react-api").CodedError[]>>;
|
|
11
11
|
};
|
|
@@ -5,7 +5,7 @@ export type UseImportSalesOrderProps = {
|
|
|
5
5
|
salesOrderId?: string;
|
|
6
6
|
};
|
|
7
7
|
export declare const useImportSalesOrder: ({ externalOrderId, externalOrderNumber, orderSourceCode, salesOrderId, }: UseImportSalesOrderProps) => {
|
|
8
|
-
errors: import("
|
|
8
|
+
errors: import("@shipengine/react-api").CodedError[] | undefined;
|
|
9
9
|
isLoading: boolean;
|
|
10
|
-
salesOrder: import("
|
|
10
|
+
salesOrder: import("@shipengine/react-api").SalesOrder | undefined;
|
|
11
11
|
};
|
|
@@ -2,8 +2,8 @@ export type UseLoadShipmentProps = {
|
|
|
2
2
|
shipmentId: string;
|
|
3
3
|
};
|
|
4
4
|
export declare const useLoadShipment: ({ shipmentId }: UseLoadShipmentProps) => {
|
|
5
|
-
errors: import("
|
|
5
|
+
errors: import("@shipengine/react-api").CodedError[] | undefined;
|
|
6
6
|
isLoading: boolean;
|
|
7
|
-
refetchShipment: <TPageData>(options?: (import("react-query").RefetchOptions & import("react-query").RefetchQueryFilters<TPageData>) | undefined) => Promise<import("react-query").QueryObserverResult<import("
|
|
8
|
-
shipment: import("
|
|
7
|
+
refetchShipment: <TPageData>(options?: (import("react-query").RefetchOptions & import("react-query").RefetchQueryFilters<TPageData>) | undefined) => Promise<import("react-query").QueryObserverResult<import("@shipengine/react-api").SalesOrderShipment, import("@shipengine/react-api").CodedError[]>>;
|
|
8
|
+
shipment: import("@shipengine/react-api").SalesOrderShipment | undefined;
|
|
9
9
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SE } from "@shipengine/api";
|
|
1
|
+
import { SE } from "@shipengine/js-api";
|
|
2
2
|
export type UsePendingShipmentProps = {
|
|
3
3
|
onLoad?: (salesOrder: SE.SalesOrder, shipments: SE.SalesOrderShipment[], pendingShipment?: SE.SalesOrderShipment) => Promise<void> | void;
|
|
4
4
|
salesOrder?: SE.SalesOrder;
|
package/src/elements/index.d.ts
CHANGED
|
@@ -2,6 +2,5 @@ export { Element as ListCarriers } from "./list-carriers";
|
|
|
2
2
|
export { Element as ManageWarehouses } from "./manage-warehouses";
|
|
3
3
|
export { Element as PurchaseLabel } from "./purchase-label";
|
|
4
4
|
export { Element as Onboarding } from "./onboarding";
|
|
5
|
-
export { Element as WalletHistory } from "./wallet-history";
|
|
6
5
|
export { Element as ViewShipment } from "./view-shipment";
|
|
7
6
|
export { Element as VoidLabel } from "./void-label";
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Factory } from "fishery";
|
|
2
|
-
import { SE } from "@shipengine/api";
|
|
2
|
+
import { SE } from "@shipengine/js-api";
|
|
3
|
+
import { Templates } from "../../components";
|
|
3
4
|
export type AddressTransientParams = {
|
|
4
5
|
isInternational?: boolean;
|
|
5
6
|
};
|
|
@@ -25,4 +26,10 @@ type AddressPreference = SE.AddressValidation & {
|
|
|
25
26
|
* @category Factory
|
|
26
27
|
*/
|
|
27
28
|
export declare const addressPreferenceFactory: Factory<AddressPreference, any, AddressPreference>;
|
|
29
|
+
/**
|
|
30
|
+
* Mock the addressValidationPreference object used to hyrdate the address valiation feature
|
|
31
|
+
* used for warehouse management and onboarding.
|
|
32
|
+
* @category Factory
|
|
33
|
+
*/
|
|
34
|
+
export declare const addressValidationWithTypeFactory: Factory<Templates.AddressValidationPreference, any, Templates.AddressValidationPreference>;
|
|
28
35
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Factory } from "fishery";
|
|
2
|
-
import { SE } from "@shipengine/api";
|
|
2
|
+
import { SE } from "@shipengine/js-api";
|
|
3
3
|
import { MoneyTransientParams } from "./money";
|
|
4
4
|
export declare const randomPaymentStatus: () => SE.PaymentStatus;
|
|
5
5
|
export declare const randomFulfillmentStatus: () => SE.FulfillmentStatus;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Factory } from "fishery";
|
|
2
|
-
import { SE } from "@shipengine/api";
|
|
2
|
+
import { SE } from "@shipengine/js-api";
|
|
3
3
|
import { MoneyTransientParams } from "./money";
|
|
4
4
|
export declare const randomDeliveryConfirmation: () => SE.ConfirmationType;
|
|
5
5
|
export declare const randomInsuranceProvider: (allowNone?: boolean) => SE.InsuranceProviderType;
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { Factory } from "fishery";
|
|
2
|
-
import { SE } from "@shipengine/api";
|
|
3
|
-
import { Templates } from "../../components";
|
|
2
|
+
import { SE } from "@shipengine/js-api";
|
|
4
3
|
/**
|
|
5
4
|
* @category Factories
|
|
6
5
|
*/
|
|
7
6
|
export declare const warehouseFactory: Factory<SE.Warehouse, any, SE.Warehouse>;
|
|
8
|
-
export declare const warehouseAddressPreferenceFactory: Factory<Templates.WarehouseAddressPreference, any, Templates.WarehouseAddressPreference>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const styles: Record<"action" | "displayStateContainer" | "emptyStateContainer" | "gridContainer" | "linkAction" | "pagination" | "skeletonCard" | "skeletonCardColumnLeft" | "skeletonCardColumnRight" | "skeletonCardList" | "skeletonCardLogo" | "skeletonPagination", import("@emotion/serialize").Interpolation<import("@packlink/giger-theme/dist/lib/Theme").Theme>>;
|
package/src/hooks/index.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ export * from "./use-confirmation-options";
|
|
|
2
2
|
export * from "./use-country-code-options";
|
|
3
3
|
export * from "./use-customs-contents-options";
|
|
4
4
|
export * from "./use-customs-non-delivery-options";
|
|
5
|
+
export * from "./use-date-range-options";
|
|
5
6
|
export * from "./use-expiration-month-options";
|
|
6
7
|
export * from "./use-insurance-provider-options";
|
|
7
8
|
export * from "./use-package-options";
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export type DateRange = [Date, Date];
|
|
2
|
+
export type DateRangeOption = {
|
|
3
|
+
label: string;
|
|
4
|
+
} & ({
|
|
5
|
+
range: undefined;
|
|
6
|
+
value: "custom";
|
|
7
|
+
} | {
|
|
8
|
+
range: DateRange;
|
|
9
|
+
value: "last30days" | "thisMonth" | "lastMonth";
|
|
10
|
+
});
|
|
11
|
+
/**
|
|
12
|
+
* A curated list of date range options relative to the immediate date
|
|
13
|
+
*/
|
|
14
|
+
export declare const useDateRangeOptions: () => [DateRangeOption[], Record<"custom" | "last30days" | "thisMonth" | "lastMonth", DateRangeOption>];
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { SE } from "@shipengine/api";
|
|
1
|
+
import { SE } from "@shipengine/js-api";
|
|
2
2
|
import { SelectCategory } from "../../components/field/select";
|
|
3
3
|
export declare const usePackageOptions: (carriers?: SE.Carrier[], customPackageTypes?: SE.CustomPackage[], poBox?: boolean) => SelectCategory[] | undefined;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { SE } from "@shipengine/api";
|
|
1
|
+
import { SE } from "@shipengine/js-api";
|
|
2
2
|
import { SelectCategory } from "../../components/field/select";
|
|
3
3
|
export declare const useServiceCodeOptions: (carriers?: SE.Carrier[], domestic?: boolean, poBox?: boolean) => SelectCategory[];
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { SE } from "@shipengine/js-api";
|
|
3
|
+
import { Templates } from "../components";
|
|
4
|
+
export declare const useAddressValidation: () => {
|
|
5
|
+
errors: SE.CodedError[] | null;
|
|
6
|
+
setValidationPreference: import("react").Dispatch<import("react").SetStateAction<Templates.ValidationPreference | undefined>>;
|
|
7
|
+
validate: (addresses: {
|
|
8
|
+
originAddress: SE.Address;
|
|
9
|
+
returnAddress?: SE.Address;
|
|
10
|
+
}) => Promise<Templates.ValidationPreference>;
|
|
11
|
+
validationPreference: Templates.ValidationPreference | undefined;
|
|
12
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import {
|
|
2
|
+
import { ShipEngineProps } from "@shipengine/react-api";
|
|
3
3
|
export type ElementsEnvironment = `dde:${string}` | "development" | "staging" | "production";
|
|
4
4
|
export type ElementsErrorHandler = (err: Error, context: {
|
|
5
5
|
componentStack: string;
|
|
@@ -19,7 +19,7 @@ export interface ElementsProviderProps {
|
|
|
19
19
|
brandName?: string;
|
|
20
20
|
children: JSX.Element;
|
|
21
21
|
environment?: ElementsEnvironment;
|
|
22
|
-
getToken:
|
|
22
|
+
getToken: ShipEngineProps["getToken"];
|
|
23
23
|
onError?: ElementsErrorHandler;
|
|
24
24
|
proxyTarget?: string;
|
|
25
25
|
}
|
|
@@ -2,7 +2,9 @@ declare const _default: {
|
|
|
2
2
|
"wallet-history": {
|
|
3
3
|
actions: {
|
|
4
4
|
downloadCsv: string;
|
|
5
|
+
chooseDate: string;
|
|
5
6
|
};
|
|
7
|
+
dateRange: string;
|
|
6
8
|
historyOptions: {
|
|
7
9
|
custom: string;
|
|
8
10
|
last30days: string;
|
|
@@ -140,6 +142,7 @@ declare const _default: {
|
|
|
140
142
|
};
|
|
141
143
|
fields: {
|
|
142
144
|
addOns: string;
|
|
145
|
+
contentDescription: string;
|
|
143
146
|
confirmation: string;
|
|
144
147
|
dimensions: {
|
|
145
148
|
length: string;
|
|
@@ -166,6 +169,9 @@ declare const _default: {
|
|
|
166
169
|
};
|
|
167
170
|
weightGroup: string;
|
|
168
171
|
};
|
|
172
|
+
hints: {
|
|
173
|
+
contentDescription: string;
|
|
174
|
+
};
|
|
169
175
|
loading: {
|
|
170
176
|
calculatingRates: string;
|
|
171
177
|
};
|
|
@@ -200,8 +206,9 @@ declare const _default: {
|
|
|
200
206
|
action: string;
|
|
201
207
|
title: string;
|
|
202
208
|
subtitle: string;
|
|
203
|
-
|
|
204
|
-
|
|
209
|
+
welcome: string;
|
|
210
|
+
messageLine1: string;
|
|
211
|
+
messageLine2: string;
|
|
205
212
|
};
|
|
206
213
|
steps: {
|
|
207
214
|
login: string;
|
|
@@ -221,13 +228,26 @@ declare const _default: {
|
|
|
221
228
|
};
|
|
222
229
|
};
|
|
223
230
|
"manage-defaults": {
|
|
231
|
+
units: {
|
|
232
|
+
title: string;
|
|
233
|
+
dimensions: {
|
|
234
|
+
title: string;
|
|
235
|
+
standard: string;
|
|
236
|
+
metric: string;
|
|
237
|
+
};
|
|
238
|
+
weight: {
|
|
239
|
+
title: string;
|
|
240
|
+
standard: string;
|
|
241
|
+
g: string;
|
|
242
|
+
kg: string;
|
|
243
|
+
};
|
|
244
|
+
};
|
|
224
245
|
label: {
|
|
225
|
-
|
|
246
|
+
letter: {
|
|
226
247
|
title: string;
|
|
227
248
|
description: string;
|
|
228
249
|
};
|
|
229
|
-
|
|
230
|
-
letter: {
|
|
250
|
+
purchase: {
|
|
231
251
|
title: string;
|
|
232
252
|
description: string;
|
|
233
253
|
};
|
|
@@ -235,6 +255,7 @@ declare const _default: {
|
|
|
235
255
|
title: string;
|
|
236
256
|
description: string;
|
|
237
257
|
};
|
|
258
|
+
title: string;
|
|
238
259
|
};
|
|
239
260
|
};
|
|
240
261
|
"manage-warehouses": {
|
|
@@ -345,6 +366,7 @@ declare const _default: {
|
|
|
345
366
|
email: string;
|
|
346
367
|
addressResidentialIndicator: string;
|
|
347
368
|
};
|
|
369
|
+
noResults: string;
|
|
348
370
|
subFields: {
|
|
349
371
|
optional: string;
|
|
350
372
|
};
|
|
@@ -377,6 +399,9 @@ declare const _default: {
|
|
|
377
399
|
cardNumber: string;
|
|
378
400
|
expiration: string;
|
|
379
401
|
cvv: string;
|
|
402
|
+
cvvPlaceholder: string;
|
|
403
|
+
expirationPlaceholder: string;
|
|
404
|
+
cardNumberPlaceholder: string;
|
|
380
405
|
};
|
|
381
406
|
};
|
|
382
407
|
carriers: {
|
|
@@ -471,6 +496,7 @@ declare const _default: {
|
|
|
471
496
|
carriers: string;
|
|
472
497
|
data: string;
|
|
473
498
|
importingSalesOrder: string;
|
|
499
|
+
onboarding: string;
|
|
474
500
|
salesOrder: string;
|
|
475
501
|
shipment: string;
|
|
476
502
|
warehouses: string;
|
|
@@ -508,6 +534,7 @@ declare const _default: {
|
|
|
508
534
|
invalidAddressName: string;
|
|
509
535
|
invalidAddressPoBox: string;
|
|
510
536
|
invalidCreditCardType: string;
|
|
537
|
+
invalidExpiration: string;
|
|
511
538
|
invalidPostalCode: string;
|
|
512
539
|
invalidStateProvince: string;
|
|
513
540
|
invalidString: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DeepPartial } from "fishery";
|
|
2
|
-
import { SE } from "@shipengine/api";
|
|
2
|
+
import { SE } from "@shipengine/js-api";
|
|
3
3
|
export type CreateWarehouseHandlersParams = {
|
|
4
4
|
get?: DeepPartial<SE.Warehouse>;
|
|
5
5
|
list?: [count: number, listParams?: DeepPartial<SE.Warehouse>];
|
package/src/utilities/date.d.ts
CHANGED
|
@@ -33,4 +33,12 @@ export declare const sortByCreationDate: (a: HasCreationDate, b: HasCreationDate
|
|
|
33
33
|
* @category Utilities
|
|
34
34
|
*/
|
|
35
35
|
export declare const isNowOrInTheFuture: (shipDate?: string) => boolean;
|
|
36
|
+
export declare const getRelativeDates: (from?: Date) => {
|
|
37
|
+
firstDayOfMonth: Date;
|
|
38
|
+
lastDayOfTheMonth: Date;
|
|
39
|
+
origin: Date;
|
|
40
|
+
previousMonthFirstDay: Date;
|
|
41
|
+
previousMonthLastDay: Date;
|
|
42
|
+
thirtyDaysAgo: Date;
|
|
43
|
+
};
|
|
36
44
|
export {};
|