mirror of
https://codeberg.org/timelimit/timelimit-server.git
synced 2026-08-31 19:03:45 +02:00
Update dependencies
This commit is contained in:
@@ -26,7 +26,7 @@ export interface AddDeviceTokenAttributes {
|
||||
createdAt: string
|
||||
}
|
||||
|
||||
export type AddDeviceTokenModel = Sequelize.Model & AddDeviceTokenAttributes
|
||||
export type AddDeviceTokenModel = Sequelize.Model<AddDeviceTokenAttributes> & AddDeviceTokenAttributes
|
||||
export type AddDeviceTokenModelStatic = typeof Sequelize.Model & {
|
||||
new (values?: object, options?: Sequelize.BuildOptions): AddDeviceTokenModel;
|
||||
}
|
||||
|
||||
+1
-1
@@ -29,7 +29,7 @@ export interface AppAttributes {
|
||||
recommendation: AppRecommendation
|
||||
}
|
||||
|
||||
export type AppModel = Sequelize.Model & AppAttributes
|
||||
export type AppModel = Sequelize.Model<AppAttributes> & AppAttributes
|
||||
export type AppModelStatic = typeof Sequelize.Model & {
|
||||
new (values?: object, options?: Sequelize.BuildOptions): AppModel;
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ export interface AppActivityAttributes {
|
||||
title: string
|
||||
}
|
||||
|
||||
export type AppActivityModel = Sequelize.Model & AppActivityAttributes
|
||||
export type AppActivityModel = Sequelize.Model<AppActivityAttributes> & AppActivityAttributes
|
||||
export type AppActivityModelStatic = typeof Sequelize.Model & {
|
||||
new (values?: object, options?: Sequelize.BuildOptions): AppActivityModel;
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ export interface AuthTokenAttributes {
|
||||
createdAt: string
|
||||
}
|
||||
|
||||
export type AuthTokenModel = Sequelize.Model & AuthTokenAttributes
|
||||
export type AuthTokenModel = Sequelize.Model<AuthTokenAttributes> & AuthTokenAttributes
|
||||
export type AuthTokenModelStatic = typeof Sequelize.Model & {
|
||||
new (values?: object, options?: Sequelize.BuildOptions): AuthTokenModel;
|
||||
}
|
||||
|
||||
@@ -54,7 +54,7 @@ export interface CategoryAttributesVersion5 {
|
||||
}
|
||||
|
||||
export interface CategoryAttributesVersion6 {
|
||||
temporarilyBlockedEndTime: number
|
||||
temporarilyBlockedEndTime: string
|
||||
}
|
||||
|
||||
export interface CategoryAttributesVersion7 {
|
||||
@@ -78,7 +78,7 @@ export type CategoryAttributes = CategoryAttributesVersion1 & CategoryAttributes
|
||||
CategoryAttributesVersion6 & CategoryAttributesVersion7 & CategoryAttributesVersion8 &
|
||||
CategoryAttributesVersion9 & CategoryAttributesVersion10
|
||||
|
||||
export type CategoryModel = Sequelize.Model & CategoryAttributes
|
||||
export type CategoryModel = Sequelize.Model<CategoryAttributes> & CategoryAttributes
|
||||
export type CategoryModelStatic = typeof Sequelize.Model & {
|
||||
new (values?: object, options?: Sequelize.BuildOptions): CategoryModel;
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ export interface CategoryAppAttributes {
|
||||
packageName: string
|
||||
}
|
||||
|
||||
export type CategoryAppModel = Sequelize.Model & CategoryAppAttributes
|
||||
export type CategoryAppModel = Sequelize.Model<CategoryAppAttributes> & CategoryAppAttributes
|
||||
export type CategoryAppModelStatic = typeof Sequelize.Model & {
|
||||
new (values?: object, options?: Sequelize.BuildOptions): CategoryAppModel;
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ export interface CategoryNetworkIdAttributes {
|
||||
hashedNetworkId: string
|
||||
}
|
||||
|
||||
export type CategoryNetworkIdModel = Sequelize.Model & CategoryNetworkIdAttributes
|
||||
export type CategoryNetworkIdModel = Sequelize.Model<CategoryNetworkIdAttributes> & CategoryNetworkIdAttributes
|
||||
export type CategoryNetworkIdModelStatic = typeof Sequelize.Model & {
|
||||
new (values?: object, options?: Sequelize.BuildOptions): CategoryNetworkIdModel;
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ export interface ChildTaskAttributes {
|
||||
export const maxExtraTime = 1000 * 60 * 60 * 24
|
||||
export const maxTitleLength = 50
|
||||
|
||||
export type ChildTaskModel = Sequelize.Model & ChildTaskAttributes
|
||||
export type ChildTaskModel = Sequelize.Model<ChildTaskAttributes> & ChildTaskAttributes
|
||||
export type ChildTaskModelStatic = typeof Sequelize.Model & {
|
||||
new (values?: object, options?: Sequelize.BuildOptions): ChildTaskModel;
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ export interface ConfigAttributes {
|
||||
value: string | null
|
||||
}
|
||||
|
||||
export type ConfigModel = Sequelize.Model & ConfigAttributes
|
||||
export type ConfigModel = Sequelize.Model<ConfigAttributes> & ConfigAttributes
|
||||
export type ConfigModelStatic = typeof Sequelize.Model & {
|
||||
new (values?: object, options?: Sequelize.BuildOptions): ConfigModel;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* server component for the TimeLimit App
|
||||
* Copyright (C) 2019 Jonas Lochmann
|
||||
* Copyright (C) 2019 - 2020 Jonas Lochmann
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
@@ -107,7 +107,7 @@ export type DeviceAttributes = DeviceAttributesVersion1 & DeviceAttributesVersio
|
||||
DeviceAttributesVersion6 & DeviceAttributesVersion7 & DeviceAttributesVersion8 &
|
||||
DeviceAttributesVersion9 & DeviceAttributesVersion10 & DeviceAttributesVersion11
|
||||
|
||||
export type DeviceModel = Sequelize.Model & DeviceAttributes
|
||||
export type DeviceModel = Sequelize.Model<DeviceAttributes> & DeviceAttributes
|
||||
export type DeviceModelStatic = typeof Sequelize.Model & {
|
||||
new (values?: object, options?: Sequelize.BuildOptions): DeviceModel;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* server component for the TimeLimit App
|
||||
* Copyright (C) 2019 Jonas Lochmann
|
||||
* Copyright (C) 2019 - 2020 Jonas Lochmann
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
@@ -29,7 +29,7 @@ export interface FamilyAttributes {
|
||||
hasFullVersion: boolean
|
||||
}
|
||||
|
||||
export type FamilyModel = Sequelize.Model & FamilyAttributes
|
||||
export type FamilyModel = Sequelize.Model<FamilyAttributes> & FamilyAttributes
|
||||
export type FamilyModelStatic = typeof Sequelize.Model & {
|
||||
new (values?: object, options?: Sequelize.BuildOptions): FamilyModel;
|
||||
}
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { Promise as BluePromise } from 'bluebird'
|
||||
import * as Sequelize from 'sequelize'
|
||||
import { generateIdWithinFamily } from '../util/token'
|
||||
import { AddDeviceTokenModelStatic, createAddDeviceTokenModel } from './adddevicetoken'
|
||||
@@ -107,9 +106,6 @@ class TestRollbackException extends NestedTransactionTestException {}
|
||||
class NestedTransactionsNotWorkingException extends NestedTransactionTestException { constructor () { super('NestedTransactionsNotWorkingException') } }
|
||||
class IllegalStateException extends NestedTransactionTestException {}
|
||||
|
||||
export const wrapPromise = <T>(promise: Promise<T>) => BluePromise.resolve(promise)
|
||||
export const warpPromiseReturner = <T>(fun: () => Promise<T>) => () => wrapPromise(fun())
|
||||
|
||||
export async function assertNestedTransactionsAreWorking (database: Database) {
|
||||
const testValue = generateIdWithinFamily()
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* server component for the TimeLimit App
|
||||
* Copyright (C) 2019 Jonas Lochmann
|
||||
* Copyright (C) 2019 - 2020 Jonas Lochmann
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
@@ -27,7 +27,7 @@ export interface MailLoginTokenAttributes {
|
||||
remainingAttempts: number
|
||||
}
|
||||
|
||||
export type MailLoginTokenModel = Sequelize.Model & MailLoginTokenAttributes
|
||||
export type MailLoginTokenModel = Sequelize.Model<MailLoginTokenAttributes> & MailLoginTokenAttributes
|
||||
export type MailLoginTokenModelStatic = typeof Sequelize.Model & {
|
||||
new (values?: object, options?: Sequelize.BuildOptions): MailLoginTokenModel;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* server component for the TimeLimit App
|
||||
* Copyright (C) 2019 Jonas Lochmann
|
||||
* Copyright (C) 2019 - 2020 Jonas Lochmann
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
@@ -23,7 +23,7 @@ export interface OldDeviceAttributes {
|
||||
deviceAuthToken: string
|
||||
}
|
||||
|
||||
export type OldDeviceModel = Sequelize.Model & OldDeviceAttributes
|
||||
export type OldDeviceModel = Sequelize.Model<OldDeviceAttributes> & OldDeviceAttributes
|
||||
export type OldDeviceModelStatic = typeof Sequelize.Model & {
|
||||
new (values?: object, options?: Sequelize.BuildOptions): OldDeviceModel;
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ export interface PurchaseAttributes {
|
||||
newFullVersionEndTime: string
|
||||
}
|
||||
|
||||
export type PurchaseModel = Sequelize.Model & PurchaseAttributes
|
||||
export type PurchaseModel = Sequelize.Model<PurchaseAttributes> & PurchaseAttributes
|
||||
export type PurchaseModelStatic = typeof Sequelize.Model & {
|
||||
new (values?: object, options?: Sequelize.BuildOptions): PurchaseModel;
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ interface SessionDurationAttributesVersion1 {
|
||||
|
||||
export type SessionDurationAttributes = SessionDurationAttributesVersion1
|
||||
|
||||
export type SessionDurationModel = Sequelize.Model & SessionDurationAttributes
|
||||
export type SessionDurationModel = Sequelize.Model<SessionDurationAttributes> & SessionDurationAttributes
|
||||
export type SessionDurationModelStatic = typeof Sequelize.Model & {
|
||||
new (values?: object, options?: Sequelize.BuildOptions): SessionDurationModel;
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@ interface TimelimitRuleAttributesVersion3 {
|
||||
type TimelimitRuleAttributes = TimelimitRuleAttributesVersion1 &
|
||||
TimelimitRuleAttributesVersion2 & TimelimitRuleAttributesVersion3
|
||||
|
||||
export type TimelimitRuleModel = Sequelize.Model & TimelimitRuleAttributes
|
||||
export type TimelimitRuleModel = Sequelize.Model<TimelimitRuleAttributes> & TimelimitRuleAttributes
|
||||
export type TimelimitRuleModelStatic = typeof Sequelize.Model & {
|
||||
new (values?: object, options?: Sequelize.BuildOptions): TimelimitRuleModel;
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ export interface UsedTimeAttributesVersion3 {
|
||||
export type UsedTimeAttributes = UsedTimeAttributesVersion1 &
|
||||
UsedTimeAttributesVersion2 & UsedTimeAttributesVersion3
|
||||
|
||||
export type UsedTimeModel = Sequelize.Model & UsedTimeAttributes
|
||||
export type UsedTimeModel = Sequelize.Model<UsedTimeAttributes> & UsedTimeAttributes
|
||||
export type UsedTimeModelStatic = typeof Sequelize.Model & {
|
||||
new (values?: object, options?: Sequelize.BuildOptions): UsedTimeModel;
|
||||
}
|
||||
|
||||
@@ -70,7 +70,7 @@ export interface UserAttributesVersion6 {
|
||||
export type UserAttributes = UserAttributesVersion1 & UserAttributesVersion2 &
|
||||
UserAttributesVersion3 & UserAttributesVersion4 & UserAttributesVersion5 & UserAttributesVersion6
|
||||
|
||||
export type UserModel = Sequelize.Model & UserAttributes
|
||||
export type UserModel = Sequelize.Model<UserAttributes> & UserAttributes
|
||||
export type UserModelStatic = typeof Sequelize.Model & {
|
||||
new (values?: object, options?: Sequelize.BuildOptions): UserModel;
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ export interface UserLimitLoginCategoryAttributesVersion2 {
|
||||
|
||||
export type UserLimitLoginCategoryAttributes = UserLimitLoginCategoryAttributesVersion1 & UserLimitLoginCategoryAttributesVersion2
|
||||
|
||||
export type UserLimitLoginCategoryModel = Sequelize.Model & UserLimitLoginCategoryAttributes
|
||||
export type UserLimitLoginCategoryModel = Sequelize.Model<UserLimitLoginCategoryAttributes> & UserLimitLoginCategoryAttributes
|
||||
export type UserLimitLoginCategoryModelStatic = typeof Sequelize.Model & {
|
||||
new (values?: object, options?: Sequelize.BuildOptions): UserLimitLoginCategoryModel;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user