2024-03-13 04:39:26 +13:00
|
|
|
import { User, Document, Plugin, Snippet } from "../"
|
2024-02-27 06:28:37 +13:00
|
|
|
import { SocketSession } from "../../sdk"
|
2022-05-10 21:33:59 +12:00
|
|
|
|
2022-07-04 22:12:08 +12:00
|
|
|
export type AppMetadataErrors = { [key: string]: string[] }
|
|
|
|
|
2022-05-10 21:33:59 +12:00
|
|
|
export interface App extends Document {
|
2022-05-04 09:58:19 +12:00
|
|
|
appId: string
|
2022-05-10 21:33:59 +12:00
|
|
|
type: string
|
|
|
|
version: string
|
|
|
|
componentLibraries: string[]
|
|
|
|
name: string
|
|
|
|
url: string | undefined
|
|
|
|
template: string | undefined
|
|
|
|
instance: AppInstance
|
|
|
|
tenantId: string
|
|
|
|
status: string
|
2022-06-16 02:56:00 +12:00
|
|
|
theme?: string
|
2022-08-25 08:35:24 +12:00
|
|
|
customTheme?: AppCustomTheme
|
2022-05-26 21:13:26 +12:00
|
|
|
revertableVersion?: string
|
2022-11-18 05:30:38 +13:00
|
|
|
lockedBy?: User
|
2023-07-11 04:42:27 +12:00
|
|
|
sessions?: SocketSession[]
|
2022-06-16 02:56:00 +12:00
|
|
|
navigation?: AppNavigation
|
2022-07-04 22:12:08 +12:00
|
|
|
automationErrors?: AppMetadataErrors
|
2022-08-25 19:10:11 +12:00
|
|
|
icon?: AppIcon
|
2023-06-26 21:39:38 +12:00
|
|
|
features?: AppFeatures
|
2024-01-24 01:08:20 +13:00
|
|
|
automations?: AutomationSettings
|
2024-02-27 00:57:56 +13:00
|
|
|
usedPlugins?: Plugin[]
|
|
|
|
upgradableVersion?: string
|
2024-03-13 04:39:26 +13:00
|
|
|
snippets?: Snippet[]
|
2022-05-10 21:33:59 +12:00
|
|
|
}
|
|
|
|
|
|
|
|
export interface AppInstance {
|
|
|
|
_id: string
|
2022-05-04 09:58:19 +12:00
|
|
|
}
|
2022-06-16 02:56:00 +12:00
|
|
|
|
|
|
|
export interface AppNavigation {
|
|
|
|
navigation: string
|
|
|
|
title: string
|
|
|
|
navWidth: string
|
|
|
|
sticky?: boolean
|
|
|
|
hideLogo?: boolean
|
|
|
|
logoUrl?: string
|
|
|
|
hideTitle?: boolean
|
|
|
|
navBackground?: string
|
|
|
|
navTextColor?: string
|
|
|
|
links?: AppNavigationLink[]
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface AppNavigationLink {
|
|
|
|
text: string
|
|
|
|
url: string
|
|
|
|
id?: string
|
|
|
|
roleId?: string
|
|
|
|
}
|
2022-08-25 08:35:24 +12:00
|
|
|
|
|
|
|
export interface AppCustomTheme {
|
|
|
|
buttonBorderRadius?: string
|
|
|
|
primaryColor?: string
|
|
|
|
primaryColorHover?: string
|
|
|
|
|
|
|
|
// Used to exist before new design UI
|
|
|
|
navTextColor?: string
|
|
|
|
navBackground?: string
|
|
|
|
}
|
2022-08-25 19:10:11 +12:00
|
|
|
|
|
|
|
export interface AppIcon {
|
|
|
|
name: string
|
|
|
|
color: string
|
|
|
|
}
|
2023-06-26 21:39:38 +12:00
|
|
|
|
|
|
|
export interface AppFeatures {
|
|
|
|
componentValidation?: boolean
|
2023-10-10 03:01:16 +13:00
|
|
|
disableUserMetadata?: boolean
|
2024-03-26 05:39:42 +13:00
|
|
|
skeletonLoader?: boolean
|
2024-01-19 05:38:34 +13:00
|
|
|
}
|
|
|
|
|
|
|
|
export interface AutomationSettings {
|
|
|
|
chainAutomations?: boolean
|
2023-06-26 21:39:38 +12:00
|
|
|
}
|