68 lines
1.5 KiB
TypeScript
68 lines
1.5 KiB
TypeScript
// This file is auto-generated by @hey-api/openapi-ts
|
|
|
|
import { z } from 'zod';
|
|
|
|
export const zRequestOtpRequest = z.object({
|
|
phone_number: z.string().max(15)
|
|
});
|
|
|
|
export const zRequestOtpResponse = z.object({
|
|
message: z.string(),
|
|
ok: z.boolean()
|
|
});
|
|
|
|
export const zVerifyOtpRequest = z.object({
|
|
phone_number: z.string().max(15),
|
|
otp: z.string().max(6),
|
|
login_challenge: z.string()
|
|
});
|
|
|
|
export const zVerifyOtpResponse = z.object({
|
|
redirect_url: z.string(),
|
|
ok: z.boolean(),
|
|
message: z.string()
|
|
});
|
|
|
|
export const zAcceptConsentRequest = z.object({
|
|
consent_challenge: z.string(),
|
|
phone_number: z.string().max(15)
|
|
});
|
|
|
|
export const zAcceptConsentResponse = z.object({
|
|
redirect_url: z.string(),
|
|
ok: z.boolean(),
|
|
message: z.string()
|
|
});
|
|
|
|
export const zPostAuthOtpRequestData = z.object({
|
|
body: zRequestOtpRequest,
|
|
path: z.optional(z.never()),
|
|
query: z.optional(z.never())
|
|
});
|
|
|
|
/**
|
|
* OTP requested successfully
|
|
*/
|
|
export const zPostAuthOtpRequestResponse = zRequestOtpResponse;
|
|
|
|
export const zPostAuthOtpVerifyData = z.object({
|
|
body: zVerifyOtpRequest,
|
|
path: z.optional(z.never()),
|
|
query: z.optional(z.never())
|
|
});
|
|
|
|
/**
|
|
* OTP verified successfully
|
|
*/
|
|
export const zPostAuthOtpVerifyResponse = zVerifyOtpResponse;
|
|
|
|
export const zPostAuthConsentAcceptData = z.object({
|
|
body: zAcceptConsentRequest,
|
|
path: z.optional(z.never()),
|
|
query: z.optional(z.never())
|
|
});
|
|
|
|
/**
|
|
* Consent accepted successfully
|
|
*/
|
|
export const zPostAuthConsentAcceptResponse = zAcceptConsentResponse; |