Merge branch 'master' into raph/logs

This commit is contained in:
Raphaël 2025-11-14 16:25:06 +01:00 committed by GitHub
commit 3ef811b334
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
122 changed files with 9354 additions and 2615 deletions

1
.gitignore vendored
View file

@ -6,6 +6,7 @@ node_modules/
**/dist/ **/dist/
*.crt *.crt
*.key *.key
openapi.jar
# sqlite stuff # sqlite stuff
*.db *.db

View file

@ -124,11 +124,14 @@ npm@build:
npm@update: npm@update:
(cd ./src/ && rm -rf ./src/node_modules/ && npx pnpm update -r --workspace) (cd ./src/ && rm -rf ./src/node_modules/ && npx pnpm update -r --workspace)
npm@openapi: npm@openapi: openapi.jar
@(cd ./src/ && npx pnpm run --if-present -r build:openapi) @(cd ./src/ && npx pnpm run --if-present -r build:openapi)
@rm -f ./src/openapi.json @rm -f ./src/openapi.json
@(cd ./src/ && npx pnpm exec redocly join --without-x-tag-groups) @(cd ./src/ && npx pnpm exec redocly join --without-x-tag-groups)
@(cd ./src/ && npx pnpm exec openapi-generator-cli generate -t ../openapi-template -g typescript-fetch -i openapi.json -o ../frontend/src/api/generated); @(cd ./src/ && java -jar ../openapi.jar generate -t ../openapi-template -g typescript-fetch -i openapi.json -o ../frontend/src/api/generated);
openapi.jar:
wget https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.15.0/openapi-generator-cli-7.15.0.jar -O ./openapi.jar
# this convert the .dbml file to an actual sql file that SQLite can handle :) # this convert the .dbml file to an actual sql file that SQLite can handle :)
sql: sql:

View file

@ -102,6 +102,28 @@ services:
tag: "{{.Name}}" tag: "{{.Name}}"
###############
# CHAT #
###############
chat:
build:
context: ./src/
args:
- SERVICE=chat
- EXTRA_FILES=chat/extra
container_name: chat
restart: always
networks:
- transcendance-network
volumes:
- sqlite-volume:/volumes/database
- static-volume:/volumes/static
environment:
- JWT_SECRET=KRUGKIDROVUWG2ZAMJZG653OEBTG66BANJ2W24DTEBXXMZLSEB2GQZJANRQXU6JA
- DATABASE_DIR=/volumes/database
- PROVIDER_FILE=/extra/providers.toml
############### ###############
# USER # # USER #
############### ###############

View file

@ -46,6 +46,7 @@
<script type="module" src="/src/routing/"></script> <script type="module" src="/src/routing/"></script>
<script type="module" src="/src/toast/"></script> <script type="module" src="/src/toast/"></script>
<script type="module" src="/src/auth/"></script> <script type="module" src="/src/auth/"></script>
<script type="module" src="/src/chat/"></script>
</body> </body>
</html> </html>

View file

@ -11,13 +11,14 @@
"devDependencies": { "devDependencies": {
"@types/js-cookie": "^3.0.6", "@types/js-cookie": "^3.0.6",
"typescript": "~5.9.3", "typescript": "~5.9.3",
"vite": "^7.1.10", "vite": "^7.2.2",
"vite-tsconfig-paths": "^5.1.4" "vite-tsconfig-paths": "^5.1.4"
}, },
"dependencies": { "dependencies": {
"@tailwindcss/vite": "^4.1.16", "@openapitools/openapi-generator-cli": "^2.25.0",
"@tailwindcss/vite": "^4.1.17",
"js-cookie": "^3.0.5", "js-cookie": "^3.0.5",
"openapi-fetch": "^0.15.0", "openapi-fetch": "^0.15.0",
"tailwindcss": "^4.1.16" "tailwindcss": "^4.1.17"
} }
} }

1930
frontend/pnpm-lock.yaml generated

File diff suppressed because it is too large Load diff

View file

