@cirrobio/api-client 0.12.15 → 0.12.17

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.15 --save
39
+ npm install @cirrobio/api-client@0.12.17 --save
40
40
  ```
41
41
 
42
42
  _unPublished (not recommended):_
@@ -21,8 +21,8 @@ export interface GetAppRegistrationRequest {
21
21
  id: string;
22
22
  }
23
23
  export interface ListAppRegistrationsRequest {
24
- limit: number;
25
- nextToken: string;
24
+ limit?: number;
25
+ nextToken?: string;
26
26
  }
27
27
  export interface RegenerateSecretRequest {
28
28
  id: string;
@@ -74,7 +74,7 @@ export declare class AppRegistrationsApi extends runtime.BaseAPI {
74
74
  * Lists all app registrations in the system.
75
75
  * List app registrations
76
76
  */
77
- listAppRegistrations(requestParameters: ListAppRegistrationsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedResponseAppRegistrationDto>;
77
+ listAppRegistrations(requestParameters?: ListAppRegistrationsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedResponseAppRegistrationDto>;
78
78
  /**
79
79
  * Lists app registrations created by the current user.
80
80
  * List my app registrations
@@ -147,12 +147,6 @@ class AppRegistrationsApi extends runtime.BaseAPI {
147
147
  */
148
148
  listAppRegistrationsRaw(requestParameters, initOverrides) {
149
149
  return __awaiter(this, void 0, void 0, function* () {
150
- if (requestParameters.limit === null || requestParameters.limit === undefined) {
151
- throw new runtime.RequiredError('limit', 'Required parameter requestParameters.limit was null or undefined when calling listAppRegistrations.');
152
- }
153
- if (requestParameters.nextToken === null || requestParameters.nextToken === undefined) {
154
- throw new runtime.RequiredError('nextToken', 'Required parameter requestParameters.nextToken was null or undefined when calling listAppRegistrations.');
155
- }
156
150
  const queryParameters = {};
157
151
  if (requestParameters.limit !== undefined) {
158
152
  queryParameters['limit'] = requestParameters.limit;
@@ -181,7 +175,7 @@ class AppRegistrationsApi extends runtime.BaseAPI {
181
175
  * Lists all app registrations in the system.
182
176
  * List app registrations
183
177
  */
184
- listAppRegistrations(requestParameters, initOverrides) {
178
+ listAppRegistrations(requestParameters = {}, initOverrides) {
185
179
  return __awaiter(this, void 0, void 0, function* () {
186
180
  const response = yield this.listAppRegistrationsRaw(requestParameters, initOverrides);
187
181
  return yield response.value();
@@ -24,6 +24,12 @@ export interface GetProjectSummaryRequest {
24
24
  projectId: string;
25
25
  numberOfDays?: number;
26
26
  }
27
+ export interface GetTaskRequest {
28
+ datasetId: string;
29
+ projectId: string;
30
+ taskId: string;
31
+ forceLive?: boolean;
32
+ }
27
33
  export interface GetTaskLogsRequest {
28
34
  datasetId: string;
29
35
  projectId: string;
@@ -81,6 +87,16 @@ export declare class ExecutionApi extends runtime.BaseAPI {
81
87
  getProjectSummary(requestParameters: GetProjectSummaryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<{
82
88
  [key: string]: Array<Task>;
83
89
  }>;
90
+ /**
91
+ * Gets detailed information on the individual task
92
+ * Get task
93
+ */
94
+ getTaskRaw(requestParameters: GetTaskRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Task>>;
95
+ /**
96
+ * Gets detailed information on the individual task
97
+ * Get task
98
+ */
99
+ getTask(requestParameters: GetTaskRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Task>;
84
100
  /**
85
101
  * Gets the log output from an individual task
86
102
  * Get task logs
@@ -152,6 +152,52 @@ class ExecutionApi extends runtime.BaseAPI {
152
152
  return yield response.value();
153
153
  });
154
154
  }
155
+ /**
156
+ * Gets detailed information on the individual task
157
+ * Get task
158
+ */
159
+ getTaskRaw(requestParameters, initOverrides) {
160
+ return __awaiter(this, void 0, void 0, function* () {
161
+ if (requestParameters.datasetId === null || requestParameters.datasetId === undefined) {
162
+ throw new runtime.RequiredError('datasetId', 'Required parameter requestParameters.datasetId was null or undefined when calling getTask.');
163
+ }
164
+ if (requestParameters.projectId === null || requestParameters.projectId === undefined) {
165
+ throw new runtime.RequiredError('projectId', 'Required parameter requestParameters.projectId was null or undefined when calling getTask.');
166
+ }
167
+ if (requestParameters.taskId === null || requestParameters.taskId === undefined) {
168
+ throw new runtime.RequiredError('taskId', 'Required parameter requestParameters.taskId was null or undefined when calling getTask.');
169
+ }
170
+ const queryParameters = {};
171
+ if (requestParameters.forceLive !== undefined) {
172
+ queryParameters['forceLive'] = requestParameters.forceLive;
173
+ }
174
+ const headerParameters = {};
175
+ if (this.configuration && this.configuration.accessToken) {
176
+ const token = this.configuration.accessToken;
177
+ const tokenString = yield token("accessToken", []);
178
+ if (tokenString) {
179
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
180
+ }
181
+ }
182
+ const response = yield this.request({
183
+ path: `/projects/{projectId}/execution/{datasetId}/tasks/{taskId}`.replace(`{${"datasetId"}}`, encodeURIComponent(String(requestParameters.datasetId))).replace(`{${"projectId"}}`, encodeURIComponent(String(requestParameters.projectId))).replace(`{${"taskId"}}`, encodeURIComponent(String(requestParameters.taskId))),
184
+ method: 'GET',
185
+ headers: headerParameters,
186
+ query: queryParameters,
187
+ }, initOverrides);
188
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.TaskFromJSON)(jsonValue));
189
+ });
190
+ }
191
+ /**
192
+ * Gets detailed information on the individual task
193
+ * Get task
194
+ */
195
+ getTask(requestParameters, initOverrides) {
196
+ return __awaiter(this, void 0, void 0, function* () {
197
+ const response = yield this.getTaskRaw(requestParameters, initOverrides);
198
+ return yield response.value();
199
+ });
200
+ }
155
201
  /**
156
202
  * Gets the log output from an individual task
157
203
  * Get task logs
@@ -21,8 +21,8 @@ export interface GetAppRegistrationRequest {
21
21
  id: string;
22
22
  }
23
23
  export interface ListAppRegistrationsRequest {
24
- limit: number;
25
- nextToken: string;
24
+ limit?: number;
25
+ nextToken?: string;
26
26
  }
27
27
  export interface RegenerateSecretRequest {
28
28
  id: string;
@@ -74,7 +74,7 @@ export declare class AppRegistrationsApi extends runtime.BaseAPI {
74
74
  * Lists all app registrations in the system.
75
75
  * List app registrations
76
76
  */
77
- listAppRegistrations(requestParameters: ListAppRegistrationsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedResponseAppRegistrationDto>;
77
+ listAppRegistrations(requestParameters?: ListAppRegistrationsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedResponseAppRegistrationDto>;
78
78
  /**
79
79
  * Lists app registrations created by the current user.
80
80
  * List my app registrations
@@ -144,12 +144,6 @@ export class AppRegistrationsApi extends runtime.BaseAPI {
144
144
  */
145
145
  listAppRegistrationsRaw(requestParameters, initOverrides) {
146
146
  return __awaiter(this, void 0, void 0, function* () {
147
- if (requestParameters.limit === null || requestParameters.limit === undefined) {
148
- throw new runtime.RequiredError('limit', 'Required parameter requestParameters.limit was null or undefined when calling listAppRegistrations.');
149
- }
150
- if (requestParameters.nextToken === null || requestParameters.nextToken === undefined) {
151
- throw new runtime.RequiredError('nextToken', 'Required parameter requestParameters.nextToken was null or undefined when calling listAppRegistrations.');
152
- }
153
147
  const queryParameters = {};
154
148
  if (requestParameters.limit !== undefined) {
155
149
  queryParameters['limit'] = requestParameters.limit;
@@ -178,7 +172,7 @@ export class AppRegistrationsApi extends runtime.BaseAPI {
178
172
  * Lists all app registrations in the system.
179
173
  * List app registrations
180
174
  */
181
- listAppRegistrations(requestParameters, initOverrides) {
175
+ listAppRegistrations(requestParameters = {}, initOverrides) {
182
176
  return __awaiter(this, void 0, void 0, function* () {
183
177
  const response = yield this.listAppRegistrationsRaw(requestParameters, initOverrides);
184
178
  return yield response.value();
@@ -24,6 +24,12 @@ export interface GetProjectSummaryRequest {
24
24
  projectId: string;
25
25
  numberOfDays?: number;
26
26
  }
27
+ export interface GetTaskRequest {
28
+ datasetId: string;
29
+ projectId: string;
30
+ taskId: string;
31
+ forceLive?: boolean;
32
+ }
27
33
  export interface GetTaskLogsRequest {
28
34
  datasetId: string;
29
35
  projectId: string;
@@ -81,6 +87,16 @@ export declare class ExecutionApi extends runtime.BaseAPI {
81
87
  getProjectSummary(requestParameters: GetProjectSummaryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<{
82
88
  [key: string]: Array<Task>;
83
89
  }>;
90
+ /**
91
+ * Gets detailed information on the individual task
92
+ * Get task
93
+ */
94
+ getTaskRaw(requestParameters: GetTaskRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Task>>;
95
+ /**
96
+ * Gets detailed information on the individual task
97
+ * Get task
98
+ */
99
+ getTask(requestParameters: GetTaskRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Task>;
84
100
  /**
85
101
  * Gets the log output from an individual task
86
102
  * Get task logs
@@ -149,6 +149,52 @@ export class ExecutionApi extends runtime.BaseAPI {
149
149
  return yield response.value();
150
150
  });
151
151
  }
152
+ /**
153
+ * Gets detailed information on the individual task
154
+ * Get task
155
+ */
156
+ getTaskRaw(requestParameters, initOverrides) {
157
+ return __awaiter(this, void 0, void 0, function* () {
158
+ if (requestParameters.datasetId === null || requestParameters.datasetId === undefined) {
159
+ throw new runtime.RequiredError('datasetId', 'Required parameter requestParameters.datasetId was null or undefined when calling getTask.');
160
+ }
161
+ if (requestParameters.projectId === null || requestParameters.projectId === undefined) {
162
+ throw new runtime.RequiredError('projectId', 'Required parameter requestParameters.projectId was null or undefined when calling getTask.');
163
+ }
164
+ if (requestParameters.taskId === null || requestParameters.taskId === undefined) {
165
+ throw new runtime.RequiredError('taskId', 'Required parameter requestParameters.taskId was null or undefined when calling getTask.');
166
+ }
167
+ const queryParameters = {};
168
+ if (requestParameters.forceLive !== undefined) {
169
+ queryParameters['forceLive'] = requestParameters.forceLive;
170
+ }
171
+ const headerParameters = {};
172
+ if (this.configuration && this.configuration.accessToken) {
173
+ const token = this.configuration.accessToken;
174
+ const tokenString = yield token("accessToken", []);
175
+ if (tokenString) {
176
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
177
+ }
178
+ }
179
+ const response = yield this.request({
180
+ path: `/projects/{projectId}/execution/{datasetId}/tasks/{taskId}`.replace(`{${"datasetId"}}`, encodeURIComponent(String(requestParameters.datasetId))).replace(`{${"projectId"}}`, encodeURIComponent(String(requestParameters.projectId))).replace(`{${"taskId"}}`, encodeURIComponent(String(requestParameters.taskId))),
181
+ method: 'GET',
182
+ headers: headerParameters,
183
+ query: queryParameters,
184
+ }, initOverrides);
185
+ return new runtime.JSONApiResponse(response, (jsonValue) => TaskFromJSON(jsonValue));
186
+ });
187
+ }
188
+ /**
189
+ * Gets detailed information on the individual task
190
+ * Get task
191
+ */
192
+ getTask(requestParameters, initOverrides) {
193
+ return __awaiter(this, void 0, void 0, function* () {
194
+ const response = yield this.getTaskRaw(requestParameters, initOverrides);
195
+ return yield response.value();
196
+ });
197
+ }
152
198
  /**
153
199
  * Gets the log output from an individual task
154
200
  * Get task logs
@@ -33,6 +33,12 @@ export interface Task {
33
33
  * @memberof Task
34
34
  */
35
35
  status: string;
36
+ /**
37
+ *
38
+ * @type {string}
39
+ * @memberof Task
40
+ */
41
+ statusMessage?: string | null;
36
42
  /**
37
43
  *
38
44
  * @type {Date}
@@ -32,6 +32,7 @@ export function TaskFromJSONTyped(json, ignoreDiscriminator) {
32
32
  'name': json['name'],
33
33
  'nativeJobId': !exists(json, 'nativeJobId') ? undefined : json['nativeJobId'],
34
34
  'status': json['status'],
35
+ 'statusMessage': !exists(json, 'statusMessage') ? undefined : json['statusMessage'],
35
36
  'requestedAt': !exists(json, 'requestedAt') ? undefined : (json['requestedAt'] === null ? null : new Date(json['requestedAt'])),
36
37
  'startedAt': !exists(json, 'startedAt') ? undefined : (json['startedAt'] === null ? null : new Date(json['startedAt'])),
37
38
  'stoppedAt': !exists(json, 'stoppedAt') ? undefined : (json['stoppedAt'] === null ? null : new Date(json['stoppedAt'])),
@@ -51,6 +52,7 @@ export function TaskToJSON(value) {
51
52
  'name': value.name,
52
53
  'nativeJobId': value.nativeJobId,
53
54
  'status': value.status,
55
+ 'statusMessage': value.statusMessage,
54
56
  'requestedAt': value.requestedAt === undefined ? undefined : (value.requestedAt === null ? null : value.requestedAt.toISOString()),
55
57
  'startedAt': value.startedAt === undefined ? undefined : (value.startedAt === null ? null : value.startedAt.toISOString()),
56
58
  'stoppedAt': value.stoppedAt === undefined ? undefined : (value.stoppedAt === null ? null : value.stoppedAt.toISOString()),
@@ -20,7 +20,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
20
20
  step((generator = generator.apply(thisArg, _arguments || [])).next());
21
21
  });
22
22
  };
23
- export const BASE_PATH = "http://localhost:8080/api".replace(/\/+$/, "");
23
+ export const BASE_PATH = "https://dev.cirro.bio/api".replace(/\/+$/, "");
24
24
  export class Configuration {
25
25
  constructor(configuration = {}) {
26
26
  this.configuration = configuration;
@@ -33,6 +33,12 @@ export interface Task {
33
33
  * @memberof Task
34
34
  */
35
35
  status: string;
36
+ /**
37
+ *
38
+ * @type {string}
39
+ * @memberof Task
40
+ */
41
+ statusMessage?: string | null;
36
42
  /**
37
43
  *
38
44
  * @type {Date}
@@ -37,6 +37,7 @@ function TaskFromJSONTyped(json, ignoreDiscriminator) {
37
37
  'name': json['name'],
38
38
  'nativeJobId': !(0, runtime_1.exists)(json, 'nativeJobId') ? undefined : json['nativeJobId'],
39
39
  'status': json['status'],
40
+ 'statusMessage': !(0, runtime_1.exists)(json, 'statusMessage') ? undefined : json['statusMessage'],
40
41
  'requestedAt': !(0, runtime_1.exists)(json, 'requestedAt') ? undefined : (json['requestedAt'] === null ? null : new Date(json['requestedAt'])),
41
42
  'startedAt': !(0, runtime_1.exists)(json, 'startedAt') ? undefined : (json['startedAt'] === null ? null : new Date(json['startedAt'])),
42
43
  'stoppedAt': !(0, runtime_1.exists)(json, 'stoppedAt') ? undefined : (json['stoppedAt'] === null ? null : new Date(json['stoppedAt'])),
@@ -57,6 +58,7 @@ function TaskToJSON(value) {
57
58
  'name': value.name,
58
59
  'nativeJobId': value.nativeJobId,
59
60
  'status': value.status,
61
+ 'statusMessage': value.statusMessage,
60
62
  'requestedAt': value.requestedAt === undefined ? undefined : (value.requestedAt === null ? null : value.requestedAt.toISOString()),
61
63
  'startedAt': value.startedAt === undefined ? undefined : (value.startedAt === null ? null : value.startedAt.toISOString()),
62
64
  'stoppedAt': value.stoppedAt === undefined ? undefined : (value.stoppedAt === null ? null : value.stoppedAt.toISOString()),
package/dist/runtime.js CHANGED
@@ -23,7 +23,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
23
23
  };
24
24
  Object.defineProperty(exports, "__esModule", { value: true });
25
25
  exports.TextApiResponse = exports.BlobApiResponse = exports.VoidApiResponse = exports.JSONApiResponse = exports.canConsumeForm = exports.mapValues = exports.querystring = exports.exists = exports.COLLECTION_FORMATS = exports.RequiredError = exports.FetchError = exports.ResponseError = exports.BaseAPI = exports.DefaultConfig = exports.Configuration = exports.BASE_PATH = void 0;
26
- exports.BASE_PATH = "http://localhost:8080/api".replace(/\/+$/, "");
26
+ exports.BASE_PATH = "https://dev.cirro.bio/api".replace(/\/+$/, "");
27
27
  class Configuration {
28
28
  constructor(configuration = {}) {
29
29
  this.configuration = configuration;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cirrobio/api-client",
3
- "version": "0.12.15",
3
+ "version": "0.12.17",
4
4
  "description": "API client for Cirro",
5
5
  "author": "CirroBio",
6
6
  "repository": {