@tstdl/base 0.93.61 → 0.93.64

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (101) hide show
  1. package/ai/genkit/helpers.d.ts +10 -0
  2. package/ai/genkit/helpers.js +14 -0
  3. package/ai/genkit/index.d.ts +2 -0
  4. package/ai/genkit/index.js +2 -0
  5. package/ai/genkit/module.d.ts +35 -0
  6. package/ai/genkit/module.js +56 -0
  7. package/ai/index.d.ts +1 -0
  8. package/ai/index.js +1 -0
  9. package/ai/prompts/format.d.ts +15 -0
  10. package/ai/prompts/format.js +17 -0
  11. package/ai/prompts/index.d.ts +3 -0
  12. package/ai/prompts/index.js +3 -0
  13. package/ai/prompts/instructions-formatter.d.ts +25 -0
  14. package/ai/prompts/instructions-formatter.js +166 -0
  15. package/ai/prompts/instructions.d.ts +3 -0
  16. package/ai/prompts/instructions.js +8 -0
  17. package/document-management/api/document-management.api.d.ts +8 -8
  18. package/document-management/models/document-assignment-scope.model.d.ts +3 -4
  19. package/document-management/models/document-assignment-scope.model.js +5 -9
  20. package/document-management/models/document-assignment-task.model.d.ts +3 -4
  21. package/document-management/models/document-assignment-task.model.js +4 -8
  22. package/document-management/models/document-category.model.d.ts +3 -4
  23. package/document-management/models/document-category.model.js +4 -8
  24. package/document-management/models/document-collection-assignment.model.d.ts +2 -3
  25. package/document-management/models/document-collection-assignment.model.js +4 -9
  26. package/document-management/models/document-collection.model.d.ts +3 -4
  27. package/document-management/models/document-collection.model.js +4 -8
  28. package/document-management/models/document-property-value.model.d.ts +3 -4
  29. package/document-management/models/document-property-value.model.js +5 -9
  30. package/document-management/models/document-property.model.d.ts +3 -4
  31. package/document-management/models/document-property.model.js +3 -7
  32. package/document-management/models/document-request-collection-assignment.model.d.ts +3 -4
  33. package/document-management/models/document-request-collection-assignment.model.js +5 -9
  34. package/document-management/models/document-request-template.d.ts +2 -3
  35. package/document-management/models/document-request-template.js +4 -9
  36. package/document-management/models/document-request.model.d.ts +3 -4
  37. package/document-management/models/document-request.model.js +5 -9
  38. package/document-management/models/document-requests-template.d.ts +2 -3
  39. package/document-management/models/document-requests-template.js +2 -7
  40. package/document-management/models/document-tag-assignment.model.d.ts +3 -4
  41. package/document-management/models/document-tag-assignment.model.js +5 -9
  42. package/document-management/models/document-tag.model.d.ts +3 -4
  43. package/document-management/models/document-tag.model.js +3 -7
  44. package/document-management/models/document-type-property.model.d.ts +2 -3
  45. package/document-management/models/document-type-property.model.js +4 -9
  46. package/document-management/models/document-type-validation.model.d.ts +2 -3
  47. package/document-management/models/document-type-validation.model.js +4 -9
  48. package/document-management/models/document-type.model.d.ts +3 -4
  49. package/document-management/models/document-type.model.js +4 -8
  50. package/document-management/models/document-validation-definition.model.d.ts +3 -4
  51. package/document-management/models/document-validation-definition.model.js +3 -7
  52. package/document-management/models/document-validation-execution-related-document.model.d.ts +3 -4
  53. package/document-management/models/document-validation-execution-related-document.model.js +5 -9
  54. package/document-management/models/document-validation-execution.model.d.ts +3 -4
  55. package/document-management/models/document-validation-execution.model.js +5 -9
  56. package/document-management/models/document-workflow.model.d.ts +3 -4
  57. package/document-management/models/document-workflow.model.js +4 -8
  58. package/document-management/models/document.model.d.ts +3 -4
  59. package/document-management/models/document.model.js +4 -8
  60. package/document-management/server/drizzle/0001_lyrical_wong.sql +123 -0
  61. package/document-management/server/drizzle/meta/0001_snapshot.json +2728 -0
  62. package/document-management/server/drizzle/meta/_journal.json +7 -0
  63. package/document-management/server/services/document-category-type.service.d.ts +6 -6
  64. package/document-management/server/services/document-category-type.service.js +6 -6
  65. package/document-management/server/services/document-file.service.d.ts +2 -0
  66. package/document-management/server/services/document-file.service.js +10 -9
  67. package/document-management/server/services/document-management-ai.service.d.ts +1 -0
  68. package/document-management/server/services/document-management-ai.service.js +268 -135
  69. package/document-management/server/services/document-management.service.d.ts +2 -2
  70. package/document-management/server/services/document-property.service.d.ts +4 -4
  71. package/document-management/server/services/document-property.service.js +3 -3
  72. package/document-management/server/services/document-request.service.d.ts +2 -2
  73. package/document-management/server/services/document-request.service.js +1 -1
  74. package/document-management/server/services/document-tag.service.d.ts +1 -1
  75. package/document-management/server/services/document-tag.service.js +2 -2
  76. package/document-management/server/services/document-validation.service.js +6 -6
  77. package/document-management/server/services/document.service.js +2 -7
  78. package/document-management/service-models/document-management.view-model.d.ts +1 -1
  79. package/document-management/service-models/document-management.view-model.js +1 -1
  80. package/document-management/service-models/document.service-model.d.ts +4 -4
  81. package/document-management/service-models/enriched/enriched-document-category.view.d.ts +1 -1
  82. package/document-management/service-models/enriched/enriched-document-type.view.d.ts +1 -1
  83. package/examples/document-management/main.js +6 -0
  84. package/json-path/json-path.js +1 -1
  85. package/orm/decorators.d.ts +18 -7
  86. package/orm/decorators.js +10 -2
  87. package/orm/entity.d.ts +2 -2
  88. package/orm/entity.js +2 -0
  89. package/orm/server/drizzle/schema-converter.d.ts +3 -3
  90. package/orm/server/drizzle/schema-converter.js +22 -5
  91. package/orm/server/repository.js +4 -6
  92. package/package.json +11 -7
  93. package/pdf/utils.js +1 -1
  94. package/schema/converters/zod-converter.d.ts +1 -1
  95. package/schema/converters/zod-converter.js +2 -13
  96. package/schema/converters/zod-v3-converter.d.ts +3 -3
  97. package/utils/file-reader.d.ts +0 -1
  98. package/utils/file-reader.js +4 -7
  99. package/utils/object/object.d.ts +4 -2
  100. package/utils/object/object.js +30 -21
  101. package/utils/stream/from-promise.js +2 -2
