@stream-io/node-sdk 0.7.42 → 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 +254 -10
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.mjs +254 -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/FeedsApi.d.ts +6 -3
- package/dist/src/gen/models/index.d.ts +360 -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/FeedsApi.ts +25 -3
- package/src/gen/model-decoders/decoders.ts +173 -2
- package/src/gen/models/index.ts +628 -84
- 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 },
|
|
@@ -3017,6 +3066,12 @@ decoders.ReminderUpdatedEvent = (input) => {
|
|
|
3017
3066
|
};
|
|
3018
3067
|
return decode(typeMappings, input);
|
|
3019
3068
|
};
|
|
3069
|
+
decoders.RemoveUserGroupMembersResponse = (input) => {
|
|
3070
|
+
const typeMappings = {
|
|
3071
|
+
user_group: { type: 'UserGroupResponse', isSingle: true },
|
|
3072
|
+
};
|
|
3073
|
+
return decode(typeMappings, input);
|
|
3074
|
+
};
|
|
3020
3075
|
decoders.ResolveSipInboundResponse = (input) => {
|
|
3021
3076
|
const typeMappings = {
|
|
3022
3077
|
sip_routing_rule: { type: 'SIPInboundRoutingRuleResponse', isSingle: true },
|
|
@@ -3030,6 +3085,12 @@ decoders.RestoreActivityResponse = (input) => {
|
|
|
3030
3085
|
};
|
|
3031
3086
|
return decode(typeMappings, input);
|
|
3032
3087
|
};
|
|
3088
|
+
decoders.RestoreFeedGroupResponse = (input) => {
|
|
3089
|
+
const typeMappings = {
|
|
3090
|
+
feed_group: { type: 'FeedGroupResponse', isSingle: true },
|
|
3091
|
+
};
|
|
3092
|
+
return decode(typeMappings, input);
|
|
3093
|
+
};
|
|
3033
3094
|
decoders.ReviewQueueItemNewEvent = (input) => {
|
|
3034
3095
|
const typeMappings = {
|
|
3035
3096
|
created_at: { type: 'DatetimeType', isSingle: true },
|
|
@@ -3123,6 +3184,12 @@ decoders.SearchResultMessage = (input) => {
|
|
|
3123
3184
|
};
|
|
3124
3185
|
return decode(typeMappings, input);
|
|
3125
3186
|
};
|
|
3187
|
+
decoders.SearchUserGroupsResponse = (input) => {
|
|
3188
|
+
const typeMappings = {
|
|
3189
|
+
user_groups: { type: 'UserGroupResponse', isSingle: false },
|
|
3190
|
+
};
|
|
3191
|
+
return decode(typeMappings, input);
|
|
3192
|
+
};
|
|
3126
3193
|
decoders.Segment = (input) => {
|
|
3127
3194
|
const typeMappings = {
|
|
3128
3195
|
created_at: { type: 'DatetimeType', isSingle: true },
|
|
@@ -3301,6 +3368,12 @@ decoders.UnblockedUserEvent = (input) => {
|
|
|
3301
3368
|
};
|
|
3302
3369
|
return decode(typeMappings, input);
|
|
3303
3370
|
};
|
|
3371
|
+
decoders.UndeleteMessageResponse = (input) => {
|
|
3372
|
+
const typeMappings = {
|
|
3373
|
+
message: { type: 'MessageResponse', isSingle: true },
|
|
3374
|
+
};
|
|
3375
|
+
return decode(typeMappings, input);
|
|
3376
|
+
};
|
|
3304
3377
|
decoders.UnfollowBatchResponse = (input) => {
|
|
3305
3378
|
const typeMappings = {
|
|
3306
3379
|
follows: { type: 'FollowResponse', isSingle: false },
|
|
@@ -3522,6 +3595,12 @@ decoders.UpdateThreadPartialResponse = (input) => {
|
|
|
3522
3595
|
};
|
|
3523
3596
|
return decode(typeMappings, input);
|
|
3524
3597
|
};
|
|
3598
|
+
decoders.UpdateUserGroupResponse = (input) => {
|
|
3599
|
+
const typeMappings = {
|
|
3600
|
+
user_group: { type: 'UserGroupResponse', isSingle: true },
|
|
3601
|
+
};
|
|
3602
|
+
return decode(typeMappings, input);
|
|
3603
|
+
};
|
|
3525
3604
|
decoders.UpdateUsersResponse = (input) => {
|
|
3526
3605
|
const typeMappings = {
|
|
3527
3606
|
users: { type: 'FullUserResponse', isSingle: false },
|
|
@@ -3620,6 +3699,60 @@ decoders.UserFlaggedEvent = (input) => {
|
|
|
3620
3699
|
};
|
|
3621
3700
|
return decode(typeMappings, input);
|
|
3622
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
|
+
};
|
|
3623
3756
|
decoders.UserMessagesDeletedEvent = (input) => {
|
|
3624
3757
|
const typeMappings = {
|
|
3625
3758
|
created_at: { type: 'DatetimeType', isSingle: true },
|
|
@@ -3782,6 +3915,7 @@ class CommonApi {
|
|
|
3782
3915
|
image_moderation_enabled: request?.image_moderation_enabled,
|
|
3783
3916
|
max_aggregated_activities_length: request?.max_aggregated_activities_length,
|
|
3784
3917
|
migrate_permissions_to_v2: request?.migrate_permissions_to_v2,
|
|
3918
|
+
moderation_analytics_enabled: request?.moderation_analytics_enabled,
|
|
3785
3919
|
moderation_enabled: request?.moderation_enabled,
|
|
3786
3920
|
moderation_webhook_url: request?.moderation_webhook_url,
|
|
3787
3921
|
multi_tenant_enabled: request?.multi_tenant_enabled,
|
|
@@ -4027,6 +4161,7 @@ class CommonApi {
|
|
|
4027
4161
|
const body = {
|
|
4028
4162
|
mode: request?.mode,
|
|
4029
4163
|
path: request?.path,
|
|
4164
|
+
merge_custom: request?.merge_custom,
|
|
4030
4165
|
};
|
|
4031
4166
|
const response = await this.apiClient.sendRequest('POST', '/api/v2/imports', undefined, undefined, body, 'application/json');
|
|
4032
4167
|
decoders.CreateImportResponse?.(response.body);
|
|
@@ -4385,6 +4520,96 @@ class CommonApi {
|
|
|
4385
4520
|
decoders.ImageUploadResponse?.(response.body);
|
|
4386
4521
|
return { ...response.body, metadata: response.metadata };
|
|
4387
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
|
+
}
|
|
4388
4613
|
async queryUsers(request) {
|
|
4389
4614
|
const queryParams = {
|
|
4390
4615
|
payload: request?.payload,
|
|
@@ -5720,7 +5945,7 @@ class ChatApi {
|
|
|
5720
5945
|
decoders.StartCampaignResponse?.(response.body);
|
|
5721
5946
|
return { ...response.body, metadata: response.metadata };
|
|
5722
5947
|
}
|
|
5723
|
-
async
|
|
5948
|
+
async stopCampaign(request) {
|
|
5724
5949
|
const pathParams = {
|
|
5725
5950
|
id: request?.id,
|
|
5726
5951
|
};
|
|
@@ -6437,12 +6662,10 @@ class ChatApi {
|
|
|
6437
6662
|
id: request?.id,
|
|
6438
6663
|
};
|
|
6439
6664
|
const body = {
|
|
6440
|
-
|
|
6441
|
-
skip_enrich_url: request?.skip_enrich_url,
|
|
6442
|
-
skip_push: request?.skip_push,
|
|
6665
|
+
undeleted_by: request?.undeleted_by,
|
|
6443
6666
|
};
|
|
6444
6667
|
const response = await this.apiClient.sendRequest('POST', '/api/v2/chat/messages/{id}/undelete', pathParams, undefined, body, 'application/json');
|
|
6445
|
-
decoders.
|
|
6668
|
+
decoders.UndeleteMessageResponse?.(response.body);
|
|
6446
6669
|
return { ...response.body, metadata: response.metadata };
|
|
6447
6670
|
}
|
|
6448
6671
|
async castPollVote(request) {
|
|
@@ -6657,6 +6880,18 @@ class ChatApi {
|
|
|
6657
6880
|
decoders.QuerySegmentTargetsResponse?.(response.body);
|
|
6658
6881
|
return { ...response.body, metadata: response.metadata };
|
|
6659
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
|
+
}
|
|
6660
6895
|
async queryThreads(request) {
|
|
6661
6896
|
const body = {
|
|
6662
6897
|
limit: request?.limit,
|
|
@@ -7184,15 +7419,16 @@ class ModerationApi {
|
|
|
7184
7419
|
const body = {
|
|
7185
7420
|
name: request?.name,
|
|
7186
7421
|
rule_type: request?.rule_type,
|
|
7187
|
-
action: request?.action,
|
|
7188
7422
|
cooldown_period: request?.cooldown_period,
|
|
7189
7423
|
description: request?.description,
|
|
7190
7424
|
enabled: request?.enabled,
|
|
7191
7425
|
logic: request?.logic,
|
|
7192
7426
|
team: request?.team,
|
|
7427
|
+
action_sequences: request?.action_sequences,
|
|
7193
7428
|
conditions: request?.conditions,
|
|
7194
7429
|
config_keys: request?.config_keys,
|
|
7195
7430
|
groups: request?.groups,
|
|
7431
|
+
action: request?.action,
|
|
7196
7432
|
};
|
|
7197
7433
|
const response = await this.apiClient.sendRequest('POST', '/api/v2/moderation/moderation_rule', undefined, undefined, body, 'application/json');
|
|
7198
7434
|
decoders.UpsertModerationRuleResponse?.(response.body);
|
|
@@ -7362,7 +7598,7 @@ class ApiClient {
|
|
|
7362
7598
|
const headers = {
|
|
7363
7599
|
Authorization: this.apiConfig.token,
|
|
7364
7600
|
'stream-auth-type': 'jwt',
|
|
7365
|
-
'X-Stream-Client': 'stream-node-' + "0.7.
|
|
7601
|
+
'X-Stream-Client': 'stream-node-' + "0.7.43",
|
|
7366
7602
|
'Accept-Encoding': 'gzip',
|
|
7367
7603
|
'x-client-request-id': clientRequestId,
|
|
7368
7604
|
};
|
|
@@ -7795,8 +8031,8 @@ class FeedsApi {
|
|
|
7795
8031
|
}
|
|
7796
8032
|
async readCollections(request) {
|
|
7797
8033
|
const queryParams = {
|
|
7798
|
-
collection_refs: request?.collection_refs,
|
|
7799
8034
|
user_id: request?.user_id,
|
|
8035
|
+
collection_refs: request?.collection_refs,
|
|
7800
8036
|
};
|
|
7801
8037
|
const response = await this.apiClient.sendRequest('GET', '/api/v2/feeds/collections', undefined, queryParams);
|
|
7802
8038
|
decoders.ReadCollectionsResponse?.(response.body);
|
|
@@ -8202,6 +8438,14 @@ class FeedsApi {
|
|
|
8202
8438
|
decoders.GetFollowSuggestionsResponse?.(response.body);
|
|
8203
8439
|
return { ...response.body, metadata: response.metadata };
|
|
8204
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
|
+
}
|
|
8205
8449
|
async deleteFeedGroup(request) {
|
|
8206
8450
|
const queryParams = {
|
|
8207
8451
|
hard_delete: request?.hard_delete,
|