@ -1,47 +1,14 @@
.openapi-generator-ignore
apis/OpenapiOtherApi.ts apis/OpenapiOtherApi.ts
apis/index.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 index.ts
models/ChatTest200Response.ts
models/DisableOtp200Response.ts models/DisableOtp200Response.ts
models/DisableOtp401Response.ts models/DisableOtp401Response.ts
models/DisableOtp500Response.ts models/DisableOtp500Response.ts
models/EnableOtp200Response.ts models/EnableOtp200Response.ts
models/EnableOtp200ResponsePayload.ts models/EnableOtp200ResponsePayload.ts
models/EnableOtp401Response.ts
models/EnableOtp401ResponseAnyOf.ts
models/GetUser200Response.ts models/GetUser200Response.ts
models/GetUser200ResponsePayload.ts models/GetUser200ResponsePayload.ts
models/GetUser403Response.ts models/GetUser403Response.ts
@ -70,6 +37,7 @@ models/Signin500Response.ts
models/StatusOtp200Response.ts models/StatusOtp200Response.ts
models/StatusOtp200ResponseAnyOf.ts models/StatusOtp200ResponseAnyOf.ts
models/StatusOtp200ResponseAnyOf1.ts models/StatusOtp200ResponseAnyOf1.ts
models/StatusOtp401Response.ts
models/StatusOtp500Response.ts models/StatusOtp500Response.ts
models/index.ts models/index.ts
runtime.ts runtime.ts

View file

@ -1 +1 @@
7.17.0 7.15.0

View file

