Skip to content
This repository has been archived by the owner on Jul 18, 2024. It is now read-only.

Commit

Permalink
update api.
Browse files Browse the repository at this point in the history
  • Loading branch information
m1k1o committed May 9, 2024
1 parent d891d5b commit 06955aa
Show file tree
Hide file tree
Showing 12 changed files with 372 additions and 99 deletions.
2 changes: 1 addition & 1 deletion src/component/api/.openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ api.ts
api/default-api.ts
api/members-api.ts
api/room-api.ts
api/session-api.ts
api/sessions-api.ts
base.ts
common.ts
configuration.ts
Expand Down
2 changes: 1 addition & 1 deletion src/component/api/.openapi-generator/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7.4.0-SNAPSHOT
7.6.0-SNAPSHOT
2 changes: 1 addition & 1 deletion src/component/api/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@
export * from './api/default-api';
export * from './api/members-api';
export * from './api/room-api';
export * from './api/session-api';
export * from './api/sessions-api';

226 changes: 224 additions & 2 deletions src/component/api/api/default-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,20 @@ import type { Configuration } from '../configuration';
import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
import globalAxios from 'axios';
// Some imports not used depending on template conditions
// @ts-ignore
import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
import { BASE_PATH, COLLECTION_FORMATS, BaseAPI, RequiredError, operationServerMap } from '../base';
import type { RequestArgs } from '../base';
// @ts-ignore
import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base';
// @ts-ignore
import type { BatchRequest } from '../models';
// @ts-ignore
import type { BatchResponse } from '../models';
// @ts-ignore
import type { ErrorMessage } from '../models';
// @ts-ignore
import type { SessionData } from '../models';
// @ts-ignore
import type { SessionLogin } from '../models';
/**
* DefaultApi - axios parameter creator
* @export
Expand Down Expand Up @@ -94,6 +103,81 @@ export const DefaultApiAxiosParamCreator = function (configuration?: Configurati



setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};

return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
*
* @summary login
* @param {SessionLogin} sessionLogin
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
login: async (sessionLogin: SessionLogin, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
// verify required parameter 'sessionLogin' is not null or undefined
assertParamExists('login', 'sessionLogin', sessionLogin)
const localVarPath = `/api/login`;
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}

const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;



localVarHeaderParameter['Content-Type'] = 'application/json';

setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
localVarRequestOptions.data = serializeDataIfNeeded(sessionLogin, localVarRequestOptions, configuration)

return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
*
* @summary logout
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
logout: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
const localVarPath = `/api/logout`;
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}

const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;

// authentication CookieAuth required

// authentication TokenAuth required
await setApiKeyToObject(localVarQueryParameter, "token", configuration)

// authentication BearerAuth required
// http bearer authentication required
await setBearerAuthToObject(localVarHeaderParameter, configuration)



setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
Expand Down Expand Up @@ -124,6 +208,45 @@ export const DefaultApiAxiosParamCreator = function (configuration?: Configurati



setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};

return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
*
* @summary whoami
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
whoami: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
const localVarPath = `/api/whoami`;
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}

const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;

// authentication CookieAuth required

// authentication TokenAuth required
await setApiKeyToObject(localVarQueryParameter, "token", configuration)

// authentication BearerAuth required
// http bearer authentication required
await setBearerAuthToObject(localVarHeaderParameter, configuration)



setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
Expand Down Expand Up @@ -168,6 +291,31 @@ export const DefaultApiFp = function(configuration?: Configuration) {
const localVarOperationServerBasePath = operationServerMap['DefaultApi.healthcheck']?.[localVarOperationServerIndex]?.url;
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
},
/**
*
* @summary login
* @param {SessionLogin} sessionLogin
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async login(sessionLogin: SessionLogin, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<SessionData>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.login(sessionLogin, options);
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
const localVarOperationServerBasePath = operationServerMap['DefaultApi.login']?.[localVarOperationServerIndex]?.url;
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
},
/**
*
* @summary logout
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async logout(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.logout(options);
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
const localVarOperationServerBasePath = operationServerMap['DefaultApi.logout']?.[localVarOperationServerIndex]?.url;
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
},
/**
*
* @summary metrics
Expand All @@ -180,6 +328,18 @@ export const DefaultApiFp = function(configuration?: Configuration) {
const localVarOperationServerBasePath = operationServerMap['DefaultApi.metrics']?.[localVarOperationServerIndex]?.url;
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
},
/**
*
* @summary whoami
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async whoami(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<SessionData>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.whoami(options);
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
const localVarOperationServerBasePath = operationServerMap['DefaultApi.whoami']?.[localVarOperationServerIndex]?.url;
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
},
}
};

Expand Down Expand Up @@ -209,6 +369,25 @@ export const DefaultApiFactory = function (configuration?: Configuration, basePa
healthcheck(options?: any): AxiosPromise<void> {
return localVarFp.healthcheck(options).then((request) => request(axios, basePath));
},
/**
*
* @summary login
* @param {SessionLogin} sessionLogin
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
login(sessionLogin: SessionLogin, options?: any): AxiosPromise<SessionData> {
return localVarFp.login(sessionLogin, options).then((request) => request(axios, basePath));
},
/**
*
* @summary logout
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
logout(options?: any): AxiosPromise<void> {
return localVarFp.logout(options).then((request) => request(axios, basePath));
},
/**
*
* @summary metrics
Expand All @@ -218,6 +397,15 @@ export const DefaultApiFactory = function (configuration?: Configuration, basePa
metrics(options?: any): AxiosPromise<void> {
return localVarFp.metrics(options).then((request) => request(axios, basePath));
},
/**
*
* @summary whoami
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
whoami(options?: any): AxiosPromise<SessionData> {
return localVarFp.whoami(options).then((request) => request(axios, basePath));
},
};
};

Expand Down Expand Up @@ -251,6 +439,29 @@ export class DefaultApi extends BaseAPI {
return DefaultApiFp(this.configuration).healthcheck(options).then((request) => request(this.axios, this.basePath));
}

/**
*
* @summary login
* @param {SessionLogin} sessionLogin
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof DefaultApi
*/
public login(sessionLogin: SessionLogin, options?: RawAxiosRequestConfig) {
return DefaultApiFp(this.configuration).login(sessionLogin, options).then((request) => request(this.axios, this.basePath));
}

