@or-sdk/flows 2.7.2-beta.4026.0 → 2.7.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/CHANGELOG.md +9 -0
- package/dist/types/Flows.d.ts +309 -5
- package/dist/types/Flows.d.ts.map +1 -1
- package/dist/types/types/base.d.ts +43 -0
- package/dist/types/types/base.d.ts.map +1 -1
- package/dist/types/types/flows.d.ts +8 -0
- package/dist/types/types/flows.d.ts.map +1 -1
- package/dist/types/types/step-templates.d.ts +21 -0
- package/dist/types/types/step-templates.d.ts.map +1 -1
- package/dist/types/utils/deleteUnusedStepTemplates.d.ts +8 -1
- package/dist/types/utils/deleteUnusedStepTemplates.d.ts.map +1 -1
- package/dist/types/utils/index.d.ts +3 -0
- package/dist/types/utils/index.d.ts.map +1 -1
- package/package.json +3 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,15 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [2.7.2](https://gitlab.internal.onereach.io/onereach/platform/or-sdk-next/compare/@or-sdk/flows@2.7.1...@or-sdk/flows@2.7.2) (2026-03-02)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **flows:** saving big flow ([0a4e5f3](https://gitlab.internal.onereach.io/onereach/platform/or-sdk-next/commit/0a4e5f3064589c1b24d3978f4953252fe77110d2))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
6
15
|
## [2.7.1](https://gitlab.internal.onereach.io/onereach/platform/or-sdk-next/compare/@or-sdk/flows@2.7.0...@or-sdk/flows@2.7.1) (2026-02-25)
|
|
7
16
|
|
|
8
17
|
**Note:** Version bump only for package @or-sdk/flows
|
package/dist/types/Flows.d.ts
CHANGED
|
@@ -4,26 +4,330 @@ export declare class Flows implements Taggable<Flow> {
|
|
|
4
4
|
private readonly dataHubSvc;
|
|
5
5
|
private readonly tags;
|
|
6
6
|
private readonly files;
|
|
7
|
+
/** Service-Discovery API allows to fetch URLs for required services automatically on bootstrap */
|
|
7
8
|
constructor(params: FlowsConfigWithDiscovery);
|
|
9
|
+
/** Providing URLs for APIs explicitly allows to reduce initial delay by avoiding extra calls to discovery service */
|
|
8
10
|
constructor(params: FlowsConfigWithExplicitUrls);
|
|
11
|
+
/**
|
|
12
|
+
* List flows
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```typescript
|
|
16
|
+
* const flowsList = await flows.listFlows();
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
9
19
|
listFlows(params?: ListFlowsParams, paginationOptions?: PaginationOptions): Promise<List<Flow>>;
|
|
20
|
+
/**
|
|
21
|
+
* Fetch flow by id
|
|
22
|
+
*
|
|
23
|
+
* Supports cross-account logic (with super-admin token).
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* ```typescript
|
|
27
|
+
* const flow = await flows.getFlow('<flow-id>');
|
|
28
|
+
* ```
|
|
29
|
+
*/
|
|
10
30
|
getFlow(id: string, params?: GetFlowParams): Promise<Flow>;
|
|
31
|
+
/**
|
|
32
|
+
* Save flow
|
|
33
|
+
*
|
|
34
|
+
* If source contains existing id - existing flow will be updated.
|
|
35
|
+
*
|
|
36
|
+
* Supports cross-account logic (with super-admin token).
|
|
37
|
+
*
|
|
38
|
+
* @example
|
|
39
|
+
* ```typescript
|
|
40
|
+
* const savedFlow = await flows.saveFlow(flowSource);
|
|
41
|
+
* ```
|
|
42
|
+
*/
|
|
11
43
|
saveFlow(source: Flow, options?: SaveFlowOptions): Promise<Flow>;
|
|
12
|
-
|
|
44
|
+
/**
|
|
45
|
+
* Delete flow
|
|
46
|
+
*
|
|
47
|
+
* Supports cross-account logic (with super-admin token).
|
|
48
|
+
*
|
|
49
|
+
* @example Delete flow by id
|
|
50
|
+
* ```typescript
|
|
51
|
+
* await flows.deleteFlow('<flow-id>');
|
|
52
|
+
* ```
|
|
53
|
+
|
|
54
|
+
* @example Delete flow by flow source
|
|
55
|
+
* ```typescript
|
|
56
|
+
* await flows.deleteFlow(flowSource);
|
|
57
|
+
* ```
|
|
58
|
+
*/
|
|
59
|
+
deleteFlow(
|
|
60
|
+
/** Either id of the flow to delete, or flow object of the flow to delete */
|
|
61
|
+
flowId: string | Flow,
|
|
62
|
+
/** If `true` flow would be deleted in trash.Default `true` */
|
|
63
|
+
temporarily?: boolean): Promise<void>;
|
|
64
|
+
/**
|
|
65
|
+
* Recover flow
|
|
66
|
+
*
|
|
67
|
+
* Supports cross-account logic (with super-admin token)
|
|
68
|
+
*
|
|
69
|
+
* @example
|
|
70
|
+
* ```typescript
|
|
71
|
+
* await flows.recoverFlow('<flow-id>');
|
|
72
|
+
* ```
|
|
73
|
+
*/
|
|
13
74
|
recoverFlow(flowId: string): Promise<void>;
|
|
14
|
-
|
|
15
|
-
|
|
75
|
+
/**
|
|
76
|
+
* Activates flow.
|
|
77
|
+
*
|
|
78
|
+
* Starts activation and polls progress. `progressCallback` is called on every polling
|
|
79
|
+
* while the activation is in 'pending' status.
|
|
80
|
+
*
|
|
81
|
+
* Supports cross-account logic (with super-admin token)
|
|
82
|
+
*
|
|
83
|
+
* The method is a convenience proxy of the same method from
|
|
84
|
+
* [@or-sdk/deployer](https://www.npmjs.com/package/@or-sdk/deployer).
|
|
85
|
+
*
|
|
86
|
+
* @example
|
|
87
|
+
* ```typescript
|
|
88
|
+
* const triggerList = await flows.activateFlow(flowSource, false, fnShowProgress);
|
|
89
|
+
* ```
|
|
90
|
+
*/
|
|
91
|
+
activateFlow(
|
|
92
|
+
/** Flow data object. SDK uses `id` and `data.deploy.role` properties from it. */
|
|
93
|
+
flowSource: Flow,
|
|
94
|
+
/** Flag to turn the debug mode on/off. `false` by default. */
|
|
95
|
+
interactiveDebug?: boolean,
|
|
96
|
+
/** Callback function to call with interim activation progress results. */
|
|
97
|
+
progressCallback?: (progress: PollingResultPending) => void,
|
|
98
|
+
/** Activation polling options */
|
|
99
|
+
pollingOptions?: PollingOptions): Promise<PollingResultActivateSuccess>;
|
|
100
|
+
/**
|
|
101
|
+
* Deactivates flow.
|
|
102
|
+
*
|
|
103
|
+
* Starts deactivation and polls progress. `progressCallback` is called on every polling
|
|
104
|
+
* while the deactivation is in 'pending' status.
|
|
105
|
+
*
|
|
106
|
+
* Supports cross-account logic (with super-admin token)
|
|
107
|
+
*
|
|
108
|
+
* The method is a convenience proxy of the same method from
|
|
109
|
+
* [@or-sdk/deployer](https://www.npmjs.com/package/@or-sdk/deployer).
|
|
110
|
+
*
|
|
111
|
+
* @example
|
|
112
|
+
* ```typescript
|
|
113
|
+
* const deactivatedFlowList = await flows.deactivateFlow(flowSource, fnShowProgress);
|
|
114
|
+
* ```
|
|
115
|
+
*/
|
|
116
|
+
deactivateFlow(
|
|
117
|
+
/** Flow data object. SDK uses `id` and `data.deploy.role` properties from it. */
|
|
118
|
+
flowSource: Flow,
|
|
119
|
+
/** Function to call with interim deactivation progress results. */
|
|
120
|
+
progressCallback?: (progress: PollingResultPending) => void,
|
|
121
|
+
/** Deactivation polling options */
|
|
122
|
+
pollingOptions?: PollingOptions): Promise<PollingResultDeactivateSuccess>;
|
|
123
|
+
/**
|
|
124
|
+
* Fetch single chunk of flow logs
|
|
125
|
+
*
|
|
126
|
+
* To fetch all log events for given time interval see {@link fetchAllFlowLogs}.
|
|
127
|
+
*
|
|
128
|
+
* Does not support cross-account fetching (with `accountId` in Deployer constructor).
|
|
129
|
+
*
|
|
130
|
+
* The method is a convenience proxy of the same method from
|
|
131
|
+
* [@or-sdk/deployer](https://www.npmjs.com/package/@or-sdk/deployer).
|
|
132
|
+
*
|
|
133
|
+
* @example Fetch latest chunk of logs for the flow:
|
|
134
|
+
* ```typescript
|
|
135
|
+
* const flows = new Flows({token: '<token>', discoveryUrl: '<discovery-api-url>'});
|
|
136
|
+
* const logs = await flows.fetchFlowLogsChunk({flowId: '<flow-id>'});
|
|
137
|
+
* ```
|
|
138
|
+
*
|
|
139
|
+
* @example Fetch two chunks of flow logs
|
|
140
|
+
* ```typescript
|
|
141
|
+
* const flows = new Flows({token: '<token>', discoveryUrl: '<discovery-api-url>'});
|
|
142
|
+
* const chunk1 = await flows.fetchFlowLogsChunk({flowId: '<flow-id>'});
|
|
143
|
+
* const chunk2 = await flows.fetchFlowLogsChunk({
|
|
144
|
+
* flowId: '<flow-id>',
|
|
145
|
+
* next: chunk1.nextToken,
|
|
146
|
+
* });
|
|
147
|
+
* ```
|
|
148
|
+
*
|
|
149
|
+
* @example Fetch chunk of logs starting from 1 hour ago till now:
|
|
150
|
+
* ```typescript
|
|
151
|
+
* const flows = new Flows({token: '<token>', discoveryUrl: '<discovery-api-url>'});
|
|
152
|
+
* const logs = await flows.fetchFlowLogsChunk({
|
|
153
|
+
* flowId: '<flow-id>',
|
|
154
|
+
* start: Date.now() - 60 * 60 * 1000, // 60 minutes ago
|
|
155
|
+
* });
|
|
156
|
+
* ```
|
|
157
|
+
*/
|
|
16
158
|
fetchFlowLogsChunk(params: FetchFlowLogsChunkParams): Promise<FlowLogsChunkResponse>;
|
|
159
|
+
/**
|
|
160
|
+
* Fetch all flow log events for a time interval
|
|
161
|
+
*
|
|
162
|
+
* To fetch only single chunk of log events see {@link fetchFlowLogsChunk}.
|
|
163
|
+
*
|
|
164
|
+
* Does not support cross-account fetching (with `accountId` in Deployer constructor).
|
|
165
|
+
*
|
|
166
|
+
* The method is a convenience proxy of the same method from
|
|
167
|
+
* [@or-sdk/deployer](https://www.npmjs.com/package/@or-sdk/deployer).
|
|
168
|
+
*
|
|
169
|
+
* @example Fetch latest logs for the flow:
|
|
170
|
+
* ```typescript
|
|
171
|
+
* const flows = new Flows({token: '<token>', discoveryUrl: '<discovery-api-url>'});
|
|
172
|
+
* const logs = await flows.fetchAllFlowLogs({flowId: '<flow-id>'});
|
|
173
|
+
* ```
|
|
174
|
+
*
|
|
175
|
+
* @example Fetch all logs starting from 1 hour ago till now:
|
|
176
|
+
* ```typescript
|
|
177
|
+
* const flows = new Flows({token: '<token>', discoveryUrl: '<discovery-api-url>'});
|
|
178
|
+
* const logs = await flows.fetchAllFlowLogs({
|
|
179
|
+
* flowId: '<flow-id>',
|
|
180
|
+
* start: Date.now() - 60 * 60 * 1000, // 60 minutes ago
|
|
181
|
+
* });
|
|
182
|
+
* ```
|
|
183
|
+
*/
|
|
17
184
|
fetchAllFlowLogs(params: FetchFlowLogsParams): Promise<FlowLogsResponse>;
|
|
185
|
+
/**
|
|
186
|
+
* List data outs
|
|
187
|
+
*
|
|
188
|
+
* Supports cross-account logic (with super-admin token)
|
|
189
|
+
*/
|
|
18
190
|
listDataOuts(paginationOptions?: PaginationOptions, params?: ListDataOutsParams): Promise<List<DataOut>>;
|
|
191
|
+
/**
|
|
192
|
+
* Add tags to flow
|
|
193
|
+
*
|
|
194
|
+
* Supports cross-account logic (with super-admin token)
|
|
195
|
+
*
|
|
196
|
+
* @example
|
|
197
|
+
* ```typescript
|
|
198
|
+
* const flow = await flows.addTags(flowSource, ['tag-name']);
|
|
199
|
+
* ```
|
|
200
|
+
*/
|
|
19
201
|
addTags(source: Flow, tagNames: string[]): Promise<Flow>;
|
|
202
|
+
/**
|
|
203
|
+
* Remove tags from flow
|
|
204
|
+
*
|
|
205
|
+
* Supports cross-account logic (with super-admin token)
|
|
206
|
+
*
|
|
207
|
+
* @example
|
|
208
|
+
* ```typescript
|
|
209
|
+
* const flow = await flows.removeTags(flowSource, ['tag-name']);
|
|
210
|
+
* ```
|
|
211
|
+
*/
|
|
20
212
|
removeTags(source: Flow, tagNames: string[]): Promise<Flow>;
|
|
21
|
-
|
|
213
|
+
/**
|
|
214
|
+
* Download flow template into Space (Bot)
|
|
215
|
+
*
|
|
216
|
+
* Supports cross-account logic (with super-admin token)
|
|
217
|
+
*
|
|
218
|
+
* @example
|
|
219
|
+
* ```typescript
|
|
220
|
+
* const result = await flows.downloadTemplate('<flow-template-id>', '<bot-id>');
|
|
221
|
+
* ```
|
|
222
|
+
*/
|
|
223
|
+
downloadTemplate(
|
|
224
|
+
/** Id of the flow template to download */
|
|
225
|
+
flowTemplateId: string,
|
|
226
|
+
/** Space id (bot id) */
|
|
227
|
+
botId: string,
|
|
228
|
+
/** If `true` update step templates to latest versions after download. Default `false`. */
|
|
229
|
+
shouldUpdateSteps?: boolean): Promise<DownloadTemplateResult>;
|
|
230
|
+
/**
|
|
231
|
+
* List unused step templates from flow source
|
|
232
|
+
*
|
|
233
|
+
* @example
|
|
234
|
+
* ```typescript
|
|
235
|
+
* const result = Flows.getUnusedStepTemplates(source);
|
|
236
|
+
* ```
|
|
237
|
+
*/
|
|
22
238
|
static listUnusedStepTemplates(source: Flow): StepTemplateRaw[];
|
|
23
|
-
|
|
239
|
+
/**
|
|
240
|
+
* Delete unused step templates from flow source
|
|
241
|
+
*
|
|
242
|
+
* Can delete specific templates passed as 2nd argument otherwise deletes all unused templates.
|
|
243
|
+
*
|
|
244
|
+
* @example
|
|
245
|
+
* ```typescript
|
|
246
|
+
* const result = Flows.deleteUnusedStepTemplates(source, unusedTemplatesArr);
|
|
247
|
+
* ```
|
|
248
|
+
*/
|
|
249
|
+
static deleteUnusedStepTemplates(
|
|
250
|
+
/** Flow source to delete unused step templates from */
|
|
251
|
+
source: Flow,
|
|
252
|
+
/** List of specific unused step templates to delete. If not set will delete all unused step templates. */
|
|
253
|
+
stepTemplates?: StepTemplateToDelete[]): Flow;
|
|
254
|
+
/**
|
|
255
|
+
* List account or library flows that have or don't have specific step templates.
|
|
256
|
+
*
|
|
257
|
+
* Response would not include deleted flows.
|
|
258
|
+
*
|
|
259
|
+
* @example search for flows in current account which do not have the step template
|
|
260
|
+
* ```typescript
|
|
261
|
+
* const result = await flows.listFlowsByStepTemplate({
|
|
262
|
+
* query: { id: '<step-template-id>' },
|
|
263
|
+
* includesStep: false,
|
|
264
|
+
* });
|
|
265
|
+
* ```
|
|
266
|
+
*
|
|
267
|
+
* @example List flow labels in the library that have step templates
|
|
268
|
+
* with labels that start with 'Wait' and were not published by OneReach
|
|
269
|
+
* ```typescript
|
|
270
|
+
* const result = await client.listFlowsByStepTemplate({
|
|
271
|
+
* query: {
|
|
272
|
+
* label: { startsWith: 'Wait' },
|
|
273
|
+
* publishedBy: { notILike: '%onereach%' },
|
|
274
|
+
* },
|
|
275
|
+
* projection: ['id', 'data.label'],
|
|
276
|
+
* sandbox: true,
|
|
277
|
+
* });
|
|
278
|
+
* ```
|
|
279
|
+
*/
|
|
24
280
|
listFlowsByStepTemplate(params: ListFlowsByStepTemplateParams): Promise<List<Flow>>;
|
|
281
|
+
/**
|
|
282
|
+
* Only for SUPER_ADMIN token.
|
|
283
|
+
*
|
|
284
|
+
* List flows that use specific step template. Runs globally across all accounts.
|
|
285
|
+
*
|
|
286
|
+
* Response might include deleted flows, check `isDeleted` field.
|
|
287
|
+
*
|
|
288
|
+
* @example Search what flows use specific step templates:
|
|
289
|
+
* ```typescript
|
|
290
|
+
* const result = await flows.listFlowsByStepTemplateGlobal({
|
|
291
|
+
* query: {
|
|
292
|
+
* id: ['<step-template-id-1>', '<step-template-id-2>']
|
|
293
|
+
* }
|
|
294
|
+
* });
|
|
295
|
+
* ```
|
|
296
|
+
*
|
|
297
|
+
* @example Search for flows that have step with versions '0.6.*' and return only flow ids and labels
|
|
298
|
+
* ```typescript
|
|
299
|
+
* const result = await client.listFlowsByStepTemplateGlobal({
|
|
300
|
+
* query: {
|
|
301
|
+
* id: '<step-template-id>',
|
|
302
|
+
* version: { like: '0.6.%' },
|
|
303
|
+
* },
|
|
304
|
+
* projection: ['id', 'accountId', 'botId', 'data.label'],
|
|
305
|
+
* });
|
|
306
|
+
* ```
|
|
307
|
+
*/
|
|
25
308
|
listFlowsByStepTemplateGlobal(params: ListFlowsByStepTemplateGlobalParams): Promise<List<Flow>>;
|
|
309
|
+
/**
|
|
310
|
+
* Only for SUPER_ADMIN token.
|
|
311
|
+
*
|
|
312
|
+
* List step templates in the flow (in any account)
|
|
313
|
+
*
|
|
314
|
+
* @example List step templates in the flow by flow id and return only specific fields
|
|
315
|
+
* ```typescript
|
|
316
|
+
* const result = await flows.listStepTemplateByFlowGlobal({
|
|
317
|
+
* id: '<flow-id>',
|
|
318
|
+
* projection: ['label','version','id','isSandbox','isExternal']
|
|
319
|
+
* });
|
|
320
|
+
* ```
|
|
321
|
+
*/
|
|
26
322
|
listStepTemplateByFlowGlobal(params: ListStepTemplateParams): Promise<List<StepTemplateRaw>>;
|
|
323
|
+
/**
|
|
324
|
+
* List categories for library flows
|
|
325
|
+
*
|
|
326
|
+
* @example
|
|
327
|
+
* ```typescript
|
|
328
|
+
* const categories = await flows.listFlowCategories();
|
|
329
|
+
* ```
|
|
330
|
+
*/
|
|
27
331
|
listFlowCategories(): Promise<FlowCategoriesResponse>;
|
|
28
332
|
private get crossAccountDataHubParams();
|
|
29
333
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Flows.d.ts","sourceRoot":"","sources":["../../src/Flows.ts"],"names":[],"mappings":"AAMA,OAAO,EACL,wBAAwB,EACxB,mBAAmB,EACnB,IAAI,EACJ,qBAAqB,EACrB,gBAAgB,EAChB,cAAc,EACd,4BAA4B,EAC5B,8BAA8B,EAC9B,oBAAoB,EACpB,eAAe,EACf,OAAO,EACP,sBAAsB,EACtB,sBAAsB,EACtB,aAAa,EACb,IAAI,EACJ,kBAAkB,EAClB,mCAAmC,EACnC,6BAA6B,EAC7B,eAAe,EACf,sBAAsB,EACtB,iBAAiB,EACjB,eAAe,EACf,oBAAoB,EACpB,QAAQ,EACR,wBAAwB,EACxB,2BAA2B,EAC5B,MAAM,eAAe,CAAC;AAGvB,qBAAa,KAAM,YAAW,QAAQ,CAAC,IAAI,CAAC;IAC1C,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAW;IACpC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAa;IACxC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAO;IAC5B,OAAO,CAAC,QA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M,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAgBxE;;;;;;;;;OASG;IACU,gBAAgB;IAC3B,0CAA0C;IAC1C,cAAc,EAAE,MAAM;IAEtB,wBAAwB;IACxB,KAAK,EAAE,MAAM;IAEb,0FAA0F;IAC1F,iBAAiB,UAAQ,GACxB,OAAO,CAAC,sBAAsB,CAAC;IAclC;;;;;;;OAOG;WACW,uBAAuB,CAAC,MAAM,EAAE,IAAI,GAAG,eAAe,EAAE;IAItE;;;;;;;;;OASG;WACW,yBAAyB;IACrC,uDAAuD;IACvD,MAAM,EAAE,IAAI;IAEZ,0GAA0G;IAC1G,aAAa,CAAC,EAAE,oBAAoB,EAAE,GACrC,IAAI;IAIP;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;IACU,uBAAuB,CAAC,MAAM,EAAE,6BAA6B,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAoBhG;;;;;;;;;;;;;;;;;;;;;;;;;;OA0BG;IACU,6BAA6B,CACxC,MAAM,EAAE,mCAAmC,GAC1C,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAoBtB;;;;;;;;;;;;OAYG;IACU,4BAA4B,CACvC,MAAM,EAAE,sBAAsB,GAC7B,OAAO,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;IAcjC;;;;;;;OAOG;IACU,kBAAkB,IAAI,OAAO,CAAC,sBAAsB,CAAC;IAOlE,OAAO,KAAK,yBAAyB,GAIpC;CACF"}
|
|
@@ -1,20 +1,63 @@
|
|
|
1
1
|
import type { Token } from '@or-sdk/base';
|
|
2
2
|
export type { Token };
|
|
3
3
|
export type FlowsConfigBase = {
|
|
4
|
+
/**
|
|
5
|
+
* OneReach authentication token
|
|
6
|
+
*/
|
|
4
7
|
token: Token;
|
|
8
|
+
/**
|
|
9
|
+
* Account id for cross-account requests (super admin only)
|
|
10
|
+
*/
|
|
5
11
|
accountId?: string;
|
|
12
|
+
/**
|
|
13
|
+
* Allows to define custom feature for using with DataHubSvc API
|
|
14
|
+
*/
|
|
6
15
|
feature?: string;
|
|
7
16
|
};
|
|
8
17
|
export type FlowsConfigWithDiscovery = FlowsConfigBase & {
|
|
18
|
+
/**
|
|
19
|
+
* URL of OneReach service discovery API.
|
|
20
|
+
*
|
|
21
|
+
* Allows to fetch URLs of needed API's instead of defining them in the constructor.
|
|
22
|
+
*/
|
|
9
23
|
discoveryUrl: string;
|
|
24
|
+
/**
|
|
25
|
+
* URL of OneReach DataHubSvc API.
|
|
26
|
+
*
|
|
27
|
+
* Not needed if {@link FlowsConfig.discoveryUrl} is defined.
|
|
28
|
+
*/
|
|
10
29
|
dataHubSvcUrl?: never;
|
|
30
|
+
/**
|
|
31
|
+
* URL of OneReach Deployer API.
|
|
32
|
+
*
|
|
33
|
+
* Not needed if {@link FlowsConfig.discoveryUrl} is defined.
|
|
34
|
+
*/
|
|
11
35
|
deployerUrl?: never;
|
|
36
|
+
/**
|
|
37
|
+
* URL of OneReach Files API.
|
|
38
|
+
*
|
|
39
|
+
* Not needed if {@link FlowsConfig.discoveryUrl} is defined.
|
|
40
|
+
*/
|
|
12
41
|
filesApiUrl?: never;
|
|
13
42
|
};
|
|
14
43
|
export type FlowsConfigWithExplicitUrls = FlowsConfigBase & {
|
|
44
|
+
/**
|
|
45
|
+
* URL of OneReach DataHubSvc API.
|
|
46
|
+
*/
|
|
15
47
|
dataHubSvcUrl: string;
|
|
48
|
+
/**
|
|
49
|
+
* URL of OneReach Deployer API.
|
|
50
|
+
*/
|
|
16
51
|
deployerUrl: string;
|
|
52
|
+
/**
|
|
53
|
+
* URL of OneReach Files API.
|
|
54
|
+
*/
|
|
17
55
|
filesApiUrl: string;
|
|
56
|
+
/**
|
|
57
|
+
* URL of OneReach service discovery API.
|
|
58
|
+
*
|
|
59
|
+
* Not needed if API URLs are explicitly defined.
|
|
60
|
+
*/
|
|
18
61
|
discoveryUrl?: never;
|
|
19
62
|
};
|
|
20
63
|
export type FlowsConfig = FlowsConfigWithDiscovery | FlowsConfigWithExplicitUrls;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../../src/types/base.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAE1C,YAAY,EAAE,KAAK,EAAE,CAAC;AAEtB,MAAM,MAAM,eAAe,GAAG;
|
|
1
|
+
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../../src/types/base.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAE1C,YAAY,EAAE,KAAK,EAAE,CAAC;AAEtB,MAAM,MAAM,eAAe,GAAG;IAC5B;;OAEG;IACH,KAAK,EAAE,KAAK,CAAC;IAEb;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAA;AAED,MAAM,MAAM,wBAAwB,GAAG,eAAe,GAAG;IACvD;;;;OAIG;IACH,YAAY,EAAE,MAAM,CAAC;IAErB;;;;OAIG;IACH,aAAa,CAAC,EAAE,KAAK,CAAC;IAEtB;;;;OAIG;IACH,WAAW,CAAC,EAAE,KAAK,CAAC;IAEpB;;;;OAIG;IACH,WAAW,CAAC,EAAE,KAAK,CAAC;CACrB,CAAA;AAED,MAAM,MAAM,2BAA2B,GAAG,eAAe,GAAG;IAC1D;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;;;OAIG;IACH,YAAY,CAAC,EAAE,KAAK,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG,wBAAwB,GAAG,2BAA2B,CAAC"}
|
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
import { FlowEntity, ModelAttributes, ModelWhereAttributes } from './services/data-hub-svc';
|
|
2
2
|
export type ListFlowsParams = {
|
|
3
|
+
/**
|
|
4
|
+
* Include deleted flows in result
|
|
5
|
+
* @default false
|
|
6
|
+
*/
|
|
3
7
|
includeDeleted?: boolean;
|
|
8
|
+
/**
|
|
9
|
+
* Include active (not deleted) flows in result
|
|
10
|
+
* @default true
|
|
11
|
+
*/
|
|
4
12
|
includeExisting?: boolean;
|
|
5
13
|
query?: ModelWhereAttributes<FlowEntity>;
|
|
6
14
|
includesStep?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flows.d.ts","sourceRoot":"","sources":["../../../src/types/flows.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAE5F,MAAM,MAAM,eAAe,GAAG;
|
|
1
|
+
{"version":3,"file":"flows.d.ts","sourceRoot":"","sources":["../../../src/types/flows.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAE5F,MAAM,MAAM,eAAe,GAAG;IAC5B;;;OAGG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IAEzB;;;OAGG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAE1B,KAAK,CAAC,EAAE,oBAAoB,CAAC,UAAU,CAAC,CAAC;IAEzC,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,UAAU,CAAC,EAAE;QACX,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;KACxB,CAAC;IAEF,UAAU,CAAC,EAAE,eAAe,CAAC,UAAU,CAAC,CAAC;IACzC,KAAK,CAAC,EAAE,KAAK,CAAC,MAAM,UAAU,CAAC,CAAC;IAChC,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG;IAC/B,KAAK,CAAC,EAAE;QACN,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;KACxB,CAAC;IACF,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG;IAC1B,KAAK,CAAC,EAAE;QACN,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;KACxB,CAAC;IACF,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,OAAO,GAAG;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,aAAa,EAAE,MAAM,CAAC;IACtB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG;IAC5B,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B,CAAC;AAEF,MAAM,MAAM,QAAQ,GAAG;IACrB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG;IACnC,UAAU,EAAE;QACV,IAAI,EAAE,MAAM,CAAC;KACd,EAAE,CAAA;CACJ,CAAC"}
|
|
@@ -14,18 +14,39 @@ export type DownloadTemplateResult = {
|
|
|
14
14
|
};
|
|
15
15
|
};
|
|
16
16
|
export type ListStepTemplateParams = {
|
|
17
|
+
/** Flow id */
|
|
17
18
|
id: string;
|
|
19
|
+
/**
|
|
20
|
+
* If set step template records will have only fields from this list
|
|
21
|
+
* (e.g. `['id', 'label', 'outputExample.custom']` )
|
|
22
|
+
*/
|
|
18
23
|
projection?: ModelAttributes<StepTemplateEntity>;
|
|
19
24
|
};
|
|
20
25
|
export type ListFlowsByStepTemplateParams = {
|
|
26
|
+
/** Search criteria for step templates */
|
|
21
27
|
query?: ModelWhereAttributes<StepTemplateEntity>;
|
|
28
|
+
/**
|
|
29
|
+
* If set flow records will have only fields from this list
|
|
30
|
+
* (e.g. `['id', 'data.label', 'data.deploy.role']` )
|
|
31
|
+
*/
|
|
22
32
|
projection?: ModelAttributes<FlowEntity>;
|
|
33
|
+
/**
|
|
34
|
+
* If `true` would return flows that have step template(s) found via query,
|
|
35
|
+
* otherwise flows that do not have them. Default `true`.
|
|
36
|
+
*/
|
|
23
37
|
includesStep?: boolean;
|
|
38
|
+
/** If `true` search for step templates in the library, otherwise in the current account. Default `false`. */
|
|
24
39
|
sandbox?: boolean;
|
|
25
40
|
};
|
|
26
41
|
export type ListFlowsByStepTemplateGlobalParams = {
|
|
42
|
+
/** Search criteria for step templates */
|
|
27
43
|
query: ModelWhereAttributes<Pick<StepTemplateEntity, 'id' | 'version'>>;
|
|
44
|
+
/**
|
|
45
|
+
* If set flow records will have only fields from this list
|
|
46
|
+
* (e.g. `['id', 'data.label', 'data.deploy.role']` )
|
|
47
|
+
*/
|
|
28
48
|
projection?: ModelAttributes<FlowEntity>;
|
|
49
|
+
/** If `true` would return flows that have stem template(s), otherwise flows that do not have them. Default `true`. */
|
|
29
50
|
includesStep?: boolean;
|
|
30
51
|
};
|
|
31
52
|
//# sourceMappingURL=step-templates.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"step-templates.d.ts","sourceRoot":"","sources":["../../../src/types/step-templates.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,kBAAkB,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAErH,MAAM,MAAM,iBAAiB,GAAG;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,E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AE,OAAO,CAAC;IAEvB,6GAA6G;IAC7G,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,mCAAmC,GAAG;IAChD,yCAAyC;IACzC,KAAK,EAAE,oBAAoB,CAAC,IAAI,CAAC,kBAAkB,EAAE,IAAI,GAAG,SAAS,CAAC,CAAC,CAAC;IAExE;;;OAGG;IACH,UAAU,CAAC,EAAE,eAAe,CAAC,UAAU,CAAC,CAAC;IAEzC,sHAAsH;IACtH,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB,CAAA"}
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
import type { Flow } from '@or-sdk/deployer';
|
|
2
2
|
import type { StepTemplateToDelete } from '../types';
|
|
3
|
-
|
|
3
|
+
/**
|
|
4
|
+
* Delete unused step templates from the flow source
|
|
5
|
+
*/
|
|
6
|
+
declare function deleteUnusedStepTemplates(
|
|
7
|
+
/** Flow source to delete unused step templates from */
|
|
8
|
+
source: Flow,
|
|
9
|
+
/** List of specific step templates to delete. If not set of empty array delete all unused step templates. */
|
|
10
|
+
stepTemplates?: StepTemplateToDelete[]): Flow;
|
|
4
11
|
export default deleteUnusedStepTemplates;
|
|
5
12
|
//# sourceMappingURL=deleteUnusedStepTemplates.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deleteUnusedStepTemplates.d.ts","sourceRoot":"","sources":["../../../src/utils/deleteUnusedStepTemplates.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAE7C,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"deleteUnusedStepTemplates.d.ts","sourceRoot":"","sources":["../../../src/utils/deleteUnusedStepTemplates.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAE7C,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAGrD;;GAEG;AACH,iBAAS,yBAAyB;AAChC,uDAAuD;AACvD,MAAM,EAAE,IAAI;AAEZ,6GAA6G;AAC7G,aAAa,CAAC,EAAE,oBAAoB,EAAE,GACrC,IAAI,CAkBN;AAED,eAAe,yBAAyB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,OAAO,IAAI,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAC/E,OAAO,EAAE,OAAO,IAAI,yBAAyB,EAAE,MAAM,6BAA6B,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@or-sdk/flows",
|
|
3
|
-
"version": "2.7.2
|
|
3
|
+
"version": "2.7.2",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"main": "dist/cjs/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -30,5 +30,6 @@
|
|
|
30
30
|
},
|
|
31
31
|
"publishConfig": {
|
|
32
32
|
"access": "public"
|
|
33
|
-
}
|
|
33
|
+
},
|
|
34
|
+
"gitHead": "bf599a2fadd6dfc1c2ec1db86772288ef6fb4bc4"
|
|
34
35
|
}
|