@ -4,7 +4,7 @@
* @fastify/swagger * @fastify/swagger
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * 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). * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@ -15,10 +15,12 @@
import * as runtime from '../runtime'; import * as runtime from '../runtime';
import type { import type {
ChatTest200Response,
DisableOtp200Response, DisableOtp200Response,
DisableOtp401Response, DisableOtp401Response,
DisableOtp500Response, DisableOtp500Response,
EnableOtp200Response, EnableOtp200Response,
EnableOtp401Response,
GetUser200Response, GetUser200Response,
GetUser403Response, GetUser403Response,
GetUser404Response, GetUser404Response,
@ -40,9 +42,12 @@ import type {
Signin400Response, Signin400Response,
Signin500Response, Signin500Response,
StatusOtp200Response, StatusOtp200Response,
StatusOtp401Response,
StatusOtp500Response, StatusOtp500Response,
} from '../models/index'; } from '../models/index';
import { import {
ChatTest200ResponseFromJSON,
ChatTest200ResponseToJSON,
DisableOtp200ResponseFromJSON, DisableOtp200ResponseFromJSON,
DisableOtp200ResponseToJSON, DisableOtp200ResponseToJSON,
DisableOtp401ResponseFromJSON, DisableOtp401ResponseFromJSON,
@ -51,6 +56,8 @@ import {
DisableOtp500ResponseToJSON, DisableOtp500ResponseToJSON,
EnableOtp200ResponseFromJSON, EnableOtp200ResponseFromJSON,
EnableOtp200ResponseToJSON, EnableOtp200ResponseToJSON,
EnableOtp401ResponseFromJSON,
EnableOtp401ResponseToJSON,
GetUser200ResponseFromJSON, GetUser200ResponseFromJSON,
GetUser200ResponseToJSON, GetUser200ResponseToJSON,
GetUser403ResponseFromJSON, GetUser403ResponseFromJSON,
@ -93,6 +100,8 @@ import {
Signin500ResponseToJSON, Signin500ResponseToJSON,
StatusOtp200ResponseFromJSON, StatusOtp200ResponseFromJSON,
StatusOtp200ResponseToJSON, StatusOtp200ResponseToJSON,
StatusOtp401ResponseFromJSON,
StatusOtp401ResponseToJSON,
StatusOtp500ResponseFromJSON, StatusOtp500ResponseFromJSON,
StatusOtp500ResponseToJSON, StatusOtp500ResponseToJSON,
} from '../models/index'; } from '../models/index';
@ -118,6 +127,48 @@ export interface SigninRequest {
*/ */
export class OpenapiOtherApi extends runtime.BaseAPI { 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>> { 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 queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {}; const headerParameters: runtime.HTTPHeaders = {};
@ -191,7 +242,7 @@ export class OpenapiOtherApi extends runtime.BaseAPI {
} }
if (response.status === 401) { if (response.status === 401) {
// Object response for 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 // 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 // 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); const response = await this.enableOtpRaw(initOverrides);
return await response.value(); 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) { if (requestParameters['user'] == null) {
throw new runtime.RequiredError( throw new runtime.RequiredError(
'user', 'user',
@ -241,7 +292,7 @@ export class OpenapiOtherApi extends runtime.BaseAPI {
} }
if (response.status === 401) { if (response.status === 401) {
// Object response for 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) { if (response.status === 403) {
// Object response for 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); const response = await this.getUserRaw(requestParameters, initOverrides);
return await response.value(); 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 queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {}; const headerParameters: runtime.HTTPHeaders = {};
@ -547,7 +598,7 @@ export class OpenapiOtherApi extends runtime.BaseAPI {
} }
if (response.status === 401) { if (response.status === 401) {
// Object response for 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) { if (response.status === 500) {
// Object response for 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); const response = await this.statusOtpRaw(initOverrides);
return await response.value(); return await response.value();
} }

View file

@ -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)

View file

@ -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)

View file

@ -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)

View file

@ -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)

View file

@ -1,5 +1,5 @@
# StatusOtp500Response # EnableOtp401Response
## Properties ## Properties
@ -12,13 +12,13 @@ Name | Type
## Example ## Example
```typescript ```typescript
import type { StatusOtp500Response } from '' import type { EnableOtp401Response } from ''
// TODO: Update the object below with actual values // TODO: Update the object below with actual values
const example = { const example = {
"kind": null, "kind": null,
"msg": null, "msg": null,
} satisfies StatusOtp500Response } satisfies EnableOtp401Response
console.log(example) console.log(example)
@ -27,7 +27,7 @@ const exampleJSON: string = JSON.stringify(example)
console.log(exampleJSON) console.log(exampleJSON)
// Parse the JSON string back to an object // 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) console.log(exampleParsed)
``` ```

View file

@ -1,5 +1,5 @@
# DisableOtp200Response # EnableOtp401ResponseAnyOf
## Properties ## Properties
@ -12,13 +12,13 @@ Name | Type
## Example ## Example
```typescript ```typescript
import type { DisableOtp200Response } from '' import type { EnableOtp401ResponseAnyOf } from ''
// TODO: Update the object below with actual values // TODO: Update the object below with actual values
const example = { const example = {
"kind": null, "kind": null,
"msg": null, "msg": null,
} satisfies DisableOtp200Response } satisfies EnableOtp401ResponseAnyOf
console.log(example) console.log(example)
@ -27,7 +27,7 @@ const exampleJSON: string = JSON.stringify(example)
console.log(exampleJSON) console.log(exampleJSON)
// Parse the JSON string back to an object // 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) console.log(exampleParsed)
``` ```

View file

@ -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)

View file

@ -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)

View file

@ -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)

View file

@ -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)

View file

@ -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)

View file

@ -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)

View file

@ -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)

View file

@ -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)

View file

@ -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)

View file

@ -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)

View file

@ -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)

View file

@ -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)

View file

@ -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)

View file

@ -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)

View file

@ -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)

View file

@ -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)

View file

@ -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)

View file

@ -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)

View file

@ -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)

View file

@ -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)

View file

@ -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)

View file

@ -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)

View file

@ -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)

View file

@ -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)

View file

@ -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)

View file

@ -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)

View file

@ -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)

View file

@ -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)

View file

@ -1,5 +1,5 @@
# Login400Response # StatusOtp401Response
## Properties ## Properties
@ -12,13 +12,13 @@ Name | Type
## Example ## Example
```typescript ```typescript
import type { Login400Response } from '' import type { StatusOtp401Response } from ''
// TODO: Update the object below with actual values // TODO: Update the object below with actual values
const example = { const example = {
"kind": null, "kind": null,
"msg": null, "msg": null,
} satisfies Login400Response } satisfies StatusOtp401Response
console.log(example) console.log(example)
@ -27,7 +27,7 @@ const exampleJSON: string = JSON.stringify(example)
console.log(exampleJSON) console.log(exampleJSON)
// Parse the JSON string back to an object // 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) console.log(exampleParsed)
``` ```

