import type { MetaSysProps, DefaultElements, MakeRequest } from '../common-types'; export type PersonalAccessTokenProps = { sys: MetaSysProps & { expiresAt?: string; }; name: string; scopes: 'content_management_manage'[]; revokedAt: null | string; token?: string; }; /** * @deprecated Use `PersonalAccessTokenProps` instead. */ export type PersonalAccessTokenProp = PersonalAccessTokenProps; export type CreatePersonalAccessTokenProps = Pick & { expiresIn?: number; }; export interface PersonalAccessToken extends PersonalAccessTokenProps, DefaultElements { /** * Revokes a personal access token * @return Object the revoked personal access token * @example ```javascript * const contentful = require('contentful-management') * * const client = contentful.createClient({ * accessToken: * }) * * client.getPersonalAccessToken('') * .then((personalAccessToken) => { * return personalAccessToken.revoke() * }) * .catch(console.error) * ``` */ revoke(): Promise; } /** * @private * @param makeRequest - function to make requests via an adapter * @param data - Raw personal access token data * @return Wrapped personal access token */ export declare function wrapPersonalAccessToken(makeRequest: MakeRequest, data: PersonalAccessTokenProps): PersonalAccessToken; /** * @private * @param makeRequest - function to make requests via an adapter * @param data - Raw personal access collection data * @return Wrapped personal access token collection data */ export declare const wrapPersonalAccessTokenCollection: (makeRequest: MakeRequest, data: import("../common-types").CollectionProp) => import("../common-types").Collection;