@cirrobio/api-client 0.1.29 → 0.1.30

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.
@@ -41,6 +41,7 @@ src/models/CloudAccount.ts
41
41
  src/models/CloudAccountType.ts
42
42
  src/models/ColumnDefinition.ts
43
43
  src/models/ComputeEnvironmentConfiguration.ts
44
+ src/models/ComputeEnvironmentConfigurationInput.ts
44
45
  src/models/Contact.ts
45
46
  src/models/CreateNotebookInstanceRequest.ts
46
47
  src/models/CreateProjectAccessRequest.ts
package/README.md CHANGED
@@ -36,7 +36,7 @@ navigate to the folder of your consuming project and run one of the following co
36
36
  _published:_
37
37
 
38
38
  ```
39
- npm install @cirrobio/api-client@0.1.29 --save
39
+ npm install @cirrobio/api-client@0.1.30 --save
40
40
  ```
41
41
 
42
42
  _unPublished (not recommended):_
@@ -10,13 +10,21 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import type { AgentDetail, AgentInput, ComputeEnvironmentConfiguration, CreateResponse } from '../models/index';
13
+ import type { AgentDetail, AgentInput, ComputeEnvironmentConfiguration, ComputeEnvironmentConfigurationInput, CreateResponse } from '../models/index';
14
14
  export interface CreateAgentRequest {
15
15
  agentInput: AgentInput;
16
16
  }
17
+ export interface CreateComputeEnvironmentRequest {
18
+ projectId: string;
19
+ computeEnvironmentConfigurationInput: ComputeEnvironmentConfigurationInput;
20
+ }
17
21
  export interface DeleteAgentRequest {
18
22
  agentId: string;
19
23
  }
24
+ export interface DeleteComputeEnvironmentRequest {
25
+ projectId: string;
26
+ computeEnvironmentId: string;
27
+ }
20
28
  export interface GetComputeEnvironmentsRequest {
21
29
  projectId: string;
22
30
  }
@@ -24,6 +32,11 @@ export interface UpdateAgentRequest {
24
32
  agentId: string;
25
33
  agentInput: AgentInput;
26
34
  }
35
+ export interface UpdateComputeEnvironmentRequest {
36
+ projectId: string;
37
+ computeEnvironmentId: string;
38
+ computeEnvironmentConfigurationInput: ComputeEnvironmentConfigurationInput;
39
+ }
27
40
  /**
28
41
  *
29
42
  */
