@tstdl/base 0.92.144 → 0.92.147
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ai/ai-file.service.d.ts +29 -1
- package/ai/ai-file.service.js +66 -23
- package/ai/ai-session.d.ts +28 -1
- package/ai/ai-session.js +27 -0
- package/ai/ai.service.d.ts +89 -5
- package/ai/ai.service.js +130 -27
- package/ai/functions.d.ts +7 -1
- package/ai/functions.js +7 -1
- package/ai/module.d.ts +8 -0
- package/ai/module.js +4 -0
- package/ai/types.d.ts +115 -2
- package/ai/types.js +16 -0
- package/api/client/client.d.ts +1 -1
- package/api/client/client.js +1 -1
- package/api/default-error-handlers.d.ts +1 -1
- package/api/index.d.ts +1 -9
- package/api/index.js +1 -9
- package/api/response.d.ts +1 -1
- package/api/server/api-controller.d.ts +1 -1
- package/api/server/error-handler.d.ts +1 -1
- package/api/server/gateway.d.ts +1 -5
- package/api/server/gateway.js +0 -4
- package/api/server/middlewares/catch-error.middleware.d.ts +1 -1
- package/api/server/module.d.ts +1 -1
- package/api/types.d.ts +1 -1
- package/application/application.d.ts +1 -1
- package/authentication/authentication.api.d.ts +36 -1
- package/authentication/authentication.api.js +28 -0
- package/authentication/client/api.client.d.ts +14 -1
- package/authentication/client/api.client.js +13 -0
- package/authentication/client/authentication.service.d.ts +104 -1
- package/authentication/client/authentication.service.js +103 -0
- package/authentication/client/http-client.middleware.d.ts +5 -0
- package/authentication/client/http-client.middleware.js +6 -2
- package/authentication/client/module.d.ts +20 -1
- package/authentication/client/module.js +6 -1
- package/authentication/client/tokens.d.ts +6 -0
- package/authentication/client/tokens.js +6 -0
- package/authentication/models/authentication-credentials.model.d.ts +6 -0
- package/authentication/models/authentication-credentials.model.js +6 -0
- package/authentication/models/authentication-session.model.d.ts +6 -0
- package/authentication/models/authentication-session.model.js +6 -0
- package/authentication/models/init-secret-reset-data.model.d.ts +10 -1
- package/authentication/models/init-secret-reset-data.model.js +10 -1
- package/authentication/models/token-payload-base.model.d.ts +24 -4
- package/authentication/models/token-payload-base.model.js +24 -4
- package/authentication/models/token.model.d.ts +33 -2
- package/authentication/server/authentication-ancillary.service.d.ts +27 -4
- package/authentication/server/authentication-ancillary.service.js +7 -0
- package/authentication/server/authentication-api-request-token.provider.d.ts +3 -0
- package/authentication/server/authentication-api-request-token.provider.js +3 -0
- package/authentication/server/authentication-secret-requirements.validator.d.ts +37 -0
- package/authentication/server/authentication-secret-requirements.validator.js +22 -0
- package/authentication/server/authentication.api-controller.d.ts +66 -1
- package/authentication/server/authentication.api-controller.js +65 -0
- package/authentication/server/authentication.service.d.ts +191 -11
- package/authentication/server/authentication.service.js +157 -8
- package/authentication/server/helper.d.ts +44 -5
- package/authentication/server/helper.js +43 -4
- package/authentication/server/module.d.ts +23 -1
- package/authentication/server/module.js +23 -1
- package/browser/browser-context-controller.d.ts +1 -1
- package/browser/browser-controller.d.ts +1 -1
- package/browser/browser-controller.js +1 -1
- package/browser/element-controller.d.ts +1 -1
- package/browser/locator-controller.d.ts +1 -1
- package/context/context.d.ts +1 -1
- package/data-structures/context-data-map.d.ts +1 -1
- package/database/mongo/mongo-base.repository.d.ts +1 -1
- package/database/mongo/types.d.ts +1 -1
- package/database/query.d.ts +1 -1
- package/document-management/models/document-assignment-task.model.js +1 -0
- package/document-management/models/document-management-table.d.ts +1 -1
- package/document-management/models/document-validation-definition.model.d.ts +1 -1
- package/document-management/models/document-validation-execution.model.js +1 -0
- package/document-management/models/document-workflow.model.js +3 -2
- package/document-management/server/api/document-management.api.d.ts +1 -1
- package/document-management/server/api/document-management.api.js +3 -3
- package/document-management/server/drizzle/{0000_parallel_mantis.sql → 0000_ordinary_pretty_boy.sql} +6 -3
- package/document-management/server/drizzle/meta/0000_snapshot.json +27 -2
- package/document-management/server/drizzle/meta/_journal.json +2 -2
- package/document-management/server/schemas.d.ts +1 -1
- package/document-management/server/services/document-collection.service.d.ts +2 -2
- package/document-management/server/services/document-management-ai.service.js +7 -5
- package/document-management/server/services/document-management-ancillary.service.d.ts +1 -1
- package/document-management/server/services/document-management-observation.service.d.ts +1 -1
- package/document-management/server/services/document-management.service.d.ts +1 -1
- package/document-management/server/services/document-management.service.js +1 -1
- package/document-management/server/services/document-property.service.d.ts +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.js +1 -1
- package/document-management/server/services/document-validation.service.d.ts +2 -2
- package/document-management/server/services/document-validation.service.js +2 -2
- package/document-management/server/services/document-workflow.service.d.ts +2 -2
- package/document-management/server/services/document-workflow.service.js +4 -4
- package/document-management/server/services/document.service.d.ts +1 -1
- package/document-management/server/services/singleton.d.ts +1 -1
- package/document-management/server/validators/ai-validation-executor.js +4 -4
- package/document-management/server/validators/single-document-validation-executor.js +1 -1
- package/document-management/server/validators/validator.d.ts +1 -1
- package/document-management/service-models/document-management.view-model.d.ts +1 -1
- package/document-management/service-models/enriched/enriched-document-assignment.view.d.ts +1 -1
- package/document-management/service-models/enriched/enriched-document-category.view.d.ts +1 -1
- package/document-management/service-models/enriched/enriched-document-collection.view.d.ts +1 -1
- package/document-management/service-models/enriched/enriched-document-request.view.d.ts +1 -1
- package/document-management/service-models/enriched/enriched-document-type.view.d.ts +1 -1
- package/document-management/service-models/enriched/enriched-document.view.d.ts +1 -1
- package/document-management/service-models/enriched/enriched-requests-template-data.model.d.ts +1 -1
- package/dom/file-select-dialog.d.ts +1 -1
- package/enumeration/enumeration.d.ts +1 -1
- package/errors/custom.error.d.ts +3 -0
- package/errors/custom.error.js +0 -1
- package/errors/errors.localization.d.ts +1 -1
- package/errors/not-supported.error.d.ts +1 -1
- package/{formats.js → formats/formats.js} +3 -3
- package/formats/index.d.ts +1 -0
- package/formats/index.js +1 -0
- package/http/client/http-client-request.d.ts +1 -1
- package/http/client/http-client-response.d.ts +1 -1
- package/http/client/http-client.d.ts +1 -1
- package/http/client/module.d.ts +1 -1
- package/http/http-body.d.ts +1 -1
- package/http/http-value-map.d.ts +1 -1
- package/http/http.error.d.ts +1 -1
- package/http/server/http-server-request.d.ts +1 -1
- package/http/server/http-server-response.d.ts +1 -1
- package/http/types.d.ts +1 -1
- package/http/utils.d.ts +1 -1
- package/injector/decorators.d.ts +4 -4
- package/injector/index.d.ts +1 -1
- package/injector/index.js +1 -1
- package/injector/injector.d.ts +10 -1
- package/injector/injector.js +6 -0
- package/injector/interfaces.d.ts +1 -1
- package/injector/provider.d.ts +1 -1
- package/injector/resolution.d.ts +10 -5
- package/injector/resolve-chain.d.ts +2 -2
- package/injector/resolve-chain.js +1 -1
- package/injector/resolve.error.js +1 -1
- package/injector/token.d.ts +8 -1
- package/injector/token.js +7 -0
- package/injector/types.d.ts +1 -1
- package/key-value-store/key-value-store.provider.d.ts +2 -2
- package/key-value-store/key-value.store.d.ts +2 -2
- package/key-value-store/mongo/mongo-key-value-store.provider.d.ts +1 -1
- package/key-value-store/mongo/mongo-key-value.store.d.ts +1 -1
- package/key-value-store/postgres/key-value-store.service.d.ts +1 -1
- package/mail/mail.service.d.ts +1 -1
- package/mail/models/mail-data.model.d.ts +1 -1
- package/mail/models/mail-template.model.d.ts +1 -1
- package/mail/module.d.ts +1 -1
- package/module/index.d.ts +0 -1
- package/module/index.js +0 -1
- package/module/module-base.d.ts +1 -1
- package/module/module-metric-reporter.js +1 -1
- package/module/module.d.ts +1 -1
- package/module/modules/function.module.js +1 -1
- package/object-storage/object.d.ts +1 -1
- package/openid-connect/mongo-oidc-state.repository.d.ts +1 -1
- package/openid-connect/oidc.service.d.ts +1 -1
- package/orm/decorators.d.ts +2 -2
- package/orm/entity.d.ts +1 -1
- package/orm/index.d.ts +3 -3
- package/orm/index.js +3 -3
- package/orm/query.d.ts +1 -1
- package/orm/repository.types.d.ts +1 -1
- package/orm/schemas/json.d.ts +1 -1
- package/orm/server/database-schema.d.ts +1 -1
- package/orm/server/drizzle/schema-converter.d.ts +1 -1
- package/orm/server/repository.d.ts +1 -1
- package/orm/server/transaction.d.ts +1 -1
- package/orm/server/transactional.d.ts +3 -3
- package/orm/server/types.d.ts +1 -1
- package/orm/types.d.ts +1 -1
- package/package.json +24 -21
- package/queue/mongo/job.d.ts +1 -1
- package/queue/mongo/queue.js +31 -31
- package/queue/postgres/job.model.d.ts +1 -1
- package/queue/postgres/queue.d.ts +1 -1
- package/queue/postgres/queue.provider.d.ts +1 -1
- package/queue/provider.d.ts +1 -1
- package/reflection/decorators.d.ts +1 -1
- package/reflection/registry.d.ts +1 -1
- package/reflection/types.d.ts +1 -1
- package/reflection/utils.d.ts +1 -1
- package/rpc/model.d.ts +1 -1
- package/rxjs-utils/retry-backoff.js +2 -2
- package/schema/converters/openapi-converter.d.ts +1 -1
- package/schema/decorators/schema.d.ts +1 -1
- package/schema/decorators/utils.d.ts +1 -1
- package/schema/schema.d.ts +1 -1
- package/schema/schema.error.d.ts +1 -1
- package/schema/schemas/array.d.ts +1 -1
- package/schema/schemas/enumeration.d.ts +1 -1
- package/schema/schemas/function.d.ts +1 -1
- package/schema/schemas/instance.d.ts +1 -1
- package/schema/schemas/nullable.d.ts +1 -1
- package/schema/schemas/number.d.ts +1 -1
- package/schema/schemas/object.d.ts +1 -1
- package/schema/schemas/one-or-many.d.ts +1 -1
- package/schema/schemas/optional.d.ts +1 -1
- package/schema/schemas/simple.d.ts +1 -1
- package/search-index/elastic/model/index-mapping.d.ts +1 -1
- package/search-index/elastic/search-index.js +3 -4
- package/search-index/memory/memory-search-index.d.ts +1 -1
- package/search-index/memory/memory-search-index.js +1 -1
- package/serializer/handlers/binary.d.ts +1 -1
- package/serializer/serializable.d.ts +1 -1
- package/serializer/types.d.ts +1 -1
- package/templates/module.d.ts +1 -1
- package/templates/renderers/handlebars.template-renderer.d.ts +1 -1
- package/templates/renderers/jsx.template-renderer.d.ts +1 -1
- package/templates/renderers/mjml.template-renderer.d.ts +1 -1
- package/templates/renderers/string.template-renderer.d.ts +1 -1
- package/templates/resolvers/file.template-resolver.d.ts +1 -1
- package/templates/resolvers/jsx.template-resolver.d.ts +1 -1
- package/templates/resolvers/string.template-resolver.d.ts +1 -1
- package/templates/template.model.d.ts +1 -1
- package/templates/template.renderer.d.ts +1 -1
- package/templates/template.service.d.ts +1 -1
- package/text/dynamic-text.model.d.ts +1 -1
- package/text/localization.service.d.ts +1 -1
- package/types/geo-json.d.ts +1 -1
- package/types/index.d.ts +2 -0
- package/types/tagged.d.ts +1 -1
- package/{types.d.ts → types/types.d.ts} +2 -1
- package/utils/async-hook/async-hook.d.ts +109 -0
- package/utils/async-hook/async-hook.js +77 -3
- package/utils/backoff.d.ts +125 -43
- package/utils/backoff.js +140 -65
- package/utils/base64.d.ts +1 -1
- package/utils/base64.js +1 -2
- package/utils/binary.d.ts +1 -1
- package/utils/comparison.d.ts +5 -5
- package/utils/comparison.js +5 -3
- package/utils/cryptography.d.ts +1 -1
- package/utils/encoding.d.ts +1 -1
- package/utils/enum.d.ts +1 -1
- package/utils/equals.d.ts +1 -1
- package/utils/format-error.d.ts +1 -1
- package/utils/function/class.d.ts +1 -1
- package/utils/function/memoize.d.ts +1 -1
- package/utils/helpers.d.ts +1 -1
- package/utils/helpers.js +2 -2
- package/utils/jwt.d.ts +3 -3
- package/utils/merge.d.ts +1 -1
- package/utils/middleware.js +3 -3
- package/utils/object/decycle.d.ts +1 -1
- package/utils/object/forward-ref.d.ts +1 -1
- package/utils/object/lazy-property.d.ts +1 -1
- package/utils/object/object.d.ts +1 -1
- package/utils/object/property-name.d.ts +1 -1
- package/utils/patch-worker.d.ts +1 -1
- package/utils/reactive-value-to-signal.d.ts +1 -1
- package/utils/reflection.d.ts +1 -1
- package/utils/repl.d.ts +1 -1
- package/utils/singleton.d.ts +1 -1
- package/utils/stream/size-limited-stream.d.ts +1 -1
- package/utils/type/extends.d.ts +1 -1
- package/utils/type-guards.d.ts +1 -1
- package/utils/url-builder.d.ts +1 -1
- package/utils/z-base32.d.ts +1 -1
- package/module/utils.d.ts +0 -4
- package/module/utils.js +0 -21
- /package/{formats.d.ts → formats/formats.d.ts} +0 -0
- /package/{types.js → types/types.js} +0 -0
- /package/{web-types.d.ts → types/web-types.d.ts} +0 -0
- /package/{web-types.js → types/web-types.js} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { RequestStats } from '../../../document-management/service-models/index.js';
|
|
2
1
|
import { Transactional } from '../../../orm/server/index.js';
|
|
3
|
-
import type { OneOrMany } from '../../../types.js';
|
|
2
|
+
import type { OneOrMany } from '../../../types/index.js';
|
|
4
3
|
import { DocumentRequest, DocumentRequestTemplate, DocumentRequestsTemplate, type Document } from '../../models/index.js';
|
|
4
|
+
import type { RequestStats } from '../../service-models/index.js';
|
|
5
5
|
export declare class DocumentRequestService extends Transactional {
|
|
6
6
|
#private;
|
|
7
7
|
getRequestStats(tenantId: string, collectionIds: OneOrMany<string>): Promise<RequestStats>;
|
|
@@ -10,7 +10,7 @@ import { inject } from '../../../injector/inject.js';
|
|
|
10
10
|
import { Transactional, injectRepository } from '../../../orm/server/index.js';
|
|
11
11
|
import { toArray } from '../../../utils/array/index.js';
|
|
12
12
|
import { assertDefinedPass, isNotNull } from '../../../utils/type-guards.js';
|
|
13
|
-
import { DocumentApproval,
|
|
13
|
+
import { DocumentApproval, DocumentRequest, DocumentRequestCollectionAssignment, DocumentRequestState, DocumentRequestTemplate, DocumentRequestsTemplate } from '../../models/index.js';
|
|
14
14
|
import { document, documentRequest, documentRequestCollectionAssignment } from '../schemas.js';
|
|
15
15
|
import { DocumentManagementObservationService } from './document-management-observation.service.js';
|
|
16
16
|
import { DocumentManagementSingleton } from './singleton.js';
|
|
@@ -48,7 +48,7 @@ let DocumentTagService = class DocumentTagService extends Transactional {
|
|
|
48
48
|
const tags = await this.withTransaction(tx).loadOrCreate(document.tenantId, labels);
|
|
49
49
|
const tagIds = getEntityIds(tags);
|
|
50
50
|
const newAssignments = tagIds.map((tagId) => ({ tenantId: document.tenantId, documentId: document.id, tagId }));
|
|
51
|
-
await this.tagAssignmentRepository.withTransaction(tx).insertManyIfNotExists(['documentId', 'tagId'], newAssignments);
|
|
51
|
+
await this.tagAssignmentRepository.withTransaction(tx).insertManyIfNotExists(['tenantId', 'documentId', 'tagId'], newAssignments);
|
|
52
52
|
await this.tagAssignmentRepository.withTransaction(tx).hardDeleteManyByQuery({ tenantId: document.tenantId, documentId: document.id, tagId: { $nin: tagIds } });
|
|
53
53
|
});
|
|
54
54
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { CancellationSignal } from '../../../cancellation/token.js';
|
|
2
|
-
import { DocumentValidationResultStatus } from '../../../document-management/models/index.js';
|
|
3
2
|
import { afterResolve } from '../../../injector/interfaces.js';
|
|
4
3
|
import type { AfterResolveContext } from '../../../injector/types.js';
|
|
5
|
-
import type { Type } from '../../../types.js';
|
|
4
|
+
import type { Type } from '../../../types/index.js';
|
|
5
|
+
import { DocumentValidationResultStatus } from '../../models/index.js';
|
|
6
6
|
import type { DocumentValidationExecutor, DocumentValidationExecutorContext, DocumentValidationExecutorContextDocumentData } from '../validators/index.js';
|
|
7
7
|
export declare class DocumentValidationService {
|
|
8
8
|
#private;
|
|
@@ -6,8 +6,6 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
6
6
|
};
|
|
7
7
|
var _a;
|
|
8
8
|
var DocumentValidationService_1;
|
|
9
|
-
import { DocumentWorkflowStep } from '../../../document-management/models/document-workflow.model.js';
|
|
10
|
-
import { Document, DocumentCategory, DocumentCollection, DocumentCollectionAssignment, DocumentProperty, DocumentPropertyValue, DocumentType, DocumentTypeProperty, DocumentTypeValidation, DocumentValidationDefinition, DocumentValidationExecution, DocumentValidationExecutionRelatedDocument, DocumentValidationExecutionState, DocumentValidationResultStatus } from '../../../document-management/models/index.js';
|
|
11
9
|
import { BadRequestError } from '../../../errors/bad-request.error.js';
|
|
12
10
|
import { inject, injectAll } from '../../../injector/inject.js';
|
|
13
11
|
import { Injector } from '../../../injector/injector.js';
|
|
@@ -20,6 +18,8 @@ import { Queue } from '../../../queue/queue.js';
|
|
|
20
18
|
import { currentTimestamp } from '../../../utils/date-time.js';
|
|
21
19
|
import { isNull, isUndefined } from '../../../utils/type-guards.js';
|
|
22
20
|
import { millisecondsPerMinute } from '../../../utils/units.js';
|
|
21
|
+
import { DocumentWorkflowStep } from '../../models/document-workflow.model.js';
|
|
22
|
+
import { Document, DocumentCategory, DocumentCollection, DocumentCollectionAssignment, DocumentProperty, DocumentPropertyValue, DocumentType, DocumentTypeProperty, DocumentTypeValidation, DocumentValidationDefinition, DocumentValidationExecution, DocumentValidationExecutionRelatedDocument, DocumentValidationExecutionState, DocumentValidationResultStatus } from '../../models/index.js';
|
|
23
23
|
import { DocumentWorkflowService } from './document-workflow.service.js';
|
|
24
24
|
import { DocumentManagementSingleton } from './singleton.js';
|
|
25
25
|
const DOCUMENT_VALIDATION_EXECUTORS = injectionToken('DocumentValidationExecutors');
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { DocumentWorkflow, DocumentWorkflowStep } from '../../../document-management/models/document-workflow.model.js';
|
|
2
1
|
import type { AfterResolveContext } from '../../../injector/index.js';
|
|
3
2
|
import { afterResolve } from '../../../injector/interfaces.js';
|
|
4
3
|
import { Transactional } from '../../../orm/server/transactional.js';
|
|
5
|
-
import type { OneOrMany } from '../../../types.js';
|
|
4
|
+
import type { OneOrMany } from '../../../types/index.js';
|
|
5
|
+
import { DocumentWorkflow, DocumentWorkflowStep } from '../../models/document-workflow.model.js';
|
|
6
6
|
export declare class DocumentWorkflowService extends Transactional {
|
|
7
7
|
#private;
|
|
8
8
|
private readonly documentService;
|
|
@@ -7,10 +7,6 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
7
7
|
var _a;
|
|
8
8
|
var DocumentWorkflowService_1;
|
|
9
9
|
import { match } from 'ts-pattern';
|
|
10
|
-
import { DocumentAssignmentScope } from '../../../document-management/models/document-assignment-scope.model.js';
|
|
11
|
-
import { DocumentAssignmentTask } from '../../../document-management/models/document-assignment-task.model.js';
|
|
12
|
-
import { DocumentWorkflow, DocumentWorkflowFailReason, DocumentWorkflowState, DocumentWorkflowStep } from '../../../document-management/models/document-workflow.model.js';
|
|
13
|
-
import { DocumentApproval } from '../../../document-management/models/document.model.js';
|
|
14
10
|
import { BadRequestError } from '../../../errors/bad-request.error.js';
|
|
15
11
|
import { NotImplementedError } from '../../../errors/not-implemented.error.js';
|
|
16
12
|
import { inject } from '../../../injector/inject.js';
|
|
@@ -24,6 +20,10 @@ import { currentTimestamp } from '../../../utils/date-time.js';
|
|
|
24
20
|
import { _throw } from '../../../utils/throw.js';
|
|
25
21
|
import { isNotNull, isNull } from '../../../utils/type-guards.js';
|
|
26
22
|
import { and, desc, eq, inArray } from 'drizzle-orm';
|
|
23
|
+
import { DocumentAssignmentScope } from '../../models/document-assignment-scope.model.js';
|
|
24
|
+
import { DocumentAssignmentTask } from '../../models/document-assignment-task.model.js';
|
|
25
|
+
import { DocumentWorkflow, DocumentWorkflowFailReason, DocumentWorkflowState, DocumentWorkflowStep } from '../../models/document-workflow.model.js';
|
|
26
|
+
import { DocumentApproval } from '../../models/document.model.js';
|
|
27
27
|
import { documentWorkflow } from '../schemas.js';
|
|
28
28
|
import { DocumentCollectionService } from './document-collection.service.js';
|
|
29
29
|
import { DocumentManagementAiService } from './document-management-ai.service.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Transactional } from '../../../orm/server/index.js';
|
|
2
|
-
import type { TypedOmit } from '../../../types.js';
|
|
2
|
+
import type { TypedOmit } from '../../../types/index.js';
|
|
3
3
|
import { Document, type UpdatableDocumentProperties } from '../../models/index.js';
|
|
4
4
|
import type { CreateDocumentParameters, SetDocumentPropertyParameters, UpdateDocumentCollectionsParameters } from '../../service-models/index.js';
|
|
5
5
|
export declare class DocumentService extends Transactional {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { ProvidersItem } from '../../../injector/injector.js';
|
|
2
|
-
export declare const documentManagementDatabaseConfigFactoryProvider: import("../../../injector/provider.js").FactoryProvider<unknown, unknown, import("../../../types.js").Record>;
|
|
2
|
+
export declare const documentManagementDatabaseConfigFactoryProvider: import("../../../injector/provider.js").FactoryProvider<unknown, unknown, import("../../../types/types.js").Record>;
|
|
3
3
|
export declare const documentManagementDatabaseConfigProvider: ProvidersItem;
|
|
4
4
|
export declare function DocumentManagementSingleton(): ClassDecorator;
|
|
@@ -21,10 +21,10 @@ let AiValidationExecutor = class AiValidationExecutor extends DocumentValidation
|
|
|
21
21
|
async execute(context) {
|
|
22
22
|
const validationPrompt = await this.getPrompt(context);
|
|
23
23
|
const model = match(this.difficulty)
|
|
24
|
-
.with('easy', () => 'gemini-2.5-flash-preview-
|
|
25
|
-
.with('medium-low', () => 'gemini-2.5-flash
|
|
26
|
-
.with('medium-high', () => 'gemini-2.5-flash
|
|
27
|
-
.with('hard', () => 'gemini-2.5-pro
|
|
24
|
+
.with('easy', () => 'gemini-2.5-flash-lite-preview-06-17')
|
|
25
|
+
.with('medium-low', () => 'gemini-2.5-flash')
|
|
26
|
+
.with('medium-high', () => 'gemini-2.5-flash')
|
|
27
|
+
.with('hard', () => 'gemini-2.5-pro')
|
|
28
28
|
.exhaustive();
|
|
29
29
|
const prompt = `Deine Aufgabe ist es ein Dokument zu validieren.
|
|
30
30
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { DocumentValidationResultStatus } from '../../../document-management/models/document-validation-execution.model.js';
|
|
2
1
|
import { boolean, object, optional, string } from '../../../schema/index.js';
|
|
2
|
+
import { DocumentValidationResultStatus } from '../../models/document-validation-execution.model.js';
|
|
3
3
|
import { AiValidationDifficulty, AiValidationExecutor } from './ai-validation-executor.js';
|
|
4
4
|
export class SingleDocumentValidationExecutor extends AiValidationExecutor {
|
|
5
5
|
identifier = 'single-document';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Document, DocumentCategory, DocumentCollection, DocumentProperty, DocumentPropertyValue, DocumentType, DocumentValidationDefinition, DocumentValidationExecution, DocumentValidationResultStatus } from '
|
|
1
|
+
import type { Document, DocumentCategory, DocumentCollection, DocumentProperty, DocumentPropertyValue, DocumentType, DocumentValidationDefinition, DocumentValidationExecution, DocumentValidationResultStatus } from '../../models/index.js';
|
|
2
2
|
export type DocumentValidationExecutorContextDocumentData = {
|
|
3
3
|
document: Document;
|
|
4
4
|
collections: DocumentCollection[];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { TypedOmit } from '../../types.js';
|
|
1
|
+
import type { TypedOmit } from '../../types/index.js';
|
|
2
2
|
import { Document, DocumentAssignmentTarget, DocumentAssignmentTask, DocumentCategory, DocumentCollection, DocumentCollectionAssignment, DocumentPropertyDataType, DocumentRequest, DocumentTag, DocumentType, DocumentValidationExecution, DocumentWorkflow, type DocumentProperty } from '../models/index.js';
|
|
3
3
|
export declare class DocumentCollectionView extends DocumentCollection {
|
|
4
4
|
name: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { TypedOmit } from '../../../types.js';
|
|
1
|
+
import type { TypedOmit } from '../../../types/index.js';
|
|
2
2
|
import type { DocumentCollectionAssignment } from '../../models/index.js';
|
|
3
3
|
import type { DocumentAssignmentTaskView, DocumentAssignmentView, DocumentCollectionAssignmentView } from '../document-management.view-model.js';
|
|
4
4
|
import type { EnrichedDocumentCollection } from './enriched-document-collection.view.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { TypedOmit } from '../../../types.js';
|
|
1
|
+
import type { TypedOmit } from '../../../types/index.js';
|
|
2
2
|
import type { DocumentCategory } from '../../models/index.js';
|
|
3
3
|
import type { EnrichedDocumentManagementData } from './enriched-document-management-data.view.js';
|
|
4
4
|
import { EnrichedDocumentType } from './enriched-document-type.view.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { TypedOmit } from '../../../types.js';
|
|
1
|
+
import type { TypedOmit } from '../../../types/index.js';
|
|
2
2
|
import type { DocumentCollectionView } from '../document-management.view-model.js';
|
|
3
3
|
import type { EnrichedDocumentManagementData } from './enriched-document-management-data.view.js';
|
|
4
4
|
import type { EnrichedDocumentRequest } from './enriched-document-request.view.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { TypedOmit } from '../../../types.js';
|
|
1
|
+
import type { TypedOmit } from '../../../types/index.js';
|
|
2
2
|
import type { DocumentRequestState } from '../../models/index.js';
|
|
3
3
|
import type { DocumentRequestView } from '../document-management.view-model.js';
|
|
4
4
|
import type { EnrichedDocumentCollection } from './enriched-document-collection.view.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { TypedOmit } from '../../../types.js';
|
|
1
|
+
import type { TypedOmit } from '../../../types/index.js';
|
|
2
2
|
import type { DocumentType } from '../../models/index.js';
|
|
3
3
|
import type { DocumentPropertyView } from '../document-management.view-model.js';
|
|
4
4
|
import type { EnrichedDocumentCategory } from './enriched-document-category.view.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { EntityMetadata } from '../../../orm/entity.js';
|
|
2
|
-
import type { TypedOmit } from '../../../types.js';
|
|
2
|
+
import type { TypedOmit } from '../../../types/index.js';
|
|
3
3
|
import type { DocumentApproval, DocumentTag, DocumentValidationExecution, DocumentWorkflow } from '../../models/index.js';
|
|
4
4
|
import type { DocumentPropertyValueView, DocumentView } from '../document-management.view-model.js';
|
|
5
5
|
import { EnrichedDocumentAssignment } from './enriched-document-assignment.view.js';
|
package/document-management/service-models/enriched/enriched-requests-template-data.model.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { TypedOmit } from '../../../types.js';
|
|
1
|
+
import type { TypedOmit } from '../../../types/index.js';
|
|
2
2
|
import type { DocumentRequestTemplate } from '../../models/index.js';
|
|
3
3
|
import type { DocumentRequestsTemplateData, DocumentRequestsTemplateView } from '../document-requests-template.view-model.js';
|
|
4
4
|
import type { EnrichedDocumentCategory } from '../enriched/enriched-document-category.view.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { EnumerationObject } from '../types.js';
|
|
1
|
+
import type { EnumerationObject } from '../types/index.js';
|
|
2
2
|
export type EnumType<T extends EnumerationObject> = T[keyof T];
|
|
3
3
|
export declare function defineEnum<const T extends EnumerationObject>(name: string, enumObject: T): T;
|
|
4
4
|
export declare function tryGetEnumName(enumeration: EnumerationObject): string | undefined;
|
package/errors/custom.error.d.ts
CHANGED
|
@@ -24,6 +24,9 @@ export declare abstract class CustomError extends Error {
|
|
|
24
24
|
constructor(options?: CustomErrorOptions);
|
|
25
25
|
}
|
|
26
26
|
export interface CustomErrorStatic<T extends CustomError = CustomError> {
|
|
27
|
+
/**
|
|
28
|
+
* Name of the error (usually the class name) to prevent issues from minification.
|
|
29
|
+
*/
|
|
27
30
|
readonly errorName: string;
|
|
28
31
|
new (...args: any[]): T;
|
|
29
32
|
}
|
package/errors/custom.error.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { SecretRequirementsError } from '../authentication/index.js';
|
|
2
2
|
import { type HttpError, HttpErrorReason } from '../http/http.error.js';
|
|
3
3
|
import { type Localization, type LocalizeItem } from '../text/localization.service.js';
|
|
4
|
-
import type { Enumeration } from '../types.js';
|
|
4
|
+
import type { Enumeration } from '../types/index.js';
|
|
5
5
|
import type { ApiError } from './api.error.js';
|
|
6
6
|
import type { BadRequestError } from './bad-request.error.js';
|
|
7
7
|
import type { CustomError, CustomErrorStatic } from './custom.error.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { EnumerationObject } from '../types.js';
|
|
1
|
+
import type { EnumerationObject } from '../types/index.js';
|
|
2
2
|
import { CustomError } from './custom.error.js';
|
|
3
3
|
export declare class NotSupportedError extends CustomError {
|
|
4
4
|
static readonly errorName = "NotSupportedError";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { numericDateToTimestamp } from '
|
|
2
|
-
import { memoize, memoizeSingle } from '
|
|
3
|
-
import { isNullOrUndefined, isUndefined } from '
|
|
1
|
+
import { numericDateToTimestamp } from '../utils/date-time.js';
|
|
2
|
+
import { memoize, memoizeSingle } from '../utils/function/memoize.js';
|
|
3
|
+
import { isNullOrUndefined, isUndefined } from '../utils/type-guards.js';
|
|
4
4
|
export let locale = 'de-DE';
|
|
5
5
|
export function configureFormats(options) {
|
|
6
6
|
locale = options.locale ?? locale;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './formats.js';
|
package/formats/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './formats.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type CancellationSignal } from '../../cancellation/index.js';
|
|
2
2
|
import { dispose, type Disposable } from '../../disposable/index.js';
|
|
3
|
-
import type { OneOrMany, Record, TypedOmit, UndefinableJson, UndefinableJsonObject } from '../../types.js';
|
|
3
|
+
import type { OneOrMany, Record, TypedOmit, UndefinableJson, UndefinableJsonObject } from '../../types/index.js';
|
|
4
4
|
import { HttpForm, type HttpFormObject } from '../http-form.js';
|
|
5
5
|
import { HttpHeaders, type HttpHeadersObject } from '../http-headers.js';
|
|
6
6
|
import { HttpQuery, type HttpQueryObject } from '../http-query.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { TypedOmit } from '../../types.js';
|
|
1
|
+
import type { TypedOmit } from '../../types/index.js';
|
|
2
2
|
import { HttpBody, type HttpBodySource } from '../http-body.js';
|
|
3
3
|
import { HttpHeaders, type HttpHeadersObject } from '../http-headers.js';
|
|
4
4
|
import type { HttpClientRequest, HttpClientRequestObject } from './http-client-request.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { resolveArgumentType } from '../../injector/index.js';
|
|
2
2
|
import type { Resolvable } from '../../injector/interfaces.js';
|
|
3
|
-
import type { OneOrMany, UndefinableJson } from '../../types.js';
|
|
3
|
+
import type { OneOrMany, UndefinableJson } from '../../types/index.js';
|
|
4
4
|
import type { HttpMethod, HttpValue } from '../types.js';
|
|
5
5
|
import type { ReadBodyOptions } from '../utils.js';
|
|
6
6
|
import { HttpClientOptions } from './http-client-options.js';
|
package/http/client/module.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { OneOrMany, Type } from '../../types.js';
|
|
1
|
+
import type { OneOrMany, Type } from '../../types/index.js';
|
|
2
2
|
import { HttpClientOptions } from './http-client-options.js';
|
|
3
3
|
import { HttpClientAdapter } from './http-client.adapter.js';
|
|
4
4
|
import type { HttpClientMiddleware } from './middleware.js';
|
package/http/http-body.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { UndefinableJson } from '../types.js';
|
|
1
|
+
import type { UndefinableJson } from '../types/index.js';
|
|
2
2
|
import type { AnyIterable } from '../utils/any-iterable-iterator.js';
|
|
3
3
|
import type { HttpHeaders } from './http-headers.js';
|
|
4
4
|
import type { ReadBodyOptions } from './utils.js';
|
package/http/http-value-map.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { OneOrMany, Record } from '../types.js';
|
|
1
|
+
import type { OneOrMany, Record } from '../types/index.js';
|
|
2
2
|
import type { HttpValue, NormalizedHttpValue, NormalizedHttpValueObject } from './types.js';
|
|
3
3
|
export type HttpValueMapInput = Record<string, OneOrMany<HttpValue> | undefined> | Iterable<[string, OneOrMany<HttpValue> | undefined]>;
|
|
4
4
|
export declare abstract class HttpValueMap<TThis extends HttpValueMap<any>> implements Iterable<[string, OneOrMany<HttpValue>]> {
|
package/http/http.error.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { TypedOmit, UndefinableJson } from '../types.js';
|
|
1
|
+
import type { TypedOmit, UndefinableJson } from '../types/index.js';
|
|
2
2
|
import type { ErrorExtraInfo } from '../utils/format-error.js';
|
|
3
3
|
import { CustomError } from '../errors/custom.error.js';
|
|
4
4
|
import type { HttpClientRequest, HttpClientRequestObject, HttpClientResponse, HttpClientResponseObject } from './client/index.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { SetCookieOptions } from '../../cookie/cookie.js';
|
|
2
2
|
import type { ServerSentEventsSource } from '../../sse/server-sent-events-source.js';
|
|
3
|
-
import type { Record } from '../../types.js';
|
|
3
|
+
import type { Record } from '../../types/index.js';
|
|
4
4
|
import type { HttpHeadersInput } from '../http-headers.js';
|
|
5
5
|
import { HttpHeaders } from '../http-headers.js';
|
|
6
6
|
export type SetCookieObject = SetCookieOptions & {
|
package/http/types.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { OneOrMany, WritableOneOrMany } from '../types.js';
|
|
1
|
+
import type { OneOrMany, WritableOneOrMany } from '../types/index.js';
|
|
2
2
|
export type HttpValue = string | number | boolean | null;
|
|
3
3
|
export type NormalizedHttpValue = string;
|
|
4
4
|
export type HttpValueObject = Record<string, OneOrMany<HttpValue>>;
|
package/http/utils.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { HttpHeaders } from '../http/http-headers.js';
|
|
2
|
-
import type { UndefinableJson } from '../types.js';
|
|
2
|
+
import type { UndefinableJson } from '../types/index.js';
|
|
3
3
|
import type { AnyIterable } from '../utils/any-iterable-iterator.js';
|
|
4
4
|
type Body = Uint8Array | Blob | AnyIterable<Uint8Array> | ReadableStream<Uint8Array>;
|
|
5
5
|
export type ReadBodyOptions = {
|
package/injector/decorators.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type Decorator } from '../reflection/index.js';
|
|
2
|
-
import type { Constructor, OneOrMany, Record, Simplify, TypedOmit } from '../types.js';
|
|
2
|
+
import type { Constructor, OneOrMany, Record, Simplify, TypedOmit } from '../types/index.js';
|
|
3
3
|
import type { Provider } from './provider.js';
|
|
4
4
|
import type { InjectionToken } from './token.js';
|
|
5
5
|
import type { InjectMetadata } from './type-info.js';
|
|
@@ -11,7 +11,7 @@ export type InjectableOptions<T, A, C extends Record = Record> = RegistrationOpt
|
|
|
11
11
|
/** Custom provider. Useful for example if initialization is required */
|
|
12
12
|
provider?: Provider<T, A, C>;
|
|
13
13
|
};
|
|
14
|
-
export type InjectableOptionsWithoutLifecycle<T, A> = Simplify<TypedOmit<InjectableOptions<T, A>, 'lifecycle'>>;
|
|
14
|
+
export type InjectableOptionsWithoutLifecycle<T, A, C extends Record = Record> = Simplify<TypedOmit<InjectableOptions<T, A, C>, 'lifecycle'>>;
|
|
15
15
|
/**
|
|
16
16
|
* Helper decorator to replace a class definition with an other
|
|
17
17
|
* can be used for example to type external classes with the {@link Resolvable} interface
|
|
@@ -28,12 +28,12 @@ export declare function Injectable<T = any, A = any, C extends Record = Record>(
|
|
|
28
28
|
* Registers the class in the global container with singleton lifecycle. Decorated class is not modified in any way
|
|
29
29
|
* @param options registration options
|
|
30
30
|
*/
|
|
31
|
-
export declare function Singleton<T = any, A =
|
|
31
|
+
export declare function Singleton<T = any, A = any, C extends Record = Record>(options?: InjectableOptionsWithoutLifecycle<T, A, C>): ClassDecorator;
|
|
32
32
|
/**
|
|
33
33
|
* Registers the class in the global container with scoped lifecycle. Decorated class is not modified in any way
|
|
34
34
|
* @param options registration options
|
|
35
35
|
*/
|
|
36
|
-
export declare function Scoped<T = any, A = any>(lifecycle: 'resolution' | 'injector', options?: InjectableOptionsWithoutLifecycle<T, A>): ClassDecorator;
|
|
36
|
+
export declare function Scoped<T = any, A = any, C extends Record = Record>(lifecycle: 'resolution' | 'injector', options?: InjectableOptionsWithoutLifecycle<T, A, C>): ClassDecorator;
|
|
37
37
|
/**
|
|
38
38
|
* Sets the token used to resolve the parameter
|
|
39
39
|
* @param token token used for resolving
|
package/injector/index.d.ts
CHANGED
package/injector/index.js
CHANGED
package/injector/injector.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type AsyncDisposable } from '../disposable/disposable.js';
|
|
2
|
-
import type { OneOrMany, Record, TypedOmit } from '../types.js';
|
|
2
|
+
import type { OneOrMany, Record, TypedOmit } from '../types/index.js';
|
|
3
3
|
import { type InjectOptions } from './inject.js';
|
|
4
4
|
import { type ResolveArgument } from './interfaces.js';
|
|
5
5
|
import { type Provider } from './provider.js';
|
|
@@ -16,6 +16,9 @@ export type GlobalRegistration<T = any, A = any> = {
|
|
|
16
16
|
options: RegistrationOptions<T, A>;
|
|
17
17
|
};
|
|
18
18
|
export type Registration<T = any, A = any> = GlobalRegistration<T, A> & {
|
|
19
|
+
/**
|
|
20
|
+
* A map associating argument identities to their resolved instances of type `T`.
|
|
21
|
+
*/
|
|
19
22
|
resolutions: Map<any, T>;
|
|
20
23
|
};
|
|
21
24
|
export type GetRegistrationOptions = {
|
|
@@ -52,6 +55,12 @@ export declare class Injector implements AsyncDisposable {
|
|
|
52
55
|
static registerSingleton<T, A = undefined, C extends Record = Record>(token: InjectionToken<T, A>, providers: OneOrMany<Provider<T, A, C>>, options?: TypedOmit<RegistrationOptions<T, A, C>, 'lifecycle'>): void;
|
|
53
56
|
dispose(): Promise<void>;
|
|
54
57
|
[Symbol.asyncDispose](): Promise<void>;
|
|
58
|
+
/**
|
|
59
|
+
* Creates a new child `Injector` instance with the specified name.
|
|
60
|
+
*
|
|
61
|
+
* @param name - The name to assign to the child injector.
|
|
62
|
+
* @returns The newly created child `Injector` instance.
|
|
63
|
+
*/
|
|
55
64
|
fork(name: string): Injector;
|
|
56
65
|
/**
|
|
57
66
|
* Register a provider for a token
|
package/injector/injector.js
CHANGED
|
@@ -82,6 +82,12 @@ export class Injector {
|
|
|
82
82
|
async [Symbol.asyncDispose]() {
|
|
83
83
|
await this.dispose();
|
|
84
84
|
}
|
|
85
|
+
/**
|
|
86
|
+
* Creates a new child `Injector` instance with the specified name.
|
|
87
|
+
*
|
|
88
|
+
* @param name - The name to assign to the child injector.
|
|
89
|
+
* @returns The newly created child `Injector` instance.
|
|
90
|
+
*/
|
|
85
91
|
fork(name) {
|
|
86
92
|
const child = new Injector(name, this);
|
|
87
93
|
this.#children.push(child);
|
package/injector/interfaces.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Record, Type } from '../types.js';
|
|
1
|
+
import type { Record, Type } from '../types/index.js';
|
|
2
2
|
import type { ArgumentedInjectionToken, InjectionTokenArgument, ReifyingInjectionToken } from './token.js';
|
|
3
3
|
import type { AfterResolveContext } from './types.js';
|
|
4
4
|
export declare const resolveArgumentType: unique symbol;
|
package/injector/provider.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Constructor, Record, TypedOmit } from '../types.js';
|
|
1
|
+
import type { Constructor, Record, TypedOmit } from '../types/index.js';
|
|
2
2
|
import type { ResolveArgument } from './interfaces.js';
|
|
3
3
|
import type { InjectionToken } from './token.js';
|
|
4
4
|
import type { AfterResolveContext, ResolveContext } from './types.js';
|
package/injector/resolution.d.ts
CHANGED
|
@@ -1,15 +1,20 @@
|
|
|
1
|
-
import type { Record } from '../types.js';
|
|
1
|
+
import type { Record } from '../types/index.js';
|
|
2
2
|
import type { Resolvable } from './interfaces.js';
|
|
3
3
|
import type { AfterResolveContext } from './types.js';
|
|
4
4
|
export type AfterResolveHandler<A, D extends Record> = (argument: A, context: AfterResolveContext<D>) => void | Promise<void>;
|
|
5
5
|
export type ResolutionContext<A> = {
|
|
6
6
|
afterResolveRegistrations: AfterResolveHandler<A, any>[];
|
|
7
7
|
};
|
|
8
|
-
declare const assertInResolutionContext: (debugFnOrMessage: import("../types.js").Function | string) => void, getCurrentResolutionContext: {
|
|
9
|
-
(required: true, debugFn: import("../types.js").Function): ResolutionContext<any>;
|
|
10
|
-
(required?: false, debugFn?: import("../types.js").Function): ResolutionContext<any> | null;
|
|
11
|
-
(required: boolean, debugFn: import("../types.js").Function): ResolutionContext<any> | null;
|
|
8
|
+
declare const assertInResolutionContext: (debugFnOrMessage: import("../types/index.js").Function | string) => void, getCurrentResolutionContext: {
|
|
9
|
+
(required: true, debugFn: import("../types/index.js").Function): ResolutionContext<any>;
|
|
10
|
+
(required?: false, debugFn?: import("../types/index.js").Function): ResolutionContext<any> | null;
|
|
11
|
+
(required: boolean, debugFn: import("../types/index.js").Function): ResolutionContext<any> | null;
|
|
12
12
|
}, runInResolutionContext: <ReturnT>(context: ResolutionContext<any>, fn: () => ReturnT) => ReturnT;
|
|
13
|
+
/**
|
|
14
|
+
* Registers a handler function to be called after a dependency has been resolved.
|
|
15
|
+
*
|
|
16
|
+
* @param handler - The function to execute after resolution. It receives the resolved instance and the associated record.
|
|
17
|
+
*/
|
|
13
18
|
export declare function registerAfterResolve(handler: AfterResolveHandler<unknown, Record>): void;
|
|
14
19
|
export declare function registerAfterResolve<A, D extends Record>(_this: Resolvable<A, D>, handler: AfterResolveHandler<A, D>): void;
|
|
15
20
|
export { assertInResolutionContext, getCurrentResolutionContext, runInResolutionContext };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AbstractConstructor } from '../types.js';
|
|
1
|
+
import type { AbstractConstructor } from '../types/index.js';
|
|
2
2
|
import type { InjectionToken } from './token.js';
|
|
3
3
|
export type ResolveChainNodeBase<Type extends string> = {
|
|
4
4
|
type: Type;
|
|
@@ -21,7 +21,7 @@ export type ResolveChainNode = ResolveChainNodeBase<'token'> & {
|
|
|
21
21
|
export declare class ResolveChain {
|
|
22
22
|
readonly nodes: readonly ResolveChainNode[];
|
|
23
23
|
get length(): number;
|
|
24
|
-
/** @deprecated internal */
|
|
24
|
+
/** @deprecated for internal use only */
|
|
25
25
|
constructor(nodes: ResolveChainNode[]);
|
|
26
26
|
static startWith(token: InjectionToken): ResolveChain;
|
|
27
27
|
addToken(token: InjectionToken): ResolveChain;
|
package/injector/token.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AbstractConstructor } from '../types.js';
|
|
1
|
+
import type { AbstractConstructor } from '../types/index.js';
|
|
2
2
|
declare const type: unique symbol;
|
|
3
3
|
declare const argument: unique symbol;
|
|
4
4
|
export type SimpleInjectionToken<T> = AbstractConstructor<T>;
|
|
@@ -20,6 +20,13 @@ export declare class ReifyingInjectionToken<T = any, A = any> {
|
|
|
20
20
|
constructor(description: string);
|
|
21
21
|
toString(): string;
|
|
22
22
|
}
|
|
23
|
+
/**
|
|
24
|
+
* Creates a new injection token.
|
|
25
|
+
*
|
|
26
|
+
* @template T The type that will be provided by the token.
|
|
27
|
+
* @template A Optional type for additional arguments.
|
|
28
|
+
* @param description A string describing the purpose of the injection token.
|
|
29
|
+
*/
|
|
23
30
|
export declare function injectionToken<T, A = never>(description: string): InjectionToken<T, A>;
|
|
24
31
|
export declare function getTokenName(token: InjectionToken | undefined): string;
|
|
25
32
|
export {};
|
package/injector/token.js
CHANGED
|
@@ -8,6 +8,13 @@ export class ReifyingInjectionToken {
|
|
|
8
8
|
return `InjectionToken["${this.description}"]`;
|
|
9
9
|
}
|
|
10
10
|
}
|
|
11
|
+
/**
|
|
12
|
+
* Creates a new injection token.
|
|
13
|
+
*
|
|
14
|
+
* @template T The type that will be provided by the token.
|
|
15
|
+
* @template A Optional type for additional arguments.
|
|
16
|
+
* @param description A string describing the purpose of the injection token.
|
|
17
|
+
*/
|
|
11
18
|
export function injectionToken(description) {
|
|
12
19
|
return new ReifyingInjectionToken(description);
|
|
13
20
|
}
|
package/injector/types.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { CancellationSignal } from '../cancellation/index.js';
|
|
2
2
|
import type { AsyncDisposeHandler } from '../disposable/async-disposer.js';
|
|
3
|
-
import type { Record } from '../types.js';
|
|
3
|
+
import type { Record } from '../types/index.js';
|
|
4
4
|
import type { ForwardRefTypeHint } from '../utils/object/forward-ref.js';
|
|
5
5
|
import type { Injector, ProvidersItem } from './injector.js';
|
|
6
6
|
import type { ResolveArgument } from './interfaces.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Record } from '../types/index.js';
|
|
2
2
|
import type { KeyValueStore } from './key-value.store.js';
|
|
3
3
|
export declare abstract class KeyValueStoreProvider {
|
|
4
|
-
abstract get<KV extends
|
|
4
|
+
abstract get<KV extends Record<string>>(module: string): KeyValueStore<KV>;
|
|
5
5
|
}
|