dcql 0.2.11 → 0.2.12

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 (56) hide show
  1. package/dist/src/dcql-presentation/index.d.ts +2 -2
  2. package/dist/src/dcql-presentation/index.d.ts.map +1 -1
  3. package/dist/src/dcql-presentation/index.js +2 -2
  4. package/dist/src/dcql-presentation/index.js.map +1 -1
  5. package/dist/src/dcql-presentation/{m-dcql-presentation-query.d.ts → m-dcql-presentation-result.d.ts} +157 -343
  6. package/dist/src/dcql-presentation/m-dcql-presentation-result.d.ts.map +1 -0
  7. package/dist/src/dcql-presentation/m-dcql-presentation-result.js +125 -0
  8. package/dist/src/dcql-presentation/m-dcql-presentation-result.js.map +1 -0
  9. package/dist/src/dcql-presentation/{m-dcql-presentation-record.d.ts → m-dcql-presentation.d.ts} +3 -3
  10. package/dist/src/dcql-presentation/m-dcql-presentation.d.ts.map +1 -0
  11. package/dist/src/dcql-presentation/{m-dcql-presentation-record.js → m-dcql-presentation.js} +10 -10
  12. package/dist/src/dcql-presentation/m-dcql-presentation.js.map +1 -0
  13. package/dist/src/dcql-query/dcql-query.d.ts +2 -2
  14. package/dist/src/dcql-query/dcql-query.d.ts.map +1 -1
  15. package/dist/src/dcql-query/dcql-query.js.map +1 -1
  16. package/dist/src/dcql-query/dcql-query.test.js +7 -10
  17. package/dist/src/dcql-query/dcql-query.test.js.map +1 -1
  18. package/dist/src/dcql-query/m-dcql-query.d.ts +128 -8
  19. package/dist/src/dcql-query/m-dcql-query.d.ts.map +1 -1
  20. package/dist/src/dcql-query/m-dcql-query.js +1 -3
  21. package/dist/src/dcql-query/m-dcql-query.js.map +1 -1
  22. package/dist/src/dcql-query-result/dcql-credential-query-result.d.ts +2 -2
  23. package/dist/src/dcql-query-result/dcql-credential-query-result.d.ts.map +1 -1
  24. package/dist/src/dcql-query-result/m-dcql-query-result.d.ts +250 -10
  25. package/dist/src/dcql-query-result/m-dcql-query-result.d.ts.map +1 -1
  26. package/dist/src/dcql-query-result/m-dcql-query-result.js +12 -4
  27. package/dist/src/dcql-query-result/m-dcql-query-result.js.map +1 -1
  28. package/dist/src/e-dcql.d.ts +6 -0
  29. package/dist/src/e-dcql.d.ts.map +1 -1
  30. package/dist/src/e-dcql.js +7 -1
  31. package/dist/src/e-dcql.js.map +1 -1
  32. package/dist/src/index.d.ts +3 -2
  33. package/dist/src/index.d.ts.map +1 -1
  34. package/dist/src/index.js +13 -3
  35. package/dist/src/index.js.map +1 -1
  36. package/dist/src/model.d.ts +27 -0
  37. package/dist/src/model.d.ts.map +1 -0
  38. package/dist/src/{u-dcql-credential-representation.js → model.js} +39 -6
  39. package/dist/src/model.js.map +1 -0
  40. package/dist/src/u-dcql-credential-presentation.d.ts +39 -0
  41. package/dist/src/u-dcql-credential-presentation.d.ts.map +1 -0
  42. package/dist/src/u-dcql-credential-presentation.js +52 -0
  43. package/dist/src/u-dcql-credential-presentation.js.map +1 -0
  44. package/dist/src/u-dcql-credential.d.ts +73 -0
  45. package/dist/src/u-dcql-credential.d.ts.map +1 -0
  46. package/dist/src/u-dcql-credential.js +69 -0
  47. package/dist/src/u-dcql-credential.js.map +1 -0
  48. package/package.json +1 -1
  49. package/dist/src/dcql-presentation/m-dcql-presentation-query.d.ts.map +0 -1
  50. package/dist/src/dcql-presentation/m-dcql-presentation-query.js +0 -132
  51. package/dist/src/dcql-presentation/m-dcql-presentation-query.js.map +0 -1
  52. package/dist/src/dcql-presentation/m-dcql-presentation-record.d.ts.map +0 -1
  53. package/dist/src/dcql-presentation/m-dcql-presentation-record.js.map +0 -1
  54. package/dist/src/u-dcql-credential-representation.d.ts +0 -29
  55. package/dist/src/u-dcql-credential-representation.d.ts.map +0 -1
  56. package/dist/src/u-dcql-credential-representation.js.map +0 -1
