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