@livechat/platform-workflows 0.1.7 → 0.44.0-beta.v1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -1,14 +1,231 @@
1
- import { Config } from '@livechat/developer-studio-ui-react';
1
+ import * as _emotion_react_jsx_runtime from '@emotion/react/jsx-runtime';
2
+ import * as _emotion_react from '@emotion/react';
3
+ import { SerializedStyles } from '@emotion/react';
4
+ import * as react from 'react';
5
+ import { PropsWithChildren, ComponentProps, ReactElement, ReactNode } from 'react';
6
+ import { CardProps, ModalProps, IconSource } from '@livechat/design-system-react-components';
7
+ import { ActionModalContent, Config } from '@livechat/developer-studio-ui-react';
8
+ import * as _emotion_styled from '@emotion/styled';
9
+ import { IntegrationNames, CredentialType, Credential, WorkflowTaskType, WorkflowHttpTask, WorkflowForkJoinTask, WorkflowJoinTask, WorkflowSwitchTask, WorkflowCustomTaskName, WorkflowConditionTask, WorkflowSwitchCaseTask, WorkflowDoWhileTask, WorkflowLoopTask, WorkflowForEachTask, WorkflowTerminateTask, WorkflowWaitTask, WorkflowInlineBaseTask, WorkflowScriptTask, WorkflowConvertTask, WorkflowConstructTask, WorkflowSimpleTask, WorkflowActionTask, WorkflowAwaitTask, WorkflowNotifyAiAgentTask, WorkflowReasoningTask, WorkflowItemKind, WorkflowTriggerType, WorkflowWebhookTrigger, WorkflowWebhookManualTrigger, WorkflowManualTrigger, WorkflowAgentTrigger, WorkflowRecurringTrigger, WorkflowOneTimeTrigger, ExternalResourceConfig, CredentialDto, AccountDto, ProductDto, WorkflowBundle, WorkflowAggregate, WorkflowDto, ApiPaginatedListQueryParams, ApiPaginatedResult, WorkflowExecutionListItem, WorkflowExecution, WorkflowIntrospection } from '@livechat/developer-studio-api';
2
10
  import * as react_jsx_runtime from 'react/jsx-runtime';
