@xentom/integration-framework 0.0.16 → 0.0.18
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/nodes/trigger.d.ts +36 -5
- package/package.json +2 -2
package/dist/nodes/trigger.d.ts
CHANGED
|
@@ -112,6 +112,23 @@ export interface TriggerSubscribeOptions<I extends TriggerNodeInputs, O extends
|
|
|
112
112
|
* persist across restarts and be accessible from any instance.
|
|
113
113
|
*/
|
|
114
114
|
kv: KeyValueStore;
|
|
115
|
+
/**
|
|
116
|
+
* Workflow-related utilities and metadata.
|
|
117
|
+
*
|
|
118
|
+
* Provides access to workflow lifecycle information and hooks
|
|
119
|
+
* that allow the integration to react to workflow behavior.
|
|
120
|
+
*/
|
|
121
|
+
workflow: {
|
|
122
|
+
/**
|
|
123
|
+
* Subscribe to workflow lifecycle events (e.g. start).
|
|
124
|
+
*
|
|
125
|
+
* Use this to run initialization logic when a workflow starts
|
|
126
|
+
* or respond to other lifecycle state changes.
|
|
127
|
+
*
|
|
128
|
+
* Returns an unsubscribe function that removes the listener.
|
|
129
|
+
*/
|
|
130
|
+
on<T extends keyof WorkflowEventMap>(type: T, callback: (...args: WorkflowEventMap[T]) => void): () => void;
|
|
131
|
+
};
|
|
115
132
|
/**
|
|
116
133
|
* Function used to programmatically run an output pin of the trigger.
|
|
117
134
|
* Calling this starts a workflow run with optional execution context and output values.
|
|
@@ -137,6 +154,9 @@ export interface TriggerSubscribeOptions<I extends TriggerNodeInputs, O extends
|
|
|
137
154
|
*/
|
|
138
155
|
next: NodeNextCallback<O, [options?: TriggerNextOptions]>;
|
|
139
156
|
}
|
|
157
|
+
export type WorkflowEventMap = {
|
|
158
|
+
start: [];
|
|
159
|
+
};
|
|
140
160
|
export interface TriggerNextOptions {
|
|
141
161
|
/**
|
|
142
162
|
* Optional context object to pass custom data to integration nodes.
|
|
@@ -145,12 +165,23 @@ export interface TriggerNextOptions {
|
|
|
145
165
|
*/
|
|
146
166
|
ctx?: TriggerRunContext;
|
|
147
167
|
/**
|
|
148
|
-
* Optional
|
|
149
|
-
*
|
|
150
|
-
*
|
|
151
|
-
* the same event may be received multiple times.
|
|
168
|
+
* Optional configuration for deduplicating trigger executions.
|
|
169
|
+
* Helps prevent the same trigger from running multiple times when
|
|
170
|
+
* identical events are received.
|
|
152
171
|
*/
|
|
153
|
-
|
|
172
|
+
deduplication?: {
|
|
173
|
+
/**
|
|
174
|
+
* Unique identifier used to detect duplicate executions.
|
|
175
|
+
* If a trigger with the same ID is already queued or was recently
|
|
176
|
+
* executed, this run will be skipped.
|
|
177
|
+
*/
|
|
178
|
+
id: string;
|
|
179
|
+
/**
|
|
180
|
+
* Optional time-to-live (in seconds) for the deduplication record.
|
|
181
|
+
* After this period expires, a trigger with the same ID may run again.
|
|
182
|
+
*/
|
|
183
|
+
ttl?: number;
|
|
184
|
+
};
|
|
154
185
|
}
|
|
155
186
|
export type TriggerRunContext = Record<string, any>;
|
|
156
187
|
export type TriggerNodeBuilder = <I extends TriggerNodeInputs, O extends TriggerNodeOutputs>(definition: Omit<TriggerNode<I, O>, 'type'>) => TriggerNode<I, O>;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xentom/integration-framework",
|
|
3
3
|
"description": "A type-safe, declarative framework for building composable workflow integrations using nodes, pins, and rich controls.",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.18",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://xentom.com",
|
|
7
7
|
"author": {
|
|
@@ -61,4 +61,4 @@
|
|
|
61
61
|
"bun-types": "^1.3.6",
|
|
62
62
|
"typescript": "^5.9.3"
|
|
63
63
|
}
|
|
64
|
-
}
|
|
64
|
+
}
|