This commit is contained in:
Maieul BOYER 2025-12-01 19:26:22 +01:00
parent e5b71a5cc1
commit c898fe8d32
No known key found for this signature in database
30 changed files with 1148 additions and 95 deletions

View file

@ -2,15 +2,19 @@ apis/OpenapiOtherApi.ts
apis/index.ts
index.ts
models/ChatTest200Response.ts
models/ChatTest200ResponsePayload.ts
models/DisableOtp200Response.ts
models/DisableOtp400Response.ts
models/DisableOtp401Response.ts
models/DisableOtp500Response.ts
models/EnableOtp200Response.ts
models/EnableOtp200ResponsePayload.ts
models/EnableOtp400Response.ts
models/EnableOtp401Response.ts
models/EnableOtp401ResponseAnyOf.ts
models/GetUser200Response.ts
models/GetUser200ResponsePayload.ts
models/GetUser200ResponsePayloadSelfInfo.ts
models/GetUser403Response.ts
models/GetUser404Response.ts
models/GetUserUserParameter.ts
@ -41,6 +45,7 @@ models/Signin500Response.ts
models/StatusOtp200Response.ts
models/StatusOtp200ResponseAnyOf.ts
models/StatusOtp200ResponseAnyOf1.ts
models/StatusOtp200ResponseAnyOfPayload.ts
models/StatusOtp401Response.ts
models/StatusOtp500Response.ts
models/index.ts

View file

