@tstdl/base 0.92.86 → 0.92.87
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/ai/ai.service.d.ts +3 -3
- package/ai/ai.service.js +24 -11
- package/ai/types.d.ts +4 -3
- package/api/server/gateway.js +1 -1
- package/authentication/server/authentication-ancillary.service.d.ts +6 -4
- package/authentication/server/authentication-ancillary.service.js +5 -5
- package/context/context.d.ts +1 -9
- package/context/context.js +8 -5
- package/document-management/api/document-management.api.d.ts +48 -16
- package/document-management/models/document-category.model.d.ts +1 -1
- package/document-management/models/document-category.model.js +2 -0
- package/document-management/models/document-collection-document.model.js +7 -3
- package/document-management/models/document-property-value.model.d.ts +13 -14
- package/document-management/models/document-property-value.model.js +60 -27
- package/document-management/models/document-property.model.d.ts +2 -0
- package/document-management/models/document-property.model.js +4 -1
- package/document-management/models/document-request-assignment-task-collection.model.d.ts +7 -0
- package/document-management/models/{document-index.model.js → document-request-assignment-task-collection.model.js} +16 -16
- package/document-management/models/document-request-assignment-task.model.d.ts +14 -0
- package/document-management/models/document-request-assignment-task.model.js +72 -0
- package/document-management/models/document-request-collection.model.d.ts +1 -0
- package/document-management/models/document-request-collection.model.js +7 -3
- package/document-management/models/document-request-file.model.d.ts +6 -1
- package/document-management/models/document-request-file.model.js +27 -2
- package/document-management/models/document-request.model.d.ts +1 -0
- package/document-management/models/document-requests-template.js +2 -0
- package/document-management/models/document-type-property.model.js +7 -3
- package/document-management/models/document-type.model.d.ts +1 -1
- package/document-management/models/document-type.model.js +7 -3
- package/document-management/models/document.model.d.ts +4 -1
- package/document-management/models/document.model.js +19 -4
- package/document-management/models/index.d.ts +2 -0
- package/document-management/models/index.js +2 -0
- package/document-management/models/service-models/document.service-model.d.ts +35 -16
- package/document-management/models/service-models/document.service-model.js +11 -6
- package/document-management/models/service-models/document.view-model.d.ts +1 -1
- package/document-management/models/service-models/document.view-model.js +2 -2
- package/document-management/server/drizzle/{0000_useful_overlord.sql → 0000_cool_victor_mancha.sql} +97 -41
- package/document-management/server/drizzle/meta/0000_snapshot.json +514 -126
- package/document-management/server/drizzle/meta/_journal.json +2 -2
- package/document-management/server/module.d.ts +2 -1
- package/document-management/server/module.js +3 -1
- package/document-management/server/schemas.d.ts +14 -11
- package/document-management/server/schemas.js +13 -10
- package/document-management/server/services/document-management-ancillary.service.d.ts +4 -0
- package/document-management/server/services/document-management-ancillary.service.js +13 -0
- package/document-management/server/services/document-management.service.d.ts +63 -28
- package/document-management/server/services/document-management.service.js +507 -108
- package/document-management/server/services/index.d.ts +1 -0
- package/document-management/server/services/index.js +1 -0
- package/eslint.config.js +1 -0
- package/examples/document-management/main.d.ts +5 -0
- package/examples/document-management/main.js +20 -2
- package/file/index.d.ts +1 -0
- package/file/index.js +1 -0
- package/file/temporary-file.d.ts +17 -0
- package/file/temporary-file.js +49 -0
- package/http/server/http-server-response.d.ts +2 -0
- package/http/server/http-server-response.js +13 -0
- package/injector/index.d.ts +1 -0
- package/injector/index.js +1 -0
- package/injector/injector.js +19 -7
- package/injector/interfaces.d.ts +1 -1
- package/injector/interfaces.js +1 -1
- package/injector/resolution.d.ts +15 -0
- package/injector/resolution.js +6 -0
- package/logger/console/logger.d.ts +1 -1
- package/logger/logger.d.ts +1 -1
- package/object-storage/object-storage.d.ts +5 -7
- package/object-storage/s3/s3.object-storage.d.ts +0 -1
- package/object-storage/s3/s3.object-storage.js +0 -3
- package/orm/{server/data-types → data-types}/numeric-date.js +2 -3
- package/orm/decorators.d.ts +13 -4
- package/orm/decorators.js +13 -7
- package/orm/entity.js +3 -7
- package/orm/index.d.ts +1 -0
- package/orm/index.js +1 -0
- package/orm/server/drizzle/schema-converter.js +48 -19
- package/orm/server/repository.d.ts +5 -4
- package/orm/server/repository.js +33 -22
- package/orm/server/sqls.d.ts +9 -1
- package/orm/server/sqls.js +13 -0
- package/orm/types.d.ts +3 -3
- package/orm/utils.d.ts +3 -0
- package/orm/utils.js +6 -0
- package/package.json +13 -11
- package/pdf/pdf.service.d.ts +0 -1
- package/pdf/pdf.service.js +1 -95
- package/pdf/utils.d.ts +3 -1
- package/pdf/utils.js +129 -4
- package/promise/lazy-promise.d.ts +3 -3
- package/queue/postgres/module.d.ts +1 -1
- package/queue/postgres/queue.js +10 -12
- package/queue/queue.d.ts +14 -0
- package/queue/queue.js +43 -0
- package/utils/date-time.d.ts +4 -2
- package/utils/date-time.js +10 -3
- package/utils/format-error.js +0 -1
- package/utils/object/lazy-property.js +0 -1
- package/utils/try-ignore.d.ts +9 -2
- package/utils/try-ignore.js +30 -6
- package/document-management/models/document-index.model.d.ts +0 -7
- /package/orm/{server/data-types → data-types}/bytea.d.ts +0 -0
- /package/orm/{server/data-types → data-types}/bytea.js +0 -0
- /package/orm/{server/data-types → data-types}/index.d.ts +0 -0
- /package/orm/{server/data-types → data-types}/index.js +0 -0
- /package/orm/{server/data-types → data-types}/numeric-date.d.ts +0 -0
- /package/orm/{server/data-types → data-types}/timestamp.d.ts +0 -0
- /package/orm/{server/data-types → data-types}/timestamp.js +0 -0
|
@@ -5,9 +5,11 @@ export declare const DocumentPropertyDataType: {
|
|
|
5
5
|
readonly Integer: "integer";
|
|
6
6
|
readonly Decimal: "decimal";
|
|
7
7
|
readonly Boolean: "boolean";
|
|
8
|
+
readonly Date: "date";
|
|
8
9
|
};
|
|
9
10
|
export type DocumentPropertyDataType = EnumType<typeof DocumentPropertyDataType>;
|
|
10
11
|
export declare class DocumentProperty extends Entity {
|
|
12
|
+
static readonly entityName: 'DocumentProperty';
|
|
11
13
|
label: string;
|
|
12
14
|
dataType: DocumentPropertyDataType;
|
|
13
15
|
}
|
|
@@ -9,12 +9,14 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
9
9
|
};
|
|
10
10
|
import { defineEnum } from '../../enumeration/enumeration.js';
|
|
11
11
|
import { Entity } from '../../orm/entity.js';
|
|
12
|
+
import { Unique } from '../../orm/types.js';
|
|
12
13
|
import { Enumeration, StringProperty } from '../../schema/index.js';
|
|
13
14
|
export const DocumentPropertyDataType = defineEnum('DocumentPropertyDataType', {
|
|
14
15
|
Text: 'text',
|
|
15
16
|
Integer: 'integer',
|
|
16
17
|
Decimal: 'decimal',
|
|
17
|
-
Boolean: 'boolean'
|
|
18
|
+
Boolean: 'boolean',
|
|
19
|
+
Date: 'date'
|
|
18
20
|
});
|
|
19
21
|
export class DocumentProperty extends Entity {
|
|
20
22
|
label;
|
|
@@ -22,6 +24,7 @@ export class DocumentProperty extends Entity {
|
|
|
22
24
|
}
|
|
23
25
|
__decorate([
|
|
24
26
|
StringProperty(),
|
|
27
|
+
Unique(),
|
|
25
28
|
__metadata("design:type", String)
|
|
26
29
|
], DocumentProperty.prototype, "label", void 0);
|
|
27
30
|
__decorate([
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Entity } from '../../orm/entity.js';
|
|
2
|
+
import { Uuid } from '../../orm/types.js';
|
|
3
|
+
export declare class DocumentRequestAssignmentTaskCollection extends Entity {
|
|
4
|
+
static readonly entityName: 'DocumentRequestAssignmentTaskCollection';
|
|
5
|
+
requestAssignmentTaskId: Uuid;
|
|
6
|
+
collectionId: Uuid;
|
|
7
|
+
}
|
|
@@ -9,24 +9,24 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
9
9
|
};
|
|
10
10
|
import { References } from '../../orm/decorators.js';
|
|
11
11
|
import { Entity } from '../../orm/entity.js';
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}
|
|
12
|
+
import { Unique, Uuid } from '../../orm/types.js';
|
|
13
|
+
import { DocumentCollection } from './document-collection.model.js';
|
|
14
|
+
import { DocumentRequestAssignmentTask } from './document-request-assignment-task.model.js';
|
|
15
|
+
let DocumentRequestAssignmentTaskCollection = class DocumentRequestAssignmentTaskCollection extends Entity {
|
|
16
|
+
requestAssignmentTaskId;
|
|
17
|
+
collectionId;
|
|
18
|
+
};
|
|
20
19
|
__decorate([
|
|
21
20
|
Uuid(),
|
|
22
|
-
References(() =>
|
|
21
|
+
References(() => DocumentRequestAssignmentTask),
|
|
23
22
|
__metadata("design:type", String)
|
|
24
|
-
],
|
|
23
|
+
], DocumentRequestAssignmentTaskCollection.prototype, "requestAssignmentTaskId", void 0);
|
|
25
24
|
__decorate([
|
|
26
|
-
|
|
25
|
+
Uuid(),
|
|
26
|
+
References(() => DocumentCollection),
|
|
27
27
|
__metadata("design:type", String)
|
|
28
|
-
],
|
|
29
|
-
__decorate([
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
28
|
+
], DocumentRequestAssignmentTaskCollection.prototype, "collectionId", void 0);
|
|
29
|
+
DocumentRequestAssignmentTaskCollection = __decorate([
|
|
30
|
+
Unique(['requestAssignmentTaskId', 'collectionId'], { naming: 'abbreviated-table' })
|
|
31
|
+
], DocumentRequestAssignmentTaskCollection);
|
|
32
|
+
export { DocumentRequestAssignmentTaskCollection };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Entity } from '../../orm/entity.js';
|
|
2
|
+
import { NumericDate, Uuid } from '../../orm/types.js';
|
|
3
|
+
export declare class DocumentRequestAssignmentTask extends Entity {
|
|
4
|
+
fileId: Uuid;
|
|
5
|
+
assignedRequestFileId: Uuid | null;
|
|
6
|
+
typeId: Uuid | null;
|
|
7
|
+
title: string | null;
|
|
8
|
+
subtitle: string | null;
|
|
9
|
+
pages: number | null;
|
|
10
|
+
date: NumericDate | null;
|
|
11
|
+
summary: string | null;
|
|
12
|
+
tags: string[] | null;
|
|
13
|
+
assignmentTries: number;
|
|
14
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
+
};
|
|
10
|
+
import { References } from '../../orm/decorators.js';
|
|
11
|
+
import { Entity } from '../../orm/entity.js';
|
|
12
|
+
import { NumericDate, Unique, Uuid } from '../../orm/types.js';
|
|
13
|
+
import { Array, Integer, string, StringProperty } from '../../schema/index.js';
|
|
14
|
+
import { DocumentFile } from './document-file.model.js';
|
|
15
|
+
import { DocumentRequestFile } from './document-request-file.model.js';
|
|
16
|
+
import { DocumentType } from './document-type.model.js';
|
|
17
|
+
export class DocumentRequestAssignmentTask extends Entity {
|
|
18
|
+
fileId;
|
|
19
|
+
assignedRequestFileId;
|
|
20
|
+
typeId;
|
|
21
|
+
title;
|
|
22
|
+
subtitle;
|
|
23
|
+
pages;
|
|
24
|
+
date;
|
|
25
|
+
summary;
|
|
26
|
+
tags;
|
|
27
|
+
assignmentTries;
|
|
28
|
+
}
|
|
29
|
+
__decorate([
|
|
30
|
+
Uuid(),
|
|
31
|
+
References(() => DocumentFile),
|
|
32
|
+
Unique(undefined, { naming: 'abbreviated-table' }),
|
|
33
|
+
__metadata("design:type", String)
|
|
34
|
+
], DocumentRequestAssignmentTask.prototype, "fileId", void 0);
|
|
35
|
+
__decorate([
|
|
36
|
+
Uuid({ nullable: true }),
|
|
37
|
+
References(() => DocumentRequestFile),
|
|
38
|
+
__metadata("design:type", Object)
|
|
39
|
+
], DocumentRequestAssignmentTask.prototype, "assignedRequestFileId", void 0);
|
|
40
|
+
__decorate([
|
|
41
|
+
Uuid({ nullable: true }),
|
|
42
|
+
References(() => DocumentType),
|
|
43
|
+
__metadata("design:type", Object)
|
|
44
|
+
], DocumentRequestAssignmentTask.prototype, "typeId", void 0);
|
|
45
|
+
__decorate([
|
|
46
|
+
StringProperty({ nullable: true }),
|
|
47
|
+
__metadata("design:type", Object)
|
|
48
|
+
], DocumentRequestAssignmentTask.prototype, "title", void 0);
|
|
49
|
+
__decorate([
|
|
50
|
+
StringProperty({ nullable: true }),
|
|
51
|
+
__metadata("design:type", Object)
|
|
52
|
+
], DocumentRequestAssignmentTask.prototype, "subtitle", void 0);
|
|
53
|
+
__decorate([
|
|
54
|
+
Integer({ nullable: true }),
|
|
55
|
+
__metadata("design:type", Object)
|
|
56
|
+
], DocumentRequestAssignmentTask.prototype, "pages", void 0);
|
|
57
|
+
__decorate([
|
|
58
|
+
NumericDate({ nullable: true }),
|
|
59
|
+
__metadata("design:type", Object)
|
|
60
|
+
], DocumentRequestAssignmentTask.prototype, "date", void 0);
|
|
61
|
+
__decorate([
|
|
62
|
+
StringProperty({ nullable: true }),
|
|
63
|
+
__metadata("design:type", Object)
|
|
64
|
+
], DocumentRequestAssignmentTask.prototype, "summary", void 0);
|
|
65
|
+
__decorate([
|
|
66
|
+
Array(string(), { nullable: true }),
|
|
67
|
+
__metadata("design:type", Object)
|
|
68
|
+
], DocumentRequestAssignmentTask.prototype, "tags", void 0);
|
|
69
|
+
__decorate([
|
|
70
|
+
Integer(),
|
|
71
|
+
__metadata("design:type", Number)
|
|
72
|
+
], DocumentRequestAssignmentTask.prototype, "assignmentTries", void 0);
|
|
@@ -9,13 +9,13 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
9
9
|
};
|
|
10
10
|
import { References } from '../../orm/decorators.js';
|
|
11
11
|
import { Entity } from '../../orm/entity.js';
|
|
12
|
-
import { Uuid } from '../../orm/types.js';
|
|
12
|
+
import { Unique, Uuid } from '../../orm/types.js';
|
|
13
13
|
import { DocumentCollection } from './document-collection.model.js';
|
|
14
14
|
import { DocumentRequest } from './document-request.model.js';
|
|
15
|
-
|
|
15
|
+
let DocumentRequestCollection = class DocumentRequestCollection extends Entity {
|
|
16
16
|
requestId;
|
|
17
17
|
collectionId;
|
|
18
|
-
}
|
|
18
|
+
};
|
|
19
19
|
__decorate([
|
|
20
20
|
Uuid(),
|
|
21
21
|
References(() => DocumentRequest),
|
|
@@ -26,3 +26,7 @@ __decorate([
|
|
|
26
26
|
References(() => DocumentCollection),
|
|
27
27
|
__metadata("design:type", String)
|
|
28
28
|
], DocumentRequestCollection.prototype, "collectionId", void 0);
|
|
29
|
+
DocumentRequestCollection = __decorate([
|
|
30
|
+
Unique(['requestId', 'collectionId'])
|
|
31
|
+
], DocumentRequestCollection);
|
|
32
|
+
export { DocumentRequestCollection };
|
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
import { Entity } from '../../orm/entity.js';
|
|
2
|
-
import { Timestamp, Uuid } from '../../orm/types.js';
|
|
2
|
+
import { NumericDate, Timestamp, Uuid } from '../../orm/types.js';
|
|
3
3
|
export declare class DocumentRequestFile extends Entity {
|
|
4
4
|
requestId: Uuid;
|
|
5
5
|
fileId: Uuid;
|
|
6
6
|
title: string | null;
|
|
7
|
+
subtitle: string | null;
|
|
8
|
+
pages: number | null;
|
|
9
|
+
date: NumericDate | null;
|
|
10
|
+
summary: string | null;
|
|
11
|
+
tags: string[] | null;
|
|
7
12
|
createdDocumentId: Uuid | null;
|
|
8
13
|
approval: boolean | null;
|
|
9
14
|
approvalComment: string | null;
|
|
@@ -9,8 +9,8 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
9
9
|
};
|
|
10
10
|
import { References } from '../../orm/decorators.js';
|
|
11
11
|
import { Entity } from '../../orm/entity.js';
|
|
12
|
-
import { Timestamp, Uuid } from '../../orm/types.js';
|
|
13
|
-
import { BooleanProperty, StringProperty } from '../../schema/index.js';
|
|
12
|
+
import { NumericDate, Timestamp, Uuid } from '../../orm/types.js';
|
|
13
|
+
import { Array, BooleanProperty, Integer, string, StringProperty } from '../../schema/index.js';
|
|
14
14
|
import { DocumentFile } from './document-file.model.js';
|
|
15
15
|
import { DocumentRequest } from './document-request.model.js';
|
|
16
16
|
import { Document } from './document.model.js';
|
|
@@ -18,6 +18,11 @@ export class DocumentRequestFile extends Entity {
|
|
|
18
18
|
requestId;
|
|
19
19
|
fileId;
|
|
20
20
|
title;
|
|
21
|
+
subtitle;
|
|
22
|
+
pages;
|
|
23
|
+
date;
|
|
24
|
+
summary;
|
|
25
|
+
tags;
|
|
21
26
|
createdDocumentId;
|
|
22
27
|
approval;
|
|
23
28
|
approvalComment;
|
|
@@ -37,6 +42,26 @@ __decorate([
|
|
|
37
42
|
StringProperty({ nullable: true }),
|
|
38
43
|
__metadata("design:type", Object)
|
|
39
44
|
], DocumentRequestFile.prototype, "title", void 0);
|
|
45
|
+
__decorate([
|
|
46
|
+
StringProperty({ nullable: true }),
|
|
47
|
+
__metadata("design:type", Object)
|
|
48
|
+
], DocumentRequestFile.prototype, "subtitle", void 0);
|
|
49
|
+
__decorate([
|
|
50
|
+
Integer({ nullable: true }),
|
|
51
|
+
__metadata("design:type", Object)
|
|
52
|
+
], DocumentRequestFile.prototype, "pages", void 0);
|
|
53
|
+
__decorate([
|
|
54
|
+
NumericDate({ nullable: true }),
|
|
55
|
+
__metadata("design:type", Object)
|
|
56
|
+
], DocumentRequestFile.prototype, "date", void 0);
|
|
57
|
+
__decorate([
|
|
58
|
+
StringProperty({ nullable: true }),
|
|
59
|
+
__metadata("design:type", Object)
|
|
60
|
+
], DocumentRequestFile.prototype, "summary", void 0);
|
|
61
|
+
__decorate([
|
|
62
|
+
Array(string(), { nullable: true }),
|
|
63
|
+
__metadata("design:type", Object)
|
|
64
|
+
], DocumentRequestFile.prototype, "tags", void 0);
|
|
40
65
|
__decorate([
|
|
41
66
|
Uuid({ nullable: true }),
|
|
42
67
|
References(() => Document),
|
|
@@ -2,6 +2,7 @@ import { Entity } from '../../orm/entity.js';
|
|
|
2
2
|
import { Uuid } from '../../orm/types.js';
|
|
3
3
|
import { Document } from './document.model.js';
|
|
4
4
|
export declare class DocumentRequest extends Entity implements Pick<Document, 'typeId'> {
|
|
5
|
+
static readonly entityName: 'DocumentRequest';
|
|
5
6
|
typeId: Uuid | null;
|
|
6
7
|
requiredFilesCount: number;
|
|
7
8
|
comment: string | null;
|
|
@@ -8,6 +8,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
8
8
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
9
|
};
|
|
10
10
|
import { Entity } from '../../orm/entity.js';
|
|
11
|
+
import { Unique } from '../../orm/types.js';
|
|
11
12
|
import { StringProperty } from '../../schema/index.js';
|
|
12
13
|
export class DocumentRequestsTemplate extends Entity {
|
|
13
14
|
label;
|
|
@@ -15,6 +16,7 @@ export class DocumentRequestsTemplate extends Entity {
|
|
|
15
16
|
}
|
|
16
17
|
__decorate([
|
|
17
18
|
StringProperty(),
|
|
19
|
+
Unique(),
|
|
18
20
|
__metadata("design:type", String)
|
|
19
21
|
], DocumentRequestsTemplate.prototype, "label", void 0);
|
|
20
22
|
__decorate([
|
|
@@ -9,13 +9,13 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
9
9
|
};
|
|
10
10
|
import { References } from '../../orm/decorators.js';
|
|
11
11
|
import { Entity } from '../../orm/entity.js';
|
|
12
|
-
import { Uuid } from '../../orm/types.js';
|
|
12
|
+
import { Unique, Uuid } from '../../orm/types.js';
|
|
13
13
|
import { DocumentProperty } from './document-property.model.js';
|
|
14
14
|
import { DocumentType } from './document-type.model.js';
|
|
15
|
-
|
|
15
|
+
let DocumentTypeProperty = class DocumentTypeProperty extends Entity {
|
|
16
16
|
typeId;
|
|
17
17
|
propertyId;
|
|
18
|
-
}
|
|
18
|
+
};
|
|
19
19
|
__decorate([
|
|
20
20
|
Uuid(),
|
|
21
21
|
References(() => DocumentType),
|
|
@@ -26,3 +26,7 @@ __decorate([
|
|
|
26
26
|
References(() => DocumentProperty),
|
|
27
27
|
__metadata("design:type", String)
|
|
28
28
|
], DocumentTypeProperty.prototype, "propertyId", void 0);
|
|
29
|
+
DocumentTypeProperty = __decorate([
|
|
30
|
+
Unique(['typeId', 'propertyId'])
|
|
31
|
+
], DocumentTypeProperty);
|
|
32
|
+
export { DocumentTypeProperty };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Entity } from '../../orm/entity.js';
|
|
2
2
|
import { Uuid } from '../../orm/types.js';
|
|
3
3
|
export declare class DocumentType extends Entity {
|
|
4
|
-
static entityName: 'DocumentType';
|
|
4
|
+
static readonly entityName: 'DocumentType';
|
|
5
5
|
categoryId: Uuid;
|
|
6
6
|
group: string | null;
|
|
7
7
|
label: string;
|
|
@@ -9,14 +9,14 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
9
9
|
};
|
|
10
10
|
import { References } from '../../orm/decorators.js';
|
|
11
11
|
import { Entity } from '../../orm/entity.js';
|
|
12
|
-
import { Uuid } from '../../orm/types.js';
|
|
12
|
+
import { Unique, Uuid } from '../../orm/types.js';
|
|
13
13
|
import { StringProperty } from '../../schema/index.js';
|
|
14
14
|
import { DocumentCategory } from './document-category.model.js';
|
|
15
|
-
|
|
15
|
+
let DocumentType = class DocumentType extends Entity {
|
|
16
16
|
categoryId;
|
|
17
17
|
group;
|
|
18
18
|
label;
|
|
19
|
-
}
|
|
19
|
+
};
|
|
20
20
|
__decorate([
|
|
21
21
|
Uuid(),
|
|
22
22
|
References(() => DocumentCategory),
|
|
@@ -30,3 +30,7 @@ __decorate([
|
|
|
30
30
|
StringProperty(),
|
|
31
31
|
__metadata("design:type", String)
|
|
32
32
|
], DocumentType.prototype, "label", void 0);
|
|
33
|
+
DocumentType = __decorate([
|
|
34
|
+
Unique(['categoryId', 'label'])
|
|
35
|
+
], DocumentType);
|
|
36
|
+
export { DocumentType };
|
|
@@ -4,6 +4,9 @@ export declare class Document extends Entity {
|
|
|
4
4
|
fileId: Uuid;
|
|
5
5
|
typeId: Uuid | null;
|
|
6
6
|
title: string | null;
|
|
7
|
+
subtitle: string | null;
|
|
8
|
+
pages: number | null;
|
|
7
9
|
date: NumericDate | null;
|
|
8
|
-
|
|
10
|
+
summary: string | null;
|
|
11
|
+
tags: string[] | null;
|
|
9
12
|
}
|
|
@@ -10,15 +10,18 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
10
10
|
import { References } from '../../orm/decorators.js';
|
|
11
11
|
import { Entity } from '../../orm/entity.js';
|
|
12
12
|
import { NumericDate, Uuid } from '../../orm/types.js';
|
|
13
|
-
import { StringProperty } from '../../schema/index.js';
|
|
13
|
+
import { Array, Integer, string, StringProperty } from '../../schema/index.js';
|
|
14
14
|
import { DocumentFile } from './document-file.model.js';
|
|
15
15
|
import { DocumentType } from './document-type.model.js';
|
|
16
16
|
export class Document extends Entity {
|
|
17
17
|
fileId;
|
|
18
18
|
typeId;
|
|
19
19
|
title;
|
|
20
|
+
subtitle;
|
|
21
|
+
pages;
|
|
20
22
|
date;
|
|
21
|
-
|
|
23
|
+
summary;
|
|
24
|
+
tags;
|
|
22
25
|
}
|
|
23
26
|
__decorate([
|
|
24
27
|
Uuid(),
|
|
@@ -34,11 +37,23 @@ __decorate([
|
|
|
34
37
|
StringProperty({ nullable: true }),
|
|
35
38
|
__metadata("design:type", Object)
|
|
36
39
|
], Document.prototype, "title", void 0);
|
|
40
|
+
__decorate([
|
|
41
|
+
StringProperty({ nullable: true }),
|
|
42
|
+
__metadata("design:type", Object)
|
|
43
|
+
], Document.prototype, "subtitle", void 0);
|
|
44
|
+
__decorate([
|
|
45
|
+
Integer({ nullable: true }),
|
|
46
|
+
__metadata("design:type", Object)
|
|
47
|
+
], Document.prototype, "pages", void 0);
|
|
37
48
|
__decorate([
|
|
38
49
|
NumericDate({ nullable: true }),
|
|
39
50
|
__metadata("design:type", Object)
|
|
40
51
|
], Document.prototype, "date", void 0);
|
|
41
52
|
__decorate([
|
|
42
|
-
|
|
53
|
+
StringProperty({ nullable: true }),
|
|
54
|
+
__metadata("design:type", Object)
|
|
55
|
+
], Document.prototype, "summary", void 0);
|
|
56
|
+
__decorate([
|
|
57
|
+
Array(string(), { nullable: true }),
|
|
43
58
|
__metadata("design:type", Object)
|
|
44
|
-
], Document.prototype, "
|
|
59
|
+
], Document.prototype, "tags", void 0);
|
|
@@ -4,6 +4,8 @@ export * from './document-collection.model.js';
|
|
|
4
4
|
export * from './document-file.model.js';
|
|
5
5
|
export * from './document-property-value.model.js';
|
|
6
6
|
export * from './document-property.model.js';
|
|
7
|
+
export * from './document-request-assignment-task-collection.model.js';
|
|
8
|
+
export * from './document-request-assignment-task.model.js';
|
|
7
9
|
export * from './document-request-collection.model.js';
|
|
8
10
|
export * from './document-request-file.model.js';
|
|
9
11
|
export * from './document-request-template.js';
|
|
@@ -4,6 +4,8 @@ export * from './document-collection.model.js';
|
|
|
4
4
|
export * from './document-file.model.js';
|
|
5
5
|
export * from './document-property-value.model.js';
|
|
6
6
|
export * from './document-property.model.js';
|
|
7
|
+
export * from './document-request-assignment-task-collection.model.js';
|
|
8
|
+
export * from './document-request-assignment-task.model.js';
|
|
7
9
|
export * from './document-request-collection.model.js';
|
|
8
10
|
export * from './document-request-file.model.js';
|
|
9
11
|
export * from './document-request-template.js';
|
|
@@ -8,7 +8,6 @@ export declare const metadataParameterObjectSchema: import("../../../schema/inde
|
|
|
8
8
|
}> | undefined;
|
|
9
9
|
}>;
|
|
10
10
|
export declare const setDocumentPropertyParametersSchema: import("../../../schema/index.js").ObjectSchema<{
|
|
11
|
-
documentId: import("../../../orm/schemas/uuid.js").Uuid;
|
|
12
11
|
propertyId: import("../../../orm/schemas/uuid.js").Uuid;
|
|
13
12
|
value: unknown;
|
|
14
13
|
metadata?: Partial<{
|
|
@@ -17,17 +16,20 @@ export declare const setDocumentPropertyParametersSchema: import("../../../schem
|
|
|
17
16
|
}>;
|
|
18
17
|
export declare const createDocumentParametersSchema: import("../../../schema/index.js").ObjectSchema<{
|
|
19
18
|
date: import("../../../orm/schemas/numeric-date.js").NumericDate | null;
|
|
19
|
+
summary: string | null;
|
|
20
20
|
title: string | null;
|
|
21
|
-
|
|
21
|
+
tags: string[] | null;
|
|
22
22
|
typeId: import("../../../orm/schemas/uuid.js").Uuid | null;
|
|
23
|
+
subtitle: string | null;
|
|
24
|
+
pages: number | null;
|
|
23
25
|
originalFileName: string | null;
|
|
24
26
|
collectionIds: string | string[];
|
|
25
27
|
properties?: {
|
|
28
|
+
propertyId: import("../../../orm/schemas/uuid.js").Uuid;
|
|
26
29
|
value: unknown;
|
|
27
30
|
metadata?: Partial<{
|
|
28
31
|
attributes: import("../../../orm/types.js").HasDefault<import("../../../orm/schemas/json.js").Json<import("../../../orm/entity.js").EntityMetadataAttributes>>;
|
|
29
32
|
}> | undefined;
|
|
30
|
-
propertyId: import("../../../orm/schemas/uuid.js").Uuid;
|
|
31
33
|
}[] | undefined;
|
|
32
34
|
metadata?: Partial<{
|
|
33
35
|
attributes: import("../../../orm/types.js").HasDefault<import("../../../orm/schemas/json.js").Json<import("../../../orm/entity.js").EntityMetadataAttributes>>;
|
|
@@ -36,16 +38,19 @@ export declare const createDocumentParametersSchema: import("../../../schema/ind
|
|
|
36
38
|
export declare const updateDocumentParametersSchema: import("../../../schema/index.js").ObjectSchema<{
|
|
37
39
|
id: import("../../../orm/types.js").IsPrimaryKey<import("../../../orm/types.js").HasDefault<import("../../../orm/schemas/uuid.js").Uuid>>;
|
|
38
40
|
date?: import("../../../orm/types.js").NumericDate | null | undefined;
|
|
41
|
+
summary?: string | null | undefined;
|
|
39
42
|
title?: string | null | undefined;
|
|
40
|
-
|
|
43
|
+
tags?: string[] | null | undefined;
|
|
41
44
|
fileId?: import("../../../orm/types.js").Uuid | undefined;
|
|
42
45
|
typeId?: import("../../../orm/types.js").Uuid | null | undefined;
|
|
46
|
+
subtitle?: string | null | undefined;
|
|
47
|
+
pages?: number | null | undefined;
|
|
43
48
|
properties?: {
|
|
49
|
+
propertyId: import("../../../orm/schemas/uuid.js").Uuid;
|
|
44
50
|
value: unknown;
|
|
45
51
|
metadata?: Partial<{
|
|
46
52
|
attributes: import("../../../orm/types.js").HasDefault<import("../../../orm/schemas/json.js").Json<import("../../../orm/entity.js").EntityMetadataAttributes>>;
|
|
47
53
|
}> | undefined;
|
|
48
|
-
propertyId: import("../../../orm/schemas/uuid.js").Uuid;
|
|
49
54
|
}[] | undefined;
|
|
50
55
|
metadata?: Partial<{
|
|
51
56
|
attributes: import("../../../orm/types.js").HasDefault<import("../../../orm/schemas/json.js").Json<import("../../../orm/entity.js").EntityMetadataAttributes>>;
|
|
@@ -80,9 +85,9 @@ export declare const deleteDocumentRequestsTemplateParametersSchema: import("../
|
|
|
80
85
|
}> | undefined;
|
|
81
86
|
}>;
|
|
82
87
|
export declare const createDocumentRequestTemplateParametersSchema: import("../../../schema/index.js").ObjectSchema<{
|
|
83
|
-
comment: string | null;
|
|
84
88
|
typeId: import("../../../orm/schemas/uuid.js").Uuid | null;
|
|
85
89
|
requiredFilesCount: number;
|
|
90
|
+
comment: string | null;
|
|
86
91
|
requestsTemplateId: import("../../../orm/schemas/uuid.js").Uuid;
|
|
87
92
|
metadata?: Partial<{
|
|
88
93
|
attributes: import("../../../orm/types.js").HasDefault<import("../../../orm/schemas/json.js").Json<import("../../../orm/entity.js").EntityMetadataAttributes>>;
|
|
@@ -90,9 +95,9 @@ export declare const createDocumentRequestTemplateParametersSchema: import("../.
|
|
|
90
95
|
}>;
|
|
91
96
|
export declare const updateDocumentRequestTemplateParametersSchema: import("../../../schema/index.js").ObjectSchema<{
|
|
92
97
|
id: import("../../../orm/types.js").IsPrimaryKey<import("../../../orm/types.js").HasDefault<import("../../../orm/schemas/uuid.js").Uuid>>;
|
|
93
|
-
comment?: string | null | undefined;
|
|
94
98
|
typeId?: import("../../../orm/types.js").Uuid | null | undefined;
|
|
95
99
|
requiredFilesCount?: number | undefined;
|
|
100
|
+
comment?: string | null | undefined;
|
|
96
101
|
metadata?: Partial<{
|
|
97
102
|
attributes: import("../../../orm/types.js").HasDefault<import("../../../orm/schemas/json.js").Json<import("../../../orm/entity.js").EntityMetadataAttributes>>;
|
|
98
103
|
}> | undefined;
|
|
@@ -104,9 +109,9 @@ export declare const deleteDocumentRequestTemplateParametersSchema: import("../.
|
|
|
104
109
|
}> | undefined;
|
|
105
110
|
}>;
|
|
106
111
|
export declare const createDocumentRequestParametersSchema: import("../../../schema/index.js").ObjectSchema<{
|
|
107
|
-
comment: string | null;
|
|
108
112
|
typeId: import("../../../orm/schemas/uuid.js").Uuid | null;
|
|
109
113
|
requiredFilesCount: number;
|
|
114
|
+
comment: string | null;
|
|
110
115
|
collectionIds: string[];
|
|
111
116
|
metadata?: Partial<{
|
|
112
117
|
attributes: import("../../../orm/types.js").HasDefault<import("../../../orm/schemas/json.js").Json<import("../../../orm/entity.js").EntityMetadataAttributes>>;
|
|
@@ -114,9 +119,9 @@ export declare const createDocumentRequestParametersSchema: import("../../../sch
|
|
|
114
119
|
}>;
|
|
115
120
|
export declare const updateDocumentRequestParametersSchema: import("../../../schema/index.js").ObjectSchema<{
|
|
116
121
|
id: import("../../../orm/types.js").IsPrimaryKey<import("../../../orm/types.js").HasDefault<import("../../../orm/schemas/uuid.js").Uuid>>;
|
|
117
|
-
comment?: string | null | undefined;
|
|
118
122
|
typeId?: import("../../../orm/types.js").Uuid | null | undefined;
|
|
119
123
|
requiredFilesCount?: number | undefined;
|
|
124
|
+
comment?: string | null | undefined;
|
|
120
125
|
completed?: boolean | undefined;
|
|
121
126
|
metadata?: Partial<{
|
|
122
127
|
attributes: import("../../../orm/types.js").HasDefault<import("../../../orm/schemas/json.js").Json<import("../../../orm/entity.js").EntityMetadataAttributes>>;
|
|
@@ -130,7 +135,12 @@ export declare const deleteDocumentRequestParametersSchema: import("../../../sch
|
|
|
130
135
|
}>;
|
|
131
136
|
export declare const updateDocumentRequestFileParametersSchema: import("../../../schema/index.js").ObjectSchema<{
|
|
132
137
|
id: import("../../../orm/types.js").IsPrimaryKey<import("../../../orm/types.js").HasDefault<import("../../../orm/schemas/uuid.js").Uuid>>;
|
|
138
|
+
date?: import("../../../orm/types.js").NumericDate | null | undefined;
|
|
139
|
+
summary?: string | null | undefined;
|
|
133
140
|
title?: string | null | undefined;
|
|
141
|
+
tags?: string[] | null | undefined;
|
|
142
|
+
subtitle?: string | null | undefined;
|
|
143
|
+
pages?: number | null | undefined;
|
|
134
144
|
approvalComment?: string | null | undefined;
|
|
135
145
|
approvalTimestamp?: import("../../../orm/types.js").Timestamp | null | undefined;
|
|
136
146
|
metadata?: Partial<{
|
|
@@ -163,13 +173,17 @@ export declare const createCollectionParametersSchema: import("../../../schema/i
|
|
|
163
173
|
attributes: import("../../../orm/types.js").HasDefault<import("../../../orm/schemas/json.js").Json<import("../../../orm/entity.js").EntityMetadataAttributes>>;
|
|
164
174
|
}> | undefined;
|
|
165
175
|
}>;
|
|
166
|
-
export declare const setDocumentPropertiesParametersSchema: import("../../../schema/index.js").
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
176
|
+
export declare const setDocumentPropertiesParametersSchema: import("../../../schema/index.js").ObjectSchema<{
|
|
177
|
+
properties: {
|
|
178
|
+
propertyId: import("../../../orm/schemas/uuid.js").Uuid;
|
|
179
|
+
value: unknown;
|
|
180
|
+
metadata?: Partial<{
|
|
181
|
+
attributes: import("../../../orm/types.js").HasDefault<import("../../../orm/schemas/json.js").Json<import("../../../orm/entity.js").EntityMetadataAttributes>>;
|
|
182
|
+
}> | undefined;
|
|
183
|
+
}[];
|
|
184
|
+
documentId?: string | undefined;
|
|
185
|
+
requestFileId?: string | undefined;
|
|
186
|
+
requestAssignmentTaskId?: string | undefined;
|
|
173
187
|
}>;
|
|
174
188
|
export declare const createDocumentCategoryParametersSchema: import("../../../schema/index.js").ObjectSchema<{
|
|
175
189
|
label: string;
|
|
@@ -187,7 +201,12 @@ export declare const createDocumentTypeParametersSchema: import("../../../schema
|
|
|
187
201
|
}>;
|
|
188
202
|
export declare const createDocumentRequestFileParametersSchema: import("../../../schema/index.js").ObjectSchema<{
|
|
189
203
|
requestId: string;
|
|
204
|
+
date: import("../../../orm/schemas/numeric-date.js").NumericDate | null;
|
|
205
|
+
summary: string | null;
|
|
190
206
|
title: string | null;
|
|
207
|
+
tags: string[] | null;
|
|
208
|
+
subtitle: string | null;
|
|
209
|
+
pages: number | null;
|
|
191
210
|
originalFileName: string | null;
|
|
192
211
|
metadata?: Partial<{
|
|
193
212
|
attributes: import("../../../orm/types.js").HasDefault<import("../../../orm/schemas/json.js").Json<import("../../../orm/entity.js").EntityMetadataAttributes>>;
|
|
@@ -14,12 +14,12 @@ import { DocumentType } from '../document-type.model.js';
|
|
|
14
14
|
import { Document } from '../document.model.js';
|
|
15
15
|
export const metadataParameterSchema = optional(partial(pick(EntityMetadata, 'attributes')));
|
|
16
16
|
export const metadataParameterObjectSchema = object({ metadata: metadataParameterSchema });
|
|
17
|
-
export const setDocumentPropertyParametersSchema = assign(pick(DocumentPropertyValueBase, ['
|
|
18
|
-
export const createDocumentParametersSchema = assign(pick(Document, ['typeId', 'title', 'date', '
|
|
17
|
+
export const setDocumentPropertyParametersSchema = assign(pick(DocumentPropertyValueBase, ['propertyId']), object({ value: unknown() }), metadataParameterObjectSchema);
|
|
18
|
+
export const createDocumentParametersSchema = assign(pick(Document, ['typeId', 'title', 'subtitle', 'pages', 'date', 'summary', 'tags']), pick(DocumentFile, ['originalFileName']), object({
|
|
19
19
|
collectionIds: oneOrMany(string()),
|
|
20
|
-
properties: optional(array(
|
|
20
|
+
properties: optional(array(setDocumentPropertyParametersSchema))
|
|
21
21
|
}), metadataParameterObjectSchema);
|
|
22
|
-
export const updateDocumentParametersSchema = assign(pick(Document, ['id']), partial(omit(Document, ['id', 'metadata'])), object({ properties: optional(array(
|
|
22
|
+
export const updateDocumentParametersSchema = assign(pick(Document, ['id']), partial(omit(Document, ['id', 'metadata'])), object({ properties: optional(array(setDocumentPropertyParametersSchema)) }), metadataParameterObjectSchema);
|
|
23
23
|
export const createDocumentRequestsTemplateParametersSchema = assign(pick(DocumentRequestsTemplate, ['label', 'description']), metadataParameterObjectSchema);
|
|
24
24
|
export const updateDocumentRequestsTemplateParametersSchema = assign(pick(DocumentRequestsTemplate, ['id']), partial(omit(DocumentRequestsTemplate, ['id', 'metadata'])), metadataParameterObjectSchema);
|
|
25
25
|
export const applyDocumentRequestsTemplateParametersSchema = assign(pick(DocumentRequestsTemplate, ['id']), object({ collectionIds: array(string()) }), metadataParameterObjectSchema);
|
|
@@ -36,10 +36,15 @@ export const loadDataCollectionMetadataParametersSchema = object({ name: optiona
|
|
|
36
36
|
export const loadDataCollectionsMetadataParametersSchema = record(string(), loadDataCollectionMetadataParametersSchema);
|
|
37
37
|
export const loadDataParametersSchema = object({ collectionIds: oneOrMany(string()), collectionsMetadata: loadDataCollectionsMetadataParametersSchema });
|
|
38
38
|
export const createCollectionParametersSchema = metadataParameterObjectSchema;
|
|
39
|
-
export const setDocumentPropertiesParametersSchema =
|
|
39
|
+
export const setDocumentPropertiesParametersSchema = object({
|
|
40
|
+
documentId: optional(string()),
|
|
41
|
+
requestFileId: optional(string()),
|
|
42
|
+
requestAssignmentTaskId: optional(string()),
|
|
43
|
+
properties: array(setDocumentPropertyParametersSchema)
|
|
44
|
+
});
|
|
40
45
|
export const createDocumentCategoryParametersSchema = assign(pick(DocumentCategory, ['label']), metadataParameterObjectSchema);
|
|
41
46
|
export const createDocumentTypeParametersSchema = assign(pick(DocumentType, ['categoryId', 'group', 'label']), metadataParameterObjectSchema);
|
|
42
|
-
export const createDocumentRequestFileParametersSchema = assign(object({ requestId: string() }), pick(DocumentRequestFile, ['title']), pick(DocumentFile, ['originalFileName']), metadataParameterObjectSchema);
|
|
47
|
+
export const createDocumentRequestFileParametersSchema = assign(object({ requestId: string() }), pick(DocumentRequestFile, ['title', 'subtitle', 'pages', 'date', 'summary', 'tags']), pick(DocumentFile, ['originalFileName']), metadataParameterObjectSchema);
|
|
43
48
|
export const approveDocumentRequestFileParametersSchema = assign(pick(DocumentRequestFile, ['id', 'approvalComment']), object({
|
|
44
49
|
documentMetadata: metadataParameterSchema,
|
|
45
50
|
requestFileMetadata: metadataParameterSchema
|
|
@@ -2,7 +2,7 @@ import { Timestamp } from '../../../orm/types.js';
|
|
|
2
2
|
import { DocumentCategory } from '../document-category.model.js';
|
|
3
3
|
import { DocumentCollection } from '../document-collection.model.js';
|
|
4
4
|
import { DocumentFile } from '../document-file.model.js';
|
|
5
|
-
import {
|
|
5
|
+
import { DocumentPropertyValue } from '../document-property-value.model.js';
|
|
6
6
|
import { DocumentRequestFile } from '../document-request-file.model.js';
|
|
7
7
|
import { DocumentRequest } from '../document-request.model.js';
|
|
8
8
|
import { DocumentType } from '../document-type.model.js';
|