@tstdl/base 0.92.123 → 0.92.125

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 (221) hide show
  1. package/ai/ai-file.service.js +23 -18
  2. package/ai/ai.service.d.ts +4 -12
  3. package/ai/ai.service.js +79 -147
  4. package/ai/functions.d.ts +1 -1
  5. package/ai/types.d.ts +3 -1
  6. package/api/server/gateway.js +6 -6
  7. package/authentication/authentication.api.js +24 -24
  8. package/authentication/server/authentication.service.js +20 -20
  9. package/browser/page-controller.js +1 -1
  10. package/context/context.js +5 -5
  11. package/document-management/api/document-management.api.d.ts +60 -215
  12. package/document-management/api/document-management.api.js +32 -68
  13. package/document-management/models/document-assignment-scope.model.d.ts +11 -0
  14. package/document-management/models/{document-request-assignment-task-collection.model.js → document-assignment-scope.model.js} +14 -10
  15. package/document-management/models/document-assignment-task.model.d.ts +13 -0
  16. package/document-management/models/document-assignment-task.model.js +38 -0
  17. package/document-management/models/document-category.model.d.ts +2 -0
  18. package/document-management/models/document-category.model.js +7 -1
  19. package/document-management/models/{document-collection-document.model.d.ts → document-collection-assignment.model.d.ts} +1 -1
  20. package/document-management/models/{document-collection-document.model.js → document-collection-assignment.model.js} +7 -7
  21. package/document-management/models/document-collection.model.d.ts +2 -0
  22. package/document-management/models/document-collection.model.js +10 -0
  23. package/document-management/models/document-property-value.model.d.ts +3 -11
  24. package/document-management/models/document-property-value.model.js +15 -46
  25. package/document-management/models/document-property.model.d.ts +2 -1
  26. package/document-management/models/document-property.model.js +2 -2
  27. package/document-management/models/document-request-submission.model.d.ts +7 -0
  28. package/document-management/models/document-request-submission.model.js +34 -0
  29. package/document-management/models/document-request-template.d.ts +2 -4
  30. package/document-management/models/document-request-template.js +3 -8
  31. package/document-management/models/document-request.model.d.ts +14 -6
  32. package/document-management/models/document-request.model.js +22 -12
  33. package/document-management/models/document-type-validation.model.d.ts +6 -0
  34. package/document-management/models/document-type-validation.model.js +34 -0
  35. package/document-management/models/document-type.model.d.ts +0 -1
  36. package/document-management/models/document-type.model.js +0 -5
  37. package/document-management/models/document-validation-definition.model.d.ts +10 -0
  38. package/document-management/models/document-validation-definition.model.js +39 -0
  39. package/document-management/models/document-validation-execution-related-document.model.d.ts +7 -0
  40. package/document-management/models/document-validation-execution-related-document.model.js +34 -0
  41. package/document-management/models/document-validation-execution.model.d.ts +26 -0
  42. package/document-management/models/document-validation-execution.model.js +72 -0
  43. package/document-management/models/document-workflow.model.d.ts +35 -0
  44. package/document-management/models/document-workflow.model.js +70 -0
  45. package/document-management/models/document.model.d.ts +12 -1
  46. package/document-management/models/document.model.js +21 -5
  47. package/document-management/models/index.d.ts +10 -5
  48. package/document-management/models/index.js +10 -5
  49. package/document-management/models/service-models/categories-and-types.view-model.d.ts +3 -3
  50. package/document-management/models/service-models/categories-and-types.view-model.js +2 -21
  51. package/document-management/models/service-models/document-folders.view-model.d.ts +7 -14
  52. package/document-management/models/service-models/document-folders.view-model.js +20 -44
  53. package/document-management/models/service-models/document-management.view-model.d.ts +41 -0
  54. package/document-management/models/service-models/{document.view-model.js → document-management.view-model.js} +43 -26
  55. package/document-management/models/service-models/document.service-model.d.ts +51 -81
  56. package/document-management/models/service-models/document.service-model.js +30 -28
  57. package/document-management/models/service-models/enriched/enriched-document-assignment.view.d.ts +11 -0
  58. package/document-management/models/service-models/enriched/enriched-document-assignment.view.js +12 -0
  59. package/document-management/models/service-models/enriched/enriched-document-category.view.d.ts +13 -0
  60. package/document-management/models/service-models/enriched/enriched-document-category.view.js +47 -0
  61. package/document-management/models/service-models/enriched/enriched-document-collection.view.d.ts +22 -0
  62. package/document-management/models/service-models/enriched/enriched-document-collection.view.js +89 -0
  63. package/document-management/models/service-models/enriched/enriched-document-file.view.d.ts +12 -0
  64. package/document-management/models/service-models/enriched/enriched-document-file.view.js +16 -0
  65. package/document-management/models/service-models/enriched/enriched-document-management-data.view.d.ts +41 -0
  66. package/document-management/models/service-models/enriched/enriched-document-management-data.view.js +130 -0
  67. package/document-management/models/service-models/enriched/enriched-document-request.view.d.ts +17 -0
  68. package/document-management/models/service-models/enriched/enriched-document-request.view.js +52 -0
  69. package/document-management/models/service-models/enriched/enriched-document-type.view.d.ts +9 -0
  70. package/document-management/models/service-models/enriched/enriched-document-type.view.js +10 -0
  71. package/document-management/models/service-models/enriched/enriched-document.view.d.ts +28 -0
  72. package/document-management/models/service-models/enriched/enriched-document.view.js +77 -0
  73. package/document-management/models/service-models/enriched/enriched.d.ts +18 -0
  74. package/document-management/models/service-models/enriched/enriched.js +39 -0
  75. package/document-management/models/service-models/enriched/index.d.ts +9 -0
  76. package/document-management/models/service-models/enriched/index.js +9 -0
  77. package/document-management/models/service-models/index.d.ts +2 -2
  78. package/document-management/models/service-models/index.js +2 -2
  79. package/document-management/models/service-models/normalized-requests-template-data.model.d.ts +12 -10
  80. package/document-management/models/service-models/normalized-requests-template-data.model.js +5 -4
  81. package/document-management/models/service-models/stats.view-model.d.ts +7 -5
  82. package/document-management/models/service-models/stats.view-model.js +19 -9
  83. package/document-management/server/module.d.ts +2 -2
  84. package/document-management/server/module.js +3 -7
  85. package/document-management/server/schemas.d.ts +18 -23
  86. package/document-management/server/schemas.js +18 -23
  87. package/document-management/server/services/document-category-type.service.d.ts +25 -0
  88. package/document-management/server/services/document-category-type.service.js +66 -0
  89. package/document-management/server/services/document-collection.service.d.ts +13 -0
  90. package/document-management/server/services/document-collection.service.js +41 -0
  91. package/document-management/server/services/document-file.service.d.ts +17 -0
  92. package/document-management/server/services/document-file.service.js +204 -0
  93. package/document-management/server/services/document-management-ai.service.d.ts +22 -0
  94. package/document-management/server/services/document-management-ai.service.js +340 -0
  95. package/document-management/server/services/document-management-ancillary.service.d.ts +127 -3
  96. package/document-management/server/services/document-management-ancillary.service.js +24 -0
  97. package/document-management/server/services/document-management.service.d.ts +10 -122
  98. package/document-management/server/services/document-management.service.js +106 -888
  99. package/document-management/server/services/document-property.service.d.ts +84 -0
  100. package/document-management/server/services/document-property.service.js +87 -0
  101. package/document-management/server/services/document-request.service.d.ts +30 -0
  102. package/document-management/server/services/document-request.service.js +138 -0
  103. package/document-management/server/services/document-validation.service.d.ts +20 -0
  104. package/document-management/server/services/document-validation.service.js +145 -0
  105. package/document-management/server/services/document-workflow.service.d.ts +20 -0
  106. package/document-management/server/services/document-workflow.service.js +132 -0
  107. package/document-management/server/services/document.service.d.ts +16 -0
  108. package/document-management/server/services/document.service.js +81 -0
  109. package/document-management/server/services/index.d.ts +9 -0
  110. package/document-management/server/services/index.js +9 -0
  111. package/document-management/server/validators/ai-validation-executor.d.ts +19 -0
  112. package/document-management/server/validators/ai-validation-executor.js +51 -0
  113. package/document-management/server/validators/index.d.ts +2 -0
  114. package/document-management/server/validators/index.js +2 -0
  115. package/document-management/server/validators/single-document-validation-executor.d.ts +16 -0
  116. package/document-management/server/validators/single-document-validation-executor.js +20 -0
  117. package/document-management/server/validators/validator.d.ts +21 -0
  118. package/document-management/server/validators/validator.js +2 -0
  119. package/eslint.config.js +31 -17
  120. package/examples/document-management/main.d.ts +18 -3
  121. package/examples/document-management/main.js +28 -12
  122. package/file/mime-type.js +2 -9
  123. package/formats.d.ts +5 -2
  124. package/formats.js +32 -23
  125. package/http/client/http-client.js +1 -1
  126. package/injector/injector.js +2 -2
  127. package/object-storage/s3/s3.object-storage.js +1 -1
  128. package/orm/data-types/bytea.d.ts +8 -0
  129. package/orm/data-types/bytea.js +8 -0
  130. package/orm/data-types/index.d.ts +4 -0
  131. package/orm/data-types/index.js +4 -0
  132. package/orm/data-types/numeric-date.d.ts +9 -0
  133. package/orm/data-types/numeric-date.js +9 -0
  134. package/orm/data-types/timestamp.d.ts +9 -0
  135. package/orm/data-types/timestamp.js +9 -0
  136. package/orm/decorators.d.ts +139 -5
  137. package/orm/decorators.js +50 -0
  138. package/orm/entity.d.ts +19 -0
  139. package/orm/entity.js +19 -0
  140. package/orm/index.d.ts +5 -0
  141. package/orm/index.js +5 -0
  142. package/orm/query.d.ts +51 -0
  143. package/orm/query.js +6 -0
  144. package/orm/repository.types.d.ts +54 -2
  145. package/orm/server/database-schema.d.ts +34 -0
  146. package/orm/server/database-schema.js +29 -0
  147. package/orm/server/database.d.ts +19 -1
  148. package/orm/server/database.js +17 -3
  149. package/orm/server/drizzle/schema-converter.d.ts +2 -1
  150. package/orm/server/drizzle/schema-converter.js +12 -1
  151. package/orm/server/encryption.d.ts +16 -0
  152. package/orm/server/encryption.js +29 -4
  153. package/orm/server/index.d.ts +7 -0
  154. package/orm/server/index.js +7 -0
  155. package/orm/server/module.d.ts +20 -0
  156. package/orm/server/module.js +9 -0
  157. package/orm/server/query-converter.d.ts +17 -0
  158. package/orm/server/query-converter.js +66 -11
  159. package/orm/server/repository.d.ts +324 -18
  160. package/orm/server/repository.js +344 -73
  161. package/orm/server/transaction.d.ts +5 -5
  162. package/orm/server/transaction.js +5 -5
  163. package/orm/server/transactional.d.ts +75 -0
  164. package/orm/server/transactional.js +134 -0
  165. package/orm/server/types.d.ts +1 -0
  166. package/orm/sqls.d.ts +55 -0
  167. package/orm/sqls.js +60 -0
  168. package/orm/types.d.ts +67 -4
  169. package/orm/utils.d.ts +19 -3
  170. package/orm/utils.js +12 -0
  171. package/package.json +32 -31
  172. package/password/password-check-result.model.d.ts +9 -7
  173. package/password/password-check-result.model.js +8 -8
  174. package/password/password-check.js +5 -7
  175. package/password/password-check.localization.js +12 -12
  176. package/pdf/pdf.service.js +1 -1
  177. package/pdf/utils.d.ts +9 -0
  178. package/pdf/utils.js +19 -2
  179. package/process/spawn.d.ts +11 -4
  180. package/process/spawn.js +42 -5
  181. package/queue/postgres/queue.js +5 -5
  182. package/queue/queue.d.ts +6 -4
  183. package/queue/queue.js +6 -6
  184. package/schema/schemas/one-or-many.d.ts +2 -1
  185. package/schema/schemas/one-or-many.js +1 -1
  186. package/search-index/elastic/model/index-mapping.d.ts +1 -1
  187. package/search-index/elastic/model/index-mapping.js +0 -1
  188. package/search-index/elastic/search-index.d.ts +1 -2
  189. package/search-index/elastic/search-index.js +3 -3
  190. package/types.d.ts +1 -0
  191. package/utils/async-hook/async-hook.d.ts +9 -0
  192. package/utils/async-hook/async-hook.js +21 -0
  193. package/utils/async-hook/index.d.ts +1 -0
  194. package/utils/async-hook/index.js +1 -0
  195. package/utils/compression.js +1 -1
  196. package/utils/function/class.d.ts +6 -0
  197. package/utils/function/class.js +9 -0
  198. package/utils/function/index.d.ts +1 -0
  199. package/utils/function/index.js +1 -0
  200. package/utils/function/memoize.d.ts +18 -0
  201. package/utils/function/memoize.js +41 -2
  202. package/utils/jwt.d.ts +1 -1
  203. package/utils/jwt.js +5 -5
  204. package/utils/object/forward-ref.d.ts +3 -2
  205. package/utils/object/forward-ref.js +12 -12
  206. package/utils/object/lazy-property.js +2 -2
  207. package/utils/proxy.js +1 -1
  208. package/utils/stream/{readable-stream-from-promise.d.ts → from-promise.d.ts} +1 -0
  209. package/utils/stream/from-promise.js +27 -0
  210. package/utils/stream/index.d.ts +1 -1
  211. package/utils/stream/index.js +1 -1
  212. package/utils/stream/stream-reader.js +71 -31
  213. package/document-management/models/document-request-assignment-task-collection.model.d.ts +0 -7
  214. package/document-management/models/document-request-assignment-task.model.d.ts +0 -14
  215. package/document-management/models/document-request-assignment-task.model.js +0 -77
  216. package/document-management/models/document-request-file.model.d.ts +0 -16
  217. package/document-management/models/document-request-file.model.js +0 -86
  218. package/document-management/models/service-models/document.view-model.d.ts +0 -41
  219. package/document-management/models/service-models/normalized-document-collection-view.model.d.ts +0 -73
  220. package/document-management/models/service-models/normalized-document-collection-view.model.js +0 -110
  221. package/utils/stream/readable-stream-from-promise.js +0 -8
