@cirrobio/api-client 0.12.21 → 0.12.22

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 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.12.20 --save
39
+ npm install @cirrobio/api-client@0.12.22 --save
40
40
  ```
41
41
 
42
42
  _unPublished (not recommended):_
@@ -10,7 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import type { CreateResponse, PostponeWorkspaceAutostopInput, Workspace, WorkspaceConnectionResponse, WorkspaceEnvironment, WorkspaceInput } from '../models/index';
13
+ import type { CreateResponse, LogEntry, PostponeWorkspaceAutostopInput, Workspace, WorkspaceConnectionResponse, WorkspaceEnvironment, WorkspaceInput } from '../models/index';
14
14
  export interface ConnectWorkspaceRequest {
15
15
  projectId: string;
16
16
  workspaceId: string;
@@ -32,6 +32,10 @@ export interface GetWorkspaceRequest {
32
32
  projectId: string;
33
33
  workspaceId: string;
34
34
  }
35
+ export interface GetWorkspaceLogsRequest {
36
+ projectId: string;
37
+ workspaceId: string;
38
+ }
35
39
  export interface GetWorkspacesRequest {
36
40
  projectId: string;
37
41
  }
@@ -117,6 +121,16 @@ export declare class WorkspacesApi extends runtime.BaseAPI {
117
121
  * Get workspace environments
118
122
  */
119
123
  getWorkspaceEnvironments(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<WorkspaceEnvironment>>;
124
+ /**
125
+ * Retrieves logs from the main workspace container
126
+ * Get workspace logs
127
+ */
128
+ getWorkspaceLogsRaw(requestParameters: GetWorkspaceLogsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<LogEntry>>>;
129
+ /**
130
+ * Retrieves logs from the main workspace container
131
+ * Get workspace logs
132
+ */
133
+ getWorkspaceLogs(requestParameters: GetWorkspaceLogsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<LogEntry>>;
120
134
  /**
121
135
  * Retrieves a list of workspaces that the user has access to
122
136
  * Get workspaces
@@ -269,6 +269,46 @@ class WorkspacesApi extends runtime.BaseAPI {
269
269
  return yield response.value();
270
270
  });
271
271
  }
272
+ /**
273
+ * Retrieves logs from the main workspace container
274
+ * Get workspace logs
275
+ */
276
+ getWorkspaceLogsRaw(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 getWorkspaceLogs.');
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 getWorkspaceLogs.');
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}/logs`.replace(`{${"projectId"}}`, encodeURIComponent(String(requestParameters.projectId))).replace(`{${"workspaceId"}}`, encodeURIComponent(String(requestParameters.workspaceId))),
295
+ method: 'GET',
296
+ headers: headerParameters,
297
+ query: queryParameters,
298
+ }, initOverrides);
299
+ return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(index_1.LogEntryFromJSON));
300
+ });
301
+ }
302
+ /**
303
+ * Retrieves logs from the main workspace container
304
+ * Get workspace logs
305
+ */
306
+ getWorkspaceLogs(requestParameters, initOverrides) {
307
+ return __awaiter(this, void 0, void 0, function* () {
308
+ const response = yield this.getWorkspaceLogsRaw(requestParameters, initOverrides);
309
+ return yield response.value();
310
+ });
311
+ }
272
312
  /**
273
313
  * Retrieves a list of workspaces that the user has access to
274
314
  * Get workspaces
@@ -10,7 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import type { CreateResponse, PostponeWorkspaceAutostopInput, Workspace, WorkspaceConnectionResponse, WorkspaceEnvironment, WorkspaceInput } from '../models/index';
13
+ import type { CreateResponse, LogEntry, PostponeWorkspaceAutostopInput, Workspace, WorkspaceConnectionResponse, WorkspaceEnvironment, WorkspaceInput } from '../models/index';
14
14
  export interface ConnectWorkspaceRequest {
15
15
  projectId: string;
16
16
  workspaceId: string;
@@ -32,6 +32,10 @@ export interface GetWorkspaceRequest {
32
32
  projectId: string;
33
33
  workspaceId: string;
34
34
  }
35
+ export interface GetWorkspaceLogsRequest {
36
+ projectId: string;
37
+ workspaceId: string;
38
+ }
35
39
  export interface GetWorkspacesRequest {
36
40
  projectId: string;
37
41
  }
@@ -117,6 +121,16 @@ export declare class WorkspacesApi extends runtime.BaseAPI {
117
121
  * Get workspace environments
118
122
  */
