@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.
Files changed (89) hide show
  1. package/README.md +32 -28
  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.js +7 -6
  9. package/dist/confluence.generated.d.ts +98 -0
  10. package/dist/confluence.generated.d.ts.map +1 -0
  11. package/dist/confluence.generated.js +18 -0
  12. package/dist/connection-actions.d.ts +2 -0
  13. package/dist/connection-actions.d.ts.map +1 -0
  14. package/dist/connection-actions.js +0 -0
  15. package/dist/connection-trigger-definitions.generated.d.ts +34 -0
  16. package/dist/connection-trigger-definitions.generated.d.ts.map +1 -0
  17. package/dist/connection-trigger-definitions.generated.js +45 -0
  18. package/dist/connections.d.ts +15 -0
  19. package/dist/connections.d.ts.map +1 -0
  20. package/dist/connections.js +79 -0
  21. package/dist/connections.test.d.ts +2 -0
  22. package/dist/connections.test.d.ts.map +1 -0
  23. package/dist/cursor.generated.d.ts +154 -0
  24. package/dist/cursor.generated.d.ts.map +1 -0
  25. package/dist/cursor.generated.js +18 -0
  26. package/dist/discord.generated.d.ts +279 -0
  27. package/dist/discord.generated.d.ts.map +1 -0
  28. package/dist/discord.generated.js +33 -0
  29. package/dist/gmail.generated.d.ts +184 -0
  30. package/dist/gmail.generated.d.ts.map +1 -0
  31. package/dist/gmail.generated.js +21 -0
  32. package/dist/googleCalendar.generated.d.ts +83 -0
  33. package/dist/googleCalendar.generated.d.ts.map +1 -0
  34. package/dist/googleCalendar.generated.js +15 -0
  35. package/dist/googleDrive.generated.d.ts +210 -0
  36. package/dist/googleDrive.generated.d.ts.map +1 -0
  37. package/dist/googleDrive.generated.js +27 -0
  38. package/dist/googleDriveOauth.generated.d.ts +851 -0
  39. package/dist/googleDriveOauth.generated.d.ts.map +1 -0
  40. package/dist/googleDriveOauth.generated.js +84 -0
  41. package/dist/outlook.generated.d.ts +224 -0
  42. package/dist/outlook.generated.d.ts.map +1 -0
  43. package/dist/outlook.generated.js +24 -0
  44. package/dist/providers.generated.d.ts +117 -0
  45. package/dist/providers.generated.d.ts.map +1 -0
  46. package/dist/providers.generated.js +108 -0
  47. package/dist/salesforce.generated.d.ts +151 -0
  48. package/dist/salesforce.generated.d.ts.map +1 -0
  49. package/dist/salesforce.generated.js +24 -0
  50. package/dist/slack.generated.d.ts +290 -0
  51. package/dist/slack.generated.d.ts.map +1 -0
  52. package/dist/slack.generated.js +30 -0
  53. package/dist/triggers.generated.d.ts +107 -32
  54. package/dist/triggers.generated.d.ts.map +1 -1
  55. package/dist/triggers.generated.js +36 -24
  56. package/dist/workflow-connections-types.test.d.ts +2 -0
  57. package/dist/workflow-connections-types.test.d.ts.map +1 -0
  58. package/dist/workflow-types.test.d.ts +2 -0
  59. package/dist/workflow-types.test.d.ts.map +1 -0
  60. package/dist/workflow.d.ts +20 -16
  61. package/dist/workflow.d.ts.map +1 -1
  62. package/dist/workflow.js +14 -17
  63. package/docs/BUILD.md +83 -14
  64. package/docs/CONNECTIONS.md +129 -0
  65. package/package.json +1 -1
  66. package/src/box.generated.ts +187 -0
  67. package/src/calendar.generated.ts +1117 -0
  68. package/src/cli/build.test.ts +33 -0
  69. package/src/cli/build.ts +6 -5
  70. package/src/confluence.generated.ts +109 -0
  71. package/src/connection-actions.ts +2 -0
  72. package/src/connection-trigger-definitions.generated.ts +48 -0
  73. package/src/connections.test.ts +157 -0
  74. package/src/connections.ts +126 -0
  75. package/src/cursor.generated.ts +167 -0
  76. package/src/discord.generated.ts +318 -0
  77. package/src/gmail.generated.ts +205 -0
  78. package/src/googleCalendar.generated.ts +95 -0
  79. package/src/googleDrive.generated.ts +235 -0
  80. package/src/googleDriveOauth.generated.ts +980 -0
  81. package/src/outlook.generated.ts +249 -0
  82. package/src/providers.generated.ts +207 -0
  83. package/src/salesforce.generated.ts +170 -0
  84. package/src/slack.generated.ts +330 -0
  85. package/src/triggers.generated.ts +112 -32
  86. package/src/workflow-connections-types.test.ts +59 -0
  87. package/src/workflow-types.test.ts +144 -0
  88. package/src/workflow.test.ts +112 -2
  89. package/src/workflow.ts +58 -29
