Type server models (#6326)
* fix: type server models * fix: make ParanoidModel generic * fix: ApiKey * fix: Attachment * fix: AuthenticationProvider * fix: Backlink * fix: Collection * fix: Comment * fix: Document * fix: FileOperation * fix: Group * fix: GroupPermission * fix: GroupUser * fix: Integration * fix: IntegrationAuthentication * fix: Notification * fix: Pin * fix: Revision * fix: SearchQuery * fix: Share * fix: Star * fix: Subscription * fix: TypeError * fix: Imports * fix: Team * fix: TeamDomain * fix: User * fix: UserAuthentication * fix: UserPermission * fix: View * fix: WebhookDelivery * fix: WebhookSubscription * Remove type duplication --------- Co-authored-by: Tom Moor <tom.moor@gmail.com>
This commit is contained in:
@@ -1,6 +1,10 @@
|
||||
import { addMinutes, subMinutes } from "date-fns";
|
||||
import invariant from "invariant";
|
||||
import { SaveOptions } from "sequelize";
|
||||
import {
|
||||
InferAttributes,
|
||||
InferCreationAttributes,
|
||||
SaveOptions,
|
||||
} from "sequelize";
|
||||
import {
|
||||
BeforeCreate,
|
||||
BelongsTo,
|
||||
@@ -22,7 +26,10 @@ import Fix from "./decorators/Fix";
|
||||
|
||||
@Table({ tableName: "user_authentications", modelName: "user_authentication" })
|
||||
@Fix
|
||||
class UserAuthentication extends IdModel {
|
||||
class UserAuthentication extends IdModel<
|
||||
InferAttributes<UserAuthentication>,
|
||||
Partial<InferCreationAttributes<UserAuthentication>>
|
||||
> {
|
||||
@Column(DataType.ARRAY(DataType.STRING))
|
||||
scopes: string[];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user