@@ -1,3 +1,3 @@
1
- export * from './m-dcql-presentation-query.js';
2
- export * from './m-dcql-presentation-record.js';
1
+ export * from './m-dcql-presentation-result.js';
2
+ export * from './m-dcql-presentation.js';
3
3
  //# 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,gCAAgC,CAAC;AAC/C,cAAc,iCAAiC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/dcql-presentation/index.ts"],"names":[],"mappings":"AAAA,cAAc,iCAAiC,CAAC;AAChD,cAAc,0BAA0B,CAAC"}
@@ -14,6 +14,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./m-dcql-presentation-query.js"), exports);
18
- __exportStar(require("./m-dcql-presentation-record.js"), exports);
17
+ __exportStar(require("./m-dcql-presentation-result.js"), exports);
18
+ __exportStar(require("./m-dcql-presentation.js"), exports);
19
19
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/dcql-presentation/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,iEAA+C;AAC/C,kEAAgD"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/dcql-presentation/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kEAAgD;AAChD,2DAAyC"}
@@ -1,13 +1,19 @@
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 '../u-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<{
8
+ readonly presentation_id: v.SchemaWithPipe<[v.StringSchema<undefined>, v.RegexAction<string, 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<{
9
16
  readonly presentation_id: v.SchemaWithPipe<[v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
10
- readonly presentation_index: v.NumberSchema<undefined>;
11
17
  readonly output: v.UnionSchema<[v.ObjectSchema<{
12
18
  readonly claims: v.RecordSchema<v.StringSchema<undefined>, v.GenericSchema<import("../u-dcql.js").Json, import("../u-dcql.js").Json, v.BaseIssue<unknown>>, undefined>;
13
19
  }, undefined>, v.ObjectSchema<{
@@ -294,195 +300,6 @@ export declare namespace DcqlPresentationQueryResult {
294
300
  id?: string | undefined;
295
301
  }[]] | undefined;
296
302
  })[]], "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
303
  readonly credential_sets: v.OptionalSchema<v.SchemaWithPipe<[v.ArraySchema<v.ObjectSchema<{
487
304
  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
305
  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,13 +336,10 @@ export declare namespace DcqlPresentationQueryResult {
519
336
  [x: string]: unknown;
520
337
  } | undefined;
521
338
  }[]], "OPTIONAL. A non-empty array of credential set queries that specifies additional constraints on which of the requested Verifiable Credentials to return.">]>, never>;
339
+ readonly canBeSatisfied: v.BooleanSchema<undefined>;
522
340
  }, undefined>;
523
341
  type Input = v.InferInput<typeof vModel>;
524
342
  type Output = v.InferOutput<typeof vModel>;
525
- type UnknownResult = (DcqlQueryResult & {
526
- canBeSatisfied: false;
527
- presentation_matches?: undefined;
528
- }) | DcqlPresentationQueryResult;
529
343
  const parse: (input: Input | DcqlQueryResult) => {
530
344
  credentials: [{
531
345
  id: string;
@@ -622,7 +436,18 @@ export declare namespace DcqlPresentationQueryResult {
622
436
  id?: string | undefined;
623
437
  }[]] | undefined;
624
438
  })[]];
