ce-storefront 0.16.3 → 0.16.4
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/esm/lib/config.d.ts +2 -2
- package/esm/lib/config.js +2 -2
- package/esm/models/components/collectinstorefulfillment.d.ts +28 -0
- package/esm/models/components/collectinstorefulfillment.d.ts.map +1 -1
- package/esm/models/components/collectinstorefulfillment.js +23 -0
- package/esm/models/components/collectinstorefulfillment.js.map +1 -1
- package/esm/models/components/collectinstorefulfillmentinput.d.ts +34 -0
- package/esm/models/components/collectinstorefulfillmentinput.d.ts.map +1 -0
- package/esm/models/components/collectinstorefulfillmentinput.js +45 -0
- package/esm/models/components/collectinstorefulfillmentinput.js.map +1 -0
- package/esm/models/components/deliveryfulfillment.d.ts +28 -0
- package/esm/models/components/deliveryfulfillment.d.ts.map +1 -1
- package/esm/models/components/deliveryfulfillment.js +23 -0
- package/esm/models/components/deliveryfulfillment.js.map +1 -1
- package/esm/models/components/fulfillmentpreferenceinput.d.ts +3 -3
- package/esm/models/components/fulfillmentpreferenceinput.d.ts.map +1 -1
- package/esm/models/components/fulfillmentpreferenceinput.js +3 -3
- package/esm/models/components/fulfillmentpreferenceinput.js.map +1 -1
- package/esm/models/components/index.d.ts +1 -0
- package/esm/models/components/index.d.ts.map +1 -1
- package/esm/models/components/index.js +1 -0
- package/esm/models/components/index.js.map +1 -1
- package/esm/models/components/partialcollectanddelivery.d.ts +34 -6
- package/esm/models/components/partialcollectanddelivery.d.ts.map +1 -1
- package/esm/models/components/partialcollectanddelivery.js +32 -6
- package/esm/models/components/partialcollectanddelivery.js.map +1 -1
- package/esm/models/components/partialcollectanddeliveryinput.d.ts +6 -6
- package/esm/models/components/partialcollectanddeliveryinput.d.ts.map +1 -1
- package/esm/models/components/partialcollectanddeliveryinput.js +6 -6
- package/esm/models/components/partialcollectanddeliveryinput.js.map +1 -1
- package/examples/package-lock.json +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/lib/config.ts +2 -2
- package/src/models/components/collectinstorefulfillment.ts +34 -0
- package/src/models/components/collectinstorefulfillmentinput.ts +89 -0
- package/src/models/components/deliveryfulfillment.ts +37 -0
- package/src/models/components/fulfillmentpreferenceinput.ts +9 -9
- package/src/models/components/index.ts +1 -0
- package/src/models/components/partialcollectanddelivery.ts +52 -12
- package/src/models/components/partialcollectanddeliveryinput.ts +12 -12
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
import * as z from "zod";
|
|
6
6
|
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
7
|
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
8
9
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
10
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
11
|
import {
|
|
@@ -14,13 +15,21 @@ import {
|
|
|
14
15
|
FulfillmentItem$outboundSchema,
|
|
15
16
|
} from "./fulfillmentitem.js";
|
|
16
17
|
|
|
18
|
+
export const PartialCollectAndDeliveryPreferenceType = {
|
|
19
|
+
User: "user",
|
|
20
|
+
Auto: "auto",
|
|
21
|
+
} as const;
|
|
22
|
+
export type PartialCollectAndDeliveryPreferenceType = ClosedEnum<
|
|
23
|
+
typeof PartialCollectAndDeliveryPreferenceType
|
|
24
|
+
>;
|
|
25
|
+
|
|
17
26
|
export type PartialCollectAndDeliveryCollectInStore = {
|
|
18
|
-
pickupLocationId
|
|
19
|
-
items
|
|
27
|
+
pickupLocationId: string;
|
|
28
|
+
items: Array<FulfillmentItem>;
|
|
20
29
|
};
|
|
21
30
|
|
|
22
31
|
export type Delivery = {
|
|
23
|
-
shippingProviderId: string
|
|
32
|
+
shippingProviderId: string;
|
|
24
33
|
shippingProviderName?: string | null | undefined;
|
|
25
34
|
courierCompanyId?: string | null | undefined;
|
|
26
35
|
courierCompanyName?: string | null | undefined;
|
|
@@ -32,18 +41,42 @@ export type Delivery = {
|
|
|
32
41
|
*/
|
|
33
42
|
export type PartialCollectAndDelivery = {
|
|
34
43
|
fulfillmentType?: "partial-collect-and-delivery" | undefined;
|
|
44
|
+
preferenceType?: PartialCollectAndDeliveryPreferenceType | undefined;
|
|
35
45
|
collectInStore: PartialCollectAndDeliveryCollectInStore;
|
|
36
46
|
delivery: Delivery;
|
|
37
47
|
};
|
|
38
48
|
|
|
49
|
+
/** @internal */
|
|
50
|
+
export const PartialCollectAndDeliveryPreferenceType$inboundSchema:
|
|
51
|
+
z.ZodNativeEnum<typeof PartialCollectAndDeliveryPreferenceType> = z
|
|
52
|
+
.nativeEnum(PartialCollectAndDeliveryPreferenceType);
|
|
53
|
+
|
|
54
|
+
/** @internal */
|
|
55
|
+
export const PartialCollectAndDeliveryPreferenceType$outboundSchema:
|
|
56
|
+
z.ZodNativeEnum<typeof PartialCollectAndDeliveryPreferenceType> =
|
|
57
|
+
PartialCollectAndDeliveryPreferenceType$inboundSchema;
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* @internal
|
|
61
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
62
|
+
*/
|
|
63
|
+
export namespace PartialCollectAndDeliveryPreferenceType$ {
|
|
64
|
+
/** @deprecated use `PartialCollectAndDeliveryPreferenceType$inboundSchema` instead. */
|
|
65
|
+
export const inboundSchema =
|
|
66
|
+
PartialCollectAndDeliveryPreferenceType$inboundSchema;
|
|
67
|
+
/** @deprecated use `PartialCollectAndDeliveryPreferenceType$outboundSchema` instead. */
|
|
68
|
+
export const outboundSchema =
|
|
69
|
+
PartialCollectAndDeliveryPreferenceType$outboundSchema;
|
|
70
|
+
}
|
|
71
|
+
|
|
39
72
|
/** @internal */
|
|
40
73
|
export const PartialCollectAndDeliveryCollectInStore$inboundSchema: z.ZodType<
|
|
41
74
|
PartialCollectAndDeliveryCollectInStore,
|
|
42
75
|
z.ZodTypeDef,
|
|
43
76
|
unknown
|
|
44
77
|
> = z.object({
|
|
45
|
-
pickup_location_id: z.string()
|
|
46
|
-
items: z.array(FulfillmentItem$inboundSchema)
|
|
78
|
+
pickup_location_id: z.string(),
|
|
79
|
+
items: z.array(FulfillmentItem$inboundSchema),
|
|
47
80
|
}).transform((v) => {
|
|
48
81
|
return remap$(v, {
|
|
49
82
|
"pickup_location_id": "pickupLocationId",
|
|
@@ -52,8 +85,8 @@ export const PartialCollectAndDeliveryCollectInStore$inboundSchema: z.ZodType<
|
|
|
52
85
|
|
|
53
86
|
/** @internal */
|
|
54
87
|
export type PartialCollectAndDeliveryCollectInStore$Outbound = {
|
|
55
|
-
pickup_location_id
|
|
56
|
-
items
|
|
88
|
+
pickup_location_id: string;
|
|
89
|
+
items: Array<FulfillmentItem$Outbound>;
|
|
57
90
|
};
|
|
58
91
|
|
|
59
92
|
/** @internal */
|
|
@@ -62,8 +95,8 @@ export const PartialCollectAndDeliveryCollectInStore$outboundSchema: z.ZodType<
|
|
|
62
95
|
z.ZodTypeDef,
|
|
63
96
|
PartialCollectAndDeliveryCollectInStore
|
|
64
97
|
> = z.object({
|
|
65
|
-
pickupLocationId: z.string()
|
|
66
|
-
items: z.array(FulfillmentItem$outboundSchema)
|
|
98
|
+
pickupLocationId: z.string(),
|
|
99
|
+
items: z.array(FulfillmentItem$outboundSchema),
|
|
67
100
|
}).transform((v) => {
|
|
68
101
|
return remap$(v, {
|
|
69
102
|
pickupLocationId: "pickup_location_id",
|
|
@@ -118,7 +151,7 @@ export const Delivery$inboundSchema: z.ZodType<
|
|
|
118
151
|
z.ZodTypeDef,
|
|
119
152
|
unknown
|
|
120
153
|
> = z.object({
|
|
121
|
-
shipping_provider_id: z.
|
|
154
|
+
shipping_provider_id: z.string(),
|
|
122
155
|
shipping_provider_name: z.nullable(z.string()).optional(),
|
|
123
156
|
courier_company_id: z.nullable(z.string()).optional(),
|
|
124
157
|
courier_company_name: z.nullable(z.string()).optional(),
|
|
@@ -134,7 +167,7 @@ export const Delivery$inboundSchema: z.ZodType<
|
|
|
134
167
|
|
|
135
168
|
/** @internal */
|
|
136
169
|
export type Delivery$Outbound = {
|
|
137
|
-
shipping_provider_id: string
|
|
170
|
+
shipping_provider_id: string;
|
|
138
171
|
shipping_provider_name?: string | null | undefined;
|
|
139
172
|
courier_company_id?: string | null | undefined;
|
|
140
173
|
courier_company_name?: string | null | undefined;
|
|
@@ -147,7 +180,7 @@ export const Delivery$outboundSchema: z.ZodType<
|
|
|
147
180
|
z.ZodTypeDef,
|
|
148
181
|
Delivery
|
|
149
182
|
> = z.object({
|
|
150
|
-
shippingProviderId: z.
|
|
183
|
+
shippingProviderId: z.string(),
|
|
151
184
|
shippingProviderName: z.nullable(z.string()).optional(),
|
|
152
185
|
courierCompanyId: z.nullable(z.string()).optional(),
|
|
153
186
|
courierCompanyName: z.nullable(z.string()).optional(),
|
|
@@ -197,6 +230,8 @@ export const PartialCollectAndDelivery$inboundSchema: z.ZodType<
|
|
|
197
230
|
fulfillment_type: z.literal("partial-collect-and-delivery").default(
|
|
198
231
|
"partial-collect-and-delivery",
|
|
199
232
|
).optional(),
|
|
233
|
+
preference_type: PartialCollectAndDeliveryPreferenceType$inboundSchema
|
|
234
|
+
.optional(),
|
|
200
235
|
"collect-in-store": z.lazy(() =>
|
|
201
236
|
PartialCollectAndDeliveryCollectInStore$inboundSchema
|
|
202
237
|
),
|
|
@@ -204,6 +239,7 @@ export const PartialCollectAndDelivery$inboundSchema: z.ZodType<
|
|
|
204
239
|
}).transform((v) => {
|
|
205
240
|
return remap$(v, {
|
|
206
241
|
"fulfillment_type": "fulfillmentType",
|
|
242
|
+
"preference_type": "preferenceType",
|
|
207
243
|
"collect-in-store": "collectInStore",
|
|
208
244
|
});
|
|
209
245
|
});
|
|
@@ -211,6 +247,7 @@ export const PartialCollectAndDelivery$inboundSchema: z.ZodType<
|
|
|
211
247
|
/** @internal */
|
|
212
248
|
export type PartialCollectAndDelivery$Outbound = {
|
|
213
249
|
fulfillment_type: "partial-collect-and-delivery";
|
|
250
|
+
preference_type?: string | undefined;
|
|
214
251
|
"collect-in-store": PartialCollectAndDeliveryCollectInStore$Outbound;
|
|
215
252
|
delivery: Delivery$Outbound;
|
|
216
253
|
};
|
|
@@ -224,6 +261,8 @@ export const PartialCollectAndDelivery$outboundSchema: z.ZodType<
|
|
|
224
261
|
fulfillmentType: z.literal("partial-collect-and-delivery").default(
|
|
225
262
|
"partial-collect-and-delivery" as const,
|
|
226
263
|
),
|
|
264
|
+
preferenceType: PartialCollectAndDeliveryPreferenceType$outboundSchema
|
|
265
|
+
.optional(),
|
|
227
266
|
collectInStore: z.lazy(() =>
|
|
228
267
|
PartialCollectAndDeliveryCollectInStore$outboundSchema
|
|
229
268
|
),
|
|
@@ -231,6 +270,7 @@ export const PartialCollectAndDelivery$outboundSchema: z.ZodType<
|
|
|
231
270
|
}).transform((v) => {
|
|
232
271
|
return remap$(v, {
|
|
233
272
|
fulfillmentType: "fulfillment_type",
|
|
273
|
+
preferenceType: "preference_type",
|
|
234
274
|
collectInStore: "collect-in-store",
|
|
235
275
|
});
|
|
236
276
|
});
|
|
@@ -15,12 +15,12 @@ import {
|
|
|
15
15
|
} from "./fulfillmentiteminput.js";
|
|
16
16
|
|
|
17
17
|
export type PartialCollectAndDeliveryCollectInStoreInput = {
|
|
18
|
-
pickupLocationId
|
|
19
|
-
items
|
|
18
|
+
pickupLocationId: string;
|
|
19
|
+
items: Array<FulfillmentItemInput>;
|
|
20
20
|
};
|
|
21
21
|
|
|
22
22
|
export type PartialCollectAndDeliveryDelivery = {
|
|
23
|
-
shippingProviderId: string
|
|
23
|
+
shippingProviderId: string;
|
|
24
24
|
courierCompanyId?: string | null | undefined;
|
|
25
25
|
items: Array<FulfillmentItemInput>;
|
|
26
26
|
};
|
|
@@ -41,8 +41,8 @@ export const PartialCollectAndDeliveryCollectInStoreInput$inboundSchema:
|
|
|
41
41
|
z.ZodTypeDef,
|
|
42
42
|
unknown
|
|
43
43
|
> = z.object({
|
|
44
|
-
pickup_location_id: z.string()
|
|
45
|
-
items: z.array(FulfillmentItemInput$inboundSchema)
|
|
44
|
+
pickup_location_id: z.string(),
|
|
45
|
+
items: z.array(FulfillmentItemInput$inboundSchema),
|
|
46
46
|
}).transform((v) => {
|
|
47
47
|
return remap$(v, {
|
|
48
48
|
"pickup_location_id": "pickupLocationId",
|
|
@@ -51,8 +51,8 @@ export const PartialCollectAndDeliveryCollectInStoreInput$inboundSchema:
|
|
|
51
51
|
|
|
52
52
|
/** @internal */
|
|
53
53
|
export type PartialCollectAndDeliveryCollectInStoreInput$Outbound = {
|
|
54
|
-
pickup_location_id
|
|
55
|
-
items
|
|
54
|
+
pickup_location_id: string;
|
|
55
|
+
items: Array<FulfillmentItemInput$Outbound>;
|
|
56
56
|
};
|
|
57
57
|
|
|
58
58
|
/** @internal */
|
|
@@ -62,8 +62,8 @@ export const PartialCollectAndDeliveryCollectInStoreInput$outboundSchema:
|
|
|
62
62
|
z.ZodTypeDef,
|
|
63
63
|
PartialCollectAndDeliveryCollectInStoreInput
|
|
64
64
|
> = z.object({
|
|
65
|
-
pickupLocationId: z.string()
|
|
66
|
-
items: z.array(FulfillmentItemInput$outboundSchema)
|
|
65
|
+
pickupLocationId: z.string(),
|
|
66
|
+
items: z.array(FulfillmentItemInput$outboundSchema),
|
|
67
67
|
}).transform((v) => {
|
|
68
68
|
return remap$(v, {
|
|
69
69
|
pickupLocationId: "pickup_location_id",
|
|
@@ -118,7 +118,7 @@ export const PartialCollectAndDeliveryDelivery$inboundSchema: z.ZodType<
|
|
|
118
118
|
z.ZodTypeDef,
|
|
119
119
|
unknown
|
|
120
120
|
> = z.object({
|
|
121
|
-
shipping_provider_id: z.
|
|
121
|
+
shipping_provider_id: z.string(),
|
|
122
122
|
courier_company_id: z.nullable(z.string()).optional(),
|
|
123
123
|
items: z.array(FulfillmentItemInput$inboundSchema),
|
|
124
124
|
}).transform((v) => {
|
|
@@ -130,7 +130,7 @@ export const PartialCollectAndDeliveryDelivery$inboundSchema: z.ZodType<
|
|
|
130
130
|
|
|
131
131
|
/** @internal */
|
|
132
132
|
export type PartialCollectAndDeliveryDelivery$Outbound = {
|
|
133
|
-
shipping_provider_id: string
|
|
133
|
+
shipping_provider_id: string;
|
|
134
134
|
courier_company_id?: string | null | undefined;
|
|
135
135
|
items: Array<FulfillmentItemInput$Outbound>;
|
|
136
136
|
};
|
|
@@ -141,7 +141,7 @@ export const PartialCollectAndDeliveryDelivery$outboundSchema: z.ZodType<
|
|
|
141
141
|
z.ZodTypeDef,
|
|
142
142
|
PartialCollectAndDeliveryDelivery
|
|
143
143
|
> = z.object({
|
|
144
|
-
shippingProviderId: z.
|
|
144
|
+
shippingProviderId: z.string(),
|
|
145
145
|
courierCompanyId: z.nullable(z.string()).optional(),
|
|
146
146
|
items: z.array(FulfillmentItemInput$outboundSchema),
|
|
147
147
|
}).transform((v) => {
|