diff --git a/CHANGELOG.md b/CHANGELOG.md index 44ccde0..dcb90c3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [0.4.1](https://github.com/GetStream/stream-node/compare/v0.4.0...v0.4.1) (2024-09-09) + + +### Features + +* RTMP broadcasts list endpoint ([#53](https://github.com/GetStream/stream-node/issues/53)) ([8851dab](https://github.com/GetStream/stream-node/commit/8851dab3f5afd6f6739518b4d38c1baeeb5c79a9)) + ## [0.4.0](https://github.com/GetStream/stream-node/compare/v0.3.1...v0.4.0) (2024-08-30) diff --git a/package.json b/package.json index b3858e8..653b784 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@stream-io/node-sdk", - "version": "0.4.0", + "version": "0.4.1", "description": "", "exports": { ".": { diff --git a/rollup.config.mjs b/rollup.config.mjs index 580488a..51d4e2f 100644 --- a/rollup.config.mjs +++ b/rollup.config.mjs @@ -1,7 +1,9 @@ import typescript from "@rollup/plugin-typescript"; import replace from "@rollup/plugin-replace"; -import pkg from "./package.json" with { type: "json" }; +import { createRequire } from "module"; +const require = createRequire(import.meta.url); +const pkg = require("./package.json"); const nodeConfig = { input: "index.ts", diff --git a/src/gen/models/index.ts b/src/gen/models/index.ts index 247ca79..06cce03 100644 --- a/src/gen/models/index.ts +++ b/src/gen/models/index.ts @@ -4712,6 +4712,28 @@ export interface QueueStatsResponse { time_to_action_buckets: Record; } +export interface RTMPBroadcastRequest { + name: string; + + stream_url: string; + + quality?: + | '360p' + | '480p' + | '720p' + | '1080p' + | '1440p' + | 'portrait-360x640' + | 'portrait-480x854' + | 'portrait-720x1280' + | 'portrait-1080x1920' + | 'portrait-1440x2560'; + + stream_key?: string; + + layout?: LayoutSettingsRequest; +} + export interface RTMPIngress { address: string; } @@ -5283,25 +5305,7 @@ export interface StartHLSBroadcastingResponse { } export interface StartRTMPBroadcastsRequest { - name: string; - - stream_url: string; - - quality?: - | '360p' - | '480p' - | '720p' - | '1080p' - | '1440p' - | 'portrait-360x640' - | 'portrait-480x854' - | 'portrait-720x1280' - | 'portrait-1080x1920' - | 'portrait-1440x2560'; - - stream_key?: string; - - layout?: LayoutSettingsRequest; + broadcasts: RTMPBroadcastRequest[]; } export interface StartRTMPBroadcastsResponse { diff --git a/src/gen/video/CallApi.ts b/src/gen/video/CallApi.ts index 2affec9..a221d41 100644 --- a/src/gen/video/CallApi.ts +++ b/src/gen/video/CallApi.ts @@ -164,10 +164,10 @@ export class CallApi { return this.videoApi.listRecordings({ id: this.id, type: this.type }); }; - startRTMPBroadcast = ( + startRTMPBroadcasts = ( request: StartRTMPBroadcastsRequest, ): Promise> => { - return this.videoApi.startRTMPBroadcast({ + return this.videoApi.startRTMPBroadcasts({ id: this.id, type: this.type, ...request, diff --git a/src/gen/video/VideoApi.ts b/src/gen/video/VideoApi.ts index c872369..8e8e5ba 100644 --- a/src/gen/video/VideoApi.ts +++ b/src/gen/video/VideoApi.ts @@ -457,7 +457,7 @@ export class VideoApi extends BaseApi { return { ...response.body, metadata: response.metadata }; }; - startRTMPBroadcast = async ( + startRTMPBroadcasts = async ( request: StartRTMPBroadcastsRequest & { type: string; id: string }, ): Promise> => { const pathParams = { @@ -465,11 +465,7 @@ export class VideoApi extends BaseApi { id: request?.id, }; const body = { - name: request?.name, - stream_url: request?.stream_url, - quality: request?.quality, - stream_key: request?.stream_key, - layout: request?.layout, + broadcasts: request?.broadcasts, }; const response = await this.sendRequest<