airbyte-agent-slack 0.1.6__py3-none-any.whl → 0.1.8__py3-none-any.whl

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.
@@ -27,7 +27,7 @@ from uuid import (
27
27
  SlackConnectorModel: ConnectorModel = ConnectorModel(
28
28
  id=UUID('c2281cee-86f9-4a86-bb48-d23286b4c7bd'),
29
29
  name='slack',
30
- version='0.1.1',
30
+ version='0.1.2',
31
31
  base_url='https://slack.com/api',
32
32
  auth=AuthConfig(
33
33
  options=[
@@ -599,7 +599,12 @@ SlackConnectorModel: ConnectorModel = ConnectorModel(
599
599
  EntityDefinition(
600
600
  name='channels',
601
601
  stream_name='channels',
602
- actions=[Action.LIST, Action.GET],
602
+ actions=[
603
+ Action.LIST,
604
+ Action.GET,
605
+ Action.CREATE,
606
+ Action.UPDATE,
607
+ ],
603
608
  endpoints={
604
609
  Action.LIST: EndpointDefinition(
605
610
  method='GET',
@@ -1017,265 +1022,1143 @@ SlackConnectorModel: ConnectorModel = ConnectorModel(
1017
1022
  },
1018
1023
  record_extractor='$.channel',
1019
1024
  ),
1020
- },
1021
- entity_schema={
1022
- 'type': 'object',
1023
- 'description': 'Slack channel object',
1024
- 'properties': {
1025
- 'id': {'type': 'string', 'description': 'Unique channel identifier'},
1026
- 'name': {
1027
- 'type': ['string', 'null'],
1028
- 'description': 'Channel name',
1029
- },
1030
- 'is_channel': {
1031
- 'type': ['boolean', 'null'],
1032
- 'description': 'Whether this is a channel',
1033
- },
1034
- 'is_group': {
1035
- 'type': ['boolean', 'null'],
1036
- 'description': 'Whether this is a group',
1037
- },
1038
- 'is_im': {
1039
- 'type': ['boolean', 'null'],
1040
- 'description': 'Whether this is a direct message',
1041
- },
1042
- 'is_mpim': {
1043
- 'type': ['boolean', 'null'],
1044
- 'description': 'Whether this is a multi-party direct message',
1045
- },
1046
- 'is_private': {
1047
- 'type': ['boolean', 'null'],
1048
- 'description': 'Whether the channel is private',
1049
- },
1050
- 'created': {
1051
- 'type': ['integer', 'null'],
1052
- 'description': 'Unix timestamp of channel creation',
1053
- },
1054
- 'is_archived': {
1055
- 'type': ['boolean', 'null'],
1056
- 'description': 'Whether the channel is archived',
1057
- },
1058
- 'is_general': {
1059
- 'type': ['boolean', 'null'],
1060
- 'description': 'Whether this is the general channel',
1061
- },
1062
- 'unlinked': {
1063
- 'type': ['integer', 'null'],
1064
- 'description': 'Unlinked timestamp',
1065
- },
1066
- 'name_normalized': {
1067
- 'type': ['string', 'null'],
1068
- 'description': 'Normalized channel name',
1069
- },
1070
- 'is_shared': {
1071
- 'type': ['boolean', 'null'],
1072
- 'description': 'Whether the channel is shared',
1073
- },
1074
- 'is_org_shared': {
1075
- 'type': ['boolean', 'null'],
1076
- 'description': 'Whether the channel is shared across the organization',
1077
- },
1078
- 'is_pending_ext_shared': {
1079
- 'type': ['boolean', 'null'],
1080
- 'description': 'Whether external sharing is pending',
1081
- },
1082
- 'pending_shared': {
1083
- 'type': ['array', 'null'],
1084
- 'items': {'type': 'string'},
1085
- 'description': 'Pending shared teams',
1086
- },
1087
- 'context_team_id': {
1088
- 'type': ['string', 'null'],
1089
- 'description': 'Context team ID',
1090
- },
1091
- 'updated': {
1092
- 'type': ['integer', 'null'],
1093
- 'description': 'Unix timestamp of last update',
1094
- },
1095
- 'creator': {
1096
- 'type': ['string', 'null'],
1097
- 'description': 'User ID of the channel creator',
1098
- },
1099
- 'is_ext_shared': {
1100
- 'type': ['boolean', 'null'],
1101
- 'description': 'Whether the channel is externally shared',
1102
- },
1103
- 'shared_team_ids': {
1104
- 'type': ['array', 'null'],
1105
- 'items': {'type': 'string'},
1106
- 'description': 'IDs of teams the channel is shared with',
1107
- },
1108
- 'pending_connected_team_ids': {
1109
- 'type': ['array', 'null'],
1110
- 'items': {'type': 'string'},
1111
- 'description': 'IDs of teams with pending connection',
1112
- },
1113
- 'is_member': {
1114
- 'type': ['boolean', 'null'],
1115
- 'description': 'Whether the authenticated user is a member',
1116
- },
1117
- 'topic': {
1118
- 'oneOf': [
1119
- {'$ref': '#/components/schemas/ChannelTopic'},
1120
- {'type': 'null'},
1121
- ],
1122
- 'description': 'Channel topic',
1123
- },
1124
- 'purpose': {
1125
- 'oneOf': [
1126
- {'$ref': '#/components/schemas/ChannelPurpose'},
1127
- {'type': 'null'},
1128
- ],
1129
- 'description': 'Channel purpose',
1130
- },
1131
- 'previous_names': {
1132
- 'type': ['array', 'null'],
1133
- 'items': {'type': 'string'},
1134
- 'description': 'Previous channel names',
1135
- },
1136
- 'num_members': {
1137
- 'type': ['integer', 'null'],
1138
- 'description': 'Number of members in the channel',
1139
- },
1140
- 'parent_conversation': {
1141
- 'type': ['string', 'null'],
1142
- 'description': 'Parent conversation ID if this is a thread',
1143
- },
1144
- 'properties': {
1145
- 'type': ['object', 'null'],
1146
- 'description': 'Additional channel properties',
1147
- },
1148
- 'is_thread_only': {
1149
- 'type': ['boolean', 'null'],
1150
- 'description': 'Whether the channel is thread-only',
1151
- },
1152
- 'is_read_only': {
1153
- 'type': ['boolean', 'null'],
1154
- 'description': 'Whether the channel is read-only',
1155
- },
1156
- },
1157
- 'x-airbyte-entity-name': 'channels',
1158
- 'x-airbyte-stream-name': 'channels',
1159
- },
1160
- ),
1161
- EntityDefinition(
1162
- name='channel_messages',
1163
- stream_name='channel_messages',
1164
- actions=[Action.LIST],
1165
- endpoints={
1166
- Action.LIST: EndpointDefinition(
1167
- method='GET',
1168
- path='/conversations.history',
1169
- action=Action.LIST,
1170
- description='Returns messages from a channel',
1171
- query_params=[
1172
- 'channel',
1173
- 'cursor',
1174
- 'limit',
1175
- 'oldest',
1176
- 'latest',
1177
- 'inclusive',
1178
- ],
1179
- query_params_schema={
1180
- 'channel': {'type': 'string', 'required': True},
1181
- 'cursor': {'type': 'string', 'required': False},
1182
- 'limit': {
1183
- 'type': 'integer',
1184
- 'required': False,
1185
- 'default': 100,
1186
- },
1187
- 'oldest': {'type': 'string', 'required': False},
1188
- 'latest': {'type': 'string', 'required': False},
1189
- 'inclusive': {
1190
- 'type': 'boolean',
1191
- 'required': False,
1192
- 'default': False,
1025
+ Action.CREATE: EndpointDefinition(
1026
+ method='POST',
1027
+ path='/conversations.create',
1028
+ action=Action.CREATE,
1029
+ description='Creates a new public or private channel',
1030
+ body_fields=['name', 'is_private'],
1031
+ request_schema={
1032
+ 'type': 'object',
1033
+ 'description': 'Parameters for creating a channel',
1034
+ 'properties': {
1035
+ 'name': {'type': 'string', 'description': 'Channel name (lowercase, no spaces, max 80 chars)'},
1036
+ 'is_private': {'type': 'boolean', 'description': 'Create a private channel instead of public'},
1193
1037
  },
1038
+ 'required': ['name'],
1194
1039
  },
1195
1040
  response_schema={
1196
1041
  'type': 'object',
1197
- 'description': 'Response containing list of messages',
1042
+ 'description': 'Response from creating a channel',
1198
1043
  'properties': {
1199
1044
  'ok': {'type': 'boolean', 'description': 'Whether the request was successful'},
1200
- 'messages': {
1201
- 'type': 'array',
1202
- 'items': {
1203
- 'type': 'object',
1204
- 'description': 'Slack message object',
1205
- 'properties': {
1206
- 'type': {
1207
- 'type': ['string', 'null'],
1208
- 'description': 'Message type',
1209
- },
1210
- 'subtype': {
1211
- 'type': ['string', 'null'],
1212
- 'description': 'Message subtype',
1213
- },
1214
- 'ts': {'type': 'string', 'description': 'Message timestamp (unique identifier)'},
1215
- 'user': {
1216
- 'type': ['string', 'null'],
1217
- 'description': 'User ID who sent the message',
1218
- },
1219
- 'text': {
1220
- 'type': ['string', 'null'],
1221
- 'description': 'Message text content',
1222
- },
1223
- 'thread_ts': {
1224
- 'type': ['string', 'null'],
1225
- 'description': 'Thread parent timestamp',
1226
- },
1227
- 'reply_count': {
1228
- 'type': ['integer', 'null'],
1229
- 'description': 'Number of replies in thread',
1230
- },
1231
- 'reply_users_count': {
1232
- 'type': ['integer', 'null'],
1233
- 'description': 'Number of unique users who replied',
1234
- },
1235
- 'latest_reply': {
1236
- 'type': ['string', 'null'],
1237
- 'description': 'Timestamp of latest reply',
1238
- },
1239
- 'reply_users': {
1240
- 'type': ['array', 'null'],
1241
- 'items': {'type': 'string'},
1242
- 'description': 'User IDs who replied to the thread',
1243
- },
1244
- 'is_locked': {
1245
- 'type': ['boolean', 'null'],
1246
- 'description': 'Whether the thread is locked',
1247
- },
1248
- 'subscribed': {
1249
- 'type': ['boolean', 'null'],
1250
- 'description': 'Whether the user is subscribed to the thread',
1251
- },
1252
- 'reactions': {
1253
- 'type': ['array', 'null'],
1254
- 'items': {
1255
- 'type': 'object',
1256
- 'description': 'Message reaction',
1257
- 'properties': {
1258
- 'name': {
1259
- 'type': ['string', 'null'],
1260
- 'description': 'Reaction emoji name',
1261
- },
1262
- 'users': {
1263
- 'type': ['array', 'null'],
1264
- 'items': {'type': 'string'},
1265
- 'description': 'User IDs who reacted',
1266
- },
1267
- 'count': {
1268
- 'type': ['integer', 'null'],
1269
- 'description': 'Number of reactions',
1270
- },
1271
- },
1272
- },
1273
- 'description': 'Reactions to the message',
1274
- },
1275
- 'attachments': {
1276
- 'type': ['array', 'null'],
1277
- 'items': {
1278
- 'type': 'object',
1045
+ 'channel': {
1046
+ 'type': 'object',
1047
+ 'description': 'Slack channel object',
1048
+ 'properties': {
1049
+ 'id': {'type': 'string', 'description': 'Unique channel identifier'},
1050
+ 'name': {
1051
+ 'type': ['string', 'null'],
1052
+ 'description': 'Channel name',
1053
+ },
1054
+ 'is_channel': {
1055
+ 'type': ['boolean', 'null'],
1056
+ 'description': 'Whether this is a channel',
1057
+ },
1058
+ 'is_group': {
1059
+ 'type': ['boolean', 'null'],
1060
+ 'description': 'Whether this is a group',
1061
+ },
1062
+ 'is_im': {
1063
+ 'type': ['boolean', 'null'],
1064
+ 'description': 'Whether this is a direct message',
1065
+ },
1066
+ 'is_mpim': {
1067
+ 'type': ['boolean', 'null'],
1068
+ 'description': 'Whether this is a multi-party direct message',
1069
+ },
1070
+ 'is_private': {
1071
+ 'type': ['boolean', 'null'],
1072
+ 'description': 'Whether the channel is private',
1073
+ },
1074
+ 'created': {
1075
+ 'type': ['integer', 'null'],
1076
+ 'description': 'Unix timestamp of channel creation',
1077
+ },
1078
+ 'is_archived': {
1079
+ 'type': ['boolean', 'null'],
1080
+ 'description': 'Whether the channel is archived',
1081
+ },
1082
+ 'is_general': {
1083
+ 'type': ['boolean', 'null'],
1084
+ 'description': 'Whether this is the general channel',
1085
+ },
1086
+ 'unlinked': {
1087
+ 'type': ['integer', 'null'],
1088
+ 'description': 'Unlinked timestamp',
1089
+ },
1090
+ 'name_normalized': {
1091
+ 'type': ['string', 'null'],
1092
+ 'description': 'Normalized channel name',
1093
+ },
1094
+ 'is_shared': {
1095
+ 'type': ['boolean', 'null'],
1096
+ 'description': 'Whether the channel is shared',
1097
+ },
1098
+ 'is_org_shared': {
1099
+ 'type': ['boolean', 'null'],
1100
+ 'description': 'Whether the channel is shared across the organization',
1101
+ },
1102
+ 'is_pending_ext_shared': {
1103
+ 'type': ['boolean', 'null'],
1104
+ 'description': 'Whether external sharing is pending',
1105
+ },
1106
+ 'pending_shared': {
1107
+ 'type': ['array', 'null'],
1108
+ 'items': {'type': 'string'},
1109
+ 'description': 'Pending shared teams',
1110
+ },
1111
+ 'context_team_id': {
1112
+ 'type': ['string', 'null'],
1113
+ 'description': 'Context team ID',
1114
+ },
1115
+ 'updated': {
1116
+ 'type': ['integer', 'null'],
1117
+ 'description': 'Unix timestamp of last update',
1118
+ },
1119
+ 'creator': {
1120
+ 'type': ['string', 'null'],
1121
+ 'description': 'User ID of the channel creator',
1122
+ },
1123
+ 'is_ext_shared': {
1124
+ 'type': ['boolean', 'null'],
1125
+ 'description': 'Whether the channel is externally shared',
1126
+ },
1127
+ 'shared_team_ids': {
1128
+ 'type': ['array', 'null'],
1129
+ 'items': {'type': 'string'},
1130
+ 'description': 'IDs of teams the channel is shared with',
1131
+ },
1132
+ 'pending_connected_team_ids': {
1133
+ 'type': ['array', 'null'],
1134
+ 'items': {'type': 'string'},
1135
+ 'description': 'IDs of teams with pending connection',
1136
+ },
1137
+ 'is_member': {
1138
+ 'type': ['boolean', 'null'],
1139
+ 'description': 'Whether the authenticated user is a member',
1140
+ },
1141
+ 'topic': {
1142
+ 'oneOf': [
1143
+ {
1144
+ 'type': 'object',
1145
+ 'description': 'Channel topic information',
1146
+ 'properties': {
1147
+ 'value': {
1148
+ 'type': ['string', 'null'],
1149
+ 'description': 'Topic text',
1150
+ },
1151
+ 'creator': {
1152
+ 'type': ['string', 'null'],
1153
+ 'description': 'User ID who set the topic',
1154
+ },
1155
+ 'last_set': {
1156
+ 'type': ['integer', 'null'],
1157
+ 'description': 'Unix timestamp when topic was last set',
1158
+ },
1159
+ },
1160
+ },
1161
+ {'type': 'null'},
1162
+ ],
1163
+ 'description': 'Channel topic',
1164
+ },
1165
+ 'purpose': {
1166
+ 'oneOf': [
1167
+ {
1168
+ 'type': 'object',
1169
+ 'description': 'Channel purpose information',
1170
+ 'properties': {
1171
+ 'value': {
1172
+ 'type': ['string', 'null'],
1173
+ 'description': 'Purpose text',
1174
+ },
1175
+ 'creator': {
1176
+ 'type': ['string', 'null'],
1177
+ 'description': 'User ID who set the purpose',
1178
+ },
1179
+ 'last_set': {
1180
+ 'type': ['integer', 'null'],
1181
+ 'description': 'Unix timestamp when purpose was last set',
1182
+ },
1183
+ },
1184
+ },
1185
+ {'type': 'null'},
1186
+ ],
1187
+ 'description': 'Channel purpose',
1188
+ },
1189
+ 'previous_names': {
1190
+ 'type': ['array', 'null'],
1191
+ 'items': {'type': 'string'},
1192
+ 'description': 'Previous channel names',
1193
+ },
1194
+ 'num_members': {
1195
+ 'type': ['integer', 'null'],
1196
+ 'description': 'Number of members in the channel',
1197
+ },
1198
+ 'parent_conversation': {
1199
+ 'type': ['string', 'null'],
1200
+ 'description': 'Parent conversation ID if this is a thread',
1201
+ },
1202
+ 'properties': {
1203
+ 'type': ['object', 'null'],
1204
+ 'description': 'Additional channel properties',
1205
+ },
1206
+ 'is_thread_only': {
1207
+ 'type': ['boolean', 'null'],
1208
+ 'description': 'Whether the channel is thread-only',
1209
+ },
1210
+ 'is_read_only': {
1211
+ 'type': ['boolean', 'null'],
1212
+ 'description': 'Whether the channel is read-only',
1213
+ },
1214
+ },
1215
+ 'x-airbyte-entity-name': 'channels',
1216
+ 'x-airbyte-stream-name': 'channels',
1217
+ },
1218
+ },
1219
+ },
1220
+ record_extractor='$.channel',
1221
+ ),
1222
+ Action.UPDATE: EndpointDefinition(
1223
+ method='POST',
1224
+ path='/conversations.rename',
1225
+ action=Action.UPDATE,
1226
+ description='Renames an existing channel',
1227
+ body_fields=['channel', 'name'],
1228
+ request_schema={
1229
+ 'type': 'object',
1230
+ 'description': 'Parameters for renaming a channel',
1231
+ 'properties': {
1232
+ 'channel': {'type': 'string', 'description': 'Channel ID to rename'},
1233
+ 'name': {'type': 'string', 'description': 'New channel name (lowercase, no spaces, max 80 chars)'},
1234
+ },
1235
+ 'required': ['channel', 'name'],
1236
+ },
1237
+ response_schema={
1238
+ 'type': 'object',
1239
+ 'description': 'Response from renaming a channel',
1240
+ 'properties': {
1241
+ 'ok': {'type': 'boolean', 'description': 'Whether the request was successful'},
1242
+ 'channel': {
1243
+ 'type': 'object',
1244
+ 'description': 'Slack channel object',
1245
+ 'properties': {
1246
+ 'id': {'type': 'string', 'description': 'Unique channel identifier'},
1247
+ 'name': {
1248
+ 'type': ['string', 'null'],
1249
+ 'description': 'Channel name',
1250
+ },
1251
+ 'is_channel': {
1252
+ 'type': ['boolean', 'null'],
1253
+ 'description': 'Whether this is a channel',
1254
+ },
1255
+ 'is_group': {
1256
+ 'type': ['boolean', 'null'],
1257
+ 'description': 'Whether this is a group',
1258
+ },
1259
+ 'is_im': {
1260
+ 'type': ['boolean', 'null'],
1261
+ 'description': 'Whether this is a direct message',
1262
+ },
1263
+ 'is_mpim': {
1264
+ 'type': ['boolean', 'null'],
1265
+ 'description': 'Whether this is a multi-party direct message',
1266
+ },
1267
+ 'is_private': {
1268
+ 'type': ['boolean', 'null'],
1269
+ 'description': 'Whether the channel is private',
1270
+ },
1271
+ 'created': {
1272
+ 'type': ['integer', 'null'],
1273
+ 'description': 'Unix timestamp of channel creation',
1274
+ },
1275
+ 'is_archived': {
1276
+ 'type': ['boolean', 'null'],
1277
+ 'description': 'Whether the channel is archived',
1278
+ },
1279
+ 'is_general': {
1280
+ 'type': ['boolean', 'null'],
1281
+ 'description': 'Whether this is the general channel',
1282
+ },
1283
+ 'unlinked': {
1284
+ 'type': ['integer', 'null'],
1285
+ 'description': 'Unlinked timestamp',
1286
+ },
1287
+ 'name_normalized': {
1288
+ 'type': ['string', 'null'],
1289
+ 'description': 'Normalized channel name',
1290
+ },
1291
+ 'is_shared': {
1292
+ 'type': ['boolean', 'null'],
1293
+ 'description': 'Whether the channel is shared',
1294
+ },
1295
+ 'is_org_shared': {
1296
+ 'type': ['boolean', 'null'],
1297
+ 'description': 'Whether the channel is shared across the organization',
1298
+ },
1299
+ 'is_pending_ext_shared': {
1300
+ 'type': ['boolean', 'null'],
1301
+ 'description': 'Whether external sharing is pending',
1302
+ },
1303
+ 'pending_shared': {
1304
+ 'type': ['array', 'null'],
1305
+ 'items': {'type': 'string'},
1306
+ 'description': 'Pending shared teams',
1307
+ },
1308
+ 'context_team_id': {
1309
+ 'type': ['string', 'null'],
1310
+ 'description': 'Context team ID',
1311
+ },
1312
+ 'updated': {
1313
+ 'type': ['integer', 'null'],
1314
+ 'description': 'Unix timestamp of last update',
1315
+ },
1316
+ 'creator': {
1317
+ 'type': ['string', 'null'],
1318
+ 'description': 'User ID of the channel creator',
1319
+ },
1320
+ 'is_ext_shared': {
1321
+ 'type': ['boolean', 'null'],
1322
+ 'description': 'Whether the channel is externally shared',
1323
+ },
1324
+ 'shared_team_ids': {
1325
+ 'type': ['array', 'null'],
1326
+ 'items': {'type': 'string'},
1327
+ 'description': 'IDs of teams the channel is shared with',
1328
+ },
1329
+ 'pending_connected_team_ids': {
1330
+ 'type': ['array', 'null'],
1331
+ 'items': {'type': 'string'},
1332
+ 'description': 'IDs of teams with pending connection',
1333
+ },
1334
+ 'is_member': {
1335
+ 'type': ['boolean', 'null'],
1336
+ 'description': 'Whether the authenticated user is a member',
1337
+ },
1338
+ 'topic': {
1339
+ 'oneOf': [
1340
+ {
1341
+ 'type': 'object',
1342
+ 'description': 'Channel topic information',
1343
+ 'properties': {
1344
+ 'value': {
1345
+ 'type': ['string', 'null'],
1346
+ 'description': 'Topic text',
1347
+ },
1348
+ 'creator': {
1349
+ 'type': ['string', 'null'],
1350
+ 'description': 'User ID who set the topic',
1351
+ },
1352
+ 'last_set': {
1353
+ 'type': ['integer', 'null'],
1354
+ 'description': 'Unix timestamp when topic was last set',
1355
+ },
1356
+ },
1357
+ },
1358
+ {'type': 'null'},
1359
+ ],
1360
+ 'description': 'Channel topic',
1361
+ },
1362
+ 'purpose': {
1363
+ 'oneOf': [
1364
+ {
1365
+ 'type': 'object',
1366
+ 'description': 'Channel purpose information',
1367
+ 'properties': {
1368
+ 'value': {
1369
+ 'type': ['string', 'null'],
1370
+ 'description': 'Purpose text',
1371
+ },
1372
+ 'creator': {
1373
+ 'type': ['string', 'null'],
1374
+ 'description': 'User ID who set the purpose',
1375
+ },
1376
+ 'last_set': {
1377
+ 'type': ['integer', 'null'],
1378
+ 'description': 'Unix timestamp when purpose was last set',
1379
+ },
1380
+ },
1381
+ },
1382
+ {'type': 'null'},
1383
+ ],
1384
+ 'description': 'Channel purpose',
1385
+ },
1386
+ 'previous_names': {
1387
+ 'type': ['array', 'null'],
1388
+ 'items': {'type': 'string'},
1389
+ 'description': 'Previous channel names',
1390
+ },
1391
+ 'num_members': {
1392
+ 'type': ['integer', 'null'],
1393
+ 'description': 'Number of members in the channel',
1394
+ },
1395
+ 'parent_conversation': {
1396
+ 'type': ['string', 'null'],
1397
+ 'description': 'Parent conversation ID if this is a thread',
1398
+ },
1399
+ 'properties': {
1400
+ 'type': ['object', 'null'],
1401
+ 'description': 'Additional channel properties',
1402
+ },
1403
+ 'is_thread_only': {
1404
+ 'type': ['boolean', 'null'],
1405
+ 'description': 'Whether the channel is thread-only',
1406
+ },
1407
+ 'is_read_only': {
1408
+ 'type': ['boolean', 'null'],
1409
+ 'description': 'Whether the channel is read-only',
1410
+ },
1411
+ },
1412
+ 'x-airbyte-entity-name': 'channels',
1413
+ 'x-airbyte-stream-name': 'channels',
1414
+ },
1415
+ },
1416
+ },
1417
+ record_extractor='$.channel',
1418
+ ),
1419
+ },
1420
+ entity_schema={
1421
+ 'type': 'object',
1422
+ 'description': 'Slack channel object',
1423
+ 'properties': {
1424
+ 'id': {'type': 'string', 'description': 'Unique channel identifier'},
1425
+ 'name': {
1426
+ 'type': ['string', 'null'],
1427
+ 'description': 'Channel name',
1428
+ },
1429
+ 'is_channel': {
1430
+ 'type': ['boolean', 'null'],
1431
+ 'description': 'Whether this is a channel',
1432
+ },
1433
+ 'is_group': {
1434
+ 'type': ['boolean', 'null'],
1435
+ 'description': 'Whether this is a group',
1436
+ },
1437
+ 'is_im': {
1438
+ 'type': ['boolean', 'null'],
1439
+ 'description': 'Whether this is a direct message',
1440
+ },
1441
+ 'is_mpim': {
1442
+ 'type': ['boolean', 'null'],
1443
+ 'description': 'Whether this is a multi-party direct message',
1444
+ },
1445
+ 'is_private': {
1446
+ 'type': ['boolean', 'null'],
1447
+ 'description': 'Whether the channel is private',
1448
+ },
1449
+ 'created': {
1450
+ 'type': ['integer', 'null'],
1451
+ 'description': 'Unix timestamp of channel creation',
1452
+ },
1453
+ 'is_archived': {
1454
+ 'type': ['boolean', 'null'],
1455
+ 'description': 'Whether the channel is archived',
1456
+ },
1457
+ 'is_general': {
1458
+ 'type': ['boolean', 'null'],
1459
+ 'description': 'Whether this is the general channel',
1460
+ },
1461
+ 'unlinked': {
1462
+ 'type': ['integer', 'null'],
1463
+ 'description': 'Unlinked timestamp',
1464
+ },
1465
+ 'name_normalized': {
1466
+ 'type': ['string', 'null'],
1467
+ 'description': 'Normalized channel name',
1468
+ },
1469
+ 'is_shared': {
1470
+ 'type': ['boolean', 'null'],
1471
+ 'description': 'Whether the channel is shared',
1472
+ },
1473
+ 'is_org_shared': {
1474
+ 'type': ['boolean', 'null'],
1475
+ 'description': 'Whether the channel is shared across the organization',
1476
+ },
1477
+ 'is_pending_ext_shared': {
1478
+ 'type': ['boolean', 'null'],
1479
+ 'description': 'Whether external sharing is pending',
1480
+ },
1481
+ 'pending_shared': {
1482
+ 'type': ['array', 'null'],
1483
+ 'items': {'type': 'string'},
1484
+ 'description': 'Pending shared teams',
1485
+ },
1486
+ 'context_team_id': {
1487
+ 'type': ['string', 'null'],
1488
+ 'description': 'Context team ID',
1489
+ },
1490
+ 'updated': {
1491
+ 'type': ['integer', 'null'],
1492
+ 'description': 'Unix timestamp of last update',
1493
+ },
1494
+ 'creator': {
1495
+ 'type': ['string', 'null'],
1496
+ 'description': 'User ID of the channel creator',
1497
+ },
1498
+ 'is_ext_shared': {
1499
+ 'type': ['boolean', 'null'],
1500
+ 'description': 'Whether the channel is externally shared',
1501
+ },
1502
+ 'shared_team_ids': {
1503
+ 'type': ['array', 'null'],
1504
+ 'items': {'type': 'string'},
1505
+ 'description': 'IDs of teams the channel is shared with',
1506
+ },
1507
+ 'pending_connected_team_ids': {
1508
+ 'type': ['array', 'null'],
1509
+ 'items': {'type': 'string'},
1510
+ 'description': 'IDs of teams with pending connection',
1511
+ },
1512
+ 'is_member': {
1513
+ 'type': ['boolean', 'null'],
1514
+ 'description': 'Whether the authenticated user is a member',
1515
+ },
1516
+ 'topic': {
1517
+ 'oneOf': [
1518
+ {'$ref': '#/components/schemas/ChannelTopic'},
1519
+ {'type': 'null'},
1520
+ ],
1521
+ 'description': 'Channel topic',
1522
+ },
1523
+ 'purpose': {
1524
+ 'oneOf': [
1525
+ {'$ref': '#/components/schemas/ChannelPurpose'},
1526
+ {'type': 'null'},
1527
+ ],
1528
+ 'description': 'Channel purpose',
1529
+ },
1530
+ 'previous_names': {
1531
+ 'type': ['array', 'null'],
1532
+ 'items': {'type': 'string'},
1533
+ 'description': 'Previous channel names',
1534
+ },
1535
+ 'num_members': {
1536
+ 'type': ['integer', 'null'],
1537
+ 'description': 'Number of members in the channel',
1538
+ },
1539
+ 'parent_conversation': {
1540
+ 'type': ['string', 'null'],
1541
+ 'description': 'Parent conversation ID if this is a thread',
1542
+ },
1543
+ 'properties': {
1544
+ 'type': ['object', 'null'],
1545
+ 'description': 'Additional channel properties',
1546
+ },
1547
+ 'is_thread_only': {
1548
+ 'type': ['boolean', 'null'],
1549
+ 'description': 'Whether the channel is thread-only',
1550
+ },
1551
+ 'is_read_only': {
1552
+ 'type': ['boolean', 'null'],
1553
+ 'description': 'Whether the channel is read-only',
1554
+ },
1555
+ },
1556
+ 'x-airbyte-entity-name': 'channels',
1557
+ 'x-airbyte-stream-name': 'channels',
1558
+ },
1559
+ ),
1560
+ EntityDefinition(
1561
+ name='channel_messages',
1562
+ stream_name='channel_messages',
1563
+ actions=[Action.LIST],
1564
+ endpoints={
1565
+ Action.LIST: EndpointDefinition(
1566
+ method='GET',
1567
+ path='/conversations.history',
1568
+ action=Action.LIST,
1569
+ description='Returns messages from a channel',
1570
+ query_params=[
1571
+ 'channel',
1572
+ 'cursor',
1573
+ 'limit',
1574
+ 'oldest',
1575
+ 'latest',
1576
+ 'inclusive',
1577
+ ],
1578
+ query_params_schema={
1579
+ 'channel': {'type': 'string', 'required': True},
1580
+ 'cursor': {'type': 'string', 'required': False},
1581
+ 'limit': {
1582
+ 'type': 'integer',
1583
+ 'required': False,
1584
+ 'default': 100,
1585
+ },
1586
+ 'oldest': {'type': 'string', 'required': False},
1587
+ 'latest': {'type': 'string', 'required': False},
1588
+ 'inclusive': {
1589
+ 'type': 'boolean',
1590
+ 'required': False,
1591
+ 'default': False,
1592
+ },
1593
+ },
1594
+ response_schema={
1595
+ 'type': 'object',
1596
+ 'description': 'Response containing list of messages',
1597
+ 'properties': {
1598
+ 'ok': {'type': 'boolean', 'description': 'Whether the request was successful'},
1599
+ 'messages': {
1600
+ 'type': 'array',
1601
+ 'items': {
1602
+ 'type': 'object',
1603
+ 'description': 'Slack message object',
1604
+ 'properties': {
1605
+ 'type': {
1606
+ 'type': ['string', 'null'],
1607
+ 'description': 'Message type',
1608
+ },
1609
+ 'subtype': {
1610
+ 'type': ['string', 'null'],
1611
+ 'description': 'Message subtype',
1612
+ },
1613
+ 'ts': {'type': 'string', 'description': 'Message timestamp (unique identifier)'},
1614
+ 'user': {
1615
+ 'type': ['string', 'null'],
1616
+ 'description': 'User ID who sent the message',
1617
+ },
1618
+ 'text': {
1619
+ 'type': ['string', 'null'],
1620
+ 'description': 'Message text content',
1621
+ },
1622
+ 'thread_ts': {
1623
+ 'type': ['string', 'null'],
1624
+ 'description': 'Thread parent timestamp',
1625
+ },
1626
+ 'reply_count': {
1627
+ 'type': ['integer', 'null'],
1628
+ 'description': 'Number of replies in thread',
1629
+ },
1630
+ 'reply_users_count': {
1631
+ 'type': ['integer', 'null'],
1632
+ 'description': 'Number of unique users who replied',
1633
+ },
1634
+ 'latest_reply': {
1635
+ 'type': ['string', 'null'],
1636
+ 'description': 'Timestamp of latest reply',
1637
+ },
1638
+ 'reply_users': {
1639
+ 'type': ['array', 'null'],
1640
+ 'items': {'type': 'string'},
1641
+ 'description': 'User IDs who replied to the thread',
1642
+ },
1643
+ 'is_locked': {
1644
+ 'type': ['boolean', 'null'],
1645
+ 'description': 'Whether the thread is locked',
1646
+ },
1647
+ 'subscribed': {
1648
+ 'type': ['boolean', 'null'],
1649
+ 'description': 'Whether the user is subscribed to the thread',
1650
+ },
1651
+ 'reactions': {
1652
+ 'type': ['array', 'null'],
1653
+ 'items': {
1654
+ 'type': 'object',
1655
+ 'description': 'Message reaction',
1656
+ 'properties': {
1657
+ 'name': {
1658
+ 'type': ['string', 'null'],
1659
+ 'description': 'Reaction emoji name',
1660
+ },
1661
+ 'users': {
1662
+ 'type': ['array', 'null'],
1663
+ 'items': {'type': 'string'},
1664
+ 'description': 'User IDs who reacted',
1665
+ },
1666
+ 'count': {
1667
+ 'type': ['integer', 'null'],
1668
+ 'description': 'Number of reactions',
1669
+ },
1670
+ },
1671
+ },
1672
+ 'description': 'Reactions to the message',
1673
+ },
1674
+ 'attachments': {
1675
+ 'type': ['array', 'null'],
1676
+ 'items': {
1677
+ 'type': 'object',
1678
+ 'description': 'Message attachment',
1679
+ 'properties': {
1680
+ 'id': {
1681
+ 'type': ['integer', 'null'],
1682
+ 'description': 'Attachment ID',
1683
+ },
1684
+ 'fallback': {
1685
+ 'type': ['string', 'null'],
1686
+ 'description': 'Fallback text',
1687
+ },
1688
+ 'color': {
1689
+ 'type': ['string', 'null'],
1690
+ 'description': 'Attachment color',
1691
+ },
1692
+ 'pretext': {
1693
+ 'type': ['string', 'null'],
1694
+ 'description': 'Pretext',
1695
+ },
1696
+ 'author_name': {
1697
+ 'type': ['string', 'null'],
1698
+ 'description': 'Author name',
1699
+ },
1700
+ 'author_link': {
1701
+ 'type': ['string', 'null'],
1702
+ 'description': 'Author link',
1703
+ },
1704
+ 'author_icon': {
1705
+ 'type': ['string', 'null'],
1706
+ 'description': 'Author icon URL',
1707
+ },
1708
+ 'title': {
1709
+ 'type': ['string', 'null'],
1710
+ 'description': 'Attachment title',
1711
+ },
1712
+ 'title_link': {
1713
+ 'type': ['string', 'null'],
1714
+ 'description': 'Title link',
1715
+ },
1716
+ 'text': {
1717
+ 'type': ['string', 'null'],
1718
+ 'description': 'Attachment text',
1719
+ },
1720
+ 'fields': {
1721
+ 'type': ['array', 'null'],
1722
+ 'items': {'type': 'object'},
1723
+ 'description': 'Attachment fields',
1724
+ },
1725
+ 'image_url': {
1726
+ 'type': ['string', 'null'],
1727
+ 'description': 'Image URL',
1728
+ },
1729
+ 'thumb_url': {
1730
+ 'type': ['string', 'null'],
1731
+ 'description': 'Thumbnail URL',
1732
+ },
1733
+ 'footer': {
1734
+ 'type': ['string', 'null'],
1735
+ 'description': 'Footer text',
1736
+ },
1737
+ 'footer_icon': {
1738
+ 'type': ['string', 'null'],
1739
+ 'description': 'Footer icon URL',
1740
+ },
1741
+ 'ts': {
1742
+ 'type': ['string', 'integer', 'null'],
1743
+ 'description': 'Timestamp',
1744
+ },
1745
+ },
1746
+ },
1747
+ 'description': 'Message attachments',
1748
+ },
1749
+ 'blocks': {
1750
+ 'type': ['array', 'null'],
1751
+ 'items': {'type': 'object'},
1752
+ 'description': 'Block kit blocks',
1753
+ },
1754
+ 'files': {
1755
+ 'type': ['array', 'null'],
1756
+ 'items': {
1757
+ 'type': 'object',
1758
+ 'description': 'File object',
1759
+ 'properties': {
1760
+ 'id': {
1761
+ 'type': ['string', 'null'],
1762
+ 'description': 'File ID',
1763
+ },
1764
+ 'name': {
1765
+ 'type': ['string', 'null'],
1766
+ 'description': 'File name',
1767
+ },
1768
+ 'title': {
1769
+ 'type': ['string', 'null'],
1770
+ 'description': 'File title',
1771
+ },
1772
+ 'mimetype': {
1773
+ 'type': ['string', 'null'],
1774
+ 'description': 'MIME type',
1775
+ },
1776
+ 'filetype': {
1777
+ 'type': ['string', 'null'],
1778
+ 'description': 'File type',
1779
+ },
1780
+ 'pretty_type': {
1781
+ 'type': ['string', 'null'],
1782
+ 'description': 'Human-readable file type',
1783
+ },
1784
+ 'user': {
1785
+ 'type': ['string', 'null'],
1786
+ 'description': 'User ID who uploaded the file',
1787
+ },
1788
+ 'size': {
1789
+ 'type': ['integer', 'null'],
1790
+ 'description': 'File size in bytes',
1791
+ },
1792
+ 'mode': {
1793
+ 'type': ['string', 'null'],
1794
+ 'description': 'File mode',
1795
+ },
1796
+ 'is_external': {
1797
+ 'type': ['boolean', 'null'],
1798
+ 'description': 'Whether the file is external',
1799
+ },
1800
+ 'external_type': {
1801
+ 'type': ['string', 'null'],
1802
+ 'description': 'External file type',
1803
+ },
1804
+ 'is_public': {
1805
+ 'type': ['boolean', 'null'],
1806
+ 'description': 'Whether the file is public',
1807
+ },
1808
+ 'public_url_shared': {
1809
+ 'type': ['boolean', 'null'],
1810
+ 'description': 'Whether the public URL is shared',
1811
+ },
1812
+ 'url_private': {
1813
+ 'type': ['string', 'null'],
1814
+ 'description': 'Private URL',
1815
+ },
1816
+ 'url_private_download': {
1817
+ 'type': ['string', 'null'],
1818
+ 'description': 'Private download URL',
1819
+ },
1820
+ 'permalink': {
1821
+ 'type': ['string', 'null'],
1822
+ 'description': 'Permalink',
1823
+ },
1824
+ 'permalink_public': {
1825
+ 'type': ['string', 'null'],
1826
+ 'description': 'Public permalink',
1827
+ },
1828
+ 'created': {
1829
+ 'type': ['integer', 'null'],
1830
+ 'description': 'Unix timestamp of creation',
1831
+ },
1832
+ 'timestamp': {
1833
+ 'type': ['integer', 'null'],
1834
+ 'description': 'Unix timestamp',
1835
+ },
1836
+ },
1837
+ },
1838
+ 'description': 'Files attached to the message',
1839
+ },
1840
+ 'edited': {
1841
+ 'oneOf': [
1842
+ {
1843
+ 'type': 'object',
1844
+ 'description': 'Message edit information',
1845
+ 'properties': {
1846
+ 'user': {
1847
+ 'type': ['string', 'null'],
1848
+ 'description': 'User ID who edited the message',
1849
+ },
1850
+ 'ts': {
1851
+ 'type': ['string', 'null'],
1852
+ 'description': 'Edit timestamp',
1853
+ },
1854
+ },
1855
+ },
1856
+ {'type': 'null'},
1857
+ ],
1858
+ 'description': 'Edit information',
1859
+ },
1860
+ 'bot_id': {
1861
+ 'type': ['string', 'null'],
1862
+ 'description': 'Bot ID if message was sent by a bot',
1863
+ },
1864
+ 'bot_profile': {
1865
+ 'oneOf': [
1866
+ {
1867
+ 'type': 'object',
1868
+ 'description': 'Bot profile information',
1869
+ 'properties': {
1870
+ 'id': {
1871
+ 'type': ['string', 'null'],
1872
+ 'description': 'Bot ID',
1873
+ },
1874
+ 'deleted': {
1875
+ 'type': ['boolean', 'null'],
1876
+ 'description': 'Whether the bot is deleted',
1877
+ },
1878
+ 'name': {
1879
+ 'type': ['string', 'null'],
1880
+ 'description': 'Bot name',
1881
+ },
1882
+ 'updated': {
1883
+ 'type': ['integer', 'null'],
1884
+ 'description': 'Unix timestamp of last update',
1885
+ },
1886
+ 'app_id': {
1887
+ 'type': ['string', 'null'],
1888
+ 'description': 'App ID',
1889
+ },
1890
+ 'team_id': {
1891
+ 'type': ['string', 'null'],
1892
+ 'description': 'Team ID',
1893
+ },
1894
+ },
1895
+ },
1896
+ {'type': 'null'},
1897
+ ],
1898
+ 'description': 'Bot profile information',
1899
+ },
1900
+ 'app_id': {
1901
+ 'type': ['string', 'null'],
1902
+ 'description': 'App ID if message was sent by an app',
1903
+ },
1904
+ 'team': {
1905
+ 'type': ['string', 'null'],
1906
+ 'description': 'Team ID',
1907
+ },
1908
+ },
1909
+ 'x-airbyte-entity-name': 'channel_messages',
1910
+ 'x-airbyte-stream-name': 'channel_messages',
1911
+ },
1912
+ },
1913
+ 'has_more': {
1914
+ 'type': ['boolean', 'null'],
1915
+ 'description': 'Whether there are more messages',
1916
+ },
1917
+ 'pin_count': {
1918
+ 'type': ['integer', 'null'],
1919
+ 'description': 'Number of pinned messages',
1920
+ },
1921
+ 'response_metadata': {
1922
+ 'type': 'object',
1923
+ 'description': 'Response metadata including pagination',
1924
+ 'properties': {
1925
+ 'next_cursor': {
1926
+ 'type': ['string', 'null'],
1927
+ 'description': 'Cursor for next page of results',
1928
+ },
1929
+ },
1930
+ },
1931
+ },
1932
+ },
1933
+ record_extractor='$.messages',
1934
+ meta_extractor={'next_cursor': '$.response_metadata.next_cursor', 'has_more': '$.has_more'},
1935
+ ),
1936
+ },
1937
+ entity_schema={
1938
+ 'type': 'object',
1939
+ 'description': 'Slack message object',
1940
+ 'properties': {
1941
+ 'type': {
1942
+ 'type': ['string', 'null'],
1943
+ 'description': 'Message type',
1944
+ },
1945
+ 'subtype': {
1946
+ 'type': ['string', 'null'],
1947
+ 'description': 'Message subtype',
1948
+ },
1949
+ 'ts': {'type': 'string', 'description': 'Message timestamp (unique identifier)'},
1950
+ 'user': {
1951
+ 'type': ['string', 'null'],
1952
+ 'description': 'User ID who sent the message',
1953
+ },
1954
+ 'text': {
1955
+ 'type': ['string', 'null'],
1956
+ 'description': 'Message text content',
1957
+ },
1958
+ 'thread_ts': {
1959
+ 'type': ['string', 'null'],
1960
+ 'description': 'Thread parent timestamp',
1961
+ },
1962
+ 'reply_count': {
1963
+ 'type': ['integer', 'null'],
1964
+ 'description': 'Number of replies in thread',
1965
+ },
1966
+ 'reply_users_count': {
1967
+ 'type': ['integer', 'null'],
1968
+ 'description': 'Number of unique users who replied',
1969
+ },
1970
+ 'latest_reply': {
1971
+ 'type': ['string', 'null'],
1972
+ 'description': 'Timestamp of latest reply',
1973
+ },
1974
+ 'reply_users': {
1975
+ 'type': ['array', 'null'],
1976
+ 'items': {'type': 'string'},
1977
+ 'description': 'User IDs who replied to the thread',
1978
+ },
1979
+ 'is_locked': {
1980
+ 'type': ['boolean', 'null'],
1981
+ 'description': 'Whether the thread is locked',
1982
+ },
1983
+ 'subscribed': {
1984
+ 'type': ['boolean', 'null'],
1985
+ 'description': 'Whether the user is subscribed to the thread',
1986
+ },
1987
+ 'reactions': {
1988
+ 'type': ['array', 'null'],
1989
+ 'items': {'$ref': '#/components/schemas/Reaction'},
1990
+ 'description': 'Reactions to the message',
1991
+ },
1992
+ 'attachments': {
1993
+ 'type': ['array', 'null'],
1994
+ 'items': {'$ref': '#/components/schemas/Attachment'},
1995
+ 'description': 'Message attachments',
1996
+ },
1997
+ 'blocks': {
1998
+ 'type': ['array', 'null'],
1999
+ 'items': {'type': 'object'},
2000
+ 'description': 'Block kit blocks',
2001
+ },
2002
+ 'files': {
2003
+ 'type': ['array', 'null'],
2004
+ 'items': {'$ref': '#/components/schemas/File'},
2005
+ 'description': 'Files attached to the message',
2006
+ },
2007
+ 'edited': {
2008
+ 'oneOf': [
2009
+ {'$ref': '#/components/schemas/EditedInfo'},
2010
+ {'type': 'null'},
2011
+ ],
2012
+ 'description': 'Edit information',
2013
+ },
2014
+ 'bot_id': {
2015
+ 'type': ['string', 'null'],
2016
+ 'description': 'Bot ID if message was sent by a bot',
2017
+ },
2018
+ 'bot_profile': {
2019
+ 'oneOf': [
2020
+ {'$ref': '#/components/schemas/BotProfile'},
2021
+ {'type': 'null'},
2022
+ ],
2023
+ 'description': 'Bot profile information',
2024
+ },
2025
+ 'app_id': {
2026
+ 'type': ['string', 'null'],
2027
+ 'description': 'App ID if message was sent by an app',
2028
+ },
2029
+ 'team': {
2030
+ 'type': ['string', 'null'],
2031
+ 'description': 'Team ID',
2032
+ },
2033
+ },
2034
+ 'x-airbyte-entity-name': 'channel_messages',
2035
+ 'x-airbyte-stream-name': 'channel_messages',
2036
+ },
2037
+ ),
2038
+ EntityDefinition(
2039
+ name='threads',
2040
+ stream_name='threads',
2041
+ actions=[Action.LIST],
2042
+ endpoints={
2043
+ Action.LIST: EndpointDefinition(
2044
+ method='GET',
2045
+ path='/conversations.replies',
2046
+ action=Action.LIST,
2047
+ description='Returns messages in a thread (thread replies from conversations.replies endpoint)',
2048
+ query_params=[
2049
+ 'channel',
2050
+ 'ts',
2051
+ 'cursor',
2052
+ 'limit',
2053
+ 'oldest',
2054
+ 'latest',
2055
+ 'inclusive',
2056
+ ],
2057
+ query_params_schema={
2058
+ 'channel': {'type': 'string', 'required': True},
2059
+ 'ts': {'type': 'string', 'required': False},
2060
+ 'cursor': {'type': 'string', 'required': False},
2061
+ 'limit': {
2062
+ 'type': 'integer',
2063
+ 'required': False,
2064
+ 'default': 100,
2065
+ },
2066
+ 'oldest': {'type': 'string', 'required': False},
2067
+ 'latest': {'type': 'string', 'required': False},
2068
+ 'inclusive': {
2069
+ 'type': 'boolean',
2070
+ 'required': False,
2071
+ 'default': False,
2072
+ },
2073
+ },
2074
+ response_schema={
2075
+ 'type': 'object',
2076
+ 'description': 'Response containing thread replies',
2077
+ 'properties': {
2078
+ 'ok': {'type': 'boolean', 'description': 'Whether the request was successful'},
2079
+ 'messages': {
2080
+ 'type': 'array',
2081
+ 'items': {
2082
+ 'type': 'object',
2083
+ 'description': 'Slack thread reply message object',
2084
+ 'properties': {
2085
+ 'type': {
2086
+ 'type': ['string', 'null'],
2087
+ 'description': 'Message type',
2088
+ },
2089
+ 'subtype': {
2090
+ 'type': ['string', 'null'],
2091
+ 'description': 'Message subtype',
2092
+ },
2093
+ 'ts': {'type': 'string', 'description': 'Message timestamp (unique identifier)'},
2094
+ 'user': {
2095
+ 'type': ['string', 'null'],
2096
+ 'description': 'User ID who sent the message',
2097
+ },
2098
+ 'text': {
2099
+ 'type': ['string', 'null'],
2100
+ 'description': 'Message text content',
2101
+ },
2102
+ 'thread_ts': {
2103
+ 'type': ['string', 'null'],
2104
+ 'description': 'Thread parent timestamp',
2105
+ },
2106
+ 'parent_user_id': {
2107
+ 'type': ['string', 'null'],
2108
+ 'description': 'User ID of the parent message author (present in thread replies)',
2109
+ },
2110
+ 'reply_count': {
2111
+ 'type': ['integer', 'null'],
2112
+ 'description': 'Number of replies in thread',
2113
+ },
2114
+ 'reply_users_count': {
2115
+ 'type': ['integer', 'null'],
2116
+ 'description': 'Number of unique users who replied',
2117
+ },
2118
+ 'latest_reply': {
2119
+ 'type': ['string', 'null'],
2120
+ 'description': 'Timestamp of latest reply',
2121
+ },
2122
+ 'reply_users': {
2123
+ 'type': ['array', 'null'],
2124
+ 'items': {'type': 'string'},
2125
+ 'description': 'User IDs who replied to the thread',
2126
+ },
2127
+ 'is_locked': {
2128
+ 'type': ['boolean', 'null'],
2129
+ 'description': 'Whether the thread is locked',
2130
+ },
2131
+ 'subscribed': {
2132
+ 'type': ['boolean', 'null'],
2133
+ 'description': 'Whether the user is subscribed to the thread',
2134
+ },
2135
+ 'reactions': {
2136
+ 'type': ['array', 'null'],
2137
+ 'items': {
2138
+ 'type': 'object',
2139
+ 'description': 'Message reaction',
2140
+ 'properties': {
2141
+ 'name': {
2142
+ 'type': ['string', 'null'],
2143
+ 'description': 'Reaction emoji name',
2144
+ },
2145
+ 'users': {
2146
+ 'type': ['array', 'null'],
2147
+ 'items': {'type': 'string'},
2148
+ 'description': 'User IDs who reacted',
2149
+ },
2150
+ 'count': {
2151
+ 'type': ['integer', 'null'],
2152
+ 'description': 'Number of reactions',
2153
+ },
2154
+ },
2155
+ },
2156
+ 'description': 'Reactions to the message',
2157
+ },
2158
+ 'attachments': {
2159
+ 'type': ['array', 'null'],
2160
+ 'items': {
2161
+ 'type': 'object',
1279
2162
  'description': 'Message attachment',
1280
2163
  'properties': {
1281
2164
  'id': {
@@ -1507,17 +2390,13 @@ SlackConnectorModel: ConnectorModel = ConnectorModel(
1507
2390
  'description': 'Team ID',
1508
2391
  },
1509
2392
  },
1510
- 'x-airbyte-entity-name': 'channel_messages',
1511
- 'x-airbyte-stream-name': 'channel_messages',
2393
+ 'x-airbyte-entity-name': 'threads',
2394
+ 'x-airbyte-stream-name': 'threads',
1512
2395
  },
1513
2396
  },
1514
2397
  'has_more': {
1515
2398
  'type': ['boolean', 'null'],
1516
- 'description': 'Whether there are more messages',
1517
- },
1518
- 'pin_count': {
1519
- 'type': ['integer', 'null'],
1520
- 'description': 'Number of pinned messages',
2399
+ 'description': 'Whether there are more replies',
1521
2400
  },
1522
2401
  'response_metadata': {
1523
2402
  'type': 'object',
@@ -1537,7 +2416,7 @@ SlackConnectorModel: ConnectorModel = ConnectorModel(
1537
2416
  },
1538
2417
  entity_schema={
1539
2418
  'type': 'object',
1540
- 'description': 'Slack message object',
2419
+ 'description': 'Slack thread reply message object',
1541
2420
  'properties': {
1542
2421
  'type': {
1543
2422
  'type': ['string', 'null'],
@@ -1560,6 +2439,10 @@ SlackConnectorModel: ConnectorModel = ConnectorModel(
1560
2439
  'type': ['string', 'null'],
1561
2440
  'description': 'Thread parent timestamp',
1562
2441
  },
2442
+ 'parent_user_id': {
2443
+ 'type': ['string', 'null'],
2444
+ 'description': 'User ID of the parent message author (present in thread replies)',
2445
+ },
1563
2446
  'reply_count': {
1564
2447
  'type': ['integer', 'null'],
1565
2448
  'description': 'Number of replies in thread',
@@ -1619,505 +2502,686 @@ SlackConnectorModel: ConnectorModel = ConnectorModel(
1619
2502
  'bot_profile': {
1620
2503
  'oneOf': [
1621
2504
  {'$ref': '#/components/schemas/BotProfile'},
1622
- {'type': 'null'},
1623
- ],
1624
- 'description': 'Bot profile information',
1625
- },
1626
- 'app_id': {
1627
- 'type': ['string', 'null'],
1628
- 'description': 'App ID if message was sent by an app',
1629
- },
1630
- 'team': {
1631
- 'type': ['string', 'null'],
1632
- 'description': 'Team ID',
1633
- },
1634
- },
1635
- 'x-airbyte-entity-name': 'channel_messages',
1636
- 'x-airbyte-stream-name': 'channel_messages',
1637
- },
1638
- ),
1639
- EntityDefinition(
1640
- name='threads',
1641
- stream_name='threads',
1642
- actions=[Action.LIST],
1643
- endpoints={
1644
- Action.LIST: EndpointDefinition(
1645
- method='GET',
1646
- path='/conversations.replies',
1647
- action=Action.LIST,
1648
- description='Returns messages in a thread (thread replies from conversations.replies endpoint)',
1649
- query_params=[
1650
- 'channel',
1651
- 'ts',
1652
- 'cursor',
1653
- 'limit',
1654
- 'oldest',
1655
- 'latest',
1656
- 'inclusive',
1657
- ],
1658
- query_params_schema={
1659
- 'channel': {'type': 'string', 'required': True},
1660
- 'ts': {'type': 'string', 'required': False},
1661
- 'cursor': {'type': 'string', 'required': False},
1662
- 'limit': {
1663
- 'type': 'integer',
1664
- 'required': False,
1665
- 'default': 100,
1666
- },
1667
- 'oldest': {'type': 'string', 'required': False},
1668
- 'latest': {'type': 'string', 'required': False},
1669
- 'inclusive': {
1670
- 'type': 'boolean',
1671
- 'required': False,
1672
- 'default': False,
1673
- },
1674
- },
1675
- response_schema={
1676
- 'type': 'object',
1677
- 'description': 'Response containing thread replies',
1678
- 'properties': {
1679
- 'ok': {'type': 'boolean', 'description': 'Whether the request was successful'},
1680
- 'messages': {
1681
- 'type': 'array',
1682
- 'items': {
1683
- 'type': 'object',
1684
- 'description': 'Slack thread reply message object',
1685
- 'properties': {
1686
- 'type': {
1687
- 'type': ['string', 'null'],
1688
- 'description': 'Message type',
1689
- },
1690
- 'subtype': {
1691
- 'type': ['string', 'null'],
1692
- 'description': 'Message subtype',
1693
- },
1694
- 'ts': {'type': 'string', 'description': 'Message timestamp (unique identifier)'},
1695
- 'user': {
1696
- 'type': ['string', 'null'],
1697
- 'description': 'User ID who sent the message',
1698
- },
1699
- 'text': {
1700
- 'type': ['string', 'null'],
1701
- 'description': 'Message text content',
1702
- },
1703
- 'thread_ts': {
1704
- 'type': ['string', 'null'],
1705
- 'description': 'Thread parent timestamp',
1706
- },
1707
- 'parent_user_id': {
1708
- 'type': ['string', 'null'],
1709
- 'description': 'User ID of the parent message author (present in thread replies)',
1710
- },
1711
- 'reply_count': {
1712
- 'type': ['integer', 'null'],
1713
- 'description': 'Number of replies in thread',
1714
- },
1715
- 'reply_users_count': {
1716
- 'type': ['integer', 'null'],
1717
- 'description': 'Number of unique users who replied',
1718
- },
1719
- 'latest_reply': {
1720
- 'type': ['string', 'null'],
1721
- 'description': 'Timestamp of latest reply',
1722
- },
1723
- 'reply_users': {
1724
- 'type': ['array', 'null'],
1725
- 'items': {'type': 'string'},
1726
- 'description': 'User IDs who replied to the thread',
1727
- },
1728
- 'is_locked': {
1729
- 'type': ['boolean', 'null'],
1730
- 'description': 'Whether the thread is locked',
1731
- },
1732
- 'subscribed': {
1733
- 'type': ['boolean', 'null'],
1734
- 'description': 'Whether the user is subscribed to the thread',
1735
- },
1736
- 'reactions': {
1737
- 'type': ['array', 'null'],
1738
- 'items': {
1739
- 'type': 'object',
1740
- 'description': 'Message reaction',
1741
- 'properties': {
1742
- 'name': {
1743
- 'type': ['string', 'null'],
1744
- 'description': 'Reaction emoji name',
1745
- },
1746
- 'users': {
1747
- 'type': ['array', 'null'],
1748
- 'items': {'type': 'string'},
1749
- 'description': 'User IDs who reacted',
1750
- },
1751
- 'count': {
1752
- 'type': ['integer', 'null'],
1753
- 'description': 'Number of reactions',
1754
- },
1755
- },
1756
- },
1757
- 'description': 'Reactions to the message',
1758
- },
1759
- 'attachments': {
1760
- 'type': ['array', 'null'],
1761
- 'items': {
2505
+ {'type': 'null'},
2506
+ ],
2507
+ 'description': 'Bot profile information',
2508
+ },
2509
+ 'app_id': {
2510
+ 'type': ['string', 'null'],
2511
+ 'description': 'App ID if message was sent by an app',
2512
+ },
2513
+ 'team': {
2514
+ 'type': ['string', 'null'],
2515
+ 'description': 'Team ID',
2516
+ },
2517
+ },
2518
+ 'x-airbyte-entity-name': 'threads',
2519
+ 'x-airbyte-stream-name': 'threads',
2520
+ },
2521
+ ),
2522
+ EntityDefinition(
2523
+ name='messages',
2524
+ actions=[Action.CREATE, Action.UPDATE],
2525
+ endpoints={
2526
+ Action.CREATE: EndpointDefinition(
2527
+ method='POST',
2528
+ path='/chat.postMessage',
2529
+ action=Action.CREATE,
2530
+ description='Posts a message to a public channel, private channel, or direct message conversation',
2531
+ body_fields=[
2532
+ 'channel',
2533
+ 'text',
2534
+ 'thread_ts',
2535
+ 'reply_broadcast',
2536
+ 'unfurl_links',
2537
+ 'unfurl_media',
2538
+ ],
2539
+ request_schema={
2540
+ 'type': 'object',
2541
+ 'description': 'Parameters for creating a message',
2542
+ 'properties': {
2543
+ 'channel': {'type': 'string', 'description': 'Channel ID, private group ID, or user ID to send message to'},
2544
+ 'text': {'type': 'string', 'description': 'Message text content (supports mrkdwn formatting)'},
2545
+ 'thread_ts': {'type': 'string', 'description': 'Thread timestamp to reply to (for threaded messages)'},
2546
+ 'reply_broadcast': {'type': 'boolean', 'description': 'Also post reply to channel when replying to a thread'},
2547
+ 'unfurl_links': {'type': 'boolean', 'description': 'Enable unfurling of primarily text-based content'},
2548
+ 'unfurl_media': {'type': 'boolean', 'description': 'Enable unfurling of media content'},
2549
+ },
2550
+ 'required': ['channel', 'text'],
2551
+ },
2552
+ response_schema={
2553
+ 'type': 'object',
2554
+ 'description': 'Response from creating a message',
2555
+ 'properties': {
2556
+ 'ok': {'type': 'boolean', 'description': 'Whether the request was successful'},
2557
+ 'channel': {
2558
+ 'type': ['string', 'null'],
2559
+ 'description': 'Channel ID where message was posted',
2560
+ },
2561
+ 'ts': {
2562
+ 'type': ['string', 'null'],
2563
+ 'description': 'Message timestamp (unique identifier)',
2564
+ },
2565
+ 'message': {
2566
+ 'type': 'object',
2567
+ 'description': 'A message object returned from create/update operations',
2568
+ 'properties': {
2569
+ 'type': {
2570
+ 'type': ['string', 'null'],
2571
+ 'description': 'Message type',
2572
+ },
2573
+ 'subtype': {
2574
+ 'type': ['string', 'null'],
2575
+ 'description': 'Message subtype',
2576
+ },
2577
+ 'text': {
2578
+ 'type': ['string', 'null'],
2579
+ 'description': 'Message text content',
2580
+ },
2581
+ 'ts': {'type': 'string', 'description': 'Message timestamp (unique identifier)'},
2582
+ 'user': {
2583
+ 'type': ['string', 'null'],
2584
+ 'description': 'User ID who sent the message',
2585
+ },
2586
+ 'bot_id': {
2587
+ 'type': ['string', 'null'],
2588
+ 'description': 'Bot ID if message was sent by a bot',
2589
+ },
2590
+ 'app_id': {
2591
+ 'type': ['string', 'null'],
2592
+ 'description': 'App ID if message was sent by an app',
2593
+ },
2594
+ 'team': {
2595
+ 'type': ['string', 'null'],
2596
+ 'description': 'Team ID',
2597
+ },
2598
+ 'bot_profile': {
2599
+ 'oneOf': [
2600
+ {
1762
2601
  'type': 'object',
1763
- 'description': 'Message attachment',
2602
+ 'description': 'Bot profile information',
1764
2603
  'properties': {
1765
2604
  'id': {
1766
- 'type': ['integer', 'null'],
1767
- 'description': 'Attachment ID',
1768
- },
1769
- 'fallback': {
1770
2605
  'type': ['string', 'null'],
1771
- 'description': 'Fallback text',
2606
+ 'description': 'Bot ID',
1772
2607
  },
1773
- 'color': {
1774
- 'type': ['string', 'null'],
1775
- 'description': 'Attachment color',
2608
+ 'deleted': {
2609
+ 'type': ['boolean', 'null'],
2610
+ 'description': 'Whether the bot is deleted',
1776
2611
  },
1777
- 'pretext': {
2612
+ 'name': {
1778
2613
  'type': ['string', 'null'],
1779
- 'description': 'Pretext',
2614
+ 'description': 'Bot name',
1780
2615
  },
1781
- 'author_name': {
1782
- 'type': ['string', 'null'],
1783
- 'description': 'Author name',
2616
+ 'updated': {
2617
+ 'type': ['integer', 'null'],
2618
+ 'description': 'Unix timestamp of last update',
1784
2619
  },
1785
- 'author_link': {
2620
+ 'app_id': {
1786
2621
  'type': ['string', 'null'],
1787
- 'description': 'Author link',
2622
+ 'description': 'App ID',
1788
2623
  },
1789
- 'author_icon': {
2624
+ 'team_id': {
1790
2625
  'type': ['string', 'null'],
1791
- 'description': 'Author icon URL',
2626
+ 'description': 'Team ID',
1792
2627
  },
1793
- 'title': {
2628
+ },
2629
+ },
2630
+ {'type': 'null'},
2631
+ ],
2632
+ 'description': 'Bot profile information',
2633
+ },
2634
+ },
2635
+ },
2636
+ },
2637
+ },
2638
+ record_extractor='$.message',
2639
+ ),
2640
+ Action.UPDATE: EndpointDefinition(
2641
+ method='POST',
2642
+ path='/chat.update',
2643
+ action=Action.UPDATE,
2644
+ description='Updates an existing message in a channel',
2645
+ body_fields=['channel', 'ts', 'text'],
2646
+ request_schema={
2647
+ 'type': 'object',
2648
+ 'description': 'Parameters for updating a message',
2649
+ 'properties': {
2650
+ 'channel': {'type': 'string', 'description': 'Channel ID containing the message'},
2651
+ 'ts': {'type': 'string', 'description': 'Timestamp of the message to update'},
2652
+ 'text': {'type': 'string', 'description': 'New message text content'},
2653
+ },
2654
+ 'required': ['channel', 'ts', 'text'],
2655
+ },
2656
+ response_schema={
2657
+ 'type': 'object',
2658
+ 'description': 'Response from updating a message',
2659
+ 'properties': {
2660
+ 'ok': {'type': 'boolean', 'description': 'Whether the request was successful'},
2661
+ 'channel': {
2662
+ 'type': ['string', 'null'],
2663
+ 'description': 'Channel ID where message was updated',
2664
+ },
2665
+ 'ts': {
2666
+ 'type': ['string', 'null'],
2667
+ 'description': 'Message timestamp',
2668
+ },
2669
+ 'text': {
2670
+ 'type': ['string', 'null'],
2671
+ 'description': 'Updated message text',
2672
+ },
2673
+ 'message': {
2674
+ 'type': 'object',
2675
+ 'description': 'A message object returned from create/update operations',
2676
+ 'properties': {
2677
+ 'type': {
2678
+ 'type': ['string', 'null'],
2679
+ 'description': 'Message type',
2680
+ },
2681
+ 'subtype': {
2682
+ 'type': ['string', 'null'],
2683
+ 'description': 'Message subtype',
2684
+ },
2685
+ 'text': {
2686
+ 'type': ['string', 'null'],
2687
+ 'description': 'Message text content',
2688
+ },
2689
+ 'ts': {'type': 'string', 'description': 'Message timestamp (unique identifier)'},
2690
+ 'user': {
2691
+ 'type': ['string', 'null'],
2692
+ 'description': 'User ID who sent the message',
2693
+ },
2694
+ 'bot_id': {
2695
+ 'type': ['string', 'null'],
2696
+ 'description': 'Bot ID if message was sent by a bot',
2697
+ },
2698
+ 'app_id': {
2699
+ 'type': ['string', 'null'],
2700
+ 'description': 'App ID if message was sent by an app',
2701
+ },
2702
+ 'team': {
2703
+ 'type': ['string', 'null'],
2704
+ 'description': 'Team ID',
2705
+ },
2706
+ 'bot_profile': {
2707
+ 'oneOf': [
2708
+ {
2709
+ 'type': 'object',
2710
+ 'description': 'Bot profile information',
2711
+ 'properties': {
2712
+ 'id': {
1794
2713
  'type': ['string', 'null'],
1795
- 'description': 'Attachment title',
2714
+ 'description': 'Bot ID',
1796
2715
  },
1797
- 'title_link': {
1798
- 'type': ['string', 'null'],
1799
- 'description': 'Title link',
2716
+ 'deleted': {
2717
+ 'type': ['boolean', 'null'],
2718
+ 'description': 'Whether the bot is deleted',
1800
2719
  },
1801
- 'text': {
2720
+ 'name': {
1802
2721
  'type': ['string', 'null'],
1803
- 'description': 'Attachment text',
2722
+ 'description': 'Bot name',
1804
2723
  },
1805
- 'fields': {
1806
- 'type': ['array', 'null'],
1807
- 'items': {'type': 'object'},
1808
- 'description': 'Attachment fields',
2724
+ 'updated': {
2725
+ 'type': ['integer', 'null'],
2726
+ 'description': 'Unix timestamp of last update',
1809
2727
  },
1810
- 'image_url': {
2728
+ 'app_id': {
1811
2729
  'type': ['string', 'null'],
1812
- 'description': 'Image URL',
2730
+ 'description': 'App ID',
1813
2731
  },
1814
- 'thumb_url': {
2732
+ 'team_id': {
1815
2733
  'type': ['string', 'null'],
1816
- 'description': 'Thumbnail URL',
2734
+ 'description': 'Team ID',
1817
2735
  },
1818
- 'footer': {
2736
+ },
2737
+ },
2738
+ {'type': 'null'},
2739
+ ],
2740
+ 'description': 'Bot profile information',
2741
+ },
2742
+ },
2743
+ },
2744
+ },
2745
+ },
2746
+ record_extractor='$.message',
2747
+ ),
2748
+ },
2749
+ ),
2750
+ EntityDefinition(
2751
+ name='channel_topics',
2752
+ actions=[Action.CREATE],
2753
+ endpoints={
2754
+ Action.CREATE: EndpointDefinition(
2755
+ method='POST',
2756
+ path='/conversations.setTopic',
2757
+ action=Action.CREATE,
2758
+ description='Sets the topic for a channel',
2759
+ body_fields=['channel', 'topic'],
2760
+ request_schema={
2761
+ 'type': 'object',
2762
+ 'description': 'Parameters for setting channel topic',
2763
+ 'properties': {
2764
+ 'channel': {'type': 'string', 'description': 'Channel ID to set topic for'},
2765
+ 'topic': {'type': 'string', 'description': 'New topic text (max 250 characters)'},
2766
+ },
2767
+ 'required': ['channel', 'topic'],
2768
+ },
2769
+ response_schema={
2770
+ 'type': 'object',
2771
+ 'description': 'Response from setting channel topic',
2772
+ 'properties': {
2773
+ 'ok': {'type': 'boolean', 'description': 'Whether the request was successful'},
2774
+ 'channel': {
2775
+ 'type': 'object',
2776
+ 'description': 'Slack channel object',
2777
+ 'properties': {
2778
+ 'id': {'type': 'string', 'description': 'Unique channel identifier'},
2779
+ 'name': {
2780
+ 'type': ['string', 'null'],
2781
+ 'description': 'Channel name',
2782
+ },
2783
+ 'is_channel': {
2784
+ 'type': ['boolean', 'null'],
2785
+ 'description': 'Whether this is a channel',
2786
+ },
2787
+ 'is_group': {
2788
+ 'type': ['boolean', 'null'],
2789
+ 'description': 'Whether this is a group',
2790
+ },
2791
+ 'is_im': {
2792
+ 'type': ['boolean', 'null'],
2793
+ 'description': 'Whether this is a direct message',
2794
+ },
2795
+ 'is_mpim': {
2796
+ 'type': ['boolean', 'null'],
2797
+ 'description': 'Whether this is a multi-party direct message',
2798
+ },
2799
+ 'is_private': {
2800
+ 'type': ['boolean', 'null'],
2801
+ 'description': 'Whether the channel is private',
2802
+ },
2803
+ 'created': {
2804
+ 'type': ['integer', 'null'],
2805
+ 'description': 'Unix timestamp of channel creation',
2806
+ },
2807
+ 'is_archived': {
2808
+ 'type': ['boolean', 'null'],
2809
+ 'description': 'Whether the channel is archived',
2810
+ },
2811
+ 'is_general': {
2812
+ 'type': ['boolean', 'null'],
2813
+ 'description': 'Whether this is the general channel',
2814
+ },
2815
+ 'unlinked': {
2816
+ 'type': ['integer', 'null'],
2817
+ 'description': 'Unlinked timestamp',
2818
+ },
2819
+ 'name_normalized': {
2820
+ 'type': ['string', 'null'],
2821
+ 'description': 'Normalized channel name',
2822
+ },
2823
+ 'is_shared': {
2824
+ 'type': ['boolean', 'null'],
2825
+ 'description': 'Whether the channel is shared',
2826
+ },
2827
+ 'is_org_shared': {
2828
+ 'type': ['boolean', 'null'],
2829
+ 'description': 'Whether the channel is shared across the organization',
2830
+ },
2831
+ 'is_pending_ext_shared': {
2832
+ 'type': ['boolean', 'null'],
2833
+ 'description': 'Whether external sharing is pending',
2834
+ },
2835
+ 'pending_shared': {
2836
+ 'type': ['array', 'null'],
2837
+ 'items': {'type': 'string'},
2838
+ 'description': 'Pending shared teams',
2839
+ },
2840
+ 'context_team_id': {
2841
+ 'type': ['string', 'null'],
2842
+ 'description': 'Context team ID',
2843
+ },
2844
+ 'updated': {
2845
+ 'type': ['integer', 'null'],
2846
+ 'description': 'Unix timestamp of last update',
2847
+ },
2848
+ 'creator': {
2849
+ 'type': ['string', 'null'],
2850
+ 'description': 'User ID of the channel creator',
2851
+ },
2852
+ 'is_ext_shared': {
2853
+ 'type': ['boolean', 'null'],
2854
+ 'description': 'Whether the channel is externally shared',
2855
+ },
2856
+ 'shared_team_ids': {
2857
+ 'type': ['array', 'null'],
2858
+ 'items': {'type': 'string'},
2859
+ 'description': 'IDs of teams the channel is shared with',
2860
+ },
2861
+ 'pending_connected_team_ids': {
2862
+ 'type': ['array', 'null'],
2863
+ 'items': {'type': 'string'},
2864
+ 'description': 'IDs of teams with pending connection',
2865
+ },
2866
+ 'is_member': {
2867
+ 'type': ['boolean', 'null'],
2868
+ 'description': 'Whether the authenticated user is a member',
2869
+ },
2870
+ 'topic': {
2871
+ 'oneOf': [
2872
+ {
2873
+ 'type': 'object',
2874
+ 'description': 'Channel topic information',
2875
+ 'properties': {
2876
+ 'value': {
1819
2877
  'type': ['string', 'null'],
1820
- 'description': 'Footer text',
2878
+ 'description': 'Topic text',
1821
2879
  },
1822
- 'footer_icon': {
2880
+ 'creator': {
1823
2881
  'type': ['string', 'null'],
1824
- 'description': 'Footer icon URL',
2882
+ 'description': 'User ID who set the topic',
1825
2883
  },
1826
- 'ts': {
1827
- 'type': ['string', 'integer', 'null'],
1828
- 'description': 'Timestamp',
2884
+ 'last_set': {
2885
+ 'type': ['integer', 'null'],
2886
+ 'description': 'Unix timestamp when topic was last set',
1829
2887
  },
1830
2888
  },
1831
2889
  },
1832
- 'description': 'Message attachments',
1833
- },
1834
- 'blocks': {
1835
- 'type': ['array', 'null'],
1836
- 'items': {'type': 'object'},
1837
- 'description': 'Block kit blocks',
1838
- },
1839
- 'files': {
1840
- 'type': ['array', 'null'],
1841
- 'items': {
2890
+ {'type': 'null'},
2891
+ ],
2892
+ 'description': 'Channel topic',
2893
+ },
2894
+ 'purpose': {
2895
+ 'oneOf': [
2896
+ {
1842
2897
  'type': 'object',
1843
- 'description': 'File object',
2898
+ 'description': 'Channel purpose information',
1844
2899
  'properties': {
1845
- 'id': {
1846
- 'type': ['string', 'null'],
1847
- 'description': 'File ID',
1848
- },
1849
- 'name': {
1850
- 'type': ['string', 'null'],
1851
- 'description': 'File name',
1852
- },
1853
- 'title': {
1854
- 'type': ['string', 'null'],
1855
- 'description': 'File title',
1856
- },
1857
- 'mimetype': {
1858
- 'type': ['string', 'null'],
1859
- 'description': 'MIME type',
1860
- },
1861
- 'filetype': {
1862
- 'type': ['string', 'null'],
1863
- 'description': 'File type',
1864
- },
1865
- 'pretty_type': {
2900
+ 'value': {
1866
2901
  'type': ['string', 'null'],
1867
- 'description': 'Human-readable file type',
2902
+ 'description': 'Purpose text',
1868
2903
  },
1869
- 'user': {
2904
+ 'creator': {
1870
2905
  'type': ['string', 'null'],
1871
- 'description': 'User ID who uploaded the file',
2906
+ 'description': 'User ID who set the purpose',
1872
2907
  },
1873
- 'size': {
2908
+ 'last_set': {
1874
2909
  'type': ['integer', 'null'],
1875
- 'description': 'File size in bytes',
1876
- },
1877
- 'mode': {
1878
- 'type': ['string', 'null'],
1879
- 'description': 'File mode',
1880
- },
1881
- 'is_external': {
1882
- 'type': ['boolean', 'null'],
1883
- 'description': 'Whether the file is external',
1884
- },
1885
- 'external_type': {
1886
- 'type': ['string', 'null'],
1887
- 'description': 'External file type',
1888
- },
1889
- 'is_public': {
1890
- 'type': ['boolean', 'null'],
1891
- 'description': 'Whether the file is public',
1892
- },
1893
- 'public_url_shared': {
1894
- 'type': ['boolean', 'null'],
1895
- 'description': 'Whether the public URL is shared',
1896
- },
1897
- 'url_private': {
1898
- 'type': ['string', 'null'],
1899
- 'description': 'Private URL',
1900
- },
1901
- 'url_private_download': {
1902
- 'type': ['string', 'null'],
1903
- 'description': 'Private download URL',
1904
- },
1905
- 'permalink': {
1906
- 'type': ['string', 'null'],
1907
- 'description': 'Permalink',
2910
+ 'description': 'Unix timestamp when purpose was last set',
1908
2911
  },
1909
- 'permalink_public': {
2912
+ },
2913
+ },
2914
+ {'type': 'null'},
2915
+ ],
2916
+ 'description': 'Channel purpose',
2917
+ },
2918
+ 'previous_names': {
2919
+ 'type': ['array', 'null'],
2920
+ 'items': {'type': 'string'},
2921
+ 'description': 'Previous channel names',
2922
+ },
2923
+ 'num_members': {
2924
+ 'type': ['integer', 'null'],
2925
+ 'description': 'Number of members in the channel',
2926
+ },
2927
+ 'parent_conversation': {
2928
+ 'type': ['string', 'null'],
2929
+ 'description': 'Parent conversation ID if this is a thread',
2930
+ },
2931
+ 'properties': {
2932
+ 'type': ['object', 'null'],
2933
+ 'description': 'Additional channel properties',
2934
+ },
2935
+ 'is_thread_only': {
2936
+ 'type': ['boolean', 'null'],
2937
+ 'description': 'Whether the channel is thread-only',
2938
+ },
2939
+ 'is_read_only': {
2940
+ 'type': ['boolean', 'null'],
2941
+ 'description': 'Whether the channel is read-only',
2942
+ },
2943
+ },
2944
+ 'x-airbyte-entity-name': 'channels',
2945
+ 'x-airbyte-stream-name': 'channels',
2946
+ },
2947
+ },
2948
+ },
2949
+ record_extractor='$.channel',
2950
+ ),
2951
+ },
2952
+ ),
2953
+ EntityDefinition(
2954
+ name='channel_purposes',
2955
+ actions=[Action.CREATE],
2956
+ endpoints={
2957
+ Action.CREATE: EndpointDefinition(
2958
+ method='POST',
2959
+ path='/conversations.setPurpose',
2960
+ action=Action.CREATE,
2961
+ description='Sets the purpose for a channel',
2962
+ body_fields=['channel', 'purpose'],
2963
+ request_schema={
2964
+ 'type': 'object',
2965
+ 'description': 'Parameters for setting channel purpose',
2966
+ 'properties': {
2967
+ 'channel': {'type': 'string', 'description': 'Channel ID to set purpose for'},
2968
+ 'purpose': {'type': 'string', 'description': 'New purpose text (max 250 characters)'},
2969
+ },
2970
+ 'required': ['channel', 'purpose'],
2971
+ },
2972
+ response_schema={
2973
+ 'type': 'object',
2974
+ 'description': 'Response from setting channel purpose',
2975
+ 'properties': {
2976
+ 'ok': {'type': 'boolean', 'description': 'Whether the request was successful'},
2977
+ 'channel': {
2978
+ 'type': 'object',
2979
+ 'description': 'Slack channel object',
2980
+ 'properties': {
2981
+ 'id': {'type': 'string', 'description': 'Unique channel identifier'},
2982
+ 'name': {
2983
+ 'type': ['string', 'null'],
2984
+ 'description': 'Channel name',
2985
+ },
2986
+ 'is_channel': {
2987
+ 'type': ['boolean', 'null'],
2988
+ 'description': 'Whether this is a channel',
2989
+ },
2990
+ 'is_group': {
2991
+ 'type': ['boolean', 'null'],
2992
+ 'description': 'Whether this is a group',
2993
+ },
2994
+ 'is_im': {
2995
+ 'type': ['boolean', 'null'],
2996
+ 'description': 'Whether this is a direct message',
2997
+ },
2998
+ 'is_mpim': {
2999
+ 'type': ['boolean', 'null'],
3000
+ 'description': 'Whether this is a multi-party direct message',
3001
+ },
3002
+ 'is_private': {
3003
+ 'type': ['boolean', 'null'],
3004
+ 'description': 'Whether the channel is private',
3005
+ },
3006
+ 'created': {
3007
+ 'type': ['integer', 'null'],
3008
+ 'description': 'Unix timestamp of channel creation',
3009
+ },
3010
+ 'is_archived': {
3011
+ 'type': ['boolean', 'null'],
3012
+ 'description': 'Whether the channel is archived',
3013
+ },
3014
+ 'is_general': {
3015
+ 'type': ['boolean', 'null'],
3016
+ 'description': 'Whether this is the general channel',
3017
+ },
3018
+ 'unlinked': {
3019
+ 'type': ['integer', 'null'],
3020
+ 'description': 'Unlinked timestamp',
3021
+ },
3022
+ 'name_normalized': {
3023
+ 'type': ['string', 'null'],
3024
+ 'description': 'Normalized channel name',
3025
+ },
3026
+ 'is_shared': {
3027
+ 'type': ['boolean', 'null'],
3028
+ 'description': 'Whether the channel is shared',
3029
+ },
3030
+ 'is_org_shared': {
3031
+ 'type': ['boolean', 'null'],
3032
+ 'description': 'Whether the channel is shared across the organization',
3033
+ },
3034
+ 'is_pending_ext_shared': {
3035
+ 'type': ['boolean', 'null'],
3036
+ 'description': 'Whether external sharing is pending',
3037
+ },
3038
+ 'pending_shared': {
3039
+ 'type': ['array', 'null'],
3040
+ 'items': {'type': 'string'},
3041
+ 'description': 'Pending shared teams',
3042
+ },
3043
+ 'context_team_id': {
3044
+ 'type': ['string', 'null'],
3045
+ 'description': 'Context team ID',
3046
+ },
3047
+ 'updated': {
3048
+ 'type': ['integer', 'null'],
3049
+ 'description': 'Unix timestamp of last update',
3050
+ },
3051
+ 'creator': {
3052
+ 'type': ['string', 'null'],
3053
+ 'description': 'User ID of the channel creator',
3054
+ },
3055
+ 'is_ext_shared': {
3056
+ 'type': ['boolean', 'null'],
3057
+ 'description': 'Whether the channel is externally shared',
3058
+ },
3059
+ 'shared_team_ids': {
3060
+ 'type': ['array', 'null'],
3061
+ 'items': {'type': 'string'},
3062
+ 'description': 'IDs of teams the channel is shared with',
3063
+ },
3064
+ 'pending_connected_team_ids': {
3065
+ 'type': ['array', 'null'],
3066
+ 'items': {'type': 'string'},
3067
+ 'description': 'IDs of teams with pending connection',
3068
+ },
3069
+ 'is_member': {
3070
+ 'type': ['boolean', 'null'],
3071
+ 'description': 'Whether the authenticated user is a member',
3072
+ },
3073
+ 'topic': {
3074
+ 'oneOf': [
3075
+ {
3076
+ 'type': 'object',
3077
+ 'description': 'Channel topic information',
3078
+ 'properties': {
3079
+ 'value': {
1910
3080
  'type': ['string', 'null'],
1911
- 'description': 'Public permalink',
3081
+ 'description': 'Topic text',
1912
3082
  },
1913
- 'created': {
1914
- 'type': ['integer', 'null'],
1915
- 'description': 'Unix timestamp of creation',
3083
+ 'creator': {
3084
+ 'type': ['string', 'null'],
3085
+ 'description': 'User ID who set the topic',
1916
3086
  },
1917
- 'timestamp': {
3087
+ 'last_set': {
1918
3088
  'type': ['integer', 'null'],
1919
- 'description': 'Unix timestamp',
3089
+ 'description': 'Unix timestamp when topic was last set',
1920
3090
  },
1921
3091
  },
1922
3092
  },
1923
- 'description': 'Files attached to the message',
1924
- },
1925
- 'edited': {
1926
- 'oneOf': [
1927
- {
1928
- 'type': 'object',
1929
- 'description': 'Message edit information',
1930
- 'properties': {
1931
- 'user': {
1932
- 'type': ['string', 'null'],
1933
- 'description': 'User ID who edited the message',
1934
- },
1935
- 'ts': {
1936
- 'type': ['string', 'null'],
1937
- 'description': 'Edit timestamp',
1938
- },
3093
+ {'type': 'null'},
3094
+ ],
3095
+ 'description': 'Channel topic',
3096
+ },
3097
+ 'purpose': {
3098
+ 'oneOf': [
3099
+ {
3100
+ 'type': 'object',
3101
+ 'description': 'Channel purpose information',
3102
+ 'properties': {
3103
+ 'value': {
3104
+ 'type': ['string', 'null'],
3105
+ 'description': 'Purpose text',
1939
3106
  },
1940
- },
1941
- {'type': 'null'},
1942
- ],
1943
- 'description': 'Edit information',
1944
- },
1945
- 'bot_id': {
1946
- 'type': ['string', 'null'],
1947
- 'description': 'Bot ID if message was sent by a bot',
1948
- },
1949
- 'bot_profile': {
1950
- 'oneOf': [
1951
- {
1952
- 'type': 'object',
1953
- 'description': 'Bot profile information',
1954
- 'properties': {
1955
- 'id': {
1956
- 'type': ['string', 'null'],
1957
- 'description': 'Bot ID',
1958
- },
1959
- 'deleted': {
1960
- 'type': ['boolean', 'null'],
1961
- 'description': 'Whether the bot is deleted',
1962
- },
1963
- 'name': {
1964
- 'type': ['string', 'null'],
1965
- 'description': 'Bot name',
1966
- },
1967
- 'updated': {
1968
- 'type': ['integer', 'null'],
1969
- 'description': 'Unix timestamp of last update',
1970
- },
1971
- 'app_id': {
1972
- 'type': ['string', 'null'],
1973
- 'description': 'App ID',
1974
- },
1975
- 'team_id': {
1976
- 'type': ['string', 'null'],
1977
- 'description': 'Team ID',
1978
- },
3107
+ 'creator': {
3108
+ 'type': ['string', 'null'],
3109
+ 'description': 'User ID who set the purpose',
3110
+ },
3111
+ 'last_set': {
3112
+ 'type': ['integer', 'null'],
3113
+ 'description': 'Unix timestamp when purpose was last set',
1979
3114
  },
1980
3115
  },
1981
- {'type': 'null'},
1982
- ],
1983
- 'description': 'Bot profile information',
1984
- },
1985
- 'app_id': {
1986
- 'type': ['string', 'null'],
1987
- 'description': 'App ID if message was sent by an app',
1988
- },
1989
- 'team': {
1990
- 'type': ['string', 'null'],
1991
- 'description': 'Team ID',
1992
- },
3116
+ },
3117
+ {'type': 'null'},
3118
+ ],
3119
+ 'description': 'Channel purpose',
1993
3120
  },
1994
- 'x-airbyte-entity-name': 'threads',
1995
- 'x-airbyte-stream-name': 'threads',
1996
- },
1997
- },
1998
- 'has_more': {
1999
- 'type': ['boolean', 'null'],
2000
- 'description': 'Whether there are more replies',
2001
- },
2002
- 'response_metadata': {
2003
- 'type': 'object',
2004
- 'description': 'Response metadata including pagination',
2005
- 'properties': {
2006
- 'next_cursor': {
3121
+ 'previous_names': {
3122
+ 'type': ['array', 'null'],
3123
+ 'items': {'type': 'string'},
3124
+ 'description': 'Previous channel names',
3125
+ },
3126
+ 'num_members': {
3127
+ 'type': ['integer', 'null'],
3128
+ 'description': 'Number of members in the channel',
3129
+ },
3130
+ 'parent_conversation': {
2007
3131
  'type': ['string', 'null'],
2008
- 'description': 'Cursor for next page of results',
3132
+ 'description': 'Parent conversation ID if this is a thread',
3133
+ },
3134
+ 'properties': {
3135
+ 'type': ['object', 'null'],
3136
+ 'description': 'Additional channel properties',
3137
+ },
3138
+ 'is_thread_only': {
3139
+ 'type': ['boolean', 'null'],
3140
+ 'description': 'Whether the channel is thread-only',
3141
+ },
3142
+ 'is_read_only': {
3143
+ 'type': ['boolean', 'null'],
3144
+ 'description': 'Whether the channel is read-only',
2009
3145
  },
2010
3146
  },
3147
+ 'x-airbyte-entity-name': 'channels',
3148
+ 'x-airbyte-stream-name': 'channels',
2011
3149
  },
2012
3150
  },
2013
3151
  },
2014
- record_extractor='$.messages',
2015
- meta_extractor={'next_cursor': '$.response_metadata.next_cursor', 'has_more': '$.has_more'},
3152
+ record_extractor='$.channel',
2016
3153
  ),
2017
3154
  },
2018
- entity_schema={
2019
- 'type': 'object',
2020
- 'description': 'Slack thread reply message object',
2021
- 'properties': {
2022
- 'type': {
2023
- 'type': ['string', 'null'],
2024
- 'description': 'Message type',
2025
- },
2026
- 'subtype': {
2027
- 'type': ['string', 'null'],
2028
- 'description': 'Message subtype',
2029
- },
2030
- 'ts': {'type': 'string', 'description': 'Message timestamp (unique identifier)'},
2031
- 'user': {
2032
- 'type': ['string', 'null'],
2033
- 'description': 'User ID who sent the message',
2034
- },
2035
- 'text': {
2036
- 'type': ['string', 'null'],
2037
- 'description': 'Message text content',
2038
- },
2039
- 'thread_ts': {
2040
- 'type': ['string', 'null'],
2041
- 'description': 'Thread parent timestamp',
2042
- },
2043
- 'parent_user_id': {
2044
- 'type': ['string', 'null'],
2045
- 'description': 'User ID of the parent message author (present in thread replies)',
2046
- },
2047
- 'reply_count': {
2048
- 'type': ['integer', 'null'],
2049
- 'description': 'Number of replies in thread',
2050
- },
2051
- 'reply_users_count': {
2052
- 'type': ['integer', 'null'],
2053
- 'description': 'Number of unique users who replied',
2054
- },
2055
- 'latest_reply': {
2056
- 'type': ['string', 'null'],
2057
- 'description': 'Timestamp of latest reply',
2058
- },
2059
- 'reply_users': {
2060
- 'type': ['array', 'null'],
2061
- 'items': {'type': 'string'},
2062
- 'description': 'User IDs who replied to the thread',
2063
- },
2064
- 'is_locked': {
2065
- 'type': ['boolean', 'null'],
2066
- 'description': 'Whether the thread is locked',
2067
- },
2068
- 'subscribed': {
2069
- 'type': ['boolean', 'null'],
2070
- 'description': 'Whether the user is subscribed to the thread',
2071
- },
2072
- 'reactions': {
2073
- 'type': ['array', 'null'],
2074
- 'items': {'$ref': '#/components/schemas/Reaction'},
2075
- 'description': 'Reactions to the message',
2076
- },
2077
- 'attachments': {
2078
- 'type': ['array', 'null'],
2079
- 'items': {'$ref': '#/components/schemas/Attachment'},
2080
- 'description': 'Message attachments',
2081
- },
2082
- 'blocks': {
2083
- 'type': ['array', 'null'],
2084
- 'items': {'type': 'object'},
2085
- 'description': 'Block kit blocks',
2086
- },
2087
- 'files': {
2088
- 'type': ['array', 'null'],
2089
- 'items': {'$ref': '#/components/schemas/File'},
2090
- 'description': 'Files attached to the message',
2091
- },
2092
- 'edited': {
2093
- 'oneOf': [
2094
- {'$ref': '#/components/schemas/EditedInfo'},
2095
- {'type': 'null'},
2096
- ],
2097
- 'description': 'Edit information',
2098
- },
2099
- 'bot_id': {
2100
- 'type': ['string', 'null'],
2101
- 'description': 'Bot ID if message was sent by a bot',
2102
- },
2103
- 'bot_profile': {
2104
- 'oneOf': [
2105
- {'$ref': '#/components/schemas/BotProfile'},
2106
- {'type': 'null'},
2107
- ],
2108
- 'description': 'Bot profile information',
2109
- },
2110
- 'app_id': {
2111
- 'type': ['string', 'null'],
2112
- 'description': 'App ID if message was sent by an app',
3155
+ ),
3156
+ EntityDefinition(
3157
+ name='reactions',
3158
+ actions=[Action.CREATE],
3159
+ endpoints={
3160
+ Action.CREATE: EndpointDefinition(
3161
+ method='POST',
3162
+ path='/reactions.add',
3163
+ action=Action.CREATE,
3164
+ description='Adds a reaction (emoji) to a message',
3165
+ body_fields=['channel', 'timestamp', 'name'],
3166
+ request_schema={
3167
+ 'type': 'object',
3168
+ 'description': 'Parameters for adding a reaction',
3169
+ 'properties': {
3170
+ 'channel': {'type': 'string', 'description': 'Channel ID containing the message'},
3171
+ 'timestamp': {'type': 'string', 'description': 'Timestamp of the message to react to'},
3172
+ 'name': {'type': 'string', 'description': 'Reaction emoji name (without colons, e.g., "thumbsup")'},
3173
+ },
3174
+ 'required': ['channel', 'timestamp', 'name'],
2113
3175
  },
2114
- 'team': {
2115
- 'type': ['string', 'null'],
2116
- 'description': 'Team ID',
3176
+ response_schema={
3177
+ 'type': 'object',
3178
+ 'description': 'Response from adding a reaction',
3179
+ 'properties': {
3180
+ 'ok': {'type': 'boolean', 'description': 'Whether the request was successful'},
3181
+ },
2117
3182
  },
2118
- },
2119
- 'x-airbyte-entity-name': 'threads',
2120
- 'x-airbyte-stream-name': 'threads',
3183
+ record_extractor='$',
3184
+ ),
2121
3185
  },
2122
3186
  ),
2123
3187
  ],