@posiwise/flows 0.0.2 → 0.0.3
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/fesm2022/posiwise-flows.mjs +1739 -684
- package/fesm2022/posiwise-flows.mjs.map +1 -1
- package/package.json +1 -1
- package/types/posiwise-flows.d.ts +545 -135
|
@@ -3,9 +3,9 @@ import { AfterViewChecked, AfterViewInit, ChangeDetectorRef, DestroyRef, Element
|
|
|
3
3
|
import * as i1 from "@angular/router";
|
|
4
4
|
import { LazyLoadEvent, MenuItem } from "primeng/api";
|
|
5
5
|
import { AppBaseComponent } from "@posiwise/app-base-component";
|
|
6
|
-
import * as
|
|
6
|
+
import * as i31 from "@posiwise/shared-components";
|
|
7
7
|
import { ConfirmDialogService } from "@posiwise/shared-components";
|
|
8
|
-
import * as
|
|
8
|
+
import * as i27 from "@angular/forms";
|
|
9
9
|
import { UntypedFormGroup } from "@angular/forms";
|
|
10
10
|
import { Paging } from "@posiwise/common-utilities";
|
|
11
11
|
import { ProductsHttpService } from "@posiwise/shared-product-services";
|
|
@@ -14,16 +14,17 @@ import { PermissionService, SubscriptionService } from "@posiwise/common-service
|
|
|
14
14
|
import { TranslocoService } from "@jsverse/transloco";
|
|
15
15
|
import { ClassicPreset, GetSchemes } from "rete";
|
|
16
16
|
import { IconDefinition } from "@fortawesome/fontawesome-svg-core";
|
|
17
|
-
import * as
|
|
18
|
-
import * as
|
|
19
|
-
import * as
|
|
20
|
-
import * as
|
|
21
|
-
import * as
|
|
22
|
-
import * as
|
|
23
|
-
import * as
|
|
24
|
-
import * as
|
|
25
|
-
import * as
|
|
26
|
-
import * as
|
|
17
|
+
import * as i26 from "@angular/common";
|
|
18
|
+
import * as i28 from "@posiwise/core-guards";
|
|
19
|
+
import * as i29 from "@posiwise/core-transloco";
|
|
20
|
+
import * as i30 from "@posiwise/app-loader";
|
|
21
|
+
import * as i32 from "@posiwise/pipes";
|
|
22
|
+
import * as i33 from "@fortawesome/angular-fontawesome";
|
|
23
|
+
import * as i34 from "primeng/iconfield";
|
|
24
|
+
import * as i35 from "primeng/inputicon";
|
|
25
|
+
import * as i36 from "primeng/autocomplete";
|
|
26
|
+
import * as i37 from "primeng/inputtext";
|
|
27
|
+
import * as i38 from "rete-angular-plugin/22";
|
|
27
28
|
declare namespace flows_private_routing_module_d_exports {
|
|
28
29
|
export { FlowsPrivateRoutingModule };
|
|
29
30
|
}
|
|
@@ -90,11 +91,28 @@ declare function flowWorkflowForm(): UntypedFormGroup;
|
|
|
90
91
|
declare function flowVersionBadgeClass(version: Pick<FlowVersion, 'published_at'>): string;
|
|
91
92
|
declare function flowWorkflowBadgeClass(status: FlowWorkflowStatus): string;
|
|
92
93
|
declare function flowVersionEditorTitleKey(version: FlowVersion | null, duplicateOf?: FlowVersion | null): string;
|
|
94
|
+
/** One finding of FlowGraphCheck on the server; `code` is stable, `message` is the English fallback. */
|
|
95
|
+
interface FlowGraphIssue {
|
|
96
|
+
code: string;
|
|
97
|
+
message: string;
|
|
98
|
+
/** Null for a problem with the graph as a whole. */
|
|
99
|
+
node_id: string | null;
|
|
100
|
+
/** The param it is about, when there is one. */
|
|
101
|
+
field?: string | null;
|
|
102
|
+
}
|
|
103
|
+
interface FlowGraphCheck {
|
|
104
|
+
/** False when publishing would be refused. */
|
|
105
|
+
valid: boolean;
|
|
106
|
+
errors: FlowGraphIssue[];
|
|
107
|
+
/** Allowed by publishing, but most likely not meant. */
|
|
108
|
+
warnings: FlowGraphIssue[];
|
|
109
|
+
}
|
|
93
110
|
declare class FlowsWorkflowService {
|
|
94
111
|
private readonly api;
|
|
95
112
|
constructor(api: ProductsHttpService);
|
|
96
113
|
getWorkflows(subscriptionId: number, status: FlowWorkflowStatus | null, paging?: Paging): Observable<FlowWorkflowListResponse>;
|
|
97
114
|
getWorkflow(id: number, subscriptionId: number): Observable<FlowWorkflow>;
|
|
115
|
+
getVersion(id: number, subscriptionId: number): Observable<FlowVersion>;
|
|
98
116
|
createWorkflow(subscriptionId: number, attrs: FlowWorkflowAttrs): Observable<FlowWorkflow>;
|
|
99
117
|
updateWorkflow(id: number, subscriptionId: number, attrs: FlowWorkflowAttrs): Observable<FlowWorkflow>;
|
|
100
118
|
/** 433 when the workflow has runs. subscription_id is a query param, not a body. */
|
|
@@ -103,8 +121,12 @@ declare class FlowsWorkflowService {
|
|
|
103
121
|
createVersion(workflowId: number, subscriptionId: number, graph: unknown): Observable<FlowVersion>;
|
|
104
122
|
/** Refused with 433 once the version is published. */
|
|
105
123
|
updateVersion(id: number, subscriptionId: number, graph: unknown): Observable<FlowVersion>;
|
|
124
|
+
/** What publishing would refuse, for a graph saved or not. Writes nothing. */
|
|
125
|
+
checkGraph(workflowId: number, subscriptionId: number, graph: unknown): Observable<FlowGraphCheck>;
|
|
106
126
|
/** Subscription admin only. Re-publishing is a server-side no-op. */
|
|
107
127
|
publishVersion(id: number, subscriptionId: number): Observable<FlowVersion>;
|
|
128
|
+
/** Publishes the version only if it passes the check; otherwise returns the check and writes nothing. */
|
|
129
|
+
publishChecked(workflowId: number, version: FlowVersion, subscriptionId: number): Observable<FlowVersion | FlowGraphCheck>;
|
|
108
130
|
static ɵfac: i0.ɵɵFactoryDeclaration<FlowsWorkflowService, never>;
|
|
109
131
|
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
110
132
|
}
|
|
@@ -144,6 +166,8 @@ declare class FlowsWorkflowsComponent extends AppBaseComponent implements OnInit
|
|
|
144
166
|
readonly diagram: import("@fortawesome/fontawesome-common-types").IconDefinition;
|
|
145
167
|
readonly json: import("@fortawesome/fontawesome-common-types").IconDefinition;
|
|
146
168
|
readonly warning: import("@fortawesome/fontawesome-common-types").IconDefinition;
|
|
169
|
+
readonly collapsed: import("@fortawesome/fontawesome-common-types").IconDefinition;
|
|
170
|
+
readonly expanded: import("@fortawesome/fontawesome-common-types").IconDefinition;
|
|
147
171
|
};
|
|
148
172
|
readonly badgeClass: typeof flowWorkflowBadgeClass;
|
|
149
173
|
constructor(injector: Injector, workflowService: FlowsWorkflowService, confirmDialog: ConfirmDialogService, cdr: ChangeDetectorRef);
|
|
@@ -193,6 +217,8 @@ declare class FlowsWorkflowFormComponent extends AppBaseComponent implements OnI
|
|
|
193
217
|
readonly diagram: import("@fortawesome/fontawesome-common-types").IconDefinition;
|
|
194
218
|
readonly json: import("@fortawesome/fontawesome-common-types").IconDefinition;
|
|
195
219
|
readonly warning: import("@fortawesome/fontawesome-common-types").IconDefinition;
|
|
220
|
+
readonly collapsed: import("@fortawesome/fontawesome-common-types").IconDefinition;
|
|
221
|
+
readonly expanded: import("@fortawesome/fontawesome-common-types").IconDefinition;
|
|
196
222
|
};
|
|
197
223
|
constructor(injector: Injector, workflowService: FlowsWorkflowService, cdr: ChangeDetectorRef);
|
|
198
224
|
get isEdit(): boolean;
|
|
@@ -207,6 +233,20 @@ declare class FlowsWorkflowFormComponent extends AppBaseComponent implements OnI
|
|
|
207
233
|
static ɵfac: i0.ɵɵFactoryDeclaration<FlowsWorkflowFormComponent, never>;
|
|
208
234
|
static ɵcmp: i0.ɵɵComponentDeclaration<FlowsWorkflowFormComponent, "pw-flows-workflow-form", never, {}, {}, never, never, false, never>;
|
|
209
235
|
}
|
|
236
|
+
/** What the version editor shows. Opening or closing it resets all of this together. */
|
|
237
|
+
declare class FlowVersionEditorState {
|
|
238
|
+
open: boolean;
|
|
239
|
+
/** Null when authoring a new version. */
|
|
240
|
+
version: FlowVersion | null;
|
|
241
|
+
/** The version a new one is being copied from. */
|
|
242
|
+
duplicateOf: FlowVersion | null;
|
|
243
|
+
/** Why publishing the open version was refused. */
|
|
244
|
+
check: FlowGraphCheck | null;
|
|
245
|
+
show(version: FlowVersion | null, duplicateOf?: FlowVersion | null, check?: FlowGraphCheck | null): void;
|
|
246
|
+
close(): void;
|
|
247
|
+
/** The editor shows the version it was given, so it gets the published one. */
|
|
248
|
+
published(version: FlowVersion): void;
|
|
249
|
+
}
|
|
210
250
|
declare namespace flows_workflow_versions_component_d_exports {
|
|
211
251
|
export { FlowsWorkflowVersionsComponent };
|
|
212
252
|
}
|
|
@@ -223,11 +263,7 @@ declare class FlowsWorkflowVersionsComponent extends AppBaseComponent implements
|
|
|
223
263
|
versions: FlowVersion[];
|
|
224
264
|
/** Shown against versions.length so the 500-row cap stays visible. */
|
|
225
265
|
totalRecords: number;
|
|
226
|
-
|
|
227
|
-
/** Null when authoring a new version. */
|
|
228
|
-
editorVersion: FlowVersion | null;
|
|
229
|
-
/** The version a new one is being copied from. */
|
|
230
|
-
editorDuplicateOf: FlowVersion | null;
|
|
266
|
+
readonly editor: FlowVersionEditorState;
|
|
231
267
|
/** Set by a link from a run; opened once, on the first load. */
|
|
232
268
|
private requestedVersionId;
|
|
233
269
|
icons: {
|
|
@@ -245,6 +281,8 @@ declare class FlowsWorkflowVersionsComponent extends AppBaseComponent implements
|
|
|
245
281
|
readonly diagram: import("@fortawesome/fontawesome-common-types").IconDefinition;
|
|
246
282
|
readonly json: import("@fortawesome/fontawesome-common-types").IconDefinition;
|
|
247
283
|
readonly warning: import("@fortawesome/fontawesome-common-types").IconDefinition;
|
|
284
|
+
readonly collapsed: import("@fortawesome/fontawesome-common-types").IconDefinition;
|
|
285
|
+
readonly expanded: import("@fortawesome/fontawesome-common-types").IconDefinition;
|
|
248
286
|
};
|
|
249
287
|
readonly isPublished: typeof isFlowVersionPublished;
|
|
250
288
|
readonly badgeClass: typeof flowVersionBadgeClass;
|
|
@@ -257,7 +295,9 @@ declare class FlowsWorkflowVersionsComponent extends AppBaseComponent implements
|
|
|
257
295
|
duplicate(version: FlowVersion): void;
|
|
258
296
|
closeEditor(): void;
|
|
259
297
|
onVersionSaved(): void;
|
|
298
|
+
/** Checked first: a version that would be refused opens with its problems listed instead. */
|
|
260
299
|
publish(version: FlowVersion): void;
|
|
300
|
+
private publishOutcome;
|
|
261
301
|
back(): void;
|
|
262
302
|
private loadWorkflow;
|
|
263
303
|
private load;
|
|
@@ -266,6 +306,23 @@ declare class FlowsWorkflowVersionsComponent extends AppBaseComponent implements
|
|
|
266
306
|
static ɵfac: i0.ɵɵFactoryDeclaration<FlowsWorkflowVersionsComponent, never>;
|
|
267
307
|
static ɵcmp: i0.ɵɵComponentDeclaration<FlowsWorkflowVersionsComponent, "pw-flows-workflow-versions", never, {}, {}, never, never, false, never>;
|
|
268
308
|
}
|
|
309
|
+
/** The fields that reach a node from one connected node before it. */
|
|
310
|
+
interface FlowFieldSource {
|
|
311
|
+
nodeId: string;
|
|
312
|
+
type: string;
|
|
313
|
+
/** The catalogue label, for a type the builder has no translation for. */
|
|
314
|
+
label: string;
|
|
315
|
+
/** Each key once, however many items carried it. */
|
|
316
|
+
names: string[];
|
|
317
|
+
/** For each of those that is a list: the keys of its entries, each once. */
|
|
318
|
+
lists: Record<string, string[]>;
|
|
319
|
+
}
|
|
320
|
+
/**
|
|
321
|
+
* The fields reaching a node, grouped by the connected node each comes from,
|
|
322
|
+
* nearest first. Only connected nodes count: a node with nothing leading to it
|
|
323
|
+
* has no sources.
|
|
324
|
+
*/
|
|
325
|
+
declare function flowFieldSources(graph: FlowGraph, nodeId: string, definitions: FlowNodeDefinition[], learned?: Record<string, FlowItemFields>): FlowFieldSource[];
|
|
269
326
|
type FlowNodeCategory = 'trigger' | 'logic' | 'data' | 'action';
|
|
270
327
|
declare const FLOW_NODE_CATEGORIES: readonly FlowNodeCategory[];
|
|
271
328
|
/** An edge with no branch leaves through `next`. */
|
|
@@ -279,7 +336,7 @@ interface FlowParamDetail {
|
|
|
279
336
|
options?: string[];
|
|
280
337
|
required?: boolean;
|
|
281
338
|
}
|
|
282
|
-
/** Field names
|
|
339
|
+
/** Field names of an item, and of the entries of each list in it. */
|
|
283
340
|
interface FlowItemFields {
|
|
284
341
|
names: string[];
|
|
285
342
|
lists: Record<string, string[]>;
|
|
@@ -293,10 +350,14 @@ interface FlowNodeDefinition {
|
|
|
293
350
|
params: string[];
|
|
294
351
|
/** Keyed by param; set on nodes an integration supplies, empty on the engine's own. */
|
|
295
352
|
param_details?: Record<string, FlowParamDetail>;
|
|
296
|
-
/**
|
|
353
|
+
/** The node hands on the items it was given. */
|
|
354
|
+
passes_items?: boolean;
|
|
355
|
+
/** What the node type declares an item leaving it holds, plus what this subscription's runs saw. */
|
|
297
356
|
item_fields?: FlowItemFields;
|
|
298
357
|
condition: boolean;
|
|
299
358
|
outputs: string[];
|
|
359
|
+
/** Dropped by the product that declared it: kept for flows that use it, not offered for new ones. */
|
|
360
|
+
retired?: boolean;
|
|
300
361
|
}
|
|
301
362
|
interface FlowNodeListResponse {
|
|
302
363
|
flow_nodes: FlowNodeDefinition[];
|
|
@@ -307,11 +368,18 @@ interface FlowGraphPosition {
|
|
|
307
368
|
x: number;
|
|
308
369
|
y: number;
|
|
309
370
|
}
|
|
371
|
+
/** How often a failed action node runs again, and the first wait; the engine doubles it each time. */
|
|
372
|
+
interface FlowNodeRetry {
|
|
373
|
+
times: number;
|
|
374
|
+
wait_seconds: number;
|
|
375
|
+
}
|
|
376
|
+
declare const FLOW_RETRY_DEFAULT: FlowNodeRetry;
|
|
310
377
|
interface FlowGraphNode {
|
|
311
378
|
id: string;
|
|
312
379
|
type: string;
|
|
313
380
|
params?: Record<string, unknown>;
|
|
314
381
|
condition?: Record<string, unknown>;
|
|
382
|
+
retry?: FlowNodeRetry;
|
|
315
383
|
position?: FlowGraphPosition;
|
|
316
384
|
}
|
|
317
385
|
interface FlowGraphEdge {
|
|
@@ -328,6 +396,8 @@ interface FlowNodeSelection {
|
|
|
328
396
|
fieldSuggestions: string[];
|
|
329
397
|
/** The lists an item reaching the node can hold, for Split out to pick from. */
|
|
330
398
|
listSuggestions: string[];
|
|
399
|
+
/** The same fields, by the connected node they come from; null when none can ever reach it. */
|
|
400
|
+
fieldSources: FlowFieldSource[] | null;
|
|
331
401
|
}
|
|
332
402
|
interface FlowGraph {
|
|
333
403
|
nodes: FlowGraphNode[];
|
|
@@ -338,6 +408,27 @@ declare function toFlowGraph(value: unknown): FlowGraph;
|
|
|
338
408
|
declare function nextFlowNodeId(nodes: readonly Pick<FlowGraphNode, 'id'>[]): string;
|
|
339
409
|
declare function nextFlowEdgeId(edges: readonly FlowGraphEdge[]): string;
|
|
340
410
|
declare function flowNodeLabelKey(type: string): string;
|
|
411
|
+
/** The node with its retry setting replaced, or removed when there is none. */
|
|
412
|
+
declare function flowNodeWithRetry(node: FlowGraphNode, retry?: FlowNodeRetry): FlowGraphNode;
|
|
413
|
+
/** The fields one node handed on the last time its workflow ran (FlowWorkflowFields on the server). */
|
|
414
|
+
interface FlowWorkflowFieldsRow {
|
|
415
|
+
node_id: string;
|
|
416
|
+
/** Versions reuse node ids, so these belong to an id of this type only. */
|
|
417
|
+
node_type: string | null;
|
|
418
|
+
item_fields: FlowItemFields;
|
|
419
|
+
}
|
|
420
|
+
interface FlowWorkflowFieldsResponse {
|
|
421
|
+
flow_workflow_fields: FlowWorkflowFieldsRow[];
|
|
422
|
+
}
|
|
423
|
+
interface FlowWorkflowFields {
|
|
424
|
+
/** Keyed by flowNodeFieldsKey(id, type). */
|
|
425
|
+
byNode: Record<string, FlowItemFields>;
|
|
426
|
+
/** False until the workflow has run once, which is why nothing is known yet. */
|
|
427
|
+
ran: boolean;
|
|
428
|
+
}
|
|
429
|
+
declare const NO_FLOW_WORKFLOW_FIELDS: FlowWorkflowFields;
|
|
430
|
+
declare function flowNodeFieldsKey(nodeId: string, type: string | null | undefined): string;
|
|
431
|
+
declare function toFlowWorkflowFields(rows: FlowWorkflowFieldsRow[] | undefined): FlowWorkflowFields;
|
|
341
432
|
declare class FlowsNodeService {
|
|
342
433
|
private readonly api;
|
|
343
434
|
private readonly cache;
|
|
@@ -346,6 +437,89 @@ declare class FlowsNodeService {
|
|
|
346
437
|
static ɵfac: i0.ɵɵFactoryDeclaration<FlowsNodeService, never>;
|
|
347
438
|
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
348
439
|
}
|
|
440
|
+
type FlowRunStatus = 'running' | 'awaiting' | 'succeeded' | 'failed';
|
|
441
|
+
type FlowRunStepStatus = 'pending' | 'running' | 'awaiting' | 'succeeded' | 'failed' | 'skipped';
|
|
442
|
+
declare const FLOW_RUN_TERMINAL_STATUSES: readonly FlowRunStatus[];
|
|
443
|
+
declare const FLOW_RUN_STEP_SETTLED_STATUSES: readonly FlowRunStepStatus[];
|
|
444
|
+
interface FlowRun {
|
|
445
|
+
id: number;
|
|
446
|
+
flow_workflow_id: number;
|
|
447
|
+
flow_version_id: number;
|
|
448
|
+
flow_workflow_name?: string;
|
|
449
|
+
flow_version_number?: number;
|
|
450
|
+
status: FlowRunStatus;
|
|
451
|
+
trigger_payload: unknown;
|
|
452
|
+
error: string | null;
|
|
453
|
+
started_at: string | null;
|
|
454
|
+
finished_at: string | null;
|
|
455
|
+
created_at: string;
|
|
456
|
+
updated_at: string;
|
|
457
|
+
}
|
|
458
|
+
interface FlowRunStep {
|
|
459
|
+
id: number;
|
|
460
|
+
flow_run_id: number;
|
|
461
|
+
node_id: string;
|
|
462
|
+
status: FlowRunStepStatus;
|
|
463
|
+
input_items: unknown[] | null;
|
|
464
|
+
output_items: unknown[] | null;
|
|
465
|
+
error: string | null;
|
|
466
|
+
attempts: number;
|
|
467
|
+
awaiting_since: string | null;
|
|
468
|
+
/** Set while a failed step waits to run again. */
|
|
469
|
+
retry_at?: string | null;
|
|
470
|
+
started_at: string | null;
|
|
471
|
+
finished_at: string | null;
|
|
472
|
+
created_at: string;
|
|
473
|
+
updated_at: string;
|
|
474
|
+
}
|
|
475
|
+
interface FlowRunListResponse {
|
|
476
|
+
flow_runs: FlowRun[];
|
|
477
|
+
object_count: number;
|
|
478
|
+
unfiltered_count: number;
|
|
479
|
+
}
|
|
480
|
+
interface FlowRunStepListResponse {
|
|
481
|
+
flow_run_steps: FlowRunStep[];
|
|
482
|
+
object_count: number;
|
|
483
|
+
unfiltered_count: number;
|
|
484
|
+
}
|
|
485
|
+
interface FlowRunQuery {
|
|
486
|
+
status?: FlowRunStatus;
|
|
487
|
+
flow_workflow_id?: number;
|
|
488
|
+
flow_version_id?: number;
|
|
489
|
+
}
|
|
490
|
+
declare function isFlowRunTerminal(run: Pick<FlowRun, 'status'>): boolean;
|
|
491
|
+
declare function isFlowRunStepSettled(step: Pick<FlowRunStep, 'status'>): boolean;
|
|
492
|
+
declare const FLOW_RUN_STATUS_ORDER: readonly FlowRunStatus[];
|
|
493
|
+
declare const FLOW_RUN_STATUS_KEYS: readonly string[];
|
|
494
|
+
declare function elapsedMs(from: string | null, to: string | null): number | null;
|
|
495
|
+
declare function flowRunBadgeClass(status: FlowRunStatus): string;
|
|
496
|
+
declare function flowRunStepBadgeClass(status: FlowRunStepStatus): string;
|
|
497
|
+
/** The time slot a scheduled run was for, from its trigger payload; null for any other run. */
|
|
498
|
+
declare function flowRunScheduledFor(run: FlowRun | undefined): string | null;
|
|
499
|
+
interface FlowRunDetail {
|
|
500
|
+
run: FlowRun;
|
|
501
|
+
steps: FlowRunStepListResponse;
|
|
502
|
+
}
|
|
503
|
+
/**
|
|
504
|
+
* Polls because the engine emits no run-lifecycle events yet; Part H swaps in
|
|
505
|
+
* a push here without any component changing.
|
|
506
|
+
*/
|
|
507
|
+
declare class FlowsRunService {
|
|
508
|
+
private readonly api;
|
|
509
|
+
RUNS_PATH: string;
|
|
510
|
+
constructor(api: ProductsHttpService);
|
|
511
|
+
getRuns(subscriptionId: number, query?: FlowRunQuery, paging?: Paging): Observable<FlowRunListResponse>;
|
|
512
|
+
getRun(id: number, subscriptionId: number): Observable<FlowRun>;
|
|
513
|
+
getRunSteps(runId: number, subscriptionId: number, paging?: Paging): Observable<FlowRunStepListResponse>;
|
|
514
|
+
watchRuns(subscriptionId: number, query?: FlowRunQuery, paging?: Paging): Observable<FlowRunListResponse>;
|
|
515
|
+
watchRun(id: number, subscriptionId: number, paging?: Paging): Observable<FlowRunDetail>;
|
|
516
|
+
private hasUnsettledRun;
|
|
517
|
+
/** A help for the builder, so a failed load leaves it as it was before the flow ran. */
|
|
518
|
+
getWorkflowFields(workflowId: number, subscriptionId: number): Observable<FlowWorkflowFields>;
|
|
519
|
+
private definedQuery;
|
|
520
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FlowsRunService, never>;
|
|
521
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
522
|
+
}
|
|
349
523
|
declare namespace flows_version_editor_component_d_exports {
|
|
350
524
|
export { FlowsVersionEditorComponent };
|
|
351
525
|
}
|
|
@@ -353,6 +527,7 @@ type EditorView = 'canvas' | 'json';
|
|
|
353
527
|
declare class FlowsVersionEditorComponent implements OnInit, OnChanges, OnDestroy {
|
|
354
528
|
private readonly workflowService;
|
|
355
529
|
private readonly nodeService;
|
|
530
|
+
private readonly runService;
|
|
356
531
|
private readonly cdr;
|
|
357
532
|
private readonly destroy$;
|
|
358
533
|
/** Null when authoring a new version. */
|
|
@@ -361,6 +536,8 @@ declare class FlowsVersionEditorComponent implements OnInit, OnChanges, OnDestro
|
|
|
361
536
|
duplicateOf: FlowVersion | null;
|
|
362
537
|
workflowId: number;
|
|
363
538
|
subscriptionId: number;
|
|
539
|
+
/** Why publishing this version was refused, when that is why it is open. */
|
|
540
|
+
check: FlowGraphCheck | null;
|
|
364
541
|
readonly saved: EventEmitter<void>;
|
|
365
542
|
readonly cancelled: EventEmitter<void>;
|
|
366
543
|
private readonly canvas?;
|
|
@@ -379,8 +556,12 @@ declare class FlowsVersionEditorComponent implements OnInit, OnChanges, OnDestro
|
|
|
379
556
|
readonly diagram: import("@fortawesome/fontawesome-common-types").IconDefinition;
|
|
380
557
|
readonly json: import("@fortawesome/fontawesome-common-types").IconDefinition;
|
|
381
558
|
readonly warning: import("@fortawesome/fontawesome-common-types").IconDefinition;
|
|
559
|
+
readonly collapsed: import("@fortawesome/fontawesome-common-types").IconDefinition;
|
|
560
|
+
readonly expanded: import("@fortawesome/fontawesome-common-types").IconDefinition;
|
|
382
561
|
};
|
|
383
562
|
definitions: FlowNodeDefinition[];
|
|
563
|
+
/** The fields each node handed on the last time the workflow ran. */
|
|
564
|
+
workflowFields$?: Observable<FlowWorkflowFields>;
|
|
384
565
|
loading: boolean;
|
|
385
566
|
loadFailed: boolean;
|
|
386
567
|
graph: FlowGraph;
|
|
@@ -389,7 +570,7 @@ declare class FlowsVersionEditorComponent implements OnInit, OnChanges, OnDestro
|
|
|
389
570
|
selection: FlowNodeSelection | null;
|
|
390
571
|
dropped: FlowGraphEdge[];
|
|
391
572
|
saving: boolean;
|
|
392
|
-
constructor(workflowService: FlowsWorkflowService, nodeService: FlowsNodeService, cdr: ChangeDetectorRef);
|
|
573
|
+
constructor(workflowService: FlowsWorkflowService, nodeService: FlowsNodeService, runService: FlowsRunService, cdr: ChangeDetectorRef);
|
|
393
574
|
get readOnly(): boolean;
|
|
394
575
|
get headingKey(): string;
|
|
395
576
|
ngOnInit(): void;
|
|
@@ -419,87 +600,137 @@ declare class FlowsVersionEditorComponent implements OnInit, OnChanges, OnDestro
|
|
|
419
600
|
"alias": "subscriptionId";
|
|
420
601
|
"required": false;
|
|
421
602
|
};
|
|
603
|
+
"check": {
|
|
604
|
+
"alias": "check";
|
|
605
|
+
"required": false;
|
|
606
|
+
};
|
|
422
607
|
}, {
|
|
423
608
|
"saved": "saved";
|
|
424
609
|
"cancelled": "cancelled";
|
|
425
610
|
}, never, never, false, never>;
|
|
426
611
|
}
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
declare const FLOW_RUN_TERMINAL_STATUSES: readonly FlowRunStatus[];
|
|
430
|
-
declare const FLOW_RUN_STEP_SETTLED_STATUSES: readonly FlowRunStepStatus[];
|
|
431
|
-
interface FlowRun {
|
|
432
|
-
id: number;
|
|
433
|
-
flow_workflow_id: number;
|
|
434
|
-
flow_version_id: number;
|
|
435
|
-
flow_workflow_name?: string;
|
|
436
|
-
flow_version_number?: number;
|
|
437
|
-
status: FlowRunStatus;
|
|
438
|
-
trigger_payload: unknown;
|
|
439
|
-
error: string | null;
|
|
440
|
-
started_at: string | null;
|
|
441
|
-
finished_at: string | null;
|
|
442
|
-
created_at: string;
|
|
443
|
-
updated_at: string;
|
|
444
|
-
}
|
|
445
|
-
interface FlowRunStep {
|
|
446
|
-
id: number;
|
|
447
|
-
flow_run_id: number;
|
|
448
|
-
node_id: string;
|
|
449
|
-
status: FlowRunStepStatus;
|
|
450
|
-
input_items: unknown[] | null;
|
|
451
|
-
output_items: unknown[] | null;
|
|
452
|
-
error: string | null;
|
|
453
|
-
attempts: number;
|
|
454
|
-
awaiting_since: string | null;
|
|
455
|
-
started_at: string | null;
|
|
456
|
-
finished_at: string | null;
|
|
457
|
-
created_at: string;
|
|
458
|
-
updated_at: string;
|
|
612
|
+
declare namespace flows_graph_canvas_component_d_exports {
|
|
613
|
+
export { FlowsGraphCanvasComponent };
|
|
459
614
|
}
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
615
|
+
declare class FlowsGraphCanvasComponent implements AfterViewInit, OnChanges, OnDestroy {
|
|
616
|
+
private readonly injector;
|
|
617
|
+
private readonly cdr;
|
|
618
|
+
graph: FlowGraph;
|
|
619
|
+
definitions: FlowNodeDefinition[];
|
|
620
|
+
/** The fields each node handed on in recent runs; null while loading. */
|
|
621
|
+
workflowFields: FlowWorkflowFields | null;
|
|
622
|
+
readOnly: boolean;
|
|
623
|
+
readonly selectionChange: EventEmitter<string>;
|
|
624
|
+
readonly graphChange: EventEmitter<void>;
|
|
625
|
+
/** Stored edges the canvas cannot draw, reported after every load. */
|
|
626
|
+
readonly dropped: EventEmitter<FlowGraphEdge[]>;
|
|
627
|
+
private readonly host;
|
|
628
|
+
drawFailed: boolean;
|
|
629
|
+
private editor?;
|
|
630
|
+
private selected;
|
|
631
|
+
private reselect?;
|
|
632
|
+
private pending;
|
|
633
|
+
constructor(injector: Injector, cdr: ChangeDetectorRef);
|
|
634
|
+
ngAfterViewInit(): void;
|
|
635
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
636
|
+
addNode(type: string): Promise<void>;
|
|
637
|
+
focusNode(nodeId: string): Promise<void>;
|
|
638
|
+
removeNode(nodeId: string): Promise<void>;
|
|
639
|
+
updateNode(nodeId: string, flowNode: FlowGraphNode): Promise<void>;
|
|
640
|
+
selection(nodeId: string): FlowNodeSelection | null;
|
|
641
|
+
toGraph(): FlowGraph;
|
|
642
|
+
zoomToFit(): Promise<void>;
|
|
643
|
+
ngOnDestroy(): void;
|
|
644
|
+
private reload;
|
|
645
|
+
private queue;
|
|
646
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FlowsGraphCanvasComponent, never>;
|
|
647
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FlowsGraphCanvasComponent, "pw-flows-graph-canvas", never, {
|
|
648
|
+
"graph": {
|
|
649
|
+
"alias": "graph";
|
|
650
|
+
"required": false;
|
|
651
|
+
};
|
|
652
|
+
"definitions": {
|
|
653
|
+
"alias": "definitions";
|
|
654
|
+
"required": false;
|
|
655
|
+
};
|
|
656
|
+
"workflowFields": {
|
|
657
|
+
"alias": "workflowFields";
|
|
658
|
+
"required": false;
|
|
659
|
+
};
|
|
660
|
+
"readOnly": {
|
|
661
|
+
"alias": "readOnly";
|
|
662
|
+
"required": false;
|
|
663
|
+
};
|
|
664
|
+
}, {
|
|
665
|
+
"selectionChange": "selectionChange";
|
|
666
|
+
"graphChange": "graphChange";
|
|
667
|
+
"dropped": "dropped";
|
|
668
|
+
}, never, never, false, never>;
|
|
464
669
|
}
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
object_count: number;
|
|
468
|
-
unfiltered_count: number;
|
|
670
|
+
declare namespace flows_graph_check_component_d_exports {
|
|
671
|
+
export { FlowGraphCheckRow, FlowsGraphCheckComponent };
|
|
469
672
|
}
|
|
470
|
-
interface
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
declare function isFlowRunTerminal(run: Pick<FlowRun, 'status'>): boolean;
|
|
476
|
-
declare function isFlowRunStepSettled(step: Pick<FlowRunStep, 'status'>): boolean;
|
|
477
|
-
declare const FLOW_RUN_STATUS_ORDER: readonly FlowRunStatus[];
|
|
478
|
-
declare const FLOW_RUN_STATUS_KEYS: readonly string[];
|
|
479
|
-
declare function elapsedMs(from: string | null, to: string | null): number | null;
|
|
480
|
-
declare function flowRunBadgeClass(status: FlowRunStatus): string;
|
|
481
|
-
declare function flowRunStepBadgeClass(status: FlowRunStepStatus): string;
|
|
482
|
-
interface FlowRunDetail {
|
|
483
|
-
run: FlowRun;
|
|
484
|
-
steps: FlowRunStepListResponse;
|
|
673
|
+
interface FlowGraphCheckRow {
|
|
674
|
+
issue: FlowGraphIssue;
|
|
675
|
+
severity: 'error' | 'warning';
|
|
676
|
+
place: string;
|
|
677
|
+
text: string;
|
|
485
678
|
}
|
|
486
679
|
/**
|
|
487
|
-
*
|
|
488
|
-
*
|
|
680
|
+
* Why publishing a version was refused, and a way to each problem: the node is
|
|
681
|
+
* selected and the cursor put in the field.
|
|
489
682
|
*/
|
|
490
|
-
declare class
|
|
491
|
-
private readonly
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
683
|
+
declare class FlowsGraphCheckComponent implements OnChanges {
|
|
684
|
+
private readonly translation;
|
|
685
|
+
canvas: FlowsGraphCanvasComponent;
|
|
686
|
+
definitions: FlowNodeDefinition[];
|
|
687
|
+
/** The version as saved, which is what was checked. */
|
|
688
|
+
graph: FlowGraph | null;
|
|
689
|
+
result: FlowGraphCheck | null;
|
|
690
|
+
readonly icons: {
|
|
691
|
+
readonly inspect: import("@fortawesome/fontawesome-common-types").IconDefinition;
|
|
692
|
+
readonly back: import("@fortawesome/fontawesome-common-types").IconDefinition;
|
|
693
|
+
readonly error: import("@fortawesome/fontawesome-common-types").IconDefinition;
|
|
694
|
+
readonly create: import("@fortawesome/fontawesome-common-types").IconDefinition;
|
|
695
|
+
readonly edit: import("@fortawesome/fontawesome-common-types").IconDefinition;
|
|
696
|
+
readonly delete: import("@fortawesome/fontawesome-common-types").IconDefinition;
|
|
697
|
+
readonly versions: import("@fortawesome/fontawesome-common-types").IconDefinition;
|
|
698
|
+
readonly search: import("@fortawesome/fontawesome-common-types").IconDefinition;
|
|
699
|
+
readonly publish: import("@fortawesome/fontawesome-common-types").IconDefinition;
|
|
700
|
+
readonly duplicate: import("@fortawesome/fontawesome-common-types").IconDefinition;
|
|
701
|
+
readonly fit: import("@fortawesome/fontawesome-common-types").IconDefinition;
|
|
702
|
+
readonly diagram: import("@fortawesome/fontawesome-common-types").IconDefinition;
|
|
703
|
+
readonly json: import("@fortawesome/fontawesome-common-types").IconDefinition;
|
|
704
|
+
readonly warning: import("@fortawesome/fontawesome-common-types").IconDefinition;
|
|
705
|
+
readonly collapsed: import("@fortawesome/fontawesome-common-types").IconDefinition;
|
|
706
|
+
readonly expanded: import("@fortawesome/fontawesome-common-types").IconDefinition;
|
|
707
|
+
};
|
|
708
|
+
rows: FlowGraphCheckRow[];
|
|
709
|
+
constructor(translation: TranslocoService);
|
|
710
|
+
ngOnChanges(): void;
|
|
711
|
+
goTo(issue: FlowGraphIssue): void;
|
|
712
|
+
/** Where it is, for the list: the node's name, or nothing for the graph as a whole. */
|
|
713
|
+
private place;
|
|
714
|
+
private describe;
|
|
715
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FlowsGraphCheckComponent, never>;
|
|
716
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FlowsGraphCheckComponent, "pw-flows-graph-check", never, {
|
|
717
|
+
"canvas": {
|
|
718
|
+
"alias": "canvas";
|
|
719
|
+
"required": true;
|
|
720
|
+
};
|
|
721
|
+
"definitions": {
|
|
722
|
+
"alias": "definitions";
|
|
723
|
+
"required": false;
|
|
724
|
+
};
|
|
725
|
+
"graph": {
|
|
726
|
+
"alias": "graph";
|
|
727
|
+
"required": false;
|
|
728
|
+
};
|
|
729
|
+
"result": {
|
|
730
|
+
"alias": "result";
|
|
731
|
+
"required": false;
|
|
732
|
+
};
|
|
733
|
+
}, {}, never, never, false, never>;
|
|
503
734
|
}
|
|
504
735
|
declare namespace flows_runs_component_d_exports {
|
|
505
736
|
export { FlowsRunsComponent };
|
|
@@ -539,6 +770,8 @@ declare class FlowsRunsComponent extends AppBaseComponent implements OnInit {
|
|
|
539
770
|
readonly diagram: import("@fortawesome/fontawesome-common-types").IconDefinition;
|
|
540
771
|
readonly json: import("@fortawesome/fontawesome-common-types").IconDefinition;
|
|
541
772
|
readonly warning: import("@fortawesome/fontawesome-common-types").IconDefinition;
|
|
773
|
+
readonly collapsed: import("@fortawesome/fontawesome-common-types").IconDefinition;
|
|
774
|
+
readonly expanded: import("@fortawesome/fontawesome-common-types").IconDefinition;
|
|
542
775
|
};
|
|
543
776
|
constructor(injector: Injector, flowsRunService: FlowsRunService, cdr: ChangeDetectorRef);
|
|
544
777
|
ngOnInit(): void;
|
|
@@ -688,6 +921,8 @@ declare namespace flows_run_inspector_component_d_exports {
|
|
|
688
921
|
}
|
|
689
922
|
declare class FlowsRunInspectorComponent extends AppBaseComponent implements OnInit {
|
|
690
923
|
private readonly flowsRunService;
|
|
924
|
+
private readonly workflowService;
|
|
925
|
+
private readonly nodeService;
|
|
691
926
|
private readonly cdr;
|
|
692
927
|
private readonly destroy$;
|
|
693
928
|
private watch$?;
|
|
@@ -711,72 +946,130 @@ declare class FlowsRunInspectorComponent extends AppBaseComponent implements OnI
|
|
|
711
946
|
readonly diagram: import("@fortawesome/fontawesome-common-types").IconDefinition;
|
|
712
947
|
readonly json: import("@fortawesome/fontawesome-common-types").IconDefinition;
|
|
713
948
|
readonly warning: import("@fortawesome/fontawesome-common-types").IconDefinition;
|
|
949
|
+
readonly collapsed: import("@fortawesome/fontawesome-common-types").IconDefinition;
|
|
950
|
+
readonly expanded: import("@fortawesome/fontawesome-common-types").IconDefinition;
|
|
714
951
|
};
|
|
715
952
|
readonly openSteps: Set<number>;
|
|
716
953
|
readonly trackByStep: (_: number, step: FlowRunStep) => number;
|
|
717
|
-
|
|
954
|
+
readonly labelKey: typeof flowNodeLabelKey;
|
|
955
|
+
readonly scheduledFor: typeof flowRunScheduledFor;
|
|
956
|
+
/** Node id to type, from the run's version: a step names its node by id only. */
|
|
957
|
+
nodeTypes: Record<string, string>;
|
|
958
|
+
nodeIds: string[];
|
|
959
|
+
definitions: Record<string, FlowNodeDefinition>;
|
|
960
|
+
private namedVersionId?;
|
|
961
|
+
constructor(injector: Injector, flowsRunService: FlowsRunService, workflowService: FlowsWorkflowService, nodeService: FlowsNodeService, cdr: ChangeDetectorRef);
|
|
718
962
|
ngOnInit(): void;
|
|
719
963
|
ngOnDestroy(): void;
|
|
720
964
|
back(): void;
|
|
721
965
|
runBadgeClass(status: FlowRunStatus): string;
|
|
722
966
|
stepBadgeClass(status: FlowRunStepStatus): string;
|
|
723
967
|
elapsed(from: string | null, to: string | null): number | null;
|
|
724
|
-
|
|
968
|
+
toggleItems(stepId: number): void;
|
|
725
969
|
asJson(value: unknown): string;
|
|
726
970
|
private watch;
|
|
971
|
+
private nameNodes;
|
|
727
972
|
private fail;
|
|
728
973
|
private settle;
|
|
729
974
|
static ɵfac: i0.ɵɵFactoryDeclaration<FlowsRunInspectorComponent, never>;
|
|
730
975
|
static ɵcmp: i0.ɵɵComponentDeclaration<FlowsRunInspectorComponent, "pw-flows-run-inspector", never, {}, {}, never, never, false, never>;
|
|
731
976
|
}
|
|
732
|
-
declare namespace
|
|
733
|
-
export {
|
|
734
|
-
}
|
|
735
|
-
|
|
736
|
-
|
|
977
|
+
declare namespace flows_run_progress_component_d_exports {
|
|
978
|
+
export { FlowRunProgress, FlowsRunProgressComponent, flowRunProgress };
|
|
979
|
+
}
|
|
980
|
+
interface FlowRunProgress {
|
|
981
|
+
done: number;
|
|
982
|
+
failed: number;
|
|
983
|
+
skipped: number;
|
|
984
|
+
/** Succeeded, failed or skipped. */
|
|
985
|
+
settled: number;
|
|
986
|
+
running: number;
|
|
987
|
+
/** Nodes of the version with no step yet; "not run" once the run has ended. */
|
|
988
|
+
waiting: number;
|
|
989
|
+
total: number;
|
|
990
|
+
percent: number;
|
|
991
|
+
}
|
|
992
|
+
/** Counted against the version's nodes, so a branch that is never taken still ends at 100%. */
|
|
993
|
+
declare function flowRunProgress(steps: FlowRunStep[], nodeIds: string[]): FlowRunProgress;
|
|
994
|
+
declare class FlowsRunProgressComponent implements OnChanges, OnDestroy {
|
|
737
995
|
private readonly cdr;
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
private pending;
|
|
749
|
-
constructor(injector: Injector, cdr: ChangeDetectorRef);
|
|
750
|
-
ngAfterViewInit(): void;
|
|
751
|
-
ngOnChanges(changes: SimpleChanges): void;
|
|
752
|
-
addNode(type: string): Promise<void>;
|
|
753
|
-
removeNode(nodeId: string): Promise<void>;
|
|
754
|
-
updateNode(nodeId: string, flowNode: FlowGraphNode): Promise<void>;
|
|
755
|
-
selection(nodeId: string): FlowNodeSelection | null;
|
|
756
|
-
toGraph(): FlowGraph;
|
|
757
|
-
zoomToFit(): Promise<void>;
|
|
996
|
+
run: FlowRun;
|
|
997
|
+
steps: FlowRunStep[];
|
|
998
|
+
/** Empty until the version is loaded; the steps alone are counted until then. */
|
|
999
|
+
nodeIds: string[];
|
|
1000
|
+
progress: FlowRunProgress;
|
|
1001
|
+
elapsed: number | null;
|
|
1002
|
+
private tick$?;
|
|
1003
|
+
constructor(cdr: ChangeDetectorRef);
|
|
1004
|
+
get ended(): boolean;
|
|
1005
|
+
ngOnChanges(): void;
|
|
758
1006
|
ngOnDestroy(): void;
|
|
759
|
-
private
|
|
760
|
-
|
|
761
|
-
static
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
"
|
|
1007
|
+
private updateElapsed;
|
|
1008
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FlowsRunProgressComponent, never>;
|
|
1009
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FlowsRunProgressComponent, "pw-flows-run-progress", never, {
|
|
1010
|
+
"run": {
|
|
1011
|
+
"alias": "run";
|
|
1012
|
+
"required": true;
|
|
1013
|
+
};
|
|
1014
|
+
"steps": {
|
|
1015
|
+
"alias": "steps";
|
|
765
1016
|
"required": false;
|
|
766
1017
|
};
|
|
767
|
-
"
|
|
768
|
-
"alias": "
|
|
1018
|
+
"nodeIds": {
|
|
1019
|
+
"alias": "nodeIds";
|
|
769
1020
|
"required": false;
|
|
770
1021
|
};
|
|
771
|
-
|
|
772
|
-
|
|
1022
|
+
}, {}, never, never, false, never>;
|
|
1023
|
+
}
|
|
1024
|
+
/** A step error in words the person running the flow can act on: a translation key and its values. */
|
|
1025
|
+
interface FlowStepErrorText {
|
|
1026
|
+
key: string;
|
|
1027
|
+
params: Record<string, string>;
|
|
1028
|
+
}
|
|
1029
|
+
/** Null for an empty error. An unknown error keeps its own words, so nothing is hidden. */
|
|
1030
|
+
declare function flowStepErrorText(error: string | null | undefined): FlowStepErrorText | null;
|
|
1031
|
+
declare namespace flows_step_error_component_d_exports {
|
|
1032
|
+
export { FlowsStepErrorComponent };
|
|
1033
|
+
}
|
|
1034
|
+
/**
|
|
1035
|
+
* Why a step failed, in plain words under its status: red once it has failed,
|
|
1036
|
+
* amber while it will still try again. The icon keeps the raw message.
|
|
1037
|
+
*/
|
|
1038
|
+
declare class FlowsStepErrorComponent implements OnChanges {
|
|
1039
|
+
error: string | null;
|
|
1040
|
+
/** The step will run again, so the error is the last try's, not the outcome. */
|
|
1041
|
+
retrying: boolean;
|
|
1042
|
+
readonly icons: {
|
|
1043
|
+
readonly inspect: import("@fortawesome/fontawesome-common-types").IconDefinition;
|
|
1044
|
+
readonly back: import("@fortawesome/fontawesome-common-types").IconDefinition;
|
|
1045
|
+
readonly error: import("@fortawesome/fontawesome-common-types").IconDefinition;
|
|
1046
|
+
readonly create: import("@fortawesome/fontawesome-common-types").IconDefinition;
|
|
1047
|
+
readonly edit: import("@fortawesome/fontawesome-common-types").IconDefinition;
|
|
1048
|
+
readonly delete: import("@fortawesome/fontawesome-common-types").IconDefinition;
|
|
1049
|
+
readonly versions: import("@fortawesome/fontawesome-common-types").IconDefinition;
|
|
1050
|
+
readonly search: import("@fortawesome/fontawesome-common-types").IconDefinition;
|
|
1051
|
+
readonly publish: import("@fortawesome/fontawesome-common-types").IconDefinition;
|
|
1052
|
+
readonly duplicate: import("@fortawesome/fontawesome-common-types").IconDefinition;
|
|
1053
|
+
readonly fit: import("@fortawesome/fontawesome-common-types").IconDefinition;
|
|
1054
|
+
readonly diagram: import("@fortawesome/fontawesome-common-types").IconDefinition;
|
|
1055
|
+
readonly json: import("@fortawesome/fontawesome-common-types").IconDefinition;
|
|
1056
|
+
readonly warning: import("@fortawesome/fontawesome-common-types").IconDefinition;
|
|
1057
|
+
readonly collapsed: import("@fortawesome/fontawesome-common-types").IconDefinition;
|
|
1058
|
+
readonly expanded: import("@fortawesome/fontawesome-common-types").IconDefinition;
|
|
1059
|
+
};
|
|
1060
|
+
text: FlowStepErrorText | null;
|
|
1061
|
+
ngOnChanges(): void;
|
|
1062
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FlowsStepErrorComponent, never>;
|
|
1063
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FlowsStepErrorComponent, "pw-flows-step-error", never, {
|
|
1064
|
+
"error": {
|
|
1065
|
+
"alias": "error";
|
|
773
1066
|
"required": false;
|
|
774
1067
|
};
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
}, never, never, false, never>;
|
|
1068
|
+
"retrying": {
|
|
1069
|
+
"alias": "retrying";
|
|
1070
|
+
"required": false;
|
|
1071
|
+
};
|
|
1072
|
+
}, {}, never, never, false, never>;
|
|
780
1073
|
}
|
|
781
1074
|
declare const FLOW_INPUT = "in";
|
|
782
1075
|
declare class FlowCanvasNode extends ClassicPreset.Node {
|
|
@@ -920,10 +1213,10 @@ declare class FlowsNodePaletteComponent implements OnChanges {
|
|
|
920
1213
|
"add": "add";
|
|
921
1214
|
}, never, never, false, never>;
|
|
922
1215
|
}
|
|
923
|
-
type FlowFieldKind = 'text' | 'textarea' | 'email' | 'member' | 'members' | 'json' | 'pairs' | 'mode' | 'cron' | 'timezone' | 'number' | 'select' | 'list';
|
|
1216
|
+
type FlowFieldKind$1 = 'text' | 'textarea' | 'email' | 'member' | 'members' | 'json' | 'pairs' | 'mode' | 'cron' | 'timezone' | 'number' | 'select' | 'list';
|
|
924
1217
|
interface FlowNodeField extends Omit<FlowParamDetail, 'kind'> {
|
|
925
1218
|
key: string;
|
|
926
|
-
kind: FlowFieldKind;
|
|
1219
|
+
kind: FlowFieldKind$1;
|
|
927
1220
|
}
|
|
928
1221
|
declare function flowNodeFields(definition: FlowNodeDefinition): FlowNodeField[];
|
|
929
1222
|
/** A number, unless it is a {{placeholder}} that a run fills in. */
|
|
@@ -931,6 +1224,8 @@ declare function flowNumberValue(value: unknown): unknown;
|
|
|
931
1224
|
/** data.merge accepts only this mode today. */
|
|
932
1225
|
declare const FLOW_MERGE_MODES: readonly string[];
|
|
933
1226
|
declare function flowParamLabelKey(key: string): string;
|
|
1227
|
+
/** Help for one field of one node type; a node type's own help from the catalogue wins. */
|
|
1228
|
+
declare function flowParamHelpKey(type: string, key: string): string;
|
|
934
1229
|
declare namespace flows_node_inspector_component_d_exports {
|
|
935
1230
|
export { FlowsNodeInspectorComponent };
|
|
936
1231
|
}
|
|
@@ -944,6 +1239,10 @@ declare class FlowsNodeInspectorComponent implements OnChanges, AfterViewChecked
|
|
|
944
1239
|
fieldSuggestions: string[];
|
|
945
1240
|
/** The lists Split out can pick from; empty until the node before it has run. */
|
|
946
1241
|
listSuggestions: string[];
|
|
1242
|
+
/** The same fields, by the connected node they come from; null hides the section. */
|
|
1243
|
+
fieldSources: FlowFieldSource[] | null;
|
|
1244
|
+
/** The workflow has not run yet, so no fields have been seen. */
|
|
1245
|
+
firstRun: boolean;
|
|
947
1246
|
private leaving?;
|
|
948
1247
|
readonly nodeChange: EventEmitter<FlowGraphNode>;
|
|
949
1248
|
readonly remove: EventEmitter<void>;
|
|
@@ -962,6 +1261,8 @@ declare class FlowsNodeInspectorComponent implements OnChanges, AfterViewChecked
|
|
|
962
1261
|
readonly diagram: import("@fortawesome/fontawesome-common-types").IconDefinition;
|
|
963
1262
|
readonly json: import("@fortawesome/fontawesome-common-types").IconDefinition;
|
|
964
1263
|
readonly warning: import("@fortawesome/fontawesome-common-types").IconDefinition;
|
|
1264
|
+
readonly collapsed: import("@fortawesome/fontawesome-common-types").IconDefinition;
|
|
1265
|
+
readonly expanded: import("@fortawesome/fontawesome-common-types").IconDefinition;
|
|
965
1266
|
};
|
|
966
1267
|
mergeModes: {
|
|
967
1268
|
value: string;
|
|
@@ -970,6 +1271,7 @@ declare class FlowsNodeInspectorComponent implements OnChanges, AfterViewChecked
|
|
|
970
1271
|
readonly defaultMergeMode: string;
|
|
971
1272
|
readonly labelKey: typeof flowNodeLabelKey;
|
|
972
1273
|
readonly paramLabelKey: typeof flowParamLabelKey;
|
|
1274
|
+
readonly paramHelpKey: typeof flowParamHelpKey;
|
|
973
1275
|
readonly numberValue: typeof flowNumberValue;
|
|
974
1276
|
/** `id` names the node too, so each node gets its own inputs. */
|
|
975
1277
|
fields: (FlowNodeField & {
|
|
@@ -985,6 +1287,7 @@ declare class FlowsNodeInspectorComponent implements OnChanges, AfterViewChecked
|
|
|
985
1287
|
fieldId(key: string): string;
|
|
986
1288
|
param(key: string): unknown;
|
|
987
1289
|
setParam(key: string, value: unknown): void;
|
|
1290
|
+
setRetry(retry: FlowGraphNode['retry']): void;
|
|
988
1291
|
setCondition(condition: unknown): void;
|
|
989
1292
|
private emit;
|
|
990
1293
|
static ɵfac: i0.ɵɵFactoryDeclaration<FlowsNodeInspectorComponent, never>;
|
|
@@ -1013,6 +1316,14 @@ declare class FlowsNodeInspectorComponent implements OnChanges, AfterViewChecked
|
|
|
1013
1316
|
"alias": "listSuggestions";
|
|
1014
1317
|
"required": false;
|
|
1015
1318
|
};
|
|
1319
|
+
"fieldSources": {
|
|
1320
|
+
"alias": "fieldSources";
|
|
1321
|
+
"required": false;
|
|
1322
|
+
};
|
|
1323
|
+
"firstRun": {
|
|
1324
|
+
"alias": "firstRun";
|
|
1325
|
+
"required": false;
|
|
1326
|
+
};
|
|
1016
1327
|
}, {
|
|
1017
1328
|
"nodeChange": "nodeChange";
|
|
1018
1329
|
"remove": "remove";
|
|
@@ -1099,6 +1410,8 @@ declare class FlowsConditionFieldComponent implements OnChanges {
|
|
|
1099
1410
|
readonly diagram: import("@fortawesome/fontawesome-common-types").IconDefinition;
|
|
1100
1411
|
readonly json: import("@fortawesome/fontawesome-common-types").IconDefinition;
|
|
1101
1412
|
readonly warning: import("@fortawesome/fontawesome-common-types").IconDefinition;
|
|
1413
|
+
readonly collapsed: import("@fortawesome/fontawesome-common-types").IconDefinition;
|
|
1414
|
+
readonly expanded: import("@fortawesome/fontawesome-common-types").IconDefinition;
|
|
1102
1415
|
};
|
|
1103
1416
|
options: Record<string, ConditionOption[]>;
|
|
1104
1417
|
readonly takesValue: typeof takesValue;
|
|
@@ -1170,6 +1483,8 @@ declare class FlowsPairsFieldComponent implements OnChanges {
|
|
|
1170
1483
|
readonly diagram: import("@fortawesome/fontawesome-common-types").IconDefinition;
|
|
1171
1484
|
readonly json: import("@fortawesome/fontawesome-common-types").IconDefinition;
|
|
1172
1485
|
readonly warning: import("@fortawesome/fontawesome-common-types").IconDefinition;
|
|
1486
|
+
readonly collapsed: import("@fortawesome/fontawesome-common-types").IconDefinition;
|
|
1487
|
+
readonly expanded: import("@fortawesome/fontawesome-common-types").IconDefinition;
|
|
1173
1488
|
};
|
|
1174
1489
|
pairs: Pair[];
|
|
1175
1490
|
private emitted;
|
|
@@ -1258,8 +1573,103 @@ declare class FlowsMemberFieldComponent implements OnChanges, OnDestroy {
|
|
|
1258
1573
|
"valueChange": "valueChange";
|
|
1259
1574
|
}, never, never, false, never>;
|
|
1260
1575
|
}
|
|
1576
|
+
declare namespace flows_retry_field_component_d_exports {
|
|
1577
|
+
export { FlowsRetryFieldComponent };
|
|
1578
|
+
}
|
|
1579
|
+
/** Whether a failed action node runs again, how often, and how long it waits first. */
|
|
1580
|
+
declare class FlowsRetryFieldComponent {
|
|
1581
|
+
value: FlowNodeRetry | undefined;
|
|
1582
|
+
inputId: string;
|
|
1583
|
+
readOnly: boolean;
|
|
1584
|
+
readonly valueChange: EventEmitter<FlowNodeRetry>;
|
|
1585
|
+
toggle(on: boolean): void;
|
|
1586
|
+
/** Kept within what the engine accepts, so a typo cannot block publishing. */
|
|
1587
|
+
set(key: keyof FlowNodeRetry, text: string, max: number): void;
|
|
1588
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FlowsRetryFieldComponent, never>;
|
|
1589
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FlowsRetryFieldComponent, "pw-flows-retry-field", never, {
|
|
1590
|
+
"value": {
|
|
1591
|
+
"alias": "value";
|
|
1592
|
+
"required": false;
|
|
1593
|
+
};
|
|
1594
|
+
"inputId": {
|
|
1595
|
+
"alias": "inputId";
|
|
1596
|
+
"required": false;
|
|
1597
|
+
};
|
|
1598
|
+
"readOnly": {
|
|
1599
|
+
"alias": "readOnly";
|
|
1600
|
+
"required": false;
|
|
1601
|
+
};
|
|
1602
|
+
}, {
|
|
1603
|
+
"valueChange": "valueChange";
|
|
1604
|
+
}, never, never, false, never>;
|
|
1605
|
+
}
|
|
1606
|
+
declare namespace flows_available_fields_component_d_exports {
|
|
1607
|
+
export { FlowFieldKind, FlowsAvailableFieldsComponent };
|
|
1608
|
+
}
|
|
1609
|
+
/** What a field is: a value, a list, or one key of a list's entries. */
|
|
1610
|
+
type FlowFieldKind = 'value' | 'list' | 'entry';
|
|
1611
|
+
/**
|
|
1612
|
+
* The fields of the items reaching a node, under the connected node each comes
|
|
1613
|
+
* from. Picking one fills the box last used in the same node panel, or the only
|
|
1614
|
+
* box when there is one, the way that box takes it: a placeholder in text, a
|
|
1615
|
+
* plain name where a field is named. Fields that box cannot take are not shown.
|
|
1616
|
+
*/
|
|
1617
|
+
declare class FlowsAvailableFieldsComponent {
|
|
1618
|
+
private readonly host;
|
|
1619
|
+
/** By the connected node each field comes from, nearest first. */
|
|
1620
|
+
sources: FlowFieldSource[];
|
|
1621
|
+
inputId: string;
|
|
1622
|
+
readOnly: boolean;
|
|
1623
|
+
firstRun: boolean;
|
|
1624
|
+
nodeType: string;
|
|
1625
|
+
readonly labelKey: typeof flowNodeLabelKey;
|
|
1626
|
+
query: string;
|
|
1627
|
+
/** The box a pick goes into takes a field's name rather than a placeholder. */
|
|
1628
|
+
names: boolean;
|
|
1629
|
+
private box?;
|
|
1630
|
+
constructor(host: ElementRef<HTMLElement>, cdr: ChangeDetectorRef);
|
|
1631
|
+
/** Counts only what the box can take, which is all that is shown. */
|
|
1632
|
+
get searchable(): boolean;
|
|
1633
|
+
remember(target: EventTarget | null): void;
|
|
1634
|
+
takesNames(): boolean;
|
|
1635
|
+
/** Whether anything of this source can go into the box. */
|
|
1636
|
+
offers(source: FlowFieldSource, names: boolean): boolean;
|
|
1637
|
+
matches(name: string): boolean;
|
|
1638
|
+
/** Split out splits a list; a field-name box takes no list entry. */
|
|
1639
|
+
fits(kind: FlowFieldKind, names: boolean): boolean;
|
|
1640
|
+
placeholder(field: string, names: boolean): string;
|
|
1641
|
+
/** `clients.*.id`: every entry's id, as a template reads a list. */
|
|
1642
|
+
entry(list: string, key: string): string;
|
|
1643
|
+
insert(field: string): void;
|
|
1644
|
+
/** The box last used, or the only one the panel has, so a node with one box needs no click into it. */
|
|
1645
|
+
private target;
|
|
1646
|
+
private onlyBox;
|
|
1647
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FlowsAvailableFieldsComponent, never>;
|
|
1648
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FlowsAvailableFieldsComponent, "pw-flows-available-fields", never, {
|
|
1649
|
+
"sources": {
|
|
1650
|
+
"alias": "sources";
|
|
1651
|
+
"required": false;
|
|
1652
|
+
};
|
|
1653
|
+
"inputId": {
|
|
1654
|
+
"alias": "inputId";
|
|
1655
|
+
"required": false;
|
|
1656
|
+
};
|
|
1657
|
+
"readOnly": {
|
|
1658
|
+
"alias": "readOnly";
|
|
1659
|
+
"required": false;
|
|
1660
|
+
};
|
|
1661
|
+
"firstRun": {
|
|
1662
|
+
"alias": "firstRun";
|
|
1663
|
+
"required": false;
|
|
1664
|
+
};
|
|
1665
|
+
"nodeType": {
|
|
1666
|
+
"alias": "nodeType";
|
|
1667
|
+
"required": false;
|
|
1668
|
+
};
|
|
1669
|
+
}, {}, never, never, false, never>;
|
|
1670
|
+
}
|
|
1261
1671
|
export declare class FlowsPrivateModule {
|
|
1262
1672
|
static ɵfac: i0.ɵɵFactoryDeclaration<FlowsPrivateModule, never>;
|
|
1263
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<FlowsPrivateModule, [typeof FlowsTabsComponent, typeof FlowsWorkflowsComponent, typeof FlowsWorkflowFormComponent, typeof FlowsWorkflowVersionsComponent, typeof FlowsVersionEditorComponent, typeof FlowsRunsComponent, typeof FlowsRunsFiltersComponent, typeof FlowsCronFieldComponent, typeof FlowsTimezoneFieldComponent, typeof FlowsRunInspectorComponent, typeof FlowsGraphCanvasComponent, typeof FlowsCanvasNodeComponent, typeof FlowsCanvasSocketComponent, typeof FlowsCanvasConnectionComponent, typeof FlowsNodePaletteComponent, typeof FlowsNodeInspectorComponent, typeof FlowsJsonFieldComponent, typeof FlowsConditionFieldComponent, typeof FlowsPairsFieldComponent, typeof FlowsMemberFieldComponent], [typeof
|
|
1673
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<FlowsPrivateModule, [typeof FlowsTabsComponent, typeof FlowsWorkflowsComponent, typeof FlowsWorkflowFormComponent, typeof FlowsWorkflowVersionsComponent, typeof FlowsVersionEditorComponent, typeof FlowsGraphCheckComponent, typeof FlowsRunsComponent, typeof FlowsRunsFiltersComponent, typeof FlowsCronFieldComponent, typeof FlowsTimezoneFieldComponent, typeof FlowsRunInspectorComponent, typeof FlowsRunProgressComponent, typeof FlowsStepErrorComponent, typeof FlowsGraphCanvasComponent, typeof FlowsCanvasNodeComponent, typeof FlowsCanvasSocketComponent, typeof FlowsCanvasConnectionComponent, typeof FlowsNodePaletteComponent, typeof FlowsNodeInspectorComponent, typeof FlowsJsonFieldComponent, typeof FlowsConditionFieldComponent, typeof FlowsPairsFieldComponent, typeof FlowsMemberFieldComponent, typeof FlowsRetryFieldComponent, typeof FlowsAvailableFieldsComponent], [typeof i26.CommonModule, typeof i27.FormsModule, typeof i27.ReactiveFormsModule, typeof i28.TrackDirtyFormDirective, typeof i29.CoreTranslocoModule, typeof i30.AppLoaderModule, typeof i31.SharedComponentsModule, typeof i32.PipesModule, typeof i33.FontAwesomeModule, typeof i34.IconFieldModule, typeof i35.InputIconModule, typeof i36.AutoCompleteModule, typeof i37.InputTextModule, typeof i38.ReteModule, typeof FlowsPrivateRoutingModule], never>;
|
|
1264
1674
|
static ɵinj: i0.ɵɵInjectorDeclaration<FlowsPrivateModule>;
|
|
1265
1675
|
}
|