From 453e83ea5d81d203ba34bc43cd5c2c750ba40568 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 15 Aug 2019 11:53:26 +0200 Subject: Stronger model typings --- server/typings/models/account/actor.ts | 74 ++++++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 server/typings/models/account/actor.ts (limited to 'server/typings/models/account/actor.ts') diff --git a/server/typings/models/account/actor.ts b/server/typings/models/account/actor.ts new file mode 100644 index 000000000..f3e752a98 --- /dev/null +++ b/server/typings/models/account/actor.ts @@ -0,0 +1,74 @@ +import { ActorModel } from '../../../models/activitypub/actor' +import { PickWith } from '../../utils' +import { MAccount, MAccountActorDefault, MAccountId, MAccountIdActor } from './account' +import { MServerHost, MServerHostBlocks, MServer } from '../server' +import { MAvatar } from './avatar' +import { MChannel, MChannelAccountActor, MChannelActorAccountDefault, MChannelId, MChannelIdActor } from '../video' + +export type MActor = Omit + +export type MActorUrl = Pick +export type MActorId = Pick +export type MActorUsername = Pick +export type MActorHost = PickWith + +export type MActorFollowersUrl = Pick +export type MActorAudience = MActorUrl & MActorFollowersUrl + +export type MActorLight = Omit + +export type MActorDefaultLight = MActorLight & + MActorHost & + PickWith + +export type MActorAccountId = MActor & + PickWith +export type MActorAccountIdActor = MActor & + PickWith + +export type MActorChannelId = MActor & + PickWith +export type MActorChannelIdActor = MActor & + PickWith + +export type MActorAccountChannelId = MActorAccountId & MActorChannelId +export type MActorAccountChannelIdActor = MActorAccountIdActor & MActorChannelIdActor + +export type MActorAccount = MActor & + PickWith + +export type MActorChannel = MActor & + PickWith + +export type MActorAccountChannel = MActorAccount & MActorChannel + +export type MActorChannelAccount = MActor & + PickWith + +export type MActorServer = MActor & + PickWith + +export type MActorDefault = MActorServer & + PickWith + +export type MActorFull = MActorDefault & + PickWith & + PickWith + +export type MActorFullActor = MActorDefault & + PickWith & + PickWith + +export type MActorSummary = Pick & + MActorHost & + PickWith + +export type MActorSummaryBlocks = Omit & + PickWith + +export type MActorFollowerException = Pick + +export type MActorAPI = Omit + +export type MActorSignature = MActorAccountChannelId -- cgit v1.2.3