@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,16 +1,16 @@
1
1
  import type { Injectable } from "../container";
2
2
  import { resolveArgumentType } from "../container";
3
3
  import { LogLevel } from './level';
4
- export declare type LogEntry = string;
5
- export declare type LogEntryProvider = () => LogEntry;
6
- export declare type LogEntryOrProvider = LogEntry | LogEntryProvider;
7
- export declare type LoggerStatic = new (level: LogLevel) => Logger;
8
- export declare type LogErrorOptions = {
4
+ export type LogEntry = string;
5
+ export type LogEntryProvider = () => LogEntry;
6
+ export type LogEntryOrProvider = LogEntry | LogEntryProvider;
7
+ export type LoggerStatic = new (level: LogLevel) => Logger;
8
+ export type LogErrorOptions = {
9
9
  includeRest?: boolean;
10
10
  includeStack?: boolean;
11
11
  };
12
12
  /** either string as a module shorthand or object */
13
- export declare type LoggerArgument = string | undefined | {
13
+ export type LoggerArgument = string | undefined | {
14
14
  level?: LogLevel;
15
15
  module?: string | string[];
16
16
  prefix?: string;
@@ -1,7 +1,7 @@
1
1
  import type { Injectable } from "../container";
2
2
  import { resolveArgumentType } from "../container";
3
3
  import type { MailData, MailSendResult } from './models';
4
- export declare type MailClientConfig = {
4
+ export type MailClientConfig = {
5
5
  host: string;
6
6
  port: number;
7
7
  secure?: boolean;
@@ -1,4 +1,4 @@
1
- export declare type MailAddress = string | {
1
+ export type MailAddress = string | {
2
2
  name: string;
3
3
  address: string;
4
4
  };
@@ -1,4 +1,4 @@
1
- export declare type MailContent = {
1
+ export type MailContent = {
2
2
  text?: string;
3
3
  html?: string;
4
4
  };
@@ -1,7 +1,7 @@
1
1
  import type { OneOrMany } from "../../types";
2
2
  import type { MailAddress } from './mail-address.model';
3
3
  import type { MailContent } from './mail-content.model';
4
- export declare type MailData = {
4
+ export type MailData = {
5
5
  content: MailContent;
6
6
  from?: MailAddress;
7
7
  to?: OneOrMany<MailAddress>;
@@ -1,11 +1,11 @@
1
1
  import type { Entity, NewEntity } from "../../database";
2
2
  import type { MailData } from './mail-data.model';
3
3
  import type { MailSendResult } from './mail-send-result.model';
4
- export declare type MailLog = Entity & {
4
+ export type MailLog = Entity & {
5
5
  timestamp: number;
6
6
  templateKey: string | null;
7
7
  data: MailData;
8
8
  sendResult: MailSendResult | null;
9
9
  errors: string[] | null;
10
10
  };
11
- export declare type NewMailLog = NewEntity<MailLog>;
11
+ export type NewMailLog = NewEntity<MailLog>;
@@ -1,5 +1,5 @@
1
1
  import type { MailAddress } from './mail-address.model';
2
- export declare type MailSendResult = {
2
+ export type MailSendResult = {
3
3
  messageId: string;
4
4
  accepted: MailAddress[];
5
5
  rejected: MailAddress[];
@@ -1,5 +1,5 @@
1
1
  import type { Template, TemplateField } from "../../templates";
2
- export declare type MailTemplate = Template<{
2
+ export type MailTemplate = Template<{
3
3
  subject: false;
4
4
  html: false;
5
5
  text: false;
package/mail/module.d.ts CHANGED
@@ -2,7 +2,7 @@ import type { Type } from "../types";
2
2
  import { MailLogRepository } from './mail-log.repository';
3
3
  import type { MailClientConfig } from './mail.client';
4
4
  import { MailClient } from './mail.client';
5
- export declare type MailModuleConfig = {
5
+ export type MailModuleConfig = {
6
6
  clientConfig: MailClientConfig;
7
7
  client: Type<MailClient>;
8
8
  logRepository: Type<MailLogRepository> | undefined;
@@ -4,10 +4,10 @@ import type { CollectionArgument } from "../../database/mongo";
4
4
  import { Collection, MongoEntityRepository } from "../../database/mongo";
5
5
  import { Logger } from "../../logger";
6
6
  import type { MailLog } from '../models';
7
- export declare type MongoMailLogRepositoryConfig = {
7
+ export type MongoMailLogRepositoryConfig = {
8
8
  config?: MongoMailLogRepositoryArgument;
9
9
  };
10
- export declare type MongoMailLogRepositoryArgument = CollectionArgument<MailLog>;
10
+ export type MongoMailLogRepositoryArgument = CollectionArgument<MailLog>;
11
11
  export declare const mongoMailLogRepositoryConfig: MongoMailLogRepositoryConfig;
12
12
  export declare class MongoMailLogRepository extends MongoEntityRepository<MailLog> implements Injectable<MongoMailLogRepositoryArgument> {
13
13
  [resolveArgumentType]: MongoMailLogRepositoryArgument;
@@ -1,4 +1,4 @@
1
- export declare type LocalMessageBusItem<T = unknown> = {
1
+ export type LocalMessageBusItem<T = unknown> = {
2
2
  source: symbol;
3
3
  message: T;
4
4
  };
@@ -3,7 +3,7 @@ import { resolveArgumentType } from "../container";
3
3
  import type { Observable } from 'rxjs';
4
4
  import type { AsyncDisposable } from '../disposable';
5
5
  import { disposeAsync } from '../disposable';
6
- export declare type MessageBusArgument = string;
6
+ export type MessageBusArgument = string;
7
7
  export declare abstract class MessageBus<T> implements AsyncDisposable, Injectable<MessageBusArgument> {
8
8
  readonly [resolveArgumentType]: string;
9
9
  /** messages from other instances */
@@ -1,6 +1,6 @@
1
1
  import type { Entity, NewEntity } from "../database";
2
- export declare type MigrationState = Entity & {
2
+ export type MigrationState = Entity & {
3
3
  name: string;
4
4
  revision: number;
5
5
  };
6
- export declare type NewMigrationState = NewEntity<MigrationState>;
6
+ export type NewMigrationState = NewEntity<MigrationState>;
@@ -1,19 +1,19 @@
1
1
  import { LockProvider } from "../lock";
2
2
  import { Logger } from "../logger";
3
3
  import { MigrationStateRepository } from './migration-state-repository';
4
- export declare type MigrationDefinition<T = void> = {
4
+ export type MigrationDefinition<T = void> = {
5
5
  name: string;
6
6
  migrations: Migration<T>[];
7
7
  };
8
- export declare type Migration<T = void> = {
8
+ export type Migration<T = void> = {
9
9
  from: 'init' | number | number[];
10
10
  to: number;
11
11
  migrator: (control: MigrationControl) => Promise<T> | T;
12
12
  };
13
- export declare type MigrationControl = {
13
+ export type MigrationControl = {
14
14
  restart: () => void;
15
15
  };
16
- export declare type MigrationResult<T> = {
16
+ export type MigrationResult<T> = {
17
17
  from: 'init' | number;
18
18
  to: number;
19
19
  time: number;
@@ -1,6 +1,6 @@
1
1
  import type { MongoRepositoryConfig } from "../../database/mongo";
2
2
  import type { MigrationState } from "..";
3
- export declare type MongoMigrationStateRepositoryModuleConfig = {
3
+ export type MongoMigrationStateRepositoryModuleConfig = {
4
4
  defaultMigrationStateRepositoryConfig: MongoRepositoryConfig<MigrationState> | undefined;
5
5
  };
6
6
  export declare const mongoMigrationStateRepositoryModuleConfig: MongoMigrationStateRepositoryModuleConfig;
@@ -2,12 +2,12 @@ import type { ReadonlyCancellationToken } from "../utils/cancellation-token";
2
2
  import type { MetricAggregation, MetricAggregationOptions } from "../utils/moving-metric";
3
3
  import { MovingMetric } from "../utils/moving-metric";
4
4
  import type { ModuleMetric } from './module';
5
- export declare type MetricReport<Aggregation extends MetricAggregation> = {
5
+ export type MetricReport<Aggregation extends MetricAggregation> = {
6
6
  displayName: string;
7
7
  aggregation: Aggregation;
8
8
  aggregationOptions?: MetricAggregationOptions<Aggregation>;
9
9
  };
10
- export declare type MetricReportRegistration = {
10
+ export type MetricReportRegistration = {
11
11
  metric: ModuleMetric;
12
12
  moving: MovingMetric;
13
13
  reports: MetricReport<MetricAggregation>[];
@@ -3,7 +3,7 @@ export declare enum ModuleMetricType {
3
3
  Counter = 0,
4
4
  Gauge = 1
5
5
  }
6
- export declare type ModuleMetric = {
6
+ export type ModuleMetric = {
7
7
  type: ModuleMetricType;
8
8
  labels?: string[];
9
9
  getValue(): number;
@@ -1,7 +1,7 @@
1
1
  import type { ReadonlyCancellationToken } from "../../utils/cancellation-token";
2
2
  import type { Module } from '../module';
3
3
  import { ModuleBase } from '../module-base';
4
- export declare type FunctionModuleFunction = (cancellationToken: ReadonlyCancellationToken) => void | Promise<void>;
4
+ export type FunctionModuleFunction = (cancellationToken: ReadonlyCancellationToken) => void | Promise<void>;
5
5
  export declare class FunctionModule extends ModuleBase implements Module {
6
6
  private readonly fn;
7
7
  readonly metrics: {};
@@ -7,7 +7,7 @@ import type { ReadonlyCancellationToken } from "../../utils/cancellation-token";
7
7
  import type { Module } from '../module';
8
8
  import { ModuleMetricType } from '../module';
9
9
  import { ModuleBase } from '../module-base';
10
- export declare type WebServerModuleConfiguration = {
10
+ export type WebServerModuleConfiguration = {
11
11
  port: number;
12
12
  };
13
13
  export declare const webServerModuleConfiguration: WebServerModuleConfiguration;
@@ -11,7 +11,7 @@ declare const notificationApiDefinition: {
11
11
  };
12
12
  };
13
13
  };
14
- declare type NotificationApiDefinition = typeof notificationApiDefinition;
14
+ type NotificationApiDefinition = typeof notificationApiDefinition;
15
15
  export declare class NotificationApi {
16
16
  get(): Promise<ApiServerResult<NotificationApiDefinition, 'get'>>;
17
17
  }
@@ -1,4 +1,4 @@
1
- export declare type NotificationModuleConfig = {
1
+ export type NotificationModuleConfig = {
2
2
  apiResource: string;
3
3
  };
4
4
  export declare const notificationModuleConfig: NotificationModuleConfig;
@@ -1,10 +1,10 @@
1
1
  import type { Injectable } from "../container";
2
2
  import { resolveArgumentType } from "../container";
3
3
  import type { ObjectMetadata, ObjectStorageObject } from './object';
4
- export declare type UploadObjectOptions = {
4
+ export type UploadObjectOptions = {
5
5
  metadata?: ObjectMetadata;
6
6
  };
7
- export declare type ObjectStorageArgument = string;
7
+ export type ObjectStorageArgument = string;
8
8
  export declare abstract class ObjectStorage implements Injectable<ObjectStorageArgument> {
9
9
  /**
10
10
  * object storage module
@@ -1,5 +1,5 @@
1
1
  import type { Record } from "../types";
2
- export declare type ObjectMetadata = Record<string>;
2
+ export type ObjectMetadata = Record<string>;
3
3
  export declare abstract class ObjectStorageObject {
4
4
  readonly module: string;
5
5
  readonly key: string;
@@ -1,7 +1,7 @@
1
1
  import { ObjectStorageProvider } from "..";
2
2
  import { S3ObjectStorage } from './s3.object-storage';
3
3
  export declare const S3_OBJECT_STORAGE_PROVIDER_CONFIG: import("../../container").InjectionToken<S3ObjectStorageProviderConfig, any>;
4
- export declare type S3ObjectStorageProviderConfig = {
4
+ export type S3ObjectStorageProviderConfig = {
5
5
  /**
6
6
  * s3 endpoint
7
7
  */
@@ -6,7 +6,7 @@ import { Logger } from "../logger";
6
6
  import type { TypedOmit } from "../types";
7
7
  import type { OidcState } from './oidc-state.model';
8
8
  import { OidcStateRepository } from './oidc-state.repository';
9
- export declare type MongoOidcState = TypedOmit<OidcState, 'expiration'> & {
9
+ export type MongoOidcState = TypedOmit<OidcState, 'expiration'> & {
10
10
  expiration: Date;
11
11
  };
12
12
  export declare class MongoOidcStateRepository extends MongoEntityRepository<OidcState, MongoOidcState> implements OidcStateRepository, Injectable<CollectionArgument<MongoOidcState>> {
@@ -1,5 +1,5 @@
1
1
  import { HttpClient } from "../http/client";
2
- export declare type OidcConfiguration = {
2
+ export type OidcConfiguration = {
3
3
  authorizationEndpoint: string;
4
4
  tokenEndpoint: string;
5
5
  revocationEndpoint?: string;
@@ -1,5 +1,5 @@
1
1
  import type { Entity, NewEntity } from "../database";
2
- export declare type OidcState<Data = any> = Entity & {
2
+ export type OidcState<Data = any> = Entity & {
3
3
  value: string;
4
4
  codeVerifier: string;
5
5
  endpoint: string;
@@ -8,4 +8,4 @@ export declare type OidcState<Data = any> = Entity & {
8
8
  expiration: number;
9
9
  data: Data;
10
10
  };
11
- export declare type NewOidcState<Data = any> = NewEntity<OidcState<Data>>;
11
+ export type NewOidcState<Data = any> = NewEntity<OidcState<Data>>;
@@ -1,4 +1,4 @@
1
- export declare type OidcInitParameters<Data = void> = {
1
+ export type OidcInitParameters<Data = void> = {
2
2
  endpoint: string;
3
3
  clientId: string;
4
4
  clientSecret: string;
@@ -8,7 +8,7 @@ export declare type OidcInitParameters<Data = void> = {
8
8
  /** custom data */
9
9
  data: Data;
10
10
  };
11
- export declare type OidcInitResult = {
11
+ export type OidcInitResult = {
12
12
  authorizationEndpoint: string;
13
13
  state: string;
14
14
  clientId: string;
@@ -16,31 +16,31 @@ export declare type OidcInitResult = {
16
16
  codeChallenge: string;
17
17
  codeChallengeMethod: string;
18
18
  };
19
- export declare type OidcToken<Raw = unknown> = {
19
+ export type OidcToken<Raw = unknown> = {
20
20
  tokenType: string;
21
21
  accessToken: string;
22
22
  idToken?: string;
23
23
  refreshToken?: string;
24
24
  raw: Raw;
25
25
  };
26
- export declare type OidcGetTokenParametersBase<GrantType extends string> = {
26
+ export type OidcGetTokenParametersBase<GrantType extends string> = {
27
27
  endpoint: string;
28
28
  grantType: GrantType;
29
29
  clientId: string;
30
30
  clientSecret: string;
31
31
  authType?: 'body' | 'basic-auth';
32
32
  };
33
- export declare type OidcGetTokenParametersWithClientCredentials = OidcGetTokenParametersBase<'client_credentials'> & {
33
+ export type OidcGetTokenParametersWithClientCredentials = OidcGetTokenParametersBase<'client_credentials'> & {
34
34
  scope?: string;
35
35
  };
36
- export declare type OidcGetTokenParametersWithAuthorizationCode = OidcGetTokenParametersBase<'authorization_code'> & {
36
+ export type OidcGetTokenParametersWithAuthorizationCode = OidcGetTokenParametersBase<'authorization_code'> & {
37
37
  scope?: string;
38
38
  code: string;
39
39
  codeVerifier: string;
40
40
  redirectUri: string;
41
41
  };
42
- export declare type OidcGetTokenParameters = OidcGetTokenParametersWithClientCredentials | OidcGetTokenParametersWithAuthorizationCode;
43
- export declare type OidcRefreshTokenParameters = {
42
+ export type OidcGetTokenParameters = OidcGetTokenParametersWithClientCredentials | OidcGetTokenParametersWithAuthorizationCode;
43
+ export type OidcRefreshTokenParameters = {
44
44
  endpoint: string;
45
45
  clientId: string;
46
46
  clientSecret: string;
package/orm/types.d.ts CHANGED
@@ -1,18 +1,18 @@
1
1
  import { OneOrMany, Record, Type } from "../types";
2
- export declare type EntityDefinition = {
2
+ export type EntityDefinition = {
3
3
  name: string;
4
4
  tableName?: string;
5
5
  properties: Record;
6
6
  indexes?: IndexDefinition[];
7
7
  };
8
- export declare type EntityPropertyType = 'any' | 'string' | 'number' | 'boolean';
9
- export declare type PropertyDefinition = {
8
+ export type EntityPropertyType = 'any' | 'string' | 'number' | 'boolean';
9
+ export type PropertyDefinition = {
10
10
  type: OneOrMany<EntityPropertyType>;
11
11
  array?: boolean;
12
12
  nullable?: boolean;
13
13
  unique?: boolean;
14
14
  };
15
- export declare type IndexDefinition = {
15
+ export type IndexDefinition = {
16
16
  properties: string[];
17
17
  unique?: boolean;
18
18
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tstdl/base",
3
- "version": "0.81.35",
3
+ "version": "0.82.0",
4
4
  "author": "Patrick Hein",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -33,13 +33,13 @@
33
33
  "eslint": "8",
34
34
  "ttypescript": "1.5",
35
35
  "typedoc": "0.23",
36
- "typescript": "4.8",
36
+ "typescript": "4.9",
37
37
  "typescript-transform-paths": "3.4"
38
38
  },
39
39
  "peerDependencies": {
40
40
  "@elastic/elasticsearch": "^8.6",
41
41
  "@koa/router": "^12.0",
42
- "@tstdl/angular": "^0.81.0",
42
+ "@tstdl/angular": "^0.82.0",
43
43
  "chroma-js": "^2.4",
44
44
  "got": "^12.5",
45
45
  "handlebars": "^4.7",
@@ -43,7 +43,7 @@ export declare class PdfRenderOptions {
43
43
  */
44
44
  timeout?: number;
45
45
  }
46
- export declare type PdfTemplateOptions = PdfRenderOptions;
46
+ export type PdfTemplateOptions = PdfRenderOptions;
47
47
  export declare class PdfTemplate extends Template<{
48
48
  header: false;
49
49
  body: true;
@@ -51,10 +51,10 @@ export declare class PdfTemplate extends Template<{
51
51
  }, PdfRenderOptions> {
52
52
  options?: PdfTemplateOptions;
53
53
  }
54
- export declare type PdfServiceOptions = {
54
+ export type PdfServiceOptions = {
55
55
  language?: string;
56
56
  };
57
- export declare type PdfServiceArgument = PdfServiceOptions;
57
+ export type PdfServiceArgument = PdfServiceOptions;
58
58
  export declare class PdfService implements AsyncDisposable, AfterResolve, Injectable<PdfServiceArgument> {
59
59
  private readonly templateService;
60
60
  private readonly logger;
package/pool/pool.d.ts CHANGED
@@ -1,22 +1,22 @@
1
1
  import type { AsyncDisposable } from "../disposable/disposable";
2
2
  import { disposeAsync } from "../disposable/disposable";
3
3
  import type { Logger } from "../logger";
4
- export declare type PoolOptions = {
4
+ export type PoolOptions = {
5
5
  /**
6
6
  * maximum number of instances
7
7
  * @default number of cpu cores
8
8
  */
9
9
  size?: number;
10
10
  };
11
- export declare type PoolUseOptions = {
11
+ export type PoolUseOptions = {
12
12
  /**
13
13
  * Dipose used instance on error instead of reusing it.
14
14
  * @default false
15
15
  */
16
16
  disposeOnError?: boolean;
17
17
  };
18
- export declare type PoolInstanceFactory<T> = () => T | Promise<T>;
19
- export declare type PoolInstanceDisposer<T> = (instance: T) => any | Promise<any>;
18
+ export type PoolInstanceFactory<T> = () => T | Promise<T>;
19
+ export type PoolInstanceDisposer<T> = (instance: T) => any | Promise<any>;
20
20
  export declare class Pool<T extends object> implements AsyncDisposable {
21
21
  private readonly size;
22
22
  private readonly disposeOnError;
@@ -1,4 +1,4 @@
1
- export declare type CancelablePromiseResult<T> = {
1
+ export type CancelablePromiseResult<T> = {
2
2
  canceled: true;
3
3
  } | {
4
4
  canceled: false;
@@ -1,4 +1,4 @@
1
- declare type PromiseExecutor<T> = (resolve: (value: T | PromiseLike<T>) => void, reject: (reason?: any) => void) => void;
1
+ type PromiseExecutor<T> = (resolve: (value: T | PromiseLike<T>) => void, reject: (reason?: any) => void) => void;
2
2
  export declare class LazyPromise<T> implements Promise<T> {
3
3
  static readonly [Symbol.species]: PromiseConstructor;
4
4
  private readonly backingPromise;
@@ -1,7 +1,7 @@
1
1
  import type { Entity, NewEntity } from "../../database";
2
2
  import type { Job } from "..";
3
3
  import type { TypedOmit } from "../../types";
4
- export declare type MongoJob<T = unknown> = Entity & TypedOmit<Job<T>, 'id'> & {
4
+ export type MongoJob<T = unknown> = Entity & TypedOmit<Job<T>, 'id'> & {
5
5
  queue: string;
6
6
  jobId: string;
7
7
  enqueueTimestamp: number;
@@ -9,4 +9,4 @@ export declare type MongoJob<T = unknown> = Entity & TypedOmit<Job<T>, 'id'> & {
9
9
  lastDequeueTimestamp: number;
10
10
  batch: null | string;
11
11
  };
12
- export declare type NewMongoJob<T> = NewEntity<MongoJob<T>>;
12
+ export type NewMongoJob<T> = NewEntity<MongoJob<T>>;
@@ -52,7 +52,7 @@ let MongoQueue = class MongoQueue extends queue_1.Queue {
52
52
  this.messageBus = messageBusProvider.get(`MongoQueue:${repository.collection.collectionName}:${key}`);
53
53
  }
54
54
  async enqueue(data, options = {}) {
55
- const { tag = null, uniqueTag, priority = 0 } = options;
55
+ const { tag = null, uniqueTag, priority = queue_1.defaultJobPriority } = options;
56
56
  const newJob = {
57
57
  queue: this.queueKey,
58
58
  jobId: (0, id_1.getNewId)(),
@@ -74,7 +74,7 @@ let MongoQueue = class MongoQueue extends queue_1.Queue {
74
74
  const nonUnique = [];
75
75
  const keepOld = [];
76
76
  const takeNew = [];
77
- for (const { data, tag = null, uniqueTag, priority = 0 } of items) {
77
+ for (const { data, tag = null, uniqueTag, priority = queue_1.defaultJobPriority } of items) {
78
78
  const newMongoJob = {
79
79
  queue: this.queueKey,
80
80
  jobId: (0, id_1.getNewId)(),
@@ -1 +1 @@
1
- {"version":3,"file":"queue.js","sourceRoot":"","sources":["../../../source/queue/mongo/queue.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+CAAwC;AACxC,0CAAyC;AAEzC,qCAA8B;AAE9B,mDAAmD;AAEnD,8BAAoF;AACpF,mDAA4C;AAE5C,iDAAmD;AAEnD,uEAA+D;AAC/D,qDAAqD;AACrD,oEAA8D;AAC9D,+CAAiD;AACjD,yDAA2E;AAE3E,iEAA4D;AAC5D,qDAAsD;AAEtD,MAAM,aAAa,GAAG,IAAA,8BAAc,EAAW,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;AAC/D,MAAM,4BAA4B,GAAG,IAAA,8BAAc,EAAW,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,oBAAoB,CAAC,CAAC;AAC7F,MAAM,wBAAwB,GAAG,IAAA,8BAAc,EAAW,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC;AACrF,MAAM,gBAAgB,GAAG,IAAA,8BAAc,EAAW,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC;AACrE,MAAM,aAAa,GAAG,IAAA,8BAAc,EAAW,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;AAE/D,MAAM,cAAc,GAAmB;IACrC,QAAQ,EAAE,aAAa;IACvB,YAAY,EAAE,GAAG;IACjB,QAAQ,E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AAG,IAAA,4BAAgB,GAAE,CAAC;IAC/B,MAAM,2BAA2B,GAAG,GAAG,GAAG,cAAc,CAAC;IAEzD,MAAM,MAAM,GAA0B;QACpC,KAAK,EAAE,QAAQ;QACf,KAAK,EAAE,EAAE,GAAG,EAAE,QAAQ,EAAE;QACxB,oBAAoB,EAAE,EAAE,IAAI,EAAE,2BAA2B,EAAE;KAC5D,CAAC;IAEF,MAAM,MAAM,GAAgC;QAC1C,IAAI,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE;QAClB,IAAI,EAAE;YACJ,oBAAoB,EAAE,GAAG;YACzB,KAAK;SACN;KACF,CAAC;IAEF,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC;AAC5B,CAAC"}
package/queue/queue.d.ts CHANGED
@@ -2,30 +2,35 @@ import type { Injectable } from "../container";
2
2
  import { resolveArgumentType } from "../container";
3
3
  import type { ReadonlyCancellationToken } from '../utils/cancellation-token';
4
4
  import { QueueEnqueueBatch } from './enqueue-batch';
5
- export declare type JobTag = string | number | null;
6
- export declare type Job<T> = {
5
+ export type JobTag = string | number | null;
6
+ export type Job<T> = {
7
7
  id: string;
8
+ /**
9
+ * The lower the number, the higher the priority.
10
+ * @default 1000
11
+ */
8
12
  priority: number;
9
13
  tag: JobTag;
10
14
  data: T;
11
15
  };
16
+ export declare const defaultJobPriority = 1000;
12
17
  export declare enum UniqueTagStrategy {
13
18
  KeepOld = 0,
14
19
  TakeNew = 1
15
20
  }
16
- export declare type EnqueueOptions = {
21
+ export type EnqueueOptions = {
17
22
  tag?: JobTag;
18
23
  uniqueTag?: UniqueTagStrategy;
19
24
  priority?: number;
20
25
  };
21
- export declare type EnqueueManyItem<T> = EnqueueOptions & {
26
+ export type EnqueueManyItem<T> = EnqueueOptions & {
22
27
  data: T;
23
28
  };
24
- export declare type QueueConfig = {
29
+ export type QueueConfig = {
25
30
  processTimeout?: number;
26
31
  maxTries?: number;
27
32
  };
28
- export declare type QueueArgument = string | (QueueConfig & {
33
+ export type QueueArgument = string | (QueueConfig & {
29
34
  key: string;
30
35
  });
31
36
  export declare const defaultQueueConfig: Required<QueueConfig>;
package/queue/queue.js CHANGED
@@ -1,9 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Queue = exports.defaultQueueConfig = exports.UniqueTagStrategy = void 0;
3
+ exports.Queue = exports.defaultQueueConfig = exports.UniqueTagStrategy = exports.defaultJobPriority = void 0;
4
4
  const container_1 = require("../container");
5
5
  const units_1 = require("../utils/units");
6
6
  const enqueue_batch_1 = require("./enqueue-batch");
7
+ exports.defaultJobPriority = 1000;
7
8
  var UniqueTagStrategy;
8
9
  (function (UniqueTagStrategy) {
9
10
  UniqueTagStrategy[UniqueTagStrategy["KeepOld"] = 0] = "KeepOld";
@@ -1 +1 @@
1
- {"version":3,"file":"queue.js","sourceRoot":"","sources":["../../source/queue/queue.ts"],"names":[],"mappings":";;;AACA,4CAAkD;AAClD,0CAAsD;AAEtD,mDAAoD;AAWpD,IAAY,iBAGX;AAHD,WAAY,iBAAiB;IAC3B,+DAAW,CAAA;IACX,+DAAW,CAAA;AACb,CAAC,EAHW,iBAAiB,GAAjB,yBAAiB,KAAjB,yBAAiB,QAG5B;AAmBY,QAAA,kBAAkB,GAA0B;IACvD,cAAc,EAAE,6BAAqB;IACrC,QAAQ,EAAE,CAAC;CACZ,CAAC;AAEF,MAAsB,KAAK;IAChB,CAAC,+BAAmB,CAAC,CAAgB;IAE9C,KAAK;QACH,OAAO,IAAI,iCAAiB,CAAC,IAAI,CAAC,CAAC;IACrC,CAAC;CA2BF;AAhCD,sBAgCC"}
1
+ {"version":3,"file":"queue.js","sourceRoot":"","sources":["../../source/queue/queue.ts"],"names":[],"mappings":";;;AACA,4CAAkD;AAClD,0CAAsD;AAEtD,mDAAoD;AAiBvC,QAAA,kBAAkB,GAAG,IAAI,CAAC;AAEvC,IAAY,iBAGX;AAHD,WAAY,iBAAiB;IAC3B,+DAAW,CAAA;IACX,+DAAW,CAAA;AACb,CAAC,EAHW,iBAAiB,GAAjB,yBAAiB,KAAjB,yBAAiB,QAG5B;AAmBY,QAAA,kBAAkB,GAA0B;IACvD,cAAc,EAAE,6BAAqB;IACrC,QAAQ,EAAE,CAAC;CACZ,CAAC;AAEF,MAAsB,KAAK;IAChB,CAAC,+BAAmB,CAAC,CAAgB;IAE9C,KAAK;QACH,OAAO,IAAI,iCAAiB,CAAC,IAAI,CAAC,CAAC;IACrC,CAAC;CA2BF;AAhCD,sBAgCC"}