@xentom/integration-framework 0.0.13 → 0.0.17
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/auth/basic.d.ts +1 -1
- package/dist/auth/oauth2.d.ts +1 -1
- package/dist/auth/token.d.ts +1 -1
- package/dist/controls/select.d.ts +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/nodes/callable.d.ts +1 -1
- package/dist/nodes/pure.d.ts +1 -1
- package/dist/nodes/trigger.d.ts +36 -1
- package/dist/nodes/utils.d.ts +1 -1
- package/dist/pins/data.d.ts +1 -1
- package/dist/utils.d.ts +1 -0
- package/dist/utils.js +1 -1
- package/dist/webhook.d.ts +1 -0
- package/dist/webhook.js +1 -0
- package/package.json +9 -12
package/dist/auth/basic.d.ts
CHANGED
package/dist/auth/oauth2.d.ts
CHANGED
package/dist/auth/token.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { type ControlType } from '.';
|
|
2
1
|
import { type Auth } from '../auth';
|
|
3
2
|
import { type IntegrationOptions } from '../integration';
|
|
3
|
+
import { type ControlType } from '.';
|
|
4
4
|
import { type BaseControl } from './base';
|
|
5
5
|
type ArrayElementType<T> = T extends readonly (infer U)[] ? U : T;
|
|
6
6
|
export interface SelectControl<S = never, Multiple extends boolean = boolean> extends BaseControl<S> {
|
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
export * from './auth';
|
|
2
2
|
export * from './controls';
|
|
3
|
-
export * from './nodes';
|
|
4
|
-
export * from './pins';
|
|
5
3
|
export * from './env';
|
|
6
4
|
export * from './generic';
|
|
7
5
|
export * from './integration';
|
|
8
6
|
export * from './kv';
|
|
7
|
+
export * from './nodes';
|
|
8
|
+
export * from './pins';
|
|
9
9
|
export * from './utils';
|
|
10
10
|
export * from './webhook';
|
package/dist/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
export * from './auth';
|
|
2
2
|
export * from './controls';
|
|
3
|
-
export * from './nodes';
|
|
4
|
-
export * from './pins';
|
|
5
3
|
export * from './env';
|
|
6
4
|
export * from './generic';
|
|
7
5
|
export * from './integration';
|
|
8
6
|
export * from './kv';
|
|
7
|
+
export * from './nodes';
|
|
8
|
+
export * from './pins';
|
|
9
9
|
export * from './utils';
|
|
10
10
|
export * from './webhook';
|
package/dist/nodes/callable.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { type NodeType } from '.';
|
|
2
1
|
import { type IntegrationState } from '../integration';
|
|
3
2
|
import { type KeyValueStore } from '../kv';
|
|
4
3
|
import { type DataPin, type ExecPin, type ExtractPinsOfType, type InferPinRecordInput, type InferPinRecordOutput, type PinRecord, type PinRecordHasPinType } from '../pins';
|
|
5
4
|
import { type HasRequiredKeys } from '../utils';
|
|
6
5
|
import { type Webhook } from '../webhook';
|
|
6
|
+
import { type NodeType } from '.';
|
|
7
7
|
import { type BaseNode } from './base';
|
|
8
8
|
import { type TriggerRunContext } from './trigger';
|
|
9
9
|
export type CallableNodeInputs = PinRecord<DataPin>;
|
package/dist/nodes/pure.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { type NodeType } from '.';
|
|
2
1
|
import { type IntegrationState } from '../integration';
|
|
3
2
|
import { type KeyValueStore } from '../kv';
|
|
4
3
|
import { type DataPin, type InferPinRecordInput, type InferPinRecordOutput, type PinRecord } from '../pins';
|
|
5
4
|
import { type Webhook } from '../webhook';
|
|
5
|
+
import { type NodeType } from '.';
|
|
6
6
|
import { type BaseNode } from './base';
|
|
7
7
|
import { type TriggerRunContext } from './trigger';
|
|
8
8
|
export type PureNodeInputs = PinRecord<DataPin>;
|
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.
|
|
@@ -135,7 +152,25 @@ export interface TriggerSubscribeOptions<I extends TriggerNodeInputs, O extends
|
|
|
135
152
|
*
|
|
136
153
|
* @remarks `NodeNextCallback`
|
|
137
154
|
*/
|
|
138
|
-
next: NodeNextCallback<O, [
|
|
155
|
+
next: NodeNextCallback<O, [options?: TriggerNextOptions]>;
|
|
156
|
+
}
|
|
157
|
+
export type WorkflowEventMap = {
|
|
158
|
+
start: [];
|
|
159
|
+
};
|
|
160
|
+
export interface TriggerNextOptions {
|
|
161
|
+
/**
|
|
162
|
+
* Optional context object to pass custom data to integration nodes.
|
|
163
|
+
* This data will be available throughout the trigger execution and can be
|
|
164
|
+
* accessed by any integration node in the workflow.
|
|
165
|
+
*/
|
|
166
|
+
ctx?: TriggerRunContext;
|
|
167
|
+
/**
|
|
168
|
+
* Optional identifier to prevent duplicate executions of the same trigger.
|
|
169
|
+
* If a trigger with the same deduplicationId is already queued or recently
|
|
170
|
+
* executed, this run will be skipped. Useful for ensuring idempotency when
|
|
171
|
+
* the same event may be received multiple times.
|
|
172
|
+
*/
|
|
173
|
+
deduplicationId?: string;
|
|
139
174
|
}
|
|
140
175
|
export type TriggerRunContext = Record<string, any>;
|
|
141
176
|
export type TriggerNodeBuilder = <I extends TriggerNodeInputs, O extends TriggerNodeOutputs>(definition: Omit<TriggerNode<I, O>, 'type'>) => TriggerNode<I, O>;
|
package/dist/nodes/utils.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type Node, type NodeRecord } from '.';
|
|
2
1
|
import { type InferPinRecordInput, type InferPinRecordOutput, type PinRecord } from '../pins';
|
|
2
|
+
import { type Node, type NodeRecord } from '.';
|
|
3
3
|
export declare const DefaultExecPinName = "__exec";
|
|
4
4
|
export declare const DefaultErrorPinName = "__error";
|
|
5
5
|
export type InferNodeRecordOutput<R extends NodeRecord> = {
|
package/dist/pins/data.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { type StandardSchemaV1 } from '@standard-schema/spec';
|
|
2
|
-
import { type PinType } from '.';
|
|
3
2
|
import { type Auth } from '../auth';
|
|
4
3
|
import { type Control } from '../controls';
|
|
5
4
|
import { type IntegrationOptions } from '../integration';
|
|
6
5
|
import { type ConditionalOptional } from '../utils';
|
|
6
|
+
import { type PinType } from '.';
|
|
7
7
|
import { type BasePin } from './base';
|
|
8
8
|
export interface DataPin<Input = any, Output = Input, Optional extends boolean = boolean, MultiSelect extends boolean = boolean> extends BasePin {
|
|
9
9
|
/**
|
package/dist/utils.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/** biome-ignore-all lint/complexity/noBannedTypes: `Function` here is intentional for broad type acceptance in this API layer. */
|
|
1
2
|
import { type StandardSchemaV1 } from '@standard-schema/spec';
|
|
2
3
|
export type HasRequiredKeys<T> = keyof T extends never ? false : {
|
|
3
4
|
[K in keyof T]-?: undefined extends T[K] ? false : true;
|
package/dist/utils.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
/** biome-ignore-all lint/complexity/noBannedTypes: `Function` here is intentional for broad type acceptance in this API layer. */
|
package/dist/webhook.d.ts
CHANGED
package/dist/webhook.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/** biome-ignore-all lint/suspicious/noConfusingVoidType: This is a valid use case for void return type */
|
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.17",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://xentom.com",
|
|
7
7
|
"author": {
|
|
@@ -32,12 +32,12 @@
|
|
|
32
32
|
"main": "./dist/index.js",
|
|
33
33
|
"types": "./dist/index.d.ts",
|
|
34
34
|
"scripts": {
|
|
35
|
-
"lint": "
|
|
36
|
-
"format": "
|
|
35
|
+
"lint": "biome lint",
|
|
36
|
+
"format": "biome format",
|
|
37
37
|
"typecheck": "tsc --noEmit",
|
|
38
38
|
"clean": "git clean -xdf .cache .turbo node_modules dist",
|
|
39
|
-
"
|
|
40
|
-
"
|
|
39
|
+
"prepare": "bun run build",
|
|
40
|
+
"build": "tsc"
|
|
41
41
|
},
|
|
42
42
|
"sideEffects": false,
|
|
43
43
|
"files": [
|
|
@@ -54,14 +54,11 @@
|
|
|
54
54
|
"#src/*": "./src/*.ts"
|
|
55
55
|
},
|
|
56
56
|
"dependencies": {
|
|
57
|
-
"@standard-schema/spec": "^1.
|
|
57
|
+
"@standard-schema/spec": "^1.1.0"
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
60
|
-
"@types/bun": "^1.3.1",
|
|
61
60
|
"@xentom/style-guide": "^0.0.0",
|
|
62
|
-
"
|
|
63
|
-
"prettier": "^3.6.2",
|
|
61
|
+
"bun-types": "^1.3.6",
|
|
64
62
|
"typescript": "^5.9.3"
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
}
|
|
63
|
+
}
|
|
64
|
+
}
|