@posiwise/flows 0.0.0-stage → 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,1209 @@
1
+ import * as i0 from "@angular/core";
2
+ import { AfterViewChecked, AfterViewInit, ChangeDetectorRef, DestroyRef, EventEmitter, Injector, OnChanges, OnDestroy, OnInit, SimpleChanges } from "@angular/core";
3
+ import * as i1 from "@angular/router";
4
+ import { LazyLoadEvent, MenuItem } from "primeng/api";
5
+ import { AppBaseComponent } from "@posiwise/app-base-component";
6
+ import * as i25 from "@posiwise/shared-components";
7
+ import { ConfirmDialogService } from "@posiwise/shared-components";
8
+ import * as i22 from "@angular/forms";
9
+ import { UntypedFormGroup } from "@angular/forms";
10
+ import { Paging } from "@posiwise/common-utilities";
11
+ import { ProductsHttpService } from "@posiwise/shared-product-services";
12
+ import { Observable } from "rxjs";
13
+ import { PermissionService, SubscriptionService } from "@posiwise/common-services";
14
+ import { TranslocoService } from "@jsverse/transloco";
15
+ import { ClassicPreset, GetSchemes } from "rete";
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";
26
+ declare namespace flows_private_routing_module_d_exports {
27
+ export { FlowsPrivateRoutingModule };
28
+ }
29
+ export declare class FlowsPrivateRoutingModule {
30
+ static ɵfac: i0.ɵɵFactoryDeclaration<FlowsPrivateRoutingModule, never>;
31
+ static ɵmod: i0.ɵɵNgModuleDeclaration<FlowsPrivateRoutingModule, never, [typeof i1.RouterModule], [typeof i1.RouterModule]>;
32
+ static ɵinj: i0.ɵɵInjectorDeclaration<FlowsPrivateRoutingModule>;
33
+ }
34
+ declare namespace flows_tabs_component_d_exports {
35
+ export { FlowsTabsComponent };
36
+ }
37
+ declare class FlowsTabsComponent {
38
+ items: MenuItem[];
39
+ constructor();
40
+ static ɵfac: i0.ɵɵFactoryDeclaration<FlowsTabsComponent, never>;
41
+ static ɵcmp: i0.ɵɵComponentDeclaration<FlowsTabsComponent, "pw-flows-tabs", never, {}, {}, never, never, false, never>;
42
+ }
43
+ type FlowWorkflowStatus = 'draft' | 'active' | 'paused';
44
+ declare const FLOW_WORKFLOW_STATUS_ORDER: readonly FlowWorkflowStatus[];
45
+ declare const FLOW_WORKFLOW_STATUS_KEYS: readonly string[];
46
+ interface FlowWorkflow {
47
+ id: number;
48
+ flow_id: number;
49
+ name: string;
50
+ description: string | null;
51
+ status: FlowWorkflowStatus;
52
+ created_by_user_id: number;
53
+ created_at: string;
54
+ updated_at: string;
55
+ }
56
+ interface FlowVersion {
57
+ id: number;
58
+ flow_workflow_id: number;
59
+ /** Server-assigned (max + 1); a client-supplied value is ignored. */
60
+ version: number;
61
+ graph: unknown;
62
+ /** Non-null means published — and published means immutable (433 on update). */
63
+ published_at: string | null;
64
+ created_by_user_id: number;
65
+ created_at: string;
66
+ updated_at: string;
67
+ }
68
+ interface FlowWorkflowListResponse {
69
+ flow_workflows: FlowWorkflow[];
70
+ object_count: number;
71
+ unfiltered_count: number;
72
+ }
73
+ interface FlowVersionListResponse {
74
+ flow_versions: FlowVersion[];
75
+ object_count: number;
76
+ unfiltered_count: number;
77
+ }
78
+ interface FlowWorkflowAttrs {
79
+ name?: string;
80
+ description?: string;
81
+ status?: FlowWorkflowStatus;
82
+ }
83
+ declare function isFlowVersionPublished(version: Pick<FlowVersion, 'published_at'>): boolean;
84
+ declare function flowWorkflowStatusOptions(labels: readonly string[]): {
85
+ value: FlowWorkflowStatus;
86
+ label: string;
87
+ }[];
88
+ declare function flowWorkflowForm(): UntypedFormGroup;
89
+ declare function flowVersionBadgeClass(version: Pick<FlowVersion, 'published_at'>): string;
90
+ declare function flowWorkflowBadgeClass(status: FlowWorkflowStatus): string;
91
+ declare function flowVersionEditorTitleKey(version: FlowVersion | null): string;
92
+ declare class FlowsWorkflowService {
93
+ private readonly api;
94
+ constructor(api: ProductsHttpService);
95
+ getWorkflows(subscriptionId: number, status: FlowWorkflowStatus | null, paging?: Paging): Observable<FlowWorkflowListResponse>;
96
+ getWorkflow(id: number, subscriptionId: number): Observable<FlowWorkflow>;
97
+ createWorkflow(subscriptionId: number, attrs: FlowWorkflowAttrs): Observable<FlowWorkflow>;
98
+ updateWorkflow(id: number, subscriptionId: number, attrs: FlowWorkflowAttrs): Observable<FlowWorkflow>;
99
+ /** 433 when the workflow has runs. subscription_id is a query param, not a body. */
100
+ deleteWorkflow(id: number, subscriptionId: number): Observable<unknown>;
101
+ getVersions(workflowId: number, subscriptionId: number, paging?: Paging): Observable<FlowVersionListResponse>;
102
+ createVersion(workflowId: number, subscriptionId: number, graph: unknown): Observable<FlowVersion>;
103
+ /** Refused with 433 once the version is published. */
104
+ updateVersion(id: number, subscriptionId: number, graph: unknown): Observable<FlowVersion>;
105
+ /** Subscription admin only. Re-publishing is a server-side no-op. */
106
+ publishVersion(id: number, subscriptionId: number): Observable<FlowVersion>;
107
+ static ɵfac: i0.ɵɵFactoryDeclaration<FlowsWorkflowService, never>;
108
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
109
+ }
110
+ declare namespace flows_workflows_component_d_exports {
111
+ export { FlowsWorkflowsComponent };
112
+ }
113
+ declare class FlowsWorkflowsComponent extends AppBaseComponent implements OnInit {
114
+ private readonly workflowService;
115
+ private readonly confirmDialog;
116
+ private readonly cdr;
117
+ private readonly destroy$;
118
+ private tableInitialised;
119
+ private page;
120
+ loading: boolean;
121
+ workflows: FlowWorkflow[];
122
+ totalRecords: number;
123
+ totalRecordsUnFilter: number;
124
+ subscriptionId: number;
125
+ status: FlowWorkflowStatus | null;
126
+ searchText: string;
127
+ statusOptions: {
128
+ value: FlowWorkflowStatus;
129
+ label: string;
130
+ }[];
131
+ icons: {
132
+ readonly inspect: import("@fortawesome/fontawesome-common-types").IconDefinition;
133
+ readonly back: import("@fortawesome/fontawesome-common-types").IconDefinition;
134
+ readonly error: import("@fortawesome/fontawesome-common-types").IconDefinition;
135
+ readonly create: import("@fortawesome/fontawesome-common-types").IconDefinition;
136
+ readonly edit: import("@fortawesome/fontawesome-common-types").IconDefinition;
137
+ readonly delete: import("@fortawesome/fontawesome-common-types").IconDefinition;
138
+ readonly versions: import("@fortawesome/fontawesome-common-types").IconDefinition;
139
+ readonly search: import("@fortawesome/fontawesome-common-types").IconDefinition;
140
+ readonly publish: import("@fortawesome/fontawesome-common-types").IconDefinition;
141
+ readonly fit: import("@fortawesome/fontawesome-common-types").IconDefinition;
142
+ readonly diagram: import("@fortawesome/fontawesome-common-types").IconDefinition;
143
+ readonly json: import("@fortawesome/fontawesome-common-types").IconDefinition;
144
+ readonly warning: import("@fortawesome/fontawesome-common-types").IconDefinition;
145
+ };
146
+ readonly badgeClass: typeof flowWorkflowBadgeClass;
147
+ constructor(injector: Injector, workflowService: FlowsWorkflowService, confirmDialog: ConfirmDialogService, cdr: ChangeDetectorRef);
148
+ ngOnInit(): void;
149
+ ngOnDestroy(): void;
150
+ onLazyLoad(event: LazyLoadEvent): void;
151
+ filterByStatus(status: FlowWorkflowStatus | null): void;
152
+ createWorkflow(): void;
153
+ editWorkflow(workflow: FlowWorkflow): void;
154
+ openVersions(workflow: FlowWorkflow): void;
155
+ /** The server refuses with 433 when the workflow has runs. */
156
+ deleteWorkflow(workflow: FlowWorkflow): void;
157
+ private load;
158
+ private settle;
159
+ static ɵfac: i0.ɵɵFactoryDeclaration<FlowsWorkflowsComponent, never>;
160
+ static ɵcmp: i0.ɵɵComponentDeclaration<FlowsWorkflowsComponent, "pw-flows-workflows", never, {}, {}, never, never, false, never>;
161
+ }
162
+ declare namespace flows_workflow_form_component_d_exports {
163
+ export { FlowsWorkflowFormComponent };
164
+ }
165
+ declare class FlowsWorkflowFormComponent extends AppBaseComponent implements OnInit {
166
+ private readonly workflowService;
167
+ private readonly cdr;
168
+ private readonly destroy$;
169
+ private subscriptionId;
170
+ loading: boolean;
171
+ saving: boolean;
172
+ workflowId: number | null;
173
+ notFound: boolean;
174
+ form: UntypedFormGroup;
175
+ statusOptions: {
176
+ value: FlowWorkflowStatus;
177
+ label: string;
178
+ }[];
179
+ icons: {
180
+ readonly inspect: import("@fortawesome/fontawesome-common-types").IconDefinition;
181
+ readonly back: import("@fortawesome/fontawesome-common-types").IconDefinition;
182
+ readonly error: import("@fortawesome/fontawesome-common-types").IconDefinition;
183
+ readonly create: import("@fortawesome/fontawesome-common-types").IconDefinition;
184
+ readonly edit: import("@fortawesome/fontawesome-common-types").IconDefinition;
185
+ readonly delete: import("@fortawesome/fontawesome-common-types").IconDefinition;
186
+ readonly versions: import("@fortawesome/fontawesome-common-types").IconDefinition;
187
+ readonly search: import("@fortawesome/fontawesome-common-types").IconDefinition;
188
+ readonly publish: import("@fortawesome/fontawesome-common-types").IconDefinition;
189
+ readonly fit: import("@fortawesome/fontawesome-common-types").IconDefinition;
190
+ readonly diagram: import("@fortawesome/fontawesome-common-types").IconDefinition;
191
+ readonly json: import("@fortawesome/fontawesome-common-types").IconDefinition;
192
+ readonly warning: import("@fortawesome/fontawesome-common-types").IconDefinition;
193
+ };
194
+ constructor(injector: Injector, workflowService: FlowsWorkflowService, cdr: ChangeDetectorRef);
195
+ get isEdit(): boolean;
196
+ ngOnInit(): void;
197
+ ngOnDestroy(): void;
198
+ save(): void;
199
+ /** Relative to the parent, since create and edit sit at different depths. */
200
+ back(): void;
201
+ private loadStatusOptions;
202
+ private loadWorkflow;
203
+ private settle;
204
+ static ɵfac: i0.ɵɵFactoryDeclaration<FlowsWorkflowFormComponent, never>;
205
+ static ɵcmp: i0.ɵɵComponentDeclaration<FlowsWorkflowFormComponent, "pw-flows-workflow-form", never, {}, {}, never, never, false, never>;
206
+ }
207
+ declare namespace flows_workflow_versions_component_d_exports {
208
+ export { FlowsWorkflowVersionsComponent };
209
+ }
210
+ declare class FlowsWorkflowVersionsComponent extends AppBaseComponent implements OnInit {
211
+ private readonly workflowService;
212
+ private readonly cdr;
213
+ private readonly destroy$;
214
+ subscriptionId: number;
215
+ workflowId: number;
216
+ loading: boolean;
217
+ publishing: boolean;
218
+ notFound: boolean;
219
+ workflowName: string;
220
+ versions: FlowVersion[];
221
+ /** Shown against versions.length so the 500-row cap stays visible. */
222
+ totalRecords: number;
223
+ editorOpen: boolean;
224
+ /** Null when authoring a new version. */
225
+ editorVersion: FlowVersion | null;
226
+ /** Set by a link from a run; opened once, on the first load. */
227
+ private requestedVersionId;
228
+ icons: {
229
+ readonly inspect: import("@fortawesome/fontawesome-common-types").IconDefinition;
230
+ readonly back: import("@fortawesome/fontawesome-common-types").IconDefinition;
231
+ readonly error: import("@fortawesome/fontawesome-common-types").IconDefinition;
232
+ readonly create: import("@fortawesome/fontawesome-common-types").IconDefinition;
233
+ readonly edit: import("@fortawesome/fontawesome-common-types").IconDefinition;
234
+ readonly delete: import("@fortawesome/fontawesome-common-types").IconDefinition;
235
+ readonly versions: import("@fortawesome/fontawesome-common-types").IconDefinition;
236
+ readonly search: import("@fortawesome/fontawesome-common-types").IconDefinition;
237
+ readonly publish: import("@fortawesome/fontawesome-common-types").IconDefinition;
238
+ readonly fit: import("@fortawesome/fontawesome-common-types").IconDefinition;
239
+ readonly diagram: import("@fortawesome/fontawesome-common-types").IconDefinition;
240
+ readonly json: import("@fortawesome/fontawesome-common-types").IconDefinition;
241
+ readonly warning: import("@fortawesome/fontawesome-common-types").IconDefinition;
242
+ };
243
+ readonly isPublished: typeof isFlowVersionPublished;
244
+ readonly badgeClass: typeof flowVersionBadgeClass;
245
+ readonly canPublish: boolean;
246
+ constructor(injector: Injector, workflowService: FlowsWorkflowService, permissions: PermissionService, cdr: ChangeDetectorRef);
247
+ ngOnInit(): void;
248
+ ngOnDestroy(): void;
249
+ openEditor(version?: FlowVersion | null): void;
250
+ closeEditor(): void;
251
+ onVersionSaved(): void;
252
+ publish(version: FlowVersion): void;
253
+ back(): void;
254
+ private loadWorkflow;
255
+ private load;
256
+ private openRequestedVersion;
257
+ private settle;
258
+ static ɵfac: i0.ɵɵFactoryDeclaration<FlowsWorkflowVersionsComponent, never>;
259
+ static ɵcmp: i0.ɵɵComponentDeclaration<FlowsWorkflowVersionsComponent, "pw-flows-workflow-versions", never, {}, {}, never, never, false, never>;
260
+ }
261
+ type FlowNodeCategory = 'trigger' | 'logic' | 'data' | 'action';
262
+ declare const FLOW_NODE_CATEGORIES: readonly FlowNodeCategory[];
263
+ /** An edge with no branch leaves through `next`. */
264
+ declare const DEFAULT_FLOW_BRANCH = "next";
265
+ interface FlowNodeDefinition {
266
+ type: string;
267
+ category: FlowNodeCategory;
268
+ /** English fallback; the palette shows the translated `Flows.Nodes.<type>` key. */
269
+ label: string;
270
+ /** The only param keys this node may carry. */
271
+ params: string[];
272
+ condition: boolean;
273
+ outputs: string[];
274
+ }
275
+ interface FlowNodeListResponse {
276
+ flow_nodes: FlowNodeDefinition[];
277
+ object_count: number;
278
+ unfiltered_count: number;
279
+ }
280
+ interface FlowGraphPosition {
281
+ x: number;
282
+ y: number;
283
+ }
284
+ interface FlowGraphNode {
285
+ id: string;
286
+ type: string;
287
+ params?: Record<string, unknown>;
288
+ condition?: Record<string, unknown>;
289
+ position?: FlowGraphPosition;
290
+ }
291
+ interface FlowGraphEdge {
292
+ id?: string;
293
+ from: string;
294
+ to: string;
295
+ branch?: string;
296
+ }
297
+ /** The node the inspector shows, with what it needs to edit it. */
298
+ interface FlowNodeSelection {
299
+ node: FlowGraphNode;
300
+ /** Null when the catalogue no longer lists the node's type. */
301
+ definition: FlowNodeDefinition | null;
302
+ fieldSuggestions: string[];
303
+ }
304
+ interface FlowGraph {
305
+ nodes: FlowGraphNode[];
306
+ edges: FlowGraphEdge[];
307
+ }
308
+ declare function emptyFlowGraph(): FlowGraph;
309
+ declare function toFlowGraph(value: unknown): FlowGraph;
310
+ declare function nextFlowNodeId(nodes: readonly Pick<FlowGraphNode, 'id'>[]): string;
311
+ declare function nextFlowEdgeId(edges: readonly FlowGraphEdge[]): string;
312
+ declare function flowNodeLabelKey(type: string): string;
313
+ declare class FlowsNodeService {
314
+ private readonly api;
315
+ private readonly cache;
316
+ constructor(api: ProductsHttpService);
317
+ getNodes(subscriptionId: number): Observable<FlowNodeDefinition[]>;
318
+ static ɵfac: i0.ɵɵFactoryDeclaration<FlowsNodeService, never>;
319
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
320
+ }
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
+ type FlowRunStatus = 'running' | 'awaiting' | 'succeeded' | 'failed';
393
+ type FlowRunStepStatus = 'pending' | 'running' | 'awaiting' | 'succeeded' | 'failed' | 'skipped';
394
+ declare const FLOW_RUN_TERMINAL_STATUSES: readonly FlowRunStatus[];
395
+ declare const FLOW_RUN_STEP_SETTLED_STATUSES: readonly FlowRunStepStatus[];
396
+ interface FlowRun {
397
+ id: number;
398
+ flow_workflow_id: number;
399
+ flow_version_id: number;
400
+ flow_workflow_name?: string;
401
+ flow_version_number?: number;
402
+ status: FlowRunStatus;
403
+ trigger_payload: unknown;
404
+ error: string | null;
405
+ started_at: string | null;
406
+ finished_at: string | null;
407
+ created_at: string;
408
+ updated_at: string;
409
+ }
410
+ interface FlowRunStep {
411
+ id: number;
412
+ flow_run_id: number;
413
+ node_id: string;
414
+ status: FlowRunStepStatus;
415
+ input_items: unknown[] | null;
416
+ output_items: unknown[] | null;
417
+ error: string | null;
418
+ attempts: number;
419
+ awaiting_since: string | null;
420
+ started_at: string | null;
421
+ finished_at: string | null;
422
+ created_at: string;
423
+ updated_at: string;
424
+ }
425
+ interface FlowRunListResponse {
426
+ flow_runs: FlowRun[];
427
+ object_count: number;
428
+ unfiltered_count: number;
429
+ }
430
+ interface FlowRunStepListResponse {
431
+ flow_run_steps: FlowRunStep[];
432
+ object_count: number;
433
+ unfiltered_count: number;
434
+ }
435
+ interface FlowRunQuery {
436
+ status?: FlowRunStatus;
437
+ flow_workflow_id?: number;
438
+ flow_version_id?: number;
439
+ }
440
+ declare function isFlowRunTerminal(run: Pick<FlowRun, 'status'>): boolean;
441
+ declare function isFlowRunStepSettled(step: Pick<FlowRunStep, 'status'>): boolean;
442
+ declare const FLOW_RUN_STATUS_ORDER: readonly FlowRunStatus[];
443
+ declare const FLOW_RUN_STATUS_KEYS: readonly string[];
444
+ declare function elapsedMs(from: string | null, to: string | null): number | null;
445
+ declare function flowRunBadgeClass(status: FlowRunStatus): string;
446
+ declare function flowRunStepBadgeClass(status: FlowRunStepStatus): string;
447
+ interface FlowRunDetail {
448
+ run: FlowRun;
449
+ steps: FlowRunStepListResponse;
450
+ }
451
+ /**
452
+ * Polls because the engine emits no run-lifecycle events yet; Part H swaps in
453
+ * a push here without any component changing.
454
+ */
455
+ declare class FlowsRunService {
456
+ private readonly api;
457
+ RUNS_PATH: string;
458
+ constructor(api: ProductsHttpService);
459
+ getRuns(subscriptionId: number, query?: FlowRunQuery, paging?: Paging): Observable<FlowRunListResponse>;
460
+ getRun(id: number, subscriptionId: number): Observable<FlowRun>;
461
+ getRunSteps(runId: number, subscriptionId: number, paging?: Paging): Observable<FlowRunStepListResponse>;
462
+ watchRuns(subscriptionId: number, query?: FlowRunQuery, paging?: Paging): Observable<FlowRunListResponse>;
463
+ watchRun(id: number, subscriptionId: number, paging?: Paging): Observable<FlowRunDetail>;
464
+ private hasUnsettledRun;
465
+ private definedQuery;
466
+ static ɵfac: i0.ɵɵFactoryDeclaration<FlowsRunService, never>;
467
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
468
+ }
469
+ declare namespace flows_runs_component_d_exports {
470
+ export { FlowsRunsComponent };
471
+ }
472
+ /**
473
+ * 🔴 Three request-lifecycle traps:
474
+ * 1. The subscription id re-emits on unrelated store activity → de-duped.
475
+ * 2. `loading` gates the FIRST paint only — re-gating destroys the table and
476
+ * orphans the in-flight response.
477
+ * 3. p-table fires onLazyLoad when it mounts → the first emission is swallowed.
478
+ */
479
+ declare class FlowsRunsComponent extends AppBaseComponent implements OnInit {
480
+ private readonly flowsRunService;
481
+ private readonly cdr;
482
+ private readonly destroy$;
483
+ private watch?;
484
+ private page;
485
+ private tableInitialised;
486
+ loading: boolean;
487
+ runs: FlowRun[];
488
+ totalRecords: number;
489
+ totalRecordsUnFilter: number;
490
+ subscriptionId: number;
491
+ query: FlowRunQuery;
492
+ icons: {
493
+ readonly inspect: import("@fortawesome/fontawesome-common-types").IconDefinition;
494
+ readonly back: import("@fortawesome/fontawesome-common-types").IconDefinition;
495
+ readonly error: import("@fortawesome/fontawesome-common-types").IconDefinition;
496
+ readonly create: import("@fortawesome/fontawesome-common-types").IconDefinition;
497
+ readonly edit: import("@fortawesome/fontawesome-common-types").IconDefinition;
498
+ readonly delete: import("@fortawesome/fontawesome-common-types").IconDefinition;
499
+ readonly versions: import("@fortawesome/fontawesome-common-types").IconDefinition;
500
+ readonly search: import("@fortawesome/fontawesome-common-types").IconDefinition;
501
+ readonly publish: import("@fortawesome/fontawesome-common-types").IconDefinition;
502
+ readonly fit: import("@fortawesome/fontawesome-common-types").IconDefinition;
503
+ readonly diagram: import("@fortawesome/fontawesome-common-types").IconDefinition;
504
+ readonly json: import("@fortawesome/fontawesome-common-types").IconDefinition;
505
+ readonly warning: import("@fortawesome/fontawesome-common-types").IconDefinition;
506
+ };
507
+ constructor(injector: Injector, flowsRunService: FlowsRunService, cdr: ChangeDetectorRef);
508
+ ngOnInit(): void;
509
+ ngOnDestroy(): void;
510
+ onLazyLoad(event: LazyLoadEvent): void;
511
+ onQuery(query: FlowRunQuery): void;
512
+ versionsLink(run: FlowRun): unknown[];
513
+ inspect(run: FlowRun): void;
514
+ readonly duration: (run: FlowRun) => number;
515
+ readonly badgeClass: typeof flowRunBadgeClass;
516
+ /** Never sets `loading = true` — trap 2. */
517
+ private loadRuns;
518
+ private settle;
519
+ static ɵfac: i0.ɵɵFactoryDeclaration<FlowsRunsComponent, never>;
520
+ static ɵcmp: i0.ɵɵComponentDeclaration<FlowsRunsComponent, "pw-flows-runs", never, {}, {}, never, never, false, never>;
521
+ }
522
+ declare namespace flows_runs_filters_component_d_exports {
523
+ export { FlowsRunsFiltersComponent };
524
+ }
525
+ interface Option<T> {
526
+ value: T;
527
+ label: string;
528
+ }
529
+ /** Status, workflow and version filters for the runs list. */
530
+ declare class FlowsRunsFiltersComponent implements OnInit, OnDestroy {
531
+ private readonly translation;
532
+ private readonly workflowService;
533
+ private readonly cdr;
534
+ subscriptionId: number;
535
+ readonly queryChange: EventEmitter<FlowRunQuery>;
536
+ private readonly destroy$;
537
+ status: FlowRunStatus | null;
538
+ workflowId: number | null;
539
+ versionId: number | null;
540
+ statusOptions: Option<FlowRunStatus>[];
541
+ workflowOptions: Option<number>[];
542
+ versionOptions: Option<number>[];
543
+ constructor(translation: TranslocoService, workflowService: FlowsWorkflowService, cdr: ChangeDetectorRef);
544
+ ngOnInit(): void;
545
+ ngOnDestroy(): void;
546
+ onStatus(status: FlowRunStatus | null): void;
547
+ onWorkflow(workflowId: number | null): void;
548
+ onVersion(versionId: number | null): void;
549
+ private loadVersions;
550
+ private emit;
551
+ static ɵfac: i0.ɵɵFactoryDeclaration<FlowsRunsFiltersComponent, never>;
552
+ static ɵcmp: i0.ɵɵComponentDeclaration<FlowsRunsFiltersComponent, "pw-flows-runs-filters", never, {
553
+ "subscriptionId": {
554
+ "alias": "subscriptionId";
555
+ "required": true;
556
+ };
557
+ }, {
558
+ "queryChange": "queryChange";
559
+ }, never, never, false, never>;
560
+ }
561
+ type FlowCronMode = 'minutes' | 'hourly' | 'daily' | 'weekly' | 'monthly' | 'custom';
562
+ interface FlowCronSchedule {
563
+ mode: FlowCronMode;
564
+ every: number;
565
+ minute: number;
566
+ hour: number;
567
+ weekday: number;
568
+ monthday: number;
569
+ custom: string;
570
+ }
571
+ declare const FLOW_CRON_MODES: readonly FlowCronMode[];
572
+ declare const FLOW_CRON_EVERY_OPTIONS: readonly number[];
573
+ declare const DEFAULT_FLOW_CRON: FlowCronSchedule;
574
+ declare function toFlowCron(schedule: FlowCronSchedule): string;
575
+ /** Reads a cron back into the picker; anything the presets can't express is custom. */
576
+ declare function fromFlowCron(cron: unknown): FlowCronSchedule;
577
+ declare function flowCronTime(schedule: FlowCronSchedule): string;
578
+ declare namespace flows_cron_field_component_d_exports {
579
+ export { FlowsCronFieldComponent };
580
+ }
581
+ /** Builds a trigger.schedule cron from presets, keeping a raw cron for anything else. */
582
+ declare class FlowsCronFieldComponent implements OnChanges {
583
+ private readonly translation;
584
+ value: unknown;
585
+ inputId: string;
586
+ readOnly: boolean;
587
+ readonly valueChange: EventEmitter<string>;
588
+ readonly modes: readonly FlowCronMode[];
589
+ readonly everyOptions: readonly number[];
590
+ readonly monthdays: number[];
591
+ schedule: FlowCronSchedule;
592
+ weekdays: {
593
+ value: number;
594
+ label: string;
595
+ }[];
596
+ private emitted;
597
+ constructor(translation: TranslocoService);
598
+ ngOnChanges(): void;
599
+ get time(): string;
600
+ get weekdayLabel(): string;
601
+ setMode(mode: FlowCronMode): void;
602
+ setTime(time: string): void;
603
+ update(changes: Partial<FlowCronSchedule>): void;
604
+ static ɵfac: i0.ɵɵFactoryDeclaration<FlowsCronFieldComponent, never>;
605
+ static ɵcmp: i0.ɵɵComponentDeclaration<FlowsCronFieldComponent, "pw-flows-cron-field", never, {
606
+ "value": {
607
+ "alias": "value";
608
+ "required": false;
609
+ };
610
+ "inputId": {
611
+ "alias": "inputId";
612
+ "required": false;
613
+ };
614
+ "readOnly": {
615
+ "alias": "readOnly";
616
+ "required": false;
617
+ };
618
+ }, {
619
+ "valueChange": "valueChange";
620
+ }, never, never, false, never>;
621
+ }
622
+ declare namespace flows_timezone_field_component_d_exports {
623
+ export { FlowsTimezoneFieldComponent };
624
+ }
625
+ /** Searchable IANA timezone picker for trigger.schedule. */
626
+ declare class FlowsTimezoneFieldComponent {
627
+ value: string | null;
628
+ inputId: string;
629
+ readOnly: boolean;
630
+ readonly valueChange: EventEmitter<string>;
631
+ readonly zones: string[];
632
+ static ɵfac: i0.ɵɵFactoryDeclaration<FlowsTimezoneFieldComponent, never>;
633
+ static ɵcmp: i0.ɵɵComponentDeclaration<FlowsTimezoneFieldComponent, "pw-flows-timezone-field", never, {
634
+ "value": {
635
+ "alias": "value";
636
+ "required": false;
637
+ };
638
+ "inputId": {
639
+ "alias": "inputId";
640
+ "required": false;
641
+ };
642
+ "readOnly": {
643
+ "alias": "readOnly";
644
+ "required": false;
645
+ };
646
+ }, {
647
+ "valueChange": "valueChange";
648
+ }, never, never, false, never>;
649
+ }
650
+ declare namespace flows_run_inspector_component_d_exports {
651
+ export { FlowsRunInspectorComponent };
652
+ }
653
+ declare class FlowsRunInspectorComponent extends AppBaseComponent implements OnInit {
654
+ private readonly flowsRunService;
655
+ private readonly cdr;
656
+ private readonly destroy$;
657
+ private watch$?;
658
+ loading: boolean;
659
+ notFound: boolean;
660
+ run?: FlowRun;
661
+ steps: FlowRunStep[];
662
+ runId: number;
663
+ icons: {
664
+ readonly inspect: import("@fortawesome/fontawesome-common-types").IconDefinition;
665
+ readonly back: import("@fortawesome/fontawesome-common-types").IconDefinition;
666
+ readonly error: import("@fortawesome/fontawesome-common-types").IconDefinition;
667
+ readonly create: import("@fortawesome/fontawesome-common-types").IconDefinition;
668
+ readonly edit: import("@fortawesome/fontawesome-common-types").IconDefinition;
669
+ readonly delete: import("@fortawesome/fontawesome-common-types").IconDefinition;
670
+ readonly versions: import("@fortawesome/fontawesome-common-types").IconDefinition;
671
+ readonly search: import("@fortawesome/fontawesome-common-types").IconDefinition;
672
+ readonly publish: import("@fortawesome/fontawesome-common-types").IconDefinition;
673
+ readonly fit: import("@fortawesome/fontawesome-common-types").IconDefinition;
674
+ readonly diagram: import("@fortawesome/fontawesome-common-types").IconDefinition;
675
+ readonly json: import("@fortawesome/fontawesome-common-types").IconDefinition;
676
+ readonly warning: import("@fortawesome/fontawesome-common-types").IconDefinition;
677
+ };
678
+ readonly openSteps: Set<number>;
679
+ readonly trackByStep: (_: number, step: FlowRunStep) => number;
680
+ constructor(injector: Injector, flowsRunService: FlowsRunService, cdr: ChangeDetectorRef);
681
+ ngOnInit(): void;
682
+ ngOnDestroy(): void;
683
+ back(): void;
684
+ runBadgeClass(status: FlowRunStatus): string;
685
+ stepBadgeClass(status: FlowRunStepStatus): string;
686
+ elapsed(from: string | null, to: string | null): number | null;
687
+ onStepToggle(stepId: number, event: Event): void;
688
+ asJson(value: unknown): string;
689
+ private watch;
690
+ private fail;
691
+ private settle;
692
+ static ɵfac: i0.ɵɵFactoryDeclaration<FlowsRunInspectorComponent, never>;
693
+ static ɵcmp: i0.ɵɵComponentDeclaration<FlowsRunInspectorComponent, "pw-flows-run-inspector", never, {}, {}, never, never, false, never>;
694
+ }
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;
700
+ 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>;
721
+ 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";
728
+ "required": false;
729
+ };
730
+ "definitions": {
731
+ "alias": "definitions";
732
+ "required": false;
733
+ };
734
+ "readOnly": {
735
+ "alias": "readOnly";
736
+ "required": false;
737
+ };
738
+ }, {
739
+ "selectionChange": "selectionChange";
740
+ "graphChange": "graphChange";
741
+ "dropped": "dropped";
742
+ }, never, never, false, never>;
743
+ }
744
+ declare const FLOW_INPUT = "in";
745
+ declare class FlowCanvasNode extends ClassicPreset.Node {
746
+ flowNode: FlowGraphNode;
747
+ readonly definition: FlowNodeDefinition | null;
748
+ width: number;
749
+ height: number;
750
+ constructor(flowNode: FlowGraphNode, definition: FlowNodeDefinition | null, label: string, hasInput: boolean, outputs: readonly string[]);
751
+ }
752
+ declare class FlowCanvasConnection extends ClassicPreset.Connection<ClassicPreset.Node, ClassicPreset.Node> {}
753
+ type FlowCanvasSchemes = GetSchemes<FlowCanvasNode, FlowCanvasConnection>;
754
+ interface FlowCanvasModel {
755
+ nodes: FlowCanvasNode[];
756
+ connections: FlowCanvasConnection[];
757
+ /** Stored edges the canvas cannot draw; they are not kept on the next save. */
758
+ dropped: FlowGraphEdge[];
759
+ }
760
+ declare function createFlowCanvasNode(node: FlowGraphNode, definition: FlowNodeDefinition | null, label: string, edges?: readonly FlowGraphEdge[]): FlowCanvasNode;
761
+ declare function toFlowCanvasModel(graph: FlowGraph, definitions: readonly FlowNodeDefinition[], labelFor: (type: string) => string): FlowCanvasModel;
762
+ declare function toFlowGraphEdge(connection: FlowCanvasConnection): FlowGraphEdge;
763
+ /** The engine rejects self-loops at publish, and a repeated edge would run its target twice. */
764
+ declare function isAcceptableConnection(connection: FlowCanvasConnection, existing: readonly FlowCanvasConnection[]): boolean;
765
+ declare namespace flows_canvas_node_component_d_exports {
766
+ export { FlowsCanvasNodeComponent };
767
+ }
768
+ interface SocketEntry {
769
+ key: string;
770
+ label: string;
771
+ socket: ClassicPreset.Socket;
772
+ }
773
+ declare class FlowsCanvasNodeComponent implements OnChanges {
774
+ private readonly cdr;
775
+ data: FlowCanvasNode & {
776
+ selected?: boolean;
777
+ };
778
+ emit: (data: unknown) => void;
779
+ rendered: () => void;
780
+ readonly defaultBranch = "next";
781
+ seed: number;
782
+ inputs: SocketEntry[];
783
+ outputs: SocketEntry[];
784
+ constructor(cdr: ChangeDetectorRef);
785
+ get width(): number;
786
+ get height(): number;
787
+ get selected(): boolean;
788
+ readonly testId = "flow-node";
789
+ get nodeId(): string;
790
+ get labelKey(): string;
791
+ get categoryIcon(): IconDefinition;
792
+ get unknownType(): boolean;
793
+ ngOnChanges(): void;
794
+ static ɵfac: i0.ɵɵFactoryDeclaration<FlowsCanvasNodeComponent, never>;
795
+ static ɵcmp: i0.ɵɵComponentDeclaration<FlowsCanvasNodeComponent, "pw-flows-canvas-node", never, {
796
+ "data": {
797
+ "alias": "data";
798
+ "required": false;
799
+ };
800
+ "emit": {
801
+ "alias": "emit";
802
+ "required": false;
803
+ };
804
+ "rendered": {
805
+ "alias": "rendered";
806
+ "required": false;
807
+ };
808
+ }, {}, never, never, false, never>;
809
+ }
810
+ declare namespace flows_canvas_socket_component_d_exports {
811
+ export { FlowsCanvasSocketComponent };
812
+ }
813
+ declare class FlowsCanvasSocketComponent implements OnChanges {
814
+ data: unknown;
815
+ rendered: () => void;
816
+ ngOnChanges(): void;
817
+ static ɵfac: i0.ɵɵFactoryDeclaration<FlowsCanvasSocketComponent, never>;
818
+ static ɵcmp: i0.ɵɵComponentDeclaration<FlowsCanvasSocketComponent, "pw-flows-canvas-socket", never, {
819
+ "data": {
820
+ "alias": "data";
821
+ "required": false;
822
+ };
823
+ "rendered": {
824
+ "alias": "rendered";
825
+ "required": false;
826
+ };
827
+ }, {}, never, never, false, never>;
828
+ }
829
+ declare namespace flows_canvas_connection_component_d_exports {
830
+ export { FlowsCanvasConnectionComponent };
831
+ }
832
+ declare class FlowsCanvasConnectionComponent {
833
+ data: FlowCanvasConnection;
834
+ start: unknown;
835
+ end: unknown;
836
+ path: string;
837
+ static ɵfac: i0.ɵɵFactoryDeclaration<FlowsCanvasConnectionComponent, never>;
838
+ static ɵcmp: i0.ɵɵComponentDeclaration<FlowsCanvasConnectionComponent, "pw-flows-canvas-connection", never, {
839
+ "data": {
840
+ "alias": "data";
841
+ "required": false;
842
+ };
843
+ "start": {
844
+ "alias": "start";
845
+ "required": false;
846
+ };
847
+ "end": {
848
+ "alias": "end";
849
+ "required": false;
850
+ };
851
+ "path": {
852
+ "alias": "path";
853
+ "required": false;
854
+ };
855
+ }, {}, never, never, false, never>;
856
+ }
857
+ declare namespace flows_node_palette_component_d_exports {
858
+ export { FlowsNodePaletteComponent };
859
+ }
860
+ interface PaletteGroup {
861
+ category: FlowNodeCategory;
862
+ nodes: FlowNodeDefinition[];
863
+ }
864
+ declare class FlowsNodePaletteComponent implements OnChanges {
865
+ definitions: FlowNodeDefinition[];
866
+ readonly add: EventEmitter<string>;
867
+ readonly icons: {
868
+ readonly trigger: import("@fortawesome/fontawesome-common-types").IconDefinition;
869
+ readonly logic: import("@fortawesome/fontawesome-common-types").IconDefinition;
870
+ readonly data: import("@fortawesome/fontawesome-common-types").IconDefinition;
871
+ readonly action: import("@fortawesome/fontawesome-common-types").IconDefinition;
872
+ };
873
+ readonly labelKey: typeof flowNodeLabelKey;
874
+ groups: PaletteGroup[];
875
+ ngOnChanges(): void;
876
+ static ɵfac: i0.ɵɵFactoryDeclaration<FlowsNodePaletteComponent, never>;
877
+ static ɵcmp: i0.ɵɵComponentDeclaration<FlowsNodePaletteComponent, "pw-flows-node-palette", never, {
878
+ "definitions": {
879
+ "alias": "definitions";
880
+ "required": false;
881
+ };
882
+ }, {
883
+ "add": "add";
884
+ }, never, never, false, never>;
885
+ }
886
+ type FlowFieldKind = 'text' | 'textarea' | 'email' | 'member' | 'members' | 'json' | 'pairs' | 'mode' | 'cron' | 'timezone';
887
+ interface FlowNodeField {
888
+ key: string;
889
+ kind: FlowFieldKind;
890
+ }
891
+ declare function flowNodeFields(definition: FlowNodeDefinition): FlowNodeField[];
892
+ /** data.merge accepts only this mode today. */
893
+ declare const FLOW_MERGE_MODES: readonly string[];
894
+ declare function flowParamLabelKey(key: string): string;
895
+ declare namespace flows_node_inspector_component_d_exports {
896
+ export { FlowsNodeInspectorComponent };
897
+ }
898
+ declare class FlowsNodeInspectorComponent implements OnChanges, AfterViewChecked {
899
+ node: FlowGraphNode;
900
+ /** Null when the catalogue no longer lists the node's type. */
901
+ definition: FlowNodeDefinition | null;
902
+ subscriptionId: number;
903
+ readOnly: boolean;
904
+ fieldSuggestions: string[];
905
+ private leaving?;
906
+ readonly nodeChange: EventEmitter<FlowGraphNode>;
907
+ readonly remove: EventEmitter<void>;
908
+ readonly icons: {
909
+ readonly inspect: import("@fortawesome/fontawesome-common-types").IconDefinition;
910
+ readonly back: import("@fortawesome/fontawesome-common-types").IconDefinition;
911
+ readonly error: import("@fortawesome/fontawesome-common-types").IconDefinition;
912
+ readonly create: import("@fortawesome/fontawesome-common-types").IconDefinition;
913
+ readonly edit: import("@fortawesome/fontawesome-common-types").IconDefinition;
914
+ readonly delete: import("@fortawesome/fontawesome-common-types").IconDefinition;
915
+ readonly versions: import("@fortawesome/fontawesome-common-types").IconDefinition;
916
+ readonly search: import("@fortawesome/fontawesome-common-types").IconDefinition;
917
+ readonly publish: import("@fortawesome/fontawesome-common-types").IconDefinition;
918
+ readonly fit: import("@fortawesome/fontawesome-common-types").IconDefinition;
919
+ readonly diagram: import("@fortawesome/fontawesome-common-types").IconDefinition;
920
+ readonly json: import("@fortawesome/fontawesome-common-types").IconDefinition;
921
+ readonly warning: import("@fortawesome/fontawesome-common-types").IconDefinition;
922
+ };
923
+ mergeModes: {
924
+ value: string;
925
+ label: string;
926
+ }[];
927
+ readonly defaultMergeMode: string;
928
+ readonly labelKey: typeof flowNodeLabelKey;
929
+ readonly paramLabelKey: typeof flowParamLabelKey;
930
+ fields: FlowNodeField[];
931
+ conditionNotAnObject: boolean;
932
+ constructor(translation: TranslocoService, cdr: ChangeDetectorRef, destroyRef: DestroyRef);
933
+ ngOnChanges(changes: SimpleChanges): void;
934
+ ngAfterViewChecked(): void;
935
+ fieldId(key: string): string;
936
+ param(key: string): unknown;
937
+ setParam(key: string, value: unknown): void;
938
+ setCondition(condition: unknown): void;
939
+ private emit;
940
+ static ɵfac: i0.ɵɵFactoryDeclaration<FlowsNodeInspectorComponent, never>;
941
+ static ɵcmp: i0.ɵɵComponentDeclaration<FlowsNodeInspectorComponent, "pw-flows-node-inspector", never, {
942
+ "node": {
943
+ "alias": "node";
944
+ "required": false;
945
+ };
946
+ "definition": {
947
+ "alias": "definition";
948
+ "required": false;
949
+ };
950
+ "subscriptionId": {
951
+ "alias": "subscriptionId";
952
+ "required": false;
953
+ };
954
+ "readOnly": {
955
+ "alias": "readOnly";
956
+ "required": false;
957
+ };
958
+ "fieldSuggestions": {
959
+ "alias": "fieldSuggestions";
960
+ "required": false;
961
+ };
962
+ }, {
963
+ "nodeChange": "nodeChange";
964
+ "remove": "remove";
965
+ }, never, never, false, never>;
966
+ }
967
+ declare namespace flows_json_field_component_d_exports {
968
+ export { FlowsJsonFieldComponent };
969
+ }
970
+ declare class FlowsJsonFieldComponent implements OnChanges {
971
+ value: unknown;
972
+ inputId: string;
973
+ readOnly: boolean;
974
+ readonly valueChange: EventEmitter<unknown>;
975
+ text: string;
976
+ invalid: boolean;
977
+ ngOnChanges(): void;
978
+ commit(): void;
979
+ static ɵfac: i0.ɵɵFactoryDeclaration<FlowsJsonFieldComponent, never>;
980
+ static ɵcmp: i0.ɵɵComponentDeclaration<FlowsJsonFieldComponent, "pw-flows-json-field", never, {
981
+ "value": {
982
+ "alias": "value";
983
+ "required": false;
984
+ };
985
+ "inputId": {
986
+ "alias": "inputId";
987
+ "required": false;
988
+ };
989
+ "readOnly": {
990
+ "alias": "readOnly";
991
+ "required": false;
992
+ };
993
+ }, {
994
+ "valueChange": "valueChange";
995
+ }, never, never, false, never>;
996
+ }
997
+ type FlowConditionOperator = 'eq' | 'neq' | 'gt' | 'gte' | 'lt' | 'lte' | 'contains' | 'empty' | 'not_empty';
998
+ type FlowConditionValueType = 'text' | 'number' | 'boolean';
999
+ type FlowConditionCombinator = 'all' | 'any';
1000
+ interface FlowConditionRule {
1001
+ field: string;
1002
+ operator: FlowConditionOperator;
1003
+ value: string;
1004
+ valueType: FlowConditionValueType;
1005
+ }
1006
+ interface FlowConditionGroup {
1007
+ combinator: FlowConditionCombinator;
1008
+ rules: FlowConditionRule[];
1009
+ }
1010
+ declare const FLOW_CONDITION_OPERATORS: readonly FlowConditionOperator[];
1011
+ /** JSON Logic comparison → the rule operator it reads as. */
1012
+ declare const LOGIC_OPS: Record<string, FlowConditionOperator>;
1013
+ /** These compare as numbers, so their value is always a number. */
1014
+ declare function isNumericOperator(operator: FlowConditionOperator): boolean;
1015
+ declare function takesValue(operator: FlowConditionOperator): boolean;
1016
+ declare function emptyFlowConditionRule(): FlowConditionRule;
1017
+ declare function isCompleteRule(rule: FlowConditionRule): boolean;
1018
+ /** Undefined while any rule is incomplete, so a half-typed rule is never saved. */
1019
+ declare function toJsonLogic(group: FlowConditionGroup): Record<string, unknown> | undefined;
1020
+ declare namespace flows_condition_field_component_d_exports {
1021
+ export { FlowsConditionFieldComponent };
1022
+ }
1023
+ interface ConditionOption {
1024
+ value: string;
1025
+ label: string;
1026
+ }
1027
+ declare class FlowsConditionFieldComponent implements OnChanges {
1028
+ value: unknown;
1029
+ inputId: string;
1030
+ suggestions: string[];
1031
+ readOnly: boolean;
1032
+ readonly valueChange: EventEmitter<unknown>;
1033
+ readonly icons: {
1034
+ readonly inspect: import("@fortawesome/fontawesome-common-types").IconDefinition;
1035
+ readonly back: import("@fortawesome/fontawesome-common-types").IconDefinition;
1036
+ readonly error: import("@fortawesome/fontawesome-common-types").IconDefinition;
1037
+ readonly create: import("@fortawesome/fontawesome-common-types").IconDefinition;
1038
+ readonly edit: import("@fortawesome/fontawesome-common-types").IconDefinition;
1039
+ readonly delete: import("@fortawesome/fontawesome-common-types").IconDefinition;
1040
+ readonly versions: import("@fortawesome/fontawesome-common-types").IconDefinition;
1041
+ readonly search: import("@fortawesome/fontawesome-common-types").IconDefinition;
1042
+ readonly publish: import("@fortawesome/fontawesome-common-types").IconDefinition;
1043
+ readonly fit: import("@fortawesome/fontawesome-common-types").IconDefinition;
1044
+ readonly diagram: import("@fortawesome/fontawesome-common-types").IconDefinition;
1045
+ readonly json: import("@fortawesome/fontawesome-common-types").IconDefinition;
1046
+ readonly warning: import("@fortawesome/fontawesome-common-types").IconDefinition;
1047
+ };
1048
+ options: Record<string, ConditionOption[]>;
1049
+ readonly takesValue: typeof takesValue;
1050
+ readonly isNumericOperator: typeof isNumericOperator;
1051
+ group: FlowConditionGroup;
1052
+ /** Rules unless the stored condition is beyond them. */
1053
+ mode: 'rules' | 'json';
1054
+ incomplete: boolean;
1055
+ private emitted;
1056
+ constructor(translation: TranslocoService, cdr: ChangeDetectorRef, destroyRef: DestroyRef);
1057
+ ngOnChanges(): void;
1058
+ get combinesRules(): boolean;
1059
+ get canUseRules(): boolean;
1060
+ addRule(): void;
1061
+ removeRule(index: number): void;
1062
+ useRules(): void;
1063
+ useJson(): void;
1064
+ commit(): void;
1065
+ emit(value: unknown): void;
1066
+ private load;
1067
+ static ɵfac: i0.ɵɵFactoryDeclaration<FlowsConditionFieldComponent, never>;
1068
+ static ɵcmp: i0.ɵɵComponentDeclaration<FlowsConditionFieldComponent, "pw-flows-condition-field", never, {
1069
+ "value": {
1070
+ "alias": "value";
1071
+ "required": false;
1072
+ };
1073
+ "inputId": {
1074
+ "alias": "inputId";
1075
+ "required": false;
1076
+ };
1077
+ "suggestions": {
1078
+ "alias": "suggestions";
1079
+ "required": false;
1080
+ };
1081
+ "readOnly": {
1082
+ "alias": "readOnly";
1083
+ "required": false;
1084
+ };
1085
+ }, {
1086
+ "valueChange": "valueChange";
1087
+ }, never, never, false, never>;
1088
+ }
1089
+ declare namespace flows_pairs_field_component_d_exports {
1090
+ export { FlowsPairsFieldComponent };
1091
+ }
1092
+ interface Pair {
1093
+ key: string;
1094
+ value: string;
1095
+ /** The stored value, kept as-is until its text is edited. */
1096
+ original?: unknown;
1097
+ }
1098
+ declare class FlowsPairsFieldComponent implements OnChanges {
1099
+ value: unknown;
1100
+ inputId: string;
1101
+ readOnly: boolean;
1102
+ readonly valueChange: EventEmitter<Record<string, unknown>>;
1103
+ readonly icons: {
1104
+ readonly inspect: import("@fortawesome/fontawesome-common-types").IconDefinition;
1105
+ readonly back: import("@fortawesome/fontawesome-common-types").IconDefinition;
1106
+ readonly error: import("@fortawesome/fontawesome-common-types").IconDefinition;
1107
+ readonly create: import("@fortawesome/fontawesome-common-types").IconDefinition;
1108
+ readonly edit: import("@fortawesome/fontawesome-common-types").IconDefinition;
1109
+ readonly delete: import("@fortawesome/fontawesome-common-types").IconDefinition;
1110
+ readonly versions: import("@fortawesome/fontawesome-common-types").IconDefinition;
1111
+ readonly search: import("@fortawesome/fontawesome-common-types").IconDefinition;
1112
+ readonly publish: import("@fortawesome/fontawesome-common-types").IconDefinition;
1113
+ readonly fit: import("@fortawesome/fontawesome-common-types").IconDefinition;
1114
+ readonly diagram: import("@fortawesome/fontawesome-common-types").IconDefinition;
1115
+ readonly json: import("@fortawesome/fontawesome-common-types").IconDefinition;
1116
+ readonly warning: import("@fortawesome/fontawesome-common-types").IconDefinition;
1117
+ };
1118
+ pairs: Pair[];
1119
+ private emitted;
1120
+ ngOnChanges(): void;
1121
+ addPair(): void;
1122
+ removePair(index: number): void;
1123
+ editValue(pair: Pair, value: string): void;
1124
+ commit(): void;
1125
+ static ɵfac: i0.ɵɵFactoryDeclaration<FlowsPairsFieldComponent, never>;
1126
+ static ɵcmp: i0.ɵɵComponentDeclaration<FlowsPairsFieldComponent, "pw-flows-pairs-field", never, {
1127
+ "value": {
1128
+ "alias": "value";
1129
+ "required": false;
1130
+ };
1131
+ "inputId": {
1132
+ "alias": "inputId";
1133
+ "required": false;
1134
+ };
1135
+ "readOnly": {
1136
+ "alias": "readOnly";
1137
+ "required": false;
1138
+ };
1139
+ }, {
1140
+ "valueChange": "valueChange";
1141
+ }, never, never, false, never>;
1142
+ }
1143
+ interface FlowMember {
1144
+ id: number;
1145
+ name: string;
1146
+ email: string;
1147
+ }
1148
+ declare class FlowsMemberService {
1149
+ private readonly subscriptions;
1150
+ private readonly known;
1151
+ constructor(subscriptions: SubscriptionService);
1152
+ search(subscriptionId: number, query: string): Observable<FlowMember[]>;
1153
+ /** Name of a member already seen in a search, for ids stored in a saved graph. */
1154
+ knownMember(id: number): FlowMember | undefined;
1155
+ static ɵfac: i0.ɵɵFactoryDeclaration<FlowsMemberService, never>;
1156
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
1157
+ }
1158
+ declare namespace flows_member_field_component_d_exports {
1159
+ export { FlowsMemberFieldComponent };
1160
+ }
1161
+ declare class FlowsMemberFieldComponent implements OnChanges, OnDestroy {
1162
+ private readonly members;
1163
+ private readonly cdr;
1164
+ value: unknown;
1165
+ multiple: boolean;
1166
+ subscriptionId: number;
1167
+ inputId: string;
1168
+ readOnly: boolean;
1169
+ readonly valueChange: EventEmitter<number | number[]>;
1170
+ selection: FlowMember | FlowMember[] | null;
1171
+ suggestions: FlowMember[];
1172
+ failed: boolean;
1173
+ private search?;
1174
+ constructor(members: FlowsMemberService, cdr: ChangeDetectorRef);
1175
+ ngOnChanges(): void;
1176
+ complete(query: string): void;
1177
+ changed(selection: FlowMember | FlowMember[] | null): void;
1178
+ ngOnDestroy(): void;
1179
+ static ɵfac: i0.ɵɵFactoryDeclaration<FlowsMemberFieldComponent, never>;
1180
+ static ɵcmp: i0.ɵɵComponentDeclaration<FlowsMemberFieldComponent, "pw-flows-member-field", never, {
1181
+ "value": {
1182
+ "alias": "value";
1183
+ "required": false;
1184
+ };
1185
+ "multiple": {
1186
+ "alias": "multiple";
1187
+ "required": false;
1188
+ };
1189
+ "subscriptionId": {
1190
+ "alias": "subscriptionId";
1191
+ "required": false;
1192
+ };
1193
+ "inputId": {
1194
+ "alias": "inputId";
1195
+ "required": false;
1196
+ };
1197
+ "readOnly": {
1198
+ "alias": "readOnly";
1199
+ "required": false;
1200
+ };
1201
+ }, {
1202
+ "valueChange": "valueChange";
1203
+ }, never, never, false, never>;
1204
+ }
1205
+ export declare class FlowsPrivateModule {
1206
+ 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>;
1208
+ static ɵinj: i0.ɵɵInjectorDeclaration<FlowsPrivateModule>;
1209
+ }