1 | import type { Except } from 'type-fest';
|
2 | import type { BasicMetaSysProps, SysLink, DefaultElements, MakeRequest } from '../common-types';
|
3 | type AppUploadSys = Except<BasicMetaSysProps, 'version'>;
|
4 | export type AppUploadProps = {
|
5 | sys: AppUploadSys & {
|
6 | expiresAt: string;
|
7 | organization: SysLink;
|
8 | };
|
9 | };
|
10 | export interface AppUpload extends AppUploadProps, DefaultElements<AppUploadProps> {
|
11 | /**
|
12 | * Deletes this object on the server.
|
13 | * @return Promise for the deletion. It contains no data, but the Promise error case should be handled.
|
14 | * @example ```javascript
|
15 | * const contentful = require('contentful-management')
|
16 | *
|
17 | * const client = contentful.createClient({
|
18 | * accessToken: '<content_management_api_key>'
|
19 | * })
|
20 | *
|
21 | * client.getOrganization('<org_id>')
|
22 | * .then((org) => org.getAppUpload('<app_upload_id>'))
|
23 | * .then((appUpload) => appUpload.delete())
|
24 | * .then(() => console.log(`App Upload deleted.`))
|
25 | * .catch(console.error)
|
26 | * ```
|
27 | */
|
28 | delete(): Promise<void>;
|
29 | }
|
30 | /**
|
31 | * @private
|
32 | * @param makeRequest - function to make requests via an adapter
|
33 | * @param data - Raw App Upload data
|
34 | * @return Wrapped App Upload data
|
35 | */
|
36 | export declare function wrapAppUpload(makeRequest: MakeRequest, data: AppUploadProps): AppUpload;
|
37 | /**
|
38 | * @private
|
39 | * @param makeRequest - function to make requests via an adapter
|
40 | * @param data - Raw App Upload collection data
|
41 | * @return Wrapped App Upload collection data
|
42 | */
|
43 | export declare const wrapAppUploadCollection: (makeRequest: MakeRequest, data: import("../common-types").CollectionProp<AppUploadProps>) => import("../common-types").Collection<AppUpload, AppUploadProps>;
|
44 | export {};
|