Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@eclipse-theiacloud/common

Package Overview
Dependencies
Maintainers
5
Versions
50
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@eclipse-theiacloud/common - npm Package Compare versions

Comparing version 0.9.0-next.d3f0b54 to 0.9.0

41

lib/client.js

@@ -16,3 +16,3 @@ "use strict";

ServiceRequest.is = is;
})(ServiceRequest = exports.ServiceRequest || (exports.ServiceRequest = {}));
})(ServiceRequest || (exports.ServiceRequest = ServiceRequest = {}));
var PingRequest;

@@ -25,3 +25,3 @@ (function (PingRequest) {

PingRequest.create = create;
})(PingRequest = exports.PingRequest || (exports.PingRequest = {}));
})(PingRequest || (exports.PingRequest = PingRequest = {}));
var LaunchRequest;

@@ -43,35 +43,35 @@ (function (LaunchRequest) {

LaunchRequest.existingWorkspace = existingWorkspace;
})(LaunchRequest = exports.LaunchRequest || (exports.LaunchRequest = {}));
})(LaunchRequest || (exports.LaunchRequest = LaunchRequest = {}));
var SessionListRequest;
(function (SessionListRequest) {
SessionListRequest.KIND = 'sessionListRequest';
})(SessionListRequest = exports.SessionListRequest || (exports.SessionListRequest = {}));
})(SessionListRequest || (exports.SessionListRequest = SessionListRequest = {}));
var SessionStartRequest;
(function (SessionStartRequest) {
SessionStartRequest.KIND = 'sessionStartRequest';
})(SessionStartRequest = exports.SessionStartRequest || (exports.SessionStartRequest = {}));
})(SessionStartRequest || (exports.SessionStartRequest = SessionStartRequest = {}));
var SessionStopRequest;
(function (SessionStopRequest) {
SessionStopRequest.KIND = 'sessionStopRequest';
})(SessionStopRequest = exports.SessionStopRequest || (exports.SessionStopRequest = {}));
})(SessionStopRequest || (exports.SessionStopRequest = SessionStopRequest = {}));
var SessionActivityRequest;
(function (SessionActivityRequest) {
SessionActivityRequest.KIND = 'sessionActivityRequest';
})(SessionActivityRequest = exports.SessionActivityRequest || (exports.SessionActivityRequest = {}));
})(SessionActivityRequest || (exports.SessionActivityRequest = SessionActivityRequest = {}));
var SessionPerformanceRequest;
(function (SessionPerformanceRequest) {
SessionPerformanceRequest.KIND = 'sessionPerformanceRequest';
})(SessionPerformanceRequest = exports.SessionPerformanceRequest || (exports.SessionPerformanceRequest = {}));
})(SessionPerformanceRequest || (exports.SessionPerformanceRequest = SessionPerformanceRequest = {}));
var WorkspaceListRequest;
(function (WorkspaceListRequest) {
WorkspaceListRequest.KIND = 'workspaceListRequest';
})(WorkspaceListRequest = exports.WorkspaceListRequest || (exports.WorkspaceListRequest = {}));
})(WorkspaceListRequest || (exports.WorkspaceListRequest = WorkspaceListRequest = {}));
var WorkspaceCreationRequest;
(function (WorkspaceCreationRequest) {
WorkspaceCreationRequest.KIND = 'workspaceCreationRequest';
})(WorkspaceCreationRequest = exports.WorkspaceCreationRequest || (exports.WorkspaceCreationRequest = {}));
})(WorkspaceCreationRequest || (exports.WorkspaceCreationRequest = WorkspaceCreationRequest = {}));
var WorkspaceDeletionRequest;
(function (WorkspaceDeletionRequest) {
WorkspaceDeletionRequest.KIND = 'workspaceDeletionRequest';
})(WorkspaceDeletionRequest = exports.WorkspaceDeletionRequest || (exports.WorkspaceDeletionRequest = {}));
})(WorkspaceDeletionRequest || (exports.WorkspaceDeletionRequest = WorkspaceDeletionRequest = {}));
var TheiaCloud;

@@ -157,3 +157,3 @@ (function (TheiaCloud) {

})(Workspace = TheiaCloud.Workspace || (TheiaCloud.Workspace = {}));
})(TheiaCloud = exports.TheiaCloud || (exports.TheiaCloud = {}));
})(TheiaCloud || (exports.TheiaCloud = TheiaCloud = {}));
function createUser() {

@@ -185,3 +185,3 @@ return (0, uuid_1.v4)() + '@theia.cloud';

TheiaCloudErrorResponse.is = is;
})(TheiaCloudErrorResponse = exports.TheiaCloudErrorResponse || (exports.TheiaCloudErrorResponse = {}));
})(TheiaCloudErrorResponse || (exports.TheiaCloudErrorResponse = TheiaCloudErrorResponse = {}));
class TheiaCloudError extends Error {

@@ -200,7 +200,14 @@ constructor(message, status, originalError, serverError, request) {

const message = errorResponse ? errorResponse.reason : error.message;
const requestData = typeof error.config.data === 'string' ? JSON.parse(error.config.data) : error.config.data;
const requestData = error.config
? typeof error.config.data === 'string'
? JSON.parse(error.config.data)
: error.config.data
: undefined;
const serviceRequest = ServiceRequest.is(requestData) ? requestData : undefined;
const status = error.status ? parseInt(error.status, 10)
: error.response ? error.response.status
: errorResponse ? errorResponse.code
const status = error.status
? error.status
: error.response
? error.response.status
: errorResponse
? errorResponse.code
: TheiaCloudError.INTERNAL_ERROR;

@@ -207,0 +214,0 @@ return new TheiaCloudError(message, status, error, errorResponse, serviceRequest);

@@ -5,3 +5,3 @@ /**

*
* The version of the OpenAPI document: 0.8.0
* The version of the OpenAPI document: 0.9.0
*

@@ -14,3 +14,3 @@ *

import type { Configuration } from './configuration';
import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
import type { RequestArgs } from './base';

@@ -95,35 +95,8 @@ import { BaseAPI } from './base';

*
* @type {LaunchRequestEnv}
* @type {EnvironmentVars}
* @memberof LaunchRequest
*/
'env'?: LaunchRequestEnv;
'env'?: EnvironmentVars;
}
/**
*
* @export
* @interface LaunchRequestEnv
*/
export interface LaunchRequestEnv {
/**
* Map of environment variables to be passed to Deployment. Ignored if Theia applications are started eagerly. Empty by default.
* @type {{ [key: string]: string; }}
* @memberof LaunchRequestEnv
*/
'fromMap'?: {
[key: string]: string;
};
/**
* List of ConfigMaps (by name) containing environment variables to be passed to Deployment as envFrom.configMapRef. Ignored if Theia applications are started eagerly. Empty by default.
* @type {Array<string>}
* @memberof LaunchRequestEnv
*/
'fromConfigMaps'?: Array<string>;
/**
* List of Secrets (by name) containing environment variables to be passed to Deployment as envFrom.secretRef. Ignored if Theia applications are started eagerly. Empty by default.
* @type {Array<string>}
* @memberof LaunchRequestEnv
*/
'fromSecrets'?: Array<string>;
}
/**
* Request to ping the availability of the service.

@@ -342,6 +315,6 @@ * @export

*
* @type {LaunchRequestEnv}
* @type {EnvironmentVars}
* @memberof SessionStartRequest
*/
'env'?: LaunchRequestEnv;
'env'?: EnvironmentVars;
}

