diff --git a/__tests__/external-recording-storage.test.ts b/__tests__/external-recording-storage.test.ts new file mode 100644 index 0000000..8fc5163 --- /dev/null +++ b/__tests__/external-recording-storage.test.ts @@ -0,0 +1,48 @@ +import { beforeAll, describe, expect, it } from 'vitest'; +import { v4 as uuidv4 } from 'uuid'; +import { createTestClient } from './create-test-client'; +import { StreamClient } from '../src/StreamClient'; + +describe('external storage CRUD API', () => { + let client: StreamClient; + const storageName = `streamnodetest${uuidv4()}`; + + beforeAll(() => { + client = createTestClient(); + }); + + it('create', async () => { + const response = await client.video.createExternalStorage({ + name: storageName, + bucket: 'test', + storage_type: 'test', + }); + + expect(response).toBeDefined(); + }); + + it('read', async () => { + const readResponse = await client.video.listExternalStorages(); + + expect(readResponse.external_storages).toBeDefined(); + expect(readResponse.external_storages[storageName]).toBeDefined(); + }); + + it('update', async () => { + const newBucket = 'new bucket'; + const response = await client.video.updateExternalStorage(storageName, { + bucket: newBucket, + storage_type: 'test', + }); + + expect(response.bucket).toBe('new bucket'); + }); + + it('delete', async () => { + const response = await client.video.deleteExternalStorage({ + name: storageName, + }); + + expect(response).toBeDefined(); + }); +}); diff --git a/src/StreamCall.ts b/src/StreamCall.ts index 17e7c13..97b758c 100644 --- a/src/StreamCall.ts +++ b/src/StreamCall.ts @@ -13,6 +13,7 @@ import { VideoUpdateCallMembersRequest, VideoUpdateUserPermissionsRequest, VideoQueryMembersRequest, + VideoStartRecordingRequest, } from './gen/video'; import { OmitTypeId } from './types'; @@ -93,8 +94,11 @@ export class StreamCall { return this.apiClient.startHLSBroadcasting({ ...this.baseRequest }); }; - startRecording = () => { - return this.apiClient.startRecording({ ...this.baseRequest }); + startRecording = (request?: VideoStartRecordingRequest) => { + return this.apiClient.startRecording({ + ...this.baseRequest, + videoStartRecordingRequest: request || {}, + }); }; startTranscription = () => { diff --git a/src/StreamVideoClient.ts b/src/StreamVideoClient.ts index 0df0361..85e5ace 100644 --- a/src/StreamVideoClient.ts +++ b/src/StreamVideoClient.ts @@ -1,22 +1,29 @@ import { StreamCall } from './StreamCall'; import { StreamClient } from './StreamClient'; import { + CheckExternalStorageRequest, DefaultApi, DeleteCallTypeRequest, + DeleteExternalStorageRequest, GetCallTypeRequest, ServerSideApi, + SettingsApi, VideoCreateCallTypeRequest, + VideoCreateExternalStorageRequest, VideoQueryCallsRequest, VideoUpdateCallTypeRequest, + VideoUpdateExternalStorageRequest, } from './gen/video'; export class StreamVideoClient { private readonly apiClient: DefaultApi; private readonly videoServerSideApiClient: ServerSideApi; + private readonly settingsApi: SettingsApi; constructor(private readonly streamClient: StreamClient) { const configuration = this.streamClient.getConfiguration('video'); this.apiClient = new DefaultApi(configuration); + this.settingsApi = new SettingsApi(configuration); this.videoServerSideApiClient = new ServerSideApi(configuration); } @@ -57,4 +64,34 @@ export class StreamVideoClient { videoUpdateCallTypeRequest, }); }; + + listExternalStorages = () => { + return this.settingsApi.listExternalStorage(); + }; + + createExternalStorage = ( + videoCreateExternalStorageRequest: VideoCreateExternalStorageRequest, + ) => { + return this.settingsApi.createExternalStorage({ + videoCreateExternalStorageRequest, + }); + }; + + deleteExternalStorage = (request: DeleteExternalStorageRequest) => { + return this.settingsApi.deleteExternalStorage(request); + }; + + updateExternalStorage = ( + name: string, + videoUpdateExternalStorageRequest: VideoUpdateExternalStorageRequest, + ) => { + return this.videoServerSideApiClient.updateExternalStorage({ + name, + videoUpdateExternalStorageRequest, + }); + }; + + checkExternalStorage = (request: CheckExternalStorageRequest) => { + return this.videoServerSideApiClient.checkExternalStorage(request); + }; } diff --git a/src/gen/video/.openapi-generator/FILES b/src/gen/video/.openapi-generator/FILES index 2acf23f..f9d7c89 100644 --- a/src/gen/video/.openapi-generator/FILES +++ b/src/gen/video/.openapi-generator/FILES @@ -1,6 +1,7 @@ .openapi-generator-ignore apis/DefaultApi.ts apis/ServerSideApi.ts +apis/SettingsApi.ts apis/index.ts index.ts models/index.ts diff --git a/src/gen/video/apis/DefaultApi.ts b/src/gen/video/apis/DefaultApi.ts index 8c8f706..8d60890 100644 --- a/src/gen/video/apis/DefaultApi.ts +++ b/src/gen/video/apis/DefaultApi.ts @@ -4,7 +4,7 @@ * Stream API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: v96.8.0-ingress-dbg.5 + * The version of the OpenAPI document: v98.0.2-ingress-test.3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -42,6 +42,7 @@ import type { VideoSendEventRequest, VideoSendEventResponse, VideoStartHLSBroadcastingResponse, + VideoStartRecordingRequest, VideoStartRecordingResponse, VideoStartTranscriptionResponse, VideoStopHLSBroadcastingResponse, @@ -145,6 +146,7 @@ export interface StartHLSBroadcastingRequest { export interface StartRecordingRequest { type: string; id: string; + videoStartRecordingRequest: VideoStartRecordingRequest | null; } export interface StartTranscriptionRequest { @@ -1041,10 +1043,16 @@ export class DefaultApi extends runtime.BaseAPI { throw new runtime.RequiredError('id','Required parameter requestParameters.id was null or undefined when calling startRecording.'); } + if (requestParameters.videoStartRecordingRequest === null || requestParameters.videoStartRecordingRequest === undefined) { + throw new runtime.RequiredError('videoStartRecordingRequest','Required parameter requestParameters.videoStartRecordingRequest was null or undefined when calling startRecording.'); + } + const queryParameters: any = {}; const headerParameters: runtime.HTTPHeaders = {}; + headerParameters['Content-Type'] = 'application/json'; + if (this.configuration && this.configuration.apiKey) { headerParameters["Stream-Auth-Type"] = this.configuration.apiKey("Stream-Auth-Type"); // stream-auth-type authentication } @@ -1062,6 +1070,7 @@ export class DefaultApi extends runtime.BaseAPI { method: 'POST', headers: headerParameters, query: queryParameters, + body: requestParameters.videoStartRecordingRequest, }, initOverrides); return new runtime.JSONApiResponse(response); diff --git a/src/gen/video/apis/ServerSideApi.ts b/src/gen/video/apis/ServerSideApi.ts index becbbc2..f4a77e8 100644 --- a/src/gen/video/apis/ServerSideApi.ts +++ b/src/gen/video/apis/ServerSideApi.ts @@ -4,7 +4,7 @@ * Stream API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: v96.8.0-ingress-dbg.5 + * The version of the OpenAPI document: v98.0.2-ingress-test.3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -16,6 +16,7 @@ import * as runtime from '../runtime'; import type { VideoAPIError, + VideoCheckExternalStorageResponse, VideoCreateCallTypeRequest, VideoCreateCallTypeResponse, VideoGetCallTypeResponse, @@ -23,8 +24,14 @@ import type { VideoResponse, VideoUpdateCallTypeRequest, VideoUpdateCallTypeResponse, + VideoUpdateExternalStorageRequest, + VideoUpdateExternalStorageResponse, } from '../models'; +export interface CheckExternalStorageRequest { + name: string; +} + export interface CreateCallTypeRequest { videoCreateCallTypeRequest: VideoCreateCallTypeRequest | null; } @@ -42,11 +49,60 @@ export interface UpdateCallTypeRequest { videoUpdateCallTypeRequest: VideoUpdateCallTypeRequest | null; } +export interface UpdateExternalStorageRequest { + name: string; + videoUpdateExternalStorageRequest: VideoUpdateExternalStorageRequest | null; +} + /** * */ export class ServerSideApi extends runtime.BaseAPI { + /** + * + * Check External Storage + */ + async checkExternalStorageRaw(requestParameters: CheckExternalStorageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters.name === null || requestParameters.name === undefined) { + throw new runtime.RequiredError('name','Required parameter requestParameters.name was null or undefined when calling checkExternalStorage.'); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Stream-Auth-Type"] = this.configuration.apiKey("Stream-Auth-Type"); // stream-auth-type authentication + } + + if (this.configuration && this.configuration.apiKey) { + queryParameters["api_key"] = this.configuration.apiKey("api_key"); // api_key authentication + } + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // JWT authentication + } + + const response = await this.request({ + path: `/video/external_storage/{name}/check`.replace(`{${"name"}}`, encodeURIComponent(String(requestParameters.name))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response); + } + + /** + * + * Check External Storage + */ + async checkExternalStorage(requestParameters: CheckExternalStorageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.checkExternalStorageRaw(requestParameters, initOverrides); + return await response.value(); + } + /** * * Create Call Type @@ -273,4 +329,55 @@ export class ServerSideApi extends runtime.BaseAPI { return await response.value(); } + /** + * + * Update External Storage + */ + async updateExternalStorageRaw(requestParameters: UpdateExternalStorageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters.name === null || requestParameters.name === undefined) { + throw new runtime.RequiredError('name','Required parameter requestParameters.name was null or undefined when calling updateExternalStorage.'); + } + + if (requestParameters.videoUpdateExternalStorageRequest === null || requestParameters.videoUpdateExternalStorageRequest === undefined) { + throw new runtime.RequiredError('videoUpdateExternalStorageRequest','Required parameter requestParameters.videoUpdateExternalStorageRequest was null or undefined when calling updateExternalStorage.'); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Stream-Auth-Type"] = this.configuration.apiKey("Stream-Auth-Type"); // stream-auth-type authentication + } + + if (this.configuration && this.configuration.apiKey) { + queryParameters["api_key"] = this.configuration.apiKey("api_key"); // api_key authentication + } + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // JWT authentication + } + + const response = await this.request({ + path: `/video/external_storage/{name}`.replace(`{${"name"}}`, encodeURIComponent(String(requestParameters.name))), + method: 'PUT', + headers: headerParameters, + query: queryParameters, + body: requestParameters.videoUpdateExternalStorageRequest, + }, initOverrides); + + return new runtime.JSONApiResponse(response); + } + + /** + * + * Update External Storage + */ + async updateExternalStorage(requestParameters: UpdateExternalStorageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.updateExternalStorageRaw(requestParameters, initOverrides); + return await response.value(); + } + } diff --git a/src/gen/video/apis/SettingsApi.ts b/src/gen/video/apis/SettingsApi.ts new file mode 100644 index 0000000..c0a7905 --- /dev/null +++ b/src/gen/video/apis/SettingsApi.ts @@ -0,0 +1,169 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Stream API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: v98.0.2-ingress-test.3 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + VideoAPIError, + VideoCreateExternalStorageRequest, + VideoCreateExternalStorageResponse, + VideoDeleteExternalStorageResponse, + VideoListExternalStorageResponse, +} from '../models'; + +export interface CreateExternalStorageRequest { + videoCreateExternalStorageRequest: VideoCreateExternalStorageRequest | null; +} + +export interface DeleteExternalStorageRequest { + name: string; +} + +/** + * + */ +export class SettingsApi extends runtime.BaseAPI { + + /** + * Creates new external storage + * Create external storage + */ + async createExternalStorageRaw(requestParameters: CreateExternalStorageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters.videoCreateExternalStorageRequest === null || requestParameters.videoCreateExternalStorageRequest === undefined) { + throw new runtime.RequiredError('videoCreateExternalStorageRequest','Required parameter requestParameters.videoCreateExternalStorageRequest was null or undefined when calling createExternalStorage.'); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Stream-Auth-Type"] = this.configuration.apiKey("Stream-Auth-Type"); // stream-auth-type authentication + } + + if (this.configuration && this.configuration.apiKey) { + queryParameters["api_key"] = this.configuration.apiKey("api_key"); // api_key authentication + } + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // JWT authentication + } + + const response = await this.request({ + path: `/video/external_storage`, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: requestParameters.videoCreateExternalStorageRequest, + }, initOverrides); + + return new runtime.JSONApiResponse(response); + } + + /** + * Creates new external storage + * Create external storage + */ + async createExternalStorage(requestParameters: CreateExternalStorageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.createExternalStorageRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Deletes external storage + * Delete external storage + */ + async deleteExternalStorageRaw(requestParameters: DeleteExternalStorageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters.name === null || requestParameters.name === undefined) { + throw new runtime.RequiredError('name','Required parameter requestParameters.name was null or undefined when calling deleteExternalStorage.'); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Stream-Auth-Type"] = this.configuration.apiKey("Stream-Auth-Type"); // stream-auth-type authentication + } + + if (this.configuration && this.configuration.apiKey) { + queryParameters["api_key"] = this.configuration.apiKey("api_key"); // api_key authentication + } + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // JWT authentication + } + + const response = await this.request({ + path: `/video/external_storage/{name}`.replace(`{${"name"}}`, encodeURIComponent(String(requestParameters.name))), + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response); + } + + /** + * Deletes external storage + * Delete external storage + */ + async deleteExternalStorage(requestParameters: DeleteExternalStorageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.deleteExternalStorageRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Lists external storage + * List external storage + */ + async listExternalStorageRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Stream-Auth-Type"] = this.configuration.apiKey("Stream-Auth-Type"); // stream-auth-type authentication + } + + if (this.configuration && this.configuration.apiKey) { + queryParameters["api_key"] = this.configuration.apiKey("api_key"); // api_key authentication + } + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // JWT authentication + } + + const response = await this.request({ + path: `/video/external_storage`, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response); + } + + /** + * Lists external storage + * List external storage + */ + async listExternalStorage(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.listExternalStorageRaw(initOverrides); + return await response.value(); + } + +} diff --git a/src/gen/video/apis/index.ts b/src/gen/video/apis/index.ts index f1b8d99..0792e94 100644 --- a/src/gen/video/apis/index.ts +++ b/src/gen/video/apis/index.ts @@ -2,3 +2,4 @@ /* eslint-disable */ export * from './DefaultApi'; export * from './ServerSideApi'; +export * from './SettingsApi'; diff --git a/src/gen/video/models/index.ts b/src/gen/video/models/index.ts index b3cd075..cc0ad5f 100644 --- a/src/gen/video/models/index.ts +++ b/src/gen/video/models/index.ts @@ -195,6 +195,37 @@ export const VideoAudioSettingsRequestDefaultDeviceEnum = { } as const; export type VideoAudioSettingsRequestDefaultDeviceEnum = typeof VideoAudioSettingsRequestDefaultDeviceEnum[keyof typeof VideoAudioSettingsRequestDefaultDeviceEnum]; +/** + * + * @export + * @interface VideoAzureRequest + */ +export interface VideoAzureRequest { + /** + * + * @type {string} + * @memberof VideoAzureRequest + */ + abs_account_name: string; + /** + * + * @type {string} + * @memberof VideoAzureRequest + */ + abs_client_id: string; + /** + * + * @type {string} + * @memberof VideoAzureRequest + */ + abs_client_secret: string; + /** + * + * @type {string} + * @memberof VideoAzureRequest + */ + abs_tenant_id: string; +} /** * * @export @@ -774,6 +805,12 @@ export interface VideoCallTypeResponse { * @memberof VideoCallTypeResponse */ created_at: string; + /** + * + * @type {string} + * @memberof VideoCallTypeResponse + */ + external_storage?: string; /** * * @type {{ [key: string]: Array; }} @@ -805,6 +842,19 @@ export interface VideoCallTypeResponse { */ updated_at: string; } +/** + * + * @export + * @interface VideoCheckExternalStorageResponse + */ +export interface VideoCheckExternalStorageResponse { + /** + * Duration of the request in human-readable format + * @type {string} + * @memberof VideoCheckExternalStorageResponse + */ + duration: string; +} /** * * @export @@ -848,6 +898,12 @@ export interface VideoConnectUserDetailsRequest { * @interface VideoCreateCallTypeRequest */ export interface VideoCreateCallTypeRequest { + /** + * + * @type {string} + * @memberof VideoCreateCallTypeRequest + */ + external_storage?: string; /** * * @type {{ [key: string]: Array; }} @@ -891,6 +947,12 @@ export interface VideoCreateCallTypeResponse { * @memberof VideoCreateCallTypeResponse */ duration: string; + /** + * + * @type {string} + * @memberof VideoCreateCallTypeResponse + */ + external_storage?: string; /** * * @type {{ [key: string]: Array; }} @@ -978,6 +1040,68 @@ export const VideoCreateDeviceRequestPushProviderEnum = { } as const; export type VideoCreateDeviceRequestPushProviderEnum = typeof VideoCreateDeviceRequestPushProviderEnum[keyof typeof VideoCreateDeviceRequestPushProviderEnum]; +/** + * + * @export + * @interface VideoCreateExternalStorageRequest + */ +export interface VideoCreateExternalStorageRequest { + /** + * + * @type {VideoS3Request} + * @memberof VideoCreateExternalStorageRequest + */ + aws_s3?: VideoS3Request; + /** + * + * @type {VideoAzureRequest} + * @memberof VideoCreateExternalStorageRequest + */ + azure_blob?: VideoAzureRequest; + /** + * + * @type {string} + * @memberof VideoCreateExternalStorageRequest + */ + bucket: string; + /** + * + * @type {string} + * @memberof VideoCreateExternalStorageRequest + */ + gcs_credentials?: string; + /** + * + * @type {string} + * @memberof VideoCreateExternalStorageRequest + */ + name: string; + /** + * + * @type {string} + * @memberof VideoCreateExternalStorageRequest + */ + path?: string; + /** + * + * @type {string} + * @memberof VideoCreateExternalStorageRequest + */ + storage_type: string; +} +/** + * + * @export + * @interface VideoCreateExternalStorageResponse + */ +export interface VideoCreateExternalStorageResponse { + /** + * Duration of the request in human-readable format + * @type {string} + * @memberof VideoCreateExternalStorageResponse + */ + duration: string; +} /** * * @export @@ -1016,6 +1140,19 @@ export interface VideoCreateGuestResponse { */ user: VideoUserResponse; } +/** + * + * @export + * @interface VideoDeleteExternalStorageResponse + */ +export interface VideoDeleteExternalStorageResponse { + /** + * Duration of the request in human-readable format + * @type {string} + * @memberof VideoDeleteExternalStorageResponse + */ + duration: string; +} /** * * @export @@ -1246,6 +1383,37 @@ export interface VideoEventNotificationSettingsRequest { */ enabled?: boolean; } +/** + * + * @export + * @interface VideoExternalStorageResponse + */ +export interface VideoExternalStorageResponse { + /** + * + * @type {string} + * @memberof VideoExternalStorageResponse + */ + bucket: string; + /** + * + * @type {string} + * @memberof VideoExternalStorageResponse + */ + name: string; + /** + * + * @type {string} + * @memberof VideoExternalStorageResponse + */ + path: string; + /** + * + * @type {string} + * @memberof VideoExternalStorageResponse + */ + type: string; +} /** * * @export @@ -1327,6 +1495,12 @@ export interface VideoGetCallTypeResponse { * @memberof VideoGetCallTypeResponse */ duration: string; + /** + * + * @type {string} + * @memberof VideoGetCallTypeResponse + */ + external_storage?: string; /** * * @type {{ [key: string]: Array; }} @@ -1457,6 +1631,12 @@ export interface VideoGetOrCreateCallResponse { * @interface VideoGoLiveRequest */ export interface VideoGoLiveRequest { + /** + * + * @type {string} + * @memberof VideoGoLiveRequest + */ + recording_storage_name?: string; /** * * @type {boolean} @@ -1685,6 +1865,25 @@ export interface VideoListDevicesResponse { */ duration: string; } +/** + * + * @export + * @interface VideoListExternalStorageResponse + */ +export interface VideoListExternalStorageResponse { + /** + * Duration of the request in human-readable format + * @type {string} + * @memberof VideoListExternalStorageResponse + */ + duration: string; + /** + * + * @type {{ [key: string]: VideoExternalStorageResponse; }} + * @memberof VideoListExternalStorageResponse + */ + external_storages: { [key: string]: VideoExternalStorageResponse; }; +} /** * * @export @@ -2277,6 +2476,31 @@ export interface VideoRingSettingsRequest { */ incoming_call_timeout_ms?: number; } +/** + * + * @export + * @interface VideoS3Request + */ +export interface VideoS3Request { + /** + * + * @type {string} + * @memberof VideoS3Request + */ + s3_api_key?: string; + /** + * + * @type {string} + * @memberof VideoS3Request + */ + s3_region: string; + /** + * + * @type {string} + * @memberof VideoS3Request + */ + s3_secret?: string; +} /** * * @export @@ -2379,6 +2603,19 @@ export interface VideoStartHLSBroadcastingResponse { */ playlist_url: string; } +/** + * + * @export + * @interface VideoStartRecordingRequest + */ +export interface VideoStartRecordingRequest { + /** + * + * @type {string} + * @memberof VideoStartRecordingRequest + */ + recording_external_storage?: string; +} /** * * @export @@ -2778,6 +3015,12 @@ export interface VideoUpdateCallResponse { * @interface VideoUpdateCallTypeRequest */ export interface VideoUpdateCallTypeRequest { + /** + * + * @type {string} + * @memberof VideoUpdateCallTypeRequest + */ + external_storage?: string; /** * * @type {{ [key: string]: Array; }} @@ -2815,6 +3058,12 @@ export interface VideoUpdateCallTypeResponse { * @memberof VideoUpdateCallTypeResponse */ duration: string; + /** + * + * @type {string} + * @memberof VideoUpdateCallTypeResponse + */ + external_storage?: string; /** * * @type {{ [key: string]: Array; }} @@ -2846,6 +3095,86 @@ export interface VideoUpdateCallTypeResponse { */ updated_at: string; } +/** + * + * @export + * @interface VideoUpdateExternalStorageRequest + */ +export interface VideoUpdateExternalStorageRequest { + /** + * + * @type {VideoS3Request} + * @memberof VideoUpdateExternalStorageRequest + */ + aws_s3?: VideoS3Request; + /** + * + * @type {VideoAzureRequest} + * @memberof VideoUpdateExternalStorageRequest + */ + azure_blob?: VideoAzureRequest; + /** + * + * @type {string} + * @memberof VideoUpdateExternalStorageRequest + */ + bucket: string; + /** + * + * @type {string} + * @memberof VideoUpdateExternalStorageRequest + */ + gcs_credentials?: string; + /** + * + * @type {string} + * @memberof VideoUpdateExternalStorageRequest + */ + path?: string; + /** + * + * @type {string} + * @memberof VideoUpdateExternalStorageRequest + */ + storage_type: string; +} +/** + * + * @export + * @interface VideoUpdateExternalStorageResponse + */ +export interface VideoUpdateExternalStorageResponse { + /** + * + * @type {string} + * @memberof VideoUpdateExternalStorageResponse + */ + bucket: string; + /** + * Duration of the request in human-readable format + * @type {string} + * @memberof VideoUpdateExternalStorageResponse + */ + duration: string; + /** + * + * @type {string} + * @memberof VideoUpdateExternalStorageResponse + */ + name: string; + /** + * + * @type {string} + * @memberof VideoUpdateExternalStorageResponse + */ + path: string; + /** + * + * @type {string} + * @memberof VideoUpdateExternalStorageResponse + */ + type: string; +} /** * * @export diff --git a/src/gen/video/runtime.ts b/src/gen/video/runtime.ts index 22308e8..3ba6064 100644 --- a/src/gen/video/runtime.ts +++ b/src/gen/video/runtime.ts @@ -4,7 +4,7 @@ * Stream API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * - * The version of the OpenAPI document: v96.8.0-ingress-dbg.5 + * The version of the OpenAPI document: v98.0.2-ingress-test.3 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/test-cleanup.js b/test-cleanup.js index 931166a..2aff8ba 100644 --- a/test-cleanup.js +++ b/test-cleanup.js @@ -35,6 +35,17 @@ const cleanupCallTypes = async () => { ); }; +const cleanupExternalStorage = async () => { + const storage = (await client.video.listExternalStorages()).external_storages; + const customStorage = Object.keys(storage).filter((k) => + k.startsWith("streamnodetest"), + ); + + await Promise.all( + customStorage.map((s) => client.video.deleteExternalStorage({ name: s })), + ); +}; + const cleanUpChannelTypes = async () => { const channelTypes = (await client.chat.listChannelTypes()).channel_types; const customChannelTypes = Object.keys(channelTypes).filter((type) => @@ -115,6 +126,7 @@ const cleanup = async () => { await cleanUpCommands(); await cleanUpRoles(); await cleanUpUsers(); + await cleanupExternalStorage(); }; cleanup().then(() => {