View 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']),
};
}

View file

@ -4,7 +4,7 @@
* @fastify/swagger * @fastify/swagger
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * 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). * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View file

@ -4,7 +4,7 @@
* @fastify/swagger * @fastify/swagger
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * 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). * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View file

@ -4,7 +4,7 @@
* @fastify/swagger * @fastify/swagger
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * 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). * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View file

@ -4,7 +4,7 @@
* @fastify/swagger * @fastify/swagger
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * 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). * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View file

@ -4,7 +4,7 @@
* @fastify/swagger * @fastify/swagger
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * 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). * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View 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'],
};
}

View file

@ -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'],
};
}

View file

@ -4,7 +4,7 @@
* @fastify/swagger * @fastify/swagger
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * 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). * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View file

@ -4,7 +4,7 @@
* @fastify/swagger * @fastify/swagger
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * 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). * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View file

@ -4,7 +4,7 @@
* @fastify/swagger * @fastify/swagger
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * 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). * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View file

@ -4,7 +4,7 @@
* @fastify/swagger * @fastify/swagger
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * 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). * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View file

@ -4,7 +4,7 @@
* @fastify/swagger * @fastify/swagger
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * 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). * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View file

@ -4,7 +4,7 @@
* @fastify/swagger * @fastify/swagger
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * 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). * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View file

@ -4,7 +4,7 @@
* @fastify/swagger * @fastify/swagger
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * 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). * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View file

@ -4,7 +4,7 @@
* @fastify/swagger * @fastify/swagger
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * 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). * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View file

@ -4,7 +4,7 @@
* @fastify/swagger * @fastify/swagger
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * 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). * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View file

@ -4,7 +4,7 @@
* @fastify/swagger * @fastify/swagger
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * 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). * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View file

@ -4,7 +4,7 @@
* @fastify/swagger * @fastify/swagger
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * 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). * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View file

@ -4,7 +4,7 @@
* @fastify/swagger * @fastify/swagger
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * 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). * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View file

@ -4,7 +4,7 @@
* @fastify/swagger * @fastify/swagger
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * 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). * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View file

@ -4,7 +4,7 @@
* @fastify/swagger * @fastify/swagger
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * 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). * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View file

@ -4,7 +4,7 @@
* @fastify/swagger * @fastify/swagger
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * 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). * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View file

@ -4,7 +4,7 @@
* @fastify/swagger * @fastify/swagger
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * 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). * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View file

@ -4,7 +4,7 @@
* @fastify/swagger * @fastify/swagger
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * 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). * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View file

@ -4,7 +4,7 @@
* @fastify/swagger * @fastify/swagger
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * 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). * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View file

@ -4,7 +4,7 @@
* @fastify/swagger * @fastify/swagger
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * 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). * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View file

@ -4,7 +4,7 @@
* @fastify/swagger * @fastify/swagger
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * 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). * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View file

@ -4,7 +4,7 @@
* @fastify/swagger * @fastify/swagger
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * 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). * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View file

@ -4,7 +4,7 @@
* @fastify/swagger * @fastify/swagger
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * 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). * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View file

@ -4,7 +4,7 @@
* @fastify/swagger * @fastify/swagger
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * 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). * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View file

@ -4,7 +4,7 @@
* @fastify/swagger * @fastify/swagger
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * 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). * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View file

@ -4,7 +4,7 @@
* @fastify/swagger * @fastify/swagger
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * 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). * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View file

@ -4,7 +4,7 @@
* @fastify/swagger * @fastify/swagger
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * 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). * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View file

@ -4,7 +4,7 @@
* @fastify/swagger * @fastify/swagger
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * 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). * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View file

@ -4,7 +4,7 @@
* @fastify/swagger * @fastify/swagger
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * 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). * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View 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'],
};
}

View file

@ -4,7 +4,7 @@
* @fastify/swagger * @fastify/swagger
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * 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). * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View file