@ -17,9 +17,11 @@ import * as runtime from '../runtime';
import type {
ChatTest200Response,
DisableOtp200Response,
DisableOtp400Response,
DisableOtp401Response,
DisableOtp500Response,
EnableOtp200Response,
EnableOtp400Response,
EnableOtp401Response,
GetUser200Response,
GetUser403Response,
@ -51,12 +53,16 @@ import {
ChatTest200ResponseToJSON,
DisableOtp200ResponseFromJSON,
DisableOtp200ResponseToJSON,
DisableOtp400ResponseFromJSON,
DisableOtp400ResponseToJSON,
DisableOtp401ResponseFromJSON,
DisableOtp401ResponseToJSON,
DisableOtp500ResponseFromJSON,
DisableOtp500ResponseToJSON,
EnableOtp200ResponseFromJSON,
EnableOtp200ResponseToJSON,
EnableOtp400ResponseFromJSON,
EnableOtp400ResponseToJSON,
EnableOtp401ResponseFromJSON,
EnableOtp401ResponseToJSON,
GetUser200ResponseFromJSON,
@ -174,7 +180,7 @@ export class OpenapiOtherApi extends runtime.BaseAPI {
/**
*/
async disableOtpRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DisableOtp200Response | DisableOtp401Response | DisableOtp500Response>> {
async disableOtpRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DisableOtp200Response | DisableOtp400Response | DisableOtp401Response | DisableOtp500Response>> {
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
@ -197,6 +203,10 @@ export class OpenapiOtherApi extends runtime.BaseAPI {
// Object response for status 200
return new runtime.JSONApiResponse(response, (jsonValue) => DisableOtp200ResponseFromJSON(jsonValue));
}
if (response.status === 400) {
// Object response for status 400
return new runtime.JSONApiResponse(response, (jsonValue) => DisableOtp400ResponseFromJSON(jsonValue));
}
if (response.status === 401) {
// Object response for status 401
return new runtime.JSONApiResponse(response, (jsonValue) => DisableOtp401ResponseFromJSON(jsonValue));
@ -208,19 +218,19 @@ export class OpenapiOtherApi extends runtime.BaseAPI {
// CHANGED: Throw error if status code is not handled by any of the defined responses
// This ensures all code paths return a value and provides clear error messages for unexpected status codes
// Only throw if responses were defined but none matched the actual status code
throw new runtime.ResponseError(response, `Unexpected status code: ${response.status}. Expected one of: 200, 401, 500`);
throw new runtime.ResponseError(response, `Unexpected status code: ${response.status}. Expected one of: 200, 400, 401, 500`);
}
/**
*/
async disableOtp(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DisableOtp200Response | DisableOtp401Response | DisableOtp500Response> {
async disableOtp(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DisableOtp200Response | DisableOtp400Response | DisableOtp401Response | DisableOtp500Response> {
const response = await this.disableOtpRaw(initOverrides);
return await response.value();
}
/**
*/
async enableOtpRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<EnableOtp200Response | EnableOtp401Response>> {
async enableOtpRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<EnableOtp200Response | EnableOtp400Response | EnableOtp401Response>> {
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
@ -243,6 +253,10 @@ export class OpenapiOtherApi extends runtime.BaseAPI {
// Object response for status 200
return new runtime.JSONApiResponse(response, (jsonValue) => EnableOtp200ResponseFromJSON(jsonValue));
}
if (response.status === 400) {
// Object response for status 400
return new runtime.JSONApiResponse(response, (jsonValue) => EnableOtp400ResponseFromJSON(jsonValue));
}
if (response.status === 401) {
// Object response for status 401
return new runtime.JSONApiResponse(response, (jsonValue) => EnableOtp401ResponseFromJSON(jsonValue));
@ -250,12 +264,12 @@ export class OpenapiOtherApi extends runtime.BaseAPI {
// CHANGED: Throw error if status code is not handled by any of the defined responses
// This ensures all code paths return a value and provides clear error messages for unexpected status codes
// Only throw if responses were defined but none matched the actual status code
throw new runtime.ResponseError(response, `Unexpected status code: ${response.status}. Expected one of: 200, 401`);
throw new runtime.ResponseError(response, `Unexpected status code: ${response.status}. Expected one of: 200, 400, 401`);
}
/**
*/
async enableOtp(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<EnableOtp200Response | EnableOtp401Response> {
async enableOtp(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<EnableOtp200Response | EnableOtp400Response | EnableOtp401Response> {
const response = await this.enableOtpRaw(initOverrides);
return await response.value();
}

View file

@ -13,13 +13,13 @@
*/
import { mapValues } from '../runtime';
import type { GetUser200ResponsePayload } from './GetUser200ResponsePayload';
import type { ChatTest200ResponsePayload } from './ChatTest200ResponsePayload';
import {
GetUser200ResponsePayloadFromJSON,
GetUser200ResponsePayloadFromJSONTyped,
GetUser200ResponsePayloadToJSON,
GetUser200ResponsePayloadToJSONTyped,
} from './GetUser200ResponsePayload';
ChatTest200ResponsePayloadFromJSON,
ChatTest200ResponsePayloadFromJSONTyped,
ChatTest200ResponsePayloadToJSON,
ChatTest200ResponsePayloadToJSONTyped,
} from './ChatTest200ResponsePayload';
/**
*
@ -41,10 +41,10 @@ export interface ChatTest200Response {
msg: ChatTest200ResponseMsgEnum;
/**
*
* @type {GetUser200ResponsePayload}
* @type {ChatTest200ResponsePayload}
* @memberof ChatTest200Response
*/
payload: GetUser200ResponsePayload;
payload: ChatTest200ResponsePayload;
}
@ -87,7 +87,7 @@ export function ChatTest200ResponseFromJSONTyped(json: any, ignoreDiscriminator:
'kind': json['kind'],
'msg': json['msg'],
'payload': GetUser200ResponsePayloadFromJSON(json['payload']),
'payload': ChatTest200ResponsePayloadFromJSON(json['payload']),
};
}
@ -104,7 +104,7 @@ export function ChatTest200ResponseToJSONTyped(value?: ChatTest200Response | nul
'kind': value['kind'],
'msg': value['msg'],
'payload': GetUser200ResponsePayloadToJSON(value['payload']),
'payload': ChatTest200ResponsePayloadToJSON(value['payload']),
};
}

View file

@ -0,0 +1,84 @@
/* tslint:disable */
/* eslint-disable */
/**
* @fastify/swagger
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 9.6.1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { mapValues } from '../runtime';
/**
*
* @export
* @interface ChatTest200ResponsePayload
*/
export interface ChatTest200ResponsePayload {
/**
*
* @type {string}
* @memberof ChatTest200ResponsePayload
*/
name: string;
/**
*
* @type {string}
* @memberof ChatTest200ResponsePayload
*/
id: string;
/**
*
* @type {boolean}
* @memberof ChatTest200ResponsePayload
*/
guest: boolean;
}
/**
* Check if a given object implements the ChatTest200ResponsePayload interface.
*/
export function instanceOfChatTest200ResponsePayload(value: object): value is ChatTest200ResponsePayload {
if (!('name' in value) || value['name'] === undefined) return false;
if (!('id' in value) || value['id'] === undefined) return false;
if (!('guest' in value) || value['guest'] === undefined) return false;
return true;
}
export function ChatTest200ResponsePayloadFromJSON(json: any): ChatTest200ResponsePayload {
return ChatTest200ResponsePayloadFromJSONTyped(json, false);
}
export function ChatTest200ResponsePayloadFromJSONTyped(json: any, ignoreDiscriminator: boolean): ChatTest200ResponsePayload {
if (json == null) {
return json;
}
return {
'name': json['name'],
'id': json['id'],
'guest': json['guest'],
};
}
export function ChatTest200ResponsePayloadToJSON(json: any): ChatTest200ResponsePayload {
return ChatTest200ResponsePayloadToJSONTyped(json, false);
}
export function ChatTest200ResponsePayloadToJSONTyped(value?: ChatTest200ResponsePayload | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'name': value['name'],
'id': value['id'],
'guest': value['guest'],
};
}

View file

@ -0,0 +1,93 @@
/* tslint:disable */
/* eslint-disable */
/**
* @fastify/swagger
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 9.6.1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { mapValues } from '../runtime';
/**
*
* @export
* @interface DisableOtp400Response
*/
export interface DisableOtp400Response {
/**
*
* @type {string}
* @memberof DisableOtp400Response
*/
kind: DisableOtp400ResponseKindEnum;
/**
*
* @type {string}
* @memberof DisableOtp400Response
*/
msg: DisableOtp400ResponseMsgEnum;
}
/**
* @export
*/
export const DisableOtp400ResponseKindEnum = {
Failure: 'failure'
} as const;
export type DisableOtp400ResponseKindEnum = typeof DisableOtp400ResponseKindEnum[keyof typeof DisableOtp400ResponseKindEnum];
/**
* @export
*/
export const DisableOtp400ResponseMsgEnum = {
DisableOtpFailureGuest: 'disableOtp.failure.guest'
} as const;
export type DisableOtp400ResponseMsgEnum = typeof DisableOtp400ResponseMsgEnum[keyof typeof DisableOtp400ResponseMsgEnum];
/**
* Check if a given object implements the DisableOtp400Response interface.
*/
export function instanceOfDisableOtp400Response(value: object): value is DisableOtp400Response {
if (!('kind' in value) || value['kind'] === undefined) return false;
if (!('msg' in value) || value['msg'] === undefined) return false;
return true;
}
export function DisableOtp400ResponseFromJSON(json: any): DisableOtp400Response {
return DisableOtp400ResponseFromJSONTyped(json, false);
}
export function DisableOtp400ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): DisableOtp400Response {
if (json == null) {
return json;
}
return {
'kind': json['kind'],
'msg': json['msg'],
};
}
export function DisableOtp400ResponseToJSON(json: any): DisableOtp400Response {
return DisableOtp400ResponseToJSONTyped(json, false);
}
export function DisableOtp400ResponseToJSONTyped(value?: DisableOtp400Response | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'kind': value['kind'],
'msg': value['msg'],
};
}

View file

@ -0,0 +1,93 @@
/* tslint:disable */
/* eslint-disable */
/**
* @fastify/swagger
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 9.6.1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { mapValues } from '../runtime';
/**
*
* @export
* @interface EnableOtp400Response
*/
export interface EnableOtp400Response {
/**
*
* @type {string}
* @memberof EnableOtp400Response
*/
kind: EnableOtp400ResponseKindEnum;
/**
*
* @type {string}
* @memberof EnableOtp400Response
*/
msg: EnableOtp400ResponseMsgEnum;
}
/**
* @export
*/
export const EnableOtp400ResponseKindEnum = {
Failure: 'failure'
} as const;
export type EnableOtp400ResponseKindEnum = typeof EnableOtp400ResponseKindEnum[keyof typeof EnableOtp400ResponseKindEnum];
/**
* @export
*/
export const EnableOtp400ResponseMsgEnum = {
EnableOtpFailureGuest: 'enableOtp.failure.guest'
} as const;
export type EnableOtp400ResponseMsgEnum = typeof EnableOtp400ResponseMsgEnum[keyof typeof EnableOtp400ResponseMsgEnum];
/**
* Check if a given object implements the EnableOtp400Response interface.
*/
export function instanceOfEnableOtp400Response(value: object): value is EnableOtp400Response {
if (!('kind' in value) || value['kind'] === undefined) return false;
if (!('msg' in value) || value['msg'] === undefined) return false;
return true;
}
export function EnableOtp400ResponseFromJSON(json: any): EnableOtp400Response {
return EnableOtp400ResponseFromJSONTyped(json, false);
}
export function EnableOtp400ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): EnableOtp400Response {
if (json == null) {
return json;
}
return {
'kind': json['kind'],
'msg': json['msg'],
};
}
export function EnableOtp400ResponseToJSON(json: any): EnableOtp400Response {
return EnableOtp400ResponseToJSONTyped(json, false);
}
export function EnableOtp400ResponseToJSONTyped(value?: EnableOtp400Response | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'kind': value['kind'],
'msg': value['msg'],
};
}

View file

@ -13,6 +13,14 @@
*/
import { mapValues } from '../runtime';
import type { GetUser200ResponsePayloadSelfInfo } from './GetUser200ResponsePayloadSelfInfo';
import {
GetUser200ResponsePayloadSelfInfoFromJSON,
GetUser200ResponsePayloadSelfInfoFromJSONTyped,
GetUser200ResponsePayloadSelfInfoToJSON,
GetUser200ResponsePayloadSelfInfoToJSONTyped,
} from './GetUser200ResponsePayloadSelfInfo';
/**
*
* @export
@ -37,6 +45,12 @@ export interface GetUser200ResponsePayload {
* @memberof GetUser200ResponsePayload
*/
guest: boolean;
/**
*
* @type {GetUser200ResponsePayloadSelfInfo}
* @memberof GetUser200ResponsePayload
*/
selfInfo?: GetUser200ResponsePayloadSelfInfo;
}
/**
@ -62,6 +76,7 @@ export function GetUser200ResponsePayloadFromJSONTyped(json: any, ignoreDiscrimi
'name': json['name'],
'id': json['id'],
'guest': json['guest'],
'selfInfo': json['selfInfo'] == null ? undefined : GetUser200ResponsePayloadSelfInfoFromJSON(json['selfInfo']),
};
}
@ -79,6 +94,7 @@ export function GetUser200ResponsePayloadToJSONTyped(value?: GetUser200ResponseP
'name': value['name'],
'id': value['id'],
'guest': value['guest'],
'selfInfo': GetUser200ResponsePayloadSelfInfoToJSON(value['selfInfo']),
};
}

View file

@ -0,0 +1,81 @@
/* tslint:disable */
/* eslint-disable */
/**
* @fastify/swagger
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 9.6.1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { mapValues } from '../runtime';
/**
*
* @export
* @interface GetUser200ResponsePayloadSelfInfo
*/
export interface GetUser200ResponsePayloadSelfInfo {
/**
*
* @type {string}
* @memberof GetUser200ResponsePayloadSelfInfo
*/
loginName?: string;
/**
*
* @type {string}
* @memberof GetUser200ResponsePayloadSelfInfo
*/
providerId?: string;
/**
*
* @type {string}
* @memberof GetUser200ResponsePayloadSelfInfo
*/
providerUser?: string;
}
/**
* Check if a given object implements the GetUser200ResponsePayloadSelfInfo interface.
*/
export function instanceOfGetUser200ResponsePayloadSelfInfo(value: object): value is GetUser200ResponsePayloadSelfInfo {
return true;
}
export function GetUser200ResponsePayloadSelfInfoFromJSON(json: any): GetUser200ResponsePayloadSelfInfo {
return GetUser200ResponsePayloadSelfInfoFromJSONTyped(json, false);
}
export function GetUser200ResponsePayloadSelfInfoFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetUser200ResponsePayloadSelfInfo {
if (json == null) {
return json;
}
return {
'loginName': json['login_name'] == null ? undefined : json['login_name'],
'providerId': json['provider_id'] == null ? undefined : json['provider_id'],
'providerUser': json['provider_user'] == null ? undefined : json['provider_user'],
};
}
export function GetUser200ResponsePayloadSelfInfoToJSON(json: any): GetUser200ResponsePayloadSelfInfo {
return GetUser200ResponsePayloadSelfInfoToJSONTyped(json, false);
}
export function GetUser200ResponsePayloadSelfInfoToJSONTyped(value?: GetUser200ResponsePayloadSelfInfo | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'login_name': value['loginName'],
'provider_id': value['providerId'],
'provider_user': value['providerUser'],
};
}

View file

@ -13,13 +13,6 @@
*/
import { mapValues } from '../runtime';
import type { EnableOtp200ResponsePayload } from './EnableOtp200ResponsePayload';
import {
EnableOtp200ResponsePayloadFromJSON,
EnableOtp200ResponsePayloadFromJSONTyped,
EnableOtp200ResponsePayloadToJSON,
EnableOtp200ResponsePayloadToJSONTyped,
} from './EnableOtp200ResponsePayload';
import type { StatusOtp200ResponseAnyOf } from './StatusOtp200ResponseAnyOf';
import {
StatusOtp200ResponseAnyOfFromJSON,
@ -27,6 +20,13 @@ import {
StatusOtp200ResponseAnyOfToJSON,
StatusOtp200ResponseAnyOfToJSONTyped,
} from './StatusOtp200ResponseAnyOf';
import type { StatusOtp200ResponseAnyOfPayload } from './StatusOtp200ResponseAnyOfPayload';
import {
StatusOtp200ResponseAnyOfPayloadFromJSON,
StatusOtp200ResponseAnyOfPayloadFromJSONTyped,
StatusOtp200ResponseAnyOfPayloadToJSON,
StatusOtp200ResponseAnyOfPayloadToJSONTyped,
} from './StatusOtp200ResponseAnyOfPayload';
import type { StatusOtp200ResponseAnyOf1 } from './StatusOtp200ResponseAnyOf1';
import {
StatusOtp200ResponseAnyOf1FromJSON,
@ -55,10 +55,10 @@ export interface StatusOtp200Response {
msg: StatusOtp200ResponseMsgEnum;
/**
*
* @type {EnableOtp200ResponsePayload}
* @type {StatusOtp200ResponseAnyOfPayload}
* @memberof StatusOtp200Response
*/
payload: EnableOtp200ResponsePayload;
payload: StatusOtp200ResponseAnyOfPayload;
}
@ -101,7 +101,7 @@ export function StatusOtp200ResponseFromJSONTyped(json: any, ignoreDiscriminator
'kind': json['kind'],
'msg': json['msg'],
'payload': EnableOtp200ResponsePayloadFromJSON(json['payload']),
'payload': StatusOtp200ResponseAnyOfPayloadFromJSON(json['payload']),
};
}
@ -118,7 +118,7 @@ export function StatusOtp200ResponseToJSONTyped(value?: StatusOtp200Response | n
'kind': value['kind'],
'msg': value['msg'],
'payload': EnableOtp200ResponsePayloadToJSON(value['payload']),
'payload': StatusOtp200ResponseAnyOfPayloadToJSON(value['payload']),
};
}

View file

@ -13,13 +13,13 @@
*/
import { mapValues } from '../runtime';
import type { EnableOtp200ResponsePayload } from './EnableOtp200ResponsePayload';
import type { StatusOtp200ResponseAnyOfPayload } from './StatusOtp200ResponseAnyOfPayload';
import {
EnableOtp200ResponsePayloadFromJSON,
EnableOtp200ResponsePayloadFromJSONTyped,
EnableOtp200ResponsePayloadToJSON,
EnableOtp200ResponsePayloadToJSONTyped,
} from './EnableOtp200ResponsePayload';
StatusOtp200ResponseAnyOfPayloadFromJSON,
StatusOtp200ResponseAnyOfPayloadFromJSONTyped,
StatusOtp200ResponseAnyOfPayloadToJSON,
StatusOtp200ResponseAnyOfPayloadToJSONTyped,
} from './StatusOtp200ResponseAnyOfPayload';
/**
*
@ -41,10 +41,10 @@ export interface StatusOtp200ResponseAnyOf {
msg: StatusOtp200ResponseAnyOfMsgEnum;
/**
*
* @type {EnableOtp200ResponsePayload}
* @type {StatusOtp200ResponseAnyOfPayload}
* @memberof StatusOtp200ResponseAnyOf
*/
payload: EnableOtp200ResponsePayload;
payload: StatusOtp200ResponseAnyOfPayload;
}
@ -87,7 +87,7 @@ export function StatusOtp200ResponseAnyOfFromJSONTyped(json: any, ignoreDiscrimi
'kind': json['kind'],
'msg': json['msg'],
'payload': EnableOtp200ResponsePayloadFromJSON(json['payload']),
'payload': StatusOtp200ResponseAnyOfPayloadFromJSON(json['payload']),
};
}
@ -104,7 +104,7 @@ export function StatusOtp200ResponseAnyOfToJSONTyped(value?: StatusOtp200Respons
'kind': value['kind'],
'msg': value['msg'],
'payload': EnableOtp200ResponsePayloadToJSON(value['payload']),
'payload': StatusOtp200ResponseAnyOfPayloadToJSON(value['payload']),
};
}

