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