@ -1,10 +1,13 @@
/* tslint:disable */ /* tslint:disable */
/* eslint-disable */ /* eslint-disable */
export * from './ChatTest200Response';
export * from './DisableOtp200Response'; export * from './DisableOtp200Response';
export * from './DisableOtp401Response'; export * from './DisableOtp401Response';
export * from './DisableOtp500Response'; export * from './DisableOtp500Response';
export * from './EnableOtp200Response'; export * from './EnableOtp200Response';
export * from './EnableOtp200ResponsePayload'; export * from './EnableOtp200ResponsePayload';
export * from './EnableOtp401Response';
export * from './EnableOtp401ResponseAnyOf';
export * from './GetUser200Response'; export * from './GetUser200Response';
export * from './GetUser200ResponsePayload'; export * from './GetUser200ResponsePayload';
export * from './GetUser403Response'; export * from './GetUser403Response';
@ -33,4 +36,5 @@ export * from './Signin500Response';
export * from './StatusOtp200Response'; export * from './StatusOtp200Response';
export * from './StatusOtp200ResponseAnyOf'; export * from './StatusOtp200ResponseAnyOf';
export * from './StatusOtp200ResponseAnyOf1'; export * from './StatusOtp200ResponseAnyOf1';
export * from './StatusOtp401Response';
export * from './StatusOtp500Response'; export * from './StatusOtp500Response';

View file

@ -4,7 +4,7 @@
* @fastify/swagger * @fastify/swagger
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * 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). * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

View 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
}

View file

@ -0,0 +1,2 @@
import './chat.css';

View 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>

View file

@ -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) { type Providers = {
return "this is the chat page !" 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 });

View file

@ -0,0 +1,4 @@
#forward the post request to the microservice
location /api/chat/ {
proxy_pass http://chat;
}

View file

@ -16,6 +16,8 @@
"license": "ISC", "license": "ISC",
"packageManager": "pnpm@10", "packageManager": "pnpm@10",
"devDependencies": { "devDependencies": {
"husky": "^9.1.7" "@redocly/cli": "^2.11.1",
"husky": "^9.1.7",
"vite": "^7.2.2"
} }
} }

5053
pnpm-lock.yaml generated Normal file

File diff suppressed because it is too large Load diff

View file

@ -11,20 +11,20 @@
"dependencies": { "dependencies": {
"@fastify/cookie": "^11.0.2", "@fastify/cookie": "^11.0.2",
"@fastify/jwt": "^9.1.0", "@fastify/jwt": "^9.1.0",
"@fastify/swagger": "^9.6.0", "@fastify/swagger": "^9.6.1",
"@fastify/swagger-ui": "^5.2.3", "@fastify/swagger-ui": "^5.2.3",
"@types/bcrypt": "^6.0.0", "@types/bcrypt": "^6.0.0",
"bcrypt": "^6.0.0", "bcrypt": "^6.0.0",
"better-sqlite3": "^11.10.0", "better-sqlite3": "^11.10.0",
"fastify": "^5.6.1", "fastify": "^5.6.2",
"fastify-plugin": "^5.1.0", "fastify-plugin": "^5.1.0",
"joi": "^18.0.1", "joi": "^18.0.1",
"otp": "^1.1.2", "otp": "^1.1.2",
"typebox": "^1.0.51", "typebox": "^1.0.53",
"uuidv7": "^1.0.2" "uuidv7": "^1.0.2"
}, },
"devDependencies": { "devDependencies": {
"@types/better-sqlite3": "^7.6.13", "@types/better-sqlite3": "^7.6.13",
"@types/node": "^22.19.0" "@types/node": "^22.19.1"
} }
} }

View file

@ -118,7 +118,7 @@ export const authPlugin = fp<{ onlySchema?: boolean }>(async (fastify, { onlySch
.clearCookie('token', { path: '/' }) .clearCookie('token', { path: '/' })
.makeResponse(401, 'notLoggedIn', 'auth.noUser'); .makeResponse(401, 'notLoggedIn', 'auth.noUser');
} }
req.authUser = { id: user.id, name: tok.who }; req.authUser = { id: user.id, name: user.display_name };
} }
catch { catch {
return res return res

View file

@ -1,6 +1,6 @@
<!DOCTYPE HTML> <!DOCTYPE HTML>
<html> <html>
<!--
<head> <head>
<title>Demo Page For Login :)</title> <title>Demo Page For Login :)</title>
</head> </head>
@ -34,6 +34,6 @@
</div> </div>
<pre id="d-response"></pre> <pre id="d-response"></pre>
<script src="./login_demo.js"> </script> <script src="./login_demo.js"> </script>
</body> </body> -->
</html> </html>

