@notionhq/apps 0.0.13 → 0.0.14
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/README.md +32 -28
- package/dist/box.generated.d.ts +164 -0
- package/dist/box.generated.d.ts.map +1 -0
- package/dist/box.generated.js +24 -0
- package/dist/calendar.generated.d.ts +1036 -0
- package/dist/calendar.generated.d.ts.map +1 -0
- package/dist/calendar.generated.js +42 -0
- package/dist/cli/build.js +7 -6
- package/dist/confluence.generated.d.ts +98 -0
- package/dist/confluence.generated.d.ts.map +1 -0
- package/dist/confluence.generated.js +18 -0
- package/dist/connection-actions.d.ts +2 -0
- package/dist/connection-actions.d.ts.map +1 -0
- package/dist/connection-actions.js +0 -0
- package/dist/connection-trigger-definitions.generated.d.ts +34 -0
- package/dist/connection-trigger-definitions.generated.d.ts.map +1 -0
- package/dist/connection-trigger-definitions.generated.js +45 -0
- package/dist/connections.d.ts +15 -0
- package/dist/connections.d.ts.map +1 -0
- package/dist/connections.js +79 -0
- package/dist/connections.test.d.ts +2 -0
- package/dist/connections.test.d.ts.map +1 -0
- package/dist/cursor.generated.d.ts +154 -0
- package/dist/cursor.generated.d.ts.map +1 -0
- package/dist/cursor.generated.js +18 -0
- package/dist/discord.generated.d.ts +279 -0
- package/dist/discord.generated.d.ts.map +1 -0
- package/dist/discord.generated.js +33 -0
- package/dist/gmail.generated.d.ts +184 -0
- package/dist/gmail.generated.d.ts.map +1 -0
- package/dist/gmail.generated.js +21 -0
- package/dist/googleCalendar.generated.d.ts +83 -0
- package/dist/googleCalendar.generated.d.ts.map +1 -0
- package/dist/googleCalendar.generated.js +15 -0
- package/dist/googleDrive.generated.d.ts +210 -0
- package/dist/googleDrive.generated.d.ts.map +1 -0
- package/dist/googleDrive.generated.js +27 -0
- package/dist/googleDriveOauth.generated.d.ts +851 -0
- package/dist/googleDriveOauth.generated.d.ts.map +1 -0
- package/dist/googleDriveOauth.generated.js +84 -0
- package/dist/outlook.generated.d.ts +224 -0
- package/dist/outlook.generated.d.ts.map +1 -0
- package/dist/outlook.generated.js +24 -0
- package/dist/providers.generated.d.ts +117 -0
- package/dist/providers.generated.d.ts.map +1 -0
- package/dist/providers.generated.js +108 -0
- package/dist/salesforce.generated.d.ts +151 -0
- package/dist/salesforce.generated.d.ts.map +1 -0
- package/dist/salesforce.generated.js +24 -0
- package/dist/slack.generated.d.ts +290 -0
- package/dist/slack.generated.d.ts.map +1 -0
- package/dist/slack.generated.js +30 -0
- package/dist/triggers.generated.d.ts +107 -32
- package/dist/triggers.generated.d.ts.map +1 -1
- package/dist/triggers.generated.js +36 -24
- package/dist/workflow-connections-types.test.d.ts +2 -0
- package/dist/workflow-connections-types.test.d.ts.map +1 -0
- package/dist/workflow-types.test.d.ts +2 -0
- package/dist/workflow-types.test.d.ts.map +1 -0
- package/dist/workflow.d.ts +20 -16
- package/dist/workflow.d.ts.map +1 -1
- package/dist/workflow.js +14 -17
- package/docs/BUILD.md +83 -14
- package/docs/CONNECTIONS.md +129 -0
- package/package.json +1 -1
- package/src/box.generated.ts +187 -0
- package/src/calendar.generated.ts +1117 -0
- package/src/cli/build.test.ts +33 -0
- package/src/cli/build.ts +6 -5
- package/src/confluence.generated.ts +109 -0
- package/src/connection-actions.ts +2 -0
- package/src/connection-trigger-definitions.generated.ts +48 -0
- package/src/connections.test.ts +157 -0
- package/src/connections.ts +126 -0
- package/src/cursor.generated.ts +167 -0
- package/src/discord.generated.ts +318 -0
- package/src/gmail.generated.ts +205 -0
- package/src/googleCalendar.generated.ts +95 -0
- package/src/googleDrive.generated.ts +235 -0
- package/src/googleDriveOauth.generated.ts +980 -0
- package/src/outlook.generated.ts +249 -0
- package/src/providers.generated.ts +207 -0
- package/src/salesforce.generated.ts +170 -0
- package/src/slack.generated.ts +330 -0
- package/src/triggers.generated.ts +112 -32
- package/src/workflow-connections-types.test.ts +59 -0
- package/src/workflow-types.test.ts +144 -0
- package/src/workflow.test.ts +112 -2
- package/src/workflow.ts +58 -29
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
import type { ConnectionActionInvoker } from "./connection-actions.js";
|
|
2
|
+
/**
|
|
3
|
+
* Script input for the "Get Google Drive file comments" effect (`googleDrive.getFileComments`),
|
|
4
|
+
* derived from its Tool Core definition's call_function input projection.
|
|
5
|
+
*
|
|
6
|
+
* Load comments from a Google Drive file.
|
|
7
|
+
*/
|
|
8
|
+
export type GetFileCommentsScriptInput = {
|
|
9
|
+
/**
|
|
10
|
+
* Google Drive file ID.
|
|
11
|
+
*/
|
|
12
|
+
fileId: string;
|
|
13
|
+
/**
|
|
14
|
+
* Optional shared drive IDs that may contain the file being loaded.
|
|
15
|
+
*/
|
|
16
|
+
sharedDriveIds?: Array<string>;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Canonical Tool Core output for the "Get Google Drive file comments" effect (`googleDrive.getFileComments`).
|
|
20
|
+
* This is the definition's output schema; the effect's script surface may
|
|
21
|
+
* re-encode it before returning.
|
|
22
|
+
*/
|
|
23
|
+
export type GetFileCommentsScriptOutput = Array<{
|
|
24
|
+
author: string;
|
|
25
|
+
bodyText: string;
|
|
26
|
+
lastEdited: string;
|
|
27
|
+
}>;
|
|
28
|
+
/**
|
|
29
|
+
* Script input for the "Grep Google Drive files" effect (`googleDrive.grepFiles`),
|
|
30
|
+
* derived from its Tool Core definition's call_function input projection.
|
|
31
|
+
*
|
|
32
|
+
* Search for files in Google Drive.
|
|
33
|
+
*/
|
|
34
|
+
export type GrepFilesScriptInput = {
|
|
35
|
+
/**
|
|
36
|
+
* Search query for Google Drive title and content.
|
|
37
|
+
*/
|
|
38
|
+
query: string;
|
|
39
|
+
/**
|
|
40
|
+
* Maximum number of results to return.
|
|
41
|
+
*/
|
|
42
|
+
maxResults?: number;
|
|
43
|
+
/**
|
|
44
|
+
* Optional shared drive IDs to scope the search to specific shared drives.
|
|
45
|
+
*/
|
|
46
|
+
sharedDriveIds?: Array<string>;
|
|
47
|
+
};
|
|
48
|
+
/**
|
|
49
|
+
* Canonical Tool Core output for the "Grep Google Drive files" effect (`googleDrive.grepFiles`).
|
|
50
|
+
* This is the definition's output schema; the effect's script surface may
|
|
51
|
+
* re-encode it before returning.
|
|
52
|
+
*/
|
|
53
|
+
export type GrepFilesScriptOutput = Array<{
|
|
54
|
+
type: "googleDrive";
|
|
55
|
+
blocks: Array<string>;
|
|
56
|
+
title: string;
|
|
57
|
+
fileId: string;
|
|
58
|
+
fileType: string;
|
|
59
|
+
timestamp: number;
|
|
60
|
+
comments?: Array<{
|
|
61
|
+
author: string;
|
|
62
|
+
bodyText: string;
|
|
63
|
+
lastEdited: string;
|
|
64
|
+
}>;
|
|
65
|
+
}>;
|
|
66
|
+
/**
|
|
67
|
+
* Script input for the "Load a Google Drive file" effect (`googleDrive.loadFile`),
|
|
68
|
+
* derived from its Tool Core definition's call_function input projection.
|
|
69
|
+
*
|
|
70
|
+
* Load a Google Drive file.
|
|
71
|
+
*/
|
|
72
|
+
export type LoadFileScriptInput = {
|
|
73
|
+
/**
|
|
74
|
+
* Google Drive file ID.
|
|
75
|
+
*/
|
|
76
|
+
fileId: string;
|
|
77
|
+
/**
|
|
78
|
+
* Optional shared drive IDs that may contain the file being loaded.
|
|
79
|
+
*/
|
|
80
|
+
sharedDriveIds?: Array<string>;
|
|
81
|
+
/**
|
|
82
|
+
* Whether to include comments in the file. Defaults to false unless user requests it.
|
|
83
|
+
*/
|
|
84
|
+
includeComments?: boolean;
|
|
85
|
+
};
|
|
86
|
+
/**
|
|
87
|
+
* Canonical Tool Core output for the "Load a Google Drive file" effect (`googleDrive.loadFile`).
|
|
88
|
+
* This is the definition's output schema; the effect's script surface may
|
|
89
|
+
* re-encode it before returning.
|
|
90
|
+
*/
|
|
91
|
+
export type LoadFileScriptOutput = {
|
|
92
|
+
title: string;
|
|
93
|
+
fileId: string;
|
|
94
|
+
fileType: string;
|
|
95
|
+
timestamp: number;
|
|
96
|
+
};
|
|
97
|
+
/**
|
|
98
|
+
* Script input for the "Load a Google Drive ZIP file" effect (`googleDrive.loadZipFile`),
|
|
99
|
+
* derived from its Tool Core definition's call_function input projection.
|
|
100
|
+
*
|
|
101
|
+
* Load the top-level files and folders in a zip file on Google Drive, including readable text content when available.
|
|
102
|
+
*/
|
|
103
|
+
export type LoadZipFileScriptInput = {
|
|
104
|
+
/**
|
|
105
|
+
* Google Drive file ID for the zip file.
|
|
106
|
+
*/
|
|
107
|
+
fileId: string;
|
|
108
|
+
/**
|
|
109
|
+
* Optional shared drive IDs to scope listing to specific shared drives.
|
|
110
|
+
*/
|
|
111
|
+
sharedDriveIds?: Array<string>;
|
|
112
|
+
};
|
|
113
|
+
/**
|
|
114
|
+
* Canonical Tool Core output for the "Load a Google Drive ZIP file" effect (`googleDrive.loadZipFile`).
|
|
115
|
+
* This is the definition's output schema; the effect's script surface may
|
|
116
|
+
* re-encode it before returning.
|
|
117
|
+
*/
|
|
118
|
+
export type LoadZipFileScriptOutput = Array<{
|
|
119
|
+
blocks: Array<string>;
|
|
120
|
+
title: string;
|
|
121
|
+
path: string;
|
|
122
|
+
fileType: string;
|
|
123
|
+
timestamp: number;
|
|
124
|
+
}>;
|
|
125
|
+
/**
|
|
126
|
+
* Script input for the "List a Google Drive folder" effect (`googleDrive.lsFolder`),
|
|
127
|
+
* derived from its Tool Core definition's call_function input projection.
|
|
128
|
+
*
|
|
129
|
+
* List files in a Google Drive folder.
|
|
130
|
+
*/
|
|
131
|
+
export type LsFolderScriptInput = {
|
|
132
|
+
/**
|
|
133
|
+
* Google Drive folder ID.
|
|
134
|
+
*/
|
|
135
|
+
folderId: string;
|
|
136
|
+
/**
|
|
137
|
+
* Optional shared drive IDs to scope listing to specific shared drives.
|
|
138
|
+
*/
|
|
139
|
+
sharedDriveIds?: Array<string>;
|
|
140
|
+
};
|
|
141
|
+
/**
|
|
142
|
+
* Canonical Tool Core output for the "List a Google Drive folder" effect (`googleDrive.lsFolder`).
|
|
143
|
+
* This is the definition's output schema; the effect's script surface may
|
|
144
|
+
* re-encode it before returning.
|
|
145
|
+
*/
|
|
146
|
+
export type LsFolderScriptOutput = Array<{
|
|
147
|
+
type: "googleDrive";
|
|
148
|
+
blocks: Array<string>;
|
|
149
|
+
title: string;
|
|
150
|
+
fileId: string;
|
|
151
|
+
fileType: string;
|
|
152
|
+
timestamp: number;
|
|
153
|
+
comments?: Array<{
|
|
154
|
+
author: string;
|
|
155
|
+
bodyText: string;
|
|
156
|
+
lastEdited: string;
|
|
157
|
+
}>;
|
|
158
|
+
}>;
|
|
159
|
+
/**
|
|
160
|
+
* Script input for the "Search Google Drive" effect (`googleDrive.search`),
|
|
161
|
+
* derived from its Tool Core definition's call_function input projection.
|
|
162
|
+
*
|
|
163
|
+
* Search Google Drive via the configured connector.
|
|
164
|
+
*/
|
|
165
|
+
export type SearchScriptInput = {
|
|
166
|
+
/**
|
|
167
|
+
* A single, focused question to search for.
|
|
168
|
+
*/
|
|
169
|
+
question: string;
|
|
170
|
+
/**
|
|
171
|
+
* Brief keywords capturing the core entities.
|
|
172
|
+
*/
|
|
173
|
+
keywords?: string;
|
|
174
|
+
/**
|
|
175
|
+
* Optional time window. Use only "default", "all_time", a duration matching /^\d+[dwmy]$/ (for example, "7d", "2w", "3m", or "1y"), or a date in "YYYY-MM-DD" format. Do not use natural-language durations or combine units.
|
|
176
|
+
*/
|
|
177
|
+
lookback?: string;
|
|
178
|
+
/**
|
|
179
|
+
* Optional shared drive IDs to scope search to specific shared drives.
|
|
180
|
+
*/
|
|
181
|
+
sharedDriveIds?: Array<string>;
|
|
182
|
+
};
|
|
183
|
+
/**
|
|
184
|
+
* Canonical Tool Core output for the "Search Google Drive" effect (`googleDrive.search`).
|
|
185
|
+
* This is the definition's output schema; the effect's script surface may
|
|
186
|
+
* re-encode it before returning.
|
|
187
|
+
*/
|
|
188
|
+
export type SearchScriptOutput = {
|
|
189
|
+
results: Array<{
|
|
190
|
+
id: string;
|
|
191
|
+
title: string;
|
|
192
|
+
path: string;
|
|
193
|
+
text: string;
|
|
194
|
+
lastEdited: string;
|
|
195
|
+
isPrivate: boolean;
|
|
196
|
+
pageId: string;
|
|
197
|
+
fileType: string;
|
|
198
|
+
}>;
|
|
199
|
+
};
|
|
200
|
+
export declare class GoogleDriveConnectionClient {
|
|
201
|
+
private readonly invoke;
|
|
202
|
+
constructor(invoke: ConnectionActionInvoker);
|
|
203
|
+
getFileComments(args: GetFileCommentsScriptInput): Promise<GetFileCommentsScriptOutput>;
|
|
204
|
+
grepFiles(args: GrepFilesScriptInput): Promise<GrepFilesScriptOutput>;
|
|
205
|
+
loadFile(args: LoadFileScriptInput): Promise<LoadFileScriptOutput>;
|
|
206
|
+
loadZipFile(args: LoadZipFileScriptInput): Promise<LoadZipFileScriptOutput>;
|
|
207
|
+
lsFolder(args: LsFolderScriptInput): Promise<LsFolderScriptOutput>;
|
|
208
|
+
search(args: SearchScriptInput): Promise<SearchScriptOutput>;
|
|
209
|
+
}
|
|
210
|
+
//# sourceMappingURL=googleDrive.generated.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"googleDrive.generated.d.ts","sourceRoot":"","sources":["../src/googleDrive.generated.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAA;AACtE;;;;;GAKG;AACH,MAAM,MAAM,0BAA0B,GAAG;IACxC;;OAEG;IACH,MAAM,EAAE,MAAM,CAAA;IACd;;OAEG;IACH,cAAc,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAA;CAC9B,CAAA;AAED;;;;GAIG;AACH,MAAM,MAAM,2BAA2B,GAAG,KAAK,CAAC;IAC/C,MAAM,EAAE,MAAM,CAAA;IACd,QAAQ,EAAE,MAAM,CAAA;IAChB,UAAU,EAAE,MAAM,CAAA;CAClB,CAAC,CAAA;AAEF;;;;;GAKG;AACH,MAAM,MAAM,oBAAoB,GAAG;IAClC;;OAEG;IACH,KAAK,EAAE,MAAM,CAAA;IACb;;OAEG;IACH,UAAU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CAAA;QACd,QAAQ,EAAE,MAAM,CAAA;KAChB,CAAC,CAAA;CACF,CAAA;AAED,qBAAa,2BAA2B;IAC3B,OAAO,CAAC,QAAQ,CAAC,MAAM;gBAAN,MAAM,EAAE,uBAAuB;IAC5D,eAAe,CACd,IAAI,EAAE,0BAA0B,GAC9B,OAAO,CAAC,2BAA2B,CAAC;IAGvC,SAAS,CAAC,IAAI,EAAE,oBAAoB,GAAG,OAAO,CAAC,qBAAqB,CAAC;IAGrE,QAAQ,CAAC,IAAI,EAAE,mBAAmB,GAAG,OAAO,CAAC,oBAAoB,CAAC;IAGlE,WAAW,CAAC,IAAI,EAAE,sBAAsB,GAAG,OAAO,CAAC,uBAAuB,CAAC;IAG3E,QAAQ,CAAC,IAAI,EAAE,mBAAmB,GAAG,OAAO,CAAC,oBAAoB,CAAC;IAGlE,MAAM,CAAC,IAAI,EAAE,iBAAiB,GAAG,OAAO,CAAC,kBAAkB,CAAC;CAG5D"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
class GoogleDriveConnectionClient {
|
|
2
|
+
constructor(invoke) {
|
|
3
|
+
this.invoke = invoke;
|
|
4
|
+
}
|
|
5
|
+
invoke;
|
|
6
|
+
getFileComments(args) {
|
|
7
|
+
return this.invoke("getFileComments", args);
|
|
8
|
+
}
|
|
9
|
+
grepFiles(args) {
|
|
10
|
+
return this.invoke("grepFiles", args);
|
|
11
|
+
}
|
|
12
|
+
loadFile(args) {
|
|
13
|
+
return this.invoke("loadFile", args);
|
|
14
|
+
}
|
|
15
|
+
loadZipFile(args) {
|
|
16
|
+
return this.invoke("loadZipFile", args);
|
|
17
|
+
}
|
|
18
|
+
lsFolder(args) {
|
|
19
|
+
return this.invoke("lsFolder", args);
|
|
20
|
+
}
|
|
21
|
+
search(args) {
|
|
22
|
+
return this.invoke("search", args);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
export {
|
|
26
|
+
GoogleDriveConnectionClient
|
|
27
|
+
};
|