dcql 0.2.17 → 0.2.19

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 (109) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +131 -0
  3. package/dist/index.d.mts +2885 -0
  4. package/dist/index.d.ts +2885 -0
  5. package/dist/index.js +1014 -0
  6. package/dist/index.js.map +1 -0
  7. package/dist/index.mjs +951 -0
  8. package/dist/index.mjs.map +1 -0
  9. package/package.json +18 -23
  10. package/dist/src/dcql-error/e-base.d.ts +0 -15
  11. package/dist/src/dcql-error/e-base.d.ts.map +0 -1
  12. package/dist/src/dcql-error/e-base.js +0 -78
  13. package/dist/src/dcql-error/e-base.js.map +0 -1
  14. package/dist/src/dcql-error/e-dcql.d.ts +0 -50
  15. package/dist/src/dcql-error/e-dcql.d.ts.map +0 -1
  16. package/dist/src/dcql-error/e-dcql.js +0 -53
  17. package/dist/src/dcql-error/e-dcql.js.map +0 -1
  18. package/dist/src/dcql-error/index.d.ts +0 -3
  19. package/dist/src/dcql-error/index.d.ts.map +0 -1
  20. package/dist/src/dcql-error/index.js +0 -23
  21. package/dist/src/dcql-error/index.js.map +0 -1
  22. package/dist/src/dcql-parser/claims-path.test.d.ts +0 -2
  23. package/dist/src/dcql-parser/claims-path.test.d.ts.map +0 -1
  24. package/dist/src/dcql-parser/claims-path.test.js +0 -103
  25. package/dist/src/dcql-parser/claims-path.test.js.map +0 -1
  26. package/dist/src/dcql-parser/dcql-claims-query-result.d.ts +0 -25
  27. package/dist/src/dcql-parser/dcql-claims-query-result.d.ts.map +0 -1
  28. package/dist/src/dcql-parser/dcql-claims-query-result.js +0 -178
  29. package/dist/src/dcql-parser/dcql-claims-query-result.js.map +0 -1
  30. package/dist/src/dcql-parser/dcql-credential-query-result.d.ts +0 -8
  31. package/dist/src/dcql-parser/dcql-credential-query-result.d.ts.map +0 -1
  32. package/dist/src/dcql-parser/dcql-credential-query-result.js +0 -65
  33. package/dist/src/dcql-parser/dcql-credential-query-result.js.map +0 -1
  34. package/dist/src/dcql-presentation/index.d.ts +0 -4
  35. package/dist/src/dcql-presentation/index.d.ts.map +0 -1
  36. package/dist/src/dcql-presentation/index.js +0 -13
  37. package/dist/src/dcql-presentation/index.js.map +0 -1
  38. package/dist/src/dcql-presentation/m-dcql-credential-presentation.d.ts +0 -59
  39. package/dist/src/dcql-presentation/m-dcql-credential-presentation.d.ts.map +0 -1
  40. package/dist/src/dcql-presentation/m-dcql-credential-presentation.js +0 -55
  41. package/dist/src/dcql-presentation/m-dcql-credential-presentation.js.map +0 -1
  42. package/dist/src/dcql-presentation/m-dcql-presentation-result.d.ts +0 -660
  43. package/dist/src/dcql-presentation/m-dcql-presentation-result.d.ts.map +0 -1
  44. package/dist/src/dcql-presentation/m-dcql-presentation-result.js +0 -132
  45. package/dist/src/dcql-presentation/m-dcql-presentation-result.js.map +0 -1
  46. package/dist/src/dcql-presentation/m-dcql-presentation.d.ts +0 -14
  47. package/dist/src/dcql-presentation/m-dcql-presentation.d.ts.map +0 -1
  48. package/dist/src/dcql-presentation/m-dcql-presentation.js +0 -42
  49. package/dist/src/dcql-presentation/m-dcql-presentation.js.map +0 -1
  50. package/dist/src/dcql-query/dcql-query-complex.test.d.ts +0 -2
  51. package/dist/src/dcql-query/dcql-query-complex.test.d.ts.map +0 -1
  52. package/dist/src/dcql-query/dcql-query-complex.test.js +0 -3204
  53. package/dist/src/dcql-query/dcql-query-complex.test.js.map +0 -1
  54. package/dist/src/dcql-query/dcql-query-with-json-transform.test.d.ts +0 -2
  55. package/dist/src/dcql-query/dcql-query-with-json-transform.test.d.ts.map +0 -1
  56. package/dist/src/dcql-query/dcql-query-with-json-transform.test.js +0 -188
  57. package/dist/src/dcql-query/dcql-query-with-json-transform.test.js.map +0 -1
  58. package/dist/src/dcql-query/dcql-query.test.d.ts +0 -2
  59. package/dist/src/dcql-query/dcql-query.test.d.ts.map +0 -1
  60. package/dist/src/dcql-query/dcql-query.test.js +0 -378
  61. package/dist/src/dcql-query/dcql-query.test.js.map +0 -1
  62. package/dist/src/dcql-query/index.d.ts +0 -5
  63. package/dist/src/dcql-query/index.d.ts.map +0 -1
  64. package/dist/src/dcql-query/index.js +0 -12
  65. package/dist/src/dcql-query/index.js.map +0 -1
  66. package/dist/src/dcql-query/m-dcql-claims-query.d.ts +0 -35
  67. package/dist/src/dcql-query/m-dcql-claims-query.d.ts.map +0 -1
  68. package/dist/src/dcql-query/m-dcql-claims-query.js +0 -57
  69. package/dist/src/dcql-query/m-dcql-claims-query.js.map +0 -1
  70. package/dist/src/dcql-query/m-dcql-credential-query.d.ts +0 -186
  71. package/dist/src/dcql-query/m-dcql-credential-query.d.ts.map +0 -1
  72. package/dist/src/dcql-query/m-dcql-credential-query.js +0 -85
  73. package/dist/src/dcql-query/m-dcql-credential-query.js.map +0 -1
  74. package/dist/src/dcql-query/m-dcql-credential-set-query.d.ts +0 -18
  75. package/dist/src/dcql-query/m-dcql-credential-set-query.d.ts.map +0 -1
  76. package/dist/src/dcql-query/m-dcql-credential-set-query.js +0 -41
  77. package/dist/src/dcql-query/m-dcql-credential-set-query.js.map +0 -1
  78. package/dist/src/dcql-query/m-dcql-query.d.ts +0 -843
  79. package/dist/src/dcql-query/m-dcql-query.d.ts.map +0 -1
  80. package/dist/src/dcql-query/m-dcql-query.js +0 -89
  81. package/dist/src/dcql-query/m-dcql-query.js.map +0 -1
  82. package/dist/src/dcql-query-result/index.d.ts +0 -3
  83. package/dist/src/dcql-query-result/index.d.ts.map +0 -1
  84. package/dist/src/dcql-query-result/index.js +0 -8
  85. package/dist/src/dcql-query-result/index.js.map +0 -1
  86. package/dist/src/dcql-query-result/m-dcql-query-result.d.ts +0 -883
  87. package/dist/src/dcql-query-result/m-dcql-query-result.d.ts.map +0 -1
  88. package/dist/src/dcql-query-result/m-dcql-query-result.js +0 -69
  89. package/dist/src/dcql-query-result/m-dcql-query-result.js.map +0 -1
  90. package/dist/src/dcql-query-result/run-dcql-query.d.ts +0 -8
  91. package/dist/src/dcql-query-result/run-dcql-query.d.ts.map +0 -1
  92. package/dist/src/dcql-query-result/run-dcql-query.js +0 -56
  93. package/dist/src/dcql-query-result/run-dcql-query.js.map +0 -1
  94. package/dist/src/index.d.ts +0 -6
  95. package/dist/src/index.d.ts.map +0 -1
  96. package/dist/src/index.js +0 -27
  97. package/dist/src/index.js.map +0 -1
  98. package/dist/src/u-dcql-credential.d.ts +0 -104
  99. package/dist/src/u-dcql-credential.d.ts.map +0 -1
  100. package/dist/src/u-dcql-credential.js +0 -84
  101. package/dist/src/u-dcql-credential.js.map +0 -1
  102. package/dist/src/u-dcql.d.ts +0 -17
  103. package/dist/src/u-dcql.d.ts.map +0 -1
  104. package/dist/src/u-dcql.js +0 -98
  105. package/dist/src/u-dcql.js.map +0 -1
  106. package/dist/src/u-model.d.ts +0 -27
  107. package/dist/src/u-model.d.ts.map +0 -1
  108. package/dist/src/u-model.js +0 -65
  109. package/dist/src/u-model.js.map +0 -1
@@ -1,178 +0,0 @@
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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
- Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.getCredentialQueryParser = exports.getJsonClaimsQueriesForClaimSet = exports.getMdocClaimsQueriesForClaimSet = exports.getJsonClaimsParser = exports.getNamespacesParser = void 0;
27
- const v = __importStar(require("valibot"));
28
- const e_dcql_js_1 = require("../dcql-error/e-dcql.js");
29
- const u_dcql_1 = require("../u-dcql");
30
- const u_dcql_js_1 = require("../u-dcql.js");
31
- const getClaimParser = (input) => {
32
- const { value, values } = input;
33
- if (value) {
34
- return (0, u_dcql_1.vWithJT)(v.literal(value));
35
- }
36
- if (values) {
37
- return (0, u_dcql_1.vWithJT)(v.union(values.map(val => v.literal(val))));
38
- }
39
- return v.nonNullish(v.any());
40
- };
41
- const getNamespacesParser = (claimsQueries) => {
42
- const claimsForNamespace = {};
43
- for (const claimQuery of claimsQueries) {
44
- if (claimsForNamespace[claimQuery.namespace]) {
45
- claimsForNamespace[claimQuery.namespace]?.push({ ...claimQuery });
46
- }
47
- else {
48
- claimsForNamespace[claimQuery.namespace] = [{ ...claimQuery }];
49
- }
50
- }
51
- const parsersForNamespaces = Object.entries(claimsForNamespace).map(([namespace, claims]) => {
52
- const claimParsers = Object.fromEntries(claims.map(claim => [claim.claim_name, getClaimParser(claim)]));
53
- return [namespace, v.object(claimParsers)];
54
- });
55
- return v.object(Object.fromEntries(parsersForNamespaces));
56
- };
57
- exports.getNamespacesParser = getNamespacesParser;
58
- const getClaimQueryParser = (claimQuery, ctx) => {
59
- const { index, presentation } = ctx;
60
- const pathElement = claimQuery.path[index];
61
- const isLast = index === claimQuery.path.length - 1;
62
- const vClaimParser = getClaimParser(claimQuery);
63
- if (typeof pathElement === 'number') {
64
- const elementParser = isLast
65
- ? vClaimParser
66
- : getClaimQueryParser(claimQuery, { ...ctx, index: index + 1 });
67
- if (presentation) {
68
- // We allow both the concrete value and an array of one value
69
- return v.union([
70
- v.pipe(v.array(u_dcql_js_1.vJson), v.length(1), v.transform(input => input[0]), elementParser),
71
- elementParser,
72
- ]);
73
- }
74
- return v.pipe(v.array(u_dcql_js_1.vJson), v.transform(input => input[pathElement]), elementParser);
75
- }
76
- else if (typeof pathElement === 'string') {
77
- return v.object({
78
- [pathElement]: isLast
79
- ? vClaimParser
80
- : getClaimQueryParser(claimQuery, { ...ctx, index: index + 1 }),
81
- });
82
- }
83
- else {
84
- return isLast
85
- ? v.array(vClaimParser)
86
- : v.array(getClaimQueryParser(claimQuery, { ...ctx, index: index + 1 }));
87
- }
88
- };
89
- const getJsonClaimsParser = (claimsQueries, ctx) => {
90
- const claimParser = v.intersect(claimsQueries.map(claimQuery => getClaimQueryParser(claimQuery, {
91
- ...ctx,
92
- index: 0,
93
- })));
94
- return claimParser;
95
- };
96
- exports.getJsonClaimsParser = getJsonClaimsParser;
97
- const getMdocClaimsQueriesForClaimSet = (claimsQueries, claimSet) => {
98
- return claimSet.map(credential_id => {
99
- const query = claimsQueries.find(query => query.id === credential_id);
100
- if (!query) {
101
- throw new e_dcql_js_1.DcqlInvalidClaimsQueryIdError({
102
- message: `Claims-query with id '${credential_id}' not found.`,
103
- });
104
- }
105
- return query;
106
- });
107
- };
108
- exports.getMdocClaimsQueriesForClaimSet = getMdocClaimsQueriesForClaimSet;
109
- const getJsonClaimsQueriesForClaimSet = (claimsQueries, claimSet) => {
110
- return claimSet.map(credential_id => {
111
- const query = claimsQueries.find(query => query.id === credential_id);
112
- if (!query) {
113
- throw new e_dcql_js_1.DcqlInvalidClaimsQueryIdError({
114
- message: `Claims-query with id '${credential_id}' not found.`,
115
- });
116
- }
117
- return query;
118
- });
119
- };
120
- exports.getJsonClaimsQueriesForClaimSet = getJsonClaimsQueriesForClaimSet;
121
- const getMdocParser = (credentialQuery, ctx) => {
122
- const { claimSet } = ctx;
123
- const vDoctype = credentialQuery.meta?.doctype_value
124
- ? v.literal(credentialQuery.meta.doctype_value)
125
- : v.string();
126
- const claimSetQueries = credentialQuery.claims && claimSet
127
- ? (0, exports.getMdocClaimsQueriesForClaimSet)(credentialQuery.claims, claimSet)
128
- : credentialQuery.claims;
129
- const credentialParser = v.object({
130
- credential_format: v.literal('mso_mdoc'),
131
- doctype: vDoctype,
132
- namespaces: claimSetQueries
133
- ? (0, exports.getNamespacesParser)(claimSetQueries)
134
- : v.record(v.string(), v.record(v.string(), v.unknown())),
135
- });
136
- return credentialParser;
137
- };
138
- const getW3cVcSdJwtVcParser = (credentialQuery, ctx) => {
139
- const { claimSet } = ctx;
140
- const claimSetQueries = credentialQuery.claims && claimSet
141
- ? (0, exports.getJsonClaimsQueriesForClaimSet)(credentialQuery.claims, claimSet)
142
- : credentialQuery.claims;
143
- if (credentialQuery.format === 'vc+sd-jwt') {
144
- return v.object({
145
- credential_format: v.literal('vc+sd-jwt'),
146
- vct: credentialQuery.meta?.vct_values
147
- ? v.picklist(credentialQuery.meta.vct_values)
148
- : v.string(),
149
- claims: claimSetQueries
150
- ? (0, exports.getJsonClaimsParser)(claimSetQueries, ctx)
151
- : u_dcql_js_1.vJsonRecord,
152
- });
153
- }
154
- else {
155
- const credentialParser = v.object({
156
- credential_format: v.picklist(['jwt_vc_json', 'jwt_vc_json-ld']),
157
- claims: claimSetQueries
158
- ? (0, exports.getJsonClaimsParser)(claimSetQueries, ctx)
159
- : u_dcql_js_1.vJsonRecord,
160
- });
161
- return credentialParser;
162
- }
163
- };
164
- const getCredentialQueryParser = (credentialQuery, ctx) => {
165
- if (credentialQuery.claim_sets && !ctx.claimSet) {
166
- throw new e_dcql_js_1.DcqlMissingClaimSetParseError({
167
- message: `credentialQuery specifies claim_sets but no claim_set for parsing is provided.`,
168
- });
169
- }
170
- if (credentialQuery.format === 'mso_mdoc') {
171
- return getMdocParser(credentialQuery, ctx);
172
- }
173
- else {
174
- return getW3cVcSdJwtVcParser(credentialQuery, ctx);
175
- }
176
- };
177
- exports.getCredentialQueryParser = getCredentialQueryParser;
178
- //# sourceMappingURL=dcql-claims-query-result.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"dcql-claims-query-result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C,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,8 +0,0 @@
1
- import type { DcqlQueryResult } from '../dcql-query-result/m-dcql-query-result.js';
2
- import type { DcqlCredentialQuery } from '../dcql-query/m-dcql-credential-query.js';
3
- import type { DcqlCredential } from '../u-dcql-credential.js';
4
- export declare const runCredentialQuery: (credentialQuery: DcqlCredentialQuery, ctx: {
5
- credentials: DcqlCredential[];
6
- presentation: boolean;
7
- }) => DcqlQueryResult.CredentialQueryResult;
8
- //# sourceMappingURL=dcql-credential-query-result.d.ts.map
@@ -1 +0,0 @@
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"}
@@ -1,65 +0,0 @@
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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
- Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.runCredentialQuery = void 0;
27
- /* eslint-disable @typescript-eslint/no-non-null-assertion */
28
- const v = __importStar(require("valibot"));
29
- const dcql_claims_query_result_js_1 = require("./dcql-claims-query-result.js");
30
- const runCredentialQuery = (credentialQuery, ctx) => {
31
- const { credentials, presentation } = ctx;
32
- const claimSets = credentialQuery.claim_sets ?? [undefined];
33
- // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
34
- const credentialQueryResult = new Array(claimSets.length).fill([]);
35
- for (const [claimSetIndex, claim_set] of claimSets.entries()) {
36
- const credentialParser = (0, dcql_claims_query_result_js_1.getCredentialQueryParser)(credentialQuery, {
37
- claimSet: claim_set,
38
- presentation,
39
- });
40
- for (const [credentialIndex, credential] of credentials.entries()) {
41
- if (claimSetIndex > 0) {
42
- // if one the credential was successfully parsed against a previous claimsset we don't need to further validate other claim sets
43
- const previous = credentialQueryResult[claimSetIndex - 1][credentialIndex];
44
- // if the previous credential was successfully parsed we don't need to further validate the current credential
45
- // we set all further parsing attempts to undefined
46
- if (previous?.success || !previous) {
47
- credentialQueryResult[claimSetIndex][credentialIndex] = undefined;
48
- continue;
49
- }
50
- }
51
- const parseResult = v.safeParse(credentialParser, credential);
52
- credentialQueryResult[claimSetIndex].push({
53
- ...parseResult,
54
- ...(parseResult.issues && {
55
- flattened: v.flatten(parseResult.issues),
56
- }),
57
- input_credential_index: credentialIndex,
58
- claim_set_index: credentialQuery.claim_sets ? claimSetIndex : undefined,
59
- });
60
- }
61
- }
62
- return credentialQueryResult;
63
- };
64
- exports.runCredentialQuery = runCredentialQuery;
65
- //# sourceMappingURL=dcql-credential-query-result.js.map
@@ -1 +0,0 @@
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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"}
@@ -1,4 +0,0 @@
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';
4
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
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,13 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
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; } });
13
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
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,59 +0,0 @@
1
- import * as v from 'valibot';
2
- import type { InferModelTypes } from '../u-model';
3
- export declare namespace DcqlMdocPresentation {
4
- const vModel: v.ObjectSchema<{
5
- readonly credential_format: v.LiteralSchema<"mso_mdoc", undefined>;
6
- readonly doctype: v.StringSchema<undefined>;
7
- readonly namespaces: v.RecordSchema<v.StringSchema<undefined>, v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>;
8
- }, undefined>;
9
- const model: import("../u-model").Model<v.ObjectSchema<{
10
- readonly credential_format: v.LiteralSchema<"mso_mdoc", undefined>;
11
- readonly doctype: v.StringSchema<undefined>;
12
- readonly namespaces: v.RecordSchema<v.StringSchema<undefined>, v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>;
13
- }, undefined>>;
14
- type Model = InferModelTypes<typeof model>;
15
- }
16
- export type DcqlMdocPresentation = DcqlMdocPresentation.Model['Output'];
17
- export declare namespace DcqlSdJwtVcPresentation {
18
- const vModel: v.ObjectSchema<{
19
- readonly credential_format: v.LiteralSchema<"vc+sd-jwt", undefined>;
20
- readonly vct: v.StringSchema<undefined>;
21
- readonly claims: v.RecordSchema<v.StringSchema<undefined>, v.GenericSchema<import("../u-dcql").Json, import("../u-dcql").Json, v.BaseIssue<unknown>>, undefined>;
22
- }, undefined>;
23
- const model: import("../u-model").Model<v.ObjectSchema<{
24
- readonly credential_format: v.LiteralSchema<"vc+sd-jwt", undefined>;
25
- readonly vct: v.StringSchema<undefined>;
26
- readonly claims: v.RecordSchema<v.StringSchema<undefined>, v.GenericSchema<import("../u-dcql").Json, import("../u-dcql").Json, v.BaseIssue<unknown>>, undefined>;
27
- }, undefined>>;
28
- type Model = InferModelTypes<typeof model>;
29
- }
30
- export type DcqlSdJwtVcPresentation = DcqlSdJwtVcPresentation.Model['Output'];
31
- export declare namespace DcqlW3cVcPresentation {
32
- const vModel: v.ObjectSchema<{
33
- readonly credential_format: v.PicklistSchema<["jwt_vc_json-ld", "jwt_vc_json"], undefined>;
34
- readonly claims: v.RecordSchema<v.StringSchema<undefined>, v.GenericSchema<import("../u-dcql").Json, import("../u-dcql").Json, v.BaseIssue<unknown>>, undefined>;
35
- }, undefined>;
36
- const model: import("../u-model").Model<v.ObjectSchema<{
37
- readonly credential_format: v.PicklistSchema<["jwt_vc_json-ld", "jwt_vc_json"], undefined>;
38
- readonly claims: v.RecordSchema<v.StringSchema<undefined>, v.GenericSchema<import("../u-dcql").Json, import("../u-dcql").Json, v.BaseIssue<unknown>>, undefined>;
39
- }, undefined>>;
40
- type Model = InferModelTypes<typeof model>;
41
- }
42
- export type DcqlW3cVcPresentation = DcqlW3cVcPresentation.Model['Output'];
43
- export declare namespace DcqlCredentialPresentation {
44
- const model: import("../u-model").Model<v.VariantSchema<"credential_format", [v.ObjectSchema<{
45
- readonly credential_format: v.LiteralSchema<"mso_mdoc", undefined>;
46
- readonly doctype: v.StringSchema<undefined>;
47
- readonly namespaces: v.RecordSchema<v.StringSchema<undefined>, v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>;
48
- }, undefined>, v.ObjectSchema<{
49
- readonly credential_format: v.LiteralSchema<"vc+sd-jwt", undefined>;
50
- readonly vct: v.StringSchema<undefined>;
51
- readonly claims: v.RecordSchema<v.StringSchema<undefined>, v.GenericSchema<import("../u-dcql").Json, import("../u-dcql").Json, v.BaseIssue<unknown>>, undefined>;
52
- }, undefined>, v.ObjectSchema<{
53
- readonly credential_format: v.PicklistSchema<["jwt_vc_json-ld", "jwt_vc_json"], undefined>;
54
- readonly claims: v.RecordSchema<v.StringSchema<undefined>, v.GenericSchema<import("../u-dcql").Json, import("../u-dcql").Json, v.BaseIssue<unknown>>, undefined>;
55
- }, undefined>], undefined>>;
56
- type Model = InferModelTypes<typeof model>;
57
- }
58
- export type DcqlCredentialPresentation = DcqlCredentialPresentation.Model['Output'];
59
- //# sourceMappingURL=m-dcql-credential-presentation.d.ts.map
@@ -1 +0,0 @@
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,MAAM;;;;iBAA4B,CAAC;IACzC,MAAM,KAAK;;;;kBAAwB,CAAC;IAC3C,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,MAAM;;;;iBAA+B,CAAC;IAC5C,MAAM,KAAK;;;;kBAAwB,CAAC;IAC3C,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,MAAM;;;iBAA6B,CAAC;IAC1C,MAAM,KAAK;;;kBAAwB,CAAC;IAC3C,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"}
@@ -1,55 +0,0 @@
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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
- Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.DcqlCredentialPresentation = exports.DcqlW3cVcPresentation = exports.DcqlSdJwtVcPresentation = exports.DcqlMdocPresentation = void 0;
27
- const v = __importStar(require("valibot"));
28
- const u_dcql_credential_1 = require("../u-dcql-credential");
29
- const u_model_1 = require("../u-model");
30
- var DcqlMdocPresentation;
31
- (function (DcqlMdocPresentation) {
32
- DcqlMdocPresentation.vModel = u_dcql_credential_1.DcqlMdocCredential.vModel;
33
- DcqlMdocPresentation.model = new u_model_1.Model({ vModel: DcqlMdocPresentation.vModel });
34
- })(DcqlMdocPresentation || (exports.DcqlMdocPresentation = DcqlMdocPresentation = {}));
35
- var DcqlSdJwtVcPresentation;
36
- (function (DcqlSdJwtVcPresentation) {
37
- DcqlSdJwtVcPresentation.vModel = u_dcql_credential_1.DcqlSdJwtVcCredential.vModel;
38
- DcqlSdJwtVcPresentation.model = new u_model_1.Model({ vModel: DcqlSdJwtVcPresentation.vModel });
39
- })(DcqlSdJwtVcPresentation || (exports.DcqlSdJwtVcPresentation = DcqlSdJwtVcPresentation = {}));
40
- var DcqlW3cVcPresentation;
41
- (function (DcqlW3cVcPresentation) {
42
- DcqlW3cVcPresentation.vModel = u_dcql_credential_1.DcqlW3cVcCredential.vModel;
43
- DcqlW3cVcPresentation.model = new u_model_1.Model({ vModel: DcqlW3cVcPresentation.vModel });
44
- })(DcqlW3cVcPresentation || (exports.DcqlW3cVcPresentation = DcqlW3cVcPresentation = {}));
45
- var DcqlCredentialPresentation;
46
- (function (DcqlCredentialPresentation) {
47
- DcqlCredentialPresentation.model = new u_model_1.Model({
48
- vModel: v.variant('credential_format', [
49
- DcqlMdocPresentation.vModel,
50
- DcqlSdJwtVcPresentation.vModel,
51
- DcqlW3cVcPresentation.vModel,
52
- ]),
53
- });
54
- })(DcqlCredentialPresentation || (exports.DcqlCredentialPresentation = DcqlCredentialPresentation = {}));
55
- //# sourceMappingURL=m-dcql-credential-presentation.js.map
@@ -1 +0,0 @@
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,CAIpC;AAJD,WAAiB,oBAAoB;IACtB,2BAAM,GAAG,sCAAkB,CAAC,MAAM,CAAC;IACnC,0BAAK,GAAG,IAAI,eAAK,CAAC,EAAE,MAAM,EAAN,qBAAA,MAAM,EAAE,CAAC,CAAC;AAE7C,CAAC,EAJgB,oBAAoB,oCAApB,oBAAoB,QAIpC;AAGD,IAAiB,uBAAuB,CAIvC;AAJD,WAAiB,uBAAuB;IACzB,8BAAM,GAAG,yCAAqB,CAAC,MAAM,CAAC;IACtC,6BAAK,GAAG,IAAI,eAAK,CAAC,EAAE,MAAM,EAAN,wBAAA,MAAM,EAAE,CAAC,CAAC;AAE7C,CAAC,EAJgB,uBAAuB,uCAAvB,uBAAuB,QAIvC;AAGD,IAAiB,qBAAqB,CAIrC;AAJD,WAAiB,qBAAqB;IACvB,4BAAM,GAAG,uCAAmB,CAAC,MAAM,CAAC;IACpC,2BAAK,GAAG,IAAI,eAAK,CAAC,EAAE,MAAM,EAAN,sBAAA,MAAM,EAAE,CAAC,CAAC;AAE7C,CAAC,EAJgB,qBAAqB,qCAArB,qBAAqB,QAIrC;AAGD,IAAiB,0BAA0B,CAS1C;AATD,WAAiB,0BAA0B;IAC5B,gCAAK,GAAG,IAAI,eAAK,CAAC;QAC7B,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC,mBAAmB,EAAE;YACrC,oBAAoB,CAAC,MAAM;YAC3B,uBAAuB,CAAC,MAAM;YAC9B,qBAAqB,CAAC,MAAM;SAC7B,CAAC;KACH,CAAC,CAAC;AAEL,CAAC,EATgB,0BAA0B,0CAA1B,0BAA0B,QAS1C"}