ce-storefront 0.16.0 → 0.16.1

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.
Files changed (59) hide show
  1. package/esm/lib/config.d.ts +2 -2
  2. package/esm/lib/config.js +2 -2
  3. package/esm/models/components/cart.d.ts +0 -11
  4. package/esm/models/components/cart.d.ts.map +1 -1
  5. package/esm/models/components/cart.js +0 -21
  6. package/esm/models/components/cart.js.map +1 -1
  7. package/esm/models/components/fulfillmentitem.d.ts +40 -0
  8. package/esm/models/components/fulfillmentitem.d.ts.map +1 -0
  9. package/esm/models/components/fulfillmentitem.js +54 -0
  10. package/esm/models/components/fulfillmentitem.js.map +1 -0
  11. package/esm/models/components/fulfillmentiteminput.d.ts +36 -0
  12. package/esm/models/components/fulfillmentiteminput.d.ts.map +1 -0
  13. package/esm/models/components/fulfillmentiteminput.js +46 -0
  14. package/esm/models/components/fulfillmentiteminput.js.map +1 -0
  15. package/esm/models/components/fulfillmentpreference.d.ts +2 -2
  16. package/esm/models/components/fulfillmentpreference.js +2 -2
  17. package/esm/models/components/index.d.ts +2 -1
  18. package/esm/models/components/index.d.ts.map +1 -1
  19. package/esm/models/components/index.js +2 -1
  20. package/esm/models/components/index.js.map +1 -1
  21. package/esm/models/components/order.d.ts +0 -11
  22. package/esm/models/components/order.d.ts.map +1 -1
  23. package/esm/models/components/order.js +0 -21
  24. package/esm/models/components/order.js.map +1 -1
  25. package/esm/models/components/orderdetail.d.ts +0 -11
  26. package/esm/models/components/orderdetail.d.ts.map +1 -1
  27. package/esm/models/components/orderdetail.js +0 -21
  28. package/esm/models/components/orderdetail.js.map +1 -1
  29. package/esm/models/components/partialcollectanddelivery.d.ts +24 -112
  30. package/esm/models/components/partialcollectanddelivery.d.ts.map +1 -1
  31. package/esm/models/components/partialcollectanddelivery.js +28 -136
  32. package/esm/models/components/partialcollectanddelivery.js.map +1 -1
  33. package/esm/models/components/partialcollectanddeliveryinput.d.ts +24 -104
  34. package/esm/models/components/partialcollectanddeliveryinput.d.ts.map +1 -1
  35. package/esm/models/components/partialcollectanddeliveryinput.js +28 -118
  36. package/esm/models/components/partialcollectanddeliveryinput.js.map +1 -1
  37. package/esm/models/operations/updatefulfillmentpreference.d.ts +4 -4
  38. package/esm/models/operations/updatefulfillmentpreference.d.ts.map +1 -1
  39. package/esm/models/operations/updatefulfillmentpreference.js +4 -4
  40. package/esm/models/operations/updatefulfillmentpreference.js.map +1 -1
  41. package/examples/package-lock.json +1 -1
  42. package/jsr.json +1 -1
  43. package/package.json +1 -1
  44. package/src/lib/config.ts +2 -2
  45. package/src/models/components/cart.ts +0 -35
  46. package/src/models/components/fulfillmentitem.ts +98 -0
  47. package/src/models/components/fulfillmentiteminput.ts +88 -0
  48. package/src/models/components/fulfillmentpreference.ts +4 -4
  49. package/src/models/components/index.ts +2 -1
  50. package/src/models/components/order.ts +0 -35
  51. package/src/models/components/orderdetail.ts +0 -35
  52. package/src/models/components/partialcollectanddelivery.ts +66 -249
  53. package/src/models/components/partialcollectanddeliveryinput.ts +58 -264
  54. package/src/models/operations/updatefulfillmentpreference.ts +8 -8
  55. package/esm/models/components/fulfillmenttype.d.ts +0 -37
  56. package/esm/models/components/fulfillmenttype.d.ts.map +0 -1
  57. package/esm/models/components/fulfillmenttype.js +0 -28
  58. package/esm/models/components/fulfillmenttype.js.map +0 -1
  59. package/src/models/components/fulfillmenttype.ts +0 -40
@@ -7,32 +7,22 @@ import { remap as remap$ } from "../../lib/primitives.js";
7
7
  import { safeParse } from "../../lib/schemas.js";
8
8
  import { Result as SafeParseResult } from "../../types/fp.js";
