Skip to content

Commit 2424b2d

Browse files
authored
feat: update video to api v100.4.3 (#22)
1 parent 3221ba0 commit 2424b2d

File tree

6 files changed

+148
-10
lines changed

6 files changed

+148
-10
lines changed

src/StreamCall.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import {
1414
VideoUpdateUserPermissionsRequest,
1515
VideoQueryMembersRequest,
1616
VideoStartRecordingRequest,
17+
VideoStartTranscriptionRequest,
1718
} from './gen/video';
1819
import { OmitTypeId } from './types';
1920

@@ -101,8 +102,13 @@ export class StreamCall {
101102
});
102103
};
103104

104-
startTranscription = () => {
105-
return this.apiClient.startTranscription({ ...this.baseRequest });
105+
startTranscription = (
106+
videoStartTranscriptionRequest: VideoStartTranscriptionRequest = {},
107+
) => {
108+
return this.apiClient.startTranscription({
109+
...this.baseRequest,
110+
videoStartTranscriptionRequest,
111+
});
106112
};
107113

108114
stopHLSBroadcasting = () => {

src/gen/video/apis/DefaultApi.ts

Lines changed: 68 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* Stream API
55
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
66
*
7-
* The version of the OpenAPI document: v98.0.2-ingress-test.3
7+
* The version of the OpenAPI document: v100.4.3
88
*
99
*
1010
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -30,6 +30,7 @@ import type {
3030
VideoGoLiveResponse,
3131
VideoListDevicesResponse,
3232
VideoListRecordingsResponse,
33+
VideoListTranscriptionsResponse,
3334
VideoMuteUsersRequest,
3435
VideoMuteUsersResponse,
3536
VideoPinRequest,
@@ -44,6 +45,7 @@ import type {
4445
VideoStartHLSBroadcastingResponse,
4546
VideoStartRecordingRequest,
4647
VideoStartRecordingResponse,
48+
VideoStartTranscriptionRequest,
4749
VideoStartTranscriptionResponse,
4850
VideoStopHLSBroadcastingResponse,
4951
VideoStopLiveResponse,
@@ -117,6 +119,11 @@ export interface ListRecordingsRequest {
117119
id: string;
118120
}
119121

122+
export interface ListTranscriptionsRequest {
123+
type: string;
124+
id: string;
125+
}
126+
120127
export interface MuteUsersRequest {
121128
type: string;
122129
id: string;
@@ -152,6 +159,7 @@ export interface StartRecordingRequest {
152159
export interface StartTranscriptionRequest {
153160
type: string;
154161
id: string;
162+
videoStartTranscriptionRequest: VideoStartTranscriptionRequest | null;
155163
}
156164

157165
export interface StopHLSBroadcastingRequest {
@@ -774,6 +782,54 @@ export class DefaultApi extends runtime.BaseAPI {
774782
return await response.value();
775783
}
776784

785+
/**
786+
* Lists transcriptions Required permissions: - ListTranscriptions
787+
* List transcriptions
788+
*/
789+
async listTranscriptionsRaw(requestParameters: ListTranscriptionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<VideoListTranscriptionsResponse>> {
790+
if (requestParameters.type === null || requestParameters.type === undefined) {
791+
throw new runtime.RequiredError('type','Required parameter requestParameters.type was null or undefined when calling listTranscriptions.');
792+
}
793+
794+
if (requestParameters.id === null || requestParameters.id === undefined) {
795+
throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling listTranscriptions.');
796+
}
797+
798+
const queryParameters: any = {};
799+
800+
const headerParameters: runtime.HTTPHeaders = {};
801+
802+
if (this.configuration && this.configuration.apiKey) {
803+
headerParameters["Stream-Auth-Type"] = this.configuration.apiKey("Stream-Auth-Type"); // stream-auth-type authentication
804+
}
805+
806+
if (this.configuration && this.configuration.apiKey) {
807+
queryParameters["api_key"] = this.configuration.apiKey("api_key"); // api_key authentication
808+
}
809+
810+
if (this.configuration && this.configuration.apiKey) {
811+
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // JWT authentication
812+
}
813+
814+
const response = await this.request({
815+
path: `/video/call/{type}/{id}/transcriptions`.replace(`{${"type"}}`, encodeURIComponent(String(requestParameters.type))).replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
816+
method: 'GET',
817+
headers: headerParameters,
818+
query: queryParameters,
819+
}, initOverrides);
820+
821+
return new runtime.JSONApiResponse(response);
822+
}
823+
824+
/**
825+
* Lists transcriptions Required permissions: - ListTranscriptions
826+
* List transcriptions
827+
*/
828+
async listTranscriptions(requestParameters: ListTranscriptionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<VideoListTranscriptionsResponse> {
829+
const response = await this.listTranscriptionsRaw(requestParameters, initOverrides);
830+
return await response.value();
831+
}
832+
777833
/**
778834
* Mutes users in a call Required permissions: - MuteUsers
779835
* Mute users
@@ -1031,7 +1087,7 @@ export class DefaultApi extends runtime.BaseAPI {
10311087
}
10321088

10331089
/**
1034-
* Starts recording Sends events: - call.recording_started Required permissions: - StopRecording
1090+
* Starts recording Sends events: - call.recording_started Required permissions: - StartRecording
10351091
* Start recording
10361092
*/
10371093
async startRecordingRaw(requestParameters: StartRecordingRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<VideoStartRecordingResponse>> {
@@ -1077,7 +1133,7 @@ export class DefaultApi extends runtime.BaseAPI {
10771133
}
10781134

10791135
/**
1080-
* Starts recording Sends events: - call.recording_started Required permissions: - StopRecording
1136+
* Starts recording Sends events: - call.recording_started Required permissions: - StartRecording
10811137
* Start recording
10821138
*/
10831139
async startRecording(requestParameters: StartRecordingRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<VideoStartRecordingResponse> {
@@ -1098,10 +1154,16 @@ export class DefaultApi extends runtime.BaseAPI {
10981154
throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling startTranscription.');
10991155
}
11001156

1157+
if (requestParameters.videoStartTranscriptionRequest === null || requestParameters.videoStartTranscriptionRequest === undefined) {
1158+
throw new runtime.RequiredError('videoStartTranscriptionRequest','Required parameter requestParameters.videoStartTranscriptionRequest was null or undefined when calling startTranscription.');
1159+
}
1160+
11011161
const queryParameters: any = {};
11021162

11031163
const headerParameters: runtime.HTTPHeaders = {};
11041164

1165+
headerParameters['Content-Type'] = 'application/json';
1166+
11051167
if (this.configuration && this.configuration.apiKey) {
11061168
headerParameters["Stream-Auth-Type"] = this.configuration.apiKey("Stream-Auth-Type"); // stream-auth-type authentication
11071169
}
@@ -1119,6 +1181,7 @@ export class DefaultApi extends runtime.BaseAPI {
11191181
method: 'POST',
11201182
headers: headerParameters,
11211183
query: queryParameters,
1184+
body: requestParameters.videoStartTranscriptionRequest,
11221185
}, initOverrides);
11231186

11241187
return new runtime.JSONApiResponse(response);
@@ -1278,7 +1341,7 @@ export class DefaultApi extends runtime.BaseAPI {
12781341
}
12791342

12801343
/**
1281-
* Stops transcription Required permissions: - StopTranscription
1344+
* Stops transcription Sends events: - call.transcription_stopped Required permissions: - StopTranscription
12821345
* Stop transcription
12831346
*/
12841347
async stopTranscriptionRaw(requestParameters: StopTranscriptionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<VideoStopTranscriptionResponse>> {
@@ -1317,7 +1380,7 @@ export class DefaultApi extends runtime.BaseAPI {
13171380
}
13181381

13191382
/**
1320-
* Stops transcription Required permissions: - StopTranscription
1383+
* Stops transcription Sends events: - call.transcription_stopped Required permissions: - StopTranscription
13211384
* Stop transcription
13221385
*/
13231386
async stopTranscription(requestParameters: StopTranscriptionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<VideoStopTranscriptionResponse> {

src/gen/video/apis/ServerSideApi.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* Stream API
55
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
66
*
7-
* The version of the OpenAPI document: v98.0.2-ingress-test.3
7+
* The version of the OpenAPI document: v100.4.3
88
*
99
*
1010
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

src/gen/video/apis/SettingsApi.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* Stream API
55
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
66
*
7-
* The version of the OpenAPI document: v98.0.2-ingress-test.3
7+
* The version of the OpenAPI document: v100.4.3
88
*
99
*
1010
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

src/gen/video/models/index.ts

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -793,6 +793,37 @@ export interface VideoCallStateResponseFields {
793793
*/
794794
own_capabilities: Array<VideoOwnCapability>;
795795
}
796+
/**
797+
* CallTranscription represents a transcription of a call.
798+
* @export
799+
* @interface VideoCallTranscription
800+
*/
801+
export interface VideoCallTranscription {
802+
/**
803+
*
804+
* @type {string}
805+
* @memberof VideoCallTranscription
806+
*/
807+
end_time: string;
808+
/**
809+
*
810+
* @type {string}
811+
* @memberof VideoCallTranscription
812+
*/
813+
filename: string;
814+
/**
815+
*
816+
* @type {string}
817+
* @memberof VideoCallTranscription
818+
*/
819+
start_time: string;
820+
/**
821+
*
822+
* @type {string}
823+
* @memberof VideoCallTranscription
824+
*/
825+
url: string;
826+
}
796827
/**
797828
*
798829
* @export
@@ -1655,6 +1686,12 @@ export interface VideoGoLiveRequest {
16551686
* @memberof VideoGoLiveRequest
16561687
*/
16571688
start_transcription?: boolean;
1689+
/**
1690+
*
1691+
* @type {string}
1692+
* @memberof VideoGoLiveRequest
1693+
*/
1694+
transcription_storage_name?: string;
16581695
}
16591696
/**
16601697
*
@@ -1903,6 +1940,25 @@ export interface VideoListRecordingsResponse {
19031940
*/
19041941
recordings: Array<VideoCallRecording>;
19051942
}
1943+
/**
1944+
*
1945+
* @export
1946+
* @interface VideoListTranscriptionsResponse
1947+
*/
1948+
export interface VideoListTranscriptionsResponse {
1949+
/**
1950+
*
1951+
* @type {string}
1952+
* @memberof VideoListTranscriptionsResponse
1953+
*/
1954+
duration: string;
1955+
/**
1956+
*
1957+
* @type {Array<VideoCallTranscription>}
1958+
* @memberof VideoListTranscriptionsResponse
1959+
*/
1960+
transcriptions: Array<VideoCallTranscription>;
1961+
}
19061962
/**
19071963
*
19081964
* @export
@@ -2629,6 +2685,19 @@ export interface VideoStartRecordingResponse {
26292685
*/
26302686
duration: string;
26312687
}
2688+
/**
2689+
*
2690+
* @export
2691+
* @interface VideoStartTranscriptionRequest
2692+
*/
2693+
export interface VideoStartTranscriptionRequest {
2694+
/**
2695+
*
2696+
* @type {string}
2697+
* @memberof VideoStartTranscriptionRequest
2698+
*/
2699+
transcription_external_storage?: string;
2700+
}
26322701
/**
26332702
*
26342703
* @export

src/gen/video/runtime.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* Stream API
55
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
66
*
7-
* The version of the OpenAPI document: v98.0.2-ingress-test.3
7+
* The version of the OpenAPI document: v100.4.3
88
*
99
*
1010
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

0 commit comments

Comments
 (0)