@tstdl/base 0.81.35 → 0.82.1
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/api/client/client.d.ts +3 -3
- package/api/default-error-handlers.d.ts +1 -1
- package/api/response.d.ts +8 -8
- package/api/server/api-controller.d.ts +1 -1
- package/api/server/gateway.d.ts +9 -9
- package/api/server/middlewares/cors.middleware.d.ts +1 -1
- package/api/server/module.d.ts +1 -1
- package/api/types.d.ts +30 -30
- package/api/utils.d.ts +1 -1
- package/api/utils.js +3 -1
- package/api/utils.js.map +1 -1
- package/authentication/authentication-credentials.service.d.ts +6 -0
- package/authentication/authentication-credentials.service.js +17 -0
- package/authentication/authentication-credentials.service.js.map +1 -0
- package/authentication/authentication-session.repository.d.ts +6 -0
- package/authentication/authentication-session.repository.js +18 -0
- package/authentication/authentication-session.repository.js.map +1 -0
- package/authentication/authentication-token-payload.provider.d.ts +3 -0
- package/authentication/authentication-token-payload.provider.js +17 -0
- package/authentication/authentication-token-payload.provider.js.map +1 -0
- package/authentication/authentication.service.d.ts +42 -0
- package/authentication/authentication.service.js +133 -0
- package/authentication/authentication.service.js.map +1 -0
- package/authentication/models/authentication-credentials.model.d.ts +11 -0
- package/authentication/models/authentication-credentials.model.js +44 -0
- package/authentication/models/authentication-credentials.model.js.map +1 -0
- package/authentication/models/authentication-session.model.d.ts +14 -0
- package/authentication/models/authentication-session.model.js +59 -0
- package/authentication/models/authentication-session.model.js.map +1 -0
- package/authentication/models/index.d.ts +2 -0
- package/authentication/models/index.js +19 -0
- package/authentication/models/index.js.map +1 -0
- package/authentication/tokens.d.ts +2 -0
- package/authentication/tokens.js +6 -0
- package/authentication/tokens.js.map +1 -0
- package/collections/keyed-set.d.ts +1 -1
- package/collections/observable/observable-collection.d.ts +1 -1
- package/collections/observable/observable-list.d.ts +2 -2
- package/container/container.d.ts +3 -3
- package/container/container.js +3 -3
- package/container/container.js.map +1 -1
- package/container/decorators.d.ts +3 -3
- package/container/decorators.js +0 -1
- package/container/decorators.js.map +1 -1
- package/container/interfaces.d.ts +1 -1
- package/container/provider.d.ts +6 -6
- package/container/resolve-chain.d.ts +2 -2
- package/container/resolve-chain.js +1 -1
- package/container/resolve-chain.js.map +1 -1
- package/container/token.d.ts +3 -3
- package/container/type-info.d.ts +1 -1
- package/container/types.d.ts +4 -4
- package/core.d.ts +1 -1
- package/data-structures/linked-list.d.ts +1 -1
- package/data-structures/multi-key-map.d.ts +2 -2
- package/data-structures/sorted-array-list.d.ts +1 -1
- package/database/entity-repository.d.ts +2 -2
- package/database/entity.d.ts +3 -3
- package/database/module.d.ts +1 -1
- package/database/mongo/classes.d.ts +3 -3
- package/database/mongo/model/document.d.ts +3 -3
- package/database/mongo/module.d.ts +1 -1
- package/database/mongo/mongo-base.repository.d.ts +11 -11
- package/database/mongo/mongo-bulk.d.ts +1 -1
- package/database/mongo/mongo-entity-repository.d.ts +7 -7
- package/database/mongo/types.d.ts +16 -16
- package/database/query.d.ts +38 -38
- package/disposable/async-disposer.d.ts +3 -3
- package/distributed-loop/distributed-loop.d.ts +2 -2
- package/error/custom.error.d.ts +1 -1
- package/http/client/adapters/undici-http-client.adapter.d.ts +1 -1
- package/http/client/http-client-request.d.ts +5 -5
- package/http/client/http-client-response.d.ts +2 -2
- package/http/client/http-client.d.ts +5 -5
- package/http/http-body.d.ts +3 -1
- package/http/http-body.js +18 -12
- package/http/http-body.js.map +1 -1
- package/http/http-form.d.ts +2 -2
- package/http/http-headers.d.ts +3 -3
- package/http/http-query.d.ts +2 -2
- package/http/http-url-parameters.d.ts +2 -2
- package/http/http-value-map.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/server/http-server.d.ts +1 -1
- package/http/server/node/node-http-server.d.ts +1 -1
- package/http/types.d.ts +5 -5
- package/http/utils.d.ts +3 -3
- package/image-service/imgproxy/imgproxy-image-service.d.ts +1 -1
- package/json-path/json-path.d.ts +4 -4
- package/key-value-store/key-value.store.d.ts +1 -1
- package/key-value-store/mongo/module.d.ts +1 -1
- package/key-value-store/mongo/mongo-key-value.model.d.ts +1 -1
- package/lock/lock.d.ts +4 -4
- package/lock/mongo/model.d.ts +1 -1
- package/lock/mongo/module.d.ts +1 -1
- package/lock/provider.d.ts +1 -1
- package/logger/logger.d.ts +6 -6
- package/mail/mail.client.d.ts +1 -1
- package/mail/mail.service.d.ts +3 -1
- package/mail/mail.service.js +11 -6
- package/mail/mail.service.js.map +1 -1
- package/mail/models/mail-address.model.d.ts +1 -1
- package/mail/models/mail-content.model.d.ts +1 -1
- package/mail/models/mail-data.model.d.ts +2 -1
- package/mail/models/mail-log.model.d.ts +2 -2
- package/mail/models/mail-send-result.model.d.ts +1 -1
- package/mail/models/mail-template.model.d.ts +1 -1
- package/mail/module.d.ts +4 -2
- package/mail/module.js +6 -2
- package/mail/module.js.map +1 -1
- package/mail/repositories/mongo-mail-log.repository.d.ts +2 -2
- package/mail/tokens.d.ts +1 -0
- package/mail/tokens.js +2 -1
- package/mail/tokens.js.map +1 -1
- package/message-bus/local/types.d.ts +1 -1
- package/message-bus/message-bus.d.ts +1 -1
- package/migration/migration-state.d.ts +2 -2
- package/migration/migrator.d.ts +4 -4
- package/migration/mongo/module.d.ts +1 -1
- package/module/module-metric-reporter.d.ts +2 -2
- package/module/module.d.ts +1 -1
- package/module/modules/function.module.d.ts +1 -1
- package/module/modules/web-server.module.d.ts +1 -1
- package/notification/api.d.ts +3 -6
- package/notification/api.js +2 -5
- package/notification/api.js.map +1 -1
- package/notification/models/index.d.ts +2 -0
- package/notification/models/index.js +19 -0
- package/notification/models/index.js.map +1 -0
- package/notification/models/notification-channel-job.model.d.ts +3 -0
- package/notification/models/notification-channel-job.model.js +3 -0
- package/notification/models/notification-channel-job.model.js.map +1 -0
- package/notification/models/notification.model.d.ts +27 -0
- package/notification/{model.js → models/notification.model.js} +28 -16
- package/notification/models/notification.model.js.map +1 -0
- package/notification/module.d.ts +1 -1
- package/notification/notification-channel.service.d.ts +5 -0
- package/notification/notification-channel.service.js +7 -0
- package/notification/notification-channel.service.js.map +1 -0
- package/notification/notification.service.d.ts +8 -0
- package/notification/notification.service.js +40 -0
- package/notification/notification.service.js.map +1 -0
- package/object-storage/object-storage.d.ts +2 -2
- package/object-storage/object.d.ts +1 -1
- package/object-storage/s3/s3.object-storage-provider.d.ts +1 -1
- package/openid-connect/mongo-oidc-state.repository.d.ts +1 -1
- package/openid-connect/oidc-configuration.service.d.ts +1 -1
- package/openid-connect/oidc-state.model.d.ts +2 -2
- package/openid-connect/oidc.service-model.d.ts +8 -8
- package/orm/decorators.d.ts +26 -0
- package/orm/decorators.js +170 -0
- package/orm/decorators.js.map +1 -1
- package/orm/entity-definition.model.d.ts +51 -0
- package/orm/entity-definition.model.js +27 -0
- package/orm/entity-definition.model.js.map +1 -0
- package/orm/index.d.ts +1 -0
- package/orm/index.js +18 -0
- package/orm/index.js.map +1 -0
- package/orm/models/entity.d.ts +22 -0
- package/orm/models/entity.js +87 -0
- package/orm/models/entity.js.map +1 -0
- package/orm/models/index.d.ts +1 -0
- package/orm/models/index.js +18 -0
- package/orm/models/index.js.map +1 -0
- package/orm/repository/mongo/classes.d.ts +25 -0
- package/orm/repository/mongo/classes.js +33 -0
- package/orm/repository/mongo/classes.js.map +1 -0
- package/orm/repository/mongo/module.d.ts +8 -0
- package/orm/repository/mongo/module.js +88 -0
- package/orm/repository/mongo/module.js.map +1 -0
- package/orm/repository/mongo/mongo-repository.d.ts +11 -0
- package/orm/repository/mongo/mongo-repository.js +55 -0
- package/orm/repository/mongo/mongo-repository.js.map +1 -0
- package/orm/repository/mongo/mongo-transaction.d.ts +10 -0
- package/orm/repository/mongo/mongo-transaction.js +28 -0
- package/orm/repository/mongo/mongo-transaction.js.map +1 -0
- package/orm/repository/repository.d.ts +75 -0
- package/orm/repository/repository.js +182 -0
- package/orm/repository/repository.js.map +1 -0
- package/orm/repository/transaction.d.ts +26 -0
- package/orm/repository/transaction.js +65 -0
- package/orm/repository/transaction.js.map +1 -0
- package/orm/{types.d.ts → types/definition.d.ts} +5 -5
- package/orm/{types.js → types/definition.js} +8 -8
- package/orm/types/definition.js.map +1 -0
- package/orm/types/index.d.ts +3 -0
- package/orm/types/index.js +20 -0
- package/orm/types/index.js.map +1 -0
- package/orm/types/options.d.ts +36 -0
- package/orm/types/options.js +5 -0
- package/orm/types/options.js.map +1 -0
- package/orm/types/query.d.ts +110 -0
- package/orm/types/query.js +10 -0
- package/orm/types/query.js.map +1 -0
- package/package.json +5 -5
- package/pdf/pdf.service.d.ts +3 -3
- package/pool/pool.d.ts +4 -4
- package/promise/cancelable-promise.d.ts +1 -1
- package/promise/lazy-promise.d.ts +1 -1
- package/queue/mongo/job.d.ts +2 -2
- package/queue/mongo/queue.js +2 -2
- package/queue/mongo/queue.js.map +1 -1
- package/queue/queue.d.ts +11 -6
- package/queue/queue.js +2 -1
- package/queue/queue.js.map +1 -1
- package/reflection/decorator-data.js +2 -1
- package/reflection/decorator-data.js.map +1 -1
- package/reflection/registry.d.ts +18 -17
- package/reflection/registry.js +25 -10
- package/reflection/registry.js.map +1 -1
- package/reflection/types.d.ts +34 -34
- package/reflection/utils.d.ts +8 -8
- package/reflection/utils.js +6 -6
- package/reflection/utils.js.map +1 -1
- package/rpc/endpoints/message-port.rpc-endpoint.d.ts +3 -3
- package/rpc/model.d.ts +22 -22
- package/rpc/rpc.d.ts +1 -1
- package/rxjs/intersection-observer.d.ts +1 -1
- package/rxjs/mutation-observer.d.ts +1 -1
- package/rxjs/performance-observer.d.ts +1 -1
- package/rxjs/resize-observer.d.ts +1 -1
- package/rxjs/slow-array.d.ts +1 -1
- package/rxjs/touch.d.ts +1 -1
- package/schema/array-constraints/maximum-length.d.ts +2 -2
- package/schema/array-constraints/maximum-length.js +2 -2
- package/schema/array-constraints/maximum-length.js.map +1 -1
- package/schema/array-constraints/minimum-length.d.ts +2 -2
- package/schema/array-constraints/minimum-length.js +2 -2
- package/schema/array-constraints/minimum-length.js.map +1 -1
- package/schema/constraints/enumeration.d.ts +4 -4
- package/schema/constraints/enumeration.js +5 -5
- package/schema/constraints/enumeration.js.map +1 -1
- package/schema/constraints/generic.d.ts +4 -4
- package/schema/constraints/generic.js +2 -2
- package/schema/constraints/generic.js.map +1 -1
- package/schema/constraints/integer.d.ts +2 -2
- package/schema/constraints/integer.js +3 -2
- package/schema/constraints/integer.js.map +1 -1
- package/schema/constraints/length.d.ts +1 -1
- package/schema/constraints/literal.d.ts +2 -2
- package/schema/constraints/literal.js +2 -2
- package/schema/constraints/literal.js.map +1 -1
- package/schema/constraints/maximum-date.d.ts +2 -2
- package/schema/constraints/maximum-date.js +3 -2
- package/schema/constraints/maximum-date.js.map +1 -1
- package/schema/constraints/maximum-length.d.ts +2 -2
- package/schema/constraints/maximum-length.js +2 -2
- package/schema/constraints/maximum-length.js.map +1 -1
- package/schema/constraints/maximum.d.ts +2 -2
- package/schema/constraints/maximum.js +3 -2
- package/schema/constraints/maximum.js.map +1 -1
- package/schema/constraints/minimum-date.d.ts +2 -2
- package/schema/constraints/minimum-date.js +3 -2
- package/schema/constraints/minimum-date.js.map +1 -1
- package/schema/constraints/minimum-length.d.ts +2 -2
- package/schema/constraints/minimum-length.js +2 -2
- package/schema/constraints/minimum-length.js.map +1 -1
- package/schema/constraints/minimum.d.ts +2 -2
- package/schema/constraints/minimum.js +3 -2
- package/schema/constraints/minimum.js.map +1 -1
- package/schema/constraints/pattern.d.ts +2 -2
- package/schema/constraints/pattern.js +3 -2
- package/schema/constraints/pattern.js.map +1 -1
- package/schema/decorators/types.d.ts +3 -3
- package/schema/decorators/utils.d.ts +4 -1
- package/schema/decorators/utils.js +1 -1
- package/schema/decorators/utils.js.map +1 -1
- package/schema/schema.d.ts +4 -4
- package/schema/schema.error.d.ts +1 -1
- package/schema/schema.js +10 -13
- package/schema/schema.js.map +1 -1
- package/schema/schemas/any.d.ts +1 -1
- package/schema/schemas/array.d.ts +2 -2
- package/schema/schemas/array.js +2 -2
- package/schema/schemas/array.js.map +1 -1
- package/schema/schemas/boolean.d.ts +1 -1
- package/schema/schemas/date.d.ts +2 -2
- package/schema/schemas/date.js +2 -2
- package/schema/schemas/date.js.map +1 -1
- package/schema/schemas/enumeration.d.ts +2 -2
- package/schema/schemas/enumeration.js +2 -2
- package/schema/schemas/enumeration.js.map +1 -1
- package/schema/schemas/instance.d.ts +1 -1
- package/schema/schemas/literal.d.ts +2 -2
- package/schema/schemas/literal.js +2 -2
- package/schema/schemas/literal.js.map +1 -1
- package/schema/schemas/nullable.d.ts +1 -1
- package/schema/schemas/number.d.ts +2 -2
- package/schema/schemas/number.js +2 -2
- package/schema/schemas/number.js.map +1 -1
- package/schema/schemas/object.d.ts +1 -1
- package/schema/schemas/omit.d.ts +2 -2
- package/schema/schemas/omit.js.map +1 -1
- package/schema/schemas/one-or-many.d.ts +2 -2
- package/schema/schemas/optional.d.ts +1 -1
- package/schema/schemas/readable-stream.d.ts +1 -1
- package/schema/schemas/record.d.ts +1 -1
- package/schema/schemas/regexp.d.ts +1 -1
- package/schema/schemas/string.d.ts +2 -2
- package/schema/schemas/string.js +3 -3
- package/schema/schemas/string.js.map +1 -1
- package/schema/schemas/uint8-array.d.ts +2 -2
- package/schema/schemas/uint8-array.js +3 -3
- package/schema/schemas/uint8-array.js.map +1 -1
- package/schema/schemas/union.d.ts +1 -1
- package/schema/schemas/unknown.d.ts +1 -1
- package/schema/transformers/generic.d.ts +1 -1
- package/schema/types/index.d.ts +5 -0
- package/schema/types/index.js +22 -0
- package/schema/types/index.js.map +1 -0
- package/schema/types/schema-array-constraint.d.ts +5 -0
- package/schema/types/schema-array-constraint.js +7 -0
- package/schema/types/schema-array-constraint.js.map +1 -0
- package/schema/types/schema-value-coercer.d.ts +8 -0
- package/schema/types/schema-value-coercer.js +7 -0
- package/schema/types/schema-value-coercer.js.map +1 -0
- package/schema/types/schema-value-constraint.d.ts +8 -0
- package/schema/types/schema-value-constraint.js +7 -0
- package/schema/types/schema-value-constraint.js.map +1 -0
- package/schema/types/schema-value-transformer.d.ts +7 -0
- package/schema/types/schema-value-transformer.js +7 -0
- package/schema/types/schema-value-transformer.js.map +1 -0
- package/schema/{types.d.ts → types/types.d.ts} +47 -57
- package/schema/types/types.js +174 -0
- package/schema/types/types.js.map +1 -0
- package/schema/utils/schema.js +1 -1
- package/schema/utils/schema.js.map +1 -1
- package/schema/utils/value-type.d.ts +1 -1
- package/schema/utils/value-type.js +1 -1
- package/schema/utils/value-type.js.map +1 -1
- package/search-index/elastic/config.d.ts +1 -1
- package/search-index/elastic/model/elastic-query.d.ts +15 -15
- package/search-index/elastic/model/index-mapping.d.ts +14 -14
- package/search-index/elastic/model/sort.d.ts +3 -3
- package/search-index/elastic/module.d.ts +1 -1
- package/search-index/search-index.d.ts +1 -1
- package/search-index/search-result.d.ts +2 -2
- package/serializer/handlers/error.d.ts +1 -1
- package/serializer/handlers/map.d.ts +1 -1
- package/serializer/handlers/regex.d.ts +1 -1
- package/serializer/handlers/set.d.ts +1 -1
- package/serializer/serializable.d.ts +6 -6
- package/serializer/serializer.d.ts +1 -1
- package/serializer/types.d.ts +15 -15
- package/sse/server-sent-events.d.ts +3 -3
- package/tailwind/theme-adapter.d.ts +1 -1
- package/templates/module.d.ts +1 -1
- package/templates/providers/file.provider-template.d.ts +2 -2
- package/templates/providers/file.provider-template.js +2 -1
- package/templates/providers/file.provider-template.js.map +1 -1
- package/templates/renderers/handlebars.template-renderer.d.ts +9 -9
- package/templates/renderers/mjml.template-renderer.d.ts +3 -3
- package/templates/renderers/string.template-renderer.d.ts +1 -1
- package/templates/resolvers/file.template-resolver.d.ts +2 -2
- package/templates/template.model.d.ts +1 -1
- package/templates/template.renderer.d.ts +4 -4
- package/templates/template.service.d.ts +1 -1
- package/text/dynamic-text.model.d.ts +1 -1
- package/text/localizable-text.model.d.ts +1 -1
- package/text/localization.service.d.ts +11 -11
- package/theme/theme-service.d.ts +6 -6
- package/threading/thread-pool.d.ts +1 -1
- package/threading/thread-worker.d.ts +1 -1
- package/types/geo-json.d.ts +12 -12
- package/types.d.ts +91 -91
- package/utils/any-iterable-iterator.d.ts +3 -3
- package/utils/array/array.d.ts +14 -1
- package/utils/array/array.js +16 -2
- package/utils/array/array.js.map +1 -1
- package/utils/async-iterable-helpers/parallel/types.d.ts +2 -2
- package/utils/async-iterable-helpers/types.d.ts +7 -7
- package/utils/backoff.d.ts +5 -5
- package/utils/benchmark.d.ts +1 -1
- package/utils/binary-search.d.ts +1 -1
- package/utils/binary.js.map +1 -1
- package/utils/cancellation-token.d.ts +1 -1
- package/utils/compression.d.ts +1 -1
- package/utils/cryptography.d.ts +11 -11
- package/utils/date-time.d.ts +8 -7
- package/utils/date-time.js +6 -2
- package/utils/date-time.js.map +1 -1
- package/utils/equals.d.ts +3 -3
- package/utils/factory-map.d.ts +1 -1
- package/utils/format-error.d.ts +1 -1
- package/utils/function/memoize.d.ts +1 -1
- package/utils/helpers.d.ts +1 -1
- package/utils/iterable-helpers/types.d.ts +6 -6
- package/utils/jwt.d.ts +4 -4
- package/utils/math.d.ts +1 -1
- package/utils/merge.d.ts +1 -1
- package/utils/middleware.d.ts +9 -9
- package/utils/moving-metric.d.ts +1 -1
- package/utils/object/decycle.d.ts +1 -1
- package/utils/object/dereference.d.ts +1 -1
- package/utils/object/forward-ref.d.ts +2 -2
- package/utils/object/lazy-property.d.ts +5 -5
- package/utils/object/merge.d.ts +1 -1
- package/utils/object/object.js +1 -2
- package/utils/object/object.js.map +1 -1
- package/utils/object/property-name.d.ts +5 -5
- package/utils/patch-worker.d.ts +1 -1
- package/utils/periodic-sampler.d.ts +1 -1
- package/utils/provider-function-iterable.d.ts +2 -2
- package/utils/proxy.d.ts +1 -1
- package/utils/singleton.d.ts +2 -2
- package/utils/sort.d.ts +2 -2
- package/utils/stream/stream-helper-types.d.ts +5 -5
- package/utils/type-guards.d.ts +3 -3
- package/utils/url-builder.d.ts +4 -4
- package/web-types.d.ts +4 -4
- package/notification/model.d.ts +0 -18
- package/notification/model.js.map +0 -1
- package/orm/mongo/mongo-repository.d.ts +0 -2
- package/orm/mongo/mongo-repository.js +0 -7
- package/orm/mongo/mongo-repository.js.map +0 -1
- package/orm/types.js.map +0 -1
- package/schema/types.js +0 -102
- package/schema/types.js.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { AsyncDisposable } from "../../disposable";
|
|
2
2
|
import { disposeAsync } from "../../disposable";
|
|
3
3
|
import type { HttpServerRequest, HttpServerResponse } from "./";
|
|
4
|
-
export
|
|
4
|
+
export type HttpServerRequestContext<Context = unknown> = {
|
|
5
5
|
request: HttpServerRequest;
|
|
6
6
|
context: Context;
|
|
7
7
|
respond(response: HttpServerResponse): Promise<void>;
|
|
@@ -7,7 +7,7 @@ import { Logger } from "../../../logger";
|
|
|
7
7
|
import * as Http from 'http';
|
|
8
8
|
import type { HttpServerRequestContext } from '../http-server';
|
|
9
9
|
import { HttpServer } from '../http-server';
|
|
10
|
-
export
|
|
10
|
+
export type NodeHttpServerContext = {
|
|
11
11
|
nodeRequest: Http.IncomingMessage;
|
|
12
12
|
nodeResponse: Http.ServerResponse;
|
|
13
13
|
};
|
package/http/types.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { OneOrMany } from "../types";
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
2
|
+
export type HttpValue = string | number | boolean | null;
|
|
3
|
+
export type NormalizedHttpValue = string;
|
|
4
|
+
export type HttpValueObject = Record<string, OneOrMany<HttpValue>>;
|
|
5
|
+
export type NormalizedHttpValueObject = Record<string, OneOrMany<string>>;
|
|
6
|
+
export type HttpMethod = 'HEAD' | 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'OPTIONS';
|
|
7
7
|
export declare function normalizeHttpValue(value: OneOrMany<HttpValue>): OneOrMany<string>;
|
|
8
8
|
export declare function normalizeSingleHttpValue(value: HttpValue): string;
|
|
9
9
|
export declare function denormalizeHttpValue(value: OneOrMany<HttpValue>): OneOrMany<HttpValue>;
|
package/http/utils.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import type { HttpHeaders } from "./http-headers";
|
|
2
2
|
import type { UndefinableJson } from "../types";
|
|
3
3
|
import type { AnyIterable } from "../utils/any-iterable-iterator";
|
|
4
|
-
|
|
5
|
-
export
|
|
4
|
+
type Body = Uint8Array | Blob | AnyIterable<Uint8Array> | ReadableStream<Uint8Array>;
|
|
5
|
+
export type ReadBodyOptions = {
|
|
6
6
|
maxBytes?: number;
|
|
7
7
|
};
|
|
8
|
-
export
|
|
8
|
+
export type ReadBodyAsJsonOptions = ReadBodyOptions & {
|
|
9
9
|
fallbackToText?: boolean;
|
|
10
10
|
};
|
|
11
11
|
export declare function readBodyAsBinaryStream(body: Body, headers: HttpHeaders, options?: ReadBodyOptions): ReadableStream<Uint8Array>;
|
|
@@ -2,7 +2,7 @@ import type { Injectable } from "../../container";
|
|
|
2
2
|
import { resolveArgumentType } from "../../container";
|
|
3
3
|
import type { ImageOptions } from '../image-service';
|
|
4
4
|
import { ImageService } from '../image-service';
|
|
5
|
-
export
|
|
5
|
+
export type ImgproxyImageServiceConfig = {
|
|
6
6
|
endpoint: string;
|
|
7
7
|
key: string;
|
|
8
8
|
salt: string;
|
package/json-path/json-path.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
1
|
+
export type JsonPathNode = PropertyKey;
|
|
2
|
+
export type JsonPathInput = string | JsonPath | Iterable<JsonPathNode>;
|
|
3
3
|
export declare class JsonPath<T = any> implements Iterable<JsonPathNode> {
|
|
4
4
|
private readonly _options;
|
|
5
5
|
private _path;
|
|
@@ -26,7 +26,7 @@ export declare class JsonPath<T = any> implements Iterable<JsonPathNode> {
|
|
|
26
26
|
options(options: JsonPathOptions): JsonPath;
|
|
27
27
|
[Symbol.iterator](): Iterator<PropertyKey>;
|
|
28
28
|
}
|
|
29
|
-
export
|
|
29
|
+
export type JsonPathOptions = {
|
|
30
30
|
/** encode as array.0 instead of array[0] */
|
|
31
31
|
treatArrayAsObject?: boolean;
|
|
32
32
|
/** encode as ['foo'] instead of .foo */
|
|
@@ -34,7 +34,7 @@ export declare type JsonPathOptions = {
|
|
|
34
34
|
/** dont prepend $ */
|
|
35
35
|
noDollar?: boolean;
|
|
36
36
|
};
|
|
37
|
-
export
|
|
37
|
+
export type JsonPathContext = {
|
|
38
38
|
/** if path contains symbols, they are required in order to be mapped, otherwise they are created from global symbol registry */
|
|
39
39
|
symbols?: symbol[];
|
|
40
40
|
};
|
|
@@ -2,7 +2,7 @@ import type { Injectable } from "../container";
|
|
|
2
2
|
import { resolveArgumentType } from "../container";
|
|
3
3
|
import type { StringMap } from '../types';
|
|
4
4
|
/** key value store module */
|
|
5
|
-
export
|
|
5
|
+
export type KeyValueStoreArgument = string;
|
|
6
6
|
export declare abstract class KeyValueStore<KV extends StringMap> implements Injectable<KeyValueStoreArgument> {
|
|
7
7
|
readonly module: string;
|
|
8
8
|
readonly [resolveArgumentType]: KeyValueStoreArgument;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { MongoRepositoryConfig } from "../../database/mongo";
|
|
2
2
|
import type { MongoKeyValue } from './mongo-key-value.model';
|
|
3
|
-
export
|
|
3
|
+
export type MongoKeyValueStoreModuleConfig = {
|
|
4
4
|
defaultKeyValueRepositoryConfig: MongoRepositoryConfig<MongoKeyValue> | undefined;
|
|
5
5
|
};
|
|
6
6
|
export declare const mongoKeyValueStoreModuleConfig: MongoKeyValueStoreModuleConfig;
|
package/lock/lock.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { Injectable } from "../container";
|
|
2
2
|
import { resolveArgumentType } from "../container";
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
3
|
+
export type LockedFunction<R> = (controller: LockController) => R | Promise<R>;
|
|
4
|
+
export type AcquireResult<Throw extends boolean> = Throw extends true ? LockController : (LockController | false);
|
|
5
|
+
export type UsingResult<Throw extends boolean, R> = Throw extends true ? ({
|
|
6
6
|
success: true;
|
|
7
7
|
result: R;
|
|
8
8
|
}) : ({
|
|
@@ -22,7 +22,7 @@ export interface LockController {
|
|
|
22
22
|
release(): Promise<void>;
|
|
23
23
|
}
|
|
24
24
|
/** resource */
|
|
25
|
-
export
|
|
25
|
+
export type LockArgument = string | {
|
|
26
26
|
prefix?: string;
|
|
27
27
|
resource: string;
|
|
28
28
|
};
|
package/lock/mongo/model.d.ts
CHANGED
package/lock/mongo/module.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { MongoRepositoryConfig } from "../../database/mongo";
|
|
2
2
|
import type { MongoLockEntity } from './model';
|
|
3
|
-
export
|
|
3
|
+
export type MongoLockModuleConfig = {
|
|
4
4
|
lockEntityRepositoryConfig: MongoRepositoryConfig<MongoLockEntity> | undefined;
|
|
5
5
|
};
|
|
6
6
|
export declare const mongoLockModuleConfig: MongoLockModuleConfig;
|
package/lock/provider.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import type { Injectable } from "../container";
|
|
|
2
2
|
import { resolveArgumentType } from "../container";
|
|
3
3
|
import type { Lock } from './lock';
|
|
4
4
|
/** prefix */
|
|
5
|
-
export
|
|
5
|
+
export type LockProviderArgument = string;
|
|
6
6
|
export declare abstract class LockProvider implements Injectable<LockProviderArgument> {
|
|
7
7
|
readonly [resolveArgumentType]: LockProviderArgument;
|
|
8
8
|
abstract prefix(prefix: string): LockProvider;
|
package/logger/logger.d.ts
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import type { Injectable } from "../container";
|
|
2
2
|
import { resolveArgumentType } from "../container";
|
|
3
3
|
import { LogLevel } from './level';
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
export
|
|
8
|
-
export
|
|
4
|
+
export type LogEntry = string;
|
|
5
|
+
export type LogEntryProvider = () => LogEntry;
|
|
6
|
+
export type LogEntryOrProvider = LogEntry | LogEntryProvider;
|
|
7
|
+
export type LoggerStatic = new (level: LogLevel) => Logger;
|
|
8
|
+
export type LogErrorOptions = {
|
|
9
9
|
includeRest?: boolean;
|
|
10
10
|
includeStack?: boolean;
|
|
11
11
|
};
|
|
12
12
|
/** either string as a module shorthand or object */
|
|
13
|
-
export
|
|
13
|
+
export type LoggerArgument = string | undefined | {
|
|
14
14
|
level?: LogLevel;
|
|
15
15
|
module?: string | string[];
|
|
16
16
|
prefix?: string;
|
package/mail/mail.client.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Injectable } from "../container";
|
|
2
2
|
import { resolveArgumentType } from "../container";
|
|
3
3
|
import type { MailData, MailSendResult } from './models';
|
|
4
|
-
export
|
|
4
|
+
export type MailClientConfig = {
|
|
5
5
|
host: string;
|
|
6
6
|
port: number;
|
|
7
7
|
secure?: boolean;
|
package/mail/mail.service.d.ts
CHANGED
|
@@ -4,13 +4,15 @@ import type { TypedOmit } from "../types";
|
|
|
4
4
|
import { MailLogRepository } from './mail-log.repository';
|
|
5
5
|
import { MailClient } from './mail.client';
|
|
6
6
|
import type { MailData, MailSendResult } from './models';
|
|
7
|
+
import { DefaultMailData } from './models';
|
|
7
8
|
export declare class MailService {
|
|
8
9
|
private readonly mailClient;
|
|
9
10
|
private readonly templateService;
|
|
10
11
|
private readonly mailLogRepository;
|
|
12
|
+
private readonly defaultData;
|
|
11
13
|
private readonly logger;
|
|
12
14
|
private readonly mailDataSourceTemplateKey;
|
|
13
|
-
constructor(mailClient: MailClient, templateService: TemplateService, mailLogRepository: MailLogRepository | undefined, logger: Logger);
|
|
15
|
+
constructor(mailClient: MailClient, templateService: TemplateService, mailLogRepository: MailLogRepository | undefined, defaultData: DefaultMailData, logger: Logger);
|
|
14
16
|
send(mailData: MailData): Promise<MailSendResult>;
|
|
15
17
|
sendTemplate(key: string, mailData: TypedOmit<MailData, 'content' | 'subject'>, templateContext?: object): Promise<MailSendResult>;
|
|
16
18
|
}
|
package/mail/mail.service.js
CHANGED
|
@@ -22,33 +22,37 @@ const format_error_1 = require("../utils/format-error");
|
|
|
22
22
|
const type_guards_1 = require("../utils/type-guards");
|
|
23
23
|
const mail_log_repository_1 = require("./mail-log.repository");
|
|
24
24
|
const mail_client_1 = require("./mail.client");
|
|
25
|
+
const tokens_1 = require("./tokens");
|
|
25
26
|
let MailService = MailService_1 = class MailService {
|
|
26
27
|
mailClient;
|
|
27
28
|
templateService;
|
|
28
29
|
mailLogRepository;
|
|
30
|
+
defaultData;
|
|
29
31
|
logger;
|
|
30
32
|
mailDataSourceTemplateKey;
|
|
31
|
-
constructor(mailClient, templateService, mailLogRepository, logger) {
|
|
33
|
+
constructor(mailClient, templateService, mailLogRepository, defaultData, logger) {
|
|
32
34
|
this.mailClient = mailClient;
|
|
33
35
|
this.templateService = templateService;
|
|
34
36
|
this.mailLogRepository = mailLogRepository;
|
|
37
|
+
this.defaultData = defaultData;
|
|
35
38
|
this.logger = logger;
|
|
36
39
|
this.mailDataSourceTemplateKey = new WeakMap();
|
|
37
40
|
}
|
|
38
41
|
async send(mailData) {
|
|
42
|
+
const data = { ...this.defaultData, ...mailData };
|
|
39
43
|
let mailLog;
|
|
40
44
|
if ((0, type_guards_1.isDefined)(this.mailLogRepository)) {
|
|
41
45
|
const log = {
|
|
42
46
|
timestamp: (0, date_time_1.currentTimestamp)(),
|
|
43
|
-
templateKey: this.mailDataSourceTemplateKey.get(
|
|
44
|
-
data
|
|
47
|
+
templateKey: this.mailDataSourceTemplateKey.get(data) ?? null,
|
|
48
|
+
data,
|
|
45
49
|
sendResult: null,
|
|
46
50
|
errors: null
|
|
47
51
|
};
|
|
48
52
|
mailLog = await this.mailLogRepository.insert(log);
|
|
49
53
|
}
|
|
50
54
|
try {
|
|
51
|
-
const result = await this.mailClient.send(
|
|
55
|
+
const result = await this.mailClient.send(data);
|
|
52
56
|
if ((0, type_guards_1.isDefined)(mailLog)) {
|
|
53
57
|
await this.mailLogRepository.patch(mailLog, { sendResult: result });
|
|
54
58
|
}
|
|
@@ -77,9 +81,10 @@ MailService = MailService_1 = __decorate([
|
|
|
77
81
|
(0, container_1.singleton)(),
|
|
78
82
|
__param(2, (0, container_1.inject)(mail_log_repository_1.MailLogRepository)),
|
|
79
83
|
__param(2, (0, container_1.optional)()),
|
|
80
|
-
__param(3, (0, container_1.
|
|
84
|
+
__param(3, (0, container_1.inject)(tokens_1.MAIL_DEFAULT_DATA)),
|
|
85
|
+
__param(4, (0, container_1.resolveArg)(MailService_1.name)),
|
|
81
86
|
__metadata("design:paramtypes", [mail_client_1.MailClient,
|
|
82
|
-
templates_1.TemplateService, Object, logger_1.Logger])
|
|
87
|
+
templates_1.TemplateService, Object, Object, logger_1.Logger])
|
|
83
88
|
], MailService);
|
|
84
89
|
exports.MailService = MailService;
|
|
85
90
|
//# sourceMappingURL=mail.service.js.map
|
package/mail/mail.service.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mail.service.js","sourceRoot":"","sources":["../../source/mail/mail.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAAsE;AAEtE,sCAAkC;AAClC,4CAA8C;AAE9C,kDAAqD;AACrD,wDAAmD;AACnD,sDAAgD;AAChD,+DAA0D;AAC1D,+CAA2C;
|
|
1
|
+
{"version":3,"file":"mail.service.js","sourceRoot":"","sources":["../../source/mail/mail.service.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { OneOrMany } from "../../types";
|
|
2
2
|
import type { MailAddress } from './mail-address.model';
|
|
3
3
|
import type { MailContent } from './mail-content.model';
|
|
4
|
-
export
|
|
4
|
+
export type MailData = {
|
|
5
5
|
content: MailContent;
|
|
6
6
|
from?: MailAddress;
|
|
7
7
|
to?: OneOrMany<MailAddress>;
|
|
@@ -18,3 +18,4 @@ export declare type MailData = {
|
|
|
18
18
|
*/
|
|
19
19
|
headers?: Record<string, string | string[]>;
|
|
20
20
|
};
|
|
21
|
+
export type DefaultMailData = Partial<MailData>;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import type { Entity, NewEntity } from "../../database";
|
|
2
2
|
import type { MailData } from './mail-data.model';
|
|
3
3
|
import type { MailSendResult } from './mail-send-result.model';
|
|
4
|
-
export
|
|
4
|
+
export type MailLog = Entity & {
|
|
5
5
|
timestamp: number;
|
|
6
6
|
templateKey: string | null;
|
|
7
7
|
data: MailData;
|
|
8
8
|
sendResult: MailSendResult | null;
|
|
9
9
|
errors: string[] | null;
|
|
10
10
|
};
|
|
11
|
-
export
|
|
11
|
+
export type NewMailLog = NewEntity<MailLog>;
|
package/mail/module.d.ts
CHANGED
|
@@ -2,13 +2,15 @@ import type { Type } from "../types";
|
|
|
2
2
|
import { MailLogRepository } from './mail-log.repository';
|
|
3
3
|
import type { MailClientConfig } from './mail.client';
|
|
4
4
|
import { MailClient } from './mail.client';
|
|
5
|
-
|
|
5
|
+
import type { DefaultMailData } from './models';
|
|
6
|
+
export type MailModuleConfig = {
|
|
6
7
|
clientConfig: MailClientConfig;
|
|
7
8
|
client: Type<MailClient>;
|
|
8
9
|
logRepository: Type<MailLogRepository> | undefined;
|
|
10
|
+
defaultData: DefaultMailData;
|
|
9
11
|
};
|
|
10
12
|
export declare const mailModuleConfig: MailModuleConfig;
|
|
11
13
|
/**
|
|
12
14
|
* configure mail module
|
|
13
15
|
*/
|
|
14
|
-
export declare function configureMail({ clientConfig, client, logRepository }: Partial<MailModuleConfig>): void;
|
|
16
|
+
export declare function configureMail({ clientConfig, client, logRepository, defaultData }: Partial<MailModuleConfig>): void;
|
package/mail/module.js
CHANGED
|
@@ -9,12 +9,13 @@ const tokens_1 = require("./tokens");
|
|
|
9
9
|
exports.mailModuleConfig = {
|
|
10
10
|
clientConfig: { host: '127.0.0.1', port: 25 },
|
|
11
11
|
client: (0, container_1.stubClass)(mail_client_1.MailClient),
|
|
12
|
-
logRepository: (0, container_1.stubClass)(mail_log_repository_1.MailLogRepository)
|
|
12
|
+
logRepository: (0, container_1.stubClass)(mail_log_repository_1.MailLogRepository),
|
|
13
|
+
defaultData: {}
|
|
13
14
|
};
|
|
14
15
|
/**
|
|
15
16
|
* configure mail module
|
|
16
17
|
*/
|
|
17
|
-
function configureMail({ clientConfig, client, logRepository }) {
|
|
18
|
+
function configureMail({ clientConfig, client, logRepository, defaultData }) {
|
|
18
19
|
if ((0, type_guards_1.isDefined)(clientConfig)) {
|
|
19
20
|
container_1.container.registerSingleton(tokens_1.MAIL_CLIENT_CONFIG, { useValue: clientConfig });
|
|
20
21
|
}
|
|
@@ -24,6 +25,9 @@ function configureMail({ clientConfig, client, logRepository }) {
|
|
|
24
25
|
if ((0, type_guards_1.isDefined)(logRepository)) {
|
|
25
26
|
container_1.container.registerSingleton(mail_log_repository_1.MailLogRepository, { useToken: logRepository });
|
|
26
27
|
}
|
|
28
|
+
if ((0, type_guards_1.isDefined)(defaultData)) {
|
|
29
|
+
container_1.container.registerSingleton(tokens_1.MAIL_DEFAULT_DATA, { useValue: defaultData });
|
|
30
|
+
}
|
|
27
31
|
}
|
|
28
32
|
exports.configureMail = configureMail;
|
|
29
33
|
//# sourceMappingURL=module.js.map
|
package/mail/module.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module.js","sourceRoot":"","sources":["../../source/mail/module.ts"],"names":[],"mappings":";;;AAAA,4CAAmD;AAEnD,sDAAgD;AAChD,+DAA0D;AAE1D,+CAA2C;
|
|
1
|
+
{"version":3,"file":"module.js","sourceRoot":"","sources":["../../source/mail/module.ts"],"names":[],"mappings":";;;AAAA,4CAAmD;AAEnD,sDAAgD;AAChD,+DAA0D;AAE1D,+CAA2C;AAE3C,qCAAiE;AASpD,QAAA,gBAAgB,GAAqB;IAChD,YAAY,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,EAAE,EAAE;IAC7C,MAAM,EAAE,IAAA,qBAAS,EAAC,wBAAU,CAAC;IAC7B,aAAa,EAAE,IAAA,qBAAS,EAAC,uCAAiB,CAAC;IAC3C,WAAW,EAAE,EAAE;CAChB,CAAC;AAEF;;GAEG;AACH,SAAgB,aAAa,CAAC,EAAE,YAAY,EAAE,MAAM,EAAE,aAAa,EAAE,WAAW,EAA6B;IAC3G,IAAI,IAAA,uBAAS,EAAC,YAAY,CAAC,EAAE;QAC3B,qBAAS,CAAC,iBAAiB,CAAC,2BAAkB,EAAE,EAAE,QAAQ,EAAE,YAAY,EAAE,CAAC,CAAC;KAC7E;IAED,IAAI,IAAA,uBAAS,EAAC,MAAM,CAAC,EAAE;QACrB,qBAAS,CAAC,iBAAiB,CAAC,wBAAU,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC,CAAC;KAC/D;IAED,IAAI,IAAA,uBAAS,EAAC,aAAa,CAAC,EAAE;QAC5B,qBAAS,CAAC,iBAAiB,CAAC,uCAAiB,EAAE,EAAE,QAAQ,EAAE,aAAa,EAAE,CAAC,CAAC;KAC7E;IAED,IAAI,IAAA,uBAAS,EAAC,WAAW,CAAC,EAAE;QAC1B,qBAAS,CAAC,iBAAiB,CAAC,0BAAiB,EAAE,EAAE,QAAQ,EAAE,WAAW,EAAE,CAAC,CAAC;KAC3E;AACH,CAAC;AAhBD,sCAgBC"}
|
|
@@ -4,10 +4,10 @@ import type { CollectionArgument } from "../../database/mongo";
|
|
|
4
4
|
import { Collection, MongoEntityRepository } from "../../database/mongo";
|
|
5
5
|
import { Logger } from "../../logger";
|
|
6
6
|
import type { MailLog } from '../models';
|
|
7
|
-
export
|
|
7
|
+
export type MongoMailLogRepositoryConfig = {
|
|
8
8
|
config?: MongoMailLogRepositoryArgument;
|
|
9
9
|
};
|
|
10
|
-
export
|
|
10
|
+
export type MongoMailLogRepositoryArgument = CollectionArgument<MailLog>;
|
|
11
11
|
export declare const mongoMailLogRepositoryConfig: MongoMailLogRepositoryConfig;
|
|
12
12
|
export declare class MongoMailLogRepository extends MongoEntityRepository<MailLog> implements Injectable<MongoMailLogRepositoryArgument> {
|
|
13
13
|
[resolveArgumentType]: MongoMailLogRepositoryArgument;
|
package/mail/tokens.d.ts
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
import type { MailClientConfig } from './mail.client';
|
|
2
2
|
export declare const MAIL_CLIENT_CONFIG: import("../container").InjectionToken<MailClientConfig, any>;
|
|
3
|
+
export declare const MAIL_DEFAULT_DATA: import("../container").InjectionToken<Partial<import("./models").MailData>, any>;
|
package/mail/tokens.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.MAIL_CLIENT_CONFIG = void 0;
|
|
3
|
+
exports.MAIL_DEFAULT_DATA = exports.MAIL_CLIENT_CONFIG = void 0;
|
|
4
4
|
const container_1 = require("../container");
|
|
5
5
|
exports.MAIL_CLIENT_CONFIG = (0, container_1.injectionToken)('MAIL_CLIENT_CONFIG');
|
|
6
|
+
exports.MAIL_DEFAULT_DATA = (0, container_1.injectionToken)('MAIL_DEFAULT_DATA');
|
|
6
7
|
//# sourceMappingURL=tokens.js.map
|
package/mail/tokens.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tokens.js","sourceRoot":"","sources":["../../source/mail/tokens.ts"],"names":[],"mappings":";;;AAAA,4CAA6C;
|
|
1
|
+
{"version":3,"file":"tokens.js","sourceRoot":"","sources":["../../source/mail/tokens.ts"],"names":[],"mappings":";;;AAAA,4CAA6C;AAIhC,QAAA,kBAAkB,GAAG,IAAA,0BAAc,EAAmB,oBAAoB,CAAC,CAAC;AAE5E,QAAA,iBAAiB,GAAG,IAAA,0BAAc,EAAkB,mBAAmB,CAAC,CAAC"}
|
|
@@ -3,7 +3,7 @@ import { resolveArgumentType } from "../container";
|
|
|
3
3
|
import type { Observable } from 'rxjs';
|
|
4
4
|
import type { AsyncDisposable } from '../disposable';
|
|
5
5
|
import { disposeAsync } from '../disposable';
|
|
6
|
-
export
|
|
6
|
+
export type MessageBusArgument = string;
|
|
7
7
|
export declare abstract class MessageBus<T> implements AsyncDisposable, Injectable<MessageBusArgument> {
|
|
8
8
|
readonly [resolveArgumentType]: string;
|
|
9
9
|
/** messages from other instances */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Entity, NewEntity } from "../database";
|
|
2
|
-
export
|
|
2
|
+
export type MigrationState = Entity & {
|
|
3
3
|
name: string;
|
|
4
4
|
revision: number;
|
|
5
5
|
};
|
|
6
|
-
export
|
|
6
|
+
export type NewMigrationState = NewEntity<MigrationState>;
|
package/migration/migrator.d.ts
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { LockProvider } from "../lock";
|
|
2
2
|
import { Logger } from "../logger";
|
|
3
3
|
import { MigrationStateRepository } from './migration-state-repository';
|
|
4
|
-
export
|
|
4
|
+
export type MigrationDefinition<T = void> = {
|
|
5
5
|
name: string;
|
|
6
6
|
migrations: Migration<T>[];
|
|
7
7
|
};
|
|
8
|
-
export
|
|
8
|
+
export type Migration<T = void> = {
|
|
9
9
|
from: 'init' | number | number[];
|
|
10
10
|
to: number;
|
|
11
11
|
migrator: (control: MigrationControl) => Promise<T> | T;
|
|
12
12
|
};
|
|
13
|
-
export
|
|
13
|
+
export type MigrationControl = {
|
|
14
14
|
restart: () => void;
|
|
15
15
|
};
|
|
16
|
-
export
|
|
16
|
+
export type MigrationResult<T> = {
|
|
17
17
|
from: 'init' | number;
|
|
18
18
|
to: number;
|
|
19
19
|
time: number;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { MongoRepositoryConfig } from "../../database/mongo";
|
|
2
2
|
import type { MigrationState } from "..";
|
|
3
|
-
export
|
|
3
|
+
export type MongoMigrationStateRepositoryModuleConfig = {
|
|
4
4
|
defaultMigrationStateRepositoryConfig: MongoRepositoryConfig<MigrationState> | undefined;
|
|
5
5
|
};
|
|
6
6
|
export declare const mongoMigrationStateRepositoryModuleConfig: MongoMigrationStateRepositoryModuleConfig;
|
|
@@ -2,12 +2,12 @@ import type { ReadonlyCancellationToken } from "../utils/cancellation-token";
|
|
|
2
2
|
import type { MetricAggregation, MetricAggregationOptions } from "../utils/moving-metric";
|
|
3
3
|
import { MovingMetric } from "../utils/moving-metric";
|
|
4
4
|
import type { ModuleMetric } from './module';
|
|
5
|
-
export
|
|
5
|
+
export type MetricReport<Aggregation extends MetricAggregation> = {
|
|
6
6
|
displayName: string;
|
|
7
7
|
aggregation: Aggregation;
|
|
8
8
|
aggregationOptions?: MetricAggregationOptions<Aggregation>;
|
|
9
9
|
};
|
|
10
|
-
export
|
|
10
|
+
export type MetricReportRegistration = {
|
|
11
11
|
metric: ModuleMetric;
|
|
12
12
|
moving: MovingMetric;
|
|
13
13
|
reports: MetricReport<MetricAggregation>[];
|
package/module/module.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ReadonlyCancellationToken } from "../../utils/cancellation-token";
|
|
2
2
|
import type { Module } from '../module';
|
|
3
3
|
import { ModuleBase } from '../module-base';
|
|
4
|
-
export
|
|
4
|
+
export type FunctionModuleFunction = (cancellationToken: ReadonlyCancellationToken) => void | Promise<void>;
|
|
5
5
|
export declare class FunctionModule extends ModuleBase implements Module {
|
|
6
6
|
private readonly fn;
|
|
7
7
|
readonly metrics: {};
|
|
@@ -7,7 +7,7 @@ import type { ReadonlyCancellationToken } from "../../utils/cancellation-token";
|
|
|
7
7
|
import type { Module } from '../module';
|
|
8
8
|
import { ModuleMetricType } from '../module';
|
|
9
9
|
import { ModuleBase } from '../module-base';
|
|
10
|
-
export
|
|
10
|
+
export type WebServerModuleConfiguration = {
|
|
11
11
|
port: number;
|
|
12
12
|
};
|
|
13
13
|
export declare const webServerModuleConfiguration: WebServerModuleConfiguration;
|
package/notification/api.d.ts
CHANGED
|
@@ -1,17 +1,14 @@
|
|
|
1
1
|
import type { ApiServerResult } from "../api";
|
|
2
|
-
import { Notification } from './
|
|
2
|
+
import { Notification } from './models';
|
|
3
3
|
declare const notificationApiDefinition: {
|
|
4
4
|
readonly resource: string;
|
|
5
5
|
endpoints: {
|
|
6
6
|
get: {
|
|
7
|
-
|
|
8
|
-
for: string;
|
|
9
|
-
}>;
|
|
10
|
-
result: import("../schema").ValueSchema<Notification[]>;
|
|
7
|
+
result: import("../schema").ValueSchema<Notification<unknown>[]>;
|
|
11
8
|
};
|
|
12
9
|
};
|
|
13
10
|
};
|
|
14
|
-
|
|
11
|
+
type NotificationApiDefinition = typeof notificationApiDefinition;
|
|
15
12
|
export declare class NotificationApi {
|
|
16
13
|
get(): Promise<ApiServerResult<NotificationApiDefinition, 'get'>>;
|
|
17
14
|
}
|
package/notification/api.js
CHANGED
|
@@ -10,16 +10,13 @@ exports.NotificationApi = void 0;
|
|
|
10
10
|
const api_1 = require("../api");
|
|
11
11
|
const server_1 = require("../api/server");
|
|
12
12
|
const schema_1 = require("../schema");
|
|
13
|
-
const
|
|
13
|
+
const models_1 = require("./models");
|
|
14
14
|
const module_1 = require("./module");
|
|
15
15
|
const notificationApiDefinition = (0, api_1.defineApi)({
|
|
16
16
|
get resource() { return module_1.notificationModuleConfig.apiResource; },
|
|
17
17
|
endpoints: {
|
|
18
18
|
get: {
|
|
19
|
-
|
|
20
|
-
for: (0, schema_1.string)()
|
|
21
|
-
}),
|
|
22
|
-
result: (0, schema_1.array)(model_1.Notification)
|
|
19
|
+
result: (0, schema_1.array)(models_1.Notification)
|
|
23
20
|
}
|
|
24
21
|
}
|
|
25
22
|
});
|
package/notification/api.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api.js","sourceRoot":"","sources":["../../source/notification/api.ts"],"names":[],"mappings":";;;;;;;;;AACA,gCAAkC;AAClC,0CAA6C;AAC7C,
|
|
1
|
+
{"version":3,"file":"api.js","sourceRoot":"","sources":["../../source/notification/api.ts"],"names":[],"mappings":";;;;;;;;;AACA,gCAAkC;AAClC,0CAA6C;AAC7C,sCAAiC;AACjC,qCAAwC;AACxC,qCAAoD;AAEpD,MAAM,yBAAyB,GAAG,IAAA,eAAS,EAAC;IAC1C,IAAI,QAAQ,KAAK,OAAO,iCAAwB,CAAC,WAAW,CAAC,CAAC,CAAC;IAC/D,SAAS,EAAE;QACT,GAAG,EAAE;YACH,MAAM,EAAE,IAAA,cAAK,EAAC,qBAAY,CAAC;SAC5B;KACF;CACF,CAAC,CAAC;AAKI,IAAM,eAAe,GAArB,MAAM,eAAe;IAC1B,KAAK,CAAC,GAAG;QACP,OAAO,EAAE,CAAC;IACZ,CAAC;CACF,CAAA;AAJY,eAAe;IAD3B,IAAA,sBAAa,EAAC,yBAAyB,CAAC;GAC5B,eAAe,CAI3B;AAJY,0CAAe"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./notification-channel-job.model"), exports);
|
|
18
|
+
__exportStar(require("./notification.model"), exports);
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../source/notification/models/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,mEAAiD;AACjD,uDAAqC"}
|