@cobaltio/cobalt-js 8.9.2-beta.1 → 8.9.2-beta.2

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/cobalt.d.ts CHANGED
@@ -283,6 +283,18 @@ export interface Execution {
283
283
  associated_event_id: string;
284
284
  custom_trigger_id?: string;
285
285
  custom_application_id?: string;
286
+ completion_percentage?: number;
287
+ nodes?: {
288
+ node_id: string;
289
+ node_name: string;
290
+ node_type: string;
291
+ node_status: "Success" | "Ready" | "Errored" | "Waiting" | "Stopped" | "Rejected" | "Errored_and_Skipped" | "Timed_Out";
292
+ is_batch?: boolean;
293
+ attempts_made: number;
294
+ maximum_attempts: number;
295
+ input_data: unknown;
296
+ latest_output: unknown;
297
+ }[];
286
298
  createdAt: string;
287
299
  }
288
300
  declare class Cobalt {
package/cobalt.js CHANGED
@@ -162,7 +162,8 @@ class Cobalt {
162
162
  const interval = setInterval(() => {
163
163
  this.getApp(slug)
164
164
  .then(app => {
165
- if (app && app.connected === true && !app.reauth_required) {
165
+ var _a;
166
+ if (app && ((_a = app.connected_accounts) === null || _a === void 0 ? void 0 : _a.filter(a => a.auth_type === AuthType.OAuth2).some(a => a.status === AuthStatus.Active))) {
166
167
  // close auth window
167
168
  connectWindow && connectWindow.close();
168
169
  // clear interval
package/cobalt.ts CHANGED
@@ -282,12 +282,12 @@ export interface Execution {
282
282
  _id: string;
283
283
  name: string;
284
284
  icon?: string;
285
- },
286
- status: "COMPLETED" | "RUNNING" | "ERRORED" | "STOPPED" | "STOPPING" | "TIMED_OUT",
285
+ };
286
+ status: "COMPLETED" | "RUNNING" | "ERRORED" | "STOPPED" | "STOPPING" | "TIMED_OUT";
287
287
  associated_workflow: {
288
288
  _id: string;
289
289
  name: string;
290
- },
290
+ };
291
291
  associated_trigger_application: {
292
292
  _id: string;
293
293
  name: string;
@@ -297,7 +297,7 @@ export interface Execution {
297
297
  _id: string;
298
298
  name: string;
299
299
  }
300
- },
300
+ };
301
301
  trigger_application_event?: string;
302
302
  linked_account_id: string;
303
303
  environment: "test" | "production";
@@ -305,6 +305,18 @@ export interface Execution {
305
305
  associated_event_id: string;
306
306
  custom_trigger_id?: string;
307
307
  custom_application_id?: string;
308
+ completion_percentage?: number;
309
+ nodes?: {
310
+ node_id: string;
311
+ node_name: string;
312
+ node_type: string;
313
+ node_status: "Success" | "Ready" | "Errored" | "Waiting" | "Stopped" | "Rejected"| "Errored_and_Skipped" | "Timed_Out";
314
+ is_batch?: boolean;
315
+ attempts_made: number;
316
+ maximum_attempts: number;
317
+ input_data: unknown;
318
+ latest_output: unknown;
319
+ }[];
308
320
  createdAt: string;
309
321
  }
310
322
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cobaltio/cobalt-js",
3
- "version": "8.9.2-beta.1",
3
+ "version": "8.9.2-beta.2",
4
4
  "description": "Cobalt frontend SDK",
5
5
  "main": "./cobalt.js",
6
6
  "typings": "./cobalt.d.ts",