ce-storefront 0.12.2 → 0.12.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.
Files changed (101) hide show
  1. package/docs/sdks/auth/README.md +45 -23
  2. package/esm/funcs/authGetAnonymousToken.d.ts +2 -1
  3. package/esm/funcs/authGetAnonymousToken.d.ts.map +1 -1
  4. package/esm/funcs/authGetAnonymousToken.js +6 -2
  5. package/esm/funcs/authGetAnonymousToken.js.map +1 -1
  6. package/esm/funcs/authGetUserDetail.d.ts +2 -1
  7. package/esm/funcs/authGetUserDetail.d.ts.map +1 -1
  8. package/esm/funcs/authGetUserDetail.js +6 -2
  9. package/esm/funcs/authGetUserDetail.js.map +1 -1
  10. package/esm/funcs/authLoginWithEmail.d.ts +2 -1
  11. package/esm/funcs/authLoginWithEmail.d.ts.map +1 -1
  12. package/esm/funcs/authLoginWithEmail.js +6 -2
  13. package/esm/funcs/authLoginWithEmail.js.map +1 -1
  14. package/esm/funcs/authLoginWithPhone.d.ts +2 -1
  15. package/esm/funcs/authLoginWithPhone.d.ts.map +1 -1
  16. package/esm/funcs/authLoginWithPhone.js +6 -2
  17. package/esm/funcs/authLoginWithPhone.js.map +1 -1
  18. package/esm/funcs/authRefreshToken.d.ts +2 -1
  19. package/esm/funcs/authRefreshToken.d.ts.map +1 -1
  20. package/esm/funcs/authRefreshToken.js +6 -2
  21. package/esm/funcs/authRefreshToken.js.map +1 -1
  22. package/esm/funcs/authUpdateUser.d.ts +2 -1
  23. package/esm/funcs/authUpdateUser.d.ts.map +1 -1
  24. package/esm/funcs/authUpdateUser.js +6 -2
  25. package/esm/funcs/authUpdateUser.js.map +1 -1
  26. package/esm/funcs/authVerifyOtp.d.ts +2 -1
  27. package/esm/funcs/authVerifyOtp.d.ts.map +1 -1
  28. package/esm/funcs/authVerifyOtp.js +6 -2
  29. package/esm/funcs/authVerifyOtp.js.map +1 -1
  30. package/esm/lib/config.d.ts +2 -2
  31. package/esm/lib/config.js +2 -2
  32. package/esm/models/components/index.d.ts +0 -1
  33. package/esm/models/components/index.d.ts.map +1 -1
  34. package/esm/models/components/index.js +0 -1
  35. package/esm/models/components/index.js.map +1 -1
  36. package/esm/models/operations/generateotp.d.ts +10 -10
  37. package/esm/models/operations/generateotp.d.ts.map +1 -1
  38. package/esm/models/operations/generateotp.js +10 -10
  39. package/esm/models/operations/generateotp.js.map +1 -1
  40. package/esm/models/operations/getuserdetail.d.ts +8 -8
  41. package/esm/models/operations/getuserdetail.d.ts.map +1 -1
  42. package/esm/models/operations/getuserdetail.js +8 -8
  43. package/esm/models/operations/getuserdetail.js.map +1 -1
  44. package/esm/models/operations/loginwithemail.d.ts +10 -10
  45. package/esm/models/operations/loginwithemail.d.ts.map +1 -1
  46. package/esm/models/operations/loginwithemail.js +10 -10
  47. package/esm/models/operations/loginwithemail.js.map +1 -1
  48. package/esm/models/operations/loginwithphone.d.ts +10 -10
  49. package/esm/models/operations/loginwithphone.d.ts.map +1 -1
  50. package/esm/models/operations/loginwithphone.js +11 -11
  51. package/esm/models/operations/loginwithphone.js.map +1 -1
  52. package/esm/models/operations/loginwithwhatsapp.d.ts +10 -10
  53. package/esm/models/operations/loginwithwhatsapp.d.ts.map +1 -1
  54. package/esm/models/operations/loginwithwhatsapp.js +10 -10
  55. package/esm/models/operations/loginwithwhatsapp.js.map +1 -1
  56. package/esm/models/operations/logout.d.ts +12 -12
  57. package/esm/models/operations/logout.d.ts.map +1 -1
  58. package/esm/models/operations/logout.js +12 -12
  59. package/esm/models/operations/logout.js.map +1 -1
  60. package/esm/models/operations/refreshtoken.d.ts +12 -12
  61. package/esm/models/operations/refreshtoken.d.ts.map +1 -1
  62. package/esm/models/operations/refreshtoken.js +12 -12
  63. package/esm/models/operations/refreshtoken.js.map +1 -1
  64. package/esm/models/operations/shippingmethods.d.ts +4 -4
  65. package/esm/models/operations/shippingmethods.d.ts.map +1 -1
  66. package/esm/models/operations/shippingmethods.js +2 -8
  67. package/esm/models/operations/shippingmethods.js.map +1 -1
  68. package/esm/models/operations/updateuser.d.ts +8 -8
  69. package/esm/models/operations/updateuser.d.ts.map +1 -1
  70. package/esm/models/operations/updateuser.js +8 -8
  71. package/esm/models/operations/updateuser.js.map +1 -1
  72. package/esm/models/operations/verifyotp.d.ts +8 -8
  73. package/esm/models/operations/verifyotp.d.ts.map +1 -1
  74. package/esm/models/operations/verifyotp.js +8 -8
  75. package/esm/models/operations/verifyotp.js.map +1 -1
  76. package/jsr.json +1 -1
  77. package/package.json +1 -1
  78. package/src/funcs/authGetAnonymousToken.ts +15 -2
  79. package/src/funcs/authGetUserDetail.ts +19 -2
  80. package/src/funcs/authLoginWithEmail.ts +19 -2
  81. package/src/funcs/authLoginWithPhone.ts +19 -2
  82. package/src/funcs/authRefreshToken.ts +15 -2
  83. package/src/funcs/authUpdateUser.ts +15 -2
  84. package/src/funcs/authVerifyOtp.ts +19 -2
  85. package/src/lib/config.ts +2 -2
  86. package/src/models/components/index.ts +0 -1
  87. package/src/models/operations/generateotp.ts +20 -20
  88. package/src/models/operations/getuserdetail.ts +16 -16
  89. package/src/models/operations/loginwithemail.ts +20 -20
  90. package/src/models/operations/loginwithphone.ts +21 -21
  91. package/src/models/operations/loginwithwhatsapp.ts +20 -20
  92. package/src/models/operations/logout.ts +24 -24
  93. package/src/models/operations/refreshtoken.ts +24 -24
  94. package/src/models/operations/shippingmethods.ts +4 -12
  95. package/src/models/operations/updateuser.ts +16 -16
  96. package/src/models/operations/verifyotp.ts +16 -16
  97. package/esm/models/components/productsbasedserviceabilitycheck.d.ts +0 -95
  98. package/esm/models/components/productsbasedserviceabilitycheck.d.ts.map +0 -1
  99. package/esm/models/components/productsbasedserviceabilitycheck.js +0 -132
  100. package/esm/models/components/productsbasedserviceabilitycheck.js.map +0 -1
  101. package/src/models/components/productsbasedserviceabilitycheck.ts +0 -243
