ce-storefront 0.12.1 → 0.12.2

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 (32) hide show
  1. package/docs/sdks/shipping/README.md +1 -1
  2. package/esm/funcs/shippingCheckServiceability.d.ts +1 -1
  3. package/esm/funcs/shippingCheckServiceability.js +1 -1
  4. package/esm/lib/config.d.ts +2 -2
  5. package/esm/lib/config.js +2 -2
  6. package/esm/models/components/cartbasedserviceabilitycheck.d.ts +31 -0
  7. package/esm/models/components/cartbasedserviceabilitycheck.d.ts.map +1 -0
  8. package/esm/models/components/cartbasedserviceabilitycheck.js +44 -0
  9. package/esm/models/components/cartbasedserviceabilitycheck.js.map +1 -0
  10. package/esm/models/components/index.d.ts +2 -0
  11. package/esm/models/components/index.d.ts.map +1 -1
  12. package/esm/models/components/index.js +2 -0
  13. package/esm/models/components/index.js.map +1 -1
  14. package/esm/models/components/productsbasedserviceabilitycheck.d.ts +95 -0
  15. package/esm/models/components/productsbasedserviceabilitycheck.d.ts.map +1 -0
  16. package/esm/models/components/productsbasedserviceabilitycheck.js +132 -0
  17. package/esm/models/components/productsbasedserviceabilitycheck.js.map +1 -0
  18. package/esm/models/operations/shippingmethods.d.ts +2 -8
  19. package/esm/models/operations/shippingmethods.d.ts.map +1 -1
  20. package/esm/models/operations/shippingmethods.js +8 -19
  21. package/esm/models/operations/shippingmethods.js.map +1 -1
  22. package/esm/sdk/shipping.d.ts +1 -1
  23. package/esm/sdk/shipping.js +1 -1
  24. package/jsr.json +1 -1
  25. package/package.json +1 -1
  26. package/src/funcs/shippingCheckServiceability.ts +1 -1
  27. package/src/lib/config.ts +2 -2
  28. package/src/models/components/cartbasedserviceabilitycheck.ts +83 -0
  29. package/src/models/components/index.ts +2 -0
  30. package/src/models/components/productsbasedserviceabilitycheck.ts +243 -0
  31. package/src/models/operations/shippingmethods.ts +14 -27
  32. package/src/sdk/shipping.ts +1 -1
@@ -87,7 +87,7 @@ run();
87
87
 
88
88
  ## checkServiceability
89
89
 
90
- Checking serviceability for a given pincode based provided cart_id.
90
+ Checking serviceability for a given pincode based provided cart_id or based on products list & pickup pincode provided.
91
91
 
92
92
  ### Example Usage
93
93
 
@@ -10,7 +10,7 @@ import { Result } from "../types/fp.js";
10
10
  * Check serviceability
11
11
  *
12
12
  * @remarks
13
- * Checking serviceability for a given pincode based provided cart_id.
13
+ * Checking serviceability for a given pincode based provided cart_id or based on products list & pickup pincode provided.
14
14
  */
15
15
  export declare function shippingCheckServiceability(client: CeStorefrontCore, request?: operations.ShippingMethodsRequestBody | undefined, options?: RequestOptions): APIPromise<Result<operations.ShippingMethodsResponseBody, CeError | SDKValidationError | UnexpectedClientError | InvalidRequestError | RequestAbortedError | RequestTimeoutError | ConnectionError>>;
16
16
  //# sourceMappingURL=shippingCheckServiceability.d.ts.map
@@ -13,7 +13,7 @@ import { APIPromise } from "../types/async.js";
13
13
  * Check serviceability
14
14
  *
15
15
  * @remarks
16
- * Checking serviceability for a given pincode based provided cart_id.
16
+ * Checking serviceability for a given pincode based provided cart_id or based on products list & pickup pincode provided.
17
17
  */
