feat(chat): added base for chat service
added front html nigel in the mud route function with openapi - gen clean up the code a little after pull request
This commit is contained in:
parent
73a4946d17
commit
9ce9fa44e4
122 changed files with 9354 additions and 2615 deletions
|
|
@ -46,6 +46,7 @@
|
|||
<script type="module" src="/src/routing/"></script>
|
||||
<script type="module" src="/src/toast/"></script>
|
||||
<script type="module" src="/src/auth/"></script>
|
||||
<script type="module" src="/src/chat/"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -11,13 +11,14 @@
|
|||
"devDependencies": {
|
||||
"@types/js-cookie": "^3.0.6",
|
||||
"typescript": "~5.9.3",
|
||||
"vite": "^7.1.10",
|
||||
"vite": "^7.2.2",
|
||||
"vite-tsconfig-paths": "^5.1.4"
|
||||
},
|
||||
"dependencies": {
|
||||
"@tailwindcss/vite": "^4.1.16",
|
||||
"@openapitools/openapi-generator-cli": "^2.25.0",
|
||||
"@tailwindcss/vite": "^4.1.17",
|
||||
"js-cookie": "^3.0.5",
|
||||
"openapi-fetch": "^0.15.0",
|
||||
"tailwindcss": "^4.1.16"
|
||||
"tailwindcss": "^4.1.17"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
1930
frontend/pnpm-lock.yaml
generated
1930
frontend/pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load diff
|
|
@ -1,47 +1,14 @@
|
|||
.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/ChatTest200Response.ts
|
||||
models/DisableOtp200Response.ts
|
||||
models/DisableOtp401Response.ts
|
||||
models/DisableOtp500Response.ts
|
||||
models/EnableOtp200Response.ts
|
||||
models/EnableOtp200ResponsePayload.ts
|
||||
models/EnableOtp401Response.ts
|
||||
models/EnableOtp401ResponseAnyOf.ts
|
||||
models/GetUser200Response.ts
|
||||
models/GetUser200ResponsePayload.ts
|
||||
models/GetUser403Response.ts
|
||||
|
|
@ -70,6 +37,7 @@ models/Signin500Response.ts
|
|||
models/StatusOtp200Response.ts
|
||||
models/StatusOtp200ResponseAnyOf.ts
|
||||
models/StatusOtp200ResponseAnyOf1.ts
|
||||
models/StatusOtp401Response.ts
|
||||
models/StatusOtp500Response.ts
|
||||
models/index.ts
|
||||
runtime.ts
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
7.17.0
|
||||
7.15.0
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
* @fastify/swagger
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 9.6.0
|
||||
* The version of the OpenAPI document: 9.6.1
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
|
@ -15,10 +15,12 @@
|
|||
|
||||
import * as runtime from '../runtime';
|
||||
import type {
|
||||
ChatTest200Response,
|
||||
DisableOtp200Response,
|
||||
DisableOtp401Response,
|
||||
DisableOtp500Response,
|
||||
EnableOtp200Response,
|
||||
EnableOtp401Response,
|
||||
GetUser200Response,
|
||||
GetUser403Response,
|
||||
GetUser404Response,
|
||||
|
|
@ -40,9 +42,12 @@ import type {
|
|||
Signin400Response,
|
||||
Signin500Response,
|
||||
StatusOtp200Response,
|
||||
StatusOtp401Response,
|
||||
StatusOtp500Response,
|
||||
} from '../models/index';
|
||||
import {
|
||||
ChatTest200ResponseFromJSON,
|
||||
ChatTest200ResponseToJSON,
|
||||
DisableOtp200ResponseFromJSON,
|
||||
DisableOtp200ResponseToJSON,
|
||||
DisableOtp401ResponseFromJSON,
|
||||
|
|
@ -51,6 +56,8 @@ import {
|
|||
DisableOtp500ResponseToJSON,
|
||||
EnableOtp200ResponseFromJSON,
|
||||
EnableOtp200ResponseToJSON,
|
||||
EnableOtp401ResponseFromJSON,
|
||||
EnableOtp401ResponseToJSON,
|
||||
GetUser200ResponseFromJSON,
|
||||
GetUser200ResponseToJSON,
|
||||
GetUser403ResponseFromJSON,
|
||||
|
|
@ -93,6 +100,8 @@ import {
|
|||
Signin500ResponseToJSON,
|
||||
StatusOtp200ResponseFromJSON,
|
||||
StatusOtp200ResponseToJSON,
|
||||
StatusOtp401ResponseFromJSON,
|
||||
StatusOtp401ResponseToJSON,
|
||||
StatusOtp500ResponseFromJSON,
|
||||
StatusOtp500ResponseToJSON,
|
||||
} from '../models/index';
|
||||
|
|
@ -118,6 +127,48 @@ export interface SigninRequest {
|
|||
*/
|
||||
export class OpenapiOtherApi extends runtime.BaseAPI {
|
||||
|
||||
/**
|
||||
*/
|
||||
async chatTestRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ChatTest200Response | StatusOtp401Response>> {
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
|
||||
let urlPath = `/api/chat/test`;
|
||||
|
||||
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) => ChatTest200ResponseFromJSON(jsonValue));
|
||||
}
|
||||
if (response.status === 401) {
|
||||
// Object response for status 401
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => StatusOtp401ResponseFromJSON(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 chatTest(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ChatTest200Response | StatusOtp401Response> {
|
||||
const response = await this.chatTestRaw(initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
*/
|
||||
async disableOtpRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DisableOtp200Response | DisableOtp401Response | DisableOtp500Response>> {
|
||||
|
|
@ -166,7 +217,7 @@ export class OpenapiOtherApi extends runtime.BaseAPI {
|
|||
|
||||
/**
|
||||
*/
|
||||
async enableOtpRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<EnableOtp200Response | DisableOtp401Response>> {
|
||||
async enableOtpRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<EnableOtp200Response | EnableOtp401Response>> {
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
|
@ -191,7 +242,7 @@ export class OpenapiOtherApi extends runtime.BaseAPI {
|
|||
}
|
||||
if (response.status === 401) {
|
||||
// Object response for status 401
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => DisableOtp401ResponseFromJSON(jsonValue));
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => EnableOtp401ResponseFromJSON(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
|
||||
|
|
@ -201,14 +252,14 @@ export class OpenapiOtherApi extends runtime.BaseAPI {
|
|||
|
||||
/**
|
||||
*/
|
||||
async enableOtp(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<EnableOtp200Response | DisableOtp401Response> {
|
||||
async enableOtp(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<EnableOtp200Response | EnableOtp401Response> {
|
||||
const response = await this.enableOtpRaw(initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
*/
|
||||
async getUserRaw(requestParameters: GetUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetUser200Response | DisableOtp401Response | GetUser403Response | GetUser404Response>> {
|
||||
async getUserRaw(requestParameters: GetUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetUser200Response | StatusOtp401Response | GetUser403Response | GetUser404Response>> {
|
||||
if (requestParameters['user'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'user',
|
||||
|
|
@ -241,7 +292,7 @@ export class OpenapiOtherApi extends runtime.BaseAPI {
|
|||
}
|
||||
if (response.status === 401) {
|
||||
// Object response for status 401
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => DisableOtp401ResponseFromJSON(jsonValue));
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => StatusOtp401ResponseFromJSON(jsonValue));
|
||||
}
|
||||
if (response.status === 403) {
|
||||
// Object response for status 403
|
||||
|
|
@ -259,7 +310,7 @@ export class OpenapiOtherApi extends runtime.BaseAPI {
|
|||
|
||||
/**
|
||||
*/
|
||||
async getUser(requestParameters: GetUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetUser200Response | DisableOtp401Response | GetUser403Response | GetUser404Response> {
|
||||
async getUser(requestParameters: GetUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetUser200Response | StatusOtp401Response | GetUser403Response | GetUser404Response> {
|
||||
const response = await this.getUserRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
|
@ -522,7 +573,7 @@ export class OpenapiOtherApi extends runtime.BaseAPI {
|
|||
|
||||
/**
|
||||
*/
|
||||
async statusOtpRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<StatusOtp200Response | DisableOtp401Response | StatusOtp500Response>> {
|
||||
async statusOtpRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<StatusOtp200Response | StatusOtp401Response | StatusOtp500Response>> {
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
|
@ -547,7 +598,7 @@ export class OpenapiOtherApi extends runtime.BaseAPI {
|
|||
}
|
||||
if (response.status === 401) {
|
||||
// Object response for status 401
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => DisableOtp401ResponseFromJSON(jsonValue));
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => StatusOtp401ResponseFromJSON(jsonValue));
|
||||
}
|
||||
if (response.status === 500) {
|
||||
// Object response for status 500
|
||||
|
|
@ -561,7 +612,7 @@ export class OpenapiOtherApi extends runtime.BaseAPI {
|
|||
|
||||
/**
|
||||
*/
|
||||
async statusOtp(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<StatusOtp200Response | DisableOtp401Response | StatusOtp500Response> {
|
||||
async statusOtp(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<StatusOtp200Response | StatusOtp401Response | StatusOtp500Response> {
|
||||
const response = await this.statusOtpRaw(initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,36 +0,0 @@
|
|||
|
||||
# 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)
|
||||
|
||||
|
||||
|
|
@ -1,36 +0,0 @@
|
|||
|
||||
# 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)
|
||||
|
||||
|
||||
|
|
@ -1,38 +0,0 @@
|
|||
|
||||
# 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)
|
||||
|
||||
|
||||
|
|
@ -1,34 +0,0 @@
|
|||
|
||||
# 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)
|
||||
|
||||
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
|
||||
# StatusOtp500Response
|
||||
# EnableOtp401Response
|
||||
|
||||
|
||||
## Properties
|
||||
|
|
@ -12,13 +12,13 @@ Name | Type
|
|||
## Example
|
||||
|
||||
```typescript
|
||||
import type { StatusOtp500Response } from ''
|
||||
import type { EnableOtp401Response } from ''
|
||||
|
||||
// TODO: Update the object below with actual values
|
||||
const example = {
|
||||
"kind": null,
|
||||
"msg": null,
|
||||
} satisfies StatusOtp500Response
|
||||
} satisfies EnableOtp401Response
|
||||
|
||||
console.log(example)
|
||||
|
||||
|
|
@ -27,7 +27,7 @@ const exampleJSON: string = JSON.stringify(example)
|
|||
console.log(exampleJSON)
|
||||
|
||||
// Parse the JSON string back to an object
|
||||
const exampleParsed = JSON.parse(exampleJSON) as StatusOtp500Response
|
||||
const exampleParsed = JSON.parse(exampleJSON) as EnableOtp401Response
|
||||
console.log(exampleParsed)
|
||||
```
|
||||
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
|
||||
# DisableOtp200Response
|
||||
# EnableOtp401ResponseAnyOf
|
||||
|
||||
|
||||
## Properties
|
||||
|
|
@ -12,13 +12,13 @@ Name | Type
|
|||
## Example
|
||||
|
||||
```typescript
|
||||
import type { DisableOtp200Response } from ''
|
||||
import type { EnableOtp401ResponseAnyOf } from ''
|
||||
|
||||
// TODO: Update the object below with actual values
|
||||
const example = {
|
||||
"kind": null,
|
||||
"msg": null,
|
||||
} satisfies DisableOtp200Response
|
||||
} satisfies EnableOtp401ResponseAnyOf
|
||||
|
||||
console.log(example)
|
||||
|
||||
|
|
@ -27,7 +27,7 @@ const exampleJSON: string = JSON.stringify(example)
|
|||
console.log(exampleJSON)
|
||||
|
||||
// Parse the JSON string back to an object
|
||||
const exampleParsed = JSON.parse(exampleJSON) as DisableOtp200Response
|
||||
const exampleParsed = JSON.parse(exampleJSON) as EnableOtp401ResponseAnyOf
|
||||
console.log(exampleParsed)
|
||||
```
|
||||
|
||||
|
|
@ -1,38 +0,0 @@
|
|||
|
||||
# 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)
|
||||
|
||||
|
||||
|
|
@ -1,38 +0,0 @@
|
|||
|
||||
# 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)
|
||||
|
||||
|
||||
|
|
@ -1,36 +0,0 @@
|
|||
|
||||
# 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)
|
||||
|
||||
|
||||
|
|
@ -1,36 +0,0 @@
|
|||
|
||||
# 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)
|
||||
|
||||
|
||||
|
|
@ -1,32 +0,0 @@
|
|||
|
||||
# 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)
|
||||
|
||||
|
||||
|
|
@ -1,38 +0,0 @@
|
|||
|
||||
# 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)
|
||||
|
||||
|
||||
|
|
@ -1,34 +0,0 @@
|
|||
|
||||
# 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)
|
||||
|
||||
|
||||
|
|
@ -1,36 +0,0 @@
|
|||
|
||||
# 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)
|
||||
|
||||
|
||||
|
|
@ -1,38 +0,0 @@
|
|||
|
||||
# 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)
|
||||
|
||||
|
||||
|
|
@ -1,38 +0,0 @@
|
|||
|
||||
# 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)
|
||||
|
||||
|
||||
|
|
@ -1,34 +0,0 @@
|
|||
|
||||
# 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)
|
||||
|
||||
|
||||
|
|
@ -1,38 +0,0 @@
|
|||
|
||||
# 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)
|
||||
|
||||
|
||||
|
|
@ -1,34 +0,0 @@
|
|||
|
||||
# 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)
|
||||
|
||||
|
||||
|
|
@ -1,36 +0,0 @@
|
|||
|
||||
# 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)
|
||||
|
||||
|
||||
|
|
@ -1,36 +0,0 @@
|
|||
|
||||
# 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)
|
||||
|
||||
|
||||
|
|
@ -1,36 +0,0 @@
|
|||
|
||||
# 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)
|
||||
|
||||
|
||||
|
|
@ -1,36 +0,0 @@
|
|||
|
||||
# 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)
|
||||
|
||||
|
||||
|
|
@ -1,36 +0,0 @@
|
|||
|
||||
# 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)
|
||||
|
||||
|
||||
|
|
@ -1,36 +0,0 @@
|
|||
|
||||
# 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)
|
||||
|
||||
|
||||
|
|
@ -1,36 +0,0 @@
|
|||
|
||||
# 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)
|
||||
|
||||
|
||||
|
|
@ -1,579 +0,0 @@
|
|||
# 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)
|
||||
|
||||
|
|
@ -1,38 +0,0 @@
|
|||
|
||||
# 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)
|
||||
|
||||
|
||||
|
|
@ -1,34 +0,0 @@
|
|||
|
||||
# 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)
|
||||
|
||||
|
||||
|
|
@ -1,36 +0,0 @@
|
|||
|
||||
# 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)
|
||||
|
||||
|
||||
|
|
@ -1,36 +0,0 @@
|
|||
|
||||
# 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)
|
||||
|
||||
|
||||
|
|
@ -1,38 +0,0 @@
|
|||
|
||||
# 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)
|
||||
|
||||
|
||||
|
|
@ -1,38 +0,0 @@
|
|||
|
||||
# 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)
|
||||
|
||||
|
||||
|
|
@ -1,36 +0,0 @@
|
|||
|
||||
# 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)
|
||||
|
||||
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
|
||||
# Login400Response
|
||||
# StatusOtp401Response
|
||||
|
||||
|
||||
## Properties
|
||||
|
|
@ -12,13 +12,13 @@ Name | Type
|
|||
## Example
|
||||
|
||||
```typescript
|
||||
import type { Login400Response } from ''
|
||||
import type { StatusOtp401Response } from ''
|
||||
|
||||
// TODO: Update the object below with actual values
|
||||
const example = {
|
||||
"kind": null,
|
||||
"msg": null,
|
||||
} satisfies Login400Response
|
||||
} satisfies StatusOtp401Response
|
||||
|
||||
console.log(example)
|
||||
|
||||
|
|
@ -27,7 +27,7 @@ const exampleJSON: string = JSON.stringify(example)
|
|||
console.log(exampleJSON)
|
||||
|
||||
// Parse the JSON string back to an object
|
||||
const exampleParsed = JSON.parse(exampleJSON) as Login400Response
|
||||
const exampleParsed = JSON.parse(exampleJSON) as StatusOtp401Response
|
||||
console.log(exampleParsed)
|
||||
```
|
||||
|
||||
110
frontend/src/api/generated/models/ChatTest200Response.ts
Normal file
110
frontend/src/api/generated/models/ChatTest200Response.ts
Normal file
|
|
@ -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.1
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
import type { GetUser200ResponsePayload } from './GetUser200ResponsePayload';
|
||||
import {
|
||||
GetUser200ResponsePayloadFromJSON,
|
||||
GetUser200ResponsePayloadFromJSONTyped,
|
||||
GetUser200ResponsePayloadToJSON,
|
||||
GetUser200ResponsePayloadToJSONTyped,
|
||||
} from './GetUser200ResponsePayload';
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface ChatTest200Response
|
||||
*/
|
||||
export interface ChatTest200Response {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ChatTest200Response
|
||||
*/
|
||||
kind: ChatTest200ResponseKindEnum;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ChatTest200Response
|
||||
*/
|
||||
msg: ChatTest200ResponseMsgEnum;
|
||||
/**
|
||||
*
|
||||
* @type {GetUser200ResponsePayload}
|
||||
* @memberof ChatTest200Response
|
||||
*/
|
||||
payload: GetUser200ResponsePayload;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @export
|
||||
*/
|
||||
export const ChatTest200ResponseKindEnum = {
|
||||
Success: 'success'
|
||||
} as const;
|
||||
export type ChatTest200ResponseKindEnum = typeof ChatTest200ResponseKindEnum[keyof typeof ChatTest200ResponseKindEnum];
|
||||
|
||||
/**
|
||||
* @export
|
||||
*/
|
||||
export const ChatTest200ResponseMsgEnum = {
|
||||
ChatSuccess: 'chat.success'
|
||||
} as const;
|
||||
export type ChatTest200ResponseMsgEnum = typeof ChatTest200ResponseMsgEnum[keyof typeof ChatTest200ResponseMsgEnum];
|
||||
|
||||
|
||||
/**
|
||||
* Check if a given object implements the ChatTest200Response interface.
|
||||
*/
|
||||
export function instanceOfChatTest200Response(value: object): value is ChatTest200Response {
|
||||
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 ChatTest200ResponseFromJSON(json: any): ChatTest200Response {
|
||||
return ChatTest200ResponseFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ChatTest200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ChatTest200Response {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'kind': json['kind'],
|
||||
'msg': json['msg'],
|
||||
'payload': GetUser200ResponsePayloadFromJSON(json['payload']),
|
||||
};
|
||||
}
|
||||
|
||||
export function ChatTest200ResponseToJSON(json: any): ChatTest200Response {
|
||||
return ChatTest200ResponseToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ChatTest200ResponseToJSONTyped(value?: ChatTest200Response | null, ignoreDiscriminator: boolean = false): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
'kind': value['kind'],
|
||||
'msg': value['msg'],
|
||||
'payload': GetUser200ResponsePayloadToJSON(value['payload']),
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -4,7 +4,7 @@
|
|||
* @fastify/swagger
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 9.6.0
|
||||
* The version of the OpenAPI document: 9.6.1
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
* @fastify/swagger
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 9.6.0
|
||||
* The version of the OpenAPI document: 9.6.1
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
* @fastify/swagger
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 9.6.0
|
||||
* The version of the OpenAPI document: 9.6.1
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
* @fastify/swagger
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 9.6.0
|
||||
* The version of the OpenAPI document: 9.6.1
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
* @fastify/swagger
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 9.6.0
|
||||
* The version of the OpenAPI document: 9.6.1
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
|
|
|||
111
frontend/src/api/generated/models/EnableOtp401Response.ts
Normal file
111
frontend/src/api/generated/models/EnableOtp401Response.ts
Normal file
|
|
@ -0,0 +1,111 @@
|
|||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* @fastify/swagger
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 9.6.1
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
import type { DisableOtp401Response } from './DisableOtp401Response';
|
||||
import {
|
||||
DisableOtp401ResponseFromJSON,
|
||||
DisableOtp401ResponseFromJSONTyped,
|
||||
DisableOtp401ResponseToJSON,
|
||||
DisableOtp401ResponseToJSONTyped,
|
||||
} from './DisableOtp401Response';
|
||||
import type { EnableOtp401ResponseAnyOf } from './EnableOtp401ResponseAnyOf';
|
||||
import {
|
||||
EnableOtp401ResponseAnyOfFromJSON,
|
||||
EnableOtp401ResponseAnyOfFromJSONTyped,
|
||||
EnableOtp401ResponseAnyOfToJSON,
|
||||
EnableOtp401ResponseAnyOfToJSONTyped,
|
||||
} from './EnableOtp401ResponseAnyOf';
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface EnableOtp401Response
|
||||
*/
|
||||
export interface EnableOtp401Response {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof EnableOtp401Response
|
||||
*/
|
||||
kind: EnableOtp401ResponseKindEnum;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof EnableOtp401Response
|
||||
*/
|
||||
msg: EnableOtp401ResponseMsgEnum;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @export
|
||||
*/
|
||||
export const EnableOtp401ResponseKindEnum = {
|
||||
NotLoggedIn: 'notLoggedIn'
|
||||
} as const;
|
||||
export type EnableOtp401ResponseKindEnum = typeof EnableOtp401ResponseKindEnum[keyof typeof EnableOtp401ResponseKindEnum];
|
||||
|
||||
/**
|
||||
* @export
|
||||
*/
|
||||
export const EnableOtp401ResponseMsgEnum = {
|
||||
AuthNoCookie: 'auth.noCookie',
|
||||
AuthInvalidKind: 'auth.invalidKind',
|
||||
AuthNoUser: 'auth.noUser',
|
||||
AuthInvalid: 'auth.invalid'
|
||||
} as const;
|
||||
export type EnableOtp401ResponseMsgEnum = typeof EnableOtp401ResponseMsgEnum[keyof typeof EnableOtp401ResponseMsgEnum];
|
||||
|
||||
|
||||
/**
|
||||
* Check if a given object implements the EnableOtp401Response interface.
|
||||
*/
|
||||
export function instanceOfEnableOtp401Response(value: object): value is EnableOtp401Response {
|
||||
if (!('kind' in value) || value['kind'] === undefined) return false;
|
||||
if (!('msg' in value) || value['msg'] === undefined) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
export function EnableOtp401ResponseFromJSON(json: any): EnableOtp401Response {
|
||||
return EnableOtp401ResponseFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function EnableOtp401ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): EnableOtp401Response {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'kind': json['kind'],
|
||||
'msg': json['msg'],
|
||||
};
|
||||
}
|
||||
|
||||
export function EnableOtp401ResponseToJSON(json: any): EnableOtp401Response {
|
||||
return EnableOtp401ResponseToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function EnableOtp401ResponseToJSONTyped(value?: EnableOtp401Response | null, ignoreDiscriminator: boolean = false): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
'kind': value['kind'],
|
||||
'msg': value['msg'],
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -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.1
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface EnableOtp401ResponseAnyOf
|
||||
*/
|
||||
export interface EnableOtp401ResponseAnyOf {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof EnableOtp401ResponseAnyOf
|
||||
*/
|
||||
kind: EnableOtp401ResponseAnyOfKindEnum;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof EnableOtp401ResponseAnyOf
|
||||
*/
|
||||
msg: EnableOtp401ResponseAnyOfMsgEnum;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @export
|
||||
*/
|
||||
export const EnableOtp401ResponseAnyOfKindEnum = {
|
||||
Failure: 'failure'
|
||||
} as const;
|
||||
export type EnableOtp401ResponseAnyOfKindEnum = typeof EnableOtp401ResponseAnyOfKindEnum[keyof typeof EnableOtp401ResponseAnyOfKindEnum];
|
||||
|
||||
/**
|
||||
* @export
|
||||
*/
|
||||
export const EnableOtp401ResponseAnyOfMsgEnum = {
|
||||
EnableOtpFailureNoUser: 'enableOtp.failure.noUser',
|
||||
EnableOtpFailureNoSecret: 'enableOtp.failure.noSecret'
|
||||
} as const;
|
||||
export type EnableOtp401ResponseAnyOfMsgEnum = typeof EnableOtp401ResponseAnyOfMsgEnum[keyof typeof EnableOtp401ResponseAnyOfMsgEnum];
|
||||
|
||||
|
||||
/**
|
||||
* Check if a given object implements the EnableOtp401ResponseAnyOf interface.
|
||||
*/
|
||||
export function instanceOfEnableOtp401ResponseAnyOf(value: object): value is EnableOtp401ResponseAnyOf {
|
||||
if (!('kind' in value) || value['kind'] === undefined) return false;
|
||||
if (!('msg' in value) || value['msg'] === undefined) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
export function EnableOtp401ResponseAnyOfFromJSON(json: any): EnableOtp401ResponseAnyOf {
|
||||
return EnableOtp401ResponseAnyOfFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function EnableOtp401ResponseAnyOfFromJSONTyped(json: any, ignoreDiscriminator: boolean): EnableOtp401ResponseAnyOf {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'kind': json['kind'],
|
||||
'msg': json['msg'],
|
||||
};
|
||||
}
|
||||
|
||||
export function EnableOtp401ResponseAnyOfToJSON(json: any): EnableOtp401ResponseAnyOf {
|
||||
return EnableOtp401ResponseAnyOfToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function EnableOtp401ResponseAnyOfToJSONTyped(value?: EnableOtp401ResponseAnyOf | null, ignoreDiscriminator: boolean = false): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
'kind': value['kind'],
|
||||
'msg': value['msg'],
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -4,7 +4,7 @@
|
|||
* @fastify/swagger
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 9.6.0
|
||||
* The version of the OpenAPI document: 9.6.1
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
* @fastify/swagger
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 9.6.0
|
||||
* The version of the OpenAPI document: 9.6.1
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
* @fastify/swagger
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 9.6.0
|
||||
* The version of the OpenAPI document: 9.6.1
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
* @fastify/swagger
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 9.6.0
|
||||
* The version of the OpenAPI document: 9.6.1
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
* @fastify/swagger
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 9.6.0
|
||||
* The version of the OpenAPI document: 9.6.1
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
* @fastify/swagger
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 9.6.0
|
||||
* The version of the OpenAPI document: 9.6.1
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
* @fastify/swagger
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 9.6.0
|
||||
* The version of the OpenAPI document: 9.6.1
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
* @fastify/swagger
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 9.6.0
|
||||
* The version of the OpenAPI document: 9.6.1
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
* @fastify/swagger
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 9.6.0
|
||||
* The version of the OpenAPI document: 9.6.1
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
* @fastify/swagger
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 9.6.0
|
||||
* The version of the OpenAPI document: 9.6.1
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
* @fastify/swagger
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 9.6.0
|
||||
* The version of the OpenAPI document: 9.6.1
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
* @fastify/swagger
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 9.6.0
|
||||
* The version of the OpenAPI document: 9.6.1
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
* @fastify/swagger
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 9.6.0
|
||||
* The version of the OpenAPI document: 9.6.1
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
* @fastify/swagger
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 9.6.0
|
||||
* The version of the OpenAPI document: 9.6.1
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
* @fastify/swagger
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 9.6.0
|
||||
* The version of the OpenAPI document: 9.6.1
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
* @fastify/swagger
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 9.6.0
|
||||
* The version of the OpenAPI document: 9.6.1
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
* @fastify/swagger
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 9.6.0
|
||||
* The version of the OpenAPI document: 9.6.1
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
* @fastify/swagger
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 9.6.0
|
||||
* The version of the OpenAPI document: 9.6.1
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
* @fastify/swagger
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 9.6.0
|
||||
* The version of the OpenAPI document: 9.6.1
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
* @fastify/swagger
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 9.6.0
|
||||
* The version of the OpenAPI document: 9.6.1
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
* @fastify/swagger
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 9.6.0
|
||||
* The version of the OpenAPI document: 9.6.1
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
* @fastify/swagger
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 9.6.0
|
||||
* The version of the OpenAPI document: 9.6.1
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
* @fastify/swagger
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 9.6.0
|
||||
* The version of the OpenAPI document: 9.6.1
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
* @fastify/swagger
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 9.6.0
|
||||
* The version of the OpenAPI document: 9.6.1
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
* @fastify/swagger
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 9.6.0
|
||||
* The version of the OpenAPI document: 9.6.1
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
* @fastify/swagger
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 9.6.0
|
||||
* The version of the OpenAPI document: 9.6.1
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
* @fastify/swagger
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 9.6.0
|
||||
* The version of the OpenAPI document: 9.6.1
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
* @fastify/swagger
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 9.6.0
|
||||
* The version of the OpenAPI document: 9.6.1
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
|
|
|||
104
frontend/src/api/generated/models/StatusOtp401Response.ts
Normal file
104
frontend/src/api/generated/models/StatusOtp401Response.ts
Normal file
|
|
@ -0,0 +1,104 @@
|
|||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* @fastify/swagger
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 9.6.1
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
import type { DisableOtp401Response } from './DisableOtp401Response';
|
||||
import {
|
||||
DisableOtp401ResponseFromJSON,
|
||||
DisableOtp401ResponseFromJSONTyped,
|
||||
DisableOtp401ResponseToJSON,
|
||||
DisableOtp401ResponseToJSONTyped,
|
||||
} from './DisableOtp401Response';
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface StatusOtp401Response
|
||||
*/
|
||||
export interface StatusOtp401Response {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof StatusOtp401Response
|
||||
*/
|
||||
kind: StatusOtp401ResponseKindEnum;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof StatusOtp401Response
|
||||
*/
|
||||
msg: StatusOtp401ResponseMsgEnum;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @export
|
||||
*/
|
||||
export const StatusOtp401ResponseKindEnum = {
|
||||
NotLoggedIn: 'notLoggedIn'
|
||||
} as const;
|
||||
export type StatusOtp401ResponseKindEnum = typeof StatusOtp401ResponseKindEnum[keyof typeof StatusOtp401ResponseKindEnum];
|
||||
|
||||
/**
|
||||
* @export
|
||||
*/
|
||||
export const StatusOtp401ResponseMsgEnum = {
|
||||
AuthNoCookie: 'auth.noCookie',
|
||||
AuthInvalidKind: 'auth.invalidKind',
|
||||
AuthNoUser: 'auth.noUser',
|
||||
AuthInvalid: 'auth.invalid'
|
||||
} as const;
|
||||
export type StatusOtp401ResponseMsgEnum = typeof StatusOtp401ResponseMsgEnum[keyof typeof StatusOtp401ResponseMsgEnum];
|
||||
|
||||
|
||||
/**
|
||||
* Check if a given object implements the StatusOtp401Response interface.
|
||||
*/
|
||||
export function instanceOfStatusOtp401Response(value: object): value is StatusOtp401Response {
|
||||
if (!('kind' in value) || value['kind'] === undefined) return false;
|
||||
if (!('msg' in value) || value['msg'] === undefined) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
export function StatusOtp401ResponseFromJSON(json: any): StatusOtp401Response {
|
||||
return StatusOtp401ResponseFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function StatusOtp401ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): StatusOtp401Response {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'kind': json['kind'],
|
||||
'msg': json['msg'],
|
||||
};
|
||||
}
|
||||
|
||||
export function StatusOtp401ResponseToJSON(json: any): StatusOtp401Response {
|
||||
return StatusOtp401ResponseToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function StatusOtp401ResponseToJSONTyped(value?: StatusOtp401Response | null, ignoreDiscriminator: boolean = false): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
'kind': value['kind'],
|
||||
'msg': value['msg'],
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -4,7 +4,7 @@
|
|||
* @fastify/swagger
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 9.6.0
|
||||
* The version of the OpenAPI document: 9.6.1
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
|
|
|||
|
|
@ -1,10 +1,13 @@
|
|||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
export * from './ChatTest200Response';
|
||||
export * from './DisableOtp200Response';
|
||||
export * from './DisableOtp401Response';
|
||||
export * from './DisableOtp500Response';
|
||||
export * from './EnableOtp200Response';
|
||||
export * from './EnableOtp200ResponsePayload';
|
||||
export * from './EnableOtp401Response';
|
||||
export * from './EnableOtp401ResponseAnyOf';
|
||||
export * from './GetUser200Response';
|
||||
export * from './GetUser200ResponsePayload';
|
||||
export * from './GetUser403Response';
|
||||
|
|
@ -33,4 +36,5 @@ export * from './Signin500Response';
|
|||
export * from './StatusOtp200Response';
|
||||
export * from './StatusOtp200ResponseAnyOf';
|
||||
export * from './StatusOtp200ResponseAnyOf1';
|
||||
export * from './StatusOtp401Response';
|
||||
export * from './StatusOtp500Response';
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
* @fastify/swagger
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 9.6.0
|
||||
* The version of the OpenAPI document: 9.6.1
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
|
|
|
|||
90
frontend/src/chat/chat.css
Normal file
90
frontend/src/chat/chat.css
Normal file
|
|
@ -0,0 +1,90 @@
|
|||
@import "tailwindcss";
|
||||
|
||||
.btn-style {
|
||||
@apply
|
||||
w-[100px]
|
||||
h-[32px]
|
||||
border-2 border-black
|
||||
rounded-3xl
|
||||
hover:bg-blue-200
|
||||
text-black
|
||||
cursor-pointer;
|
||||
}
|
||||
|
||||
.send-btn-style {
|
||||
@apply
|
||||
w-[50px]
|
||||
h-[50px]
|
||||
border-2 border-black
|
||||
rounded-3xl
|
||||
hover:bg-blue-200
|
||||
text-black
|
||||
cursor-pointer;
|
||||
}
|
||||
|
||||
|
||||
.chatbox-style {
|
||||
@apply
|
||||
w-[600px]
|
||||
h-[150px] /* increase height if needed */
|
||||
p-[10px]
|
||||
border-1 border-black
|
||||
shadow-sm
|
||||
text-left
|
||||
text-gray-800
|
||||
rounded-3xl
|
||||
overflow-y-auto
|
||||
whitespace-pre-line
|
||||
flex
|
||||
flex-col
|
||||
mx-auto;
|
||||
}
|
||||
|
||||
.chat-window-style {
|
||||
@apply
|
||||
w-[400px]
|
||||
h-[50px]
|
||||
p-[10px]
|
||||
border-1 border-black
|
||||
shadow-sm
|
||||
rounded-3xl
|
||||
text-gray-800;
|
||||
}
|
||||
|
||||
.displaybox {
|
||||
@apply
|
||||
fixed
|
||||
inset-0
|
||||
flex
|
||||
items-center
|
||||
justify-center
|
||||
bg-gray-100;
|
||||
}
|
||||
|
||||
.mainboxDisplay {
|
||||
@apply
|
||||
fixed
|
||||
top-1/2
|
||||
left-1/2
|
||||
-translate-x-1/2
|
||||
-translate-y-1/2
|
||||
bg-white w-[650px]
|
||||
p-6 rounded-xl
|
||||
shadow-2xl
|
||||
text-center z-50;
|
||||
}
|
||||
|
||||
p {
|
||||
@apply
|
||||
text-black
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
.div-test {
|
||||
@apply
|
||||
italic
|
||||
|
||||
|
||||
}
|
||||
2
frontend/src/chat/index.ts
Normal file
2
frontend/src/chat/index.ts
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
import './chat.css';
|
||||
|
||||
25
frontend/src/pages/chat/chat.html
Normal file
25
frontend/src/pages/chat/chat.html
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
<div class="displaybox">
|
||||
<div id="mainbox" class="mainboxDisplay">
|
||||
|
||||
|
||||
<button id="b-whoami" class="btn-style absolute top-6 left-6">Whoami</button>
|
||||
<h1 class="text-3xl font-bold text-gray-800">
|
||||
Chat Box <span id="t-username"></span>
|
||||
</h1><br>
|
||||
<button id="b-logout" class="btn-style absolute top-6 right-6">Kill Server</button>
|
||||
|
||||
|
||||
|
||||
<p>Welcome, <span id="username"></span></p>
|
||||
|
||||
|
||||
<div id="t-chatbox" class="chatbox-style"></div>
|
||||
</br>
|
||||
<div class="flex gap-2">
|
||||
<input id="t-chat-window" placeholder="Type your message..." class="chat-window-style flex-1" />
|
||||
<button id="b-send" class="send-btn-style">Send</button>
|
||||
</div>
|
||||
</br>
|
||||
<p class="text-gray-400">From this Chat Box you can send messages to other players</p>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1,5 +1,84 @@
|
|||
import { addRoute, type RouteHandlerParams } from "@app/routing";
|
||||
import { addRoute, setTitle, type RouteHandlerParams, type RouteHandlerReturn } from "@app/routing";
|
||||
import { showError } from "@app/toast";
|
||||
import authHtml from './chat.html?raw';
|
||||
import client from '@app/api'
|
||||
import { updateUser } from "@app/auth";
|
||||
|
||||
addRoute('/chat', function (_url: string, _args: RouteHandlerParams) {
|
||||
return "this is the chat page !"
|
||||
})
|
||||
type Providers = {
|
||||
name: string,
|
||||
display_name: string,
|
||||
icon_url?: string,
|
||||
color?: { default: string, hover: string },
|
||||
};
|
||||
|
||||
function handleChat(_url: string, _args: RouteHandlerParams): RouteHandlerReturn {
|
||||
|
||||
setTitle('Chat Page');
|
||||
return {
|
||||
|
||||
html: authHtml, postInsert: async (app) => {
|
||||
|
||||
const sendButton = document.getElementById('b-send') as HTMLButtonElement;
|
||||
const chatWindow = document.getElementById('t-chatbox') as HTMLDivElement;
|
||||
const sendtextbox= document.getElementById('t-chat-window') as HTMLButtonElement;
|
||||
const blogout = document.getElementById('b-logout') as HTMLButtonElement;
|
||||
const bwhoami = document.getElementById('b-whoami') as HTMLButtonElement;
|
||||
const username = document.getElementById('username') as HTMLDivElement;
|
||||
|
||||
|
||||
const value = await client.chatTest();
|
||||
if (value.kind === "success")
|
||||
{
|
||||
console.log(value.payload);
|
||||
}
|
||||
else if (value.kind === "notLoggedIn")
|
||||
{
|
||||
|
||||
} else {
|
||||
console.log('unknown response: ', value);
|
||||
}
|
||||
|
||||
// Add a new message to the chat display
|
||||
const addMessage = (text: any) => {
|
||||
const messageElement = document.createElement('div');
|
||||
messageElement.textContent = JSON.stringify(text, null, 2);
|
||||
chatWindow.appendChild(messageElement);
|
||||
chatWindow.scrollTop = chatWindow.scrollHeight; //puts scroll to the bottom
|
||||
};
|
||||
|
||||
sendButton!.addEventListener('click', async () => {
|
||||
let msgtext: string = sendtextbox.value;
|
||||
|
||||
if (msgtext) {
|
||||
addMessage(msgtext);
|
||||
sendtextbox.value = "";
|
||||
}
|
||||
});
|
||||
|
||||
chatWindow.textContent = "helloWorld";
|
||||
|
||||
// Whoami button to display user name
|
||||
bwhoami?.addEventListener('click', async () => {
|
||||
try {
|
||||
const res = await client.guestLogin();
|
||||
switch (res.kind) {
|
||||
case 'success': {
|
||||
let user = await updateUser();
|
||||
if (user === null)
|
||||
return showError('Failed to get user: no user ?');
|
||||
setTitle(`Welcome ${user.guest ? '[GUEST] ' : ''}${user.name}`);
|
||||
break;
|
||||
}
|
||||
case 'failed': {
|
||||
showError(`Failed to login: ${res.msg}`);
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
console.error("Login error:", e);
|
||||
showError('Failed to login: Unknown error');
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
addRoute('/chat', handleChat, { bypass_auth: true });
|
||||
Loading…
Add table
Add a link
Reference in a new issue