@@ -12,7 +12,7 @@ export type RefreshTokenRequestBody = {
12
12
  /**
13
13
  * A string representing the refresh token.
14
14
  */
15
- refreshToken?: string | undefined;
15
+ refreshToken: string;
16
16
  };
17
17
 
18
18
  /**
@@ -22,11 +22,11 @@ export type RefreshTokenContent = {
22
22
  /**
23
23
  * It is a string-based token utilized for authentication and authorization.
24
24
  */
25
- accessToken?: string | undefined;
25
+ accessToken: string;
26
26
  /**
27
27
  * It is a string-based token designed for refreshing the user's access token.
28
28
  */
29
- refreshToken?: string | undefined;
29
+ refreshToken: string;
30
30
  };
31
31
 
32
32
  /**
@@ -36,15 +36,15 @@ export type RefreshTokenResponseBody = {
36
36
  /**
37
37
  * A descriptive message confirming the success or failure of the operation.
38
38
  */
39
- message?: string | undefined;
39
+ message: string;
40
40
  /**
41
41
  * Indicates whether the request was successful or failure (true for success, false for failure).
42
42
  */
43
- success?: boolean | undefined;
43
+ success: boolean;
44
44
  /**
45
45
  * An object containing the response content.
46
46
  */
47
- content?: RefreshTokenContent | undefined;
47
+ content: RefreshTokenContent;
48
48
  };
49
49
 
50
50
  /** @internal */
