@stream-io/node-sdk 0.4.7 → 0.4.8
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 +78 -55
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.mjs +78 -55
- package/dist/index.es.mjs.map +1 -1
- package/dist/src/gen/models/index.d.ts +23 -0
- package/dist/src/gen/video/CallApi.d.ts +4 -1
- package/dist/src/gen/video/VideoApi.d.ts +6 -1
- package/package.json +1 -1
- package/src/gen/model-decoders/index.ts +9 -0
- package/src/gen/models/index.ts +36 -0
- package/src/gen/video/CallApi.ts +11 -0
- package/src/gen/video/VideoApi.ts +23 -0
|
@@ -560,6 +560,11 @@ export interface CallRejectedEvent {
|
|
|
560
560
|
type: string;
|
|
561
561
|
reason?: string;
|
|
562
562
|
}
|
|
563
|
+
export interface CallReportResponse {
|
|
564
|
+
score: number;
|
|
565
|
+
ended_at?: Date;
|
|
566
|
+
started_at?: Date;
|
|
567
|
+
}
|
|
563
568
|
export interface CallRequest {
|
|
564
569
|
created_by_id?: string;
|
|
565
570
|
starts_at?: Date;
|
|
@@ -2074,6 +2079,11 @@ export interface GetBlockedUsersResponse {
|
|
|
2074
2079
|
duration: string;
|
|
2075
2080
|
blocks: BlockedUserResponse[];
|
|
2076
2081
|
}
|
|
2082
|
+
export interface GetCallReportResponse {
|
|
2083
|
+
duration: string;
|
|
2084
|
+
session_id: string;
|
|
2085
|
+
report: ReportResponse;
|
|
2086
|
+
}
|
|
2077
2087
|
export interface GetCallResponse {
|
|
2078
2088
|
duration: string;
|
|
2079
2089
|
members: MemberResponse[];
|
|
@@ -3081,6 +3091,10 @@ export interface PaginationParams {
|
|
|
3081
3091
|
limit?: number;
|
|
3082
3092
|
offset?: number;
|
|
3083
3093
|
}
|
|
3094
|
+
export interface ParticipantReportResponse {
|
|
3095
|
+
sum: number;
|
|
3096
|
+
unique: number;
|
|
3097
|
+
}
|
|
3084
3098
|
export interface PendingMessageResponse {
|
|
3085
3099
|
channel?: ChannelResponse;
|
|
3086
3100
|
message?: MessageResponse;
|
|
@@ -3815,6 +3829,11 @@ export interface ReportByHistogramBucket {
|
|
|
3815
3829
|
lower_bound?: Bound;
|
|
3816
3830
|
upper_bound?: Bound;
|
|
3817
3831
|
}
|
|
3832
|
+
export interface ReportResponse {
|
|
3833
|
+
call: CallReportResponse;
|
|
3834
|
+
participants: ParticipantReportResponse;
|
|
3835
|
+
user_ratings: UserRatingReportResponse;
|
|
3836
|
+
}
|
|
3818
3837
|
export interface Response {
|
|
3819
3838
|
duration: string;
|
|
3820
3839
|
}
|
|
@@ -4872,6 +4891,10 @@ export interface UserMutedEvent {
|
|
|
4872
4891
|
target_users?: string[];
|
|
4873
4892
|
user?: User;
|
|
4874
4893
|
}
|
|
4894
|
+
export interface UserRatingReportResponse {
|
|
4895
|
+
average: number;
|
|
4896
|
+
count: number;
|
|
4897
|
+
}
|
|
4875
4898
|
export interface UserReactivatedEvent {
|
|
4876
4899
|
created_at: Date;
|
|
4877
4900
|
type: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { VideoApi } from './VideoApi';
|
|
2
2
|
import { StreamResponse } from '../../types';
|
|
3
|
-
import { BlockUserRequest, BlockUserResponse, CollectUserFeedbackRequest, CollectUserFeedbackResponse, DeleteCallRequest, DeleteCallResponse, DeleteRecordingResponse, DeleteTranscriptionResponse, EndCallResponse, GetCallResponse, GetCallStatsResponse, GetOrCreateCallRequest, GetOrCreateCallResponse, GoLiveRequest, GoLiveResponse, ListRecordingsResponse, ListTranscriptionsResponse, MuteUsersRequest, MuteUsersResponse, PinRequest, PinResponse, SendCallEventRequest, SendCallEventResponse, StartClosedCaptionsRequest, StartClosedCaptionsResponse, StartHLSBroadcastingResponse, StartRTMPBroadcastsRequest, StartRTMPBroadcastsResponse, StartRecordingRequest, StartRecordingResponse, StartTranscriptionRequest, StartTranscriptionResponse, StopAllRTMPBroadcastsResponse, StopClosedCaptionsRequest, StopClosedCaptionsResponse, StopHLSBroadcastingResponse, StopLiveRequest, StopLiveResponse, StopRTMPBroadcastsRequest, StopRTMPBroadcastsResponse, StopRecordingResponse, StopTranscriptionRequest, StopTranscriptionResponse, UnblockUserRequest, UnblockUserResponse, UnpinRequest, UnpinResponse, UpdateCallMembersRequest, UpdateCallMembersResponse, UpdateCallRequest, UpdateCallResponse, UpdateUserPermissionsRequest, UpdateUserPermissionsResponse } from '../models';
|
|
3
|
+
import { BlockUserRequest, BlockUserResponse, CollectUserFeedbackRequest, CollectUserFeedbackResponse, DeleteCallRequest, DeleteCallResponse, DeleteRecordingResponse, DeleteTranscriptionResponse, EndCallResponse, GetCallReportResponse, GetCallResponse, GetCallStatsResponse, GetOrCreateCallRequest, GetOrCreateCallResponse, GoLiveRequest, GoLiveResponse, ListRecordingsResponse, ListTranscriptionsResponse, MuteUsersRequest, MuteUsersResponse, PinRequest, PinResponse, SendCallEventRequest, SendCallEventResponse, StartClosedCaptionsRequest, StartClosedCaptionsResponse, StartHLSBroadcastingResponse, StartRTMPBroadcastsRequest, StartRTMPBroadcastsResponse, StartRecordingRequest, StartRecordingResponse, StartTranscriptionRequest, StartTranscriptionResponse, StopAllRTMPBroadcastsResponse, StopClosedCaptionsRequest, StopClosedCaptionsResponse, StopHLSBroadcastingResponse, StopLiveRequest, StopLiveResponse, StopRTMPBroadcastsRequest, StopRTMPBroadcastsResponse, StopRecordingResponse, StopTranscriptionRequest, StopTranscriptionResponse, UnblockUserRequest, UnblockUserResponse, UnpinRequest, UnpinResponse, UpdateCallMembersRequest, UpdateCallMembersResponse, UpdateCallRequest, UpdateCallResponse, UpdateUserPermissionsRequest, UpdateUserPermissionsResponse } from '../models';
|
|
4
4
|
export declare class CallApi {
|
|
5
5
|
protected videoApi: VideoApi;
|
|
6
6
|
readonly type: string;
|
|
@@ -26,6 +26,9 @@ export declare class CallApi {
|
|
|
26
26
|
muteUsers: (request?: MuteUsersRequest) => Promise<StreamResponse<MuteUsersResponse>>;
|
|
27
27
|
videoPin: (request: PinRequest) => Promise<StreamResponse<PinResponse>>;
|
|
28
28
|
listRecordings: () => Promise<StreamResponse<ListRecordingsResponse>>;
|
|
29
|
+
getCallReport: (request?: {
|
|
30
|
+
session_id?: string;
|
|
31
|
+
}) => Promise<StreamResponse<GetCallReportResponse>>;
|
|
29
32
|
startRTMPBroadcasts: (request: StartRTMPBroadcastsRequest) => Promise<StreamResponse<StartRTMPBroadcastsResponse>>;
|
|
30
33
|
stopAllRTMPBroadcasts: () => Promise<StreamResponse<StopAllRTMPBroadcastsResponse>>;
|
|
31
34
|
stopRTMPBroadcast: (request: StopRTMPBroadcastsRequest & {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BaseApi } from '../../BaseApi';
|
|
2
2
|
import { StreamResponse } from '../../types';
|
|
3
|
-
import { BlockUserRequest, BlockUserResponse, CollectUserFeedbackRequest, CollectUserFeedbackResponse, CreateCallTypeRequest, CreateCallTypeResponse, DeleteCallRequest, DeleteCallResponse, DeleteRecordingResponse, DeleteTranscriptionResponse, EndCallResponse, GetCallResponse, GetCallStatsResponse, GetCallTypeResponse, GetEdgesResponse, GetOrCreateCallRequest, GetOrCreateCallResponse, GoLiveRequest, GoLiveResponse, ListCallTypeResponse, ListRecordingsResponse, ListTranscriptionsResponse, MuteUsersRequest, MuteUsersResponse, PinRequest, PinResponse, QueryAggregateCallStatsRequest, QueryAggregateCallStatsResponse, QueryCallMembersRequest, QueryCallMembersResponse, QueryCallStatsRequest, QueryCallStatsResponse, QueryCallsRequest, QueryCallsResponse, Response, SendCallEventRequest, SendCallEventResponse, StartClosedCaptionsRequest, StartClosedCaptionsResponse, StartHLSBroadcastingResponse, StartRTMPBroadcastsRequest, StartRTMPBroadcastsResponse, StartRecordingRequest, StartRecordingResponse, StartTranscriptionRequest, StartTranscriptionResponse, StopAllRTMPBroadcastsResponse, StopClosedCaptionsRequest, StopClosedCaptionsResponse, StopHLSBroadcastingResponse, StopLiveRequest, StopLiveResponse, StopRTMPBroadcastsRequest, StopRTMPBroadcastsResponse, StopRecordingResponse, StopTranscriptionRequest, StopTranscriptionResponse, UnblockUserRequest, UnblockUserResponse, UnpinRequest, UnpinResponse, UpdateCallMembersRequest, UpdateCallMembersResponse, UpdateCallRequest, UpdateCallResponse, UpdateCallTypeRequest, UpdateCallTypeResponse, UpdateUserPermissionsRequest, UpdateUserPermissionsResponse } from '../models';
|
|
3
|
+
import { BlockUserRequest, BlockUserResponse, CollectUserFeedbackRequest, CollectUserFeedbackResponse, CreateCallTypeRequest, CreateCallTypeResponse, DeleteCallRequest, DeleteCallResponse, DeleteRecordingResponse, DeleteTranscriptionResponse, EndCallResponse, GetCallReportResponse, GetCallResponse, GetCallStatsResponse, GetCallTypeResponse, GetEdgesResponse, GetOrCreateCallRequest, GetOrCreateCallResponse, GoLiveRequest, GoLiveResponse, ListCallTypeResponse, ListRecordingsResponse, ListTranscriptionsResponse, MuteUsersRequest, MuteUsersResponse, PinRequest, PinResponse, QueryAggregateCallStatsRequest, QueryAggregateCallStatsResponse, QueryCallMembersRequest, QueryCallMembersResponse, QueryCallStatsRequest, QueryCallStatsResponse, QueryCallsRequest, QueryCallsResponse, Response, SendCallEventRequest, SendCallEventResponse, StartClosedCaptionsRequest, StartClosedCaptionsResponse, StartHLSBroadcastingResponse, StartRTMPBroadcastsRequest, StartRTMPBroadcastsResponse, StartRecordingRequest, StartRecordingResponse, StartTranscriptionRequest, StartTranscriptionResponse, StopAllRTMPBroadcastsResponse, StopClosedCaptionsRequest, StopClosedCaptionsResponse, StopHLSBroadcastingResponse, StopLiveRequest, StopLiveResponse, StopRTMPBroadcastsRequest, StopRTMPBroadcastsResponse, StopRecordingResponse, StopTranscriptionRequest, StopTranscriptionResponse, UnblockUserRequest, UnblockUserResponse, UnpinRequest, UnpinResponse, UpdateCallMembersRequest, UpdateCallMembersResponse, UpdateCallRequest, UpdateCallResponse, UpdateCallTypeRequest, UpdateCallTypeResponse, UpdateUserPermissionsRequest, UpdateUserPermissionsResponse } from '../models';
|
|
4
4
|
export declare class VideoApi extends BaseApi {
|
|
5
5
|
queryCallMembers: (request: QueryCallMembersRequest) => Promise<StreamResponse<QueryCallMembersResponse>>;
|
|
6
6
|
queryCallStats: (request?: QueryCallStatsRequest) => Promise<StreamResponse<QueryCallStatsResponse>>;
|
|
@@ -61,6 +61,11 @@ export declare class VideoApi extends BaseApi {
|
|
|
61
61
|
type: string;
|
|
62
62
|
id: string;
|
|
63
63
|
}) => Promise<StreamResponse<ListRecordingsResponse>>;
|
|
64
|
+
getCallReport: (request: {
|
|
65
|
+
type: string;
|
|
66
|
+
id: string;
|
|
67
|
+
session_id?: string;
|
|
68
|
+
}) => Promise<StreamResponse<GetCallReportResponse>>;
|
|
64
69
|
startRTMPBroadcasts: (request: StartRTMPBroadcastsRequest & {
|
|
65
70
|
type: string;
|
|
66
71
|
id: string;
|
package/package.json
CHANGED
|
@@ -153,6 +153,15 @@ decoders.CallRecording = (input?: Record<string, any>) => {
|
|
|
153
153
|
return decode(typeMappings, input);
|
|
154
154
|
};
|
|
155
155
|
|
|
156
|
+
decoders.CallReportResponse = (input?: Record<string, any>) => {
|
|
157
|
+
const typeMappings: TypeMapping = {
|
|
158
|
+
ended_at: { type: 'DatetimeType', isSingle: true },
|
|
159
|
+
|
|
160
|
+
started_at: { type: 'DatetimeType', isSingle: true },
|
|
161
|
+
};
|
|
162
|
+
return decode(typeMappings, input);
|
|
163
|
+
};
|
|
164
|
+
|
|
156
165
|
decoders.CallResponse = (input?: Record<string, any>) => {
|
|
157
166
|
const typeMappings: TypeMapping = {
|
|
158
167
|
created_at: { type: 'DatetimeType', isSingle: true },
|
package/src/gen/models/index.ts
CHANGED
|
@@ -988,6 +988,14 @@ export interface CallRejectedEvent {
|
|
|
988
988
|
reason?: string;
|
|
989
989
|
}
|
|
990
990
|
|
|
991
|
+
export interface CallReportResponse {
|
|
992
|
+
score: number;
|
|
993
|
+
|
|
994
|
+
ended_at?: Date;
|
|
995
|
+
|
|
996
|
+
started_at?: Date;
|
|
997
|
+
}
|
|
998
|
+
|
|
991
999
|
export interface CallRequest {
|
|
992
1000
|
created_by_id?: string;
|
|
993
1001
|
|
|
@@ -3615,6 +3623,14 @@ export interface GetBlockedUsersResponse {
|
|
|
3615
3623
|
blocks: BlockedUserResponse[];
|
|
3616
3624
|
}
|
|
3617
3625
|
|
|
3626
|
+
export interface GetCallReportResponse {
|
|
3627
|
+
duration: string;
|
|
3628
|
+
|
|
3629
|
+
session_id: string;
|
|
3630
|
+
|
|
3631
|
+
report: ReportResponse;
|
|
3632
|
+
}
|
|
3633
|
+
|
|
3618
3634
|
export interface GetCallResponse {
|
|
3619
3635
|
duration: string;
|
|
3620
3636
|
|
|
@@ -5367,6 +5383,12 @@ export interface PaginationParams {
|
|
|
5367
5383
|
offset?: number;
|
|
5368
5384
|
}
|
|
5369
5385
|
|
|
5386
|
+
export interface ParticipantReportResponse {
|
|
5387
|
+
sum: number;
|
|
5388
|
+
|
|
5389
|
+
unique: number;
|
|
5390
|
+
}
|
|
5391
|
+
|
|
5370
5392
|
export interface PendingMessageResponse {
|
|
5371
5393
|
channel?: ChannelResponse;
|
|
5372
5394
|
|
|
@@ -6663,6 +6685,14 @@ export interface ReportByHistogramBucket {
|
|
|
6663
6685
|
upper_bound?: Bound;
|
|
6664
6686
|
}
|
|
6665
6687
|
|
|
6688
|
+
export interface ReportResponse {
|
|
6689
|
+
call: CallReportResponse;
|
|
6690
|
+
|
|
6691
|
+
participants: ParticipantReportResponse;
|
|
6692
|
+
|
|
6693
|
+
user_ratings: UserRatingReportResponse;
|
|
6694
|
+
}
|
|
6695
|
+
|
|
6666
6696
|
export interface Response {
|
|
6667
6697
|
duration: string;
|
|
6668
6698
|
}
|
|
@@ -8612,6 +8642,12 @@ export interface UserMutedEvent {
|
|
|
8612
8642
|
user?: User;
|
|
8613
8643
|
}
|
|
8614
8644
|
|
|
8645
|
+
export interface UserRatingReportResponse {
|
|
8646
|
+
average: number;
|
|
8647
|
+
|
|
8648
|
+
count: number;
|
|
8649
|
+
}
|
|
8650
|
+
|
|
8615
8651
|
export interface UserReactivatedEvent {
|
|
8616
8652
|
created_at: Date;
|
|
8617
8653
|
|
package/src/gen/video/CallApi.ts
CHANGED
|
@@ -10,6 +10,7 @@ import {
|
|
|
10
10
|
DeleteRecordingResponse,
|
|
11
11
|
DeleteTranscriptionResponse,
|
|
12
12
|
EndCallResponse,
|
|
13
|
+
GetCallReportResponse,
|
|
13
14
|
GetCallResponse,
|
|
14
15
|
GetCallStatsResponse,
|
|
15
16
|
GetOrCreateCallRequest,
|
|
@@ -170,6 +171,16 @@ export class CallApi {
|
|
|
170
171
|
return this.videoApi.listRecordings({ id: this.id, type: this.type });
|
|
171
172
|
};
|
|
172
173
|
|
|
174
|
+
getCallReport = (request?: {
|
|
175
|
+
session_id?: string;
|
|
176
|
+
}): Promise<StreamResponse<GetCallReportResponse>> => {
|
|
177
|
+
return this.videoApi.getCallReport({
|
|
178
|
+
id: this.id,
|
|
179
|
+
type: this.type,
|
|
180
|
+
...request,
|
|
181
|
+
});
|
|
182
|
+
};
|
|
183
|
+
|
|
173
184
|
startRTMPBroadcasts = (
|
|
174
185
|
request: StartRTMPBroadcastsRequest,
|
|
175
186
|
): Promise<StreamResponse<StartRTMPBroadcastsResponse>> => {
|
|
@@ -12,6 +12,7 @@ import {
|
|
|
12
12
|
DeleteRecordingResponse,
|
|
13
13
|
DeleteTranscriptionResponse,
|
|
14
14
|
EndCallResponse,
|
|
15
|
+
GetCallReportResponse,
|
|
15
16
|
GetCallResponse,
|
|
16
17
|
GetCallStatsResponse,
|
|
17
18
|
GetCallTypeResponse,
|
|
@@ -466,6 +467,28 @@ export class VideoApi extends BaseApi {
|
|
|
466
467
|
return { ...response.body, metadata: response.metadata };
|
|
467
468
|
};
|
|
468
469
|
|
|
470
|
+
getCallReport = async (request: {
|
|
471
|
+
type: string;
|
|
472
|
+
id: string;
|
|
473
|
+
session_id?: string;
|
|
474
|
+
}): Promise<StreamResponse<GetCallReportResponse>> => {
|
|
475
|
+
const queryParams = {
|
|
476
|
+
session_id: request?.session_id,
|
|
477
|
+
};
|
|
478
|
+
const pathParams = {
|
|
479
|
+
type: request?.type,
|
|
480
|
+
id: request?.id,
|
|
481
|
+
};
|
|
482
|
+
|
|
483
|
+
const response = await this.sendRequest<
|
|
484
|
+
StreamResponse<GetCallReportResponse>
|
|
485
|
+
>('GET', '/api/v2/video/call/{type}/{id}/report', pathParams, queryParams);
|
|
486
|
+
|
|
487
|
+
decoders.GetCallReportResponse?.(response.body);
|
|
488
|
+
|
|
489
|
+
return { ...response.body, metadata: response.metadata };
|
|
490
|
+
};
|
|
491
|
+
|
|
469
492
|
startRTMPBroadcasts = async (
|
|
470
493
|
request: StartRTMPBroadcastsRequest & { type: string; id: string },
|
|
471
494
|
): Promise<StreamResponse<StartRTMPBroadcastsResponse>> => {
|