diff options
author | Chocobozzz <me@florianbigard.com> | 2019-08-21 14:31:57 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2019-08-21 15:23:04 +0200 |
commit | b5fecbf44192144d1ca27c23a0b53922de288c10 (patch) | |
tree | 03e4f1048273e6de60b8eb642fb52b2a4c68e60c /server/typings/models/account | |
parent | f92e7f76d43cbad173be87f47105b9a02032318a (diff) | |
download | PeerTube-b5fecbf44192144d1ca27c23a0b53922de288c10.tar.gz PeerTube-b5fecbf44192144d1ca27c23a0b53922de288c10.tar.zst PeerTube-b5fecbf44192144d1ca27c23a0b53922de288c10.zip |
Type toActivityPubObject functions
Diffstat (limited to 'server/typings/models/account')
-rw-r--r-- | server/typings/models/account/account.ts | 4 | ||||
-rw-r--r-- | server/typings/models/account/actor.ts | 9 |
2 files changed, 10 insertions, 3 deletions
diff --git a/server/typings/models/account/account.ts b/server/typings/models/account/account.ts index cd20fe81b..ec78fece8 100644 --- a/server/typings/models/account/account.ts +++ b/server/typings/models/account/account.ts | |||
@@ -1,6 +1,7 @@ | |||
1 | import { AccountModel } from '../../../models/account/account' | 1 | import { AccountModel } from '../../../models/account/account' |
2 | import { | 2 | import { |
3 | MActor, | 3 | MActor, |
4 | MActorAP, | ||
4 | MActorAPI, | 5 | MActorAPI, |
5 | MActorAudience, | 6 | MActorAudience, |
6 | MActorDefault, | 7 | MActorDefault, |
@@ -89,3 +90,6 @@ export type MAccountSummaryFormattable = FunctionProperties<MAccount> & | |||
89 | export type MAccountFormattable = FunctionProperties<MAccount> & | 90 | export type MAccountFormattable = FunctionProperties<MAccount> & |
90 | Pick<MAccount, 'id' | 'name' | 'description' | 'createdAt' | 'updatedAt' | 'userId'> & | 91 | Pick<MAccount, 'id' | 'name' | 'description' | 'createdAt' | 'updatedAt' | 'userId'> & |
91 | Use<'Actor', MActorFormattable> | 92 | Use<'Actor', MActorFormattable> |
93 | |||
94 | export type MAccountAP = Pick<MAccount, 'name' | 'description'> & | ||
95 | Use<'Actor', MActorAP> | ||
diff --git a/server/typings/models/account/actor.ts b/server/typings/models/account/actor.ts index 14ab2cd5b..d4bcac4a3 100644 --- a/server/typings/models/account/actor.ts +++ b/server/typings/models/account/actor.ts | |||
@@ -1,5 +1,5 @@ | |||
1 | import { ActorModel } from '../../../models/activitypub/actor' | 1 | import { ActorModel } from '../../../models/activitypub/actor' |
2 | import { FunctionProperties, PickWith } from '../../utils' | 2 | import { FunctionProperties, PickWith, PickWithOpt } from '../../utils' |
3 | import { MAccount, MAccountDefault, MAccountId, MAccountIdActor } from './account' | 3 | import { MAccount, MAccountDefault, MAccountId, MAccountIdActor } from './account' |
4 | import { MServer, MServerHost, MServerHostBlocks, MServerRedundancyAllowed } from '../server' | 4 | import { MServer, MServerHost, MServerHostBlocks, MServerRedundancyAllowed } from '../server' |
5 | import { MAvatar, MAvatarFormattable } from './avatar' | 5 | import { MAvatar, MAvatarFormattable } from './avatar' |
@@ -29,7 +29,7 @@ export type MActorLight = Omit<MActor, 'privateKey' | 'privateKey'> | |||
29 | // Some association attributes | 29 | // Some association attributes |
30 | 30 | ||
31 | export type MActorHost = Use<'Server', MServerHost> | 31 | export type MActorHost = Use<'Server', MServerHost> |
32 | export type MActorRedundancyAllowed = Use<'Server', MServerRedundancyAllowed> | 32 | export type MActorRedundancyAllowedOpt = PickWithOpt<ActorModel, 'Server', MServerRedundancyAllowed> |
33 | 33 | ||
34 | export type MActorDefaultLight = MActorLight & | 34 | export type MActorDefaultLight = MActorLight & |
35 | Use<'Server', MServerHost> & | 35 | Use<'Server', MServerHost> & |
@@ -115,4 +115,7 @@ export type MActorSummaryFormattable = FunctionProperties<MActor> & | |||
115 | 115 | ||
116 | export type MActorFormattable = MActorSummaryFormattable & | 116 | export type MActorFormattable = MActorSummaryFormattable & |
117 | Pick<MActor, 'id' | 'followingCount' | 'followersCount' | 'createdAt' | 'updatedAt'> & | 117 | Pick<MActor, 'id' | 'followingCount' | 'followersCount' | 'createdAt' | 'updatedAt'> & |
118 | Use<'Server', MServer> | 118 | Use<'Server', MServerHost & Partial<Pick<MServer, 'redundancyAllowed'>>> |
119 | |||
120 | export type MActorAP = MActor & | ||
121 | Use<'Avatar', MAvatar> | ||