1
0
Fork 0
peertube/server/typings/models/oauth/oauth-token.ts
2019-08-20 14:53:42 +02:00

13 lines
515 B
TypeScript

import { OAuthTokenModel } from '@server/models/oauth/oauth-token'
import { PickWith } from '@server/typings/utils'
import { MUserAccountUrl } from '@server/typings/models'
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 }