@servicelabsco/nestjs-utility-services 3.0.7 → 3.0.9

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 (126) hide show
  1. package/CHANGELOG.md +130 -0
  2. package/dist/auth/es6.classes.d.ts +4 -2
  3. package/dist/auth/es6.classes.js +2 -0
  4. package/dist/auth/es6.classes.js.map +1 -1
  5. package/dist/auth/services/device.token.service.js +2 -35
  6. package/dist/auth/services/device.token.service.js.map +1 -1
  7. package/dist/common/decorators/cache.method.decorator.d.ts +11 -0
  8. package/dist/common/decorators/cache.method.decorator.js +37 -0
  9. package/dist/common/decorators/cache.method.decorator.js.map +1 -0
  10. package/dist/common/decorators/index.d.ts +3 -0
  11. package/dist/common/decorators/index.js +3 -0
  12. package/dist/common/decorators/index.js.map +1 -1
  13. package/dist/common/decorators/public.exposed.decorator.d.ts +2 -1
  14. package/dist/common/decorators/public.exposed.decorator.js +21 -6
  15. package/dist/common/decorators/public.exposed.decorator.js.map +1 -1
  16. package/dist/common/decorators/when.column.updated.decorator.d.ts +8 -0
  17. package/dist/common/decorators/when.column.updated.decorator.js +22 -0
  18. package/dist/common/decorators/when.column.updated.decorator.js.map +1 -0
  19. package/dist/common/decorators/when.new.record.decorator.d.ts +5 -0
  20. package/dist/common/decorators/when.new.record.decorator.js +19 -0
  21. package/dist/common/decorators/when.new.record.decorator.js.map +1 -0
  22. package/dist/common/es6.classes.d.ts +9 -1
  23. package/dist/common/es6.classes.js +12 -1
  24. package/dist/common/es6.classes.js.map +1 -1
  25. package/dist/common/index.d.ts +1 -0
  26. package/dist/common/index.js +1 -0
  27. package/dist/common/index.js.map +1 -1
  28. package/dist/common/interfaces/index.d.ts +3 -0
  29. package/dist/common/interfaces/index.js +20 -0
  30. package/dist/common/interfaces/index.js.map +1 -0
  31. package/dist/common/interfaces/method.cache.interface.d.ts +4 -0
  32. package/dist/common/interfaces/method.cache.interface.js +3 -0
  33. package/dist/common/interfaces/method.cache.interface.js.map +1 -0
  34. package/dist/common/interfaces/platform.registry.resolver.interface.d.ts +5 -0
  35. package/dist/common/interfaces/platform.registry.resolver.interface.js +3 -0
  36. package/dist/common/interfaces/platform.registry.resolver.interface.js.map +1 -0
  37. package/dist/common/interfaces/updated.column.interface.d.ts +7 -0
  38. package/dist/common/interfaces/updated.column.interface.js +3 -0
  39. package/dist/common/interfaces/updated.column.interface.js.map +1 -0
  40. package/dist/common/libraries/common.service.d.ts +1 -1
  41. package/dist/common/libraries/common.service.js.map +1 -1
  42. package/dist/common/libraries/common.subscriber.d.ts +15 -4
  43. package/dist/common/libraries/common.subscriber.js +135 -67
  44. package/dist/common/libraries/common.subscriber.js.map +1 -1
  45. package/dist/common/libraries/custom.crypt.js +2 -2
  46. package/dist/common/libraries/custom.crypt.js.map +1 -1
  47. package/dist/common/libraries/index.d.ts +1 -0
  48. package/dist/common/libraries/index.js +1 -0
  49. package/dist/common/libraries/index.js.map +1 -1
  50. package/dist/common/libraries/platform.utility.d.ts +3 -0
  51. package/dist/common/libraries/platform.utility.js +6 -3
  52. package/dist/common/libraries/platform.utility.js.map +1 -1
  53. package/dist/common/libraries/sentry.sdk.d.ts +11 -0
  54. package/dist/common/libraries/sentry.sdk.js +26 -0
  55. package/dist/common/libraries/sentry.sdk.js.map +1 -0
  56. package/dist/config/sentry.options.d.ts +2 -1
  57. package/dist/config/sentry.options.js +7 -36
  58. package/dist/config/sentry.options.js.map +1 -1
  59. package/dist/platformUtility/consumers/job.consumer.js +2 -35
  60. package/dist/platformUtility/consumers/job.consumer.js.map +1 -1
  61. package/dist/platformUtility/es6.classes.d.ts +3 -4
  62. package/dist/platformUtility/es6.classes.js +2 -4
  63. package/dist/platformUtility/es6.classes.js.map +1 -1
  64. package/dist/platformUtility/filters/sentry.reporting.filter.d.ts +8 -7
  65. package/dist/platformUtility/filters/sentry.reporting.filter.js +66 -41
  66. package/dist/platformUtility/filters/sentry.reporting.filter.js.map +1 -1
  67. package/dist/platformUtility/libraries/common.sqs.polling.js +3 -36
  68. package/dist/platformUtility/libraries/common.sqs.polling.js.map +1 -1
  69. package/dist/platformUtility/libraries/sentry.bootstrap.d.ts +3 -2
  70. package/dist/platformUtility/libraries/sentry.bootstrap.js +3 -1
  71. package/dist/platformUtility/libraries/sentry.bootstrap.js.map +1 -1
  72. package/dist/platformUtility/libraries/sentry.context.js +4 -2
  73. package/dist/platformUtility/libraries/sentry.context.js.map +1 -1
  74. package/dist/platformUtility/platform.utility.module.js +2 -0
  75. package/dist/platformUtility/platform.utility.module.js.map +1 -1
  76. package/dist/platformUtility/sentry.reporting.module.js +2 -2
  77. package/dist/platformUtility/sentry.reporting.module.js.map +1 -1
  78. package/dist/platformUtility/services/aws.secret.service.js +2 -35
  79. package/dist/platformUtility/services/aws.secret.service.js.map +1 -1
  80. package/dist/platformUtility/services/cache.service.js +2 -0
  81. package/dist/platformUtility/services/cache.service.js.map +1 -1
  82. package/dist/platformUtility/services/emithook.mail.service.d.ts +0 -1
  83. package/dist/platformUtility/services/emithook.mail.service.js +2 -1
  84. package/dist/platformUtility/services/emithook.mail.service.js.map +1 -1
  85. package/dist/platformUtility/services/index.d.ts +1 -0
  86. package/dist/platformUtility/services/index.js +1 -0
  87. package/dist/platformUtility/services/index.js.map +1 -1
  88. package/dist/platformUtility/services/local.property.service.d.ts +0 -1
  89. package/dist/platformUtility/services/local.property.service.js +1 -10
  90. package/dist/platformUtility/services/local.property.service.js.map +1 -1
  91. package/dist/platformUtility/services/pdf.service.d.ts +0 -1
  92. package/dist/platformUtility/services/pdf.service.js +2 -1
  93. package/dist/platformUtility/services/pdf.service.js.map +1 -1
  94. package/dist/platformUtility/services/platform.registry.service.d.ts +23 -0
  95. package/dist/platformUtility/services/platform.registry.service.js +122 -0
  96. package/dist/platformUtility/services/platform.registry.service.js.map +1 -0
  97. package/dist/platformUtility/services/sql.service.js +6 -39
  98. package/dist/platformUtility/services/sql.service.js.map +1 -1
  99. package/dist/platformUtility/subscribers/dispatcher.subscriber.js +2 -35
  100. package/dist/platformUtility/subscribers/dispatcher.subscriber.js.map +1 -1
  101. package/dist/security/es6.classes.d.ts +4 -0
  102. package/dist/security/es6.classes.js +4 -0
  103. package/dist/security/es6.classes.js.map +1 -1
  104. package/dist/system/es6.classes.d.ts +4 -5
  105. package/dist/system/es6.classes.js +0 -2
  106. package/dist/system/es6.classes.js.map +1 -1
  107. package/dist/system/jobs/client.credential.job.js +15 -4
  108. package/dist/system/jobs/client.credential.job.js.map +1 -1
  109. package/dist/system/libraries/business.rule.query.evaluator.js +2 -35
  110. package/dist/system/libraries/business.rule.query.evaluator.js.map +1 -1
  111. package/dist/system/services/event.queue.service.js +2 -35
  112. package/dist/system/services/event.queue.service.js.map +1 -1
  113. package/docs/sentry-reporting.md +22 -13
  114. package/package.json +1 -1
  115. package/dist/config/entity.constants.d.ts +0 -171
  116. package/dist/config/entity.constants.js +0 -173
  117. package/dist/config/entity.constants.js.map +0 -1
  118. package/dist/platformUtility/services/es6.jobs.service.d.ts +0 -18
  119. package/dist/platformUtility/services/es6.jobs.service.js +0 -57
  120. package/dist/platformUtility/services/es6.jobs.service.js.map +0 -1
  121. package/dist/platformUtility/services/es6.service.d.ts +0 -10
  122. package/dist/platformUtility/services/es6.service.js +0 -41
  123. package/dist/platformUtility/services/es6.service.js.map +0 -1
  124. package/dist/system/services/es6.jobs.service.d.ts +0 -62
  125. package/dist/system/services/es6.jobs.service.js +0 -145
  126. package/dist/system/services/es6.jobs.service.js.map +0 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,135 @@