View file

@ -0,0 +1,66 @@
/* tslint:disable */
/* eslint-disable */
/**
* @fastify/swagger
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 9.6.1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { mapValues } from '../runtime';
/**
*
* @export
* @interface StatusOtp200ResponseAnyOfPayload
*/
export interface StatusOtp200ResponseAnyOfPayload {
/**
* The otp secret
* @type {string}
* @memberof StatusOtp200ResponseAnyOfPayload
*/
secret: string;
}
/**
* Check if a given object implements the StatusOtp200ResponseAnyOfPayload interface.
*/
export function instanceOfStatusOtp200ResponseAnyOfPayload(value: object): value is StatusOtp200ResponseAnyOfPayload {
if (!('secret' in value) || value['secret'] === undefined) return false;
return true;
}
export function StatusOtp200ResponseAnyOfPayloadFromJSON(json: any): StatusOtp200ResponseAnyOfPayload {
return StatusOtp200ResponseAnyOfPayloadFromJSONTyped(json, false);
}
export function StatusOtp200ResponseAnyOfPayloadFromJSONTyped(json: any, ignoreDiscriminator: boolean): StatusOtp200ResponseAnyOfPayload {
if (json == null) {
return json;
}
return {
'secret': json['secret'],
};
}
export function StatusOtp200ResponseAnyOfPayloadToJSON(json: any): StatusOtp200ResponseAnyOfPayload {
return StatusOtp200ResponseAnyOfPayloadToJSONTyped(json, false);
}
export function StatusOtp200ResponseAnyOfPayloadToJSONTyped(value?: StatusOtp200ResponseAnyOfPayload | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'secret': value['secret'],
};
}