625
- credential_matches: {
439
+ canBeSatisfied: boolean;
440
+ invalid_matches: {
441
+ [x: string]: {
442
+ output: unknown;
443
+ success: false;
444
+ typed: boolean;
445
+ issues: [unknown, ...unknown[]];
446
+ claim_set_index: number | undefined;
447
+ presentation_id: string;
448
+ };
449
+ } | undefined;
450
+ valid_matches: {
626
451
  [x: string]: {
627
452
  output: {
628
453
  claims: {
@@ -644,141 +469,143 @@ export declare namespace DcqlPresentationQueryResult {
644
469
  success: true;
645
470
  typed: true;
646
471
  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
- } | {
472
+ presentation_id: string;
473
+ };
474
+ };
475
+ credential_sets?: [{
476
+ options: [string[], ...string[][]];
477
+ required: boolean;
478
+ matching_options: [string[], ...string[][]] | undefined;
479
+ purpose?: string | number | {
480
+ [x: string]: unknown;
481
+ } | undefined;
482
+ }, ...{
483
+ options: [string[], ...string[][]];
484
+ required: boolean;
485
+ matching_options: [string[], ...string[][]] | undefined;
486
+ purpose?: string | number | {
487
+ [x: string]: unknown;
488
+ } | undefined;
489
+ }[]] | undefined;
490
+ };
491
+ /**
492
+ * Query if the presentation record can be satisfied by the provided presentations
493
+ * considering the dcql query
494
+ *
495
+ * @param dcqlQuery
496
+ * @param dcqlPresentation
497
+ */
498
+ const fromDcqlPresentation: (dcqlPresentation: Record<string, DcqlCredentialPresentation>, ctx: {
499
+ dcqlQuery: DcqlQuery;
500
+ }) => Output;
501
+ const validate: (dcqlQueryResult: DcqlPresentationResult) => {
502
+ credentials: [{
503
+ id: string;
504
+ format: "mso_mdoc";
505
+ claim_sets?: [string[], ...string[][]] | undefined;
506
+ claims?: [{
507
+ namespace: string;
508
+ claim_name: string;
509
+ values?: (string | number | boolean)[] | undefined;
510
+ id?: string | undefined;
511
+ }, ...{
512
+ namespace: string;
513
+ claim_name: string;
514
+ values?: (string | number | boolean)[] | undefined;
515
+ id?: string | undefined;
516
+ }[]] | undefined;
517
+ meta?: {
518
+ doctype_value?: string | undefined;
519
+ } | undefined;
520
+ } | {
521
+ id: string;
522
+ format: "vc+sd-jwt";
523
+ claim_sets?: [string[], ...string[][]] | undefined;
524
+ claims?: [{
525
+ path: (string | number | null)[];
526
+ values?: (string | number | boolean)[] | undefined;
527
+ id?: string | undefined;
528
+ }, ...{
529
+ path: (string | number | null)[];
530
+ values?: (string | number | boolean)[] | undefined;
531
+ id?: string | undefined;
532
+ }[]] | undefined;
533
+ meta?: {
534
+ vct_values?: string[] | undefined;
535
+ } | undefined;
536
+ } | {
537
+ id: string;
538
+ format: "jwt_vc_json" | "jwt_vc_json-ld";
539
+ claim_sets?: [string[], ...string[][]] | undefined;
540
+ claims?: [{
541
+ path: (string | number | null)[];
542
+ values?: (string | number | boolean)[] | undefined;
543
+ id?: string | undefined;
544
+ }, ...{
545
+ path: (string | number | null)[];
546
+ values?: (string | number | boolean)[] | undefined;
547
+ id?: string | undefined;
548
+ }[]] | undefined;
549
+ }, ...({
550
+ id: string;
551
+ format: "mso_mdoc";
552
+ claim_sets?: [string[], ...string[][]] | undefined;
553
+ claims?: [{
554
+ namespace: string;
555
+ claim_name: string;
556
+ values?: (string | number | boolean)[] | undefined;
557
+ id?: string | undefined;
558
+ }, ...{
559
+ namespace: string;
560
+ claim_name: string;
561
+ values?: (string | number | boolean)[] | undefined;
562
+ id?: string | undefined;
563
+ }[]] | undefined;
564
+ meta?: {
565
+ doctype_value?: string | undefined;
566
+ } | undefined;
567
+ } | {
568
+ id: string;
569
+ format: "vc+sd-jwt";
570
+ claim_sets?: [string[], ...string[][]] | undefined;
571
+ claims?: [{
572
+ path: (string | number | null)[];
573
+ values?: (string | number | boolean)[] | undefined;
574
+ id?: string | undefined;
575
+ }, ...{
576
+ path: (string | number | null)[];
577
+ values?: (string | number | boolean)[] | undefined;
578
+ id?: string | undefined;
579
+ }[]] | undefined;
580
+ meta?: {
581
+ vct_values?: string[] | undefined;
582
+ } | undefined;
583
+ } | {
584
+ id: string;
585
+ format: "jwt_vc_json" | "jwt_vc_json-ld";
586
+ claim_sets?: [string[], ...string[][]] | undefined;
587
+ claims?: [{
588
+ path: (string | number | null)[];
589
+ values?: (string | number | boolean)[] | undefined;
590
+ id?: string | undefined;
591
+ }, ...{
592
+ path: (string | number | null)[];
593
+ values?: (string | number | boolean)[] | undefined;
594
+ id?: string | undefined;
595
+ }[]] | undefined;
596
+ })[]];
597
+ canBeSatisfied: boolean;
598
+ invalid_matches: {
599
+ [x: string]: {
711
600
  output: unknown;
712
601
  success: false;
713
602
  typed: boolean;
714
603
  issues: [unknown, ...unknown[]];
715
604
  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)[][]];
605
+ presentation_id: string;
778
606
  };
779
- };
780
- canBeSatisfied: true;
781
- presentation_matches: {
607
+ } | undefined;
608
+ valid_matches: {
782
609
  [x: string]: {
783
610
  output: {
784
611
  claims: {
@@ -801,7 +628,6 @@ export declare namespace DcqlPresentationQueryResult {
801
628
  typed: true;
802
629
  claim_set_index: number | undefined;
803
630
  presentation_id: string;
804
- presentation_index: number;
805
631
  };
806
632
  };
807
633
  credential_sets?: [{
@@ -820,18 +646,6 @@ export declare namespace DcqlPresentationQueryResult {
820
646
  } | undefined;
821
647
  }[]] | undefined;
822
648
  };
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
649
  }
836
- export type DcqlPresentationQueryResult = DcqlPresentationQueryResult.Output;
837
- //# sourceMappingURL=m-dcql-presentation-query.d.ts.map
650
+ export type DcqlPresentationResult = DcqlPresentationResult.Output;
651
+ //# sourceMappingURL=m-dcql-presentation-result.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"m-dcql-presentation-result.d.ts","sourceRoot":"","sources":["../../../src/dcql-presentation/m-dcql-presentation-result.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAC;AAG7B,OAAO,EAAE,eAAe,EAAE,MAAM,6CAA6C,CAAC;AAC9E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;AAE/D,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAGvF,yBAAiB,sBAAsB,CAAC;IAC/B,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA2BjB,CAAC;IAEH,KAAY,KAAK,GAAG,CAAC,CAAC,UAAU,CAAC,OAAO,MAAM,CAAC,CAAC;IAChD,KAAY,MAAM,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,MAAM,CAAC,CAAC;IAE3C,MAAM,KAAK,UAAW,KAAK,GAAG,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAEnD,CAAC;IAEF;;;;;;OAMG;IACI,MAAM,oBAAoB,qBACb,MAAM,CAAC,MAAM,EAAE,0BAA0B,CAAC,OACvD;QAAE,SAAS,EAAE,SAAS,CAAA;KAAE,KAC5B,MAyEF,CAAC;IAEK,MAAM,QAAQ,oBAAqB,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAS/D,CAAC;CACH;AACD,MAAM,MAAM,sBAAsB,GAAG,sBAAsB,CAAC,MAAM,CAAC"}