import type { PlatformId } from '../../../management/platform'; import type { ProjectId } from '../../../management/project'; import type { ApId } from '../../common/id-generator'; import { PrincipalType } from './principal-type'; export type WorkerPrincipal = { id: ApId; type: PrincipalType.WORKER; }; export type AnnonymousPrincipal = { id: ApId; type: PrincipalType.UNKNOWN; }; export type ServicePrincipal = { id: ApId; type: PrincipalType.SERVICE; platform: { id: ApId; }; }; export type UserPrincipal = { id: ApId; type: PrincipalType.USER; platform: { id: ApId; }; tokenVersion?: string; }; export type EnginePrincipal = { id: ApId; type: PrincipalType.ENGINE; projectId: ProjectId; platform: { id: PlatformId; }; }; export type PrincipalForType = Extract; export type PrincipalForTypes = PrincipalForType; export type Principal = WorkerPrincipal | AnnonymousPrincipal | ServicePrincipal | UserPrincipal | EnginePrincipal; //# sourceMappingURL=principal.d.ts.map