@nmshd/runtime 7.0.0 → 7.1.0-openid4vc.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.
Files changed (53) hide show
  1. package/dist/Runtime.d.ts.map +1 -1
  2. package/dist/Runtime.js +3 -0
  3. package/dist/Runtime.js.map +1 -1
  4. package/dist/buildInformation.js +5 -5
  5. package/dist/extensibility/ConsumptionServices.d.ts +3 -2
  6. package/dist/extensibility/ConsumptionServices.d.ts.map +1 -1
  7. package/dist/extensibility/ConsumptionServices.js +5 -2
  8. package/dist/extensibility/ConsumptionServices.js.map +1 -1
  9. package/dist/extensibility/facades/consumption/OpenId4VcFacade.d.ts +20 -0
  10. package/dist/extensibility/facades/consumption/OpenId4VcFacade.d.ts.map +1 -0
  11. package/dist/extensibility/facades/consumption/OpenId4VcFacade.js +64 -0
  12. package/dist/extensibility/facades/consumption/OpenId4VcFacade.js.map +1 -0
  13. package/dist/extensibility/facades/consumption/index.d.ts +1 -0
  14. package/dist/extensibility/facades/consumption/index.d.ts.map +1 -1
  15. package/dist/extensibility/facades/consumption/index.js +1 -0
  16. package/dist/extensibility/facades/consumption/index.js.map +1 -1
  17. package/dist/useCases/common/Schemas.d.ts +7 -0
  18. package/dist/useCases/common/Schemas.d.ts.map +1 -1
  19. package/dist/useCases/common/Schemas.js +410 -3
  20. package/dist/useCases/common/Schemas.js.map +1 -1
  21. package/dist/useCases/consumption/index.d.ts +1 -0
  22. package/dist/useCases/consumption/index.d.ts.map +1 -1
  23. package/dist/useCases/consumption/index.js +1 -0
  24. package/dist/useCases/consumption/index.js.map +1 -1
  25. package/dist/useCases/consumption/openid4vc/AcceptProofRequestUseCase.d.ts +17 -0
  26. package/dist/useCases/consumption/openid4vc/AcceptProofRequestUseCase.d.ts.map +1 -0
  27. package/dist/useCases/consumption/openid4vc/AcceptProofRequestUseCase.js +46 -0
  28. package/dist/useCases/consumption/openid4vc/AcceptProofRequestUseCase.js.map +1 -0
  29. package/dist/useCases/consumption/openid4vc/FetchCredentialOfferUseCase.d.ts +17 -0
  30. package/dist/useCases/consumption/openid4vc/FetchCredentialOfferUseCase.d.ts.map +1 -0
  31. package/dist/useCases/consumption/openid4vc/FetchCredentialOfferUseCase.js +46 -0
  32. package/dist/useCases/consumption/openid4vc/FetchCredentialOfferUseCase.js.map +1 -0
  33. package/dist/useCases/consumption/openid4vc/FetchProofRequestUseCase.d.ts +17 -0
  34. package/dist/useCases/consumption/openid4vc/FetchProofRequestUseCase.d.ts.map +1 -0
  35. package/dist/useCases/consumption/openid4vc/FetchProofRequestUseCase.js +46 -0
  36. package/dist/useCases/consumption/openid4vc/FetchProofRequestUseCase.js.map +1 -0
  37. package/dist/useCases/consumption/openid4vc/GetVerifiableCredentialsUseCase.d.ts +17 -0
  38. package/dist/useCases/consumption/openid4vc/GetVerifiableCredentialsUseCase.d.ts.map +1 -0
  39. package/dist/useCases/consumption/openid4vc/GetVerifiableCredentialsUseCase.js +48 -0
  40. package/dist/useCases/consumption/openid4vc/GetVerifiableCredentialsUseCase.js.map +1 -0
  41. package/dist/useCases/consumption/openid4vc/ResolveCredentialOfferUseCase.d.ts +17 -0
  42. package/dist/useCases/consumption/openid4vc/ResolveCredentialOfferUseCase.d.ts.map +1 -0
  43. package/dist/useCases/consumption/openid4vc/ResolveCredentialOfferUseCase.js +46 -0
  44. package/dist/useCases/consumption/openid4vc/ResolveCredentialOfferUseCase.js.map +1 -0
  45. package/dist/useCases/consumption/openid4vc/ResolveFetchedCredentialUseCase.d.ts +19 -0
  46. package/dist/useCases/consumption/openid4vc/ResolveFetchedCredentialUseCase.d.ts.map +1 -0
  47. package/dist/useCases/consumption/openid4vc/ResolveFetchedCredentialUseCase.js +51 -0
  48. package/dist/useCases/consumption/openid4vc/ResolveFetchedCredentialUseCase.js.map +1 -0
  49. package/dist/useCases/consumption/openid4vc/index.d.ts +6 -0
  50. package/dist/useCases/consumption/openid4vc/index.d.ts.map +1 -0
  51. package/dist/useCases/consumption/openid4vc/index.js +22 -0
  52. package/dist/useCases/consumption/openid4vc/index.js.map +1 -0
  53. package/package.json +10 -7
@@ -2,6 +2,7 @@ export * from "./attributes";
2
2
  export * from "./drafts";
3
3
  export * from "./identityMetadata";
4
4
  export * from "./notifications";
5
+ export * from "./openid4vc";
5
6
  export * from "./requests";
6
7
  export * from "./settings";
7
8
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/useCases/consumption/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/useCases/consumption/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC"}
@@ -18,6 +18,7 @@ __exportStar(require("./attributes"), exports);
18
18
  __exportStar(require("./drafts"), exports);
19
19
  __exportStar(require("./identityMetadata"), exports);
20
20
  __exportStar(require("./notifications"), exports);
