@nmshd/runtime 6.62.3 → 6.63.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,19 @@
1
+ import { Result } from "@js-soft/ts-utils";
2
+ import { DeviceDTO } from "@nmshd/runtime-types";
3
+ import { AccountController, DeviceController } from "@nmshd/transport";
4
+ import { SchemaRepository, SchemaValidator, UseCase } from "../../common";
5
+ export interface UpdateCurrentDeviceRequest {
6
+ name?: string;
7
+ description?: string;
8
+ }
9
+ declare class Validator extends SchemaValidator<UpdateCurrentDeviceRequest> {
10
+ constructor(schemaRepository: SchemaRepository);
11
+ }
12
+ export declare class UpdateCurrentDeviceUseCase extends UseCase<UpdateCurrentDeviceRequest, DeviceDTO> {
13
+ private readonly accountController;
14
+ private readonly deviceController;
15
+ constructor(accountController: AccountController, deviceController: DeviceController, validator: Validator);
16
+ protected executeInternal(request: UpdateCurrentDeviceRequest): Promise<Result<DeviceDTO>>;
17
+ }
18
+ export {};
19
+ //# sourceMappingURL=UpdateCurrentDevice.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UpdateCurrentDevice.d.ts","sourceRoot":"","sources":["../../../../src/useCases/transport/devices/UpdateCurrentDevice.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAEvE,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAG1E,MAAM,WAAW,0BAA0B;IACvC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,cAAM,SAAU,SAAQ,eAAe,CAAC,0BAA0B,CAAC;gBACpC,gBAAgB,EAAE,gBAAgB;CAGhE;AAED,qBAAa,0BAA2B,SAAQ,OAAO,CAAC,0BAA0B,EAAE,SAAS,CAAC;IAE9E,OAAO,CAAC,QAAQ,CAAC,iBAAiB;IAClC,OAAO,CAAC,QAAQ,CAAC,gBAAgB;gBADhB,iBAAiB,EAAE,iBAAiB,EACpC,gBAAgB,EAAE,gBAAgB,EACnD,SAAS,EAAE,SAAS;cAKhB,eAAe,CAAC,OAAO,EAAE,0BAA0B,GAAG,OAAO,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;CAMnG"}
@@ -0,0 +1,51 @@
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.UpdateCurrentDeviceUseCase = void 0;
16
+ const ts_utils_1 = require("@js-soft/ts-utils");
17
+ const transport_1 = require("@nmshd/transport");
18
+ const typescript_ioc_1 = require("@nmshd/typescript-ioc");
19
+ const common_1 = require("../../common");
20
+ const DeviceMapper_1 = require("./DeviceMapper");
21
+ let Validator = class Validator extends common_1.SchemaValidator {
22
+ constructor(schemaRepository) {
23
+ super(schemaRepository.getSchema("UpdateCurrentDeviceRequest"));
24
+ }
25
+ };
26
+ Validator = __decorate([
27
+ __param(0, typescript_ioc_1.Inject),
28
+ __metadata("design:paramtypes", [common_1.SchemaRepository])
29
+ ], Validator);
30
+ let UpdateCurrentDeviceUseCase = class UpdateCurrentDeviceUseCase extends common_1.UseCase {
31
+ constructor(accountController, deviceController, validator) {
32
+ super(validator);
33
+ this.accountController = accountController;
34
+ this.deviceController = deviceController;
35
+ }
36
+ async executeInternal(request) {
37
+ await this.deviceController.update(request);
38
+ await this.accountController.syncDatawallet();
39
+ return ts_utils_1.Result.ok(DeviceMapper_1.DeviceMapper.toDeviceDTO(this.deviceController.device, true));
40
+ }
41
+ };
42
+ exports.UpdateCurrentDeviceUseCase = UpdateCurrentDeviceUseCase;
43
+ exports.UpdateCurrentDeviceUseCase = UpdateCurrentDeviceUseCase = __decorate([
44
+ __param(0, typescript_ioc_1.Inject),
45
+ __param(1, typescript_ioc_1.Inject),
46
+ __param(2, typescript_ioc_1.Inject),
47
+ __metadata("design:paramtypes", [transport_1.AccountController,
48
+ transport_1.DeviceController,
49
+ Validator])
50
+ ], UpdateCurrentDeviceUseCase);
51
+ //# sourceMappingURL=UpdateCurrentDevice.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UpdateCurrentDevice.js","sourceRoot":"","sources":["../../../../src/useCases/transport/devices/UpdateCurrentDevice.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,gDAA2C;AAE3C,gDAAuE;AACvE,0DAA+C;AAC/C,yCAA0E;AAC1E,iDAA8C;AAO9C,IAAM,SAAS,GAAf,MAAM,SAAU,SAAQ,wBAA2C;IAC/D,YAA2B,gBAAkC;QACzD,KAAK,CAAC,gBAAgB,CAAC,SAAS,CAAC,4BAA4B,CAAC,CAAC,CAAC;IACpE,CAAC;CACJ,CAAA;AAJK,SAAS;IACS,WAAA,uBAAM,CAAA;qCAAmB,yBAAgB;GAD3D,SAAS,CAId;AAED,IAAa,0BAA0B,GAAvC,MAAa,0BAA2B,SAAQ,gBAA8C;IAC1F,YAC6B,iBAAoC,EACpC,gBAAkC,EACnD,SAAoB;QAE5B,KAAK,CAAC,SAAS,CAAC,CAAC;QAJQ,sBAAiB,GAAjB,iBAAiB,CAAmB;QACpC,qBAAgB,GAAhB,gBAAgB,CAAkB;IAI/D,CAAC;IAES,KAAK,CAAC,eAAe,CAAC,OAAmC;QAC/D,MAAM,IAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;QAC5C,MAAM,IAAI,CAAC,iBAAiB,CAAC,cAAc,EAAE,CAAC;QAE9C,OAAO,iBAAM,CAAC,EAAE,CAAC,2BAAY,CAAC,WAAW,CAAC,IAAI,CAAC,gBAAgB,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC;IACnF,CAAC;CACJ,CAAA;AAfY,gEAA0B;qCAA1B,0BAA0B;IAE9B,WAAA,uBAAM,CAAA;IACN,WAAA,uBAAM,CAAA;IACN,WAAA,uBAAM,CAAA;qCAFqC,6BAAiB;QAClB,4BAAgB;QACxC,SAAS;GAJvB,0BAA0B,CAetC"}
@@ -7,5 +7,6 @@ export * from "./GetDevice";
7
7
  export * from "./GetDeviceOnboardingInfo";
