Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update settings endpoint #23

Merged
merged 2 commits into from
Aug 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "torrust-index-types-lib",
"version": "3.0.0-alpha.6",
"version": "3.0.0-alpha.7",
"description": "Contains common types for the Torrust project.",
"repository": {
"type": "git",
Expand Down
22 changes: 18 additions & 4 deletions src/types/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ export type Settings = {
logging: Logging,
website: Website,
tracker: Tracker,
net: Network,
net: Net,
auth: Auth,
database: Database,
mail: Mail,
Expand All @@ -12,6 +12,12 @@ export type Settings = {
tracker_statistics_importer: TrackerStatisticsImporter
}

export type Metadata = {
app: string,
purpose: string,
schema_version: string,
}

export type Logging = {
threshold: Threshold,
}
Expand All @@ -29,15 +35,15 @@ export type Tracker = {
url: string
}

export type Network = {
export type Net = {
base_url: string | null
bind_address: string
tsl: Tsl | null
}

export type Auth = {
email_on_signup: EmailOnSignup
secret_key: string
user_claim_token_pepper: string
password_constraints: PasswordConstraints
}

Expand All @@ -46,7 +52,6 @@ export type Database = {
}

export type Mail = {
email_verification_enabled: boolean
from: string
reply_to: string
smtp: Smtp
Expand All @@ -65,6 +70,10 @@ export type Api = {
max_torrent_page_size: number
}

export type Registration = {
email: Email
}

export type TrackerStatisticsImporter = {
port: number
torrent_info_update_interval: number
Expand Down Expand Up @@ -112,4 +121,9 @@ export enum Threshold {
Info = "info",
Debug = "debug",
Trace = "trace",
}

export type Email = {
required: boolean
verification_required: boolean
}