summary refs log tree commit diff
path: root/util/src
diff options
context:
space:
mode:
authorSamuel <34555296+Flam3rboy@users.noreply.github.com>2021-12-20 14:56:53 +0100
committerGitHub <noreply@github.com>2021-12-20 14:56:53 +0100
commitdc9c18411e0bdebfdb268ff2786f876b243aeab1 (patch)
treeae18c32a582c965f7ec2cc784fc9b2904e6215c1 /util/src
parentMerge pull request #539 from TimSchweiz/master (diff)
parentUpdate downloads.ts (diff)
downloadserver-dc9c18411e0bdebfdb268ff2786f876b243aeab1.tar.xz
Merge pull request #540 from Thesourtimes/master
General work on API
Diffstat (limited to 'util/src')
-rw-r--r--util/src/entities/Config.ts31
-rw-r--r--util/src/entities/clientRelase.ts26
-rw-r--r--util/src/entities/index.ts1
3 files changed, 58 insertions, 0 deletions
diff --git a/util/src/entities/Config.ts b/util/src/entities/Config.ts

index 492baa4c..2d003c99 100644 --- a/util/src/entities/Config.ts +++ b/util/src/entities/Config.ts
@@ -2,6 +2,7 @@ import { Column, Entity } from "typeorm"; import { BaseClassWithoutId, PrimaryIdColumn } from "./BaseClass"; import crypto from "crypto"; import { Snowflake } from "../util/Snowflake"; +import { SessionsReplace } from ".."; @Entity("config") export class ConfigEntity extends BaseClassWithoutId { @@ -48,6 +49,11 @@ export interface ConfigValue { endpointPublic: string | null; endpointPrivate: string | null; }; + api: { + defaultVersion: string; + activeVersions: string[]; + useFosscordEnhancements: boolean; + }; general: { instanceName: string; instanceDescription: string | null; @@ -172,6 +178,16 @@ export interface ConfigValue { allowTemplateCreation: Boolean; allowDiscordTemplates: Boolean; allowRaws: Boolean; + }, + client: { + useTestClient: Boolean; + relases: { + useLocalRelases: Boolean; //TODO + upstreamVersion: string; + } + }, + metrics: { + timeout: number; } } @@ -186,6 +202,11 @@ export const DefaultConfigOptions: ConfigValue = { endpointPrivate: null, endpointPublic: null, }, + api: { + defaultVersion: "9", + activeVersions: ["6", "7", "8", "9"], + useFosscordEnhancements: true, + }, general: { instanceName: "Fosscord Instance", instanceDescription: "This is a Fosscord instance made in pre-relase days", @@ -346,5 +367,15 @@ export const DefaultConfigOptions: ConfigValue = { allowTemplateCreation: true, allowDiscordTemplates: true, allowRaws: false + }, + client: { + useTestClient: true, + relases: { + useLocalRelases: true, + upstreamVersion: "0.0.264" + } + }, + metrics: { + timeout: 30000 } }; diff --git a/util/src/entities/clientRelase.ts b/util/src/entities/clientRelase.ts new file mode 100644
index 00000000..e021b82b --- /dev/null +++ b/util/src/entities/clientRelase.ts
@@ -0,0 +1,26 @@ +import { Column, Entity} from "typeorm"; +import { BaseClass } from "./BaseClass"; + +@Entity("client_relase") +export class Relase extends BaseClass { + @Column() + name: string; + + @Column() + pub_date: string; + + @Column() + url: string; + + @Column() + deb_url: string; + + @Column() + osx_url: string; + + @Column() + win_url: string; + + @Column({ nullable: true }) + notes?: string; +} diff --git a/util/src/entities/index.ts b/util/src/entities/index.ts
index b52841c9..fdf18f23 100644 --- a/util/src/entities/index.ts +++ b/util/src/entities/index.ts
@@ -26,3 +26,4 @@ export * from "./Template"; export * from "./User"; export * from "./VoiceState"; export * from "./Webhook"; +export * from "./clientRelase"; \ No newline at end of file