@@ -38,6 +51,16 @@ export declare class ComputeEnvironmentApi extends runtime.BaseAPI {
38
51
  * Create agent
39
52
  */
40
53
  createAgent(requestParameters: CreateAgentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CreateResponse>;
54
+ /**
55
+ * Create a new compute environment for a project
56
+ * Create compute environment
57
+ */
58
+ createComputeEnvironmentRaw(requestParameters: CreateComputeEnvironmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CreateResponse>>;
59
+ /**
60
+ * Create a new compute environment for a project
61
+ * Create compute environment
62
+ */
63
+ createComputeEnvironment(requestParameters: CreateComputeEnvironmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CreateResponse>;
41
64
  /**
42
65
  * Delete an agent
43
66
  * Delete agent
@@ -48,6 +71,16 @@ export declare class ComputeEnvironmentApi extends runtime.BaseAPI {
48
71
  * Delete agent
49
72
  */
50
73
  deleteAgent(requestParameters: DeleteAgentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
74
+ /**
75
+ * Delete a compute environment for a project
76
+ * Delete compute environment
77
+ */
78
+ deleteComputeEnvironmentRaw(requestParameters: DeleteComputeEnvironmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
79
+ /**
80
+ * Delete a compute environment for a project
81
+ * Delete compute environment
82
+ */
83
+ deleteComputeEnvironment(requestParameters: DeleteComputeEnvironmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
51
84
  /**
52
85
  * Get a list of agents
53
86
  * Get agents
@@ -78,4 +111,14 @@ export declare class ComputeEnvironmentApi extends runtime.BaseAPI {
78
111
  * Update agent
79
112
  */
80
113
  updateAgent(requestParameters: UpdateAgentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
114
+ /**
115
+ * Update a compute environment for a project
116
+ * Update compute environment
117
+ */
118
+ updateComputeEnvironmentRaw(requestParameters: UpdateComputeEnvironmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
119
+ /**
120
+ * Update a compute environment for a project
121
+ * Update compute environment
122
+ */
123
+ updateComputeEnvironment(requestParameters: UpdateComputeEnvironmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
81
124
  }
@@ -132,6 +132,66 @@ var ComputeEnvironmentApi = /** @class */ (function (_super) {
132
132
  });
133
133
  });
134
134
  };
135
+ /**
136
+ * Create a new compute environment for a project
137
+ * Create compute environment
138
+ */
139
+ ComputeEnvironmentApi.prototype.createComputeEnvironmentRaw = function (requestParameters, initOverrides) {
140
+ return __awaiter(this, void 0, void 0, function () {
141
+ var queryParameters, headerParameters, token, tokenString, response;
142
+ return __generator(this, function (_a) {
143
+ switch (_a.label) {
144
+ case 0:
145
+ if (requestParameters.projectId === null || requestParameters.projectId === undefined) {
146
+ throw new runtime.RequiredError('projectId', 'Required parameter requestParameters.projectId was null or undefined when calling createComputeEnvironment.');
147
+ }
148
+ if (requestParameters.computeEnvironmentConfigurationInput === null || requestParameters.computeEnvironmentConfigurationInput === undefined) {
149
+ throw new runtime.RequiredError('computeEnvironmentConfigurationInput', 'Required parameter requestParameters.computeEnvironmentConfigurationInput was null or undefined when calling createComputeEnvironment.');
150
+ }
151
+ queryParameters = {};
152
+ headerParameters = {};
153
+ headerParameters['Content-Type'] = 'application/json';
154
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
155
+ token = this.configuration.accessToken;
156
+ return [4 /*yield*/, token("accessToken", [])];
157
+ case 1:
158
+ tokenString = _a.sent();
159
+ if (tokenString) {
160
+ headerParameters["Authorization"] = "Bearer ".concat(tokenString);
161
+ }
162
+ _a.label = 2;
163
+ case 2: return [4 /*yield*/, this.request({
164
+ path: "/projects/{projectId}/compute-environments".replace("{".concat("projectId", "}"), encodeURIComponent(String(requestParameters.projectId))),
165
+ method: 'POST',
166
+ headers: headerParameters,
167
+ query: queryParameters,
168
+ body: (0, index_1.ComputeEnvironmentConfigurationInputToJSON)(requestParameters.computeEnvironmentConfigurationInput),
169
+ }, initOverrides)];
170
+ case 3:
171
+ response = _a.sent();
172
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.CreateResponseFromJSON)(jsonValue); })];
173
+ }
174
+ });
175
+ });
176
+ };
177
+ /**
178
+ * Create a new compute environment for a project
179
+ * Create compute environment
180
+ */
181
+ ComputeEnvironmentApi.prototype.createComputeEnvironment = function (requestParameters, initOverrides) {
182
+ return __awaiter(this, void 0, void 0, function () {
183
+ var response;
184
+ return __generator(this, function (_a) {
185
+ switch (_a.label) {
186
+ case 0: return [4 /*yield*/, this.createComputeEnvironmentRaw(requestParameters, initOverrides)];
187
+ case 1:
188
+ response = _a.sent();
189
+ return [4 /*yield*/, response.value()];
190
+ case 2: return [2 /*return*/, _a.sent()];
191
+ }
192
+ });
193
+ });
194
+ };
135
195
  /**
136
196
  * Delete an agent
137
197
  * Delete agent
@@ -185,6 +245,62 @@ var ComputeEnvironmentApi = /** @class */ (function (_super) {
185
245
  });
186
246
  });
187
247
  };
248
+ /**
249
+ * Delete a compute environment for a project
250
+ * Delete compute environment
251
+ */
252
+ ComputeEnvironmentApi.prototype.deleteComputeEnvironmentRaw = function (requestParameters, initOverrides) {
253
+ return __awaiter(this, void 0, void 0, function () {
254
+ var queryParameters, headerParameters, token, tokenString, response;
255
+ return __generator(this, function (_a) {
256
+ switch (_a.label) {
257
+ case 0:
258
+ if (requestParameters.projectId === null || requestParameters.projectId === undefined) {
259
+ throw new runtime.RequiredError('projectId', 'Required parameter requestParameters.projectId was null or undefined when calling deleteComputeEnvironment.');
260
+ }
261
+ if (requestParameters.computeEnvironmentId === null || requestParameters.computeEnvironmentId === undefined) {
262
+ throw new runtime.RequiredError('computeEnvironmentId', 'Required parameter requestParameters.computeEnvironmentId was null or undefined when calling deleteComputeEnvironment.');
263
+ }
264
+ queryParameters = {};
265
+ headerParameters = {};
266
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
267
+ token = this.configuration.accessToken;
268
+ return [4 /*yield*/, token("accessToken", [])];
269
+ case 1:
270
+ tokenString = _a.sent();
271
+ if (tokenString) {
272
+ headerParameters["Authorization"] = "Bearer ".concat(tokenString);
273
+ }
274
+ _a.label = 2;
275
+ case 2: return [4 /*yield*/, this.request({
276
+ path: "/projects/{projectId}/compute-environments/{computeEnvironmentId}".replace("{".concat("projectId", "}"), encodeURIComponent(String(requestParameters.projectId))).replace("{".concat("computeEnvironmentId", "}"), encodeURIComponent(String(requestParameters.computeEnvironmentId))),
277
+ method: 'DELETE',
278
+ headers: headerParameters,
279
+ query: queryParameters,
280
+ }, initOverrides)];
281
+ case 3:
282
+ response = _a.sent();
283
+ return [2 /*return*/, new runtime.VoidApiResponse(response)];
284
+ }
285
+ });
286
+ });
287
+ };
288
+ /**
289
+ * Delete a compute environment for a project
290
+ * Delete compute environment
291
+ */
292
+ ComputeEnvironmentApi.prototype.deleteComputeEnvironment = function (requestParameters, initOverrides) {
293
+ return __awaiter(this, void 0, void 0, function () {
294
+ return __generator(this, function (_a) {
295
+ switch (_a.label) {
296
+ case 0: return [4 /*yield*/, this.deleteComputeEnvironmentRaw(requestParameters, initOverrides)];
297
+ case 1:
298
+ _a.sent();
299
+ return [2 /*return*/];
300
+ }
301
+ });
302
+ });
303
+ };
188
304
  /**
189
305
  * Get a list of agents
190
306
  * Get agents
@@ -350,6 +466,67 @@ var ComputeEnvironmentApi = /** @class */ (function (_super) {
350
466
  });
