dcql 0.2.11 → 0.2.13

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 (103) 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} +12 -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} +14 -2
  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 +5 -2
  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-parser/dcql-credential-query-result.d.ts +8 -0
  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 +4 -4
  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/dcql-presentation/m-dcql-credential-presentation.d.ts +45 -0
  27. package/dist/src/dcql-presentation/m-dcql-credential-presentation.d.ts.map +1 -0
  28. package/dist/src/dcql-presentation/m-dcql-credential-presentation.js +52 -0
  29. package/dist/src/dcql-presentation/m-dcql-credential-presentation.js.map +1 -0
  30. package/dist/src/dcql-presentation/{m-dcql-presentation-query.d.ts → m-dcql-presentation-result.d.ts} +204 -381
  31. package/dist/src/dcql-presentation/m-dcql-presentation-result.d.ts.map +1 -0
  32. package/dist/src/dcql-presentation/m-dcql-presentation-result.js +127 -0
  33. package/dist/src/dcql-presentation/m-dcql-presentation-result.js.map +1 -0
  34. package/dist/src/dcql-presentation/{m-dcql-presentation-record.d.ts → m-dcql-presentation.d.ts} +3 -3
  35. package/dist/src/dcql-presentation/m-dcql-presentation.d.ts.map +1 -0
  36. package/dist/src/dcql-presentation/{m-dcql-presentation-record.js → m-dcql-presentation.js} +10 -10
  37. package/dist/src/dcql-presentation/m-dcql-presentation.js.map +1 -0
  38. package/dist/src/dcql-query/dcql-query.test.js +22 -19
  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 +199 -52
  47. package/dist/src/dcql-query/m-dcql-query.d.ts.map +1 -1
  48. package/dist/src/dcql-query/m-dcql-query.js +4 -6
  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 +366 -80
  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 +12 -17
  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} +14 -10
  61. package/dist/src/dcql-query-result/run-dcql-query.js.map +1 -0
  62. package/dist/src/index.d.ts +5 -8
  63. package/dist/src/index.d.ts.map +1 -1
  64. package/dist/src/index.js +10 -14
  65. package/dist/src/index.js.map +1 -1
  66. package/dist/src/u-dcql-credential.d.ts +77 -0
  67. package/dist/src/u-dcql-credential.d.ts.map +1 -0
  68. package/dist/src/u-dcql-credential.js +68 -0
  69. package/dist/src/u-dcql-credential.js.map +1 -0
  70. package/dist/src/u-model.d.ts +27 -0
  71. package/dist/src/u-model.d.ts.map +1 -0
  72. package/dist/src/{u-dcql-credential-representation.js → u-model.js} +39 -6
  73. package/dist/src/u-model.js.map +1 -0
  74. package/package.json +1 -1
  75. package/dist/src/dcql-presentation/m-dcql-presentation-query.d.ts.map +0 -1
  76. package/dist/src/dcql-presentation/m-dcql-presentation-query.js +0 -132
  77. package/dist/src/dcql-presentation/m-dcql-presentation-query.js.map +0 -1
  78. package/dist/src/dcql-presentation/m-dcql-presentation-record.d.ts.map +0 -1
  79. package/dist/src/dcql-presentation/m-dcql-presentation-record.js.map +0 -1
  80. package/dist/src/dcql-query/claims-path.d.ts +0 -14
  81. package/dist/src/dcql-query/claims-path.d.ts.map +0 -1
  82. package/dist/src/dcql-query/claims-path.js +0 -23
  83. package/dist/src/dcql-query/claims-path.js.map +0 -1
  84. package/dist/src/dcql-query/claims-path.test.d.ts.map +0 -1
  85. package/dist/src/dcql-query/claims-path.test.js.map +0 -1
  86. package/dist/src/dcql-query/dcql-query.d.ts +0 -8
  87. package/dist/src/dcql-query/dcql-query.d.ts.map +0 -1
  88. package/dist/src/dcql-query/dcql-query.js.map +0 -1
  89. package/dist/src/dcql-query-result/dcql-claims-query-result.d.ts.map +0 -1
  90. package/dist/src/dcql-query-result/dcql-claims-query-result.js.map +0 -1
  91. package/dist/src/dcql-query-result/dcql-credential-query-result.d.ts +0 -8
  92. package/dist/src/dcql-query-result/dcql-credential-query-result.d.ts.map +0 -1
  93. package/dist/src/dcql-query-result/dcql-credential-query-result.js.map +0 -1
  94. package/dist/src/e-base.d.ts.map +0 -1
  95. package/dist/src/e-base.js.map +0 -1
  96. package/dist/src/e-dcql.d.ts.map +0 -1
  97. package/dist/src/e-dcql.js.map +0 -1
  98. package/dist/src/u-dcql-credential-representation.d.ts +0 -29
  99. package/dist/src/u-dcql-credential-representation.d.ts.map +0 -1
  100. package/dist/src/u-dcql-credential-representation.js.map +0 -1
  101. /package/dist/src/{e-base.d.ts → dcql-error/e-base.d.ts} +0 -0
  102. /package/dist/src/{e-base.js → dcql-error/e-base.js} +0 -0
  103. /package/dist/src/{dcql-query → dcql-parser}/claims-path.test.d.ts +0 -0
@@ -1,21 +1,30 @@
1
1
  import * as v from 'valibot';
2
2
  import { DcqlQueryResult } from '../dcql-query-result/m-dcql-query-result.js';
3
3
  import type { DcqlQuery } from '../dcql-query/m-dcql-query.js';
