@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.es.mjs
CHANGED
|
@@ -256,6 +256,12 @@ decoders.AddReactionResponse = (input) => {
|
|
|
256
256
|
};
|
|
257
257
|
return decode(typeMappings, input);
|
|
258
258
|
};
|
|
259
|
+
decoders.AddUserGroupMembersResponse = (input) => {
|
|
260
|
+
const typeMappings = {
|
|
261
|
+
user_group: { type: 'UserGroupResponse', isSingle: true },
|
|
262
|
+
};
|
|
263
|
+
return decode(typeMappings, input);
|
|
264
|
+
};
|
|
259
265
|
decoders.AggregatedActivityResponse = (input) => {
|
|
260
266
|
const typeMappings = {
|
|
261
267
|
created_at: { type: 'DatetimeType', isSingle: true },
|
|
@@ -817,6 +823,7 @@ decoders.CallStatsParticipantSession = (input) => {
|
|
|
817
823
|
decoders.CallStatsReportReadyEvent = (input) => {
|
|
818
824
|
const typeMappings = {
|
|
819
825
|
created_at: { type: 'DatetimeType', isSingle: true },
|
|
826
|
+
participants_overview: { type: 'CallStatsParticipant', isSingle: false },
|
|
820
827
|
};
|
|
821
828
|
return decode(typeMappings, input);
|
|
822
829
|
};
|
|
@@ -1359,6 +1366,12 @@ decoders.CreateSIPTrunkResponse = (input) => {
|
|
|
1359
1366
|
};
|
|
1360
1367
|
return decode(typeMappings, input);
|
|
1361
1368
|
};
|
|
1369
|
+
decoders.CreateUserGroupResponse = (input) => {
|
|
1370
|
+
const typeMappings = {
|
|
1371
|
+
user_group: { type: 'UserGroupResponse', isSingle: true },
|
|
1372
|
+
};
|
|
1373
|
+
return decode(typeMappings, input);
|
|
1374
|
+
};
|
|
1362
1375
|
decoders.CustomCheckResponse = (input) => {
|
|
1363
1376
|
const typeMappings = {
|
|
1364
1377
|
item: { type: 'ReviewQueueItemResponse', isSingle: true },
|
|
@@ -1555,6 +1568,13 @@ decoders.FeedGroupResponse = (input) => {
|
|
|
1555
1568
|
};
|
|
1556
1569
|
return decode(typeMappings, input);
|
|
1557
1570
|
};
|
|
1571
|
+
decoders.FeedGroupRestoredEvent = (input) => {
|
|
1572
|
+
const typeMappings = {
|
|
1573
|
+
created_at: { type: 'DatetimeType', isSingle: true },
|
|
1574
|
+
received_at: { type: 'DatetimeType', isSingle: true },
|
|
1575
|
+
};
|
|
1576
|
+
return decode(typeMappings, input);
|
|
1577
|
+
};
|
|
1558
1578
|
decoders.FeedMemberAddedEvent = (input) => {
|
|
1559
1579
|
const typeMappings = {
|
|
1560
1580
|
created_at: { type: 'DatetimeType', isSingle: true },
|
|
@@ -1983,6 +2003,12 @@ decoders.GetThreadResponse = (input) => {
|
|
|
1983
2003
|
};
|
|
1984
2004
|
return decode(typeMappings, input);
|
|
1985
2005
|
};
|
|
2006
|
+
decoders.GetUserGroupResponse = (input) => {
|
|
2007
|
+
const typeMappings = {
|
|
2008
|
+
user_group: { type: 'UserGroupResponse', isSingle: true },
|
|
2009
|
+
};
|
|
2010
|
+
return decode(typeMappings, input);
|
|
2011
|
+
};
|
|
1986
2012
|
decoders.GoLiveResponse = (input) => {
|
|
1987
2013
|
const typeMappings = {
|
|
1988
2014
|
call: { type: 'CallResponse', isSingle: true },
|
|
@@ -2129,9 +2155,25 @@ decoders.ListTranscriptionsResponse = (input) => {
|
|
|
2129
2155
|
};
|
|
2130
2156
|
return decode(typeMappings, input);
|
|
2131
2157
|
};
|
|
2158
|
+
decoders.ListUserGroupsResponse = (input) => {
|
|
2159
|
+
const typeMappings = {
|
|
2160
|
+
user_groups: { type: 'UserGroupResponse', isSingle: false },
|
|
2161
|
+
};
|
|
2162
|
+
return decode(typeMappings, input);
|
|
2163
|
+
};
|
|
2132
2164
|
decoders.MarkReadResponse = (input) => {
|
|
2133
2165
|
const typeMappings = {
|
|
2134
|
-
event: { type: '
|
|
2166
|
+
event: { type: 'MarkReadResponseEvent', isSingle: true },
|
|
2167
|
+
};
|
|
2168
|
+
return decode(typeMappings, input);
|
|
2169
|
+
};
|
|
2170
|
+
decoders.MarkReadResponseEvent = (input) => {
|
|
2171
|
+
const typeMappings = {
|
|
2172
|
+
created_at: { type: 'DatetimeType', isSingle: true },
|
|
2173
|
+
channel_last_message_at: { type: 'DatetimeType', isSingle: true },
|
|
2174
|
+
channel: { type: 'ChannelResponse', isSingle: true },
|
|
2175
|
+
thread: { type: 'ThreadResponse', isSingle: true },
|
|
2176
|
+
user: { type: 'UserResponseCommonFields', isSingle: true },
|
|
2135
2177
|
};
|
|
2136
2178
|
return decode(typeMappings, input);
|
|
2137
2179
|
};
|
|
@@ -2262,7 +2304,7 @@ decoders.MessageNewEvent = (input) => {
|
|
|
2262
2304
|
decoders.MessageReadEvent = (input) => {
|
|
2263
2305
|
const typeMappings = {
|
|
2264
2306
|
created_at: { type: 'DatetimeType', isSingle: true },
|
|
2265
|
-
|
|
2307
|
+
received_at: { type: 'DatetimeType', isSingle: true },
|
|
2266
2308
|
channel: { type: 'ChannelResponse', isSingle: true },
|
|
2267
2309
|
thread: { type: 'ThreadResponse', isSingle: true },
|
|
2268
2310
|
user: { type: 'UserResponseCommonFields', isSingle: true },
|
|
@@ -2398,6 +2440,13 @@ decoders.ModerationRuleV2Response = (input) => {
|
|
|
2398
2440
|
};
|
|
2399
2441
|
return decode(typeMappings, input);
|
|
2400
2442
|
};
|
|
2443
|
+
decoders.ModerationRulesTriggeredEvent = (input) => {
|
|
2444
|
+
const typeMappings = {
|
|
2445
|
+
created_at: { type: 'DatetimeType', isSingle: true },
|
|
2446
|
+
received_at: { type: 'DatetimeType', isSingle: true },
|
|
2447
|
+
};
|
|
2448
|
+
return decode(typeMappings, input);
|
|
2449
|
+
};
|
|
2401
2450
|
decoders.MuteChannelResponse = (input) => {
|
|
2402
2451
|
const typeMappings = {
|
|
2403
2452
|
channel_mutes: { type: 'ChannelMute', isSingle: false },
|
|
@@ -2998,6 +3047,12 @@ decoders.ReminderUpdatedEvent = (input) => {
|
|
|
2998
3047
|
};
|
|
2999
3048
|
return decode(typeMappings, input);
|
|
3000
3049
|
};
|
|
3050
|
+
decoders.RemoveUserGroupMembersResponse = (input) => {
|
|
3051
|
+
const typeMappings = {
|
|
3052
|
+
user_group: { type: 'UserGroupResponse', isSingle: true },
|
|
3053
|
+
};
|
|
3054
|
+
return decode(typeMappings, input);
|
|
3055
|
+
};
|
|
3001
3056
|
decoders.ResolveSipInboundResponse = (input) => {
|
|
3002
3057
|
const typeMappings = {
|
|
3003
3058
|
sip_routing_rule: { type: 'SIPInboundRoutingRuleResponse', isSingle: true },
|
|
@@ -3011,6 +3066,12 @@ decoders.RestoreActivityResponse = (input) => {
|
|
|
3011
3066
|
};
|
|
3012
3067
|
return decode(typeMappings, input);
|
|
3013
3068
|
};
|
|
3069
|
+
decoders.RestoreFeedGroupResponse = (input) => {
|
|
3070
|
+
const typeMappings = {
|
|
3071
|
+
feed_group: { type: 'FeedGroupResponse', isSingle: true },
|
|
3072
|
+
};
|
|
3073
|
+
return decode(typeMappings, input);
|
|
3074
|
+
};
|
|
3014
3075
|
decoders.ReviewQueueItemNewEvent = (input) => {
|
|
3015
3076
|
const typeMappings = {
|
|
3016
3077
|
created_at: { type: 'DatetimeType', isSingle: true },
|
|
@@ -3104,6 +3165,12 @@ decoders.SearchResultMessage = (input) => {
|
|
|
3104
3165
|
};
|
|
3105
3166
|
return decode(typeMappings, input);
|
|
3106
3167
|
};
|
|
3168
|
+
decoders.SearchUserGroupsResponse = (input) => {
|
|
3169
|
+
const typeMappings = {
|
|
3170
|
+
user_groups: { type: 'UserGroupResponse', isSingle: false },
|
|
3171
|
+
};
|
|
3172
|
+
return decode(typeMappings, input);
|
|
3173
|
+
};
|
|
3107
3174
|
decoders.Segment = (input) => {
|
|
3108
3175
|
const typeMappings = {
|
|
3109
3176
|
created_at: { type: 'DatetimeType', isSingle: true },
|
|
@@ -3282,6 +3349,12 @@ decoders.UnblockedUserEvent = (input) => {
|
|
|
3282
3349
|
};
|
|
3283
3350
|
return decode(typeMappings, input);
|
|
3284
3351
|
};
|
|
3352
|
+
decoders.UndeleteMessageResponse = (input) => {
|
|
3353
|
+
const typeMappings = {
|
|
3354
|
+
message: { type: 'MessageResponse', isSingle: true },
|
|
3355
|
+
};
|
|
3356
|
+
return decode(typeMappings, input);
|
|
3357
|
+
};
|
|
3285
3358
|
decoders.UnfollowBatchResponse = (input) => {
|
|
3286
3359
|
const typeMappings = {
|
|
3287
3360
|
follows: { type: 'FollowResponse', isSingle: false },
|
|
@@ -3503,6 +3576,12 @@ decoders.UpdateThreadPartialResponse = (input) => {
|
|
|
3503
3576
|
};
|
|
3504
3577
|
return decode(typeMappings, input);
|
|
3505
3578
|
};
|
|
3579
|
+
decoders.UpdateUserGroupResponse = (input) => {
|
|
3580
|
+
const typeMappings = {
|
|
3581
|
+
user_group: { type: 'UserGroupResponse', isSingle: true },
|
|
3582
|
+
};
|
|
3583
|
+
return decode(typeMappings, input);
|
|
3584
|
+
};
|
|
3506
3585
|
decoders.UpdateUsersResponse = (input) => {
|
|
3507
3586
|
const typeMappings = {
|
|
3508
3587
|
users: { type: 'FullUserResponse', isSingle: false },
|
|
@@ -3601,6 +3680,60 @@ decoders.UserFlaggedEvent = (input) => {
|
|
|
3601
3680
|
};
|
|
3602
3681
|
return decode(typeMappings, input);
|
|
3603
3682
|
};
|
|
3683
|
+
decoders.UserGroupCreatedEvent = (input) => {
|
|
3684
|
+
const typeMappings = {
|
|
3685
|
+
created_at: { type: 'DatetimeType', isSingle: true },
|
|
3686
|
+
received_at: { type: 'DatetimeType', isSingle: true },
|
|
3687
|
+
user: { type: 'UserResponseCommonFields', isSingle: true },
|
|
3688
|
+
};
|
|
3689
|
+
return decode(typeMappings, input);
|
|
3690
|
+
};
|
|
3691
|
+
decoders.UserGroupDeletedEvent = (input) => {
|
|
3692
|
+
const typeMappings = {
|
|
3693
|
+
created_at: { type: 'DatetimeType', isSingle: true },
|
|
3694
|
+
received_at: { type: 'DatetimeType', isSingle: true },
|
|
3695
|
+
user: { type: 'UserResponseCommonFields', isSingle: true },
|
|
3696
|
+
};
|
|
3697
|
+
return decode(typeMappings, input);
|
|
3698
|
+
};
|
|
3699
|
+
decoders.UserGroupMember = (input) => {
|
|
3700
|
+
const typeMappings = {
|
|
3701
|
+
created_at: { type: 'DatetimeType', isSingle: true },
|
|
3702
|
+
};
|
|
3703
|
+
return decode(typeMappings, input);
|
|
3704
|
+
};
|
|
3705
|
+
decoders.UserGroupMemberAddedEvent = (input) => {
|
|
3706
|
+
const typeMappings = {
|
|
3707
|
+
created_at: { type: 'DatetimeType', isSingle: true },
|
|
3708
|
+
received_at: { type: 'DatetimeType', isSingle: true },
|
|
3709
|
+
user: { type: 'UserResponseCommonFields', isSingle: true },
|
|
3710
|
+
};
|
|
3711
|
+
return decode(typeMappings, input);
|
|
3712
|
+
};
|
|
3713
|
+
decoders.UserGroupMemberRemovedEvent = (input) => {
|
|
3714
|
+
const typeMappings = {
|
|
3715
|
+
created_at: { type: 'DatetimeType', isSingle: true },
|
|
3716
|
+
received_at: { type: 'DatetimeType', isSingle: true },
|
|
3717
|
+
user: { type: 'UserResponseCommonFields', isSingle: true },
|
|
3718
|
+
};
|
|
3719
|
+
return decode(typeMappings, input);
|
|
3720
|
+
};
|
|
3721
|
+
decoders.UserGroupResponse = (input) => {
|
|
3722
|
+
const typeMappings = {
|
|
3723
|
+
created_at: { type: 'DatetimeType', isSingle: true },
|
|
3724
|
+
updated_at: { type: 'DatetimeType', isSingle: true },
|
|
3725
|
+
members: { type: 'UserGroupMember', isSingle: false },
|
|
3726
|
+
};
|
|
3727
|
+
return decode(typeMappings, input);
|
|
3728
|
+
};
|
|
3729
|
+
decoders.UserGroupUpdatedEvent = (input) => {
|
|
3730
|
+
const typeMappings = {
|
|
3731
|
+
created_at: { type: 'DatetimeType', isSingle: true },
|
|
3732
|
+
received_at: { type: 'DatetimeType', isSingle: true },
|
|
3733
|
+
user: { type: 'UserResponseCommonFields', isSingle: true },
|
|
3734
|
+
};
|
|
3735
|
+
return decode(typeMappings, input);
|
|
3736
|
+
};
|
|
3604
3737
|
decoders.UserMessagesDeletedEvent = (input) => {
|
|
3605
3738
|
const typeMappings = {
|
|
3606
3739
|
created_at: { type: 'DatetimeType', isSingle: true },
|
|
@@ -3763,6 +3896,7 @@ class CommonApi {
|
|
|
3763
3896
|
image_moderation_enabled: request?.image_moderation_enabled,
|
|
3764
3897
|
max_aggregated_activities_length: request?.max_aggregated_activities_length,
|
|
3765
3898
|
migrate_permissions_to_v2: request?.migrate_permissions_to_v2,
|
|
3899
|
+
moderation_analytics_enabled: request?.moderation_analytics_enabled,
|
|
3766
3900
|
moderation_enabled: request?.moderation_enabled,
|
|
3767
3901
|
moderation_webhook_url: request?.moderation_webhook_url,
|
|
3768
3902
|
multi_tenant_enabled: request?.multi_tenant_enabled,
|
|
@@ -4008,6 +4142,7 @@ class CommonApi {
|
|
|
4008
4142
|
const body = {
|
|
4009
4143
|
mode: request?.mode,
|
|
4010
4144
|
path: request?.path,
|
|
4145
|
+
merge_custom: request?.merge_custom,
|
|
4011
4146
|
};
|
|
4012
4147
|
const response = await this.apiClient.sendRequest('POST', '/api/v2/imports', undefined, undefined, body, 'application/json');
|
|
4013
4148
|
decoders.CreateImportResponse?.(response.body);
|
|
@@ -4366,6 +4501,96 @@ class CommonApi {
|
|
|
4366
4501
|
decoders.ImageUploadResponse?.(response.body);
|
|
4367
4502
|
return { ...response.body, metadata: response.metadata };
|
|
4368
4503
|
}
|
|
4504
|
+
async listUserGroups(request) {
|
|
4505
|
+
const queryParams = {
|
|
4506
|
+
limit: request?.limit,
|
|
4507
|
+
id_gt: request?.id_gt,
|
|
4508
|
+
created_at_gt: request?.created_at_gt,
|
|
4509
|
+
team_id: request?.team_id,
|
|
4510
|
+
};
|
|
4511
|
+
const response = await this.apiClient.sendRequest('GET', '/api/v2/usergroups', undefined, queryParams);
|
|
4512
|
+
decoders.ListUserGroupsResponse?.(response.body);
|
|
4513
|
+
return { ...response.body, metadata: response.metadata };
|
|
4514
|
+
}
|
|
4515
|
+
async createUserGroup(request) {
|
|
4516
|
+
const body = {
|
|
4517
|
+
name: request?.name,
|
|
4518
|
+
description: request?.description,
|
|
4519
|
+
id: request?.id,
|
|
4520
|
+
team_id: request?.team_id,
|
|
4521
|
+
member_ids: request?.member_ids,
|
|
4522
|
+
};
|
|
4523
|
+
const response = await this.apiClient.sendRequest('POST', '/api/v2/usergroups', undefined, undefined, body, 'application/json');
|
|
4524
|
+
decoders.CreateUserGroupResponse?.(response.body);
|
|
4525
|
+
return { ...response.body, metadata: response.metadata };
|
|
4526
|
+
}
|
|
4527
|
+
async searchUserGroups(request) {
|
|
4528
|
+
const queryParams = {
|
|
4529
|
+
query: request?.query,
|
|
4530
|
+
limit: request?.limit,
|
|
4531
|
+
name_gt: request?.name_gt,
|
|
4532
|
+
id_gt: request?.id_gt,
|
|
4533
|
+
team_id: request?.team_id,
|
|
4534
|
+
};
|
|
4535
|
+
const response = await this.apiClient.sendRequest('GET', '/api/v2/usergroups/search', undefined, queryParams);
|
|
4536
|
+
decoders.SearchUserGroupsResponse?.(response.body);
|
|
4537
|
+
return { ...response.body, metadata: response.metadata };
|
|
4538
|
+
}
|
|
4539
|
+
async deleteUserGroup(request) {
|
|
4540
|
+
const queryParams = {
|
|
4541
|
+
team_id: request?.team_id,
|
|
4542
|
+
};
|
|
4543
|
+
const pathParams = {
|
|
4544
|
+
id: request?.id,
|
|
4545
|
+
};
|
|
4546
|
+
const response = await this.apiClient.sendRequest('DELETE', '/api/v2/usergroups/{id}', pathParams, queryParams);
|
|
4547
|
+
decoders.Response?.(response.body);
|
|
4548
|
+
return { ...response.body, metadata: response.metadata };
|
|
4549
|
+
}
|
|
4550
|
+
async getUserGroup(request) {
|
|
4551
|
+
const queryParams = {
|
|
4552
|
+
team_id: request?.team_id,
|
|
4553
|
+
};
|
|
4554
|
+
const pathParams = {
|
|
4555
|
+
id: request?.id,
|
|
4556
|
+
};
|
|
4557
|
+
const response = await this.apiClient.sendRequest('GET', '/api/v2/usergroups/{id}', pathParams, queryParams);
|
|
4558
|
+
decoders.GetUserGroupResponse?.(response.body);
|
|
4559
|
+
return { ...response.body, metadata: response.metadata };
|
|
4560
|
+
}
|
|
4561
|
+
async updateUserGroup(request) {
|
|
4562
|
+
const pathParams = {
|
|
4563
|
+
id: request?.id,
|
|
4564
|
+
};
|
|
4565
|
+
const body = {
|
|
4566
|
+
description: request?.description,
|
|
4567
|
+
name: request?.name,
|
|
4568
|
+
team_id: request?.team_id,
|
|
4569
|
+
};
|
|
4570
|
+
const response = await this.apiClient.sendRequest('PUT', '/api/v2/usergroups/{id}', pathParams, undefined, body, 'application/json');
|
|
4571
|
+
decoders.UpdateUserGroupResponse?.(response.body);
|
|
4572
|
+
return { ...response.body, metadata: response.metadata };
|
|
4573
|
+
}
|
|
4574
|
+
async removeUserGroupMembers(request) {
|
|
4575
|
+
const pathParams = {
|
|
4576
|
+
id: request?.id,
|
|
4577
|
+
};
|
|
4578
|
+
const response = await this.apiClient.sendRequest('DELETE', '/api/v2/usergroups/{id}/members', pathParams, undefined);
|
|
4579
|
+
decoders.RemoveUserGroupMembersResponse?.(response.body);
|
|
4580
|
+
return { ...response.body, metadata: response.metadata };
|
|
4581
|
+
}
|
|
4582
|
+
async addUserGroupMembers(request) {
|
|
4583
|
+
const pathParams = {
|
|
4584
|
+
id: request?.id,
|
|
4585
|
+
};
|
|
4586
|
+
const body = {
|
|
4587
|
+
member_ids: request?.member_ids,
|
|
4588
|
+
team_id: request?.team_id,
|
|
4589
|
+
};
|
|
4590
|
+
const response = await this.apiClient.sendRequest('POST', '/api/v2/usergroups/{id}/members', pathParams, undefined, body, 'application/json');
|
|
4591
|
+
decoders.AddUserGroupMembersResponse?.(response.body);
|
|
4592
|
+
return { ...response.body, metadata: response.metadata };
|
|
4593
|
+
}
|
|
4369
4594
|
async queryUsers(request) {
|
|
4370
4595
|
const queryParams = {
|
|
4371
4596
|
payload: request?.payload,
|
|
@@ -5701,7 +5926,7 @@ class ChatApi {
|
|
|
5701
5926
|
decoders.StartCampaignResponse?.(response.body);
|
|
5702
5927
|
return { ...response.body, metadata: response.metadata };
|
|
5703
5928
|
}
|
|
5704
|
-
async
|
|
5929
|
+
async stopCampaign(request) {
|
|
5705
5930
|
const pathParams = {
|
|
5706
5931
|
id: request?.id,
|
|
5707
5932
|
};
|
|
@@ -6418,12 +6643,10 @@ class ChatApi {
|
|
|
6418
6643
|
id: request?.id,
|
|
6419
6644
|
};
|
|
6420
6645
|
const body = {
|
|
6421
|
-
|
|
6422
|
-
skip_enrich_url: request?.skip_enrich_url,
|
|
6423
|
-
skip_push: request?.skip_push,
|
|
6646
|
+
undeleted_by: request?.undeleted_by,
|
|
6424
6647
|
};
|
|
6425
6648
|
const response = await this.apiClient.sendRequest('POST', '/api/v2/chat/messages/{id}/undelete', pathParams, undefined, body, 'application/json');
|
|
6426
|
-
decoders.
|
|
6649
|
+
decoders.UndeleteMessageResponse?.(response.body);
|
|
6427
6650
|
return { ...response.body, metadata: response.metadata };
|
|
6428
6651
|
}
|
|
6429
6652
|
async castPollVote(request) {
|
|
@@ -6638,6 +6861,18 @@ class ChatApi {
|
|
|
6638
6861
|
decoders.QuerySegmentTargetsResponse?.(response.body);
|
|
6639
6862
|
return { ...response.body, metadata: response.metadata };
|
|
6640
6863
|
}
|
|
6864
|
+
async queryTeamUsageStats(request) {
|
|
6865
|
+
const body = {
|
|
6866
|
+
end_date: request?.end_date,
|
|
6867
|
+
limit: request?.limit,
|
|
6868
|
+
month: request?.month,
|
|
6869
|
+
next: request?.next,
|
|
6870
|
+
start_date: request?.start_date,
|
|
6871
|
+
};
|
|
6872
|
+
const response = await this.apiClient.sendRequest('POST', '/api/v2/chat/stats/team_usage', undefined, undefined, body, 'application/json');
|
|
6873
|
+
decoders.QueryTeamUsageStatsResponse?.(response.body);
|
|
6874
|
+
return { ...response.body, metadata: response.metadata };
|
|
6875
|
+
}
|
|
6641
6876
|
async queryThreads(request) {
|
|
6642
6877
|
const body = {
|
|
6643
6878
|
limit: request?.limit,
|
|
@@ -7165,15 +7400,16 @@ class ModerationApi {
|
|
|
7165
7400
|
const body = {
|
|
7166
7401
|
name: request?.name,
|
|
7167
7402
|
rule_type: request?.rule_type,
|
|
7168
|
-
action: request?.action,
|
|
7169
7403
|
cooldown_period: request?.cooldown_period,
|
|
7170
7404
|
description: request?.description,
|
|
7171
7405
|
enabled: request?.enabled,
|
|
7172
7406
|
logic: request?.logic,
|
|
7173
7407
|
team: request?.team,
|
|
7408
|
+
action_sequences: request?.action_sequences,
|
|
7174
7409
|
conditions: request?.conditions,
|
|
7175
7410
|
config_keys: request?.config_keys,
|
|
7176
7411
|
groups: request?.groups,
|
|
7412
|
+
action: request?.action,
|
|
7177
7413
|
};
|
|
7178
7414
|
const response = await this.apiClient.sendRequest('POST', '/api/v2/moderation/moderation_rule', undefined, undefined, body, 'application/json');
|
|
7179
7415
|
decoders.UpsertModerationRuleResponse?.(response.body);
|
|
@@ -7343,7 +7579,7 @@ class ApiClient {
|
|
|
7343
7579
|
const headers = {
|
|
7344
7580
|
Authorization: this.apiConfig.token,
|
|
7345
7581
|
'stream-auth-type': 'jwt',
|
|
7346
|
-
'X-Stream-Client': 'stream-node-' + "0.7.
|
|
7582
|
+
'X-Stream-Client': 'stream-node-' + "0.7.43",
|
|
7347
7583
|
'Accept-Encoding': 'gzip',
|
|
7348
7584
|
'x-client-request-id': clientRequestId,
|
|
7349
7585
|
};
|
|
@@ -7776,8 +8012,8 @@ class FeedsApi {
|
|
|
7776
8012
|
}
|
|
7777
8013
|
async readCollections(request) {
|
|
7778
8014
|
const queryParams = {
|
|
7779
|
-
collection_refs: request?.collection_refs,
|
|
7780
8015
|
user_id: request?.user_id,
|
|
8016
|
+
collection_refs: request?.collection_refs,
|
|
7781
8017
|
};
|
|
7782
8018
|
const response = await this.apiClient.sendRequest('GET', '/api/v2/feeds/collections', undefined, queryParams);
|
|
7783
8019
|
decoders.ReadCollectionsResponse?.(response.body);
|
|
@@ -8183,6 +8419,14 @@ class FeedsApi {
|
|
|
8183
8419
|
decoders.GetFollowSuggestionsResponse?.(response.body);
|
|
8184
8420
|
return { ...response.body, metadata: response.metadata };
|
|
8185
8421
|
}
|
|
8422
|
+
async restoreFeedGroup(request) {
|
|
8423
|
+
const pathParams = {
|
|
8424
|
+
feed_group_id: request?.feed_group_id,
|
|
8425
|
+
};
|
|
8426
|
+
const response = await this.apiClient.sendRequest('POST', '/api/v2/feeds/feed_groups/{feed_group_id}/restore', pathParams, undefined);
|
|
8427
|
+
decoders.RestoreFeedGroupResponse?.(response.body);
|
|
8428
|
+
return { ...response.body, metadata: response.metadata };
|
|
8429
|
+
}
|
|
8186
8430
|
async deleteFeedGroup(request) {
|
|
8187
8431
|
const queryParams = {
|
|
8188
8432
|
hard_delete: request?.hard_delete,
|