ce-storefront 0.5.2 → 0.5.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/docs/sdks/auth/README.md +85 -36
- package/esm/funcs/authGenerateOtp.d.ts +1 -1
- package/esm/funcs/authGenerateOtp.d.ts.map +1 -1
- package/esm/funcs/authGenerateOtp.js +27 -6
- package/esm/funcs/authGenerateOtp.js.map +1 -1
- package/esm/funcs/authLoginWithEmail.d.ts +1 -1
- package/esm/funcs/authLoginWithEmail.d.ts.map +1 -1
- package/esm/funcs/authLoginWithEmail.js +27 -6
- package/esm/funcs/authLoginWithEmail.js.map +1 -1
- package/esm/funcs/authLoginWithPhone.d.ts +1 -1
- package/esm/funcs/authLoginWithPhone.d.ts.map +1 -1
- package/esm/funcs/authLoginWithPhone.js +27 -6
- package/esm/funcs/authLoginWithPhone.js.map +1 -1
- package/esm/funcs/authLoginWithWhatsapp.d.ts +1 -1
- package/esm/funcs/authLoginWithWhatsapp.d.ts.map +1 -1
- package/esm/funcs/authLoginWithWhatsapp.js +27 -6
- package/esm/funcs/authLoginWithWhatsapp.js.map +1 -1
- package/esm/funcs/authVerifyOtp.d.ts +1 -1
- package/esm/funcs/authVerifyOtp.d.ts.map +1 -1
- package/esm/funcs/authVerifyOtp.js +27 -6
- package/esm/funcs/authVerifyOtp.js.map +1 -1
- package/esm/lib/config.d.ts +3 -3
- package/esm/lib/config.js +3 -3
- package/esm/models/components/notificationchannelpreferences.d.ts +3 -3
- package/esm/models/components/notificationchannelpreferences.d.ts.map +1 -1
- package/esm/models/components/notificationchannelpreferences.js +6 -6
- package/esm/models/components/notificationchannelpreferences.js.map +1 -1
- package/esm/models/operations/deleteaddress.d.ts +1 -1
- package/esm/models/operations/deleteaddress.d.ts.map +1 -1
- package/esm/models/operations/deleteaddress.js +2 -2
- package/esm/models/operations/deleteaddress.js.map +1 -1
- package/esm/models/operations/deletecart.d.ts +1 -1
- package/esm/models/operations/deletecart.d.ts.map +1 -1
- package/esm/models/operations/deletecart.js +2 -2
- package/esm/models/operations/deletecart.js.map +1 -1
- package/esm/models/operations/deleteusercart.d.ts +1 -1
- package/esm/models/operations/deleteusercart.d.ts.map +1 -1
- package/esm/models/operations/deleteusercart.js +2 -2
- package/esm/models/operations/deleteusercart.js.map +1 -1
- package/esm/models/operations/generateotp.d.ts +106 -0
- package/esm/models/operations/generateotp.d.ts.map +1 -1
- package/esm/models/operations/generateotp.js +144 -0
- package/esm/models/operations/generateotp.js.map +1 -1
- package/esm/models/operations/getcart.d.ts +1 -1
- package/esm/models/operations/getcart.d.ts.map +1 -1
- package/esm/models/operations/getcart.js +2 -2
- package/esm/models/operations/getcart.js.map +1 -1
- package/esm/models/operations/getproductdetail.d.ts +1 -1
- package/esm/models/operations/getproductdetail.d.ts.map +1 -1
- package/esm/models/operations/getproductdetail.js +2 -2
- package/esm/models/operations/getproductdetail.js.map +1 -1
- package/esm/models/operations/getusercart.d.ts +1 -1
- package/esm/models/operations/getusercart.d.ts.map +1 -1
- package/esm/models/operations/getusercart.js +2 -2
- package/esm/models/operations/getusercart.js.map +1 -1
- package/esm/models/operations/getvariantdetail.d.ts +1 -1
- package/esm/models/operations/getvariantdetail.d.ts.map +1 -1
- package/esm/models/operations/getvariantdetail.js +2 -2
- package/esm/models/operations/getvariantdetail.js.map +1 -1
- package/esm/models/operations/listcategories.d.ts +1 -1
- package/esm/models/operations/listcategories.d.ts.map +1 -1
- package/esm/models/operations/listcategories.js +2 -2
- package/esm/models/operations/listcategories.js.map +1 -1
- package/esm/models/operations/listproducts.d.ts +1 -1
- package/esm/models/operations/listproducts.d.ts.map +1 -1
- package/esm/models/operations/listproducts.js +2 -2
- package/esm/models/operations/listproducts.js.map +1 -1
- package/esm/models/operations/listproductvariants.d.ts +1 -1
- package/esm/models/operations/listproductvariants.d.ts.map +1 -1
- package/esm/models/operations/listproductvariants.js +2 -2
- package/esm/models/operations/listproductvariants.js.map +1 -1
- package/esm/models/operations/listskus.d.ts +1 -1
- package/esm/models/operations/listskus.d.ts.map +1 -1
- package/esm/models/operations/listskus.js +2 -2
- package/esm/models/operations/listskus.js.map +1 -1
- package/esm/models/operations/loginwithemail.d.ts +106 -0
- package/esm/models/operations/loginwithemail.d.ts.map +1 -1
- package/esm/models/operations/loginwithemail.js +147 -0
- package/esm/models/operations/loginwithemail.js.map +1 -1
- package/esm/models/operations/loginwithphone.d.ts +106 -0
- package/esm/models/operations/loginwithphone.d.ts.map +1 -1
- package/esm/models/operations/loginwithphone.js +147 -0
- package/esm/models/operations/loginwithphone.js.map +1 -1
- package/esm/models/operations/loginwithwhatsapp.d.ts +106 -0
- package/esm/models/operations/loginwithwhatsapp.d.ts.map +1 -1
- package/esm/models/operations/loginwithwhatsapp.js +150 -0
- package/esm/models/operations/loginwithwhatsapp.js.map +1 -1
- package/esm/models/operations/updatecart.d.ts +2 -2
- package/esm/models/operations/updatecart.d.ts.map +1 -1
- package/esm/models/operations/updatecart.js +2 -2
- package/esm/models/operations/updatecart.js.map +1 -1
- package/esm/models/operations/verifyotp.d.ts +106 -0
- package/esm/models/operations/verifyotp.d.ts.map +1 -1
- package/esm/models/operations/verifyotp.js +144 -0
- package/esm/models/operations/verifyotp.js.map +1 -1
- package/esm/sdk/auth.d.ts +5 -5
- package/esm/sdk/auth.d.ts.map +1 -1
- package/esm/sdk/auth.js +10 -10
- package/esm/sdk/auth.js.map +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/funcs/authGenerateOtp.ts +31 -5
- package/src/funcs/authLoginWithEmail.ts +31 -5
- package/src/funcs/authLoginWithPhone.ts +31 -5
- package/src/funcs/authLoginWithWhatsapp.ts +31 -5
- package/src/funcs/authVerifyOtp.ts +31 -5
- package/src/lib/config.ts +3 -3
- package/src/models/components/notificationchannelpreferences.ts +9 -9
- package/src/models/operations/deleteaddress.ts +3 -3
- package/src/models/operations/deletecart.ts +3 -3
- package/src/models/operations/deleteusercart.ts +3 -3
- package/src/models/operations/generateotp.ts +282 -0
- package/src/models/operations/getcart.ts +3 -3
- package/src/models/operations/getproductdetail.ts +3 -3
- package/src/models/operations/getusercart.ts +3 -3
- package/src/models/operations/getvariantdetail.ts +3 -3
- package/src/models/operations/listcategories.ts +3 -3
- package/src/models/operations/listproducts.ts +3 -3
- package/src/models/operations/listproductvariants.ts +3 -3
- package/src/models/operations/listskus.ts +3 -3
- package/src/models/operations/loginwithemail.ts +291 -0
- package/src/models/operations/loginwithphone.ts +291 -0
- package/src/models/operations/loginwithwhatsapp.ts +294 -0
- package/src/models/operations/updatecart.ts +4 -4
- package/src/models/operations/verifyotp.ts +282 -0
- package/src/sdk/auth.ts +10 -0
|
@@ -21,6 +21,25 @@ export const VerifyOtpServerList = [
|
|
|
21
21
|
"https://prod.api.commercengine.io/api/v1/{store_id}/storefront",
|
|
22
22
|
] as const;
|
|
23
23
|
|
|
24
|
+
export type VerifyOtpSecurityOption1 = {
|
|
25
|
+
xApiKey: string;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
export type VerifyOtpSecurityOption2 = {
|
|
29
|
+
authorization: string;
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export type VerifyOtpSecurityOption3 = {
|
|
33
|
+
xApiKey: string;
|
|
34
|
+
authorization: string;
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
export type VerifyOtpSecurity = {
|
|
38
|
+
option1?: VerifyOtpSecurityOption1 | undefined;
|
|
39
|
+
option2?: VerifyOtpSecurityOption2 | undefined;
|
|
40
|
+
option3?: VerifyOtpSecurityOption3 | undefined;
|
|
41
|
+
};
|
|
42
|
+
|
|
24
43
|
/**
|
|
25
44
|
* A string indicating the action to be performed.
|
|
26
45
|
*/
|
|
@@ -86,6 +105,269 @@ export type VerifyOtpResponseBody = {
|
|
|
86
105
|
content?: VerifyOtpContent | undefined;
|
|
87
106
|
};
|
|
88
107
|
|
|
108
|
+
/** @internal */
|
|
109
|
+
export const VerifyOtpSecurityOption1$inboundSchema: z.ZodType<
|
|
110
|
+
VerifyOtpSecurityOption1,
|
|
111
|
+
z.ZodTypeDef,
|
|
112
|
+
unknown
|
|
113
|
+
> = z.object({
|
|
114
|
+
"X-Api-Key": z.string(),
|
|
115
|
+
}).transform((v) => {
|
|
116
|
+
return remap$(v, {
|
|
117
|
+
"X-Api-Key": "xApiKey",
|
|
118
|
+
});
|
|
119
|
+
});
|
|
120
|
+
|
|
121
|
+
/** @internal */
|
|
122
|
+
export type VerifyOtpSecurityOption1$Outbound = {
|
|
123
|
+
"X-Api-Key": string;
|
|
124
|
+
};
|
|
125
|
+
|
|
126
|
+
/** @internal */
|
|
127
|
+
export const VerifyOtpSecurityOption1$outboundSchema: z.ZodType<
|
|
128
|
+
VerifyOtpSecurityOption1$Outbound,
|
|
129
|
+
z.ZodTypeDef,
|
|
130
|
+
VerifyOtpSecurityOption1
|
|
131
|
+
> = z.object({
|
|
132
|
+
xApiKey: z.string(),
|
|
133
|
+
}).transform((v) => {
|
|
134
|
+
return remap$(v, {
|
|
135
|
+
xApiKey: "X-Api-Key",
|
|
136
|
+
});
|
|
137
|
+
});
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* @internal
|
|
141
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
142
|
+
*/
|
|
143
|
+
export namespace VerifyOtpSecurityOption1$ {
|
|
144
|
+
/** @deprecated use `VerifyOtpSecurityOption1$inboundSchema` instead. */
|
|
145
|
+
export const inboundSchema = VerifyOtpSecurityOption1$inboundSchema;
|
|
146
|
+
/** @deprecated use `VerifyOtpSecurityOption1$outboundSchema` instead. */
|
|
147
|
+
export const outboundSchema = VerifyOtpSecurityOption1$outboundSchema;
|
|
148
|
+
/** @deprecated use `VerifyOtpSecurityOption1$Outbound` instead. */
|
|
149
|
+
export type Outbound = VerifyOtpSecurityOption1$Outbound;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
export function verifyOtpSecurityOption1ToJSON(
|
|
153
|
+
verifyOtpSecurityOption1: VerifyOtpSecurityOption1,
|
|
154
|
+
): string {
|
|
155
|
+
return JSON.stringify(
|
|
156
|
+
VerifyOtpSecurityOption1$outboundSchema.parse(verifyOtpSecurityOption1),
|
|
157
|
+
);
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
export function verifyOtpSecurityOption1FromJSON(
|
|
161
|
+
jsonString: string,
|
|
162
|
+
): SafeParseResult<VerifyOtpSecurityOption1, SDKValidationError> {
|
|
163
|
+
return safeParse(
|
|
164
|
+
jsonString,
|
|
165
|
+
(x) => VerifyOtpSecurityOption1$inboundSchema.parse(JSON.parse(x)),
|
|
166
|
+
`Failed to parse 'VerifyOtpSecurityOption1' from JSON`,
|
|
167
|
+
);
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
/** @internal */
|
|
171
|
+
export const VerifyOtpSecurityOption2$inboundSchema: z.ZodType<
|
|
172
|
+
VerifyOtpSecurityOption2,
|
|
173
|
+
z.ZodTypeDef,
|
|
174
|
+
unknown
|
|
175
|
+
> = z.object({
|
|
176
|
+
Authorization: z.string(),
|
|
177
|
+
}).transform((v) => {
|
|
178
|
+
return remap$(v, {
|
|
179
|
+
"Authorization": "authorization",
|
|
180
|
+
});
|
|
181
|
+
});
|
|
182
|
+
|
|
183
|
+
/** @internal */
|
|
184
|
+
export type VerifyOtpSecurityOption2$Outbound = {
|
|
185
|
+
Authorization: string;
|
|
186
|
+
};
|
|
187
|
+
|
|
188
|
+
/** @internal */
|
|
189
|
+
export const VerifyOtpSecurityOption2$outboundSchema: z.ZodType<
|
|
190
|
+
VerifyOtpSecurityOption2$Outbound,
|
|
191
|
+
z.ZodTypeDef,
|
|
192
|
+
VerifyOtpSecurityOption2
|
|
193
|
+
> = z.object({
|
|
194
|
+
authorization: z.string(),
|
|
195
|
+
}).transform((v) => {
|
|
196
|
+
return remap$(v, {
|
|
197
|
+
authorization: "Authorization",
|
|
198
|
+
});
|
|
199
|
+
});
|
|
200
|
+
|
|
201
|
+
/**
|
|
202
|
+
* @internal
|
|
203
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
204
|
+
*/
|
|
205
|
+
export namespace VerifyOtpSecurityOption2$ {
|
|
206
|
+
/** @deprecated use `VerifyOtpSecurityOption2$inboundSchema` instead. */
|
|
207
|
+
export const inboundSchema = VerifyOtpSecurityOption2$inboundSchema;
|
|
208
|
+
/** @deprecated use `VerifyOtpSecurityOption2$outboundSchema` instead. */
|
|
209
|
+
export const outboundSchema = VerifyOtpSecurityOption2$outboundSchema;
|
|
210
|
+
/** @deprecated use `VerifyOtpSecurityOption2$Outbound` instead. */
|
|
211
|
+
export type Outbound = VerifyOtpSecurityOption2$Outbound;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
export function verifyOtpSecurityOption2ToJSON(
|
|
215
|
+
verifyOtpSecurityOption2: VerifyOtpSecurityOption2,
|
|
216
|
+
): string {
|
|
217
|
+
return JSON.stringify(
|
|
218
|
+
VerifyOtpSecurityOption2$outboundSchema.parse(verifyOtpSecurityOption2),
|
|
219
|
+
);
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
export function verifyOtpSecurityOption2FromJSON(
|
|
223
|
+
jsonString: string,
|
|
224
|
+
): SafeParseResult<VerifyOtpSecurityOption2, SDKValidationError> {
|
|
225
|
+
return safeParse(
|
|
226
|
+
jsonString,
|
|
227
|
+
(x) => VerifyOtpSecurityOption2$inboundSchema.parse(JSON.parse(x)),
|
|
228
|
+
`Failed to parse 'VerifyOtpSecurityOption2' from JSON`,
|
|
229
|
+
);
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
/** @internal */
|
|
233
|
+
export const VerifyOtpSecurityOption3$inboundSchema: z.ZodType<
|
|
234
|
+
VerifyOtpSecurityOption3,
|
|
235
|
+
z.ZodTypeDef,
|
|
236
|
+
unknown
|
|
237
|
+
> = z.object({
|
|
238
|
+
"X-Api-Key": z.string(),
|
|
239
|
+
Authorization: z.string(),
|
|
240
|
+
}).transform((v) => {
|
|
241
|
+
return remap$(v, {
|
|
242
|
+
"X-Api-Key": "xApiKey",
|
|
243
|
+
"Authorization": "authorization",
|
|
244
|
+
});
|
|
245
|
+
});
|
|
246
|
+
|
|
247
|
+
/** @internal */
|
|
248
|
+
export type VerifyOtpSecurityOption3$Outbound = {
|
|
249
|
+
"X-Api-Key": string;
|
|
250
|
+
Authorization: string;
|
|
251
|
+
};
|
|
252
|
+
|
|
253
|
+
/** @internal */
|
|
254
|
+
export const VerifyOtpSecurityOption3$outboundSchema: z.ZodType<
|
|
255
|
+
VerifyOtpSecurityOption3$Outbound,
|
|
256
|
+
z.ZodTypeDef,
|
|
257
|
+
VerifyOtpSecurityOption3
|
|
258
|
+
> = z.object({
|
|
259
|
+
xApiKey: z.string(),
|
|
260
|
+
authorization: z.string(),
|
|
261
|
+
}).transform((v) => {
|
|
262
|
+
return remap$(v, {
|
|
263
|
+
xApiKey: "X-Api-Key",
|
|
264
|
+
authorization: "Authorization",
|
|
265
|
+
});
|
|
266
|
+
});
|
|
267
|
+
|
|
268
|
+
/**
|
|
269
|
+
* @internal
|
|
270
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
271
|
+
*/
|
|
272
|
+
export namespace VerifyOtpSecurityOption3$ {
|
|
273
|
+
/** @deprecated use `VerifyOtpSecurityOption3$inboundSchema` instead. */
|
|
274
|
+
export const inboundSchema = VerifyOtpSecurityOption3$inboundSchema;
|
|
275
|
+
/** @deprecated use `VerifyOtpSecurityOption3$outboundSchema` instead. */
|
|
276
|
+
export const outboundSchema = VerifyOtpSecurityOption3$outboundSchema;
|
|
277
|
+
/** @deprecated use `VerifyOtpSecurityOption3$Outbound` instead. */
|
|
278
|
+
export type Outbound = VerifyOtpSecurityOption3$Outbound;
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
export function verifyOtpSecurityOption3ToJSON(
|
|
282
|
+
verifyOtpSecurityOption3: VerifyOtpSecurityOption3,
|
|
283
|
+
): string {
|
|
284
|
+
return JSON.stringify(
|
|
285
|
+
VerifyOtpSecurityOption3$outboundSchema.parse(verifyOtpSecurityOption3),
|
|
286
|
+
);
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
export function verifyOtpSecurityOption3FromJSON(
|
|
290
|
+
jsonString: string,
|
|
291
|
+
): SafeParseResult<VerifyOtpSecurityOption3, SDKValidationError> {
|
|
292
|
+
return safeParse(
|
|
293
|
+
jsonString,
|
|
294
|
+
(x) => VerifyOtpSecurityOption3$inboundSchema.parse(JSON.parse(x)),
|
|
295
|
+
`Failed to parse 'VerifyOtpSecurityOption3' from JSON`,
|
|
296
|
+
);
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
/** @internal */
|
|
300
|
+
export const VerifyOtpSecurity$inboundSchema: z.ZodType<
|
|
301
|
+
VerifyOtpSecurity,
|
|
302
|
+
z.ZodTypeDef,
|
|
303
|
+
unknown
|
|
304
|
+
> = z.object({
|
|
305
|
+
Option1: z.lazy(() => VerifyOtpSecurityOption1$inboundSchema).optional(),
|
|
306
|
+
Option2: z.lazy(() => VerifyOtpSecurityOption2$inboundSchema).optional(),
|
|
307
|
+
Option3: z.lazy(() => VerifyOtpSecurityOption3$inboundSchema).optional(),
|
|
308
|
+
}).transform((v) => {
|
|
309
|
+
return remap$(v, {
|
|
310
|
+
"Option1": "option1",
|
|
311
|
+
"Option2": "option2",
|
|
312
|
+
"Option3": "option3",
|
|
313
|
+
});
|
|
314
|
+
});
|
|
315
|
+
|
|
316
|
+
/** @internal */
|
|
317
|
+
export type VerifyOtpSecurity$Outbound = {
|
|
318
|
+
Option1?: VerifyOtpSecurityOption1$Outbound | undefined;
|
|
319
|
+
Option2?: VerifyOtpSecurityOption2$Outbound | undefined;
|
|
320
|
+
Option3?: VerifyOtpSecurityOption3$Outbound | undefined;
|
|
321
|
+
};
|
|
322
|
+
|
|
323
|
+
/** @internal */
|
|
324
|
+
export const VerifyOtpSecurity$outboundSchema: z.ZodType<
|
|
325
|
+
VerifyOtpSecurity$Outbound,
|
|
326
|
+
z.ZodTypeDef,
|
|
327
|
+
VerifyOtpSecurity
|
|
328
|
+
> = z.object({
|
|
329
|
+
option1: z.lazy(() => VerifyOtpSecurityOption1$outboundSchema).optional(),
|
|
330
|
+
option2: z.lazy(() => VerifyOtpSecurityOption2$outboundSchema).optional(),
|
|
331
|
+
option3: z.lazy(() => VerifyOtpSecurityOption3$outboundSchema).optional(),
|
|
332
|
+
}).transform((v) => {
|
|
333
|
+
return remap$(v, {
|
|
334
|
+
option1: "Option1",
|
|
335
|
+
option2: "Option2",
|
|
336
|
+
option3: "Option3",
|
|
337
|
+
});
|
|
338
|
+
});
|
|
339
|
+
|
|
340
|
+
/**
|
|
341
|
+
* @internal
|
|
342
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
343
|
+
*/
|
|
344
|
+
export namespace VerifyOtpSecurity$ {
|
|
345
|
+
/** @deprecated use `VerifyOtpSecurity$inboundSchema` instead. */
|
|
346
|
+
export const inboundSchema = VerifyOtpSecurity$inboundSchema;
|
|
347
|
+
/** @deprecated use `VerifyOtpSecurity$outboundSchema` instead. */
|
|
348
|
+
export const outboundSchema = VerifyOtpSecurity$outboundSchema;
|
|
349
|
+
/** @deprecated use `VerifyOtpSecurity$Outbound` instead. */
|
|
350
|
+
export type Outbound = VerifyOtpSecurity$Outbound;
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
export function verifyOtpSecurityToJSON(
|
|
354
|
+
verifyOtpSecurity: VerifyOtpSecurity,
|
|
355
|
+
): string {
|
|
356
|
+
return JSON.stringify(
|
|
357
|
+
VerifyOtpSecurity$outboundSchema.parse(verifyOtpSecurity),
|
|
358
|
+
);
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
export function verifyOtpSecurityFromJSON(
|
|
362
|
+
jsonString: string,
|
|
363
|
+
): SafeParseResult<VerifyOtpSecurity, SDKValidationError> {
|
|
364
|
+
return safeParse(
|
|
365
|
+
jsonString,
|
|
366
|
+
(x) => VerifyOtpSecurity$inboundSchema.parse(JSON.parse(x)),
|
|
367
|
+
`Failed to parse 'VerifyOtpSecurity' from JSON`,
|
|
368
|
+
);
|
|
369
|
+
}
|
|
370
|
+
|
|
89
371
|
/** @internal */
|
|
90
372
|
export const OtpAction$inboundSchema: z.ZodNativeEnum<typeof OtpAction> = z
|
|
91
373
|
.nativeEnum(OtpAction);
|
package/src/sdk/auth.ts
CHANGED
|
@@ -46,11 +46,13 @@ export class Auth extends ClientSDK {
|
|
|
46
46
|
* This API enables users to authenticate into the system using their phone number. It provides a secure way for users to log in by verifying their identity through a one-time password (OTP) sent to their registered phone.
|
|
47
47
|
*/
|
|
48
48
|
async loginWithPhone(
|
|
49
|
+
security: operations.LoginWithPhoneSecurity,
|
|
49
50
|
request: operations.LoginWithPhoneRequestBody,
|
|
50
51
|
options?: RequestOptions,
|
|
51
52
|
): Promise<operations.LoginWithPhoneResponseBody> {
|
|
52
53
|
return unwrapAsync(authLoginWithPhone(
|
|
53
54
|
this,
|
|
55
|
+
security,
|
|
54
56
|
request,
|
|
55
57
|
options,
|
|
56
58
|
));
|
|
@@ -63,11 +65,13 @@ export class Auth extends ClientSDK {
|
|
|
63
65
|
* This API enables users to authenticate into the system using their email address. It provides a secure way for users to Login by verifying their identity through a one-time password (OTP) sent to their email address.
|
|
64
66
|
*/
|
|
65
67
|
async loginWithEmail(
|
|
68
|
+
security: operations.LoginWithEmailSecurity,
|
|
66
69
|
request: operations.LoginWithEmailRequestBody,
|
|
67
70
|
options?: RequestOptions,
|
|
68
71
|
): Promise<operations.LoginWithEmailResponseBody> {
|
|
69
72
|
return unwrapAsync(authLoginWithEmail(
|
|
70
73
|
this,
|
|
74
|
+
security,
|
|
71
75
|
request,
|
|
72
76
|
options,
|
|
73
77
|
));
|
|
@@ -80,11 +84,13 @@ export class Auth extends ClientSDK {
|
|
|
80
84
|
* This API enables users to authenticate into the system using their WhatsApp Number. It provides a secure way for users to Login by verifying their identity through a one-time password (OTP) sent to their WhatsApp Number.
|
|
81
85
|
*/
|
|
82
86
|
async loginWithWhatsapp(
|
|
87
|
+
security: operations.LoginWithWhatsappSecurity,
|
|
83
88
|
request: operations.LoginWithWhatsappRequestBody,
|
|
84
89
|
options?: RequestOptions,
|
|
85
90
|
): Promise<operations.LoginWithWhatsappResponseBody> {
|
|
86
91
|
return unwrapAsync(authLoginWithWhatsapp(
|
|
87
92
|
this,
|
|
93
|
+
security,
|
|
88
94
|
request,
|
|
89
95
|
options,
|
|
90
96
|
));
|
|
@@ -97,11 +103,13 @@ export class Auth extends ClientSDK {
|
|
|
97
103
|
* This API endpoint allows you to verify a one-time password (OTP) for authentication purposes. By sending a request to this endpoint with the necessary parameters, you can confirm the validity of the OTP provided by the user.
|
|
98
104
|
*/
|
|
99
105
|
async verifyOtp(
|
|
106
|
+
security: operations.VerifyOtpSecurity,
|
|
100
107
|
request: operations.VerifyOtpRequestBody,
|
|
101
108
|
options?: RequestOptions,
|
|
102
109
|
): Promise<operations.VerifyOtpResponseBody> {
|
|
103
110
|
return unwrapAsync(authVerifyOtp(
|
|
104
111
|
this,
|
|
112
|
+
security,
|
|
105
113
|
request,
|
|
106
114
|
options,
|
|
107
115
|
));
|
|
@@ -216,11 +224,13 @@ export class Auth extends ClientSDK {
|
|
|
216
224
|
* Generating a One-Time Password (OTP) typically involves creating a random code that is sent to a user for authentication or verification purposes.
|
|
217
225
|
*/
|
|
218
226
|
async generateOtp(
|
|
227
|
+
security: operations.GenerateOtpSecurity,
|
|
219
228
|
request: operations.GenerateOtpRequestBody,
|
|
220
229
|
options?: RequestOptions,
|
|
221
230
|
): Promise<operations.GenerateOtpResponseBody> {
|
|
222
231
|
return unwrapAsync(authGenerateOtp(
|
|
223
232
|
this,
|
|
233
|
+
security,
|
|
224
234
|
request,
|
|
225
235
|
options,
|
|
226
236
|
));
|