ce-storefront 0.16.2 → 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/README.md +2 -4
- package/docs/sdks/carts/README.md +0 -88
- 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/esm/models/operations/index.d.ts +0 -1
- package/esm/models/operations/index.d.ts.map +1 -1
- package/esm/models/operations/index.js +0 -1
- package/esm/models/operations/index.js.map +1 -1
- package/esm/sdk/carts.d.ts +0 -9
- package/esm/sdk/carts.d.ts.map +1 -1
- package/esm/sdk/carts.js +0 -12
- package/esm/sdk/carts.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
- package/src/models/operations/index.ts +0 -1
- package/src/sdk/carts.ts +0 -20
- package/esm/funcs/cartsAddShippingMethod.d.ts +0 -20
- package/esm/funcs/cartsAddShippingMethod.d.ts.map +0 -1
- package/esm/funcs/cartsAddShippingMethod.js +0 -90
- package/esm/funcs/cartsAddShippingMethod.js.map +0 -1
- package/esm/models/operations/updateshippingmethod.d.ts +0 -122
- package/esm/models/operations/updateshippingmethod.d.ts.map +0 -1
- package/esm/models/operations/updateshippingmethod.js +0 -134
- package/esm/models/operations/updateshippingmethod.js.map +0 -1
- package/src/funcs/cartsAddShippingMethod.ts +0 -187
- package/src/models/operations/updateshippingmethod.ts +0 -293
|
@@ -1,293 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import * as z from "zod";
|
|
6
|
-
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
-
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
-
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
-
import * as components from "../components/index.js";
|
|
10
|
-
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
|
-
|
|
12
|
-
export type UpdateShippingMethodRequestBody = {
|
|
13
|
-
shippingProviderId: string;
|
|
14
|
-
courierCompanyId: string | null;
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
export type UpdateShippingMethodRequest = {
|
|
18
|
-
/**
|
|
19
|
-
* Cart ID
|
|
20
|
-
*/
|
|
21
|
-
id: string;
|
|
22
|
-
requestBody: UpdateShippingMethodRequestBody;
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
export type UpdateShippingMethodContent = {
|
|
26
|
-
/**
|
|
27
|
-
* This cart model is structured to capture a wide range of details, facilitating accurate representation and management of user shopping carts in an e-commerce platform.
|
|
28
|
-
*/
|
|
29
|
-
cart: components.Cart;
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* OK
|
|
34
|
-
*/
|
|
35
|
-
export type UpdateShippingMethodResponseBody = {
|
|
36
|
-
message: string;
|
|
37
|
-
success: boolean;
|
|
38
|
-
content: UpdateShippingMethodContent;
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
/** @internal */
|
|
42
|
-
export const UpdateShippingMethodRequestBody$inboundSchema: z.ZodType<
|
|
43
|
-
UpdateShippingMethodRequestBody,
|
|
44
|
-
z.ZodTypeDef,
|
|
45
|
-
unknown
|
|
46
|
-
> = z.object({
|
|
47
|
-
shipping_provider_id: z.string(),
|
|
48
|
-
courier_company_id: z.nullable(z.string()),
|
|
49
|
-
}).transform((v) => {
|
|
50
|
-
return remap$(v, {
|
|
51
|
-
"shipping_provider_id": "shippingProviderId",
|
|
52
|
-
"courier_company_id": "courierCompanyId",
|
|
53
|
-
});
|
|
54
|
-
});
|
|
55
|
-
|
|
56
|
-
/** @internal */
|
|
57
|
-
export type UpdateShippingMethodRequestBody$Outbound = {
|
|
58
|
-
shipping_provider_id: string;
|
|
59
|
-
courier_company_id: string | null;
|
|
60
|
-
};
|
|
61
|
-
|
|
62
|
-
/** @internal */
|
|
63
|
-
export const UpdateShippingMethodRequestBody$outboundSchema: z.ZodType<
|
|
64
|
-
UpdateShippingMethodRequestBody$Outbound,
|
|
65
|
-
z.ZodTypeDef,
|
|
66
|
-
UpdateShippingMethodRequestBody
|
|
67
|
-
> = z.object({
|
|
68
|
-
shippingProviderId: z.string(),
|
|
69
|
-
courierCompanyId: z.nullable(z.string()),
|
|
70
|
-
}).transform((v) => {
|
|
71
|
-
return remap$(v, {
|
|
72
|
-
shippingProviderId: "shipping_provider_id",
|
|
73
|
-
courierCompanyId: "courier_company_id",
|
|
74
|
-
});
|
|
75
|
-
});
|
|
76
|
-
|
|
77
|
-
/**
|
|
78
|
-
* @internal
|
|
79
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
80
|
-
*/
|
|
81
|
-
export namespace UpdateShippingMethodRequestBody$ {
|
|
82
|
-
/** @deprecated use `UpdateShippingMethodRequestBody$inboundSchema` instead. */
|
|
83
|
-
export const inboundSchema = UpdateShippingMethodRequestBody$inboundSchema;
|
|
84
|
-
/** @deprecated use `UpdateShippingMethodRequestBody$outboundSchema` instead. */
|
|
85
|
-
export const outboundSchema = UpdateShippingMethodRequestBody$outboundSchema;
|
|
86
|
-
/** @deprecated use `UpdateShippingMethodRequestBody$Outbound` instead. */
|
|
87
|
-
export type Outbound = UpdateShippingMethodRequestBody$Outbound;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
export function updateShippingMethodRequestBodyToJSON(
|
|
91
|
-
updateShippingMethodRequestBody: UpdateShippingMethodRequestBody,
|
|
92
|
-
): string {
|
|
93
|
-
return JSON.stringify(
|
|
94
|
-
UpdateShippingMethodRequestBody$outboundSchema.parse(
|
|
95
|
-
updateShippingMethodRequestBody,
|
|
96
|
-
),
|
|
97
|
-
);
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
export function updateShippingMethodRequestBodyFromJSON(
|
|
101
|
-
jsonString: string,
|
|
102
|
-
): SafeParseResult<UpdateShippingMethodRequestBody, SDKValidationError> {
|
|
103
|
-
return safeParse(
|
|
104
|
-
jsonString,
|
|
105
|
-
(x) => UpdateShippingMethodRequestBody$inboundSchema.parse(JSON.parse(x)),
|
|
106
|
-
`Failed to parse 'UpdateShippingMethodRequestBody' from JSON`,
|
|
107
|
-
);
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
/** @internal */
|
|
111
|
-
export const UpdateShippingMethodRequest$inboundSchema: z.ZodType<
|
|
112
|
-
UpdateShippingMethodRequest,
|
|
113
|
-
z.ZodTypeDef,
|
|
114
|
-
unknown
|
|
115
|
-
> = z.object({
|
|
116
|
-
id: z.string(),
|
|
117
|
-
RequestBody: z.lazy(() => UpdateShippingMethodRequestBody$inboundSchema),
|
|
118
|
-
}).transform((v) => {
|
|
119
|
-
return remap$(v, {
|
|
120
|
-
"RequestBody": "requestBody",
|
|
121
|
-
});
|
|
122
|
-
});
|
|
123
|
-
|
|
124
|
-
/** @internal */
|
|
125
|
-
export type UpdateShippingMethodRequest$Outbound = {
|
|
126
|
-
id: string;
|
|
127
|
-
RequestBody: UpdateShippingMethodRequestBody$Outbound;
|
|
128
|
-
};
|
|
129
|
-
|
|
130
|
-
/** @internal */
|
|
131
|
-
export const UpdateShippingMethodRequest$outboundSchema: z.ZodType<
|
|
132
|
-
UpdateShippingMethodRequest$Outbound,
|
|
133
|
-
z.ZodTypeDef,
|
|
134
|
-
UpdateShippingMethodRequest
|
|
135
|
-
> = z.object({
|
|
136
|
-
id: z.string(),
|
|
137
|
-
requestBody: z.lazy(() => UpdateShippingMethodRequestBody$outboundSchema),
|
|
138
|
-
}).transform((v) => {
|
|
139
|
-
return remap$(v, {
|
|
140
|
-
requestBody: "RequestBody",
|
|
141
|
-
});
|
|
142
|
-
});
|
|
143
|
-
|
|
144
|
-
/**
|
|
145
|
-
* @internal
|
|
146
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
147
|
-
*/
|
|
148
|
-
export namespace UpdateShippingMethodRequest$ {
|
|
149
|
-
/** @deprecated use `UpdateShippingMethodRequest$inboundSchema` instead. */
|
|
150
|
-
export const inboundSchema = UpdateShippingMethodRequest$inboundSchema;
|
|
151
|
-
/** @deprecated use `UpdateShippingMethodRequest$outboundSchema` instead. */
|
|
152
|
-
export const outboundSchema = UpdateShippingMethodRequest$outboundSchema;
|
|
153
|
-
/** @deprecated use `UpdateShippingMethodRequest$Outbound` instead. */
|
|
154
|
-
export type Outbound = UpdateShippingMethodRequest$Outbound;
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
export function updateShippingMethodRequestToJSON(
|
|
158
|
-
updateShippingMethodRequest: UpdateShippingMethodRequest,
|
|
159
|
-
): string {
|
|
160
|
-
return JSON.stringify(
|
|
161
|
-
UpdateShippingMethodRequest$outboundSchema.parse(
|
|
162
|
-
updateShippingMethodRequest,
|
|
163
|
-
),
|
|
164
|
-
);
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
export function updateShippingMethodRequestFromJSON(
|
|
168
|
-
jsonString: string,
|
|
169
|
-
): SafeParseResult<UpdateShippingMethodRequest, SDKValidationError> {
|
|
170
|
-
return safeParse(
|
|
171
|
-
jsonString,
|
|
172
|
-
(x) => UpdateShippingMethodRequest$inboundSchema.parse(JSON.parse(x)),
|
|
173
|
-
`Failed to parse 'UpdateShippingMethodRequest' from JSON`,
|
|
174
|
-
);
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
/** @internal */
|
|
178
|
-
export const UpdateShippingMethodContent$inboundSchema: z.ZodType<
|
|
179
|
-
UpdateShippingMethodContent,
|
|
180
|
-
z.ZodTypeDef,
|
|
181
|
-
unknown
|
|
182
|
-
> = z.object({
|
|
183
|
-
cart: components.Cart$inboundSchema,
|
|
184
|
-
});
|
|
185
|
-
|
|
186
|
-
/** @internal */
|
|
187
|
-
export type UpdateShippingMethodContent$Outbound = {
|
|
188
|
-
cart: components.Cart$Outbound;
|
|
189
|
-
};
|
|
190
|
-
|
|
191
|
-
/** @internal */
|
|
192
|
-
export const UpdateShippingMethodContent$outboundSchema: z.ZodType<
|
|
193
|
-
UpdateShippingMethodContent$Outbound,
|
|
194
|
-
z.ZodTypeDef,
|
|
195
|
-
UpdateShippingMethodContent
|
|
196
|
-
> = z.object({
|
|
197
|
-
cart: components.Cart$outboundSchema,
|
|
198
|
-
});
|
|
199
|
-
|
|
200
|
-
/**
|
|
201
|
-
* @internal
|
|
202
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
203
|
-
*/
|
|
204
|
-
export namespace UpdateShippingMethodContent$ {
|
|
205
|
-
/** @deprecated use `UpdateShippingMethodContent$inboundSchema` instead. */
|
|
206
|
-
export const inboundSchema = UpdateShippingMethodContent$inboundSchema;
|
|
207
|
-
/** @deprecated use `UpdateShippingMethodContent$outboundSchema` instead. */
|
|
208
|
-
export const outboundSchema = UpdateShippingMethodContent$outboundSchema;
|
|
209
|
-
/** @deprecated use `UpdateShippingMethodContent$Outbound` instead. */
|
|
210
|
-
export type Outbound = UpdateShippingMethodContent$Outbound;
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
export function updateShippingMethodContentToJSON(
|
|
214
|
-
updateShippingMethodContent: UpdateShippingMethodContent,
|
|
215
|
-
): string {
|
|
216
|
-
return JSON.stringify(
|
|
217
|
-
UpdateShippingMethodContent$outboundSchema.parse(
|
|
218
|
-
updateShippingMethodContent,
|
|
219
|
-
),
|
|
220
|
-
);
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
export function updateShippingMethodContentFromJSON(
|
|
224
|
-
jsonString: string,
|
|
225
|
-
): SafeParseResult<UpdateShippingMethodContent, SDKValidationError> {
|
|
226
|
-
return safeParse(
|
|
227
|
-
jsonString,
|
|
228
|
-
(x) => UpdateShippingMethodContent$inboundSchema.parse(JSON.parse(x)),
|
|
229
|
-
`Failed to parse 'UpdateShippingMethodContent' from JSON`,
|
|
230
|
-
);
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
/** @internal */
|
|
234
|
-
export const UpdateShippingMethodResponseBody$inboundSchema: z.ZodType<
|
|
235
|
-
UpdateShippingMethodResponseBody,
|
|
236
|
-
z.ZodTypeDef,
|
|
237
|
-
unknown
|
|
238
|
-
> = z.object({
|
|
239
|
-
message: z.string(),
|
|
240
|
-
success: z.boolean(),
|
|
241
|
-
content: z.lazy(() => UpdateShippingMethodContent$inboundSchema),
|
|
242
|
-
});
|
|
243
|
-
|
|
244
|
-
/** @internal */
|
|
245
|
-
export type UpdateShippingMethodResponseBody$Outbound = {
|
|
246
|
-
message: string;
|
|
247
|
-
success: boolean;
|
|
248
|
-
content: UpdateShippingMethodContent$Outbound;
|
|
249
|
-
};
|
|
250
|
-
|
|
251
|
-
/** @internal */
|
|
252
|
-
export const UpdateShippingMethodResponseBody$outboundSchema: z.ZodType<
|
|
253
|
-
UpdateShippingMethodResponseBody$Outbound,
|
|
254
|
-
z.ZodTypeDef,
|
|
255
|
-
UpdateShippingMethodResponseBody
|
|
256
|
-
> = z.object({
|
|
257
|
-
message: z.string(),
|
|
258
|
-
success: z.boolean(),
|
|
259
|
-
content: z.lazy(() => UpdateShippingMethodContent$outboundSchema),
|
|
260
|
-
});
|
|
261
|
-
|
|
262
|
-
/**
|
|
263
|
-
* @internal
|
|
264
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
265
|
-
*/
|
|
266
|
-
export namespace UpdateShippingMethodResponseBody$ {
|
|
267
|
-
/** @deprecated use `UpdateShippingMethodResponseBody$inboundSchema` instead. */
|
|
268
|
-
export const inboundSchema = UpdateShippingMethodResponseBody$inboundSchema;
|
|
269
|
-
/** @deprecated use `UpdateShippingMethodResponseBody$outboundSchema` instead. */
|
|
270
|
-
export const outboundSchema = UpdateShippingMethodResponseBody$outboundSchema;
|
|
271
|
-
/** @deprecated use `UpdateShippingMethodResponseBody$Outbound` instead. */
|
|
272
|
-
export type Outbound = UpdateShippingMethodResponseBody$Outbound;
|
|
273
|
-
}
|
|
274
|
-
|
|
275
|
-
export function updateShippingMethodResponseBodyToJSON(
|
|
276
|
-
updateShippingMethodResponseBody: UpdateShippingMethodResponseBody,
|
|
277
|
-
): string {
|
|
278
|
-
return JSON.stringify(
|
|
279
|
-
UpdateShippingMethodResponseBody$outboundSchema.parse(
|
|
280
|
-
updateShippingMethodResponseBody,
|
|
281
|
-
),
|
|
282
|
-
);
|
|
283
|
-
}
|
|
284
|
-
|
|
285
|
-
export function updateShippingMethodResponseBodyFromJSON(
|
|
286
|
-
jsonString: string,
|
|
287
|
-
): SafeParseResult<UpdateShippingMethodResponseBody, SDKValidationError> {
|
|
288
|
-
return safeParse(
|
|
289
|
-
jsonString,
|
|
290
|
-
(x) => UpdateShippingMethodResponseBody$inboundSchema.parse(JSON.parse(x)),
|
|
291
|
-
`Failed to parse 'UpdateShippingMethodResponseBody' from JSON`,
|
|
292
|
-
);
|
|
293
|
-
}
|