@cobaltio/cobalt-js 8.8.0 → 8.9.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.
- package/cobalt.d.ts +99 -7
- package/cobalt.js +47 -4
- package/cobalt.ts +132 -9
- package/docs/assets/navigation.js +1 -1
- package/docs/assets/search.js +1 -1
- package/docs/classes/Cobalt.html +29 -21
- package/docs/interfaces/Application.html +18 -13
- package/docs/interfaces/CobaltOptions.html +3 -3
- package/docs/interfaces/Config.html +2 -2
- package/docs/interfaces/ConfigField.html +8 -2
- package/docs/interfaces/ConfigPayload.html +4 -4
- package/docs/interfaces/ConfigWorkflow.html +2 -2
- package/docs/interfaces/EcosystemLead.html +6 -6
- package/docs/interfaces/EcosystemLeadPayload.html +5 -5
- package/docs/interfaces/Execution.html +17 -0
- package/docs/interfaces/InputField.html +13 -7
- package/docs/interfaces/Label.html +3 -3
- package/docs/interfaces/PublicWorkflow.html +12 -4
- package/docs/interfaces/PublicWorkflowPayload.html +4 -4
- package/docs/interfaces/PublicWorkflowsPayload.html +2 -2
- package/docs/interfaces/RuleOptions.html +2 -2
- package/docs/interfaces/UpdateConfigPayload.html +5 -5
- package/docs/interfaces/WorkflowPayload.html +4 -4
- package/docs/llms.txt +225 -126
- package/docs/modules.html +1 -1
- package/package.json +1 -1
package/cobalt.d.ts
CHANGED
|
@@ -3,16 +3,21 @@
|
|
|
3
3
|
*/
|
|
4
4
|
/** An application in Cobalt. */
|
|
5
5
|
export interface Application {
|
|
6
|
+
/** Application ID */
|
|
7
|
+
app_id: string;
|
|
6
8
|
/**The application name. */
|
|
7
9
|
name: string;
|
|
8
10
|
/**The application description. */
|
|
9
11
|
description: string;
|
|
10
12
|
/**The application icon. */
|
|
11
13
|
icon: string;
|
|
12
|
-
/**
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
/**
|
|
15
|
+
* @deprecated Use `slug` instead.
|
|
16
|
+
* The application slug for native apps and `custom` for custom apps.
|
|
17
|
+
*/
|
|
18
|
+
type: string | "custom";
|
|
19
|
+
/** The application slug. */
|
|
20
|
+
slug: string;
|
|
16
21
|
/**The type of auth used by application. */
|
|
17
22
|
auth_type: "oauth2" | "keybased";
|
|
18
23
|
/** Whether the user has connected the application. */
|
|
@@ -21,6 +26,8 @@ export interface Application {
|
|
|
21
26
|
reauth_required?: boolean;
|
|
22
27
|
/** The fields required from the user to connect the application (for `keybased` auth type). */
|
|
23
28
|
auth_input_map?: InputField[];
|
|
29
|
+
/** The categories/tags for the application. */
|
|
30
|
+
tags?: string[];
|
|
24
31
|
}
|
|
25
32
|
/** An Input field to take input from the user. */
|
|
26
33
|
export interface InputField {
|
|
@@ -30,10 +37,19 @@ export interface InputField {
|
|
|
30
37
|
type: string;
|
|
31
38
|
/** Whether the field is required. */
|
|
32
39
|
required: boolean;
|
|
40
|
+
/** Whether the field accepts multiple values. */
|
|
41
|
+
multiple?: boolean;
|
|
33
42
|
/** The placeholder of the field. */
|
|
34
43
|
placeholder: string;
|
|
35
44
|
/** The label of the field. */
|
|
36
45
|
label: string;
|
|
46
|
+
/** The help text for the field. */
|
|
47
|
+
help_text?: string;
|
|
48
|
+
/** The options for the field. */
|
|
49
|
+
options?: {
|
|
50
|
+
name?: string;
|
|
51
|
+
value: string;
|
|
52
|
+
}[];
|
|
37
53
|
}
|
|
38
54
|
/** The payload object for config. */
|
|
39
55
|
export interface ConfigPayload {
|
|
@@ -77,6 +93,9 @@ export interface CobaltOptions {
|
|
|
77
93
|
/** The session token. */
|
|
78
94
|
token?: string;
|
|
79
95
|
}
|
|
96
|
+
/**
|
|
97
|
+
* @deprecated
|
|
98
|
+
*/
|
|
80
99
|
export interface EcosystemLead {
|
|
81
100
|
_id: string;
|
|
82
101
|
name?: string;
|
|
@@ -84,6 +103,9 @@ export interface EcosystemLead {
|
|
|
84
103
|
description?: string;
|
|
85
104
|
created_at: string;
|
|
86
105
|
}
|
|
106
|
+
/**
|
|
107
|
+
* @deprecated
|
|
108
|
+
*/
|
|
87
109
|
export interface EcosystemLeadPayload {
|
|
88
110
|
slug: string;
|
|
89
111
|
name?: string;
|
|
@@ -117,6 +139,14 @@ export interface PublicWorkflow {
|
|
|
117
139
|
name: string;
|
|
118
140
|
/**The workflow description. */
|
|
119
141
|
description?: string;
|
|
142
|
+
/**The application's slug in which this workflow exists. */
|
|
143
|
+
slug?: string;
|
|
144
|
+
/**The workflow created at. */
|
|
145
|
+
createdAt: string;
|
|
146
|
+
/**The workflow updated at. */
|
|
147
|
+
updatedAt: string;
|
|
148
|
+
/**Whether the workflow is published. */
|
|
149
|
+
published: boolean;
|
|
120
150
|
}
|
|
121
151
|
/** The payload for creating a public workflow for the linked account. */
|
|
122
152
|
export interface PublicWorkflowPayload {
|
|
@@ -134,6 +164,13 @@ interface PaginationProps {
|
|
|
134
164
|
page?: number;
|
|
135
165
|
limit?: number;
|
|
136
166
|
}
|
|
167
|
+
interface PaginatedResponse<T> {
|
|
168
|
+
docs: T[];
|
|
169
|
+
totalDocs: number;
|
|
170
|
+
limit: number;
|
|
171
|
+
totalPages: number;
|
|
172
|
+
page: number;
|
|
173
|
+
}
|
|
137
174
|
export interface Config {
|
|
138
175
|
slug: string;
|
|
139
176
|
config_id?: string;
|
|
@@ -165,6 +202,12 @@ export interface ConfigField {
|
|
|
165
202
|
required?: boolean;
|
|
166
203
|
hidden?: boolean;
|
|
167
204
|
value?: any;
|
|
205
|
+
/** The placeholder for the field. */
|
|
206
|
+
placeholder?: string;
|
|
207
|
+
/** The help text for the field. */
|
|
208
|
+
help_text?: string;
|
|
209
|
+
/** The page this field is associated with. */
|
|
210
|
+
associated_page?: string;
|
|
168
211
|
}
|
|
169
212
|
export interface ConfigWorkflow {
|
|
170
213
|
id: string;
|
|
@@ -173,6 +216,40 @@ export interface ConfigWorkflow {
|
|
|
173
216
|
enabled: boolean;
|
|
174
217
|
fields?: ConfigField[];
|
|
175
218
|
}
|
|
219
|
+
export interface Execution {
|
|
220
|
+
_id: string;
|
|
221
|
+
id?: string;
|
|
222
|
+
name: string;
|
|
223
|
+
org_id: string;
|
|
224
|
+
associated_application: {
|
|
225
|
+
_id: string;
|
|
226
|
+
name: string;
|
|
227
|
+
icon?: string;
|
|
228
|
+
};
|
|
229
|
+
status: "COMPLETED" | "RUNNING" | "ERRORED" | "STOPPED" | "STOPPING" | "TIMED_OUT";
|
|
230
|
+
associated_workflow: {
|
|
231
|
+
_id: string;
|
|
232
|
+
name: string;
|
|
233
|
+
};
|
|
234
|
+
associated_trigger_application: {
|
|
235
|
+
_id: string;
|
|
236
|
+
name: string;
|
|
237
|
+
icon?: string;
|
|
238
|
+
app_type?: "custom" | string;
|
|
239
|
+
origin_trigger: {
|
|
240
|
+
_id: string;
|
|
241
|
+
name: string;
|
|
242
|
+
};
|
|
243
|
+
};
|
|
244
|
+
trigger_application_event?: string;
|
|
245
|
+
linked_account_id: string;
|
|
246
|
+
environment: "test" | "production";
|
|
247
|
+
config_id: string;
|
|
248
|
+
associated_event_id: string;
|
|
249
|
+
custom_trigger_id?: string;
|
|
250
|
+
custom_application_id?: string;
|
|
251
|
+
createdAt: string;
|
|
252
|
+
}
|
|
176
253
|
declare class Cobalt {
|
|
177
254
|
private baseUrl;
|
|
178
255
|
token: string;
|
|
@@ -208,7 +285,7 @@ declare class Cobalt {
|
|
|
208
285
|
*/
|
|
209
286
|
getApp(slug: string): Promise<Application>;
|
|
210
287
|
/**
|
|
211
|
-
* Returns all the enabled
|
|
288
|
+
* Returns all the enabled apps.
|
|
212
289
|
* @returns {Promise<Application[]>} The list of applications.
|
|
213
290
|
*/
|
|
214
291
|
getApps(): Promise<Application[]>;
|
|
@@ -277,6 +354,7 @@ declare class Cobalt {
|
|
|
277
354
|
*/
|
|
278
355
|
deleteConfig(slug: string, configId?: string): Promise<unknown>;
|
|
279
356
|
/**
|
|
357
|
+
* @deprecated
|
|
280
358
|
* Create a lead for an ecosystem app.
|
|
281
359
|
* @param {EcosystemLeadPayload} payload The payload object for the lead.
|
|
282
360
|
* @returns {Promise<EcosystemLead>}
|
|
@@ -317,14 +395,14 @@ declare class Cobalt {
|
|
|
317
395
|
*/
|
|
318
396
|
getFieldOptions(lhs: string, slug: string, fieldId: string, workflowId?: string): Promise<RuleOptions>;
|
|
319
397
|
/**
|
|
320
|
-
*
|
|
398
|
+
* Returns the private workflows for the specified application.
|
|
321
399
|
* @param {Object} params
|
|
322
400
|
* @param {String} [params.slug]
|
|
323
401
|
* @param {Number} [params.page]
|
|
324
402
|
* @param {Number} [params.limit]
|
|
325
403
|
* @returns
|
|
326
404
|
*/
|
|
327
|
-
getWorkflows(params?: PublicWorkflowsPayload): Promise<PublicWorkflow
|
|
405
|
+
getWorkflows(params?: PublicWorkflowsPayload): Promise<PaginatedResponse<PublicWorkflow>>;
|
|
328
406
|
/**
|
|
329
407
|
* Create a public workflow for the linked account.
|
|
330
408
|
* @param {Object} params
|
|
@@ -341,5 +419,19 @@ declare class Cobalt {
|
|
|
341
419
|
* @returns {Promise<unknown>}
|
|
342
420
|
*/
|
|
343
421
|
deleteWorkflow(workflowId: string): Promise<unknown>;
|
|
422
|
+
/**
|
|
423
|
+
* Returns the workflow execution logs for the linked account.
|
|
424
|
+
* @param {Object} [params]
|
|
425
|
+
* @param {Number} [params.page]
|
|
426
|
+
* @param {Number} [params.limit]
|
|
427
|
+
* @returns {Promise<PaginatedResponse<Execution>>} The paginated workflow execution logs.
|
|
428
|
+
*/
|
|
429
|
+
getExecutions({ page, limit }?: PaginationProps): Promise<PaginatedResponse<Execution>>;
|
|
430
|
+
/**
|
|
431
|
+
* Returns the specified workflow execution log.
|
|
432
|
+
* @param {String} executionId The execution ID.
|
|
433
|
+
* @returns {Promise<Execution>} The specified execution log.
|
|
434
|
+
*/
|
|
435
|
+
getExecution(executionId: string): Promise<Execution>;
|
|
344
436
|
}
|
|
345
437
|
export { Cobalt };
|
package/cobalt.js
CHANGED
|
@@ -94,12 +94,12 @@ class Cobalt {
|
|
|
94
94
|
});
|
|
95
95
|
}
|
|
96
96
|
/**
|
|
97
|
-
* Returns all the enabled
|
|
97
|
+
* Returns all the enabled apps.
|
|
98
98
|
* @returns {Promise<Application[]>} The list of applications.
|
|
99
99
|
*/
|
|
100
100
|
getApps() {
|
|
101
101
|
return __awaiter(this, void 0, void 0, function* () {
|
|
102
|
-
const res = yield fetch(`${this.baseUrl}/api/v2/f-sdk/application
|
|
102
|
+
const res = yield fetch(`${this.baseUrl}/api/v2/f-sdk/application`, {
|
|
103
103
|
headers: {
|
|
104
104
|
authorization: `Bearer ${this.token}`,
|
|
105
105
|
},
|
|
@@ -346,6 +346,7 @@ class Cobalt {
|
|
|
346
346
|
});
|
|
347
347
|
}
|
|
348
348
|
/**
|
|
349
|
+
* @deprecated
|
|
349
350
|
* Create a lead for an ecosystem app.
|
|
350
351
|
* @param {EcosystemLeadPayload} payload The payload object for the lead.
|
|
351
352
|
* @returns {Promise<EcosystemLead>}
|
|
@@ -467,7 +468,7 @@ class Cobalt {
|
|
|
467
468
|
});
|
|
468
469
|
}
|
|
469
470
|
/**
|
|
470
|
-
*
|
|
471
|
+
* Returns the private workflows for the specified application.
|
|
471
472
|
* @param {Object} params
|
|
472
473
|
* @param {String} [params.slug]
|
|
473
474
|
* @param {Number} [params.page]
|
|
@@ -498,6 +499,7 @@ class Cobalt {
|
|
|
498
499
|
* @returns {Promise<PublicWorkflow>} The created public workflow.
|
|
499
500
|
*/
|
|
500
501
|
createWorkflow(params) {
|
|
502
|
+
var _a;
|
|
501
503
|
return __awaiter(this, void 0, void 0, function* () {
|
|
502
504
|
const res = yield fetch(`${this.baseUrl}/api/v2/public/workflow`, {
|
|
503
505
|
method: "POST",
|
|
@@ -515,7 +517,8 @@ class Cobalt {
|
|
|
515
517
|
const error = yield res.json();
|
|
516
518
|
throw error;
|
|
517
519
|
}
|
|
518
|
-
|
|
520
|
+
const data = yield res.json();
|
|
521
|
+
return (_a = data === null || data === void 0 ? void 0 : data.workflow) !== null && _a !== void 0 ? _a : data;
|
|
519
522
|
});
|
|
520
523
|
}
|
|
521
524
|
/**
|
|
@@ -538,5 +541,45 @@ class Cobalt {
|
|
|
538
541
|
return yield res.json();
|
|
539
542
|
});
|
|
540
543
|
}
|
|
544
|
+
/**
|
|
545
|
+
* Returns the workflow execution logs for the linked account.
|
|
546
|
+
* @param {Object} [params]
|
|
547
|
+
* @param {Number} [params.page]
|
|
548
|
+
* @param {Number} [params.limit]
|
|
549
|
+
* @returns {Promise<PaginatedResponse<Execution>>} The paginated workflow execution logs.
|
|
550
|
+
*/
|
|
551
|
+
getExecutions({ page = 1, limit = 10 } = {}) {
|
|
552
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
553
|
+
const res = yield fetch(`${this.baseUrl}/api/v2/public/execution?page=${page}&limit=${limit}`, {
|
|
554
|
+
headers: {
|
|
555
|
+
authorization: `Bearer ${this.token}`,
|
|
556
|
+
},
|
|
557
|
+
});
|
|
558
|
+
if (res.status >= 400 && res.status < 600) {
|
|
559
|
+
const error = yield res.json();
|
|
560
|
+
throw error;
|
|
561
|
+
}
|
|
562
|
+
return yield res.json();
|
|
563
|
+
});
|
|
564
|
+
}
|
|
565
|
+
/**
|
|
566
|
+
* Returns the specified workflow execution log.
|
|
567
|
+
* @param {String} executionId The execution ID.
|
|
568
|
+
* @returns {Promise<Execution>} The specified execution log.
|
|
569
|
+
*/
|
|
570
|
+
getExecution(executionId) {
|
|
571
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
572
|
+
const res = yield fetch(`${this.baseUrl}/api/v2/public/execution/${executionId}`, {
|
|
573
|
+
headers: {
|
|
574
|
+
authorization: `Bearer ${this.token}`,
|
|
575
|
+
},
|
|
576
|
+
});
|
|
577
|
+
if (res.status >= 400 && res.status < 600) {
|
|
578
|
+
const error = yield res.json();
|
|
579
|
+
throw error;
|
|
580
|
+
}
|
|
581
|
+
return yield res.json();
|
|
582
|
+
});
|
|
583
|
+
}
|
|
541
584
|
}
|
|
542
585
|
exports.Cobalt = Cobalt;
|
package/cobalt.ts
CHANGED
|
@@ -4,16 +4,21 @@
|
|
|
4
4
|
|
|
5
5
|
/** An application in Cobalt. */
|
|
6
6
|
export interface Application {
|
|
7
|
+
/** Application ID */
|
|
8
|
+
app_id: string;
|
|
7
9
|
/**The application name. */
|
|
8
10
|
name: string;
|
|
9
11
|
/**The application description. */
|
|
10
12
|
description: string;
|
|
11
13
|
/**The application icon. */
|
|
12
14
|
icon: string;
|
|
13
|
-
/**
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
/**
|
|
16
|
+
* @deprecated Use `slug` instead.
|
|
17
|
+
* The application slug for native apps and `custom` for custom apps.
|
|
18
|
+
*/
|
|
19
|
+
type: string | "custom";
|
|
20
|
+
/** The application slug. */
|
|
21
|
+
slug: string;
|
|
17
22
|
/**The type of auth used by application. */
|
|
18
23
|
auth_type: "oauth2" | "keybased";
|
|
19
24
|
/** Whether the user has connected the application. */
|
|
@@ -22,6 +27,8 @@ export interface Application {
|
|
|
22
27
|
reauth_required?: boolean;
|
|
23
28
|
/** The fields required from the user to connect the application (for `keybased` auth type). */
|
|
24
29
|
auth_input_map?: InputField[];
|
|
30
|
+
/** The categories/tags for the application. */
|
|
31
|
+
tags?: string[];
|
|
25
32
|
}
|
|
26
33
|
|
|
27
34
|
/** An Input field to take input from the user. */
|
|
@@ -32,10 +39,19 @@ export interface InputField {
|
|
|
32
39
|
type: string;
|
|
33
40
|
/** Whether the field is required. */
|
|
34
41
|
required: boolean;
|
|
42
|
+
/** Whether the field accepts multiple values. */
|
|
43
|
+
multiple?: boolean;
|
|
35
44
|
/** The placeholder of the field. */
|
|
36
45
|
placeholder: string;
|
|
37
46
|
/** The label of the field. */
|
|
38
47
|
label: string;
|
|
48
|
+
/** The help text for the field. */
|
|
49
|
+
help_text?: string;
|
|
50
|
+
/** The options for the field. */
|
|
51
|
+
options?: {
|
|
52
|
+
name?: string;
|
|
53
|
+
value: string;
|
|
54
|
+
}[];
|
|
39
55
|
}
|
|
40
56
|
|
|
41
57
|
/** The payload object for config. */
|
|
@@ -85,6 +101,9 @@ export interface CobaltOptions {
|
|
|
85
101
|
token?: string;
|
|
86
102
|
}
|
|
87
103
|
|
|
104
|
+
/**
|
|
105
|
+
* @deprecated
|
|
106
|
+
*/
|
|
88
107
|
export interface EcosystemLead {
|
|
89
108
|
_id: string;
|
|
90
109
|
name?: string;
|
|
@@ -93,6 +112,9 @@ export interface EcosystemLead {
|
|
|
93
112
|
created_at: string;
|
|
94
113
|
}
|
|
95
114
|
|
|
115
|
+
/**
|
|
116
|
+
* @deprecated
|
|
117
|
+
*/
|
|
96
118
|
export interface EcosystemLeadPayload {
|
|
97
119
|
slug: string;
|
|
98
120
|
name?: string;
|
|
@@ -128,6 +150,14 @@ export interface PublicWorkflow {
|
|
|
128
150
|
name: string;
|
|
129
151
|
/**The workflow description. */
|
|
130
152
|
description?: string;
|
|
153
|
+
/**The application's slug in which this workflow exists. */
|
|
154
|
+
slug?: string;
|
|
155
|
+
/**The workflow created at. */
|
|
156
|
+
createdAt: string;
|
|
157
|
+
/**The workflow updated at. */
|
|
158
|
+
updatedAt: string;
|
|
159
|
+
/**Whether the workflow is published. */
|
|
160
|
+
published: boolean;
|
|
131
161
|
}
|
|
132
162
|
|
|
133
163
|
/** The payload for creating a public workflow for the linked account. */
|
|
@@ -149,6 +179,14 @@ interface PaginationProps {
|
|
|
149
179
|
limit?: number;
|
|
150
180
|
}
|
|
151
181
|
|
|
182
|
+
interface PaginatedResponse<T> {
|
|
183
|
+
docs: T[];
|
|
184
|
+
totalDocs: number;
|
|
185
|
+
limit: number;
|
|
186
|
+
totalPages: number;
|
|
187
|
+
page: number;
|
|
188
|
+
}
|
|
189
|
+
|
|
152
190
|
export interface Config {
|
|
153
191
|
slug: string;
|
|
154
192
|
config_id?: string;
|
|
@@ -181,6 +219,12 @@ export interface ConfigField {
|
|
|
181
219
|
required?: boolean;
|
|
182
220
|
hidden?: boolean;
|
|
183
221
|
value?: any;
|
|
222
|
+
/** The placeholder for the field. */
|
|
223
|
+
placeholder?: string;
|
|
224
|
+
/** The help text for the field. */
|
|
225
|
+
help_text?: string;
|
|
226
|
+
/** The page this field is associated with. */
|
|
227
|
+
associated_page?: string;
|
|
184
228
|
}
|
|
185
229
|
|
|
186
230
|
export interface ConfigWorkflow {
|
|
@@ -191,6 +235,41 @@ export interface ConfigWorkflow {
|
|
|
191
235
|
fields?: ConfigField[];
|
|
192
236
|
}
|
|
193
237
|
|
|
238
|
+
export interface Execution {
|
|
239
|
+
_id: string;
|
|
240
|
+
id?: string;
|
|
241
|
+
name: string;
|
|
242
|
+
org_id: string;
|
|
243
|
+
associated_application: {
|
|
244
|
+
_id: string;
|
|
245
|
+
name: string;
|
|
246
|
+
icon?: string;
|
|
247
|
+
},
|
|
248
|
+
status: "COMPLETED" | "RUNNING" | "ERRORED" | "STOPPED" | "STOPPING" | "TIMED_OUT",
|
|
249
|
+
associated_workflow: {
|
|
250
|
+
_id: string;
|
|
251
|
+
name: string;
|
|
252
|
+
},
|
|
253
|
+
associated_trigger_application: {
|
|
254
|
+
_id: string;
|
|
255
|
+
name: string;
|
|
256
|
+
icon?: string;
|
|
257
|
+
app_type?: "custom" | string;
|
|
258
|
+
origin_trigger: {
|
|
259
|
+
_id: string;
|
|
260
|
+
name: string;
|
|
261
|
+
}
|
|
262
|
+
},
|
|
263
|
+
trigger_application_event?: string;
|
|
264
|
+
linked_account_id: string;
|
|
265
|
+
environment: "test" | "production";
|
|
266
|
+
config_id: string;
|
|
267
|
+
associated_event_id: string;
|
|
268
|
+
custom_trigger_id?: string;
|
|
269
|
+
custom_application_id?: string;
|
|
270
|
+
createdAt: string;
|
|
271
|
+
}
|
|
272
|
+
|
|
194
273
|
type Field = any;
|
|
195
274
|
|
|
196
275
|
class Cobalt {
|
|
@@ -295,11 +374,11 @@ class Cobalt {
|
|
|
295
374
|
}
|
|
296
375
|
|
|
297
376
|
/**
|
|
298
|
-
* Returns all the enabled
|
|
377
|
+
* Returns all the enabled apps.
|
|
299
378
|
* @returns {Promise<Application[]>} The list of applications.
|
|
300
379
|
*/
|
|
301
380
|
public async getApps(): Promise<Application[]> {
|
|
302
|
-
const res = await fetch(`${this.baseUrl}/api/v2/f-sdk/application
|
|
381
|
+
const res = await fetch(`${this.baseUrl}/api/v2/f-sdk/application`, {
|
|
303
382
|
headers: {
|
|
304
383
|
authorization: `Bearer ${this.token}`,
|
|
305
384
|
},
|
|
@@ -558,6 +637,7 @@ class Cobalt {
|
|
|
558
637
|
}
|
|
559
638
|
|
|
560
639
|
/**
|
|
640
|
+
* @deprecated
|
|
561
641
|
* Create a lead for an ecosystem app.
|
|
562
642
|
* @param {EcosystemLeadPayload} payload The payload object for the lead.
|
|
563
643
|
* @returns {Promise<EcosystemLead>}
|
|
@@ -684,14 +764,14 @@ class Cobalt {
|
|
|
684
764
|
}
|
|
685
765
|
|
|
686
766
|
/**
|
|
687
|
-
*
|
|
767
|
+
* Returns the private workflows for the specified application.
|
|
688
768
|
* @param {Object} params
|
|
689
769
|
* @param {String} [params.slug]
|
|
690
770
|
* @param {Number} [params.page]
|
|
691
771
|
* @param {Number} [params.limit]
|
|
692
772
|
* @returns
|
|
693
773
|
*/
|
|
694
|
-
async getWorkflows(params?: PublicWorkflowsPayload): Promise<PublicWorkflow
|
|
774
|
+
async getWorkflows(params?: PublicWorkflowsPayload): Promise<PaginatedResponse<PublicWorkflow>> {
|
|
695
775
|
const res = await fetch(`${this.baseUrl}/api/v2/public/workflow?page=${params?.page || 1}&limit=${params?.limit || 100}${params?.slug ? `&slug=${params.slug}` : ""}`, {
|
|
696
776
|
headers: {
|
|
697
777
|
authorization: `Bearer ${this.token}`,
|
|
@@ -734,7 +814,8 @@ class Cobalt {
|
|
|
734
814
|
throw error;
|
|
735
815
|
}
|
|
736
816
|
|
|
737
|
-
|
|
817
|
+
const data = await res.json();
|
|
818
|
+
return data?.workflow ?? data;
|
|
738
819
|
}
|
|
739
820
|
|
|
740
821
|
/**
|
|
@@ -757,6 +838,48 @@ class Cobalt {
|
|
|
757
838
|
|
|
758
839
|
return await res.json();
|
|
759
840
|
}
|
|
841
|
+
|
|
842
|
+
/**
|
|
843
|
+
* Returns the workflow execution logs for the linked account.
|
|
844
|
+
* @param {Object} [params]
|
|
845
|
+
* @param {Number} [params.page]
|
|
846
|
+
* @param {Number} [params.limit]
|
|
847
|
+
* @returns {Promise<PaginatedResponse<Execution>>} The paginated workflow execution logs.
|
|
848
|
+
*/
|
|
849
|
+
async getExecutions({ page = 1, limit = 10 }: PaginationProps = {}): Promise<PaginatedResponse<Execution>> {
|
|
850
|
+
const res = await fetch(`${this.baseUrl}/api/v2/public/execution?page=${page}&limit=${limit}`, {
|
|
851
|
+
headers: {
|
|
852
|
+
authorization: `Bearer ${this.token}`,
|
|
853
|
+
},
|
|
854
|
+
});
|
|
855
|
+
|
|
856
|
+
if (res.status >= 400 && res.status < 600) {
|
|
857
|
+
const error = await res.json();
|
|
858
|
+
throw error;
|
|
859
|
+
}
|
|
860
|
+
|
|
861
|
+
return await res.json();
|
|
862
|
+
}
|
|
863
|
+
|
|
864
|
+
/**
|
|
865
|
+
* Returns the specified workflow execution log.
|
|
866
|
+
* @param {String} executionId The execution ID.
|
|
867
|
+
* @returns {Promise<Execution>} The specified execution log.
|
|
868
|
+
*/
|
|
869
|
+
async getExecution(executionId: string): Promise<Execution> {
|
|
870
|
+
const res = await fetch(`${this.baseUrl}/api/v2/public/execution/${executionId}`, {
|
|
871
|
+
headers: {
|
|
872
|
+
authorization: `Bearer ${this.token}`,
|
|
873
|
+
},
|
|
874
|
+
});
|
|
875
|
+
|
|
876
|
+
if (res.status >= 400 && res.status < 600) {
|
|
877
|
+
const error = await res.json();
|
|
878
|
+
throw error;
|
|
879
|
+
}
|
|
880
|
+
|
|
881
|
+
return await res.json();
|
|
882
|
+
}
|
|
760
883
|
}
|
|
761
884
|
|
|
762
885
|
export { Cobalt };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
window.navigationData = "
|
|
1
|
+
window.navigationData = "eJyVk9FKwzAUht/lXBeHA0V6J6IgDByCeCFepMmpC8uS0JzihvjuslW3FpOT7Lb/939pTpK3LyDcEtRw5xphCCrwglZQgzQiBAyz4fvFijYGKlhrq6C+nN98V8fmrfdGS0Ha2VNdW8KuFRLDbJRPNfOr65FmWOjJ77kQFU0IXmVb/ZFw7KN8+UGjUYzhkOc1S7EzTnCiXyKvenXdujXuk3H9IZzsXrqwC4SbBSb+a0L8U1XDzYAaFPoOpSBUkPJz24+B56+2Rdknb94x5QbyaH1P6eM+xZxkIRo00f4h4arLvjFasqc7Rcpl3PijZLk6lLtDgfy5N8g9/VHOaV68EoT5pxfhOG3JPLOTfP8BOa3d9A=="
|
package/docs/assets/search.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
window.searchData = "
|
|
1
|
+
window.searchData = "eJytnduO4zYSht9Ffet0TIqkqL4LgiwQIMAGC+zuhTFoeGylx4ja9tryTILBvPuCOlhVZJEqyXM1gxZZPw8fi6WiLH3NLqcv1+xl8zX783DcZy9C2lV23L5X2Uv28+njtm6yVXa71NlLtqu312t1/bH78/On5r3OVsNfs5cs+7YarGgh71Z2p+O1udx2zemSMvWEywGzq+y8vVTHZmzRKCTWUt2VmtOf1TGpMZRgWpdrZWE//ji8TXWhK7LQ/rHaJYf7aSyzSOFSbZvql93p+ve1qd5/q7b7tFpbvhrK11355cr/PV3+/KM+fWGIfhmLLtHbV3XVVD9Pz1hX8KF5g1r/OFR1ekyh4B996eWqrBHtij46oocrB1BUbInOW9X8dD4nNd6qZtsWWW7/yhC4LldggPdWNQ9Rd1eZRu4u9Qhvd73Jodvdiy3U+eWvandrDqe0K3+rmgoUfFRrslsVLLlQrZ2rf55Zeu1knc4PKg4OYlLuCyi4ROt23m9ZHrcr+BD7UGsafyg4dwVocxf96XyuD7st4vJwbKrLH9tddf0RXE5GRihg2Z7Pr4c9x9zTvSjddNi6mNit+fR6OJ5vzev79swT9as8Jt78fa74un3pxZL9PlTxxheWXiy5r667y+HMZeQJl18se9g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