1
1
  # Changelog
2
2
 
3
+ ## 3.0.9
4
+
5
+ ### Added
6
+
7
+ - **`@CacheMethod()` — cache an async method's result through `CacheService` in one line.**
8
+ Replaces the hand-written get → miss → load → set block:
9
+
10
+ ```ts
11
+ @CacheMethod({ key: (identifier: string) => `inbound.webhook.${identifier}.key`, ttlMinutes: 10 })
12
+ protected async identifyWebhook(identifier: string): Promise<InboundWebhookEntity | null> {
13
+ return InboundWebhookEntity.findOne({ where: { identifier } });
14
+ }
15
+ ```
16
+
17
+ - hit → the cached value is returned without running the method (`0` / `false` / `''` count
18
+ as hits); an optional `hydrate: (raw) => MyEntity.create(raw)` restores class instances,
19
+ since cached values round-trip through JSON;
20
+ - miss → the method runs and a non-null result is cached for `ttlMinutes`; `null` /
21
+ `undefined` is not cached;
22
+ - `key` receives the method's arguments (type-checked against them) with `this` bound to the
23
+ instance; keys are the same strings `CacheService.get/set/delete` take, so existing
24
+ hand-written caches keep their entries and `cacheService.delete(key)` evicts;
25
+ - `CacheService` installs itself as the store (`CacheMethod.useCache(this)`), so the decorator
26
+ works on DI services and plain `new`-ed library classes alike. Without it (unit tests, apps
27
+ without `CacheService`) the method runs uncached; a failed cache write is logged and the
28
+ fresh result returned.
29
+
30
+ - **`@WhenColumnUpdated()` — the `isColumnUpdated` guard of a `CommonJob` database-event
31
+ handler as a decorator.**
32
+
33
+ ```ts
34
+ @WhenColumnUpdated(['active', 'deleted_at'])
35
+ async refreshCacheKey(evt: DatabaseEventDto<ClientCredentialEntity>) {
36
+ await this.clientCredentialService.setCredentialCache(evt.entity.identifier);
37
+ }
38
+ ```
39
+
40
+ - runs for inserts and for updates touching any listed column (exactly `isColumnUpdated`);
41
+ otherwise skipped, resolving to `undefined`; all arguments are forwarded;
42
+ - compile-time checked: only on `CommonJob` methods whose first parameter is a
43
+ `DatabaseEventDto<Entity>`, and every column must be a property of `Entity` (a typo fails
44
+ with `unknownColumns: "<name>"`); the `CommonJob` requirement is also enforced at class
45
+ definition.
46
+ - `ClientCredentialJob.refreshCacheKey` uses it.
47
+
48
+ - **`@WhenNewRecord()` — the `isNewRecord` guard as a decorator.** The method runs only for a
49
+ newly created record (no / empty `databaseEntity`); updates resolve to `undefined`. Same
50
+ compile-time and class-definition checks as `@WhenColumnUpdated()` (`CommonJob` methods,
51
+ first parameter a `DatabaseEventDto`). `ClientCredentialJob.setKey` uses it.
52
+
53
+ ### Changed
54
+
55
+ - **nu no longer ships generated registry files.** `LocalPropertyService` stops registering entities
56
+ from `config/entity.constants.ts`, and that file plus `platformUtility/` and
57
+ `system/services/es6.jobs.service.ts` (`Es6JobsService`) are gone: `PlatformRegistryService`
58
+ (3.0.8) derives the same entity and job hashes from TypeORM metadata and the Nest container.
59
+ `PlatformUtility.getEntity` / `getJob` / `getService` and `setEntities` / `setJobs` /
60
+ `setServices` are unchanged, so consumers that still register explicitly keep working.
61
+ - Generated with `@servicelabsco/slabs-dev-cli` ≥ 1.0.14, which stops emitting these files for any
62
+ repo on nu ≥ 3.0.8 and always emits the core `controllers` / `entities` / `jobs` / `services` /
63
+ `subscribers` keys in `es6.classes.ts`.
64
+
65
+ ### Fixed
66
+
67
+ - **`CommonSubscriber` no longer reports equal-but-differently-typed values as updated columns.**
68
+ TypeORM's `updatedColumns` normalises timestamps and json but compares everything else with
69
+ `===`; the re-check now compares by column type, reading the `ColumnMetadata` TypeORM passes
70
+ (no per-column `findColumnWithPropertyName` scan or `type.toString()`):
71
+ - decimals (`float`, `numeric`, `decimal`, `real`, ...) by value, rounded to `scale` when set —
72
+ `'12.50'` vs `12.5`, float noise below the scale; a `float` without a scale compared exactly
73
+ (previously `10 ** undefined` = `NaN`, so it was never normalised);
74
+ - integers (`Number`, `int`, `bigint`, ...) by value, BigInt-safe — `'5'` vs `5`, pg `bigint`
75
+ strings;
76
+ - booleans by the literals Postgres accepts — `'false'` / `'f'` / `0` vs `false`, `'yes'` / `1`
77
+ vs `true` (previously `'false'` counted as changed); an unrecognised value stays changed;
78
+ - `date` columns by calendar date — an ISO string or `Date` vs the stored `YYYY-MM-DD`.
79
+
80
+ Backward compatible: `float`, `Number` and `Boolean` columns (the types normalised before) keep
81
+ the `value || 0` / `value || false` rule exactly (`null` / `''` / `NaN` equal `0` / `false`);
82
+ newly normalised types treat `null` as distinct, and exact types beyond double precision are
83
+ compared as text. A differential run of old vs new over 3,336 value pairs across every column
84
+ type found no case where a column the old code treated as unchanged is now reported; every
85
+ difference is an equal value in another form. Any other column TypeORM reports (text,
86
+ timestamps, json, ...) is kept as before.
87
+
88
+ ## 3.0.8
89
+
90
+ ### Changed
91
+
92
+ - **The Sentry SDK is only loaded when Sentry is enabled for the process.** Every `@sentry/*`
93
+ import in the library is now type-only or lazy: calls go through the new `SentrySdk`
94
+ (`captureException` / `captureMessage` / `getIsolationScope`), which `require`s
95
+ `@sentry/node` on first use and is a no-op when Sentry is off (no `SENTRY_DSN`, or a worker
96
+ without `SENTRY_ENABLE_WORKER=true`) — the same outcome as calling an uninitialised SDK.
97
+ `initSentry()` and `SentryReportingModule.forRoot()` require the SDK only on the enabled path,
98
+ and `SentryReportingFilter` builds its `SentryGlobalFilter` subclass on first use. Measured in
99
+ fn-expense-services with Sentry off: **−17 MB heap, −21 MB RSS, 1,581 fewer modules** per
100
+ process.
101
+ - Specs that assert Sentry calls either set a file-scoped test DSN or mock `SentrySdk` directly.
102
+
103
+ ### Added
104
+
105
+ - **`PlatformRegistryService` — hash registries derived from the container, not generated files.**
106
+ `PlatformUtility.getEntity` / `getJob` / `getService` fall back to it when a hash was not
107
+ explicitly registered. The hashes are unchanged, derived by the same conventions `sc` uses:
108
+ - entity → `md5('<table>:<ClassName>')` from every TypeORM `DataSource`'s metadata;
109
+ - job → the `super('<hash>')` each `CommonJob` provider already carries (via Nest `DiscoveryService`);
110
+ - service → the hash carried by the `publicExposed` marker (`@PublicExposed('<hash>')` or
111
+ `protected publicExposed = '<hash>'`).
112
+
113
+ Explicit registrations (`entity.constants.ts`, `es6.jobs.service.ts`, `es6.service.ts`,
114
+ `set*`) still win, so consumers keep working unchanged and can drop those generated files once
115
+ `sc` stops producing them. Two classes on one entity hash (same table + class name): the
116
+ most-derived wins when one extends the other; unrelated ones keep the first and are logged.
117
+ Indexes are built lazily on first lookup (rebuilt on a miss until the app has bootstrapped) and
118
+ hold references only.
119
+ - `PublicExposed(exposed)` / `CommonService.publicExposed` accept the service hash as well as a
120
+ boolean; new `PublicExposed.hashOf()` (reads the class's own decorator, so a subclass does not
121
+ inherit its parent's hash). Preferred form for exposed services:
122
+ `@PublicExposed('<md5(module:ClassName)>')` in place of `protected publicExposed = true`.
123
+ nu's own `EmithookMailService` / `PdfService` are migrated, so nu's generated
124
+ `platformUtility/services/es6.service.ts` (`Es6Service`) is gone — both still resolve by the same hash.
125
+
126
+ - **Opt-in Sentry reporting for queue workers.** Set `SENTRY_ENABLE_WORKER=true` (exact value) on a
127
+ worker process and `initSentry()` initialises the SDK there too, with the same redacting options
128
+ as the API. Workers still report nothing by default. New `isSentryWorkerEnabled()` /
129
+ `SentryBootstrap.isWorkerEnabled()`. Consumers should import their `instrument.ts` from
130
+ `worker.ts` as well; it stays a no-op without the flag. See
131
+ [docs/sentry-reporting.md](docs/sentry-reporting.md) §5.
132
+
3
133
  ## 3.0.7
4
134
 
5
135
  ### Fixed
@@ -30,10 +30,12 @@ import { SocialService } from './services/social.service';
30
30
  import { UserService } from './services/user.service';
31
31
  declare const es6Classes: {
32
32
  controllers: (typeof AdminAuthController | typeof SocialController | typeof UserController)[];
33
- dtos: (typeof UserRolesAccessObjectDto | typeof SessionIdentifierAttributesDto | typeof PermissionAssignmentDto | typeof RoleAssignmentDto | typeof UserLoginDto | typeof CreateUserDto | typeof OfflineUserDto | typeof UpdateUserDto)[];
34
- entities: (typeof CreatorEntity | typeof CountryEntity | typeof UserReferralEntity | typeof DeviceTokenEntity | typeof RefreshTokenEntity | typeof SessionIdentifierEntity | typeof SocialIdentityEntity)[];
33
+ dtos: (typeof UserRolesAccessObjectDto | typeof PermissionAssignmentDto | typeof RoleAssignmentDto | typeof UserLoginDto | typeof SessionIdentifierAttributesDto | typeof CreateUserDto | typeof OfflineUserDto | typeof UpdateUserDto)[];
34
+ entities: (typeof CreatorEntity | typeof UserReferralEntity | typeof DeviceTokenEntity | typeof RefreshTokenEntity | typeof SessionIdentifierEntity | typeof SocialIdentityEntity | typeof CountryEntity)[];
35
35
  interfaces: any[];
36
+ jobs: any[];
36
37
  middlewares: (typeof BasicAuthMiddleware | typeof ClientConnectMiddleware | typeof InternalMiddleware | typeof JwtMiddleware | typeof RestrictedMiddleware)[];
37
38
  services: (typeof AccessService | typeof RefreshTokenService | typeof UserService | typeof AuthService | typeof DeviceTokenService | typeof SocialIdentityService | typeof SocialService)[];
39
+ subscribers: any[];
38
40
  };
39
41
  export default es6Classes;
@@ -58,8 +58,10 @@ const es6Classes = {
58
58
  user_referral_entity_1.UserReferralEntity,
59
59
  ],
60
60
  interfaces: [],
61
+ jobs: [],
61
62
  middlewares: [basic_auth_middleware_1.BasicAuthMiddleware, client_connect_middleware_1.ClientConnectMiddleware, internal_middleware_1.InternalMiddleware, jwt_middleware_1.JwtMiddleware, restricted_middleware_1.RestrictedMiddleware],
62
63
  services: [access_service_1.AccessService, auth_service_1.AuthService, device_token_service_1.DeviceTokenService, refresh_token_service_1.RefreshTokenService, social_identity_service_1.SocialIdentityService, social_service_1.SocialService, user_service_1.UserService],
64
+ subscribers: [],
63
65
  };
