diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2017-06-16 09:45:46 +0200 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2017-06-16 09:45:46 +0200 |
commit | 74889a71fe687dda74f2a687653122327807af36 (patch) | |
tree | e938e8b6401b74fbec80513a877d9967f2c0dbcd /server/models/oauth-client-interface.ts | |
parent | 15a302943d84bc0978b84fe33110c4daa451d311 (diff) | |
download | PeerTube-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.ts | 32 |
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 @@ | |||
1 | import * as Sequelize from 'sequelize' | ||
2 | |||
3 | export 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 | |||
13 | export interface OAuthClientClass { | ||
14 | countTotal: OAuthClientMethods.CountTotal | ||
15 | loadFirstClient: OAuthClientMethods.LoadFirstClient | ||
16 | getByIdAndSecret: OAuthClientMethods.GetByIdAndSecret | ||
17 | } | ||
18 | |||
19 | export interface OAuthClientAttributes { | ||
20 | clientId: string | ||
21 | clientSecret: string | ||
22 | grants: string[] | ||
23 | redirectUris: string[] | ||
24 | } | ||
25 | |||
26 | export interface OAuthClientInstance extends OAuthClientClass, OAuthClientAttributes, Sequelize.Instance<OAuthClientAttributes> { | ||
27 | id: number | ||
28 | createdAt: Date | ||
29 | updatedAt: Date | ||
30 | } | ||
31 | |||
32 | export interface OAuthClientModel extends OAuthClientClass, Sequelize.Model<OAuthClientInstance, OAuthClientAttributes> {} | ||