3
- import React$1 from 'react';
11
+ import { JSONSchema7 } from 'json-schema';
12
+ import { UiSchema } from '@rjsf/utils';
13
+
14
+ interface IconStyleProps {
15
+ height: number;
16
+ width: number;
17
+ disabled?: boolean;
18
+ lowPadding?: boolean;
19
+ type?: 'circle' | 'rounded';
20
+ }
21
+ declare const baseIcon: (width: number, height: number, primaryColor?: string, disabled?: boolean, lowPadding?: boolean, noFill?: boolean, type?: "circle" | "rounded") => SerializedStyles;
22
+ declare const internalIconStyles: ({ width, height, lowPadding }: {
23
+ width?: number;
24
+ height?: number;
25
+ lowPadding?: boolean;
26
+ }) => SerializedStyles;
27
+ declare const defaultIconStyle: ({ height, width, disabled, lowPadding, type, primaryColor, noFill }: {
28
+ height: number;
29
+ width: number;
30
+ primaryColor?: string;
31
+ disabled?: boolean;
32
+ lowPadding?: boolean;
33
+ noFill?: boolean;
34
+ type?: "circle" | "rounded";
35
+ }, custom?: SerializedStyles) => SerializedStyles;
36
+
37
+ declare function GenericIcon({ name, height, width, disabled, lowPadding, type }: IconStyleProps & {
38
+ name: string;
39
+ }): _emotion_react_jsx_runtime.JSX.Element | null;
40
+
41
+ declare function UrlIcon({ src, ...styleProps }: IconStyleProps & {
42
+ src: string;
43
+ }): _emotion_react_jsx_runtime.JSX.Element;
44
+
45
+ declare function ClickableElement({ onClick, children }: PropsWithChildren<{
46
+ onClick: () => void;
47
+ }>): _emotion_react_jsx_runtime.JSX.Element;
48
+
49
+ declare function FloatingElement({ compact, ...rest }: CardProps & {
50
+ compact?: boolean;
51
+ }): _emotion_react_jsx_runtime.JSX.Element;
52
+
53
+ declare function RightFramePanel({ children }: PropsWithChildren): _emotion_react_jsx_runtime.JSX.Element;
54
+ declare function LeftFramePanel({ children }: PropsWithChildren): _emotion_react_jsx_runtime.JSX.Element;
55
+ declare function Frame({ topLeft, topRight, bottomLeft, bottomRight, children }: {
56
+ topLeft?: React.ReactNode;
57
+ topRight?: React.ReactNode;
58
+ bottomLeft?: React.ReactNode;
59
+ bottomRight?: React.ReactNode;
60
+ children?: React.ReactNode;
61
+ }): _emotion_react_jsx_runtime.JSX.Element;
62
+
63
+ /** @jsxImportSource @emotion/react */
64
+ interface LoaderProps {
65
+ overlay?: boolean;
66
+ }
67
+ declare function Loader({ overlay }: LoaderProps): _emotion_react_jsx_runtime.JSX.Element;
68
+
69
+ type ActionModalProps = {
70
+ onClose: () => void;
71
+ isLoading?: boolean;
72
+ width?: string;
73
+ height?: string;
74
+ testId?: string;
75
+ } & ComponentProps<typeof ActionModalContent>;
76
+ declare function ActionModal(props: PropsWithChildren<ActionModalProps>): _emotion_react_jsx_runtime.JSX.Element;
77
+
78
+ declare function Modal(props: PropsWithChildren<ModalProps>): _emotion_react_jsx_runtime.JSX.Element;
79
+
80
+ interface BasePaginationProps {
81
+ currentPage: number;
82
+ onPageChange: (page: number) => void;
83
+ className?: string;
84
+ totalRecords: number;
85
+ recordsPerPage: number;
86
+ }
87
+ type PaginationProps = BasePaginationProps & ({
88
+ isSimplified: true;
89
+ showRangeLabel: true;
90
+ } | {
91
+ isSimplified?: false;
92
+ showRangeLabel?: boolean;
93
+ });
94
+ declare function Pagination({ currentPage, onPageChange, isSimplified, totalRecords, recordsPerPage, showRangeLabel }: PaginationProps): _emotion_react_jsx_runtime.JSX.Element;
95
+
96
+ declare const Sidebar: _emotion_styled.StyledComponent<{
97
+ theme?: _emotion_react.Theme;
98
+ as?: React.ElementType;
99
+ } & {
100
+ width?: string;
101
+ }, react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
102
+ declare const SidebarBodyWrapper: _emotion_styled.StyledComponent<{
103
+ theme?: _emotion_react.Theme;
104
+ as?: React.ElementType;
105
+ }, react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
106
+ declare const SidebarBody: _emotion_styled.StyledComponent<{
107
+ theme?: _emotion_react.Theme;
108
+ as?: React.ElementType;
109
+ }, react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
110
+ declare function SidebarHeader({ title, description, icon, onClose, children }: {
111
+ title: React.ReactNode;
112
+ description?: React.ReactNode;
113
+ icon?: React.ReactNode;
114
+ onClose?: () => void;
115
+ children?: React.ReactNode;
116
+ }): _emotion_react_jsx_runtime.JSX.Element;
117
+ declare function SidebarContent({ children }: PropsWithChildren): _emotion_react_jsx_runtime.JSX.Element;
118
+
119
+ interface ProductIconProps {
120
+ product: IntegrationNames | string;
121
+ height: number;
122
+ width: number;
123
+ disabled?: boolean;
124
+ lowPadding?: boolean;
125
+ type?: 'circle' | 'rounded';
126
+ }
127
+ declare function ProductIcon({ product, height, width, disabled, lowPadding, type }: ProductIconProps): _emotion_react_jsx_runtime.JSX.Element;
128
+
129
+ type ProductIconCountProps = Omit<ProductIconProps, 'product'> & {
130
+ count: number;
131
+ };
132
+ declare function ProductIconCount({ count, height, width, disabled, lowPadding, type }: ProductIconCountProps): _emotion_react_jsx_runtime.JSX.Element;
133
+
134
+ declare function ProductIconWithName({ product }: {
135
+ product: IntegrationNames;
136
+ }): _emotion_react_jsx_runtime.JSX.Element;
137
+
138
+ declare function ProductTag({ product, onClick, children }: PropsWithChildren<{
139
+ product: IntegrationNames;
140
+ onClick?: () => void;
141
+ }>): _emotion_react_jsx_runtime.JSX.Element;
142
+
143
+ declare function ProductTagWithName({ product, onClick }: {
144
+ product: IntegrationNames;
145
+ onClick?: () => void;
146
+ }): react_jsx_runtime.JSX.Element;
147
+
148
+ type TreeNodeReference = {
149
+ type: 'number';
150
+ value: 0;
151
+ } | {
152
+ type: 'string';
153
+ value: 'property';
154
+ };
155
+ interface TreeNode {
156
+ name: string;
157
+ value: string;
158
+ type: string;
159
+ isSelectable?: boolean;
160
+ displayValue?: string;
161
+ isAddable?: boolean;
162
+ hasAddable?: boolean;
163
+ reference?: TreeNodeReference;
164
+ isMatch?: boolean;
165
+ hasMatch?: boolean;
166
+ children: TreeNode[];
167
+ }
168
+ interface TreeNodeState {
169
+ isExpanded: boolean;
170
+ isSelectable: boolean;
171
+ isRoot?: boolean;
172
+ }
173
+ type TreeNodeRendererProps = {
174
+ node: TreeNode;
175
+ state: TreeNodeState;
176
+ tag: React.ReactElement;
177
+ };
178
+ type TreeTooltipRendererProps = {
179
+ node: TreeNode;
180
+ };
181
+ type TreeOptions = {
182
+ showValues?: boolean;
183
+ editableReferences?: boolean;
184
+ addPropertyDefaultName?: string;
185
+ nodeRenderer?: React.ComponentType<TreeNodeRendererProps>;
186
+ tooltipRenderer?: (props: TreeTooltipRendererProps) => React.ReactNode;
187
+ };
188
+
189
+ declare function TreePicker({ data, editableReferences, onSelect, nodeRenderer, tooltipRenderer, showValues, emptyMessage, addPropertyDefaultName, testId }: {
190
+ data: TreeNode[];
191
+ onSelect?: (node: TreeNode, isNew?: boolean) => void;
192
+ emptyMessage?: string;
193
+ testId?: string;
194
+ } & TreeOptions): _emotion_react_jsx_runtime.JSX.Element;
195
+
196
+ declare function TreeView({ data, onSelect, editableReferences, search, nodeRenderer, tooltipRenderer, showValues, emptyMessage, addPropertyDefaultName }: {
197
+ data: TreeNode | TreeNode[] | null;
198
+ onSelect?: (node: TreeNode, isNew?: boolean) => void;
199
+ search?: string;
200
+ emptyMessage?: string;
201
+ } & TreeOptions): _emotion_react_jsx_runtime.JSX.Element;
202
+
203
+ interface ObjectMeta {
204
+ properties: Record<string, JSONSchema7 | null>;
205
+ }
206
+
207
+ declare const replaceReferenceInChildNode: <T>(node: TreeNode, newValue: T | undefined, reference: TreeNodeReference) => TreeNode;
208
+ declare function applySearchMatchingToList(nodes: TreeNode[], search: string | undefined): TreeNode[];
209
+ declare function findNodeByPath(node: TreeNode, path: string): TreeNode | null;
210
+ declare function createGroupNode(data: Partial<TreeNode>, children: TreeNode[]): TreeNode;
211
+ declare function convertSchemaToTree(schema: JSONSchema7, nodeName: string, path: string, meta: {
212
+ basePath: string;
213
+ search?: string;
214
+ reference?: TreeNodeReference;
215
+ }): TreeNode;
216
+ declare function convertObjectToTree(obj: (object & {
217
+ __meta?: ObjectMeta;
218
+ }) | null, nodeName: string, path: string, meta?: {
219
+ selectable?: boolean;
220
+ basePath?: string;
221
+ search?: string;
222
+ schema?: JSONSchema7;
223
+ reference?: TreeNodeReference;
224
+ }): TreeNode;
4
225
 