351
467
  });
352
468
  };
469
+ /**
470
+ * Update a compute environment for a project
471
+ * Update compute environment
472
+ */
473
+ ComputeEnvironmentApi.prototype.updateComputeEnvironmentRaw = function (requestParameters, initOverrides) {
474
+ return __awaiter(this, void 0, void 0, function () {
475
+ var queryParameters, headerParameters, token, tokenString, response;
476
+ return __generator(this, function (_a) {
477
+ switch (_a.label) {
478
+ case 0:
479
+ if (requestParameters.projectId === null || requestParameters.projectId === undefined) {
480
+ throw new runtime.RequiredError('projectId', 'Required parameter requestParameters.projectId was null or undefined when calling updateComputeEnvironment.');
481
+ }
482
+ if (requestParameters.computeEnvironmentId === null || requestParameters.computeEnvironmentId === undefined) {
483
+ throw new runtime.RequiredError('computeEnvironmentId', 'Required parameter requestParameters.computeEnvironmentId was null or undefined when calling updateComputeEnvironment.');
484
+ }
485
+ if (requestParameters.computeEnvironmentConfigurationInput === null || requestParameters.computeEnvironmentConfigurationInput === undefined) {
486
+ throw new runtime.RequiredError('computeEnvironmentConfigurationInput', 'Required parameter requestParameters.computeEnvironmentConfigurationInput was null or undefined when calling updateComputeEnvironment.');
487
+ }
488
+ queryParameters = {};
489
+ headerParameters = {};
490
+ headerParameters['Content-Type'] = 'application/json';
491
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
492
+ token = this.configuration.accessToken;
493
+ return [4 /*yield*/, token("accessToken", [])];
494
+ case 1:
495
+ tokenString = _a.sent();
496
+ if (tokenString) {
497
+ headerParameters["Authorization"] = "Bearer ".concat(tokenString);
498
+ }
499
+ _a.label = 2;
500
+ case 2: return [4 /*yield*/, this.request({
501
+ path: "/projects/{projectId}/compute-environments/{computeEnvironmentId}".replace("{".concat("projectId", "}"), encodeURIComponent(String(requestParameters.projectId))).replace("{".concat("computeEnvironmentId", "}"), encodeURIComponent(String(requestParameters.computeEnvironmentId))),
502
+ method: 'PUT',
503
+ headers: headerParameters,
504
+ query: queryParameters,
505
+ body: (0, index_1.ComputeEnvironmentConfigurationInputToJSON)(requestParameters.computeEnvironmentConfigurationInput),
506
+ }, initOverrides)];
507
+ case 3:
508
+ response = _a.sent();
509
+ return [2 /*return*/, new runtime.VoidApiResponse(response)];
510
+ }
511
+ });
512
+ });
513
+ };
514
+ /**
515
+ * Update a compute environment for a project
516
+ * Update compute environment
517
+ */
518
+ ComputeEnvironmentApi.prototype.updateComputeEnvironment = function (requestParameters, initOverrides) {
519
+ return __awaiter(this, void 0, void 0, function () {
520
+ return __generator(this, function (_a) {
521
+ switch (_a.label) {
522
+ case 0: return [4 /*yield*/, this.updateComputeEnvironmentRaw(requestParameters, initOverrides)];
523
+ case 1:
524
+ _a.sent();
525
+ return [2 /*return*/];
526
+ }
527
+ });
528
+ });
529
+ };
353
530
  return ComputeEnvironmentApi;
354
531
  }(runtime.BaseAPI));
