@notionhq/apps 0.0.12 → 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.
Files changed (137) hide show
  1. package/README.md +32 -0
  2. package/dist/box.generated.d.ts +164 -0
  3. package/dist/box.generated.d.ts.map +1 -0
  4. package/dist/box.generated.js +24 -0
  5. package/dist/calendar.generated.d.ts +1036 -0
  6. package/dist/calendar.generated.d.ts.map +1 -0
  7. package/dist/calendar.generated.js +42 -0
  8. package/dist/cli/build.d.ts.map +1 -1
  9. package/dist/cli/build.js +41 -10
  10. package/dist/cli/codegen.d.ts +2 -0
  11. package/dist/cli/codegen.d.ts.map +1 -1
  12. package/dist/cli/codegen.js +13 -2
  13. package/dist/cli/discover.d.ts +2 -0
  14. package/dist/cli/discover.d.ts.map +1 -1
  15. package/dist/cli/discover.js +4 -2
  16. package/dist/cli/emit-manifest.d.ts +3 -1
  17. package/dist/cli/emit-manifest.d.ts.map +1 -1
  18. package/dist/cli/emit-manifest.js +10 -4
  19. package/dist/cli/index.js +33 -1
  20. package/dist/confluence.generated.d.ts +98 -0
  21. package/dist/confluence.generated.d.ts.map +1 -0
  22. package/dist/confluence.generated.js +18 -0
  23. package/dist/connection-actions.d.ts +2 -0
  24. package/dist/connection-actions.d.ts.map +1 -0
  25. package/dist/connection-actions.js +0 -0
  26. package/dist/connection-trigger-definitions.generated.d.ts +34 -0
  27. package/dist/connection-trigger-definitions.generated.d.ts.map +1 -0
  28. package/dist/connection-trigger-definitions.generated.js +45 -0
  29. package/dist/connections.d.ts +15 -0
  30. package/dist/connections.d.ts.map +1 -0
  31. package/dist/connections.js +79 -0
  32. package/dist/connections.test.d.ts +2 -0
  33. package/dist/connections.test.d.ts.map +1 -0
  34. package/dist/cursor.generated.d.ts +154 -0
  35. package/dist/cursor.generated.d.ts.map +1 -0
  36. package/dist/cursor.generated.js +18 -0
  37. package/dist/custom-block.d.ts +54 -0
  38. package/dist/custom-block.d.ts.map +1 -0
  39. package/dist/custom-block.js +30 -0
  40. package/dist/custom-block.test.d.ts +2 -0
  41. package/dist/custom-block.test.d.ts.map +1 -0
  42. package/dist/custom-blocks.d.ts +2 -0
  43. package/dist/custom-blocks.d.ts.map +1 -0
  44. package/dist/custom-blocks.js +1 -0
  45. package/dist/discord.generated.d.ts +279 -0
  46. package/dist/discord.generated.d.ts.map +1 -0
  47. package/dist/discord.generated.js +33 -0
  48. package/dist/gmail.generated.d.ts +184 -0
  49. package/dist/gmail.generated.d.ts.map +1 -0
  50. package/dist/gmail.generated.js +21 -0
  51. package/dist/googleCalendar.generated.d.ts +83 -0
  52. package/dist/googleCalendar.generated.d.ts.map +1 -0
  53. package/dist/googleCalendar.generated.js +15 -0
  54. package/dist/googleDrive.generated.d.ts +210 -0
  55. package/dist/googleDrive.generated.d.ts.map +1 -0
  56. package/dist/googleDrive.generated.js +27 -0
  57. package/dist/googleDriveOauth.generated.d.ts +851 -0
  58. package/dist/googleDriveOauth.generated.d.ts.map +1 -0
  59. package/dist/googleDriveOauth.generated.js +84 -0
  60. package/dist/manifest.d.ts +1 -1
  61. package/dist/manifest.d.ts.map +1 -1
  62. package/dist/nds.css +1 -0
  63. package/dist/notion-as-code/database.d.ts +4 -3
  64. package/dist/notion-as-code/database.d.ts.map +1 -1
  65. package/dist/notion-as-code/database.js +11 -2
  66. package/dist/notion-as-code/intents.d.ts +4 -1
  67. package/dist/notion-as-code/intents.d.ts.map +1 -1
  68. package/dist/notion-as-code/page.d.ts +4 -4
  69. package/dist/notion-as-code/page.d.ts.map +1 -1
  70. package/dist/notion-as-code/page.js +11 -2
  71. package/dist/outlook.generated.d.ts +224 -0
  72. package/dist/outlook.generated.d.ts.map +1 -0
  73. package/dist/outlook.generated.js +24 -0
  74. package/dist/providers.generated.d.ts +117 -0
  75. package/dist/providers.generated.d.ts.map +1 -0
  76. package/dist/providers.generated.js +108 -0
  77. package/dist/react.d.ts +2 -0
  78. package/dist/react.d.ts.map +1 -0
  79. package/dist/react.js +1 -0
  80. package/dist/salesforce.generated.d.ts +151 -0
  81. package/dist/salesforce.generated.d.ts.map +1 -0
  82. package/dist/salesforce.generated.js +24 -0
  83. package/dist/slack.generated.d.ts +290 -0
  84. package/dist/slack.generated.d.ts.map +1 -0
  85. package/dist/slack.generated.js +30 -0
  86. package/dist/triggers.generated.d.ts +107 -32
  87. package/dist/triggers.generated.d.ts.map +1 -1
  88. package/dist/triggers.generated.js +36 -24
  89. package/dist/workflow-connections-types.test.d.ts +2 -0
  90. package/dist/workflow-connections-types.test.d.ts.map +1 -0
  91. package/dist/workflow-types.test.d.ts +2 -0
  92. package/dist/workflow-types.test.d.ts.map +1 -0
  93. package/dist/workflow.d.ts +20 -16
  94. package/dist/workflow.d.ts.map +1 -1
  95. package/dist/workflow.js +14 -17
  96. package/docs/BUILD.md +83 -14
  97. package/docs/CONNECTIONS.md +129 -0
  98. package/package.json +16 -2
  99. package/src/box.generated.ts +187 -0
  100. package/src/calendar.generated.ts +1117 -0
  101. package/src/cli/build.test.ts +87 -0
  102. package/src/cli/build.ts +47 -9
  103. package/src/cli/codegen.test.ts +2 -0
  104. package/src/cli/codegen.ts +25 -7
  105. package/src/cli/discover.test.ts +12 -0
  106. package/src/cli/discover.ts +6 -2
  107. package/src/cli/emit-manifest.ts +13 -3
  108. package/src/cli/index.ts +33 -1
  109. package/src/confluence.generated.ts +109 -0
  110. package/src/connection-actions.ts +2 -0
  111. package/src/connection-trigger-definitions.generated.ts +48 -0
  112. package/src/connections.test.ts +157 -0
  113. package/src/connections.ts +126 -0
  114. package/src/cursor.generated.ts +167 -0
  115. package/src/custom-block.test.ts +19 -0
  116. package/src/custom-block.ts +41 -0
  117. package/src/custom-blocks.ts +1 -0
  118. package/src/discord.generated.ts +318 -0
  119. package/src/gmail.generated.ts +205 -0
  120. package/src/googleCalendar.generated.ts +95 -0
  121. package/src/googleDrive.generated.ts +235 -0
  122. package/src/googleDriveOauth.generated.ts +980 -0
  123. package/src/manifest.ts +1 -1
  124. package/src/nds.css +1 -0
  125. package/src/notion-as-code/database.ts +19 -11
  126. package/src/notion-as-code/intents.ts +2 -1
  127. package/src/notion-as-code/page.ts +17 -11
  128. package/src/outlook.generated.ts +249 -0
  129. package/src/providers.generated.ts +207 -0
  130. package/src/react.ts +1 -0
  131. package/src/salesforce.generated.ts +170 -0
  132. package/src/slack.generated.ts +330 -0
  133. package/src/triggers.generated.ts +112 -32
  134. package/src/workflow-connections-types.test.ts +59 -0
  135. package/src/workflow-types.test.ts +144 -0
  136. package/src/workflow.test.ts +112 -2
  137. package/src/workflow.ts +58 -29
