@stream-io/node-sdk 0.7.41 → 0.7.43
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +284 -10
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.mjs +284 -10
- package/dist/index.es.mjs.map +1 -1
- package/dist/src/gen/chat/ChatApi.d.ts +5 -4
- package/dist/src/gen/common/CommonApi.d.ts +32 -1
- package/dist/src/gen/feeds/FeedApi.d.ts +2 -1
- package/dist/src/gen/feeds/FeedsApi.d.ts +10 -3
- package/dist/src/gen/models/index.d.ts +374 -50
- package/package.json +1 -1
- package/src/gen/chat/ChatApi.ts +37 -8
- package/src/gen/common/CommonApi.ts +199 -0
- package/src/gen/feeds/FeedApi.ts +12 -0
- package/src/gen/feeds/FeedsApi.ts +62 -3
- package/src/gen/model-decoders/decoders.ts +180 -2
- package/src/gen/models/index.ts +658 -90
- package/src/gen/moderation/ModerationApi.ts +2 -1
package/dist/index.cjs.js
CHANGED
|
@@ -275,6 +275,12 @@ decoders.AddReactionResponse = (input) => {
|
|
|
275
275
|
};
|
|
276
276
|
return decode(typeMappings, input);
|
|
277
277
|
};
|
|
278
|
+
decoders.AddUserGroupMembersResponse = (input) => {
|
|
279
|
+
const typeMappings = {
|
|
280
|
+
user_group: { type: 'UserGroupResponse', isSingle: true },
|
|
281
|
+
};
|
|
282
|
+
return decode(typeMappings, input);
|
|
283
|
+
};
|
|
278
284
|
decoders.AggregatedActivityResponse = (input) => {
|
|
279
285
|
const typeMappings = {
|
|
280
286
|
created_at: { type: 'DatetimeType', isSingle: true },
|
|
@@ -836,6 +842,7 @@ decoders.CallStatsParticipantSession = (input) => {
|
|
|
836
842
|
decoders.CallStatsReportReadyEvent = (input) => {
|
|
837
843
|
const typeMappings = {
|
|
838
844
|
created_at: { type: 'DatetimeType', isSingle: true },
|
|
845
|
+
participants_overview: { type: 'CallStatsParticipant', isSingle: false },
|
|
839
846
|
};
|
|
840
847
|
return decode(typeMappings, input);
|
|
841
848
|
};
|
|
@@ -1378,6 +1385,12 @@ decoders.CreateSIPTrunkResponse = (input) => {
|
|
|
1378
1385
|
};
|
|
1379
1386
|
return decode(typeMappings, input);
|
|
1380
1387
|
};
|
|
1388
|
+
decoders.CreateUserGroupResponse = (input) => {
|
|
1389
|
+
const typeMappings = {
|
|
1390
|
+
user_group: { type: 'UserGroupResponse', isSingle: true },
|
|
1391
|
+
};
|
|
1392
|
+
return decode(typeMappings, input);
|
|
1393
|
+
};
|
|
1381
1394
|
decoders.CustomCheckResponse = (input) => {
|
|
1382
1395
|
const typeMappings = {
|
|
1383
1396
|
item: { type: 'ReviewQueueItemResponse', isSingle: true },
|
|
@@ -1574,6 +1587,13 @@ decoders.FeedGroupResponse = (input) => {
|
|
|
1574
1587
|
};
|
|
1575
1588
|
return decode(typeMappings, input);
|
|
1576
1589
|
};
|
|
1590
|
+
decoders.FeedGroupRestoredEvent = (input) => {
|
|
1591
|
+
const typeMappings = {
|
|
1592
|
+
created_at: { type: 'DatetimeType', isSingle: true },
|
|
1593
|
+
received_at: { type: 'DatetimeType', isSingle: true },
|
|
1594
|
+
};
|
|
1595
|
+
return decode(typeMappings, input);
|
|
1596
|
+
};
|
|
1577
1597
|
decoders.FeedMemberAddedEvent = (input) => {
|
|
1578
1598
|
const typeMappings = {
|
|
1579
1599
|
created_at: { type: 'DatetimeType', isSingle: true },
|
|
@@ -2002,6 +2022,12 @@ decoders.GetThreadResponse = (input) => {
|
|
|
2002
2022
|
};
|
|
2003
2023
|
return decode(typeMappings, input);
|
|
2004
2024
|
};
|
|
2025
|
+
decoders.GetUserGroupResponse = (input) => {
|
|
2026
|
+
const typeMappings = {
|
|
2027
|
+
user_group: { type: 'UserGroupResponse', isSingle: true },
|
|
2028
|
+
};
|
|
2029
|
+
return decode(typeMappings, input);
|
|
2030
|
+
};
|
|
2005
2031
|
decoders.GoLiveResponse = (input) => {
|
|
2006
2032
|
const typeMappings = {
|
|
2007
2033
|
call: { type: 'CallResponse', isSingle: true },
|
|
@@ -2148,9 +2174,25 @@ decoders.ListTranscriptionsResponse = (input) => {
|
|
|
2148
2174
|
};
|
|
2149
2175
|
return decode(typeMappings, input);
|
|
2150
2176
|
};
|
|
2177
|
+
decoders.ListUserGroupsResponse = (input) => {
|
|
2178
|
+
const typeMappings = {
|
|
2179
|
+
user_groups: { type: 'UserGroupResponse', isSingle: false },
|
|
2180
|
+
};
|
|
2181
|
+
return decode(typeMappings, input);
|
|
2182
|
+
};
|
|
2151
2183
|
decoders.MarkReadResponse = (input) => {
|
|
2152
2184
|
const typeMappings = {
|
|
2153
|
-
event: { type: '
|
|
2185
|
+
event: { type: 'MarkReadResponseEvent', isSingle: true },
|
|
2186
|
+
};
|
|
2187
|
+
return decode(typeMappings, input);
|
|
2188
|
+
};
|
|
2189
|
+
decoders.MarkReadResponseEvent = (input) => {
|
|
2190
|
+
const typeMappings = {
|
|
2191
|
+
created_at: { type: 'DatetimeType', isSingle: true },
|
|
2192
|
+
channel_last_message_at: { type: 'DatetimeType', isSingle: true },
|
|
2193
|
+
channel: { type: 'ChannelResponse', isSingle: true },
|
|
2194
|
+
thread: { type: 'ThreadResponse', isSingle: true },
|
|
2195
|
+
user: { type: 'UserResponseCommonFields', isSingle: true },
|
|
2154
2196
|
};
|
|
2155
2197
|
return decode(typeMappings, input);
|
|
2156
2198
|
};
|
|
@@ -2281,7 +2323,7 @@ decoders.MessageNewEvent = (input) => {
|
|
|
2281
2323
|
decoders.MessageReadEvent = (input) => {
|
|
2282
2324
|
const typeMappings = {
|
|
2283
2325
|
created_at: { type: 'DatetimeType', isSingle: true },
|
|
2284
|
-
|
|
2326
|
+
received_at: { type: 'DatetimeType', isSingle: true },
|
|
2285
2327
|
channel: { type: 'ChannelResponse', isSingle: true },
|
|
2286
2328
|
thread: { type: 'ThreadResponse', isSingle: true },
|
|
2287
2329
|
user: { type: 'UserResponseCommonFields', isSingle: true },
|
|
@@ -2417,6 +2459,13 @@ decoders.ModerationRuleV2Response = (input) => {
|
|
|
2417
2459
|
};
|
|
2418
2460
|
return decode(typeMappings, input);
|
|
2419
2461
|
};
|
|
2462
|
+
decoders.ModerationRulesTriggeredEvent = (input) => {
|
|
2463
|
+
const typeMappings = {
|
|
2464
|
+
created_at: { type: 'DatetimeType', isSingle: true },
|
|
2465
|
+
received_at: { type: 'DatetimeType', isSingle: true },
|
|
2466
|
+
};
|
|
2467
|
+
return decode(typeMappings, input);
|
|
2468
|
+
};
|
|
2420
2469
|
decoders.MuteChannelResponse = (input) => {
|
|
2421
2470
|
const typeMappings = {
|
|
2422
2471
|
channel_mutes: { type: 'ChannelMute', isSingle: false },
|
|
@@ -2836,6 +2885,12 @@ decoders.QueryModerationRulesResponse = (input) => {
|
|
|
2836
2885
|
};
|
|
2837
2886
|
return decode(typeMappings, input);
|
|
2838
2887
|
};
|
|
2888
|
+
decoders.QueryPinnedActivitiesResponse = (input) => {
|
|
2889
|
+
const typeMappings = {
|
|
2890
|
+
pinned_activities: { type: 'ActivityPinResponse', isSingle: false },
|
|
2891
|
+
};
|
|
2892
|
+
return decode(typeMappings, input);
|
|
2893
|
+
};
|
|
2839
2894
|
decoders.QueryPollsResponse = (input) => {
|
|
2840
2895
|
const typeMappings = {
|
|
2841
2896
|
polls: { type: 'PollResponseData', isSingle: false },
|
|
@@ -3011,6 +3066,12 @@ decoders.ReminderUpdatedEvent = (input) => {
|
|
|
3011
3066
|
};
|
|
3012
3067
|
return decode(typeMappings, input);
|
|
3013
3068
|
};
|
|
3069
|
+
decoders.RemoveUserGroupMembersResponse = (input) => {
|
|
3070
|
+
const typeMappings = {
|
|
3071
|
+
user_group: { type: 'UserGroupResponse', isSingle: true },
|
|
3072
|
+
};
|
|
3073
|
+
return decode(typeMappings, input);
|
|
3074
|
+
};
|
|
3014
3075
|
decoders.ResolveSipInboundResponse = (input) => {
|
|
3015
3076
|
const typeMappings = {
|
|
3016
3077
|
sip_routing_rule: { type: 'SIPInboundRoutingRuleResponse', isSingle: true },
|
|
@@ -3024,6 +3085,12 @@ decoders.RestoreActivityResponse = (input) => {
|
|
|
3024
3085
|
};
|
|
3025
3086
|
return decode(typeMappings, input);
|
|
3026
3087
|
};
|
|
3088
|
+
decoders.RestoreFeedGroupResponse = (input) => {
|
|
3089
|
+
const typeMappings = {
|
|
3090
|
+
feed_group: { type: 'FeedGroupResponse', isSingle: true },
|
|
3091
|
+
};
|
|
3092
|
+
return decode(typeMappings, input);
|
|
3093
|
+
};
|
|
3027
3094
|
decoders.ReviewQueueItemNewEvent = (input) => {
|
|
3028
3095
|
const typeMappings = {
|
|
3029
3096
|
created_at: { type: 'DatetimeType', isSingle: true },
|
|
@@ -3117,6 +3184,12 @@ decoders.SearchResultMessage = (input) => {
|
|
|
3117
3184
|
};
|
|
3118
3185
|
return decode(typeMappings, input);
|
|
3119
3186
|
};
|
|
3187
|
+
decoders.SearchUserGroupsResponse = (input) => {
|
|
3188
|
+
const typeMappings = {
|
|
3189
|
+
user_groups: { type: 'UserGroupResponse', isSingle: false },
|
|
3190
|
+
};
|
|
3191
|
+
return decode(typeMappings, input);
|
|
3192
|
+
};
|
|
3120
3193
|
decoders.Segment = (input) => {
|
|
3121
3194
|
const typeMappings = {
|
|
3122
3195
|
created_at: { type: 'DatetimeType', isSingle: true },
|
|
@@ -3295,6 +3368,12 @@ decoders.UnblockedUserEvent = (input) => {
|
|
|
3295
3368
|
};
|
|
3296
3369
|
return decode(typeMappings, input);
|
|
3297
3370
|
};
|
|
3371
|
+
decoders.UndeleteMessageResponse = (input) => {
|
|
3372
|
+
const typeMappings = {
|
|
3373
|
+
message: { type: 'MessageResponse', isSingle: true },
|
|
3374
|
+
};
|
|
3375
|
+
return decode(typeMappings, input);
|
|
3376
|
+
};
|
|
3298
3377
|
decoders.UnfollowBatchResponse = (input) => {
|
|
3299
3378
|
const typeMappings = {
|
|
3300
3379
|
follows: { type: 'FollowResponse', isSingle: false },
|
|
@@ -3516,6 +3595,12 @@ decoders.UpdateThreadPartialResponse = (input) => {
|
|
|
3516
3595
|
};
|
|
3517
3596
|
return decode(typeMappings, input);
|
|
3518
3597
|
};
|
|
3598
|
+
decoders.UpdateUserGroupResponse = (input) => {
|
|
3599
|
+
const typeMappings = {
|
|
3600
|
+
user_group: { type: 'UserGroupResponse', isSingle: true },
|
|
3601
|
+
};
|
|
3602
|
+
return decode(typeMappings, input);
|
|
3603
|
+
};
|
|
3519
3604
|
decoders.UpdateUsersResponse = (input) => {
|
|
3520
3605
|
const typeMappings = {
|
|
3521
3606
|
users: { type: 'FullUserResponse', isSingle: false },
|
|
@@ -3614,6 +3699,60 @@ decoders.UserFlaggedEvent = (input) => {
|
|
|
3614
3699
|
};
|
|
3615
3700
|
return decode(typeMappings, input);
|
|
3616
3701
|
};
|
|
3702
|
+
decoders.UserGroupCreatedEvent = (input) => {
|
|
3703
|
+
const typeMappings = {
|
|
3704
|
+
created_at: { type: 'DatetimeType', isSingle: true },
|
|
3705
|
+
received_at: { type: 'DatetimeType', isSingle: true },
|
|
3706
|
+
user: { type: 'UserResponseCommonFields', isSingle: true },
|
|
3707
|
+
};
|
|
3708
|
+
return decode(typeMappings, input);
|
|
3709
|
+
};
|
|
3710
|
+
decoders.UserGroupDeletedEvent = (input) => {
|
|
3711
|
+
const typeMappings = {
|
|
3712
|
+
created_at: { type: 'DatetimeType', isSingle: true },
|
|
3713
|
+
received_at: { type: 'DatetimeType', isSingle: true },
|
|
3714
|
+
user: { type: 'UserResponseCommonFields', isSingle: true },
|
|
3715
|
+
};
|
|
3716
|
+
return decode(typeMappings, input);
|
|
3717
|
+
};
|
|
3718
|
+
decoders.UserGroupMember = (input) => {
|
|
3719
|
+
const typeMappings = {
|
|
3720
|
+
created_at: { type: 'DatetimeType', isSingle: true },
|
|
3721
|
+
};
|
|
3722
|
+
return decode(typeMappings, input);
|
|
3723
|
+
};
|
|
3724
|
+
decoders.UserGroupMemberAddedEvent = (input) => {
|
|
3725
|
+
const typeMappings = {
|
|
3726
|
+
created_at: { type: 'DatetimeType', isSingle: true },
|
|
3727
|
+
received_at: { type: 'DatetimeType', isSingle: true },
|
|
3728
|
+
user: { type: 'UserResponseCommonFields', isSingle: true },
|
|
3729
|
+
};
|
|
3730
|
+
return decode(typeMappings, input);
|
|
3731
|
+
};
|
|
3732
|
+
decoders.UserGroupMemberRemovedEvent = (input) => {
|
|
3733
|
+
const typeMappings = {
|
|
3734
|
+
created_at: { type: 'DatetimeType', isSingle: true },
|
|
3735
|
+
received_at: { type: 'DatetimeType', isSingle: true },
|
|
3736
|
+
user: { type: 'UserResponseCommonFields', isSingle: true },
|
|
3737
|
+
};
|
|
3738
|
+
return decode(typeMappings, input);
|
|
3739
|
+
};
|
|
3740
|
+
decoders.UserGroupResponse = (input) => {
|
|
3741
|
+
const typeMappings = {
|
|
3742
|
+
created_at: { type: 'DatetimeType', isSingle: true },
|
|
3743
|
+
updated_at: { type: 'DatetimeType', isSingle: true },
|
|
3744
|
+
members: { type: 'UserGroupMember', isSingle: false },
|
|
3745
|
+
};
|
|
3746
|
+
return decode(typeMappings, input);
|
|
3747
|
+
};
|
|
3748
|
+
decoders.UserGroupUpdatedEvent = (input) => {
|
|
3749
|
+
const typeMappings = {
|
|
3750
|
+
created_at: { type: 'DatetimeType', isSingle: true },
|
|
3751
|
+
received_at: { type: 'DatetimeType', isSingle: true },
|
|
3752
|
+
user: { type: 'UserResponseCommonFields', isSingle: true },
|
|
3753
|
+
};
|
|
3754
|
+
return decode(typeMappings, input);
|
|
3755
|
+
};
|
|
3617
3756
|
decoders.UserMessagesDeletedEvent = (input) => {
|
|
3618
3757
|
const typeMappings = {
|
|
3619
3758
|
created_at: { type: 'DatetimeType', isSingle: true },
|
|
@@ -3776,6 +3915,7 @@ class CommonApi {
|
|
|
3776
3915
|
image_moderation_enabled: request?.image_moderation_enabled,
|
|
3777
3916
|
max_aggregated_activities_length: request?.max_aggregated_activities_length,
|
|
3778
3917
|
migrate_permissions_to_v2: request?.migrate_permissions_to_v2,
|
|
3918
|
+
moderation_analytics_enabled: request?.moderation_analytics_enabled,
|
|
3779
3919
|
moderation_enabled: request?.moderation_enabled,
|
|
3780
3920
|
moderation_webhook_url: request?.moderation_webhook_url,
|
|
3781
3921
|
multi_tenant_enabled: request?.multi_tenant_enabled,
|
|
@@ -4021,6 +4161,7 @@ class CommonApi {
|
|
|
4021
4161
|
const body = {
|
|
4022
4162
|
mode: request?.mode,
|
|
4023
4163
|
path: request?.path,
|
|
4164
|
+
merge_custom: request?.merge_custom,
|
|
4024
4165
|
};
|
|
4025
4166
|
const response = await this.apiClient.sendRequest('POST', '/api/v2/imports', undefined, undefined, body, 'application/json');
|
|
4026
4167
|
decoders.CreateImportResponse?.(response.body);
|
|
@@ -4379,6 +4520,96 @@ class CommonApi {
|
|
|
4379
4520
|
decoders.ImageUploadResponse?.(response.body);
|
|
4380
4521
|
return { ...response.body, metadata: response.metadata };
|
|
4381
4522
|
}
|
|
4523
|
+
async listUserGroups(request) {
|
|
4524
|
+
const queryParams = {
|
|
4525
|
+
limit: request?.limit,
|
|
4526
|
+
id_gt: request?.id_gt,
|
|
4527
|
+
created_at_gt: request?.created_at_gt,
|
|
4528
|
+
team_id: request?.team_id,
|
|
4529
|
+
};
|
|
4530
|
+
const response = await this.apiClient.sendRequest('GET', '/api/v2/usergroups', undefined, queryParams);
|
|
4531
|
+
decoders.ListUserGroupsResponse?.(response.body);
|
|
4532
|
+
return { ...response.body, metadata: response.metadata };
|
|
4533
|
+
}
|
|
4534
|
+
async createUserGroup(request) {
|
|
4535
|
+
const body = {
|
|
4536
|
+
name: request?.name,
|
|
4537
|
+
description: request?.description,
|
|
4538
|
+
id: request?.id,
|
|
4539
|
+
team_id: request?.team_id,
|
|
4540
|
+
member_ids: request?.member_ids,
|
|
4541
|
+
};
|
|
4542
|
+
const response = await this.apiClient.sendRequest('POST', '/api/v2/usergroups', undefined, undefined, body, 'application/json');
|
|
4543
|
+
decoders.CreateUserGroupResponse?.(response.body);
|
|
4544
|
+
return { ...response.body, metadata: response.metadata };
|
|
4545
|
+
}
|
|
4546
|
+
async searchUserGroups(request) {
|
|
4547
|
+
const queryParams = {
|
|
4548
|
+
query: request?.query,
|
|
4549
|
+
limit: request?.limit,
|
|
4550
|
+
name_gt: request?.name_gt,
|
|
4551
|
+
id_gt: request?.id_gt,
|
|
4552
|
+
team_id: request?.team_id,
|
|
4553
|
+
};
|
|
4554
|
+
const response = await this.apiClient.sendRequest('GET', '/api/v2/usergroups/search', undefined, queryParams);
|
|
4555
|
+
decoders.SearchUserGroupsResponse?.(response.body);
|
|
4556
|
+
return { ...response.body, metadata: response.metadata };
|
|
4557
|
+
}
|
|
4558
|
+
async deleteUserGroup(request) {
|
|
4559
|
+
const queryParams = {
|
|
4560
|
+
team_id: request?.team_id,
|
|
4561
|
+
};
|
|
4562
|
+
const pathParams = {
|
|
4563
|
+
id: request?.id,
|
|
4564
|
+
};
|
|
4565
|
+
const response = await this.apiClient.sendRequest('DELETE', '/api/v2/usergroups/{id}', pathParams, queryParams);
|
|
4566
|
+
decoders.Response?.(response.body);
|
|
4567
|
+
return { ...response.body, metadata: response.metadata };
|
|
4568
|
+
}
|
|
4569
|
+
async getUserGroup(request) {
|
|
4570
|
+
const queryParams = {
|
|
4571
|
+
team_id: request?.team_id,
|
|
4572
|
+
};
|
|
4573
|
+
const pathParams = {
|
|
4574
|
+
id: request?.id,
|
|
4575
|
+
};
|
|
4576
|
+
const response = await this.apiClient.sendRequest('GET', '/api/v2/usergroups/{id}', pathParams, queryParams);
|
|
4577
|
+
decoders.GetUserGroupResponse?.(response.body);
|
|
4578
|
+
return { ...response.body, metadata: response.metadata };
|
|
4579
|
+
}
|
|
4580
|
+
async updateUserGroup(request) {
|
|
4581
|
+
const pathParams = {
|
|
4582
|
+
id: request?.id,
|
|
4583
|
+
};
|
|
4584
|
+
const body = {
|
|
4585
|
+
description: request?.description,
|
|
4586
|
+
name: request?.name,
|
|
4587
|
+
team_id: request?.team_id,
|
|
4588
|
+
};
|
|
4589
|
+
const response = await this.apiClient.sendRequest('PUT', '/api/v2/usergroups/{id}', pathParams, undefined, body, 'application/json');
|
|
4590
|
+
decoders.UpdateUserGroupResponse?.(response.body);
|
|
4591
|
+
return { ...response.body, metadata: response.metadata };
|
|
4592
|
+
}
|
|
4593
|
+
async removeUserGroupMembers(request) {
|
|
4594
|
+
const pathParams = {
|
|
4595
|
+
id: request?.id,
|
|
4596
|
+
};
|
|
4597
|
+
const response = await this.apiClient.sendRequest('DELETE', '/api/v2/usergroups/{id}/members', pathParams, undefined);
|
|
4598
|
+
decoders.RemoveUserGroupMembersResponse?.(response.body);
|
|
4599
|
+
return { ...response.body, metadata: response.metadata };
|
|
4600
|
+
}
|
|
4601
|
+
async addUserGroupMembers(request) {
|
|
4602
|
+
const pathParams = {
|
|
4603
|
+
id: request?.id,
|
|
4604
|
+
};
|
|
4605
|
+
const body = {
|
|
4606
|
+
member_ids: request?.member_ids,
|
|
4607
|
+
team_id: request?.team_id,
|
|
4608
|
+
};
|
|
4609
|
+
const response = await this.apiClient.sendRequest('POST', '/api/v2/usergroups/{id}/members', pathParams, undefined, body, 'application/json');
|
|
4610
|
+
decoders.AddUserGroupMembersResponse?.(response.body);
|
|
4611
|
+
return { ...response.body, metadata: response.metadata };
|
|
4612
|
+
}
|
|
4382
4613
|
async queryUsers(request) {
|
|
4383
4614
|
const queryParams = {
|
|
4384
4615
|
payload: request?.payload,
|
|
@@ -5714,7 +5945,7 @@ class ChatApi {
|
|
|
5714
5945
|
decoders.StartCampaignResponse?.(response.body);
|
|
5715
5946
|
return { ...response.body, metadata: response.metadata };
|
|
5716
5947
|
}
|
|
5717
|
-
async
|
|
5948
|
+
async stopCampaign(request) {
|
|
5718
5949
|
const pathParams = {
|
|
5719
5950
|
id: request?.id,
|
|
5720
5951
|
};
|
|
@@ -6431,12 +6662,10 @@ class ChatApi {
|
|
|
6431
6662
|
id: request?.id,
|
|
6432
6663
|
};
|
|
6433
6664
|
const body = {
|
|
6434
|
-
|
|
6435
|
-
skip_enrich_url: request?.skip_enrich_url,
|
|
6436
|
-
skip_push: request?.skip_push,
|
|
6665
|
+
undeleted_by: request?.undeleted_by,
|
|
6437
6666
|
};
|
|
6438
6667
|
const response = await this.apiClient.sendRequest('POST', '/api/v2/chat/messages/{id}/undelete', pathParams, undefined, body, 'application/json');
|
|
6439
|
-
decoders.
|
|
6668
|
+
decoders.UndeleteMessageResponse?.(response.body);
|
|
6440
6669
|
return { ...response.body, metadata: response.metadata };
|
|
6441
6670
|
}
|
|
6442
6671
|
async castPollVote(request) {
|
|
@@ -6651,6 +6880,18 @@ class ChatApi {
|
|
|
6651
6880
|
decoders.QuerySegmentTargetsResponse?.(response.body);
|
|
6652
6881
|
return { ...response.body, metadata: response.metadata };
|
|
6653
6882
|
}
|
|
6883
|
+
async queryTeamUsageStats(request) {
|
|
6884
|
+
const body = {
|
|
6885
|
+
end_date: request?.end_date,
|
|
6886
|
+
limit: request?.limit,
|
|
6887
|
+
month: request?.month,
|
|
6888
|
+
next: request?.next,
|
|
6889
|
+
start_date: request?.start_date,
|
|
6890
|
+
};
|
|
6891
|
+
const response = await this.apiClient.sendRequest('POST', '/api/v2/chat/stats/team_usage', undefined, undefined, body, 'application/json');
|
|
6892
|
+
decoders.QueryTeamUsageStatsResponse?.(response.body);
|
|
6893
|
+
return { ...response.body, metadata: response.metadata };
|
|
6894
|
+
}
|
|
6654
6895
|
async queryThreads(request) {
|
|
6655
6896
|
const body = {
|
|
6656
6897
|
limit: request?.limit,
|
|
@@ -7178,15 +7419,16 @@ class ModerationApi {
|
|
|
7178
7419
|
const body = {
|
|
7179
7420
|
name: request?.name,
|
|
7180
7421
|
rule_type: request?.rule_type,
|
|
7181
|
-
action: request?.action,
|
|
7182
7422
|
cooldown_period: request?.cooldown_period,
|
|
7183
7423
|
description: request?.description,
|
|
7184
7424
|
enabled: request?.enabled,
|
|
7185
7425
|
logic: request?.logic,
|
|
7186
7426
|
team: request?.team,
|
|
7427
|
+
action_sequences: request?.action_sequences,
|
|
7187
7428
|
conditions: request?.conditions,
|
|
7188
7429
|
config_keys: request?.config_keys,
|
|
7189
7430
|
groups: request?.groups,
|
|
7431
|
+
action: request?.action,
|
|
7190
7432
|
};
|
|
7191
7433
|
const response = await this.apiClient.sendRequest('POST', '/api/v2/moderation/moderation_rule', undefined, undefined, body, 'application/json');
|
|
7192
7434
|
decoders.UpsertModerationRuleResponse?.(response.body);
|
|
@@ -7356,7 +7598,7 @@ class ApiClient {
|
|
|
7356
7598
|
const headers = {
|
|
7357
7599
|
Authorization: this.apiConfig.token,
|
|
7358
7600
|
'stream-auth-type': 'jwt',
|
|
7359
|
-
'X-Stream-Client': 'stream-node-' + "0.7.
|
|
7601
|
+
'X-Stream-Client': 'stream-node-' + "0.7.43",
|
|
7360
7602
|
'Accept-Encoding': 'gzip',
|
|
7361
7603
|
'x-client-request-id': clientRequestId,
|
|
7362
7604
|
};
|
|
@@ -7508,6 +7750,7 @@ class FeedsApi {
|
|
|
7508
7750
|
}
|
|
7509
7751
|
async queryActivities(request) {
|
|
7510
7752
|
const body = {
|
|
7753
|
+
include_expired_activities: request?.include_expired_activities,
|
|
7511
7754
|
include_private_activities: request?.include_private_activities,
|
|
7512
7755
|
limit: request?.limit,
|
|
7513
7756
|
next: request?.next,
|
|
@@ -7788,8 +8031,8 @@ class FeedsApi {
|
|
|
7788
8031
|
}
|
|
7789
8032
|
async readCollections(request) {
|
|
7790
8033
|
const queryParams = {
|
|
7791
|
-
collection_refs: request?.collection_refs,
|
|
7792
8034
|
user_id: request?.user_id,
|
|
8035
|
+
collection_refs: request?.collection_refs,
|
|
7793
8036
|
};
|
|
7794
8037
|
const response = await this.apiClient.sendRequest('GET', '/api/v2/feeds/collections', undefined, queryParams);
|
|
7795
8038
|
decoders.ReadCollectionsResponse?.(response.body);
|
|
@@ -8167,6 +8410,22 @@ class FeedsApi {
|
|
|
8167
8410
|
decoders.RejectFeedMemberInviteResponse?.(response.body);
|
|
8168
8411
|
return { ...response.body, metadata: response.metadata };
|
|
8169
8412
|
}
|
|
8413
|
+
async queryPinnedActivities(request) {
|
|
8414
|
+
const pathParams = {
|
|
8415
|
+
feed_group_id: request?.feed_group_id,
|
|
8416
|
+
feed_id: request?.feed_id,
|
|
8417
|
+
};
|
|
8418
|
+
const body = {
|
|
8419
|
+
limit: request?.limit,
|
|
8420
|
+
next: request?.next,
|
|
8421
|
+
prev: request?.prev,
|
|
8422
|
+
sort: request?.sort,
|
|
8423
|
+
filter: request?.filter,
|
|
8424
|
+
};
|
|
8425
|
+
const response = await this.apiClient.sendRequest('POST', '/api/v2/feeds/feed_groups/{feed_group_id}/feeds/{feed_id}/pinned_activities/query', pathParams, undefined, body, 'application/json');
|
|
8426
|
+
decoders.QueryPinnedActivitiesResponse?.(response.body);
|
|
8427
|
+
return { ...response.body, metadata: response.metadata };
|
|
8428
|
+
}
|
|
8170
8429
|
async getFollowSuggestions(request) {
|
|
8171
8430
|
const queryParams = {
|
|
8172
8431
|
limit: request?.limit,
|
|
@@ -8179,6 +8438,14 @@ class FeedsApi {
|
|
|
8179
8438
|
decoders.GetFollowSuggestionsResponse?.(response.body);
|
|
8180
8439
|
return { ...response.body, metadata: response.metadata };
|
|
8181
8440
|
}
|
|
8441
|
+
async restoreFeedGroup(request) {
|
|
8442
|
+
const pathParams = {
|
|
8443
|
+
feed_group_id: request?.feed_group_id,
|
|
8444
|
+
};
|
|
8445
|
+
const response = await this.apiClient.sendRequest('POST', '/api/v2/feeds/feed_groups/{feed_group_id}/restore', pathParams, undefined);
|
|
8446
|
+
decoders.RestoreFeedGroupResponse?.(response.body);
|
|
8447
|
+
return { ...response.body, metadata: response.metadata };
|
|
8448
|
+
}
|
|
8182
8449
|
async deleteFeedGroup(request) {
|
|
8183
8450
|
const queryParams = {
|
|
8184
8451
|
hard_delete: request?.hard_delete,
|
|
@@ -8636,6 +8903,13 @@ class FeedApi {
|
|
|
8636
8903
|
...request,
|
|
8637
8904
|
});
|
|
8638
8905
|
}
|
|
8906
|
+
queryPinnedActivities(request) {
|
|
8907
|
+
return this.feedsApi.queryPinnedActivities({
|
|
8908
|
+
feed_id: this.id,
|
|
8909
|
+
feed_group_id: this.group,
|
|
8910
|
+
...request,
|
|
8911
|
+
});
|
|
8912
|
+
}
|
|
8639
8913
|
}
|
|
8640
8914
|
|
|
8641
8915
|
class StreamFeed extends FeedApi {
|