diff options
author | Chocobozzz <me@florianbigard.com> | 2017-12-12 17:53:50 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2017-12-13 16:50:33 +0100 |
commit | 3fd3ab2d34d512b160a5e6084d7609be7b4f4452 (patch) | |
tree | e5ca358287fca6ecacce83defcf23af1e8e9f419 /server/models/oauth/oauth-client-interface.ts | |
parent | c893d4514e6ecbf282c7985fe5f82b8acd8a1137 (diff) | |
download | PeerTube-3fd3ab2d34d512b160a5e6084d7609be7b4f4452.tar.gz PeerTube-3fd3ab2d34d512b160a5e6084d7609be7b4f4452.tar.zst PeerTube-3fd3ab2d34d512b160a5e6084d7609be7b4f4452.zip |
Move models to typescript-sequelize
Diffstat (limited to 'server/models/oauth/oauth-client-interface.ts')
-rw-r--r-- | server/models/oauth/oauth-client-interface.ts | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/server/models/oauth/oauth-client-interface.ts b/server/models/oauth/oauth-client-interface.ts deleted file mode 100644 index 3526e4159..000000000 --- a/server/models/oauth/oauth-client-interface.ts +++ /dev/null | |||
@@ -1,31 +0,0 @@ | |||
1 | import * as Sequelize from 'sequelize' | ||
2 | import * as Promise from 'bluebird' | ||
3 | |||
4 | export namespace OAuthClientMethods { | ||
5 | export type CountTotal = () => Promise<number> | ||
6 | |||
7 | export type LoadFirstClient = () => Promise<OAuthClientInstance> | ||
8 | |||
9 | export type GetByIdAndSecret = (clientId: string, clientSecret: string) => Promise<OAuthClientInstance> | ||
10 | } | ||
11 | |||
12 | export interface OAuthClientClass { | ||
13 | countTotal: OAuthClientMethods.CountTotal | ||
14 | loadFirstClient: OAuthClientMethods.LoadFirstClient | ||
15 | getByIdAndSecret: OAuthClientMethods.GetByIdAndSecret | ||
16 | } | ||
17 | |||
18 | export interface OAuthClientAttributes { | ||
19 | clientId: string | ||
20 | clientSecret: string | ||
21 | grants: string[] | ||
22 | redirectUris: string[] | ||
23 | } | ||
24 | |||
25 | export interface OAuthClientInstance extends OAuthClientClass, OAuthClientAttributes, Sequelize.Instance<OAuthClientAttributes> { | ||
26 | id: number | ||
27 | createdAt: Date | ||
28 | updatedAt: Date | ||
29 | } | ||
30 | |||
31 | export interface OAuthClientModel extends OAuthClientClass, Sequelize.Model<OAuthClientInstance, OAuthClientAttributes> {} | ||