@@ -1,11 +1,12 @@
1
1
  import { EntityMetadata } from '../../../orm/entity.js';
2
- import { array, assign, nullable, object, omit, oneOrMany, optional, partial, pick, record, string, unknown } from '../../../schema/index.js';
2
+ import { array, assign, boolean, enumeration, never, nullable, number, object, omit, oneOrMany, optional, partial, pick, string, union } from '../../../schema/index.js';
3
+ import { DocumentAssignmentTarget } from '../document-assignment-task.model.js';
3
4
  import { DocumentCategory } from '../document-category.model.js';
4
- import { DocumentCollectionDocument } from '../document-collection-document.model.js';
5
+ import { DocumentCollectionAssignment } from '../document-collection-assignment.model.js';
6
+ import { DocumentCollection } from '../document-collection.model.js';
5
7
  import { DocumentFile } from '../document-file.model.js';
6
- import { DocumentPropertyValueBase } from '../document-property-value.model.js';
8
+ import { DocumentPropertyValue } from '../document-property-value.model.js';
7
9
  import { DocumentProperty } from '../document-property.model.js';
8
- import { DocumentRequestFile } from '../document-request-file.model.js';
9
10
  import { DocumentRequestTemplate } from '../document-request-template.js';
10
11
  import { DocumentRequest } from '../document-request.model.js';
