@tstdl/base 0.92.86 → 0.92.88
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-file.service.js +8 -13
- 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/index.d.ts +1 -0
- package/document-management/server/index.js +1 -0
- 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 +18 -0
- package/file/temporary-file.js +53 -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
|
@@ -9,50 +9,83 @@ 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';
|
|
13
|
-
import { BooleanProperty, Integer, NumberProperty, StringProperty
|
|
12
|
+
import { Check, NumericDate, Unique, Uuid } from '../../orm/types.js';
|
|
13
|
+
import { BooleanProperty, Integer, NumberProperty, StringProperty } from '../../schema/index.js';
|
|
14
|
+
import { sql } from 'drizzle-orm';
|
|
14
15
|
import { DocumentProperty } from './document-property.model.js';
|
|
16
|
+
import { DocumentRequestAssignmentTask } from './document-request-assignment-task.model.js';
|
|
17
|
+
import { DocumentRequestFile } from './document-request-file.model.js';
|
|
15
18
|
import { Document } from './document.model.js';
|
|
16
|
-
|
|
17
|
-
documentId;
|
|
19
|
+
let DocumentPropertyValueBase = class DocumentPropertyValueBase extends Entity {
|
|
18
20
|
propertyId;
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
21
|
+
text;
|
|
22
|
+
integer;
|
|
23
|
+
decimal;
|
|
24
|
+
boolean;
|
|
25
|
+
date;
|
|
26
|
+
};
|
|
25
27
|
__decorate([
|
|
26
28
|
Uuid(),
|
|
27
29
|
References(() => DocumentProperty),
|
|
28
30
|
__metadata("design:type", String)
|
|
29
31
|
], DocumentPropertyValueBase.prototype, "propertyId", void 0);
|
|
30
|
-
export class DocumentPropertyTextValue extends DocumentPropertyValueBase {
|
|
31
|
-
value;
|
|
32
|
-
}
|
|
33
32
|
__decorate([
|
|
34
33
|
StringProperty({ nullable: true }),
|
|
35
34
|
__metadata("design:type", Object)
|
|
36
|
-
],
|
|
37
|
-
export class DocumentPropertyIntegerValue extends DocumentPropertyValueBase {
|
|
38
|
-
value;
|
|
39
|
-
}
|
|
35
|
+
], DocumentPropertyValueBase.prototype, "text", void 0);
|
|
40
36
|
__decorate([
|
|
41
37
|
Integer({ nullable: true }),
|
|
42
38
|
__metadata("design:type", Object)
|
|
43
|
-
],
|
|
44
|
-
export class DocumentPropertyDecimalValue extends DocumentPropertyValueBase {
|
|
45
|
-
value;
|
|
46
|
-
}
|
|
39
|
+
], DocumentPropertyValueBase.prototype, "integer", void 0);
|
|
47
40
|
__decorate([
|
|
48
41
|
NumberProperty({ nullable: true }),
|
|
49
42
|
__metadata("design:type", Object)
|
|
50
|
-
],
|
|
51
|
-
export class DocumentPropertyBooleanValue extends DocumentPropertyValueBase {
|
|
52
|
-
value;
|
|
53
|
-
}
|
|
43
|
+
], DocumentPropertyValueBase.prototype, "decimal", void 0);
|
|
54
44
|
__decorate([
|
|
55
45
|
BooleanProperty({ nullable: true }),
|
|
56
46
|
__metadata("design:type", Object)
|
|
57
|
-
],
|
|
58
|
-
|
|
47
|
+
], DocumentPropertyValueBase.prototype, "boolean", void 0);
|
|
48
|
+
__decorate([
|
|
49
|
+
NumericDate({ nullable: true }),
|
|
50
|
+
__metadata("design:type", Object)
|
|
51
|
+
], DocumentPropertyValueBase.prototype, "date", void 0);
|
|
52
|
+
DocumentPropertyValueBase = __decorate([
|
|
53
|
+
Check('only_one_value', (table) => sql `num_nonnulls(${table.text}, ${table.integer}, ${table.decimal}, ${table.boolean}, ${table.date}) = 1`)
|
|
54
|
+
], DocumentPropertyValueBase);
|
|
55
|
+
export { DocumentPropertyValueBase };
|
|
56
|
+
let DocumentPropertyValue = class DocumentPropertyValue extends DocumentPropertyValueBase {
|
|
57
|
+
documentId;
|
|
58
|
+
};
|
|
59
|
+
__decorate([
|
|
60
|
+
Uuid(),
|
|
61
|
+
References(() => Document),
|
|
62
|
+
__metadata("design:type", String)
|
|
63
|
+
], DocumentPropertyValue.prototype, "documentId", void 0);
|
|
64
|
+
DocumentPropertyValue = __decorate([
|
|
65
|
+
Unique(['documentId', 'propertyId'])
|
|
66
|
+
], DocumentPropertyValue);
|
|
67
|
+
export { DocumentPropertyValue };
|
|
68
|
+
let DocumentRequestFilePropertyValue = class DocumentRequestFilePropertyValue extends DocumentPropertyValueBase {
|
|
69
|
+
requestFileId;
|
|
70
|
+
};
|
|
71
|
+
__decorate([
|
|
72
|
+
Uuid(),
|
|
73
|
+
References(() => DocumentRequestFile),
|
|
74
|
+
__metadata("design:type", String)
|
|
75
|
+
], DocumentRequestFilePropertyValue.prototype, "requestFileId", void 0);
|
|
76
|
+
DocumentRequestFilePropertyValue = __decorate([
|
|
77
|
+
Unique(['requestFileId', 'propertyId'], { naming: 'abbreviated-table' })
|
|
78
|
+
], DocumentRequestFilePropertyValue);
|
|
79
|
+
export { DocumentRequestFilePropertyValue };
|
|
80
|
+
let DocumentRequestAssignmentTaskPropertyValue = class DocumentRequestAssignmentTaskPropertyValue extends DocumentPropertyValueBase {
|
|
81
|
+
requestAssignmentTaskId;
|
|
82
|
+
};
|
|
83
|
+
__decorate([
|
|
84
|
+
Uuid(),
|
|
85
|
+
References(() => DocumentRequestAssignmentTask),
|
|
86
|
+
__metadata("design:type", String)
|
|
87
|
+
], DocumentRequestAssignmentTaskPropertyValue.prototype, "requestAssignmentTaskId", void 0);
|
|
88
|
+
DocumentRequestAssignmentTaskPropertyValue = __decorate([
|
|
89
|
+
Unique(['requestAssignmentTaskId', 'propertyId'], { naming: 'abbreviated-table' })
|
|
90
|
+
], DocumentRequestAssignmentTaskPropertyValue);
|
|
91
|
+
export { DocumentRequestAssignmentTaskPropertyValue };
|
|
@@ -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';
|