9
9
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
-
11
- export type PartialCollectAndDeliveryItemsInput = {
12
- productId: string;
13
- variantId: string | null;
14
- quantity: number;
15
- };
16
-
17
- export type PartialCollectAndDeliveryPickup = {
18
- items?: Array<PartialCollectAndDeliveryItemsInput> | undefined;
19
- };
20
-
21
- export type PartialCollectAndDeliveryPreferenceItemsInput = {
22
- productId: string;
23
- variantId: string | null;
24
- quantity: number;
10
+ import {
11
+ FulfillmentItemInput,
12
+ FulfillmentItemInput$inboundSchema,
13
+ FulfillmentItemInput$Outbound,
14
+ FulfillmentItemInput$outboundSchema,
15
+ } from "./fulfillmentiteminput.js";
16
+
17
+ export type PartialCollectAndDeliveryCollectInStoreInput = {
18
+ pickupLocationId?: string | undefined;
19
+ items?: Array<FulfillmentItemInput> | undefined;
25
20
  };
26
21
 
27
22
  export type PartialCollectAndDeliveryDelivery = {
28
23
  shippingProviderId: string | null;
29
24
  courierCompanyId?: string | null | undefined;
30
- items: Array<PartialCollectAndDeliveryPreferenceItemsInput>;
31
- };
32
-
33
- export type PartialCollectAndDeliveryPreference = {
34
- pickup: PartialCollectAndDeliveryPickup;
35
- delivery: PartialCollectAndDeliveryDelivery;
25
+ items: Array<FulfillmentItemInput>;
36
26
  };
37
27
 
38
28
  /**
@@ -40,182 +30,43 @@ export type PartialCollectAndDeliveryPreference = {
40
30
  */
41
31
  export type PartialCollectAndDeliveryInput = {
42
32
  fulfillmentType?: "partial-collect-and-delivery" | undefined;
43
- preference: PartialCollectAndDeliveryPreference;
44
- };
45
-
46
- /** @internal */
47
- export const PartialCollectAndDeliveryItemsInput$inboundSchema: z.ZodType<
48
- PartialCollectAndDeliveryItemsInput,
49
- z.ZodTypeDef,
50
- unknown
51
- > = z.object({
52
- product_id: z.string(),
53
- variant_id: z.nullable(z.string()),
54
- quantity: z.number().int(),
55
- }).transform((v) => {
56
- return remap$(v, {
57
- "product_id": "productId",
58
- "variant_id": "variantId",
59
- });
60
- });
61
-
62
- /** @internal */
63
- export type PartialCollectAndDeliveryItemsInput$Outbound = {
64
- product_id: string;
65
- variant_id: string | null;
66
- quantity: number;
67
- };
68
-
69
- /** @internal */
70
- export const PartialCollectAndDeliveryItemsInput$outboundSchema: z.ZodType<
71
- PartialCollectAndDeliveryItemsInput$Outbound,
72
- z.ZodTypeDef,
73
- PartialCollectAndDeliveryItemsInput
74
- > = z.object({
75
- productId: z.string(),
76
- variantId: z.nullable(z.string()),
77
- quantity: z.number().int(),
78
- }).transform((v) => {
79
- return remap$(v, {
80
- productId: "product_id",
81
- variantId: "variant_id",
82
- });
83
- });
84
-
85
- /**
86
- * @internal
87
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
88
- */
89
- export namespace PartialCollectAndDeliveryItemsInput$ {
90
- /** @deprecated use `PartialCollectAndDeliveryItemsInput$inboundSchema` instead. */
91
- export const inboundSchema =
92
- PartialCollectAndDeliveryItemsInput$inboundSchema;
93
- /** @deprecated use `PartialCollectAndDeliveryItemsInput$outboundSchema` instead. */
94
- export const outboundSchema =
95
- PartialCollectAndDeliveryItemsInput$outboundSchema;
96
- /** @deprecated use `PartialCollectAndDeliveryItemsInput$Outbound` instead. */
97
- export type Outbound = PartialCollectAndDeliveryItemsInput$Outbound;
98
- }
99
-
100
- export function partialCollectAndDeliveryItemsInputToJSON(
101
- partialCollectAndDeliveryItemsInput: PartialCollectAndDeliveryItemsInput,
102
- ): string {
103
- return JSON.stringify(
104
- PartialCollectAndDeliveryItemsInput$outboundSchema.parse(
105
- partialCollectAndDeliveryItemsInput,
106
- ),
107
- );
108
- }
109
-
110
- export function partialCollectAndDeliveryItemsInputFromJSON(
111
- jsonString: string,
112
- ): SafeParseResult<PartialCollectAndDeliveryItemsInput, SDKValidationError> {
113
- return safeParse(
114
- jsonString,
115
- (x) =>
116
- PartialCollectAndDeliveryItemsInput$inboundSchema.parse(JSON.parse(x)),
117
- `Failed to parse 'PartialCollectAndDeliveryItemsInput' from JSON`,
118
- );
119
- }
120
-
121
- /** @internal */
122
- export const PartialCollectAndDeliveryPickup$inboundSchema: z.ZodType<
123
- PartialCollectAndDeliveryPickup,
124
- z.ZodTypeDef,
125
- unknown
126
- > = z.object({
127
- items: z.array(
128
- z.lazy(() => PartialCollectAndDeliveryItemsInput$inboundSchema),
129
- ).optional(),
130
- });
131
-
132
- /** @internal */
133
- export type PartialCollectAndDeliveryPickup$Outbound = {
134
- items?: Array<PartialCollectAndDeliveryItemsInput$Outbound> | undefined;
33
+ collectInStore: PartialCollectAndDeliveryCollectInStoreInput;
34
+ delivery: PartialCollectAndDeliveryDelivery;
135
35
  };
136
36
 
137
37
  /** @internal */
138
- export const PartialCollectAndDeliveryPickup$outboundSchema: z.ZodType<
139
- PartialCollectAndDeliveryPickup$Outbound,
140
- z.ZodTypeDef,
141
- PartialCollectAndDeliveryPickup
142
- > = z.object({
143
- items: z.array(
144
- z.lazy(() => PartialCollectAndDeliveryItemsInput$outboundSchema),
145
- ).optional(),
146
- });
147
-
148
- /**
149
- * @internal
150
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
151
- */
152
- export namespace PartialCollectAndDeliveryPickup$ {
153
- /** @deprecated use `PartialCollectAndDeliveryPickup$inboundSchema` instead. */
154
- export const inboundSchema = PartialCollectAndDeliveryPickup$inboundSchema;
155
- /** @deprecated use `PartialCollectAndDeliveryPickup$outboundSchema` instead. */
156
- export const outboundSchema = PartialCollectAndDeliveryPickup$outboundSchema;
157
- /** @deprecated use `PartialCollectAndDeliveryPickup$Outbound` instead. */
158
- export type Outbound = PartialCollectAndDeliveryPickup$Outbound;
159
- }
160
-
161
- export function partialCollectAndDeliveryPickupToJSON(
162
- partialCollectAndDeliveryPickup: PartialCollectAndDeliveryPickup,
163
- ): string {
164
- return JSON.stringify(
165
- PartialCollectAndDeliveryPickup$outboundSchema.parse(
166
- partialCollectAndDeliveryPickup,
167
- ),
168
- );
169
- }
170
-
171
- export function partialCollectAndDeliveryPickupFromJSON(
172
- jsonString: string,
173
- ): SafeParseResult<PartialCollectAndDeliveryPickup, SDKValidationError> {
174
- return safeParse(
175
- jsonString,
176
- (x) => PartialCollectAndDeliveryPickup$inboundSchema.parse(JSON.parse(x)),
177
- `Failed to parse 'PartialCollectAndDeliveryPickup' from JSON`,
178
- );
179
- }
180
-
181
- /** @internal */
182
- export const PartialCollectAndDeliveryPreferenceItemsInput$inboundSchema:
38
+ export const PartialCollectAndDeliveryCollectInStoreInput$inboundSchema:
183
39
  z.ZodType<
184
- PartialCollectAndDeliveryPreferenceItemsInput,
40
+ PartialCollectAndDeliveryCollectInStoreInput,
185
41
  z.ZodTypeDef,
186
42
  unknown
187
43
  > = z.object({
188
- product_id: z.string(),
189
- variant_id: z.nullable(z.string()),
190
- quantity: z.number().int(),
44
+ pickup_location_id: z.string().optional(),
45
+ items: z.array(FulfillmentItemInput$inboundSchema).optional(),
191
46
  }).transform((v) => {
192
47
  return remap$(v, {
193
- "product_id": "productId",
194
- "variant_id": "variantId",
48
+ "pickup_location_id": "pickupLocationId",
195
49
  });
196
50
  });
197
51
 
198
52
  /** @internal */
199
- export type PartialCollectAndDeliveryPreferenceItemsInput$Outbound = {
200
- product_id: string;
201
- variant_id: string | null;
202
- quantity: number;
53
+ export type PartialCollectAndDeliveryCollectInStoreInput$Outbound = {
54
+ pickup_location_id?: string | undefined;
55
+ items?: Array<FulfillmentItemInput$Outbound> | undefined;
203
56
  };
204
57
 
205
58
  /** @internal */
206
- export const PartialCollectAndDeliveryPreferenceItemsInput$outboundSchema:
59
+ export const PartialCollectAndDeliveryCollectInStoreInput$outboundSchema:
207
60
  z.ZodType<
208
- PartialCollectAndDeliveryPreferenceItemsInput$Outbound,
61
+ PartialCollectAndDeliveryCollectInStoreInput$Outbound,
209
62
  z.ZodTypeDef,
210
- PartialCollectAndDeliveryPreferenceItemsInput
63
+ PartialCollectAndDeliveryCollectInStoreInput
211
64
  > = z.object({
212
- productId: z.string(),
213
- variantId: z.nullable(z.string()),
214
- quantity: z.number().int(),
65
+ pickupLocationId: z.string().optional(),
66
+ items: z.array(FulfillmentItemInput$outboundSchema).optional(),
215
67
  }).transform((v) => {
216
68
  return remap$(v, {
217
- productId: "product_id",
218
- variantId: "variant_id",
69
+ pickupLocationId: "pickup_location_id",
219
70
  });
220
71
  });
221
72
 
@@ -223,41 +74,41 @@ export const PartialCollectAndDeliveryPreferenceItemsInput$outboundSchema:
223
74
  * @internal
224
75
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
225
76
  */
226
- export namespace PartialCollectAndDeliveryPreferenceItemsInput$ {
227
- /** @deprecated use `PartialCollectAndDeliveryPreferenceItemsInput$inboundSchema` instead. */
77
+ export namespace PartialCollectAndDeliveryCollectInStoreInput$ {
78
+ /** @deprecated use `PartialCollectAndDeliveryCollectInStoreInput$inboundSchema` instead. */
228
79
  export const inboundSchema =
229
- PartialCollectAndDeliveryPreferenceItemsInput$inboundSchema;
230
- /** @deprecated use `PartialCollectAndDeliveryPreferenceItemsInput$outboundSchema` instead. */
80
+ PartialCollectAndDeliveryCollectInStoreInput$inboundSchema;
81
+ /** @deprecated use `PartialCollectAndDeliveryCollectInStoreInput$outboundSchema` instead. */
231
82
  export const outboundSchema =
232
- PartialCollectAndDeliveryPreferenceItemsInput$outboundSchema;
233
- /** @deprecated use `PartialCollectAndDeliveryPreferenceItemsInput$Outbound` instead. */
234
- export type Outbound = PartialCollectAndDeliveryPreferenceItemsInput$Outbound;
83
+ PartialCollectAndDeliveryCollectInStoreInput$outboundSchema;
84
+ /** @deprecated use `PartialCollectAndDeliveryCollectInStoreInput$Outbound` instead. */
85
+ export type Outbound = PartialCollectAndDeliveryCollectInStoreInput$Outbound;
235
86
  }
236
87
 
237
- export function partialCollectAndDeliveryPreferenceItemsInputToJSON(
238
- partialCollectAndDeliveryPreferenceItemsInput:
239
- PartialCollectAndDeliveryPreferenceItemsInput,
88
+ export function partialCollectAndDeliveryCollectInStoreInputToJSON(
89
+ partialCollectAndDeliveryCollectInStoreInput:
90
+ PartialCollectAndDeliveryCollectInStoreInput,
240
91
  ): string {
241
92
  return JSON.stringify(
242
- PartialCollectAndDeliveryPreferenceItemsInput$outboundSchema.parse(
243
- partialCollectAndDeliveryPreferenceItemsInput,
93
+ PartialCollectAndDeliveryCollectInStoreInput$outboundSchema.parse(
94
+ partialCollectAndDeliveryCollectInStoreInput,
244
95
  ),
245
96
  );
246
97
  }
247
98
 
248
- export function partialCollectAndDeliveryPreferenceItemsInputFromJSON(
99
+ export function partialCollectAndDeliveryCollectInStoreInputFromJSON(
249
100
  jsonString: string,
250
101
  ): SafeParseResult<
251
- PartialCollectAndDeliveryPreferenceItemsInput,
102
+ PartialCollectAndDeliveryCollectInStoreInput,
252
103
  SDKValidationError
253
104
  > {
254
105
  return safeParse(
255
106
  jsonString,
256
107
  (x) =>
257
- PartialCollectAndDeliveryPreferenceItemsInput$inboundSchema.parse(
108
+ PartialCollectAndDeliveryCollectInStoreInput$inboundSchema.parse(
258
109
  JSON.parse(x),
259
110
  ),
260
- `Failed to parse 'PartialCollectAndDeliveryPreferenceItemsInput' from JSON`,
111
+ `Failed to parse 'PartialCollectAndDeliveryCollectInStoreInput' from JSON`,
261
112
  );
262
113
  }
263
114
 
@@ -269,9 +120,7 @@ export const PartialCollectAndDeliveryDelivery$inboundSchema: z.ZodType<
269
120
  > = z.object({
270
121
  shipping_provider_id: z.nullable(z.string()),
271
122
  courier_company_id: z.nullable(z.string()).optional(),
272
- items: z.array(
273
- z.lazy(() => PartialCollectAndDeliveryPreferenceItemsInput$inboundSchema),
274
- ),
123
+ items: z.array(FulfillmentItemInput$inboundSchema),
275
124
  }).transform((v) => {
276
125
  return remap$(v, {
277
126
  "shipping_provider_id": "shippingProviderId",
@@ -283,7 +132,7 @@ export const PartialCollectAndDeliveryDelivery$inboundSchema: z.ZodType<
283
132
  export type PartialCollectAndDeliveryDelivery$Outbound = {
284
133
  shipping_provider_id: string | null;
285
134
  courier_company_id?: string | null | undefined;
286
- items: Array<PartialCollectAndDeliveryPreferenceItemsInput$Outbound>;
135
+ items: Array<FulfillmentItemInput$Outbound>;
287
136
  };
288
137
 
289
138
  /** @internal */
@@ -294,9 +143,7 @@ export const PartialCollectAndDeliveryDelivery$outboundSchema: z.ZodType<
294
143
  > = z.object({
295
144
  shippingProviderId: z.nullable(z.string()),
296
145
  courierCompanyId: z.nullable(z.string()).optional(),
297
- items: z.array(
298
- z.lazy(() => PartialCollectAndDeliveryPreferenceItemsInput$outboundSchema),
299
- ),
146
+ items: z.array(FulfillmentItemInput$outboundSchema),
300
147
  }).transform((v) => {
301
148
  return remap$(v, {
302
149
  shippingProviderId: "shipping_provider_id",
@@ -338,68 +185,6 @@ export function partialCollectAndDeliveryDeliveryFromJSON(
338
185
  );
339
186
  }
340
187
 
341
- /** @internal */
342
- export const PartialCollectAndDeliveryPreference$inboundSchema: z.ZodType<
343
- PartialCollectAndDeliveryPreference,
344
- z.ZodTypeDef,
345
- unknown
346
- > = z.object({
347
- pickup: z.lazy(() => PartialCollectAndDeliveryPickup$inboundSchema),
348
- delivery: z.lazy(() => PartialCollectAndDeliveryDelivery$inboundSchema),
349
- });
350
-
351
- /** @internal */
352
- export type PartialCollectAndDeliveryPreference$Outbound = {
353
- pickup: PartialCollectAndDeliveryPickup$Outbound;
354
- delivery: PartialCollectAndDeliveryDelivery$Outbound;
355
- };
356
-
357
- /** @internal */
358
- export const PartialCollectAndDeliveryPreference$outboundSchema: z.ZodType<
359
- PartialCollectAndDeliveryPreference$Outbound,
360
- z.ZodTypeDef,
361
- PartialCollectAndDeliveryPreference
362
- > = z.object({
363
- pickup: z.lazy(() => PartialCollectAndDeliveryPickup$outboundSchema),
364
- delivery: z.lazy(() => PartialCollectAndDeliveryDelivery$outboundSchema),
365
- });
366
-
367
- /**
368
- * @internal
369
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
370
- */
371
- export namespace PartialCollectAndDeliveryPreference$ {
372
- /** @deprecated use `PartialCollectAndDeliveryPreference$inboundSchema` instead. */
373
- export const inboundSchema =
374
- PartialCollectAndDeliveryPreference$inboundSchema;
375
- /** @deprecated use `PartialCollectAndDeliveryPreference$outboundSchema` instead. */
376
- export const outboundSchema =
377
- PartialCollectAndDeliveryPreference$outboundSchema;
378
- /** @deprecated use `PartialCollectAndDeliveryPreference$Outbound` instead. */
379
- export type Outbound = PartialCollectAndDeliveryPreference$Outbound;
380
- }
381
-
382
- export function partialCollectAndDeliveryPreferenceToJSON(
383
- partialCollectAndDeliveryPreference: PartialCollectAndDeliveryPreference,
384
- ): string {
385
- return JSON.stringify(
386
- PartialCollectAndDeliveryPreference$outboundSchema.parse(
387
- partialCollectAndDeliveryPreference,
388
- ),
389
- );
390
- }
391
-
392
- export function partialCollectAndDeliveryPreferenceFromJSON(
393
- jsonString: string,
394
- ): SafeParseResult<PartialCollectAndDeliveryPreference, SDKValidationError> {
395
- return safeParse(
396
- jsonString,
397
- (x) =>
398
- PartialCollectAndDeliveryPreference$inboundSchema.parse(JSON.parse(x)),
399
- `Failed to parse 'PartialCollectAndDeliveryPreference' from JSON`,
400
- );
401
- }
402
-
403
188
  /** @internal */
404
189
  export const PartialCollectAndDeliveryInput$inboundSchema: z.ZodType<
405
190
  PartialCollectAndDeliveryInput,
@@ -409,17 +194,22 @@ export const PartialCollectAndDeliveryInput$inboundSchema: z.ZodType<
409
194
  fulfillment_type: z.literal("partial-collect-and-delivery").default(
410
195
  "partial-collect-and-delivery",
411
196
  ).optional(),
412
- preference: z.lazy(() => PartialCollectAndDeliveryPreference$inboundSchema),
197
+ "collect-in-store": z.lazy(() =>
198
+ PartialCollectAndDeliveryCollectInStoreInput$inboundSchema
199
+ ),
200
+ delivery: z.lazy(() => PartialCollectAndDeliveryDelivery$inboundSchema),
413
201
  }).transform((v) => {
414
202
  return remap$(v, {
415
203
  "fulfillment_type": "fulfillmentType",
204
+ "collect-in-store": "collectInStore",
416
205
  });
417
206
  });
418
207
 
419
208
  /** @internal */
420
209
  export type PartialCollectAndDeliveryInput$Outbound = {
421
210
  fulfillment_type: "partial-collect-and-delivery";
422
- preference: PartialCollectAndDeliveryPreference$Outbound;
211
+ "collect-in-store": PartialCollectAndDeliveryCollectInStoreInput$Outbound;
212
+ delivery: PartialCollectAndDeliveryDelivery$Outbound;
423
213
  };
424
214
 
425
215
  /** @internal */
@@ -431,10 +221,14 @@ export const PartialCollectAndDeliveryInput$outboundSchema: z.ZodType<
431
221
  fulfillmentType: z.literal("partial-collect-and-delivery").default(
432
222
  "partial-collect-and-delivery" as const,
433
223
  ),
434
- preference: z.lazy(() => PartialCollectAndDeliveryPreference$outboundSchema),
224
+ collectInStore: z.lazy(() =>
225
+ PartialCollectAndDeliveryCollectInStoreInput$outboundSchema
226
+ ),
227
+ delivery: z.lazy(() => PartialCollectAndDeliveryDelivery$outboundSchema),
435
228
  }).transform((v) => {
436
229
  return remap$(v, {
437
230
  fulfillmentType: "fulfillment_type",
231
+ collectInStore: "collect-in-store",
438
232
  });
439
233
  });
440
234
 
@@ -10,8 +10,8 @@ import * as components from "../components/index.js";
10
10
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
11
11
 
12
12
  export type UpdateFulfillmentPreferenceRequestBody =
13
- | components.CollectInStoreFulfillment
14
13
  | components.PartialCollectAndDeliveryInput
14
+ | components.CollectInStoreFulfillment
15
15
  | components.DeliveryFulfillment;
16
16
 
17
17
  export type UpdateFulfillmentPreferenceRequest = {
@@ -20,8 +20,8 @@ export type UpdateFulfillmentPreferenceRequest = {
20
20
  */
21
21
  id: string;
22
22
  requestBody:
23
- | components.CollectInStoreFulfillment
24
23
  | components.PartialCollectAndDeliveryInput
24
+ | components.CollectInStoreFulfillment
25
25
  | components.DeliveryFulfillment;
26
26
  };
27
27
 
@@ -39,15 +39,15 @@ export const UpdateFulfillmentPreferenceRequestBody$inboundSchema: z.ZodType<
39
39
  z.ZodTypeDef,
40
40
  unknown
41
41
  > = z.union([
42
- components.CollectInStoreFulfillment$inboundSchema,
43
42
  components.PartialCollectAndDeliveryInput$inboundSchema,
43
+ components.CollectInStoreFulfillment$inboundSchema,
44
44
  components.DeliveryFulfillment$inboundSchema,
45
45
  ]);
46
46
 
47
47
  /** @internal */
48
48
  export type UpdateFulfillmentPreferenceRequestBody$Outbound =
49
- | components.CollectInStoreFulfillment$Outbound
50
49
  | components.PartialCollectAndDeliveryInput$Outbound
50
+ | components.CollectInStoreFulfillment$Outbound
51
51
  | components.DeliveryFulfillment$Outbound;
52
52
 
53
53
  /** @internal */
@@ -56,8 +56,8 @@ export const UpdateFulfillmentPreferenceRequestBody$outboundSchema: z.ZodType<
56
56
  z.ZodTypeDef,
57
57
  UpdateFulfillmentPreferenceRequestBody
58
58
  > = z.union([
59
- components.CollectInStoreFulfillment$outboundSchema,
60
59
  components.PartialCollectAndDeliveryInput$outboundSchema,
60
+ components.CollectInStoreFulfillment$outboundSchema,
61
61
  components.DeliveryFulfillment$outboundSchema,
62
62
  ]);
63
63
 
@@ -106,8 +106,8 @@ export const UpdateFulfillmentPreferenceRequest$inboundSchema: z.ZodType<
106
106
  > = z.object({
107
107
  id: z.string(),
108
108
  RequestBody: z.union([
109
- components.CollectInStoreFulfillment$inboundSchema,
110
109
  components.PartialCollectAndDeliveryInput$inboundSchema,
110
+ components.CollectInStoreFulfillment$inboundSchema,
111
111
  components.DeliveryFulfillment$inboundSchema,
112
112
  ]),
113
113
  }).transform((v) => {
@@ -120,8 +120,8 @@ export const UpdateFulfillmentPreferenceRequest$inboundSchema: z.ZodType<
120
120
  export type UpdateFulfillmentPreferenceRequest$Outbound = {
121
121
  id: string;
122
122
  RequestBody:
123
- | components.CollectInStoreFulfillment$Outbound
124
123
  | components.PartialCollectAndDeliveryInput$Outbound
124
+ | components.CollectInStoreFulfillment$Outbound
125
125
  | components.DeliveryFulfillment$Outbound;
126
126
  };
127
127
 
@@ -133,8 +133,8 @@ export const UpdateFulfillmentPreferenceRequest$outboundSchema: z.ZodType<
133
133
  > = z.object({
134
134
  id: z.string(),
135
135
  requestBody: z.union([
136
- components.CollectInStoreFulfillment$outboundSchema,
137
136
  components.PartialCollectAndDeliveryInput$outboundSchema,
137
+ components.CollectInStoreFulfillment$outboundSchema,
138
138
  components.DeliveryFulfillment$outboundSchema,
139
139
  ]),
140
140
  }).transform((v) => {
@@ -1,37 +0,0 @@
1
- import * as z from "zod";
2
- import { ClosedEnum } from "../../types/enums.js";
3
- /**
4
- * @see {@link https://llm-docs.commercengine.io/schemas/FulfillmentType} - API reference for the FulfillmentType schema
5
- */
6
- export declare const FulfillmentType: {
7
- readonly CollectInStore: "collect-in-store";
8
- readonly Delivery: "delivery";
9
- readonly PartialCollectAndDelivery: "partial-collect-and-delivery";
10
- };
11
- /**
12
- * @see {@link https://llm-docs.commercengine.io/schemas/FulfillmentType} - API reference for the FulfillmentType schema
13
- */
14
- export type FulfillmentType = ClosedEnum<typeof FulfillmentType>;
15
- /** @internal */
16
- export declare const FulfillmentType$inboundSchema: z.ZodNativeEnum<typeof FulfillmentType>;
17
- /** @internal */
18
- export declare const FulfillmentType$outboundSchema: z.ZodNativeEnum<typeof FulfillmentType>;
19
- /**
20
- * @internal
21
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
22
- */
23
- export declare namespace FulfillmentType$ {
24
- /** @deprecated use `FulfillmentType$inboundSchema` instead. */
25
- const inboundSchema: z.ZodNativeEnum<{
26
- readonly CollectInStore: "collect-in-store";
27
- readonly Delivery: "delivery";
28
- readonly PartialCollectAndDelivery: "partial-collect-and-delivery";
29
- }>;
30
- /** @deprecated use `FulfillmentType$outboundSchema` instead. */
31
- const outboundSchema: z.ZodNativeEnum<{
32
- readonly CollectInStore: "collect-in-store";
33
- readonly Delivery: "delivery";
34
- readonly PartialCollectAndDelivery: "partial-collect-and-delivery";
35
- }>;
36
- }
37
- //# sourceMappingURL=fulfillmenttype.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"fulfillmenttype.d.ts","sourceRoot":"","sources":["../../../src/models/components/fulfillmenttype.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AACzB,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAElD;;GAEG;AACH,eAAO,MAAM,eAAe;;;;CAIlB,CAAC;AACX;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,UAAU,CAAC,OAAO,eAAe,CAAC,CAAC;AAEjE,gBAAgB;AAChB,eAAO,MAAM,6BAA6B,EAAE,CAAC,CAAC,aAAa,CACzD,OAAO,eAAe,CACS,CAAC;AAElC,gBAAgB;AAChB,eAAO,MAAM,8BAA8B,EAAE,CAAC,CAAC,aAAa,CAC1D,OAAO,eAAe,CACS,CAAC;AAElC;;;GAGG;AACH,yBAAiB,gBAAgB,CAAC;IAChC,+DAA+D;IACxD,MAAM,aAAa;;;;MAAgC,CAAC;IAC3D,gEAAgE;IACzD,MAAM,cAAc;;;;MAAiC,CAAC;CAC9D"}
@@ -1,28 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
- import * as z from "zod";
5
- /**
6
- * @see {@link https://llm-docs.commercengine.io/schemas/FulfillmentType} - API reference for the FulfillmentType schema
7
- */
8
- export const FulfillmentType = {
9
- CollectInStore: "collect-in-store",
10
- Delivery: "delivery",
11
- PartialCollectAndDelivery: "partial-collect-and-delivery",
12
- };
13
- /** @internal */
14
- export const FulfillmentType$inboundSchema = z.nativeEnum(FulfillmentType);
15
- /** @internal */
16
- export const FulfillmentType$outboundSchema = FulfillmentType$inboundSchema;
17
- /**
18
- * @internal
19
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
20
- */
21
- export var FulfillmentType$;
22
- (function (FulfillmentType$) {
23
- /** @deprecated use `FulfillmentType$inboundSchema` instead. */
24
- FulfillmentType$.inboundSchema = FulfillmentType$inboundSchema;
25
- /** @deprecated use `FulfillmentType$outboundSchema` instead. */
26
- FulfillmentType$.outboundSchema = FulfillmentType$outboundSchema;
27
- })(FulfillmentType$ || (FulfillmentType$ = {}));
28
- //# sourceMappingURL=fulfillmenttype.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"fulfillmenttype.js","sourceRoot":"","sources":["../../../src/models/components/fulfillmenttype.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAGzB;;GAEG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,cAAc,EAAE,kBAAkB;IAClC,QAAQ,EAAE,UAAU;IACpB,yBAAyB,EAAE,8BAA8B;CACjD,CAAC;AAMX,gBAAgB;AAChB,MAAM,CAAC,MAAM,6BAA6B,GAEtC,CAAC,CAAC,UAAU,CAAC,eAAe,CAAC,CAAC;AAElC,gBAAgB;AAChB,MAAM,CAAC,MAAM,8BAA8B,GAEvC,6BAA6B,CAAC;AAElC;;;GAGG;AACH,MAAM,KAAW,gBAAgB,CAKhC;AALD,WAAiB,gBAAgB;IAC/B,+DAA+D;IAClD,8BAAa,GAAG,6BAA6B,CAAC;IAC3D,gEAAgE;IACnD,+BAAc,GAAG,8BAA8B,CAAC;AAC/D,CAAC,EALgB,gBAAgB,KAAhB,gBAAgB,QAKhC"}
@@ -1,40 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
-
5
- import * as z from "zod";
6
- import { ClosedEnum } from "../../types/enums.js";
7
-
8
- /**
9
- * @see {@link https://llm-docs.commercengine.io/schemas/FulfillmentType} - API reference for the FulfillmentType schema
10
- */
11
- export const FulfillmentType = {
12
- CollectInStore: "collect-in-store",
13
- Delivery: "delivery",
14
- PartialCollectAndDelivery: "partial-collect-and-delivery",
15
- } as const;
16
- /**
17
- * @see {@link https://llm-docs.commercengine.io/schemas/FulfillmentType} - API reference for the FulfillmentType schema
18
- */
19
- export type FulfillmentType = ClosedEnum<typeof FulfillmentType>;
20
-
21
- /** @internal */
22
- export const FulfillmentType$inboundSchema: z.ZodNativeEnum<
23
- typeof FulfillmentType
24
- > = z.nativeEnum(FulfillmentType);
25
-
26
- /** @internal */
27
- export const FulfillmentType$outboundSchema: z.ZodNativeEnum<
28
- typeof FulfillmentType
29
- > = FulfillmentType$inboundSchema;
30
-
31
- /**
32
- * @internal
33
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
34
- */
35
- export namespace FulfillmentType$ {
36
- /** @deprecated use `FulfillmentType$inboundSchema` instead. */
37
- export const inboundSchema = FulfillmentType$inboundSchema;
38
- /** @deprecated use `FulfillmentType$outboundSchema` instead. */
39
- export const outboundSchema = FulfillmentType$outboundSchema;
40
- }