@project-ajax/sdk 0.0.68 → 0.0.70
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/capabilities/automation.d.ts +8 -28
- package/dist/capabilities/automation.d.ts.map +1 -1
- package/dist/capabilities/automation.js +3 -2
- package/dist/capabilities/oauth.d.ts +6 -31
- package/dist/capabilities/oauth.d.ts.map +1 -1
- package/dist/capabilities/oauth.js +4 -2
- package/dist/capabilities/sync.d.ts +71 -30
- package/dist/capabilities/sync.d.ts.map +1 -1
- package/dist/capabilities/sync.js +6 -5
- package/dist/capabilities/tool.d.ts +5 -25
- package/dist/capabilities/tool.d.ts.map +1 -1
- package/dist/capabilities/tool.js +3 -2
- package/dist/index.d.ts +5 -7
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -9
- package/dist/types.d.ts +6 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/worker.d.ts +175 -0
- package/dist/worker.d.ts.map +1 -0
- package/dist/worker.js +218 -0
- package/package.json +1 -5
- package/src/capabilities/automation.test.ts +17 -23
- package/src/capabilities/automation.ts +14 -30
- package/src/capabilities/oauth.test.ts +16 -15
- package/src/capabilities/oauth.ts +7 -31
- package/src/capabilities/sync.ts +81 -31
- package/src/capabilities/tool.test.ts +105 -89
- package/src/capabilities/tool.ts +12 -31
- package/src/index.ts +9 -5
- package/src/types.ts +11 -0
- package/src/worker.ts +278 -0
|
@@ -66,37 +66,17 @@ export interface AutomationHandlerResult {
|
|
|
66
66
|
title: string;
|
|
67
67
|
description: string;
|
|
68
68
|
}
|
|
69
|
+
export type AutomationCapability = ReturnType<typeof createAutomationCapability>;
|
|
69
70
|
/**
|
|
70
|
-
* Creates
|
|
71
|
-
* from database automations in Notion.
|
|
71
|
+
* Creates an automation capability from configuration.
|
|
72
72
|
*
|
|
73
|
-
*
|
|
74
|
-
*
|
|
75
|
-
*
|
|
76
|
-
* automation({
|
|
77
|
-
* title: "Send Welcome Email",
|
|
78
|
-
* description: "Sends a welcome email when a new user is added",
|
|
79
|
-
* execute: async (context) => {
|
|
80
|
-
* const { pageId, pageData } = context;
|
|
81
|
-
*
|
|
82
|
-
* // Access page properties from the Public API format
|
|
83
|
-
* if (pageData) {
|
|
84
|
-
* const name = pageData.properties.Name; // Access any property
|
|
85
|
-
* const status = pageData.properties.Status;
|
|
86
|
-
* console.log(`Processing: ${name}`);
|
|
87
|
-
* }
|
|
88
|
-
*
|
|
89
|
-
* // Your automation logic here
|
|
90
|
-
* await sendEmail(pageId);
|
|
91
|
-
* },
|
|
92
|
-
* })
|
|
93
|
-
* ```
|
|
94
|
-
*
|
|
95
|
-
* @param config - The configuration for the automation.
|
|
96
|
-
* @returns A capability definition for the automation.
|
|
73
|
+
* @param key - The unique name for this capability.
|
|
74
|
+
* @param config - The automation configuration.
|
|
75
|
+
* @returns The capability object.
|
|
97
76
|
*/
|
|
98
|
-
export declare function
|
|
99
|
-
_tag:
|
|
77
|
+
export declare function createAutomationCapability(key: string, config: AutomationConfiguration): {
|
|
78
|
+
_tag: "automation";
|
|
79
|
+
key: string;
|
|
100
80
|
config: {
|
|
101
81
|
title: string;
|
|
102
82
|
description: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"automation.d.ts","sourceRoot":"","sources":["../../src/capabilities/automation.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,WAAW,iBAAiB;IACjC;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,QAAQ,CAAC,EAAE,kBAAkB,CAAC;CAC9B;AAED;;;;;GAKG;AACH,MAAM,WAAW,kBAAkB;IAClC,MAAM,EAAE,MAAM,CAAC;IACf,EAAE,EAAE,MAAM,CAAC;IACX,YAAY,EAAE,MAAM,CAAC;IACrB,gBAAgB,EAAE,MAAM,CAAC;IACzB,UAAU,EAAE;QAAE,EAAE,EAAE,MAAM,CAAA;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AC;IAC/B,KAAK,EAAE,OAAO,CAAC;IACf,IAAI,EAAE,OAAO,CAAC;IACd,MAAM,EAAE,OAAO,CAAC;IAChB,QAAQ,EAAE,OAAO,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACpC,GAAG,EAAE,MAAM,CAAC;IACZ,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3B;AAED;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACvC;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;;;OAIG;IACH,OAAO,EAAE,CAAC,OAAO,EAAE,iBAAiB,KAAK,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;CAC9D;AAED;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACvC,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,MAAM,oBAAoB,GAAG,UAAU,CAC5C,OAAO,0BAA0B,CACjC,CAAC;AAEF;;;;;;GAMG;AACH,wBAAgB,0BAA0B,CACzC,GAAG,EAAE,MAAM,EACX,MAAM,EAAE,uBAAuB;;;;;;;qBASP,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC;EAezD"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { ExecutionError } from "../error.js";
|
|
2
|
-
function
|
|
2
|
+
function createAutomationCapability(key, config) {
|
|
3
3
|
return {
|
|
4
4
|
_tag: "automation",
|
|
5
|
+
key,
|
|
5
6
|
config: {
|
|
6
7
|
title: config.title,
|
|
7
8
|
description: config.description
|
|
@@ -27,5 +28,5 @@ function automation(config) {
|
|
|
27
28
|
};
|
|
28
29
|
}
|
|
29
30
|
export {
|
|
30
|
-
|
|
31
|
+
createAutomationCapability
|
|
31
32
|
};
|
|
@@ -73,42 +73,16 @@ export interface UserManagedOAuthConfiguration {
|
|
|
73
73
|
* Union type representing either Notion-managed or user-managed OAuth configuration.
|
|
74
74
|
*/
|
|
75
75
|
export type OAuthConfiguration = NotionManagedOAuthConfiguration | UserManagedOAuthConfiguration;
|
|
76
|
+
export type OAuthCapability = ReturnType<typeof createOAuthCapability>;
|
|
76
77
|
/**
|
|
77
78
|
* Creates an OAuth provider configuration for authenticating with third-party services.
|
|
78
79
|
*
|
|
79
|
-
* There are two ways to configure OAuth:
|
|
80
|
-
*
|
|
81
|
-
* 1. Notion-managed providers:
|
|
82
|
-
* ```ts
|
|
83
|
-
* oauth({
|
|
84
|
-
* type: "notion_managed",
|
|
85
|
-
* name: "my-google-auth",
|
|
86
|
-
* provider: "google"
|
|
87
|
-
* })
|
|
88
|
-
* ```
|
|
89
|
-
*
|
|
90
|
-
* 2. User-managed OAuth configuration:
|
|
91
|
-
* ```ts
|
|
92
|
-
* oauth({
|
|
93
|
-
* type: "user_managed",
|
|
94
|
-
* name: "my-custom-oauth",
|
|
95
|
-
* authorizationEndpoint: "https://provider.com/oauth/authorize",
|
|
96
|
-
* tokenEndpoint: "https://provider.com/oauth/token",
|
|
97
|
-
* scope: "read write",
|
|
98
|
-
* clientId: process.env.CLIENT_ID,
|
|
99
|
-
* clientSecret: process.env.CLIENT_SECRET,
|
|
100
|
-
* authorizationParams: {
|
|
101
|
-
* access_type: "offline",
|
|
102
|
-
* prompt: "consent"
|
|
103
|
-
* }
|
|
104
|
-
* })
|
|
105
|
-
* ```
|
|
106
|
-
*
|
|
107
80
|
* @param config - The OAuth configuration (Notion-managed or user-managed).
|
|
108
81
|
* @returns An OAuth provider definition.
|
|
109
82
|
*/
|
|
110
|
-
export declare function
|
|
111
|
-
_tag:
|
|
83
|
+
export declare function createOAuthCapability(key: string, config: OAuthConfiguration): {
|
|
84
|
+
_tag: "oauth";
|
|
85
|
+
key: string;
|
|
112
86
|
envKey: string;
|
|
113
87
|
accessToken(): Promise<string>;
|
|
114
88
|
config: {
|
|
@@ -125,7 +99,8 @@ export declare function oauth(config: OAuthConfiguration): {
|
|
|
125
99
|
callbackUrl?: never;
|
|
126
100
|
};
|
|
127
101
|
} | {
|
|
128
|
-
_tag:
|
|
102
|
+
_tag: "oauth";
|
|
103
|
+
key: string;
|
|
129
104
|
envKey: string;
|
|
130
105
|
accessToken(): Promise<string>;
|
|
131
106
|
config: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"oauth.d.ts","sourceRoot":"","sources":["../../src/capabilities/oauth.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,WAAW,+BAA+B;IAC/C;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;;OAGG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;;;;OAKG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED;;;;;GAKG;AACH,MAAM,WAAW,6BAA6B;IAC7C;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,qBAAqB,EAAE,MAAM,CAAC;IAE9B;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAE7C;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;;;;OAKG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAC3B,+BAA+B,GAC/B,6BAA6B,CAAC;AAEjC
|
|
1
|
+
{"version":3,"file":"oauth.d.ts","sourceRoot":"","sources":["../../src/capabilities/oauth.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,WAAW,+BAA+B;IAC/C;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;;OAGG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;;;;OAKG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED;;;;;GAKG;AACH,MAAM,WAAW,6BAA6B;IAC7C;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,qBAAqB,EAAE,MAAM,CAAC;IAE9B;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAE7C;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;;;;OAKG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAC3B,+BAA+B,GAC/B,6BAA6B,CAAC;AAEjC,MAAM,MAAM,eAAe,GAAG,UAAU,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAEvE;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,kBAAkB;;;;mBAQrD,OAAO,CAAC,MAAM,CAAC;;;;;;;;;;;;;;;;;;mBAgBhB,OAAO,CAAC,MAAM,CAAC;;;;;;;;;;;;;;EAgBrC"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
function
|
|
1
|
+
function createOAuthCapability(key, config) {
|
|
2
2
|
const envKey = oauthNameToEnvKey(config.name);
|
|
3
3
|
if ("provider" in config) {
|
|
4
4
|
return {
|
|
5
5
|
_tag: "oauth",
|
|
6
|
+
key,
|
|
6
7
|
envKey,
|
|
7
8
|
async accessToken() {
|
|
8
9
|
return readRequiredEnvVar(envKey, { name: config.name });
|
|
@@ -17,6 +18,7 @@ function oauth(config) {
|
|
|
17
18
|
}
|
|
18
19
|
return {
|
|
19
20
|
_tag: "oauth",
|
|
21
|
+
key,
|
|
20
22
|
envKey,
|
|
21
23
|
async accessToken() {
|
|
22
24
|
return readRequiredEnvVar(envKey, { name: config.name });
|
|
@@ -49,5 +51,5 @@ function readRequiredEnvVar(key, context) {
|
|
|
49
51
|
);
|
|
50
52
|
}
|
|
51
53
|
export {
|
|
52
|
-
|
|
54
|
+
createOAuthCapability
|
|
53
55
|
};
|
|
@@ -9,41 +9,79 @@ type PropertyValueType<T extends PropertyConfiguration> = T extends {
|
|
|
9
9
|
type: "place";
|
|
10
10
|
} ? PlaceValue : TextValue;
|
|
11
11
|
/**
|
|
12
|
-
*
|
|
12
|
+
* Sync mode determines how the sync handles data lifecycle.
|
|
13
13
|
*/
|
|
14
|
-
export type
|
|
14
|
+
export type SyncMode = "replace" | "incremental";
|
|
15
|
+
/**
|
|
16
|
+
* A change representing a record to be created or updated.
|
|
17
|
+
*/
|
|
18
|
+
export type SyncChangeUpsert<PK extends string, S extends PropertySchema<PK>> = {
|
|
19
|
+
/**
|
|
20
|
+
* The type of change. Use `"upsert"` to create or update a record.
|
|
21
|
+
*/
|
|
22
|
+
type: "upsert";
|
|
23
|
+
/**
|
|
24
|
+
* A unique identifier for this record, used to match against existing pages.
|
|
25
|
+
* This value will be stored in the property specified by `primaryKeyProperty`.
|
|
26
|
+
*/
|
|
15
27
|
key: string;
|
|
28
|
+
/**
|
|
29
|
+
* The property values for this record.
|
|
30
|
+
* Keys must match the property names defined in the schema.
|
|
31
|
+
* Use the Builder helpers (e.g., `Builder.title()`, `Builder.richText()`) to create values.
|
|
32
|
+
*/
|
|
16
33
|
properties: {
|
|
17
34
|
[Property in keyof S]: PropertyValueType<S[Property]>;
|
|
18
35
|
};
|
|
19
36
|
/**
|
|
20
37
|
* Optional icon to use as the icon for this row's page.
|
|
21
|
-
* Use the `
|
|
38
|
+
* Use the `Builder.emojiIcon()`, `Builder.notionIcon()`, or `Builder.imageIcon()` helpers.
|
|
22
39
|
*/
|
|
23
40
|
icon?: Icon;
|
|
24
41
|
/**
|
|
25
|
-
* Optional markdown content to add to the page.
|
|
26
|
-
* This will be converted to blocks and added as page content.
|
|
42
|
+
* Optional markdown content to add to the page body.
|
|
43
|
+
* This will be converted to Notion blocks and added as page content.
|
|
27
44
|
*/
|
|
28
45
|
pageContentMarkdown?: string;
|
|
29
46
|
};
|
|
47
|
+
/**
|
|
48
|
+
* A change representing a record to be deleted.
|
|
49
|
+
* Only applicable when using `mode: "incremental"`.
|
|
50
|
+
*/
|
|
51
|
+
export type SyncChangeDelete = {
|
|
52
|
+
/**
|
|
53
|
+
* The type of change. Use `"delete"` to remove a record.
|
|
54
|
+
*/
|
|
55
|
+
type: "delete";
|
|
56
|
+
/**
|
|
57
|
+
* The unique identifier of the record to delete.
|
|
58
|
+
* Must match the `key` of a previously upserted record.
|
|
59
|
+
*/
|
|
60
|
+
key: string;
|
|
61
|
+
};
|
|
62
|
+
/**
|
|
63
|
+
* A change to be applied to the synced database.
|
|
64
|
+
* Can be either an upsert (create/update) or a delete.
|
|
65
|
+
*/
|
|
66
|
+
export type SyncChange<PK extends string, S extends PropertySchema<PK>> = SyncChangeUpsert<PK, S> | SyncChangeDelete;
|
|
30
67
|
/**
|
|
31
68
|
* Result returned from the sync execute function.
|
|
32
69
|
*/
|
|
33
70
|
export type SyncExecutionResult<PK extends string, Context = unknown> = {
|
|
34
71
|
/**
|
|
35
|
-
* The batch of
|
|
72
|
+
* The batch of changes to apply in this execution.
|
|
73
|
+
* Can include upserts (create/update) and deletes.
|
|
36
74
|
*/
|
|
37
|
-
|
|
75
|
+
changes: SyncChange<PK, PropertySchema<PK>>[];
|
|
38
76
|
/**
|
|
39
|
-
* Indicates whether
|
|
40
|
-
* - `true`:
|
|
41
|
-
* - `false`:
|
|
77
|
+
* Indicates whether there is more data to fetch.
|
|
78
|
+
* - `true`: More data available, will trigger another execution with nextContext
|
|
79
|
+
* - `false`: No more data to fetch, sync is complete
|
|
42
80
|
*/
|
|
43
|
-
|
|
81
|
+
hasMore: boolean;
|
|
44
82
|
/**
|
|
45
83
|
* Optional context data to pass to the next execution.
|
|
46
|
-
* Required if `
|
|
84
|
+
* Required if `hasMore` is `true`, ignored if `hasMore` is `false`.
|
|
47
85
|
* This can be any type of data (cursor, page number, timestamp, etc.).
|
|
48
86
|
* The same data will be provided in the context parameter of the next execution.
|
|
49
87
|
*/
|
|
@@ -65,15 +103,16 @@ export type SyncConfiguration<PK extends string, S extends Schema<PK>, Context =
|
|
|
65
103
|
*/
|
|
66
104
|
schema: S;
|
|
67
105
|
/**
|
|
68
|
-
*
|
|
69
|
-
*
|
|
106
|
+
* How the sync handles data lifecycle:
|
|
107
|
+
* - "replace": Each sync returns the complete dataset. After hasMore:false,
|
|
108
|
+
* pages not seen in this sync run are deleted.
|
|
109
|
+
* - "incremental": Sync returns changes only. After hasMore:false, sync
|
|
110
|
+
* continues from saved cursor. Use delete markers
|
|
111
|
+
* to explicitly remove pages.
|
|
70
112
|
*
|
|
71
|
-
*
|
|
72
|
-
* - `false` (default): Only upsert pages, never delete
|
|
73
|
-
*
|
|
74
|
-
* @default false
|
|
113
|
+
* @default "replace"
|
|
75
114
|
*/
|
|
76
|
-
|
|
115
|
+
mode?: SyncMode;
|
|
77
116
|
/**
|
|
78
117
|
* How often the sync should run.
|
|
79
118
|
* - "continuous": Run as frequently as the system allows (default)
|
|
@@ -89,25 +128,26 @@ export type SyncConfiguration<PK extends string, S extends Schema<PK>, Context =
|
|
|
89
128
|
* A function that fetches the data to sync from the third-party service.
|
|
90
129
|
*
|
|
91
130
|
* This function can return all data at once, or implement pagination by:
|
|
92
|
-
* 1. Returning a batch of
|
|
131
|
+
* 1. Returning a batch of changes with `hasMore: true` and a `nextContext`
|
|
93
132
|
* 2. The runtime will call execute again with that context data
|
|
94
|
-
* 3. Continue until `
|
|
133
|
+
* 3. Continue until `hasMore: false` is returned
|
|
95
134
|
*
|
|
96
135
|
* The runtime will handle diffing against the data source and creating,
|
|
97
136
|
* updating, and deleting pages as necessary.
|
|
98
137
|
*
|
|
99
138
|
* @param context - Optional context data from previous execution (undefined on first call)
|
|
100
|
-
* @returns A result containing
|
|
139
|
+
* @returns A result containing changes, hasMore status, and optional nextContext
|
|
101
140
|
*/
|
|
102
141
|
execute: (context?: Context) => Promise<SyncExecutionResult<PK, Context>>;
|
|
103
142
|
};
|
|
104
143
|
export type SyncHandlerResult<PK extends string, Context = unknown> = {
|
|
105
144
|
primaryKeyProperty: PK;
|
|
106
|
-
|
|
107
|
-
|
|
145
|
+
changes: SyncChange<PK, PropertySchema<PK>>[];
|
|
146
|
+
hasMore: boolean;
|
|
108
147
|
nextContext?: Context;
|
|
109
|
-
|
|
148
|
+
mode?: SyncMode;
|
|
110
149
|
};
|
|
150
|
+
export type SyncCapability = ReturnType<typeof createSyncCapability>;
|
|
111
151
|
/**
|
|
112
152
|
* Creates a special handler for syncing third-party data to a collection.
|
|
113
153
|
*
|
|
@@ -115,17 +155,18 @@ export type SyncHandlerResult<PK extends string, Context = unknown> = {
|
|
|
115
155
|
* @returns A handler function that executes the sync function, and passes data
|
|
116
156
|
* needed to complete the sync back to the platform.
|
|
117
157
|
*/
|
|
118
|
-
export declare function
|
|
119
|
-
_tag:
|
|
158
|
+
export declare function createSyncCapability<PK extends string, S extends Schema<PK>, Context = unknown>(key: string, syncConfiguration: SyncConfiguration<PK, S, Context>): {
|
|
159
|
+
_tag: "sync";
|
|
160
|
+
key: string;
|
|
120
161
|
config: {
|
|
121
162
|
primaryKeyProperty: PK;
|
|
122
163
|
schema: S;
|
|
123
|
-
|
|
164
|
+
mode: SyncMode | undefined;
|
|
124
165
|
schedule: SyncSchedule;
|
|
125
166
|
};
|
|
126
167
|
handler(context?: Context): Promise<{
|
|
127
|
-
|
|
128
|
-
|
|
168
|
+
changes: SyncChange<PK, PropertySchema<PK>>[];
|
|
169
|
+
hasMore: boolean;
|
|
129
170
|
nextContext: Context | undefined;
|
|
130
171
|
}>;
|
|
131
172
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sync.d.ts","sourceRoot":"","sources":["../../src/capabilities/sync.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACX,qBAAqB,EACrB,cAAc,EACd,MAAM,EACN,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EACX,IAAI,EACJ,WAAW,EACX,UAAU,EACV,QAAQ,EACR,YAAY,EACZ,SAAS,EAET,MAAM,aAAa,CAAC;AAErB;;GAEG;AACH,KAAK,iBAAiB,CAAC,CAAC,SAAS,qBAAqB,IAAI,CAAC,SAAS;IACnE,IAAI,EAAE,QAAQ,CAAC;CACf,GACE,WAAW,GACX,CAAC,SAAS;IAAE,IAAI,EAAE,OAAO,CAAA;CAAE,GAC1B,UAAU,GACV,SAAS,CAAC;AAEd;;GAEG;AACH,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"sync.d.ts","sourceRoot":"","sources":["../../src/capabilities/sync.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACX,qBAAqB,EACrB,cAAc,EACd,MAAM,EACN,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EACX,IAAI,EACJ,WAAW,EACX,UAAU,EACV,QAAQ,EACR,YAAY,EACZ,SAAS,EAET,MAAM,aAAa,CAAC;AAErB;;GAEG;AACH,KAAK,iBAAiB,CAAC,CAAC,SAAS,qBAAqB,IAAI,CAAC,SAAS;IACnE,IAAI,EAAE,QAAQ,CAAC;CACf,GACE,WAAW,GACX,CAAC,SAAS;IAAE,IAAI,EAAE,OAAO,CAAA;CAAE,GAC1B,UAAU,GACV,SAAS,CAAC;AAEd;;GAEG;AACH,MAAM,MAAM,QAAQ,GAAG,SAAS,GAAG,aAAa,CAAC;AAEjD;;GAEG;AACH,MAAM,MAAM,gBAAgB,CAC3B,EAAE,SAAS,MAAM,EACjB,CAAC,SAAS,cAAc,CAAC,EAAE,CAAC,IAC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;;;;;;;OASG;IACH,QAAQ,CAAC,EAAE,QAAQ,CAAC;IAEpB;;;;;;;;;;;;;OAaG;IACH,OAAO,EAAE,CAAC,OAAO,CAAC,EAAE,OAAO,KAAK,OAAO,CAAC,mBAAmB,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC,CAAC;CAC1E,CAAC;AAEF,MAAM,MAAM,iBAAiB,CAAC,EAAE,SAAS,MAAM,EAAE,OAAO,GAAG,OAAO,IAAI;IACrE,kBAAkB,EAAE,EAAE,CAAC;IACvB,OAAO,EAAE,UAAU,CAAC,EAAE,EAAE,cAAc,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC;IAC9C,OAAO,EAAE,OAAO,CAAC;IACjB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,IAAI,CAAC,EAAE,QAAQ,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG,UAAU,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAErE;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CACnC,EAAE,SAAS,MAAM,EACjB,CAAC,SAAS,MAAM,CAAC,EAAE,CAAC,EACpB,OAAO,GAAG,OAAO,EAChB,GAAG,EAAE,MAAM,EAAE,iBAAiB,EAAE,iBAAiB,CAAC,EAAE,EAAE,CAAC,EAAE,OAAO,CAAC;;;;;;;;;sBAUzC,OAAO;;;;;EAkBhC"}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { ExecutionError, unreachable } from "../error.js";
|
|
2
|
-
function
|
|
2
|
+
function createSyncCapability(key, syncConfiguration) {
|
|
3
3
|
return {
|
|
4
4
|
_tag: "sync",
|
|
5
|
+
key,
|
|
5
6
|
config: {
|
|
6
7
|
primaryKeyProperty: syncConfiguration.primaryKeyProperty,
|
|
7
8
|
schema: syncConfiguration.schema,
|
|
8
|
-
|
|
9
|
+
mode: syncConfiguration.mode,
|
|
9
10
|
schedule: parseSchedule(syncConfiguration.schedule)
|
|
10
11
|
},
|
|
11
12
|
async handler(context) {
|
|
@@ -13,8 +14,8 @@ function sync(syncConfiguration) {
|
|
|
13
14
|
throw new ExecutionError(err);
|
|
14
15
|
});
|
|
15
16
|
const result = {
|
|
16
|
-
|
|
17
|
-
|
|
17
|
+
changes: executionResult.changes,
|
|
18
|
+
hasMore: executionResult.hasMore,
|
|
18
19
|
nextContext: executionResult.nextContext
|
|
19
20
|
};
|
|
20
21
|
process.stdout.write(`
|
|
@@ -68,5 +69,5 @@ function parseSchedule(schedule) {
|
|
|
68
69
|
return { type: "interval", intervalMs };
|
|
69
70
|
}
|
|
70
71
|
export {
|
|
71
|
-
|
|
72
|
+
createSyncCapability
|
|
72
73
|
};
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { type JSONSchemaType } from "ajv";
|
|
2
|
-
type JSONValue
|
|
3
|
-
[key: string]: JSONValue;
|
|
4
|
-
};
|
|
2
|
+
import type { JSONValue } from "../types.js";
|
|
5
3
|
export interface ToolConfiguration<I extends JSONValue, O extends JSONValue = JSONValue> {
|
|
6
4
|
title: string;
|
|
7
5
|
description: string;
|
|
@@ -39,33 +37,16 @@ export declare class ToolExecutionError extends Error {
|
|
|
39
37
|
message: string;
|
|
40
38
|
};
|
|
41
39
|
}
|
|
40
|
+
export type ToolCapability<I extends JSONValue, O extends JSONValue = JSONValue> = ReturnType<typeof createToolCapability<I, O>>;
|
|
42
41
|
/**
|
|
43
42
|
* Creates a capability definition for a tool to be used by an agent.
|
|
44
43
|
*
|
|
45
|
-
* Example:
|
|
46
|
-
*
|
|
47
|
-
* ```ts
|
|
48
|
-
* tool<{ name: string }>({
|
|
49
|
-
* title: "Say Hello",
|
|
50
|
-
* description: "Say hello to the user",
|
|
51
|
-
* schema: {
|
|
52
|
-
* type: "object",
|
|
53
|
-
* properties: {
|
|
54
|
-
* name: { type: "string" },
|
|
55
|
-
* },
|
|
56
|
-
* required: ["name"],
|
|
57
|
-
* },
|
|
58
|
-
* execute: ({ name }) => {
|
|
59
|
-
* return `Hello, ${name}!`;
|
|
60
|
-
* },
|
|
61
|
-
* })
|
|
62
|
-
* ```
|
|
63
|
-
*
|
|
64
44
|
* @param config - The configuration for the tool.
|
|
65
45
|
* @returns A capability definition for the tool.
|
|
66
46
|
*/
|
|
67
|
-
export declare function
|
|
68
|
-
_tag:
|
|
47
|
+
export declare function createToolCapability<I extends JSONValue, O extends JSONValue = JSONValue>(key: string, config: ToolConfiguration<I, O>): {
|
|
48
|
+
_tag: "tool";
|
|
49
|
+
key: string;
|
|
69
50
|
config: {
|
|
70
51
|
title: string;
|
|
71
52
|
description: string;
|
|
@@ -80,5 +61,4 @@ export declare function tool<I extends JSONValue, O extends JSONValue = JSONValu
|
|
|
80
61
|
error: InvalidToolInputError | InvalidToolOutputError | ToolExecutionError;
|
|
81
62
|
}>;
|
|
82
63
|
};
|
|
83
|
-
export {};
|
|
84
64
|
//# sourceMappingURL=tool.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool.d.ts","sourceRoot":"","sources":["../../src/capabilities/tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"tool.d.ts","sourceRoot":"","sources":["../../src/capabilities/tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AAC/C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAE7C,MAAM,WAAW,iBAAiB,CACjC,CAAC,SAAS,SAAS,EACnB,CAAC,SAAS,SAAS,GAAG,SAAS;IAE/B,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,cAAc,CAAC,CAAC,CAAC,CAAC;IAC1B,YAAY,CAAC,EAAE,cAAc,CAAC,CAAC,CAAC,CAAC;IACjC,OAAO,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;CACtC;AAED;;GAEG;AACH,qBAAa,qBAAsB,SAAQ,KAAK;gBACnC,OAAO,EAAE,MAAM;IAK3B,MAAM;;;;CAMN;AAED;;GAEG;AACH,qBAAa,sBAAuB,SAAQ,KAAK;gBACpC,OAAO,EAAE,MAAM;IAK3B,MAAM;;;;CAMN;AAED;;GAEG;AACH,qBAAa,kBAAmB,SAAQ,KAAK;gBAChC,OAAO,EAAE,MAAM;IAK3B,MAAM;;;;CAMN;AAED,MAAM,MAAM,cAAc,CACzB,CAAC,SAAS,SAAS,EACnB,CAAC,SAAS,SAAS,GAAG,SAAS,IAC5B,UAAU,CAAC,OAAO,oBAAoB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;AAElD;;;;;GAKG;AACH,wBAAgB,oBAAoB,CACnC,CAAC,SAAS,SAAS,EACnB,CAAC,SAAS,SAAS,GAAG,SAAS,EAC9B,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,iBAAiB,CAAC,CAAC,EAAE,CAAC,CAAC;;;;;;;;;mBAgBvB,SAAS,GAAG,OAAO,CACrC;QACA,IAAI,EAAE,SAAS,CAAC;QAChB,KAAK,EAAE,CAAC,CAAC;KACR,GACD;QACA,IAAI,EAAE,OAAO,CAAC;QACd,KAAK,EACF,qBAAqB,GACrB,sBAAsB,GACtB,kBAAkB,CAAC;KACrB,CACH;EA0DF"}
|
|
@@ -35,12 +35,13 @@ class ToolExecutionError extends Error {
|
|
|
35
35
|
};
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
|
-
function
|
|
38
|
+
function createToolCapability(key, config) {
|
|
39
39
|
const ajv = new Ajv();
|
|
40
40
|
const validateInput = ajv.compile(config.schema);
|
|
41
41
|
const validateOutput = config.outputSchema ? ajv.compile(config.outputSchema) : null;
|
|
42
42
|
return {
|
|
43
43
|
_tag: "tool",
|
|
44
|
+
key,
|
|
44
45
|
config: {
|
|
45
46
|
title: config.title,
|
|
46
47
|
description: config.description,
|
|
@@ -107,5 +108,5 @@ export {
|
|
|
107
108
|
InvalidToolInputError,
|
|
108
109
|
InvalidToolOutputError,
|
|
109
110
|
ToolExecutionError,
|
|
110
|
-
|
|
111
|
+
createToolCapability
|
|
111
112
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
export { emojiIcon, imageIcon, notionIcon, place } from "./builder.js";
|
|
2
|
-
export type { AutomationConfiguration, AutomationContext, PageObjectResponse, } from "./capabilities/automation.js";
|
|
3
|
-
export {
|
|
4
|
-
export type {
|
|
5
|
-
export {
|
|
6
|
-
export type { SyncConfiguration, SyncExecutionResult, SyncedObject, } from "./capabilities/sync.js";
|
|
7
|
-
export { sync } from "./capabilities/sync.js";
|
|
8
|
-
export { tool } from "./capabilities/tool.js";
|
|
2
|
+
export type { AutomationCapability, AutomationConfiguration, AutomationContext, PageObjectResponse, } from "./capabilities/automation.js";
|
|
3
|
+
export type { NotionManagedOAuthConfiguration, OAuthCapability, OAuthConfiguration, UserManagedOAuthConfiguration, } from "./capabilities/oauth.js";
|
|
4
|
+
export type { SyncCapability, SyncChange, SyncChangeDelete, SyncChangeUpsert, SyncConfiguration, SyncExecutionResult, SyncMode, } from "./capabilities/sync.js";
|
|
5
|
+
export type { ToolCapability, ToolConfiguration } from "./capabilities/tool.js";
|
|
9
6
|
export type { Icon, ImageIcon, NoticonColor, NoticonName, PlaceValue, Schedule, } from "./types.js";
|
|
7
|
+
export { Worker } from "./worker.js";
|
|
10
8
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AACvE,YAAY,EACX,uBAAuB,EACvB,iBAAiB,EACjB,kBAAkB,GAClB,MAAM,8BAA8B,CAAC;AACtC,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AACvE,YAAY,EACX,oBAAoB,EACpB,uBAAuB,EACvB,iBAAiB,EACjB,kBAAkB,GAClB,MAAM,8BAA8B,CAAC;AACtC,YAAY,EACX,+BAA+B,EAC/B,eAAe,EACf,kBAAkB,EAClB,6BAA6B,GAC7B,MAAM,yBAAyB,CAAC;AACjC,YAAY,EACX,cAAc,EACd,UAAU,EACV,gBAAgB,EAChB,gBAAgB,EAChB,iBAAiB,EACjB,mBAAmB,EACnB,QAAQ,GACR,MAAM,wBAAwB,CAAC;AAChC,YAAY,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAChF,YAAY,EACX,IAAI,EACJ,SAAS,EACT,YAAY,EACZ,WAAW,EACX,UAAU,EACV,QAAQ,GACR,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,15 +1,9 @@
|
|
|
1
1
|
import { emojiIcon, imageIcon, notionIcon, place } from "./builder.js";
|
|
2
|
-
import {
|
|
3
|
-
import { oauth } from "./capabilities/oauth.js";
|
|
4
|
-
import { sync } from "./capabilities/sync.js";
|
|
5
|
-
import { tool } from "./capabilities/tool.js";
|
|
2
|
+
import { Worker } from "./worker.js";
|
|
6
3
|
export {
|
|
7
|
-
|
|
4
|
+
Worker,
|
|
8
5
|
emojiIcon,
|
|
9
6
|
imageIcon,
|
|
10
7
|
notionIcon,
|
|
11
|
-
|
|
12
|
-
place,
|
|
13
|
-
sync,
|
|
14
|
-
tool
|
|
8
|
+
place
|
|
15
9
|
};
|
package/dist/types.d.ts
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A JSON value is a string, number, boolean, null, array, or object.
|
|
3
|
+
*/
|
|
4
|
+
export type JSONValue = string | number | boolean | null | JSONValue[] | {
|
|
5
|
+
[key: string]: JSONValue;
|
|
6
|
+
};
|
|
1
7
|
/**
|
|
2
8
|
* A text token is a tuple where the first element is the text content
|
|
3
9
|
* and optional subsequent elements are formatting annotations.
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,KAAK,SAAS,GAAG,CAAC,MAAM,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;AAExC;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG,KAAK,CAAC,SAAS,CAAC,CAAC;AAEzC;;GAEG;AACH,MAAM,MAAM,WAAW,GACpB,SAAS,GACT,MAAM,GACN,OAAO,GACP,QAAQ,GACR,QAAQ,GACR,OAAO,GACP,MAAM,GACN,QAAQ,GACR,MAAM,GACN,KAAK,CAAC;AAET;;GAEG;AACH,MAAM,WAAW,YAAY;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,WAAW,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,OAAO,GAAG,aAAa,GAAG,UAAU,CAAC;AAEnE;;GAEG;AACH,MAAM,WAAW,WAAW;IAC3B,IAAI,EAAE,eAAe,CAAC;IACtB,OAAO,EAAE,YAAY,EAAE,CAAC;CACxB;AAED;;GAEG;AACH,MAAM,WAAW,UAAU;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC9B,IAAI,EAAE,UAAU,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,SAA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