UNPKG

1.02 kBTypeScriptView Raw
1import type { Except } from 'type-fest';
2import type { BasicMetaSysProps, DefaultElements, MakeRequest, SysLink } from '../common-types';
3type AppAccessTokenSys = Except<BasicMetaSysProps, 'version' | 'id'> & {
4 space: SysLink;
5 environment: SysLink;
6 appDefinition: SysLink;
7 expiresAt: string;
8};
9export type AppAccessTokenProps = {
10 /**
11 * System metadata
12 */
13 sys: AppAccessTokenSys;
14 /**
15 * Token for an app installation in a space environment
16 */
17 token: string;
18};
19export type CreateAppAccessTokenProps = {
20 /**
21 * JSON Web Token
22 */
23 jwt: string;
24};
25export interface AppAccessToken extends AppAccessTokenProps, DefaultElements<AppAccessTokenProps> {
26}
27/**
28 * @private
29 * @param makeRequest - function to make requests via an adapter
30 * @param data - Raw app access token data
31 * @return {AppAccessToken} Wrapped AppAccessToken data
32 */
33export declare function wrapAppAccessToken(_makeRequest: MakeRequest, data: AppAccessTokenProps): AppAccessToken;
34export {};