@automate.ax/integration-contracts 0.95.4 → 0.96.0
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/close/schemas.d.ts +1 -1
- package/dist/close/schemas.js +1 -1
- package/dist/slack/event-schemas.d.ts +42126 -0
- package/dist/slack/event-schemas.js +714 -0
- package/dist/slack/index.d.ts +22401 -25
- package/dist/slack/index.js +78 -5
- package/dist/slack/schemas.d.ts +85 -291
- package/dist/slack/schemas.js +68 -185
- package/package.json +2 -2
- package/src/close/schemas.ts +1 -1
- package/src/slack/event-schemas.ts +792 -0
- package/src/slack/index.ts +100 -8
- package/src/slack/schemas.ts +71 -216
package/dist/slack/index.js
CHANGED
|
@@ -1,22 +1,95 @@
|
|
|
1
1
|
import * as z from "zod";
|
|
2
|
-
import {
|
|
2
|
+
import { SLACK_APP_MENTION_CALLBACK_EVENT_SCHEMA, SLACK_CHANNEL_CREATED_EVENT_SCHEMA, SLACK_CHANNEL_MEMBER_JOINED_EVENT_SCHEMA, SLACK_CHANNEL_MEMBER_LEFT_EVENT_SCHEMA, SLACK_CHANNEL_RENAMED_EVENT_SCHEMA, SLACK_CHANNEL_SHARED_EVENT_SCHEMA, SLACK_CHANNEL_UNSHARED_EVENT_SCHEMA, SLACK_EVENT_SCHEMA, SLACK_FILE_CREATED_EVENT_SCHEMA, SLACK_FILE_DELETED_EVENT_SCHEMA, SLACK_FILE_SHARED_EVENT_SCHEMA, SLACK_MESSAGE_CHANGED_EVENT_SCHEMA, SLACK_MESSAGE_DELETED_EVENT_SCHEMA, SLACK_MESSAGE_POSTED_CALLBACK_EVENT_SCHEMA, SLACK_PIN_ADDED_EVENT_SCHEMA, SLACK_PIN_REMOVED_EVENT_SCHEMA, SLACK_REACTION_ADDED_CALLBACK_EVENT_SCHEMA, SLACK_REACTION_CALLBACK_EVENT_SCHEMA, SLACK_REACTION_REMOVED_CALLBACK_EVENT_SCHEMA, SLACK_THREAD_REPLY_POSTED_EVENT_SCHEMA, SLACK_WORKSPACE_MEMBER_CHANGED_EVENT_SCHEMA, SLACK_WORKSPACE_MEMBER_JOINED_EVENT_SCHEMA, } from "./event-schemas.js";
|
|
3
|
+
export * from "./event-schemas.js";
|
|
3
4
|
export * from "./schemas.js";
|
|
4
5
|
export const SLACK_TRIGGER_CONFIG_SCHEMA = z.object({});
|
|
5
6
|
export const slackTriggerContracts = {
|
|
6
7
|
"slack.app.mentioned": {
|
|
7
8
|
configSchema: SLACK_TRIGGER_CONFIG_SCHEMA,
|
|
8
|
-
eventSchema:
|
|
9
|
+
eventSchema: SLACK_APP_MENTION_CALLBACK_EVENT_SCHEMA,
|
|
10
|
+
},
|
|
11
|
+
"slack.channel.created": {
|
|
12
|
+
configSchema: SLACK_TRIGGER_CONFIG_SCHEMA,
|
|
13
|
+
eventSchema: SLACK_CHANNEL_CREATED_EVENT_SCHEMA,
|
|
14
|
+
},
|
|
15
|
+
"slack.channel.member.joined": {
|
|
16
|
+
configSchema: SLACK_TRIGGER_CONFIG_SCHEMA,
|
|
17
|
+
eventSchema: SLACK_CHANNEL_MEMBER_JOINED_EVENT_SCHEMA,
|
|
18
|
+
},
|
|
19
|
+
"slack.channel.member.left": {
|
|
20
|
+
configSchema: SLACK_TRIGGER_CONFIG_SCHEMA,
|
|
21
|
+
eventSchema: SLACK_CHANNEL_MEMBER_LEFT_EVENT_SCHEMA,
|
|
22
|
+
},
|
|
23
|
+
"slack.channel.renamed": {
|
|
24
|
+
configSchema: SLACK_TRIGGER_CONFIG_SCHEMA,
|
|
25
|
+
eventSchema: SLACK_CHANNEL_RENAMED_EVENT_SCHEMA,
|
|
26
|
+
},
|
|
27
|
+
"slack.channel.shared": {
|
|
28
|
+
configSchema: SLACK_TRIGGER_CONFIG_SCHEMA,
|
|
29
|
+
eventSchema: SLACK_CHANNEL_SHARED_EVENT_SCHEMA,
|
|
30
|
+
},
|
|
31
|
+
"slack.channel.unshared": {
|
|
32
|
+
configSchema: SLACK_TRIGGER_CONFIG_SCHEMA,
|
|
33
|
+
eventSchema: SLACK_CHANNEL_UNSHARED_EVENT_SCHEMA,
|
|
34
|
+
},
|
|
35
|
+
"slack.event.received": {
|
|
36
|
+
configSchema: SLACK_TRIGGER_CONFIG_SCHEMA,
|
|
37
|
+
eventSchema: SLACK_EVENT_SCHEMA,
|
|
38
|
+
},
|
|
39
|
+
"slack.file.created": {
|
|
40
|
+
configSchema: SLACK_TRIGGER_CONFIG_SCHEMA,
|
|
41
|
+
eventSchema: SLACK_FILE_CREATED_EVENT_SCHEMA,
|
|
42
|
+
},
|
|
43
|
+
"slack.file.deleted": {
|
|
44
|
+
configSchema: SLACK_TRIGGER_CONFIG_SCHEMA,
|
|
45
|
+
eventSchema: SLACK_FILE_DELETED_EVENT_SCHEMA,
|
|
46
|
+
},
|
|
47
|
+
"slack.file.shared": {
|
|
48
|
+
configSchema: SLACK_TRIGGER_CONFIG_SCHEMA,
|
|
49
|
+
eventSchema: SLACK_FILE_SHARED_EVENT_SCHEMA,
|
|
50
|
+
},
|
|
51
|
+
"slack.message.changed": {
|
|
52
|
+
configSchema: SLACK_TRIGGER_CONFIG_SCHEMA,
|
|
53
|
+
eventSchema: SLACK_MESSAGE_CHANGED_EVENT_SCHEMA,
|
|
54
|
+
},
|
|
55
|
+
"slack.message.deleted": {
|
|
56
|
+
configSchema: SLACK_TRIGGER_CONFIG_SCHEMA,
|
|
57
|
+
eventSchema: SLACK_MESSAGE_DELETED_EVENT_SCHEMA,
|
|
9
58
|
},
|
|
10
59
|
"slack.message.posted": {
|
|
11
60
|
configSchema: SLACK_TRIGGER_CONFIG_SCHEMA,
|
|
12
|
-
eventSchema:
|
|
61
|
+
eventSchema: SLACK_MESSAGE_POSTED_CALLBACK_EVENT_SCHEMA,
|
|
62
|
+
},
|
|
63
|
+
"slack.pin.added": {
|
|
64
|
+
configSchema: SLACK_TRIGGER_CONFIG_SCHEMA,
|
|
65
|
+
eventSchema: SLACK_PIN_ADDED_EVENT_SCHEMA,
|
|
66
|
+
},
|
|
67
|
+
"slack.pin.removed": {
|
|
68
|
+
configSchema: SLACK_TRIGGER_CONFIG_SCHEMA,
|
|
69
|
+
eventSchema: SLACK_PIN_REMOVED_EVENT_SCHEMA,
|
|
13
70
|
},
|
|
14
71
|
"slack.reaction.added": {
|
|
15
72
|
configSchema: SLACK_TRIGGER_CONFIG_SCHEMA,
|
|
16
|
-
eventSchema:
|
|
73
|
+
eventSchema: SLACK_REACTION_ADDED_CALLBACK_EVENT_SCHEMA,
|
|
74
|
+
},
|
|
75
|
+
"slack.reaction.event": {
|
|
76
|
+
configSchema: SLACK_TRIGGER_CONFIG_SCHEMA,
|
|
77
|
+
eventSchema: SLACK_REACTION_CALLBACK_EVENT_SCHEMA,
|
|
17
78
|
},
|
|
18
79
|
"slack.reaction.removed": {
|
|
19
80
|
configSchema: SLACK_TRIGGER_CONFIG_SCHEMA,
|
|
20
|
-
eventSchema:
|
|
81
|
+
eventSchema: SLACK_REACTION_REMOVED_CALLBACK_EVENT_SCHEMA,
|
|
82
|
+
},
|
|
83
|
+
"slack.thread.reply.posted": {
|
|
84
|
+
configSchema: SLACK_TRIGGER_CONFIG_SCHEMA,
|
|
85
|
+
eventSchema: SLACK_THREAD_REPLY_POSTED_EVENT_SCHEMA,
|
|
86
|
+
},
|
|
87
|
+
"slack.workspace.member.changed": {
|
|
88
|
+
configSchema: SLACK_TRIGGER_CONFIG_SCHEMA,
|
|
89
|
+
eventSchema: SLACK_WORKSPACE_MEMBER_CHANGED_EVENT_SCHEMA,
|
|
90
|
+
},
|
|
91
|
+
"slack.workspace.member.joined": {
|
|
92
|
+
configSchema: SLACK_TRIGGER_CONFIG_SCHEMA,
|
|
93
|
+
eventSchema: SLACK_WORKSPACE_MEMBER_JOINED_EVENT_SCHEMA,
|
|
21
94
|
},
|
|
22
95
|
};
|
package/dist/slack/schemas.d.ts
CHANGED
|
@@ -100,7 +100,7 @@ export declare const SLACK_MESSAGE_SCHEMA: z.ZodObject<{
|
|
|
100
100
|
}, z.core.$strip>>>;
|
|
101
101
|
replyCount: z.ZodOptional<z.ZodNumber>;
|
|
102
102
|
subtype: z.ZodOptional<z.ZodString>;
|
|
103
|
-
text: z.ZodString
|
|
103
|
+
text: z.ZodOptional<z.ZodString>;
|
|
104
104
|
threadTimestamp: z.ZodOptional<z.ZodString>;
|
|
105
105
|
timestamp: z.ZodString;
|
|
106
106
|
type: z.ZodString;
|
|
@@ -108,7 +108,12 @@ export declare const SLACK_MESSAGE_SCHEMA: z.ZodObject<{
|
|
|
108
108
|
}, z.core.$strip>;
|
|
109
109
|
export declare const SLACK_REACTION_ITEM_SCHEMA: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
110
110
|
conversationId: z.ZodString;
|
|
111
|
-
conversationType: z.ZodOptional<z.
|
|
111
|
+
conversationType: z.ZodOptional<z.ZodEnum<{
|
|
112
|
+
group: "group";
|
|
113
|
+
channel: "channel";
|
|
114
|
+
im: "im";
|
|
115
|
+
mpim: "mpim";
|
|
116
|
+
}>>;
|
|
112
117
|
messageTimestamp: z.ZodString;
|
|
113
118
|
type: z.ZodLiteral<"message">;
|
|
114
119
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -119,33 +124,13 @@ export declare const SLACK_REACTION_ITEM_SCHEMA: z.ZodDiscriminatedUnion<[z.ZodO
|
|
|
119
124
|
fileCommentId: z.ZodString;
|
|
120
125
|
type: z.ZodLiteral<"fileComment">;
|
|
121
126
|
}, z.core.$strip>], "type">;
|
|
122
|
-
export declare const SLACK_REACTION_EVENT_SCHEMA: z.ZodObject<{
|
|
123
|
-
eventTimestamp: z.ZodString;
|
|
124
|
-
item: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
125
|
-
conversationId: z.ZodString;
|
|
126
|
-
conversationType: z.ZodOptional<z.ZodString>;
|
|
127
|
-
messageTimestamp: z.ZodString;
|
|
128
|
-
type: z.ZodLiteral<"message">;
|
|
129
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
130
|
-
fileId: z.ZodString;
|
|
131
|
-
type: z.ZodLiteral<"file">;
|
|
132
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
133
|
-
fileId: z.ZodString;
|
|
134
|
-
fileCommentId: z.ZodString;
|
|
135
|
-
type: z.ZodLiteral<"fileComment">;
|
|
136
|
-
}, z.core.$strip>], "type">;
|
|
137
|
-
itemUserId: z.ZodOptional<z.ZodString>;
|
|
138
|
-
reaction: z.ZodString;
|
|
139
|
-
userId: z.ZodString;
|
|
140
|
-
workspaceId: z.ZodString;
|
|
141
|
-
}, z.core.$strip>;
|
|
142
127
|
export declare const SLACK_FILE_SCHEMA: z.ZodObject<{
|
|
143
128
|
channelIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
144
129
|
createdAt: z.ZodOptional<z.ZodNumber>;
|
|
145
130
|
fileType: z.ZodOptional<z.ZodString>;
|
|
146
131
|
id: z.ZodString;
|
|
147
132
|
mimeType: z.ZodOptional<z.ZodString>;
|
|
148
|
-
name: z.ZodOptional<z.ZodString
|
|
133
|
+
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
149
134
|
permalink: z.ZodOptional<z.ZodString>;
|
|
150
135
|
size: z.ZodOptional<z.ZodNumber>;
|
|
151
136
|
title: z.ZodOptional<z.ZodString>;
|
|
@@ -207,51 +192,81 @@ export declare const SLACK_PROVIDER_CONVERSATION_SCHEMA: z.ZodObject<{
|
|
|
207
192
|
user: z.ZodOptional<z.ZodString>;
|
|
208
193
|
}, z.core.$loose>;
|
|
209
194
|
export declare const SLACK_PROVIDER_MEMBER_PROFILE_SCHEMA: z.ZodObject<{
|
|
210
|
-
display_name: z.ZodOptional<z.ZodString
|
|
211
|
-
email: z.ZodOptional<z.ZodString
|
|
212
|
-
first_name: z.ZodOptional<z.ZodString
|
|
213
|
-
image_192: z.ZodOptional<z.ZodString
|
|
214
|
-
image_512: z.ZodOptional<z.ZodString
|
|
215
|
-
image_72: z.ZodOptional<z.ZodString
|
|
216
|
-
last_name: z.ZodOptional<z.ZodString
|
|
217
|
-
pronouns: z.ZodOptional<z.ZodString
|
|
218
|
-
real_name: z.ZodOptional<z.ZodString
|
|
219
|
-
status_emoji: z.ZodOptional<z.ZodString
|
|
220
|
-
status_expiration: z.ZodOptional<z.ZodNumber
|
|
221
|
-
status_text: z.ZodOptional<z.ZodString
|
|
222
|
-
title: z.ZodOptional<z.ZodString
|
|
223
|
-
}, z.core.$
|
|
195
|
+
display_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
196
|
+
email: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
197
|
+
first_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
198
|
+
image_192: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
199
|
+
image_512: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
200
|
+
image_72: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
201
|
+
last_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
202
|
+
pronouns: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
203
|
+
real_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
204
|
+
status_emoji: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
205
|
+
status_expiration: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
206
|
+
status_text: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
207
|
+
title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
208
|
+
}, z.core.$catchall<z.ZodJSONSchema>>;
|
|
224
209
|
export declare const SLACK_PROVIDER_MEMBER_SCHEMA: z.ZodObject<{
|
|
225
|
-
deleted: z.ZodOptional<z.ZodBoolean
|
|
210
|
+
deleted: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
226
211
|
id: z.ZodString;
|
|
227
|
-
is_admin: z.ZodOptional<z.ZodBoolean
|
|
228
|
-
is_app_user: z.ZodOptional<z.ZodBoolean
|
|
229
|
-
is_bot: z.ZodOptional<z.ZodBoolean
|
|
230
|
-
is_owner: z.ZodOptional<z.ZodBoolean
|
|
231
|
-
is_restricted: z.ZodOptional<z.ZodBoolean
|
|
232
|
-
is_ultra_restricted: z.ZodOptional<z.ZodBoolean
|
|
233
|
-
name: z.ZodOptional<z.ZodString
|
|
234
|
-
profile: z.
|
|
235
|
-
display_name: z.ZodOptional<z.ZodString
|
|
236
|
-
email: z.ZodOptional<z.ZodString
|
|
237
|
-
first_name: z.ZodOptional<z.ZodString
|
|
238
|
-
image_192: z.ZodOptional<z.ZodString
|
|
239
|
-
image_512: z.ZodOptional<z.ZodString
|
|
240
|
-
image_72: z.ZodOptional<z.ZodString
|
|
241
|
-
last_name: z.ZodOptional<z.ZodString
|
|
242
|
-
pronouns: z.ZodOptional<z.ZodString
|
|
243
|
-
real_name: z.ZodOptional<z.ZodString
|
|
244
|
-
status_emoji: z.ZodOptional<z.ZodString
|
|
245
|
-
status_expiration: z.ZodOptional<z.ZodNumber
|
|
246
|
-
status_text: z.ZodOptional<z.ZodString
|
|
247
|
-
title: z.ZodOptional<z.ZodString
|
|
248
|
-
}, z.core.$
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
212
|
+
is_admin: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
213
|
+
is_app_user: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
214
|
+
is_bot: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
215
|
+
is_owner: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
216
|
+
is_restricted: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
217
|
+
is_ultra_restricted: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
218
|
+
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
219
|
+
profile: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
220
|
+
display_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
221
|
+
email: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
222
|
+
first_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
223
|
+
image_192: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
224
|
+
image_512: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
225
|
+
image_72: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
226
|
+
last_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
227
|
+
pronouns: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
228
|
+
real_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
229
|
+
status_emoji: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
230
|
+
status_expiration: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
231
|
+
status_text: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
232
|
+
title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
233
|
+
}, z.core.$catchall<z.ZodJSONSchema>>>>, z.ZodTransform<{
|
|
234
|
+
[x: string]: z.core.util.JSONType;
|
|
235
|
+
display_name?: string | null | undefined;
|
|
236
|
+
email?: string | null | undefined;
|
|
237
|
+
first_name?: string | null | undefined;
|
|
238
|
+
image_192?: string | null | undefined;
|
|
239
|
+
image_512?: string | null | undefined;
|
|
240
|
+
image_72?: string | null | undefined;
|
|
241
|
+
last_name?: string | null | undefined;
|
|
242
|
+
pronouns?: string | null | undefined;
|
|
243
|
+
real_name?: string | null | undefined;
|
|
244
|
+
status_emoji?: string | null | undefined;
|
|
245
|
+
status_expiration?: number | null | undefined;
|
|
246
|
+
status_text?: string | null | undefined;
|
|
247
|
+
title?: string | null | undefined;
|
|
248
|
+
}, {
|
|
249
|
+
[x: string]: z.core.util.JSONType;
|
|
250
|
+
display_name?: string | null | undefined;
|
|
251
|
+
email?: string | null | undefined;
|
|
252
|
+
first_name?: string | null | undefined;
|
|
253
|
+
image_192?: string | null | undefined;
|
|
254
|
+
image_512?: string | null | undefined;
|
|
255
|
+
image_72?: string | null | undefined;
|
|
256
|
+
last_name?: string | null | undefined;
|
|
257
|
+
pronouns?: string | null | undefined;
|
|
258
|
+
real_name?: string | null | undefined;
|
|
259
|
+
status_emoji?: string | null | undefined;
|
|
260
|
+
status_expiration?: number | null | undefined;
|
|
261
|
+
status_text?: string | null | undefined;
|
|
262
|
+
title?: string | null | undefined;
|
|
263
|
+
} | null | undefined>>;
|
|
264
|
+
team_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
265
|
+
tz: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
266
|
+
tz_label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
267
|
+
tz_offset: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
268
|
+
updated: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
269
|
+
}, z.core.$catchall<z.ZodJSONSchema>>;
|
|
255
270
|
export declare const SLACK_PROVIDER_REACTION_SCHEMA: z.ZodObject<{
|
|
256
271
|
count: z.ZodNumber;
|
|
257
272
|
name: z.ZodString;
|
|
@@ -271,160 +286,19 @@ export declare const SLACK_PROVIDER_MESSAGE_SCHEMA: z.ZodObject<{
|
|
|
271
286
|
}, z.core.$strip>>>;
|
|
272
287
|
reply_count: z.ZodOptional<z.ZodNumber>;
|
|
273
288
|
subtype: z.ZodOptional<z.ZodString>;
|
|
274
|
-
text: z.
|
|
289
|
+
text: z.ZodOptional<z.ZodString>;
|
|
275
290
|
thread_ts: z.ZodOptional<z.ZodString>;
|
|
276
291
|
ts: z.ZodString;
|
|
277
292
|
type: z.ZodPrefault<z.ZodString>;
|
|
278
293
|
user: z.ZodOptional<z.ZodString>;
|
|
279
294
|
}, z.core.$catchall<z.ZodJSONSchema>>;
|
|
280
|
-
export declare const SLACK_MESSAGE_EVENT_SCHEMA: z.ZodObject<{
|
|
281
|
-
appId: z.ZodOptional<z.ZodString>;
|
|
282
|
-
attachments: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodJSONSchema>>>;
|
|
283
|
-
blocks: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodJSONSchema>>>;
|
|
284
|
-
botId: z.ZodOptional<z.ZodString>;
|
|
285
|
-
files: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodJSONSchema>>>;
|
|
286
|
-
parentUserId: z.ZodOptional<z.ZodString>;
|
|
287
|
-
reactions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
288
|
-
count: z.ZodNumber;
|
|
289
|
-
name: z.ZodString;
|
|
290
|
-
userIds: z.ZodArray<z.ZodString>;
|
|
291
|
-
}, z.core.$strip>>>;
|
|
292
|
-
replyCount: z.ZodOptional<z.ZodNumber>;
|
|
293
|
-
subtype: z.ZodOptional<z.ZodString>;
|
|
294
|
-
text: z.ZodString;
|
|
295
|
-
threadTimestamp: z.ZodOptional<z.ZodString>;
|
|
296
|
-
timestamp: z.ZodString;
|
|
297
|
-
type: z.ZodString;
|
|
298
|
-
userId: z.ZodOptional<z.ZodString>;
|
|
299
|
-
conversationId: z.ZodString;
|
|
300
|
-
conversationType: z.ZodOptional<z.ZodString>;
|
|
301
|
-
event: z.ZodObject<{
|
|
302
|
-
app_id: z.ZodOptional<z.ZodString>;
|
|
303
|
-
attachments: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodJSONSchema>>>;
|
|
304
|
-
blocks: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodJSONSchema>>>;
|
|
305
|
-
bot_id: z.ZodOptional<z.ZodString>;
|
|
306
|
-
files: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodJSONSchema>>>;
|
|
307
|
-
parent_user_id: z.ZodOptional<z.ZodString>;
|
|
308
|
-
reactions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
309
|
-
count: z.ZodNumber;
|
|
310
|
-
name: z.ZodString;
|
|
311
|
-
users: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
312
|
-
}, z.core.$strip>>>;
|
|
313
|
-
reply_count: z.ZodOptional<z.ZodNumber>;
|
|
314
|
-
subtype: z.ZodOptional<z.ZodString>;
|
|
315
|
-
text: z.ZodPrefault<z.ZodString>;
|
|
316
|
-
thread_ts: z.ZodOptional<z.ZodString>;
|
|
317
|
-
ts: z.ZodString;
|
|
318
|
-
type: z.ZodPrefault<z.ZodString>;
|
|
319
|
-
user: z.ZodOptional<z.ZodString>;
|
|
320
|
-
channel: z.ZodString;
|
|
321
|
-
channel_type: z.ZodOptional<z.ZodString>;
|
|
322
|
-
event_ts: z.ZodString;
|
|
323
|
-
}, z.core.$catchall<z.ZodJSONSchema>>;
|
|
324
|
-
eventTimestamp: z.ZodString;
|
|
325
|
-
workspaceId: z.ZodString;
|
|
326
|
-
}, z.core.$strip>;
|
|
327
|
-
export declare const SLACK_APP_MENTION_EVENT_SCHEMA: z.ZodObject<{
|
|
328
|
-
appId: z.ZodOptional<z.ZodString>;
|
|
329
|
-
attachments: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodJSONSchema>>>;
|
|
330
|
-
blocks: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodJSONSchema>>>;
|
|
331
|
-
botId: z.ZodOptional<z.ZodString>;
|
|
332
|
-
files: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodJSONSchema>>>;
|
|
333
|
-
parentUserId: z.ZodOptional<z.ZodString>;
|
|
334
|
-
reactions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
335
|
-
count: z.ZodNumber;
|
|
336
|
-
name: z.ZodString;
|
|
337
|
-
userIds: z.ZodArray<z.ZodString>;
|
|
338
|
-
}, z.core.$strip>>>;
|
|
339
|
-
replyCount: z.ZodOptional<z.ZodNumber>;
|
|
340
|
-
subtype: z.ZodOptional<z.ZodString>;
|
|
341
|
-
text: z.ZodString;
|
|
342
|
-
threadTimestamp: z.ZodOptional<z.ZodString>;
|
|
343
|
-
timestamp: z.ZodString;
|
|
344
|
-
userId: z.ZodOptional<z.ZodString>;
|
|
345
|
-
conversationId: z.ZodString;
|
|
346
|
-
conversationType: z.ZodOptional<z.ZodString>;
|
|
347
|
-
eventTimestamp: z.ZodString;
|
|
348
|
-
workspaceId: z.ZodString;
|
|
349
|
-
event: z.ZodObject<{
|
|
350
|
-
app_id: z.ZodOptional<z.ZodString>;
|
|
351
|
-
attachments: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodJSONSchema>>>;
|
|
352
|
-
blocks: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodJSONSchema>>>;
|
|
353
|
-
bot_id: z.ZodOptional<z.ZodString>;
|
|
354
|
-
files: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodJSONSchema>>>;
|
|
355
|
-
parent_user_id: z.ZodOptional<z.ZodString>;
|
|
356
|
-
reactions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
357
|
-
count: z.ZodNumber;
|
|
358
|
-
name: z.ZodString;
|
|
359
|
-
users: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
360
|
-
}, z.core.$strip>>>;
|
|
361
|
-
reply_count: z.ZodOptional<z.ZodNumber>;
|
|
362
|
-
subtype: z.ZodOptional<z.ZodString>;
|
|
363
|
-
text: z.ZodPrefault<z.ZodString>;
|
|
364
|
-
thread_ts: z.ZodOptional<z.ZodString>;
|
|
365
|
-
ts: z.ZodString;
|
|
366
|
-
user: z.ZodOptional<z.ZodString>;
|
|
367
|
-
channel: z.ZodString;
|
|
368
|
-
channel_type: z.ZodOptional<z.ZodString>;
|
|
369
|
-
event_ts: z.ZodString;
|
|
370
|
-
type: z.ZodLiteral<"app_mention">;
|
|
371
|
-
}, z.core.$catchall<z.ZodJSONSchema>>;
|
|
372
|
-
type: z.ZodLiteral<"app_mention">;
|
|
373
|
-
}, z.core.$strip>;
|
|
374
|
-
export declare const SLACK_MESSAGE_POSTED_EVENT_SCHEMA: z.ZodObject<{
|
|
375
|
-
appId: z.ZodOptional<z.ZodString>;
|
|
376
|
-
attachments: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodJSONSchema>>>;
|
|
377
|
-
blocks: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodJSONSchema>>>;
|
|
378
|
-
botId: z.ZodOptional<z.ZodString>;
|
|
379
|
-
files: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodJSONSchema>>>;
|
|
380
|
-
parentUserId: z.ZodOptional<z.ZodString>;
|
|
381
|
-
reactions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
382
|
-
count: z.ZodNumber;
|
|
383
|
-
name: z.ZodString;
|
|
384
|
-
userIds: z.ZodArray<z.ZodString>;
|
|
385
|
-
}, z.core.$strip>>>;
|
|
386
|
-
replyCount: z.ZodOptional<z.ZodNumber>;
|
|
387
|
-
subtype: z.ZodOptional<z.ZodString>;
|
|
388
|
-
text: z.ZodString;
|
|
389
|
-
threadTimestamp: z.ZodOptional<z.ZodString>;
|
|
390
|
-
timestamp: z.ZodString;
|
|
391
|
-
userId: z.ZodOptional<z.ZodString>;
|
|
392
|
-
conversationId: z.ZodString;
|
|
393
|
-
conversationType: z.ZodOptional<z.ZodString>;
|
|
394
|
-
eventTimestamp: z.ZodString;
|
|
395
|
-
workspaceId: z.ZodString;
|
|
396
|
-
event: z.ZodObject<{
|
|
397
|
-
app_id: z.ZodOptional<z.ZodString>;
|
|
398
|
-
attachments: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodJSONSchema>>>;
|
|
399
|
-
blocks: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodJSONSchema>>>;
|
|
400
|
-
bot_id: z.ZodOptional<z.ZodString>;
|
|
401
|
-
files: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodJSONSchema>>>;
|
|
402
|
-
parent_user_id: z.ZodOptional<z.ZodString>;
|
|
403
|
-
reactions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
404
|
-
count: z.ZodNumber;
|
|
405
|
-
name: z.ZodString;
|
|
406
|
-
users: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
407
|
-
}, z.core.$strip>>>;
|
|
408
|
-
reply_count: z.ZodOptional<z.ZodNumber>;
|
|
409
|
-
subtype: z.ZodOptional<z.ZodString>;
|
|
410
|
-
text: z.ZodPrefault<z.ZodString>;
|
|
411
|
-
thread_ts: z.ZodOptional<z.ZodString>;
|
|
412
|
-
ts: z.ZodString;
|
|
413
|
-
user: z.ZodOptional<z.ZodString>;
|
|
414
|
-
channel: z.ZodString;
|
|
415
|
-
channel_type: z.ZodOptional<z.ZodString>;
|
|
416
|
-
event_ts: z.ZodString;
|
|
417
|
-
type: z.ZodLiteral<"message">;
|
|
418
|
-
}, z.core.$catchall<z.ZodJSONSchema>>;
|
|
419
|
-
type: z.ZodLiteral<"message">;
|
|
420
|
-
}, z.core.$strip>;
|
|
421
295
|
export declare const SLACK_PROVIDER_FILE_SCHEMA: z.ZodObject<{
|
|
422
296
|
channels: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
423
297
|
created: z.ZodOptional<z.ZodNumber>;
|
|
424
298
|
filetype: z.ZodOptional<z.ZodString>;
|
|
425
299
|
id: z.ZodString;
|
|
426
300
|
mimetype: z.ZodOptional<z.ZodString>;
|
|
427
|
-
name: z.ZodOptional<z.ZodString
|
|
301
|
+
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
428
302
|
permalink: z.ZodOptional<z.ZodString>;
|
|
429
303
|
size: z.ZodOptional<z.ZodNumber>;
|
|
430
304
|
title: z.ZodOptional<z.ZodString>;
|
|
@@ -535,92 +409,12 @@ export declare function toSlackMessage(message: z.output<typeof SLACK_PROVIDER_M
|
|
|
535
409
|
}[] | undefined;
|
|
536
410
|
replyCount: number | undefined;
|
|
537
411
|
subtype: string | undefined;
|
|
538
|
-
text: string;
|
|
412
|
+
text: string | undefined;
|
|
539
413
|
threadTimestamp: string | undefined;
|
|
540
414
|
timestamp: string;
|
|
541
415
|
type: string;
|
|
542
416
|
userId: string | undefined;
|
|
543
417
|
};
|
|
544
|
-
/**
|
|
545
|
-
* Normalizes a message-shaped Slack Events API payload.
|
|
546
|
-
*
|
|
547
|
-
* @param event - Provider-native inner event.
|
|
548
|
-
* @param workspaceId - Slack workspace from the outer event envelope.
|
|
549
|
-
*/
|
|
550
|
-
export declare function normalizeSlackMessageEvent(event: unknown, workspaceId: string): {
|
|
551
|
-
text: string;
|
|
552
|
-
timestamp: string;
|
|
553
|
-
type: string;
|
|
554
|
-
conversationId: string;
|
|
555
|
-
event: {
|
|
556
|
-
[x: string]: z.core.util.JSONType;
|
|
557
|
-
text: string;
|
|
558
|
-
ts: string;
|
|
559
|
-
type: string;
|
|
560
|
-
channel: string;
|
|
561
|
-
event_ts: string;
|
|
562
|
-
app_id?: string | undefined;
|
|
563
|
-
attachments?: Record<string, z.core.util.JSONType>[] | undefined;
|
|
564
|
-
blocks?: Record<string, z.core.util.JSONType>[] | undefined;
|
|
565
|
-
bot_id?: string | undefined;
|
|
566
|
-
files?: Record<string, z.core.util.JSONType>[] | undefined;
|
|
567
|
-
parent_user_id?: string | undefined;
|
|
568
|
-
reactions?: {
|
|
569
|
-
count: number;
|
|
570
|
-
name: string;
|
|
571
|
-
users?: string[] | undefined;
|
|
572
|
-
}[] | undefined;
|
|
573
|
-
reply_count?: number | undefined;
|
|
574
|
-
subtype?: string | undefined;
|
|
575
|
-
thread_ts?: string | undefined;
|
|
576
|
-
user?: string | undefined;
|
|
577
|
-
channel_type?: string | undefined;
|
|
578
|
-
};
|
|
579
|
-
eventTimestamp: string;
|
|
580
|
-
workspaceId: string;
|
|
581
|
-
appId?: string | undefined;
|
|
582
|
-
attachments?: Record<string, z.core.util.JSONType>[] | undefined;
|
|
583
|
-
blocks?: Record<string, z.core.util.JSONType>[] | undefined;
|
|
584
|
-
botId?: string | undefined;
|
|
585
|
-
files?: Record<string, z.core.util.JSONType>[] | undefined;
|
|
586
|
-
parentUserId?: string | undefined;
|
|
587
|
-
reactions?: {
|
|
588
|
-
count: number;
|
|
589
|
-
name: string;
|
|
590
|
-
userIds: string[];
|
|
591
|
-
}[] | undefined;
|
|
592
|
-
replyCount?: number | undefined;
|
|
593
|
-
subtype?: string | undefined;
|
|
594
|
-
threadTimestamp?: string | undefined;
|
|
595
|
-
userId?: string | undefined;
|
|
596
|
-
conversationType?: string | undefined;
|
|
597
|
-
};
|
|
598
|
-
/**
|
|
599
|
-
* Normalizes a reaction-shaped Slack Events API payload.
|
|
600
|
-
*
|
|
601
|
-
* @param event - Provider-native inner event.
|
|
602
|
-
* @param workspaceId - Slack workspace from the outer event envelope.
|
|
603
|
-
*/
|
|
604
|
-
export declare function normalizeSlackReactionEvent(event: unknown, workspaceId: string): {
|
|
605
|
-
eventTimestamp: string;
|
|
606
|
-
item: {
|
|
607
|
-
conversationId: string;
|
|
608
|
-
messageTimestamp: string;
|
|
609
|
-
type: "message";
|
|
610
|
-
conversationType?: string | undefined;
|
|
611
|
-
} | {
|
|
612
|
-
fileId: string;
|
|
613
|
-
type: "file";
|
|
614
|
-
} | {
|
|
615
|
-
fileId: string;
|
|
616
|
-
fileCommentId: string;
|
|
617
|
-
type: "fileComment";
|
|
618
|
-
};
|
|
619
|
-
reaction: string;
|
|
620
|
-
userId: string;
|
|
621
|
-
workspaceId: string;
|
|
622
|
-
itemUserId?: string | undefined;
|
|
623
|
-
};
|
|
624
418
|
/**
|
|
625
419
|
* Normalizes a Slack file.
|
|
626
420
|
*
|
|
@@ -632,7 +426,7 @@ export declare function toSlackFile(file: z.output<typeof SLACK_PROVIDER_FILE_SC
|
|
|
632
426
|
fileType: string | undefined;
|
|
633
427
|
id: string;
|
|
634
428
|
mimeType: string | undefined;
|
|
635
|
-
name: string | undefined;
|
|
429
|
+
name: string | null | undefined;
|
|
636
430
|
permalink: string | undefined;
|
|
637
431
|
size: number | undefined;
|
|
638
432
|
title: string | undefined;
|