21
+ __exportStar(require("./openid4vc"), exports);
21
22
  __exportStar(require("./requests"), exports);
22
23
  __exportStar(require("./settings"), exports);
23
24
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/useCases/consumption/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+CAA6B;AAC7B,2CAAyB;AACzB,qDAAmC;AACnC,kDAAgC;AAChC,6CAA2B;AAC3B,6CAA2B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/useCases/consumption/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+CAA6B;AAC7B,2CAAyB;AACzB,qDAAmC;AACnC,kDAAgC;AAChC,8CAA4B;AAC5B,6CAA2B;AAC3B,6CAA2B"}
@@ -0,0 +1,17 @@
1
+ import { Result } from "@js-soft/ts-utils";
2
+ import { OpenId4VcController } from "@nmshd/consumption";
3
+ import { AcceptProofRequestDTO } from "@nmshd/runtime-types";
4
+ import { SchemaRepository, SchemaValidator, UseCase } from "../../common";
5
+ export interface AcceptProofRequestRequest {
6
+ jsonEncodedRequest: string;
7
+ }
8
+ declare class Validator extends SchemaValidator<AcceptProofRequestRequest> {
9
+ constructor(schemaRepository: SchemaRepository);
10
+ }
11
+ export declare class AcceptProofRequestUseCase extends UseCase<AcceptProofRequestRequest, AcceptProofRequestDTO> {
12
+ private readonly openId4VcContoller;
13
+ constructor(openId4VcContoller: OpenId4VcController, validator: Validator);
14
+ protected executeInternal(request: AcceptProofRequestRequest): Promise<Result<AcceptProofRequestDTO>>;
15
+ }
16
+ export {};
17
+ //# sourceMappingURL=AcceptProofRequestUseCase.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AcceptProofRequestUseCase.d.ts","sourceRoot":"","sources":["../../../../src/useCases/consumption/openid4vc/AcceptProofRequestUseCase.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAE7D,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAE1E,MAAM,WAAW,yBAAyB;IACtC,kBAAkB,EAAE,MAAM,CAAC;CAC9B;AAED,cAAM,SAAU,SAAQ,eAAe,CAAC,yBAAyB,CAAC;gBACnC,gBAAgB,EAAE,gBAAgB;CAGhE;AAED,qBAAa,yBAA0B,SAAQ,OAAO,CAAC,yBAAyB,EAAE,qBAAqB,CAAC;IAExF,OAAO,CAAC,QAAQ,CAAC,kBAAkB;gBAAlB,kBAAkB,EAAE,mBAAmB,EACxD,SAAS,EAAE,SAAS;cAKP,eAAe,CAAC,OAAO,EAAE,yBAAyB,GAAG,OAAO,CAAC,MAAM,CAAC,qBAAqB,CAAC,CAAC;CAIvH"}
@@ -0,0 +1,46 @@
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.AcceptProofRequestUseCase = 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("@nmshd/typescript-ioc");
19
+ const common_1 = require("../../common");
20
+ let Validator = class Validator extends common_1.SchemaValidator {
21
+ constructor(schemaRepository) {
22
+ super(schemaRepository.getSchema("AcceptProofRequestRequest"));
23
+ }
24
+ };
25
+ Validator = __decorate([
26
+ __param(0, typescript_ioc_1.Inject),
27
+ __metadata("design:paramtypes", [common_1.SchemaRepository])
28
+ ], Validator);
29
+ let AcceptProofRequestUseCase = class AcceptProofRequestUseCase extends common_1.UseCase {
30
+ constructor(openId4VcContoller, validator) {
31
+ super(validator);
32
+ this.openId4VcContoller = openId4VcContoller;
33
+ }
34
+ async executeInternal(request) {
35
+ const result = await this.openId4VcContoller.acceptProofRequest(request.jsonEncodedRequest);
36
+ return ts_utils_1.Result.ok({ status: result.status, message: result.success });
37
+ }
38
+ };
39
+ exports.AcceptProofRequestUseCase = AcceptProofRequestUseCase;
40
+ exports.AcceptProofRequestUseCase = AcceptProofRequestUseCase = __decorate([
41
+ __param(0, typescript_ioc_1.Inject),
42
+ __param(1, typescript_ioc_1.Inject),
43
+ __metadata("design:paramtypes", [consumption_1.OpenId4VcController,
44
+ Validator])
45
+ ], AcceptProofRequestUseCase);
46
+ //# sourceMappingURL=AcceptProofRequestUseCase.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AcceptProofRequestUseCase.js","sourceRoot":"","sources":["../../../../src/useCases/consumption/openid4vc/AcceptProofRequestUseCase.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,gDAA2C;AAC3C,oDAAyD;AAEzD,0DAA+C;AAC/C,yCAA0E;AAM1E,IAAM,SAAS,GAAf,MAAM,SAAU,SAAQ,wBAA0C;IAC9D,YAA2B,gBAAkC;QACzD,KAAK,CAAC,gBAAgB,CAAC,SAAS,CAAC,2BAA2B,CAAC,CAAC,CAAC;IACnE,CAAC;CACJ,CAAA;AAJK,SAAS;IACS,WAAA,uBAAM,CAAA;qCAAmB,yBAAgB;GAD3D,SAAS,CAId;AAED,IAAa,yBAAyB,GAAtC,MAAa,yBAA0B,SAAQ,gBAAyD;IACpG,YAC6B,kBAAuC,EACxD,SAAoB;QAE5B,KAAK,CAAC,SAAS,CAAC,CAAC;QAHQ,uBAAkB,GAAlB,kBAAkB,CAAqB;IAIpE,CAAC;IAEkB,KAAK,CAAC,eAAe,CAAC,OAAkC;QACvE,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,kBAAkB,CAAC,kBAAkB,CAAC,OAAO,CAAC,kBAAkB,CAAC,CAAC;QAC5F,OAAO,iBAAM,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,OAAO,EAA2B,CAAC,CAAC;IAClG,CAAC;CACJ,CAAA;AAZY,8DAAyB;oCAAzB,yBAAyB;IAE7B,WAAA,uBAAM,CAAA;IACN,WAAA,uBAAM,CAAA;qCADsC,iCAAmB;QAC7C,SAAS;GAHvB,yBAAyB,CAYrC"}
@@ -0,0 +1,17 @@
1
+ import { Result } from "@js-soft/ts-utils";
2
+ import { OpenId4VcController } from "@nmshd/consumption";
3
+ import { FetchedCredentialOfferDTO } from "@nmshd/runtime-types";
4
+ import { SchemaRepository, SchemaValidator, UseCase } from "../../common";
5
+ export interface FetchCredentialOfferRequest {
6
+ credentialOfferUrl: string;
7
+ }
8
+ declare class Validator extends SchemaValidator<FetchCredentialOfferRequest> {
9
+ constructor(schemaRepository: SchemaRepository);
10
+ }
11
+ export declare class FetchCredentialOfferUseCase extends UseCase<FetchCredentialOfferRequest, FetchedCredentialOfferDTO> {
12
+ private readonly openId4VcContoller;
13
+ constructor(openId4VcContoller: OpenId4VcController, validator: Validator);
14
+ protected executeInternal(request: FetchCredentialOfferRequest): Promise<Result<FetchedCredentialOfferDTO>>;
15
+ }
16
+ export {};
17
+ //# sourceMappingURL=FetchCredentialOfferUseCase.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FetchCredentialOfferUseCase.d.ts","sourceRoot":"","sources":["../../../../src/useCases/consumption/openid4vc/FetchCredentialOfferUseCase.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EAAE,yBAAyB,EAAE,MAAM,sBAAsB,CAAC;AAEjE,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAE1E,MAAM,WAAW,2BAA2B;IACxC,kBAAkB,EAAE,MAAM,CAAC;CAC9B;AAED,cAAM,SAAU,SAAQ,eAAe,CAAC,2BAA2B,CAAC;gBACrC,gBAAgB,EAAE,gBAAgB;CAGhE;AAED,qBAAa,2BAA4B,SAAQ,OAAO,CAAC,2BAA2B,EAAE,yBAAyB,CAAC;IAEhG,OAAO,CAAC,QAAQ,CAAC,kBAAkB;gBAAlB,kBAAkB,EAAE,mBAAmB,EACxD,SAAS,EAAE,SAAS;cAKP,eAAe,CAAC,OAAO,EAAE,2BAA2B,GAAG,OAAO,CAAC,MAAM,CAAC,yBAAyB,CAAC,CAAC;CAI7H"}
@@ -0,0 +1,46 @@
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.FetchCredentialOfferUseCase = 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("@nmshd/typescript-ioc");
19
+ const common_1 = require("../../common");
20
+ let Validator = class Validator extends common_1.SchemaValidator {
21
+ constructor(schemaRepository) {
22
+ super(schemaRepository.getSchema("ResolveCredentialOfferRequest"));
23
+ }
24
+ };
25
+ Validator = __decorate([
26
+ __param(0, typescript_ioc_1.Inject),
27
+ __metadata("design:paramtypes", [common_1.SchemaRepository])
28
+ ], Validator);
29
+ let FetchCredentialOfferUseCase = class FetchCredentialOfferUseCase extends common_1.UseCase {
30
+ constructor(openId4VcContoller, validator) {
31
+ super(validator);
32
+ this.openId4VcContoller = openId4VcContoller;
33
+ }
34
+ async executeInternal(request) {
35
+ const result = await this.openId4VcContoller.fetchCredentialOffer(request.credentialOfferUrl);
36
+ return ts_utils_1.Result.ok({ jsonRepresentation: result.data });
37
+ }
38
+ };
39
+ exports.FetchCredentialOfferUseCase = FetchCredentialOfferUseCase;
40
+ exports.FetchCredentialOfferUseCase = FetchCredentialOfferUseCase = __decorate([
41
+ __param(0, typescript_ioc_1.Inject),
42
+ __param(1, typescript_ioc_1.Inject),
43
+ __metadata("design:paramtypes", [consumption_1.OpenId4VcController,
44
+ Validator])
45
+ ], FetchCredentialOfferUseCase);
46
+ //# sourceMappingURL=FetchCredentialOfferUseCase.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FetchCredentialOfferUseCase.js","sourceRoot":"","sources":["../../../../src/useCases/consumption/openid4vc/FetchCredentialOfferUseCase.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,gDAA2C;AAC3C,oDAAyD;AAEzD,0DAA+C;AAC/C,yCAA0E;AAM1E,IAAM,SAAS,GAAf,MAAM,SAAU,SAAQ,wBAA4C;IAChE,YAA2B,gBAAkC;QACzD,KAAK,CAAC,gBAAgB,CAAC,SAAS,CAAC,+BAA+B,CAAC,CAAC,CAAC;IACvE,CAAC;CACJ,CAAA;AAJK,SAAS;IACS,WAAA,uBAAM,CAAA;qCAAmB,yBAAgB;GAD3D,SAAS,CAId;AAED,IAAa,2BAA2B,GAAxC,MAAa,2BAA4B,SAAQ,gBAA+D;IAC5G,YAC6B,kBAAuC,EACxD,SAAoB;QAE5B,KAAK,CAAC,SAAS,CAAC,CAAC;QAHQ,uBAAkB,GAAlB,kBAAkB,CAAqB;IAIpE,CAAC;IAEkB,KAAK,CAAC,eAAe,CAAC,OAAoC;QACzE,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,kBAAkB,CAAC,oBAAoB,CAAC,OAAO,CAAC,kBAAkB,CAAC,CAAC;QAC9F,OAAO,iBAAM,CAAC,EAAE,CAAC,EAAE,kBAAkB,EAAE,MAAM,CAAC,IAAI,EAA+B,CAAC,CAAC;IACvF,CAAC;CACJ,CAAA;AAZY,kEAA2B;sCAA3B,2BAA2B;IAE/B,WAAA,uBAAM,CAAA;IACN,WAAA,uBAAM,CAAA;qCADsC,iCAAmB;QAC7C,SAAS;GAHvB,2BAA2B,CAYvC"}
@@ -0,0 +1,17 @@
1
+ import { Result } from "@js-soft/ts-utils";
2
+ import { OpenId4VcController } from "@nmshd/consumption";
3
+ import { FetchedProofRequestDTO } from "@nmshd/runtime-types";
4
+ import { SchemaRepository, SchemaValidator, UseCase } from "../../common";
5
+ export interface FetchProofRequestRequest {
6
+ proofRequestUrl: string;
7
+ }
8
+ declare class Validator extends SchemaValidator<FetchProofRequestRequest> {
9
+ constructor(schemaRepository: SchemaRepository);
10
+ }
11
+ export declare class FetchProofRequestUseCase extends UseCase<FetchProofRequestRequest, FetchedProofRequestDTO> {
12
+ private readonly openId4VcContoller;
13
+ constructor(openId4VcContoller: OpenId4VcController, validator: Validator);
14
+ protected executeInternal(request: FetchProofRequestRequest): Promise<Result<FetchedProofRequestDTO>>;
15
+ }
16
+ export {};
17
+ //# sourceMappingURL=FetchProofRequestUseCase.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FetchProofRequestUseCase.d.ts","sourceRoot":"","sources":["../../../../src/useCases/consumption/openid4vc/FetchProofRequestUseCase.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AAE9D,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAE1E,MAAM,WAAW,wBAAwB;IACrC,eAAe,EAAE,MAAM,CAAC;CAC3B;AAED,cAAM,SAAU,SAAQ,eAAe,CAAC,wBAAwB,CAAC;gBAClC,gBAAgB,EAAE,gBAAgB;CAGhE;AAED,qBAAa,wBAAyB,SAAQ,OAAO,CAAC,wBAAwB,EAAE,sBAAsB,CAAC;IAEvF,OAAO,CAAC,QAAQ,CAAC,kBAAkB;gBAAlB,kBAAkB,EAAE,mBAAmB,EACxD,SAAS,EAAE,SAAS;cAKP,eAAe,CAAC,OAAO,EAAE,wBAAwB,GAAG,OAAO,CAAC,MAAM,CAAC,sBAAsB,CAAC,CAAC;CAIvH"}
@@ -0,0 +1,46 @@
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.FetchProofRequestUseCase = 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("@nmshd/typescript-ioc");
19
+ const common_1 = require("../../common");
20
+ let Validator = class Validator extends common_1.SchemaValidator {
21
+ constructor(schemaRepository) {
22
+ super(schemaRepository.getSchema("FetchProofRequestRequest"));
23
+ }
24
+ };
25
+ Validator = __decorate([
26
+ __param(0, typescript_ioc_1.Inject),
27
+ __metadata("design:paramtypes", [common_1.SchemaRepository])
28
+ ], Validator);
29
+ let FetchProofRequestUseCase = class FetchProofRequestUseCase extends common_1.UseCase {
30
+ constructor(openId4VcContoller, validator) {
31
+ super(validator);
32
+ this.openId4VcContoller = openId4VcContoller;
33
+ }
34
+ async executeInternal(request) {
35
+ const result = await this.openId4VcContoller.fetchProofRequest(request.proofRequestUrl);
36
+ return ts_utils_1.Result.ok({ jsonRepresentation: result.data });
37
+ }
38
+ };
39
+ exports.FetchProofRequestUseCase = FetchProofRequestUseCase;
40
+ exports.FetchProofRequestUseCase = FetchProofRequestUseCase = __decorate([
41
+ __param(0, typescript_ioc_1.Inject),
42
+ __param(1, typescript_ioc_1.Inject),
43
+ __metadata("design:paramtypes", [consumption_1.OpenId4VcController,
44
+ Validator])
45
+ ], FetchProofRequestUseCase);
46
+ //# sourceMappingURL=FetchProofRequestUseCase.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FetchProofRequestUseCase.js","sourceRoot":"","sources":["../../../../src/useCases/consumption/openid4vc/FetchProofRequestUseCase.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,gDAA2C;AAC3C,oDAAyD;AAEzD,0DAA+C;AAC/C,yCAA0E;AAM1E,IAAM,SAAS,GAAf,MAAM,SAAU,SAAQ,wBAAyC;IAC7D,YAA2B,gBAAkC;QACzD,KAAK,CAAC,gBAAgB,CAAC,SAAS,CAAC,0BAA0B,CAAC,CAAC,CAAC;IAClE,CAAC;CACJ,CAAA;AAJK,SAAS;IACS,WAAA,uBAAM,CAAA;qCAAmB,yBAAgB;GAD3D,SAAS,CAId;AAED,IAAa,wBAAwB,GAArC,MAAa,wBAAyB,SAAQ,gBAAyD;IACnG,YAC6B,kBAAuC,EACxD,SAAoB;QAE5B,KAAK,CAAC,SAAS,CAAC,CAAC;QAHQ,uBAAkB,GAAlB,kBAAkB,CAAqB;IAIpE,CAAC;IAEkB,KAAK,CAAC,eAAe,CAAC,OAAiC;QACtE,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,kBAAkB,CAAC,iBAAiB,CAAC,OAAO,CAAC,eAAe,CAAC,CAAC;QACxF,OAAO,iBAAM,CAAC,EAAE,CAAC,EAAE,kBAAkB,EAAE,MAAM,CAAC,IAAI,EAA4B,CAAC,CAAC;IACpF,CAAC;CACJ,CAAA;AAZY,4DAAwB;mCAAxB,wBAAwB;IAE5B,WAAA,uBAAM,CAAA;IACN,WAAA,uBAAM,CAAA;qCADsC,iCAAmB;QAC7C,SAAS;GAHvB,wBAAwB,CAYpC"}
@@ -0,0 +1,17 @@
1
+ import { Result } from "@js-soft/ts-utils";
2
+ import { OpenId4VcController } from "@nmshd/consumption";
3
+ import { VerifiableCredentialDTO } from "@nmshd/runtime-types";
4
+ import { SchemaRepository, SchemaValidator, UseCase } from "../../common";
5
+ export interface GetVerifiableCredentialsRequest {
6
+ ids: string[] | undefined;
7
+ }
8
+ declare class Validator extends SchemaValidator<GetVerifiableCredentialsRequest> {
9
+ constructor(schemaRepository: SchemaRepository);
10
+ }
11
+ export declare class GetVerifiableCredentialsUseCase extends UseCase<GetVerifiableCredentialsRequest, VerifiableCredentialDTO[]> {
12
+ private readonly openId4VcContoller;
13
+ constructor(openId4VcContoller: OpenId4VcController, validator: Validator);
14
+ protected executeInternal(request: GetVerifiableCredentialsRequest): Promise<Result<VerifiableCredentialDTO[]>>;
15
+ }
16
+ export {};
17
+ //# sourceMappingURL=GetVerifiableCredentialsUseCase.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GetVerifiableCredentialsUseCase.d.ts","sourceRoot":"","sources":["../../../../src/useCases/consumption/openid4vc/GetVerifiableCredentialsUseCase.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AAE/D,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAE1E,MAAM,WAAW,+BAA+B;IAC5C,GAAG,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC;CAC7B;AAED,cAAM,SAAU,SAAQ,eAAe,CAAC,+BAA+B,CAAC;gBACzC,gBAAgB,EAAE,gBAAgB;CAGhE;AAED,qBAAa,+BAAgC,SAAQ,OAAO,CAAC,+BAA+B,EAAE,uBAAuB,EAAE,CAAC;IAExG,OAAO,CAAC,QAAQ,CAAC,kBAAkB;gBAAlB,kBAAkB,EAAE,mBAAmB,EACxD,SAAS,EAAE,SAAS;cAKP,eAAe,CAAC,OAAO,EAAE,+BAA+B,GAAG,OAAO,CAAC,MAAM,CAAC,uBAAuB,EAAE,CAAC,CAAC;CAMjI"}
@@ -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.GetVerifiableCredentialsUseCase = 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("@nmshd/typescript-ioc");
19
+ const common_1 = require("../../common");
20
+ let Validator = class Validator extends common_1.SchemaValidator {
21
+ constructor(schemaRepository) {
22
+ super(schemaRepository.getSchema("GetVerifiableCredentialsRequest"));
23
+ }
24
+ };
25
+ Validator = __decorate([
26
+ __param(0, typescript_ioc_1.Inject),
27
+ __metadata("design:paramtypes", [common_1.SchemaRepository])
28
+ ], Validator);
29
+ let GetVerifiableCredentialsUseCase = class GetVerifiableCredentialsUseCase extends common_1.UseCase {
30
+ constructor(openId4VcContoller, validator) {
31
+ super(validator);
32
+ this.openId4VcContoller = openId4VcContoller;
33
+ }
34
+ async executeInternal(request) {
35
+ // eslint-disable-next-line no-console
36
+ console.log("GetVerifiableCredentialsUseCase called with ids:", JSON.stringify(request.ids));
37
+ const credentials = await this.openId4VcContoller.getVerifiableCredentials(request.ids);
38
+ return ts_utils_1.Result.ok(credentials);
39
+ }
40
+ };
41
+ exports.GetVerifiableCredentialsUseCase = GetVerifiableCredentialsUseCase;
42
+ exports.GetVerifiableCredentialsUseCase = GetVerifiableCredentialsUseCase = __decorate([
43
+ __param(0, typescript_ioc_1.Inject),
44
+ __param(1, typescript_ioc_1.Inject),
45
+ __metadata("design:paramtypes", [consumption_1.OpenId4VcController,
46
+ Validator])
47
+ ], GetVerifiableCredentialsUseCase);
48
+ //# sourceMappingURL=GetVerifiableCredentialsUseCase.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GetVerifiableCredentialsUseCase.js","sourceRoot":"","sources":["../../../../src/useCases/consumption/openid4vc/GetVerifiableCredentialsUseCase.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,gDAA2C;AAC3C,oDAAyD;AAEzD,0DAA+C;AAC/C,yCAA0E;AAM1E,IAAM,SAAS,GAAf,MAAM,SAAU,SAAQ,wBAAgD;IACpE,YAA2B,gBAAkC;QACzD,KAAK,CAAC,gBAAgB,CAAC,SAAS,CAAC,iCAAiC,CAAC,CAAC,CAAC;IACzE,CAAC;CACJ,CAAA;AAJK,SAAS;IACS,WAAA,uBAAM,CAAA;qCAAmB,yBAAgB;GAD3D,SAAS,CAId;AAED,IAAa,+BAA+B,GAA5C,MAAa,+BAAgC,SAAQ,gBAAmE;IACpH,YAC6B,kBAAuC,EACxD,SAAoB;QAE5B,KAAK,CAAC,SAAS,CAAC,CAAC;QAHQ,uBAAkB,GAAlB,kBAAkB,CAAqB;IAIpE,CAAC;IAEkB,KAAK,CAAC,eAAe,CAAC,OAAwC;QAC7E,sCAAsC;QACtC,OAAO,CAAC,GAAG,CAAC,kDAAkD,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC;QAC7F,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC,kBAAkB,CAAC,wBAAwB,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QACxF,OAAO,iBAAM,CAAC,EAAE,CAAC,WAAwC,CAAC,CAAC;IAC/D,CAAC;CACJ,CAAA;AAdY,0EAA+B;0CAA/B,+BAA+B;IAEnC,WAAA,uBAAM,CAAA;IACN,WAAA,uBAAM,CAAA;qCADsC,iCAAmB;QAC7C,SAAS;GAHvB,+BAA+B,CAc3C"}
@@ -0,0 +1,17 @@
1
+ import { Result } from "@js-soft/ts-utils";
2
+ import { OpenId4VcController } from "@nmshd/consumption";
3
+ import { VerifiableCredentialDTO } from "@nmshd/runtime-types";
4
+ import { SchemaRepository, SchemaValidator, UseCase } from "../../common";
5
+ export interface ResolveCredentialOfferRequest {
6
+ credentialOfferUrl: string;
7
+ }
8
+ declare class Validator extends SchemaValidator<ResolveCredentialOfferRequest> {
9
+ constructor(schemaRepository: SchemaRepository);
10
+ }
11
+ export declare class ResolveCredentialOfferUseCase extends UseCase<ResolveCredentialOfferRequest, VerifiableCredentialDTO> {
12
+ private readonly openId4VcContoller;
13
+ constructor(openId4VcContoller: OpenId4VcController, validator: Validator);
14
+ protected executeInternal(request: ResolveCredentialOfferRequest): Promise<Result<VerifiableCredentialDTO>>;
15
+ }
16
+ export {};
17
+ //# sourceMappingURL=ResolveCredentialOfferUseCase.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ResolveCredentialOfferUseCase.d.ts","sourceRoot":"","sources":["../../../../src/useCases/consumption/openid4vc/ResolveCredentialOfferUseCase.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AAE/D,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAE1E,MAAM,WAAW,6BAA6B;IAC1C,kBAAkB,EAAE,MAAM,CAAC;CAC9B;AAED,cAAM,SAAU,SAAQ,eAAe,CAAC,6BAA6B,CAAC;gBACvC,gBAAgB,EAAE,gBAAgB;CAGhE;AAED,qBAAa,6BAA8B,SAAQ,OAAO,CAAC,6BAA6B,EAAE,uBAAuB,CAAC;IAElG,OAAO,CAAC,QAAQ,CAAC,kBAAkB;gBAAlB,kBAAkB,EAAE,mBAAmB,EACxD,SAAS,EAAE,SAAS;cAKP,eAAe,CAAC,OAAO,EAAE,6BAA6B,GAAG,OAAO,CAAC,MAAM,CAAC,uBAAuB,CAAC,CAAC;CAI7H"}
@@ -0,0 +1,46 @@
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.ResolveCredentialOfferUseCase = 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("@nmshd/typescript-ioc");
19
+ const common_1 = require("../../common");
20
+ let Validator = class Validator extends common_1.SchemaValidator {
21
+ constructor(schemaRepository) {
22
+ super(schemaRepository.getSchema("ResolveCredentialOfferRequest"));
23
+ }
24
+ };
25
+ Validator = __decorate([
26
+ __param(0, typescript_ioc_1.Inject),
27
+ __metadata("design:paramtypes", [common_1.SchemaRepository])
28
+ ], Validator);
29
+ let ResolveCredentialOfferUseCase = class ResolveCredentialOfferUseCase extends common_1.UseCase {
30
+ constructor(openId4VcContoller, validator) {
31
+ super(validator);
32
+ this.openId4VcContoller = openId4VcContoller;
33
+ }
34
+ async executeInternal(request) {
35
+ const result = await this.openId4VcContoller.processCredentialOffer(request.credentialOfferUrl);
36
+ return ts_utils_1.Result.ok({ id: result.value.id, data: result.value.data });
37
+ }
38
+ };
39
+ exports.ResolveCredentialOfferUseCase = ResolveCredentialOfferUseCase;
40
+ exports.ResolveCredentialOfferUseCase = ResolveCredentialOfferUseCase = __decorate([
41
+ __param(0, typescript_ioc_1.Inject),
42
+ __param(1, typescript_ioc_1.Inject),
43
+ __metadata("design:paramtypes", [consumption_1.OpenId4VcController,
44
+ Validator])
45
+ ], ResolveCredentialOfferUseCase);
46
+ //# sourceMappingURL=ResolveCredentialOfferUseCase.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ResolveCredentialOfferUseCase.js","sourceRoot":"","sources":["../../../../src/useCases/consumption/openid4vc/ResolveCredentialOfferUseCase.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,gDAA2C;AAC3C,oDAAyD;AAEzD,0DAA+C;AAC/C,yCAA0E;AAM1E,IAAM,SAAS,GAAf,MAAM,SAAU,SAAQ,wBAA8C;IAClE,YAA2B,gBAAkC;QACzD,KAAK,CAAC,gBAAgB,CAAC,SAAS,CAAC,+BAA+B,CAAC,CAAC,CAAC;IACvE,CAAC;CACJ,CAAA;AAJK,SAAS;IACS,WAAA,uBAAM,CAAA;qCAAmB,yBAAgB;GAD3D,SAAS,CAId;AAED,IAAa,6BAA6B,GAA1C,MAAa,6BAA8B,SAAQ,gBAA+D;IAC9G,YAC6B,kBAAuC,EACxD,SAAoB;QAE5B,KAAK,CAAC,SAAS,CAAC,CAAC;QAHQ,uBAAkB,GAAlB,kBAAkB,CAAqB;IAIpE,CAAC;IAEkB,KAAK,CAAC,eAAe,CAAC,OAAsC;QAC3E,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,kBAAkB,CAAC,sBAAsB,CAAC,OAAO,CAAC,kBAAkB,CAAC,CAAC;QAChG,OAAO,iBAAM,CAAC,EAAE,CAAC,EAAE,EAAE,EAAE,MAAM,CAAC,KAAK,CAAC,EAAE,EAAE,IAAI,EAAE,MAAM,CAAC,KAAK,CAAC,IAAI,EAA6B,CAAC,CAAC;IAClG,CAAC;CACJ,CAAA;AAZY,sEAA6B;wCAA7B,6BAA6B;IAEjC,WAAA,uBAAM,CAAA;IACN,WAAA,uBAAM,CAAA;qCADsC,iCAAmB;QAC7C,SAAS;GAHvB,6BAA6B,CAYzC"}
@@ -0,0 +1,19 @@
1
+ import { Result } from "@js-soft/ts-utils";
2
+ import { OpenId4VcController } from "@nmshd/consumption";
3
+ import { VerifiableCredentialDTO } from "@nmshd/runtime-types";
4
+ import { SchemaRepository, SchemaValidator, UseCase } from "../../common";
5
+ export interface FetchedCredentialOfferRequest {
6
+ data: string;
7
+ pinCode?: string;
8
+ requestedCredentials: string[];
9
+ }
10
+ declare class Validator extends SchemaValidator<FetchedCredentialOfferRequest> {
11
+ constructor(schemaRepository: SchemaRepository);
12
+ }
13
+ export declare class ResolveFetchedCredentialOfferUseCase extends UseCase<FetchedCredentialOfferRequest, VerifiableCredentialDTO> {
14
+ private readonly openId4VcContoller;
15
+ constructor(openId4VcContoller: OpenId4VcController, validator: Validator);
16
+ protected executeInternal(request: FetchedCredentialOfferRequest): Promise<Result<VerifiableCredentialDTO>>;
17
+ }
18
+ export {};
19
+ //# sourceMappingURL=ResolveFetchedCredentialUseCase.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ResolveFetchedCredentialUseCase.d.ts","sourceRoot":"","sources":["../../../../src/useCases/consumption/openid4vc/ResolveFetchedCredentialUseCase.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AAE/D,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAE1E,MAAM,WAAW,6BAA6B;IAC1C,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,oBAAoB,EAAE,MAAM,EAAE,CAAC;CAClC;AAED,cAAM,SAAU,SAAQ,eAAe,CAAC,6BAA6B,CAAC;gBACvC,gBAAgB,EAAE,gBAAgB;CAGhE;AAED,qBAAa,oCAAqC,SAAQ,OAAO,CAAC,6BAA6B,EAAE,uBAAuB,CAAC;IAEzG,OAAO,CAAC,QAAQ,CAAC,kBAAkB;gBAAlB,kBAAkB,EAAE,mBAAmB,EACxD,SAAS,EAAE,SAAS;cAKP,eAAe,CAAC,OAAO,EAAE,6BAA6B,GAAG,OAAO,CAAC,MAAM,CAAC,uBAAuB,CAAC,CAAC;CAS7H"}
@@ -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.ResolveFetchedCredentialOfferUseCase = 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("@nmshd/typescript-ioc");
19
+ const common_1 = require("../../common");
20
+ let Validator = class Validator extends common_1.SchemaValidator {
21
+ constructor(schemaRepository) {
22
+ super(schemaRepository.getSchema("FetchedCredentialOfferRequest"));
23
+ }
24
+ };
25
+ Validator = __decorate([
26
+ __param(0, typescript_ioc_1.Inject),
27
+ __metadata("design:paramtypes", [common_1.SchemaRepository])
28
+ ], Validator);
29
+ let ResolveFetchedCredentialOfferUseCase = class ResolveFetchedCredentialOfferUseCase extends common_1.UseCase {
30
+ constructor(openId4VcContoller, validator) {
31
+ super(validator);
32
+ this.openId4VcContoller = openId4VcContoller;
33
+ }
34
+ async executeInternal(request) {
35
+ const result = await this.openId4VcContoller.processFetchedCredentialOffer(request.data, request.requestedCredentials, request.pinCode);
36
+ return ts_utils_1.Result.ok({
37
+ data: result.data,
38
+ id: result.id,
39
+ type: result.type,
40
+ displayInformation: result.displayInformation
41
+ });
42
+ }
43
+ };
44
+ exports.ResolveFetchedCredentialOfferUseCase = ResolveFetchedCredentialOfferUseCase;
45
+ exports.ResolveFetchedCredentialOfferUseCase = ResolveFetchedCredentialOfferUseCase = __decorate([
46
+ __param(0, typescript_ioc_1.Inject),
47
+ __param(1, typescript_ioc_1.Inject),
48
+ __metadata("design:paramtypes", [consumption_1.OpenId4VcController,
49
+ Validator])
50
+ ], ResolveFetchedCredentialOfferUseCase);
51
+ //# sourceMappingURL=ResolveFetchedCredentialUseCase.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ResolveFetchedCredentialUseCase.js","sourceRoot":"","sources":["../../../../src/useCases/consumption/openid4vc/ResolveFetchedCredentialUseCase.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,gDAA2C;AAC3C,oDAAyD;AAEzD,0DAA+C;AAC/C,yCAA0E;AAQ1E,IAAM,SAAS,GAAf,MAAM,SAAU,SAAQ,wBAA8C;IAClE,YAA2B,gBAAkC;QACzD,KAAK,CAAC,gBAAgB,CAAC,SAAS,CAAC,+BAA+B,CAAC,CAAC,CAAC;IACvE,CAAC;CACJ,CAAA;AAJK,SAAS;IACS,WAAA,uBAAM,CAAA;qCAAmB,yBAAgB;GAD3D,SAAS,CAId;AAED,IAAa,oCAAoC,GAAjD,MAAa,oCAAqC,SAAQ,gBAA+D;IACrH,YAC6B,kBAAuC,EACxD,SAAoB;QAE5B,KAAK,CAAC,SAAS,CAAC,CAAC;QAHQ,uBAAkB,GAAlB,kBAAkB,CAAqB;IAIpE,CAAC;IAEkB,KAAK,CAAC,eAAe,CAAC,OAAsC;QAC3E,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,kBAAkB,CAAC,6BAA6B,CAAC,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,oBAAoB,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;QACxI,OAAO,iBAAM,CAAC,EAAE,CAAC;YACb,IAAI,EAAE,MAAM,CAAC,IAAI;YACjB,EAAE,EAAE,MAAM,CAAC,EAAE;YACb,IAAI,EAAE,MAAM,CAAC,IAAI;YACjB,kBAAkB,EAAE,MAAM,CAAC,kBAAkB;SAChD,CAAC,CAAC;IACP,CAAC;CACJ,CAAA;AAjBY,oFAAoC;+CAApC,oCAAoC;IAExC,WAAA,uBAAM,CAAA;IACN,WAAA,uBAAM,CAAA;qCADsC,iCAAmB;QAC7C,SAAS;GAHvB,oCAAoC,CAiBhD"}
@@ -0,0 +1,6 @@
1
+ export * from "./AcceptProofRequestUseCase";
2
+ export * from "./FetchCredentialOfferUseCase";
3
+ export * from "./FetchProofRequestUseCase";
4
+ export * from "./ResolveCredentialOfferUseCase";
5
+ export * from "./ResolveFetchedCredentialUseCase";
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/useCases/consumption/openid4vc/index.ts"],"names":[],"mappings":"AAAA,cAAc,6BAA6B,CAAC;AAC5C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,iCAAiC,CAAC;AAChD,cAAc,mCAAmC,CAAC"}
@@ -0,0 +1,22 @@
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("./AcceptProofRequestUseCase"), exports);
18
+ __exportStar(require("./FetchCredentialOfferUseCase"), exports);
19
+ __exportStar(require("./FetchProofRequestUseCase"), exports);
20
+ __exportStar(require("./ResolveCredentialOfferUseCase"), exports);
21
+ __exportStar(require("./ResolveFetchedCredentialUseCase"), exports);
22
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/useCases/consumption/openid4vc/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8DAA4C;AAC5C,gEAA8C;AAC9C,6DAA2C;AAC3C,kEAAgD;AAChD,oEAAkD"}
package/package.json CHANGED
@@ -25,7 +25,7 @@
25
25
  "test:ci:lokijs": "USE_LOKIJS=true jest -i --coverage",
