aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/oauth-client-interface.ts
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2017-06-16 09:45:46 +0200
committerChocobozzz <florian.bigard@gmail.com>2017-06-16 09:45:46 +0200
commit74889a71fe687dda74f2a687653122327807af36 (patch)
treee938e8b6401b74fbec80513a877d9967f2c0dbcd /server/models/oauth-client-interface.ts
parent15a302943d84bc0978b84fe33110c4daa451d311 (diff)
downloadPeerTube-74889a71fe687dda74f2a687653122327807af36.tar.gz
PeerTube-74889a71fe687dda74f2a687653122327807af36.tar.zst
PeerTube-74889a71fe687dda74f2a687653122327807af36.zip
Reorganize model files
Diffstat (limited to 'server/models/oauth-client-interface.ts')
-rw-r--r--server/models/oauth-client-interface.ts32
1 files changed, 0 insertions, 32 deletions
diff --git a/server/models/oauth-client-interface.ts b/server/models/oauth-client-interface.ts
deleted file mode 100644
index 3b4325740..000000000
--- a/server/models/oauth-client-interface.ts
+++ /dev/null
@@ -1,32 +0,0 @@
1import * as Sequelize from 'sequelize'
2
3export namespace OAuthClientMethods {
4 export type CountTotalCallback = (err: Error, total: number) => void
5 export type CountTotal = (callback: CountTotalCallback) => void
6
7 export type LoadFirstClientCallback = (err: Error, client: OAuthClientInstance) => void
8 export type LoadFirstClient = (callback: LoadFirstClientCallback) => void
9
10 export type GetByIdAndSecret = (clientId, clientSecret) => void
11}
12
13export interface OAuthClientClass {
14 countTotal: OAuthClientMethods.CountTotal
15 loadFirstClient: OAuthClientMethods.LoadFirstClient
16 getByIdAndSecret: OAuthClientMethods.GetByIdAndSecret
17}
18
19export interface OAuthClientAttributes {
20 clientId: string
21 clientSecret: string
22 grants: string[]
23 redirectUris: string[]
24}
25
26export interface OAuthClientInstance extends OAuthClientClass, OAuthClientAttributes, Sequelize.Instance<OAuthClientAttributes> {
27 id: number
28 createdAt: Date
29 updatedAt: Date
30}
31
32export interface OAuthClientModel extends OAuthClientClass, Sequelize.Model<OAuthClientInstance, OAuthClientAttributes> {}