@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/package.json
CHANGED
package/src/gen/chat/ChatApi.ts
CHANGED
|
@@ -70,6 +70,8 @@ import {
|
|
|
70
70
|
QuerySegmentTargetsResponse,
|
|
71
71
|
QuerySegmentsRequest,
|
|
72
72
|
QuerySegmentsResponse,
|
|
73
|
+
QueryTeamUsageStatsRequest,
|
|
74
|
+
QueryTeamUsageStatsResponse,
|
|
73
75
|
QueryThreadsRequest,
|
|
74
76
|
QueryThreadsResponse,
|
|
75
77
|
ReminderResponseData,
|
|
@@ -91,6 +93,8 @@ import {
|
|
|
91
93
|
TranslateMessageRequest,
|
|
92
94
|
TruncateChannelRequest,
|
|
93
95
|
TruncateChannelResponse,
|
|
96
|
+
UndeleteMessageRequest,
|
|
97
|
+
UndeleteMessageResponse,
|
|
94
98
|
UnmuteChannelRequest,
|
|
95
99
|
UnmuteResponse,
|
|
96
100
|
UnreadCountsBatchRequest,
|
|
@@ -203,7 +207,7 @@ export class ChatApi {
|
|
|
203
207
|
return { ...response.body, metadata: response.metadata };
|
|
204
208
|
}
|
|
205
209
|
|
|
206
|
-
async
|
|
210
|
+
async stopCampaign(
|
|
207
211
|
request: StopCampaignRequest & { id: string },
|
|
208
212
|
): Promise<StreamResponse<CampaignResponse>> {
|
|
209
213
|
const pathParams = {
|
|
@@ -1609,19 +1613,17 @@ export class ChatApi {
|
|
|
1609
1613
|
}
|
|
1610
1614
|
|
|
1611
1615
|
async undeleteMessage(
|
|
1612
|
-
request:
|
|
1613
|
-
): Promise<StreamResponse<
|
|
1616
|
+
request: UndeleteMessageRequest & { id: string },
|
|
1617
|
+
): Promise<StreamResponse<UndeleteMessageResponse>> {
|
|
1614
1618
|
const pathParams = {
|
|
1615
1619
|
id: request?.id,
|
|
1616
1620
|
};
|
|
1617
1621
|
const body = {
|
|
1618
|
-
|
|
1619
|
-
skip_enrich_url: request?.skip_enrich_url,
|
|
1620
|
-
skip_push: request?.skip_push,
|
|
1622
|
+
undeleted_by: request?.undeleted_by,
|
|
1621
1623
|
};
|
|
1622
1624
|
|
|
1623
1625
|
const response = await this.apiClient.sendRequest<
|
|
1624
|
-
StreamResponse<
|
|
1626
|
+
StreamResponse<UndeleteMessageResponse>
|
|
1625
1627
|
>(
|
|
1626
1628
|
'POST',
|
|
1627
1629
|
'/api/v2/chat/messages/{id}/undelete',
|
|
@@ -1631,7 +1633,7 @@ export class ChatApi {
|
|
|
1631
1633
|
'application/json',
|
|
1632
1634
|
);
|
|
1633
1635
|
|
|
1634
|
-
decoders.
|
|
1636
|
+
decoders.UndeleteMessageResponse?.(response.body);
|
|
1635
1637
|
|
|
1636
1638
|
return { ...response.body, metadata: response.metadata };
|
|
1637
1639
|
}
|
|
@@ -2094,6 +2096,33 @@ export class ChatApi {
|
|
|
2094
2096
|
return { ...response.body, metadata: response.metadata };
|
|
2095
2097
|
}
|
|
2096
2098
|
|
|
2099
|
+
async queryTeamUsageStats(
|
|
2100
|
+
request?: QueryTeamUsageStatsRequest,
|
|
2101
|
+
): Promise<StreamResponse<QueryTeamUsageStatsResponse>> {
|
|
2102
|
+
const body = {
|
|
2103
|
+
end_date: request?.end_date,
|
|
2104
|
+
limit: request?.limit,
|
|
2105
|
+
month: request?.month,
|
|
2106
|
+
next: request?.next,
|
|
2107
|
+
start_date: request?.start_date,
|
|
2108
|
+
};
|
|
2109
|
+
|
|
2110
|
+
const response = await this.apiClient.sendRequest<
|
|
2111
|
+
StreamResponse<QueryTeamUsageStatsResponse>
|
|
2112
|
+
>(
|
|
2113
|
+
'POST',
|
|
2114
|
+
'/api/v2/chat/stats/team_usage',
|
|
2115
|
+
undefined,
|
|
2116
|
+
undefined,
|
|
2117
|
+
body,
|
|
2118
|
+
'application/json',
|
|
2119
|
+
);
|
|
2120
|
+
|
|
2121
|
+
decoders.QueryTeamUsageStatsResponse?.(response.body);
|
|
2122
|
+
|
|
2123
|
+
return { ...response.body, metadata: response.metadata };
|
|
2124
|
+
}
|
|
2125
|
+
|
|
2097
2126
|
async queryThreads(
|
|
2098
2127
|
request?: QueryThreadsRequest,
|
|
2099
2128
|
): Promise<StreamResponse<QueryThreadsResponse>> {
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { ApiClient, StreamResponse } from '../../gen-imports';
|
|
2
2
|
import {
|
|
3
|
+
AddUserGroupMembersRequest,
|
|
4
|
+
AddUserGroupMembersResponse,
|
|
3
5
|
BlockUsersRequest,
|
|
4
6
|
BlockUsersResponse,
|
|
5
7
|
CheckExternalStorageResponse,
|
|
@@ -26,6 +28,8 @@ import {
|
|
|
26
28
|
CreatePollRequest,
|
|
27
29
|
CreateRoleRequest,
|
|
28
30
|
CreateRoleResponse,
|
|
31
|
+
CreateUserGroupRequest,
|
|
32
|
+
CreateUserGroupResponse,
|
|
29
33
|
DeactivateUserRequest,
|
|
30
34
|
DeactivateUserResponse,
|
|
31
35
|
DeactivateUsersRequest,
|
|
@@ -49,6 +53,7 @@ import {
|
|
|
49
53
|
GetPushTemplatesResponse,
|
|
50
54
|
GetRateLimitsResponse,
|
|
51
55
|
GetTaskResponse,
|
|
56
|
+
GetUserGroupResponse,
|
|
52
57
|
ImageUploadRequest,
|
|
53
58
|
ImageUploadResponse,
|
|
54
59
|
ListBlockListResponse,
|
|
@@ -59,6 +64,7 @@ import {
|
|
|
59
64
|
ListPermissionsResponse,
|
|
60
65
|
ListPushProvidersResponse,
|
|
61
66
|
ListRolesResponse,
|
|
67
|
+
ListUserGroupsResponse,
|
|
62
68
|
PollOptionResponse,
|
|
63
69
|
PollResponse,
|
|
64
70
|
PollVotesResponse,
|
|
@@ -71,8 +77,10 @@ import {
|
|
|
71
77
|
ReactivateUserResponse,
|
|
72
78
|
ReactivateUsersRequest,
|
|
73
79
|
ReactivateUsersResponse,
|
|
80
|
+
RemoveUserGroupMembersResponse,
|
|
74
81
|
Response,
|
|
75
82
|
RestoreUsersRequest,
|
|
83
|
+
SearchUserGroupsResponse,
|
|
76
84
|
SharedLocationResponse,
|
|
77
85
|
SharedLocationsResponse,
|
|
78
86
|
UnblockUsersRequest,
|
|
@@ -86,6 +94,8 @@ import {
|
|
|
86
94
|
UpdatePollOptionRequest,
|
|
87
95
|
UpdatePollPartialRequest,
|
|
88
96
|
UpdatePollRequest,
|
|
97
|
+
UpdateUserGroupRequest,
|
|
98
|
+
UpdateUserGroupResponse,
|
|
89
99
|
UpdateUsersPartialRequest,
|
|
90
100
|
UpdateUsersRequest,
|
|
91
101
|
UpdateUsersResponse,
|
|
@@ -131,6 +141,7 @@ export class CommonApi {
|
|
|
131
141
|
max_aggregated_activities_length:
|
|
132
142
|
request?.max_aggregated_activities_length,
|
|
133
143
|
migrate_permissions_to_v2: request?.migrate_permissions_to_v2,
|
|
144
|
+
moderation_analytics_enabled: request?.moderation_analytics_enabled,
|
|
134
145
|
moderation_enabled: request?.moderation_enabled,
|
|
135
146
|
moderation_webhook_url: request?.moderation_webhook_url,
|
|
136
147
|
multi_tenant_enabled: request?.multi_tenant_enabled,
|
|
@@ -623,6 +634,7 @@ export class CommonApi {
|
|
|
623
634
|
const body = {
|
|
624
635
|
mode: request?.mode,
|
|
625
636
|
path: request?.path,
|
|
637
|
+
merge_custom: request?.merge_custom,
|
|
626
638
|
};
|
|
627
639
|
|
|
628
640
|
const response = await this.apiClient.sendRequest<
|
|
@@ -1371,6 +1383,193 @@ export class CommonApi {
|
|
|
1371
1383
|
return { ...response.body, metadata: response.metadata };
|
|
1372
1384
|
}
|
|
1373
1385
|
|
|
1386
|
+
async listUserGroups(request?: {
|
|
1387
|
+
limit?: number;
|
|
1388
|
+
id_gt?: string;
|
|
1389
|
+
created_at_gt?: string;
|
|
1390
|
+
team_id?: string;
|
|
1391
|
+
}): Promise<StreamResponse<ListUserGroupsResponse>> {
|
|
1392
|
+
const queryParams = {
|
|
1393
|
+
limit: request?.limit,
|
|
1394
|
+
id_gt: request?.id_gt,
|
|
1395
|
+
created_at_gt: request?.created_at_gt,
|
|
1396
|
+
team_id: request?.team_id,
|
|
1397
|
+
};
|
|
1398
|
+
|
|
1399
|
+
const response = await this.apiClient.sendRequest<
|
|
1400
|
+
StreamResponse<ListUserGroupsResponse>
|
|
1401
|
+
>('GET', '/api/v2/usergroups', undefined, queryParams);
|
|
1402
|
+
|
|
1403
|
+
decoders.ListUserGroupsResponse?.(response.body);
|
|
1404
|
+
|
|
1405
|
+
return { ...response.body, metadata: response.metadata };
|
|
1406
|
+
}
|
|
1407
|
+
|
|
1408
|
+
async createUserGroup(
|
|
1409
|
+
request: CreateUserGroupRequest,
|
|
1410
|
+
): Promise<StreamResponse<CreateUserGroupResponse>> {
|
|
1411
|
+
const body = {
|
|
1412
|
+
name: request?.name,
|
|
1413
|
+
description: request?.description,
|
|
1414
|
+
id: request?.id,
|
|
1415
|
+
team_id: request?.team_id,
|
|
1416
|
+
member_ids: request?.member_ids,
|
|
1417
|
+
};
|
|
1418
|
+
|
|
1419
|
+
const response = await this.apiClient.sendRequest<
|
|
1420
|
+
StreamResponse<CreateUserGroupResponse>
|
|
1421
|
+
>(
|
|
1422
|
+
'POST',
|
|
1423
|
+
'/api/v2/usergroups',
|
|
1424
|
+
undefined,
|
|
1425
|
+
undefined,
|
|
1426
|
+
body,
|
|
1427
|
+
'application/json',
|
|
1428
|
+
);
|
|
1429
|
+
|
|
1430
|
+
decoders.CreateUserGroupResponse?.(response.body);
|
|
1431
|
+
|
|
1432
|
+
return { ...response.body, metadata: response.metadata };
|
|
1433
|
+
}
|
|
1434
|
+
|
|
1435
|
+
async searchUserGroups(request: {
|
|
1436
|
+
query: string;
|
|
1437
|
+
limit?: number;
|
|
1438
|
+
name_gt?: string;
|
|
1439
|
+
id_gt?: string;
|
|
1440
|
+
team_id?: string;
|
|
1441
|
+
}): Promise<StreamResponse<SearchUserGroupsResponse>> {
|
|
1442
|
+
const queryParams = {
|
|
1443
|
+
query: request?.query,
|
|
1444
|
+
limit: request?.limit,
|
|
1445
|
+
name_gt: request?.name_gt,
|
|
1446
|
+
id_gt: request?.id_gt,
|
|
1447
|
+
team_id: request?.team_id,
|
|
1448
|
+
};
|
|
1449
|
+
|
|
1450
|
+
const response = await this.apiClient.sendRequest<
|
|
1451
|
+
StreamResponse<SearchUserGroupsResponse>
|
|
1452
|
+
>('GET', '/api/v2/usergroups/search', undefined, queryParams);
|
|
1453
|
+
|
|
1454
|
+
decoders.SearchUserGroupsResponse?.(response.body);
|
|
1455
|
+
|
|
1456
|
+
return { ...response.body, metadata: response.metadata };
|
|
1457
|
+
}
|
|
1458
|
+
|
|
1459
|
+
async deleteUserGroup(request: {
|
|
1460
|
+
id: string;
|
|
1461
|
+
team_id?: string;
|
|
1462
|
+
}): Promise<StreamResponse<Response>> {
|
|
1463
|
+
const queryParams = {
|
|
1464
|
+
team_id: request?.team_id,
|
|
1465
|
+
};
|
|
1466
|
+
const pathParams = {
|
|
1467
|
+
id: request?.id,
|
|
1468
|
+
};
|
|
1469
|
+
|
|
1470
|
+
const response = await this.apiClient.sendRequest<StreamResponse<Response>>(
|
|
1471
|
+
'DELETE',
|
|
1472
|
+
'/api/v2/usergroups/{id}',
|
|
1473
|
+
pathParams,
|
|
1474
|
+
queryParams,
|
|
1475
|
+
);
|
|
1476
|
+
|
|
1477
|
+
decoders.Response?.(response.body);
|
|
1478
|
+
|
|
1479
|
+
return { ...response.body, metadata: response.metadata };
|
|
1480
|
+
}
|
|
1481
|
+
|
|
1482
|
+
async getUserGroup(request: {
|
|
1483
|
+
id: string;
|
|
1484
|
+
team_id?: string;
|
|
1485
|
+
}): Promise<StreamResponse<GetUserGroupResponse>> {
|
|
1486
|
+
const queryParams = {
|
|
1487
|
+
team_id: request?.team_id,
|
|
1488
|
+
};
|
|
1489
|
+
const pathParams = {
|
|
1490
|
+
id: request?.id,
|
|
1491
|
+
};
|
|
1492
|
+
|
|
1493
|
+
const response = await this.apiClient.sendRequest<
|
|
1494
|
+
StreamResponse<GetUserGroupResponse>
|
|
1495
|
+
>('GET', '/api/v2/usergroups/{id}', pathParams, queryParams);
|
|
1496
|
+
|
|
1497
|
+
decoders.GetUserGroupResponse?.(response.body);
|
|
1498
|
+
|
|
1499
|
+
return { ...response.body, metadata: response.metadata };
|
|
1500
|
+
}
|
|
1501
|
+
|
|
1502
|
+
async updateUserGroup(
|
|
1503
|
+
request: UpdateUserGroupRequest & { id: string },
|
|
1504
|
+
): Promise<StreamResponse<UpdateUserGroupResponse>> {
|
|
1505
|
+
const pathParams = {
|
|
1506
|
+
id: request?.id,
|
|
1507
|
+
};
|
|
1508
|
+
const body = {
|
|
1509
|
+
description: request?.description,
|
|
1510
|
+
name: request?.name,
|
|
1511
|
+
team_id: request?.team_id,
|
|
1512
|
+
};
|
|
1513
|
+
|
|
1514
|
+
const response = await this.apiClient.sendRequest<
|
|
1515
|
+
StreamResponse<UpdateUserGroupResponse>
|
|
1516
|
+
>(
|
|
1517
|
+
'PUT',
|
|
1518
|
+
'/api/v2/usergroups/{id}',
|
|
1519
|
+
pathParams,
|
|
1520
|
+
undefined,
|
|
1521
|
+
body,
|
|
1522
|
+
'application/json',
|
|
1523
|
+
);
|
|
1524
|
+
|
|
1525
|
+
decoders.UpdateUserGroupResponse?.(response.body);
|
|
1526
|
+
|
|
1527
|
+
return { ...response.body, metadata: response.metadata };
|
|
1528
|
+
}
|
|
1529
|
+
|
|
1530
|
+
async removeUserGroupMembers(request: {
|
|
1531
|
+
id: string;
|
|
1532
|
+
}): Promise<StreamResponse<RemoveUserGroupMembersResponse>> {
|
|
1533
|
+
const pathParams = {
|
|
1534
|
+
id: request?.id,
|
|
1535
|
+
};
|
|
1536
|
+
|
|
1537
|
+
const response = await this.apiClient.sendRequest<
|
|
1538
|
+
StreamResponse<RemoveUserGroupMembersResponse>
|
|
1539
|
+
>('DELETE', '/api/v2/usergroups/{id}/members', pathParams, undefined);
|
|
1540
|
+
|
|
1541
|
+
decoders.RemoveUserGroupMembersResponse?.(response.body);
|
|
1542
|
+
|
|
1543
|
+
return { ...response.body, metadata: response.metadata };
|
|
1544
|
+
}
|
|
1545
|
+
|
|
1546
|
+
async addUserGroupMembers(
|
|
1547
|
+
request: AddUserGroupMembersRequest & { id: string },
|
|
1548
|
+
): Promise<StreamResponse<AddUserGroupMembersResponse>> {
|
|
1549
|
+
const pathParams = {
|
|
1550
|
+
id: request?.id,
|
|
1551
|
+
};
|
|
1552
|
+
const body = {
|
|
1553
|
+
member_ids: request?.member_ids,
|
|
1554
|
+
team_id: request?.team_id,
|
|
1555
|
+
};
|
|
1556
|
+
|
|
1557
|
+
const response = await this.apiClient.sendRequest<
|
|
1558
|
+
StreamResponse<AddUserGroupMembersResponse>
|
|
1559
|
+
>(
|
|
1560
|
+
'POST',
|
|
1561
|
+
'/api/v2/usergroups/{id}/members',
|
|
1562
|
+
pathParams,
|
|
1563
|
+
undefined,
|
|
1564
|
+
body,
|
|
1565
|
+
'application/json',
|
|
1566
|
+
);
|
|
1567
|
+
|
|
1568
|
+
decoders.AddUserGroupMembersResponse?.(response.body);
|
|
1569
|
+
|
|
1570
|
+
return { ...response.body, metadata: response.metadata };
|
|
1571
|
+
}
|
|
1572
|
+
|
|
1374
1573
|
async queryUsers(request?: {
|
|
1375
1574
|
payload?: QueryUsersPayload;
|
|
1376
1575
|
}): Promise<StreamResponse<QueryUsersResponse>> {
|
|
@@ -105,6 +105,7 @@ import {
|
|
|
105
105
|
Response,
|
|
106
106
|
RestoreActivityRequest,
|
|
107
107
|
RestoreActivityResponse,
|
|
108
|
+
RestoreFeedGroupResponse,
|
|
108
109
|
SingleFollowResponse,
|
|
109
110
|
UnfollowBatchRequest,
|
|
110
111
|
UnfollowBatchResponse,
|
|
@@ -828,13 +829,13 @@ export class FeedsApi {
|
|
|
828
829
|
return { ...response.body, metadata: response.metadata };
|
|
829
830
|
}
|
|
830
831
|
|
|
831
|
-
async readCollections(request
|
|
832
|
-
collection_refs: string[];
|
|
832
|
+
async readCollections(request?: {
|
|
833
833
|
user_id?: string;
|
|
834
|
+
collection_refs?: string[];
|
|
834
835
|
}): Promise<StreamResponse<ReadCollectionsResponse>> {
|
|
835
836
|
const queryParams = {
|
|
836
|
-
collection_refs: request?.collection_refs,
|
|
837
837
|
user_id: request?.user_id,
|
|
838
|
+
collection_refs: request?.collection_refs,
|
|
838
839
|
};
|
|
839
840
|
|
|
840
841
|
const response = await this.apiClient.sendRequest<
|
|
@@ -1670,6 +1671,27 @@ export class FeedsApi {
|
|
|
1670
1671
|
return { ...response.body, metadata: response.metadata };
|
|
1671
1672
|
}
|
|
1672
1673
|
|
|
1674
|
+
async restoreFeedGroup(request: {
|
|
1675
|
+
feed_group_id: string;
|
|
1676
|
+
}): Promise<StreamResponse<RestoreFeedGroupResponse>> {
|
|
1677
|
+
const pathParams = {
|
|
1678
|
+
feed_group_id: request?.feed_group_id,
|
|
1679
|
+
};
|
|
1680
|
+
|
|
1681
|
+
const response = await this.apiClient.sendRequest<
|
|
1682
|
+
StreamResponse<RestoreFeedGroupResponse>
|
|
1683
|
+
>(
|
|
1684
|
+
'POST',
|
|
1685
|
+
'/api/v2/feeds/feed_groups/{feed_group_id}/restore',
|
|
1686
|
+
pathParams,
|
|
1687
|
+
undefined,
|
|
1688
|
+
);
|
|
1689
|
+
|
|
1690
|
+
decoders.RestoreFeedGroupResponse?.(response.body);
|
|
1691
|
+
|
|
1692
|
+
return { ...response.body, metadata: response.metadata };
|
|
1693
|
+
}
|
|
1694
|
+
|
|
1673
1695
|
async deleteFeedGroup(request: {
|
|
1674
1696
|
id: string;
|
|
1675
1697
|
hard_delete?: boolean;
|
|
@@ -324,6 +324,13 @@ decoders.AddReactionResponse = (input?: Record<string, any>) => {
|
|
|
324
324
|
return decode(typeMappings, input);
|
|
325
325
|
};
|
|
326
326
|
|
|
327
|
+
decoders.AddUserGroupMembersResponse = (input?: Record<string, any>) => {
|
|
328
|
+
const typeMappings: TypeMapping = {
|
|
329
|
+
user_group: { type: 'UserGroupResponse', isSingle: true },
|
|
330
|
+
};
|
|
331
|
+
return decode(typeMappings, input);
|
|
332
|
+
};
|
|
333
|
+
|
|
327
334
|
decoders.AggregatedActivityResponse = (input?: Record<string, any>) => {
|
|
328
335
|
const typeMappings: TypeMapping = {
|
|
329
336
|
created_at: { type: 'DatetimeType', isSingle: true },
|
|
@@ -1080,6 +1087,8 @@ decoders.CallStatsParticipantSession = (input?: Record<string, any>) => {
|
|
|
1080
1087
|
decoders.CallStatsReportReadyEvent = (input?: Record<string, any>) => {
|
|
1081
1088
|
const typeMappings: TypeMapping = {
|
|
1082
1089
|
created_at: { type: 'DatetimeType', isSingle: true },
|
|
1090
|
+
|
|
1091
|
+
participants_overview: { type: 'CallStatsParticipant', isSingle: false },
|
|
1083
1092
|
};
|
|
1084
1093
|
return decode(typeMappings, input);
|
|
1085
1094
|
};
|
|
@@ -1830,6 +1839,13 @@ decoders.CreateSIPTrunkResponse = (input?: Record<string, any>) => {
|
|
|
1830
1839
|
return decode(typeMappings, input);
|
|
1831
1840
|
};
|
|
1832
1841
|
|
|
1842
|
+
decoders.CreateUserGroupResponse = (input?: Record<string, any>) => {
|
|
1843
|
+
const typeMappings: TypeMapping = {
|
|
1844
|
+
user_group: { type: 'UserGroupResponse', isSingle: true },
|
|
1845
|
+
};
|
|
1846
|
+
return decode(typeMappings, input);
|
|
1847
|
+
};
|
|
1848
|
+
|
|
1833
1849
|
decoders.CustomCheckResponse = (input?: Record<string, any>) => {
|
|
1834
1850
|
const typeMappings: TypeMapping = {
|
|
1835
1851
|
item: { type: 'ReviewQueueItemResponse', isSingle: true },
|
|
@@ -2086,6 +2102,15 @@ decoders.FeedGroupResponse = (input?: Record<string, any>) => {
|
|
|
2086
2102
|
return decode(typeMappings, input);
|
|
2087
2103
|
};
|
|
2088
2104
|
|
|
2105
|
+
decoders.FeedGroupRestoredEvent = (input?: Record<string, any>) => {
|
|
2106
|
+
const typeMappings: TypeMapping = {
|
|
2107
|
+
created_at: { type: 'DatetimeType', isSingle: true },
|
|
2108
|
+
|
|
2109
|
+
received_at: { type: 'DatetimeType', isSingle: true },
|
|
2110
|
+
};
|
|
2111
|
+
return decode(typeMappings, input);
|
|
2112
|
+
};
|
|
2113
|
+
|
|
2089
2114
|
decoders.FeedMemberAddedEvent = (input?: Record<string, any>) => {
|
|
2090
2115
|
const typeMappings: TypeMapping = {
|
|
2091
2116
|
created_at: { type: 'DatetimeType', isSingle: true },
|
|
@@ -2653,6 +2678,13 @@ decoders.GetThreadResponse = (input?: Record<string, any>) => {
|
|
|
2653
2678
|
return decode(typeMappings, input);
|
|
2654
2679
|
};
|
|
2655
2680
|
|
|
2681
|
+
decoders.GetUserGroupResponse = (input?: Record<string, any>) => {
|
|
2682
|
+
const typeMappings: TypeMapping = {
|
|
2683
|
+
user_group: { type: 'UserGroupResponse', isSingle: true },
|
|
2684
|
+
};
|
|
2685
|
+
return decode(typeMappings, input);
|
|
2686
|
+
};
|
|
2687
|
+
|
|
2656
2688
|
decoders.GoLiveResponse = (input?: Record<string, any>) => {
|
|
2657
2689
|
const typeMappings: TypeMapping = {
|
|
2658
2690
|
call: { type: 'CallResponse', isSingle: true },
|
|
@@ -2827,9 +2859,31 @@ decoders.ListTranscriptionsResponse = (input?: Record<string, any>) => {
|
|
|
2827
2859
|
return decode(typeMappings, input);
|
|
2828
2860
|
};
|
|
2829
2861
|
|
|
2862
|
+
decoders.ListUserGroupsResponse = (input?: Record<string, any>) => {
|
|
2863
|
+
const typeMappings: TypeMapping = {
|
|
2864
|
+
user_groups: { type: 'UserGroupResponse', isSingle: false },
|
|
2865
|
+
};
|
|
2866
|
+
return decode(typeMappings, input);
|
|
2867
|
+
};
|
|
2868
|
+
|
|
2830
2869
|
decoders.MarkReadResponse = (input?: Record<string, any>) => {
|
|
2831
2870
|
const typeMappings: TypeMapping = {
|
|
2832
|
-
event: { type: '
|
|
2871
|
+
event: { type: 'MarkReadResponseEvent', isSingle: true },
|
|
2872
|
+
};
|
|
2873
|
+
return decode(typeMappings, input);
|
|
2874
|
+
};
|
|
2875
|
+
|
|
2876
|
+
decoders.MarkReadResponseEvent = (input?: Record<string, any>) => {
|
|
2877
|
+
const typeMappings: TypeMapping = {
|
|
2878
|
+
created_at: { type: 'DatetimeType', isSingle: true },
|
|
2879
|
+
|
|
2880
|
+
channel_last_message_at: { type: 'DatetimeType', isSingle: true },
|
|
2881
|
+
|
|
2882
|
+
channel: { type: 'ChannelResponse', isSingle: true },
|
|
2883
|
+
|
|
2884
|
+
thread: { type: 'ThreadResponse', isSingle: true },
|
|
2885
|
+
|
|
2886
|
+
user: { type: 'UserResponseCommonFields', isSingle: true },
|
|
2833
2887
|
};
|
|
2834
2888
|
return decode(typeMappings, input);
|
|
2835
2889
|
};
|
|
@@ -3016,7 +3070,7 @@ decoders.MessageReadEvent = (input?: Record<string, any>) => {
|
|
|
3016
3070
|
const typeMappings: TypeMapping = {
|
|
3017
3071
|
created_at: { type: 'DatetimeType', isSingle: true },
|
|
3018
3072
|
|
|
3019
|
-
|
|
3073
|
+
received_at: { type: 'DatetimeType', isSingle: true },
|
|
3020
3074
|
|
|
3021
3075
|
channel: { type: 'ChannelResponse', isSingle: true },
|
|
3022
3076
|
|
|
@@ -3225,6 +3279,15 @@ decoders.ModerationRuleV2Response = (input?: Record<string, any>) => {
|
|
|
3225
3279
|
return decode(typeMappings, input);
|
|
3226
3280
|
};
|
|
3227
3281
|
|
|
3282
|
+
decoders.ModerationRulesTriggeredEvent = (input?: Record<string, any>) => {
|
|
3283
|
+
const typeMappings: TypeMapping = {
|
|
3284
|
+
created_at: { type: 'DatetimeType', isSingle: true },
|
|
3285
|
+
|
|
3286
|
+
received_at: { type: 'DatetimeType', isSingle: true },
|
|
3287
|
+
};
|
|
3288
|
+
return decode(typeMappings, input);
|
|
3289
|
+
};
|
|
3290
|
+
|
|
3228
3291
|
decoders.MuteChannelResponse = (input?: Record<string, any>) => {
|
|
3229
3292
|
const typeMappings: TypeMapping = {
|
|
3230
3293
|
channel_mutes: { type: 'ChannelMute', isSingle: false },
|
|
@@ -4012,6 +4075,13 @@ decoders.ReminderUpdatedEvent = (input?: Record<string, any>) => {
|
|
|
4012
4075
|
return decode(typeMappings, input);
|
|
4013
4076
|
};
|
|
4014
4077
|
|
|
4078
|
+
decoders.RemoveUserGroupMembersResponse = (input?: Record<string, any>) => {
|
|
4079
|
+
const typeMappings: TypeMapping = {
|
|
4080
|
+
user_group: { type: 'UserGroupResponse', isSingle: true },
|
|
4081
|
+
};
|
|
4082
|
+
return decode(typeMappings, input);
|
|
4083
|
+
};
|
|
4084
|
+
|
|
4015
4085
|
decoders.ResolveSipInboundResponse = (input?: Record<string, any>) => {
|
|
4016
4086
|
const typeMappings: TypeMapping = {
|
|
4017
4087
|
sip_routing_rule: { type: 'SIPInboundRoutingRuleResponse', isSingle: true },
|
|
@@ -4028,6 +4098,13 @@ decoders.RestoreActivityResponse = (input?: Record<string, any>) => {
|
|
|
4028
4098
|
return decode(typeMappings, input);
|
|
4029
4099
|
};
|
|
4030
4100
|
|
|
4101
|
+
decoders.RestoreFeedGroupResponse = (input?: Record<string, any>) => {
|
|
4102
|
+
const typeMappings: TypeMapping = {
|
|
4103
|
+
feed_group: { type: 'FeedGroupResponse', isSingle: true },
|
|
4104
|
+
};
|
|
4105
|
+
return decode(typeMappings, input);
|
|
4106
|
+
};
|
|
4107
|
+
|
|
4031
4108
|
decoders.ReviewQueueItemNewEvent = (input?: Record<string, any>) => {
|
|
4032
4109
|
const typeMappings: TypeMapping = {
|
|
4033
4110
|
created_at: { type: 'DatetimeType', isSingle: true },
|
|
@@ -4174,6 +4251,13 @@ decoders.SearchResultMessage = (input?: Record<string, any>) => {
|
|
|
4174
4251
|
return decode(typeMappings, input);
|
|
4175
4252
|
};
|
|
4176
4253
|
|
|
4254
|
+
decoders.SearchUserGroupsResponse = (input?: Record<string, any>) => {
|
|
4255
|
+
const typeMappings: TypeMapping = {
|
|
4256
|
+
user_groups: { type: 'UserGroupResponse', isSingle: false },
|
|
4257
|
+
};
|
|
4258
|
+
return decode(typeMappings, input);
|
|
4259
|
+
};
|
|
4260
|
+
|
|
4177
4261
|
decoders.Segment = (input?: Record<string, any>) => {
|
|
4178
4262
|
const typeMappings: TypeMapping = {
|
|
4179
4263
|
created_at: { type: 'DatetimeType', isSingle: true },
|
|
@@ -4424,6 +4508,13 @@ decoders.UnblockedUserEvent = (input?: Record<string, any>) => {
|
|
|
4424
4508
|
return decode(typeMappings, input);
|
|
4425
4509
|
};
|
|
4426
4510
|
|
|
4511
|
+
decoders.UndeleteMessageResponse = (input?: Record<string, any>) => {
|
|
4512
|
+
const typeMappings: TypeMapping = {
|
|
4513
|
+
message: { type: 'MessageResponse', isSingle: true },
|
|
4514
|
+
};
|
|
4515
|
+
return decode(typeMappings, input);
|
|
4516
|
+
};
|
|
4517
|
+
|
|
4427
4518
|
decoders.UnfollowBatchResponse = (input?: Record<string, any>) => {
|
|
4428
4519
|
const typeMappings: TypeMapping = {
|
|
4429
4520
|
follows: { type: 'FollowResponse', isSingle: false },
|
|
@@ -4692,6 +4783,13 @@ decoders.UpdateThreadPartialResponse = (input?: Record<string, any>) => {
|
|
|
4692
4783
|
return decode(typeMappings, input);
|
|
4693
4784
|
};
|
|
4694
4785
|
|
|
4786
|
+
decoders.UpdateUserGroupResponse = (input?: Record<string, any>) => {
|
|
4787
|
+
const typeMappings: TypeMapping = {
|
|
4788
|
+
user_group: { type: 'UserGroupResponse', isSingle: true },
|
|
4789
|
+
};
|
|
4790
|
+
return decode(typeMappings, input);
|
|
4791
|
+
};
|
|
4792
|
+
|
|
4695
4793
|
decoders.UpdateUsersResponse = (input?: Record<string, any>) => {
|
|
4696
4794
|
const typeMappings: TypeMapping = {
|
|
4697
4795
|
users: { type: 'FullUserResponse', isSingle: false },
|
|
@@ -4818,6 +4916,79 @@ decoders.UserFlaggedEvent = (input?: Record<string, any>) => {
|
|
|
4818
4916
|
return decode(typeMappings, input);
|
|
4819
4917
|
};
|
|
4820
4918
|
|
|
4919
|
+
decoders.UserGroupCreatedEvent = (input?: Record<string, any>) => {
|
|
4920
|
+
const typeMappings: TypeMapping = {
|
|
4921
|
+
created_at: { type: 'DatetimeType', isSingle: true },
|
|
4922
|
+
|
|
4923
|
+
received_at: { type: 'DatetimeType', isSingle: true },
|
|
4924
|
+
|
|
4925
|
+
user: { type: 'UserResponseCommonFields', isSingle: true },
|
|
4926
|
+
};
|
|
4927
|
+
return decode(typeMappings, input);
|
|
4928
|
+
};
|
|
4929
|
+
|
|
4930
|
+
decoders.UserGroupDeletedEvent = (input?: Record<string, any>) => {
|
|
4931
|
+
const typeMappings: TypeMapping = {
|
|
4932
|
+
created_at: { type: 'DatetimeType', isSingle: true },
|
|
4933
|
+
|
|
4934
|
+
received_at: { type: 'DatetimeType', isSingle: true },
|
|
4935
|
+
|
|
4936
|
+
user: { type: 'UserResponseCommonFields', isSingle: true },
|
|
4937
|
+
};
|
|
4938
|
+
return decode(typeMappings, input);
|
|
4939
|
+
};
|
|
4940
|
+
|
|
4941
|
+
decoders.UserGroupMember = (input?: Record<string, any>) => {
|
|
4942
|
+
const typeMappings: TypeMapping = {
|
|
4943
|
+
created_at: { type: 'DatetimeType', isSingle: true },
|
|
4944
|
+
};
|
|
4945
|
+
return decode(typeMappings, input);
|
|
4946
|
+
};
|
|
4947
|
+
|
|
4948
|
+
decoders.UserGroupMemberAddedEvent = (input?: Record<string, any>) => {
|
|
4949
|
+
const typeMappings: TypeMapping = {
|
|
4950
|
+
created_at: { type: 'DatetimeType', isSingle: true },
|
|
4951
|
+
|
|
4952
|
+
received_at: { type: 'DatetimeType', isSingle: true },
|
|
4953
|
+
|
|
4954
|
+
user: { type: 'UserResponseCommonFields', isSingle: true },
|
|
4955
|
+
};
|
|
4956
|
+
return decode(typeMappings, input);
|
|
4957
|
+
};
|
|
4958
|
+
|
|
4959
|
+
decoders.UserGroupMemberRemovedEvent = (input?: Record<string, any>) => {
|
|
4960
|
+
const typeMappings: TypeMapping = {
|
|
4961
|
+
created_at: { type: 'DatetimeType', isSingle: true },
|
|
4962
|
+
|
|
4963
|
+
received_at: { type: 'DatetimeType', isSingle: true },
|
|
4964
|
+
|
|
4965
|
+
user: { type: 'UserResponseCommonFields', isSingle: true },
|
|
4966
|
+
};
|
|
4967
|
+
return decode(typeMappings, input);
|
|
4968
|
+
};
|
|
4969
|
+
|
|
4970
|
+
decoders.UserGroupResponse = (input?: Record<string, any>) => {
|
|
4971
|
+
const typeMappings: TypeMapping = {
|
|
4972
|
+
created_at: { type: 'DatetimeType', isSingle: true },
|
|
4973
|
+
|
|
4974
|
+
updated_at: { type: 'DatetimeType', isSingle: true },
|
|
4975
|
+
|
|
4976
|
+
members: { type: 'UserGroupMember', isSingle: false },
|
|
4977
|
+
};
|
|
4978
|
+
return decode(typeMappings, input);
|
|
4979
|
+
};
|
|
4980
|
+
|
|
4981
|
+
decoders.UserGroupUpdatedEvent = (input?: Record<string, any>) => {
|
|
4982
|
+
const typeMappings: TypeMapping = {
|
|
4983
|
+
created_at: { type: 'DatetimeType', isSingle: true },
|
|
4984
|
+
|
|
4985
|
+
received_at: { type: 'DatetimeType', isSingle: true },
|
|
4986
|
+
|
|
4987
|
+
user: { type: 'UserResponseCommonFields', isSingle: true },
|
|
4988
|
+
};
|
|
4989
|
+
return decode(typeMappings, input);
|
|
4990
|
+
};
|
|
4991
|
+
|
|
4821
4992
|
decoders.UserMessagesDeletedEvent = (input?: Record<string, any>) => {
|
|
4822
4993
|
const typeMappings: TypeMapping = {
|
|
4823
4994
|
created_at: { type: 'DatetimeType', isSingle: true },
|