dcql 0.2.13 → 0.2.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. package/dist/src/dcql-parser/dcql-claims-query-result.d.ts +4 -4
  2. package/dist/src/dcql-parser/dcql-claims-query-result.js +3 -3
  3. package/dist/src/dcql-parser/dcql-claims-query-result.js.map +1 -1
  4. package/dist/src/dcql-parser/dcql-credential-query-result.js +1 -1
  5. package/dist/src/dcql-parser/dcql-credential-query-result.js.map +1 -1
  6. package/dist/src/dcql-presentation/m-dcql-credential-presentation.d.ts +6 -6
  7. package/dist/src/dcql-presentation/m-dcql-presentation-result.d.ts +18 -18
  8. package/dist/src/dcql-presentation/m-dcql-presentation-result.d.ts.map +1 -1
  9. package/dist/src/dcql-presentation/m-dcql-presentation-result.js +5 -4
  10. package/dist/src/dcql-presentation/m-dcql-presentation-result.js.map +1 -1
  11. package/dist/src/dcql-query/dcql-query-complex.test.d.ts +2 -0
  12. package/dist/src/dcql-query/dcql-query-complex.test.d.ts.map +1 -0
  13. package/dist/src/dcql-query/dcql-query-complex.test.js +3631 -0
  14. package/dist/src/dcql-query/dcql-query-complex.test.js.map +1 -0
  15. package/dist/src/dcql-query/dcql-query.test.js +174 -12
  16. package/dist/src/dcql-query/dcql-query.test.js.map +1 -1
  17. package/dist/src/dcql-query/m-dcql-query.d.ts +76 -81
  18. package/dist/src/dcql-query/m-dcql-query.d.ts.map +1 -1
  19. package/dist/src/dcql-query-result/m-dcql-query-result.d.ts +159 -210
  20. package/dist/src/dcql-query-result/m-dcql-query-result.d.ts.map +1 -1
  21. package/dist/src/dcql-query-result/m-dcql-query-result.js +11 -16
  22. package/dist/src/dcql-query-result/m-dcql-query-result.js.map +1 -1
  23. package/dist/src/dcql-query-result/run-dcql-query.d.ts.map +1 -1
  24. package/dist/src/dcql-query-result/run-dcql-query.js +1 -2
  25. package/dist/src/dcql-query-result/run-dcql-query.js.map +1 -1
  26. package/dist/src/u-dcql-credential.d.ts +14 -14
  27. package/dist/src/u-dcql-credential.js +4 -4
  28. package/dist/src/u-dcql-credential.js.map +1 -1
  29. package/dist/src/u-dcql.d.ts +16 -21
  30. package/dist/src/u-dcql.d.ts.map +1 -1
  31. package/dist/src/u-dcql.js +7 -13
  32. package/dist/src/u-dcql.js.map +1 -1
  33. package/package.json +1 -1
