@stream-io/node-sdk 0.7.42 → 0.7.44
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 +277 -11
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.mjs +277 -11
- 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 +1 -0
- package/dist/src/gen/feeds/FeedsApi.d.ts +9 -3
- package/dist/src/gen/models/index.d.ts +375 -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 +1 -0
- package/src/gen/feeds/FeedsApi.ts +54 -5
- package/src/gen/model-decoders/decoders.ts +173 -2
- package/src/gen/models/index.ts +659 -85
- 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.44",
|
|
7366
7602
|
'Accept-Encoding': 'gzip',
|
|
7367
7603
|
'x-client-request-id': clientRequestId,
|
|
7368
7604
|
};
|
|
@@ -7460,6 +7696,7 @@ class FeedsApi {
|
|
|
7460
7696
|
feeds: request?.feeds,
|
|
7461
7697
|
copy_custom_to_notification: request?.copy_custom_to_notification,
|
|
7462
7698
|
create_notification_activity: request?.create_notification_activity,
|
|
7699
|
+
enrich_own_fields: request?.enrich_own_fields,
|
|
7463
7700
|
expires_at: request?.expires_at,
|
|
7464
7701
|
id: request?.id,
|
|
7465
7702
|
parent_id: request?.parent_id,
|
|
@@ -7487,6 +7724,7 @@ class FeedsApi {
|
|
|
7487
7724
|
async upsertActivities(request) {
|
|
7488
7725
|
const body = {
|
|
7489
7726
|
activities: request?.activities,
|
|
7727
|
+
enrich_own_fields: request?.enrich_own_fields,
|
|
7490
7728
|
};
|
|
7491
7729
|
const response = await this.apiClient.sendRequest('POST', '/api/v2/feeds/activities/batch', undefined, undefined, body, 'application/json');
|
|
7492
7730
|
decoders.UpsertActivitiesResponse?.(response.body);
|
|
@@ -7514,6 +7752,7 @@ class FeedsApi {
|
|
|
7514
7752
|
}
|
|
7515
7753
|
async queryActivities(request) {
|
|
7516
7754
|
const body = {
|
|
7755
|
+
enrich_own_fields: request?.enrich_own_fields,
|
|
7517
7756
|
include_expired_activities: request?.include_expired_activities,
|
|
7518
7757
|
include_private_activities: request?.include_private_activities,
|
|
7519
7758
|
limit: request?.limit,
|
|
@@ -7685,6 +7924,7 @@ class FeedsApi {
|
|
|
7685
7924
|
};
|
|
7686
7925
|
const body = {
|
|
7687
7926
|
copy_custom_to_notification: request?.copy_custom_to_notification,
|
|
7927
|
+
enrich_own_fields: request?.enrich_own_fields,
|
|
7688
7928
|
handle_mention_notifications: request?.handle_mention_notifications,
|
|
7689
7929
|
run_activity_processors: request?.run_activity_processors,
|
|
7690
7930
|
user_id: request?.user_id,
|
|
@@ -7702,6 +7942,7 @@ class FeedsApi {
|
|
|
7702
7942
|
};
|
|
7703
7943
|
const body = {
|
|
7704
7944
|
copy_custom_to_notification: request?.copy_custom_to_notification,
|
|
7945
|
+
enrich_own_fields: request?.enrich_own_fields,
|
|
7705
7946
|
expires_at: request?.expires_at,
|
|
7706
7947
|
handle_mention_notifications: request?.handle_mention_notifications,
|
|
7707
7948
|
poll_id: request?.poll_id,
|
|
@@ -7728,6 +7969,9 @@ class FeedsApi {
|
|
|
7728
7969
|
return { ...response.body, metadata: response.metadata };
|
|
7729
7970
|
}
|
|
7730
7971
|
async restoreActivity(request) {
|
|
7972
|
+
const queryParams = {
|
|
7973
|
+
enrich_own_fields: request?.enrich_own_fields,
|
|
7974
|
+
};
|
|
7731
7975
|
const pathParams = {
|
|
7732
7976
|
id: request?.id,
|
|
7733
7977
|
};
|
|
@@ -7735,7 +7979,7 @@ class FeedsApi {
|
|
|
7735
7979
|
user_id: request?.user_id,
|
|
7736
7980
|
user: request?.user,
|
|
7737
7981
|
};
|
|
7738
|
-
const response = await this.apiClient.sendRequest('POST', '/api/v2/feeds/activities/{id}/restore', pathParams,
|
|
7982
|
+
const response = await this.apiClient.sendRequest('POST', '/api/v2/feeds/activities/{id}/restore', pathParams, queryParams, body, 'application/json');
|
|
7739
7983
|
decoders.RestoreActivityResponse?.(response.body);
|
|
7740
7984
|
return { ...response.body, metadata: response.metadata };
|
|
7741
7985
|
}
|
|
@@ -7775,6 +8019,7 @@ class FeedsApi {
|
|
|
7775
8019
|
}
|
|
7776
8020
|
async queryBookmarks(request) {
|
|
7777
8021
|
const body = {
|
|
8022
|
+
enrich_own_fields: request?.enrich_own_fields,
|
|
7778
8023
|
limit: request?.limit,
|
|
7779
8024
|
next: request?.next,
|
|
7780
8025
|
prev: request?.prev,
|
|
@@ -7795,8 +8040,8 @@ class FeedsApi {
|
|
|
7795
8040
|
}
|
|
7796
8041
|
async readCollections(request) {
|
|
7797
8042
|
const queryParams = {
|
|
7798
|
-
collection_refs: request?.collection_refs,
|
|
7799
8043
|
user_id: request?.user_id,
|
|
8044
|
+
collection_refs: request?.collection_refs,
|
|
7800
8045
|
};
|
|
7801
8046
|
const response = await this.apiClient.sendRequest('GET', '/api/v2/feeds/collections', undefined, queryParams);
|
|
7802
8047
|
decoders.ReadCollectionsResponse?.(response.body);
|
|
@@ -8063,6 +8308,7 @@ class FeedsApi {
|
|
|
8063
8308
|
const body = {
|
|
8064
8309
|
created_by_id: request?.created_by_id,
|
|
8065
8310
|
description: request?.description,
|
|
8311
|
+
enrich_own_fields: request?.enrich_own_fields,
|
|
8066
8312
|
name: request?.name,
|
|
8067
8313
|
filter_tags: request?.filter_tags,
|
|
8068
8314
|
custom: request?.custom,
|
|
@@ -8091,6 +8337,7 @@ class FeedsApi {
|
|
|
8091
8337
|
}
|
|
8092
8338
|
async unpinActivity(request) {
|
|
8093
8339
|
const queryParams = {
|
|
8340
|
+
enrich_own_fields: request?.enrich_own_fields,
|
|
8094
8341
|
user_id: request?.user_id,
|
|
8095
8342
|
};
|
|
8096
8343
|
const pathParams = {
|
|
@@ -8109,6 +8356,7 @@ class FeedsApi {
|
|
|
8109
8356
|
activity_id: request?.activity_id,
|
|
8110
8357
|
};
|
|
8111
8358
|
const body = {
|
|
8359
|
+
enrich_own_fields: request?.enrich_own_fields,
|
|
8112
8360
|
user_id: request?.user_id,
|
|
8113
8361
|
user: request?.user,
|
|
8114
8362
|
};
|
|
@@ -8180,6 +8428,7 @@ class FeedsApi {
|
|
|
8180
8428
|
feed_id: request?.feed_id,
|
|
8181
8429
|
};
|
|
8182
8430
|
const body = {
|
|
8431
|
+
enrich_own_fields: request?.enrich_own_fields,
|
|
8183
8432
|
limit: request?.limit,
|
|
8184
8433
|
next: request?.next,
|
|
8185
8434
|
prev: request?.prev,
|
|
@@ -8202,6 +8451,14 @@ class FeedsApi {
|
|
|
8202
8451
|
decoders.GetFollowSuggestionsResponse?.(response.body);
|
|
8203
8452
|
return { ...response.body, metadata: response.metadata };
|
|
8204
8453
|
}
|
|
8454
|
+
async restoreFeedGroup(request) {
|
|
8455
|
+
const pathParams = {
|
|
8456
|
+
feed_group_id: request?.feed_group_id,
|
|
8457
|
+
};
|
|
8458
|
+
const response = await this.apiClient.sendRequest('POST', '/api/v2/feeds/feed_groups/{feed_group_id}/restore', pathParams, undefined);
|
|
8459
|
+
decoders.RestoreFeedGroupResponse?.(response.body);
|
|
8460
|
+
return { ...response.body, metadata: response.metadata };
|
|
8461
|
+
}
|
|
8205
8462
|
async deleteFeedGroup(request) {
|
|
8206
8463
|
const queryParams = {
|
|
8207
8464
|
hard_delete: request?.hard_delete,
|
|
@@ -8347,6 +8604,7 @@ class FeedsApi {
|
|
|
8347
8604
|
async createFeedsBatch(request) {
|
|
8348
8605
|
const body = {
|
|
8349
8606
|
feeds: request?.feeds,
|
|
8607
|
+
enrich_own_fields: request?.enrich_own_fields,
|
|
8350
8608
|
};
|
|
8351
8609
|
const response = await this.apiClient.sendRequest('POST', '/api/v2/feeds/feeds/batch', undefined, undefined, body, 'application/json');
|
|
8352
8610
|
decoders.CreateFeedsBatchResponse?.(response.body);
|
|
@@ -8374,6 +8632,7 @@ class FeedsApi {
|
|
|
8374
8632
|
}
|
|
8375
8633
|
async _queryFeeds(request) {
|
|
8376
8634
|
const body = {
|
|
8635
|
+
enrich_own_fields: request?.enrich_own_fields,
|
|
8377
8636
|
limit: request?.limit,
|
|
8378
8637
|
next: request?.next,
|
|
8379
8638
|
prev: request?.prev,
|
|
@@ -8403,6 +8662,7 @@ class FeedsApi {
|
|
|
8403
8662
|
target: request?.target,
|
|
8404
8663
|
copy_custom_to_notification: request?.copy_custom_to_notification,
|
|
8405
8664
|
create_notification_activity: request?.create_notification_activity,
|
|
8665
|
+
enrich_own_fields: request?.enrich_own_fields,
|
|
8406
8666
|
follower_role: request?.follower_role,
|
|
8407
8667
|
push_preference: request?.push_preference,
|
|
8408
8668
|
skip_push: request?.skip_push,
|
|
@@ -8419,6 +8679,7 @@ class FeedsApi {
|
|
|
8419
8679
|
target: request?.target,
|
|
8420
8680
|
copy_custom_to_notification: request?.copy_custom_to_notification,
|
|
8421
8681
|
create_notification_activity: request?.create_notification_activity,
|
|
8682
|
+
enrich_own_fields: request?.enrich_own_fields,
|
|
8422
8683
|
push_preference: request?.push_preference,
|
|
8423
8684
|
skip_push: request?.skip_push,
|
|
8424
8685
|
status: request?.status,
|
|
@@ -8441,6 +8702,7 @@ class FeedsApi {
|
|
|
8441
8702
|
async followBatch(request) {
|
|
8442
8703
|
const body = {
|
|
8443
8704
|
follows: request?.follows,
|
|
8705
|
+
enrich_own_fields: request?.enrich_own_fields,
|
|
8444
8706
|
};
|
|
8445
8707
|
const response = await this.apiClient.sendRequest('POST', '/api/v2/feeds/follows/batch', undefined, undefined, body, 'application/json');
|
|
8446
8708
|
decoders.FollowBatchResponse?.(response.body);
|
|
@@ -8449,6 +8711,7 @@ class FeedsApi {
|
|
|
8449
8711
|
async getOrCreateFollows(request) {
|
|
8450
8712
|
const body = {
|
|
8451
8713
|
follows: request?.follows,
|
|
8714
|
+
enrich_own_fields: request?.enrich_own_fields,
|
|
8452
8715
|
};
|
|
8453
8716
|
const response = await this.apiClient.sendRequest('POST', '/api/v2/feeds/follows/batch/upsert', undefined, undefined, body, 'application/json');
|
|
8454
8717
|
decoders.FollowBatchResponse?.(response.body);
|
|
@@ -8478,6 +8741,7 @@ class FeedsApi {
|
|
|
8478
8741
|
async unfollow(request) {
|
|
8479
8742
|
const queryParams = {
|
|
8480
8743
|
delete_notification_activity: request?.delete_notification_activity,
|
|
8744
|
+
enrich_own_fields: request?.enrich_own_fields,
|
|
8481
8745
|
};
|
|
8482
8746
|
const pathParams = {
|
|
8483
8747
|
source: request?.source,
|
|
@@ -8548,6 +8812,7 @@ class FeedsApi {
|
|
|
8548
8812
|
const body = {
|
|
8549
8813
|
follows: request?.follows,
|
|
8550
8814
|
delete_notification_activity: request?.delete_notification_activity,
|
|
8815
|
+
enrich_own_fields: request?.enrich_own_fields,
|
|
8551
8816
|
};
|
|
8552
8817
|
const response = await this.apiClient.sendRequest('POST', '/api/v2/feeds/unfollow/batch', undefined, undefined, body, 'application/json');
|
|
8553
8818
|
decoders.UnfollowBatchResponse?.(response.body);
|
|
@@ -8557,6 +8822,7 @@ class FeedsApi {
|
|
|
8557
8822
|
const body = {
|
|
8558
8823
|
follows: request?.follows,
|
|
8559
8824
|
delete_notification_activity: request?.delete_notification_activity,
|
|
8825
|
+
enrich_own_fields: request?.enrich_own_fields,
|
|
8560
8826
|
};
|
|
8561
8827
|
const response = await this.apiClient.sendRequest('POST', '/api/v2/feeds/unfollow/batch/upsert', undefined, undefined, body, 'application/json');
|
|
8562
8828
|
decoders.UnfollowBatchResponse?.(response.body);
|