aboutsummaryrefslogblamecommitdiffhomepage
path: root/server/types/models/oauth/oauth-token.ts
blob: 8399af8f1795948235ab4f11bf930609c2571835 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
                                                                  
                                             
                                              
 



                                                                               

                                                                        

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