View file

@ -0,0 +1,93 @@
/* tslint:disable */
/* eslint-disable */
/**
* @fastify/swagger
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 9.6.1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { mapValues } from '../runtime';
/**
*
* @export
* @interface StatusOtp400Response
*/
export interface StatusOtp400Response {
/**
*
* @type {string}
* @memberof StatusOtp400Response
*/
kind: StatusOtp400ResponseKindEnum;
/**
*
* @type {string}
* @memberof StatusOtp400Response
*/
msg: StatusOtp400ResponseMsgEnum;
}
/**
* @export
*/
export const StatusOtp400ResponseKindEnum = {
Failure: 'failure'
} as const;
export type StatusOtp400ResponseKindEnum = typeof StatusOtp400ResponseKindEnum[keyof typeof StatusOtp400ResponseKindEnum];
/**
* @export
*/
export const StatusOtp400ResponseMsgEnum = {
StatusOtpFailureGuest: 'statusOtp.failure.guest'
} as const;
export type StatusOtp400ResponseMsgEnum = typeof StatusOtp400ResponseMsgEnum[keyof typeof StatusOtp400ResponseMsgEnum];
/**
* Check if a given object implements the StatusOtp400Response interface.
*/
export function instanceOfStatusOtp400Response(value: object): value is StatusOtp400Response {
if (!('kind' in value) || value['kind'] === undefined) return false;
if (!('msg' in value) || value['msg'] === undefined) return false;
return true;
}
export function StatusOtp400ResponseFromJSON(json: any): StatusOtp400Response {
return StatusOtp400ResponseFromJSONTyped(json, false);
}
export function StatusOtp400ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): StatusOtp400Response {
if (json == null) {
return json;
}
return {
'kind': json['kind'],
'msg': json['msg'],
};
}
export function StatusOtp400ResponseToJSON(json: any): StatusOtp400Response {
return StatusOtp400ResponseToJSONTyped(json, false);
}
export function StatusOtp400ResponseToJSONTyped(value?: StatusOtp400Response | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'kind': value['kind'],
'msg': value['msg'],
};
}

View file

@ -1,15 +1,19 @@
/* tslint:disable */
/* eslint-disable */
export * from './ChatTest200Response';
export * from './ChatTest200ResponsePayload';
export * from './DisableOtp200Response';
export * from './DisableOtp400Response';
export * from './DisableOtp401Response';
export * from './DisableOtp500Response';
export * from './EnableOtp200Response';
export * from './EnableOtp200ResponsePayload';
export * from './EnableOtp400Response';
export * from './EnableOtp401Response';
export * from './EnableOtp401ResponseAnyOf';
export * from './GetUser200Response';
export * from './GetUser200ResponsePayload';
export * from './GetUser200ResponsePayloadSelfInfo';
export * from './GetUser403Response';
export * from './GetUser404Response';
export * from './GetUserUserParameter';
@ -40,5 +44,6 @@ export * from './Signin500Response';
export * from './StatusOtp200Response';
export * from './StatusOtp200ResponseAnyOf';
export * from './StatusOtp200ResponseAnyOf1';
export * from './StatusOtp200ResponseAnyOfPayload';
export * from './StatusOtp401Response';
export * from './StatusOtp500Response';