-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Expand file tree
/
Copy pathblocks.ts
More file actions
89 lines (85 loc) · 1.75 KB
/
Copy pathblocks.ts
File metadata and controls
89 lines (85 loc) · 1.75 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
export type PrimitiveValueType =
| 'string'
| 'number'
| 'boolean'
| 'json'
| 'array'
| 'file'
| 'file[]'
| 'any'
export type SubBlockType =
| 'short-input'
| 'long-input'
| 'dropdown'
| 'combobox'
| 'slider'
| 'table'
| 'code'
| 'switch'
| 'tool-input'
| 'skill-input'
| 'checkbox-list'
| 'grouped-checkbox-list'
| 'condition-input'
| 'eval-input'
| 'time-input'
| 'oauth-input'
| 'webhook-config'
| 'schedule-info'
| 'file-selector'
| 'sheet-selector'
| 'project-selector'
| 'channel-selector'
| 'user-selector'
| 'folder-selector'
| 'knowledge-base-selector'
| 'knowledge-tag-filters'
| 'document-selector'
| 'document-tag-entry'
| 'mcp-server-selector'
| 'mcp-tool-selector'
| 'mcp-dynamic-args'
| 'input-format'
| 'response-format'
| 'filter-builder'
| 'sort-builder'
| 'file-upload'
| 'input-mapping'
| 'variables-input'
| 'messages-input'
| 'workflow-selector'
| 'workflow-input-mapper'
| 'text'
| 'router-input'
| 'table-selector'
| 'column-selector'
| 'modal'
export interface OutputCondition {
field: string
value: string | number | boolean | Array<string | number | boolean>
not?: boolean
and?: {
field: string
value:
| string
| number
| boolean
| Array<string | number | boolean | undefined | null>
| undefined
| null
not?: boolean
}
}
export type OutputFieldDefinition =
| PrimitiveValueType
| {
type: PrimitiveValueType
description?: string
condition?: OutputCondition
hiddenFromDisplay?: boolean
}
export function isHiddenFromDisplay(def: unknown): boolean {
return Boolean(
def && typeof def === 'object' && 'hiddenFromDisplay' in def && def.hiddenFromDisplay
)
}