diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index 4a705bb5..0c591743 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -1,7 +1,11 @@
-name: Run unit tests
-on: [push]
+name: Run tests on PR to main
+on:
+ pull_request:
+ branches:
+ - main
+
jobs:
- test:
+ run-tests:
runs-on: ubuntu-latest
steps:
- name: Check out code
@@ -36,13 +40,4 @@ jobs:
- name: Run tests
run: npm test
- - name: Create Pull Request
- if: success() && github.ref != 'refs/heads/main'
- run: |
- gh pr create \
- -B main \
- -H ${{ github.ref_name }} \
- --title "Merge ${{ github.ref_name }} into main" \
- --body "Created by Github action after successful tests"
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+
diff --git a/CHANGELOG.md b/CHANGELOG.md
index ad34aa15..11998708 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,7 +1,5 @@
# Changelog
All changes to this project will be documented in this file.
-## [1.0.9] - 2025-01-15
-- Update new sdk name
## [1.0.8] - 2025-01-15
- Update sdk api live stream
diff --git a/README.md b/README.md
index 43740582..579ae080 100644
--- a/README.md
+++ b/README.md
@@ -74,202 +74,217 @@ import StreamClient from "@aiozstream/nodejs-client";
Method | Description | HTTP request
------------- | ------------- | -------------
-[**create()**](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/api/ApiKeyApi.md#create) | Create API key | **POST** `/api_keys`
-[**update()**](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/api/ApiKeyApi.md#update) | Rename api key | **PATCH** `/api_keys/{id}`
-[**delete()**](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/api/ApiKeyApi.md#delete) | Delete API key | **DELETE** `/api_keys/{id}`
-[**list()**](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/api/ApiKeyApi.md#list) | Get list API keys | **GET** `/api_keys`
+[**create()**](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/api/ApiKeyApi.md#create) | Create API key | **POST** `/api_keys`
+[**update()**](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/api/ApiKeyApi.md#update) | Rename api key | **PATCH** `/api_keys/{id}`
+[**delete()**](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/api/ApiKeyApi.md#delete) | Delete API key | **DELETE** `/api_keys/{id}`
+[**list()**](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/api/ApiKeyApi.md#list) | Get list API keys | **GET** `/api_keys`
#### LiveStreamApi
Method | Description | HTTP request
------------- | ------------- | -------------
-[**createLiveStreamKey()**](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/api/LiveStreamApi.md#createLiveStreamKey) | Create live stream key | **POST** `/live_streams`
-[**createStreaming()**](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/api/LiveStreamApi.md#createStreaming) | Create a new live stream video | **POST** `/live_streams/{id}/streamings`
-[**deleteLiveStreamKey()**](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/api/LiveStreamApi.md#deleteLiveStreamKey) | Delete live stream key | **DELETE** `/live_streams/{id}`
-[**deleteStreaming()**](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/api/LiveStreamApi.md#deleteStreaming) | Delete live stream video | **DELETE** `/live_streams/{id}/streamings/{stream_id}`
-[**getLiveStreamKey()**](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/api/LiveStreamApi.md#getLiveStreamKey) | Get live stream key | **GET** `/live_streams/{id}`
-[**getLiveStreamKeys()**](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/api/LiveStreamApi.md#getLiveStreamKeys) | Get live stream key list | **GET** `/live_streams`
-[**getLiveStreamPlayerInfo()**](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/api/LiveStreamApi.md#getLiveStreamPlayerInfo) | Get live stream video public | **GET** `/live_streams/player/{id}/videos`
-[**getLiveStreamVideo()**](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/api/LiveStreamApi.md#getLiveStreamVideo) | Get live stream video | **GET** `/live_streams/{id}/videos`
-[**getLiveStreamVideos()**](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/api/LiveStreamApi.md#getLiveStreamVideos) | Get live stream videos | **POST** `/live_streams/{id}/videos`
-[**getStreaming()**](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/api/LiveStreamApi.md#getStreaming) | Get live stream video streaming | **GET** `/live_streams/{id}/streamings/{stream_id}`
-[**getStreamings()**](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/api/LiveStreamApi.md#getStreamings) | Get live stream video streamings | **GET** `/live_streams/{id}/streamings`
-[**updateLiveStreamKey()**](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/api/LiveStreamApi.md#updateLiveStreamKey) | Update live stream key | **PUT** `/live_streams/{id}`
-[**updateLiveStreamVideo()**](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/api/LiveStreamApi.md#updateLiveStreamVideo) | Update live stream video | **PUT** `/live_streams/{id}/streamings`
+[**addMulticast()**](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/api/LiveStreamApi.md#addMulticast) | Add live stream multicast | **POST** `/live_streams/multicast/{stream_key}`
+[**createLiveStreamKey()**](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/api/LiveStreamApi.md#createLiveStreamKey) | Create live stream key | **POST** `/live_streams`
+[**createStreaming()**](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/api/LiveStreamApi.md#createStreaming) | Create a new live stream media | **POST** `/live_streams/{id}/streamings`
+[**deleteLiveStreamKey()**](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/api/LiveStreamApi.md#deleteLiveStreamKey) | Delete live stream key | **DELETE** `/live_streams/{id}`
+[**deleteMulticast()**](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/api/LiveStreamApi.md#deleteMulticast) | Delete live stream multicast | **DELETE** `/live_streams/multicast/{stream_key}`
+[**deleteStreaming()**](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/api/LiveStreamApi.md#deleteStreaming) | Delete live stream video | **DELETE** `/live_streams/{id}/streamings/{stream_id}`
+[**getLiveStreamKey()**](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/api/LiveStreamApi.md#getLiveStreamKey) | Get live stream key | **GET** `/live_streams/{id}`
+[**getLiveStreamKeys()**](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/api/LiveStreamApi.md#getLiveStreamKeys) | Get live stream key list | **GET** `/live_streams`
+[**getLiveStreamPlayerInfo()**](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/api/LiveStreamApi.md#getLiveStreamPlayerInfo) | Get live stream video public | **GET** `/live_streams/player/{id}/videos`
+[**getLiveStreamVideo()**](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/api/LiveStreamApi.md#getLiveStreamVideo) | Get live stream video | **GET** `/live_streams/{id}/video`
+[**getMedias()**](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/api/LiveStreamApi.md#getMedias) | Get live stream media | **POST** `/live_streams/{id}/videos`
+[**getMulticastByStreamKey()**](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/api/LiveStreamApi.md#getMulticastByStreamKey) | Get live stream multicast by stream key | **GET** `/live_streams/multicast/{stream_key}`
+[**getStatisticByStreamMediaId()**](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/api/LiveStreamApi.md#getStatisticByStreamMediaId) | Get live stream statistic by stream media id | **GET** `/live_streams/statistic/{stream_media_id}`
+[**getStreaming()**](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/api/LiveStreamApi.md#getStreaming) | Get live stream media streaming | **GET** `/live_streams/{id}/streamings/{stream_id}`
+[**getStreamings()**](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/api/LiveStreamApi.md#getStreamings) | Get live stream media streamings | **GET** `/live_streams/{id}/streamings`
+[**updateLiveStreamKey()**](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/api/LiveStreamApi.md#updateLiveStreamKey) | Update live stream key | **PUT** `/live_streams/{id}`
+[**updateMedia()**](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/api/LiveStreamApi.md#updateMedia) | Update live stream media | **PUT** `/live_streams/{id}/streamings`
#### PlayersApi
Method | Description | HTTP request
------------- | ------------- | -------------
-[**create()**](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/api/PlayersApi.md#create) | Create a player theme | **POST** `/players`
-[**get()**](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/api/PlayersApi.md#get) | Get a player theme by ID | **GET** `/players/{id}`
-[**update()**](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/api/PlayersApi.md#update) | Update a player theme by ID | **PATCH** `/players/{id}`
-[**delete()**](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/api/PlayersApi.md#delete) | Delete a player theme by ID | **DELETE** `/players/{id}`
-[**list()**](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/api/PlayersApi.md#list) | List all player themes | **GET** `/players`
-[**uploadLogo()**](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/api/PlayersApi.md#uploadLogo) | Upload a logo for a player theme by ID | **POST** `/players/{id}/logo`
-[**deleteLogo()**](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/api/PlayersApi.md#deleteLogo) | Delete a logo for a player theme by ID | **DELETE** `/players/{id}/logo`
-[**addPlayer()**](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/api/PlayersApi.md#addPlayer) | Add a player theme to a video | **POST** `/players/add-player`
-[**removePlayer()**](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/api/PlayersApi.md#removePlayer) | Remove a player theme from a video | **POST** `/players/remove-player`
+[**create()**](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/api/PlayersApi.md#create) | Create a player theme | **POST** `/players`
+[**get()**](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/api/PlayersApi.md#get) | Get a player theme by ID | **GET** `/players/{id}`
+[**update()**](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/api/PlayersApi.md#update) | Update a player theme by ID | **PATCH** `/players/{id}`
+[**delete()**](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/api/PlayersApi.md#delete) | Delete a player theme by ID | **DELETE** `/players/{id}`
+[**list()**](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/api/PlayersApi.md#list) | List all player themes | **GET** `/players`
+[**uploadLogo()**](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/api/PlayersApi.md#uploadLogo) | Upload a logo for a player theme by ID | **POST** `/players/{id}/logo`
+[**deleteLogo()**](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/api/PlayersApi.md#deleteLogo) | Delete a logo for a player theme by ID | **DELETE** `/players/{id}/logo`
+[**addPlayer()**](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/api/PlayersApi.md#addPlayer) | Add a player theme to a video | **POST** `/players/add-player`
+[**removePlayer()**](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/api/PlayersApi.md#removePlayer) | Remove a player theme from a video | **POST** `/players/remove-player`
#### PlaylistApi
Method | Description | HTTP request
------------- | ------------- | -------------
-[**addVideoToPlaylist()**](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/api/PlaylistApi.md#addVideoToPlaylist) | Add a video to a playlist | **POST** `/playlists/{id}/items`
-[**createPlaylist()**](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/api/PlaylistApi.md#createPlaylist) | Create a playlist | **POST** `/playlists/create`
-[**deletePlaylistById()**](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/api/PlaylistApi.md#deletePlaylistById) | Delete a playlist by ID | **DELETE** `/playlists/{id}`
-[**deletePlaylistThumbnail()**](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/api/PlaylistApi.md#deletePlaylistThumbnail) | Delete a playlist thumbnail | **DELETE** `/playlists/{id}/thumbnail`
-[**getPlaylistById()**](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/api/PlaylistApi.md#getPlaylistById) | Get playlist by ID | **GET** `/playlists/{id}`
-[**getPlaylistPublicInfo()**](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/api/PlaylistApi.md#getPlaylistPublicInfo) | Get a playlist public | **GET** `/playlists/{id}/player.json`
-[**getPlaylists()**](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/api/PlaylistApi.md#getPlaylists) | Get user's playlists | **POST** `/playlists`
-[**moveVideoInPlaylist()**](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/api/PlaylistApi.md#moveVideoInPlaylist) | Move a video in a playlist | **PUT** `/playlists/{id}/items`
-[**removeVideoFromPlaylist()**](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/api/PlaylistApi.md#removeVideoFromPlaylist) | Remove a video from a playlist | **DELETE** `/playlists/{id}/items/{item_id}`
-[**updatePlaylist()**](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/api/PlaylistApi.md#updatePlaylist) | Update a playlist | **PATCH** `/playlists/{id}`
+[**addVideoToPlaylist()**](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/api/PlaylistApi.md#addVideoToPlaylist) | Add a video to a playlist | **POST** `/playlists/{id}/items`
+[**createPlaylist()**](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/api/PlaylistApi.md#createPlaylist) | Create a playlist | **POST** `/playlists/create`
+[**deletePlaylistById()**](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/api/PlaylistApi.md#deletePlaylistById) | Delete a playlist by ID | **DELETE** `/playlists/{id}`
+[**deletePlaylistThumbnail()**](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/api/PlaylistApi.md#deletePlaylistThumbnail) | Delete a playlist thumbnail | **DELETE** `/playlists/{id}/thumbnail`
+[**getPlaylistById()**](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/api/PlaylistApi.md#getPlaylistById) | Get playlist by ID | **GET** `/playlists/{id}`
+[**getPlaylistPublicInfo()**](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/api/PlaylistApi.md#getPlaylistPublicInfo) | Get a playlist public | **GET** `/playlists/{id}/player.json`
+[**getPlaylists()**](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/api/PlaylistApi.md#getPlaylists) | Get user's playlists | **POST** `/playlists`
+[**moveVideoInPlaylist()**](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/api/PlaylistApi.md#moveVideoInPlaylist) | Move a video in a playlist | **PUT** `/playlists/{id}/items`
+[**removeVideoFromPlaylist()**](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/api/PlaylistApi.md#removeVideoFromPlaylist) | Remove a video from a playlist | **DELETE** `/playlists/{id}/items/{item_id}`
+[**updatePlaylist()**](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/api/PlaylistApi.md#updatePlaylist) | Update a playlist | **PATCH** `/playlists/{id}`
#### VideoApi
Method | Description | HTTP request
------------- | ------------- | -------------
-[**create()**](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/api/VideoApi.md#create) | Create video object | **POST** `/videos/create`
-[**update()**](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/api/VideoApi.md#update) | update video info | **PATCH** `/videos/{id}`
-[**delete()**](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/api/VideoApi.md#delete) | Delete video | **DELETE** `/videos/{id}`
-[**uploadThumbnail()**](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/api/VideoApi.md#uploadThumbnail) | Upload video thumbnail | **POST** `/videos/{id}/thumbnail`
-[**createCaption()**](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/api/VideoApi.md#createCaption) | Create a new video caption | **POST** `/videos/{id}/captions/{lan}`
-[**deleteCaption()**](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/api/VideoApi.md#deleteCaption) | Delete a video caption | **DELETE** `/videos/{id}/captions/{lan}`
-[**getCaptions()**](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/api/VideoApi.md#getCaptions) | Get video captions | **GET** `/videos/{id}/captions`
-[**getCost()**](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/api/VideoApi.md#getCost) | get video transcoding cost | **GET** `/videos/cost`
-[**getDetail()**](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/api/VideoApi.md#getDetail) | get video detail | **GET** `/videos/{id}`
-[**getVideoList()**](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/api/VideoApi.md#getVideoList) | Get user videos list | **POST** `/videos`
-[**getVideoPlayerInfo()**](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/api/VideoApi.md#getVideoPlayerInfo) | Get video player info | **GET** `/videos/{id}/player.json`
-[**setDefaultCaption()**](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/api/VideoApi.md#setDefaultCaption) | Set default caption | **PATCH** `/videos/{id}/captions/{lan}`
-[**uploadPart()**](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/api/VideoApi.md#uploadPart) | Upload part of video | **POST** `/videos/{id}/part`
-[**uploadVideoComplete()**](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/api/VideoApi.md#uploadVideoComplete) | Get upload video when complete | **GET** `/videos/{id}/complete`
+[**create()**](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/api/VideoApi.md#create) | Create video object | **POST** `/videos/create`
+[**update()**](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/api/VideoApi.md#update) | update video info | **PATCH** `/videos/{id}`
+[**delete()**](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/api/VideoApi.md#delete) | Delete video | **DELETE** `/videos/{id}`
+[**uploadThumbnail()**](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/api/VideoApi.md#uploadThumbnail) | Upload video thumbnail | **POST** `/videos/{id}/thumbnail`
+[**deleteThumbnail()**](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/api/VideoApi.md#deleteThumbnail) | Delete video thumbnail | **DELETE** `/videos/{id}/thumbnail`
+[**createCaption()**](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/api/VideoApi.md#createCaption) | Create a new video caption | **POST** `/videos/{id}/captions/{lan}`
+[**deleteCaption()**](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/api/VideoApi.md#deleteCaption) | Delete a video caption | **DELETE** `/videos/{id}/captions/{lan}`
+[**getCaptions()**](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/api/VideoApi.md#getCaptions) | Get video captions | **GET** `/videos/{id}/captions`
+[**getCost()**](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/api/VideoApi.md#getCost) | get video transcoding cost | **GET** `/videos/cost`
+[**getDetail()**](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/api/VideoApi.md#getDetail) | get video detail | **GET** `/videos/{id}`
+[**getVideoList()**](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/api/VideoApi.md#getVideoList) | Get user videos list | **POST** `/videos`
+[**getVideoPlayerInfo()**](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/api/VideoApi.md#getVideoPlayerInfo) | Get video object | **GET** `/videos/{id}/player.json`
+[**setDefaultCaption()**](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/api/VideoApi.md#setDefaultCaption) | Set default caption | **PATCH** `/videos/{id}/captions/{lan}`
+[**uploadPart()**](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/api/VideoApi.md#uploadPart) | Upload part of video | **POST** `/videos/{id}/part`
+[**uploadVideoComplete()**](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/api/VideoApi.md#uploadVideoComplete) | Get upload video when complete | **GET** `/videos/{id}/complete`
#### VideoChapterApi
Method | Description | HTTP request
------------- | ------------- | -------------
-[**create()**](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/api/VideoChapterApi.md#create) | Create a video chapter | **POST** `/videos/{id}/chapters/{lan}`
-[**get()**](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/api/VideoChapterApi.md#get) | Get video chapters | **GET** `/videos/{id}/chapters`
-[**delete()**](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/api/VideoChapterApi.md#delete) | Delete a video chapter | **DELETE** `/videos/{id}/chapters/{lan}`
+[**create()**](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/api/VideoChapterApi.md#create) | Create a video chapter | **POST** `/videos/{id}/chapters/{lan}`
+[**get()**](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/api/VideoChapterApi.md#get) | Get video chapters | **GET** `/videos/{id}/chapters`
+[**delete()**](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/api/VideoChapterApi.md#delete) | Delete a video chapter | **DELETE** `/videos/{id}/chapters/{lan}`
#### WebhookApi
Method | Description | HTTP request
------------- | ------------- | -------------
-[**create()**](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/api/WebhookApi.md#create) | Create webhook | **POST** `/webhooks`
-[**get()**](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/api/WebhookApi.md#get) | Get user's webhook by id | **GET** `/webhooks/{id}`
-[**update()**](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/api/WebhookApi.md#update) | Update event webhook | **PATCH** `/webhooks/{id}`
-[**delete()**](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/api/WebhookApi.md#delete) | Delete webhook | **DELETE** `/webhooks/{id}`
-[**list()**](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/api/WebhookApi.md#list) | Get list webhooks | **GET** `/webhooks`
-[**check()**](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/api/WebhookApi.md#check) | Check webhook by id | **POST** `/webhooks/check/{id}`
+[**create()**](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/api/WebhookApi.md#create) | Create webhook | **POST** `/webhooks`
+[**get()**](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/api/WebhookApi.md#get) | Get user's webhook by id | **GET** `/webhooks/{id}`
+[**update()**](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/api/WebhookApi.md#update) | Update event webhook | **PATCH** `/webhooks/{id}`
+[**delete()**](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/api/WebhookApi.md#delete) | Delete webhook | **DELETE** `/webhooks/{id}`
+[**list()**](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/api/WebhookApi.md#list) | Get list webhooks | **GET** `/webhooks`
+[**check()**](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/api/WebhookApi.md#check) | Check webhook by id | **POST** `/webhooks/check/{id}`
### Models
- - [AddPlayerThemesToVideoRequest](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/model/AddPlayerThemesToVideoRequest.md)
- - [AddVideoToPlaylistRequest](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/model/AddVideoToPlaylistRequest.md)
- - [ApiKey](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/model/ApiKey.md)
- - [Asset](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/model/Asset.md)
- - [Controls](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/model/Controls.md)
- - [CreateApiKeyData](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/model/CreateApiKeyData.md)
- - [CreateApiKeyRequest](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/model/CreateApiKeyRequest.md)
- - [CreateApiKeyResponse](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/model/CreateApiKeyResponse.md)
- - [CreateLiveStreamKeyRequest](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/model/CreateLiveStreamKeyRequest.md)
- - [CreateLiveStreamKeyResponse](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/model/CreateLiveStreamKeyResponse.md)
- - [CreatePlayerThemeRequest](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/model/CreatePlayerThemeRequest.md)
- - [CreatePlayerThemesData](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/model/CreatePlayerThemesData.md)
- - [CreatePlayerThemesResponse](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/model/CreatePlayerThemesResponse.md)
- - [CreatePlaylistData](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/model/CreatePlaylistData.md)
- - [CreatePlaylistRequest](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/model/CreatePlaylistRequest.md)
- - [CreatePlaylistResponse](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/model/CreatePlaylistResponse.md)
- - [CreateStreamingRequest](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/model/CreateStreamingRequest.md)
- - [CreateStreamingResponse](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/model/CreateStreamingResponse.md)
- - [CreateVideoCaptionData](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/model/CreateVideoCaptionData.md)
- - [CreateVideoCaptionResponse](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/model/CreateVideoCaptionResponse.md)
- - [CreateVideoChapterData](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/model/CreateVideoChapterData.md)
- - [CreateVideoChapterResponse](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/model/CreateVideoChapterResponse.md)
- - [CreateVideoRequest](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/model/CreateVideoRequest.md)
- - [CreateVideoResponse](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/model/CreateVideoResponse.md)
- - [CreateWebhookData](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/model/CreateWebhookData.md)
- - [CreateWebhookRequest](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/model/CreateWebhookRequest.md)
- - [CreateWebhookResponse](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/model/CreateWebhookResponse.md)
- - [GetApiKeysData](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/model/GetApiKeysData.md)
- - [GetApiKeysResponse](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/model/GetApiKeysResponse.md)
- - [GetLiveStreamKeyData](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/model/GetLiveStreamKeyData.md)
- - [GetLiveStreamKeyResponse](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/model/GetLiveStreamKeyResponse.md)
- - [GetLiveStreamKeysListData](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/model/GetLiveStreamKeysListData.md)
- - [GetLiveStreamKeysListResponse](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/model/GetLiveStreamKeysListResponse.md)
- - [GetLiveStreamVideoPublicResponse](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/model/GetLiveStreamVideoPublicResponse.md)
- - [GetLiveStreamVideoResponse](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/model/GetLiveStreamVideoResponse.md)
- - [GetLiveStreamVideosRequest](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/model/GetLiveStreamVideosRequest.md)
- - [GetLiveStreamVideosResponse](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/model/GetLiveStreamVideosResponse.md)
- - [GetPlayerThemeByIdData](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/model/GetPlayerThemeByIdData.md)
- - [GetPlayerThemeByIdResponse](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/model/GetPlayerThemeByIdResponse.md)
- - [GetPlayerThemeData](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/model/GetPlayerThemeData.md)
- - [GetPlayerThemeResponse](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/model/GetPlayerThemeResponse.md)
- - [GetPlaylistByIdData](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/model/GetPlaylistByIdData.md)
- - [GetPlaylistByIdResponse](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/model/GetPlaylistByIdResponse.md)
- - [GetPlaylistListData](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/model/GetPlaylistListData.md)
- - [GetPlaylistListRequest](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/model/GetPlaylistListRequest.md)
- - [GetPlaylistListResponse](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/model/GetPlaylistListResponse.md)
- - [GetStreamingResponse](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/model/GetStreamingResponse.md)
- - [GetStreamingsResponse](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/model/GetStreamingsResponse.md)
- - [GetTranscodeCostData](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/model/GetTranscodeCostData.md)
- - [GetTranscodeCostResponse](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/model/GetTranscodeCostResponse.md)
- - [GetUserWebhookData](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/model/GetUserWebhookData.md)
- - [GetUserWebhookResponse](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/model/GetUserWebhookResponse.md)
- - [GetVideoCaptionsData](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/model/GetVideoCaptionsData.md)
- - [GetVideoCaptionsResponse](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/model/GetVideoCaptionsResponse.md)
- - [GetVideoChaptersData](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/model/GetVideoChaptersData.md)
- - [GetVideoChaptersResponse](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/model/GetVideoChaptersResponse.md)
- - [GetVideoDetailResponse](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/model/GetVideoDetailResponse.md)
- - [GetVideoListData](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/model/GetVideoListData.md)
- - [GetVideoListRequest](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/model/GetVideoListRequest.md)
- - [GetVideoListResponse](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/model/GetVideoListResponse.md)
- - [GetVideoPlayerInfoResponse](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/model/GetVideoPlayerInfoResponse.md)
- - [GetWebhooksListData](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/model/GetWebhooksListData.md)
- - [GetWebhooksListResponse](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/model/GetWebhooksListResponse.md)
- - [LiveStreamAssets](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/model/LiveStreamAssets.md)
- - [LiveStreamKeyData](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/model/LiveStreamKeyData.md)
- - [LiveStreamVideoData](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/model/LiveStreamVideoData.md)
- - [LiveStreamVideoResponse](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/model/LiveStreamVideoResponse.md)
- - [LiveStreamVideosResponse](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/model/LiveStreamVideosResponse.md)
- - [Metadata](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/model/Metadata.md)
- - [MoveVideoInPlaylistRequest](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/model/MoveVideoInPlaylistRequest.md)
- - [PlayerTheme](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/model/PlayerTheme.md)
- - [Playlist](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/model/Playlist.md)
- - [PlaylistItem](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/model/PlaylistItem.md)
- - [PlaylistItemVideo](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/model/PlaylistItemVideo.md)
- - [PublicPlaylistObject](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/model/PublicPlaylistObject.md)
- - [QualityObject](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/model/QualityObject.md)
- - [RemovePlayerThemesFromVideoRequest](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/model/RemovePlayerThemesFromVideoRequest.md)
- - [RenameAPIKeyRequest](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/model/RenameAPIKeyRequest.md)
- - [ResponseError](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/model/ResponseError.md)
- - [ResponseSuccess](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/model/ResponseSuccess.md)
- - [Theme](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/model/Theme.md)
- - [UpdateLiveStreamKeyData](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/model/UpdateLiveStreamKeyData.md)
- - [UpdateLiveStreamKeyRequest](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/model/UpdateLiveStreamKeyRequest.md)
- - [UpdateLiveStreamKeyResponse](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/model/UpdateLiveStreamKeyResponse.md)
- - [UpdateLiveStreamVideoRequest](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/model/UpdateLiveStreamVideoRequest.md)
- - [UpdatePlayerThemeRequest](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/model/UpdatePlayerThemeRequest.md)
- - [UpdatePlayerThemeResponse](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/model/UpdatePlayerThemeResponse.md)
- - [UpdateVideoInfoRequest](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/model/UpdateVideoInfoRequest.md)
- - [UpdateWebhookRequest](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/model/UpdateWebhookRequest.md)
- - [UploadLogoByIdResponse](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/model/UploadLogoByIdResponse.md)
- - [Video](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/model/Video.md)
- - [VideoAssets](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/model/VideoAssets.md)
- - [VideoCaption](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/model/VideoCaption.md)
- - [VideoChapter](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/model/VideoChapter.md)
- - [VideoWatermark](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/model/VideoWatermark.md)
- - [Webhook](https://github.com/AIOZNetwork/aioz-stream-nodejs-client/blob/main/docs/model/Webhook.md)
+ - [AddPlayerThemesToVideoRequest](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/model/AddPlayerThemesToVideoRequest.md)
+ - [AddVideoToPlaylistRequest](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/model/AddVideoToPlaylistRequest.md)
+ - [ApiKey](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/model/ApiKey.md)
+ - [Asset](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/model/Asset.md)
+ - [AudioConfig](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/model/AudioConfig.md)
+ - [Controls](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/model/Controls.md)
+ - [CreateApiKeyData](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/model/CreateApiKeyData.md)
+ - [CreateApiKeyRequest](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/model/CreateApiKeyRequest.md)
+ - [CreateApiKeyResponse](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/model/CreateApiKeyResponse.md)
+ - [CreateLiveStreamKeyRequest](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/model/CreateLiveStreamKeyRequest.md)
+ - [CreateLiveStreamKeyResponse](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/model/CreateLiveStreamKeyResponse.md)
+ - [CreateMediaRequest](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/model/CreateMediaRequest.md)
+ - [CreateMediaResponse](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/model/CreateMediaResponse.md)
+ - [CreatePlayerThemeRequest](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/model/CreatePlayerThemeRequest.md)
+ - [CreatePlayerThemesData](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/model/CreatePlayerThemesData.md)
+ - [CreatePlayerThemesResponse](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/model/CreatePlayerThemesResponse.md)
+ - [CreatePlaylistData](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/model/CreatePlaylistData.md)
+ - [CreatePlaylistRequest](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/model/CreatePlaylistRequest.md)
+ - [CreatePlaylistResponse](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/model/CreatePlaylistResponse.md)
+ - [CreateStreamingRequest](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/model/CreateStreamingRequest.md)
+ - [CreateStreamingResponse](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/model/CreateStreamingResponse.md)
+ - [CreateVideoCaptionData](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/model/CreateVideoCaptionData.md)
+ - [CreateVideoCaptionResponse](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/model/CreateVideoCaptionResponse.md)
+ - [CreateVideoChapterData](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/model/CreateVideoChapterData.md)
+ - [CreateVideoChapterResponse](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/model/CreateVideoChapterResponse.md)
+ - [CreateWebhookData](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/model/CreateWebhookData.md)
+ - [CreateWebhookRequest](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/model/CreateWebhookRequest.md)
+ - [CreateWebhookResponse](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/model/CreateWebhookResponse.md)
+ - [GetApiKeysData](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/model/GetApiKeysData.md)
+ - [GetApiKeysResponse](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/model/GetApiKeysResponse.md)
+ - [GetLiveStreamKeyData](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/model/GetLiveStreamKeyData.md)
+ - [GetLiveStreamKeyResponse](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/model/GetLiveStreamKeyResponse.md)
+ - [GetLiveStreamKeysListData](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/model/GetLiveStreamKeysListData.md)
+ - [GetLiveStreamKeysListResponse](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/model/GetLiveStreamKeysListResponse.md)
+ - [GetLiveStreamMediasRequest](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/model/GetLiveStreamMediasRequest.md)
+ - [GetLiveStreamMediasResponse](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/model/GetLiveStreamMediasResponse.md)
+ - [GetLiveStreamMulticastResponse](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/model/GetLiveStreamMulticastResponse.md)
+ - [GetLiveStreamStatisticResponse](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/model/GetLiveStreamStatisticResponse.md)
+ - [GetLiveStreamVideoPublicResponse](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/model/GetLiveStreamVideoPublicResponse.md)
+ - [GetLiveStreamVideoResponse](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/model/GetLiveStreamVideoResponse.md)
+ - [GetPlayerThemeByIdData](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/model/GetPlayerThemeByIdData.md)
+ - [GetPlayerThemeByIdResponse](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/model/GetPlayerThemeByIdResponse.md)
+ - [GetPlayerThemeData](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/model/GetPlayerThemeData.md)
+ - [GetPlayerThemeResponse](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/model/GetPlayerThemeResponse.md)
+ - [GetPlaylistByIdData](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/model/GetPlaylistByIdData.md)
+ - [GetPlaylistByIdResponse](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/model/GetPlaylistByIdResponse.md)
+ - [GetPlaylistListData](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/model/GetPlaylistListData.md)
+ - [GetPlaylistListRequest](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/model/GetPlaylistListRequest.md)
+ - [GetPlaylistListResponse](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/model/GetPlaylistListResponse.md)
+ - [GetStreamingResponse](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/model/GetStreamingResponse.md)
+ - [GetStreamingsResponse](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/model/GetStreamingsResponse.md)
+ - [GetTranscodeCostData](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/model/GetTranscodeCostData.md)
+ - [GetTranscodeCostResponse](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/model/GetTranscodeCostResponse.md)
+ - [GetUserWebhookData](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/model/GetUserWebhookData.md)
+ - [GetUserWebhookResponse](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/model/GetUserWebhookResponse.md)
+ - [GetVideoCaptionsData](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/model/GetVideoCaptionsData.md)
+ - [GetVideoCaptionsResponse](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/model/GetVideoCaptionsResponse.md)
+ - [GetVideoChaptersData](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/model/GetVideoChaptersData.md)
+ - [GetVideoChaptersResponse](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/model/GetVideoChaptersResponse.md)
+ - [GetVideoDetailResponse](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/model/GetVideoDetailResponse.md)
+ - [GetVideoListData](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/model/GetVideoListData.md)
+ - [GetVideoListRequest](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/model/GetVideoListRequest.md)
+ - [GetVideoListResponse](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/model/GetVideoListResponse.md)
+ - [GetVideoPlayerInfoResponse](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/model/GetVideoPlayerInfoResponse.md)
+ - [GetWebhooksListData](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/model/GetWebhooksListData.md)
+ - [GetWebhooksListResponse](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/model/GetWebhooksListResponse.md)
+ - [LiveStreamAssets](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/model/LiveStreamAssets.md)
+ - [LiveStreamKeyData](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/model/LiveStreamKeyData.md)
+ - [LiveStreamMediaData](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/model/LiveStreamMediaData.md)
+ - [LiveStreamMediaResponse](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/model/LiveStreamMediaResponse.md)
+ - [LiveStreamMediasResponse](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/model/LiveStreamMediasResponse.md)
+ - [LiveStreamMulticast](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/model/LiveStreamMulticast.md)
+ - [LiveStreamStatisticResp](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/model/LiveStreamStatisticResp.md)
+ - [Media](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/model/Media.md)
+ - [Metadata](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/model/Metadata.md)
+ - [MoveVideoInPlaylistRequest](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/model/MoveVideoInPlaylistRequest.md)
+ - [PlayerTheme](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/model/PlayerTheme.md)
+ - [Playlist](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/model/Playlist.md)
+ - [PlaylistItem](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/model/PlaylistItem.md)
+ - [PlaylistItemMedia](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/model/PlaylistItemMedia.md)
+ - [PublicPlaylistObject](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/model/PublicPlaylistObject.md)
+ - [QualityConfig](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/model/QualityConfig.md)
+ - [QualityObject](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/model/QualityObject.md)
+ - [RemovePlayerThemesFromVideoRequest](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/model/RemovePlayerThemesFromVideoRequest.md)
+ - [RenameAPIKeyRequest](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/model/RenameAPIKeyRequest.md)
+ - [RequestCreateCaption](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/model/RequestCreateCaption.md)
+ - [ResponseError](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/model/ResponseError.md)
+ - [ResponseSuccess](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/model/ResponseSuccess.md)
+ - [Theme](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/model/Theme.md)
+ - [UpdateLiveStreamKeyData](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/model/UpdateLiveStreamKeyData.md)
+ - [UpdateLiveStreamKeyRequest](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/model/UpdateLiveStreamKeyRequest.md)
+ - [UpdateLiveStreamKeyResponse](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/model/UpdateLiveStreamKeyResponse.md)
+ - [UpdateLiveStreamMediaRequest](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/model/UpdateLiveStreamMediaRequest.md)
+ - [UpdatePlayerThemeRequest](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/model/UpdatePlayerThemeRequest.md)
+ - [UpdatePlayerThemeResponse](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/model/UpdatePlayerThemeResponse.md)
+ - [UpdateVideoInfoRequest](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/model/UpdateVideoInfoRequest.md)
+ - [UpdateWebhookRequest](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/model/UpdateWebhookRequest.md)
+ - [UploadLogoByIdResponse](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/model/UploadLogoByIdResponse.md)
+ - [UpsertLiveStreamMulticastInput](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/model/UpsertLiveStreamMulticastInput.md)
+ - [User](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/model/User.md)
+ - [VideoAssets](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/model/VideoAssets.md)
+ - [VideoCaption](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/model/VideoCaption.md)
+ - [VideoChapter](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/model/VideoChapter.md)
+ - [VideoConfig](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/model/VideoConfig.md)
+ - [VideoWatermark](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/model/VideoWatermark.md)
+ - [Webhook](https://github.com/AIOZNetwork/aiozstream-nodejs-client/blob/main/docs/model/Webhook.md)
### Rate Limiting
diff --git a/docs/api/ApiKeyApi.md b/docs/api/ApiKeyApi.md
index 3d333503..78e1b9f8 100644
--- a/docs/api/ApiKeyApi.md
+++ b/docs/api/ApiKeyApi.md
@@ -20,7 +20,7 @@ This endpoint enables you to create a new API key for a specific project.
| Name | Type | Required | Description |
| ------------- | ------------- | ------------- | ------------- |
- | **request** | [**CreateApiKeyRequest**](../model/CreateApiKeyRequest.md)| **yes**| API key's data |
+ | **request** | [**CreateApiKeyRequest**](../model/CreateApiKeyRequest.md)| **yes**| api key's data |
### Return type
diff --git a/docs/api/LiveStreamApi.md b/docs/api/LiveStreamApi.md
index dedb9475..1bc8e2c6 100644
--- a/docs/api/LiveStreamApi.md
+++ b/docs/api/LiveStreamApi.md
@@ -4,21 +4,48 @@ All URIs are relative to *http://localhost/api*
| Method | Description | HTTP request |
| ------------- | ------------- | ------------- |
+| [**addMulticast()**](LiveStreamApi.md#addMulticast) | Add live stream multicast | **POST** /live_streams/multicast/{stream_key} |
| [**createLiveStreamKey()**](LiveStreamApi.md#createLiveStreamKey) | Create live stream key | **POST** /live_streams |
-| [**createStreaming()**](LiveStreamApi.md#createStreaming) | Create a new live stream video | **POST** /live_streams/{id}/streamings |
+| [**createStreaming()**](LiveStreamApi.md#createStreaming) | Create a new live stream media | **POST** /live_streams/{id}/streamings |
| [**deleteLiveStreamKey()**](LiveStreamApi.md#deleteLiveStreamKey) | Delete live stream key | **DELETE** /live_streams/{id} |
+| [**deleteMulticast()**](LiveStreamApi.md#deleteMulticast) | Delete live stream multicast | **DELETE** /live_streams/multicast/{stream_key} |
| [**deleteStreaming()**](LiveStreamApi.md#deleteStreaming) | Delete live stream video | **DELETE** /live_streams/{id}/streamings/{stream_id} |
| [**getLiveStreamKey()**](LiveStreamApi.md#getLiveStreamKey) | Get live stream key | **GET** /live_streams/{id} |
| [**getLiveStreamKeys()**](LiveStreamApi.md#getLiveStreamKeys) | Get live stream key list | **GET** /live_streams |
| [**getLiveStreamPlayerInfo()**](LiveStreamApi.md#getLiveStreamPlayerInfo) | Get live stream video public | **GET** /live_streams/player/{id}/videos |
-| [**getLiveStreamVideo()**](LiveStreamApi.md#getLiveStreamVideo) | Get live stream video | **GET** /live_streams/{id}/videos |
-| [**getLiveStreamVideos()**](LiveStreamApi.md#getLiveStreamVideos) | Get live stream videos | **POST** /live_streams/{id}/videos |
-| [**getStreaming()**](LiveStreamApi.md#getStreaming) | Get live stream video streaming | **GET** /live_streams/{id}/streamings/{stream_id} |
-| [**getStreamings()**](LiveStreamApi.md#getStreamings) | Get live stream video streamings | **GET** /live_streams/{id}/streamings |
+| [**getLiveStreamVideo()**](LiveStreamApi.md#getLiveStreamVideo) | Get live stream video | **GET** /live_streams/{id}/video |
+| [**getMedias()**](LiveStreamApi.md#getMedias) | Get live stream media | **POST** /live_streams/{id}/videos |
+| [**getMulticastByStreamKey()**](LiveStreamApi.md#getMulticastByStreamKey) | Get live stream multicast by stream key | **GET** /live_streams/multicast/{stream_key} |
+| [**getStatisticByStreamMediaId()**](LiveStreamApi.md#getStatisticByStreamMediaId) | Get live stream statistic by stream media id | **GET** /live_streams/statistic/{stream_media_id} |
+| [**getStreaming()**](LiveStreamApi.md#getStreaming) | Get live stream media streaming | **GET** /live_streams/{id}/streamings/{stream_id} |
+| [**getStreamings()**](LiveStreamApi.md#getStreamings) | Get live stream media streamings | **GET** /live_streams/{id}/streamings |
| [**updateLiveStreamKey()**](LiveStreamApi.md#updateLiveStreamKey) | Update live stream key | **PUT** /live_streams/{id} |
-| [**updateLiveStreamVideo()**](LiveStreamApi.md#updateLiveStreamVideo) | Update live stream video | **PUT** /live_streams/{id}/streamings |
+| [**updateMedia()**](LiveStreamApi.md#updateMedia) | Update live stream media | **PUT** /live_streams/{id}/streamings |
+
+## **`addMulticast()` - Add live stream multicast**
+
+
+Add live stream multicast
+
+### Parameters
+
+| Name | Type | Required | Description |
+| ------------- | ------------- | ------------- | ------------- |
+ | **streamKey** | **string**| **yes**| Live stream key. Use uuid |
+ | **data** | [**UpsertLiveStreamMulticastInput**](../model/UpsertLiveStreamMulticastInput.md)| **yes**| data |
+
+
+### Return type
+
+Promise<[**GetLiveStreamMulticastResponse**](../model/GetLiveStreamMulticastResponse.md)>.
+
+
+
+
+---
+
## **`createLiveStreamKey()` - Create live stream key**
@@ -42,10 +69,10 @@ Promise<[**CreateLiveStreamKeyResponse**](../model/CreateLiveStreamKeyResponse.m
---
-## **`createStreaming()` - Create a new live stream video**
+## **`createStreaming()` - Create a new live stream media**
-Creates a new live stream video with the provided details
+Creates a new live stream media with the provided details
### Parameters
@@ -84,6 +111,28 @@ Promise<[**ResponseSuccess**](../model/ResponseSuccess.md)>.
+---
+
+
+## **`deleteMulticast()` - Delete live stream multicast**
+
+
+Delete live stream multicast
+
+### Parameters
+
+| Name | Type | Required | Description |
+| ------------- | ------------- | ------------- | ------------- |
+ | **streamKey** | **string**| **yes**| Live stream key. UUID string format |
+
+
+### Return type
+
+Promise<[**ResponseSuccess**](../model/ResponseSuccess.md)>.
+
+
+
+
---
@@ -201,23 +250,67 @@ Promise<[**GetLiveStreamVideoResponse**](../model/GetLiveStreamVideoResponse.md)
---
-
-## **`getLiveStreamVideos()` - Get live stream videos**
+
+## **`getMedias()` - Get live stream media**
-Get live stream videos for a specific live stream key
+Get live stream media for a specific live stream key
### Parameters
| Name | Type | Required | Description |
| ------------- | ------------- | ------------- | ------------- |
| **id** | **string**| **yes**| Live stream key ID |
- | **data** | [**GetLiveStreamVideosRequest**](../model/GetLiveStreamVideosRequest.md)| **yes**| data |
+ | **data** | [**GetLiveStreamMediasRequest**](../model/GetLiveStreamMediasRequest.md)| **yes**| data |
+
+
+### Return type
+
+Promise<[**GetLiveStreamMediasResponse**](../model/GetLiveStreamMediasResponse.md)>.
+
+
+
+
+---
+
+
+## **`getMulticastByStreamKey()` - Get live stream multicast by stream key**
+
+
+Get live stream multicast by stream key
+
+### Parameters
+
+| Name | Type | Required | Description |
+| ------------- | ------------- | ------------- | ------------- |
+ | **streamKey** | **string**| **yes**| Live stream key. UUID string format |
+
+
+### Return type
+
+Promise<[**GetLiveStreamMulticastResponse**](../model/GetLiveStreamMulticastResponse.md)>.
+
+
+
+
+---
+
+
+## **`getStatisticByStreamMediaId()` - Get live stream statistic by stream media id**
+
+
+Get live stream statistic by stream media id
+
+### Parameters
+
+| Name | Type | Required | Description |
+| ------------- | ------------- | ------------- | ------------- |
+ | **streamMediaId** | **string**| **yes**| Live stream media ID |
### Return type
-Promise<[**GetLiveStreamVideosResponse**](../model/GetLiveStreamVideosResponse.md)>.
+Promise<[**GetLiveStreamStatisticResponse**](../model/GetLiveStreamStatisticResponse.md)>.
@@ -225,10 +318,10 @@ Promise<[**GetLiveStreamVideosResponse**](../model/GetLiveStreamVideosResponse.m
---
-## **`getStreaming()` - Get live stream video streaming**
+## **`getStreaming()` - Get live stream media streaming**
-Get live stream video streaming for a specific live stream key
+Get live stream media streaming for a specific live stream key
### Parameters
@@ -248,10 +341,10 @@ Promise<[**GetStreamingResponse**](../model/GetStreamingResponse.md)>.
---
-## **`getStreamings()` - Get live stream video streamings**
+## **`getStreamings()` - Get live stream media streamings**
-Get live stream video streamings for a specific live stream key
+Get live stream media streamings for a specific live stream key
### Parameters
@@ -292,18 +385,18 @@ Promise<[**UpdateLiveStreamKeyResponse**](../model/UpdateLiveStreamKeyResponse.m
---
-
-## **`updateLiveStreamVideo()` - Update live stream video**
+
+## **`updateMedia()` - Update live stream media**
-Update live stream video for a specific live stream key
+Update live stream media. You can only update while live streaming.
### Parameters
| Name | Type | Required | Description |
| ------------- | ------------- | ------------- | ------------- |
| **id** | **string**| **yes**| Live stream key ID |
- | **data** | [**UpdateLiveStreamVideoRequest**](../model/UpdateLiveStreamVideoRequest.md)| **yes**| data |
+ | **data** | [**UpdateLiveStreamMediaRequest**](../model/UpdateLiveStreamMediaRequest.md)| **yes**| data |
### Return type
diff --git a/docs/api/VideoApi.md b/docs/api/VideoApi.md
index a2eff59a..860609c5 100644
--- a/docs/api/VideoApi.md
+++ b/docs/api/VideoApi.md
@@ -8,13 +8,14 @@ All URIs are relative to *http://localhost/api*
| [**update()**](VideoApi.md#update) | update video info | **PATCH** /videos/{id} |
| [**delete()**](VideoApi.md#delete) | Delete video | **DELETE** /videos/{id} |
| [**uploadThumbnail()**](VideoApi.md#uploadThumbnail) | Upload video thumbnail | **POST** /videos/{id}/thumbnail |
+| [**deleteThumbnail()**](VideoApi.md#deleteThumbnail) | Delete video thumbnail | **DELETE** /videos/{id}/thumbnail |
| [**createCaption()**](VideoApi.md#createCaption) | Create a new video caption | **POST** /videos/{id}/captions/{lan} |
| [**deleteCaption()**](VideoApi.md#deleteCaption) | Delete a video caption | **DELETE** /videos/{id}/captions/{lan} |
| [**getCaptions()**](VideoApi.md#getCaptions) | Get video captions | **GET** /videos/{id}/captions |
| [**getCost()**](VideoApi.md#getCost) | get video transcoding cost | **GET** /videos/cost |
| [**getDetail()**](VideoApi.md#getDetail) | get video detail | **GET** /videos/{id} |
| [**getVideoList()**](VideoApi.md#getVideoList) | Get user videos list | **POST** /videos |
-| [**getVideoPlayerInfo()**](VideoApi.md#getVideoPlayerInfo) | Get video player info | **GET** /videos/{id}/player.json |
+| [**getVideoPlayerInfo()**](VideoApi.md#getVideoPlayerInfo) | Get video object | **GET** /videos/{id}/player.json |
| [**setDefaultCaption()**](VideoApi.md#setDefaultCaption) | Set default caption | **PATCH** /videos/{id}/captions/{lan} |
| [**uploadPart()**](VideoApi.md#uploadPart) | Upload part of video | **POST** /videos/{id}/part |
| [**uploadVideoComplete()**](VideoApi.md#uploadVideoComplete) | Get upload video when complete | **GET** /videos/{id}/complete |
@@ -30,12 +31,12 @@ Create a video object
| Name | Type | Required | Description |
| ------------- | ------------- | ------------- | ------------- |
- | **request** | [**CreateVideoRequest**](../model/CreateVideoRequest.md)| **yes**| video's info |
+ | **request** | [**CreateMediaRequest**](../model/CreateMediaRequest.md)| **yes**| video's info |
### Return type
-Promise<[**CreateVideoResponse**](../model/CreateVideoResponse.md)>.
+Promise<[**CreateMediaResponse**](../model/CreateMediaResponse.md)>.
@@ -104,6 +105,26 @@ Promise<[**ResponseSuccess**](../model/ResponseSuccess.md)>.
+---
+
+
+## **`deleteThumbnail()` - Delete video thumbnail**
+
+
+### Parameters
+
+| Name | Type | Required | Description |
+| ------------- | ------------- | ------------- | ------------- |
+ | **id** | **string**| **yes**| video's id |
+
+
+### Return type
+
+Promise<[**ResponseSuccess**](../model/ResponseSuccess.md)>.
+
+
+
+
---
@@ -245,10 +266,10 @@ Promise<[**GetVideoListResponse**](../model/GetVideoListResponse.md)>.
---
-## **`getVideoPlayerInfo()` - Get video player info**
+## **`getVideoPlayerInfo()` - Get video object**
-Get video player info
+Get video object
### Parameters
@@ -301,7 +322,7 @@ Upload part of video
| Name | Type | Required | Description |
| ------------- | ------------- | ------------- | ------------- |
| **id** | **string**| **yes**| video's id |
- | **file** | **string \| Readable \| Buffer**| **yes**| File video to be uploaded |
+ | **file** | **string \| Readable \| Buffer**| **yes**| File media to be uploaded |
| **hash** | **string**| no| Md5 hash of part |
| **index** | **string**| no| Index of the part |
| **progressListener** | **(event: UploadProgressEvent) => void \| undefined** | no | Optional upload progress listener |
diff --git a/docs/api/WebhookApi.md b/docs/api/WebhookApi.md
index a23908d5..7dd0bcaa 100644
--- a/docs/api/WebhookApi.md
+++ b/docs/api/WebhookApi.md
@@ -67,7 +67,7 @@ This endpoint will update the indicated webhook.
| Name | Type | Required | Description |
| ------------- | ------------- | ------------- | ------------- |
| **id** | **string**| **yes**| webhook's id |
- | **request** | [**UpdateWebhookRequest**](../model/UpdateWebhookRequest.md)| **yes**| Update Webhook input, events example: video.encoding.quality.completed |
+ | **request** | [**UpdateWebhookRequest**](../model/UpdateWebhookRequest.md)| **yes**| Update Webhook input, events example: media.encoding.quality.completed |
### Return type
diff --git a/docs/model/ApiKey.md b/docs/model/ApiKey.md
index 539790b6..26c5ff9a 100644
--- a/docs/model/ApiKey.md
+++ b/docs/model/ApiKey.md
@@ -16,6 +16,7 @@ Name | Type | Description | Notes
**ttl** | **string** | | [optional]
**type** | **string** | | [optional]
**updatedAt** | **string** | | [optional]
+**user** | [**User**](User.md) | | [optional]
diff --git a/docs/model/Asset.md b/docs/model/Asset.md
index 6453a436..fb872482 100644
--- a/docs/model/Asset.md
+++ b/docs/model/Asset.md
@@ -5,7 +5,6 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**logo** | **string** | | [optional]
**logoImageLink** | **string** | | [optional]
**logoLink** | **string** | | [optional]
diff --git a/docs/model/AudioConfig.md b/docs/model/AudioConfig.md
new file mode 100644
index 00000000..12880a9b
--- /dev/null
+++ b/docs/model/AudioConfig.md
@@ -0,0 +1,16 @@
+
+# AudioConfig
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**bitrate** | **number** | | [optional]
+**channels** | **string** | | [optional]
+**codec** | **string** | | [optional]
+**index** | **number** | | [optional]
+**language** | **string** | | [optional]
+**sampleRate** | **number** | | [optional]
+
+
+
diff --git a/docs/model/CreateMediaRequest.md b/docs/model/CreateMediaRequest.md
new file mode 100644
index 00000000..9c677e7b
--- /dev/null
+++ b/docs/model/CreateMediaRequest.md
@@ -0,0 +1,18 @@
+
+# CreateMediaRequest
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**description** | **string** | | [optional]
+**isPublic** | **boolean** | | [optional]
+**metadata** | [**Array<Metadata>**](Metadata.md) | | [optional]
+**qualities** | [**Array<QualityConfig>**](QualityConfig.md) | | [optional]
+**segmentDuration** | **number** | | [optional]
+**tags** | **Array<string>** | | [optional]
+**title** | **string** | | [optional]
+**watermark** | [**VideoWatermark**](VideoWatermark.md) | | [optional]
+
+
+
diff --git a/docs/model/CreateVideoResponse.md b/docs/model/CreateMediaResponse.md
similarity index 68%
rename from docs/model/CreateVideoResponse.md
rename to docs/model/CreateMediaResponse.md
index 7075322e..afd085de 100644
--- a/docs/model/CreateVideoResponse.md
+++ b/docs/model/CreateMediaResponse.md
@@ -1,11 +1,11 @@
-# CreateVideoResponse
+# CreateMediaResponse
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**data** | [**Video**](Video.md) | | [optional]
+**data** | [**Media**](Media.md) | | [optional]
**status** | **string** | | [optional]
diff --git a/docs/model/CreateStreamingRequest.md b/docs/model/CreateStreamingRequest.md
index 2bc1ae68..d9c36ed8 100644
--- a/docs/model/CreateStreamingRequest.md
+++ b/docs/model/CreateStreamingRequest.md
@@ -5,7 +5,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**qualities** | **Array<string>** | Qualities of the video (default: 1080p, 720p, 360p, allow:2160p, 1440p, 1080p, 720p, 360p, 240p, 144p) | [optional]
+**qualities** | [**Array<QualityConfig>**](QualityConfig.md) | Qualities of the media (default: 1080p, 720p, 360p, allow:2160p, 1440p, 1080p, 720p, 360p, 240p, 144p) | [optional]
**save** | **boolean** | | [optional]
**title** | **string** | | [optional]
diff --git a/docs/model/CreateStreamingResponse.md b/docs/model/CreateStreamingResponse.md
index e1d0b622..e0672ee3 100644
--- a/docs/model/CreateStreamingResponse.md
+++ b/docs/model/CreateStreamingResponse.md
@@ -5,7 +5,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**data** | [**LiveStreamVideoData**](LiveStreamVideoData.md) | | [optional]
+**data** | [**LiveStreamMediaData**](LiveStreamMediaData.md) | | [optional]
**status** | **string** | | [optional]
diff --git a/docs/model/CreateVideoRequest.md b/docs/model/CreateVideoRequest.md
deleted file mode 100644
index 12c7faa7..00000000
--- a/docs/model/CreateVideoRequest.md
+++ /dev/null
@@ -1,17 +0,0 @@
-
-# CreateVideoRequest
-
-## Properties
-
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**description** | **string** | Description of the video | [optional]
-**isPublic** | **boolean** | // Is panoramic video IsPanoramic *bool `json:\"is_panoramic\" form:\"is_panoramic\"` Is public video | [optional]
-**metadata** | [**Array<Metadata>**](Metadata.md) | Metadata of the video (key-value pair, max: 50 items, key max length: 255, value max length: 255) | [optional]
-**qualities** | **Array<string>** | Qualities of the video (default: 1080p, 720p, 360p, allow:2160p, 1440p, 1080p, 720p, 360p, 240p, 144p) | [optional]
-**tags** | **Array<string>** | Tags of the video (max: 50 items, max length: 255) | [optional]
-**title** | **string** | Title of the video | [optional]
-**watermark** | [**VideoWatermark**](VideoWatermark.md) | Video thumbnailConfig | [optional]
-
-
-
diff --git a/docs/model/CreateWebhookRequest.md b/docs/model/CreateWebhookRequest.md
index e7d8dc58..d836ac45 100644
--- a/docs/model/CreateWebhookRequest.md
+++ b/docs/model/CreateWebhookRequest.md
@@ -5,10 +5,12 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
+**encodingFailed** | **boolean** | | [optional]
**encodingFinished** | **boolean** | | [optional]
**encodingStarted** | **boolean** | | [optional]
**fileReceived** | **boolean** | | [optional]
**name** | **string** | | [optional]
+**partialFinished** | **boolean** | | [optional]
**url** | **string** | | [optional]
diff --git a/docs/model/GetLiveStreamVideosRequest.md b/docs/model/GetLiveStreamMediasRequest.md
similarity index 84%
rename from docs/model/GetLiveStreamVideosRequest.md
rename to docs/model/GetLiveStreamMediasRequest.md
index cebbca5f..e44f3c29 100644
--- a/docs/model/GetLiveStreamVideosRequest.md
+++ b/docs/model/GetLiveStreamMediasRequest.md
@@ -1,5 +1,5 @@
-# GetLiveStreamVideosRequest
+# GetLiveStreamMediasRequest
## Properties
@@ -7,12 +7,12 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**limit** | **number** | | [optional]
**liveStreamKeyId** | **string** | | [optional]
+**mediaStatus** | **string** | | [optional]
**offset** | **number** | | [optional]
**orderBy** | **string** | | [optional]
**search** | **string** | | [optional]
**sortBy** | **string** | | [optional]
**status** | **string** | | [optional]
-**videoStatus** | **string** | | [optional]
diff --git a/docs/model/GetLiveStreamVideosResponse.md b/docs/model/GetLiveStreamMediasResponse.md
similarity index 65%
rename from docs/model/GetLiveStreamVideosResponse.md
rename to docs/model/GetLiveStreamMediasResponse.md
index cf57abde..e9f942cb 100644
--- a/docs/model/GetLiveStreamVideosResponse.md
+++ b/docs/model/GetLiveStreamMediasResponse.md
@@ -1,11 +1,11 @@
-# GetLiveStreamVideosResponse
+# GetLiveStreamMediasResponse
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**data** | [**LiveStreamVideosResponse**](LiveStreamVideosResponse.md) | | [optional]
+**data** | [**LiveStreamMediasResponse**](LiveStreamMediasResponse.md) | | [optional]
**status** | **string** | | [optional]
diff --git a/docs/model/GetLiveStreamMulticastResponse.md b/docs/model/GetLiveStreamMulticastResponse.md
new file mode 100644
index 00000000..aef4667f
--- /dev/null
+++ b/docs/model/GetLiveStreamMulticastResponse.md
@@ -0,0 +1,12 @@
+
+# GetLiveStreamMulticastResponse
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**data** | [**LiveStreamMulticast**](LiveStreamMulticast.md) | | [optional]
+**status** | **string** | | [optional]
+
+
+
diff --git a/docs/model/GetLiveStreamStatisticResponse.md b/docs/model/GetLiveStreamStatisticResponse.md
new file mode 100644
index 00000000..5d266a03
--- /dev/null
+++ b/docs/model/GetLiveStreamStatisticResponse.md
@@ -0,0 +1,12 @@
+
+# GetLiveStreamStatisticResponse
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**data** | [**LiveStreamStatisticResp**](LiveStreamStatisticResp.md) | | [optional]
+**status** | **string** | | [optional]
+
+
+
diff --git a/docs/model/GetLiveStreamVideoPublicResponse.md b/docs/model/GetLiveStreamVideoPublicResponse.md
index c16abb26..d004c495 100644
--- a/docs/model/GetLiveStreamVideoPublicResponse.md
+++ b/docs/model/GetLiveStreamVideoPublicResponse.md
@@ -5,7 +5,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**data** | [**LiveStreamVideoResponse**](LiveStreamVideoResponse.md) | | [optional]
+**data** | [**LiveStreamMediaResponse**](LiveStreamMediaResponse.md) | | [optional]
**status** | **string** | | [optional]
diff --git a/docs/model/GetLiveStreamVideoResponse.md b/docs/model/GetLiveStreamVideoResponse.md
index 22239b3d..7cc90740 100644
--- a/docs/model/GetLiveStreamVideoResponse.md
+++ b/docs/model/GetLiveStreamVideoResponse.md
@@ -5,7 +5,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**data** | [**LiveStreamVideoResponse**](LiveStreamVideoResponse.md) | | [optional]
+**data** | [**LiveStreamMediaResponse**](LiveStreamMediaResponse.md) | | [optional]
**status** | **string** | | [optional]
diff --git a/docs/model/GetStreamingResponse.md b/docs/model/GetStreamingResponse.md
index 09f8dc2c..49c5206c 100644
--- a/docs/model/GetStreamingResponse.md
+++ b/docs/model/GetStreamingResponse.md
@@ -5,7 +5,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**data** | [**LiveStreamVideoResponse**](LiveStreamVideoResponse.md) | | [optional]
+**data** | [**LiveStreamMediaResponse**](LiveStreamMediaResponse.md) | | [optional]
**status** | **string** | | [optional]
diff --git a/docs/model/GetStreamingsResponse.md b/docs/model/GetStreamingsResponse.md
index aac44975..241f79ac 100644
--- a/docs/model/GetStreamingsResponse.md
+++ b/docs/model/GetStreamingsResponse.md
@@ -5,7 +5,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**data** | [**LiveStreamVideosResponse**](LiveStreamVideosResponse.md) | | [optional]
+**data** | [**LiveStreamMediasResponse**](LiveStreamMediasResponse.md) | | [optional]
**status** | **string** | | [optional]
diff --git a/docs/model/GetVideoDetailResponse.md b/docs/model/GetVideoDetailResponse.md
index b43715a6..3dad0552 100644
--- a/docs/model/GetVideoDetailResponse.md
+++ b/docs/model/GetVideoDetailResponse.md
@@ -5,7 +5,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**data** | [**Video**](Video.md) | | [optional]
+**data** | [**Media**](Media.md) | | [optional]
**status** | **string** | | [optional]
diff --git a/docs/model/GetVideoListData.md b/docs/model/GetVideoListData.md
index 149a2fb9..ffedbf13 100644
--- a/docs/model/GetVideoListData.md
+++ b/docs/model/GetVideoListData.md
@@ -6,7 +6,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**total** | **number** | | [optional]
-**videos** | [**Array<Video>**](Video.md) | | [optional]
+**videos** | [**Array<Media>**](Media.md) | | [optional]
diff --git a/docs/model/LiveStreamVideoData.md b/docs/model/LiveStreamMediaData.md
similarity index 89%
rename from docs/model/LiveStreamVideoData.md
rename to docs/model/LiveStreamMediaData.md
index 81661518..d5ee92d0 100644
--- a/docs/model/LiveStreamVideoData.md
+++ b/docs/model/LiveStreamMediaData.md
@@ -1,5 +1,5 @@
-# LiveStreamVideoData
+# LiveStreamMediaData
## Properties
@@ -10,13 +10,13 @@ Name | Type | Description | Notes
**duration** | **number** | | [optional]
**id** | **string** | | [optional]
**liveStreamKeyId** | **string** | | [optional]
+**media** | [**Media**](Media.md) | | [optional]
**qualities** | **Array<string>** | | [optional]
**save** | **boolean** | | [optional]
**status** | **string** | | [optional]
**title** | **string** | | [optional]
**updatedAt** | **string** | | [optional]
**userId** | **string** | | [optional]
-**video** | [**Video**](Video.md) | | [optional]
diff --git a/docs/model/LiveStreamVideoResponse.md b/docs/model/LiveStreamMediaResponse.md
similarity index 91%
rename from docs/model/LiveStreamVideoResponse.md
rename to docs/model/LiveStreamMediaResponse.md
index d80425f4..97f4fbe1 100644
--- a/docs/model/LiveStreamVideoResponse.md
+++ b/docs/model/LiveStreamMediaResponse.md
@@ -1,5 +1,5 @@
-# LiveStreamVideoResponse
+# LiveStreamMediaResponse
## Properties
@@ -20,7 +20,7 @@ Name | Type | Description | Notes
**totalView** | **number** | | [optional]
**updatedAt** | **string** | | [optional]
**userId** | **string** | | [optional]
-**video** | [**Video**](Video.md) | | [optional]
+**video** | [**Media**](Media.md) | | [optional]
diff --git a/docs/model/LiveStreamVideosResponse.md b/docs/model/LiveStreamMediasResponse.md
similarity index 54%
rename from docs/model/LiveStreamVideosResponse.md
rename to docs/model/LiveStreamMediasResponse.md
index c35e1c6e..5b062ed1 100644
--- a/docs/model/LiveStreamVideosResponse.md
+++ b/docs/model/LiveStreamMediasResponse.md
@@ -1,12 +1,12 @@
-# LiveStreamVideosResponse
+# LiveStreamMediasResponse
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**total** | **number** | | [optional]
-**videos** | [**Array<LiveStreamVideoResponse>**](LiveStreamVideoResponse.md) | | [optional]
+**videos** | [**Array<LiveStreamMediaResponse>**](LiveStreamMediaResponse.md) | | [optional]
diff --git a/docs/model/LiveStreamMulticast.md b/docs/model/LiveStreamMulticast.md
new file mode 100644
index 00000000..afc6e050
--- /dev/null
+++ b/docs/model/LiveStreamMulticast.md
@@ -0,0 +1,14 @@
+
+# LiveStreamMulticast
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**id** | **string** | | [optional]
+**liveStreamKeyId** | **string** | | [optional]
+**liveStreamMulticastUrls** | **Array<string>** | | [optional]
+**userId** | **string** | | [optional]
+
+
+
diff --git a/docs/model/LiveStreamStatisticResp.md b/docs/model/LiveStreamStatisticResp.md
new file mode 100644
index 00000000..c6595c35
--- /dev/null
+++ b/docs/model/LiveStreamStatisticResp.md
@@ -0,0 +1,19 @@
+
+# LiveStreamStatisticResp
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**bitrateIn** | **number** | | [optional]
+**bitrateOut** | **number** | | [optional]
+**currentView** | **number** | | [optional]
+**dataTransferred** | **number** | | [optional]
+**fpsIn** | **number** | | [optional]
+**fpsOut** | **number** | | [optional]
+**id** | **string** | | [optional]
+**liveStreamMediaId** | **string** | | [optional]
+**totalView** | **number** | | [optional]
+
+
+
diff --git a/docs/model/Video.md b/docs/model/Media.md
similarity index 99%
rename from docs/model/Video.md
rename to docs/model/Media.md
index 9da75761..4f14b812 100644
--- a/docs/model/Video.md
+++ b/docs/model/Media.md
@@ -1,5 +1,5 @@
-# Video
+# Media
## Properties
diff --git a/docs/model/MoveVideoInPlaylistRequest.md b/docs/model/MoveVideoInPlaylistRequest.md
index bd623eb0..647d47c5 100644
--- a/docs/model/MoveVideoInPlaylistRequest.md
+++ b/docs/model/MoveVideoInPlaylistRequest.md
@@ -5,9 +5,9 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**currentId** | **string** | | [optional]
-**nextId** | **string** | | [optional]
-**previousId** | **string** | | [optional]
+**currentId** | **string** | CurrentId is the UUID of the playlist item (media) to be moved | [optional]
+**nextId** | **string** | NextId is the UUID of the playlist item that should come after the moved item | [optional]
+**previousId** | **string** | PreviousId is the UUID of the playlist item that should come before the moved item | [optional]
diff --git a/docs/model/Playlist.md b/docs/model/Playlist.md
index 43b3dd72..dcc63bbf 100644
--- a/docs/model/Playlist.md
+++ b/docs/model/Playlist.md
@@ -15,7 +15,6 @@ Name | Type | Description | Notes
**playlistUrl** | **string** | | [optional]
**size** | **number** | | [optional]
**tags** | **string** | | [optional]
-**thumbnailId** | **string** | | [optional]
**thumbnailUrl** | **string** | | [optional]
**updatedAt** | **string** | | [optional]
**userId** | **string** | | [optional]
diff --git a/docs/model/PlaylistItem.md b/docs/model/PlaylistItem.md
index 57d104c1..d4b76818 100644
--- a/docs/model/PlaylistItem.md
+++ b/docs/model/PlaylistItem.md
@@ -11,7 +11,7 @@ Name | Type | Description | Notes
**playlistId** | **string** | | [optional]
**previousId** | **string** | | [optional]
**updatedAt** | **string** | | [optional]
-**video** | [**PlaylistItemVideo**](PlaylistItemVideo.md) | | [optional]
+**video** | [**PlaylistItemMedia**](PlaylistItemMedia.md) | | [optional]
**videoId** | **string** | | [optional]
diff --git a/docs/model/PlaylistItemVideo.md b/docs/model/PlaylistItemMedia.md
similarity index 95%
rename from docs/model/PlaylistItemVideo.md
rename to docs/model/PlaylistItemMedia.md
index 8f517af0..0901fa32 100644
--- a/docs/model/PlaylistItemVideo.md
+++ b/docs/model/PlaylistItemMedia.md
@@ -1,5 +1,5 @@
-# PlaylistItemVideo
+# PlaylistItemMedia
## Properties
diff --git a/docs/model/QualityConfig.md b/docs/model/QualityConfig.md
new file mode 100644
index 00000000..8121ec96
--- /dev/null
+++ b/docs/model/QualityConfig.md
@@ -0,0 +1,15 @@
+
+# QualityConfig
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**audioConfig** | [**AudioConfig**](AudioConfig.md) | | [optional]
+**containerType** | **string** | | [optional]
+**resolution** | **string** | | [optional]
+**type** | **string** | | [optional]
+**videoConfig** | [**VideoConfig**](VideoConfig.md) | | [optional]
+
+
+
diff --git a/docs/model/QualityObject.md b/docs/model/QualityObject.md
index f55afa2e..ad0156c0 100644
--- a/docs/model/QualityObject.md
+++ b/docs/model/QualityObject.md
@@ -5,9 +5,13 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
+**audioBitrate** | **number** | | [optional]
+**audioCodec** | **string** | | [optional]
**name** | **string** | | [optional]
**status** | **string** | | [optional]
**type** | **string** | | [optional]
+**videoBitrate** | **number** | | [optional]
+**videoCodec** | **string** | | [optional]
diff --git a/docs/model/RequestCreateCaption.md b/docs/model/RequestCreateCaption.md
new file mode 100644
index 00000000..e1442439
--- /dev/null
+++ b/docs/model/RequestCreateCaption.md
@@ -0,0 +1,11 @@
+
+# RequestCreateCaption
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**description** | **string** | | [optional]
+
+
+
diff --git a/docs/model/UpdateLiveStreamVideoRequest.md b/docs/model/UpdateLiveStreamMediaRequest.md
similarity index 86%
rename from docs/model/UpdateLiveStreamVideoRequest.md
rename to docs/model/UpdateLiveStreamMediaRequest.md
index abac68b5..4124cb6a 100644
--- a/docs/model/UpdateLiveStreamVideoRequest.md
+++ b/docs/model/UpdateLiveStreamMediaRequest.md
@@ -1,5 +1,5 @@
-# UpdateLiveStreamVideoRequest
+# UpdateLiveStreamMediaRequest
## Properties
diff --git a/docs/model/UpdateVideoInfoRequest.md b/docs/model/UpdateVideoInfoRequest.md
index da776ffa..4ed247b4 100644
--- a/docs/model/UpdateVideoInfoRequest.md
+++ b/docs/model/UpdateVideoInfoRequest.md
@@ -5,12 +5,12 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**description** | **string** | Description of the video | [optional]
-**isPublic** | **boolean** | Video's publish status | [optional]
-**metadata** | [**Array<Metadata>**](Metadata.md) | Video's metadata | [optional]
-**playerId** | **string** | Video player 's id | [optional]
-**tags** | **Array<string>** | Video's tags | [optional]
-**title** | **string** | Title of the video | [optional]
+**description** | **string** | Description of the media | [optional]
+**isPublic** | **boolean** | Media's publish status | [optional]
+**metadata** | [**Array<Metadata>**](Metadata.md) | Media's metadata | [optional]
+**playerId** | **string** | Media player 's id | [optional]
+**tags** | **Array<string>** | Media's tags | [optional]
+**title** | **string** | Title of the media | [optional]
diff --git a/docs/model/UpdateWebhookRequest.md b/docs/model/UpdateWebhookRequest.md
index 3596ba0c..a21bf8ff 100644
--- a/docs/model/UpdateWebhookRequest.md
+++ b/docs/model/UpdateWebhookRequest.md
@@ -5,10 +5,12 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
+**encodingFailed** | **boolean** | | [optional]
**encodingFinished** | **boolean** | | [optional]
**encodingStarted** | **boolean** | | [optional]
**fileReceived** | **boolean** | | [optional]
**name** | **string** | | [optional]
+**partialFinished** | **boolean** | | [optional]
**url** | **string** | | [optional]
diff --git a/docs/model/UpsertLiveStreamMulticastInput.md b/docs/model/UpsertLiveStreamMulticastInput.md
new file mode 100644
index 00000000..005af2ab
--- /dev/null
+++ b/docs/model/UpsertLiveStreamMulticastInput.md
@@ -0,0 +1,11 @@
+
+# UpsertLiveStreamMulticastInput
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**multicastUrls** | **Array<string>** | | [optional]
+
+
+
diff --git a/docs/model/User.md b/docs/model/User.md
new file mode 100644
index 00000000..52e72f0a
--- /dev/null
+++ b/docs/model/User.md
@@ -0,0 +1,21 @@
+
+# User
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**balance** | **number** | | [optional]
+**createdAt** | **string** | | [optional]
+**debt** | **number** | | [optional]
+**email** | **string** | | [optional]
+**firstName** | **string** | | [optional]
+**id** | **string** | | [optional]
+**lastName** | **string** | | [optional]
+**mediaQualitiesConfig** | **string** | | [optional]
+**updatedAt** | **string** | | [optional]
+**walletAddress** | **string** | | [optional]
+**walletConnection** | **string** | | [optional]
+
+
+
diff --git a/docs/model/VideoAssets.md b/docs/model/VideoAssets.md
index 57cf8851..611548e4 100644
--- a/docs/model/VideoAssets.md
+++ b/docs/model/VideoAssets.md
@@ -5,10 +5,13 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
+**dashIframe** | **string** | | [optional]
+**dashPlayerUrl** | **string** | | [optional]
+**dashUrl** | **string** | | [optional]
+**hlsIframe** | **string** | | [optional]
+**hlsPlayerUrl** | **string** | | [optional]
**hlsUrl** | **string** | | [optional]
-**iframe** | **string** | | [optional]
**mp4Url** | **string** | | [optional]
-**playerUrl** | **string** | | [optional]
**sourceUrl** | **string** | | [optional]
**thumbnailUrl** | **string** | | [optional]
diff --git a/docs/model/VideoCaption.md b/docs/model/VideoCaption.md
index 5710c689..5877c6ae 100644
--- a/docs/model/VideoCaption.md
+++ b/docs/model/VideoCaption.md
@@ -5,8 +5,10 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
+**description** | **string** | | [optional]
**isDefault** | **boolean** | | [optional]
**language** | **string** | | [optional]
+**status** | **string** | | [optional]
**url** | **string** | | [optional]
diff --git a/docs/model/VideoConfig.md b/docs/model/VideoConfig.md
new file mode 100644
index 00000000..8b8d898a
--- /dev/null
+++ b/docs/model/VideoConfig.md
@@ -0,0 +1,13 @@
+
+# VideoConfig
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**bitrate** | **number** | | [optional]
+**codec** | **string** | | [optional]
+**index** | **number** | | [optional]
+
+
+
diff --git a/docs/model/Webhook.md b/docs/model/Webhook.md
index 5b6e1d70..a2dbbe66 100644
--- a/docs/model/Webhook.md
+++ b/docs/model/Webhook.md
@@ -6,12 +6,14 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**createdAt** | **string** | | [optional]
+**encodingFailed** | **boolean** | | [optional]
**encodingFinished** | **boolean** | | [optional]
**encodingStarted** | **boolean** | | [optional]
**fileReceived** | **boolean** | | [optional]
**id** | **string** | | [optional]
**lastTriggeredAt** | **string** | | [optional]
**name** | **string** | | [optional]
+**partialFinished** | **boolean** | | [optional]
**updatedAt** | **string** | | [optional]
**url** | **string** | | [optional]
**userId** | **string** | | [optional]
diff --git a/git_push.sh b/git_push.sh
old mode 100644
new mode 100755
diff --git a/package.json b/package.json
index 7b97c47e..42ab8ba3 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "@aiozstream/nodejs-client",
- "version": "1.0.9",
+ "version": "1.0.8",
"description": "AIOZ stream nodejs API client",
"keywords": [
"aioz",
@@ -10,13 +10,13 @@
"client",
"live stream"
],
- "homepage": "https://github.com/AIOZNetwork/aioz-stream-nodejs-client#readme",
- "bugs:": "https://github.com/AIOZNetwork/aioz-stream-nodejs-client/issues",
+ "homepage": "https://github.com/AIOZNetwork/aiozstream-nodejs-client#readme",
+ "bugs:": "https://github.com/AIOZNetwork/aiozstream-nodejs-client/issues",
"license": "MIT",
"author": "aioz ",
"repository": {
"type": "git",
- "url": "https://github.com/AIOZNetwork/aioz-stream-nodejs-client"
+ "url": "https://github.com/AIOZNetwork/aiozstream-nodejs-client"
},
"main": "lib/index.js",
"module": "lib/index.js",
diff --git a/src/HttpClient.ts b/src/HttpClient.ts
index d36cad7b..99bc81e0 100644
--- a/src/HttpClient.ts
+++ b/src/HttpClient.ts
@@ -23,22 +23,20 @@ export type QueryOptions = {
onUploadProgress?: (progressEvent: AxiosProgressEvent) => void;
};
-
export type ApiResponseHeaders = {
- server: string
- 'content-type': string
- 'transfer-encoding': string
- connection: string
- 'cache-control': string
- date: string
- 'x-ratelimit-remaining': string
- 'x-ratelimit-retry-after': string
- 'x-ratelimit-limit': string
- 'x-server': string
- 'access-control-allow-origin': string
- 'timing-allow-origin': string
-}
-
+ server: string;
+ 'content-type': string;
+ 'transfer-encoding': string;
+ connection: string;
+ 'cache-control': string;
+ date: string;
+ 'x-ratelimit-remaining': string;
+ 'x-ratelimit-retry-after': string;
+ 'x-ratelimit-limit': string;
+ 'x-server': string;
+ 'access-control-allow-origin': string;
+ 'timing-allow-origin': string;
+};
export default class HttpClient {
private publicKey?: string;
diff --git a/src/ObjectSerializer.ts b/src/ObjectSerializer.ts
index de726f18..b3248fa4 100644
--- a/src/ObjectSerializer.ts
+++ b/src/ObjectSerializer.ts
@@ -4,23 +4,25 @@
* Aioz Stream Service
*
* The version of the OpenAPI document: 1.0
- *
+ *
*
* NOTE: This class is auto generated.
* Do not edit the class manually.
*/
-
import AddPlayerThemesToVideoRequest from './model/AddPlayerThemesToVideoRequest';
import AddVideoToPlaylistRequest from './model/AddVideoToPlaylistRequest';
import ApiKey from './model/ApiKey';
import Asset from './model/Asset';
+import AudioConfig from './model/AudioConfig';
import Controls from './model/Controls';
import CreateApiKeyData from './model/CreateApiKeyData';
import CreateApiKeyRequest from './model/CreateApiKeyRequest';
import CreateApiKeyResponse from './model/CreateApiKeyResponse';
import CreateLiveStreamKeyRequest from './model/CreateLiveStreamKeyRequest';
import CreateLiveStreamKeyResponse from './model/CreateLiveStreamKeyResponse';
+import CreateMediaRequest from './model/CreateMediaRequest';
+import CreateMediaResponse from './model/CreateMediaResponse';
import CreatePlayerThemeRequest from './model/CreatePlayerThemeRequest';
import CreatePlayerThemesData from './model/CreatePlayerThemesData';
import CreatePlayerThemesResponse from './model/CreatePlayerThemesResponse';
@@ -33,8 +35,6 @@ import CreateVideoCaptionData from './model/CreateVideoCaptionData';
import CreateVideoCaptionResponse from './model/CreateVideoCaptionResponse';
import CreateVideoChapterData from './model/CreateVideoChapterData';
import CreateVideoChapterResponse from './model/CreateVideoChapterResponse';
-import CreateVideoRequest from './model/CreateVideoRequest';
-import CreateVideoResponse from './model/CreateVideoResponse';
import CreateWebhookData from './model/CreateWebhookData';
import CreateWebhookRequest from './model/CreateWebhookRequest';
import CreateWebhookResponse from './model/CreateWebhookResponse';
@@ -44,10 +44,12 @@ import GetLiveStreamKeyData from './model/GetLiveStreamKeyData';
import GetLiveStreamKeyResponse from './model/GetLiveStreamKeyResponse';
import GetLiveStreamKeysListData from './model/GetLiveStreamKeysListData';
import GetLiveStreamKeysListResponse from './model/GetLiveStreamKeysListResponse';
+import GetLiveStreamMediasRequest from './model/GetLiveStreamMediasRequest';
+import GetLiveStreamMediasResponse from './model/GetLiveStreamMediasResponse';
+import GetLiveStreamMulticastResponse from './model/GetLiveStreamMulticastResponse';
+import GetLiveStreamStatisticResponse from './model/GetLiveStreamStatisticResponse';
import GetLiveStreamVideoPublicResponse from './model/GetLiveStreamVideoPublicResponse';
import GetLiveStreamVideoResponse from './model/GetLiveStreamVideoResponse';
-import GetLiveStreamVideosRequest from './model/GetLiveStreamVideosRequest';
-import GetLiveStreamVideosResponse from './model/GetLiveStreamVideosResponse';
import GetPlayerThemeByIdData from './model/GetPlayerThemeByIdData';
import GetPlayerThemeByIdResponse from './model/GetPlayerThemeByIdResponse';
import GetPlayerThemeData from './model/GetPlayerThemeData';
@@ -76,48 +78,55 @@ import GetWebhooksListData from './model/GetWebhooksListData';
import GetWebhooksListResponse from './model/GetWebhooksListResponse';
import LiveStreamAssets from './model/LiveStreamAssets';
import LiveStreamKeyData from './model/LiveStreamKeyData';
-import LiveStreamVideoData from './model/LiveStreamVideoData';
-import LiveStreamVideoResponse from './model/LiveStreamVideoResponse';
-import LiveStreamVideosResponse from './model/LiveStreamVideosResponse';
+import LiveStreamMediaData from './model/LiveStreamMediaData';
+import LiveStreamMediaResponse from './model/LiveStreamMediaResponse';
+import LiveStreamMediasResponse from './model/LiveStreamMediasResponse';
+import LiveStreamMulticast from './model/LiveStreamMulticast';
+import LiveStreamStatisticResp from './model/LiveStreamStatisticResp';
+import Media from './model/Media';
import Metadata from './model/Metadata';
import MoveVideoInPlaylistRequest from './model/MoveVideoInPlaylistRequest';
import PlayerTheme from './model/PlayerTheme';
import Playlist from './model/Playlist';
import PlaylistItem from './model/PlaylistItem';
-import PlaylistItemVideo from './model/PlaylistItemVideo';
+import PlaylistItemMedia from './model/PlaylistItemMedia';
import PublicPlaylistObject from './model/PublicPlaylistObject';
+import QualityConfig from './model/QualityConfig';
import QualityObject from './model/QualityObject';
import RemovePlayerThemesFromVideoRequest from './model/RemovePlayerThemesFromVideoRequest';
import RenameAPIKeyRequest from './model/RenameAPIKeyRequest';
+import RequestCreateCaption from './model/RequestCreateCaption';
import ResponseError from './model/ResponseError';
import ResponseSuccess from './model/ResponseSuccess';
import Theme from './model/Theme';
import UpdateLiveStreamKeyData from './model/UpdateLiveStreamKeyData';
import UpdateLiveStreamKeyRequest from './model/UpdateLiveStreamKeyRequest';
import UpdateLiveStreamKeyResponse from './model/UpdateLiveStreamKeyResponse';
-import UpdateLiveStreamVideoRequest from './model/UpdateLiveStreamVideoRequest';
+import UpdateLiveStreamMediaRequest from './model/UpdateLiveStreamMediaRequest';
import UpdatePlayerThemeRequest from './model/UpdatePlayerThemeRequest';
import UpdatePlayerThemeResponse from './model/UpdatePlayerThemeResponse';
import UpdateVideoInfoRequest from './model/UpdateVideoInfoRequest';
import UpdateWebhookRequest from './model/UpdateWebhookRequest';
import UploadLogoByIdResponse from './model/UploadLogoByIdResponse';
-import Video from './model/Video';
+import UpsertLiveStreamMulticastInput from './model/UpsertLiveStreamMulticastInput';
+import User from './model/User';
import VideoAssets from './model/VideoAssets';
import VideoCaption from './model/VideoCaption';
import VideoChapter from './model/VideoChapter';
+import VideoConfig from './model/VideoConfig';
import VideoWatermark from './model/VideoWatermark';
import Webhook from './model/Webhook';
/* tslint:disable:no-unused-variable */
const primitives = [
- "string",
- "boolean",
- "double",
- "integer",
- "long",
- "float",
- "number",
- "any"
+ 'string',
+ 'boolean',
+ 'double',
+ 'integer',
+ 'long',
+ 'float',
+ 'number',
+ 'any',
];
export const COLLECTION_FORMATS = {
@@ -128,111 +137,120 @@ export const COLLECTION_FORMATS = {
};
const supportedMediaTypes: { [mediaType: string]: number } = {
- "application/json": Infinity,
- "application/octet-stream": 0
-}
+ 'application/json': Infinity,
+ 'application/octet-stream': 0,
+};
-const enumsMap: Set = new Set([
-]);
+const enumsMap: Set = new Set([]);
-let typeMap: {[index: string]: any} = {
- "AddPlayerThemesToVideoRequest": AddPlayerThemesToVideoRequest,
- "AddVideoToPlaylistRequest": AddVideoToPlaylistRequest,
- "ApiKey": ApiKey,
- "Asset": Asset,
- "Controls": Controls,
- "CreateApiKeyData": CreateApiKeyData,
- "CreateApiKeyRequest": CreateApiKeyRequest,
- "CreateApiKeyResponse": CreateApiKeyResponse,
- "CreateLiveStreamKeyRequest": CreateLiveStreamKeyRequest,
- "CreateLiveStreamKeyResponse": CreateLiveStreamKeyResponse,
- "CreatePlayerThemeRequest": CreatePlayerThemeRequest,
- "CreatePlayerThemesData": CreatePlayerThemesData,
- "CreatePlayerThemesResponse": CreatePlayerThemesResponse,
- "CreatePlaylistData": CreatePlaylistData,
- "CreatePlaylistRequest": CreatePlaylistRequest,
- "CreatePlaylistResponse": CreatePlaylistResponse,
- "CreateStreamingRequest": CreateStreamingRequest,
- "CreateStreamingResponse": CreateStreamingResponse,
- "CreateVideoCaptionData": CreateVideoCaptionData,
- "CreateVideoCaptionResponse": CreateVideoCaptionResponse,
- "CreateVideoChapterData": CreateVideoChapterData,
- "CreateVideoChapterResponse": CreateVideoChapterResponse,
- "CreateVideoRequest": CreateVideoRequest,
- "CreateVideoResponse": CreateVideoResponse,
- "CreateWebhookData": CreateWebhookData,
- "CreateWebhookRequest": CreateWebhookRequest,
- "CreateWebhookResponse": CreateWebhookResponse,
- "GetApiKeysData": GetApiKeysData,
- "GetApiKeysResponse": GetApiKeysResponse,
- "GetLiveStreamKeyData": GetLiveStreamKeyData,
- "GetLiveStreamKeyResponse": GetLiveStreamKeyResponse,
- "GetLiveStreamKeysListData": GetLiveStreamKeysListData,
- "GetLiveStreamKeysListResponse": GetLiveStreamKeysListResponse,
- "GetLiveStreamVideoPublicResponse": GetLiveStreamVideoPublicResponse,
- "GetLiveStreamVideoResponse": GetLiveStreamVideoResponse,
- "GetLiveStreamVideosRequest": GetLiveStreamVideosRequest,
- "GetLiveStreamVideosResponse": GetLiveStreamVideosResponse,
- "GetPlayerThemeByIdData": GetPlayerThemeByIdData,
- "GetPlayerThemeByIdResponse": GetPlayerThemeByIdResponse,
- "GetPlayerThemeData": GetPlayerThemeData,
- "GetPlayerThemeResponse": GetPlayerThemeResponse,
- "GetPlaylistByIdData": GetPlaylistByIdData,
- "GetPlaylistByIdResponse": GetPlaylistByIdResponse,
- "GetPlaylistListData": GetPlaylistListData,
- "GetPlaylistListRequest": GetPlaylistListRequest,
- "GetPlaylistListResponse": GetPlaylistListResponse,
- "GetStreamingResponse": GetStreamingResponse,
- "GetStreamingsResponse": GetStreamingsResponse,
- "GetTranscodeCostData": GetTranscodeCostData,
- "GetTranscodeCostResponse": GetTranscodeCostResponse,
- "GetUserWebhookData": GetUserWebhookData,
- "GetUserWebhookResponse": GetUserWebhookResponse,
- "GetVideoCaptionsData": GetVideoCaptionsData,
- "GetVideoCaptionsResponse": GetVideoCaptionsResponse,
- "GetVideoChaptersData": GetVideoChaptersData,
- "GetVideoChaptersResponse": GetVideoChaptersResponse,
- "GetVideoDetailResponse": GetVideoDetailResponse,
- "GetVideoListData": GetVideoListData,
- "GetVideoListRequest": GetVideoListRequest,
- "GetVideoListResponse": GetVideoListResponse,
- "GetVideoPlayerInfoResponse": GetVideoPlayerInfoResponse,
- "GetWebhooksListData": GetWebhooksListData,
- "GetWebhooksListResponse": GetWebhooksListResponse,
- "LiveStreamAssets": LiveStreamAssets,
- "LiveStreamKeyData": LiveStreamKeyData,
- "LiveStreamVideoData": LiveStreamVideoData,
- "LiveStreamVideoResponse": LiveStreamVideoResponse,
- "LiveStreamVideosResponse": LiveStreamVideosResponse,
- "Metadata": Metadata,
- "MoveVideoInPlaylistRequest": MoveVideoInPlaylistRequest,
- "PlayerTheme": PlayerTheme,
- "Playlist": Playlist,
- "PlaylistItem": PlaylistItem,
- "PlaylistItemVideo": PlaylistItemVideo,
- "PublicPlaylistObject": PublicPlaylistObject,
- "QualityObject": QualityObject,
- "RemovePlayerThemesFromVideoRequest": RemovePlayerThemesFromVideoRequest,
- "RenameAPIKeyRequest": RenameAPIKeyRequest,
- "ResponseError": ResponseError,
- "ResponseSuccess": ResponseSuccess,
- "Theme": Theme,
- "UpdateLiveStreamKeyData": UpdateLiveStreamKeyData,
- "UpdateLiveStreamKeyRequest": UpdateLiveStreamKeyRequest,
- "UpdateLiveStreamKeyResponse": UpdateLiveStreamKeyResponse,
- "UpdateLiveStreamVideoRequest": UpdateLiveStreamVideoRequest,
- "UpdatePlayerThemeRequest": UpdatePlayerThemeRequest,
- "UpdatePlayerThemeResponse": UpdatePlayerThemeResponse,
- "UpdateVideoInfoRequest": UpdateVideoInfoRequest,
- "UpdateWebhookRequest": UpdateWebhookRequest,
- "UploadLogoByIdResponse": UploadLogoByIdResponse,
- "Video": Video,
- "VideoAssets": VideoAssets,
- "VideoCaption": VideoCaption,
- "VideoChapter": VideoChapter,
- "VideoWatermark": VideoWatermark,
- "Webhook": Webhook,
-}
+const typeMap: { [index: string]: any } = {
+ AddPlayerThemesToVideoRequest: AddPlayerThemesToVideoRequest,
+ AddVideoToPlaylistRequest: AddVideoToPlaylistRequest,
+ ApiKey: ApiKey,
+ Asset: Asset,
+ AudioConfig: AudioConfig,
+ Controls: Controls,
+ CreateApiKeyData: CreateApiKeyData,
+ CreateApiKeyRequest: CreateApiKeyRequest,
+ CreateApiKeyResponse: CreateApiKeyResponse,
+ CreateLiveStreamKeyRequest: CreateLiveStreamKeyRequest,
+ CreateLiveStreamKeyResponse: CreateLiveStreamKeyResponse,
+ CreateMediaRequest: CreateMediaRequest,
+ CreateMediaResponse: CreateMediaResponse,
+ CreatePlayerThemeRequest: CreatePlayerThemeRequest,
+ CreatePlayerThemesData: CreatePlayerThemesData,
+ CreatePlayerThemesResponse: CreatePlayerThemesResponse,
+ CreatePlaylistData: CreatePlaylistData,
+ CreatePlaylistRequest: CreatePlaylistRequest,
+ CreatePlaylistResponse: CreatePlaylistResponse,
+ CreateStreamingRequest: CreateStreamingRequest,
+ CreateStreamingResponse: CreateStreamingResponse,
+ CreateVideoCaptionData: CreateVideoCaptionData,
+ CreateVideoCaptionResponse: CreateVideoCaptionResponse,
+ CreateVideoChapterData: CreateVideoChapterData,
+ CreateVideoChapterResponse: CreateVideoChapterResponse,
+ CreateWebhookData: CreateWebhookData,
+ CreateWebhookRequest: CreateWebhookRequest,
+ CreateWebhookResponse: CreateWebhookResponse,
+ GetApiKeysData: GetApiKeysData,
+ GetApiKeysResponse: GetApiKeysResponse,
+ GetLiveStreamKeyData: GetLiveStreamKeyData,
+ GetLiveStreamKeyResponse: GetLiveStreamKeyResponse,
+ GetLiveStreamKeysListData: GetLiveStreamKeysListData,
+ GetLiveStreamKeysListResponse: GetLiveStreamKeysListResponse,
+ GetLiveStreamMediasRequest: GetLiveStreamMediasRequest,
+ GetLiveStreamMediasResponse: GetLiveStreamMediasResponse,
+ GetLiveStreamMulticastResponse: GetLiveStreamMulticastResponse,
+ GetLiveStreamStatisticResponse: GetLiveStreamStatisticResponse,
+ GetLiveStreamVideoPublicResponse: GetLiveStreamVideoPublicResponse,
+ GetLiveStreamVideoResponse: GetLiveStreamVideoResponse,
+ GetPlayerThemeByIdData: GetPlayerThemeByIdData,
+ GetPlayerThemeByIdResponse: GetPlayerThemeByIdResponse,
+ GetPlayerThemeData: GetPlayerThemeData,
+ GetPlayerThemeResponse: GetPlayerThemeResponse,
+ GetPlaylistByIdData: GetPlaylistByIdData,
+ GetPlaylistByIdResponse: GetPlaylistByIdResponse,
+ GetPlaylistListData: GetPlaylistListData,
+ GetPlaylistListRequest: GetPlaylistListRequest,
+ GetPlaylistListResponse: GetPlaylistListResponse,
+ GetStreamingResponse: GetStreamingResponse,
+ GetStreamingsResponse: GetStreamingsResponse,
+ GetTranscodeCostData: GetTranscodeCostData,
+ GetTranscodeCostResponse: GetTranscodeCostResponse,
+ GetUserWebhookData: GetUserWebhookData,
+ GetUserWebhookResponse: GetUserWebhookResponse,
+ GetVideoCaptionsData: GetVideoCaptionsData,
+ GetVideoCaptionsResponse: GetVideoCaptionsResponse,
+ GetVideoChaptersData: GetVideoChaptersData,
+ GetVideoChaptersResponse: GetVideoChaptersResponse,
+ GetVideoDetailResponse: GetVideoDetailResponse,
+ GetVideoListData: GetVideoListData,
+ GetVideoListRequest: GetVideoListRequest,
+ GetVideoListResponse: GetVideoListResponse,
+ GetVideoPlayerInfoResponse: GetVideoPlayerInfoResponse,
+ GetWebhooksListData: GetWebhooksListData,
+ GetWebhooksListResponse: GetWebhooksListResponse,
+ LiveStreamAssets: LiveStreamAssets,
+ LiveStreamKeyData: LiveStreamKeyData,
+ LiveStreamMediaData: LiveStreamMediaData,
+ LiveStreamMediaResponse: LiveStreamMediaResponse,
+ LiveStreamMediasResponse: LiveStreamMediasResponse,
+ LiveStreamMulticast: LiveStreamMulticast,
+ LiveStreamStatisticResp: LiveStreamStatisticResp,
+ Media: Media,
+ Metadata: Metadata,
+ MoveVideoInPlaylistRequest: MoveVideoInPlaylistRequest,
+ PlayerTheme: PlayerTheme,
+ Playlist: Playlist,
+ PlaylistItem: PlaylistItem,
+ PlaylistItemMedia: PlaylistItemMedia,
+ PublicPlaylistObject: PublicPlaylistObject,
+ QualityConfig: QualityConfig,
+ QualityObject: QualityObject,
+ RemovePlayerThemesFromVideoRequest: RemovePlayerThemesFromVideoRequest,
+ RenameAPIKeyRequest: RenameAPIKeyRequest,
+ RequestCreateCaption: RequestCreateCaption,
+ ResponseError: ResponseError,
+ ResponseSuccess: ResponseSuccess,
+ Theme: Theme,
+ UpdateLiveStreamKeyData: UpdateLiveStreamKeyData,
+ UpdateLiveStreamKeyRequest: UpdateLiveStreamKeyRequest,
+ UpdateLiveStreamKeyResponse: UpdateLiveStreamKeyResponse,
+ UpdateLiveStreamMediaRequest: UpdateLiveStreamMediaRequest,
+ UpdatePlayerThemeRequest: UpdatePlayerThemeRequest,
+ UpdatePlayerThemeResponse: UpdatePlayerThemeResponse,
+ UpdateVideoInfoRequest: UpdateVideoInfoRequest,
+ UpdateWebhookRequest: UpdateWebhookRequest,
+ UploadLogoByIdResponse: UploadLogoByIdResponse,
+ UpsertLiveStreamMulticastInput: UpsertLiveStreamMulticastInput,
+ User: User,
+ VideoAssets: VideoAssets,
+ VideoCaption: VideoCaption,
+ VideoChapter: VideoChapter,
+ VideoConfig: VideoConfig,
+ VideoWatermark: VideoWatermark,
+ Webhook: Webhook,
+};
export default class ObjectSerializer {
public static findCorrectType(data: any, expectedType: string): string {
@@ -250,32 +268,38 @@ export default class ObjectSerializer {
return expectedType;
}
- public static serialize(data: any, type: string, format: string, defaultValue?: any): any {
+ public static serialize(
+ data: any,
+ type: string,
+ format: string,
+ defaultValue?: any
+ ): any {
if (data == undefined) {
- if(typeof defaultValue === "undefined") {
+ if (typeof defaultValue === 'undefined') {
return data;
}
data = defaultValue;
}
if (primitives.indexOf(type.toLowerCase()) !== -1) {
return data;
- } else if (type.lastIndexOf("Array<", 0) === 0) { // string.startsWith pre es6
- let subType: string = type.replace("Array<", ""); // Array => Type>
+ } else if (type.lastIndexOf('Array<', 0) === 0) {
+ // string.startsWith pre es6
+ let subType: string = type.replace('Array<', ''); // Array => Type>
subType = subType.substring(0, subType.length - 1); // Type> => Type
- let transformedData: any[] = [];
- for (let index in data) {
- let date = data[index];
+ const transformedData: any[] = [];
+ for (const index in data) {
+ const date = data[index];
transformedData.push(ObjectSerializer.serialize(date, subType, format));
}
return transformedData;
- } else if (type === "Date") {
- if (format == "date") {
- let month = data.getMonth()+1
- month = month < 10 ? "0" + month.toString() : month.toString()
+ } else if (type === 'Date') {
+ if (format == 'date') {
+ let month = data.getMonth() + 1;
+ month = month < 10 ? '0' + month.toString() : month.toString();
let day = data.getDate();
- day = day < 10 ? "0" + day.toString() : day.toString();
+ day = day < 10 ? '0' + day.toString() : day.toString();
- return data.getFullYear() + "-" + month + "-" + day;
+ return data.getFullYear() + '-' + month + '-' + day;
} else {
return data.toISOString().split('.')[0] + 'Z';
}
@@ -283,19 +307,25 @@ export default class ObjectSerializer {
if (enumsMap.has(type)) {
return data;
}
- if (!typeMap[type]) { // in case we dont know the type
+ if (!typeMap[type]) {
+ // in case we dont know the type
return data;
}
-
+
// Get the actual type of this object
type = this.findCorrectType(data, type);
// get the map for the correct type.
- let attributeTypes = typeMap[type].getAttributeTypeMap();
- let instance: {[index: string]: any} = {};
- for (let index in attributeTypes) {
- let attributeType = attributeTypes[index];
- instance[attributeType.baseName] = ObjectSerializer.serialize(data[attributeType.name], attributeType.type, attributeType.format, attributeType.defaultValue);
+ const attributeTypes = typeMap[type].getAttributeTypeMap();
+ const instance: { [index: string]: any } = {};
+ for (const index in attributeTypes) {
+ const attributeType = attributeTypes[index];
+ instance[attributeType.baseName] = ObjectSerializer.serialize(
+ data[attributeType.name],
+ attributeType.type,
+ attributeType.format,
+ attributeType.defaultValue
+ );
}
return instance;
}
@@ -308,47 +338,57 @@ export default class ObjectSerializer {
return data;
} else if (primitives.indexOf(type.toLowerCase()) !== -1) {
return data;
- } else if (type.lastIndexOf("Array<", 0) === 0) { // string.startsWith pre es6
- let subType: string = type.replace("Array<", ""); // Array => Type>
+ } else if (type.lastIndexOf('Array<', 0) === 0) {
+ // string.startsWith pre es6
+ let subType: string = type.replace('Array<', ''); // Array => Type>
subType = subType.substring(0, subType.length - 1); // Type> => Type
- let transformedData: any[] = [];
- for (let index in data) {
- let date = data[index];
- transformedData.push(ObjectSerializer.deserialize(date, subType, format));
+ const transformedData: any[] = [];
+ for (const index in data) {
+ const date = data[index];
+ transformedData.push(
+ ObjectSerializer.deserialize(date, subType, format)
+ );
}
return transformedData;
- } else if (type === "Date") {
+ } else if (type === 'Date') {
return new Date(data);
} else {
- if (enumsMap.has(type)) {// is Enum
+ if (enumsMap.has(type)) {
+ // is Enum
return data;
}
- if (!typeMap[type]) { // dont know the type
+ if (!typeMap[type]) {
+ // dont know the type
return data;
}
- let instance = new typeMap[type]();
- let attributeTypes = typeMap[type].getAttributeTypeMap();
- for (let index in attributeTypes) {
- let attributeType = attributeTypes[index];
- instance[attributeType.name] = ObjectSerializer.deserialize(data[attributeType.baseName], attributeType.type, attributeType.format);
+ const instance = new typeMap[type]();
+ const attributeTypes = typeMap[type].getAttributeTypeMap();
+ for (const index in attributeTypes) {
+ const attributeType = attributeTypes[index];
+ instance[attributeType.name] = ObjectSerializer.deserialize(
+ data[attributeType.baseName],
+ attributeType.type,
+ attributeType.format
+ );
}
return instance;
}
}
-
/**
* Normalize media type
*
* We currently do not handle any media types attributes, i.e. anything
* after a semicolon. All content is assumed to be UTF-8 compatible.
*/
- public static normalizeMediaType(mediaType: string | undefined): string | undefined {
+ public static normalizeMediaType(
+ mediaType: string | undefined
+ ): string | undefined {
if (mediaType === undefined) {
return undefined;
}
- return mediaType.split(";")[0].trim().toLowerCase();
+ return mediaType.split(';')[0].trim().toLowerCase();
}
/**
@@ -360,12 +400,14 @@ export default class ObjectSerializer {
public static getPreferredMediaType(mediaTypes: Array): string {
/** According to OAS 3 we should default to json */
if (!mediaTypes) {
- return "application/json";
+ return 'application/json';
}
- const normalMediaTypes = mediaTypes.map(this.normalizeMediaType).filter(mt => mt);
+ const normalMediaTypes = mediaTypes
+ .map(this.normalizeMediaType)
+ .filter((mt) => mt);
let selectedMediaType: string | undefined = undefined;
- let selectedRank: number = -Infinity;
+ let selectedRank = -Infinity;
for (const mediaType of normalMediaTypes) {
if (supportedMediaTypes[mediaType!] > selectedRank) {
selectedMediaType = mediaType;
@@ -374,7 +416,9 @@ export default class ObjectSerializer {
}
if (selectedMediaType === undefined) {
- throw new Error("None of the given media types are supported: " + mediaTypes.join(", "));
+ throw new Error(
+ 'None of the given media types are supported: ' + mediaTypes.join(', ')
+ );
}
return selectedMediaType!;
@@ -384,7 +428,7 @@ export default class ObjectSerializer {
* Convert data to a string according the given media type
*/
public static stringify(data: any, mediaType: string): string {
- if (mediaType === "application/json") {
+ if (mediaType === 'application/json') {
return JSON.stringify(data);
}
@@ -393,7 +437,11 @@ export default class ObjectSerializer {
return data;
}
- throw new Error("The mediaType " + mediaType + " is not supported by ObjectSerializer.stringify.");
+ throw new Error(
+ 'The mediaType ' +
+ mediaType +
+ ' is not supported by ObjectSerializer.stringify.'
+ );
}
/**
@@ -406,13 +454,20 @@ export default class ObjectSerializer {
return rawData;
}
- throw new Error("Cannot parse content. No Content-Type defined.");
+ throw new Error('Cannot parse content. No Content-Type defined.');
}
- if (mediaType === "application/json" || mediaType.indexOf("application/vnd.stream+json;version=") === 0) {
+ if (
+ mediaType === 'application/json' ||
+ mediaType.indexOf('application/vnd.stream+json;version=') === 0
+ ) {
return JSON.parse(rawData);
}
- throw new Error("The mediaType " + mediaType + " is not supported by ObjectSerializer.parse.");
+ throw new Error(
+ 'The mediaType ' +
+ mediaType +
+ ' is not supported by ObjectSerializer.parse.'
+ );
}
}
diff --git a/src/api/ApiKeyApi.ts b/src/api/ApiKeyApi.ts
index 5d1c7a70..edfb9f30 100644
--- a/src/api/ApiKeyApi.ts
+++ b/src/api/ApiKeyApi.ts
@@ -3,39 +3,20 @@
* Aioz Stream Service
*
* The version of the OpenAPI document: 1.0
- *
+ *
*
* NOTE: This class is auto generated.
* Do not edit the class manually.
*/
-
-import path from 'path';
-import {
- existsSync,
- statSync,
- createReadStream,
- openSync,
- read,
- closeSync,
- ReadStream,
-} from 'fs';
-import { promisify } from 'util';
import { URLSearchParams } from 'url';
-import FormData from 'form-data';
-import ObjectSerializer, { COLLECTION_FORMATS } from '../ObjectSerializer';
+import ObjectSerializer from '../ObjectSerializer';
import HttpClient, { QueryOptions, ApiResponseHeaders } from '../HttpClient';
-import ProgressiveSession from '../model/ProgressiveSession';
import CreateApiKeyRequest from '../model/CreateApiKeyRequest';
import CreateApiKeyResponse from '../model/CreateApiKeyResponse';
import GetApiKeysResponse from '../model/GetApiKeysResponse';
import RenameAPIKeyRequest from '../model/RenameAPIKeyRequest';
-import ResponseError from '../model/ResponseError';
import ResponseSuccess from '../model/ResponseSuccess';
-import { Readable, Stream } from 'stream';
-import { Blob } from 'buffer';
-import { readableToBuffer } from "../HttpClient";
-import * as crypto from 'crypto';
/**
* no description
@@ -47,162 +28,181 @@ export default class ApiKeyApi {
this.httpClient = httpClient;
}
-
-
/**
* This endpoint enables you to create a new API key for a specific project.
* Create API key
- * @param request API key's data
+ * @param request api key's data
*/
- public async create(request: CreateApiKeyRequest = {}): Promise {
- return this.createWithResponseHeaders(request).then((res) => res.body);;
+ public async create(
+ request: CreateApiKeyRequest = {}
+ ): Promise {
+ return this.createWithResponseHeaders(request).then((res) => res.body);
}
-
/**
* This endpoint enables you to create a new API key for a specific project.
* Create API key
- * @param request API key's data
+ * @param request api key's data
*/
- public async createWithResponseHeaders(request: CreateApiKeyRequest = {}): Promise< {headers: ApiResponseHeaders, body:CreateApiKeyResponse } > {
+ public async createWithResponseHeaders(
+ request: CreateApiKeyRequest = {}
+ ): Promise<{ headers: ApiResponseHeaders; body: CreateApiKeyResponse }> {
const queryParams: QueryOptions = {};
queryParams.headers = {};
if (request === null || request === undefined) {
- throw new Error('Required parameter request was null or undefined when calling create.');
+ throw new Error(
+ 'Required parameter request was null or undefined when calling create.'
+ );
}
// Path Params
const localVarPath = '/api_keys'.substring(1);
// Body Params
const contentType = ObjectSerializer.getPreferredMediaType([
- "application/json",
-
- "application/x-www-form-urlencoded"
+ 'application/json',
+
+ 'application/x-www-form-urlencoded',
]);
- queryParams.headers["Content-Type"] = contentType;
+ queryParams.headers['Content-Type'] = contentType;
queryParams.body = ObjectSerializer.stringify(
- ObjectSerializer.serialize(request, "CreateApiKeyRequest", ""),
+ ObjectSerializer.serialize(request, 'CreateApiKeyRequest', ''),
contentType
);
queryParams.method = 'POST';
-
- return this.httpClient.call(localVarPath, queryParams)
- .then(response => {
- return {
- headers: response.headers,
- body: ObjectSerializer.deserialize(
- ObjectSerializer.parse(response.body, response.headers["content-type"]),
- "CreateApiKeyResponse", ""
- ) as CreateApiKeyResponse
- }
- });
+ return this.httpClient.call(localVarPath, queryParams).then((response) => {
+ return {
+ headers: response.headers,
+ body: ObjectSerializer.deserialize(
+ ObjectSerializer.parse(
+ response.body,
+ response.headers['content-type']
+ ),
+ 'CreateApiKeyResponse',
+ ''
+ ) as CreateApiKeyResponse,
+ };
+ });
}
-
/**
* This endpoint enables you to rename an API key from a specific project.
* Rename api key
* @param id api key id
* @param request new api key name
*/
- public async update(id: string, request: RenameAPIKeyRequest = {}): Promise {
- return this.updateWithResponseHeaders(id, request).then((res) => res.body);;
+ public async update(
+ id: string,
+ request: RenameAPIKeyRequest = {}
+ ): Promise {
+ return this.updateWithResponseHeaders(id, request).then((res) => res.body);
}
-
/**
* This endpoint enables you to rename an API key from a specific project.
* Rename api key
* @param id api key id
* @param request new api key name
*/
- public async updateWithResponseHeaders(id: string, request: RenameAPIKeyRequest = {}): Promise< {headers: ApiResponseHeaders, body:ResponseSuccess } > {
+ public async updateWithResponseHeaders(
+ id: string,
+ request: RenameAPIKeyRequest = {}
+ ): Promise<{ headers: ApiResponseHeaders; body: ResponseSuccess }> {
const queryParams: QueryOptions = {};
queryParams.headers = {};
if (id === null || id === undefined) {
- throw new Error('Required parameter id was null or undefined when calling update.');
+ throw new Error(
+ 'Required parameter id was null or undefined when calling update.'
+ );
}
if (request === null || request === undefined) {
- throw new Error('Required parameter request was null or undefined when calling update.');
+ throw new Error(
+ 'Required parameter request was null or undefined when calling update.'
+ );
}
// Path Params
- const localVarPath = '/api_keys/{id}'.substring(1)
+ const localVarPath = '/api_keys/{id}'
+ .substring(1)
.replace('{' + 'id' + '}', encodeURIComponent(String(id)));
// Body Params
const contentType = ObjectSerializer.getPreferredMediaType([
- "application/json",
-
- "application/x-www-form-urlencoded"
+ 'application/json',
+
+ 'application/x-www-form-urlencoded',
]);
- queryParams.headers["Content-Type"] = contentType;
+ queryParams.headers['Content-Type'] = contentType;
queryParams.body = ObjectSerializer.stringify(
- ObjectSerializer.serialize(request, "RenameAPIKeyRequest", ""),
+ ObjectSerializer.serialize(request, 'RenameAPIKeyRequest', ''),
contentType
);
queryParams.method = 'PATCH';
-
- return this.httpClient.call(localVarPath, queryParams)
- .then(response => {
- return {
- headers: response.headers,
- body: ObjectSerializer.deserialize(
- ObjectSerializer.parse(response.body, response.headers["content-type"]),
- "ResponseSuccess", ""
- ) as ResponseSuccess
- }
- });
+ return this.httpClient.call(localVarPath, queryParams).then((response) => {
+ return {
+ headers: response.headers,
+ body: ObjectSerializer.deserialize(
+ ObjectSerializer.parse(
+ response.body,
+ response.headers['content-type']
+ ),
+ 'ResponseSuccess',
+ ''
+ ) as ResponseSuccess,
+ };
+ });
}
-
/**
* This endpoint enables you to delete an API key from a specific project.
* Delete API key
* @param id API key's ID
*/
- public async delete(id: string): Promise {
- return this.deleteWithResponseHeaders(id).then((res) => res.body);;
+ public async delete(id: string): Promise {
+ return this.deleteWithResponseHeaders(id).then((res) => res.body);
}
-
/**
* This endpoint enables you to delete an API key from a specific project.
* Delete API key
* @param id API key's ID
*/
- public async deleteWithResponseHeaders(id: string): Promise< {headers: ApiResponseHeaders, body:ResponseSuccess } > {
+ public async deleteWithResponseHeaders(
+ id: string
+ ): Promise<{ headers: ApiResponseHeaders; body: ResponseSuccess }> {
const queryParams: QueryOptions = {};
queryParams.headers = {};
if (id === null || id === undefined) {
- throw new Error('Required parameter id was null or undefined when calling delete.');
+ throw new Error(
+ 'Required parameter id was null or undefined when calling delete.'
+ );
}
// Path Params
- const localVarPath = '/api_keys/{id}'.substring(1)
+ const localVarPath = '/api_keys/{id}'
+ .substring(1)
.replace('{' + 'id' + '}', encodeURIComponent(String(id)));
-
queryParams.method = 'DELETE';
-
- return this.httpClient.call(localVarPath, queryParams)
- .then(response => {
- return {
- headers: response.headers,
- body: ObjectSerializer.deserialize(
- ObjectSerializer.parse(response.body, response.headers["content-type"]),
- "ResponseSuccess", ""
- ) as ResponseSuccess
- }
- });
+ return this.httpClient.call(localVarPath, queryParams).then((response) => {
+ return {
+ headers: response.headers,
+ body: ObjectSerializer.deserialize(
+ ObjectSerializer.parse(
+ response.body,
+ response.headers['content-type']
+ ),
+ 'ResponseSuccess',
+ ''
+ ) as ResponseSuccess,
+ };
+ });
}
-
/**
* Retrieve a list of all API keys for the current workspace.
* Get list API keys
@@ -213,11 +213,18 @@ export default class ApiKeyApi {
* @param { number } searchParams.offset offset, allowed values greater than or equal to 0. Default(0)
* @param { number } searchParams.limit results per page. Allowed values 1-100, default is 25
*/
- public async list(args: { search?: string, sortBy?: 'created_at' | 'name', orderBy?: 'asc' | 'desc', offset?: number, limit?: number } = {}): Promise {
+ public async list(
+ args: {
+ search?: string;
+ sortBy?: 'created_at' | 'name';
+ orderBy?: 'asc' | 'desc';
+ offset?: number;
+ limit?: number;
+ } = {}
+ ): Promise {
return this.listWithResponseHeaders(args).then((res) => res.body);
}
-
/**
* Retrieve a list of all API keys for the current workspace.
* Get list API keys
@@ -228,7 +235,19 @@ export default class ApiKeyApi {
* @param { number } searchParams.offset offset, allowed values greater than or equal to 0. Default(0)
* @param { number } searchParams.limit results per page. Allowed values 1-100, default is 25
*/
- public async listWithResponseHeaders({ search, sortBy, orderBy, offset, limit }: { search?: string, sortBy?: 'created_at' | 'name', orderBy?: 'asc' | 'desc', offset?: number, limit?: number } = {}): Promise< {headers: ApiResponseHeaders, body:GetApiKeysResponse } > {
+ public async listWithResponseHeaders({
+ search,
+ sortBy,
+ orderBy,
+ offset,
+ limit,
+ }: {
+ search?: string;
+ sortBy?: 'created_at' | 'name';
+ orderBy?: 'asc' | 'desc';
+ offset?: number;
+ limit?: number;
+ } = {}): Promise<{ headers: ApiResponseHeaders; body: GetApiKeysResponse }> {
const queryParams: QueryOptions = {};
queryParams.headers = {};
// Path Params
@@ -238,42 +257,52 @@ export default class ApiKeyApi {
const urlSearchParams = new URLSearchParams();
if (search !== undefined) {
-
- urlSearchParams.append("search", ObjectSerializer.serialize(search, "string", ""));
+ urlSearchParams.append(
+ 'search',
+ ObjectSerializer.serialize(search, 'string', '')
+ );
}
if (sortBy !== undefined) {
-
- urlSearchParams.append("sort_by", ObjectSerializer.serialize(sortBy, "'created_at' | 'name'", ""));
+ urlSearchParams.append(
+ 'sort_by',
+ ObjectSerializer.serialize(sortBy, "'created_at' | 'name'", '')
+ );
}
if (orderBy !== undefined) {
-
- urlSearchParams.append("order_by", ObjectSerializer.serialize(orderBy, "'asc' | 'desc'", ""));
+ urlSearchParams.append(
+ 'order_by',
+ ObjectSerializer.serialize(orderBy, "'asc' | 'desc'", '')
+ );
}
if (offset !== undefined) {
-
- urlSearchParams.append("offset", ObjectSerializer.serialize(offset, "number", ""));
+ urlSearchParams.append(
+ 'offset',
+ ObjectSerializer.serialize(offset, 'number', '')
+ );
}
if (limit !== undefined) {
-
- urlSearchParams.append("limit", ObjectSerializer.serialize(limit, "number", ""));
+ urlSearchParams.append(
+ 'limit',
+ ObjectSerializer.serialize(limit, 'number', '')
+ );
}
queryParams.searchParams = urlSearchParams;
-
queryParams.method = 'GET';
-
- return this.httpClient.call(localVarPath, queryParams)
- .then(response => {
- return {
- headers: response.headers,
- body: ObjectSerializer.deserialize(
- ObjectSerializer.parse(response.body, response.headers["content-type"]),
- "GetApiKeysResponse", ""
- ) as GetApiKeysResponse
- }
- });
+ return this.httpClient.call(localVarPath, queryParams).then((response) => {
+ return {
+ headers: response.headers,
+ body: ObjectSerializer.deserialize(
+ ObjectSerializer.parse(
+ response.body,
+ response.headers['content-type']
+ ),
+ 'GetApiKeysResponse',
+ ''
+ ) as GetApiKeysResponse,
+ };
+ });
}
-
}
diff --git a/src/api/LiveStreamApi.ts b/src/api/LiveStreamApi.ts
index 02f69904..813d6db4 100644
--- a/src/api/LiveStreamApi.ts
+++ b/src/api/LiveStreamApi.ts
@@ -3,50 +3,34 @@
* Aioz Stream Service
*
* The version of the OpenAPI document: 1.0
- *
+ *
*
* NOTE: This class is auto generated.
* Do not edit the class manually.
*/
-
-import path from 'path';
-import {
- existsSync,
- statSync,
- createReadStream,
- openSync,
- read,
- closeSync,
- ReadStream,
-} from 'fs';
-import { promisify } from 'util';
import { URLSearchParams } from 'url';
-import FormData from 'form-data';
-import ObjectSerializer, { COLLECTION_FORMATS } from '../ObjectSerializer';
+import ObjectSerializer from '../ObjectSerializer';
import HttpClient, { QueryOptions, ApiResponseHeaders } from '../HttpClient';
-import ProgressiveSession from '../model/ProgressiveSession';
import CreateLiveStreamKeyRequest from '../model/CreateLiveStreamKeyRequest';
import CreateLiveStreamKeyResponse from '../model/CreateLiveStreamKeyResponse';
import CreateStreamingRequest from '../model/CreateStreamingRequest';
import CreateStreamingResponse from '../model/CreateStreamingResponse';
import GetLiveStreamKeyResponse from '../model/GetLiveStreamKeyResponse';
import GetLiveStreamKeysListResponse from '../model/GetLiveStreamKeysListResponse';
+import GetLiveStreamMediasRequest from '../model/GetLiveStreamMediasRequest';
+import GetLiveStreamMediasResponse from '../model/GetLiveStreamMediasResponse';
+import GetLiveStreamMulticastResponse from '../model/GetLiveStreamMulticastResponse';
+import GetLiveStreamStatisticResponse from '../model/GetLiveStreamStatisticResponse';
import GetLiveStreamVideoPublicResponse from '../model/GetLiveStreamVideoPublicResponse';
import GetLiveStreamVideoResponse from '../model/GetLiveStreamVideoResponse';
-import GetLiveStreamVideosRequest from '../model/GetLiveStreamVideosRequest';
-import GetLiveStreamVideosResponse from '../model/GetLiveStreamVideosResponse';
import GetStreamingResponse from '../model/GetStreamingResponse';
import GetStreamingsResponse from '../model/GetStreamingsResponse';
-import ResponseError from '../model/ResponseError';
import ResponseSuccess from '../model/ResponseSuccess';
import UpdateLiveStreamKeyRequest from '../model/UpdateLiveStreamKeyRequest';
import UpdateLiveStreamKeyResponse from '../model/UpdateLiveStreamKeyResponse';
-import UpdateLiveStreamVideoRequest from '../model/UpdateLiveStreamVideoRequest';
-import { Readable, Stream } from 'stream';
-import { Blob } from 'buffer';
-import { readableToBuffer } from "../HttpClient";
-import * as crypto from 'crypto';
+import UpdateLiveStreamMediaRequest from '../model/UpdateLiveStreamMediaRequest';
+import UpsertLiveStreamMulticastInput from '../model/UpsertLiveStreamMulticastInput';
/**
* no description
@@ -58,157 +42,306 @@ export default class LiveStreamApi {
this.httpClient = httpClient;
}
+ /**
+ * Add live stream multicast
+ * Add live stream multicast
+ * @param streamKey Live stream key. Use uuid
+ * @param data data
+ */
+ public async addMulticast(
+ streamKey: string,
+ data: UpsertLiveStreamMulticastInput = {}
+ ): Promise {
+ return this.addMulticastWithResponseHeaders(streamKey, data).then(
+ (res) => res.body
+ );
+ }
+ /**
+ * Add live stream multicast
+ * Add live stream multicast
+ * @param streamKey Live stream key. Use uuid
+ * @param data data
+ */
+ public async addMulticastWithResponseHeaders(
+ streamKey: string,
+ data: UpsertLiveStreamMulticastInput = {}
+ ): Promise<{
+ headers: ApiResponseHeaders;
+ body: GetLiveStreamMulticastResponse;
+ }> {
+ const queryParams: QueryOptions = {};
+ queryParams.headers = {};
+ if (streamKey === null || streamKey === undefined) {
+ throw new Error(
+ 'Required parameter streamKey was null or undefined when calling addMulticast.'
+ );
+ }
+ if (data === null || data === undefined) {
+ throw new Error(
+ 'Required parameter data was null or undefined when calling addMulticast.'
+ );
+ }
+ // Path Params
+ const localVarPath = '/live_streams/multicast/{stream_key}'
+ .substring(1)
+ .replace('{' + 'stream_key' + '}', encodeURIComponent(String(streamKey)));
+
+ // Body Params
+ const contentType = ObjectSerializer.getPreferredMediaType([
+ 'application/json',
+ ]);
+ queryParams.headers['Content-Type'] = contentType;
+
+ queryParams.body = ObjectSerializer.stringify(
+ ObjectSerializer.serialize(data, 'UpsertLiveStreamMulticastInput', ''),
+ contentType
+ );
+
+ queryParams.method = 'POST';
+
+ return this.httpClient.call(localVarPath, queryParams).then((response) => {
+ return {
+ headers: response.headers,
+ body: ObjectSerializer.deserialize(
+ ObjectSerializer.parse(
+ response.body,
+ response.headers['content-type']
+ ),
+ 'GetLiveStreamMulticastResponse',
+ ''
+ ) as GetLiveStreamMulticastResponse,
+ };
+ });
+ }
/**
* Create live stream key
* Create live stream key
* @param input CreateLiveStreamKeyRequest
*/
- public async createLiveStreamKey(input: CreateLiveStreamKeyRequest = {}): Promise {
- return this.createLiveStreamKeyWithResponseHeaders(input).then((res) => res.body);;
+ public async createLiveStreamKey(
+ input: CreateLiveStreamKeyRequest = {}
+ ): Promise {
+ return this.createLiveStreamKeyWithResponseHeaders(input).then(
+ (res) => res.body
+ );
}
-
/**
* Create live stream key
* Create live stream key
* @param input CreateLiveStreamKeyRequest
*/
- public async createLiveStreamKeyWithResponseHeaders(input: CreateLiveStreamKeyRequest = {}): Promise< {headers: ApiResponseHeaders, body:CreateLiveStreamKeyResponse } > {
+ public async createLiveStreamKeyWithResponseHeaders(
+ input: CreateLiveStreamKeyRequest = {}
+ ): Promise<{
+ headers: ApiResponseHeaders;
+ body: CreateLiveStreamKeyResponse;
+ }> {
const queryParams: QueryOptions = {};
queryParams.headers = {};
if (input === null || input === undefined) {
- throw new Error('Required parameter input was null or undefined when calling createLiveStreamKey.');
+ throw new Error(
+ 'Required parameter input was null or undefined when calling createLiveStreamKey.'
+ );
}
// Path Params
const localVarPath = '/live_streams'.substring(1);
// Body Params
const contentType = ObjectSerializer.getPreferredMediaType([
- "application/json"
+ 'application/json',
]);
- queryParams.headers["Content-Type"] = contentType;
+ queryParams.headers['Content-Type'] = contentType;
queryParams.body = ObjectSerializer.stringify(
- ObjectSerializer.serialize(input, "CreateLiveStreamKeyRequest", ""),
+ ObjectSerializer.serialize(input, 'CreateLiveStreamKeyRequest', ''),
contentType
);
queryParams.method = 'POST';
-
- return this.httpClient.call(localVarPath, queryParams)
- .then(response => {
- return {
- headers: response.headers,
- body: ObjectSerializer.deserialize(
- ObjectSerializer.parse(response.body, response.headers["content-type"]),
- "CreateLiveStreamKeyResponse", ""
- ) as CreateLiveStreamKeyResponse
- }
- });
+ return this.httpClient.call(localVarPath, queryParams).then((response) => {
+ return {
+ headers: response.headers,
+ body: ObjectSerializer.deserialize(
+ ObjectSerializer.parse(
+ response.body,
+ response.headers['content-type']
+ ),
+ 'CreateLiveStreamKeyResponse',
+ ''
+ ) as CreateLiveStreamKeyResponse,
+ };
+ });
}
-
/**
- * Creates a new live stream video with the provided details
- * Create a new live stream video
+ * Creates a new live stream media with the provided details
+ * Create a new live stream media
* @param id Live stream key ID
* @param input CreateStreamingRequest
*/
- public async createStreaming(id: string, input: CreateStreamingRequest = {}): Promise {
- return this.createStreamingWithResponseHeaders(id, input).then((res) => res.body);;
+ public async createStreaming(
+ id: string,
+ input: CreateStreamingRequest = {}
+ ): Promise {
+ return this.createStreamingWithResponseHeaders(id, input).then(
+ (res) => res.body
+ );
}
-
/**
- * Creates a new live stream video with the provided details
- * Create a new live stream video
+ * Creates a new live stream media with the provided details
+ * Create a new live stream media
* @param id Live stream key ID
* @param input CreateStreamingRequest
*/
- public async createStreamingWithResponseHeaders(id: string, input: CreateStreamingRequest = {}): Promise< {headers: ApiResponseHeaders, body:CreateStreamingResponse } > {
+ public async createStreamingWithResponseHeaders(
+ id: string,
+ input: CreateStreamingRequest = {}
+ ): Promise<{ headers: ApiResponseHeaders; body: CreateStreamingResponse }> {
const queryParams: QueryOptions = {};
queryParams.headers = {};
if (id === null || id === undefined) {
- throw new Error('Required parameter id was null or undefined when calling createStreaming.');
+ throw new Error(
+ 'Required parameter id was null or undefined when calling createStreaming.'
+ );
}
if (input === null || input === undefined) {
- throw new Error('Required parameter input was null or undefined when calling createStreaming.');
+ throw new Error(
+ 'Required parameter input was null or undefined when calling createStreaming.'
+ );
}
// Path Params
- const localVarPath = '/live_streams/{id}/streamings'.substring(1)
+ const localVarPath = '/live_streams/{id}/streamings'
+ .substring(1)
.replace('{' + 'id' + '}', encodeURIComponent(String(id)));
// Body Params
const contentType = ObjectSerializer.getPreferredMediaType([
- "application/json"
+ 'application/json',
]);
- queryParams.headers["Content-Type"] = contentType;
+ queryParams.headers['Content-Type'] = contentType;
queryParams.body = ObjectSerializer.stringify(
- ObjectSerializer.serialize(input, "CreateStreamingRequest", ""),
+ ObjectSerializer.serialize(input, 'CreateStreamingRequest', ''),
contentType
);
queryParams.method = 'POST';
-
- return this.httpClient.call(localVarPath, queryParams)
- .then(response => {
- return {
- headers: response.headers,
- body: ObjectSerializer.deserialize(
- ObjectSerializer.parse(response.body, response.headers["content-type"]),
- "CreateStreamingResponse", ""
- ) as CreateStreamingResponse
- }
- });
+ return this.httpClient.call(localVarPath, queryParams).then((response) => {
+ return {
+ headers: response.headers,
+ body: ObjectSerializer.deserialize(
+ ObjectSerializer.parse(
+ response.body,
+ response.headers['content-type']
+ ),
+ 'CreateStreamingResponse',
+ ''
+ ) as CreateStreamingResponse,
+ };
+ });
}
-
/**
* Delete a live stream key by ID
* Delete live stream key
* @param id Live stream key ID
*/
- public async deleteLiveStreamKey(id: string): Promise {
- return this.deleteLiveStreamKeyWithResponseHeaders(id).then((res) => res.body);;
+ public async deleteLiveStreamKey(id: string): Promise {
+ return this.deleteLiveStreamKeyWithResponseHeaders(id).then(
+ (res) => res.body
+ );
}
-
/**
* Delete a live stream key by ID
* Delete live stream key
* @param id Live stream key ID
*/
- public async deleteLiveStreamKeyWithResponseHeaders(id: string): Promise< {headers: ApiResponseHeaders, body:ResponseSuccess } > {
+ public async deleteLiveStreamKeyWithResponseHeaders(
+ id: string
+ ): Promise<{ headers: ApiResponseHeaders; body: ResponseSuccess }> {
const queryParams: QueryOptions = {};
queryParams.headers = {};
if (id === null || id === undefined) {
- throw new Error('Required parameter id was null or undefined when calling deleteLiveStreamKey.');
+ throw new Error(
+ 'Required parameter id was null or undefined when calling deleteLiveStreamKey.'
+ );
}
// Path Params
- const localVarPath = '/live_streams/{id}'.substring(1)
+ const localVarPath = '/live_streams/{id}'
+ .substring(1)
.replace('{' + 'id' + '}', encodeURIComponent(String(id)));
-
queryParams.method = 'DELETE';
+ return this.httpClient.call(localVarPath, queryParams).then((response) => {
+ return {
+ headers: response.headers,
+ body: ObjectSerializer.deserialize(
+ ObjectSerializer.parse(
+ response.body,
+ response.headers['content-type']
+ ),
+ 'ResponseSuccess',
+ ''
+ ) as ResponseSuccess,
+ };
+ });
+ }
- return this.httpClient.call(localVarPath, queryParams)
- .then(response => {
- return {
- headers: response.headers,
- body: ObjectSerializer.deserialize(
- ObjectSerializer.parse(response.body, response.headers["content-type"]),
- "ResponseSuccess", ""
- ) as ResponseSuccess
- }
- });
+ /**
+ * Delete live stream multicast
+ * Delete live stream multicast
+ * @param streamKey Live stream key. UUID string format
+ */
+ public async deleteMulticast(streamKey: string): Promise {
+ return this.deleteMulticastWithResponseHeaders(streamKey).then(
+ (res) => res.body
+ );
}
+ /**
+ * Delete live stream multicast
+ * Delete live stream multicast
+ * @param streamKey Live stream key. UUID string format
+ */
+ public async deleteMulticastWithResponseHeaders(
+ streamKey: string
+ ): Promise<{ headers: ApiResponseHeaders; body: ResponseSuccess }> {
+ const queryParams: QueryOptions = {};
+ queryParams.headers = {};
+ if (streamKey === null || streamKey === undefined) {
+ throw new Error(
+ 'Required parameter streamKey was null or undefined when calling deleteMulticast.'
+ );
+ }
+ // Path Params
+ const localVarPath = '/live_streams/multicast/{stream_key}'
+ .substring(1)
+ .replace('{' + 'stream_key' + '}', encodeURIComponent(String(streamKey)));
+
+ queryParams.method = 'DELETE';
+
+ return this.httpClient.call(localVarPath, queryParams).then((response) => {
+ return {
+ headers: response.headers,
+ body: ObjectSerializer.deserialize(
+ ObjectSerializer.parse(
+ response.body,
+ response.headers['content-type']
+ ),
+ 'ResponseSuccess',
+ ''
+ ) as ResponseSuccess,
+ };
+ });
+ }
/**
* Delete live stream are created by a specific live stream key
@@ -216,90 +349,106 @@ export default class LiveStreamApi {
* @param id Live stream key ID
* @param streamId Streaming ID
*/
- public async deleteStreaming(id: string, streamId: string): Promise {
- return this.deleteStreamingWithResponseHeaders(id, streamId).then((res) => res.body);;
+ public async deleteStreaming(
+ id: string,
+ streamId: string
+ ): Promise {
+ return this.deleteStreamingWithResponseHeaders(id, streamId).then(
+ (res) => res.body
+ );
}
-
/**
* Delete live stream are created by a specific live stream key
* Delete live stream video
* @param id Live stream key ID
* @param streamId Streaming ID
*/
- public async deleteStreamingWithResponseHeaders(id: string, streamId: string): Promise< {headers: ApiResponseHeaders, body:ResponseSuccess } > {
+ public async deleteStreamingWithResponseHeaders(
+ id: string,
+ streamId: string
+ ): Promise<{ headers: ApiResponseHeaders; body: ResponseSuccess }> {
const queryParams: QueryOptions = {};
queryParams.headers = {};
if (id === null || id === undefined) {
- throw new Error('Required parameter id was null or undefined when calling deleteStreaming.');
+ throw new Error(
+ 'Required parameter id was null or undefined when calling deleteStreaming.'
+ );
}
if (streamId === null || streamId === undefined) {
- throw new Error('Required parameter streamId was null or undefined when calling deleteStreaming.');
+ throw new Error(
+ 'Required parameter streamId was null or undefined when calling deleteStreaming.'
+ );
}
// Path Params
- const localVarPath = '/live_streams/{id}/streamings/{stream_id}'.substring(1)
+ const localVarPath = '/live_streams/{id}/streamings/{stream_id}'
+ .substring(1)
.replace('{' + 'id' + '}', encodeURIComponent(String(id)))
.replace('{' + 'stream_id' + '}', encodeURIComponent(String(streamId)));
-
queryParams.method = 'DELETE';
-
- return this.httpClient.call(localVarPath, queryParams)
- .then(response => {
- return {
- headers: response.headers,
- body: ObjectSerializer.deserialize(
- ObjectSerializer.parse(response.body, response.headers["content-type"]),
- "ResponseSuccess", ""
- ) as ResponseSuccess
- }
- });
+ return this.httpClient.call(localVarPath, queryParams).then((response) => {
+ return {
+ headers: response.headers,
+ body: ObjectSerializer.deserialize(
+ ObjectSerializer.parse(
+ response.body,
+ response.headers['content-type']
+ ),
+ 'ResponseSuccess',
+ ''
+ ) as ResponseSuccess,
+ };
+ });
}
-
/**
* Get live stream key
* Get live stream key
* @param id ID
*/
- public async getLiveStreamKey(id: string): Promise {
- return this.getLiveStreamKeyWithResponseHeaders(id).then((res) => res.body);;
+ public async getLiveStreamKey(id: string): Promise {
+ return this.getLiveStreamKeyWithResponseHeaders(id).then((res) => res.body);
}
-
/**
* Get live stream key
* Get live stream key
* @param id ID
*/
- public async getLiveStreamKeyWithResponseHeaders(id: string): Promise< {headers: ApiResponseHeaders, body:GetLiveStreamKeyResponse } > {
+ public async getLiveStreamKeyWithResponseHeaders(
+ id: string
+ ): Promise<{ headers: ApiResponseHeaders; body: GetLiveStreamKeyResponse }> {
const queryParams: QueryOptions = {};
queryParams.headers = {};
if (id === null || id === undefined) {
- throw new Error('Required parameter id was null or undefined when calling getLiveStreamKey.');
+ throw new Error(
+ 'Required parameter id was null or undefined when calling getLiveStreamKey.'
+ );
}
// Path Params
- const localVarPath = '/live_streams/{id}'.substring(1)
+ const localVarPath = '/live_streams/{id}'
+ .substring(1)
.replace('{' + 'id' + '}', encodeURIComponent(String(id)));
-
queryParams.method = 'GET';
-
- return this.httpClient.call(localVarPath, queryParams)
- .then(response => {
- return {
- headers: response.headers,
- body: ObjectSerializer.deserialize(
- ObjectSerializer.parse(response.body, response.headers["content-type"]),
- "GetLiveStreamKeyResponse", ""
- ) as GetLiveStreamKeyResponse
- }
- });
+ return this.httpClient.call(localVarPath, queryParams).then((response) => {
+ return {
+ headers: response.headers,
+ body: ObjectSerializer.deserialize(
+ ObjectSerializer.parse(
+ response.body,
+ response.headers['content-type']
+ ),
+ 'GetLiveStreamKeyResponse',
+ ''
+ ) as GetLiveStreamKeyResponse,
+ };
+ });
}
-
/**
* Get live stream key list
* Get live stream key list
@@ -310,11 +459,20 @@ export default class LiveStreamApi {
* @param { number } searchParams.offset offset, allowed values greater than or equal to 0.
* @param { number } searchParams.limit results per page.
*/
- public async getLiveStreamKeys(args: { search?: string, sortBy?: 'created_at' | 'name', orderBy?: 'asc' | 'desc', offset?: number, limit?: number } = {}): Promise {
- return this.getLiveStreamKeysWithResponseHeaders(args).then((res) => res.body);
+ public async getLiveStreamKeys(
+ args: {
+ search?: string;
+ sortBy?: 'created_at' | 'name';
+ orderBy?: 'asc' | 'desc';
+ offset?: number;
+ limit?: number;
+ } = {}
+ ): Promise {
+ return this.getLiveStreamKeysWithResponseHeaders(args).then(
+ (res) => res.body
+ );
}
-
/**
* Get live stream key list
* Get live stream key list
@@ -325,7 +483,22 @@ export default class LiveStreamApi {
* @param { number } searchParams.offset offset, allowed values greater than or equal to 0.
* @param { number } searchParams.limit results per page.
*/
- public async getLiveStreamKeysWithResponseHeaders({ search, sortBy, orderBy, offset, limit }: { search?: string, sortBy?: 'created_at' | 'name', orderBy?: 'asc' | 'desc', offset?: number, limit?: number } = {}): Promise< {headers: ApiResponseHeaders, body:GetLiveStreamKeysListResponse } > {
+ public async getLiveStreamKeysWithResponseHeaders({
+ search,
+ sortBy,
+ orderBy,
+ offset,
+ limit,
+ }: {
+ search?: string;
+ sortBy?: 'created_at' | 'name';
+ orderBy?: 'asc' | 'desc';
+ offset?: number;
+ limit?: number;
+ } = {}): Promise<{
+ headers: ApiResponseHeaders;
+ body: GetLiveStreamKeysListResponse;
+ }> {
const queryParams: QueryOptions = {};
queryParams.headers = {};
// Path Params
@@ -335,387 +508,583 @@ export default class LiveStreamApi {
const urlSearchParams = new URLSearchParams();
if (search !== undefined) {
-
- urlSearchParams.append("search", ObjectSerializer.serialize(search, "string", ""));
+ urlSearchParams.append(
+ 'search',
+ ObjectSerializer.serialize(search, 'string', '')
+ );
}
if (sortBy !== undefined) {
-
- urlSearchParams.append("sort_by", ObjectSerializer.serialize(sortBy, "'created_at' | 'name'", ""));
+ urlSearchParams.append(
+ 'sort_by',
+ ObjectSerializer.serialize(sortBy, "'created_at' | 'name'", '')
+ );
}
if (orderBy !== undefined) {
-
- urlSearchParams.append("order_by", ObjectSerializer.serialize(orderBy, "'asc' | 'desc'", ""));
+ urlSearchParams.append(
+ 'order_by',
+ ObjectSerializer.serialize(orderBy, "'asc' | 'desc'", '')
+ );
}
if (offset !== undefined) {
-
- urlSearchParams.append("offset", ObjectSerializer.serialize(offset, "number", ""));
+ urlSearchParams.append(
+ 'offset',
+ ObjectSerializer.serialize(offset, 'number', '')
+ );
}
if (limit !== undefined) {
-
- urlSearchParams.append("limit", ObjectSerializer.serialize(limit, "number", ""));
+ urlSearchParams.append(
+ 'limit',
+ ObjectSerializer.serialize(limit, 'number', '')
+ );
}
queryParams.searchParams = urlSearchParams;
-
queryParams.method = 'GET';
-
- return this.httpClient.call(localVarPath, queryParams)
- .then(response => {
- return {
- headers: response.headers,
- body: ObjectSerializer.deserialize(
- ObjectSerializer.parse(response.body, response.headers["content-type"]),
- "GetLiveStreamKeysListResponse", ""
- ) as GetLiveStreamKeysListResponse
- }
- });
+ return this.httpClient.call(localVarPath, queryParams).then((response) => {
+ return {
+ headers: response.headers,
+ body: ObjectSerializer.deserialize(
+ ObjectSerializer.parse(
+ response.body,
+ response.headers['content-type']
+ ),
+ 'GetLiveStreamKeysListResponse',
+ ''
+ ) as GetLiveStreamKeysListResponse,
+ };
+ });
}
-
/**
* Get live stream video public for a specific live stream key
* Get live stream video public
* @param id Live stream key ID
*/
- public async getLiveStreamPlayerInfo(id: string): Promise {
- return this.getLiveStreamPlayerInfoWithResponseHeaders(id).then((res) => res.body);;
+ public async getLiveStreamPlayerInfo(
+ id: string
+ ): Promise {
+ return this.getLiveStreamPlayerInfoWithResponseHeaders(id).then(
+ (res) => res.body
+ );
}
-
/**
* Get live stream video public for a specific live stream key
* Get live stream video public
* @param id Live stream key ID
*/
- public async getLiveStreamPlayerInfoWithResponseHeaders(id: string): Promise< {headers: ApiResponseHeaders, body:GetLiveStreamVideoPublicResponse } > {
+ public async getLiveStreamPlayerInfoWithResponseHeaders(id: string): Promise<{
+ headers: ApiResponseHeaders;
+ body: GetLiveStreamVideoPublicResponse;
+ }> {
const queryParams: QueryOptions = {};
queryParams.headers = {};
if (id === null || id === undefined) {
- throw new Error('Required parameter id was null or undefined when calling getLiveStreamPlayerInfo.');
+ throw new Error(
+ 'Required parameter id was null or undefined when calling getLiveStreamPlayerInfo.'
+ );
}
// Path Params
- const localVarPath = '/live_streams/player/{id}/videos'.substring(1)
+ const localVarPath = '/live_streams/player/{id}/videos'
+ .substring(1)
.replace('{' + 'id' + '}', encodeURIComponent(String(id)));
-
queryParams.method = 'GET';
-
- return this.httpClient.call(localVarPath, queryParams)
- .then(response => {
- return {
- headers: response.headers,
- body: ObjectSerializer.deserialize(
- ObjectSerializer.parse(response.body, response.headers["content-type"]),
- "GetLiveStreamVideoPublicResponse", ""
- ) as GetLiveStreamVideoPublicResponse
- }
- });
+ return this.httpClient.call(localVarPath, queryParams).then((response) => {
+ return {
+ headers: response.headers,
+ body: ObjectSerializer.deserialize(
+ ObjectSerializer.parse(
+ response.body,
+ response.headers['content-type']
+ ),
+ 'GetLiveStreamVideoPublicResponse',
+ ''
+ ) as GetLiveStreamVideoPublicResponse,
+ };
+ });
}
-
/**
* Get a specific live stream video by ID
* Get live stream video
* @param id Live stream video ID
*/
- public async getLiveStreamVideo(id: string): Promise {
- return this.getLiveStreamVideoWithResponseHeaders(id).then((res) => res.body);;
+ public async getLiveStreamVideo(
+ id: string
+ ): Promise {
+ return this.getLiveStreamVideoWithResponseHeaders(id).then(
+ (res) => res.body
+ );
}
-
/**
* Get a specific live stream video by ID
* Get live stream video
* @param id Live stream video ID
*/
- public async getLiveStreamVideoWithResponseHeaders(id: string): Promise< {headers: ApiResponseHeaders, body:GetLiveStreamVideoResponse } > {
+ public async getLiveStreamVideoWithResponseHeaders(id: string): Promise<{
+ headers: ApiResponseHeaders;
+ body: GetLiveStreamVideoResponse;
+ }> {
const queryParams: QueryOptions = {};
queryParams.headers = {};
if (id === null || id === undefined) {
- throw new Error('Required parameter id was null or undefined when calling getLiveStreamVideo.');
+ throw new Error(
+ 'Required parameter id was null or undefined when calling getLiveStreamVideo.'
+ );
}
// Path Params
- const localVarPath = '/live_streams/{id}/videos'.substring(1)
+ const localVarPath = '/live_streams/{id}/video'
+ .substring(1)
.replace('{' + 'id' + '}', encodeURIComponent(String(id)));
-
queryParams.method = 'GET';
-
- return this.httpClient.call(localVarPath, queryParams)
- .then(response => {
- return {
- headers: response.headers,
- body: ObjectSerializer.deserialize(
- ObjectSerializer.parse(response.body, response.headers["content-type"]),
- "GetLiveStreamVideoResponse", ""
- ) as GetLiveStreamVideoResponse
- }
- });
+ return this.httpClient.call(localVarPath, queryParams).then((response) => {
+ return {
+ headers: response.headers,
+ body: ObjectSerializer.deserialize(
+ ObjectSerializer.parse(
+ response.body,
+ response.headers['content-type']
+ ),
+ 'GetLiveStreamVideoResponse',
+ ''
+ ) as GetLiveStreamVideoResponse,
+ };
+ });
}
-
/**
- * Get live stream videos for a specific live stream key
- * Get live stream videos
+ * Get live stream media for a specific live stream key
+ * Get live stream media
* @param id Live stream key ID
* @param data data
*/
- public async getLiveStreamVideos(id: string, data: GetLiveStreamVideosRequest = {}): Promise {
- return this.getLiveStreamVideosWithResponseHeaders(id, data).then((res) => res.body);;
+ public async getMedias(
+ id: string,
+ data: GetLiveStreamMediasRequest = {}
+ ): Promise {
+ return this.getMediasWithResponseHeaders(id, data).then((res) => res.body);
}
-
/**
- * Get live stream videos for a specific live stream key
- * Get live stream videos
+ * Get live stream media for a specific live stream key
+ * Get live stream media
* @param id Live stream key ID
* @param data data
*/
- public async getLiveStreamVideosWithResponseHeaders(id: string, data: GetLiveStreamVideosRequest = {}): Promise< {headers: ApiResponseHeaders, body:GetLiveStreamVideosResponse } > {
+ public async getMediasWithResponseHeaders(
+ id: string,
+ data: GetLiveStreamMediasRequest = {}
+ ): Promise<{
+ headers: ApiResponseHeaders;
+ body: GetLiveStreamMediasResponse;
+ }> {
const queryParams: QueryOptions = {};
queryParams.headers = {};
if (id === null || id === undefined) {
- throw new Error('Required parameter id was null or undefined when calling getLiveStreamVideos.');
+ throw new Error(
+ 'Required parameter id was null or undefined when calling getMedias.'
+ );
}
if (data === null || data === undefined) {
- throw new Error('Required parameter data was null or undefined when calling getLiveStreamVideos.');
+ throw new Error(
+ 'Required parameter data was null or undefined when calling getMedias.'
+ );
}
// Path Params
- const localVarPath = '/live_streams/{id}/videos'.substring(1)
+ const localVarPath = '/live_streams/{id}/videos'
+ .substring(1)
.replace('{' + 'id' + '}', encodeURIComponent(String(id)));
// Body Params
const contentType = ObjectSerializer.getPreferredMediaType([
- "application/json"
+ 'application/json',
]);
- queryParams.headers["Content-Type"] = contentType;
+ queryParams.headers['Content-Type'] = contentType;
queryParams.body = ObjectSerializer.stringify(
- ObjectSerializer.serialize(data, "GetLiveStreamVideosRequest", ""),
+ ObjectSerializer.serialize(data, 'GetLiveStreamMediasRequest', ''),
contentType
);
queryParams.method = 'POST';
+ return this.httpClient.call(localVarPath, queryParams).then((response) => {
+ return {
+ headers: response.headers,
+ body: ObjectSerializer.deserialize(
+ ObjectSerializer.parse(
+ response.body,
+ response.headers['content-type']
+ ),
+ 'GetLiveStreamMediasResponse',
+ ''
+ ) as GetLiveStreamMediasResponse,
+ };
+ });
+ }
+
+ /**
+ * Get live stream multicast by stream key
+ * Get live stream multicast by stream key
+ * @param streamKey Live stream key. UUID string format
+ */
+ public async getMulticastByStreamKey(
+ streamKey: string
+ ): Promise {
+ return this.getMulticastByStreamKeyWithResponseHeaders(streamKey).then(
+ (res) => res.body
+ );
+ }
+
+ /**
+ * Get live stream multicast by stream key
+ * Get live stream multicast by stream key
+ * @param streamKey Live stream key. UUID string format
+ */
+ public async getMulticastByStreamKeyWithResponseHeaders(
+ streamKey: string
+ ): Promise<{
+ headers: ApiResponseHeaders;
+ body: GetLiveStreamMulticastResponse;
+ }> {
+ const queryParams: QueryOptions = {};
+ queryParams.headers = {};
+ if (streamKey === null || streamKey === undefined) {
+ throw new Error(
+ 'Required parameter streamKey was null or undefined when calling getMulticastByStreamKey.'
+ );
+ }
+ // Path Params
+ const localVarPath = '/live_streams/multicast/{stream_key}'
+ .substring(1)
+ .replace('{' + 'stream_key' + '}', encodeURIComponent(String(streamKey)));
+
+ queryParams.method = 'GET';
+
+ return this.httpClient.call(localVarPath, queryParams).then((response) => {
+ return {
+ headers: response.headers,
+ body: ObjectSerializer.deserialize(
+ ObjectSerializer.parse(
+ response.body,
+ response.headers['content-type']
+ ),
+ 'GetLiveStreamMulticastResponse',
+ ''
+ ) as GetLiveStreamMulticastResponse,
+ };
+ });
+ }
- return this.httpClient.call(localVarPath, queryParams)
- .then(response => {
- return {
- headers: response.headers,
- body: ObjectSerializer.deserialize(
- ObjectSerializer.parse(response.body, response.headers["content-type"]),
- "GetLiveStreamVideosResponse", ""
- ) as GetLiveStreamVideosResponse
- }
- });
+ /**
+ * Get live stream statistic by stream media id
+ * Get live stream statistic by stream media id
+ * @param streamMediaId Live stream media ID
+ */
+ public async getStatisticByStreamMediaId(
+ streamMediaId: string
+ ): Promise {
+ return this.getStatisticByStreamMediaIdWithResponseHeaders(
+ streamMediaId
+ ).then((res) => res.body);
}
+ /**
+ * Get live stream statistic by stream media id
+ * Get live stream statistic by stream media id
+ * @param streamMediaId Live stream media ID
+ */
+ public async getStatisticByStreamMediaIdWithResponseHeaders(
+ streamMediaId: string
+ ): Promise<{
+ headers: ApiResponseHeaders;
+ body: GetLiveStreamStatisticResponse;
+ }> {
+ const queryParams: QueryOptions = {};
+ queryParams.headers = {};
+ if (streamMediaId === null || streamMediaId === undefined) {
+ throw new Error(
+ 'Required parameter streamMediaId was null or undefined when calling getStatisticByStreamMediaId.'
+ );
+ }
+ // Path Params
+ const localVarPath = '/live_streams/statistic/{stream_media_id}'
+ .substring(1)
+ .replace(
+ '{' + 'stream_media_id' + '}',
+ encodeURIComponent(String(streamMediaId))
+ );
+
+ queryParams.method = 'GET';
+
+ return this.httpClient.call(localVarPath, queryParams).then((response) => {
+ return {
+ headers: response.headers,
+ body: ObjectSerializer.deserialize(
+ ObjectSerializer.parse(
+ response.body,
+ response.headers['content-type']
+ ),
+ 'GetLiveStreamStatisticResponse',
+ ''
+ ) as GetLiveStreamStatisticResponse,
+ };
+ });
+ }
/**
- * Get live stream video streaming for a specific live stream key
- * Get live stream video streaming
+ * Get live stream media streaming for a specific live stream key
+ * Get live stream media streaming
* @param id Live stream key ID
* @param streamId Stream ID
*/
- public async getStreaming(id: string, streamId: string): Promise {
- return this.getStreamingWithResponseHeaders(id, streamId).then((res) => res.body);;
+ public async getStreaming(
+ id: string,
+ streamId: string
+ ): Promise {
+ return this.getStreamingWithResponseHeaders(id, streamId).then(
+ (res) => res.body
+ );
}
-
/**
- * Get live stream video streaming for a specific live stream key
- * Get live stream video streaming
+ * Get live stream media streaming for a specific live stream key
+ * Get live stream media streaming
* @param id Live stream key ID
* @param streamId Stream ID
*/
- public async getStreamingWithResponseHeaders(id: string, streamId: string): Promise< {headers: ApiResponseHeaders, body:GetStreamingResponse } > {
+ public async getStreamingWithResponseHeaders(
+ id: string,
+ streamId: string
+ ): Promise<{ headers: ApiResponseHeaders; body: GetStreamingResponse }> {
const queryParams: QueryOptions = {};
queryParams.headers = {};
if (id === null || id === undefined) {
- throw new Error('Required parameter id was null or undefined when calling getStreaming.');
+ throw new Error(
+ 'Required parameter id was null or undefined when calling getStreaming.'
+ );
}
if (streamId === null || streamId === undefined) {
- throw new Error('Required parameter streamId was null or undefined when calling getStreaming.');
+ throw new Error(
+ 'Required parameter streamId was null or undefined when calling getStreaming.'
+ );
}
// Path Params
- const localVarPath = '/live_streams/{id}/streamings/{stream_id}'.substring(1)
+ const localVarPath = '/live_streams/{id}/streamings/{stream_id}'
+ .substring(1)
.replace('{' + 'id' + '}', encodeURIComponent(String(id)))
.replace('{' + 'stream_id' + '}', encodeURIComponent(String(streamId)));
-
queryParams.method = 'GET';
-
- return this.httpClient.call(localVarPath, queryParams)
- .then(response => {
- return {
- headers: response.headers,
- body: ObjectSerializer.deserialize(
- ObjectSerializer.parse(response.body, response.headers["content-type"]),
- "GetStreamingResponse", ""
- ) as GetStreamingResponse
- }
- });
+ return this.httpClient.call(localVarPath, queryParams).then((response) => {
+ return {
+ headers: response.headers,
+ body: ObjectSerializer.deserialize(
+ ObjectSerializer.parse(
+ response.body,
+ response.headers['content-type']
+ ),
+ 'GetStreamingResponse',
+ ''
+ ) as GetStreamingResponse,
+ };
+ });
}
-
/**
- * Get live stream video streamings for a specific live stream key
- * Get live stream video streamings
+ * Get live stream media streamings for a specific live stream key
+ * Get live stream media streamings
* @param id Live stream key ID
*/
- public async getStreamings(id: string): Promise {
- return this.getStreamingsWithResponseHeaders(id).then((res) => res.body);;
+ public async getStreamings(id: string): Promise {
+ return this.getStreamingsWithResponseHeaders(id).then((res) => res.body);
}
-
/**
- * Get live stream video streamings for a specific live stream key
- * Get live stream video streamings
+ * Get live stream media streamings for a specific live stream key
+ * Get live stream media streamings
* @param id Live stream key ID
*/
- public async getStreamingsWithResponseHeaders(id: string): Promise< {headers: ApiResponseHeaders, body:GetStreamingsResponse } > {
+ public async getStreamingsWithResponseHeaders(
+ id: string
+ ): Promise<{ headers: ApiResponseHeaders; body: GetStreamingsResponse }> {
const queryParams: QueryOptions = {};
queryParams.headers = {};
if (id === null || id === undefined) {
- throw new Error('Required parameter id was null or undefined when calling getStreamings.');
+ throw new Error(
+ 'Required parameter id was null or undefined when calling getStreamings.'
+ );
}
// Path Params
- const localVarPath = '/live_streams/{id}/streamings'.substring(1)
+ const localVarPath = '/live_streams/{id}/streamings'
+ .substring(1)
.replace('{' + 'id' + '}', encodeURIComponent(String(id)));
-
queryParams.method = 'GET';
-
- return this.httpClient.call(localVarPath, queryParams)
- .then(response => {
- return {
- headers: response.headers,
- body: ObjectSerializer.deserialize(
- ObjectSerializer.parse(response.body, response.headers["content-type"]),
- "GetStreamingsResponse", ""
- ) as GetStreamingsResponse
- }
- });
+ return this.httpClient.call(localVarPath, queryParams).then((response) => {
+ return {
+ headers: response.headers,
+ body: ObjectSerializer.deserialize(
+ ObjectSerializer.parse(
+ response.body,
+ response.headers['content-type']
+ ),
+ 'GetStreamingsResponse',
+ ''
+ ) as GetStreamingsResponse,
+ };
+ });
}
-
/**
* Update a live stream key by ID
* Update live stream key
* @param id Live stream key ID
* @param input UpdateLiveStreamKeyRequest
*/
- public async updateLiveStreamKey(id: string, input: UpdateLiveStreamKeyRequest = {}): Promise {
- return this.updateLiveStreamKeyWithResponseHeaders(id, input).then((res) => res.body);;
+ public async updateLiveStreamKey(
+ id: string,
+ input: UpdateLiveStreamKeyRequest = {}
+ ): Promise {
+ return this.updateLiveStreamKeyWithResponseHeaders(id, input).then(
+ (res) => res.body
+ );
}
-
/**
* Update a live stream key by ID
* Update live stream key
* @param id Live stream key ID
* @param input UpdateLiveStreamKeyRequest
*/
- public async updateLiveStreamKeyWithResponseHeaders(id: string, input: UpdateLiveStreamKeyRequest = {}): Promise< {headers: ApiResponseHeaders, body:UpdateLiveStreamKeyResponse } > {
+ public async updateLiveStreamKeyWithResponseHeaders(
+ id: string,
+ input: UpdateLiveStreamKeyRequest = {}
+ ): Promise<{
+ headers: ApiResponseHeaders;
+ body: UpdateLiveStreamKeyResponse;
+ }> {
const queryParams: QueryOptions = {};
queryParams.headers = {};
if (id === null || id === undefined) {
- throw new Error('Required parameter id was null or undefined when calling updateLiveStreamKey.');
+ throw new Error(
+ 'Required parameter id was null or undefined when calling updateLiveStreamKey.'
+ );
}
if (input === null || input === undefined) {
- throw new Error('Required parameter input was null or undefined when calling updateLiveStreamKey.');
+ throw new Error(
+ 'Required parameter input was null or undefined when calling updateLiveStreamKey.'
+ );
}
// Path Params
- const localVarPath = '/live_streams/{id}'.substring(1)
+ const localVarPath = '/live_streams/{id}'
+ .substring(1)
.replace('{' + 'id' + '}', encodeURIComponent(String(id)));
// Body Params
const contentType = ObjectSerializer.getPreferredMediaType([
- "application/json"
+ 'application/json',
]);
- queryParams.headers["Content-Type"] = contentType;
+ queryParams.headers['Content-Type'] = contentType;
queryParams.body = ObjectSerializer.stringify(
- ObjectSerializer.serialize(input, "UpdateLiveStreamKeyRequest", ""),
+ ObjectSerializer.serialize(input, 'UpdateLiveStreamKeyRequest', ''),
contentType
);
queryParams.method = 'PUT';
-
- return this.httpClient.call(localVarPath, queryParams)
- .then(response => {
- return {
- headers: response.headers,
- body: ObjectSerializer.deserialize(
- ObjectSerializer.parse(response.body, response.headers["content-type"]),
- "UpdateLiveStreamKeyResponse", ""
- ) as UpdateLiveStreamKeyResponse
- }
- });
+ return this.httpClient.call(localVarPath, queryParams).then((response) => {
+ return {
+ headers: response.headers,
+ body: ObjectSerializer.deserialize(
+ ObjectSerializer.parse(
+ response.body,
+ response.headers['content-type']
+ ),
+ 'UpdateLiveStreamKeyResponse',
+ ''
+ ) as UpdateLiveStreamKeyResponse,
+ };
+ });
}
-
/**
- * Update live stream video for a specific live stream key
- * Update live stream video
+ * Update live stream media. You can only update while live streaming.
+ * Update live stream media
* @param id Live stream key ID
* @param data data
*/
- public async updateLiveStreamVideo(id: string, data: UpdateLiveStreamVideoRequest = {}): Promise {
- return this.updateLiveStreamVideoWithResponseHeaders(id, data).then((res) => res.body);;
+ public async updateMedia(
+ id: string,
+ data: UpdateLiveStreamMediaRequest = {}
+ ): Promise {
+ return this.updateMediaWithResponseHeaders(id, data).then(
+ (res) => res.body
+ );
}
-
/**
- * Update live stream video for a specific live stream key
- * Update live stream video
+ * Update live stream media. You can only update while live streaming.
+ * Update live stream media
* @param id Live stream key ID
* @param data data
*/
- public async updateLiveStreamVideoWithResponseHeaders(id: string, data: UpdateLiveStreamVideoRequest = {}): Promise< {headers: ApiResponseHeaders, body:ResponseSuccess } > {
+ public async updateMediaWithResponseHeaders(
+ id: string,
+ data: UpdateLiveStreamMediaRequest = {}
+ ): Promise<{ headers: ApiResponseHeaders; body: ResponseSuccess }> {
const queryParams: QueryOptions = {};
queryParams.headers = {};
if (id === null || id === undefined) {
- throw new Error('Required parameter id was null or undefined when calling updateLiveStreamVideo.');
+ throw new Error(
+ 'Required parameter id was null or undefined when calling updateMedia.'
+ );
}
if (data === null || data === undefined) {
- throw new Error('Required parameter data was null or undefined when calling updateLiveStreamVideo.');
+ throw new Error(
+ 'Required parameter data was null or undefined when calling updateMedia.'
+ );
}
// Path Params
- const localVarPath = '/live_streams/{id}/streamings'.substring(1)
+ const localVarPath = '/live_streams/{id}/streamings'
+ .substring(1)
.replace('{' + 'id' + '}', encodeURIComponent(String(id)));
// Body Params
const contentType = ObjectSerializer.getPreferredMediaType([
- "application/json"
+ 'application/json',
]);
- queryParams.headers["Content-Type"] = contentType;
+ queryParams.headers['Content-Type'] = contentType;
queryParams.body = ObjectSerializer.stringify(
- ObjectSerializer.serialize(data, "UpdateLiveStreamVideoRequest", ""),
+ ObjectSerializer.serialize(data, 'UpdateLiveStreamMediaRequest', ''),
contentType
);
queryParams.method = 'PUT';
-
- return this.httpClient.call(localVarPath, queryParams)
- .then(response => {
- return {
- headers: response.headers,
- body: ObjectSerializer.deserialize(
- ObjectSerializer.parse(response.body, response.headers["content-type"]),
- "ResponseSuccess", ""
- ) as ResponseSuccess
- }
- });
+ return this.httpClient.call(localVarPath, queryParams).then((response) => {
+ return {
+ headers: response.headers,
+ body: ObjectSerializer.deserialize(
+ ObjectSerializer.parse(
+ response.body,
+ response.headers['content-type']
+ ),
+ 'ResponseSuccess',
+ ''
+ ) as ResponseSuccess,
+ };
+ });
}
-
}
diff --git a/src/api/PlayersApi.ts b/src/api/PlayersApi.ts
index fd7bcc1a..9b74dfe8 100644
--- a/src/api/PlayersApi.ts
+++ b/src/api/PlayersApi.ts
@@ -3,44 +3,30 @@
* Aioz Stream Service
*
* The version of the OpenAPI document: 1.0
- *
+ *
*
* NOTE: This class is auto generated.
* Do not edit the class manually.
*/
-
import path from 'path';
-import {
- existsSync,
- statSync,
- createReadStream,
- openSync,
- read,
- closeSync,
- ReadStream,
-} from 'fs';
-import { promisify } from 'util';
+import { createReadStream } from 'fs';
import { URLSearchParams } from 'url';
import FormData from 'form-data';
-import ObjectSerializer, { COLLECTION_FORMATS } from '../ObjectSerializer';
+import ObjectSerializer from '../ObjectSerializer';
import HttpClient, { QueryOptions, ApiResponseHeaders } from '../HttpClient';
-import ProgressiveSession from '../model/ProgressiveSession';
import AddPlayerThemesToVideoRequest from '../model/AddPlayerThemesToVideoRequest';
import CreatePlayerThemeRequest from '../model/CreatePlayerThemeRequest';
import CreatePlayerThemesResponse from '../model/CreatePlayerThemesResponse';
import GetPlayerThemeByIdResponse from '../model/GetPlayerThemeByIdResponse';
import GetPlayerThemeResponse from '../model/GetPlayerThemeResponse';
import RemovePlayerThemesFromVideoRequest from '../model/RemovePlayerThemesFromVideoRequest';
-import ResponseError from '../model/ResponseError';
import ResponseSuccess from '../model/ResponseSuccess';
import UpdatePlayerThemeRequest from '../model/UpdatePlayerThemeRequest';
import UpdatePlayerThemeResponse from '../model/UpdatePlayerThemeResponse';
import UploadLogoByIdResponse from '../model/UploadLogoByIdResponse';
-import { Readable, Stream } from 'stream';
-import { Blob } from 'buffer';
-import { readableToBuffer } from "../HttpClient";
-import * as crypto from 'crypto';
+import { Readable } from 'stream';
+import { readableToBuffer } from '../HttpClient';
/**
* no description
@@ -52,200 +38,227 @@ export default class PlayersApi {
this.httpClient = httpClient;
}
-
-
/**
* Create a player for your video, and customize it.
* Create a player theme
* @param request Player theme input
*/
- public async create(request: CreatePlayerThemeRequest = {}): Promise {
- return this.createWithResponseHeaders(request).then((res) => res.body);;
+ public async create(
+ request: CreatePlayerThemeRequest = {}
+ ): Promise {
+ return this.createWithResponseHeaders(request).then((res) => res.body);
}
-
/**
* Create a player for your video, and customize it.
* Create a player theme
* @param request Player theme input
*/
- public async createWithResponseHeaders(request: CreatePlayerThemeRequest = {}): Promise< {headers: ApiResponseHeaders, body:CreatePlayerThemesResponse } > {
+ public async createWithResponseHeaders(
+ request: CreatePlayerThemeRequest = {}
+ ): Promise<{
+ headers: ApiResponseHeaders;
+ body: CreatePlayerThemesResponse;
+ }> {
const queryParams: QueryOptions = {};
queryParams.headers = {};
if (request === null || request === undefined) {
- throw new Error('Required parameter request was null or undefined when calling create.');
+ throw new Error(
+ 'Required parameter request was null or undefined when calling create.'
+ );
}
// Path Params
const localVarPath = '/players'.substring(1);
// Body Params
const contentType = ObjectSerializer.getPreferredMediaType([
- "application/json"
+ 'application/json',
]);
- queryParams.headers["Content-Type"] = contentType;
+ queryParams.headers['Content-Type'] = contentType;
queryParams.body = ObjectSerializer.stringify(
- ObjectSerializer.serialize(request, "CreatePlayerThemeRequest", ""),
+ ObjectSerializer.serialize(request, 'CreatePlayerThemeRequest', ''),
contentType
);
queryParams.method = 'POST';
-
- return this.httpClient.call(localVarPath, queryParams)
- .then(response => {
- return {
- headers: response.headers,
- body: ObjectSerializer.deserialize(
- ObjectSerializer.parse(response.body, response.headers["content-type"]),
- "CreatePlayerThemesResponse", ""
- ) as CreatePlayerThemesResponse
- }
- });
+ return this.httpClient.call(localVarPath, queryParams).then((response) => {
+ return {
+ headers: response.headers,
+ body: ObjectSerializer.deserialize(
+ ObjectSerializer.parse(
+ response.body,
+ response.headers['content-type']
+ ),
+ 'CreatePlayerThemesResponse',
+ ''
+ ) as CreatePlayerThemesResponse,
+ };
+ });
}
-
/**
* Retrieve a player theme by its ID, as well as details about it.
* Get a player theme by ID
* @param id Player theme ID
*/
- public async get(id: string): Promise {
- return this.getWithResponseHeaders(id).then((res) => res.body);;
+ public async get(id: string): Promise {
+ return this.getWithResponseHeaders(id).then((res) => res.body);
}
-
/**
* Retrieve a player theme by its ID, as well as details about it.
* Get a player theme by ID
* @param id Player theme ID
*/
- public async getWithResponseHeaders(id: string): Promise< {headers: ApiResponseHeaders, body:GetPlayerThemeByIdResponse } > {
+ public async getWithResponseHeaders(id: string): Promise<{
+ headers: ApiResponseHeaders;
+ body: GetPlayerThemeByIdResponse;
+ }> {
const queryParams: QueryOptions = {};
queryParams.headers = {};
if (id === null || id === undefined) {
- throw new Error('Required parameter id was null or undefined when calling get.');
+ throw new Error(
+ 'Required parameter id was null or undefined when calling get.'
+ );
}
// Path Params
- const localVarPath = '/players/{id}'.substring(1)
+ const localVarPath = '/players/{id}'
+ .substring(1)
.replace('{' + 'id' + '}', encodeURIComponent(String(id)));
-
queryParams.method = 'GET';
-
- return this.httpClient.call(localVarPath, queryParams)
- .then(response => {
- return {
- headers: response.headers,
- body: ObjectSerializer.deserialize(
- ObjectSerializer.parse(response.body, response.headers["content-type"]),
- "GetPlayerThemeByIdResponse", ""
- ) as GetPlayerThemeByIdResponse
- }
- });
+ return this.httpClient.call(localVarPath, queryParams).then((response) => {
+ return {
+ headers: response.headers,
+ body: ObjectSerializer.deserialize(
+ ObjectSerializer.parse(
+ response.body,
+ response.headers['content-type']
+ ),
+ 'GetPlayerThemeByIdResponse',
+ ''
+ ) as GetPlayerThemeByIdResponse,
+ };
+ });
}
-
/**
* Use a player ID to update specific details for a player.
* Update a player theme by ID
* @param id Player theme ID
* @param input Player theme input
*/
- public async update(id: string, input: UpdatePlayerThemeRequest = {}): Promise {
- return this.updateWithResponseHeaders(id, input).then((res) => res.body);;
+ public async update(
+ id: string,
+ input: UpdatePlayerThemeRequest = {}
+ ): Promise {
+ return this.updateWithResponseHeaders(id, input).then((res) => res.body);
}
-
/**
* Use a player ID to update specific details for a player.
* Update a player theme by ID
* @param id Player theme ID
* @param input Player theme input
*/
- public async updateWithResponseHeaders(id: string, input: UpdatePlayerThemeRequest = {}): Promise< {headers: ApiResponseHeaders, body:UpdatePlayerThemeResponse } > {
+ public async updateWithResponseHeaders(
+ id: string,
+ input: UpdatePlayerThemeRequest = {}
+ ): Promise<{ headers: ApiResponseHeaders; body: UpdatePlayerThemeResponse }> {
const queryParams: QueryOptions = {};
queryParams.headers = {};
if (id === null || id === undefined) {
- throw new Error('Required parameter id was null or undefined when calling update.');
+ throw new Error(
+ 'Required parameter id was null or undefined when calling update.'
+ );
}
if (input === null || input === undefined) {
- throw new Error('Required parameter input was null or undefined when calling update.');
+ throw new Error(
+ 'Required parameter input was null or undefined when calling update.'
+ );
}
// Path Params
- const localVarPath = '/players/{id}'.substring(1)
+ const localVarPath = '/players/{id}'
+ .substring(1)
.replace('{' + 'id' + '}', encodeURIComponent(String(id)));
// Body Params
const contentType = ObjectSerializer.getPreferredMediaType([
- "application/json"
+ 'application/json',
]);
- queryParams.headers["Content-Type"] = contentType;
+ queryParams.headers['Content-Type'] = contentType;
queryParams.body = ObjectSerializer.stringify(
- ObjectSerializer.serialize(input, "UpdatePlayerThemeRequest", ""),
+ ObjectSerializer.serialize(input, 'UpdatePlayerThemeRequest', ''),
contentType
);
queryParams.method = 'PATCH';
-
- return this.httpClient.call(localVarPath, queryParams)
- .then(response => {
- return {
- headers: response.headers,
- body: ObjectSerializer.deserialize(
- ObjectSerializer.parse(response.body, response.headers["content-type"]),
- "UpdatePlayerThemeResponse", ""
- ) as UpdatePlayerThemeResponse
- }
- });
+ return this.httpClient.call(localVarPath, queryParams).then((response) => {
+ return {
+ headers: response.headers,
+ body: ObjectSerializer.deserialize(
+ ObjectSerializer.parse(
+ response.body,
+ response.headers['content-type']
+ ),
+ 'UpdatePlayerThemeResponse',
+ ''
+ ) as UpdatePlayerThemeResponse,
+ };
+ });
}
-
/**
* Delete a player if you no longer need it. You can delete any player that you have the player ID for.
* Delete a player theme by ID
* @param id Player theme ID
*/
- public async delete(id: string): Promise {
- return this.deleteWithResponseHeaders(id).then((res) => res.body);;
+ public async delete(id: string): Promise {
+ return this.deleteWithResponseHeaders(id).then((res) => res.body);
}
-
/**
* Delete a player if you no longer need it. You can delete any player that you have the player ID for.
* Delete a player theme by ID
* @param id Player theme ID
*/
- public async deleteWithResponseHeaders(id: string): Promise< {headers: ApiResponseHeaders, body:ResponseSuccess } > {
+ public async deleteWithResponseHeaders(
+ id: string
+ ): Promise<{ headers: ApiResponseHeaders; body: ResponseSuccess }> {
const queryParams: QueryOptions = {};
queryParams.headers = {};
if (id === null || id === undefined) {
- throw new Error('Required parameter id was null or undefined when calling delete.');
+ throw new Error(
+ 'Required parameter id was null or undefined when calling delete.'
+ );
}
// Path Params
- const localVarPath = '/players/{id}'.substring(1)
+ const localVarPath = '/players/{id}'
+ .substring(1)
.replace('{' + 'id' + '}', encodeURIComponent(String(id)));
-
queryParams.method = 'DELETE';
-
- return this.httpClient.call(localVarPath, queryParams)
- .then(response => {
- return {
- headers: response.headers,
- body: ObjectSerializer.deserialize(
- ObjectSerializer.parse(response.body, response.headers["content-type"]),
- "ResponseSuccess", ""
- ) as ResponseSuccess
- }
- });
+ return this.httpClient.call(localVarPath, queryParams).then((response) => {
+ return {
+ headers: response.headers,
+ body: ObjectSerializer.deserialize(
+ ObjectSerializer.parse(
+ response.body,
+ response.headers['content-type']
+ ),
+ 'ResponseSuccess',
+ ''
+ ) as ResponseSuccess,
+ };
+ });
}
-
/**
* Retrieve a list of all the player themes you created, as well as details about each one.
* List all player themes
@@ -256,11 +269,18 @@ export default class PlayersApi {
* @param { number } searchParams.offset offset, allowed values greater than or equal to 0. Default(0)
* @param { number } searchParams.limit results per page. Allowed values 1-100, default is 25
*/
- public async list(args: { search?: string, sortBy?: 'created_at' | 'name', orderBy?: 'asc' | 'desc', offset?: number, limit?: number } = {}): Promise {
+ public async list(
+ args: {
+ search?: string;
+ sortBy?: 'created_at' | 'name';
+ orderBy?: 'asc' | 'desc';
+ offset?: number;
+ limit?: number;
+ } = {}
+ ): Promise {
return this.listWithResponseHeaders(args).then((res) => res.body);
}
-
/**
* Retrieve a list of all the player themes you created, as well as details about each one.
* List all player themes
@@ -271,7 +291,22 @@ export default class PlayersApi {
* @param { number } searchParams.offset offset, allowed values greater than or equal to 0. Default(0)
* @param { number } searchParams.limit results per page. Allowed values 1-100, default is 25
*/
- public async listWithResponseHeaders({ search, sortBy, orderBy, offset, limit }: { search?: string, sortBy?: 'created_at' | 'name', orderBy?: 'asc' | 'desc', offset?: number, limit?: number } = {}): Promise< {headers: ApiResponseHeaders, body:GetPlayerThemeResponse } > {
+ public async listWithResponseHeaders({
+ search,
+ sortBy,
+ orderBy,
+ offset,
+ limit,
+ }: {
+ search?: string;
+ sortBy?: 'created_at' | 'name';
+ orderBy?: 'asc' | 'desc';
+ offset?: number;
+ limit?: number;
+ } = {}): Promise<{
+ headers: ApiResponseHeaders;
+ body: GetPlayerThemeResponse;
+ }> {
const queryParams: QueryOptions = {};
queryParams.headers = {};
// Path Params
@@ -281,45 +316,55 @@ export default class PlayersApi {
const urlSearchParams = new URLSearchParams();
if (search !== undefined) {
-
- urlSearchParams.append("search", ObjectSerializer.serialize(search, "string", ""));
+ urlSearchParams.append(
+ 'search',
+ ObjectSerializer.serialize(search, 'string', '')
+ );
}
if (sortBy !== undefined) {
-
- urlSearchParams.append("sort_by", ObjectSerializer.serialize(sortBy, "'created_at' | 'name'", ""));
+ urlSearchParams.append(
+ 'sort_by',
+ ObjectSerializer.serialize(sortBy, "'created_at' | 'name'", '')
+ );
}
if (orderBy !== undefined) {
-
- urlSearchParams.append("order_by", ObjectSerializer.serialize(orderBy, "'asc' | 'desc'", ""));
+ urlSearchParams.append(
+ 'order_by',
+ ObjectSerializer.serialize(orderBy, "'asc' | 'desc'", '')
+ );
}
if (offset !== undefined) {
-
- urlSearchParams.append("offset", ObjectSerializer.serialize(offset, "number", ""));
+ urlSearchParams.append(
+ 'offset',
+ ObjectSerializer.serialize(offset, 'number', '')
+ );
}
if (limit !== undefined) {
-
- urlSearchParams.append("limit", ObjectSerializer.serialize(limit, "number", ""));
+ urlSearchParams.append(
+ 'limit',
+ ObjectSerializer.serialize(limit, 'number', '')
+ );
}
queryParams.searchParams = urlSearchParams;
-
queryParams.method = 'GET';
-
- return this.httpClient.call(localVarPath, queryParams)
- .then(response => {
- return {
- headers: response.headers,
- body: ObjectSerializer.deserialize(
- ObjectSerializer.parse(response.body, response.headers["content-type"]),
- "GetPlayerThemeResponse", ""
- ) as GetPlayerThemeResponse
- }
- });
+ return this.httpClient.call(localVarPath, queryParams).then((response) => {
+ return {
+ headers: response.headers,
+ body: ObjectSerializer.deserialize(
+ ObjectSerializer.parse(
+ response.body,
+ response.headers['content-type']
+ ),
+ 'GetPlayerThemeResponse',
+ ''
+ ) as GetPlayerThemeResponse,
+ };
+ });
}
-
/**
* Upload a logo for a player theme by its ID.
* Upload a logo for a player theme by ID
@@ -327,11 +372,16 @@ export default class PlayersApi {
* @param file The uploaded file (JPG or PNG)
* @param link The link to the logo (optional if a file is provided)
*/
- public async uploadLogo(id: string, file: string | Readable | Buffer, link: string): Promise {
- return this.uploadLogoWithResponseHeaders(id, file, link).then((res) => res.body);;
+ public async uploadLogo(
+ id: string,
+ file: string | Readable | Buffer,
+ link: string
+ ): Promise {
+ return this.uploadLogoWithResponseHeaders(id, file, link).then(
+ (res) => res.body
+ );
}
-
/**
* Upload a logo for a player theme by its ID.
* Upload a logo for a player theme by ID
@@ -339,195 +389,227 @@ export default class PlayersApi {
* @param file The uploaded file (JPG or PNG)
* @param link The link to the logo (optional if a file is provided)
*/
- public async uploadLogoWithResponseHeaders(id: string, file: string | Readable | Buffer, link: string): Promise< {headers: ApiResponseHeaders, body:UploadLogoByIdResponse } > {
+ public async uploadLogoWithResponseHeaders(
+ id: string,
+ file: string | Readable | Buffer,
+ link: string
+ ): Promise<{ headers: ApiResponseHeaders; body: UploadLogoByIdResponse }> {
const queryParams: QueryOptions = {};
queryParams.headers = {};
if (id === null || id === undefined) {
- throw new Error('Required parameter id was null or undefined when calling uploadLogo.');
+ throw new Error(
+ 'Required parameter id was null or undefined when calling uploadLogo.'
+ );
}
let fileName = 'file';
let fileBuffer = file;
if (typeof file === 'string') {
- fileName = path.basename(file);
- fileBuffer = createReadStream(file);
+ fileName = path.basename(file);
+ fileBuffer = createReadStream(file);
}
if (file instanceof Readable) {
- fileBuffer = await readableToBuffer(file);
+ fileBuffer = await readableToBuffer(file);
}
if (link === null || link === undefined) {
- throw new Error('Required parameter link was null or undefined when calling uploadLogo.');
+ throw new Error(
+ 'Required parameter link was null or undefined when calling uploadLogo.'
+ );
}
// Path Params
- const localVarPath = '/players/{id}/logo'.substring(1)
+ const localVarPath = '/players/{id}/logo'
+ .substring(1)
.replace('{' + 'id' + '}', encodeURIComponent(String(id)));
-
queryParams.method = 'POST';
const formData = new FormData();
- formData.append(fileName, fileBuffer, fileName);
+ formData.append(fileName, fileBuffer, fileName);
- if (typeof link !== undefined) {
- formData.append('link', link);
- }
+ if (typeof link !== undefined) {
+ formData.append('link', link);
+ }
queryParams.body = formData;
- return this.httpClient.call(localVarPath, queryParams)
- .then(response => {
- return {
- headers: response.headers,
- body: ObjectSerializer.deserialize(
- ObjectSerializer.parse(response.body, response.headers["content-type"]),
- "UploadLogoByIdResponse", ""
- ) as UploadLogoByIdResponse
- }
- });
+ return this.httpClient.call(localVarPath, queryParams).then((response) => {
+ return {
+ headers: response.headers,
+ body: ObjectSerializer.deserialize(
+ ObjectSerializer.parse(
+ response.body,
+ response.headers['content-type']
+ ),
+ 'UploadLogoByIdResponse',
+ ''
+ ) as UploadLogoByIdResponse,
+ };
+ });
}
-
/**
* Delete the logo associated to a player.
* Delete a logo for a player theme by ID
* @param id Player theme ID
*/
- public async deleteLogo(id: string): Promise {
- return this.deleteLogoWithResponseHeaders(id).then((res) => res.body);;
+ public async deleteLogo(id: string): Promise {
+ return this.deleteLogoWithResponseHeaders(id).then((res) => res.body);
}
-
/**
* Delete the logo associated to a player.
* Delete a logo for a player theme by ID
* @param id Player theme ID
*/
- public async deleteLogoWithResponseHeaders(id: string): Promise< {headers: ApiResponseHeaders, body:ResponseSuccess } > {
+ public async deleteLogoWithResponseHeaders(
+ id: string
+ ): Promise<{ headers: ApiResponseHeaders; body: ResponseSuccess }> {
const queryParams: QueryOptions = {};
queryParams.headers = {};
if (id === null || id === undefined) {
- throw new Error('Required parameter id was null or undefined when calling deleteLogo.');
+ throw new Error(
+ 'Required parameter id was null or undefined when calling deleteLogo.'
+ );
}
// Path Params
- const localVarPath = '/players/{id}/logo'.substring(1)
+ const localVarPath = '/players/{id}/logo'
+ .substring(1)
.replace('{' + 'id' + '}', encodeURIComponent(String(id)));
-
queryParams.method = 'DELETE';
-
- return this.httpClient.call(localVarPath, queryParams)
- .then(response => {
- return {
- headers: response.headers,
- body: ObjectSerializer.deserialize(
- ObjectSerializer.parse(response.body, response.headers["content-type"]),
- "ResponseSuccess", ""
- ) as ResponseSuccess
- }
- });
+ return this.httpClient.call(localVarPath, queryParams).then((response) => {
+ return {
+ headers: response.headers,
+ body: ObjectSerializer.deserialize(
+ ObjectSerializer.parse(
+ response.body,
+ response.headers['content-type']
+ ),
+ 'ResponseSuccess',
+ ''
+ ) as ResponseSuccess,
+ };
+ });
}
-
/**
* Add a player theme to a video by Id.
* Add a player theme to a video
* @param request Add player theme to video request
*/
- public async addPlayer(request: AddPlayerThemesToVideoRequest = {}): Promise {
- return this.addPlayerWithResponseHeaders(request).then((res) => res.body);;
+ public async addPlayer(
+ request: AddPlayerThemesToVideoRequest = {}
+ ): Promise {
+ return this.addPlayerWithResponseHeaders(request).then((res) => res.body);
}
-
/**
* Add a player theme to a video by Id.
* Add a player theme to a video
* @param request Add player theme to video request
*/
- public async addPlayerWithResponseHeaders(request: AddPlayerThemesToVideoRequest = {}): Promise< {headers: ApiResponseHeaders, body:ResponseSuccess } > {
+ public async addPlayerWithResponseHeaders(
+ request: AddPlayerThemesToVideoRequest = {}
+ ): Promise<{ headers: ApiResponseHeaders; body: ResponseSuccess }> {
const queryParams: QueryOptions = {};
queryParams.headers = {};
if (request === null || request === undefined) {
- throw new Error('Required parameter request was null or undefined when calling addPlayer.');
+ throw new Error(
+ 'Required parameter request was null or undefined when calling addPlayer.'
+ );
}
// Path Params
const localVarPath = '/players/add-player'.substring(1);
// Body Params
const contentType = ObjectSerializer.getPreferredMediaType([
- "application/json"
+ 'application/json',
]);
- queryParams.headers["Content-Type"] = contentType;
+ queryParams.headers['Content-Type'] = contentType;
queryParams.body = ObjectSerializer.stringify(
- ObjectSerializer.serialize(request, "AddPlayerThemesToVideoRequest", ""),
+ ObjectSerializer.serialize(request, 'AddPlayerThemesToVideoRequest', ''),
contentType
);
queryParams.method = 'POST';
-
- return this.httpClient.call(localVarPath, queryParams)
- .then(response => {
- return {
- headers: response.headers,
- body: ObjectSerializer.deserialize(
- ObjectSerializer.parse(response.body, response.headers["content-type"]),
- "ResponseSuccess", ""
- ) as ResponseSuccess
- }
- });
+ return this.httpClient.call(localVarPath, queryParams).then((response) => {
+ return {
+ headers: response.headers,
+ body: ObjectSerializer.deserialize(
+ ObjectSerializer.parse(
+ response.body,
+ response.headers['content-type']
+ ),
+ 'ResponseSuccess',
+ ''
+ ) as ResponseSuccess,
+ };
+ });
}
-
/**
* Remove a player theme from a video by Id.
* Remove a player theme from a video
* @param request Remove player theme from video request
*/
- public async removePlayer(request: RemovePlayerThemesFromVideoRequest = {}): Promise {
- return this.removePlayerWithResponseHeaders(request).then((res) => res.body);;
+ public async removePlayer(
+ request: RemovePlayerThemesFromVideoRequest = {}
+ ): Promise {
+ return this.removePlayerWithResponseHeaders(request).then(
+ (res) => res.body
+ );
}
-
/**
* Remove a player theme from a video by Id.
* Remove a player theme from a video
* @param request Remove player theme from video request
*/
- public async removePlayerWithResponseHeaders(request: RemovePlayerThemesFromVideoRequest = {}): Promise< {headers: ApiResponseHeaders, body:ResponseSuccess } > {
+ public async removePlayerWithResponseHeaders(
+ request: RemovePlayerThemesFromVideoRequest = {}
+ ): Promise<{ headers: ApiResponseHeaders; body: ResponseSuccess }> {
const queryParams: QueryOptions = {};
queryParams.headers = {};
if (request === null || request === undefined) {
- throw new Error('Required parameter request was null or undefined when calling removePlayer.');
+ throw new Error(
+ 'Required parameter request was null or undefined when calling removePlayer.'
+ );
}
// Path Params
const localVarPath = '/players/remove-player'.substring(1);
// Body Params
const contentType = ObjectSerializer.getPreferredMediaType([
- "application/json"
+ 'application/json',
]);
- queryParams.headers["Content-Type"] = contentType;
+ queryParams.headers['Content-Type'] = contentType;
queryParams.body = ObjectSerializer.stringify(
- ObjectSerializer.serialize(request, "RemovePlayerThemesFromVideoRequest", ""),
+ ObjectSerializer.serialize(
+ request,
+ 'RemovePlayerThemesFromVideoRequest',
+ ''
+ ),
contentType
);
queryParams.method = 'POST';
-
- return this.httpClient.call(localVarPath, queryParams)
- .then(response => {
- return {
- headers: response.headers,
- body: ObjectSerializer.deserialize(
- ObjectSerializer.parse(response.body, response.headers["content-type"]),
- "ResponseSuccess", ""
- ) as ResponseSuccess
- }
- });
+ return this.httpClient.call(localVarPath, queryParams).then((response) => {
+ return {
+ headers: response.headers,
+ body: ObjectSerializer.deserialize(
+ ObjectSerializer.parse(
+ response.body,
+ response.headers['content-type']
+ ),
+ 'ResponseSuccess',
+ ''
+ ) as ResponseSuccess,
+ };
+ });
}
-
}
diff --git a/src/api/PlaylistApi.ts b/src/api/PlaylistApi.ts
index 67269cbe..24710cbb 100644
--- a/src/api/PlaylistApi.ts
+++ b/src/api/PlaylistApi.ts
@@ -3,29 +3,18 @@
* Aioz Stream Service
*
* The version of the OpenAPI document: 1.0
- *
+ *
*
* NOTE: This class is auto generated.
* Do not edit the class manually.
*/
-
import path from 'path';
-import {
- existsSync,
- statSync,
- createReadStream,
- openSync,
- read,
- closeSync,
- ReadStream,
-} from 'fs';
-import { promisify } from 'util';
+import { createReadStream } from 'fs';
import { URLSearchParams } from 'url';
import FormData from 'form-data';
import ObjectSerializer, { COLLECTION_FORMATS } from '../ObjectSerializer';
import HttpClient, { QueryOptions, ApiResponseHeaders } from '../HttpClient';
-import ProgressiveSession from '../model/ProgressiveSession';
import AddVideoToPlaylistRequest from '../model/AddVideoToPlaylistRequest';
import CreatePlaylistRequest from '../model/CreatePlaylistRequest';
import CreatePlaylistResponse from '../model/CreatePlaylistResponse';
@@ -35,12 +24,9 @@ import GetPlaylistListResponse from '../model/GetPlaylistListResponse';
import Metadata from '../model/Metadata';
import MoveVideoInPlaylistRequest from '../model/MoveVideoInPlaylistRequest';
import PublicPlaylistObject from '../model/PublicPlaylistObject';
-import ResponseError from '../model/ResponseError';
import ResponseSuccess from '../model/ResponseSuccess';
-import { Readable, Stream } from 'stream';
-import { Blob } from 'buffer';
-import { readableToBuffer } from "../HttpClient";
-import * as crypto from 'crypto';
+import { Readable } from 'stream';
+import { readableToBuffer } from '../HttpClient';
/**
* no description
@@ -52,200 +38,231 @@ export default class PlaylistApi {
this.httpClient = httpClient;
}
-
-
/**
* Add a specific video to a playlist for the authenticated user
* Add a video to a playlist
* @param id Playlist ID
* @param payload Video details
*/
- public async addVideoToPlaylist(id: string, payload: AddVideoToPlaylistRequest = {}): Promise {
- return this.addVideoToPlaylistWithResponseHeaders(id, payload).then((res) => res.body);;
+ public async addVideoToPlaylist(
+ id: string,
+ payload: AddVideoToPlaylistRequest = {}
+ ): Promise {
+ return this.addVideoToPlaylistWithResponseHeaders(id, payload).then(
+ (res) => res.body
+ );
}
-
/**
* Add a specific video to a playlist for the authenticated user
* Add a video to a playlist
* @param id Playlist ID
* @param payload Video details
*/
- public async addVideoToPlaylistWithResponseHeaders(id: string, payload: AddVideoToPlaylistRequest = {}): Promise< {headers: ApiResponseHeaders, body:ResponseSuccess } > {
+ public async addVideoToPlaylistWithResponseHeaders(
+ id: string,
+ payload: AddVideoToPlaylistRequest = {}
+ ): Promise<{ headers: ApiResponseHeaders; body: ResponseSuccess }> {
const queryParams: QueryOptions = {};
queryParams.headers = {};
if (id === null || id === undefined) {
- throw new Error('Required parameter id was null or undefined when calling addVideoToPlaylist.');
+ throw new Error(
+ 'Required parameter id was null or undefined when calling addVideoToPlaylist.'
+ );
}
if (payload === null || payload === undefined) {
- throw new Error('Required parameter payload was null or undefined when calling addVideoToPlaylist.');
+ throw new Error(
+ 'Required parameter payload was null or undefined when calling addVideoToPlaylist.'
+ );
}
// Path Params
- const localVarPath = '/playlists/{id}/items'.substring(1)
+ const localVarPath = '/playlists/{id}/items'
+ .substring(1)
.replace('{' + 'id' + '}', encodeURIComponent(String(id)));
// Body Params
const contentType = ObjectSerializer.getPreferredMediaType([
- "application/json"
+ 'application/json',
]);
- queryParams.headers["Content-Type"] = contentType;
+ queryParams.headers['Content-Type'] = contentType;
queryParams.body = ObjectSerializer.stringify(
- ObjectSerializer.serialize(payload, "AddVideoToPlaylistRequest", ""),
+ ObjectSerializer.serialize(payload, 'AddVideoToPlaylistRequest', ''),
contentType
);
queryParams.method = 'POST';
-
- return this.httpClient.call(localVarPath, queryParams)
- .then(response => {
- return {
- headers: response.headers,
- body: ObjectSerializer.deserialize(
- ObjectSerializer.parse(response.body, response.headers["content-type"]),
- "ResponseSuccess", ""
- ) as ResponseSuccess
- }
- });
+ return this.httpClient.call(localVarPath, queryParams).then((response) => {
+ return {
+ headers: response.headers,
+ body: ObjectSerializer.deserialize(
+ ObjectSerializer.parse(
+ response.body,
+ response.headers['content-type']
+ ),
+ 'ResponseSuccess',
+ ''
+ ) as ResponseSuccess,
+ };
+ });
}
-
/**
* Create a playlist for the authenticated user
* Create a playlist
* @param request Playlist input
*/
- public async createPlaylist(request: CreatePlaylistRequest = {}): Promise {
- return this.createPlaylistWithResponseHeaders(request).then((res) => res.body);;
+ public async createPlaylist(
+ request: CreatePlaylistRequest = {}
+ ): Promise {
+ return this.createPlaylistWithResponseHeaders(request).then(
+ (res) => res.body
+ );
}
-
/**
* Create a playlist for the authenticated user
* Create a playlist
* @param request Playlist input
*/
- public async createPlaylistWithResponseHeaders(request: CreatePlaylistRequest = {}): Promise< {headers: ApiResponseHeaders, body:CreatePlaylistResponse } > {
+ public async createPlaylistWithResponseHeaders(
+ request: CreatePlaylistRequest = {}
+ ): Promise<{ headers: ApiResponseHeaders; body: CreatePlaylistResponse }> {
const queryParams: QueryOptions = {};
queryParams.headers = {};
if (request === null || request === undefined) {
- throw new Error('Required parameter request was null or undefined when calling createPlaylist.');
+ throw new Error(
+ 'Required parameter request was null or undefined when calling createPlaylist.'
+ );
}
// Path Params
const localVarPath = '/playlists/create'.substring(1);
// Body Params
const contentType = ObjectSerializer.getPreferredMediaType([
- "application/json"
+ 'application/json',
]);
- queryParams.headers["Content-Type"] = contentType;
+ queryParams.headers['Content-Type'] = contentType;
queryParams.body = ObjectSerializer.stringify(
- ObjectSerializer.serialize(request, "CreatePlaylistRequest", ""),
+ ObjectSerializer.serialize(request, 'CreatePlaylistRequest', ''),
contentType
);
queryParams.method = 'POST';
-
- return this.httpClient.call(localVarPath, queryParams)
- .then(response => {
- return {
- headers: response.headers,
- body: ObjectSerializer.deserialize(
- ObjectSerializer.parse(response.body, response.headers["content-type"]),
- "CreatePlaylistResponse", ""
- ) as CreatePlaylistResponse
- }
- });
+ return this.httpClient.call(localVarPath, queryParams).then((response) => {
+ return {
+ headers: response.headers,
+ body: ObjectSerializer.deserialize(
+ ObjectSerializer.parse(
+ response.body,
+ response.headers['content-type']
+ ),
+ 'CreatePlaylistResponse',
+ ''
+ ) as CreatePlaylistResponse,
+ };
+ });
}
-
/**
* Delete a specific playlist by its ID for the authenticated user
* Delete a playlist by ID
* @param id Playlist ID
*/
- public async deletePlaylistById(id: string): Promise {
- return this.deletePlaylistByIdWithResponseHeaders(id).then((res) => res.body);;
+ public async deletePlaylistById(id: string): Promise {
+ return this.deletePlaylistByIdWithResponseHeaders(id).then(
+ (res) => res.body
+ );
}
-
/**
* Delete a specific playlist by its ID for the authenticated user
* Delete a playlist by ID
* @param id Playlist ID
*/
- public async deletePlaylistByIdWithResponseHeaders(id: string): Promise< {headers: ApiResponseHeaders, body:ResponseSuccess } > {
+ public async deletePlaylistByIdWithResponseHeaders(
+ id: string
+ ): Promise<{ headers: ApiResponseHeaders; body: ResponseSuccess }> {
const queryParams: QueryOptions = {};
queryParams.headers = {};
if (id === null || id === undefined) {
- throw new Error('Required parameter id was null or undefined when calling deletePlaylistById.');
+ throw new Error(
+ 'Required parameter id was null or undefined when calling deletePlaylistById.'
+ );
}
// Path Params
- const localVarPath = '/playlists/{id}'.substring(1)
+ const localVarPath = '/playlists/{id}'
+ .substring(1)
.replace('{' + 'id' + '}', encodeURIComponent(String(id)));
-
queryParams.method = 'DELETE';
-
- return this.httpClient.call(localVarPath, queryParams)
- .then(response => {
- return {
- headers: response.headers,
- body: ObjectSerializer.deserialize(
- ObjectSerializer.parse(response.body, response.headers["content-type"]),
- "ResponseSuccess", ""
- ) as ResponseSuccess
- }
- });
+ return this.httpClient.call(localVarPath, queryParams).then((response) => {
+ return {
+ headers: response.headers,
+ body: ObjectSerializer.deserialize(
+ ObjectSerializer.parse(
+ response.body,
+ response.headers['content-type']
+ ),
+ 'ResponseSuccess',
+ ''
+ ) as ResponseSuccess,
+ };
+ });
}
-
/**
* Delete the thumbnail of a specific playlist for the authenticated user
* Delete a playlist thumbnail
* @param id Playlist ID
*/
- public async deletePlaylistThumbnail(id: string): Promise {
- return this.deletePlaylistThumbnailWithResponseHeaders(id).then((res) => res.body);;
+ public async deletePlaylistThumbnail(id: string): Promise {
+ return this.deletePlaylistThumbnailWithResponseHeaders(id).then(
+ (res) => res.body
+ );
}
-
/**
* Delete the thumbnail of a specific playlist for the authenticated user
* Delete a playlist thumbnail
* @param id Playlist ID
*/
- public async deletePlaylistThumbnailWithResponseHeaders(id: string): Promise< {headers: ApiResponseHeaders, body:ResponseSuccess } > {
+ public async deletePlaylistThumbnailWithResponseHeaders(
+ id: string
+ ): Promise<{ headers: ApiResponseHeaders; body: ResponseSuccess }> {
const queryParams: QueryOptions = {};
queryParams.headers = {};
if (id === null || id === undefined) {
- throw new Error('Required parameter id was null or undefined when calling deletePlaylistThumbnail.');
+ throw new Error(
+ 'Required parameter id was null or undefined when calling deletePlaylistThumbnail.'
+ );
}
// Path Params
- const localVarPath = '/playlists/{id}/thumbnail'.substring(1)
+ const localVarPath = '/playlists/{id}/thumbnail'
+ .substring(1)
.replace('{' + 'id' + '}', encodeURIComponent(String(id)));
-
queryParams.method = 'DELETE';
-
- return this.httpClient.call(localVarPath, queryParams)
- .then(response => {
- return {
- headers: response.headers,
- body: ObjectSerializer.deserialize(
- ObjectSerializer.parse(response.body, response.headers["content-type"]),
- "ResponseSuccess", ""
- ) as ResponseSuccess
- }
- });
+ return this.httpClient.call(localVarPath, queryParams).then((response) => {
+ return {
+ headers: response.headers,
+ body: ObjectSerializer.deserialize(
+ ObjectSerializer.parse(
+ response.body,
+ response.headers['content-type']
+ ),
+ 'ResponseSuccess',
+ ''
+ ) as ResponseSuccess,
+ };
+ });
}
-
/**
* Retrieve a specific playlist by its ID for the current user.
* Get playlist by ID
@@ -254,11 +271,16 @@ export default class PlaylistApi {
* @param { 'created_at' | 'title' | 'duration' } searchParams.sortBy sort by
* @param { 'asc' | 'desc' } searchParams.orderBy allowed: asc, desc. Default: asc
*/
- public async getPlaylistById(args: { id: string, sortBy?: 'created_at' | 'title' | 'duration', orderBy?: 'asc' | 'desc' }): Promise {
- return this.getPlaylistByIdWithResponseHeaders(args).then((res) => res.body);
+ public async getPlaylistById(args: {
+ id: string;
+ sortBy?: 'created_at' | 'title' | 'duration';
+ orderBy?: 'asc' | 'desc';
+ }): Promise {
+ return this.getPlaylistByIdWithResponseHeaders(args).then(
+ (res) => res.body
+ );
}
-
/**
* Retrieve a specific playlist by its ID for the current user.
* Get playlist by ID
@@ -267,316 +289,397 @@ export default class PlaylistApi {
* @param { 'created_at' | 'title' | 'duration' } searchParams.sortBy sort by
* @param { 'asc' | 'desc' } searchParams.orderBy allowed: asc, desc. Default: asc
*/
- public async getPlaylistByIdWithResponseHeaders({ id, sortBy, orderBy }: { id: string, sortBy?: 'created_at' | 'title' | 'duration', orderBy?: 'asc' | 'desc' }): Promise< {headers: ApiResponseHeaders, body:GetPlaylistByIdResponse } > {
+ public async getPlaylistByIdWithResponseHeaders({
+ id,
+ sortBy,
+ orderBy,
+ }: {
+ id: string;
+ sortBy?: 'created_at' | 'title' | 'duration';
+ orderBy?: 'asc' | 'desc';
+ }): Promise<{ headers: ApiResponseHeaders; body: GetPlaylistByIdResponse }> {
const queryParams: QueryOptions = {};
queryParams.headers = {};
if (id === null || id === undefined) {
- throw new Error('Required parameter id was null or undefined when calling getPlaylistById.');
+ throw new Error(
+ 'Required parameter id was null or undefined when calling getPlaylistById.'
+ );
}
// Path Params
- const localVarPath = '/playlists/{id}'.substring(1)
+ const localVarPath = '/playlists/{id}'
+ .substring(1)
.replace('{' + 'id' + '}', encodeURIComponent(String(id)));
// Query Params
const urlSearchParams = new URLSearchParams();
if (sortBy !== undefined) {
-
- urlSearchParams.append("sort_by", ObjectSerializer.serialize(sortBy, "'created_at' | 'title' | 'duration'", ""));
+ urlSearchParams.append(
+ 'sort_by',
+ ObjectSerializer.serialize(
+ sortBy,
+ "'created_at' | 'title' | 'duration'",
+ ''
+ )
+ );
}
if (orderBy !== undefined) {
-
- urlSearchParams.append("order_by", ObjectSerializer.serialize(orderBy, "'asc' | 'desc'", ""));
+ urlSearchParams.append(
+ 'order_by',
+ ObjectSerializer.serialize(orderBy, "'asc' | 'desc'", '')
+ );
}
queryParams.searchParams = urlSearchParams;
-
queryParams.method = 'GET';
-
- return this.httpClient.call(localVarPath, queryParams)
- .then(response => {
- return {
- headers: response.headers,
- body: ObjectSerializer.deserialize(
- ObjectSerializer.parse(response.body, response.headers["content-type"]),
- "GetPlaylistByIdResponse", ""
- ) as GetPlaylistByIdResponse
- }
- });
+ return this.httpClient.call(localVarPath, queryParams).then((response) => {
+ return {
+ headers: response.headers,
+ body: ObjectSerializer.deserialize(
+ ObjectSerializer.parse(
+ response.body,
+ response.headers['content-type']
+ ),
+ 'GetPlaylistByIdResponse',
+ ''
+ ) as GetPlaylistByIdResponse,
+ };
+ });
}
-
/**
* Get a specific playlist public by its ID
* Get a playlist public
* @param id Playlist ID
*/
- public async getPlaylistPublicInfo(id: string): Promise {
- return this.getPlaylistPublicInfoWithResponseHeaders(id).then((res) => res.body);;
+ public async getPlaylistPublicInfo(
+ id: string
+ ): Promise {
+ return this.getPlaylistPublicInfoWithResponseHeaders(id).then(
+ (res) => res.body
+ );
}
-
/**
* Get a specific playlist public by its ID
* Get a playlist public
* @param id Playlist ID
*/
- public async getPlaylistPublicInfoWithResponseHeaders(id: string): Promise< {headers: ApiResponseHeaders, body:PublicPlaylistObject } > {
+ public async getPlaylistPublicInfoWithResponseHeaders(
+ id: string
+ ): Promise<{ headers: ApiResponseHeaders; body: PublicPlaylistObject }> {
const queryParams: QueryOptions = {};
queryParams.headers = {};
if (id === null || id === undefined) {
- throw new Error('Required parameter id was null or undefined when calling getPlaylistPublicInfo.');
+ throw new Error(
+ 'Required parameter id was null or undefined when calling getPlaylistPublicInfo.'
+ );
}
// Path Params
- const localVarPath = '/playlists/{id}/player.json'.substring(1)
+ const localVarPath = '/playlists/{id}/player.json'
+ .substring(1)
.replace('{' + 'id' + '}', encodeURIComponent(String(id)));
-
queryParams.method = 'GET';
-
- return this.httpClient.call(localVarPath, queryParams)
- .then(response => {
- return {
- headers: response.headers,
- body: ObjectSerializer.deserialize(
- ObjectSerializer.parse(response.body, response.headers["content-type"]),
- "PublicPlaylistObject", ""
- ) as PublicPlaylistObject
- }
- });
+ return this.httpClient.call(localVarPath, queryParams).then((response) => {
+ return {
+ headers: response.headers,
+ body: ObjectSerializer.deserialize(
+ ObjectSerializer.parse(
+ response.body,
+ response.headers['content-type']
+ ),
+ 'PublicPlaylistObject',
+ ''
+ ) as PublicPlaylistObject,
+ };
+ });
}
-
/**
* Retrieve a list of playlists for the authenticated user
* Get user's playlists
* @param request Playlist filter
*/
- public async getPlaylists(request: GetPlaylistListRequest = {}): Promise {
- return this.getPlaylistsWithResponseHeaders(request).then((res) => res.body);;
+ public async getPlaylists(
+ request: GetPlaylistListRequest = {}
+ ): Promise {
+ return this.getPlaylistsWithResponseHeaders(request).then(
+ (res) => res.body
+ );
}
-
/**
* Retrieve a list of playlists for the authenticated user
* Get user's playlists
* @param request Playlist filter
*/
- public async getPlaylistsWithResponseHeaders(request: GetPlaylistListRequest = {}): Promise< {headers: ApiResponseHeaders, body:GetPlaylistListResponse } > {
+ public async getPlaylistsWithResponseHeaders(
+ request: GetPlaylistListRequest = {}
+ ): Promise<{ headers: ApiResponseHeaders; body: GetPlaylistListResponse }> {
const queryParams: QueryOptions = {};
queryParams.headers = {};
if (request === null || request === undefined) {
- throw new Error('Required parameter request was null or undefined when calling getPlaylists.');
+ throw new Error(
+ 'Required parameter request was null or undefined when calling getPlaylists.'
+ );
}
// Path Params
const localVarPath = '/playlists'.substring(1);
// Body Params
const contentType = ObjectSerializer.getPreferredMediaType([
- "application/json"
+ 'application/json',
]);
- queryParams.headers["Content-Type"] = contentType;
+ queryParams.headers['Content-Type'] = contentType;
queryParams.body = ObjectSerializer.stringify(
- ObjectSerializer.serialize(request, "GetPlaylistListRequest", ""),
+ ObjectSerializer.serialize(request, 'GetPlaylistListRequest', ''),
contentType
);
queryParams.method = 'POST';
-
- return this.httpClient.call(localVarPath, queryParams)
- .then(response => {
- return {
- headers: response.headers,
- body: ObjectSerializer.deserialize(
- ObjectSerializer.parse(response.body, response.headers["content-type"]),
- "GetPlaylistListResponse", ""
- ) as GetPlaylistListResponse
- }
- });
+ return this.httpClient.call(localVarPath, queryParams).then((response) => {
+ return {
+ headers: response.headers,
+ body: ObjectSerializer.deserialize(
+ ObjectSerializer.parse(
+ response.body,
+ response.headers['content-type']
+ ),
+ 'GetPlaylistListResponse',
+ ''
+ ) as GetPlaylistListResponse,
+ };
+ });
}
-
/**
* Move a specific video in a playlist for the authenticated user
* Move a video in a playlist
* @param id Playlist ID
* @param payload Video details
*/
- public async moveVideoInPlaylist(id: string, payload: MoveVideoInPlaylistRequest = {}): Promise {
- return this.moveVideoInPlaylistWithResponseHeaders(id, payload).then((res) => res.body);;
+ public async moveVideoInPlaylist(
+ id: string,
+ payload: MoveVideoInPlaylistRequest = {}
+ ): Promise {
+ return this.moveVideoInPlaylistWithResponseHeaders(id, payload).then(
+ (res) => res.body
+ );
}
-
/**
* Move a specific video in a playlist for the authenticated user
* Move a video in a playlist
* @param id Playlist ID
* @param payload Video details
*/
- public async moveVideoInPlaylistWithResponseHeaders(id: string, payload: MoveVideoInPlaylistRequest = {}): Promise< {headers: ApiResponseHeaders, body:ResponseSuccess } > {
+ public async moveVideoInPlaylistWithResponseHeaders(
+ id: string,
+ payload: MoveVideoInPlaylistRequest = {}
+ ): Promise<{ headers: ApiResponseHeaders; body: ResponseSuccess }> {
const queryParams: QueryOptions = {};
queryParams.headers = {};
if (id === null || id === undefined) {
- throw new Error('Required parameter id was null or undefined when calling moveVideoInPlaylist.');
+ throw new Error(
+ 'Required parameter id was null or undefined when calling moveVideoInPlaylist.'
+ );
}
if (payload === null || payload === undefined) {
- throw new Error('Required parameter payload was null or undefined when calling moveVideoInPlaylist.');
+ throw new Error(
+ 'Required parameter payload was null or undefined when calling moveVideoInPlaylist.'
+ );
}
// Path Params
- const localVarPath = '/playlists/{id}/items'.substring(1)
+ const localVarPath = '/playlists/{id}/items'
+ .substring(1)
.replace('{' + 'id' + '}', encodeURIComponent(String(id)));
// Body Params
const contentType = ObjectSerializer.getPreferredMediaType([
- "application/json"
+ 'application/json',
]);
- queryParams.headers["Content-Type"] = contentType;
+ queryParams.headers['Content-Type'] = contentType;
queryParams.body = ObjectSerializer.stringify(
- ObjectSerializer.serialize(payload, "MoveVideoInPlaylistRequest", ""),
+ ObjectSerializer.serialize(payload, 'MoveVideoInPlaylistRequest', ''),
contentType
);
queryParams.method = 'PUT';
-
- return this.httpClient.call(localVarPath, queryParams)
- .then(response => {
- return {
- headers: response.headers,
- body: ObjectSerializer.deserialize(
- ObjectSerializer.parse(response.body, response.headers["content-type"]),
- "ResponseSuccess", ""
- ) as ResponseSuccess
- }
- });
+ return this.httpClient.call(localVarPath, queryParams).then((response) => {
+ return {
+ headers: response.headers,
+ body: ObjectSerializer.deserialize(
+ ObjectSerializer.parse(
+ response.body,
+ response.headers['content-type']
+ ),
+ 'ResponseSuccess',
+ ''
+ ) as ResponseSuccess,
+ };
+ });
}
-
/**
* Remove a specific video from a playlist for the authenticated user
* Remove a video from a playlist
* @param id Playlist ID
* @param itemId Playlist Item ID
*/
- public async removeVideoFromPlaylist(id: string, itemId: string): Promise {
- return this.removeVideoFromPlaylistWithResponseHeaders(id, itemId).then((res) => res.body);;
+ public async removeVideoFromPlaylist(
+ id: string,
+ itemId: string
+ ): Promise {
+ return this.removeVideoFromPlaylistWithResponseHeaders(id, itemId).then(
+ (res) => res.body
+ );
}
-
/**
* Remove a specific video from a playlist for the authenticated user
* Remove a video from a playlist
* @param id Playlist ID
* @param itemId Playlist Item ID
*/
- public async removeVideoFromPlaylistWithResponseHeaders(id: string, itemId: string): Promise< {headers: ApiResponseHeaders, body:ResponseSuccess } > {
+ public async removeVideoFromPlaylistWithResponseHeaders(
+ id: string,
+ itemId: string
+ ): Promise<{ headers: ApiResponseHeaders; body: ResponseSuccess }> {
const queryParams: QueryOptions = {};
queryParams.headers = {};
if (id === null || id === undefined) {
- throw new Error('Required parameter id was null or undefined when calling removeVideoFromPlaylist.');
+ throw new Error(
+ 'Required parameter id was null or undefined when calling removeVideoFromPlaylist.'
+ );
}
if (itemId === null || itemId === undefined) {
- throw new Error('Required parameter itemId was null or undefined when calling removeVideoFromPlaylist.');
+ throw new Error(
+ 'Required parameter itemId was null or undefined when calling removeVideoFromPlaylist.'
+ );
}
// Path Params
- const localVarPath = '/playlists/{id}/items/{item_id}'.substring(1)
+ const localVarPath = '/playlists/{id}/items/{item_id}'
+ .substring(1)
.replace('{' + 'id' + '}', encodeURIComponent(String(id)))
.replace('{' + 'item_id' + '}', encodeURIComponent(String(itemId)));
-
queryParams.method = 'DELETE';
-
- return this.httpClient.call(localVarPath, queryParams)
- .then(response => {
- return {
- headers: response.headers,
- body: ObjectSerializer.deserialize(
- ObjectSerializer.parse(response.body, response.headers["content-type"]),
- "ResponseSuccess", ""
- ) as ResponseSuccess
- }
- });
+ return this.httpClient.call(localVarPath, queryParams).then((response) => {
+ return {
+ headers: response.headers,
+ body: ObjectSerializer.deserialize(
+ ObjectSerializer.parse(
+ response.body,
+ response.headers['content-type']
+ ),
+ 'ResponseSuccess',
+ ''
+ ) as ResponseSuccess,
+ };
+ });
}
-
/**
* Update a specific playlist for the authenticated user
* Update a playlist
* @param id Playlist ID
- * @param file
- * @param metadata
- * @param name
- * @param tags
+ * @param file
+ * @param metadata
+ * @param name
+ * @param tags
*/
- public async updatePlaylist(id: string, file: string | Readable | Buffer, metadata?: Array, name?: string, tags?: Array): Promise {
- return this.updatePlaylistWithResponseHeaders(id, file, metadata, name, tags).then((res) => res.body);;
+ public async updatePlaylist(
+ id: string,
+ file: string | Readable | Buffer,
+ metadata?: Array,
+ name?: string,
+ tags?: Array
+ ): Promise {
+ return this.updatePlaylistWithResponseHeaders(
+ id,
+ file,
+ metadata,
+ name,
+ tags
+ ).then((res) => res.body);
}
-
/**
* Update a specific playlist for the authenticated user
* Update a playlist
* @param id Playlist ID
- * @param file
- * @param metadata
- * @param name
- * @param tags
+ * @param file
+ * @param metadata
+ * @param name
+ * @param tags
*/
- public async updatePlaylistWithResponseHeaders(id: string, file: string | Readable | Buffer, metadata?: Array, name?: string, tags?: Array): Promise< {headers: ApiResponseHeaders, body:ResponseSuccess } > {
+ public async updatePlaylistWithResponseHeaders(
+ id: string,
+ file: string | Readable | Buffer,
+ metadata?: Array,
+ name?: string,
+ tags?: Array
+ ): Promise<{ headers: ApiResponseHeaders; body: ResponseSuccess }> {
const queryParams: QueryOptions = {};
queryParams.headers = {};
if (id === null || id === undefined) {
- throw new Error('Required parameter id was null or undefined when calling updatePlaylist.');
+ throw new Error(
+ 'Required parameter id was null or undefined when calling updatePlaylist.'
+ );
}
let fileName = 'file';
let fileBuffer = file;
if (typeof file === 'string') {
- fileName = path.basename(file);
- fileBuffer = createReadStream(file);
+ fileName = path.basename(file);
+ fileBuffer = createReadStream(file);
}
if (file instanceof Readable) {
- fileBuffer = await readableToBuffer(file);
+ fileBuffer = await readableToBuffer(file);
}
// Path Params
- const localVarPath = '/playlists/{id}'.substring(1)
+ const localVarPath = '/playlists/{id}'
+ .substring(1)
.replace('{' + 'id' + '}', encodeURIComponent(String(id)));
-
queryParams.method = 'PATCH';
const formData = new FormData();
- formData.append(fileName, fileBuffer, fileName);
+ formData.append(fileName, fileBuffer, fileName);
if (metadata) {
- formData.append('metadata', metadata.join(COLLECTION_FORMATS["csv"]));
+ formData.append('metadata', metadata.join(COLLECTION_FORMATS['csv']));
}
- if (typeof name !== undefined) {
- formData.append('name', name);
- }
+ if (typeof name !== undefined) {
+ formData.append('name', name);
+ }
if (tags) {
- formData.append('tags', tags.join(COLLECTION_FORMATS["csv"]));
+ formData.append('tags', tags.join(COLLECTION_FORMATS['csv']));
}
queryParams.body = formData;
- return this.httpClient.call(localVarPath, queryParams)
- .then(response => {
- return {
- headers: response.headers,
- body: ObjectSerializer.deserialize(
- ObjectSerializer.parse(response.body, response.headers["content-type"]),
- "ResponseSuccess", ""
- ) as ResponseSuccess
- }
- });
+ return this.httpClient.call(localVarPath, queryParams).then((response) => {
+ return {
+ headers: response.headers,
+ body: ObjectSerializer.deserialize(
+ ObjectSerializer.parse(
+ response.body,
+ response.headers['content-type']
+ ),
+ 'ResponseSuccess',
+ ''
+ ) as ResponseSuccess,
+ };
+ });
}
-
}
diff --git a/src/api/VideoApi.ts b/src/api/VideoApi.ts
index 54a8c376..296fe379 100644
--- a/src/api/VideoApi.ts
+++ b/src/api/VideoApi.ts
@@ -3,45 +3,33 @@
* Aioz Stream Service
*
* The version of the OpenAPI document: 1.0
- *
+ *
*
* NOTE: This class is auto generated.
* Do not edit the class manually.
*/
-
import path from 'path';
-import {
- existsSync,
- statSync,
- createReadStream,
- openSync,
- read,
- closeSync,
- ReadStream,
-} from 'fs';
-import { promisify } from 'util';
+import { existsSync, statSync, createReadStream } from 'fs';
import { URLSearchParams } from 'url';
import FormData from 'form-data';
-import ObjectSerializer, { COLLECTION_FORMATS } from '../ObjectSerializer';
+import ObjectSerializer from '../ObjectSerializer';
import HttpClient, { QueryOptions, ApiResponseHeaders } from '../HttpClient';
import ProgressiveSession from '../model/ProgressiveSession';
+import CreateMediaRequest from '../model/CreateMediaRequest';
+import CreateMediaResponse from '../model/CreateMediaResponse';
import CreateVideoCaptionResponse from '../model/CreateVideoCaptionResponse';
-import CreateVideoRequest from '../model/CreateVideoRequest';
-import CreateVideoResponse from '../model/CreateVideoResponse';
import GetTranscodeCostResponse from '../model/GetTranscodeCostResponse';
import GetVideoCaptionsResponse from '../model/GetVideoCaptionsResponse';
import GetVideoDetailResponse from '../model/GetVideoDetailResponse';
import GetVideoListRequest from '../model/GetVideoListRequest';
import GetVideoListResponse from '../model/GetVideoListResponse';
import GetVideoPlayerInfoResponse from '../model/GetVideoPlayerInfoResponse';
-import ResponseError from '../model/ResponseError';
import ResponseSuccess from '../model/ResponseSuccess';
import UpdateVideoInfoRequest from '../model/UpdateVideoInfoRequest';
import UploadProgressEvent from '../model/UploadProgressEvent';
-import { Readable, Stream } from 'stream';
-import { Blob } from 'buffer';
-import { readableToBuffer } from "../HttpClient";
+import { Readable } from 'stream';
+import { readableToBuffer } from '../HttpClient';
import * as crypto from 'crypto';
/**
@@ -54,213 +42,287 @@ export default class VideoApi {
this.httpClient = httpClient;
}
-
-
/**
* Create a video object
* Create video object
* @param request video's info
*/
- public async create(request: CreateVideoRequest = {}): Promise {
- return this.createWithResponseHeaders(request).then((res) => res.body);;
+ public async create(
+ request: CreateMediaRequest = {}
+ ): Promise {
+ return this.createWithResponseHeaders(request).then((res) => res.body);
}
-
/**
* Create a video object
* Create video object
* @param request video's info
*/
- public async createWithResponseHeaders(request: CreateVideoRequest = {}): Promise< {headers: ApiResponseHeaders, body:CreateVideoResponse } > {
+ public async createWithResponseHeaders(
+ request: CreateMediaRequest = {}
+ ): Promise<{ headers: ApiResponseHeaders; body: CreateMediaResponse }> {
const queryParams: QueryOptions = {};
queryParams.headers = {};
if (request === null || request === undefined) {
- throw new Error('Required parameter request was null or undefined when calling create.');
+ throw new Error(
+ 'Required parameter request was null or undefined when calling create.'
+ );
}
// Path Params
const localVarPath = '/videos/create'.substring(1);
// Body Params
const contentType = ObjectSerializer.getPreferredMediaType([
- "application/json",
-
- "application/x-www-form-urlencoded"
+ 'application/json',
+
+ 'application/x-www-form-urlencoded',
]);
- queryParams.headers["Content-Type"] = contentType;
+ queryParams.headers['Content-Type'] = contentType;
queryParams.body = ObjectSerializer.stringify(
- ObjectSerializer.serialize(request, "CreateVideoRequest", ""),
+ ObjectSerializer.serialize(request, 'CreateMediaRequest', ''),
contentType
);
queryParams.method = 'POST';
-
- return this.httpClient.call(localVarPath, queryParams)
- .then(response => {
- return {
- headers: response.headers,
- body: ObjectSerializer.deserialize(
- ObjectSerializer.parse(response.body, response.headers["content-type"]),
- "CreateVideoResponse", ""
- ) as CreateVideoResponse
- }
- });
+ return this.httpClient.call(localVarPath, queryParams).then((response) => {
+ return {
+ headers: response.headers,
+ body: ObjectSerializer.deserialize(
+ ObjectSerializer.parse(
+ response.body,
+ response.headers['content-type']
+ ),
+ 'CreateMediaResponse',
+ ''
+ ) as CreateMediaResponse,
+ };
+ });
}
-
/**
* update video info
* @param id video's id
* @param input input
*/
- public async update(id: string, input: UpdateVideoInfoRequest = {}): Promise {
- return this.updateWithResponseHeaders(id, input).then((res) => res.body);;
+ public async update(
+ id: string,
+ input: UpdateVideoInfoRequest = {}
+ ): Promise {
+ return this.updateWithResponseHeaders(id, input).then((res) => res.body);
}
-
/**
* update video info
* @param id video's id
* @param input input
*/
- public async updateWithResponseHeaders(id: string, input: UpdateVideoInfoRequest = {}): Promise< {headers: ApiResponseHeaders, body:ResponseSuccess } > {
+ public async updateWithResponseHeaders(
+ id: string,
+ input: UpdateVideoInfoRequest = {}
+ ): Promise<{ headers: ApiResponseHeaders; body: ResponseSuccess }> {
const queryParams: QueryOptions = {};
queryParams.headers = {};
if (id === null || id === undefined) {
- throw new Error('Required parameter id was null or undefined when calling update.');
+ throw new Error(
+ 'Required parameter id was null or undefined when calling update.'
+ );
}
if (input === null || input === undefined) {
- throw new Error('Required parameter input was null or undefined when calling update.');
+ throw new Error(
+ 'Required parameter input was null or undefined when calling update.'
+ );
}
// Path Params
- const localVarPath = '/videos/{id}'.substring(1)
+ const localVarPath = '/videos/{id}'
+ .substring(1)
.replace('{' + 'id' + '}', encodeURIComponent(String(id)));
// Body Params
const contentType = ObjectSerializer.getPreferredMediaType([
- "application/json"
+ 'application/json',
]);
- queryParams.headers["Content-Type"] = contentType;
+ queryParams.headers['Content-Type'] = contentType;
queryParams.body = ObjectSerializer.stringify(
- ObjectSerializer.serialize(input, "UpdateVideoInfoRequest", ""),
+ ObjectSerializer.serialize(input, 'UpdateVideoInfoRequest', ''),
contentType
);
queryParams.method = 'PATCH';
-
- return this.httpClient.call(localVarPath, queryParams)
- .then(response => {
- return {
- headers: response.headers,
- body: ObjectSerializer.deserialize(
- ObjectSerializer.parse(response.body, response.headers["content-type"]),
- "ResponseSuccess", ""
- ) as ResponseSuccess
- }
- });
+ return this.httpClient.call(localVarPath, queryParams).then((response) => {
+ return {
+ headers: response.headers,
+ body: ObjectSerializer.deserialize(
+ ObjectSerializer.parse(
+ response.body,
+ response.headers['content-type']
+ ),
+ 'ResponseSuccess',
+ ''
+ ) as ResponseSuccess,
+ };
+ });
}
-
/**
* Delete a video by video ID.
* Delete video
* @param id Video ID
*/
- public async delete(id: string): Promise {
- return this.deleteWithResponseHeaders(id).then((res) => res.body);;
+ public async delete(id: string): Promise {
+ return this.deleteWithResponseHeaders(id).then((res) => res.body);
}
-
/**
* Delete a video by video ID.
* Delete video
* @param id Video ID
*/
- public async deleteWithResponseHeaders(id: string): Promise< {headers: ApiResponseHeaders, body:ResponseSuccess } > {
+ public async deleteWithResponseHeaders(
+ id: string
+ ): Promise<{ headers: ApiResponseHeaders; body: ResponseSuccess }> {
const queryParams: QueryOptions = {};
queryParams.headers = {};
if (id === null || id === undefined) {
- throw new Error('Required parameter id was null or undefined when calling delete.');
+ throw new Error(
+ 'Required parameter id was null or undefined when calling delete.'
+ );
}
// Path Params
- const localVarPath = '/videos/{id}'.substring(1)
+ const localVarPath = '/videos/{id}'
+ .substring(1)
.replace('{' + 'id' + '}', encodeURIComponent(String(id)));
-
queryParams.method = 'DELETE';
-
- return this.httpClient.call(localVarPath, queryParams)
- .then(response => {
- return {
- headers: response.headers,
- body: ObjectSerializer.deserialize(
- ObjectSerializer.parse(response.body, response.headers["content-type"]),
- "ResponseSuccess", ""
- ) as ResponseSuccess
- }
- });
+ return this.httpClient.call(localVarPath, queryParams).then((response) => {
+ return {
+ headers: response.headers,
+ body: ObjectSerializer.deserialize(
+ ObjectSerializer.parse(
+ response.body,
+ response.headers['content-type']
+ ),
+ 'ResponseSuccess',
+ ''
+ ) as ResponseSuccess,
+ };
+ });
}
-
/**
* Upload video thumbnail
* @param id video's id
* @param file file video to be uploaded
*/
- public async uploadThumbnail(id: string, file: string | Readable | Buffer): Promise {
- return this.uploadThumbnailWithResponseHeaders(id, file).then((res) => res.body);;
+ public async uploadThumbnail(
+ id: string,
+ file: string | Readable | Buffer
+ ): Promise {
+ return this.uploadThumbnailWithResponseHeaders(id, file).then(
+ (res) => res.body
+ );
}
-
/**
* Upload video thumbnail
* @param id video's id
* @param file file video to be uploaded
*/
- public async uploadThumbnailWithResponseHeaders(id: string, file: string | Readable | Buffer): Promise< {headers: ApiResponseHeaders, body:ResponseSuccess } > {
+ public async uploadThumbnailWithResponseHeaders(
+ id: string,
+ file: string | Readable | Buffer
+ ): Promise<{ headers: ApiResponseHeaders; body: ResponseSuccess }> {
const queryParams: QueryOptions = {};
queryParams.headers = {};
if (id === null || id === undefined) {
- throw new Error('Required parameter id was null or undefined when calling uploadThumbnail.');
+ throw new Error(
+ 'Required parameter id was null or undefined when calling uploadThumbnail.'
+ );
}
let fileName = 'file';
let fileBuffer = file;
if (typeof file === 'string') {
- fileName = path.basename(file);
- fileBuffer = createReadStream(file);
+ fileName = path.basename(file);
+ fileBuffer = createReadStream(file);
}
if (file instanceof Readable) {
- fileBuffer = await readableToBuffer(file);
+ fileBuffer = await readableToBuffer(file);
}
// Path Params
- const localVarPath = '/videos/{id}/thumbnail'.substring(1)
+ const localVarPath = '/videos/{id}/thumbnail'
+ .substring(1)
.replace('{' + 'id' + '}', encodeURIComponent(String(id)));
-
queryParams.method = 'POST';
const formData = new FormData();
- formData.append(fileName, fileBuffer, fileName);
+ formData.append(fileName, fileBuffer, fileName);
queryParams.body = formData;
- return this.httpClient.call(localVarPath, queryParams)
- .then(response => {
- return {
- headers: response.headers,
- body: ObjectSerializer.deserialize(
- ObjectSerializer.parse(response.body, response.headers["content-type"]),
- "ResponseSuccess", ""
- ) as ResponseSuccess
- }
- });
+ return this.httpClient.call(localVarPath, queryParams).then((response) => {
+ return {
+ headers: response.headers,
+ body: ObjectSerializer.deserialize(
+ ObjectSerializer.parse(
+ response.body,
+ response.headers['content-type']
+ ),
+ 'ResponseSuccess',
+ ''
+ ) as ResponseSuccess,
+ };
+ });
}
+ /**
+ * Delete video thumbnail
+ * @param id video's id
+ */
+ public async deleteThumbnail(id: string): Promise {
+ return this.deleteThumbnailWithResponseHeaders(id).then((res) => res.body);
+ }
+
+ /**
+ * Delete video thumbnail
+ * @param id video's id
+ */
+ public async deleteThumbnailWithResponseHeaders(
+ id: string
+ ): Promise<{ headers: ApiResponseHeaders; body: ResponseSuccess }> {
+ const queryParams: QueryOptions = {};
+ queryParams.headers = {};
+ if (id === null || id === undefined) {
+ throw new Error(
+ 'Required parameter id was null or undefined when calling deleteThumbnail.'
+ );
+ }
+ // Path Params
+ const localVarPath = '/videos/{id}/thumbnail'
+ .substring(1)
+ .replace('{' + 'id' + '}', encodeURIComponent(String(id)));
+
+ queryParams.method = 'DELETE';
+
+ return this.httpClient.call(localVarPath, queryParams).then((response) => {
+ return {
+ headers: response.headers,
+ body: ObjectSerializer.deserialize(
+ ObjectSerializer.parse(
+ response.body,
+ response.headers['content-type']
+ ),
+ 'ResponseSuccess',
+ ''
+ ) as ResponseSuccess,
+ };
+ });
+ }
/**
* Uploads a VTT file and creates a new video caption for the specified video.
@@ -269,11 +331,16 @@ export default class VideoApi {
* @param lan Language
* @param file VTT File
*/
- public async createCaption(id: string, lan: string, file: string | Readable | Buffer): Promise {
- return this.createCaptionWithResponseHeaders(id, lan, file).then((res) => res.body);;
+ public async createCaption(
+ id: string,
+ lan: string,
+ file: string | Readable | Buffer
+ ): Promise {
+ return this.createCaptionWithResponseHeaders(id, lan, file).then(
+ (res) => res.body
+ );
}
-
/**
* Uploads a VTT file and creates a new video caption for the specified video.
* Create a new video caption
@@ -281,99 +348,124 @@ export default class VideoApi {
* @param lan Language
* @param file VTT File
*/
- public async createCaptionWithResponseHeaders(id: string, lan: string, file: string | Readable | Buffer): Promise< {headers: ApiResponseHeaders, body:CreateVideoCaptionResponse } > {
+ public async createCaptionWithResponseHeaders(
+ id: string,
+ lan: string,
+ file: string | Readable | Buffer
+ ): Promise<{
+ headers: ApiResponseHeaders;
+ body: CreateVideoCaptionResponse;
+ }> {
const queryParams: QueryOptions = {};
queryParams.headers = {};
if (id === null || id === undefined) {
- throw new Error('Required parameter id was null or undefined when calling createCaption.');
+ throw new Error(
+ 'Required parameter id was null or undefined when calling createCaption.'
+ );
}
if (lan === null || lan === undefined) {
- throw new Error('Required parameter lan was null or undefined when calling createCaption.');
+ throw new Error(
+ 'Required parameter lan was null or undefined when calling createCaption.'
+ );
}
let fileName = 'file';
let fileBuffer = file;
if (typeof file === 'string') {
- fileName = path.basename(file);
- fileBuffer = createReadStream(file);
+ fileName = path.basename(file);
+ fileBuffer = createReadStream(file);
}
if (file instanceof Readable) {
- fileBuffer = await readableToBuffer(file);
+ fileBuffer = await readableToBuffer(file);
}
// Path Params
- const localVarPath = '/videos/{id}/captions/{lan}'.substring(1)
+ const localVarPath = '/videos/{id}/captions/{lan}'
+ .substring(1)
.replace('{' + 'id' + '}', encodeURIComponent(String(id)))
.replace('{' + 'lan' + '}', encodeURIComponent(String(lan)));
-
queryParams.method = 'POST';
const formData = new FormData();
- formData.append(fileName, fileBuffer, fileName);
+ formData.append(fileName, fileBuffer, fileName);
queryParams.body = formData;
- return this.httpClient.call(localVarPath, queryParams)
- .then(response => {
- return {
- headers: response.headers,
- body: ObjectSerializer.deserialize(
- ObjectSerializer.parse(response.body, response.headers["content-type"]),
- "CreateVideoCaptionResponse", ""
- ) as CreateVideoCaptionResponse
- }
- });
+ return this.httpClient.call(localVarPath, queryParams).then((response) => {
+ return {
+ headers: response.headers,
+ body: ObjectSerializer.deserialize(
+ ObjectSerializer.parse(
+ response.body,
+ response.headers['content-type']
+ ),
+ 'CreateVideoCaptionResponse',
+ ''
+ ) as CreateVideoCaptionResponse,
+ };
+ });
}
-
/**
* Delete a caption in a specific language by providing the video ID for the video you want to delete the caption from and the language the caption is in.
* Delete a video caption
* @param id Video ID
* @param lan Language
*/
- public async deleteCaption(id: string, lan: string): Promise {
- return this.deleteCaptionWithResponseHeaders(id, lan).then((res) => res.body);;
+ public async deleteCaption(
+ id: string,
+ lan: string
+ ): Promise {
+ return this.deleteCaptionWithResponseHeaders(id, lan).then(
+ (res) => res.body
+ );
}
-
/**
* Delete a caption in a specific language by providing the video ID for the video you want to delete the caption from and the language the caption is in.
* Delete a video caption
* @param id Video ID
* @param lan Language
*/
- public async deleteCaptionWithResponseHeaders(id: string, lan: string): Promise< {headers: ApiResponseHeaders, body:ResponseSuccess } > {
+ public async deleteCaptionWithResponseHeaders(
+ id: string,
+ lan: string
+ ): Promise<{ headers: ApiResponseHeaders; body: ResponseSuccess }> {
const queryParams: QueryOptions = {};
queryParams.headers = {};
if (id === null || id === undefined) {
- throw new Error('Required parameter id was null or undefined when calling deleteCaption.');
+ throw new Error(
+ 'Required parameter id was null or undefined when calling deleteCaption.'
+ );
}
if (lan === null || lan === undefined) {
- throw new Error('Required parameter lan was null or undefined when calling deleteCaption.');
+ throw new Error(
+ 'Required parameter lan was null or undefined when calling deleteCaption.'
+ );
}
// Path Params
- const localVarPath = '/videos/{id}/captions/{lan}'.substring(1)
+ const localVarPath = '/videos/{id}/captions/{lan}'
+ .substring(1)
.replace('{' + 'id' + '}', encodeURIComponent(String(id)))
.replace('{' + 'lan' + '}', encodeURIComponent(String(lan)));
-
queryParams.method = 'DELETE';
-
- return this.httpClient.call(localVarPath, queryParams)
- .then(response => {
- return {
- headers: response.headers,
- body: ObjectSerializer.deserialize(
- ObjectSerializer.parse(response.body, response.headers["content-type"]),
- "ResponseSuccess", ""
- ) as ResponseSuccess
- }
- });
+ return this.httpClient.call(localVarPath, queryParams).then((response) => {
+ return {
+ headers: response.headers,
+ body: ObjectSerializer.deserialize(
+ ObjectSerializer.parse(
+ response.body,
+ response.headers['content-type']
+ ),
+ 'ResponseSuccess',
+ ''
+ ) as ResponseSuccess,
+ };
+ });
}
-
/**
* Retrieves a list of video captions for the specified video.
* Get video captions
@@ -382,11 +474,14 @@ export default class VideoApi {
* @param { number } searchParams.offset offset, allowed values greater than or equal to 0. Default(0)
* @param { number } searchParams.limit results per page. Allowed values 1-100, default is 25
*/
- public async getCaptions(args: { id: string, offset?: number, limit?: number }): Promise {
+ public async getCaptions(args: {
+ id: string;
+ offset?: number;
+ limit?: number;
+ }): Promise {
return this.getCaptionsWithResponseHeaders(args).then((res) => res.body);
}
-
/**
* Retrieves a list of video captions for the specified video.
* Get video captions
@@ -395,72 +490,98 @@ export default class VideoApi {
* @param { number } searchParams.offset offset, allowed values greater than or equal to 0. Default(0)
* @param { number } searchParams.limit results per page. Allowed values 1-100, default is 25
*/
- public async getCaptionsWithResponseHeaders({ id, offset, limit }: { id: string, offset?: number, limit?: number }): Promise< {headers: ApiResponseHeaders, body:GetVideoCaptionsResponse } > {
+ public async getCaptionsWithResponseHeaders({
+ id,
+ offset,
+ limit,
+ }: {
+ id: string;
+ offset?: number;
+ limit?: number;
+ }): Promise<{ headers: ApiResponseHeaders; body: GetVideoCaptionsResponse }> {
const queryParams: QueryOptions = {};
queryParams.headers = {};
if (id === null || id === undefined) {
- throw new Error('Required parameter id was null or undefined when calling getCaptions.');
+ throw new Error(
+ 'Required parameter id was null or undefined when calling getCaptions.'
+ );
}
// Path Params
- const localVarPath = '/videos/{id}/captions'.substring(1)
+ const localVarPath = '/videos/{id}/captions'
+ .substring(1)
.replace('{' + 'id' + '}', encodeURIComponent(String(id)));
// Query Params
const urlSearchParams = new URLSearchParams();
if (offset !== undefined) {
-
- urlSearchParams.append("offset", ObjectSerializer.serialize(offset, "number", ""));
+ urlSearchParams.append(
+ 'offset',
+ ObjectSerializer.serialize(offset, 'number', '')
+ );
}
if (limit !== undefined) {
-
- urlSearchParams.append("limit", ObjectSerializer.serialize(limit, "number", ""));
+ urlSearchParams.append(
+ 'limit',
+ ObjectSerializer.serialize(limit, 'number', '')
+ );
}
queryParams.searchParams = urlSearchParams;
-
queryParams.method = 'GET';
-
- return this.httpClient.call(localVarPath, queryParams)
- .then(response => {
- return {
- headers: response.headers,
- body: ObjectSerializer.deserialize(
- ObjectSerializer.parse(response.body, response.headers["content-type"]),
- "GetVideoCaptionsResponse", ""
- ) as GetVideoCaptionsResponse
- }
- });
+ return this.httpClient.call(localVarPath, queryParams).then((response) => {
+ return {
+ headers: response.headers,
+ body: ObjectSerializer.deserialize(
+ ObjectSerializer.parse(
+ response.body,
+ response.headers['content-type']
+ ),
+ 'GetVideoCaptionsResponse',
+ ''
+ ) as GetVideoCaptionsResponse,
+ };
+ });
}
-
/**
* get video transcoding cost
* get video transcoding cost
* @param qualities video's qualities
* @param duration video's duration
*/
- public async getCost(qualities: string, duration: number): Promise {
- return this.getCostWithResponseHeaders(qualities, duration).then((res) => res.body);;
+ public async getCost(
+ qualities: string,
+ duration: number
+ ): Promise {
+ return this.getCostWithResponseHeaders(qualities, duration).then(
+ (res) => res.body
+ );
}
-
/**
* get video transcoding cost
* get video transcoding cost
* @param qualities video's qualities
* @param duration video's duration
*/
- public async getCostWithResponseHeaders(qualities: string, duration: number): Promise< {headers: ApiResponseHeaders, body:GetTranscodeCostResponse } > {
+ public async getCostWithResponseHeaders(
+ qualities: string,
+ duration: number
+ ): Promise<{ headers: ApiResponseHeaders; body: GetTranscodeCostResponse }> {
const queryParams: QueryOptions = {};
queryParams.headers = {};
if (qualities === null || qualities === undefined) {
- throw new Error('Required parameter qualities was null or undefined when calling getCost.');
+ throw new Error(
+ 'Required parameter qualities was null or undefined when calling getCost.'
+ );
}
if (duration === null || duration === undefined) {
- throw new Error('Required parameter duration was null or undefined when calling getCost.');
+ throw new Error(
+ 'Required parameter duration was null or undefined when calling getCost.'
+ );
}
// Path Params
const localVarPath = '/videos/cost'.substring(1);
@@ -469,227 +590,274 @@ export default class VideoApi {
const urlSearchParams = new URLSearchParams();
if (qualities !== undefined) {
-
- urlSearchParams.append("qualities", ObjectSerializer.serialize(qualities, "string", ""));
+ urlSearchParams.append(
+ 'qualities',
+ ObjectSerializer.serialize(qualities, 'string', '')
+ );
}
if (duration !== undefined) {
-
- urlSearchParams.append("duration", ObjectSerializer.serialize(duration, "number", ""));
+ urlSearchParams.append(
+ 'duration',
+ ObjectSerializer.serialize(duration, 'number', '')
+ );
}
queryParams.searchParams = urlSearchParams;
-
queryParams.method = 'GET';
-
- return this.httpClient.call(localVarPath, queryParams)
- .then(response => {
- return {
- headers: response.headers,
- body: ObjectSerializer.deserialize(
- ObjectSerializer.parse(response.body, response.headers["content-type"]),
- "GetTranscodeCostResponse", ""
- ) as GetTranscodeCostResponse
- }
- });
+ return this.httpClient.call(localVarPath, queryParams).then((response) => {
+ return {
+ headers: response.headers,
+ body: ObjectSerializer.deserialize(
+ ObjectSerializer.parse(
+ response.body,
+ response.headers['content-type']
+ ),
+ 'GetTranscodeCostResponse',
+ ''
+ ) as GetTranscodeCostResponse,
+ };
+ });
}
-
/**
* Retrieve the video details by video id.
* get video detail
* @param id video's id
*/
- public async getDetail(id: string): Promise {
- return this.getDetailWithResponseHeaders(id).then((res) => res.body);;
+ public async getDetail(id: string): Promise {
+ return this.getDetailWithResponseHeaders(id).then((res) => res.body);
}
-
/**
* Retrieve the video details by video id.
* get video detail
* @param id video's id
*/
- public async getDetailWithResponseHeaders(id: string): Promise< {headers: ApiResponseHeaders, body:GetVideoDetailResponse } > {
+ public async getDetailWithResponseHeaders(
+ id: string
+ ): Promise<{ headers: ApiResponseHeaders; body: GetVideoDetailResponse }> {
const queryParams: QueryOptions = {};
queryParams.headers = {};
if (id === null || id === undefined) {
- throw new Error('Required parameter id was null or undefined when calling getDetail.');
+ throw new Error(
+ 'Required parameter id was null or undefined when calling getDetail.'
+ );
}
// Path Params
- const localVarPath = '/videos/{id}'.substring(1)
+ const localVarPath = '/videos/{id}'
+ .substring(1)
.replace('{' + 'id' + '}', encodeURIComponent(String(id)));
-
queryParams.method = 'GET';
-
- return this.httpClient.call(localVarPath, queryParams)
- .then(response => {
- return {
- headers: response.headers,
- body: ObjectSerializer.deserialize(
- ObjectSerializer.parse(response.body, response.headers["content-type"]),
- "GetVideoDetailResponse", ""
- ) as GetVideoDetailResponse
- }
- });
+ return this.httpClient.call(localVarPath, queryParams).then((response) => {
+ return {
+ headers: response.headers,
+ body: ObjectSerializer.deserialize(
+ ObjectSerializer.parse(
+ response.body,
+ response.headers['content-type']
+ ),
+ 'GetVideoDetailResponse',
+ ''
+ ) as GetVideoDetailResponse,
+ };
+ });
}
-
/**
* Retrieve a list of videos for the authenticated user.
* Get user videos list
* @param request video's info
*/
- public async getVideoList(request: GetVideoListRequest = {}): Promise {
- return this.getVideoListWithResponseHeaders(request).then((res) => res.body);;
+ public async getVideoList(
+ request: GetVideoListRequest = {}
+ ): Promise {
+ return this.getVideoListWithResponseHeaders(request).then(
+ (res) => res.body
+ );
}
-
/**
* Retrieve a list of videos for the authenticated user.
* Get user videos list
* @param request video's info
*/
- public async getVideoListWithResponseHeaders(request: GetVideoListRequest = {}): Promise< {headers: ApiResponseHeaders, body:GetVideoListResponse } > {
+ public async getVideoListWithResponseHeaders(
+ request: GetVideoListRequest = {}
+ ): Promise<{ headers: ApiResponseHeaders; body: GetVideoListResponse }> {
const queryParams: QueryOptions = {};
queryParams.headers = {};
if (request === null || request === undefined) {
- throw new Error('Required parameter request was null or undefined when calling getVideoList.');
+ throw new Error(
+ 'Required parameter request was null or undefined when calling getVideoList.'
+ );
}
// Path Params
const localVarPath = '/videos'.substring(1);
// Body Params
const contentType = ObjectSerializer.getPreferredMediaType([
- "application/json"
+ 'application/json',
]);
- queryParams.headers["Content-Type"] = contentType;
+ queryParams.headers['Content-Type'] = contentType;
queryParams.body = ObjectSerializer.stringify(
- ObjectSerializer.serialize(request, "GetVideoListRequest", ""),
+ ObjectSerializer.serialize(request, 'GetVideoListRequest', ''),
contentType
);
queryParams.method = 'POST';
-
- return this.httpClient.call(localVarPath, queryParams)
- .then(response => {
- return {
- headers: response.headers,
- body: ObjectSerializer.deserialize(
- ObjectSerializer.parse(response.body, response.headers["content-type"]),
- "GetVideoListResponse", ""
- ) as GetVideoListResponse
- }
- });
+ return this.httpClient.call(localVarPath, queryParams).then((response) => {
+ return {
+ headers: response.headers,
+ body: ObjectSerializer.deserialize(
+ ObjectSerializer.parse(
+ response.body,
+ response.headers['content-type']
+ ),
+ 'GetVideoListResponse',
+ ''
+ ) as GetVideoListResponse,
+ };
+ });
}
-
/**
- * Get video player info
- * Get video player info
+ * Get video object
+ * Get video object
* @param {Object} searchParams
* @param { string } searchParams.id Video ID
* @param { string } searchParams.token Token
*/
- public async getVideoPlayerInfo(args: { id: string, token?: string }): Promise {
- return this.getVideoPlayerInfoWithResponseHeaders(args).then((res) => res.body);
+ public async getVideoPlayerInfo(args: {
+ id: string;
+ token?: string;
+ }): Promise {
+ return this.getVideoPlayerInfoWithResponseHeaders(args).then(
+ (res) => res.body
+ );
}
-
/**
- * Get video player info
- * Get video player info
+ * Get video object
+ * Get video object
* @param {Object} searchParams
* @param { string } searchParams.id Video ID
* @param { string } searchParams.token Token
*/
- public async getVideoPlayerInfoWithResponseHeaders({ id, token }: { id: string, token?: string }): Promise< {headers: ApiResponseHeaders, body:GetVideoPlayerInfoResponse } > {
+ public async getVideoPlayerInfoWithResponseHeaders({
+ id,
+ token,
+ }: {
+ id: string;
+ token?: string;
+ }): Promise<{
+ headers: ApiResponseHeaders;
+ body: GetVideoPlayerInfoResponse;
+ }> {
const queryParams: QueryOptions = {};
queryParams.headers = {};
if (id === null || id === undefined) {
- throw new Error('Required parameter id was null or undefined when calling getVideoPlayerInfo.');
+ throw new Error(
+ 'Required parameter id was null or undefined when calling getVideoPlayerInfo.'
+ );
}
// Path Params
- const localVarPath = '/videos/{id}/player.json'.substring(1)
+ const localVarPath = '/videos/{id}/player.json'
+ .substring(1)
.replace('{' + 'id' + '}', encodeURIComponent(String(id)));
// Query Params
const urlSearchParams = new URLSearchParams();
if (token !== undefined) {
-
- urlSearchParams.append("token", ObjectSerializer.serialize(token, "string", ""));
+ urlSearchParams.append(
+ 'token',
+ ObjectSerializer.serialize(token, 'string', '')
+ );
}
queryParams.searchParams = urlSearchParams;
-
queryParams.method = 'GET';
-
- return this.httpClient.call(localVarPath, queryParams)
- .then(response => {
- return {
- headers: response.headers,
- body: ObjectSerializer.deserialize(
- ObjectSerializer.parse(response.body, response.headers["content-type"]),
- "GetVideoPlayerInfoResponse", ""
- ) as GetVideoPlayerInfoResponse
- }
- });
+ return this.httpClient.call(localVarPath, queryParams).then((response) => {
+ return {
+ headers: response.headers,
+ body: ObjectSerializer.deserialize(
+ ObjectSerializer.parse(
+ response.body,
+ response.headers['content-type']
+ ),
+ 'GetVideoPlayerInfoResponse',
+ ''
+ ) as GetVideoPlayerInfoResponse,
+ };
+ });
}
-
/**
* Set default caption for a video
* Set default caption
* @param id Video ID
* @param lan Language
*/
- public async setDefaultCaption(id: string, lan: string): Promise {
- return this.setDefaultCaptionWithResponseHeaders(id, lan).then((res) => res.body);;
+ public async setDefaultCaption(
+ id: string,
+ lan: string
+ ): Promise {
+ return this.setDefaultCaptionWithResponseHeaders(id, lan).then(
+ (res) => res.body
+ );
}
-
/**
* Set default caption for a video
* Set default caption
* @param id Video ID
* @param lan Language
*/
- public async setDefaultCaptionWithResponseHeaders(id: string, lan: string): Promise< {headers: ApiResponseHeaders, body:ResponseSuccess } > {
+ public async setDefaultCaptionWithResponseHeaders(
+ id: string,
+ lan: string
+ ): Promise<{ headers: ApiResponseHeaders; body: ResponseSuccess }> {
const queryParams: QueryOptions = {};
queryParams.headers = {};
if (id === null || id === undefined) {
- throw new Error('Required parameter id was null or undefined when calling setDefaultCaption.');
+ throw new Error(
+ 'Required parameter id was null or undefined when calling setDefaultCaption.'
+ );
}
if (lan === null || lan === undefined) {
- throw new Error('Required parameter lan was null or undefined when calling setDefaultCaption.');
+ throw new Error(
+ 'Required parameter lan was null or undefined when calling setDefaultCaption.'
+ );
}
// Path Params
- const localVarPath = '/videos/{id}/captions/{lan}'.substring(1)
+ const localVarPath = '/videos/{id}/captions/{lan}'
+ .substring(1)
.replace('{' + 'id' + '}', encodeURIComponent(String(id)))
.replace('{' + 'lan' + '}', encodeURIComponent(String(lan)));
-
queryParams.method = 'PATCH';
-
- return this.httpClient.call(localVarPath, queryParams)
- .then(response => {
- return {
- headers: response.headers,
- body: ObjectSerializer.deserialize(
- ObjectSerializer.parse(response.body, response.headers["content-type"]),
- "ResponseSuccess", ""
- ) as ResponseSuccess
- }
- });
+ return this.httpClient.call(localVarPath, queryParams).then((response) => {
+ return {
+ headers: response.headers,
+ body: ObjectSerializer.deserialize(
+ ObjectSerializer.parse(
+ response.body,
+ response.headers['content-type']
+ ),
+ 'ResponseSuccess',
+ ''
+ ) as ResponseSuccess,
+ };
+ });
}
/**
@@ -699,90 +867,119 @@ export default class VideoApi {
* @param hash Md5 hash of part
* @param index Index of the part
*/
- public createUploadPartProgressiveSession(id: string, hash?: string, index?: string): ProgressiveSession {
+ public createUploadPartProgressiveSession(
+ id: string,
+ hash?: string,
+ index?: string
+ ): ProgressiveSession {
class UploadPartProgressiveSession {
- private httpClient: HttpClient;
- private currentPart = 1;
+ private httpClient: HttpClient;
+ private currentPart = 1;
+
+ constructor(httpClient: HttpClient) {
+ this.httpClient = httpClient;
+ }
+
+ uploadPart(
+ file: string,
+ progressListener?: (event: UploadProgressEvent) => void
+ ) {
+ return this.upload(file, false, progressListener).then(
+ (res) => res.body
+ );
+ }
+
+ uploadPartWithResponseHeaders(
+ file: string,
+ progressListener?: (event: UploadProgressEvent) => void
+ ) {
+ return this.upload(file, false, progressListener);
+ }
+
+ uploadLastPart(
+ file: string,
+ progressListener?: (event: UploadProgressEvent) => void
+ ) {
+ return this.upload(file, true, progressListener).then(
+ (res) => res.body
+ );
+ }
+
+ uploadLastPartWithResponseHeaders(
+ file: string,
+ progressListener?: (event: UploadProgressEvent) => void
+ ) {
+ return this.upload(file, true, progressListener);
+ }
- constructor(httpClient: HttpClient) {
- this.httpClient = httpClient;
+ async upload(
+ file: string,
+ isLast: boolean,
+ progressListener?: (event: UploadProgressEvent) => void
+ ) {
+ const queryParams: QueryOptions = {};
+ queryParams.headers = {};
+
+ if (id === null || id === undefined) {
+ throw new Error(
+ 'Required parameter id was null or undefined when calling uploadPart.'
+ );
}
- uploadPart(file: string, progressListener?: (event: UploadProgressEvent) => void) {
- return this.upload(file, false, progressListener).then((res) => res.body);
- };
+ if (!existsSync(file)) {
+ throw new Error(`${file} must be a readable source file`);
+ }
- uploadPartWithResponseHeaders(file: string, progressListener?: (event: UploadProgressEvent) => void) {
- return this.upload(file, false, progressListener);
- };
+ const length = statSync(file).size;
+ if (length <= 0) {
+ throw new Error(`${file} is empty`);
+ }
+ // Path Params
+ const localVarPath = '/videos/{id}/part'
+ .substring(1)
+ .replace('{' + 'id' + '}', encodeURIComponent(String(id)));
- uploadLastPart(file: string, progressListener?: (event: UploadProgressEvent) => void) {
- return this.upload(file, true, progressListener).then((res) => res.body);
- };
+ queryParams.method = 'POST';
+
+ const formData = new FormData();
+
+ const filename = path.basename(file);
+ formData.append(filename, createReadStream(file), filename);
+ queryParams.body = formData;
+ queryParams.headers['Content-Range'] = `part ${this.currentPart}/${
+ isLast ? this.currentPart : '*'
+ }`;
- uploadLastPartWithResponseHeaders(file: string, progressListener?: (event: UploadProgressEvent) => void) {
- return this.upload(file, true, progressListener);
- };
-
- async upload(file: string, isLast: boolean, progressListener?: (event: UploadProgressEvent) => void) {
- const queryParams: QueryOptions = {};
- queryParams.headers = {};
-
- if (id === null || id === undefined) {
- throw new Error('Required parameter id was null or undefined when calling uploadPart.');
- }
-
- if (!existsSync(file)) {
- throw new Error(`${ file } must be a readable source file`);
- }
-
- const length = statSync(file).size;
- if (length <= 0) {
- throw new Error(`${ file } is empty`);
- }
- // Path Params
- const localVarPath = '/videos/{id}/part'.substring(1)
- .replace('{' + 'id' + '}', encodeURIComponent(String(id)));
-
-
- queryParams.method = 'POST';
-
- const formData = new FormData();
-
-
- const filename = path.basename(file);
- formData.append(filename, createReadStream(file), filename);
- queryParams.body = formData;
- queryParams.headers['Content-Range'] = `part ${this.currentPart}/${isLast ? this.currentPart : "*"}`;
-
-
- if (progressListener) {
- queryParams.onUploadProgress = (progress) => {
- progressListener({
- chunksCount: 1,
- currentChunk: 0,
- currentChunkUploadedBytes: progress.loaded,
- currentChunkTotalBytes: progress.total || 0,
- uploadedBytes: progress.loaded,
- totalBytes: progress.total || 0,
- });
- }
- }
-
- const response = await this.httpClient.call(localVarPath, queryParams);
-
- this.currentPart++;
- const responseBody = ObjectSerializer.deserialize(
- ObjectSerializer.parse(response.body, response.headers["content-type"]),
- "ResponseSuccess", ""
- ) as Type;
-
-
- return {
- body: responseBody,
- headers: response.headers
- }
+ if (progressListener) {
+ queryParams.onUploadProgress = (progress) => {
+ progressListener({
+ chunksCount: 1,
+ currentChunk: 0,
+ currentChunkUploadedBytes: progress.loaded,
+ currentChunkTotalBytes: progress.total || 0,
+ uploadedBytes: progress.loaded,
+ totalBytes: progress.total || 0,
+ });
+ };
}
+
+ const response = await this.httpClient.call(localVarPath, queryParams);
+
+ this.currentPart++;
+ const responseBody = ObjectSerializer.deserialize(
+ ObjectSerializer.parse(
+ response.body,
+ response.headers['content-type']
+ ),
+ 'ResponseSuccess',
+ ''
+ ) as Type;
+
+ return {
+ body: responseBody,
+ headers: response.headers,
+ };
+ }
}
return new UploadPartProgressiveSession(this.httpClient);
@@ -792,225 +989,257 @@ export default class VideoApi {
* Upload part of video
* Upload part of video
* @param id video's id
- * @param file File video to be uploaded
+ * @param file File media to be uploaded
* @param hash Md5 hash of part
* @param index Index of the part
*/
- public async uploadPart(id: string, file: string, hash?: string, index?: string, progressListener?: (event: UploadProgressEvent) => void): Promise {
- return this.uploadPartWithResponseHeaders(id, file, hash, index, progressListener).then((res) => res.body);;
+ public async uploadPart(
+ id: string,
+ file: string,
+ hash?: string,
+ index?: string,
+ progressListener?: (event: UploadProgressEvent) => void
+ ): Promise {
+ return this.uploadPartWithResponseHeaders(
+ id,
+ file,
+ hash,
+ index,
+ progressListener
+ ).then((res) => res.body);
}
-
/**
* Upload part of video
* Upload part of video
* @param id video's id
- * @param file File video to be uploaded
+ * @param file File media to be uploaded
* @param hash Md5 hash of part
* @param index Index of the part
*/
- public async uploadPartWithResponseHeaders(id: string, file: string, hash?: string, index?: string, progressListener?: (event: UploadProgressEvent) => void): Promise< {headers: ApiResponseHeaders, body:ResponseSuccess } > {
+ public async uploadPartWithResponseHeaders(
+ id: string,
+ file: string,
+ hash?: string,
+ index?: string,
+ progressListener?: (event: UploadProgressEvent) => void
+ ): Promise<{ headers: ApiResponseHeaders; body: ResponseSuccess }> {
const queryParams: QueryOptions = {};
queryParams.headers = {};
if (id === null || id === undefined) {
- throw new Error('Required parameter id was null or undefined when calling uploadPart.');
+ throw new Error(
+ 'Required parameter id was null or undefined when calling uploadPart.'
+ );
}
if (!existsSync(file)) {
- throw new Error(`${ file } must be a readable source file`);
+ throw new Error(`${file} must be a readable source file`);
}
const length = statSync(file).size;
if (length <= 0) {
- throw new Error(`${ file } is empty`);
+ throw new Error(`${file} is empty`);
}
// Path Params
- const localVarPath = '/videos/{id}/part'.substring(1)
+ const localVarPath = '/videos/{id}/part'
+ .substring(1)
.replace('{' + 'id' + '}', encodeURIComponent(String(id)));
-
queryParams.method = 'POST';
const formData = new FormData();
- const chunkSize = this.httpClient.getChunkSize();
- // Upload in a single request when file is small enough
- if (chunkSize > length) {
- const filename = path.basename(file);
- const fileStream = createReadStream(file);
- const hash = crypto.createHash('md5');
- fileStream.pipe(hash);
- const md5Hash = await new Promise((resolve, reject) => {
- hash.on('readable', () => {
+ const chunkSize = this.httpClient.getChunkSize();
+ // Upload in a single request when file is small enough
+ if (chunkSize > length) {
+ const filename = path.basename(file);
+ const fileStream = createReadStream(file);
+ const hash = crypto.createHash('md5');
+ fileStream.pipe(hash);
+ const md5Hash = await new Promise((resolve, reject) => {
+ hash.on('readable', () => {
const data = hash.read();
if (data) {
resolve(data.toString('hex'));
}
+ });
+ hash.on('error', reject);
+ });
+ formData.append('file', createReadStream(file), filename);
+ formData.append('index', '1');
+ formData.append('hash', md5Hash);
+ queryParams.body = formData;
+ queryParams.headers['Content-Range'] = `bytes 0-${length - 1}/${length}`;
+
+ if (progressListener) {
+ queryParams.onUploadProgress = (progress) => {
+ progressListener({
+ chunksCount: 1,
+ currentChunk: 0,
+ currentChunkUploadedBytes: progress.loaded,
+ currentChunkTotalBytes: progress.total || 0,
+ uploadedBytes: progress.loaded,
+ totalBytes: progress.total || 0,
});
- hash.on('error', reject);
- });
- formData.append('file', createReadStream(file), filename);
- formData.append('index', '1');
- formData.append('hash', md5Hash);
- queryParams.body = formData;
- queryParams.headers['Content-Range'] = `bytes 0-${length - 1}/${length}`;
-
-
- if (progressListener) {
- queryParams.onUploadProgress = (progress) => {
- progressListener({
- chunksCount: 1,
- currentChunk: 0,
- currentChunkUploadedBytes: progress.loaded,
- currentChunkTotalBytes: progress.total || 0,
- uploadedBytes: progress.loaded,
- totalBytes: progress.total || 0,
- });
- }
- }
+ };
+ }
- const call = this.httpClient.call(localVarPath, queryParams);
+ const call = this.httpClient.call(localVarPath, queryParams);
- return call.then(response => {
- return {
- headers: response.headers,
- body: ObjectSerializer.deserialize(
- ObjectSerializer.parse(response.body, response.headers["content-type"]),
- "ResponseSuccess", ""
- ) as ResponseSuccess
- }
+ return call.then((response) => {
+ return {
+ headers: response.headers,
+ body: ObjectSerializer.deserialize(
+ ObjectSerializer.parse(
+ response.body,
+ response.headers['content-type']
+ ),
+ 'ResponseSuccess',
+ ''
+ ) as ResponseSuccess,
+ };
});
+ }
+ let uploadChunkSize = chunkSize;
+ let stream;
+ let chunkNumber = 0;
+ const partsCount = Math.ceil(length / chunkSize);
+ let offset = 0;
+ const uploadRequests: Promise[] = [];
+
+ for (let part = 1; part <= partsCount; part++) {
+ uploadChunkSize = chunkSize;
+ // BUT,if we are on the last chunk to be uploaded, the uploaded chunk must be
+ // reduced to match the remaining bytes in the file
+ if (offset + uploadChunkSize > length) {
+ uploadChunkSize = length - offset;
}
- let uploadChunkSize = chunkSize;
- let stream;
- let chunkNumber = 0;
- const partsCount = Math.ceil(length / chunkSize);
- let offset = 0;
- const uploadRequests: Promise[] = [];
-
- for (let part = 1; part <= partsCount; part++) {
- uploadChunkSize = chunkSize;
- // BUT,if we are on the last chunk to be uploaded, the uploaded chunk must be
- // reduced to match the remaining bytes in the file
- if (offset + uploadChunkSize > length) {
- uploadChunkSize = length - offset;
- }
- const filename = path.basename(file);
- const chunkFormData = new FormData({ maxDataSize: 100 * 1024 * 1024 });
- stream = createReadStream(file, { start: offset, end: uploadChunkSize + offset - 1});
- const hash = crypto.createHash('md5');
- stream.pipe(hash);
- const md5Hash = await new Promise((resolve, reject) => {
- hash.on('readable', () => {
- const data = hash.read();
- if (data) {
- resolve(data.toString('hex'));
- }
- });
- hash.on('error', reject);
- });
- queryParams.body = chunkFormData;
- chunkFormData.append('hash', md5Hash);
- chunkFormData.append('index', part.toString());
- const streamForUpload = createReadStream(file, {
- start: offset,
- end: uploadChunkSize + offset - 1,
- });
- const rangeStart = offset;
- const rangeEnd = offset + uploadChunkSize - 1;
- chunkFormData.append('file', streamForUpload, filename);
- queryParams.body = chunkFormData;
- queryParams.headers[
- 'Content-Range'
- ] = `bytes ${rangeStart}-${rangeEnd}/${length}`;
-
- if (progressListener) {
- queryParams.onUploadProgress = (progress) => {
- progressListener({
- chunksCount: Math.ceil(length / chunkSize),
- currentChunk: chunkNumber,
- currentChunkUploadedBytes: progress.loaded,
- currentChunkTotalBytes: progress.total || 0,
- uploadedBytes: Math.min(length, chunkNumber * chunkSize + progress.loaded),
- totalBytes: length,
- });
- }
+ const filename = path.basename(file);
+ const chunkFormData = new FormData({ maxDataSize: 100 * 1024 * 1024 });
+ stream = createReadStream(file, {
+ start: offset,
+ end: uploadChunkSize + offset - 1,
+ });
+ const hash = crypto.createHash('md5');
+ stream.pipe(hash);
+ const md5Hash = await new Promise((resolve, reject) => {
+ hash.on('readable', () => {
+ const data = hash.read();
+ if (data) {
+ resolve(data.toString('hex'));
}
- const uploadPromise = this.httpClient
- .call(localVarPath, queryParams)
- .then((response) => {
- return {
- headers: response.headers,
- body: ObjectSerializer.deserialize(
- ObjectSerializer.parse(
- response.body,
- response.headers['content-type']
- ),
- 'ResponseSuccess',
- ''
- ) as ResponseSuccess,
- };
- });
-
- uploadRequests.push(uploadPromise);
-
- chunkNumber++;
- offset += chunkSize;
- }
- const responses = await Promise.all(uploadRequests);
-
- return responses[responses.length - 1];
-
- if (typeof hash !== undefined) {
- formData.append('hash', hash);
+ });
+ hash.on('error', reject);
+ });
+ queryParams.body = chunkFormData;
+ chunkFormData.append('hash', md5Hash);
+ chunkFormData.append('index', part.toString());
+ const streamForUpload = createReadStream(file, {
+ start: offset,
+ end: uploadChunkSize + offset - 1,
+ });
+ const rangeStart = offset;
+ const rangeEnd = offset + uploadChunkSize - 1;
+ chunkFormData.append('file', streamForUpload, filename);
+ queryParams.body = chunkFormData;
+ queryParams.headers[
+ 'Content-Range'
+ ] = `bytes ${rangeStart}-${rangeEnd}/${length}`;
+
+ if (progressListener) {
+ queryParams.onUploadProgress = (progress) => {
+ progressListener({
+ chunksCount: Math.ceil(length / chunkSize),
+ currentChunk: chunkNumber,
+ currentChunkUploadedBytes: progress.loaded,
+ currentChunkTotalBytes: progress.total || 0,
+ uploadedBytes: Math.min(
+ length,
+ chunkNumber * chunkSize + progress.loaded
+ ),
+ totalBytes: length,
+ });
+ };
}
+ const uploadPromise = this.httpClient
+ .call(localVarPath, queryParams)
+ .then((response) => {
+ return {
+ headers: response.headers,
+ body: ObjectSerializer.deserialize(
+ ObjectSerializer.parse(
+ response.body,
+ response.headers['content-type']
+ ),
+ 'ResponseSuccess',
+ ''
+ ) as ResponseSuccess,
+ };
+ });
+
+ uploadRequests.push(uploadPromise);
+
+ chunkNumber++;
+ offset += chunkSize;
+ }
+ const responses = await Promise.all(uploadRequests);
- if (typeof index !== undefined) {
- formData.append('index', index);
- }
+ return responses[responses.length - 1];
- }
+ if (typeof hash !== undefined) {
+ formData.append('hash', hash);
+ }
+ if (typeof index !== undefined) {
+ formData.append('index', index);
+ }
+ }
/**
* Get upload video when complete.
* Get upload video when complete
* @param id video's id
*/
- public async uploadVideoComplete(id: string): Promise {
- return this.uploadVideoCompleteWithResponseHeaders(id).then((res) => res.body);;
+ public async uploadVideoComplete(id: string): Promise {
+ return this.uploadVideoCompleteWithResponseHeaders(id).then(
+ (res) => res.body
+ );
}
-
/**
* Get upload video when complete.
* Get upload video when complete
* @param id video's id
*/
- public async uploadVideoCompleteWithResponseHeaders(id: string): Promise< {headers: ApiResponseHeaders, body:ResponseSuccess } > {
+ public async uploadVideoCompleteWithResponseHeaders(
+ id: string
+ ): Promise<{ headers: ApiResponseHeaders; body: ResponseSuccess }> {
const queryParams: QueryOptions = {};
queryParams.headers = {};
if (id === null || id === undefined) {
- throw new Error('Required parameter id was null or undefined when calling uploadVideoComplete.');
+ throw new Error(
+ 'Required parameter id was null or undefined when calling uploadVideoComplete.'
+ );
}
// Path Params
- const localVarPath = '/videos/{id}/complete'.substring(1)
+ const localVarPath = '/videos/{id}/complete'
+ .substring(1)
.replace('{' + 'id' + '}', encodeURIComponent(String(id)));
-
queryParams.method = 'GET';
-
- return this.httpClient.call(localVarPath, queryParams)
- .then(response => {
- return {
- headers: response.headers,
- body: ObjectSerializer.deserialize(
- ObjectSerializer.parse(response.body, response.headers["content-type"]),
- "ResponseSuccess", ""
- ) as ResponseSuccess
- }
- });
+ return this.httpClient.call(localVarPath, queryParams).then((response) => {
+ return {
+ headers: response.headers,
+ body: ObjectSerializer.deserialize(
+ ObjectSerializer.parse(
+ response.body,
+ response.headers['content-type']
+ ),
+ 'ResponseSuccess',
+ ''
+ ) as ResponseSuccess,
+ };
+ });
}
-
}
diff --git a/src/api/VideoChapterApi.ts b/src/api/VideoChapterApi.ts
index 22646fdf..1a2c461e 100644
--- a/src/api/VideoChapterApi.ts
+++ b/src/api/VideoChapterApi.ts
@@ -3,37 +3,23 @@
* Aioz Stream Service
*
* The version of the OpenAPI document: 1.0
- *
+ *
*
* NOTE: This class is auto generated.
* Do not edit the class manually.
*/
-
import path from 'path';
-import {
- existsSync,
- statSync,
- createReadStream,
- openSync,
- read,
- closeSync,
- ReadStream,
-} from 'fs';
-import { promisify } from 'util';
+import { createReadStream } from 'fs';
import { URLSearchParams } from 'url';
import FormData from 'form-data';
-import ObjectSerializer, { COLLECTION_FORMATS } from '../ObjectSerializer';
+import ObjectSerializer from '../ObjectSerializer';
import HttpClient, { QueryOptions, ApiResponseHeaders } from '../HttpClient';
-import ProgressiveSession from '../model/ProgressiveSession';
import CreateVideoChapterResponse from '../model/CreateVideoChapterResponse';
import GetVideoChaptersResponse from '../model/GetVideoChaptersResponse';
-import ResponseError from '../model/ResponseError';
import ResponseSuccess from '../model/ResponseSuccess';
-import { Readable, Stream } from 'stream';
-import { Blob } from 'buffer';
-import { readableToBuffer } from "../HttpClient";
-import * as crypto from 'crypto';
+import { Readable } from 'stream';
+import { readableToBuffer } from '../HttpClient';
/**
* no description
@@ -45,8 +31,6 @@ export default class VideoChapterApi {
this.httpClient = httpClient;
}
-
-
/**
* Create a VTT file to add chapters to your video. Chapters help break the video into sections.
* Create a video chapter
@@ -54,11 +38,16 @@ export default class VideoChapterApi {
* @param lan Language
* @param file VTT File
*/
- public async create(id: string, lan: string, file: string | Readable | Buffer): Promise {
- return this.createWithResponseHeaders(id, lan, file).then((res) => res.body);;
+ public async create(
+ id: string,
+ lan: string,
+ file: string | Readable | Buffer
+ ): Promise {
+ return this.createWithResponseHeaders(id, lan, file).then(
+ (res) => res.body
+ );
}
-
/**
* Create a VTT file to add chapters to your video. Chapters help break the video into sections.
* Create a video chapter
@@ -66,51 +55,64 @@ export default class VideoChapterApi {
* @param lan Language
* @param file VTT File
*/
- public async createWithResponseHeaders(id: string, lan: string, file: string | Readable | Buffer): Promise< {headers: ApiResponseHeaders, body:CreateVideoChapterResponse } > {
+ public async createWithResponseHeaders(
+ id: string,
+ lan: string,
+ file: string | Readable | Buffer
+ ): Promise<{
+ headers: ApiResponseHeaders;
+ body: CreateVideoChapterResponse;
+ }> {
const queryParams: QueryOptions = {};
queryParams.headers = {};
if (id === null || id === undefined) {
- throw new Error('Required parameter id was null or undefined when calling create.');
+ throw new Error(
+ 'Required parameter id was null or undefined when calling create.'
+ );
}
if (lan === null || lan === undefined) {
- throw new Error('Required parameter lan was null or undefined when calling create.');
+ throw new Error(
+ 'Required parameter lan was null or undefined when calling create.'
+ );
}
let fileName = 'file';
let fileBuffer = file;
if (typeof file === 'string') {
- fileName = path.basename(file);
- fileBuffer = createReadStream(file);
+ fileName = path.basename(file);
+ fileBuffer = createReadStream(file);
}
if (file instanceof Readable) {
- fileBuffer = await readableToBuffer(file);
+ fileBuffer = await readableToBuffer(file);
}
// Path Params
- const localVarPath = '/videos/{id}/chapters/{lan}'.substring(1)
+ const localVarPath = '/videos/{id}/chapters/{lan}'
+ .substring(1)
.replace('{' + 'id' + '}', encodeURIComponent(String(id)))
.replace('{' + 'lan' + '}', encodeURIComponent(String(lan)));
-
queryParams.method = 'POST';
const formData = new FormData();
- formData.append(fileName, fileBuffer, fileName);
+ formData.append(fileName, fileBuffer, fileName);
queryParams.body = formData;
- return this.httpClient.call(localVarPath, queryParams)
- .then(response => {
- return {
- headers: response.headers,
- body: ObjectSerializer.deserialize(
- ObjectSerializer.parse(response.body, response.headers["content-type"]),
- "CreateVideoChapterResponse", ""
- ) as CreateVideoChapterResponse
- }
- });
+ return this.httpClient.call(localVarPath, queryParams).then((response) => {
+ return {
+ headers: response.headers,
+ body: ObjectSerializer.deserialize(
+ ObjectSerializer.parse(
+ response.body,
+ response.headers['content-type']
+ ),
+ 'CreateVideoChapterResponse',
+ ''
+ ) as CreateVideoChapterResponse,
+ };
+ });
}
-
/**
* Get a chapter for by video id in a specific language.
* Get video chapters
@@ -119,11 +121,14 @@ export default class VideoChapterApi {
* @param { number } searchParams.offset offset, allowed values greater than or equal to 0. Default(0)
* @param { number } searchParams.limit results per page. Allowed values 1-100, default is 25
*/
- public async get(args: { id: string, offset?: number, limit?: number }): Promise {
+ public async get(args: {
+ id: string;
+ offset?: number;
+ limit?: number;
+ }): Promise {
return this.getWithResponseHeaders(args).then((res) => res.body);
}
-
/**
* Get a chapter for by video id in a specific language.
* Get video chapters
@@ -132,92 +137,114 @@ export default class VideoChapterApi {
* @param { number } searchParams.offset offset, allowed values greater than or equal to 0. Default(0)
* @param { number } searchParams.limit results per page. Allowed values 1-100, default is 25
*/
- public async getWithResponseHeaders({ id, offset, limit }: { id: string, offset?: number, limit?: number }): Promise< {headers: ApiResponseHeaders, body:GetVideoChaptersResponse } > {
+ public async getWithResponseHeaders({
+ id,
+ offset,
+ limit,
+ }: {
+ id: string;
+ offset?: number;
+ limit?: number;
+ }): Promise<{ headers: ApiResponseHeaders; body: GetVideoChaptersResponse }> {
const queryParams: QueryOptions = {};
queryParams.headers = {};
if (id === null || id === undefined) {
- throw new Error('Required parameter id was null or undefined when calling get.');
+ throw new Error(
+ 'Required parameter id was null or undefined when calling get.'
+ );
}
// Path Params
- const localVarPath = '/videos/{id}/chapters'.substring(1)
+ const localVarPath = '/videos/{id}/chapters'
+ .substring(1)
.replace('{' + 'id' + '}', encodeURIComponent(String(id)));
// Query Params
const urlSearchParams = new URLSearchParams();
if (offset !== undefined) {
-
- urlSearchParams.append("offset", ObjectSerializer.serialize(offset, "number", ""));
+ urlSearchParams.append(
+ 'offset',
+ ObjectSerializer.serialize(offset, 'number', '')
+ );
}
if (limit !== undefined) {
-
- urlSearchParams.append("limit", ObjectSerializer.serialize(limit, "number", ""));
+ urlSearchParams.append(
+ 'limit',
+ ObjectSerializer.serialize(limit, 'number', '')
+ );
}
queryParams.searchParams = urlSearchParams;
-
queryParams.method = 'GET';
-
- return this.httpClient.call(localVarPath, queryParams)
- .then(response => {
- return {
- headers: response.headers,
- body: ObjectSerializer.deserialize(
- ObjectSerializer.parse(response.body, response.headers["content-type"]),
- "GetVideoChaptersResponse", ""
- ) as GetVideoChaptersResponse
- }
- });
+ return this.httpClient.call(localVarPath, queryParams).then((response) => {
+ return {
+ headers: response.headers,
+ body: ObjectSerializer.deserialize(
+ ObjectSerializer.parse(
+ response.body,
+ response.headers['content-type']
+ ),
+ 'GetVideoChaptersResponse',
+ ''
+ ) as GetVideoChaptersResponse,
+ };
+ });
}
-
/**
* Delete a chapter in a specific language by providing the video ID for the video you want to delete the chapter from and the language the chapter is in.
* Delete a video chapter
* @param id Video ID
* @param lan Language
*/
- public async delete(id: string, lan: string): Promise {
- return this.deleteWithResponseHeaders(id, lan).then((res) => res.body);;
+ public async delete(id: string, lan: string): Promise {
+ return this.deleteWithResponseHeaders(id, lan).then((res) => res.body);
}
-
/**
* Delete a chapter in a specific language by providing the video ID for the video you want to delete the chapter from and the language the chapter is in.
* Delete a video chapter
* @param id Video ID
* @param lan Language
*/
- public async deleteWithResponseHeaders(id: string, lan: string): Promise< {headers: ApiResponseHeaders, body:ResponseSuccess } > {
+ public async deleteWithResponseHeaders(
+ id: string,
+ lan: string
+ ): Promise<{ headers: ApiResponseHeaders; body: ResponseSuccess }> {
const queryParams: QueryOptions = {};
queryParams.headers = {};
if (id === null || id === undefined) {
- throw new Error('Required parameter id was null or undefined when calling delete.');
+ throw new Error(
+ 'Required parameter id was null or undefined when calling delete.'
+ );
}
if (lan === null || lan === undefined) {
- throw new Error('Required parameter lan was null or undefined when calling delete.');
+ throw new Error(
+ 'Required parameter lan was null or undefined when calling delete.'
+ );
}
// Path Params
- const localVarPath = '/videos/{id}/chapters/{lan}'.substring(1)
+ const localVarPath = '/videos/{id}/chapters/{lan}'
+ .substring(1)
.replace('{' + 'id' + '}', encodeURIComponent(String(id)))
.replace('{' + 'lan' + '}', encodeURIComponent(String(lan)));
-
queryParams.method = 'DELETE';
-
- return this.httpClient.call(localVarPath, queryParams)
- .then(response => {
- return {
- headers: response.headers,
- body: ObjectSerializer.deserialize(
- ObjectSerializer.parse(response.body, response.headers["content-type"]),
- "ResponseSuccess", ""
- ) as ResponseSuccess
- }
- });
+ return this.httpClient.call(localVarPath, queryParams).then((response) => {
+ return {
+ headers: response.headers,
+ body: ObjectSerializer.deserialize(
+ ObjectSerializer.parse(
+ response.body,
+ response.headers['content-type']
+ ),
+ 'ResponseSuccess',
+ ''
+ ) as ResponseSuccess,
+ };
+ });
}
-
}
diff --git a/src/api/WebhookApi.ts b/src/api/WebhookApi.ts
index c4600f06..1c922b15 100644
--- a/src/api/WebhookApi.ts
+++ b/src/api/WebhookApi.ts
@@ -3,40 +3,21 @@
* Aioz Stream Service
*
* The version of the OpenAPI document: 1.0
- *
+ *
*
* NOTE: This class is auto generated.
* Do not edit the class manually.
*/
-
-import path from 'path';
-import {
- existsSync,
- statSync,
- createReadStream,
- openSync,
- read,
- closeSync,
- ReadStream,
-} from 'fs';
-import { promisify } from 'util';
import { URLSearchParams } from 'url';
-import FormData from 'form-data';
-import ObjectSerializer, { COLLECTION_FORMATS } from '../ObjectSerializer';
+import ObjectSerializer from '../ObjectSerializer';
import HttpClient, { QueryOptions, ApiResponseHeaders } from '../HttpClient';
-import ProgressiveSession from '../model/ProgressiveSession';
import CreateWebhookRequest from '../model/CreateWebhookRequest';
import CreateWebhookResponse from '../model/CreateWebhookResponse';
import GetUserWebhookResponse from '../model/GetUserWebhookResponse';
import GetWebhooksListResponse from '../model/GetWebhooksListResponse';
-import ResponseError from '../model/ResponseError';
import ResponseSuccess from '../model/ResponseSuccess';
import UpdateWebhookRequest from '../model/UpdateWebhookRequest';
-import { Readable, Stream } from 'stream';
-import { Blob } from 'buffer';
-import { readableToBuffer } from "../HttpClient";
-import * as crypto from 'crypto';
/**
* no description
@@ -48,204 +29,227 @@ export default class WebhookApi {
this.httpClient = httpClient;
}
-
-
/**
* Webhooks can push notifications to your server, rather than polling streaming service for changes
* Create webhook
* @param request Create Webhook input
*/
- public async create(request: CreateWebhookRequest = {}): Promise {
- return this.createWithResponseHeaders(request).then((res) => res.body);;
+ public async create(
+ request: CreateWebhookRequest = {}
+ ): Promise {
+ return this.createWithResponseHeaders(request).then((res) => res.body);
}
-
/**
* Webhooks can push notifications to your server, rather than polling streaming service for changes
* Create webhook
* @param request Create Webhook input
*/
- public async createWithResponseHeaders(request: CreateWebhookRequest = {}): Promise< {headers: ApiResponseHeaders, body:CreateWebhookResponse } > {
+ public async createWithResponseHeaders(
+ request: CreateWebhookRequest = {}
+ ): Promise<{ headers: ApiResponseHeaders; body: CreateWebhookResponse }> {
const queryParams: QueryOptions = {};
queryParams.headers = {};
if (request === null || request === undefined) {
- throw new Error('Required parameter request was null or undefined when calling create.');
+ throw new Error(
+ 'Required parameter request was null or undefined when calling create.'
+ );
}
// Path Params
const localVarPath = '/webhooks'.substring(1);
// Body Params
const contentType = ObjectSerializer.getPreferredMediaType([
- "application/json",
-
- "application/x-www-form-urlencoded"
+ 'application/json',
+
+ 'application/x-www-form-urlencoded',
]);
- queryParams.headers["Content-Type"] = contentType;
+ queryParams.headers['Content-Type'] = contentType;
queryParams.body = ObjectSerializer.stringify(
- ObjectSerializer.serialize(request, "CreateWebhookRequest", ""),
+ ObjectSerializer.serialize(request, 'CreateWebhookRequest', ''),
contentType
);
queryParams.method = 'POST';
-
- return this.httpClient.call(localVarPath, queryParams)
- .then(response => {
- return {
- headers: response.headers,
- body: ObjectSerializer.deserialize(
- ObjectSerializer.parse(response.body, response.headers["content-type"]),
- "CreateWebhookResponse", ""
- ) as CreateWebhookResponse
- }
- });
+ return this.httpClient.call(localVarPath, queryParams).then((response) => {
+ return {
+ headers: response.headers,
+ body: ObjectSerializer.deserialize(
+ ObjectSerializer.parse(
+ response.body,
+ response.headers['content-type']
+ ),
+ 'CreateWebhookResponse',
+ ''
+ ) as CreateWebhookResponse,
+ };
+ });
}
-
/**
* Retrieve webhook details by id.
* Get user's webhook by id
* @param id webhook's id
*/
- public async get(id: string): Promise {
- return this.getWithResponseHeaders(id).then((res) => res.body);;
+ public async get(id: string): Promise {
+ return this.getWithResponseHeaders(id).then((res) => res.body);
}
-
/**
* Retrieve webhook details by id.
* Get user's webhook by id
* @param id webhook's id
*/
- public async getWithResponseHeaders(id: string): Promise< {headers: ApiResponseHeaders, body:GetUserWebhookResponse } > {
+ public async getWithResponseHeaders(
+ id: string
+ ): Promise<{ headers: ApiResponseHeaders; body: GetUserWebhookResponse }> {
const queryParams: QueryOptions = {};
queryParams.headers = {};
if (id === null || id === undefined) {
- throw new Error('Required parameter id was null or undefined when calling get.');
+ throw new Error(
+ 'Required parameter id was null or undefined when calling get.'
+ );
}
// Path Params
- const localVarPath = '/webhooks/{id}'.substring(1)
+ const localVarPath = '/webhooks/{id}'
+ .substring(1)
.replace('{' + 'id' + '}', encodeURIComponent(String(id)));
-
queryParams.method = 'GET';
-
- return this.httpClient.call(localVarPath, queryParams)
- .then(response => {
- return {
- headers: response.headers,
- body: ObjectSerializer.deserialize(
- ObjectSerializer.parse(response.body, response.headers["content-type"]),
- "GetUserWebhookResponse", ""
- ) as GetUserWebhookResponse
- }
- });
+ return this.httpClient.call(localVarPath, queryParams).then((response) => {
+ return {
+ headers: response.headers,
+ body: ObjectSerializer.deserialize(
+ ObjectSerializer.parse(
+ response.body,
+ response.headers['content-type']
+ ),
+ 'GetUserWebhookResponse',
+ ''
+ ) as GetUserWebhookResponse,
+ };
+ });
}
-
/**
* This endpoint will update the indicated webhook.
* Update event webhook
* @param id webhook's id
- * @param request Update Webhook input, events example: video.encoding.quality.completed
+ * @param request Update Webhook input, events example: media.encoding.quality.completed
*/
- public async update(id: string, request: UpdateWebhookRequest = {}): Promise {
- return this.updateWithResponseHeaders(id, request).then((res) => res.body);;
+ public async update(
+ id: string,
+ request: UpdateWebhookRequest = {}
+ ): Promise {
+ return this.updateWithResponseHeaders(id, request).then((res) => res.body);
}
-
/**
* This endpoint will update the indicated webhook.
* Update event webhook
* @param id webhook's id
- * @param request Update Webhook input, events example: video.encoding.quality.completed
+ * @param request Update Webhook input, events example: media.encoding.quality.completed
*/
- public async updateWithResponseHeaders(id: string, request: UpdateWebhookRequest = {}): Promise< {headers: ApiResponseHeaders, body:ResponseSuccess } > {
+ public async updateWithResponseHeaders(
+ id: string,
+ request: UpdateWebhookRequest = {}
+ ): Promise<{ headers: ApiResponseHeaders; body: ResponseSuccess }> {
const queryParams: QueryOptions = {};
queryParams.headers = {};
if (id === null || id === undefined) {
- throw new Error('Required parameter id was null or undefined when calling update.');
+ throw new Error(
+ 'Required parameter id was null or undefined when calling update.'
+ );
}
if (request === null || request === undefined) {
- throw new Error('Required parameter request was null or undefined when calling update.');
+ throw new Error(
+ 'Required parameter request was null or undefined when calling update.'
+ );
}
// Path Params
- const localVarPath = '/webhooks/{id}'.substring(1)
+ const localVarPath = '/webhooks/{id}'
+ .substring(1)
.replace('{' + 'id' + '}', encodeURIComponent(String(id)));
// Body Params
const contentType = ObjectSerializer.getPreferredMediaType([
- "application/json",
-
- "application/x-www-form-urlencoded"
+ 'application/json',
+
+ 'application/x-www-form-urlencoded',
]);
- queryParams.headers["Content-Type"] = contentType;
+ queryParams.headers['Content-Type'] = contentType;
queryParams.body = ObjectSerializer.stringify(
- ObjectSerializer.serialize(request, "UpdateWebhookRequest", ""),
+ ObjectSerializer.serialize(request, 'UpdateWebhookRequest', ''),
contentType
);
queryParams.method = 'PATCH';
-
- return this.httpClient.call(localVarPath, queryParams)
- .then(response => {
- return {
- headers: response.headers,
- body: ObjectSerializer.deserialize(
- ObjectSerializer.parse(response.body, response.headers["content-type"]),
- "ResponseSuccess", ""
- ) as ResponseSuccess
- }
- });
+ return this.httpClient.call(localVarPath, queryParams).then((response) => {
+ return {
+ headers: response.headers,
+ body: ObjectSerializer.deserialize(
+ ObjectSerializer.parse(
+ response.body,
+ response.headers['content-type']
+ ),
+ 'ResponseSuccess',
+ ''
+ ) as ResponseSuccess,
+ };
+ });
}
-
/**
* This endpoint will delete the indicated webhook.
* Delete webhook
* @param id Webhook ID
*/
- public async delete(id: string): Promise {
- return this.deleteWithResponseHeaders(id).then((res) => res.body);;
+ public async delete(id: string): Promise {
+ return this.deleteWithResponseHeaders(id).then((res) => res.body);
}
-
/**
* This endpoint will delete the indicated webhook.
* Delete webhook
* @param id Webhook ID
*/
- public async deleteWithResponseHeaders(id: string): Promise< {headers: ApiResponseHeaders, body:ResponseSuccess } > {
+ public async deleteWithResponseHeaders(
+ id: string
+ ): Promise<{ headers: ApiResponseHeaders; body: ResponseSuccess }> {
const queryParams: QueryOptions = {};
queryParams.headers = {};
if (id === null || id === undefined) {
- throw new Error('Required parameter id was null or undefined when calling delete.');
+ throw new Error(
+ 'Required parameter id was null or undefined when calling delete.'
+ );
}
// Path Params
- const localVarPath = '/webhooks/{id}'.substring(1)
+ const localVarPath = '/webhooks/{id}'
+ .substring(1)
.replace('{' + 'id' + '}', encodeURIComponent(String(id)));
-
queryParams.method = 'DELETE';
-
- return this.httpClient.call(localVarPath, queryParams)
- .then(response => {
- return {
- headers: response.headers,
- body: ObjectSerializer.deserialize(
- ObjectSerializer.parse(response.body, response.headers["content-type"]),
- "ResponseSuccess", ""
- ) as ResponseSuccess
- }
- });
+ return this.httpClient.call(localVarPath, queryParams).then((response) => {
+ return {
+ headers: response.headers,
+ body: ObjectSerializer.deserialize(
+ ObjectSerializer.parse(
+ response.body,
+ response.headers['content-type']
+ ),
+ 'ResponseSuccess',
+ ''
+ ) as ResponseSuccess,
+ };
+ });
}
-
/**
* This method returns a list of your webhooks (with all their details).
@@ -261,11 +265,21 @@ You can filter what the webhook list that the API returns using the parameters d
* @param { boolean } searchParams.encodingStarted search by event encoding started
* @param { boolean } searchParams.fileReceived search by event file received
*/
- public async list(args: { search?: string, sortBy?: 'created_at' | 'name', orderBy?: 'asc' | 'desc', offset?: number, limit?: number, encodingFinished?: boolean, encodingStarted?: boolean, fileReceived?: boolean } = {}): Promise {
+ public async list(
+ args: {
+ search?: string;
+ sortBy?: 'created_at' | 'name';
+ orderBy?: 'asc' | 'desc';
+ offset?: number;
+ limit?: number;
+ encodingFinished?: boolean;
+ encodingStarted?: boolean;
+ fileReceived?: boolean;
+ } = {}
+ ): Promise {
return this.listWithResponseHeaders(args).then((res) => res.body);
}
-
/**
* This method returns a list of your webhooks (with all their details).
@@ -281,7 +295,28 @@ You can filter what the webhook list that the API returns using the parameters d
* @param { boolean } searchParams.encodingStarted search by event encoding started
* @param { boolean } searchParams.fileReceived search by event file received
*/
- public async listWithResponseHeaders({ search, sortBy, orderBy, offset, limit, encodingFinished, encodingStarted, fileReceived }: { search?: string, sortBy?: 'created_at' | 'name', orderBy?: 'asc' | 'desc', offset?: number, limit?: number, encodingFinished?: boolean, encodingStarted?: boolean, fileReceived?: boolean } = {}): Promise< {headers: ApiResponseHeaders, body:GetWebhooksListResponse } > {
+ public async listWithResponseHeaders({
+ search,
+ sortBy,
+ orderBy,
+ offset,
+ limit,
+ encodingFinished,
+ encodingStarted,
+ fileReceived,
+ }: {
+ search?: string;
+ sortBy?: 'created_at' | 'name';
+ orderBy?: 'asc' | 'desc';
+ offset?: number;
+ limit?: number;
+ encodingFinished?: boolean;
+ encodingStarted?: boolean;
+ fileReceived?: boolean;
+ } = {}): Promise<{
+ headers: ApiResponseHeaders;
+ body: GetWebhooksListResponse;
+ }> {
const queryParams: QueryOptions = {};
queryParams.headers = {};
// Path Params
@@ -291,96 +326,116 @@ You can filter what the webhook list that the API returns using the parameters d
const urlSearchParams = new URLSearchParams();
if (search !== undefined) {
-
- urlSearchParams.append("search", ObjectSerializer.serialize(search, "string", ""));
+ urlSearchParams.append(
+ 'search',
+ ObjectSerializer.serialize(search, 'string', '')
+ );
}
if (sortBy !== undefined) {
-
- urlSearchParams.append("sort_by", ObjectSerializer.serialize(sortBy, "'created_at' | 'name'", ""));
+ urlSearchParams.append(
+ 'sort_by',
+ ObjectSerializer.serialize(sortBy, "'created_at' | 'name'", '')
+ );
}
if (orderBy !== undefined) {
-
- urlSearchParams.append("order_by", ObjectSerializer.serialize(orderBy, "'asc' | 'desc'", ""));
+ urlSearchParams.append(
+ 'order_by',
+ ObjectSerializer.serialize(orderBy, "'asc' | 'desc'", '')
+ );
}
if (offset !== undefined) {
-
- urlSearchParams.append("offset", ObjectSerializer.serialize(offset, "number", ""));
+ urlSearchParams.append(
+ 'offset',
+ ObjectSerializer.serialize(offset, 'number', '')
+ );
}
if (limit !== undefined) {
-
- urlSearchParams.append("limit", ObjectSerializer.serialize(limit, "number", ""));
+ urlSearchParams.append(
+ 'limit',
+ ObjectSerializer.serialize(limit, 'number', '')
+ );
}
if (encodingFinished !== undefined) {
-
- urlSearchParams.append("encoding_finished", ObjectSerializer.serialize(encodingFinished, "boolean", ""));
+ urlSearchParams.append(
+ 'encoding_finished',
+ ObjectSerializer.serialize(encodingFinished, 'boolean', '')
+ );
}
if (encodingStarted !== undefined) {
-
- urlSearchParams.append("encoding_started", ObjectSerializer.serialize(encodingStarted, "boolean", ""));
+ urlSearchParams.append(
+ 'encoding_started',
+ ObjectSerializer.serialize(encodingStarted, 'boolean', '')
+ );
}
if (fileReceived !== undefined) {
-
- urlSearchParams.append("file_received", ObjectSerializer.serialize(fileReceived, "boolean", ""));
+ urlSearchParams.append(
+ 'file_received',
+ ObjectSerializer.serialize(fileReceived, 'boolean', '')
+ );
}
queryParams.searchParams = urlSearchParams;
-
queryParams.method = 'GET';
-
- return this.httpClient.call(localVarPath, queryParams)
- .then(response => {
- return {
- headers: response.headers,
- body: ObjectSerializer.deserialize(
- ObjectSerializer.parse(response.body, response.headers["content-type"]),
- "GetWebhooksListResponse", ""
- ) as GetWebhooksListResponse
- }
- });
+ return this.httpClient.call(localVarPath, queryParams).then((response) => {
+ return {
+ headers: response.headers,
+ body: ObjectSerializer.deserialize(
+ ObjectSerializer.parse(
+ response.body,
+ response.headers['content-type']
+ ),
+ 'GetWebhooksListResponse',
+ ''
+ ) as GetWebhooksListResponse,
+ };
+ });
}
-
/**
* This endpoint will check the indicated webhook.
* Check webhook by id
* @param id webhook's id
*/
- public async check(id: string): Promise {
- return this.checkWithResponseHeaders(id).then((res) => res.body);;
+ public async check(id: string): Promise {
+ return this.checkWithResponseHeaders(id).then((res) => res.body);
}
-
/**
* This endpoint will check the indicated webhook.
* Check webhook by id
* @param id webhook's id
*/
- public async checkWithResponseHeaders(id: string): Promise< {headers: ApiResponseHeaders, body:ResponseSuccess } > {
+ public async checkWithResponseHeaders(
+ id: string
+ ): Promise<{ headers: ApiResponseHeaders; body: ResponseSuccess }> {
const queryParams: QueryOptions = {};
queryParams.headers = {};
if (id === null || id === undefined) {
- throw new Error('Required parameter id was null or undefined when calling check.');
+ throw new Error(
+ 'Required parameter id was null or undefined when calling check.'
+ );
}
// Path Params
- const localVarPath = '/webhooks/check/{id}'.substring(1)
+ const localVarPath = '/webhooks/check/{id}'
+ .substring(1)
.replace('{' + 'id' + '}', encodeURIComponent(String(id)));
-
queryParams.method = 'POST';
-
- return this.httpClient.call(localVarPath, queryParams)
- .then(response => {
- return {
- headers: response.headers,
- body: ObjectSerializer.deserialize(
- ObjectSerializer.parse(response.body, response.headers["content-type"]),
- "ResponseSuccess", ""
- ) as ResponseSuccess
- }
- });
+ return this.httpClient.call(localVarPath, queryParams).then((response) => {
+ return {
+ headers: response.headers,
+ body: ObjectSerializer.deserialize(
+ ObjectSerializer.parse(
+ response.body,
+ response.headers['content-type']
+ ),
+ 'ResponseSuccess',
+ ''
+ ) as ResponseSuccess,
+ };
+ });
}
-
}
diff --git a/src/index.ts b/src/index.ts
index 9ed465ec..6bc0b2aa 100644
--- a/src/index.ts
+++ b/src/index.ts
@@ -3,14 +3,13 @@
* Aioz Stream Service
*
* The version of the OpenAPI document: 1.0
- *
+ *
*
* NOTE: This class is auto generated.
* Do not edit the class manually.
*/
-
-import HttpClient from "./HttpClient";
+import HttpClient from './HttpClient';
import ApiKeyApi from './api/ApiKeyApi';
import LiveStreamApi from './api/LiveStreamApi';
@@ -19,110 +18,12 @@ import PlaylistApi from './api/PlaylistApi';
import VideoApi from './api/VideoApi';
import VideoChapterApi from './api/VideoChapterApi';
import WebhookApi from './api/WebhookApi';
-import {createReadStream, existsSync, statSync} from "fs";
-import UploadProgressEvent from "./model/UploadProgressEvent";
-import { QueryOptions} from './HttpClient';
-import FormData from "form-data";
-import path from "path";
-import crypto from "crypto";
-
-
- import AddPlayerThemesToVideoRequest from './model/AddPlayerThemesToVideoRequest';
- import AddVideoToPlaylistRequest from './model/AddVideoToPlaylistRequest';
- import ApiKey from './model/ApiKey';
- import Asset from './model/Asset';
- import Controls from './model/Controls';
- import CreateApiKeyData from './model/CreateApiKeyData';
- import CreateApiKeyRequest from './model/CreateApiKeyRequest';
- import CreateApiKeyResponse from './model/CreateApiKeyResponse';
- import CreateLiveStreamKeyRequest from './model/CreateLiveStreamKeyRequest';
- import CreateLiveStreamKeyResponse from './model/CreateLiveStreamKeyResponse';
- import CreatePlayerThemeRequest from './model/CreatePlayerThemeRequest';
- import CreatePlayerThemesData from './model/CreatePlayerThemesData';
- import CreatePlayerThemesResponse from './model/CreatePlayerThemesResponse';
- import CreatePlaylistData from './model/CreatePlaylistData';
- import CreatePlaylistRequest from './model/CreatePlaylistRequest';
- import CreatePlaylistResponse from './model/CreatePlaylistResponse';
- import CreateStreamingRequest from './model/CreateStreamingRequest';
- import CreateStreamingResponse from './model/CreateStreamingResponse';
- import CreateVideoCaptionData from './model/CreateVideoCaptionData';
- import CreateVideoCaptionResponse from './model/CreateVideoCaptionResponse';
- import CreateVideoChapterData from './model/CreateVideoChapterData';
- import CreateVideoChapterResponse from './model/CreateVideoChapterResponse';
- import CreateVideoRequest from './model/CreateVideoRequest';
- import CreateVideoResponse from './model/CreateVideoResponse';
- import CreateWebhookData from './model/CreateWebhookData';
- import CreateWebhookRequest from './model/CreateWebhookRequest';
- import CreateWebhookResponse from './model/CreateWebhookResponse';
- import GetApiKeysData from './model/GetApiKeysData';
- import GetApiKeysResponse from './model/GetApiKeysResponse';
- import GetLiveStreamKeyData from './model/GetLiveStreamKeyData';
- import GetLiveStreamKeyResponse from './model/GetLiveStreamKeyResponse';
- import GetLiveStreamKeysListData from './model/GetLiveStreamKeysListData';
- import GetLiveStreamKeysListResponse from './model/GetLiveStreamKeysListResponse';
- import GetLiveStreamVideoPublicResponse from './model/GetLiveStreamVideoPublicResponse';
- import GetLiveStreamVideoResponse from './model/GetLiveStreamVideoResponse';
- import GetLiveStreamVideosRequest from './model/GetLiveStreamVideosRequest';
- import GetLiveStreamVideosResponse from './model/GetLiveStreamVideosResponse';
- import GetPlayerThemeByIdData from './model/GetPlayerThemeByIdData';
- import GetPlayerThemeByIdResponse from './model/GetPlayerThemeByIdResponse';
- import GetPlayerThemeData from './model/GetPlayerThemeData';
- import GetPlayerThemeResponse from './model/GetPlayerThemeResponse';
- import GetPlaylistByIdData from './model/GetPlaylistByIdData';
- import GetPlaylistByIdResponse from './model/GetPlaylistByIdResponse';
- import GetPlaylistListData from './model/GetPlaylistListData';
- import GetPlaylistListRequest from './model/GetPlaylistListRequest';
- import GetPlaylistListResponse from './model/GetPlaylistListResponse';
- import GetStreamingResponse from './model/GetStreamingResponse';
- import GetStreamingsResponse from './model/GetStreamingsResponse';
- import GetTranscodeCostData from './model/GetTranscodeCostData';
- import GetTranscodeCostResponse from './model/GetTranscodeCostResponse';
- import GetUserWebhookData from './model/GetUserWebhookData';
- import GetUserWebhookResponse from './model/GetUserWebhookResponse';
- import GetVideoCaptionsData from './model/GetVideoCaptionsData';
- import GetVideoCaptionsResponse from './model/GetVideoCaptionsResponse';
- import GetVideoChaptersData from './model/GetVideoChaptersData';
- import GetVideoChaptersResponse from './model/GetVideoChaptersResponse';
- import GetVideoDetailResponse from './model/GetVideoDetailResponse';
- import GetVideoListData from './model/GetVideoListData';
- import GetVideoListRequest from './model/GetVideoListRequest';
- import GetVideoListResponse from './model/GetVideoListResponse';
- import GetVideoPlayerInfoResponse from './model/GetVideoPlayerInfoResponse';
- import GetWebhooksListData from './model/GetWebhooksListData';
- import GetWebhooksListResponse from './model/GetWebhooksListResponse';
- import LiveStreamAssets from './model/LiveStreamAssets';
- import LiveStreamKeyData from './model/LiveStreamKeyData';
- import LiveStreamVideoData from './model/LiveStreamVideoData';
- import LiveStreamVideoResponse from './model/LiveStreamVideoResponse';
- import LiveStreamVideosResponse from './model/LiveStreamVideosResponse';
- import Metadata from './model/Metadata';
- import MoveVideoInPlaylistRequest from './model/MoveVideoInPlaylistRequest';
- import PlayerTheme from './model/PlayerTheme';
- import Playlist from './model/Playlist';
- import PlaylistItem from './model/PlaylistItem';
- import PlaylistItemVideo from './model/PlaylistItemVideo';
- import PublicPlaylistObject from './model/PublicPlaylistObject';
- import QualityObject from './model/QualityObject';
- import RemovePlayerThemesFromVideoRequest from './model/RemovePlayerThemesFromVideoRequest';
- import RenameAPIKeyRequest from './model/RenameAPIKeyRequest';
- import ResponseError from './model/ResponseError';
- import ResponseSuccess from './model/ResponseSuccess';
- import Theme from './model/Theme';
- import UpdateLiveStreamKeyData from './model/UpdateLiveStreamKeyData';
- import UpdateLiveStreamKeyRequest from './model/UpdateLiveStreamKeyRequest';
- import UpdateLiveStreamKeyResponse from './model/UpdateLiveStreamKeyResponse';
- import UpdateLiveStreamVideoRequest from './model/UpdateLiveStreamVideoRequest';
- import UpdatePlayerThemeRequest from './model/UpdatePlayerThemeRequest';
- import UpdatePlayerThemeResponse from './model/UpdatePlayerThemeResponse';
- import UpdateVideoInfoRequest from './model/UpdateVideoInfoRequest';
- import UpdateWebhookRequest from './model/UpdateWebhookRequest';
- import UploadLogoByIdResponse from './model/UploadLogoByIdResponse';
- import Video from './model/Video';
- import VideoAssets from './model/VideoAssets';
- import VideoCaption from './model/VideoCaption';
- import VideoChapter from './model/VideoChapter';
- import VideoWatermark from './model/VideoWatermark';
- import Webhook from './model/Webhook';
+import { createReadStream, existsSync, statSync } from 'fs';
+import UploadProgressEvent from './model/UploadProgressEvent';
+import { QueryOptions } from './HttpClient';
+import FormData from 'form-data';
+import path from 'path';
+import crypto from 'crypto';
const PRODUCTION_BASE_URI = 'https://api.aiozstream.network/api';
const DEFAULT_CHUNK_SIZE = 50 * 1024 * 1024;
@@ -139,9 +40,28 @@ class StreamClient {
private _videoChapter: VideoChapterApi;
private _webhook: WebhookApi;
- constructor(params: {publicKey?: string, secretKey?: string, bearerToken?: string, baseUri?: string, chunkSize?: number, applicationName?: string, applicationVersion?: string; sdkName?: string; sdkVersion?: string;}) {
- if(params.chunkSize && (params.chunkSize < MIN_CHUNK_SIZE || params.chunkSize > MAX_CHUNK_SIZE)) {
- throw new Error("Invalid chunk size value. Must be greater than " + MIN_CHUNK_SIZE + " bytes and lower than " + MAX_CHUNK_SIZE + " bytes.");
+ constructor(params: {
+ publicKey?: string;
+ secretKey?: string;
+ bearerToken?: string;
+ baseUri?: string;
+ chunkSize?: number;
+ applicationName?: string;
+ applicationVersion?: string;
+ sdkName?: string;
+ sdkVersion?: string;
+ }) {
+ if (
+ params.chunkSize &&
+ (params.chunkSize < MIN_CHUNK_SIZE || params.chunkSize > MAX_CHUNK_SIZE)
+ ) {
+ throw new Error(
+ 'Invalid chunk size value. Must be greater than ' +
+ MIN_CHUNK_SIZE +
+ ' bytes and lower than ' +
+ MAX_CHUNK_SIZE +
+ ' bytes.'
+ );
}
this.validateOrigin(
@@ -156,7 +76,7 @@ class StreamClient {
...params,
baseUri: params.baseUri || PRODUCTION_BASE_URI,
chunkSize: params.chunkSize || DEFAULT_CHUNK_SIZE,
- })
+ });
this._apiKey = new ApiKeyApi(this.httpClient);
this._liveStream = new LiveStreamApi(this.httpClient);
@@ -167,66 +87,62 @@ class StreamClient {
this._webhook = new WebhookApi(this.httpClient);
}
-
-
/**
- * Get an ApiKeyApi instance
- * @return ApiKeyApi
- */
+ * Get an ApiKeyApi instance
+ * @return ApiKeyApi
+ */
public get apiKey(): ApiKeyApi {
return this._apiKey;
}
/**
- * Get an LiveStreamApi instance
- * @return LiveStreamApi
- */
+ * Get an LiveStreamApi instance
+ * @return LiveStreamApi
+ */
public get liveStream(): LiveStreamApi {
return this._liveStream;
}
/**
- * Get an PlayersApi instance
- * @return PlayersApi
- */
+ * Get an PlayersApi instance
+ * @return PlayersApi
+ */
public get players(): PlayersApi {
return this._players;
}
/**
- * Get an PlaylistApi instance
- * @return PlaylistApi
- */
+ * Get an PlaylistApi instance
+ * @return PlaylistApi
+ */
public get playlist(): PlaylistApi {
return this._playlist;
}
/**
- * Get an VideoApi instance
- * @return VideoApi
- */
+ * Get an VideoApi instance
+ * @return VideoApi
+ */
public get video(): VideoApi {
return this._video;
}
/**
- * Get an VideoChapterApi instance
- * @return VideoChapterApi
- */
+ * Get an VideoChapterApi instance
+ * @return VideoChapterApi
+ */
public get videoChapter(): VideoChapterApi {
return this._videoChapter;
}
/**
- * Get an WebhookApi instance
- * @return WebhookApi
- */
+ * Get an WebhookApi instance
+ * @return WebhookApi
+ */
public get webhook(): WebhookApi {
return this._webhook;
}
-
-
private validateOrigin(type: string, name?: string, version?: string) {
if (name && !version) {
throw new Error(
@@ -251,7 +167,6 @@ class StreamClient {
}
}
-
public async uploadVideo(
id: string,
file: string,
@@ -347,5 +262,4 @@ class StreamClient {
}
}
-
export = StreamClient;
diff --git a/src/model/AddPlayerThemesToVideoRequest.ts b/src/model/AddPlayerThemesToVideoRequest.ts
index 286b3a8e..ac572982 100644
--- a/src/model/AddPlayerThemesToVideoRequest.ts
+++ b/src/model/AddPlayerThemesToVideoRequest.ts
@@ -3,7 +3,7 @@
* Aioz Stream Service
*
* The version of the OpenAPI document: 1.0
- *
+ *
*
* NOTE: This class is auto generated.
* Do not edit the class manually.
@@ -19,21 +19,20 @@ export default class AddPlayerThemesToVideoRequest {
static readonly attributeTypeMap: Array = [
{
- "name": "playerThemeId",
- "baseName": "player_theme_id",
- "type": "string",
- "format": "",
+ name: 'playerThemeId',
+ baseName: 'player_theme_id',
+ type: 'string',
+ format: '',
},
{
- "name": "videoId",
- "baseName": "video_id",
- "type": "string",
- "format": "",
- } ];
+ name: 'videoId',
+ baseName: 'video_id',
+ type: 'string',
+ format: '',
+ },
+ ];
static getAttributeTypeMap(): Array {
return AddPlayerThemesToVideoRequest.attributeTypeMap;
}
-
}
-
diff --git a/src/model/AddVideoToPlaylistRequest.ts b/src/model/AddVideoToPlaylistRequest.ts
index 8f8e3744..589d3d61 100644
--- a/src/model/AddVideoToPlaylistRequest.ts
+++ b/src/model/AddVideoToPlaylistRequest.ts
@@ -3,7 +3,7 @@
* Aioz Stream Service
*
* The version of the OpenAPI document: 1.0
- *
+ *
*
* NOTE: This class is auto generated.
* Do not edit the class manually.
@@ -18,15 +18,14 @@ export default class AddVideoToPlaylistRequest {
static readonly attributeTypeMap: Array = [
{
- "name": "videoId",
- "baseName": "video_id",
- "type": "string",
- "format": "",
- } ];
+ name: 'videoId',
+ baseName: 'video_id',
+ type: 'string',
+ format: '',
+ },
+ ];
static getAttributeTypeMap(): Array {
return AddVideoToPlaylistRequest.attributeTypeMap;
}
-
}
-
diff --git a/src/model/ApiKey.ts b/src/model/ApiKey.ts
index 28cd21d1..5d955a6b 100644
--- a/src/model/ApiKey.ts
+++ b/src/model/ApiKey.ts
@@ -3,13 +3,14 @@
* Aioz Stream Service
*
* The version of the OpenAPI document: 1.0
- *
+ *
*
* NOTE: This class is auto generated.
* Do not edit the class manually.
*/
import AttributeType from './AttributeType.js';
+import User from './User.js';
export default class ApiKey {
'createdAt'?: string;
@@ -23,80 +24,86 @@ export default class ApiKey {
'ttl'?: string;
'type'?: string;
'updatedAt'?: string;
+ 'user'?: User;
static readonly discriminator?: string = undefined;
static readonly attributeTypeMap: Array = [
{
- "name": "createdAt",
- "baseName": "created_at",
- "type": "string",
- "format": "",
+ name: 'createdAt',
+ baseName: 'created_at',
+ type: 'string',
+ format: '',
+ },
+ {
+ name: 'expiredAt',
+ baseName: 'expired_at',
+ type: 'string',
+ format: '',
},
{
- "name": "expiredAt",
- "baseName": "expired_at",
- "type": "string",
- "format": "",
+ name: 'id',
+ baseName: 'id',
+ type: 'string',
+ format: '',
},
{
- "name": "id",
- "baseName": "id",
- "type": "string",
- "format": "",
+ name: 'lastUsedAt',
+ baseName: 'last_used_at',
+ type: 'string',
+ format: '',
},
{
- "name": "lastUsedAt",
- "baseName": "last_used_at",
- "type": "string",
- "format": "",
+ name: 'name',
+ baseName: 'name',
+ type: 'string',
+ format: '',
},
{
- "name": "name",
- "baseName": "name",
- "type": "string",
- "format": "",
+ name: 'publicKey',
+ baseName: 'public_key',
+ type: 'string',
+ format: '',
},
{
- "name": "publicKey",
- "baseName": "public_key",
- "type": "string",
- "format": "",
+ name: 'secret',
+ baseName: 'secret',
+ type: 'string',
+ format: '',
},
{
- "name": "secret",
- "baseName": "secret",
- "type": "string",
- "format": "",
+ name: 'truncatedSecret',
+ baseName: 'truncated_secret',
+ type: 'string',
+ format: '',
},
{
- "name": "truncatedSecret",
- "baseName": "truncated_secret",
- "type": "string",
- "format": "",
+ name: 'ttl',
+ baseName: 'ttl',
+ type: 'string',
+ format: '',
},
{
- "name": "ttl",
- "baseName": "ttl",
- "type": "string",
- "format": "",
+ name: 'type',
+ baseName: 'type',
+ type: 'string',
+ format: '',
},
{
- "name": "type",
- "baseName": "type",
- "type": "string",
- "format": "",
+ name: 'updatedAt',
+ baseName: 'updated_at',
+ type: 'string',
+ format: '',
},
{
- "name": "updatedAt",
- "baseName": "updated_at",
- "type": "string",
- "format": "",
- } ];
+ name: 'user',
+ baseName: 'user',
+ type: 'User',
+ format: '',
+ },
+ ];
static getAttributeTypeMap(): Array {
return ApiKey.attributeTypeMap;
}
-
}
-
diff --git a/src/model/Asset.ts b/src/model/Asset.ts
index 87cb2225..9ae98ca8 100644
--- a/src/model/Asset.ts
+++ b/src/model/Asset.ts
@@ -3,7 +3,7 @@
* Aioz Stream Service
*
* The version of the OpenAPI document: 1.0
- *
+ *
*
* NOTE: This class is auto generated.
* Do not edit the class manually.
@@ -12,7 +12,6 @@
import AttributeType from './AttributeType.js';
export default class Asset {
- 'logo'?: string;
'logoImageLink'?: string;
'logoLink'?: string;
@@ -20,27 +19,20 @@ export default class Asset {
static readonly attributeTypeMap: Array = [
{
- "name": "logo",
- "baseName": "logo",
- "type": "string",
- "format": "",
+ name: 'logoImageLink',
+ baseName: 'logo_image_link',
+ type: 'string',
+ format: '',
},
{
- "name": "logoImageLink",
- "baseName": "logo_image_link",
- "type": "string",
- "format": "",
+ name: 'logoLink',
+ baseName: 'logo_link',
+ type: 'string',
+ format: '',
},
- {
- "name": "logoLink",
- "baseName": "logo_link",
- "type": "string",
- "format": "",
- } ];
+ ];
static getAttributeTypeMap(): Array {
return Asset.attributeTypeMap;
}
-
}
-
diff --git a/src/model/AttributeType.ts b/src/model/AttributeType.ts
index f5f22f81..51eddcee 100644
--- a/src/model/AttributeType.ts
+++ b/src/model/AttributeType.ts
@@ -4,4 +4,4 @@ export default interface AttributeType {
type: string;
format: string;
defaultValue?: any;
-}
\ No newline at end of file
+}
diff --git a/src/model/AudioConfig.ts b/src/model/AudioConfig.ts
new file mode 100644
index 00000000..4f2ddf9d
--- /dev/null
+++ b/src/model/AudioConfig.ts
@@ -0,0 +1,66 @@
+/**
+ * @aiozstream/nodejs-client
+ * Aioz Stream Service
+ *
+ * The version of the OpenAPI document: 1.0
+ *
+ *
+ * NOTE: This class is auto generated.
+ * Do not edit the class manually.
+ */
+
+import AttributeType from './AttributeType.js';
+
+export default class AudioConfig {
+ 'bitrate'?: number;
+ 'channels'?: string;
+ 'codec'?: string;
+ 'index'?: number;
+ 'language'?: string;
+ 'sampleRate'?: number;
+
+ static readonly discriminator?: string = undefined;
+
+ static readonly attributeTypeMap: Array = [
+ {
+ name: 'bitrate',
+ baseName: 'bitrate',
+ type: 'number',
+ format: '',
+ },
+ {
+ name: 'channels',
+ baseName: 'channels',
+ type: 'string',
+ format: '',
+ },
+ {
+ name: 'codec',
+ baseName: 'codec',
+ type: 'string',
+ format: '',
+ },
+ {
+ name: 'index',
+ baseName: 'index',
+ type: 'number',
+ format: '',
+ },
+ {
+ name: 'language',
+ baseName: 'language',
+ type: 'string',
+ format: '',
+ },
+ {
+ name: 'sampleRate',
+ baseName: 'sample_rate',
+ type: 'number',
+ format: '',
+ },
+ ];
+
+ static getAttributeTypeMap(): Array {
+ return AudioConfig.attributeTypeMap;
+ }
+}
diff --git a/src/model/Controls.ts b/src/model/Controls.ts
index 9e3e1eb5..65346009 100644
--- a/src/model/Controls.ts
+++ b/src/model/Controls.ts
@@ -3,7 +3,7 @@
* Aioz Stream Service
*
* The version of the OpenAPI document: 1.0
- *
+ *
*
* NOTE: This class is auto generated.
* Do not edit the class manually.
@@ -22,39 +22,38 @@ export default class Controls {
static readonly attributeTypeMap: Array = [
{
- "name": "enableApi",
- "baseName": "enable_api",
- "type": "boolean",
- "format": "",
+ name: 'enableApi',
+ baseName: 'enable_api',
+ type: 'boolean',
+ format: '',
},
{
- "name": "enableControls",
- "baseName": "enable_controls",
- "type": "boolean",
- "format": "",
+ name: 'enableControls',
+ baseName: 'enable_controls',
+ type: 'boolean',
+ format: '',
},
{
- "name": "forceAutoplay",
- "baseName": "force_autoplay",
- "type": "boolean",
- "format": "",
+ name: 'forceAutoplay',
+ baseName: 'force_autoplay',
+ type: 'boolean',
+ format: '',
},
{
- "name": "forceLoop",
- "baseName": "force_loop",
- "type": "boolean",
- "format": "",
+ name: 'forceLoop',
+ baseName: 'force_loop',
+ type: 'boolean',
+ format: '',
},
{
- "name": "hideTitle",
- "baseName": "hide_title",
- "type": "boolean",
- "format": "",
- } ];
+ name: 'hideTitle',
+ baseName: 'hide_title',
+ type: 'boolean',
+ format: '',
+ },
+ ];
static getAttributeTypeMap(): Array {
return Controls.attributeTypeMap;
}
-
}
-
diff --git a/src/model/CreateApiKeyData.ts b/src/model/CreateApiKeyData.ts
index ad5ad1ee..b28bfc1d 100644
--- a/src/model/CreateApiKeyData.ts
+++ b/src/model/CreateApiKeyData.ts
@@ -3,7 +3,7 @@
* Aioz Stream Service
*
* The version of the OpenAPI document: 1.0
- *
+ *
*
* NOTE: This class is auto generated.
* Do not edit the class manually.
@@ -19,15 +19,14 @@ export default class CreateApiKeyData {
static readonly attributeTypeMap: Array = [
{
- "name": "apiKey",
- "baseName": "api_key",
- "type": "ApiKey",
- "format": "",
- } ];
+ name: 'apiKey',
+ baseName: 'api_key',
+ type: 'ApiKey',
+ format: '',
+ },
+ ];
static getAttributeTypeMap(): Array {
return CreateApiKeyData.attributeTypeMap;
}
-
}
-
diff --git a/src/model/CreateApiKeyRequest.ts b/src/model/CreateApiKeyRequest.ts
index 1d2562d2..52ad57c1 100644
--- a/src/model/CreateApiKeyRequest.ts
+++ b/src/model/CreateApiKeyRequest.ts
@@ -3,7 +3,7 @@
* Aioz Stream Service
*
* The version of the OpenAPI document: 1.0
- *
+ *
*
* NOTE: This class is auto generated.
* Do not edit the class manually.
@@ -20,27 +20,26 @@ export default class CreateApiKeyRequest {
static readonly attributeTypeMap: Array = [
{
- "name": "apiKeyName",
- "baseName": "api_key_name",
- "type": "string",
- "format": "",
+ name: 'apiKeyName',
+ baseName: 'api_key_name',
+ type: 'string',
+ format: '',
},
{
- "name": "ttl",
- "baseName": "ttl",
- "type": "string",
- "format": "",
+ name: 'ttl',
+ baseName: 'ttl',
+ type: 'string',
+ format: '',
},
{
- "name": "type",
- "baseName": "type",
- "type": "string",
- "format": "",
- } ];
+ name: 'type',
+ baseName: 'type',
+ type: 'string',
+ format: '',
+ },
+ ];
static getAttributeTypeMap(): Array {
return CreateApiKeyRequest.attributeTypeMap;
}
-
}
-
diff --git a/src/model/CreateApiKeyResponse.ts b/src/model/CreateApiKeyResponse.ts
index 81c8eb5a..e545d488 100644
--- a/src/model/CreateApiKeyResponse.ts
+++ b/src/model/CreateApiKeyResponse.ts
@@ -3,7 +3,7 @@
* Aioz Stream Service
*
* The version of the OpenAPI document: 1.0
- *
+ *
*
* NOTE: This class is auto generated.
* Do not edit the class manually.
@@ -20,21 +20,20 @@ export default class CreateApiKeyResponse {
static readonly attributeTypeMap: Array = [
{
- "name": "data",
- "baseName": "data",
- "type": "CreateApiKeyData",
- "format": "",
+ name: 'data',
+ baseName: 'data',
+ type: 'CreateApiKeyData',
+ format: '',
},
{
- "name": "status",
- "baseName": "status",
- "type": "string",
- "format": "",
- } ];
+ name: 'status',
+ baseName: 'status',
+ type: 'string',
+ format: '',
+ },
+ ];
static getAttributeTypeMap(): Array {
return CreateApiKeyResponse.attributeTypeMap;
}
-
}
-
diff --git a/src/model/CreateLiveStreamKeyRequest.ts b/src/model/CreateLiveStreamKeyRequest.ts
index 953321a1..32ffc4f5 100644
--- a/src/model/CreateLiveStreamKeyRequest.ts
+++ b/src/model/CreateLiveStreamKeyRequest.ts
@@ -3,7 +3,7 @@
* Aioz Stream Service
*
* The version of the OpenAPI document: 1.0
- *
+ *
*
* NOTE: This class is auto generated.
* Do not edit the class manually.
@@ -19,21 +19,20 @@ export default class CreateLiveStreamKeyRequest {
static readonly attributeTypeMap: Array = [
{
- "name": "name",
- "baseName": "name",
- "type": "string",
- "format": "",
+ name: 'name',
+ baseName: 'name',
+ type: 'string',
+ format: '',
},
{
- "name": "save",
- "baseName": "save",
- "type": "boolean",
- "format": "",
- } ];
+ name: 'save',
+ baseName: 'save',
+ type: 'boolean',
+ format: '',
+ },
+ ];
static getAttributeTypeMap(): Array {
return CreateLiveStreamKeyRequest.attributeTypeMap;
}
-
}
-
diff --git a/src/model/CreateLiveStreamKeyResponse.ts b/src/model/CreateLiveStreamKeyResponse.ts
index f07c044f..314e200f 100644
--- a/src/model/CreateLiveStreamKeyResponse.ts
+++ b/src/model/CreateLiveStreamKeyResponse.ts
@@ -3,7 +3,7 @@
* Aioz Stream Service
*
* The version of the OpenAPI document: 1.0
- *
+ *
*
* NOTE: This class is auto generated.
* Do not edit the class manually.
@@ -20,21 +20,20 @@ export default class CreateLiveStreamKeyResponse {
static readonly attributeTypeMap: Array = [
{
- "name": "data",
- "baseName": "data",
- "type": "LiveStreamKeyData",
- "format": "",
+ name: 'data',
+ baseName: 'data',
+ type: 'LiveStreamKeyData',
+ format: '',
},
{
- "name": "status",
- "baseName": "status",
- "type": "string",
- "format": "",
- } ];
+ name: 'status',
+ baseName: 'status',
+ type: 'string',
+ format: '',
+ },
+ ];
static getAttributeTypeMap(): Array {
return CreateLiveStreamKeyResponse.attributeTypeMap;
}
-
}
-
diff --git a/src/model/CreateMediaRequest.ts b/src/model/CreateMediaRequest.ts
new file mode 100644
index 00000000..0a09f99d
--- /dev/null
+++ b/src/model/CreateMediaRequest.ts
@@ -0,0 +1,83 @@
+/**
+ * @aiozstream/nodejs-client
+ * Aioz Stream Service
+ *
+ * The version of the OpenAPI document: 1.0
+ *
+ *
+ * NOTE: This class is auto generated.
+ * Do not edit the class manually.
+ */
+
+import AttributeType from './AttributeType.js';
+import Metadata from './Metadata.js';
+import QualityConfig from './QualityConfig.js';
+import VideoWatermark from './VideoWatermark.js';
+
+export default class CreateMediaRequest {
+ 'description'?: string;
+ 'isPublic'?: boolean;
+ 'metadata'?: Array;
+ 'qualities'?: Array;
+ 'segmentDuration'?: number;
+ 'tags'?: Array;
+ 'title'?: string;
+ 'watermark'?: VideoWatermark;
+
+ static readonly discriminator?: string = undefined;
+
+ static readonly attributeTypeMap: Array = [
+ {
+ name: 'description',
+ baseName: 'description',
+ type: 'string',
+ format: '',
+ },
+ {
+ name: 'isPublic',
+ baseName: 'is_public',
+ type: 'boolean',
+ format: '',
+ },
+ {
+ name: 'metadata',
+ baseName: 'metadata',
+ type: 'Array',
+ format: '',
+ },
+ {
+ name: 'qualities',
+ baseName: 'qualities',
+ type: 'Array',
+ format: '',
+ },
+ {
+ name: 'segmentDuration',
+ baseName: 'segment_duration',
+ type: 'number',
+ format: '',
+ },
+ {
+ name: 'tags',
+ baseName: 'tags',
+ type: 'Array',
+ format: '',
+ },
+ {
+ name: 'title',
+ baseName: 'title',
+ type: 'string',
+ format: '',
+ },
+ {
+ name: 'watermark',
+ baseName: 'watermark',
+ type: 'VideoWatermark',
+ format: '',
+ },
+ ];
+
+ static getAttributeTypeMap(): Array {
+ return CreateMediaRequest.attributeTypeMap;
+ }
+}
diff --git a/src/model/CreateVideoResponse.ts b/src/model/CreateMediaResponse.ts
similarity index 56%
rename from src/model/CreateVideoResponse.ts
rename to src/model/CreateMediaResponse.ts
index daf532b1..e4f7f5df 100644
--- a/src/model/CreateVideoResponse.ts
+++ b/src/model/CreateMediaResponse.ts
@@ -3,38 +3,37 @@
* Aioz Stream Service
*
* The version of the OpenAPI document: 1.0
- *
+ *
*
* NOTE: This class is auto generated.
* Do not edit the class manually.
*/
import AttributeType from './AttributeType.js';
-import Video from './Video.js';
+import Media from './Media.js';
-export default class CreateVideoResponse {
- 'data'?: Video;
+export default class CreateMediaResponse {
+ 'data'?: Media;
'status'?: string;
static readonly discriminator?: string = undefined;
static readonly attributeTypeMap: Array = [
{
- "name": "data",
- "baseName": "data",
- "type": "Video",
- "format": "",
+ name: 'data',
+ baseName: 'data',
+ type: 'Media',
+ format: '',
},
{
- "name": "status",
- "baseName": "status",
- "type": "string",
- "format": "",
- } ];
+ name: 'status',
+ baseName: 'status',
+ type: 'string',
+ format: '',
+ },
+ ];
static getAttributeTypeMap(): Array {
- return CreateVideoResponse.attributeTypeMap;
+ return CreateMediaResponse.attributeTypeMap;
}
-
}
-
diff --git a/src/model/CreatePlayerThemeRequest.ts b/src/model/CreatePlayerThemeRequest.ts
index 141c1f61..3e4563c4 100644
--- a/src/model/CreatePlayerThemeRequest.ts
+++ b/src/model/CreatePlayerThemeRequest.ts
@@ -3,7 +3,7 @@
* Aioz Stream Service
*
* The version of the OpenAPI document: 1.0
- *
+ *
*
* NOTE: This class is auto generated.
* Do not edit the class manually.
@@ -23,33 +23,32 @@ export default class CreatePlayerThemeRequest {
static readonly attributeTypeMap: Array = [
{
- "name": "controls",
- "baseName": "controls",
- "type": "Controls",
- "format": "",
+ name: 'controls',
+ baseName: 'controls',
+ type: 'Controls',
+ format: '',
},
{
- "name": "isDefault",
- "baseName": "is_default",
- "type": "boolean",
- "format": "",
+ name: 'isDefault',
+ baseName: 'is_default',
+ type: 'boolean',
+ format: '',
},
{
- "name": "name",
- "baseName": "name",
- "type": "string",
- "format": "",
+ name: 'name',
+ baseName: 'name',
+ type: 'string',
+ format: '',
},
{
- "name": "theme",
- "baseName": "theme",
- "type": "Theme",
- "format": "",
- } ];
+ name: 'theme',
+ baseName: 'theme',
+ type: 'Theme',
+ format: '',
+ },
+ ];
static getAttributeTypeMap(): Array {
return CreatePlayerThemeRequest.attributeTypeMap;
}
-
}
-
diff --git a/src/model/CreatePlayerThemesData.ts b/src/model/CreatePlayerThemesData.ts
index c7f4e6c6..23f578f1 100644
--- a/src/model/CreatePlayerThemesData.ts
+++ b/src/model/CreatePlayerThemesData.ts
@@ -3,7 +3,7 @@
* Aioz Stream Service
*
* The version of the OpenAPI document: 1.0
- *
+ *
*
* NOTE: This class is auto generated.
* Do not edit the class manually.
@@ -19,15 +19,14 @@ export default class CreatePlayerThemesData {
static readonly attributeTypeMap: Array = [
{
- "name": "playerTheme",
- "baseName": "player_theme",
- "type": "PlayerTheme",
- "format": "",
- } ];
+ name: 'playerTheme',
+ baseName: 'player_theme',
+ type: 'PlayerTheme',
+ format: '',
+ },
+ ];
static getAttributeTypeMap(): Array {
return CreatePlayerThemesData.attributeTypeMap;
}
-
}
-
diff --git a/src/model/CreatePlayerThemesResponse.ts b/src/model/CreatePlayerThemesResponse.ts
index 6a24cc05..ef59feac 100644
--- a/src/model/CreatePlayerThemesResponse.ts
+++ b/src/model/CreatePlayerThemesResponse.ts
@@ -3,7 +3,7 @@
* Aioz Stream Service
*
* The version of the OpenAPI document: 1.0
- *
+ *
*
* NOTE: This class is auto generated.
* Do not edit the class manually.
@@ -20,21 +20,20 @@ export default class CreatePlayerThemesResponse {
static readonly attributeTypeMap: Array = [
{
- "name": "data",
- "baseName": "data",
- "type": "CreatePlayerThemesData",
- "format": "",
+ name: 'data',
+ baseName: 'data',
+ type: 'CreatePlayerThemesData',
+ format: '',
},
{
- "name": "status",
- "baseName": "status",
- "type": "string",
- "format": "",
- } ];
+ name: 'status',
+ baseName: 'status',
+ type: 'string',
+ format: '',
+ },
+ ];
static getAttributeTypeMap(): Array {
return CreatePlayerThemesResponse.attributeTypeMap;
}
-
}
-
diff --git a/src/model/CreatePlaylistData.ts b/src/model/CreatePlaylistData.ts
index 56467a76..eedc306e 100644
--- a/src/model/CreatePlaylistData.ts
+++ b/src/model/CreatePlaylistData.ts
@@ -3,7 +3,7 @@
* Aioz Stream Service
*
* The version of the OpenAPI document: 1.0
- *
+ *
*
* NOTE: This class is auto generated.
* Do not edit the class manually.
@@ -19,15 +19,14 @@ export default class CreatePlaylistData {
static readonly attributeTypeMap: Array = [
{
- "name": "playlist",
- "baseName": "playlist",
- "type": "Playlist",
- "format": "",
- } ];
+ name: 'playlist',
+ baseName: 'playlist',
+ type: 'Playlist',
+ format: '',
+ },
+ ];
static getAttributeTypeMap(): Array {
return CreatePlaylistData.attributeTypeMap;
}
-
}
-
diff --git a/src/model/CreatePlaylistRequest.ts b/src/model/CreatePlaylistRequest.ts
index 71e6c492..be391eca 100644
--- a/src/model/CreatePlaylistRequest.ts
+++ b/src/model/CreatePlaylistRequest.ts
@@ -3,7 +3,7 @@
* Aioz Stream Service
*
* The version of the OpenAPI document: 1.0
- *
+ *
*
* NOTE: This class is auto generated.
* Do not edit the class manually.
@@ -21,27 +21,26 @@ export default class CreatePlaylistRequest {
static readonly attributeTypeMap: Array = [
{
- "name": "metadata",
- "baseName": "metadata",
- "type": "Array",
- "format": "",
+ name: 'metadata',
+ baseName: 'metadata',
+ type: 'Array',
+ format: '',
},
{
- "name": "name",
- "baseName": "name",
- "type": "string",
- "format": "",
+ name: 'name',
+ baseName: 'name',
+ type: 'string',
+ format: '',
},
{
- "name": "tags",
- "baseName": "tags",
- "type": "Array",
- "format": "",
- } ];
+ name: 'tags',
+ baseName: 'tags',
+ type: 'Array',
+ format: '',
+ },
+ ];
static getAttributeTypeMap(): Array {
return CreatePlaylistRequest.attributeTypeMap;
}
-
}
-
diff --git a/src/model/CreatePlaylistResponse.ts b/src/model/CreatePlaylistResponse.ts
index 150a8fb5..8a808736 100644
--- a/src/model/CreatePlaylistResponse.ts
+++ b/src/model/CreatePlaylistResponse.ts
@@ -3,7 +3,7 @@
* Aioz Stream Service
*
* The version of the OpenAPI document: 1.0
- *
+ *
*
* NOTE: This class is auto generated.
* Do not edit the class manually.
@@ -20,21 +20,20 @@ export default class CreatePlaylistResponse {
static readonly attributeTypeMap: Array = [
{
- "name": "data",
- "baseName": "data",
- "type": "CreatePlaylistData",
- "format": "",
+ name: 'data',
+ baseName: 'data',
+ type: 'CreatePlaylistData',
+ format: '',
},
{
- "name": "status",
- "baseName": "status",
- "type": "string",
- "format": "",
- } ];
+ name: 'status',
+ baseName: 'status',
+ type: 'string',
+ format: '',
+ },
+ ];
static getAttributeTypeMap(): Array {
return CreatePlaylistResponse.attributeTypeMap;
}
-
}
-
diff --git a/src/model/CreateStreamingRequest.ts b/src/model/CreateStreamingRequest.ts
index 737ad0d9..67c77110 100644
--- a/src/model/CreateStreamingRequest.ts
+++ b/src/model/CreateStreamingRequest.ts
@@ -3,19 +3,20 @@
* Aioz Stream Service
*
* The version of the OpenAPI document: 1.0
- *
+ *
*
* NOTE: This class is auto generated.
* Do not edit the class manually.
*/
import AttributeType from './AttributeType.js';
+import QualityConfig from './QualityConfig.js';
export default class CreateStreamingRequest {
/**
- * Qualities of the video (default: 1080p, 720p, 360p, allow:2160p, 1440p, 1080p, 720p, 360p, 240p, 144p)
- */
- 'qualities'?: Array;
+ * Qualities of the media (default: 1080p, 720p, 360p, allow:2160p, 1440p, 1080p, 720p, 360p, 240p, 144p)
+ */
+ 'qualities'?: Array;
'save'?: boolean;
'title'?: string;
@@ -23,27 +24,26 @@ export default class CreateStreamingRequest {
static readonly attributeTypeMap: Array = [
{
- "name": "qualities",
- "baseName": "qualities",
- "type": "Array",
- "format": "",
+ name: 'qualities',
+ baseName: 'qualities',
+ type: 'Array',
+ format: '',
},
{
- "name": "save",
- "baseName": "save",
- "type": "boolean",
- "format": "",
+ name: 'save',
+ baseName: 'save',
+ type: 'boolean',
+ format: '',
},
{
- "name": "title",
- "baseName": "title",
- "type": "string",
- "format": "",
- } ];
+ name: 'title',
+ baseName: 'title',
+ type: 'string',
+ format: '',
+ },
+ ];
static getAttributeTypeMap(): Array {
return CreateStreamingRequest.attributeTypeMap;
}
-
}
-
diff --git a/src/model/CreateStreamingResponse.ts b/src/model/CreateStreamingResponse.ts
index 4d2df420..b5a8cfe2 100644
--- a/src/model/CreateStreamingResponse.ts
+++ b/src/model/CreateStreamingResponse.ts
@@ -3,38 +3,37 @@
* Aioz Stream Service
*
* The version of the OpenAPI document: 1.0
- *
+ *
*
* NOTE: This class is auto generated.
* Do not edit the class manually.
*/
import AttributeType from './AttributeType.js';
-import LiveStreamVideoData from './LiveStreamVideoData.js';
+import LiveStreamMediaData from './LiveStreamMediaData.js';
export default class CreateStreamingResponse {
- 'data'?: LiveStreamVideoData;
+ 'data'?: LiveStreamMediaData;
'status'?: string;
static readonly discriminator?: string = undefined;
static readonly attributeTypeMap: Array = [
{
- "name": "data",
- "baseName": "data",
- "type": "LiveStreamVideoData",
- "format": "",
+ name: 'data',
+ baseName: 'data',
+ type: 'LiveStreamMediaData',
+ format: '',
},
{
- "name": "status",
- "baseName": "status",
- "type": "string",
- "format": "",
- } ];
+ name: 'status',
+ baseName: 'status',
+ type: 'string',
+ format: '',
+ },
+ ];
static getAttributeTypeMap(): Array {
return CreateStreamingResponse.attributeTypeMap;
}
-
}
-
diff --git a/src/model/CreateVideoCaptionData.ts b/src/model/CreateVideoCaptionData.ts
index e273b37b..9b49c22e 100644
--- a/src/model/CreateVideoCaptionData.ts
+++ b/src/model/CreateVideoCaptionData.ts
@@ -3,7 +3,7 @@
* Aioz Stream Service
*
* The version of the OpenAPI document: 1.0
- *
+ *
*
* NOTE: This class is auto generated.
* Do not edit the class manually.
@@ -19,15 +19,14 @@ export default class CreateVideoCaptionData {
static readonly attributeTypeMap: Array = [
{
- "name": "videoCaption",
- "baseName": "video_caption",
- "type": "VideoCaption",
- "format": "",
- } ];
+ name: 'videoCaption',
+ baseName: 'video_caption',
+ type: 'VideoCaption',
+ format: '',
+ },
+ ];
static getAttributeTypeMap(): Array {
return CreateVideoCaptionData.attributeTypeMap;
}
-
}
-
diff --git a/src/model/CreateVideoCaptionResponse.ts b/src/model/CreateVideoCaptionResponse.ts
index e81f5516..2db9d576 100644
--- a/src/model/CreateVideoCaptionResponse.ts
+++ b/src/model/CreateVideoCaptionResponse.ts
@@ -3,7 +3,7 @@
* Aioz Stream Service
*
* The version of the OpenAPI document: 1.0
- *
+ *
*
* NOTE: This class is auto generated.
* Do not edit the class manually.
@@ -20,21 +20,20 @@ export default class CreateVideoCaptionResponse {
static readonly attributeTypeMap: Array = [
{
- "name": "data",
- "baseName": "data",
- "type": "CreateVideoCaptionData",
- "format": "",
+ name: 'data',
+ baseName: 'data',
+ type: 'CreateVideoCaptionData',
+ format: '',
},
{
- "name": "status",
- "baseName": "status",
- "type": "string",
- "format": "",
- } ];
+ name: 'status',
+ baseName: 'status',
+ type: 'string',
+ format: '',
+ },
+ ];
static getAttributeTypeMap(): Array {
return CreateVideoCaptionResponse.attributeTypeMap;
}
-
}
-
diff --git a/src/model/CreateVideoChapterData.ts b/src/model/CreateVideoChapterData.ts
index 996d9d63..f449dfb8 100644
--- a/src/model/CreateVideoChapterData.ts
+++ b/src/model/CreateVideoChapterData.ts
@@ -3,7 +3,7 @@
* Aioz Stream Service
*
* The version of the OpenAPI document: 1.0
- *
+ *
*
* NOTE: This class is auto generated.
* Do not edit the class manually.
@@ -19,15 +19,14 @@ export default class CreateVideoChapterData {
static readonly attributeTypeMap: Array = [
{
- "name": "videoChapter",
- "baseName": "video_chapter",
- "type": "VideoChapter",
- "format": "",
- } ];
+ name: 'videoChapter',
+ baseName: 'video_chapter',
+ type: 'VideoChapter',
+ format: '',
+ },
+ ];
static getAttributeTypeMap(): Array {
return CreateVideoChapterData.attributeTypeMap;
}
-
}
-
diff --git a/src/model/CreateVideoChapterResponse.ts b/src/model/CreateVideoChapterResponse.ts
index c7a04785..5e7cd8db 100644
--- a/src/model/CreateVideoChapterResponse.ts
+++ b/src/model/CreateVideoChapterResponse.ts
@@ -3,7 +3,7 @@
* Aioz Stream Service
*
* The version of the OpenAPI document: 1.0
- *
+ *
*
* NOTE: This class is auto generated.
* Do not edit the class manually.
@@ -20,21 +20,20 @@ export default class CreateVideoChapterResponse {
static readonly attributeTypeMap: Array = [
{
- "name": "data",
- "baseName": "data",
- "type": "CreateVideoChapterData",
- "format": "",
+ name: 'data',
+ baseName: 'data',
+ type: 'CreateVideoChapterData',
+ format: '',
},
{
- "name": "status",
- "baseName": "status",
- "type": "string",
- "format": "",
- } ];
+ name: 'status',
+ baseName: 'status',
+ type: 'string',
+ format: '',
+ },
+ ];
static getAttributeTypeMap(): Array {
return CreateVideoChapterResponse.attributeTypeMap;
}
-
}
-
diff --git a/src/model/CreateVideoRequest.ts b/src/model/CreateVideoRequest.ts
deleted file mode 100644
index 71cb611b..00000000
--- a/src/model/CreateVideoRequest.ts
+++ /dev/null
@@ -1,97 +0,0 @@
-/**
- * @aiozstream/nodejs-client
- * Aioz Stream Service
- *
- * The version of the OpenAPI document: 1.0
- *
- *
- * NOTE: This class is auto generated.
- * Do not edit the class manually.
- */
-
-import AttributeType from './AttributeType.js';
-import Metadata from './Metadata.js';
-import VideoWatermark from './VideoWatermark.js';
-
-export default class CreateVideoRequest {
- /**
- * Description of the video
- */
- 'description'?: string;
- /**
- * // Is panoramic video IsPanoramic *bool `json:\"is_panoramic\" form:\"is_panoramic\"` Is public video
- */
- 'isPublic'?: boolean;
- /**
- * Metadata of the video (key-value pair, max: 50 items, key max length: 255, value max length: 255)
- */
- 'metadata'?: Array;
- /**
- * Qualities of the video (default: 1080p, 720p, 360p, allow:2160p, 1440p, 1080p, 720p, 360p, 240p, 144p)
- */
- 'qualities'?: Array;
- /**
- * Tags of the video (max: 50 items, max length: 255)
- */
- 'tags'?: Array;
- /**
- * Title of the video
- */
- 'title'?: string;
- /**
- * Video thumbnailConfig
- */
- 'watermark'?: VideoWatermark;
-
- static readonly discriminator?: string = undefined;
-
- static readonly attributeTypeMap: Array = [
- {
- "name": "description",
- "baseName": "description",
- "type": "string",
- "format": "",
- },
- {
- "name": "isPublic",
- "baseName": "is_public",
- "type": "boolean",
- "format": "",
- },
- {
- "name": "metadata",
- "baseName": "metadata",
- "type": "Array",
- "format": "",
- },
- {
- "name": "qualities",
- "baseName": "qualities",
- "type": "Array",
- "format": "",
- },
- {
- "name": "tags",
- "baseName": "tags",
- "type": "Array",
- "format": "",
- },
- {
- "name": "title",
- "baseName": "title",
- "type": "string",
- "format": "",
- },
- {
- "name": "watermark",
- "baseName": "watermark",
- "type": "VideoWatermark",
- "format": "",
- } ];
-
- static getAttributeTypeMap(): Array {
- return CreateVideoRequest.attributeTypeMap;
- }
-
-}
-
diff --git a/src/model/CreateWebhookData.ts b/src/model/CreateWebhookData.ts
index bc30d29a..ca65bf66 100644
--- a/src/model/CreateWebhookData.ts
+++ b/src/model/CreateWebhookData.ts
@@ -3,7 +3,7 @@
* Aioz Stream Service
*
* The version of the OpenAPI document: 1.0
- *
+ *
*
* NOTE: This class is auto generated.
* Do not edit the class manually.
@@ -19,15 +19,14 @@ export default class CreateWebhookData {
static readonly attributeTypeMap: Array = [
{
- "name": "webhook",
- "baseName": "webhook",
- "type": "Webhook",
- "format": "",
- } ];
+ name: 'webhook',
+ baseName: 'webhook',
+ type: 'Webhook',
+ format: '',
+ },
+ ];
static getAttributeTypeMap(): Array {
return CreateWebhookData.attributeTypeMap;
}
-
}
-
diff --git a/src/model/CreateWebhookRequest.ts b/src/model/CreateWebhookRequest.ts
index 110f7cc8..97e65e11 100644
--- a/src/model/CreateWebhookRequest.ts
+++ b/src/model/CreateWebhookRequest.ts
@@ -3,7 +3,7 @@
* Aioz Stream Service
*
* The version of the OpenAPI document: 1.0
- *
+ *
*
* NOTE: This class is auto generated.
* Do not edit the class manually.
@@ -12,49 +12,62 @@
import AttributeType from './AttributeType.js';
export default class CreateWebhookRequest {
+ 'encodingFailed'?: boolean;
'encodingFinished'?: boolean;
'encodingStarted'?: boolean;
'fileReceived'?: boolean;
'name'?: string;
+ 'partialFinished'?: boolean;
'url'?: string;
static readonly discriminator?: string = undefined;
static readonly attributeTypeMap: Array = [
{
- "name": "encodingFinished",
- "baseName": "encoding_finished",
- "type": "boolean",
- "format": "",
+ name: 'encodingFailed',
+ baseName: 'encoding_failed',
+ type: 'boolean',
+ format: '',
+ },
+ {
+ name: 'encodingFinished',
+ baseName: 'encoding_finished',
+ type: 'boolean',
+ format: '',
+ },
+ {
+ name: 'encodingStarted',
+ baseName: 'encoding_started',
+ type: 'boolean',
+ format: '',
},
{
- "name": "encodingStarted",
- "baseName": "encoding_started",
- "type": "boolean",
- "format": "",
+ name: 'fileReceived',
+ baseName: 'file_received',
+ type: 'boolean',
+ format: '',
},
{
- "name": "fileReceived",
- "baseName": "file_received",
- "type": "boolean",
- "format": "",
+ name: 'name',
+ baseName: 'name',
+ type: 'string',
+ format: '',
},
{
- "name": "name",
- "baseName": "name",
- "type": "string",
- "format": "",
+ name: 'partialFinished',
+ baseName: 'partial_finished',
+ type: 'boolean',
+ format: '',
},
{
- "name": "url",
- "baseName": "url",
- "type": "string",
- "format": "",
- } ];
+ name: 'url',
+ baseName: 'url',
+ type: 'string',
+ format: '',
+ },
+ ];
static getAttributeTypeMap(): Array {
return CreateWebhookRequest.attributeTypeMap;
}
-
}
-
diff --git a/src/model/CreateWebhookResponse.ts b/src/model/CreateWebhookResponse.ts
index 2ef96e28..85afb1f3 100644
--- a/src/model/CreateWebhookResponse.ts
+++ b/src/model/CreateWebhookResponse.ts
@@ -3,7 +3,7 @@
* Aioz Stream Service
*
* The version of the OpenAPI document: 1.0
- *
+ *
*
* NOTE: This class is auto generated.
* Do not edit the class manually.
@@ -20,21 +20,20 @@ export default class CreateWebhookResponse {
static readonly attributeTypeMap: Array = [
{
- "name": "data",
- "baseName": "data",
- "type": "CreateWebhookData",
- "format": "",
+ name: 'data',
+ baseName: 'data',
+ type: 'CreateWebhookData',
+ format: '',
},
{
- "name": "status",
- "baseName": "status",
- "type": "string",
- "format": "",
- } ];
+ name: 'status',
+ baseName: 'status',
+ type: 'string',
+ format: '',
+ },
+ ];
static getAttributeTypeMap(): Array {
return CreateWebhookResponse.attributeTypeMap;
}
-
}
-
diff --git a/src/model/GetApiKeysData.ts b/src/model/GetApiKeysData.ts
index 58f2aa06..8b5904ee 100644
--- a/src/model/GetApiKeysData.ts
+++ b/src/model/GetApiKeysData.ts
@@ -3,7 +3,7 @@
* Aioz Stream Service
*
* The version of the OpenAPI document: 1.0
- *
+ *
*
* NOTE: This class is auto generated.
* Do not edit the class manually.
@@ -20,21 +20,20 @@ export default class GetApiKeysData {
static readonly attributeTypeMap: Array = [
{
- "name": "apiKeys",
- "baseName": "api_keys",
- "type": "Array",
- "format": "",
+ name: 'apiKeys',
+ baseName: 'api_keys',
+ type: 'Array',
+ format: '',
},
{
- "name": "total",
- "baseName": "total",
- "type": "number",
- "format": "",
- } ];
+ name: 'total',
+ baseName: 'total',
+ type: 'number',
+ format: '',
+ },
+ ];
static getAttributeTypeMap(): Array {
return GetApiKeysData.attributeTypeMap;
}
-
}
-
diff --git a/src/model/GetApiKeysResponse.ts b/src/model/GetApiKeysResponse.ts
index e067b90a..3bad1030 100644
--- a/src/model/GetApiKeysResponse.ts
+++ b/src/model/GetApiKeysResponse.ts
@@ -3,7 +3,7 @@
* Aioz Stream Service
*
* The version of the OpenAPI document: 1.0
- *
+ *
*
* NOTE: This class is auto generated.
* Do not edit the class manually.
@@ -20,21 +20,20 @@ export default class GetApiKeysResponse {
static readonly attributeTypeMap: Array = [
{
- "name": "data",
- "baseName": "data",
- "type": "GetApiKeysData",
- "format": "",
+ name: 'data',
+ baseName: 'data',
+ type: 'GetApiKeysData',
+ format: '',
},
{
- "name": "status",
- "baseName": "status",
- "type": "string",
- "format": "",
- } ];
+ name: 'status',
+ baseName: 'status',
+ type: 'string',
+ format: '',
+ },
+ ];
static getAttributeTypeMap(): Array {
return GetApiKeysResponse.attributeTypeMap;
}
-
}
-
diff --git a/src/model/GetLiveStreamKeyData.ts b/src/model/GetLiveStreamKeyData.ts
index 4a8f6e3e..cd8ebd49 100644
--- a/src/model/GetLiveStreamKeyData.ts
+++ b/src/model/GetLiveStreamKeyData.ts
@@ -3,7 +3,7 @@
* Aioz Stream Service
*
* The version of the OpenAPI document: 1.0
- *
+ *
*
* NOTE: This class is auto generated.
* Do not edit the class manually.
@@ -25,57 +25,56 @@ export default class GetLiveStreamKeyData {
static readonly attributeTypeMap: Array = [
{
- "name": "createdAt",
- "baseName": "created_at",
- "type": "string",
- "format": "",
+ name: 'createdAt',
+ baseName: 'created_at',
+ type: 'string',
+ format: '',
},
{
- "name": "id",
- "baseName": "id",
- "type": "string",
- "format": "",
+ name: 'id',
+ baseName: 'id',
+ type: 'string',
+ format: '',
},
{
- "name": "name",
- "baseName": "name",
- "type": "string",
- "format": "",
+ name: 'name',
+ baseName: 'name',
+ type: 'string',
+ format: '',
},
{
- "name": "rtmpUrl",
- "baseName": "rtmp_url",
- "type": "string",
- "format": "",
+ name: 'rtmpUrl',
+ baseName: 'rtmp_url',
+ type: 'string',
+ format: '',
},
{
- "name": "save",
- "baseName": "save",
- "type": "boolean",
- "format": "",
+ name: 'save',
+ baseName: 'save',
+ type: 'boolean',
+ format: '',
},
{
- "name": "streamKey",
- "baseName": "stream_key",
- "type": "string",
- "format": "",
+ name: 'streamKey',
+ baseName: 'stream_key',
+ type: 'string',
+ format: '',
},
{
- "name": "updatedAt",
- "baseName": "updated_at",
- "type": "string",
- "format": "",
+ name: 'updatedAt',
+ baseName: 'updated_at',
+ type: 'string',
+ format: '',
},
{
- "name": "userId",
- "baseName": "user_id",
- "type": "string",
- "format": "",
- } ];
+ name: 'userId',
+ baseName: 'user_id',
+ type: 'string',
+ format: '',
+ },
+ ];
static getAttributeTypeMap(): Array {
return GetLiveStreamKeyData.attributeTypeMap;
}
-
}
-
diff --git a/src/model/GetLiveStreamKeyResponse.ts b/src/model/GetLiveStreamKeyResponse.ts
index ea4174a7..906e6e59 100644
--- a/src/model/GetLiveStreamKeyResponse.ts
+++ b/src/model/GetLiveStreamKeyResponse.ts
@@ -3,7 +3,7 @@
* Aioz Stream Service
*
* The version of the OpenAPI document: 1.0
- *
+ *
*
* NOTE: This class is auto generated.
* Do not edit the class manually.
@@ -20,21 +20,20 @@ export default class GetLiveStreamKeyResponse {
static readonly attributeTypeMap: Array = [
{
- "name": "data",
- "baseName": "data",
- "type": "GetLiveStreamKeyData",
- "format": "",
+ name: 'data',
+ baseName: 'data',
+ type: 'GetLiveStreamKeyData',
+ format: '',
},
{
- "name": "status",
- "baseName": "status",
- "type": "string",
- "format": "",
- } ];
+ name: 'status',
+ baseName: 'status',
+ type: 'string',
+ format: '',
+ },
+ ];
static getAttributeTypeMap(): Array {
return GetLiveStreamKeyResponse.attributeTypeMap;
}
-
}
-
diff --git a/src/model/GetLiveStreamKeysListData.ts b/src/model/GetLiveStreamKeysListData.ts
index a8bd35a2..21587929 100644
--- a/src/model/GetLiveStreamKeysListData.ts
+++ b/src/model/GetLiveStreamKeysListData.ts
@@ -3,7 +3,7 @@
* Aioz Stream Service
*
* The version of the OpenAPI document: 1.0
- *
+ *
*
* NOTE: This class is auto generated.
* Do not edit the class manually.
@@ -20,21 +20,20 @@ export default class GetLiveStreamKeysListData {
static readonly attributeTypeMap: Array = [
{
- "name": "liveStreamKeys",
- "baseName": "live_stream_keys",
- "type": "Array",
- "format": "",
+ name: 'liveStreamKeys',
+ baseName: 'live_stream_keys',
+ type: 'Array',
+ format: '',
},
{
- "name": "total",
- "baseName": "total",
- "type": "number",
- "format": "",
- } ];
+ name: 'total',
+ baseName: 'total',
+ type: 'number',
+ format: '',
+ },
+ ];
static getAttributeTypeMap(): Array {
return GetLiveStreamKeysListData.attributeTypeMap;
}
-
}
-
diff --git a/src/model/GetLiveStreamKeysListResponse.ts b/src/model/GetLiveStreamKeysListResponse.ts
index 38706d74..565d0c79 100644
--- a/src/model/GetLiveStreamKeysListResponse.ts
+++ b/src/model/GetLiveStreamKeysListResponse.ts
@@ -3,7 +3,7 @@
* Aioz Stream Service
*
* The version of the OpenAPI document: 1.0
- *
+ *
*
* NOTE: This class is auto generated.
* Do not edit the class manually.
@@ -20,21 +20,20 @@ export default class GetLiveStreamKeysListResponse {
static readonly attributeTypeMap: Array = [
{
- "name": "data",
- "baseName": "data",
- "type": "GetLiveStreamKeysListData",
- "format": "",
+ name: 'data',
+ baseName: 'data',
+ type: 'GetLiveStreamKeysListData',
+ format: '',
},
{
- "name": "status",
- "baseName": "status",
- "type": "string",
- "format": "",
- } ];
+ name: 'status',
+ baseName: 'status',
+ type: 'string',
+ format: '',
+ },
+ ];
static getAttributeTypeMap(): Array {
return GetLiveStreamKeysListResponse.attributeTypeMap;
}
-
}
-
diff --git a/src/model/GetLiveStreamMediasRequest.ts b/src/model/GetLiveStreamMediasRequest.ts
new file mode 100644
index 00000000..0421a9b8
--- /dev/null
+++ b/src/model/GetLiveStreamMediasRequest.ts
@@ -0,0 +1,80 @@
+/**
+ * @aiozstream/nodejs-client
+ * Aioz Stream Service
+ *
+ * The version of the OpenAPI document: 1.0
+ *
+ *
+ * NOTE: This class is auto generated.
+ * Do not edit the class manually.
+ */
+
+import AttributeType from './AttributeType.js';
+
+export default class GetLiveStreamMediasRequest {
+ 'limit'?: number;
+ 'liveStreamKeyId'?: string;
+ 'mediaStatus'?: string;
+ 'offset'?: number;
+ 'orderBy'?: string;
+ 'search'?: string;
+ 'sortBy'?: string;
+ 'status'?: string;
+
+ static readonly discriminator?: string = undefined;
+
+ static readonly attributeTypeMap: Array = [
+ {
+ name: 'limit',
+ baseName: 'limit',
+ type: 'number',
+ format: '',
+ },
+ {
+ name: 'liveStreamKeyId',
+ baseName: 'live_stream_key_id',
+ type: 'string',
+ format: '',
+ },
+ {
+ name: 'mediaStatus',
+ baseName: 'media_status',
+ type: 'string',
+ format: '',
+ },
+ {
+ name: 'offset',
+ baseName: 'offset',
+ type: 'number',
+ format: '',
+ },
+ {
+ name: 'orderBy',
+ baseName: 'order_by',
+ type: 'string',
+ format: '',
+ },
+ {
+ name: 'search',
+ baseName: 'search',
+ type: 'string',
+ format: '',
+ },
+ {
+ name: 'sortBy',
+ baseName: 'sort_by',
+ type: 'string',
+ format: '',
+ },
+ {
+ name: 'status',
+ baseName: 'status',
+ type: 'string',
+ format: '',
+ },
+ ];
+
+ static getAttributeTypeMap(): Array {
+ return GetLiveStreamMediasRequest.attributeTypeMap;
+ }
+}
diff --git a/src/model/GetLiveStreamVideosResponse.ts b/src/model/GetLiveStreamMediasResponse.ts
similarity index 51%
rename from src/model/GetLiveStreamVideosResponse.ts
rename to src/model/GetLiveStreamMediasResponse.ts
index 5e326d04..b6cd1a16 100644
--- a/src/model/GetLiveStreamVideosResponse.ts
+++ b/src/model/GetLiveStreamMediasResponse.ts
@@ -3,38 +3,37 @@
* Aioz Stream Service
*
* The version of the OpenAPI document: 1.0
- *
+ *
*
* NOTE: This class is auto generated.
* Do not edit the class manually.
*/
import AttributeType from './AttributeType.js';
-import LiveStreamVideosResponse from './LiveStreamVideosResponse.js';
+import LiveStreamMediasResponse from './LiveStreamMediasResponse.js';
-export default class GetLiveStreamVideosResponse {
- 'data'?: LiveStreamVideosResponse;
+export default class GetLiveStreamMediasResponse {
+ 'data'?: LiveStreamMediasResponse;
'status'?: string;
static readonly discriminator?: string = undefined;
static readonly attributeTypeMap: Array = [
{
- "name": "data",
- "baseName": "data",
- "type": "LiveStreamVideosResponse",
- "format": "",
+ name: 'data',
+ baseName: 'data',
+ type: 'LiveStreamMediasResponse',
+ format: '',
},
{
- "name": "status",
- "baseName": "status",
- "type": "string",
- "format": "",
- } ];
+ name: 'status',
+ baseName: 'status',
+ type: 'string',
+ format: '',
+ },
+ ];
static getAttributeTypeMap(): Array {
- return GetLiveStreamVideosResponse.attributeTypeMap;
+ return GetLiveStreamMediasResponse.attributeTypeMap;
}
-
}
-
diff --git a/src/model/GetLiveStreamMulticastResponse.ts b/src/model/GetLiveStreamMulticastResponse.ts
new file mode 100644
index 00000000..a5b3a6fc
--- /dev/null
+++ b/src/model/GetLiveStreamMulticastResponse.ts
@@ -0,0 +1,39 @@
+/**
+ * @aiozstream/nodejs-client
+ * Aioz Stream Service
+ *
+ * The version of the OpenAPI document: 1.0
+ *
+ *
+ * NOTE: This class is auto generated.
+ * Do not edit the class manually.
+ */
+
+import AttributeType from './AttributeType.js';
+import LiveStreamMulticast from './LiveStreamMulticast.js';
+
+export default class GetLiveStreamMulticastResponse {
+ 'data'?: LiveStreamMulticast;
+ 'status'?: string;
+
+ static readonly discriminator?: string = undefined;
+
+ static readonly attributeTypeMap: Array = [
+ {
+ name: 'data',
+ baseName: 'data',
+ type: 'LiveStreamMulticast',
+ format: '',
+ },
+ {
+ name: 'status',
+ baseName: 'status',
+ type: 'string',
+ format: '',
+ },
+ ];
+
+ static getAttributeTypeMap(): Array {
+ return GetLiveStreamMulticastResponse.attributeTypeMap;
+ }
+}
diff --git a/src/model/GetLiveStreamStatisticResponse.ts b/src/model/GetLiveStreamStatisticResponse.ts
new file mode 100644
index 00000000..84d58e88
--- /dev/null
+++ b/src/model/GetLiveStreamStatisticResponse.ts
@@ -0,0 +1,39 @@
+/**
+ * @aiozstream/nodejs-client
+ * Aioz Stream Service
+ *
+ * The version of the OpenAPI document: 1.0
+ *
+ *
+ * NOTE: This class is auto generated.
+ * Do not edit the class manually.
+ */
+
+import AttributeType from './AttributeType.js';
+import LiveStreamStatisticResp from './LiveStreamStatisticResp.js';
+
+export default class GetLiveStreamStatisticResponse {
+ 'data'?: LiveStreamStatisticResp;
+ 'status'?: string;
+
+ static readonly discriminator?: string = undefined;
+
+ static readonly attributeTypeMap: Array = [
+ {
+ name: 'data',
+ baseName: 'data',
+ type: 'LiveStreamStatisticResp',
+ format: '',
+ },
+ {
+ name: 'status',
+ baseName: 'status',
+ type: 'string',
+ format: '',
+ },
+ ];
+
+ static getAttributeTypeMap(): Array {
+ return GetLiveStreamStatisticResponse.attributeTypeMap;
+ }
+}
diff --git a/src/model/GetLiveStreamVideoPublicResponse.ts b/src/model/GetLiveStreamVideoPublicResponse.ts
index 9ffd2e5e..4ff3bc04 100644
--- a/src/model/GetLiveStreamVideoPublicResponse.ts
+++ b/src/model/GetLiveStreamVideoPublicResponse.ts
@@ -3,38 +3,37 @@
* Aioz Stream Service
*
* The version of the OpenAPI document: 1.0
- *
+ *
*
* NOTE: This class is auto generated.
* Do not edit the class manually.
*/
import AttributeType from './AttributeType.js';
-import LiveStreamVideoResponse from './LiveStreamVideoResponse.js';
+import LiveStreamMediaResponse from './LiveStreamMediaResponse.js';
export default class GetLiveStreamVideoPublicResponse {
- 'data'?: LiveStreamVideoResponse;
+ 'data'?: LiveStreamMediaResponse;
'status'?: string;
static readonly discriminator?: string = undefined;
static readonly attributeTypeMap: Array = [
{
- "name": "data",
- "baseName": "data",
- "type": "LiveStreamVideoResponse",
- "format": "",
+ name: 'data',
+ baseName: 'data',
+ type: 'LiveStreamMediaResponse',
+ format: '',
},
{
- "name": "status",
- "baseName": "status",
- "type": "string",
- "format": "",
- } ];
+ name: 'status',
+ baseName: 'status',
+ type: 'string',
+ format: '',
+ },
+ ];
static getAttributeTypeMap(): Array