@dolbyio/dolbyio-rest-apis-client
Version:
Node.JS wrapper for the Dolby.io REST APIs
48 lines (47 loc) • 2.08 kB
TypeScript
import { CreateAssetClipRequest, ListMediaAssetsQueryParams, AssetResponseData } from './types/asset';
/**
* Creates a new media asset.
*
* @link https://docs.dolby.io/streaming-apis/reference/media-assets-post
*
* @param apiSecret The API Secret used to authenticate this request.
* @param clipRequest The request body for creating a new media asset.
* @param idempotencyKey Optional, The unique identifier for this request to prevent duplicate submissions.
*/
export declare const create: (apiSecret: string, clipRequest: CreateAssetClipRequest, idempotencyKey?: string) => Promise<AssetResponseData>;
/**
* Lists media assets.
*
* @link https://docs.dolby.io/streaming-apis/reference/media-assets-get
*
* @param apiSecret The API Secret used to authenticate this request.
* @param params Query parameters for filtering the list of media assets.
*
* @returns A {@link !Promise Promise} whose fulfillment handler receives an array of {@link AssetResponseData} objects.
*/
export declare const list: (apiSecret: string, params: ListMediaAssetsQueryParams) => Promise<AssetResponseData[]>;
/**
* Deletes multiple media assets from storage.
*
* @link https://docs.dolby.io/streaming-apis/reference/media-assets-delete
*
* @param apiSecret The API Secret used to authenticate this request.
* @param assetIds The list of asset IDs to delete.
*
* @returns A {@link !Promise Promise} whose fulfillment handler receives an array of asset deletion tasks that failed.
*/
export declare const deleteAssets: (apiSecret: string, assetIds: string[]) => Promise<{
id?: string;
error?: string;
}[]>;
/**
* Reads a media asset.
*
* @link https://docs.dolby.io/streaming-apis/reference/media-assets-mediaassetid-get
*
* @param apiSecret The API Secret used to authenticate this request.
* @param assetId The ID of the media asset to read.
*
* @returns A {@link !Promise Promise} whose fulfillment handler receives an {@link AssetResponseData} object.
*/
export declare const read: (apiSecret: string, assetId: string) => Promise<AssetResponseData>;