2019-08-15 11:53:26 +02:00
|
|
|
import { OAuthTokenModel } from '@server/models/oauth/oauth-token'
|
|
|
|
import { PickWith } from '@server/typings/utils'
|
2019-11-15 15:06:03 +01:00
|
|
|
import { MUserAccountUrl } from '../user/user'
|
2019-08-15 11:53:26 +02:00
|
|
|
|
2019-08-20 13:52:49 +02:00
|
|
|
type Use<K extends keyof OAuthTokenModel, M> = PickWith<OAuthTokenModel, K, M>
|
|
|
|
|
|
|
|
// ############################################################################
|
|
|
|
|
2019-08-15 11:53:26 +02:00
|
|
|
export type MOAuthToken = Omit<OAuthTokenModel, 'User' | 'OAuthClients'>
|
|
|
|
|
|
|
|
export type MOAuthTokenUser = MOAuthToken &
|
2019-08-20 13:52:49 +02:00
|
|
|
Use<'User', MUserAccountUrl> &
|
2019-08-15 11:53:26 +02:00
|
|
|
{ user?: MUserAccountUrl }
|