diff options
author | Chocobozzz <me@florianbigard.com> | 2021-05-11 12:04:47 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-05-11 13:33:11 +0200 |
commit | 428ccb8b7a44ce60cabb7401a5464cf5fcbd4dba (patch) | |
tree | b75329b64f5e201abdfb39961f2db09a08292b77 /shared/models/plugins/plugin-index | |
parent | 2b02c520e66ea452687cab39401b371711caa9ed (diff) | |
download | PeerTube-428ccb8b7a44ce60cabb7401a5464cf5fcbd4dba.tar.gz PeerTube-428ccb8b7a44ce60cabb7401a5464cf5fcbd4dba.tar.zst PeerTube-428ccb8b7a44ce60cabb7401a5464cf5fcbd4dba.zip |
Reorganize plugin models
Diffstat (limited to 'shared/models/plugins/plugin-index')
4 files changed, 37 insertions, 0 deletions
diff --git a/shared/models/plugins/plugin-index/index.ts b/shared/models/plugins/plugin-index/index.ts new file mode 100644 index 000000000..913846638 --- /dev/null +++ b/shared/models/plugins/plugin-index/index.ts | |||
@@ -0,0 +1,3 @@ | |||
1 | export * from './peertube-plugin-index-list.model' | ||
2 | export * from './peertube-plugin-index.model' | ||
3 | export * from './peertube-plugin-latest-version.model' | ||
diff --git a/shared/models/plugins/plugin-index/peertube-plugin-index-list.model.ts b/shared/models/plugins/plugin-index/peertube-plugin-index-list.model.ts new file mode 100644 index 000000000..ecb46482e --- /dev/null +++ b/shared/models/plugins/plugin-index/peertube-plugin-index-list.model.ts | |||
@@ -0,0 +1,10 @@ | |||
1 | import { PluginType } from '../plugin.type' | ||
2 | |||
3 | export interface PeertubePluginIndexList { | ||
4 | start: number | ||
5 | count: number | ||
6 | sort: string | ||
7 | pluginType?: PluginType | ||
8 | currentPeerTubeEngine?: string | ||
9 | search?: string | ||
10 | } | ||
diff --git a/shared/models/plugins/plugin-index/peertube-plugin-index.model.ts b/shared/models/plugins/plugin-index/peertube-plugin-index.model.ts new file mode 100644 index 000000000..e91c8b4dc --- /dev/null +++ b/shared/models/plugins/plugin-index/peertube-plugin-index.model.ts | |||
@@ -0,0 +1,14 @@ | |||
1 | export interface PeerTubePluginIndex { | ||
2 | npmName: string | ||
3 | description: string | ||
4 | homepage: string | ||
5 | createdAt: Date | ||
6 | updatedAt: Date | ||
7 | |||
8 | popularity: number | ||
9 | |||
10 | latestVersion: string | ||
11 | |||
12 | name?: string | ||
13 | installed?: boolean | ||
14 | } | ||
diff --git a/shared/models/plugins/plugin-index/peertube-plugin-latest-version.model.ts b/shared/models/plugins/plugin-index/peertube-plugin-latest-version.model.ts new file mode 100644 index 000000000..811a64429 --- /dev/null +++ b/shared/models/plugins/plugin-index/peertube-plugin-latest-version.model.ts | |||
@@ -0,0 +1,10 @@ | |||
1 | export interface PeertubePluginLatestVersionRequest { | ||
2 | currentPeerTubeEngine?: string | ||
3 | |||
4 | npmNames: string[] | ||
5 | } | ||
6 | |||
7 | export type PeertubePluginLatestVersionResponse = { | ||
8 | npmName: string | ||
9 | latestVersion: string | null | ||
10 | }[] | ||