aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/typings/models/account/account.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/typings/models/account/account.ts')
-rw-r--r--server/typings/models/account/account.ts21
1 files changed, 18 insertions, 3 deletions
diff --git a/server/typings/models/account/account.ts b/server/typings/models/account/account.ts
index 9a8784e6b..33940517e 100644
--- a/server/typings/models/account/account.ts
+++ b/server/typings/models/account/account.ts
@@ -9,9 +9,11 @@ import {
9 MActorId, 9 MActorId,
10 MActorServer, 10 MActorServer,
11 MActorSummary, 11 MActorSummary,
12 MActorUrl 12 MActorSummaryFormattable,
13 MActorUrl,
14 MActorFormattable
13} from './actor' 15} from './actor'
14import { PickWith } from '../../utils' 16import { FunctionProperties, PickWith } from '../../utils'
15import { MAccountBlocklistId } from './account-blocklist' 17import { MAccountBlocklistId } from './account-blocklist'
16import { MChannelDefault } from '@server/typings/models' 18import { MChannelDefault } from '@server/typings/models'
17 19
@@ -67,7 +69,8 @@ export type MAccountServer = MAccount &
67 69
68// For API 70// For API
69 71
70export type MAccountSummary = Pick<MAccount, 'id' | 'name'> & 72export type MAccountSummary = FunctionProperties<MAccount> &
73 Pick<MAccount, 'id' | 'name'> &
71 Use<'Actor', MActorSummary> 74 Use<'Actor', MActorSummary>
72 75
73export type MAccountSummaryBlocks = MAccountSummary & 76export type MAccountSummaryBlocks = MAccountSummary &
@@ -75,3 +78,15 @@ export type MAccountSummaryBlocks = MAccountSummary &
75 78
76export type MAccountAPI = MAccount & 79export type MAccountAPI = MAccount &
77 Use<'Actor', MActorAPI> 80 Use<'Actor', MActorAPI>
81
82// ############################################################################
83
84// Format for API or AP object
85
86export type MAccountSummaryFormattable = FunctionProperties<MAccount> &
87 Pick<MAccount, 'id' | 'name'> &
88 Use<'Actor', MActorSummaryFormattable>
89
90export type MAccountFormattable = FunctionProperties<MAccount> &
91 Pick<MAccount, 'id' | 'name' | 'description' | 'createdAt' | 'updatedAt' | 'userId'> &
92 Use<'Actor', MActorFormattable>