@nmshd/consumption 7.2.0-openid4vc.5 → 7.2.0-openid4vc.7

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.
@@ -6,10 +6,10 @@ const content_1 = require("@nmshd/content");
6
6
  const crypto_1 = require("@nmshd/crypto");
7
7
  const transport_1 = require("@nmshd/transport");
8
8
  exports.buildInformation = {
9
- version: "7.2.0-openid4vc.5",
10
- build: "386",
11
- date: "2025-12-08T16:45:45+00:00",
12
- commit: "f8ce1861b2fd520f29aa60fe03298dadee14d908",
9
+ version: "7.2.0-openid4vc.7",
10
+ build: "388",
11
+ date: "2025-12-15T08:14:12+00:00",
12
+ commit: "cada1507a6b83de5e9e25a45650db59798217e36",
13
13
  dependencies: {"@credo-ts/core":"^0.6.0","@credo-ts/openid4vc":"^0.6.0","@js-soft/docdb-querytranslator":"^1.1.6","@js-soft/ts-serval":"2.0.14","@js-soft/ts-utils":"2.3.5","@nmshd/content":"*","@nmshd/core-types":"*","@nmshd/iql":"^1.0.4","@nmshd/transport":"*","@noble/ciphers":"^2.0.1","jose":"^6.1.1","lodash":"^4.17.21","sjcl":"^1.0.8","ts-simple-nameof":"^1.3.3","ws":"^8.18.3"},
14
14
  libraries: {
15
15
  transport: transport_1.buildInformation,
@@ -2,6 +2,7 @@ import { CoreIdHelper } from "@nmshd/core-types";
2
2
  export declare class ConsumptionIds {
3
3
  static readonly draft: CoreIdHelper;
4
4
  static readonly setting: CoreIdHelper;
5
+ static readonly requestedCredentialCacheEntry: CoreIdHelper;
5
6
  static readonly attribute: CoreIdHelper;
6
7
  static readonly attributeForwardingDetails: CoreIdHelper;
7
8
  static readonly request: CoreIdHelper;
@@ -1 +1 @@
1
- {"version":3,"file":"ConsumptionIds.d.ts","sourceRoot":"","sources":["../../src/consumption/ConsumptionIds.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEjD,qBAAa,cAAc;IACvB,gBAAuB,KAAK,eAA8B;IAC1D,gBAAuB,OAAO,eAA8B;IAE5D,gBAAuB,SAAS,eAA2B;IAC3D,gBAAuB,0BAA0B,eAA6B;IAC9E,gBAAuB,OAAO,eAA2B;IACzD,gBAAuB,YAAY,eAA2B;IAC9D,gBAAuB,gBAAgB,eAA2B;CACrE"}
1
+ {"version":3,"file":"ConsumptionIds.d.ts","sourceRoot":"","sources":["../../src/consumption/ConsumptionIds.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEjD,qBAAa,cAAc;IACvB,gBAAuB,KAAK,eAA8B;IAC1D,gBAAuB,OAAO,eAA8B;IAC5D,gBAAuB,6BAA6B,eAA8B;IAElF,gBAAuB,SAAS,eAA2B;IAC3D,gBAAuB,0BAA0B,eAA6B;IAC9E,gBAAuB,OAAO,eAA2B;IACzD,gBAAuB,YAAY,eAA2B;IAC9D,gBAAuB,gBAAgB,eAA2B;CACrE"}
@@ -5,6 +5,7 @@ const core_types_1 = require("@nmshd/core-types");
5
5
  class ConsumptionIds {
6
6
  static { this.draft = new core_types_1.CoreIdHelper("LCLDRF"); }
7
7
  static { this.setting = new core_types_1.CoreIdHelper("LCLSET"); }
8
+ static { this.requestedCredentialCacheEntry = new core_types_1.CoreIdHelper("LCLRCC"); }
8
9
  static { this.attribute = new core_types_1.CoreIdHelper("ATT"); }
9
10
  static { this.attributeForwardingDetails = new core_types_1.CoreIdHelper("ATTFD"); }
10
11
  static { this.request = new core_types_1.CoreIdHelper("REQ"); }
@@ -1 +1 @@
1
- {"version":3,"file":"ConsumptionIds.js","sourceRoot":"","sources":["../../src/consumption/ConsumptionIds.ts"],"names":[],"mappings":";;;AAAA,kDAAiD;AAEjD,MAAa,cAAc;aACA,UAAK,GAAG,IAAI,yBAAY,CAAC,QAAQ,CAAC,CAAC;aACnC,YAAO,GAAG,IAAI,yBAAY,CAAC,QAAQ,CAAC,CAAC;aAErC,cAAS,GAAG,IAAI,yBAAY,CAAC,KAAK,CAAC,CAAC;aACpC,+BAA0B,GAAG,IAAI,yBAAY,CAAC,OAAO,CAAC,CAAC;aACvD,YAAO,GAAG,IAAI,yBAAY,CAAC,KAAK,CAAC,CAAC;aAClC,iBAAY,GAAG,IAAI,yBAAY,CAAC,KAAK,CAAC,CAAC;aACvC,qBAAgB,GAAG,IAAI,yBAAY,CAAC,KAAK,CAAC,CAAC;;AARtE,wCASC"}
1
+ {"version":3,"file":"ConsumptionIds.js","sourceRoot":"","sources":["../../src/consumption/ConsumptionIds.ts"],"names":[],"mappings":";;;AAAA,kDAAiD;AAEjD,MAAa,cAAc;aACA,UAAK,GAAG,IAAI,yBAAY,CAAC,QAAQ,CAAC,CAAC;aACnC,YAAO,GAAG,IAAI,yBAAY,CAAC,QAAQ,CAAC,CAAC;aACrC,kCAA6B,GAAG,IAAI,yBAAY,CAAC,QAAQ,CAAC,CAAC;aAE3D,cAAS,GAAG,IAAI,yBAAY,CAAC,KAAK,CAAC,CAAC;aACpC,+BAA0B,GAAG,IAAI,yBAAY,CAAC,OAAO,CAAC,CAAC;aACvD,YAAO,GAAG,IAAI,yBAAY,CAAC,KAAK,CAAC,CAAC;aAClC,iBAAY,GAAG,IAAI,yBAAY,CAAC,KAAK,CAAC,CAAC;aACvC,qBAAgB,GAAG,IAAI,yBAAY,CAAC,KAAK,CAAC,CAAC;;AATtE,wCAUC"}
@@ -1 +1 @@
1
- {"version":3,"file":"RequestedCredentialCache.d.ts","sourceRoot":"","sources":["../../../../src/modules/openid4vc/local/RequestedCredentialCache.ts"],"names":[],"mappings":"AAEA,OAAO,EAAsB,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAE9E,OAAO,EAAE,gCAAgC,EAAE,MAAM,oCAAoC,CAAC;AActF,qBAAa,wBAAwB;IACd,OAAO,CAAC,QAAQ,CAAC,UAAU;gBAAV,UAAU,EAAE,sBAAsB;IAEzD,GAAG,CAAC,kBAAkB,EAAE,MAAM,GAAG,OAAO,CAAC,gCAAgC,EAAE,GAAG,SAAS,CAAC;IAKxF,GAAG,CAAC,kBAAkB,EAAE,MAAM,EAAE,mBAAmB,EAAE,gCAAgC,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;CAGvH"}
1
+ {"version":3,"file":"RequestedCredentialCache.d.ts","sourceRoot":"","sources":["../../../../src/modules/openid4vc/local/RequestedCredentialCache.ts"],"names":[],"mappings":"AAEA,OAAO,EAAsB,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAG9E,OAAO,EAAE,gCAAgC,EAAE,MAAM,oCAAoC,CAAC;AAyBtF,qBAAa,wBAAwB;IACd,OAAO,CAAC,QAAQ,CAAC,UAAU;gBAAV,UAAU,EAAE,sBAAsB;IAEzD,GAAG,CAAC,kBAAkB,EAAE,MAAM,GAAG,OAAO,CAAC,gCAAgC,EAAE,GAAG,SAAS,CAAC;IAKxF,GAAG,CAAC,kBAAkB,EAAE,MAAM,EAAE,mBAAmB,EAAE,gCAAgC,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;CAIvH"}
@@ -11,18 +11,30 @@ var __metadata = (this && this.__metadata) || function (k, v) {
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.RequestedCredentialCache = void 0;
13
13
  const ts_serval_1 = require("@js-soft/ts-serval");
14
- const core_types_1 = require("@nmshd/core-types");
15
14
  const transport_1 = require("@nmshd/transport");
16
15
  const ts_simple_nameof_1 = require("ts-simple-nameof");
16
+ const ConsumptionIds_1 = require("../../../consumption/ConsumptionIds");
17
17
  class RequestedCredentialCacheEntry extends transport_1.CoreSynchronizable {
18
18
  constructor() {
19
19
  super(...arguments);
20
- this.technicalProperties = [(0, ts_simple_nameof_1.nameof)((r) => r.credentialResponses)];
20
+ this.technicalProperties = [
21
+ (0, ts_simple_nameof_1.nameof)((r) => r.credentialOfferUrl),
22
+ (0, ts_simple_nameof_1.nameof)((r) => r.credentialResponses)
23
+ ];
21
24
  }
22
- static create(credentialOfferUrl, credentialResponses) {
23
- return this.fromAny({ id: core_types_1.CoreId.from(credentialOfferUrl), credentialResponses });
25
+ static create(id, credentialOfferUrl, credentialResponses) {
26
+ return this.fromAny({
27
+ id: id,
28
+ credentialOfferUrl: credentialOfferUrl,
29
+ credentialResponses
30
+ });
24
31
  }
25
32
  }
33
+ __decorate([
34
+ (0, ts_serval_1.serialize)(),
35
+ (0, ts_serval_1.validate)(),
36
+ __metadata("design:type", String)
37
+ ], RequestedCredentialCacheEntry.prototype, "credentialOfferUrl", void 0);
26
38
  __decorate([
27
39
  (0, ts_serval_1.serialize)({ any: true }),
28
40
  (0, ts_serval_1.validate)(),
@@ -33,11 +45,12 @@ class RequestedCredentialCache {
33
45
  this.collection = collection;
34
46
  }
35
47
  async get(credentialOfferUrl) {
36
- const doc = await this.collection.read(credentialOfferUrl);
48
+ const doc = await this.collection.findOne({ credentialOfferUrl: credentialOfferUrl });
37
49
  return doc ? RequestedCredentialCacheEntry.fromAny(doc).credentialResponses : undefined;
38
50
  }
39
51
  async set(credentialOfferUrl, credentialResponses) {
40
- await this.collection.create(RequestedCredentialCacheEntry.create(credentialOfferUrl, credentialResponses));
52
+ const id = await ConsumptionIds_1.ConsumptionIds.requestedCredentialCacheEntry.generate();
53
+ await this.collection.create(RequestedCredentialCacheEntry.create(id, credentialOfferUrl, credentialResponses));
41
54
  }
42
55
  }
43
56
  exports.RequestedCredentialCache = RequestedCredentialCache;
@@ -1 +1 @@
1
- {"version":3,"file":"RequestedCredentialCache.js","sourceRoot":"","sources":["../../../../src/modules/openid4vc/local/RequestedCredentialCache.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,kDAAyD;AACzD,kDAA2C;AAC3C,gDAA8E;AAC9E,uDAA0C;AAG1C,MAAM,6BAA8B,SAAQ,8BAAkB;IAA9D;;QACoB,wBAAmB,GAAa,CAAC,IAAA,yBAAM,EAAgC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC,CAAC;IAS1H,CAAC;IAHU,M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-openid4vc.5",
84
- "@nmshd/core-types": "7.2.0-openid4vc.5",
83
+ "@nmshd/content": "7.2.0-openid4vc.7",
84
+ "@nmshd/core-types": "7.2.0-openid4vc.7",
85
85
  "@nmshd/iql": "^1.0.4",
86
- "@nmshd/transport": "7.2.0-openid4vc.5",
86
+ "@nmshd/transport": "7.2.0-openid4vc.7",
87
87
  "@noble/ciphers": "^2.0.1",
88
88
  "jose": "^6.1.1",
89
89
  "lodash": "^4.17.21",
@@ -92,8 +92,8 @@
92
92
  "ws": "^8.18.3"
93
93
  },
94
94
  "devDependencies": {
95
- "@js-soft/docdb-access-loki": "1.3.1",
96
- "@js-soft/docdb-access-mongo": "1.3.1",
95
+ "@js-soft/docdb-access-loki": "1.4.0",
96
+ "@js-soft/docdb-access-mongo": "1.4.0",
97
97
  "@js-soft/node-logger": "1.2.1",
98
98
  "@nmshd/crypto": "2.1.3",
99
99
  "@types/lodash": "^4.17.21",
@@ -104,5 +104,5 @@
104
104
  "access": "public",
105
105
  "provenance": true
106
106
  },
107
- "version": "7.2.0-openid4vc.5"
107
+ "version": "7.2.0-openid4vc.7"
108
108
  }