diff --git a/src/api.ts b/src/api.ts index e47bd83..e080a25 100644 --- a/src/api.ts +++ b/src/api.ts @@ -189,21 +189,21 @@ export const ScubaApiAxiosParamCreator = function (configuration?: Configuration /** * * @param {AdminActions} action - * @param {string} recordLog + * @param {string} sessionId * @param {any} [body] * @param {*} [options] Override http request option. * @throws {RequiredError} */ admin: async ( action: AdminActions, - recordLog: string, + sessionId: string, body?: any, options: AxiosRequestConfig = {}, ): Promise => { // verify required parameter 'action' is not null or undefined assertParamExists('admin', 'action', action); - // verify required parameter 'recordLog' is not null or undefined - assertParamExists('admin', 'recordLog', recordLog); + // verify required parameter 'sessionId' is not null or undefined + assertParamExists('admin', 'sessionId', sessionId); const localVarPath = '/admin'; // use dummy base URL string because the URL constructor only accepts absolute URLs. @@ -215,7 +215,7 @@ export const ScubaApiAxiosParamCreator = function (configuration?: Configuration const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options }; const localVarHeaderParameter = {} as any; - const localVarQueryParameter = { action, recordLog } as any; + const localVarQueryParameter = { action, sessionId } as any; localVarHeaderParameter['Content-Type'] = 'application/json'; @@ -303,18 +303,18 @@ export const ScubaApiFp = function (configuration?: Configuration) { /** * * @param {AdminActions} action - * @param {string} recordLog + * @param {string} sessionId * @param {any} [body] * @param {*} [options] Override http request option. * @throws {RequiredError} */ async admin( action: AdminActions, - recordLog: string, + sessionId: string, body?: any, options?: AxiosRequestConfig, ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.admin(action, recordLog, body, options); + const localVarAxiosArgs = await localVarAxiosParamCreator.admin(action, sessionId, body, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, }; @@ -363,13 +363,13 @@ export const ScubaApiFactory = function (configuration?: Configuration, basePath /** * * @param {AdminActions} action - * @param {string} recordLog + * @param {string} sessionId * @param {any} [body] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - admin(action: AdminActions, recordLog: string, body?: any, options?: any): AxiosPromise { - return localVarFp.admin(action, recordLog, body, options).then(request => request(axios, basePath)); + admin(action: AdminActions, sessionId: string, body?: any, options?: any): AxiosPromise { + return localVarFp.admin(action, sessionId, body, options).then(request => request(axios, basePath)); }, }; }; @@ -433,14 +433,14 @@ export class ScubaApi extends BaseAPI { /** * * @param {AdminActions} action - * @param {string} recordLog + * @param {string} sessionId * @param {any} [body] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public admin(action: AdminActions, recordLog: string, body?: any, options?: AxiosRequestConfig) { + public admin(action: AdminActions, sessionId: string, body?: any, options?: AxiosRequestConfig) { return ScubaApiFp(this.configuration) - .admin(action, recordLog, body, options) + .admin(action, sessionId, body, options) .then(request => request(this.axios, this.basePath)); } } diff --git a/src/client.ts b/src/client.ts index e056c4e..6aa1e25 100644 --- a/src/client.ts +++ b/src/client.ts @@ -48,6 +48,11 @@ export type HealthCheckResponse = { date?: string; }; +export type AdminResponseCseq = { + sessionId: string; + cseq: number; +}; + function lpad(num: number, digits: number) { return num.toString().padStart(digits, '0'); } @@ -170,8 +175,13 @@ export default class ScubaClient { return resp.data; } - async admin(action: AdminActions, recordLog: string, options?: AxiosRequestConfig, body?: any): Promise { - const resp = (await this._api.admin(action, recordLog, body, { + async admin( + action: AdminActions, + sessionId: string, + options?: AxiosRequestConfig, + body?: any, + ): Promise { + const resp = (await this._api.admin(action, sessionId, body, { ...this._defaultReqOptions, ...options, })) as any;