@kkkarsss/lr-models 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (90) hide show
  1. package/LICENSE +21 -0
  2. package/dist/api/event/request.d.ts +4 -0
  3. package/dist/api/event/request.js +2 -0
  4. package/dist/api/event/response.d.ts +2 -0
  5. package/dist/api/event/response.js +2 -0
  6. package/dist/api/index.d.ts +18 -0
  7. package/dist/api/index.js +34 -0
  8. package/dist/api/note/request.d.ts +19 -0
  9. package/dist/api/note/request.js +2 -0
  10. package/dist/api/note/response.d.ts +6 -0
  11. package/dist/api/note/response.js +2 -0
  12. package/dist/api/project/request.d.ts +15 -0
  13. package/dist/api/project/request.js +2 -0
  14. package/dist/api/project/response.d.ts +6 -0
  15. package/dist/api/project/response.js +2 -0
  16. package/dist/api/routine/request.d.ts +15 -0
  17. package/dist/api/routine/request.js +2 -0
  18. package/dist/api/routine/response.d.ts +5 -0
  19. package/dist/api/routine/response.js +2 -0
  20. package/dist/api/tag/request.d.ts +2 -0
  21. package/dist/api/tag/request.js +2 -0
  22. package/dist/api/tag/response.d.ts +2 -0
  23. package/dist/api/tag/response.js +2 -0
  24. package/dist/api/task/request.d.ts +30 -0
  25. package/dist/api/task/request.js +2 -0
  26. package/dist/api/task/response.d.ts +9 -0
  27. package/dist/api/task/response.js +2 -0
  28. package/dist/api/user/request.d.ts +1 -0
  29. package/dist/api/user/request.js +2 -0
  30. package/dist/api/user/response.d.ts +2 -0
  31. package/dist/api/user/response.js +2 -0
  32. package/dist/api/user-day/request.d.ts +11 -0
  33. package/dist/api/user-day/request.js +2 -0
  34. package/dist/api/user-day/response.d.ts +9 -0
  35. package/dist/api/user-day/response.js +2 -0
  36. package/dist/api/user-stats/request.d.ts +4 -0
  37. package/dist/api/user-stats/request.js +2 -0
  38. package/dist/api/user-stats/response.d.ts +2 -0
  39. package/dist/api/user-stats/response.js +2 -0
  40. package/dist/index.d.ts +2 -0
  41. package/dist/index.js +18 -0
  42. package/dist/models/day-item/day-item.d.ts +8 -0
  43. package/dist/models/day-item/day-item.js +2 -0
  44. package/dist/models/day-item/index.d.ts +1 -0
  45. package/dist/models/day-item/index.js +17 -0
  46. package/dist/models/event/event.d.ts +14 -0
  47. package/dist/models/event/event.js +2 -0
  48. package/dist/models/event/index.d.ts +1 -0
  49. package/dist/models/event/index.js +17 -0
  50. package/dist/models/guid.d.ts +1 -0
  51. package/dist/models/guid.js +2 -0
  52. package/dist/models/index.d.ts +12 -0
  53. package/dist/models/index.js +28 -0
  54. package/dist/models/note/index.d.ts +1 -0
  55. package/dist/models/note/index.js +17 -0
  56. package/dist/models/note/note.d.ts +19 -0
  57. package/dist/models/note/note.js +2 -0
  58. package/dist/models/project/index.d.ts +1 -0
  59. package/dist/models/project/index.js +17 -0
  60. package/dist/models/project/project.d.ts +18 -0
  61. package/dist/models/project/project.js +2 -0
  62. package/dist/models/routine/index.d.ts +1 -0
  63. package/dist/models/routine/index.js +17 -0
  64. package/dist/models/routine/routine.d.ts +8 -0
  65. package/dist/models/routine/routine.js +2 -0
  66. package/dist/models/routine-entry/index.d.ts +1 -0
  67. package/dist/models/routine-entry/index.js +17 -0
  68. package/dist/models/routine-entry/routine-entry.d.ts +7 -0
  69. package/dist/models/routine-entry/routine-entry.js +2 -0
  70. package/dist/models/tag/index.d.ts +1 -0
  71. package/dist/models/tag/index.js +17 -0
  72. package/dist/models/tag/tag.d.ts +16 -0
  73. package/dist/models/tag/tag.js +2 -0
  74. package/dist/models/task/index.d.ts +1 -0
  75. package/dist/models/task/index.js +17 -0
  76. package/dist/models/task/task.d.ts +26 -0
  77. package/dist/models/task/task.js +2 -0
  78. package/dist/models/user/index.d.ts +1 -0
  79. package/dist/models/user/index.js +17 -0
  80. package/dist/models/user/user.d.ts +9 -0
  81. package/dist/models/user/user.js +2 -0
  82. package/dist/models/user-day/index.d.ts +1 -0
  83. package/dist/models/user-day/index.js +17 -0
  84. package/dist/models/user-day/user-day.d.ts +13 -0
  85. package/dist/models/user-day/user-day.js +9 -0
  86. package/dist/models/user-stats/index.d.ts +1 -0
  87. package/dist/models/user-stats/index.js +17 -0
  88. package/dist/models/user-stats/user-stats.d.ts +11 -0
  89. package/dist/models/user-stats/user-stats.js +2 -0
  90. package/package.json +28 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Konstantine Fedotovskih
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,4 @@
1
+ import type { TUser } from '../../models';
2
+ export type TGetEventsByUserIdRequestParams = {
3
+ userId: TUser['id'];
4
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ import type { TEvent } from '../../models';
2
+ export type TGetEventsByUserIdResponse = TEvent[];
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,18 @@
1
+ export * from './task/request';
2
+ export * from './task/response';
3
+ export * from './project/request';
4
+ export * from './project/response';
5
+ export * from './note/request';
6
+ export * from './note/response';
7
+ export * from './user/request';
8
+ export * from './user/response';
9
+ export * from './event/request';
10
+ export * from './event/response';
11
+ export * from './tag/request';
12
+ export * from './tag/response';
13
+ export * from './user-stats/request';
14
+ export * from './user-stats/response';
15
+ export * from './routine/request';
16
+ export * from './routine/response';
17
+ export * from './user-day/request';
18
+ export * from './user-day/response';
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./task/request"), exports);
18
+ __exportStar(require("./task/response"), exports);
19
+ __exportStar(require("./project/request"), exports);
20
+ __exportStar(require("./project/response"), exports);
21
+ __exportStar(require("./note/request"), exports);
22
+ __exportStar(require("./note/response"), exports);
23
+ __exportStar(require("./user/request"), exports);
24
+ __exportStar(require("./user/response"), exports);
25
+ __exportStar(require("./event/request"), exports);
26
+ __exportStar(require("./event/response"), exports);
27
+ __exportStar(require("./tag/request"), exports);
28
+ __exportStar(require("./tag/response"), exports);
29
+ __exportStar(require("./user-stats/request"), exports);
30
+ __exportStar(require("./user-stats/response"), exports);
31
+ __exportStar(require("./routine/request"), exports);
32
+ __exportStar(require("./routine/response"), exports);
33
+ __exportStar(require("./user-day/request"), exports);
34
+ __exportStar(require("./user-day/response"), exports);
@@ -0,0 +1,19 @@
1
+ import type { TNote, TUser } from '../../models';
2
+ export type TGetNoteByIdRequestParams = {
3
+ noteId: TNote['id'];
4
+ };
5
+ export type TGetNotesByUserIdRequestParams = {
6
+ userId: TUser['id'];
7
+ };
8
+ export type TCreateNoteRequestBody = Omit<TNote, 'id' | 'createdAt' | 'updatedAt' | 'archived' | 'archivedMeta'>;
9
+ export type TUpdateNoteRequestParams = {
10
+ noteId: TNote['id'];
11
+ };
12
+ export type TUpdateNoteRequestBody = Partial<TNote>;
13
+ export type TArchiveNoteRequestParams = {
14
+ noteId: TNote['id'];
15
+ };
16
+ export type TArchiveNoteRequestBody = {
17
+ archiveType: 'success' | 'not-needed';
18
+ archivedBy: TUser['id'];
19
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,6 @@
1
+ import type { TNote } from '../../models';
2
+ export type TGetNoteByIdResponse = TNote;
3
+ export type TGetNotesByUserIdResponse = TNote[];
4
+ export type TCreateNoteResponse = TNote;
5
+ export type TUpdateNoteResponse = TNote;
6
+ export type TArchiveNoteResponse = TNote;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,15 @@
1
+ import type { TProject, TUser } from '../../models';
2
+ export type TGetProjectByIdRequestParams = {
3
+ projectId: TProject['id'];
4
+ };
5
+ export type TGetProjectsByUserIdRequestParams = {
6
+ userId: TUser['id'];
7
+ };
8
+ export type TGetAllProjectsByUserIdRequestParams = {
9
+ userId: TUser['id'];
10
+ };
11
+ export type TCreateProjectRequestBody = Omit<TProject, 'id' | 'subprojects' | 'tasksTotalCount' | 'tasksActiveCount' | 'tasksCompletedCount' | 'tags'>;
12
+ export type TUpdateProjectRequestParams = {
13
+ projectId: TProject['id'];
14
+ };
15
+ export type TUpdateProjectRequestBody = Partial<TProject>;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,6 @@
1
+ import type { TProject } from '../../models';
2
+ export type TGetProjectByIdResponse = TProject;
3
+ export type TGetProjectsByUserIdResponse = TProject[];
4
+ export type TGetAllProjectsByUserIdResponse = TProject[];
5
+ export type TCreateProjectResponse = TProject;
6
+ export type TUpdateProjectResponse = TProject;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,15 @@
1
+ import type { TRoutine, TUser } from '../../models';
2
+ export type TGetRoutinesByUserIdRequestParams = {
3
+ userId: TUser['id'];
4
+ };
5
+ export type TGetRoutinesByUserIdRequestQuery = {
6
+ date?: string;
7
+ };
8
+ export type TCreateRoutineRequestBody = Omit<TRoutine, 'id'>;
9
+ export type TUpdateRoutineRequestParams = {
10
+ id: TRoutine['id'];
11
+ };
12
+ export type TUpdateRoutineRequestBody = Partial<TRoutine>;
13
+ export type TDeleteRoutineRequestParams = {
14
+ id: TRoutine['id'];
15
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,5 @@
1
+ import type { TRoutine } from '../../models';
2
+ export type TGetRoutinesByUserIdResponse = TRoutine[];
3
+ export type TCreateRoutineResponse = TRoutine;
4
+ export type TUpdateRoutineResponse = TRoutine;
5
+ export type TDeleteRoutineResponse = void;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ import type { TTag } from '../../models';
2
+ export type TCreateTagRequestBody = Omit<TTag, 'id'>;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ import type { TTag } from '../../models';
2
+ export type TCreateTagResponse = TTag;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,30 @@
1
+ import type { TProject, TTask, TUser } from '../../models';
2
+ export type TGetTaskByIdRequestParams = {
3
+ id: TTask['id'];
4
+ };
5
+ export type TGetTasksByProjectIdRequestParams = {
6
+ projectId: TProject['id'];
7
+ };
8
+ export type TGetTasksByUserIdRequestParams = {
9
+ userId: TUser['id'];
10
+ };
11
+ export type TTaskFilter = {
12
+ projectId?: TProject['id'];
13
+ dueDate?: string;
14
+ };
15
+ export type TGetTasksByUserIdRequestQuery = TTaskFilter;
16
+ export type TUpdateTaskStatusRequestBody = {
17
+ taskId: TTask['id'];
18
+ status: TTask['status'];
19
+ };
20
+ export type TCreateTaskRequestBody = Omit<TTask, 'id' | 'code' | 'noteIds' | 'completedDate'>;
21
+ export type TUpdateTaskRequestParams = {
22
+ taskId: TTask['id'];
23
+ };
24
+ export type TUpdateTaskRequestBody = Partial<TTask>;
25
+ export type TTakeToWorkRequestParams = {
26
+ taskId: TTask['id'];
27
+ };
28
+ export type TDeleteTaskRequestParams = {
29
+ taskId: TTask['id'];
30
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,9 @@
1
+ import type { TTask } from '../../models';
2
+ export type TGetTaskByIdResponse = TTask;
3
+ export type TGetTasksByProjectIdResponse = TTask[];
4
+ export type TGetTasksByUserIdResponse = TTask[];
5
+ export type TCompleteTaskResponse = TTask[];
6
+ export type TCreateTaskResponse = TTask;
7
+ export type TUpdateTaskResponse = TTask;
8
+ export type TTakeToWorkResponse = TTask;
9
+ export type TDeleteTaskResponse = void;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1 @@
1
+ export type TGetCurrentUserRequestParams = Record<string, never>;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ import type { TUser } from '../../models';
2
+ export type TGetUserResponse = TUser;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,11 @@
1
+ import type { TUser, TUserDay } from '../../models';
2
+ export type TGetUserDayRequestParams = {
3
+ userId: TUser['id'];
4
+ };
5
+ export type TGetUserDayRequestQuery = {
6
+ date: string;
7
+ };
8
+ export type TUpdateUserDayRequestParams = {
9
+ id: TUserDay['id'];
10
+ };
11
+ export type TUpdateUserDayRequestBody = Partial<Omit<TUserDay, 'id' | 'ownerId' | 'date'>>;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,9 @@
1
+ import type { TDayItem, TRoutine, TRoutineEntry, TTask, TUserDay } from '../../models';
2
+ export type TUserDayWithItems = TUserDay & {
3
+ items: (TDayItem & {
4
+ data?: TTask | TRoutine;
5
+ entry?: TRoutineEntry;
6
+ })[];
7
+ };
8
+ export type TGetUserDayResponse = TUserDayWithItems;
9
+ export type TUpdateUserDayResponse = TUserDay;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,4 @@
1
+ import { TGUID } from '../../models';
2
+ export type TGetUserStatsRequest = {
3
+ userId: TGUID;
4
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ import { TUserStats } from '../../models';
2
+ export type TGetUserStatsResponse = TUserStats;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ export * from './models';
2
+ export * from './api';
package/dist/index.js ADDED
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./models"), exports);
18
+ __exportStar(require("./api"), exports);
@@ -0,0 +1,8 @@
1
+ import { TGUID } from '../guid';
2
+ export type TDayItem = {
3
+ id: TGUID;
4
+ userDayId: TGUID;
5
+ type: 'task' | 'routine';
6
+ itemId: TGUID;
7
+ order: number;
8
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1 @@
1
+ export * from './day-item';
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./day-item"), exports);
@@ -0,0 +1,14 @@
1
+ import { TGUID } from '../guid';
2
+ export type TEventType = 'create-task' | 'complete-task' | 'complete-task-overdue' | 'delete-task' | 'mark-task-as-not-completed' | 'create-project' | 'archive-project' | 'unarchive-project' | 'reduce-priority' | 'increase-priority' | 'create-note' | 'success-archive-note' | 'not-needed-archive-note' | 'take-to-work';
3
+ export type TEventEntityType = 'task' | 'project' | 'note' | 'person' | 'system';
4
+ export type TEvent = {
5
+ id: TGUID;
6
+ type: TEventType;
7
+ date: Date;
8
+ authorId: TGUID;
9
+ projectId?: TGUID;
10
+ taskId?: TGUID;
11
+ noteId?: TGUID;
12
+ entityType?: TEventEntityType;
13
+ meta: Record<string, any>;
14
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1 @@
1
+ export * from './event';
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./event"), exports);
@@ -0,0 +1 @@
1
+ export type TGUID = string;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,12 @@
1
+ export * from './user';
2
+ export * from './project';
3
+ export * from './task';
4
+ export * from './tag';
5
+ export * from './event';
6
+ export * from './guid';
7
+ export * from './note';
8
+ export * from './user-stats';
9
+ export * from './user-day';
10
+ export * from './routine';
11
+ export * from './routine-entry';
12
+ export * from './day-item';
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./user"), exports);
18
+ __exportStar(require("./project"), exports);
19
+ __exportStar(require("./task"), exports);
20
+ __exportStar(require("./tag"), exports);
21
+ __exportStar(require("./event"), exports);
22
+ __exportStar(require("./guid"), exports);
23
+ __exportStar(require("./note"), exports);
24
+ __exportStar(require("./user-stats"), exports);
25
+ __exportStar(require("./user-day"), exports);
26
+ __exportStar(require("./routine"), exports);
27
+ __exportStar(require("./routine-entry"), exports);
28
+ __exportStar(require("./day-item"), exports);
@@ -0,0 +1 @@
1
+ export * from './note';
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./note"), exports);
@@ -0,0 +1,19 @@
1
+ import { TTag } from '../tag';
2
+ export type TNote = {
3
+ id: string;
4
+ title: string;
5
+ content: string;
6
+ createdAt: Date;
7
+ updatedAt: Date;
8
+ authorId: string;
9
+ ownerId: string;
10
+ projectId?: string;
11
+ taskId?: string;
12
+ archived: boolean;
13
+ archivedMeta: {
14
+ archivedAt: Date;
15
+ archivedBy: string;
16
+ type?: 'success' | 'not-needed';
17
+ };
18
+ tags?: TTag[];
19
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1 @@
1
+ export * from './project';
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./project"), exports);
@@ -0,0 +1,18 @@
1
+ import { TGUID } from '../guid';
2
+ import type { TTag } from '../tag';
3
+ export type TProject = {
4
+ id: TGUID;
5
+ title: string;
6
+ authorId: TGUID;
7
+ ownerId: TGUID;
8
+ description?: string;
9
+ createdAt: Date;
10
+ code: string;
11
+ icon: string;
12
+ color: string;
13
+ fullTitle: string;
14
+ subprojects?: TProject[];
15
+ parentId?: TGUID | null;
16
+ tags?: TTag[];
17
+ noteIds?: TGUID[];
18
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1 @@
1
+ export * from './routine';
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./routine"), exports);
@@ -0,0 +1,8 @@
1
+ import { TGUID } from '../guid';
2
+ export type TRoutine = {
3
+ id: TGUID;
4
+ ownerId: TGUID;
5
+ active: boolean;
6
+ title: string;
7
+ description?: string;
8
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1 @@
1
+ export * from './routine-entry';
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./routine-entry"), exports);
@@ -0,0 +1,7 @@
1
+ import { TGUID } from '../guid';
2
+ export type TRoutineEntry = {
3
+ id: TGUID;
4
+ routineId: TGUID;
5
+ userDayId: TGUID;
6
+ completedAt: Date;
7
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1 @@
1
+ export * from './tag';
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./tag"), exports);
@@ -0,0 +1,16 @@
1
+ import { TGUID } from '../guid';
2
+ export type TSystemTag = {
3
+ type: 'system';
4
+ color: string;
5
+ id: TGUID;
6
+ title: string;
7
+ };
8
+ export type TClientTag = {
9
+ type: 'client';
10
+ id: TGUID;
11
+ title: string;
12
+ color: string;
13
+ authorId: TGUID;
14
+ ownerId: TGUID;
15
+ };
16
+ export type TTag = TSystemTag | TClientTag;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1 @@
1
+ export * from './task';
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./task"), exports);
@@ -0,0 +1,26 @@
1
+ import { TGUID } from '../guid';
2
+ import type { TTag } from '../tag';
3
+ export type TTaskStatus = 'new' | 'inWork' | 'completed' | 'archived';
4
+ export type TTask = {
5
+ id: TGUID;
6
+ title: string;
7
+ projectId: TGUID;
8
+ parentProjectId?: TGUID | null;
9
+ status: TTaskStatus;
10
+ authorId: TGUID;
11
+ ownerId: TGUID;
12
+ description?: string;
13
+ createdAt: Date;
14
+ code: string;
15
+ priority: 1 | 2 | 3 | 4 | 5;
16
+ deadline?: Date;
17
+ dueDate?: Date;
18
+ parentId?: TGUID | null;
19
+ subtasks?: TTask[];
20
+ tags?: TTag[];
21
+ takenToWorkDate?: Date;
22
+ completedDate?: Date;
23
+ noteIds?: TGUID[];
24
+ repeatDays?: number;
25
+ estimatedTime: number;
26
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1 @@
1
+ export * from './user';
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./user"), exports);
@@ -0,0 +1,9 @@
1
+ import { TGUID } from '../guid';
2
+ export type TUser = {
3
+ id: TGUID;
4
+ name: string;
5
+ email: string;
6
+ phone: string;
7
+ createdAt: Date;
8
+ code: string;
9
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1 @@
1
+ export * from './user-day';
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./user-day"), exports);
@@ -0,0 +1,13 @@
1
+ import { TGUID } from '../guid';
2
+ export declare enum EUserDayFocus {
3
+ WORK = "work",
4
+ REST = "rest",
5
+ SELF_IMPROVEMENT = "self-improvement"
6
+ }
7
+ export type TUserDay = {
8
+ id: TGUID;
9
+ ownerId: TGUID;
10
+ date: Date;
11
+ focus?: EUserDayFocus;
12
+ noteIds?: TGUID[];
13
+ };
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.EUserDayFocus = void 0;
4
+ var EUserDayFocus;
5
+ (function (EUserDayFocus) {
6
+ EUserDayFocus["WORK"] = "work";
7
+ EUserDayFocus["REST"] = "rest";
8
+ EUserDayFocus["SELF_IMPROVEMENT"] = "self-improvement";
9
+ })(EUserDayFocus || (exports.EUserDayFocus = EUserDayFocus = {}));
@@ -0,0 +1 @@
1
+ export * from './user-stats';
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./user-stats"), exports);
@@ -0,0 +1,11 @@
1
+ import { TGUID } from '../guid';
2
+ export type TUserStats = {
3
+ id: TGUID;
4
+ userId: TGUID;
5
+ completedTasksCount: number;
6
+ overdueTasksCount: number;
7
+ createdTasksCount: number;
8
+ mostUsefulTagId?: TGUID | null;
9
+ rawMeta?: string | null;
10
+ computedAt: Date;
11
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/package.json ADDED
@@ -0,0 +1,28 @@
1
+ {
2
+ "name": "@kkkarsss/lr-models",
3
+ "version": "1.0.0",
4
+ "description": "Common models for life-reader project",
5
+ "main": "dist/index.js",
6
+ "types": "dist/index.d.ts",
7
+ "files": [
8
+ "dist"
9
+ ],
10
+ "scripts": {
11
+ "build": "tsc",
12
+ "prepare": "npm run build"
13
+ },
14
+ "keywords": [],
15
+ "author": "",
16
+ "license": "MIT",
17
+ "devDependencies": {
18
+ "@eslint/js": "^9.39.2",
19
+ "typescript": "5.9.3",
20
+ "eslint": "^9.39.1",
21
+ "eslint-config-prettier": "^10.1.8",
22
+ "eslint-import-resolver-typescript": "^4.4.4",
23
+ "eslint-plugin-import": "^2.32.0",
24
+ "globals": "^16.5.0",
25
+ "prettier": "^3.8.1",
26
+ "typescript-eslint": "^8.53.1"
27
+ }
28
+ }