4
- import type { DcqlPresentationRepresentation } from '../u-dcql-credential-representation.js';
5
- export declare namespace DcqlPresentationQueryResult {
4
+ import type { DcqlCredentialPresentation } from './m-dcql-credential-presentation.js';
5
+ export declare namespace DcqlPresentationResult {
6
6
  const vModel: v.ObjectSchema<{
7
- readonly canBeSatisfied: v.LiteralSchema<true, undefined>;
8
- readonly presentation_matches: v.RecordSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, v.ObjectSchema<{
7
+ readonly invalid_matches: v.UnionSchema<[v.RecordSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, v.ObjectSchema<{
9
8
  readonly presentation_id: v.SchemaWithPipe<[v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
10
- readonly presentation_index: v.NumberSchema<undefined>;
11
- readonly output: v.UnionSchema<[v.ObjectSchema<{
12
- readonly claims: v.RecordSchema<v.StringSchema<undefined>, v.GenericSchema<import("../u-dcql.js").Json, import("../u-dcql.js").Json, v.BaseIssue<unknown>>, undefined>;
9
+ readonly output: v.UnknownSchema;
10
+ readonly success: v.LiteralSchema<false, undefined>;
11
+ readonly typed: v.BooleanSchema<undefined>;
12
+ readonly issues: v.SchemaWithPipe<[v.ArraySchema<v.UnknownSchema, undefined>, v.CustomSchema<[unknown, ...unknown[]], undefined>]>;
13
+ readonly claim_set_index: v.UnionSchema<[v.NumberSchema<undefined>, v.UndefinedSchema<undefined>], undefined>;
14
+ }, undefined>, undefined>, v.UndefinedSchema<undefined>], undefined>;
15
+ readonly valid_matches: v.RecordSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, v.ObjectSchema<{
16
+ readonly presentation_id: v.SchemaWithPipe<[v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
17
+ readonly output: v.VariantSchema<"credentialFormat", [v.ObjectSchema<{
18
+ readonly credentialFormat: v.LiteralSchema<"mso_mdoc", undefined>;
19
+ readonly doctype: v.StringSchema<undefined>;
20
+ readonly namespaces: v.RecordSchema<v.StringSchema<undefined>, v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>;
13
21
  }, undefined>, v.ObjectSchema<{
22
+ readonly credentialFormat: v.LiteralSchema<"vc+sd-jwt", undefined>;
14
23
  readonly vct: v.StringSchema<undefined>;
15
24
  readonly claims: v.RecordSchema<v.StringSchema<undefined>, v.GenericSchema<import("../u-dcql.js").Json, import("../u-dcql.js").Json, v.BaseIssue<unknown>>, undefined>;
16
25
  }, undefined>, v.ObjectSchema<{
17
- readonly docType: v.StringSchema<undefined>;
18
- readonly namespaces: v.RecordSchema<v.StringSchema<undefined>, v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>;
26
+ readonly credentialFormat: v.PicklistSchema<["jwt_vc_json-ld", "jwt_vc_json"], undefined>;
27
+ readonly claims: v.RecordSchema<v.StringSchema<undefined>, v.GenericSchema<import("../u-dcql.js").Json, import("../u-dcql.js").Json, v.BaseIssue<unknown>>, undefined>;
19
28
  }, undefined>], undefined>;
20
29
  readonly success: v.LiteralSchema<true, undefined>;
21
30
  readonly typed: v.LiteralSchema<true, undefined>;
@@ -108,7 +117,6 @@ export declare namespace DcqlPresentationQueryResult {
108
117
  }, undefined>], undefined>, undefined>, v.CustomSchema<[{
109
118
  id: string;
110
119
  format: "mso_mdoc";
111
- claim_sets?: [string[], ...string[][]] | undefined;
112
120
  claims?: [{
113
121
  namespace: string;
114
122
  claim_name: string;
@@ -120,13 +128,13 @@ export declare namespace DcqlPresentationQueryResult {
120
128
  values?: (string | number | boolean)[] | undefined;
121
129
  id?: string | undefined;
122
130
  }[]] | undefined;
131
+ claim_sets?: [string[], ...string[][]] | undefined;
123
132
  meta?: {
124
133
  doctype_value?: string | undefined;
125
134
  } | undefined;
126
135
  } | {
127
136
  id: string;
128
137
  format: "vc+sd-jwt";
129
- claim_sets?: [string[], ...string[][]] | undefined;
130
138
  claims?: [{
131
139
  path: (string | number | null)[];
132
140
  values?: (string | number | boolean)[] | undefined;
@@ -136,13 +144,13 @@ export declare namespace DcqlPresentationQueryResult {
136
144
  values?: (string | number | boolean)[] | undefined;
137
145
  id?: string | undefined;
138
146
  }[]] | undefined;
147
+ claim_sets?: [string[], ...string[][]] | undefined;
139
148
  meta?: {
140
149
  vct_values?: string[] | undefined;
141
150
  } | undefined;
142
151
  } | {
143
152
  id: string;
144
153
  format: "jwt_vc_json" | "jwt_vc_json-ld";
145
- claim_sets?: [string[], ...string[][]] | undefined;
146
154
  claims?: [{
147
155
  path: (string | number | null)[];
148
156
  values?: (string | number | boolean)[] | undefined;
@@ -152,10 +160,10 @@ export declare namespace DcqlPresentationQueryResult {
152
160
  values?: (string | number | boolean)[] | undefined;
153
161
  id?: string | undefined;
154
162
  }[]] | undefined;
163
+ claim_sets?: [string[], ...string[][]] | undefined;
155
164
  }, ...({
156
165
  id: string;
157
166
  format: "mso_mdoc";
158
- claim_sets?: [string[], ...string[][]] | undefined;
159
167
  claims?: [{
160
168
  namespace: string;
161
169
  claim_name: string;
@@ -167,13 +175,13 @@ export declare namespace DcqlPresentationQueryResult {
167
175
  values?: (string | number | boolean)[] | undefined;
168
176
  id?: string | undefined;
169
177
  }[]] | undefined;
178
+ claim_sets?: [string[], ...string[][]] | undefined;
170
179
  meta?: {
171
180
  doctype_value?: string | undefined;
172
181
  } | undefined;
173
182
  } | {
174
183
  id: string;
175
184
  format: "vc+sd-jwt";
176
- claim_sets?: [string[], ...string[][]] | undefined;
177
185
  claims?: [{
178
186
  path: (string | number | null)[];
179
187
  values?: (string | number | boolean)[] | undefined;
@@ -183,13 +191,13 @@ export declare namespace DcqlPresentationQueryResult {
183
191
  values?: (string | number | boolean)[] | undefined;
184
192
  id?: string | undefined;
185
193
  }[]] | undefined;
194
+ claim_sets?: [string[], ...string[][]] | undefined;
186
195
  meta?: {
187
196
  vct_values?: string[] | undefined;
188
197
  } | undefined;
189
198
  } | {
190
199
  id: string;
191
200
  format: "jwt_vc_json" | "jwt_vc_json-ld";
192
- claim_sets?: [string[], ...string[][]] | undefined;
193
201
  claims?: [{
194
202
  path: (string | number | null)[];
195
203
  values?: (string | number | boolean)[] | undefined;
@@ -199,10 +207,10 @@ export declare namespace DcqlPresentationQueryResult {
199
207
  values?: (string | number | boolean)[] | undefined;
200
208
  id?: string | undefined;
201
209
  }[]] | undefined;
210
+ claim_sets?: [string[], ...string[][]] | undefined;
202
211
  })[]], undefined>, v.DescriptionAction<[{
203
212
  id: string;
204
213
  format: "mso_mdoc";
205
- claim_sets?: [string[], ...string[][]] | undefined;
206
214
  claims?: [{
207
215
  namespace: string;
208
216
  claim_name: string;
@@ -214,13 +222,13 @@ export declare namespace DcqlPresentationQueryResult {
214
222
  values?: (string | number | boolean)[] | undefined;
215
223
  id?: string | undefined;
216
224
  }[]] | undefined;
225
+ claim_sets?: [string[], ...string[][]] | undefined;
217
226
  meta?: {
218
227
  doctype_value?: string | undefined;
219
228
  } | undefined;
220
229
  } | {
221
230
  id: string;
222
231
  format: "vc+sd-jwt";
223
- claim_sets?: [string[], ...string[][]] | undefined;
224
232
  claims?: [{
225
233
  path: (string | number | null)[];
226
234
  values?: (string | number | boolean)[] | undefined;
@@ -230,13 +238,13 @@ export declare namespace DcqlPresentationQueryResult {
230
238
  values?: (string | number | boolean)[] | undefined;
231
239
  id?: string | undefined;
232
240
  }[]] | undefined;
241
+ claim_sets?: [string[], ...string[][]] | undefined;
233
242
  meta?: {
234
243
  vct_values?: string[] | undefined;
235
244
  } | undefined;
236
245
  } | {
237
246
  id: string;
238
247
  format: "jwt_vc_json" | "jwt_vc_json-ld";
239
- claim_sets?: [string[], ...string[][]] | undefined;
240
248
  claims?: [{
241
249
  path: (string | number | null)[];
242
250
  values?: (string | number | boolean)[] | undefined;
@@ -246,10 +254,10 @@ export declare namespace DcqlPresentationQueryResult {
246
254
  values?: (string | number | boolean)[] | undefined;
247
255
  id?: string | undefined;
248
256
  }[]] | undefined;
257
+ claim_sets?: [string[], ...string[][]] | undefined;
249
258
  }, ...({
250
259
  id: string;
251
260
  format: "mso_mdoc";
252
- claim_sets?: [string[], ...string[][]] | undefined;
253
261
  claims?: [{
254
262
  namespace: string;
255
263
  claim_name: string;
@@ -261,13 +269,13 @@ export declare namespace DcqlPresentationQueryResult {
261
269
  values?: (string | number | boolean)[] | undefined;
262
270
  id?: string | undefined;
263
271
  }[]] | undefined;
272
+ claim_sets?: [string[], ...string[][]] | undefined;
264
273
  meta?: {
265
274
  doctype_value?: string | undefined;
266
275
  } | undefined;
267
276
  } | {
268
277
  id: string;
269
278
  format: "vc+sd-jwt";
270
- claim_sets?: [string[], ...string[][]] | undefined;
271
279
  claims?: [{
272
280
  path: (string | number | null)[];
273
281
  values?: (string | number | boolean)[] | undefined;
@@ -277,13 +285,13 @@ export declare namespace DcqlPresentationQueryResult {
277
285
  values?: (string | number | boolean)[] | undefined;
278
286
  id?: string | undefined;
279
287
  }[]] | undefined;
288
+ claim_sets?: [string[], ...string[][]] | undefined;
280
289
  meta?: {
281
290
  vct_values?: string[] | undefined;
282
291
  } | undefined;
283
292
  } | {
284
293
  id: string;
285
294
  format: "jwt_vc_json" | "jwt_vc_json-ld";
286
- claim_sets?: [string[], ...string[][]] | undefined;
287
295
  claims?: [{
288
296
  path: (string | number | null)[];
289
297
  values?: (string | number | boolean)[] | undefined;
@@ -293,196 +301,8 @@ export declare namespace DcqlPresentationQueryResult {
293
301
  values?: (string | number | boolean)[] | undefined;
294
302
  id?: string | undefined;
295
303
  }[]] | undefined;
304
+ claim_sets?: [string[], ...string[][]] | undefined;
296
305
  })[]], "REQUIRED. A non-empty array of Credential Queries that specify the requested Verifiable Credentials.">]>;
297
- readonly credential_matches: v.RecordSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, v.UnionSchema<[v.ObjectSchema<{
298
- readonly all: v.SchemaWithPipe<[v.ArraySchema<v.ArraySchema<v.UnionSchema<[v.UndefinedSchema<undefined>, v.ObjectSchema<{
299
- readonly output: v.UnionSchema<[v.ObjectSchema<{
300
- readonly claims: v.RecordSchema<v.StringSchema<undefined>, v.GenericSchema<import("../u-dcql.js").Json, import("../u-dcql.js").Json, v.BaseIssue<unknown>>, undefined>;
301
- }, undefined>, v.ObjectSchema<{
302
- readonly vct: v.StringSchema<undefined>;
303
- readonly claims: v.RecordSchema<v.StringSchema<undefined>, v.GenericSchema<import("../u-dcql.js").Json, import("../u-dcql.js").Json, v.BaseIssue<unknown>>, undefined>;
304
- }, undefined>, v.ObjectSchema<{
305
- readonly docType: v.StringSchema<undefined>;
306
- readonly namespaces: v.RecordSchema<v.StringSchema<undefined>, v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>;
307
- }, undefined>], undefined>;
308
- readonly success: v.LiteralSchema<true, undefined>;
309
- readonly typed: v.LiteralSchema<true, undefined>;
310
- readonly issues: v.OptionalSchema<v.UndefinedSchema<undefined>, never>;
311
- readonly credential_index: v.NumberSchema<undefined>;
312
- readonly claim_set_index: v.UnionSchema<[v.NumberSchema<undefined>, v.UndefinedSchema<undefined>], undefined>;
313
- }, undefined>, v.ObjectSchema<{
314
- readonly success: v.LiteralSchema<false, undefined>;
315
- readonly typed: v.BooleanSchema<undefined>;
316
- readonly output: v.UnknownSchema;
317
- readonly issues: v.SchemaWithPipe<[v.ArraySchema<v.UnknownSchema, undefined>, v.CustomSchema<[unknown, ...unknown[]], undefined>]>;
318
- readonly credential_index: v.NumberSchema<undefined>;
319
- readonly claim_set_index: v.UnionSchema<[v.NumberSchema<undefined>, v.UndefinedSchema<undefined>], undefined>;
320
- }, undefined>], undefined>, undefined>, undefined>, v.CustomSchema<[({
321
- output: unknown;
322
- success: false;
323
- typed: boolean;
324
- issues: [unknown, ...unknown[]];
325
- claim_set_index: number | undefined;
326
- credential_index: number;
327
- } | {
328
- output: {
329
- claims: {
330
- [x: string]: import("../u-dcql.js").Json;
331
- };
332
- } | {
333
- claims: {
334
- [x: string]: import("../u-dcql.js").Json;
335
- };
336
- vct: string;
337
- } | {
338
- docType: string;
339
- namespaces: {
340
- [x: string]: {
341
- [x: string]: unknown;
342
- };
343
- };
344
- };
345
- success: true;
346
- typed: true;
347
- claim_set_index: number | undefined;
348
- credential_index: number;
349
- issues?: undefined;
350
- } | undefined)[], ...({
351
- output: unknown;
352
- success: false;
353
- typed: boolean;
354
- issues: [unknown, ...unknown[]];
355
- claim_set_index: number | undefined;
356
- credential_index: number;
357
- } | {
358
- output: {
359
- claims: {
360
- [x: string]: import("../u-dcql.js").Json;
361
- };
362
- } | {
363
- claims: {
364
- [x: string]: import("../u-dcql.js").Json;
365
- };
366
- vct: string;
367
- } | {
368
- docType: string;
369
- namespaces: {
370
- [x: string]: {
371
- [x: string]: unknown;
372
- };
373
- };
374
- };
375
- success: true;
376
- typed: true;
377
- claim_set_index: number | undefined;
378
- credential_index: number;
379
- issues?: undefined;
380
- } | undefined)[][]], undefined>]>;
381
- readonly output: v.UnionSchema<[v.ObjectSchema<{
382
- readonly claims: v.RecordSchema<v.StringSchema<undefined>, v.GenericSchema<import("../u-dcql.js").Json, import("../u-dcql.js").Json, v.BaseIssue<unknown>>, undefined>;
383
- }, undefined>, v.ObjectSchema<{
384
- readonly vct: v.StringSchema<undefined>;
385
- readonly claims: v.RecordSchema<v.StringSchema<undefined>, v.GenericSchema<import("../u-dcql.js").Json, import("../u-dcql.js").Json, v.BaseIssue<unknown>>, undefined>;
386
- }, undefined>, v.ObjectSchema<{
387
- readonly docType: v.StringSchema<undefined>;
388
- readonly namespaces: v.RecordSchema<v.StringSchema<undefined>, v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>;
389
- }, undefined>], undefined>;
390
- readonly success: v.LiteralSchema<true, undefined>;
391
- readonly typed: v.LiteralSchema<true, undefined>;
392
- readonly issues: v.OptionalSchema<v.UndefinedSchema<undefined>, never>;
393
- readonly credential_index: v.NumberSchema<undefined>;
394
- readonly claim_set_index: v.UnionSchema<[v.NumberSchema<undefined>, v.UndefinedSchema<undefined>], undefined>;
395
- }, undefined>, v.ObjectSchema<{
396
- readonly all: v.SchemaWithPipe<[v.ArraySchema<v.ArraySchema<v.UnionSchema<[v.UndefinedSchema<undefined>, v.ObjectSchema<{
397
- readonly output: v.UnionSchema<[v.ObjectSchema<{
398
- readonly claims: v.RecordSchema<v.StringSchema<undefined>, v.GenericSchema<import("../u-dcql.js").Json, import("../u-dcql.js").Json, v.BaseIssue<unknown>>, undefined>;
399
- }, undefined>, v.ObjectSchema<{
400
- readonly vct: v.StringSchema<undefined>;
401
- readonly claims: v.RecordSchema<v.StringSchema<undefined>, v.GenericSchema<import("../u-dcql.js").Json, import("../u-dcql.js").Json, v.BaseIssue<unknown>>, undefined>;
402
- }, undefined>, v.ObjectSchema<{
403
- readonly docType: v.StringSchema<undefined>;
404
- readonly namespaces: v.RecordSchema<v.StringSchema<undefined>, v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>;
405
- }, undefined>], undefined>;
406
- readonly success: v.LiteralSchema<true, undefined>;
407
- readonly typed: v.LiteralSchema<true, undefined>;
408
- readonly issues: v.OptionalSchema<v.UndefinedSchema<undefined>, never>;
409
- readonly credential_index: v.NumberSchema<undefined>;
410
- readonly claim_set_index: v.UnionSchema<[v.NumberSchema<undefined>, v.UndefinedSchema<undefined>], undefined>;
411
- }, undefined>, v.ObjectSchema<{
412
- readonly success: v.LiteralSchema<false, undefined>;
413
- readonly typed: v.BooleanSchema<undefined>;
414
- readonly output: v.UnknownSchema;
415
- readonly issues: v.SchemaWithPipe<[v.ArraySchema<v.UnknownSchema, undefined>, v.CustomSchema<[unknown, ...unknown[]], undefined>]>;
416
- readonly credential_index: v.NumberSchema<undefined>;
417
- readonly claim_set_index: v.UnionSchema<[v.NumberSchema<undefined>, v.UndefinedSchema<undefined>], undefined>;
418
- }, undefined>], undefined>, undefined>, undefined>, v.CustomSchema<[({
419
- output: unknown;
420
- success: false;
421
- typed: boolean;
422
- issues: [unknown, ...unknown[]];
423
- claim_set_index: number | undefined;
424
- credential_index: number;
425
- } | {
426
- output: {
427
- claims: {
428
- [x: string]: import("../u-dcql.js").Json;
429
- };
430
- } | {
431
- claims: {
432
- [x: string]: import("../u-dcql.js").Json;
433
- };
434
- vct: string;
435
- } | {
436
- docType: string;
437
- namespaces: {
438
- [x: string]: {
439
- [x: string]: unknown;
440
- };
441
- };
442
- };
443
- success: true;
444
- typed: true;
445
- claim_set_index: number | undefined;
446
- credential_index: number;
447
- issues?: undefined;
448
- } | undefined)[], ...({
449
- output: unknown;
450
- success: false;
451
- typed: boolean;
452
- issues: [unknown, ...unknown[]];
453
- claim_set_index: number | undefined;
454
- credential_index: number;
455
- } | {
456
- output: {
457
- claims: {
458
- [x: string]: import("../u-dcql.js").Json;
459
- };
460
- } | {
461
- claims: {
462
- [x: string]: import("../u-dcql.js").Json;
463
- };
464
- vct: string;
465
- } | {
466
- docType: string;
467
- namespaces: {
468
- [x: string]: {
469
- [x: string]: unknown;
470
- };
471
- };
472
- };
473
- success: true;
474
- typed: true;
475
- claim_set_index: number | undefined;
476
- credential_index: number;
477
- issues?: undefined;
478
- } | undefined)[][]], undefined>]>;
479
- readonly success: v.LiteralSchema<false, undefined>;
480
- readonly typed: v.BooleanSchema<undefined>;
481
- readonly output: v.UnknownSchema;
482
- readonly issues: v.SchemaWithPipe<[v.ArraySchema<v.UnknownSchema, undefined>, v.CustomSchema<[unknown, ...unknown[]], undefined>]>;
483
- readonly credential_index: v.NumberSchema<undefined>;
484
- readonly claim_set_index: v.UnionSchema<[v.NumberSchema<undefined>, v.UndefinedSchema<undefined>], undefined>;
485
- }, undefined>], undefined>, undefined>;
486
306
  readonly credential_sets: v.OptionalSchema<v.SchemaWithPipe<[v.ArraySchema<v.ObjectSchema<{
487
307
  readonly matching_options: v.UnionSchema<[v.UndefinedSchema<undefined>, v.SchemaWithPipe<[v.ArraySchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>, v.CustomSchema<[string[], ...string[][]], undefined>]>], undefined>;
488
308
  readonly options: v.SchemaWithPipe<[v.ArraySchema<v.ArraySchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>, undefined>, v.CustomSchema<[string[], ...string[][]], undefined>, v.DescriptionAction<[string[], ...string[][]], "REQUIRED. A non-empty array, where each value in the array is a list of Credential Query identifiers representing one set of Credentials that satisfies the use case.">]>;
@@ -519,18 +339,14 @@ export declare namespace DcqlPresentationQueryResult {
519
339
  [x: string]: unknown;
520
340
  } | undefined;
521
341
  }[]], "OPTIONAL. A non-empty array of credential set queries that specifies additional constraints on which of the requested Verifiable Credentials to return.">]>, never>;
342
+ readonly canBeSatisfied: v.BooleanSchema<undefined>;
522
343
  }, undefined>;
523
344
  type Input = v.InferInput<typeof vModel>;
524
345
  type Output = v.InferOutput<typeof vModel>;
525
- type UnknownResult = (DcqlQueryResult & {
526
- canBeSatisfied: false;
527
- presentation_matches?: undefined;
528
- }) | DcqlPresentationQueryResult;
529
346
  const parse: (input: Input | DcqlQueryResult) => {
530
347
  credentials: [{
531
348
  id: string;
532
349
  format: "mso_mdoc";
533
- claim_sets?: [string[], ...string[][]] | undefined;
534
350
  claims?: [{
535
351
  namespace: string;
536
352
  claim_name: string;
@@ -542,13 +358,13 @@ export declare namespace DcqlPresentationQueryResult {
542
358
  values?: (string | number | boolean)[] | undefined;
543
359
  id?: string | undefined;
544
360
  }[]] | undefined;
361
+ claim_sets?: [string[], ...string[][]] | undefined;
545
362
  meta?: {
546
363
  doctype_value?: string | undefined;
547
364
  } | undefined;
548
365
  } | {
549
366
  id: string;
550
367
  format: "vc+sd-jwt";
551
- claim_sets?: [string[], ...string[][]] | undefined;
552
368
  claims?: [{
553
369
  path: (string | number | null)[];
554
370
  values?: (string | number | boolean)[] | undefined;
@@ -558,13 +374,13 @@ export declare namespace DcqlPresentationQueryResult {
558
374
  values?: (string | number | boolean)[] | undefined;
559
375
  id?: string | undefined;
560
376
  }[]] | undefined;
377
+ claim_sets?: [string[], ...string[][]] | undefined;
561
378
  meta?: {
562
379
  vct_values?: string[] | undefined;
563
380
  } | undefined;
564
381
  } | {
565
382
  id: string;
566
383
  format: "jwt_vc_json" | "jwt_vc_json-ld";
567
- claim_sets?: [string[], ...string[][]] | undefined;
568
384
  claims?: [{
569
385
  path: (string | number | null)[];
570
386
  values?: (string | number | boolean)[] | undefined;
@@ -574,10 +390,10 @@ export declare namespace DcqlPresentationQueryResult {
574
390
  values?: (string | number | boolean)[] | undefined;
575
391
  id?: string | undefined;
576
392
  }[]] | undefined;
393
+ claim_sets?: [string[], ...string[][]] | undefined;
577
394
  }, ...({
578
395
  id: string;
579
396
  format: "mso_mdoc";
580
- claim_sets?: [string[], ...string[][]] | undefined;
581
397
  claims?: [{
582
398
  namespace: string;
583
399
  claim_name: string;
@@ -589,13 +405,13 @@ export declare namespace DcqlPresentationQueryResult {
589
405
  values?: (string | number | boolean)[] | undefined;
590
406
  id?: string | undefined;
591
407
  }[]] | undefined;
408
+ claim_sets?: [string[], ...string[][]] | undefined;
592
409
  meta?: {
593
410
  doctype_value?: string | undefined;
594
411
  } | undefined;
595
412
  } | {
596
413
  id: string;
597
414
  format: "vc+sd-jwt";
598
- claim_sets?: [string[], ...string[][]] | undefined;
599
415
  claims?: [{
600
416
  path: (string | number | null)[];
601
417
  values?: (string | number | boolean)[] | undefined;
@@ -605,13 +421,13 @@ export declare namespace DcqlPresentationQueryResult {
605
421
  values?: (string | number | boolean)[] | undefined;
606
422
  id?: string | undefined;
607
423
  }[]] | undefined;
424
+ claim_sets?: [string[], ...string[][]] | undefined;
608
425
  meta?: {
609
426
  vct_values?: string[] | undefined;
610
427
  } | undefined;
611
428
  } | {
612
429
  id: string;
613
430
  format: "jwt_vc_json" | "jwt_vc_json-ld";
614
- claim_sets?: [string[], ...string[][]] | undefined;
615
431
  claims?: [{
616
432
  path: (string | number | null)[];
617
433
  values?: (string | number | boolean)[] | undefined;
@@ -621,187 +437,206 @@ export declare namespace DcqlPresentationQueryResult {
621
437
  values?: (string | number | boolean)[] | undefined;
622
438
  id?: string | undefined;
623
439
  }[]] | undefined;
440
+ claim_sets?: [string[], ...string[][]] | undefined;
624
441
  })[]];
625
- credential_matches: {
442
+ canBeSatisfied: boolean;
443
+ invalid_matches: {
444
+ [x: string]: {
445
+ output: unknown;
446
+ success: false;
447
+ typed: boolean;
448
+ issues: [unknown, ...unknown[]];
449
+ claim_set_index: number | undefined;
450
+ presentation_id: string;
451
+ };
452
+ } | undefined;
453
+ valid_matches: {
626
454
  [x: string]: {
627
455
  output: {
628
- claims: {
629
- [x: string]: import("../u-dcql.js").Json;
456
+ credentialFormat: "mso_mdoc";
457
+ doctype: string;
458
+ namespaces: {
459
+ [x: string]: {
460
+ [x: string]: unknown;
461
+ };
630
462
  };
631
463
  } | {
464
+ credentialFormat: "vc+sd-jwt";
465
+ vct: string;
632
466
  claims: {
633
467
  [x: string]: import("../u-dcql.js").Json;
634
468
  };
635
- vct: string;
636
469
  } | {
637
- docType: string;
638
- namespaces: {
639
- [x: string]: {
640
- [x: string]: unknown;
641
- };
470
+ credentialFormat: "jwt_vc_json" | "jwt_vc_json-ld";
471
+ claims: {
472
+ [x: string]: import("../u-dcql.js").Json;
642
473
  };
643
474
  };
644
475
  success: true;
645
476
  typed: true;
646
477
  claim_set_index: number | undefined;
647
- credential_index: number;
648
- all: [({
649
- output: unknown;
650
- success: false;
651
- typed: boolean;
652
- issues: [unknown, ...unknown[]];
653
- claim_set_index: number | undefined;
654
- credential_index: number;
655
- } | {
656
- output: {
657
- claims: {
658
- [x: string]: import("../u-dcql.js").Json;
659
- };
660
- } | {
661
- claims: {
662
- [x: string]: import("../u-dcql.js").Json;
663
- };
664
- vct: string;
665
- } | {
666
- docType: string;
667
- namespaces: {
668
- [x: string]: {
669
- [x: string]: unknown;
670
- };
671
- };
672
- };
673
- success: true;
674
- typed: true;
675
- claim_set_index: number | undefined;
676
- credential_index: number;
677
- issues?: undefined;
678
- } | undefined)[], ...({
679
- output: unknown;
680
- success: false;
681
- typed: boolean;
682
- issues: [unknown, ...unknown[]];
683
- claim_set_index: number | undefined;
684
- credential_index: number;
685
- } | {
686
- output: {
687
- claims: {
688
- [x: string]: import("../u-dcql.js").Json;
689
- };
690
- } | {
691
- claims: {
692
- [x: string]: import("../u-dcql.js").Json;
693
- };
694
- vct: string;
695
- } | {
696
- docType: string;
697
- namespaces: {
698
- [x: string]: {
699
- [x: string]: unknown;
700
- };
701
- };
702
- };
703
- success: true;
704
- typed: true;
705
- claim_set_index: number | undefined;
706
- credential_index: number;
707
- issues?: undefined;
708
- } | undefined)[][]];
709
- issues?: undefined;
710
- } | {
478
+ presentation_id: string;
479
+ };
480
+ };
481
+ credential_sets?: [{
482
+ options: [string[], ...string[][]];
483
+ required: boolean;
484
+ matching_options: [string[], ...string[][]] | undefined;
485
+ purpose?: string | number | {
486
+ [x: string]: unknown;
487
+ } | undefined;
488
+ }, ...{
489
+ options: [string[], ...string[][]];
490
+ required: boolean;
491
+ matching_options: [string[], ...string[][]] | undefined;
492
+ purpose?: string | number | {
493
+ [x: string]: unknown;
494
+ } | undefined;
495
+ }[]] | undefined;
496
+ };
497
+ /**
498
+ * Query if the presentation record can be satisfied by the provided presentations
499
+ * considering the dcql query
500
+ *
501
+ * @param dcqlQuery
502
+ * @param dcqlPresentation
503
+ */
504
+ const fromDcqlPresentation: (dcqlPresentation: Record<string, DcqlCredentialPresentation>, ctx: {
505
+ dcqlQuery: DcqlQuery;
506
+ }) => Output;
507
+ const validate: (dcqlQueryResult: DcqlPresentationResult) => {
508
+ credentials: [{
509
+ id: string;
510
+ format: "mso_mdoc";
511
+ claims?: [{
512
+ namespace: string;
513
+ claim_name: string;
514
+ values?: (string | number | boolean)[] | undefined;
515
+ id?: string | undefined;
516
+ }, ...{
517
+ namespace: string;
518
+ claim_name: string;
519
+ values?: (string | number | boolean)[] | undefined;
520
+ id?: string | undefined;
521
+ }[]] | undefined;
522
+ claim_sets?: [string[], ...string[][]] | undefined;
523
+ meta?: {
524
+ doctype_value?: string | undefined;
525
+ } | undefined;
526
+ } | {
527
+ id: string;
528
+ format: "vc+sd-jwt";
529
+ claims?: [{
530
+ path: (string | number | null)[];
531
+ values?: (string | number | boolean)[] | undefined;
532
+ id?: string | undefined;
533
+ }, ...{
534
+ path: (string | number | null)[];
535
+ values?: (string | number | boolean)[] | undefined;
536
+ id?: string | undefined;
537
+ }[]] | undefined;
538
+ claim_sets?: [string[], ...string[][]] | undefined;
539
+ meta?: {
540
+ vct_values?: string[] | undefined;
541
+ } | undefined;
542
+ } | {
543
+ id: string;
544
+ format: "jwt_vc_json" | "jwt_vc_json-ld";
545
+ claims?: [{
546
+ path: (string | number | null)[];
547
+ values?: (string | number | boolean)[] | undefined;
548
+ id?: string | undefined;
549
+ }, ...{
550
+ path: (string | number | null)[];
551
+ values?: (string | number | boolean)[] | undefined;
552
+ id?: string | undefined;
553
+ }[]] | undefined;
554
+ claim_sets?: [string[], ...string[][]] | undefined;
555
+ }, ...({
556
+ id: string;
557
+ format: "mso_mdoc";
558
+ claims?: [{
559
+ namespace: string;
560
+ claim_name: string;
561
+ values?: (string | number | boolean)[] | undefined;
562
+ id?: string | undefined;
563
+ }, ...{
564
+ namespace: string;
565
+ claim_name: string;
566
+ values?: (string | number | boolean)[] | undefined;
567
+ id?: string | undefined;
568
+ }[]] | undefined;
569
+ claim_sets?: [string[], ...string[][]] | undefined;
570
+ meta?: {
571
+ doctype_value?: string | undefined;
572
+ } | undefined;
573
+ } | {
574
+ id: string;
575
+ format: "vc+sd-jwt";
576
+ claims?: [{
577
+ path: (string | number | null)[];
578
+ values?: (string | number | boolean)[] | undefined;
579
+ id?: string | undefined;
580
+ }, ...{
581
+ path: (string | number | null)[];
582
+ values?: (string | number | boolean)[] | undefined;
583
+ id?: string | undefined;
584
+ }[]] | undefined;
585
+ claim_sets?: [string[], ...string[][]] | undefined;
586
+ meta?: {
587
+ vct_values?: string[] | undefined;
588
+ } | undefined;
589
+ } | {
590
+ id: string;
591
+ format: "jwt_vc_json" | "jwt_vc_json-ld";
592
+ claims?: [{
593
+ path: (string | number | null)[];
594
+ values?: (string | number | boolean)[] | undefined;
595
+ id?: string | undefined;
596
+ }, ...{
597
+ path: (string | number | null)[];
598
+ values?: (string | number | boolean)[] | undefined;
599
+ id?: string | undefined;
600
+ }[]] | undefined;
601
+ claim_sets?: [string[], ...string[][]] | undefined;
602
+ })[]];
603
+ canBeSatisfied: boolean;
604
+ invalid_matches: {
605
+ [x: string]: {
711
606
  output: unknown;
712
607
  success: false;
713
608
  typed: boolean;
714
609
  issues: [unknown, ...unknown[]];
715
610
  claim_set_index: number | undefined;
716
- credential_index: number;
717
- all: [({
718
- output: unknown;
719
- success: false;
720
- typed: boolean;
721
- issues: [unknown, ...unknown[]];
722
- claim_set_index: number | undefined;
723
- credential_index: number;
724
- } | {
725
- output: {
726
- claims: {
727
- [x: string]: import("../u-dcql.js").Json;
728
- };
729
- } | {
730
- claims: {
731
- [x: string]: import("../u-dcql.js").Json;
732
- };
733
- vct: string;
734
- } | {
735
- docType: string;
736
- namespaces: {
737
- [x: string]: {
738
- [x: string]: unknown;
739
- };
740
- };
741
- };
742
- success: true;
743
- typed: true;
744
- claim_set_index: number | undefined;
745
- credential_index: number;
746
- issues?: undefined;
747
- } | undefined)[], ...({
748
- output: unknown;
749
- success: false;
750
- typed: boolean;
751
- issues: [unknown, ...unknown[]];
752
- claim_set_index: number | undefined;
753
- credential_index: number;
754
- } | {
755
- output: {
756
- claims: {
757
- [x: string]: import("../u-dcql.js").Json;
758
- };
759
- } | {
760
- claims: {
761
- [x: string]: import("../u-dcql.js").Json;
762
- };
763
- vct: string;
764
- } | {
765
- docType: string;
766
- namespaces: {
767
- [x: string]: {
768
- [x: string]: unknown;
769
- };
770
- };
771
- };
772
- success: true;
773
- typed: true;
774
- claim_set_index: number | undefined;
775
- credential_index: number;
776
- issues?: undefined;
777
- } | undefined)[][]];
611
+ presentation_id: string;
778
612
  };
779
- };
780
- canBeSatisfied: true;
781
- presentation_matches: {
613
+ } | undefined;
614
+ valid_matches: {
782
615
  [x: string]: {
783
616
  output: {
784
- claims: {
785
- [x: string]: import("../u-dcql.js").Json;
617
+ credentialFormat: "mso_mdoc";
618
+ doctype: string;
619
+ namespaces: {
620
+ [x: string]: {
621
+ [x: string]: unknown;
622
+ };
786
623
  };
787
624
  } | {
625
+ credentialFormat: "vc+sd-jwt";
626
+ vct: string;
788
627
  claims: {
789
628
  [x: string]: import("../u-dcql.js").Json;
790
629
  };
791
- vct: string;
792
630
  } | {
793
- docType: string;
794
- namespaces: {
795
- [x: string]: {
796
- [x: string]: unknown;
797
- };
631
+ credentialFormat: "jwt_vc_json" | "jwt_vc_json-ld";
632
+ claims: {
633
+ [x: string]: import("../u-dcql.js").Json;
798
634
  };
799
635
  };
800
636
  success: true;
801
637
  typed: true;
802
638
  claim_set_index: number | undefined;
803
639
  presentation_id: string;
804
- presentation_index: number;
805
640
  };
806
641
  };
807
642
  credential_sets?: [{
@@ -820,18 +655,6 @@ export declare namespace DcqlPresentationQueryResult {
820
655
  } | undefined;
821
656
  }[]] | undefined;
822
657
  };
823
- /**
824
- * Query if the presentation record can be satisfied by the provided presentations
825
- * considering the dcql query
826
- *
827
- * @param dcqlQuery
828
- * @param presentations
829
- */
830
- const query: (presentations: DcqlPresentationRepresentation[], ctx: {
831
- dcqlQuery: DcqlQuery;
832
- }) => DcqlPresentationQueryResult.UnknownResult;
833
- const validate: (dcqlQueryResult: DcqlPresentationQueryResult.UnknownResult) => DcqlPresentationQueryResult;
834
- const fromDcqlQueryResult: (dcqlQueryResult: DcqlQueryResult) => DcqlPresentationQueryResult;
835
658
  }
836
- export type DcqlPresentationQueryResult = DcqlPresentationQueryResult.Output;
837
- //# sourceMappingURL=m-dcql-presentation-query.d.ts.map
659
+ export type DcqlPresentationResult = DcqlPresentationResult.Output;
660
+ //# sourceMappingURL=m-dcql-presentation-result.d.ts.map