@posiwise/flows 0.0.1 → 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.
@@ -1,11 +1,11 @@
1
1
  import * as i0 from "@angular/core";
2
- import { AfterViewChecked, AfterViewInit, ChangeDetectorRef, DestroyRef, EventEmitter, Injector, OnChanges, OnDestroy, OnInit, SimpleChanges } from "@angular/core";
2
+ import { AfterViewChecked, AfterViewInit, ChangeDetectorRef, DestroyRef, ElementRef, EventEmitter, Injector, OnChanges, OnDestroy, OnInit, SimpleChanges } from "@angular/core";
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 i25 from "@posiwise/shared-components";
6
+ import * as i31 from "@posiwise/shared-components";
7
7
  import { ConfirmDialogService } from "@posiwise/shared-components";
8
- import * as i22 from "@angular/forms";
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,15 +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 i21 from "@angular/common";
18
- import * as i23 from "@posiwise/core-transloco";
19
- import * as i24 from "@posiwise/app-loader";
20
- import * as i26 from "@fortawesome/angular-fontawesome";
21
- import * as i27 from "primeng/iconfield";
22
- import * as i28 from "primeng/inputicon";
23
- import * as i29 from "primeng/autocomplete";
24
- import * as i30 from "primeng/inputtext";
25
- import * as i31 from "rete-angular-plugin/22";
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";
26
28
  declare namespace flows_private_routing_module_d_exports {
27
29
  export { FlowsPrivateRoutingModule };
28
30
  }
@@ -88,12 +90,29 @@ declare function flowWorkflowStatusOptions(labels: readonly string[]): {
88
90
  declare function flowWorkflowForm(): UntypedFormGroup;
89
91
  declare function flowVersionBadgeClass(version: Pick<FlowVersion, 'published_at'>): string;
90
92
  declare function flowWorkflowBadgeClass(status: FlowWorkflowStatus): string;
91
- declare function flowVersionEditorTitleKey(version: FlowVersion | null): string;
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
+ }
92
110
  declare class FlowsWorkflowService {
93
111
  private readonly api;
94
112
  constructor(api: ProductsHttpService);
95
113
  getWorkflows(subscriptionId: number, status: FlowWorkflowStatus | null, paging?: Paging): Observable<FlowWorkflowListResponse>;
96
114
  getWorkflow(id: number, subscriptionId: number): Observable<FlowWorkflow>;
115
+ getVersion(id: number, subscriptionId: number): Observable<FlowVersion>;
97
116
  createWorkflow(subscriptionId: number, attrs: FlowWorkflowAttrs): Observable<FlowWorkflow>;
98
117
  updateWorkflow(id: number, subscriptionId: number, attrs: FlowWorkflowAttrs): Observable<FlowWorkflow>;
99
118
  /** 433 when the workflow has runs. subscription_id is a query param, not a body. */
@@ -102,8 +121,12 @@ declare class FlowsWorkflowService {
102
121
  createVersion(workflowId: number, subscriptionId: number, graph: unknown): Observable<FlowVersion>;
103
122
  /** Refused with 433 once the version is published. */
104
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>;
105
126
  /** Subscription admin only. Re-publishing is a server-side no-op. */
106
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>;
107
130
  static ɵfac: i0.ɵɵFactoryDeclaration<FlowsWorkflowService, never>;
108
131
  static ɵprov: i0.ɵɵInjectableDeclaration<any>;
109
132
  }
@@ -138,10 +161,13 @@ declare class FlowsWorkflowsComponent extends AppBaseComponent implements OnInit
138
161
  readonly versions: import("@fortawesome/fontawesome-common-types").IconDefinition;
139
162
  readonly search: import("@fortawesome/fontawesome-common-types").IconDefinition;
140
163
  readonly publish: import("@fortawesome/fontawesome-common-types").IconDefinition;
164
+ readonly duplicate: import("@fortawesome/fontawesome-common-types").IconDefinition;
141
165
  readonly fit: import("@fortawesome/fontawesome-common-types").IconDefinition;
142
166
  readonly diagram: import("@fortawesome/fontawesome-common-types").IconDefinition;
143
167
  readonly json: import("@fortawesome/fontawesome-common-types").IconDefinition;
144
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;
145
171
  };
146
172
  readonly badgeClass: typeof flowWorkflowBadgeClass;
147
173
  constructor(injector: Injector, workflowService: FlowsWorkflowService, confirmDialog: ConfirmDialogService, cdr: ChangeDetectorRef);
@@ -186,10 +212,13 @@ declare class FlowsWorkflowFormComponent extends AppBaseComponent implements OnI
186
212
  readonly versions: import("@fortawesome/fontawesome-common-types").IconDefinition;
