@nmshd/runtime 2.8.2 → 2.9.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 (68) hide show
  1. package/dist/Runtime.js +7 -0
  2. package/dist/Runtime.js.map +1 -1
  3. package/dist/buildInformation.js +5 -5
  4. package/dist/extensibility/ConsumptionServices.d.ts +3 -2
  5. package/dist/extensibility/ConsumptionServices.js +5 -2
  6. package/dist/extensibility/ConsumptionServices.js.map +1 -1
  7. package/dist/extensibility/facades/consumption/NotificationsFacade.d.ts +18 -0
  8. package/dist/extensibility/facades/consumption/NotificationsFacade.js +61 -0
  9. package/dist/extensibility/facades/consumption/NotificationsFacade.js.map +1 -0
  10. package/dist/extensibility/facades/consumption/index.d.ts +1 -0
  11. package/dist/extensibility/facades/consumption/index.js +1 -0
  12. package/dist/extensibility/facades/consumption/index.js.map +1 -1
  13. package/dist/modules/NotificationModule.d.ts +8 -0
  14. package/dist/modules/NotificationModule.js +47 -0
  15. package/dist/modules/NotificationModule.js.map +1 -0
  16. package/dist/modules/index.d.ts +1 -0
  17. package/dist/modules/index.js +1 -0
  18. package/dist/modules/index.js.map +1 -1
  19. package/dist/types/consumption/LocalNotificationDTO.d.ts +15 -0
  20. package/dist/types/consumption/LocalNotificationDTO.js +3 -0
  21. package/dist/types/consumption/LocalNotificationDTO.js.map +1 -0
  22. package/dist/types/consumption/index.d.ts +1 -0
  23. package/dist/types/consumption/index.js +1 -0
  24. package/dist/types/consumption/index.js.map +1 -1
  25. package/dist/useCases/common/RuntimeErrors.d.ts +7 -0
  26. package/dist/useCases/common/RuntimeErrors.js +12 -0
  27. package/dist/useCases/common/RuntimeErrors.js.map +1 -1
  28. package/dist/useCases/common/Schemas.d.ts +5 -0
  29. package/dist/useCases/common/Schemas.js +122 -3
  30. package/dist/useCases/common/Schemas.js.map +1 -1
  31. package/dist/useCases/common/validation/ValidatableStrings.d.ts +4 -0
  32. package/dist/useCases/consumption/attributes/DeleteAttribute.js.map +1 -1
  33. package/dist/useCases/consumption/attributes/GetAttribute.js.map +1 -1
  34. package/dist/useCases/consumption/attributes/SucceedAttribute.js.map +1 -1
  35. package/dist/useCases/consumption/index.d.ts +1 -0
  36. package/dist/useCases/consumption/index.js +1 -0
  37. package/dist/useCases/consumption/index.js.map +1 -1
  38. package/dist/useCases/consumption/notifications/GetNotification.d.ts +16 -0
  39. package/dist/useCases/consumption/notifications/GetNotification.js +48 -0
  40. package/dist/useCases/consumption/notifications/GetNotification.js.map +1 -0
  41. package/dist/useCases/consumption/notifications/GetNotifications.d.ts +15 -0
  42. package/dist/useCases/consumption/notifications/GetNotifications.js +40 -0
  43. package/dist/useCases/consumption/notifications/GetNotifications.js.map +1 -0
  44. package/dist/useCases/consumption/notifications/NotificationMapper.d.ts +6 -0
  45. package/dist/useCases/consumption/notifications/NotificationMapper.js +25 -0
  46. package/dist/useCases/consumption/notifications/NotificationMapper.js.map +1 -0
  47. package/dist/useCases/consumption/notifications/ProcessNotificationById.d.ts +16 -0
  48. package/dist/useCases/consumption/notifications/ProcessNotificationById.js +49 -0
  49. package/dist/useCases/consumption/notifications/ProcessNotificationById.js.map +1 -0
  50. package/dist/useCases/consumption/notifications/ProcessOpenNotifactionsReceivedByCurrentDevice.d.ts +8 -0
  51. package/dist/useCases/consumption/notifications/ProcessOpenNotifactionsReceivedByCurrentDevice.js +35 -0
  52. package/dist/useCases/consumption/notifications/ProcessOpenNotifactionsReceivedByCurrentDevice.js.map +1 -0
  53. package/dist/useCases/consumption/notifications/ReceivedNotification.d.ts +18 -0
  54. package/dist/useCases/consumption/notifications/ReceivedNotification.js +60 -0
  55. package/dist/useCases/consumption/notifications/ReceivedNotification.js.map +1 -0
  56. package/dist/useCases/consumption/notifications/SentNotification.d.ts +18 -0
  57. package/dist/useCases/consumption/notifications/SentNotification.js +60 -0
  58. package/dist/useCases/consumption/notifications/SentNotification.js.map +1 -0
  59. package/dist/useCases/consumption/notifications/index.d.ts +6 -0
  60. package/dist/useCases/consumption/notifications/index.js +23 -0
  61. package/dist/useCases/consumption/notifications/index.js.map +1 -0
  62. package/dist/useCases/transport/messages/GetAttachmentMetadata.js +1 -1
  63. package/dist/useCases/transport/messages/GetAttachmentMetadata.js.map +1 -1
  64. package/lib-web/nmshd.runtime.js +717 -11
  65. package/lib-web/nmshd.runtime.js.map +1 -1
  66. package/lib-web/nmshd.runtime.min.js +3 -3
  67. package/lib-web/nmshd.runtime.min.js.map +1 -1
  68. package/package.json +9 -7
@@ -54,6 +54,10 @@ export type FileIdString = string;
54
54
  * @pattern ATL[A-Za-z0-9]{17}
55
55
  */
56
56
  export type AttributeListenerIdString = string;
57
+ /**
58
+ * @pattern NOT[A-Za-z0-9]{17}
59
+ */
60
+ export type NotificationIdString = string;
57
61
  /**
58
62
  * @pattern VE9L.{84}
59
63
  */