View file

@ -1,115 +1,4 @@
const headers = { // const headers = {
'Accept': 'application/json', // 'Accept': 'application/json',
'Content-Type': 'application/json', // 'Content-Type': 'application/json',
}; // };
const tUsername = document.querySelector('#t-username');
const iUsername = document.querySelector('#i-username');
const iPassword = document.querySelector('#i-password');
const iOtp = document.querySelector('#i-otp');
const bOtpSend = document.querySelector('#b-otpSend');
const bLogin = document.querySelector('#b-login');
const bLoginGuest = document.querySelector('#b-login-guest');
const bLogout = document.querySelector('#b-logout');
const bSignin = document.querySelector('#b-signin');
const bWhoami = document.querySelector('#b-whoami');
const bOtpStatus = document.querySelector('#b-otpStatus');
const bOtpEnable = document.querySelector('#b-otpEnable');
const bOtpDisable = document.querySelector('#b-otpDisable');
const dResponse = document.querySelector('#d-response');
function setResponse(obj) {
const obj_str = JSON.stringify(obj, null, 4);
dResponse.innerText = obj_str;
}
let otpToken = null;
bLoginGuest.addEventListener('click', async () => {
const res = await fetch('/api/auth/guest', { method: 'POST' });
const json = await res.json();
setResponse(json);
if (json.kind === 'success') {
if (json?.payload?.token) {document.cookie = `token=${json?.payload?.token}`;}
}
});
bOtpSend.addEventListener('click', async () => {
const res = await fetch('/api/auth/otp', { method: 'POST', body: JSON.stringify({ code: iOtp.value, token: otpToken }), headers });
const json = await res.json();
setResponse(json);
if (json.kind === 'success') {
if (json?.payload?.token) {document.cookie = `token=${json?.payload?.token}`;}
}
});
bOtpStatus.addEventListener('click', async () => {
const res = await fetch('/api/auth/statusOtp');
const json = await res.json();
setResponse(json);
});
bOtpEnable.addEventListener('click', async () => {
const res = await fetch('/api/auth/enableOtp', { method: 'PUT' });
const json = await res.json();
setResponse(json);
});
bOtpDisable.addEventListener('click', async () => {
const res = await fetch('/api/auth/disableOtp', { method: 'PUT' });
const json = await res.json();
setResponse(json);
});
bWhoami.addEventListener('click', async () => {
let username = '';
try {
const res = await fetch('/api/user/info/me');
const json = await res.json();
setResponse(json);
if (json?.kind === 'success') {username = json?.payload?.name;}
else {username = `<not logged in:${json.msg}>`;}
}
catch {
username = '<not logged in: threw>';
}
tUsername.innerText = username;
});
bLogin.addEventListener('click', async () => {
const name = iUsername.value;
const password = iPassword.value;
const res = await fetch('/api/auth/login', { method: 'POST', body: JSON.stringify({ name, password }), headers });
const json = await res.json();
if (json?.kind === 'otpRequired') {
otpToken = json?.payload?.token;
}
else if (json?.kind === 'success') {
if (json?.payload?.token) {document.cookie = `token=${json?.payload?.token}`;}
}
setResponse(json);
});
bLogout.addEventListener('click', async () => {
const res = await fetch('/api/auth/logout', { method: 'POST' });
setResponse(await res.json());
});
bSignin.addEventListener('click', async () => {
const name = iUsername.value;
const password = iPassword.value;
const res = await fetch('/api/auth/signin', { method: 'POST', body: JSON.stringify({ name, password }), headers });
const json = await res.json();
if (json?.payload?.token) {document.cookie = `token=${json?.payload?.token};`;}
setResponse(json);
});

View file