11
12
  import { DocumentRequestsTemplate } from '../document-requests-template.js';
@@ -14,42 +15,43 @@ import { DocumentType } from '../document-type.model.js';
14
15
  import { Document } from '../document.model.js';
15
16
  export const metadataParameterSchema = optional(partial(pick(EntityMetadata, 'attributes')));
16
17
  export const metadataParameterObjectSchema = object({ metadata: metadataParameterSchema });
17
- export const setDocumentPropertyParametersSchema = assign(pick(DocumentPropertyValueBase, ['propertyId']), object({ value: unknown() }), metadataParameterObjectSchema);
18
- export const createDocumentParametersSchema = assign(pick(Document, ['typeId', 'title', 'subtitle', 'pages', 'date', 'summary', 'tags', 'validated']), pick(DocumentFile, ['originalFileName']), object({
19
- collectionIds: oneOrMany(string()),
20
- properties: optional(array(setDocumentPropertyParametersSchema))
18
+ export const setDocumentPropertyParametersSchema = assign(pick(DocumentPropertyValue, ['propertyId']), object({ value: union(string(), number(), boolean(), nullable(never())) }), metadataParameterObjectSchema);
19
+ export const createDocumentParametersSchema = assign(pick(Document, ['typeId', 'title', 'subtitle', 'date', 'summary', 'tags', 'approval', 'comment', 'createUserId']), pick(DocumentFile, ['originalFileName']), object({
20
+ assignment: union(object({ collections: oneOrMany(string(), { minimum: 1 }) }), object({ request: string() }), object({
21
+ automatic: object({
22
+ /** collection ids to assign in */
23
+ scope: oneOrMany(string(), { minimum: 1 }),
24
+ target: enumeration(DocumentAssignmentTarget),
25
+ }),
26
+ })),
27
+ properties: optional(array(setDocumentPropertyParametersSchema)),
21
28
  }), metadataParameterObjectSchema);
22
29
  export const updateDocumentParametersSchema = assign(pick(Document, ['id']), partial(omit(Document, ['id', 'metadata'])), object({ properties: optional(array(setDocumentPropertyParametersSchema)) }), metadataParameterObjectSchema);
30
+ export const approveDocumentParametersSchema = assign(pick(Document, ['id', 'comment']), metadataParameterObjectSchema);
31
+ export const rejectDocumentParametersSchema = assign(pick(Document, ['id', 'comment']), metadataParameterObjectSchema);
23
32
  export const createDocumentRequestsTemplateParametersSchema = assign(pick(DocumentRequestsTemplate, ['label', 'description']), metadataParameterObjectSchema);
24
33
  export const updateDocumentRequestsTemplateParametersSchema = assign(pick(DocumentRequestsTemplate, ['id']), partial(omit(DocumentRequestsTemplate, ['id', 'metadata'])), metadataParameterObjectSchema);
25
34
  export const applyDocumentRequestsTemplateParametersSchema = assign(pick(DocumentRequestsTemplate, ['id']), object({ collectionIds: array(string()) }), metadataParameterObjectSchema);
26
35
  export const deleteDocumentRequestsTemplateParametersSchema = assign(pick(DocumentRequestsTemplate, ['id']), metadataParameterObjectSchema);
27
- export const createDocumentRequestTemplateParametersSchema = assign(pick(DocumentRequestTemplate, ['requestsTemplateId', 'typeId', 'requiredFilesCount', 'comment']), metadataParameterObjectSchema);
36
+ export const createDocumentRequestTemplateParametersSchema = assign(pick(DocumentRequestTemplate, ['requestsTemplateId', 'typeId', 'comment']), metadataParameterObjectSchema);
28
37
  export const updateDocumentRequestTemplateParametersSchema = assign(pick(DocumentRequestTemplate, ['id']), partial(omit(DocumentRequestTemplate, ['id', 'requestsTemplateId', 'metadata'])), metadataParameterObjectSchema);
29
38
  export const deleteDocumentRequestTemplateParametersSchema = assign(pick(DocumentRequestTemplate, ['id']), metadataParameterObjectSchema);
30
- export const createDocumentRequestParametersSchema = assign(pick(DocumentRequest, ['typeId', 'requiredFilesCount', 'comment']), object({ collectionIds: array(string()) }), metadataParameterObjectSchema);
31
- export const updateDocumentRequestParametersSchema = assign(pick(DocumentRequest, ['id']), partial(omit(DocumentRequest, ['id', 'metadata'])), metadataParameterObjectSchema);
39
+ export const createDocumentRequestParametersSchema = assign(pick(DocumentRequest, ['typeId', 'comment']), object({ collectionIds: array(string()) }), metadataParameterObjectSchema);
40
+ export const updateDocumentRequestParametersSchema = assign(pick(DocumentRequest, ['id']), partial(pick(DocumentRequest, ['typeId', 'comment'])), metadataParameterObjectSchema);
32
41
  export const deleteDocumentRequestParametersSchema = assign(pick(DocumentRequest, ['id']), metadataParameterObjectSchema);
33
- export const updateDocumentRequestFileParametersSchema = assign(pick(DocumentRequestFile, ['id']), partial(omit(DocumentRequestFile, ['id', 'requestId', 'fileId', 'createdDocumentId', 'approval', 'metadata'])), metadataParameterObjectSchema);
34
- export const deleteDocumentRequestFileParametersSchema = assign(pick(DocumentRequestFile, ['id']), metadataParameterObjectSchema);
35
- export const loadDataCollectionMetadataParametersSchema = object({ name: optional(nullable(string())), group: optional(nullable(string())) });
36
- export const loadDataCollectionsMetadataParametersSchema = record(string(), loadDataCollectionMetadataParametersSchema);
37
- export const loadDataParametersSchema = object({ collectionIds: oneOrMany(string()), collectionsMetadata: loadDataCollectionsMetadataParametersSchema });
38
- export const createCollectionParametersSchema = metadataParameterObjectSchema;
42
+ export const loadDataParametersSchema = object({ collectionIds: oneOrMany(string()) });
43
+ export const createCollectionParametersSchema = assign(pick(DocumentCollection, ['parentId']), metadataParameterObjectSchema);
39
44
  export const setDocumentPropertiesParametersSchema = object({
40
- documentId: optional(string()),
41
- requestFileId: optional(string()),
42
- requestAssignmentTaskId: optional(string()),
43
- properties: array(setDocumentPropertyParametersSchema)
45
+ documentId: string(),
46
+ properties: array(setDocumentPropertyParametersSchema),
44
47
  });
45
- export const createDocumentCategoryParametersSchema = assign(pick(DocumentCategory, ['label']), metadataParameterObjectSchema);
46
- export const createDocumentTypeParametersSchema = assign(pick(DocumentType, ['categoryId', 'group', 'label']), metadataParameterObjectSchema);
47
- export const createDocumentRequestFileParametersSchema = assign(object({ requestId: string() }), pick(DocumentRequestFile, ['title', 'subtitle', 'pages', 'date', 'summary', 'tags']), pick(DocumentFile, ['originalFileName']), metadataParameterObjectSchema);
48
- export const approveDocumentRequestFileParametersSchema = assign(pick(DocumentRequestFile, ['id', 'approvalComment']), object({
48
+ export const createDocumentCategoryParametersSchema = assign(pick(DocumentCategory, ['parentId', 'label']), metadataParameterObjectSchema);
49
+ export const createDocumentTypeParametersSchema = assign(pick(DocumentType, ['categoryId', 'label']), metadataParameterObjectSchema);
50
+ export const approveDocumentRequestParametersSchema = assign(pick(DocumentRequest, ['id', 'comment']), object({
49
51
  documentMetadata: metadataParameterSchema,
50
- requestFileMetadata: metadataParameterSchema
52
+ requestMetadata: metadataParameterSchema,
51
53
  }));
52
- export const rejectDocumentRequestFileParametersSchema = assign(pick(DocumentRequestFile, ['id', 'approvalComment']), metadataParameterObjectSchema);
54
+ export const rejectDocumentRequestParametersSchema = assign(pick(DocumentRequest, ['id', 'comment']), metadataParameterObjectSchema);
53
55
  export const createDocumentPropertyParametersSchema = assign(pick(DocumentProperty, ['label', 'dataType']), metadataParameterObjectSchema);
54
56
  export const assignPropertyToTypeParametersSchema = assign(pick(DocumentTypeProperty, ['typeId', 'propertyId']), metadataParameterObjectSchema);
55
- export const addOrArchiveDocumentToOrFromCollectionParametersSchema = assign(pick(DocumentCollectionDocument, ['collectionId', 'documentId']), metadataParameterObjectSchema);
57
+ export const addOrArchiveDocumentToOrFromCollectionParametersSchema = assign(pick(DocumentCollectionAssignment, ['collectionId', 'documentId']), metadataParameterObjectSchema);
@@ -0,0 +1,11 @@
1
+ import type { TypedOmit } from '../../../../types.js';
2
+ import type { DocumentCollectionAssignment } from '../../document-collection-assignment.model.js';
3
+ import type { EnrichedDocumentCollection } from './enriched-document-collection.view.js';
4
+ import type { EnrichedDocument } from './enriched-document.view.js';
5
+ export declare class EnrichedDocumentAssignment implements TypedOmit<DocumentCollectionAssignment, 'collectionId' | 'documentId' | 'metadata'> {
6
+ readonly id: string;
7
+ readonly collection: EnrichedDocumentCollection;
8
+ readonly document: EnrichedDocument;
9
+ readonly archiveTimestamp: number | null;
10
+ constructor(id: string, collection: EnrichedDocumentCollection, document: EnrichedDocument, archiveTimestamp: number | null);
11
+ }
@@ -0,0 +1,12 @@
1
+ export class EnrichedDocumentAssignment {
2
+ id;
3
+ collection;
4
+ document;
5
+ archiveTimestamp;
6
+ constructor(id, collection, document, archiveTimestamp) {
7
+ this.id = id;
8
+ this.collection = collection;
9
+ this.document = document;
10
+ this.archiveTimestamp = archiveTimestamp;
11
+ }
12
+ }
@@ -0,0 +1,13 @@
1
+ import type { DocumentCategory } from '../../document-category.model.js';
2
+ import { EnrichedDocumentType } from './enriched-document-type.view.js';
3
+ import type { EnrichedDocumentManagementData } from './enriched-document-management-data.view.js';
4
+ export declare class EnrichedDocumentCategory implements Pick<DocumentCategory, 'id' | 'label'> {
5
+ #private;
6
+ readonly id: string;
7
+ readonly label: string;
8
+ readonly parent: EnrichedDocumentCategory | null;
9
+ get children(): EnrichedDocumentCategory[];
10
+ get childrenDeep(): EnrichedDocumentCategory[];
11
+ get types(): EnrichedDocumentType[];
12
+ constructor(data: EnrichedDocumentManagementData, category: DocumentCategory, parent: EnrichedDocumentCategory | null);
13
+ }
@@ -0,0 +1,47 @@
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 { Memoize } from '../../../../utils/function/memoize.js';
11
+ import { EnrichedDocumentType } from './enriched-document-type.view.js';
12
+ export class EnrichedDocumentCategory {
13
+ #data;
14
+ id;
15
+ label;
16
+ parent;
17
+ get children() {
18
+ return this.#data.rawData.categories.filter((category) => category.parentId == this.id).map((category) => new EnrichedDocumentCategory(this.#data, category, this));
19
+ }
20
+ get childrenDeep() {
21
+ return this.children.flatMap((child) => [child, ...child.childrenDeep]);
22
+ }
23
+ get types() {
24
+ return this.#data.rawData.types.filter((type) => type.categoryId == this.id).map((type) => new EnrichedDocumentType(type, this));
25
+ }
26
+ constructor(data, category, parent) {
27
+ this.#data = data;
28
+ this.id = category.id;
29
+ this.label = category.label;
30
+ this.parent = parent;
31
+ }
32
+ }
33
+ __decorate([
34
+ Memoize(),
35
+ __metadata("design:type", Array),
36
+ __metadata("design:paramtypes", [])
37
+ ], EnrichedDocumentCategory.prototype, "children", null);
38
+ __decorate([
39
+ Memoize(),
40
+ __metadata("design:type", Array),
41
+ __metadata("design:paramtypes", [])
42
+ ], EnrichedDocumentCategory.prototype, "childrenDeep", null);
43
+ __decorate([
44
+ Memoize(),
45
+ __metadata("design:type", Array),
46
+ __metadata("design:paramtypes", [])
47
+ ], EnrichedDocumentCategory.prototype, "types", null);
@@ -0,0 +1,22 @@
1
+ import type { TypedOmit } from '../../../../types.js';
2
+ import type { DocumentCollectionView } from '../document-management.view-model.js';
3
+ import type { EnrichedDocumentManagementData } from './enriched-document-management-data.view.js';
4
+ import type { EnrichedDocumentRequest } from './enriched-document-request.view.js';
5
+ import type { EnrichedDocument } from './enriched-document.view.js';
6
+ import { type RequestsStats } from './enriched.js';
7
+ export declare class EnrichedDocumentCollection implements TypedOmit<DocumentCollectionView, 'parentId' | 'metadata'> {
8
+ #private;
9
+ readonly id: string;
10
+ readonly name: string;
11
+ readonly group: string | null;
12
+ readonly parent: EnrichedDocumentCollection | null;
13
+ get children(): EnrichedDocumentCollection[];
14
+ get childrenDeep(): EnrichedDocumentCollection[];
15
+ get documents(): EnrichedDocument[];
16
+ get documentsDeep(): EnrichedDocument[];
17
+ get requests(): EnrichedDocumentRequest[];
18
+ get requestsDeep(): EnrichedDocumentRequest[];
19
+ get requestsStats(): RequestsStats;
20
+ get requestsStatsDeep(): RequestsStats;
21
+ constructor(data: EnrichedDocumentManagementData, collectionView: DocumentCollectionView, parent: EnrichedDocumentCollection | null);
22
+ }
@@ -0,0 +1,89 @@
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 { Memoize } from '../../../../utils/function/memoize.js';
11
+ import { calculateRequestsStats, mergeRequestsStats } from './enriched.js';
12
+ export class EnrichedDocumentCollection {
13
+ #data;
14
+ id;
15
+ name;
16
+ group;
17
+ parent;
18
+ get children() {
19
+ return this.#data.collections.filter((collection) => collection.parent?.id == this.id);
20
+ }
21
+ get childrenDeep() {
22
+ return this.children.flatMap((child) => [child, ...child.childrenDeep]);
23
+ }
24
+ get documents() {
25
+ return this.#data.documents.filter((document) => document.assignments.some((assignment) => assignment.collection.id == this.id));
26
+ }
27
+ get documentsDeep() {
28
+ return [...this.documents, ...this.children.flatMap((child) => child.documentsDeep)];
29
+ }
30
+ get requests() {
31
+ return this.#data.requests.filter((request) => request.collections.some((collection) => collection.id == this.id));
32
+ }
33
+ get requestsDeep() {
34
+ return [...this.requests, ...this.children.flatMap((child) => child.requestsDeep)];
35
+ }
36
+ get requestsStats() {
37
+ return calculateRequestsStats(this.requests);
38
+ }
39
+ get requestsStatsDeep() {
40
+ return mergeRequestsStats(this.children.map((child) => child.requestsStatsDeep));
41
+ }
42
+ constructor(data, collectionView, parent) {
43
+ this.#data = data;
44
+ this.id = collectionView.id;
45
+ this.name = collectionView.name;
46
+ this.group = collectionView.group;
47
+ this.parent = parent;
48
+ }
49
+ }
50
+ __decorate([
51
+ Memoize(),
52
+ __metadata("design:type", Array),
53
+ __metadata("design:paramtypes", [])
54
+ ], EnrichedDocumentCollection.prototype, "children", null);
55
+ __decorate([
56
+ Memoize(),
57
+ __metadata("design:type", Array),
58
+ __metadata("design:paramtypes", [])
59
+ ], EnrichedDocumentCollection.prototype, "childrenDeep", null);
60
+ __decorate([
61
+ Memoize(),
62
+ __metadata("design:type", Array),
63
+ __metadata("design:paramtypes", [])
64
+ ], EnrichedDocumentCollection.prototype, "documents", null);
65
+ __decorate([
66
+ Memoize(),
67
+ __metadata("design:type", Array),
68
+ __metadata("design:paramtypes", [])
69
+ ], EnrichedDocumentCollection.prototype, "documentsDeep", null);
70
+ __decorate([
71
+ Memoize(),
72
+ __metadata("design:type", Array),
73
+ __metadata("design:paramtypes", [])
74
+ ], EnrichedDocumentCollection.prototype, "requests", null);
75
+ __decorate([
76
+ Memoize(),
77
+ __metadata("design:type", Array),
78
+ __metadata("design:paramtypes", [])
79
+ ], EnrichedDocumentCollection.prototype, "requestsDeep", null);
80
+ __decorate([
81
+ Memoize(),
82
+ __metadata("design:type", Object),
83
+ __metadata("design:paramtypes", [])
84
+ ], EnrichedDocumentCollection.prototype, "requestsStats", null);
85
+ __decorate([
86
+ Memoize(),
87
+ __metadata("design:type", Object),
88
+ __metadata("design:paramtypes", [])
89
+ ], EnrichedDocumentCollection.prototype, "requestsStatsDeep", null);
@@ -0,0 +1,12 @@
1
+ import type { TypedOmit } from '../../../../types.js';
2
+ import type { DocumentFile } from '../../document-file.model.js';
3
+ import type { EnrichedDocument } from './enriched-document.view.js';
4
+ export declare class EnrichedDocumentFile implements TypedOmit<DocumentFile, 'metadata'> {
5
+ readonly id: string;
6
+ readonly originalFileName: string | null;
7
+ readonly mimeType: string;
8
+ readonly hash: string;
9
+ readonly size: number;
10
+ readonly document: EnrichedDocument;
11
+ constructor(file: DocumentFile, document: EnrichedDocument);
12
+ }
@@ -0,0 +1,16 @@
1
+ export class EnrichedDocumentFile {
2
+ id;
3
+ originalFileName;
4
+ mimeType;
5
+ hash;
6
+ size;
7
+ document;
8
+ constructor(file, document) {
9
+ this.id = file.id;
10
+ this.originalFileName = file.originalFileName;
11
+ this.mimeType = file.mimeType;
12
+ this.hash = file.hash;
13
+ this.size = file.size;
14
+ this.document = document;
15
+ }
16
+ }
@@ -0,0 +1,41 @@
1
+ import type { DocumentManagementData } from '../document-management.view-model.js';
2
+ import { EnrichedDocumentCategory } from './enriched-document-category.view.js';
3
+ import { EnrichedDocumentCollection } from './enriched-document-collection.view.js';
4
+ import { EnrichedDocumentRequest } from './enriched-document-request.view.js';
5
+ import type { EnrichedDocumentType } from './enriched-document-type.view.js';
6
+ import { EnrichedDocument } from './enriched-document.view.js';
7
+ import { type RequestsStats } from './enriched.js';
8
+ export declare class EnrichedCollectionsGroup {
9
+ readonly group: string | null;
10
+ readonly collections: EnrichedDocumentCollection[];
11
+ get requestsStats(): RequestsStats;
12
+ constructor(group: string | null, collections: EnrichedDocumentCollection[]);
13
+ }
14
+ export declare class EnrichedDocumentManagementData {
15
+ readonly rawData: DocumentManagementData;
16
+ readonly rawDataMaps: {
17
+ collections: Map<string, import("../document-management.view-model.js").DocumentCollectionView>;
18
+ documents: Map<string, import("../document-management.view-model.js").DocumentView>;
19
+ requests: Map<string, import("../document-management.view-model.js").DocumentRequestView>;
20
+ files: Map<string, import("../../document-file.model.js").DocumentFile>;
21
+ categories: Map<string, import("../../document-category.model.js").DocumentCategory>;
22
+ types: Map<string, import("../../document-type.model.js").DocumentType>;
23
+ };
24
+ readonly maps: {
25
+ collections: Map<string, EnrichedDocumentCollection>;
26
+ documents: Map<string, EnrichedDocument>;
27
+ requests: Map<string, EnrichedDocumentRequest>;
28
+ categories: Map<string, EnrichedDocumentCategory>;
29
+ types: Map<string, EnrichedDocumentType>;
30
+ };
31
+ get rootCollections(): EnrichedDocumentCollection[];
32
+ get collections(): EnrichedDocumentCollection[];
33
+ get groupedCollections(): EnrichedCollectionsGroup[];
34
+ get documents(): EnrichedDocument[];
35
+ get requests(): EnrichedDocumentRequest[];
36
+ get rootCategories(): EnrichedDocumentCategory[];
37
+ get categories(): EnrichedDocumentCategory[];
38
+ get types(): EnrichedDocumentType[];
39
+ get requestsStats(): RequestsStats;
40
+ constructor(data: DocumentManagementData);
41
+ }
@@ -0,0 +1,130 @@
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 { getEntityMap } from '../../../../orm/utils.js';
11
+ import { Memoize } from '../../../../utils/function/memoize.js';
12
+ import { group } from '../../../../utils/iterable-helpers/group.js';
13
+ import { lazyObject } from '../../../../utils/object/lazy-property.js';
14
+ import { isNull } from '../../../../utils/type-guards.js';
15
+ import { EnrichedDocumentCategory } from './enriched-document-category.view.js';
16
+ import { EnrichedDocumentCollection } from './enriched-document-collection.view.js';
17
+ import { EnrichedDocumentRequest } from './enriched-document-request.view.js';
18
+ import { EnrichedDocument } from './enriched-document.view.js';
19
+ import { calculateRequestsStats, mergeRequestsStats } from './enriched.js';
20
+ export class EnrichedCollectionsGroup {
21
+ group;
22
+ collections;
23
+ get requestsStats() {
24
+ return mergeRequestsStats(this.collections.map((collection) => collection.requestsStats));
25
+ }
26
+ constructor(group, collections) {
27
+ this.group = group;
28
+ this.collections = collections;
29
+ }
30
+ }
31
+ __decorate([
32
+ Memoize(),
33
+ __metadata("design:type", Object),
34
+ __metadata("design:paramtypes", [])
35
+ ], EnrichedCollectionsGroup.prototype, "requestsStats", null);
36
+ ;
37
+ export class EnrichedDocumentManagementData {
38
+ rawData;
39
+ rawDataMaps = lazyObject({
40
+ collections: () => getEntityMap(this.rawData.collections),
41
+ documents: () => getEntityMap(this.rawData.documents),
42
+ requests: () => getEntityMap(this.rawData.requests),
43
+ files: () => getEntityMap(this.rawData.files),
44
+ categories: () => getEntityMap(this.rawData.categories),
45
+ types: () => getEntityMap(this.rawData.types),
46
+ });
47
+ maps = lazyObject({
48
+ collections: () => getEntityMap(this.collections),
49
+ documents: () => getEntityMap(this.documents),
50
+ requests: () => getEntityMap(this.requests),
51
+ categories: () => getEntityMap(this.categories),
52
+ types: () => getEntityMap(this.types),
53
+ });
54
+ get rootCollections() {
55
+ return this.rawData.collections.filter((collection) => isNull(collection.parentId)).map((collection) => new EnrichedDocumentCollection(this, collection, null));
56
+ }
57
+ get collections() {
58
+ return this.rootCollections.flatMap((collection) => [collection, ...collection.childrenDeep]);
59
+ }
60
+ get groupedCollections() {
61
+ const groups = [...group(this.collections, (collection) => collection.group)];
62
+ return groups.map(([group, collections]) => new EnrichedCollectionsGroup(group, collections));
63
+ }
64
+ get documents() {
65
+ return this.rawData.documents.map((document) => new EnrichedDocument(this, document));
66
+ }
67
+ get requests() {
68
+ return this.rawData.requests.map((request) => new EnrichedDocumentRequest(this, request));
69
+ }
70
+ get rootCategories() {
71
+ return this.rawData.categories.filter((category) => isNull(category.parentId)).map((category) => new EnrichedDocumentCategory(this, category, null));
72
+ }
73
+ get categories() {
74
+ return this.rootCategories.flatMap((category) => [category, ...category.childrenDeep]);
75
+ }
76
+ get types() {
77
+ return this.categories.flatMap((category) => category.types);
78
+ }
79
+ get requestsStats() {
80
+ return calculateRequestsStats(this.requests);
81
+ }
82
+ constructor(data) {
83
+ this.rawData = data;
84
+ }
85
+ }
86
+ __decorate([
87
+ Memoize(),
88
+ __metadata("design:type", Array),
89
+ __metadata("design:paramtypes", [])
90
+ ], EnrichedDocumentManagementData.prototype, "rootCollections", null);
91
+ __decorate([
92
+ Memoize(),
93
+ __metadata("design:type", Array),
94
+ __metadata("design:paramtypes", [])
95
+ ], EnrichedDocumentManagementData.prototype, "collections", null);
96
+ __decorate([
97
+ Memoize(),
98
+ __metadata("design:type", Array),
99
+ __metadata("design:paramtypes", [])
100
+ ], EnrichedDocumentManagementData.prototype, "groupedCollections", null);
101
+ __decorate([
102
+ Memoize(),
103
+ __metadata("design:type", Array),
104
+ __metadata("design:paramtypes", [])
105
+ ], EnrichedDocumentManagementData.prototype, "documents", null);
106
+ __decorate([
107
+ Memoize(),
108
+ __metadata("design:type", Array),
109
+ __metadata("design:paramtypes", [])
110
+ ], EnrichedDocumentManagementData.prototype, "requests", null);
111
+ __decorate([
112
+ Memoize(),
113
+ __metadata("design:type", Array),
114
+ __metadata("design:paramtypes", [])
115
+ ], EnrichedDocumentManagementData.prototype, "rootCategories", null);
116
+ __decorate([
117
+ Memoize(),
118
+ __metadata("design:type", Array),
119
+ __metadata("design:paramtypes", [])
120
+ ], EnrichedDocumentManagementData.prototype, "categories", null);
121
+ __decorate([
122
+ Memoize(),
123
+ __metadata("design:type", Array),
124
+ __metadata("design:paramtypes", [])
125
+ ], EnrichedDocumentManagementData.prototype, "types", null);
126
+ __decorate([
127
+ Memoize(),
128
+ __metadata("design:type", Object),
129
+ __metadata("design:paramtypes", [])
130
+ ], EnrichedDocumentManagementData.prototype, "requestsStats", null);
@@ -0,0 +1,17 @@
1
+ import type { TypedOmit } from '../../../../types.js';
2
+ import type { DocumentRequestState } from '../../document-request.model.js';
3
+ import type { DocumentRequestView } from '../document-management.view-model.js';
4
+ import type { EnrichedDocumentCollection } from './enriched-document-collection.view.js';
5
+ import type { EnrichedDocumentManagementData } from './enriched-document-management-data.view.js';
6
+ import type { EnrichedDocumentType } from './enriched-document-type.view.js';
7
+ import type { EnrichedDocument } from './enriched-document.view.js';
8
+ export declare class EnrichedDocumentRequest implements TypedOmit<DocumentRequestView, 'typeId' | 'documentId' | 'document' | 'collectionIds' | 'metadata'> {
9
+ #private;
10
+ readonly id: string;
11
+ readonly comment: string | null;
12
+ readonly state: DocumentRequestState;
13
+ get type(): EnrichedDocumentType;
14
+ get document(): EnrichedDocument | null;
15
+ get collections(): EnrichedDocumentCollection[];
16
+ constructor(data: EnrichedDocumentManagementData, request: DocumentRequestView);
17
+ }
@@ -0,0 +1,52 @@
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 { Memoize } from '../../../../utils/function/memoize.js';
11
+ import { assertDefinedPass } from '../../../../utils/type-guards.js';
12
+ export class EnrichedDocumentRequest {
13
+ #data;
14
+ #documentRequestView;
15
+ id;
16
+ comment;
17
+ state;
18
+ get type() {
19
+ return assertDefinedPass(this.#data.types.find((type) => type.id == this.#documentRequestView.typeId));
20
+ }
21
+ get document() {
22
+ if (this.#documentRequestView.documentId == null) {
23
+ return null;
24
+ }
25
+ return assertDefinedPass(this.#data.documents.find((document) => document.id == this.#documentRequestView.documentId));
26
+ }
27
+ get collections() {
28
+ return this.#documentRequestView.collectionIds.map((collectionId) => assertDefinedPass(this.#data.collections.find((collection) => collection.id == collectionId)));
29
+ }
30
+ constructor(data, request) {
31
+ this.#data = data;
32
+ this.#documentRequestView = request;
33
+ this.id = request.id;
34
+ this.comment = request.comment;
35
+ this.state = request.state;
36
+ }
37
+ }
38
+ __decorate([
39
+ Memoize(),
40
+ __metadata("design:type", Function),
41
+ __metadata("design:paramtypes", [])
42
+ ], EnrichedDocumentRequest.prototype, "type", null);
43
+ __decorate([
44
+ Memoize(),
45
+ __metadata("design:type", Object),
46
+ __metadata("design:paramtypes", [])
47
+ ], EnrichedDocumentRequest.prototype, "document", null);
48
+ __decorate([
49
+ Memoize(),
50
+ __metadata("design:type", Array),
51
+ __metadata("design:paramtypes", [])
52
+ ], EnrichedDocumentRequest.prototype, "collections", null);
@@ -0,0 +1,9 @@
1
+ import type { TypedOmit } from '../../../../types.js';
2
+ import type { DocumentType } from '../../document-type.model.js';
3
+ import type { EnrichedDocumentCategory } from './enriched-document-category.view.js';
4
+ export declare class EnrichedDocumentType implements TypedOmit<DocumentType, 'categoryId' | 'metadata'> {
5
+ readonly id: string;
6
+ readonly label: string;
7
+ readonly category: EnrichedDocumentCategory;
8
+ constructor(type: DocumentType, category: EnrichedDocumentCategory);
9
+ }
@@ -0,0 +1,10 @@
1
+ export class EnrichedDocumentType {
2
+ id;
3
+ label;
4
+ category;
5
+ constructor(type, category) {
6
+ this.id = type.id;
7
+ this.label = type.label;
8
+ this.category = category;
9
+ }
10
+ }
@@ -0,0 +1,28 @@
1
+ import type { TypedOmit } from '../../../../types.js';
2
+ import type { DocumentValidationExecution } from '../../document-validation-execution.model.js';
3
+ import type { DocumentWorkflow } from '../../document-workflow.model.js';
4
+ import type { DocumentApproval } from '../../document.model.js';
5
+ import type { DocumentPropertyValueView, DocumentView } from '../document-management.view-model.js';
6
+ import { EnrichedDocumentAssignment } from './enriched-document-assignment.view.js';
7
+ import { EnrichedDocumentFile } from './enriched-document-file.view.js';
8
+ import type { EnrichedDocumentManagementData } from './enriched-document-management-data.view.js';
9
+ import type { EnrichedDocumentType } from './enriched-document-type.view.js';
10
+ export declare class EnrichedDocument implements TypedOmit<DocumentView, 'typeId' | 'fileId' | 'collectionAssignments' | 'createUserId' | 'metadata'> {
11
+ #private;
12
+ readonly id: string;
13
+ readonly title: string | null;
14
+ readonly subtitle: string | null;
15
+ readonly pages: number | null;
16
+ readonly date: number | null;
17
+ readonly summary: string | null;
18
+ readonly tags: string[] | null;
19
+ readonly approval: DocumentApproval;
20
+ readonly comment: string | null;
21
+ readonly properties: DocumentPropertyValueView[];
22
+ readonly currentWorkflow: DocumentWorkflow | null;
23
+ readonly validations: DocumentValidationExecution[] | null;
24
+ get type(): EnrichedDocumentType | null;
25
+ get file(): EnrichedDocumentFile;
26
+ get assignments(): EnrichedDocumentAssignment[];
27
+ constructor(data: EnrichedDocumentManagementData, document: DocumentView);
28
+ }