@@ -7,29 +7,24 @@ 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 { Entity, ForeignKey, Index, References, TimestampProperty, Unique, UuidProperty } from '../../orm/index.js';
10
+ import { ForeignKey, Index, TenantEntity, TenantReference, TimestampProperty, Unique, UuidProperty } from '../../orm/index.js';
11
11
  import { DocumentCollection } from './document-collection.model.js';
12
12
  import { DocumentManagementTable } from './document-management-table.js';
13
13
  import { Document } from './document.model.js';
14
- let DocumentCollectionAssignment = class DocumentCollectionAssignment extends Entity {
15
- tenantId;
14
+ let DocumentCollectionAssignment = class DocumentCollectionAssignment extends TenantEntity {
16
15
  collectionId;
17
16
  documentId;
18
17
  archiveTimestamp;
19
18
  };
20
19
  __decorate([
21
20
  UuidProperty(),
22
- __metadata("design:type", String)
23
- ], DocumentCollectionAssignment.prototype, "tenantId", void 0);
24
- __decorate([
25
- UuidProperty(),
26
- References(() => DocumentCollection),
21
+ TenantReference(() => DocumentCollection),
27
22
  Index(),
28
23
  __metadata("design:type", String)
29
24
  ], DocumentCollectionAssignment.prototype, "collectionId", void 0);
30
25
  __decorate([
31
26
  UuidProperty(),
32
- References(() => Document),
27
+ TenantReference(() => Document),
33
28
  __metadata("design:type", String)
34
29
  ], DocumentCollectionAssignment.prototype, "documentId", void 0);
35
30
  __decorate([
@@ -1,6 +1,5 @@
1
- import { Entity, type Uuid } from '../../orm/index.js';
2
- export declare class DocumentCollection extends Entity {
3
- static readonly entityName: 'DocumentCollection';
4
- tenantId: Uuid;
1
+ import { TenantEntity, type Uuid } from '../../orm/index.js';
2
+ export declare class DocumentCollection extends TenantEntity {
3
+ static readonly entityName = "DocumentCollection";
5
4
  parentId: Uuid | null;
6
5
  }
@@ -7,19 +7,15 @@ 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 { Entity, References, Unique, UuidProperty } from '../../orm/index.js';
10
+ import { TenantEntity, TenantReference, Unique, UuidProperty } from '../../orm/index.js';
11
11
  import { DocumentManagementTable } from './document-management-table.js';
12
- let DocumentCollection = class DocumentCollection extends Entity {
13
- tenantId;
12
+ let DocumentCollection = class DocumentCollection extends TenantEntity {
13
+ static entityName = 'DocumentCollection';
14
14
  parentId;
15
15
  };
16
- __decorate([
17
- UuidProperty(),
18
- __metadata("design:type", String)
19
- ], DocumentCollection.prototype, "tenantId", void 0);
20
16
  __decorate([
21
17
  UuidProperty({ nullable: true }),
22
- References(() => DocumentCollection),
18
+ TenantReference(() => DocumentCollection),
23
19
  __metadata("design:type", Object)
24
20
  ], DocumentCollection.prototype, "parentId", void 0);
25
21
  DocumentCollection = __decorate([
@@ -1,7 +1,6 @@
1
- import { Entity, type NumericDate, type Uuid } from '../../orm/index.js';
2
- export declare class DocumentPropertyValue extends Entity {
3
- static readonly entityName: 'DocumentPropertyValue';
4
- tenantId: Uuid;
1
+ import { type NumericDate, TenantEntity, type Uuid } from '../../orm/index.js';
2
+ export declare class DocumentPropertyValue extends TenantEntity {
3
+ static readonly entityName = "DocumentPropertyValue";
5
4
  documentId: Uuid;
6
5
  propertyId: Uuid;
7
6
  text: string | null;
@@ -8,13 +8,13 @@ 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 { eq, sql } from 'drizzle-orm';
11
- import { Check, Entity, ForeignKey, NumericDateProperty, numNonNulls, References, Unique, UuidProperty } from '../../orm/index.js';
11
+ import { Check, ForeignKey, NumericDateProperty, numNonNulls, TenantEntity, TenantReference, Unique, UuidProperty } from '../../orm/index.js';
12
12
  import { BooleanProperty, Integer, NumberProperty, StringProperty } from '../../schema/index.js';
13
13
  import { DocumentManagementTable } from './document-management-table.js';
14
14
  import { DocumentProperty } from './document-property.model.js';
15
15
  import { Document } from './document.model.js';
16
- let DocumentPropertyValue = class DocumentPropertyValue extends Entity {
17
- tenantId;
16
+ let DocumentPropertyValue = class DocumentPropertyValue extends TenantEntity {
17
+ static entityName = 'DocumentPropertyValue';
18
18
  documentId;
19
19
  propertyId;
20
20
  text;
@@ -25,16 +25,12 @@ let DocumentPropertyValue = class DocumentPropertyValue extends Entity {
25
25
  };
26
26
  __decorate([
27
27
  UuidProperty(),
28
- __metadata("design:type", String)
29
- ], DocumentPropertyValue.prototype, "tenantId", void 0);
30
- __decorate([
31
- UuidProperty(),
32
- References(() => Document),
28
+ TenantReference(() => Document),
33
29
  __metadata("design:type", String)
34
30
  ], DocumentPropertyValue.prototype, "documentId", void 0);
35
31
  __decorate([
36
32
  UuidProperty(),
37
- References(() => DocumentProperty),
33
+ TenantReference(() => DocumentProperty),
38
34
  __metadata("design:type", String)
39
35
  ], DocumentPropertyValue.prototype, "propertyId", void 0);
40
36
  __decorate([
@@ -1,5 +1,5 @@
1
1
  import { type EnumType } from '../../enumeration/enumeration.js';
2
- import { Entity, type Enum } from '../../orm/index.js';
2
+ import { type Enum, TenantEntity } from '../../orm/index.js';
3
3
  export declare const DocumentPropertyDataType: {
4
4
  readonly Text: "text";
5
5
  readonly Integer: "integer";
@@ -8,9 +8,8 @@ export declare const DocumentPropertyDataType: {
8
8
  readonly Date: "date";
9
9
  };
10
10
  export type DocumentPropertyDataType = EnumType<typeof DocumentPropertyDataType>;
11
- export declare class DocumentProperty extends Entity {
12
- static readonly entityName: 'DocumentProperty';
13
- tenantId: string | null;
11
+ export declare class DocumentProperty extends TenantEntity {
12
+ static readonly entityName = "DocumentProperty";
14
13
  label: string;
15
14
  dataType: Enum<DocumentPropertyDataType>;
16
15
  }
@@ -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 { Entity, Unique, UuidProperty } from '../../orm/index.js';
11
+ import { TenantEntity, Unique } from '../../orm/index.js';
12
12
  import { Enumeration, StringProperty } from '../../schema/index.js';
13
13
  import { DocumentManagementTable } from './document-management-table.js';
14
14
  export const DocumentPropertyDataType = defineEnum('DocumentPropertyDataType', {
@@ -18,15 +18,11 @@ export const DocumentPropertyDataType = defineEnum('DocumentPropertyDataType', {
18
18
  Boolean: 'boolean',
19
19
  Date: 'date',
20
20
  });
21
- let DocumentProperty = class DocumentProperty extends Entity {
22
- tenantId;
21
+ let DocumentProperty = class DocumentProperty extends TenantEntity {
22
+ static entityName = 'DocumentProperty';
23
23
  label;
24
24
  dataType;
25
25
  };
26
- __decorate([
27
- UuidProperty({ nullable: true }),
28
- __metadata("design:type", Object)
29
- ], DocumentProperty.prototype, "tenantId", void 0);
30
26
  __decorate([
31
27
  StringProperty(),
32
28
  Unique(),
@@ -1,7 +1,6 @@
1
- import { Entity, type Uuid } from '../../orm/index.js';
2
- export declare class DocumentRequestCollectionAssignment extends Entity {
3
- static readonly entityName: 'DocumentRequestCollectionAssignment';
4
- tenantId: Uuid;
1
+ import { TenantEntity, type Uuid } from '../../orm/index.js';
2
+ export declare class DocumentRequestCollectionAssignment extends TenantEntity {
3
+ static readonly entityName = "DocumentRequestCollectionAssignment";
5
4
  requestId: Uuid;
6
5
  collectionId: 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 { Entity, ForeignKey, Index, References, Unique, UuidProperty } from '../../orm/index.js';
10
+ import { ForeignKey, Index, TenantEntity, TenantReference, Unique, UuidProperty } from '../../orm/index.js';
11
11
  import { DocumentCollection } from './document-collection.model.js';
12
12
  import { DocumentManagementTable } from './document-management-table.js';
13
13
  import { DocumentRequest } from './document-request.model.js';
14
- let DocumentRequestCollectionAssignment = class DocumentRequestCollectionAssignment extends Entity {
15
- tenantId;
14
+ let DocumentRequestCollectionAssignment = class DocumentRequestCollectionAssignment extends TenantEntity {
15
+ static entityName = 'DocumentRequestCollectionAssignment';
16
16
  requestId;
17
17
  collectionId;
18
18
  };
19
19
  __decorate([
20
20
  UuidProperty(),
21
- __metadata("design:type", String)
22
- ], DocumentRequestCollectionAssignment.prototype, "tenantId", void 0);
23
- __decorate([
24
- UuidProperty(),
25
- References(() => DocumentRequest),
21
+ TenantReference(() => DocumentRequest),
26
22
  __metadata("design:type", String)
27
23
  ], DocumentRequestCollectionAssignment.prototype, "requestId", void 0);
28
24
  __decorate([
29
25
  UuidProperty(),
30
- References(() => DocumentCollection),
26
+ TenantReference(() => DocumentCollection),
31
27
  Index(),
32
28
  __metadata("design:type", String)
33
29
  ], DocumentRequestCollectionAssignment.prototype, "collectionId", void 0);
@@ -1,7 +1,6 @@
1
- import { Entity, type Uuid } from '../../orm/index.js';
1
+ import { TenantEntity, type Uuid } from '../../orm/index.js';
2
2
  import type { DocumentRequest } from './document-request.model.js';
3
- export declare class DocumentRequestTemplate extends Entity implements Pick<DocumentRequest, 'typeId' | 'comment'> {
4
- tenantId: string | null;
3
+ export declare class DocumentRequestTemplate extends TenantEntity implements Pick<DocumentRequest, 'typeId' | 'comment'> {
5
4
  requestsTemplateId: Uuid;
6
5
  typeId: Uuid;
7
6
  comment: string | null;
@@ -7,29 +7,24 @@ 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 { Entity, References, UuidProperty } from '../../orm/index.js';
10
+ import { TenantEntity, TenantReference, UuidProperty } from '../../orm/index.js';
11
11
  import { StringProperty } from '../../schema/index.js';
12
12
  import { DocumentManagementTable } from './document-management-table.js';
13
13
  import { DocumentRequestsTemplate } from './document-requests-template.js';
14
14
  import { DocumentType } from './document-type.model.js';
15
- let DocumentRequestTemplate = class DocumentRequestTemplate extends Entity {
16
- tenantId;
15
+ let DocumentRequestTemplate = class DocumentRequestTemplate extends TenantEntity {
17
16
  requestsTemplateId;
18
17
  typeId;
19
18
  comment;
20
19
  };
21
- __decorate([
22
- UuidProperty({ nullable: true }),
23
- __metadata("design:type", Object)
24
- ], DocumentRequestTemplate.prototype, "tenantId", void 0);
25
20
  __decorate([
26
21
  UuidProperty(),
27
- References(() => DocumentRequestsTemplate),
22
+ TenantReference(() => DocumentRequestsTemplate),
28
23
  __metadata("design:type", String)
29
24
  ], DocumentRequestTemplate.prototype, "requestsTemplateId", void 0);
30
25
  __decorate([
31
26
  UuidProperty(),
32
- References(() => DocumentType),
27
+ TenantReference(() => DocumentType),
33
28
  __metadata("design:type", String)
34
29
  ], DocumentRequestTemplate.prototype, "typeId", void 0);
35
30
  __decorate([
@@ -1,5 +1,5 @@
1
1
  import { type EnumType } from '../../enumeration/enumeration.js';
2
- import { Entity, type Uuid } from '../../orm/index.js';
2
+ import { TenantEntity, type Uuid } from '../../orm/index.js';
3
3
  export declare const DocumentRequestState: {
4
4
  /** No document or pending document */
5
5
  readonly Open: "open";
@@ -9,9 +9,8 @@ export declare const DocumentRequestState: {
9
9
  readonly Closed: "closed";
10
10
  };
11
11
  export type DocumentRequestState = EnumType<typeof DocumentRequestState>;
12
- export declare class DocumentRequest extends Entity {
13
- static readonly entityName: 'DocumentRequest';
14
- tenantId: Uuid;
12
+ export declare class DocumentRequest extends TenantEntity {
13
+ static readonly entityName = "DocumentRequest";
15
14
  typeId: Uuid | null;
16
15
  documentId: Uuid | null;
17
16
  comment: 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 { Entity, ForeignKey, Index, References, Unique, UuidProperty } from '../../orm/index.js';
11
+ import { ForeignKey, Index, TenantEntity, TenantReference, 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 { DocumentType } from './document-type.model.js';
@@ -21,26 +21,22 @@ export const DocumentRequestState = defineEnum('DocumentRequestState', {
21
21
  /** Request canceled without document or with rejected document */
22
22
  Closed: 'closed',
23
23
  });
24
- let DocumentRequest = class DocumentRequest extends Entity {
25
- tenantId;
24
+ let DocumentRequest = class DocumentRequest extends TenantEntity {
25
+ static entityName = 'DocumentRequest';
26
26
  typeId;
27
27
  documentId;
28
28
  comment;
29
29
  state;
30
30
  };
31
- __decorate([
32
- UuidProperty(),
33
- __metadata("design:type", String)
34
- ], DocumentRequest.prototype, "tenantId", void 0);
35
31
  __decorate([
36
32
  UuidProperty({ nullable: true }),
37
- References(() => DocumentType),
33
+ TenantReference(() => DocumentType),
38
34
  Index(),
39
35
  __metadata("design:type", Object)
40
36
  ], DocumentRequest.prototype, "typeId", void 0);
41
37
  __decorate([
42
38
  UuidProperty({ nullable: true }),
43
- References(() => Document),
39
+ TenantReference(() => Document),
44
40
  Unique(),
45
41
  __metadata("design:type", Object)
46
42
  ], DocumentRequest.prototype, "documentId", void 0);
@@ -1,6 +1,5 @@
1
- import { Entity } from '../../orm/index.js';
2
- export declare class DocumentRequestsTemplate extends Entity {
3
- tenantId: string | null;
1
+ import { TenantEntity } from '../../orm/index.js';
2
+ export declare class DocumentRequestsTemplate extends TenantEntity {
4
3
  label: string;
5
4
  description: string | null;
6
5
  }
@@ -7,18 +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 { Entity, UuidProperty } from '../../orm/index.js';
10
+ import { TenantEntity } from '../../orm/index.js';
11
11
  import { StringProperty } from '../../schema/index.js';
12
12
  import { DocumentManagementTable } from './document-management-table.js';
13
- let DocumentRequestsTemplate = class DocumentRequestsTemplate extends Entity {
14
- tenantId;
13
+ let DocumentRequestsTemplate = class DocumentRequestsTemplate extends TenantEntity {
15
14
  label;
16
15
  description;
17
16
  };
18
- __decorate([
19
- UuidProperty({ nullable: true }),
20
- __metadata("design:type", Object)
21
- ], DocumentRequestsTemplate.prototype, "tenantId", void 0);
22
17
  __decorate([
23
18
  StringProperty(),
24
19
  __metadata("design:type", String)
@@ -1,7 +1,6 @@
1
- import { Entity, type Uuid } from '../../orm/index.js';
2
- export declare class DocumentTagAssignment extends Entity {
3
- static readonly entityName: 'DocumentTagAssignment';
4
- tenantId: Uuid;
1
+ import { TenantEntity, type Uuid } from '../../orm/index.js';
2
+ export declare class DocumentTagAssignment extends TenantEntity {
3
+ static readonly entityName = "DocumentTagAssignment";
5
4
  documentId: Uuid;
6
5
  tagId: 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 { Entity, ForeignKey, References, Unique, UuidProperty } from '../../orm/index.js';
10
+ import { ForeignKey, TenantEntity, TenantReference, Unique, UuidProperty } from '../../orm/index.js';
11
11
  import { DocumentManagementTable } from './document-management-table.js';
12
12
  import { DocumentTag } from './document-tag.model.js';
13
13
  import { Document } from './document.model.js';
14
- let DocumentTagAssignment = class DocumentTagAssignment extends Entity {
15
- tenantId;
14
+ let DocumentTagAssignment = class DocumentTagAssignment extends TenantEntity {
15
+ static entityName = 'DocumentTagAssignment';
16
16
  documentId;
17
17
  tagId;
18
18
  };
19
19
  __decorate([
20
20
  UuidProperty(),
21
- __metadata("design:type", String)
22
- ], DocumentTagAssignment.prototype, "tenantId", void 0);
23
- __decorate([
24
- UuidProperty(),
25
- References(() => Document),
21
+ TenantReference(() => Document),
26
22
  __metadata("design:type", String)
27
23
  ], DocumentTagAssignment.prototype, "documentId", void 0);
28
24
  __decorate([
29
25
  UuidProperty(),
30
- References(() => DocumentTag),
26
+ TenantReference(() => DocumentTag),
31
27
  __metadata("design:type", String)
32
28
  ], DocumentTagAssignment.prototype, "tagId", void 0);
33
29
  DocumentTagAssignment = __decorate([
@@ -1,6 +1,5 @@
1
- import { Entity } from '../../orm/index.js';
2
- export declare class DocumentTag extends Entity {
3
- static readonly entityName: 'DocumentTag';
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 { Entity, Unique, UuidProperty } from '../../orm/index.js';
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 Entity {
14
- tenantId;
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 { Entity, type Uuid } from '../../orm/index.js';
2
- export declare class DocumentTypeProperty extends Entity {
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 { Entity, References, Unique, UuidProperty } from '../../orm/index.js';
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 Entity {
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
- References(() => DocumentType),
20
+ TenantReference(() => DocumentType),
26
21
  __metadata("design:type", String)
27
22
  ], DocumentTypeProperty.prototype, "typeId", void 0);
28
23
  __decorate([
29
24
  UuidProperty(),
30
- References(() => DocumentProperty),
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 { Entity, type Uuid } from '../../orm/index.js';
2
- export declare class DocumentTypeValidation extends Entity {
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 { Entity, Index, References, Unique, UuidProperty } from '../../orm/index.js';
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 Entity {
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
- References(() => DocumentType),
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
- References(() => DocumentValidationDefinition),
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 { Entity, type Uuid } from '../../orm/index.js';
2
- export declare class DocumentType extends Entity {
3
- static readonly entityName: 'DocumentType';
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 { Entity, References, Unique, UuidProperty } from '../../orm/index.js';
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 Entity {
15
- tenantId;
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
- References(() => DocumentCategory),
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 { Entity, type Json } from '../../orm/index.js';
1
+ import { type Json, TenantEntity } from '../../orm/index.js';
2
2
  import type { Record } from '../../types/index.js';
3
- export declare class DocumentValidationDefinition extends Entity {
4
- static readonly entityName: 'DocumentValidationDefinition';
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 { Entity, JsonProperty, UuidProperty } from '../../orm/index.js';
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 Entity {
14
- tenantId;
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)
@@ -1,7 +1,6 @@
1
- import { Entity, type Uuid } from '../../orm/index.js';
2
- export declare class DocumentValidationExecutionRelatedDocument extends Entity {
3
- static readonly entityName: 'DocumentValidationExecutionRelatedDocument';
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
  }