@@ -0,0 +1,151 @@
1
+ import type { ConnectionActionInvoker } from "./connection-actions.js";
2
+ /**
3
+ * Script input for the "Find Salesforce user IDs" effect (`salesforce.findUserIds`),
4
+ * derived from its Tool Core definition's call_function input projection.
5
+ *
6
+ * Find matching Salesforce users and their IDs.
7
+ */
8
+ export type FindUserIdsScriptInput = {
9
+ /**
10
+ * Partial name or email to match Salesforce users.
11
+ */
12
+ nameOrEmail: string;
13
+ };
14
+ /**
15
+ * Canonical Tool Core output for the "Find Salesforce user IDs" effect (`salesforce.findUserIds`).
16
+ * This is the definition's output schema; the effect's script surface may
17
+ * re-encode it before returning.
18
+ */
19
+ export type FindUserIdsScriptOutput = {
20
+ users?: Array<{
21
+ id: string;
22
+ name: string;
23
+ email: string;
24
+ }>;
25
+ };
26
+ /**
27
+ * Script input for the "Get Salesforce sample" effect (`salesforce.getSample`),
28
+ * derived from its Tool Core definition's call_function input projection.
29
+ *
30
+ * Get accessible Salesforce objects and sample records.
31
+ */
32
+ export type GetSampleScriptInput = {
33
+ /**
34
+ * Object API name to fetch sample records for.
35
+ */
36
+ targetObject?: string;
37
+ };
38
+ /**
39
+ * Canonical Tool Core output for the "Get Salesforce sample" effect (`salesforce.getSample`).
40
+ * This is the definition's output schema; the effect's script surface may
41
+ * re-encode it before returning.
42
+ */
43
+ export type GetSampleScriptOutput = {
44
+ objects: Array<string>;
45
+ sample?: {
46
+ object: string;
47
+ sampleRecords?: Array<{
48
+ Id?: string;
49
+ name?: string;
50
+ attributes?: Record<string, unknown>;
51
+ }>;
52
+ };
53
+ };
54
+ /**
55
+ * Script input for the "Load Salesforce record" effect (`salesforce.loadRecord`),
56
+ * derived from its Tool Core definition's call_function input projection.
57
+ *
58
+ * Load a Salesforce record.
59
+ */
60
+ export type LoadRecordScriptInput = {
61
+ /**
62
+ * Salesforce record ID (for example, 001xx000003DGbY).
63
+ */
64
+ recordId: string;
65
+ /**
66
+ * Salesforce object type for the record (for example, Account or Opportunity).
67
+ */
68
+ objectType: string;
69
+ };
70
+ /**
71
+ * Canonical Tool Core output for the "Load Salesforce record" effect (`salesforce.loadRecord`).
72
+ * This is the definition's output schema; the effect's script surface may
73
+ * re-encode it before returning.
74
+ */
75
+ export type LoadRecordScriptOutput = {
76
+ type: "salesforce-record";
77
+ title: string;
78
+ blocks: Array<string>;
79
+ recordId: string;
80
+ objectType: string;
81
+ };
82
+ /**
83
+ * Script input for the "Search Salesforce" effect (`salesforce.search`),
84
+ * derived from its Tool Core definition's call_function input projection.
85
+ *
86
+ * Search Salesforce via the configured connector.
87
+ */
88
+ export type SearchScriptInput = {
89
+ /**
90
+ * What to search for.
91
+ */
92
+ question: string;
93
+ /**
94
+ * Keywords to use instead of the question.
95
+ */
96
+ keywords?: string;
97
+ /**
98
+ * 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.
99
+ */
100
+ lookback?: string;
101
+ };
102
+ /**
103
+ * Canonical Tool Core output for the "Search Salesforce" effect (`salesforce.search`).
104
+ * This is the definition's output schema; the effect's script surface may
105
+ * re-encode it before returning.
106
+ */
107
+ export type SearchScriptOutput = {
108
+ results: Array<{
109
+ id: string;
110
+ title: string;
111
+ path: string;
112
+ text: string;
113
+ lastEdited: string;
114
+ isPrivate: boolean;
115
+ pageId: string;
116
+ objectType: string;
117
+ }>;
118
+ };
119
+ /**
120
+ * Script input for the "Query Salesforce" effect (`salesforce.soqlQuery`),
121
+ * derived from its Tool Core definition's call_function input projection.
122
+ *
123
+ * Run a SOQL query and return rows.
124
+ */
125
+ export type SoqlQueryScriptInput = {
126
+ /**
127
+ * SOQL query string. Only read-only SELECT queries are supported.
128
+ */
129
+ query: string;
130
+ };
131
+ /**
132
+ * Canonical Tool Core output for the "Query Salesforce" effect (`salesforce.soqlQuery`).
133
+ * This is the definition's output schema; the effect's script surface may
134
+ * re-encode it before returning.
135
+ */
136
+ export type SoqlQueryScriptOutput = {
137
+ results: Array<string>;
138
+ content: string;
139
+ query: string;
140
+ domain: string;
141
+ };
142
+ export declare class SalesforceConnectionClient {
143
+ private readonly invoke;
144
+ constructor(invoke: ConnectionActionInvoker);
145
+ findUserIds(args: FindUserIdsScriptInput): Promise<FindUserIdsScriptOutput>;
146
+ getSample(args: GetSampleScriptInput): Promise<GetSampleScriptOutput>;
147
+ loadRecord(args: LoadRecordScriptInput): Promise<LoadRecordScriptOutput>;
148
+ search(args: SearchScriptInput): Promise<SearchScriptOutput>;
149
+ soqlQuery(args: SoqlQueryScriptInput): Promise<SoqlQueryScriptOutput>;
150
+ }
151
+ //# sourceMappingURL=salesforce.generated.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"salesforce.generated.d.ts","sourceRoot":"","sources":["../src/salesforce.generated.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAA;AACtE;;;;;GAKG;AACH,MAAM,MAAM,sBAAsB,GAAG;IACpC;;OAEG;IACH,WAAW,EAAE,MAAM,CAAA;CACnB,CAAA;AAED;;;;GAIG;AACH,MAAM,MAAM,uBAAuB,GAAG;IACrC,KAAK,CAAC,EAAE,KAAK,CAAC;QACb,EAAE,EAAE,MAAM,CAAA;QACV,IAAI,EAAE,MAAM,CAAA;QACZ,KAAK,EAAE,MAAM,CAAA;KACb,CAAC,CAAA;CACF,CAAA;AAED;;;;;GAKG;AACH,MAAM,MAAM,oBAAoB,GAAG;IAClC;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAA;CACrB,CAAA;AAED;;;;GAIG;AACH,MAAM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CAAA;CACF,CAAA;AAED;;;;;GAKG;AACH,MAAM,MAAM,oBAAoB,GAAG;IAClC;;OAEG;IACH,KAAK,EAAE,MAAM,CAAA;CACb,CAAA;AAED;;;;GAIG;AACH,MAAM,MAAM,qBAAqB,GAAG;IACnC,OAAO,EAAE,KAAK,CAAC,MAAM,CAAC,CAAA;IACtB,OAAO,EAAE,MAAM,CAAA;IACf,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,MAAM,CAAA;CACd,CAAA;AAED,qBAAa,0BAA0B;IAC1B,OAAO,CAAC,QAAQ,CAAC,MAAM;gBAAN,MAAM,EAAE,uBAAuB;IAC5D,WAAW,CAAC,IAAI,EAAE,sBAAsB,GAAG,OAAO,CAAC,uBAAuB,CAAC;IAG3E,SAAS,CAAC,IAAI,EAAE,oBAAoB,GAAG,OAAO,CAAC,qBAAqB,CAAC;IAGrE,UAAU,CAAC,IAAI,EAAE,qBAAqB,GAAG,OAAO,CAAC,sBAAsB,CAAC;IAGxE,MAAM,CAAC,IAAI,EAAE,iBAAiB,GAAG,OAAO,CAAC,kBAAkB,CAAC;IAG5D,SAAS,CAAC,IAAI,EAAE,oBAAoB,GAAG,OAAO,CAAC,qBAAqB,CAAC;CAGrE"}
@@ -0,0 +1,24 @@
1
+ class SalesforceConnectionClient {
2
+ constructor(invoke) {
3
+ this.invoke = invoke;
4
+ }
5
+ invoke;
6
+ findUserIds(args) {
7
+ return this.invoke("findUserIds", args);
8
+ }
9
+ getSample(args) {
10
+ return this.invoke("getSample", args);
11
+ }
12
+ loadRecord(args) {
13
+ return this.invoke("loadRecord", args);
14
+ }
15
+ search(args) {
16
+ return this.invoke("search", args);
17
+ }
18
+ soqlQuery(args) {
19
+ return this.invoke("soqlQuery", args);
20
+ }
21
+ }
22
+ export {
23
+ SalesforceConnectionClient
24
+ };
@@ -0,0 +1,290 @@
1
+ import type { ConnectionActionInvoker } from "./connection-actions.js";
2
+ /**
3
+ * Script input for the "Find a Slack user by email" effect (`slack.findUserByEmail`),
4
+ * derived from its Tool Core definition's call_function input projection.
5
+ *
6
+ * Find a Slack user by email
7
+ */
8
+ export type FindUserByEmailScriptInput = {
9
+ email: string;
10
+ };
11
+ /**
12
+ * Script result of the "Find a Slack user by email" effect (`slack.findUserByEmail`):
13
+ * the canonical Tool Core output schema with the effect's declared
14
+ * script-output projection applied, exactly as the runtime encoder
15
+ * returns it.
16
+ */
17
+ export type FindUserByEmailScriptOutput = {
18
+ handle: string;
19
+ id: string;
20
+ uri: string;
21
+ displayName?: string;
22
+ email?: string;
23
+ notionUser?: string;
24
+ realName?: string;
25
+ statusEmoji?: string;
26
+ statusText?: string;
27
+ timeZone?: string;
28
+ title?: string;
29
+ } | undefined;
30
+ /**
31
+ * Script input for the "Get Slack channel threads" effect (`slack.getThreadsInChannelSince`),
32
+ * derived from its Tool Core definition's call_function input projection.
33
+ *
34
+ * Get all threads in a channel since a given timestamp
35
+ */
36
+ export type GetThreadsInChannelSinceScriptInput = {
37
+ /**
38
+ * The name of the channel without the # symbol. For example, "engineering".
39
+ */
40
+ channelName: string;
41
+ /**
42
+ * ISO 8601 timestamp, for example 2026-01-01T00:00:00Z.
43
+ */
44
+ timestamp: string;
45
+ };
46
+ /**
47
+ * Canonical Tool Core output for the "Get Slack channel threads" effect (`slack.getThreadsInChannelSince`).
48
+ * This is the definition's output schema; the effect's script surface may
49
+ * re-encode it before returning.
50
+ */
51
+ export type GetThreadsInChannelSinceScriptOutput = Array<Array<{
52
+ channelId: string;
53
+ channelUri: string;
54
+ from: {
55
+ handle: string;
56
+ id: string;
57
+ type: "user";
58
+ uri: string;
59
+ } | {
60
+ type: "bot";
61
+ };
62
+ id: string;
63
+ message: string;
64
+ threadId: string;
65
+ timestamp: string;
66
+ uri: string;
67
+ url: string;
68
+ urls: Array<string>;
69
+ channel?: string;
70
+ fileIds?: Array<string>;
71
+ files?: Array<string>;
72
+ }>>;
73
+ /**
74
+ * Script input for the "Load Slack message" effect (`slack.loadMessage`),
75
+ * derived from its Tool Core definition's call_function input projection.
76
+ *
77
+ * Load a Slack message by ID.
78
+ */
79
+ export type LoadMessageScriptInput = {
80
+ /**
81
+ * Slack channel ID for the message.
82
+ */
83
+ channelId: string;
84
+ /**
85
+ * Slack message timestamp (ts).
86
+ */
87
+ messageTs: string;
88
+ /**
89
+ * Slack thread timestamp (ts) if threaded.
90
+ */
91
+ threadTs?: string;
92
+ /**
93
+ * Slack workspace host parsed from the user's URL
94
+ */
95
+ workspaceHost?: string;
96
+ } | {
97
+ /**
98
+ * A Slack message identifier. Accepts a slackMessage:// URI as returned by other Slack tools (e.g. slackMessage://workspace.slack.com/C0123ABCDEF/12345/9876543210.987654), a https Slack archive URL, or a connector href from search results (slack://?base_url=...&channel_id=...&message_id=...).
99
+ */
100
+ url: string;
101
+ };
102
+ /**
103
+ * Canonical Tool Core output for the "Load Slack message" effect (`slack.loadMessage`).
104
+ * This is the definition's output schema; the effect's script surface may
105
+ * re-encode it before returning.
106
+ */
107
+ export type LoadMessageScriptOutput = {
108
+ type: "slack";
109
+ channel: string;
110
+ messages: Array<{
111
+ user: {
112
+ name: string;
113
+ notionUserName?: string;
114
+ notionUserId?: string;
115
+ };
116
+ text: string;
117
+ date?: string;
118
+ ts?: string;
119
+ attachments?: Array<string>;
120
+ files?: Array<string>;
121
+ }>;
122
+ timestamp: number;
123
+ additionalMessageToModel?: string;
124
+ };
125
+ /**
126
+ * Script input for the "Query Slack channels" effect (`slack.queryChannels`),
127
+ * derived from its Tool Core definition's call_function input projection.
128
+ *
129
+ * Query Slack channels by criteria
130
+ */
131
+ export type QueryChannelsScriptInput = {
132
+ id?: string;
133
+ name?: string;
134
+ /**
135
+ * Filter channels created after this date. ISO format with timezone (e.g. 2024-01-01T00:00:00-05:00 for Eastern Time)
136
+ */
137
+ createdStart?: string;
138
+ /**
139
+ * Filter channels created before this date. ISO format with timezone (e.g. 2024-01-01T00:00:00-05:00 for Eastern Time)
140
+ */
141
+ createdEnd?: string;
142
+ isGeneral?: boolean;
143
+ isIm?: boolean;
144
+ isPrivate?: boolean;
145
+ isMpim?: boolean;
146
+ isShared?: boolean;
147
+ isOrgShared?: boolean;
148
+ botIsMember?: boolean;
149
+ isArchived?: boolean;
150
+ };
151
+ /**
152
+ * Canonical Tool Core output for the "Query Slack channels" effect (`slack.queryChannels`).
153
+ * This is the definition's output schema; the effect's script surface may
154
+ * re-encode it before returning.
155
+ */
156
+ export type QueryChannelsScriptOutput = Array<{
157
+ /**
158
+ * The Slack channel ID.
159
+ */
160
+ id: string;
161
+ /**
162
+ * The prefixed channel URI.
163
+ */
164
+ uri: string;
165
+ /**
166
+ * The user-navigable channel URL. Include this link when telling the user the channel was created.
167
+ */
168
+ url: string;
169
+ /**
170
+ * The channel name, without a "#" prefix.
171
+ */
172
+ name: string;
173
+ /**
174
+ * ISO 8601 timestamp of when the channel was created.
175
+ */
176
+ created: string;
177
+ /**
178
+ * Whether this is the workspace's general channel.
179
+ */
180
+ isGeneral: boolean;
181
+ /**
182
+ * Whether this is a direct message channel.
183
+ */
184
+ isIm: boolean;
185
+ /**
186
+ * Whether the channel is private.
187
+ */
188
+ isPrivate: boolean;
189
+ /**
190
+ * Whether this is a group direct message channel.
191
+ */
192
+ isMpim: boolean;
193
+ /**
194
+ * Whether the channel is shared between Slack workspaces.
195
+ */
196
+ isShared: boolean;
197
+ /**
198
+ * Whether the channel is shared across an Enterprise Grid organization.
199
+ */
200
+ isOrgShared: boolean;
201
+ /**
202
+ * Whether the integration bot user is in the channel.
203
+ */
204
+ botIsMember: boolean;
205
+ /**
206
+ * Whether the channel is archived.
207
+ */
208
+ isArchived: boolean;
209
+ }>;
210
+ /**
211
+ * Script input for the "Search Slack messages" effect (`slack.search`),
212
+ * derived from its Tool Core definition's call_function input projection.
213
+ *
214
+ * Search Slack via the configured connector.
215
+ */
216
+ export type SearchScriptInput = {
217
+ /**
218
+ * A single, focused question to search for.
219
+ */
220
+ question: string;
221
+ /**
222
+ * Brief keywords capturing the core entities.
223
+ */
224
+ keywords?: string;
225
+ /**
226
+ * 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.
227
+ */
228
+ lookback?: string;
229
+ options?: {
230
+ /**
231
+ * Preferred Slack channel name. This boosts results from that channel but does not filter the search. Results from other conversations may be returned. Check each result's conversation before using it.
232
+ */
233
+ channel?: string;
234
+ };
235
+ };
236
+ /**
237
+ * Canonical Tool Core output for the "Search Slack messages" effect (`slack.search`).
238
+ * This is the definition's output schema; the effect's script surface may
239
+ * re-encode it before returning.
240
+ */
241
+ export type SearchScriptOutput = {
242
+ results: Array<{
243
+ conversation: {
244
+ id: string;
245
+ kind: "channel" | "dm" | "groupDm";
246
+ name: string;
247
+ };
248
+ messageUrl: string;
249
+ lastEdited: string;
250
+ messages: Array<{
251
+ messageUrl: string;
252
+ lastEdited: string;
253
+ text: string;
254
+ user: string;
255
+ }>;
256
+ }>;
257
+ };
258
+ /**
259
+ * Script input for the "View Slack file URL" effect (`slack.viewFileUrl`),
260
+ * derived from its Tool Core definition's call_function input projection.
261
+ *
262
+ * Return a Slack file URL for script-agent viewing.
263
+ */
264
+ export type ViewFileUrlScriptInput = {
265
+ /**
266
+ * Slack private file URL or workspace file permalink to download and attach for viewing.
267
+ */
268
+ url: string;
269
+ };
270
+ /**
271
+ * Canonical Tool Core output for the "View Slack file URL" effect (`slack.viewFileUrl`).
272
+ * This is the definition's output schema; the effect's script surface may
273
+ * re-encode it before returning.
274
+ */
275
+ export type ViewFileUrlScriptOutput = {
276
+ url: string;
277
+ fileName?: string;
278
+ fileUrl?: string;
279
+ };
280
+ export declare class SlackConnectionClient {
281
+ private readonly invoke;
282
+ constructor(invoke: ConnectionActionInvoker);
283
+ findUserByEmail(args: FindUserByEmailScriptInput): Promise<FindUserByEmailScriptOutput>;
284
+ getThreadsInChannelSince(args: GetThreadsInChannelSinceScriptInput): Promise<GetThreadsInChannelSinceScriptOutput>;
285
+ loadMessage(args: LoadMessageScriptInput): Promise<LoadMessageScriptOutput>;
286
+ queryChannels(args: QueryChannelsScriptInput): Promise<QueryChannelsScriptOutput>;
287
+ search(args: SearchScriptInput): Promise<SearchScriptOutput>;
288
+ viewFileUrl(args: ViewFileUrlScriptInput): Promise<ViewFileUrlScriptOutput>;
289
+ }
290
+ //# sourceMappingURL=slack.generated.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"slack.generated.d.ts","sourceRoot":"","sources":["../src/slack.generated.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAA;AACtE;;;;;GAKG;AACH,MAAM,MAAM,0BAA0B,GAAG;IACxC,KAAK,EAAE,MAAM,CAAA;CACb,CAAA;AAED;;;;;GAKG;AACH,MAAM,MAAM,2BAA2B,GACpC;IACA,MAAM,EAAE,MAAM,CAAA;IACd,EAAE,EAAE,MAAM,CAAA;IACV,GAAG,EAAE,MAAM,CAAA;IACX,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,KAAK,CAAC,EAAE,MAAM,CAAA;CACb,GACD,SAAS,CAAA;AAEZ;;;;;GAKG;AACH,MAAM,MAAM,mCAAmC,GAAG;IACjD;;OAEG;IACH,WAAW,EAAE,MAAM,CAAA;IACnB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAA;CACjB,CAAA;AAED;;;;GAIG;AACH,MAAM,MAAM,oCAAoC,GAAG,KAAK,CACvD,KAAK,CAAC;IACL,SAAS,EAAE,MAAM,CAAA;IACjB,UAAU,EAAE,MAAM,CAAA;IAClB,IAAI,EACD;QACA,MAAM,EAA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AC,2BAA2B,CAAC;IAGvC,wBAAwB,CACvB,IAAI,EAAE,mCAAmC,GACvC,OAAO,CAAC,oCAAoC,CAAC;IAMhD,WAAW,CAAC,IAAI,EAAE,sBAAsB,GAAG,OAAO,CAAC,uBAAuB,CAAC;IAG3E,aAAa,CACZ,IAAI,EAAE,wBAAwB,GAC5B,OAAO,CAAC,yBAAyB,CAAC;IAGrC,MAAM,CAAC,IAAI,EAAE,iBAAiB,GAAG,OAAO,CAAC,kBAAkB,CAAC;IAG5D,WAAW,CAAC,IAAI,EAAE,sBAAsB,GAAG,OAAO,CAAC,uBAAuB,CAAC;CAG3E"}
@@ -0,0 +1,30 @@
1
+ class SlackConnectionClient {
2
+ constructor(invoke) {
3
+ this.invoke = invoke;
4
+ }
5
+ invoke;
6
+ findUserByEmail(args) {
7
+ return this.invoke("findUserByEmail", args);
8
+ }
9
+ getThreadsInChannelSince(args) {
10
+ return this.invoke(
11
+ "getThreadsInChannelSince",
12
+ args
13
+ );
14
+ }
15
+ loadMessage(args) {
16
+ return this.invoke("loadMessage", args);
17
+ }
18
+ queryChannels(args) {
19
+ return this.invoke("queryChannels", args);
20
+ }
21
+ search(args) {
22
+ return this.invoke("search", args);
23
+ }
24
+ viewFileUrl(args) {
25
+ return this.invoke("viewFileUrl", args);
26
+ }
27
+ }
28
+ export {
29
+ SlackConnectionClient
30
+ };