355
532
  exports.ComputeEnvironmentApi = ComputeEnvironmentApi;
@@ -0,0 +1,45 @@
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
+ /**
13
+ *
14
+ * @export
15
+ * @interface ComputeEnvironmentConfigurationInput
16
+ */
17
+ export interface ComputeEnvironmentConfigurationInput {
18
+ /**
19
+ *
20
+ * @type {string}
21
+ * @memberof ComputeEnvironmentConfigurationInput
22
+ */
23
+ name: string;
24
+ /**
25
+ *
26
+ * @type {string}
27
+ * @memberof ComputeEnvironmentConfigurationInput
28
+ */
29
+ agentId?: string | null;
30
+ /**
31
+ *
32
+ * @type {{ [key: string]: string; }}
33
+ * @memberof ComputeEnvironmentConfigurationInput
34
+ */
35
+ properties?: {
36
+ [key: string]: string;
37
+ } | null;
38
+ }
39
+ /**
40
+ * Check if a given object implements the ComputeEnvironmentConfigurationInput interface.
41
+ */
42
+ export declare function instanceOfComputeEnvironmentConfigurationInput(value: object): boolean;
43
+ export declare function ComputeEnvironmentConfigurationInputFromJSON(json: any): ComputeEnvironmentConfigurationInput;
44
+ export declare function ComputeEnvironmentConfigurationInputFromJSONTyped(json: any, ignoreDiscriminator: boolean): ComputeEnvironmentConfigurationInput;
45
+ export declare function ComputeEnvironmentConfigurationInputToJSON(value?: ComputeEnvironmentConfigurationInput | null): any;
@@ -0,0 +1,55 @@
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
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.ComputeEnvironmentConfigurationInputToJSON = exports.ComputeEnvironmentConfigurationInputFromJSONTyped = exports.ComputeEnvironmentConfigurationInputFromJSON = exports.instanceOfComputeEnvironmentConfigurationInput = void 0;
17
+ var runtime_1 = require("../runtime");
18
+ /**
19
+ * Check if a given object implements the ComputeEnvironmentConfigurationInput interface.
20
+ */
21
+ function instanceOfComputeEnvironmentConfigurationInput(value) {
22
+ var isInstance = true;
23
+ isInstance = isInstance && "name" in value;
24
+ return isInstance;
25
+ }
26
+ exports.instanceOfComputeEnvironmentConfigurationInput = instanceOfComputeEnvironmentConfigurationInput;
27
+ function ComputeEnvironmentConfigurationInputFromJSON(json) {
28
+ return ComputeEnvironmentConfigurationInputFromJSONTyped(json, false);
29
+ }
30
+ exports.ComputeEnvironmentConfigurationInputFromJSON = ComputeEnvironmentConfigurationInputFromJSON;
31
+ function ComputeEnvironmentConfigurationInputFromJSONTyped(json, ignoreDiscriminator) {
32
+ if ((json === undefined) || (json === null)) {
33
+ return json;
34
+ }
35
+ return {
36
+ 'name': json['name'],
37
+ 'agentId': !(0, runtime_1.exists)(json, 'agentId') ? undefined : json['agentId'],
38
+ 'properties': !(0, runtime_1.exists)(json, 'properties') ? undefined : json['properties'],
39
+ };
40
+ }
41
+ exports.ComputeEnvironmentConfigurationInputFromJSONTyped = ComputeEnvironmentConfigurationInputFromJSONTyped;
42
+ function ComputeEnvironmentConfigurationInputToJSON(value) {
43
+ if (value === undefined) {
44
+ return undefined;
45
+ }
46
+ if (value === null) {
47
+ return null;
48
+ }
49
+ return {
50
+ 'name': value.name,
51
+ 'agentId': value.agentId,
52
+ 'properties': value.properties,
53
+ };
54
+ }
55
+ exports.ComputeEnvironmentConfigurationInputToJSON = ComputeEnvironmentConfigurationInputToJSON;
@@ -33,7 +33,7 @@ export interface SetUserProjectRoleRequest {
33
33
  * @type {boolean}
34
34
  * @memberof SetUserProjectRoleRequest
35
35
  */
36
- supressNotification?: boolean;
36
+ suppressNotification?: boolean;
37
37
  }