8
8
  export * from "./GetDevices";
9
9
  export * from "./SetCommunicationLanguage";
10
+ export * from "./UpdateCurrentDevice";
10
11
  export * from "./UpdateDevice";
11
12
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/useCases/transport/devices/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,+BAA+B,CAAC;AAC9C,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,0CAA0C,CAAC;AACzD,cAAc,aAAa,CAAC;AAC5B,cAAc,2BAA2B,CAAC;AAC1C,cAAc,cAAc,CAAC;AAC7B,cAAc,4BAA4B,CAAC;AAC3C,cAAc,gBAAgB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/useCases/transport/devices/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,+BAA+B,CAAC;AAC9C,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,0CAA0C,CAAC;AACzD,cAAc,aAAa,CAAC;AAC5B,cAAc,2BAA2B,CAAC;AAC1C,cAAc,cAAc,CAAC;AAC7B,cAAc,4BAA4B,CAAC;AAC3C,cAAc,uBAAuB,CAAC;AACtC,cAAc,gBAAgB,CAAC"}
@@ -23,5 +23,6 @@ __exportStar(require("./GetDevice"), exports);
23
23
  __exportStar(require("./GetDeviceOnboardingInfo"), exports);
24
24
  __exportStar(require("./GetDevices"), exports);
25
25
  __exportStar(require("./SetCommunicationLanguage"), exports);
26
+ __exportStar(require("./UpdateCurrentDevice"), exports);
26
27
  __exportStar(require("./UpdateDevice"), exports);
27
28
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/useCases/transport/devices/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,iDAA+B;AAC/B,gEAA8C;AAC9C,iDAA+B;AAC/B,iDAA+B;AAC/B,2EAAyD;AACzD,8CAA4B;AAC5B,4DAA0C;AAC1C,+CAA6B;AAC7B,6DAA2C;AAC3C,iDAA+B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/useCases/transport/devices/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,iDAA+B;AAC/B,gEAA8C;AAC9C,iDAA+B;AAC/B,iDAA+B;AAC/B,2EAAyD;AACzD,8CAA4B;AAC5B,4DAA0C;AAC1C,+CAA6B;AAC7B,6DAA2C;AAC3C,wDAAsC;AACtC,iDAA+B"}
package/package.json CHANGED
@@ -64,20 +64,20 @@
64
64
  "@js-soft/logging-abstractions": "^1.0.1",
65
65
  "@js-soft/ts-serval": "2.0.13",
66
66
  "@js-soft/ts-utils": "^2.3.4",
67
- "@nmshd/consumption": "6.62.3",
68
- "@nmshd/content": "6.62.3",
69
- "@nmshd/core-types": "6.62.3",
67
+ "@nmshd/consumption": "6.63.1",
68
+ "@nmshd/content": "6.63.1",
69
+ "@nmshd/core-types": "6.63.1",
70
70
  "@nmshd/crypto": "2.1.2",
71
71
  "@nmshd/iql": "^1.0.3",
72
- "@nmshd/runtime-types": "6.62.3",
73
- "@nmshd/transport": "6.62.3",
72
+ "@nmshd/runtime-types": "6.63.1",
73
+ "@nmshd/transport": "6.63.1",
74
74
  "@nmshd/typescript-ioc": "3.2.4",
75
75
  "ajv": "^8.17.1",
76
76
  "ajv-errors": "^3.0.0",
77
77
  "ajv-formats": "^3.0.1",
78
78
  "json-stringify-safe": "^5.0.1",
79
79
  "lodash": "^4.17.21",
80
- "luxon": "^3.7.1",
80
+ "luxon": "^3.7.2",
81
81
  "reflect-metadata": "^0.2.2",
82
82
  "ts-simple-nameof": "^1.3.3"
83
83
  },
@@ -95,5 +95,5 @@
95
95
  "access": "public",
96
96
  "provenance": true
97
97
  },
98
- "version": "6.62.3"
98
+ "version": "6.63.1"
99
99
  }