26
26
  "test:ci:mongodb": "jest -i --coverage",
27
27
  "test:local:ferretdb": "npm run test:local:start:ferretdb && CONNECTION_STRING='mongodb://root:example@localhost:27022' jest",
28
- "test:local:lokijs": "USE_LOKIJS=true jest",
28
+ "test:local:lokijs": "USE_LOKIJS=true jest -- openid4vc.test.ts",
29
29
  "test:local:mongodb": "npm run test:local:start:mongodb && CONNECTION_STRING='mongodb://root:example@localhost:27021' jest",
30
30
  "test:local:start:ferretdb": "docker compose -f ../../.dev/compose.yml up -d runtime-ferret",
31
31
  "test:local:start:mongodb": "docker compose -f ../../.dev/compose.yml up -d runtime-mongo",
@@ -64,17 +64,19 @@
64
64
  "@js-soft/logging-abstractions": "^1.0.2",
65
65
  "@js-soft/ts-serval": "2.0.14",
66
66
  "@js-soft/ts-utils": "^2.3.5",
67
- "@nmshd/consumption": "7.0.0",
68
- "@nmshd/content": "7.0.0",
69
- "@nmshd/core-types": "7.0.0",
67
+ "@nmshd/consumption": "7.1.0-openid4vc.1",
68
+ "@nmshd/content": "7.1.0-openid4vc.1",
69
+ "@nmshd/core-types": "7.1.0-openid4vc.1",
70
70
  "@nmshd/crypto": "2.1.3",
