import type { Except } from 'type-fest'; import type { BasicMetaSysProps, DefaultElements, MakeRequest, SysLink } from '../common-types'; type AppKeySys = Except & { appDefinition: SysLink; organization: SysLink; }; export interface JWK { alg: 'RS256'; kty: 'RSA'; use: 'sig'; x5c: [string]; kid: string; x5t: string; } export type AppKeyProps = { /** * System metadata */ sys: AppKeySys; /** * JSON Web Key */ jwk: JWK; /** * If generated, private key is returned */ generated?: { /** * Base64 PEM */ privateKey: string; }; }; export type CreateAppKeyProps = { /** * Toggle for automatic private key generation */ generate?: boolean; /** * JSON Web Key, required if generate is falsy */ jwk?: JWK; }; export interface AppKey extends AppKeyProps, 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 ```javascript * const contentful = require('contentful-management') * * const client = contentful.createClient({ * accessToken: '' * }) * client.getOrganization('') * .then((organization) => organization.getAppKey()) * .then((signingSecret) => signingSecret.delete()) * .then(() => console.log('signingSecret deleted')) * .catch(console.error) * ``` */ delete(): Promise; } /** * @private * @param http - HTTP client instance * @param data - Raw AppKey data * @return Wrapped AppKey data */ export declare function wrapAppKey(makeRequest: MakeRequest, data: AppKeyProps): AppKey; /** * @private * @param makeRequest - function to make requests via an adapter * @param data - Raw App Key collection data * @return Wrapped App Key collection data */ export declare const wrapAppKeyCollection: (makeRequest: MakeRequest, data: import("../common-types").CollectionProp) => import("../common-types").Collection; export {};