@process.co/element-types 0.0.8 → 0.0.9
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/authoring-contract.d.ts +104 -0
- package/dist/authoring-contract.d.ts.map +1 -0
- package/dist/authoring-contract.js +115 -0
- package/dist/builtin-action-slots-registry.d.ts +31 -0
- package/dist/builtin-action-slots-registry.d.ts.map +1 -0
- package/dist/builtin-action-slots-registry.js +30 -0
- package/dist/index.d.ts +12 -28
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +15 -1
- package/dist/materialize-authoring-from-cli-output.d.ts +51 -0
- package/dist/materialize-authoring-from-cli-output.d.ts.map +1 -0
- package/dist/materialize-authoring-from-cli-output.js +99 -0
- package/dist/materialize-slot-definition.d.ts +32 -0
- package/dist/materialize-slot-definition.d.ts.map +1 -0
- package/dist/materialize-slot-definition.js +68 -0
- package/dist/process-element-cli-output.d.ts +82 -0
- package/dist/process-element-cli-output.d.ts.map +1 -0
- package/dist/process-element-cli-output.js +3 -0
- package/dist/slot-definition.d.ts +30 -0
- package/dist/slot-definition.d.ts.map +1 -0
- package/dist/slot-definition.js +3 -0
- package/package.json +1 -1
- package/src/authoring-contract.ts +243 -0
- package/src/builtin-action-slots-registry.ts +36 -0
- package/src/index.ts +62 -29
- package/src/materialize-authoring-from-cli-output.ts +157 -0
- package/src/materialize-slot-definition.ts +88 -0
- package/src/process-element-cli-output.ts +85 -0
- package/src/slot-definition.ts +31 -0
package/src/index.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
1
2
|
import type { z } from 'zod';
|
|
2
3
|
|
|
3
4
|
// Element types
|
|
@@ -15,35 +16,67 @@ export type ElementSignal<T> = { type: "signal"; icon?: ElementIcon; label?: str
|
|
|
15
16
|
|
|
16
17
|
export type ElementIcon = { type: "FontAwesome" | "MaterialIcons" | "ProcessIcons" | "RemoteImage" | "image"; icon: string | ['far' | 'fas' | 'fab' | 'fal' | 'fad', string] } | string;
|
|
17
18
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
export type
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
}
|
|
19
|
+
import type {
|
|
20
|
+
ISlotInstanceDefinition,
|
|
21
|
+
ISlotStaticInstanceDefinition,
|
|
22
|
+
ISlotDefinition,
|
|
23
|
+
} from './slot-definition';
|
|
24
|
+
|
|
25
|
+
export type { ISlotInstanceDefinition, ISlotStaticInstanceDefinition, ISlotDefinition };
|
|
26
|
+
|
|
27
|
+
export {
|
|
28
|
+
builtinActionSlotsRegistry,
|
|
29
|
+
type BuiltinActionSlotsRegistry,
|
|
30
|
+
type BuiltinActionSlotsFern,
|
|
31
|
+
type InferBuiltinActionSlots,
|
|
32
|
+
} from './builtin-action-slots-registry';
|
|
33
|
+
|
|
34
|
+
/** Full **`process-element` CLI** JSON shape + materializer for FERN-keyed props/slots (workflow-sdk / codegen). */
|
|
35
|
+
export type {
|
|
36
|
+
ProcessElementPropCliWire,
|
|
37
|
+
ProcessElementActionCliWire,
|
|
38
|
+
ProcessElementSignalCliWire,
|
|
39
|
+
ProcessElementCliOutputWire,
|
|
40
|
+
} from './process-element-cli-output';
|
|
41
|
+
|
|
42
|
+
export type {
|
|
43
|
+
MaterializedSlotBranch,
|
|
44
|
+
MaterializedSlotLayout,
|
|
45
|
+
MaterializedSlotDefinition,
|
|
46
|
+
} from './materialize-slot-definition';
|
|
47
|
+
export { materializeSlotDefinition } from './materialize-slot-definition';
|
|
48
|
+
|
|
49
|
+
export type {
|
|
50
|
+
MaterializedPropAuthoring,
|
|
51
|
+
MaterializedActionAuthoringEntry,
|
|
52
|
+
MaterializedSignalAuthoringEntry,
|
|
53
|
+
MaterializedAuthoringCatalog,
|
|
54
|
+
} from './materialize-authoring-from-cli-output';
|
|
55
|
+
export {
|
|
56
|
+
buildProcessActionFern,
|
|
57
|
+
buildProcessSignalFern,
|
|
58
|
+
materializeAuthoringCatalogFromCliOutput,
|
|
59
|
+
} from './materialize-authoring-from-cli-output';
|
|
60
|
+
|
|
61
|
+
/** Locked authoring catalog + helpers for FERN / slot / prop inference (not raw CLI JSON). */
|
|
62
|
+
export {
|
|
63
|
+
ELEMENT_AUTHORING_CONTRACT_VERSION,
|
|
64
|
+
toAuthoringCatalogContract,
|
|
65
|
+
authoringCatalogContractFromCliOutput,
|
|
66
|
+
} from './authoring-contract';
|
|
67
|
+
export type {
|
|
68
|
+
AuthoringPropWireKind,
|
|
69
|
+
AuthoringPropContract,
|
|
70
|
+
SlotBranchAuthoringContract,
|
|
71
|
+
SlotsAuthoringContract,
|
|
72
|
+
ActionAuthoringContract,
|
|
73
|
+
SignalAuthoringContract,
|
|
74
|
+
ElementAuthoringCatalogContract,
|
|
75
|
+
ChildStepsPropertyForBranch,
|
|
76
|
+
ActionPropKeys,
|
|
77
|
+
ActionContractByFern,
|
|
78
|
+
FernAuthoringShardFileV1,
|
|
79
|
+
} from './authoring-contract';
|
|
47
80
|
|
|
48
81
|
// Base types for module definitions
|
|
49
82
|
export type ModuleDefinition = {
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
import { materializeSlotDefinition, type MaterializedSlotDefinition } from './materialize-slot-definition';
|
|
2
|
+
import type {
|
|
3
|
+
ProcessElementActionCliWire,
|
|
4
|
+
ProcessElementCliOutputWire,
|
|
5
|
+
ProcessElementPropCliWire,
|
|
6
|
+
ProcessElementSignalCliWire,
|
|
7
|
+
} from './process-element-cli-output';
|
|
8
|
+
|
|
9
|
+
export type MaterializedPropAuthoring = {
|
|
10
|
+
key: string;
|
|
11
|
+
label: string;
|
|
12
|
+
description: string;
|
|
13
|
+
/** String from loader **`type`** (e.g. **`string`**, **`object`**, or zodex-serialized object as JSON). */
|
|
14
|
+
wireType: string;
|
|
15
|
+
required: boolean;
|
|
16
|
+
hasJsonType: boolean;
|
|
17
|
+
isFunction: boolean;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export type MaterializedActionAuthoringEntry = {
|
|
21
|
+
kind: 'action';
|
|
22
|
+
fern: string;
|
|
23
|
+
/** Raw action key from the element (may include namespace prefix). */
|
|
24
|
+
elementKey: string;
|
|
25
|
+
name: string;
|
|
26
|
+
description?: string;
|
|
27
|
+
returns?: string;
|
|
28
|
+
props: MaterializedPropAuthoring[];
|
|
29
|
+
slots: MaterializedSlotDefinition | null;
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export type MaterializedSignalAuthoringEntry = {
|
|
33
|
+
kind: 'signal';
|
|
34
|
+
fern: string;
|
|
35
|
+
elementKey: string;
|
|
36
|
+
name: string;
|
|
37
|
+
description?: string;
|
|
38
|
+
returns?: string;
|
|
39
|
+
props: MaterializedPropAuthoring[];
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
export type MaterializedAuthoringCatalog = {
|
|
43
|
+
namespace: string;
|
|
44
|
+
actionsByFern: Record<string, MaterializedActionAuthoringEntry>;
|
|
45
|
+
signalsByFern: Record<string, MaterializedSignalAuthoringEntry>;
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
function stripNamespacePrefixFromActionKey(namespace: string, key: string): string {
|
|
49
|
+
const prefix = `${namespace}-`;
|
|
50
|
+
return key.startsWith(prefix) ? key.slice(prefix.length) : key;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Build registry FERN for an action (**`namespace::action:slug`**), matching common API normalization.
|
|
55
|
+
*/
|
|
56
|
+
export function buildProcessActionFern(namespace: string, actionKey: string): string {
|
|
57
|
+
const slug = stripNamespacePrefixFromActionKey(namespace, actionKey);
|
|
58
|
+
return `${namespace}::action:${slug}`;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/** Build registry FERN for a signal (**`namespace::signal:slug`**). */
|
|
62
|
+
export function buildProcessSignalFern(namespace: string, signalKey: string): string {
|
|
63
|
+
const slug = stripNamespacePrefixFromActionKey(namespace, signalKey);
|
|
64
|
+
return `${namespace}::signal:${slug}`;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
function wireTypeLabel(type: unknown): string {
|
|
68
|
+
if (type === undefined || type === null) {
|
|
69
|
+
return 'unknown';
|
|
70
|
+
}
|
|
71
|
+
if (typeof type === 'string') {
|
|
72
|
+
return type;
|
|
73
|
+
}
|
|
74
|
+
try {
|
|
75
|
+
return JSON.stringify(type);
|
|
76
|
+
} catch {
|
|
77
|
+
return 'unknown';
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
function materializeProp(p: ProcessElementPropCliWire): MaterializedPropAuthoring {
|
|
82
|
+
return {
|
|
83
|
+
key: p.key,
|
|
84
|
+
label: p.label,
|
|
85
|
+
description: typeof p.description === 'string' ? p.description : '',
|
|
86
|
+
wireType: wireTypeLabel(p.type),
|
|
87
|
+
required: p.required === true,
|
|
88
|
+
hasJsonType: p.jsonType !== undefined && p.jsonType !== null,
|
|
89
|
+
isFunction: p.isFunction === true,
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
function materializeAction(
|
|
94
|
+
namespace: string,
|
|
95
|
+
a: ProcessElementActionCliWire,
|
|
96
|
+
): MaterializedActionAuthoringEntry {
|
|
97
|
+
const fern = buildProcessActionFern(namespace, a.key);
|
|
98
|
+
return {
|
|
99
|
+
kind: 'action',
|
|
100
|
+
fern,
|
|
101
|
+
elementKey: a.key,
|
|
102
|
+
name: a.name,
|
|
103
|
+
description: typeof a.description === 'string' ? a.description : undefined,
|
|
104
|
+
returns: typeof a.returns === 'string' ? a.returns : undefined,
|
|
105
|
+
props: (Array.isArray(a.props) ? a.props : []).map(materializeProp),
|
|
106
|
+
slots: materializeSlotDefinition(a.slots),
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
function materializeSignal(
|
|
111
|
+
namespace: string,
|
|
112
|
+
s: ProcessElementSignalCliWire,
|
|
113
|
+
): MaterializedSignalAuthoringEntry {
|
|
114
|
+
const fern = buildProcessSignalFern(namespace, s.key);
|
|
115
|
+
return {
|
|
116
|
+
kind: 'signal',
|
|
117
|
+
fern,
|
|
118
|
+
elementKey: s.key,
|
|
119
|
+
name: s.name,
|
|
120
|
+
description: typeof s.description === 'string' ? s.description : undefined,
|
|
121
|
+
returns: typeof s.returns === 'string' ? s.returns : undefined,
|
|
122
|
+
props: (Array.isArray(s.props) ? s.props : []).map(materializeProp),
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* Turn the **entire compatibility CLI / `loadElementPointers` JSON** into FERN-keyed authoring material
|
|
128
|
+
* (props + slot paths + returns hints) for codegen or merging into **`@process.co/workflow-sdk`**.
|
|
129
|
+
*
|
|
130
|
+
* @param namespace — FERN namespace segment (e.g. **`process-internal`**). Defaults to **`info.name`** (element app slug).
|
|
131
|
+
*/
|
|
132
|
+
export function materializeAuthoringCatalogFromCliOutput(
|
|
133
|
+
info: ProcessElementCliOutputWire,
|
|
134
|
+
namespace?: string,
|
|
135
|
+
): MaterializedAuthoringCatalog {
|
|
136
|
+
const ns = namespace ?? info.name;
|
|
137
|
+
const actionsByFern: Record<string, MaterializedActionAuthoringEntry> = {};
|
|
138
|
+
const signalsByFern: Record<string, MaterializedSignalAuthoringEntry> = {};
|
|
139
|
+
|
|
140
|
+
for (const a of info.actions) {
|
|
141
|
+
if (a?.type !== 'action' || typeof a.key !== 'string') {
|
|
142
|
+
continue;
|
|
143
|
+
}
|
|
144
|
+
const entry = materializeAction(ns, a as ProcessElementActionCliWire);
|
|
145
|
+
actionsByFern[entry.fern] = entry;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
for (const s of info.signals) {
|
|
149
|
+
if (s?.type !== 'signal' || typeof s.key !== 'string') {
|
|
150
|
+
continue;
|
|
151
|
+
}
|
|
152
|
+
const entry = materializeSignal(ns, s as ProcessElementSignalCliWire);
|
|
153
|
+
signalsByFern[entry.fern] = entry;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
return { namespace: ns, actionsByFern, signalsByFern };
|
|
157
|
+
}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
ISlotDefinition,
|
|
3
|
+
ISlotInstanceDefinition,
|
|
4
|
+
ISlotStaticInstanceDefinition,
|
|
5
|
+
} from './slot-definition';
|
|
6
|
+
|
|
7
|
+
export type MaterializedSlotBranch = {
|
|
8
|
+
kind: 'static' | 'dynamic';
|
|
9
|
+
id?: string;
|
|
10
|
+
label?: string;
|
|
11
|
+
branchValue?: string;
|
|
12
|
+
path?: string;
|
|
13
|
+
idPath?: string;
|
|
14
|
+
labelPath?: string;
|
|
15
|
+
enabledPath?: string;
|
|
16
|
+
actionsPath?: string;
|
|
17
|
+
exportsPath?: string;
|
|
18
|
+
hideOnDisable?: boolean;
|
|
19
|
+
labelPlaceholderTemplate?: string;
|
|
20
|
+
labelPlaceholderValue?: string;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export type MaterializedSlotLayout = {
|
|
24
|
+
showBranchLabels?: boolean;
|
|
25
|
+
activeSlotId?: string;
|
|
26
|
+
activeSlotLabel?: string;
|
|
27
|
+
hideDisabled?: boolean;
|
|
28
|
+
hideDisabledPath?: string;
|
|
29
|
+
hideOnDisable?: boolean;
|
|
30
|
+
exportSchemaPath?: string;
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
export type MaterializedSlotDefinition = {
|
|
34
|
+
layout: MaterializedSlotLayout;
|
|
35
|
+
branches: MaterializedSlotBranch[];
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
function branchKind(row: ISlotInstanceDefinition | ISlotStaticInstanceDefinition): 'static' | 'dynamic' {
|
|
39
|
+
return 'type' in row && row.type === 'static' ? 'static' : 'dynamic';
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
function pickBranch(row: ISlotInstanceDefinition | ISlotStaticInstanceDefinition): MaterializedSlotBranch {
|
|
43
|
+
const b: MaterializedSlotBranch = { kind: branchKind(row) };
|
|
44
|
+
if (row.id !== undefined) b.id = row.id;
|
|
45
|
+
if (row.label !== undefined) b.label = row.label;
|
|
46
|
+
if (row.branchValue !== undefined) b.branchValue = row.branchValue;
|
|
47
|
+
if (row.path !== undefined) b.path = row.path;
|
|
48
|
+
if (row.idPath !== undefined) b.idPath = row.idPath;
|
|
49
|
+
if (row.labelPath !== undefined) b.labelPath = row.labelPath;
|
|
50
|
+
if (row.enabledPath !== undefined) b.enabledPath = row.enabledPath;
|
|
51
|
+
if (row.actionsPath !== undefined) b.actionsPath = row.actionsPath;
|
|
52
|
+
if (row.exportsPath !== undefined) b.exportsPath = row.exportsPath;
|
|
53
|
+
if (row.hideOnDisable !== undefined) b.hideOnDisable = row.hideOnDisable;
|
|
54
|
+
if (row.labelPlaceholderTemplate !== undefined) b.labelPlaceholderTemplate = row.labelPlaceholderTemplate;
|
|
55
|
+
if (row.labelPlaceholderValue !== undefined) b.labelPlaceholderValue = row.labelPlaceholderValue;
|
|
56
|
+
return b;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
function pickLayout(def: ISlotDefinition): MaterializedSlotLayout {
|
|
60
|
+
const layout: MaterializedSlotLayout = {};
|
|
61
|
+
if (def.showBranchLabels !== undefined) layout.showBranchLabels = def.showBranchLabels;
|
|
62
|
+
if (def.activeSlotId !== undefined) layout.activeSlotId = def.activeSlotId;
|
|
63
|
+
if (def.activeSlotLabel !== undefined) layout.activeSlotLabel = def.activeSlotLabel;
|
|
64
|
+
if (def.hideDisabled !== undefined) layout.hideDisabled = def.hideDisabled;
|
|
65
|
+
if (def.hideDisabledPath !== undefined) layout.hideDisabledPath = def.hideDisabledPath;
|
|
66
|
+
if (def.hideOnDisable !== undefined) layout.hideOnDisable = def.hideOnDisable;
|
|
67
|
+
if (def.exportSchemaPath !== undefined) layout.exportSchemaPath = def.exportSchemaPath;
|
|
68
|
+
return layout;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
function isEffectivelyEmpty(def: ISlotDefinition): boolean {
|
|
72
|
+
const rows = def.slots ?? [];
|
|
73
|
+
const layout = pickLayout(def);
|
|
74
|
+
return rows.length === 0 && Object.keys(layout).length === 0;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/** Normalize **`ISlotDefinition`** for codegen / workflow inference (JSON-serializable). */
|
|
78
|
+
export function materializeSlotDefinition(
|
|
79
|
+
def: ISlotDefinition | null | undefined,
|
|
80
|
+
): MaterializedSlotDefinition | null {
|
|
81
|
+
if (def == null || isEffectivelyEmpty(def)) {
|
|
82
|
+
return null;
|
|
83
|
+
}
|
|
84
|
+
return {
|
|
85
|
+
layout: pickLayout(def),
|
|
86
|
+
branches: (def.slots ?? []).map(pickBranch),
|
|
87
|
+
};
|
|
88
|
+
}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import type { ISlotDefinition } from './slot-definition';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* One flattened prop row from **`process-co` compatibility `loadElementPointers`** (`buildProp` output).
|
|
5
|
+
* Matches **`@process.co/elements`** `IProcessDefinitionUIPointers.props[]` plus loader fields.
|
|
6
|
+
*/
|
|
7
|
+
export type ProcessElementPropCliWire = {
|
|
8
|
+
key: string;
|
|
9
|
+
label: string;
|
|
10
|
+
description?: string;
|
|
11
|
+
type?: unknown;
|
|
12
|
+
jsonType?: unknown;
|
|
13
|
+
isFunction?: boolean;
|
|
14
|
+
required?: boolean;
|
|
15
|
+
default?: unknown;
|
|
16
|
+
ui?: string;
|
|
17
|
+
options?: unknown;
|
|
18
|
+
deps?: string[];
|
|
19
|
+
placeholder?: string;
|
|
20
|
+
[key: string]: unknown;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* One action row from **`loadElementPointers`** for a Process element (not Pipedream shape).
|
|
25
|
+
* This is what sits in **`IProcessDefinitionUIInfo.actions[]`** after the process loader runs.
|
|
26
|
+
*/
|
|
27
|
+
export type ProcessElementActionCliWire = {
|
|
28
|
+
type: 'action';
|
|
29
|
+
key: string;
|
|
30
|
+
name: string;
|
|
31
|
+
description?: string;
|
|
32
|
+
icon?: unknown;
|
|
33
|
+
ui?: string;
|
|
34
|
+
categoryKey?: string;
|
|
35
|
+
sampleEmit?: unknown;
|
|
36
|
+
returns?: string;
|
|
37
|
+
slots?: ISlotDefinition;
|
|
38
|
+
noAuth?: boolean;
|
|
39
|
+
hasNew?: boolean;
|
|
40
|
+
initValue?: unknown;
|
|
41
|
+
props?: ProcessElementPropCliWire[];
|
|
42
|
+
[key: string]: unknown;
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* One signal row from **`loadElementPointers`** for a Process element.
|
|
47
|
+
*/
|
|
48
|
+
export type ProcessElementSignalCliWire = {
|
|
49
|
+
type: 'signal';
|
|
50
|
+
key: string;
|
|
51
|
+
name: string;
|
|
52
|
+
description?: string;
|
|
53
|
+
ui?: string;
|
|
54
|
+
categoryKey?: string;
|
|
55
|
+
sampleEmit?: unknown;
|
|
56
|
+
returns?: string;
|
|
57
|
+
noAuth?: boolean;
|
|
58
|
+
hasNew?: boolean;
|
|
59
|
+
initValue?: unknown;
|
|
60
|
+
icon?: unknown;
|
|
61
|
+
hooks?: boolean;
|
|
62
|
+
dedupe?: unknown;
|
|
63
|
+
http?: unknown;
|
|
64
|
+
instant?: boolean;
|
|
65
|
+
props?: ProcessElementPropCliWire[];
|
|
66
|
+
[key: string]: unknown;
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Full object emitted by **`process-element`** (compatibility CLI): **`SuperJSON.stringify(loadElementPointers(...))`**.
|
|
71
|
+
* Structurally aligned with **`@process.co/elements` `IProcessDefinitionUIInfo`** plus process-loader fields on each row.
|
|
72
|
+
*/
|
|
73
|
+
export type ProcessElementCliOutputWire = {
|
|
74
|
+
elementType: 'process' | 'pipedream' | 'dofloV1' | 'n8n';
|
|
75
|
+
/** App / namespace slug (`element.app`); used as default FERN namespace when building keys. */
|
|
76
|
+
name: string;
|
|
77
|
+
description: {
|
|
78
|
+
short: string;
|
|
79
|
+
long: string;
|
|
80
|
+
MD: string;
|
|
81
|
+
};
|
|
82
|
+
actions: ProcessElementActionCliWire[];
|
|
83
|
+
signals: ProcessElementSignalCliWire[];
|
|
84
|
+
credentials: unknown[];
|
|
85
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export type ISlotInstanceDefinition = {
|
|
2
|
+
id?: string;
|
|
3
|
+
label?: string;
|
|
4
|
+
enabled?: boolean;
|
|
5
|
+
path?: string;
|
|
6
|
+
idPath?: string;
|
|
7
|
+
labelPath?: string;
|
|
8
|
+
enabledPath?: string;
|
|
9
|
+
labelPlaceholderTemplate?: string;
|
|
10
|
+
labelPlaceholderValue?: string;
|
|
11
|
+
branchValue?: string;
|
|
12
|
+
hideOnDisable?: boolean;
|
|
13
|
+
actionsPath?: string;
|
|
14
|
+
exportsPath?: string;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export type ISlotStaticInstanceDefinition = ISlotInstanceDefinition & {
|
|
18
|
+
type: 'static';
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export type ISlotDefinition = {
|
|
22
|
+
showBranchLabels?: boolean;
|
|
23
|
+
activeSlotId?: string;
|
|
24
|
+
activeSlotLabel?: string;
|
|
25
|
+
hideDisabled?: boolean;
|
|
26
|
+
/** Expression/template path for per-row hide-disabled (flow editor / container layout). */
|
|
27
|
+
hideDisabledPath?: string;
|
|
28
|
+
hideOnDisable?: boolean;
|
|
29
|
+
exportSchemaPath?: string;
|
|
30
|
+
slots?: (ISlotInstanceDefinition | ISlotStaticInstanceDefinition)[];
|
|
31
|
+
};
|