]>
Commit | Line | Data |
---|---|---|
e02643f3 C |
1 | import * as Sequelize from 'sequelize' |
2 | ||
3 | export namespace OAuthClientMethods { | |
4 | export type CountTotal = (callback) => void | |
5 | export type LoadFirstClient = (callback) => void | |
6 | export type GetByIdAndSecret = (clientId, clientSecret) => void | |
7 | } | |
8 | ||
9 | export interface OAuthClientClass { | |
10 | countTotal: OAuthClientMethods.CountTotal | |
11 | loadFirstClient: OAuthClientMethods.LoadFirstClient | |
12 | getByIdAndSecret: OAuthClientMethods.GetByIdAndSecret | |
13 | } | |
14 | ||
15 | export interface OAuthClientAttributes { | |
16 | clientId: string | |
17 | clientSecret: string | |
18 | grants: string[] | |
19 | redirectUris: string[] | |
20 | } | |
21 | ||
22 | export interface OAuthClientInstance extends OAuthClientClass, OAuthClientAttributes, Sequelize.Instance<OAuthClientAttributes> { | |
23 | id: number | |
24 | createdAt: Date | |
25 | updatedAt: Date | |
26 | } | |
27 | ||
28 | export interface OAuthClientModel extends OAuthClientClass, Sequelize.Model<OAuthClientInstance, OAuthClientAttributes> {} |