1 | import type { Except } from 'type-fest';
|
2 | import type { BasicMetaSysProps, DefaultElements, MakeRequest, SysLink } from '../common-types';
|
3 | type AppSigningSecretSys = Except<BasicMetaSysProps, 'version' | 'id'> & {
|
4 | appDefinition: SysLink;
|
5 | organization: SysLink;
|
6 | };
|
7 | export type AppSigningSecretProps = {
|
8 | /**
|
9 | * System metadata
|
10 | */
|
11 | sys: AppSigningSecretSys;
|
12 | /** The last four characters of the signing secret */
|
13 | redactedValue: string;
|
14 | };
|
15 | export type CreateAppSigningSecretProps = {
|
16 | /** A 64 character matching the regular expression /^[0-9a-zA-Z+/=_-]+$/ */
|
17 | value: string;
|
18 | };
|
19 | export interface AppSigningSecret extends AppSigningSecretProps, DefaultElements<AppSigningSecretProps> {
|
20 | /**
|
21 | * Deletes this object on the server.
|
22 | * @return Promise for the deletion. It contains no data, but the Promise error case should be handled.
|
23 | * @example ```javascript
|
24 | * const contentful = require('contentful-management')
|
25 | *
|
26 | * const client = contentful.createClient({
|
27 | * accessToken: '<content_management_api_key>'
|
28 | * })
|
29 | * client.getOrganization('<organization_id>')
|
30 | * .then((organization) => organization.getAppSigningSecret(<api-key-id>))
|
31 | * .then((signingSecret) => signingSecret.delete())
|
32 | * .then(() => console.log('signingSecret deleted'))
|
33 | * .catch(console.error)
|
34 | * ```
|
35 | */
|
36 | delete(): Promise<void>;
|
37 | }
|
38 | /**
|
39 | * @private
|
40 | * @param http - HTTP client instance
|
41 | * @param data - Raw AppSigningSecret data
|
42 | * @return Wrapped AppSigningSecret data
|
43 | */
|
44 | export declare function wrapAppSigningSecret(makeRequest: MakeRequest, data: AppSigningSecretProps): AppSigningSecret;
|
45 | export {};
|