@@ -0,0 +1,3631 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const node_assert_1 = __importDefault(require("node:assert"));
7
+ const node_test_1 = require("node:test");
8
+ const m_dcql_presentation_result_js_1 = require("../dcql-presentation/m-dcql-presentation-result.js");
9
+ const m_dcql_query_js_1 = require("./m-dcql-query.js");
10
+ /**
11
+ * The following is a non-normative example of a DCQL query that requests
12
+ * a Verifiable Credential in the format mso_mdoc with the claims vehicle_holder and first_name:
13
+ */
14
+ const complexMdocQuery = {
15
+ credentials: [
16
+ {
17
+ id: 'mdl-id',
18
+ format: 'mso_mdoc',
19
+ meta: { doctype_value: 'org.iso.18013.5.1.mDL' },
20
+ claims: [
21
+ {
22
+ id: 'given_name',
23
+ namespace: 'org.iso.18013.5.1',
24
+ claim_name: 'given_name',
25
+ },
26
+ {
27
+ id: 'family_name',
28
+ namespace: 'org.iso.18013.5.1',
29
+ claim_name: 'family_name',
30
+ },
31
+ {
32
+ id: 'portrait',
33
+ namespace: 'org.iso.18013.5.1',
34
+ claim_name: 'portrait',
35
+ },
36
+ ],
37
+ },
38
+ {
39
+ id: 'mdl-address',
40
+ format: 'mso_mdoc',
41
+ meta: { doctype_value: 'org.iso.18013.5.1.mDL' },
42
+ claims: [
43
+ {
44
+ id: 'resident_address',
45
+ namespace: 'org.iso.18013.5.1',
46
+ claim_name: 'resident_address',
47
+ },
48
+ {
49
+ id: 'resident_country',
50
+ namespace: 'org.iso.18013.5.1',
51
+ claim_name: 'resident_country',
52
+ },
53
+ ],
54
+ },
55
+ {
56
+ id: 'photo_card-id',
57
+ format: 'mso_mdoc',
58
+ meta: { doctype_value: 'org.iso.23220.photoid.1' },
59
+ claims: [
60
+ {
61
+ id: 'given_name',
62
+ namespace: 'org.iso.23220.1',
63
+ claim_name: 'given_name',
64
+ },
65
+ {
66
+ id: 'family_name',
67
+ namespace: 'org.iso.23220.1',
68
+ claim_name: 'family_name',
69
+ },
70
+ {
71
+ id: 'portrait',
72
+ namespace: 'org.iso.23220.1',
73
+ claim_name: 'portrait',
74
+ },
75
+ ],
76
+ },
77
+ {
78
+ id: 'photo_card-address',
79
+ format: 'mso_mdoc',
80
+ meta: { doctype_value: 'org.iso.23220.photoid.1' },
81
+ claims: [
82
+ {
83
+ id: 'resident_address',
84
+ namespace: 'org.iso.23220.1',
85
+ claim_name: 'resident_address',
86
+ },
87
+ {
88
+ id: 'resident_country',
89
+ namespace: 'org.iso.23220.1',
90
+ claim_name: 'resident_country',
91
+ },
92
+ ],
93
+ },
94
+ ],
95
+ credential_sets: [
96
+ { purpose: 'Identification', options: [['mdl-id'], ['photo_card-id']] },
97
+ {
98
+ purpose: 'Proof of address',
99
+ required: false,
100
+ options: [['mdl-address'], ['photo_card-address']],
101
+ },
102
+ ],
103
+ };
104
+ const mdocMdlId = {
105
+ credential_format: 'mso_mdoc',
106
+ doctype: 'org.iso.18013.5.1.mDL',
107
+ namespaces: {
108
+ 'org.iso.18013.5.1': {
109
+ given_name: 'Martin',
110
+ family_name: 'Auer',
111
+ portrait: 'https://example.com/portrait',
112
+ },
113
+ },
114
+ };
115
+ const mdocMdlAddress = {
116
+ credential_format: 'mso_mdoc',
117
+ doctype: 'org.iso.18013.5.1.mDL',
118
+ namespaces: {
119
+ 'org.iso.18013.5.1': {
120
+ resident_country: 'Italy',
121
+ resident_address: 'Via Roma 1',
122
+ non_disclosed: 'secret',
123
+ },
124
+ },
125
+ };
126
+ const mdocPhotoCardId = {
127
+ credential_format: 'mso_mdoc',
128
+ doctype: 'org.iso.23220.photoid.1',
129
+ namespaces: {
130
+ 'org.iso.23220.1': {
131
+ given_name: 'Martin',
132
+ family_name: 'Auer',
133
+ portrait: 'https://example.com/portrait',
134
+ },
135
+ },
136
+ };
137
+ const mdocPhotoCardAddress = {
138
+ credential_format: 'mso_mdoc',
139
+ doctype: 'org.iso.23220.photoid.1',
140
+ namespaces: {
141
+ 'org.iso.23220.1': {
142
+ resident_country: 'Italy',
143
+ resident_address: 'Via Roma 1',
144
+ non_disclosed: 'secret',
145
+ },
146
+ },
147
+ };
148
+ const mdocExample = {
149
+ credential_format: 'mso_mdoc',
150
+ doctype: 'example_doctype',
151
+ namespaces: {
152
+ example_namespaces: {
153
+ example_claim: 'example_value',
154
+ },
155
+ },
156
+ };
157
+ const sdJwtVcExample = {
158
+ credential_format: 'vc+sd-jwt',
159
+ vct: 'https://credentials.example.com/identity_credential',
160
+ claims: {
161
+ first_name: 'Arthur',
162
+ last_name: 'Dent',
163
+ address: {
164
+ street_address: '42 Market Street',
165
+ locality: 'Milliways',
166
+ postal_code: '12345',
167
+ },
168
+ degrees: [
169
+ {
170
+ type: 'Bachelor of Science',
171
+ university: 'University of Betelgeuse',
172
+ },
173
+ {
174
+ type: 'Master of Science',
175
+ university: 'University of Betelgeuse',
176
+ },
177
+ ],
178
+ nationalities: ['British', 'Betelgeusian'],
179
+ },
180
+ };
181
+ void (0, node_test_1.describe)('complex-mdoc-query', () => {
182
+ void (0, node_test_1.it)('fails with no credentials', _t => {
183
+ const query = m_dcql_query_js_1.DcqlQuery.parse(complexMdocQuery);
184
+ m_dcql_query_js_1.DcqlQuery.validate(query);
185
+ const res = m_dcql_query_js_1.DcqlQuery.query(query, []);
186
+ (0, node_assert_1.default)(!res.canBeSatisfied);
187
+ });
188
+ void (0, node_test_1.it)('fails with credentials that do not satisfy a required claim_set', _t => {
189
+ const query = m_dcql_query_js_1.DcqlQuery.parse(complexMdocQuery);
190
+ m_dcql_query_js_1.DcqlQuery.validate(query);
191
+ const res = m_dcql_query_js_1.DcqlQuery.query(query, [mdocMdlAddress, mdocPhotoCardAddress]);
192
+ (0, node_assert_1.default)(!res.canBeSatisfied);
193
+ });
194
+ void (0, node_test_1.it)('succeeds if all credentials are present', _t => {
195
+ const query = m_dcql_query_js_1.DcqlQuery.parse(complexMdocQuery);
196
+ m_dcql_query_js_1.DcqlQuery.validate(query);
197
+ const res = m_dcql_query_js_1.DcqlQuery.query(query, [
198
+ mdocMdlId,
199
+ mdocMdlAddress,
200
+ mdocPhotoCardId,
201
+ mdocPhotoCardAddress,
202
+ mdocExample,
203
+ sdJwtVcExample,
204
+ ]);
205
+ node_assert_1.default.deepStrictEqual(res, {
206
+ credentials: complexMdocQuery.credentials,
207
+ credential_sets: [
208
+ {
209
+ options: [['mdl-id'], ['photo_card-id']],
210
+ required: true,
211
+ purpose: 'Identification',
212
+ matching_options: [['mdl-id'], ['photo_card-id']],
213
+ },
214
+ {
215
+ options: [['mdl-address'], ['photo_card-address']],
216
+ required: false,
217
+ purpose: 'Proof of address',
218
+ matching_options: [['mdl-address'], ['photo_card-address']],
219
+ },
220
+ ],
221
+ canBeSatisfied: true,
222
+ credential_matches: {
223
+ 'mdl-id': {
224
+ typed: true,
225
+ success: true,
226
+ output: {
227
+ credential_format: 'mso_mdoc',
228
+ doctype: 'org.iso.18013.5.1.mDL',
229
+ namespaces: {
230
+ 'org.iso.18013.5.1': {
231
+ given_name: 'Martin',
232
+ family_name: 'Auer',
233
+ portrait: 'https://example.com/portrait',
234
+ },
235
+ },
236
+ },
237
+ input_credential_index: 0,
238
+ claim_set_index: undefined,
239
+ all: [
240
+ [
241
+ {
242
+ typed: true,
243
+ success: true,
244
+ output: {
245
+ credential_format: 'mso_mdoc',
246
+ doctype: 'org.iso.18013.5.1.mDL',
247
+ namespaces: {
248
+ 'org.iso.18013.5.1': {
249
+ given_name: 'Martin',
250
+ family_name: 'Auer',
251
+ portrait: 'https://example.com/portrait',
252
+ },
253
+ },
254
+ },
255
+ issues: undefined,
256
+ input_credential_index: 0,
257
+ claim_set_index: undefined,
258
+ },
259
+ {
260
+ typed: false,
261
+ success: false,
262
+ output: {
263
+ credential_format: 'mso_mdoc',
264
+ doctype: 'org.iso.18013.5.1.mDL',
265
+ namespaces: {
266
+ 'org.iso.18013.5.1': {},
267
+ },
268
+ },
269
+ issues: [
270
+ {
271
+ kind: 'schema',
272
+ type: 'union',
273
+ input: undefined,
274
+ expected: 'string | number | boolean',
275
+ received: 'undefined',
276
+ message: 'Invalid type: Expected string | number | boolean but received undefined',
277
+ requirement: undefined,
278
+ path: [
279
+ {
280
+ type: 'object',
281
+ origin: 'value',
282
+ input: {
283
+ credential_format: 'mso_mdoc',
284
+ doctype: 'org.iso.18013.5.1.mDL',
285
+ namespaces: {
286
+ 'org.iso.18013.5.1': {
287
+ resident_country: 'Italy',
288
+ resident_address: 'Via Roma 1',
289
+ non_disclosed: 'secret',
290
+ },
291
+ },
292
+ },
293
+ key: 'namespaces',
294
+ value: {
295
+ 'org.iso.18013.5.1': {
296
+ resident_country: 'Italy',
297
+ resident_address: 'Via Roma 1',
298
+ non_disclosed: 'secret',
299
+ },
300
+ },
301
+ },
302
+ {
303
+ type: 'object',
304
+ origin: 'value',
305
+ input: {
306
+ 'org.iso.18013.5.1': {
307
+ resident_country: 'Italy',
308
+ resident_address: 'Via Roma 1',
309
+ non_disclosed: 'secret',
310
+ },
311
+ },
312
+ key: 'org.iso.18013.5.1',
313
+ value: {
314
+ resident_country: 'Italy',
315
+ resident_address: 'Via Roma 1',
316
+ non_disclosed: 'secret',
317
+ },
318
+ },
319
+ {
320
+ type: 'object',
321
+ origin: 'value',
322
+ input: {
323
+ resident_country: 'Italy',
324
+ resident_address: 'Via Roma 1',
325
+ non_disclosed: 'secret',
326
+ },
327
+ key: 'given_name',
328
+ value: undefined,
329
+ },
330
+ ],
331
+ issues: [
332
+ {
333
+ kind: 'schema',
334
+ type: 'string',
335
+ input: undefined,
336
+ expected: 'string',
337
+ received: 'undefined',
338
+ message: 'Invalid type: Expected string but received undefined',
339
+ requirement: undefined,
340
+ path: undefined,
341
+ issues: undefined,
342
+ lang: undefined,
343
+ abortEarly: undefined,
344
+ abortPipeEarly: undefined,
345
+ },
346
+ {
347
+ kind: 'schema',
348
+ type: 'number',
349
+ input: undefined,
350
+ expected: 'number',
351
+ received: 'undefined',
352
+ message: 'Invalid type: Expected number but received undefined',
353
+ requirement: undefined,
354
+ path: undefined,
355
+ issues: undefined,
356
+ lang: undefined,
357
+ abortEarly: undefined,
358
+ abortPipeEarly: undefined,
359
+ },
360
+ {
361
+ kind: 'schema',
362
+ type: 'boolean',
363
+ input: undefined,
364
+ expected: 'boolean',
365
+ received: 'undefined',
366
+ message: 'Invalid type: Expected boolean but received undefined',
367
+ requirement: undefined,
368
+ path: undefined,
369
+ issues: undefined,
370
+ lang: undefined,
371
+ abortEarly: undefined,
372
+ abortPipeEarly: undefined,
373
+ },
374
+ ],
375
+ lang: undefined,
376
+ abortEarly: undefined,
377
+ abortPipeEarly: undefined,
378
+ },
379
+ {
380
+ kind: 'schema',
381
+ type: 'union',
382
+ input: undefined,
383
+ expected: 'string | number | boolean',
384
+ received: 'undefined',
385
+ message: 'Invalid type: Expected string | number | boolean but received undefined',
386
+ requirement: undefined,
387
+ path: [
388
+ {
389
+ type: 'object',
390
+ origin: 'value',
391
+ input: {
392
+ credential_format: 'mso_mdoc',
393
+ doctype: 'org.iso.18013.5.1.mDL',
394
+ namespaces: {
395
+ 'org.iso.18013.5.1': {
396
+ resident_country: 'Italy',
397
+ resident_address: 'Via Roma 1',
398
+ non_disclosed: 'secret',
399
+ },
400
+ },
401
+ },
402
+ key: 'namespaces',
403
+ value: {
404
+ 'org.iso.18013.5.1': {
405
+ resident_country: 'Italy',
406
+ resident_address: 'Via Roma 1',
407
+ non_disclosed: 'secret',
408
+ },
409
+ },
410
+ },
411
+ {
412
+ type: 'object',
413
+ origin: 'value',
414
+ input: {
415
+ 'org.iso.18013.5.1': {
416
+ resident_country: 'Italy',
417
+ resident_address: 'Via Roma 1',
418
+ non_disclosed: 'secret',
419
+ },
420
+ },
421
+ key: 'org.iso.18013.5.1',
422
+ value: {
423
+ resident_country: 'Italy',
424
+ resident_address: 'Via Roma 1',
425
+ non_disclosed: 'secret',
426
+ },
427
+ },
428
+ {
429
+ type: 'object',
430
+ origin: 'value',
431
+ input: {
432
+ resident_country: 'Italy',
433
+ resident_address: 'Via Roma 1',
434
+ non_disclosed: 'secret',
435
+ },
436
+ key: 'family_name',
437
+ value: undefined,
438
+ },
439
+ ],
440
+ issues: [
441
+ {
442
+ kind: 'schema',
443
+ type: 'string',
444
+ input: undefined,
445
+ expected: 'string',
446
+ received: 'undefined',
447
+ message: 'Invalid type: Expected string but received undefined',
448
+ requirement: undefined,
449
+ path: undefined,
450
+ issues: undefined,
451
+ lang: undefined,
452
+ abortEarly: undefined,
453
+ abortPipeEarly: undefined,
454
+ },
455
+ {
456
+ kind: 'schema',
457
+ type: 'number',
458
+ input: undefined,
459
+ expected: 'number',
460
+ received: 'undefined',
461
+ message: 'Invalid type: Expected number but received undefined',
462
+ requirement: undefined,
463
+ path: undefined,
464
+ issues: undefined,
465
+ lang: undefined,
466
+ abortEarly: undefined,
467
+ abortPipeEarly: undefined,
468
+ },
469
+ {
470
+ kind: 'schema',
471
+ type: 'boolean',
472
+ input: undefined,
473
+ expected: 'boolean',
474
+ received: 'undefined',
475
+ message: 'Invalid type: Expected boolean but received undefined',
476
+ requirement: undefined,
477
+ path: undefined,
478
+ issues: undefined,
479
+ lang: undefined,
480
+ abortEarly: undefined,
481
+ abortPipeEarly: undefined,
482
+ },
483
+ ],
484
+ lang: undefined,
485
+ abortEarly: undefined,
486
+ abortPipeEarly: undefined,
487
+ },
488
+ {
489
+ kind: 'schema',
490
+ type: 'union',
491
+ input: undefined,
492
+ expected: 'string | number | boolean',
493
+ received: 'undefined',
494
+ message: 'Invalid type: Expected string | number | boolean but received undefined',
495
+ requirement: undefined,
496
+ path: [
497
+ {
498
+ type: 'object',
499
+ origin: 'value',
500
+ input: {
501
+ credential_format: 'mso_mdoc',
502
+ doctype: 'org.iso.18013.5.1.mDL',
503
+ namespaces: {
504
+ 'org.iso.18013.5.1': {
505
+ resident_country: 'Italy',
506
+ resident_address: 'Via Roma 1',
507
+ non_disclosed: 'secret',
508
+ },
509
+ },
510
+ },
511
+ key: 'namespaces',
512
+ value: {
513
+ 'org.iso.18013.5.1': {
514
+ resident_country: 'Italy',
515
+ resident_address: 'Via Roma 1',
516
+ non_disclosed: 'secret',
517
+ },
518
+ },
519
+ },
520
+ {
521
+ type: 'object',
522
+ origin: 'value',
523
+ input: {
524
+ 'org.iso.18013.5.1': {
525
+ resident_country: 'Italy',
526
+ resident_address: 'Via Roma 1',
527
+ non_disclosed: 'secret',
528
+ },
529
+ },
530
+ key: 'org.iso.18013.5.1',
531
+ value: {
532
+ resident_country: 'Italy',
533
+ resident_address: 'Via Roma 1',
534
+ non_disclosed: 'secret',
535
+ },
536
+ },
537
+ {
538
+ type: 'object',
539
+ origin: 'value',
540
+ input: {
541
+ resident_country: 'Italy',
542
+ resident_address: 'Via Roma 1',
543
+ non_disclosed: 'secret',
544
+ },
545
+ key: 'portrait',
546
+ value: undefined,
547
+ },
548
+ ],
549
+ issues: [
550
+ {
551
+ kind: 'schema',
552
+ type: 'string',
553
+ input: undefined,
554
+ expected: 'string',
555
+ received: 'undefined',
556
+ message: 'Invalid type: Expected string but received undefined',
557
+ requirement: undefined,
558
+ path: undefined,
559
+ issues: undefined,
560
+ lang: undefined,
561
+ abortEarly: undefined,
562
+ abortPipeEarly: undefined,
563
+ },
564
+ {
565
+ kind: 'schema',
566
+ type: 'number',
567
+ input: undefined,
568
+ expected: 'number',
569
+ received: 'undefined',
570
+ message: 'Invalid type: Expected number but received undefined',
571
+ requirement: undefined,
572
+ path: undefined,
573
+ issues: undefined,
574
+ lang: undefined,
575
+ abortEarly: undefined,
576
+ abortPipeEarly: undefined,
577
+ },
578
+ {
579
+ kind: 'schema',
580
+ type: 'boolean',
581
+ input: undefined,
582
+ expected: 'boolean',
583
+ received: 'undefined',
584
+ message: 'Invalid type: Expected boolean but received undefined',
585
+ requirement: undefined,
586
+ path: undefined,
587
+ issues: undefined,
588
+ lang: undefined,
589
+ abortEarly: undefined,
590
+ abortPipeEarly: undefined,
591
+ },
592
+ ],
593
+ lang: undefined,
594
+ abortEarly: undefined,
595
+ abortPipeEarly: undefined,
596
+ },
597
+ ],
598
+ flattened: {
599
+ nested: {
600
+ 'namespaces.org.iso.18013.5.1.given_name': [
601
+ 'Invalid type: Expected string | number | boolean but received undefined',
602
+ ],
603
+ 'namespaces.org.iso.18013.5.1.family_name': [
604
+ 'Invalid type: Expected string | number | boolean but received undefined',
605
+ ],
606
+ 'namespaces.org.iso.18013.5.1.portrait': [
607
+ 'Invalid type: Expected string | number | boolean but received undefined',
608
+ ],
609
+ },
610
+ },
611
+ input_credential_index: 1,
612
+ claim_set_index: undefined,
613
+ },
614
+ {
615
+ typed: false,
616
+ success: false,
617
+ output: {
618
+ credential_format: 'mso_mdoc',
619
+ doctype: 'org.iso.23220.photoid.1',
620
+ namespaces: {},
621
+ },
622
+ issues: [
623
+ {
624
+ kind: 'schema',
625
+ type: 'literal',
626
+ input: 'org.iso.23220.photoid.1',
627
+ expected: '"org.iso.18013.5.1.mDL"',
628
+ received: '"org.iso.23220.photoid.1"',
629
+ message: 'Invalid type: Expected "org.iso.18013.5.1.mDL" but received "org.iso.23220.photoid.1"',
630
+ requirement: undefined,
631
+ path: [
632
+ {
633
+ type: 'object',
634
+ origin: 'value',
635
+ input: {
636
+ credential_format: 'mso_mdoc',
637
+ doctype: 'org.iso.23220.photoid.1',
638
+ namespaces: {
639
+ 'org.iso.23220.1': {
640
+ given_name: 'Martin',
641
+ family_name: 'Auer',
642
+ portrait: 'https://example.com/portrait',
643
+ },
644
+ },
645
+ },
646
+ key: 'doctype',
647
+ value: 'org.iso.23220.photoid.1',
648
+ },
649
+ ],
650
+ issues: undefined,
651
+ lang: undefined,
652
+ abortEarly: undefined,
653
+ abortPipeEarly: undefined,
654
+ },
655
+ {
656
+ kind: 'schema',
657
+ type: 'object',
658
+ input: undefined,
659
+ expected: 'Object',
660
+ received: 'undefined',
661
+ message: 'Invalid type: Expected Object but received undefined',
662
+ requirement: undefined,
663
+ path: [
664
+ {
665
+ type: 'object',
666
+ origin: 'value',
667
+ input: {
668
+ credential_format: 'mso_mdoc',
669
+ doctype: 'org.iso.23220.photoid.1',
670
+ namespaces: {
671
+ 'org.iso.23220.1': {
672
+ given_name: 'Martin',
673
+ family_name: 'Auer',
674
+ portrait: 'https://example.com/portrait',
675
+ },
676
+ },
677
+ },
678
+ key: 'namespaces',
679
+ value: {
680
+ 'org.iso.23220.1': {
681
+ given_name: 'Martin',
682
+ family_name: 'Auer',
683
+ portrait: 'https://example.com/portrait',
684
+ },
685
+ },
686
+ },
687
+ {
688
+ type: 'object',
689
+ origin: 'value',
690
+ input: {
691
+ 'org.iso.23220.1': {
692
+ given_name: 'Martin',
693
+ family_name: 'Auer',
694
+ portrait: 'https://example.com/portrait',
695
+ },
696
+ },
697
+ key: 'org.iso.18013.5.1',
698
+ value: undefined,
699
+ },
700
+ ],
701
+ issues: undefined,
702
+ lang: undefined,
703
+ abortEarly: undefined,
704
+ abortPipeEarly: undefined,
705
+ },
706
+ ],
707
+ flattened: {
708
+ nested: {
709
+ doctype: [
710
+ 'Invalid type: Expected "org.iso.18013.5.1.mDL" but received "org.iso.23220.photoid.1"',
711
+ ],
712
+ 'namespaces.org.iso.18013.5.1': [
713
+ 'Invalid type: Expected Object but received undefined',
714
+ ],
715
+ },
716
+ },
717
+ input_credential_index: 2,
718
+ claim_set_index: undefined,
719
+ },
720
+ {
721
+ typed: false,
722
+ success: false,
723
+ output: {
724
+ credential_format: 'mso_mdoc',
725
+ doctype: 'org.iso.23220.photoid.1',
726
+ namespaces: {},
727
+ },
728
+ issues: [
729
+ {
730
+ kind: 'schema',
731
+ type: 'literal',
732
+ input: 'org.iso.23220.photoid.1',
733
+ expected: '"org.iso.18013.5.1.mDL"',
734
+ received: '"org.iso.23220.photoid.1"',
735
+ message: 'Invalid type: Expected "org.iso.18013.5.1.mDL" but received "org.iso.23220.photoid.1"',
736
+ requirement: undefined,
737
+ path: [
738
+ {
739
+ type: 'object',
740
+ origin: 'value',
741
+ input: {
742
+ credential_format: 'mso_mdoc',
743
+ doctype: 'org.iso.23220.photoid.1',
744
+ namespaces: {
745
+ 'org.iso.23220.1': {
746
+ resident_country: 'Italy',
747
+ resident_address: 'Via Roma 1',
748
+ non_disclosed: 'secret',
749
+ },
750
+ },
751
+ },
752
+ key: 'doctype',
753
+ value: 'org.iso.23220.photoid.1',
754
+ },
755
+ ],
756
+ issues: undefined,
757
+ lang: undefined,
758
+ abortEarly: undefined,
759
+ abortPipeEarly: undefined,
760
+ },
761
+ {
762
+ kind: 'schema',
763
+ type: 'object',
764
+ input: undefined,
765
+ expected: 'Object',
766
+ received: 'undefined',
767
+ message: 'Invalid type: Expected Object but received undefined',
768
+ requirement: undefined,
769
+ path: [
770
+ {
771
+ type: 'object',
772
+ origin: 'value',
773
+ input: {
774
+ credential_format: 'mso_mdoc',
775
+ doctype: 'org.iso.23220.photoid.1',
776
+ namespaces: {
777
+ 'org.iso.23220.1': {
778
+ resident_country: 'Italy',
779
+ resident_address: 'Via Roma 1',
780
+ non_disclosed: 'secret',
781
+ },
782
+ },
783
+ },
784
+ key: 'namespaces',
785
+ value: {
786
+ 'org.iso.23220.1': {
787
+ resident_country: 'Italy',
788
+ resident_address: 'Via Roma 1',
789
+ non_disclosed: 'secret',
790
+ },
791
+ },
792
+ },
793
+ {
794
+ type: 'object',
795
+ origin: 'value',
796
+ input: {
797
+ 'org.iso.23220.1': {
798
+ resident_country: 'Italy',
799
+ resident_address: 'Via Roma 1',
800
+ non_disclosed: 'secret',
801
+ },
802
+ },
803
+ key: 'org.iso.18013.5.1',
804
+ value: undefined,
805
+ },
806
+ ],
807
+ issues: undefined,
808
+ lang: undefined,
809
+ abortEarly: undefined,
810
+ abortPipeEarly: undefined,
811
+ },
812
+ ],
813
+ flattened: {
814
+ nested: {
815
+ doctype: [
816
+ 'Invalid type: Expected "org.iso.18013.5.1.mDL" but received "org.iso.23220.photoid.1"',
817
+ ],
818
+ 'namespaces.org.iso.18013.5.1': [
819
+ 'Invalid type: Expected Object but received undefined',
820
+ ],
821
+ },
822
+ },
823
+ input_credential_index: 3,
824
+ claim_set_index: undefined,
825
+ },
826
+ {
827
+ typed: false,
828
+ success: false,
829
+ output: {
830
+ credential_format: 'mso_mdoc',
831
+ doctype: 'example_doctype',
832
+ namespaces: {},
833
+ },
834
+ issues: [
835
+ {
836
+ kind: 'schema',
837
+ type: 'literal',
838
+ input: 'example_doctype',
839
+ expected: '"org.iso.18013.5.1.mDL"',
840
+ received: '"example_doctype"',
841
+ message: 'Invalid type: Expected "org.iso.18013.5.1.mDL" but received "example_doctype"',
842
+ requirement: undefined,
843
+ path: [
844
+ {
845
+ type: 'object',
846
+ origin: 'value',
847
+ input: {
848
+ credential_format: 'mso_mdoc',
849
+ doctype: 'example_doctype',
850
+ namespaces: {
851
+ example_namespaces: {
852
+ example_claim: 'example_value',
853
+ },
854
+ },
855
+ },
856
+ key: 'doctype',
857
+ value: 'example_doctype',
858
+ },
859
+ ],
860
+ issues: undefined,
861
+ lang: undefined,
862
+ abortEarly: undefined,
863
+ abortPipeEarly: undefined,
864
+ },
865
+ {
866
+ kind: 'schema',
867
+ type: 'object',
868
+ input: undefined,
869
+ expected: 'Object',
870
+ received: 'undefined',
871
+ message: 'Invalid type: Expected Object but received undefined',
872
+ requirement: undefined,
873
+ path: [
874
+ {
875
+ type: 'object',
876
+ origin: 'value',
877
+ input: {
878
+ credential_format: 'mso_mdoc',
879
+ doctype: 'example_doctype',
880
+ namespaces: {
881
+ example_namespaces: {
882
+ example_claim: 'example_value',
883
+ },
884
+ },
885
+ },
886
+ key: 'namespaces',
887
+ value: {
888
+ example_namespaces: {
889
+ example_claim: 'example_value',
890
+ },
891
+ },
892
+ },
893
+ {
894
+ type: 'object',
895
+ origin: 'value',
896
+ input: {
897
+ example_namespaces: {
898
+ example_claim: 'example_value',
899
+ },
900
+ },
901
+ key: 'org.iso.18013.5.1',
902
+ value: undefined,
903
+ },
904
+ ],
905
+ issues: undefined,
906
+ lang: undefined,
907
+ abortEarly: undefined,
908
+ abortPipeEarly: undefined,
909
+ },
910
+ ],
911
+ flattened: {
912
+ nested: {
913
+ doctype: [
914
+ 'Invalid type: Expected "org.iso.18013.5.1.mDL" but received "example_doctype"',
915
+ ],
916
+ 'namespaces.org.iso.18013.5.1': [
917
+ 'Invalid type: Expected Object but received undefined',
918
+ ],
919
+ },
920
+ },
921
+ input_credential_index: 4,
922
+ claim_set_index: undefined,
923
+ },
924
+ {
925
+ typed: false,
926
+ success: false,
927
+ output: {
928
+ credential_format: 'vc+sd-jwt',
929
+ },
930
+ issues: [
931
+ {
932
+ kind: 'schema',
933
+ type: 'literal',
934
+ input: 'vc+sd-jwt',
935
+ expected: '"mso_mdoc"',
936
+ received: '"vc+sd-jwt"',
937
+ message: 'Invalid type: Expected "mso_mdoc" but received "vc+sd-jwt"',
938
+ requirement: undefined,
939
+ path: [
940
+ {
941
+ type: 'object',
942
+ origin: 'value',
943
+ input: {
944
+ credential_format: 'vc+sd-jwt',
945
+ vct: 'https://credentials.example.com/identity_credential',
946
+ claims: {
947
+ first_name: 'Arthur',
948
+ last_name: 'Dent',
949
+ address: {
950
+ street_address: '42 Market Street',
951
+ locality: 'Milliways',
952
+ postal_code: '12345',
953
+ },
954
+ degrees: [
955
+ {
956
+ type: 'Bachelor of Science',
957
+ university: 'University of Betelgeuse',
958
+ },
959
+ {
960
+ type: 'Master of Science',
961
+ university: 'University of Betelgeuse',
962
+ },
963
+ ],
964
+ nationalities: ['British', 'Betelgeusian'],
965
+ },
966
+ },
967
+ key: 'credential_format',
968
+ value: 'vc+sd-jwt',
969
+ },
970
+ ],
971
+ issues: undefined,
972
+ lang: undefined,
973
+ abortEarly: undefined,
974
+ abortPipeEarly: undefined,
975
+ },
976
+ {
977
+ kind: 'schema',
978
+ type: 'literal',
979
+ input: undefined,
980
+ expected: '"org.iso.18013.5.1.mDL"',
981
+ received: 'undefined',
982
+ message: 'Invalid type: Expected "org.iso.18013.5.1.mDL" but received undefined',
983
+ requirement: undefined,
984
+ path: [
985
+ {
986
+ type: 'object',
987
+ origin: 'value',
988
+ input: {
989
+ credential_format: 'vc+sd-jwt',
990
+ vct: 'https://credentials.example.com/identity_credential',
991
+ claims: {
992
+ first_name: 'Arthur',
993
+ last_name: 'Dent',
994
+ address: {
995
+ street_address: '42 Market Street',
996
+ locality: 'Milliways',
997
+ postal_code: '12345',
998
+ },
999
+ degrees: [
1000
+ {
1001
+ type: 'Bachelor of Science',
1002
+ university: 'University of Betelgeuse',
1003
+ },
1004
+ {
1005
+ type: 'Master of Science',
1006
+ university: 'University of Betelgeuse',
1007
+ },
1008
+ ],
1009
+ nationalities: ['British', 'Betelgeusian'],
1010
+ },
1011
+ },
1012
+ key: 'doctype',
1013
+ value: undefined,
1014
+ },
1015
+ ],
1016
+ issues: undefined,
1017
+ lang: undefined,
1018
+ abortEarly: undefined,
1019
+ abortPipeEarly: undefined,
1020
+ },
1021
+ {
1022
+ kind: 'schema',
1023
+ type: 'object',
1024
+ input: undefined,
1025
+ expected: 'Object',
1026
+ received: 'undefined',
1027
+ message: 'Invalid type: Expected Object but received undefined',
1028
+ requirement: undefined,
1029
+ path: [
1030
+ {
1031
+ type: 'object',
1032
+ origin: 'value',
1033
+ input: {
1034
+ credential_format: 'vc+sd-jwt',
1035
+ vct: 'https://credentials.example.com/identity_credential',
1036
+ claims: {
1037
+ first_name: 'Arthur',
1038
+ last_name: 'Dent',
1039
+ address: {
1040
+ street_address: '42 Market Street',
1041
+ locality: 'Milliways',
1042
+ postal_code: '12345',
1043
+ },
1044
+ degrees: [
1045
+ {
1046
+ type: 'Bachelor of Science',
1047
+ university: 'University of Betelgeuse',
1048
+ },
1049
+ {
1050
+ type: 'Master of Science',
1051
+ university: 'University of Betelgeuse',
1052
+ },
1053
+ ],
1054
+ nationalities: ['British', 'Betelgeusian'],
1055
+ },
1056
+ },
1057
+ key: 'namespaces',
1058
+ value: undefined,
1059
+ },
1060
+ ],
1061
+ issues: undefined,
1062
+ lang: undefined,
1063
+ abortEarly: undefined,
1064
+ abortPipeEarly: undefined,
1065
+ },
1066
+ ],
1067
+ flattened: {
1068
+ nested: {
1069
+ credential_format: [
1070
+ 'Invalid type: Expected "mso_mdoc" but received "vc+sd-jwt"',
1071
+ ],
1072
+ doctype: [
1073
+ 'Invalid type: Expected "org.iso.18013.5.1.mDL" but received undefined',
1074
+ ],
1075
+ namespaces: [
1076
+ 'Invalid type: Expected Object but received undefined',
1077
+ ],
1078
+ },
1079
+ },
1080
+ input_credential_index: 5,
1081
+ claim_set_index: undefined,
1082
+ },
1083
+ ],
1084
+ ],
1085
+ },
1086
+ 'mdl-address': {
1087
+ typed: true,
1088
+ success: true,
1089
+ output: {
1090
+ credential_format: 'mso_mdoc',
1091
+ doctype: 'org.iso.18013.5.1.mDL',
1092
+ namespaces: {
1093
+ 'org.iso.18013.5.1': {
1094
+ resident_address: 'Via Roma 1',
1095
+ resident_country: 'Italy',
1096
+ },
1097
+ },
1098
+ },
1099
+ input_credential_index: 1,
1100
+ claim_set_index: undefined,
1101
+ all: [
1102
+ [
1103
+ {
1104
+ typed: false,
1105
+ success: false,
1106
+ output: {
1107
+ credential_format: 'mso_mdoc',
1108
+ doctype: 'org.iso.18013.5.1.mDL',
1109
+ namespaces: {
1110
+ 'org.iso.18013.5.1': {},
1111
+ },
1112
+ },
1113
+ issues: [
1114
+ {
1115
+ kind: 'schema',
1116
+ type: 'union',
1117
+ input: undefined,
1118
+ expected: 'string | number | boolean',
1119
+ received: 'undefined',
1120
+ message: 'Invalid type: Expected string | number | boolean but received undefined',
1121
+ requirement: undefined,
1122
+ path: [
1123
+ {
1124
+ type: 'object',
1125
+ origin: 'value',
1126
+ input: {
1127
+ credential_format: 'mso_mdoc',
1128
+ doctype: 'org.iso.18013.5.1.mDL',
1129
+ namespaces: {
1130
+ 'org.iso.18013.5.1': {
1131
+ given_name: 'Martin',
1132
+ family_name: 'Auer',
1133
+ portrait: 'https://example.com/portrait',
1134
+ },
1135
+ },
1136
+ },
1137
+ key: 'namespaces',
1138
+ value: {
1139
+ 'org.iso.18013.5.1': {
1140
+ given_name: 'Martin',
1141
+ family_name: 'Auer',
1142
+ portrait: 'https://example.com/portrait',
1143
+ },
1144
+ },
1145
+ },
1146
+ {
1147
+ type: 'object',
1148
+ origin: 'value',
1149
+ input: {
1150
+ 'org.iso.18013.5.1': {
1151
+ given_name: 'Martin',
1152
+ family_name: 'Auer',
1153
+ portrait: 'https://example.com/portrait',
1154
+ },
1155
+ },
1156
+ key: 'org.iso.18013.5.1',
1157
+ value: {
1158
+ given_name: 'Martin',
1159
+ family_name: 'Auer',
1160
+ portrait: 'https://example.com/portrait',
1161
+ },
1162
+ },
1163
+ {
1164
+ type: 'object',
1165
+ origin: 'value',
1166
+ input: {
1167
+ given_name: 'Martin',
1168
+ family_name: 'Auer',
1169
+ portrait: 'https://example.com/portrait',
1170
+ },
1171
+ key: 'resident_address',
1172
+ value: undefined,
1173
+ },
1174
+ ],
1175
+ issues: [
1176
+ {
1177
+ kind: 'schema',
1178
+ type: 'string',
1179
+ input: undefined,
1180
+ expected: 'string',
1181
+ received: 'undefined',
1182
+ message: 'Invalid type: Expected string but received undefined',
1183
+ requirement: undefined,
1184
+ path: undefined,
1185
+ issues: undefined,
1186
+ lang: undefined,
1187
+ abortEarly: undefined,
1188
+ abortPipeEarly: undefined,
1189
+ },
1190
+ {
1191
+ kind: 'schema',
1192
+ type: 'number',
1193
+ input: undefined,
1194
+ expected: 'number',
1195
+ received: 'undefined',
1196
+ message: 'Invalid type: Expected number but received undefined',
1197
+ requirement: undefined,
1198
+ path: undefined,
1199
+ issues: undefined,
1200
+ lang: undefined,
1201
+ abortEarly: undefined,
1202
+ abortPipeEarly: undefined,
1203
+ },
1204
+ {
1205
+ kind: 'schema',
1206
+ type: 'boolean',
1207
+ input: undefined,
1208
+ expected: 'boolean',
1209
+ received: 'undefined',
1210
+ message: 'Invalid type: Expected boolean but received undefined',
1211
+ requirement: undefined,
1212
+ path: undefined,
1213
+ issues: undefined,
1214
+ lang: undefined,
1215
+ abortEarly: undefined,
1216
+ abortPipeEarly: undefined,
1217
+ },
1218
+ ],
1219
+ lang: undefined,
1220
+ abortEarly: undefined,
1221
+ abortPipeEarly: undefined,
1222
+ },
1223
+ {
1224
+ kind: 'schema',
1225
+ type: 'union',
1226
+ input: undefined,
1227
+ expected: 'string | number | boolean',
1228
+ received: 'undefined',
1229
+ message: 'Invalid type: Expected string | number | boolean but received undefined',
1230
+ requirement: undefined,
1231
+ path: [
1232
+ {
1233
+ type: 'object',
1234
+ origin: 'value',
1235
+ input: {
1236
+ credential_format: 'mso_mdoc',
1237
+ doctype: 'org.iso.18013.5.1.mDL',
1238
+ namespaces: {
1239
+ 'org.iso.18013.5.1': {
1240
+ given_name: 'Martin',
1241
+ family_name: 'Auer',
1242
+ portrait: 'https://example.com/portrait',
1243
+ },
1244
+ },
1245
+ },
1246
+ key: 'namespaces',
1247
+ value: {
1248
+ 'org.iso.18013.5.1': {
1249
+ given_name: 'Martin',
1250
+ family_name: 'Auer',
1251
+ portrait: 'https://example.com/portrait',
1252
+ },
1253
+ },
1254
+ },
1255
+ {
1256
+ type: 'object',
1257
+ origin: 'value',
1258
+ input: {
1259
+ 'org.iso.18013.5.1': {
1260
+ given_name: 'Martin',
1261
+ family_name: 'Auer',
1262
+ portrait: 'https://example.com/portrait',
1263
+ },
1264
+ },
1265
+ key: 'org.iso.18013.5.1',
1266
+ value: {
1267
+ given_name: 'Martin',
1268
+ family_name: 'Auer',
1269
+ portrait: 'https://example.com/portrait',
1270
+ },
1271
+ },
1272
+ {
1273
+ type: 'object',
1274
+ origin: 'value',
1275
+ input: {
1276
+ given_name: 'Martin',
1277
+ family_name: 'Auer',
1278
+ portrait: 'https://example.com/portrait',
1279
+ },
1280
+ key: 'resident_country',
1281
+ value: undefined,
1282
+ },
1283
+ ],
1284
+ issues: [
1285
+ {
1286
+ kind: 'schema',
1287
+ type: 'string',
1288
+ input: undefined,
1289
+ expected: 'string',
1290
+ received: 'undefined',
1291
+ message: 'Invalid type: Expected string but received undefined',
1292
+ requirement: undefined,
1293
+ path: undefined,
1294
+ issues: undefined,
1295
+ lang: undefined,
1296
+ abortEarly: undefined,
1297
+ abortPipeEarly: undefined,
1298
+ },
1299
+ {
1300
+ kind: 'schema',
1301
+ type: 'number',
1302
+ input: undefined,
1303
+ expected: 'number',
1304
+ received: 'undefined',
1305
+ message: 'Invalid type: Expected number but received undefined',
1306
+ requirement: undefined,
1307
+ path: undefined,
1308
+ issues: undefined,
1309
+ lang: undefined,
1310
+ abortEarly: undefined,
1311
+ abortPipeEarly: undefined,
1312
+ },
1313
+ {
1314
+ kind: 'schema',
1315
+ type: 'boolean',
1316
+ input: undefined,
1317
+ expected: 'boolean',
1318
+ received: 'undefined',
1319
+ message: 'Invalid type: Expected boolean but received undefined',
1320
+ requirement: undefined,
1321
+ path: undefined,
1322
+ issues: undefined,
1323
+ lang: undefined,
1324
+ abortEarly: undefined,
1325
+ abortPipeEarly: undefined,
1326
+ },
1327
+ ],
1328
+ lang: undefined,
1329
+ abortEarly: undefined,
1330
+ abortPipeEarly: undefined,
1331
+ },
1332
+ ],
1333
+ flattened: {
1334
+ nested: {
1335
+ 'namespaces.org.iso.18013.5.1.resident_address': [
1336
+ 'Invalid type: Expected string | number | boolean but received undefined',
1337
+ ],
1338
+ 'namespaces.org.iso.18013.5.1.resident_country': [
1339
+ 'Invalid type: Expected string | number | boolean but received undefined',
1340
+ ],
1341
+ },
1342
+ },
1343
+ input_credential_index: 0,
1344
+ claim_set_index: undefined,
1345
+ },
1346
+ {
1347
+ typed: true,
1348
+ success: true,
1349
+ output: {
1350
+ credential_format: 'mso_mdoc',
1351
+ doctype: 'org.iso.18013.5.1.mDL',
1352
+ namespaces: {
1353
+ 'org.iso.18013.5.1': {
1354
+ resident_address: 'Via Roma 1',
1355
+ resident_country: 'Italy',
1356
+ },
1357
+ },
1358
+ },
1359
+ issues: undefined,
1360
+ input_credential_index: 1,
1361
+ claim_set_index: undefined,
1362
+ },
1363
+ {
1364
+ typed: false,
1365
+ success: false,
1366
+ output: {
1367
+ credential_format: 'mso_mdoc',
1368
+ doctype: 'org.iso.23220.photoid.1',
1369
+ namespaces: {},
1370
+ },
1371
+ issues: [
1372
+ {
1373
+ kind: 'schema',
1374
+ type: 'literal',
1375
+ input: 'org.iso.23220.photoid.1',
1376
+ expected: '"org.iso.18013.5.1.mDL"',
1377
+ received: '"org.iso.23220.photoid.1"',
1378
+ message: 'Invalid type: Expected "org.iso.18013.5.1.mDL" but received "org.iso.23220.photoid.1"',
1379
+ requirement: undefined,
1380
+ path: [
1381
+ {
1382
+ type: 'object',
1383
+ origin: 'value',
1384
+ input: {
1385
+ credential_format: 'mso_mdoc',
1386
+ doctype: 'org.iso.23220.photoid.1',
1387
+ namespaces: {
1388
+ 'org.iso.23220.1': {
1389
+ given_name: 'Martin',
1390
+ family_name: 'Auer',
1391
+ portrait: 'https://example.com/portrait',
1392
+ },
1393
+ },
1394
+ },
1395
+ key: 'doctype',
1396
+ value: 'org.iso.23220.photoid.1',
1397
+ },
1398
+ ],
1399
+ issues: undefined,
1400
+ lang: undefined,
1401
+ abortEarly: undefined,
1402
+ abortPipeEarly: undefined,
1403
+ },
1404
+ {
1405
+ kind: 'schema',
1406
+ type: 'object',
1407
+ input: undefined,
1408
+ expected: 'Object',
1409
+ received: 'undefined',
1410
+ message: 'Invalid type: Expected Object but received undefined',
1411
+ requirement: undefined,
1412
+ path: [
1413
+ {
1414
+ type: 'object',
1415
+ origin: 'value',
1416
+ input: {
1417
+ credential_format: 'mso_mdoc',
1418
+ doctype: 'org.iso.23220.photoid.1',
1419
+ namespaces: {
1420
+ 'org.iso.23220.1': {
1421
+ given_name: 'Martin',
1422
+ family_name: 'Auer',
1423
+ portrait: 'https://example.com/portrait',
1424
+ },
1425
+ },
1426
+ },
1427
+ key: 'namespaces',
1428
+ value: {
1429
+ 'org.iso.23220.1': {
1430
+ given_name: 'Martin',
1431
+ family_name: 'Auer',
1432
+ portrait: 'https://example.com/portrait',
1433
+ },
1434
+ },
1435
+ },
1436
+ {
1437
+ type: 'object',
1438
+ origin: 'value',
1439
+ input: {
1440
+ 'org.iso.23220.1': {
1441
+ given_name: 'Martin',
1442
+ family_name: 'Auer',
1443
+ portrait: 'https://example.com/portrait',
1444
+ },
1445
+ },
1446
+ key: 'org.iso.18013.5.1',
1447
+ value: undefined,
1448
+ },
1449
+ ],
1450
+ issues: undefined,
1451
+ lang: undefined,
1452
+ abortEarly: undefined,
1453
+ abortPipeEarly: undefined,
1454
+ },
1455
+ ],
1456
+ flattened: {
1457
+ nested: {
1458
+ doctype: [
1459
+ 'Invalid type: Expected "org.iso.18013.5.1.mDL" but received "org.iso.23220.photoid.1"',
1460
+ ],
1461
+ 'namespaces.org.iso.18013.5.1': [
1462
+ 'Invalid type: Expected Object but received undefined',
1463
+ ],
1464
+ },
1465
+ },
1466
+ input_credential_index: 2,
1467
+ claim_set_index: undefined,
1468
+ },
1469
+ {
1470
+ typed: false,
1471
+ success: false,
1472
+ output: {
1473
+ credential_format: 'mso_mdoc',
1474
+ doctype: 'org.iso.23220.photoid.1',
1475
+ namespaces: {},
1476
+ },
1477
+ issues: [
1478
+ {
1479
+ kind: 'schema',
1480
+ type: 'literal',
1481
+ input: 'org.iso.23220.photoid.1',
1482
+ expected: '"org.iso.18013.5.1.mDL"',
1483
+ received: '"org.iso.23220.photoid.1"',
1484
+ message: 'Invalid type: Expected "org.iso.18013.5.1.mDL" but received "org.iso.23220.photoid.1"',
1485
+ requirement: undefined,
1486
+ path: [
1487
+ {
1488
+ type: 'object',
1489
+ origin: 'value',
1490
+ input: {
1491
+ credential_format: 'mso_mdoc',
1492
+ doctype: 'org.iso.23220.photoid.1',
1493
+ namespaces: {
1494
+ 'org.iso.23220.1': {
1495
+ resident_country: 'Italy',
1496
+ resident_address: 'Via Roma 1',
1497
+ non_disclosed: 'secret',
1498
+ },
1499
+ },
1500
+ },
1501
+ key: 'doctype',
1502
+ value: 'org.iso.23220.photoid.1',
1503
+ },
1504
+ ],
1505
+ issues: undefined,
1506
+ lang: undefined,
1507
+ abortEarly: undefined,
1508
+ abortPipeEarly: undefined,
1509
+ },
1510
+ {
1511
+ kind: 'schema',
1512
+ type: 'object',
1513
+ input: undefined,
1514
+ expected: 'Object',
1515
+ received: 'undefined',
1516
+ message: 'Invalid type: Expected Object but received undefined',
1517
+ requirement: undefined,
1518
+ path: [
1519
+ {
1520
+ type: 'object',
1521
+ origin: 'value',
1522
+ input: {
1523
+ credential_format: 'mso_mdoc',
1524
+ doctype: 'org.iso.23220.photoid.1',
1525
+ namespaces: {
1526
+ 'org.iso.23220.1': {
1527
+ resident_country: 'Italy',
1528
+ resident_address: 'Via Roma 1',
1529
+ non_disclosed: 'secret',
1530
+ },
1531
+ },
1532
+ },
1533
+ key: 'namespaces',
1534
+ value: {
1535
+ 'org.iso.23220.1': {
1536
+ resident_country: 'Italy',
1537
+ resident_address: 'Via Roma 1',
1538
+ non_disclosed: 'secret',
1539
+ },
1540
+ },
1541
+ },
1542
+ {
1543
+ type: 'object',
1544
+ origin: 'value',
1545
+ input: {
1546
+ 'org.iso.23220.1': {
1547
+ resident_country: 'Italy',
1548
+ resident_address: 'Via Roma 1',
1549
+ non_disclosed: 'secret',
1550
+ },
1551
+ },
1552
+ key: 'org.iso.18013.5.1',
1553
+ value: undefined,
1554
+ },
1555
+ ],
1556
+ issues: undefined,
1557
+ lang: undefined,
1558
+ abortEarly: undefined,
1559
+ abortPipeEarly: undefined,
1560
+ },
1561
+ ],
1562
+ flattened: {
1563
+ nested: {
1564
+ doctype: [
1565
+ 'Invalid type: Expected "org.iso.18013.5.1.mDL" but received "org.iso.23220.photoid.1"',
1566
+ ],
1567
+ 'namespaces.org.iso.18013.5.1': [
1568
+ 'Invalid type: Expected Object but received undefined',
1569
+ ],
1570
+ },
1571
+ },
1572
+ input_credential_index: 3,
1573
+ claim_set_index: undefined,
1574
+ },
1575
+ {
1576
+ typed: false,
1577
+ success: false,
1578
+ output: {
1579
+ credential_format: 'mso_mdoc',
1580
+ doctype: 'example_doctype',
1581
+ namespaces: {},
1582
+ },
1583
+ issues: [
1584
+ {
1585
+ kind: 'schema',
1586
+ type: 'literal',
1587
+ input: 'example_doctype',
1588
+ expected: '"org.iso.18013.5.1.mDL"',
1589
+ received: '"example_doctype"',
1590
+ message: 'Invalid type: Expected "org.iso.18013.5.1.mDL" but received "example_doctype"',
1591
+ requirement: undefined,
1592
+ path: [
1593
+ {
1594
+ type: 'object',
1595
+ origin: 'value',
1596
+ input: {
1597
+ credential_format: 'mso_mdoc',
1598
+ doctype: 'example_doctype',
1599
+ namespaces: {
1600
+ example_namespaces: {
1601
+ example_claim: 'example_value',
1602
+ },
1603
+ },
1604
+ },
1605
+ key: 'doctype',
1606
+ value: 'example_doctype',
1607
+ },
1608
+ ],
1609
+ issues: undefined,
1610
+ lang: undefined,
1611
+ abortEarly: undefined,
1612
+ abortPipeEarly: undefined,
1613
+ },
1614
+ {
1615
+ kind: 'schema',
1616
+ type: 'object',
1617
+ input: undefined,
1618
+ expected: 'Object',
1619
+ received: 'undefined',
1620
+ message: 'Invalid type: Expected Object but received undefined',
1621
+ requirement: undefined,
1622
+ path: [
1623
+ {
1624
+ type: 'object',
1625
+ origin: 'value',
1626
+ input: {
1627
+ credential_format: 'mso_mdoc',
1628
+ doctype: 'example_doctype',
1629
+ namespaces: {
1630
+ example_namespaces: {
1631
+ example_claim: 'example_value',
1632
+ },
1633
+ },
1634
+ },
1635
+ key: 'namespaces',
1636
+ value: {
1637
+ example_namespaces: {
1638
+ example_claim: 'example_value',
1639
+ },
1640
+ },
1641
+ },
1642
+ {
1643
+ type: 'object',
1644
+ origin: 'value',
1645
+ input: {
1646
+ example_namespaces: {
1647
+ example_claim: 'example_value',
1648
+ },
1649
+ },
1650
+ key: 'org.iso.18013.5.1',
1651
+ value: undefined,
1652
+ },
1653
+ ],
1654
+ issues: undefined,
1655
+ lang: undefined,
1656
+ abortEarly: undefined,
1657
+ abortPipeEarly: undefined,
1658
+ },
1659
+ ],
1660
+ flattened: {
1661
+ nested: {
1662
+ doctype: [
1663
+ 'Invalid type: Expected "org.iso.18013.5.1.mDL" but received "example_doctype"',
1664
+ ],
1665
+ 'namespaces.org.iso.18013.5.1': [
1666
+ 'Invalid type: Expected Object but received undefined',
1667
+ ],
1668
+ },
1669
+ },
1670
+ input_credential_index: 4,
1671
+ claim_set_index: undefined,
1672
+ },
1673
+ {
1674
+ typed: false,
1675
+ success: false,
1676
+ output: {
1677
+ credential_format: 'vc+sd-jwt',
1678
+ },
1679
+ issues: [
1680
+ {
1681
+ kind: 'schema',
1682
+ type: 'literal',
1683
+ input: 'vc+sd-jwt',
1684
+ expected: '"mso_mdoc"',
1685
+ received: '"vc+sd-jwt"',
1686
+ message: 'Invalid type: Expected "mso_mdoc" but received "vc+sd-jwt"',
1687
+ requirement: undefined,
1688
+ path: [
1689
+ {
1690
+ type: 'object',
1691
+ origin: 'value',
1692
+ input: {
1693
+ credential_format: 'vc+sd-jwt',
1694
+ vct: 'https://credentials.example.com/identity_credential',
1695
+ claims: {
1696
+ first_name: 'Arthur',
1697
+ last_name: 'Dent',
1698
+ address: {
1699
+ street_address: '42 Market Street',
1700
+ locality: 'Milliways',
1701
+ postal_code: '12345',
1702
+ },
1703
+ degrees: [
1704
+ {
1705
+ type: 'Bachelor of Science',
1706
+ university: 'University of Betelgeuse',
1707
+ },
1708
+ {
1709
+ type: 'Master of Science',
1710
+ university: 'University of Betelgeuse',
1711
+ },
1712
+ ],
1713
+ nationalities: ['British', 'Betelgeusian'],
1714
+ },
1715
+ },
1716
+ key: 'credential_format',
1717
+ value: 'vc+sd-jwt',
1718
+ },
1719
+ ],
1720
+ issues: undefined,
1721
+ lang: undefined,
1722
+ abortEarly: undefined,
1723
+ abortPipeEarly: undefined,
1724
+ },
1725
+ {
1726
+ kind: 'schema',
1727
+ type: 'literal',
1728
+ input: undefined,
1729
+ expected: '"org.iso.18013.5.1.mDL"',
1730
+ received: 'undefined',
1731
+ message: 'Invalid type: Expected "org.iso.18013.5.1.mDL" but received undefined',
1732
+ requirement: undefined,
1733
+ path: [
1734
+ {
1735
+ type: 'object',
1736
+ origin: 'value',
1737
+ input: {
1738
+ credential_format: 'vc+sd-jwt',
1739
+ vct: 'https://credentials.example.com/identity_credential',
1740
+ claims: {
1741
+ first_name: 'Arthur',
1742
+ last_name: 'Dent',
1743
+ address: {
1744
+ street_address: '42 Market Street',
1745
+ locality: 'Milliways',
1746
+ postal_code: '12345',
1747
+ },
1748
+ degrees: [
1749
+ {
1750
+ type: 'Bachelor of Science',
1751
+ university: 'University of Betelgeuse',
1752
+ },
1753
+ {
1754
+ type: 'Master of Science',
1755
+ university: 'University of Betelgeuse',
1756
+ },
1757
+ ],
1758
+ nationalities: ['British', 'Betelgeusian'],
1759
+ },
1760
+ },
1761
+ key: 'doctype',
1762
+ value: undefined,
1763
+ },
1764
+ ],
1765
+ issues: undefined,
1766
+ lang: undefined,
1767
+ abortEarly: undefined,
1768
+ abortPipeEarly: undefined,
1769
+ },
1770
+ {
1771
+ kind: 'schema',
1772
+ type: 'object',
1773
+ input: undefined,
1774
+ expected: 'Object',
1775
+ received: 'undefined',
1776
+ message: 'Invalid type: Expected Object but received undefined',
1777
+ requirement: undefined,
1778
+ path: [
1779
+ {
1780
+ type: 'object',
1781
+ origin: 'value',
1782
+ input: {
1783
+ credential_format: 'vc+sd-jwt',
1784
+ vct: 'https://credentials.example.com/identity_credential',
1785
+ claims: {
1786
+ first_name: 'Arthur',
1787
+ last_name: 'Dent',
1788
+ address: {
1789
+ street_address: '42 Market Street',
1790
+ locality: 'Milliways',
1791
+ postal_code: '12345',
1792
+ },
1793
+ degrees: [
1794
+ {
1795
+ type: 'Bachelor of Science',
1796
+ university: 'University of Betelgeuse',
1797
+ },
1798
+ {
1799
+ type: 'Master of Science',
1800
+ university: 'University of Betelgeuse',
1801
+ },
1802
+ ],
1803
+ nationalities: ['British', 'Betelgeusian'],
1804
+ },
1805
+ },
1806
+ key: 'namespaces',
1807
+ value: undefined,
1808
+ },
1809
+ ],
1810
+ issues: undefined,
1811
+ lang: undefined,
1812
+ abortEarly: undefined,
1813
+ abortPipeEarly: undefined,
1814
+ },
1815
+ ],
1816
+ flattened: {
1817
+ nested: {
1818
+ credential_format: [
1819
+ 'Invalid type: Expected "mso_mdoc" but received "vc+sd-jwt"',
1820
+ ],
1821
+ doctype: [
1822
+ 'Invalid type: Expected "org.iso.18013.5.1.mDL" but received undefined',
1823
+ ],
1824
+ namespaces: [
1825
+ 'Invalid type: Expected Object but received undefined',
1826
+ ],
1827
+ },
1828
+ },
1829
+ input_credential_index: 5,
1830
+ claim_set_index: undefined,
1831
+ },
1832
+ ],
1833
+ ],
1834
+ },
1835
+ 'photo_card-id': {
1836
+ typed: true,
1837
+ success: true,
1838
+ output: {
1839
+ credential_format: 'mso_mdoc',
1840
+ doctype: 'org.iso.23220.photoid.1',
1841
+ namespaces: {
1842
+ 'org.iso.23220.1': {
1843
+ given_name: 'Martin',
1844
+ family_name: 'Auer',
1845
+ portrait: 'https://example.com/portrait',
1846
+ },
1847
+ },
1848
+ },
1849
+ input_credential_index: 2,
1850
+ claim_set_index: undefined,
1851
+ all: [
1852
+ [
1853
+ {
1854
+ typed: false,
1855
+ success: false,
1856
+ output: {
1857
+ credential_format: 'mso_mdoc',
1858
+ doctype: 'org.iso.18013.5.1.mDL',
1859
+ namespaces: {},
1860
+ },
1861
+ issues: [
1862
+ {
1863
+ kind: 'schema',
1864
+ type: 'literal',
1865
+ input: 'org.iso.18013.5.1.mDL',
1866
+ expected: '"org.iso.23220.photoid.1"',
1867
+ received: '"org.iso.18013.5.1.mDL"',
1868
+ message: 'Invalid type: Expected "org.iso.23220.photoid.1" but received "org.iso.18013.5.1.mDL"',
1869
+ requirement: undefined,
1870
+ path: [
1871
+ {
1872
+ type: 'object',
1873
+ origin: 'value',
1874
+ input: {
1875
+ credential_format: 'mso_mdoc',
1876
+ doctype: 'org.iso.18013.5.1.mDL',
1877
+ namespaces: {
1878
+ 'org.iso.18013.5.1': {
1879
+ given_name: 'Martin',
1880
+ family_name: 'Auer',
1881
+ portrait: 'https://example.com/portrait',
1882
+ },
1883
+ },
1884
+ },
1885
+ key: 'doctype',
1886
+ value: 'org.iso.18013.5.1.mDL',
1887
+ },
1888
+ ],
1889
+ issues: undefined,
1890
+ lang: undefined,
1891
+ abortEarly: undefined,
1892
+ abortPipeEarly: undefined,
1893
+ },
1894
+ {
1895
+ kind: 'schema',
1896
+ type: 'object',
1897
+ input: undefined,
1898
+ expected: 'Object',
1899
+ received: 'undefined',
1900
+ message: 'Invalid type: Expected Object but received undefined',
1901
+ requirement: undefined,
1902
+ path: [
1903
+ {
1904
+ type: 'object',
1905
+ origin: 'value',
1906
+ input: {
1907
+ credential_format: 'mso_mdoc',
1908
+ doctype: 'org.iso.18013.5.1.mDL',
1909
+ namespaces: {
1910
+ 'org.iso.18013.5.1': {
1911
+ given_name: 'Martin',
1912
+ family_name: 'Auer',
1913
+ portrait: 'https://example.com/portrait',
1914
+ },
1915
+ },
1916
+ },
1917
+ key: 'namespaces',
1918
+ value: {
1919
+ 'org.iso.18013.5.1': {
1920
+ given_name: 'Martin',
1921
+ family_name: 'Auer',
1922
+ portrait: 'https://example.com/portrait',
1923
+ },
1924
+ },
1925
+ },
1926
+ {
1927
+ type: 'object',
1928
+ origin: 'value',
1929
+ input: {
1930
+ 'org.iso.18013.5.1': {
1931
+ given_name: 'Martin',
1932
+ family_name: 'Auer',
1933
+ portrait: 'https://example.com/portrait',
1934
+ },
1935
+ },
1936
+ key: 'org.iso.23220.1',
1937
+ value: undefined,
1938
+ },
1939
+ ],
1940
+ issues: undefined,
1941
+ lang: undefined,
1942
+ abortEarly: undefined,
1943
+ abortPipeEarly: undefined,
1944
+ },
1945
+ ],
1946
+ flattened: {
1947
+ nested: {
1948
+ doctype: [
1949
+ 'Invalid type: Expected "org.iso.23220.photoid.1" but received "org.iso.18013.5.1.mDL"',
1950
+ ],
1951
+ 'namespaces.org.iso.23220.1': [
1952
+ 'Invalid type: Expected Object but received undefined',
1953
+ ],
1954
+ },
1955
+ },
1956
+ input_credential_index: 0,
1957
+ claim_set_index: undefined,
1958
+ },
1959
+ {
1960
+ typed: false,
1961
+ success: false,
1962
+ output: {
1963
+ credential_format: 'mso_mdoc',
1964
+ doctype: 'org.iso.18013.5.1.mDL',
1965
+ namespaces: {},
1966
+ },
1967
+ issues: [
1968
+ {
1969
+ kind: 'schema',
1970
+ type: 'literal',
1971
+ input: 'org.iso.18013.5.1.mDL',
1972
+ expected: '"org.iso.23220.photoid.1"',
1973
+ received: '"org.iso.18013.5.1.mDL"',
1974
+ message: 'Invalid type: Expected "org.iso.23220.photoid.1" but received "org.iso.18013.5.1.mDL"',
1975
+ requirement: undefined,
1976
+ path: [
1977
+ {
1978
+ type: 'object',
1979
+ origin: 'value',
1980
+ input: {
1981
+ credential_format: 'mso_mdoc',
1982
+ doctype: 'org.iso.18013.5.1.mDL',
1983
+ namespaces: {
1984
+ 'org.iso.18013.5.1': {
1985
+ resident_country: 'Italy',
1986
+ resident_address: 'Via Roma 1',
1987
+ non_disclosed: 'secret',
1988
+ },
1989
+ },
1990
+ },
1991
+ key: 'doctype',
1992
+ value: 'org.iso.18013.5.1.mDL',
1993
+ },
1994
+ ],
1995
+ issues: undefined,
1996
+ lang: undefined,
1997
+ abortEarly: undefined,
1998
+ abortPipeEarly: undefined,
1999
+ },
2000
+ {
2001
+ kind: 'schema',
2002
+ type: 'object',
2003
+ input: undefined,
2004
+ expected: 'Object',
2005
+ received: 'undefined',
2006
+ message: 'Invalid type: Expected Object but received undefined',
2007
+ requirement: undefined,
2008
+ path: [
2009
+ {
2010
+ type: 'object',
2011
+ origin: 'value',
2012
+ input: {
2013
+ credential_format: 'mso_mdoc',
2014
+ doctype: 'org.iso.18013.5.1.mDL',
2015
+ namespaces: {
2016
+ 'org.iso.18013.5.1': {
2017
+ resident_country: 'Italy',
2018
+ resident_address: 'Via Roma 1',
2019
+ non_disclosed: 'secret',
2020
+ },
2021
+ },
2022
+ },
2023
+ key: 'namespaces',
2024
+ value: {
2025
+ 'org.iso.18013.5.1': {
2026
+ resident_country: 'Italy',
2027
+ resident_address: 'Via Roma 1',
2028
+ non_disclosed: 'secret',
2029
+ },
2030
+ },
2031
+ },
2032
+ {
2033
+ type: 'object',
2034
+ origin: 'value',
2035
+ input: {
2036
+ 'org.iso.18013.5.1': {
2037
+ resident_country: 'Italy',
2038
+ resident_address: 'Via Roma 1',
2039
+ non_disclosed: 'secret',
2040
+ },
2041
+ },
2042
+ key: 'org.iso.23220.1',
2043
+ value: undefined,
2044
+ },
2045
+ ],
2046
+ issues: undefined,
2047
+ lang: undefined,
2048
+ abortEarly: undefined,
2049
+ abortPipeEarly: undefined,
2050
+ },
2051
+ ],
2052
+ flattened: {
2053
+ nested: {
2054
+ doctype: [
2055
+ 'Invalid type: Expected "org.iso.23220.photoid.1" but received "org.iso.18013.5.1.mDL"',
2056
+ ],
2057
+ 'namespaces.org.iso.23220.1': [
2058
+ 'Invalid type: Expected Object but received undefined',
2059
+ ],
2060
+ },
2061
+ },
2062
+ input_credential_index: 1,
2063
+ claim_set_index: undefined,
2064
+ },
2065
+ {
2066
+ typed: true,
2067
+ success: true,
2068
+ output: {
2069
+ credential_format: 'mso_mdoc',
2070
+ doctype: 'org.iso.23220.photoid.1',
2071
+ namespaces: {
2072
+ 'org.iso.23220.1': {
2073
+ given_name: 'Martin',
2074
+ family_name: 'Auer',
2075
+ portrait: 'https://example.com/portrait',
2076
+ },
2077
+ },
2078
+ },
2079
+ issues: undefined,
2080
+ input_credential_index: 2,
2081
+ claim_set_index: undefined,
2082
+ },
2083
+ {
2084
+ typed: false,
2085
+ success: false,
2086
+ output: {
2087
+ credential_format: 'mso_mdoc',
2088
+ doctype: 'org.iso.23220.photoid.1',
2089
+ namespaces: {
2090
+ 'org.iso.23220.1': {},
2091
+ },
2092
+ },
2093
+ issues: [
2094
+ {
2095
+ kind: 'schema',
2096
+ type: 'union',
2097
+ input: undefined,
2098
+ expected: 'string | number | boolean',
2099
+ received: 'undefined',
2100
+ message: 'Invalid type: Expected string | number | boolean but received undefined',
2101
+ requirement: undefined,
2102
+ path: [
2103
+ {
2104
+ type: 'object',
2105
+ origin: 'value',
2106
+ input: {
2107
+ credential_format: 'mso_mdoc',
2108
+ doctype: 'org.iso.23220.photoid.1',
2109
+ namespaces: {
2110
+ 'org.iso.23220.1': {
2111
+ resident_country: 'Italy',
2112
+ resident_address: 'Via Roma 1',
2113
+ non_disclosed: 'secret',
2114
+ },
2115
+ },
2116
+ },
2117
+ key: 'namespaces',
2118
+ value: {
2119
+ 'org.iso.23220.1': {
2120
+ resident_country: 'Italy',
2121
+ resident_address: 'Via Roma 1',
2122
+ non_disclosed: 'secret',
2123
+ },
2124
+ },
2125
+ },
2126
+ {
2127
+ type: 'object',
2128
+ origin: 'value',
2129
+ input: {
2130
+ 'org.iso.23220.1': {
2131
+ resident_country: 'Italy',
2132
+ resident_address: 'Via Roma 1',
2133
+ non_disclosed: 'secret',
2134
+ },
2135
+ },
2136
+ key: 'org.iso.23220.1',
2137
+ value: {
2138
+ resident_country: 'Italy',
2139
+ resident_address: 'Via Roma 1',
2140
+ non_disclosed: 'secret',
2141
+ },
2142
+ },
2143
+ {
2144
+ type: 'object',
2145
+ origin: 'value',
2146
+ input: {
2147
+ resident_country: 'Italy',
2148
+ resident_address: 'Via Roma 1',
2149
+ non_disclosed: 'secret',
2150
+ },
2151
+ key: 'given_name',
2152
+ value: undefined,
2153
+ },
2154
+ ],
2155
+ issues: [
2156
+ {
2157
+ kind: 'schema',
2158
+ type: 'string',
2159
+ input: undefined,
2160
+ expected: 'string',
2161
+ received: 'undefined',
2162
+ message: 'Invalid type: Expected string but received undefined',
2163
+ requirement: undefined,
2164
+ path: undefined,
2165
+ issues: undefined,
2166
+ lang: undefined,
2167
+ abortEarly: undefined,
2168
+ abortPipeEarly: undefined,
2169
+ },
2170
+ {
2171
+ kind: 'schema',
2172
+ type: 'number',
2173
+ input: undefined,
2174
+ expected: 'number',
2175
+ received: 'undefined',
2176
+ message: 'Invalid type: Expected number but received undefined',
2177
+ requirement: undefined,
2178
+ path: undefined,
2179
+ issues: undefined,
2180
+ lang: undefined,
2181
+ abortEarly: undefined,
2182
+ abortPipeEarly: undefined,
2183
+ },
2184
+ {
2185
+ kind: 'schema',
2186
+ type: 'boolean',
2187
+ input: undefined,
2188
+ expected: 'boolean',
2189
+ received: 'undefined',
2190
+ message: 'Invalid type: Expected boolean but received undefined',
2191
+ requirement: undefined,
2192
+ path: undefined,
2193
+ issues: undefined,
2194
+ lang: undefined,
2195
+ abortEarly: undefined,
2196
+ abortPipeEarly: undefined,
2197
+ },
2198
+ ],
2199
+ lang: undefined,
2200
+ abortEarly: undefined,
2201
+ abortPipeEarly: undefined,
2202
+ },
2203
+ {
2204
+ kind: 'schema',
2205
+ type: 'union',
2206
+ input: undefined,
2207
+ expected: 'string | number | boolean',
2208
+ received: 'undefined',
2209
+ message: 'Invalid type: Expected string | number | boolean but received undefined',
2210
+ requirement: undefined,
2211
+ path: [
2212
+ {
2213
+ type: 'object',
2214
+ origin: 'value',
2215
+ input: {
2216
+ credential_format: 'mso_mdoc',
2217
+ doctype: 'org.iso.23220.photoid.1',
2218
+ namespaces: {
2219
+ 'org.iso.23220.1': {
2220
+ resident_country: 'Italy',
2221
+ resident_address: 'Via Roma 1',
2222
+ non_disclosed: 'secret',
2223
+ },
2224
+ },
2225
+ },
2226
+ key: 'namespaces',
2227
+ value: {
2228
+ 'org.iso.23220.1': {
2229
+ resident_country: 'Italy',
2230
+ resident_address: 'Via Roma 1',
2231
+ non_disclosed: 'secret',
2232
+ },
2233
+ },
2234
+ },
2235
+ {
2236
+ type: 'object',
2237
+ origin: 'value',
2238
+ input: {
2239
+ 'org.iso.23220.1': {
2240
+ resident_country: 'Italy',
2241
+ resident_address: 'Via Roma 1',
2242
+ non_disclosed: 'secret',
2243
+ },
2244
+ },
2245
+ key: 'org.iso.23220.1',
2246
+ value: {
2247
+ resident_country: 'Italy',
2248
+ resident_address: 'Via Roma 1',
2249
+ non_disclosed: 'secret',
2250
+ },
2251
+ },
2252
+ {
2253
+ type: 'object',
2254
+ origin: 'value',
2255
+ input: {
2256
+ resident_country: 'Italy',
2257
+ resident_address: 'Via Roma 1',
2258
+ non_disclosed: 'secret',
2259
+ },
2260
+ key: 'family_name',
2261
+ value: undefined,
2262
+ },
2263
+ ],
2264
+ issues: [
2265
+ {
2266
+ kind: 'schema',
2267
+ type: 'string',
2268
+ input: undefined,
2269
+ expected: 'string',
2270
+ received: 'undefined',
2271
+ message: 'Invalid type: Expected string but received undefined',
2272
+ requirement: undefined,
2273
+ path: undefined,
2274
+ issues: undefined,
2275
+ lang: undefined,
2276
+ abortEarly: undefined,
2277
+ abortPipeEarly: undefined,
2278
+ },
2279
+ {
2280
+ kind: 'schema',
2281
+ type: 'number',
2282
+ input: undefined,
2283
+ expected: 'number',
2284
+ received: 'undefined',
2285
+ message: 'Invalid type: Expected number but received undefined',
2286
+ requirement: undefined,
2287
+ path: undefined,
2288
+ issues: undefined,
2289
+ lang: undefined,
2290
+ abortEarly: undefined,
2291
+ abortPipeEarly: undefined,
2292
+ },
2293
+ {
2294
+ kind: 'schema',
2295
+ type: 'boolean',
2296
+ input: undefined,
2297
+ expected: 'boolean',
2298
+ received: 'undefined',
2299
+ message: 'Invalid type: Expected boolean but received undefined',
2300
+ requirement: undefined,
2301
+ path: undefined,
2302
+ issues: undefined,
2303
+ lang: undefined,
2304
+ abortEarly: undefined,
2305
+ abortPipeEarly: undefined,
2306
+ },
2307
+ ],
2308
+ lang: undefined,
2309
+ abortEarly: undefined,
2310
+ abortPipeEarly: undefined,
2311
+ },
2312
+ {
2313
+ kind: 'schema',
2314
+ type: 'union',
2315
+ input: undefined,
2316
+ expected: 'string | number | boolean',
2317
+ received: 'undefined',
2318
+ message: 'Invalid type: Expected string | number | boolean but received undefined',
2319
+ requirement: undefined,
2320
+ path: [
2321
+ {
2322
+ type: 'object',
2323
+ origin: 'value',
2324
+ input: {
2325
+ credential_format: 'mso_mdoc',
2326
+ doctype: 'org.iso.23220.photoid.1',
2327
+ namespaces: {
2328
+ 'org.iso.23220.1': {
2329
+ resident_country: 'Italy',
2330
+ resident_address: 'Via Roma 1',
2331
+ non_disclosed: 'secret',
2332
+ },
2333
+ },
2334
+ },
2335
+ key: 'namespaces',
2336
+ value: {
2337
+ 'org.iso.23220.1': {
2338
+ resident_country: 'Italy',
2339
+ resident_address: 'Via Roma 1',
2340
+ non_disclosed: 'secret',
2341
+ },
2342
+ },
2343
+ },
2344
+ {
2345
+ type: 'object',
2346
+ origin: 'value',
2347
+ input: {
2348
+ 'org.iso.23220.1': {
2349
+ resident_country: 'Italy',
2350
+ resident_address: 'Via Roma 1',
2351
+ non_disclosed: 'secret',
2352
+ },
2353
+ },
2354
+ key: 'org.iso.23220.1',
2355
+ value: {
2356
+ resident_country: 'Italy',
2357
+ resident_address: 'Via Roma 1',
2358
+ non_disclosed: 'secret',
2359
+ },
2360
+ },
2361
+ {
2362
+ type: 'object',
2363
+ origin: 'value',
2364
+ input: {
2365
+ resident_country: 'Italy',
2366
+ resident_address: 'Via Roma 1',
2367
+ non_disclosed: 'secret',
2368
+ },
2369
+ key: 'portrait',
2370
+ value: undefined,
2371
+ },
2372
+ ],
2373
+ issues: [
2374
+ {
2375
+ kind: 'schema',
2376
+ type: 'string',
2377
+ input: undefined,
2378
+ expected: 'string',
2379
+ received: 'undefined',
2380
+ message: 'Invalid type: Expected string but received undefined',
2381
+ requirement: undefined,
2382
+ path: undefined,
2383
+ issues: undefined,
2384
+ lang: undefined,
2385
+ abortEarly: undefined,
2386
+ abortPipeEarly: undefined,
2387
+ },
2388
+ {
2389
+ kind: 'schema',
2390
+ type: 'number',
2391
+ input: undefined,
2392
+ expected: 'number',
2393
+ received: 'undefined',
2394
+ message: 'Invalid type: Expected number but received undefined',
2395
+ requirement: undefined,
2396
+ path: undefined,
2397
+ issues: undefined,
2398
+ lang: undefined,
2399
+ abortEarly: undefined,
2400
+ abortPipeEarly: undefined,
2401
+ },
2402
+ {
2403
+ kind: 'schema',
2404
+ type: 'boolean',
2405
+ input: undefined,
2406
+ expected: 'boolean',
2407
+ received: 'undefined',
2408
+ message: 'Invalid type: Expected boolean but received undefined',
2409
+ requirement: undefined,
2410
+ path: undefined,
2411
+ issues: undefined,
2412
+ lang: undefined,
2413
+ abortEarly: undefined,
2414
+ abortPipeEarly: undefined,
2415
+ },
2416
+ ],
2417
+ lang: undefined,
2418
+ abortEarly: undefined,
2419
+ abortPipeEarly: undefined,
2420
+ },
2421
+ ],
2422
+ flattened: {
2423
+ nested: {
2424
+ 'namespaces.org.iso.23220.1.given_name': [
2425
+ 'Invalid type: Expected string | number | boolean but received undefined',
2426
+ ],
2427
+ 'namespaces.org.iso.23220.1.family_name': [
2428
+ 'Invalid type: Expected string | number | boolean but received undefined',
2429
+ ],
2430
+ 'namespaces.org.iso.23220.1.portrait': [
2431
+ 'Invalid type: Expected string | number | boolean but received undefined',
2432
+ ],
2433
+ },
2434
+ },
2435
+ input_credential_index: 3,
2436
+ claim_set_index: undefined,
2437
+ },
2438
+ {
2439
+ typed: false,
2440
+ success: false,
2441
+ output: {
2442
+ credential_format: 'mso_mdoc',
2443
+ doctype: 'example_doctype',
2444
+ namespaces: {},
2445
+ },
2446
+ issues: [
2447
+ {
2448
+ kind: 'schema',
2449
+ type: 'literal',
2450
+ input: 'example_doctype',
2451
+ expected: '"org.iso.23220.photoid.1"',
2452
+ received: '"example_doctype"',
2453
+ message: 'Invalid type: Expected "org.iso.23220.photoid.1" but received "example_doctype"',
2454
+ requirement: undefined,
2455
+ path: [
2456
+ {
2457
+ type: 'object',
2458
+ origin: 'value',
2459
+ input: {
2460
+ credential_format: 'mso_mdoc',
2461
+ doctype: 'example_doctype',
2462
+ namespaces: {
2463
+ example_namespaces: {
2464
+ example_claim: 'example_value',
2465
+ },
2466
+ },
2467
+ },
2468
+ key: 'doctype',
2469
+ value: 'example_doctype',
2470
+ },
2471
+ ],
2472
+ issues: undefined,
2473
+ lang: undefined,
2474
+ abortEarly: undefined,
2475
+ abortPipeEarly: undefined,
2476
+ },
2477
+ {
2478
+ kind: 'schema',
2479
+ type: 'object',
2480
+ input: undefined,
2481
+ expected: 'Object',
2482
+ received: 'undefined',
2483
+ message: 'Invalid type: Expected Object but received undefined',
2484
+ requirement: undefined,
2485
+ path: [
2486
+ {
2487
+ type: 'object',
2488
+ origin: 'value',
2489
+ input: {
2490
+ credential_format: 'mso_mdoc',
2491
+ doctype: 'example_doctype',
2492
+ namespaces: {
2493
+ example_namespaces: {
2494
+ example_claim: 'example_value',
2495
+ },
2496
+ },
2497
+ },
2498
+ key: 'namespaces',
2499
+ value: {
2500
+ example_namespaces: {
2501
+ example_claim: 'example_value',
2502
+ },
2503
+ },
2504
+ },
2505
+ {
2506
+ type: 'object',
2507
+ origin: 'value',
2508
+ input: {
2509
+ example_namespaces: {
2510
+ example_claim: 'example_value',
2511
+ },
2512
+ },
2513
+ key: 'org.iso.23220.1',
2514
+ value: undefined,
2515
+ },
2516
+ ],
2517
+ issues: undefined,
2518
+ lang: undefined,
2519
+ abortEarly: undefined,
2520
+ abortPipeEarly: undefined,
2521
+ },
2522
+ ],
2523
+ flattened: {
2524
+ nested: {
2525
+ doctype: [
2526
+ 'Invalid type: Expected "org.iso.23220.photoid.1" but received "example_doctype"',
2527
+ ],
2528
+ 'namespaces.org.iso.23220.1': [
2529
+ 'Invalid type: Expected Object but received undefined',
2530
+ ],
2531
+ },
2532
+ },
2533
+ input_credential_index: 4,
2534
+ claim_set_index: undefined,
2535
+ },
2536
+ {
2537
+ typed: false,
2538
+ success: false,
2539
+ output: {
2540
+ credential_format: 'vc+sd-jwt',
2541
+ },
2542
+ issues: [
2543
+ {
2544
+ kind: 'schema',
2545
+ type: 'literal',
2546
+ input: 'vc+sd-jwt',
2547
+ expected: '"mso_mdoc"',
2548
+ received: '"vc+sd-jwt"',
2549
+ message: 'Invalid type: Expected "mso_mdoc" but received "vc+sd-jwt"',
2550
+ requirement: undefined,
2551
+ path: [
2552
+ {
2553
+ type: 'object',
2554
+ origin: 'value',
2555
+ input: {
2556
+ credential_format: 'vc+sd-jwt',
2557
+ vct: 'https://credentials.example.com/identity_credential',
2558
+ claims: {
2559
+ first_name: 'Arthur',
2560
+ last_name: 'Dent',
2561
+ address: {
2562
+ street_address: '42 Market Street',
2563
+ locality: 'Milliways',
2564
+ postal_code: '12345',
2565
+ },
2566
+ degrees: [
2567
+ {
2568
+ type: 'Bachelor of Science',
2569
+ university: 'University of Betelgeuse',
2570
+ },
2571
+ {
2572
+ type: 'Master of Science',
2573
+ university: 'University of Betelgeuse',
2574
+ },
2575
+ ],
2576
+ nationalities: ['British', 'Betelgeusian'],
2577
+ },
2578
+ },
2579
+ key: 'credential_format',
2580
+ value: 'vc+sd-jwt',
2581
+ },
2582
+ ],
2583
+ issues: undefined,
2584
+ lang: undefined,
2585
+ abortEarly: undefined,
2586
+ abortPipeEarly: undefined,
2587
+ },
2588
+ {
2589
+ kind: 'schema',
2590
+ type: 'literal',
2591
+ input: undefined,
2592
+ expected: '"org.iso.23220.photoid.1"',
2593
+ received: 'undefined',
2594
+ message: 'Invalid type: Expected "org.iso.23220.photoid.1" but received undefined',
2595
+ requirement: undefined,
2596
+ path: [
2597
+ {
2598
+ type: 'object',
2599
+ origin: 'value',
2600
+ input: {
2601
+ credential_format: 'vc+sd-jwt',
2602
+ vct: 'https://credentials.example.com/identity_credential',
2603
+ claims: {
2604
+ first_name: 'Arthur',
2605
+ last_name: 'Dent',
2606
+ address: {
2607
+ street_address: '42 Market Street',
2608
+ locality: 'Milliways',
2609
+ postal_code: '12345',
2610
+ },
2611
+ degrees: [
2612
+ {
2613
+ type: 'Bachelor of Science',
2614
+ university: 'University of Betelgeuse',
2615
+ },
2616
+ {
2617
+ type: 'Master of Science',
2618
+ university: 'University of Betelgeuse',
2619
+ },
2620
+ ],
2621
+ nationalities: ['British', 'Betelgeusian'],
2622
+ },
2623
+ },
2624
+ key: 'doctype',
2625
+ value: undefined,
2626
+ },
2627
+ ],
2628
+ issues: undefined,
2629
+ lang: undefined,
2630
+ abortEarly: undefined,
2631
+ abortPipeEarly: undefined,
2632
+ },
2633
+ {
2634
+ kind: 'schema',
2635
+ type: 'object',
2636
+ input: undefined,
2637
+ expected: 'Object',
2638
+ received: 'undefined',
2639
+ message: 'Invalid type: Expected Object but received undefined',
2640
+ requirement: undefined,
2641
+ path: [
2642
+ {
2643
+ type: 'object',
2644
+ origin: 'value',
2645
+ input: {
2646
+ credential_format: 'vc+sd-jwt',
2647
+ vct: 'https://credentials.example.com/identity_credential',
2648
+ claims: {
2649
+ first_name: 'Arthur',
2650
+ last_name: 'Dent',
2651
+ address: {
2652
+ street_address: '42 Market Street',
2653
+ locality: 'Milliways',
2654
+ postal_code: '12345',
2655
+ },
2656
+ degrees: [
2657
+ {
2658
+ type: 'Bachelor of Science',
2659
+ university: 'University of Betelgeuse',
2660
+ },
2661
+ {
2662
+ type: 'Master of Science',
2663
+ university: 'University of Betelgeuse',
2664
+ },
2665
+ ],
2666
+ nationalities: ['British', 'Betelgeusian'],
2667
+ },
2668
+ },
2669
+ key: 'namespaces',
2670
+ value: undefined,
2671
+ },
2672
+ ],
2673
+ issues: undefined,
2674
+ lang: undefined,
2675
+ abortEarly: undefined,
2676
+ abortPipeEarly: undefined,
2677
+ },
2678
+ ],
2679
+ flattened: {
2680
+ nested: {
2681
+ credential_format: [
2682
+ 'Invalid type: Expected "mso_mdoc" but received "vc+sd-jwt"',
2683
+ ],
2684
+ doctype: [
2685
+ 'Invalid type: Expected "org.iso.23220.photoid.1" but received undefined',
2686
+ ],
2687
+ namespaces: [
2688
+ 'Invalid type: Expected Object but received undefined',
2689
+ ],
2690
+ },
2691
+ },
2692
+ input_credential_index: 5,
2693
+ claim_set_index: undefined,
2694
+ },
2695
+ ],
2696
+ ],
2697
+ },
2698
+ 'photo_card-address': {
2699
+ typed: true,
2700
+ success: true,
2701
+ output: {
2702
+ credential_format: 'mso_mdoc',
2703
+ doctype: 'org.iso.23220.photoid.1',
2704
+ namespaces: {
2705
+ 'org.iso.23220.1': {
2706
+ resident_address: 'Via Roma 1',
2707
+ resident_country: 'Italy',
2708
+ },
2709
+ },
2710
+ },
2711
+ input_credential_index: 3,
2712
+ claim_set_index: undefined,
2713
+ all: [
2714
+ [
2715
+ {
2716
+ typed: false,
2717
+ success: false,
2718
+ output: {
2719
+ credential_format: 'mso_mdoc',
2720
+ doctype: 'org.iso.18013.5.1.mDL',
2721
+ namespaces: {},
2722
+ },
2723
+ issues: [
2724
+ {
2725
+ kind: 'schema',
2726
+ type: 'literal',
2727
+ input: 'org.iso.18013.5.1.mDL',
2728
+ expected: '"org.iso.23220.photoid.1"',
2729
+ received: '"org.iso.18013.5.1.mDL"',
2730
+ message: 'Invalid type: Expected "org.iso.23220.photoid.1" but received "org.iso.18013.5.1.mDL"',
2731
+ requirement: undefined,
2732
+ path: [
2733
+ {
2734
+ type: 'object',
2735
+ origin: 'value',
2736
+ input: {
2737
+ credential_format: 'mso_mdoc',
2738
+ doctype: 'org.iso.18013.5.1.mDL',
2739
+ namespaces: {
2740
+ 'org.iso.18013.5.1': {
2741
+ given_name: 'Martin',
2742
+ family_name: 'Auer',
2743
+ portrait: 'https://example.com/portrait',
2744
+ },
2745
+ },
2746
+ },
2747
+ key: 'doctype',
2748
+ value: 'org.iso.18013.5.1.mDL',
2749
+ },
2750
+ ],
2751
+ issues: undefined,
2752
+ lang: undefined,
2753
+ abortEarly: undefined,
2754
+ abortPipeEarly: undefined,
2755
+ },
2756
+ {
2757
+ kind: 'schema',
2758
+ type: 'object',
2759
+ input: undefined,
2760
+ expected: 'Object',
2761
+ received: 'undefined',
2762
+ message: 'Invalid type: Expected Object but received undefined',
2763
+ requirement: undefined,
2764
+ path: [
2765
+ {
2766
+ type: 'object',
2767
+ origin: 'value',
2768
+ input: {
2769
+ credential_format: 'mso_mdoc',
2770
+ doctype: 'org.iso.18013.5.1.mDL',
2771
+ namespaces: {
2772
+ 'org.iso.18013.5.1': {
2773
+ given_name: 'Martin',
2774
+ family_name: 'Auer',
2775
+ portrait: 'https://example.com/portrait',
2776
+ },
2777
+ },
2778
+ },
2779
+ key: 'namespaces',
2780
+ value: {
2781
+ 'org.iso.18013.5.1': {
2782
+ given_name: 'Martin',
2783
+ family_name: 'Auer',
2784
+ portrait: 'https://example.com/portrait',
2785
+ },
2786
+ },
2787
+ },
2788
+ {
2789
+ type: 'object',
2790
+ origin: 'value',
2791
+ input: {
2792
+ 'org.iso.18013.5.1': {
2793
+ given_name: 'Martin',
2794
+ family_name: 'Auer',
2795
+ portrait: 'https://example.com/portrait',
2796
+ },
2797
+ },
2798
+ key: 'org.iso.23220.1',
2799
+ value: undefined,
2800
+ },
2801
+ ],
2802
+ issues: undefined,
2803
+ lang: undefined,
2804
+ abortEarly: undefined,
2805
+ abortPipeEarly: undefined,
2806
+ },
2807
+ ],
2808
+ flattened: {
2809
+ nested: {
2810
+ doctype: [
2811
+ 'Invalid type: Expected "org.iso.23220.photoid.1" but received "org.iso.18013.5.1.mDL"',
2812
+ ],
2813
+ 'namespaces.org.iso.23220.1': [
2814
+ 'Invalid type: Expected Object but received undefined',
2815
+ ],
2816
+ },
2817
+ },
2818
+ input_credential_index: 0,
2819
+ claim_set_index: undefined,
2820
+ },
2821
+ {
2822
+ typed: false,
2823
+ success: false,
2824
+ output: {
2825
+ credential_format: 'mso_mdoc',
2826
+ doctype: 'org.iso.18013.5.1.mDL',
2827
+ namespaces: {},
2828
+ },
2829
+ issues: [
2830
+ {
2831
+ kind: 'schema',
2832
+ type: 'literal',
2833
+ input: 'org.iso.18013.5.1.mDL',
2834
+ expected: '"org.iso.23220.photoid.1"',
2835
+ received: '"org.iso.18013.5.1.mDL"',
2836
+ message: 'Invalid type: Expected "org.iso.23220.photoid.1" but received "org.iso.18013.5.1.mDL"',
2837
+ requirement: undefined,
2838
+ path: [
2839
+ {
2840
+ type: 'object',
2841
+ origin: 'value',
2842
+ input: {
2843
+ credential_format: 'mso_mdoc',
2844
+ doctype: 'org.iso.18013.5.1.mDL',
2845
+ namespaces: {
2846
+ 'org.iso.18013.5.1': {
2847
+ resident_country: 'Italy',
2848
+ resident_address: 'Via Roma 1',
2849
+ non_disclosed: 'secret',
2850
+ },
2851
+ },
2852
+ },
2853
+ key: 'doctype',
2854
+ value: 'org.iso.18013.5.1.mDL',
2855
+ },
2856
+ ],
2857
+ issues: undefined,
2858
+ lang: undefined,
2859
+ abortEarly: undefined,
2860
+ abortPipeEarly: undefined,
2861
+ },
2862
+ {
2863
+ kind: 'schema',
2864
+ type: 'object',
2865
+ input: undefined,
2866
+ expected: 'Object',
2867
+ received: 'undefined',
2868
+ message: 'Invalid type: Expected Object but received undefined',
2869
+ requirement: undefined,
2870
+ path: [
2871
+ {
2872
+ type: 'object',
2873
+ origin: 'value',
2874
+ input: {
2875
+ credential_format: 'mso_mdoc',
2876
+ doctype: 'org.iso.18013.5.1.mDL',
2877
+ namespaces: {
2878
+ 'org.iso.18013.5.1': {
2879
+ resident_country: 'Italy',
2880
+ resident_address: 'Via Roma 1',
2881
+ non_disclosed: 'secret',
2882
+ },
2883
+ },
2884
+ },
2885
+ key: 'namespaces',
2886
+ value: {
2887
+ 'org.iso.18013.5.1': {
2888
+ resident_country: 'Italy',
2889
+ resident_address: 'Via Roma 1',
2890
+ non_disclosed: 'secret',
2891
+ },
2892
+ },
2893
+ },
2894
+ {
2895
+ type: 'object',
2896
+ origin: 'value',
2897
+ input: {
2898
+ 'org.iso.18013.5.1': {
2899
+ resident_country: 'Italy',
2900
+ resident_address: 'Via Roma 1',
2901
+ non_disclosed: 'secret',
2902
+ },
2903
+ },
2904
+ key: 'org.iso.23220.1',
2905
+ value: undefined,
2906
+ },
2907
+ ],
2908
+ issues: undefined,
2909
+ lang: undefined,
2910
+ abortEarly: undefined,
2911
+ abortPipeEarly: undefined,
2912
+ },
2913
+ ],
2914
+ flattened: {
2915
+ nested: {
2916
+ doctype: [
2917
+ 'Invalid type: Expected "org.iso.23220.photoid.1" but received "org.iso.18013.5.1.mDL"',
2918
+ ],
2919
+ 'namespaces.org.iso.23220.1': [
2920
+ 'Invalid type: Expected Object but received undefined',
2921
+ ],
2922
+ },
2923
+ },
2924
+ input_credential_index: 1,
2925
+ claim_set_index: undefined,
2926
+ },
2927
+ {
2928
+ typed: false,
2929
+ success: false,
2930
+ output: {
2931
+ credential_format: 'mso_mdoc',
2932
+ doctype: 'org.iso.23220.photoid.1',
2933
+ namespaces: {
2934
+ 'org.iso.23220.1': {},
2935
+ },
2936
+ },
2937
+ issues: [
2938
+ {
2939
+ kind: 'schema',
2940
+ type: 'union',
2941
+ input: undefined,
2942
+ expected: 'string | number | boolean',
2943
+ received: 'undefined',
2944
+ message: 'Invalid type: Expected string | number | boolean but received undefined',
2945
+ requirement: undefined,
2946
+ path: [
2947
+ {
2948
+ type: 'object',
2949
+ origin: 'value',
2950
+ input: {
2951
+ credential_format: 'mso_mdoc',
2952
+ doctype: 'org.iso.23220.photoid.1',
2953
+ namespaces: {
2954
+ 'org.iso.23220.1': {
2955
+ given_name: 'Martin',
2956
+ family_name: 'Auer',
2957
+ portrait: 'https://example.com/portrait',
2958
+ },
2959
+ },
2960
+ },
2961
+ key: 'namespaces',
2962
+ value: {
2963
+ 'org.iso.23220.1': {
2964
+ given_name: 'Martin',
2965
+ family_name: 'Auer',
2966
+ portrait: 'https://example.com/portrait',
2967
+ },
2968
+ },
2969
+ },
2970
+ {
2971
+ type: 'object',
2972
+ origin: 'value',
2973
+ input: {
2974
+ 'org.iso.23220.1': {
2975
+ given_name: 'Martin',
2976
+ family_name: 'Auer',
2977
+ portrait: 'https://example.com/portrait',
2978
+ },
2979
+ },
2980
+ key: 'org.iso.23220.1',
2981
+ value: {
2982
+ given_name: 'Martin',
2983
+ family_name: 'Auer',
2984
+ portrait: 'https://example.com/portrait',
2985
+ },
2986
+ },
2987
+ {
2988
+ type: 'object',
2989
+ origin: 'value',
2990
+ input: {
2991
+ given_name: 'Martin',
2992
+ family_name: 'Auer',
2993
+ portrait: 'https://example.com/portrait',
2994
+ },
2995
+ key: 'resident_address',
2996
+ value: undefined,
2997
+ },
2998
+ ],
2999
+ issues: [
3000
+ {
3001
+ kind: 'schema',
3002
+ type: 'string',
3003
+ input: undefined,
3004
+ expected: 'string',
3005
+ received: 'undefined',
3006
+ message: 'Invalid type: Expected string but received undefined',
3007
+ requirement: undefined,
3008
+ path: undefined,
3009
+ issues: undefined,
3010
+ lang: undefined,
3011
+ abortEarly: undefined,
3012
+ abortPipeEarly: undefined,
3013
+ },
3014
+ {
3015
+ kind: 'schema',
3016
+ type: 'number',
3017
+ input: undefined,
3018
+ expected: 'number',
3019
+ received: 'undefined',
3020
+ message: 'Invalid type: Expected number but received undefined',
3021
+ requirement: undefined,
3022
+ path: undefined,
3023
+ issues: undefined,
3024
+ lang: undefined,
3025
+ abortEarly: undefined,
3026
+ abortPipeEarly: undefined,
3027
+ },
3028
+ {
3029
+ kind: 'schema',
3030
+ type: 'boolean',
3031
+ input: undefined,
3032
+ expected: 'boolean',
3033
+ received: 'undefined',
3034
+ message: 'Invalid type: Expected boolean but received undefined',
3035
+ requirement: undefined,
3036
+ path: undefined,
3037
+ issues: undefined,
3038
+ lang: undefined,
3039
+ abortEarly: undefined,
3040
+ abortPipeEarly: undefined,
3041
+ },
3042
+ ],
3043
+ lang: undefined,
3044
+ abortEarly: undefined,
3045
+ abortPipeEarly: undefined,
3046
+ },
3047
+ {
3048
+ kind: 'schema',
3049
+ type: 'union',
3050
+ input: undefined,
3051
+ expected: 'string | number | boolean',
3052
+ received: 'undefined',
3053
+ message: 'Invalid type: Expected string | number | boolean but received undefined',
3054
+ requirement: undefined,
3055
+ path: [
3056
+ {
3057
+ type: 'object',
3058
+ origin: 'value',
3059
+ input: {
3060
+ credential_format: 'mso_mdoc',
3061
+ doctype: 'org.iso.23220.photoid.1',
3062
+ namespaces: {
3063
+ 'org.iso.23220.1': {
3064
+ given_name: 'Martin',
3065
+ family_name: 'Auer',
3066
+ portrait: 'https://example.com/portrait',
3067
+ },
3068
+ },
3069
+ },
3070
+ key: 'namespaces',
3071
+ value: {
3072
+ 'org.iso.23220.1': {
3073
+ given_name: 'Martin',
3074
+ family_name: 'Auer',
3075
+ portrait: 'https://example.com/portrait',
3076
+ },
3077
+ },
3078
+ },
3079
+ {
3080
+ type: 'object',
3081
+ origin: 'value',
3082
+ input: {
3083
+ 'org.iso.23220.1': {
3084
+ given_name: 'Martin',
3085
+ family_name: 'Auer',
3086
+ portrait: 'https://example.com/portrait',
3087
+ },
3088
+ },
3089
+ key: 'org.iso.23220.1',
3090
+ value: {
3091
+ given_name: 'Martin',
3092
+ family_name: 'Auer',
3093
+ portrait: 'https://example.com/portrait',
3094
+ },
3095
+ },
3096
+ {
3097
+ type: 'object',
3098
+ origin: 'value',
3099
+ input: {
3100
+ given_name: 'Martin',
3101
+ family_name: 'Auer',
3102
+ portrait: 'https://example.com/portrait',
3103
+ },
3104
+ key: 'resident_country',
3105
+ value: undefined,
3106
+ },
3107
+ ],
3108
+ issues: [
3109
+ {
3110
+ kind: 'schema',
3111
+ type: 'string',
3112
+ input: undefined,
3113
+ expected: 'string',
3114
+ received: 'undefined',
3115
+ message: 'Invalid type: Expected string but received undefined',
3116
+ requirement: undefined,
3117
+ path: undefined,
3118
+ issues: undefined,
3119
+ lang: undefined,
3120
+ abortEarly: undefined,
3121
+ abortPipeEarly: undefined,
3122
+ },
3123
+ {
3124
+ kind: 'schema',
3125
+ type: 'number',
3126
+ input: undefined,
3127
+ expected: 'number',
3128
+ received: 'undefined',
3129
+ message: 'Invalid type: Expected number but received undefined',
3130
+ requirement: undefined,
3131
+ path: undefined,
3132
+ issues: undefined,
3133
+ lang: undefined,
3134
+ abortEarly: undefined,
3135
+ abortPipeEarly: undefined,
3136
+ },
3137
+ {
3138
+ kind: 'schema',
3139
+ type: 'boolean',
3140
+ input: undefined,
3141
+ expected: 'boolean',
3142
+ received: 'undefined',
3143
+ message: 'Invalid type: Expected boolean but received undefined',
3144
+ requirement: undefined,
3145
+ path: undefined,
3146
+ issues: undefined,
3147
+ lang: undefined,
3148
+ abortEarly: undefined,
3149
+ abortPipeEarly: undefined,
3150
+ },
3151
+ ],
3152
+ lang: undefined,
3153
+ abortEarly: undefined,
3154
+ abortPipeEarly: undefined,
3155
+ },
3156
+ ],
3157
+ flattened: {
3158
+ nested: {
3159
+ 'namespaces.org.iso.23220.1.resident_address': [
3160
+ 'Invalid type: Expected string | number | boolean but received undefined',
3161
+ ],
3162
+ 'namespaces.org.iso.23220.1.resident_country': [
3163
+ 'Invalid type: Expected string | number | boolean but received undefined',
3164
+ ],
3165
+ },
3166
+ },
3167
+ input_credential_index: 2,
3168
+ claim_set_index: undefined,
3169
+ },
3170
+ {
3171
+ typed: true,
3172
+ success: true,
3173
+ output: {
3174
+ credential_format: 'mso_mdoc',
3175
+ doctype: 'org.iso.23220.photoid.1',
3176
+ namespaces: {
3177
+ 'org.iso.23220.1': {
3178
+ resident_address: 'Via Roma 1',
3179
+ resident_country: 'Italy',
3180
+ },
3181
+ },
3182
+ },
3183
+ issues: undefined,
3184
+ input_credential_index: 3,
3185
+ claim_set_index: undefined,
3186
+ },
3187
+ {
3188
+ typed: false,
3189
+ success: false,
3190
+ output: {
3191
+ credential_format: 'mso_mdoc',
3192
+ doctype: 'example_doctype',
3193
+ namespaces: {},
3194
+ },
3195
+ issues: [
3196
+ {
3197
+ kind: 'schema',
3198
+ type: 'literal',
3199
+ input: 'example_doctype',
3200
+ expected: '"org.iso.23220.photoid.1"',
3201
+ received: '"example_doctype"',
3202
+ message: 'Invalid type: Expected "org.iso.23220.photoid.1" but received "example_doctype"',
3203
+ requirement: undefined,
3204
+ path: [
3205
+ {
3206
+ type: 'object',
3207
+ origin: 'value',
3208
+ input: {
3209
+ credential_format: 'mso_mdoc',
3210
+ doctype: 'example_doctype',
3211
+ namespaces: {
3212
+ example_namespaces: {
3213
+ example_claim: 'example_value',
3214
+ },
3215
+ },
3216
+ },
3217
+ key: 'doctype',
3218
+ value: 'example_doctype',
3219
+ },
3220
+ ],
3221
+ issues: undefined,
3222
+ lang: undefined,
3223
+ abortEarly: undefined,
3224
+ abortPipeEarly: undefined,
3225
+ },
3226
+ {
3227
+ kind: 'schema',
3228
+ type: 'object',
3229
+ input: undefined,
3230
+ expected: 'Object',
3231
+ received: 'undefined',
3232
+ message: 'Invalid type: Expected Object but received undefined',
3233
+ requirement: undefined,
3234
+ path: [
3235
+ {
3236
+ type: 'object',
3237
+ origin: 'value',
3238
+ input: {
3239
+ credential_format: 'mso_mdoc',
3240
+ doctype: 'example_doctype',
3241
+ namespaces: {
3242
+ example_namespaces: {
3243
+ example_claim: 'example_value',
3244
+ },
3245
+ },
3246
+ },
3247
+ key: 'namespaces',
3248
+ value: {
3249
+ example_namespaces: {
3250
+ example_claim: 'example_value',
3251
+ },
3252
+ },
3253
+ },
3254
+ {
3255
+ type: 'object',
3256
+ origin: 'value',
3257
+ input: {
3258
+ example_namespaces: {
3259
+ example_claim: 'example_value',
3260
+ },
3261
+ },
3262
+ key: 'org.iso.23220.1',
3263
+ value: undefined,
3264
+ },
3265
+ ],
3266
+ issues: undefined,
3267
+ lang: undefined,
3268
+ abortEarly: undefined,
3269
+ abortPipeEarly: undefined,
3270
+ },
3271
+ ],
3272
+ flattened: {
3273
+ nested: {
3274
+ doctype: [
3275
+ 'Invalid type: Expected "org.iso.23220.photoid.1" but received "example_doctype"',
3276
+ ],
3277
+ 'namespaces.org.iso.23220.1': [
3278
+ 'Invalid type: Expected Object but received undefined',
3279
+ ],
3280
+ },
3281
+ },
3282
+ input_credential_index: 4,
3283
+ claim_set_index: undefined,
3284
+ },
3285
+ {
3286
+ typed: false,
3287
+ success: false,
3288
+ output: {
3289
+ credential_format: 'vc+sd-jwt',
3290
+ },
3291
+ issues: [
3292
+ {
3293
+ kind: 'schema',
3294
+ type: 'literal',
3295
+ input: 'vc+sd-jwt',
3296
+ expected: '"mso_mdoc"',
3297
+ received: '"vc+sd-jwt"',
3298
+ message: 'Invalid type: Expected "mso_mdoc" but received "vc+sd-jwt"',
3299
+ requirement: undefined,
3300
+ path: [
3301
+ {
3302
+ type: 'object',
3303
+ origin: 'value',
3304
+ input: {
3305
+ credential_format: 'vc+sd-jwt',
3306
+ vct: 'https://credentials.example.com/identity_credential',
3307
+ claims: {
3308
+ first_name: 'Arthur',
3309
+ last_name: 'Dent',
3310
+ address: {
3311
+ street_address: '42 Market Street',
3312
+ locality: 'Milliways',
3313
+ postal_code: '12345',
3314
+ },
3315
+ degrees: [
3316
+ {
3317
+ type: 'Bachelor of Science',
3318
+ university: 'University of Betelgeuse',
3319
+ },
3320
+ {
3321
+ type: 'Master of Science',
3322
+ university: 'University of Betelgeuse',
3323
+ },
3324
+ ],
3325
+ nationalities: ['British', 'Betelgeusian'],
3326
+ },
3327
+ },
3328
+ key: 'credential_format',
3329
+ value: 'vc+sd-jwt',
3330
+ },
3331
+ ],
3332
+ issues: undefined,
3333
+ lang: undefined,
3334
+ abortEarly: undefined,
3335
+ abortPipeEarly: undefined,
3336
+ },
3337
+ {
3338
+ kind: 'schema',
3339
+ type: 'literal',
3340
+ input: undefined,
3341
+ expected: '"org.iso.23220.photoid.1"',
3342
+ received: 'undefined',
3343
+ message: 'Invalid type: Expected "org.iso.23220.photoid.1" but received undefined',
3344
+ requirement: undefined,
3345
+ path: [
3346
+ {
3347
+ type: 'object',
3348
+ origin: 'value',
3349
+ input: {
3350
+ credential_format: 'vc+sd-jwt',
3351
+ vct: 'https://credentials.example.com/identity_credential',
3352
+ claims: {
3353
+ first_name: 'Arthur',
3354
+ last_name: 'Dent',
3355
+ address: {
3356
+ street_address: '42 Market Street',
3357
+ locality: 'Milliways',
3358
+ postal_code: '12345',
3359
+ },
3360
+ degrees: [
3361
+ {
3362
+ type: 'Bachelor of Science',
3363
+ university: 'University of Betelgeuse',
3364
+ },
3365
+ {
3366
+ type: 'Master of Science',
3367
+ university: 'University of Betelgeuse',
3368
+ },
3369
+ ],
3370
+ nationalities: ['British', 'Betelgeusian'],
3371
+ },
3372
+ },
3373
+ key: 'doctype',
3374
+ value: undefined,
3375
+ },
3376
+ ],
3377
+ issues: undefined,
3378
+ lang: undefined,
3379
+ abortEarly: undefined,
3380
+ abortPipeEarly: undefined,
3381
+ },
3382
+ {
3383
+ kind: 'schema',
3384
+ type: 'object',
3385
+ input: undefined,
3386
+ expected: 'Object',
3387
+ received: 'undefined',
3388
+ message: 'Invalid type: Expected Object but received undefined',
3389
+ requirement: undefined,
3390
+ path: [
3391
+ {
3392
+ type: 'object',
3393
+ origin: 'value',
3394
+ input: {
3395
+ credential_format: 'vc+sd-jwt',
3396
+ vct: 'https://credentials.example.com/identity_credential',
3397
+ claims: {
3398
+ first_name: 'Arthur',
3399
+ last_name: 'Dent',
3400
+ address: {
3401
+ street_address: '42 Market Street',
3402
+ locality: 'Milliways',
3403
+ postal_code: '12345',
3404
+ },
3405
+ degrees: [
3406
+ {
3407
+ type: 'Bachelor of Science',
3408
+ university: 'University of Betelgeuse',
3409
+ },
3410
+ {
3411
+ type: 'Master of Science',
3412
+ university: 'University of Betelgeuse',
3413
+ },
3414
+ ],
3415
+ nationalities: ['British', 'Betelgeusian'],
3416
+ },
3417
+ },
3418
+ key: 'namespaces',
3419
+ value: undefined,
3420
+ },
3421
+ ],
3422
+ issues: undefined,
3423
+ lang: undefined,
3424
+ abortEarly: undefined,
3425
+ abortPipeEarly: undefined,
3426
+ },
3427
+ ],
3428
+ flattened: {
3429
+ nested: {
3430
+ credential_format: [
3431
+ 'Invalid type: Expected "mso_mdoc" but received "vc+sd-jwt"',
3432
+ ],
3433
+ doctype: [
3434
+ 'Invalid type: Expected "org.iso.23220.photoid.1" but received undefined',
3435
+ ],
3436
+ namespaces: [
3437
+ 'Invalid type: Expected Object but received undefined',
3438
+ ],
3439
+ },
3440
+ },
3441
+ input_credential_index: 5,
3442
+ claim_set_index: undefined,
3443
+ },
3444
+ ],
3445
+ ],
3446
+ },
3447
+ },
3448
+ });
3449
+ const presentationQueryResult = m_dcql_presentation_result_js_1.DcqlPresentationResult.fromDcqlPresentation({
3450
+ 'mdl-id': res.credential_matches['mdl-id'].output,
3451
+ 'mdl-address': res.credential_matches['mdl-address'].output,
3452
+ 'photo_card-address': res.credential_matches['photo_card-address'].output,
3453
+ 'photo_card-id': res.credential_matches['photo_card-id'].output,
3454
+ }, { dcqlQuery: query });
3455
+ node_assert_1.default.deepStrictEqual(presentationQueryResult, {
3456
+ credentials: [
3457
+ {
3458
+ id: 'mdl-id',
3459
+ format: 'mso_mdoc',
3460
+ claims: [
3461
+ {
3462
+ id: 'given_name',
3463
+ namespace: 'org.iso.18013.5.1',
3464
+ claim_name: 'given_name',
3465
+ },
3466
+ {
3467
+ id: 'family_name',
3468
+ namespace: 'org.iso.18013.5.1',
3469
+ claim_name: 'family_name',
3470
+ },
3471
+ {
3472
+ id: 'portrait',
3473
+ namespace: 'org.iso.18013.5.1',
3474
+ claim_name: 'portrait',
3475
+ },
3476
+ ],
3477
+ meta: {
3478
+ doctype_value: 'org.iso.18013.5.1.mDL',
3479
+ },
3480
+ },
3481
+ {
3482
+ id: 'mdl-address',
3483
+ format: 'mso_mdoc',
3484
+ claims: [
3485
+ {
3486
+ id: 'resident_address',
3487
+ namespace: 'org.iso.18013.5.1',
3488
+ claim_name: 'resident_address',
3489
+ },
3490
+ {
3491
+ id: 'resident_country',
3492
+ namespace: 'org.iso.18013.5.1',
3493
+ claim_name: 'resident_country',
3494
+ },
3495
+ ],
3496
+ meta: {
3497
+ doctype_value: 'org.iso.18013.5.1.mDL',
3498
+ },
3499
+ },
3500
+ {
3501
+ id: 'photo_card-id',
3502
+ format: 'mso_mdoc',
3503
+ claims: [
3504
+ {
3505
+ id: 'given_name',
3506
+ namespace: 'org.iso.23220.1',
3507
+ claim_name: 'given_name',
3508
+ },
3509
+ {
3510
+ id: 'family_name',
3511
+ namespace: 'org.iso.23220.1',
3512
+ claim_name: 'family_name',
3513
+ },
3514
+ {
3515
+ id: 'portrait',
3516
+ namespace: 'org.iso.23220.1',
3517
+ claim_name: 'portrait',
3518
+ },
3519
+ ],
3520
+ meta: {
3521
+ doctype_value: 'org.iso.23220.photoid.1',
3522
+ },
3523
+ },
3524
+ {
3525
+ id: 'photo_card-address',
3526
+ format: 'mso_mdoc',
3527
+ claims: [
3528
+ {
3529
+ id: 'resident_address',
3530
+ namespace: 'org.iso.23220.1',
3531
+ claim_name: 'resident_address',
3532
+ },
3533
+ {
3534
+ id: 'resident_country',
3535
+ namespace: 'org.iso.23220.1',
3536
+ claim_name: 'resident_country',
3537
+ },
3538
+ ],
3539
+ meta: {
3540
+ doctype_value: 'org.iso.23220.photoid.1',
3541
+ },
3542
+ },
3543
+ ],
3544
+ credential_sets: [
3545
+ {
3546
+ options: [['mdl-id'], ['photo_card-id']],
3547
+ required: true,
3548
+ purpose: 'Identification',
3549
+ matching_options: [['mdl-id'], ['photo_card-id']],
3550
+ },
3551
+ {
3552
+ options: [['mdl-address'], ['photo_card-address']],
3553
+ required: false,
3554
+ purpose: 'Proof of address',
3555
+ matching_options: [['mdl-address'], ['photo_card-address']],
3556
+ },
3557
+ ],
3558
+ canBeSatisfied: true,
3559
+ valid_matches: {
3560
+ 'mdl-id': {
3561
+ typed: true,
3562
+ success: true,
3563
+ output: {
3564
+ credential_format: 'mso_mdoc',
3565
+ doctype: 'org.iso.18013.5.1.mDL',
3566
+ namespaces: {
3567
+ 'org.iso.18013.5.1': {
3568
+ given_name: 'Martin',
3569
+ family_name: 'Auer',
3570
+ portrait: 'https://example.com/portrait',
3571
+ },
3572
+ },
3573
+ },
3574
+ claim_set_index: undefined,
3575
+ presentation_id: 'mdl-id',
3576
+ },
3577
+ 'mdl-address': {
3578
+ typed: true,
3579
+ success: true,
3580
+ output: {
3581
+ credential_format: 'mso_mdoc',
3582
+ doctype: 'org.iso.18013.5.1.mDL',
3583
+ namespaces: {
3584
+ 'org.iso.18013.5.1': {
3585
+ resident_address: 'Via Roma 1',
3586
+ resident_country: 'Italy',
3587
+ },
3588
+ },
3589
+ },
3590
+ claim_set_index: undefined,
3591
+ presentation_id: 'mdl-address',
3592
+ },
3593
+ 'photo_card-address': {
3594
+ typed: true,
3595
+ success: true,
3596
+ output: {
3597
+ credential_format: 'mso_mdoc',
3598
+ doctype: 'org.iso.23220.photoid.1',
3599
+ namespaces: {
3600
+ 'org.iso.23220.1': {
3601
+ resident_address: 'Via Roma 1',
3602
+ resident_country: 'Italy',
3603
+ },
3604
+ },
3605
+ },
3606
+ claim_set_index: undefined,
3607
+ presentation_id: 'photo_card-address',
3608
+ },
3609
+ 'photo_card-id': {
3610
+ typed: true,
3611
+ success: true,
3612
+ output: {
3613
+ credential_format: 'mso_mdoc',
3614
+ doctype: 'org.iso.23220.photoid.1',
3615
+ namespaces: {
3616
+ 'org.iso.23220.1': {
3617
+ given_name: 'Martin',
3618
+ family_name: 'Auer',
3619
+ portrait: 'https://example.com/portrait',
3620
+ },
3621
+ },
3622
+ },
3623
+ claim_set_index: undefined,
3624
+ presentation_id: 'photo_card-id',
3625
+ },
3626
+ },
3627
+ invalid_matches: undefined,
3628
+ });
3629
+ });
3630
+ });
3631
+ //# sourceMappingURL=dcql-query-complex.test.js.map