aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/types/models/oauth/oauth-token.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/types/models/oauth/oauth-token.ts')
-rw-r--r--server/types/models/oauth/oauth-token.ts14
1 files changed, 14 insertions, 0 deletions
diff --git a/server/types/models/oauth/oauth-token.ts b/server/types/models/oauth/oauth-token.ts
new file mode 100644
index 000000000..396cf6429
--- /dev/null
+++ b/server/types/models/oauth/oauth-token.ts
@@ -0,0 +1,14 @@
1import { OAuthTokenModel } from '@server/models/oauth/oauth-token'
2import { PickWith } from '@server/types/utils'
3import { MUserAccountUrl } from '../user/user'
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 =
12 MOAuthToken &
13 Use<'User', MUserAccountUrl> &
14 { user?: MUserAccountUrl }