71
71
  "@nmshd/iql": "^1.0.4",
72
- "@nmshd/runtime-types": "7.0.0",
73
- "@nmshd/transport": "7.0.0",
72
+ "@nmshd/runtime-types": "7.1.0-openid4vc.1",
73
+ "@nmshd/transport": "7.1.0-openid4vc.1",
74
74
  "@nmshd/typescript-ioc": "3.2.5",
75
75
  "ajv": "^8.17.1",
76
76
  "ajv-errors": "^3.0.0",
77
77
  "ajv-formats": "^3.0.1",
78
+ "elliptic": "^6.6.1",
79
+ "https": "^1.0.0",
78
80
  "json-stringify-safe": "^5.0.1",
79
81
  "lodash": "^4.17.21",
80
82
  "luxon": "^3.7.2",
@@ -82,6 +84,7 @@
82
84
  "ts-simple-nameof": "^1.3.3"
83
85
  },
84
86
  "devDependencies": {
87
+ "@types/elliptic": "^6.4.18",
85
88
  "@js-soft/docdb-access-loki": "1.3.1",
86
89
  "@js-soft/docdb-access-mongo": "1.3.1",
87
90
  "@js-soft/node-logger": "1.2.1",
@@ -95,5 +98,5 @@
95
98
  "access": "public",
96
99
  "provenance": true
97
100
  },
98
- "version": "7.0.0"
101
+ "version": "7.1.0-openid4vc.1"
99
102
  }