import { ReducedOrganization } from "../.."; import { ReducedUser } from "../../../user"; import { Scope } from "../../../user/Scopes"; export interface OAuthAppClientSecret { name: string; secret: string; uuid: string; creatorId: string; used: boolean; createDate: number; modifyDate: number; } export interface OAuthApp { _id: string; name: string; organization: ReducedOrganization; creator: ReducedUser; avatarUrl: string; description?: string; homepage?: string; callback: string[]; hcloudClientId: string; clientSecrets: OAuthAppClientSecret[]; scopes: Scope[]; patId?: string; createDate: number; modifyDate: number; allowAuthoizationCodeFlow: boolean; allowDeviceFlow: boolean; } export type OAuthAppWithConsent = OAuthApp & Omit & { scopes: Record; }; export type OAuthAppPublicInfo = Omit; export interface OAuthAppCreate { name: string; description?: string; homepage?: string; callback: string[]; allowAuthoizationCodeFlow?: boolean; allowDeviceFlow?: boolean; }