@@ -1 +1 @@
1
- {"version":3,"file":"DeleteAttribute.js","sourceRoot":"","sources":["../../../../src/useCases/consumption/attributes/DeleteAttribute.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,gDAA2C;AAC3C,oDAA0E;AAC1E,gDAA6D;AAC7D,mDAAwC;AACxC,yCAA4G;AAM5G,IAAM,SAAS,GAAf,MAAM,SAAU,SAAQ,wBAAuC;IAC3D,YAA2B,gBAAkC;QACzD,KAAK,CAAC,gBAAgB,CAAC,SAAS,CAAC,wBAAwB,CAAC,CAAC,CAAC;IAChE,CAAC;CACJ,CAAA;AAJK,SAAS;IACS,WAAA,uBAAM,CAAA;qCAAmB,yBAAgB;GAD3D,SAAS,CAId;AACD,IAAa,sBAAsB,GAAnC,MAAa,sBAAuB,SAAQ,gBAAqC;IAC7E,YAC6B,mBAAyC,EACzC,iBAAoC,EACrD,SAAoB;QAE5B,KAAK,CAAC,SAAS,CAAC,CAAC;QAJQ,wBAAmB,GAAnB,mBAAmB,CAAsB;QACzC,sBAAiB,GAAjB,iBAAiB,CAAmB;IAIjE,CAAC;IAES,KAAK,CAAC,eAAe,CAAC,OAA+B;QAC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pF,YAC6B,mBAAyC,EAC1D,SAAoB;QAE5B,KAAK,CAAC,SAAS,CAAC,CAAC;QAHQ,wBAAmB,GAAnB,mBAAmB,CAAsB;IAItE,CAAC;IAES,KAAK,CAAC,eAAe,CAAC,OAA4B;QACxD,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,mBAAmB,CAAC,iBAAiB,CAAC,kBAAM,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC;QAC5F,IAAI,CAAC,SAAS,EAAE;YACZ,OAAO,iBAAM,CAAC,IAAI,CAAC,sBAAa,CAAC,OAAO,CAAC,cAAc,CAAC,4BAAc,CAAC,CAAC,CAAC;SAC5E;QAED,OAAO,iBAAM,CAAC,EAAE,CAAC,iCAAe,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC,CAAC;IAChE,CAAC;CACJ,CAAA;AAhBY,kDAAmB;8BAAnB,mBAAmB;IAEvB,WAAA,uBAAM,CAAA;IACN,WAAA,uBAAM,CAAA;qCADuC,kCAAoB;QAC/C,SAAS;GAHvB,mBAAmB,CAgB/B"}
@@ -1 +1 @@
1
- {"version":3,"file":"SucceedAttribute.js","sourceRoot":"","sources":["../../../../src/useCases/consumption/attributes/SucceedAttribute.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,gDAA2C;AAC3C,oDAAuF;AAEvF,gDAAqD;AACrD,mDAAwC;AAExC,yCAA6F;AAC7F,uDAAoD;AAOpD,IAAM,SAAS,GAAf,MAAM,SAAU,SAAQ,wBAAwC;IAC5D,YAA2B,gBAAkC;QACzD,KAAK,CAAC,gBAAgB,CAAC,SAAS,CAAC,yBAAyB,CAAC,CAAC,CAAC;IACjE,CAAC;CACJ,CAAA;AAJK,SAAS;IACS,WAAA,uBAAM,CAAA;qCAAmB,yBAAgB;GAD3D,SAAS,CAId;AACD,IAAa,uBAAuB,GAApC,MAAa,uBAAwB,SAAQ,gBAAmD;IAC5F,YAC6B,mBAAyC,EACzC,iBAAoC,EACrD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a,uBAAwB,SAAQ,gBAAmD;IAC5F,YAC6B,mBAAyC,EACzC,iBAAoC,EACrD,SAAoB;QAE5B,KAAK,CAAC,SAAS,CAAC,CAAC;QAJQ,wBAAmB,GAAnB,mBAAmB,CAAsB;QACzC,sBAAiB,GAAjB,iBAAiB,CAAmB;IAIjE,CAAC;IAES,KAAK,CAAC,eAAe,CAAC,OAAgC;QAC5D,MAAM,MAAM,GAAG,yCAA2B,CAAC,IAAI,CAAC;YAC5C,gBAAgB,EAAE,OAAO,CAAC,gBAAgB;YAC1C,QAAQ,EAAE,OAAO,CAAC,QAAQ;SAC7B,CAAC,CAAC;QACH,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,mBAAmB,CAAC,qBAAqB,CAAC,MAAM,CAAC,CAAC;QAE/E,MAAM,IAAI,CAAC,iBAAiB,CAAC,cAAc,EAAE,CAAC;QAE9C,OAAO,iBAAM,CAAC,EAAE,CAAC,iCAAe,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC,CAAC;IAChE,CAAC;CACJ,CAAA;AApBY,0DAAuB;kCAAvB,uBAAuB;IAE3B,WAAA,uBAAM,CAAA;IACN,WAAA,uBAAM,CAAA;IACN,WAAA,uBAAM,CAAA;qCAFuC,kCAAoB;QACtB,6BAAiB;QAC1C,SAAS;GAJvB,uBAAuB,CAoBnC"}
@@ -1,5 +1,6 @@
1
1
  export * from "./attributeListeners";
2
2
  export * from "./attributes";
3
3
  export * from "./drafts";
4
+ export * from "./notifications";
4
5
  export * from "./requests";
5
6
  export * from "./settings";
@@ -17,6 +17,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./attributeListeners"), exports);
18
18
  __exportStar(require("./attributes"), exports);
19
19
  __exportStar(require("./drafts"), exports);
20
+ __exportStar(require("./notifications"), exports);
20
21
  __exportStar(require("./requests"), exports);
21
22
  __exportStar(require("./settings"), exports);
22
23
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/useCases/consumption/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,uDAAqC;AACrC,+CAA6B;AAC7B,2CAAyB;AACzB,6CAA2B;AAC3B,6CAA2B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/useCases/consumption/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,uDAAqC;AACrC,+CAA6B;AAC7B,2CAAyB;AACzB,kDAAgC;AAChC,6CAA2B;AAC3B,6CAA2B"}
@@ -0,0 +1,16 @@
1
+ import { Result } from "@js-soft/ts-utils";
2
+ import { NotificationsController } from "@nmshd/consumption";
3
+ import { LocalNotificationDTO } from "../../../types";
4
+ import { NotificationIdString, SchemaRepository, SchemaValidator, UseCase } from "../../common";
5
+ export interface GetNotificationRequest {
6
+ id: NotificationIdString;
7
+ }
8
+ declare class Validator extends SchemaValidator<GetNotificationRequest> {
9
+ constructor(schemaRepository: SchemaRepository);
10
+ }
11
+ export declare class GetNotificationUseCase extends UseCase<GetNotificationRequest, LocalNotificationDTO> {
12
+ private readonly notificationsController;
13
+ constructor(notificationsController: NotificationsController, validator: Validator);
14
+ protected executeInternal(request: GetNotificationRequest): Promise<Result<LocalNotificationDTO>>;
15
+ }
16
+ export {};
@@ -0,0 +1,48 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
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;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ var __param = (this && this.__param) || function (paramIndex, decorator) {
12
+ return function (target, key) { decorator(target, key, paramIndex); }
13
+ };
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.GetNotificationUseCase = void 0;
16
+ const ts_utils_1 = require("@js-soft/ts-utils");
17
+ const consumption_1 = require("@nmshd/consumption");
18
+ const transport_1 = require("@nmshd/transport");
19
+ const typescript_ioc_1 = require("typescript-ioc");
20
+ const common_1 = require("../../common");
21
+ const NotificationMapper_1 = require("./NotificationMapper");
22
+ let Validator = class Validator extends common_1.SchemaValidator {
23
+ constructor(schemaRepository) {
24
+ super(schemaRepository.getSchema("GetNotificationRequest"));
25
+ }
26
+ };
27
+ Validator = __decorate([
28
+ __param(0, typescript_ioc_1.Inject),
29
+ __metadata("design:paramtypes", [common_1.SchemaRepository])
30
+ ], Validator);
31
+ let GetNotificationUseCase = class GetNotificationUseCase extends common_1.UseCase {
32
+ constructor(notificationsController, validator) {
33
+ super(validator);
34
+ this.notificationsController = notificationsController;
35
+ }
36
+ async executeInternal(request) {
37
+ const notification = await this.notificationsController.getNotification(transport_1.CoreId.from(request.id));
38
+ return ts_utils_1.Result.ok(NotificationMapper_1.NotificationMapper.toNotificationDTO(notification));
39
+ }
40
+ };
41
+ exports.GetNotificationUseCase = GetNotificationUseCase;
42
+ exports.GetNotificationUseCase = GetNotificationUseCase = __decorate([
43
+ __param(0, typescript_ioc_1.Inject),
44
+ __param(1, typescript_ioc_1.Inject),
45
+ __metadata("design:paramtypes", [consumption_1.NotificationsController,
46
+ Validator])
47
+ ], GetNotificationUseCase);
48
+ //# sourceMappingURL=GetNotification.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GetNotification.js","sourceRoot":"","sources":["../../../../src/useCases/consumption/notifications/GetNotification.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,gDAA2C;AAC3C,oDAA6D;AAC7D,gDAA0C;AAC1C,mDAAwC;AAExC,yCAAgG;AAChG,6DAA0D;AAM1D,IAAM,SAAS,GAAf,MAAM,SAAU,SAAQ,wBAAuC;IAC3D,YAA2B,gBAAkC;QACzD,KAAK,CAAC,gBAAgB,CAAC,SAAS,CAAC,wBAAwB,CAAC,CAAC,CAAC;IAChE,CAAC;CACJ,CAAA;AAJK,SAAS;IACS,WAAA,uBAAM,CAAA;qCAAmB,yBAAgB;GAD3D,SAAS,CAId;AAED,IAAa,sBAAsB,GAAnC,MAAa,sBAAuB,SAAQ,gBAAqD;IAC7F,YAC6B,uBAAgD,EACjE,SAAoB;QAE5B,KAAK,CAAC,SAAS,CAAC,CAAC;QAHQ,4BAAuB,GAAvB,uBAAuB,CAAyB;IAI7E,CAAC;IAES,KAAK,CAAC,eAAe,CAAC,OAA+B;QAC3D,MAAM,YAAY,GAAG,MAAM,IAAI,CAAC,uBAAuB,CAAC,eAAe,CAAC,kBAAM,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC;QACjG,OAAO,iBAAM,CAAC,EAAE,CAAC,uCAAkB,CAAC,iBAAiB,CAAC,YAAY,CAAC,CAAC,CAAC;IACzE,CAAC;CACJ,CAAA;AAZY,wDAAsB;iCAAtB,sBAAsB;IAE1B,WAAA,uBAAM,CAAA;IACN,WAAA,uBAAM,CAAA;qCAD2C,qCAAuB;QACtD,SAAS;GAHvB,sBAAsB,CAYlC"}
@@ -0,0 +1,15 @@
1
+ import { QueryTranslator } from "@js-soft/docdb-querytranslator";
2
+ import { Result } from "@js-soft/ts-utils";
3
+ import { NotificationsController } from "@nmshd/consumption";
4
+ import { LocalNotificationDTO } from "../../../types";
5
+ import { UseCase } from "../../common";
6
+ export interface GetNotificationsRequest {
7
+ query?: GetNotificationsRequestQuery;
8
+ }
9
+ export type GetNotificationsRequestQuery = Record<string, string | string[]>;
10
+ export declare class GetNotificationsUseCase extends UseCase<GetNotificationsRequest, LocalNotificationDTO[]> {
11
+ private readonly notificationsController;
12
+ static readonly queryTranslator: QueryTranslator;
13
+ constructor(notificationsController: NotificationsController);
14
+ protected executeInternal(request: GetNotificationsRequest): Promise<Result<LocalNotificationDTO[]>>;
15
+ }
@@ -0,0 +1,40 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
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;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ var __param = (this && this.__param) || function (paramIndex, decorator) {
12
+ return function (target, key) { decorator(target, key, paramIndex); }
13
+ };
14
+ var GetNotificationsUseCase_1;
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.GetNotificationsUseCase = void 0;
17
+ const docdb_querytranslator_1 = require("@js-soft/docdb-querytranslator");
18
+ const ts_utils_1 = require("@js-soft/ts-utils");
19
+ const consumption_1 = require("@nmshd/consumption");
20
+ const typescript_ioc_1 = require("typescript-ioc");
21
+ const common_1 = require("../../common");
22
+ const NotificationMapper_1 = require("./NotificationMapper");
23
+ let GetNotificationsUseCase = GetNotificationsUseCase_1 = class GetNotificationsUseCase extends common_1.UseCase {
24
+ constructor(notificationsController) {
25
+ super();
26
+ this.notificationsController = notificationsController;
27
+ }
28
+ async executeInternal(request) {
29
+ const dbQuery = GetNotificationsUseCase_1.queryTranslator.parse(request.query);
30
+ const notifications = await this.notificationsController.getNotifications(dbQuery);
31
+ return ts_utils_1.Result.ok(NotificationMapper_1.NotificationMapper.toNotificationDTOList(notifications));
32
+ }
33
+ };
34
+ exports.GetNotificationsUseCase = GetNotificationsUseCase;
35
+ GetNotificationsUseCase.queryTranslator = new docdb_querytranslator_1.QueryTranslator({});
36
+ exports.GetNotificationsUseCase = GetNotificationsUseCase = GetNotificationsUseCase_1 = __decorate([
37
+ __param(0, typescript_ioc_1.Inject),
38
+ __metadata("design:paramtypes", [consumption_1.NotificationsController])
39
+ ], GetNotificationsUseCase);
40
+ //# sourceMappingURL=GetNotifications.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GetNotifications.js","sourceRoot":"","sources":["../../../../src/useCases/consumption/notifications/GetNotifications.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0EAAiE;AACjE,gDAA2C;AAC3C,oDAA6D;AAC7D,mDAAwC;AAExC,yCAAuC;AACvC,6DAA0D;AAQ1D,IAAa,uBAAuB,+BAApC,MAAa,uBAAwB,SAAQ,gBAAwD;IAGjG,YAA4C,uBAAgD;QACxF,KAAK,EAAE,CAAC;QADgC,4BAAuB,GAAvB,uBAAuB,CAAyB;IAE5F,CAAC;IAES,KAAK,CAAC,eAAe,CAAC,OAAgC;QAC5D,MAAM,OAAO,GAAG,yBAAuB,CAAC,eAAe,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;QAE7E,MAAM,aAAa,GAAG,MAAM,IAAI,CAAC,uBAAuB,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC;QACnF,OAAO,iBAAM,CAAC,EAAE,CAAC,uCAAkB,CAAC,qBAAqB,CAAC,aAAa,CAAC,CAAC,CAAC;IAC9E,CAAC;;AAZQ,0DAAuB;AACT,uCAAe,GAAG,IAAI,uCAAe,CAAC,EAAE,CAAC,AAA1B,CAA2B;kCADxD,uBAAuB;IAGZ,WAAA,uBAAM,CAAA;qCAA2C,qCAAuB;GAHnF,uBAAuB,CAanC"}
@@ -0,0 +1,6 @@
1
+ import { LocalNotification } from "@nmshd/consumption";
2
+ import { LocalNotificationDTO } from "../../../types";
3
+ export declare class NotificationMapper {
4
+ static toNotificationDTO(notification: LocalNotification): LocalNotificationDTO;
5
+ static toNotificationDTOList(notifications: LocalNotification[]): any;
6
+ }
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.NotificationMapper = void 0;
4
+ class NotificationMapper {
5
+ static toNotificationDTO(notification) {
6
+ return {
7
+ id: notification.id.toString(),
8
+ isOwn: notification.isOwn,
9
+ peer: notification.peer.toString(),
10
+ createdAt: notification.createdAt.toISOString(),
11
+ receivedByDevice: notification.receivedByDevice?.toString(),
12
+ content: notification.content.toJSON(),
13
+ status: notification.status,
14
+ source: {
15
+ type: "Message",
16
+ reference: notification.source.reference.toString()
17
+ }
18
+ };
19
+ }
20
+ static toNotificationDTOList(notifications) {
21
+ return notifications.map((notification) => this.toNotificationDTO(notification));
22
+ }
23
+ }
24
+ exports.NotificationMapper = NotificationMapper;
25
+ //# sourceMappingURL=NotificationMapper.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NotificationMapper.js","sourceRoot":"","sources":["../../../../src/useCases/consumption/notifications/NotificationMapper.ts"],"names":[],"mappings":";;;AAIA,MAAa,kBAAkB;IACpB,MAAM,CAAC,iBAAiB,CAAC,YAA+B;QAC3D,OAAO;YACH,EAAE,EAAE,YAAY,CAAC,EAAE,CAAC,QAAQ,EAAE;YAC9B,KAAK,EAAE,YAAY,CAAC,KAAK;YACzB,IAAI,EAAE,YAAY,CAAC,IAAI,CAAC,QAAQ,EAAE;YAClC,SAAS,EAAE,YAAY,CAAC,SAAS,CAAC,WAAW,EAAE;YAC/C,gBAAgB,EAAE,YAAY,CAAC,gBAAgB,EAAE,QAAQ,EAAE;YAC3D,OAAO,EAAE,YAAY,CAAC,OAAO,CAAC,MAAM,EAAsB;YAC1D,MAAM,EAAE,YAAY,CAAC,MAAM;YAC3B,MAAM,EAAE;gBACJ,IAAI,EAAE,SAAS;gBACf,SAAS,EAAE,YAAY,CAAC,MAAM,CAAC,SAAS,CAAC,QAAQ,EAAE;aACtD;SACJ,CAAC;IACN,CAAC;IAEM,MAAM,CAAC,qBAAqB,CAAC,aAAkC;QAClE,OAAO,aAAa,CAAC,GAAG,CAAC,CAAC,YAAY,EAAE,EAAE,CAAC,IAAI,CAAC,iBAAiB,CAAC,YAAY,CAAC,CAAC,CAAC;IACrF,CAAC;CACJ;AApBD,gDAoBC"}
@@ -0,0 +1,16 @@
1
+ import { ApplicationError, Result } from "@js-soft/ts-utils";
2
+ import { NotificationsController } from "@nmshd/consumption";
3
+ import { LocalNotificationDTO } from "../../../types";
4
+ import { NotificationIdString, SchemaRepository, SchemaValidator, UseCase } from "../../common";
5
+ export interface ProcessNotificationByIdRequest {
6
+ notificationId: NotificationIdString;
7
+ }
8
+ declare class Validator extends SchemaValidator<ProcessNotificationByIdRequest> {
9
+ constructor(schemaRepository: SchemaRepository);
10
+ }
11
+ export declare class ProcessNotificationByIdUseCase extends UseCase<ProcessNotificationByIdRequest, LocalNotificationDTO> {
12
+ private readonly notificationsController;
13
+ constructor(notificationsController: NotificationsController, validator: Validator);
14
+ protected executeInternal(request: ProcessNotificationByIdRequest): Promise<Result<LocalNotificationDTO, ApplicationError>>;
15
+ }
16
+ export {};
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
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;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ var __param = (this && this.__param) || function (paramIndex, decorator) {
12
+ return function (target, key) { decorator(target, key, paramIndex); }
13
+ };
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.ProcessNotificationByIdUseCase = void 0;
16
+ const ts_utils_1 = require("@js-soft/ts-utils");
17
+ const consumption_1 = require("@nmshd/consumption");
18
+ const transport_1 = require("@nmshd/transport");
19
+ const typescript_ioc_1 = require("typescript-ioc");
20
+ const common_1 = require("../../common");
21
+ const NotificationMapper_1 = require("./NotificationMapper");
22
+ let Validator = class Validator extends common_1.SchemaValidator {
23
+ constructor(schemaRepository) {
24
+ super(schemaRepository.getSchema("ProcessNotificationByIdRequest"));
25
+ }
26
+ };
27
+ Validator = __decorate([
28
+ __param(0, typescript_ioc_1.Inject),
29
+ __metadata("design:paramtypes", [common_1.SchemaRepository])
30
+ ], Validator);
31
+ let ProcessNotificationByIdUseCase = class ProcessNotificationByIdUseCase extends common_1.UseCase {
32
+ constructor(notificationsController, validator) {
33
+ super(validator);
34
+ this.notificationsController = notificationsController;
35
+ }
36
+ async executeInternal(request) {
37
+ const processedNotification = await this.notificationsController.processNotificationById(transport_1.CoreId.from(request.notificationId));
38
+ const dto = NotificationMapper_1.NotificationMapper.toNotificationDTO(processedNotification);
39
+ return ts_utils_1.Result.ok(dto);
40
+ }
41
+ };
42
+ exports.ProcessNotificationByIdUseCase = ProcessNotificationByIdUseCase;
43
+ exports.ProcessNotificationByIdUseCase = ProcessNotificationByIdUseCase = __decorate([
44
+ __param(0, typescript_ioc_1.Inject),
45
+ __param(1, typescript_ioc_1.Inject),
46
+ __metadata("design:paramtypes", [consumption_1.NotificationsController,
47
+ Validator])
48
+ ], ProcessNotificationByIdUseCase);
49
+ //# sourceMappingURL=ProcessNotificationById.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ProcessNotificationById.js","sourceRoot":"","sources":["../../../../src/useCases/consumption/notifications/ProcessNotificationById.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,gDAA6D;AAC7D,oDAA6D;AAC7D,gDAA0C;AAC1C,mDAAwC;AAExC,yCAAgG;AAChG,6DAA0D;AAM1D,IAAM,SAAS,GAAf,MAAM,SAAU,SAAQ,wBAA+C;IACnE,YAA2B,gBAAkC;QACzD,KAAK,CAAC,gBAAgB,CAAC,SAAS,CAAC,gCAAgC,CAAC,CAAC,CAAC;IACxE,CAAC;CACJ,CAAA;AAJK,SAAS;IACS,WAAA,uBAAM,CAAA;qCAAmB,yBAAgB;GAD3D,SAAS,CAId;AAED,IAAa,8BAA8B,GAA3C,MAAa,8BAA+B,SAAQ,gBAA6D;IAC7G,YAC6B,uBAAgD,EACjE,SAAoB;QAE5B,KAAK,CAAC,SAAS,CAAC,CAAC;QAHQ,4BAAuB,GAAvB,uBAAuB,CAAyB;IAI7E,CAAC;IAES,KAAK,CAAC,eAAe,CAAC,OAAuC;QACnE,MAAM,qBAAqB,GAAG,MAAM,IAAI,CAAC,uBAAuB,CAAC,uBAAuB,CAAC,kBAAM,CAAC,IAAI,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC,CAAC;QAE9H,MAAM,GAAG,GAAG,uCAAkB,CAAC,iBAAiB,CAAC,qBAAqB,CAAC,CAAC;QACxE,OAAO,iBAAM,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC;IAC1B,CAAC;CACJ,CAAA;AAdY,wEAA8B;yCAA9B,8BAA8B;IAElC,WAAA,uBAAM,CAAA;IACN,WAAA,uBAAM,CAAA;qCAD2C,qCAAuB;QACtD,SAAS;GAHvB,8BAA8B,CAc1C"}
@@ -0,0 +1,8 @@
1
+ import { ApplicationError, Result } from "@js-soft/ts-utils";
2
+ import { NotificationsController } from "@nmshd/consumption";
3
+ import { UseCase } from "../../common";
4
+ export declare class ProcessOpenNotifactionsReceivedByCurrentDeviceUseCase extends UseCase<void, void> {
5
+ private readonly notificationsController;
6
+ constructor(notificationsController: NotificationsController);
7
+ protected executeInternal(): Promise<Result<void, ApplicationError>>;
8
+ }
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
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;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ var __param = (this && this.__param) || function (paramIndex, decorator) {
12
+ return function (target, key) { decorator(target, key, paramIndex); }
13
+ };
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.ProcessOpenNotifactionsReceivedByCurrentDeviceUseCase = void 0;
16
+ const ts_utils_1 = require("@js-soft/ts-utils");
17
+ const consumption_1 = require("@nmshd/consumption");
18
+ const typescript_ioc_1 = require("typescript-ioc");
19
+ const common_1 = require("../../common");
20
+ let ProcessOpenNotifactionsReceivedByCurrentDeviceUseCase = class ProcessOpenNotifactionsReceivedByCurrentDeviceUseCase extends common_1.UseCase {
21
+ constructor(notificationsController) {
22
+ super();
23
+ this.notificationsController = notificationsController;
24
+ }
25
+ async executeInternal() {
26
+ await this.notificationsController.processOpenNotifactionsReceivedByCurrentDevice();
27
+ return ts_utils_1.Result.ok(undefined);
28
+ }
29
+ };
30
+ exports.ProcessOpenNotifactionsReceivedByCurrentDeviceUseCase = ProcessOpenNotifactionsReceivedByCurrentDeviceUseCase;
31
+ exports.ProcessOpenNotifactionsReceivedByCurrentDeviceUseCase = ProcessOpenNotifactionsReceivedByCurrentDeviceUseCase = __decorate([
32
+ __param(0, typescript_ioc_1.Inject),
33
+ __metadata("design:paramtypes", [consumption_1.NotificationsController])
34
+ ], ProcessOpenNotifactionsReceivedByCurrentDeviceUseCase);
35
+ //# sourceMappingURL=ProcessOpenNotifactionsReceivedByCurrentDevice.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ProcessOpenNotifactionsReceivedByCurrentDevice.js","sourceRoot":"","sources":["../../../../src/useCases/consumption/notifications/ProcessOpenNotifactionsReceivedByCurrentDevice.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,gDAA6D;AAC7D,oDAA6D;AAC7D,mDAAwC;AACxC,yCAAuC;AAEvC,IAAa,qDAAqD,GAAlE,MAAa,qDAAsD,SAAQ,gBAAmB;IAC1F,YAA4C,uBAAgD;QACxF,KAAK,EAAE,CAAC;QADgC,4BAAuB,GAAvB,uBAAuB,CAAyB;IAE5F,CAAC;IAES,KAAK,CAAC,eAAe;QAC3B,MAAM,IAAI,CAAC,uBAAuB,CAAC,8CAA8C,EAAE,CAAC;QAEpF,OAAO,iBAAM,CAAC,EAAE,CAAC,SAAS,CAAC,CAAC;IAChC,CAAC;CACJ,CAAA;AAVY,sHAAqD;gEAArD,qDAAqD;IAC1C,WAAA,uBAAM,CAAA;qCAA2C,qCAAuB;GADnF,qDAAqD,CAUjE"}
@@ -0,0 +1,18 @@
1
+ import { ApplicationError, Result } from "@js-soft/ts-utils";
2
+ import { NotificationsController } from "@nmshd/consumption";
3
+ import { MessageController } from "@nmshd/transport";
4
+ import { LocalNotificationDTO } from "../../../types";
5
+ import { MessageIdString, SchemaRepository, SchemaValidator, UseCase } from "../../common";
6
+ export interface ReceivedNotificationRequest {
7
+ messageId: MessageIdString;
8
+ }
9
+ declare class Validator extends SchemaValidator<ReceivedNotificationRequest> {
10
+ constructor(schemaRepository: SchemaRepository);
11
+ }
12
+ export declare class ReceivedNotificationUseCase extends UseCase<ReceivedNotificationRequest, LocalNotificationDTO> {
13
+ private readonly notificationsController;
14
+ private readonly messageController;
15
+ constructor(notificationsController: NotificationsController, messageController: MessageController, validator: Validator);
16
+ protected executeInternal(request: ReceivedNotificationRequest): Promise<Result<LocalNotificationDTO, ApplicationError>>;
17
+ }
18
+ export {};
@@ -0,0 +1,60 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
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;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ var __param = (this && this.__param) || function (paramIndex, decorator) {
12
+ return function (target, key) { decorator(target, key, paramIndex); }
13
+ };
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.ReceivedNotificationUseCase = void 0;
16
+ const ts_utils_1 = require("@js-soft/ts-utils");
17
+ const consumption_1 = require("@nmshd/consumption");
18
+ const content_1 = require("@nmshd/content");
19
+ const transport_1 = require("@nmshd/transport");
20
+ const typescript_ioc_1 = require("typescript-ioc");
21
+ const common_1 = require("../../common");
22
+ const NotificationMapper_1 = require("./NotificationMapper");
23
+ let Validator = class Validator extends common_1.SchemaValidator {
24
+ constructor(schemaRepository) {
25
+ super(schemaRepository.getSchema("ReceivedNotificationRequest"));
26
+ }
27
+ };
28
+ Validator = __decorate([
29
+ __param(0, typescript_ioc_1.Inject),
30
+ __metadata("design:paramtypes", [common_1.SchemaRepository])
31
+ ], Validator);
32
+ let ReceivedNotificationUseCase = class ReceivedNotificationUseCase extends common_1.UseCase {
33
+ constructor(notificationsController, messageController, validator) {
34
+ super(validator);
35
+ this.notificationsController = notificationsController;
36
+ this.messageController = messageController;
37
+ }
38
+ async executeInternal(request) {
39
+ const message = await this.messageController.getMessage(transport_1.CoreId.from(request.messageId));
40
+ if (!message)
41
+ return ts_utils_1.Result.fail(common_1.RuntimeErrors.general.recordNotFound(transport_1.Message));
42
+ if (!(message.cache.content instanceof content_1.Notification))
43
+ return ts_utils_1.Result.fail(common_1.RuntimeErrors.notifications.messageDoesNotContainNotification(message.id));
44
+ if (message.isOwn)
45
+ return ts_utils_1.Result.fail(common_1.RuntimeErrors.notifications.cannotReceiveNotificationFromOwnMessage());
46
+ const notification = await this.notificationsController.received(message);
47
+ const dto = NotificationMapper_1.NotificationMapper.toNotificationDTO(notification);
48
+ return ts_utils_1.Result.ok(dto);
49
+ }
50
+ };
51
+ exports.ReceivedNotificationUseCase = ReceivedNotificationUseCase;
52
+ exports.ReceivedNotificationUseCase = ReceivedNotificationUseCase = __decorate([
53
+ __param(0, typescript_ioc_1.Inject),
54
+ __param(1, typescript_ioc_1.Inject),
55
+ __param(2, typescript_ioc_1.Inject),
56
+ __metadata("design:paramtypes", [consumption_1.NotificationsController,
57
+ transport_1.MessageController,
58
+ Validator])
59
+ ], ReceivedNotificationUseCase);
60
+ //# sourceMappingURL=ReceivedNotification.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ReceivedNotification.js","sourceRoot":"","sources":["../../../../src/useCases/consumption/notifications/ReceivedNotification.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,gDAA6D;AAC7D,oDAA6D;AAC7D,4CAA8C;AAC9C,gDAAsE;AACtE,mDAAwC;AAExC,yCAA0G;AAC1G,6DAA0D;AAM1D,IAAM,SAAS,GAAf,MAAM,SAAU,SAAQ,wBAA4C;IAChE,YAA2B,gBAAkC;QACzD,KAAK,CAAC,gBAAgB,CAAC,SAAS,CAAC,6BAA6B,CAAC,CAAC,CAAC;IACrE,CAAC;CACJ,CAAA;AAJK,SAAS;IACS,WAAA,uBAAM,CAAA;qCAAmB,yBAAgB;GAD3D,SAAS,CAId;AAED,IAAa,2BAA2B,GAAxC,MAAa,2BAA4B,SAAQ,gBAA0D;IACvG,YAC6B,u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utils";
2
+ import { NotificationsController } from "@nmshd/consumption";
3
+ import { MessageController } from "@nmshd/transport";
4
+ import { LocalNotificationDTO } from "../../../types";
5
+ import { MessageIdString, SchemaRepository, SchemaValidator, UseCase } from "../../common";
6
+ export interface SentNotificationRequest {
7
+ messageId: MessageIdString;
8
+ }
9
+ declare class Validator extends SchemaValidator<SentNotificationRequest> {
10
+ constructor(schemaRepository: SchemaRepository);
11
+ }
12
+ export declare class SentNotificationUseCase extends UseCase<SentNotificationRequest, LocalNotificationDTO> {
13
+ private readonly notificationsController;
14
+ private readonly messageController;
15
+ constructor(notificationsController: NotificationsController, messageController: MessageController, validator: Validator);
16
+ protected executeInternal(request: SentNotificationRequest): Promise<Result<LocalNotificationDTO, ApplicationError>>;
17
+ }
18
+ export {};
@@ -0,0 +1,60 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
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;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ var __param = (this && this.__param) || function (paramIndex, decorator) {
12
+ return function (target, key) { decorator(target, key, paramIndex); }
13
+ };
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.SentNotificationUseCase = void 0;
16
+ const ts_utils_1 = require("@js-soft/ts-utils");
17
+ const consumption_1 = require("@nmshd/consumption");
18
+ const content_1 = require("@nmshd/content");
19
+ const transport_1 = require("@nmshd/transport");
20
+ const typescript_ioc_1 = require("typescript-ioc");
21
+ const common_1 = require("../../common");
22
+ const NotificationMapper_1 = require("./NotificationMapper");
23
+ let Validator = class Validator extends common_1.SchemaValidator {
24
+ constructor(schemaRepository) {
25
+ super(schemaRepository.getSchema("SentNotificationRequest"));
26
+ }
27
+ };
28
+ Validator = __decorate([
29
+ __param(0, typescript_ioc_1.Inject),
30
+ __metadata("design:paramtypes", [common_1.SchemaRepository])
31
+ ], Validator);
32
+ let SentNotificationUseCase = class SentNotificationUseCase extends common_1.UseCase {
33
+ constructor(notificationsController, messageController, validator) {
34
+ super(validator);
35
+ this.notificationsController = notificationsController;
36
+ this.messageController = messageController;
37
+ }
38
+ async executeInternal(request) {
39
+ const message = await this.messageController.getMessage(transport_1.CoreId.from(request.messageId));
40
+ if (!message)
41
+ return ts_utils_1.Result.fail(common_1.RuntimeErrors.general.recordNotFound(transport_1.Message));
42
+ if (!(message.cache.content instanceof content_1.Notification))
43
+ return ts_utils_1.Result.fail(common_1.RuntimeErrors.notifications.messageDoesNotContainNotification(message.id));
44
+ if (!message.isOwn)
45
+ return ts_utils_1.Result.fail(common_1.RuntimeErrors.notifications.cannotSaveSentNotificationFromPeerMessage());
46
+ const notification = await this.notificationsController.sent(message);
47
+ const dto = NotificationMapper_1.NotificationMapper.toNotificationDTO(notification);
48
+ return ts_utils_1.Result.ok(dto);
49
+ }
50
+ };
51
+ exports.SentNotificationUseCase = SentNotificationUseCase;
52
+ exports.SentNotificationUseCase = SentNotificationUseCase = __decorate([
53
+ __param(0, typescript_ioc_1.Inject),
54
+ __param(1, typescript_ioc_1.Inject),
55
+ __param(2, typescript_ioc_1.Inject),
56
+ __metadata("design:paramtypes", [consumption_1.NotificationsController,
57
+ transport_1.MessageController,
58
+ Validator])
59
+ ], SentNotificationUseCase);
60
+ //# sourceMappingURL=SentNotification.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SentNotification.js","sourceRoot":"","sources":["../../../../src/useCases/consumption/notifications/SentNotification.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;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uB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACtE,MAAM,GAAG,GAAG,uCAAkB,CAAC,iBAAiB,CAAC,YAAY,CAAC,CAAC;QAE/D,OAAO,iBAAM,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC;IAC1B,CAAC;CACJ,CAAA;AAtBY,0DAAuB;kCAAvB,uBAAuB;IAE3B,WAAA,uBAAM,CAAA;IACN,WAAA,uBAAM,CAAA;IAEN,WAAA,uBAAM,CAAA;qCAH2C,qCAAuB;QAC7B,6BAAiB;QAE1C,SAAS;GALvB,uBAAuB,CAsBnC"}
@@ -0,0 +1,6 @@
1
+ export * from "./GetNotification";
2
+ export * from "./GetNotifications";
3
+ export * from "./ProcessNotificationById";
4
+ export * from "./ProcessOpenNotifactionsReceivedByCurrentDevice";
5
+ export * from "./ReceivedNotification";
6
+ export * from "./SentNotification";
@@ -0,0 +1,23 @@
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("./GetNotification"), exports);
18
+ __exportStar(require("./GetNotifications"), exports);
19
+ __exportStar(require("./ProcessNotificationById"), exports);
20
+ __exportStar(require("./ProcessOpenNotifactionsReceivedByCurrentDevice"), exports);
21
+ __exportStar(require("./ReceivedNotification"), exports);
22
+ __exportStar(require("./SentNotification"), exports);
23
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/useCases/consumption/notifications/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,oDAAkC;AAClC,qDAAmC;AACnC,4DAA0C;AAC1C,mFAAiE;AACjE,yDAAuC;AACvC,qDAAmC"}
@@ -47,7 +47,7 @@ let GetAttachmentMetadataUseCase = class GetAttachmentMetadataUseCase extends co
47
47
  }
