import type { BaseApp, Schemable } from './base'; import type { IAppBuilderLib } from './desktopify'; import type { PatSummary } from './personalAccessTokens'; export type IUploadFileStatus = 'done' | 'error' | 'removed' | 'success' | 'uploading'; export interface IUploadFile { error?: any; fileName?: string; lastModified?: number; lastModifiedDate?: Date; linkProps?: any; name: string; originFileObj?: File; percent?: number; response?: any; size: number; status?: IUploadFileStatus; thumbUrl?: string; type: string; uid: string; url?: string; } export interface IHueIcon extends IUploadFile { hueAdjustment?: number; } export interface IAppIcon { appId: string; icon: IHueIcon; } export type IAppIcons = IAppIcon[]; export interface IAppWindowOptions { alwaysOnTop: boolean; autoHideMenuBar: boolean; hasMaxHeight: boolean; hasMaxWidth: boolean; hasMinHeight: boolean; hasMinWidth: boolean; height: number; isMaximizable: boolean; isMinimizable: boolean; isResizable: boolean; maxHeight: number; maxWidth: number; minHeight: number; minWidth: number; startInFullscreenMode: boolean; transparentInsetTitlebar: boolean; transparentTitlebar: boolean; width: number; } export interface IWindowOptions { height: number; isAlwaysOnTop?: boolean; isAutoHideMenuBar?: boolean; isFullScreenStartEnabled?: boolean; isInsetTitlebarTransparent?: boolean; isMaximizable: boolean; isMinimizable: boolean; isResizable: boolean; isTitlebarTransparent?: boolean; maxHeight?: ISwitchableValue; maxWidth?: ISwitchableValue; minHeight?: ISwitchableValue; minWidth?: ISwitchableValue; width: number; } export interface IAppPublishedVersions { desktopify?: string; electron?: string; version?: string; } export interface ISwitchableValue { enabled: boolean; value: T; } export interface IIcon { height: number; type: string; url: string; width: number; } export interface IApp extends BaseApp { appModelId: string; appPkgName?: string; appProtocol?: ISwitchableValue; appType?: string; appxConfig?: Partial; cssToInject?: string; customDomain?: string; customUserAgent?: ISwitchableValue; disableContextMenu?: boolean; enablePushNotifications?: boolean; environmentVariables?: { [propertyName: string]: { secret: string; } | string; }; extraBrowserWindowOptions?: string; icon?: string; icons?: IIcon[]; internalUrls?: ISwitchableValue; isBackgroundThrottlingPrevented?: boolean; isContextMenuDisabled: boolean; isDevToolsDisabled: boolean; isFindInPageEnabled?: boolean; isGoogleOAuthExternal?: boolean; isNativeWindowOpenDisabled?: boolean; isSingleInstance?: boolean; isTitleStatic?: boolean; isTransitioningFromSquirrelWindows?: boolean; isWebSecurityDisabled?: boolean; jsToInject?: string; menubarIcon?: string; name: string; nsisConfig?: Partial; pollForAppUpdatesEveryXMinutes?: number; runtimeEnvs?: string; secret?: string; shouldLaunchAtStartupByDefault?: boolean; shouldMakeSameDomainAnExternalLink?: boolean; shouldOnlySendAbsolutelyNecessaryRequests?: boolean; shouldReuseRendererProcess?: boolean; shouldUseRealUserAgent?: boolean; themeSource?: 'dark' | 'light' | 'system'; themeSourceMac?: 'dark' | 'light' | 'system'; toggleVisibilityKeyboardShortcut?: ISwitchableValue; trayIcon?: string; url: string; useSafeInternalUrlMatcher?: boolean; windowOptions: IWindowOptions; } export interface IUser extends Schemable { accessToken?: string; accountDisplayName?: string; allowedIPs?: string[]; authInfo?: object; avatar?: string; cliAccessTokens?: PatSummary[]; currentApplication?: string; customerId?: string; disableShouldCodeSign?: boolean; email?: string; featureFlags?: FeatureFlags; firstName?: string; id: string; isAdmin?: boolean; isImpersonator?: boolean; isOldAccountThatNeedsNewPassword?: boolean; lastName?: string; seenApplicationGroupsTutorial?: boolean; seenReleaseTutorial?: boolean; stripeCustomerId?: string; } export interface FeatureFlags { aboutBlankWindowOpenHandler: boolean; desktopAppPlugins: boolean; macAppStore: boolean; } export interface InvitePermissions { canBuild: boolean; canManageBilling?: boolean; canManageUsers?: boolean; canRelease: boolean; } export type InviteActorRole = 'delegate' | 'owner'; export interface InviteActorCapabilities { actorEmail: string; actorId: string; actorPermissions: InvitePermissions; actorRole: InviteActorRole; } export interface UserIHaveSentInviteTo { email: string; inviterCapabilities?: InviteActorCapabilities; name: string; permissions?: InvitePermissions; sender: UserIHaveAcceptedInviteFrom; } export interface UserIHaveAcceptedInviteFrom { accountDisplayName?: string; email: string; firstName: string; id: string; lastName: string; permissions?: InvitePermissions; receiver?: Pick; } export interface CiInput { accessToken: string; appData: IApp; buildId?: string; contextUserId: string; userId: string; }