mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-04 10:19:35 +02:00
Type models
This commit is contained in:
parent
65fcc3119c
commit
e02643f32e
76 changed files with 1710 additions and 816 deletions
28
server/models/oauth-client-interface.ts
Normal file
28
server/models/oauth-client-interface.ts
Normal file
|
@ -0,0 +1,28 @@
|
|||
import * as Sequelize from 'sequelize'
|
||||
|
||||
export namespace OAuthClientMethods {
|
||||
export type CountTotal = (callback) => void
|
||||
export type LoadFirstClient = (callback) => void
|
||||
export type GetByIdAndSecret = (clientId, clientSecret) => void
|
||||
}
|
||||
|
||||
export interface OAuthClientClass {
|
||||
countTotal: OAuthClientMethods.CountTotal
|
||||
loadFirstClient: OAuthClientMethods.LoadFirstClient
|
||||
getByIdAndSecret: OAuthClientMethods.GetByIdAndSecret
|
||||
}
|
||||
|
||||
export interface OAuthClientAttributes {
|
||||
clientId: string
|
||||
clientSecret: string
|
||||
grants: string[]
|
||||
redirectUris: string[]
|
||||
}
|
||||
|
||||
export interface OAuthClientInstance extends OAuthClientClass, OAuthClientAttributes, Sequelize.Instance<OAuthClientAttributes> {
|
||||
id: number
|
||||
createdAt: Date
|
||||
updatedAt: Date
|
||||
}
|
||||
|
||||
export interface OAuthClientModel extends OAuthClientClass, Sequelize.Model<OAuthClientInstance, OAuthClientAttributes> {}
|
Loading…
Add table
Add a link
Reference in a new issue