@ -1,7 +1,7 @@
{ {
"openapi": "3.1.0", "openapi": "3.1.0",
"info": { "info": {
"version": "9.6.0", "version": "9.6.1",
"title": "@fastify/swagger" "title": "@fastify/swagger"
}, },
"components": { "components": {
@ -144,26 +144,50 @@
"content": { "content": {
"application/json": { "application/json": {
"schema": { "schema": {
"type": "object", "anyOf": [
"required": [ {
"kind", "type": "object",
"msg" "required": [
], "kind",
"properties": { "msg"
"kind": { ],
"enum": [ "properties": {
"notLoggedIn" "kind": {
] "enum": [
"failure"
]
},
"msg": {
"enum": [
"enableOtp.failure.noUser",
"enableOtp.failure.noSecret"
]
}
}
}, },
"msg": { {
"enum": [ "type": "object",
"auth.noCookie", "required": [
"auth.invalidKind", "kind",
"auth.noUser", "msg"
"auth.invalid" ],
] "properties": {
"kind": {
"enum": [
"notLoggedIn"
]
},
"msg": {
"enum": [
"auth.noCookie",
"auth.invalidKind",
"auth.noUser",
"auth.invalid"
]
}
}
} }
} ]
} }
} }
} }
@ -782,26 +806,52 @@
"content": { "content": {
"application/json": { "application/json": {
"schema": { "schema": {
"type": "object", "anyOf": [
"required": [ {
"kind", "type": "object",
"msg" "required": [
], "kind",
"properties": { "msg"
"kind": { ],
"enum": [ "properties": {
"notLoggedIn" "kind": {
] "enum": [
"notLoggedIn"
]
},
"msg": {
"enum": [
"auth.noCookie",
"auth.invalidKind",
"auth.noUser",
"auth.invalid"
]
}
}
}, },
"msg": { {
"enum": [ "type": "object",
"auth.noCookie", "required": [
"auth.invalidKind", "kind",
"auth.noUser", "msg"
"auth.invalid" ],
] "properties": {
"kind": {
"enum": [
"notLoggedIn"
]
},
"msg": {
"enum": [
"auth.noCookie",
"auth.invalidKind",
"auth.noUser",
"auth.invalid"
]
}
}
} }
} ]
} }
} }
} }

View file

@ -23,14 +23,14 @@
"@fastify/multipart": "^9.3.0", "@fastify/multipart": "^9.3.0",
"@fastify/sensible": "^6.0.3", "@fastify/sensible": "^6.0.3",
"@fastify/static": "^8.3.0", "@fastify/static": "^8.3.0",
"typebox": "^1.0.51",
"confbox": "^0.2.2", "confbox": "^0.2.2",
"fastify": "^5.6.1", "fastify": "^5.6.2",
"fastify-cli": "^7.4.1", "fastify-cli": "^7.4.1",
"fastify-plugin": "^5.1.0" "fastify-plugin": "^5.1.0",
"typebox": "^1.0.53"
}, },
"devDependencies": { "devDependencies": {
"@types/node": "^22.19.0", "@types/node": "^22.19.1",
"rollup-plugin-node-externals": "^8.1.2", "rollup-plugin-node-externals": "^8.1.2",
"vite": "^7.2.2", "vite": "^7.2.2",
"vite-tsconfig-paths": "^5.1.4" "vite-tsconfig-paths": "^5.1.4"

View file

@ -27,6 +27,7 @@ const route: FastifyPluginAsync = async (fastify, _opts): Promise<void> => {
void req; void req;
void res; void res;
try { try {
console.log('DEBUG ----- guest login backend');
const adjective = getRandomFromList(fastify.words.adjectives); const adjective = getRandomFromList(fastify.words.adjectives);
const noun = getRandomFromList(fastify.words.nouns); const noun = getRandomFromList(fastify.words.nouns);

2
src/chat/.dockerignore Normal file
View file

@ -0,0 +1,2 @@
/dist
/node_modules

8
src/chat/README.md Normal file
View file

@ -0,0 +1,8 @@
# Nginx Configuration
You want to have a new microservice ?
Edit/add a file in `conf/locations/`
take example on `conf/locations/icons.conf` on how to make a reverse proxy and on how to serve static files
# Good Luck Have Fun

Some files were not shown because too many files have changed in this diff Show more