1 | import type { DefaultElements, MakeRequest, BasicMetaSysProps, SysLink } from '../common-types';
|
2 | type Application = {
|
3 | id?: string;
|
4 | name?: string;
|
5 | sys: SysLink;
|
6 | };
|
7 | type AccessTokenSysProps = BasicMetaSysProps & {
|
8 | application: Application | null;
|
9 | expiresAt: string | null;
|
10 | lastUsedAt: string | null;
|
11 | redactedValue: string;
|
12 | };
|
13 | export type AccessTokenProp = {
|
14 | sys: AccessTokenSysProps;
|
15 | name: string;
|
16 | scopes: 'content_management_manage'[];
|
17 | revokedAt: null | string;
|
18 | token?: string;
|
19 | };
|
20 | export type CreatePersonalAccessTokenProps = Pick<AccessToken, 'name' | 'scopes'> & {
|
21 | expiresIn: number;
|
22 | };
|
23 | export interface AccessToken extends AccessTokenProp, DefaultElements<AccessTokenProp> {
|
24 | |
25 |
|
26 |
|
27 |
|
28 |
|
29 |
|
30 |
|
31 |
|
32 |
|
33 |
|
34 |
|
35 |
|
36 |
|
37 |
|
38 |
|
39 |
|
40 |
|
41 | revoke(): Promise<AccessToken>;
|
42 | }
|
43 |
|
44 |
|
45 |
|
46 |
|
47 |
|
48 |
|
49 | export declare function wrapAccessToken(makeRequest: MakeRequest, data: AccessTokenProp): AccessToken;
|
50 |
|
51 |
|
52 |
|
53 |
|
54 |
|
55 |
|
56 | export declare const wrapAccessTokenCollection: (makeRequest: MakeRequest, data: import("../common-types").CollectionProp<AccessTokenProp>) => import("../common-types").Collection<AccessToken, AccessTokenProp>;
|
57 | export {};
|