]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame_incremental - server/types/models/oauth/oauth-token.ts
Fix tests
[github/Chocobozzz/PeerTube.git] / server / types / models / oauth / oauth-token.ts
... / ...
CommitLineData
1import { OAuthTokenModel } from '@server/models/oauth/oauth-token'
2import { PickWith } from '@shared/typescript-utils'
3import { MUserAccountUrl } from '../user/user'
4
5type Use<K extends keyof OAuthTokenModel, M> = PickWith<OAuthTokenModel, K, M>
6
7// ############################################################################
8
9export type MOAuthToken = Omit<OAuthTokenModel, 'User' | 'OAuthClients'>
10
11export type MOAuthTokenUser =
12 MOAuthToken &
13 Use<'User', MUserAccountUrl> &
14 { user?: MUserAccountUrl }