package/src/manifest.ts CHANGED
@@ -4,7 +4,7 @@ import type { NormalizedSchedule } from "./types.js";
4
4
  export const APPS_MANIFEST_SCHEMA = "notion:apps-manifest:v1" as const;
5
5
 
6
6
  /** Capability types supported by this SDK. */
7
- export type CapabilityType = "workflow" | "sync";
7
+ export type CapabilityType = "workflow" | "sync" | "custom_block";
8
8
 
9
9
  export type DatabaseManifestConfig = {
10
10
  initialTitle?: string;
package/src/nds.css ADDED
@@ -0,0 +1 @@
1
+ @import "@notionhq/custom-blocks/nds.css";
@@ -1,11 +1,12 @@
1
1
  import type { Database } from "../database.js";
2
- import type {
3
- DataSourceDefinition,
4
- DatabaseIntent,
5
- NotionAsCodeIcon,
6
- NotionAsCodeProperty,
7
- Parent,
8
- ResourceId,
2
+ import {
3
+ APPS_WORKSPACE_RESOURCE_ID,
4
+ type DataSourceDefinition,
5
+ type DatabaseIntent,
6
+ type NotionAsCodeIcon,
7
+ type NotionAsCodeProperty,
8
+ type Parent,
9
+ type ResourceId,
9
10
  } from "./intents.js";
10
11
  import { createPage, type ChildPageArgs, type PageHandle } from "./page.js";
11
12
  import { recordIntent } from "./recorder.js";
@@ -17,7 +18,8 @@ export type DatabaseArgs<
17
18
  DataSources extends readonly DataSourceDefinition[] = readonly DataSourceDefinition[],
18
19
  > = {
19
20
  resourceId: ResourceId;
20
- parent: Parent;
21
+ /** Omit to create a private top-level database in the Apps workspace. */
22
+ parent?: Parent;
21
23
  dataSources?: DataSources;
22
24
  // TODO: Port view types.
23
25
  views?: readonly unknown[];
@@ -69,13 +71,19 @@ export type DatabaseHandle<
69
71
  addView: (view: unknown) => void;
70
72
  };
71
73
 
72
- /** Declare a top-level database and its data sources. */
74
+ /** Declare a database, defaulting to a private top-level database in the Apps workspace. */
73
75
  export function database<const DataSources extends readonly DataSourceDefinition[]>(
74
76
  args: DatabaseArgs<DataSources>,
75
77
  ): DatabaseHandle<DataSources>;
76
78
  export function database(args: DatabaseArgs): DatabaseHandle {
77
- assertParent(args.parent);
78
- return createDatabase(args, args.parent);
79
+ if (args.parent) {
80
+ assertParent(args.parent);
81
+ }
82
+ const parent = args.parent ?? {
83
+ type: "resourceId",
84
+ resourceId: APPS_WORKSPACE_RESOURCE_ID,
85
+ };
86
+ return createDatabase(args, parent);
79
87
  }
80
88
 
81
89
  /** Record a database declaration and create handles for each of its data sources. */
@@ -107,10 +107,11 @@ export type TeamspaceIntent = TeamspaceArgs & {
107
107
  };
108
108
 
109
109
  export type DatabaseIntent = DatabaseArgs & {
110
+ parent: Parent;
110
111
  dataSources: readonly DataSourceDefinition[];
111
112
  };
112
113
 
113
- export type PageIntent = PageArgs;
114
+ export type PageIntent = PageArgs & { parent: Parent };
114
115
  export type CustomAgentIntent = CustomAgentArgs;
115
116
 
116
117
  export type ViewIntent = {
@@ -1,9 +1,9 @@
1
- import type {
2
- DataSourceDefinition,
3
- NotionAsCodeIcon,
4
- PageIntent,
5
- Parent,
6
- ResourceId,
1
+ import {
2
+ APPS_WORKSPACE_RESOURCE_ID,
3
+ type DataSourceDefinition,
4
+ type PageIntent,
5
+ type Parent,
6
+ type ResourceId,
7
7
  } from "./intents.js";
8
8
  import { database, type ChildDatabaseArgs, type DatabaseHandle } from "./database.js";
9
9
  import { recordIntent } from "./recorder.js";
@@ -11,8 +11,8 @@ import { assertParent, assertUserResourceId } from "./resource.js";
11
11
 
12
12
  export type PageArgs = {
13
13
  resourceId: ResourceId;
14
- parent: Parent;
15
- icon?: NotionAsCodeIcon;
14
+ /** Omit to create a private top-level page in the Apps workspace. */
15
+ parent?: Parent;
16
16
  // TODO: Port cover types.
17
17
  cover?: unknown;
18
18
  // TODO: Port page property types.
@@ -31,10 +31,16 @@ export type PageHandle = {
31
31
  addPage: (args: ChildPageArgs) => PageHandle;
32
32
  };
33
33
 
34
- /** Declare a top-level page. */
34
+ /** Declare a page, defaulting to a private top-level page in the Apps workspace. */
35
35
  export function page(args: PageArgs): PageHandle {
36
- assertParent(args.parent);
37
- return createPage(args, args.parent);
36
+ if (args.parent) {
37
+ assertParent(args.parent);
38
+ }
39
+ const parent = args.parent ?? {
40
+ type: "resourceId",
41
+ resourceId: APPS_WORKSPACE_RESOURCE_ID,
42
+ };
43
+ return createPage(args, parent);
38
44
  }
39
45
 
40
46
  /** Record a page declaration beneath its parent resource. */
@@ -0,0 +1,249 @@
1
+ // Generated by notion tool-core codegen-script-types --connections. Do not edit.
2
+ import type { ConnectionActionInvoker } from "./connection-actions.js"
3
+ /**
4
+ * Script input for the "Load Outlook message" effect (`outlook.loadMessage`),
5
+ * derived from its Tool Core definition's call_function input projection.
6
+ *
7
+ * Load an Outlook message.
8
+ */
9
+ export type LoadMessageScriptInput = {
10
+ /**
11
+ * Outlook message ID.
12
+ */
13
+ messageId: string
14
+ }
15
+
16
+ /**
17
+ * Canonical Tool Core output for the "Load Outlook message" effect (`outlook.loadMessage`).
18
+ * This is the definition's output schema; the effect's script surface may
19
+ * re-encode it before returning.
20
+ */
21
+ export type LoadMessageScriptOutput = {
22
+ type: "outlook"
23
+ threadId: string
24
+ subject: string
25
+ messages: Array<{
26
+ user: {
27
+ name: string
28
+ notionUserId?: string
29
+ notionUserName?: string
30
+ }
31
+ text: string
32
+ subject?: string
33
+ timestamp: number
34
+ attachments?: Array<{
35
+ attachmentId?: string
36
+ filename: string
37
+ mimeType: string
38
+ sizeBytes: number
39
+ inline: boolean
40
+ }>
41
+ }>
42
+ timestamp: number
43
+ }
44
+
45
+ /**
46
+ * Script input for the "Load Outlook thread" effect (`outlook.loadThread`),
47
+ * derived from its Tool Core definition's call_function input projection.
48
+ *
49
+ * Load an Outlook thread.
50
+ */
51
+ export type LoadThreadScriptInput = {
52
+ /**
53
+ * Outlook conversation (thread) ID.
54
+ */
55
+ threadId: string
56
+ /**
57
+ * Maximum number of messages to return (default: 50, max: 200).
58
+ */
59
+ maxResults?: number
60
+ }
61
+
62
+ /**
63
+ * Canonical Tool Core output for the "Load Outlook thread" effect (`outlook.loadThread`).
64
+ * This is the definition's output schema; the effect's script surface may
65
+ * re-encode it before returning.
66
+ */
67
+ export type LoadThreadScriptOutput = {
68
+ type: "outlook"
69
+ threadId: string
70
+ subject: string
71
+ messages: Array<{
72
+ user: {
73
+ name: string
74
+ notionUserId?: string
75
+ notionUserName?: string
76
+ }
77
+ text: string
78
+ subject?: string
79
+ timestamp: number
80
+ attachments?: Array<{
81
+ attachmentId?: string
82
+ filename: string
83
+ mimeType: string
84
+ sizeBytes: number
85
+ inline: boolean
86
+ }>
87
+ }>
88
+ timestamp: number
89
+ }
90
+
91
+ /**
92
+ * Script input for the "Query Outlook" effect (`outlook.query`),
93
+ * derived from its Tool Core definition's call_function input projection.
94
+ *
95
+ * Query Outlook messages.
96
+ */
97
+ export type QueryScriptInput = {
98
+ /**
99
+ * Outlook search query string. Supports keywords and AQS operators (from:, to:, subject:, received:).
100
+ */
101
+ q?: string
102
+ /**
103
+ * Maximum number of messages to return (default: 20, max: 100).
104
+ */
105
+ maxResults?: number
106
+ }
107
+
108
+ /**
109
+ * Canonical Tool Core output for the "Query Outlook" effect (`outlook.query`).
110
+ * This is the definition's output schema; the effect's script surface may
111
+ * re-encode it before returning.
112
+ */
113
+ export type QueryScriptOutput = {
114
+ messages: Array<{
115
+ type: "outlook"
116
+ threadId: string
117
+ subject: string
118
+ messages: Array<{
119
+ user: {
120
+ name: string
121
+ notionUserId?: string
122
+ notionUserName?: string
123
+ }
124
+ text: string
125
+ subject?: string
126
+ timestamp: number
127
+ attachments?: Array<{
128
+ attachmentId?: string
129
+ filename: string
130
+ mimeType: string
131
+ sizeBytes: number
132
+ inline: boolean
133
+ }>
134
+ }>
135
+ timestamp: number
136
+ }>
137
+ }
138
+
139
+ /**
140
+ * Script input for the "Read Outlook attachment" effect (`outlook.readAttachment`),
141
+ * derived from its Tool Core definition's call_function input projection.
142
+ *
143
+ * Read an Outlook attachment.
144
+ */
145
+ export type ReadAttachmentScriptInput = {
146
+ /**
147
+ * Outlook message ID from loadMessage or loadThread.
148
+ */
149
+ messageId: string
150
+ /**
151
+ * Optional attachment filename from loadMessage or loadThread. Useful as a fallback when an attachmentId is unavailable.
152
+ */
153
+ filename?: string
154
+ /**
155
+ * Optional Outlook attachment ID from loadMessage or loadThread. Use it when present to target a specific attachment.
156
+ */
157
+ attachmentId?: string
158
+ }
159
+
160
+ /**
161
+ * Canonical Tool Core output for the "Read Outlook attachment" effect (`outlook.readAttachment`).
162
+ * This is the definition's output schema; the effect's script surface may
163
+ * re-encode it before returning.
164
+ */
165
+ export type ReadAttachmentScriptOutput = {
166
+ type: "outlook"
167
+ items: Array<
168
+ | {
169
+ attachmentId?: string
170
+ filename: string
171
+ mimeType: string
172
+ sizeBytes: number
173
+ inline: boolean
174
+ contentType: "attachment"
175
+ message: string
176
+ }
177
+ | {
178
+ attachmentId?: string
179
+ filename: string
180
+ mimeType: string
181
+ sizeBytes: number
182
+ inline: boolean
183
+ contentType: "text"
184
+ text: string
185
+ }
186
+ | {
187
+ attachmentId?: string
188
+ filename: string
189
+ mimeType: string
190
+ sizeBytes: number
191
+ inline: boolean
192
+ contentType: "unsupported"
193
+ message: string
194
+ }
195
+ >
196
+ }
197
+
198
+ /**
199
+ * Script input for the "Search Outlook" effect (`outlook.search`),
200
+ * derived from its Tool Core definition's call_function input projection.
201
+ *
202
+ * Search Outlook via the configured connector.
203
+ */
204
+ export type SearchScriptInput = {
205
+ /**
206
+ * Search query for Outlook.
207
+ */
208
+ query: string
209
+ }
210
+
211
+ /**
212
+ * Canonical Tool Core output for the "Search Outlook" effect (`outlook.search`).
213
+ * This is the definition's output schema; the effect's script surface may
214
+ * re-encode it before returning.
215
+ */
216
+ export type SearchScriptOutput = {
217
+ results: Array<{
218
+ id: string
219
+ title: string
220
+ path: string
221
+ text: string
222
+ lastEdited: string
223
+ isPrivate: boolean
224
+ pageId: string
225
+ emailAddress: string
226
+ url: string
227
+ }>
228
+ }
229
+
230
+ export class OutlookConnectionClient {
231
+ constructor(private readonly invoke: ConnectionActionInvoker) {}
232
+ loadMessage(args: LoadMessageScriptInput): Promise<LoadMessageScriptOutput> {
233
+ return this.invoke<LoadMessageScriptOutput>("loadMessage", args)
234
+ }
235
+ loadThread(args: LoadThreadScriptInput): Promise<LoadThreadScriptOutput> {
236
+ return this.invoke<LoadThreadScriptOutput>("loadThread", args)
237
+ }
238
+ query(args: QueryScriptInput): Promise<QueryScriptOutput> {
239
+ return this.invoke<QueryScriptOutput>("query", args)
240
+ }
241
+ readAttachment(
242
+ args: ReadAttachmentScriptInput,
243
+ ): Promise<ReadAttachmentScriptOutput> {
244
+ return this.invoke<ReadAttachmentScriptOutput>("readAttachment", args)
245
+ }
246
+ search(args: SearchScriptInput): Promise<SearchScriptOutput> {
247
+ return this.invoke<SearchScriptOutput>("search", args)
248
+ }
249
+ }
@@ -0,0 +1,207 @@
1
+ // Generated by notion tool-core codegen-script-types --connections. Do not edit.
2
+ import type { ConnectionActionInvoker } from "./connection-actions.js"
3
+ import type { WorkflowConnection } from "./connections.js"
4
+ import { CalendarConnectionClient } from "./calendar.generated.js"
5
+ import { SlackConnectionClient } from "./slack.generated.js"
6
+ import { GoogleDriveOauthConnectionClient } from "./googleDriveOauth.generated.js"
7
+ import { DiscordConnectionClient } from "./discord.generated.js"
8
+ import { CursorConnectionClient } from "./cursor.generated.js"
9
+ import { BoxConnectionClient } from "./box.generated.js"
10
+ import { ConfluenceConnectionClient } from "./confluence.generated.js"
11
+ import { GmailConnectionClient } from "./gmail.generated.js"
12
+ import { GoogleCalendarConnectionClient } from "./googleCalendar.generated.js"
13
+ import { GoogleDriveConnectionClient } from "./googleDrive.generated.js"
14
+ import { OutlookConnectionClient } from "./outlook.generated.js"
15
+ import { SalesforceConnectionClient } from "./salesforce.generated.js"
16
+ export const connections = {
17
+ calendar,
18
+ slack,
19
+ googleDriveOauth,
20
+ discord,
21
+ cursor,
22
+ box,
23
+ confluence,
24
+ gmail,
25
+ googleCalendar,
26
+ googleDrive,
27
+ outlook,
28
+ salesforce,
29
+ }
30
+ export type ConnectionProviders = {
31
+ calendar(key?: string): CalendarConnectionClient
32
+ slack(key?: string): SlackConnectionClient
33
+ googleDriveOauth(key?: string): GoogleDriveOauthConnectionClient
34
+ discord(key?: string): DiscordConnectionClient
35
+ cursor(key?: string): CursorConnectionClient
36
+ box(key?: string): BoxConnectionClient
37
+ confluence(key?: string): ConfluenceConnectionClient
38
+ gmail(key?: string): GmailConnectionClient
39
+ googleCalendar(key?: string): GoogleCalendarConnectionClient
40
+ googleDrive(key?: string): GoogleDriveConnectionClient
41
+ outlook(key?: string): OutlookConnectionClient
42
+ salesforce(key?: string): SalesforceConnectionClient
43
+ }
44
+ export function createConnectionProviders(
45
+ invoker: (provider: string, key: string) => ConnectionActionInvoker,
46
+ ): ConnectionProviders {
47
+ return {
48
+ calendar(key = "calendar"): CalendarConnectionClient {
49
+ return new CalendarConnectionClient(invoker("calendar", key))
50
+ },
51
+ slack(key = "slack"): SlackConnectionClient {
52
+ return new SlackConnectionClient(invoker("slack", key))
53
+ },
54
+ googleDriveOauth(
55
+ key = "googleDriveOauth",
56
+ ): GoogleDriveOauthConnectionClient {
57
+ return new GoogleDriveOauthConnectionClient(
58
+ invoker("googleDriveOauth", key),
59
+ )
60
+ },
61
+ discord(key = "discord"): DiscordConnectionClient {
62
+ return new DiscordConnectionClient(invoker("discord", key))
63
+ },
64
+ cursor(key = "cursor"): CursorConnectionClient {
65
+ return new CursorConnectionClient(invoker("cursor", key))
66
+ },
67
+ box(key = "box"): BoxConnectionClient {
68
+ return new BoxConnectionClient(invoker("box", key))
69
+ },
70
+ confluence(key = "confluence"): ConfluenceConnectionClient {
71
+ return new ConfluenceConnectionClient(invoker("confluence", key))
72
+ },
73
+ gmail(key = "gmail"): GmailConnectionClient {
74
+ return new GmailConnectionClient(invoker("gmail", key))
75
+ },
76
+ googleCalendar(key = "googleCalendar"): GoogleCalendarConnectionClient {
77
+ return new GoogleCalendarConnectionClient(invoker("googleCalendar", key))
78
+ },
79
+ googleDrive(key = "googleDrive"): GoogleDriveConnectionClient {
80
+ return new GoogleDriveConnectionClient(invoker("googleDrive", key))
81
+ },
82
+ outlook(key = "outlook"): OutlookConnectionClient {
83
+ return new OutlookConnectionClient(invoker("outlook", key))
84
+ },
85
+ salesforce(key = "salesforce"): SalesforceConnectionClient {
86
+ return new SalesforceConnectionClient(invoker("salesforce", key))
87
+ },
88
+ }
89
+ }
90
+ function calendar(options?: {
91
+ key?: never
92
+ }): WorkflowConnection<"calendar", "calendar">
93
+ function calendar<const TKey extends string>(options: {
94
+ key: TKey
95
+ }): WorkflowConnection<"calendar", TKey>
96
+ function calendar(
97
+ options: { key?: string } = {},
98
+ ): WorkflowConnection<"calendar"> {
99
+ return { type: "calendar", ...options }
100
+ }
101
+ function slack(options?: { key?: never }): WorkflowConnection<"slack", "slack">
102
+ function slack<const TKey extends string>(options: {
103
+ key: TKey
104
+ }): WorkflowConnection<"slack", TKey>
105
+ function slack(options: { key?: string } = {}): WorkflowConnection<"slack"> {
106
+ return { type: "slack", ...options }
107
+ }
108
+ function googleDriveOauth(options?: {
109
+ key?: never
110
+ }): WorkflowConnection<"googleDriveOauth", "googleDriveOauth">
111
+ function googleDriveOauth<const TKey extends string>(options: {
112
+ key: TKey
113
+ }): WorkflowConnection<"googleDriveOauth", TKey>
114
+ function googleDriveOauth(
115
+ options: { key?: string } = {},
116
+ ): WorkflowConnection<"googleDriveOauth"> {
117
+ return { type: "googleDriveOauth", ...options }
118
+ }
119
+ function discord(options?: {
120
+ key?: never
121
+ }): WorkflowConnection<"discord", "discord">
122
+ function discord<const TKey extends string>(options: {
123
+ key: TKey
124
+ }): WorkflowConnection<"discord", TKey>
125
+ function discord(
126
+ options: { key?: string } = {},
127
+ ): WorkflowConnection<"discord"> {
128
+ return { type: "discord", ...options }
129
+ }
130
+ function cursor(options?: {
131
+ key?: never
132
+ }): WorkflowConnection<"cursor", "cursor">
133
+ function cursor<const TKey extends string>(options: {
134
+ key: TKey
135
+ }): WorkflowConnection<"cursor", TKey>
136
+ function cursor(options: { key?: string } = {}): WorkflowConnection<"cursor"> {
137
+ return { type: "cursor", ...options }
138
+ }
139
+ function box(options?: { key?: never }): WorkflowConnection<"box", "box">
140
+ function box<const TKey extends string>(options: {
141
+ key: TKey
142
+ }): WorkflowConnection<"box", TKey>
143
+ function box(options: { key?: string } = {}): WorkflowConnection<"box"> {
144
+ return { type: "box", ...options }
145
+ }
146
+ function confluence(options?: {
147
+ key?: never
148
+ }): WorkflowConnection<"confluence", "confluence">
149
+ function confluence<const TKey extends string>(options: {
150
+ key: TKey
151
+ }): WorkflowConnection<"confluence", TKey>
152
+ function confluence(
153
+ options: { key?: string } = {},
154
+ ): WorkflowConnection<"confluence"> {
155
+ return { type: "confluence", ...options }
156
+ }
157
+ function gmail(options?: { key?: never }): WorkflowConnection<"gmail", "gmail">
158
+ function gmail<const TKey extends string>(options: {
159
+ key: TKey
160
+ }): WorkflowConnection<"gmail", TKey>
161
+ function gmail(options: { key?: string } = {}): WorkflowConnection<"gmail"> {
162
+ return { type: "gmail", ...options }
163
+ }
164
+ function googleCalendar(options?: {
165
+ key?: never
166
+ }): WorkflowConnection<"googleCalendar", "googleCalendar">
167
+ function googleCalendar<const TKey extends string>(options: {
168
+ key: TKey
169
+ }): WorkflowConnection<"googleCalendar", TKey>
170
+ function googleCalendar(
171
+ options: { key?: string } = {},
172
+ ): WorkflowConnection<"googleCalendar"> {
173
+ return { type: "googleCalendar", ...options }
174
+ }
175
+ function googleDrive(options?: {
176
+ key?: never
177
+ }): WorkflowConnection<"googleDrive", "googleDrive">
178
+ function googleDrive<const TKey extends string>(options: {
179
+ key: TKey
180
+ }): WorkflowConnection<"googleDrive", TKey>
181
+ function googleDrive(
182
+ options: { key?: string } = {},
183
+ ): WorkflowConnection<"googleDrive"> {
184
+ return { type: "googleDrive", ...options }
185
+ }
186
+ function outlook(options?: {
187
+ key?: never
188
+ }): WorkflowConnection<"outlook", "outlook">
189
+ function outlook<const TKey extends string>(options: {
190
+ key: TKey
191
+ }): WorkflowConnection<"outlook", TKey>
192
+ function outlook(
193
+ options: { key?: string } = {},
194
+ ): WorkflowConnection<"outlook"> {
195
+ return { type: "outlook", ...options }
196
+ }
197
+ function salesforce(options?: {
198
+ key?: never
199
+ }): WorkflowConnection<"salesforce", "salesforce">
200
+ function salesforce<const TKey extends string>(options: {
201
+ key: TKey
202
+ }): WorkflowConnection<"salesforce", TKey>
203
+ function salesforce(
204
+ options: { key?: string } = {},
205
+ ): WorkflowConnection<"salesforce"> {
206
+ return { type: "salesforce", ...options }
207
+ }
package/src/react.ts ADDED
@@ -0,0 +1 @@
1
+ export * from "@notionhq/custom-blocks/react";