result of make npm@update && make npm@openapi
This commit is contained in:
parent
830d733f1b
commit
1c6a513e4f
12 changed files with 1113 additions and 0 deletions
|
|
@ -48,11 +48,18 @@ models/LoginOtp500Response.ts
|
|||
models/LoginOtpRequest.ts
|
||||
models/LoginRequest.ts
|
||||
models/Logout200Response.ts
|
||||
models/PongCreatePauseGame200Response.ts
|
||||
models/PongCreatePauseGame200ResponsePayload.ts
|
||||
models/PongCreatePauseGame404Response.ts
|
||||
models/PongCreatePauseGameRequest.ts
|
||||
models/PongHistory200Response.ts
|
||||
models/PongHistory200ResponsePayload.ts
|
||||
models/PongHistory200ResponsePayloadDataInner.ts
|
||||
models/PongHistory200ResponsePayloadDataInnerLeft.ts
|
||||
models/PongHistory404Response.ts
|
||||
models/PongstartPauseGame200Response.ts
|
||||
models/PongstartPauseGame404Response.ts
|
||||
models/PongstartPauseGameRequest.ts
|
||||
models/ProviderList200Response.ts
|
||||
models/ProviderList200ResponsePayload.ts
|
||||
models/ProviderList200ResponsePayloadListInner.ts
|
||||
|
|
|
|||
|
|
@ -55,8 +55,14 @@ import type {
|
|||
LoginOtpRequest,
|
||||
LoginRequest,
|
||||
Logout200Response,
|
||||
PongCreatePauseGame200Response,
|
||||
PongCreatePauseGame404Response,
|
||||
PongCreatePauseGameRequest,
|
||||
PongHistory200Response,
|
||||
PongHistory404Response,
|
||||
PongstartPauseGame200Response,
|
||||
PongstartPauseGame404Response,
|
||||
PongstartPauseGameRequest,
|
||||
ProviderList200Response,
|
||||
Signin200Response,
|
||||
Signin400Response,
|
||||
|
|
@ -148,10 +154,22 @@ import {
|
|||
LoginRequestToJSON,
|
||||
Logout200ResponseFromJSON,
|
||||
Logout200ResponseToJSON,
|
||||
PongCreatePauseGame200ResponseFromJSON,
|
||||
PongCreatePauseGame200ResponseToJSON,
|
||||
PongCreatePauseGame404ResponseFromJSON,
|
||||
PongCreatePauseGame404ResponseToJSON,
|
||||
PongCreatePauseGameRequestFromJSON,
|
||||
PongCreatePauseGameRequestToJSON,
|
||||
PongHistory200ResponseFromJSON,
|
||||
PongHistory200ResponseToJSON,
|
||||
PongHistory404ResponseFromJSON,
|
||||
PongHistory404ResponseToJSON,
|
||||
PongstartPauseGame200ResponseFromJSON,
|
||||
PongstartPauseGame200ResponseToJSON,
|
||||
PongstartPauseGame404ResponseFromJSON,
|
||||
PongstartPauseGame404ResponseToJSON,
|
||||
PongstartPauseGameRequestFromJSON,
|
||||
PongstartPauseGameRequestToJSON,
|
||||
ProviderList200ResponseFromJSON,
|
||||
ProviderList200ResponseToJSON,
|
||||
Signin200ResponseFromJSON,
|
||||
|
|
@ -204,10 +222,18 @@ export interface LoginOtpOperationRequest {
|
|||
loginOtpRequest: LoginOtpRequest;
|
||||
}
|
||||
|
||||
export interface PongCreatePauseGameOperationRequest {
|
||||
pongCreatePauseGameRequest: PongCreatePauseGameRequest;
|
||||
}
|
||||
|
||||
export interface PongHistoryRequest {
|
||||
user: string;
|
||||
}
|
||||
|
||||
export interface PongstartPauseGameOperationRequest {
|
||||
pongstartPauseGameRequest: PongstartPauseGameRequest;
|
||||
}
|
||||
|
||||
export interface SigninRequest {
|
||||
loginRequest: LoginRequest;
|
||||
}
|
||||
|
|
@ -897,6 +923,58 @@ export class OpenapiOtherApi extends runtime.BaseAPI {
|
|||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
*/
|
||||
async pongCreatePauseGameRaw(requestParameters: PongCreatePauseGameOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PongCreatePauseGame200Response | PongCreatePauseGame404Response>> {
|
||||
if (requestParameters['pongCreatePauseGameRequest'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'pongCreatePauseGameRequest',
|
||||
'Required parameter "pongCreatePauseGameRequest" was null or undefined when calling pongCreatePauseGame().'
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
|
||||
|
||||
let urlPath = `/createPausedGame`;
|
||||
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: PongCreatePauseGameRequestToJSON(requestParameters['pongCreatePauseGameRequest']),
|
||||
}, 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) => PongCreatePauseGame200ResponseFromJSON(jsonValue));
|
||||
}
|
||||
if (response.status === 404) {
|
||||
// Object response for status 404
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => PongCreatePauseGame404ResponseFromJSON(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, 404`);
|
||||
}
|
||||
|
||||
/**
|
||||
*/
|
||||
async pongCreatePauseGame(requestParameters: PongCreatePauseGameOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PongCreatePauseGame200Response | PongCreatePauseGame404Response> {
|
||||
const response = await this.pongCreatePauseGameRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
*/
|
||||
async pongHistoryRaw(requestParameters: PongHistoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PongHistory200Response | StatusOtp401Response | PongHistory404Response>> {
|
||||
|
|
@ -951,6 +1029,58 @@ export class OpenapiOtherApi extends runtime.BaseAPI {
|
|||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
*/
|
||||
async pongstartPauseGameRaw(requestParameters: PongstartPauseGameOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PongstartPauseGame200Response | PongstartPauseGame404Response>> {
|
||||
if (requestParameters['pongstartPauseGameRequest'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'pongstartPauseGameRequest',
|
||||
'Required parameter "pongstartPauseGameRequest" was null or undefined when calling pongstartPauseGame().'
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
|
||||
|
||||
let urlPath = `/startPausedGame`;
|
||||
|
||||
const response = await this.request({
|
||||
path: urlPath,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: PongstartPauseGameRequestToJSON(requestParameters['pongstartPauseGameRequest']),
|
||||
}, 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) => PongstartPauseGame200ResponseFromJSON(jsonValue));
|
||||
}
|
||||
if (response.status === 404) {
|
||||
// Object response for status 404
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => PongstartPauseGame404ResponseFromJSON(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, 404`);
|
||||
}
|
||||
|
||||
/**
|
||||
*/
|
||||
async pongstartPauseGame(requestParameters: PongstartPauseGameOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PongstartPauseGame200Response | PongstartPauseGame404Response> {
|
||||
const response = await this.pongstartPauseGameRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
*/
|
||||
async providerListRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ProviderList200Response>> {
|
||||
|
|
|
|||
|
|
@ -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 { PongCreatePauseGame200ResponsePayload } from './PongCreatePauseGame200ResponsePayload';
|
||||
import {
|
||||
PongCreatePauseGame200ResponsePayloadFromJSON,
|
||||
PongCreatePauseGame200ResponsePayloadFromJSONTyped,
|
||||
PongCreatePauseGame200ResponsePayloadToJSON,
|
||||
PongCreatePauseGame200ResponsePayloadToJSONTyped,
|
||||
} from './PongCreatePauseGame200ResponsePayload';
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface PongCreatePauseGame200Response
|
||||
*/
|
||||
export interface PongCreatePauseGame200Response {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PongCreatePauseGame200Response
|
||||
*/
|
||||
kind: PongCreatePauseGame200ResponseKindEnum;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PongCreatePauseGame200Response
|
||||
*/
|
||||
msg: PongCreatePauseGame200ResponseMsgEnum;
|
||||
/**
|
||||
*
|
||||
* @type {PongCreatePauseGame200ResponsePayload}
|
||||
* @memberof PongCreatePauseGame200Response
|
||||
*/
|
||||
payload: PongCreatePauseGame200ResponsePayload;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @export
|
||||
*/
|
||||
export const PongCreatePauseGame200ResponseKindEnum = {
|
||||
Success: 'success'
|
||||
} as const;
|
||||
export type PongCreatePauseGame200ResponseKindEnum = typeof PongCreatePauseGame200ResponseKindEnum[keyof typeof PongCreatePauseGame200ResponseKindEnum];
|
||||
|
||||
/**
|
||||
* @export
|
||||
*/
|
||||
export const PongCreatePauseGame200ResponseMsgEnum = {
|
||||
CreatePausedGameSuccess: 'createPausedGame.success'
|
||||
} as const;
|
||||
export type PongCreatePauseGame200ResponseMsgEnum = typeof PongCreatePauseGame200ResponseMsgEnum[keyof typeof PongCreatePauseGame200ResponseMsgEnum];
|
||||
|
||||
|
||||
/**
|
||||
* Check if a given object implements the PongCreatePauseGame200Response interface.
|
||||
*/
|
||||
export function instanceOfPongCreatePauseGame200Response(value: object): value is PongCreatePauseGame200Response {
|
||||
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 PongCreatePauseGame200ResponseFromJSON(json: any): PongCreatePauseGame200Response {
|
||||
return PongCreatePauseGame200ResponseFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function PongCreatePauseGame200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): PongCreatePauseGame200Response {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'kind': json['kind'],
|
||||
'msg': json['msg'],
|
||||
'payload': PongCreatePauseGame200ResponsePayloadFromJSON(json['payload']),
|
||||
};
|
||||
}
|
||||
|
||||
export function PongCreatePauseGame200ResponseToJSON(json: any): PongCreatePauseGame200Response {
|
||||
return PongCreatePauseGame200ResponseToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function PongCreatePauseGame200ResponseToJSONTyped(value?: PongCreatePauseGame200Response | null, ignoreDiscriminator: boolean = false): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
'kind': value['kind'],
|
||||
'msg': value['msg'],
|
||||
'payload': PongCreatePauseGame200ResponsePayloadToJSON(value['payload']),
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,66 @@
|
|||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* @fastify/swagger
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 9.6.1
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface PongCreatePauseGame200ResponsePayload
|
||||
*/
|
||||
export interface PongCreatePauseGame200ResponsePayload {
|
||||
/**
|
||||
* gameId
|
||||
* @type {string}
|
||||
* @memberof PongCreatePauseGame200ResponsePayload
|
||||
*/
|
||||
gameId: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the PongCreatePauseGame200ResponsePayload interface.
|
||||
*/
|
||||
export function instanceOfPongCreatePauseGame200ResponsePayload(value: object): value is PongCreatePauseGame200ResponsePayload {
|
||||
if (!('gameId' in value) || value['gameId'] === undefined) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
export function PongCreatePauseGame200ResponsePayloadFromJSON(json: any): PongCreatePauseGame200ResponsePayload {
|
||||
return PongCreatePauseGame200ResponsePayloadFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function PongCreatePauseGame200ResponsePayloadFromJSONTyped(json: any, ignoreDiscriminator: boolean): PongCreatePauseGame200ResponsePayload {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'gameId': json['gameId'],
|
||||
};
|
||||
}
|
||||
|
||||
export function PongCreatePauseGame200ResponsePayloadToJSON(json: any): PongCreatePauseGame200ResponsePayload {
|
||||
return PongCreatePauseGame200ResponsePayloadToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function PongCreatePauseGame200ResponsePayloadToJSONTyped(value?: PongCreatePauseGame200ResponsePayload | null, ignoreDiscriminator: boolean = false): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
'gameId': value['gameId'],
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,93 @@
|
|||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* @fastify/swagger
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 9.6.1
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface PongCreatePauseGame404Response
|
||||
*/
|
||||
export interface PongCreatePauseGame404Response {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PongCreatePauseGame404Response
|
||||
*/
|
||||
kind: PongCreatePauseGame404ResponseKindEnum;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PongCreatePauseGame404Response
|
||||
*/
|
||||
msg: PongCreatePauseGame404ResponseMsgEnum;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @export
|
||||
*/
|
||||
export const PongCreatePauseGame404ResponseKindEnum = {
|
||||
Failure: 'failure'
|
||||
} as const;
|
||||
export type PongCreatePauseGame404ResponseKindEnum = typeof PongCreatePauseGame404ResponseKindEnum[keyof typeof PongCreatePauseGame404ResponseKindEnum];
|
||||
|
||||
/**
|
||||
* @export
|
||||
*/
|
||||
export const PongCreatePauseGame404ResponseMsgEnum = {
|
||||
CreatePausedGameGenericFail: 'createPausedGame.generic.fail'
|
||||
} as const;
|
||||
export type PongCreatePauseGame404ResponseMsgEnum = typeof PongCreatePauseGame404ResponseMsgEnum[keyof typeof PongCreatePauseGame404ResponseMsgEnum];
|
||||
|
||||
|
||||
/**
|
||||
* Check if a given object implements the PongCreatePauseGame404Response interface.
|
||||
*/
|
||||
export function instanceOfPongCreatePauseGame404Response(value: object): value is PongCreatePauseGame404Response {
|
||||
if (!('kind' in value) || value['kind'] === undefined) return false;
|
||||
if (!('msg' in value) || value['msg'] === undefined) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
export function PongCreatePauseGame404ResponseFromJSON(json: any): PongCreatePauseGame404Response {
|
||||
return PongCreatePauseGame404ResponseFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function PongCreatePauseGame404ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): PongCreatePauseGame404Response {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'kind': json['kind'],
|
||||
'msg': json['msg'],
|
||||
};
|
||||
}
|
||||
|
||||
export function PongCreatePauseGame404ResponseToJSON(json: any): PongCreatePauseGame404Response {
|
||||
return PongCreatePauseGame404ResponseToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function PongCreatePauseGame404ResponseToJSONTyped(value?: PongCreatePauseGame404Response | null, ignoreDiscriminator: boolean = false): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
'kind': value['kind'],
|
||||
'msg': value['msg'],
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,75 @@
|
|||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* @fastify/swagger
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 9.6.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 PongCreatePauseGameRequest
|
||||
*/
|
||||
export interface PongCreatePauseGameRequest {
|
||||
/**
|
||||
* 'id' | <userid>
|
||||
* @type {string}
|
||||
* @memberof PongCreatePauseGameRequest
|
||||
*/
|
||||
user1: string;
|
||||
/**
|
||||
* 'id' | <userid>
|
||||
* @type {string}
|
||||
* @memberof PongCreatePauseGameRequest
|
||||
*/
|
||||
user2: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the PongCreatePauseGameRequest interface.
|
||||
*/
|
||||
export function instanceOfPongCreatePauseGameRequest(value: object): value is PongCreatePauseGameRequest {
|
||||
if (!('user1' in value) || value['user1'] === undefined) return false;
|
||||
if (!('user2' in value) || value['user2'] === undefined) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
export function PongCreatePauseGameRequestFromJSON(json: any): PongCreatePauseGameRequest {
|
||||
return PongCreatePauseGameRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function PongCreatePauseGameRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PongCreatePauseGameRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'user1': json['user1'],
|
||||
'user2': json['user2'],
|
||||
};
|
||||
}
|
||||
|
||||
export function PongCreatePauseGameRequestToJSON(json: any): PongCreatePauseGameRequest {
|
||||
return PongCreatePauseGameRequestToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function PongCreatePauseGameRequestToJSONTyped(value?: PongCreatePauseGameRequest | null, ignoreDiscriminator: boolean = false): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
'user1': value['user1'],
|
||||
'user2': value['user2'],
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,102 @@
|
|||
/* 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 PongstartPauseGame200Response
|
||||
*/
|
||||
export interface PongstartPauseGame200Response {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PongstartPauseGame200Response
|
||||
*/
|
||||
kind: PongstartPauseGame200ResponseKindEnum;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PongstartPauseGame200Response
|
||||
*/
|
||||
msg: PongstartPauseGame200ResponseMsgEnum;
|
||||
/**
|
||||
*
|
||||
* @type {object}
|
||||
* @memberof PongstartPauseGame200Response
|
||||
*/
|
||||
payload: object;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @export
|
||||
*/
|
||||
export const PongstartPauseGame200ResponseKindEnum = {
|
||||
Success: 'success'
|
||||
} as const;
|
||||
export type PongstartPauseGame200ResponseKindEnum = typeof PongstartPauseGame200ResponseKindEnum[keyof typeof PongstartPauseGame200ResponseKindEnum];
|
||||
|
||||
/**
|
||||
* @export
|
||||
*/
|
||||
export const PongstartPauseGame200ResponseMsgEnum = {
|
||||
StartPausedGameSuccess: 'startPausedGame.success'
|
||||
} as const;
|
||||
export type PongstartPauseGame200ResponseMsgEnum = typeof PongstartPauseGame200ResponseMsgEnum[keyof typeof PongstartPauseGame200ResponseMsgEnum];
|
||||
|
||||
|
||||
/**
|
||||
* Check if a given object implements the PongstartPauseGame200Response interface.
|
||||
*/
|
||||
export function instanceOfPongstartPauseGame200Response(value: object): value is PongstartPauseGame200Response {
|
||||
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 PongstartPauseGame200ResponseFromJSON(json: any): PongstartPauseGame200Response {
|
||||
return PongstartPauseGame200ResponseFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function PongstartPauseGame200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): PongstartPauseGame200Response {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'kind': json['kind'],
|
||||
'msg': json['msg'],
|
||||
'payload': json['payload'],
|
||||
};
|
||||
}
|
||||
|
||||
export function PongstartPauseGame200ResponseToJSON(json: any): PongstartPauseGame200Response {
|
||||
return PongstartPauseGame200ResponseToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function PongstartPauseGame200ResponseToJSONTyped(value?: PongstartPauseGame200Response | null, ignoreDiscriminator: boolean = false): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
'kind': value['kind'],
|
||||
'msg': value['msg'],
|
||||
'payload': value['payload'],
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,93 @@
|
|||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* @fastify/swagger
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 9.6.1
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface PongstartPauseGame404Response
|
||||
*/
|
||||
export interface PongstartPauseGame404Response {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PongstartPauseGame404Response
|
||||
*/
|
||||
kind: PongstartPauseGame404ResponseKindEnum;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PongstartPauseGame404Response
|
||||
*/
|
||||
msg: PongstartPauseGame404ResponseMsgEnum;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @export
|
||||
*/
|
||||
export const PongstartPauseGame404ResponseKindEnum = {
|
||||
Failure: 'failure'
|
||||
} as const;
|
||||
export type PongstartPauseGame404ResponseKindEnum = typeof PongstartPauseGame404ResponseKindEnum[keyof typeof PongstartPauseGame404ResponseKindEnum];
|
||||
|
||||
/**
|
||||
* @export
|
||||
*/
|
||||
export const PongstartPauseGame404ResponseMsgEnum = {
|
||||
StartPausedGameNoSuchGame: 'startPausedGame.no_such_game'
|
||||
} as const;
|
||||
export type PongstartPauseGame404ResponseMsgEnum = typeof PongstartPauseGame404ResponseMsgEnum[keyof typeof PongstartPauseGame404ResponseMsgEnum];
|
||||
|
||||
|
||||
/**
|
||||
* Check if a given object implements the PongstartPauseGame404Response interface.
|
||||
*/
|
||||
export function instanceOfPongstartPauseGame404Response(value: object): value is PongstartPauseGame404Response {
|
||||
if (!('kind' in value) || value['kind'] === undefined) return false;
|
||||
if (!('msg' in value) || value['msg'] === undefined) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
export function PongstartPauseGame404ResponseFromJSON(json: any): PongstartPauseGame404Response {
|
||||
return PongstartPauseGame404ResponseFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function PongstartPauseGame404ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): PongstartPauseGame404Response {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'kind': json['kind'],
|
||||
'msg': json['msg'],
|
||||
};
|
||||
}
|
||||
|
||||
export function PongstartPauseGame404ResponseToJSON(json: any): PongstartPauseGame404Response {
|
||||
return PongstartPauseGame404ResponseToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function PongstartPauseGame404ResponseToJSONTyped(value?: PongstartPauseGame404Response | null, ignoreDiscriminator: boolean = false): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
'kind': value['kind'],
|
||||
'msg': value['msg'],
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,66 @@
|
|||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* @fastify/swagger
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 9.6.1
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface PongstartPauseGameRequest
|
||||
*/
|
||||
export interface PongstartPauseGameRequest {
|
||||
/**
|
||||
* 'id' | <gameid>
|
||||
* @type {string}
|
||||
* @memberof PongstartPauseGameRequest
|
||||
*/
|
||||
gameId: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the PongstartPauseGameRequest interface.
|
||||
*/
|
||||
export function instanceOfPongstartPauseGameRequest(value: object): value is PongstartPauseGameRequest {
|
||||
if (!('gameId' in value) || value['gameId'] === undefined) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
export function PongstartPauseGameRequestFromJSON(json: any): PongstartPauseGameRequest {
|
||||
return PongstartPauseGameRequestFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function PongstartPauseGameRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PongstartPauseGameRequest {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'gameId': json['gameId'],
|
||||
};
|
||||
}
|
||||
|
||||
export function PongstartPauseGameRequestToJSON(json: any): PongstartPauseGameRequest {
|
||||
return PongstartPauseGameRequestToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function PongstartPauseGameRequestToJSONTyped(value?: PongstartPauseGameRequest | null, ignoreDiscriminator: boolean = false): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
'gameId': value['gameId'],
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -47,11 +47,18 @@ export * from './LoginOtp500Response';
|
|||
export * from './LoginOtpRequest';
|
||||
export * from './LoginRequest';
|
||||
export * from './Logout200Response';
|
||||
export * from './PongCreatePauseGame200Response';
|
||||
export * from './PongCreatePauseGame200ResponsePayload';
|
||||
export * from './PongCreatePauseGame404Response';
|
||||
export * from './PongCreatePauseGameRequest';
|
||||
export * from './PongHistory200Response';
|
||||
export * from './PongHistory200ResponsePayload';
|
||||
export * from './PongHistory200ResponsePayloadDataInner';
|
||||
export * from './PongHistory200ResponsePayloadDataInnerLeft';
|
||||
export * from './PongHistory404Response';
|
||||
export * from './PongstartPauseGame200Response';
|
||||
export * from './PongstartPauseGame404Response';
|
||||
export * from './PongstartPauseGameRequest';
|
||||
export * from './ProviderList200Response';
|
||||
export * from './ProviderList200ResponsePayload';
|
||||
export * from './ProviderList200ResponsePayloadListInner';
|
||||
|
|
|
|||
185
src/openapi.json
185
src/openapi.json
|
|
@ -2144,6 +2144,105 @@
|
|||
]
|
||||
}
|
||||
},
|
||||
"/createPausedGame": {
|
||||
"post": {
|
||||
"operationId": "pongCreatePauseGame",
|
||||
"requestBody": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"user1",
|
||||
"user2"
|
||||
],
|
||||
"properties": {
|
||||
"user1": {
|
||||
"type": "string",
|
||||
"description": "'id' | <userid>"
|
||||
},
|
||||
"user2": {
|
||||
"type": "string",
|
||||
"description": "'id' | <userid>"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": true
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Default Response",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"kind",
|
||||
"msg",
|
||||
"payload"
|
||||
],
|
||||
"properties": {
|
||||
"kind": {
|
||||
"enum": [
|
||||
"success"
|
||||
]
|
||||
},
|
||||
"msg": {
|
||||
"enum": [
|
||||
"createPausedGame.success"
|
||||
]
|
||||
},
|
||||
"payload": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"gameId"
|
||||
],
|
||||
"properties": {
|
||||
"gameId": {
|
||||
"type": "string",
|
||||
"description": "gameId"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"404": {
|
||||
"description": "Default Response",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"kind",
|
||||
"msg"
|
||||
],
|
||||
"properties": {
|
||||
"kind": {
|
||||
"enum": [
|
||||
"failure"
|
||||
]
|
||||
},
|
||||
"msg": {
|
||||
"enum": [
|
||||
"createPausedGame.generic.fail"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"tags": [
|
||||
"openapi_other"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/pong/history/{user}": {
|
||||
"get": {
|
||||
"operationId": "pongHistory",
|
||||
|
|
@ -2351,6 +2450,92 @@
|
|||
"openapi_other"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/startPausedGame": {
|
||||
"post": {
|
||||
"operationId": "pongstartPauseGame",
|
||||
"requestBody": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"gameId"
|
||||
],
|
||||
"properties": {
|
||||
"gameId": {
|
||||
"type": "string",
|
||||
"description": "'id' | <gameid>"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": true
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Default Response",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"kind",
|
||||
"msg",
|
||||
"payload"
|
||||
],
|
||||
"properties": {
|
||||
"kind": {
|
||||
"enum": [
|
||||
"success"
|
||||
]
|
||||
},
|
||||
"msg": {
|
||||
"enum": [
|
||||
"startPausedGame.success"
|
||||
]
|
||||
},
|
||||
"payload": {
|
||||
"type": "object",
|
||||
"properties": {}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"404": {
|
||||
"description": "Default Response",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"kind",
|
||||
"msg"
|
||||
],
|
||||
"properties": {
|
||||
"kind": {
|
||||
"enum": [
|
||||
"failure"
|
||||
]
|
||||
},
|
||||
"msg": {
|
||||
"enum": [
|
||||
"startPausedGame.no_such_game"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"tags": [
|
||||
"openapi_other"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"components": {
|
||||
|
|
|
|||
|
|
@ -8,6 +8,102 @@
|
|||
"schemas": {}
|
||||
},
|
||||
"paths": {
|
||||
"/createPausedGame": {
|
||||
"post": {
|
||||
"operationId": "pongCreatePauseGame",
|
||||
"requestBody": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"user1",
|
||||
"user2"
|
||||
],
|
||||
"properties": {
|
||||
"user1": {
|
||||
"type": "string",
|
||||
"description": "'id' | <userid>"
|
||||
},
|
||||
"user2": {
|
||||
"type": "string",
|
||||
"description": "'id' | <userid>"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": true
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Default Response",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"kind",
|
||||
"msg",
|
||||
"payload"
|
||||
],
|
||||
"properties": {
|
||||
"kind": {
|
||||
"enum": [
|
||||
"success"
|
||||
]
|
||||
},
|
||||
"msg": {
|
||||
"enum": [
|
||||
"createPausedGame.success"
|
||||
]
|
||||
},
|
||||
"payload": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"gameId"
|
||||
],
|
||||
"properties": {
|
||||
"gameId": {
|
||||
"type": "string",
|
||||
"description": "gameId"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"404": {
|
||||
"description": "Default Response",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"kind",
|
||||
"msg"
|
||||
],
|
||||
"properties": {
|
||||
"kind": {
|
||||
"enum": [
|
||||
"failure"
|
||||
]
|
||||
},
|
||||
"msg": {
|
||||
"enum": [
|
||||
"createPausedGame.generic.fail"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/pong/history/{user}": {
|
||||
"get": {
|
||||
"operationId": "pongHistory",
|
||||
|
|
@ -212,6 +308,89 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/startPausedGame": {
|
||||
"post": {
|
||||
"operationId": "pongstartPauseGame",
|
||||
"requestBody": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"gameId"
|
||||
],
|
||||
"properties": {
|
||||
"gameId": {
|
||||
"type": "string",
|
||||
"description": "'id' | <gameid>"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": true
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Default Response",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"kind",
|
||||
"msg",
|
||||
"payload"
|
||||
],
|
||||
"properties": {
|
||||
"kind": {
|
||||
"enum": [
|
||||
"success"
|
||||
]
|
||||
},
|
||||
"msg": {
|
||||
"enum": [
|
||||
"startPausedGame.success"
|
||||
]
|
||||
},
|
||||
"payload": {
|
||||
"type": "object",
|
||||
"properties": {}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"404": {
|
||||
"description": "Default Response",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"kind",
|
||||
"msg"
|
||||
],
|
||||
"properties": {
|
||||
"kind": {
|
||||
"enum": [
|
||||
"failure"
|
||||
]
|
||||
},
|
||||
"msg": {
|
||||
"enum": [
|
||||
"startPausedGame.no_such_game"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"servers": [
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue