import type { DefaultElements, MakeRequest, MetaSysProps, SysLink } from '../common-types'; export type UploadProps = { /** * System metadata */ sys: MetaSysProps & { space: SysLink; environment?: SysLink; }; }; export interface Upload extends UploadProps, DefaultElements { /** * Deletes this object on the server. * @return Promise for the deletion. It contains no data, but the Promise error case should be handled. * @example * const contentful = require('contentful-management') * * const client = contentful.createClient({ * accessToken: '' * }) * * client.getSpace('') * .then((space) => space.getEnvironment('')) * .then((environment) => environment.getUpload('')) * .then((upload) => upload.delete()) * .then((upload) => console.log(`upload ${upload.sys.id} updated.`)) * .catch(console.error) */ delete(): Promise; } /** * @private * @param {function} makeRequest - function to make requests via an adapter * @param {object} data - Raw upload data * @return {Upload} Wrapped upload data */ export declare function wrapUpload(makeRequest: MakeRequest, data: UploadProps): { delete: () => Promise; } & UploadProps & { toPlainObject(): UploadProps; };