18
18
  export function shippingCheckServiceability(client, request, options) {
19
19
  return new APIPromise($do(client, request, options));
@@ -42,8 +42,8 @@ export declare function serverURLFromOptions(options: SDKOptions): URL | null;
42
42
  export declare const SDK_METADATA: {
43
43
  readonly language: "typescript";
44
44
  readonly openapiDocVersion: "1.0";
45
- readonly sdkVersion: "0.12.1";
45
+ readonly sdkVersion: "0.12.2";
46
46
  readonly genVersion: "2.610.0";
47
- readonly userAgent: "speakeasy-sdk/typescript 0.12.1 2.610.0 1.0 ce-storefront";
47
+ readonly userAgent: "speakeasy-sdk/typescript 0.12.2 2.610.0 1.0 ce-storefront";
48
48
  };
49
49
  //# sourceMappingURL=config.d.ts.map
package/esm/lib/config.js CHANGED
@@ -39,8 +39,8 @@ export function serverURLFromOptions(options) {
39
39
  export const SDK_METADATA = {
40
40
  language: "typescript",
41
41
  openapiDocVersion: "1.0",
42
- sdkVersion: "0.12.1",
42
+ sdkVersion: "0.12.2",
43
43
  genVersion: "2.610.0",
44
- userAgent: "speakeasy-sdk/typescript 0.12.1 2.610.0 1.0 ce-storefront",
44
+ userAgent: "speakeasy-sdk/typescript 0.12.2 2.610.0 1.0 ce-storefront",
45
45
  };
46
46
  //# sourceMappingURL=config.js.map
@@ -0,0 +1,31 @@
1
+ import * as z from "zod";
2
+ import { Result as SafeParseResult } from "../../types/fp.js";
3
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
4
+ export type CartBasedServiceabilityCheck = {
5
+ deliveryPincode: string;
6
+ cartId: string;
7
+ };
8
+ /** @internal */
9
+ export declare const CartBasedServiceabilityCheck$inboundSchema: z.ZodType<CartBasedServiceabilityCheck, z.ZodTypeDef, unknown>;
10
+ /** @internal */
11
+ export type CartBasedServiceabilityCheck$Outbound = {
12
+ delivery_pincode: string;
13
+ cart_id: string;
14
+ };
15
+ /** @internal */
16
+ export declare const CartBasedServiceabilityCheck$outboundSchema: z.ZodType<CartBasedServiceabilityCheck$Outbound, z.ZodTypeDef, CartBasedServiceabilityCheck>;
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 declare namespace CartBasedServiceabilityCheck$ {
22
+ /** @deprecated use `CartBasedServiceabilityCheck$inboundSchema` instead. */
23
+ const inboundSchema: z.ZodType<CartBasedServiceabilityCheck, z.ZodTypeDef, unknown>;
24
+ /** @deprecated use `CartBasedServiceabilityCheck$outboundSchema` instead. */
25
+ const outboundSchema: z.ZodType<CartBasedServiceabilityCheck$Outbound, z.ZodTypeDef, CartBasedServiceabilityCheck>;
26
+ /** @deprecated use `CartBasedServiceabilityCheck$Outbound` instead. */
27
+ type Outbound = CartBasedServiceabilityCheck$Outbound;
28
+ }
29
+ export declare function cartBasedServiceabilityCheckToJSON(cartBasedServiceabilityCheck: CartBasedServiceabilityCheck): string;
30
+ export declare function cartBasedServiceabilityCheckFromJSON(jsonString: string): SafeParseResult<CartBasedServiceabilityCheck, SDKValidationError>;
31
+ //# sourceMappingURL=cartbasedserviceabilitycheck.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cartbasedserviceabilitycheck.d.ts","sourceRoot":"","sources":["../../../src/models/components/cartbasedserviceabilitycheck.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAGzB,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAErE,MAAM,MAAM,4BAA4B,GAAG;IACzC,eAAe,EAAE,MAAM,CAAC;IACxB,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,0CAA0C,EAAE,CAAC,CAAC,OAAO,CAChE,4BAA4B,EAC5B,CAAC,CAAC,UAAU,EACZ,OAAO,CASP,CAAC;AAEH,gBAAgB;AAChB,MAAM,MAAM,qCAAqC,GAAG;IAClD,gBAAgB,EAAE,MAAM,CAAC;IACzB,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,2CAA2C,EAAE,CAAC,CAAC,OAAO,CACjE,qCAAqC,EACrC,CAAC,CAAC,UAAU,EACZ,4BAA4B,CAS5B,CAAC;AAEH;;;GAGG;AACH,yBAAiB,6BAA6B,CAAC;IAC7C,4EAA4E;IACrE,MAAM,aAAa,gEAA6C,CAAC;IACxE,6EAA6E;IACtE,MAAM,cAAc,8FAA8C,CAAC;IAC1E,uEAAuE;IACvE,KAAY,QAAQ,GAAG,qCAAqC,CAAC;CAC9D;AAED,wBAAgB,kCAAkC,CAChD,4BAA4B,EAAE,4BAA4B,GACzD,MAAM,CAMR;AAED,wBAAgB,oCAAoC,CAClD,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,4BAA4B,EAAE,kBAAkB,CAAC,CAMnE"}
@@ -0,0 +1,44 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+ import * as z from "zod";
5
+ import { remap as remap$ } from "../../lib/primitives.js";
6
+ import { safeParse } from "../../lib/schemas.js";
7
+ /** @internal */
8
+ export const CartBasedServiceabilityCheck$inboundSchema = z.object({
9
+ delivery_pincode: z.string(),
10
+ cart_id: z.string(),
11
+ }).transform((v) => {
12
+ return remap$(v, {
13
+ "delivery_pincode": "deliveryPincode",
14
+ "cart_id": "cartId",
15
+ });
16
+ });
17
+ /** @internal */
18
+ export const CartBasedServiceabilityCheck$outboundSchema = z.object({
19
+ deliveryPincode: z.string(),
20
+ cartId: z.string(),
21
+ }).transform((v) => {
22
+ return remap$(v, {
23
+ deliveryPincode: "delivery_pincode",
24
+ cartId: "cart_id",
25
+ });
26
+ });
27
+ /**
28
+ * @internal
29
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
30
+ */
31
+ export var CartBasedServiceabilityCheck$;
32
+ (function (CartBasedServiceabilityCheck$) {
33
+ /** @deprecated use `CartBasedServiceabilityCheck$inboundSchema` instead. */
34
+ CartBasedServiceabilityCheck$.inboundSchema = CartBasedServiceabilityCheck$inboundSchema;
35
+ /** @deprecated use `CartBasedServiceabilityCheck$outboundSchema` instead. */
36
+ CartBasedServiceabilityCheck$.outboundSchema = CartBasedServiceabilityCheck$outboundSchema;
37
+ })(CartBasedServiceabilityCheck$ || (CartBasedServiceabilityCheck$ = {}));
38
+ export function cartBasedServiceabilityCheckToJSON(cartBasedServiceabilityCheck) {
39
+ return JSON.stringify(CartBasedServiceabilityCheck$outboundSchema.parse(cartBasedServiceabilityCheck));
40
+ }
41
+ export function cartBasedServiceabilityCheckFromJSON(jsonString) {
42
+ return safeParse(jsonString, (x) => CartBasedServiceabilityCheck$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CartBasedServiceabilityCheck' from JSON`);
43
+ }
44
+ //# sourceMappingURL=cartbasedserviceabilitycheck.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cartbasedserviceabilitycheck.js","sourceRoot":"","sources":["../../../src/models/components/cartbasedserviceabilitycheck.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AACzB,OAAO,EAAE,KAAK,IAAI,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AASjD,gBAAgB;AAChB,MAAM,CAAC,MAAM,0CAA0C,GAInD,CAAC,CAAC,MAAM,CAAC;IACX,gBAAgB,EAAE,CAAC,CAAC,MAAM,EAAE;IAC5B,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;CACpB,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE;IACjB,OAAO,MAAM,CAAC,CAAC,EAAE;QACf,kBAAkB,EAAE,iBAAiB;QACrC,SAAS,EAAE,QAAQ;KACpB,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAQH,gBAAgB;AAChB,MAAM,CAAC,MAAM,2CAA2C,GAIpD,CAAC,CAAC,MAAM,CAAC;IACX,eAAe,EAAE,CAAC,CAAC,MAAM,EAAE;IAC3B,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE;CACnB,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE;IACjB,OAAO,MAAM,CAAC,CAAC,EAAE;QACf,eAAe,EAAE,kBAAkB;QACnC,MAAM,EAAE,SAAS;KAClB,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH;;;GAGG;AACH,MAAM,KAAW,6BAA6B,CAO7C;AAPD,WAAiB,6BAA6B;IAC5C,4EAA4E;IAC/D,2CAAa,GAAG,0CAA0C,CAAC;IACxE,6EAA6E;IAChE,4CAAc,GAAG,2CAA2C,CAAC;AAG5E,CAAC,EAPgB,6BAA6B,KAA7B,6BAA6B,QAO7C;AAED,MAAM,UAAU,kCAAkC,CAChD,4BAA0D;IAE1D,OAAO,IAAI,CAAC,SAAS,CACnB,2CAA2C,CAAC,KAAK,CAC/C,4BAA4B,CAC7B,CACF,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,oCAAoC,CAClD,UAAkB;IAElB,OAAO,SAAS,CACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,0CAA0C,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EACtE,0DAA0D,CAC3D,CAAC;AACJ,CAAC"}
@@ -4,6 +4,7 @@ export * from "./banktransfer.js";
4
4
  export * from "./booleanattribute.js";
5
5
  export * from "./cardpayment.js";
6
6
  export * from "./cart.js";
7
+ export * from "./cartbasedserviceabilitycheck.js";
7
8
  export * from "./cartitem.js";
8
9
  export * from "./category.js";
9
10
  export * from "./colorattribute.js";
@@ -46,6 +47,7 @@ export * from "./productimage.js";
46
47
  export * from "./productpricing.js";
47
48
  export * from "./productpromotion.js";
48
49
  export * from "./productreview.js";
50
+ export * from "./productsbasedserviceabilitycheck.js";
49
51
  export * from "./productshipping.js";
50
52
  export * from "./productsubscription.js";
51
53
  export * from "./productvideo.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/models/components/index.ts"],"names":[],"mappings":"AAIA,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,kBAAkB,CAAC;AACjC,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,sBAAsB,CAAC;AACrC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,sBAAsB,CAAC;AACrC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,qBAAqB,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AAC3C,cAAc,cAAc,CAAC;AAC7B,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC;AACvC,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,uCAAuC,CAAC;AACtD,cAAc,sBAAsB,CAAC;AACrC,cAAc,0BAA0B,CAAC;AACzC,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,mBAAmB,CAAC;AAClC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,yBAAyB,CAAC;AACxC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAChC,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,oBAAoB,CAAC"}
@@ -7,6 +7,7 @@ export * from "./banktransfer.js";
7
7
  export * from "./booleanattribute.js";
8
8
  export * from "./cardpayment.js";
9
9
  export * from "./cart.js";
10
+ export * from "./cartbasedserviceabilitycheck.js";
10
11
  export * from "./cartitem.js";
11
12
  export * from "./category.js";
12
13
  export * from "./colorattribute.js";
@@ -49,6 +50,7 @@ export * from "./productimage.js";
49
50
  export * from "./productpricing.js";
50
51
  export * from "./productpromotion.js";
51
52
  export * from "./productreview.js";
53
+ export * from "./productsbasedserviceabilitycheck.js";
52
54
  export * from "./productshipping.js";
53
55
  export * from "./productsubscription.js";
54
56
  export * from "./productvideo.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/models/components/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AA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
3
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
4
+ export type Packaging = {
5
+ packWidth: number;
6
+ packHeight: number;
7
+ packLength: number;
8
+ packDryWeight: number;
9
+ };
10
+ export type Products = {
11
+ productId: string;
12
+ variantId: string | null;
13
+ quantity: number;
14
+ packaging: Packaging;
15
+ };
16
+ export type ProductsBasedServiceabilityCheck = {
17
+ pickupPincode: string;
18
+ deliveryPincode: string;
19
+ products: Array<Products>;
20
+ };
21
+ /** @internal */
22
+ export declare const Packaging$inboundSchema: z.ZodType<Packaging, z.ZodTypeDef, unknown>;
23
+ /** @internal */
24
+ export type Packaging$Outbound = {
25
+ pack_width: number;
26
+ pack_height: number;
27
+ pack_length: number;
28
+ pack_dry_weight: number;
29
+ };
30
+ /** @internal */
31
+ export declare const Packaging$outboundSchema: z.ZodType<Packaging$Outbound, z.ZodTypeDef, Packaging>;
32
+ /**
33
+ * @internal
34
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
35
+ */
36
+ export declare namespace Packaging$ {
37
+ /** @deprecated use `Packaging$inboundSchema` instead. */
38
+ const inboundSchema: z.ZodType<Packaging, z.ZodTypeDef, unknown>;
39
+ /** @deprecated use `Packaging$outboundSchema` instead. */
40
+ const outboundSchema: z.ZodType<Packaging$Outbound, z.ZodTypeDef, Packaging>;
41
+ /** @deprecated use `Packaging$Outbound` instead. */
42
+ type Outbound = Packaging$Outbound;
43
+ }
44
+ export declare function packagingToJSON(packaging: Packaging): string;
45
+ export declare function packagingFromJSON(jsonString: string): SafeParseResult<Packaging, SDKValidationError>;
46
+ /** @internal */
47
+ export declare const Products$inboundSchema: z.ZodType<Products, z.ZodTypeDef, unknown>;
48
+ /** @internal */
49
+ export type Products$Outbound = {
50
+ product_id: string;
51
+ variant_id: string | null;
52
+ quantity: number;
53
+ packaging: Packaging$Outbound;
54
+ };
55
+ /** @internal */
56
+ export declare const Products$outboundSchema: z.ZodType<Products$Outbound, z.ZodTypeDef, Products>;
57
+ /**
58
+ * @internal
59
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
60
+ */
61
+ export declare namespace Products$ {
62
+ /** @deprecated use `Products$inboundSchema` instead. */
63
+ const inboundSchema: z.ZodType<Products, z.ZodTypeDef, unknown>;
64
+ /** @deprecated use `Products$outboundSchema` instead. */
65
+ const outboundSchema: z.ZodType<Products$Outbound, z.ZodTypeDef, Products>;
66
+ /** @deprecated use `Products$Outbound` instead. */
67
+ type Outbound = Products$Outbound;
68
+ }
69
+ export declare function productsToJSON(products: Products): string;
70
+ export declare function productsFromJSON(jsonString: string): SafeParseResult<Products, SDKValidationError>;
71
+ /** @internal */
72
+ export declare const ProductsBasedServiceabilityCheck$inboundSchema: z.ZodType<ProductsBasedServiceabilityCheck, z.ZodTypeDef, unknown>;
73
+ /** @internal */
74
+ export type ProductsBasedServiceabilityCheck$Outbound = {
75
+ pickup_pincode: string;
76
+ delivery_pincode: string;
77
+ products: Array<Products$Outbound>;
78
+ };
79
+ /** @internal */
80
+ export declare const ProductsBasedServiceabilityCheck$outboundSchema: z.ZodType<ProductsBasedServiceabilityCheck$Outbound, z.ZodTypeDef, ProductsBasedServiceabilityCheck>;
81
+ /**
82
+ * @internal
83
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
84
+ */
85
+ export declare namespace ProductsBasedServiceabilityCheck$ {
86
+ /** @deprecated use `ProductsBasedServiceabilityCheck$inboundSchema` instead. */
87
+ const inboundSchema: z.ZodType<ProductsBasedServiceabilityCheck, z.ZodTypeDef, unknown>;
88
+ /** @deprecated use `ProductsBasedServiceabilityCheck$outboundSchema` instead. */
89
+ const outboundSchema: z.ZodType<ProductsBasedServiceabilityCheck$Outbound, z.ZodTypeDef, ProductsBasedServiceabilityCheck>;
90
+ /** @deprecated use `ProductsBasedServiceabilityCheck$Outbound` instead. */
91
+ type Outbound = ProductsBasedServiceabilityCheck$Outbound;
92
+ }
93
+ export declare function productsBasedServiceabilityCheckToJSON(productsBasedServiceabilityCheck: ProductsBasedServiceabilityCheck): string;
94
+ export declare function productsBasedServiceabilityCheckFromJSON(jsonString: string): SafeParseResult<ProductsBasedServiceabilityCheck, SDKValidationError>;
95
+ //# sourceMappingURL=productsbasedserviceabilitycheck.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"productsbasedserviceabilitycheck.d.ts","sourceRoot":"","sources":["../../../src/models/components/productsbasedserviceabilitycheck.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAGzB,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAErE,MAAM,MAAM,SAAS,GAAG;IACtB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,QAAQ,GAAG;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,SAAS,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,gCAAgC,GAAG;IAC7C,aAAa,EAAE,MAAM,CAAC;IACtB,eAAe,EAAE,MAAM,CAAC;IACxB,QAAQ,EAAE,KAAK,CAAC,QAAQ,CAAC,CAAC;CAC3B,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,uBAAuB,EAAE,CAAC,CAAC,OAAO,CAC7C,SAAS,EACT,CAAC,CAAC,UAAU,EACZ,OAAO,CAaP,CAAC;AAEH,gBAAgB;AAChB,MAAM,MAAM,kBAAkB,GAAG;IAC/B,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,eAAe,EAAE,MAAM,CAAC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B,CAC9B,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,QAAQ,EAAE,kBAAkB,CAAC,CAM/C;AAED,gBAAgB;AAChB,eAAO,MAAM,8CAA8C,EAAE,CAAC,CAAC,OAAO,CACpE,gCAAgC,EAChC,CAAC,CAAC,UAAU,EACZ,OAAO,CAUP,CAAC;AAEH,gBAAgB;AAChB,MAAM,MAAM,yCAAyC,GAAG;IACtD,cAAc,EAAE,MAAM,CAAC;IACvB,gBAAgB,EAAE,MAAM,CAAC;IACzB,QAAQ,EAAE,KAAK,CAAC,iBAAiB,CAAC,CAAC;CACpC,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,+CAA+C,EAAE,CAAC,CAAC,OAAO,CACrE,yCAAyC,EACzC,CAAC,CAAC,UAAU,EACZ,gCAAgC,CAUhC,CAAC;AAEH;;;GAGG;AACH,yBAAiB,iCAAiC,CAAC;IACjD,gFAAgF;IACzE,MAAM,aAAa,oEAAiD,CAAC;IAC5E,iFAAiF;IAC1E,MAAM,cAAc,sGAAkD,CAAC;IAC9E,2EAA2E;IAC3E,KAAY,QAAQ,GAAG,yCAAyC,CAAC;CAClE;AAED,wBAAgB,sCAAsC,CACpD,gCAAgC,EAAE,gCAAgC,GACjE,MAAM,CAMR;AAED,wBAAgB,wCAAwC,CACtD,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,gCAAgC,EAAE,kBAAkB,CAAC,CAMvE"}
@@ -0,0 +1,132 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+ import * as z from "zod";
5
+ import { remap as remap$ } from "../../lib/primitives.js";
6
+ import { safeParse } from "../../lib/schemas.js";
7
+ /** @internal */
8
+ export const Packaging$inboundSchema = z.object({
9
+ pack_width: z.number(),
10
+ pack_height: z.number(),
11
+ pack_length: z.number(),
12
+ pack_dry_weight: z.number(),
13
+ }).transform((v) => {
14
+ return remap$(v, {
15
+ "pack_width": "packWidth",
16
+ "pack_height": "packHeight",
17
+ "pack_length": "packLength",
18
+ "pack_dry_weight": "packDryWeight",
19
+ });
20
+ });
21
+ /** @internal */
22
+ export const Packaging$outboundSchema = z.object({
23
+ packWidth: z.number(),
24
+ packHeight: z.number(),
25
+ packLength: z.number(),
26
+ packDryWeight: z.number(),
27
+ }).transform((v) => {
28
+ return remap$(v, {
29
+ packWidth: "pack_width",
30
+ packHeight: "pack_height",
31
+ packLength: "pack_length",
32
+ packDryWeight: "pack_dry_weight",
33
+ });
34
+ });
35
+ /**
36
+ * @internal
37
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
38
+ */
39
+ export var Packaging$;
40
+ (function (Packaging$) {
41
+ /** @deprecated use `Packaging$inboundSchema` instead. */
42
+ Packaging$.inboundSchema = Packaging$inboundSchema;
43
+ /** @deprecated use `Packaging$outboundSchema` instead. */
44
+ Packaging$.outboundSchema = Packaging$outboundSchema;
45
+ })(Packaging$ || (Packaging$ = {}));
46
+ export function packagingToJSON(packaging) {
47
+ return JSON.stringify(Packaging$outboundSchema.parse(packaging));
48
+ }
49
+ export function packagingFromJSON(jsonString) {
50
+ return safeParse(jsonString, (x) => Packaging$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Packaging' from JSON`);
51
+ }
52
+ /** @internal */
53
+ export const Products$inboundSchema = z.object({
54
+ product_id: z.string(),
55
+ variant_id: z.nullable(z.string()),
56
+ quantity: z.number().int(),
57
+ packaging: z.lazy(() => Packaging$inboundSchema),
58
+ }).transform((v) => {
59
+ return remap$(v, {
60
+ "product_id": "productId",
61
+ "variant_id": "variantId",
62
+ });
63
+ });
64
+ /** @internal */
65
+ export const Products$outboundSchema = z.object({
66
+ productId: z.string(),
67
+ variantId: z.nullable(z.string()),
68
+ quantity: z.number().int(),
69
+ packaging: z.lazy(() => Packaging$outboundSchema),
70
+ }).transform((v) => {
71
+ return remap$(v, {
72
+ productId: "product_id",
73
+ variantId: "variant_id",
74
+ });
75
+ });
76
+ /**
77
+ * @internal
78
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
79
+ */
80
+ export var Products$;
81
+ (function (Products$) {
82
+ /** @deprecated use `Products$inboundSchema` instead. */
83
+ Products$.inboundSchema = Products$inboundSchema;
84
+ /** @deprecated use `Products$outboundSchema` instead. */
85
+ Products$.outboundSchema = Products$outboundSchema;
86
+ })(Products$ || (Products$ = {}));
87
+ export function productsToJSON(products) {
88
+ return JSON.stringify(Products$outboundSchema.parse(products));
89
+ }
90
+ export function productsFromJSON(jsonString) {
91
+ return safeParse(jsonString, (x) => Products$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Products' from JSON`);
92
+ }
93
+ /** @internal */
94
+ export const ProductsBasedServiceabilityCheck$inboundSchema = z.object({
95
+ pickup_pincode: z.string(),
96
+ delivery_pincode: z.string(),
97
+ products: z.array(z.lazy(() => Products$inboundSchema)),
98
+ }).transform((v) => {
99
+ return remap$(v, {
100
+ "pickup_pincode": "pickupPincode",
101
+ "delivery_pincode": "deliveryPincode",
102
+ });
103
+ });
104
+ /** @internal */
105
+ export const ProductsBasedServiceabilityCheck$outboundSchema = z.object({
106
+ pickupPincode: z.string(),
107
+ deliveryPincode: z.string(),
108
+ products: z.array(z.lazy(() => Products$outboundSchema)),
109
+ }).transform((v) => {
110
+ return remap$(v, {
111
+ pickupPincode: "pickup_pincode",
112
+ deliveryPincode: "delivery_pincode",
113
+ });
114
+ });
115
+ /**
116
+ * @internal
117
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
118
+ */
119
+ export var ProductsBasedServiceabilityCheck$;
120
+ (function (ProductsBasedServiceabilityCheck$) {
121
+ /** @deprecated use `ProductsBasedServiceabilityCheck$inboundSchema` instead. */
122
+ ProductsBasedServiceabilityCheck$.inboundSchema = ProductsBasedServiceabilityCheck$inboundSchema;
123
+ /** @deprecated use `ProductsBasedServiceabilityCheck$outboundSchema` instead. */
124
+ ProductsBasedServiceabilityCheck$.outboundSchema = ProductsBasedServiceabilityCheck$outboundSchema;
125
+ })(ProductsBasedServiceabilityCheck$ || (ProductsBasedServiceabilityCheck$ = {}));
126
+ export function productsBasedServiceabilityCheckToJSON(productsBasedServiceabilityCheck) {
127
+ return JSON.stringify(ProductsBasedServiceabilityCheck$outboundSchema.parse(productsBasedServiceabilityCheck));
128
+ }
129
+ export function productsBasedServiceabilityCheckFromJSON(jsonString) {
130
+ return safeParse(jsonString, (x) => ProductsBasedServiceabilityCheck$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ProductsBasedServiceabilityCheck' from JSON`);
131
+ }
132
+ //# sourceMappingURL=productsbasedserviceabilitycheck.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"productsbasedserviceabilitycheck.js","sourceRoot":"","sources":["../../../src/models/components/productsbasedserviceabilitycheck.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AACzB,OAAO,EAAE,KAAK,IAAI,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAwBjD,gBAAgB;AAChB,MAAM,CAAC,MAAM,uBAAuB,GAIhC,CAAC,CAAC,MAAM,CAAC;IACX,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE;IACtB,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE;IACvB,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE;IACvB,eAAe,EAAE,CAAC,CAAC,MAAM,EAAE;CAC5B,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE;IACjB,OAAO,MAAM,CAAC,CAAC,EAAE;QACf,YAAY,EAAE,WAAW;QACzB,aAAa,EAAE,YAAY;QAC3B,aAAa,EAAE,YAAY;QAC3B,iBAAiB,EAAE,eAAe;KACnC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAUH,gBAAgB;AAChB,MAAM,CAAC,MAAM,wBAAwB,GAIjC,CAAC,CAAC,MAAM,CAAC;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O,IAAI,CAAC,SAAS,CACnB,+CAA+C,CAAC,KAAK,CACnD,gCAAgC,CACjC,CACF,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,wCAAwC,CACtD,UAAkB;IAElB,OAAO,SAAS,CACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,8CAA8C,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAC1E,8DAA8D,CAC/D,CAAC;AACJ,CAAC"}
@@ -2,10 +2,7 @@ import * as z from "zod";
2
2
  import { Result as SafeParseResult } from "../../types/fp.js";
3
3
  import * as components from "../components/index.js";
4
4
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
5
- export type ShippingMethodsRequestBody = {
6
- deliveryPincode: string;
7
- cartId: string;
8
- };
5
+ export type ShippingMethodsRequestBody = components.CartBasedServiceabilityCheck | components.ProductsBasedServiceabilityCheck;
9
6
  /**
10
7
  * OK
11
8
  */
@@ -17,10 +14,7 @@ export type ShippingMethodsResponseBody = {
17
14
  /** @internal */
18
15
  export declare const ShippingMethodsRequestBody$inboundSchema: z.ZodType<ShippingMethodsRequestBody, z.ZodTypeDef, unknown>;
19
16
  /** @internal */
20
- export type ShippingMethodsRequestBody$Outbound = {
21
- delivery_pincode: string;
22
- cart_id: string;
23
- };
17
+ export type ShippingMethodsRequestBody$Outbound = components.CartBasedServiceabilityCheck$Outbound | components.ProductsBasedServiceabilityCheck$Outbound;
24
18
  /** @internal */
25
19
  export declare const ShippingMethodsRequestBody$outboundSchema: z.ZodType<ShippingMethodsRequestBody$Outbound, z.ZodTypeDef, ShippingMethodsRequestBody>;
26
20
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"shippingmethods.d.ts","sourceRoot":"","sources":["../../../src/models/operations/shippingmethods.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAGzB,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC9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P,CAAC;AAEH,gBAAgB;AAChB,MAAM,MAAM,oCAAoC,GAAG;IACjD,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,UAAU,CAAC,8BAA8B,CAAC;CACpD,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,0CAA0C,EAAE,CAAC,CAAC,OAAO,CAChE,oCAAoC,EACpC,CAAC,CAAC,UAAU,EACZ,2BAA2B,CAK3B,CAAC;AAEH;;;GAGG;AACH,yBAAiB,4BAA4B,CAAC;IAC5C,2EAA2E;IACpE,MAAM,aAAa,+DAA4C,CAAC;IACvE,4EAA4E;IACrE,MAAM,cAAc,4FAA6C,CAAC;IACzE,sEAAsE;IACtE,KAAY,QAAQ,GAAG,oCAAoC,CAAC;CAC7D;AAED,wBAAgB,iCAAiC,CAC/C,2BAA2B,EAAE,2BAA2B,GACvD,MAAM,CAMR;AAED,wBAAgB,mCAAmC,CACjD,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,2BAA2B,EAAE,kBAAkB,CAAC,CAMlE"}
1
+ {"version":3,"file":"shippingmethods.d.ts","sourceRoot":"","sources":["../../../src/models/operations/shippingmethods.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAEzB,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,KAAK,UAAU,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAErE,MAAM,MAAM,0BAA0B,GAClC,UAAU,CAAC,4BAA4B,GACvC,UAAU,CAAC,gCAAgC,CAAC;AAEhD;;GAEG;AACH,MAAM,MAAM,2BAA2B,GAAG;IACxC,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,UAAU,CAAC,qBAAqB,CAAC;CAC3C,CAAC;AAEF,gBAAgB;AAChB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,4EAA4E;IACrE,MAAM,cAAc,4FAA6C,CAAC;IACzE,sEAAsE;IACtE,KAAY,QAAQ,GAAG,oCAAoC,CAAC;CAC7D;AAED,wBAAgB,iCAAiC,CAC/C,2BAA2B,EAAE,2BAA2B,GACvD,MAAM,CAMR;AAED,wBAAgB,mCAAmC,CACjD,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,2BAA2B,EAAE,kBAAkB,CAAC,CAMlE"}
@@ -2,29 +2,18 @@
2
2
  * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
3
  */
4
4
  import * as z from "zod";
5
- import { remap as remap$ } from "../../lib/primitives.js";
6
5
  import { safeParse } from "../../lib/schemas.js";
7
6
  import * as components from "../components/index.js";
8
7
  /** @internal */
9
- export const ShippingMethodsRequestBody$inboundSchema = z.object({
10
- delivery_pincode: z.string(),
11
- cart_id: z.string(),
12
- }).transform((v) => {
13
- return remap$(v, {
14
- "delivery_pincode": "deliveryPincode",
15
- "cart_id": "cartId",
16
- });
17
- });
8
+ export const ShippingMethodsRequestBody$inboundSchema = z.union([
9
+ components.CartBasedServiceabilityCheck$inboundSchema,
10
+ components.ProductsBasedServiceabilityCheck$inboundSchema,
11
+ ]);
18
12
  /** @internal */
19
- export const ShippingMethodsRequestBody$outboundSchema = z.object({
20
- deliveryPincode: z.string(),
21
- cartId: z.string(),
22
- }).transform((v) => {
23
- return remap$(v, {
24
- deliveryPincode: "delivery_pincode",
25
- cartId: "cart_id",
26
- });
27
- });
13
+ export const ShippingMethodsRequestBody$outboundSchema = z.union([
14
+ components.CartBasedServiceabilityCheck$outboundSchema,
15
+ components.ProductsBasedServiceabilityCheck$outboundSchema,
16
+ ]);
28
17
  /**
29
18
  * @internal
30
19
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
@@ -1 +1 @@
1
- {"version":3,"file":"shippingmethods.js","sourceRoot":"","sources":["../../../src/models/operations/shippingmethods.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OA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IACnB,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE;IACpB,OAAO,EAAE,UAAU,CAAC,mCAAmC;CACxD,CAAC,CAAC;AASH,gBAAgB;AAChB,MAAM,CAAC,MAAM,0CAA0C,GAInD,CAAC,CAAC,MAAM,CAAC;IACX,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;IACnB,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE;IACpB,OAAO,EAAE,UAAU,CAAC,oCAAoC;CACzD,CAAC,CAAC;AAEH;;;GAGG;AACH,MAAM,KAAW,4BAA4B,CAO5C;AAPD,WAAiB,4BAA4B;IAC3C,2EAA2E;IAC9D,0CAAa,GAAG,yCAAyC,CAAC;IACvE,4EAA4E;IAC/D,2CAAc,GAAG,0CAA0C,CAAC;AAG3E,CAAC,EAPgB,4BAA4B,KAA5B,4BAA4B,QAO5C;AAED,MAAM,UAAU,iCAAiC,CAC/C,2BAAwD;IAExD,OAAO,IAAI,CAAC,SAAS,CACnB,0CAA0C,CAAC,KAAK,CAC9C,2BAA2B,CAC5B,CACF,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,mCAAmC,CACjD,UAAkB;IAElB,OAAO,SAAS,CACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,yCAAyC,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EACrE,yDAAyD,CAC1D,CAAC;AACJ,CAAC"}
@@ -12,7 +12,7 @@ export declare class Shipping extends ClientSDK {
12
12
  * Check serviceability
13
13
  *
14
14
  * @remarks
15
- * Checking serviceability for a given pincode based provided cart_id.
15
+ * Checking serviceability for a given pincode based provided cart_id or based on products list & pickup pincode provided.
16
16
  */
17
17
  checkServiceability(request?: operations.ShippingMethodsRequestBody | undefined, options?: RequestOptions): Promise<operations.ShippingMethodsResponseBody>;
18
18
  }
@@ -19,7 +19,7 @@ export class Shipping extends ClientSDK {
19
19
  * Check serviceability
20
20
  *
21
21
  * @remarks
22
- * Checking serviceability for a given pincode based provided cart_id.
22
+ * Checking serviceability for a given pincode based provided cart_id or based on products list & pickup pincode provided.
23
23
  */
24
24
  async checkServiceability(request, options) {
25
25
  return unwrapAsync(shippingCheckServiceability(this, request, options));
package/jsr.json CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  {
4
4
  "name": "ce-storefront",
5
- "version": "0.12.1",
5
+ "version": "0.12.2",
6
6
  "exports": {
7
7
  ".": "./src/index.ts",
8
8
  "./models/errors": "./src/models/errors/index.ts",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ce-storefront",
3
- "version": "0.12.1",
3
+ "version": "0.12.2",
4
4
  "author": "TarkAI",
5
5
  "type": "module",
6
6
  "main": "./esm/index.js",
@@ -27,7 +27,7 @@ import { Result } from "../types/fp.js";
27
27
  * Check serviceability
28
28
  *
29
29
  * @remarks
30
- * Checking serviceability for a given pincode based provided cart_id.
30
+ * Checking serviceability for a given pincode based provided cart_id or based on products list & pickup pincode provided.
31
31
  */
32
32
  export function shippingCheckServiceability(
33
33
  client: CeStorefrontCore,
package/src/lib/config.ts CHANGED
@@ -76,7 +76,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
76
76
  export const SDK_METADATA = {
77
77
  language: "typescript",
78
78
  openapiDocVersion: "1.0",
79
- sdkVersion: "0.12.1",
79
+ sdkVersion: "0.12.2",
80
80
  genVersion: "2.610.0",
81
- userAgent: "speakeasy-sdk/typescript 0.12.1 2.610.0 1.0 ce-storefront",
81
+ userAgent: "speakeasy-sdk/typescript 0.12.2 2.610.0 1.0 ce-storefront",
82
82
  } as const;
@@ -0,0 +1,83 @@
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 { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
+
11
+ export type CartBasedServiceabilityCheck = {
12
+ deliveryPincode: string;
13
+ cartId: string;
14
+ };
15
+
16
+ /** @internal */
17
+ export const CartBasedServiceabilityCheck$inboundSchema: z.ZodType<
18
+ CartBasedServiceabilityCheck,
19
+ z.ZodTypeDef,
20
+ unknown
21
+ > = z.object({
22
+ delivery_pincode: z.string(),
23
+ cart_id: z.string(),
24
+ }).transform((v) => {
25
+ return remap$(v, {
26
+ "delivery_pincode": "deliveryPincode",
27
+ "cart_id": "cartId",
28
+ });
29
+ });
30
+
31
+ /** @internal */
32
+ export type CartBasedServiceabilityCheck$Outbound = {
33
+ delivery_pincode: string;
34
+ cart_id: string;
35
+ };
36
+
37
+ /** @internal */
38
+ export const CartBasedServiceabilityCheck$outboundSchema: z.ZodType<
39
+ CartBasedServiceabilityCheck$Outbound,
40
+ z.ZodTypeDef,
41
+ CartBasedServiceabilityCheck
42
+ > = z.object({
43
+ deliveryPincode: z.string(),
44
+ cartId: z.string(),
45
+ }).transform((v) => {
46
+ return remap$(v, {
47
+ deliveryPincode: "delivery_pincode",
48
+ cartId: "cart_id",
49
+ });
50
+ });
51
+
52
+ /**
53
+ * @internal
54
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
55
+ */
56
+ export namespace CartBasedServiceabilityCheck$ {
57
+ /** @deprecated use `CartBasedServiceabilityCheck$inboundSchema` instead. */
58
+ export const inboundSchema = CartBasedServiceabilityCheck$inboundSchema;
59
+ /** @deprecated use `CartBasedServiceabilityCheck$outboundSchema` instead. */
60
+ export const outboundSchema = CartBasedServiceabilityCheck$outboundSchema;
61
+ /** @deprecated use `CartBasedServiceabilityCheck$Outbound` instead. */
62
+ export type Outbound = CartBasedServiceabilityCheck$Outbound;
63
+ }
64
+
65
+ export function cartBasedServiceabilityCheckToJSON(
66
+ cartBasedServiceabilityCheck: CartBasedServiceabilityCheck,
67
+ ): string {
68
+ return JSON.stringify(
69
+ CartBasedServiceabilityCheck$outboundSchema.parse(
70
+ cartBasedServiceabilityCheck,
71
+ ),
72
+ );
73
+ }
74
+
75
+ export function cartBasedServiceabilityCheckFromJSON(
76
+ jsonString: string,
77
+ ): SafeParseResult<CartBasedServiceabilityCheck, SDKValidationError> {
78
+ return safeParse(
79
+ jsonString,
80
+ (x) => CartBasedServiceabilityCheck$inboundSchema.parse(JSON.parse(x)),
81
+ `Failed to parse 'CartBasedServiceabilityCheck' from JSON`,
82
+ );
83
+ }
@@ -8,6 +8,7 @@ export * from "./banktransfer.js";
8
8
  export * from "./booleanattribute.js";
9
9
  export * from "./cardpayment.js";
10
10
  export * from "./cart.js";
11
+ export * from "./cartbasedserviceabilitycheck.js";
11
12
  export * from "./cartitem.js";
12
13
  export * from "./category.js";
13
14
  export * from "./colorattribute.js";
@@ -50,6 +51,7 @@ export * from "./productimage.js";
50
51
  export * from "./productpricing.js";
51
52
  export * from "./productpromotion.js";
52
53
  export * from "./productreview.js";
54
+ export * from "./productsbasedserviceabilitycheck.js";
53
55
  export * from "./productshipping.js";
54
56
  export * from "./productsubscription.js";
55
57
  export * from "./productvideo.js";
@@ -0,0 +1,243 @@
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 { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
+
11
+ export type Packaging = {
12
+ packWidth: number;
13
+ packHeight: number;
14
+ packLength: number;
15
+ packDryWeight: number;
16
+ };
17
+
18
+ export type Products = {
19
+ productId: string;
20
+ variantId: string | null;
21
+ quantity: number;
22
+ packaging: Packaging;
23
+ };
24
+
25
+ export type ProductsBasedServiceabilityCheck = {
26
+ pickupPincode: string;
27
+ deliveryPincode: string;
28
+ products: Array<Products>;
29
+ };
30
+
31
+ /** @internal */
32
+ export const Packaging$inboundSchema: z.ZodType<
33
+ Packaging,
34
+ z.ZodTypeDef,
35
+ unknown
36
+ > = z.object({
37
+ pack_width: z.number(),
38
+ pack_height: z.number(),
39
+ pack_length: z.number(),
40
+ pack_dry_weight: z.number(),
41
+ }).transform((v) => {
42
+ return remap$(v, {
43
+ "pack_width": "packWidth",
44
+ "pack_height": "packHeight",
45
+ "pack_length": "packLength",
46
+ "pack_dry_weight": "packDryWeight",
47
+ });
48
+ });
49
+
50
+ /** @internal */
51
+ export type Packaging$Outbound = {
52
+ pack_width: number;
53
+ pack_height: number;
54
+ pack_length: number;
55
+ pack_dry_weight: number;
56
+ };
57
+
58
+ /** @internal */
59
+ export const Packaging$outboundSchema: z.ZodType<
60
+ Packaging$Outbound,
61
+ z.ZodTypeDef,
62
+ Packaging
63
+ > = z.object({
64
+ packWidth: z.number(),
65
+ packHeight: z.number(),
66
+ packLength: z.number(),
67
+ packDryWeight: z.number(),
68
+ }).transform((v) => {
69
+ return remap$(v, {
70
+ packWidth: "pack_width",
71
+ packHeight: "pack_height",
72
+ packLength: "pack_length",
73
+ packDryWeight: "pack_dry_weight",
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 Packaging$ {
82
+ /** @deprecated use `Packaging$inboundSchema` instead. */
83
+ export const inboundSchema = Packaging$inboundSchema;
84
+ /** @deprecated use `Packaging$outboundSchema` instead. */
85
+ export const outboundSchema = Packaging$outboundSchema;
86
+ /** @deprecated use `Packaging$Outbound` instead. */
87
+ export type Outbound = Packaging$Outbound;
88
+ }
89
+
90
+ export function packagingToJSON(packaging: Packaging): string {
91
+ return JSON.stringify(Packaging$outboundSchema.parse(packaging));
92
+ }
93
+
94
+ export function packagingFromJSON(
95
+ jsonString: string,
96
+ ): SafeParseResult<Packaging, SDKValidationError> {
97
+ return safeParse(
98
+ jsonString,
99
+ (x) => Packaging$inboundSchema.parse(JSON.parse(x)),
100
+ `Failed to parse 'Packaging' from JSON`,
101
+ );
102
+ }
103
+
104
+ /** @internal */
105
+ export const Products$inboundSchema: z.ZodType<
106
+ Products,
107
+ z.ZodTypeDef,
108
+ unknown
109
+ > = z.object({
110
+ product_id: z.string(),
111
+ variant_id: z.nullable(z.string()),
112
+ quantity: z.number().int(),
113
+ packaging: z.lazy(() => Packaging$inboundSchema),
114
+ }).transform((v) => {
115
+ return remap$(v, {
116
+ "product_id": "productId",
117
+ "variant_id": "variantId",
118
+ });
119
+ });
120
+
121
+ /** @internal */
122
+ export type Products$Outbound = {
123
+ product_id: string;
124
+ variant_id: string | null;
125
+ quantity: number;
126
+ packaging: Packaging$Outbound;
127
+ };
128
+
129
+ /** @internal */
130
+ export const Products$outboundSchema: z.ZodType<
131
+ Products$Outbound,
132
+ z.ZodTypeDef,
133
+ Products
134
+ > = z.object({
135
+ productId: z.string(),
136
+ variantId: z.nullable(z.string()),
137
+ quantity: z.number().int(),
138
+ packaging: z.lazy(() => Packaging$outboundSchema),
139
+ }).transform((v) => {
140
+ return remap$(v, {
141
+ productId: "product_id",
142
+ variantId: "variant_id",
143
+ });
144
+ });
145
+
146
+ /**
147
+ * @internal
148
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
149
+ */
150
+ export namespace Products$ {
151
+ /** @deprecated use `Products$inboundSchema` instead. */
152
+ export const inboundSchema = Products$inboundSchema;
153
+ /** @deprecated use `Products$outboundSchema` instead. */
154
+ export const outboundSchema = Products$outboundSchema;
155
+ /** @deprecated use `Products$Outbound` instead. */
156
+ export type Outbound = Products$Outbound;
157
+ }
158
+
159
+ export function productsToJSON(products: Products): string {
160
+ return JSON.stringify(Products$outboundSchema.parse(products));
161
+ }
162
+
163
+ export function productsFromJSON(
164
+ jsonString: string,
165
+ ): SafeParseResult<Products, SDKValidationError> {
166
+ return safeParse(
167
+ jsonString,
168
+ (x) => Products$inboundSchema.parse(JSON.parse(x)),
169
+ `Failed to parse 'Products' from JSON`,
170
+ );
171
+ }
172
+
173
+ /** @internal */
174
+ export const ProductsBasedServiceabilityCheck$inboundSchema: z.ZodType<
175
+ ProductsBasedServiceabilityCheck,
176
+ z.ZodTypeDef,
177
+ unknown
178
+ > = z.object({
179
+ pickup_pincode: z.string(),
180
+ delivery_pincode: z.string(),
181
+ products: z.array(z.lazy(() => Products$inboundSchema)),
182
+ }).transform((v) => {
183
+ return remap$(v, {
184
+ "pickup_pincode": "pickupPincode",
185
+ "delivery_pincode": "deliveryPincode",
186
+ });
187
+ });
188
+
189
+ /** @internal */
190
+ export type ProductsBasedServiceabilityCheck$Outbound = {
191
+ pickup_pincode: string;
192
+ delivery_pincode: string;
193
+ products: Array<Products$Outbound>;
194
+ };
195
+
196
+ /** @internal */
197
+ export const ProductsBasedServiceabilityCheck$outboundSchema: z.ZodType<
198
+ ProductsBasedServiceabilityCheck$Outbound,
199
+ z.ZodTypeDef,
200
+ ProductsBasedServiceabilityCheck
201
+ > = z.object({
202
+ pickupPincode: z.string(),
203
+ deliveryPincode: z.string(),
204
+ products: z.array(z.lazy(() => Products$outboundSchema)),
205
+ }).transform((v) => {
206
+ return remap$(v, {
207
+ pickupPincode: "pickup_pincode",
208
+ deliveryPincode: "delivery_pincode",
209
+ });
210
+ });
211
+
212
+ /**
213
+ * @internal
214
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
215
+ */
216
+ export namespace ProductsBasedServiceabilityCheck$ {
217
+ /** @deprecated use `ProductsBasedServiceabilityCheck$inboundSchema` instead. */
218
+ export const inboundSchema = ProductsBasedServiceabilityCheck$inboundSchema;
219
+ /** @deprecated use `ProductsBasedServiceabilityCheck$outboundSchema` instead. */
220
+ export const outboundSchema = ProductsBasedServiceabilityCheck$outboundSchema;
221
+ /** @deprecated use `ProductsBasedServiceabilityCheck$Outbound` instead. */
222
+ export type Outbound = ProductsBasedServiceabilityCheck$Outbound;
223
+ }
224
+
225
+ export function productsBasedServiceabilityCheckToJSON(
226
+ productsBasedServiceabilityCheck: ProductsBasedServiceabilityCheck,
227
+ ): string {
228
+ return JSON.stringify(
229
+ ProductsBasedServiceabilityCheck$outboundSchema.parse(
230
+ productsBasedServiceabilityCheck,
231
+ ),
232
+ );
233
+ }
234
+
235
+ export function productsBasedServiceabilityCheckFromJSON(
236
+ jsonString: string,
237
+ ): SafeParseResult<ProductsBasedServiceabilityCheck, SDKValidationError> {
238
+ return safeParse(
239
+ jsonString,
240
+ (x) => ProductsBasedServiceabilityCheck$inboundSchema.parse(JSON.parse(x)),
241
+ `Failed to parse 'ProductsBasedServiceabilityCheck' from JSON`,
242
+ );
243
+ }
@@ -3,16 +3,14 @@
3
3
  */
4
4
 
5
5
  import * as z from "zod";
6
- import { remap as remap$ } from "../../lib/primitives.js";
7
6
  import { safeParse } from "../../lib/schemas.js";
8
7
  import { Result as SafeParseResult } from "../../types/fp.js";
9
8
  import * as components from "../components/index.js";
10
9
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
11
10
 
12
- export type ShippingMethodsRequestBody = {
13
- deliveryPincode: string;
14
- cartId: string;
15
- };
11
+ export type ShippingMethodsRequestBody =
12
+ | components.CartBasedServiceabilityCheck
13
+ | components.ProductsBasedServiceabilityCheck;
16
14
 
17
15
  /**
18
16
  * OK
@@ -28,36 +26,25 @@ export const ShippingMethodsRequestBody$inboundSchema: z.ZodType<
28
26
  ShippingMethodsRequestBody,
29
27
  z.ZodTypeDef,
30
28
  unknown
31
- > = z.object({
32
- delivery_pincode: z.string(),
33
- cart_id: z.string(),
34
- }).transform((v) => {
35
- return remap$(v, {
36
- "delivery_pincode": "deliveryPincode",
37
- "cart_id": "cartId",
38
- });
39
- });
29
+ > = z.union([
30
+ components.CartBasedServiceabilityCheck$inboundSchema,
31
+ components.ProductsBasedServiceabilityCheck$inboundSchema,
32
+ ]);
40
33
 
41
34
  /** @internal */
42
- export type ShippingMethodsRequestBody$Outbound = {
43
- delivery_pincode: string;
44
- cart_id: string;
45
- };
35
+ export type ShippingMethodsRequestBody$Outbound =
36
+ | components.CartBasedServiceabilityCheck$Outbound
37
+ | components.ProductsBasedServiceabilityCheck$Outbound;
46
38
 
47
39
  /** @internal */
48
40
  export const ShippingMethodsRequestBody$outboundSchema: z.ZodType<
49
41
  ShippingMethodsRequestBody$Outbound,
50
42
  z.ZodTypeDef,
51
43
  ShippingMethodsRequestBody
52
- > = z.object({
53
- deliveryPincode: z.string(),
54
- cartId: z.string(),
55
- }).transform((v) => {
56
- return remap$(v, {
57
- deliveryPincode: "delivery_pincode",
58
- cartId: "cart_id",
59
- });
60
- });
44
+ > = z.union([
45
+ components.CartBasedServiceabilityCheck$outboundSchema,
46
+ components.ProductsBasedServiceabilityCheck$outboundSchema,
47
+ ]);
61
48
 
62
49
  /**
63
50
  * @internal
@@ -30,7 +30,7 @@ export class Shipping extends ClientSDK {
30
30
  * Check serviceability
31
31
  *
32
32
  * @remarks
33
- * Checking serviceability for a given pincode based provided cart_id.
33
+ * Checking serviceability for a given pincode based provided cart_id or based on products list & pickup pincode provided.
34
34
  */
35
35
  async checkServiceability(
36
36
  request?: operations.ShippingMethodsRequestBody | undefined,