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
@@ -18,6 +18,7 @@ import {
18
18
  RequestTimeoutError,
19
19
  UnexpectedClientError,
20
20
  } from "../models/errors/httpclienterrors.js";
21
+ import * as errors from "../models/errors/index.js";
21
22
  import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
22
23
  import * as operations from "../models/operations/index.js";
23
24
  import { APICall, APIPromise } from "../types/async.js";
@@ -36,6 +37,9 @@ export function authVerifyOtp(
36
37
  ): APIPromise<
37
38
  Result<
38
39
  operations.VerifyOtpResponseBody,
40
+ | errors.BadRequest
41
+ | errors.Unauthorized
42
+ | errors.NotFound
39
43
  | CeError
40
44
  | SDKValidationError
41
45
  | UnexpectedClientError
@@ -60,6 +64,9 @@ async function $do(
60
64
  [
61
65
  Result<
62
66
  operations.VerifyOtpResponseBody,
67
+ | errors.BadRequest
68
+ | errors.Unauthorized
69
+ | errors.NotFound
63
70
  | CeError
64
71
  | SDKValidationError
65
72
  | UnexpectedClientError
@@ -123,7 +130,7 @@ async function $do(
123
130
 
124
131
  const doResult = await client._do(req, {
125
132
  context,
126
- errorCodes: ["4XX", "5XX"],
133
+ errorCodes: ["400", "401", "404", "4XX", "5XX"],
127
134
  retryConfig: context.retryConfig,
128
135
  retryCodes: context.retryCodes,
129
136
  });
@@ -132,8 +139,15 @@ async function $do(
132
139
  }
133
140
  const response = doResult.value;
134
141
 
142
+ const responseFields = {
143
+ HttpMeta: { Response: response, Request: req },
144
+ };
145
+
135
146
  const [result] = await M.match<
136
147
  operations.VerifyOtpResponseBody,
148
+ | errors.BadRequest
149
+ | errors.Unauthorized
150
+ | errors.NotFound
137
151
  | CeError
138
152
  | SDKValidationError
139
153
  | UnexpectedClientError
@@ -143,9 +157,12 @@ async function $do(
143
157
  | ConnectionError
144
158
  >(
145
159
  M.json(200, operations.VerifyOtpResponseBody$inboundSchema),
160
+ M.jsonErr(400, errors.BadRequest$inboundSchema),
161
+ M.jsonErr(401, errors.Unauthorized$inboundSchema),
162
+ M.jsonErr(404, errors.NotFound$inboundSchema),
146
163
  M.fail("4XX"),
147
164
  M.fail("5XX"),
148
- )(response);
165
+ )(response, { extraFields: responseFields });
149
166
  if (!result.ok) {
150
167
  return [result, { status: "complete", request: req, response }];
151
168
  }
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.2",
79
+ sdkVersion: "0.12.4",
80
80
  genVersion: "2.610.0",
81
- userAgent: "speakeasy-sdk/typescript 0.12.2 2.610.0 1.0 ce-storefront",
81
+ userAgent: "speakeasy-sdk/typescript 0.12.4 2.610.0 1.0 ce-storefront",
82
82
  } as const;
@@ -51,7 +51,6 @@ export * from "./productimage.js";
51
51
  export * from "./productpricing.js";
52
52
  export * from "./productpromotion.js";
53
53
  export * from "./productreview.js";
54
- export * from "./productsbasedserviceabilitycheck.js";
55
54
  export * from "./productshipping.js";
56
55
  export * from "./productsubscription.js";
57
56
  export * from "./productvideo.js";
@@ -63,11 +63,11 @@ export type GenerateOtpContent = {
63
63
  /**
64
64
  * A string representing the OTP token.
65
65
  */
66
- otpToken?: string | undefined;
66
+ otpToken: string;
67
67
  /**
68
68
  * This is used for verifying OTP or using subsequent APIs call.
69
69
  */
70
- otpAction?: string | undefined;
70
+ otpAction: string;
71
71
  };
72
72
 
73
73
  /**
@@ -77,15 +77,15 @@ export type GenerateOtpResponseBody = {
77
77
  /**
78
78
  * A descriptive message confirming the success or failure of the operation.
79
79
  */
80
- message?: string | undefined;
80
+ message: string;
81
81
  /**
82
82
  * Indicates whether the request was successful or failure (true for success, false for failure).
83
83
  */
84
- success?: boolean | undefined;
84
+ success: boolean;
85
85
  /**
86
86
  * An object containing the response content.
87
87
  */
88
- content?: GenerateOtpContent | undefined;
88
+ content: GenerateOtpContent;
89
89
  };
90
90
 
91
91
  /** @internal */
@@ -210,8 +210,8 @@ export const GenerateOtpContent$inboundSchema: z.ZodType<
210
210
  z.ZodTypeDef,
211
211
  unknown
212
212
  > = z.object({
213
- otp_token: z.string().optional(),
214
- otp_action: z.string().optional(),
213
+ otp_token: z.string(),
214
+ otp_action: z.string(),
215
215
  }).transform((v) => {
216
216
  return remap$(v, {
217
217
  "otp_token": "otpToken",
@@ -221,8 +221,8 @@ export const GenerateOtpContent$inboundSchema: z.ZodType<
221
221
 
222
222
  /** @internal */
223
223
  export type GenerateOtpContent$Outbound = {
224
- otp_token?: string | undefined;
225
- otp_action?: string | undefined;
224
+ otp_token: string;
225
+ otp_action: string;
226
226
  };
227
227
 
228
228
  /** @internal */
@@ -231,8 +231,8 @@ export const GenerateOtpContent$outboundSchema: z.ZodType<
231
231
  z.ZodTypeDef,
232
232
  GenerateOtpContent
233
233
  > = z.object({
234
- otpToken: z.string().optional(),
235
- otpAction: z.string().optional(),
234
+ otpToken: z.string(),
235
+ otpAction: z.string(),
236
236
  }).transform((v) => {
237
237
  return remap$(v, {
238
238
  otpToken: "otp_token",
@@ -277,16 +277,16 @@ export const GenerateOtpResponseBody$inboundSchema: z.ZodType<
277
277
  z.ZodTypeDef,
278
278
  unknown
279
279
  > = z.object({
280
- message: z.string().optional(),
281
- success: z.boolean().optional(),
282
- content: z.lazy(() => GenerateOtpContent$inboundSchema).optional(),
280
+ message: z.string(),
281
+ success: z.boolean(),
282
+ content: z.lazy(() => GenerateOtpContent$inboundSchema),
283
283
  });
284
284
 
285
285
  /** @internal */
286
286
  export type GenerateOtpResponseBody$Outbound = {
287
- message?: string | undefined;
288
- success?: boolean | undefined;
289
- content?: GenerateOtpContent$Outbound | undefined;
287
+ message: string;
288
+ success: boolean;
289
+ content: GenerateOtpContent$Outbound;
290
290
  };
291
291
 
292
292
  /** @internal */
@@ -295,9 +295,9 @@ export const GenerateOtpResponseBody$outboundSchema: z.ZodType<
295
295
  z.ZodTypeDef,
296
296
  GenerateOtpResponseBody
297
297
  > = z.object({
298
- message: z.string().optional(),
299
- success: z.boolean().optional(),
300
- content: z.lazy(() => GenerateOtpContent$outboundSchema).optional(),
298
+ message: z.string(),
299
+ success: z.boolean(),
300
+ content: z.lazy(() => GenerateOtpContent$outboundSchema),
301
301
  });
302
302
 
303
303
  /**
@@ -19,7 +19,7 @@ export type GetUserDetailRequest = {
19
19
  * An object containing the response content.
20
20
  */
21
21
  export type GetUserDetailContent = {
22
- user?: components.User | undefined;
22
+ user: components.User;
23
23
  };
24
24
 
25
25
  /**
@@ -29,15 +29,15 @@ export type GetUserDetailResponseBody = {
29
29
  /**
30
30
  * A descriptive message confirming the success or failure of the Registration process.
31
31
  */
32
- message?: string | undefined;
32
+ message: string;
33
33
  /**
34
34
  * Indicates whether the request was successful or failure (true for success, false for failure).
35
35
  */
36
- success?: boolean | undefined;
36
+ success: boolean;
37
37
  /**
38
38
  * An object containing the response content.
39
39
  */
40
- content?: GetUserDetailContent | undefined;
40
+ content: GetUserDetailContent;
41
41
  };
42
42
 
43
43
  /** @internal */
@@ -100,12 +100,12 @@ export const GetUserDetailContent$inboundSchema: z.ZodType<
100
100
  z.ZodTypeDef,
101
101
  unknown
102
102
  > = z.object({
103
- user: components.User$inboundSchema.optional(),
103
+ user: components.User$inboundSchema,
104
104
  });
105
105
 
106
106
  /** @internal */
107
107
  export type GetUserDetailContent$Outbound = {
108
- user?: components.User$Outbound | undefined;
108
+ user: components.User$Outbound;
109
109
  };
110
110
 
111
111
  /** @internal */
@@ -114,7 +114,7 @@ export const GetUserDetailContent$outboundSchema: z.ZodType<
114
114
  z.ZodTypeDef,
115
115
  GetUserDetailContent
116
116
  > = z.object({
117
- user: components.User$outboundSchema.optional(),
117
+ user: components.User$outboundSchema,
118
118
  });
119
119
 
120
120
  /**
@@ -154,16 +154,16 @@ export const GetUserDetailResponseBody$inboundSchema: z.ZodType<
154
154
  z.ZodTypeDef,
155
155
  unknown
156
156
  > = z.object({
157
- message: z.string().optional(),
158
- success: z.boolean().optional(),
159
- content: z.lazy(() => GetUserDetailContent$inboundSchema).optional(),
157
+ message: z.string(),
158
+ success: z.boolean(),
159
+ content: z.lazy(() => GetUserDetailContent$inboundSchema),
160
160
  });
161
161
 
162
162
  /** @internal */
163
163
  export type GetUserDetailResponseBody$Outbound = {
164
- message?: string | undefined;
165
- success?: boolean | undefined;
166
- content?: GetUserDetailContent$Outbound | undefined;
164
+ message: string;
165
+ success: boolean;
166
+ content: GetUserDetailContent$Outbound;
167
167
  };
168
168
 
169
169
  /** @internal */
@@ -172,9 +172,9 @@ export const GetUserDetailResponseBody$outboundSchema: z.ZodType<
172
172
  z.ZodTypeDef,
173
173
  GetUserDetailResponseBody
174
174
  > = z.object({
175
- message: z.string().optional(),
176
- success: z.boolean().optional(),
177
- content: z.lazy(() => GetUserDetailContent$outboundSchema).optional(),
175
+ message: z.string(),
176
+ success: z.boolean(),
177
+ content: z.lazy(() => GetUserDetailContent$outboundSchema),
178
178
  });
179
179
 
180
180
  /**
@@ -30,11 +30,11 @@ export type LoginWithEmailContent = {
30
30
  /**
31
31
  * The otp token is a unique code that is used for authentication during the Login process.
32
32
  */
33
- otpToken?: string | undefined;
33
+ otpToken: string;
34
34
  /**
35
35
  * It is used for verifying OTP and using subsequent API call.
36
36
  */
37
- otpAction?: string | undefined;
37
+ otpAction: string;
38
38
  };
39
39
 
40
40
  /**
@@ -44,15 +44,15 @@ export type LoginWithEmailResponseBody = {
44
44
  /**
45
45
  * A descriptive message confirming the success or failure of the Login process.
46
46
  */
47
- message?: string | undefined;
47
+ message: string;
48
48
  /**
49
49
  * Indicates whether the request was successful or failure (true for success, false for failure).
50
50
  */
51
- success?: boolean | undefined;
51
+ success: boolean;
52
52
  /**
53
53
  * An object containing the response content.
54
54
  */
55
- content?: LoginWithEmailContent | undefined;
55
+ content: LoginWithEmailContent;
56
56
  };
57
57
 
58
58
  /** @internal */
@@ -126,8 +126,8 @@ export const LoginWithEmailContent$inboundSchema: z.ZodType<
126
126
  z.ZodTypeDef,
127
127
  unknown
128
128
  > = z.object({
129
- otp_token: z.string().optional(),
130
- otp_action: z.string().optional(),
129
+ otp_token: z.string(),
130
+ otp_action: z.string(),
131
131
  }).transform((v) => {
132
132
  return remap$(v, {
133
133
  "otp_token": "otpToken",
@@ -137,8 +137,8 @@ export const LoginWithEmailContent$inboundSchema: z.ZodType<
137
137
 
138
138
  /** @internal */
139
139
  export type LoginWithEmailContent$Outbound = {
140
- otp_token?: string | undefined;
141
- otp_action?: string | undefined;
140
+ otp_token: string;
141
+ otp_action: string;
142
142
  };
143
143
 
144
144
  /** @internal */
@@ -147,8 +147,8 @@ export const LoginWithEmailContent$outboundSchema: z.ZodType<
147
147
  z.ZodTypeDef,
148
148
  LoginWithEmailContent
149
149
  > = z.object({
150
- otpToken: z.string().optional(),
151
- otpAction: z.string().optional(),
150
+ otpToken: z.string(),
151
+ otpAction: z.string(),
152
152
  }).transform((v) => {
153
153
  return remap$(v, {
154
154
  otpToken: "otp_token",
@@ -193,16 +193,16 @@ export const LoginWithEmailResponseBody$inboundSchema: z.ZodType<
193
193
  z.ZodTypeDef,
194
194
  unknown
195
195
  > = z.object({
196
- message: z.string().optional(),
197
- success: z.boolean().optional(),
198
- content: z.lazy(() => LoginWithEmailContent$inboundSchema).optional(),
196
+ message: z.string(),
197
+ success: z.boolean(),
198
+ content: z.lazy(() => LoginWithEmailContent$inboundSchema),
199
199
  });
200
200
 
201
201
  /** @internal */
202
202
  export type LoginWithEmailResponseBody$Outbound = {
203
- message?: string | undefined;
204
- success?: boolean | undefined;
205
- content?: LoginWithEmailContent$Outbound | undefined;
203
+ message: string;
204
+ success: boolean;
205
+ content: LoginWithEmailContent$Outbound;
206
206
  };
207
207
 
208
208
  /** @internal */
@@ -211,9 +211,9 @@ export const LoginWithEmailResponseBody$outboundSchema: z.ZodType<
211
211
  z.ZodTypeDef,
212
212
  LoginWithEmailResponseBody
213
213
  > = z.object({
214
- message: z.string().optional(),
215
- success: z.boolean().optional(),
216
- content: z.lazy(() => LoginWithEmailContent$outboundSchema).optional(),
214
+ message: z.string(),
215
+ success: z.boolean(),
216
+ content: z.lazy(() => LoginWithEmailContent$outboundSchema),
217
217
  });
218
218
 
219
219
  /**
@@ -34,11 +34,11 @@ export type LoginWithPhoneContent = {
34
34
  /**
35
35
  * The otp token is a unique code that is used for authentication during the Login/Register process.
36
36
  */
37
- otpToken?: string | undefined;
37
+ otpToken: string;
38
38
  /**
39
39
  * It is used for verifying OTP and using subsequent API call.
40
40
  */
41
- otpAction?: string | undefined;
41
+ otpAction: string;
42
42
  };
43
43
 
44
44
  /**
@@ -48,15 +48,15 @@ export type LoginWithPhoneResponseBody = {
48
48
  /**
49
49
  * A descriptive message confirming the success or failure of the Login process.
50
50
  */
51
- message?: string | undefined;
51
+ message: string;
52
52
  /**
53
53
  * Indicates whether the request was successful or failure (true for success, false for failure).
54
54
  */
55
- success?: boolean | undefined;
55
+ success: boolean;
56
56
  /**
57
57
  * An object containing the response content.
58
58
  */
59
- content?: LoginWithPhoneContent | undefined;
59
+ content: LoginWithPhoneContent;
60
60
  };
61
61
 
62
62
  /** @internal */
@@ -65,7 +65,7 @@ export const LoginWithPhoneRequestBody$inboundSchema: z.ZodType<
65
65
  z.ZodTypeDef,
66
66
  unknown
67
67
  > = z.object({
68
- country_code: z.literal("+91").optional(),
68
+ country_code: z.literal("+91").default("+91"),
69
69
  phone: z.string(),
70
70
  register_if_not_exists: z.boolean().optional(),
71
71
  }).transform((v) => {
@@ -135,8 +135,8 @@ export const LoginWithPhoneContent$inboundSchema: z.ZodType<
135
135
  z.ZodTypeDef,
136
136
  unknown
137
137
  > = z.object({
138
- otp_token: z.string().optional(),
139
- otp_action: z.string().optional(),
138
+ otp_token: z.string(),
139
+ otp_action: z.string(),
140
140
  }).transform((v) => {
141
141
  return remap$(v, {
142
142
  "otp_token": "otpToken",
@@ -146,8 +146,8 @@ export const LoginWithPhoneContent$inboundSchema: z.ZodType<
146
146
 
147
147
  /** @internal */
148
148
  export type LoginWithPhoneContent$Outbound = {
149
- otp_token?: string | undefined;
150
- otp_action?: string | undefined;
149
+ otp_token: string;
150
+ otp_action: string;
151
151
  };
152
152
 
153
153
  /** @internal */
@@ -156,8 +156,8 @@ export const LoginWithPhoneContent$outboundSchema: z.ZodType<
156
156
  z.ZodTypeDef,
157
157
  LoginWithPhoneContent
158
158
  > = z.object({
159
- otpToken: z.string().optional(),
160
- otpAction: z.string().optional(),
159
+ otpToken: z.string(),
160
+ otpAction: z.string(),
161
161
  }).transform((v) => {
162
162
  return remap$(v, {
163
163
  otpToken: "otp_token",
@@ -202,16 +202,16 @@ export const LoginWithPhoneResponseBody$inboundSchema: z.ZodType<
202
202
  z.ZodTypeDef,
203
203
  unknown
204
204
  > = z.object({
205
- message: z.string().optional(),
206
- success: z.boolean().optional(),
207
- content: z.lazy(() => LoginWithPhoneContent$inboundSchema).optional(),
205
+ message: z.string(),
206
+ success: z.boolean(),
207
+ content: z.lazy(() => LoginWithPhoneContent$inboundSchema),
208
208
  });
209
209
 
210
210
  /** @internal */
211
211
  export type LoginWithPhoneResponseBody$Outbound = {
212
- message?: string | undefined;
213
- success?: boolean | undefined;
214
- content?: LoginWithPhoneContent$Outbound | undefined;
212
+ message: string;
213
+ success: boolean;
214
+ content: LoginWithPhoneContent$Outbound;
215
215
  };
216
216
 
217
217
  /** @internal */
@@ -220,9 +220,9 @@ export const LoginWithPhoneResponseBody$outboundSchema: z.ZodType<
220
220
  z.ZodTypeDef,
221
221
  LoginWithPhoneResponseBody
222
222
  > = z.object({
223
- message: z.string().optional(),
224
- success: z.boolean().optional(),
225
- content: z.lazy(() => LoginWithPhoneContent$outboundSchema).optional(),
223
+ message: z.string(),
224
+ success: z.boolean(),
225
+ content: z.lazy(() => LoginWithPhoneContent$outboundSchema),
226
226
  });
227
227
 
228
228
  /**
@@ -34,11 +34,11 @@ export type LoginWithWhatsappContent = {
34
34
  /**
35
35
  * The otp token is a unique code that is used for authentication during the Login process.
36
36
  */
37
- otpToken?: string | undefined;
37
+ otpToken: string;
38
38
  /**
39
39
  * It is used for verifying OTP and using subsequent API call.
40
40
  */
41
- otpAction?: string | undefined;
41
+ otpAction: string;
42
42
  };
43
43
 
44
44
  /**
@@ -48,15 +48,15 @@ export type LoginWithWhatsappResponseBody = {
48
48
  /**
49
49
  * A descriptive message confirming the success or failure of the Login process.
50
50
  */
51
- message?: string | undefined;
51
+ message: string;
52
52
  /**
53
53
  * Indicates whether the request was successful or failure (true for success, false for failure).
54
54
  */
55
- success?: boolean | undefined;
55
+ success: boolean;
56
56
  /**
57
57
  * An object containing the response content.
58
58
  */
59
- content?: LoginWithWhatsappContent | undefined;
59
+ content: LoginWithWhatsappContent;
60
60
  };
61
61
 
62
62
  /** @internal */
@@ -137,8 +137,8 @@ export const LoginWithWhatsappContent$inboundSchema: z.ZodType<
137
137
  z.ZodTypeDef,
138
138
  unknown
139
139
  > = z.object({
140
- otp_token: z.string().optional(),
141
- otp_action: z.string().optional(),
140
+ otp_token: z.string(),
141
+ otp_action: z.string(),
142
142
  }).transform((v) => {
143
143
  return remap$(v, {
144
144
  "otp_token": "otpToken",
@@ -148,8 +148,8 @@ export const LoginWithWhatsappContent$inboundSchema: z.ZodType<
148
148
 
149
149
  /** @internal */
150
150
  export type LoginWithWhatsappContent$Outbound = {
151
- otp_token?: string | undefined;
152
- otp_action?: string | undefined;
151
+ otp_token: string;
152
+ otp_action: string;
153
153
  };
154
154
 
155
155
  /** @internal */
@@ -158,8 +158,8 @@ export const LoginWithWhatsappContent$outboundSchema: z.ZodType<
158
158
  z.ZodTypeDef,
159
159
  LoginWithWhatsappContent
160
160
  > = z.object({
161
- otpToken: z.string().optional(),
162
- otpAction: z.string().optional(),
161
+ otpToken: z.string(),
162
+ otpAction: z.string(),
163
163
  }).transform((v) => {
164
164
  return remap$(v, {
165
165
  otpToken: "otp_token",
@@ -204,16 +204,16 @@ export const LoginWithWhatsappResponseBody$inboundSchema: z.ZodType<
204
204
  z.ZodTypeDef,
205
205
  unknown
206
206
  > = z.object({
207
- message: z.string().optional(),
208
- success: z.boolean().optional(),
209
- content: z.lazy(() => LoginWithWhatsappContent$inboundSchema).optional(),
207
+ message: z.string(),
208
+ success: z.boolean(),
209
+ content: z.lazy(() => LoginWithWhatsappContent$inboundSchema),
210
210
  });
211
211
 
212
212
  /** @internal */
213
213
  export type LoginWithWhatsappResponseBody$Outbound = {
214
- message?: string | undefined;
215
- success?: boolean | undefined;
216
- content?: LoginWithWhatsappContent$Outbound | undefined;
214
+ message: string;
215
+ success: boolean;
216
+ content: LoginWithWhatsappContent$Outbound;
217
217
  };
218
218
 
219
219
  /** @internal */
@@ -222,9 +222,9 @@ export const LoginWithWhatsappResponseBody$outboundSchema: z.ZodType<
222
222
  z.ZodTypeDef,
223
223
  LoginWithWhatsappResponseBody
224
224
  > = z.object({
225
- message: z.string().optional(),
226
- success: z.boolean().optional(),
227
- content: z.lazy(() => LoginWithWhatsappContent$outboundSchema).optional(),
225
+ message: z.string(),
226
+ success: z.boolean(),
227
+ content: z.lazy(() => LoginWithWhatsappContent$outboundSchema),
228
228
  });
229
229
 
230
230
  /**
@@ -16,12 +16,12 @@ export type LogoutContent = {
16
16
  /**
17
17
  * It is a string-based token utilized for authentication and authorization.
18
18
  */
19
- accessToken?: string | undefined;
19
+ accessToken: string;
20
20
  /**
21
21
  * It is a string-based token designed for refreshing the user's access token.
22
22
  */
23
- refreshToken?: string | undefined;
24
- user?: components.User | undefined;
23
+ refreshToken: string;
24
+ user: components.User;
25
25
  };
26
26
 
27
27
  /**
@@ -31,15 +31,15 @@ export type LogoutResponseBody = {
31
31
  /**
32
32
  * A descriptive message confirming the success or failure of the operation.
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?: LogoutContent | undefined;
42
+ content: LogoutContent;
43
43
  };
44
44
 
45
45
  /** @internal */
@@ -48,9 +48,9 @@ export const LogoutContent$inboundSchema: z.ZodType<
48
48
  z.ZodTypeDef,
49
49
  unknown
50
50
  > = z.object({
51
- access_token: z.string().optional(),
52
- refresh_token: z.string().optional(),
53
- user: components.User$inboundSchema.optional(),
51
+ access_token: z.string(),
52
+ refresh_token: z.string(),
53
+ user: components.User$inboundSchema,
54
54
  }).transform((v) => {
55
55
  return remap$(v, {
56
56
  "access_token": "accessToken",
@@ -60,9 +60,9 @@ export const LogoutContent$inboundSchema: z.ZodType<
60
60
 
61
61
  /** @internal */
62
62
  export type LogoutContent$Outbound = {
63
- access_token?: string | undefined;
64
- refresh_token?: string | undefined;
65
- user?: components.User$Outbound | undefined;
63
+ access_token: string;
64
+ refresh_token: string;
65
+ user: components.User$Outbound;
66
66
  };
67
67
 
68
68
  /** @internal */
@@ -71,9 +71,9 @@ export const LogoutContent$outboundSchema: z.ZodType<
71
71
  z.ZodTypeDef,
72
72
  LogoutContent
73
73
  > = z.object({
74
- accessToken: z.string().optional(),
75
- refreshToken: z.string().optional(),
76
- user: components.User$outboundSchema.optional(),
74
+ accessToken: z.string(),
75
+ refreshToken: z.string(),
76
+ user: components.User$outboundSchema,
77
77
  }).transform((v) => {
78
78
  return remap$(v, {
79
79
  accessToken: "access_token",
@@ -114,16 +114,16 @@ export const LogoutResponseBody$inboundSchema: z.ZodType<
114
114
  z.ZodTypeDef,
115
115
  unknown
116
116
  > = z.object({
117
- message: z.string().optional(),
118
- success: z.boolean().optional(),
119
- content: z.lazy(() => LogoutContent$inboundSchema).optional(),
117
+ message: z.string(),
118
+ success: z.boolean(),
119
+ content: z.lazy(() => LogoutContent$inboundSchema),
120
120
  });
121
121
 
122
122
  /** @internal */
123
123
  export type LogoutResponseBody$Outbound = {
124
- message?: string | undefined;
125
- success?: boolean | undefined;
126
- content?: LogoutContent$Outbound | undefined;
124
+ message: string;
125
+ success: boolean;
126
+ content: LogoutContent$Outbound;
127
127
  };
128
128
 
129
129
  /** @internal */
@@ -132,9 +132,9 @@ export const LogoutResponseBody$outboundSchema: z.ZodType<
132
132
  z.ZodTypeDef,
133
133
  LogoutResponseBody
134
134
  > = z.object({
135
- message: z.string().optional(),
136
- success: z.boolean().optional(),
137
- content: z.lazy(() => LogoutContent$outboundSchema).optional(),
135
+ message: z.string(),
136
+ success: z.boolean(),
137
+ content: z.lazy(() => LogoutContent$outboundSchema),
138
138
  });
139
139
 
140
140
  /**