64
66
  exports.default = es6Classes;
65
67
  //# sourceMappingURL=es6.classes.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"es6.classes.js","sourceRoot":"","sources":["../../src/auth/es6.classes.ts"],"names":[],"mappings":";;AAAA,+EAA0E;AAC1E,uEAAmE;AACnE,mEAA+D;AAC/D,4DAAuD;AACvD,8DAAyD;AACzD,gFAA2E;AAC3E,oEAA+D;AAC/D,gGAA0F;AAC1F,4DAAuD;AACvD,4DAAuD;AACvD,oEAA+D;AAC/D,0DAAqD;AACrD,sFAA+E;AAC/E,8DAA0D;AAC1D,8DAA0D;AAC1D,wEAAmE;AACnE,0EAAqE;AACrE,oFAA+E;AAC/E,8EAAyE;AACzE,wDAAoD;AACpD,0EAAqE;AACrE,+EAA0E;AAC1E,uFAAkF;AAClF,2EAAuE;AACvE,iEAA6D;AAC7D,+EAA2E;AAC3E,8DAA0D;AAC1D,0DAAsD;AACtD,0EAAqE;AACrE,4EAAuE;AACvE,gFAA2E;AAC3E,8DAA0D;AAC1D,0DAAsD;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AEtD,MAAM,UAAU,GAAG;IACf,WAAW,EAAE,CAAC,2CAAmB,EAAE,oCAAgB,EAAE,gCAAc,CAAC;IACpE,IAAI,EAAE;QACF,+BAAa;QACb,iCAAc;QACd,mDAAuB;QACvB,uCAAiB;QACjB,kEAA8B;QAC9B,+BAAa;QACb,+BAAa;QACb,uCAAiB;QACjB,6BAAY;QACZ,uDAAwB;KAC3B;IACD,QAAQ,EAAE;QACN,8BAAa;QACb,8BAAa;QACb,uCAAiB;QACjB,yCAAkB;QAClB,mDAAuB;QACvB,6CAAoB;QACpB,wBAAU;QACV,yCAAkB;KACrB;IACD,UAAU,EAAE,EAAE;IACd,IAAI,EAAE,EAAE;IACR,WAAW,EAAE,CAAC,2CAAmB,EAAE,mDAAuB,EAAE,wCAAkB,EAAE,8BAAa,EAAE,4CAAoB,CAAC;IACpH,QAAQ,EAAE,CAAC,8BAAa,EAAE,0BAAW,EAAE,yCAAkB,EAAE,2CAAmB,EAAE,+CAAqB,EAAE,8BAAa,EAAE,0BAAW,CAAC;IAClI,WAAW,EAAE,EAAE;CAClB,CAAC;AAEF,kBAAe,UAAU,CAAC"}
