dcql 0.2.12 → 0.2.14

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 (102) hide show
  1. package/dist/src/dcql-error/e-base.d.ts.map +1 -0
  2. package/dist/src/dcql-error/e-base.js.map +1 -0
  3. package/dist/src/{e-dcql.d.ts → dcql-error/e-dcql.d.ts} +6 -0
  4. package/dist/src/dcql-error/e-dcql.d.ts.map +1 -0
  5. package/dist/src/{e-dcql.js → dcql-error/e-dcql.js} +9 -3
  6. package/dist/src/dcql-error/e-dcql.js.map +1 -0
  7. package/dist/src/dcql-error/index.d.ts +3 -0
  8. package/dist/src/dcql-error/index.d.ts.map +1 -0
  9. package/dist/src/dcql-error/index.js +23 -0
  10. package/dist/src/dcql-error/index.js.map +1 -0
  11. package/dist/src/dcql-parser/claims-path.test.d.ts.map +1 -0
  12. package/dist/src/{dcql-query → dcql-parser}/claims-path.test.js +1 -1
  13. package/dist/src/dcql-parser/claims-path.test.js.map +1 -0
  14. package/dist/src/{dcql-query-result → dcql-parser}/dcql-claims-query-result.d.ts +6 -3
  15. package/dist/src/dcql-parser/dcql-claims-query-result.d.ts.map +1 -0
  16. package/dist/src/{dcql-query-result → dcql-parser}/dcql-claims-query-result.js +18 -15
  17. package/dist/src/dcql-parser/dcql-claims-query-result.js.map +1 -0
  18. package/dist/src/{dcql-query-result → dcql-parser}/dcql-credential-query-result.d.ts +2 -2
  19. package/dist/src/dcql-parser/dcql-credential-query-result.d.ts.map +1 -0
  20. package/dist/src/{dcql-query-result → dcql-parser}/dcql-credential-query-result.js +5 -5
  21. package/dist/src/dcql-parser/dcql-credential-query-result.js.map +1 -0
  22. package/dist/src/dcql-presentation/index.d.ts +3 -2
  23. package/dist/src/dcql-presentation/index.d.ts.map +1 -1
  24. package/dist/src/dcql-presentation/index.js +10 -16
  25. package/dist/src/dcql-presentation/index.js.map +1 -1
  26. package/dist/src/{u-dcql-credential-presentation.d.ts → dcql-presentation/m-dcql-credential-presentation.d.ts} +18 -12
  27. package/dist/src/dcql-presentation/m-dcql-credential-presentation.d.ts.map +1 -0
  28. package/dist/src/{u-dcql-credential-presentation.js → dcql-presentation/m-dcql-credential-presentation.js} +7 -7
  29. package/dist/src/dcql-presentation/m-dcql-credential-presentation.js.map +1 -0
  30. package/dist/src/dcql-presentation/m-dcql-presentation-result.d.ts +62 -53
  31. package/dist/src/dcql-presentation/m-dcql-presentation-result.d.ts.map +1 -1
  32. package/dist/src/dcql-presentation/m-dcql-presentation-result.js +11 -8
  33. package/dist/src/dcql-presentation/m-dcql-presentation-result.js.map +1 -1
  34. package/dist/src/dcql-query/dcql-query-complex.test.d.ts +2 -0
  35. package/dist/src/dcql-query/dcql-query-complex.test.d.ts.map +1 -0
  36. package/dist/src/dcql-query/dcql-query-complex.test.js +3631 -0
  37. package/dist/src/dcql-query/dcql-query-complex.test.js.map +1 -0
  38. package/dist/src/dcql-query/dcql-query.test.js +180 -12
  39. package/dist/src/dcql-query/dcql-query.test.js.map +1 -1
  40. package/dist/src/dcql-query/index.d.ts +5 -0
  41. package/dist/src/dcql-query/index.d.ts.map +1 -0
  42. package/dist/src/dcql-query/index.js +12 -0
  43. package/dist/src/dcql-query/index.js.map +1 -0
  44. package/dist/src/dcql-query/m-dcql-credential-query.js +1 -1
  45. package/dist/src/dcql-query/m-dcql-credential-query.js.map +1 -1
  46. package/dist/src/dcql-query/m-dcql-query.d.ts +172 -150
  47. package/dist/src/dcql-query/m-dcql-query.d.ts.map +1 -1
  48. package/dist/src/dcql-query/m-dcql-query.js +3 -3
  49. package/dist/src/dcql-query/m-dcql-query.js.map +1 -1
  50. package/dist/src/dcql-query-result/index.d.ts +3 -0
  51. package/dist/src/dcql-query-result/index.d.ts.map +1 -0
  52. package/dist/src/dcql-query-result/index.js +8 -0
  53. package/dist/src/dcql-query-result/index.js.map +1 -0
  54. package/dist/src/dcql-query-result/m-dcql-query-result.d.ts +294 -299
  55. package/dist/src/dcql-query-result/m-dcql-query-result.d.ts.map +1 -1
  56. package/dist/src/dcql-query-result/m-dcql-query-result.js +11 -29
  57. package/dist/src/dcql-query-result/m-dcql-query-result.js.map +1 -1
  58. package/dist/src/dcql-query-result/run-dcql-query.d.ts +8 -0
  59. package/dist/src/dcql-query-result/run-dcql-query.d.ts.map +1 -0
  60. package/dist/src/{dcql-query/dcql-query.js → dcql-query-result/run-dcql-query.js} +15 -12
  61. package/dist/src/dcql-query-result/run-dcql-query.js.map +1 -0
  62. package/dist/src/index.d.ts +4 -8
  63. package/dist/src/index.d.ts.map +1 -1
  64. package/dist/src/index.js +5 -19
  65. package/dist/src/index.js.map +1 -1
  66. package/dist/src/u-dcql-credential.d.ts +36 -32
  67. package/dist/src/u-dcql-credential.d.ts.map +1 -1
  68. package/dist/src/u-dcql-credential.js +10 -11
  69. package/dist/src/u-dcql-credential.js.map +1 -1
  70. package/dist/src/u-dcql.d.ts +16 -21
  71. package/dist/src/u-dcql.d.ts.map +1 -1
  72. package/dist/src/u-dcql.js +7 -13
  73. package/dist/src/u-dcql.js.map +1 -1
  74. package/dist/src/{model.d.ts → u-model.d.ts} +2 -2
  75. package/dist/src/u-model.d.ts.map +1 -0
  76. package/dist/src/{model.js → u-model.js} +2 -2
  77. package/dist/src/u-model.js.map +1 -0
  78. package/package.json +1 -1
  79. package/dist/src/dcql-query/claims-path.d.ts +0 -14
  80. package/dist/src/dcql-query/claims-path.d.ts.map +0 -1
  81. package/dist/src/dcql-query/claims-path.js +0 -23
  82. package/dist/src/dcql-query/claims-path.js.map +0 -1
  83. package/dist/src/dcql-query/claims-path.test.d.ts.map +0 -1
  84. package/dist/src/dcql-query/claims-path.test.js.map +0 -1
  85. package/dist/src/dcql-query/dcql-query.d.ts +0 -8
  86. package/dist/src/dcql-query/dcql-query.d.ts.map +0 -1
  87. package/dist/src/dcql-query/dcql-query.js.map +0 -1
  88. package/dist/src/dcql-query-result/dcql-claims-query-result.d.ts.map +0 -1
  89. package/dist/src/dcql-query-result/dcql-claims-query-result.js.map +0 -1
  90. package/dist/src/dcql-query-result/dcql-credential-query-result.d.ts.map +0 -1
  91. package/dist/src/dcql-query-result/dcql-credential-query-result.js.map +0 -1
  92. package/dist/src/e-base.d.ts.map +0 -1
  93. package/dist/src/e-base.js.map +0 -1
  94. package/dist/src/e-dcql.d.ts.map +0 -1
  95. package/dist/src/e-dcql.js.map +0 -1
  96. package/dist/src/model.d.ts.map +0 -1
  97. package/dist/src/model.js.map +0 -1
  98. package/dist/src/u-dcql-credential-presentation.d.ts.map +0 -1
  99. package/dist/src/u-dcql-credential-presentation.js.map +0 -1
  100. /package/dist/src/{e-base.d.ts → dcql-error/e-base.d.ts} +0 -0
  101. /package/dist/src/{e-base.js → dcql-error/e-base.js} +0 -0
  102. /package/dist/src/{dcql-query → dcql-parser}/claims-path.test.d.ts +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"e-base.d.ts","sourceRoot":"","sources":["../../../src/dcql-error/e-base.ts"],"names":[],"mappings":"AAQA,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,GAAG,SAAS,CAyBrE;AAED,eAAO,MAAM,WAAW,UAAW,OAAO,KAAG,KAAK,IAAI,SAUrD,CAAC;AAEF,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,OAAO,GAAG,SAAS,CAgBjE;AAED,KAAK,eAAe,GAChB,aAAa,GACb,uBAAuB,GACvB,iBAAiB,GACjB,aAAa,CAAC;AAElB,qBAAa,SAAU,SAAQ,KAAK;IAGlC,SAAyB,KAAK,CAAC,EAAE,KAAK,CAAC;IACvC,SAAgB,IAAI,kBAAC;gBAET,IAAI,EAAE;QAChB,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,IAAI,EAAE,eAAe,CAAC;QACtB,KAAK,CAAC,EAAE,OAAO,CAAC;KACjB;CAgBF"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"e-base.js","sourceRoot":"","sources":["../../../src/dcql-error/e-base.ts"],"names":[],"mappings":";;;AAQ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AAC,CAAC;AAVW,QAAA,WAAW,eAUtB;AAEF,SAAgB,uBAAuB,CAAC,KAAc;IACpD,IAAI,IAAA,mBAAW,EAAC,KAAK,CAAC,EAAE,CAAC;QACvB,OAAO,KAAK,CAAC;IACf,CAAC;IAED,MAAM,SAAS,GAAG,IAAI,SAAS,CAAC;QAC9B,IAAI,EAAE,uBAAuB;QAC7B,KAAK;KACN,CAAC,CAAC;IAEH,2BAA2B;IAC3B,IAAI,KAAK,YAAY,KAAK,IAAI,KAAK,CAAC,KAAK,EAAE,CAAC;QAC1C,SAAS,CAAC,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC;IAChC,CAAC;IAED,OAAO,SAAS,CAAC;AACnB,CAAC;AAQD,MAAa,SAAU,SAAQ,KAAK;IAClC,6DAA6D;IAC7D,oKAAoK;IAC3I,KAAK,CAAS;IACvB,IAAI,CAAC;IAErB,YAAY,IAIX;QACC,MAAM,KAAK,GAAG,mBAAmB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAC9C,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,IAAI,KAAK,EAAE,OAAO,IAAI,IAAI,CAAC,IAAI,CAAC;QAE5D,6DAA6D;QAC7D,0DAA0D;QAC1D,KAAK,CAAC,OAAO,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC;QAE1B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;QACtB,IAAI,CAAC,IAAI,GAAG,WAAW,CAAC;QAExB,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC;YAChB,yCAAyC;YACzC,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACrB,CAAC;IACH,CAAC;CACF;AA1BD,8BA0BC"}
