Stronger model typings
[oweals/peertube.git] / server / typings / models / account / account-blocklist.ts
diff --git a/server/typings/models/account/account-blocklist.ts b/server/typings/models/account/account-blocklist.ts
new file mode 100644 (file)
index 0000000..6d1771d
--- /dev/null
@@ -0,0 +1,11 @@
+import { AccountBlocklistModel } from '../../../models/account/account-blocklist'
+import { PickWith } from '../../utils'
+import { MAccountDefault } from './account'
+
+export type MAccountBlocklist = Omit<AccountBlocklistModel, 'ByAccount' | 'BlockedAccount'>
+
+export type MAccountBlocklistId = Pick<AccountBlocklistModel, 'id'>
+
+export type MAccountBlocklistAccounts = MAccountBlocklist &
+  PickWith<AccountBlocklistModel, 'ByAccount', MAccountDefault> &
+  PickWith<AccountBlocklistModel, 'BlockedAccount', MAccountDefault>