5
226
  type WorkflowsConfig = Config & {
6
227
  subPath?: string;
7
228
  isHeadless: boolean;
8
- workflowsAppId: string;
9
- workflowsWebhooksAppId: string;
10
- workflowsFunctionsUrl: string;
11
- workflowAiAgentId: string;
12
229
  isLiveChatMode: boolean;
13
230
  isTextMode: boolean;
14
231
  pusherKey: string;
@@ -23,11 +240,42 @@ declare const getWorkflowsEnv: <T extends keyof WorkflowsConfig>(key: T) => Work
23
240
  declare const WORKFLOWS_TEST_SELECTORS: {
24
241
  views: {
25
242
  workflows: {
243
+ components: {
244
+ layout: {
245
+ sidebar: {
246
+ closeButton: string;
247
+ };
248
+ pagination: {
249
+ paginationArrowButton: {
250
+ nextButton: string;
251
+ previousButton: string;
252
+ };
253
+ };
254
+ };
255
+ picker: {
256
+ itemList: string;
257
+ };
258
+ };
26
259
  creator: {
27
260
  navbar: {
261
+ runsButton: string;
262
+ readOnlyTag: string;
28
263
  activateSwitch: string;
29
264
  publishButton: string;
30
265
  editButton: string;
266
+ nameInput: string;
267
+ editNameButton: string;
268
+ draftTag: string;
269
+ withDraftTag: string;
270
+ backButton: string;
271
+ actionMenu: {
272
+ button: string;
273
+ detailsButton: string;
274
+ executionsButton: string;
275
+ discardDraftButton: string;
276
+ editDraftButton: string;
277
+ runButton: string;
278
+ };
31
279
  };
32
280
  builder: {
33
281
  nodes: {
@@ -38,29 +286,88 @@ declare const WORKFLOWS_TEST_SELECTORS: {
38
286
  trigger: {
39
287
  button: string;
40
288
  };
289
+ tooltipErrorTrigger: string;
41
290
  };
42
291
  };
43
292
  forms: {
293
+ customFieldActions: {
294
+ addToTrigerButton: string;
295
+ connectTriggerButton: string;
296
+ switchTriggerButton: string;
297
+ };
44
298
  integrations: {
45
299
  text: {
46
300
  info: string;
47
301
  button: string;
48
302
  };
49
303
  };
304
+ widgets: {
305
+ credentialPicker: {
306
+ displayName: string;
307
+ removeButton: string;
308
+ secondaryInfo: string;
309
+ reconnectButton: string;
310
+ };
311
+ tagsInput: {
312
+ formatIcon: string;
313
+ triggerIcon: string;
314
+ wrapper: string;
315
+ };
316
+ };
317
+ testRun: {
318
+ runButton: string;
319
+ errorMessageText: string;
320
+ status: {
321
+ statusText: string;
322
+ statusIconSuccess: string;
323
+ statusIconError: string;
324
+ responseInfo: string;
325
+ };
326
+ };
327
+ testRunModal: {
328
+ wrapper: string;
329
+ runButton: string;
330
+ };
331
+ };
332
+ controls: {
333
+ homeButton: string;
334
+ };
335
+ handles: {
336
+ buttons: {
337
+ runButton: string;
338
+ removeEdgeButton: string;
339
+ };
340
+ };
341
+ };
342
+ forms: {
343
+ allSetAlert: string;
344
+ buttons: {
345
+ removeButton: string;
50
346
  };
51
347
  };
52
348
  modals: {
53
- addTask: {
349
+ add: {
54
350
  wrapper: string;
55
- taskCard: (key: string) => string;
56
- taskCategoryButton: (key: string) => string;
351
+ search: string;
352
+ card: (key: string) => string;
353
+ categoryButton: (key: string) => string;
57
354
  saveButton: string;
355
+ noMatchingText: (kind: string) => string;
58
356
  };
59
- addTrigger: {
357
+ delete: {
60
358
  wrapper: string;
61
- saveButton: string;
62
- triggerCard: (key: string) => string;
63
- triggerCategoryButton: (key: string) => string;
359
+ deleteButton: string;
360
+ cancelButton: string;
361
+ };
362
+ execute: {
363
+ wrapper: string;
364
+ cancelButton: string;
365
+ runButton: string;
366
+ };
367
+ import: {
368
+ wrapper: string;
369
+ cancelButton: string;
370
+ confirmButton: string;
64
371
  };
65
372
  publish: {
66
373
  wrapper: string;
@@ -72,6 +379,14 @@ declare const WORKFLOWS_TEST_SELECTORS: {
72
379
  element: {
73
380
  wrapper: string;
74
381
  };
382
+ executions: {
383
+ noPublishedWorkflow: string;
384
+ noWorkflowRunsYet: string;
385
+ noMatchingExecution: string;
386
+ card: (id: string) => string;
387
+ executionDate: string;
388
+ status: string;
389
+ };
75
390
  details: {
76
391
  executions: {
77
392
  list: {
@@ -79,9 +394,6 @@ declare const WORKFLOWS_TEST_SELECTORS: {
79
394
  status: string;
80
395
  };
81
396
  };
82
- panel: {
83
- historyTab: string;
84
- };
85
397
  info: {
86
398
  dateCreated: string;
87
399
  dateUpdated: string;
@@ -93,13 +405,24 @@ declare const WORKFLOWS_TEST_SELECTORS: {
93
405
  };
94
406
  list: {
95
407
  grid: {
408
+ filters: {
409
+ wrapper: string;
410
+ statusFilter: string;
411
+ clearFiltersButton: string;
412
+ };
96
413
  table: {
97
414
  wrapper: string;
98
415
  body: string;
99
416
  menuTrigger: string;
100
417
  activateSwitch: string;
101
418
  infoButton: string;
419
+ emptyInfo: string;
102
420
  workflowItem: (id: string) => string;
421
+ withDraftTag: string;
422
+ draftTag: string;
423
+ clearFiltersButton: string;
424
+ productIconsRow: string;
425
+ productIconCount: string;
103
426
  };
104
427
  };
105
428
  view: {
@@ -113,30 +436,503 @@ declare const WORKFLOWS_TEST_SELECTORS: {
113
436
  previewTemplate: {
114
437
  wrapper: string;
115
438
  useButton: string;
439
+ productsUsed: string;
440
+ };
441
+ previewImport: {
442
+ wrapper: string;
443
+ useButton: string;
444
+ closeButton: string;
445
+ };
446
+ previewFallback: {
447
+ wrapper: string;
448
+ closeButton: string;
116
449
  };
117
450
  };
118
451
  home: {
452
+ noTemplatesFoundInfo: string;
119
453
  cards: {
120
454
  template: {
121
455
  wrapper: string;
122
456
  };
457
+ scratch: {
458
+ cardHeader: string;
459
+ };
123
460
  };
124
461
  };
125
462
  };
463
+ common: {
464
+ errorPage: {
465
+ backButton: string;
466
+ homeButton: string;
467
+ refreshButton: string;
468
+ };
469
+ tree: {
470
+ listElementExpanderButton: string;
471
+ };
472
+ };
126
473
  };
127
474
  };
128
475
  };
129
476
 
477
+ /** @jsxImportSource @emotion/react */
478
+
479
+ declare function ErrorBoundary(): ReactElement;
480
+
481
+ /** @jsxImportSource @emotion/react */
482
+
130
483
  interface LoginErrorPageProps {
131
484
  errorImage: React.ReactNode;
132
485
  welcomeImage: React.ReactNode;
133
486
  onAuthorize: () => void;
134
487
  }
135
- declare function LoginErrorPage({ errorImage, welcomeImage, onAuthorize }: LoginErrorPageProps): JSX.Element;
488
+ declare function LoginErrorPage({ errorImage, welcomeImage, onAuthorize }: LoginErrorPageProps): ReactElement;
489
+
490
+ /** @jsxImportSource @emotion/react */
491
+
492
+ declare function NotFoundPage(): ReactElement;
136
493
 
137
- interface WorkflowsModuleProps {
138
- waitlistImage: React$1.ReactNode;
494
+ declare function WorkflowBuilder({ fitView, viewport }: {
495
+ fitView?: boolean;
496
+ viewport?: {
497
+ padding: {
498
+ left?: number;
499
+ right?: number;
500
+ top?: number;
501
+ bottom?: number;
502
+ };
503
+ };
504
+ }): _emotion_react_jsx_runtime.JSX.Element;
505
+
506
+ declare function WorkflowCreatorFrame({ children }: PropsWithChildren): react_jsx_runtime.JSX.Element;
507
+
508
+ declare function WorkflowCreatorSkeleton(): react_jsx_runtime.JSX.Element;
509
+
510
+ declare function WorkflowPreviewFrame({ children }: PropsWithChildren): react_jsx_runtime.JSX.Element;
511
+
512
+ declare function WorkflowPreviewSkeleton(): react_jsx_runtime.JSX.Element;
513
+
514
+ declare enum CredentialKind {
515
+ Internal = "internal",
516
+ Custom = "custom"
517
+ }
518
+ interface CredentialConfig {
519
+ name: string;
520
+ provider: string;
521
+ product?: string;
522
+ kind: CredentialKind;
523
+ type: CredentialType;
524
+ specification: {
525
+ schema: JSONSchema7;
526
+ uiSchema: UiSchema;
527
+ };
528
+ customization: {
529
+ description: string;
530
+ };
531
+ template: Credential;
532
+ metadata: {
533
+ isComplete?: boolean;
534
+ isHidden?: boolean;
535
+ };
536
+ }
537
+
538
+ declare enum WorkflowDomain {
539
+ Chats = "chats",
540
+ Tickets = "tickets",
541
+ Customers = "customers",
542
+ Agents = "agents",
543
+ General = "general"
544
+ }
545
+ interface WorkflowDomainConfig {
546
+ name: string;
547
+ displayName: string;
548
+ }
549
+
550
+ interface WorkflowTaskDefinitionMap {
551
+ [WorkflowTaskType.http]: WorkflowHttpTask;
552
+ [WorkflowTaskType.forkJoin]: WorkflowForkJoinTask;
553
+ [WorkflowTaskType.join]: WorkflowJoinTask;
554
+ [WorkflowTaskType.switch]: WorkflowSwitchTask;
555
+ [WorkflowCustomTaskName.condition]: WorkflowConditionTask;
556
+ [WorkflowCustomTaskName.switchCase]: WorkflowSwitchCaseTask;
557
+ [WorkflowTaskType.doWhile]: WorkflowDoWhileTask;
558
+ [WorkflowCustomTaskName.loop]: WorkflowLoopTask;
559
+ [WorkflowCustomTaskName.forEach]: WorkflowForEachTask;
560
+ [WorkflowTaskType.terminate]: WorkflowTerminateTask;
561
+ [WorkflowTaskType.wait]: WorkflowWaitTask;
562
+ [WorkflowTaskType.inline]: WorkflowInlineBaseTask;
563
+ [WorkflowCustomTaskName.script]: WorkflowScriptTask;
564
+ [WorkflowCustomTaskName.convert]: WorkflowConvertTask;
565
+ [WorkflowCustomTaskName.construct]: WorkflowConstructTask;
566
+ [WorkflowTaskType.simple]: WorkflowSimpleTask;
567
+ [WorkflowCustomTaskName.action]: WorkflowActionTask;
568
+ [WorkflowCustomTaskName.awaitAgent]: WorkflowAwaitTask;
569
+ [WorkflowCustomTaskName.notifyAgent]: WorkflowNotifyAiAgentTask;
570
+ [WorkflowCustomTaskName.reasoning]: WorkflowReasoningTask;
571
+ }
572
+ interface WorkflowsTriggerDefinitionMap {
573
+ [WorkflowTriggerType.webhook]: WorkflowWebhookTrigger;
574
+ [WorkflowTriggerType.webhookManual]: WorkflowWebhookManualTrigger;
575
+ [WorkflowTriggerType.manual]: WorkflowManualTrigger;
576
+ [WorkflowTriggerType.agent]: WorkflowAgentTrigger;
577
+ [WorkflowTriggerType.recurring]: WorkflowRecurringTrigger;
578
+ [WorkflowTriggerType.oneTime]: WorkflowOneTimeTrigger;
579
+ }
580
+ type WorkflowItemFlags = {
581
+ isHidden: boolean;
582
+ isRemovable: boolean;
583
+ isSelectable: boolean;
584
+ isEditable: boolean;
585
+ };
586
+ type WorkflowItemBaseMetadata = {
587
+ outputBasePath: string | null;
588
+ inputBasePath: string;
589
+ credentialPath?: string;
590
+ isHidden: boolean;
591
+ };
592
+ type WorkflowItemMetadata = WorkflowItemBaseMetadata;
593
+ declare enum WorkflowItemTag {
594
+ AI = "ai"
595
+ }
596
+ /**
597
+ * Describes the nature of a task/trigger so consumers (UI, AI agent prompts)
598
+ * can group, filter, and pick icons without inspecting `displayName`.
599
+ *
600
+ * For tasks the value reflects the side-effect the task performs.
601
+ * For triggers it reflects the verb of the event that fires the trigger
602
+ * (or `invoke`/`control` for non-event-driven orchestration triggers).
603
+ *
604
+ * Convention:
605
+ * - `read` — find/get/list/search + pure AI compute returning data
606
+ * - `create` — adds a new entity; trigger: "X was created"
607
+ * - `upsert` — create-or-update
608
+ * - `update` — modifies an existing entity; trigger: "X changed"
609
+ * - `delete` — remove/archive/close/end + "X was removed"
610
+ * - `send` — outbound communication (message, notification, transcript)
611
+ * - `invoke` — side-effectful action that does not fit CRUD
612
+ * (run job, generic HTTP, arbitrary script, notify agent,
613
+ * manually-triggered workflow)
614
+ * - `control` — workflow control-flow primitive (fork/join/cond/switch/loop/
615
+ * wait/terminate) and system trigger orchestration
616
+ */
617
+ declare enum WorkflowOperation {
618
+ Read = "read",
619
+ Create = "create",
620
+ Upsert = "upsert",
621
+ Update = "update",
622
+ Delete = "delete",
623
+ Send = "send",
624
+ Invoke = "invoke",
625
+ Control = "control"
626
+ }
627
+ /**
628
+ * Entity the task/trigger acts on. Always namespaced with the provider id
629
+ * (`<provider>:<entity>`, kebab-case) so the same entity name across two
630
+ * providers can't collide.
631
+ *
632
+ * Allowed values come from per-provider `<PROVIDER>_SUBJECTS` constants
633
+ * (e.g. `BIGCOMMERCE_SUBJECTS`, `LIVECHAT_SUBJECTS`) which `satisfies
634
+ * Record<string, \`${IntegrationNames.X}:${string}\`>` so typos and missing
635
+ * namespaces fail to compile. Control-flow primitives and generic HTTP /
636
+ * script tasks leave it `undefined`.
637
+ */
638
+ type WorkflowSubject = `${string}:${string}`;
639
+ interface WorkflowItemCustomization {
640
+ domain: WorkflowDomain | null;
641
+ provider: string;
642
+ operation: WorkflowOperation;
643
+ subject?: WorkflowSubject;
644
+ product?: string;
645
+ displayName: string;
646
+ description: string;
647
+ shortDescription: string;
648
+ tags?: WorkflowItemTag[];
649
+ icon?: string;
650
+ flags: WorkflowItemFlags;
651
+ }
652
+ interface WorkflowItemSpecificationRef<TType> {
653
+ type: 'single' | 'array' | 'array-element';
654
+ value: TType;
655
+ subject?: WorkflowDomain;
656
+ }
657
+ interface WorkflowItemInputBinding {
658
+ outputPath: string;
659
+ inputPath: string;
660
+ inputFormat?: string;
661
+ }
662
+ interface WorkflowItemSpecification {
663
+ input?: JSONSchema7;
664
+ inputUi?: UiSchema;
665
+ output?: JSONSchema7;
666
+ outputUi?: UiSchema;
667
+ inputReferences?: Record<string, WorkflowItemSpecificationRef<string>[]>;
668
+ inputResources?: Record<string, WorkflowItemSpecificationRef<string>[]>;
669
+ outputReferences?: Record<string, WorkflowItemSpecificationRef<string>[]>;
670
+ outputResources?: Record<string, WorkflowItemSpecificationRef<string>[]>;
671
+ outputBindings?: WorkflowItemInputBinding[];
672
+ }
673
+ interface WorkflowItemSpecifications<TData> {
674
+ default: string;
675
+ latest: string;
676
+ versions: Record<string, WorkflowItemSpecification & {
677
+ metadata: WorkflowItemMetadata;
678
+ template: TData;
679
+ }>;
680
+ }
681
+ interface WorkflowItemConfigBase<TData> {
682
+ key: string;
683
+ kind: WorkflowItemKind;
684
+ customization: WorkflowItemCustomization;
685
+ specifications: WorkflowItemSpecifications<TData>;
686
+ }
687
+ /** Union of all task definition types */
688
+ type AnyTaskDefinition = WorkflowTaskDefinitionMap[keyof WorkflowTaskDefinitionMap];
689
+ /** Union of all trigger definition types */
690
+ type AnyTriggerDefinition = WorkflowsTriggerDefinitionMap[keyof WorkflowsTriggerDefinitionMap];
691
+ /**
692
+ * Generic task config - use with specific TDefinition for type safety
693
+ * @example const myConfig: WorkflowTaskConfig<WorkflowHttpTask> = { ... }
694
+ */
695
+ type WorkflowTaskConfig<TDefinition extends AnyTaskDefinition = AnyTaskDefinition> = {
696
+ kind: typeof WorkflowItemKind.Task;
697
+ } & WorkflowItemConfigBase<TDefinition>;
698
+ /**
699
+ * Generic trigger config - use with specific TDefinition for type safety
700
+ */
701
+ type WorkflowTriggerConfig<TDefinition extends AnyTriggerDefinition = AnyTriggerDefinition> = {
702
+ kind: typeof WorkflowItemKind.Trigger;
703
+ } & WorkflowItemConfigBase<TDefinition>;
704
+ type WorkflowItemConfig = WorkflowTaskConfig | WorkflowTriggerConfig;
705
+
706
+ interface ProviderProductConfig {
707
+ name: string;
708
+ displayName: string;
709
+ icon?: string;
710
+ }
711
+ interface ProviderConfig {
712
+ name: string;
713
+ displayName: string;
714
+ icon?: string;
715
+ isHidden?: boolean;
716
+ products?: Record<string, ProviderProductConfig>;
717
+ }
718
+
719
+ declare enum WorkflowRefClass {
720
+ Reference = "reference",
721
+ Resource = "resource"
722
+ }
723
+ declare enum WorkflowReferenceKind {
724
+ Resource = "resource",
725
+ Entity = "entity",
726
+ Property = "property"
727
+ }
728
+ declare enum WorkflowReferenceMatchingStrategy {
729
+ ExactOnly = "exact_only",
730
+ Semantic = "semantic"
731
+ }
732
+ type WorkflowReferenceDefinition = JSONSchema7 & {
733
+ class: WorkflowRefClass.Reference;
734
+ provider: string;
735
+ name: string;
736
+ displayName: string;
737
+ pluralDisplayName: string;
738
+ domain: WorkflowDomain | null;
739
+ product?: string;
740
+ visible: true;
741
+ configs?: {
742
+ dependencies?: Record<string, JSONSchema7>;
743
+ matching?: {
744
+ strategy: WorkflowReferenceMatchingStrategy;
745
+ };
746
+ external?: ExternalResourceConfig;
747
+ };
748
+ } & ({
749
+ kind: WorkflowReferenceKind.Resource;
750
+ resource: {
751
+ name: string;
752
+ path: string;
753
+ };
754
+ } | {
755
+ kind: WorkflowReferenceKind.Property | WorkflowReferenceKind.Entity;
756
+ });
757
+ type WorkflowResourceDefinition = JSONSchema7 & {
758
+ class: WorkflowRefClass.Resource;
759
+ provider: string;
760
+ name: string;
761
+ displayName: string;
762
+ pluralDisplayName: string;
763
+ };
764
+
765
+ interface Configuration {
766
+ providers: Record<string, ProviderConfig>;
767
+ domains: Record<WorkflowDomain, WorkflowDomainConfig>;
768
+ credentials: Record<string, CredentialConfig>;
769
+ items: Record<string, WorkflowItemConfig>;
770
+ resources: Record<string, WorkflowResourceDefinition>;
771
+ references: Record<string, WorkflowReferenceDefinition>;
772
+ }
773
+ type ProviderConfiguration = ProviderConfig & {
774
+ defaultCredential?: CredentialConfig;
775
+ credentials: Record<string, CredentialConfig>;
776
+ items: Record<string, WorkflowItemConfig>;
777
+ resources: Record<string, WorkflowResourceDefinition>;
778
+ };
779
+ interface Specification {
780
+ providers: Record<string, ProviderConfiguration>;
781
+ raw: Configuration;
782
+ }
783
+
784
+ type WorkflowCredential = CredentialDto & {
785
+ isInternal: boolean;
786
+ };
787
+
788
+ interface WorkflowContextOptions {
789
+ readonly?: boolean;
790
+ validation?: {
791
+ hidden?: boolean;
792
+ strategy?: 'non-blocking';
793
+ };
794
+ selection?: {
795
+ hidden?: boolean;
796
+ };
797
+ status?: {
798
+ hidden?: boolean;
799
+ };
139
800
  }
140
- declare function WorkflowsModule({ waitlistImage }: WorkflowsModuleProps): react_jsx_runtime.JSX.Element;
801
+ interface WorkflowContextDependencies {
802
+ specification: Specification;
803
+ account?: AccountDto;
804
+ credentials?: WorkflowCredential[];
805
+ products?: ProductDto[];
806
+ }
807
+ interface WorkflowContextStoreActions {
808
+ invalidate: (entry: WorkflowContextStoreEntry, options?: {
809
+ immediate?: boolean;
810
+ }) => void;
811
+ }
812
+ type WorkflowContextStoreEntry = {
813
+ scope: 'resources';
814
+ key: keyof WorkflowBundle;
815
+ } | {
816
+ scope: 'dependencies';
817
+ key: keyof WorkflowContextDependencies;
818
+ };
819
+
820
+ interface WorkflowCreatorInput {
821
+ aggregate: WorkflowAggregate;
822
+ }
823
+ interface WorkflowCreatorStoreData {
824
+ input: WorkflowCreatorInput;
825
+ dependencies: WorkflowContextDependencies;
826
+ options?: WorkflowContextOptions;
827
+ }
828
+ type WorkflowCreatorStoreActions = WorkflowContextStoreActions & {
829
+ flush: () => void;
830
+ };
831
+ interface WorkflowCreatorStoreApi {
832
+ getWorkflow(id: string, version?: number): Promise<WorkflowDto>;
833
+ getWorkflowExecutions(id: string, queryParams?: ApiPaginatedListQueryParams): Promise<ApiPaginatedResult<WorkflowExecutionListItem>>;
834
+ getWorkflowExecution(workflowId: string, executionId: string): Promise<WorkflowExecution>;
835
+ getWorkflowIntrospection(id: string, version?: number): Promise<WorkflowIntrospection>;
836
+ }
837
+ interface WorkflowCreatorStore {
838
+ data: WorkflowCreatorStoreData;
839
+ actions: WorkflowCreatorStoreActions;
840
+ api: WorkflowCreatorStoreApi;
841
+ }
842
+
843
+ declare function WorkflowCreatorProvider({ store: creatorStore, children }: PropsWithChildren<{
844
+ store: WorkflowCreatorStore;
845
+ }>): _emotion_react_jsx_runtime.JSX.Element;
846
+
847
+ interface WorkflowPreviewInput {
848
+ workflow: WorkflowDto;
849
+ }
850
+ interface WorkflowPreviewStoreData {
851
+ input: WorkflowPreviewInput;
852
+ dependencies: WorkflowContextDependencies;
853
+ options?: WorkflowContextOptions;
854
+ }
855
+ interface WorkflowPreviewStore {
856
+ data: WorkflowPreviewStoreData;
857
+ }
858
+
859
+ declare function WorkflowPreviewProvider({ store: previewStore, children }: PropsWithChildren<{
860
+ store: WorkflowPreviewStore;
861
+ }>): _emotion_react_jsx_runtime.JSX.Element;
862
+
863
+ type NewWorkflowInitialData = {
864
+ type: 'template';
865
+ templateId: string;
866
+ } | {
867
+ type: 'workflow';
868
+ workflow: Partial<WorkflowDto>;
869
+ };
870
+ type WorkflowCreatorTarget = {
871
+ mode: 'idle';
872
+ } | {
873
+ mode: 'new';
874
+ initialData?: NewWorkflowInitialData;
875
+ } | {
876
+ mode: 'existing';
877
+ workflowId: string;
878
+ };
879
+
880
+ declare function useWorkflowCreatorTargetFromUrl(): WorkflowCreatorTarget | undefined;
881
+
882
+ declare function WorkflowCreator({ readonly }?: {
883
+ readonly?: boolean;
884
+ }): react_jsx_runtime.JSX.Element;
885
+ declare function Workflow({ options, target }?: {
886
+ options?: WorkflowContextOptions;
887
+ target?: WorkflowCreatorTarget;
888
+ }): react_jsx_runtime.JSX.Element | undefined;
889
+
890
+ interface CreatedOnFilterValue {
891
+ from: string | null;
892
+ to: string | null;
893
+ }
894
+
895
+ interface WorkflowFilterDefinition<K extends string = string> {
896
+ key: K;
897
+ label: string;
898
+ icon: IconSource;
899
+ displayValue: string | null;
900
+ isSelected: boolean;
901
+ loadedFromUrl?: boolean;
902
+ onClear: () => void;
903
+ renderContent: () => ReactNode;
904
+ }
905
+ interface WorkflowsFiltersProps<K extends string = string> {
906
+ clearFilters: () => void;
907
+ filterDefinitions: WorkflowFilterDefinition<K>[];
908
+ }
909
+ declare function WorkflowFilters<K extends string = string>({ filterDefinitions, clearFilters }: WorkflowsFiltersProps<K>): _emotion_react_jsx_runtime.JSX.Element;
910
+ declare const WorkflowBaseFilterKey: {
911
+ readonly Status: "status";
912
+ readonly Draft: "draft";
913
+ readonly CreatedBy: "createdBy";
914
+ readonly CreatedOn: "createdOn";
915
+ };
916
+ type WorkflowBaseFilterKey = (typeof WorkflowBaseFilterKey)[keyof typeof WorkflowBaseFilterKey];
917
+ type WorkflowBaseStatusValue = 'active' | 'inactive' | null;
918
+ type WorkflowBaseDraftValue = 'draft' | 'published' | null;
919
+ type WorkflowBaseCreatedByValue = string[];
920
+ type WorkflowBaseCreatedOnValue = CreatedOnFilterValue;
921
+ interface BaseFilterConfig<TValue> {
922
+ isSelected: boolean;
923
+ loadedFromUrl?: boolean;
924
+ onChange: (value: TValue) => void;
925
+ onClear: () => void;
926
+ value: TValue;
927
+ }
928
+ interface WorkflowBaseFiltersConfig {
929
+ createdBy: BaseFilterConfig<WorkflowBaseCreatedByValue>;
930
+ createdOn: BaseFilterConfig<WorkflowBaseCreatedOnValue>;
931
+ draft: BaseFilterConfig<WorkflowBaseDraftValue>;
932
+ status: BaseFilterConfig<WorkflowBaseStatusValue>;
933
+ }
934
+ declare function useBaseWorkflowFilters(config: WorkflowBaseFiltersConfig): WorkflowFilterDefinition<WorkflowBaseFilterKey>[];
935
+
936
+ declare function Workflows(): _emotion_react_jsx_runtime.JSX.Element;
141
937
 
142
- export { LoginErrorPage as LoginError, WORKFLOWS_TEST_SELECTORS, type WorkflowsConfig, WorkflowsModule, config, getWorkflowsEnv, setWorkflowsConfig };
938
+ export { ActionModal, ClickableElement, ErrorBoundary, FloatingElement, Frame, GenericIcon, type IconStyleProps, LeftFramePanel, Loader, LoginErrorPage as LoginError, Modal, type NewWorkflowInitialData, NotFoundPage as NotFound, Pagination, ProductIcon, ProductIconCount, type ProductIconProps, ProductIconWithName, ProductTag, ProductTagWithName, RightFramePanel, Sidebar, SidebarBody, SidebarBodyWrapper, SidebarContent, SidebarHeader, type TreeNode, type TreeNodeReference, type TreeNodeRendererProps, type TreeNodeState, type TreeOptions, TreePicker, type TreeTooltipRendererProps, TreeView, UrlIcon, WORKFLOWS_TEST_SELECTORS, Workflow, type WorkflowBaseCreatedByValue, type WorkflowBaseCreatedOnValue, type WorkflowBaseDraftValue, WorkflowBaseFilterKey, type WorkflowBaseStatusValue, WorkflowBuilder, type WorkflowContextDependencies, type WorkflowContextOptions, type WorkflowContextStoreEntry, WorkflowCreator, WorkflowCreatorFrame, type WorkflowCreatorInput, WorkflowCreatorProvider, WorkflowCreatorSkeleton, type WorkflowCreatorStore, type WorkflowCreatorStoreActions, type WorkflowCreatorStoreApi, type WorkflowCreatorStoreData, type WorkflowCreatorTarget, type WorkflowFilterDefinition, WorkflowFilters, WorkflowPreviewFrame, WorkflowPreviewProvider, WorkflowPreviewSkeleton, Workflows, type WorkflowsConfig, applySearchMatchingToList, baseIcon, config, convertObjectToTree, convertSchemaToTree, createGroupNode, defaultIconStyle, findNodeByPath, getWorkflowsEnv, internalIconStyles, replaceReferenceInChildNode, setWorkflowsConfig, useBaseWorkflowFilters, useWorkflowCreatorTargetFromUrl };