@@ -497,3 +470,3 @@ /**

*/
serviceAppIdGet: (appId: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
serviceAppIdGet: (appId: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
/**

@@ -506,3 +479,3 @@ * Launches a session and creates a workspace if required. Responds with the URL of the launched session.

*/
servicePost: (launchRequest?: LaunchRequest, options?: AxiosRequestConfig) => Promise<RequestArgs>;
servicePost: (launchRequest?: LaunchRequest, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
};

@@ -521,3 +494,3 @@ /**

*/
serviceAppIdGet(appId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<boolean>>;
serviceAppIdGet(appId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<boolean>>;
/**

@@ -530,3 +503,3 @@ * Launches a session and creates a workspace if required. Responds with the URL of the launched session.

*/
servicePost(launchRequest?: LaunchRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<string>>;
servicePost(launchRequest?: LaunchRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<string>>;
};

@@ -570,3 +543,3 @@ /**

*/
serviceAppIdGet(appId: string, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<boolean, any>>;
serviceAppIdGet(appId: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<boolean, any>>;
/**

@@ -580,3 +553,3 @@ * Launches a session and creates a workspace if required. Responds with the URL of the launched session.

*/
servicePost(launchRequest?: LaunchRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<string, any>>;
servicePost(launchRequest?: LaunchRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<string, any>>;
}

@@ -596,3 +569,3 @@ /**

*/
serviceSessionAppIdUserGet: (appId: string, user: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
serviceSessionAppIdUserGet: (appId: string, user: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
/**

@@ -605,3 +578,3 @@ * Stops a session.

*/
serviceSessionDelete: (sessionStopRequest?: SessionStopRequest, options?: AxiosRequestConfig) => Promise<RequestArgs>;
serviceSessionDelete: (sessionStopRequest?: SessionStopRequest, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
/**

@@ -614,3 +587,3 @@ * Updates the last activity timestamp for a session to monitor activity.

*/
serviceSessionPatch: (sessionActivityRequest?: SessionActivityRequest, options?: AxiosRequestConfig) => Promise<RequestArgs>;
serviceSessionPatch: (sessionActivityRequest?: SessionActivityRequest, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
/**

@@ -624,3 +597,3 @@ * Returns the current CPU and memory usage of the session\'s pod.

*/
serviceSessionPerformanceAppIdSessionNameGet: (appId: string, sessionName: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
serviceSessionPerformanceAppIdSessionNameGet: (appId: string, sessionName: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
/**

@@ -633,3 +606,3 @@ * Starts a new session for an existing workspace and responds with the URL of the started session.

*/
serviceSessionPost: (sessionStartRequest?: SessionStartRequest, options?: AxiosRequestConfig) => Promise<RequestArgs>;
serviceSessionPost: (sessionStartRequest?: SessionStartRequest, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
};

@@ -649,3 +622,3 @@ /**

*/
serviceSessionAppIdUserGet(appId: string, user: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<SessionSpec>>>;
serviceSessionAppIdUserGet(appId: string, user: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<SessionSpec>>>;
/**

@@ -658,3 +631,3 @@ * Stops a session.

*/
serviceSessionDelete(sessionStopRequest?: SessionStopRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<boolean>>;
serviceSessionDelete(sessionStopRequest?: SessionStopRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<boolean>>;
/**

@@ -667,3 +640,3 @@ * Updates the last activity timestamp for a session to monitor activity.

*/
serviceSessionPatch(sessionActivityRequest?: SessionActivityRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<boolean>>;
serviceSessionPatch(sessionActivityRequest?: SessionActivityRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<boolean>>;
/**

@@ -677,3 +650,3 @@ * Returns the current CPU and memory usage of the session\'s pod.

*/
serviceSessionPerformanceAppIdSessionNameGet(appId: string, sessionName: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<SessionPerformance>>;
serviceSessionPerformanceAppIdSessionNameGet(appId: string, sessionName: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<SessionPerformance>>;
/**

@@ -686,3 +659,3 @@ * Starts a new session for an existing workspace and responds with the URL of the started session.

*/
serviceSessionPost(sessionStartRequest?: SessionStartRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<string>>;
serviceSessionPost(sessionStartRequest?: SessionStartRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<string>>;
};

@@ -753,3 +726,3 @@ /**

*/
serviceSessionAppIdUserGet(appId: string, user: string, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<SessionSpec[], any>>;
serviceSessionAppIdUserGet(appId: string, user: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<SessionSpec[], any>>;
/**

@@ -763,3 +736,3 @@ * Stops a session.

*/
serviceSessionDelete(sessionStopRequest?: SessionStopRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<boolean, any>>;
serviceSessionDelete(sessionStopRequest?: SessionStopRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<boolean, any>>;
/**

@@ -773,3 +746,3 @@ * Updates the last activity timestamp for a session to monitor activity.

*/
serviceSessionPatch(sessionActivityRequest?: SessionActivityRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<boolean, any>>;
serviceSessionPatch(sessionActivityRequest?: SessionActivityRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<boolean, any>>;
/**

@@ -784,3 +757,3 @@ * Returns the current CPU and memory usage of the session\'s pod.

*/
serviceSessionPerformanceAppIdSessionNameGet(appId: string, sessionName: string, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<SessionPerformance, any>>;
serviceSessionPerformanceAppIdSessionNameGet(appId: string, sessionName: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<SessionPerformance, any>>;
/**

@@ -794,3 +767,3 @@ * Starts a new session for an existing workspace and responds with the URL of the started session.

*/
serviceSessionPost(sessionStartRequest?: SessionStartRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<string, any>>;
serviceSessionPost(sessionStartRequest?: SessionStartRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<string, any>>;
}

@@ -810,3 +783,3 @@ /**

*/
serviceWorkspaceAppIdUserGet: (appId: string, user: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
serviceWorkspaceAppIdUserGet: (appId: string, user: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
/**

@@ -819,3 +792,3 @@ * Deletes a workspace.

*/
serviceWorkspaceDelete: (workspaceDeletionRequest?: WorkspaceDeletionRequest, options?: AxiosRequestConfig) => Promise<RequestArgs>;
serviceWorkspaceDelete: (workspaceDeletionRequest?: WorkspaceDeletionRequest, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
/**

@@ -828,3 +801,3 @@ * Creates a new workspace for a user.

*/
serviceWorkspacePost: (workspaceCreationRequest?: WorkspaceCreationRequest, options?: AxiosRequestConfig) => Promise<RequestArgs>;
serviceWorkspacePost: (workspaceCreationRequest?: WorkspaceCreationRequest, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
};

@@ -844,3 +817,3 @@ /**

*/
serviceWorkspaceAppIdUserGet(appId: string, user: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<UserWorkspace>>>;
serviceWorkspaceAppIdUserGet(appId: string, user: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<UserWorkspace>>>;
/**

@@ -853,3 +826,3 @@ * Deletes a workspace.

*/
serviceWorkspaceDelete(workspaceDeletionRequest?: WorkspaceDeletionRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<boolean>>;
serviceWorkspaceDelete(workspaceDeletionRequest?: WorkspaceDeletionRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<boolean>>;
/**

@@ -862,3 +835,3 @@ * Creates a new workspace for a user.

*/
serviceWorkspacePost(workspaceCreationRequest?: WorkspaceCreationRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<UserWorkspace>>;
serviceWorkspacePost(workspaceCreationRequest?: WorkspaceCreationRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<UserWorkspace>>;
};

@@ -912,3 +885,3 @@ /**

*/
serviceWorkspaceAppIdUserGet(appId: string, user: string, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<UserWorkspace[], any>>;
serviceWorkspaceAppIdUserGet(appId: string, user: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<UserWorkspace[], any>>;
/**

@@ -922,3 +895,3 @@ * Deletes a workspace.

*/
serviceWorkspaceDelete(workspaceDeletionRequest?: WorkspaceDeletionRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<boolean, any>>;
serviceWorkspaceDelete(workspaceDeletionRequest?: WorkspaceDeletionRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<boolean, any>>;
/**

@@ -932,4 +905,4 @@ * Creates a new workspace for a user.

*/
serviceWorkspacePost(workspaceCreationRequest?: WorkspaceCreationRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<UserWorkspace, any>>;
serviceWorkspacePost(workspaceCreationRequest?: WorkspaceCreationRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<UserWorkspace, any>>;
}
//# sourceMappingURL=api.d.ts.map

@@ -8,3 +8,3 @@ "use strict";

*
* The version of the OpenAPI document: 0.8.0
* The version of the OpenAPI document: 0.9.0
*

@@ -115,3 +115,5 @@ *

const localVarAxiosArgs = await localVarAxiosParamCreator.serviceAppIdGet(appId, options);
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
const index = configuration?.serverIndex ?? 0;
const operationBasePath = base_1.operationServerMap['RootResourceApi.serviceAppIdGet']?.[index]?.url;
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, operationBasePath || basePath);
},

@@ -127,3 +129,5 @@ /**

const localVarAxiosArgs = await localVarAxiosParamCreator.servicePost(launchRequest, options);
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
const index = configuration?.serverIndex ?? 0;
const operationBasePath = base_1.operationServerMap['RootResourceApi.servicePost']?.[index]?.url;
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, operationBasePath || basePath);
},

@@ -385,3 +389,5 @@ };

const localVarAxiosArgs = await localVarAxiosParamCreator.serviceSessionAppIdUserGet(appId, user, options);
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
const index = configuration?.serverIndex ?? 0;
const operationBasePath = base_1.operationServerMap['SessionResourceApi.serviceSessionAppIdUserGet']?.[index]?.url;
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, operationBasePath || basePath);
},

@@ -397,3 +403,5 @@ /**

const localVarAxiosArgs = await localVarAxiosParamCreator.serviceSessionDelete(sessionStopRequest, options);
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
const index = configuration?.serverIndex ?? 0;
const operationBasePath = base_1.operationServerMap['SessionResourceApi.serviceSessionDelete']?.[index]?.url;
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, operationBasePath || basePath);
},

@@ -409,3 +417,5 @@ /**

const localVarAxiosArgs = await localVarAxiosParamCreator.serviceSessionPatch(sessionActivityRequest, options);
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
const index = configuration?.serverIndex ?? 0;
const operationBasePath = base_1.operationServerMap['SessionResourceApi.serviceSessionPatch']?.[index]?.url;
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, operationBasePath || basePath);
},

@@ -422,3 +432,5 @@ /**

const localVarAxiosArgs = await localVarAxiosParamCreator.serviceSessionPerformanceAppIdSessionNameGet(appId, sessionName, options);
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
const index = configuration?.serverIndex ?? 0;
const operationBasePath = base_1.operationServerMap['SessionResourceApi.serviceSessionPerformanceAppIdSessionNameGet']?.[index]?.url;
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, operationBasePath || basePath);
},

@@ -434,3 +446,5 @@ /**

const localVarAxiosArgs = await localVarAxiosParamCreator.serviceSessionPost(sessionStartRequest, options);
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
const index = configuration?.serverIndex ?? 0;
const operationBasePath = base_1.operationServerMap['SessionResourceApi.serviceSessionPost']?.[index]?.url;
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, operationBasePath || basePath);
},

@@ -692,3 +706,5 @@ };

const localVarAxiosArgs = await localVarAxiosParamCreator.serviceWorkspaceAppIdUserGet(appId, user, options);
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
const index = configuration?.serverIndex ?? 0;
const operationBasePath = base_1.operationServerMap['WorkspaceResourceApi.serviceWorkspaceAppIdUserGet']?.[index]?.url;
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, operationBasePath || basePath);
},

@@ -704,3 +720,5 @@ /**

const localVarAxiosArgs = await localVarAxiosParamCreator.serviceWorkspaceDelete(workspaceDeletionRequest, options);
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
const index = configuration?.serverIndex ?? 0;
const operationBasePath = base_1.operationServerMap['WorkspaceResourceApi.serviceWorkspaceDelete']?.[index]?.url;
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, operationBasePath || basePath);
},

@@ -716,3 +734,5 @@ /**

const localVarAxiosArgs = await localVarAxiosParamCreator.serviceWorkspacePost(workspaceCreationRequest, options);
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
const index = configuration?.serverIndex ?? 0;
const operationBasePath = base_1.operationServerMap['WorkspaceResourceApi.serviceWorkspacePost']?.[index]?.url;
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, operationBasePath || basePath);
},

@@ -719,0 +739,0 @@ };

@@ -5,3 +5,3 @@ /**

*
* The version of the OpenAPI document: 0.8.0
* The version of the OpenAPI document: 0.9.0
*

@@ -14,3 +14,3 @@ *

import type { Configuration } from './configuration';
import type { AxiosInstance, AxiosRequestConfig } from 'axios';
import type { AxiosInstance, RawAxiosRequestConfig } from 'axios';
export declare const BASE_PATH: string;

@@ -34,3 +34,3 @@ /**

url: string;
options: AxiosRequestConfig;
options: RawAxiosRequestConfig;
}

@@ -58,2 +58,14 @@ /**

}
interface ServerMap {
[key: string]: {
url: string;
description: string;
}[];
}
/**
*
* @export
*/
export declare const operationServerMap: ServerMap;
export {};
//# sourceMappingURL=base.d.ts.map

@@ -8,3 +8,3 @@ "use strict";

*
* The version of the OpenAPI document: 0.8.0
* The version of the OpenAPI document: 0.9.0
*

@@ -20,3 +20,3 @@ *

Object.defineProperty(exports, "__esModule", { value: true });
exports.RequiredError = exports.BaseAPI = exports.COLLECTION_FORMATS = exports.BASE_PATH = void 0;
exports.operationServerMap = exports.RequiredError = exports.BaseAPI = exports.COLLECTION_FORMATS = exports.BASE_PATH = void 0;
const axios_1 = __importDefault(require("axios"));

@@ -45,3 +45,3 @@ exports.BASE_PATH = "http://localhost".replace(/\/+$/, "");

this.configuration = configuration;
this.basePath = configuration.basePath || this.basePath;
this.basePath = configuration.basePath ?? basePath;
}

@@ -66,2 +66,7 @@ }

exports.RequiredError = RequiredError;
/**
*
* @export
*/
exports.operationServerMap = {};
//# sourceMappingURL=base.js.map

@@ -5,3 +5,3 @@ /**

*
* The version of the OpenAPI document: 0.8.0
* The version of the OpenAPI document: 0.9.0
*

@@ -8,0 +8,0 @@ *

@@ -8,3 +8,3 @@ "use strict";

*
* The version of the OpenAPI document: 0.8.0
* The version of the OpenAPI document: 0.9.0
*

@@ -142,3 +142,3 @@ *

return (axios = globalAxios, basePath = BASE_PATH) => {
const axiosRequestArgs = { ...axiosArgs.options, url: (configuration?.basePath || basePath) + axiosArgs.url };
const axiosRequestArgs = { ...axiosArgs.options, url: (axios.defaults.baseURL ? '' : configuration?.basePath ?? basePath) + axiosArgs.url };
return axios.request(axiosRequestArgs);

@@ -145,0 +145,0 @@ };

@@ -5,3 +5,3 @@ /**

*
* The version of the OpenAPI document: 0.8.0
* The version of the OpenAPI document: 0.9.0
*

@@ -19,2 +19,3 @@ *

basePath?: string;
serverIndex?: number;
baseOptions?: any;

@@ -59,2 +60,9 @@ formDataCtor?: new () => any;

/**
* override server index
*
* @type {number}
* @memberof Configuration
*/
serverIndex?: number;
/**
* base options for axios calls

@@ -61,0 +69,0 @@ *

@@ -8,3 +8,3 @@ "use strict";

*
* The version of the OpenAPI document: 0.8.0
* The version of the OpenAPI document: 0.9.0
*

@@ -25,2 +25,3 @@ *

this.basePath = param.basePath;
this.serverIndex = param.serverIndex;
this.baseOptions = param.baseOptions;

@@ -27,0 +28,0 @@ this.formDataCtor = param.formDataCtor;

@@ -5,3 +5,3 @@ /**

*
* The version of the OpenAPI document: 0.8.0
* The version of the OpenAPI document: 0.9.0
*

@@ -8,0 +8,0 @@ *

@@ -8,3 +8,3 @@ "use strict";

*
* The version of the OpenAPI document: 0.8.0
* The version of the OpenAPI document: 0.9.0
*

@@ -11,0 +11,0 @@ *

@@ -17,3 +17,3 @@ "use strict";

TheiaCloudConfig.is = is;
})(TheiaCloudConfig = exports.TheiaCloudConfig || (exports.TheiaCloudConfig = {}));
})(TheiaCloudConfig || (exports.TheiaCloudConfig = TheiaCloudConfig = {}));
var KeycloakConfig;

@@ -29,3 +29,3 @@ (function (KeycloakConfig) {

KeycloakConfig.is = is;
})(KeycloakConfig = exports.KeycloakConfig || (exports.KeycloakConfig = {}));
})(KeycloakConfig || (exports.KeycloakConfig = KeycloakConfig = {}));
function getTheiaCloudConfig() {

@@ -32,0 +32,0 @@ const config = window.theiaCloudConfig;

{
"name": "@eclipse-theiacloud/common",
"version": "0.9.0-next.d3f0b54",
"version": "0.9.0",
"description": "Common functionality for Theia.cloud",

@@ -36,3 +36,3 @@ "license": "EPL-2.0",

"prepublishOnly": "npm run build",
"publish:next": "npm version `npm pkg get version | tr -d '\"'`.`git rev-parse --short HEAD` && npm publish --tag next",
"publish:next": "npm pkg set version=`npm pkg get version | head -1 | tr -d '\"'`.`git rev-parse --short HEAD` && npm publish --tag next",
"publish:latest": "npm publish --tag latest"

@@ -42,5 +42,5 @@ },

"@types/uuid": "^8.3.4",
"axios": "^0.27.2",
"axios": "^1.6.5",
"uuid": "^8.3.2"
}
}

@@ -6,8 +6,18 @@ import { AxiosError, AxiosRequestConfig, AxiosResponse } from 'axios';

LaunchRequest as ClientLaunchRequest,
PingRequest as ClientPingRequest, RootResourceApi, SessionActivityRequest as ClientSessionActivityRequest, SessionListRequest as ClientSessionListRequest,
SessionPerformance, SessionPerformanceRequest as ClientSessionPerformanceRequest,
SessionResourceApi, SessionSpec, SessionStartRequest as ClientSessionStartRequest, SessionStopRequest as ClientSessionStopRequest,
UserWorkspace, WorkspaceCreationRequest as ClientWorkspaceCreationRequest,
WorkspaceDeletionRequest as ClientWorkspaceDeletionRequest, WorkspaceListRequest as ClientWorkspaceListRequest,
WorkspaceResourceApi } from './client/api';
PingRequest as ClientPingRequest,
RootResourceApi,
SessionActivityRequest as ClientSessionActivityRequest,
SessionListRequest as ClientSessionListRequest,
SessionPerformance,
SessionPerformanceRequest as ClientSessionPerformanceRequest,
SessionResourceApi,
SessionSpec,
SessionStartRequest as ClientSessionStartRequest,
SessionStopRequest as ClientSessionStopRequest,
UserWorkspace,
WorkspaceCreationRequest as ClientWorkspaceCreationRequest,
WorkspaceDeletionRequest as ClientWorkspaceDeletionRequest,
WorkspaceListRequest as ClientWorkspaceListRequest,
WorkspaceResourceApi
} from './client/api';
import { Configuration } from './client/configuration';

@@ -48,8 +58,21 @@

export function ephemeral(serviceUrl: string, appId: string, appDefinition: string, timeout?: number, user: string = createUser()): LaunchRequest {
export function ephemeral(
serviceUrl: string,
appId: string,
appDefinition: string,
timeout?: number,
user: string = createUser()
): LaunchRequest {
return { serviceUrl, appId, appDefinition, user, ephemeral: true, timeout };
}
export function createWorkspace(serviceUrl: string, appId: string, appDefinition: string, timeout?: number, user: string = createUser(),
workspaceName?: string, label?: string): LaunchRequest {
export function createWorkspace(
serviceUrl: string,
appId: string,
appDefinition: string,
timeout?: number,
user: string = createUser(),
workspaceName?: string,
label?: string
): LaunchRequest {
return { serviceUrl, appId, appDefinition, user, label, workspaceName, ephemeral: false, timeout };

@@ -59,3 +82,10 @@ }

// eslint-disable-next-line max-len
export function existingWorkspace(serviceUrl: string, appId: string, workspaceName: string, timeout?: number, appDefinition?: string, user: string = createUser()): LaunchRequest {
export function existingWorkspace(
serviceUrl: string,
appId: string,
workspaceName: string,
timeout?: number,
appDefinition?: string,
user: string = createUser()
): LaunchRequest {
return { serviceUrl, appId, workspaceName, appDefinition, user, timeout };

@@ -120,3 +150,6 @@ }

const { accessToken, retries, timeout } = options;
return call(() => rootApi(request.serviceUrl, accessToken).serviceAppIdGet(request.appId, createConfig(timeout)), retries);
return call(
() => rootApi(request.serviceUrl, accessToken).serviceAppIdGet(request.appId, createConfig(timeout)),
retries
);
}

@@ -127,3 +160,6 @@

const launchRequest = { kind: LaunchRequest.KIND, ...request };
return call(() => rootApi(request.serviceUrl, accessToken).servicePost(launchRequest, createConfig(timeout)), retries);
return call(
() => rootApi(request.serviceUrl, accessToken).servicePost(launchRequest, createConfig(timeout)),
retries
);
}

@@ -139,5 +175,16 @@

export namespace Session {
export async function listSessions(request: SessionListRequest, options: RequestOptions = {}): Promise<SessionSpec[]> {
export async function listSessions(
request: SessionListRequest,
options: RequestOptions = {}
): Promise<SessionSpec[]> {
const { accessToken, retries, timeout } = options;
return call(() => sessionApi(request.serviceUrl, accessToken).serviceSessionAppIdUserGet(request.appId, request.user, createConfig(timeout)), retries);
return call(
() =>
sessionApi(request.serviceUrl, accessToken).serviceSessionAppIdUserGet(
request.appId,
request.user,
createConfig(timeout)
),
retries
);
}

@@ -148,3 +195,7 @@

const sessionStartRequest = { kind: SessionStartRequest.KIND, ...request };
return call(() => sessionApi(request.serviceUrl, accessToken).serviceSessionPost(sessionStartRequest, createConfig(timeout)), retries);
return call(
() =>
sessionApi(request.serviceUrl, accessToken).serviceSessionPost(sessionStartRequest, createConfig(timeout)),
retries
);
}

@@ -155,15 +206,37 @@

const sessionStopRequest = { kind: SessionStopRequest.KIND, ...request };
return call(() => sessionApi(request.serviceUrl, accessToken).serviceSessionDelete(sessionStopRequest, createConfig(timeout)), retries);
return call(
() =>
sessionApi(request.serviceUrl, accessToken).serviceSessionDelete(sessionStopRequest, createConfig(timeout)),
retries
);
}
export async function reportSessionActivity(request: SessionActivityRequest, options: RequestOptions = {}): Promise<boolean> {
export async function reportSessionActivity(
request: SessionActivityRequest,
options: RequestOptions = {}
): Promise<boolean> {
const { accessToken, retries, timeout } = options;
const sessionActivityRequest = { kind: SessionActivityRequest.KIND, ...request };
return call(() => sessionApi(request.serviceUrl, accessToken).serviceSessionPatch(sessionActivityRequest, createConfig(timeout)), retries);
return call(
() =>
sessionApi(request.serviceUrl, accessToken).serviceSessionPatch(
sessionActivityRequest,
createConfig(timeout)
),
retries
);
}
export async function getSessionPerformance(request: SessionPerformanceRequest, options: RequestOptions = {}): Promise<SessionPerformance> {
export async function getSessionPerformance(
request: SessionPerformanceRequest,
options: RequestOptions = {}
): Promise<SessionPerformance> {
const { accessToken, retries, timeout } = options;
return call(
() => sessionApi(request.serviceUrl, accessToken).serviceSessionPerformanceAppIdSessionNameGet(request.appId, request.sessionName, createConfig(timeout)),
() =>
sessionApi(request.serviceUrl, accessToken).serviceSessionPerformanceAppIdSessionNameGet(
request.appId,
request.sessionName,
createConfig(timeout)
),
retries

@@ -175,17 +248,48 @@ );

export namespace Workspace {
export async function listWorkspaces(request: WorkspaceListRequest, options: RequestOptions = {}): Promise<UserWorkspace[]> {
export async function listWorkspaces(
request: WorkspaceListRequest,
options: RequestOptions = {}
): Promise<UserWorkspace[]> {
const { accessToken, retries, timeout } = options;
return call(() => workspaceApi(request.serviceUrl, accessToken).serviceWorkspaceAppIdUserGet(request.appId, request.user, createConfig(timeout)), retries);
return call(
() =>
workspaceApi(request.serviceUrl, accessToken).serviceWorkspaceAppIdUserGet(
request.appId,
request.user,
createConfig(timeout)
),
retries
);
}
export async function createWorkspace(request: WorkspaceCreationRequest, options: RequestOptions = {}): Promise<UserWorkspace> {
export async function createWorkspace(
request: WorkspaceCreationRequest,
options: RequestOptions = {}
): Promise<UserWorkspace> {
const { accessToken, retries, timeout } = options;
const workspaceCreationRequest = { kind: WorkspaceCreationRequest.KIND, ...request };
return call(() => workspaceApi(request.serviceUrl, accessToken).serviceWorkspacePost(workspaceCreationRequest, createConfig(timeout)), retries);
return call(
() =>
workspaceApi(request.serviceUrl, accessToken).serviceWorkspacePost(
workspaceCreationRequest,
createConfig(timeout)
),
retries
);
}
export async function deleteWorkspace(request: WorkspaceDeletionRequest, options: RequestOptions = {}): Promise<boolean> {
export async function deleteWorkspace(
request: WorkspaceDeletionRequest,
options: RequestOptions = {}
): Promise<boolean> {
const { accessToken, retries, timeout } = options;
const workspaceDeletionRequest = { kind: WorkspaceDeletionRequest.KIND, ...request };
return call(() => workspaceApi(request.serviceUrl, accessToken).serviceWorkspaceDelete(workspaceDeletionRequest, createConfig(timeout)), retries);
return call(
() =>
workspaceApi(request.serviceUrl, accessToken).serviceWorkspaceDelete(
workspaceDeletionRequest,
createConfig(timeout)
),
retries
);
}

@@ -230,3 +334,9 @@ }

constructor(message: string, public status: number, public originalError: Error, public serverError?: TheiaCloudErrorResponse, public request?: ServiceRequest) {
constructor(
message: string,
public status: number,
public originalError: Error,
public serverError?: TheiaCloudErrorResponse,
public request?: ServiceRequest
) {
super(message);

@@ -241,8 +351,15 @@ }

const requestData = typeof error.config.data === 'string' ? JSON.parse(error.config.data) : error.config.data;
const requestData = error.config
? typeof error.config.data === 'string'
? JSON.parse(error.config.data)
: error.config.data
: undefined;
const serviceRequest = ServiceRequest.is(requestData) ? requestData : undefined;
const status = error.status ? parseInt(error.status, 10)
: error.response ? error.response.status
: errorResponse ? errorResponse.code
const status = error.status
? error.status
: error.response
? error.response.status
: errorResponse
? errorResponse.code
: TheiaCloudError.INTERNAL_ERROR;

@@ -249,0 +366,0 @@ return new TheiaCloudError(message, status, error, errorResponse, serviceRequest);

@@ -7,3 +7,3 @@ /* tslint:disable */

*
* The version of the OpenAPI document: 0.8.0
* The version of the OpenAPI document: 0.9.0
*

@@ -18,3 +18,3 @@ *

import type { Configuration } from './configuration';
import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
import globalAxios from 'axios';

@@ -26,3 +26,3 @@ // Some imports not used depending on template conditions

// @ts-ignore
import { BASE_PATH, COLLECTION_FORMATS, BaseAPI, RequiredError } from './base';
import { BASE_PATH, COLLECTION_FORMATS, BaseAPI, RequiredError, operationServerMap } from './base';

@@ -104,33 +104,8 @@ /**

*
* @type {LaunchRequestEnv}
* @type {EnvironmentVars}
* @memberof LaunchRequest
*/
'env'?: LaunchRequestEnv;
'env'?: EnvironmentVars;
}
/**
*
* @export
* @interface LaunchRequestEnv
*/
export interface LaunchRequestEnv {
/**
* Map of environment variables to be passed to Deployment. Ignored if Theia applications are started eagerly. Empty by default.
* @type {{ [key: string]: string; }}
* @memberof LaunchRequestEnv
*/
'fromMap'?: { [key: string]: string; };
/**
* List of ConfigMaps (by name) containing environment variables to be passed to Deployment as envFrom.configMapRef. Ignored if Theia applications are started eagerly. Empty by default.
* @type {Array<string>}
* @memberof LaunchRequestEnv
*/
'fromConfigMaps'?: Array<string>;
/**
* List of Secrets (by name) containing environment variables to be passed to Deployment as envFrom.secretRef. Ignored if Theia applications are started eagerly. Empty by default.
* @type {Array<string>}
* @memberof LaunchRequestEnv
*/
'fromSecrets'?: Array<string>;
}
/**
* Request to ping the availability of the service.

@@ -347,6 +322,6 @@ * @export

*
* @type {LaunchRequestEnv}
* @type {EnvironmentVars}
* @memberof SessionStartRequest
*/
'env'?: LaunchRequestEnv;
'env'?: EnvironmentVars;
}

@@ -504,3 +479,3 @@ /**

*/
serviceAppIdGet: async (appId: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
serviceAppIdGet: async (appId: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
// verify required parameter 'appId' is not null or undefined

@@ -543,3 +518,3 @@ assertParamExists('serviceAppIdGet', 'appId', appId)

*/
servicePost: async (launchRequest?: LaunchRequest, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
servicePost: async (launchRequest?: LaunchRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
const localVarPath = `/service`;

@@ -592,5 +567,7 @@ // use dummy base URL string because the URL constructor only accepts absolute URLs.

*/
async serviceAppIdGet(appId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<boolean>> {
async serviceAppIdGet(appId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<boolean>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.serviceAppIdGet(appId, options);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
const index = configuration?.serverIndex ?? 0;
const operationBasePath = operationServerMap['RootResourceApi.serviceAppIdGet']?.[index]?.url;
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath);
},

@@ -604,5 +581,7 @@ /**

*/
async servicePost(launchRequest?: LaunchRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<string>> {
async servicePost(launchRequest?: LaunchRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<string>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.servicePost(launchRequest, options);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
const index = configuration?.serverIndex ?? 0;
const operationBasePath = operationServerMap['RootResourceApi.servicePost']?.[index]?.url;
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath);
},

@@ -657,3 +636,3 @@ }

*/
public serviceAppIdGet(appId: string, options?: AxiosRequestConfig) {
public serviceAppIdGet(appId: string, options?: RawAxiosRequestConfig) {
return RootResourceApiFp(this.configuration).serviceAppIdGet(appId, options).then((request) => request(this.axios, this.basePath));

@@ -670,3 +649,3 @@ }

*/
public servicePost(launchRequest?: LaunchRequest, options?: AxiosRequestConfig) {
public servicePost(launchRequest?: LaunchRequest, options?: RawAxiosRequestConfig) {
return RootResourceApiFp(this.configuration).servicePost(launchRequest, options).then((request) => request(this.axios, this.basePath));

@@ -677,2 +656,3 @@ }

/**

@@ -692,3 +672,3 @@ * SessionResourceApi - axios parameter creator

*/
serviceSessionAppIdUserGet: async (appId: string, user: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
serviceSessionAppIdUserGet: async (appId: string, user: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
// verify required parameter 'appId' is not null or undefined

@@ -734,3 +714,3 @@ assertParamExists('serviceSessionAppIdUserGet', 'appId', appId)

*/
serviceSessionDelete: async (sessionStopRequest?: SessionStopRequest, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
serviceSessionDelete: async (sessionStopRequest?: SessionStopRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
const localVarPath = `/service/session`;

@@ -773,3 +753,3 @@ // use dummy base URL string because the URL constructor only accepts absolute URLs.

*/
serviceSessionPatch: async (sessionActivityRequest?: SessionActivityRequest, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
serviceSessionPatch: async (sessionActivityRequest?: SessionActivityRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
const localVarPath = `/service/session`;

@@ -813,3 +793,3 @@ // use dummy base URL string because the URL constructor only accepts absolute URLs.

*/
serviceSessionPerformanceAppIdSessionNameGet: async (appId: string, sessionName: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
serviceSessionPerformanceAppIdSessionNameGet: async (appId: string, sessionName: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
// verify required parameter 'appId' is not null or undefined

@@ -855,3 +835,3 @@ assertParamExists('serviceSessionPerformanceAppIdSessionNameGet', 'appId', appId)

*/
serviceSessionPost: async (sessionStartRequest?: SessionStartRequest, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
serviceSessionPost: async (sessionStartRequest?: SessionStartRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
const localVarPath = `/service/session`;

@@ -905,5 +885,7 @@ // use dummy base URL string because the URL constructor only accepts absolute URLs.

*/
async serviceSessionAppIdUserGet(appId: string, user: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<SessionSpec>>> {
async serviceSessionAppIdUserGet(appId: string, user: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<SessionSpec>>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.serviceSessionAppIdUserGet(appId, user, options);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
const index = configuration?.serverIndex ?? 0;
const operationBasePath = operationServerMap['SessionResourceApi.serviceSessionAppIdUserGet']?.[index]?.url;
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath);
},

@@ -917,5 +899,7 @@ /**

*/
async serviceSessionDelete(sessionStopRequest?: SessionStopRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<boolean>> {
async serviceSessionDelete(sessionStopRequest?: SessionStopRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<boolean>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.serviceSessionDelete(sessionStopRequest, options);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
const index = configuration?.serverIndex ?? 0;
const operationBasePath = operationServerMap['SessionResourceApi.serviceSessionDelete']?.[index]?.url;
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath);
},

@@ -929,5 +913,7 @@ /**

*/
async serviceSessionPatch(sessionActivityRequest?: SessionActivityRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<boolean>> {
async serviceSessionPatch(sessionActivityRequest?: SessionActivityRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<boolean>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.serviceSessionPatch(sessionActivityRequest, options);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
const index = configuration?.serverIndex ?? 0;
const operationBasePath = operationServerMap['SessionResourceApi.serviceSessionPatch']?.[index]?.url;
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath);
},

@@ -942,5 +928,7 @@ /**

*/
async serviceSessionPerformanceAppIdSessionNameGet(appId: string, sessionName: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<SessionPerformance>> {
async serviceSessionPerformanceAppIdSessionNameGet(appId: string, sessionName: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<SessionPerformance>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.serviceSessionPerformanceAppIdSessionNameGet(appId, sessionName, options);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
const index = configuration?.serverIndex ?? 0;
const operationBasePath = operationServerMap['SessionResourceApi.serviceSessionPerformanceAppIdSessionNameGet']?.[index]?.url;
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath);
},

@@ -954,5 +942,7 @@ /**

*/
async serviceSessionPost(sessionStartRequest?: SessionStartRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<string>> {
async serviceSessionPost(sessionStartRequest?: SessionStartRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<string>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.serviceSessionPost(sessionStartRequest, options);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
const index = configuration?.serverIndex ?? 0;
const operationBasePath = operationServerMap['SessionResourceApi.serviceSessionPost']?.[index]?.url;
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath);
},

@@ -1040,3 +1030,3 @@ }

*/
public serviceSessionAppIdUserGet(appId: string, user: string, options?: AxiosRequestConfig) {
public serviceSessionAppIdUserGet(appId: string, user: string, options?: RawAxiosRequestConfig) {
return SessionResourceApiFp(this.configuration).serviceSessionAppIdUserGet(appId, user, options).then((request) => request(this.axios, this.basePath));

@@ -1053,3 +1043,3 @@ }

*/
public serviceSessionDelete(sessionStopRequest?: SessionStopRequest, options?: AxiosRequestConfig) {
public serviceSessionDelete(sessionStopRequest?: SessionStopRequest, options?: RawAxiosRequestConfig) {
return SessionResourceApiFp(this.configuration).serviceSessionDelete(sessionStopRequest, options).then((request) => request(this.axios, this.basePath));

@@ -1066,3 +1056,3 @@ }

*/
public serviceSessionPatch(sessionActivityRequest?: SessionActivityRequest, options?: AxiosRequestConfig) {
public serviceSessionPatch(sessionActivityRequest?: SessionActivityRequest, options?: RawAxiosRequestConfig) {
return SessionResourceApiFp(this.configuration).serviceSessionPatch(sessionActivityRequest, options).then((request) => request(this.axios, this.basePath));

@@ -1080,3 +1070,3 @@ }

*/
public serviceSessionPerformanceAppIdSessionNameGet(appId: string, sessionName: string, options?: AxiosRequestConfig) {
public serviceSessionPerformanceAppIdSessionNameGet(appId: string, sessionName: string, options?: RawAxiosRequestConfig) {
return SessionResourceApiFp(this.configuration).serviceSessionPerformanceAppIdSessionNameGet(appId, sessionName, options).then((request) => request(this.axios, this.basePath));

@@ -1093,3 +1083,3 @@ }

*/
public serviceSessionPost(sessionStartRequest?: SessionStartRequest, options?: AxiosRequestConfig) {
public serviceSessionPost(sessionStartRequest?: SessionStartRequest, options?: RawAxiosRequestConfig) {
return SessionResourceApiFp(this.configuration).serviceSessionPost(sessionStartRequest, options).then((request) => request(this.axios, this.basePath));

@@ -1100,2 +1090,3 @@ }

/**

@@ -1115,3 +1106,3 @@ * WorkspaceResourceApi - axios parameter creator

*/
serviceWorkspaceAppIdUserGet: async (appId: string, user: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
serviceWorkspaceAppIdUserGet: async (appId: string, user: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
// verify required parameter 'appId' is not null or undefined

@@ -1157,3 +1148,3 @@ assertParamExists('serviceWorkspaceAppIdUserGet', 'appId', appId)

*/
serviceWorkspaceDelete: async (workspaceDeletionRequest?: WorkspaceDeletionRequest, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
serviceWorkspaceDelete: async (workspaceDeletionRequest?: WorkspaceDeletionRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
const localVarPath = `/service/workspace`;

@@ -1196,3 +1187,3 @@ // use dummy base URL string because the URL constructor only accepts absolute URLs.

*/
serviceWorkspacePost: async (workspaceCreationRequest?: WorkspaceCreationRequest, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
serviceWorkspacePost: async (workspaceCreationRequest?: WorkspaceCreationRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
const localVarPath = `/service/workspace`;

@@ -1246,5 +1237,7 @@ // use dummy base URL string because the URL constructor only accepts absolute URLs.

*/
async serviceWorkspaceAppIdUserGet(appId: string, user: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<UserWorkspace>>> {
async serviceWorkspaceAppIdUserGet(appId: string, user: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<UserWorkspace>>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.serviceWorkspaceAppIdUserGet(appId, user, options);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
const index = configuration?.serverIndex ?? 0;
const operationBasePath = operationServerMap['WorkspaceResourceApi.serviceWorkspaceAppIdUserGet']?.[index]?.url;
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath);
},

@@ -1258,5 +1251,7 @@ /**

*/
async serviceWorkspaceDelete(workspaceDeletionRequest?: WorkspaceDeletionRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<boolean>> {
async serviceWorkspaceDelete(workspaceDeletionRequest?: WorkspaceDeletionRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<boolean>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.serviceWorkspaceDelete(workspaceDeletionRequest, options);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
const index = configuration?.serverIndex ?? 0;
const operationBasePath = operationServerMap['WorkspaceResourceApi.serviceWorkspaceDelete']?.[index]?.url;
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath);
},

@@ -1270,5 +1265,7 @@ /**

*/
async serviceWorkspacePost(workspaceCreationRequest?: WorkspaceCreationRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<UserWorkspace>> {
async serviceWorkspacePost(workspaceCreationRequest?: WorkspaceCreationRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<UserWorkspace>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.serviceWorkspacePost(workspaceCreationRequest, options);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
const index = configuration?.serverIndex ?? 0;
const operationBasePath = operationServerMap['WorkspaceResourceApi.serviceWorkspacePost']?.[index]?.url;
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath);
},

@@ -1335,3 +1332,3 @@ }

*/
public serviceWorkspaceAppIdUserGet(appId: string, user: string, options?: AxiosRequestConfig) {
public serviceWorkspaceAppIdUserGet(appId: string, user: string, options?: RawAxiosRequestConfig) {
return WorkspaceResourceApiFp(this.configuration).serviceWorkspaceAppIdUserGet(appId, user, options).then((request) => request(this.axios, this.basePath));

@@ -1348,3 +1345,3 @@ }

*/
public serviceWorkspaceDelete(workspaceDeletionRequest?: WorkspaceDeletionRequest, options?: AxiosRequestConfig) {
public serviceWorkspaceDelete(workspaceDeletionRequest?: WorkspaceDeletionRequest, options?: RawAxiosRequestConfig) {
return WorkspaceResourceApiFp(this.configuration).serviceWorkspaceDelete(workspaceDeletionRequest, options).then((request) => request(this.axios, this.basePath));

@@ -1361,3 +1358,3 @@ }

*/
public serviceWorkspacePost(workspaceCreationRequest?: WorkspaceCreationRequest, options?: AxiosRequestConfig) {
public serviceWorkspacePost(workspaceCreationRequest?: WorkspaceCreationRequest, options?: RawAxiosRequestConfig) {
return WorkspaceResourceApiFp(this.configuration).serviceWorkspacePost(workspaceCreationRequest, options).then((request) => request(this.axios, this.basePath));

@@ -1368,1 +1365,2 @@ }

@@ -7,3 +7,3 @@ /* tslint:disable */

*
* The version of the OpenAPI document: 0.8.0
* The version of the OpenAPI document: 0.9.0
*

@@ -20,3 +20,3 @@ *

// @ts-ignore
import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
import globalAxios from 'axios';

@@ -44,3 +44,3 @@

url: string;
options: AxiosRequestConfig;
options: RawAxiosRequestConfig;
}

@@ -59,3 +59,3 @@

this.configuration = configuration;
this.basePath = configuration.basePath || this.basePath;
this.basePath = configuration.basePath ?? basePath;
}

@@ -77,1 +77,15 @@ }

}
interface ServerMap {
[key: string]: {
url: string,
description: string,
}[];
}
/**
*
* @export
*/
export const operationServerMap: ServerMap = {
}

@@ -7,3 +7,3 @@ /* tslint:disable */

*
* The version of the OpenAPI document: 0.8.0
* The version of the OpenAPI document: 0.9.0
*

@@ -148,5 +148,5 @@ *

return <T = unknown, R = AxiosResponse<T>>(axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
const axiosRequestArgs = {...axiosArgs.options, url: (configuration?.basePath || basePath) + axiosArgs.url};
const axiosRequestArgs = {...axiosArgs.options, url: (axios.defaults.baseURL ? '' : configuration?.basePath ?? basePath) + axiosArgs.url};
return axios.request<T, R>(axiosRequestArgs);
};
}

@@ -7,3 +7,3 @@ /* tslint:disable */

*
* The version of the OpenAPI document: 0.8.0
* The version of the OpenAPI document: 0.9.0
*

@@ -23,2 +23,3 @@ *

basePath?: string;
serverIndex?: number;
baseOptions?: any;

@@ -64,2 +65,9 @@ formDataCtor?: new () => any;

/**
* override server index
*
* @type {number}
* @memberof Configuration
*/
serverIndex?: number;
/**
* base options for axios calls

@@ -86,2 +94,3 @@ *

this.basePath = param.basePath;
this.serverIndex = param.serverIndex;
this.baseOptions = param.baseOptions;

@@ -88,0 +97,0 @@ this.formDataCtor = param.formDataCtor;

@@ -7,3 +7,3 @@ /* tslint:disable */

*
* The version of the OpenAPI document: 0.8.0
* The version of the OpenAPI document: 0.9.0
*

@@ -10,0 +10,0 @@ *

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc