diff --git a/src/models/attachment.ts b/src/models/attachment.ts index c5c9933c..10f935f1 100644 --- a/src/models/attachment.ts +++ b/src/models/attachment.ts @@ -11,8 +11,8 @@ export interface IAttachment extends AbstractModel { } export default class AttachmentModel extends AbstractModel implements IAttachment { - declare id: number - declare taskId: number + id!: number + taskId!: number createdBy: IUser file: IFile created: Date diff --git a/src/models/avatar.ts b/src/models/avatar.ts index 411e3cd3..f87c60db 100644 --- a/src/models/avatar.ts +++ b/src/models/avatar.ts @@ -7,7 +7,7 @@ export interface IAvatar extends AbstractModel { } export default class AvatarModel extends AbstractModel implements IAvatar { - declare avatarProvider: AvatarProvider + avatarProvider!: AvatarProvider defaults() { return { diff --git a/src/models/backgroundImage.ts b/src/models/backgroundImage.ts index 21be0773..71f73246 100644 --- a/src/models/backgroundImage.ts +++ b/src/models/backgroundImage.ts @@ -12,14 +12,14 @@ export interface IBackgroundImage extends AbstractModel { } export default class BackgroundImageModel extends AbstractModel implements IBackgroundImage { - declare id: number - declare url: string - declare thumb: string - declare info: { + id!: number + url!: string + thumb!: string + info!: { author: string authorName: string } - declare blurHash: string + blurHash!: string defaults() { return { diff --git a/src/models/bucket.ts b/src/models/bucket.ts index f4b43759..46afd96a 100644 --- a/src/models/bucket.ts +++ b/src/models/bucket.ts @@ -17,13 +17,13 @@ export interface IBucket extends AbstractModel { } export default class BucketModel extends AbstractModel implements IBucket { - declare id: number - declare title: string - declare listId: number - declare limit: number - declare tasks: ITask[] - declare isDoneBucket: boolean - declare position: number + id!: number + title!: string + listId!: number + limit!: number + tasks!: ITask[] + isDoneBucket!: boolean + position!: number createdBy: IUser created: Date diff --git a/src/models/caldavToken.ts b/src/models/caldavToken.ts index b2186b0a..2518e123 100644 --- a/src/models/caldavToken.ts +++ b/src/models/caldavToken.ts @@ -6,8 +6,8 @@ export interface ICaldavToken extends AbstractModel { } export default class CaldavTokenModel extends AbstractModel implements ICaldavToken { - declare id: number - declare created: Date + id!: number + created!: Date constructor(data? : Object) { super(data) diff --git a/src/models/emailUpdate.ts b/src/models/emailUpdate.ts index 4f6f4385..d01dd959 100644 --- a/src/models/emailUpdate.ts +++ b/src/models/emailUpdate.ts @@ -6,8 +6,8 @@ interface IEmailUpdate extends AbstractModel { } export default class EmailUpdateModel extends AbstractModel implements IEmailUpdate { - declare newEmail: string - declare password: string + newEmail!: string + password!: string defaults() { return { diff --git a/src/models/file.ts b/src/models/file.ts index 81240a79..74b66ce7 100644 --- a/src/models/file.ts +++ b/src/models/file.ts @@ -9,10 +9,10 @@ export interface IFile extends AbstractModel { } export default class FileModel extends AbstractModel implements IFile { - declare id: number - declare mime: string - declare name: string - declare size: number + id!: number + mime!: string + name!: string + size!: number created: Date constructor(data) { diff --git a/src/models/label.ts b/src/models/label.ts index 75a104e3..5c5be248 100644 --- a/src/models/label.ts +++ b/src/models/label.ts @@ -18,13 +18,13 @@ export interface ILabel extends AbstractModel { } export default class LabelModel extends AbstractModel implements ILabel { - declare id: number - declare title: string - declare hexColor: string - declare description: string - declare createdBy: IUser - declare listId: number - declare textColor: string + id!: number + title!: string + hexColor!: string + description!: string + createdBy!: IUser + listId!: number + textColor!: string created: Date updated: Date diff --git a/src/models/labelTask.ts b/src/models/labelTask.ts index 496d6a69..5550e5cd 100644 --- a/src/models/labelTask.ts +++ b/src/models/labelTask.ts @@ -7,9 +7,9 @@ export interface ILabelTask extends AbstractModel { } export default class LabelTask extends AbstractModel implements ILabelTask { - declare id: number - declare taskId: number - declare labelId: number + id!: number + taskId!: number + labelId!: number defaults() { return { diff --git a/src/models/linkShare.ts b/src/models/linkShare.ts index 78c7d302..67f1dd2a 100644 --- a/src/models/linkShare.ts +++ b/src/models/linkShare.ts @@ -16,14 +16,14 @@ export interface ILinkShare extends AbstractModel { } export default class LinkShareModel extends AbstractModel implements ILinkShare { - declare id: number - declare hash: string - declare right: Right + id!: number + hash!: string + right!: Right sharedBy: IUser - declare sharingType: number // FIXME: use correct numbers - declare listId: number - declare name: string - declare password: string + sharingType!: number // FIXME: use correct numbers + listId!: number + name!: string + password!: string created: Date updated: Date diff --git a/src/models/list.ts b/src/models/list.ts index 7ced8929..c4b28273 100644 --- a/src/models/list.ts +++ b/src/models/list.ts @@ -27,20 +27,20 @@ export interface IList extends AbstractModel { } export default class ListModel extends AbstractModel implements IList { - declare id: number - declare title: string - declare description: string + id!: number + title!: string + description!: string owner: IUser tasks: ITask[] - declare namespaceId: INamespace['id'] - declare isArchived: boolean - declare hexColor: string - declare identifier: string - declare backgroundInformation: any - declare isFavorite: boolean - declare subscription: ISubscription - declare position: number - declare backgroundBlurHash: string + namespaceId!: INamespace['id'] + isArchived!: boolean + hexColor!: string + identifier!: string + backgroundInformation!: any + isFavorite!: boolean + subscription!: ISubscription + position!: number + backgroundBlurHash!: string created: Date updated: Date diff --git a/src/models/listDuplicateModel.ts b/src/models/listDuplicateModel.ts index e1a32cdf..8dd0db9f 100644 --- a/src/models/listDuplicateModel.ts +++ b/src/models/listDuplicateModel.ts @@ -9,8 +9,8 @@ export interface IListDuplicate extends AbstractModel { } export default class ListDuplicateModel extends AbstractModel implements IListDuplicate { - declare listId: number - declare namespaceId: INamespace['id'] + listId!: number + namespaceId!: INamespace['id'] list: IList constructor(data) { diff --git a/src/models/namespace.ts b/src/models/namespace.ts index 5d8c608c..00f42a85 100644 --- a/src/models/namespace.ts +++ b/src/models/namespace.ts @@ -18,14 +18,14 @@ export interface INamespace extends AbstractModel { } export default class NamespaceModel extends AbstractModel implements INamespace { - declare id: number - declare title: string - declare description: string + id!: number + title!: string + description!: string owner: IUser lists: IList[] - declare isArchived: boolean - declare hexColor: string - declare subscription: ISubscription + isArchived!: boolean + hexColor!: string + subscription!: ISubscription created: Date updated: Date diff --git a/src/models/notification.ts b/src/models/notification.ts index 4d9f48ab..21a392da 100644 --- a/src/models/notification.ts +++ b/src/models/notification.ts @@ -51,10 +51,10 @@ export interface INotification extends AbstractModel { } export default class NotificationModel extends AbstractModel implements INotification { - declare id: number - declare name: string - declare notification: NotificationTask | NotificationAssigned | NotificationDeleted | NotificationCreated | NotificationMemberAdded - declare read: boolean + id!: number + name!: string + notification!: NotificationTask | NotificationAssigned | NotificationDeleted | NotificationCreated | NotificationMemberAdded + read!: boolean readAt: Date | null created: Date diff --git a/src/models/passwordReset.ts b/src/models/passwordReset.ts index dd05f37a..3d5099aa 100644 --- a/src/models/passwordReset.ts +++ b/src/models/passwordReset.ts @@ -8,8 +8,8 @@ export interface IPasswordReset extends AbstractModel { export default class PasswordResetModel extends AbstractModel implements IPasswordReset { token: string - declare newPassword: string - declare email: string + newPassword!: string + email!: string constructor(data) { super(data) diff --git a/src/models/passwordUpdate.ts b/src/models/passwordUpdate.ts index 51640e32..d78e7801 100644 --- a/src/models/passwordUpdate.ts +++ b/src/models/passwordUpdate.ts @@ -6,8 +6,8 @@ export interface IPasswordUpdate extends AbstractModel { } export default class PasswordUpdateModel extends AbstractModel implements IPasswordUpdate { - declare newPassword: string - declare oldPassword: string + newPassword!: string + oldPassword!: string defaults() { return { diff --git a/src/models/savedFilter.ts b/src/models/savedFilter.ts index 16861306..6bb7be4a 100644 --- a/src/models/savedFilter.ts +++ b/src/models/savedFilter.ts @@ -21,10 +21,10 @@ export interface ISavedFilter extends AbstractModel { } export default class SavedFilterModel extends AbstractModel implements ISavedFilter { - declare id: 0 - declare title: string - declare description: string - declare filters: { + id!: 0 + title!: string + description!: string + filters!: { sortBy: ('done' | 'id')[] orderBy: ('asc' | 'desc')[] filterBy: 'done'[] diff --git a/src/models/subscription.ts b/src/models/subscription.ts index bd52d0d6..d17a692f 100644 --- a/src/models/subscription.ts +++ b/src/models/subscription.ts @@ -11,9 +11,9 @@ export interface ISubscription extends AbstractModel { } export default class SubscriptionModel extends AbstractModel implements ISubscription { - declare id: number - declare entity: string // FIXME: correct type? - declare entityId: number // FIXME: correct type? + id!: number + entity!: string // FIXME: correct type? + entityId!: number // FIXME: correct type? user: IUser created: Date diff --git a/src/models/task.ts b/src/models/task.ts index 5dd5eae2..e54d80eb 100644 --- a/src/models/task.ts +++ b/src/models/task.ts @@ -63,39 +63,39 @@ export interface ITask extends AbstractModel { export default class TaskModel extends AbstractModel implements ITask { id: number title: string - declare description: string - declare done: boolean + description!: string + done!: boolean doneAt: Date | null - declare priority: Priority + priority!: Priority labels: ILabel[] assignees: IUser[] dueDate: Date | null startDate: Date | null endDate: Date | null - declare repeatAfter: number | IRepeats - declare repeatFromCurrentDate: boolean - declare repeatMode: TaskRepeatMode + repeatAfter!: number | IRepeats + repeatFromCurrentDate!: boolean + repeatMode!: TaskRepeatMode reminderDates: Date[] - declare parentTaskId: ITask['id'] - declare hexColor: string - declare percentDone: number - declare relatedTasks: { [relationKind: string]: ITask } // FIXME: use relationKinds + parentTaskId!: ITask['id'] + hexColor!: string + percentDone!: number + relatedTasks!: { [relationKind: string]: ITask } // FIXME: use relationKinds attachments: IAttachment[] - declare identifier: string - declare index: number - declare isFavorite: boolean - declare subscription: ISubscription + identifier!: string + index!: number + isFavorite!: boolean + subscription!: ISubscription - declare position: number - declare kanbanPosition: number + position!: number + kanbanPosition!: number createdBy: IUser created: Date updated: Date listId: IList['id'] // Meta, only used when creating a new task - declare bucketId: IBucket['id'] + bucketId!: IBucket['id'] constructor(data: Partial) { super(data) diff --git a/src/models/taskAssignee.ts b/src/models/taskAssignee.ts index 5ceb15ad..84c9ba22 100644 --- a/src/models/taskAssignee.ts +++ b/src/models/taskAssignee.ts @@ -10,8 +10,8 @@ export interface ITaskAssignee extends AbstractModel { export default class TaskAssigneeModel extends AbstractModel implements ITaskAssignee { created: Date - declare userId: IUser['id'] - declare taskId: ITask['id'] + userId!: IUser['id'] + taskId!: ITask['id'] constructor(data) { super(data) diff --git a/src/models/taskComment.ts b/src/models/taskComment.ts index 15ca3b6d..5c4a0f9b 100644 --- a/src/models/taskComment.ts +++ b/src/models/taskComment.ts @@ -13,9 +13,9 @@ export interface ITaskComment extends AbstractModel { } export default class TaskCommentModel extends AbstractModel implements ITaskComment { - declare id: number - declare taskId: ITask['id'] - declare comment: string + id!: number + taskId!: ITask['id'] + comment!: string author: IUser created: Date diff --git a/src/models/taskRelation.ts b/src/models/taskRelation.ts index bc924b47..b576bb55 100644 --- a/src/models/taskRelation.ts +++ b/src/models/taskRelation.ts @@ -30,10 +30,10 @@ export interface ITaskRelation extends AbstractModel { } export default class TaskRelationModel extends AbstractModel implements ITaskRelation { - declare id: number - declare otherTaskId: ITask['id'] - declare taskId: ITask['id'] - declare relationKind: RelationKind + id!: number + otherTaskId!: ITask['id'] + taskId!: ITask['id'] + relationKind!: RelationKind createdBy: IUser created: Date diff --git a/src/models/team.ts b/src/models/team.ts index d53cb1c7..fa9c536e 100644 --- a/src/models/team.ts +++ b/src/models/team.ts @@ -16,11 +16,11 @@ export interface ITeam extends AbstractModel { } export default class TeamModel extends AbstractModel implements ITeam { - declare id: number - declare name: string - declare description: string + id!: number + name!: string + description!: string members: ITeamMember[] - declare right: Right + right!: Right createdBy: IUser created: Date diff --git a/src/models/teamList.ts b/src/models/teamList.ts index d3bbb42a..472cd479 100644 --- a/src/models/teamList.ts +++ b/src/models/teamList.ts @@ -6,7 +6,7 @@ export interface ITeamList extends TeamShareBaseModel { } export default class TeamListModel extends TeamShareBaseModel implements ITeamList { - declare listId: IList['id'] + listId!: IList['id'] defaults() { return { diff --git a/src/models/teamMember.ts b/src/models/teamMember.ts index f699408a..597599a7 100644 --- a/src/models/teamMember.ts +++ b/src/models/teamMember.ts @@ -7,8 +7,8 @@ export interface ITeamMember extends UserModel { } export default class TeamMemberModel extends UserModel implements ITeamMember { - declare admin: boolean - declare teamId: IList['id'] + admin!: boolean + teamId!: IList['id'] defaults() { return { diff --git a/src/models/teamNamespace.ts b/src/models/teamNamespace.ts index 2064d141..31a84510 100644 --- a/src/models/teamNamespace.ts +++ b/src/models/teamNamespace.ts @@ -6,7 +6,7 @@ export interface ITeamNamespace extends TeamShareBaseModel { } export default class TeamNamespaceModel extends TeamShareBaseModel implements ITeamNamespace { - declare namespaceId: INamespace['id'] + namespaceId!: INamespace['id'] defaults() { return { diff --git a/src/models/teamShareBase.ts b/src/models/teamShareBase.ts index 83a3b0d1..5d24ae8d 100644 --- a/src/models/teamShareBase.ts +++ b/src/models/teamShareBase.ts @@ -15,8 +15,8 @@ export interface ITeamShareBase extends AbstractModel { * It is extended in a way so it can be used for namespaces as well for lists. */ export default class TeamShareBaseModel extends AbstractModel implements ITeamShareBase { - declare teamId: ITeam['id'] - declare right: Right + teamId!: ITeam['id'] + right!: Right created: Date updated: Date diff --git a/src/models/totp.ts b/src/models/totp.ts index a47044c5..619af601 100644 --- a/src/models/totp.ts +++ b/src/models/totp.ts @@ -7,9 +7,9 @@ export interface ITotp extends AbstractModel { } export default class TotpModel extends AbstractModel implements ITotp{ - declare secret: string - declare enabled: boolean - declare url: string + secret!: string + enabled!: boolean + url!: string defaults() { return { diff --git a/src/models/user.ts b/src/models/user.ts index eaa472a7..181910cc 100644 --- a/src/models/user.ts +++ b/src/models/user.ts @@ -13,10 +13,10 @@ export interface IUser extends AbstractModel { } export default class UserModel extends AbstractModel implements IUser { - declare id: number - declare email: string - declare username: string - declare name: string + id!: number + email!: string + username!: string + name!: string created: Date updated: Date diff --git a/src/models/userList.ts b/src/models/userList.ts index d0b9cbd3..51c2a229 100644 --- a/src/models/userList.ts +++ b/src/models/userList.ts @@ -7,7 +7,7 @@ export interface IUserList extends UserShareBaseModel { // This class extends the user share model with a 'rights' parameter which is used in sharing export default class UserListModel extends UserShareBaseModel implements IUserList { - declare listId: IList['id'] + listId!: IList['id'] defaults() { return { diff --git a/src/models/userNamespace.ts b/src/models/userNamespace.ts index 2a11a35e..6d7c8068 100644 --- a/src/models/userNamespace.ts +++ b/src/models/userNamespace.ts @@ -7,7 +7,7 @@ export interface IUserNamespace extends UserShareBaseModel { // This class extends the user share model with a 'rights' parameter which is used in sharing export default class UserNamespaceModel extends UserShareBaseModel implements IUserNamespace { - declare namespaceId: INamespace['id'] + namespaceId!: INamespace['id'] defaults() { return { diff --git a/src/models/userSettings.ts b/src/models/userSettings.ts index a5db3f80..e7e7acad 100644 --- a/src/models/userSettings.ts +++ b/src/models/userSettings.ts @@ -14,14 +14,14 @@ export interface IUserSettings extends AbstractModel { } export default class UserSettingsModel extends AbstractModel implements IUserSettings { - declare name: string - declare emailRemindersEnabled: boolean - declare discoverableByName: boolean - declare discoverableByEmail: boolean - declare overdueTasksRemindersEnabled: boolean - declare defaultListId: undefined | IList['id'] - declare weekStart: 0 | 1 | 2 | 3 | 4 | 5 | 6 - declare timezone: string + name!: string + emailRemindersEnabled!: boolean + discoverableByName!: boolean + discoverableByEmail!: boolean + overdueTasksRemindersEnabled!: boolean + defaultListId!: undefined | IList['id'] + weekStart!: 0 | 1 | 2 | 3 | 4 | 5 | 6 + timezone!: string defaults() { return { diff --git a/src/models/userShareBase.ts b/src/models/userShareBase.ts index c6e80d41..703ce630 100644 --- a/src/models/userShareBase.ts +++ b/src/models/userShareBase.ts @@ -11,8 +11,8 @@ export interface IUserShareBase extends AbstractModel { } export default class UserShareBaseModel extends AbstractModel implements IUserShareBase { - declare userId: IUser['id'] - declare right: Right + userId!: IUser['id'] + right!: Right created: Date updated: Date