@@ -53,7 +53,7 @@ export const RefreshTokenRequestBody$inboundSchema: z.ZodType<
53
53
  z.ZodTypeDef,
54
54
  unknown
55
55
  > = z.object({
56
- refresh_token: z.string().optional(),
56
+ refresh_token: z.string(),
57
57
  }).transform((v) => {
58
58
  return remap$(v, {
59
59
  "refresh_token": "refreshToken",
@@ -62,7 +62,7 @@ export const RefreshTokenRequestBody$inboundSchema: z.ZodType<
62
62
 
63
63
  /** @internal */
64
64
  export type RefreshTokenRequestBody$Outbound = {
65
- refresh_token?: string | undefined;
65
+ refresh_token: string;
66
66
  };
67
67
 
68
68
  /** @internal */
@@ -71,7 +71,7 @@ export const RefreshTokenRequestBody$outboundSchema: z.ZodType<
71
71
  z.ZodTypeDef,
72
72
  RefreshTokenRequestBody
73
73
  > = z.object({
74
- refreshToken: z.string().optional(),
74
+ refreshToken: z.string(),
75
75
  }).transform((v) => {
76
76
  return remap$(v, {
77
77
  refreshToken: "refresh_token",
@@ -115,8 +115,8 @@ export const RefreshTokenContent$inboundSchema: z.ZodType<
115
115
  z.ZodTypeDef,
116
116
  unknown
117
117
  > = z.object({
118
- access_token: z.string().optional(),
119
- refresh_token: z.string().optional(),
118
+ access_token: z.string(),
119
+ refresh_token: z.string(),
120
120
  }).transform((v) => {
121
121
  return remap$(v, {
122
122
  "access_token": "accessToken",
@@ -126,8 +126,8 @@ export const RefreshTokenContent$inboundSchema: z.ZodType<
126
126
 
127
127
  /** @internal */
128
128
  export type RefreshTokenContent$Outbound = {
129
- access_token?: string | undefined;
130
- refresh_token?: string | undefined;
129
+ access_token: string;
130
+ refresh_token: string;
131
131
  };
132
132
 
133
133
  /** @internal */
@@ -136,8 +136,8 @@ export const RefreshTokenContent$outboundSchema: z.ZodType<
136
136
  z.ZodTypeDef,
137
137
  RefreshTokenContent
138
138
  > = z.object({
139
- accessToken: z.string().optional(),
140
- refreshToken: z.string().optional(),
139
+ accessToken: z.string(),
140
+ refreshToken: z.string(),
141
141
  }).transform((v) => {
142
142
  return remap$(v, {
143
143
  accessToken: "access_token",
@@ -182,16 +182,16 @@ export const RefreshTokenResponseBody$inboundSchema: z.ZodType<
182
182
  z.ZodTypeDef,
183
183
  unknown
184
184
  > = z.object({
185
- message: z.string().optional(),
186
- success: z.boolean().optional(),
187
- content: z.lazy(() => RefreshTokenContent$inboundSchema).optional(),
185
+ message: z.string(),
186
+ success: z.boolean(),
187
+ content: z.lazy(() => RefreshTokenContent$inboundSchema),
188
188
  });
189
189
 
190
190
  /** @internal */
191
191
  export type RefreshTokenResponseBody$Outbound = {
192
- message?: string | undefined;
193
- success?: boolean | undefined;
194
- content?: RefreshTokenContent$Outbound | undefined;
192
+ message: string;
193
+ success: boolean;
194
+ content: RefreshTokenContent$Outbound;
195
195
  };
196
196
 
197
197
  /** @internal */
@@ -200,9 +200,9 @@ export const RefreshTokenResponseBody$outboundSchema: z.ZodType<
200
200
  z.ZodTypeDef,
201
201
  RefreshTokenResponseBody
202
202
  > = z.object({
203
- message: z.string().optional(),
204
- success: z.boolean().optional(),
205
- content: z.lazy(() => RefreshTokenContent$outboundSchema).optional(),
203
+ message: z.string(),
204
+ success: z.boolean(),
205
+ content: z.lazy(() => RefreshTokenContent$outboundSchema),
206
206
  });
207
207
 
208
208
  /**
@@ -9,8 +9,7 @@ import * as components from "../components/index.js";
9
9
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
10
 
11
11
  export type ShippingMethodsRequestBody =
12
- | components.CartBasedServiceabilityCheck
13
- | components.ProductsBasedServiceabilityCheck;
12
+ components.CartBasedServiceabilityCheck;
14
13
 
15
14
  /**
16
15
  * OK
@@ -26,25 +25,18 @@ export const ShippingMethodsRequestBody$inboundSchema: z.ZodType<
26
25
  ShippingMethodsRequestBody,
27
26
  z.ZodTypeDef,
28
27
  unknown
29
- > = z.union([
30
- components.CartBasedServiceabilityCheck$inboundSchema,
31
- components.ProductsBasedServiceabilityCheck$inboundSchema,
32
- ]);
28
+ > = components.CartBasedServiceabilityCheck$inboundSchema;
33
29
 
34
30
  /** @internal */
35
31
  export type ShippingMethodsRequestBody$Outbound =
36
- | components.CartBasedServiceabilityCheck$Outbound
37
- | components.ProductsBasedServiceabilityCheck$Outbound;
32
+ components.CartBasedServiceabilityCheck$Outbound;
38
33
 
39
34
  /** @internal */
40
35
  export const ShippingMethodsRequestBody$outboundSchema: z.ZodType<
41
36
  ShippingMethodsRequestBody$Outbound,
42
37
  z.ZodTypeDef,
43
38
  ShippingMethodsRequestBody
44
- > = z.union([
45
- components.CartBasedServiceabilityCheck$outboundSchema,
46
- components.ProductsBasedServiceabilityCheck$outboundSchema,
47
- ]);
39
+ > = components.CartBasedServiceabilityCheck$outboundSchema;
48
40
 
49
41
  /**
50
42
  * @internal
@@ -21,7 +21,7 @@ export type UpdateUserRequest = {
21
21
  * An object containing the response content.
22
22
  */
23
23
  export type UpdateUserContent = {
24
- user?: components.User | undefined;
24
+ user: components.User;
25
25
  };
26
26
 
27
27
  /**
@@ -31,15 +31,15 @@ export type UpdateUserResponseBody = {
31
31
  /**
32
32
  * A descriptive message confirming the success or failure of the Registration process.
33
33
  */
34
- message?: string | undefined;
34
+ message: string;
35
35
  /**
36
36
  * Indicates whether the request was successful or failure (true for success, false for failure).
37
37
  */
38
- success?: boolean | undefined;
38
+ success: boolean;
39
39
  /**
40
40
  * An object containing the response content.
41
41
  */
42
- content?: UpdateUserContent | undefined;
42
+ content: UpdateUserContent;
43
43
  };
44
44
 
45
45
  /** @internal */
@@ -113,12 +113,12 @@ export const UpdateUserContent$inboundSchema: z.ZodType<
113
113
  z.ZodTypeDef,
114
114
  unknown
115
115
  > = z.object({
116
- user: components.User$inboundSchema.optional(),
116
+ user: components.User$inboundSchema,
117
117
  });
118
118
 
119
119
  /** @internal */
120
120
  export type UpdateUserContent$Outbound = {
121
- user?: components.User$Outbound | undefined;
121
+ user: components.User$Outbound;
122
122
  };
123
123
 
124
124
  /** @internal */
@@ -127,7 +127,7 @@ export const UpdateUserContent$outboundSchema: z.ZodType<
127
127
  z.ZodTypeDef,
128
128
  UpdateUserContent
129
129
  > = z.object({
130
- user: components.User$outboundSchema.optional(),
130
+ user: components.User$outboundSchema,
131
131
  });
132
132
 
133
133
  /**
@@ -167,16 +167,16 @@ export const UpdateUserResponseBody$inboundSchema: z.ZodType<
167
167
  z.ZodTypeDef,
168
168
  unknown
169
169
  > = z.object({
170
- message: z.string().optional(),
171
- success: z.boolean().optional(),
172
- content: z.lazy(() => UpdateUserContent$inboundSchema).optional(),
170
+ message: z.string(),
171
+ success: z.boolean(),
172
+ content: z.lazy(() => UpdateUserContent$inboundSchema),
173
173
  });
174
174
 
175
175
  /** @internal */
176
176
  export type UpdateUserResponseBody$Outbound = {
177
- message?: string | undefined;
178
- success?: boolean | undefined;
179
- content?: UpdateUserContent$Outbound | undefined;
177
+ message: string;
178
+ success: boolean;
179
+ content: UpdateUserContent$Outbound;
180
180
  };
181
181
 
182
182
  /** @internal */
@@ -185,9 +185,9 @@ export const UpdateUserResponseBody$outboundSchema: z.ZodType<
185
185
  z.ZodTypeDef,
186
186
  UpdateUserResponseBody
187
187
  > = z.object({
188
- message: z.string().optional(),
189
- success: z.boolean().optional(),
190
- content: z.lazy(() => UpdateUserContent$outboundSchema).optional(),
188
+ message: z.string(),
189
+ success: z.boolean(),
190
+ content: z.lazy(() => UpdateUserContent$outboundSchema),
191
191
  });
192
192
 
193
193
  /**
@@ -46,15 +46,15 @@ export type VerifyOtpRequestBody = {
46
46
  * An object containing the response content.
47
47
  */
48
48
  export type VerifyOtpContent = {
49
- user?: components.User | undefined;
49
+ user: components.User;
50
50
  /**
51
51
  * A string representing the access token.
52
52
  */
53
- accessToken?: string | undefined;
53
+ accessToken: string;
54
54
  /**
55
55
  * A string representing the refresh token.
56
56
  */
57
- refreshToken?: string | undefined;
57
+ refreshToken: string;
58
58
  };
59
59
 
60
60
  /**
@@ -72,7 +72,7 @@ export type VerifyOtpResponseBody = {
72
72
  /**
73
73
  * An object containing the response content.
74
74
  */
75
- content?: VerifyOtpContent | undefined;
75
+ content: VerifyOtpContent;
76
76
  };
77
77
 
78
78
  /** @internal */
@@ -170,9 +170,9 @@ export const VerifyOtpContent$inboundSchema: z.ZodType<
170
170
  z.ZodTypeDef,
171
171
  unknown
172
172
  > = z.object({
173
- user: components.User$inboundSchema.optional(),
174
- access_token: z.string().optional(),
175
- refresh_token: z.string().optional(),
173
+ user: components.User$inboundSchema,
174
+ access_token: z.string(),
175
+ refresh_token: z.string(),
176
176
  }).transform((v) => {
177
177
  return remap$(v, {
178
178
  "access_token": "accessToken",
@@ -182,9 +182,9 @@ export const VerifyOtpContent$inboundSchema: z.ZodType<
182
182
 
183
183
  /** @internal */
184
184
  export type VerifyOtpContent$Outbound = {
185
- user?: components.User$Outbound | undefined;
186
- access_token?: string | undefined;
187
- refresh_token?: string | undefined;
185
+ user: components.User$Outbound;
186
+ access_token: string;
187
+ refresh_token: string;
188
188
  };
189
189
 
190
190
  /** @internal */
@@ -193,9 +193,9 @@ export const VerifyOtpContent$outboundSchema: z.ZodType<
193
193
  z.ZodTypeDef,
194
194
  VerifyOtpContent
195
195
  > = z.object({
196
- user: components.User$outboundSchema.optional(),
197
- accessToken: z.string().optional(),
198
- refreshToken: z.string().optional(),
196
+ user: components.User$outboundSchema,
197
+ accessToken: z.string(),
198
+ refreshToken: z.string(),
199
199
  }).transform((v) => {
200
200
  return remap$(v, {
201
201
  accessToken: "access_token",
@@ -242,14 +242,14 @@ export const VerifyOtpResponseBody$inboundSchema: z.ZodType<
242
242
  > = z.object({
243
243
  message: z.string(),
244
244
  success: z.boolean(),
245
- content: z.lazy(() => VerifyOtpContent$inboundSchema).optional(),
245
+ content: z.lazy(() => VerifyOtpContent$inboundSchema),
246
246
  });
247
247
 
248
248
  /** @internal */
249
249
  export type VerifyOtpResponseBody$Outbound = {
250
250
  message: string;
251
251
  success: boolean;
252
- content?: VerifyOtpContent$Outbound | undefined;
252
+ content: VerifyOtpContent$Outbound;
253
253
  };
254
254
 
255
255
  /** @internal */
@@ -260,7 +260,7 @@ export const VerifyOtpResponseBody$outboundSchema: z.ZodType<
260
260
  > = z.object({
261
261
  message: z.string(),
262
262
  success: z.boolean(),
263
- content: z.lazy(() => VerifyOtpContent$outboundSchema).optional(),
263
+ content: z.lazy(() => VerifyOtpContent$outboundSchema),
264
264
  });
265
265
 
266
266
  /**
@@ -1,95 +0,0 @@
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 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
@@ -1 +0,0 @@
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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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"}
@@ -1,132 +0,0 @@
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
@@ -1 +0,0 @@
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,EA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