///
import { Media, MediaCategory } from './media';
import { Transport } from './services/transport';
export declare type LogLevel = 'trace' | 'debug' | 'info' | 'warn' | 'error' | 'silent' | null;
export interface Options {
region?: string;
logLevel?: LogLevel;
transport?: Transport;
}
/**
* @classdesc A Client provides an interface for Media Content Service
*/
declare class Client {
private readonly transport;
private options;
private network;
private config;
static readonly version: string;
/**
* @param {String} token - Access token
* @param {String} baseUrl - Base URL for Media Content Service, i.e. /v1/Services/{serviceSid}/Media
* @param {Client#ClientOptions} [options] - Options to customize the Client
*/
constructor(token: string, baseUrl: string, options?: Options);
/**
* These options can be passed to Client constructor
* @typedef {Object} Client#ClientOptions
* @property {String} [logLevel='error'] - The level of logging to enable. Valid options
* (from strictest to broadest): ['silent', 'error', 'warn', 'info', 'debug', 'trace']
*/
/**
* Update the token used for Client operations
* @param {String} token - The JWT string of the new token
* @public
* @returns {void}
*/
updateToken(token: string): void;
/**
* Gets media from media service
* @param {String} sid - Media's SID
* @public
* @returns {Promise}
*/
get(sid: string): Promise;
/**
* Posts raw content to media service
* @param {String} contentType - content type of media
* @param {String|Buffer|Blob} media - content to post
* @public
* @returns {Promise}
*/
post(contentType: string, media: string | Buffer | Blob): Promise;
/**
* Posts FormData to media service. Can be used only with browser engine's FormData.
* In non-browser FormData case the method will do promise reject with
* new TypeError("Posting FormData supported only with browser engine's FormData")
* @param {FormData} formData - form data to post
* @public
* @returns {Promise}
*/
postFormData(formData: FormData): Promise;
/**
* Retrieve information about multiple media SIDs at the same time.
* @param mediaSids Array of Media SIDs to get information from.
*/
mediaSetGet(mediaSids: string[]): Promise;
}
export { Client, Client as McsClient, Media, Media as McsMedia, MediaCategory, MediaCategory as McsMediaCategory };
export default Client;