dcql 0.2.10 → 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} +159 -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 +10 -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 -129
  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,12 +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 DcqlPresentationQuery {
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<{
9
- readonly presentation_index: v.NumberSchema<undefined>;
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<{
16
+ readonly presentation_id: v.SchemaWithPipe<[v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
10
17
  readonly output: v.UnionSchema<[v.ObjectSchema<{
11
18
  readonly claims: v.RecordSchema<v.StringSchema<undefined>, v.GenericSchema<import("../u-dcql.js").Json, import("../u-dcql.js").Json, v.BaseIssue<unknown>>, undefined>;
12
19
  }, undefined>, v.ObjectSchema<{
@@ -293,195 +300,6 @@ export declare namespace DcqlPresentationQuery {
293
300
  id?: string | undefined;
294
301
  }[]] | undefined;
295
302
  })[]], "REQUIRED. A non-empty array of Credential Queries that specify the requested Verifiable Credentials.">]>;
296
- readonly credential_matches: v.RecordSchema<v.SchemaWithPipe<[v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, v.UnionSchema<[v.ObjectSchema<{
297
- readonly all: v.SchemaWithPipe<[v.ArraySchema<v.ArraySchema<v.UnionSchema<[v.UndefinedSchema<undefined>, v.ObjectSchema<{
298
- readonly output: v.UnionSchema<[v.ObjectSchema<{
299
- readonly claims: v.RecordSchema<v.StringSchema<undefined>, v.GenericSchema<import("../u-dcql.js").Json, import("../u-dcql.js").Json, v.BaseIssue<unknown>>, undefined>;
300
- }, undefined>, v.ObjectSchema<{
301
- readonly vct: v.StringSchema<undefined>;
302
- readonly claims: v.RecordSchema<v.StringSchema<undefined>, v.GenericSchema<import("../u-dcql.js").Json, import("../u-dcql.js").Json, v.BaseIssue<unknown>>, undefined>;
303
- }, undefined>, v.ObjectSchema<{
304
- readonly docType: v.StringSchema<undefined>;
305
- readonly namespaces: v.RecordSchema<v.StringSchema<undefined>, v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>;
306
- }, undefined>], undefined>;
307
- readonly success: v.LiteralSchema<true, undefined>;
308
- readonly typed: v.LiteralSchema<true, undefined>;
309
- readonly issues: v.OptionalSchema<v.UndefinedSchema<undefined>, never>;
310
- readonly credential_index: v.NumberSchema<undefined>;
311
- readonly claim_set_index: v.UnionSchema<[v.NumberSchema<undefined>, v.UndefinedSchema<undefined>], undefined>;
312
- }, undefined>, v.ObjectSchema<{
313
- readonly success: v.LiteralSchema<false, undefined>;
314
- readonly typed: v.BooleanSchema<undefined>;
315
- readonly output: v.UnknownSchema;
316
- readonly issues: v.SchemaWithPipe<[v.ArraySchema<v.UnknownSchema, undefined>, v.CustomSchema<[unknown, ...unknown[]], undefined>]>;
317
- readonly credential_index: v.NumberSchema<undefined>;
318
- readonly claim_set_index: v.UnionSchema<[v.NumberSchema<undefined>, v.UndefinedSchema<undefined>], undefined>;
319
- }, undefined>], undefined>, undefined>, undefined>, v.CustomSchema<[({
320
- output: unknown;
321
- success: false;
322
- typed: boolean;
323
- issues: [unknown, ...unknown[]];
324
- claim_set_index: number | undefined;
325
- credential_index: number;
326
- } | {
327
- output: {
328
- claims: {
329
- [x: string]: import("../u-dcql.js").Json;
330
- };
331
- } | {
332
- claims: {
333
- [x: string]: import("../u-dcql.js").Json;
334
- };
335
- vct: string;
336
- } | {
337
- docType: string;
338
- namespaces: {
339
- [x: string]: {
340
- [x: string]: unknown;
341
- };
342
- };
343
- };
344
- success: true;
345
- typed: true;
346
- claim_set_index: number | undefined;
347
- credential_index: number;
348
- issues?: undefined;
349
- } | undefined)[], ...({
350
- output: unknown;
351
- success: false;
352
- typed: boolean;
353
- issues: [unknown, ...unknown[]];
354
- claim_set_index: number | undefined;
355
- credential_index: number;
356
- } | {
357
- output: {
358
- claims: {
359
- [x: string]: import("../u-dcql.js").Json;
360
- };
361
- } | {
362
- claims: {
363
- [x: string]: import("../u-dcql.js").Json;
364
- };
365
- vct: string;
366
- } | {
367
- docType: string;
368
- namespaces: {
369
- [x: string]: {
370
- [x: string]: unknown;
371
- };
372
- };
373
- };
374
- success: true;
375
- typed: true;
376
- claim_set_index: number | undefined;
377
- credential_index: number;
378
- issues?: undefined;
379
- } | undefined)[][]], undefined>]>;
380
- readonly output: v.UnionSchema<[v.ObjectSchema<{
381
- readonly claims: v.RecordSchema<v.StringSchema<undefined>, v.GenericSchema<import("../u-dcql.js").Json, import("../u-dcql.js").Json, v.BaseIssue<unknown>>, undefined>;
382
- }, undefined>, v.ObjectSchema<{
383
- readonly vct: v.StringSchema<undefined>;
384
- readonly claims: v.RecordSchema<v.StringSchema<undefined>, v.GenericSchema<import("../u-dcql.js").Json, import("../u-dcql.js").Json, v.BaseIssue<unknown>>, undefined>;
385
- }, undefined>, v.ObjectSchema<{
386
- readonly docType: v.StringSchema<undefined>;
387
- readonly namespaces: v.RecordSchema<v.StringSchema<undefined>, v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>;
388
- }, undefined>], undefined>;
389
- readonly success: v.LiteralSchema<true, undefined>;
390
- readonly typed: v.LiteralSchema<true, undefined>;
391
- readonly issues: v.OptionalSchema<v.UndefinedSchema<undefined>, never>;
392
- readonly credential_index: v.NumberSchema<undefined>;
393
- readonly claim_set_index: v.UnionSchema<[v.NumberSchema<undefined>, v.UndefinedSchema<undefined>], undefined>;
394
- }, undefined>, v.ObjectSchema<{
395
- readonly all: v.SchemaWithPipe<[v.ArraySchema<v.ArraySchema<v.UnionSchema<[v.UndefinedSchema<undefined>, v.ObjectSchema<{
396
- readonly output: v.UnionSchema<[v.ObjectSchema<{
397
- readonly claims: v.RecordSchema<v.StringSchema<undefined>, v.GenericSchema<import("../u-dcql.js").Json, import("../u-dcql.js").Json, v.BaseIssue<unknown>>, undefined>;
398
- }, undefined>, v.ObjectSchema<{
399
- readonly vct: v.StringSchema<undefined>;
400
- readonly claims: v.RecordSchema<v.StringSchema<undefined>, v.GenericSchema<import("../u-dcql.js").Json, import("../u-dcql.js").Json, v.BaseIssue<unknown>>, undefined>;
401
- }, undefined>, v.ObjectSchema<{
402
- readonly docType: v.StringSchema<undefined>;
403
- readonly namespaces: v.RecordSchema<v.StringSchema<undefined>, v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>;
404
- }, undefined>], undefined>;
405
- readonly success: v.LiteralSchema<true, undefined>;
406
- readonly typed: v.LiteralSchema<true, undefined>;
407
- readonly issues: v.OptionalSchema<v.UndefinedSchema<undefined>, never>;
408
- readonly credential_index: v.NumberSchema<undefined>;
409
- readonly claim_set_index: v.UnionSchema<[v.NumberSchema<undefined>, v.UndefinedSchema<undefined>], undefined>;
410
- }, undefined>, v.ObjectSchema<{
411
- readonly success: v.LiteralSchema<false, undefined>;
412
- readonly typed: v.BooleanSchema<undefined>;
413
- readonly output: v.UnknownSchema;
414
- readonly issues: v.SchemaWithPipe<[v.ArraySchema<v.UnknownSchema, undefined>, v.CustomSchema<[unknown, ...unknown[]], undefined>]>;
415
- readonly credential_index: v.NumberSchema<undefined>;
416
- readonly claim_set_index: v.UnionSchema<[v.NumberSchema<undefined>, v.UndefinedSchema<undefined>], undefined>;
417
- }, undefined>], undefined>, undefined>, undefined>, v.CustomSchema<[({
418
- output: unknown;
419
- success: false;
420
- typed: boolean;
421
- issues: [unknown, ...unknown[]];
422
- claim_set_index: number | undefined;
423
- credential_index: number;
424
- } | {
425
- output: {
426
- claims: {
427
- [x: string]: import("../u-dcql.js").Json;
428
- };
429
- } | {
430
- claims: {
431
- [x: string]: import("../u-dcql.js").Json;
432
- };
433
- vct: string;
434
- } | {
435
- docType: string;
436
- namespaces: {
437
- [x: string]: {
438
- [x: string]: unknown;
439
- };
440
- };
441
- };
442
- success: true;
443
- typed: true;
444
- claim_set_index: number | undefined;
445
- credential_index: number;
446
- issues?: undefined;
447
- } | undefined)[], ...({
448
- output: unknown;
449
- success: false;
450
- typed: boolean;
451
- issues: [unknown, ...unknown[]];
452
- claim_set_index: number | undefined;
453
- credential_index: number;
454
- } | {
455
- output: {
456
- claims: {
457
- [x: string]: import("../u-dcql.js").Json;
458
- };
459
- } | {
460
- claims: {
461
- [x: string]: import("../u-dcql.js").Json;
462
- };
463
- vct: string;
464
- } | {
465
- docType: string;
466
- namespaces: {
467
- [x: string]: {
468
- [x: string]: unknown;
469
- };
470
- };
471
- };
472
- success: true;
473
- typed: true;
474
- claim_set_index: number | undefined;
475
- credential_index: number;
476
- issues?: undefined;
477
- } | undefined)[][]], undefined>]>;
478
- readonly success: v.LiteralSchema<false, undefined>;
479
- readonly typed: v.BooleanSchema<undefined>;
480
- readonly output: v.UnknownSchema;
481
- readonly issues: v.SchemaWithPipe<[v.ArraySchema<v.UnknownSchema, undefined>, v.CustomSchema<[unknown, ...unknown[]], undefined>]>;
482
- readonly credential_index: v.NumberSchema<undefined>;
483
- readonly claim_set_index: v.UnionSchema<[v.NumberSchema<undefined>, v.UndefinedSchema<undefined>], undefined>;
484
- }, undefined>], undefined>, undefined>;
485
303
  readonly credential_sets: v.OptionalSchema<v.SchemaWithPipe<[v.ArraySchema<v.ObjectSchema<{
486
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>;
487
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.">]>;
@@ -518,13 +336,10 @@ export declare namespace DcqlPresentationQuery {
518
336
  [x: string]: unknown;
519
337
  } | undefined;
520
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>;
521
340
  }, undefined>;
522
341
  type Input = v.InferInput<typeof vModel>;
523
342
  type Output = v.InferOutput<typeof vModel>;
524
- type UnknownResult = (DcqlQueryResult & {
525
- canBeSatisfied: false;
526
- presentation_matches?: undefined;
527
- }) | DcqlPresentationQuery;
528
343
  const parse: (input: Input | DcqlQueryResult) => {
529
344
  credentials: [{
530
345
  id: string;
@@ -621,7 +436,18 @@ export declare namespace DcqlPresentationQuery {
621
436
  id?: string | undefined;
622
437
  }[]] | undefined;
623
438
  })[]];
624
- 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: {
625
451
  [x: string]: {
626
452
  output: {
627
453
  claims: {
@@ -643,141 +469,143 @@ export declare namespace DcqlPresentationQuery {
643
469
  success: true;
644
470
  typed: true;
645
471
  claim_set_index: number | undefined;
646
- credential_index: number;
647
- all: [({
648
- output: unknown;
649
- success: false;
650
- typed: boolean;
651
- issues: [unknown, ...unknown[]];
652
- claim_set_index: number | undefined;
653
- credential_index: number;
654
- } | {
655
- output: {
656
- claims: {
657
- [x: string]: import("../u-dcql.js").Json;
658
- };
659
- } | {
660
- claims: {
661
- [x: string]: import("../u-dcql.js").Json;
662
- };
663
- vct: string;
664
- } | {
665
- docType: string;
666
- namespaces: {
667
- [x: string]: {
668
- [x: string]: unknown;
669
- };
670
- };
671
- };
672
- success: true;
673
- typed: true;
674
- claim_set_index: number | undefined;
675
- credential_index: number;
676
- issues?: undefined;
677
- } | undefined)[], ...({
678
- output: unknown;
679
- success: false;
680
- typed: boolean;
681
- issues: [unknown, ...unknown[]];
682
- claim_set_index: number | undefined;
683
- credential_index: number;
684
- } | {
685
- output: {
686
- claims: {
687
- [x: string]: import("../u-dcql.js").Json;
688
- };
689
- } | {
690
- claims: {
691
- [x: string]: import("../u-dcql.js").Json;
692
- };
693
- vct: string;
694
- } | {
695
- docType: string;
696
- namespaces: {
697
- [x: string]: {
698
- [x: string]: unknown;
699
- };
700
- };
701
- };
702
- success: true;
703
- typed: true;
704
- claim_set_index: number | undefined;
705
- credential_index: number;
706
- issues?: undefined;
707
- } | undefined)[][]];
708
- issues?: undefined;
709
- } | {
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]: {
710
600
  output: unknown;
711
601
  success: false;
712
602
  typed: boolean;
713
603
  issues: [unknown, ...unknown[]];
714
604
  claim_set_index: number | undefined;
715
- credential_index: number;
716
- all: [({
717
- output: unknown;
718
- success: false;
719
- typed: boolean;
720
- issues: [unknown, ...unknown[]];
721
- claim_set_index: number | undefined;
722
- credential_index: number;
723
- } | {
724
- output: {
725
- claims: {
726
- [x: string]: import("../u-dcql.js").Json;
727
- };
728
- } | {
729
- claims: {
730
- [x: string]: import("../u-dcql.js").Json;
731
- };
732
- vct: string;
733
- } | {
734
- docType: string;
735
- namespaces: {
736
- [x: string]: {
737
- [x: string]: unknown;
738
- };
739
- };
740
- };
741
- success: true;
742
- typed: true;
743
- claim_set_index: number | undefined;
744
- credential_index: number;
745
- issues?: undefined;
746
- } | undefined)[], ...({
747
- output: unknown;
748
- success: false;
749
- typed: boolean;
750
- issues: [unknown, ...unknown[]];
751
- claim_set_index: number | undefined;
752
- credential_index: number;
753
- } | {
754
- output: {
755
- claims: {
756
- [x: string]: import("../u-dcql.js").Json;
757
- };
758
- } | {
759
- claims: {
760
- [x: string]: import("../u-dcql.js").Json;
761
- };
762
- vct: string;
763
- } | {
764
- docType: string;
765
- namespaces: {
766
- [x: string]: {
767
- [x: string]: unknown;
768
- };
769
- };
770
- };
771
- success: true;
772
- typed: true;
773
- claim_set_index: number | undefined;
774
- credential_index: number;
775
- issues?: undefined;
776
- } | undefined)[][]];
605
+ presentation_id: string;
777
606
  };
778
- };
779
- canBeSatisfied: true;
780
- presentation_matches: {
607
+ } | undefined;
608
+ valid_matches: {
781
609
  [x: string]: {
782
610
  output: {
783
611
  claims: {
@@ -799,7 +627,7 @@ export declare namespace DcqlPresentationQuery {
799
627
  success: true;
800
628
  typed: true;
801
629
  claim_set_index: number | undefined;
802
- presentation_index: number;
630
+ presentation_id: string;
803
631
  };
804
632
  };
805
633
  credential_sets?: [{
@@ -818,18 +646,6 @@ export declare namespace DcqlPresentationQuery {
818
646
  } | undefined;
819
647
  }[]] | undefined;
820
648
  };
821
- /**
822
- * Query if the presentation record can be satisfied by the provided presentations
823
- * considering the dcql query
824
- *
825
- * @param dcqlQuery
826
- * @param presentations
827
- */
828
- const query: (presentations: DcqlPresentationRepresentation[], ctx: {
829
- dcqlQuery: DcqlQuery;
830
- }) => DcqlPresentationQuery.UnknownResult;
831
- const validate: (dcqlQueryResult: DcqlPresentationQuery.UnknownResult) => DcqlPresentationQuery;
832
- const fromDcqlQueryResult: (dcqlQueryResult: DcqlQueryResult) => DcqlPresentationQuery;
833
649
  }
834
- export type DcqlPresentationQuery = DcqlPresentationQuery.Output;
835
- //# 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"}