import { APIResource } from '../resource'; import { APIPromise } from '../api-promise'; import type { RequestOptions } from '../internal/request-options'; export declare class MultipartUpload extends APIResource { /** * Use this endpoint to retrieve a pre-signed upload URL for the given part number. * * @param {string} partNumber - Part number of multiple parts of the original video which you you are uploading * @param {MultipartUploadRetrievePartURLParams} params - The parameters to send with the request. * @param {RequestOptions} [options] - Options to apply to the request, such as headers and an abort signal. * @returns {APIPromise} 200 * * @example * ```ts * const multipartUpload = await client.multipartUpload.retrievePartURL('partNumber', { * asset_id: 'assetId', * }); * ``` */ retrievePartURL(partNumber: string, params: MultipartUploadRetrievePartURLParams, options?: RequestOptions): APIPromise; /** * Once you upload all parts to S3 bucket via pre-signed URL, use this endpoint to complete the multipart upload. * * @param {string} assetID - An asset id for which you are uploading original video via multipart * @param {MultipartUploadCompleteParams} [body] - The request body to send. * @param {RequestOptions} [options] - Options to apply to the request, such as headers and an abort signal. * @returns {APIPromise} 200 * * @example * ```ts * const multipartUpload = await client.multipartUpload.complete('assetId'); * ``` */ complete(assetID: string, body?: MultipartUploadCompleteParams | null | undefined, options?: RequestOptions): APIPromise; /** * This call aborts multi-part upload and deletes the already uploaded parts from the storage. * * @param {string} assetID - An asset id for the asset. * @param {MultipartUploadAbortParams} [body] - The request body to send. * @param {RequestOptions} [options] - Options to apply to the request, such as headers and an abort signal. * @returns {APIPromise} Successful response * * @example * ```ts * const multipartUpload = await client.multipartUpload.abort('assetId'); * ``` */ abort(assetID: string, body?: MultipartUploadAbortParams | null | undefined, options?: RequestOptions): APIPromise; /** * Lists all parts uploaded so far. * * @param {string} assetID - An asset id for the asset. * @param {MultipartUploadListParams} [body] - The request body to send. * @param {RequestOptions} [options] - Options to apply to the request, such as headers and an abort signal. * @returns {APIPromise} Successful response * * @example * ```ts * const multipartUpload = await client.multipartUpload.list('assetId'); * ``` */ list(assetID: string, body?: MultipartUploadListParams | null | undefined, options?: RequestOptions): APIPromise; } export interface MultipartUploadRetrievePartURLParams { /** * An asset id of the created asset for which you are uploading parts */ asset_id: string; } export interface MultipartUploadRetrievePartURLResponse { /** * Asset ID */ asset_id: string; /** * Part number of the part that is to be uploaded */ part_number: string; /** * Upload URL for the part on which you need to send PUT request for blob of that part */ part_upload_url: string; } export interface MultipartUploadCompleteParams { /** * List of object containing part number with ETag received as a response header while uploading each part */ parts?: Array; } export declare namespace MultipartUploadCompleteParams { interface Part { /** * Part number * @format int32 */ PartNumber?: number; /** * ETag received while uploading the part using PUT */ ETag?: string; } } export type MultipartUploadCompleteResponse = Record; export type MultipartUploadAbortParams = Record; export type MultipartUploadAbortResponse = Record; export type MultipartUploadListParams = Record; export interface MultipartUploadListResponse { parts: Array; } export declare namespace MultipartUploadListResponse { interface Part { /** * Part number */ PartNumber: number; /** * Size of the uploaded part * @format uint64 */ Size?: number; /** * ETag of the uploaded part */ ETag?: string; } } export declare namespace MultipartUpload { export { type MultipartUploadRetrievePartURLResponse as MultipartUploadRetrievePartURLResponse, type MultipartUploadCompleteResponse as MultipartUploadCompleteResponse, type MultipartUploadAbortResponse as MultipartUploadAbortResponse, type MultipartUploadListResponse as MultipartUploadListResponse, type MultipartUploadRetrievePartURLParams as MultipartUploadRetrievePartURLParams, type MultipartUploadCompleteParams as MultipartUploadCompleteParams, type MultipartUploadAbortParams as MultipartUploadAbortParams, type MultipartUploadListParams as MultipartUploadListParams, }; } //# sourceMappingURL=multipart-upload.d.ts.map