119
123
  getWorkspaceEnvironments(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<WorkspaceEnvironment>>;
124
+ /**
125
+ * Retrieves logs from the main workspace container
126
+ * Get workspace logs
127
+ */
128
+ getWorkspaceLogsRaw(requestParameters: GetWorkspaceLogsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<LogEntry>>>;
129
+ /**
130
+ * Retrieves logs from the main workspace container
131
+ * Get workspace logs
132
+ */
133
+ getWorkspaceLogs(requestParameters: GetWorkspaceLogsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<LogEntry>>;
120
134
  /**
121
135
  * Retrieves a list of workspaces that the user has access to
122
136
  * Get workspaces
@@ -21,7 +21,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
21
21
  });
22
22
  };
23
23
  import * as runtime from '../runtime';
24
- import { CreateResponseFromJSON, PostponeWorkspaceAutostopInputToJSON, WorkspaceFromJSON, WorkspaceConnectionResponseFromJSON, WorkspaceEnvironmentFromJSON, WorkspaceInputToJSON, } from '../models/index';
24
+ import { CreateResponseFromJSON, LogEntryFromJSON, PostponeWorkspaceAutostopInputToJSON, WorkspaceFromJSON, WorkspaceConnectionResponseFromJSON, WorkspaceEnvironmentFromJSON, WorkspaceInputToJSON, } from '../models/index';
25
25
  /**
26
26
  *
27
27
  */
@@ -266,6 +266,46 @@ export class WorkspacesApi extends runtime.BaseAPI {
266
266
  return yield response.value();
267
267
  });
268
268
  }
269
+ /**
270
+ * Retrieves logs from the main workspace container
271
+ * Get workspace logs
272
+ */
273
+ getWorkspaceLogsRaw(requestParameters, initOverrides) {
274
+ return __awaiter(this, void 0, void 0, function* () {
275
+ if (requestParameters.projectId === null || requestParameters.projectId === undefined) {
276
+ throw new runtime.RequiredError('projectId', 'Required parameter requestParameters.projectId was null or undefined when calling getWorkspaceLogs.');
277
+ }
278
+ if (requestParameters.workspaceId === null || requestParameters.workspaceId === undefined) {
279
+ throw new runtime.RequiredError('workspaceId', 'Required parameter requestParameters.workspaceId was null or undefined when calling getWorkspaceLogs.');
280
+ }
281
+ const queryParameters = {};
282
+ const headerParameters = {};
283
+ if (this.configuration && this.configuration.accessToken) {
284
+ const token = this.configuration.accessToken;
285
+ const tokenString = yield token("accessToken", []);
286
+ if (tokenString) {
287
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
288
+ }
289
+ }
290
+ const response = yield this.request({
291
+ path: `/projects/{projectId}/workspaces/{workspaceId}/logs`.replace(`{${"projectId"}}`, encodeURIComponent(String(requestParameters.projectId))).replace(`{${"workspaceId"}}`, encodeURIComponent(String(requestParameters.workspaceId))),
292
+ method: 'GET',
293
+ headers: headerParameters,
294
+ query: queryParameters,
295
+ }, initOverrides);
296
+ return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(LogEntryFromJSON));
297
+ });
298
+ }
299
+ /**
300
+ * Retrieves logs from the main workspace container
301
+ * Get workspace logs
302
+ */
303
+ getWorkspaceLogs(requestParameters, initOverrides) {
304
+ return __awaiter(this, void 0, void 0, function* () {
305
+ const response = yield this.getWorkspaceLogsRaw(requestParameters, initOverrides);
306
+ return yield response.value();
307
+ });
308
+ }
269
309
  /**
270
310
  * Retrieves a list of workspaces that the user has access to
271
311
  * Get workspaces
@@ -40,6 +40,12 @@ export interface PipelineCode {
40
40
  * @memberof PipelineCode
41
41
  */