48
48
  const file = await this.fileController.getFile(attachment);
49
49
  if (!file) {
50
- return ts_utils_1.Result.fail(common_1.RuntimeErrors.general.recordNotFound(File));
50
+ return ts_utils_1.Result.fail(common_1.RuntimeErrors.general.recordNotFound(transport_1.File));
51
51
  }
52
52
  return ts_utils_1.Result.ok(FileMapper_1.FileMapper.toFileDTO(file));
53
53
  }
@@ -1 +1 @@
1
- {"version":3,"file":"GetAttachmentMetadata.js","sourceRoot":"","sources":["../../../../src/useCases/transport/messages/GetAttachmentMetadata.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,gDAA2C;AAC3C,gDAAsF;AACtF,mDAAwC;AAExC,yCAAwH;AACxH,oDAAiD;AAOjD,IAAM,SAAS,GAAf,MAAM,SAAU,SAAQ,wBAA6C;IACjE,YAA2B,gBAAkC;QACzD,KAAK,CAAC,gBAAgB,CAAC,SAAS,CAAC,8BAA8B,CAAC,CAAC,CAAC;IACtE,CAAC;CACJ,CAAA;AAJK,SAAS;IACS,WAAA,uBAAM,CAAA;qCAAmB,yBAAgB;GAD3D,SAAS,CAId;AAED,IAAa,4BAA4B,GAAzC,MAAa,4BAA6B,SAAQ,gBAA8C;IAC5F,YAC6B,iBAAoC,EACpC,cAA8B,EAC/C,SAAoB;QAE5B,KAAK,CAAC,SAAS,CAAC,CAAC;QAJQ,sBAAiB,GAAjB,iBAAiB,CAAmB;QACpC,mBAAc,GAAd,cAAc,CAAgB;IAI3D,CAAC;IAES,KAAK,CAAC,eAAe,C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ACpB,0BAAc;QACpC,SAAS;GAJvB,4BAA4B,CA+BxC"}
1
+ {"version":3,"file":"GetAttachmentMetadata.js","sourceRoot":"","sources":["../../../../src/useCases/transport/messages/GetAttachmentMetadata.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,gDAA2C;AAC3C,gDAA4F;AAC5F,mDAAwC;AAExC,yCAAwH;AACxH,oDAAiD;AAOjD,IAAM,SAAS,GAAf,MAAM,SAAU,SAAQ,wBAA6C;IACjE,YAA2B,gBAAkC;QACzD,KAAK,CAAC,gBAAgB,CAAC,SAAS,CAAC,8BAA8B,CAAC,CAAC,CAAC;IACtE,CAAC;CACJ,CAAA;AAJK,SAAS;IACS,WAAA,uBAAM,CAAA;qCAAmB,yBAAgB;GAD3D,SAAS,CAId;AAED,IAAa,4BAA4B,GAAzC,MAAa,4BAA6B,SAAQ,gBAA8C;IAC5F,YAC6B,iBAAoC,EACpC,cAA8B,EAC/C,SAAoB;QAE5B,KAAK,CAAC,SAAS,CAAC,CAAC;QAJQ,sBAAiB,GAAjB,iBAAiB,CAAmB;QACpC,mBAAc,GAAd,cAAc,CAAgB;IAI3D,CAAC;IAES,KAAK,CAAC,eAAe,CAAC,OAAqC;QACjE,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,iBAAiB,CAAC,UAAU,CAAC,kBAAM,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC;QACjF,IAAI,CAAC,OAAO,EAAE;YACV,OAAO,iBAAM,CAAC,IAAI,CAAC,sBAAa,CAAC,OAAO,CAAC,cAAc,CAAC,mBAAO,CAAC,CAAC,CAAC;SACrE;QAED,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE;YAChB,MAAM,sBAAa,CAAC,OAAO,CAAC,UAAU,CAAC,mBAAO,EAAE,OAAO,CAAC,EAAE,CAAC,QAAQ,EAAE,CAAC,CAAC;SAC1E;QAED,MAAM,UAAU,GAAG,OAAO,CAAC,KAAK,CAAC,WAAW,CAAC,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