38
38
  /**
39
39
  * Check if a given object implements the SetUserProjectRoleRequest interface.
@@ -37,7 +37,7 @@ function SetUserProjectRoleRequestFromJSONTyped(json, ignoreDiscriminator) {
37
37
  return {
38
38
  'username': json['username'],
39
39
  'role': (0, ProjectRole_1.ProjectRoleFromJSON)(json['role']),
40
- 'supressNotification': !(0, runtime_1.exists)(json, 'supressNotification') ? undefined : json['supressNotification'],
40
+ 'suppressNotification': !(0, runtime_1.exists)(json, 'suppressNotification') ? undefined : json['suppressNotification'],
41
41
  };
42
42
  }
43
43
  exports.SetUserProjectRoleRequestFromJSONTyped = SetUserProjectRoleRequestFromJSONTyped;
@@ -51,7 +51,7 @@ function SetUserProjectRoleRequestToJSON(value) {
51
51
  return {
52
52
  'username': value.username,
53
53
  'role': (0, ProjectRole_1.ProjectRoleToJSON)(value.role),
54
- 'supressNotification': value.supressNotification,
54
+ 'suppressNotification': value.suppressNotification,
55
55
  };
56
56
  }
57
57
  exports.SetUserProjectRoleRequestToJSON = SetUserProjectRoleRequestToJSON;
@@ -39,6 +39,12 @@ export interface Task {
39
39
  * @memberof Task
40
40
  */
41
41
  requestedAt: Date;
42
+ /**
43
+ *
44
+ * @type {Date}
45
+ * @memberof Task
46
+ */
47
+ startedAt?: Date;
42
48
  /**
43
49
  *
44
50
  * @type {Date}
@@ -40,6 +40,7 @@ function TaskFromJSONTyped(json, ignoreDiscriminator) {
40
40
  'nativeJobId': json['nativeJobId'],
41
41
  'status': json['status'],
42
42
  'requestedAt': (new Date(json['requestedAt'])),
43
+ 'startedAt': !(0, runtime_1.exists)(json, 'startedAt') ? undefined : (new Date(json['startedAt'])),
43
44
  'stoppedAt': !(0, runtime_1.exists)(json, 'stoppedAt') ? undefined : (new Date(json['stoppedAt'])),
44
45
  'containerImage': !(0, runtime_1.exists)(json, 'containerImage') ? undefined : json['containerImage'],
45
46
  'commandLine': !(0, runtime_1.exists)(json, 'commandLine') ? undefined : json['commandLine'],
@@ -59,6 +60,7 @@ function TaskToJSON(value) {
59
60
  'nativeJobId': value.nativeJobId,
60
61
  'status': value.status,
61
62
  'requestedAt': (value.requestedAt.toISOString()),
63
+ 'startedAt': value.startedAt === undefined ? undefined : (value.startedAt.toISOString()),
62
64
  'stoppedAt': value.stoppedAt === undefined ? undefined : (value.stoppedAt.toISOString()),
63
65
  'containerImage': value.containerImage,
64
66
  'commandLine': value.commandLine,
@@ -18,6 +18,7 @@ export * from './CloudAccount';
18
18
  export * from './CloudAccountType';
19
19
  export * from './ColumnDefinition';
20
20
  export * from './ComputeEnvironmentConfiguration';
21
+ export * from './ComputeEnvironmentConfigurationInput';
21
22
  export * from './Contact';
22
23
  export * from './CreateNotebookInstanceRequest';
23
24
  export * from './CreateProjectAccessRequest';
@@ -36,6 +36,7 @@ __exportStar(require("./CloudAccount"), exports);
36
36
  __exportStar(require("./CloudAccountType"), exports);
37
37
  __exportStar(require("./ColumnDefinition"), exports);
38
38
  __exportStar(require("./ComputeEnvironmentConfiguration"), exports);
39
+ __exportStar(require("./ComputeEnvironmentConfigurationInput"), exports);
39
40
  __exportStar(require("./Contact"), exports);
40
41
  __exportStar(require("./CreateNotebookInstanceRequest"), exports);
41
42
  __exportStar(require("./CreateProjectAccessRequest"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cirrobio/api-client",
3
- "version": "0.1.29",
3
+ "version": "0.1.30",
4
4
  "description": "API client for Cirro",
5
5
  "author": "CirroBio",
6
6
  "repository": {
@@ -18,6 +18,7 @@ import type {
18
18
  AgentDetail,
19
19
  AgentInput,
20
20
  ComputeEnvironmentConfiguration,
21
+ ComputeEnvironmentConfigurationInput,
21
22
  CreateResponse,
22
23
  } from '../models/index';
23
24
  import {
@@ -27,6 +28,8 @@ import {
27
28
  AgentInputToJSON,
28
29
  ComputeEnvironmentConfigurationFromJSON,
29
30
  ComputeEnvironmentConfigurationToJSON,
31
+ ComputeEnvironmentConfigurationInputFromJSON,
32
+ ComputeEnvironmentConfigurationInputToJSON,
30
33
  CreateResponseFromJSON,
31
34
  CreateResponseToJSON,
32
35
  } from '../models/index';
@@ -35,10 +38,20 @@ export interface CreateAgentRequest {
35
38
  agentInput: AgentInput;
36
39
  }
37
40
 
41
+ export interface CreateComputeEnvironmentRequest {
42
+ projectId: string;
43
+ computeEnvironmentConfigurationInput: ComputeEnvironmentConfigurationInput;
44
+ }
45
+
38
46
  export interface DeleteAgentRequest {
39
47
  agentId: string;
40
48
  }
41
49
 
50
+ export interface DeleteComputeEnvironmentRequest {
51
+ projectId: string;
52
+ computeEnvironmentId: string;
53
+ }
54
+
42
55
  export interface GetComputeEnvironmentsRequest {
43
56
  projectId: string;
44
57
  }
@@ -48,6 +61,12 @@ export interface UpdateAgentRequest {
48
61
  agentInput: AgentInput;
49
62
  }
50
63
 
64
+ export interface UpdateComputeEnvironmentRequest {
65
+ projectId: string;
66
+ computeEnvironmentId: string;
67
+ computeEnvironmentConfigurationInput: ComputeEnvironmentConfigurationInput;
68
+ }
69
+
51
70
  /**
52
71
  *
53
72
  */
