@xentom/integration-framework 0.0.12 → 0.0.16

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.
@@ -1,6 +1,6 @@
1
1
  import { type StandardSchemaV1 } from '@standard-schema/spec';
2
- import { type AuthType } from '.';
3
2
  import { type TextControl } from '../controls';
3
+ import { type AuthType } from '.';
4
4
  export interface BasicAuth {
5
5
  type: AuthType.Basic;
6
6
  username?: {
@@ -1,5 +1,5 @@
1
- import { type AuthType } from '.';
2
1
  import { type IntegrationOptions } from '../integration';
2
+ import { type AuthType } from '.';
3
3
  export declare enum OAuth2GrantType {
4
4
  AuthorizationCode = "authorization_code",
5
5
  ClientCredentials = "client_credentials"
@@ -1,6 +1,6 @@
1
1
  import { type StandardSchemaV1 } from '@standard-schema/spec';
2
- import { type AuthType } from '.';
3
2
  import { type TextControl } from '../controls';
3
+ import { type AuthType } from '.';
4
4
  export interface TokenAuth {
5
5
  type: AuthType.Token;
6
6
  /**
@@ -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> {
@@ -33,29 +33,33 @@ export interface SelectControlOptionsCallbackOptions extends IntegrationOptions<
33
33
  inputs: Record<string, unknown>;
34
34
  outputs: Record<string, unknown>;
35
35
  };
36
- pagination: {
37
- /**
38
- * The limit of options to return.
39
- */
40
- limit: number;
41
- /**
42
- * The cursor to use to get the next page of options.
43
- */
44
- after?: string | number;
45
- /**
46
- * The cursor to use to get the previous page of options.
47
- */
48
- before?: string | number;
49
- /**
50
- * The page number to use to get the next page of options.
51
- */
52
- page: number;
53
- };
36
+ /**
37
+ * The pagination options for the options callback.
38
+ */
39
+ pagination: SelectControlOptionsPagination;
54
40
  /**
55
41
  * The search query used to filter the options.
56
42
  */
57
43
  search?: string;
58
44
  }
45
+ export interface SelectControlOptionsPagination {
46
+ /**
47
+ * The limit of options to return.
48
+ */
49
+ limit: number;
50
+ /**
51
+ * The cursor to use to get the next page of options.
52
+ */
53
+ after?: string | number;
54
+ /**
55
+ * The cursor to use to get the previous page of options.
56
+ */
57
+ before?: string | number;
58
+ /**
59
+ * The page number to use to get the next page of options.
60
+ */
61
+ page: number;
62
+ }
59
63
  export interface SelectControlOptionsWithMetadata<S = never> {
60
64
  items: SelectControlOption<S>[];
61
65
  hasMore?: boolean;
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';
@@ -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>;
@@ -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>;
@@ -135,7 +135,22 @@ export interface TriggerSubscribeOptions<I extends TriggerNodeInputs, O extends
135
135
  *
136
136
  * @remarks `NodeNextCallback`
137
137
  */
138
- next: NodeNextCallback<O, [ctx?: TriggerRunContext]>;
138
+ next: NodeNextCallback<O, [options?: TriggerNextOptions]>;
139
+ }
140
+ export interface TriggerNextOptions {
141
+ /**
142
+ * Optional context object to pass custom data to integration nodes.
143
+ * This data will be available throughout the trigger execution and can be
144
+ * accessed by any integration node in the workflow.
145
+ */
146
+ ctx?: TriggerRunContext;
147
+ /**
148
+ * Optional identifier to prevent duplicate executions of the same trigger.
149
+ * If a trigger with the same deduplicationId is already queued or recently
150
+ * executed, this run will be skipped. Useful for ensuring idempotency when
151
+ * the same event may be received multiple times.
152
+ */
153
+ deduplicationId?: string;
139
154
  }
140
155
  export type TriggerRunContext = Record<string, any>;
141
156
  export type TriggerNodeBuilder = <I extends TriggerNodeInputs, O extends TriggerNodeOutputs>(definition: Omit<TriggerNode<I, O>, 'type'>) => TriggerNode<I, O>;
@@ -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> = {
@@ -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
- /* eslint-disable @typescript-eslint/no-unsafe-function-type */
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
@@ -1,3 +1,4 @@
1
+ /** biome-ignore-all lint/suspicious/noConfusingVoidType: This is a valid use case for void return type */
1
2
  export interface Webhook {
2
3
  /**
3
4
  * The external URL that an external service can call to trigger the webhook handler.
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.12",
4
+ "version": "0.0.16",
5
5
  "license": "MIT",
6
6
  "homepage": "https://xentom.com",
7
7
  "author": {
@@ -32,10 +32,11 @@
32
32
  "main": "./dist/index.js",
33
33
  "types": "./dist/index.d.ts",
34
34
  "scripts": {
35
- "lint": "eslint",
36
- "format": "prettier --check . --ignore-path ../../.gitignore",
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
+ "prepare": "bun run build",
39
40
  "build": "tsc"
40
41
  },
41
42
  "sideEffects": false,
@@ -53,14 +54,11 @@
53
54
  "#src/*": "./src/*.ts"
54
55
  },
55
56
  "dependencies": {
56
- "@standard-schema/spec": "^1.0.0"
57
+ "@standard-schema/spec": "^1.1.0"
57
58
  },
58
59
  "devDependencies": {
59
- "@types/bun": "^1.3.1",
60
60
  "@xentom/style-guide": "^0.0.0",
61
- "eslint": "^9.39.1",
62
- "prettier": "^3.6.2",
61
+ "bun-types": "^1.3.6",
63
62
  "typescript": "^5.9.3"
64
- },
65
- "prettier": "@xentom/style-guide/prettier"
63
+ }
66
64
  }