@stream-io/node-sdk 0.7.12 → 0.7.14
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 +130 -25
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.mjs +130 -25
- package/dist/index.es.mjs.map +1 -1
- package/dist/src/StreamClient.d.ts +2 -4
- package/dist/src/gen/chat/ChannelApi.d.ts +5 -5
- package/dist/src/gen/chat/ChatApi.d.ts +7 -13
- package/dist/src/gen/feeds/FeedsApi.d.ts +9 -1
- package/dist/src/gen/models/index.d.ts +257 -295
- package/dist/src/gen/video/VideoApi.d.ts +28 -1
- package/dist/src/types.d.ts +0 -1
- package/dist/src/utils/rate-limit.d.ts +0 -1
- package/package.json +1 -1
- package/src/gen/chat/ChannelApi.ts +20 -16
- package/src/gen/chat/ChatApi.ts +19 -28
- package/src/gen/common/CommonApi.ts +4 -0
- package/src/gen/feeds/FeedsApi.ts +54 -0
- package/src/gen/model-decoders/decoders.ts +46 -4
- package/src/gen/models/index.ts +492 -562
- package/src/gen/moderation/ModerationApi.ts +1 -0
- package/src/gen/video/VideoApi.ts +111 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ApiClient, StreamResponse } from '../../gen-imports';
|
|
2
|
-
import { BlockUserRequest, BlockUserResponse, CollectUserFeedbackRequest, CollectUserFeedbackResponse, CreateCallTypeRequest, CreateCallTypeResponse, DeleteCallRequest, DeleteCallResponse, DeleteRecordingResponse, DeleteTranscriptionResponse, EndCallResponse, GetActiveCallsStatusResponse, GetCallReportResponse, GetCallResponse, GetCallTypeResponse, GetEdgesResponse, GetOrCreateCallRequest, GetOrCreateCallResponse, GoLiveRequest, GoLiveResponse, KickUserRequest, KickUserResponse, ListCallTypeResponse, ListRecordingsResponse, ListTranscriptionsResponse, MuteUsersRequest, MuteUsersResponse, PinRequest, PinResponse, QueryAggregateCallStatsRequest, QueryAggregateCallStatsResponse, QueryCallMembersRequest, QueryCallMembersResponse, QueryCallParticipantsRequest, QueryCallParticipantsResponse, QueryCallStatsRequest, QueryCallStatsResponse, QueryCallsRequest, QueryCallsResponse, QueryUserFeedbackRequest, QueryUserFeedbackResponse, Response, SendCallEventRequest, SendCallEventResponse, SendClosedCaptionRequest, SendClosedCaptionResponse, StartClosedCaptionsRequest, StartClosedCaptionsResponse, StartFrameRecordingRequest, StartFrameRecordingResponse, StartHLSBroadcastingResponse, StartRTMPBroadcastsRequest, StartRTMPBroadcastsResponse, StartRecordingRequest, StartRecordingResponse, StartTranscriptionRequest, StartTranscriptionResponse, StopAllRTMPBroadcastsResponse, StopClosedCaptionsRequest, StopClosedCaptionsResponse, StopFrameRecordingResponse, StopHLSBroadcastingResponse, StopLiveRequest, StopLiveResponse, StopRTMPBroadcastsRequest, StopRTMPBroadcastsResponse, StopRecordingResponse, StopTranscriptionRequest, StopTranscriptionResponse, UnblockUserRequest, UnblockUserResponse, UnpinRequest, UnpinResponse, UpdateCallMembersRequest, UpdateCallMembersResponse, UpdateCallRequest, UpdateCallResponse, UpdateCallTypeRequest, UpdateCallTypeResponse, UpdateUserPermissionsRequest, UpdateUserPermissionsResponse } from '../models';
|
|
2
|
+
import { BlockUserRequest, BlockUserResponse, CollectUserFeedbackRequest, CollectUserFeedbackResponse, CreateCallTypeRequest, CreateCallTypeResponse, DeleteCallRequest, DeleteCallResponse, DeleteRecordingResponse, DeleteTranscriptionResponse, EndCallResponse, GetActiveCallsStatusResponse, GetCallReportResponse, GetCallResponse, GetCallSessionParticipantStatsDetailsResponse, GetCallTypeResponse, GetEdgesResponse, GetOrCreateCallRequest, GetOrCreateCallResponse, GoLiveRequest, GoLiveResponse, KickUserRequest, KickUserResponse, ListCallTypeResponse, ListRecordingsResponse, ListTranscriptionsResponse, MuteUsersRequest, MuteUsersResponse, PinRequest, PinResponse, QueryAggregateCallStatsRequest, QueryAggregateCallStatsResponse, QueryCallMembersRequest, QueryCallMembersResponse, QueryCallParticipantsRequest, QueryCallParticipantsResponse, QueryCallSessionParticipantStatsResponse, QueryCallSessionParticipantStatsTimelineResponse, QueryCallStatsRequest, QueryCallStatsResponse, QueryCallsRequest, QueryCallsResponse, QueryUserFeedbackRequest, QueryUserFeedbackResponse, Response, SendCallEventRequest, SendCallEventResponse, SendClosedCaptionRequest, SendClosedCaptionResponse, SortParamRequest, StartClosedCaptionsRequest, StartClosedCaptionsResponse, StartFrameRecordingRequest, StartFrameRecordingResponse, StartHLSBroadcastingResponse, StartRTMPBroadcastsRequest, StartRTMPBroadcastsResponse, StartRecordingRequest, StartRecordingResponse, StartTranscriptionRequest, StartTranscriptionResponse, StopAllRTMPBroadcastsResponse, StopClosedCaptionsRequest, StopClosedCaptionsResponse, StopFrameRecordingResponse, StopHLSBroadcastingResponse, StopLiveRequest, StopLiveResponse, StopRTMPBroadcastsRequest, StopRTMPBroadcastsResponse, StopRecordingResponse, StopTranscriptionRequest, StopTranscriptionResponse, UnblockUserRequest, UnblockUserResponse, UnpinRequest, UnpinResponse, UpdateCallMembersRequest, UpdateCallMembersResponse, UpdateCallRequest, UpdateCallResponse, UpdateCallTypeRequest, UpdateCallTypeResponse, UpdateUserPermissionsRequest, UpdateUserPermissionsResponse } from '../models';
|
|
3
3
|
export declare class VideoApi {
|
|
4
4
|
readonly apiClient: ApiClient;
|
|
5
5
|
constructor(apiClient: ApiClient);
|
|
@@ -168,6 +168,33 @@ export declare class VideoApi {
|
|
|
168
168
|
session: string;
|
|
169
169
|
filename: string;
|
|
170
170
|
}): Promise<StreamResponse<DeleteTranscriptionResponse>>;
|
|
171
|
+
getCallSessionParticipantStatsDetails(request: {
|
|
172
|
+
call_type: string;
|
|
173
|
+
call_id: string;
|
|
174
|
+
session: string;
|
|
175
|
+
user: string;
|
|
176
|
+
user_session: string;
|
|
177
|
+
since?: string;
|
|
178
|
+
until?: string;
|
|
179
|
+
max_points?: number;
|
|
180
|
+
}): Promise<StreamResponse<GetCallSessionParticipantStatsDetailsResponse>>;
|
|
181
|
+
queryCallSessionParticipantStats(request: {
|
|
182
|
+
call_type: string;
|
|
183
|
+
call_id: string;
|
|
184
|
+
session: string;
|
|
185
|
+
sort?: SortParamRequest[];
|
|
186
|
+
filter_conditions?: Record<string, any>;
|
|
187
|
+
}): Promise<StreamResponse<QueryCallSessionParticipantStatsResponse>>;
|
|
188
|
+
getCallSessionParticipantStatsTimeline(request: {
|
|
189
|
+
call_type: string;
|
|
190
|
+
call_id: string;
|
|
191
|
+
session: string;
|
|
192
|
+
user: string;
|
|
193
|
+
user_session: string;
|
|
194
|
+
start_time?: string;
|
|
195
|
+
end_time?: string;
|
|
196
|
+
severity?: string[];
|
|
197
|
+
}): Promise<StreamResponse<QueryCallSessionParticipantStatsTimelineResponse>>;
|
|
171
198
|
queryCalls(request?: QueryCallsRequest): Promise<StreamResponse<QueryCallsResponse>>;
|
|
172
199
|
listCallTypes(): Promise<StreamResponse<ListCallTypeResponse>>;
|
|
173
200
|
createCallType(request: CreateCallTypeRequest): Promise<StreamResponse<CreateCallTypeResponse>>;
|
package/dist/src/types.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -4,14 +4,10 @@ import {
|
|
|
4
4
|
ChannelStateResponse,
|
|
5
5
|
DeleteChannelResponse,
|
|
6
6
|
EventResponse,
|
|
7
|
-
FileUploadRequest,
|
|
8
|
-
FileUploadResponse,
|
|
9
7
|
GetDraftResponse,
|
|
10
8
|
GetManyMessagesResponse,
|
|
11
9
|
HideChannelRequest,
|
|
12
10
|
HideChannelResponse,
|
|
13
|
-
ImageUploadRequest,
|
|
14
|
-
ImageUploadResponse,
|
|
15
11
|
MarkReadRequest,
|
|
16
12
|
MarkReadResponse,
|
|
17
13
|
MarkUnreadRequest,
|
|
@@ -29,6 +25,10 @@ import {
|
|
|
29
25
|
UpdateChannelResponse,
|
|
30
26
|
UpdateMemberPartialRequest,
|
|
31
27
|
UpdateMemberPartialResponse,
|
|
28
|
+
UploadChannelFileRequest,
|
|
29
|
+
UploadChannelFileResponse,
|
|
30
|
+
UploadChannelRequest,
|
|
31
|
+
UploadChannelResponse,
|
|
32
32
|
} from '../models';
|
|
33
33
|
|
|
34
34
|
export class ChannelApi {
|
|
@@ -126,30 +126,32 @@ export class ChannelApi {
|
|
|
126
126
|
return this.chatApi.sendEvent({ id: this.id, type: this.type, ...request });
|
|
127
127
|
}
|
|
128
128
|
|
|
129
|
-
|
|
129
|
+
deleteChannelFile(request?: {
|
|
130
|
+
url?: string;
|
|
131
|
+
}): Promise<StreamResponse<Response>> {
|
|
130
132
|
if (!this.id) {
|
|
131
133
|
throw new Error(
|
|
132
134
|
`Channel isn't yet created, call getOrCreateDistinctChannel() before this operation`,
|
|
133
135
|
);
|
|
134
136
|
}
|
|
135
137
|
|
|
136
|
-
return this.chatApi.
|
|
138
|
+
return this.chatApi.deleteChannelFile({
|
|
137
139
|
id: this.id,
|
|
138
140
|
type: this.type,
|
|
139
141
|
...request,
|
|
140
142
|
});
|
|
141
143
|
}
|
|
142
144
|
|
|
143
|
-
|
|
144
|
-
request?:
|
|
145
|
-
): Promise<StreamResponse<
|
|
145
|
+
uploadChannelFile(
|
|
146
|
+
request?: UploadChannelFileRequest,
|
|
147
|
+
): Promise<StreamResponse<UploadChannelFileResponse>> {
|
|
146
148
|
if (!this.id) {
|
|
147
149
|
throw new Error(
|
|
148
150
|
`Channel isn't yet created, call getOrCreateDistinctChannel() before this operation`,
|
|
149
151
|
);
|
|
150
152
|
}
|
|
151
153
|
|
|
152
|
-
return this.chatApi.
|
|
154
|
+
return this.chatApi.uploadChannelFile({
|
|
153
155
|
id: this.id,
|
|
154
156
|
type: this.type,
|
|
155
157
|
...request,
|
|
@@ -172,30 +174,32 @@ export class ChannelApi {
|
|
|
172
174
|
});
|
|
173
175
|
}
|
|
174
176
|
|
|
175
|
-
|
|
177
|
+
deleteChannelImage(request?: {
|
|
178
|
+
url?: string;
|
|
179
|
+
}): Promise<StreamResponse<Response>> {
|
|
176
180
|
if (!this.id) {
|
|
177
181
|
throw new Error(
|
|
178
182
|
`Channel isn't yet created, call getOrCreateDistinctChannel() before this operation`,
|
|
179
183
|
);
|
|
180
184
|
}
|
|
181
185
|
|
|
182
|
-
return this.chatApi.
|
|
186
|
+
return this.chatApi.deleteChannelImage({
|
|
183
187
|
id: this.id,
|
|
184
188
|
type: this.type,
|
|
185
189
|
...request,
|
|
186
190
|
});
|
|
187
191
|
}
|
|
188
192
|
|
|
189
|
-
|
|
190
|
-
request?:
|
|
191
|
-
): Promise<StreamResponse<
|
|
193
|
+
uploadChannelImage(
|
|
194
|
+
request?: UploadChannelRequest,
|
|
195
|
+
): Promise<StreamResponse<UploadChannelResponse>> {
|
|
192
196
|
if (!this.id) {
|
|
193
197
|
throw new Error(
|
|
194
198
|
`Channel isn't yet created, call getOrCreateDistinctChannel() before this operation`,
|
|
195
199
|
);
|
|
196
200
|
}
|
|
197
201
|
|
|
198
|
-
return this.chatApi.
|
|
202
|
+
return this.chatApi.uploadChannelImage({
|
|
199
203
|
id: this.id,
|
|
200
204
|
type: this.type,
|
|
201
205
|
...request,
|
package/src/gen/chat/ChatApi.ts
CHANGED
|
@@ -21,8 +21,6 @@ import {
|
|
|
21
21
|
EventResponse,
|
|
22
22
|
ExportChannelsRequest,
|
|
23
23
|
ExportChannelsResponse,
|
|
24
|
-
FileUploadRequest,
|
|
25
|
-
FileUploadResponse,
|
|
26
24
|
GetCampaignResponse,
|
|
27
25
|
GetChannelTypeResponse,
|
|
28
26
|
GetCommandResponse,
|
|
@@ -35,8 +33,6 @@ import {
|
|
|
35
33
|
GetThreadResponse,
|
|
36
34
|
HideChannelRequest,
|
|
37
35
|
HideChannelResponse,
|
|
38
|
-
ImageUploadRequest,
|
|
39
|
-
ImageUploadResponse,
|
|
40
36
|
ListChannelTypesResponse,
|
|
41
37
|
ListCommandsResponse,
|
|
42
38
|
MarkChannelsReadRequest,
|
|
@@ -113,6 +109,10 @@ import {
|
|
|
113
109
|
UpdateReminderResponse,
|
|
114
110
|
UpdateThreadPartialRequest,
|
|
115
111
|
UpdateThreadPartialResponse,
|
|
112
|
+
UploadChannelFileRequest,
|
|
113
|
+
UploadChannelFileResponse,
|
|
114
|
+
UploadChannelRequest,
|
|
115
|
+
UploadChannelResponse,
|
|
116
116
|
WrappedUnreadCountsResponse,
|
|
117
117
|
} from '../models';
|
|
118
118
|
import { decoders } from '../model-decoders/decoders';
|
|
@@ -511,7 +511,7 @@ export class ChatApi {
|
|
|
511
511
|
return { ...response.body, metadata: response.metadata };
|
|
512
512
|
}
|
|
513
513
|
|
|
514
|
-
async
|
|
514
|
+
async deleteChannelFile(request: {
|
|
515
515
|
type: string;
|
|
516
516
|
id: string;
|
|
517
517
|
url?: string;
|
|
@@ -536,9 +536,9 @@ export class ChatApi {
|
|
|
536
536
|
return { ...response.body, metadata: response.metadata };
|
|
537
537
|
}
|
|
538
538
|
|
|
539
|
-
async
|
|
540
|
-
request:
|
|
541
|
-
): Promise<StreamResponse<
|
|
539
|
+
async uploadChannelFile(
|
|
540
|
+
request: UploadChannelFileRequest & { type: string; id: string },
|
|
541
|
+
): Promise<StreamResponse<UploadChannelFileResponse>> {
|
|
542
542
|
const pathParams = {
|
|
543
543
|
type: request?.type,
|
|
544
544
|
id: request?.id,
|
|
@@ -549,7 +549,7 @@ export class ChatApi {
|
|
|
549
549
|
};
|
|
550
550
|
|
|
551
551
|
const response = await this.apiClient.sendRequest<
|
|
552
|
-
StreamResponse<
|
|
552
|
+
StreamResponse<UploadChannelFileResponse>
|
|
553
553
|
>(
|
|
554
554
|
'POST',
|
|
555
555
|
'/api/v2/chat/channels/{type}/{id}/file',
|
|
@@ -559,7 +559,7 @@ export class ChatApi {
|
|
|
559
559
|
'multipart/form-data',
|
|
560
560
|
);
|
|
561
561
|
|
|
562
|
-
decoders.
|
|
562
|
+
decoders.UploadChannelFileResponse?.(response.body);
|
|
563
563
|
|
|
564
564
|
return { ...response.body, metadata: response.metadata };
|
|
565
565
|
}
|
|
@@ -593,7 +593,7 @@ export class ChatApi {
|
|
|
593
593
|
return { ...response.body, metadata: response.metadata };
|
|
594
594
|
}
|
|
595
595
|
|
|
596
|
-
async
|
|
596
|
+
async deleteChannelImage(request: {
|
|
597
597
|
type: string;
|
|
598
598
|
id: string;
|
|
599
599
|
url?: string;
|
|
@@ -618,9 +618,9 @@ export class ChatApi {
|
|
|
618
618
|
return { ...response.body, metadata: response.metadata };
|
|
619
619
|
}
|
|
620
620
|
|
|
621
|
-
async
|
|
622
|
-
request:
|
|
623
|
-
): Promise<StreamResponse<
|
|
621
|
+
async uploadChannelImage(
|
|
622
|
+
request: UploadChannelRequest & { type: string; id: string },
|
|
623
|
+
): Promise<StreamResponse<UploadChannelResponse>> {
|
|
624
624
|
const pathParams = {
|
|
625
625
|
type: request?.type,
|
|
626
626
|
id: request?.id,
|
|
@@ -632,7 +632,7 @@ export class ChatApi {
|
|
|
632
632
|
};
|
|
633
633
|
|
|
634
634
|
const response = await this.apiClient.sendRequest<
|
|
635
|
-
StreamResponse<
|
|
635
|
+
StreamResponse<UploadChannelResponse>
|
|
636
636
|
>(
|
|
637
637
|
'POST',
|
|
638
638
|
'/api/v2/chat/channels/{type}/{id}/image',
|
|
@@ -642,7 +642,7 @@ export class ChatApi {
|
|
|
642
642
|
'multipart/form-data',
|
|
643
643
|
);
|
|
644
644
|
|
|
645
|
-
decoders.
|
|
645
|
+
decoders.UploadChannelResponse?.(response.body);
|
|
646
646
|
|
|
647
647
|
return { ...response.body, metadata: response.metadata };
|
|
648
648
|
}
|
|
@@ -915,7 +915,9 @@ export class ChatApi {
|
|
|
915
915
|
blocklist: request?.blocklist,
|
|
916
916
|
blocklist_behavior: request?.blocklist_behavior,
|
|
917
917
|
connect_events: request?.connect_events,
|
|
918
|
+
count_messages: request?.count_messages,
|
|
918
919
|
custom_events: request?.custom_events,
|
|
920
|
+
delivery_events: request?.delivery_events,
|
|
919
921
|
mark_messages_pending: request?.mark_messages_pending,
|
|
920
922
|
message_retention: request?.message_retention,
|
|
921
923
|
mutes: request?.mutes,
|
|
@@ -1006,6 +1008,7 @@ export class ChatApi {
|
|
|
1006
1008
|
connect_events: request?.connect_events,
|
|
1007
1009
|
count_messages: request?.count_messages,
|
|
1008
1010
|
custom_events: request?.custom_events,
|
|
1011
|
+
delivery_events: request?.delivery_events,
|
|
1009
1012
|
mark_messages_pending: request?.mark_messages_pending,
|
|
1010
1013
|
mutes: request?.mutes,
|
|
1011
1014
|
partition_size: request?.partition_size,
|
|
@@ -1734,32 +1737,20 @@ export class ChatApi {
|
|
|
1734
1737
|
async getReplies(request: {
|
|
1735
1738
|
parent_id: string;
|
|
1736
1739
|
limit?: number;
|
|
1737
|
-
offset?: number;
|
|
1738
1740
|
id_gte?: string;
|
|
1739
1741
|
id_gt?: string;
|
|
1740
1742
|
id_lte?: string;
|
|
1741
1743
|
id_lt?: string;
|
|
1742
|
-
created_at_after_or_equal?: Date;
|
|
1743
|
-
created_at_after?: Date;
|
|
1744
|
-
created_at_before_or_equal?: Date;
|
|
1745
|
-
created_at_before?: Date;
|
|
1746
1744
|
id_around?: string;
|
|
1747
|
-
created_at_around?: Date;
|
|
1748
1745
|
sort?: SortParamRequest[];
|
|
1749
1746
|
}): Promise<StreamResponse<GetRepliesResponse>> {
|
|
1750
1747
|
const queryParams = {
|
|
1751
1748
|
limit: request?.limit,
|
|
1752
|
-
offset: request?.offset,
|
|
1753
1749
|
id_gte: request?.id_gte,
|
|
1754
1750
|
id_gt: request?.id_gt,
|
|
1755
1751
|
id_lte: request?.id_lte,
|
|
1756
1752
|
id_lt: request?.id_lt,
|
|
1757
|
-
created_at_after_or_equal: request?.created_at_after_or_equal,
|
|
1758
|
-
created_at_after: request?.created_at_after,
|
|
1759
|
-
created_at_before_or_equal: request?.created_at_before_or_equal,
|
|
1760
|
-
created_at_before: request?.created_at_before,
|
|
1761
1753
|
id_around: request?.id_around,
|
|
1762
|
-
created_at_around: request?.created_at_around,
|
|
1763
1754
|
sort: request?.sort,
|
|
1764
1755
|
};
|
|
1765
1756
|
const pathParams = {
|
|
@@ -197,6 +197,8 @@ export class CommonApi {
|
|
|
197
197
|
const body = {
|
|
198
198
|
name: request?.name,
|
|
199
199
|
words: request?.words,
|
|
200
|
+
is_leet_check_enabled: request?.is_leet_check_enabled,
|
|
201
|
+
is_plural_check_enabled: request?.is_plural_check_enabled,
|
|
200
202
|
team: request?.team,
|
|
201
203
|
type: request?.type,
|
|
202
204
|
};
|
|
@@ -267,6 +269,8 @@ export class CommonApi {
|
|
|
267
269
|
name: request?.name,
|
|
268
270
|
};
|
|
269
271
|
const body = {
|
|
272
|
+
is_leet_check_enabled: request?.is_leet_check_enabled,
|
|
273
|
+
is_plural_check_enabled: request?.is_plural_check_enabled,
|
|
270
274
|
team: request?.team,
|
|
271
275
|
words: request?.words,
|
|
272
276
|
};
|
|
@@ -50,6 +50,7 @@ import {
|
|
|
50
50
|
GetFeedGroupResponse,
|
|
51
51
|
GetFeedViewResponse,
|
|
52
52
|
GetFeedVisibilityResponse,
|
|
53
|
+
GetFeedsRateLimitsResponse,
|
|
53
54
|
GetFollowSuggestionsResponse,
|
|
54
55
|
GetOrCreateFeedGroupRequest,
|
|
55
56
|
GetOrCreateFeedGroupResponse,
|
|
@@ -61,6 +62,8 @@ import {
|
|
|
61
62
|
ListFeedViewsResponse,
|
|
62
63
|
ListFeedVisibilitiesResponse,
|
|
63
64
|
MarkActivityRequest,
|
|
65
|
+
OwnCapabilitiesBatchRequest,
|
|
66
|
+
OwnCapabilitiesBatchResponse,
|
|
64
67
|
PinActivityRequest,
|
|
65
68
|
PinActivityResponse,
|
|
66
69
|
PollVoteResponse,
|
|
@@ -1019,6 +1022,7 @@ export class FeedsApi {
|
|
|
1019
1022
|
const queryParams = {
|
|
1020
1023
|
include_soft_deleted: request?.include_soft_deleted,
|
|
1021
1024
|
};
|
|
1025
|
+
|
|
1022
1026
|
const response = await this.apiClient.sendRequest<
|
|
1023
1027
|
StreamResponse<ListFeedGroupsResponse>
|
|
1024
1028
|
>('GET', '/api/v2/feeds/feed_groups', undefined, queryParams);
|
|
@@ -1490,6 +1494,7 @@ export class FeedsApi {
|
|
|
1490
1494
|
id: request?.id,
|
|
1491
1495
|
};
|
|
1492
1496
|
const body = {
|
|
1497
|
+
default_visibility: request?.default_visibility,
|
|
1493
1498
|
activity_processors: request?.activity_processors,
|
|
1494
1499
|
activity_selectors: request?.activity_selectors,
|
|
1495
1500
|
aggregation: request?.aggregation,
|
|
@@ -1720,6 +1725,31 @@ export class FeedsApi {
|
|
|
1720
1725
|
return { ...response.body, metadata: response.metadata };
|
|
1721
1726
|
}
|
|
1722
1727
|
|
|
1728
|
+
async ownCapabilitiesBatch(
|
|
1729
|
+
request: OwnCapabilitiesBatchRequest,
|
|
1730
|
+
): Promise<StreamResponse<OwnCapabilitiesBatchResponse>> {
|
|
1731
|
+
const body = {
|
|
1732
|
+
feeds: request?.feeds,
|
|
1733
|
+
user_id: request?.user_id,
|
|
1734
|
+
user: request?.user,
|
|
1735
|
+
};
|
|
1736
|
+
|
|
1737
|
+
const response = await this.apiClient.sendRequest<
|
|
1738
|
+
StreamResponse<OwnCapabilitiesBatchResponse>
|
|
1739
|
+
>(
|
|
1740
|
+
'POST',
|
|
1741
|
+
'/api/v2/feeds/feeds/own_capabilities/batch',
|
|
1742
|
+
undefined,
|
|
1743
|
+
undefined,
|
|
1744
|
+
body,
|
|
1745
|
+
'application/json',
|
|
1746
|
+
);
|
|
1747
|
+
|
|
1748
|
+
decoders.OwnCapabilitiesBatchResponse?.(response.body);
|
|
1749
|
+
|
|
1750
|
+
return { ...response.body, metadata: response.metadata };
|
|
1751
|
+
}
|
|
1752
|
+
|
|
1723
1753
|
protected async _queryFeeds(
|
|
1724
1754
|
request?: QueryFeedsRequest,
|
|
1725
1755
|
): Promise<StreamResponse<QueryFeedsResponse>> {
|
|
@@ -1748,6 +1778,30 @@ export class FeedsApi {
|
|
|
1748
1778
|
return { ...response.body, metadata: response.metadata };
|
|
1749
1779
|
}
|
|
1750
1780
|
|
|
1781
|
+
async getFeedsRateLimits(request?: {
|
|
1782
|
+
endpoints?: string;
|
|
1783
|
+
android?: boolean;
|
|
1784
|
+
ios?: boolean;
|
|
1785
|
+
web?: boolean;
|
|
1786
|
+
server_side?: boolean;
|
|
1787
|
+
}): Promise<StreamResponse<GetFeedsRateLimitsResponse>> {
|
|
1788
|
+
const queryParams = {
|
|
1789
|
+
endpoints: request?.endpoints,
|
|
1790
|
+
android: request?.android,
|
|
1791
|
+
ios: request?.ios,
|
|
1792
|
+
web: request?.web,
|
|
1793
|
+
server_side: request?.server_side,
|
|
1794
|
+
};
|
|
1795
|
+
|
|
1796
|
+
const response = await this.apiClient.sendRequest<
|
|
1797
|
+
StreamResponse<GetFeedsRateLimitsResponse>
|
|
1798
|
+
>('GET', '/api/v2/feeds/feeds/rate_limits', undefined, queryParams);
|
|
1799
|
+
|
|
1800
|
+
decoders.GetFeedsRateLimitsResponse?.(response.body);
|
|
1801
|
+
|
|
1802
|
+
return { ...response.body, metadata: response.metadata };
|
|
1803
|
+
}
|
|
1804
|
+
|
|
1751
1805
|
async updateFollow(
|
|
1752
1806
|
request: UpdateFollowRequest,
|
|
1753
1807
|
): Promise<StreamResponse<UpdateFollowResponse>> {
|
|
@@ -789,6 +789,13 @@ decoders.CallParticipantResponse = (input?: Record<string, any>) => {
|
|
|
789
789
|
return decode(typeMappings, input);
|
|
790
790
|
};
|
|
791
791
|
|
|
792
|
+
decoders.CallParticipantTimeline = (input?: Record<string, any>) => {
|
|
793
|
+
const typeMappings: TypeMapping = {
|
|
794
|
+
timestamp: { type: 'DatetimeType', isSingle: true },
|
|
795
|
+
};
|
|
796
|
+
return decode(typeMappings, input);
|
|
797
|
+
};
|
|
798
|
+
|
|
792
799
|
decoders.CallReactionEvent = (input?: Record<string, any>) => {
|
|
793
800
|
const typeMappings: TypeMapping = {
|
|
794
801
|
created_at: { type: 'DatetimeType', isSingle: true },
|
|
@@ -985,6 +992,24 @@ decoders.CallStateResponseFields = (input?: Record<string, any>) => {
|
|
|
985
992
|
return decode(typeMappings, input);
|
|
986
993
|
};
|
|
987
994
|
|
|
995
|
+
decoders.CallStatsParticipant = (input?: Record<string, any>) => {
|
|
996
|
+
const typeMappings: TypeMapping = {
|
|
997
|
+
sessions: { type: 'CallStatsParticipantSession', isSingle: false },
|
|
998
|
+
|
|
999
|
+
latest_activity_at: { type: 'DatetimeType', isSingle: true },
|
|
1000
|
+
};
|
|
1001
|
+
return decode(typeMappings, input);
|
|
1002
|
+
};
|
|
1003
|
+
|
|
1004
|
+
decoders.CallStatsParticipantSession = (input?: Record<string, any>) => {
|
|
1005
|
+
const typeMappings: TypeMapping = {
|
|
1006
|
+
ended_at: { type: 'DatetimeType', isSingle: true },
|
|
1007
|
+
|
|
1008
|
+
started_at: { type: 'DatetimeType', isSingle: true },
|
|
1009
|
+
};
|
|
1010
|
+
return decode(typeMappings, input);
|
|
1011
|
+
};
|
|
1012
|
+
|
|
988
1013
|
decoders.CallStatsReportReadyEvent = (input?: Record<string, any>) => {
|
|
989
1014
|
const typeMappings: TypeMapping = {
|
|
990
1015
|
created_at: { type: 'DatetimeType', isSingle: true },
|
|
@@ -1903,6 +1928,8 @@ decoders.FeedGroupResponse = (input?: Record<string, any>) => {
|
|
|
1903
1928
|
|
|
1904
1929
|
updated_at: { type: 'DatetimeType', isSingle: true },
|
|
1905
1930
|
|
|
1931
|
+
deleted_at: { type: 'DatetimeType', isSingle: true },
|
|
1932
|
+
|
|
1906
1933
|
activity_selectors: {
|
|
1907
1934
|
type: 'ActivitySelectorConfigResponse',
|
|
1908
1935
|
isSingle: false,
|
|
@@ -2884,9 +2911,11 @@ decoders.ModerationCustomActionEvent = (input?: Record<string, any>) => {
|
|
|
2884
2911
|
const typeMappings: TypeMapping = {
|
|
2885
2912
|
created_at: { type: 'DatetimeType', isSingle: true },
|
|
2886
2913
|
|
|
2887
|
-
|
|
2914
|
+
review_queue_item: { type: 'ReviewQueueItemResponse', isSingle: true },
|
|
2888
2915
|
|
|
2889
|
-
|
|
2916
|
+
received_at: { type: 'DatetimeType', isSingle: true },
|
|
2917
|
+
|
|
2918
|
+
message: { type: 'MessageResponse', isSingle: true },
|
|
2890
2919
|
};
|
|
2891
2920
|
return decode(typeMappings, input);
|
|
2892
2921
|
};
|
|
@@ -2917,9 +2946,11 @@ decoders.ModerationMarkReviewedEvent = (input?: Record<string, any>) => {
|
|
|
2917
2946
|
const typeMappings: TypeMapping = {
|
|
2918
2947
|
created_at: { type: 'DatetimeType', isSingle: true },
|
|
2919
2948
|
|
|
2920
|
-
|
|
2949
|
+
item: { type: 'ReviewQueueItemResponse', isSingle: true },
|
|
2921
2950
|
|
|
2922
|
-
|
|
2951
|
+
received_at: { type: 'DatetimeType', isSingle: true },
|
|
2952
|
+
|
|
2953
|
+
message: { type: 'MessageResponse', isSingle: true },
|
|
2923
2954
|
};
|
|
2924
2955
|
return decode(typeMappings, input);
|
|
2925
2956
|
};
|
|
@@ -3057,6 +3088,15 @@ decoders.ParticipantCountOverTimeResponse = (input?: Record<string, any>) => {
|
|
|
3057
3088
|
return decode(typeMappings, input);
|
|
3058
3089
|
};
|
|
3059
3090
|
|
|
3091
|
+
decoders.ParticipantSeriesTimeframe = (input?: Record<string, any>) => {
|
|
3092
|
+
const typeMappings: TypeMapping = {
|
|
3093
|
+
since: { type: 'DatetimeType', isSingle: true },
|
|
3094
|
+
|
|
3095
|
+
until: { type: 'DatetimeType', isSingle: true },
|
|
3096
|
+
};
|
|
3097
|
+
return decode(typeMappings, input);
|
|
3098
|
+
};
|
|
3099
|
+
|
|
3060
3100
|
decoders.PendingMessageEvent = (input?: Record<string, any>) => {
|
|
3061
3101
|
const typeMappings: TypeMapping = {
|
|
3062
3102
|
created_at: { type: 'DatetimeType', isSingle: true },
|
|
@@ -3582,6 +3622,8 @@ decoders.ReadStateResponse = (input?: Record<string, any>) => {
|
|
|
3582
3622
|
last_read: { type: 'DatetimeType', isSingle: true },
|
|
3583
3623
|
|
|
3584
3624
|
user: { type: 'UserResponse', isSingle: true },
|
|
3625
|
+
|
|
3626
|
+
last_delivered_at: { type: 'DatetimeType', isSingle: true },
|
|
3585
3627
|
};
|
|
3586
3628
|
return decode(typeMappings, input);
|
|
3587
3629
|
};
|