@aneuhold/core-ts-db-lib 2.0.90 → 3.0.1
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.
- package/CHANGELOG.md +19 -1
- package/lib/documents/BaseDocument.d.ts +3 -4
- package/lib/documents/BaseDocument.d.ts.map +1 -1
- package/lib/documents/BaseDocument.js +2 -2
- package/lib/documents/BaseDocument.js.map +1 -1
- package/lib/documents/BaseDocument.ts +4 -4
- package/lib/documents/common/ApiKey.d.ts +2 -3
- package/lib/documents/common/ApiKey.d.ts.map +1 -1
- package/lib/documents/common/ApiKey.js +2 -2
- package/lib/documents/common/ApiKey.js.map +1 -1
- package/lib/documents/common/ApiKey.ts +4 -4
- package/lib/documents/common/User.d.ts +2 -2
- package/lib/documents/common/User.d.ts.map +1 -1
- package/lib/documents/common/User.js +0 -1
- package/lib/documents/common/User.js.map +1 -1
- package/lib/documents/common/User.ts +2 -2
- package/lib/documents/dashboard/NonogramKatanaItem.d.ts +3 -3
- package/lib/documents/dashboard/NonogramKatanaItem.d.ts.map +1 -1
- package/lib/documents/dashboard/NonogramKatanaItem.js +0 -1
- package/lib/documents/dashboard/NonogramKatanaItem.js.map +1 -1
- package/lib/documents/dashboard/NonogramKatanaItem.ts +3 -3
- package/lib/documents/dashboard/NonogramKatanaUpgrade.d.ts +3 -3
- package/lib/documents/dashboard/NonogramKatanaUpgrade.d.ts.map +1 -1
- package/lib/documents/dashboard/NonogramKatanaUpgrade.js +0 -1
- package/lib/documents/dashboard/NonogramKatanaUpgrade.js.map +1 -1
- package/lib/documents/dashboard/NonogramKatanaUpgrade.ts +3 -3
- package/lib/documents/dashboard/Task.d.ts +8 -8
- package/lib/documents/dashboard/Task.d.ts.map +1 -1
- package/lib/documents/dashboard/Task.js +3 -3
- package/lib/documents/dashboard/Task.js.map +1 -1
- package/lib/documents/dashboard/Task.ts +10 -10
- package/lib/documents/dashboard/UserConfig.d.ts +5 -5
- package/lib/documents/dashboard/UserConfig.d.ts.map +1 -1
- package/lib/documents/dashboard/UserConfig.js +3 -3
- package/lib/documents/dashboard/UserConfig.js.map +1 -1
- package/lib/documents/dashboard/UserConfig.ts +7 -6
- package/lib/embedded-types/dashboard/task/FilterSettings.d.ts +4 -3
- package/lib/embedded-types/dashboard/task/FilterSettings.d.ts.map +1 -1
- package/lib/embedded-types/dashboard/task/FilterSettings.js +1 -1
- package/lib/embedded-types/dashboard/task/FilterSettings.js.map +1 -1
- package/lib/embedded-types/dashboard/task/FilterSettings.ts +5 -4
- package/lib/embedded-types/dashboard/task/RecurrenceInfo.d.ts +2 -2
- package/lib/embedded-types/dashboard/task/RecurrenceInfo.d.ts.map +1 -1
- package/lib/embedded-types/dashboard/task/RecurrenceInfo.js +0 -1
- package/lib/embedded-types/dashboard/task/RecurrenceInfo.js.map +1 -1
- package/lib/embedded-types/dashboard/task/RecurrenceInfo.ts +2 -2
- package/lib/embedded-types/dashboard/task/SortSettings.d.ts +4 -3
- package/lib/embedded-types/dashboard/task/SortSettings.d.ts.map +1 -1
- package/lib/embedded-types/dashboard/task/SortSettings.js +1 -1
- package/lib/embedded-types/dashboard/task/SortSettings.js.map +1 -1
- package/lib/embedded-types/dashboard/task/SortSettings.ts +5 -4
- package/lib/schemas/required-refs/RequiredUserId.d.ts +2 -2
- package/lib/schemas/required-refs/RequiredUserId.d.ts.map +1 -1
- package/lib/schemas/required-refs/RequiredUserId.js +0 -1
- package/lib/schemas/required-refs/RequiredUserId.js.map +1 -1
- package/lib/schemas/required-refs/RequiredUserId.ts +2 -2
- package/lib/services/DocumentService.d.ts +3 -1
- package/lib/services/DocumentService.d.ts.map +1 -1
- package/lib/services/DocumentService.js +4 -0
- package/lib/services/DocumentService.js.map +1 -1
- package/lib/services/DocumentService.ts +7 -1
- package/lib/services/dashboard/Task/TaskFilterService.d.ts +4 -3
- package/lib/services/dashboard/Task/TaskFilterService.d.ts.map +1 -1
- package/lib/services/dashboard/Task/TaskFilterService.js +2 -2
- package/lib/services/dashboard/Task/TaskFilterService.js.map +1 -1
- package/lib/services/dashboard/Task/TaskFilterService.ts +8 -7
- package/lib/services/dashboard/Task/TaskService.d.ts +8 -8
- package/lib/services/dashboard/Task/TaskService.d.ts.map +1 -1
- package/lib/services/dashboard/Task/TaskService.js +8 -9
- package/lib/services/dashboard/Task/TaskService.js.map +1 -1
- package/lib/services/dashboard/Task/TaskService.ts +25 -28
- package/lib/services/dashboard/Task/TaskSortService.d.ts +3 -2
- package/lib/services/dashboard/Task/TaskSortService.d.ts.map +1 -1
- package/lib/services/dashboard/Task/TaskSortService.js.map +1 -1
- package/lib/services/dashboard/Task/TaskSortService.ts +11 -10
- package/package.json +11 -6
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,23 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
|
|
9
|
+
## 🔖 [3.0.1] (2025-11-26)
|
|
10
|
+
|
|
11
|
+
### 🏗️ Changed
|
|
12
|
+
- Refactored all dashboard task, filter, and sort types and services to use `UUID` instead of `string` for user and document IDs.
|
|
13
|
+
- Updated dependency: now requires `@aneuhold/local-npm-registry@^0.2.18`.
|
|
14
|
+
|
|
15
|
+
## 🔖 [3.0.0] (2025-11-23)
|
|
16
|
+
|
|
17
|
+
### 🏗️ Changed
|
|
18
|
+
|
|
19
|
+
_Breaking Change:_ Migrated all document, type, and service code from using `ObjectId` (from `bson`) to native `UUID` (from `crypto`), including all type signatures, constructors, and internal logic.
|
|
20
|
+
_Breaking Change:_ Updated all references, tests, and utility functions to use `UUID` instead of `ObjectId`.
|
|
21
|
+
Added `uuid` and `zod` as dependencies.
|
|
22
|
+
Updated build scripts and exports for compatibility.
|
|
23
|
+
Updated dependency: now requires `@aneuhold/core-ts-lib@^2.3.11`.
|
|
24
|
+
|
|
8
25
|
## 🔖 [2.0.90] (2025-11-09)
|
|
9
26
|
|
|
10
27
|
### 🏗️ Changed
|
|
@@ -90,7 +107,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
|
|
90
107
|
- Updated workflow permissions to allow repository write access
|
|
91
108
|
|
|
92
109
|
<!-- Link References -->
|
|
93
|
-
|
|
110
|
+
[3.0.1]: https://github.com/aneuhold/ts-libs/compare/core-ts-db-lib-v3.0.0...core-ts-db-lib-v3.0.1
|
|
111
|
+
[3.0.0]: https://github.com/aneuhold/ts-libs/compare/core-ts-db-lib-v2.0.90...core-ts-db-lib-v3.0.0
|
|
94
112
|
[2.0.90]: https://github.com/aneuhold/ts-libs/compare/core-ts-db-lib-v2.0.89...core-ts-db-lib-v2.0.90
|
|
95
113
|
[2.0.89]: https://github.com/aneuhold/ts-libs/compare/core-ts-db-lib-v2.0.88...core-ts-db-lib-v2.0.89
|
|
96
114
|
[2.0.88]: https://github.com/aneuhold/ts-libs/compare/core-ts-db-lib-v2.0.87...core-ts-db-lib-v2.0.88
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import { ObjectId } from 'bson';
|
|
1
|
+
import type { UUID } from 'crypto';
|
|
3
2
|
/**
|
|
4
3
|
* Base class for all document types stored in a document database.
|
|
5
4
|
*
|
|
6
5
|
* Provides the common `_id` field required by MongoDB and other
|
|
7
6
|
* document databases. All document types should extend this class.
|
|
8
7
|
*/
|
|
9
|
-
export default abstract class BaseDocument
|
|
8
|
+
export default abstract class BaseDocument {
|
|
10
9
|
/** The unique identifier for this document */
|
|
11
|
-
_id:
|
|
10
|
+
_id: UUID;
|
|
12
11
|
}
|
|
13
12
|
//# sourceMappingURL=BaseDocument.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseDocument.d.ts","sourceRoot":"","sources":["../../src/documents/BaseDocument.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"BaseDocument.d.ts","sourceRoot":"","sources":["../../src/documents/BaseDocument.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAGnC;;;;;GAKG;AACH,MAAM,CAAC,OAAO,CAAC,QAAQ,OAAO,YAAY;IACxC,8CAA8C;IAC9C,GAAG,EAAE,IAAI,CAAgC;CAC1C"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import DocumentService from '../services/DocumentService.js';
|
|
2
2
|
/**
|
|
3
3
|
* Base class for all document types stored in a document database.
|
|
4
4
|
*
|
|
@@ -7,6 +7,6 @@ import { ObjectId } from 'bson';
|
|
|
7
7
|
*/
|
|
8
8
|
export default class BaseDocument {
|
|
9
9
|
/** The unique identifier for this document */
|
|
10
|
-
_id =
|
|
10
|
+
_id = DocumentService.generateID();
|
|
11
11
|
}
|
|
12
12
|
//# sourceMappingURL=BaseDocument.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseDocument.js","sourceRoot":"","sources":["../../src/documents/BaseDocument.ts"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"BaseDocument.js","sourceRoot":"","sources":["../../src/documents/BaseDocument.ts"],"names":[],"mappings":"AACA,OAAO,eAAe,MAAM,gCAAgC,CAAC;AAE7D;;;;;GAKG;AACH,MAAM,CAAC,OAAO,OAAgB,YAAY;IACxC,8CAA8C;IAC9C,GAAG,GAAS,eAAe,CAAC,UAAU,EAAE,CAAC;CAC1C"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import
|
|
1
|
+
import type { UUID } from 'crypto';
|
|
2
|
+
import DocumentService from '../services/DocumentService.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Base class for all document types stored in a document database.
|
|
@@ -7,7 +7,7 @@ import { ObjectId } from 'bson';
|
|
|
7
7
|
* Provides the common `_id` field required by MongoDB and other
|
|
8
8
|
* document databases. All document types should extend this class.
|
|
9
9
|
*/
|
|
10
|
-
export default abstract class BaseDocument
|
|
10
|
+
export default abstract class BaseDocument {
|
|
11
11
|
/** The unique identifier for this document */
|
|
12
|
-
_id:
|
|
12
|
+
_id: UUID = DocumentService.generateID();
|
|
13
13
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { ObjectId } from 'bson';
|
|
2
1
|
import type { UUID } from 'crypto';
|
|
3
2
|
import RequiredUserId from '../../schemas/required-refs/RequiredUserId.js';
|
|
4
3
|
import type { DocumentValidator } from '../../schemas/validators/DocumentValidator.js';
|
|
@@ -22,12 +21,12 @@ export default class ApiKey extends BaseDocument implements RequiredUserId {
|
|
|
22
21
|
/**
|
|
23
22
|
* The user ID that this key is for. This field is indexed in the database.
|
|
24
23
|
*/
|
|
25
|
-
userId:
|
|
24
|
+
userId: UUID;
|
|
26
25
|
/**
|
|
27
26
|
* Constructs a new {@link ApiKey} for the provided user.
|
|
28
27
|
*
|
|
29
28
|
* @param userId - The ID of the user.
|
|
30
29
|
*/
|
|
31
|
-
constructor(userId:
|
|
30
|
+
constructor(userId: UUID);
|
|
32
31
|
}
|
|
33
32
|
//# sourceMappingURL=ApiKey.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApiKey.d.ts","sourceRoot":"","sources":["../../../src/documents/common/ApiKey.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"ApiKey.d.ts","sourceRoot":"","sources":["../../../src/documents/common/ApiKey.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAEnC,OAAO,cAAc,MAAM,+CAA+C,CAAC;AAC3E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,+CAA+C,CAAC;AAGvF,OAAO,YAAY,MAAM,oBAAoB,CAAC;AAE9C;;;;;GAKG;AACH,eAAO,MAAM,cAAc,EAAE,iBAAiB,CAAC,MAAM,CAQpD,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,OAAO,OAAO,MAAO,SAAQ,YAAa,YAAW,cAAc;IACxE;;OAEG;IACH,GAAG,EAAE,IAAI,CAAuB;IAEhC;;OAEG;IACH,MAAM,EAAE,IAAI,CAAC;IAEb;;;;OAIG;gBACS,MAAM,EAAE,IAAI;CAIzB"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ObjectId } from 'bson';
|
|
2
1
|
import crypto from 'crypto';
|
|
3
2
|
import RequiredUserId from '../../schemas/required-refs/RequiredUserId.js';
|
|
4
3
|
import Validate from '../../schemas/validators/ValidateUtil.js';
|
|
4
|
+
import DocumentService from '../../services/DocumentService.js';
|
|
5
5
|
import BaseDocument from '../BaseDocument.js';
|
|
6
6
|
/**
|
|
7
7
|
* Validates the provided {@link ApiKey} instance.
|
|
@@ -11,7 +11,7 @@ import BaseDocument from '../BaseDocument.js';
|
|
|
11
11
|
*/
|
|
12
12
|
export const validateApiKey = (apiKey) => {
|
|
13
13
|
const errors = [];
|
|
14
|
-
const exampleApiKey = new ApiKey(
|
|
14
|
+
const exampleApiKey = new ApiKey(DocumentService.generateID());
|
|
15
15
|
const validate = new Validate(apiKey, errors);
|
|
16
16
|
validate.string('key', exampleApiKey.key);
|
|
17
17
|
return { updatedDoc: apiKey, errors };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApiKey.js","sourceRoot":"","sources":["../../../src/documents/common/ApiKey.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ApiKey.js","sourceRoot":"","sources":["../../../src/documents/common/ApiKey.ts"],"names":[],"mappings":"AACA,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,OAAO,cAAc,MAAM,+CAA+C,CAAC;AAE3E,OAAO,QAAQ,MAAM,0CAA0C,CAAC;AAChE,OAAO,eAAe,MAAM,mCAAmC,CAAC;AAChE,OAAO,YAAY,MAAM,oBAAoB,CAAC;AAE9C;;;;;GAKG;AACH,MAAM,CAAC,MAAM,cAAc,GAA8B,CAAC,MAAc,EAAE,EAAE;IAC1E,MAAM,MAAM,GAAa,EAAE,CAAC;IAC5B,MAAM,aAAa,GAAG,IAAI,MAAM,CAAC,eAAe,CAAC,UAAU,EAAE,CAAC,CAAC;IAC/D,MAAM,QAAQ,GAAG,IAAI,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAE9C,QAAQ,CAAC,MAAM,CAAC,KAAK,EAAE,aAAa,CAAC,GAAG,CAAC,CAAC;IAE1C,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC;AACxC,CAAC,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,OAAO,OAAO,MAAO,SAAQ,YAAY;IAC9C;;OAEG;IACH,GAAG,GAAS,MAAM,CAAC,UAAU,EAAE,CAAC;IAEhC;;OAEG;IACH,MAAM,CAAO;IAEb;;;;OAIG;IACH,YAAY,MAAY;QACtB,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;CACF"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { ObjectId } from 'bson';
|
|
2
1
|
import type { UUID } from 'crypto';
|
|
3
2
|
import crypto from 'crypto';
|
|
4
3
|
import RequiredUserId from '../../schemas/required-refs/RequiredUserId.js';
|
|
5
4
|
import type { DocumentValidator } from '../../schemas/validators/DocumentValidator.js';
|
|
6
5
|
import Validate from '../../schemas/validators/ValidateUtil.js';
|
|
6
|
+
import DocumentService from '../../services/DocumentService.js';
|
|
7
7
|
import BaseDocument from '../BaseDocument.js';
|
|
8
8
|
|
|
9
9
|
/**
|
|
@@ -14,7 +14,7 @@ import BaseDocument from '../BaseDocument.js';
|
|
|
14
14
|
*/
|
|
15
15
|
export const validateApiKey: DocumentValidator<ApiKey> = (apiKey: ApiKey) => {
|
|
16
16
|
const errors: string[] = [];
|
|
17
|
-
const exampleApiKey = new ApiKey(
|
|
17
|
+
const exampleApiKey = new ApiKey(DocumentService.generateID());
|
|
18
18
|
const validate = new Validate(apiKey, errors);
|
|
19
19
|
|
|
20
20
|
validate.string('key', exampleApiKey.key);
|
|
@@ -35,14 +35,14 @@ export default class ApiKey extends BaseDocument implements RequiredUserId {
|
|
|
35
35
|
/**
|
|
36
36
|
* The user ID that this key is for. This field is indexed in the database.
|
|
37
37
|
*/
|
|
38
|
-
userId:
|
|
38
|
+
userId: UUID;
|
|
39
39
|
|
|
40
40
|
/**
|
|
41
41
|
* Constructs a new {@link ApiKey} for the provided user.
|
|
42
42
|
*
|
|
43
43
|
* @param userId - The ID of the user.
|
|
44
44
|
*/
|
|
45
|
-
constructor(userId:
|
|
45
|
+
constructor(userId: UUID) {
|
|
46
46
|
super();
|
|
47
47
|
this.userId = userId;
|
|
48
48
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { UUID } from 'crypto';
|
|
2
2
|
import type { DocumentValidator } from '../../schemas/validators/DocumentValidator.js';
|
|
3
3
|
import BaseDocument from '../BaseDocument.js';
|
|
4
4
|
/**
|
|
@@ -6,7 +6,7 @@ import BaseDocument from '../BaseDocument.js';
|
|
|
6
6
|
* information.
|
|
7
7
|
*/
|
|
8
8
|
export type UserCTO = {
|
|
9
|
-
_id:
|
|
9
|
+
_id: UUID;
|
|
10
10
|
userName: string;
|
|
11
11
|
};
|
|
12
12
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"User.d.ts","sourceRoot":"","sources":["../../../src/documents/common/User.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"User.d.ts","sourceRoot":"","sources":["../../../src/documents/common/User.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AACnC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,+CAA+C,CAAC;AAEvF,OAAO,YAAY,MAAM,oBAAoB,CAAC;AAE9C;;;GAGG;AACH,MAAM,MAAM,OAAO,GAAG;IACpB,GAAG,EAAE,IAAI,CAAC;IACV,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,YAAY,EAAE,iBAAiB,CAAC,IAAI,CAehD,CAAC;AAEF;;;;GAIG;AACH,MAAM,CAAC,OAAO,OAAO,IAAK,SAAQ,YAAY;IAC5C,QAAQ,EAAE,MAAM,CAAC;IAEjB,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,IAAI,EAAE;QACJ,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;KACnB,CAAM;IAEP,aAAa;;MAEX;IAEF;;;;OAIG;gBACS,QAAQ,EAAE,MAAM;CAI7B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"User.js","sourceRoot":"","sources":["../../../src/documents/common/User.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"User.js","sourceRoot":"","sources":["../../../src/documents/common/User.ts"],"names":[],"mappings":"AAEA,OAAO,QAAQ,MAAM,0CAA0C,CAAC;AAChE,OAAO,YAAY,MAAM,oBAAoB,CAAC;AAW9C;;;;;GAKG;AACH,MAAM,CAAC,MAAM,YAAY,GAA4B,CAAC,IAAI,EAAE,EAAE;IAC5D,MAAM,MAAM,GAAa,EAAE,CAAC;IAC5B,MAAM,QAAQ,GAAG,IAAI,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IAC5C,MAAM,WAAW,GAAG,IAAI,IAAI,CAAC,SAAS,CAAC,CAAC;IAExC,QAAQ,CAAC,MAAM,CAAC,UAAU,EAAE,iBAAiB,CAAC,CAAC;IAC/C,QAAQ,CAAC,cAAc,CAAC,UAAU,CAAC,CAAC;IACpC,QAAQ,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC;IACjC,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,IAAI,CAAC,CAAC;IAC1C,QAAQ,CAAC,cAAc,CAAC,eAAe,CAAC,CAAC;IACzC,QAAQ,CAAC,cAAc,CAAC,eAAe,CAAC,CAAC;IACzC,QAAQ,CAAC,MAAM,CAAC,eAAe,EAAE,WAAW,CAAC,aAAa,CAAC,CAAC;IAC5D,QAAQ,CAAC,OAAO,CAAC,yBAAyB,EAAE,WAAW,CAAC,aAAa,CAAC,SAAS,CAAC,CAAC;IAEjF,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;AACtC,CAAC,CAAC;AAEF;;;;GAIG;AACH,MAAM,CAAC,OAAO,OAAO,IAAK,SAAQ,YAAY;IAC5C,QAAQ,CAAS;IAEjB,KAAK,CAAU;IAEf,IAAI,GAGA,EAAE,CAAC;IAEP,aAAa,GAAG;QACd,SAAS,EAAE,IAAI;KAChB,CAAC;IAEF;;;;OAIG;IACH,YAAY,QAAgB;QAC1B,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC3B,CAAC;CACF"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { UUID } from 'crypto';
|
|
2
2
|
import type { DocumentValidator } from '../../schemas/validators/DocumentValidator.js';
|
|
3
3
|
import Validate from '../../schemas/validators/ValidateUtil.js';
|
|
4
4
|
import BaseDocument from '../BaseDocument.js';
|
|
@@ -8,7 +8,7 @@ import BaseDocument from '../BaseDocument.js';
|
|
|
8
8
|
* information.
|
|
9
9
|
*/
|
|
10
10
|
export type UserCTO = {
|
|
11
|
-
_id:
|
|
11
|
+
_id: UUID;
|
|
12
12
|
userName: string;
|
|
13
13
|
};
|
|
14
14
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { UUID } from 'crypto';
|
|
2
2
|
import NonogramKatanaItemName from '../../embedded-types/dashboard/nonogramKatanaItem/ItemName.js';
|
|
3
3
|
import RequiredUserId from '../../schemas/required-refs/RequiredUserId.js';
|
|
4
4
|
import type { DocumentValidator } from '../../schemas/validators/DocumentValidator.js';
|
|
@@ -19,7 +19,7 @@ export default class NonogramKatanaItem extends BaseDocumentWithType implements
|
|
|
19
19
|
/**
|
|
20
20
|
* The owner of this Nonogram Katana item.
|
|
21
21
|
*/
|
|
22
|
-
userId:
|
|
22
|
+
userId: UUID;
|
|
23
23
|
itemName: NonogramKatanaItemName;
|
|
24
24
|
currentAmount: number;
|
|
25
25
|
storageCap?: number;
|
|
@@ -29,6 +29,6 @@ export default class NonogramKatanaItem extends BaseDocumentWithType implements
|
|
|
29
29
|
* Priority, where the higher the number, the higher up the list it is.
|
|
30
30
|
*/
|
|
31
31
|
priority: number;
|
|
32
|
-
constructor(ownerId:
|
|
32
|
+
constructor(ownerId: UUID, itemName: NonogramKatanaItemName);
|
|
33
33
|
}
|
|
34
34
|
//# sourceMappingURL=NonogramKatanaItem.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NonogramKatanaItem.d.ts","sourceRoot":"","sources":["../../../src/documents/dashboard/NonogramKatanaItem.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"NonogramKatanaItem.d.ts","sourceRoot":"","sources":["../../../src/documents/dashboard/NonogramKatanaItem.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AACnC,OAAO,sBAAsB,MAAM,+DAA+D,CAAC;AACnG,OAAO,cAAc,MAAM,+CAA+C,CAAC;AAC3E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,+CAA+C,CAAC;AACvF,OAAO,oBAAoB,MAAM,4BAA4B,CAAC;AAE9D;;;;;GAKG;AACH,eAAO,MAAM,0BAA0B,EAAE,iBAAiB,CAAC,kBAAkB,CAQ5E,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,OAAO,OAAO,kBAAmB,SAAQ,oBAAqB,YAAW,cAAc;IAC5F,MAAM,CAAC,OAAO,SAAwB;IAEtC,OAAO,SAA8B;IAErC;;OAEG;IACH,MAAM,EAAE,IAAI,CAAC;IAEb,QAAQ,EAAE,sBAAsB,CAAC;IAEjC,aAAa,EAAE,MAAM,CAAK;IAE1B,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAK;gBAET,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,sBAAsB;CAK5D"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { ObjectId } from 'bson';
|
|
2
1
|
import NonogramKatanaItemName from '../../embedded-types/dashboard/nonogramKatanaItem/ItemName.js';
|
|
3
2
|
import RequiredUserId from '../../schemas/required-refs/RequiredUserId.js';
|
|
4
3
|
import BaseDocumentWithType from '../BaseDocumentWithType.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NonogramKatanaItem.js","sourceRoot":"","sources":["../../../src/documents/dashboard/NonogramKatanaItem.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"NonogramKatanaItem.js","sourceRoot":"","sources":["../../../src/documents/dashboard/NonogramKatanaItem.ts"],"names":[],"mappings":"AACA,OAAO,sBAAsB,MAAM,+DAA+D,CAAC;AACnG,OAAO,cAAc,MAAM,+CAA+C,CAAC;AAE3E,OAAO,oBAAoB,MAAM,4BAA4B,CAAC;AAE9D;;;;;GAKG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAA0C,CAC/E,IAAwB,EACxB,EAAE;IACF,MAAM,MAAM,GAAa,EAAE,CAAC;IAE5B,+BAA+B;IAE/B,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;AACtC,CAAC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,OAAO,OAAO,kBAAmB,SAAQ,oBAAoB;IAClE,MAAM,CAAC,OAAO,GAAG,oBAAoB,CAAC;IAEtC,OAAO,GAAG,kBAAkB,CAAC,OAAO,CAAC;IAErC;;OAEG;IACH,MAAM,CAAO;IAEb,QAAQ,CAAyB;IAEjC,aAAa,GAAW,CAAC,CAAC;IAE1B,UAAU,CAAU;IAEpB,UAAU,CAAU;IAEpB,UAAU,CAAU;IAEpB;;OAEG;IACH,QAAQ,GAAW,CAAC,CAAC;IAErB,YAAY,OAAa,EAAE,QAAgC;QACzD,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,MAAM,GAAG,OAAO,CAAC;QACtB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC3B,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { UUID } from 'crypto';
|
|
2
2
|
import NonogramKatanaItemName from '../../embedded-types/dashboard/nonogramKatanaItem/ItemName.js';
|
|
3
3
|
import RequiredUserId from '../../schemas/required-refs/RequiredUserId.js';
|
|
4
4
|
import type { DocumentValidator } from '../../schemas/validators/DocumentValidator.js';
|
|
@@ -31,7 +31,7 @@ export default class NonogramKatanaItem extends BaseDocumentWithType implements
|
|
|
31
31
|
/**
|
|
32
32
|
* The owner of this Nonogram Katana item.
|
|
33
33
|
*/
|
|
34
|
-
userId:
|
|
34
|
+
userId: UUID;
|
|
35
35
|
|
|
36
36
|
itemName: NonogramKatanaItemName;
|
|
37
37
|
|
|
@@ -48,7 +48,7 @@ export default class NonogramKatanaItem extends BaseDocumentWithType implements
|
|
|
48
48
|
*/
|
|
49
49
|
priority: number = 0;
|
|
50
50
|
|
|
51
|
-
constructor(ownerId:
|
|
51
|
+
constructor(ownerId: UUID, itemName: NonogramKatanaItemName) {
|
|
52
52
|
super();
|
|
53
53
|
this.userId = ownerId;
|
|
54
54
|
this.itemName = itemName;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { UUID } from 'crypto';
|
|
2
2
|
import NonogramKatanaItemName from '../../embedded-types/dashboard/nonogramKatanaItem/ItemName.js';
|
|
3
3
|
import NonogramKatanaUpgradeName from '../../embedded-types/dashboard/nonogramKatanaUpgrade/UpgradeName.js';
|
|
4
4
|
import RequiredUserId from '../../schemas/required-refs/RequiredUserId.js';
|
|
@@ -27,7 +27,7 @@ export default class NonogramKatanaUpgrade extends BaseDocumentWithType implemen
|
|
|
27
27
|
/**
|
|
28
28
|
* The owner of this Nonogram Katana upgrade.
|
|
29
29
|
*/
|
|
30
|
-
userId:
|
|
30
|
+
userId: UUID;
|
|
31
31
|
upgradeName: NonogramKatanaUpgradeName;
|
|
32
32
|
completed: boolean;
|
|
33
33
|
currentItemAmounts: {
|
|
@@ -43,6 +43,6 @@ export default class NonogramKatanaUpgrade extends BaseDocumentWithType implemen
|
|
|
43
43
|
* @param ownerId - The ID of the owner of this upgrade.
|
|
44
44
|
* @param upgradeName - The name of the upgrade.
|
|
45
45
|
*/
|
|
46
|
-
constructor(ownerId:
|
|
46
|
+
constructor(ownerId: UUID, upgradeName: NonogramKatanaUpgradeName);
|
|
47
47
|
}
|
|
48
48
|
//# sourceMappingURL=NonogramKatanaUpgrade.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NonogramKatanaUpgrade.d.ts","sourceRoot":"","sources":["../../../src/documents/dashboard/NonogramKatanaUpgrade.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"NonogramKatanaUpgrade.d.ts","sourceRoot":"","sources":["../../../src/documents/dashboard/NonogramKatanaUpgrade.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AACnC,OAAO,sBAAsB,MAAM,+DAA+D,CAAC;AACnG,OAAO,yBAAyB,MAAM,qEAAqE,CAAC;AAC5G,OAAO,cAAc,MAAM,+CAA+C,CAAC;AAC3E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,+CAA+C,CAAC;AACvF,OAAO,oBAAoB,MAAM,4BAA4B,CAAC;AAE9D;;;;;GAKG;AACH,eAAO,MAAM,6BAA6B,EAAE,iBAAiB,CAAC,qBAAqB,CAQlF,CAAC;AAEF;;;;;;;;;GASG;AACH,MAAM,CAAC,OAAO,OAAO,qBAAsB,SAAQ,oBAAqB,YAAW,cAAc;IAC/F,MAAM,CAAC,OAAO,SAA2B;IAEzC,OAAO,SAAiC;IAExC;;OAEG;IACH,MAAM,EAAE,IAAI,CAAC;IAEb,WAAW,EAAE,yBAAyB,CAAC;IAEvC,SAAS,EAAE,OAAO,CAAS;IAE3B,kBAAkB,EAAE;SAAG,GAAG,IAAI,sBAAsB,CAAC,CAAC,EAAE,MAAM;KAAE,CAAM;IAEtE;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAK;IAErB;;;;;OAKG;gBACS,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,yBAAyB;CAKlE"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { ObjectId } from 'bson';
|
|
2
1
|
import NonogramKatanaItemName from '../../embedded-types/dashboard/nonogramKatanaItem/ItemName.js';
|
|
3
2
|
import NonogramKatanaUpgradeName from '../../embedded-types/dashboard/nonogramKatanaUpgrade/UpgradeName.js';
|
|
4
3
|
import RequiredUserId from '../../schemas/required-refs/RequiredUserId.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NonogramKatanaUpgrade.js","sourceRoot":"","sources":["../../../src/documents/dashboard/NonogramKatanaUpgrade.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"NonogramKatanaUpgrade.js","sourceRoot":"","sources":["../../../src/documents/dashboard/NonogramKatanaUpgrade.ts"],"names":[],"mappings":"AACA,OAAO,sBAAsB,MAAM,+DAA+D,CAAC;AACnG,OAAO,yBAAyB,MAAM,qEAAqE,CAAC;AAC5G,OAAO,cAAc,MAAM,+CAA+C,CAAC;AAE3E,OAAO,oBAAoB,MAAM,4BAA4B,CAAC;AAE9D;;;;;GAKG;AACH,MAAM,CAAC,MAAM,6BAA6B,GAA6C,CACrF,OAA8B,EAC9B,EAAE;IACF,MAAM,MAAM,GAAa,EAAE,CAAC;IAE5B,+BAA+B;IAE/B,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC;AACzC,CAAC,CAAC;AAEF;;;;;;;;;GASG;AACH,MAAM,CAAC,OAAO,OAAO,qBAAsB,SAAQ,oBAAoB;IACrE,MAAM,CAAC,OAAO,GAAG,uBAAuB,CAAC;IAEzC,OAAO,GAAG,qBAAqB,CAAC,OAAO,CAAC;IAExC;;OAEG;IACH,MAAM,CAAO;IAEb,WAAW,CAA4B;IAEvC,SAAS,GAAY,KAAK,CAAC;IAE3B,kBAAkB,GAAiD,EAAE,CAAC;IAEtE;;OAEG;IACH,QAAQ,GAAW,CAAC,CAAC;IAErB;;;;;OAKG;IACH,YAAY,OAAa,EAAE,WAAsC;QAC/D,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,MAAM,GAAG,OAAO,CAAC;QACtB,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;IACjC,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { UUID } from 'crypto';
|
|
2
2
|
import NonogramKatanaItemName from '../../embedded-types/dashboard/nonogramKatanaItem/ItemName.js';
|
|
3
3
|
import NonogramKatanaUpgradeName from '../../embedded-types/dashboard/nonogramKatanaUpgrade/UpgradeName.js';
|
|
4
4
|
import RequiredUserId from '../../schemas/required-refs/RequiredUserId.js';
|
|
@@ -39,7 +39,7 @@ export default class NonogramKatanaUpgrade extends BaseDocumentWithType implemen
|
|
|
39
39
|
/**
|
|
40
40
|
* The owner of this Nonogram Katana upgrade.
|
|
41
41
|
*/
|
|
42
|
-
userId:
|
|
42
|
+
userId: UUID;
|
|
43
43
|
|
|
44
44
|
upgradeName: NonogramKatanaUpgradeName;
|
|
45
45
|
|
|
@@ -58,7 +58,7 @@ export default class NonogramKatanaUpgrade extends BaseDocumentWithType implemen
|
|
|
58
58
|
* @param ownerId - The ID of the owner of this upgrade.
|
|
59
59
|
* @param upgradeName - The name of the upgrade.
|
|
60
60
|
*/
|
|
61
|
-
constructor(ownerId:
|
|
61
|
+
constructor(ownerId: UUID, upgradeName: NonogramKatanaUpgradeName) {
|
|
62
62
|
super();
|
|
63
63
|
this.userId = ownerId;
|
|
64
64
|
this.upgradeName = upgradeName;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { UUID } from 'crypto';
|
|
2
2
|
import type { DashboardTaskFilterSettings } from '../../embedded-types/dashboard/task/FilterSettings.js';
|
|
3
3
|
import type { ParentRecurringTaskInfo, RecurrenceInfo } from '../../embedded-types/dashboard/task/RecurrenceInfo.js';
|
|
4
4
|
import type { DashboardTaskSortSettings } from '../../embedded-types/dashboard/task/SortSettings.js';
|
|
5
5
|
import RequiredUserId from '../../schemas/required-refs/RequiredUserId.js';
|
|
6
6
|
import type { DocumentValidator } from '../../schemas/validators/DocumentValidator.js';
|
|
7
|
-
import type
|
|
7
|
+
import { type DocumentMap } from '../../services/DocumentService.js';
|
|
8
8
|
import BaseDocumentWithType from '../BaseDocumentWithType.js';
|
|
9
9
|
/**
|
|
10
10
|
* Validates a {@link DashboardTask} object.
|
|
@@ -44,7 +44,7 @@ export default class DashboardTask extends BaseDocumentWithType implements Requi
|
|
|
44
44
|
/**
|
|
45
45
|
* The owner of this task.
|
|
46
46
|
*/
|
|
47
|
-
userId:
|
|
47
|
+
userId: UUID;
|
|
48
48
|
/**
|
|
49
49
|
* What happens when:
|
|
50
50
|
*
|
|
@@ -57,11 +57,11 @@ export default class DashboardTask extends BaseDocumentWithType implements Requi
|
|
|
57
57
|
* collaborator back it will return to normal. But the frontend needs to
|
|
58
58
|
* double check for this when displaying things.
|
|
59
59
|
*/
|
|
60
|
-
sharedWith:
|
|
60
|
+
sharedWith: UUID[];
|
|
61
61
|
/**
|
|
62
62
|
* The user ID that this task is assigned to.
|
|
63
63
|
*/
|
|
64
|
-
assignedTo?:
|
|
64
|
+
assignedTo?: UUID;
|
|
65
65
|
/**
|
|
66
66
|
* The recurrence info for this task if there is any.
|
|
67
67
|
*/
|
|
@@ -81,7 +81,7 @@ export default class DashboardTask extends BaseDocumentWithType implements Requi
|
|
|
81
81
|
/**
|
|
82
82
|
* The ID of the parent task if there is one.
|
|
83
83
|
*/
|
|
84
|
-
parentTaskId?:
|
|
84
|
+
parentTaskId?: UUID;
|
|
85
85
|
/**
|
|
86
86
|
* The description of the task. This is purposefully optional in case the
|
|
87
87
|
* user wants to just use the title. This also helps the frontend
|
|
@@ -103,7 +103,7 @@ export default class DashboardTask extends BaseDocumentWithType implements Requi
|
|
|
103
103
|
* User-assigned tags for this task.
|
|
104
104
|
*/
|
|
105
105
|
tags: {
|
|
106
|
-
[userId:
|
|
106
|
+
[userId: UUID]: string[] | undefined;
|
|
107
107
|
};
|
|
108
108
|
/**
|
|
109
109
|
* System-assigned category for this task. This should be used to determine
|
|
@@ -120,6 +120,6 @@ export default class DashboardTask extends BaseDocumentWithType implements Requi
|
|
|
120
120
|
* each user.
|
|
121
121
|
*/
|
|
122
122
|
sortSettings: DashboardTaskSortSettings;
|
|
123
|
-
constructor(ownerId:
|
|
123
|
+
constructor(ownerId: UUID);
|
|
124
124
|
}
|
|
125
125
|
//# sourceMappingURL=Task.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Task.d.ts","sourceRoot":"","sources":["../../../src/documents/dashboard/Task.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"Task.d.ts","sourceRoot":"","sources":["../../../src/documents/dashboard/Task.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AACnC,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,uDAAuD,CAAC;AACzG,OAAO,KAAK,EACV,uB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AI,GAAG,MAAM,EAAE,GAAG,SAAS,CAAA;KAAE,CAAM;IAEpD;;;OAGG;IACH,QAAQ,EAAE,MAAM,CAAa;IAE7B;;;OAGG;IACH,cAAc,EAAE,2BAA2B,CAAM;IAEjD;;;OAGG;IACH,YAAY,EAAE,yBAAyB,CAAM;gBAEjC,OAAO,EAAE,IAAI;CAO1B"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ObjectId } from 'bson';
|
|
2
1
|
import { validateRecurrenceInfo } from '../../embedded-types/dashboard/task/RecurrenceInfo.js';
|
|
3
2
|
import RequiredUserId from '../../schemas/required-refs/RequiredUserId.js';
|
|
4
3
|
import Validate from '../../schemas/validators/ValidateUtil.js';
|
|
4
|
+
import DocumentService, {} from '../../services/DocumentService.js';
|
|
5
5
|
import BaseDocumentWithType from '../BaseDocumentWithType.js';
|
|
6
6
|
/**
|
|
7
7
|
* Validates a {@link DashboardTask} object.
|
|
@@ -12,7 +12,7 @@ import BaseDocumentWithType from '../BaseDocumentWithType.js';
|
|
|
12
12
|
export const validateDashboardTask = (task) => {
|
|
13
13
|
const errors = [];
|
|
14
14
|
const validate = new Validate(task, errors);
|
|
15
|
-
const exampleTask = new DashboardTask(
|
|
15
|
+
const exampleTask = new DashboardTask(DocumentService.generateID());
|
|
16
16
|
validate.string('title', exampleTask.title);
|
|
17
17
|
validate.boolean('completed', exampleTask.completed);
|
|
18
18
|
validate.optionalString('description');
|
|
@@ -135,7 +135,7 @@ export default class DashboardTask extends BaseDocumentWithType {
|
|
|
135
135
|
super();
|
|
136
136
|
this.userId = ownerId;
|
|
137
137
|
this.tags = {
|
|
138
|
-
[ownerId
|
|
138
|
+
[ownerId]: []
|
|
139
139
|
};
|
|
140
140
|
}
|
|
141
141
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Task.js","sourceRoot":"","sources":["../../../src/documents/dashboard/Task.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Task.js","sourceRo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AO,CAAC;QACtB,IAAI,CAAC,IAAI,GAAG;YACV,CAAC,OAAO,CAAC,EAAE,EAAE;SACd,CAAC;IACJ,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { UUID } from 'crypto';
|
|
2
2
|
import type { DashboardTaskFilterSettings } from '../../embedded-types/dashboard/task/FilterSettings.js';
|
|
3
3
|
import type {
|
|
4
4
|
ParentRecurringTaskInfo,
|
|
@@ -9,7 +9,7 @@ import type { DashboardTaskSortSettings } from '../../embedded-types/dashboard/t
|
|
|
9
9
|
import RequiredUserId from '../../schemas/required-refs/RequiredUserId.js';
|
|
10
10
|
import type { DocumentValidator } from '../../schemas/validators/DocumentValidator.js';
|
|
11
11
|
import Validate from '../../schemas/validators/ValidateUtil.js';
|
|
12
|
-
import
|
|
12
|
+
import DocumentService, { type DocumentMap } from '../../services/DocumentService.js';
|
|
13
13
|
import BaseDocumentWithType from '../BaseDocumentWithType.js';
|
|
14
14
|
|
|
15
15
|
/**
|
|
@@ -21,7 +21,7 @@ import BaseDocumentWithType from '../BaseDocumentWithType.js';
|
|
|
21
21
|
export const validateDashboardTask: DocumentValidator<DashboardTask> = (task: DashboardTask) => {
|
|
22
22
|
const errors: string[] = [];
|
|
23
23
|
const validate = new Validate(task, errors);
|
|
24
|
-
const exampleTask = new DashboardTask(
|
|
24
|
+
const exampleTask = new DashboardTask(DocumentService.generateID());
|
|
25
25
|
|
|
26
26
|
validate.string('title', exampleTask.title);
|
|
27
27
|
validate.boolean('completed', exampleTask.completed);
|
|
@@ -76,7 +76,7 @@ export default class DashboardTask extends BaseDocumentWithType implements Requi
|
|
|
76
76
|
/**
|
|
77
77
|
* The owner of this task.
|
|
78
78
|
*/
|
|
79
|
-
userId:
|
|
79
|
+
userId: UUID;
|
|
80
80
|
|
|
81
81
|
/**
|
|
82
82
|
* What happens when:
|
|
@@ -90,12 +90,12 @@ export default class DashboardTask extends BaseDocumentWithType implements Requi
|
|
|
90
90
|
* collaborator back it will return to normal. But the frontend needs to
|
|
91
91
|
* double check for this when displaying things.
|
|
92
92
|
*/
|
|
93
|
-
sharedWith:
|
|
93
|
+
sharedWith: UUID[] = [];
|
|
94
94
|
|
|
95
95
|
/**
|
|
96
96
|
* The user ID that this task is assigned to.
|
|
97
97
|
*/
|
|
98
|
-
assignedTo?:
|
|
98
|
+
assignedTo?: UUID;
|
|
99
99
|
|
|
100
100
|
/**
|
|
101
101
|
* The recurrence info for this task if there is any.
|
|
@@ -120,7 +120,7 @@ export default class DashboardTask extends BaseDocumentWithType implements Requi
|
|
|
120
120
|
/**
|
|
121
121
|
* The ID of the parent task if there is one.
|
|
122
122
|
*/
|
|
123
|
-
parentTaskId?:
|
|
123
|
+
parentTaskId?: UUID;
|
|
124
124
|
|
|
125
125
|
/**
|
|
126
126
|
* The description of the task. This is purposefully optional in case the
|
|
@@ -147,7 +147,7 @@ export default class DashboardTask extends BaseDocumentWithType implements Requi
|
|
|
147
147
|
/**
|
|
148
148
|
* User-assigned tags for this task.
|
|
149
149
|
*/
|
|
150
|
-
tags: { [userId:
|
|
150
|
+
tags: { [userId: UUID]: string[] | undefined } = {};
|
|
151
151
|
|
|
152
152
|
/**
|
|
153
153
|
* System-assigned category for this task. This should be used to determine
|
|
@@ -167,11 +167,11 @@ export default class DashboardTask extends BaseDocumentWithType implements Requi
|
|
|
167
167
|
*/
|
|
168
168
|
sortSettings: DashboardTaskSortSettings = {};
|
|
169
169
|
|
|
170
|
-
constructor(ownerId:
|
|
170
|
+
constructor(ownerId: UUID) {
|
|
171
171
|
super();
|
|
172
172
|
this.userId = ownerId;
|
|
173
173
|
this.tags = {
|
|
174
|
-
[ownerId
|
|
174
|
+
[ownerId]: []
|
|
175
175
|
};
|
|
176
176
|
}
|
|
177
177
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { UUID } from 'crypto';
|
|
2
2
|
import type { DashboardTaskListGlobalFilterSettings } from '../../embedded-types/dashboard/task/FilterSettings.js';
|
|
3
3
|
import type { DashboardTaskListGlobalSortSettings } from '../../embedded-types/dashboard/task/SortSettings.js';
|
|
4
4
|
import type { DashboardTagSettings } from '../../embedded-types/dashboard/userConfig/Tags.js';
|
|
@@ -21,12 +21,12 @@ export default class DashboardUserConfig extends BaseDocumentWithType implements
|
|
|
21
21
|
/**
|
|
22
22
|
* The owner of this config.
|
|
23
23
|
*/
|
|
24
|
-
userId:
|
|
24
|
+
userId: UUID;
|
|
25
25
|
/**
|
|
26
26
|
* The different users that the owner of this config is collaborating with
|
|
27
27
|
* on the dashboard.
|
|
28
28
|
*/
|
|
29
|
-
collaborators:
|
|
29
|
+
collaborators: UUID[];
|
|
30
30
|
/**
|
|
31
31
|
* Whether or not to enable dev mode for the user.
|
|
32
32
|
*/
|
|
@@ -68,8 +68,8 @@ export default class DashboardUserConfig extends BaseDocumentWithType implements
|
|
|
68
68
|
/**
|
|
69
69
|
* Creates an instance of {@link DashboardUserConfig}.
|
|
70
70
|
*
|
|
71
|
-
* @param ownerId - The {@link
|
|
71
|
+
* @param ownerId - The {@link UUID} of the owner of this config.
|
|
72
72
|
*/
|
|
73
|
-
constructor(ownerId:
|
|
73
|
+
constructor(ownerId: UUID);
|
|
74
74
|
}
|
|
75
75
|
//# sourceMappingURL=UserConfig.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UserConfig.d.ts","sourceRoot":"","sources":["../../../src/documents/dashboard/UserConfig.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"UserConfig.d.ts","sourceRoot":"","sources":["../../../src/documents/dashboard/UserConfig.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AACnC,OAAO,KAAK,EAAE,qCAAqC,EAAE,MAAM,uDAAuD,CAAC;AAEnH,OAAO,KAAK,EAAE,mCAAmC,EAAE,MAAM,qDAAqD,CAAC;AAE/G,OAAO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