ce-storefront 0.12.4 → 0.12.5
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/shipping/README.md +8 -86
- package/esm/funcs/shippingShippingMethods.d.ts +16 -0
- package/esm/funcs/shippingShippingMethods.d.ts.map +1 -0
- package/esm/funcs/{shippingCheckServiceability.js → shippingShippingMethods.js} +7 -7
- package/esm/funcs/shippingShippingMethods.js.map +1 -0
- package/esm/lib/config.d.ts +2 -2
- package/esm/lib/config.js +2 -2
- package/esm/models/components/cartitem.d.ts +8 -0
- package/esm/models/components/cartitem.d.ts.map +1 -1
- package/esm/models/components/cartitem.js +5 -0
- package/esm/models/components/cartitem.js.map +1 -1
- package/esm/models/components/orderitem.d.ts +74 -56
- package/esm/models/components/orderitem.d.ts.map +1 -1
- package/esm/models/components/orderitem.js +68 -56
- package/esm/models/components/orderitem.js.map +1 -1
- package/esm/models/operations/getshippingmethods.d.ts +58 -0
- package/esm/models/operations/getshippingmethods.d.ts.map +1 -0
- package/esm/models/operations/getshippingmethods.js +57 -0
- package/esm/models/operations/getshippingmethods.js.map +1 -0
- package/esm/models/operations/index.d.ts +1 -2
- package/esm/models/operations/index.d.ts.map +1 -1
- package/esm/models/operations/index.js +1 -2
- package/esm/models/operations/index.js.map +1 -1
- package/esm/sdk/shipping.d.ts +3 -10
- package/esm/sdk/shipping.d.ts.map +1 -1
- package/esm/sdk/shipping.js +5 -15
- package/esm/sdk/shipping.js.map +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/funcs/{shippingCheckServiceability.ts → shippingShippingMethods.ts} +11 -11
- package/src/lib/config.ts +2 -2
- package/src/models/components/cartitem.ts +17 -0
- package/src/models/components/orderitem.ts +149 -112
- package/src/models/operations/getshippingmethods.ts +134 -0
- package/src/models/operations/index.ts +1 -2
- package/src/sdk/shipping.ts +7 -25
- package/esm/funcs/shippingCheckDeliveryAvailability.d.ts +0 -17
- package/esm/funcs/shippingCheckDeliveryAvailability.d.ts.map +0 -1
- package/esm/funcs/shippingCheckDeliveryAvailability.js +0 -85
- package/esm/funcs/shippingCheckDeliveryAvailability.js.map +0 -1
- package/esm/funcs/shippingCheckServiceability.d.ts +0 -16
- package/esm/funcs/shippingCheckServiceability.d.ts.map +0 -1
- package/esm/funcs/shippingCheckServiceability.js.map +0 -1
- package/esm/models/operations/checkdeliveryavailability.d.ts +0 -62
- package/esm/models/operations/checkdeliveryavailability.d.ts.map +0 -1
- package/esm/models/operations/checkdeliveryavailability.js +0 -58
- package/esm/models/operations/checkdeliveryavailability.js.map +0 -1
- package/esm/models/operations/shippingmethods.d.ts +0 -58
- package/esm/models/operations/shippingmethods.d.ts.map +0 -1
- package/esm/models/operations/shippingmethods.js +0 -57
- package/esm/models/operations/shippingmethods.js.map +0 -1
- package/src/funcs/shippingCheckDeliveryAvailability.ts +0 -172
- package/src/models/operations/checkdeliveryavailability.ts +0 -141
- package/src/models/operations/shippingmethods.ts +0 -132
|
@@ -1,141 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import * as z from "zod";
|
|
6
|
-
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
-
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
|
-
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
|
-
|
|
10
|
-
export type CheckDeliveryAvailabilityRequest = {
|
|
11
|
-
/**
|
|
12
|
-
* delivery location pincode
|
|
13
|
-
*/
|
|
14
|
-
pincode?: string | undefined;
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* OK
|
|
19
|
-
*/
|
|
20
|
-
export type CheckDeliveryAvailabilityResponseBody = {
|
|
21
|
-
message?: string | undefined;
|
|
22
|
-
success?: boolean | undefined;
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
/** @internal */
|
|
26
|
-
export const CheckDeliveryAvailabilityRequest$inboundSchema: z.ZodType<
|
|
27
|
-
CheckDeliveryAvailabilityRequest,
|
|
28
|
-
z.ZodTypeDef,
|
|
29
|
-
unknown
|
|
30
|
-
> = z.object({
|
|
31
|
-
pincode: z.string().default("144552"),
|
|
32
|
-
});
|
|
33
|
-
|
|
34
|
-
/** @internal */
|
|
35
|
-
export type CheckDeliveryAvailabilityRequest$Outbound = {
|
|
36
|
-
pincode: string;
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
/** @internal */
|
|
40
|
-
export const CheckDeliveryAvailabilityRequest$outboundSchema: z.ZodType<
|
|
41
|
-
CheckDeliveryAvailabilityRequest$Outbound,
|
|
42
|
-
z.ZodTypeDef,
|
|
43
|
-
CheckDeliveryAvailabilityRequest
|
|
44
|
-
> = z.object({
|
|
45
|
-
pincode: z.string().default("144552"),
|
|
46
|
-
});
|
|
47
|
-
|
|
48
|
-
/**
|
|
49
|
-
* @internal
|
|
50
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
51
|
-
*/
|
|
52
|
-
export namespace CheckDeliveryAvailabilityRequest$ {
|
|
53
|
-
/** @deprecated use `CheckDeliveryAvailabilityRequest$inboundSchema` instead. */
|
|
54
|
-
export const inboundSchema = CheckDeliveryAvailabilityRequest$inboundSchema;
|
|
55
|
-
/** @deprecated use `CheckDeliveryAvailabilityRequest$outboundSchema` instead. */
|
|
56
|
-
export const outboundSchema = CheckDeliveryAvailabilityRequest$outboundSchema;
|
|
57
|
-
/** @deprecated use `CheckDeliveryAvailabilityRequest$Outbound` instead. */
|
|
58
|
-
export type Outbound = CheckDeliveryAvailabilityRequest$Outbound;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
export function checkDeliveryAvailabilityRequestToJSON(
|
|
62
|
-
checkDeliveryAvailabilityRequest: CheckDeliveryAvailabilityRequest,
|
|
63
|
-
): string {
|
|
64
|
-
return JSON.stringify(
|
|
65
|
-
CheckDeliveryAvailabilityRequest$outboundSchema.parse(
|
|
66
|
-
checkDeliveryAvailabilityRequest,
|
|
67
|
-
),
|
|
68
|
-
);
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
export function checkDeliveryAvailabilityRequestFromJSON(
|
|
72
|
-
jsonString: string,
|
|
73
|
-
): SafeParseResult<CheckDeliveryAvailabilityRequest, SDKValidationError> {
|
|
74
|
-
return safeParse(
|
|
75
|
-
jsonString,
|
|
76
|
-
(x) => CheckDeliveryAvailabilityRequest$inboundSchema.parse(JSON.parse(x)),
|
|
77
|
-
`Failed to parse 'CheckDeliveryAvailabilityRequest' from JSON`,
|
|
78
|
-
);
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
/** @internal */
|
|
82
|
-
export const CheckDeliveryAvailabilityResponseBody$inboundSchema: z.ZodType<
|
|
83
|
-
CheckDeliveryAvailabilityResponseBody,
|
|
84
|
-
z.ZodTypeDef,
|
|
85
|
-
unknown
|
|
86
|
-
> = z.object({
|
|
87
|
-
message: z.string().optional(),
|
|
88
|
-
success: z.boolean().optional(),
|
|
89
|
-
});
|
|
90
|
-
|
|
91
|
-
/** @internal */
|
|
92
|
-
export type CheckDeliveryAvailabilityResponseBody$Outbound = {
|
|
93
|
-
message?: string | undefined;
|
|
94
|
-
success?: boolean | undefined;
|
|
95
|
-
};
|
|
96
|
-
|
|
97
|
-
/** @internal */
|
|
98
|
-
export const CheckDeliveryAvailabilityResponseBody$outboundSchema: z.ZodType<
|
|
99
|
-
CheckDeliveryAvailabilityResponseBody$Outbound,
|
|
100
|
-
z.ZodTypeDef,
|
|
101
|
-
CheckDeliveryAvailabilityResponseBody
|
|
102
|
-
> = z.object({
|
|
103
|
-
message: z.string().optional(),
|
|
104
|
-
success: z.boolean().optional(),
|
|
105
|
-
});
|
|
106
|
-
|
|
107
|
-
/**
|
|
108
|
-
* @internal
|
|
109
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
110
|
-
*/
|
|
111
|
-
export namespace CheckDeliveryAvailabilityResponseBody$ {
|
|
112
|
-
/** @deprecated use `CheckDeliveryAvailabilityResponseBody$inboundSchema` instead. */
|
|
113
|
-
export const inboundSchema =
|
|
114
|
-
CheckDeliveryAvailabilityResponseBody$inboundSchema;
|
|
115
|
-
/** @deprecated use `CheckDeliveryAvailabilityResponseBody$outboundSchema` instead. */
|
|
116
|
-
export const outboundSchema =
|
|
117
|
-
CheckDeliveryAvailabilityResponseBody$outboundSchema;
|
|
118
|
-
/** @deprecated use `CheckDeliveryAvailabilityResponseBody$Outbound` instead. */
|
|
119
|
-
export type Outbound = CheckDeliveryAvailabilityResponseBody$Outbound;
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
export function checkDeliveryAvailabilityResponseBodyToJSON(
|
|
123
|
-
checkDeliveryAvailabilityResponseBody: CheckDeliveryAvailabilityResponseBody,
|
|
124
|
-
): string {
|
|
125
|
-
return JSON.stringify(
|
|
126
|
-
CheckDeliveryAvailabilityResponseBody$outboundSchema.parse(
|
|
127
|
-
checkDeliveryAvailabilityResponseBody,
|
|
128
|
-
),
|
|
129
|
-
);
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
export function checkDeliveryAvailabilityResponseBodyFromJSON(
|
|
133
|
-
jsonString: string,
|
|
134
|
-
): SafeParseResult<CheckDeliveryAvailabilityResponseBody, SDKValidationError> {
|
|
135
|
-
return safeParse(
|
|
136
|
-
jsonString,
|
|
137
|
-
(x) =>
|
|
138
|
-
CheckDeliveryAvailabilityResponseBody$inboundSchema.parse(JSON.parse(x)),
|
|
139
|
-
`Failed to parse 'CheckDeliveryAvailabilityResponseBody' from JSON`,
|
|
140
|
-
);
|
|
141
|
-
}
|
|
@@ -1,132 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import * as z from "zod";
|
|
6
|
-
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
-
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
|
-
import * as components from "../components/index.js";
|
|
9
|
-
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
-
|
|
11
|
-
export type ShippingMethodsRequestBody =
|
|
12
|
-
components.CartBasedServiceabilityCheck;
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* OK
|
|
16
|
-
*/
|
|
17
|
-
export type ShippingMethodsResponseBody = {
|
|
18
|
-
message: string;
|
|
19
|
-
success: boolean;
|
|
20
|
-
content: components.PincodeServiceability;
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
/** @internal */
|
|
24
|
-
export const ShippingMethodsRequestBody$inboundSchema: z.ZodType<
|
|
25
|
-
ShippingMethodsRequestBody,
|
|
26
|
-
z.ZodTypeDef,
|
|
27
|
-
unknown
|
|
28
|
-
> = components.CartBasedServiceabilityCheck$inboundSchema;
|
|
29
|
-
|
|
30
|
-
/** @internal */
|
|
31
|
-
export type ShippingMethodsRequestBody$Outbound =
|
|
32
|
-
components.CartBasedServiceabilityCheck$Outbound;
|
|
33
|
-
|
|
34
|
-
/** @internal */
|
|
35
|
-
export const ShippingMethodsRequestBody$outboundSchema: z.ZodType<
|
|
36
|
-
ShippingMethodsRequestBody$Outbound,
|
|
37
|
-
z.ZodTypeDef,
|
|
38
|
-
ShippingMethodsRequestBody
|
|
39
|
-
> = components.CartBasedServiceabilityCheck$outboundSchema;
|
|
40
|
-
|
|
41
|
-
/**
|
|
42
|
-
* @internal
|
|
43
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
44
|
-
*/
|
|
45
|
-
export namespace ShippingMethodsRequestBody$ {
|
|
46
|
-
/** @deprecated use `ShippingMethodsRequestBody$inboundSchema` instead. */
|
|
47
|
-
export const inboundSchema = ShippingMethodsRequestBody$inboundSchema;
|
|
48
|
-
/** @deprecated use `ShippingMethodsRequestBody$outboundSchema` instead. */
|
|
49
|
-
export const outboundSchema = ShippingMethodsRequestBody$outboundSchema;
|
|
50
|
-
/** @deprecated use `ShippingMethodsRequestBody$Outbound` instead. */
|
|
51
|
-
export type Outbound = ShippingMethodsRequestBody$Outbound;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
export function shippingMethodsRequestBodyToJSON(
|
|
55
|
-
shippingMethodsRequestBody: ShippingMethodsRequestBody,
|
|
56
|
-
): string {
|
|
57
|
-
return JSON.stringify(
|
|
58
|
-
ShippingMethodsRequestBody$outboundSchema.parse(shippingMethodsRequestBody),
|
|
59
|
-
);
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
export function shippingMethodsRequestBodyFromJSON(
|
|
63
|
-
jsonString: string,
|
|
64
|
-
): SafeParseResult<ShippingMethodsRequestBody, SDKValidationError> {
|
|
65
|
-
return safeParse(
|
|
66
|
-
jsonString,
|
|
67
|
-
(x) => ShippingMethodsRequestBody$inboundSchema.parse(JSON.parse(x)),
|
|
68
|
-
`Failed to parse 'ShippingMethodsRequestBody' from JSON`,
|
|
69
|
-
);
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
/** @internal */
|
|
73
|
-
export const ShippingMethodsResponseBody$inboundSchema: z.ZodType<
|
|
74
|
-
ShippingMethodsResponseBody,
|
|
75
|
-
z.ZodTypeDef,
|
|
76
|
-
unknown
|
|
77
|
-
> = z.object({
|
|
78
|
-
message: z.string(),
|
|
79
|
-
success: z.boolean(),
|
|
80
|
-
content: components.PincodeServiceability$inboundSchema,
|
|
81
|
-
});
|
|
82
|
-
|
|
83
|
-
/** @internal */
|
|
84
|
-
export type ShippingMethodsResponseBody$Outbound = {
|
|
85
|
-
message: string;
|
|
86
|
-
success: boolean;
|
|
87
|
-
content: components.PincodeServiceability$Outbound;
|
|
88
|
-
};
|
|
89
|
-
|
|
90
|
-
/** @internal */
|
|
91
|
-
export const ShippingMethodsResponseBody$outboundSchema: z.ZodType<
|
|
92
|
-
ShippingMethodsResponseBody$Outbound,
|
|
93
|
-
z.ZodTypeDef,
|
|
94
|
-
ShippingMethodsResponseBody
|
|
95
|
-
> = z.object({
|
|
96
|
-
message: z.string(),
|
|
97
|
-
success: z.boolean(),
|
|
98
|
-
content: components.PincodeServiceability$outboundSchema,
|
|
99
|
-
});
|
|
100
|
-
|
|
101
|
-
/**
|
|
102
|
-
* @internal
|
|
103
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
104
|
-
*/
|
|
105
|
-
export namespace ShippingMethodsResponseBody$ {
|
|
106
|
-
/** @deprecated use `ShippingMethodsResponseBody$inboundSchema` instead. */
|
|
107
|
-
export const inboundSchema = ShippingMethodsResponseBody$inboundSchema;
|
|
108
|
-
/** @deprecated use `ShippingMethodsResponseBody$outboundSchema` instead. */
|
|
109
|
-
export const outboundSchema = ShippingMethodsResponseBody$outboundSchema;
|
|
110
|
-
/** @deprecated use `ShippingMethodsResponseBody$Outbound` instead. */
|
|
111
|
-
export type Outbound = ShippingMethodsResponseBody$Outbound;
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
export function shippingMethodsResponseBodyToJSON(
|
|
115
|
-
shippingMethodsResponseBody: ShippingMethodsResponseBody,
|
|
116
|
-
): string {
|
|
117
|
-
return JSON.stringify(
|
|
118
|
-
ShippingMethodsResponseBody$outboundSchema.parse(
|
|
119
|
-
shippingMethodsResponseBody,
|
|
120
|
-
),
|
|
121
|
-
);
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
export function shippingMethodsResponseBodyFromJSON(
|
|
125
|
-
jsonString: string,
|
|
126
|
-
): SafeParseResult<ShippingMethodsResponseBody, SDKValidationError> {
|
|
127
|
-
return safeParse(
|
|
128
|
-
jsonString,
|
|
129
|
-
(x) => ShippingMethodsResponseBody$inboundSchema.parse(JSON.parse(x)),
|
|
130
|
-
`Failed to parse 'ShippingMethodsResponseBody' from JSON`,
|
|
131
|
-
);
|
|
132
|
-
}
|