Files
speckle-server/packages/server/modules/multiregion/helpers/validation.ts
T
Kristaps Fabians Geikins 5df716bf1c feat: add & list server regions (#3423)
* WIP create modal

* babababa

* create dialog looks ok

* FE largely there

* workss

* cleanup

* fixed up test plumbing to avoid deadlocks and simplify GQL calls

* test fix

* added all tests

* CI fix
2024-10-31 16:08:50 +01:00

26 lines
729 B
TypeScript

import { z } from 'zod'
export const regionServerConfigSchema = z.object({
postgres: z.object({
connectionUri: z
.string()
.describe(
'Full Postgres connection URI (e.g. "postgres://user:password@host:port/dbname")'
),
publicTlsCertificate: z
.string()
.describe('Public TLS ("CA") certificate for the Postgres server')
.optional()
})
//TODO - add the rest of the config when blob storage is implemented
// blobStorage: z
// .object({
// endpoint: z.string().url(),
// accessKey: z.string(),
// secretKey: z.string(),
// bucket: z.string()
// })
})
export const multiRegionConfigSchema = z.record(z.string(), regionServerConfigSchema)