@tstdl/base 0.81.35 → 0.82.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (244) hide show
  1. package/api/client/client.d.ts +3 -3
  2. package/api/default-error-handlers.d.ts +1 -1
  3. package/api/response.d.ts +8 -8
  4. package/api/server/api-controller.d.ts +1 -1
  5. package/api/server/gateway.d.ts +9 -9
  6. package/api/server/middlewares/cors.middleware.d.ts +1 -1
  7. package/api/server/module.d.ts +1 -1
  8. package/api/types.d.ts +30 -30
  9. package/api/utils.d.ts +1 -1
  10. package/authentication/authentication-credentials.service.d.ts +6 -0
  11. package/authentication/authentication-credentials.service.js +17 -0
  12. package/authentication/authentication-credentials.service.js.map +1 -0
  13. package/authentication/authentication-session.service.d.ts +6 -0
  14. package/authentication/authentication-session.service.js +17 -0
  15. package/authentication/authentication-session.service.js.map +1 -0
  16. package/authentication/authentication-token-payload.provider.d.ts +3 -0
  17. package/authentication/authentication-token-payload.provider.js +17 -0
  18. package/authentication/authentication-token-payload.provider.js.map +1 -0
  19. package/authentication/authentication.service.d.ts +42 -0
  20. package/authentication/authentication.service.js +133 -0
  21. package/authentication/authentication.service.js.map +1 -0
  22. package/authentication/models/authentication-credentials.model.d.ts +6 -0
  23. package/authentication/models/authentication-credentials.model.js +37 -0
  24. package/authentication/models/authentication-credentials.model.js.map +1 -0
  25. package/authentication/models/authentication-session.model.d.ts +9 -0
  26. package/authentication/models/authentication-session.model.js +52 -0
  27. package/authentication/models/authentication-session.model.js.map +1 -0
  28. package/authentication/models/index.d.ts +2 -0
  29. package/authentication/models/index.js +19 -0
  30. package/authentication/models/index.js.map +1 -0
  31. package/authentication/tokens.d.ts +2 -0
  32. package/authentication/tokens.js +6 -0
  33. package/authentication/tokens.js.map +1 -0
  34. package/collections/keyed-set.d.ts +1 -1
  35. package/collections/observable/observable-collection.d.ts +1 -1
  36. package/collections/observable/observable-list.d.ts +2 -2
  37. package/container/container.d.ts +3 -3
  38. package/container/decorators.d.ts +3 -3
  39. package/container/interfaces.d.ts +1 -1
  40. package/container/provider.d.ts +6 -6
  41. package/container/resolve-chain.d.ts +2 -2
  42. package/container/token.d.ts +3 -3
  43. package/container/type-info.d.ts +1 -1
  44. package/container/types.d.ts +4 -4
  45. package/core.d.ts +1 -1
  46. package/data-structures/linked-list.d.ts +1 -1
  47. package/data-structures/multi-key-map.d.ts +2 -2
  48. package/data-structures/sorted-array-list.d.ts +1 -1
  49. package/database/entity-repository.d.ts +2 -2
  50. package/database/entity.d.ts +3 -3
  51. package/database/module.d.ts +1 -1
  52. package/database/mongo/classes.d.ts +3 -3
  53. package/database/mongo/model/document.d.ts +3 -3
  54. package/database/mongo/module.d.ts +1 -1
  55. package/database/mongo/mongo-base.repository.d.ts +11 -11
  56. package/database/mongo/mongo-bulk.d.ts +1 -1
  57. package/database/mongo/mongo-entity-repository.d.ts +7 -7
  58. package/database/mongo/types.d.ts +16 -16
  59. package/database/query.d.ts +38 -38
  60. package/disposable/async-disposer.d.ts +3 -3
  61. package/distributed-loop/distributed-loop.d.ts +2 -2
  62. package/error/custom.error.d.ts +1 -1
  63. package/http/client/adapters/undici-http-client.adapter.d.ts +1 -1
  64. package/http/client/http-client-request.d.ts +5 -5
  65. package/http/client/http-client-response.d.ts +2 -2
  66. package/http/client/http-client.d.ts +5 -5
  67. package/http/http-body.d.ts +3 -1
  68. package/http/http-body.js +18 -12
  69. package/http/http-body.js.map +1 -1
  70. package/http/http-form.d.ts +2 -2
  71. package/http/http-headers.d.ts +3 -3
  72. package/http/http-query.d.ts +2 -2
  73. package/http/http-url-parameters.d.ts +2 -2
  74. package/http/http-value-map.d.ts +1 -1
  75. package/http/server/http-server-request.d.ts +1 -1
  76. package/http/server/http-server-response.d.ts +1 -1
  77. package/http/server/http-server.d.ts +1 -1
  78. package/http/server/node/node-http-server.d.ts +1 -1
  79. package/http/types.d.ts +5 -5
  80. package/http/utils.d.ts +3 -3
  81. package/image-service/imgproxy/imgproxy-image-service.d.ts +1 -1
  82. package/json-path/json-path.d.ts +4 -4
  83. package/key-value-store/key-value.store.d.ts +1 -1
  84. package/key-value-store/mongo/module.d.ts +1 -1
  85. package/key-value-store/mongo/mongo-key-value.model.d.ts +1 -1
  86. package/lock/lock.d.ts +4 -4
  87. package/lock/mongo/model.d.ts +1 -1
  88. package/lock/mongo/module.d.ts +1 -1
  89. package/lock/provider.d.ts +1 -1
  90. package/logger/logger.d.ts +6 -6
  91. package/mail/mail.client.d.ts +1 -1
  92. package/mail/models/mail-address.model.d.ts +1 -1
  93. package/mail/models/mail-content.model.d.ts +1 -1
  94. package/mail/models/mail-data.model.d.ts +1 -1
  95. package/mail/models/mail-log.model.d.ts +2 -2
  96. package/mail/models/mail-send-result.model.d.ts +1 -1
  97. package/mail/models/mail-template.model.d.ts +1 -1
  98. package/mail/module.d.ts +1 -1
  99. package/mail/repositories/mongo-mail-log.repository.d.ts +2 -2
  100. package/message-bus/local/types.d.ts +1 -1
  101. package/message-bus/message-bus.d.ts +1 -1
  102. package/migration/migration-state.d.ts +2 -2
  103. package/migration/migrator.d.ts +4 -4
  104. package/migration/mongo/module.d.ts +1 -1
  105. package/module/module-metric-reporter.d.ts +2 -2
  106. package/module/module.d.ts +1 -1
  107. package/module/modules/function.module.d.ts +1 -1
  108. package/module/modules/web-server.module.d.ts +1 -1
  109. package/notification/api.d.ts +1 -1
  110. package/notification/module.d.ts +1 -1
  111. package/object-storage/object-storage.d.ts +2 -2
  112. package/object-storage/object.d.ts +1 -1
  113. package/object-storage/s3/s3.object-storage-provider.d.ts +1 -1
  114. package/openid-connect/mongo-oidc-state.repository.d.ts +1 -1
  115. package/openid-connect/oidc-configuration.service.d.ts +1 -1
  116. package/openid-connect/oidc-state.model.d.ts +2 -2
  117. package/openid-connect/oidc.service-model.d.ts +8 -8
  118. package/orm/types.d.ts +4 -4
  119. package/package.json +3 -3
  120. package/pdf/pdf.service.d.ts +3 -3
  121. package/pool/pool.d.ts +4 -4
  122. package/promise/cancelable-promise.d.ts +1 -1
  123. package/promise/lazy-promise.d.ts +1 -1
  124. package/queue/mongo/job.d.ts +2 -2
  125. package/queue/mongo/queue.js +2 -2
  126. package/queue/mongo/queue.js.map +1 -1
  127. package/queue/queue.d.ts +11 -6
  128. package/queue/queue.js +2 -1
  129. package/queue/queue.js.map +1 -1
  130. package/reflection/registry.d.ts +9 -9
  131. package/reflection/types.d.ts +32 -32
  132. package/reflection/utils.d.ts +5 -5
  133. package/rpc/endpoints/message-port.rpc-endpoint.d.ts +3 -3
  134. package/rpc/model.d.ts +22 -22
  135. package/rpc/rpc.d.ts +1 -1
  136. package/rxjs/intersection-observer.d.ts +1 -1
  137. package/rxjs/mutation-observer.d.ts +1 -1
  138. package/rxjs/performance-observer.d.ts +1 -1
  139. package/rxjs/resize-observer.d.ts +1 -1
  140. package/rxjs/slow-array.d.ts +1 -1
  141. package/rxjs/touch.d.ts +1 -1
  142. package/schema/constraints/generic.d.ts +2 -2
  143. package/schema/constraints/length.d.ts +1 -1
  144. package/schema/decorators/types.d.ts +3 -3
  145. package/schema/schema.d.ts +4 -4
  146. package/schema/schema.error.d.ts +1 -1
  147. package/schema/schema.js +10 -13
  148. package/schema/schema.js.map +1 -1
  149. package/schema/schemas/any.d.ts +1 -1
  150. package/schema/schemas/array.d.ts +1 -1
  151. package/schema/schemas/boolean.d.ts +1 -1
  152. package/schema/schemas/date.d.ts +1 -1
  153. package/schema/schemas/enumeration.d.ts +1 -1
  154. package/schema/schemas/instance.d.ts +1 -1
  155. package/schema/schemas/literal.d.ts +1 -1
  156. package/schema/schemas/nullable.d.ts +1 -1
  157. package/schema/schemas/number.d.ts +1 -1
  158. package/schema/schemas/object.d.ts +1 -1
  159. package/schema/schemas/one-or-many.d.ts +2 -2
  160. package/schema/schemas/optional.d.ts +1 -1
  161. package/schema/schemas/readable-stream.d.ts +1 -1
  162. package/schema/schemas/record.d.ts +1 -1
  163. package/schema/schemas/regexp.d.ts +1 -1
  164. package/schema/schemas/string.d.ts +1 -1
  165. package/schema/schemas/uint8-array.d.ts +1 -1
  166. package/schema/schemas/union.d.ts +1 -1
  167. package/schema/schemas/unknown.d.ts +1 -1
  168. package/schema/transformers/generic.d.ts +1 -1
  169. package/schema/types.d.ts +31 -31
  170. package/search-index/elastic/config.d.ts +1 -1
  171. package/search-index/elastic/model/elastic-query.d.ts +15 -15
  172. package/search-index/elastic/model/index-mapping.d.ts +14 -14
  173. package/search-index/elastic/model/sort.d.ts +3 -3
  174. package/search-index/elastic/module.d.ts +1 -1
  175. package/search-index/search-index.d.ts +1 -1
  176. package/search-index/search-result.d.ts +2 -2
  177. package/serializer/handlers/error.d.ts +1 -1
  178. package/serializer/handlers/map.d.ts +1 -1
  179. package/serializer/handlers/regex.d.ts +1 -1
  180. package/serializer/handlers/set.d.ts +1 -1
  181. package/serializer/serializable.d.ts +6 -6
  182. package/serializer/serializer.d.ts +1 -1
  183. package/serializer/types.d.ts +15 -15
  184. package/sse/server-sent-events.d.ts +3 -3
  185. package/tailwind/theme-adapter.d.ts +1 -1
  186. package/templates/module.d.ts +1 -1
  187. package/templates/providers/file.provider-template.d.ts +2 -2
  188. package/templates/providers/file.provider-template.js +2 -1
  189. package/templates/providers/file.provider-template.js.map +1 -1
  190. package/templates/renderers/handlebars.template-renderer.d.ts +9 -9
  191. package/templates/renderers/mjml.template-renderer.d.ts +3 -3
  192. package/templates/renderers/string.template-renderer.d.ts +1 -1
  193. package/templates/resolvers/file.template-resolver.d.ts +2 -2
  194. package/templates/template.model.d.ts +1 -1
  195. package/templates/template.renderer.d.ts +4 -4
  196. package/templates/template.service.d.ts +1 -1
  197. package/text/dynamic-text.model.d.ts +1 -1
  198. package/text/localizable-text.model.d.ts +1 -1
  199. package/text/localization.service.d.ts +11 -11
  200. package/theme/theme-service.d.ts +6 -6
  201. package/threading/thread-pool.d.ts +1 -1
  202. package/threading/thread-worker.d.ts +1 -1
  203. package/types/geo-json.d.ts +12 -12
  204. package/types.d.ts +91 -91
  205. package/utils/any-iterable-iterator.d.ts +3 -3
  206. package/utils/async-iterable-helpers/parallel/types.d.ts +2 -2
  207. package/utils/async-iterable-helpers/types.d.ts +7 -7
  208. package/utils/backoff.d.ts +5 -5
  209. package/utils/benchmark.d.ts +1 -1
  210. package/utils/binary-search.d.ts +1 -1
  211. package/utils/binary.js.map +1 -1
  212. package/utils/cancellation-token.d.ts +1 -1
  213. package/utils/compression.d.ts +1 -1
  214. package/utils/cryptography.d.ts +11 -11
  215. package/utils/date-time.d.ts +8 -7
  216. package/utils/date-time.js +6 -2
  217. package/utils/date-time.js.map +1 -1
  218. package/utils/equals.d.ts +3 -3
  219. package/utils/factory-map.d.ts +1 -1
  220. package/utils/format-error.d.ts +1 -1
  221. package/utils/function/memoize.d.ts +1 -1
  222. package/utils/helpers.d.ts +1 -1
  223. package/utils/iterable-helpers/types.d.ts +6 -6
  224. package/utils/jwt.d.ts +4 -4
  225. package/utils/math.d.ts +1 -1
  226. package/utils/merge.d.ts +1 -1
  227. package/utils/middleware.d.ts +9 -9
  228. package/utils/moving-metric.d.ts +1 -1
  229. package/utils/object/decycle.d.ts +1 -1
  230. package/utils/object/dereference.d.ts +1 -1
  231. package/utils/object/forward-ref.d.ts +2 -2
  232. package/utils/object/lazy-property.d.ts +5 -5
  233. package/utils/object/merge.d.ts +1 -1
  234. package/utils/object/property-name.d.ts +5 -5
  235. package/utils/patch-worker.d.ts +1 -1
  236. package/utils/periodic-sampler.d.ts +1 -1
  237. package/utils/provider-function-iterable.d.ts +2 -2
  238. package/utils/proxy.d.ts +1 -1
  239. package/utils/singleton.d.ts +2 -2
  240. package/utils/sort.d.ts +2 -2
  241. package/utils/stream/stream-helper-types.d.ts +5 -5
  242. package/utils/type-guards.d.ts +3 -3
  243. package/utils/url-builder.d.ts +4 -4
  244. package/web-types.d.ts +4 -4
@@ -1,6 +1,6 @@
1
1
  import type { Decorator } from "../../reflection";
2
2
  import type { ValueSchema, ValueSchemaOptions } from '../types';
3
- export declare type NumberOptions = ValueSchemaOptions & {
3
+ export type NumberOptions = ValueSchemaOptions & {
4
4
  minimum?: number;
5
5
  maximum?: number;
6
6
  integer?: boolean;
@@ -1,5 +1,5 @@
1
1
  import type { Record, SimplifiedOptionalize, TypedOmit } from "../../types";
2
2
  import type { ObjectSchema, ObjectSchemaProperties } from '../types';
3
- export declare type ObjectOptions<T extends Record = Record> = TypedOmit<ObjectSchema<T>, 'properties'>;
3
+ export type ObjectOptions<T extends Record = Record> = TypedOmit<ObjectSchema<T>, 'properties'>;
4
4
  export declare function explicitObject<T extends Record>(properties: ObjectSchemaProperties<T>, options?: ObjectOptions<T>): ObjectSchema<T>;
5
5
  export declare function object<T extends Record>(properties: ObjectSchemaProperties<T>, options?: ObjectOptions<T>): ObjectSchema<SimplifiedOptionalize<T>>;
@@ -3,7 +3,7 @@ import type { OneOrMany as OneOrManyType } from "../../types";
3
3
  import type { SchemaTestable } from '../schema';
4
4
  import type { ValueSchema, ValueSchemaOptions } from '../types';
5
5
  import type { ArrayOptions } from './array';
6
- export declare type OneOrMany<T> = OneOrManyType<T>;
7
- export declare type OneOrManyOptions = ValueSchemaOptions & Pick<ArrayOptions, 'minimumLength' | 'maximumLength'>;
6
+ export type OneOrMany<T> = OneOrManyType<T>;
7
+ export type OneOrManyOptions = ValueSchemaOptions & Pick<ArrayOptions, 'minimumLength' | 'maximumLength'>;
8
8
  export declare function oneOrMany<T>(innerValues: OneOrMany<SchemaTestable<T>>, options?: OneOrManyOptions): ValueSchema<T | T[]>;
9
9
  export declare function OneOrMany(innerValues: OneOrMany<SchemaTestable>, options?: OneOrManyOptions): Decorator<'property' | 'accessor'>;
@@ -2,6 +2,6 @@ import type { Decorator } from "../../reflection";
2
2
  import type { OneOrMany } from "../../types";
3
3
  import type { SchemaTestable } from '../schema';
4
4
  import type { ValueSchema, ValueSchemaOptions } from '../types';
5
- export declare type OptionalOptions = ValueSchemaOptions;
5
+ export type OptionalOptions = ValueSchemaOptions;
6
6
  export declare function optional<T>(schema: OneOrMany<SchemaTestable<T>>, options?: OptionalOptions): ValueSchema<T | undefined>;
7
7
  export declare function Optional(schema?: OneOrMany<SchemaTestable>): Decorator<'property' | 'accessor'>;
@@ -1,6 +1,6 @@
1
1
  import type { Decorator } from "../../reflection";
2
2
  import type { Schema } from '../schema';
3
3
  import type { ValueSchemaOptions } from '../types';
4
- export declare type ReadableStreamOptions = ValueSchemaOptions;
4
+ export type ReadableStreamOptions = ValueSchemaOptions;
5
5
  export declare function readableStream(options?: ReadableStreamOptions): Schema<ReadableStream>;
6
6
  export declare function ReadableStreamProperty(options?: ReadableStreamOptions): Decorator<'property' | 'accessor'>;
@@ -1,5 +1,5 @@
1
1
  import type { OneOrMany, Record, TypedOmit } from "../../types";
2
2
  import type { SchemaTestable } from '../schema';
3
3
  import type { ObjectSchema } from '../types';
4
- export declare type RecordOptions<T extends Record = Record> = TypedOmit<ObjectSchema<T>, 'properties' | 'allowUnknownProperties' | 'mask'>;
4
+ export type RecordOptions<T extends Record = Record> = TypedOmit<ObjectSchema<T>, 'properties' | 'allowUnknownProperties' | 'mask'>;
5
5
  export declare function record<T>(valueType: OneOrMany<SchemaTestable<T>>, options?: RecordOptions): ObjectSchema<Record<any, T>>;
@@ -1,6 +1,6 @@
1
1
  import type { Decorator } from "../../reflection";
2
2
  import type { Schema } from '../schema';
3
3
  import type { ValueSchemaOptions } from '../types';
4
- export declare type RegExpSchemaOptions = ValueSchemaOptions;
4
+ export type RegExpSchemaOptions = ValueSchemaOptions;
5
5
  export declare function regexp(options?: RegExpSchemaOptions): Schema<RegExp>;
6
6
  export declare function RegExpProperty(options?: RegExpSchemaOptions): Decorator<'property' | 'accessor'>;
@@ -1,6 +1,6 @@
1
1
  import type { Decorator } from "../../reflection";
2
2
  import type { ValueSchema, ValueSchemaOptions } from '../types';
3
- export declare type StringOptions = ValueSchemaOptions & {
3
+ export type StringOptions = ValueSchemaOptions & {
4
4
  /** trim */
5
5
  trim?: boolean;
6
6
  /** lowercase */
@@ -1,6 +1,6 @@
1
1
  import type { Decorator } from "../../reflection";
2
2
  import type { ValueSchema, ValueSchemaOptions } from '../types';
3
- export declare type Uint8ArraySchemaOptions = ValueSchemaOptions & {
3
+ export type Uint8ArraySchemaOptions = ValueSchemaOptions & {
4
4
  /** Minimum byte length */
5
5
  minimumLength?: number;
6
6
  /** Maximum byte length */
@@ -1,7 +1,7 @@
1
1
  import type { Decorator } from "../../reflection";
2
2
  import type { SchemaTestable } from '../schema';
3
3
  import type { SchemaOutput, ValueSchema, ValueSchemaOptions } from '../types';
4
- export declare type UnionOptions = ValueSchemaOptions;
4
+ export type UnionOptions = ValueSchemaOptions;
5
5
  export declare function union<T extends SchemaTestable[]>(...schemas: [...T]): ValueSchema<SchemaOutput<T[number]>>;
6
6
  export declare function union<T extends SchemaTestable[]>(schemas: [...T], options?: UnionOptions): ValueSchema<SchemaOutput<T[number]>>;
7
7
  export declare function Union(...schemas: SchemaTestable[]): Decorator<'property' | 'accessor'>;
@@ -1,5 +1,5 @@
1
1
  import type { Decorator } from "../../reflection";
2
2
  import type { ValueSchema, ValueSchemaOptions } from '../types';
3
- export declare type UnknownOptions = ValueSchemaOptions;
3
+ export type UnknownOptions = ValueSchemaOptions;
4
4
  export declare function unknown(options?: UnknownOptions): ValueSchema<unknown>;
5
5
  export declare function UnknownProperty(options?: UnknownOptions): Decorator<'property' | 'accessor'>;
@@ -2,7 +2,7 @@ import type { Decorator } from "../../reflection";
2
2
  import type { AbstractConstructor, OneOrMany } from "../../types";
3
3
  import type { TransformResult, ValueType } from '../types';
4
4
  import { SchemaValueTransformer } from '../types';
5
- export declare type GenericTransformFunction<T, O> = (value: T) => TransformResult<O>;
5
+ export type GenericTransformFunction<T, O> = (value: T) => TransformResult<O>;
6
6
  export declare class GenericTransformer<T, O> extends SchemaValueTransformer<T, O> {
7
7
  readonly sourceType?: OneOrMany<ValueType<T>>;
8
8
  readonly transformFunction: GenericTransformFunction<T, O>;
package/schema/types.d.ts CHANGED
@@ -3,26 +3,26 @@ import type { AbstractConstructor, OneOrMany, Record, Type, TypedOmit } from "..
3
3
  import type { NormalizedSchema, Schema, SchemaTestable } from './schema';
4
4
  import type { SchemaError } from './schema.error';
5
5
  declare const schemaOutputTypeSymbol: unique symbol;
6
- export declare type SchemaFactoryFunction<T> = (data: T) => T;
7
- export declare type SchemaFactory<T> = {
6
+ export type SchemaFactoryFunction<T> = (data: T) => T;
7
+ export type SchemaFactory<T> = {
8
8
  type: Type<T>;
9
9
  builder?: undefined;
10
10
  } | {
11
11
  type?: undefined;
12
12
  builder: SchemaFactoryFunction<T>;
13
13
  };
14
- export declare type ObjectSchemaProperties<T> = {
14
+ export type ObjectSchemaProperties<T> = {
15
15
  [K in keyof T]-?: OneOrMany<SchemaTestable<T[K]>>;
16
16
  };
17
- export declare type NormalizedObjectSchemaProperties<T> = {
17
+ export type NormalizedObjectSchemaProperties<T> = {
18
18
  [K in keyof T]-?: Schema<T[K]>;
19
19
  };
20
- export declare type SchemaOutput<T extends SchemaTestable> = T extends ObjectSchema<infer O> ? O : T extends ValueSchema<infer O> ? O : T extends TypeSchema<infer O> ? O : T extends ValueType<infer O> ? NormalizeValueType<O> : never;
21
- export declare type TupleSchemaOutput<T extends readonly SchemaTestable[]> = {
20
+ export type SchemaOutput<T extends SchemaTestable> = T extends ObjectSchema<infer O> ? O : T extends ValueSchema<infer O> ? O : T extends TypeSchema<infer O> ? O : T extends ValueType<infer O> ? NormalizeValueType<O> : never;
21
+ export type TupleSchemaOutput<T extends readonly SchemaTestable[]> = {
22
22
  [P in keyof T]: SchemaOutput<T[P]>;
23
23
  };
24
- export declare type ObjectSchemaOrType<T = any> = ObjectSchema<T> | AbstractConstructor<T>;
25
- export declare type ObjectSchema<T = any> = {
24
+ export type ObjectSchemaOrType<T = any> = ObjectSchema<T> | AbstractConstructor<T>;
25
+ export type ObjectSchema<T = any> = {
26
26
  [schemaOutputTypeSymbol]?: T;
27
27
  sourceType?: ValueType;
28
28
  factory?: SchemaFactory<T>;
@@ -30,13 +30,13 @@ export declare type ObjectSchema<T = any> = {
30
30
  mask?: boolean;
31
31
  allowUnknownProperties?: OneOrMany<SchemaTestable>;
32
32
  };
33
- export declare type TypeSchema<T = any> = {
33
+ export type TypeSchema<T = any> = {
34
34
  type: ValueType<T>;
35
35
  };
36
- export declare type NormalizedTypeSchema<T = any> = {
36
+ export type NormalizedTypeSchema<T = any> = {
37
37
  foo: ResolvedValueType<T>;
38
38
  };
39
- export declare type ValueSchema<T = unknown> = {
39
+ export type ValueSchema<T = unknown> = {
40
40
  [schemaOutputTypeSymbol]?: T;
41
41
  schema: OneOrMany<SchemaTestable<T>>;
42
42
  array?: boolean;
@@ -50,15 +50,15 @@ export declare type ValueSchema<T = unknown> = {
50
50
  arrayConstraints?: OneOrMany<SchemaArrayConstraint>;
51
51
  valueConstraints?: OneOrMany<SchemaValueConstraint>;
52
52
  };
53
- export declare type ValueSchemaOptions = TypedOmit<ValueSchema, 'schema' | typeof schemaOutputTypeSymbol>;
54
- export declare type NormalizedObjectSchema<T = any> = {
53
+ export type ValueSchemaOptions = TypedOmit<ValueSchema, 'schema' | typeof schemaOutputTypeSymbol>;
54
+ export type NormalizedObjectSchema<T = any> = {
55
55
  [schemaOutputTypeSymbol]?: T;
56
56
  factory?: SchemaFactory<T>;
57
57
  properties: NormalizedObjectSchemaProperties<T>;
58
58
  mask?: boolean;
59
59
  allowUnknownProperties: Set<Schema>;
60
60
  };
61
- export declare type NormalizedValueSchema<T = any> = {
61
+ export type NormalizedValueSchema<T = any> = {
62
62
  [schemaOutputTypeSymbol]?: T;
63
63
  schema: Set<Schema<T>>;
64
64
  array: boolean;
@@ -70,21 +70,21 @@ export declare type NormalizedValueSchema<T = any> = {
70
70
  arrayConstraints: readonly SchemaArrayConstraint[];
71
71
  valueConstraints: readonly SchemaValueConstraint[];
72
72
  };
73
- export declare type SchemaContext = {
73
+ export type SchemaContext = {
74
74
  schema: NormalizedSchema;
75
75
  options: SchemaTestOptions;
76
76
  };
77
- export declare type ConstraintContext = SchemaContext;
78
- export declare type TransformerContext = SchemaContext;
79
- export declare type CoercerContext = SchemaContext;
80
- export declare type NormalizeValueType<T> = T extends String ? string : T extends Number ? number : T extends Boolean ? boolean : T extends BigInt ? bigint : T extends Symbol ? symbol : T extends 'undefined' ? undefined : T extends 'null' ? null : T extends 'any' ? any : T;
81
- export declare type NormalizeToValueType<T> = T extends string | String ? typeof String : T extends number ? typeof Number : T extends boolean ? typeof Boolean : T extends bigint ? typeof BigInt : T extends symbol ? typeof Symbol : T extends undefined ? 'undefined' : T extends null ? 'null' : T extends any ? 'any' : never;
82
- export declare type ValueType<T = any> = AbstractConstructor<T> | NormalizeToValueType<T> | DeferredValueType<T>;
83
- export declare type DeferredValueType<T = any> = {
77
+ export type ConstraintContext = SchemaContext;
78
+ export type TransformerContext = SchemaContext;
79
+ export type CoercerContext = SchemaContext;
80
+ export type NormalizeValueType<T> = T extends String ? string : T extends Number ? number : T extends Boolean ? boolean : T extends BigInt ? bigint : T extends Symbol ? symbol : T extends 'undefined' ? undefined : T extends 'null' ? null : T extends 'any' ? any : T;
81
+ export type NormalizeToValueType<T> = T extends string | String ? typeof String : T extends number ? typeof Number : T extends boolean ? typeof Boolean : T extends bigint ? typeof BigInt : T extends symbol ? typeof Symbol : T extends undefined ? 'undefined' : T extends null ? 'null' : T extends any ? 'any' : never;
82
+ export type ValueType<T = any> = AbstractConstructor<T> | NormalizeToValueType<T> | DeferredValueType<T>;
83
+ export type DeferredValueType<T = any> = {
84
84
  deferred: () => ValueType<T>;
85
85
  };
86
- export declare type ResolvedValueType<T = any> = Exclude<ValueType<T>, DeferredValueType>;
87
- export declare type Coercible = {
86
+ export type ResolvedValueType<T = any> = Exclude<ValueType<T>, DeferredValueType>;
87
+ export type Coercible = {
88
88
  coerce?: boolean;
89
89
  };
90
90
  export declare const primitiveConstructors: ValueType[];
@@ -92,7 +92,7 @@ export declare const primitiveConstructorSet: Set<ValueType<any>>;
92
92
  export declare abstract class SchemaArrayConstraint {
93
93
  abstract validate(value: readonly unknown[], path: JsonPath, context: ConstraintContext): ConstraintResult;
94
94
  }
95
- export declare type OptionKeys<T extends Record> = readonly (keyof T)[];
95
+ export type OptionKeys<T extends Record> = readonly (keyof T)[];
96
96
  export declare abstract class SchemaValueConstraint {
97
97
  abstract readonly suitableTypes: OneOrMany<ValueType>;
98
98
  abstract readonly expects: OneOrMany<string>;
@@ -107,7 +107,7 @@ export declare abstract class SchemaValueCoercer {
107
107
  abstract readonly targetType: ValueType;
108
108
  abstract coerce(value: unknown, path: JsonPath, context: CoercerContext): CoerceResult;
109
109
  }
110
- export declare type SchemaTestOptions = {
110
+ export type SchemaTestOptions = {
111
111
  /**
112
112
  * Try to convert wrong input into desired output.
113
113
  * Can be specified on definition and validation. If specified on both, definition has higher priority
@@ -123,7 +123,7 @@ export declare type SchemaTestOptions = {
123
123
  */
124
124
  fastErrors?: boolean;
125
125
  };
126
- export declare type SchemaTestResult<T> = {
126
+ export type SchemaTestResult<T> = {
127
127
  valid: true;
128
128
  value: T;
129
129
  error?: undefined;
@@ -132,14 +132,14 @@ export declare type SchemaTestResult<T> = {
132
132
  value?: undefined;
133
133
  error: SchemaError;
134
134
  };
135
- export declare type ConstraintResult = {
135
+ export type ConstraintResult = {
136
136
  valid: true;
137
137
  error?: undefined;
138
138
  } | {
139
139
  valid: false;
140
140
  error: SchemaError;
141
141
  };
142
- export declare type CoerceResult = {
142
+ export type CoerceResult = {
143
143
  success: true;
144
144
  value: any;
145
145
  error?: undefined;
@@ -149,10 +149,10 @@ export declare type CoerceResult = {
149
149
  error: SchemaError;
150
150
  };
151
151
  export declare const transformErrorResultSymbol: unique symbol;
152
- export declare type TransformErrorResult = {
152
+ export type TransformErrorResult = {
153
153
  [transformErrorResultSymbol]: SchemaError;
154
154
  };
155
- export declare type TransformResult<T> = T | TransformErrorResult;
155
+ export type TransformResult<T> = T | TransformErrorResult;
156
156
  export declare function transformErrorResult(error: SchemaError): TransformErrorResult;
157
157
  export declare function isTransformErrorResult(value: any): value is TransformErrorResult;
158
158
  export declare function objectSchemaProperties<T extends Record>(properties: ObjectSchemaProperties<T>): ObjectSchemaProperties<T>;
@@ -1,7 +1,7 @@
1
1
  import type { Injectable } from "../../container";
2
2
  import { resolveArgumentType } from "../../container";
3
3
  import type { Entity } from "../../database";
4
- export declare type ElasticSearchIndexConfigArgument<T extends Entity = Entity> = string | ElasticSearchIndexConfig<T>;
4
+ export type ElasticSearchIndexConfigArgument<T extends Entity = Entity> = string | ElasticSearchIndexConfig<T>;
5
5
  export declare abstract class ElasticSearchIndexConfig<T extends Entity = Entity> implements Injectable<ElasticSearchIndexConfigArgument> {
6
6
  readonly indexName: string;
7
7
  readonly [resolveArgumentType]: ElasticSearchIndexConfigArgument<T>;
@@ -1,16 +1,16 @@
1
1
  import type { QueryDslQueryContainer } from '@elastic/elasticsearch/lib/api/types';
2
- export declare type ElasticQuery = QueryDslQueryContainer;
3
- export declare type ElasticBooleanQuery = Required<Pick<QueryDslQueryContainer, 'bool'>>;
4
- export declare type ElasticIdsQuery = Required<Pick<QueryDslQueryContainer, 'ids'>>;
5
- export declare type ElasticMatchAllQuery = Required<Pick<QueryDslQueryContainer, 'match_all'>>;
6
- export declare type ElasticRangeQuery = Required<Pick<QueryDslQueryContainer, 'range'>>;
7
- export declare type ElasticRegexQuery = Required<Pick<QueryDslQueryContainer, 'regexp'>>;
8
- export declare type ElasticTermQuery = Required<Pick<QueryDslQueryContainer, 'term'>>;
9
- export declare type ElasticTermsQuery = Required<Pick<QueryDslQueryContainer, 'terms'>>;
10
- export declare type ElasticMatchQuery = Required<Pick<QueryDslQueryContainer, 'match'>>;
11
- export declare type ElasticExistsQuery = Required<Pick<QueryDslQueryContainer, 'exists'>>;
12
- export declare type ElasticMultiMatchQuery = Required<Pick<QueryDslQueryContainer, 'multi_match'>>;
13
- export declare type ElasticGeoBoundingBoxQuery = Required<Pick<QueryDslQueryContainer, 'geo_bounding_box'>>;
14
- export declare type ElasticGeoDistanceQuery = Required<Pick<QueryDslQueryContainer, 'geo_distance'>>;
15
- export declare type ElasticGeoPolygonQuery = Required<Pick<QueryDslQueryContainer, 'geo_polygon'>>;
16
- export declare type ElasticGeoShapeQuery = Required<Pick<QueryDslQueryContainer, 'geo_shape'>>;
2
+ export type ElasticQuery = QueryDslQueryContainer;
3
+ export type ElasticBooleanQuery = Required<Pick<QueryDslQueryContainer, 'bool'>>;
4
+ export type ElasticIdsQuery = Required<Pick<QueryDslQueryContainer, 'ids'>>;
5
+ export type ElasticMatchAllQuery = Required<Pick<QueryDslQueryContainer, 'match_all'>>;
6
+ export type ElasticRangeQuery = Required<Pick<QueryDslQueryContainer, 'range'>>;
7
+ export type ElasticRegexQuery = Required<Pick<QueryDslQueryContainer, 'regexp'>>;
8
+ export type ElasticTermQuery = Required<Pick<QueryDslQueryContainer, 'term'>>;
9
+ export type ElasticTermsQuery = Required<Pick<QueryDslQueryContainer, 'terms'>>;
10
+ export type ElasticMatchQuery = Required<Pick<QueryDslQueryContainer, 'match'>>;
11
+ export type ElasticExistsQuery = Required<Pick<QueryDslQueryContainer, 'exists'>>;
12
+ export type ElasticMultiMatchQuery = Required<Pick<QueryDslQueryContainer, 'multi_match'>>;
13
+ export type ElasticGeoBoundingBoxQuery = Required<Pick<QueryDslQueryContainer, 'geo_bounding_box'>>;
14
+ export type ElasticGeoDistanceQuery = Required<Pick<QueryDslQueryContainer, 'geo_distance'>>;
15
+ export type ElasticGeoPolygonQuery = Required<Pick<QueryDslQueryContainer, 'geo_polygon'>>;
16
+ export type ElasticGeoShapeQuery = Required<Pick<QueryDslQueryContainer, 'geo_shape'>>;
@@ -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 declare type ElasticIndexMapping<T extends Entity = Entity> = TypedOmit<MappingTypeMapping, 'properties'> & ElasticNestedIndexMapping<TypedOmit<T, 'id'>>;
5
- export declare type ElasticNestedIndexMapping<T> = {
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
- declare type StrippedBaseType<T extends MappingPropertyBase> = TypedOmit<T, 'properties' | 'fields'>;
11
- declare type ElasticIndexMappingItemBase = {
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 declare type MappingNumberProperty = MappingByteNumberProperty | MappingDoubleNumberProperty | MappingFloatNumberProperty | MappingHalfFloatNumberProperty | MappingIntegerNumberProperty | MappingLongNumberProperty | MappingShortNumberProperty | MappingScaledFloatNumberProperty | MappingUnsignedLongNumberProperty;
16
- export declare type ElasticKeywordIndexMappingItem = ElasticIndexMappingItemBase & StrippedBaseType<MappingKeywordProperty>;
17
- export declare type ElasticTextIndexMappingItem = ElasticIndexMappingItemBase & StrippedBaseType<MappingTextProperty>;
18
- export declare type ElasticNumberIndexMappingItem = ElasticIndexMappingItemBase & StrippedBaseType<MappingNumberProperty>;
19
- export declare type ElasticBooleanIndexMappingItem = ElasticIndexMappingItemBase & StrippedBaseType<MappingBooleanProperty>;
20
- export declare type ElasticDateIndexMappingItem = ElasticIndexMappingItemBase & StrippedBaseType<MappingDateProperty>;
21
- export declare type ElasticGeoPointIndexMappingItem = ElasticIndexMappingItemBase & StrippedBaseType<MappingGeoPointProperty>;
22
- export declare type ElasticObjectIndexMappingItem<T> = ElasticIndexMappingItemBase & StrippedBaseType<MappingObjectProperty> & ElasticNestedIndexMapping<T>;
23
- export declare type ElasticNestedIndexMappingItem<T> = ElasticIndexMappingItemBase & StrippedBaseType<MappingNestedProperty> & ElasticNestedIndexMapping<T>;
24
- export declare type ElasticIndexMappingItem<T = any> = ElasticKeywordIndexMappingItem | ElasticTextIndexMappingItem | ElasticNumberIndexMappingItem | ElasticBooleanIndexMappingItem | ElasticDateIndexMappingItem | ElasticGeoPointIndexMappingItem | ElasticObjectIndexMappingItem<T> | ElasticNestedIndexMappingItem<T>;
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 declare type Sort<T extends Entity = Entity> = SortCombinations<T> | SortCombinations<T>[];
5
- export declare type SortCombinations<T extends Entity = Entity> = keyof T | SortOptions<T>;
6
- export declare type SortOptions<T extends Entity = Entity> = SortOptionsKeys & {
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 declare type ElasticsearchModuleConfig = {
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 declare type SearchCursorOptions<T extends Entity> = QueryOptions<T> & {
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 declare type SearchResultItem<T extends Entity> = {
2
+ export type SearchResultItem<T extends Entity> = {
3
3
  entity: T;
4
4
  score: number;
5
5
  };
6
- export declare type SearchResult<T extends Entity> = {
6
+ export type SearchResult<T extends Entity> = {
7
7
  total?: number;
8
8
  totalIsLowerBound: boolean;
9
9
  milliseconds: number;
@@ -1,4 +1,4 @@
1
- declare type ErrorData = Pick<Error, 'name' | 'message' | 'stack'>;
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
- declare type MapData = [any, any][];
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,4 +1,4 @@
1
- declare type RegExpData = {
1
+ type RegExpData = {
2
2
  pattern: string;
3
3
  flags: string;
4
4
  };
@@ -1,6 +1,6 @@
1
1
  import type { TryDereference } from '../serializable';
2
2
  import type { Serialized } from '../types';
3
- declare type SetData = Serialized<any>[];
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 declare type DereferenceCallback = (dereferenced: unknown) => void;
7
- export declare type TryDereference = (value: unknown, callback: DereferenceCallback) => boolean;
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 declare type SerializableType<T, Data> = Type<Serializable<T, Data>>;
13
- export declare type SerializeFunction<T, Data> = Serializable<T, Data>[typeof Serializable.serialize];
14
- export declare type DeserializeFunction<T, Data> = Serializable<T, Data>[typeof Serializable.deserialize];
15
- declare type SerializableRegistration<T = any, Data = any> = {
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
- declare type QueueItem = () => void;
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
  /**
@@ -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 declare type SerializationReplacer = (value: any) => any;
6
- export declare type TypeField<T extends string> = `<${T}>`;
7
- export declare type NonPrimitive<TypeName extends string = string, Data = unknown> = Record<TypeField<TypeName>, Data>;
8
- export declare type RawNonPrimitive = NonPrimitive<typeof rawNonPrimitiveType, any>;
9
- export declare type UndefinedNonPrimitive = NonPrimitive<typeof undefinedNonPrimitiveType, null>;
10
- export declare type BigintNonPrimitive = NonPrimitive<typeof bigintNonPrimitiveType, string>;
11
- export declare type GlobalSymbolNonPrimitive = NonPrimitive<typeof globalSymbolNonPrimitiveType, string>;
12
- export declare type FunctionNonPrimitive = NonPrimitive<typeof functionNonPrimitiveType, string>;
13
- export declare type RefNonPrimitive = NonPrimitive<typeof refNonPrimitiveType, string>;
14
- export declare type CustomNonPrimitive<TypeName extends string> = NonPrimitive<TypeName, SerializedData>;
15
- export declare type SerializedData = JsonPrimitive | NonPrimitive | Nested<JsonPrimitive | NonPrimitive>;
16
- export declare type Serialized<T = unknown> = SerializedData & {
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 declare type StringSerialized<T = unknown> = string & {
19
+ export type StringSerialized<T = unknown> = string & {
20
20
  [stringSerializedSymbol]: T;
21
21
  };
22
- export declare type Decycled<T = unknown> = {
22
+ export type Decycled<T = unknown> = {
23
23
  [decycledSymbol]: T;
24
24
  };
25
- export declare type SerializationOptions = {
25
+ export type SerializationOptions = {
26
26
  /**
27
27
  * !!! DANGEROUS !!!
28
28
  *
@@ -1,4 +1,4 @@
1
- export declare type SeverSentEventsEventBase<Data> = {
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 declare type SeverSentEventsTextEvent = SeverSentEventsEventBase<string>;
20
- export declare type SeverSentEventsJsonEvent = SeverSentEventsEventBase<any>;
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;
@@ -1,5 +1,5 @@
1
1
  import type { Theme } from "../theme";
2
- export declare type TailwindPalette = {
2
+ export type TailwindPalette = {
3
3
  DEFAULT: string;
4
4
  50: string;
5
5
  100: string;
@@ -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 declare type TemplateModuleConfig = {
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 declare type FileTemplateProviderConfig = {
5
+ export type FileTemplateProviderConfig = {
6
6
  basePath?: string;
7
7
  };
8
- export declare type FileTemplateProviderArgument = string;
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(filePath));
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;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,2CAAa,QAAQ,EAAyB,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"}
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"}