diff options
Diffstat (limited to 'server/typings/models/oauth')
-rw-r--r-- | server/typings/models/oauth/index.d.ts | 2 | ||||
-rw-r--r-- | server/typings/models/oauth/oauth-token.ts | 6 |
2 files changed, 7 insertions, 1 deletions
diff --git a/server/typings/models/oauth/index.d.ts b/server/typings/models/oauth/index.d.ts new file mode 100644 index 000000000..36b7ea8ca --- /dev/null +++ b/server/typings/models/oauth/index.d.ts | |||
@@ -0,0 +1,2 @@ | |||
1 | export * from './oauth-client' | ||
2 | export * from './oauth-token' | ||
diff --git a/server/typings/models/oauth/oauth-token.ts b/server/typings/models/oauth/oauth-token.ts index 105ea3df3..af3412925 100644 --- a/server/typings/models/oauth/oauth-token.ts +++ b/server/typings/models/oauth/oauth-token.ts | |||
@@ -2,8 +2,12 @@ import { OAuthTokenModel } from '@server/models/oauth/oauth-token' | |||
2 | import { PickWith } from '@server/typings/utils' | 2 | import { PickWith } from '@server/typings/utils' |
3 | import { MUserAccountUrl } from '@server/typings/models' | 3 | import { MUserAccountUrl } from '@server/typings/models' |
4 | 4 | ||
5 | type Use<K extends keyof OAuthTokenModel, M> = PickWith<OAuthTokenModel, K, M> | ||
6 | |||
7 | // ############################################################################ | ||
8 | |||
5 | export type MOAuthToken = Omit<OAuthTokenModel, 'User' | 'OAuthClients'> | 9 | export type MOAuthToken = Omit<OAuthTokenModel, 'User' | 'OAuthClients'> |
6 | 10 | ||
7 | export type MOAuthTokenUser = MOAuthToken & | 11 | export type MOAuthTokenUser = MOAuthToken & |
8 | PickWith<OAuthTokenModel, 'User', MUserAccountUrl> & | 12 | Use<'User', MUserAccountUrl> & |
9 | { user?: MUserAccountUrl } | 13 | { user?: MUserAccountUrl } |