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 AccessTokenProps = {
|
14 | sys: AccessTokenSysProps;
|
15 | name: string;
|
16 | scopes: 'content_management_manage'[];
|
17 | revokedAt: null | string;
|
18 | token?: string;
|
19 | };
|
20 |
|
21 |
|
22 |
|
23 | export type AccessTokenProp = AccessTokenProps;
|
24 | export type CreatePersonalAccessTokenProps = Pick<AccessToken, 'name' | 'scopes'> & {
|
25 | expiresIn: number;
|
26 | };
|
27 | export interface AccessToken extends AccessTokenProps, DefaultElements<AccessTokenProps> {
|
28 | |
29 |
|
30 |
|
31 |
|
32 |
|
33 |
|
34 |
|
35 |
|
36 |
|
37 |
|
38 |
|
39 |
|
40 |
|
41 |
|
42 |
|
43 |
|
44 |
|
45 | revoke(): Promise<AccessToken>;
|
46 | }
|
47 |
|
48 |
|
49 |
|
50 |
|
51 |
|
52 |
|
53 | export declare function wrapAccessToken(makeRequest: MakeRequest, data: AccessTokenProps): AccessToken;
|
54 |
|
55 |
|
56 |
|
57 |
|
58 |
|
59 |
|
60 | export declare const wrapAccessTokenCollection: (makeRequest: MakeRequest, data: import("../common-types").CollectionProp<AccessTokenProps>) => import("../common-types").Collection<AccessToken, AccessTokenProps>;
|
61 | export {};
|