@aptly-as/types
Version:
Aptly types and enums
38 lines (37 loc) • 1.11 kB
TypeScript
import { AptlyAppScope } from './scope.js';
import { AptlyApp, AptlyOrganization, AptlyOrganizationAppConfig } from '../models/index.js';
export declare enum AptlyAppSandbox {
AllowForms = "allow-forms",
AllowPopups = "allow-popups",
AllowScripts = "allow-scripts",
AllowSameOrigin = "allow-same-origin",
AllowPointerLock = "allow-pointer-lock",
AllowTopNavigation = "allow-top-navigation"
}
export interface AptlyAppJWT {
exp: number;
}
export interface AptlyAppAuthorizeCode {
jti: string;
aud: string;
sub: string;
iss: 'aptly.as';
organization: string;
app: string;
scope: AptlyAppScope[];
}
export interface AptlyAppAuthorizeToken extends Omit<AptlyAppAuthorizeCode, 'aud'> {
aud: string;
}
export interface AptlyAppWebContext<S extends object> {
organization: Pick<AptlyOrganization, '_id' | 'slug' | 'name'>;
project?: string;
unit?: string;
app: AptlyApp;
config: AptlyOrganizationAppConfig<S>;
theme: any;
media: AptlyAppWebContextMedia;
}
export interface AptlyAppWebContextMedia {
cloudinaryKey: string;
}