@@ -41,4 +41,10 @@ export declare class DcqlInvalidPresentationRecordError extends DcqlError {
41
41
  cause?: unknown;
42
42
  });
43
43
  }
44
+ export declare class DcqlPresentationResultError extends DcqlError {
45
+ constructor(opts: {
46
+ message: string;
47
+ cause?: unknown;
48
+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,OAAO,CAAA;KAAE;CAGvD"}
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DcqlInvalidPresentationRecordError = exports.DcqlMissingClaimSetParseError = exports.DcqlInvalidClaimsQueryIdError = exports.DcqlParseError = exports.DcqlNonUniqueCredentialQueryIdsError = exports.DcqlUndefinedClaimSetIdError = exports.DcqlCredentialSetError = void 0;
3
+ exports.DcqlPresentationResultError = exports.DcqlInvalidPresentationRecordError = exports.DcqlMissingClaimSetParseError = exports.DcqlInvalidClaimsQueryIdError = exports.DcqlParseError = exports.DcqlNonUniqueCredentialQueryIdsError = exports.DcqlUndefinedClaimSetIdError = exports.DcqlCredentialSetError = void 0;
4
4
  const e_base_js_1 = require("./e-base.js");
5
5
  class DcqlCredentialSetError extends e_base_js_1.DcqlError {
6
6
  constructor(opts) {
@@ -22,7 +22,7 @@ class DcqlNonUniqueCredentialQueryIdsError extends e_base_js_1.DcqlError {
22
22
  exports.DcqlNonUniqueCredentialQueryIdsError = DcqlNonUniqueCredentialQueryIdsError;
23
23
  class DcqlParseError extends e_base_js_1.DcqlError {
24
24
  constructor(opts) {
25
- super({ code: 'BAD_REQUEST', ...opts });
25
+ super({ code: 'PARSE_ERROR', ...opts });
26
26
  }
27
27
  }
28
28
  exports.DcqlParseError = DcqlParseError;
@@ -34,7 +34,7 @@ class DcqlInvalidClaimsQueryIdError extends e_base_js_1.DcqlError {
34
34
  exports.DcqlInvalidClaimsQueryIdError = DcqlInvalidClaimsQueryIdError;
35
35
  class DcqlMissingClaimSetParseError extends e_base_js_1.DcqlError {
36
36
  constructor(opts) {
37
- super({ code: 'BAD_REQUEST', ...opts });
37
+ super({ code: 'PARSE_ERROR', ...opts });
38
38
  }
39
39
  }
40
40
  exports.DcqlMissingClaimSetParseError = DcqlMissingClaimSetParseError;
@@ -44,4 +44,10 @@ class DcqlInvalidPresentationRecordError extends e_base_js_1.DcqlError {
44
44
  }
45
45
  }
46
46
  exports.DcqlInvalidPresentationRecordError = DcqlInvalidPresentationRecordError;
47
+ class DcqlPresentationResultError extends e_base_js_1.DcqlError {
48
+ constructor(opts) {
49
+ super({ code: 'BAD_REQUEST', ...opts });
50
+ }
51
+ }
52
+ exports.DcqlPresentationResultError = DcqlPresentationResultError;
47
53
  //# sourceMappingURL=e-dcql.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"e-dcql.js","sourceRoot":"","sources":["../../../src/dcql-error/e-dcql.ts"],"names":[],"mappings":";;;AAAA,2CAAwC;AAExC,MAAa,sBAAuB,SAAQ,qBAAS;IACnD,YAAY,IAA0C;QACpD,KAAK,CAAC,EAAE,IAAI,EAAE,aAAa,EAAE,GAAG,IAAI,EAAE,CAAC,CAAC;IAC1C,CAAC;CACF;AAJD,wDAIC;AAED,MAAa,4BAA6B,SAAQ,qBAAS;IACzD,YAAY,IAA0C;QACpD,KAAK,CAAC,EAAE,IAAI,EAAE,aAAa,EAAE,GAAG,IAAI,EAAE,CAAC,CAAC;IAC1C,CAAC;CACF;AAJD,oEAIC;AAED,MAAa,oCAAqC,SAAQ,qBAAS;IACjE,YAAY,IAA0C;QACpD,KAAK,CAAC,EAAE,IAAI,EAAE,aAAa,EAAE,GAAG,IAAI,EAAE,CAAC,CAAC;IAC1C,CAAC;CACF;AAJD,oFAIC;AAED,MAAa,cAAe,SAAQ,qBAAS;IAC3C,YAAY,IAA0C;QACpD,KAAK,CAAC,EAAE,IAAI,EAAE,aAAa,EAAE,GAAG,IAAI,EAAE,CAAC,CAAC;IAC1C,CAAC;CACF;AAJD,wCAIC;AAED,MAAa,6BAA8B,SAAQ,qBAAS;IAC1D,YAAY,IAA0C;QACpD,KAAK,CAAC,EAAE,IAAI,EAAE,aAAa,EAAE,GAAG,IAAI,EAAE,CAAC,CAAC;IAC1C,CAAC;CACF;AAJD,sEAIC;AAED,MAAa,6BAA8B,SAAQ,qBAAS;IAC1D,YAAY,IAA0C;QACpD,KAAK,CAAC,EAAE,IAAI,EAAE,aAAa,EAAE,GAAG,IAAI,EAAE,CAAC,CAAC;IAC1C,CAAC;CACF;AAJD,sEAIC;AAED,MAAa,kCAAmC,SAAQ,qBAAS;IAC/D,YAAY,IAA0C;QACpD,KAAK,CAAC,EAAE,IAAI,EAAE,aAAa,EAAE,GAAG,IAAI,EAAE,CAAC,CAAC;IAC1C,CAAC;CACF;AAJD,gFAIC;AAED,MAAa,2BAA4B,SAAQ,qBAAS;IACxD,YAAY,IAA0C;QACpD,KAAK,CAAC,EAAE,IAAI,EAAE,aAAa,EAAE,GAAG,IAAI,EAAE,CAAC,CAAC;IAC1C,CAAC;CACF;AAJD,kEAIC"}
@@ -0,0 +1,3 @@
1
+ export { DcqlError, getCauseFromUnknown, getDcqlErrorFromUnknown, } from './e-base.js';
2
+ export * from './e-dcql.js';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/dcql-error/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,mBAAmB,EACnB,uBAAuB,GACxB,MAAM,aAAa,CAAC;AACrB,cAAc,aAAa,CAAC"}
@@ -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
+ exports.getDcqlErrorFromUnknown = exports.getCauseFromUnknown = exports.DcqlError = void 0;
18
+ var e_base_js_1 = require("./e-base.js");
19
+ Object.defineProperty(exports, "DcqlError", { enumerable: true, get: function () { return e_base_js_1.DcqlError; } });
20
+ Object.defineProperty(exports, "getCauseFromUnknown", { enumerable: true, get: function () { return e_base_js_1.getCauseFromUnknown; } });
21
+ Object.defineProperty(exports, "getDcqlErrorFromUnknown", { enumerable: true, get: function () { return e_base_js_1.getDcqlErrorFromUnknown; } });
22
+ __exportStar(require("./e-dcql.js"), exports);
23
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/dcql-error/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,yCAIqB;AAHnB,sGAAA,SAAS,OAAA;AACT,gHAAA,mBAAmB,OAAA;AACnB,oHAAA,uBAAuB,OAAA;AAEzB,8CAA4B"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"claims-path.test.d.ts","sourceRoot":"","sources":["../../../src/dcql-parser/claims-path.test.ts"],"names":[],"mappings":""}
@@ -29,7 +29,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
29
29
  const node_assert_1 = __importDefault(require("node:assert"));
30
30
  const node_test_1 = require("node:test");
31
31
  const v = __importStar(require("valibot"));
32
- const dcql_claims_query_result_js_1 = require("../dcql-query-result/dcql-claims-query-result.js");
32
+ const dcql_claims_query_result_js_1 = require("./dcql-claims-query-result.js");
33
33
  const claimsPathPointerExample = {
34
34
  name: 'Arthur Dent',
35
35
  address: {
@@ -0,0 +1 @@
1
+ {"version":3,"file":"claims-path.test.js","sourceRoot":"","sources":["../../../src/dcql-parser/claims-path.test.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,8DAAiC;AACjC,yCAAyC;AACzC,2CAA6B;AAC7B,+EAAoE;AAEpE,MAAM,wBAAwB,GAAG;IAC/B,IAAI,EAAE,aAAa;IACnB,OAAO,E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AAI,EAAE,qBAAqB,EAAE,EAAE,EAAE,IAAI,EAAE,mBAAmB,EAAE,CAAC;SAC1E,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -7,16 +7,19 @@ export declare const getJsonClaimsParser: (claimsQueries: DcqlClaimsQuery.W3cAnd
7
7
  }) => v.IntersectSchema<v.RecordSchema<v.StringSchema<undefined>, v.GenericSchema<import("../u-dcql.js").Json, import("../u-dcql.js").Json, v.BaseIssue<unknown>>, undefined>[], undefined>;
8
8
  export declare const getMdocClaimsQueriesForClaimSet: (claimsQueries: DcqlClaimsQuery.Mdoc[], claimSet: string[]) => DcqlClaimsQuery.Mdoc[];
9
9
  export declare const getJsonClaimsQueriesForClaimSet: (claimsQueries: DcqlClaimsQuery.W3cAndSdJwtVc[], claimSet: string[]) => DcqlClaimsQuery.W3cAndSdJwtVc[];
10
- export declare const getCredentialParser: (credentialQuery: DcqlCredentialQuery, ctx: {
10
+ export declare const getCredentialQueryParser: (credentialQuery: DcqlCredentialQuery, ctx: {
11
11
  claimSet?: NonNullable<DcqlCredentialQuery["claim_sets"]>[number];
12
12
  presentation: boolean;
13
13
  }) => v.ObjectSchema<{
14
- readonly docType: v.StringSchema<undefined> | v.LiteralSchema<string, undefined>;
15
- readonly namespaces: v.ObjectSchema<any, undefined> | v.RecordSchema<v.StringSchema<undefined>, v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>;
14
+ readonly credential_format: v.LiteralSchema<"mso_mdoc", undefined>;
15
+ readonly doctype: v.StringSchema<undefined> | v.LiteralSchema<string, undefined>;
16
+ readonly namespaces: v.RecordSchema<v.StringSchema<undefined>, v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined> | v.ObjectSchema<any, undefined>;
16
17
  }, undefined> | v.ObjectSchema<{
18
+ readonly credential_format: v.LiteralSchema<"vc+sd-jwt", undefined>;
17
19
  readonly vct: v.StringSchema<undefined> | v.PicklistSchema<string[], undefined>;
18
20
  readonly claims: v.RecordSchema<v.StringSchema<undefined>, v.GenericSchema<import("../u-dcql.js").Json, import("../u-dcql.js").Json, v.BaseIssue<unknown>>, undefined> | v.IntersectSchema<v.RecordSchema<v.StringSchema<undefined>, v.GenericSchema<import("../u-dcql.js").Json, import("../u-dcql.js").Json, v.BaseIssue<unknown>>, undefined>[], undefined>;
19
21
  }, undefined> | v.ObjectSchema<{
22
+ readonly credential_format: v.PicklistSchema<["jwt_vc_json", "jwt_vc_json-ld"], undefined>;
20
23
  readonly claims: v.RecordSchema<v.StringSchema<undefined>, v.GenericSchema<import("../u-dcql.js").Json, import("../u-dcql.js").Json, v.BaseIssue<unknown>>, undefined> | v.IntersectSchema<v.RecordSchema<v.StringSchema<undefined>, v.GenericSchema<import("../u-dcql.js").Json, import("../u-dcql.js").Json, v.BaseIssue<unknown>>, undefined>[], undefined>;
21
24
  }, undefined>;
22
25
  //# sourceMappingURL=dcql-claims-query-result.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dcql-claims-query-result.d.ts","sourceRoot":"","sources":["../../../src/dcql-parser/dcql-claims-query-result.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAC;AAK7B,OAAO,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AACvE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,0CAA0C,CAAC;AAmBpF,eAAO,MAAM,mBAAmB,kBAAmB,eAAe,CAAC,IAAI,EAAE,mCAwBxE,CAAC;AAgDF,eAAO,MAAM,mBAAmB,kBACf,eAAe,CAAC,aAAa,EAAE,OACzC;IAAE,YAAY,EAAE,OAAO,CAAA;CAAE,0LAa/B,CAAC;AAEF,eAAO,MAAM,+BAA+B,kBAC3B,eAAe,CAAC,IAAI,EAAE,YAC3B,MAAM,EAAE,KACjB,eAAe,CAAC,IAAI,EAUtB,CAAC;AAEF,eAAO,MAAM,+BAA+B,kBAC3B,eAAe,CAAC,aAAa,EAAE,YACpC,MAAM,EAAE,KACjB,eAAe,CAAC,aAAa,EAU/B,CAAC;AA+DF,eAAO,MAAM,wBAAwB,oBAClB,mBAAmB,OAC/B;IACH,QAAQ,CAAC,EAAE,WAAW,CAAC,mBAAmB,CAAC,YAAY,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;IAClE,YAAY,EAAE,OAAO,CAAC;CACvB;;;;;;;;;;;aAaF,CAAC"}
@@ -23,10 +23,10 @@ var __importStar = (this && this.__importStar) || function (mod) {
23
23
  return result;
24
24
  };
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.getCredentialParser = exports.getJsonClaimsQueriesForClaimSet = exports.getMdocClaimsQueriesForClaimSet = exports.getJsonClaimsParser = exports.getNamespacesParser = void 0;
26
+ exports.getCredentialQueryParser = exports.getJsonClaimsQueriesForClaimSet = exports.getMdocClaimsQueriesForClaimSet = exports.getJsonClaimsParser = exports.getNamespacesParser = void 0;
27
27
  const v = __importStar(require("valibot"));
28
+ const e_dcql_js_1 = require("../dcql-error/e-dcql.js");
28
29
  const m_dcql_claims_query_js_1 = require("../dcql-query/m-dcql-claims-query.js");
29
- const e_dcql_js_1 = require("../e-dcql.js");
30
30
  const u_dcql_js_1 = require("../u-dcql.js");
31
31
  const getClaimParser = (input) => {
32
32
  const { value, values } = input;
@@ -55,7 +55,7 @@ const getNamespacesParser = (claimsQueries) => {
55
55
  return v.object(Object.fromEntries(parsersForNamespaces));
56
56
  };
57
57
  exports.getNamespacesParser = getNamespacesParser;
58
- const getParserForClaimQuery = (claimQuery, ctx) => {
58
+ const getClaimQueryParser = (claimQuery, ctx) => {
59
59
  const { index, presentation } = ctx;
60
60
  const pathElement = claimQuery.path[index];
61
61
  const isLast = index === claimQuery.path.length - 1;
@@ -63,7 +63,7 @@ const getParserForClaimQuery = (claimQuery, ctx) => {
63
63
  if (typeof pathElement === 'number') {
64
64
  const elementParser = isLast
65
65
  ? vClaimParser
66
- : getParserForClaimQuery(claimQuery, { ...ctx, index: index + 1 });
66
+ : getClaimQueryParser(claimQuery, { ...ctx, index: index + 1 });
67
67
  if (presentation) {
68
68
  // We allow both the concrete value and an array of one value
69
69
  return v.union([
@@ -77,17 +77,17 @@ const getParserForClaimQuery = (claimQuery, ctx) => {
77
77
  return v.object({
78
78
  [pathElement]: isLast
79
79
  ? vClaimParser
80
- : getParserForClaimQuery(claimQuery, { ...ctx, index: index + 1 }),
80
+ : getClaimQueryParser(claimQuery, { ...ctx, index: index + 1 }),
81
81
  });
82
82
  }
83
83
  else {
84
84
  return isLast
85
85
  ? v.array(vClaimParser)
86
- : v.array(getParserForClaimQuery(claimQuery, { ...ctx, index: index + 1 }));
86
+ : v.array(getClaimQueryParser(claimQuery, { ...ctx, index: index + 1 }));
87
87
  }
88
88
  };
89
89
  const getJsonClaimsParser = (claimsQueries, ctx) => {
90
- const claimParser = v.intersect(claimsQueries.map(claimQuery => getParserForClaimQuery(claimQuery, {
90
+ const claimParser = v.intersect(claimsQueries.map(claimQuery => getClaimQueryParser(claimQuery, {
91
91
  ...ctx,
92
92
  index: 0,
93
93
  })));
@@ -118,29 +118,31 @@ const getJsonClaimsQueriesForClaimSet = (claimsQueries, claimSet) => {
118
118
  });
119
119
  };
120
120
  exports.getJsonClaimsQueriesForClaimSet = getJsonClaimsQueriesForClaimSet;
121
- const getMdocCredentialParser = (credentialQuery, ctx) => {
121
+ const getMdocParser = (credentialQuery, ctx) => {
122
122
  const { claimSet } = ctx;
123
- const vDocType = credentialQuery.meta?.doctype_value
123
+ const vDoctype = credentialQuery.meta?.doctype_value
124
124
  ? v.literal(credentialQuery.meta.doctype_value)
125
125
  : v.string();
126
126
  const claimSetQueries = credentialQuery.claims && claimSet
127
127
  ? (0, exports.getMdocClaimsQueriesForClaimSet)(credentialQuery.claims, claimSet)
128
128
  : credentialQuery.claims;
129
129
  const credentialParser = v.object({
130
- docType: vDocType,
130
+ credential_format: v.literal('mso_mdoc'),
131
+ doctype: vDoctype,
131
132
  namespaces: claimSetQueries
132
133
  ? (0, exports.getNamespacesParser)(claimSetQueries)
133
134
  : v.record(v.string(), v.record(v.string(), v.unknown())),
134
135
  });
135
136
  return credentialParser;
136
137
  };
137
- const getJsonCredentialParser = (credentialQuery, ctx) => {
138
+ const getW3cVcSdJwtVcParser = (credentialQuery, ctx) => {
138
139
  const { claimSet } = ctx;
139
140
  const claimSetQueries = credentialQuery.claims && claimSet
140
141
  ? (0, exports.getJsonClaimsQueriesForClaimSet)(credentialQuery.claims, claimSet)
141
142
  : credentialQuery.claims;
142
143
  if (credentialQuery.format === 'vc+sd-jwt') {
143
144
  return v.object({
145
+ credential_format: v.literal('vc+sd-jwt'),
144
146
  vct: credentialQuery.meta?.vct_values
145
147
  ? v.picklist(credentialQuery.meta.vct_values)
146
148
  : v.string(),
@@ -151,6 +153,7 @@ const getJsonCredentialParser = (credentialQuery, ctx) => {
151
153
  }
152
154
  else {
153
155
  const credentialParser = v.object({
156
+ credential_format: v.picklist(['jwt_vc_json', 'jwt_vc_json-ld']),
154
157
  claims: claimSetQueries
155
158
  ? (0, exports.getJsonClaimsParser)(claimSetQueries, ctx)
156
159
  : u_dcql_js_1.vJsonRecord,
@@ -158,18 +161,18 @@ const getJsonCredentialParser = (credentialQuery, ctx) => {
158
161
  return credentialParser;
159
162
  }
160
163
  };
161
- const getCredentialParser = (credentialQuery, ctx) => {
164
+ const getCredentialQueryParser = (credentialQuery, ctx) => {
162
165
  if (credentialQuery.claim_sets && !ctx.claimSet) {
163
166
  throw new e_dcql_js_1.DcqlMissingClaimSetParseError({
164
167
  message: `credentialQuery specifies claim_sets but no claim_set for parsing is provided.`,
165
168
  });
166
169
  }
167
170
  if (credentialQuery.format === 'mso_mdoc') {
168
- return getMdocCredentialParser(credentialQuery, ctx);
171
+ return getMdocParser(credentialQuery, ctx);
169
172
  }
170
173
  else {
171
- return getJsonCredentialParser(credentialQuery, ctx);
174
+ return getW3cVcSdJwtVcParser(credentialQuery, ctx);
172
175
  }
173
176
  };
174
- exports.getCredentialParser = getCredentialParser;
177
+ exports.getCredentialQueryParser = getCredentialQueryParser;
175
178
  //# sourceMappingURL=dcql-claims-query-result.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dcql-claims-query-result.js","sourceRoot":"","sources":["../../../src/dcql-parser/dcql-claims-query-result.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAA6B;AAC7B,uDAGiC;AACjC,iFAAuE;AAEvE,4CAAkD;AAElD,MAAM,cAAc,GAAG,CAAC,KAGvB,EAAE,EAAE;IACH,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,KAAK,CAAC;IAChC,IAAI,KAAK,EAAE,CAAC;QACV,OAAO,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IAC1B,CAAC;IAED,IAAI,MAAM,EAAE,CAAC;QACX,OAAO,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;IACpD,CAAC;IAED,OAAO,wCAAe,CAAC,MAAM,CAAC;AAChC,CAAC,CAAC;AAEK,MAAM,mBAAmB,GAAG,CAAC,aAAqC,EAAE,EAAE;IAC3E,MAAM,kBAAkB,GAGpB,EAAE,CAAC;IAEP,KAAK,MAAM,UAAU,IAAI,aAAa,EAAE,CAAC;QACvC,IAAI,kBAAkB,CAAC,UAAU,CAAC,SAAS,CAAC,EAAE,CAAC;YAC7C,kBAAkB,CAAC,UAAU,CAAC,SAAS,CAAC,EAAE,IAAI,CAAC,EAAE,GAAG,UAAU,EAAE,CAAC,CAAC;QACpE,CAAC;aAAM,CAAC;YACN,kBAAkB,CAAC,UAAU,CAAC,SAAS,CAAC,GAAG,CAAC,EAAE,GAAG,UAAU,EAAE,CAAC,CAAC;QACjE,CAAC;IACH,CAAC;IAED,MAAM,oBAAoB,GAAG,MAAM,CAAC,OAAO,CAAC,kBAAkB,CAAC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EAAE;YACd,MAAM,EAAE,eAAe;gBACrB,CAAC,CAAC,IAAA,2BAAmB,EAAC,eAAe,EAAE,GAAG,CAAC;gBAC3C,CAAC,CAAC,uBAAW;SAChB,CAAC,CAAC;IACL,CAAC;SAAM,CAAC;QACN,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC;YAChC,iBAAiB,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,aAAa,EAAE,gBAAgB,CAAC,CAAC;YAChE,MAAM,EAAE,eAAe;gBACrB,CAAC,CAAC,IAAA,2BAAmB,EAAC,eAAe,EAAE,GAAG,CAAC;gBAC3C,CAAC,CAAC,uBAAW;SAChB,CAAC,CAAC;QAEH,OAAO,gBAAgB,CAAC;IAC1B,CAAC;AACH,CAAC,CAAC;AAEK,MAAM,wBAAwB,GAAG,CACtC,eAAoC,EACpC,GAGC,EACD,EAAE;IACF,IAAI,eAAe,CAAC,UAAU,IAAI,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC;QAChD,MAAM,IAAI,yCAA6B,CAAC;YACtC,OAAO,EAAE,gFAAgF;SAC1F,CAAC,CAAC;IACL,CAAC;IAED,IAAI,eAAe,CAAC,MAAM,KAAK,UAAU,EAAE,CAAC;QAC1C,OAAO,aAAa,CAAC,eAAe,EAAE,GAAG,CAAC,CAAC;IAC7C,CAAC;SAAM,CAAC;QACN,OAAO,qBAAqB,CAAC,eAAe,EAAE,GAAG,CAAC,CAAC;IACrD,CAAC;AACH,CAAC,CAAC;AAlBW,QAAA,wBAAwB,4BAkBnC"}
@@ -1,7 +1,7 @@
1
+ import type { DcqlQueryResult } from '../dcql-query-result/m-dcql-query-result.js';
1
2
  import type { DcqlCredentialQuery } from '../dcql-query/m-dcql-credential-query.js';
2
3
  import type { DcqlCredential } from '../u-dcql-credential.js';
3
- import type { DcqlQueryResult } from './m-dcql-query-result.js';
4
- export declare const queryCredentialFromCredentialQuery: (credentialQuery: DcqlCredentialQuery, ctx: {
4
+ export declare const runCredentialQuery: (credentialQuery: DcqlCredentialQuery, ctx: {
5
5
  credentials: DcqlCredential[];
6
6
  presentation: boolean;
7
7
  }) => DcqlQueryResult.CredentialQueryResult;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dcql-credential-query-result.d.ts","sourceRoot":"","sources":["../../../src/dcql-parser/dcql-credential-query-result.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,6CAA6C,CAAC;AACnF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,0CAA0C,CAAC;AACpF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAI9D,eAAO,MAAM,kBAAkB,oBACZ,mBAAmB,OAC/B;IACH,WAAW,EAAE,cAAc,EAAE,CAAC;IAC9B,YAAY,EAAE,OAAO,CAAC;CACvB,KACA,eAAe,CAAC,qBA0ClB,CAAC"}
@@ -23,17 +23,17 @@ var __importStar = (this && this.__importStar) || function (mod) {
23
23
  return result;
24
24
  };
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.queryCredentialFromCredentialQuery = void 0;
26
+ exports.runCredentialQuery = void 0;
27
27
  /* eslint-disable @typescript-eslint/no-non-null-assertion */
28
28
  const v = __importStar(require("valibot"));
29
29
  const dcql_claims_query_result_js_1 = require("./dcql-claims-query-result.js");
30
- const queryCredentialFromCredentialQuery = (credentialQuery, ctx) => {
30
+ const runCredentialQuery = (credentialQuery, ctx) => {
31
31
  const { credentials, presentation } = ctx;
32
32
  const claimSets = credentialQuery.claim_sets ?? [undefined];
33
33
  // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
34
34
  const credentialQueryResult = new Array(claimSets.length).fill([]);
35
35
  for (const [claimSetIndex, claim_set] of claimSets.entries()) {
36
- const credentialParser = (0, dcql_claims_query_result_js_1.getCredentialParser)(credentialQuery, {
36
+ const credentialParser = (0, dcql_claims_query_result_js_1.getCredentialQueryParser)(credentialQuery, {
37
37
  claimSet: claim_set,
38
38
  presentation,
39
39
  });
@@ -54,12 +54,12 @@ const queryCredentialFromCredentialQuery = (credentialQuery, ctx) => {
54
54
  ...(parseResult.issues && {
55
55
  flattened: v.flatten(parseResult.issues),
56
56
  }),
57
- credential_index: credentialIndex,
57
+ input_credential_index: credentialIndex,
58
58
  claim_set_index: credentialQuery.claim_sets ? claimSetIndex : undefined,
59
59
  });
60
60
  }
61
61
  }
62
62
  return credentialQueryResult;
63
63
  };
64
- exports.queryCredentialFromCredentialQuery = queryCredentialFromCredentialQuery;
64
+ exports.runCredentialQuery = runCredentialQuery;
65
65
  //# sourceMappingURL=dcql-credential-query-result.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dcql-credential-query-result.js","sourceRoot":"","sources":["../../../src/dcql-parser/dcql-credential-query-result.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6DAA6D;AAC7D,2CAA6B;AAK7B,+EAAyE;AAElE,MAAM,kBAAkB,GAAG,CAChC,eAAoC,EACpC,GAGC,EACsC,EAAE;IACzC,MAAM,EAAE,WAAW,EAAE,YAAY,EAAE,GAAG,GAAG,CAAC;IAC1C,MAAM,SAAS,GAAG,eAAe,CAAC,UAAU,IAAI,CAAC,SAAS,CAAC,CAAC;IAE5D,mEAAmE;IACnE,MAAM,qBAAqB,GAEvB,IAAI,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAEzC,KAAK,MAAM,CAAC,aAAa,EAAE,SAAS,CAAC,IAAI,SAAS,CAAC,OAAO,EAAE,EAAE,CAAC;QAC7D,MAAM,gBAAgB,GAAG,IAAA,sDAAwB,EAAC,eAAe,EAAE;YACjE,QAAQ,EAAE,SAAS;YACnB,YAAY;SACb,CAAC,CAAC;QAEH,KAAK,MAAM,CAAC,eAAe,EAAE,UAAU,CAAC,IAAI,WAAW,CAAC,OAAO,EAAE,EAAE,CAAC;YAClE,IAAI,aAAa,GAAG,CAAC,EAAE,CAAC;gBACtB,gIAAgI;gBAChI,MAAM,QAAQ,GACZ,qBAAqB,CAAC,aAAa,GAAG,CAAC,CAAE,CAAC,eAAe,CAAC,CAAC;gBAE7D,8GAA8G;gBAC9G,mDAAmD;gBACnD,IAAI,QAAQ,EAAE,OAAO,IAAI,CAAC,QAAQ,EAAE,CAAC;oBACnC,qBAAqB,CAAC,aAAa,CAAE,CAAC,eAAe,CAAC,GAAG,SAAS,CAAC;oBACnE,SAAS;gBACX,CAAC;YACH,CAAC;YAED,MAAM,WAAW,GAAG,CAAC,CAAC,SAAS,CAAC,gBAAgB,EAAE,UAAU,CAAC,CAAC;YAC9D,qBAAqB,CAAC,aAAa,CAAE,CAAC,IAAI,CAAC;gBACzC,GAAG,WAAW;gBACd,GAAG,CAAC,WAAW,CAAC,MAAM,IAAI;oBACxB,SAAS,EAAE,CAAC,CAAC,OAAO,CAA0B,WAAW,CAAC,MAAM,CAAC;iBAClE,CAAC;gBACF,sBAAsB,EAAE,eAAe;gBACvC,eAAe,EAAE,eAAe,CAAC,UAAU,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,SAAS;aACxE,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IAED,OAAO,qBAA8D,CAAC;AACxE,CAAC,CAAC;AAhDW,QAAA,kBAAkB,sBAgD7B"}
@@ -1,3 +1,4 @@
1
- export * from './m-dcql-presentation-result.js';
2
- export * from './m-dcql-presentation.js';
1
+ export { DcqlCredentialPresentation, DcqlMdocPresentation, DcqlSdJwtVcPresentation, DcqlW3cVcPresentation, } from './m-dcql-credential-presentation.js';
2
+ export { DcqlPresentationResult } from './m-dcql-presentation-result.js';
3
+ export { DcqlPresentation } from './m-dcql-presentation.js';
3
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/dcql-presentation/index.ts"],"names":[],"mappings":"AAAA,cAAc,iCAAiC,CAAC;AAChD,cAAc,0BAA0B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/dcql-presentation/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,0BAA0B,EAC1B,oBAAoB,EACpB,uBAAuB,EACvB,qBAAqB,GACtB,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AACzE,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC"}
@@ -1,19 +1,13 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __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
2
  Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./m-dcql-presentation-result.js"), exports);
18
- __exportStar(require("./m-dcql-presentation.js"), exports);
3
+ exports.DcqlPresentation = exports.DcqlPresentationResult = exports.DcqlW3cVcPresentation = exports.DcqlSdJwtVcPresentation = exports.DcqlMdocPresentation = exports.DcqlCredentialPresentation = void 0;
4
+ var m_dcql_credential_presentation_js_1 = require("./m-dcql-credential-presentation.js");
5
+ Object.defineProperty(exports, "DcqlCredentialPresentation", { enumerable: true, get: function () { return m_dcql_credential_presentation_js_1.DcqlCredentialPresentation; } });
6
+ Object.defineProperty(exports, "DcqlMdocPresentation", { enumerable: true, get: function () { return m_dcql_credential_presentation_js_1.DcqlMdocPresentation; } });
7
+ Object.defineProperty(exports, "DcqlSdJwtVcPresentation", { enumerable: true, get: function () { return m_dcql_credential_presentation_js_1.DcqlSdJwtVcPresentation; } });
8
+ Object.defineProperty(exports, "DcqlW3cVcPresentation", { enumerable: true, get: function () { return m_dcql_credential_presentation_js_1.DcqlW3cVcPresentation; } });
9
+ var m_dcql_presentation_result_js_1 = require("./m-dcql-presentation-result.js");
10
+ Object.defineProperty(exports, "DcqlPresentationResult", { enumerable: true, get: function () { return m_dcql_presentation_result_js_1.DcqlPresentationResult; } });
11
+ var m_dcql_presentation_js_1 = require("./m-dcql-presentation.js");
12
+ Object.defineProperty(exports, "DcqlPresentation", { enumerable: true, get: function () { return m_dcql_presentation_js_1.DcqlPresentation; } });
19
13
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/dcql-presentation/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kEAAgD;AAChD,2DAAyC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/dcql-presentation/index.ts"],"names":[],"mappings":";;;AAAA,yFAK6C;AAJ3C,+IAAA,0BAA0B,OAAA;AAC1B,yIAAA,oBAAoB,OAAA;AACpB,4IAAA,uBAAuB,OAAA;AACvB,0IAAA,qBAAqB,OAAA;AAEvB,iFAAyE;AAAhE,uIAAA,sBAAsB,OAAA;AAC/B,mEAA4D;AAAnD,0HAAA,gBAAgB,OAAA"}
@@ -1,39 +1,45 @@
1
1
  import * as v from 'valibot';
2
- import type { InferModelTypes } from './model';
2
+ import type { InferModelTypes } from '../u-model';
3
3
  export declare namespace DcqlMdocPresentation {
4
- const model: import("./model").Model<v.ObjectSchema<{
5
- readonly docType: v.StringSchema<undefined>;
4
+ const model: import("../u-model").Model<v.ObjectSchema<{
5
+ readonly credential_format: v.LiteralSchema<"mso_mdoc", undefined>;
6
+ readonly doctype: v.StringSchema<undefined>;
6
7
  readonly namespaces: v.RecordSchema<v.StringSchema<undefined>, v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>;
7
8
  }, undefined>>;
8
9
  type Model = InferModelTypes<typeof model>;
9
10
  }
10
11
  export type DcqlMdocPresentation = DcqlMdocPresentation.Model['Output'];
11
12
  export declare namespace DcqlSdJwtVcPresentation {
12
- const model: import("./model").Model<v.ObjectSchema<{
13
+ const model: import("../u-model").Model<v.ObjectSchema<{
14
+ readonly credential_format: v.LiteralSchema<"vc+sd-jwt", undefined>;
13
15
  readonly vct: v.StringSchema<undefined>;
14
- readonly claims: v.RecordSchema<v.StringSchema<undefined>, v.GenericSchema<import("./u-dcql").Json, import("./u-dcql").Json, v.BaseIssue<unknown>>, undefined>;
16
+ readonly claims: v.RecordSchema<v.StringSchema<undefined>, v.GenericSchema<import("../u-dcql").Json, import("../u-dcql").Json, v.BaseIssue<unknown>>, undefined>;
15
17
  }, undefined>>;
16
18
  type Model = InferModelTypes<typeof model>;
17
19
  }
18
20
  export type DcqlSdJwtVcPresentation = DcqlSdJwtVcPresentation.Model['Output'];
19
21
  export declare namespace DcqlW3cVcPresentation {
20
- const model: import("./model").Model<v.ObjectSchema<{
21
- readonly claims: v.RecordSchema<v.StringSchema<undefined>, v.GenericSchema<import("./u-dcql").Json, import("./u-dcql").Json, v.BaseIssue<unknown>>, undefined>;
22
+ const model: import("../u-model").Model<v.ObjectSchema<{
23
+ readonly credential_format: v.PicklistSchema<["jwt_vc_json-ld", "jwt_vc_json"], undefined>;
24
+ readonly claims: v.RecordSchema<v.StringSchema<undefined>, v.GenericSchema<import("../u-dcql").Json, import("../u-dcql").Json, v.BaseIssue<unknown>>, undefined>;
22
25
  }, undefined>>;
23
26
  type Model = InferModelTypes<typeof model>;
24
27
  }
25
28
  export type DcqlW3cVcPresentation = DcqlW3cVcPresentation.Model['Output'];
26
29
  export declare namespace DcqlCredentialPresentation {
27
- const model: import("./model").Model<v.UnionSchema<[v.ObjectSchema<{
28
- readonly docType: v.StringSchema<undefined>;
30
+ const model: import("../u-model").Model<v.UnionSchema<[v.ObjectSchema<{
31
+ readonly credential_format: v.LiteralSchema<"mso_mdoc", undefined>;
32
+ readonly doctype: v.StringSchema<undefined>;
29
33
  readonly namespaces: v.RecordSchema<v.StringSchema<undefined>, v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>;
30
34
  }, undefined>, v.ObjectSchema<{
35
+ readonly credential_format: v.LiteralSchema<"vc+sd-jwt", undefined>;
31
36
  readonly vct: v.StringSchema<undefined>;
32
- readonly claims: v.RecordSchema<v.StringSchema<undefined>, v.GenericSchema<import("./u-dcql").Json, import("./u-dcql").Json, v.BaseIssue<unknown>>, undefined>;
37
+ readonly claims: v.RecordSchema<v.StringSchema<undefined>, v.GenericSchema<import("../u-dcql").Json, import("../u-dcql").Json, v.BaseIssue<unknown>>, undefined>;
33
38
  }, undefined>, v.ObjectSchema<{
34
- readonly claims: v.RecordSchema<v.StringSchema<undefined>, v.GenericSchema<import("./u-dcql").Json, import("./u-dcql").Json, v.BaseIssue<unknown>>, undefined>;
39
+ readonly credential_format: v.PicklistSchema<["jwt_vc_json-ld", "jwt_vc_json"], undefined>;
40
+ readonly claims: v.RecordSchema<v.StringSchema<undefined>, v.GenericSchema<import("../u-dcql").Json, import("../u-dcql").Json, v.BaseIssue<unknown>>, undefined>;
35
41
  }, undefined>], undefined>>;
36
42
  type Model = InferModelTypes<typeof model>;
37
43
  }
38
44
  export type DcqlCredentialPresentation = DcqlCredentialPresentation.Model['Output'];
39
- //# sourceMappingURL=u-dcql-credential-presentation.d.ts.map
45
+ //# sourceMappingURL=m-dcql-credential-presentation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"m-dcql-credential-presentation.d.ts","sourceRoot":"","sources":["../../../src/dcql-presentation/m-dcql-credential-presentation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAC;AAM7B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAGlD,yBAAiB,oBAAoB,CAAC;IAC7B,MAAM,KAAK;;;;kBAAmD,CAAC;IACtE,KAAY,KAAK,GAAG,eAAe,CAAC,OAAO,KAAK,CAAC,CAAC;CACnD;AACD,MAAM,MAAM,oBAAoB,GAAG,oBAAoB,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;AAExE,yBAAiB,uBAAuB,CAAC;IAChC,MAAM,KAAK;;;;kBAAsD,CAAC;IACzE,KAAY,KAAK,GAAG,eAAe,CAAC,OAAO,KAAK,CAAC,CAAC;CACnD;AACD,MAAM,MAAM,uBAAuB,GAAG,uBAAuB,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;AAE9E,yBAAiB,qBAAqB,CAAC;IAC9B,MAAM,KAAK;;;kBAAoD,CAAC;IACvE,KAAY,KAAK,GAAG,eAAe,CAAC,OAAO,KAAK,CAAC,CAAC;CACnD;AACD,MAAM,MAAM,qBAAqB,GAAG,qBAAqB,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;AAE1E,yBAAiB,0BAA0B,CAAC;IACnC,MAAM,KAAK;;;;;;;;;;;+BAMhB,CAAC;IACH,KAAY,KAAK,GAAG,eAAe,CAAC,OAAO,KAAK,CAAC,CAAC;CACnD;AACD,MAAM,MAAM,0BAA0B,GACpC,0BAA0B,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC"}
@@ -25,23 +25,23 @@ var __importStar = (this && this.__importStar) || function (mod) {
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
26
  exports.DcqlCredentialPresentation = exports.DcqlW3cVcPresentation = exports.DcqlSdJwtVcPresentation = exports.DcqlMdocPresentation = void 0;
27
27
  const v = __importStar(require("valibot"));
28
- const model_1 = require("./model");
29
- const u_dcql_credential_1 = require("./u-dcql-credential");
28
+ const u_dcql_credential_1 = require("../u-dcql-credential");
29
+ const u_model_1 = require("../u-model");
30
30
  var DcqlMdocPresentation;
31
31
  (function (DcqlMdocPresentation) {
32
- DcqlMdocPresentation.model = new model_1.Model({ vModel: u_dcql_credential_1.DcqlMdocCredential.vModel });
32
+ DcqlMdocPresentation.model = new u_model_1.Model({ vModel: u_dcql_credential_1.DcqlMdocCredential.vModel });
33
33
  })(DcqlMdocPresentation || (exports.DcqlMdocPresentation = DcqlMdocPresentation = {}));
34
34
  var DcqlSdJwtVcPresentation;
35
35
  (function (DcqlSdJwtVcPresentation) {
36
- DcqlSdJwtVcPresentation.model = new model_1.Model({ vModel: u_dcql_credential_1.DcqlSdJwtVcCredential.vModel });
36
+ DcqlSdJwtVcPresentation.model = new u_model_1.Model({ vModel: u_dcql_credential_1.DcqlSdJwtVcCredential.vModel });
37
37
  })(DcqlSdJwtVcPresentation || (exports.DcqlSdJwtVcPresentation = DcqlSdJwtVcPresentation = {}));
38
38
  var DcqlW3cVcPresentation;
39
39
  (function (DcqlW3cVcPresentation) {
40
- DcqlW3cVcPresentation.model = new model_1.Model({ vModel: u_dcql_credential_1.DcqlW3cVcCredential.vModel });
40
+ DcqlW3cVcPresentation.model = new u_model_1.Model({ vModel: u_dcql_credential_1.DcqlW3cVcCredential.vModel });
41
41
  })(DcqlW3cVcPresentation || (exports.DcqlW3cVcPresentation = DcqlW3cVcPresentation = {}));
42
42
  var DcqlCredentialPresentation;
43
43
  (function (DcqlCredentialPresentation) {
44
- DcqlCredentialPresentation.model = new model_1.Model({
44
+ DcqlCredentialPresentation.model = new u_model_1.Model({
45
45
  vModel: v.union([
46
46
  DcqlMdocPresentation.model.v,
47
47
  DcqlSdJwtVcPresentation.model.v,
@@ -49,4 +49,4 @@ var DcqlCredentialPresentation;
49
49
  ]),
50
50
  });
51
51
  })(DcqlCredentialPresentation || (exports.DcqlCredentialPresentation = DcqlCredentialPresentation = {}));
52
- //# sourceMappingURL=u-dcql-credential-presentation.js.map
52
+ //# sourceMappingURL=m-dcql-credential-presentation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"m-dcql-credential-presentation.js","sourceRoot":"","sources":["../../../src/dcql-presentation/m-dcql-credential-presentation.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAA6B;AAC7B,4DAI8B;AAE9B,wCAAmC;AAEnC,IAAiB,oBAAoB,CAGpC;AAHD,WAAiB,oBAAoB;IACtB,0BAAK,GAAG,IAAI,eAAK,CAAC,EAAE,MAAM,EAAE,sCAAkB,CAAC,MAAM,EAAE,CAAC,CAAC;AAExE,CAAC,EAHgB,oBAAoB,oCAApB,oBAAoB,QAGpC;AAGD,IAAiB,uBAAuB,CAGvC;AAHD,WAAiB,uBAAuB;IACzB,6BAAK,GAAG,IAAI,eAAK,CAAC,EAAE,MAAM,EAAE,yCAAqB,CAAC,MAAM,EAAE,CAAC,CAAC;AAE3E,CAAC,EAHgB,uBAAuB,uCAAvB,uBAAuB,QAGvC;AAGD,IAAiB,qBAAqB,CAGrC;AAHD,WAAiB,qBAAqB;IACvB,2BAAK,GAAG,IAAI,eAAK,CAAC,EAAE,MAAM,EAAE,uCAAmB,CAAC,MAAM,EAAE,CAAC,CAAC;AAEzE,CAAC,EAHgB,qBAAqB,qCAArB,qBAAqB,QAGrC;AAGD,IAAiB,0BAA0B,CAS1C;AATD,WAAiB,0BAA0B;IAC5B,gCAAK,GAAG,IAAI,eAAK,CAAC;QAC7B,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC;YACd,oBAAoB,CAAC,KAAK,CAAC,CAAC;YAC5B,uBAAuB,CAAC,KAAK,CAAC,CAAC;YAC/B,qBAAqB,CAAC,KAAK,CAAC,CAAC;SAC9B,CAAC;KACH,CAAC,CAAC;AAEL,CAAC,EATgB,0BAA0B,0CAA1B,0BAA0B,QAS1C"}