aboutsummaryrefslogtreecommitdiffstats
path: root/apps/settings/src/app-types.ts
blob: 9bba3ee6d50dcf667cca3af4ffc88d59dc8cd98d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
/**
 * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors
 * SPDX-License-Identifier: AGPL-3.0-or-later
 */

export interface IAppstoreCategory {
	/**
	 * The category ID
	 */
	id: string
	/**
	 * The display name (can be localized)
	 */
	displayName: string
	/**
	 * Inline SVG path
	 */
	icon: string
}

export interface IAppstoreAppRelease {
	version: string
	translations: {
		[key: string]: {
			changelog: string
		}
	}
}

export interface IAppstoreApp {
	id: string
	name: string
	summary: string
	description: string
	licence: string
	author: string[] | Record<string, string>
	level: number
	version: string
	category: string|string[]

	preview?: string
	screenshot?: string

	app_api: boolean
	active: boolean
	internal: boolean
	removable: boolean
	installed: boolean
	canInstall: boolean
	canUnInstall: boolean
	isCompatible: boolean
	needsDownload: boolean
	update?: string

	appstoreData: Record<string, never>
	releases?: IAppstoreAppRelease[]
}

export interface IComputeDevice {
	id: string,
	label: string,
}

export interface IDeployConfig {
	computeDevice: IComputeDevice,
	net: string,
	nextcloud_url: string,
}

export interface IDeployDaemon {
	accepts_deploy_id: string,
	deploy_config: IDeployConfig,
	display_name: string,
	host: string,
	id: number,
	name: string,
	protocol: string,
}

export interface IExAppStatus {
	action: string
	deploy: number
	deploy_start_time: number
	error: string
	init: number
	init_start_time: number
	type: string
}

export interface IAppstoreExApp extends IAppstoreApp {
	daemon: IDeployDaemon | null | undefined
	status: IExAppStatus | Record<string, never>
	error: string
}