diff --git a/src/models/labelTask.ts b/src/models/labelTask.ts index 2179f9a8..496d6a69 100644 --- a/src/models/labelTask.ts +++ b/src/models/labelTask.ts @@ -1,12 +1,12 @@ import AbstractModel from './abstractModel' -interface ILabel extends AbstractModel { +export interface ILabelTask extends AbstractModel { id: number taskId: number labelId: number } -export default class LabelTask extends AbstractModel implements ILabel { +export default class LabelTask extends AbstractModel implements ILabelTask { declare id: number declare taskId: number declare labelId: number diff --git a/src/models/listDuplicateModel.ts b/src/models/listDuplicateModel.ts index 40896537..e1a32cdf 100644 --- a/src/models/listDuplicateModel.ts +++ b/src/models/listDuplicateModel.ts @@ -2,13 +2,13 @@ import AbstractModel from './abstractModel' import ListModel, { type IList } from './list' import type { INamespace } from './namespace' -export interface ListDuplicate extends AbstractModel { +export interface IListDuplicate extends AbstractModel { listId: number namespaceId: INamespace['id'] list: IList } -export default class ListDuplicateModel extends AbstractModel implements ListDuplicate { +export default class ListDuplicateModel extends AbstractModel implements IListDuplicate { declare listId: number declare namespaceId: INamespace['id'] list: IList diff --git a/src/models/taskRelation.ts b/src/models/taskRelation.ts index e86e9dab..bc924b47 100644 --- a/src/models/taskRelation.ts +++ b/src/models/taskRelation.ts @@ -19,7 +19,7 @@ export const RELATION_KINDS = [...Object.values(RELATION_KIND)] as const export type RelationKind = typeof RELATION_KINDS[number] -export interface ITaskRelationModel extends AbstractModel { +export interface ITaskRelation extends AbstractModel { id: number otherTaskId: ITask['id'] taskId: ITask['id'] @@ -29,7 +29,7 @@ export interface ITaskRelationModel extends AbstractModel { created: Date } -export default class TaskRelationModel extends AbstractModel implements ITaskRelationModel { +export default class TaskRelationModel extends AbstractModel implements ITaskRelation { declare id: number declare otherTaskId: ITask['id'] declare taskId: ITask['id'] diff --git a/src/services/labelTask.ts b/src/services/labelTask.ts index 14f4758e..cabc2c40 100644 --- a/src/services/labelTask.ts +++ b/src/services/labelTask.ts @@ -1,7 +1,7 @@ import AbstractService from './abstractService' -import LabelTask from '../models/labelTask' +import LabelTask, {type ILabelTask} from '@/models/labelTask' -export default class LabelTaskService extends AbstractService { +export default class LabelTaskService extends AbstractService { constructor() { super({ create: '/tasks/{taskId}/labels', diff --git a/src/services/linkShare.ts b/src/services/linkShare.ts index 34179dc6..61220d48 100644 --- a/src/services/linkShare.ts +++ b/src/services/linkShare.ts @@ -1,8 +1,8 @@ import AbstractService from './abstractService' -import LinkShareModel from '../models/linkShare' +import LinkShareModel, { type ILinkShare } from '@/models/linkShare' import {formatISO} from 'date-fns' -export default class ListService extends AbstractService { +export default class LinkShareService extends AbstractService { constructor() { super({ getAll: '/lists/{listId}/shares', diff --git a/src/services/listDuplicateService.ts b/src/services/listDuplicateService.ts index f34af5ca..b860c7c7 100644 --- a/src/services/listDuplicateService.ts +++ b/src/services/listDuplicateService.ts @@ -1,7 +1,7 @@ import AbstractService from './abstractService' -import listDuplicateModel from '../models/listDuplicateModel' +import listDuplicateModel, {type IListDuplicate} from '../models/listDuplicateModel' -export default class ListDuplicateService extends AbstractService { +export default class ListDuplicateService extends AbstractService { constructor() { super({ create: '/lists/{listId}/duplicate', diff --git a/src/services/notification.ts b/src/services/notification.ts index ff21251f..2d6f36aa 100644 --- a/src/services/notification.ts +++ b/src/services/notification.ts @@ -1,8 +1,8 @@ import AbstractService from '@/services/abstractService' import {formatISO} from 'date-fns' -import NotificationModel from '@/models/notification' +import NotificationModel, { type INotification } from '@/models/notification' -export default class NotificationService extends AbstractService { +export default class NotificationService extends AbstractService { constructor() { super({ getAll: '/notifications', diff --git a/src/services/passwordReset.ts b/src/services/passwordReset.ts index 9d3dc56b..c43381c5 100644 --- a/src/services/passwordReset.ts +++ b/src/services/passwordReset.ts @@ -1,7 +1,7 @@ import AbstractService from './abstractService' -import PasswordResetModel from '../models/passwordReset' +import PasswordResetModel, { type IPasswordReset } from '../models/passwordReset' -export default class PasswordResetService extends AbstractService { +export default class PasswordResetService extends AbstractService { constructor() { super({}) diff --git a/src/services/passwordUpdateService.ts b/src/services/passwordUpdateService.ts index 0c328dee..03306af1 100644 --- a/src/services/passwordUpdateService.ts +++ b/src/services/passwordUpdateService.ts @@ -1,6 +1,7 @@ +import type { IPasswordUpdate } from '@/models/passwordUpdate' import AbstractService from './abstractService' -export default class PasswordUpdateService extends AbstractService { +export default class PasswordUpdateService extends AbstractService { constructor() { super({ update: '/user/password', diff --git a/src/services/savedFilter.ts b/src/services/savedFilter.ts index e9c85f6f..61ae569d 100644 --- a/src/services/savedFilter.ts +++ b/src/services/savedFilter.ts @@ -1,8 +1,8 @@ import AbstractService from '@/services/abstractService' -import SavedFilterModel from '@/models/savedFilter' +import SavedFilterModel, { type ISavedFilter } from '@/models/savedFilter' import {objectToCamelCase} from '@/helpers/case' -export default class SavedFilterService extends AbstractService { +export default class SavedFilterService extends AbstractService { constructor() { super({ get: '/filters/{id}', diff --git a/src/services/subscription.ts b/src/services/subscription.ts index 20c79c09..2c41d6ec 100644 --- a/src/services/subscription.ts +++ b/src/services/subscription.ts @@ -1,7 +1,7 @@ import AbstractService from '@/services/abstractService' -import SubscriptionModel from '@/models/subscription' +import SubscriptionModel, { type ISubscription } from '@/models/subscription' -export default class SubscriptionService extends AbstractService { +export default class SubscriptionService extends AbstractService { constructor() { super({ create: '/subscriptions/{entity}/{entityId}', diff --git a/src/services/task.ts b/src/services/task.ts index 25dd9484..9c4ba6fc 100644 --- a/src/services/task.ts +++ b/src/services/task.ts @@ -14,7 +14,7 @@ const parseDate = date => { return null } -export default class TaskService extends AbstractService { +export default class TaskService extends AbstractService { constructor() { super({ create: '/lists/{listId}', diff --git a/src/services/taskAssignee.ts b/src/services/taskAssignee.ts index 6b76960b..e76921da 100644 --- a/src/services/taskAssignee.ts +++ b/src/services/taskAssignee.ts @@ -1,8 +1,8 @@ import AbstractService from './abstractService' -import TaskAssigneeModel from '../models/taskAssignee' +import TaskAssigneeModel, { type ITaskAssignee } from '../models/taskAssignee' import {formatISO} from 'date-fns' -export default class TaskAssigneeService extends AbstractService { +export default class TaskAssigneeService extends AbstractService { constructor() { super({ create: '/tasks/{taskId}/assignees', diff --git a/src/services/taskRelation.ts b/src/services/taskRelation.ts index 54459f0e..e5efdd71 100644 --- a/src/services/taskRelation.ts +++ b/src/services/taskRelation.ts @@ -1,8 +1,9 @@ -import AbstractService from './abstractService' -import TaskRelationModel from '../models/taskRelation' import {formatISO} from 'date-fns' -export default class TaskRelationService extends AbstractService { +import AbstractService from './abstractService' +import TaskRelationModel, {type ITaskRelation} from '@/models/taskRelation' + +export default class TaskRelationService extends AbstractService { constructor() { super({ create: '/tasks/{taskId}/relations', diff --git a/src/services/team.ts b/src/services/team.ts index e14fd931..d4602e13 100644 --- a/src/services/team.ts +++ b/src/services/team.ts @@ -1,8 +1,8 @@ import AbstractService from './abstractService' -import TeamModel from '../models/team' +import TeamModel, { type ITeam } from '../models/team' import {formatISO} from 'date-fns' -export default class TeamService extends AbstractService { +export default class TeamService extends AbstractService { constructor() { super({ create: '/teams', diff --git a/src/services/teamList.ts b/src/services/teamList.ts index d04af927..841b717a 100644 --- a/src/services/teamList.ts +++ b/src/services/teamList.ts @@ -1,9 +1,9 @@ import AbstractService from './abstractService' -import TeamListModel from '../models/teamList' +import TeamListModel, { type ITeamList } from '../models/teamList' import TeamModel from '../models/team' import {formatISO} from 'date-fns' -export default class TeamListService extends AbstractService { +export default class TeamListService extends AbstractService { constructor() { super({ create: '/lists/{listId}/teams', diff --git a/src/services/teamMember.ts b/src/services/teamMember.ts index 9927c82b..617180aa 100644 --- a/src/services/teamMember.ts +++ b/src/services/teamMember.ts @@ -1,8 +1,8 @@ import AbstractService from './abstractService' -import TeamMemberModel from '../models/teamMember' +import TeamMemberModel, { type ITeamMember } from '../models/teamMember' import {formatISO} from 'date-fns' -export default class TeamMemberService extends AbstractService { +export default class TeamMemberService extends AbstractService { constructor() { super({ create: '/teams/{teamId}/members', diff --git a/src/services/teamNamespace.ts b/src/services/teamNamespace.ts index 3ceb428c..bbde8516 100644 --- a/src/services/teamNamespace.ts +++ b/src/services/teamNamespace.ts @@ -1,9 +1,9 @@ import AbstractService from './abstractService' -import TeamNamespaceModel from '../models/teamNamespace' +import TeamNamespaceModel, { type ITeamNamespace } from '../models/teamNamespace' import TeamModel from '../models/team' import {formatISO} from 'date-fns' -export default class TeamNamespaceService extends AbstractService { +export default class TeamNamespaceService extends AbstractService { constructor() { super({ create: '/namespaces/{namespaceId}/teams', diff --git a/src/services/totp.ts b/src/services/totp.ts index 93367ab3..cd4a1a37 100644 --- a/src/services/totp.ts +++ b/src/services/totp.ts @@ -1,7 +1,7 @@ import AbstractService from './abstractService' -import TotpModel from '../models/totp' +import TotpModel, { type ITotp } from '@/models/totp' -export default class TotpService extends AbstractService { +export default class TotpService extends AbstractService { urlPrefix = '/user/settings/totp' constructor() { diff --git a/src/services/user.ts b/src/services/user.ts index d1b5cfb3..1db5ae9c 100644 --- a/src/services/user.ts +++ b/src/services/user.ts @@ -1,8 +1,8 @@ import AbstractService from './abstractService' -import UserModel from '../models/user' +import UserModel, { type IUser } from '../models/user' import {formatISO} from 'date-fns' -export default class UserService extends AbstractService { +export default class UserService extends AbstractService { constructor() { super({ getAll: '/users', diff --git a/src/services/userList.ts b/src/services/userList.ts index 7cdcda59..40b823b2 100644 --- a/src/services/userList.ts +++ b/src/services/userList.ts @@ -1,9 +1,9 @@ import AbstractService from './abstractService' -import UserListModel from '../models/userList' +import UserListModel, { type IUserList } from '../models/userList' import UserModel from '../models/user' import {formatISO} from 'date-fns' -export default class UserListService extends AbstractService { +export default class UserListService extends AbstractService { constructor() { super({ create: '/lists/{listId}/users', diff --git a/src/services/userNamespace.ts b/src/services/userNamespace.ts index 64473dff..b3ede973 100644 --- a/src/services/userNamespace.ts +++ b/src/services/userNamespace.ts @@ -1,9 +1,9 @@ import AbstractService from './abstractService' -import UserNamespaceModel from '../models/userNamespace' +import UserNamespaceModel, { type IUserNamespace } from '../models/userNamespace' import UserModel from '../models/user' import {formatISO} from 'date-fns' -export default class UserNamespaceService extends AbstractService { +export default class UserNamespaceService extends AbstractService { constructor() { super({ create: '/namespaces/{namespaceId}/users', diff --git a/src/services/userSettings.ts b/src/services/userSettings.ts index eb7aebf2..03497f6b 100644 --- a/src/services/userSettings.ts +++ b/src/services/userSettings.ts @@ -1,7 +1,8 @@ +import type { IUserSettings } from '@/models/userSettings' import AbstractService from './abstractService' -export default class UserSettingsService extends AbstractService { +export default class UserSettingsService extends AbstractService { constructor() { super({ update: '/user/settings/general',