1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-05 02:39:33 +02:00

Type functions

This commit is contained in:
Chocobozzz 2017-06-10 22:15:25 +02:00
parent 4d4e5cd4dc
commit 69818c9394
96 changed files with 990 additions and 544 deletions

View file

@ -1,11 +1,25 @@
import * as Sequelize from 'sequelize'
import * as Bluebird from 'bluebird'
import { UserModel } from './user-interface'
export type OAuthTokenInfo = {
refreshToken: string
refreshTokenExpiresAt: Date,
client: {
id: number
},
user: {
id: number
}
}
export namespace OAuthTokenMethods {
export type GetByRefreshTokenAndPopulateClient = (refreshToken) => void
export type GetByTokenAndPopulateUser = (bearerToken) => void
export type GetByRefreshTokenAndPopulateUser = (refreshToken) => any
export type GetByRefreshTokenAndPopulateClient = (refreshToken: string) => Bluebird<OAuthTokenInfo>
export type GetByTokenAndPopulateUser = (bearerToken: string) => Bluebird<OAuthTokenInstance>
export type GetByRefreshTokenAndPopulateUser = (refreshToken: string) => Bluebird<OAuthTokenInstance>
export type RemoveByUserIdCallback = (err: Error) => void
export type RemoveByUserId = (userId, callback) => void
}