/**
*
* @summary logout
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof DefaultApi
*/
public logout(options?: RawAxiosRequestConfig) {
return DefaultApiFp(this.configuration).logout(options).then((request) => request(this.axios, this.basePath));
}

/**
*
* @summary metrics
Expand All @@ -261,5 +472,16 @@ export class DefaultApi extends BaseAPI {
public metrics(options?: RawAxiosRequestConfig) {
return DefaultApiFp(this.configuration).metrics(options).then((request) => request(this.axios, this.basePath));
}

/**
*
* @summary whoami
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof DefaultApi
*/
public whoami(options?: RawAxiosRequestConfig) {
return DefaultApiFp(this.configuration).whoami(options).then((request) => request(this.axios, this.basePath));
}
}

12 changes: 10 additions & 2 deletions src/component/api/api/members-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,23 @@ import type { Configuration } from '../configuration';
import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
import globalAxios from 'axios';
// Some imports not used depending on template conditions
// @ts-ignore
import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
import { BASE_PATH, COLLECTION_FORMATS, BaseAPI, RequiredError, operationServerMap } from '../base';
import type { RequestArgs } from '../base';
// @ts-ignore
import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base';
// @ts-ignore
import type { ErrorMessage } from '../models';
// @ts-ignore
import type { MemberBulkDelete } from '../models';
// @ts-ignore
import type { MemberBulkUpdate } from '../models';
// @ts-ignore
import type { MemberCreate } from '../models';
// @ts-ignore
import type { MemberData } from '../models';
// @ts-ignore
import type { MemberPassword } from '../models';
// @ts-ignore
import type { MemberProfile } from '../models';
/**
* MembersApi - axios parameter creator
Expand Down
17 changes: 13 additions & 4 deletions src/component/api/api/room-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,25 @@ import type { Configuration } from '../configuration';
import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
import globalAxios from 'axios';
// Some imports not used depending on template conditions
// @ts-ignore
import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
import { BASE_PATH, COLLECTION_FORMATS, BaseAPI, RequiredError, operationServerMap } from '../base';
import type { RequestArgs } from '../base';
// @ts-ignore
import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base';
// @ts-ignore
import type { BroadcastStatus } from '../models';
// @ts-ignore
import type { ClipboardText } from '../models';
// @ts-ignore
import type { ControlStatus } from '../models';
// @ts-ignore
import type { ErrorMessage } from '../models';
// @ts-ignore
import type { KeyboardMap } from '../models';
// @ts-ignore
import type { KeyboardModifiers } from '../models';
// @ts-ignore
import type { ScreenConfiguration } from '../models';
// @ts-ignore
import type { Settings } from '../models';
/**
* RoomApi - axios parameter creator
Expand Down Expand Up @@ -1003,7 +1012,7 @@ export const RoomApiAxiosParamCreator = function (configuration?: Configuration)

if (files) {
files.forEach((element) => {
localVarFormParams.append('files', element as any);
localVarFormParams.append('files', element as any);
})
}

Expand Down Expand Up @@ -1102,7 +1111,7 @@ export const RoomApiAxiosParamCreator = function (configuration?: Configuration)
}
if (files) {
files.forEach((element) => {
localVarFormParams.append('files', element as any);
localVarFormParams.append('files', element as any);
})
}

Expand Down
Loading

0 comments on commit 06955aa

Please sign in to comment.