42
42
  entryPoint: string;
43
+ /**
44
+ * Version of the executor
45
+ * @type {string}
46
+ * @memberof PipelineCode
47
+ */
48
+ executorVersion?: string | null;
43
49
  }
44
50
  /**
45
51
  * Check if a given object implements the PipelineCode interface.
@@ -11,6 +11,7 @@
11
11
  * https://openapi-generator.tech
12
12
  * Do not edit the class manually.
13
13
  */
14
+ import { exists } from '../runtime';
14
15
  import { RepositoryTypeFromJSON, RepositoryTypeToJSON, } from './RepositoryType';
15
16
  /**
16
17
  * Check if a given object implements the PipelineCode interface.
@@ -35,6 +36,7 @@ export function PipelineCodeFromJSONTyped(json, ignoreDiscriminator) {
35
36
  'version': json['version'],
36
37
  'repositoryType': RepositoryTypeFromJSON(json['repositoryType']),
37
38
  'entryPoint': json['entryPoint'],
39
+ 'executorVersion': !exists(json, 'executorVersion') ? undefined : json['executorVersion'],
38
40
  };
39
41
  }
40
42
  export function PipelineCodeToJSON(value) {
@@ -49,5 +51,6 @@ export function PipelineCodeToJSON(value) {
49
51
  'version': value.version,
50
52
  'repositoryType': RepositoryTypeToJSON(value.repositoryType),
51
53
  'entryPoint': value.entryPoint,
54
+ 'executorVersion': value.executorVersion,
52
55
  };
53
56
  }
@@ -40,6 +40,12 @@ export interface PipelineCode {
40
40
  * @memberof PipelineCode
41
41
  */
42
42
  entryPoint: string;
43
+ /**
44
+ * Version of the executor
45
+ * @type {string}
46
+ * @memberof PipelineCode
47
+ */
48
+ executorVersion?: string | null;
43
49
  }
44
50
  /**
45
51
  * Check if a given object implements the PipelineCode interface.
@@ -14,6 +14,7 @@
14
14
  */
15
15
  Object.defineProperty(exports, "__esModule", { value: true });
16
16
  exports.PipelineCodeToJSON = exports.PipelineCodeFromJSONTyped = exports.PipelineCodeFromJSON = exports.instanceOfPipelineCode = void 0;
17
+ const runtime_1 = require("../runtime");
17
18
  const RepositoryType_1 = require("./RepositoryType");
18
19
  /**
19
20
  * Check if a given object implements the PipelineCode interface.
@@ -40,6 +41,7 @@ function PipelineCodeFromJSONTyped(json, ignoreDiscriminator) {
40
41
  'version': json['version'],
41
42
  'repositoryType': (0, RepositoryType_1.RepositoryTypeFromJSON)(json['repositoryType']),
42
43
  'entryPoint': json['entryPoint'],
44
+ 'executorVersion': !(0, runtime_1.exists)(json, 'executorVersion') ? undefined : json['executorVersion'],
43
45
  };
44
46
  }
45
47
  exports.PipelineCodeFromJSONTyped = PipelineCodeFromJSONTyped;
@@ -55,6 +57,7 @@ function PipelineCodeToJSON(value) {
55
57
  'version': value.version,
56
58
  'repositoryType': (0, RepositoryType_1.RepositoryTypeToJSON)(value.repositoryType),
57
59
  'entryPoint': value.entryPoint,
60
+ 'executorVersion': value.executorVersion,
58
61
  };
59
62
  }
60
63
  exports.PipelineCodeToJSON = PipelineCodeToJSON;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cirrobio/api-client",
3
- "version": "0.12.21",
3
+ "version": "0.12.22",
4
4
  "description": "API client for Cirro",
5
5
  "author": "CirroBio",
6
6
  "repository": {