@cirrobio/api-client 0.10.6 → 0.11.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/apis/ExecutionApi.d.ts +15 -1
- package/dist/apis/ExecutionApi.js +40 -0
- package/dist/apis/WorkspacesApi.d.ts +145 -0
- package/dist/apis/WorkspacesApi.js +398 -0
- package/dist/apis/index.d.ts +1 -0
- package/dist/apis/index.js +1 -0
- package/dist/esm/apis/ExecutionApi.d.ts +15 -1
- package/dist/esm/apis/ExecutionApi.js +41 -1
- package/dist/esm/apis/WorkspacesApi.d.ts +145 -0
- package/dist/esm/apis/WorkspacesApi.js +394 -0
- package/dist/esm/apis/index.d.ts +1 -0
- package/dist/esm/apis/index.js +1 -0
- package/dist/esm/models/CostResponse.d.ts +51 -0
- package/dist/esm/models/CostResponse.js +51 -0
- package/dist/esm/models/Dashboard.d.ts +2 -2
- package/dist/esm/models/Dashboard.js +3 -4
- package/dist/esm/models/DashboardRequest.d.ts +2 -2
- package/dist/esm/models/DashboardRequest.js +3 -4
- package/dist/esm/models/FeatureFlags.d.ts +6 -0
- package/dist/esm/models/FeatureFlags.js +3 -0
- package/dist/esm/models/GroupCost.d.ts +37 -0
- package/dist/esm/models/GroupCost.js +45 -0
- package/dist/esm/models/MountedDataset.d.ts +37 -0
- package/dist/esm/models/MountedDataset.js +46 -0
- package/dist/esm/models/ShareDetail.d.ts +0 -6
- package/dist/esm/models/ShareDetail.js +0 -3
- package/dist/esm/models/SharingType.d.ts +23 -0
- package/dist/esm/models/SharingType.js +32 -0
- package/dist/esm/models/TaskCost.d.ts +49 -0
- package/dist/esm/models/TaskCost.js +52 -0
- package/dist/esm/models/Workspace.d.ts +108 -0
- package/dist/esm/models/Workspace.js +84 -0
- package/dist/esm/models/WorkspaceComputeConfig.d.ts +63 -0
- package/dist/esm/models/WorkspaceComputeConfig.js +54 -0
- package/dist/esm/models/WorkspaceConnectionResponse.d.ts +43 -0
- package/dist/esm/models/WorkspaceConnectionResponse.js +49 -0
- package/dist/esm/models/WorkspaceInput.d.ts +58 -0
- package/dist/esm/models/WorkspaceInput.js +58 -0
- package/dist/esm/models/WorkspaceSession.d.ts +43 -0
- package/dist/esm/models/WorkspaceSession.js +49 -0
- package/dist/esm/models/index.d.ts +10 -0
- package/dist/esm/models/index.js +10 -0
- package/dist/models/CostResponse.d.ts +51 -0
- package/dist/models/CostResponse.js +58 -0
- package/dist/models/Dashboard.d.ts +2 -2
- package/dist/models/Dashboard.js +3 -4
- package/dist/models/DashboardRequest.d.ts +2 -2
- package/dist/models/DashboardRequest.js +3 -4
- package/dist/models/FeatureFlags.d.ts +6 -0
- package/dist/models/FeatureFlags.js +3 -0
- package/dist/models/GroupCost.d.ts +37 -0
- package/dist/models/GroupCost.js +52 -0
- package/dist/models/MountedDataset.d.ts +37 -0
- package/dist/models/MountedDataset.js +53 -0
- package/dist/models/ShareDetail.d.ts +0 -6
- package/dist/models/ShareDetail.js +0 -3
- package/dist/models/SharingType.d.ts +23 -0
- package/dist/models/SharingType.js +38 -0
- package/dist/models/TaskCost.d.ts +49 -0
- package/dist/models/TaskCost.js +59 -0
- package/dist/models/Workspace.d.ts +108 -0
- package/dist/models/Workspace.js +91 -0
- package/dist/models/WorkspaceComputeConfig.d.ts +63 -0
- package/dist/models/WorkspaceComputeConfig.js +61 -0
- package/dist/models/WorkspaceConnectionResponse.d.ts +43 -0
- package/dist/models/WorkspaceConnectionResponse.js +56 -0
- package/dist/models/WorkspaceInput.d.ts +58 -0
- package/dist/models/WorkspaceInput.js +65 -0
- package/dist/models/WorkspaceSession.d.ts +43 -0
- package/dist/models/WorkspaceSession.js +56 -0
- package/dist/models/index.d.ts +10 -0
- package/dist/models/index.js +10 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -10,7 +10,11 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import type { CreateResponse, GetExecutionLogsResponse, RunAnalysisRequest, StopExecutionResponse, Task } from '../models/index';
|
|
13
|
+
import type { CostResponse, CreateResponse, GetExecutionLogsResponse, RunAnalysisRequest, StopExecutionResponse, Task } from '../models/index';
|
|
14
|
+
export interface CalculateCostRequest {
|
|
15
|
+
projectId: string;
|
|
16
|
+
datasetId: string;
|
|
17
|
+
}
|
|
14
18
|
export interface GetExecutionLogsRequest {
|
|
15
19
|
datasetId: string;
|
|
16
20
|
projectId: string;
|
|
@@ -43,6 +47,16 @@ export interface StopAnalysisRequest {
|
|
|
43
47
|
*
|
|
44
48
|
*/
|
|
45
49
|
export declare class ExecutionApi extends runtime.BaseAPI {
|
|
50
|
+
/**
|
|
51
|
+
* Calculate cost of an execution run
|
|
52
|
+
* Calculate cost
|
|
53
|
+
*/
|
|
54
|
+
calculateCostRaw(requestParameters: CalculateCostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CostResponse>>;
|
|
55
|
+
/**
|
|
56
|
+
* Calculate cost of an execution run
|
|
57
|
+
* Calculate cost
|
|
58
|
+
*/
|
|
59
|
+
calculateCost(requestParameters: CalculateCostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CostResponse>;
|
|
46
60
|
/**
|
|
47
61
|
* Gets live logs from main execution task
|
|
48
62
|
* Get execution logs
|
|
@@ -29,6 +29,46 @@ const index_1 = require("../models/index");
|
|
|
29
29
|
*
|
|
30
30
|
*/
|
|
31
31
|
class ExecutionApi extends runtime.BaseAPI {
|
|
32
|
+
/**
|
|
33
|
+
* Calculate cost of an execution run
|
|
34
|
+
* Calculate cost
|
|
35
|
+
*/
|
|
36
|
+
calculateCostRaw(requestParameters, initOverrides) {
|
|
37
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
38
|
+
if (requestParameters.projectId === null || requestParameters.projectId === undefined) {
|
|
39
|
+
throw new runtime.RequiredError('projectId', 'Required parameter requestParameters.projectId was null or undefined when calling calculateCost.');
|
|
40
|
+
}
|
|
41
|
+
if (requestParameters.datasetId === null || requestParameters.datasetId === undefined) {
|
|
42
|
+
throw new runtime.RequiredError('datasetId', 'Required parameter requestParameters.datasetId was null or undefined when calling calculateCost.');
|
|
43
|
+
}
|
|
44
|
+
const queryParameters = {};
|
|
45
|
+
const headerParameters = {};
|
|
46
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
47
|
+
const token = this.configuration.accessToken;
|
|
48
|
+
const tokenString = yield token("accessToken", []);
|
|
49
|
+
if (tokenString) {
|
|
50
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
const response = yield this.request({
|
|
54
|
+
path: `/projects/{projectId}/execution/{datasetId}/cost`.replace(`{${"projectId"}}`, encodeURIComponent(String(requestParameters.projectId))).replace(`{${"datasetId"}}`, encodeURIComponent(String(requestParameters.datasetId))),
|
|
55
|
+
method: 'GET',
|
|
56
|
+
headers: headerParameters,
|
|
57
|
+
query: queryParameters,
|
|
58
|
+
}, initOverrides);
|
|
59
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.CostResponseFromJSON)(jsonValue));
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Calculate cost of an execution run
|
|
64
|
+
* Calculate cost
|
|
65
|
+
*/
|
|
66
|
+
calculateCost(requestParameters, initOverrides) {
|
|
67
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
68
|
+
const response = yield this.calculateCostRaw(requestParameters, initOverrides);
|
|
69
|
+
return yield response.value();
|
|
70
|
+
});
|
|
71
|
+
}
|
|
32
72
|
/**
|
|
33
73
|
* Gets live logs from main execution task
|
|
34
74
|
* Get execution logs
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Cirro Data
|
|
3
|
+
* Cirro Data Platform service API
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: latest
|
|
6
|
+
* Contact: support@cirro.bio
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import * as runtime from '../runtime';
|
|
13
|
+
import type { CreateResponse, Workspace, WorkspaceConnectionResponse, WorkspaceInput } from '../models/index';
|
|
14
|
+
export interface ConnectWorkspaceRequest {
|
|
15
|
+
projectId: string;
|
|
16
|
+
workspaceId: string;
|
|
17
|
+
}
|
|
18
|
+
export interface CreateWorkspaceRequest {
|
|
19
|
+
projectId: string;
|
|
20
|
+
workspaceInput: WorkspaceInput;
|
|
21
|
+
}
|
|
22
|
+
export interface DeleteWorkspaceRequest {
|
|
23
|
+
projectId: string;
|
|
24
|
+
workspaceId: string;
|
|
25
|
+
}
|
|
26
|
+
export interface DisconnectWorkspaceRequest {
|
|
27
|
+
projectId: string;
|
|
28
|
+
workspaceId: string;
|
|
29
|
+
sessionId: string;
|
|
30
|
+
}
|
|
31
|
+
export interface GetWorkspaceRequest {
|
|
32
|
+
projectId: string;
|
|
33
|
+
workspaceId: string;
|
|
34
|
+
}
|
|
35
|
+
export interface GetWorkspacesRequest {
|
|
36
|
+
projectId: string;
|
|
37
|
+
}
|
|
38
|
+
export interface StartWorkspaceRequest {
|
|
39
|
+
projectId: string;
|
|
40
|
+
workspaceId: string;
|
|
41
|
+
}
|
|
42
|
+
export interface StopWorkspaceRequest {
|
|
43
|
+
projectId: string;
|
|
44
|
+
workspaceId: string;
|
|
45
|
+
}
|
|
46
|
+
export interface UpdateWorkspaceRequest {
|
|
47
|
+
projectId: string;
|
|
48
|
+
workspaceId: string;
|
|
49
|
+
workspaceInput: WorkspaceInput;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
*
|
|
53
|
+
*/
|
|
54
|
+
export declare class WorkspacesApi extends runtime.BaseAPI {
|
|
55
|
+
/**
|
|
56
|
+
* Generates a URL to connect to the given workspace
|
|
57
|
+
* Connect to workspace
|
|
58
|
+
*/
|
|
59
|
+
connectWorkspaceRaw(requestParameters: ConnectWorkspaceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<WorkspaceConnectionResponse>>;
|
|
60
|
+
/**
|
|
61
|
+
* Generates a URL to connect to the given workspace
|
|
62
|
+
* Connect to workspace
|
|
63
|
+
*/
|
|
64
|
+
connectWorkspace(requestParameters: ConnectWorkspaceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<WorkspaceConnectionResponse>;
|
|
65
|
+
/**
|
|
66
|
+
* Creates a workspace within a project
|
|
67
|
+
* Create workspace
|
|
68
|
+
*/
|
|
69
|
+
createWorkspaceRaw(requestParameters: CreateWorkspaceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CreateResponse>>;
|
|
70
|
+
/**
|
|
71
|
+
* Creates a workspace within a project
|
|
72
|
+
* Create workspace
|
|
73
|
+
*/
|
|
74
|
+
createWorkspace(requestParameters: CreateWorkspaceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CreateResponse>;
|
|
75
|
+
/**
|
|
76
|
+
* Deletes a workspace within a project
|
|
77
|
+
* Delete workspace
|
|
78
|
+
*/
|
|
79
|
+
deleteWorkspaceRaw(requestParameters: DeleteWorkspaceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
80
|
+
/**
|
|
81
|
+
* Deletes a workspace within a project
|
|
82
|
+
* Delete workspace
|
|
83
|
+
*/
|
|
84
|
+
deleteWorkspace(requestParameters: DeleteWorkspaceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
85
|
+
/**
|
|
86
|
+
* Closes the connection to the given workspace
|
|
87
|
+
* Disconnect from workspace
|
|
88
|
+
*/
|
|
89
|
+
disconnectWorkspaceRaw(requestParameters: DisconnectWorkspaceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
90
|
+
/**
|
|
91
|
+
* Closes the connection to the given workspace
|
|
92
|
+
* Disconnect from workspace
|
|
93
|
+
*/
|
|
94
|
+
disconnectWorkspace(requestParameters: DisconnectWorkspaceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
95
|
+
/**
|
|
96
|
+
* Get details of a particular workspace
|
|
97
|
+
* Get workspace
|
|
98
|
+
*/
|
|
99
|
+
getWorkspaceRaw(requestParameters: GetWorkspaceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Workspace>>;
|
|
100
|
+
/**
|
|
101
|
+
* Get details of a particular workspace
|
|
102
|
+
* Get workspace
|
|
103
|
+
*/
|
|
104
|
+
getWorkspace(requestParameters: GetWorkspaceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Workspace>;
|
|
105
|
+
/**
|
|
106
|
+
* Retrieves a list of workspaces that the user has access to
|
|
107
|
+
* Get workspaces
|
|
108
|
+
*/
|
|
109
|
+
getWorkspacesRaw(requestParameters: GetWorkspacesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<Workspace>>>;
|
|
110
|
+
/**
|
|
111
|
+
* Retrieves a list of workspaces that the user has access to
|
|
112
|
+
* Get workspaces
|
|
113
|
+
*/
|
|
114
|
+
getWorkspaces(requestParameters: GetWorkspacesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<Workspace>>;
|
|
115
|
+
/**
|
|
116
|
+
* Starts a workspace instance
|
|
117
|
+
* Start workspace
|
|
118
|
+
*/
|
|
119
|
+
startWorkspaceRaw(requestParameters: StartWorkspaceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
120
|
+
/**
|
|
121
|
+
* Starts a workspace instance
|
|
122
|
+
* Start workspace
|
|
123
|
+
*/
|
|
124
|
+
startWorkspace(requestParameters: StartWorkspaceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
125
|
+
/**
|
|
126
|
+
* Shuts down a running workspace instance
|
|
127
|
+
* Stop workspace
|
|
128
|
+
*/
|
|
129
|
+
stopWorkspaceRaw(requestParameters: StopWorkspaceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
130
|
+
/**
|
|
131
|
+
* Shuts down a running workspace instance
|
|
132
|
+
* Stop workspace
|
|
133
|
+
*/
|
|
134
|
+
stopWorkspace(requestParameters: StopWorkspaceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
135
|
+
/**
|
|
136
|
+
* Updates a workspace within a project
|
|
137
|
+
* Update workspace
|
|
138
|
+
*/
|
|
139
|
+
updateWorkspaceRaw(requestParameters: UpdateWorkspaceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
140
|
+
/**
|
|
141
|
+
* Updates a workspace within a project
|
|
142
|
+
* Update workspace
|
|
143
|
+
*/
|
|
144
|
+
updateWorkspace(requestParameters: UpdateWorkspaceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
145
|
+
}
|
|
@@ -0,0 +1,398 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Cirro Data
|
|
6
|
+
* Cirro Data Platform service API
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: latest
|
|
9
|
+
* Contact: support@cirro.bio
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
16
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
17
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
18
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
19
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
20
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
21
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
22
|
+
});
|
|
23
|
+
};
|
|
24
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
+
exports.WorkspacesApi = void 0;
|
|
26
|
+
const runtime = require("../runtime");
|
|
27
|
+
const index_1 = require("../models/index");
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
*/
|
|
31
|
+
class WorkspacesApi extends runtime.BaseAPI {
|
|
32
|
+
/**
|
|
33
|
+
* Generates a URL to connect to the given workspace
|
|
34
|
+
* Connect to workspace
|
|
35
|
+
*/
|
|
36
|
+
connectWorkspaceRaw(requestParameters, initOverrides) {
|
|
37
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
38
|
+
if (requestParameters.projectId === null || requestParameters.projectId === undefined) {
|
|
39
|
+
throw new runtime.RequiredError('projectId', 'Required parameter requestParameters.projectId was null or undefined when calling connectWorkspace.');
|
|
40
|
+
}
|
|
41
|
+
if (requestParameters.workspaceId === null || requestParameters.workspaceId === undefined) {
|
|
42
|
+
throw new runtime.RequiredError('workspaceId', 'Required parameter requestParameters.workspaceId was null or undefined when calling connectWorkspace.');
|
|
43
|
+
}
|
|
44
|
+
const queryParameters = {};
|
|
45
|
+
const headerParameters = {};
|
|
46
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
47
|
+
const token = this.configuration.accessToken;
|
|
48
|
+
const tokenString = yield token("accessToken", []);
|
|
49
|
+
if (tokenString) {
|
|
50
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
const response = yield this.request({
|
|
54
|
+
path: `/projects/{projectId}/workspaces/{workspaceId}:connect`.replace(`{${"projectId"}}`, encodeURIComponent(String(requestParameters.projectId))).replace(`{${"workspaceId"}}`, encodeURIComponent(String(requestParameters.workspaceId))),
|
|
55
|
+
method: 'POST',
|
|
56
|
+
headers: headerParameters,
|
|
57
|
+
query: queryParameters,
|
|
58
|
+
}, initOverrides);
|
|
59
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.WorkspaceConnectionResponseFromJSON)(jsonValue));
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Generates a URL to connect to the given workspace
|
|
64
|
+
* Connect to workspace
|
|
65
|
+
*/
|
|
66
|
+
connectWorkspace(requestParameters, initOverrides) {
|
|
67
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
68
|
+
const response = yield this.connectWorkspaceRaw(requestParameters, initOverrides);
|
|
69
|
+
return yield response.value();
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Creates a workspace within a project
|
|
74
|
+
* Create workspace
|
|
75
|
+
*/
|
|
76
|
+
createWorkspaceRaw(requestParameters, initOverrides) {
|
|
77
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
78
|
+
if (requestParameters.projectId === null || requestParameters.projectId === undefined) {
|
|
79
|
+
throw new runtime.RequiredError('projectId', 'Required parameter requestParameters.projectId was null or undefined when calling createWorkspace.');
|
|
80
|
+
}
|
|
81
|
+
if (requestParameters.workspaceInput === null || requestParameters.workspaceInput === undefined) {
|
|
82
|
+
throw new runtime.RequiredError('workspaceInput', 'Required parameter requestParameters.workspaceInput was null or undefined when calling createWorkspace.');
|
|
83
|
+
}
|
|
84
|
+
const queryParameters = {};
|
|
85
|
+
const headerParameters = {};
|
|
86
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
87
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
88
|
+
const token = this.configuration.accessToken;
|
|
89
|
+
const tokenString = yield token("accessToken", []);
|
|
90
|
+
if (tokenString) {
|
|
91
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
const response = yield this.request({
|
|
95
|
+
path: `/projects/{projectId}/workspaces`.replace(`{${"projectId"}}`, encodeURIComponent(String(requestParameters.projectId))),
|
|
96
|
+
method: 'POST',
|
|
97
|
+
headers: headerParameters,
|
|
98
|
+
query: queryParameters,
|
|
99
|
+
body: (0, index_1.WorkspaceInputToJSON)(requestParameters.workspaceInput),
|
|
100
|
+
}, initOverrides);
|
|
101
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.CreateResponseFromJSON)(jsonValue));
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Creates a workspace within a project
|
|
106
|
+
* Create workspace
|
|
107
|
+
*/
|
|
108
|
+
createWorkspace(requestParameters, initOverrides) {
|
|
109
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
110
|
+
const response = yield this.createWorkspaceRaw(requestParameters, initOverrides);
|
|
111
|
+
return yield response.value();
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Deletes a workspace within a project
|
|
116
|
+
* Delete workspace
|
|
117
|
+
*/
|
|
118
|
+
deleteWorkspaceRaw(requestParameters, initOverrides) {
|
|
119
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
120
|
+
if (requestParameters.projectId === null || requestParameters.projectId === undefined) {
|
|
121
|
+
throw new runtime.RequiredError('projectId', 'Required parameter requestParameters.projectId was null or undefined when calling deleteWorkspace.');
|
|
122
|
+
}
|
|
123
|
+
if (requestParameters.workspaceId === null || requestParameters.workspaceId === undefined) {
|
|
124
|
+
throw new runtime.RequiredError('workspaceId', 'Required parameter requestParameters.workspaceId was null or undefined when calling deleteWorkspace.');
|
|
125
|
+
}
|
|
126
|
+
const queryParameters = {};
|
|
127
|
+
const headerParameters = {};
|
|
128
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
129
|
+
const token = this.configuration.accessToken;
|
|
130
|
+
const tokenString = yield token("accessToken", []);
|
|
131
|
+
if (tokenString) {
|
|
132
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
const response = yield this.request({
|
|
136
|
+
path: `/projects/{projectId}/workspaces/{workspaceId}`.replace(`{${"projectId"}}`, encodeURIComponent(String(requestParameters.projectId))).replace(`{${"workspaceId"}}`, encodeURIComponent(String(requestParameters.workspaceId))),
|
|
137
|
+
method: 'DELETE',
|
|
138
|
+
headers: headerParameters,
|
|
139
|
+
query: queryParameters,
|
|
140
|
+
}, initOverrides);
|
|
141
|
+
return new runtime.VoidApiResponse(response);
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* Deletes a workspace within a project
|
|
146
|
+
* Delete workspace
|
|
147
|
+
*/
|
|
148
|
+
deleteWorkspace(requestParameters, initOverrides) {
|
|
149
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
150
|
+
yield this.deleteWorkspaceRaw(requestParameters, initOverrides);
|
|
151
|
+
});
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* Closes the connection to the given workspace
|
|
155
|
+
* Disconnect from workspace
|
|
156
|
+
*/
|
|
157
|
+
disconnectWorkspaceRaw(requestParameters, initOverrides) {
|
|
158
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
159
|
+
if (requestParameters.projectId === null || requestParameters.projectId === undefined) {
|
|
160
|
+
throw new runtime.RequiredError('projectId', 'Required parameter requestParameters.projectId was null or undefined when calling disconnectWorkspace.');
|
|
161
|
+
}
|
|
162
|
+
if (requestParameters.workspaceId === null || requestParameters.workspaceId === undefined) {
|
|
163
|
+
throw new runtime.RequiredError('workspaceId', 'Required parameter requestParameters.workspaceId was null or undefined when calling disconnectWorkspace.');
|
|
164
|
+
}
|
|
165
|
+
if (requestParameters.sessionId === null || requestParameters.sessionId === undefined) {
|
|
166
|
+
throw new runtime.RequiredError('sessionId', 'Required parameter requestParameters.sessionId was null or undefined when calling disconnectWorkspace.');
|
|
167
|
+
}
|
|
168
|
+
const queryParameters = {};
|
|
169
|
+
if (requestParameters.sessionId !== undefined) {
|
|
170
|
+
queryParameters['sessionId'] = requestParameters.sessionId;
|
|
171
|
+
}
|
|
172
|
+
const headerParameters = {};
|
|
173
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
174
|
+
const token = this.configuration.accessToken;
|
|
175
|
+
const tokenString = yield token("accessToken", []);
|
|
176
|
+
if (tokenString) {
|
|
177
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
const response = yield this.request({
|
|
181
|
+
path: `/projects/{projectId}/workspaces/{workspaceId}:disconnect`.replace(`{${"projectId"}}`, encodeURIComponent(String(requestParameters.projectId))).replace(`{${"workspaceId"}}`, encodeURIComponent(String(requestParameters.workspaceId))),
|
|
182
|
+
method: 'DELETE',
|
|
183
|
+
headers: headerParameters,
|
|
184
|
+
query: queryParameters,
|
|
185
|
+
}, initOverrides);
|
|
186
|
+
return new runtime.VoidApiResponse(response);
|
|
187
|
+
});
|
|
188
|
+
}
|
|
189
|
+
/**
|
|
190
|
+
* Closes the connection to the given workspace
|
|
191
|
+
* Disconnect from workspace
|
|
192
|
+
*/
|
|
193
|
+
disconnectWorkspace(requestParameters, initOverrides) {
|
|
194
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
195
|
+
yield this.disconnectWorkspaceRaw(requestParameters, initOverrides);
|
|
196
|
+
});
|
|
197
|
+
}
|
|
198
|
+
/**
|
|
199
|
+
* Get details of a particular workspace
|
|
200
|
+
* Get workspace
|
|
201
|
+
*/
|
|
202
|
+
getWorkspaceRaw(requestParameters, initOverrides) {
|
|
203
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
204
|
+
if (requestParameters.projectId === null || requestParameters.projectId === undefined) {
|
|
205
|
+
throw new runtime.RequiredError('projectId', 'Required parameter requestParameters.projectId was null or undefined when calling getWorkspace.');
|
|
206
|
+
}
|
|
207
|
+
if (requestParameters.workspaceId === null || requestParameters.workspaceId === undefined) {
|
|
208
|
+
throw new runtime.RequiredError('workspaceId', 'Required parameter requestParameters.workspaceId was null or undefined when calling getWorkspace.');
|
|
209
|
+
}
|
|
210
|
+
const queryParameters = {};
|
|
211
|
+
const headerParameters = {};
|
|
212
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
213
|
+
const token = this.configuration.accessToken;
|
|
214
|
+
const tokenString = yield token("accessToken", []);
|
|
215
|
+
if (tokenString) {
|
|
216
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
const response = yield this.request({
|
|
220
|
+
path: `/projects/{projectId}/workspaces/{workspaceId}`.replace(`{${"projectId"}}`, encodeURIComponent(String(requestParameters.projectId))).replace(`{${"workspaceId"}}`, encodeURIComponent(String(requestParameters.workspaceId))),
|
|
221
|
+
method: 'GET',
|
|
222
|
+
headers: headerParameters,
|
|
223
|
+
query: queryParameters,
|
|
224
|
+
}, initOverrides);
|
|
225
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.WorkspaceFromJSON)(jsonValue));
|
|
226
|
+
});
|
|
227
|
+
}
|
|
228
|
+
/**
|
|
229
|
+
* Get details of a particular workspace
|
|
230
|
+
* Get workspace
|
|
231
|
+
*/
|
|
232
|
+
getWorkspace(requestParameters, initOverrides) {
|
|
233
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
234
|
+
const response = yield this.getWorkspaceRaw(requestParameters, initOverrides);
|
|
235
|
+
return yield response.value();
|
|
236
|
+
});
|
|
237
|
+
}
|
|
238
|
+
/**
|
|
239
|
+
* Retrieves a list of workspaces that the user has access to
|
|
240
|
+
* Get workspaces
|
|
241
|
+
*/
|
|
242
|
+
getWorkspacesRaw(requestParameters, initOverrides) {
|
|
243
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
244
|
+
if (requestParameters.projectId === null || requestParameters.projectId === undefined) {
|
|
245
|
+
throw new runtime.RequiredError('projectId', 'Required parameter requestParameters.projectId was null or undefined when calling getWorkspaces.');
|
|
246
|
+
}
|
|
247
|
+
const queryParameters = {};
|
|
248
|
+
const headerParameters = {};
|
|
249
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
250
|
+
const token = this.configuration.accessToken;
|
|
251
|
+
const tokenString = yield token("accessToken", []);
|
|
252
|
+
if (tokenString) {
|
|
253
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
const response = yield this.request({
|
|
257
|
+
path: `/projects/{projectId}/workspaces`.replace(`{${"projectId"}}`, encodeURIComponent(String(requestParameters.projectId))),
|
|
258
|
+
method: 'GET',
|
|
259
|
+
headers: headerParameters,
|
|
260
|
+
query: queryParameters,
|
|
261
|
+
}, initOverrides);
|
|
262
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(index_1.WorkspaceFromJSON));
|
|
263
|
+
});
|
|
264
|
+
}
|
|
265
|
+
/**
|
|
266
|
+
* Retrieves a list of workspaces that the user has access to
|
|
267
|
+
* Get workspaces
|
|
268
|
+
*/
|
|
269
|
+
getWorkspaces(requestParameters, initOverrides) {
|
|
270
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
271
|
+
const response = yield this.getWorkspacesRaw(requestParameters, initOverrides);
|
|
272
|
+
return yield response.value();
|
|
273
|
+
});
|
|
274
|
+
}
|
|
275
|
+
/**
|
|
276
|
+
* Starts a workspace instance
|
|
277
|
+
* Start workspace
|
|
278
|
+
*/
|
|
279
|
+
startWorkspaceRaw(requestParameters, initOverrides) {
|
|
280
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
281
|
+
if (requestParameters.projectId === null || requestParameters.projectId === undefined) {
|
|
282
|
+
throw new runtime.RequiredError('projectId', 'Required parameter requestParameters.projectId was null or undefined when calling startWorkspace.');
|
|
283
|
+
}
|
|
284
|
+
if (requestParameters.workspaceId === null || requestParameters.workspaceId === undefined) {
|
|
285
|
+
throw new runtime.RequiredError('workspaceId', 'Required parameter requestParameters.workspaceId was null or undefined when calling startWorkspace.');
|
|
286
|
+
}
|
|
287
|
+
const queryParameters = {};
|
|
288
|
+
const headerParameters = {};
|
|
289
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
290
|
+
const token = this.configuration.accessToken;
|
|
291
|
+
const tokenString = yield token("accessToken", []);
|
|
292
|
+
if (tokenString) {
|
|
293
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
const response = yield this.request({
|
|
297
|
+
path: `/projects/{projectId}/workspaces/{workspaceId}:start`.replace(`{${"projectId"}}`, encodeURIComponent(String(requestParameters.projectId))).replace(`{${"workspaceId"}}`, encodeURIComponent(String(requestParameters.workspaceId))),
|
|
298
|
+
method: 'POST',
|
|
299
|
+
headers: headerParameters,
|
|
300
|
+
query: queryParameters,
|
|
301
|
+
}, initOverrides);
|
|
302
|
+
return new runtime.VoidApiResponse(response);
|
|
303
|
+
});
|
|
304
|
+
}
|
|
305
|
+
/**
|
|
306
|
+
* Starts a workspace instance
|
|
307
|
+
* Start workspace
|
|
308
|
+
*/
|
|
309
|
+
startWorkspace(requestParameters, initOverrides) {
|
|
310
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
311
|
+
yield this.startWorkspaceRaw(requestParameters, initOverrides);
|
|
312
|
+
});
|
|
313
|
+
}
|
|
314
|
+
/**
|
|
315
|
+
* Shuts down a running workspace instance
|
|
316
|
+
* Stop workspace
|
|
317
|
+
*/
|
|
318
|
+
stopWorkspaceRaw(requestParameters, initOverrides) {
|
|
319
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
320
|
+
if (requestParameters.projectId === null || requestParameters.projectId === undefined) {
|
|
321
|
+
throw new runtime.RequiredError('projectId', 'Required parameter requestParameters.projectId was null or undefined when calling stopWorkspace.');
|
|
322
|
+
}
|
|
323
|
+
if (requestParameters.workspaceId === null || requestParameters.workspaceId === undefined) {
|
|
324
|
+
throw new runtime.RequiredError('workspaceId', 'Required parameter requestParameters.workspaceId was null or undefined when calling stopWorkspace.');
|
|
325
|
+
}
|
|
326
|
+
const queryParameters = {};
|
|
327
|
+
const headerParameters = {};
|
|
328
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
329
|
+
const token = this.configuration.accessToken;
|
|
330
|
+
const tokenString = yield token("accessToken", []);
|
|
331
|
+
if (tokenString) {
|
|
332
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
const response = yield this.request({
|
|
336
|
+
path: `/projects/{projectId}/workspaces/{workspaceId}:stop`.replace(`{${"projectId"}}`, encodeURIComponent(String(requestParameters.projectId))).replace(`{${"workspaceId"}}`, encodeURIComponent(String(requestParameters.workspaceId))),
|
|
337
|
+
method: 'POST',
|
|
338
|
+
headers: headerParameters,
|
|
339
|
+
query: queryParameters,
|
|
340
|
+
}, initOverrides);
|
|
341
|
+
return new runtime.VoidApiResponse(response);
|
|
342
|
+
});
|
|
343
|
+
}
|
|
344
|
+
/**
|
|
345
|
+
* Shuts down a running workspace instance
|
|
346
|
+
* Stop workspace
|
|
347
|
+
*/
|
|
348
|
+
stopWorkspace(requestParameters, initOverrides) {
|
|
349
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
350
|
+
yield this.stopWorkspaceRaw(requestParameters, initOverrides);
|
|
351
|
+
});
|
|
352
|
+
}
|
|
353
|
+
/**
|
|
354
|
+
* Updates a workspace within a project
|
|
355
|
+
* Update workspace
|
|
356
|
+
*/
|
|
357
|
+
updateWorkspaceRaw(requestParameters, initOverrides) {
|
|
358
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
359
|
+
if (requestParameters.projectId === null || requestParameters.projectId === undefined) {
|
|
360
|
+
throw new runtime.RequiredError('projectId', 'Required parameter requestParameters.projectId was null or undefined when calling updateWorkspace.');
|
|
361
|
+
}
|
|
362
|
+
if (requestParameters.workspaceId === null || requestParameters.workspaceId === undefined) {
|
|
363
|
+
throw new runtime.RequiredError('workspaceId', 'Required parameter requestParameters.workspaceId was null or undefined when calling updateWorkspace.');
|
|
364
|
+
}
|
|
365
|
+
if (requestParameters.workspaceInput === null || requestParameters.workspaceInput === undefined) {
|
|
366
|
+
throw new runtime.RequiredError('workspaceInput', 'Required parameter requestParameters.workspaceInput was null or undefined when calling updateWorkspace.');
|
|
367
|
+
}
|
|
368
|
+
const queryParameters = {};
|
|
369
|
+
const headerParameters = {};
|
|
370
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
371
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
372
|
+
const token = this.configuration.accessToken;
|
|
373
|
+
const tokenString = yield token("accessToken", []);
|
|
374
|
+
if (tokenString) {
|
|
375
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
const response = yield this.request({
|
|
379
|
+
path: `/projects/{projectId}/workspaces/{workspaceId}`.replace(`{${"projectId"}}`, encodeURIComponent(String(requestParameters.projectId))).replace(`{${"workspaceId"}}`, encodeURIComponent(String(requestParameters.workspaceId))),
|
|
380
|
+
method: 'PUT',
|
|
381
|
+
headers: headerParameters,
|
|
382
|
+
query: queryParameters,
|
|
383
|
+
body: (0, index_1.WorkspaceInputToJSON)(requestParameters.workspaceInput),
|
|
384
|
+
}, initOverrides);
|
|
385
|
+
return new runtime.VoidApiResponse(response);
|
|
386
|
+
});
|
|
387
|
+
}
|
|
388
|
+
/**
|
|
389
|
+
* Updates a workspace within a project
|
|
390
|
+
* Update workspace
|
|
391
|
+
*/
|
|
392
|
+
updateWorkspace(requestParameters, initOverrides) {
|
|
393
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
394
|
+
yield this.updateWorkspaceRaw(requestParameters, initOverrides);
|
|
395
|
+
});
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
exports.WorkspacesApi = WorkspacesApi;
|
package/dist/apis/index.d.ts
CHANGED
package/dist/apis/index.js
CHANGED
|
@@ -10,7 +10,11 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import type { CreateResponse, GetExecutionLogsResponse, RunAnalysisRequest, StopExecutionResponse, Task } from '../models/index';
|
|
13
|
+
import type { CostResponse, CreateResponse, GetExecutionLogsResponse, RunAnalysisRequest, StopExecutionResponse, Task } from '../models/index';
|
|
14
|
+
export interface CalculateCostRequest {
|
|
15
|
+
projectId: string;
|
|
16
|
+
datasetId: string;
|
|
17
|
+
}
|
|
14
18
|
export interface GetExecutionLogsRequest {
|
|
15
19
|
datasetId: string;
|
|
16
20
|
projectId: string;
|
|
@@ -43,6 +47,16 @@ export interface StopAnalysisRequest {
|
|
|
43
47
|
*
|
|
44
48
|
*/
|
|
45
49
|
export declare class ExecutionApi extends runtime.BaseAPI {
|
|
50
|
+
/**
|
|
51
|
+
* Calculate cost of an execution run
|
|
52
|
+
* Calculate cost
|
|
53
|
+
*/
|
|
54
|
+
calculateCostRaw(requestParameters: CalculateCostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CostResponse>>;
|
|
55
|
+
/**
|
|
56
|
+
* Calculate cost of an execution run
|
|
57
|
+
* Calculate cost
|
|
58
|
+
*/
|
|
59
|
+
calculateCost(requestParameters: CalculateCostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CostResponse>;
|
|
46
60
|
/**
|
|
47
61
|
* Gets live logs from main execution task
|
|
48
62
|
* Get execution logs
|