@process.co/element-types 0.0.8 → 0.0.10
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-types.d.ts +109 -0
- package/dist/authoring-contract-types.d.ts.map +1 -0
- package/dist/authoring-contract-types.js +13 -0
- 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 +9 -28
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +10 -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/platform-loader-type.d.ts +11 -0
- package/dist/platform-loader-type.d.ts.map +1 -0
- package/dist/platform-loader-type.js +18 -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-types.ts +132 -0
- package/src/authoring-contract.ts +243 -0
- package/src/builtin-action-slots-registry.ts +36 -0
- package/src/index.ts +44 -29
- package/src/materialize-authoring-from-cli-output.ts +157 -0
- package/src/materialize-slot-definition.ts +88 -0
- package/src/platform-loader-type.ts +14 -0
- package/src/process-element-cli-output.ts +85 -0
- package/src/slot-definition.ts +31 -0
|
@@ -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
|
+
};
|