@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,26 +1,26 @@
|
|
|
1
1
|
import type { Entity } from "../../../database";
|
|
2
2
|
import type { DeepFlatten, StringMap, TypedOmit } from "../../../types";
|
|
3
3
|
import type { MappingBooleanProperty, MappingByteNumberProperty, MappingDateProperty, MappingDoubleNumberProperty, MappingFloatNumberProperty, MappingGeoPointProperty, MappingHalfFloatNumberProperty, MappingIntegerNumberProperty, MappingKeywordProperty, MappingLongNumberProperty, MappingNestedProperty, MappingObjectProperty, MappingPropertyBase, MappingScaledFloatNumberProperty, MappingShortNumberProperty, MappingTextProperty, MappingTypeMapping, MappingUnsignedLongNumberProperty } from '@elastic/elasticsearch/lib/api/types';
|
|
4
|
-
export
|
|
5
|
-
export
|
|
4
|
+
export type ElasticIndexMapping<T extends Entity = Entity> = TypedOmit<MappingTypeMapping, 'properties'> & ElasticNestedIndexMapping<TypedOmit<T, 'id'>>;
|
|
5
|
+
export type ElasticNestedIndexMapping<T> = {
|
|
6
6
|
properties: {
|
|
7
7
|
[P in keyof Required<T>]: ElasticIndexMappingItem<DeepFlatten<Required<T>[P]>>;
|
|
8
8
|
};
|
|
9
9
|
};
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
type StrippedBaseType<T extends MappingPropertyBase> = TypedOmit<T, 'properties' | 'fields'>;
|
|
11
|
+
type ElasticIndexMappingItemBase = {
|
|
12
12
|
index?: boolean;
|
|
13
13
|
fields?: StringMap<ElasticIndexMappingItem>;
|
|
14
14
|
};
|
|
15
|
-
export
|
|
16
|
-
export
|
|
17
|
-
export
|
|
18
|
-
export
|
|
19
|
-
export
|
|
20
|
-
export
|
|
21
|
-
export
|
|
22
|
-
export
|
|
23
|
-
export
|
|
24
|
-
export
|
|
15
|
+
export type MappingNumberProperty = MappingByteNumberProperty | MappingDoubleNumberProperty | MappingFloatNumberProperty | MappingHalfFloatNumberProperty | MappingIntegerNumberProperty | MappingLongNumberProperty | MappingShortNumberProperty | MappingScaledFloatNumberProperty | MappingUnsignedLongNumberProperty;
|
|
16
|
+
export type ElasticKeywordIndexMappingItem = ElasticIndexMappingItemBase & StrippedBaseType<MappingKeywordProperty>;
|
|
17
|
+
export type ElasticTextIndexMappingItem = ElasticIndexMappingItemBase & StrippedBaseType<MappingTextProperty>;
|
|
18
|
+
export type ElasticNumberIndexMappingItem = ElasticIndexMappingItemBase & StrippedBaseType<MappingNumberProperty>;
|
|
19
|
+
export type ElasticBooleanIndexMappingItem = ElasticIndexMappingItemBase & StrippedBaseType<MappingBooleanProperty>;
|
|
20
|
+
export type ElasticDateIndexMappingItem = ElasticIndexMappingItemBase & StrippedBaseType<MappingDateProperty>;
|
|
21
|
+
export type ElasticGeoPointIndexMappingItem = ElasticIndexMappingItemBase & StrippedBaseType<MappingGeoPointProperty>;
|
|
22
|
+
export type ElasticObjectIndexMappingItem<T> = ElasticIndexMappingItemBase & StrippedBaseType<MappingObjectProperty> & ElasticNestedIndexMapping<T>;
|
|
23
|
+
export type ElasticNestedIndexMappingItem<T> = ElasticIndexMappingItemBase & StrippedBaseType<MappingNestedProperty> & ElasticNestedIndexMapping<T>;
|
|
24
|
+
export type ElasticIndexMappingItem<T = any> = ElasticKeywordIndexMappingItem | ElasticTextIndexMappingItem | ElasticNumberIndexMappingItem | ElasticBooleanIndexMappingItem | ElasticDateIndexMappingItem | ElasticGeoPointIndexMappingItem | ElasticObjectIndexMappingItem<T> | ElasticNestedIndexMappingItem<T>;
|
|
25
25
|
export declare function mergeElasticSearchMappings<T extends Entity>(mappings: ElasticIndexMapping<T>[]): ElasticIndexMapping<T>;
|
|
26
26
|
export {};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { Entity } from "../../../database";
|
|
2
2
|
import type { SortOptions as ElasticSortOptions, SortOptionsKeys } from '@elastic/elasticsearch/lib/api/types';
|
|
3
3
|
export type { SortOrder } from '@elastic/elasticsearch/lib/api/types';
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
4
|
+
export type Sort<T extends Entity = Entity> = SortCombinations<T> | SortCombinations<T>[];
|
|
5
|
+
export type SortCombinations<T extends Entity = Entity> = keyof T | SortOptions<T>;
|
|
6
|
+
export type SortOptions<T extends Entity = Entity> = SortOptionsKeys & {
|
|
7
7
|
[P in keyof T]?: ElasticSortOptions[string];
|
|
8
8
|
};
|
|
@@ -2,7 +2,7 @@ import type { Entity } from "../../database";
|
|
|
2
2
|
import type { ClientOptions } from '@elastic/elasticsearch';
|
|
3
3
|
import type { ElasticSearchIndexConfigArgument } from './config';
|
|
4
4
|
import { ElasticSearchIndexConfig } from './config';
|
|
5
|
-
export
|
|
5
|
+
export type ElasticsearchModuleConfig = {
|
|
6
6
|
defaultOptions: ClientOptions;
|
|
7
7
|
logPrefix: string;
|
|
8
8
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Entity } from "../database";
|
|
2
2
|
import type { Query, QueryOptions } from "../database/query";
|
|
3
3
|
import type { SearchResult, SearchResultItem } from './search-result';
|
|
4
|
-
export
|
|
4
|
+
export type SearchCursorOptions<T extends Entity> = QueryOptions<T> & {
|
|
5
5
|
batchSize?: number;
|
|
6
6
|
};
|
|
7
7
|
declare const type: unique symbol;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { Entity } from "../database";
|
|
2
|
-
export
|
|
2
|
+
export type SearchResultItem<T extends Entity> = {
|
|
3
3
|
entity: T;
|
|
4
4
|
score: number;
|
|
5
5
|
};
|
|
6
|
-
export
|
|
6
|
+
export type SearchResult<T extends Entity> = {
|
|
7
7
|
total?: number;
|
|
8
8
|
totalIsLowerBound: boolean;
|
|
9
9
|
milliseconds: number;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
type ErrorData = Pick<Error, 'name' | 'message' | 'stack'>;
|
|
2
2
|
export declare function serializeError(error: Error): ErrorData;
|
|
3
3
|
export declare function deserializeError(data: ErrorData): Error;
|
|
4
4
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { TryDereference } from '../serializable';
|
|
2
|
-
|
|
2
|
+
type MapData = [any, any][];
|
|
3
3
|
export declare function serializeMap(map: Map<any, any>): MapData;
|
|
4
4
|
export declare function deserializeMap(data: MapData, tryDereference: TryDereference): Map<any, any>;
|
|
5
5
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { TryDereference } from '../serializable';
|
|
2
2
|
import type { Serialized } from '../types';
|
|
3
|
-
|
|
3
|
+
type SetData = Serialized<any>[];
|
|
4
4
|
export declare function serializeSet(set: Set<any>): SetData;
|
|
5
5
|
export declare function deserializeSet(data: SetData, tryDereference: TryDereference): Set<any>;
|
|
6
6
|
export {};
|
|
@@ -3,16 +3,16 @@ export declare const Serializable: {
|
|
|
3
3
|
readonly serialize: unique symbol;
|
|
4
4
|
readonly deserialize: unique symbol;
|
|
5
5
|
};
|
|
6
|
-
export
|
|
7
|
-
export
|
|
6
|
+
export type DereferenceCallback = (dereferenced: unknown) => void;
|
|
7
|
+
export type TryDereference = (value: unknown, callback: DereferenceCallback) => boolean;
|
|
8
8
|
export interface Serializable<T, Data> {
|
|
9
9
|
[Serializable.serialize](instance: T, context: Record): Data;
|
|
10
10
|
[Serializable.deserialize](data: Data, tryDereference: TryDereference, context: Record): T;
|
|
11
11
|
}
|
|
12
|
-
export
|
|
13
|
-
export
|
|
14
|
-
export
|
|
15
|
-
|
|
12
|
+
export type SerializableType<T, Data> = Type<Serializable<T, Data>>;
|
|
13
|
+
export type SerializeFunction<T, Data> = Serializable<T, Data>[typeof Serializable.serialize];
|
|
14
|
+
export type DeserializeFunction<T, Data> = Serializable<T, Data>[typeof Serializable.deserialize];
|
|
15
|
+
type SerializableRegistration<T = any, Data = any> = {
|
|
16
16
|
type: string;
|
|
17
17
|
serializeData?: boolean;
|
|
18
18
|
constructor: AbstractConstructor<T>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CircularBuffer } from "../data-structures/circular-buffer";
|
|
2
2
|
import type { SerializationOptions, Serialized, StringSerialized } from './types';
|
|
3
|
-
|
|
3
|
+
type QueueItem = () => void;
|
|
4
4
|
export declare function stringSerialize<T>(value: T, options?: SerializationOptions): StringSerialized<T>;
|
|
5
5
|
export declare function stringDeserialize<T = unknown>(serialized: string, options?: SerializationOptions): T;
|
|
6
6
|
/**
|
package/serializer/types.d.ts
CHANGED
|
@@ -2,27 +2,27 @@ import type { AbstractConstructor, JsonPrimitive, Nested, Record, StringMap } fr
|
|
|
2
2
|
declare const serializedSymbol: unique symbol;
|
|
3
3
|
declare const stringSerializedSymbol: unique symbol;
|
|
4
4
|
declare const decycledSymbol: unique symbol;
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
export
|
|
8
|
-
export
|
|
9
|
-
export
|
|
10
|
-
export
|
|
11
|
-
export
|
|
12
|
-
export
|
|
13
|
-
export
|
|
14
|
-
export
|
|
15
|
-
export
|
|
16
|
-
export
|
|
5
|
+
export type SerializationReplacer = (value: any) => any;
|
|
6
|
+
export type TypeField<T extends string> = `<${T}>`;
|
|
7
|
+
export type NonPrimitive<TypeName extends string = string, Data = unknown> = Record<TypeField<TypeName>, Data>;
|
|
8
|
+
export type RawNonPrimitive = NonPrimitive<typeof rawNonPrimitiveType, any>;
|
|
9
|
+
export type UndefinedNonPrimitive = NonPrimitive<typeof undefinedNonPrimitiveType, null>;
|
|
10
|
+
export type BigintNonPrimitive = NonPrimitive<typeof bigintNonPrimitiveType, string>;
|
|
11
|
+
export type GlobalSymbolNonPrimitive = NonPrimitive<typeof globalSymbolNonPrimitiveType, string>;
|
|
12
|
+
export type FunctionNonPrimitive = NonPrimitive<typeof functionNonPrimitiveType, string>;
|
|
13
|
+
export type RefNonPrimitive = NonPrimitive<typeof refNonPrimitiveType, string>;
|
|
14
|
+
export type CustomNonPrimitive<TypeName extends string> = NonPrimitive<TypeName, SerializedData>;
|
|
15
|
+
export type SerializedData = JsonPrimitive | NonPrimitive | Nested<JsonPrimitive | NonPrimitive>;
|
|
16
|
+
export type Serialized<T = unknown> = SerializedData & {
|
|
17
17
|
[serializedSymbol]: T;
|
|
18
18
|
};
|
|
19
|
-
export
|
|
19
|
+
export type StringSerialized<T = unknown> = string & {
|
|
20
20
|
[stringSerializedSymbol]: T;
|
|
21
21
|
};
|
|
22
|
-
export
|
|
22
|
+
export type Decycled<T = unknown> = {
|
|
23
23
|
[decycledSymbol]: T;
|
|
24
24
|
};
|
|
25
|
-
export
|
|
25
|
+
export type SerializationOptions = {
|
|
26
26
|
/**
|
|
27
27
|
* !!! DANGEROUS !!!
|
|
28
28
|
*
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export
|
|
1
|
+
export type SeverSentEventsEventBase<Data> = {
|
|
2
2
|
/**
|
|
3
3
|
* Name of the event.
|
|
4
4
|
*/
|
|
@@ -16,8 +16,8 @@ export declare type SeverSentEventsEventBase<Data> = {
|
|
|
16
16
|
*/
|
|
17
17
|
retry?: number;
|
|
18
18
|
};
|
|
19
|
-
export
|
|
20
|
-
export
|
|
19
|
+
export type SeverSentEventsTextEvent = SeverSentEventsEventBase<string>;
|
|
20
|
+
export type SeverSentEventsJsonEvent = SeverSentEventsEventBase<any>;
|
|
21
21
|
export declare class SeverSentEvents {
|
|
22
22
|
private readonly writable;
|
|
23
23
|
private readonly writer;
|
package/templates/module.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import type { Type } from "../types";
|
|
|
2
2
|
import { TemplateProvider } from './template.provider';
|
|
3
3
|
import type { TemplateRenderer } from './template.renderer';
|
|
4
4
|
import type { TemplateResolver } from './template.resolver';
|
|
5
|
-
export
|
|
5
|
+
export type TemplateModuleConfig = {
|
|
6
6
|
templateProvider: Type<TemplateProvider>;
|
|
7
7
|
templateResolvers: Type<TemplateResolver>[];
|
|
8
8
|
templateRenderers: Type<TemplateRenderer>[];
|
|
@@ -2,10 +2,10 @@ import type { Injectable } from "../../container";
|
|
|
2
2
|
import { resolveArgumentType } from "../../container";
|
|
3
3
|
import { Template } from '../template.model';
|
|
4
4
|
import { TemplateProvider } from '../template.provider';
|
|
5
|
-
export
|
|
5
|
+
export type FileTemplateProviderConfig = {
|
|
6
6
|
basePath?: string;
|
|
7
7
|
};
|
|
8
|
-
export
|
|
8
|
+
export type FileTemplateProviderArgument = string;
|
|
9
9
|
export declare const fileTemplateProviderConfig: FileTemplateProviderConfig;
|
|
10
10
|
export declare class FileTemplateProvider extends TemplateProvider implements Injectable<FileTemplateProviderArgument> {
|
|
11
11
|
private readonly basePath;
|
|
@@ -29,6 +29,7 @@ let FileTemplateProvider = class FileTemplateProvider extends template_provider_
|
|
|
29
29
|
this.basePath = path.resolve(basePath);
|
|
30
30
|
}
|
|
31
31
|
async get(key) {
|
|
32
|
+
var _a;
|
|
32
33
|
if (!keyPattern.test(key)) {
|
|
33
34
|
throw new bad_request_error_1.BadRequestError('Illegal template key. Only a-z, A-Z, 0-9, _ and - are allowed.');
|
|
34
35
|
}
|
|
@@ -36,7 +37,7 @@ let FileTemplateProvider = class FileTemplateProvider extends template_provider_
|
|
|
36
37
|
if (!filePath.startsWith(this.basePath)) {
|
|
37
38
|
throw new bad_request_error_1.BadRequestError(`Illegal file path. Must be inside "${this.basePath}".`);
|
|
38
39
|
}
|
|
39
|
-
const templateModule = await Promise.resolve().then(() => require(
|
|
40
|
+
const templateModule = await (_a = filePath, Promise.resolve().then(() => require(_a)));
|
|
40
41
|
const fileContent = templateModule.default;
|
|
41
42
|
return schema_1.Schema.parse(template_model_1.Template, fileContent);
|
|
42
43
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file.provider-template.js","sourceRoot":"","sources":["../../../source/templates/providers/file.provider-template.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AACA,+CAAwE;AACxE,qEAA4D;AAC5D,yCAAkC;AAClC,6BAA6B;AAC7B,sDAA6C;AAC7C,4DAAwD;AAQ3C,QAAA,0BAA0B,GAA+B,EAAE,CAAC;AAEzE,MAAM,UAAU,GAAG,aAAa,CAAC;AAK1B,IAAM,oBAAoB,GAA1B,MAAM,oBAAqB,SAAQ,oCAAgB;IACvC,QAAQ,CAAS;IAEzB,CAAC,+BAAmB,CAAC,CAA+B;IAC7D,YAAyB,QAAgB;QACvC,KAAK,EAAE,CAAC;QAER,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;IACzC,CAAC;IAED,KAAK,CAAC,GAAG,CAAC,GAAW
|
|
1
|
+
{"version":3,"file":"file.provider-template.js","sourceRoot":"","sources":["../../../source/templates/providers/file.provider-template.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AACA,+CAAwE;AACxE,qEAA4D;AAC5D,yCAAkC;AAClC,6BAA6B;AAC7B,sDAA6C;AAC7C,4DAAwD;AAQ3C,QAAA,0BAA0B,GAA+B,EAAE,CAAC;AAEzE,MAAM,UAAU,GAAG,aAAa,CAAC;AAK1B,IAAM,oBAAoB,GAA1B,MAAM,oBAAqB,SAAQ,oCAAgB;IACvC,QAAQ,CAAS;IAEzB,CAAC,+BAAmB,CAAC,CAA+B;IAC7D,YAAyB,QAAgB;QACvC,KAAK,EAAE,CAAC;QAER,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;IACzC,CAAC;IAED,KAAK,CAAC,GAAG,CAAC,GAAW;;QACnB,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE;YACzB,MAAM,IAAI,mCAAe,CAAC,gEAAgE,CAAC,CAAC;SAC7F;QAED,MAAM,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,EAAE,GAAG,GAAG,KAAK,CAAC,CAAC;QAE1D,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE;YACvC,MAAM,IAAI,mCAAe,CAAC,sCAAsC,IAAI,CAAC,QAAQ,IAAI,CAAC,CAAC;SACpF;QAED,MAAM,cAAc,GAAG,YAAa,QAAQ,4CAAyB,CAAC;QACtE,MAAM,WAAW,GAAG,cAAc,CAAC,OAAO,CAAC;QAC3C,OAAO,eAAM,CAAC,KAAK,CAAC,yBAAQ,EAAE,WAAW,CAAC,CAAC;IAC7C,CAAC;CACF,CAAA;AAzBY,oBAAoB;IAHhC,IAAA,qBAAS,EAAC;QACT,uBAAuB,EAAE,GAAG,EAAE,CAAC,kCAA0B,CAAC,QAAQ;KACnE,CAAC;IAKa,WAAA,IAAA,qBAAS,GAAE,CAAA;;GAJb,oBAAoB,CAyBhC;AAzBY,oDAAoB;AA2BjC,SAAgB,6BAA6B,CAAC,SAA8C,EAAE;IAC5F,kCAA0B,CAAC,QAAQ,GAAG,MAAM,CAAC,QAAQ,IAAI,kCAA0B,CAAC,QAAQ,CAAC;AAC/F,CAAC;AAFD,sEAEC"}
|
|
@@ -4,15 +4,15 @@ import { TemplateResolverProvider } from '../template-resolver.provider';
|
|
|
4
4
|
import type { TemplateField } from '../template.model';
|
|
5
5
|
import type { TemplateRenderObject } from '../template.renderer';
|
|
6
6
|
import { TemplateRenderer } from '../template.renderer';
|
|
7
|
-
export
|
|
7
|
+
export type HandlebarsTemplateHelperOptionsLocationItem = {
|
|
8
8
|
line: number;
|
|
9
9
|
column: number;
|
|
10
10
|
};
|
|
11
|
-
export
|
|
11
|
+
export type HandlebarsTemplateHelperOptionsLocation = {
|
|
12
12
|
start: HandlebarsTemplateHelperOptionsLocationItem;
|
|
13
13
|
end: HandlebarsTemplateHelperOptionsLocationItem;
|
|
14
14
|
};
|
|
15
|
-
export
|
|
15
|
+
export type HandlebarsTemplateHelperOptions = {
|
|
16
16
|
name: string;
|
|
17
17
|
location?: HandlebarsTemplateHelperOptionsLocation;
|
|
18
18
|
data?: Record<string>;
|
|
@@ -21,17 +21,17 @@ export declare type HandlebarsTemplateHelperOptions = {
|
|
|
21
21
|
fn?: handlebars.TemplateDelegate;
|
|
22
22
|
inverse?: handlebars.TemplateDelegate;
|
|
23
23
|
};
|
|
24
|
-
export
|
|
25
|
-
export
|
|
26
|
-
export
|
|
27
|
-
export
|
|
28
|
-
export
|
|
24
|
+
export type HandlebarsTemplateHelper = (context: unknown, args: unknown[], options: HandlebarsTemplateHelperOptions) => any;
|
|
25
|
+
export type HandlebarsTemplateHelpersObject = Record<string, HandlebarsTemplateHelper>;
|
|
26
|
+
export type HandlebarsTemplatePartial = string | TemplateField<string, 'handlebars', HandlebarsRendererOptions> | handlebars.TemplateDelegate;
|
|
27
|
+
export type HandlebarsTemplatePartialsObject = Record<string, HandlebarsTemplatePartial>;
|
|
28
|
+
export type HandlebarsRendererOptions = {
|
|
29
29
|
strict?: boolean;
|
|
30
30
|
preventIndent?: boolean;
|
|
31
31
|
helpers?: HandlebarsTemplateHelpersObject;
|
|
32
32
|
partials?: HandlebarsTemplatePartialsObject;
|
|
33
33
|
};
|
|
34
|
-
export
|
|
34
|
+
export type HandlebarsTemplateRenderObject = TemplateRenderObject<'handlebars', HandlebarsRendererOptions>;
|
|
35
35
|
export declare class HandlebarsTemplateRenderer extends TemplateRenderer<'handlebars', HandlebarsRendererOptions> {
|
|
36
36
|
private readonly templateResolverProvider;
|
|
37
37
|
private readonly compileHandlebarsTemplate;
|
|
@@ -2,11 +2,11 @@ import type { MJMLParsingOptions } from 'mjml-core';
|
|
|
2
2
|
import { TemplateRendererProvider } from '../template-renderer.provider';
|
|
3
3
|
import type { TemplateRenderObject, TemplateRenderResult } from '../template.renderer';
|
|
4
4
|
import { TemplateRenderer } from '../template.renderer';
|
|
5
|
-
export
|
|
5
|
+
export type MjmlRendererOptions = Pick<MJMLParsingOptions, 'fonts' | 'keepComments' | 'validationLevel'> & {
|
|
6
6
|
preprocessorOptions?: any;
|
|
7
7
|
};
|
|
8
|
-
export
|
|
9
|
-
export
|
|
8
|
+
export type MjmlRendererString = 'mjml' | `mjml-${string}`;
|
|
9
|
+
export type MjmlTemplateRenderObject = TemplateRenderObject<MjmlRendererString, MjmlRendererOptions>;
|
|
10
10
|
export declare class MjmlTemplateRenderer extends TemplateRenderer<MjmlRendererString, MjmlRendererOptions> {
|
|
11
11
|
private readonly rendererProvider;
|
|
12
12
|
constructor(rendererProvider: TemplateRendererProvider);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { TemplateRenderObject, TemplateRenderResult } from '../template.renderer';
|
|
2
2
|
import { TemplateRenderer } from '../template.renderer';
|
|
3
|
-
export
|
|
3
|
+
export type StringTemplateRenderObject = TemplateRenderObject<'string', undefined>;
|
|
4
4
|
export declare class StringTemplateRenderer extends TemplateRenderer<'string', undefined> {
|
|
5
5
|
constructor();
|
|
6
6
|
canHandleType(type: string): boolean;
|
|
@@ -4,10 +4,10 @@ import { TypedOmit } from "../../types";
|
|
|
4
4
|
import { TemplateField } from '../template.model';
|
|
5
5
|
import { TemplateRenderer, TemplateRendererOptions, TemplateRendererString } from '../template.renderer';
|
|
6
6
|
import { TemplateResolver } from '../template.resolver';
|
|
7
|
-
export
|
|
7
|
+
export type FileTemplateProviderConfig = {
|
|
8
8
|
basePath?: string;
|
|
9
9
|
};
|
|
10
|
-
export
|
|
10
|
+
export type FileTemplateProviderArgument = string;
|
|
11
11
|
export declare const fileTemplateProviderConfig: FileTemplateProviderConfig;
|
|
12
12
|
export declare class FileTemplateField<Renderer extends string = string, Options = any> extends TemplateField<'file', Renderer, Options> {
|
|
13
13
|
templateFile: string;
|
|
@@ -4,7 +4,7 @@ export declare class TemplateField<Resolver extends string = string, Renderer ex
|
|
|
4
4
|
renderer: Renderer;
|
|
5
5
|
options?: Options;
|
|
6
6
|
}
|
|
7
|
-
export
|
|
7
|
+
export type TemplateFields<Fields extends Record<string, boolean>, Resolver extends string = string, Renderer extends string = string, Options = any> = SimplifyObject<{
|
|
8
8
|
[P in keyof PickBy<Fields, true>]: TemplateField<Resolver, Renderer, Options>;
|
|
9
9
|
} & {
|
|
10
10
|
[P in keyof PickBy<Fields, false>]?: TemplateField<Resolver, Renderer, Options>;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
1
|
+
export type TemplateRenderResult = string;
|
|
2
|
+
export type TemplateRenderObject<Renderer extends string = string, Options = any> = {
|
|
3
3
|
renderer: Renderer;
|
|
4
4
|
template: string;
|
|
5
5
|
options?: Options;
|
|
6
6
|
};
|
|
7
|
-
export
|
|
8
|
-
export
|
|
7
|
+
export type TemplateRendererString = typeof templateRendererString;
|
|
8
|
+
export type TemplateRendererOptions = typeof templateRendererOptions;
|
|
9
9
|
export declare const templateRendererString: unique symbol;
|
|
10
10
|
export declare const templateRendererOptions: unique symbol;
|
|
11
11
|
export declare abstract class TemplateRenderer<Renderer extends string = string, Options = any> {
|
|
@@ -3,7 +3,7 @@ import { TemplateRendererProvider } from './template-renderer.provider';
|
|
|
3
3
|
import { TemplateResolverProvider } from './template-resolver.provider';
|
|
4
4
|
import type { Template } from './template.model';
|
|
5
5
|
import { TemplateProvider } from './template.provider';
|
|
6
|
-
export
|
|
6
|
+
export type TemplateServiceRenderResult<T extends Template = Template> = {
|
|
7
7
|
fields: Record<keyof T['fields'], string>;
|
|
8
8
|
options: T['options'];
|
|
9
9
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Observable } from 'rxjs';
|
|
2
2
|
import type { LocalizableText } from './localizable-text.model';
|
|
3
3
|
import { LocalizationService } from './localization.service';
|
|
4
|
-
export
|
|
4
|
+
export type DynamicText = LocalizableText | Observable<LocalizableText>;
|
|
5
5
|
export declare function resolveDynamicText$(text: DynamicText, localizationService?: LocalizationService): Observable<string>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { LocalizationData } from './localization.service';
|
|
2
|
-
export
|
|
2
|
+
export type LocalizableText = string | LocalizationData;
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import type { Enumeration, EnumerationValue } from "../types";
|
|
2
2
|
import type { PropertyName } from "../utils/object/property-name";
|
|
3
3
|
import type { Observable } from 'rxjs';
|
|
4
|
-
export
|
|
4
|
+
export type Language = {
|
|
5
5
|
code: string;
|
|
6
6
|
name: string;
|
|
7
7
|
};
|
|
8
|
-
export
|
|
9
|
-
export
|
|
10
|
-
|
|
8
|
+
export type LocalizeFunction<Parameters = void> = (parameters: Parameters) => string;
|
|
9
|
+
export type LocalizeItem<Parameters = void> = string | LocalizeFunction<Parameters>;
|
|
10
|
+
type LocalizationTemplate = {
|
|
11
11
|
[key: string]: LocalizeItem<any> | LocalizationTemplate;
|
|
12
12
|
};
|
|
13
|
-
export
|
|
13
|
+
export type EnumerationLocalization<T extends Enumeration = Enumeration> = {
|
|
14
14
|
[P in EnumerationValue<T>]: LocalizeItem<any>;
|
|
15
15
|
};
|
|
16
|
-
export
|
|
17
|
-
export
|
|
16
|
+
export type EnumerationLocalizationEntry<T extends Enumeration = Enumeration> = [T, EnumerationLocalization<T>];
|
|
17
|
+
export type Localization<T extends LocalizationTemplate = LocalizationTemplate, Enums extends Enumeration[] = []> = {
|
|
18
18
|
language: Language;
|
|
19
19
|
keys: T;
|
|
20
20
|
enums: {
|
|
@@ -22,18 +22,18 @@ export declare type Localization<T extends LocalizationTemplate = LocalizationTe
|
|
|
22
22
|
};
|
|
23
23
|
};
|
|
24
24
|
declare const parametersSymbol: unique symbol;
|
|
25
|
-
export
|
|
25
|
+
export type LocalizationKey<Parameters = void> = PropertyName & {
|
|
26
26
|
[parametersSymbol]: Parameters;
|
|
27
27
|
};
|
|
28
|
-
export
|
|
28
|
+
export type LocalizationData<Parameters = any> = LocalizationKey | LocalizationDataObject<Parameters> | {
|
|
29
29
|
key: LocalizationKey;
|
|
30
30
|
parameters?: void;
|
|
31
31
|
};
|
|
32
|
-
export
|
|
32
|
+
export type LocalizationDataObject<Parameters> = {
|
|
33
33
|
key: LocalizationKey<Parameters>;
|
|
34
34
|
parameters: Parameters;
|
|
35
35
|
};
|
|
36
|
-
export
|
|
36
|
+
export type LocalizationKeys<T extends LocalizationTemplate> = {
|
|
37
37
|
[P in keyof T]: T[P] extends LocalizationTemplate ? LocalizationKeys<T[P]> : T[P] extends LocalizeItem<infer R> ? LocalizationKey<R> : LocalizationKey;
|
|
38
38
|
};
|
|
39
39
|
export declare function isLocalizationKey(value: any): value is LocalizationKey;
|
package/theme/theme-service.d.ts
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
import type { UnionToTuple } from "../types";
|
|
2
2
|
import type { Observable } from 'rxjs';
|
|
3
|
-
export
|
|
3
|
+
export type CalculatedPalette<Colors extends string = string> = {
|
|
4
4
|
[Color in Colors]: {
|
|
5
5
|
main: ColorTones;
|
|
6
6
|
text: ColorTones;
|
|
7
7
|
border?: ColorTones;
|
|
8
8
|
};
|
|
9
9
|
};
|
|
10
|
-
export
|
|
10
|
+
export type CalculatedTheme<Colors extends string = string> = {
|
|
11
11
|
name: string;
|
|
12
12
|
palette: CalculatedPalette<Colors>;
|
|
13
13
|
};
|
|
14
|
-
export
|
|
14
|
+
export type PaletteColor = string | {
|
|
15
15
|
main: string;
|
|
16
16
|
text?: string;
|
|
17
17
|
border?: string;
|
|
18
18
|
};
|
|
19
|
-
export
|
|
19
|
+
export type Theme<Colors extends string = string> = {
|
|
20
20
|
name: string;
|
|
21
21
|
textColors?: string[];
|
|
22
22
|
palette: Palette<Colors>;
|
|
23
23
|
};
|
|
24
|
-
export
|
|
24
|
+
export type Palette<Colors extends string = string> = {
|
|
25
25
|
[Color in Colors]: PaletteColor;
|
|
26
26
|
};
|
|
27
|
-
export
|
|
27
|
+
export type ColorTones = {
|
|
28
28
|
base: string;
|
|
29
29
|
50: string;
|
|
30
30
|
100: string;
|
|
@@ -4,7 +4,7 @@ import { disposeAsync } from "../disposable";
|
|
|
4
4
|
import type { Logger } from "../logger";
|
|
5
5
|
import type * as NodeWorkerThreads from 'worker_threads';
|
|
6
6
|
import type { ThreadWorker } from './thread-worker';
|
|
7
|
-
export
|
|
7
|
+
export type ThreadOptions = (WorkerOptions | NodeWorkerThreads.WorkerOptions) & {
|
|
8
8
|
threadCount?: number;
|
|
9
9
|
};
|
|
10
10
|
export declare class ThreadPool implements AsyncDisposable {
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { RpcEndpointSource } from "../rpc";
|
|
2
|
-
export
|
|
2
|
+
export type ThreadWorker = (...args: any[]) => any | Promise<any>;
|
|
3
3
|
export declare function exposeThreadWorker<T extends ThreadWorker>(worker: T, endpointOrSource: RpcEndpointSource, name?: string): void;
|
package/types/geo-json.d.ts
CHANGED
|
@@ -1,36 +1,36 @@
|
|
|
1
1
|
import type { JsonObject } from "../types";
|
|
2
|
-
export
|
|
3
|
-
export
|
|
2
|
+
export type Position = [longitude: number, latitude: number, elevation?: number];
|
|
3
|
+
export type GeoJsonObject<Type extends string> = {
|
|
4
4
|
type: Type;
|
|
5
5
|
bbox?: [number, number, number, number] | [number, number, number, number, number, number];
|
|
6
6
|
};
|
|
7
|
-
export
|
|
7
|
+
export type Point = GeoJsonObject<'Point'> & {
|
|
8
8
|
coordinates: Position;
|
|
9
9
|
};
|
|
10
|
-
export
|
|
10
|
+
export type LineString = GeoJsonObject<'LineString'> & {
|
|
11
11
|
coordinates: Position[];
|
|
12
12
|
};
|
|
13
|
-
export
|
|
13
|
+
export type Polygon = GeoJsonObject<'Polygon'> & {
|
|
14
14
|
coordinates: Position[][];
|
|
15
15
|
};
|
|
16
|
-
export
|
|
16
|
+
export type MultiPoint = GeoJsonObject<'MultiPoint'> & {
|
|
17
17
|
coordinates: Position[];
|
|
18
18
|
};
|
|
19
|
-
export
|
|
19
|
+
export type MultiLineString = GeoJsonObject<'MultiLineString'> & {
|
|
20
20
|
coordinates: Position[][];
|
|
21
21
|
};
|
|
22
|
-
export
|
|
22
|
+
export type MultiPolygon = GeoJsonObject<'MultiPolygon'> & {
|
|
23
23
|
coordinates: Position[][][];
|
|
24
24
|
};
|
|
25
|
-
export
|
|
25
|
+
export type GeometryCollection = GeoJsonObject<'GeometryCollection'> & {
|
|
26
26
|
geometries: Geometry[];
|
|
27
27
|
};
|
|
28
|
-
export
|
|
29
|
-
export
|
|
28
|
+
export type Geometry = Point | LineString | Polygon | MultiPoint | MultiLineString | MultiPolygon | GeometryCollection;
|
|
29
|
+
export type Feature<G extends Geometry | null = null, P extends JsonObject | null = null> = GeoJsonObject<'Feature'> & {
|
|
30
30
|
id?: string | number;
|
|
31
31
|
geometry: G;
|
|
32
32
|
properties: P;
|
|
33
33
|
};
|
|
34
|
-
export
|
|
34
|
+
export type FeatureCollection<G extends Geometry | null = null, P extends JsonObject | null = null> = GeoJsonObject<'FeatureCollection'> & {
|
|
35
35
|
features: Feature<G, P>[];
|
|
36
36
|
};
|