]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/typings/models/server/server.ts
Type toFormattedJSON
[github/Chocobozzz/PeerTube.git] / server / typings / models / server / server.ts
index c059cff792e154b46c413dda0ab75979b9c60e9d..190cc0c289082cec5b76a33033c928b1a9b39151 100644 (file)
@@ -1,5 +1,5 @@
 import { ServerModel } from '../../../models/server/server'
-import { PickWith } from '../../utils'
+import { FunctionProperties, PickWith } from '../../utils'
 import { MAccountBlocklistId } from '../account'
 
 type Use<K extends keyof ServerModel, M> = PickWith<ServerModel, K, M>
@@ -11,6 +11,14 @@ export type MServer = Omit<ServerModel, 'Actors' | 'BlockedByAccounts'>
 // ############################################################################
 
 export type MServerHost = Pick<MServer, 'host'>
+export type MServerRedundancyAllowed = Pick<MServer, 'redundancyAllowed'>
 
 export type MServerHostBlocks = MServerHost &
   Use<'BlockedByAccounts', MAccountBlocklistId[]>
+
+// ############################################################################
+
+// Format for API or AP object
+
+export type MServerFormattable = FunctionProperties<MServer> &
+  Pick<MServer, 'host'>