@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.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 },
|
|
@@ -2817,6 +2866,12 @@ decoders.QueryModerationRulesResponse = (input) => {
|
|
|
2817
2866
|
};
|
|
2818
2867
|
return decode(typeMappings, input);
|
|
2819
2868
|
};
|
|
2869
|
+
decoders.QueryPinnedActivitiesResponse = (input) => {
|
|
2870
|
+
const typeMappings = {
|
|
2871
|
+
pinned_activities: { type: 'ActivityPinResponse', isSingle: false },
|
|
2872
|
+
};
|
|
2873
|
+
return decode(typeMappings, input);
|
|
2874
|
+
};
|
|
2820
2875
|
decoders.QueryPollsResponse = (input) => {
|
|
2821
2876
|
const typeMappings = {
|
|
2822
2877
|
polls: { type: 'PollResponseData', isSingle: false },
|
|
@@ -2992,6 +3047,12 @@ decoders.ReminderUpdatedEvent = (input) => {
|
|
|
2992
3047
|
};
|
|
2993
3048
|
return decode(typeMappings, input);
|
|
2994
3049
|
};
|
|
3050
|
+
decoders.RemoveUserGroupMembersResponse = (input) => {
|
|
3051
|
+
const typeMappings = {
|
|
3052
|
+
user_group: { type: 'UserGroupResponse', isSingle: true },
|
|
3053
|
+
};
|
|
3054
|
+
return decode(typeMappings, input);
|
|
3055
|
+
};
|
|
2995
3056
|
decoders.ResolveSipInboundResponse = (input) => {
|
|
2996
3057
|
const typeMappings = {
|
|
2997
3058
|
sip_routing_rule: { type: 'SIPInboundRoutingRuleResponse', isSingle: true },
|
|
@@ -3005,6 +3066,12 @@ decoders.RestoreActivityResponse = (input) => {
|
|
|
3005
3066
|
};
|
|
3006
3067
|
return decode(typeMappings, input);
|
|
3007
3068
|
};
|
|
3069
|
+
decoders.RestoreFeedGroupResponse = (input) => {
|
|
3070
|
+
const typeMappings = {
|
|
3071
|
+
feed_group: { type: 'FeedGroupResponse', isSingle: true },
|
|
3072
|
+
};
|
|
3073
|
+
return decode(typeMappings, input);
|
|
3074
|
+
};
|
|
3008
3075
|
decoders.ReviewQueueItemNewEvent = (input) => {
|
|
3009
3076
|
const typeMappings = {
|
|
3010
3077
|
created_at: { type: 'DatetimeType', isSingle: true },
|
|
@@ -3098,6 +3165,12 @@ decoders.SearchResultMessage = (input) => {
|
|
|
3098
3165
|
};
|
|
3099
3166
|
return decode(typeMappings, input);
|
|
3100
3167
|
};
|
|
3168
|
+
decoders.SearchUserGroupsResponse = (input) => {
|
|
3169
|
+
const typeMappings = {
|
|
3170
|
+
user_groups: { type: 'UserGroupResponse', isSingle: false },
|
|
3171
|
+
};
|
|
3172
|
+
return decode(typeMappings, input);
|
|
3173
|
+
};
|
|
3101
3174
|
decoders.Segment = (input) => {
|
|
3102
3175
|
const typeMappings = {
|
|
3103
3176
|
created_at: { type: 'DatetimeType', isSingle: true },
|
|
@@ -3276,6 +3349,12 @@ decoders.UnblockedUserEvent = (input) => {
|
|
|
3276
3349
|
};
|
|
3277
3350
|
return decode(typeMappings, input);
|
|
3278
3351
|
};
|
|
3352
|
+
decoders.UndeleteMessageResponse = (input) => {
|
|
3353
|
+
const typeMappings = {
|
|
3354
|
+
message: { type: 'MessageResponse', isSingle: true },
|
|
3355
|
+
};
|
|
3356
|
+
return decode(typeMappings, input);
|
|
3357
|
+
};
|
|
3279
3358
|
decoders.UnfollowBatchResponse = (input) => {
|
|
3280
3359
|
const typeMappings = {
|
|
3281
3360
|
follows: { type: 'FollowResponse', isSingle: false },
|
|
@@ -3497,6 +3576,12 @@ decoders.UpdateThreadPartialResponse = (input) => {
|
|
|
3497
3576
|
};
|
|
3498
3577
|
return decode(typeMappings, input);
|
|
3499
3578
|
};
|
|
3579
|
+
decoders.UpdateUserGroupResponse = (input) => {
|
|
3580
|
+
const typeMappings = {
|
|
3581
|
+
user_group: { type: 'UserGroupResponse', isSingle: true },
|
|
3582
|
+
};
|
|
3583
|
+
return decode(typeMappings, input);
|
|
3584
|
+
};
|
|
3500
3585
|
decoders.UpdateUsersResponse = (input) => {
|
|
3501
3586
|
const typeMappings = {
|
|
3502
3587
|
users: { type: 'FullUserResponse', isSingle: false },
|
|
@@ -3595,6 +3680,60 @@ decoders.UserFlaggedEvent = (input) => {
|
|
|
3595
3680
|
};
|
|
3596
3681
|
return decode(typeMappings, input);
|
|
3597
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
|
+
};
|
|
3598
3737
|
decoders.UserMessagesDeletedEvent = (input) => {
|
|
3599
3738
|
const typeMappings = {
|
|
3600
3739
|
created_at: { type: 'DatetimeType', isSingle: true },
|
|
@@ -3757,6 +3896,7 @@ class CommonApi {
|
|
|
3757
3896
|
image_moderation_enabled: request?.image_moderation_enabled,
|
|
3758
3897
|
max_aggregated_activities_length: request?.max_aggregated_activities_length,
|
|
3759
3898
|
migrate_permissions_to_v2: request?.migrate_permissions_to_v2,
|
|
3899
|
+
moderation_analytics_enabled: request?.moderation_analytics_enabled,
|
|
3760
3900
|
moderation_enabled: request?.moderation_enabled,
|
|
3761
3901
|
moderation_webhook_url: request?.moderation_webhook_url,
|
|
3762
3902
|
multi_tenant_enabled: request?.multi_tenant_enabled,
|
|
@@ -4002,6 +4142,7 @@ class CommonApi {
|
|
|
4002
4142
|
const body = {
|
|
4003
4143
|
mode: request?.mode,
|
|
4004
4144
|
path: request?.path,
|
|
4145
|
+
merge_custom: request?.merge_custom,
|
|
4005
4146
|
};
|
|
4006
4147
|
const response = await this.apiClient.sendRequest('POST', '/api/v2/imports', undefined, undefined, body, 'application/json');
|
|
4007
4148
|
decoders.CreateImportResponse?.(response.body);
|
|
@@ -4360,6 +4501,96 @@ class CommonApi {
|
|
|
4360
4501
|
decoders.ImageUploadResponse?.(response.body);
|
|
4361
4502
|
return { ...response.body, metadata: response.metadata };
|
|
4362
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
|
+
}
|
|
4363
4594
|
async queryUsers(request) {
|
|
4364
4595
|
const queryParams = {
|
|
4365
4596
|
payload: request?.payload,
|
|
@@ -5695,7 +5926,7 @@ class ChatApi {
|
|
|
5695
5926
|
decoders.StartCampaignResponse?.(response.body);
|
|
5696
5927
|
return { ...response.body, metadata: response.metadata };
|
|
5697
5928
|
}
|
|
5698
|
-
async
|
|
5929
|
+
async stopCampaign(request) {
|
|
5699
5930
|
const pathParams = {
|
|
5700
5931
|
id: request?.id,
|
|
5701
5932
|
};
|
|
@@ -6412,12 +6643,10 @@ class ChatApi {
|
|
|
6412
6643
|
id: request?.id,
|
|
6413
6644
|
};
|
|
6414
6645
|
const body = {
|
|
6415
|
-
|
|
6416
|
-
skip_enrich_url: request?.skip_enrich_url,
|
|
6417
|
-
skip_push: request?.skip_push,
|
|
6646
|
+
undeleted_by: request?.undeleted_by,
|
|
6418
6647
|
};
|
|
6419
6648
|
const response = await this.apiClient.sendRequest('POST', '/api/v2/chat/messages/{id}/undelete', pathParams, undefined, body, 'application/json');
|
|
6420
|
-
decoders.
|
|
6649
|
+
decoders.UndeleteMessageResponse?.(response.body);
|
|
6421
6650
|
return { ...response.body, metadata: response.metadata };
|
|
6422
6651
|
}
|
|
6423
6652
|
async castPollVote(request) {
|
|
@@ -6632,6 +6861,18 @@ class ChatApi {
|
|
|
6632
6861
|
decoders.QuerySegmentTargetsResponse?.(response.body);
|
|
6633
6862
|
return { ...response.body, metadata: response.metadata };
|
|
6634
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
|
+
}
|
|
6635
6876
|
async queryThreads(request) {
|
|
6636
6877
|
const body = {
|
|
6637
6878
|
limit: request?.limit,
|
|
@@ -7159,15 +7400,16 @@ class ModerationApi {
|
|
|
7159
7400
|
const body = {
|
|
7160
7401
|
name: request?.name,
|
|
7161
7402
|
rule_type: request?.rule_type,
|
|
7162
|
-
action: request?.action,
|
|
7163
7403
|
cooldown_period: request?.cooldown_period,
|
|
7164
7404
|
description: request?.description,
|
|
7165
7405
|
enabled: request?.enabled,
|
|
7166
7406
|
logic: request?.logic,
|
|
7167
7407
|
team: request?.team,
|
|
7408
|
+
action_sequences: request?.action_sequences,
|
|
7168
7409
|
conditions: request?.conditions,
|
|
7169
7410
|
config_keys: request?.config_keys,
|
|
7170
7411
|
groups: request?.groups,
|
|
7412
|
+
action: request?.action,
|
|
7171
7413
|
};
|
|
7172
7414
|
const response = await this.apiClient.sendRequest('POST', '/api/v2/moderation/moderation_rule', undefined, undefined, body, 'application/json');
|
|
7173
7415
|
decoders.UpsertModerationRuleResponse?.(response.body);
|
|
@@ -7337,7 +7579,7 @@ class ApiClient {
|
|
|
7337
7579
|
const headers = {
|
|
7338
7580
|
Authorization: this.apiConfig.token,
|
|
7339
7581
|
'stream-auth-type': 'jwt',
|
|
7340
|
-
'X-Stream-Client': 'stream-node-' + "0.7.
|
|
7582
|
+
'X-Stream-Client': 'stream-node-' + "0.7.43",
|
|
7341
7583
|
'Accept-Encoding': 'gzip',
|
|
7342
7584
|
'x-client-request-id': clientRequestId,
|
|
7343
7585
|
};
|
|
@@ -7489,6 +7731,7 @@ class FeedsApi {
|
|
|
7489
7731
|
}
|
|
7490
7732
|
async queryActivities(request) {
|
|
7491
7733
|
const body = {
|
|
7734
|
+
include_expired_activities: request?.include_expired_activities,
|
|
7492
7735
|
include_private_activities: request?.include_private_activities,
|
|
7493
7736
|
limit: request?.limit,
|
|
7494
7737
|
next: request?.next,
|
|
@@ -7769,8 +8012,8 @@ class FeedsApi {
|
|
|
7769
8012
|
}
|
|
7770
8013
|
async readCollections(request) {
|
|
7771
8014
|
const queryParams = {
|
|
7772
|
-
collection_refs: request?.collection_refs,
|
|
7773
8015
|
user_id: request?.user_id,
|
|
8016
|
+
collection_refs: request?.collection_refs,
|
|
7774
8017
|
};
|
|
7775
8018
|
const response = await this.apiClient.sendRequest('GET', '/api/v2/feeds/collections', undefined, queryParams);
|
|
7776
8019
|
decoders.ReadCollectionsResponse?.(response.body);
|
|
@@ -8148,6 +8391,22 @@ class FeedsApi {
|
|
|
8148
8391
|
decoders.RejectFeedMemberInviteResponse?.(response.body);
|
|
8149
8392
|
return { ...response.body, metadata: response.metadata };
|
|
8150
8393
|
}
|
|
8394
|
+
async queryPinnedActivities(request) {
|
|
8395
|
+
const pathParams = {
|
|
8396
|
+
feed_group_id: request?.feed_group_id,
|
|
8397
|
+
feed_id: request?.feed_id,
|
|
8398
|
+
};
|
|
8399
|
+
const body = {
|
|
8400
|
+
limit: request?.limit,
|
|
8401
|
+
next: request?.next,
|
|
8402
|
+
prev: request?.prev,
|
|
8403
|
+
sort: request?.sort,
|
|
8404
|
+
filter: request?.filter,
|
|
8405
|
+
};
|
|
8406
|
+
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');
|
|
8407
|
+
decoders.QueryPinnedActivitiesResponse?.(response.body);
|
|
8408
|
+
return { ...response.body, metadata: response.metadata };
|
|
8409
|
+
}
|
|
8151
8410
|
async getFollowSuggestions(request) {
|
|
8152
8411
|
const queryParams = {
|
|
8153
8412
|
limit: request?.limit,
|
|
@@ -8160,6 +8419,14 @@ class FeedsApi {
|
|
|
8160
8419
|
decoders.GetFollowSuggestionsResponse?.(response.body);
|
|
8161
8420
|
return { ...response.body, metadata: response.metadata };
|
|
8162
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
|
+
}
|
|
8163
8430
|
async deleteFeedGroup(request) {
|
|
8164
8431
|
const queryParams = {
|
|
8165
8432
|
hard_delete: request?.hard_delete,
|
|
@@ -8617,6 +8884,13 @@ class FeedApi {
|
|
|
8617
8884
|
...request,
|
|
8618
8885
|
});
|
|
8619
8886
|
}
|
|
8887
|
+
queryPinnedActivities(request) {
|
|
8888
|
+
return this.feedsApi.queryPinnedActivities({
|
|
8889
|
+
feed_id: this.id,
|
|
8890
|
+
feed_group_id: this.group,
|
|
8891
|
+
...request,
|
|
8892
|
+
});
|
|
8893
|
+
}
|
|
8620
8894
|
}
|
|
8621
8895
|
|
|
8622
8896
|
class StreamFeed extends FeedApi {
|