@@ -1,48 +1,15 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
2
  var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
19
3
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
20
4
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
21
5
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
22
6
  return c > 3 && r && Object.defineProperty(target, key, r), r;
23
7
  };
24
- var __importStar = (this && this.__importStar) || (function () {
25
- var ownKeys = function(o) {
26
- ownKeys = Object.getOwnPropertyNames || function (o) {
27
- var ar = [];
28
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
29
- return ar;
30
- };
31
- return ownKeys(o);
32
- };
33
- return function (mod) {
34
- if (mod && mod.__esModule) return mod;
35
- var result = {};
36
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
37
- __setModuleDefault(result, mod);
38
- return result;
39
- };
40
- })();
41
8
  var DeviceTokenService_1;
42
9
  Object.defineProperty(exports, "__esModule", { value: true });
43
10
  exports.DeviceTokenService = void 0;
44
11
  const common_1 = require("@nestjs/common");
45
- const Sentry = __importStar(require("@sentry/node"));
12
+ const sentry_sdk_1 = require("../../common/libraries/sentry.sdk");
46
13
  const class_transformer_1 = require("class-transformer");
47
14
  const auth_1 = require("../../common/libraries/auth");
48
15
  const operation_exception_1 = require("../../common/exceptions/operation.exception");
@@ -68,7 +35,7 @@ let DeviceTokenService = DeviceTokenService_1 = class DeviceTokenService {
68
35
  }
69
36
  const message = lastError instanceof Error ? lastError.message : String(lastError);
70
37
  global.console.error(`setDeviceToken failed after ${DeviceTokenService_1.MAX_SAVE_ATTEMPTS} attempts (token=${body?.token}): ${message}`);
