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