1 | import { Except } from 'type-fest';
|
2 | import { BasicMetaSysProps, DefaultElements, MakeRequest, SysLink } from '../common-types';
|
3 | declare type AppDetailsSys = Except<BasicMetaSysProps, 'version' | 'id'> & {
|
4 | appDefinition: SysLink;
|
5 | organization: SysLink;
|
6 | };
|
7 | export declare enum IconType {
|
8 | Base64 = "base64"
|
9 | }
|
10 | export interface AppIcon {
|
11 | value: string;
|
12 | type: IconType;
|
13 | }
|
14 | export declare type AppDetailsProps = {
|
15 | /**
|
16 | * System metadata
|
17 | */
|
18 | sys: AppDetailsSys;
|
19 | /**
|
20 | * An Icon that represents the App
|
21 | */
|
22 | icon?: AppIcon;
|
23 | };
|
24 | export declare type CreateAppDetailsProps = {
|
25 | /**
|
26 | * An Icon that represents the App
|
27 | */
|
28 | icon?: AppIcon;
|
29 | };
|
30 | export interface AppDetails extends AppDetailsProps, DefaultElements<AppDetailsProps> {
|
31 | /**
|
32 | * Deletes this object on the server.
|
33 | * @return Promise for the deletion. It contains no data, but the Promise error case should be handled.
|
34 | * @example ```javascript
|
35 | * const contentful = require('contentful-management')
|
36 | *
|
37 | * const client = contentful.createClient({
|
38 | * accessToken: '<content_management_api_key>'
|
39 | * })
|
40 | * client.getOrganization('<organization_id>')
|
41 | * .then((organization) => organization.getAppDetails(<app-id>))
|
42 | * .then((appDetails) => appDetails.delete())
|
43 | * .then(() => console.log('appDetails deleted'))
|
44 | * .catch(console.error)
|
45 | * ```
|
46 | */
|
47 | delete(): Promise<void>;
|
48 | }
|
49 | /**
|
50 | * @private
|
51 | * @param http - HTTP client instance
|
52 | * @param data - Raw AppDetails data
|
53 | * @return Wrapped AppDetails data
|
54 | */
|
55 | export declare function wrapAppDetails(makeRequest: MakeRequest, data: AppDetailsProps): AppDetails;
|
56 | export {};
|