Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: update SDK generated code, add rtmp broadcast call endpoints #49

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions src/StreamCall.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
VideoPinRequest,
VideoQueryCallMembersRequest,
VideoSendCallEventRequest,
VideoStartRTMPBroadcastsRequest,
VideoStartRecordingRequest,
VideoStartTranscriptionRequest,
VideoUnblockUserRequest,
Expand Down Expand Up @@ -125,6 +126,15 @@
return this.apiClient.startHLSBroadcasting({ ...this.baseRequest });
};

startRTMPBroadcast = (
videoStartRTMPBroadcastsRequest: VideoStartRTMPBroadcastsRequest,
) => {
return this.apiClient.startRTMPBroadcast({
...this.baseRequest,
videoStartRTMPBroadcastsRequest,
});
};

startRecording = (request?: VideoStartRecordingRequest) => {
return this.apiClient.startRecording({
...this.baseRequest,
Expand Down Expand Up @@ -152,6 +162,18 @@
return this.apiClient.stopHLSBroadcasting({ ...this.baseRequest });
};

stopRTMPBroadcast = (name: string) => {
return this.apiClient.stopRTMPBroadcast({
...this.baseRequest,
name: name,

Check warning on line 168 in src/StreamCall.ts

View workflow job for this annotation

GitHub Actions / lint

Expected property shorthand
body: {},
});
};

stopAllRTMPBroadcasts = () => {
return this.apiClient.stopAllRTMPBroadcasts({ ...this.baseRequest });
};

stopLive = () => {
return this.apiClient.stopLive({ ...this.baseRequest });
};
Expand Down
24 changes: 12 additions & 12 deletions src/gen/chat/apis/ProductchatApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: v122.3.0
* The version of the OpenAPI document: v130.1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down Expand Up @@ -67,7 +67,6 @@ import type {
ExportUserResponse,
ExportUsersRequest,
ExportUsersResponse,
FileDeleteResponse,
FileUploadResponse,
FlagRequest,
FlagResponse,
Expand All @@ -76,6 +75,7 @@ import type {
GetBlockedUsersResponse,
GetCallTokenRequest,
GetCallTokenResponse,
GetChannelTypeResponse,
GetCommandResponse,
GetCustomPermissionResponse,
GetExportChannelsStatusResponse,
Expand Down Expand Up @@ -152,7 +152,7 @@ import type {
SendUserCustomEventRequest,
ShowChannelRequest,
ShowChannelResponse,
SortParam,
SortParamRequest,
TranslateMessageRequest,
TruncateChannelRequest,
TruncateChannelResponse,
Expand Down Expand Up @@ -471,7 +471,7 @@ export interface GetReactionsRequest {

export interface GetRepliesRequest {
parentId: string;
sort?: Array<SortParam>;
sort?: Array<SortParamRequest>;
limit?: number;
offset?: number;
idGte?: string;
Expand Down Expand Up @@ -2151,7 +2151,7 @@ export class ProductchatApi extends runtime.BaseAPI {
* Deletes previously uploaded file Required permissions: - DeleteAttachment
* Delete file
*/
async deleteFileRaw(requestParameters: DeleteFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<FileDeleteResponse>> {
async deleteFileRaw(requestParameters: DeleteFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Response>> {
if (requestParameters.type === null || requestParameters.type === undefined) {
throw new runtime.RequiredError('type','Required parameter requestParameters.type was null or undefined when calling deleteFile.');
}
Expand Down Expand Up @@ -2194,7 +2194,7 @@ export class ProductchatApi extends runtime.BaseAPI {
* Deletes previously uploaded file Required permissions: - DeleteAttachment
* Delete file
*/
async deleteFile(requestParameters: DeleteFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<FileDeleteResponse> {
async deleteFile(requestParameters: DeleteFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Response> {
const response = await this.deleteFileRaw(requestParameters, initOverrides);
return await response.value();
}
Expand All @@ -2203,7 +2203,7 @@ export class ProductchatApi extends runtime.BaseAPI {
* Deletes previously uploaded image Required permissions: - DeleteAttachment
* Delete image
*/
async deleteImageRaw(requestParameters: DeleteImageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<FileDeleteResponse>> {
async deleteImageRaw(requestParameters: DeleteImageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Response>> {
if (requestParameters.type === null || requestParameters.type === undefined) {
throw new runtime.RequiredError('type','Required parameter requestParameters.type was null or undefined when calling deleteImage.');
}
Expand Down Expand Up @@ -2246,7 +2246,7 @@ export class ProductchatApi extends runtime.BaseAPI {
* Deletes previously uploaded image Required permissions: - DeleteAttachment
* Delete image
*/
async deleteImage(requestParameters: DeleteImageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<FileDeleteResponse> {
async deleteImage(requestParameters: DeleteImageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Response> {
const response = await this.deleteImageRaw(requestParameters, initOverrides);
return await response.value();
}
Expand Down Expand Up @@ -3009,7 +3009,7 @@ export class ProductchatApi extends runtime.BaseAPI {
* Gets channel type
* Get channel type
*/
async getChannelTypeRaw(requestParameters: GetChannelTypeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Response>> {
async getChannelTypeRaw(requestParameters: GetChannelTypeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetChannelTypeResponse>> {
if (requestParameters.name === null || requestParameters.name === undefined) {
throw new runtime.RequiredError('name','Required parameter requestParameters.name was null or undefined when calling getChannelType.');
}
Expand Down Expand Up @@ -3044,7 +3044,7 @@ export class ProductchatApi extends runtime.BaseAPI {
* Gets channel type
* Get channel type
*/
async getChannelType(requestParameters: GetChannelTypeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Response> {
async getChannelType(requestParameters: GetChannelTypeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetChannelTypeResponse> {
const response = await this.getChannelTypeRaw(requestParameters, initOverrides);
return await response.value();
}
Expand Down Expand Up @@ -6752,7 +6752,7 @@ export class ProductchatApi extends runtime.BaseAPI {
}

/**
* Updates certain fields of the user Sends events: - user.presence.changed - user.updated
* Updates certain fields of the user Sends events: - user.updated - user.presence.changed
* Partially update user
*/
async updateUsersPartialRaw(requestParameters: UpdateUsersPartialOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UpdateUsersResponse>> {
Expand Down Expand Up @@ -6790,7 +6790,7 @@ export class ProductchatApi extends runtime.BaseAPI {
}

/**
* Updates certain fields of the user Sends events: - user.presence.changed - user.updated
* Updates certain fields of the user Sends events: - user.updated - user.presence.changed
* Partially update user
*/
async updateUsersPartial(requestParameters: UpdateUsersPartialOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UpdateUsersResponse> {
Expand Down
Loading
Loading