diff --git a/frontend/src/api/generated/.openapi-generator-ignore b/frontend/src/api/generated/.openapi-generator-ignore new file mode 100644 index 0000000..7484ee5 --- /dev/null +++ b/frontend/src/api/generated/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/frontend/src/api/generated/.openapi-generator/FILES b/frontend/src/api/generated/.openapi-generator/FILES new file mode 100644 index 0000000..5b2df64 --- /dev/null +++ b/frontend/src/api/generated/.openapi-generator/FILES @@ -0,0 +1,75 @@ +.openapi-generator-ignore +apis/OpenapiOtherApi.ts +apis/index.ts +docs/DisableOtp200Response.md +docs/DisableOtp401Response.md +docs/DisableOtp500Response.md +docs/EnableOtp200Response.md +docs/EnableOtp200ResponsePayload.md +docs/GetUser200Response.md +docs/GetUser200ResponsePayload.md +docs/GetUser403Response.md +docs/GetUser404Response.md +docs/GetUserUserParameter.md +docs/GuestLogin200Response.md +docs/GuestLogin200ResponsePayload.md +docs/GuestLogin500Response.md +docs/Login200Response.md +docs/Login202Response.md +docs/Login202ResponsePayload.md +docs/Login400Response.md +docs/LoginOtp200Response.md +docs/LoginOtp200ResponsePayload.md +docs/LoginOtp400Response.md +docs/LoginOtp401Response.md +docs/LoginOtp408Response.md +docs/LoginOtp500Response.md +docs/LoginOtpRequest.md +docs/LoginRequest.md +docs/Logout200Response.md +docs/OpenapiOtherApi.md +docs/Signin200Response.md +docs/Signin200ResponsePayload.md +docs/Signin400Response.md +docs/Signin500Response.md +docs/StatusOtp200Response.md +docs/StatusOtp200ResponseAnyOf.md +docs/StatusOtp200ResponseAnyOf1.md +docs/StatusOtp500Response.md +index.ts +models/DisableOtp200Response.ts +models/DisableOtp401Response.ts +models/DisableOtp500Response.ts +models/EnableOtp200Response.ts +models/EnableOtp200ResponsePayload.ts +models/GetUser200Response.ts +models/GetUser200ResponsePayload.ts +models/GetUser403Response.ts +models/GetUser404Response.ts +models/GetUserUserParameter.ts +models/GuestLogin200Response.ts +models/GuestLogin200ResponsePayload.ts +models/GuestLogin500Response.ts +models/Login200Response.ts +models/Login202Response.ts +models/Login202ResponsePayload.ts +models/Login400Response.ts +models/LoginOtp200Response.ts +models/LoginOtp200ResponsePayload.ts +models/LoginOtp400Response.ts +models/LoginOtp401Response.ts +models/LoginOtp408Response.ts +models/LoginOtp500Response.ts +models/LoginOtpRequest.ts +models/LoginRequest.ts +models/Logout200Response.ts +models/Signin200Response.ts +models/Signin200ResponsePayload.ts +models/Signin400Response.ts +models/Signin500Response.ts +models/StatusOtp200Response.ts +models/StatusOtp200ResponseAnyOf.ts +models/StatusOtp200ResponseAnyOf1.ts +models/StatusOtp500Response.ts +models/index.ts +runtime.ts diff --git a/frontend/src/api/generated/.openapi-generator/VERSION b/frontend/src/api/generated/.openapi-generator/VERSION new file mode 100644 index 0000000..6328c54 --- /dev/null +++ b/frontend/src/api/generated/.openapi-generator/VERSION @@ -0,0 +1 @@ +7.17.0 diff --git a/frontend/src/api/generated/apis/OpenapiOtherApi.ts b/frontend/src/api/generated/apis/OpenapiOtherApi.ts new file mode 100644 index 0000000..cfeced3 --- /dev/null +++ b/frontend/src/api/generated/apis/OpenapiOtherApi.ts @@ -0,0 +1,569 @@ +/* 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.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + DisableOtp200Response, + DisableOtp401Response, + DisableOtp500Response, + EnableOtp200Response, + GetUser200Response, + GetUser403Response, + GetUser404Response, + GetUserUserParameter, + GuestLogin200Response, + GuestLogin500Response, + Login200Response, + Login202Response, + Login400Response, + LoginOtp200Response, + LoginOtp400Response, + LoginOtp401Response, + LoginOtp408Response, + LoginOtp500Response, + LoginOtpRequest, + LoginRequest, + Logout200Response, + Signin200Response, + Signin400Response, + Signin500Response, + StatusOtp200Response, + StatusOtp500Response, +} from '../models/index'; +import { + DisableOtp200ResponseFromJSON, + DisableOtp200ResponseToJSON, + DisableOtp401ResponseFromJSON, + DisableOtp401ResponseToJSON, + DisableOtp500ResponseFromJSON, + DisableOtp500ResponseToJSON, + EnableOtp200ResponseFromJSON, + EnableOtp200ResponseToJSON, + GetUser200ResponseFromJSON, + GetUser200ResponseToJSON, + GetUser403ResponseFromJSON, + GetUser403ResponseToJSON, + GetUser404ResponseFromJSON, + GetUser404ResponseToJSON, + GetUserUserParameterFromJSON, + GetUserUserParameterToJSON, + GuestLogin200ResponseFromJSON, + GuestLogin200ResponseToJSON, + GuestLogin500ResponseFromJSON, + GuestLogin500ResponseToJSON, + Login200ResponseFromJSON, + Login200ResponseToJSON, + Login202ResponseFromJSON, + Login202ResponseToJSON, + Login400ResponseFromJSON, + Login400ResponseToJSON, + LoginOtp200ResponseFromJSON, + LoginOtp200ResponseToJSON, + LoginOtp400ResponseFromJSON, + LoginOtp400ResponseToJSON, + LoginOtp401ResponseFromJSON, + LoginOtp401ResponseToJSON, + LoginOtp408ResponseFromJSON, + LoginOtp408ResponseToJSON, + LoginOtp500ResponseFromJSON, + LoginOtp500ResponseToJSON, + LoginOtpRequestFromJSON, + LoginOtpRequestToJSON, + LoginRequestFromJSON, + LoginRequestToJSON, + Logout200ResponseFromJSON, + Logout200ResponseToJSON, + Signin200ResponseFromJSON, + Signin200ResponseToJSON, + Signin400ResponseFromJSON, + Signin400ResponseToJSON, + Signin500ResponseFromJSON, + Signin500ResponseToJSON, + StatusOtp200ResponseFromJSON, + StatusOtp200ResponseToJSON, + StatusOtp500ResponseFromJSON, + StatusOtp500ResponseToJSON, +} from '../models/index'; + +export interface GetUserRequest { + user: GetUserUserParameter; +} + +export interface LoginOperationRequest { + loginRequest: LoginRequest; +} + +export interface LoginOtpOperationRequest { + loginOtpRequest: LoginOtpRequest; +} + +export interface SigninRequest { + loginRequest: LoginRequest; +} + +/** + * + */ +export class OpenapiOtherApi extends runtime.BaseAPI { + + /** + */ + async disableOtpRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + + let urlPath = `/api/auth/disableOtp`; + + const response = await this.request({ + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + // CHANGED: Handle all status codes defined in the OpenAPI spec, not just 2xx responses + // This allows typed access to error responses (4xx, 5xx) and other status codes. + // The code routes responses based on the actual HTTP status code and returns + // appropriately typed ApiResponse wrappers for each status code. + if (response.status === 200) { + // Object response for status 200 + return new runtime.JSONApiResponse(response, (jsonValue) => DisableOtp200ResponseFromJSON(jsonValue)); + } + if (response.status === 401) { + // Object response for status 401 + return new runtime.JSONApiResponse(response, (jsonValue) => DisableOtp401ResponseFromJSON(jsonValue)); + } + if (response.status === 500) { + // Object response for status 500 + return new runtime.JSONApiResponse(response, (jsonValue) => DisableOtp500ResponseFromJSON(jsonValue)); + } + // 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`); + } + + /** + */ + async disableOtp(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.disableOtpRaw(initOverrides); + return await response.value(); + } + + /** + */ + async enableOtpRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + + let urlPath = `/api/auth/enableOtp`; + + const response = await this.request({ + path: urlPath, + method: 'PUT', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + // CHANGED: Handle all status codes defined in the OpenAPI spec, not just 2xx responses + // This allows typed access to error responses (4xx, 5xx) and other status codes. + // The code routes responses based on the actual HTTP status code and returns + // appropriately typed ApiResponse wrappers for each status code. + if (response.status === 200) { + // Object response for status 200 + return new runtime.JSONApiResponse(response, (jsonValue) => EnableOtp200ResponseFromJSON(jsonValue)); + } + if (response.status === 401) { + // Object response for status 401 + return new runtime.JSONApiResponse(response, (jsonValue) => DisableOtp401ResponseFromJSON(jsonValue)); + } + // 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`); + } + + /** + */ + async enableOtp(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.enableOtpRaw(initOverrides); + return await response.value(); + } + + /** + */ + async getUserRaw(requestParameters: GetUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['user'] == null) { + throw new runtime.RequiredError( + 'user', + 'Required parameter "user" was null or undefined when calling getUser().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + + let urlPath = `/api/user/info/{user}`; + urlPath = urlPath.replace(`{${"user"}}`, encodeURIComponent(String(requestParameters['user']))); + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + // CHANGED: Handle all status codes defined in the OpenAPI spec, not just 2xx responses + // This allows typed access to error responses (4xx, 5xx) and other status codes. + // The code routes responses based on the actual HTTP status code and returns + // appropriately typed ApiResponse wrappers for each status code. + if (response.status === 200) { + // Object response for status 200 + return new runtime.JSONApiResponse(response, (jsonValue) => GetUser200ResponseFromJSON(jsonValue)); + } + if (response.status === 401) { + // Object response for status 401 + return new runtime.JSONApiResponse(response, (jsonValue) => DisableOtp401ResponseFromJSON(jsonValue)); + } + if (response.status === 403) { + // Object response for status 403 + return new runtime.JSONApiResponse(response, (jsonValue) => GetUser403ResponseFromJSON(jsonValue)); + } + if (response.status === 404) { + // Object response for status 404 + return new runtime.JSONApiResponse(response, (jsonValue) => GetUser404ResponseFromJSON(jsonValue)); + } + // 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, 403, 404`); + } + + /** + */ + async getUser(requestParameters: GetUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.getUserRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + */ + async guestLoginRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + + let urlPath = `/api/auth/guest`; + + const response = await this.request({ + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + // CHANGED: Handle all status codes defined in the OpenAPI spec, not just 2xx responses + // This allows typed access to error responses (4xx, 5xx) and other status codes. + // The code routes responses based on the actual HTTP status code and returns + // appropriately typed ApiResponse wrappers for each status code. + if (response.status === 200) { + // Object response for status 200 + return new runtime.JSONApiResponse(response, (jsonValue) => GuestLogin200ResponseFromJSON(jsonValue)); + } + if (response.status === 500) { + // Object response for status 500 + return new runtime.JSONApiResponse(response, (jsonValue) => GuestLogin500ResponseFromJSON(jsonValue)); + } + // 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, 500`); + } + + /** + */ + async guestLogin(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.guestLoginRaw(initOverrides); + return await response.value(); + } + + /** + */ + async loginRaw(requestParameters: LoginOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['loginRequest'] == null) { + throw new runtime.RequiredError( + 'loginRequest', + 'Required parameter "loginRequest" was null or undefined when calling login().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + + let urlPath = `/api/auth/login`; + + const response = await this.request({ + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: LoginRequestToJSON(requestParameters['loginRequest']), + }, initOverrides); + + // CHANGED: Handle all status codes defined in the OpenAPI spec, not just 2xx responses + // This allows typed access to error responses (4xx, 5xx) and other status codes. + // The code routes responses based on the actual HTTP status code and returns + // appropriately typed ApiResponse wrappers for each status code. + if (response.status === 200) { + // Object response for status 200 + return new runtime.JSONApiResponse(response, (jsonValue) => Login200ResponseFromJSON(jsonValue)); + } + if (response.status === 202) { + // Object response for status 202 + return new runtime.JSONApiResponse(response, (jsonValue) => Login202ResponseFromJSON(jsonValue)); + } + if (response.status === 400) { + // Object response for status 400 + return new runtime.JSONApiResponse(response, (jsonValue) => Login400ResponseFromJSON(jsonValue)); + } + // 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, 202, 400`); + } + + /** + */ + async login(requestParameters: LoginOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.loginRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + */ + async loginOtpRaw(requestParameters: LoginOtpOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['loginOtpRequest'] == null) { + throw new runtime.RequiredError( + 'loginOtpRequest', + 'Required parameter "loginOtpRequest" was null or undefined when calling loginOtp().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + + let urlPath = `/api/auth/otp`; + + const response = await this.request({ + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: LoginOtpRequestToJSON(requestParameters['loginOtpRequest']), + }, initOverrides); + + // CHANGED: Handle all status codes defined in the OpenAPI spec, not just 2xx responses + // This allows typed access to error responses (4xx, 5xx) and other status codes. + // The code routes responses based on the actual HTTP status code and returns + // appropriately typed ApiResponse wrappers for each status code. + if (response.status === 200) { + // Object response for status 200 + return new runtime.JSONApiResponse(response, (jsonValue) => LoginOtp200ResponseFromJSON(jsonValue)); + } + if (response.status === 400) { + // Object response for status 400 + return new runtime.JSONApiResponse(response, (jsonValue) => LoginOtp400ResponseFromJSON(jsonValue)); + } + if (response.status === 401) { + // Object response for status 401 + return new runtime.JSONApiResponse(response, (jsonValue) => LoginOtp401ResponseFromJSON(jsonValue)); + } + if (response.status === 408) { + // Object response for status 408 + return new runtime.JSONApiResponse(response, (jsonValue) => LoginOtp408ResponseFromJSON(jsonValue)); + } + if (response.status === 500) { + // Object response for status 500 + return new runtime.JSONApiResponse(response, (jsonValue) => LoginOtp500ResponseFromJSON(jsonValue)); + } + // 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, 400, 401, 408, 500`); + } + + /** + */ + async loginOtp(requestParameters: LoginOtpOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.loginOtpRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + */ + async logoutRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + + let urlPath = `/api/auth/logout`; + + const response = await this.request({ + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + // CHANGED: Handle all status codes defined in the OpenAPI spec, not just 2xx responses + // This allows typed access to error responses (4xx, 5xx) and other status codes. + // The code routes responses based on the actual HTTP status code and returns + // appropriately typed ApiResponse wrappers for each status code. + if (response.status === 200) { + // Object response for status 200 + return new runtime.JSONApiResponse(response, (jsonValue) => Logout200ResponseFromJSON(jsonValue)); + } + // 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`); + } + + /** + */ + async logout(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.logoutRaw(initOverrides); + return await response.value(); + } + + /** + */ + async signinRaw(requestParameters: SigninRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['loginRequest'] == null) { + throw new runtime.RequiredError( + 'loginRequest', + 'Required parameter "loginRequest" was null or undefined when calling signin().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + + let urlPath = `/api/auth/signin`; + + const response = await this.request({ + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: LoginRequestToJSON(requestParameters['loginRequest']), + }, initOverrides); + + // CHANGED: Handle all status codes defined in the OpenAPI spec, not just 2xx responses + // This allows typed access to error responses (4xx, 5xx) and other status codes. + // The code routes responses based on the actual HTTP status code and returns + // appropriately typed ApiResponse wrappers for each status code. + if (response.status === 200) { + // Object response for status 200 + return new runtime.JSONApiResponse(response, (jsonValue) => Signin200ResponseFromJSON(jsonValue)); + } + if (response.status === 400) { + // Object response for status 400 + return new runtime.JSONApiResponse(response, (jsonValue) => Signin400ResponseFromJSON(jsonValue)); + } + if (response.status === 500) { + // Object response for status 500 + return new runtime.JSONApiResponse(response, (jsonValue) => Signin500ResponseFromJSON(jsonValue)); + } + // 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, 400, 500`); + } + + /** + */ + async signin(requestParameters: SigninRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.signinRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + */ + async statusOtpRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + + let urlPath = `/api/auth/statusOtp`; + + const response = await this.request({ + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + // CHANGED: Handle all status codes defined in the OpenAPI spec, not just 2xx responses + // This allows typed access to error responses (4xx, 5xx) and other status codes. + // The code routes responses based on the actual HTTP status code and returns + // appropriately typed ApiResponse wrappers for each status code. + if (response.status === 200) { + // Object response for status 200 + return new runtime.JSONApiResponse(response, (jsonValue) => StatusOtp200ResponseFromJSON(jsonValue)); + } + if (response.status === 401) { + // Object response for status 401 + return new runtime.JSONApiResponse(response, (jsonValue) => DisableOtp401ResponseFromJSON(jsonValue)); + } + if (response.status === 500) { + // Object response for status 500 + return new runtime.JSONApiResponse(response, (jsonValue) => StatusOtp500ResponseFromJSON(jsonValue)); + } + // 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`); + } + + /** + */ + async statusOtp(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.statusOtpRaw(initOverrides); + return await response.value(); + } + +} diff --git a/frontend/src/api/generated/apis/index.ts b/frontend/src/api/generated/apis/index.ts new file mode 100644 index 0000000..3eb6de1 --- /dev/null +++ b/frontend/src/api/generated/apis/index.ts @@ -0,0 +1,3 @@ +/* tslint:disable */ +/* eslint-disable */ +export * from './OpenapiOtherApi'; diff --git a/frontend/src/api/generated/docs/DisableOtp200Response.md b/frontend/src/api/generated/docs/DisableOtp200Response.md new file mode 100644 index 0000000..f7e5c28 --- /dev/null +++ b/frontend/src/api/generated/docs/DisableOtp200Response.md @@ -0,0 +1,36 @@ + +# DisableOtp200Response + + +## Properties + +Name | Type +------------ | ------------- +`kind` | string +`msg` | string + +## Example + +```typescript +import type { DisableOtp200Response } from '' + +// TODO: Update the object below with actual values +const example = { + "kind": null, + "msg": null, +} satisfies DisableOtp200Response + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as DisableOtp200Response +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/frontend/src/api/generated/docs/DisableOtp401Response.md b/frontend/src/api/generated/docs/DisableOtp401Response.md new file mode 100644 index 0000000..8f9d6f7 --- /dev/null +++ b/frontend/src/api/generated/docs/DisableOtp401Response.md @@ -0,0 +1,36 @@ + +# DisableOtp401Response + + +## Properties + +Name | Type +------------ | ------------- +`kind` | string +`msg` | string + +## Example + +```typescript +import type { DisableOtp401Response } from '' + +// TODO: Update the object below with actual values +const example = { + "kind": null, + "msg": null, +} satisfies DisableOtp401Response + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as DisableOtp401Response +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/frontend/src/api/generated/docs/DisableOtp500Response.md b/frontend/src/api/generated/docs/DisableOtp500Response.md new file mode 100644 index 0000000..1fc0faa --- /dev/null +++ b/frontend/src/api/generated/docs/DisableOtp500Response.md @@ -0,0 +1,36 @@ + +# DisableOtp500Response + + +## Properties + +Name | Type +------------ | ------------- +`kind` | string +`msg` | string + +## Example + +```typescript +import type { DisableOtp500Response } from '' + +// TODO: Update the object below with actual values +const example = { + "kind": null, + "msg": null, +} satisfies DisableOtp500Response + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as DisableOtp500Response +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/frontend/src/api/generated/docs/EnableOtp200Response.md b/frontend/src/api/generated/docs/EnableOtp200Response.md new file mode 100644 index 0000000..492f81b --- /dev/null +++ b/frontend/src/api/generated/docs/EnableOtp200Response.md @@ -0,0 +1,38 @@ + +# EnableOtp200Response + + +## Properties + +Name | Type +------------ | ------------- +`kind` | string +`msg` | string +`payload` | [EnableOtp200ResponsePayload](EnableOtp200ResponsePayload.md) + +## Example + +```typescript +import type { EnableOtp200Response } from '' + +// TODO: Update the object below with actual values +const example = { + "kind": null, + "msg": null, + "payload": null, +} satisfies EnableOtp200Response + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as EnableOtp200Response +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/frontend/src/api/generated/docs/EnableOtp200ResponsePayload.md b/frontend/src/api/generated/docs/EnableOtp200ResponsePayload.md new file mode 100644 index 0000000..f6b3cb9 --- /dev/null +++ b/frontend/src/api/generated/docs/EnableOtp200ResponsePayload.md @@ -0,0 +1,34 @@ + +# EnableOtp200ResponsePayload + + +## Properties + +Name | Type +------------ | ------------- +`url` | string + +## Example + +```typescript +import type { EnableOtp200ResponsePayload } from '' + +// TODO: Update the object below with actual values +const example = { + "url": null, +} satisfies EnableOtp200ResponsePayload + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as EnableOtp200ResponsePayload +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/frontend/src/api/generated/docs/GetUser200Response.md b/frontend/src/api/generated/docs/GetUser200Response.md new file mode 100644 index 0000000..ec7f735 --- /dev/null +++ b/frontend/src/api/generated/docs/GetUser200Response.md @@ -0,0 +1,38 @@ + +# GetUser200Response + + +## Properties + +Name | Type +------------ | ------------- +`kind` | string +`msg` | string +`payload` | [GetUser200ResponsePayload](GetUser200ResponsePayload.md) + +## Example + +```typescript +import type { GetUser200Response } from '' + +// TODO: Update the object below with actual values +const example = { + "kind": null, + "msg": null, + "payload": null, +} satisfies GetUser200Response + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as GetUser200Response +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/frontend/src/api/generated/docs/GetUser200ResponsePayload.md b/frontend/src/api/generated/docs/GetUser200ResponsePayload.md new file mode 100644 index 0000000..14f8e0a --- /dev/null +++ b/frontend/src/api/generated/docs/GetUser200ResponsePayload.md @@ -0,0 +1,38 @@ + +# GetUser200ResponsePayload + + +## Properties + +Name | Type +------------ | ------------- +`name` | string +`id` | string +`guest` | boolean + +## Example + +```typescript +import type { GetUser200ResponsePayload } from '' + +// TODO: Update the object below with actual values +const example = { + "name": null, + "id": null, + "guest": null, +} satisfies GetUser200ResponsePayload + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as GetUser200ResponsePayload +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/frontend/src/api/generated/docs/GetUser403Response.md b/frontend/src/api/generated/docs/GetUser403Response.md new file mode 100644 index 0000000..c8ed907 --- /dev/null +++ b/frontend/src/api/generated/docs/GetUser403Response.md @@ -0,0 +1,36 @@ + +# GetUser403Response + + +## Properties + +Name | Type +------------ | ------------- +`kind` | string +`msg` | string + +## Example + +```typescript +import type { GetUser403Response } from '' + +// TODO: Update the object below with actual values +const example = { + "kind": null, + "msg": null, +} satisfies GetUser403Response + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as GetUser403Response +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/frontend/src/api/generated/docs/GetUser404Response.md b/frontend/src/api/generated/docs/GetUser404Response.md new file mode 100644 index 0000000..7d688b8 --- /dev/null +++ b/frontend/src/api/generated/docs/GetUser404Response.md @@ -0,0 +1,36 @@ + +# GetUser404Response + + +## Properties + +Name | Type +------------ | ------------- +`kind` | string +`msg` | string + +## Example + +```typescript +import type { GetUser404Response } from '' + +// TODO: Update the object below with actual values +const example = { + "kind": null, + "msg": null, +} satisfies GetUser404Response + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as GetUser404Response +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/frontend/src/api/generated/docs/GetUserUserParameter.md b/frontend/src/api/generated/docs/GetUserUserParameter.md new file mode 100644 index 0000000..3334a26 --- /dev/null +++ b/frontend/src/api/generated/docs/GetUserUserParameter.md @@ -0,0 +1,32 @@ + +# GetUserUserParameter + + +## Properties + +Name | Type +------------ | ------------- + +## Example + +```typescript +import type { GetUserUserParameter } from '' + +// TODO: Update the object below with actual values +const example = { +} satisfies GetUserUserParameter + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as GetUserUserParameter +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/frontend/src/api/generated/docs/GuestLogin200Response.md b/frontend/src/api/generated/docs/GuestLogin200Response.md new file mode 100644 index 0000000..7c62290 --- /dev/null +++ b/frontend/src/api/generated/docs/GuestLogin200Response.md @@ -0,0 +1,38 @@ + +# GuestLogin200Response + + +## Properties + +Name | Type +------------ | ------------- +`kind` | string +`msg` | string +`payload` | [GuestLogin200ResponsePayload](GuestLogin200ResponsePayload.md) + +## Example + +```typescript +import type { GuestLogin200Response } from '' + +// TODO: Update the object below with actual values +const example = { + "kind": null, + "msg": null, + "payload": null, +} satisfies GuestLogin200Response + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as GuestLogin200Response +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/frontend/src/api/generated/docs/GuestLogin200ResponsePayload.md b/frontend/src/api/generated/docs/GuestLogin200ResponsePayload.md new file mode 100644 index 0000000..8397890 --- /dev/null +++ b/frontend/src/api/generated/docs/GuestLogin200ResponsePayload.md @@ -0,0 +1,34 @@ + +# GuestLogin200ResponsePayload + + +## Properties + +Name | Type +------------ | ------------- +`token` | string + +## Example + +```typescript +import type { GuestLogin200ResponsePayload } from '' + +// TODO: Update the object below with actual values +const example = { + "token": null, +} satisfies GuestLogin200ResponsePayload + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as GuestLogin200ResponsePayload +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/frontend/src/api/generated/docs/GuestLogin500Response.md b/frontend/src/api/generated/docs/GuestLogin500Response.md new file mode 100644 index 0000000..fa9a463 --- /dev/null +++ b/frontend/src/api/generated/docs/GuestLogin500Response.md @@ -0,0 +1,36 @@ + +# GuestLogin500Response + + +## Properties + +Name | Type +------------ | ------------- +`kind` | string +`msg` | string + +## Example + +```typescript +import type { GuestLogin500Response } from '' + +// TODO: Update the object below with actual values +const example = { + "kind": null, + "msg": null, +} satisfies GuestLogin500Response + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as GuestLogin500Response +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/frontend/src/api/generated/docs/Login200Response.md b/frontend/src/api/generated/docs/Login200Response.md new file mode 100644 index 0000000..4a931d2 --- /dev/null +++ b/frontend/src/api/generated/docs/Login200Response.md @@ -0,0 +1,38 @@ + +# Login200Response + + +## Properties + +Name | Type +------------ | ------------- +`kind` | string +`msg` | string +`payload` | [GuestLogin200ResponsePayload](GuestLogin200ResponsePayload.md) + +## Example + +```typescript +import type { Login200Response } from '' + +// TODO: Update the object below with actual values +const example = { + "kind": null, + "msg": null, + "payload": null, +} satisfies Login200Response + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as Login200Response +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/frontend/src/api/generated/docs/Login202Response.md b/frontend/src/api/generated/docs/Login202Response.md new file mode 100644 index 0000000..ad59bee --- /dev/null +++ b/frontend/src/api/generated/docs/Login202Response.md @@ -0,0 +1,38 @@ + +# Login202Response + + +## Properties + +Name | Type +------------ | ------------- +`kind` | string +`msg` | string +`payload` | [Login202ResponsePayload](Login202ResponsePayload.md) + +## Example + +```typescript +import type { Login202Response } from '' + +// TODO: Update the object below with actual values +const example = { + "kind": null, + "msg": null, + "payload": null, +} satisfies Login202Response + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as Login202Response +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/frontend/src/api/generated/docs/Login202ResponsePayload.md b/frontend/src/api/generated/docs/Login202ResponsePayload.md new file mode 100644 index 0000000..2c95cd2 --- /dev/null +++ b/frontend/src/api/generated/docs/Login202ResponsePayload.md @@ -0,0 +1,34 @@ + +# Login202ResponsePayload + + +## Properties + +Name | Type +------------ | ------------- +`token` | string + +## Example + +```typescript +import type { Login202ResponsePayload } from '' + +// TODO: Update the object below with actual values +const example = { + "token": null, +} satisfies Login202ResponsePayload + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as Login202ResponsePayload +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/frontend/src/api/generated/docs/Login400Response.md b/frontend/src/api/generated/docs/Login400Response.md new file mode 100644 index 0000000..4595637 --- /dev/null +++ b/frontend/src/api/generated/docs/Login400Response.md @@ -0,0 +1,36 @@ + +# Login400Response + + +## Properties + +Name | Type +------------ | ------------- +`kind` | string +`msg` | string + +## Example + +```typescript +import type { Login400Response } from '' + +// TODO: Update the object below with actual values +const example = { + "kind": null, + "msg": null, +} satisfies Login400Response + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as Login400Response +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/frontend/src/api/generated/docs/LoginOtp200Response.md b/frontend/src/api/generated/docs/LoginOtp200Response.md new file mode 100644 index 0000000..e17d4a1 --- /dev/null +++ b/frontend/src/api/generated/docs/LoginOtp200Response.md @@ -0,0 +1,38 @@ + +# LoginOtp200Response + + +## Properties + +Name | Type +------------ | ------------- +`kind` | string +`msg` | string +`payload` | [LoginOtp200ResponsePayload](LoginOtp200ResponsePayload.md) + +## Example + +```typescript +import type { LoginOtp200Response } from '' + +// TODO: Update the object below with actual values +const example = { + "kind": null, + "msg": null, + "payload": null, +} satisfies LoginOtp200Response + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as LoginOtp200Response +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/frontend/src/api/generated/docs/LoginOtp200ResponsePayload.md b/frontend/src/api/generated/docs/LoginOtp200ResponsePayload.md new file mode 100644 index 0000000..d981a2e --- /dev/null +++ b/frontend/src/api/generated/docs/LoginOtp200ResponsePayload.md @@ -0,0 +1,34 @@ + +# LoginOtp200ResponsePayload + + +## Properties + +Name | Type +------------ | ------------- +`token` | string + +## Example + +```typescript +import type { LoginOtp200ResponsePayload } from '' + +// TODO: Update the object below with actual values +const example = { + "token": null, +} satisfies LoginOtp200ResponsePayload + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as LoginOtp200ResponsePayload +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/frontend/src/api/generated/docs/LoginOtp400Response.md b/frontend/src/api/generated/docs/LoginOtp400Response.md new file mode 100644 index 0000000..cd036aa --- /dev/null +++ b/frontend/src/api/generated/docs/LoginOtp400Response.md @@ -0,0 +1,36 @@ + +# LoginOtp400Response + + +## Properties + +Name | Type +------------ | ------------- +`kind` | string +`msg` | string + +## Example + +```typescript +import type { LoginOtp400Response } from '' + +// TODO: Update the object below with actual values +const example = { + "kind": null, + "msg": null, +} satisfies LoginOtp400Response + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as LoginOtp400Response +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/frontend/src/api/generated/docs/LoginOtp401Response.md b/frontend/src/api/generated/docs/LoginOtp401Response.md new file mode 100644 index 0000000..5e91828 --- /dev/null +++ b/frontend/src/api/generated/docs/LoginOtp401Response.md @@ -0,0 +1,36 @@ + +# LoginOtp401Response + + +## Properties + +Name | Type +------------ | ------------- +`kind` | string +`msg` | string + +## Example + +```typescript +import type { LoginOtp401Response } from '' + +// TODO: Update the object below with actual values +const example = { + "kind": null, + "msg": null, +} satisfies LoginOtp401Response + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as LoginOtp401Response +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/frontend/src/api/generated/docs/LoginOtp408Response.md b/frontend/src/api/generated/docs/LoginOtp408Response.md new file mode 100644 index 0000000..7fde287 --- /dev/null +++ b/frontend/src/api/generated/docs/LoginOtp408Response.md @@ -0,0 +1,36 @@ + +# LoginOtp408Response + + +## Properties + +Name | Type +------------ | ------------- +`kind` | string +`msg` | string + +## Example + +```typescript +import type { LoginOtp408Response } from '' + +// TODO: Update the object below with actual values +const example = { + "kind": null, + "msg": null, +} satisfies LoginOtp408Response + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as LoginOtp408Response +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/frontend/src/api/generated/docs/LoginOtp500Response.md b/frontend/src/api/generated/docs/LoginOtp500Response.md new file mode 100644 index 0000000..cc7ff11 --- /dev/null +++ b/frontend/src/api/generated/docs/LoginOtp500Response.md @@ -0,0 +1,36 @@ + +# LoginOtp500Response + + +## Properties + +Name | Type +------------ | ------------- +`kind` | string +`msg` | string + +## Example + +```typescript +import type { LoginOtp500Response } from '' + +// TODO: Update the object below with actual values +const example = { + "kind": null, + "msg": null, +} satisfies LoginOtp500Response + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as LoginOtp500Response +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/frontend/src/api/generated/docs/LoginOtpRequest.md b/frontend/src/api/generated/docs/LoginOtpRequest.md new file mode 100644 index 0000000..b4bcb7a --- /dev/null +++ b/frontend/src/api/generated/docs/LoginOtpRequest.md @@ -0,0 +1,36 @@ + +# LoginOtpRequest + + +## Properties + +Name | Type +------------ | ------------- +`token` | string +`code` | string + +## Example + +```typescript +import type { LoginOtpRequest } from '' + +// TODO: Update the object below with actual values +const example = { + "token": null, + "code": null, +} satisfies LoginOtpRequest + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as LoginOtpRequest +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/frontend/src/api/generated/docs/LoginRequest.md b/frontend/src/api/generated/docs/LoginRequest.md new file mode 100644 index 0000000..aede8a6 --- /dev/null +++ b/frontend/src/api/generated/docs/LoginRequest.md @@ -0,0 +1,36 @@ + +# LoginRequest + + +## Properties + +Name | Type +------------ | ------------- +`name` | string +`password` | string + +## Example + +```typescript +import type { LoginRequest } from '' + +// TODO: Update the object below with actual values +const example = { + "name": null, + "password": null, +} satisfies LoginRequest + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as LoginRequest +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/frontend/src/api/generated/docs/Logout200Response.md b/frontend/src/api/generated/docs/Logout200Response.md new file mode 100644 index 0000000..b08cc41 --- /dev/null +++ b/frontend/src/api/generated/docs/Logout200Response.md @@ -0,0 +1,36 @@ + +# Logout200Response + + +## Properties + +Name | Type +------------ | ------------- +`kind` | string +`msg` | string + +## Example + +```typescript +import type { Logout200Response } from '' + +// TODO: Update the object below with actual values +const example = { + "kind": null, + "msg": null, +} satisfies Logout200Response + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as Logout200Response +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/frontend/src/api/generated/docs/OpenapiOtherApi.md b/frontend/src/api/generated/docs/OpenapiOtherApi.md new file mode 100644 index 0000000..c1c0d1c --- /dev/null +++ b/frontend/src/api/generated/docs/OpenapiOtherApi.md @@ -0,0 +1,579 @@ +# OpenapiOtherApi + +All URIs are relative to *https://local.maix.me:8888* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**disableOtp**](OpenapiOtherApi.md#disableotp) | **PUT** /api/auth/disableOtp | | +| [**enableOtp**](OpenapiOtherApi.md#enableotp) | **PUT** /api/auth/enableOtp | | +| [**getUser**](OpenapiOtherApi.md#getuser) | **GET** /api/user/info/{user} | | +| [**guestLogin**](OpenapiOtherApi.md#guestlogin) | **POST** /api/auth/guest | | +| [**login**](OpenapiOtherApi.md#loginoperation) | **POST** /api/auth/login | | +| [**loginOtp**](OpenapiOtherApi.md#loginotpoperation) | **POST** /api/auth/otp | | +| [**logout**](OpenapiOtherApi.md#logout) | **POST** /api/auth/logout | | +| [**signin**](OpenapiOtherApi.md#signin) | **POST** /api/auth/signin | | +| [**statusOtp**](OpenapiOtherApi.md#statusotp) | **GET** /api/auth/statusOtp | | + + + +## disableOtp + +> DisableOtp200Response disableOtp() + + + +### Example + +```ts +import { + Configuration, + OpenapiOtherApi, +} from ''; +import type { DisableOtpRequest } from ''; + +async function example() { + console.log("🚀 Testing SDK..."); + const api = new OpenapiOtherApi(); + + try { + const data = await api.disableOtp(); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**DisableOtp200Response**](DisableOtp200Response.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Default Response | - | +| **401** | Default Response | - | +| **500** | Default Response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## enableOtp + +> EnableOtp200Response enableOtp() + + + +### Example + +```ts +import { + Configuration, + OpenapiOtherApi, +} from ''; +import type { EnableOtpRequest } from ''; + +async function example() { + console.log("🚀 Testing SDK..."); + const api = new OpenapiOtherApi(); + + try { + const data = await api.enableOtp(); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**EnableOtp200Response**](EnableOtp200Response.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Default Response | - | +| **401** | Default Response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## getUser + +> GetUser200Response getUser(user) + + + +### Example + +```ts +import { + Configuration, + OpenapiOtherApi, +} from ''; +import type { GetUserRequest } from ''; + +async function example() { + console.log("🚀 Testing SDK..."); + const api = new OpenapiOtherApi(); + + const body = { + // GetUserUserParameter + user: ..., + } satisfies GetUserRequest; + + try { + const data = await api.getUser(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **user** | [](.md) | | [Defaults to `undefined`] | + +### Return type + +[**GetUser200Response**](GetUser200Response.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Default Response | - | +| **401** | Default Response | - | +| **403** | Default Response | - | +| **404** | Default Response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## guestLogin + +> GuestLogin200Response guestLogin() + + + +### Example + +```ts +import { + Configuration, + OpenapiOtherApi, +} from ''; +import type { GuestLoginRequest } from ''; + +async function example() { + console.log("🚀 Testing SDK..."); + const api = new OpenapiOtherApi(); + + try { + const data = await api.guestLogin(); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**GuestLogin200Response**](GuestLogin200Response.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Default Response | - | +| **500** | Default Response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## login + +> Login200Response login(loginRequest) + + + +### Example + +```ts +import { + Configuration, + OpenapiOtherApi, +} from ''; +import type { LoginOperationRequest } from ''; + +async function example() { + console.log("🚀 Testing SDK..."); + const api = new OpenapiOtherApi(); + + const body = { + // LoginRequest + loginRequest: ..., + } satisfies LoginOperationRequest; + + try { + const data = await api.login(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **loginRequest** | [LoginRequest](LoginRequest.md) | | | + +### Return type + +[**Login200Response**](Login200Response.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: `application/json` +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Default Response | - | +| **202** | Default Response | - | +| **400** | Default Response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## loginOtp + +> LoginOtp200Response loginOtp(loginOtpRequest) + + + +### Example + +```ts +import { + Configuration, + OpenapiOtherApi, +} from ''; +import type { LoginOtpOperationRequest } from ''; + +async function example() { + console.log("🚀 Testing SDK..."); + const api = new OpenapiOtherApi(); + + const body = { + // LoginOtpRequest + loginOtpRequest: ..., + } satisfies LoginOtpOperationRequest; + + try { + const data = await api.loginOtp(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **loginOtpRequest** | [LoginOtpRequest](LoginOtpRequest.md) | | | + +### Return type + +[**LoginOtp200Response**](LoginOtp200Response.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: `application/json` +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Default Response | - | +| **400** | Default Response | - | +| **401** | Default Response | - | +| **408** | Default Response | - | +| **500** | Default Response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## logout + +> Logout200Response logout() + + + +### Example + +```ts +import { + Configuration, + OpenapiOtherApi, +} from ''; +import type { LogoutRequest } from ''; + +async function example() { + console.log("🚀 Testing SDK..."); + const api = new OpenapiOtherApi(); + + try { + const data = await api.logout(); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**Logout200Response**](Logout200Response.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Default Response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## signin + +> Signin200Response signin(loginRequest) + + + +### Example + +```ts +import { + Configuration, + OpenapiOtherApi, +} from ''; +import type { SigninRequest } from ''; + +async function example() { + console.log("🚀 Testing SDK..."); + const api = new OpenapiOtherApi(); + + const body = { + // LoginRequest + loginRequest: ..., + } satisfies SigninRequest; + + try { + const data = await api.signin(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **loginRequest** | [LoginRequest](LoginRequest.md) | | | + +### Return type + +[**Signin200Response**](Signin200Response.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: `application/json` +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Default Response | - | +| **400** | Default Response | - | +| **500** | Default Response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## statusOtp + +> StatusOtp200Response statusOtp() + + + +### Example + +```ts +import { + Configuration, + OpenapiOtherApi, +} from ''; +import type { StatusOtpRequest } from ''; + +async function example() { + console.log("🚀 Testing SDK..."); + const api = new OpenapiOtherApi(); + + try { + const data = await api.statusOtp(); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**StatusOtp200Response**](StatusOtp200Response.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Default Response | - | +| **401** | Default Response | - | +| **500** | Default Response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + diff --git a/frontend/src/api/generated/docs/Signin200Response.md b/frontend/src/api/generated/docs/Signin200Response.md new file mode 100644 index 0000000..318dc26 --- /dev/null +++ b/frontend/src/api/generated/docs/Signin200Response.md @@ -0,0 +1,38 @@ + +# Signin200Response + + +## Properties + +Name | Type +------------ | ------------- +`kind` | string +`msg` | string +`payload` | [Signin200ResponsePayload](Signin200ResponsePayload.md) + +## Example + +```typescript +import type { Signin200Response } from '' + +// TODO: Update the object below with actual values +const example = { + "kind": null, + "msg": null, + "payload": null, +} satisfies Signin200Response + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as Signin200Response +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/frontend/src/api/generated/docs/Signin200ResponsePayload.md b/frontend/src/api/generated/docs/Signin200ResponsePayload.md new file mode 100644 index 0000000..69c14a8 --- /dev/null +++ b/frontend/src/api/generated/docs/Signin200ResponsePayload.md @@ -0,0 +1,34 @@ + +# Signin200ResponsePayload + + +## Properties + +Name | Type +------------ | ------------- +`token` | string + +## Example + +```typescript +import type { Signin200ResponsePayload } from '' + +// TODO: Update the object below with actual values +const example = { + "token": null, +} satisfies Signin200ResponsePayload + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as Signin200ResponsePayload +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/frontend/src/api/generated/docs/Signin400Response.md b/frontend/src/api/generated/docs/Signin400Response.md new file mode 100644 index 0000000..5f6e0c4 --- /dev/null +++ b/frontend/src/api/generated/docs/Signin400Response.md @@ -0,0 +1,36 @@ + +# Signin400Response + + +## Properties + +Name | Type +------------ | ------------- +`kind` | string +`msg` | string + +## Example + +```typescript +import type { Signin400Response } from '' + +// TODO: Update the object below with actual values +const example = { + "kind": null, + "msg": null, +} satisfies Signin400Response + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as Signin400Response +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/frontend/src/api/generated/docs/Signin500Response.md b/frontend/src/api/generated/docs/Signin500Response.md new file mode 100644 index 0000000..f500de9 --- /dev/null +++ b/frontend/src/api/generated/docs/Signin500Response.md @@ -0,0 +1,36 @@ + +# Signin500Response + + +## Properties + +Name | Type +------------ | ------------- +`kind` | string +`msg` | string + +## Example + +```typescript +import type { Signin500Response } from '' + +// TODO: Update the object below with actual values +const example = { + "kind": null, + "msg": null, +} satisfies Signin500Response + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as Signin500Response +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/frontend/src/api/generated/docs/StatusOtp200Response.md b/frontend/src/api/generated/docs/StatusOtp200Response.md new file mode 100644 index 0000000..8abfef2 --- /dev/null +++ b/frontend/src/api/generated/docs/StatusOtp200Response.md @@ -0,0 +1,38 @@ + +# StatusOtp200Response + + +## Properties + +Name | Type +------------ | ------------- +`kind` | string +`msg` | string +`payload` | [EnableOtp200ResponsePayload](EnableOtp200ResponsePayload.md) + +## Example + +```typescript +import type { StatusOtp200Response } from '' + +// TODO: Update the object below with actual values +const example = { + "kind": null, + "msg": null, + "payload": null, +} satisfies StatusOtp200Response + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as StatusOtp200Response +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/frontend/src/api/generated/docs/StatusOtp200ResponseAnyOf.md b/frontend/src/api/generated/docs/StatusOtp200ResponseAnyOf.md new file mode 100644 index 0000000..a1ec9d2 --- /dev/null +++ b/frontend/src/api/generated/docs/StatusOtp200ResponseAnyOf.md @@ -0,0 +1,38 @@ + +# StatusOtp200ResponseAnyOf + + +## Properties + +Name | Type +------------ | ------------- +`kind` | string +`msg` | string +`payload` | [EnableOtp200ResponsePayload](EnableOtp200ResponsePayload.md) + +## Example + +```typescript +import type { StatusOtp200ResponseAnyOf } from '' + +// TODO: Update the object below with actual values +const example = { + "kind": null, + "msg": null, + "payload": null, +} satisfies StatusOtp200ResponseAnyOf + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as StatusOtp200ResponseAnyOf +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/frontend/src/api/generated/docs/StatusOtp200ResponseAnyOf1.md b/frontend/src/api/generated/docs/StatusOtp200ResponseAnyOf1.md new file mode 100644 index 0000000..b84baf1 --- /dev/null +++ b/frontend/src/api/generated/docs/StatusOtp200ResponseAnyOf1.md @@ -0,0 +1,36 @@ + +# StatusOtp200ResponseAnyOf1 + + +## Properties + +Name | Type +------------ | ------------- +`kind` | string +`msg` | string + +## Example + +```typescript +import type { StatusOtp200ResponseAnyOf1 } from '' + +// TODO: Update the object below with actual values +const example = { + "kind": null, + "msg": null, +} satisfies StatusOtp200ResponseAnyOf1 + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as StatusOtp200ResponseAnyOf1 +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/frontend/src/api/generated/docs/StatusOtp500Response.md b/frontend/src/api/generated/docs/StatusOtp500Response.md new file mode 100644 index 0000000..957522a --- /dev/null +++ b/frontend/src/api/generated/docs/StatusOtp500Response.md @@ -0,0 +1,36 @@ + +# StatusOtp500Response + + +## Properties + +Name | Type +------------ | ------------- +`kind` | string +`msg` | string + +## Example + +```typescript +import type { StatusOtp500Response } from '' + +// TODO: Update the object below with actual values +const example = { + "kind": null, + "msg": null, +} satisfies StatusOtp500Response + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as StatusOtp500Response +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + diff --git a/frontend/src/api/generated/index.ts b/frontend/src/api/generated/index.ts new file mode 100644 index 0000000..bebe8bb --- /dev/null +++ b/frontend/src/api/generated/index.ts @@ -0,0 +1,5 @@ +/* tslint:disable */ +/* eslint-disable */ +export * from './runtime'; +export * from './apis/index'; +export * from './models/index'; diff --git a/frontend/src/api/generated/models/DisableOtp200Response.ts b/frontend/src/api/generated/models/DisableOtp200Response.ts new file mode 100644 index 0000000..c343f29 --- /dev/null +++ b/frontend/src/api/generated/models/DisableOtp200Response.ts @@ -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.0 + * + * + * 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 DisableOtp200Response + */ +export interface DisableOtp200Response { + /** + * + * @type {string} + * @memberof DisableOtp200Response + */ + kind: DisableOtp200ResponseKindEnum; + /** + * + * @type {string} + * @memberof DisableOtp200Response + */ + msg: DisableOtp200ResponseMsgEnum; +} + + +/** + * @export + */ +export const DisableOtp200ResponseKindEnum = { + Success: 'success' +} as const; +export type DisableOtp200ResponseKindEnum = typeof DisableOtp200ResponseKindEnum[keyof typeof DisableOtp200ResponseKindEnum]; + +/** + * @export + */ +export const DisableOtp200ResponseMsgEnum = { + DisableOtpSuccess: 'disableOtp.success' +} as const; +export type DisableOtp200ResponseMsgEnum = typeof DisableOtp200ResponseMsgEnum[keyof typeof DisableOtp200ResponseMsgEnum]; + + +/** + * Check if a given object implements the DisableOtp200Response interface. + */ +export function instanceOfDisableOtp200Response(value: object): value is DisableOtp200Response { + if (!('kind' in value) || value['kind'] === undefined) return false; + if (!('msg' in value) || value['msg'] === undefined) return false; + return true; +} + +export function DisableOtp200ResponseFromJSON(json: any): DisableOtp200Response { + return DisableOtp200ResponseFromJSONTyped(json, false); +} + +export function DisableOtp200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): DisableOtp200Response { + if (json == null) { + return json; + } + return { + + 'kind': json['kind'], + 'msg': json['msg'], + }; +} + +export function DisableOtp200ResponseToJSON(json: any): DisableOtp200Response { + return DisableOtp200ResponseToJSONTyped(json, false); +} + +export function DisableOtp200ResponseToJSONTyped(value?: DisableOtp200Response | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'kind': value['kind'], + 'msg': value['msg'], + }; +} + diff --git a/frontend/src/api/generated/models/DisableOtp401Response.ts b/frontend/src/api/generated/models/DisableOtp401Response.ts new file mode 100644 index 0000000..8846494 --- /dev/null +++ b/frontend/src/api/generated/models/DisableOtp401Response.ts @@ -0,0 +1,96 @@ +/* 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.0 + * + * + * 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 DisableOtp401Response + */ +export interface DisableOtp401Response { + /** + * + * @type {string} + * @memberof DisableOtp401Response + */ + kind: DisableOtp401ResponseKindEnum; + /** + * + * @type {string} + * @memberof DisableOtp401Response + */ + msg: DisableOtp401ResponseMsgEnum; +} + + +/** + * @export + */ +export const DisableOtp401ResponseKindEnum = { + NotLoggedIn: 'notLoggedIn' +} as const; +export type DisableOtp401ResponseKindEnum = typeof DisableOtp401ResponseKindEnum[keyof typeof DisableOtp401ResponseKindEnum]; + +/** + * @export + */ +export const DisableOtp401ResponseMsgEnum = { + AuthNoCookie: 'auth.noCookie', + AuthInvalidKind: 'auth.invalidKind', + AuthNoUser: 'auth.noUser', + AuthInvalid: 'auth.invalid' +} as const; +export type DisableOtp401ResponseMsgEnum = typeof DisableOtp401ResponseMsgEnum[keyof typeof DisableOtp401ResponseMsgEnum]; + + +/** + * Check if a given object implements the DisableOtp401Response interface. + */ +export function instanceOfDisableOtp401Response(value: object): value is DisableOtp401Response { + if (!('kind' in value) || value['kind'] === undefined) return false; + if (!('msg' in value) || value['msg'] === undefined) return false; + return true; +} + +export function DisableOtp401ResponseFromJSON(json: any): DisableOtp401Response { + return DisableOtp401ResponseFromJSONTyped(json, false); +} + +export function DisableOtp401ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): DisableOtp401Response { + if (json == null) { + return json; + } + return { + + 'kind': json['kind'], + 'msg': json['msg'], + }; +} + +export function DisableOtp401ResponseToJSON(json: any): DisableOtp401Response { + return DisableOtp401ResponseToJSONTyped(json, false); +} + +export function DisableOtp401ResponseToJSONTyped(value?: DisableOtp401Response | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'kind': value['kind'], + 'msg': value['msg'], + }; +} + diff --git a/frontend/src/api/generated/models/DisableOtp500Response.ts b/frontend/src/api/generated/models/DisableOtp500Response.ts new file mode 100644 index 0000000..13eeaf5 --- /dev/null +++ b/frontend/src/api/generated/models/DisableOtp500Response.ts @@ -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.0 + * + * + * 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 DisableOtp500Response + */ +export interface DisableOtp500Response { + /** + * + * @type {string} + * @memberof DisableOtp500Response + */ + kind: DisableOtp500ResponseKindEnum; + /** + * + * @type {string} + * @memberof DisableOtp500Response + */ + msg: DisableOtp500ResponseMsgEnum; +} + + +/** + * @export + */ +export const DisableOtp500ResponseKindEnum = { + Failure: 'failure' +} as const; +export type DisableOtp500ResponseKindEnum = typeof DisableOtp500ResponseKindEnum[keyof typeof DisableOtp500ResponseKindEnum]; + +/** + * @export + */ +export const DisableOtp500ResponseMsgEnum = { + DisableOtpFailureGeneric: 'disableOtp.failure.generic' +} as const; +export type DisableOtp500ResponseMsgEnum = typeof DisableOtp500ResponseMsgEnum[keyof typeof DisableOtp500ResponseMsgEnum]; + + +/** + * Check if a given object implements the DisableOtp500Response interface. + */ +export function instanceOfDisableOtp500Response(value: object): value is DisableOtp500Response { + if (!('kind' in value) || value['kind'] === undefined) return false; + if (!('msg' in value) || value['msg'] === undefined) return false; + return true; +} + +export function DisableOtp500ResponseFromJSON(json: any): DisableOtp500Response { + return DisableOtp500ResponseFromJSONTyped(json, false); +} + +export function DisableOtp500ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): DisableOtp500Response { + if (json == null) { + return json; + } + return { + + 'kind': json['kind'], + 'msg': json['msg'], + }; +} + +export function DisableOtp500ResponseToJSON(json: any): DisableOtp500Response { + return DisableOtp500ResponseToJSONTyped(json, false); +} + +export function DisableOtp500ResponseToJSONTyped(value?: DisableOtp500Response | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'kind': value['kind'], + 'msg': value['msg'], + }; +} + diff --git a/frontend/src/api/generated/models/EnableOtp200Response.ts b/frontend/src/api/generated/models/EnableOtp200Response.ts new file mode 100644 index 0000000..0384bb5 --- /dev/null +++ b/frontend/src/api/generated/models/EnableOtp200Response.ts @@ -0,0 +1,110 @@ +/* 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.0 + * + * + * 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'; +import type { EnableOtp200ResponsePayload } from './EnableOtp200ResponsePayload'; +import { + EnableOtp200ResponsePayloadFromJSON, + EnableOtp200ResponsePayloadFromJSONTyped, + EnableOtp200ResponsePayloadToJSON, + EnableOtp200ResponsePayloadToJSONTyped, +} from './EnableOtp200ResponsePayload'; + +/** + * + * @export + * @interface EnableOtp200Response + */ +export interface EnableOtp200Response { + /** + * + * @type {string} + * @memberof EnableOtp200Response + */ + kind: EnableOtp200ResponseKindEnum; + /** + * + * @type {string} + * @memberof EnableOtp200Response + */ + msg: EnableOtp200ResponseMsgEnum; + /** + * + * @type {EnableOtp200ResponsePayload} + * @memberof EnableOtp200Response + */ + payload: EnableOtp200ResponsePayload; +} + + +/** + * @export + */ +export const EnableOtp200ResponseKindEnum = { + Success: 'success' +} as const; +export type EnableOtp200ResponseKindEnum = typeof EnableOtp200ResponseKindEnum[keyof typeof EnableOtp200ResponseKindEnum]; + +/** + * @export + */ +export const EnableOtp200ResponseMsgEnum = { + EnableOtpSuccess: 'enableOtp.success' +} as const; +export type EnableOtp200ResponseMsgEnum = typeof EnableOtp200ResponseMsgEnum[keyof typeof EnableOtp200ResponseMsgEnum]; + + +/** + * Check if a given object implements the EnableOtp200Response interface. + */ +export function instanceOfEnableOtp200Response(value: object): value is EnableOtp200Response { + if (!('kind' in value) || value['kind'] === undefined) return false; + if (!('msg' in value) || value['msg'] === undefined) return false; + if (!('payload' in value) || value['payload'] === undefined) return false; + return true; +} + +export function EnableOtp200ResponseFromJSON(json: any): EnableOtp200Response { + return EnableOtp200ResponseFromJSONTyped(json, false); +} + +export function EnableOtp200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): EnableOtp200Response { + if (json == null) { + return json; + } + return { + + 'kind': json['kind'], + 'msg': json['msg'], + 'payload': EnableOtp200ResponsePayloadFromJSON(json['payload']), + }; +} + +export function EnableOtp200ResponseToJSON(json: any): EnableOtp200Response { + return EnableOtp200ResponseToJSONTyped(json, false); +} + +export function EnableOtp200ResponseToJSONTyped(value?: EnableOtp200Response | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'kind': value['kind'], + 'msg': value['msg'], + 'payload': EnableOtp200ResponsePayloadToJSON(value['payload']), + }; +} + diff --git a/frontend/src/api/generated/models/EnableOtp200ResponsePayload.ts b/frontend/src/api/generated/models/EnableOtp200ResponsePayload.ts new file mode 100644 index 0000000..b043343 --- /dev/null +++ b/frontend/src/api/generated/models/EnableOtp200ResponsePayload.ts @@ -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.0 + * + * + * 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 EnableOtp200ResponsePayload + */ +export interface EnableOtp200ResponsePayload { + /** + * The otp url to feed into a 2fa app + * @type {string} + * @memberof EnableOtp200ResponsePayload + */ + url: string; +} + +/** + * Check if a given object implements the EnableOtp200ResponsePayload interface. + */ +export function instanceOfEnableOtp200ResponsePayload(value: object): value is EnableOtp200ResponsePayload { + if (!('url' in value) || value['url'] === undefined) return false; + return true; +} + +export function EnableOtp200ResponsePayloadFromJSON(json: any): EnableOtp200ResponsePayload { + return EnableOtp200ResponsePayloadFromJSONTyped(json, false); +} + +export function EnableOtp200ResponsePayloadFromJSONTyped(json: any, ignoreDiscriminator: boolean): EnableOtp200ResponsePayload { + if (json == null) { + return json; + } + return { + + 'url': json['url'], + }; +} + +export function EnableOtp200ResponsePayloadToJSON(json: any): EnableOtp200ResponsePayload { + return EnableOtp200ResponsePayloadToJSONTyped(json, false); +} + +export function EnableOtp200ResponsePayloadToJSONTyped(value?: EnableOtp200ResponsePayload | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'url': value['url'], + }; +} + diff --git a/frontend/src/api/generated/models/GetUser200Response.ts b/frontend/src/api/generated/models/GetUser200Response.ts new file mode 100644 index 0000000..53e25b3 --- /dev/null +++ b/frontend/src/api/generated/models/GetUser200Response.ts @@ -0,0 +1,110 @@ +/* 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.0 + * + * + * 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'; +import type { GetUser200ResponsePayload } from './GetUser200ResponsePayload'; +import { + GetUser200ResponsePayloadFromJSON, + GetUser200ResponsePayloadFromJSONTyped, + GetUser200ResponsePayloadToJSON, + GetUser200ResponsePayloadToJSONTyped, +} from './GetUser200ResponsePayload'; + +/** + * + * @export + * @interface GetUser200Response + */ +export interface GetUser200Response { + /** + * + * @type {string} + * @memberof GetUser200Response + */ + kind: GetUser200ResponseKindEnum; + /** + * + * @type {string} + * @memberof GetUser200Response + */ + msg: GetUser200ResponseMsgEnum; + /** + * + * @type {GetUser200ResponsePayload} + * @memberof GetUser200Response + */ + payload: GetUser200ResponsePayload; +} + + +/** + * @export + */ +export const GetUser200ResponseKindEnum = { + Success: 'success' +} as const; +export type GetUser200ResponseKindEnum = typeof GetUser200ResponseKindEnum[keyof typeof GetUser200ResponseKindEnum]; + +/** + * @export + */ +export const GetUser200ResponseMsgEnum = { + UserinfoSuccess: 'userinfo.success' +} as const; +export type GetUser200ResponseMsgEnum = typeof GetUser200ResponseMsgEnum[keyof typeof GetUser200ResponseMsgEnum]; + + +/** + * Check if a given object implements the GetUser200Response interface. + */ +export function instanceOfGetUser200Response(value: object): value is GetUser200Response { + if (!('kind' in value) || value['kind'] === undefined) return false; + if (!('msg' in value) || value['msg'] === undefined) return false; + if (!('payload' in value) || value['payload'] === undefined) return false; + return true; +} + +export function GetUser200ResponseFromJSON(json: any): GetUser200Response { + return GetUser200ResponseFromJSONTyped(json, false); +} + +export function GetUser200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetUser200Response { + if (json == null) { + return json; + } + return { + + 'kind': json['kind'], + 'msg': json['msg'], + 'payload': GetUser200ResponsePayloadFromJSON(json['payload']), + }; +} + +export function GetUser200ResponseToJSON(json: any): GetUser200Response { + return GetUser200ResponseToJSONTyped(json, false); +} + +export function GetUser200ResponseToJSONTyped(value?: GetUser200Response | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'kind': value['kind'], + 'msg': value['msg'], + 'payload': GetUser200ResponsePayloadToJSON(value['payload']), + }; +} + diff --git a/frontend/src/api/generated/models/GetUser200ResponsePayload.ts b/frontend/src/api/generated/models/GetUser200ResponsePayload.ts new file mode 100644 index 0000000..27c8100 --- /dev/null +++ b/frontend/src/api/generated/models/GetUser200ResponsePayload.ts @@ -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.0 + * + * + * 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 GetUser200ResponsePayload + */ +export interface GetUser200ResponsePayload { + /** + * + * @type {string} + * @memberof GetUser200ResponsePayload + */ + name: string; + /** + * + * @type {string} + * @memberof GetUser200ResponsePayload + */ + id: string; + /** + * + * @type {boolean} + * @memberof GetUser200ResponsePayload + */ + guest: boolean; +} + +/** + * Check if a given object implements the GetUser200ResponsePayload interface. + */ +export function instanceOfGetUser200ResponsePayload(value: object): value is GetUser200ResponsePayload { + 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 GetUser200ResponsePayloadFromJSON(json: any): GetUser200ResponsePayload { + return GetUser200ResponsePayloadFromJSONTyped(json, false); +} + +export function GetUser200ResponsePayloadFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetUser200ResponsePayload { + if (json == null) { + return json; + } + return { + + 'name': json['name'], + 'id': json['id'], + 'guest': json['guest'], + }; +} + +export function GetUser200ResponsePayloadToJSON(json: any): GetUser200ResponsePayload { + return GetUser200ResponsePayloadToJSONTyped(json, false); +} + +export function GetUser200ResponsePayloadToJSONTyped(value?: GetUser200ResponsePayload | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'id': value['id'], + 'guest': value['guest'], + }; +} + diff --git a/frontend/src/api/generated/models/GetUser403Response.ts b/frontend/src/api/generated/models/GetUser403Response.ts new file mode 100644 index 0000000..9736581 --- /dev/null +++ b/frontend/src/api/generated/models/GetUser403Response.ts @@ -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.0 + * + * + * 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 GetUser403Response + */ +export interface GetUser403Response { + /** + * + * @type {string} + * @memberof GetUser403Response + */ + kind: GetUser403ResponseKindEnum; + /** + * + * @type {string} + * @memberof GetUser403Response + */ + msg: GetUser403ResponseMsgEnum; +} + + +/** + * @export + */ +export const GetUser403ResponseKindEnum = { + Failure: 'failure' +} as const; +export type GetUser403ResponseKindEnum = typeof GetUser403ResponseKindEnum[keyof typeof GetUser403ResponseKindEnum]; + +/** + * @export + */ +export const GetUser403ResponseMsgEnum = { + UserinfoFailureNotLoggedIn: 'userinfo.failure.notLoggedIn' +} as const; +export type GetUser403ResponseMsgEnum = typeof GetUser403ResponseMsgEnum[keyof typeof GetUser403ResponseMsgEnum]; + + +/** + * Check if a given object implements the GetUser403Response interface. + */ +export function instanceOfGetUser403Response(value: object): value is GetUser403Response { + if (!('kind' in value) || value['kind'] === undefined) return false; + if (!('msg' in value) || value['msg'] === undefined) return false; + return true; +} + +export function GetUser403ResponseFromJSON(json: any): GetUser403Response { + return GetUser403ResponseFromJSONTyped(json, false); +} + +export function GetUser403ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetUser403Response { + if (json == null) { + return json; + } + return { + + 'kind': json['kind'], + 'msg': json['msg'], + }; +} + +export function GetUser403ResponseToJSON(json: any): GetUser403Response { + return GetUser403ResponseToJSONTyped(json, false); +} + +export function GetUser403ResponseToJSONTyped(value?: GetUser403Response | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'kind': value['kind'], + 'msg': value['msg'], + }; +} + diff --git a/frontend/src/api/generated/models/GetUser404Response.ts b/frontend/src/api/generated/models/GetUser404Response.ts new file mode 100644 index 0000000..1c52653 --- /dev/null +++ b/frontend/src/api/generated/models/GetUser404Response.ts @@ -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.0 + * + * + * 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 GetUser404Response + */ +export interface GetUser404Response { + /** + * + * @type {string} + * @memberof GetUser404Response + */ + kind: GetUser404ResponseKindEnum; + /** + * + * @type {string} + * @memberof GetUser404Response + */ + msg: GetUser404ResponseMsgEnum; +} + + +/** + * @export + */ +export const GetUser404ResponseKindEnum = { + Failure: 'failure' +} as const; +export type GetUser404ResponseKindEnum = typeof GetUser404ResponseKindEnum[keyof typeof GetUser404ResponseKindEnum]; + +/** + * @export + */ +export const GetUser404ResponseMsgEnum = { + UserinfoFailureUnknownUser: 'userinfo.failure.unknownUser' +} as const; +export type GetUser404ResponseMsgEnum = typeof GetUser404ResponseMsgEnum[keyof typeof GetUser404ResponseMsgEnum]; + + +/** + * Check if a given object implements the GetUser404Response interface. + */ +export function instanceOfGetUser404Response(value: object): value is GetUser404Response { + if (!('kind' in value) || value['kind'] === undefined) return false; + if (!('msg' in value) || value['msg'] === undefined) return false; + return true; +} + +export function GetUser404ResponseFromJSON(json: any): GetUser404Response { + return GetUser404ResponseFromJSONTyped(json, false); +} + +export function GetUser404ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetUser404Response { + if (json == null) { + return json; + } + return { + + 'kind': json['kind'], + 'msg': json['msg'], + }; +} + +export function GetUser404ResponseToJSON(json: any): GetUser404Response { + return GetUser404ResponseToJSONTyped(json, false); +} + +export function GetUser404ResponseToJSONTyped(value?: GetUser404Response | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'kind': value['kind'], + 'msg': value['msg'], + }; +} + diff --git a/frontend/src/api/generated/models/GetUserUserParameter.ts b/frontend/src/api/generated/models/GetUserUserParameter.ts new file mode 100644 index 0000000..036e620 --- /dev/null +++ b/frontend/src/api/generated/models/GetUserUserParameter.ts @@ -0,0 +1,46 @@ +/* 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.0 + * + * + * 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 GetUserUserParameter + */ +export interface GetUserUserParameter { +} + +/** + * Check if a given object implements the GetUserUserParameter interface. + */ +export function instanceOfGetUserUserParameter(value: object): value is GetUserUserParameter { + return true; +} + +export function GetUserUserParameterFromJSON(json: any): GetUserUserParameter { + return GetUserUserParameterFromJSONTyped(json, false); +} + +export function GetUserUserParameterFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetUserUserParameter { + return json; +} + +export function GetUserUserParameterToJSON(json: any): GetUserUserParameter { + return GetUserUserParameterToJSONTyped(json, false); +} + +export function GetUserUserParameterToJSONTyped(value?: GetUserUserParameter | null, ignoreDiscriminator: boolean = false): any { + return value; +} + diff --git a/frontend/src/api/generated/models/GuestLogin200Response.ts b/frontend/src/api/generated/models/GuestLogin200Response.ts new file mode 100644 index 0000000..d5d2b7e --- /dev/null +++ b/frontend/src/api/generated/models/GuestLogin200Response.ts @@ -0,0 +1,110 @@ +/* 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.0 + * + * + * 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'; +import type { GuestLogin200ResponsePayload } from './GuestLogin200ResponsePayload'; +import { + GuestLogin200ResponsePayloadFromJSON, + GuestLogin200ResponsePayloadFromJSONTyped, + GuestLogin200ResponsePayloadToJSON, + GuestLogin200ResponsePayloadToJSONTyped, +} from './GuestLogin200ResponsePayload'; + +/** + * + * @export + * @interface GuestLogin200Response + */ +export interface GuestLogin200Response { + /** + * + * @type {string} + * @memberof GuestLogin200Response + */ + kind: GuestLogin200ResponseKindEnum; + /** + * + * @type {string} + * @memberof GuestLogin200Response + */ + msg: GuestLogin200ResponseMsgEnum; + /** + * + * @type {GuestLogin200ResponsePayload} + * @memberof GuestLogin200Response + */ + payload: GuestLogin200ResponsePayload; +} + + +/** + * @export + */ +export const GuestLogin200ResponseKindEnum = { + Success: 'success' +} as const; +export type GuestLogin200ResponseKindEnum = typeof GuestLogin200ResponseKindEnum[keyof typeof GuestLogin200ResponseKindEnum]; + +/** + * @export + */ +export const GuestLogin200ResponseMsgEnum = { + GuestLoginSuccess: 'guestLogin.success' +} as const; +export type GuestLogin200ResponseMsgEnum = typeof GuestLogin200ResponseMsgEnum[keyof typeof GuestLogin200ResponseMsgEnum]; + + +/** + * Check if a given object implements the GuestLogin200Response interface. + */ +export function instanceOfGuestLogin200Response(value: object): value is GuestLogin200Response { + if (!('kind' in value) || value['kind'] === undefined) return false; + if (!('msg' in value) || value['msg'] === undefined) return false; + if (!('payload' in value) || value['payload'] === undefined) return false; + return true; +} + +export function GuestLogin200ResponseFromJSON(json: any): GuestLogin200Response { + return GuestLogin200ResponseFromJSONTyped(json, false); +} + +export function GuestLogin200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): GuestLogin200Response { + if (json == null) { + return json; + } + return { + + 'kind': json['kind'], + 'msg': json['msg'], + 'payload': GuestLogin200ResponsePayloadFromJSON(json['payload']), + }; +} + +export function GuestLogin200ResponseToJSON(json: any): GuestLogin200Response { + return GuestLogin200ResponseToJSONTyped(json, false); +} + +export function GuestLogin200ResponseToJSONTyped(value?: GuestLogin200Response | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'kind': value['kind'], + 'msg': value['msg'], + 'payload': GuestLogin200ResponsePayloadToJSON(value['payload']), + }; +} + diff --git a/frontend/src/api/generated/models/GuestLogin200ResponsePayload.ts b/frontend/src/api/generated/models/GuestLogin200ResponsePayload.ts new file mode 100644 index 0000000..05a4559 --- /dev/null +++ b/frontend/src/api/generated/models/GuestLogin200ResponsePayload.ts @@ -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.0 + * + * + * 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 GuestLogin200ResponsePayload + */ +export interface GuestLogin200ResponsePayload { + /** + * JWT that represent a logged in user + * @type {string} + * @memberof GuestLogin200ResponsePayload + */ + token: string; +} + +/** + * Check if a given object implements the GuestLogin200ResponsePayload interface. + */ +export function instanceOfGuestLogin200ResponsePayload(value: object): value is GuestLogin200ResponsePayload { + if (!('token' in value) || value['token'] === undefined) return false; + return true; +} + +export function GuestLogin200ResponsePayloadFromJSON(json: any): GuestLogin200ResponsePayload { + return GuestLogin200ResponsePayloadFromJSONTyped(json, false); +} + +export function GuestLogin200ResponsePayloadFromJSONTyped(json: any, ignoreDiscriminator: boolean): GuestLogin200ResponsePayload { + if (json == null) { + return json; + } + return { + + 'token': json['token'], + }; +} + +export function GuestLogin200ResponsePayloadToJSON(json: any): GuestLogin200ResponsePayload { + return GuestLogin200ResponsePayloadToJSONTyped(json, false); +} + +export function GuestLogin200ResponsePayloadToJSONTyped(value?: GuestLogin200ResponsePayload | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'token': value['token'], + }; +} + diff --git a/frontend/src/api/generated/models/GuestLogin500Response.ts b/frontend/src/api/generated/models/GuestLogin500Response.ts new file mode 100644 index 0000000..fbe78cf --- /dev/null +++ b/frontend/src/api/generated/models/GuestLogin500Response.ts @@ -0,0 +1,94 @@ +/* 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.0 + * + * + * 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 GuestLogin500Response + */ +export interface GuestLogin500Response { + /** + * + * @type {string} + * @memberof GuestLogin500Response + */ + kind: GuestLogin500ResponseKindEnum; + /** + * + * @type {string} + * @memberof GuestLogin500Response + */ + msg: GuestLogin500ResponseMsgEnum; +} + + +/** + * @export + */ +export const GuestLogin500ResponseKindEnum = { + Failed: 'failed' +} as const; +export type GuestLogin500ResponseKindEnum = typeof GuestLogin500ResponseKindEnum[keyof typeof GuestLogin500ResponseKindEnum]; + +/** + * @export + */ +export const GuestLogin500ResponseMsgEnum = { + GuestLoginFailedGenericUnknown: 'guestLogin.failed.generic.unknown', + GuestLoginFailedGenericError: 'guestLogin.failed.generic.error' +} as const; +export type GuestLogin500ResponseMsgEnum = typeof GuestLogin500ResponseMsgEnum[keyof typeof GuestLogin500ResponseMsgEnum]; + + +/** + * Check if a given object implements the GuestLogin500Response interface. + */ +export function instanceOfGuestLogin500Response(value: object): value is GuestLogin500Response { + if (!('kind' in value) || value['kind'] === undefined) return false; + if (!('msg' in value) || value['msg'] === undefined) return false; + return true; +} + +export function GuestLogin500ResponseFromJSON(json: any): GuestLogin500Response { + return GuestLogin500ResponseFromJSONTyped(json, false); +} + +export function GuestLogin500ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): GuestLogin500Response { + if (json == null) { + return json; + } + return { + + 'kind': json['kind'], + 'msg': json['msg'], + }; +} + +export function GuestLogin500ResponseToJSON(json: any): GuestLogin500Response { + return GuestLogin500ResponseToJSONTyped(json, false); +} + +export function GuestLogin500ResponseToJSONTyped(value?: GuestLogin500Response | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'kind': value['kind'], + 'msg': value['msg'], + }; +} + diff --git a/frontend/src/api/generated/models/Login200Response.ts b/frontend/src/api/generated/models/Login200Response.ts new file mode 100644 index 0000000..89605cd --- /dev/null +++ b/frontend/src/api/generated/models/Login200Response.ts @@ -0,0 +1,110 @@ +/* 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.0 + * + * + * 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'; +import type { GuestLogin200ResponsePayload } from './GuestLogin200ResponsePayload'; +import { + GuestLogin200ResponsePayloadFromJSON, + GuestLogin200ResponsePayloadFromJSONTyped, + GuestLogin200ResponsePayloadToJSON, + GuestLogin200ResponsePayloadToJSONTyped, +} from './GuestLogin200ResponsePayload'; + +/** + * + * @export + * @interface Login200Response + */ +export interface Login200Response { + /** + * + * @type {string} + * @memberof Login200Response + */ + kind: Login200ResponseKindEnum; + /** + * + * @type {string} + * @memberof Login200Response + */ + msg: Login200ResponseMsgEnum; + /** + * + * @type {GuestLogin200ResponsePayload} + * @memberof Login200Response + */ + payload: GuestLogin200ResponsePayload; +} + + +/** + * @export + */ +export const Login200ResponseKindEnum = { + Success: 'success' +} as const; +export type Login200ResponseKindEnum = typeof Login200ResponseKindEnum[keyof typeof Login200ResponseKindEnum]; + +/** + * @export + */ +export const Login200ResponseMsgEnum = { + LoginSuccess: 'login.success' +} as const; +export type Login200ResponseMsgEnum = typeof Login200ResponseMsgEnum[keyof typeof Login200ResponseMsgEnum]; + + +/** + * Check if a given object implements the Login200Response interface. + */ +export function instanceOfLogin200Response(value: object): value is Login200Response { + if (!('kind' in value) || value['kind'] === undefined) return false; + if (!('msg' in value) || value['msg'] === undefined) return false; + if (!('payload' in value) || value['payload'] === undefined) return false; + return true; +} + +export function Login200ResponseFromJSON(json: any): Login200Response { + return Login200ResponseFromJSONTyped(json, false); +} + +export function Login200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): Login200Response { + if (json == null) { + return json; + } + return { + + 'kind': json['kind'], + 'msg': json['msg'], + 'payload': GuestLogin200ResponsePayloadFromJSON(json['payload']), + }; +} + +export function Login200ResponseToJSON(json: any): Login200Response { + return Login200ResponseToJSONTyped(json, false); +} + +export function Login200ResponseToJSONTyped(value?: Login200Response | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'kind': value['kind'], + 'msg': value['msg'], + 'payload': GuestLogin200ResponsePayloadToJSON(value['payload']), + }; +} + diff --git a/frontend/src/api/generated/models/Login202Response.ts b/frontend/src/api/generated/models/Login202Response.ts new file mode 100644 index 0000000..ef3658d --- /dev/null +++ b/frontend/src/api/generated/models/Login202Response.ts @@ -0,0 +1,110 @@ +/* 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.0 + * + * + * 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'; +import type { Login202ResponsePayload } from './Login202ResponsePayload'; +import { + Login202ResponsePayloadFromJSON, + Login202ResponsePayloadFromJSONTyped, + Login202ResponsePayloadToJSON, + Login202ResponsePayloadToJSONTyped, +} from './Login202ResponsePayload'; + +/** + * + * @export + * @interface Login202Response + */ +export interface Login202Response { + /** + * + * @type {string} + * @memberof Login202Response + */ + kind: Login202ResponseKindEnum; + /** + * + * @type {string} + * @memberof Login202Response + */ + msg: Login202ResponseMsgEnum; + /** + * + * @type {Login202ResponsePayload} + * @memberof Login202Response + */ + payload: Login202ResponsePayload; +} + + +/** + * @export + */ +export const Login202ResponseKindEnum = { + OtpRequired: 'otpRequired' +} as const; +export type Login202ResponseKindEnum = typeof Login202ResponseKindEnum[keyof typeof Login202ResponseKindEnum]; + +/** + * @export + */ +export const Login202ResponseMsgEnum = { + LoginOtpRequired: 'login.otpRequired' +} as const; +export type Login202ResponseMsgEnum = typeof Login202ResponseMsgEnum[keyof typeof Login202ResponseMsgEnum]; + + +/** + * Check if a given object implements the Login202Response interface. + */ +export function instanceOfLogin202Response(value: object): value is Login202Response { + if (!('kind' in value) || value['kind'] === undefined) return false; + if (!('msg' in value) || value['msg'] === undefined) return false; + if (!('payload' in value) || value['payload'] === undefined) return false; + return true; +} + +export function Login202ResponseFromJSON(json: any): Login202Response { + return Login202ResponseFromJSONTyped(json, false); +} + +export function Login202ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): Login202Response { + if (json == null) { + return json; + } + return { + + 'kind': json['kind'], + 'msg': json['msg'], + 'payload': Login202ResponsePayloadFromJSON(json['payload']), + }; +} + +export function Login202ResponseToJSON(json: any): Login202Response { + return Login202ResponseToJSONTyped(json, false); +} + +export function Login202ResponseToJSONTyped(value?: Login202Response | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'kind': value['kind'], + 'msg': value['msg'], + 'payload': Login202ResponsePayloadToJSON(value['payload']), + }; +} + diff --git a/frontend/src/api/generated/models/Login202ResponsePayload.ts b/frontend/src/api/generated/models/Login202ResponsePayload.ts new file mode 100644 index 0000000..2ee965a --- /dev/null +++ b/frontend/src/api/generated/models/Login202ResponsePayload.ts @@ -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.0 + * + * + * 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 Login202ResponsePayload + */ +export interface Login202ResponsePayload { + /** + * JWT to send with the OTP to finish login + * @type {string} + * @memberof Login202ResponsePayload + */ + token: string; +} + +/** + * Check if a given object implements the Login202ResponsePayload interface. + */ +export function instanceOfLogin202ResponsePayload(value: object): value is Login202ResponsePayload { + if (!('token' in value) || value['token'] === undefined) return false; + return true; +} + +export function Login202ResponsePayloadFromJSON(json: any): Login202ResponsePayload { + return Login202ResponsePayloadFromJSONTyped(json, false); +} + +export function Login202ResponsePayloadFromJSONTyped(json: any, ignoreDiscriminator: boolean): Login202ResponsePayload { + if (json == null) { + return json; + } + return { + + 'token': json['token'], + }; +} + +export function Login202ResponsePayloadToJSON(json: any): Login202ResponsePayload { + return Login202ResponsePayloadToJSONTyped(json, false); +} + +export function Login202ResponsePayloadToJSONTyped(value?: Login202ResponsePayload | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'token': value['token'], + }; +} + diff --git a/frontend/src/api/generated/models/Login400Response.ts b/frontend/src/api/generated/models/Login400Response.ts new file mode 100644 index 0000000..d656466 --- /dev/null +++ b/frontend/src/api/generated/models/Login400Response.ts @@ -0,0 +1,94 @@ +/* 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.0 + * + * + * 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 Login400Response + */ +export interface Login400Response { + /** + * + * @type {string} + * @memberof Login400Response + */ + kind: Login400ResponseKindEnum; + /** + * + * @type {string} + * @memberof Login400Response + */ + msg: Login400ResponseMsgEnum; +} + + +/** + * @export + */ +export const Login400ResponseKindEnum = { + Failed: 'failed' +} as const; +export type Login400ResponseKindEnum = typeof Login400ResponseKindEnum[keyof typeof Login400ResponseKindEnum]; + +/** + * @export + */ +export const Login400ResponseMsgEnum = { + LoginFailedGeneric: 'login.failed.generic', + LoginFailedInvalid: 'login.failed.invalid' +} as const; +export type Login400ResponseMsgEnum = typeof Login400ResponseMsgEnum[keyof typeof Login400ResponseMsgEnum]; + + +/** + * Check if a given object implements the Login400Response interface. + */ +export function instanceOfLogin400Response(value: object): value is Login400Response { + if (!('kind' in value) || value['kind'] === undefined) return false; + if (!('msg' in value) || value['msg'] === undefined) return false; + return true; +} + +export function Login400ResponseFromJSON(json: any): Login400Response { + return Login400ResponseFromJSONTyped(json, false); +} + +export function Login400ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): Login400Response { + if (json == null) { + return json; + } + return { + + 'kind': json['kind'], + 'msg': json['msg'], + }; +} + +export function Login400ResponseToJSON(json: any): Login400Response { + return Login400ResponseToJSONTyped(json, false); +} + +export function Login400ResponseToJSONTyped(value?: Login400Response | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'kind': value['kind'], + 'msg': value['msg'], + }; +} + diff --git a/frontend/src/api/generated/models/LoginOtp200Response.ts b/frontend/src/api/generated/models/LoginOtp200Response.ts new file mode 100644 index 0000000..c0afb54 --- /dev/null +++ b/frontend/src/api/generated/models/LoginOtp200Response.ts @@ -0,0 +1,110 @@ +/* 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.0 + * + * + * 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'; +import type { LoginOtp200ResponsePayload } from './LoginOtp200ResponsePayload'; +import { + LoginOtp200ResponsePayloadFromJSON, + LoginOtp200ResponsePayloadFromJSONTyped, + LoginOtp200ResponsePayloadToJSON, + LoginOtp200ResponsePayloadToJSONTyped, +} from './LoginOtp200ResponsePayload'; + +/** + * + * @export + * @interface LoginOtp200Response + */ +export interface LoginOtp200Response { + /** + * + * @type {string} + * @memberof LoginOtp200Response + */ + kind: LoginOtp200ResponseKindEnum; + /** + * + * @type {string} + * @memberof LoginOtp200Response + */ + msg: LoginOtp200ResponseMsgEnum; + /** + * + * @type {LoginOtp200ResponsePayload} + * @memberof LoginOtp200Response + */ + payload: LoginOtp200ResponsePayload; +} + + +/** + * @export + */ +export const LoginOtp200ResponseKindEnum = { + Success: 'success' +} as const; +export type LoginOtp200ResponseKindEnum = typeof LoginOtp200ResponseKindEnum[keyof typeof LoginOtp200ResponseKindEnum]; + +/** + * @export + */ +export const LoginOtp200ResponseMsgEnum = { + OtpSuccess: 'otp.success' +} as const; +export type LoginOtp200ResponseMsgEnum = typeof LoginOtp200ResponseMsgEnum[keyof typeof LoginOtp200ResponseMsgEnum]; + + +/** + * Check if a given object implements the LoginOtp200Response interface. + */ +export function instanceOfLoginOtp200Response(value: object): value is LoginOtp200Response { + if (!('kind' in value) || value['kind'] === undefined) return false; + if (!('msg' in value) || value['msg'] === undefined) return false; + if (!('payload' in value) || value['payload'] === undefined) return false; + return true; +} + +export function LoginOtp200ResponseFromJSON(json: any): LoginOtp200Response { + return LoginOtp200ResponseFromJSONTyped(json, false); +} + +export function LoginOtp200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): LoginOtp200Response { + if (json == null) { + return json; + } + return { + + 'kind': json['kind'], + 'msg': json['msg'], + 'payload': LoginOtp200ResponsePayloadFromJSON(json['payload']), + }; +} + +export function LoginOtp200ResponseToJSON(json: any): LoginOtp200Response { + return LoginOtp200ResponseToJSONTyped(json, false); +} + +export function LoginOtp200ResponseToJSONTyped(value?: LoginOtp200Response | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'kind': value['kind'], + 'msg': value['msg'], + 'payload': LoginOtp200ResponsePayloadToJSON(value['payload']), + }; +} + diff --git a/frontend/src/api/generated/models/LoginOtp200ResponsePayload.ts b/frontend/src/api/generated/models/LoginOtp200ResponsePayload.ts new file mode 100644 index 0000000..a82d586 --- /dev/null +++ b/frontend/src/api/generated/models/LoginOtp200ResponsePayload.ts @@ -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.0 + * + * + * 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 LoginOtp200ResponsePayload + */ +export interface LoginOtp200ResponsePayload { + /** + * the JWT Token + * @type {string} + * @memberof LoginOtp200ResponsePayload + */ + token: string; +} + +/** + * Check if a given object implements the LoginOtp200ResponsePayload interface. + */ +export function instanceOfLoginOtp200ResponsePayload(value: object): value is LoginOtp200ResponsePayload { + if (!('token' in value) || value['token'] === undefined) return false; + return true; +} + +export function LoginOtp200ResponsePayloadFromJSON(json: any): LoginOtp200ResponsePayload { + return LoginOtp200ResponsePayloadFromJSONTyped(json, false); +} + +export function LoginOtp200ResponsePayloadFromJSONTyped(json: any, ignoreDiscriminator: boolean): LoginOtp200ResponsePayload { + if (json == null) { + return json; + } + return { + + 'token': json['token'], + }; +} + +export function LoginOtp200ResponsePayloadToJSON(json: any): LoginOtp200ResponsePayload { + return LoginOtp200ResponsePayloadToJSONTyped(json, false); +} + +export function LoginOtp200ResponsePayloadToJSONTyped(value?: LoginOtp200ResponsePayload | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'token': value['token'], + }; +} + diff --git a/frontend/src/api/generated/models/LoginOtp400Response.ts b/frontend/src/api/generated/models/LoginOtp400Response.ts new file mode 100644 index 0000000..8c3514e --- /dev/null +++ b/frontend/src/api/generated/models/LoginOtp400Response.ts @@ -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.0 + * + * + * 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 LoginOtp400Response + */ +export interface LoginOtp400Response { + /** + * + * @type {string} + * @memberof LoginOtp400Response + */ + kind: LoginOtp400ResponseKindEnum; + /** + * + * @type {string} + * @memberof LoginOtp400Response + */ + msg: LoginOtp400ResponseMsgEnum; +} + + +/** + * @export + */ +export const LoginOtp400ResponseKindEnum = { + Failed: 'failed' +} as const; +export type LoginOtp400ResponseKindEnum = typeof LoginOtp400ResponseKindEnum[keyof typeof LoginOtp400ResponseKindEnum]; + +/** + * @export + */ +export const LoginOtp400ResponseMsgEnum = { + OtpFailedInvalid: 'otp.failed.invalid' +} as const; +export type LoginOtp400ResponseMsgEnum = typeof LoginOtp400ResponseMsgEnum[keyof typeof LoginOtp400ResponseMsgEnum]; + + +/** + * Check if a given object implements the LoginOtp400Response interface. + */ +export function instanceOfLoginOtp400Response(value: object): value is LoginOtp400Response { + if (!('kind' in value) || value['kind'] === undefined) return false; + if (!('msg' in value) || value['msg'] === undefined) return false; + return true; +} + +export function LoginOtp400ResponseFromJSON(json: any): LoginOtp400Response { + return LoginOtp400ResponseFromJSONTyped(json, false); +} + +export function LoginOtp400ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): LoginOtp400Response { + if (json == null) { + return json; + } + return { + + 'kind': json['kind'], + 'msg': json['msg'], + }; +} + +export function LoginOtp400ResponseToJSON(json: any): LoginOtp400Response { + return LoginOtp400ResponseToJSONTyped(json, false); +} + +export function LoginOtp400ResponseToJSONTyped(value?: LoginOtp400Response | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'kind': value['kind'], + 'msg': value['msg'], + }; +} + diff --git a/frontend/src/api/generated/models/LoginOtp401Response.ts b/frontend/src/api/generated/models/LoginOtp401Response.ts new file mode 100644 index 0000000..f9db1e5 --- /dev/null +++ b/frontend/src/api/generated/models/LoginOtp401Response.ts @@ -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.0 + * + * + * 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 LoginOtp401Response + */ +export interface LoginOtp401Response { + /** + * + * @type {string} + * @memberof LoginOtp401Response + */ + kind: LoginOtp401ResponseKindEnum; + /** + * + * @type {string} + * @memberof LoginOtp401Response + */ + msg: LoginOtp401ResponseMsgEnum; +} + + +/** + * @export + */ +export const LoginOtp401ResponseKindEnum = { + Failed: 'failed' +} as const; +export type LoginOtp401ResponseKindEnum = typeof LoginOtp401ResponseKindEnum[keyof typeof LoginOtp401ResponseKindEnum]; + +/** + * @export + */ +export const LoginOtp401ResponseMsgEnum = { + OtpFailedNoSecret: 'otp.failed.noSecret' +} as const; +export type LoginOtp401ResponseMsgEnum = typeof LoginOtp401ResponseMsgEnum[keyof typeof LoginOtp401ResponseMsgEnum]; + + +/** + * Check if a given object implements the LoginOtp401Response interface. + */ +export function instanceOfLoginOtp401Response(value: object): value is LoginOtp401Response { + if (!('kind' in value) || value['kind'] === undefined) return false; + if (!('msg' in value) || value['msg'] === undefined) return false; + return true; +} + +export function LoginOtp401ResponseFromJSON(json: any): LoginOtp401Response { + return LoginOtp401ResponseFromJSONTyped(json, false); +} + +export function LoginOtp401ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): LoginOtp401Response { + if (json == null) { + return json; + } + return { + + 'kind': json['kind'], + 'msg': json['msg'], + }; +} + +export function LoginOtp401ResponseToJSON(json: any): LoginOtp401Response { + return LoginOtp401ResponseToJSONTyped(json, false); +} + +export function LoginOtp401ResponseToJSONTyped(value?: LoginOtp401Response | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'kind': value['kind'], + 'msg': value['msg'], + }; +} + diff --git a/frontend/src/api/generated/models/LoginOtp408Response.ts b/frontend/src/api/generated/models/LoginOtp408Response.ts new file mode 100644 index 0000000..6be370f --- /dev/null +++ b/frontend/src/api/generated/models/LoginOtp408Response.ts @@ -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.0 + * + * + * 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 LoginOtp408Response + */ +export interface LoginOtp408Response { + /** + * + * @type {string} + * @memberof LoginOtp408Response + */ + kind: LoginOtp408ResponseKindEnum; + /** + * + * @type {string} + * @memberof LoginOtp408Response + */ + msg: LoginOtp408ResponseMsgEnum; +} + + +/** + * @export + */ +export const LoginOtp408ResponseKindEnum = { + Failed: 'failed' +} as const; +export type LoginOtp408ResponseKindEnum = typeof LoginOtp408ResponseKindEnum[keyof typeof LoginOtp408ResponseKindEnum]; + +/** + * @export + */ +export const LoginOtp408ResponseMsgEnum = { + OtpFailedTimeout: 'otp.failed.timeout' +} as const; +export type LoginOtp408ResponseMsgEnum = typeof LoginOtp408ResponseMsgEnum[keyof typeof LoginOtp408ResponseMsgEnum]; + + +/** + * Check if a given object implements the LoginOtp408Response interface. + */ +export function instanceOfLoginOtp408Response(value: object): value is LoginOtp408Response { + if (!('kind' in value) || value['kind'] === undefined) return false; + if (!('msg' in value) || value['msg'] === undefined) return false; + return true; +} + +export function LoginOtp408ResponseFromJSON(json: any): LoginOtp408Response { + return LoginOtp408ResponseFromJSONTyped(json, false); +} + +export function LoginOtp408ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): LoginOtp408Response { + if (json == null) { + return json; + } + return { + + 'kind': json['kind'], + 'msg': json['msg'], + }; +} + +export function LoginOtp408ResponseToJSON(json: any): LoginOtp408Response { + return LoginOtp408ResponseToJSONTyped(json, false); +} + +export function LoginOtp408ResponseToJSONTyped(value?: LoginOtp408Response | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'kind': value['kind'], + 'msg': value['msg'], + }; +} + diff --git a/frontend/src/api/generated/models/LoginOtp500Response.ts b/frontend/src/api/generated/models/LoginOtp500Response.ts new file mode 100644 index 0000000..1109ce9 --- /dev/null +++ b/frontend/src/api/generated/models/LoginOtp500Response.ts @@ -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.0 + * + * + * 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 LoginOtp500Response + */ +export interface LoginOtp500Response { + /** + * + * @type {string} + * @memberof LoginOtp500Response + */ + kind: LoginOtp500ResponseKindEnum; + /** + * + * @type {string} + * @memberof LoginOtp500Response + */ + msg: LoginOtp500ResponseMsgEnum; +} + + +/** + * @export + */ +export const LoginOtp500ResponseKindEnum = { + Failed: 'failed' +} as const; +export type LoginOtp500ResponseKindEnum = typeof LoginOtp500ResponseKindEnum[keyof typeof LoginOtp500ResponseKindEnum]; + +/** + * @export + */ +export const LoginOtp500ResponseMsgEnum = { + OtpFailedGeneric: 'otp.failed.generic' +} as const; +export type LoginOtp500ResponseMsgEnum = typeof LoginOtp500ResponseMsgEnum[keyof typeof LoginOtp500ResponseMsgEnum]; + + +/** + * Check if a given object implements the LoginOtp500Response interface. + */ +export function instanceOfLoginOtp500Response(value: object): value is LoginOtp500Response { + if (!('kind' in value) || value['kind'] === undefined) return false; + if (!('msg' in value) || value['msg'] === undefined) return false; + return true; +} + +export function LoginOtp500ResponseFromJSON(json: any): LoginOtp500Response { + return LoginOtp500ResponseFromJSONTyped(json, false); +} + +export function LoginOtp500ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): LoginOtp500Response { + if (json == null) { + return json; + } + return { + + 'kind': json['kind'], + 'msg': json['msg'], + }; +} + +export function LoginOtp500ResponseToJSON(json: any): LoginOtp500Response { + return LoginOtp500ResponseToJSONTyped(json, false); +} + +export function LoginOtp500ResponseToJSONTyped(value?: LoginOtp500Response | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'kind': value['kind'], + 'msg': value['msg'], + }; +} + diff --git a/frontend/src/api/generated/models/LoginOtpRequest.ts b/frontend/src/api/generated/models/LoginOtpRequest.ts new file mode 100644 index 0000000..c28f1da --- /dev/null +++ b/frontend/src/api/generated/models/LoginOtpRequest.ts @@ -0,0 +1,75 @@ +/* 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.0 + * + * + * 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 LoginOtpRequest + */ +export interface LoginOtpRequest { + /** + * The token given at the login phase + * @type {string} + * @memberof LoginOtpRequest + */ + token: string; + /** + * The OTP given by the user + * @type {string} + * @memberof LoginOtpRequest + */ + code: string; +} + +/** + * Check if a given object implements the LoginOtpRequest interface. + */ +export function instanceOfLoginOtpRequest(value: object): value is LoginOtpRequest { + if (!('token' in value) || value['token'] === undefined) return false; + if (!('code' in value) || value['code'] === undefined) return false; + return true; +} + +export function LoginOtpRequestFromJSON(json: any): LoginOtpRequest { + return LoginOtpRequestFromJSONTyped(json, false); +} + +export function LoginOtpRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): LoginOtpRequest { + if (json == null) { + return json; + } + return { + + 'token': json['token'], + 'code': json['code'], + }; +} + +export function LoginOtpRequestToJSON(json: any): LoginOtpRequest { + return LoginOtpRequestToJSONTyped(json, false); +} + +export function LoginOtpRequestToJSONTyped(value?: LoginOtpRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'token': value['token'], + 'code': value['code'], + }; +} + diff --git a/frontend/src/api/generated/models/LoginRequest.ts b/frontend/src/api/generated/models/LoginRequest.ts new file mode 100644 index 0000000..b01bfcb --- /dev/null +++ b/frontend/src/api/generated/models/LoginRequest.ts @@ -0,0 +1,75 @@ +/* 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.0 + * + * + * 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 LoginRequest + */ +export interface LoginRequest { + /** + * + * @type {string} + * @memberof LoginRequest + */ + name: string; + /** + * + * @type {string} + * @memberof LoginRequest + */ + password: string; +} + +/** + * Check if a given object implements the LoginRequest interface. + */ +export function instanceOfLoginRequest(value: object): value is LoginRequest { + if (!('name' in value) || value['name'] === undefined) return false; + if (!('password' in value) || value['password'] === undefined) return false; + return true; +} + +export function LoginRequestFromJSON(json: any): LoginRequest { + return LoginRequestFromJSONTyped(json, false); +} + +export function LoginRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): LoginRequest { + if (json == null) { + return json; + } + return { + + 'name': json['name'], + 'password': json['password'], + }; +} + +export function LoginRequestToJSON(json: any): LoginRequest { + return LoginRequestToJSONTyped(json, false); +} + +export function LoginRequestToJSONTyped(value?: LoginRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'password': value['password'], + }; +} + diff --git a/frontend/src/api/generated/models/Logout200Response.ts b/frontend/src/api/generated/models/Logout200Response.ts new file mode 100644 index 0000000..b97ee49 --- /dev/null +++ b/frontend/src/api/generated/models/Logout200Response.ts @@ -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.0 + * + * + * 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 Logout200Response + */ +export interface Logout200Response { + /** + * + * @type {string} + * @memberof Logout200Response + */ + kind: Logout200ResponseKindEnum; + /** + * + * @type {string} + * @memberof Logout200Response + */ + msg: Logout200ResponseMsgEnum; +} + + +/** + * @export + */ +export const Logout200ResponseKindEnum = { + Success: 'success' +} as const; +export type Logout200ResponseKindEnum = typeof Logout200ResponseKindEnum[keyof typeof Logout200ResponseKindEnum]; + +/** + * @export + */ +export const Logout200ResponseMsgEnum = { + LogoutSuccess: 'logout.success' +} as const; +export type Logout200ResponseMsgEnum = typeof Logout200ResponseMsgEnum[keyof typeof Logout200ResponseMsgEnum]; + + +/** + * Check if a given object implements the Logout200Response interface. + */ +export function instanceOfLogout200Response(value: object): value is Logout200Response { + if (!('kind' in value) || value['kind'] === undefined) return false; + if (!('msg' in value) || value['msg'] === undefined) return false; + return true; +} + +export function Logout200ResponseFromJSON(json: any): Logout200Response { + return Logout200ResponseFromJSONTyped(json, false); +} + +export function Logout200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): Logout200Response { + if (json == null) { + return json; + } + return { + + 'kind': json['kind'], + 'msg': json['msg'], + }; +} + +export function Logout200ResponseToJSON(json: any): Logout200Response { + return Logout200ResponseToJSONTyped(json, false); +} + +export function Logout200ResponseToJSONTyped(value?: Logout200Response | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'kind': value['kind'], + 'msg': value['msg'], + }; +} + diff --git a/frontend/src/api/generated/models/Signin200Response.ts b/frontend/src/api/generated/models/Signin200Response.ts new file mode 100644 index 0000000..2152fd0 --- /dev/null +++ b/frontend/src/api/generated/models/Signin200Response.ts @@ -0,0 +1,110 @@ +/* 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.0 + * + * + * 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'; +import type { Signin200ResponsePayload } from './Signin200ResponsePayload'; +import { + Signin200ResponsePayloadFromJSON, + Signin200ResponsePayloadFromJSONTyped, + Signin200ResponsePayloadToJSON, + Signin200ResponsePayloadToJSONTyped, +} from './Signin200ResponsePayload'; + +/** + * + * @export + * @interface Signin200Response + */ +export interface Signin200Response { + /** + * + * @type {string} + * @memberof Signin200Response + */ + kind: Signin200ResponseKindEnum; + /** + * + * @type {string} + * @memberof Signin200Response + */ + msg: Signin200ResponseMsgEnum; + /** + * + * @type {Signin200ResponsePayload} + * @memberof Signin200Response + */ + payload: Signin200ResponsePayload; +} + + +/** + * @export + */ +export const Signin200ResponseKindEnum = { + Success: 'success' +} as const; +export type Signin200ResponseKindEnum = typeof Signin200ResponseKindEnum[keyof typeof Signin200ResponseKindEnum]; + +/** + * @export + */ +export const Signin200ResponseMsgEnum = { + SigninSuccess: 'signin.success' +} as const; +export type Signin200ResponseMsgEnum = typeof Signin200ResponseMsgEnum[keyof typeof Signin200ResponseMsgEnum]; + + +/** + * Check if a given object implements the Signin200Response interface. + */ +export function instanceOfSignin200Response(value: object): value is Signin200Response { + if (!('kind' in value) || value['kind'] === undefined) return false; + if (!('msg' in value) || value['msg'] === undefined) return false; + if (!('payload' in value) || value['payload'] === undefined) return false; + return true; +} + +export function Signin200ResponseFromJSON(json: any): Signin200Response { + return Signin200ResponseFromJSONTyped(json, false); +} + +export function Signin200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): Signin200Response { + if (json == null) { + return json; + } + return { + + 'kind': json['kind'], + 'msg': json['msg'], + 'payload': Signin200ResponsePayloadFromJSON(json['payload']), + }; +} + +export function Signin200ResponseToJSON(json: any): Signin200Response { + return Signin200ResponseToJSONTyped(json, false); +} + +export function Signin200ResponseToJSONTyped(value?: Signin200Response | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'kind': value['kind'], + 'msg': value['msg'], + 'payload': Signin200ResponsePayloadToJSON(value['payload']), + }; +} + diff --git a/frontend/src/api/generated/models/Signin200ResponsePayload.ts b/frontend/src/api/generated/models/Signin200ResponsePayload.ts new file mode 100644 index 0000000..22c9009 --- /dev/null +++ b/frontend/src/api/generated/models/Signin200ResponsePayload.ts @@ -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.0 + * + * + * 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 Signin200ResponsePayload + */ +export interface Signin200ResponsePayload { + /** + * the JWT token + * @type {string} + * @memberof Signin200ResponsePayload + */ + token: string; +} + +/** + * Check if a given object implements the Signin200ResponsePayload interface. + */ +export function instanceOfSignin200ResponsePayload(value: object): value is Signin200ResponsePayload { + if (!('token' in value) || value['token'] === undefined) return false; + return true; +} + +export function Signin200ResponsePayloadFromJSON(json: any): Signin200ResponsePayload { + return Signin200ResponsePayloadFromJSONTyped(json, false); +} + +export function Signin200ResponsePayloadFromJSONTyped(json: any, ignoreDiscriminator: boolean): Signin200ResponsePayload { + if (json == null) { + return json; + } + return { + + 'token': json['token'], + }; +} + +export function Signin200ResponsePayloadToJSON(json: any): Signin200ResponsePayload { + return Signin200ResponsePayloadToJSONTyped(json, false); +} + +export function Signin200ResponsePayloadToJSONTyped(value?: Signin200ResponsePayload | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'token': value['token'], + }; +} + diff --git a/frontend/src/api/generated/models/Signin400Response.ts b/frontend/src/api/generated/models/Signin400Response.ts new file mode 100644 index 0000000..481db80 --- /dev/null +++ b/frontend/src/api/generated/models/Signin400Response.ts @@ -0,0 +1,99 @@ +/* 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.0 + * + * + * 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 Signin400Response + */ +export interface Signin400Response { + /** + * + * @type {string} + * @memberof Signin400Response + */ + kind: Signin400ResponseKindEnum; + /** + * + * @type {string} + * @memberof Signin400Response + */ + msg: Signin400ResponseMsgEnum; +} + + +/** + * @export + */ +export const Signin400ResponseKindEnum = { + Failed: 'failed' +} as const; +export type Signin400ResponseKindEnum = typeof Signin400ResponseKindEnum[keyof typeof Signin400ResponseKindEnum]; + +/** + * @export + */ +export const Signin400ResponseMsgEnum = { + SigninFailedUsernameExisting: 'signin.failed.username.existing', + SigninFailedUsernameToolong: 'signin.failed.username.toolong', + SigninFailedUsernameTooshort: 'signin.failed.username.tooshort', + SigninFailedUsernameInvalid: 'signin.failed.username.invalid', + SigninFailedPasswordToolong: 'signin.failed.password.toolong', + SigninFailedPasswordTooshort: 'signin.failed.password.tooshort', + SigninFailedPasswordInvalid: 'signin.failed.password.invalid' +} as const; +export type Signin400ResponseMsgEnum = typeof Signin400ResponseMsgEnum[keyof typeof Signin400ResponseMsgEnum]; + + +/** + * Check if a given object implements the Signin400Response interface. + */ +export function instanceOfSignin400Response(value: object): value is Signin400Response { + if (!('kind' in value) || value['kind'] === undefined) return false; + if (!('msg' in value) || value['msg'] === undefined) return false; + return true; +} + +export function Signin400ResponseFromJSON(json: any): Signin400Response { + return Signin400ResponseFromJSONTyped(json, false); +} + +export function Signin400ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): Signin400Response { + if (json == null) { + return json; + } + return { + + 'kind': json['kind'], + 'msg': json['msg'], + }; +} + +export function Signin400ResponseToJSON(json: any): Signin400Response { + return Signin400ResponseToJSONTyped(json, false); +} + +export function Signin400ResponseToJSONTyped(value?: Signin400Response | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'kind': value['kind'], + 'msg': value['msg'], + }; +} + diff --git a/frontend/src/api/generated/models/Signin500Response.ts b/frontend/src/api/generated/models/Signin500Response.ts new file mode 100644 index 0000000..cb56f56 --- /dev/null +++ b/frontend/src/api/generated/models/Signin500Response.ts @@ -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.0 + * + * + * 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 Signin500Response + */ +export interface Signin500Response { + /** + * + * @type {string} + * @memberof Signin500Response + */ + kind: Signin500ResponseKindEnum; + /** + * + * @type {string} + * @memberof Signin500Response + */ + msg: Signin500ResponseMsgEnum; +} + + +/** + * @export + */ +export const Signin500ResponseKindEnum = { + Failed: 'failed' +} as const; +export type Signin500ResponseKindEnum = typeof Signin500ResponseKindEnum[keyof typeof Signin500ResponseKindEnum]; + +/** + * @export + */ +export const Signin500ResponseMsgEnum = { + SigninFailedGeneric: 'signin.failed.generic' +} as const; +export type Signin500ResponseMsgEnum = typeof Signin500ResponseMsgEnum[keyof typeof Signin500ResponseMsgEnum]; + + +/** + * Check if a given object implements the Signin500Response interface. + */ +export function instanceOfSignin500Response(value: object): value is Signin500Response { + if (!('kind' in value) || value['kind'] === undefined) return false; + if (!('msg' in value) || value['msg'] === undefined) return false; + return true; +} + +export function Signin500ResponseFromJSON(json: any): Signin500Response { + return Signin500ResponseFromJSONTyped(json, false); +} + +export function Signin500ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): Signin500Response { + if (json == null) { + return json; + } + return { + + 'kind': json['kind'], + 'msg': json['msg'], + }; +} + +export function Signin500ResponseToJSON(json: any): Signin500Response { + return Signin500ResponseToJSONTyped(json, false); +} + +export function Signin500ResponseToJSONTyped(value?: Signin500Response | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'kind': value['kind'], + 'msg': value['msg'], + }; +} + diff --git a/frontend/src/api/generated/models/StatusOtp200Response.ts b/frontend/src/api/generated/models/StatusOtp200Response.ts new file mode 100644 index 0000000..bb26732 --- /dev/null +++ b/frontend/src/api/generated/models/StatusOtp200Response.ts @@ -0,0 +1,124 @@ +/* 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.0 + * + * + * 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'; +import type { EnableOtp200ResponsePayload } from './EnableOtp200ResponsePayload'; +import { + EnableOtp200ResponsePayloadFromJSON, + EnableOtp200ResponsePayloadFromJSONTyped, + EnableOtp200ResponsePayloadToJSON, + EnableOtp200ResponsePayloadToJSONTyped, +} from './EnableOtp200ResponsePayload'; +import type { StatusOtp200ResponseAnyOf } from './StatusOtp200ResponseAnyOf'; +import { + StatusOtp200ResponseAnyOfFromJSON, + StatusOtp200ResponseAnyOfFromJSONTyped, + StatusOtp200ResponseAnyOfToJSON, + StatusOtp200ResponseAnyOfToJSONTyped, +} from './StatusOtp200ResponseAnyOf'; +import type { StatusOtp200ResponseAnyOf1 } from './StatusOtp200ResponseAnyOf1'; +import { + StatusOtp200ResponseAnyOf1FromJSON, + StatusOtp200ResponseAnyOf1FromJSONTyped, + StatusOtp200ResponseAnyOf1ToJSON, + StatusOtp200ResponseAnyOf1ToJSONTyped, +} from './StatusOtp200ResponseAnyOf1'; + +/** + * + * @export + * @interface StatusOtp200Response + */ +export interface StatusOtp200Response { + /** + * + * @type {string} + * @memberof StatusOtp200Response + */ + kind: StatusOtp200ResponseKindEnum; + /** + * + * @type {string} + * @memberof StatusOtp200Response + */ + msg: StatusOtp200ResponseMsgEnum; + /** + * + * @type {EnableOtp200ResponsePayload} + * @memberof StatusOtp200Response + */ + payload: EnableOtp200ResponsePayload; +} + + +/** + * @export + */ +export const StatusOtp200ResponseKindEnum = { + Success: 'success' +} as const; +export type StatusOtp200ResponseKindEnum = typeof StatusOtp200ResponseKindEnum[keyof typeof StatusOtp200ResponseKindEnum]; + +/** + * @export + */ +export const StatusOtp200ResponseMsgEnum = { + StatusOtpSuccessDisabled: 'statusOtp.success.disabled' +} as const; +export type StatusOtp200ResponseMsgEnum = typeof StatusOtp200ResponseMsgEnum[keyof typeof StatusOtp200ResponseMsgEnum]; + + +/** + * Check if a given object implements the StatusOtp200Response interface. + */ +export function instanceOfStatusOtp200Response(value: object): value is StatusOtp200Response { + if (!('kind' in value) || value['kind'] === undefined) return false; + if (!('msg' in value) || value['msg'] === undefined) return false; + if (!('payload' in value) || value['payload'] === undefined) return false; + return true; +} + +export function StatusOtp200ResponseFromJSON(json: any): StatusOtp200Response { + return StatusOtp200ResponseFromJSONTyped(json, false); +} + +export function StatusOtp200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): StatusOtp200Response { + if (json == null) { + return json; + } + return { + + 'kind': json['kind'], + 'msg': json['msg'], + 'payload': EnableOtp200ResponsePayloadFromJSON(json['payload']), + }; +} + +export function StatusOtp200ResponseToJSON(json: any): StatusOtp200Response { + return StatusOtp200ResponseToJSONTyped(json, false); +} + +export function StatusOtp200ResponseToJSONTyped(value?: StatusOtp200Response | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'kind': value['kind'], + 'msg': value['msg'], + 'payload': EnableOtp200ResponsePayloadToJSON(value['payload']), + }; +} + diff --git a/frontend/src/api/generated/models/StatusOtp200ResponseAnyOf.ts b/frontend/src/api/generated/models/StatusOtp200ResponseAnyOf.ts new file mode 100644 index 0000000..778ea46 --- /dev/null +++ b/frontend/src/api/generated/models/StatusOtp200ResponseAnyOf.ts @@ -0,0 +1,110 @@ +/* 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.0 + * + * + * 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'; +import type { EnableOtp200ResponsePayload } from './EnableOtp200ResponsePayload'; +import { + EnableOtp200ResponsePayloadFromJSON, + EnableOtp200ResponsePayloadFromJSONTyped, + EnableOtp200ResponsePayloadToJSON, + EnableOtp200ResponsePayloadToJSONTyped, +} from './EnableOtp200ResponsePayload'; + +/** + * + * @export + * @interface StatusOtp200ResponseAnyOf + */ +export interface StatusOtp200ResponseAnyOf { + /** + * + * @type {string} + * @memberof StatusOtp200ResponseAnyOf + */ + kind: StatusOtp200ResponseAnyOfKindEnum; + /** + * + * @type {string} + * @memberof StatusOtp200ResponseAnyOf + */ + msg: StatusOtp200ResponseAnyOfMsgEnum; + /** + * + * @type {EnableOtp200ResponsePayload} + * @memberof StatusOtp200ResponseAnyOf + */ + payload: EnableOtp200ResponsePayload; +} + + +/** + * @export + */ +export const StatusOtp200ResponseAnyOfKindEnum = { + Success: 'success' +} as const; +export type StatusOtp200ResponseAnyOfKindEnum = typeof StatusOtp200ResponseAnyOfKindEnum[keyof typeof StatusOtp200ResponseAnyOfKindEnum]; + +/** + * @export + */ +export const StatusOtp200ResponseAnyOfMsgEnum = { + StatusOtpSuccessEnabled: 'statusOtp.success.enabled' +} as const; +export type StatusOtp200ResponseAnyOfMsgEnum = typeof StatusOtp200ResponseAnyOfMsgEnum[keyof typeof StatusOtp200ResponseAnyOfMsgEnum]; + + +/** + * Check if a given object implements the StatusOtp200ResponseAnyOf interface. + */ +export function instanceOfStatusOtp200ResponseAnyOf(value: object): value is StatusOtp200ResponseAnyOf { + if (!('kind' in value) || value['kind'] === undefined) return false; + if (!('msg' in value) || value['msg'] === undefined) return false; + if (!('payload' in value) || value['payload'] === undefined) return false; + return true; +} + +export function StatusOtp200ResponseAnyOfFromJSON(json: any): StatusOtp200ResponseAnyOf { + return StatusOtp200ResponseAnyOfFromJSONTyped(json, false); +} + +export function StatusOtp200ResponseAnyOfFromJSONTyped(json: any, ignoreDiscriminator: boolean): StatusOtp200ResponseAnyOf { + if (json == null) { + return json; + } + return { + + 'kind': json['kind'], + 'msg': json['msg'], + 'payload': EnableOtp200ResponsePayloadFromJSON(json['payload']), + }; +} + +export function StatusOtp200ResponseAnyOfToJSON(json: any): StatusOtp200ResponseAnyOf { + return StatusOtp200ResponseAnyOfToJSONTyped(json, false); +} + +export function StatusOtp200ResponseAnyOfToJSONTyped(value?: StatusOtp200ResponseAnyOf | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'kind': value['kind'], + 'msg': value['msg'], + 'payload': EnableOtp200ResponsePayloadToJSON(value['payload']), + }; +} + diff --git a/frontend/src/api/generated/models/StatusOtp200ResponseAnyOf1.ts b/frontend/src/api/generated/models/StatusOtp200ResponseAnyOf1.ts new file mode 100644 index 0000000..4af4e30 --- /dev/null +++ b/frontend/src/api/generated/models/StatusOtp200ResponseAnyOf1.ts @@ -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.0 + * + * + * 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 StatusOtp200ResponseAnyOf1 + */ +export interface StatusOtp200ResponseAnyOf1 { + /** + * + * @type {string} + * @memberof StatusOtp200ResponseAnyOf1 + */ + kind: StatusOtp200ResponseAnyOf1KindEnum; + /** + * + * @type {string} + * @memberof StatusOtp200ResponseAnyOf1 + */ + msg: StatusOtp200ResponseAnyOf1MsgEnum; +} + + +/** + * @export + */ +export const StatusOtp200ResponseAnyOf1KindEnum = { + Success: 'success' +} as const; +export type StatusOtp200ResponseAnyOf1KindEnum = typeof StatusOtp200ResponseAnyOf1KindEnum[keyof typeof StatusOtp200ResponseAnyOf1KindEnum]; + +/** + * @export + */ +export const StatusOtp200ResponseAnyOf1MsgEnum = { + StatusOtpSuccessDisabled: 'statusOtp.success.disabled' +} as const; +export type StatusOtp200ResponseAnyOf1MsgEnum = typeof StatusOtp200ResponseAnyOf1MsgEnum[keyof typeof StatusOtp200ResponseAnyOf1MsgEnum]; + + +/** + * Check if a given object implements the StatusOtp200ResponseAnyOf1 interface. + */ +export function instanceOfStatusOtp200ResponseAnyOf1(value: object): value is StatusOtp200ResponseAnyOf1 { + if (!('kind' in value) || value['kind'] === undefined) return false; + if (!('msg' in value) || value['msg'] === undefined) return false; + return true; +} + +export function StatusOtp200ResponseAnyOf1FromJSON(json: any): StatusOtp200ResponseAnyOf1 { + return StatusOtp200ResponseAnyOf1FromJSONTyped(json, false); +} + +export function StatusOtp200ResponseAnyOf1FromJSONTyped(json: any, ignoreDiscriminator: boolean): StatusOtp200ResponseAnyOf1 { + if (json == null) { + return json; + } + return { + + 'kind': json['kind'], + 'msg': json['msg'], + }; +} + +export function StatusOtp200ResponseAnyOf1ToJSON(json: any): StatusOtp200ResponseAnyOf1 { + return StatusOtp200ResponseAnyOf1ToJSONTyped(json, false); +} + +export function StatusOtp200ResponseAnyOf1ToJSONTyped(value?: StatusOtp200ResponseAnyOf1 | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'kind': value['kind'], + 'msg': value['msg'], + }; +} + diff --git a/frontend/src/api/generated/models/StatusOtp500Response.ts b/frontend/src/api/generated/models/StatusOtp500Response.ts new file mode 100644 index 0000000..67544e8 --- /dev/null +++ b/frontend/src/api/generated/models/StatusOtp500Response.ts @@ -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.0 + * + * + * 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 StatusOtp500Response + */ +export interface StatusOtp500Response { + /** + * + * @type {string} + * @memberof StatusOtp500Response + */ + kind: StatusOtp500ResponseKindEnum; + /** + * + * @type {string} + * @memberof StatusOtp500Response + */ + msg: StatusOtp500ResponseMsgEnum; +} + + +/** + * @export + */ +export const StatusOtp500ResponseKindEnum = { + Failure: 'failure' +} as const; +export type StatusOtp500ResponseKindEnum = typeof StatusOtp500ResponseKindEnum[keyof typeof StatusOtp500ResponseKindEnum]; + +/** + * @export + */ +export const StatusOtp500ResponseMsgEnum = { + StatusOtpFailureGeneric: 'statusOtp.failure.generic' +} as const; +export type StatusOtp500ResponseMsgEnum = typeof StatusOtp500ResponseMsgEnum[keyof typeof StatusOtp500ResponseMsgEnum]; + + +/** + * Check if a given object implements the StatusOtp500Response interface. + */ +export function instanceOfStatusOtp500Response(value: object): value is StatusOtp500Response { + if (!('kind' in value) || value['kind'] === undefined) return false; + if (!('msg' in value) || value['msg'] === undefined) return false; + return true; +} + +export function StatusOtp500ResponseFromJSON(json: any): StatusOtp500Response { + return StatusOtp500ResponseFromJSONTyped(json, false); +} + +export function StatusOtp500ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): StatusOtp500Response { + if (json == null) { + return json; + } + return { + + 'kind': json['kind'], + 'msg': json['msg'], + }; +} + +export function StatusOtp500ResponseToJSON(json: any): StatusOtp500Response { + return StatusOtp500ResponseToJSONTyped(json, false); +} + +export function StatusOtp500ResponseToJSONTyped(value?: StatusOtp500Response | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'kind': value['kind'], + 'msg': value['msg'], + }; +} + diff --git a/frontend/src/api/generated/models/index.ts b/frontend/src/api/generated/models/index.ts new file mode 100644 index 0000000..95040a0 --- /dev/null +++ b/frontend/src/api/generated/models/index.ts @@ -0,0 +1,36 @@ +/* tslint:disable */ +/* eslint-disable */ +export * from './DisableOtp200Response'; +export * from './DisableOtp401Response'; +export * from './DisableOtp500Response'; +export * from './EnableOtp200Response'; +export * from './EnableOtp200ResponsePayload'; +export * from './GetUser200Response'; +export * from './GetUser200ResponsePayload'; +export * from './GetUser403Response'; +export * from './GetUser404Response'; +export * from './GetUserUserParameter'; +export * from './GuestLogin200Response'; +export * from './GuestLogin200ResponsePayload'; +export * from './GuestLogin500Response'; +export * from './Login200Response'; +export * from './Login202Response'; +export * from './Login202ResponsePayload'; +export * from './Login400Response'; +export * from './LoginOtp200Response'; +export * from './LoginOtp200ResponsePayload'; +export * from './LoginOtp400Response'; +export * from './LoginOtp401Response'; +export * from './LoginOtp408Response'; +export * from './LoginOtp500Response'; +export * from './LoginOtpRequest'; +export * from './LoginRequest'; +export * from './Logout200Response'; +export * from './Signin200Response'; +export * from './Signin200ResponsePayload'; +export * from './Signin400Response'; +export * from './Signin500Response'; +export * from './StatusOtp200Response'; +export * from './StatusOtp200ResponseAnyOf'; +export * from './StatusOtp200ResponseAnyOf1'; +export * from './StatusOtp500Response'; diff --git a/frontend/src/api/generated/runtime.ts b/frontend/src/api/generated/runtime.ts new file mode 100644 index 0000000..4bfad6e --- /dev/null +++ b/frontend/src/api/generated/runtime.ts @@ -0,0 +1,434 @@ +/* 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.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export const BASE_PATH = "https://local.maix.me:8888".replace(/\/+$/, ""); + +export interface ConfigurationParameters { + basePath?: string; // override base path + fetchApi?: FetchAPI; // override for fetch implementation + middleware?: Middleware[]; // middleware to apply before/after fetch requests + queryParamsStringify?: (params: HTTPQuery) => string; // stringify function for query strings + username?: string; // parameter for basic security + password?: string; // parameter for basic security + apiKey?: string | Promise | ((name: string) => string | Promise); // parameter for apiKey security + accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string | Promise); // parameter for oauth2 security + headers?: HTTPHeaders; //header params we want to use on every request + credentials?: RequestCredentials; //value for the credentials param we want to use on each request +} + +export class Configuration { + constructor(private configuration: ConfigurationParameters = {}) {} + + set config(configuration: Configuration) { + this.configuration = configuration; + } + + get basePath(): string { + return this.configuration.basePath != null ? this.configuration.basePath : BASE_PATH; + } + + get fetchApi(): FetchAPI | undefined { + return this.configuration.fetchApi; + } + + get middleware(): Middleware[] { + return this.configuration.middleware || []; + } + + get queryParamsStringify(): (params: HTTPQuery) => string { + return this.configuration.queryParamsStringify || querystring; + } + + get username(): string | undefined { + return this.configuration.username; + } + + get password(): string | undefined { + return this.configuration.password; + } + + get apiKey(): ((name: string) => string | Promise) | undefined { + const apiKey = this.configuration.apiKey; + if (apiKey) { + return typeof apiKey === 'function' ? apiKey : () => apiKey; + } + return undefined; + } + + get accessToken(): ((name?: string, scopes?: string[]) => string | Promise) | undefined { + const accessToken = this.configuration.accessToken; + if (accessToken) { + return typeof accessToken === 'function' ? accessToken : async () => accessToken; + } + return undefined; + } + + get headers(): HTTPHeaders | undefined { + return this.configuration.headers; + } + + get credentials(): RequestCredentials | undefined { + return this.configuration.credentials; + } +} + +export const DefaultConfig = new Configuration(); + +/** + * This is the base class for all generated API classes. + */ +export class BaseAPI { + + private static readonly jsonRegex = new RegExp('^(:?application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(:?;.*)?$', 'i'); + private middleware: Middleware[]; + + constructor(protected configuration = DefaultConfig) { + this.middleware = configuration.middleware; + } + + withMiddleware(this: T, ...middlewares: Middleware[]) { + const next = this.clone(); + next.middleware = next.middleware.concat(...middlewares); + return next; + } + + withPreMiddleware(this: T, ...preMiddlewares: Array) { + const middlewares = preMiddlewares.map((pre) => ({ pre })); + return this.withMiddleware(...middlewares); + } + + withPostMiddleware(this: T, ...postMiddlewares: Array) { + const middlewares = postMiddlewares.map((post) => ({ post })); + return this.withMiddleware(...middlewares); + } + + /** + * Check if the given MIME is a JSON MIME. + * JSON MIME examples: + * application/json + * application/json; charset=UTF8 + * APPLICATION/JSON + * application/vnd.company+json + * @param mime - MIME (Multipurpose Internet Mail Extensions) + * @return True if the given MIME is JSON, false otherwise. + */ + protected isJsonMime(mime: string | null | undefined): boolean { + if (!mime) { + return false; + } + return BaseAPI.jsonRegex.test(mime); + } + + protected async request(context: RequestOpts, initOverrides?: RequestInit | InitOverrideFunction): Promise { + const { url, init } = await this.createFetchParams(context, initOverrides); + const response = await this.fetchApi(url, init); + // CHANGED: Removed status code check to allow handling of all HTTP status codes (not just 200-299) + // Previously, this method would throw ResponseError for any status code outside 200-299. + // Now, all responses are returned regardless of status code, allowing the API methods + // to handle and return typed responses for all status codes defined in the OpenAPI spec. + // This enables typed access to error responses (4xx, 5xx) and other status codes. + return response; + } + + private async createFetchParams(context: RequestOpts, initOverrides?: RequestInit | InitOverrideFunction) { + let url = this.configuration.basePath + context.path; + if (context.query !== undefined && Object.keys(context.query).length !== 0) { + // only add the querystring to the URL if there are query parameters. + // this is done to avoid urls ending with a "?" character which buggy webservers + // do not handle correctly sometimes. + url += '?' + this.configuration.queryParamsStringify(context.query); + } + + const headers = Object.assign({}, this.configuration.headers, context.headers); + Object.keys(headers).forEach(key => headers[key] === undefined ? delete headers[key] : {}); + + const initOverrideFn = + typeof initOverrides === "function" + ? initOverrides + : async () => initOverrides; + + const initParams = { + method: context.method, + headers, + body: context.body, + credentials: this.configuration.credentials, + }; + + const overriddenInit: RequestInit = { + ...initParams, + ...(await initOverrideFn({ + init: initParams, + context, + })) + }; + + let body: any; + if (isFormData(overriddenInit.body) + || (overriddenInit.body instanceof URLSearchParams) + || isBlob(overriddenInit.body)) { + body = overriddenInit.body; + } else if (this.isJsonMime(headers['Content-Type'])) { + body = JSON.stringify(overriddenInit.body); + } else { + body = overriddenInit.body; + } + + const init: RequestInit = { + ...overriddenInit, + body + }; + + return { url, init }; + } + + private fetchApi = async (url: string, init: RequestInit) => { + let fetchParams = { url, init }; + for (const middleware of this.middleware) { + if (middleware.pre) { + fetchParams = await middleware.pre({ + fetch: this.fetchApi, + ...fetchParams, + }) || fetchParams; + } + } + let response: Response | undefined = undefined; + try { + response = await (this.configuration.fetchApi || fetch)(fetchParams.url, fetchParams.init); + } catch (e) { + for (const middleware of this.middleware) { + if (middleware.onError) { + response = await middleware.onError({ + fetch: this.fetchApi, + url: fetchParams.url, + init: fetchParams.init, + error: e, + response: response ? response.clone() : undefined, + }) || response; + } + } + if (response === undefined) { + if (e instanceof Error) { + throw new FetchError(e, 'The request failed and the interceptors did not return an alternative response'); + } else { + throw e; + } + } + } + for (const middleware of this.middleware) { + if (middleware.post) { + response = await middleware.post({ + fetch: this.fetchApi, + url: fetchParams.url, + init: fetchParams.init, + response: response.clone(), + }) || response; + } + } + return response; + } + + /** + * Create a shallow clone of `this` by constructing a new instance + * and then shallow cloning data members. + */ + private clone(this: T): T { + const constructor = this.constructor as any; + const next = new constructor(this.configuration); + next.middleware = this.middleware.slice(); + return next; + } +}; + +function isBlob(value: any): value is Blob { + return typeof Blob !== 'undefined' && value instanceof Blob; +} + +function isFormData(value: any): value is FormData { + return typeof FormData !== "undefined" && value instanceof FormData; +} + +export class ResponseError extends Error { + override name: "ResponseError" = "ResponseError"; + constructor(public response: Response, msg?: string) { + super(msg); + } +} + +export class FetchError extends Error { + override name: "FetchError" = "FetchError"; + constructor(public cause: Error, msg?: string) { + super(msg); + } +} + +export class RequiredError extends Error { + override name: "RequiredError" = "RequiredError"; + constructor(public field: string, msg?: string) { + super(msg); + } +} + +export const COLLECTION_FORMATS = { + csv: ",", + ssv: " ", + tsv: "\t", + pipes: "|", +}; + +export type FetchAPI = WindowOrWorkerGlobalScope['fetch']; + +export type Json = any; +export type HTTPMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'OPTIONS' | 'HEAD'; +export type HTTPHeaders = { [key: string]: string }; +export type HTTPQuery = { [key: string]: string | number | null | boolean | Array | Set | HTTPQuery }; +export type HTTPBody = Json | FormData | URLSearchParams; +export type HTTPRequestInit = { headers?: HTTPHeaders; method: HTTPMethod; credentials?: RequestCredentials; body?: HTTPBody }; +export type ModelPropertyNaming = 'camelCase' | 'snake_case' | 'PascalCase' | 'original'; + +export type InitOverrideFunction = (requestContext: { init: HTTPRequestInit, context: RequestOpts }) => Promise + +export interface FetchParams { + url: string; + init: RequestInit; +} + +export interface RequestOpts { + path: string; + method: HTTPMethod; + headers: HTTPHeaders; + query?: HTTPQuery; + body?: HTTPBody; +} + +export function querystring(params: HTTPQuery, prefix: string = ''): string { + return Object.keys(params) + .map(key => querystringSingleKey(key, params[key], prefix)) + .filter(part => part.length > 0) + .join('&'); +} + +function querystringSingleKey(key: string, value: string | number | null | undefined | boolean | Array | Set | HTTPQuery, keyPrefix: string = ''): string { + const fullKey = keyPrefix + (keyPrefix.length ? `[${key}]` : key); + if (value instanceof Array) { + const multiValue = value.map(singleValue => encodeURIComponent(String(singleValue))) + .join(`&${encodeURIComponent(fullKey)}=`); + return `${encodeURIComponent(fullKey)}=${multiValue}`; + } + if (value instanceof Set) { + const valueAsArray = Array.from(value); + return querystringSingleKey(key, valueAsArray, keyPrefix); + } + if (value instanceof Date) { + return `${encodeURIComponent(fullKey)}=${encodeURIComponent(value.toISOString())}`; + } + if (value instanceof Object) { + return querystring(value as HTTPQuery, fullKey); + } + return `${encodeURIComponent(fullKey)}=${encodeURIComponent(String(value))}`; +} + +export function exists(json: any, key: string) { + const value = json[key]; + return value !== null && value !== undefined; +} + +export function mapValues(data: any, fn: (item: any) => any) { + const result: { [key: string]: any } = {}; + for (const key of Object.keys(data)) { + result[key] = fn(data[key]); + } + return result; +} + +export function canConsumeForm(consumes: Consume[]): boolean { + for (const consume of consumes) { + if ('multipart/form-data' === consume.contentType) { + return true; + } + } + return false; +} + +export interface Consume { + contentType: string; +} + +export interface RequestContext { + fetch: FetchAPI; + url: string; + init: RequestInit; +} + +export interface ResponseContext { + fetch: FetchAPI; + url: string; + init: RequestInit; + response: Response; +} + +export interface ErrorContext { + fetch: FetchAPI; + url: string; + init: RequestInit; + error: unknown; + response?: Response; +} + +export interface Middleware { + pre?(context: RequestContext): Promise; + post?(context: ResponseContext): Promise; + onError?(context: ErrorContext): Promise; +} + +export interface ApiResponse { + raw: Response; + value(): Promise; +} + +export interface ResponseTransformer { + (json: any): T; +} + +export class JSONApiResponse { + constructor(public raw: Response, private transformer: ResponseTransformer = (jsonValue: any) => jsonValue) {} + + async value(): Promise { + return this.transformer(await this.raw.json()); + } +} + +export class VoidApiResponse { + constructor(public raw: Response) {} + + async value(): Promise { + return undefined; + } +} + +export class BlobApiResponse { + constructor(public raw: Response) {} + + async value(): Promise { + return await this.raw.blob(); + }; +} + +export class TextApiResponse { + constructor(public raw: Response) {} + + async value(): Promise { + return await this.raw.text(); + }; +} diff --git a/src/openapitools.json b/src/openapitools.json new file mode 100644 index 0000000..f052220 --- /dev/null +++ b/src/openapitools.json @@ -0,0 +1,7 @@ +{ + "$schema": "./node_modules/@openapitools/openapi-generator-cli/config.schema.json", + "spaces": 2, + "generator-cli": { + "version": "7.17.0" + } +}