From 6702a1b2ccd666285dee9c72b5bace641d2fce8b Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 16 Jul 2019 11:33:22 +0200 Subject: Add ability to search available plugins --- shared/models/plugins/peertube-plugin-index-list.model.ts | 10 ++++++++++ shared/models/plugins/peertube-plugin-index.model.ts | 3 +++ shared/models/plugins/peertube-plugin-latest-version.model.ts | 7 ++++++- shared/models/plugins/peertube-plugin-list.model.ts | 10 ---------- 4 files changed, 19 insertions(+), 11 deletions(-) create mode 100644 shared/models/plugins/peertube-plugin-index-list.model.ts delete mode 100644 shared/models/plugins/peertube-plugin-list.model.ts (limited to 'shared/models/plugins') diff --git a/shared/models/plugins/peertube-plugin-index-list.model.ts b/shared/models/plugins/peertube-plugin-index-list.model.ts new file mode 100644 index 000000000..817bac31e --- /dev/null +++ b/shared/models/plugins/peertube-plugin-index-list.model.ts @@ -0,0 +1,10 @@ +import { PluginType } from './plugin.type' + +export interface PeertubePluginIndexList { + start: number + count: number + sort: string + pluginType?: PluginType + currentPeerTubeEngine?: string + search?: string +} diff --git a/shared/models/plugins/peertube-plugin-index.model.ts b/shared/models/plugins/peertube-plugin-index.model.ts index 2957a338d..e91c8b4dc 100644 --- a/shared/models/plugins/peertube-plugin-index.model.ts +++ b/shared/models/plugins/peertube-plugin-index.model.ts @@ -8,4 +8,7 @@ export interface PeerTubePluginIndex { popularity: number latestVersion: string + + name?: string + installed?: boolean } diff --git a/shared/models/plugins/peertube-plugin-latest-version.model.ts b/shared/models/plugins/peertube-plugin-latest-version.model.ts index 36dd3af54..dec4618fa 100644 --- a/shared/models/plugins/peertube-plugin-latest-version.model.ts +++ b/shared/models/plugins/peertube-plugin-latest-version.model.ts @@ -1,5 +1,10 @@ -export interface PeertubePluginLatestVersion { +export interface PeertubePluginLatestVersionRequest { currentPeerTubeEngine?: string, npmNames: string[] } + +export type PeertubePluginLatestVersionResponse = { + npmName: string + latestVersion: string | null +}[] diff --git a/shared/models/plugins/peertube-plugin-list.model.ts b/shared/models/plugins/peertube-plugin-list.model.ts deleted file mode 100644 index 5f0ecce68..000000000 --- a/shared/models/plugins/peertube-plugin-list.model.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { PluginType } from './plugin.type' - -export interface PeertubePluginList { - start: number - count: number - sort: string - pluginType?: PluginType - currentPeerTubeEngine?: string - search?: string -} -- cgit v1.2.3