blob: 6af087e3c1ab9664f4b95f9af17b30f313aabc6b (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
import { OAuthTokenModel } from '@server/models/oauth/oauth-token'
import { PickWith } from '@shared/typescript-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 }
|