187
213
  readonly search: import("@fortawesome/fontawesome-common-types").IconDefinition;
188
214
  readonly publish: import("@fortawesome/fontawesome-common-types").IconDefinition;
215
+ readonly duplicate: import("@fortawesome/fontawesome-common-types").IconDefinition;
189
216
  readonly fit: import("@fortawesome/fontawesome-common-types").IconDefinition;
190
217
  readonly diagram: import("@fortawesome/fontawesome-common-types").IconDefinition;
191
218
  readonly json: import("@fortawesome/fontawesome-common-types").IconDefinition;
192
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;
193
222
  };
194
223
  constructor(injector: Injector, workflowService: FlowsWorkflowService, cdr: ChangeDetectorRef);
195
224
  get isEdit(): boolean;
@@ -204,6 +233,20 @@ declare class FlowsWorkflowFormComponent extends AppBaseComponent implements OnI
204
233
  static ɵfac: i0.ɵɵFactoryDeclaration<FlowsWorkflowFormComponent, never>;
205
234
  static ɵcmp: i0.ɵɵComponentDeclaration<FlowsWorkflowFormComponent, "pw-flows-workflow-form", never, {}, {}, never, never, false, never>;
206
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
+ }
207
250
  declare namespace flows_workflow_versions_component_d_exports {
208
251
  export { FlowsWorkflowVersionsComponent };
209
252
  }
@@ -220,9 +263,7 @@ declare class FlowsWorkflowVersionsComponent extends AppBaseComponent implements
220
263
  versions: FlowVersion[];
221
264
  /** Shown against versions.length so the 500-row cap stays visible. */
222
265
  totalRecords: number;
223
- editorOpen: boolean;
224
- /** Null when authoring a new version. */
225
- editorVersion: FlowVersion | null;
266
+ readonly editor: FlowVersionEditorState;
226
267
  /** Set by a link from a run; opened once, on the first load. */
227
268
  private requestedVersionId;
228
269
  icons: {
@@ -235,10 +276,13 @@ declare class FlowsWorkflowVersionsComponent extends AppBaseComponent implements
235
276
  readonly versions: import("@fortawesome/fontawesome-common-types").IconDefinition;
236
277
  readonly search: import("@fortawesome/fontawesome-common-types").IconDefinition;
237
278
  readonly publish: import("@fortawesome/fontawesome-common-types").IconDefinition;
279
+ readonly duplicate: import("@fortawesome/fontawesome-common-types").IconDefinition;
238
280
  readonly fit: import("@fortawesome/fontawesome-common-types").IconDefinition;
239
281
  readonly diagram: import("@fortawesome/fontawesome-common-types").IconDefinition;
240
282
  readonly json: import("@fortawesome/fontawesome-common-types").IconDefinition;
241
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;
242
286
  };
243
287
  readonly isPublished: typeof isFlowVersionPublished;
244
288
  readonly badgeClass: typeof flowVersionBadgeClass;
@@ -246,10 +290,14 @@ declare class FlowsWorkflowVersionsComponent extends AppBaseComponent implements
246
290
  constructor(injector: Injector, workflowService: FlowsWorkflowService, permissions: PermissionService, cdr: ChangeDetectorRef);
247
291
  ngOnInit(): void;
248
292
  ngOnDestroy(): void;
249
- openEditor(version?: FlowVersion | null): void;
293
+ openEditor(version?: FlowVersion | null, duplicateOf?: FlowVersion | null): void;
294
+ /** Opens an unsaved new version holding a copy of this one's graph. */
295
+ duplicate(version: FlowVersion): void;
250
296
  closeEditor(): void;
251
297
  onVersionSaved(): void;
298
+ /** Checked first: a version that would be refused opens with its problems listed instead. */
252
299
  publish(version: FlowVersion): void;
300
+ private publishOutcome;
253
301
  back(): void;
254
302
  private loadWorkflow;
255
303
  private load;
@@ -258,10 +306,41 @@ declare class FlowsWorkflowVersionsComponent extends AppBaseComponent implements
258
306
  static ɵfac: i0.ɵɵFactoryDeclaration<FlowsWorkflowVersionsComponent, never>;
259
307
  static ɵcmp: i0.ɵɵComponentDeclaration<FlowsWorkflowVersionsComponent, "pw-flows-workflow-versions", never, {}, {}, never, never, false, never>;
260
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[];
261
326
  type FlowNodeCategory = 'trigger' | 'logic' | 'data' | 'action';
262
327
  declare const FLOW_NODE_CATEGORIES: readonly FlowNodeCategory[];
