aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/typings/models/account
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-08-21 14:31:57 +0200
committerChocobozzz <me@florianbigard.com>2019-08-21 15:23:04 +0200
commitb5fecbf44192144d1ca27c23a0b53922de288c10 (patch)
tree03e4f1048273e6de60b8eb642fb52b2a4c68e60c /server/typings/models/account
parentf92e7f76d43cbad173be87f47105b9a02032318a (diff)
downloadPeerTube-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.ts4
-rw-r--r--server/typings/models/account/actor.ts9
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 @@
1import { AccountModel } from '../../../models/account/account' 1import { AccountModel } from '../../../models/account/account'
2import { 2import {
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> &
89export type MAccountFormattable = FunctionProperties<MAccount> & 90export 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
94export 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 @@
1import { ActorModel } from '../../../models/activitypub/actor' 1import { ActorModel } from '../../../models/activitypub/actor'
2import { FunctionProperties, PickWith } from '../../utils' 2import { FunctionProperties, PickWith, PickWithOpt } from '../../utils'
3import { MAccount, MAccountDefault, MAccountId, MAccountIdActor } from './account' 3import { MAccount, MAccountDefault, MAccountId, MAccountIdActor } from './account'
4import { MServer, MServerHost, MServerHostBlocks, MServerRedundancyAllowed } from '../server' 4import { MServer, MServerHost, MServerHostBlocks, MServerRedundancyAllowed } from '../server'
5import { MAvatar, MAvatarFormattable } from './avatar' 5import { 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
31export type MActorHost = Use<'Server', MServerHost> 31export type MActorHost = Use<'Server', MServerHost>
32export type MActorRedundancyAllowed = Use<'Server', MServerRedundancyAllowed> 32export type MActorRedundancyAllowedOpt = PickWithOpt<ActorModel, 'Server', MServerRedundancyAllowed>
33 33
34export type MActorDefaultLight = MActorLight & 34export type MActorDefaultLight = MActorLight &
35 Use<'Server', MServerHost> & 35 Use<'Server', MServerHost> &
@@ -115,4 +115,7 @@ export type MActorSummaryFormattable = FunctionProperties<MActor> &
115 115
116export type MActorFormattable = MActorSummaryFormattable & 116export 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
120export type MActorAP = MActor &
121 Use<'Avatar', MAvatar>