@shipengine/elements 0.28.0 → 0.30.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.
@@ -1,5 +1,5 @@
1
1
  import { z } from "zod";
2
- import { CreditCardVendor } from "@shipengine/alchemy";
2
+ import { Provider } from "@shipengine/alchemy";
3
3
  export declare const billingAddressSchema: z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodObject<z.extendShape<{
4
4
  addressLine1: z.ZodString;
5
5
  addressLine2: z.ZodEffects<z.ZodNullable<z.ZodOptional<z.ZodString>>, string | undefined, string | null | undefined>;
@@ -14,6 +14,7 @@ export declare const billingAddressSchema: z.ZodEffects<z.ZodEffects<z.ZodEffect
14
14
  addressLine1: z.ZodEffects<z.ZodString, string, string>;
15
15
  addressLine2: z.ZodEffects<z.ZodEffects<z.ZodNullable<z.ZodOptional<z.ZodString>>, string | undefined, string | null | undefined>, string | undefined, string | null | undefined>;
16
16
  companyName: z.ZodString;
17
+ email: z.ZodEffects<z.ZodNullable<z.ZodOptional<z.ZodString>>, string, string | null | undefined>;
17
18
  phone: z.ZodString;
18
19
  }>, "strip", z.ZodTypeAny, {
19
20
  addressLine2?: string | undefined;
@@ -25,9 +26,11 @@ export declare const billingAddressSchema: z.ZodEffects<z.ZodEffects<z.ZodEffect
25
26
  phone: string;
26
27
  postalCode: string;
27
28
  stateProvince: string;
29
+ email: string;
28
30
  }, {
29
31
  addressLine2?: string | null | undefined;
30
32
  stateProvince?: string | null | undefined;
33
+ email?: string | null | undefined;
31
34
  addressLine1: string;
32
35
  cityLocality: string;
33
36
  companyName: string;
@@ -45,9 +48,11 @@ export declare const billingAddressSchema: z.ZodEffects<z.ZodEffects<z.ZodEffect
45
48
  phone: string;
46
49
  postalCode: string;
47
50
  stateProvince: string;
51
+ email: string;
48
52
  }, {
49
53
  addressLine2?: string | null | undefined;
50
54
  stateProvince?: string | null | undefined;
55
+ email?: string | null | undefined;
51
56
  addressLine1: string;
52
57
  cityLocality: string;
53
58
  companyName: string;
@@ -65,9 +70,11 @@ export declare const billingAddressSchema: z.ZodEffects<z.ZodEffects<z.ZodEffect
65
70
  phone: string;
66
71
  postalCode: string;
67
72
  stateProvince: string;
73
+ email: string;
68
74
  }, {
69
75
  addressLine2?: string | null | undefined;
70
76
  stateProvince?: string | null | undefined;
77
+ email?: string | null | undefined;
71
78
  addressLine1: string;
72
79
  cityLocality: string;
73
80
  companyName: string;
@@ -85,9 +92,11 @@ export declare const billingAddressSchema: z.ZodEffects<z.ZodEffects<z.ZodEffect
85
92
  phone: string;
86
93
  postalCode: string;
87
94
  stateProvince: string;
95
+ email: string;
88
96
  }, {
89
97
  addressLine2?: string | null | undefined;
90
98
  stateProvince?: string | null | undefined;
99
+ email?: string | null | undefined;
91
100
  addressLine1: string;
92
101
  cityLocality: string;
93
102
  companyName: string;
@@ -113,6 +122,7 @@ export declare const walletSchema: z.ZodObject<{
113
122
  addressLine1: z.ZodEffects<z.ZodString, string, string>;
114
123
  addressLine2: z.ZodEffects<z.ZodEffects<z.ZodNullable<z.ZodOptional<z.ZodString>>, string | undefined, string | null | undefined>, string | undefined, string | null | undefined>;
115
124
  companyName: z.ZodString;
125
+ email: z.ZodEffects<z.ZodNullable<z.ZodOptional<z.ZodString>>, string, string | null | undefined>;
116
126
  phone: z.ZodString;
117
127
  }>, "strip", z.ZodTypeAny, {
118
128
  addressLine2?: string | undefined;
@@ -124,9 +134,11 @@ export declare const walletSchema: z.ZodObject<{
124
134
  phone: string;
125
135
  postalCode: string;
126
136
  stateProvince: string;
137
+ email: string;
127
138
  }, {
128
139
  addressLine2?: string | null | undefined;
129
140
  stateProvince?: string | null | undefined;
141
+ email?: string | null | undefined;
130
142
  addressLine1: string;
131
143
  cityLocality: string;
132
144
  companyName: string;
@@ -144,9 +156,11 @@ export declare const walletSchema: z.ZodObject<{
144
156
  phone: string;
145
157
  postalCode: string;
146
158
  stateProvince: string;
159
+ email: string;
147
160
  }, {
148
161
  addressLine2?: string | null | undefined;
149
162
  stateProvince?: string | null | undefined;
163
+ email?: string | null | undefined;
150
164
  addressLine1: string;
151
165
  cityLocality: string;
152
166
  companyName: string;
@@ -164,9 +178,11 @@ export declare const walletSchema: z.ZodObject<{
164
178
  phone: string;
165
179
  postalCode: string;
166
180
  stateProvince: string;
181
+ email: string;
167
182
  }, {
168
183
  addressLine2?: string | null | undefined;
169
184
  stateProvince?: string | null | undefined;
185
+ email?: string | null | undefined;
170
186
  addressLine1: string;
171
187
  cityLocality: string;
172
188
  companyName: string;
@@ -184,9 +200,11 @@ export declare const walletSchema: z.ZodObject<{
184
200
  phone: string;
185
201
  postalCode: string;
186
202
  stateProvince: string;
203
+ email: string;
187
204
  }, {
188
205
  addressLine2?: string | null | undefined;
189
206
  stateProvince?: string | null | undefined;
207
+ email?: string | null | undefined;
190
208
  addressLine1: string;
191
209
  cityLocality: string;
192
210
  companyName: string;
@@ -216,7 +234,7 @@ export declare const walletSchema: z.ZodObject<{
216
234
  expirationMonth: number;
217
235
  expirationYear: number;
218
236
  name: string;
219
- provider: CreditCardVendor;
237
+ provider: Provider;
220
238
  }, {
221
239
  number: string;
222
240
  name: string;
@@ -234,6 +252,7 @@ export declare const walletSchema: z.ZodObject<{
234
252
  phone: string;
235
253
  postalCode: string;
236
254
  stateProvince: string;
255
+ email: string;
237
256
  };
238
257
  creditCard: {
239
258
  cardNumber: string;
@@ -241,12 +260,13 @@ export declare const walletSchema: z.ZodObject<{
241
260
  expirationMonth: number;
242
261
  expirationYear: number;
243
262
  name: string;
244
- provider: CreditCardVendor;
263
+ provider: Provider;
245
264
  };
246
265
  }, {
247
266
  address: {
248
267
  addressLine2?: string | null | undefined;
249
268
  stateProvince?: string | null | undefined;
269
+ email?: string | null | undefined;
250
270
  addressLine1: string;
251
271
  cityLocality: string;
252
272
  companyName: string;
@@ -212,6 +212,7 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
212
212
  shipment: string;
213
213
  rate_one: string;
214
214
  rate_other: string;
215
+ payment: string;
215
216
  };
216
217
  };
217
218
  "payment-method": {
@@ -9,6 +9,7 @@ export type UseAddressProps = {
9
9
  shipment?: SE.SalesOrderShipment;
10
10
  };
11
11
  export declare const useAddress: ({ compatibleCountryCodes, onChange, onValidation, salesOrder, shipment, }: UseAddressProps) => {
12
+ addressLoading: boolean;
12
13
  addressErrors: SE.CodedError[] | undefined;
13
14
  addressPreference: Templates.AddressPreference | undefined;
14
15
  charsetWarning: Templates.CharsetWarning | undefined;
@@ -13,6 +13,7 @@ export type UseShipmentFormProps = {
13
13
  shipment?: SE.SalesOrderShipment;
14
14
  };
15
15
  export declare const useShipmentForm: ({ compatibleCountryCodes, onAddressValidation, onApplyPreset, onChangeAddress, onShipmentUpdated, onSubmit, salesOrder, shipment, }: UseShipmentFormProps) => {
16
+ addressLoading: boolean;
16
17
  addressPreference: import("../../../components/templates").AddressPreference | undefined;
17
18
  carriers: SE.Carrier[] | undefined;
18
19
  charsetWarning: import("../../../components/templates").CharsetWarning | undefined;
@@ -214,6 +214,7 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
214
214
  shipment: string;
215
215
  rate_one: string;
216
216
  rate_other: string;
217
+ payment: string;
217
218
  };
218
219
  };
219
220
  "payment-method": {
@@ -233,6 +233,7 @@ export declare const Element: ({ resources, ...props }: ElementProps & {
233
233
  shipment: string;
234
234
  rate_one: string;
235
235
  rate_other: string;
236
+ payment: string;
236
237
  };
237
238
  };
238
239
  "payment-method": {
@@ -218,6 +218,7 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
218
218
  shipment: string;
219
219
  rate_one: string;
220
220
  rate_other: string;
221
+ payment: string;
221
222
  };
222
223
  };
223
224
  "payment-method": {
@@ -221,6 +221,7 @@ export declare const Element: ({ resources, ...props }: ComponentProps & {
221
221
  shipment: string;
222
222
  rate_one: string;
223
223
  rate_other: string;
224
+ payment: string;
224
225
  };
225
226
  };
226
227
  "payment-method": {
@@ -1,6 +1,7 @@
1
- export declare const useGetOrCreateShipment: (shipmentId?: string) => {
1
+ import { SalesOrderShipment } from "@shipengine/alchemy";
2
+ export declare const useGetOrCreateShipment: (onShipmentUpdated: ((shipment: SalesOrderShipment) => void | Promise<void>) | undefined, shipmentId?: string) => {
2
3
  errors: import("@shipengine/alchemy").CodedError[] | undefined;
3
4
  isLoading: boolean;
4
- refetchShipment: <TPageData>(options?: (import("react-query").RefetchOptions & import("react-query").RefetchQueryFilters<TPageData>) | undefined) => Promise<import("react-query").QueryObserverResult<import("@shipengine/alchemy").SalesOrderShipment, import("@shipengine/alchemy").CodedError[]>>;
5
- shipment: import("@shipengine/alchemy").SalesOrderShipment | undefined;
5
+ refetchShipment: <TPageData>(options?: (import("react-query").RefetchOptions & import("react-query").RefetchQueryFilters<TPageData>) | undefined) => Promise<import("react-query").QueryObserverResult<SalesOrderShipment, import("@shipengine/alchemy").CodedError[]>>;
6
+ shipment: SalesOrderShipment | undefined;
6
7
  };
@@ -205,6 +205,7 @@ declare const _default: {
205
205
  shipment: string;
206
206
  rate_one: string;
207
207
  rate_other: string;
208
+ payment: string;
208
209
  };
209
210
  };
210
211
  "payment-method": {
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { prettyFormat as __ } from "@testing-library/dom/types/pretty-dom";
2
3
  import { UserEvent } from "@testing-library/user-event/dist/types/setup/setup";
3
4
  import { IconNames, Theme } from "@packlink/giger-theme";