feature/convert-abstract-service-to-ts #1798

Merged
konrad merged 32 commits from dpschen/frontend:feature/convert-abstract-service-to-ts into main 2022-09-06 09:26:49 +00:00
33 changed files with 40 additions and 41 deletions
Showing only changes of commit a6b96f857d - Show all commits

View File

@ -1,9 +1,8 @@
import AbstractModel from './abstractModel' import AbstractModel from './abstractModel'
import UserModel, {type IUser} from './user' import UserModel, {type IUser} from './user'
import FileModel, {type IFile} from './file' import FileModel, {type IFile} from './file'
import type {IAbstract} from './abstractModel'
export interface IAttachment extends IAbstract { export interface IAttachment extends AbstractModel {
id: number id: number
taskId: number taskId: number
createdBy: IUser createdBy: IUser

View File

@ -1,8 +1,8 @@
import AbstractModel, { type IAbstract } from './abstractModel' import AbstractModel from './abstractModel'
export type AvatarProvider = 'default' | 'initials' | 'gravatar' | 'marble' | 'upload' export type AvatarProvider = 'default' | 'initials' | 'gravatar' | 'marble' | 'upload'
export interface IAvatar extends IAbstract { export interface IAvatar extends AbstractModel {
avatarProvider: AvatarProvider avatarProvider: AvatarProvider
} }

View File

@ -1,6 +1,6 @@
import AbstractModel, { type IAbstract } from './abstractModel' import AbstractModel from './abstractModel'
export interface IBackgroundImage extends IAbstract { export interface IBackgroundImage extends AbstractModel {
id: number id: number
url: string url: string
thumb: string thumb: string

View File

@ -1,8 +1,8 @@
import AbstractModel, { type IAbstract } from './abstractModel' import AbstractModel from './abstractModel'
import UserModel, { type IUser } from './user' import UserModel, { type IUser } from './user'
import TaskModel, { type ITask } from './task' import TaskModel, { type ITask } from './task'
export interface IBucket extends IAbstract { export interface IBucket extends AbstractModel {
id: number id: number
title: string title: string
listId: number listId: number

View File

@ -1,6 +1,6 @@
import AbstractModel, { type IAbstract } from './abstractModel' import AbstractModel from './abstractModel'
export interface ICaldavToken extends IAbstract { export interface ICaldavToken extends AbstractModel {
id: number; id: number;
created: Date; created: Date;
} }

View File

@ -1,6 +1,6 @@
import AbstractModel from './abstractModel' import AbstractModel from './abstractModel'
interface IEmailUpdate { interface IEmailUpdate extends AbstractModel {
newEmail: string newEmail: string
password: string password: string
} }

View File

@ -1,6 +1,6 @@
import AbstractModel from './abstractModel' import AbstractModel from './abstractModel'
export interface IFile { export interface IFile extends AbstractModel {
id: number id: number
mime: string mime: string
name: string name: string

View File

@ -4,7 +4,7 @@ import {colorIsDark} from '@/helpers/color/colorIsDark'
const DEFAULT_LABEL_BACKGROUND_COLOR = 'e8e8e8' const DEFAULT_LABEL_BACKGROUND_COLOR = 'e8e8e8'
export interface ILabel { export interface ILabel extends AbstractModel {
id: number id: number
title: string title: string
hexColor: string hexColor: string

View File

@ -1,6 +1,6 @@
import AbstractModel from './abstractModel' import AbstractModel from './abstractModel'
interface ILabel { interface ILabel extends AbstractModel {
id: number id: number
taskId: number taskId: number
labelId: number labelId: number

View File

@ -1,8 +1,8 @@
import AbstractModel, { type IAbstract } from './abstractModel' import AbstractModel from './abstractModel'
import UserModel, { type IUser } from './user' import UserModel, { type IUser } from './user'
import {RIGHTS, type Right} from '@/models/constants/rights' import {RIGHTS, type Right} from '@/models/constants/rights'
export interface ILinkShare extends IAbstract { export interface ILinkShare extends AbstractModel {
id: number id: number
hash: string hash: string
right: Right right: Right

View File

@ -1,4 +1,4 @@
import AbstractModel, { type IAbstract } from '@/models/abstractModel' import AbstractModel from '@/models/abstractModel'
import TaskModel, { type ITask } from '@/models/task' import TaskModel, { type ITask } from '@/models/task'
import UserModel, { type IUser } from '@/models/user' import UserModel, { type IUser } from '@/models/user'
import SubscriptionModel, { type ISubscription } from '@/models/subscription' import SubscriptionModel, { type ISubscription } from '@/models/subscription'
@ -6,7 +6,7 @@ import type { INamespace } from '@/models/namespace'
import {getSavedFilterIdFromListId} from '@/helpers/savedFilter' import {getSavedFilterIdFromListId} from '@/helpers/savedFilter'
export interface IList extends IAbstract { export interface IList extends AbstractModel {
id: number id: number
title: string title: string
description: string description: string

View File

@ -2,7 +2,7 @@ import AbstractModel from './abstractModel'
import ListModel, { type IList } from './list' import ListModel, { type IList } from './list'
import type { INamespace } from './namespace' import type { INamespace } from './namespace'
export interface ListDuplicate { export interface ListDuplicate extends AbstractModel {
listId: number listId: number
namespaceId: INamespace['id'] namespaceId: INamespace['id']
list: IList list: IList

View File

@ -1,9 +1,9 @@
import AbstractModel, { type IAbstract } from './abstractModel' import AbstractModel from './abstractModel'
import ListModel, { type IList } from './list' import ListModel, { type IList } from './list'
import UserModel, { type IUser } from './user' import UserModel, { type IUser } from './user'
import SubscriptionModel, { type ISubscription } from '@/models/subscription' import SubscriptionModel, { type ISubscription } from '@/models/subscription'
export interface INamespace extends IAbstract { export interface INamespace extends AbstractModel {
id: number id: number
title: string title: string
description: string description: string

View File

@ -40,7 +40,7 @@ interface NotificationMemberAdded extends Notification {
team: ITeam team: ITeam
} }
export interface INotification { export interface INotification extends AbstractModel {
id: number id: number
name: string name: string
notification: NotificationTask | NotificationAssigned | NotificationDeleted | NotificationCreated | NotificationMemberAdded notification: NotificationTask | NotificationAssigned | NotificationDeleted | NotificationCreated | NotificationMemberAdded

View File

@ -1,6 +1,6 @@
import AbstractModel from './abstractModel' import AbstractModel from './abstractModel'
export interface IPasswordReset { export interface IPasswordReset extends AbstractModel {
token: string token: string
newPassword: string newPassword: string
email: string email: string

View File

@ -1,6 +1,6 @@
import AbstractModel from '@/models/abstractModel' import AbstractModel from '@/models/abstractModel'
export interface IPasswordUpdate { export interface IPasswordUpdate extends AbstractModel {
newPassword: string newPassword: string
oldPassword: string oldPassword: string
} }

View File

@ -1,7 +1,7 @@
import AbstractModel from '@/models/abstractModel' import AbstractModel from '@/models/abstractModel'
import UserModel, { type IUser } from '@/models/user' import UserModel, { type IUser } from '@/models/user'
export interface ISavedFilter { export interface ISavedFilter extends AbstractModel {
id: 0 id: 0
title: string title: string
description: string description: string

View File

@ -1,7 +1,7 @@
import AbstractModel from '@/models/abstractModel' import AbstractModel from '@/models/abstractModel'
import UserModel, { type IUser } from '@/models/user' import UserModel, { type IUser } from '@/models/user'
export interface ISubscription { export interface ISubscription extends AbstractModel {
id: number id: number
entity: string // FIXME: correct type? entity: string // FIXME: correct type?
entityId: number // FIXME: correct type? entityId: number // FIXME: correct type?

View File

@ -26,7 +26,7 @@ export interface RepeatAfter {
amount: number amount: number
} }
export interface ITask { export interface ITask extends AbstractModel {
id: number id: number
title: string title: string
description: string description: string

View File

@ -2,7 +2,7 @@ import AbstractModel from './abstractModel'
import type { ITask } from './task' import type { ITask } from './task'
import type { IUser } from './user' import type { IUser } from './user'
export interface ITaskAssignee { export interface ITaskAssignee extends AbstractModel {
created: Date created: Date
userId: IUser['id'] userId: IUser['id']
taskId: ITask['id'] taskId: ITask['id']

View File

@ -2,7 +2,7 @@ import AbstractModel from './abstractModel'
import UserModel, { type IUser } from './user' import UserModel, { type IUser } from './user'
import type { ITask } from './task' import type { ITask } from './task'
export interface ITaskComment { export interface ITaskComment extends AbstractModel {
id: number id: number
taskId: ITask['id'] taskId: ITask['id']
comment: string comment: string

View File

@ -19,7 +19,7 @@ export const RELATION_KINDS = [...Object.values(RELATION_KIND)] as const
export type RelationKind = typeof RELATION_KINDS[number] export type RelationKind = typeof RELATION_KINDS[number]
export interface ITaskRelationModel { export interface ITaskRelationModel extends AbstractModel {
id: number id: number
otherTaskId: ITask['id'] otherTaskId: ITask['id']
taskId: ITask['id'] taskId: ITask['id']

View File

@ -3,7 +3,7 @@ import UserModel, { type IUser } from './user'
import TeamMemberModel, { type ITeamMember } from './teamMember' import TeamMemberModel, { type ITeamMember } from './teamMember'
import {RIGHTS, type Right} from '@/models/constants/rights' import {RIGHTS, type Right} from '@/models/constants/rights'
export interface ITeam { export interface ITeam extends AbstractModel {
id: number id: number
name: string name: string
description: string description: string

View File

@ -1,7 +1,7 @@
import TeamShareBaseModel from './teamShareBase' import TeamShareBaseModel from './teamShareBase'
import type { IList } from './list' import type { IList } from './list'
export interface ITeamList { export interface ITeamList extends TeamShareBaseModel {
listId: IList['id'] listId: IList['id']
} }

View File

@ -1,7 +1,7 @@
import UserModel from './user' import UserModel from './user'
import type { IList } from './list' import type { IList } from './list'
export interface ITeamMember { export interface ITeamMember extends UserModel {
admin: boolean admin: boolean
teamId: IList['id'] teamId: IList['id']
} }

View File

@ -1,7 +1,7 @@
import TeamShareBaseModel from './teamShareBase' import TeamShareBaseModel from './teamShareBase'
import type { INamespace } from './namespace' import type { INamespace } from './namespace'
export interface ITeamNamespace { export interface ITeamNamespace extends TeamShareBaseModel {
namespaceId: INamespace['id'] namespaceId: INamespace['id']
} }

View File

@ -2,7 +2,7 @@ import AbstractModel from './abstractModel'
import {RIGHTS, type Right} from '@/models/constants/rights' import {RIGHTS, type Right} from '@/models/constants/rights'
import type { ITeam } from './team' import type { ITeam } from './team'
export interface ITeamShareBase { export interface ITeamShareBase extends AbstractModel {
teamId: ITeam['id'] teamId: ITeam['id']
right: Right right: Right

View File

@ -1,6 +1,6 @@
import AbstractModel from './abstractModel' import AbstractModel from './abstractModel'
export interface ITotp { export interface ITotp extends AbstractModel {
secret: string secret: string
enabled: boolean enabled: boolean
url: string url: string

View File

@ -1,7 +1,7 @@
import AbstractModel from './abstractModel' import AbstractModel from './abstractModel'
import UserSettingsModel, { type IUserSettings } from '@/models/userSettings' import UserSettingsModel, { type IUserSettings } from '@/models/userSettings'
export interface IUser { export interface IUser extends AbstractModel {
id: number id: number
email: string email: string
username: string username: string

View File

@ -1,7 +1,7 @@
import UserShareBaseModel from './userShareBase' import UserShareBaseModel from './userShareBase'
import type { IList } from './list' import type { IList } from './list'
export interface IUserList { export interface IUserList extends UserShareBaseModel {
listId: IList['id'] listId: IList['id']
} }

View File

@ -1,7 +1,7 @@
import UserShareBaseModel from './userShareBase' import UserShareBaseModel from './userShareBase'
import type { INamespace } from './namespace' import type { INamespace } from './namespace'
export interface IUserNamespace { export interface IUserNamespace extends UserShareBaseModel {
namespaceId: INamespace['id'] namespaceId: INamespace['id']
} }

View File

@ -2,7 +2,7 @@
import AbstractModel from './abstractModel' import AbstractModel from './abstractModel'
import type { IList } from './list' import type { IList } from './list'
export interface IUserSettings { export interface IUserSettings extends AbstractModel {
name: string name: string
emailRemindersEnabled: boolean emailRemindersEnabled: boolean
discoverableByName: boolean discoverableByName: boolean

View File

@ -2,7 +2,7 @@ import AbstractModel from './abstractModel'
import {RIGHTS, type Right} from '@/models/constants/rights' import {RIGHTS, type Right} from '@/models/constants/rights'
import type { IUser } from './user' import type { IUser } from './user'
export interface IUserShareBase { export interface IUserShareBase extends AbstractModel {
userId: IUser['id'] userId: IUser['id']
right: Right right: Right