71
- Sentry.captureException(lastError, {
38
+ sentry_sdk_1.SentrySdk.captureException(lastError, {
72
39
  level: 'error',
73
40
  tags: { service: 'DeviceTokenService' },
74
41
  extra: { token: body?.token, attempts: DeviceTokenService_1.MAX_SAVE_ATTEMPTS },
@@ -1 +1 @@
1
- {"version":3,"file":"device.token.service.js","sourceRoot":"","sources":["../../../src/auth/services/device.token.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAA4C;AAC5C,qDAAuC;AACvC,yDAA0D;AAC1D,sDAAmD;AACnD,qFAAiF;AACjF,gEAA4D;AAC5D,8EAA0E;AAC1E,yEAAoE;AAS7D,IAAM,kBAAkB,0BAAxB,MAAM,kBAAkB;IAyB3B,KAAK,CAAC,cAAc,CAAC,GAAQ,EAAE,IAAuB;QAClD,IAAI,SAAc,CAAC;QAEnB,KAAK,IAAI,OAAO,GAAG,CAAC,EAAE,OAAO,GAAG,oBAAkB,CAAC,iBAAiB,EAAE,OAAO,EAAE,EAAE,CAAC;YAC9E,IAAI,CAAC;gBACD,OAAO,MAAM,IAAI,CAAC,sBAAsB,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;YACxD,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACb,SAAS,GAAG,KAAK,CAAC;gBAElB,MAAM,MAAM,GAAG,OAAO,KAAK,oBAAkB,CAAC,iBAAiB,GAAG,CAAC,CAAC;gBACpE,IAAI,MAAM;oBAAE,MAAM;gBAIlB,MAAM,IAAI,GAAG,oBAAkB,CAAC,oBAAoB,GAAG,CAAC,IAAI,OAAO,CAAC;gBACpE,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,IAAI,CAAC,CAAC;gBAChD,MAAM,kCAAe,CAAC,KAAK,CAAC,IAAI,GAAG,MAAM,CAAC,CAAC;YAC/C,CAAC;QACL,CAAC;QAED,MAAM,OAAO,GAAG,SAAS,YAAY,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;QACnF,MAAM,CAAC,OAAO,CAAC,KAAK,C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,MAAM,CAAC,OAAO,GAAG,aAAa,IAAI,IAAI,CAAC;QACvC,MAAM,CAAC,oBAAoB,GAAG,oBAAQ,CAAC,WAAW,EAAE,CAAC;QAErD,MAAM,MAAM,CAAC,IAAI,EAAE,CAAC;QAEpB,OAAO,MAAM,CAAC;IAClB,CAAC;;AAtHQ,gDAAkB;AAKH,oCAAiB,GAAG,CAAC,AAAJ,CAAK;AAKtB,uCAAoB,GAAG,EAAE,AAAL,CAAM;6BAVzC,kBAAkB;IAD9B,IAAA,mBAAU,GAAE;GACA,kBAAkB,CAuH9B"}
@@ -0,0 +1,11 @@
1
+ import type { MethodCacheInterface } from '../interfaces/method.cache.interface';
2
+ export interface CacheMethodOptions<A extends any[] = any[], R = any> {
3
+ key: (this: any, ...args: A) => string;
4
+ ttlMinutes: number;
5
+ hydrate?: (raw: any) => R;
6
+ }
7
+ export declare function CacheMethod<A extends any[], R>(options: CacheMethodOptions<A, R>): (_target: object, _propertyKey: string | symbol, descriptor: TypedPropertyDescriptor<(...args: A) => Promise<R>>) => TypedPropertyDescriptor<(...args: A) => Promise<R>>;
8
+ export declare namespace CacheMethod {
9
+ var useCache: (cache?: MethodCacheInterface) => void;
10
+ }
11
+ export { CacheMethod as CacheMethodDecorator };
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CacheMethod = CacheMethod;
4
+ exports.CacheMethodDecorator = CacheMethod;
5
+ const custom_logger_1 = require("../libraries/custom.logger");
6
+ let store;
7
+ function CacheMethod(options) {
8
+ if (!(options.ttlMinutes > 0))
9
+ throw new Error(`@CacheMethod: ttlMinutes must be > 0, got ${options.ttlMinutes}`);
10
+ return (_target, _propertyKey, descriptor) => {
11
+ const original = descriptor.value;
12
+ descriptor.value = async function (...args) {
13
+ const cache = store;
14
+ if (!cache)
15
+ return original.apply(this, args);
16
+ const key = options.key.apply(this, args);
17
+ const cached = await cache.get(key, null);
18
+ if (cached !== null && cached !== undefined)
19
+ return options.hydrate ? options.hydrate(cached) : cached;
20
+ const result = await original.apply(this, args);
21
+ if (result === null || result === undefined)
22
+ return result;
23
+ try {
24
+ await cache.set(key, result, new Date(Date.now() + options.ttlMinutes * 60_000));
25
+ }
26
+ catch (error) {
27
+ custom_logger_1.CustomLogger.error(`@CacheMethod: caching failed for key=${key}; returning uncached result`, error);
28
+ }
29
+ return result;
30
+ };
31
+ return descriptor;
32
+ };
33
+ }
34
+ CacheMethod.useCache = (cache) => {
35
+ store = cache;
36
+ };
37
+ //# sourceMappingURL=cache.method.decorator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cache.method.decorator.js","sourceRoot":"","sources":["../../../src/common/decorators/cache.method.decorator.ts"],"names":[],"mappings":";;AAqDA,kCAiCC;AAauB,2CAAoB;AAnG5C,8DAA0D;AAuB1D,IAAI,KAAuC,CAAC;AA8B5C,SAAgB,WAAW,CAAqB,OAAiC;IAC7E,IAAI,CAAC,CAAC,OAAO,CAAC,UAAU,GAAG,CAAC,CAAC;QAAE,MAAM,IAAI,KAAK,CAAC,6CAA6C,OAAO,CAAC,UAAU,EAAE,CAAC,CAAC;IAElH,OAAO,CACH,OAAe,EACf,YAA6B,EAC7B,UAA+D,EACZ,EAAE;QACrD,MAAM,QAAQ,GAAG,UAAU,CAAC,KAAK,CAAC;QAElC,UAAU,CAAC,KAAK,GAAG,KAAK,WAAsB,GAAG,IAAO;YACpD,MAAM,KAAK,GAAG,KAAK,CAAC;YACpB,IAAI,CAAC,KAAK;gBAAE,OAAO,QAAQ,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;YAE9C,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;YAE1C,MAAM,MAAM,GAAG,MAAM,KAAK,CAAC,GAAG,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;YAC1C,IAAI,MAAM,KAAK,IAAI,IAAI,MAAM,KAAK,SAAS;gBAAE,OAAO,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;YAEvG,MAAM,MAAM,GAAG,MAAM,QAAQ,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;YAChD,IAAI,MAAM,KAAK,IAAI,IAAI,MAAM,KAAK,SAAS;gBAAE,OAAO,MAAM,CAAC;YAE3D,IAAI,CAAC;gBACD,MAAM,KAAK,CAAC,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,OAAO,CAAC,UAAU,GAAG,MAAM,CAAC,CAAC,CAAC;YACrF,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACb,4BAAY,CAAC,KAAK,CAAC,wCAAwC,GAAG,6BAA6B,EAAE,KAAK,CAAC,CAAC;YACxG,CAAC;YAED,OAAO,MAAM,CAAC;QAClB,CAAC,CAAC;QAEF,OAAO,UAAU,CAAC;IACtB,CAAC,CAAC;AACN,CAAC;AAQD,WAAW,CAAC,QAAQ,GAAG,CAAC,KAA4B,EAAQ,EAAE;IAC1D,KAAK,GAAG,KAAK,CAAC;AAClB,CAAC,CAAC"}
@@ -1 +1,4 @@
1
+ export * from './cache.method.decorator';
1
2
  export * from './public.exposed.decorator';
3
+ export * from './when.column.updated.decorator';
4
+ export * from './when.new.record.decorator';
@@ -14,5 +14,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./cache.method.decorator"), exports);
17
18
  __exportStar(require("./public.exposed.decorator"), exports);
19
+ __exportStar(require("./when.column.updated.decorator"), exports);
20
+ __exportStar(require("./when.new.record.decorator"), exports);
18
21
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/common/decorators/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6DAA0C"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/common/decorators/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2DAAyC;AAAA,6DAA2C;AAAA,kEAAgD;AAAA,8DAA2C"}
@@ -1,6 +1,7 @@
1
1
  import 'reflect-metadata';
2
- export declare function PublicExposed(exposed?: boolean): ClassDecorator;
2
+ export declare function PublicExposed(exposed?: boolean | string): ClassDecorator;
3
3
  export declare namespace PublicExposed {
4
4
  var isPublic: (target: any) => boolean;
5
+ var hashOf: (target: any) => string | undefined;
5
6
  }
6
7
  export { PublicExposed as PublicExposedDecorator };
@@ -4,20 +4,35 @@ exports.PublicExposed = PublicExposed;
4
4
  exports.PublicExposedDecorator = PublicExposed;
5
5
  require("reflect-metadata");
6
6
  const PUBLIC_EXPOSED_METADATA = 'slnu:public_exposed';
7
+ const SERVICE_HASH_PATTERN = /^[0-9a-f]{32}$/;
7
8
  function PublicExposed(exposed = true) {
8
9
  return (target) => {
9
10
  Reflect.defineMetadata(PUBLIC_EXPOSED_METADATA, exposed, target);
10
11
  target.prototype.publicExposed = exposed;
11
12
  };
12
13
  }
13
- PublicExposed.isPublic = (target) => {
14
+ const markerOf = (target) => {
14
15
  if (target === null || target === undefined)
15
- return false;
16
+ return undefined;
16
17
  const constructor = typeof target === 'function' ? target : target.constructor;
17
- if (constructor && Reflect.getMetadata(PUBLIC_EXPOSED_METADATA, constructor) === true) {
18
- return true;
19
- }
18
+ const metadata = constructor ? Reflect.getMetadata(PUBLIC_EXPOSED_METADATA, constructor) : undefined;
19
+ if (metadata !== undefined && metadata !== false)
20
+ return metadata;
20
21
  const flagHolder = typeof target === 'function' ? target.prototype : target;
21
- return flagHolder?.publicExposed === true;
22
+ return flagHolder?.publicExposed;
23
+ };
24
+ PublicExposed.isPublic = (target) => {
25
+ const marker = markerOf(target);
26
+ return marker === true || (typeof marker === 'string' && SERVICE_HASH_PATTERN.test(marker));
27
+ };
28
+ PublicExposed.hashOf = (target) => {
29
+ if (target === null || target === undefined)
30
+ return undefined;
31
+ const constructor = typeof target === 'function' ? target : target.constructor;
32
+ const decorated = constructor ? Reflect.getOwnMetadata(PUBLIC_EXPOSED_METADATA, constructor) : undefined;
33
+ const holder = typeof target === 'function' ? target.prototype : target;
34
+ const legacy = holder && Object.prototype.hasOwnProperty.call(holder, 'publicExposed') ? holder.publicExposed : undefined;
35
+ const marker = decorated !== undefined ? decorated : legacy;
36
+ return typeof marker === 'string' && SERVICE_HASH_PATTERN.test(marker) ? marker : undefined;
22
37
  };
23
38
  //# sourceMappingURL=public.exposed.decorator.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"public.exposed.decorator.js","sourceRoot":"","sources":["../../../src/common/decorators/public.exposed.decorator.ts"],"names":[],"mappings":";;AA6BA,sCASC;AA6ByB,+CAAsB;AAnEhD,4BAA0B;AAM1B,MAAM,uBAAuB,GAAG,qBAAqB,CAAC;AAuBtD,SAAgB,aAAa,CAAC,OAAO,GAAG,IAAI;IACxC,OAAO,CAAC,MAAM,EAAE,EAAE;QACd,OAAO,CAAC,cAAc,CAAC,uBAAuB,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;QAKhE,MAAc,CAAC,SAAS,CAAC,aAAa,GAAG,OAAO,CAAC;IACtD,CAAC,CAAC;AACN,CAAC;AAYD,aAAa,CAAC,QAAQ,GAAG,CAAC,MAAW,EAAW,EAAE;IAC9C,IAAI,MAAM,KAAK,IAAI,IAAI,MAAM,KAAK,SAAS;QAAE,OAAO,KAAK,CAAC;IAE1D,MAAM,WAAW,GAAG,OAAO,MAAM,KAAK,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,WAAW,CAAC;IAE/E,IAAI,WAAW,IAAI,OAAO,CAAC,WAAW,CAAC,uBAAuB,E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AC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC;AAChG,CAAC,CAAC"}
@@ -0,0 +1,8 @@
1
+ import type { DatabaseEventDto } from '../dtos/database.event.dto';
2
+ import { CommonJob } from '../libraries/common.job';
3
+ type DatabaseEventMethod<E> = (evt: DatabaseEventDto<E>, ...rest: any[]) => Promise<any>;
4
+ type KnownColumns<E, C extends string> = [Exclude<C, keyof E>] extends [never] ? unknown : {
5
+ unknownColumns: Exclude<C, keyof E>;
6
+ };
7
+ export declare function WhenColumnUpdated<C extends string>(columns: C | C[]): <E>(target: CommonJob, propertyKey: string | symbol, descriptor: TypedPropertyDescriptor<DatabaseEventMethod<E>> & KnownColumns<E, C>) => void;
8
+ export { WhenColumnUpdated as WhenColumnUpdatedDecorator };
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.WhenColumnUpdated = WhenColumnUpdated;
4
+ exports.WhenColumnUpdatedDecorator = WhenColumnUpdated;
5
+ const common_job_1 = require("../libraries/common.job");
6
+ function WhenColumnUpdated(columns) {
7
+ const list = Array.isArray(columns) ? columns : [columns];
8
+ if (!list.length)
9
+ throw new Error('@WhenColumnUpdated: pass at least one column');
10
+ return (target, propertyKey, descriptor) => {
11
+ if (!(target instanceof common_job_1.CommonJob)) {
12
+ throw new Error(`@WhenColumnUpdated: ${String(propertyKey)} must be a method of a CommonJob subclass`);
13
+ }
14
+ const original = descriptor.value;
15
+ descriptor.value = async function (evt, ...rest) {
16
+ if (!this['isColumnUpdated'](evt, list))
17
+ return undefined;
18
+ return original.apply(this, [evt, ...rest]);
19
+ };
20
+ };
21
+ }
22
+ //# sourceMappingURL=when.column.updated.decorator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"when.column.updated.decorator.js","sourceRoot":"","sources":["../../../src/common/decorators/when.column.updated.decorator.ts"],"names":[],"mappings":";;AAuCA,8CAqBC;AAG6B,uDAA0B;AA9DxD,wDAAoD;AAsCpD,SAAgB,iBAAiB,CAAmB,OAAgB;IAChE,MAAM,IAAI,GAAa,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC;IACpE,IAAI,CAAC,IAAI,CAAC,MAAM;QAAE,MAAM,IAAI,KAAK,CAAC,8CAA8C,CAAC,CAAC;IAElF,OAAO,CACH,MAAiB,EACjB,WAA4B,EAC5B,UAAgF,EAC5E,EAAE;QACN,IAAI,CAAC,CAAC,MAAM,YAAY,sBAAS,CAAC,EAAE,CAAC;YACjC,MAAM,IAAI,KAAK,CAAC,uBAAuB,MAAM,CAAC,WAAW,CAAC,2CAA2C,CAAC,CAAC;QAC3G,CAAC;QAED,MAAM,QAAQ,GAAG,UAAU,CAAC,KAAK,CAAC;QAElC,UAAU,CAAC,KAAK,GAAG,KAAK,WAA4B,GAAwB,EAAE,GAAG,IAAW;YACxF,IAAI,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC,GAAG,EAAE,IAAI,CAAC;gBAAE,OAAO,SAAS,CAAC;YAE1D,OAAO,QAAQ,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,CAAC,CAAC;QAChD,CAAC,CAAC;IACN,CAAC,CAAC;AACN,CAAC"}
@@ -0,0 +1,5 @@
1
+ import type { DatabaseEventDto } from '../dtos/database.event.dto';
2
+ import { CommonJob } from '../libraries/common.job';
3
+ type DatabaseEventMethod<E> = (evt: DatabaseEventDto<E>, ...rest: any[]) => Promise<any>;
4
+ export declare function WhenNewRecord(): <E>(target: CommonJob, propertyKey: string | symbol, descriptor: TypedPropertyDescriptor<DatabaseEventMethod<E>>) => void;
5
+ export { WhenNewRecord as WhenNewRecordDecorator };
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.WhenNewRecord = WhenNewRecord;
4
+ exports.WhenNewRecordDecorator = WhenNewRecord;
5
+ const common_job_1 = require("../libraries/common.job");
6
+ function WhenNewRecord() {
7
+ return (target, propertyKey, descriptor) => {
8
+ if (!(target instanceof common_job_1.CommonJob)) {
9
+ throw new Error(`@WhenNewRecord: ${String(propertyKey)} must be a method of a CommonJob subclass`);
10
+ }
11
+ const original = descriptor.value;
12
+ descriptor.value = async function (evt, ...rest) {
13
+ if (!this['isNewRecord'](evt))
14
+ return undefined;
15
+ return original.apply(this, [evt, ...rest]);
16
+ };
17
+ };
18
+ }
19
+ //# sourceMappingURL=when.new.record.decorator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"when.new.record.decorator.js","sourceRoot":"","sources":["../../../src/common/decorators/when.new.record.decorator.ts"],"names":[],"mappings":";;AA6BA,sCAcC;AAGyB,+CAAsB;AA7ChD,wDAAoD;AA4BpD,SAAgB,aAAa;IACzB,OAAO,CAAI,MAAiB,EAAE,WAA4B,EAAE,UAA2D,EAAQ,EAAE;QAC7H,IAAI,CAAC,CAAC,MAAM,YAAY,sBAAS,CAAC,EAAE,CAAC;YACjC,MAAM,IAAI,KAAK,CAAC,mBAAmB,MAAM,CAAC,WAAW,CAAC,2CAA2C,CAAC,CAAC;QACvG,CAAC;QAED,MAAM,QAAQ,GAAG,UAAU,CAAC,KAAK,CAAC;QAElC,UAAU,CAAC,KAAK,GAAG,KAAK,WAA4B,GAAwB,EAAE,GAAG,IAAW;YACxF,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,GAAG,CAAC;gBAAE,OAAO,SAAS,CAAC;YAEhD,OAAO,QAAQ,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,CAAC,CAAC;QAChD,CAAC,CAAC;IACN,CAAC,CAAC;AACN,CAAC"}
@@ -1,5 +1,7 @@
1
1
  import { RedisIoAdapter } from './adapters/redis.io.adapter';
2
+ import { CacheMethodDecorator } from './decorators/cache.method.decorator';
2
3
  import { PublicExposedDecorator } from './decorators/public.exposed.decorator';
4
+ import { WhenColumnUpdatedDecorator } from './decorators/when.column.updated.decorator';
3
5
  import { AggregationParamDto } from './dtos/aggregation.param.dto';
4
6
  import { CaptureRecordIndexDto } from './dtos/capture.record.index.dto';
5
7
  import { CaptureRecordShowDto } from './dtos/capture.record.show.dto';
@@ -43,9 +45,13 @@ declare const es6Classes: {
43
45
  DEFAULT_ADMIN: number;
44
46
  INTERNAL: number;
45
47
  })[];
46
- decorators: (typeof PublicExposedDecorator)[];
48
+ controllers: any[];
49
+ decorators: (typeof CacheMethodDecorator | typeof PublicExposedDecorator | typeof WhenColumnUpdatedDecorator)[];
47
50
  dtos: (typeof MetaDataDto | typeof DatabaseEventDto | typeof LayoutColumnDbDto | typeof GenericIndexParamDto | typeof RecordDataManagerDto | typeof RecordTabDto | typeof AggregationParamDto | typeof GroupParamDto | typeof ReportBodyDto | typeof ReportDataManagerDto | typeof CaptureRecordIndexDto | typeof CaptureRecordShowDto | typeof ForeignMigrationDto | typeof GenericShowParamDto | typeof IndexColumnDto | typeof JsonFieldConditionDto | typeof KeyValueParamDto | typeof RenameColumnDto)[];
51
+ entities: any[];
48
52
  exceptions: (typeof NoLoggedUserException)[];
53
+ interfaces: any[];
54
+ jobs: any[];
49
55
  libraries: (typeof CommonJob | typeof CachedProperty | typeof GenericIndexParser | typeof GenericShowParser | typeof DataManager | typeof ListManager | typeof RecordManager | typeof ReportDataManager | typeof ReportListManager | {
50
56
  register(entity: new (...args: any[]) => any, job: new (...args: any[]) => any): void;
51
57
  jobsFor(entity: new (...args: any[]) => any): (new (...args: any[]) => any)[];
@@ -53,5 +59,7 @@ declare const es6Classes: {
53
59
  size(): number;
54
60
  clear(): void;
55
61
  } | typeof BaseMigrationUtility | typeof CommonConsumer | typeof DatabaseEventEvaluator | typeof Money | typeof SeederUtility)[];
62
+ services: any[];
63
+ subscribers: any[];
56
64
  };
57
65
  export default es6Classes;
@@ -3,7 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const redis_io_adapter_1 = require("./adapters/redis.io.adapter");
4
4
  const role_constants_1 = require("./constants/role.constants");
5
5
  const user_constants_1 = require("./constants/user.constants");
6
+ const cache_method_decorator_1 = require("./decorators/cache.method.decorator");
6
7
  const public_exposed_decorator_1 = require("./decorators/public.exposed.decorator");
8
+ const when_column_updated_decorator_1 = require("./decorators/when.column.updated.decorator");
9
+ const when_new_record_decorator_1 = require("./decorators/when.new.record.decorator");
7
10
  const aggregation_param_dto_1 = require("./dtos/aggregation.param.dto");
8
11
  const capture_record_index_dto_1 = require("./dtos/capture.record.index.dto");
9
12
  const capture_record_show_dto_1 = require("./dtos/capture.record.show.dto");
@@ -65,11 +68,13 @@ const report_data_manager_1 = require("./libraries/report.data.manager");
65
68
  const report_list_manager_1 = require("./libraries/report.list.manager");
66
69
  const reverse_migration_utility_1 = require("./libraries/reverse.migration.utility");
67
70
  const seeder_utility_1 = require("./libraries/seeder.utility");
71
+ const sentry_sdk_1 = require("./libraries/sentry.sdk");
68
72
  const subscriber_registry_1 = require("./libraries/subscriber.registry");
69
73
  const es6Classes = {
70
74
  adapters: [redis_io_adapter_1.RedisIoAdapter],
71
75
  constants: [role_constants_1.RoleConstants, user_constants_1.UserConstants],
72
- decorators: [public_exposed_decorator_1.PublicExposedDecorator],
76
+ controllers: [],
77
+ decorators: [cache_method_decorator_1.CacheMethodDecorator, public_exposed_decorator_1.PublicExposedDecorator, when_column_updated_decorator_1.WhenColumnUpdatedDecorator, when_new_record_decorator_1.WhenNewRecordDecorator],
73
78
  dtos: [
74
79
  aggregation_param_dto_1.AggregationParamDto,
75
80
  capture_record_index_dto_1.CaptureRecordIndexDto,
@@ -93,6 +98,7 @@ const es6Classes = {
93
98
  report_body_dto_1.ReportBodyDto,
94
99
  report_data_manager_dto_1.ReportDataManagerDto,
95
100
  ],
101
+ entities: [],
96
102
  exceptions: [
97
103
  access_exception_1.AccessException,
98
104
  form_exception_1.FormException,
@@ -102,6 +108,8 @@ const es6Classes = {
102
108
  subscription_exception_1.SubscriptionException,
103
109
  too_many_attempts_exception_1.TooManyAttemptsException,
104
110
  ],
111
+ interfaces: [],
112
+ jobs: [],
105
113
  libraries: [
106
114
  auth_1.Auth,
107
115
  base_migration_utility_1.BaseMigrationUtility,
@@ -136,8 +144,11 @@ const es6Classes = {
136
144
  report_list_manager_1.ReportListManager,
137
145
  reverse_migration_utility_1.ReverseMigrationUtility,
138
146
  seeder_utility_1.SeederUtility,
147
+ sentry_sdk_1.SentrySdk,
139
148
  subscriber_registry_1.SubscriberRegistry,
140
149
  ],
150
+ services: [],
151
+ subscribers: [],
141
152
  };
142
153
  exports.default = es6Classes;
143
154
  //# sourceMappingURL=es6.classes.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"es6.classes.js","sourceRoot":"","sources":["../../src/common/es6.classes.ts"],"names":[],"mappings":";;AAAA,kEAA6D;AAC7D,+DAA2D;AAC3D,+DAA2D;AAC3D,oFAA+E;AAC/E,wEAAmE;AACnE,8EAAwE;AACxE,4EAAsE;AACtE,kEAA6D;AAC7D,wEAAmE;AACnE,4EAAsE;AACtE,0EAAoE;AACpE,4DAAuD;AACvD,8DAAyD;AACzD,8DAAyD;AACzD,oFAA8E;AAC9E,8EAAwE;AACxE,oEAA8D;AAC9D,oEAA8D;AAC9D,sEAAgE;AAChE,wDAAmD;AACnD,4EAAsE;AACtE,0DAAqD;AACrD,gEAA2D;AAC3D,4DAAuD;AACvD,4EAAsE;AACtE,oEAAgE;AAChE,gEAA4D;AAC5D,8EAA0E;AAC1E,oFAA8E;AAC9E,0EAAsE;AACtE,gFAA4E;AAC5E,0FAAoF;AACpF,2CAAwC;AACxC,+EAA0E;AAC1E,iEAA6D;AAC7D,2DAAuD;AACvD,iEAA6D;AAC7D,6DAAyD;AACzD,uDAAmD;AACnD,qEAAgE;AAChE,yEAAoE;AACpE,+DAA2D;AAC3D,qEAAiE;AACjE,2DAAuD;AACvD,6DAAyD;AACzD,2DAAuD;AACvD,mFAA8E;AAC9E,qDAAiD;AACjD,uFA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,uCAAiB;QACjB,uCAAiB;QACjB,mDAAuB;QACvB,8BAAa;QACb,wCAAkB;KACrB;CACJ,CAAC;AAEF,kBAAe,UAAU,CAAC"}
1
+ {"version":3,"file":"es6.classes.js","sourceRoot":"","sources":["../../src/common/es6.classes.ts"],"names":[],"mappings":";;AAAA,kEAA6D;AAC7D,+DAA2D;AAC3D,+DAA2D;AAC3D,gFAA2E;AAC3E,oFAA+E;AAC/E,8FAAwF;AACxF,sFAAgF;AAChF,wEAAmE;AACnE,8EAAwE;AACxE,4EAAsE;AACtE,kEAA6D;AAC7D,wEAAmE;AACnE,4EAAsE;AACtE,0EAAoE;AACpE,4DAAuD;AACvD,8DAAyD;AACzD,8DAAyD;AACzD,oFAA8E;AAC9E,8EAAwE;AACxE,oEAA8D;AAC9D,oEAA8D;AAC9D,sEAAgE;AAChE,wDAAmD;AACnD,4EAAsE;AACtE,0DAAqD;AACrD,gEAA2D;AAC3D,4DAAuD;AACvD,4EAAsE;AACtE,oEAAgE;AAChE,gEAA4D;AAC5D,8EAA0E;AAC1E,oFAA8E;AAC9E,0EAAsE;AACtE,gFAA4E;AAC5E,0FAAoF;AACpF,2CAAwC;AACxC,+EAA0E;AAC1E,iEAA6D;AAC7D,2DAAuD;AACvD,iEAA6D;AAC7D,6DAAyD;AACzD,uDAAmD;AACnD,qEAAgE;AAChE,yEAAoE;AACpE,+DAA2D;AAC3D,qEAAiE;AACjE,2DAAuD;AACvD,6DAAyD;AACzD,2DAAuD;AACvD,mFAA8E;AAC9E,qDAAiD;AACjD,uFAAkF;AAClF,mEAA+D;AAC/D,2EAAsE;AACtE,yEAAoE;AACpE,2CAAwC;AACxC,+DAA2D;AAC3D,2DAAuD;AACvD,2DAAuD;AACvD,qEAAiE;AACjE,6CAA0C;AAC1C,mEAA+D;AAC/D,+DAA2D;AAC3D,uEAAkE;AAClE,yEAAoE;AACpE,yEAAoE;AACpE,qFAAgF;AAChF,+DAA2D;AAC3D,uDAAmD;AACnD,yEAAqE;AAErE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,EAAE;CAClB,CAAC;AAEF,kBAAe,UAAU,CAAC"}
@@ -3,5 +3,6 @@ export * from './constants';
3
3
  export * from './decorators';
4
4
  export * from './dtos';
5
5
  export * from './exceptions';
6
+ export * from './interfaces';
6
7
  export * from './libraries';
7
8
  export * from './common.module';
@@ -19,6 +19,7 @@ __exportStar(require("./constants"), exports);
19
19
  __exportStar(require("./decorators"), exports);
20
20
  __exportStar(require("./dtos"), exports);
21
21
  __exportStar(require("./exceptions"), exports);
22
+ __exportStar(require("./interfaces"), exports);
22
23
  __exportStar(require("./libraries"), exports);
23
24
  __exportStar(require("./common.module"), exports);
24
25
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/common/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6CAA2B;AAAA,8CAA4B;AAAA,+CAA6B;AAAA,yCAAuB;AAAA,+CAA6B;AAAA,8CAA4B;AAAA,kDAA+B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/common/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6CAA2B;AAAA,8CAA4B;AAAA,+CAA6B;AAAA,yCAAuB;AAAA,+CAA6B;AAAA,+CAA6B;AAAA,8CAA4B;AAAA,kDAA+B"}
@@ -0,0 +1,3 @@
1
+ export * from './method.cache.interface';
2
+ export * from './platform.registry.resolver.interface';
3
+ export * from './updated.column.interface';
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./method.cache.interface"), exports);
18
+ __exportStar(require("./platform.registry.resolver.interface"), exports);
19
+ __exportStar(require("./updated.column.interface"), exports);
20
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/common/interfaces/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2DAAyC;AAAA,yEAAuD;AAAA,6DAA0C"}
@@ -0,0 +1,4 @@
1
+ export interface MethodCacheInterface {
2
+ get(key: string, defaultValue?: any): Promise<any>;
3
+ set(key: string, value: any, expiresAt?: Date): Promise<any>;
4
+ }