mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
update api.
This commit is contained in:
parent
d891d5b331
commit
06955aa2f9
@ -5,7 +5,7 @@ api.ts
|
|||||||
api/default-api.ts
|
api/default-api.ts
|
||||||
api/members-api.ts
|
api/members-api.ts
|
||||||
api/room-api.ts
|
api/room-api.ts
|
||||||
api/session-api.ts
|
api/sessions-api.ts
|
||||||
base.ts
|
base.ts
|
||||||
common.ts
|
common.ts
|
||||||
configuration.ts
|
configuration.ts
|
||||||
|
@ -1 +1 @@
|
|||||||
7.4.0-SNAPSHOT
|
7.6.0-SNAPSHOT
|
||||||
|
@ -17,5 +17,5 @@
|
|||||||
export * from './api/default-api';
|
export * from './api/default-api';
|
||||||
export * from './api/members-api';
|
export * from './api/members-api';
|
||||||
export * from './api/room-api';
|
export * from './api/room-api';
|
||||||
export * from './api/session-api';
|
export * from './api/sessions-api';
|
||||||
|
|
||||||
|
@ -17,11 +17,20 @@ import type { Configuration } from '../configuration';
|
|||||||
import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
|
import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
|
||||||
import globalAxios from 'axios';
|
import globalAxios from 'axios';
|
||||||
// Some imports not used depending on template conditions
|
// 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 { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
|
||||||
import { BASE_PATH, COLLECTION_FORMATS, BaseAPI, RequiredError, operationServerMap } from '../base';
|
// @ts-ignore
|
||||||
import type { RequestArgs } from '../base';
|
import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base';
|
||||||
|
// @ts-ignore
|
||||||
import type { BatchRequest } from '../models';
|
import type { BatchRequest } from '../models';
|
||||||
|
// @ts-ignore
|
||||||
import type { BatchResponse } from '../models';
|
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
|
* DefaultApi - axios parameter creator
|
||||||
* @export
|
* @export
|
||||||
@ -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);
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
||||||
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
||||||
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
||||||
@ -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);
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
||||||
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
||||||
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
||||||
@ -168,6 +291,31 @@ export const DefaultApiFp = function(configuration?: Configuration) {
|
|||||||
const localVarOperationServerBasePath = operationServerMap['DefaultApi.healthcheck']?.[localVarOperationServerIndex]?.url;
|
const localVarOperationServerBasePath = operationServerMap['DefaultApi.healthcheck']?.[localVarOperationServerIndex]?.url;
|
||||||
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
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
|
* @summary metrics
|
||||||
@ -180,6 +328,18 @@ export const DefaultApiFp = function(configuration?: Configuration) {
|
|||||||
const localVarOperationServerBasePath = operationServerMap['DefaultApi.metrics']?.[localVarOperationServerIndex]?.url;
|
const localVarOperationServerBasePath = operationServerMap['DefaultApi.metrics']?.[localVarOperationServerIndex]?.url;
|
||||||
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
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);
|
||||||
|
},
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -209,6 +369,25 @@ export const DefaultApiFactory = function (configuration?: Configuration, basePa
|
|||||||
healthcheck(options?: any): AxiosPromise<void> {
|
healthcheck(options?: any): AxiosPromise<void> {
|
||||||
return localVarFp.healthcheck(options).then((request) => request(axios, basePath));
|
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
|
* @summary metrics
|
||||||
@ -218,6 +397,15 @@ export const DefaultApiFactory = function (configuration?: Configuration, basePa
|
|||||||
metrics(options?: any): AxiosPromise<void> {
|
metrics(options?: any): AxiosPromise<void> {
|
||||||
return localVarFp.metrics(options).then((request) => request(axios, basePath));
|
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));
|
||||||
|
},
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -251,6 +439,29 @@ export class DefaultApi extends BaseAPI {
|
|||||||
return DefaultApiFp(this.configuration).healthcheck(options).then((request) => request(this.axios, this.basePath));
|
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
|
* @summary metrics
|
||||||
@ -261,5 +472,16 @@ export class DefaultApi extends BaseAPI {
|
|||||||
public metrics(options?: RawAxiosRequestConfig) {
|
public metrics(options?: RawAxiosRequestConfig) {
|
||||||
return DefaultApiFp(this.configuration).metrics(options).then((request) => request(this.axios, this.basePath));
|
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));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -17,15 +17,23 @@ import type { Configuration } from '../configuration';
|
|||||||
import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
|
import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
|
||||||
import globalAxios from 'axios';
|
import globalAxios from 'axios';
|
||||||
// Some imports not used depending on template conditions
|
// 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 { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
|
||||||
import { BASE_PATH, COLLECTION_FORMATS, BaseAPI, RequiredError, operationServerMap } from '../base';
|
// @ts-ignore
|
||||||
import type { RequestArgs } from '../base';
|
import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base';
|
||||||
|
// @ts-ignore
|
||||||
import type { ErrorMessage } from '../models';
|
import type { ErrorMessage } from '../models';
|
||||||
|
// @ts-ignore
|
||||||
import type { MemberBulkDelete } from '../models';
|
import type { MemberBulkDelete } from '../models';
|
||||||
|
// @ts-ignore
|
||||||
import type { MemberBulkUpdate } from '../models';
|
import type { MemberBulkUpdate } from '../models';
|
||||||
|
// @ts-ignore
|
||||||
import type { MemberCreate } from '../models';
|
import type { MemberCreate } from '../models';
|
||||||
|
// @ts-ignore
|
||||||
import type { MemberData } from '../models';
|
import type { MemberData } from '../models';
|
||||||
|
// @ts-ignore
|
||||||
import type { MemberPassword } from '../models';
|
import type { MemberPassword } from '../models';
|
||||||
|
// @ts-ignore
|
||||||
import type { MemberProfile } from '../models';
|
import type { MemberProfile } from '../models';
|
||||||
/**
|
/**
|
||||||
* MembersApi - axios parameter creator
|
* MembersApi - axios parameter creator
|
||||||
|
@ -17,16 +17,25 @@ import type { Configuration } from '../configuration';
|
|||||||
import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
|
import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
|
||||||
import globalAxios from 'axios';
|
import globalAxios from 'axios';
|
||||||
// Some imports not used depending on template conditions
|
// 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 { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
|
||||||
import { BASE_PATH, COLLECTION_FORMATS, BaseAPI, RequiredError, operationServerMap } from '../base';
|
// @ts-ignore
|
||||||
import type { RequestArgs } from '../base';
|
import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base';
|
||||||
|
// @ts-ignore
|
||||||
import type { BroadcastStatus } from '../models';
|
import type { BroadcastStatus } from '../models';
|
||||||
|
// @ts-ignore
|
||||||
import type { ClipboardText } from '../models';
|
import type { ClipboardText } from '../models';
|
||||||
|
// @ts-ignore
|
||||||
import type { ControlStatus } from '../models';
|
import type { ControlStatus } from '../models';
|
||||||
|
// @ts-ignore
|
||||||
import type { ErrorMessage } from '../models';
|
import type { ErrorMessage } from '../models';
|
||||||
|
// @ts-ignore
|
||||||
import type { KeyboardMap } from '../models';
|
import type { KeyboardMap } from '../models';
|
||||||
|
// @ts-ignore
|
||||||
import type { KeyboardModifiers } from '../models';
|
import type { KeyboardModifiers } from '../models';
|
||||||
|
// @ts-ignore
|
||||||
import type { ScreenConfiguration } from '../models';
|
import type { ScreenConfiguration } from '../models';
|
||||||
|
// @ts-ignore
|
||||||
import type { Settings } from '../models';
|
import type { Settings } from '../models';
|
||||||
/**
|
/**
|
||||||
* RoomApi - axios parameter creator
|
* RoomApi - axios parameter creator
|
||||||
|
@ -17,29 +17,32 @@ import type { Configuration } from '../configuration';
|
|||||||
import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
|
import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
|
||||||
import globalAxios from 'axios';
|
import globalAxios from 'axios';
|
||||||
// Some imports not used depending on template conditions
|
// 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 { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
|
||||||
import { BASE_PATH, COLLECTION_FORMATS, BaseAPI, RequiredError, operationServerMap } from '../base';
|
// @ts-ignore
|
||||||
import type { RequestArgs } from '../base';
|
import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base';
|
||||||
|
// @ts-ignore
|
||||||
import type { ErrorMessage } from '../models';
|
import type { ErrorMessage } from '../models';
|
||||||
|
// @ts-ignore
|
||||||
import type { SessionData } from '../models';
|
import type { SessionData } from '../models';
|
||||||
import type { SessionLogin } from '../models';
|
|
||||||
/**
|
/**
|
||||||
* SessionApi - axios parameter creator
|
* SessionsApi - axios parameter creator
|
||||||
* @export
|
* @export
|
||||||
*/
|
*/
|
||||||
export const SessionApiAxiosParamCreator = function (configuration?: Configuration) {
|
export const SessionsApiAxiosParamCreator = function (configuration?: Configuration) {
|
||||||
return {
|
return {
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @summary login
|
* @summary disconnect session
|
||||||
* @param {SessionLogin} sessionLogin
|
* @param {string} sessionId session identifier
|
||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
login: async (sessionLogin: SessionLogin, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
sessionDisconnect: async (sessionId: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||||
// verify required parameter 'sessionLogin' is not null or undefined
|
// verify required parameter 'sessionId' is not null or undefined
|
||||||
assertParamExists('login', 'sessionLogin', sessionLogin)
|
assertParamExists('sessionDisconnect', 'sessionId', sessionId)
|
||||||
const localVarPath = `/api/login`;
|
const localVarPath = `/api/sessions/{sessionId}/disconnect`
|
||||||
|
.replace(`{${"sessionId"}}`, encodeURIComponent(String(sessionId)));
|
||||||
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
||||||
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
||||||
let baseOptions;
|
let baseOptions;
|
||||||
@ -51,14 +54,20 @@ export const SessionApiAxiosParamCreator = function (configuration?: Configurati
|
|||||||
const localVarHeaderParameter = {} as any;
|
const localVarHeaderParameter = {} as any;
|
||||||
const localVarQueryParameter = {} 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)
|
||||||
|
|
||||||
|
|
||||||
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
||||||
|
|
||||||
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
||||||
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
||||||
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
||||||
localVarRequestOptions.data = serializeDataIfNeeded(sessionLogin, localVarRequestOptions, configuration)
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
url: toPathString(localVarUrlObj),
|
url: toPathString(localVarUrlObj),
|
||||||
@ -67,12 +76,16 @@ export const SessionApiAxiosParamCreator = function (configuration?: Configurati
|
|||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @summary logout
|
* @summary get session
|
||||||
|
* @param {string} sessionId session identifier
|
||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
logout: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
sessionGet: async (sessionId: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||||
const localVarPath = `/api/logout`;
|
// verify required parameter 'sessionId' is not null or undefined
|
||||||
|
assertParamExists('sessionGet', 'sessionId', sessionId)
|
||||||
|
const localVarPath = `/api/sessions/{sessionId}`
|
||||||
|
.replace(`{${"sessionId"}}`, encodeURIComponent(String(sessionId)));
|
||||||
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
||||||
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
||||||
let baseOptions;
|
let baseOptions;
|
||||||
@ -80,7 +93,50 @@ export const SessionApiAxiosParamCreator = function (configuration?: Configurati
|
|||||||
baseOptions = configuration.baseOptions;
|
baseOptions = configuration.baseOptions;
|
||||||
}
|
}
|
||||||
|
|
||||||
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
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};
|
||||||
|
|
||||||
|
return {
|
||||||
|
url: toPathString(localVarUrlObj),
|
||||||
|
options: localVarRequestOptions,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @summary remove session
|
||||||
|
* @param {string} sessionId session identifier
|
||||||
|
* @param {*} [options] Override http request option.
|
||||||
|
* @throws {RequiredError}
|
||||||
|
*/
|
||||||
|
sessionRemove: async (sessionId: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||||
|
// verify required parameter 'sessionId' is not null or undefined
|
||||||
|
assertParamExists('sessionRemove', 'sessionId', sessionId)
|
||||||
|
const localVarPath = `/api/sessions/{sessionId}`
|
||||||
|
.replace(`{${"sessionId"}}`, encodeURIComponent(String(sessionId)));
|
||||||
|
// 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: 'DELETE', ...baseOptions, ...options};
|
||||||
const localVarHeaderParameter = {} as any;
|
const localVarHeaderParameter = {} as any;
|
||||||
const localVarQueryParameter = {} as any;
|
const localVarQueryParameter = {} as any;
|
||||||
|
|
||||||
@ -134,45 +190,6 @@ export const SessionApiAxiosParamCreator = 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);
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
||||||
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
||||||
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
||||||
@ -186,35 +203,49 @@ export const SessionApiAxiosParamCreator = function (configuration?: Configurati
|
|||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SessionApi - functional programming interface
|
* SessionsApi - functional programming interface
|
||||||
* @export
|
* @export
|
||||||
*/
|
*/
|
||||||
export const SessionApiFp = function(configuration?: Configuration) {
|
export const SessionsApiFp = function(configuration?: Configuration) {
|
||||||
const localVarAxiosParamCreator = SessionApiAxiosParamCreator(configuration)
|
const localVarAxiosParamCreator = SessionsApiAxiosParamCreator(configuration)
|
||||||
return {
|
return {
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @summary login
|
* @summary disconnect session
|
||||||
* @param {SessionLogin} sessionLogin
|
* @param {string} sessionId session identifier
|
||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
async login(sessionLogin: SessionLogin, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<SessionData>> {
|
async sessionDisconnect(sessionId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||||
const localVarAxiosArgs = await localVarAxiosParamCreator.login(sessionLogin, options);
|
const localVarAxiosArgs = await localVarAxiosParamCreator.sessionDisconnect(sessionId, options);
|
||||||
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
||||||
const localVarOperationServerBasePath = operationServerMap['SessionApi.login']?.[localVarOperationServerIndex]?.url;
|
const localVarOperationServerBasePath = operationServerMap['SessionsApi.sessionDisconnect']?.[localVarOperationServerIndex]?.url;
|
||||||
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @summary logout
|
* @summary get session
|
||||||
|
* @param {string} sessionId session identifier
|
||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
async logout(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
async sessionGet(sessionId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<SessionData>> {
|
||||||
const localVarAxiosArgs = await localVarAxiosParamCreator.logout(options);
|
const localVarAxiosArgs = await localVarAxiosParamCreator.sessionGet(sessionId, options);
|
||||||
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
||||||
const localVarOperationServerBasePath = operationServerMap['SessionApi.logout']?.[localVarOperationServerIndex]?.url;
|
const localVarOperationServerBasePath = operationServerMap['SessionsApi.sessionGet']?.[localVarOperationServerIndex]?.url;
|
||||||
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @summary remove session
|
||||||
|
* @param {string} sessionId session identifier
|
||||||
|
* @param {*} [options] Override http request option.
|
||||||
|
* @throws {RequiredError}
|
||||||
|
*/
|
||||||
|
async sessionRemove(sessionId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||||
|
const localVarAxiosArgs = await localVarAxiosParamCreator.sessionRemove(sessionId, options);
|
||||||
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
||||||
|
const localVarOperationServerBasePath = operationServerMap['SessionsApi.sessionRemove']?.[localVarOperationServerIndex]?.url;
|
||||||
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
@ -226,49 +257,48 @@ export const SessionApiFp = function(configuration?: Configuration) {
|
|||||||
async sessionsGet(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<SessionData>>> {
|
async sessionsGet(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<SessionData>>> {
|
||||||
const localVarAxiosArgs = await localVarAxiosParamCreator.sessionsGet(options);
|
const localVarAxiosArgs = await localVarAxiosParamCreator.sessionsGet(options);
|
||||||
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
||||||
const localVarOperationServerBasePath = operationServerMap['SessionApi.sessionsGet']?.[localVarOperationServerIndex]?.url;
|
const localVarOperationServerBasePath = operationServerMap['SessionsApi.sessionsGet']?.[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['SessionApi.whoami']?.[localVarOperationServerIndex]?.url;
|
|
||||||
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SessionApi - factory interface
|
* SessionsApi - factory interface
|
||||||
* @export
|
* @export
|
||||||
*/
|
*/
|
||||||
export const SessionApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
export const SessionsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
||||||
const localVarFp = SessionApiFp(configuration)
|
const localVarFp = SessionsApiFp(configuration)
|
||||||
return {
|
return {
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @summary login
|
* @summary disconnect session
|
||||||
* @param {SessionLogin} sessionLogin
|
* @param {string} sessionId session identifier
|
||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
login(sessionLogin: SessionLogin, options?: any): AxiosPromise<SessionData> {
|
sessionDisconnect(sessionId: string, options?: any): AxiosPromise<void> {
|
||||||
return localVarFp.login(sessionLogin, options).then((request) => request(axios, basePath));
|
return localVarFp.sessionDisconnect(sessionId, options).then((request) => request(axios, basePath));
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @summary logout
|
* @summary get session
|
||||||
|
* @param {string} sessionId session identifier
|
||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
logout(options?: any): AxiosPromise<void> {
|
sessionGet(sessionId: string, options?: any): AxiosPromise<SessionData> {
|
||||||
return localVarFp.logout(options).then((request) => request(axios, basePath));
|
return localVarFp.sessionGet(sessionId, options).then((request) => request(axios, basePath));
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @summary remove session
|
||||||
|
* @param {string} sessionId session identifier
|
||||||
|
* @param {*} [options] Override http request option.
|
||||||
|
* @throws {RequiredError}
|
||||||
|
*/
|
||||||
|
sessionRemove(sessionId: string, options?: any): AxiosPromise<void> {
|
||||||
|
return localVarFp.sessionRemove(sessionId, options).then((request) => request(axios, basePath));
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -279,46 +309,50 @@ export const SessionApiFactory = function (configuration?: Configuration, basePa
|
|||||||
sessionsGet(options?: any): AxiosPromise<Array<SessionData>> {
|
sessionsGet(options?: any): AxiosPromise<Array<SessionData>> {
|
||||||
return localVarFp.sessionsGet(options).then((request) => request(axios, basePath));
|
return localVarFp.sessionsGet(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));
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SessionApi - object-oriented interface
|
* SessionsApi - object-oriented interface
|
||||||
* @export
|
* @export
|
||||||
* @class SessionApi
|
* @class SessionsApi
|
||||||
* @extends {BaseAPI}
|
* @extends {BaseAPI}
|
||||||
*/
|
*/
|
||||||
export class SessionApi extends BaseAPI {
|
export class SessionsApi extends BaseAPI {
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @summary login
|
* @summary disconnect session
|
||||||
* @param {SessionLogin} sessionLogin
|
* @param {string} sessionId session identifier
|
||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
* @memberof SessionApi
|
* @memberof SessionsApi
|
||||||
*/
|
*/
|
||||||
public login(sessionLogin: SessionLogin, options?: RawAxiosRequestConfig) {
|
public sessionDisconnect(sessionId: string, options?: RawAxiosRequestConfig) {
|
||||||
return SessionApiFp(this.configuration).login(sessionLogin, options).then((request) => request(this.axios, this.basePath));
|
return SessionsApiFp(this.configuration).sessionDisconnect(sessionId, options).then((request) => request(this.axios, this.basePath));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @summary logout
|
* @summary get session
|
||||||
|
* @param {string} sessionId session identifier
|
||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
* @memberof SessionApi
|
* @memberof SessionsApi
|
||||||
*/
|
*/
|
||||||
public logout(options?: RawAxiosRequestConfig) {
|
public sessionGet(sessionId: string, options?: RawAxiosRequestConfig) {
|
||||||
return SessionApiFp(this.configuration).logout(options).then((request) => request(this.axios, this.basePath));
|
return SessionsApiFp(this.configuration).sessionGet(sessionId, options).then((request) => request(this.axios, this.basePath));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @summary remove session
|
||||||
|
* @param {string} sessionId session identifier
|
||||||
|
* @param {*} [options] Override http request option.
|
||||||
|
* @throws {RequiredError}
|
||||||
|
* @memberof SessionsApi
|
||||||
|
*/
|
||||||
|
public sessionRemove(sessionId: string, options?: RawAxiosRequestConfig) {
|
||||||
|
return SessionsApiFp(this.configuration).sessionRemove(sessionId, options).then((request) => request(this.axios, this.basePath));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -326,21 +360,10 @@ export class SessionApi extends BaseAPI {
|
|||||||
* @summary get sessions
|
* @summary get sessions
|
||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
* @memberof SessionApi
|
* @memberof SessionsApi
|
||||||
*/
|
*/
|
||||||
public sessionsGet(options?: RawAxiosRequestConfig) {
|
public sessionsGet(options?: RawAxiosRequestConfig) {
|
||||||
return SessionApiFp(this.configuration).sessionsGet(options).then((request) => request(this.axios, this.basePath));
|
return SessionsApiFp(this.configuration).sessionsGet(options).then((request) => request(this.axios, this.basePath));
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @summary whoami
|
|
||||||
* @param {*} [options] Override http request option.
|
|
||||||
* @throws {RequiredError}
|
|
||||||
* @memberof SessionApi
|
|
||||||
*/
|
|
||||||
public whoami(options?: RawAxiosRequestConfig) {
|
|
||||||
return SessionApiFp(this.configuration).whoami(options).then((request) => request(this.axios, this.basePath));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -14,6 +14,7 @@
|
|||||||
|
|
||||||
|
|
||||||
// May contain unused imports in some cases
|
// May contain unused imports in some cases
|
||||||
|
// @ts-ignore
|
||||||
import type { MemberProfile } from './member-profile';
|
import type { MemberProfile } from './member-profile';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -14,6 +14,7 @@
|
|||||||
|
|
||||||
|
|
||||||
// May contain unused imports in some cases
|
// May contain unused imports in some cases
|
||||||
|
// @ts-ignore
|
||||||
import type { MemberProfile } from './member-profile';
|
import type { MemberProfile } from './member-profile';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -14,8 +14,10 @@
|
|||||||
|
|
||||||
|
|
||||||
// May contain unused imports in some cases
|
// May contain unused imports in some cases
|
||||||
|
// @ts-ignore
|
||||||
import type { MemberProfile } from './member-profile';
|
import type { MemberProfile } from './member-profile';
|
||||||
// May contain unused imports in some cases
|
// May contain unused imports in some cases
|
||||||
|
// @ts-ignore
|
||||||
import type { SessionState } from './session-state';
|
import type { SessionState } from './session-state';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -18,8 +18,12 @@ export class NekoApi {
|
|||||||
return this.config.basePath || location.href.replace(/\/+$/, '')
|
return this.config.basePath || location.href.replace(/\/+$/, '')
|
||||||
}
|
}
|
||||||
|
|
||||||
get session(): SessionApi {
|
get default(): DefaultApi {
|
||||||
return new Api.SessionApi(this.config)
|
return new Api.DefaultApi(this.config)
|
||||||
|
}
|
||||||
|
|
||||||
|
get sessions(): SessionsApi {
|
||||||
|
return new Api.SessionsApi(this.config)
|
||||||
}
|
}
|
||||||
|
|
||||||
get room(): RoomApi {
|
get room(): RoomApi {
|
||||||
@ -31,6 +35,7 @@ export class NekoApi {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SessionApi = Api.SessionApi
|
export type DefaultApi = Api.DefaultApi
|
||||||
|
export type SessionsApi = Api.SessionsApi
|
||||||
export type RoomApi = Api.RoomApi
|
export type RoomApi = Api.RoomApi
|
||||||
export type MembersApi = Api.MembersApi
|
export type MembersApi = Api.MembersApi
|
||||||
|
@ -84,7 +84,7 @@ import type { AxiosInstance, AxiosProgressEvent } from 'axios'
|
|||||||
import ResizeObserver from 'resize-observer-polyfill'
|
import ResizeObserver from 'resize-observer-polyfill'
|
||||||
|
|
||||||
import { NekoApi } from './internal/api'
|
import { NekoApi } from './internal/api'
|
||||||
import type { MembersApi, RoomApi } from './internal/api'
|
import type { SessionsApi, MembersApi, RoomApi } from './internal/api'
|
||||||
import { NekoConnection } from './internal/connection'
|
import { NekoConnection } from './internal/connection'
|
||||||
import { NekoMessages } from './internal/messages'
|
import { NekoMessages } from './internal/messages'
|
||||||
import { NekoControl } from './internal/control'
|
import { NekoControl } from './internal/control'
|
||||||
@ -321,7 +321,7 @@ async function authenticate(token?: string) {
|
|||||||
state.connection.token = token // TODO: Vue.Set
|
state.connection.token = token // TODO: Vue.Set
|
||||||
}
|
}
|
||||||
|
|
||||||
await api.session.whoami()
|
await api.default.whoami()
|
||||||
state.authenticated = true // TODO: Vue.Set
|
state.authenticated = true // TODO: Vue.Set
|
||||||
|
|
||||||
if (token && props.autologin) {
|
if (token && props.autologin) {
|
||||||
@ -334,7 +334,7 @@ async function login(username: string, password: string) {
|
|||||||
throw new Error('client already authenticated')
|
throw new Error('client already authenticated')
|
||||||
}
|
}
|
||||||
|
|
||||||
const res = await api.session.login({ username, password })
|
const res = await api.default.login({ username, password })
|
||||||
if (res.data.token) {
|
if (res.data.token) {
|
||||||
api.setToken(res.data.token)
|
api.setToken(res.data.token)
|
||||||
state.connection.token = res.data.token // TODO: Vue.Set
|
state.connection.token = res.data.token // TODO: Vue.Set
|
||||||
@ -357,7 +357,7 @@ async function logout() {
|
|||||||
} catch {}
|
} catch {}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
await api.session.logout()
|
await api.default.logout()
|
||||||
} finally {
|
} finally {
|
||||||
api.setToken('')
|
api.setToken('')
|
||||||
delete state.connection.token // TODO: Vue.Delete
|
delete state.connection.token // TODO: Vue.Delete
|
||||||
@ -537,6 +537,7 @@ function withApi<T>(c: new (configuration?: Configuration, basePath?: string, ax
|
|||||||
|
|
||||||
const control = new NekoControl(connection, state.control)
|
const control = new NekoControl(connection, state.control)
|
||||||
|
|
||||||
|
const sessions = computed<SessionsApi>(() => api.sessions)
|
||||||
const room = computed<RoomApi>(() => api.room)
|
const room = computed<RoomApi>(() => api.room)
|
||||||
const members = computed<MembersApi>(() => api.members)
|
const members = computed<MembersApi>(() => api.members)
|
||||||
|
|
||||||
@ -824,6 +825,7 @@ defineExpose({
|
|||||||
// public methods
|
// public methods
|
||||||
control,
|
control,
|
||||||
// public api
|
// public api
|
||||||
|
sessions,
|
||||||
room,
|
room,
|
||||||
members,
|
members,
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user