@tstdl/base 0.93.61 → 0.93.62
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/document-management/api/document-management.api.d.ts +8 -8
- package/document-management/models/document-assignment-scope.model.d.ts +3 -4
- package/document-management/models/document-assignment-scope.model.js +5 -9
- package/document-management/models/document-assignment-task.model.d.ts +3 -4
- package/document-management/models/document-assignment-task.model.js +4 -8
- package/document-management/models/document-category.model.d.ts +3 -4
- package/document-management/models/document-category.model.js +4 -8
- package/document-management/models/document-collection-assignment.model.d.ts +2 -3
- package/document-management/models/document-collection-assignment.model.js +4 -9
- package/document-management/models/document-collection.model.d.ts +3 -4
- package/document-management/models/document-collection.model.js +4 -8
- package/document-management/models/document-property-value.model.d.ts +3 -4
- package/document-management/models/document-property-value.model.js +5 -9
- package/document-management/models/document-property.model.d.ts +3 -4
- package/document-management/models/document-property.model.js +3 -7
- package/document-management/models/document-request-collection-assignment.model.d.ts +3 -4
- package/document-management/models/document-request-collection-assignment.model.js +5 -9
- package/document-management/models/document-request-template.d.ts +2 -3
- package/document-management/models/document-request-template.js +4 -9
- package/document-management/models/document-request.model.d.ts +3 -4
- package/document-management/models/document-request.model.js +5 -9
- package/document-management/models/document-requests-template.d.ts +2 -3
- package/document-management/models/document-requests-template.js +2 -7
- package/document-management/models/document-tag-assignment.model.d.ts +3 -4
- package/document-management/models/document-tag-assignment.model.js +5 -9
- package/document-management/models/document-tag.model.d.ts +3 -4
- package/document-management/models/document-tag.model.js +3 -7
- package/document-management/models/document-type-property.model.d.ts +2 -3
- package/document-management/models/document-type-property.model.js +4 -9
- package/document-management/models/document-type-validation.model.d.ts +2 -3
- package/document-management/models/document-type-validation.model.js +4 -9
- package/document-management/models/document-type.model.d.ts +3 -4
- package/document-management/models/document-type.model.js +4 -8
- package/document-management/models/document-validation-definition.model.d.ts +3 -4
- package/document-management/models/document-validation-definition.model.js +3 -7
- package/document-management/models/document-validation-execution-related-document.model.d.ts +3 -4
- package/document-management/models/document-validation-execution-related-document.model.js +5 -9
- package/document-management/models/document-validation-execution.model.d.ts +3 -4
- package/document-management/models/document-validation-execution.model.js +5 -9
- package/document-management/models/document-workflow.model.d.ts +3 -4
- package/document-management/models/document-workflow.model.js +4 -8
- package/document-management/models/document.model.d.ts +3 -4
- package/document-management/models/document.model.js +4 -8
- package/document-management/server/drizzle/0001_lyrical_wong.sql +123 -0
- package/document-management/server/drizzle/meta/0001_snapshot.json +2728 -0
- package/document-management/server/drizzle/meta/_journal.json +7 -0
- package/document-management/server/services/document-category-type.service.d.ts +6 -6
- package/document-management/server/services/document-category-type.service.js +6 -6
- package/document-management/server/services/document-management-ai.service.js +2 -2
- package/document-management/server/services/document-management.service.d.ts +2 -2
- package/document-management/server/services/document-property.service.d.ts +4 -4
- package/document-management/server/services/document-property.service.js +3 -3
- package/document-management/server/services/document-request.service.d.ts +2 -2
- package/document-management/server/services/document-request.service.js +1 -1
- package/document-management/server/services/document-tag.service.d.ts +1 -1
- package/document-management/server/services/document-tag.service.js +2 -2
- package/document-management/server/services/document-validation.service.js +6 -6
- package/document-management/server/services/document.service.js +1 -5
- package/document-management/service-models/document-management.view-model.d.ts +1 -1
- package/document-management/service-models/document-management.view-model.js +1 -1
- package/document-management/service-models/document.service-model.d.ts +4 -4
- package/document-management/service-models/enriched/enriched-document-category.view.d.ts +1 -1
- package/document-management/service-models/enriched/enriched-document-type.view.d.ts +1 -1
- package/orm/decorators.d.ts +18 -7
- package/orm/decorators.js +10 -2
- package/orm/entity.d.ts +2 -2
- package/orm/entity.js +2 -0
- package/orm/server/drizzle/schema-converter.d.ts +3 -3
- package/orm/server/drizzle/schema-converter.js +22 -5
- package/package.json +3 -3
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare class DocumentTag extends
|
|
3
|
-
static readonly entityName
|
|
4
|
-
tenantId: string | null;
|
|
1
|
+
import { TenantEntity } from '../../orm/index.js';
|
|
2
|
+
export declare class DocumentTag extends TenantEntity {
|
|
3
|
+
static readonly entityName = "DocumentTag";
|
|
5
4
|
label: string;
|
|
6
5
|
}
|
|
@@ -7,17 +7,13 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
7
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
|
-
import {
|
|
10
|
+
import { TenantEntity, Unique } from '../../orm/index.js';
|
|
11
11
|
import { StringProperty } from '../../schema/index.js';
|
|
12
12
|
import { DocumentManagementTable } from './document-management-table.js';
|
|
13
|
-
let DocumentTag = class DocumentTag extends
|
|
14
|
-
|
|
13
|
+
let DocumentTag = class DocumentTag extends TenantEntity {
|
|
14
|
+
static entityName = 'DocumentTag';
|
|
15
15
|
label;
|
|
16
16
|
};
|
|
17
|
-
__decorate([
|
|
18
|
-
UuidProperty({ nullable: true }),
|
|
19
|
-
__metadata("design:type", Object)
|
|
20
|
-
], DocumentTag.prototype, "tenantId", void 0);
|
|
21
17
|
__decorate([
|
|
22
18
|
StringProperty(),
|
|
23
19
|
__metadata("design:type", String)
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare class DocumentTypeProperty extends
|
|
3
|
-
tenantId: string | null;
|
|
1
|
+
import { TenantEntity, type Uuid } from '../../orm/index.js';
|
|
2
|
+
export declare class DocumentTypeProperty extends TenantEntity {
|
|
4
3
|
typeId: Uuid;
|
|
5
4
|
propertyId: Uuid;
|
|
6
5
|
}
|
|
@@ -7,27 +7,22 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
7
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
|
-
import {
|
|
10
|
+
import { TenantEntity, TenantReference, Unique, UuidProperty } from '../../orm/index.js';
|
|
11
11
|
import { DocumentManagementTable } from './document-management-table.js';
|
|
12
12
|
import { DocumentProperty } from './document-property.model.js';
|
|
13
13
|
import { DocumentType } from './document-type.model.js';
|
|
14
|
-
let DocumentTypeProperty = class DocumentTypeProperty extends
|
|
15
|
-
tenantId;
|
|
14
|
+
let DocumentTypeProperty = class DocumentTypeProperty extends TenantEntity {
|
|
16
15
|
typeId;
|
|
17
16
|
propertyId;
|
|
18
17
|
};
|
|
19
|
-
__decorate([
|
|
20
|
-
UuidProperty({ nullable: true }),
|
|
21
|
-
__metadata("design:type", Object)
|
|
22
|
-
], DocumentTypeProperty.prototype, "tenantId", void 0);
|
|
23
18
|
__decorate([
|
|
24
19
|
UuidProperty(),
|
|
25
|
-
|
|
20
|
+
TenantReference(() => DocumentType),
|
|
26
21
|
__metadata("design:type", String)
|
|
27
22
|
], DocumentTypeProperty.prototype, "typeId", void 0);
|
|
28
23
|
__decorate([
|
|
29
24
|
UuidProperty(),
|
|
30
|
-
|
|
25
|
+
TenantReference(() => DocumentProperty),
|
|
31
26
|
__metadata("design:type", String)
|
|
32
27
|
], DocumentTypeProperty.prototype, "propertyId", void 0);
|
|
33
28
|
DocumentTypeProperty = __decorate([
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare class DocumentTypeValidation extends
|
|
3
|
-
tenantId: string | null;
|
|
1
|
+
import { TenantEntity, type Uuid } from '../../orm/index.js';
|
|
2
|
+
export declare class DocumentTypeValidation extends TenantEntity {
|
|
4
3
|
typeId: Uuid;
|
|
5
4
|
validationId: Uuid;
|
|
6
5
|
}
|
|
@@ -7,28 +7,23 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
7
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
|
-
import {
|
|
10
|
+
import { Index, TenantEntity, TenantReference, Unique, UuidProperty } from '../../orm/index.js';
|
|
11
11
|
import { DocumentManagementTable } from './document-management-table.js';
|
|
12
12
|
import { DocumentType } from './document-type.model.js';
|
|
13
13
|
import { DocumentValidationDefinition } from './document-validation-definition.model.js';
|
|
14
|
-
let DocumentTypeValidation = class DocumentTypeValidation extends
|
|
15
|
-
tenantId;
|
|
14
|
+
let DocumentTypeValidation = class DocumentTypeValidation extends TenantEntity {
|
|
16
15
|
typeId;
|
|
17
16
|
validationId;
|
|
18
17
|
};
|
|
19
|
-
__decorate([
|
|
20
|
-
UuidProperty({ nullable: true }),
|
|
21
|
-
__metadata("design:type", Object)
|
|
22
|
-
], DocumentTypeValidation.prototype, "tenantId", void 0);
|
|
23
18
|
__decorate([
|
|
24
19
|
UuidProperty(),
|
|
25
|
-
|
|
20
|
+
TenantReference(() => DocumentType),
|
|
26
21
|
Index(),
|
|
27
22
|
__metadata("design:type", String)
|
|
28
23
|
], DocumentTypeValidation.prototype, "typeId", void 0);
|
|
29
24
|
__decorate([
|
|
30
25
|
UuidProperty(),
|
|
31
|
-
|
|
26
|
+
TenantReference(() => DocumentValidationDefinition),
|
|
32
27
|
__metadata("design:type", String)
|
|
33
28
|
], DocumentTypeValidation.prototype, "validationId", void 0);
|
|
34
29
|
DocumentTypeValidation = __decorate([
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare class DocumentType extends
|
|
3
|
-
static readonly entityName
|
|
4
|
-
tenantId: string | null;
|
|
1
|
+
import { TenantEntity, type Uuid } from '../../orm/index.js';
|
|
2
|
+
export declare class DocumentType extends TenantEntity {
|
|
3
|
+
static readonly entityName = "DocumentType";
|
|
5
4
|
categoryId: Uuid;
|
|
6
5
|
label: string;
|
|
7
6
|
}
|
|
@@ -7,22 +7,18 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
7
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
|
-
import {
|
|
10
|
+
import { TenantEntity, TenantReference, Unique, UuidProperty } from '../../orm/index.js';
|
|
11
11
|
import { StringProperty } from '../../schema/index.js';
|
|
12
12
|
import { DocumentCategory } from './document-category.model.js';
|
|
13
13
|
import { DocumentManagementTable } from './document-management-table.js';
|
|
14
|
-
let DocumentType = class DocumentType extends
|
|
15
|
-
|
|
14
|
+
let DocumentType = class DocumentType extends TenantEntity {
|
|
15
|
+
static entityName = 'DocumentType';
|
|
16
16
|
categoryId;
|
|
17
17
|
label;
|
|
18
18
|
};
|
|
19
|
-
__decorate([
|
|
20
|
-
UuidProperty({ nullable: true }),
|
|
21
|
-
__metadata("design:type", Object)
|
|
22
|
-
], DocumentType.prototype, "tenantId", void 0);
|
|
23
19
|
__decorate([
|
|
24
20
|
UuidProperty(),
|
|
25
|
-
|
|
21
|
+
TenantReference(() => DocumentCategory),
|
|
26
22
|
__metadata("design:type", String)
|
|
27
23
|
], DocumentType.prototype, "categoryId", void 0);
|
|
28
24
|
__decorate([
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { type Json, TenantEntity } from '../../orm/index.js';
|
|
2
2
|
import type { Record } from '../../types/index.js';
|
|
3
|
-
export declare class DocumentValidationDefinition extends
|
|
4
|
-
static readonly entityName
|
|
5
|
-
tenantId: string | null;
|
|
3
|
+
export declare class DocumentValidationDefinition extends TenantEntity {
|
|
4
|
+
static readonly entityName = "DocumentValidationDefinition";
|
|
6
5
|
identifier: string;
|
|
7
6
|
label: string;
|
|
8
7
|
description: string | null;
|
|
@@ -7,20 +7,16 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
7
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
|
-
import {
|
|
10
|
+
import { JsonProperty, TenantEntity } from '../../orm/index.js';
|
|
11
11
|
import { StringProperty } from '../../schema/index.js';
|
|
12
12
|
import { DocumentManagementTable } from './document-management-table.js';
|
|
13
|
-
let DocumentValidationDefinition = class DocumentValidationDefinition extends
|
|
14
|
-
|
|
13
|
+
let DocumentValidationDefinition = class DocumentValidationDefinition extends TenantEntity {
|
|
14
|
+
static entityName = 'DocumentValidationDefinition';
|
|
15
15
|
identifier;
|
|
16
16
|
label;
|
|
17
17
|
description;
|
|
18
18
|
configuration;
|
|
19
19
|
};
|
|
20
|
-
__decorate([
|
|
21
|
-
UuidProperty({ nullable: true }),
|
|
22
|
-
__metadata("design:type", Object)
|
|
23
|
-
], DocumentValidationDefinition.prototype, "tenantId", void 0);
|
|
24
20
|
__decorate([
|
|
25
21
|
StringProperty(),
|
|
26
22
|
__metadata("design:type", String)
|
package/document-management/models/document-validation-execution-related-document.model.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare class DocumentValidationExecutionRelatedDocument extends
|
|
3
|
-
static readonly entityName
|
|
4
|
-
tenantId: Uuid;
|
|
1
|
+
import { TenantEntity, type Uuid } from '../../orm/index.js';
|
|
2
|
+
export declare class DocumentValidationExecutionRelatedDocument extends TenantEntity {
|
|
3
|
+
static readonly entityName = "DocumentValidationExecutionRelatedDocument";
|
|
5
4
|
executionId: Uuid;
|
|
6
5
|
documentId: Uuid;
|
|
7
6
|
}
|
|
@@ -7,27 +7,23 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
7
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
|
-
import {
|
|
10
|
+
import { ForeignKey, TenantEntity, TenantReference, Unique, UuidProperty } from '../../orm/index.js';
|
|
11
11
|
import { DocumentManagementTable } from './document-management-table.js';
|
|
12
12
|
import { DocumentValidationExecution } from './document-validation-execution.model.js';
|
|
13
13
|
import { Document } from './document.model.js';
|
|
14
|
-
let DocumentValidationExecutionRelatedDocument = class DocumentValidationExecutionRelatedDocument extends
|
|
15
|
-
|
|
14
|
+
let DocumentValidationExecutionRelatedDocument = class DocumentValidationExecutionRelatedDocument extends TenantEntity {
|
|
15
|
+
static entityName = 'DocumentValidationExecutionRelatedDocument';
|
|
16
16
|
executionId;
|
|
17
17
|
documentId;
|
|
18
18
|
};
|
|
19
19
|
__decorate([
|
|
20
20
|
UuidProperty(),
|
|
21
|
-
|
|
22
|
-
], DocumentValidationExecutionRelatedDocument.prototype, "tenantId", void 0);
|
|
23
|
-
__decorate([
|
|
24
|
-
UuidProperty(),
|
|
25
|
-
References(() => DocumentValidationExecution),
|
|
21
|
+
TenantReference(() => DocumentValidationExecution),
|
|
26
22
|
__metadata("design:type", String)
|
|
27
23
|
], DocumentValidationExecutionRelatedDocument.prototype, "executionId", void 0);
|
|
28
24
|
__decorate([
|
|
29
25
|
UuidProperty(),
|
|
30
|
-
|
|
26
|
+
TenantReference(() => Document),
|
|
31
27
|
__metadata("design:type", String)
|
|
32
28
|
], DocumentValidationExecutionRelatedDocument.prototype, "documentId", void 0);
|
|
33
29
|
DocumentValidationExecutionRelatedDocument = __decorate([
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type EnumType } from '../../enumeration/enumeration.js';
|
|
2
|
-
import {
|
|
2
|
+
import { TenantEntity, type Timestamp, type Uuid } from '../../orm/index.js';
|
|
3
3
|
export declare const DocumentValidationExecutionState: {
|
|
4
4
|
readonly Pending: "pending";
|
|
5
5
|
readonly Running: "running";
|
|
@@ -13,9 +13,8 @@ export declare const DocumentValidationResultStatus: {
|
|
|
13
13
|
readonly Warning: "warning";
|
|
14
14
|
};
|
|
15
15
|
export type DocumentValidationResultStatus = EnumType<typeof DocumentValidationResultStatus>;
|
|
16
|
-
export declare class DocumentValidationExecution extends
|
|
17
|
-
static readonly entityName
|
|
18
|
-
tenantId: Uuid;
|
|
16
|
+
export declare class DocumentValidationExecution extends TenantEntity {
|
|
17
|
+
static readonly entityName = "DocumentValidationExecution";
|
|
19
18
|
workflowId: Uuid;
|
|
20
19
|
definitionId: Uuid;
|
|
21
20
|
state: DocumentValidationExecutionState;
|
|
@@ -8,7 +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 { defineEnum } from '../../enumeration/enumeration.js';
|
|
11
|
-
import {
|
|
11
|
+
import { ForeignKey, TenantEntity, TenantReference, TimestampProperty, Unique, UuidProperty } from '../../orm/index.js';
|
|
12
12
|
import { Enumeration, StringProperty } from '../../schema/index.js';
|
|
13
13
|
import { DocumentManagementTable } from './document-management-table.js';
|
|
14
14
|
import { DocumentValidationDefinition } from './document-validation-definition.model.js';
|
|
@@ -24,8 +24,8 @@ export const DocumentValidationResultStatus = defineEnum('DocumentValidationResu
|
|
|
24
24
|
Failed: 'failed',
|
|
25
25
|
Warning: 'warning',
|
|
26
26
|
});
|
|
27
|
-
let DocumentValidationExecution = class DocumentValidationExecution extends
|
|
28
|
-
|
|
27
|
+
let DocumentValidationExecution = class DocumentValidationExecution extends TenantEntity {
|
|
28
|
+
static entityName = 'DocumentValidationExecution';
|
|
29
29
|
workflowId;
|
|
30
30
|
definitionId;
|
|
31
31
|
state;
|
|
@@ -36,16 +36,12 @@ let DocumentValidationExecution = class DocumentValidationExecution extends Enti
|
|
|
36
36
|
};
|
|
37
37
|
__decorate([
|
|
38
38
|
UuidProperty(),
|
|
39
|
-
|
|
40
|
-
], DocumentValidationExecution.prototype, "tenantId", void 0);
|
|
41
|
-
__decorate([
|
|
42
|
-
UuidProperty(),
|
|
43
|
-
References(() => DocumentWorkflow),
|
|
39
|
+
TenantReference(() => DocumentWorkflow),
|
|
44
40
|
__metadata("design:type", String)
|
|
45
41
|
], DocumentValidationExecution.prototype, "workflowId", void 0);
|
|
46
42
|
__decorate([
|
|
47
43
|
UuidProperty(),
|
|
48
|
-
|
|
44
|
+
TenantReference(() => DocumentValidationDefinition),
|
|
49
45
|
__metadata("design:type", String)
|
|
50
46
|
], DocumentValidationExecution.prototype, "definitionId", void 0);
|
|
51
47
|
__decorate([
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type EnumType } from '../../enumeration/enumeration.js';
|
|
2
|
-
import {
|
|
2
|
+
import { TenantEntity, type Timestamp, type Uuid } from '../../orm/index.js';
|
|
3
3
|
export declare const DocumentWorkflowStep: {
|
|
4
4
|
readonly Classification: "classification";
|
|
5
5
|
readonly Extraction: "extraction";
|
|
@@ -25,9 +25,8 @@ export declare const DocumentWorkflowFailReason: {
|
|
|
25
25
|
readonly NoSuitableRequest: "no-suitable-request";
|
|
26
26
|
};
|
|
27
27
|
export type DocumentWorkflowFailReason = EnumType<typeof DocumentWorkflowFailReason>;
|
|
28
|
-
export declare class DocumentWorkflow extends
|
|
29
|
-
static readonly entityName
|
|
30
|
-
tenantId: Uuid;
|
|
28
|
+
export declare class DocumentWorkflow extends TenantEntity {
|
|
29
|
+
static readonly entityName = "DocumentWorkflow";
|
|
31
30
|
documentId: Uuid;
|
|
32
31
|
step: DocumentWorkflowStep;
|
|
33
32
|
state: DocumentWorkflowState;
|
|
@@ -8,7 +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 { defineEnum } from '../../enumeration/enumeration.js';
|
|
11
|
-
import {
|
|
11
|
+
import { ForeignKey, Index, TenantEntity, TenantReference, TimestampProperty, Unique, UuidProperty } from '../../orm/index.js';
|
|
12
12
|
import { Enumeration } from '../../schema/index.js';
|
|
13
13
|
import { DocumentManagementTable } from './document-management-table.js';
|
|
14
14
|
import { Document } from './document.model.js';
|
|
@@ -34,8 +34,8 @@ export const DocumentWorkflowFailReason = defineEnum('DocumentWorkflowFailReason
|
|
|
34
34
|
NoSuitableCollection: 'no-suitable-collection',
|
|
35
35
|
NoSuitableRequest: 'no-suitable-request',
|
|
36
36
|
});
|
|
37
|
-
let DocumentWorkflow = class DocumentWorkflow extends
|
|
38
|
-
|
|
37
|
+
let DocumentWorkflow = class DocumentWorkflow extends TenantEntity {
|
|
38
|
+
static entityName = 'DocumentWorkflow';
|
|
39
39
|
documentId;
|
|
40
40
|
step;
|
|
41
41
|
state;
|
|
@@ -45,11 +45,7 @@ let DocumentWorkflow = class DocumentWorkflow extends Entity {
|
|
|
45
45
|
};
|
|
46
46
|
__decorate([
|
|
47
47
|
UuidProperty(),
|
|
48
|
-
|
|
49
|
-
], DocumentWorkflow.prototype, "tenantId", void 0);
|
|
50
|
-
__decorate([
|
|
51
|
-
UuidProperty(),
|
|
52
|
-
References(() => Document),
|
|
48
|
+
TenantReference(() => Document),
|
|
53
49
|
__metadata("design:type", String)
|
|
54
50
|
], DocumentWorkflow.prototype, "documentId", void 0);
|
|
55
51
|
__decorate([
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type EnumType } from '../../enumeration/enumeration.js';
|
|
2
|
-
import {
|
|
2
|
+
import { type NumericDate, TenantEntity, type Uuid } from '../../orm/index.js';
|
|
3
3
|
export declare const DocumentApproval: {
|
|
4
4
|
readonly Pending: "pending";
|
|
5
5
|
readonly Approved: "approved";
|
|
@@ -7,9 +7,8 @@ export declare const DocumentApproval: {
|
|
|
7
7
|
};
|
|
8
8
|
export type DocumentApproval = EnumType<typeof DocumentApproval>;
|
|
9
9
|
export type UpdatableDocumentProperties = keyof Pick<Document, 'typeId' | 'title' | 'subtitle' | 'date' | 'summary' | 'comment'>;
|
|
10
|
-
export declare class Document extends
|
|
11
|
-
static readonly entityName
|
|
12
|
-
tenantId: Uuid;
|
|
10
|
+
export declare class Document extends TenantEntity {
|
|
11
|
+
static readonly entityName = "Document";
|
|
13
12
|
typeId: Uuid | null;
|
|
14
13
|
title: string | null;
|
|
15
14
|
subtitle: string | null;
|
|
@@ -8,7 +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 { defineEnum } from '../../enumeration/enumeration.js';
|
|
11
|
-
import {
|
|
11
|
+
import { NumericDateProperty, TenantEntity, TenantReference, Unique, UuidProperty } from '../../orm/index.js';
|
|
12
12
|
import { Enumeration, Integer, StringProperty } from '../../schema/index.js';
|
|
13
13
|
import { DocumentManagementTable } from './document-management-table.js';
|
|
14
14
|
import { DocumentType } from './document-type.model.js';
|
|
@@ -17,8 +17,8 @@ export const DocumentApproval = defineEnum('DocumentApproval', {
|
|
|
17
17
|
Approved: 'approved',
|
|
18
18
|
Rejected: 'rejected',
|
|
19
19
|
});
|
|
20
|
-
let Document = class Document extends
|
|
21
|
-
|
|
20
|
+
let Document = class Document extends TenantEntity {
|
|
21
|
+
static entityName = 'Document';
|
|
22
22
|
typeId;
|
|
23
23
|
title;
|
|
24
24
|
subtitle;
|
|
@@ -33,13 +33,9 @@ let Document = class Document extends Entity {
|
|
|
33
33
|
size;
|
|
34
34
|
createUserId;
|
|
35
35
|
};
|
|
36
|
-
__decorate([
|
|
37
|
-
UuidProperty(),
|
|
38
|
-
__metadata("design:type", String)
|
|
39
|
-
], Document.prototype, "tenantId", void 0);
|
|
40
36
|
__decorate([
|
|
41
37
|
UuidProperty({ nullable: true }),
|
|
42
|
-
|
|
38
|
+
TenantReference(() => DocumentType),
|
|
43
39
|
__metadata("design:type", Object)
|
|
44
40
|
], Document.prototype, "typeId", void 0);
|
|
45
41
|
__decorate([
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
ALTER TABLE "document_management"."document" DROP CONSTRAINT "document_type_id_type_id_fk";
|
|
2
|
+
--> statement-breakpoint
|
|
3
|
+
ALTER TABLE "document_management"."assignment_scope" DROP CONSTRAINT "assignment_scope_task_id_assignment_task_id_fk";
|
|
4
|
+
--> statement-breakpoint
|
|
5
|
+
ALTER TABLE "document_management"."assignment_scope" DROP CONSTRAINT "assignment_scope_collection_id_collection_id_fk";
|
|
6
|
+
--> statement-breakpoint
|
|
7
|
+
ALTER TABLE "document_management"."assignment_task" DROP CONSTRAINT "assignment_task_document_id_document_id_fk";
|
|
8
|
+
--> statement-breakpoint
|
|
9
|
+
ALTER TABLE "document_management"."category" DROP CONSTRAINT "category_parent_id_category_id_fk";
|
|
10
|
+
--> statement-breakpoint
|
|
11
|
+
ALTER TABLE "document_management"."collection" DROP CONSTRAINT "collection_parent_id_collection_id_fk";
|
|
12
|
+
--> statement-breakpoint
|
|
13
|
+
ALTER TABLE "document_management"."collection_assignment" DROP CONSTRAINT "collection_assignment_collection_id_collection_id_fk";
|
|
14
|
+
--> statement-breakpoint
|
|
15
|
+
ALTER TABLE "document_management"."collection_assignment" DROP CONSTRAINT "collection_assignment_document_id_document_id_fk";
|
|
16
|
+
--> statement-breakpoint
|
|
17
|
+
ALTER TABLE "document_management"."property_value" DROP CONSTRAINT "property_value_document_id_document_id_fk";
|
|
18
|
+
--> statement-breakpoint
|
|
19
|
+
ALTER TABLE "document_management"."property_value" DROP CONSTRAINT "property_value_property_id_property_id_fk";
|
|
20
|
+
--> statement-breakpoint
|
|
21
|
+
ALTER TABLE "document_management"."request" DROP CONSTRAINT "request_type_id_type_id_fk";
|
|
22
|
+
--> statement-breakpoint
|
|
23
|
+
ALTER TABLE "document_management"."request" DROP CONSTRAINT "request_document_id_document_id_fk";
|
|
24
|
+
--> statement-breakpoint
|
|
25
|
+
ALTER TABLE "document_management"."request_collection_assignment" DROP CONSTRAINT "request_collection_assignment_request_id_request_id_fk";
|
|
26
|
+
--> statement-breakpoint
|
|
27
|
+
ALTER TABLE "document_management"."request_collection_assignment" DROP CONSTRAINT "request_collection_assignment_collection_id_collection_id_fk";
|
|
28
|
+
--> statement-breakpoint
|
|
29
|
+
ALTER TABLE "document_management"."request_template" DROP CONSTRAINT "request_template_requests_template_id_requests_template_id_fk";
|
|
30
|
+
--> statement-breakpoint
|
|
31
|
+
ALTER TABLE "document_management"."request_template" DROP CONSTRAINT "request_template_type_id_type_id_fk";
|
|
32
|
+
--> statement-breakpoint
|
|
33
|
+
ALTER TABLE "document_management"."tag_assignment" DROP CONSTRAINT "tag_assignment_document_id_document_id_fk";
|
|
34
|
+
--> statement-breakpoint
|
|
35
|
+
ALTER TABLE "document_management"."tag_assignment" DROP CONSTRAINT "tag_assignment_tag_id_tag_id_fk";
|
|
36
|
+
--> statement-breakpoint
|
|
37
|
+
ALTER TABLE "document_management"."type" DROP CONSTRAINT "type_category_id_category_id_fk";
|
|
38
|
+
--> statement-breakpoint
|
|
39
|
+
ALTER TABLE "document_management"."type_property" DROP CONSTRAINT "type_property_type_id_type_id_fk";
|
|
40
|
+
--> statement-breakpoint
|
|
41
|
+
ALTER TABLE "document_management"."type_property" DROP CONSTRAINT "type_property_property_id_property_id_fk";
|
|
42
|
+
--> statement-breakpoint
|
|
43
|
+
ALTER TABLE "document_management"."document_type_validation" DROP CONSTRAINT "document_type_validation_type_id_type_id_fk";
|
|
44
|
+
--> statement-breakpoint
|
|
45
|
+
ALTER TABLE "document_management"."document_type_validation" DROP CONSTRAINT "document_type_validation_validation_id_validation_definition_id_fk";
|
|
46
|
+
--> statement-breakpoint
|
|
47
|
+
ALTER TABLE "document_management"."validation_execution" DROP CONSTRAINT "validation_execution_workflow_id_workflow_id_fk";
|
|
48
|
+
--> statement-breakpoint
|
|
49
|
+
ALTER TABLE "document_management"."validation_execution" DROP CONSTRAINT "validation_execution_definition_id_validation_definition_id_fk";
|
|
50
|
+
--> statement-breakpoint
|
|
51
|
+
ALTER TABLE "document_management"."validation_execution_related_document" DROP CONSTRAINT "validation_execution_related_document_execution_id_validation_execution_id_fk";
|
|
52
|
+
--> statement-breakpoint
|
|
53
|
+
ALTER TABLE "document_management"."validation_execution_related_document" DROP CONSTRAINT "validation_execution_related_document_document_id_document_id_fk";
|
|
54
|
+
--> statement-breakpoint
|
|
55
|
+
ALTER TABLE "document_management"."workflow" DROP CONSTRAINT "workflow_document_id_document_id_fk";
|
|
56
|
+
ALTER TABLE "document_management"."document" DROP CONSTRAINT "document_pkey";--> statement-breakpoint
|
|
57
|
+
ALTER TABLE "document_management"."assignment_scope" DROP CONSTRAINT "assignment_scope_pkey";--> statement-breakpoint
|
|
58
|
+
ALTER TABLE "document_management"."assignment_task" DROP CONSTRAINT "assignment_task_pkey";--> statement-breakpoint
|
|
59
|
+
ALTER TABLE "document_management"."category" DROP CONSTRAINT "category_pkey";--> statement-breakpoint
|
|
60
|
+
ALTER TABLE "document_management"."category" ALTER COLUMN "tenant_id" SET NOT NULL;--> statement-breakpoint
|
|
61
|
+
ALTER TABLE "document_management"."collection" DROP CONSTRAINT "collection_pkey";--> statement-breakpoint
|
|
62
|
+
ALTER TABLE "document_management"."collection_assignment" DROP CONSTRAINT "collection_assignment_pkey";--> statement-breakpoint
|
|
63
|
+
ALTER TABLE "document_management"."property" DROP CONSTRAINT "property_pkey";--> statement-breakpoint
|
|
64
|
+
ALTER TABLE "document_management"."property" ALTER COLUMN "tenant_id" SET NOT NULL;--> statement-breakpoint
|
|
65
|
+
ALTER TABLE "document_management"."property_value" DROP CONSTRAINT "property_value_pkey";--> statement-breakpoint
|
|
66
|
+
ALTER TABLE "document_management"."request" DROP CONSTRAINT "request_pkey";--> statement-breakpoint
|
|
67
|
+
ALTER TABLE "document_management"."request_collection_assignment" DROP CONSTRAINT "request_collection_assignment_pkey";--> statement-breakpoint
|
|
68
|
+
ALTER TABLE "document_management"."request_template" DROP CONSTRAINT "request_template_pkey";--> statement-breakpoint
|
|
69
|
+
ALTER TABLE "document_management"."request_template" ALTER COLUMN "tenant_id" SET NOT NULL;--> statement-breakpoint
|
|
70
|
+
ALTER TABLE "document_management"."requests_template" DROP CONSTRAINT "requests_template_pkey";--> statement-breakpoint
|
|
71
|
+
ALTER TABLE "document_management"."requests_template" ALTER COLUMN "tenant_id" SET NOT NULL;--> statement-breakpoint
|
|
72
|
+
ALTER TABLE "document_management"."tag" DROP CONSTRAINT "tag_pkey";--> statement-breakpoint
|
|
73
|
+
ALTER TABLE "document_management"."tag" ALTER COLUMN "tenant_id" SET NOT NULL;--> statement-breakpoint
|
|
74
|
+
ALTER TABLE "document_management"."tag_assignment" DROP CONSTRAINT "tag_assignment_pkey";--> statement-breakpoint
|
|
75
|
+
ALTER TABLE "document_management"."type" DROP CONSTRAINT "type_pkey";--> statement-breakpoint
|
|
76
|
+
ALTER TABLE "document_management"."type" ALTER COLUMN "tenant_id" SET NOT NULL;--> statement-breakpoint
|
|
77
|
+
ALTER TABLE "document_management"."type_property" DROP CONSTRAINT "type_property_pkey";--> statement-breakpoint
|
|
78
|
+
ALTER TABLE "document_management"."type_property" ALTER COLUMN "tenant_id" SET NOT NULL;--> statement-breakpoint
|
|
79
|
+
ALTER TABLE "document_management"."document_type_validation" DROP CONSTRAINT "document_type_validation_pkey";--> statement-breakpoint
|
|
80
|
+
ALTER TABLE "document_management"."document_type_validation" ALTER COLUMN "tenant_id" SET NOT NULL;--> statement-breakpoint
|
|
81
|
+
ALTER TABLE "document_management"."validation_definition" DROP CONSTRAINT "validation_definition_pkey";--> statement-breakpoint
|
|
82
|
+
ALTER TABLE "document_management"."validation_definition" ALTER COLUMN "tenant_id" SET NOT NULL;--> statement-breakpoint
|
|
83
|
+
ALTER TABLE "document_management"."validation_execution" DROP CONSTRAINT "validation_execution_pkey";--> statement-breakpoint
|
|
84
|
+
ALTER TABLE "document_management"."validation_execution_related_document" DROP CONSTRAINT "validation_execution_related_document_pkey";--> statement-breakpoint
|
|
85
|
+
ALTER TABLE "document_management"."workflow" DROP CONSTRAINT "workflow_pkey";--> statement-breakpoint
|
|
86
|
+
ALTER TABLE "document_management"."document" ADD CONSTRAINT "document_tenant_id_id_pk" PRIMARY KEY("tenant_id","id");--> statement-breakpoint
|
|
87
|
+
ALTER TABLE "document_management"."assignment_scope" ADD CONSTRAINT "assignment_scope_tenant_id_id_pk" PRIMARY KEY("tenant_id","id");--> statement-breakpoint
|
|
88
|
+
ALTER TABLE "document_management"."assignment_task" ADD CONSTRAINT "assignment_task_tenant_id_id_pk" PRIMARY KEY("tenant_id","id");--> statement-breakpoint
|
|
89
|
+
ALTER TABLE "document_management"."category" ADD CONSTRAINT "category_tenant_id_id_pk" PRIMARY KEY("tenant_id","id");--> statement-breakpoint
|
|
90
|
+
ALTER TABLE "document_management"."collection" ADD CONSTRAINT "collection_tenant_id_id_pk" PRIMARY KEY("tenant_id","id");--> statement-breakpoint
|
|
91
|
+
ALTER TABLE "document_management"."collection_assignment" ADD CONSTRAINT "collection_assignment_tenant_id_id_pk" PRIMARY KEY("tenant_id","id");--> statement-breakpoint
|
|
92
|
+
ALTER TABLE "document_management"."property" ADD CONSTRAINT "property_tenant_id_id_pk" PRIMARY KEY("tenant_id","id");--> statement-breakpoint
|
|
93
|
+
ALTER TABLE "document_management"."property_value" ADD CONSTRAINT "property_value_tenant_id_id_pk" PRIMARY KEY("tenant_id","id");--> statement-breakpoint
|
|
94
|
+
ALTER TABLE "document_management"."request" ADD CONSTRAINT "request_tenant_id_id_pk" PRIMARY KEY("tenant_id","id");--> statement-breakpoint
|
|
95
|
+
ALTER TABLE "document_management"."request_collection_assignment" ADD CONSTRAINT "request_collection_assignment_tenant_id_id_pk" PRIMARY KEY("tenant_id","id");--> statement-breakpoint
|
|
96
|
+
ALTER TABLE "document_management"."request_template" ADD CONSTRAINT "request_template_tenant_id_id_pk" PRIMARY KEY("tenant_id","id");--> statement-breakpoint
|
|
97
|
+
ALTER TABLE "document_management"."requests_template" ADD CONSTRAINT "requests_template_tenant_id_id_pk" PRIMARY KEY("tenant_id","id");--> statement-breakpoint
|
|
98
|
+
ALTER TABLE "document_management"."tag" ADD CONSTRAINT "tag_tenant_id_id_pk" PRIMARY KEY("tenant_id","id");--> statement-breakpoint
|
|
99
|
+
ALTER TABLE "document_management"."tag_assignment" ADD CONSTRAINT "tag_assignment_tenant_id_id_pk" PRIMARY KEY("tenant_id","id");--> statement-breakpoint
|
|
100
|
+
ALTER TABLE "document_management"."type" ADD CONSTRAINT "type_tenant_id_id_pk" PRIMARY KEY("tenant_id","id");--> statement-breakpoint
|
|
101
|
+
ALTER TABLE "document_management"."type_property" ADD CONSTRAINT "type_property_tenant_id_id_pk" PRIMARY KEY("tenant_id","id");--> statement-breakpoint
|
|
102
|
+
ALTER TABLE "document_management"."document_type_validation" ADD CONSTRAINT "document_type_validation_tenant_id_id_pk" PRIMARY KEY("tenant_id","id");--> statement-breakpoint
|
|
103
|
+
ALTER TABLE "document_management"."validation_definition" ADD CONSTRAINT "validation_definition_tenant_id_id_pk" PRIMARY KEY("tenant_id","id");--> statement-breakpoint
|
|
104
|
+
ALTER TABLE "document_management"."validation_execution" ADD CONSTRAINT "validation_execution_tenant_id_id_pk" PRIMARY KEY("tenant_id","id");--> statement-breakpoint
|
|
105
|
+
ALTER TABLE "document_management"."validation_execution_related_document" ADD CONSTRAINT "validation_execution_related_document_tenant_id_id_pk" PRIMARY KEY("tenant_id","id");--> statement-breakpoint
|
|
106
|
+
ALTER TABLE "document_management"."workflow" ADD CONSTRAINT "workflow_tenant_id_id_pk" PRIMARY KEY("tenant_id","id");--> statement-breakpoint
|
|
107
|
+
ALTER TABLE "document_management"."document" ADD CONSTRAINT "document_id_fkey" FOREIGN KEY ("tenant_id","type_id") REFERENCES "document_management"."type"("tenant_id","id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
|
|
108
|
+
ALTER TABLE "document_management"."assignment_scope" ADD CONSTRAINT "assignment_scope_id_fkey" FOREIGN KEY ("tenant_id","collection_id") REFERENCES "document_management"."collection"("tenant_id","id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
|
|
109
|
+
ALTER TABLE "document_management"."assignment_task" ADD CONSTRAINT "assignment_task_id_fkey" FOREIGN KEY ("tenant_id","document_id") REFERENCES "document_management"."document"("tenant_id","id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
|
|
110
|
+
ALTER TABLE "document_management"."category" ADD CONSTRAINT "category_id_fkey" FOREIGN KEY ("tenant_id","parent_id") REFERENCES "document_management"."category"("tenant_id","id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
|
|
111
|
+
ALTER TABLE "document_management"."collection" ADD CONSTRAINT "collection_id_fkey" FOREIGN KEY ("tenant_id","parent_id") REFERENCES "document_management"."collection"("tenant_id","id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
|
|
112
|
+
ALTER TABLE "document_management"."collection_assignment" ADD CONSTRAINT "collection_assignment_id_fkey" FOREIGN KEY ("tenant_id","document_id") REFERENCES "document_management"."document"("tenant_id","id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
|
|
113
|
+
ALTER TABLE "document_management"."property_value" ADD CONSTRAINT "property_value_id_fkey" FOREIGN KEY ("tenant_id","property_id") REFERENCES "document_management"."property"("tenant_id","id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
|
|
114
|
+
ALTER TABLE "document_management"."request" ADD CONSTRAINT "request_id_fkey" FOREIGN KEY ("tenant_id","document_id") REFERENCES "document_management"."document"("tenant_id","id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
|
|
115
|
+
ALTER TABLE "document_management"."request_collection_assignment" ADD CONSTRAINT "request_collection_assignment_id_fkey" FOREIGN KEY ("tenant_id","collection_id") REFERENCES "document_management"."collection"("tenant_id","id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
|
|
116
|
+
ALTER TABLE "document_management"."request_template" ADD CONSTRAINT "request_template_id_fkey" FOREIGN KEY ("tenant_id","type_id") REFERENCES "document_management"."type"("tenant_id","id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
|
|
117
|
+
ALTER TABLE "document_management"."tag_assignment" ADD CONSTRAINT "tag_assignment_id_fkey" FOREIGN KEY ("tenant_id","tag_id") REFERENCES "document_management"."tag"("tenant_id","id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
|
|
118
|
+
ALTER TABLE "document_management"."type" ADD CONSTRAINT "type_id_fkey" FOREIGN KEY ("tenant_id","category_id") REFERENCES "document_management"."category"("tenant_id","id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
|
|
119
|
+
ALTER TABLE "document_management"."type_property" ADD CONSTRAINT "type_property_id_fkey" FOREIGN KEY ("tenant_id","property_id") REFERENCES "document_management"."property"("tenant_id","id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
|
|
120
|
+
ALTER TABLE "document_management"."document_type_validation" ADD CONSTRAINT "document_type_validation_id_fkey" FOREIGN KEY ("tenant_id","validation_id") REFERENCES "document_management"."validation_definition"("tenant_id","id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
|
|
121
|
+
ALTER TABLE "document_management"."validation_execution" ADD CONSTRAINT "validation_execution_id_fkey" FOREIGN KEY ("tenant_id","definition_id") REFERENCES "document_management"."validation_definition"("tenant_id","id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
|
|
122
|
+
ALTER TABLE "document_management"."validation_execution_related_document" ADD CONSTRAINT "validation_execution_related_document_id_fkey" FOREIGN KEY ("tenant_id","document_id") REFERENCES "document_management"."document"("tenant_id","id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
|
|
123
|
+
ALTER TABLE "document_management"."workflow" ADD CONSTRAINT "workflow_id_fkey" FOREIGN KEY ("tenant_id","document_id") REFERENCES "document_management"."document"("tenant_id","id") ON DELETE no action ON UPDATE no action;
|