diff options
Diffstat (limited to 'packages/models/src/plugins/server/settings')
3 files changed, 19 insertions, 0 deletions
diff --git a/packages/models/src/plugins/server/settings/index.ts b/packages/models/src/plugins/server/settings/index.ts new file mode 100644 index 000000000..4bdccaa4a --- /dev/null +++ b/packages/models/src/plugins/server/settings/index.ts | |||
@@ -0,0 +1,2 @@ | |||
1 | export * from './public-server.setting.js' | ||
2 | export * from './register-server-setting.model.js' | ||
diff --git a/packages/models/src/plugins/server/settings/public-server.setting.ts b/packages/models/src/plugins/server/settings/public-server.setting.ts new file mode 100644 index 000000000..0b6251aa3 --- /dev/null +++ b/packages/models/src/plugins/server/settings/public-server.setting.ts | |||
@@ -0,0 +1,5 @@ | |||
1 | import { SettingEntries } from '../managers/plugin-settings-manager.model.js' | ||
2 | |||
3 | export interface PublicServerSetting { | ||
4 | publicSettings: SettingEntries | ||
5 | } | ||
diff --git a/packages/models/src/plugins/server/settings/register-server-setting.model.ts b/packages/models/src/plugins/server/settings/register-server-setting.model.ts new file mode 100644 index 000000000..8cde8eaaa --- /dev/null +++ b/packages/models/src/plugins/server/settings/register-server-setting.model.ts | |||
@@ -0,0 +1,12 @@ | |||
1 | import { RegisterClientFormFieldOptions } from '../../client/index.js' | ||
2 | |||
3 | export type RegisterServerSettingOptions = RegisterClientFormFieldOptions & { | ||
4 | // If the setting is not private, anyone can view its value (client code included) | ||
5 | // If the setting is private, only server-side hooks can access it | ||
6 | // Mainly used by the PeerTube client to get admin config | ||
7 | private: boolean | ||
8 | } | ||
9 | |||
10 | export interface RegisteredServerSettings { | ||
11 | registeredSettings: RegisterServerSettingOptions[] | ||
12 | } | ||