263
328
  /** An edge with no branch leaves through `next`. */
264
329
  declare const DEFAULT_FLOW_BRANCH = "next";
330
+ /** What the catalogue says about one param of a node. Every part is optional. */
331
+ interface FlowParamDetail {
332
+ label?: string;
333
+ description?: string;
334
+ placeholder?: string;
335
+ kind?: 'text' | 'textarea' | 'number' | 'select';
336
+ options?: string[];
337
+ required?: boolean;
338
+ }
339
+ /** Field names of an item, and of the entries of each list in it. */
340
+ interface FlowItemFields {
341
+ names: string[];
342
+ lists: Record<string, string[]>;
343
+ }
265
344
  interface FlowNodeDefinition {
266
345
  type: string;
267
346
  category: FlowNodeCategory;
@@ -269,8 +348,16 @@ interface FlowNodeDefinition {
269
348
  label: string;
270
349
  /** The only param keys this node may carry. */
271
350
  params: string[];
351
+ /** Keyed by param; set on nodes an integration supplies, empty on the engine's own. */
352
+ param_details?: Record<string, FlowParamDetail>;
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. */
356
+ item_fields?: FlowItemFields;
272
357
  condition: boolean;
273
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;
274
361
  }
275
362
  interface FlowNodeListResponse {
276
363
  flow_nodes: FlowNodeDefinition[];
@@ -281,11 +368,18 @@ interface FlowGraphPosition {
281
368
  x: number;
282
369
  y: number;
283
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;
284
377
  interface FlowGraphNode {
285
378
  id: string;
286
379
  type: string;
287
380
  params?: Record<string, unknown>;
288
381
  condition?: Record<string, unknown>;
382
+ retry?: FlowNodeRetry;
289
383
  position?: FlowGraphPosition;
290
384
  }
291
385
  interface FlowGraphEdge {
@@ -300,6 +394,10 @@ interface FlowNodeSelection {
300
394
  /** Null when the catalogue no longer lists the node's type. */
301
395
  definition: FlowNodeDefinition | null;
302
396
  fieldSuggestions: string[];
397
+ /** The lists an item reaching the node can hold, for Split out to pick from. */
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;
303
401
  }
304
402
  interface FlowGraph {
305
403
  nodes: FlowGraphNode[];
@@ -310,6 +408,27 @@ declare function toFlowGraph(value: unknown): FlowGraph;
310
408
  declare function nextFlowNodeId(nodes: readonly Pick<FlowGraphNode, 'id'>[]): string;
311
409
  declare function nextFlowEdgeId(edges: readonly FlowGraphEdge[]): string;
312
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;
313
432
  declare class FlowsNodeService {
314
433
  private readonly api;
315
434
  private readonly cache;
@@ -318,77 +437,6 @@ declare class FlowsNodeService {
318
437
  static ɵfac: i0.ɵɵFactoryDeclaration<FlowsNodeService, never>;
319
438
  static ɵprov: i0.ɵɵInjectableDeclaration<any>;
320
439
  }
321
- declare namespace flows_version_editor_component_d_exports {
322
- export { FlowsVersionEditorComponent };
323
- }
324
- type EditorView = 'canvas' | 'json';
325
- declare class FlowsVersionEditorComponent implements OnInit, OnChanges, OnDestroy {
326
- private readonly workflowService;
327
- private readonly nodeService;
328
- private readonly cdr;
329
- private readonly destroy$;
330
- /** Null when authoring a new version. */
331
- version: FlowVersion | null;
332
- workflowId: number;
333
- subscriptionId: number;
334
- readonly saved: EventEmitter<void>;
335
- readonly cancelled: EventEmitter<void>;
336
- private readonly canvas?;
337
- readonly icons: {
338
- readonly inspect: import("@fortawesome/fontawesome-common-types").IconDefinition;
339
- readonly back: import("@fortawesome/fontawesome-common-types").IconDefinition;
340
- readonly error: import("@fortawesome/fontawesome-common-types").IconDefinition;
341
- readonly create: import("@fortawesome/fontawesome-common-types").IconDefinition;
342
- readonly edit: import("@fortawesome/fontawesome-common-types").IconDefinition;
343
- readonly delete: import("@fortawesome/fontawesome-common-types").IconDefinition;
344
- readonly versions: import("@fortawesome/fontawesome-common-types").IconDefinition;
345
- readonly search: import("@fortawesome/fontawesome-common-types").IconDefinition;
346
- readonly publish: import("@fortawesome/fontawesome-common-types").IconDefinition;
347
- readonly fit: import("@fortawesome/fontawesome-common-types").IconDefinition;
348
- readonly diagram: import("@fortawesome/fontawesome-common-types").IconDefinition;
349
- readonly json: import("@fortawesome/fontawesome-common-types").IconDefinition;
350
- readonly warning: import("@fortawesome/fontawesome-common-types").IconDefinition;
351
- };
352
- definitions: FlowNodeDefinition[];
353
- loading: boolean;
354
- loadFailed: boolean;
355
- graph: FlowGraph;
356
- view: EditorView;
357
- json: string;
358
- selection: FlowNodeSelection | null;
359
- dropped: FlowGraphEdge[];
360
- saving: boolean;
361
- constructor(workflowService: FlowsWorkflowService, nodeService: FlowsNodeService, cdr: ChangeDetectorRef);
362
- get readOnly(): boolean;
363
- get headingKey(): string;
364
- ngOnInit(): void;
365
- ngOnChanges(changes: SimpleChanges): void;
366
- select(nodeId: string | null): void;
367
- updateSelected(node: FlowGraphNode): void;
368
- removeSelected(): void;
369
- show(view: EditorView): void;
370
- save(): void;
371
- cancel(): void;
372
- ngOnDestroy(): void;
373
- static ɵfac: i0.ɵɵFactoryDeclaration<FlowsVersionEditorComponent, never>;
374
- static ɵcmp: i0.ɵɵComponentDeclaration<FlowsVersionEditorComponent, "pw-flows-version-editor", never, {
375
- "version": {
376
- "alias": "version";
377
- "required": false;
378
- };
379
- "workflowId": {
380
- "alias": "workflowId";
381
- "required": false;
382
- };
383
- "subscriptionId": {
384
- "alias": "subscriptionId";
385
- "required": false;
386
- };
387
- }, {
388
- "saved": "saved";
389
- "cancelled": "cancelled";
390
- }, never, never, false, never>;
391
- }
392
440
  type FlowRunStatus = 'running' | 'awaiting' | 'succeeded' | 'failed';
393
441
  type FlowRunStepStatus = 'pending' | 'running' | 'awaiting' | 'succeeded' | 'failed' | 'skipped';
394
442
  declare const FLOW_RUN_TERMINAL_STATUSES: readonly FlowRunStatus[];
@@ -417,6 +465,8 @@ interface FlowRunStep {
417
465
  error: string | null;
418
466
  attempts: number;
419
467
  awaiting_since: string | null;
468
+ /** Set while a failed step waits to run again. */
469
+ retry_at?: string | null;
420
470
  started_at: string | null;
421
471
  finished_at: string | null;
422
472
  created_at: string;
@@ -444,6 +494,8 @@ declare const FLOW_RUN_STATUS_KEYS: readonly string[];
444
494
  declare function elapsedMs(from: string | null, to: string | null): number | null;
445
495
  declare function flowRunBadgeClass(status: FlowRunStatus): string;
446
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;
447
499
  interface FlowRunDetail {
448
500
  run: FlowRun;
449
501
  steps: FlowRunStepListResponse;
@@ -462,10 +514,224 @@ declare class FlowsRunService {
462
514
  watchRuns(subscriptionId: number, query?: FlowRunQuery, paging?: Paging): Observable<FlowRunListResponse>;
463
515
  watchRun(id: number, subscriptionId: number, paging?: Paging): Observable<FlowRunDetail>;
464
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>;
465
519
  private definedQuery;
466
520
  static ɵfac: i0.ɵɵFactoryDeclaration<FlowsRunService, never>;
467
521
  static ɵprov: i0.ɵɵInjectableDeclaration<any>;
468
522
  }
523
+ declare namespace flows_version_editor_component_d_exports {
524
+ export { FlowsVersionEditorComponent };
525
+ }
526
+ type EditorView = 'canvas' | 'json';
527
+ declare class FlowsVersionEditorComponent implements OnInit, OnChanges, OnDestroy {
528
+ private readonly workflowService;
529
+ private readonly nodeService;
530
+ private readonly runService;
531
+ private readonly cdr;
532
+ private readonly destroy$;
533
+ /** Null when authoring a new version. */
534
+ version: FlowVersion | null;
535
+ /** A new version starts from a copy of this one's graph. */
536
+ duplicateOf: FlowVersion | null;
537
+ workflowId: number;
538
+ subscriptionId: number;
539
+ /** Why publishing this version was refused, when that is why it is open. */
540
+ check: FlowGraphCheck | null;
541
+ readonly saved: EventEmitter<void>;
542
+ readonly cancelled: EventEmitter<void>;
543
+ private readonly canvas?;
544
+ readonly icons: {
545
+ readonly inspect: import("@fortawesome/fontawesome-common-types").IconDefinition;
546
+ readonly back: import("@fortawesome/fontawesome-common-types").IconDefinition;
547
+ readonly error: import("@fortawesome/fontawesome-common-types").IconDefinition;
548
+ readonly create: import("@fortawesome/fontawesome-common-types").IconDefinition;
549
+ readonly edit: import("@fortawesome/fontawesome-common-types").IconDefinition;
550
+ readonly delete: import("@fortawesome/fontawesome-common-types").IconDefinition;
551
+ readonly versions: import("@fortawesome/fontawesome-common-types").IconDefinition;
552
+ readonly search: import("@fortawesome/fontawesome-common-types").IconDefinition;
553
+ readonly publish: import("@fortawesome/fontawesome-common-types").IconDefinition;
554
+ readonly duplicate: import("@fortawesome/fontawesome-common-types").IconDefinition;
555
+ readonly fit: import("@fortawesome/fontawesome-common-types").IconDefinition;
556
+ readonly diagram: import("@fortawesome/fontawesome-common-types").IconDefinition;
557
+ readonly json: import("@fortawesome/fontawesome-common-types").IconDefinition;
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;
561
+ };
562
+ definitions: FlowNodeDefinition[];
563
+ /** The fields each node handed on the last time the workflow ran. */
564
+ workflowFields$?: Observable<FlowWorkflowFields>;
565
+ loading: boolean;
566
+ loadFailed: boolean;
567
+ graph: FlowGraph;
568
+ view: EditorView;
569
+ json: string;
570
+ selection: FlowNodeSelection | null;
571
+ dropped: FlowGraphEdge[];
572
+ saving: boolean;
573
+ constructor(workflowService: FlowsWorkflowService, nodeService: FlowsNodeService, runService: FlowsRunService, cdr: ChangeDetectorRef);
574
+ get readOnly(): boolean;
575
+ get headingKey(): string;
576
+ ngOnInit(): void;
577
+ ngOnChanges(changes: SimpleChanges): void;
578
+ select(nodeId: string | null): void;
579
+ updateSelected(node: FlowGraphNode): void;
580
+ removeSelected(): void;
581
+ show(view: EditorView): void;
582
+ save(): void;
583
+ cancel(): void;
584
+ ngOnDestroy(): void;
585
+ static ɵfac: i0.ɵɵFactoryDeclaration<FlowsVersionEditorComponent, never>;
586
+ static ɵcmp: i0.ɵɵComponentDeclaration<FlowsVersionEditorComponent, "pw-flows-version-editor", never, {
587
+ "version": {
588
+ "alias": "version";
589
+ "required": false;
590
+ };
591
+ "duplicateOf": {
592
+ "alias": "duplicateOf";
593
+ "required": false;
594
+ };
595
+ "workflowId": {
596
+ "alias": "workflowId";
597
+ "required": false;
598
+ };
599
+ "subscriptionId": {
600
+ "alias": "subscriptionId";
601
+ "required": false;
602
+ };
603
+ "check": {
604
+ "alias": "check";
605
+ "required": false;
606
+ };
607
+ }, {
608
+ "saved": "saved";
609
+ "cancelled": "cancelled";
610
+ }, never, never, false, never>;
611
+ }
612
+ declare namespace flows_graph_canvas_component_d_exports {
613
+ export { FlowsGraphCanvasComponent };
614
+ }
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>;
669
+ }
670
+ declare namespace flows_graph_check_component_d_exports {
671
+ export { FlowGraphCheckRow, FlowsGraphCheckComponent };
672
+ }
673
+ interface FlowGraphCheckRow {
674
+ issue: FlowGraphIssue;
675
+ severity: 'error' | 'warning';
676
+ place: string;
677
+ text: string;
678
+ }
679
+ /**
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.
682
+ */
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>;
734
+ }
469
735
  declare namespace flows_runs_component_d_exports {
470
736
  export { FlowsRunsComponent };
471
737
  }
@@ -499,10 +765,13 @@ declare class FlowsRunsComponent extends AppBaseComponent implements OnInit {
499
765
  readonly versions: import("@fortawesome/fontawesome-common-types").IconDefinition;
500
766
  readonly search: import("@fortawesome/fontawesome-common-types").IconDefinition;
501
767
  readonly publish: import("@fortawesome/fontawesome-common-types").IconDefinition;
768
+ readonly duplicate: import("@fortawesome/fontawesome-common-types").IconDefinition;
502
769
  readonly fit: import("@fortawesome/fontawesome-common-types").IconDefinition;
503
770
  readonly diagram: import("@fortawesome/fontawesome-common-types").IconDefinition;
504
771
  readonly json: import("@fortawesome/fontawesome-common-types").IconDefinition;
505
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;
506
775
  };
507
776
  constructor(injector: Injector, flowsRunService: FlowsRunService, cdr: ChangeDetectorRef);
508
777
  ngOnInit(): void;
@@ -652,6 +921,8 @@ declare namespace flows_run_inspector_component_d_exports {
652
921
  }
653
922
  declare class FlowsRunInspectorComponent extends AppBaseComponent implements OnInit {
654
923
  private readonly flowsRunService;
924
+ private readonly workflowService;
925
+ private readonly nodeService;
655
926
  private readonly cdr;
656
927
  private readonly destroy$;
657
928
  private watch$?;
@@ -670,76 +941,135 @@ declare class FlowsRunInspectorComponent extends AppBaseComponent implements OnI
670
941
  readonly versions: import("@fortawesome/fontawesome-common-types").IconDefinition;
671
942
  readonly search: import("@fortawesome/fontawesome-common-types").IconDefinition;
672
943
  readonly publish: import("@fortawesome/fontawesome-common-types").IconDefinition;
944
+ readonly duplicate: import("@fortawesome/fontawesome-common-types").IconDefinition;
673
945
  readonly fit: import("@fortawesome/fontawesome-common-types").IconDefinition;
674
946
  readonly diagram: import("@fortawesome/fontawesome-common-types").IconDefinition;
675
947
  readonly json: import("@fortawesome/fontawesome-common-types").IconDefinition;
676
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;
677
951
  };
678
952
  readonly openSteps: Set<number>;
679
953
  readonly trackByStep: (_: number, step: FlowRunStep) => number;
680
- constructor(injector: Injector, flowsRunService: FlowsRunService, cdr: ChangeDetectorRef);
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);
681
962
  ngOnInit(): void;
682
963
  ngOnDestroy(): void;
683
964
  back(): void;
684
965
  runBadgeClass(status: FlowRunStatus): string;
685
966
  stepBadgeClass(status: FlowRunStepStatus): string;
686
967
  elapsed(from: string | null, to: string | null): number | null;
687
- onStepToggle(stepId: number, event: Event): void;
968
+ toggleItems(stepId: number): void;
688
969
  asJson(value: unknown): string;
689
970
  private watch;
971
+ private nameNodes;
690
972
  private fail;
691
973
  private settle;
692
974
  static ɵfac: i0.ɵɵFactoryDeclaration<FlowsRunInspectorComponent, never>;
693
975
  static ɵcmp: i0.ɵɵComponentDeclaration<FlowsRunInspectorComponent, "pw-flows-run-inspector", never, {}, {}, never, never, false, never>;
694
976
  }
695
- declare namespace flows_graph_canvas_component_d_exports {
696
- export { FlowsGraphCanvasComponent };
697
- }
698
- declare class FlowsGraphCanvasComponent implements AfterViewInit, OnChanges, OnDestroy {
699
- private readonly injector;
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 {
700
995
  private readonly cdr;
701
- graph: FlowGraph;
702
- definitions: FlowNodeDefinition[];
703
- readOnly: boolean;
704
- readonly selectionChange: EventEmitter<string>;
705
- readonly graphChange: EventEmitter<void>;
706
- /** Stored edges the canvas cannot draw, reported after every load. */
707
- readonly dropped: EventEmitter<FlowGraphEdge[]>;
708
- private readonly host;
709
- drawFailed: boolean;
710
- private editor?;
711
- private pending;
712
- constructor(injector: Injector, cdr: ChangeDetectorRef);
713
- ngAfterViewInit(): void;
714
- ngOnChanges(changes: SimpleChanges): void;
715
- addNode(type: string): Promise<void>;
716
- removeNode(nodeId: string): Promise<void>;
717
- updateNode(nodeId: string, flowNode: FlowGraphNode): Promise<void>;
718
- selection(nodeId: string): FlowNodeSelection | null;
719
- toGraph(): FlowGraph;
720
- 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;
721
1006
  ngOnDestroy(): void;
722
- private reload;
723
- private queue;
724
- static ɵfac: i0.ɵɵFactoryDeclaration<FlowsGraphCanvasComponent, never>;
725
- static ɵcmp: i0.ɵɵComponentDeclaration<FlowsGraphCanvasComponent, "pw-flows-graph-canvas", never, {
726
- "graph": {
727
- "alias": "graph";
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";
728
1016
  "required": false;
729
1017
  };
730
- "definitions": {
731
- "alias": "definitions";
1018
+ "nodeIds": {
1019
+ "alias": "nodeIds";
732
1020
  "required": false;
733
1021
  };
734
- "readOnly": {
735
- "alias": "readOnly";
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";
736
1066
  "required": false;
737
1067
  };
738
- }, {
739
- "selectionChange": "selectionChange";
740
- "graphChange": "graphChange";
741
- "dropped": "dropped";
742
- }, never, never, false, never>;
1068
+ "retrying": {
1069
+ "alias": "retrying";
1070
+ "required": false;
1071
+ };
1072
+ }, {}, never, never, false, never>;
743
1073
  }
744
1074
  declare const FLOW_INPUT = "in";
745
1075
  declare class FlowCanvasNode extends ClassicPreset.Node {
@@ -883,25 +1213,36 @@ declare class FlowsNodePaletteComponent implements OnChanges {
883
1213
  "add": "add";
884
1214
  }, never, never, false, never>;
885
1215
  }
886
- type FlowFieldKind = 'text' | 'textarea' | 'email' | 'member' | 'members' | 'json' | 'pairs' | 'mode' | 'cron' | 'timezone';
887
- interface FlowNodeField {
1216
+ type FlowFieldKind$1 = 'text' | 'textarea' | 'email' | 'member' | 'members' | 'json' | 'pairs' | 'mode' | 'cron' | 'timezone' | 'number' | 'select' | 'list';
1217
+ interface FlowNodeField extends Omit<FlowParamDetail, 'kind'> {
888
1218
  key: string;
889
- kind: FlowFieldKind;
1219
+ kind: FlowFieldKind$1;
890
1220
  }
891
1221
  declare function flowNodeFields(definition: FlowNodeDefinition): FlowNodeField[];
1222
+ /** A number, unless it is a {{placeholder}} that a run fills in. */
1223
+ declare function flowNumberValue(value: unknown): unknown;
892
1224
  /** data.merge accepts only this mode today. */
893
1225
  declare const FLOW_MERGE_MODES: readonly string[];
894
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;
895
1229
  declare namespace flows_node_inspector_component_d_exports {
896
1230
  export { FlowsNodeInspectorComponent };
897
1231
  }
898
1232
  declare class FlowsNodeInspectorComponent implements OnChanges, AfterViewChecked {
1233
+ private readonly host;
899
1234
  node: FlowGraphNode;
900
1235
  /** Null when the catalogue no longer lists the node's type. */
901
1236
  definition: FlowNodeDefinition | null;
902
1237
  subscriptionId: number;
903
1238
  readOnly: boolean;
904
1239
  fieldSuggestions: string[];
1240
+ /** The lists Split out can pick from; empty until the node before it has run. */
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;
905
1246
  private leaving?;
906
1247
  readonly nodeChange: EventEmitter<FlowGraphNode>;
907
1248
  readonly remove: EventEmitter<void>;
@@ -915,10 +1256,13 @@ declare class FlowsNodeInspectorComponent implements OnChanges, AfterViewChecked
915
1256
  readonly versions: import("@fortawesome/fontawesome-common-types").IconDefinition;
916
1257
  readonly search: import("@fortawesome/fontawesome-common-types").IconDefinition;
917
1258
  readonly publish: import("@fortawesome/fontawesome-common-types").IconDefinition;
1259
+ readonly duplicate: import("@fortawesome/fontawesome-common-types").IconDefinition;
918
1260
  readonly fit: import("@fortawesome/fontawesome-common-types").IconDefinition;
919
1261
  readonly diagram: import("@fortawesome/fontawesome-common-types").IconDefinition;
920
1262
  readonly json: import("@fortawesome/fontawesome-common-types").IconDefinition;
921
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;
922
1266
  };
923
1267
  mergeModes: {
924
1268
  value: string;
@@ -927,14 +1271,23 @@ declare class FlowsNodeInspectorComponent implements OnChanges, AfterViewChecked
927
1271
  readonly defaultMergeMode: string;
928
1272
  readonly labelKey: typeof flowNodeLabelKey;
929
1273
  readonly paramLabelKey: typeof flowParamLabelKey;
930
- fields: FlowNodeField[];
1274
+ readonly paramHelpKey: typeof flowParamHelpKey;
1275
+ readonly numberValue: typeof flowNumberValue;
1276
+ /** `id` names the node too, so each node gets its own inputs. */
1277
+ fields: (FlowNodeField & {
1278
+ id: string;
1279
+ })[];
931
1280
  conditionNotAnObject: boolean;
932
- constructor(translation: TranslocoService, cdr: ChangeDetectorRef, destroyRef: DestroyRef);
1281
+ constructor(translation: TranslocoService, cdr: ChangeDetectorRef, destroyRef: DestroyRef, host: ElementRef<HTMLElement>);
933
1282
  ngOnChanges(changes: SimpleChanges): void;
1283
+ private saveFieldBeingTyped;
934
1284
  ngAfterViewChecked(): void;
1285
+ /** A list is picked from what is known, and typed when nothing is known yet. */
1286
+ kindOf(field: FlowNodeField): FlowNodeField['kind'];
935
1287
  fieldId(key: string): string;
936
1288
  param(key: string): unknown;
937
1289
  setParam(key: string, value: unknown): void;
1290
+ setRetry(retry: FlowGraphNode['retry']): void;
938
1291
  setCondition(condition: unknown): void;
939
1292
  private emit;
940
1293
  static ɵfac: i0.ɵɵFactoryDeclaration<FlowsNodeInspectorComponent, never>;
@@ -959,6 +1312,18 @@ declare class FlowsNodeInspectorComponent implements OnChanges, AfterViewChecked
959
1312
  "alias": "fieldSuggestions";
960
1313
  "required": false;
961
1314
  };
1315
+ "listSuggestions": {
1316
+ "alias": "listSuggestions";
1317
+ "required": false;
1318
+ };
1319
+ "fieldSources": {
1320
+ "alias": "fieldSources";
1321
+ "required": false;
1322
+ };
1323
+ "firstRun": {
1324
+ "alias": "firstRun";
1325
+ "required": false;
1326
+ };
962
1327
  }, {
963
1328
  "nodeChange": "nodeChange";
964
1329
  "remove": "remove";
@@ -1040,10 +1405,13 @@ declare class FlowsConditionFieldComponent implements OnChanges {
1040
1405
  readonly versions: import("@fortawesome/fontawesome-common-types").IconDefinition;
1041
1406
  readonly search: import("@fortawesome/fontawesome-common-types").IconDefinition;
1042
1407
  readonly publish: import("@fortawesome/fontawesome-common-types").IconDefinition;
1408
+ readonly duplicate: import("@fortawesome/fontawesome-common-types").IconDefinition;
1043
1409
  readonly fit: import("@fortawesome/fontawesome-common-types").IconDefinition;
1044
1410
  readonly diagram: import("@fortawesome/fontawesome-common-types").IconDefinition;
1045
1411
  readonly json: import("@fortawesome/fontawesome-common-types").IconDefinition;
1046
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;
1047
1415
  };
1048
1416
  options: Record<string, ConditionOption[]>;
1049
1417
  readonly takesValue: typeof takesValue;
@@ -1110,10 +1478,13 @@ declare class FlowsPairsFieldComponent implements OnChanges {
1110
1478
  readonly versions: import("@fortawesome/fontawesome-common-types").IconDefinition;
1111
1479
  readonly search: import("@fortawesome/fontawesome-common-types").IconDefinition;
1112
1480
  readonly publish: import("@fortawesome/fontawesome-common-types").IconDefinition;
1481
+ readonly duplicate: import("@fortawesome/fontawesome-common-types").IconDefinition;
1113
1482
  readonly fit: import("@fortawesome/fontawesome-common-types").IconDefinition;
1114
1483
  readonly diagram: import("@fortawesome/fontawesome-common-types").IconDefinition;
1115
1484
  readonly json: import("@fortawesome/fontawesome-common-types").IconDefinition;
1116
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;
1117
1488
  };
1118
1489
  pairs: Pair[];
1119
1490
  private emitted;
@@ -1202,8 +1573,103 @@ declare class FlowsMemberFieldComponent implements OnChanges, OnDestroy {
1202
1573
  "valueChange": "valueChange";
1203
1574
  }, never, never, false, never>;
1204
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
+ }
1205
1671
  export declare class FlowsPrivateModule {
1206
1672
  static ɵfac: i0.ɵɵFactoryDeclaration<FlowsPrivateModule, never>;
1207
- 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 i21.CommonModule, typeof i22.FormsModule, typeof i22.ReactiveFormsModule, typeof i23.CoreTranslocoModule, typeof i24.AppLoaderModule, typeof i25.SharedComponentsModule, typeof i26.FontAwesomeModule, typeof i27.IconFieldModule, typeof i28.InputIconModule, typeof i29.AutoCompleteModule, typeof i30.InputTextModule, typeof i31.ReteModule, typeof FlowsPrivateRoutingModule], never>;
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>;
1208
1674
  static ɵinj: i0.ɵɵInjectorDeclaration<FlowsPrivateModule>;
1209
1675
  }