@@ -96,6 +115,53 @@ export class ComputeEnvironmentApi extends runtime.BaseAPI {
96
115
  return await response.value();
97
116
  }
98
117
 
118
+ /**
119
+ * Create a new compute environment for a project
120
+ * Create compute environment
121
+ */
122
+ async createComputeEnvironmentRaw(requestParameters: CreateComputeEnvironmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CreateResponse>> {
123
+ if (requestParameters.projectId === null || requestParameters.projectId === undefined) {
124
+ throw new runtime.RequiredError('projectId','Required parameter requestParameters.projectId was null or undefined when calling createComputeEnvironment.');
125
+ }
126
+
127
+ if (requestParameters.computeEnvironmentConfigurationInput === null || requestParameters.computeEnvironmentConfigurationInput === undefined) {
128
+ throw new runtime.RequiredError('computeEnvironmentConfigurationInput','Required parameter requestParameters.computeEnvironmentConfigurationInput was null or undefined when calling createComputeEnvironment.');
129
+ }
130
+
131
+ const queryParameters: any = {};
132
+
133
+ const headerParameters: runtime.HTTPHeaders = {};
134
+
135
+ headerParameters['Content-Type'] = 'application/json';
136
+
137
+ if (this.configuration && this.configuration.accessToken) {
138
+ const token = this.configuration.accessToken;
139
+ const tokenString = await token("accessToken", []);
140
+
141
+ if (tokenString) {
142
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
143
+ }
144
+ }
145
+ const response = await this.request({
146
+ path: `/projects/{projectId}/compute-environments`.replace(`{${"projectId"}}`, encodeURIComponent(String(requestParameters.projectId))),
147
+ method: 'POST',
148
+ headers: headerParameters,
149
+ query: queryParameters,
150
+ body: ComputeEnvironmentConfigurationInputToJSON(requestParameters.computeEnvironmentConfigurationInput),
151
+ }, initOverrides);
152
+
153
+ return new runtime.JSONApiResponse(response, (jsonValue) => CreateResponseFromJSON(jsonValue));
154
+ }
155
+
156
+ /**
157
+ * Create a new compute environment for a project
158
+ * Create compute environment
159
+ */
160
+ async createComputeEnvironment(requestParameters: CreateComputeEnvironmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CreateResponse> {
161
+ const response = await this.createComputeEnvironmentRaw(requestParameters, initOverrides);
162
+ return await response.value();
163
+ }
164
+
99
165
  /**
100
166
  * Delete an agent
101
167
  * Delete agent
@@ -135,6 +201,49 @@ export class ComputeEnvironmentApi extends runtime.BaseAPI {
135
201
  await this.deleteAgentRaw(requestParameters, initOverrides);
136
202
  }
137
203
 
204
+ /**
205
+ * Delete a compute environment for a project
206
+ * Delete compute environment
207
+ */
208
+ async deleteComputeEnvironmentRaw(requestParameters: DeleteComputeEnvironmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
209
+ if (requestParameters.projectId === null || requestParameters.projectId === undefined) {
210
+ throw new runtime.RequiredError('projectId','Required parameter requestParameters.projectId was null or undefined when calling deleteComputeEnvironment.');
211
+ }
212
+
213
+ if (requestParameters.computeEnvironmentId === null || requestParameters.computeEnvironmentId === undefined) {
214
+ throw new runtime.RequiredError('computeEnvironmentId','Required parameter requestParameters.computeEnvironmentId was null or undefined when calling deleteComputeEnvironment.');
215
+ }
216
+
217
+ const queryParameters: any = {};
218
+
219
+ const headerParameters: runtime.HTTPHeaders = {};
220
+
221
+ if (this.configuration && this.configuration.accessToken) {
222
+ const token = this.configuration.accessToken;
223
+ const tokenString = await token("accessToken", []);
224
+
225
+ if (tokenString) {
226
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
227
+ }
228
+ }
229
+ const response = await this.request({
230
+ path: `/projects/{projectId}/compute-environments/{computeEnvironmentId}`.replace(`{${"projectId"}}`, encodeURIComponent(String(requestParameters.projectId))).replace(`{${"computeEnvironmentId"}}`, encodeURIComponent(String(requestParameters.computeEnvironmentId))),
231
+ method: 'DELETE',
232
+ headers: headerParameters,
233
+ query: queryParameters,
234
+ }, initOverrides);
235
+
236
+ return new runtime.VoidApiResponse(response);
237
+ }
238
+
239
+ /**
240
+ * Delete a compute environment for a project
241
+ * Delete compute environment
242
+ */
243
+ async deleteComputeEnvironment(requestParameters: DeleteComputeEnvironmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
244
+ await this.deleteComputeEnvironmentRaw(requestParameters, initOverrides);
245
+ }
246
+
138
247
  /**
139
248
  * Get a list of agents
140
249
  * Get agents
@@ -257,4 +366,54 @@ export class ComputeEnvironmentApi extends runtime.BaseAPI {
257
366
  await this.updateAgentRaw(requestParameters, initOverrides);
258
367
  }
259
368
 
369
+ /**
370
+ * Update a compute environment for a project
371
+ * Update compute environment
372
+ */
373
+ async updateComputeEnvironmentRaw(requestParameters: UpdateComputeEnvironmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
374
+ if (requestParameters.projectId === null || requestParameters.projectId === undefined) {
375
+ throw new runtime.RequiredError('projectId','Required parameter requestParameters.projectId was null or undefined when calling updateComputeEnvironment.');
376
+ }
377
+
378
+ if (requestParameters.computeEnvironmentId === null || requestParameters.computeEnvironmentId === undefined) {
379
+ throw new runtime.RequiredError('computeEnvironmentId','Required parameter requestParameters.computeEnvironmentId was null or undefined when calling updateComputeEnvironment.');
380
+ }
381
+
382
+ if (requestParameters.computeEnvironmentConfigurationInput === null || requestParameters.computeEnvironmentConfigurationInput === undefined) {
383
+ throw new runtime.RequiredError('computeEnvironmentConfigurationInput','Required parameter requestParameters.computeEnvironmentConfigurationInput was null or undefined when calling updateComputeEnvironment.');
384
+ }
385
+
386
+ const queryParameters: any = {};
387
+
388
+ const headerParameters: runtime.HTTPHeaders = {};
389
+
390
+ headerParameters['Content-Type'] = 'application/json';
391
+
392
+ if (this.configuration && this.configuration.accessToken) {
393
+ const token = this.configuration.accessToken;
394
+ const tokenString = await token("accessToken", []);
395
+
396
+ if (tokenString) {
397
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
398
+ }
399
+ }
400
+ const response = await this.request({
401
+ path: `/projects/{projectId}/compute-environments/{computeEnvironmentId}`.replace(`{${"projectId"}}`, encodeURIComponent(String(requestParameters.projectId))).replace(`{${"computeEnvironmentId"}}`, encodeURIComponent(String(requestParameters.computeEnvironmentId))),
402
+ method: 'PUT',
403
+ headers: headerParameters,
404
+ query: queryParameters,
405
+ body: ComputeEnvironmentConfigurationInputToJSON(requestParameters.computeEnvironmentConfigurationInput),
406
+ }, initOverrides);
407
+
408
+ return new runtime.VoidApiResponse(response);
409
+ }
410
+
411
+ /**
412
+ * Update a compute environment for a project
413
+ * Update compute environment
414
+ */
415
+ async updateComputeEnvironment(requestParameters: UpdateComputeEnvironmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
416
+ await this.updateComputeEnvironmentRaw(requestParameters, initOverrides);
417
+ }
418
+
260
419
  }
@@ -0,0 +1,82 @@
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
+
15
+ import { exists, mapValues } from '../runtime';
16
+ /**
17
+ *
18
+ * @export
19
+ * @interface ComputeEnvironmentConfigurationInput
20
+ */
21
+ export interface ComputeEnvironmentConfigurationInput {
22
+ /**
23
+ *
24
+ * @type {string}
25
+ * @memberof ComputeEnvironmentConfigurationInput
26
+ */
27
+ name: string;
28
+ /**
29
+ *
30
+ * @type {string}
31
+ * @memberof ComputeEnvironmentConfigurationInput
32
+ */
33
+ agentId?: string | null;
34
+ /**
35
+ *
36
+ * @type {{ [key: string]: string; }}
37
+ * @memberof ComputeEnvironmentConfigurationInput
38
+ */
39
+ properties?: { [key: string]: string; } | null;
40
+ }
41
+
42
+ /**
43
+ * Check if a given object implements the ComputeEnvironmentConfigurationInput interface.
44
+ */
45
+ export function instanceOfComputeEnvironmentConfigurationInput(value: object): boolean {
46
+ let isInstance = true;
47
+ isInstance = isInstance && "name" in value;
48
+
49
+ return isInstance;
50
+ }
51
+
52
+ export function ComputeEnvironmentConfigurationInputFromJSON(json: any): ComputeEnvironmentConfigurationInput {
53
+ return ComputeEnvironmentConfigurationInputFromJSONTyped(json, false);
54
+ }
55
+
56
+ export function ComputeEnvironmentConfigurationInputFromJSONTyped(json: any, ignoreDiscriminator: boolean): ComputeEnvironmentConfigurationInput {
57
+ if ((json === undefined) || (json === null)) {
58
+ return json;
59
+ }
60
+ return {
61
+
62
+ 'name': json['name'],
63
+ 'agentId': !exists(json, 'agentId') ? undefined : json['agentId'],
64
+ 'properties': !exists(json, 'properties') ? undefined : json['properties'],
65
+ };
66
+ }
67
+
68
+ export function ComputeEnvironmentConfigurationInputToJSON(value?: ComputeEnvironmentConfigurationInput | null): any {
69
+ if (value === undefined) {
70
+ return undefined;
71
+ }
72
+ if (value === null) {
73
+ return null;
74
+ }
75
+ return {
76
+
77
+ 'name': value.name,
78
+ 'agentId': value.agentId,
79
+ 'properties': value.properties,
80
+ };
81
+ }
82
+
@@ -43,7 +43,7 @@ export interface SetUserProjectRoleRequest {
43
43
  * @type {boolean}
44
44
  * @memberof SetUserProjectRoleRequest
45
45
  */
46
- supressNotification?: boolean;
46
+ suppressNotification?: boolean;
47
47
  }
48
48
 
49
49
  /**
@@ -69,7 +69,7 @@ export function SetUserProjectRoleRequestFromJSONTyped(json: any, ignoreDiscrimi
69
69
 
70
70
  'username': json['username'],
71
71
  'role': ProjectRoleFromJSON(json['role']),
72
- 'supressNotification': !exists(json, 'supressNotification') ? undefined : json['supressNotification'],
72
+ 'suppressNotification': !exists(json, 'suppressNotification') ? undefined : json['suppressNotification'],
73
73
  };
74
74
  }
75
75
 
@@ -84,7 +84,7 @@ export function SetUserProjectRoleRequestToJSON(value?: SetUserProjectRoleReques
84
84
 
85
85
  'username': value.username,
86
86
  'role': ProjectRoleToJSON(value.role),
87
- 'supressNotification': value.supressNotification,
87
+ 'suppressNotification': value.suppressNotification,
88
88
  };
89
89
  }
90
90
 
@@ -43,6 +43,12 @@ export interface Task {
43
43
  * @memberof Task
44
44
  */
45
45
  requestedAt: Date;
46
+ /**
47
+ *
48
+ * @type {Date}
49
+ * @memberof Task
50
+ */
51
+ startedAt?: Date;
46
52
  /**
47
53
  *
48
54
  * @type {Date}
@@ -96,6 +102,7 @@ export function TaskFromJSONTyped(json: any, ignoreDiscriminator: boolean): Task
96
102
  'nativeJobId': json['nativeJobId'],
97
103
  'status': json['status'],
98
104
  'requestedAt': (new Date(json['requestedAt'])),
105
+ 'startedAt': !exists(json, 'startedAt') ? undefined : (new Date(json['startedAt'])),
99
106
  'stoppedAt': !exists(json, 'stoppedAt') ? undefined : (new Date(json['stoppedAt'])),
100
107
  'containerImage': !exists(json, 'containerImage') ? undefined : json['containerImage'],
101
108
  'commandLine': !exists(json, 'commandLine') ? undefined : json['commandLine'],
@@ -116,6 +123,7 @@ export function TaskToJSON(value?: Task | null): any {
116
123
  'nativeJobId': value.nativeJobId,
117
124
  'status': value.status,
118
125
  'requestedAt': (value.requestedAt.toISOString()),
126
+ 'startedAt': value.startedAt === undefined ? undefined : (value.startedAt.toISOString()),
119
127
  'stoppedAt': value.stoppedAt === undefined ? undefined : (value.stoppedAt.toISOString()),
120
128
  'containerImage': value.containerImage,
121
129
  'commandLine': value.commandLine,
@@ -20,6 +20,7 @@ export * from './CloudAccount';
20
20
  export * from './CloudAccountType';
21
21
  export * from './ColumnDefinition';
22
22
  export * from './ComputeEnvironmentConfiguration';
23
+ export * from './ComputeEnvironmentConfigurationInput';
23
24
  export * from './Contact';
24
25
  export * from './CreateNotebookInstanceRequest';
25
26
  export * from './CreateProjectAccessRequest';