mirror of https://github.com/Chocobozzz/PeerTube
15 lines
505 B
TypeScript
15 lines
505 B
TypeScript
|
import { OAuthTokenModel } from '@server/models/oauth/oauth-token'
|
||
|
import { PickWith } from '@server/types/utils'
|
||
|
import { MUserAccountUrl } from '../user/user'
|
||
|
|
||
|
type Use<K extends keyof OAuthTokenModel, M> = PickWith<OAuthTokenModel, K, M>
|
||
|
|
||
|
// ############################################################################
|
||
|
|
||
|
export type MOAuthToken = Omit<OAuthTokenModel, 'User' | 'OAuthClients'>
|
||
|
|
||
|
export type MOAuthTokenUser =
|
||
|
MOAuthToken &
|
||
|
Use<'User', MUserAccountUrl> &
|
||
|
{ user?: MUserAccountUrl }
|