@stream-io/feeds-client 1.1.0 → 1.3.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/CHANGELOG.md +19 -0
- package/dist/cjs/index.js +477 -466
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/react-bindings.js +454 -449
- package/dist/cjs/react-bindings.js.map +1 -1
- package/dist/es/index.mjs +440 -466
- package/dist/es/index.mjs.map +1 -1
- package/dist/es/react-bindings.mjs +447 -479
- package/dist/es/react-bindings.mjs.map +1 -1
- package/dist/feeds-client-CqD2zQW0.mjs +8791 -0
- package/dist/feeds-client-CqD2zQW0.mjs.map +1 -0
- package/dist/feeds-client-DXci2Pbn.js +8957 -0
- package/dist/feeds-client-DXci2Pbn.js.map +1 -0
- package/dist/tsconfig.lib.tsbuildinfo +1 -1
- package/dist/types/common/real-time/StableWSConnection.d.ts +3 -3
- package/dist/types/common/real-time/StableWSConnection.d.ts.map +1 -1
- package/dist/types/feed/event-handlers/notification-feed/handle-notification-feed-updated.d.ts.map +1 -1
- package/dist/types/feed/feed.d.ts +2 -2
- package/dist/types/feed/feed.d.ts.map +1 -1
- package/dist/types/feeds-client/feeds-client.d.ts +3 -2
- package/dist/types/feeds-client/feeds-client.d.ts.map +1 -1
- package/dist/types/gen/feeds/FeedsApi.d.ts +4 -1
- package/dist/types/gen/feeds/FeedsApi.d.ts.map +1 -1
- package/dist/types/gen/model-decoders/event-decoder-mapping.d.ts.map +1 -1
- package/dist/types/gen/models/index.d.ts +63 -1
- package/dist/types/gen/models/index.d.ts.map +1 -1
- package/package.json +15 -15
- package/src/feed/event-handlers/notification-feed/handle-notification-feed-updated.ts +1 -5
- package/src/feed/feed.ts +1 -0
- package/src/feeds-client/feeds-client.ts +104 -45
- package/src/gen/feeds/FeedsApi.ts +26 -0
- package/src/gen/model-decoders/decoders.ts +20 -0
- package/src/gen/model-decoders/event-decoder-mapping.ts +3 -0
- package/src/gen/models/index.ts +105 -1
- package/dist/feeds-client-C1c6lcS3.js +0 -8799
- package/dist/feeds-client-C1c6lcS3.js.map +0 -1
- package/dist/feeds-client-jtUTE4AC.mjs +0 -8783
- package/dist/feeds-client-jtUTE4AC.mjs.map +0 -1
|
@@ -865,6 +865,7 @@ export class FeedsClient extends FeedsApi {
|
|
|
865
865
|
typeof handleFeedUpdated
|
|
866
866
|
>[0]);
|
|
867
867
|
}
|
|
868
|
+
this.checkIfOwnFieldsChanged(response.feed, !!args[0].enrich_own_fields);
|
|
868
869
|
return response;
|
|
869
870
|
};
|
|
870
871
|
|
|
@@ -1094,6 +1095,14 @@ export class FeedsClient extends FeedsApi {
|
|
|
1094
1095
|
feeds.forEach((f) => handleFollowUpdated.bind(f)(response, false));
|
|
1095
1096
|
});
|
|
1096
1097
|
|
|
1098
|
+
this.checkIfOwnFieldsChanged(
|
|
1099
|
+
response.follow.source_feed,
|
|
1100
|
+
!!request.enrich_own_fields,
|
|
1101
|
+
);
|
|
1102
|
+
this.checkIfOwnFieldsChanged(
|
|
1103
|
+
response.follow.target_feed,
|
|
1104
|
+
!!request.enrich_own_fields,
|
|
1105
|
+
);
|
|
1097
1106
|
return response;
|
|
1098
1107
|
}
|
|
1099
1108
|
|
|
@@ -1115,7 +1124,14 @@ export class FeedsClient extends FeedsApi {
|
|
|
1115
1124
|
async follow(request: FollowRequest) {
|
|
1116
1125
|
const response = await super.follow(request);
|
|
1117
1126
|
this.updateStateFromFollows([response.follow], !!request.enrich_own_fields);
|
|
1118
|
-
|
|
1127
|
+
this.checkIfOwnFieldsChanged(
|
|
1128
|
+
response.follow.source_feed,
|
|
1129
|
+
!!request.enrich_own_fields,
|
|
1130
|
+
);
|
|
1131
|
+
this.checkIfOwnFieldsChanged(
|
|
1132
|
+
response.follow.target_feed,
|
|
1133
|
+
!!request.enrich_own_fields,
|
|
1134
|
+
);
|
|
1119
1135
|
return response;
|
|
1120
1136
|
}
|
|
1121
1137
|
|
|
@@ -1127,7 +1143,11 @@ export class FeedsClient extends FeedsApi {
|
|
|
1127
1143
|
async followBatch(request: FollowBatchRequest) {
|
|
1128
1144
|
const response = await super.followBatch(request);
|
|
1129
1145
|
this.updateStateFromFollows(response.follows, !!request.enrich_own_fields);
|
|
1130
|
-
|
|
1146
|
+
const enrichOwnFields = !!request.enrich_own_fields;
|
|
1147
|
+
for (const follow of response.follows) {
|
|
1148
|
+
this.checkIfOwnFieldsChanged(follow.source_feed, enrichOwnFields);
|
|
1149
|
+
this.checkIfOwnFieldsChanged(follow.target_feed, enrichOwnFields);
|
|
1150
|
+
}
|
|
1131
1151
|
return response;
|
|
1132
1152
|
}
|
|
1133
1153
|
|
|
@@ -1135,7 +1155,12 @@ export class FeedsClient extends FeedsApi {
|
|
|
1135
1155
|
const response = await super.getOrCreateFollows(request);
|
|
1136
1156
|
|
|
1137
1157
|
this.updateStateFromFollows(response.created, !!request.enrich_own_fields);
|
|
1138
|
-
|
|
1158
|
+
const enrichOwnFields = !!request.enrich_own_fields;
|
|
1159
|
+
const allFollows = [...response.created, ...response.follows];
|
|
1160
|
+
for (const follow of allFollows) {
|
|
1161
|
+
this.checkIfOwnFieldsChanged(follow.source_feed, enrichOwnFields);
|
|
1162
|
+
this.checkIfOwnFieldsChanged(follow.target_feed, enrichOwnFields);
|
|
1163
|
+
}
|
|
1139
1164
|
return response;
|
|
1140
1165
|
}
|
|
1141
1166
|
|
|
@@ -1146,14 +1171,25 @@ export class FeedsClient extends FeedsApi {
|
|
|
1146
1171
|
}) {
|
|
1147
1172
|
const response = await super.unfollow(request);
|
|
1148
1173
|
this.updateStateFromUnfollows([response.follow]);
|
|
1149
|
-
|
|
1174
|
+
this.checkIfOwnFieldsChanged(
|
|
1175
|
+
response.follow.source_feed,
|
|
1176
|
+
!!request.enrich_own_fields,
|
|
1177
|
+
);
|
|
1178
|
+
this.checkIfOwnFieldsChanged(
|
|
1179
|
+
response.follow.target_feed,
|
|
1180
|
+
!!request.enrich_own_fields,
|
|
1181
|
+
);
|
|
1150
1182
|
return response;
|
|
1151
1183
|
}
|
|
1152
1184
|
|
|
1153
1185
|
async getOrCreateUnfollows(request: UnfollowBatchRequest) {
|
|
1154
1186
|
const response = await super.getOrCreateUnfollows(request);
|
|
1155
1187
|
this.updateStateFromUnfollows(response.follows);
|
|
1156
|
-
|
|
1188
|
+
const enrichOwnFields = !!request.enrich_own_fields;
|
|
1189
|
+
for (const follow of response.follows) {
|
|
1190
|
+
this.checkIfOwnFieldsChanged(follow.source_feed, enrichOwnFields);
|
|
1191
|
+
this.checkIfOwnFieldsChanged(follow.target_feed, enrichOwnFields);
|
|
1192
|
+
}
|
|
1157
1193
|
return response;
|
|
1158
1194
|
}
|
|
1159
1195
|
|
|
@@ -1253,6 +1289,7 @@ export class FeedsClient extends FeedsApi {
|
|
|
1253
1289
|
feed.onNewActivity = options.onNewActivity;
|
|
1254
1290
|
}
|
|
1255
1291
|
|
|
1292
|
+
let wasFullUpdate = isCreated;
|
|
1256
1293
|
if (!feed.currentState.watch) {
|
|
1257
1294
|
if (!isCreated && data) {
|
|
1258
1295
|
if (
|
|
@@ -1260,54 +1297,76 @@ export class FeedsClient extends FeedsApi {
|
|
|
1260
1297
|
data.updated_at.getTime()
|
|
1261
1298
|
) {
|
|
1262
1299
|
handleFeedUpdated.call(feed, { feed: data });
|
|
1263
|
-
|
|
1264
|
-
(feed.currentState.updated_at?.getTime() ?? 0) ===
|
|
1265
|
-
data.updated_at.getTime()
|
|
1266
|
-
) {
|
|
1267
|
-
const fieldsToUpdateData: Array<keyof FeedResponse> = [];
|
|
1268
|
-
const fieldChecks: Array<
|
|
1269
|
-
[
|
|
1270
|
-
(
|
|
1271
|
-
| 'own_capabilities'
|
|
1272
|
-
| 'own_follows'
|
|
1273
|
-
| 'own_membership'
|
|
1274
|
-
| 'own_followings'
|
|
1275
|
-
),
|
|
1276
|
-
(currentState: FeedState, newState: FeedResponse) => boolean,
|
|
1277
|
-
]
|
|
1278
|
-
> = [
|
|
1279
|
-
['own_capabilities', isOwnCapabilitiesEqual],
|
|
1280
|
-
['own_follows', isOwnFollowsEqual],
|
|
1281
|
-
['own_membership', isOwnMembershipEqual],
|
|
1282
|
-
['own_followings', isOwnFollowingsEqual],
|
|
1283
|
-
];
|
|
1284
|
-
fieldChecks.forEach(([field, isEqual]) => {
|
|
1285
|
-
if (
|
|
1286
|
-
fieldsToUpdate.includes(field) &&
|
|
1287
|
-
!isEqual(feed.currentState, data)
|
|
1288
|
-
) {
|
|
1289
|
-
fieldsToUpdateData.push(field);
|
|
1290
|
-
}
|
|
1291
|
-
});
|
|
1292
|
-
if (fieldsToUpdateData.length > 0) {
|
|
1293
|
-
const fieldsToUpdatePayload = fieldsToUpdateData.reduce(
|
|
1294
|
-
(acc: Partial<FeedResponse>, field) => {
|
|
1295
|
-
// @ts-expect-error TODO: fix this
|
|
1296
|
-
acc[field] = data[field];
|
|
1297
|
-
return acc;
|
|
1298
|
-
},
|
|
1299
|
-
{},
|
|
1300
|
-
);
|
|
1301
|
-
feed.state.partialNext(fieldsToUpdatePayload);
|
|
1302
|
-
}
|
|
1300
|
+
wasFullUpdate = true;
|
|
1303
1301
|
}
|
|
1304
1302
|
}
|
|
1305
1303
|
if (watch) handleWatchStarted.call(feed);
|
|
1306
1304
|
}
|
|
1307
1305
|
|
|
1306
|
+
// If we didn't do a full update, check if own_* fields have changed
|
|
1307
|
+
if (!wasFullUpdate && data && fieldsToUpdate.length > 0) {
|
|
1308
|
+
const fieldsToUpdateData: Array<keyof FeedResponse> = [];
|
|
1309
|
+
const fieldChecks: Array<
|
|
1310
|
+
[
|
|
1311
|
+
(
|
|
1312
|
+
| 'own_capabilities'
|
|
1313
|
+
| 'own_follows'
|
|
1314
|
+
| 'own_membership'
|
|
1315
|
+
| 'own_followings'
|
|
1316
|
+
),
|
|
1317
|
+
(currentState: FeedState, newState: FeedResponse) => boolean,
|
|
1318
|
+
]
|
|
1319
|
+
> = [
|
|
1320
|
+
['own_capabilities', isOwnCapabilitiesEqual],
|
|
1321
|
+
['own_follows', isOwnFollowsEqual],
|
|
1322
|
+
['own_membership', isOwnMembershipEqual],
|
|
1323
|
+
['own_followings', isOwnFollowingsEqual],
|
|
1324
|
+
];
|
|
1325
|
+
fieldChecks.forEach(([field, isEqual]) => {
|
|
1326
|
+
if (
|
|
1327
|
+
fieldsToUpdate.includes(field) &&
|
|
1328
|
+
!isEqual(feed.currentState, data)
|
|
1329
|
+
) {
|
|
1330
|
+
fieldsToUpdateData.push(field);
|
|
1331
|
+
}
|
|
1332
|
+
});
|
|
1333
|
+
if (fieldsToUpdateData.length > 0) {
|
|
1334
|
+
const fieldsToUpdatePayload = fieldsToUpdateData.reduce(
|
|
1335
|
+
(acc: Partial<FeedResponse>, field) => {
|
|
1336
|
+
// @ts-expect-error TODO: fix this
|
|
1337
|
+
acc[field] = data[field];
|
|
1338
|
+
return acc;
|
|
1339
|
+
},
|
|
1340
|
+
{},
|
|
1341
|
+
);
|
|
1342
|
+
feed.state.partialNext(fieldsToUpdatePayload);
|
|
1343
|
+
}
|
|
1344
|
+
}
|
|
1345
|
+
|
|
1308
1346
|
return feed;
|
|
1309
1347
|
};
|
|
1310
1348
|
|
|
1349
|
+
// Used when updating from HTTP responses to check if own_* fields have changed
|
|
1350
|
+
// It'll do a state update if WS update ran before HTTP, but WS doesn't have own_* fields
|
|
1351
|
+
private checkIfOwnFieldsChanged(
|
|
1352
|
+
feed: FeedResponse,
|
|
1353
|
+
enrichOwnFields: boolean,
|
|
1354
|
+
) {
|
|
1355
|
+
if (!enrichOwnFields || !this.activeFeeds[feed.feed]) return false;
|
|
1356
|
+
|
|
1357
|
+
this.getOrCreateActiveFeed({
|
|
1358
|
+
group: feed.group_id,
|
|
1359
|
+
id: feed.id,
|
|
1360
|
+
data: feed,
|
|
1361
|
+
fieldsToUpdate: [
|
|
1362
|
+
'own_capabilities',
|
|
1363
|
+
'own_follows',
|
|
1364
|
+
'own_membership',
|
|
1365
|
+
'own_followings',
|
|
1366
|
+
],
|
|
1367
|
+
});
|
|
1368
|
+
}
|
|
1369
|
+
|
|
1311
1370
|
private findAllActiveFeedsByActivityId(activityId: string) {
|
|
1312
1371
|
return [
|
|
1313
1372
|
...Object.values(this.activeFeeds),
|
|
@@ -113,6 +113,8 @@ import type {
|
|
|
113
113
|
Response,
|
|
114
114
|
RestoreActivityRequest,
|
|
115
115
|
RestoreActivityResponse,
|
|
116
|
+
RestoreCommentRequest,
|
|
117
|
+
RestoreCommentResponse,
|
|
116
118
|
SearchUserGroupsResponse,
|
|
117
119
|
SharedLocationResponse,
|
|
118
120
|
SharedLocationsResponse,
|
|
@@ -1379,6 +1381,30 @@ export class FeedsApi {
|
|
|
1379
1381
|
return { ...response.body, metadata: response.metadata };
|
|
1380
1382
|
}
|
|
1381
1383
|
|
|
1384
|
+
async restoreComment(
|
|
1385
|
+
request: RestoreCommentRequest & { id: string },
|
|
1386
|
+
): Promise<StreamResponse<RestoreCommentResponse>> {
|
|
1387
|
+
const pathParams = {
|
|
1388
|
+
id: request?.id,
|
|
1389
|
+
};
|
|
1390
|
+
const body = {};
|
|
1391
|
+
|
|
1392
|
+
const response = await this.apiClient.sendRequest<
|
|
1393
|
+
StreamResponse<RestoreCommentResponse>
|
|
1394
|
+
>(
|
|
1395
|
+
'POST',
|
|
1396
|
+
'/api/v2/feeds/comments/{id}/restore',
|
|
1397
|
+
pathParams,
|
|
1398
|
+
undefined,
|
|
1399
|
+
body,
|
|
1400
|
+
'application/json',
|
|
1401
|
+
);
|
|
1402
|
+
|
|
1403
|
+
decoders.RestoreCommentResponse?.(response.body);
|
|
1404
|
+
|
|
1405
|
+
return { ...response.body, metadata: response.metadata };
|
|
1406
|
+
}
|
|
1407
|
+
|
|
1382
1408
|
async deleteFeed(request: {
|
|
1383
1409
|
feed_group_id: string;
|
|
1384
1410
|
feed_id: string;
|
|
@@ -685,6 +685,17 @@ decoders.CommentResponse = (input?: Record<string, any>) => {
|
|
|
685
685
|
return decode(typeMappings, input);
|
|
686
686
|
};
|
|
687
687
|
|
|
688
|
+
decoders.CommentRestoredEvent = (input?: Record<string, any>) => {
|
|
689
|
+
const typeMappings: TypeMapping = {
|
|
690
|
+
created_at: { type: 'DatetimeType', isSingle: true },
|
|
691
|
+
|
|
692
|
+
comment: { type: 'CommentResponse', isSingle: true },
|
|
693
|
+
|
|
694
|
+
received_at: { type: 'DatetimeType', isSingle: true },
|
|
695
|
+
};
|
|
696
|
+
return decode(typeMappings, input);
|
|
697
|
+
};
|
|
698
|
+
|
|
688
699
|
decoders.CommentUpdatedEvent = (input?: Record<string, any>) => {
|
|
689
700
|
const typeMappings: TypeMapping = {
|
|
690
701
|
created_at: { type: 'DatetimeType', isSingle: true },
|
|
@@ -1707,6 +1718,15 @@ decoders.RestoreActivityResponse = (input?: Record<string, any>) => {
|
|
|
1707
1718
|
return decode(typeMappings, input);
|
|
1708
1719
|
};
|
|
1709
1720
|
|
|
1721
|
+
decoders.RestoreCommentResponse = (input?: Record<string, any>) => {
|
|
1722
|
+
const typeMappings: TypeMapping = {
|
|
1723
|
+
activity: { type: 'ActivityResponse', isSingle: true },
|
|
1724
|
+
|
|
1725
|
+
comment: { type: 'CommentResponse', isSingle: true },
|
|
1726
|
+
};
|
|
1727
|
+
return decode(typeMappings, input);
|
|
1728
|
+
};
|
|
1729
|
+
|
|
1710
1730
|
decoders.ReviewQueueItemResponse = (input?: Record<string, any>) => {
|
|
1711
1731
|
const typeMappings: TypeMapping = {
|
|
1712
1732
|
created_at: { type: 'DatetimeType', isSingle: true },
|
|
@@ -73,6 +73,9 @@ const eventDecoderMapping: Record<
|
|
|
73
73
|
'feeds.comment.reaction.updated': (data: Record<string, any>) =>
|
|
74
74
|
decoders.CommentReactionUpdatedEvent(data),
|
|
75
75
|
|
|
76
|
+
'feeds.comment.restored': (data: Record<string, any>) =>
|
|
77
|
+
decoders.CommentRestoredEvent(data),
|
|
78
|
+
|
|
76
79
|
'feeds.comment.updated': (data: Record<string, any>) =>
|
|
77
80
|
decoders.CommentUpdatedEvent(data),
|
|
78
81
|
|
package/src/gen/models/index.ts
CHANGED
|
@@ -8,6 +8,16 @@ export interface AIImageConfig {
|
|
|
8
8
|
async?: boolean;
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
+
export interface AIImageLabelDefinition {
|
|
12
|
+
description: string;
|
|
13
|
+
|
|
14
|
+
group: string;
|
|
15
|
+
|
|
16
|
+
key: string;
|
|
17
|
+
|
|
18
|
+
label: string;
|
|
19
|
+
}
|
|
20
|
+
|
|
11
21
|
export interface AITextConfig {
|
|
12
22
|
enabled: boolean;
|
|
13
23
|
|
|
@@ -59,7 +69,7 @@ export interface AWSRekognitionRule {
|
|
|
59
69
|
|
|
60
70
|
min_confidence: number;
|
|
61
71
|
|
|
62
|
-
subclassifications?: Record<string,
|
|
72
|
+
subclassifications?: Record<string, any>;
|
|
63
73
|
}
|
|
64
74
|
|
|
65
75
|
export interface AcceptFeedMemberInviteRequest {}
|
|
@@ -1508,6 +1518,8 @@ export interface ChannelConfigWithInfo {
|
|
|
1508
1518
|
|
|
1509
1519
|
automod_thresholds?: Thresholds;
|
|
1510
1520
|
|
|
1521
|
+
chat_preferences?: ChatPreferences;
|
|
1522
|
+
|
|
1511
1523
|
grants?: Record<string, string[]>;
|
|
1512
1524
|
}
|
|
1513
1525
|
|
|
@@ -1612,6 +1624,8 @@ export interface ChannelPushPreferencesResponse {
|
|
|
1612
1624
|
chat_level?: string;
|
|
1613
1625
|
|
|
1614
1626
|
disabled_until?: Date;
|
|
1627
|
+
|
|
1628
|
+
chat_preferences?: ChatPreferencesResponse;
|
|
1615
1629
|
}
|
|
1616
1630
|
|
|
1617
1631
|
export interface ChannelResponse {
|
|
@@ -1672,6 +1686,56 @@ export interface ChannelResponse {
|
|
|
1672
1686
|
truncated_by?: UserResponse;
|
|
1673
1687
|
}
|
|
1674
1688
|
|
|
1689
|
+
export interface ChatPreferences {
|
|
1690
|
+
channel_mentions?: string;
|
|
1691
|
+
|
|
1692
|
+
default_preference?: string;
|
|
1693
|
+
|
|
1694
|
+
direct_mentions?: string;
|
|
1695
|
+
|
|
1696
|
+
distinct_channel_messages?: string;
|
|
1697
|
+
|
|
1698
|
+
group_mentions?: string;
|
|
1699
|
+
|
|
1700
|
+
here_mentions?: string;
|
|
1701
|
+
|
|
1702
|
+
role_mentions?: string;
|
|
1703
|
+
|
|
1704
|
+
thread_replies?: string;
|
|
1705
|
+
}
|
|
1706
|
+
|
|
1707
|
+
export interface ChatPreferencesInput {
|
|
1708
|
+
channel_mentions?: 'all' | 'none';
|
|
1709
|
+
|
|
1710
|
+
default_preference?: 'all' | 'none';
|
|
1711
|
+
|
|
1712
|
+
direct_mentions?: 'all' | 'none';
|
|
1713
|
+
|
|
1714
|
+
group_mentions?: 'all' | 'none';
|
|
1715
|
+
|
|
1716
|
+
here_mentions?: 'all' | 'none';
|
|
1717
|
+
|
|
1718
|
+
role_mentions?: 'all' | 'none';
|
|
1719
|
+
|
|
1720
|
+
thread_replies?: 'all' | 'none';
|
|
1721
|
+
}
|
|
1722
|
+
|
|
1723
|
+
export interface ChatPreferencesResponse {
|
|
1724
|
+
channel_mentions?: string;
|
|
1725
|
+
|
|
1726
|
+
default_preference?: string;
|
|
1727
|
+
|
|
1728
|
+
direct_mentions?: string;
|
|
1729
|
+
|
|
1730
|
+
group_mentions?: string;
|
|
1731
|
+
|
|
1732
|
+
here_mentions?: string;
|
|
1733
|
+
|
|
1734
|
+
role_mentions?: string;
|
|
1735
|
+
|
|
1736
|
+
thread_replies?: string;
|
|
1737
|
+
}
|
|
1738
|
+
|
|
1675
1739
|
export interface ClosedCaptionRuleParameters {
|
|
1676
1740
|
threshold?: number;
|
|
1677
1741
|
|
|
@@ -1868,6 +1932,24 @@ export interface CommentResponse {
|
|
|
1868
1932
|
reaction_groups?: Record<string, FeedsReactionGroupResponse>;
|
|
1869
1933
|
}
|
|
1870
1934
|
|
|
1935
|
+
export interface CommentRestoredEvent {
|
|
1936
|
+
created_at: Date;
|
|
1937
|
+
|
|
1938
|
+
fid: string;
|
|
1939
|
+
|
|
1940
|
+
comment: CommentResponse;
|
|
1941
|
+
|
|
1942
|
+
custom: Record<string, any>;
|
|
1943
|
+
|
|
1944
|
+
type: string;
|
|
1945
|
+
|
|
1946
|
+
feed_visibility?: string;
|
|
1947
|
+
|
|
1948
|
+
received_at?: Date;
|
|
1949
|
+
|
|
1950
|
+
user?: UserResponseCommonFields;
|
|
1951
|
+
}
|
|
1952
|
+
|
|
1871
1953
|
export interface CommentUpdatedEvent {
|
|
1872
1954
|
created_at: Date;
|
|
1873
1955
|
|
|
@@ -1903,6 +1985,8 @@ export interface ConfigResponse {
|
|
|
1903
1985
|
|
|
1904
1986
|
supported_video_call_harm_types: string[];
|
|
1905
1987
|
|
|
1988
|
+
ai_image_label_definitions?: AIImageLabelDefinition[];
|
|
1989
|
+
|
|
1906
1990
|
ai_image_config?: AIImageConfig;
|
|
1907
1991
|
|
|
1908
1992
|
ai_image_subclassifications?: Record<string, string[]>;
|
|
@@ -2953,6 +3037,8 @@ export interface FilterConfigResponse {
|
|
|
2953
3037
|
llm_labels: string[];
|
|
2954
3038
|
|
|
2955
3039
|
ai_text_labels?: string[];
|
|
3040
|
+
|
|
3041
|
+
config_keys?: string[];
|
|
2956
3042
|
}
|
|
2957
3043
|
|
|
2958
3044
|
export interface FlagCountRuleParameters {
|
|
@@ -4349,6 +4435,8 @@ export interface PushPreferenceInput {
|
|
|
4349
4435
|
|
|
4350
4436
|
user_id?: string;
|
|
4351
4437
|
|
|
4438
|
+
chat_preferences?: ChatPreferencesInput;
|
|
4439
|
+
|
|
4352
4440
|
feeds_preferences?: FeedsPreferences;
|
|
4353
4441
|
}
|
|
4354
4442
|
|
|
@@ -4361,6 +4449,8 @@ export interface PushPreferencesResponse {
|
|
|
4361
4449
|
|
|
4362
4450
|
feeds_level?: string;
|
|
4363
4451
|
|
|
4452
|
+
chat_preferences?: ChatPreferencesResponse;
|
|
4453
|
+
|
|
4364
4454
|
feeds_preferences?: FeedsPreferencesResponse;
|
|
4365
4455
|
}
|
|
4366
4456
|
|
|
@@ -4944,6 +5034,16 @@ export interface RestoreActivityResponse {
|
|
|
4944
5034
|
activity: ActivityResponse;
|
|
4945
5035
|
}
|
|
4946
5036
|
|
|
5037
|
+
export interface RestoreCommentRequest {}
|
|
5038
|
+
|
|
5039
|
+
export interface RestoreCommentResponse {
|
|
5040
|
+
duration: string;
|
|
5041
|
+
|
|
5042
|
+
activity: ActivityResponse;
|
|
5043
|
+
|
|
5044
|
+
comment: CommentResponse;
|
|
5045
|
+
}
|
|
5046
|
+
|
|
4947
5047
|
export interface ReviewQueueItemResponse {
|
|
4948
5048
|
ai_text_severity: string;
|
|
4949
5049
|
|
|
@@ -5021,6 +5121,8 @@ export interface RingSettingsResponse {
|
|
|
5021
5121
|
}
|
|
5022
5122
|
|
|
5023
5123
|
export interface RuleBuilderAction {
|
|
5124
|
+
skip_inbox?: boolean;
|
|
5125
|
+
|
|
5024
5126
|
type?:
|
|
5025
5127
|
| 'ban_user'
|
|
5026
5128
|
| 'flag_user'
|
|
@@ -6389,6 +6491,7 @@ export type WSClientEvent =
|
|
|
6389
6491
|
| ({ type: 'feeds.comment.reaction.added' } & CommentReactionAddedEvent)
|
|
6390
6492
|
| ({ type: 'feeds.comment.reaction.deleted' } & CommentReactionDeletedEvent)
|
|
6391
6493
|
| ({ type: 'feeds.comment.reaction.updated' } & CommentReactionUpdatedEvent)
|
|
6494
|
+
| ({ type: 'feeds.comment.restored' } & CommentRestoredEvent)
|
|
6392
6495
|
| ({ type: 'feeds.comment.updated' } & CommentUpdatedEvent)
|
|
6393
6496
|
| ({ type: 'feeds.feed.created' } & FeedCreatedEvent)
|
|
6394
6497
|
| ({ type: 'feeds.feed.deleted' } & FeedDeletedEvent)
|
|
@@ -6446,6 +6549,7 @@ export type WSEvent =
|
|
|
6446
6549
|
| ({ type: 'feeds.comment.reaction.added' } & CommentReactionAddedEvent)
|
|
6447
6550
|
| ({ type: 'feeds.comment.reaction.deleted' } & CommentReactionDeletedEvent)
|
|
6448
6551
|
| ({ type: 'feeds.comment.reaction.updated' } & CommentReactionUpdatedEvent)
|
|
6552
|
+
| ({ type: 'feeds.comment.restored' } & CommentRestoredEvent)
|
|
6449
6553
|
| ({ type: 'feeds.comment.updated' } & CommentUpdatedEvent)
|
|
6450
6554
|
| ({ type: 'feeds.feed.created' } & FeedCreatedEvent)
|
|
6451
6555
|
| ({ type: 'feeds.feed.deleted' } & FeedDeletedEvent)
|