import type { DefaultElements, MakeRequest, MetaLinkProps, MetaSysProps } from '../common-types'; export type ApiKeyProps = { sys: MetaSysProps; name: string; accessToken: string; environments: { sys: MetaLinkProps; }[]; preview_api_key: { sys: MetaLinkProps; }; description?: string; policies?: { effect: string; action: string; }[]; }; export type CreateApiKeyProps = Pick; export interface ApiKey extends ApiKeyProps, 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.getSpace('') * .then((space) => space.getApiKey()) * .then((apiKey) => apiKey.delete()) * .then(() => console.log('apikey deleted')) * .catch(console.error) * ``` */ delete(): Promise; /** * Sends an update to the server with any changes made to the object's properties * @return Object returned from the server with updated changes. * @example ```javascript * const contentful = require('contentful-management') * * const client = contentful.createClient({ * accessToken: '' * }) * client.getSpace('') * .then((space) => space.getApiKey()) * .then((apiKey) => { * apiKey.name = 'New name' * return apiKey.update() * }) * .then(apiKey => console.log(apiKey.name)) * .catch(console.error) * ``` */ update(): Promise; } /** * @private * @param makeRequest - function to make requests via an adapter * @param data - Raw api key data */ export declare function wrapApiKey(makeRequest: MakeRequest, data: ApiKeyProps): ApiKey; /** * @private * @param makeRequest - function to make requests via an adapter * @param data - Raw api key collection data * @return Wrapped api key collection data */ export declare const wrapApiKeyCollection: (makeRequest: MakeRequest, data: import("../common-types").CollectionProp) => import("../common-types").Collection;