-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcommand-types.json
More file actions
698 lines (698 loc) · 448 KB
/
command-types.json
File metadata and controls
698 lines (698 loc) · 448 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
{
"CreateCredentialDesignArgs": {
"kind": "data class",
"name": "CreateCredentialDesignArgs",
"module": "public",
"source": "@JsExportCompat\n@Serializable\ndata class CreateCredentialDesignArgs(\n val tenantId: String,\n val input: CreateCredentialDesignInput,\n)\n\n@JsExportCompat\n@Serializable\ndata class CreateCredentialDesignInput\n @JvmOverloads\n constructor(\n val bindings: List<DesignBinding>,\n val alias: String? = null,\n val hostingMode: DesignHostingMode = DesignHostingMode.LOCAL,\n val credentialTemplateId: Uuid? = null,\n val issuerDesignId: Uuid? = null,\n val displays: List<LocalizedCredentialDisplay>,\n val claims: List<ClaimPresentation> = emptyList(),\n val renderVariantIds: List<Uuid> = emptyList(),\n )\n\n@JsExportCompat\n@Serializable\ndata class DesignBinding\n @JvmOverloads\n constructor(\n val vct: String? = null,\n val credentialConfigurationId: String? = null,\n val schemaId: String? = null,\n val docType: String? = null,\n val vcType: String? = null,\n val vcContext: String? = null,\n val issuerId: String? = null,\n val issuerDid: String? = null,\n val issuerUri: String? = null,\n val verifierClientId: String? = null,\n val ocaSaid: String? = null,\n )\n\n@JsExportCompat\n@Serializable\nenum class DesignHostingMode {\n LOCAL,\n CACHED_EXTERNAL,\n INFERRED,\n}\n\n@JsExportCompat\n@Serializable\ndata class LocalizedCredentialDisplay\n @JvmOverloads\n constructor(\n val locale: String,\n val name: String,\n val description: String? = null,\n val issuerNameOverride: String? = null,\n val preferredRenderVariantIds: List<Uuid> = emptyList(),\n )\n\n@JsExportCompat\n@Serializable\ndata class ClaimPresentation\n @JvmOverloads\n constructor(\n val path: DesignClaimPath,\n val labels: List<ClaimLabel>,\n val mandatory: Boolean = false,\n val sdPolicy: SdPolicy = SdPolicy.ALLOWED,\n val order: Int = 0,\n val group: String? = null,\n val svgId: String? = null,\n val valueKind: ClaimValueKind? = null,\n val widgetHint: ClaimWidgetHint? = null,\n val markdownAllowed: Boolean = false,\n val entryCodes: List<String>? = null,\n val unit: String? = null,\n )"
},
"CredentialDesignRecord": {
"kind": "data class",
"name": "CredentialDesignRecord",
"module": "public",
"source": "@JsExportCompat\n@Serializable\ndata class CredentialDesignRecord\n @JvmOverloads\n constructor(\n val id: Uuid,\n val tenantId: String,\n val alias: String? = null,\n val hostingMode: DesignHostingMode,\n val bindings: List<DesignBinding>,\n val credentialTemplateId: Uuid? = null,\n val issuerDesignId: Uuid? = null,\n val displays: List<LocalizedCredentialDisplay>,\n val claims: List<ClaimPresentation> = emptyList(),\n val renderVariantIds: List<Uuid> = emptyList(),\n val derivedRenderHintsId: Uuid? = null,\n val sourceSnapshotIds: List<Uuid> = emptyList(),\n val contentHash: String? = null,\n /** Optional OCA semantic attribute set this design draws from. When present, the OCA-backed\n * credential-design resolution derives selective-disclosure and mandatory flags from it. */\n val semanticAttributeSetRef: SemanticAttributeSetRef? = null,\n /** Optional attribute-profile this design draws from. When present, credential-design\n * resolution derives selective-disclosure and mandatory flags from the profile's resolved\n * effective projection in preference to [semanticAttributeSetRef]. The id and pinned\n * version are held as primitives so this IDK contract stays free of the EDK profile types. */\n val attributeProfileId: Uuid? = null,\n val attributeProfileVersion: Long? = null,\n val createdAt: Instant,\n val updatedAt: Instant,\n )\n\n@JsExportCompat\n@Serializable\nenum class DesignHostingMode {\n LOCAL,\n CACHED_EXTERNAL,\n INFERRED,\n}\n\n@JsExportCompat\n@Serializable\ndata class DesignBinding\n @JvmOverloads\n constructor(\n val vct: String? = null,\n val credentialConfigurationId: String? = null,\n val schemaId: String? = null,\n val docType: String? = null,\n val vcType: String? = null,\n val vcContext: String? = null,\n val issuerId: String? = null,\n val issuerDid: String? = null,\n val issuerUri: String? = null,\n val verifierClientId: String? = null,\n val ocaSaid: String? = null,\n )\n\n@JsExportCompat\n@Serializable\ndata class LocalizedCredentialDisplay\n @JvmOverloads\n constructor(\n val locale: String,\n val name: String,\n val description: String? = null,\n val issuerNameOverride: String? = null,\n val preferredRenderVariantIds: List<Uuid> = emptyList(),\n )\n\n@JsExportCompat\n@Serializable\ndata class ClaimPresentation\n @JvmOverloads\n constructor(\n val path: DesignClaimPath,\n val labels: List<ClaimLabel>,\n val mandatory: Boolean = false,\n val sdPolicy: SdPolicy = SdPolicy.ALLOWED,\n val order: Int = 0,\n val group: String? = null,\n val svgId: String? = null,\n val valueKind: ClaimValueKind? = null,\n val widgetHint: ClaimWidgetHint? = null,\n val markdownAllowed: Boolean = false,\n val entryCodes: List<String>? = null,\n val unit: String? = null,\n )\n\n@JsExportCompat\n@Serializable\ndata class SemanticAttributeSetRef(\n /** OCA bundle / vocabulary identifier. */\n val bundleId: String,\n /** Optional pinned bundle version; null = resolve the current version. */\n val version: String? = null,\n)\n\ntypealias DesignClaimPath = List<ClaimPathSegment>\n\n@JsExportCompat\n@Serializable\ndata class ClaimLabel\n @JvmOverloads\n constructor(\n val locale: String,\n val label: String,\n val description: String? = null,\n @JsExportIgnoreCompat\n val entryValues: Map<String, String>? = null,\n )\n\n@JsExportCompat\n@Serializable\nenum class SdPolicy {\n ALWAYS,\n ALLOWED,\n NEVER,\n}\n\n@JsExportCompat\n@Serializable\nenum class ClaimValueKind {\n STRING,\n BOOLEAN,\n NUMBER,\n INTEGER,\n ARRAY,\n OBJECT,\n DATE,\n DATE_TIME,\n URI,\n IMAGE,\n BINARY,\n MARKDOWN,\n REFERENCE,\n UNKNOWN,\n}\n\n@JsExportCompat\n@Serializable\nenum class ClaimWidgetHint {\n TEXT,\n MULTILINE_TEXT,\n CHECKBOX,\n BADGE,\n LIST,\n TABLE,\n GROUP,\n DATE,\n DATE_TIME,\n URI,\n IMAGE,\n MARKDOWN,\n HIDDEN,\n PICKLIST,\n FILE,\n}"
},
"ListDesignsArgs": {
"kind": "data class",
"name": "ListDesignsArgs",
"module": "public",
"source": "@JsExportCompat\n@Serializable\ndata class ListDesignsArgs\n @JvmOverloads\n constructor(\n val tenantId: String,\n val filter: DesignFilter = DesignFilter(),\n )\n\n@JsExportCompat\n@Serializable\ndata class DesignFilter\n @JvmOverloads\n constructor(\n val entityType: DesignEntityType? = null,\n val hostingMode: DesignHostingMode? = null,\n val binding: DesignBinding? = null,\n val bindingKey: DesignBindingKey? = null,\n val bindingValue: String? = null,\n val aliasContains: String? = null,\n val sourceType: DesignSourceType? = null,\n )\n\n@JsExportCompat\n@Serializable\nenum class DesignEntityType {\n CREDENTIAL,\n ISSUER,\n VERIFIER,\n}\n\n@JsExportCompat\n@Serializable\nenum class DesignHostingMode {\n LOCAL,\n CACHED_EXTERNAL,\n INFERRED,\n}\n\n@JsExportCompat\n@Serializable\ndata class DesignBinding\n @JvmOverloads\n constructor(\n val vct: String? = null,\n val credentialConfigurationId: String? = null,\n val schemaId: String? = null,\n val docType: String? = null,\n val vcType: String? = null,\n val vcContext: String? = null,\n val issuerId: String? = null,\n val issuerDid: String? = null,\n val issuerUri: String? = null,\n val verifierClientId: String? = null,\n val ocaSaid: String? = null,\n )\n\n@JsExportCompat\n@Serializable\nenum class DesignBindingKey {\n VCT,\n CREDENTIAL_CONFIGURATION_ID,\n SCHEMA_ID,\n DOC_TYPE,\n VC_TYPE,\n VC_CONTEXT,\n ISSUER_ID,\n ISSUER_DID,\n ISSUER_URI,\n VERIFIER_CLIENT_ID,\n OCA_SAID,\n}\n\n@JsExportCompat\n@Serializable\nenum class DesignSourceType {\n LOCAL_OVERRIDE,\n LOCAL_SHARED,\n SCHEMA_INFERENCE,\n JSON_LD_CONTEXT,\n CREDENTIAL_TEMPLATE,\n PARTY_STORE,\n SD_JWT_VCT_METADATA,\n SD_JWT_ISSUER_METADATA,\n OID4VCI_CREDENTIAL_CONFIGURATION,\n OID4VCI_ISSUER_METADATA,\n OIDC_DISCOVERY,\n OPENID_FEDERATION,\n OAUTH_CLIENT_REGISTRATION,\n EIDAS_REGISTRY,\n EIDAS_CREDENTIAL_CATALOGUE,\n W3C_VC_RENDER_METHOD,\n OCA_BUNDLE,\n MANUAL_IMPORT,\n}"
},
"FindByBindingKeyArgs": {
"kind": "data class",
"name": "FindByBindingKeyArgs",
"module": "public",
"source": "@JsExportCompat\n@Serializable\ndata class FindByBindingKeyArgs(\n val tenantId: String,\n val bindingKey: DesignBindingKey,\n val bindingValue: String,\n)\n\n@JsExportCompat\n@Serializable\nenum class DesignBindingKey {\n VCT,\n CREDENTIAL_CONFIGURATION_ID,\n SCHEMA_ID,\n DOC_TYPE,\n VC_TYPE,\n VC_CONTEXT,\n ISSUER_ID,\n ISSUER_DID,\n ISSUER_URI,\n VERIFIER_CLIENT_ID,\n OCA_SAID,\n}"
},
"ImportExternalDesignArgs": {
"kind": "data class",
"name": "ImportExternalDesignArgs",
"module": "public",
"source": "@JsExportCompat\n@Serializable\ndata class ImportExternalDesignArgs(\n val tenantId: String,\n val input: ImportExternalDesignInput,\n)\n\n@JsExportCompat\n@Serializable\ndata class ImportExternalDesignInput\n @JvmOverloads\n constructor(\n val entityType: DesignEntityType,\n val bindings: List<DesignBinding>,\n val alias: String? = null,\n val sourceUrl: String,\n val sourceType: DesignSourceType,\n )\n\n@JsExportCompat\n@Serializable\nenum class DesignEntityType {\n CREDENTIAL,\n ISSUER,\n VERIFIER,\n}\n\n@JsExportCompat\n@Serializable\ndata class DesignBinding\n @JvmOverloads\n constructor(\n val vct: String? = null,\n val credentialConfigurationId: String? = null,\n val schemaId: String? = null,\n val docType: String? = null,\n val vcType: String? = null,\n val vcContext: String? = null,\n val issuerId: String? = null,\n val issuerDid: String? = null,\n val issuerUri: String? = null,\n val verifierClientId: String? = null,\n val ocaSaid: String? = null,\n )\n\n@JsExportCompat\n@Serializable\nenum class DesignSourceType {\n LOCAL_OVERRIDE,\n LOCAL_SHARED,\n SCHEMA_INFERENCE,\n JSON_LD_CONTEXT,\n CREDENTIAL_TEMPLATE,\n PARTY_STORE,\n SD_JWT_VCT_METADATA,\n SD_JWT_ISSUER_METADATA,\n OID4VCI_CREDENTIAL_CONFIGURATION,\n OID4VCI_ISSUER_METADATA,\n OIDC_DISCOVERY,\n OPENID_FEDERATION,\n OAUTH_CLIENT_REGISTRATION,\n EIDAS_REGISTRY,\n EIDAS_CREDENTIAL_CATALOGUE,\n W3C_VC_RENDER_METHOD,\n OCA_BUNDLE,\n MANUAL_IMPORT,\n}"
},
"ResolveCredentialDesignArgs": {
"kind": "data class",
"name": "ResolveCredentialDesignArgs",
"module": "public",
"source": "@JsExportCompat\n@Serializable\ndata class ResolveCredentialDesignArgs(\n val tenantId: String,\n val input: ResolveCredentialDesignInput,\n)\n\n@JsExportCompat\n@Serializable\ndata class ResolveCredentialDesignInput\n @JvmOverloads\n constructor(\n val designId: Uuid? = null,\n val binding: DesignBinding? = null,\n val bindingKey: DesignBindingKey? = null,\n val bindingValue: String? = null,\n val preferredLocales: List<String> = emptyList(),\n val renderTarget: RenderVariantKind? = null,\n val externalMetadata: ExternalDesignMetadata? = null,\n )\n\n@JsExportCompat\n@Serializable\ndata class DesignBinding\n @JvmOverloads\n constructor(\n val vct: String? = null,\n val credentialConfigurationId: String? = null,\n val schemaId: String? = null,\n val docType: String? = null,\n val vcType: String? = null,\n val vcContext: String? = null,\n val issuerId: String? = null,\n val issuerDid: String? = null,\n val issuerUri: String? = null,\n val verifierClientId: String? = null,\n val ocaSaid: String? = null,\n )\n\n@JsExportCompat\n@Serializable\nenum class DesignBindingKey {\n VCT,\n CREDENTIAL_CONFIGURATION_ID,\n SCHEMA_ID,\n DOC_TYPE,\n VC_TYPE,\n VC_CONTEXT,\n ISSUER_ID,\n ISSUER_DID,\n ISSUER_URI,\n VERIFIER_CLIENT_ID,\n OCA_SAID,\n}\n\n@JsExportCompat\n@Serializable\nenum class RenderVariantKind {\n SIMPLE_CARD,\n SVG_TEMPLATE,\n W3C_RENDER_METHOD,\n PDF_TEMPLATE,\n EXTERNAL_REFERENCE,\n}\n\n@JsExportCompat\n@Serializable\ndata class ExternalDesignMetadata\n @JvmOverloads\n constructor(\n val sdJwtVctMetadata: JsonObject? = null,\n val oid4vciCredentialConfiguration: JsonObject? = null,\n val oid4vciIssuerMetadata: JsonObject? = null,\n val sdJwtIssuerMetadata: JsonObject? = null,\n val jsonSchema: JsonObject? = null,\n val jsonLdContext: JsonObject? = null,\n val oidcDiscovery: JsonObject? = null,\n val openIdFederationEntity: JsonObject? = null,\n val oauthClientRegistration: JsonObject? = null,\n val eidasRegistryData: JsonObject? = null,\n val eidasCatalogueData: JsonObject? = null,\n val w3cRenderMethod: JsonObject? = null,\n val ocaBundle: JsonObject? = null,\n val ocaCaptureBase: JsonObject? = null,\n val ocaOverlays: List<JsonObject> = emptyList(),\n val ocaFile: String? = null,\n val overlayFiles: List<String> = emptyList(),\n )"
},
"ResolvedCredentialDesign": {
"kind": "data class",
"name": "ResolvedCredentialDesign",
"module": "public",
"source": "@JsExportCompat\n@Serializable\ndata class ResolvedCredentialDesign\n @JvmOverloads\n constructor(\n val design: CredentialDesignRecord,\n val issuerDesign: IssuerDesignRecord? = null,\n val verifierDesign: VerifierDesignRecord? = null,\n val renderVariants: List<RenderVariantRecord>,\n val derivedRenderHints: DerivedRenderHintsRecord? = null,\n val appliedLayers: List<AppliedDesignLayer>,\n @JsExportIgnoreCompat\n val lockedFields: Map<String, DesignSourceType>,\n val resolvedAt: Instant,\n val etag: String? = null,\n )\n\n@JsExportCompat\n@Serializable\ndata class CredentialDesignRecord\n @JvmOverloads\n constructor(\n val id: Uuid,\n val tenantId: String,\n val alias: String? = null,\n val hostingMode: DesignHostingMode,\n val bindings: List<DesignBinding>,\n val credentialTemplateId: Uuid? = null,\n val issuerDesignId: Uuid? = null,\n val displays: List<LocalizedCredentialDisplay>,\n val claims: List<ClaimPresentation> = emptyList(),\n val renderVariantIds: List<Uuid> = emptyList(),\n val derivedRenderHintsId: Uuid? = null,\n val sourceSnapshotIds: List<Uuid> = emptyList(),\n val contentHash: String? = null,\n /** Optional OCA semantic attribute set this design draws from. When present, the OCA-backed\n * credential-design resolution derives selective-disclosure and mandatory flags from it. */\n val semanticAttributeSetRef: SemanticAttributeSetRef? = null,\n /** Optional attribute-profile this design draws from. When present, credential-design\n * resolution derives selective-disclosure and mandatory flags from the profile's resolved\n * effective projection in preference to [semanticAttributeSetRef]. The id and pinned\n * version are held as primitives so this IDK contract stays free of the EDK profile types. */\n val attributeProfileId: Uuid? = null,\n val attributeProfileVersion: Long? = null,\n val createdAt: Instant,\n val updatedAt: Instant,\n )\n\n@JsExportCompat\n@Serializable\ndata class IssuerDesignRecord\n @JvmOverloads\n constructor(\n val id: Uuid,\n val tenantId: String,\n val alias: String? = null,\n val hostingMode: DesignHostingMode,\n val bindings: List<DesignBinding>,\n val partyId: Uuid? = null,\n val displays: List<EntityLocaleDesign>,\n val renderVariantIds: List<Uuid> = emptyList(),\n val sourceSnapshotIds: List<Uuid> = emptyList(),\n val contentHash: String? = null,\n val createdAt: Instant,\n val updatedAt: Instant,\n )\n\n@JsExportCompat\n@Serializable\ndata class VerifierDesignRecord\n @JvmOverloads\n constructor(\n val id: Uuid,\n val tenantId: String,\n val alias: String? = null,\n val hostingMode: DesignHostingMode,\n val bindings: List<DesignBinding>,\n val partyId: Uuid? = null,\n val displays: List<EntityLocaleDesign>,\n val renderVariantIds: List<Uuid> = emptyList(),\n val sourceSnapshotIds: List<Uuid> = emptyList(),\n val contentHash: String? = null,\n val createdAt: Instant,\n val updatedAt: Instant,\n )\n\n@JsExportCompat\n@Serializable\ndata class RenderVariantRecord\n @JvmOverloads\n constructor(\n val id: Uuid,\n val tenantId: String,\n val kind: RenderVariantKind,\n val alias: String? = null,\n val localeApplicability: List<String> = emptyList(),\n val sourceSnapshotId: Uuid? = null,\n val logo: AssetReference? = null,\n val backgroundImage: AssetReference? = null,\n val backgroundColor: String? = null,\n val textColor: String? = null,\n val accentColor: String? = null,\n val svgTemplate: SvgTemplate? = null,\n val w3cRenderMethod: W3cRenderMethodReference? = null,\n val pdfTemplate: AssetReference? = null,\n )\n\n@JsExportCompat\n@Serializable\ndata class DerivedRenderHintsRecord\n @JvmOverloads\n constructor(\n val id: Uuid,\n val tenantId: String,\n val sourceSnapshotIds: List<Uuid> = emptyList(),\n val fieldHints: List<FieldRenderHint>,\n @JsExportIgnoreCompat\n val groupHints: Map<String, List<DesignClaimPath>> = emptyMap(),\n val defaultOrdering: List<DesignClaimPath> = emptyList(),\n )\n\n@JsExportCompat\n@Serializable\ndata class AppliedDesignLayer\n @JvmOverloads\n constructor(\n val sourceType: DesignSourceType,\n val sourceUrl: String? = null,\n val priority: Int,\n val authoritative: Boolean = false,\n )\n\n@JsExportCompat\n@Serializable\nenum class DesignSourceType {\n LOCAL_OVERRIDE,\n LOCAL_SHARED,\n SCHEMA_INFERENCE,\n JSON_LD_CONTEXT,\n CREDENTIAL_TEMPLATE,\n PARTY_STORE,\n SD_JWT_VCT_METADATA,\n SD_JWT_ISSUER_METADATA,\n OID4VCI_CREDENTIAL_CONFIGURATION,\n OID4VCI_ISSUER_METADATA,\n OIDC_DISCOVERY,\n OPENID_FEDERATION,\n OAUTH_CLIENT_REGISTRATION,\n EIDAS_REGISTRY,\n EIDAS_CREDENTIAL_CATALOGUE,\n W3C_VC_RENDER_METHOD,\n OCA_BUNDLE,\n MANUAL_IMPORT,\n}\n\n@JsExportCompat\n@Serializable\nenum class DesignHostingMode {\n LOCAL,\n CACHED_EXTERNAL,\n INFERRED,\n}\n\n@JsExportCompat\n@Serializable\ndata class DesignBinding\n @JvmOverloads\n constructor(\n val vct: String? = null,\n val credentialConfigurationId: String? = null,\n val schemaId: String? = null,\n val docType: String? = null,\n val vcType: String? = null,\n val vcContext: String? = null,\n val issuerId: String? = null,\n val issuerDid: String? = null,\n val issuerUri: String? = null,\n val verifierClientId: String? = null,\n val ocaSaid: String? = null,\n )\n\n@JsExportCompat\n@Serializable\ndata class LocalizedCredentialDisplay\n @JvmOverloads\n constructor(\n val locale: String,\n val name: String,\n val description: String? = null,\n val issuerNameOverride: String? = null,\n val preferredRenderVariantIds: List<Uuid> = emptyList(),\n )\n\n@JsExportCompat\n@Serializable\ndata class ClaimPresentation\n @JvmOverloads\n constructor(\n val path: DesignClaimPath,\n val labels: List<ClaimLabel>,\n val mandatory: Boolean = false,\n val sdPolicy: SdPolicy = SdPolicy.ALLOWED,\n val order: Int = 0,\n val group: String? = null,\n val svgId: String? = null,\n val valueKind: ClaimValueKind? = null,\n val widgetHint: ClaimWidgetHint? = null,\n val markdownAllowed: Boolean = false,\n val entryCodes: List<String>? = null,\n val unit: String? = null,\n )\n\n@JsExportCompat\n@Serializable\ndata class SemanticAttributeSetRef(\n /** OCA bundle / vocabulary identifier. */\n val bundleId: String,\n /** Optional pinned bundle version; null = resolve the current version. */\n val version: String? = null,\n)\n\n@JsExportCompat\n@Serializable\ndata class EntityLocaleDesign\n @JvmOverloads\n constructor(\n val locale: String,\n val displayName: String? = null,\n val description: String? = null,\n )"
},
"GetCredentialDesignArgs": {
"kind": "data class",
"name": "GetCredentialDesignArgs",
"module": "public",
"source": "@JsExportCompat\n@Serializable\ndata class GetCredentialDesignArgs(\n val tenantId: String,\n val id: Uuid,\n)"
},
"UpdateCredentialDesignArgs": {
"kind": "data class",
"name": "UpdateCredentialDesignArgs",
"module": "public",
"source": "@JsExportCompat\n@Serializable\ndata class UpdateCredentialDesignArgs(\n val tenantId: String,\n val id: Uuid,\n val input: UpdateCredentialDesignInput,\n)\n\n@JsExportCompat\n@Serializable\ndata class UpdateCredentialDesignInput\n @JvmOverloads\n constructor(\n val alias: String? = null,\n val bindings: List<DesignBinding>? = null,\n val credentialTemplateId: Uuid? = null,\n val issuerDesignId: Uuid? = null,\n val displays: List<LocalizedCredentialDisplay>? = null,\n val claims: List<ClaimPresentation>? = null,\n val renderVariantIds: List<Uuid>? = null,\n val hostingMode: DesignHostingMode? = null,\n )\n\n@JsExportCompat\n@Serializable\ndata class DesignBinding\n @JvmOverloads\n constructor(\n val vct: String? = null,\n val credentialConfigurationId: String? = null,\n val schemaId: String? = null,\n val docType: String? = null,\n val vcType: String? = null,\n val vcContext: String? = null,\n val issuerId: String? = null,\n val issuerDid: String? = null,\n val issuerUri: String? = null,\n val verifierClientId: String? = null,\n val ocaSaid: String? = null,\n )\n\n@JsExportCompat\n@Serializable\ndata class LocalizedCredentialDisplay\n @JvmOverloads\n constructor(\n val locale: String,\n val name: String,\n val description: String? = null,\n val issuerNameOverride: String? = null,\n val preferredRenderVariantIds: List<Uuid> = emptyList(),\n )\n\n@JsExportCompat\n@Serializable\ndata class ClaimPresentation\n @JvmOverloads\n constructor(\n val path: DesignClaimPath,\n val labels: List<ClaimLabel>,\n val mandatory: Boolean = false,\n val sdPolicy: SdPolicy = SdPolicy.ALLOWED,\n val order: Int = 0,\n val group: String? = null,\n val svgId: String? = null,\n val valueKind: ClaimValueKind? = null,\n val widgetHint: ClaimWidgetHint? = null,\n val markdownAllowed: Boolean = false,\n val entryCodes: List<String>? = null,\n val unit: String? = null,\n )\n\n@JsExportCompat\n@Serializable\nenum class DesignHostingMode {\n LOCAL,\n CACHED_EXTERNAL,\n INFERRED,\n}"
},
"DeleteDesignArgs": {
"kind": "data class",
"name": "DeleteDesignArgs",
"module": "public",
"source": "@JsExportCompat\n@Serializable\ndata class DeleteDesignArgs(\n val tenantId: String,\n val id: Uuid,\n)"
},
"RefreshDesignArgs": {
"kind": "data class",
"name": "RefreshDesignArgs",
"module": "public",
"source": "@JsExportCompat\n@Serializable\ndata class RefreshDesignArgs(\n val tenantId: String,\n val designId: Uuid,\n)"
},
"CreateIssuerDesignArgs": {
"kind": "data class",
"name": "CreateIssuerDesignArgs",
"module": "public",
"source": "@JsExportCompat\n@Serializable\ndata class CreateIssuerDesignArgs(\n val tenantId: String,\n val input: CreateIssuerDesignInput,\n)\n\n@JsExportCompat\n@Serializable\ndata class CreateIssuerDesignInput\n @JvmOverloads\n constructor(\n val bindings: List<DesignBinding>,\n val partyId: Uuid? = null,\n val alias: String? = null,\n val hostingMode: DesignHostingMode = DesignHostingMode.LOCAL,\n val displays: List<EntityLocaleDesign>,\n val renderVariantIds: List<Uuid> = emptyList(),\n )\n\n@JsExportCompat\n@Serializable\ndata class DesignBinding\n @JvmOverloads\n constructor(\n val vct: String? = null,\n val credentialConfigurationId: String? = null,\n val schemaId: String? = null,\n val docType: String? = null,\n val vcType: String? = null,\n val vcContext: String? = null,\n val issuerId: String? = null,\n val issuerDid: String? = null,\n val issuerUri: String? = null,\n val verifierClientId: String? = null,\n val ocaSaid: String? = null,\n )\n\n@JsExportCompat\n@Serializable\nenum class DesignHostingMode {\n LOCAL,\n CACHED_EXTERNAL,\n INFERRED,\n}\n\n@JsExportCompat\n@Serializable\ndata class EntityLocaleDesign\n @JvmOverloads\n constructor(\n val locale: String,\n val displayName: String? = null,\n val description: String? = null,\n )"
},
"IssuerDesignRecord": {
"kind": "data class",
"name": "IssuerDesignRecord",
"module": "public",
"source": "@JsExportCompat\n@Serializable\ndata class IssuerDesignRecord\n @JvmOverloads\n constructor(\n val id: Uuid,\n val tenantId: String,\n val alias: String? = null,\n val hostingMode: DesignHostingMode,\n val bindings: List<DesignBinding>,\n val partyId: Uuid? = null,\n val displays: List<EntityLocaleDesign>,\n val renderVariantIds: List<Uuid> = emptyList(),\n val sourceSnapshotIds: List<Uuid> = emptyList(),\n val contentHash: String? = null,\n val createdAt: Instant,\n val updatedAt: Instant,\n )\n\n@JsExportCompat\n@Serializable\nenum class DesignHostingMode {\n LOCAL,\n CACHED_EXTERNAL,\n INFERRED,\n}\n\n@JsExportCompat\n@Serializable\ndata class DesignBinding\n @JvmOverloads\n constructor(\n val vct: String? = null,\n val credentialConfigurationId: String? = null,\n val schemaId: String? = null,\n val docType: String? = null,\n val vcType: String? = null,\n val vcContext: String? = null,\n val issuerId: String? = null,\n val issuerDid: String? = null,\n val issuerUri: String? = null,\n val verifierClientId: String? = null,\n val ocaSaid: String? = null,\n )\n\n@JsExportCompat\n@Serializable\ndata class EntityLocaleDesign\n @JvmOverloads\n constructor(\n val locale: String,\n val displayName: String? = null,\n val description: String? = null,\n )"
},
"ResolveIssuerDesignArgs": {
"kind": "data class",
"name": "ResolveIssuerDesignArgs",
"module": "public",
"source": "@JsExportCompat\n@Serializable\ndata class ResolveIssuerDesignArgs(\n val tenantId: String,\n val input: ResolveEntityDesignInput,\n)\n\n@JsExportCompat\n@Serializable\ndata class ResolveEntityDesignInput\n @JvmOverloads\n constructor(\n val designId: Uuid? = null,\n val binding: DesignBinding? = null,\n val bindingKey: DesignBindingKey? = null,\n val bindingValue: String? = null,\n val preferredLocales: List<String> = emptyList(),\n val externalMetadata: ExternalDesignMetadata? = null,\n )\n\n@JsExportCompat\n@Serializable\ndata class DesignBinding\n @JvmOverloads\n constructor(\n val vct: String? = null,\n val credentialConfigurationId: String? = null,\n val schemaId: String? = null,\n val docType: String? = null,\n val vcType: String? = null,\n val vcContext: String? = null,\n val issuerId: String? = null,\n val issuerDid: String? = null,\n val issuerUri: String? = null,\n val verifierClientId: String? = null,\n val ocaSaid: String? = null,\n )\n\n@JsExportCompat\n@Serializable\nenum class DesignBindingKey {\n VCT,\n CREDENTIAL_CONFIGURATION_ID,\n SCHEMA_ID,\n DOC_TYPE,\n VC_TYPE,\n VC_CONTEXT,\n ISSUER_ID,\n ISSUER_DID,\n ISSUER_URI,\n VERIFIER_CLIENT_ID,\n OCA_SAID,\n}\n\n@JsExportCompat\n@Serializable\ndata class ExternalDesignMetadata\n @JvmOverloads\n constructor(\n val sdJwtVctMetadata: JsonObject? = null,\n val oid4vciCredentialConfiguration: JsonObject? = null,\n val oid4vciIssuerMetadata: JsonObject? = null,\n val sdJwtIssuerMetadata: JsonObject? = null,\n val jsonSchema: JsonObject? = null,\n val jsonLdContext: JsonObject? = null,\n val oidcDiscovery: JsonObject? = null,\n val openIdFederationEntity: JsonObject? = null,\n val oauthClientRegistration: JsonObject? = null,\n val eidasRegistryData: JsonObject? = null,\n val eidasCatalogueData: JsonObject? = null,\n val w3cRenderMethod: JsonObject? = null,\n val ocaBundle: JsonObject? = null,\n val ocaCaptureBase: JsonObject? = null,\n val ocaOverlays: List<JsonObject> = emptyList(),\n val ocaFile: String? = null,\n val overlayFiles: List<String> = emptyList(),\n )"
},
"ResolvedIssuerDesign": {
"kind": "data class",
"name": "ResolvedIssuerDesign",
"module": "public",
"source": "@JsExportCompat\n@Serializable\ndata class ResolvedIssuerDesign\n @JvmOverloads\n constructor(\n val design: IssuerDesignRecord,\n val renderVariants: List<RenderVariantRecord>,\n val appliedLayers: List<AppliedDesignLayer>,\n @JsExportIgnoreCompat\n val lockedFields: Map<String, DesignSourceType>,\n val resolvedAt: Instant,\n val etag: String? = null,\n )\n\n@JsExportCompat\n@Serializable\ndata class IssuerDesignRecord\n @JvmOverloads\n constructor(\n val id: Uuid,\n val tenantId: String,\n val alias: String? = null,\n val hostingMode: DesignHostingMode,\n val bindings: List<DesignBinding>,\n val partyId: Uuid? = null,\n val displays: List<EntityLocaleDesign>,\n val renderVariantIds: List<Uuid> = emptyList(),\n val sourceSnapshotIds: List<Uuid> = emptyList(),\n val contentHash: String? = null,\n val createdAt: Instant,\n val updatedAt: Instant,\n )\n\n@JsExportCompat\n@Serializable\ndata class RenderVariantRecord\n @JvmOverloads\n constructor(\n val id: Uuid,\n val tenantId: String,\n val kind: RenderVariantKind,\n val alias: String? = null,\n val localeApplicability: List<String> = emptyList(),\n val sourceSnapshotId: Uuid? = null,\n val logo: AssetReference? = null,\n val backgroundImage: AssetReference? = null,\n val backgroundColor: String? = null,\n val textColor: String? = null,\n val accentColor: String? = null,\n val svgTemplate: SvgTemplate? = null,\n val w3cRenderMethod: W3cRenderMethodReference? = null,\n val pdfTemplate: AssetReference? = null,\n )\n\n@JsExportCompat\n@Serializable\ndata class AppliedDesignLayer\n @JvmOverloads\n constructor(\n val sourceType: DesignSourceType,\n val sourceUrl: String? = null,\n val priority: Int,\n val authoritative: Boolean = false,\n )\n\n@JsExportCompat\n@Serializable\nenum class DesignSourceType {\n LOCAL_OVERRIDE,\n LOCAL_SHARED,\n SCHEMA_INFERENCE,\n JSON_LD_CONTEXT,\n CREDENTIAL_TEMPLATE,\n PARTY_STORE,\n SD_JWT_VCT_METADATA,\n SD_JWT_ISSUER_METADATA,\n OID4VCI_CREDENTIAL_CONFIGURATION,\n OID4VCI_ISSUER_METADATA,\n OIDC_DISCOVERY,\n OPENID_FEDERATION,\n OAUTH_CLIENT_REGISTRATION,\n EIDAS_REGISTRY,\n EIDAS_CREDENTIAL_CATALOGUE,\n W3C_VC_RENDER_METHOD,\n OCA_BUNDLE,\n MANUAL_IMPORT,\n}\n\n@JsExportCompat\n@Serializable\nenum class DesignHostingMode {\n LOCAL,\n CACHED_EXTERNAL,\n INFERRED,\n}\n\n@JsExportCompat\n@Serializable\ndata class DesignBinding\n @JvmOverloads\n constructor(\n val vct: String? = null,\n val credentialConfigurationId: String? = null,\n val schemaId: String? = null,\n val docType: String? = null,\n val vcType: String? = null,\n val vcContext: String? = null,\n val issuerId: String? = null,\n val issuerDid: String? = null,\n val issuerUri: String? = null,\n val verifierClientId: String? = null,\n val ocaSaid: String? = null,\n )\n\n@JsExportCompat\n@Serializable\ndata class EntityLocaleDesign\n @JvmOverloads\n constructor(\n val locale: String,\n val displayName: String? = null,\n val description: String? = null,\n )\n\n@JsExportCompat\n@Serializable\nenum class RenderVariantKind {\n SIMPLE_CARD,\n SVG_TEMPLATE,\n W3C_RENDER_METHOD,\n PDF_TEMPLATE,\n EXTERNAL_REFERENCE,\n}\n\n@JsExportCompat\n@Serializable\ndata class AssetReference\n @JvmOverloads\n constructor(\n val uri: String,\n val integrity: String? = null,\n val altText: String? = null,\n val contentType: String? = null,\n val localBlob: BlobInfo? = null,\n )\n\n@JsExportCompat\n@Serializable\ndata class SvgTemplate\n @JvmOverloads\n constructor(\n val uri: String,\n val integrity: String? = null,\n val orientation: SvgOrientation? = null,\n val colorScheme: SvgColorScheme? = null,\n val contrast: SvgContrast? = null,\n val localBlob: BlobInfo? = null,\n )\n\n@JsExportCompat\n@Serializable\ndata class W3cRenderMethodReference\n @JvmOverloads\n constructor(\n val type: String,\n val renderSuite: String? = null,\n val uri: String,\n val mediaType: String? = null,\n val name: String? = null,\n val description: String? = null,\n val digestMultibase: String? = null,\n val renderProperties: List<String>? = null,\n )"
},
"CreateRenderVariantArgs": {
"kind": "data class",
"name": "CreateRenderVariantArgs",
"module": "public",
"source": "@JsExportCompat\n@Serializable\ndata class CreateRenderVariantArgs(\n val tenantId: String,\n val input: CreateRenderVariantInput,\n)\n\n@JsExportCompat\n@Serializable\ndata class CreateRenderVariantInput\n @JvmOverloads\n constructor(\n val kind: RenderVariantKind,\n val alias: String? = null,\n val localeApplicability: List<String> = emptyList(),\n val logo: AssetReference? = null,\n val backgroundImage: AssetReference? = null,\n val backgroundColor: String? = null,\n val textColor: String? = null,\n val accentColor: String? = null,\n val svgTemplate: SvgTemplate? = null,\n val w3cRenderMethod: W3cRenderMethodReference? = null,\n )\n\n@JsExportCompat\n@Serializable\nenum class RenderVariantKind {\n SIMPLE_CARD,\n SVG_TEMPLATE,\n W3C_RENDER_METHOD,\n PDF_TEMPLATE,\n EXTERNAL_REFERENCE,\n}\n\n@JsExportCompat\n@Serializable\ndata class AssetReference\n @JvmOverloads\n constructor(\n val uri: String,\n val integrity: String? = null,\n val altText: String? = null,\n val contentType: String? = null,\n val localBlob: BlobInfo? = null,\n )\n\n@JsExportCompat\n@Serializable\ndata class SvgTemplate\n @JvmOverloads\n constructor(\n val uri: String,\n val integrity: String? = null,\n val orientation: SvgOrientation? = null,\n val colorScheme: SvgColorScheme? = null,\n val contrast: SvgContrast? = null,\n val localBlob: BlobInfo? = null,\n )\n\n@JsExportCompat\n@Serializable\ndata class W3cRenderMethodReference\n @JvmOverloads\n constructor(\n val type: String,\n val renderSuite: String? = null,\n val uri: String,\n val mediaType: String? = null,\n val name: String? = null,\n val description: String? = null,\n val digestMultibase: String? = null,\n val renderProperties: List<String>? = null,\n )"
},
"RenderVariantRecord": {
"kind": "data class",
"name": "RenderVariantRecord",
"module": "public",
"source": "@JsExportCompat\n@Serializable\ndata class RenderVariantRecord\n @JvmOverloads\n constructor(\n val id: Uuid,\n val tenantId: String,\n val kind: RenderVariantKind,\n val alias: String? = null,\n val localeApplicability: List<String> = emptyList(),\n val sourceSnapshotId: Uuid? = null,\n val logo: AssetReference? = null,\n val backgroundImage: AssetReference? = null,\n val backgroundColor: String? = null,\n val textColor: String? = null,\n val accentColor: String? = null,\n val svgTemplate: SvgTemplate? = null,\n val w3cRenderMethod: W3cRenderMethodReference? = null,\n val pdfTemplate: AssetReference? = null,\n )\n\n@JsExportCompat\n@Serializable\nenum class RenderVariantKind {\n SIMPLE_CARD,\n SVG_TEMPLATE,\n W3C_RENDER_METHOD,\n PDF_TEMPLATE,\n EXTERNAL_REFERENCE,\n}\n\n@JsExportCompat\n@Serializable\ndata class AssetReference\n @JvmOverloads\n constructor(\n val uri: String,\n val integrity: String? = null,\n val altText: String? = null,\n val contentType: String? = null,\n val localBlob: BlobInfo? = null,\n )\n\n@JsExportCompat\n@Serializable\ndata class SvgTemplate\n @JvmOverloads\n constructor(\n val uri: String,\n val integrity: String? = null,\n val orientation: SvgOrientation? = null,\n val colorScheme: SvgColorScheme? = null,\n val contrast: SvgContrast? = null,\n val localBlob: BlobInfo? = null,\n )\n\n@JsExportCompat\n@Serializable\ndata class W3cRenderMethodReference\n @JvmOverloads\n constructor(\n val type: String,\n val renderSuite: String? = null,\n val uri: String,\n val mediaType: String? = null,\n val name: String? = null,\n val description: String? = null,\n val digestMultibase: String? = null,\n val renderProperties: List<String>? = null,\n )\n\n@Serializable\n@SerialName(\"blob-info\")\n@OptIn(ExperimentalObjCName::class)\n@ObjCName(\"BlobInfo\", exact = true)\ndata class BlobInfo(\n override val storeId: String? = null,\n override val path: String? = null,\n override val tenantId: String? = null,\n override val contentType: String? = null,\n override val metadata: Map<String, String> = emptyMap(),\n @Transient\n val opts: Map<String, String> = emptyMap(),\n) : BlobInfoType {\n override fun toBlobInfo(): BlobInfo = this\n\n /**\n * Returns a [BlobMetadata] from this info's content type and custom metadata.\n */\n fun toBlobMetadata(): BlobMetadata =\n BlobMetadata(\n contentType = contentType,\n custom = metadata,\n )\n\n /**\n * Lightweight identity for use as map keys and cache lookups.\n * Like [KeyIdentity] — deterministic equality without transient fields.\n */\n fun toIdentity(): BlobIdentity =\n BlobIdentity(\n storeId = storeId,\n path = path,\n tenantId = tenantId,\n )\n\n /** Creates a copy targeting a different path. */\n fun withPath(newPath: String): BlobInfo = copy(path = newPath)\n\n /** Creates a copy targeting a different store. */\n fun withStore(newStoreId: String): BlobInfo = copy(storeId = newStoreId)\n\n companion object {\n fun of(\n storeId: String,\n path: String,\n ) = BlobInfo(storeId = storeId, path = path)\n\n fun fromDescriptor(\n descriptor: BlobDescriptor,\n tenantId: String? = null,\n ) = BlobInfo(\n storeId = descriptor.storeId,\n path = descriptor.path,\n tenantId = tenantId,\n contentType = descriptor.contentType,\n metadata = descriptor.metadata.custom,\n )\n\n /**\n * Validates a blob path for security:\n * - Rejects path traversal segments (`..`)\n * - Rejects null bytes\n * - Rejects absolute paths\n * - Rejects backslash separators\n */\n fun validatePath(path: String) {\n require(!path.contains('\\u0000')) { \"Blob path must not contain null bytes\" }\n require(!path.startsWith('/')) { \"Blob path must not be absolute\" }\n require(!path.contains('\\\\')) { \"Blob path must use '/' separators, not '\\\\'\" }\n val segments = path.split('/')\n require(segments.none { it == \"..\" }) { \"Blob path must not contain '..' traversal segments: $path\" }\n require(segments.none { it == \".\" }) { \"Blob path must not contain '.' self-reference segments: $path\" }\n }\n\n /**\n * Sanitizes and normalizes a user-provided path. Returns a safe path string.\n * Throws [IllegalArgumentException] if the path is malicious.\n */\n fun sanitizePath(path: String): String {\n val normalized =\n path\n .replace('\\\\', '/')\n .replace(Regex(\"/+\"), \"/\")\n .trimStart('/')\n .trimEnd('/')\n require(normalized.isNotBlank()) { \"Sanitized path must not be blank\" }\n validatePath(normalized)\n return normalized\n }\n }\n}\n\n@JsExportCompat\n@Serializable\nenum class SvgOrientation { PORTRAIT, LANDSCAPE }\n\n@JsExportCompat\n@Serializable\nenum class SvgColorScheme { LIGHT, DARK }\n\n@JsExportCompat\n@Serializable\nenum class SvgContrast { NORMAL, HIGH }"
},
"ListRenderVariantsArgs": {
"kind": "data class",
"name": "ListRenderVariantsArgs",
"module": "public",
"source": "@JsExportCompat\n@Serializable\ndata class ListRenderVariantsArgs\n @JvmOverloads\n constructor(\n val tenantId: String,\n val filter: DesignFilter = DesignFilter(),\n )\n\n@JsExportCompat\n@Serializable\ndata class DesignFilter\n @JvmOverloads\n constructor(\n val entityType: DesignEntityType? = null,\n val hostingMode: DesignHostingMode? = null,\n val binding: DesignBinding? = null,\n val bindingKey: DesignBindingKey? = null,\n val bindingValue: String? = null,\n val aliasContains: String? = null,\n val sourceType: DesignSourceType? = null,\n )\n\n@JsExportCompat\n@Serializable\nenum class DesignEntityType {\n CREDENTIAL,\n ISSUER,\n VERIFIER,\n}\n\n@JsExportCompat\n@Serializable\nenum class DesignHostingMode {\n LOCAL,\n CACHED_EXTERNAL,\n INFERRED,\n}\n\n@JsExportCompat\n@Serializable\ndata class DesignBinding\n @JvmOverloads\n constructor(\n val vct: String? = null,\n val credentialConfigurationId: String? = null,\n val schemaId: String? = null,\n val docType: String? = null,\n val vcType: String? = null,\n val vcContext: String? = null,\n val issuerId: String? = null,\n val issuerDid: String? = null,\n val issuerUri: String? = null,\n val verifierClientId: String? = null,\n val ocaSaid: String? = null,\n )\n\n@JsExportCompat\n@Serializable\nenum class DesignBindingKey {\n VCT,\n CREDENTIAL_CONFIGURATION_ID,\n SCHEMA_ID,\n DOC_TYPE,\n VC_TYPE,\n VC_CONTEXT,\n ISSUER_ID,\n ISSUER_DID,\n ISSUER_URI,\n VERIFIER_CLIENT_ID,\n OCA_SAID,\n}\n\n@JsExportCompat\n@Serializable\nenum class DesignSourceType {\n LOCAL_OVERRIDE,\n LOCAL_SHARED,\n SCHEMA_INFERENCE,\n JSON_LD_CONTEXT,\n CREDENTIAL_TEMPLATE,\n PARTY_STORE,\n SD_JWT_VCT_METADATA,\n SD_JWT_ISSUER_METADATA,\n OID4VCI_CREDENTIAL_CONFIGURATION,\n OID4VCI_ISSUER_METADATA,\n OIDC_DISCOVERY,\n OPENID_FEDERATION,\n OAUTH_CLIENT_REGISTRATION,\n EIDAS_REGISTRY,\n EIDAS_CREDENTIAL_CATALOGUE,\n W3C_VC_RENDER_METHOD,\n OCA_BUNDLE,\n MANUAL_IMPORT,\n}"
},
"GetSourceSnapshotArgs": {
"kind": "data class",
"name": "GetSourceSnapshotArgs",
"module": "public",
"source": "@JsExportCompat\n@Serializable\ndata class GetSourceSnapshotArgs(\n val tenantId: String,\n val snapshotId: Uuid,\n)"
},
"SourceSnapshotRecord": {
"kind": "data class",
"name": "SourceSnapshotRecord",
"module": "public",
"source": "@JsExportCompat\n@Serializable\ndata class SourceSnapshotRecord\n @JvmOverloads\n constructor(\n val id: Uuid,\n val tenantId: String,\n val sourceType: DesignSourceType,\n val sourceUrl: String? = null,\n val etag: String? = null,\n val integrity: String? = null,\n val said: String? = null,\n val fetchedAt: Instant,\n val contentBlob: BlobInfo,\n val normalizedFromVersion: String? = null,\n )\n\n@JsExportCompat\n@Serializable\nenum class DesignSourceType {\n LOCAL_OVERRIDE,\n LOCAL_SHARED,\n SCHEMA_INFERENCE,\n JSON_LD_CONTEXT,\n CREDENTIAL_TEMPLATE,\n PARTY_STORE,\n SD_JWT_VCT_METADATA,\n SD_JWT_ISSUER_METADATA,\n OID4VCI_CREDENTIAL_CONFIGURATION,\n OID4VCI_ISSUER_METADATA,\n OIDC_DISCOVERY,\n OPENID_FEDERATION,\n OAUTH_CLIENT_REGISTRATION,\n EIDAS_REGISTRY,\n EIDAS_CREDENTIAL_CATALOGUE,\n W3C_VC_RENDER_METHOD,\n OCA_BUNDLE,\n MANUAL_IMPORT,\n}\n\n@Serializable\n@SerialName(\"blob-info\")\n@OptIn(ExperimentalObjCName::class)\n@ObjCName(\"BlobInfo\", exact = true)\ndata class BlobInfo(\n override val storeId: String? = null,\n override val path: String? = null,\n override val tenantId: String? = null,\n override val contentType: String? = null,\n override val metadata: Map<String, String> = emptyMap(),\n @Transient\n val opts: Map<String, String> = emptyMap(),\n) : BlobInfoType {\n override fun toBlobInfo(): BlobInfo = this\n\n /**\n * Returns a [BlobMetadata] from this info's content type and custom metadata.\n */\n fun toBlobMetadata(): BlobMetadata =\n BlobMetadata(\n contentType = contentType,\n custom = metadata,\n )\n\n /**\n * Lightweight identity for use as map keys and cache lookups.\n * Like [KeyIdentity] — deterministic equality without transient fields.\n */\n fun toIdentity(): BlobIdentity =\n BlobIdentity(\n storeId = storeId,\n path = path,\n tenantId = tenantId,\n )\n\n /** Creates a copy targeting a different path. */\n fun withPath(newPath: String): BlobInfo = copy(path = newPath)\n\n /** Creates a copy targeting a different store. */\n fun withStore(newStoreId: String): BlobInfo = copy(storeId = newStoreId)\n\n companion object {\n fun of(\n storeId: String,\n path: String,\n ) = BlobInfo(storeId = storeId, path = path)\n\n fun fromDescriptor(\n descriptor: BlobDescriptor,\n tenantId: String? = null,\n ) = BlobInfo(\n storeId = descriptor.storeId,\n path = descriptor.path,\n tenantId = tenantId,\n contentType = descriptor.contentType,\n metadata = descriptor.metadata.custom,\n )\n\n /**\n * Validates a blob path for security:\n * - Rejects path traversal segments (`..`)\n * - Rejects null bytes\n * - Rejects absolute paths\n * - Rejects backslash separators\n */\n fun validatePath(path: String) {\n require(!path.contains('\\u0000')) { \"Blob path must not contain null bytes\" }\n require(!path.startsWith('/')) { \"Blob path must not be absolute\" }\n require(!path.contains('\\\\')) { \"Blob path must use '/' separators, not '\\\\'\" }\n val segments = path.split('/')\n require(segments.none { it == \"..\" }) { \"Blob path must not contain '..' traversal segments: $path\" }\n require(segments.none { it == \".\" }) { \"Blob path must not contain '.' self-reference segments: $path\" }\n }\n\n /**\n * Sanitizes and normalizes a user-provided path. Returns a safe path string.\n * Throws [IllegalArgumentException] if the path is malicious.\n */\n fun sanitizePath(path: String): String {\n val normalized =\n path\n .replace('\\\\', '/')\n .replace(Regex(\"/+\"), \"/\")\n .trimStart('/')\n .trimEnd('/')\n require(normalized.isNotBlank()) { \"Sanitized path must not be blank\" }\n validatePath(normalized)\n return normalized\n }\n }\n}\n\n@Serializable\n@OptIn(ExperimentalObjCName::class)\n@ObjCName(\"BlobInfoType\", exact = true)\n@JsExportCompat\nsealed interface BlobInfoType {\n val storeId: String?\n val path: String?\n val tenantId: String?\n val contentType: String?\n\n @JsExportIgnoreCompat\n val metadata: Map<String, String>\n\n /** Extract the unresolved [BlobInfo] from any variant. */\n fun toBlobInfo(): BlobInfo\n}\n\n@Serializable\n@JsExportCompat\ndata class BlobMetadata(\n val contentType: String? = null,\n val contentEncoding: String? = null,\n val contentDisposition: String? = null,\n @JsExportIgnoreCompat\n val custom: Map<String, String> = emptyMap(),\n val contentHash: String? = null,\n val retentionHint: RetentionHint? = null,\n /** Consumer-supplied sensitivity classification hint (e.g., \"CONFIDENTIAL\"). */\n val classification: String? = null,\n /** Consumer-supplied legal basis hint (e.g., \"gdpr.art6.1a.consent\"). */\n val legalBasis: String? = null,\n /** Consumer-supplied retention-days hint; authoritative value lives on the consumer row. */\n val retentionDays: Int? = null,\n /** Consumer-supplied processing-purpose hint (GDPR Art. 5(1)(b)). */\n val processingPurpose: String? = null,\n /** Consumer-supplied jurisdiction hint (e.g., \"EU-NL\"). */\n val jurisdiction: String? = null,\n) {\n companion object {\n val EMPTY = BlobMetadata()\n\n fun ofContentType(contentType: String) = BlobMetadata(contentType = contentType)\n }\n}\n\n@Serializable\n@OptIn(ExperimentalObjCName::class)\n@ObjCName(\"BlobIdentity\", exact = true)\n@JsExportCompat\ndata class BlobIdentity(\n val storeId: String? = null,\n val path: String? = null,\n val tenantId: String? = null,\n) {\n fun hasIdentity(): Boolean = path != null\n}\n\n@Serializable\n@JsExportCompat\ndata class BlobDescriptor(\n val path: String,\n /**\n * The CONFIGURED registry id of the store this blob lives in (e.g. `\"default\"` from\n * `blob.stores.default.*`), NOT the backend scheme id ([BlobStore.schemeId], e.g. `\"memory\"`\n * or `\"filesystem\"`).\n *\n * Backend [BlobStore] implementations stamp their own scheme id here, but [BlobService]\n * normalises it to the configured id on every caller-facing descriptor before it leaves the\n * service. Callers may therefore round-trip this value straight back into [BlobInfo.storeId]\n * for a subsequent operation. Descriptors observed directly from a [BlobStore] (below the\n * service boundary) still carry the scheme id.\n */\n val storeId: String,\n val sizeBytes: Long,\n val contentType: String? = null,\n val filename: String? = null,\n val etag: String? = null,\n val createdAt: Instant? = null,\n val lastModified: Instant? = null,\n val metadata: BlobMetadata = BlobMetadata.EMPTY,\n val contentHash: String? = null,\n /** Consumer-supplied sensitivity classification hint mirrored from [BlobMetadata.classification]. */\n val classification: String? = null,\n /** Consumer-supplied legal basis hint mirrored from [BlobMetadata.legalBasis]. */\n val legalBasis: String? = null,\n /** Consumer-supplied retention-days hint mirrored from [BlobMetadata.retentionDays]. */\n val retentionDays: Int? = null,\n /** Consumer-supplied processing-purpose hint mirrored from [BlobMetadata.processingPurpose]. */\n val processingPurpose: String? = null,\n /** Consumer-supplied jurisdiction hint mirrored from [BlobMetadata.jurisdiction]. */\n val jurisdiction: String? = null,\n)"
},
"RefreshSourceSnapshotArgs": {
"kind": "data class",
"name": "RefreshSourceSnapshotArgs",
"module": "public",
"source": "@JsExportCompat\n@Serializable\ndata class RefreshSourceSnapshotArgs(\n val tenantId: String,\n val snapshotId: Uuid,\n)"
},
"UploadDesignAssetArgs": {
"kind": "data class",
"name": "UploadDesignAssetArgs",
"module": "public",
"source": "@JsExportCompat\n@Serializable\ndata class UploadDesignAssetArgs(\n val tenantId: String,\n val input: UploadDesignAssetInput,\n)\n\n@JsExportCompat\n@Serializable\ndata class UploadDesignAssetInput(\n val designId: Uuid,\n val locale: String,\n val assetType: DesignAssetType,\n val data: ByteArray,\n val contentType: String,\n) {\n override fun equals(other: Any?): Boolean {\n if (this === other) {\n return true\n }\n if (other !is UploadDesignAssetInput) {\n return false\n }\n return designId == other.designId && locale == other.locale && assetType == other.assetType &&\n data.contentEquals(other.data) && contentType == other.contentType\n }\n\n override fun hashCode(): Int {\n var result = designId.hashCode()\n result = 31 * result + locale.hashCode()\n result = 31 * result + assetType.hashCode()\n result = 31 * result + data.contentHashCode()\n result = 31 * result + contentType.hashCode()\n return result\n }\n}\n\n@JsExportCompat\n@Serializable\nenum class DesignAssetType {\n LOGO,\n BACKGROUND_IMAGE,\n SVG_TEMPLATE,\n PDF_TEMPLATE,\n}"
},
"AssetReference": {
"kind": "data class",
"name": "AssetReference",
"module": "public",
"source": "@JsExportCompat\n@Serializable\ndata class AssetReference\n @JvmOverloads\n constructor(\n val uri: String,\n val integrity: String? = null,\n val altText: String? = null,\n val contentType: String? = null,\n val localBlob: BlobInfo? = null,\n )\n\n@Serializable\n@SerialName(\"blob-info\")\n@OptIn(ExperimentalObjCName::class)\n@ObjCName(\"BlobInfo\", exact = true)\ndata class BlobInfo(\n override val storeId: String? = null,\n override val path: String? = null,\n override val tenantId: String? = null,\n override val contentType: String? = null,\n override val metadata: Map<String, String> = emptyMap(),\n @Transient\n val opts: Map<String, String> = emptyMap(),\n) : BlobInfoType {\n override fun toBlobInfo(): BlobInfo = this\n\n /**\n * Returns a [BlobMetadata] from this info's content type and custom metadata.\n */\n fun toBlobMetadata(): BlobMetadata =\n BlobMetadata(\n contentType = contentType,\n custom = metadata,\n )\n\n /**\n * Lightweight identity for use as map keys and cache lookups.\n * Like [KeyIdentity] — deterministic equality without transient fields.\n */\n fun toIdentity(): BlobIdentity =\n BlobIdentity(\n storeId = storeId,\n path = path,\n tenantId = tenantId,\n )\n\n /** Creates a copy targeting a different path. */\n fun withPath(newPath: String): BlobInfo = copy(path = newPath)\n\n /** Creates a copy targeting a different store. */\n fun withStore(newStoreId: String): BlobInfo = copy(storeId = newStoreId)\n\n companion object {\n fun of(\n storeId: String,\n path: String,\n ) = BlobInfo(storeId = storeId, path = path)\n\n fun fromDescriptor(\n descriptor: BlobDescriptor,\n tenantId: String? = null,\n ) = BlobInfo(\n storeId = descriptor.storeId,\n path = descriptor.path,\n tenantId = tenantId,\n contentType = descriptor.contentType,\n metadata = descriptor.metadata.custom,\n )\n\n /**\n * Validates a blob path for security:\n * - Rejects path traversal segments (`..`)\n * - Rejects null bytes\n * - Rejects absolute paths\n * - Rejects backslash separators\n */\n fun validatePath(path: String) {\n require(!path.contains('\\u0000')) { \"Blob path must not contain null bytes\" }\n require(!path.startsWith('/')) { \"Blob path must not be absolute\" }\n require(!path.contains('\\\\')) { \"Blob path must use '/' separators, not '\\\\'\" }\n val segments = path.split('/')\n require(segments.none { it == \"..\" }) { \"Blob path must not contain '..' traversal segments: $path\" }\n require(segments.none { it == \".\" }) { \"Blob path must not contain '.' self-reference segments: $path\" }\n }\n\n /**\n * Sanitizes and normalizes a user-provided path. Returns a safe path string.\n * Throws [IllegalArgumentException] if the path is malicious.\n */\n fun sanitizePath(path: String): String {\n val normalized =\n path\n .replace('\\\\', '/')\n .replace(Regex(\"/+\"), \"/\")\n .trimStart('/')\n .trimEnd('/')\n require(normalized.isNotBlank()) { \"Sanitized path must not be blank\" }\n validatePath(normalized)\n return normalized\n }\n }\n}\n\n@Serializable\n@OptIn(ExperimentalObjCName::class)\n@ObjCName(\"BlobInfoType\", exact = true)\n@JsExportCompat\nsealed interface BlobInfoType {\n val storeId: String?\n val path: String?\n val tenantId: String?\n val contentType: String?\n\n @JsExportIgnoreCompat\n val metadata: Map<String, String>\n\n /** Extract the unresolved [BlobInfo] from any variant. */\n fun toBlobInfo(): BlobInfo\n}\n\n@Serializable\n@JsExportCompat\ndata class BlobMetadata(\n val contentType: String? = null,\n val contentEncoding: String? = null,\n val contentDisposition: String? = null,\n @JsExportIgnoreCompat\n val custom: Map<String, String> = emptyMap(),\n val contentHash: String? = null,\n val retentionHint: RetentionHint? = null,\n /** Consumer-supplied sensitivity classification hint (e.g., \"CONFIDENTIAL\"). */\n val classification: String? = null,\n /** Consumer-supplied legal basis hint (e.g., \"gdpr.art6.1a.consent\"). */\n val legalBasis: String? = null,\n /** Consumer-supplied retention-days hint; authoritative value lives on the consumer row. */\n val retentionDays: Int? = null,\n /** Consumer-supplied processing-purpose hint (GDPR Art. 5(1)(b)). */\n val processingPurpose: String? = null,\n /** Consumer-supplied jurisdiction hint (e.g., \"EU-NL\"). */\n val jurisdiction: String? = null,\n) {\n companion object {\n val EMPTY = BlobMetadata()\n\n fun ofContentType(contentType: String) = BlobMetadata(contentType = contentType)\n }\n}\n\n@Serializable\n@OptIn(ExperimentalObjCName::class)\n@ObjCName(\"BlobIdentity\", exact = true)\n@JsExportCompat\ndata class BlobIdentity(\n val storeId: String? = null,\n val path: String? = null,\n val tenantId: String? = null,\n) {\n fun hasIdentity(): Boolean = path != null\n}\n\n@Serializable\n@JsExportCompat\ndata class BlobDescriptor(\n val path: String,\n /**\n * The CONFIGURED registry id of the store this blob lives in (e.g. `\"default\"` from\n * `blob.stores.default.*`), NOT the backend scheme id ([BlobStore.schemeId], e.g. `\"memory\"`\n * or `\"filesystem\"`).\n *\n * Backend [BlobStore] implementations stamp their own scheme id here, but [BlobService]\n * normalises it to the configured id on every caller-facing descriptor before it leaves the\n * service. Callers may therefore round-trip this value straight back into [BlobInfo.storeId]\n * for a subsequent operation. Descriptors observed directly from a [BlobStore] (below the\n * service boundary) still carry the scheme id.\n */\n val storeId: String,\n val sizeBytes: Long,\n val contentType: String? = null,\n val filename: String? = null,\n val etag: String? = null,\n val createdAt: Instant? = null,\n val lastModified: Instant? = null,\n val metadata: BlobMetadata = BlobMetadata.EMPTY,\n val contentHash: String? = null,\n /** Consumer-supplied sensitivity classification hint mirrored from [BlobMetadata.classification]. */\n val classification: String? = null,\n /** Consumer-supplied legal basis hint mirrored from [BlobMetadata.legalBasis]. */\n val legalBasis: String? = null,\n /** Consumer-supplied retention-days hint mirrored from [BlobMetadata.retentionDays]. */\n val retentionDays: Int? = null,\n /** Consumer-supplied processing-purpose hint mirrored from [BlobMetadata.processingPurpose]. */\n val processingPurpose: String? = null,\n /** Consumer-supplied jurisdiction hint mirrored from [BlobMetadata.jurisdiction]. */\n val jurisdiction: String? = null,\n)"
},
"GetDesignAssetArgs": {
"kind": "data class",
"name": "GetDesignAssetArgs",
"module": "public",
"source": "@JsExportCompat\n@Serializable\ndata class GetDesignAssetArgs(\n val tenantId: String,\n val input: GetDesignAssetInput,\n)\n\n@JsExportCompat\n@Serializable\ndata class GetDesignAssetInput(\n val designId: Uuid,\n val locale: String,\n val assetType: DesignAssetType,\n)\n\n@JsExportCompat\n@Serializable\nenum class DesignAssetType {\n LOGO,\n BACKGROUND_IMAGE,\n SVG_TEMPLATE,\n PDF_TEMPLATE,\n}"
},
"ResolvedDesignAsset": {
"kind": "data class",
"name": "ResolvedDesignAsset",
"module": "public",
"source": "@JsExportCompat\n@Serializable\ndata class ResolvedDesignAsset(\n val data: ByteArray,\n val contentType: String,\n val reference: AssetReference,\n) {\n override fun equals(other: Any?): Boolean {\n if (this === other) {\n return true\n }\n if (other !is ResolvedDesignAsset) {\n return false\n }\n return data.contentEquals(other.data) && contentType == other.contentType && reference == other.reference\n }\n\n override fun hashCode(): Int {\n var result = data.contentHashCode()\n result = 31 * result + contentType.hashCode()\n result = 31 * result + reference.hashCode()\n return result\n }\n}\n\n@JsExportCompat\n@Serializable\ndata class AssetReference\n @JvmOverloads\n constructor(\n val uri: String,\n val integrity: String? = null,\n val altText: String? = null,\n val contentType: String? = null,\n val localBlob: BlobInfo? = null,\n )\n\n@Serializable\n@SerialName(\"blob-info\")\n@OptIn(ExperimentalObjCName::class)\n@ObjCName(\"BlobInfo\", exact = true)\ndata class BlobInfo(\n override val storeId: String? = null,\n override val path: String? = null,\n override val tenantId: String? = null,\n override val contentType: String? = null,\n override val metadata: Map<String, String> = emptyMap(),\n @Transient\n val opts: Map<String, String> = emptyMap(),\n) : BlobInfoType {\n override fun toBlobInfo(): BlobInfo = this\n\n /**\n * Returns a [BlobMetadata] from this info's content type and custom metadata.\n */\n fun toBlobMetadata(): BlobMetadata =\n BlobMetadata(\n contentType = contentType,\n custom = metadata,\n )\n\n /**\n * Lightweight identity for use as map keys and cache lookups.\n * Like [KeyIdentity] — deterministic equality without transient fields.\n */\n fun toIdentity(): BlobIdentity =\n BlobIdentity(\n storeId = storeId,\n path = path,\n tenantId = tenantId,\n )\n\n /** Creates a copy targeting a different path. */\n fun withPath(newPath: String): BlobInfo = copy(path = newPath)\n\n /** Creates a copy targeting a different store. */\n fun withStore(newStoreId: String): BlobInfo = copy(storeId = newStoreId)\n\n companion object {\n fun of(\n storeId: String,\n path: String,\n ) = BlobInfo(storeId = storeId, path = path)\n\n fun fromDescriptor(\n descriptor: BlobDescriptor,\n tenantId: String? = null,\n ) = BlobInfo(\n storeId = descriptor.storeId,\n path = descriptor.path,\n tenantId = tenantId,\n contentType = descriptor.contentType,\n metadata = descriptor.metadata.custom,\n )\n\n /**\n * Validates a blob path for security:\n * - Rejects path traversal segments (`..`)\n * - Rejects null bytes\n * - Rejects absolute paths\n * - Rejects backslash separators\n */\n fun validatePath(path: String) {\n require(!path.contains('\\u0000')) { \"Blob path must not contain null bytes\" }\n require(!path.startsWith('/')) { \"Blob path must not be absolute\" }\n require(!path.contains('\\\\')) { \"Blob path must use '/' separators, not '\\\\'\" }\n val segments = path.split('/')\n require(segments.none { it == \"..\" }) { \"Blob path must not contain '..' traversal segments: $path\" }\n require(segments.none { it == \".\" }) { \"Blob path must not contain '.' self-reference segments: $path\" }\n }\n\n /**\n * Sanitizes and normalizes a user-provided path. Returns a safe path string.\n * Throws [IllegalArgumentException] if the path is malicious.\n */\n fun sanitizePath(path: String): String {\n val normalized =\n path\n .replace('\\\\', '/')\n .replace(Regex(\"/+\"), \"/\")\n .trimStart('/')\n .trimEnd('/')\n require(normalized.isNotBlank()) { \"Sanitized path must not be blank\" }\n validatePath(normalized)\n return normalized\n }\n }\n}"
},
"InitPipelineSessionArgs": {
"kind": "data class",
"name": "InitPipelineSessionArgs",
"module": "public",
"source": "@Serializable\ndata class InitPipelineSessionArgs(\n /** The pipeline this session runs. */\n val pipelineConfiguration: PipelineConfiguration,\n /** External correlation handle; the command generates one when absent. */\n val correlationId: String? = null,\n /** Attributes known at session init (invitation context, static-offer config, ...). */\n val initialAttributes: List<AttributeRecord> = emptyList(),\n /** Lookup keys known at session init — these satisfy a source's `consumedLookupKeys` directly. */\n val initialLookupKeys: List<LookupKey> = emptyList(),\n /** How the session payload is protected at rest. */\n val encryptionMode: SessionEncryptionMode = PlatformEncryptedMode,\n /** Session lifetime; the command applies a configured default when absent. */\n val ttlSeconds: Long? = null,\n)\n\n@JsExportCompat\n@Serializable\ndata class PipelineConfiguration(\n /** Stable identifier — referenced by [IssuancePipelineSession.pipelineId]. */\n val pipelineId: String,\n /** The attribute sources bound into this pipeline, each with its phases and binding config. */\n @JsExportIgnoreCompat\n val sourceBindings: List<AttributeSourceBinding> = emptyList(),\n /** The credentials this pipeline can assemble claims for. */\n @JsExportIgnoreCompat\n val claimsBindings: List<CredentialClaimsBinding> = emptyList(),\n /**\n * Lookup keys the caller is expected to provide at session init (from invitation context,\n * static-offer config, or the init call). A source may consume one of these without any\n * other source producing it.\n */\n @JsExportIgnoreCompat\n val expectedInitialLookupKeys: Set<String> = emptySet(),\n)\n\n@JsExportCompat\n@Serializable\ndata class AttributeRecord(\n /** Where this attribute lives in the bag. */\n val path: AttributePath,\n /** The typed value. */\n val value: AttributeValue,\n /** Which source produced this record (opaque producer id — an IDV node, a pipeline source, ...). */\n val sourceId: AttributeProvenanceRef,\n /** Source-specific detail (e.g. IDV node id, OIDC issuer, HR-API endpoint). */\n val sourceDetail: String? = null,\n /** The phase during which this record was contributed. */\n val phase: PipelinePhase,\n /** When this record was contributed. */\n val timestamp: Instant,\n /** Assurance level (from IDV evidence, OIDC `acr`, ...). */\n val assurance: EidasAssuranceLevel? = null,\n /** Conflict-resolution priority — higher wins; ties broken by [timestamp]. */\n val priority: Int = 0,\n /** Retention policy for this specific attribute. */\n val retention: AttributeRetentionPolicy = SessionRetention(),\n /** Whether this attribute has been verified by an IDV process. */\n val verified: Boolean = false,\n) {\n /**\n * The value as a [JsonElement] when it is plain data, else `null`. Blob / key / evidence\n * values are references and have no direct JSON form here — a downstream assembler handles\n * those explicitly.\n */\n val jsonValue: JsonElement?\n get() = (value as? AttributeData)?.value\n}\n\n@JsExportCompat\n@Serializable\ndata class LookupKey(\n /** Unique name within the session — e.g. `email`, `employee_id`. */\n val name: String,\n /** The key value. PII — encrypted at rest. */\n val value: String,\n /** Optional well-known classification of the key. */\n val type: LookupKeyType? = null,\n /**\n * PROVENANCE only: the single source that PRODUCED this lookup key — one producer, one\n * phase, one timestamp. This is *not* the source(s) that consume it (consumption is 1→N and\n * declared on the consuming source's `consumedLookupKeys`).\n */\n val producedBy: AttributeProvenanceRef,\n /** Source-specific detail (e.g. IDV node id, HR-API endpoint). */\n val sourceDetail: String? = null,\n /** The phase during which this key was contributed. */\n val phase: PipelinePhase,\n /** When this key was contributed. */\n val timestamp: Instant,\n /**\n * If non-null, the lookup key is ALSO emitted as an attribute at this path before credential\n * assembly, so claim mapping can pick it up. Leave null when the key is purely operational\n * (a business key) and should not appear in the credential.\n */\n val promotedToAttributePath: AttributePath? = null,\n /** Free-form metadata; e.g. verification status, source TTL. */\n val metadata: Map<String, String> = emptyMap(),\n)\n\n@JsExportCompat\n@Serializable\nsealed interface SessionEncryptionMode\n\n/** No encryption — the payload is stored as plaintext. For local development / non-PII flows only. */\n@Serializable\n@SerialName(\"plaintext\")\n\n@Serializable\n@SerialName(\"platform-encrypted\")\ndata object PlatformEncryptedMode : SessionEncryptionMode\n\n/**\n * Tier 2: the effective encryption key is additionally bound to the session's `correlationId`\n * via HKDF, so decryption requires re-presenting the `correlationId`. The platform alone cannot\n * read the payload.\n *\n * @property fallbackToPlatform when true, a session whose `correlationId` cannot be re-presented\n * degrades to [PlatformEncryptedMode] semantics rather than being unreadable.\n */\n@Serializable\n@SerialName(\"client-bound\")\n\n @Serializable\n @SerialName(\"session\")\n data class Session(\n /** `null` -> use the domain default ([SessionRetention.encryptionRequired] = `true`). */\n val encryptionRequired: Boolean? = null,\n ) : RetentionDto() {\n override val kind: String = \"session\"\n }\n\n@JsExportCompat\n@Serializable\ndata class IssuancePipelineSession(\n /** Stable primary identifier. */\n val sessionId: String,\n /** The pipeline this session runs — carried on the session so a phase can be run without a separate registry lookup. */\n val pipelineConfiguration: PipelineConfiguration,\n /** The tenant this session belongs to. */\n val tenantId: String,\n /**\n * Which VDX issuer instance this session belongs to. Reserved for the multi-issuer-per-tenant\n * work; null for single-issuer deployments.\n */\n val issuerPartyId: String? = null,\n /** Lifecycle status. */\n val status: IssuancePipelineStatus,\n /** External correlation handle — the join key to the issuer-core session and all ingress paths. */\n val correlationId: String,\n /** Attributes accumulated across every phase run so far. Encrypted at rest per [encryptionMode]. */\n val bag: AttributeBag = AttributeBag.empty(),\n /** Lookup keys accumulated so far. Encrypted at rest per [encryptionMode]. */\n val lookupKeys: LookupKeySet = LookupKeySet.empty(),\n /** Phases that have completed for this session. */\n @JsExportIgnoreCompat\n val completedPhases: Set<PipelinePhase> = emptySet(),\n /** The phase currently executing, if any. */\n val currentPhase: PipelinePhase? = null,\n /** Protocol-specific context the front-end adapter carries through phases (e.g. `issuer_state`). */\n @JsExportIgnoreCompat\n val protocolContext: Map<String, JsonElement> = emptyMap(),\n /** Per-binding deferral state, keyed by `bindingId`. Operational metadata; stored plaintext. */\n @JsExportIgnoreCompat\n val deferralEntries: Map<String, DeferralEntry> = emptyMap(),\n /** Approval-gate state, present when a bound credential requires approval. Encrypted at rest. */\n val approval: ApprovalState? = null,\n /** How [bag] / [lookupKeys] / [approval] are protected at rest. */\n val encryptionMode: SessionEncryptionMode = PlatformEncryptedMode,\n val createdAt: Instant,\n val updatedAt: Instant,\n val expiresAt: Instant,\n) {\n /** The id of the [pipelineConfiguration] this session runs. */\n val pipelineId: String get() = pipelineConfiguration.pipelineId\n}\n\n@JsExportCompat\n@Serializable\ndata class AttributeSourceBinding(\n /** Which source this binds — matches [AttributeSource.sourceId]. */\n val sourceId: AttributeProvenanceRef,\n /** The phases this source runs in for this pipeline. */\n @JsExportIgnoreCompat\n val phases: Set<PipelinePhase>,\n /** When true, a missing required lookup key or a source failure fails the phase. */\n val required: Boolean = true,\n /**\n * How long `/credential` (or `/deferred_credential`) holds the request open waiting for this\n * source's async callback before falling back to a deferred response. `ZERO` = defer\n * immediately. Hard-capped at config-load time.\n */\n val syncWaitWindow: Duration = Duration.ZERO,\n /** Optional source-native field → semantic attribute mapping. */\n @JsExportIgnoreCompat\n val attributeMapping: List<AttributeMapping> = emptyList(),\n /** Whether this source replies synchronously or via async callback. */\n val callbackStyle: CallbackStyle = CallbackStyle.SYNCHRONOUS,\n)\n\n@JsExportCompat\n@Serializable\ndata class CredentialClaimsBinding(\n /** Matches the credential's `credential_configuration_id`. */\n val id: String,\n /**\n * The semantic attribute set (OCA bundle / vocabulary subset) this credential draws from.\n * The credential-design service resolves SD policy + mandatory claims from it.\n */\n val semanticAttributeSetRef: SemanticAttributeSetRef,\n /**\n * Optional mapping FROM semantic-model attribute names TO the credential's claim structure\n * (renaming / restructuring per vct / doctype). Null when names map 1:1. NOT where selective\n * disclosure is decided.\n */\n val claimMappingConfigId: String? = null,\n /** Inline alternative to [claimMappingConfigId]. */\n val inlineClaimMappingConfig: ClaimMappingConfiguration? = null,\n /** Which of the pipeline's sources this credential consumes, per phase. */\n @JsExportIgnoreCompat\n val consumedSources: Map<PipelinePhase, List<AttributeProvenanceRef>> = emptyMap(),\n /** Per-credential deferral policy. */\n val deferralPolicy: DeferralPolicy = DeferralPolicy.disabled(),\n)\n\n@JsExportCompat\n@Serializable(with = AttributePathSerializer::class)\ndata class AttributePath(\n val value: String,\n)\n\n@JsExportCompat\n@Serializable\nsealed interface AttributeValue\n\n/**\n * A plain data value (string, number, boolean, object, array). Becomes a credential \"claim\"\n * only once a downstream assembler maps it into a credential.\n */\n@Serializable\n@SerialName(\"data\")\n\n@JsExportCompat\n@Serializable(with = AttributeProvenanceRefSerializer::class)\ndata class AttributeProvenanceRef(\n val value: String,\n)\n\n sealed class Source {\n /**\n * Load keystore data from a file path.\n * @param path the filesystem path to the keystore file\n */\n data class File(\n val path: String,\n val autoCreate: Boolean = true,\n ) : Source()\n\n /**\n * Load keystore data from an in-memory byte array.\n * @param data the raw keystore bytes\n */\n data class Bytes(\n var data: ByteArray,\n ) : Source() {\n override fun equals(other: Any?): Boolean {\n if (this === other) {\n return true\n }\n if (other == null || this::class != other::class) {\n return false\n }\n\n other as Bytes\n\n if (!data.contentEquals(other.data)) {\n return false\n }\n\n return true\n }\n\n override fun hashCode(): Int = data.contentHashCode()\n }\n\n /**\n * Load keystore data from a ByteReadChannel.\n * @param channel the [ByteChannel] supplying the keystore bytes\n */\n data class Channel(\n val channel: ByteChannel,\n ) : Source()\n }"
},
"InitPipelineSessionResult": {
"kind": "data class",
"name": "InitPipelineSessionResult",
"module": "public",
"source": "@Serializable\ndata class InitPipelineSessionResult(\n val sessionId: String,\n /** The correlation handle — generated when the caller did not supply one. */\n val correlationId: String,\n)"
},
"ContributeAttributesArgs": {
"kind": "data class",
"name": "ContributeAttributesArgs",
"module": "public",
"source": "@Serializable\ndata class ContributeAttributesArgs(\n /** The session to contribute to. */\n val correlationId: String,\n /** The phase to run. */\n val phase: PipelinePhase,\n /** Attributes pushed in as input for this phase (from a backend push, a callback, ...). */\n val attributes: List<AttributeRecord> = emptyList(),\n /** Lookup keys pushed in as input for this phase. */\n val lookupKeys: List<LookupKey> = emptyList(),\n)\n\n@JsExportCompat\n@Serializable\ndata class PipelinePhase(\n val value: String,\n) {\n companion object {\n /** Session / offer creation — initial attributes injected by the caller. */\n val SESSION_INIT = PipelinePhase(\"session_init\")\n\n /**\n * Generic, channel-neutral attribute resolution — the phase a non-credential caller (a form,\n * portal page, PDF/API render, or a standalone semantic-enrichment lookup) uses to resolve\n * attributes from bound sources without any issuance flow. Lets the pipeline drive every\n * channel, not only credential issuance.\n */\n val RESOLUTION = PipelinePhase(\"resolution\")\n\n /** Identity verification completed — IDV results are available. */\n val IDV_COMPLETED = PipelinePhase(\"idv_completed\")\n\n /** Credential assembly — final enrichment before credential construction. */\n val CREDENTIAL_ASSEMBLY = PipelinePhase(\"credential_assembly\")\n\n /** Post-issuance — audit, cleanup, retention enforcement. */\n val POST_ISSUANCE = PipelinePhase(\"post_issuance\")\n }\n}\n\n@JsExportCompat\n@Serializable\ndata class AttributeRecord(\n /** Where this attribute lives in the bag. */\n val path: AttributePath,\n /** The typed value. */\n val value: AttributeValue,\n /** Which source produced this record (opaque producer id — an IDV node, a pipeline source, ...). */\n val sourceId: AttributeProvenanceRef,\n /** Source-specific detail (e.g. IDV node id, OIDC issuer, HR-API endpoint). */\n val sourceDetail: String? = null,\n /** The phase during which this record was contributed. */\n val phase: PipelinePhase,\n /** When this record was contributed. */\n val timestamp: Instant,\n /** Assurance level (from IDV evidence, OIDC `acr`, ...). */\n val assurance: EidasAssuranceLevel? = null,\n /** Conflict-resolution priority — higher wins; ties broken by [timestamp]. */\n val priority: Int = 0,\n /** Retention policy for this specific attribute. */\n val retention: AttributeRetentionPolicy = SessionRetention(),\n /** Whether this attribute has been verified by an IDV process. */\n val verified: Boolean = false,\n) {\n /**\n * The value as a [JsonElement] when it is plain data, else `null`. Blob / key / evidence\n * values are references and have no direct JSON form here — a downstream assembler handles\n * those explicitly.\n */\n val jsonValue: JsonElement?\n get() = (value as? AttributeData)?.value\n}\n\n@JsExportCompat\n@Serializable\ndata class LookupKey(\n /** Unique name within the session — e.g. `email`, `employee_id`. */\n val name: String,\n /** The key value. PII — encrypted at rest. */\n val value: String,\n /** Optional well-known classification of the key. */\n val type: LookupKeyType? = null,\n /**\n * PROVENANCE only: the single source that PRODUCED this lookup key — one producer, one\n * phase, one timestamp. This is *not* the source(s) that consume it (consumption is 1→N and\n * declared on the consuming source's `consumedLookupKeys`).\n */\n val producedBy: AttributeProvenanceRef,\n /** Source-specific detail (e.g. IDV node id, HR-API endpoint). */\n val sourceDetail: String? = null,\n /** The phase during which this key was contributed. */\n val phase: PipelinePhase,\n /** When this key was contributed. */\n val timestamp: Instant,\n /**\n * If non-null, the lookup key is ALSO emitted as an attribute at this path before credential\n * assembly, so claim mapping can pick it up. Leave null when the key is purely operational\n * (a business key) and should not appear in the credential.\n */\n val promotedToAttributePath: AttributePath? = null,\n /** Free-form metadata; e.g. verification status, source TTL. */\n val metadata: Map<String, String> = emptyMap(),\n)\n\n @Serializable\n @SerialName(\"session\")\n data class Session(\n /** `null` -> use the domain default ([SessionRetention.encryptionRequired] = `true`). */\n val encryptionRequired: Boolean? = null,\n ) : RetentionDto() {\n override val kind: String = \"session\"\n }\n\n data class Generic(\n val exception: Throwable? = null,\n override val message: String = \"Consent error\",\n ) : ConsentError\n\n@JsExportCompat\n@Serializable\ndata class Identity\n @JvmOverloads\n constructor(\n /** Party ID - serves as the primary key */\n @SerialName(\"partyId\")\n val partyId: Uuid,\n /** Tenant this identity belongs to */\n @SerialName(\"tenantId\")\n val tenantId: String,\n /** The role of this identity in the credential ecosystem */\n @SerialName(\"identityRole\")\n val identityRole: IdentityRole,\n /** Whether this is the default identity for the owning party */\n @SerialName(\"isDefault\")\n val isDefault: Boolean = false,\n /** Opaque per-identity salt handle (reference only; no crypto in this layer) */\n @SerialName(\"saltRef\")\n val saltRef: String? = null,\n /** When the identity was created */\n @SerialName(\"createdAt\")\n val createdAt: Instant,\n /** Who created the identity (party ID) */\n @SerialName(\"createdById\")\n val createdById: Uuid? = null,\n /** When the identity was last updated */\n @SerialName(\"updatedAt\")\n val updatedAt: Instant,\n /** Who last updated the identity (party ID) */\n @SerialName(\"updatedById\")\n val updatedById: Uuid? = null,\n /** When the identity was soft-deleted (null if not deleted) */\n @SerialName(\"deletedAt\")\n val deletedAt: Instant? = null,\n /** Who deleted the identity (party ID) */\n @SerialName(\"deletedById\")\n val deletedById: Uuid? = null,\n )\n\n data class Post(\n val credentials: ClientCredentials,\n ) : ClientAuthenticationConfig\n\n@JsExportCompat\n@Serializable(with = AttributePathSerializer::class)\ndata class AttributePath(\n val value: String,\n)\n\n@JsExportCompat\n@Serializable\nsealed interface AttributeValue\n\n/**\n * A plain data value (string, number, boolean, object, array). Becomes a credential \"claim\"\n * only once a downstream assembler maps it into a credential.\n */\n@Serializable\n@SerialName(\"data\")\n\n@JsExportCompat\n@Serializable(with = AttributeProvenanceRefSerializer::class)\ndata class AttributeProvenanceRef(\n val value: String,\n)\n\n sealed class Source {\n /**\n * Load keystore data from a file path.\n * @param path the filesystem path to the keystore file\n */\n data class File(\n val path: String,\n val autoCreate: Boolean = true,\n ) : Source()\n\n /**\n * Load keystore data from an in-memory byte array.\n * @param data the raw keystore bytes\n */\n data class Bytes(\n var data: ByteArray,\n ) : Source() {\n override fun equals(other: Any?): Boolean {\n if (this === other) {\n return true\n }\n if (other == null || this::class != other::class) {\n return false\n }\n\n other as Bytes\n\n if (!data.contentEquals(other.data)) {\n return false\n }\n\n return true\n }\n\n override fun hashCode(): Int = data.contentHashCode()\n }\n\n /**\n * Load keystore data from a ByteReadChannel.\n * @param channel the [ByteChannel] supplying the keystore bytes\n */\n data class Channel(\n val channel: ByteChannel,\n ) : Source()\n }\n\n@JsExportCompat\n@Serializable\nenum class EidasAssuranceLevel(\n val serializedValue: String,\n) {\n @SerialName(\"low\")\n LOW(\"low\"),\n\n @SerialName(\"substantial\")\n SUBSTANTIAL(\"substantial\"),\n\n @SerialName(\"high\")\n HIGH(\"high\"),\n}\n\n@JsExportCompat\n@Serializable\nsealed interface AttributeRetentionPolicy\n\n/** In-memory only. Never serialized to persistent storage. */\n@Serializable\n@SerialName(\"ephemeral\")"
},
"ContributeAttributesResult": {
"kind": "data class",
"name": "ContributeAttributesResult",
"module": "public",
"source": "@Serializable\ndata class ContributeAttributesResult(\n val sessionId: String,\n /** The session status after the phase ran. */\n val status: IssuancePipelineStatus,\n /** Phases completed for the session, including this one. */\n val completedPhases: Set<PipelinePhase>,\n)\n\n@JsExportCompat\nenum class IssuancePipelineStatus {\n /** Session created; no phase has run yet. */\n CREATED,\n\n /** A phase's sources are currently executing. */\n PHASE_EXECUTING,\n\n /** A phase finished; the session is between phases. */\n PHASE_COMPLETED,\n\n /** `/credential` returned 202; waiting for deferred attribute ingress. */\n AWAITING_DEFERRED,\n\n /** Required attributes are complete but an approver has not yet decided. */\n AWAITING_APPROVAL,\n\n /** All bindings complete and approved (if required); claims can be assembled. */\n READY,\n\n /** Issuance finished for every bound credential. */\n COMPLETED,\n\n /** The session failed terminally. */\n FAILED,\n\n /** The session passed its `expiresAt` without completing. */\n EXPIRED,\n}\n\n@JsExportCompat\n@Serializable\ndata class PipelinePhase(\n val value: String,\n) {\n companion object {\n /** Session / offer creation — initial attributes injected by the caller. */\n val SESSION_INIT = PipelinePhase(\"session_init\")\n\n /**\n * Generic, channel-neutral attribute resolution — the phase a non-credential caller (a form,\n * portal page, PDF/API render, or a standalone semantic-enrichment lookup) uses to resolve\n * attributes from bound sources without any issuance flow. Lets the pipeline drive every\n * channel, not only credential issuance.\n */\n val RESOLUTION = PipelinePhase(\"resolution\")\n\n /** Identity verification completed — IDV results are available. */\n val IDV_COMPLETED = PipelinePhase(\"idv_completed\")\n\n /** Credential assembly — final enrichment before credential construction. */\n val CREDENTIAL_ASSEMBLY = PipelinePhase(\"credential_assembly\")\n\n /** Post-issuance — audit, cleanup, retention enforcement. */\n val POST_ISSUANCE = PipelinePhase(\"post_issuance\")\n }\n}\n\n @Serializable\n @SerialName(\"session\")\n data class Session(\n /** `null` -> use the domain default ([SessionRetention.encryptionRequired] = `true`). */\n val encryptionRequired: Boolean? = null,\n ) : RetentionDto() {\n override val kind: String = \"session\"\n }\n\n @Serializable\r\n @SerialName(\"Required\")\r\n data class Required(\r\n val message: String? = null,\r\n ) : FieldValidationRule\n\n data class Generic(\n val exception: Throwable? = null,\n override val message: String = \"Consent error\",\n ) : ConsentError\n\n@JsExportCompat\n@Serializable\ndata class Identity\n @JvmOverloads\n constructor(\n /** Party ID - serves as the primary key */\n @SerialName(\"partyId\")\n val partyId: Uuid,\n /** Tenant this identity belongs to */\n @SerialName(\"tenantId\")\n val tenantId: String,\n /** The role of this identity in the credential ecosystem */\n @SerialName(\"identityRole\")\n val identityRole: IdentityRole,\n /** Whether this is the default identity for the owning party */\n @SerialName(\"isDefault\")\n val isDefault: Boolean = false,\n /** Opaque per-identity salt handle (reference only; no crypto in this layer) */\n @SerialName(\"saltRef\")\n val saltRef: String? = null,\n /** When the identity was created */\n @SerialName(\"createdAt\")\n val createdAt: Instant,\n /** Who created the identity (party ID) */\n @SerialName(\"createdById\")\n val createdById: Uuid? = null,\n /** When the identity was last updated */\n @SerialName(\"updatedAt\")\n val updatedAt: Instant,\n /** Who last updated the identity (party ID) */\n @SerialName(\"updatedById\")\n val updatedById: Uuid? = null,\n /** When the identity was soft-deleted (null if not deleted) */\n @SerialName(\"deletedAt\")\n val deletedAt: Instant? = null,\n /** Who deleted the identity (party ID) */\n @SerialName(\"deletedById\")\n val deletedById: Uuid? = null,\n )\n\n data class Post(\n val credentials: ClientCredentials,\n ) : ClientAuthenticationConfig"
},
"GetSessionAttributesArgs": {
"kind": "data class",
"name": "GetSessionAttributesArgs",
"module": "public",
"source": "@Serializable\ndata class GetSessionAttributesArgs(\n /** The session whose attributes are read. */\n val correlationId: String,\n)"
},
"GetSessionAttributesResult": {
"kind": "data class",
"name": "GetSessionAttributesResult",
"module": "public",
"source": "@Serializable\ndata class GetSessionAttributesResult(\n /**\n * The effective attribute data records from the session bag, keyed by attribute path string.\n * Only records whose value is plain attribute data are included; blob / key / evidence\n * references have no direct JSON form and are omitted.\n */\n val attributes: Map<String, JsonElement>,\n /**\n * The names of lookup keys that have a non-null promotedToAttributePath: i.e. the keys\n * that will be emitted as attributes during credential assembly. The key VALUES are omitted:\n * they are PII and are never returned in the clear over REST.\n */\n val promotedLookupKeyNames: List<String>,\n)\n\n-- discriminator-tagged sealed-interface JSON via kotlinx-serialization."
},
"EvaluateAttributeCompletenessArgs": {
"kind": "data class",
"name": "EvaluateAttributeCompletenessArgs",
"module": "public",
"source": "@Serializable\ndata class EvaluateAttributeCompletenessArgs(\n /** The session whose bag is evaluated. */\n val correlationId: String,\n)"
},
"EvaluateAttributeCompletenessResult": {
"kind": "data class",
"name": "EvaluateAttributeCompletenessResult",
"module": "public",
"source": "@Serializable\ndata class EvaluateAttributeCompletenessResult(\n /** One verdict per credential-claims binding in the session's pipeline configuration. */\n val verdicts: List<BindingCompletenessVerdict>,\n)\n\n@Serializable\ndata class BindingCompletenessVerdict(\n /** The `CredentialClaimsBinding.id` this verdict is for. */\n val bindingId: String,\n /** True when every mandatory attribute path is present in the bag. */\n val complete: Boolean,\n /** Mandatory attribute paths still missing from the bag. Empty when [complete]. */\n val missingRequiredPaths: List<AttributePath> = emptyList(),\n /**\n * True when the binding is incomplete and its `DeferralPolicy.enabled` is set — i.e. the\n * issuer-side wiring should defer rather than fail. False when incomplete but deferral is\n * disabled (the request should fail) or when [complete].\n */\n val deferralRecommended: Boolean = false,\n /**\n * True when the binding's `DeferralPolicy.approvalRequired` is set and the session has not\n * yet been approved. Even a [complete] binding must defer (HTTP 202) while this is true:\n * the credential is not issued until an approver grants it.\n */\n val awaitingApproval: Boolean = false,\n)\n\n@JsExportCompat\n@Serializable\ndata class CredentialClaimsBinding(\n /** Matches the credential's `credential_configuration_id`. */\n val id: String,\n /**\n * The semantic attribute set (OCA bundle / vocabulary subset) this credential draws from.\n * The credential-design service resolves SD policy + mandatory claims from it.\n */\n val semanticAttributeSetRef: SemanticAttributeSetRef,\n /**\n * Optional mapping FROM semantic-model attribute names TO the credential's claim structure\n * (renaming / restructuring per vct / doctype). Null when names map 1:1. NOT where selective\n * disclosure is decided.\n */\n val claimMappingConfigId: String? = null,\n /** Inline alternative to [claimMappingConfigId]. */\n val inlineClaimMappingConfig: ClaimMappingConfiguration? = null,\n /** Which of the pipeline's sources this credential consumes, per phase. */\n @JsExportIgnoreCompat\n val consumedSources: Map<PipelinePhase, List<AttributeProvenanceRef>> = emptyMap(),\n /** Per-credential deferral policy. */\n val deferralPolicy: DeferralPolicy = DeferralPolicy.disabled(),\n)\n\n @OptIn(ExperimentalObjCName::class)\n @ObjCName(\"cddlTrue\")\n @Serializable(with = CDDLSerializer::class)\n object True : CDDL(\"true\", MajorType.SPECIAL, 21) {\n fun newTrue() = CborSimple.TRUE\n\n fun fromJson(value: JsonPrimitive) = CborSimple.TRUE\n }\n\n data object Empty : GenericHttpBody() {\n override val isEmpty: Boolean = true\n\n override fun asTextOrNull(): String? = null\n\n override fun asBytesOrNull(): ByteArray? = null\n }\n\n@JsExportCompat\n@Serializable(with = AttributePathSerializer::class)\ndata class AttributePath(\n val value: String,\n)\n\n@JsExportCompat\n@Serializable\ndata class DeferralPolicy(\n /** When false, missing required attributes fail the credential request rather than deferring. */\n val enabled: Boolean = false,\n /** Hint to the wallet for the `/deferred_credential` poll interval. */\n val pollIntervalSeconds: Int = 60,\n /** Max time from the first `/credential` 202 until the pipeline gives up. Defaults to 7 days. */\n val maxDeferralSeconds: Long = 7L * 24 * 3600,\n /**\n * When true, even with all required attributes present the session moves to an\n * awaiting-approval state rather than issuing — an explicit approval is required.\n */\n val approvalRequired: Boolean = false,\n) {\n companion object {\n fun disabled(): DeferralPolicy = DeferralPolicy(enabled = false)\n }\n}\n\n @OptIn(ExperimentalObjCName::class)\n @ObjCName(\"cddlFalse\")\n @Serializable(with = CDDLSerializer::class)\n object False : CDDL(\"false\", MajorType.SPECIAL, 20) {\n fun newFalse() = CborSimple.FALSE\n\n fun fromJson(value: JsonPrimitive) = CborSimple.FALSE\n }"
},
"ApprovePipelineSessionArgs": {
"kind": "data class",
"name": "ApprovePipelineSessionArgs",
"module": "public",
"source": "@Serializable\ndata class ApprovePipelineSessionArgs(\n /** The external correlation handle identifying the session to approve or reject. */\n val correlationId: String,\n /** The decision taken by the approver. */\n val decision: ApprovalDecision,\n /** Human-readable reason; required on [ApprovalDecision.REJECT], optional on [ApprovalDecision.APPROVE]. */\n val reason: String? = null,\n /** Supporting evidence captured at approval time; recorded in the bag on [ApprovalDecision.APPROVE]. */\n val evidence: AttributeEvidence? = null,\n)\n\n@Serializable\nenum class ApprovalDecision {\n APPROVE,\n REJECT,\n}\n\n @Serializable\n data class Human(\n override val id: String,\n /** Correlation key the engine binds to; UI signals completion against this key. */\n val correlationKey: String,\n /** Bounded wait; null means wait until the workflow's overall deadline. */\n val timeoutSeconds: Long? = null,\n val next: String? = null,\n ) : WorkflowTask()\n\n@Serializable\n@SerialName(\"evidence\")\ndata class AttributeEvidence(\n val evidenceId: String,\n val evidenceType: String,\n val hash: String? = null,\n val hashAlgorithm: String? = null,\n val blobInfo: BlobInfo? = null,\n val uri: String? = null,\n val metadata: Map<String, String> = emptyMap(),\n) : AttributeValue\n\n@Serializable\nsealed class WorkflowTask {\n abstract val id: String\n\n /** Invoke a [com.sphereon.core.api.service.ServiceCommand] and pass its output to the next task. */\n @Serializable\n data class System(\n override val id: String,\n val commandId: String,\n /** Mapping expression (engine-interpreted) producing the command's input from prior outputs. */\n val inputExpression: String,\n val next: String? = null,\n ) : WorkflowTask()\n\n /** Wait for an out-of-band signal (form submission, approval, IDV completion). */\n @Serializable\n data class Human(\n override val id: String,\n /** Correlation key the engine binds to; UI signals completion against this key. */\n val correlationKey: String,\n /** Bounded wait; null means wait until the workflow's overall deadline. */\n val timeoutSeconds: Long? = null,\n val next: String? = null,\n ) : WorkflowTask()\n\n /** Conditional branch on the current payload. */\n @Serializable\n data class Branch(\n override val id: String,\n val conditionExpression: String,\n val thenNext: String,\n val elseNext: String,\n ) : WorkflowTask()\n\n /**\n * Schedule a language-native Temporal activity by name on a dedicated task\n * queue (Pattern B in `distributed-execution.md` §5.2): the workflow does\n * not need a JVM `@ActivityInterface` for the activity type — it is\n * dispatched untyped via Temporal's `newUntypedActivityStub(...)`. The\n * non-JVM worker (Rust, Python, …) registers the activity directly with\n * its language SDK and polls [taskQueue]; the workflow addresses it by\n * [activityName].\n *\n * Bytes-typed boundary: the activity input bytes are produced from the\n * current payload by [inputExpression] (same semantics as\n * [WorkflowTask.System.inputExpression]); the activity returns\n * `ByteArray` and that becomes the new current payload. The worker\n * (de)serialises the bytes against whatever shape it advertises.\n *\n * **Tenant context propagation.** Tenant id, correlation id, blob\n * references, and the `blob_auth` envelope (Gap 5) must be embedded\n * **inside the bytes produced by [inputExpression]** — this is the\n * workflow author's responsibility, not the interpreter's. Workflow-\n * level memo / search attributes / activity headers carry trace context\n * separately (see `lib/temporal/docs/operator.md` §12).\n *\n * **Determinism.** All timeouts and retry are required-or-defaulted at\n * task-definition time; the workflow body must not read config / DI when\n * building the `ActivityOptions` (same rule as Gap 1).\n *\n * @param activityName Activity type as registered by the non-JVM worker.\n * Engine-neutral by convention — engine selection happens at the\n * task-queue level, not in the activity name (e.g. `\"ocr.process\"`,\n * not `\"ocr.tesseract.process\"`).\n * @param taskQueue Task queue the worker polls (e.g. `\"ocr.tesseract\"`).\n * @param inputExpression Mapping expression producing the activity input\n * bytes from the current payload — same shape as `System.inputExpression`.\n * @param startToCloseTimeoutMs Wall-clock budget for one attempt.\n * @param heartbeatTimeoutMs Liveness window for heartbeating activities;\n * `null` if the activity does not heartbeat.\n * @param retryMaxAttempts Maximum Temporal-level attempts before the\n * workflow sees the failure. Defaults to 3.\n * @param next Id of the next task; `null` terminates the workflow.\n */\n @Serializable\n data class NativeActivity(\n override val id: String,\n val activityName: String,\n val taskQueue: String,\n val inputExpression: String,\n val startToCloseTimeoutMs: Long,\n val heartbeatTimeoutMs: Long? = null,\n val retryMaxAttempts: Int = 3,\n val next: String? = null,\n ) : WorkflowTask()\n}\n\n@Serializable\n@SerialName(\"blob-info\")\n@OptIn(ExperimentalObjCName::class)\n@ObjCName(\"BlobInfo\", exact = true)\ndata class BlobInfo(\n override val storeId: String? = null,\n override val path: String? = null,\n override val tenantId: String? = null,\n override val contentType: String? = null,\n override val metadata: Map<String, String> = emptyMap(),\n @Transient\n val opts: Map<String, String> = emptyMap(),\n) : BlobInfoType {\n override fun toBlobInfo(): BlobInfo = this\n\n /**\n * Returns a [BlobMetadata] from this info's content type and custom metadata.\n */\n fun toBlobMetadata(): BlobMetadata =\n BlobMetadata(\n contentType = contentType,\n custom = metadata,\n )\n\n /**\n * Lightweight identity for use as map keys and cache lookups.\n * Like [KeyIdentity] — deterministic equality without transient fields.\n */\n fun toIdentity(): BlobIdentity =\n BlobIdentity(\n storeId = storeId,\n path = path,\n tenantId = tenantId,\n )\n\n /** Creates a copy targeting a different path. */\n fun withPath(newPath: String): BlobInfo = copy(path = newPath)\n\n /** Creates a copy targeting a different store. */\n fun withStore(newStoreId: String): BlobInfo = copy(storeId = newStoreId)\n\n companion object {\n fun of(\n storeId: String,\n path: String,\n ) = BlobInfo(storeId = storeId, path = path)\n\n fun fromDescriptor(\n descriptor: BlobDescriptor,\n tenantId: String? = null,\n ) = BlobInfo(\n storeId = descriptor.storeId,\n path = descriptor.path,\n tenantId = tenantId,\n contentType = descriptor.contentType,\n metadata = descriptor.metadata.custom,\n )\n\n /**\n * Validates a blob path for security:\n * - Rejects path traversal segments (`..`)\n * - Rejects null bytes\n * - Rejects absolute paths\n * - Rejects backslash separators\n */\n fun validatePath(path: String) {\n require(!path.contains('\\u0000')) { \"Blob path must not contain null bytes\" }\n require(!path.startsWith('/')) { \"Blob path must not be absolute\" }\n require(!path.contains('\\\\')) { \"Blob path must use '/' separators, not '\\\\'\" }\n val segments = path.split('/')\n require(segments.none { it == \"..\" }) { \"Blob path must not contain '..' traversal segments: $path\" }\n require(segments.none { it == \".\" }) { \"Blob path must not contain '.' self-reference segments: $path\" }\n }\n\n /**\n * Sanitizes and normalizes a user-provided path. Returns a safe path string.\n * Throws [IllegalArgumentException] if the path is malicious.\n */\n fun sanitizePath(path: String): String {\n val normalized =\n path\n .replace('\\\\', '/')\n .replace(Regex(\"/+\"), \"/\")\n .trimStart('/')\n .trimEnd('/')\n require(normalized.isNotBlank()) { \"Sanitized path must not be blank\" }\n validatePath(normalized)\n return normalized\n }\n }\n}\n\n@JsExportCompat\n@Serializable\nsealed interface AttributeValue\n\n/**\n * A plain data value (string, number, boolean, object, array). Becomes a credential \"claim\"\n * only once a downstream assembler maps it into a credential.\n */\n@Serializable\n@SerialName(\"data\")"
},
"ApprovePipelineSessionResult": {
"kind": "data class",
"name": "ApprovePipelineSessionResult",
"module": "public",
"source": "@Serializable\ndata class ApprovePipelineSessionResult(\n /** The session's correlation id, echoed back for convenience. */\n val correlationId: String,\n /** The new lifecycle status after the decision was applied. */\n val status: IssuancePipelineStatus,\n)\n\n@JsExportCompat\nenum class IssuancePipelineStatus {\n /** Session created; no phase has run yet. */\n CREATED,\n\n /** A phase's sources are currently executing. */\n PHASE_EXECUTING,\n\n /** A phase finished; the session is between phases. */\n PHASE_COMPLETED,\n\n /** `/credential` returned 202; waiting for deferred attribute ingress. */\n AWAITING_DEFERRED,\n\n /** Required attributes are complete but an approver has not yet decided. */\n AWAITING_APPROVAL,\n\n /** All bindings complete and approved (if required); claims can be assembled. */\n READY,\n\n /** Issuance finished for every bound credential. */\n COMPLETED,\n\n /** The session failed terminally. */\n FAILED,\n\n /** The session passed its `expiresAt` without completing. */\n EXPIRED,\n}\n\n @Serializable\n @SerialName(\"session\")\n data class Session(\n /** `null` -> use the domain default ([SessionRetention.encryptionRequired] = `true`). */\n val encryptionRequired: Boolean? = null,\n ) : RetentionDto() {\n override val kind: String = \"session\"\n }\n\n @Serializable\r\n @SerialName(\"Required\")\r\n data class Required(\r\n val message: String? = null,\r\n ) : FieldValidationRule"
},
"FailPipelineSourceArgs": {
"kind": "data class",
"name": "FailPipelineSourceArgs",
"module": "public",
"source": "@Serializable\ndata class FailPipelineSourceArgs(\n /** The external correlation handle identifying the pipeline session. */\n val correlationId: String,\n /** The opaque source identifier (matches `AttributeProvenanceRef.value`). */\n val sourceId: String,\n /** Optional human-readable reason recorded with the failure marker. */\n val reason: String? = null,\n)\n\n@JsExportCompat\n@Serializable(with = AttributeProvenanceRefSerializer::class)\ndata class AttributeProvenanceRef(\n val value: String,\n)\n\nobject AttributeProvenanceRefSerializer : KSerializer<AttributeProvenanceRef> {\n override val descriptor: SerialDescriptor =\n PrimitiveSerialDescriptor(\"com.sphereon.attribute.flow.AttributeProvenanceRef\", PrimitiveKind.STRING)\n\n override fun serialize(\n encoder: Encoder,\n value: AttributeProvenanceRef\n ) = encoder.encodeString(value.value)\n\n override fun deserialize(decoder: Decoder): AttributeProvenanceRef = AttributeProvenanceRef(decoder.decodeString())\n}"
},
"FailPipelineSourceResult": {
"kind": "data class",
"name": "FailPipelineSourceResult",
"module": "public",
"source": "@Serializable\ndata class FailPipelineSourceResult(\n /** The session's correlation id, echoed back for convenience. */\n val correlationId: String,\n /** The source id whose contribution was marked as failed. */\n val sourceId: String,\n)"
},
"CreateDcqlQueryArgs": {
"kind": "data class",
"name": "CreateDcqlQueryArgs",
"module": "public",
"source": "@JsExportCompat\n@Serializable\ndata class CreateDcqlQueryArgs(\n val queryId: String,\n val name: String,\n val description: String? = null,\n val dcqlQuery: DcqlQuery,\n val enabled: Boolean = true,\n)\n\n@Serializable\n@JsExportCompat\ndata class DcqlQuery(\n val credentials: List<DcqlCredentialQuery>? = null,\n val credential_sets: List<DcqlCredentialSetQuery>? = null,\n) {\n init {\n require(credentials != null || credential_sets != null) {\n \"At least one of 'credentials' or 'credential_sets' must be present\"\n }\n }\n}\n\n@Serializable\n@JsExportCompat\ndata class DcqlCredentialQuery(\n val id: String,\n val format: String? = null,\n val meta: JsonObject? = null,\n val claims: List<DcqlClaimQuery>? = null,\n val claim_sets: List<DcqlClaimSet>? = null,\n val require_cryptographic_holder_binding: Boolean = true,\n val multiple: Boolean = false,\n @SerialName(\"trusted_authorities\")\n val trusted_authorities: List<DcqlTrustedAuthority>? = null,\n) {\n /**\n * Normalized trusted authorities with duplicate types automatically combined.\n *\n * When multiple authority entries of the same type exist in trusted_authorities,\n * they are automatically combined into a single entry with all values merged.\n * This prevents logic/validation problems by external parties.\n *\n * This property is computed in the init block and always reflects the deduplicated state.\n *\n * Example:\n * ```kotlin\n * // Input during construction/deserialization:\n * listOf(\n * DcqlTrustedAuthority(\"openid_federation\", listOf(\"https://fed1.com\")),\n * DcqlTrustedAuthority(\"openid_federation\", listOf(\"https://fed2.com\"))\n * )\n * // Automatically normalized to:\n * listOf(\n * DcqlTrustedAuthority(\"openid_federation\", listOf(\"https://fed1.com\", \"https://fed2.com\"))\n * )\n * ```\n */\n @Transient\n val normalizedTrustedAuthorities: List<DcqlTrustedAuthority>? = trusted_authorities?.let { normalizeTrustedAuthorities(it) }\n\n companion object {\n /**\n * Combines multiple trusted authority entries of the same type into single entries.\n *\n * @param authorities Original list that may contain duplicate types\n * @return List with duplicate types merged, maintaining order of first occurrence\n */\n private fun normalizeTrustedAuthorities(authorities: List<DcqlTrustedAuthority>): List<DcqlTrustedAuthority> {\n if (authorities.isEmpty()) {\n return authorities\n }\n\n // Group by type and combine all values\n val grouped = authorities.groupBy { it.type }\n\n // Maintain order of first occurrence for each type\n return authorities\n .distinctBy { it.type }\n .map { firstOfType ->\n val allValues = grouped[firstOfType.type]!!.flatMap { it.values }.distinct()\n DcqlTrustedAuthority(\n type = firstOfType.type,\n values = allValues,\n )\n }\n }\n }\n}\n\n@Serializable\n@JsExportCompat\ndata class DcqlCredentialSetQuery(\n val required: Boolean = false,\n val options: List<DcqlCredentialSetOption>,\n)"
},
"DcqlQueryConfiguration": {
"kind": "data class",
"name": "DcqlQueryConfiguration",
"module": "public",
"source": "@OptIn(ExperimentalObjCName::class)\n@ObjCName(\"DcqlQueryConfiguration\", exact = true)\n@JsExportCompat\n@Serializable\ndata class DcqlQueryConfiguration(\n val queryId: String,\n val name: String,\n val description: String? = null,\n val dcqlQuery: DcqlQuery,\n val enabled: Boolean = true,\n val createdAt: Long,\n val updatedAt: Long,\n /**\n * The version number of the currently active DCQL body, when the configuration is backed\n * by a version-history store. Null for stores without versioning (the IDK KV/SQLite\n * backings); set by the EDK versioned store.\n */\n val currentVersion: Int? = null,\n)\n\n@Serializable\n@JsExportCompat\ndata class DcqlQuery(\n val credentials: List<DcqlCredentialQuery>? = null,\n val credential_sets: List<DcqlCredentialSetQuery>? = null,\n) {\n init {\n require(credentials != null || credential_sets != null) {\n \"At least one of 'credentials' or 'credential_sets' must be present\"\n }\n }\n}\n\n @OptIn(ExperimentalObjCName::class)\n @ObjCName(\"cddlNull\")\n @Serializable(with = CDDLSerializer::class)\n object Null : CDDL(\"null\", MajorType.SPECIAL, 22, arrayOf(nil)) {\n fun newNull() = CborSimple.NULL\n\n fun fromJson(value: JsonElement) = CborSimple.NULL\n }\n\n@Serializable\n@JsExportCompat\ndata class DcqlCredentialQuery(\n val id: String,\n val format: String? = null,\n val meta: JsonObject? = null,\n val claims: List<DcqlClaimQuery>? = null,\n val claim_sets: List<DcqlClaimSet>? = null,\n val require_cryptographic_holder_binding: Boolean = true,\n val multiple: Boolean = false,\n @SerialName(\"trusted_authorities\")\n val trusted_authorities: List<DcqlTrustedAuthority>? = null,\n) {\n /**\n * Normalized trusted authorities with duplicate types automatically combined.\n *\n * When multiple authority entries of the same type exist in trusted_authorities,\n * they are automatically combined into a single entry with all values merged.\n * This prevents logic/validation problems by external parties.\n *\n * This property is computed in the init block and always reflects the deduplicated state.\n *\n * Example:\n * ```kotlin\n * // Input during construction/deserialization:\n * listOf(\n * DcqlTrustedAuthority(\"openid_federation\", listOf(\"https://fed1.com\")),\n * DcqlTrustedAuthority(\"openid_federation\", listOf(\"https://fed2.com\"))\n * )\n * // Automatically normalized to:\n * listOf(\n * DcqlTrustedAuthority(\"openid_federation\", listOf(\"https://fed1.com\", \"https://fed2.com\"))\n * )\n * ```\n */\n @Transient\n val normalizedTrustedAuthorities: List<DcqlTrustedAuthority>? = trusted_authorities?.let { normalizeTrustedAuthorities(it) }\n\n companion object {\n /**\n * Combines multiple trusted authority entries of the same type into single entries.\n *\n * @param authorities Original list that may contain duplicate types\n * @return List with duplicate types merged, maintaining order of first occurrence\n */\n private fun normalizeTrustedAuthorities(authorities: List<DcqlTrustedAuthority>): List<DcqlTrustedAuthority> {\n if (authorities.isEmpty()) {\n return authorities\n }\n\n // Group by type and combine all values\n val grouped = authorities.groupBy { it.type }\n\n // Maintain order of first occurrence for each type\n return authorities\n .distinctBy { it.type }\n .map { firstOfType ->\n val allValues = grouped[firstOfType.type]!!.flatMap { it.values }.distinct()\n DcqlTrustedAuthority(\n type = firstOfType.type,\n values = allValues,\n )\n }\n }\n }\n}\n\n@Serializable\n@JsExportCompat\ndata class DcqlCredentialSetQuery(\n val required: Boolean = false,\n val options: List<DcqlCredentialSetOption>,\n)\n\ninternal object CDDLSerializer : KSerializer<CDDL> {\n override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor(\"CDDL\", PrimitiveKind.STRING)\n\n override fun serialize(\n encoder: Encoder,\n value: CDDL,\n ) {\n encoder.encodeString(value.format)\n }\n\n override fun deserialize(decoder: Decoder): CDDL = CDDL.util.fromFormat(decoder.decodeString())\n}\n\n@Suppress(\"UNCHECKED_CAST\")\n@JsExportCompat\n@Serializable(with = CDDLSerializer::class)\nsealed class CDDL(\n override val format: String,\n override val majorType: MajorType? = null,\n override val info: Int? = null,\n override val aliasFor: Array<CDDLType> = arrayOf(),\n) : CDDLType {\n override fun newCborItemFromJson(\n element: JsonElement?,\n cddl: CDDLType?,\n ): CborItem<out Any?> {\n val jsonPrimitive: JsonPrimitive? = (element as? JsonPrimitive)?.jsonPrimitive\n val jsonArray: JsonArray? = (element as? JsonArray)?.jsonArray\n val jsonObject: JsonObject? = (element as? JsonObject)?.jsonObject\n val isNull: Boolean = element == JsonNull || element === null\n val isString: Boolean = jsonPrimitive?.isString == true\n\n if (isNull) {\n return CborNull()\n } else if (isString && jsonPrimitive !== null) {\n return CborString(jsonPrimitive.content)\n } else if (jsonArray !== null) {\n return list.fromJson(jsonArray)\n } else if (jsonObject !== null) {\n if (CborItemJson.isCborItemValueJson(jsonObject)) {\n val key =\n if (CborItemJson.isCborItemJson(jsonObject)) {\n (jsonObject[\"key\"] as? JsonPrimitive)?.content\n } else {\n null\n }\n val cddlStr = (jsonObject[\"cddl\"] as? JsonPrimitive)?.content\n\n if (cddlStr === null) {\n // cddl key found, but wasn't a primitive, returning a null value\n return CborNull()\n }\n val cddlObject = util.fromFormat(cddlStr)\n val cborObject = newCborItemFromJson(jsonObject[jsonObject.keys.find { it != CDDL_LITERAL && it != KEY_LITERAL }], cddlObject)\n if (key === null) {\n return cborObject\n }\n return CborMap(mutableMapOf(Pair(CborString(key), cborObject)))\n }\n // number label keys?\n return CborMap(mutableMapOf(* jsonObject.map { Pair(CborString(it.key), newCborItemFromJson(it.value)) }.toTypedArray()))\n } else if (jsonPrimitive !== null) {\n if (cddl == null) {\n return newCborItem(jsonPrimitive)\n }\n return when (cddl) {\n // Needed because we cannot have inheritance with Kotlin to JS, unfortunately. The fromJson would cause clashes if we put it in the interface\n tstr -> tstr.fromJson(jsonPrimitive)\n\n Null -> CborNull()\n\n False -> CborSimple.FALSE\n\n True -> CborSimple.TRUE\n\n bool -> bool.fromJson(jsonPrimitive)\n\n bstr -> bstr.fromJson(jsonPrimitive)\n\n bytes -> bytes.fromJson(jsonPrimitive)\n\n float -> float.fromJson(jsonPrimitive)\n\n float16 -> float16.fromJson(jsonPrimitive)\n\n float32 -> float32.fromJson(jsonPrimitive)\n\n float64 -> float64.fromJson(jsonPrimitive)\n\n full_date -> full_date.fromJson(jsonPrimitive)\n\n int -> int.fromJson(jsonPrimitive)\n\n nil -> nil.newNil()\n\n nint -> nint.fromJson(jsonPrimitive)\n\n tdate -> tdate.fromJson(jsonPrimitive)\n\n text -> text.fromJson(jsonPrimitive)\n\n time -> time.fromJson(jsonPrimitive)\n\n uint -> uint.fromJson(jsonPrimitive)\n\n undefined -> undefined.newUndefined()\n\n else -> cddl.newCborItem(jsonPrimitive)\n }\n }\n return newCborItem(element)\n }\n\n override fun <T : Any> newCborItem(origValue: T?): CborItem<out Any?> {\n // We are not using inheritance for the methods as that would impact JS export.\n // Since this is a sealed class anyway that is not too bad\n var value = origValue\n val jsonElement: JsonElement? =\n when (value) {\n is JsonPrimitive -> value\n is JsonArray -> value\n is JsonObject -> value\n is JsonNull -> value\n else -> null\n }\n if (value == null) {\n return nil.newNil()\n } else if (value == Unit) {\n return undefined.newUndefined()\n }\n return when (this) {\n tstr -> {\n if (jsonElement === null) {\n tstr.newString(value.toString())\n } else {\n tstr.fromJson(jsonElement.jsonPrimitive)\n }\n }\n\n False -> {\n False.newFalse()\n }\n\n Null -> {\n Null.newNull()\n }\n\n True -> {\n True.newTrue()\n }\n\n any -> {\n return when (value) {\n is JsonPrimitive -> {\n val prim = value\n when {\n prim.isString -> tstr.fromJson(prim)\n prim.content == \"true\" || prim.content == \"false\" -> bool.fromJson(prim)\n prim.content.contains('.') || prim.content.contains('e') || prim.content.contains('E') -> float64.fromJson(prim)\n else -> int.fromJson(prim) // Assume integer if not string, boolean, or float\n }\n }\n\n is cddl_tstr -> {\n if (jsonElement === null) {\n tstr.newString(value)\n } else {\n tstr.fromJson(jsonElement.jsonPrimitive)\n }\n }\n\n is cddl_bstr -> {\n if (jsonElement === null) {\n bstr.newByteString(value)\n } else {\n bstr.fromJson(jsonElement.jsonPrimitive)\n }\n }\n\n is cddl_tdate -> {\n if (jsonElement === null) {\n tdate.newTDate(value)\n } else {\n tdate.fromJson(jsonElement.jsonPrimitive)\n }\n }\n\n is cddl_full_date -> {\n if (jsonElement === null) {\n full_date.newFullDate(value)\n } else {\n full_date.fromJson(jsonElement.jsonPrimitive)\n }\n }\n\n is cddl_bool -> {\n if (jsonElement === null) {\n bool.newBool(value)\n } else {\n bool.fromJson(jsonElement.jsonPrimitive)\n }\n }\n\n // Use consolidated Number handling for JS/WasmJs compatibility\n // (on JS, all numeric `is` checks match any Number, making individual checks unreliable)\n is Number -> {\n if (jsonElement === null) {\n value.toCborItem()\n } else {\n val d = value.toDouble()\n if (d != kotlin.math.floor(d) || d.isInfinite() || d.isNaN()) {\n float64.fromJson(jsonElement.jsonPrimitive)\n } else {\n int.fromJson(jsonElement.jsonPrimitive)\n }\n }\n }\n\n is cddl_list<*> -> {\n if (jsonElement === null) {\n list.newList(\n value\n .map {\n if (it is CborItem<*>) {\n it\n } else {\n any.newCborItem(\n it,\n )\n }\n }.toMutableList(),\n )\n } else {\n list.fromJson(jsonElement.jsonArray)\n }\n }\n\n is cddl_map<*, *> -> {\n if (jsonElement === null) {\n map.newMap(\n mutableMapOf(\n * value\n .map {\n Pair(\n if (it.key is CborItem<*>) {\n it.key as CborItem<*>\n } else {\n any.newCborItem(it.key)\n },\n if (it.value is CborItem<*>) {\n it.value as CborItem<*>\n } else {\n any.newCborItem(it.value)\n },\n )\n }.toTypedArray(),\n ),\n )\n } else {\n map.fromJson(jsonElement.jsonObject)\n }\n }\n\n else -> {\n throw IllegalArgumentException(\"newCborItem for $value Not implemented yet\")\n }\n }\n }\n\n bool -> {\n if (jsonElement === null) {\n bool.newBool(value == true)\n } else {\n bool.fromJson(jsonElement.jsonPrimitive)\n }\n }\n\n bstr -> {\n if (jsonElement === null) {\n bstr.newByteString(value as ByteArray)\n } else {\n bstr.fromJson(jsonElement.jsonPrimitive)\n }\n }\n\n bstr_indef_length -> {\n if (jsonElement === null) {\n bstr_indef_length.newByteString(value as List<cddl_bstr>)\n } else {\n TODO(\"indef cddl from json not implemented yet\")\n }\n }\n\n bytes -> {\n if (jsonElement === null) {\n bytes.newBytes(value as ByteArray)\n } else {\n bytes.fromJson(jsonElement.jsonPrimitive)\n }\n }\n\n float -> {\n if (jsonElement === null) {\n float.newFloat(value as Float)\n } else {\n float.fromJson(jsonElement.jsonPrimitive)\n }\n }\n\n float16 -> {\n if (jsonElement === null) {\n float16.newFloat16(value as Float)\n } else {\n float16.fromJson(jsonElement.jsonPrimitive)\n }\n }\n\n float32 -> {\n if (jsonElement === null) {\n float32.newFloat32(value as Float)\n } else {\n float32.fromJson(jsonElement.jsonPrimitive)\n }\n }\n\n float64 -> {\n if (jsonElement === null) {\n float64.newFloat64(value as Double)\n } else {\n float64.fromJson(jsonElement.jsonPrimitive)\n }\n }\n\n full_date -> {\n if (jsonElement === null) {\n full_date.newFullDate(value as cddl_full_date)\n } else {\n full_date.fromJson(jsonElement.jsonPrimitive)\n }\n }\n\n int -> {\n if (jsonElement === null) {\n int.newInt(value as Int)\n } else {\n int.fromJson(jsonElement.jsonPrimitive)\n }\n }\n\n list -> {\n if (jsonElement === null) {\n if (value is CborArray<*>) {\n value\n } else {\n list.newList(\n (value as List<*>)\n .map {\n if (it is CborItem<*>) {\n it\n } else {\n any.newCborItem(\n it,\n )\n }\n }.toMutableList(),\n )\n }\n } else {\n list.fromJson(jsonElement.jsonArray)\n }\n }\n\n map -> {\n if (jsonElement === null) {\n if (value is CborMap<*, *>) {\n value\n } else {\n map.newMap(\n mutableMapOf(\n * (value as Map<*, *>)\n .map {\n Pair(\n if (it.key is CborItem<*>) {\n it.key as CborItem<*>\n } else {\n any.newCborItem(it.key)\n },\n if (it.value is CborItem<*>) {\n it.value as CborItem<*>\n } else {\n any.newCborItem(it.value)\n },\n )\n }.toTypedArray(),\n ),\n ) // fixme. Needs inspection of keys and values and map type\n }\n } else {\n return map.fromJson(jsonElement.jsonObject)\n }\n }\n\n nil -> {\n nil.newNil()\n }\n\n nint -> {\n if (jsonElement === null) {\n nint.newNInt(\n if (value is Number) {\n value.toLong()\n } else {\n value as Long\n }\n )\n } else {\n nint.fromJson(\n jsonElement.jsonPrimitive,\n )\n }\n }\n\n tdate -> {\n if (jsonElement === null) {\n tdate.newTDate(value as cddl_tdate)\n } else {\n tdate.fromJson(jsonElement.jsonPrimitive)\n }\n }\n\n text -> {\n if (jsonElement === null) {\n text.newText(value as cddl_text)\n } else {\n text.fromJson(jsonElement.jsonPrimitive)\n }\n }\n\n time -> {\n if (jsonElement === null) {\n time.newTime(value as cddl_time)\n } else {\n time.fromJson(jsonElement.jsonPrimitive)\n }\n }\n\n tstr_indef_length -> {\n if (jsonElement !== null) {\n tstr_indef_length.newStringIndefLength(value as List<cddl_tstr>)\n } else {\n TODO(\"tstr indef length from json to cbor not implemented\")\n }\n }\n\n uint -> {\n if (jsonElement === null) {\n uint.newUint(\n if (value is Long) {\n value\n } else if (value is Number) {\n value.toLong()\n } else {\n value as Long\n },\n )\n } else {\n uint.fromJson(\n jsonElement.jsonPrimitive,\n )\n }\n }\n\n undefined -> {\n undefined.newUndefined()\n }\n }\n }\n\n @OptIn(ExperimentalObjCName::class)\n @ObjCName(\"cddlTstr\")\n object tstr : CDDL(\"tstr\", MajorType.UNICODE_STRING) {\n fun newString(value: cddl_tstr) = CborString(value)\n\n fun fromJson(value: JsonPrimitive) = CborString(value.content)\n }\n\n @Serializable(with = CDDLSerializer::class)\n @OptIn(ExperimentalObjCName::class)\n @ObjCName(\"cddlUint\")\n object uint : CDDL(\"uint\", MajorType.UNSIGNED_INTEGER) {\n fun newUint(value: cddl_uint) = CborUInt(value)\n\n fun fromJson(value: JsonPrimitive) = CborUInt(value.content.toLong())\n }\n\n @Serializable(with = CDDLSerializer::class)\n @OptIn(ExperimentalObjCName::class)\n @ObjCName(\"cddlNint\")\n object nint : CDDL(\"nint\", MajorType.NEGATIVE_INTEGER) {\n fun newNInt(value: cddl_nint) = CborNInt(value)\n\n fun fromJson(value: JsonPrimitive) = CborNInt(value.content.toLong())\n }\n\n @Serializable(with = CDDLSerializer::class)\n @OptIn(ExperimentalObjCName::class)\n @ObjCName(\"cddlInt\")\n object int :\n CDDL(\"int\", null, null, aliasFor = arrayOf(uint, nint)) {\n fun newInt(value: Int) =\n if (value < 0) {\n CborNInt(value.toLong())\n } else {\n CborUInt(value.toLong())\n }\n\n fun newLong(value: Long) =\n if (value < 0) {\n CborNInt(value)\n } else {\n CborUInt(value)\n }\n\n fun fromJson(value: JsonPrimitive) =\n if (value.long < 0) {\n CborNInt(value.long)\n } else {\n CborUInt(value.long)\n }\n }\n\n @Serializable(with = CDDLSerializer::class)\n @OptIn(ExperimentalObjCName::class)\n @ObjCName(\"cddlBstr\")\n object bstr : CDDL(\"bstr\", MajorType.BYTE_STRING) {\n fun newByteString(value: cddl_bstr) = CborByteString(value)\n\n fun fromJson(\n value: JsonPrimitive,\n encoding: Encoding = Encoding.BASE64URL,\n ) = CborByteString(value.content.decodeFrom(encoding))\n }\n\n @Serializable(with = CDDLSerializer::class)\n @OptIn(ExperimentalObjCName::class)\n @ObjCName(\"cddlBstrIndefLength\")\n object bstr_indef_length : CDDL(\"bstr\", MajorType.BYTE_STRING) {\n fun newByteString(value: List<cddl_bstr>) = CborByteStringIndefLength(value)\n\n fun fromJson(\n value: JsonArray,\n encoding: Encoding = Encoding.BASE64URL,\n ): CborByteStringIndefLength = TODO(\"indef length from json to cbor not implemented yet\")\n }\n\n @Serializable(with = CDDLSerializer::class)\n @OptIn(ExperimentalObjCName::class)\n @ObjCName(\"cddlBytes\")\n object bytes : CDDL(\"bytes\", MajorType.BYTE_STRING, aliasFor = arrayOf(bstr)) {\n fun newBytes(value: cddl_bstr) = CborByteString(value)\n\n fun fromJson(\n value: JsonPrimitive,\n encoding: Encoding = Encoding.BASE64URL,\n ) = CborByteString(value.content.decodeFrom(encoding))\n }\n\n @Serializable(with = CDDLSerializer::class)\n @OptIn(ExperimentalObjCName::class)\n @ObjCName(\"cddlTstrIndefLength\")\n object tstr_indef_length : CDDL(\"tstr\", MajorType.UNICODE_STRING) {\n fun newStringIndefLength(value: List<cddl_tstr>) = CborStringIndefLength(value)\n\n fun fromJson(\n value: JsonArray,\n encoding: Encoding = Encoding.BASE64URL,\n ): CborStringIndefLength = TODO(\"indef length from json to cbor not implemented yet\")\n }\n\n @Serializable(with = CDDLSerializer::class)\n @OptIn(ExperimentalObjCName::class)\n @ObjCName(\"cddlText\")\n object text : CDDL(\"text\", MajorType.UNICODE_STRING, aliasFor = arrayOf(tstr)) {\n fun newText(value: cddl_text) = CborString(value)\n\n fun fromJson(value: JsonPrimitive) = CborString(value.content)\n }\n\n @Serializable(with = CDDLSerializer::class)\n @OptIn(ExperimentalObjCName::class)\n @ObjCName(\"cddlTdate\")\n object tdate : CDDL(\n \"tdate\",\n MajorType.TAG,\n DATE_TIME_STRING,\n ) { // RFC 7049, section 2.4.1, a tdate data item shall contain a date-time string as specified in RFC 3339\n fun newTDate(value: cddl_tdate) = CborTDate(value)\n\n fun fromJson(value: JsonPrimitive) = CborTDate(value.content)\n }\n\n @Serializable(with = CDDLSerializer::class)\n @OptIn(ExperimentalObjCName::class)\n @ObjCName(\"cddlFullDate\")\n object full_date : CDDL(\n \"full-date\",\n MajorType.TAG,\n CborTagged.FULL_DATE_STRING,\n ) { // #6.1004(tstr) In accordance with RFC 8943, a full-date data item shall contain a full-datestring as specified in RFC 3339.\n fun newFullDate(value: cddl_full_date) = CborFullDate(value)\n\n fun fromJson(value: JsonPrimitive) = CborFullDate(value.content)\n }\n\n @Serializable(with = CDDLSerializer::class)\n @OptIn(ExperimentalObjCName::class)\n @ObjCName(\"cddlTime\")\n object time : CDDL(\n \"time\",\n MajorType.TAG,\n CborTagged.DATE_TIME_NUMBER,\n ) { // RFC 7049, section 2.4.1, a tdate data item shall contain a date-time number as specified in RFC 3339\n fun newTime(value: cddl_time) = CborTime(value)\n\n fun fromJson(value: JsonPrimitive) = CborTime(value.content.toLong())\n }\n\n @Serializable(with = CDDLSerializer::class)\n @OptIn(ExperimentalObjCName::class)\n @ObjCName(\"cddlFloat16\")\n object float16 : CDDL(\"float16\", MajorType.SPECIAL, 25) {\n fun newFloat16(value: cddl_float16) = CborFloat16(value)\n\n fun fromJson(value: JsonPrimitive) = CborFloat16(value.float)\n }\n\n @Serializable(with = CDDLSerializer::class)\n @OptIn(ExperimentalObjCName::class)\n @ObjCName(\"cddlFloat32\")\n object float32 : CDDL(\"float32\", MajorType.SPECIAL, 26) {\n fun newFloat32(value: cddl_float32) = CborFloat32(value)\n\n fun fromJson(value: JsonPrimitive) = CborFloat32(value.float)\n }\n\n @Serializable(with = CDDLSerializer::class)\n @OptIn(ExperimentalObjCName::class)\n @ObjCName(\"cddlFloat64\")\n object float64 : CDDL(\"float64\", MajorType.SPECIAL, 27) {\n fun newFloat64(value: cddl_float64) = CborDouble(value)\n\n fun fromJson(value: JsonPrimitive) = CborDouble(value.double)\n }\n\n @Serializable(with = CDDLSerializer::class)\n @OptIn(ExperimentalObjCName::class)\n @ObjCName(\"cddlFloat\")\n object float : CDDL(\"float\", MajorType.SPECIAL, aliasFor = arrayOf(float16, float32, float64)) {\n fun newFloat(value: cddl_float) = CborFloat32(value)\n\n fun fromJson(value: JsonPrimitive) = CborFloat32(value.float)\n }\n\n @OptIn(ExperimentalObjCName::class)\n @ObjCName(\"cddlFalse\")\n @Serializable(with = CDDLSerializer::class)\n object False : CDDL(\"false\", MajorType.SPECIAL, 20) {\n fun newFalse() = CborSimple.FALSE\n\n fun fromJson(value: JsonPrimitive) = CborSimple.FALSE\n }\n\n @OptIn(ExperimentalObjCName::class)\n @ObjCName(\"cddlTrue\")\n @Serializable(with = CDDLSerializer::class)\n object True : CDDL(\"true\", MajorType.SPECIAL, 21) {\n fun newTrue() = CborSimple.TRUE\n\n fun fromJson(value: JsonPrimitive) = CborSimple.TRUE\n }\n\n @Serializable(with = CDDLSerializer::class)\n @OptIn(ExperimentalObjCName::class)\n @ObjCName(\"cddlBool\")\n object bool :\n CDDL(\"bool\", MajorType.SPECIAL, aliasFor = arrayOf(False, True)) {\n fun newBool(value: cddl_bool) =\n if (value) {\n CborSimple.TRUE\n } else {\n CborSimple.FALSE\n }\n\n fun fromJson(value: JsonPrimitive) =\n if (value.boolean) {\n CborSimple.TRUE\n } else {\n CborSimple.FALSE\n }\n }\n\n @Serializable(with = CDDLSerializer::class)\n @OptIn(ExperimentalObjCName::class)\n @ObjCName(\"cddlNil\")\n object nil : CDDL(\"nil\", MajorType.SPECIAL, 22) {\n fun newNil() = CborSimple.NULL\n\n fun fromJson(value: JsonElement) = CborSimple.NULL\n }\n\n @OptIn(ExperimentalObjCName::class)\n @ObjCName(\"cddlNull\")\n @Serializable(with = CDDLSerializer::class)\n object Null : CDDL(\"null\", MajorType.SPECIAL, 22, arrayOf(nil)) {\n fun newNull() = CborSimple.NULL\n\n fun fromJson(value: JsonElement) = CborSimple.NULL\n }\n\n @Serializable(with = CDDLSerializer::class)\n @OptIn(ExperimentalObjCName::class)\n @ObjCName(\"cddlUndefined\")\n object undefined :\n CDDL(\"undefined\", MajorType.SPECIAL, 23) {\n fun newUndefined() = CborSimple.UNDEFINED\n\n fun fromJson(value: JsonElement) = CborSimple.UNDEFINED\n }\n\n @Serializable(with = CDDLSerializer::class)\n @OptIn(ExperimentalObjCName::class)\n @ObjCName(\"cddlMap\")\n object map :\n CDDL(\n \"map\",\n MajorType.MAP,\n ) {\n fun newMap(value: MutableMap<CborItem<*>, CborItem<*>>): CborItem<MutableMap<CborItem<*>, CborItem<*>>> = CborMap(value)\n\n /**\n * Please note that this method is not able to map onto the exact Cbor items as the json values have no type information!\n */\n fun fromJson(value: JsonObject): CborMap<CborString, CborItem<*>> =\n CborMap(\n value.entries\n .map {\n Pair(\n CborString(it.key),\n when (it.value) {\n is JsonPrimitive -> any.fromJson(it.value)\n is JsonArray -> list.fromJson(it.value as JsonArray)\n is JsonObject -> fromJson(it.value as JsonObject)\n else -> throw IllegalArgumentException(\"Unknown type encountered\")\n },\n )\n }.toMap()\n .toMutableMap(),\n )\n }\n\n @Serializable(with = CDDLSerializer::class)\n @OptIn(ExperimentalObjCName::class)\n @ObjCName(\"cddlList\")\n object list :\n CDDL(\n \"list\",\n MajorType.ARRAY,\n ) {\n fun <T : CborItem<*>> newList(value: cddl_list<T>) = CborArray(value)\n\n /**\n * Please note that this method is not able to map onto the exact Cbor items as the json values have no type information!\n */\n fun fromJson(value: JsonArray): CborArray<CborItem<*>> =\n CborArray(\n value\n .map { elt ->\n when (elt) {\n is JsonPrimitive -> {\n any.fromJson(elt)\n }\n\n is JsonArray -> {\n fromJson(elt)\n }\n\n is JsonObject -> {\n if (CborItemJson.isCborItemValueJson(elt)) {\n newCborItemFromJson(\n elt,\n elt[CDDL_LITERAL]?.jsonPrimitive?.content?.let { CDDL.util.fromFormat(it) },\n )\n } else {\n map.fromJson(elt)\n }\n }\n\n else -> {\n throw IllegalArgumentException(\"Unknown type encountered\")\n }\n }\n }.toMutableList(),\n )\n }\n\n @Serializable(with = CDDLSerializer::class)\n @OptIn(ExperimentalObjCName::class)\n @ObjCName(\"cddlAny\")\n object any :\n CDDL(\n \"any\",\n ) {\n fun newAny(value: cddl_any) = CborAny(value)\n\n fun fromJson(value: JsonElement): CborItem<*> {\n return newCborItemFromJson(value)\n// TODO(\"Json any to cbor not implemeted yet\")\n }\n }\n\n override fun toTag(additionalInfo: Int?): String {\n if (aliasFor.isNotEmpty()) {\n if (additionalInfo == null) {\n return aliasFor[0].toTag(additionalInfo)\n }\n\n // fixme: this is not correct. We first need to traverse the aliases, as an alias could go without major and additional info\n return util.entries\n .first { it.majorType == majorType && it.info == additionalInfo }\n .toTag(additionalInfo)\n }\n\n var tag = \"#\"\n if (majorType != null) {\n tag += majorType\n }\n if (additionalInfo != null) {\n tag += \".$additionalInfo\"\n }\n return tag\n }\n\n override fun toString(): String = \"CDDL(format='$format', majorType=$majorType, info=$info, aliasFor=${aliasFor.contentToString()})\"\n\n override fun equals(other: Any?): Boolean {\n if (this === other) {\n return true\n }\n if (other !is CDDL) {\n return false\n }\n\n if (format != other.format) {\n return false\n }\n if (majorType != other.majorType) {\n return false\n }\n if (info != other.info) {\n return false\n }\n if (!aliasFor.contentEquals(other.aliasFor)) {\n return false\n }\n\n return true\n }\n\n override fun hashCode(): Int {\n var result = format.hashCode()\n result = 31 * result + (majorType?.hashCode() ?: 0)\n result = 31 * result + (info ?: 0)\n result = 31 * result + aliasFor.contentHashCode()\n return result\n }\n\n object util {\n // Lazy for serialization as this class is used as object in the above CDDL class\n val entries by lazy {\n arrayOf(\n any,\n uint,\n int,\n nint,\n bstr,\n bstr_indef_length,\n bytes,\n tstr,\n tstr_indef_length,\n text,\n tdate,\n full_date,\n time,\n float,\n False,\n True,\n bool,\n nil,\n Null,\n undefined,\n float16,\n float32,\n float64,\n map,\n list,\n )\n }\n\n fun fromFormat(format: String) = entries.first { it.format == format }\n\n fun fromTag(tag: String): CDDL {\n require(tag.startsWith(\"#\")) { \"Invalid tag supplied $tag\" }\n val parts = tag.split(\"#\", \".\")\n if (parts.size == 1) {\n return any\n }\n val majorVal = parts[1].toIntOrNull()\n return fromMajorType(majorVal?.let { MajorType.fromInt(it) }, parts[2].toIntOrNull())\n }\n\n fun fromBytes(input: Int): CDDL {\n val majorType = input shr 5\n\n // todo additionalInto\n return fromMajorType(MajorType.fromInt(majorType))\n }\n\n fun fromMajorType(\n majorType: MajorType? = null,\n additionalInfo: Int? = null,\n ) = entries.first {\n it.majorType == majorType && it.info == additionalInfo\n }\n }\n}\n\n@OptIn(ExperimentalObjCName::class)\n@ObjCName(\"MajorType\", exact = true)\n@Serializable\n@JsExportCompat\nenum class MajorType(\n val type: Int,\n) {\n /**\n * Major type 0.\n *\n * An unsigned integer in the range 0..2^64-1 inclusive. The value of the encoded item is the\n * argument itself. For example, the integer 10 is denoted as the one byte 0b000_01010 (major\n * type 0, additional information 10). The integer 500 would be 0b000_11001 (major type 0,\n * additional information 25) followed by the two bytes 0x01f4, which is 500 in decimal.\n */\n UNSIGNED_INTEGER(0),\n\n /**\n * Major type 1.\n *\n * A negative integer in the range -2^64..-1 inclusive. The value of the item is -1 minus\n * the argument. For example, the integer -500 would be 0b001_11001 (major type 1, additional\n * information 25) followed by the two bytes 0x01f3, which is 499 in decimal.\n */\n NEGATIVE_INTEGER(1),\n\n /**\n * Major type 2.\n *\n * A byte string. The number of bytes in the string is equal to the argument. For example,\n * a byte string whose length is 5 would have an initial byte of 0b010_00101 (major type 2,\n * additional information 5 for the length), followed by 5 bytes of binary content. A byte\n * string whose length is 500 would have 3 initial bytes of 0b010_11001 (major type 2,\n * additional information 25 to indicate a two-byte length) followed by the two bytes 0x01f4\n * for a length of 500, followed by 500 bytes of binary content.\n */\n BYTE_STRING(2),\n\n /**\n * Major type 3.\n *\n * A text string (Section 2) encoded as UTF-8 [RFC3629]. The number of bytes in the string\n * is equal to the argument. A string containing an invalid UTF-8 sequence is well-formed\n * but invalid (Section 1.2). This type is provided for systems that need to interpret or\n * display human-readable text, and allows the differentiation between unstructured bytes\n * and text that has a specified repertoire (that of Unicode) and encoding (UTF-8). In\n * contrast to formats such as JSON, the Unicode characters in this type are never escaped.\n * Thus, a newline character (U+000A) is always represented in a string as the byte 0x0a,\n * and never as the bytes 0x5c6e (the characters \"\\\" and \"n\") nor as 0x5c7530303061 (the\n * characters \"\\\", \"u\", \"0\", \"0\", \"0\", and \"a\").\n */\n UNICODE_STRING(3),\n\n /**\n * Major type 4.\n * An array of data items. In other formats, arrays are also called lists, sequences, or\n * tuples (a \"CBOR sequence\" is something slightly different, though [RFC8742]). The argument\n * is the number of data items in the array. Items in an array do not need to all be of the\n * same type. For example, an array that contains 10 items of any type would have an initial\n * byte of 0b100_01010 (major type 4, additional information 10 for the length) followed by\n * the 10 remaining items.\n */\n ARRAY(4),\n\n /**\n * Major type 5.\n *\n * A map of pairs of data items. Maps are also called tables, dictionaries, hashes, or\n * objects (in JSON). A map is comprised of pairs of data items, each pair consisting of a\n * key that is immediately followed by a value. The argument is the number of pairs of data\n * items in the map. For example, a map that contains 9 pairs would have an initial byte of\n * 0b101_01001 (major type 5, additional information 9 for the number of pairs) followed by\n * the 18 remaining items. The first item is the first key, the second item is the first\n * value, the third item is the second key, and so on. Because items in a map come in pairs,\n * their total number is always even: a map that contains an odd number of items (no value\n * data present after the last key data item) is not well-formed. A map that has duplicate\n * keys may be well-formed, but it is not valid, and thus it causes indeterminate decoding;\n * see also Section 5.6.\n */\n MAP(5),\n\n /**\n * Major type 6.\n *\n * A tagged data item (\"tag\") whose tag number, an integer in the range 0..2^64-1 inclusive,\n * is the argument and whose enclosed data item (tag content) is the single encoded data item\n * that follows the head. See Section 3.4.\n */\n TAG(6),\n\n /**\n * Major type 7.\n *\n * Floating-point numbers and simple values, as well as the \"break\" stop code. See Section 3.3.\n */\n SPECIAL(7),\n ;\n\n companion object {\n /**\n * Gets a [MajorType] instance from type.\n *\n * @param value an integer between 0 and 7, both inclusive\n * @return a [MajorType] for the given value.\n */\n @JsStatic\n @JvmStatic\n fun fromInt(value: Int): MajorType =\n entries.find { it.type == value }\n ?: throw IllegalArgumentException(\"Unknown major type with value $value\")\n }\n}\n\nabstract class CborSimple<Type : Any?>(\n value: Type,\n cddl: CDDL,\n) : CborItem<Type>(value, cddl) {\n init {\n val info =\n when (cddl) {\n is CDDL.bool -> {\n when (value) {\n true -> CDDL.True.info\n else -> CDDL.False.info\n }\n }\n\n else -> {\n cddl.info\n }\n }\n require(info != null)\n require(info is Int)\n check(info < 24 || (info in 32..255))\n }\n\n override fun encode(builder: ByteStringBuilder) {\n val majorTypeShifted = (majorType!!.type shl 5).toByte()\n builder.append(majorTypeShifted.or(info!!.toByte()))\n }\n\n override fun equals(other: Any?): Boolean = other is CborSimple<*> && value == other.value\n\n override fun hashCode(): Int = value.hashCode()\n\n override fun toString() =\n when (this) {\n FALSE -> \"Simple(FALSE)\"\n TRUE -> \"Simple(TRUE)\"\n NULL -> \"Simple(NULL)\"\n UNDEFINED -> \"Simple(UNDEFINED)\"\n else -> \"Simple($value)\"\n }\n\n companion object {\n /** The [Simple] value for FALSE */\n @OptIn(ExperimentalObjCName::class)\n @ObjCName(\"CBOR_FALSE\")\n @JsStatic\n @JvmStatic\n val FALSE = CborFalse()\n\n /** The [Simple] value for TRUE */\n @OptIn(ExperimentalObjCName::class)\n @ObjCName(\"CBOR_TRUE\")\n @JsStatic\n @JvmStatic\n val TRUE = CborTrue()\n\n /** The [Simple] value for NULL */\n @OptIn(ExperimentalObjCName::class)\n @ObjCName(\"CBOR_NULL\")\n @JsStatic\n @JvmStatic\n val NULL = CborNull()\n\n /** The [Simple] value for UNDEFINED */\n @JsStatic\n @JvmStatic\n val UNDEFINED = CborUndefined()\n }\n}"
},
"GetDcqlQueryArgs": {
"kind": "data class",
"name": "GetDcqlQueryArgs",
"module": "public",
"source": "@JsExportCompat\n@Serializable\ndata class GetDcqlQueryArgs(\n val queryId: String,\n)"
},
"ListDcqlQueriesArgs": {
"kind": "class",
"name": "ListDcqlQueriesArgs",
"module": "public",
"source": "@JsExportCompat\n@Serializable\nclass ListDcqlQueriesArgs\n\n/**\n * Arguments for updating an existing DCQL query configuration.\n *\n * A null field leaves the corresponding value unchanged. This supports both full\n * replacement (PUT, all fields supplied) and partial update (PATCH, a subset supplied).\n */\n@JsExportCompat\n@Serializable"
},
"UpdateDcqlQueryArgs": {
"kind": "data class",
"name": "UpdateDcqlQueryArgs",
"module": "public",
"source": "@JsExportCompat\n@Serializable\ndata class UpdateDcqlQueryArgs(\n val queryId: String,\n val name: String? = null,\n val description: String? = null,\n val dcqlQuery: DcqlQuery? = null,\n val enabled: Boolean? = null,\n)\n\n@Serializable\n@JsExportCompat\ndata class DcqlQuery(\n val credentials: List<DcqlCredentialQuery>? = null,\n val credential_sets: List<DcqlCredentialSetQuery>? = null,\n) {\n init {\n require(credentials != null || credential_sets != null) {\n \"At least one of 'credentials' or 'credential_sets' must be present\"\n }\n }\n}\n\n@Serializable\n@JsExportCompat\ndata class DcqlCredentialQuery(\n val id: String,\n val format: String? = null,\n val meta: JsonObject? = null,\n val claims: List<DcqlClaimQuery>? = null,\n val claim_sets: List<DcqlClaimSet>? = null,\n val require_cryptographic_holder_binding: Boolean = true,\n val multiple: Boolean = false,\n @SerialName(\"trusted_authorities\")\n val trusted_authorities: List<DcqlTrustedAuthority>? = null,\n) {\n /**\n * Normalized trusted authorities with duplicate types automatically combined.\n *\n * When multiple authority entries of the same type exist in trusted_authorities,\n * they are automatically combined into a single entry with all values merged.\n * This prevents logic/validation problems by external parties.\n *\n * This property is computed in the init block and always reflects the deduplicated state.\n *\n * Example:\n * ```kotlin\n * // Input during construction/deserialization:\n * listOf(\n * DcqlTrustedAuthority(\"openid_federation\", listOf(\"https://fed1.com\")),\n * DcqlTrustedAuthority(\"openid_federation\", listOf(\"https://fed2.com\"))\n * )\n * // Automatically normalized to:\n * listOf(\n * DcqlTrustedAuthority(\"openid_federation\", listOf(\"https://fed1.com\", \"https://fed2.com\"))\n * )\n * ```\n */\n @Transient\n val normalizedTrustedAuthorities: List<DcqlTrustedAuthority>? = trusted_authorities?.let { normalizeTrustedAuthorities(it) }\n\n companion object {\n /**\n * Combines multiple trusted authority entries of the same type into single entries.\n *\n * @param authorities Original list that may contain duplicate types\n * @return List with duplicate types merged, maintaining order of first occurrence\n */\n private fun normalizeTrustedAuthorities(authorities: List<DcqlTrustedAuthority>): List<DcqlTrustedAuthority> {\n if (authorities.isEmpty()) {\n return authorities\n }\n\n // Group by type and combine all values\n val grouped = authorities.groupBy { it.type }\n\n // Maintain order of first occurrence for each type\n return authorities\n .distinctBy { it.type }\n .map { firstOfType ->\n val allValues = grouped[firstOfType.type]!!.flatMap { it.values }.distinct()\n DcqlTrustedAuthority(\n type = firstOfType.type,\n values = allValues,\n )\n }\n }\n }\n}\n\n@Serializable\n@JsExportCompat\ndata class DcqlCredentialSetQuery(\n val required: Boolean = false,\n val options: List<DcqlCredentialSetOption>,\n)"
},
"DeleteDcqlQueryArgs": {
"kind": "data class",
"name": "DeleteDcqlQueryArgs",
"module": "public",
"source": "@JsExportCompat\n@Serializable\ndata class DeleteDcqlQueryArgs(\n val queryId: String,\n)"
},
"ListDcqlQueryVersionsArgs": {
"kind": "data class",
"name": "ListDcqlQueryVersionsArgs",
"module": "public",
"source": "@Serializable\ndata class ListDcqlQueryVersionsArgs(\n val queryId: String,\n)"
},
"DcqlQueryVersionSummary": {
"kind": "data class",
"name": "DcqlQueryVersionSummary",
"module": "public",
"source": "@Serializable\ndata class DcqlQueryVersionSummary(\n val version: Int,\n val createdAt: Long,\n val createdBy: String? = null,\n)"
},
"GetDcqlQueryVersionArgs": {
"kind": "data class",
"name": "GetDcqlQueryVersionArgs",
"module": "public",
"source": "@Serializable\ndata class GetDcqlQueryVersionArgs(\n val queryId: String,\n val version: Int,\n)"
},
"DcqlQueryVersionRecord": {
"kind": "data class",
"name": "DcqlQueryVersionRecord",
"module": "public",
"source": "@Serializable\ndata class DcqlQueryVersionRecord(\n val identifier: String,\n val version: Int,\n val dcqlQuery: DcqlQuery,\n val createdAt: Long,\n val createdBy: String? = null,\n)\n\n@Serializable\n@JsExportCompat\ndata class DcqlQuery(\n val credentials: List<DcqlCredentialQuery>? = null,\n val credential_sets: List<DcqlCredentialSetQuery>? = null,\n) {\n init {\n require(credentials != null || credential_sets != null) {\n \"At least one of 'credentials' or 'credential_sets' must be present\"\n }\n }\n}\n\n@Serializable\n@JsExportCompat\ndata class DcqlCredentialQuery(\n val id: String,\n val format: String? = null,\n val meta: JsonObject? = null,\n val claims: List<DcqlClaimQuery>? = null,\n val claim_sets: List<DcqlClaimSet>? = null,\n val require_cryptographic_holder_binding: Boolean = true,\n val multiple: Boolean = false,\n @SerialName(\"trusted_authorities\")\n val trusted_authorities: List<DcqlTrustedAuthority>? = null,\n) {\n /**\n * Normalized trusted authorities with duplicate types automatically combined.\n *\n * When multiple authority entries of the same type exist in trusted_authorities,\n * they are automatically combined into a single entry with all values merged.\n * This prevents logic/validation problems by external parties.\n *\n * This property is computed in the init block and always reflects the deduplicated state.\n *\n * Example:\n * ```kotlin\n * // Input during construction/deserialization:\n * listOf(\n * DcqlTrustedAuthority(\"openid_federation\", listOf(\"https://fed1.com\")),\n * DcqlTrustedAuthority(\"openid_federation\", listOf(\"https://fed2.com\"))\n * )\n * // Automatically normalized to:\n * listOf(\n * DcqlTrustedAuthority(\"openid_federation\", listOf(\"https://fed1.com\", \"https://fed2.com\"))\n * )\n * ```\n */\n @Transient\n val normalizedTrustedAuthorities: List<DcqlTrustedAuthority>? = trusted_authorities?.let { normalizeTrustedAuthorities(it) }\n\n companion object {\n /**\n * Combines multiple trusted authority entries of the same type into single entries.\n *\n * @param authorities Original list that may contain duplicate types\n * @return List with duplicate types merged, maintaining order of first occurrence\n */\n private fun normalizeTrustedAuthorities(authorities: List<DcqlTrustedAuthority>): List<DcqlTrustedAuthority> {\n if (authorities.isEmpty()) {\n return authorities\n }\n\n // Group by type and combine all values\n val grouped = authorities.groupBy { it.type }\n\n // Maintain order of first occurrence for each type\n return authorities\n .distinctBy { it.type }\n .map { firstOfType ->\n val allValues = grouped[firstOfType.type]!!.flatMap { it.values }.distinct()\n DcqlTrustedAuthority(\n type = firstOfType.type,\n values = allValues,\n )\n }\n }\n }\n}\n\n@Serializable\n@JsExportCompat\ndata class DcqlCredentialSetQuery(\n val required: Boolean = false,\n val options: List<DcqlCredentialSetOption>,\n)"
},
"RestoreDcqlQueryVersionArgs": {
"kind": "data class",
"name": "RestoreDcqlQueryVersionArgs",
"module": "public",
"source": "@Serializable\ndata class RestoreDcqlQueryVersionArgs(\n val queryId: String,\n val version: Int,\n val note: String? = null,\n)"
},
"BindVerifierDcqlArgs": {
"kind": "data class",
"name": "BindVerifierDcqlArgs",
"module": "public",
"source": "@Serializable\ndata class BindVerifierDcqlArgs(\n val verifierId: String,\n val queryId: String,\n /** Version to pin. Defaults to the DCQL query's current version when null. */\n val version: Int? = null,\n)\n\n object Defaults {\n /** Default slot interval in minutes for availability calculations */\n const val SLOT_INTERVAL_MINUTES = 30\n\n /** Default concurrency limit (how many concurrent bookings allowed) */\n const val CONCURRENCY_LIMIT = 1\n\n /** Default minimum booking duration in minutes */\n const val MIN_BOOKING_DURATION_MINUTES = 30\n\n /** Default buffer time after each booking in minutes */\n const val BUFFER_AFTER_MINUTES = 0\n\n /** Default for allowing same-day bookings */\n const val ALLOW_SAME_DAY_BOOKING = true\n }"
},
"VerifierDcqlBinding": {
"kind": "data class",
"name": "VerifierDcqlBinding",
"module": "public",
"source": "@Serializable\ndata class VerifierDcqlBinding(\n val id: String,\n val tenantId: String,\n val verifierId: String,\n val queryId: String,\n val pinnedVersion: Int,\n val enabled: Boolean = true,\n val alias: String? = null,\n val createdAt: Instant,\n val updatedAt: Instant,\n)"
},
"ListVerifierDcqlBindingsArgs": {
"kind": "data class",
"name": "ListVerifierDcqlBindingsArgs",
"module": "public",
"source": "@Serializable\ndata class ListVerifierDcqlBindingsArgs(\n val verifierId: String,\n)"
},
"VerifierDcqlBindingKey": {
"kind": "data class",
"name": "VerifierDcqlBindingKey",
"module": "public",
"source": "@Serializable\ndata class VerifierDcqlBindingKey(\n val verifierId: String,\n val queryId: String,\n)"
},
"UpdateVerifierDcqlBindingArgs": {
"kind": "data class",
"name": "UpdateVerifierDcqlBindingArgs",
"module": "public",
"source": "@Serializable\ndata class UpdateVerifierDcqlBindingArgs(\n val verifierId: String,\n val queryId: String,\n /** New pinned version. Null leaves the pinned version unchanged. */\n val pinnedVersion: Int? = null,\n /** Null leaves `enabled` unchanged. */\n val enabled: Boolean? = null,\n /** Null leaves `alias` unchanged. */\n val alias: String? = null,\n)\n\n @OptIn(ExperimentalObjCName::class)\n @ObjCName(\"cddlNull\")\n @Serializable(with = CDDLSerializer::class)\n object Null : CDDL(\"null\", MajorType.SPECIAL, 22, arrayOf(nil)) {\n fun newNull() = CborSimple.NULL\n\n fun fromJson(value: JsonElement) = CborSimple.NULL\n }\n\ninternal object CDDLSerializer : KSerializer<CDDL> {\n override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor(\"CDDL\", PrimitiveKind.STRING)\n\n override fun serialize(\n encoder: Encoder,\n value: CDDL,\n ) {\n encoder.encodeString(value.format)\n }\n\n override fun deserialize(decoder: Decoder): CDDL = CDDL.util.fromFormat(decoder.decodeString())\n}\n\n@Suppress(\"UNCHECKED_CAST\")\n@JsExportCompat\n@Serializable(with = CDDLSerializer::class)\nsealed class CDDL(\n override val format: String,\n override val majorType: MajorType? = null,\n override val info: Int? = null,\n override val aliasFor: Array<CDDLType> = arrayOf(),\n) : CDDLType {\n override fun newCborItemFromJson(\n element: JsonElement?,\n cddl: CDDLType?,\n ): CborItem<out Any?> {\n val jsonPrimitive: JsonPrimitive? = (element as? JsonPrimitive)?.jsonPrimitive\n val jsonArray: JsonArray? = (element as? JsonArray)?.jsonArray\n val jsonObject: JsonObject? = (element as? JsonObject)?.jsonObject\n val isNull: Boolean = element == JsonNull || element === null\n val isString: Boolean = jsonPrimitive?.isString == true\n\n if (isNull) {\n return CborNull()\n } else if (isString && jsonPrimitive !== null) {\n return CborString(jsonPrimitive.content)\n } else if (jsonArray !== null) {\n return list.fromJson(jsonArray)\n } else if (jsonObject !== null) {\n if (CborItemJson.isCborItemValueJson(jsonObject)) {\n val key =\n if (CborItemJson.isCborItemJson(jsonObject)) {\n (jsonObject[\"key\"] as? JsonPrimitive)?.content\n } else {\n null\n }\n val cddlStr = (jsonObject[\"cddl\"] as? JsonPrimitive)?.content\n\n if (cddlStr === null) {\n // cddl key found, but wasn't a primitive, returning a null value\n return CborNull()\n }\n val cddlObject = util.fromFormat(cddlStr)\n val cborObject = newCborItemFromJson(jsonObject[jsonObject.keys.find { it != CDDL_LITERAL && it != KEY_LITERAL }], cddlObject)\n if (key === null) {\n return cborObject\n }\n return CborMap(mutableMapOf(Pair(CborString(key), cborObject)))\n }\n // number label keys?\n return CborMap(mutableMapOf(* jsonObject.map { Pair(CborString(it.key), newCborItemFromJson(it.value)) }.toTypedArray()))\n } else if (jsonPrimitive !== null) {\n if (cddl == null) {\n return newCborItem(jsonPrimitive)\n }\n return when (cddl) {\n // Needed because we cannot have inheritance with Kotlin to JS, unfortunately. The fromJson would cause clashes if we put it in the interface\n tstr -> tstr.fromJson(jsonPrimitive)\n\n Null -> CborNull()\n\n False -> CborSimple.FALSE\n\n True -> CborSimple.TRUE\n\n bool -> bool.fromJson(jsonPrimitive)\n\n bstr -> bstr.fromJson(jsonPrimitive)\n\n bytes -> bytes.fromJson(jsonPrimitive)\n\n float -> float.fromJson(jsonPrimitive)\n\n float16 -> float16.fromJson(jsonPrimitive)\n\n float32 -> float32.fromJson(jsonPrimitive)\n\n float64 -> float64.fromJson(jsonPrimitive)\n\n full_date -> full_date.fromJson(jsonPrimitive)\n\n int -> int.fromJson(jsonPrimitive)\n\n nil -> nil.newNil()\n\n nint -> nint.fromJson(jsonPrimitive)\n\n tdate -> tdate.fromJson(jsonPrimitive)\n\n text -> text.fromJson(jsonPrimitive)\n\n time -> time.fromJson(jsonPrimitive)\n\n uint -> uint.fromJson(jsonPrimitive)\n\n undefined -> undefined.newUndefined()\n\n else -> cddl.newCborItem(jsonPrimitive)\n }\n }\n return newCborItem(element)\n }\n\n override fun <T : Any> newCborItem(origValue: T?): CborItem<out Any?> {\n // We are not using inheritance for the methods as that would impact JS export.\n // Since this is a sealed class anyway that is not too bad\n var value = origValue\n val jsonElement: JsonElement? =\n when (value) {\n is JsonPrimitive -> value\n is JsonArray -> value\n is JsonObject -> value\n is JsonNull -> value\n else -> null\n }\n if (value == null) {\n return nil.newNil()\n } else if (value == Unit) {\n return undefined.newUndefined()\n }\n return when (this) {\n tstr -> {\n if (jsonElement === null) {\n tstr.newString(value.toString())\n } else {\n tstr.fromJson(jsonElement.jsonPrimitive)\n }\n }\n\n False -> {\n False.newFalse()\n }\n\n Null -> {\n Null.newNull()\n }\n\n True -> {\n True.newTrue()\n }\n\n any -> {\n return when (value) {\n is JsonPrimitive -> {\n val prim = value\n when {\n prim.isString -> tstr.fromJson(prim)\n prim.content == \"true\" || prim.content == \"false\" -> bool.fromJson(prim)\n prim.content.contains('.') || prim.content.contains('e') || prim.content.contains('E') -> float64.fromJson(prim)\n else -> int.fromJson(prim) // Assume integer if not string, boolean, or float\n }\n }\n\n is cddl_tstr -> {\n if (jsonElement === null) {\n tstr.newString(value)\n } else {\n tstr.fromJson(jsonElement.jsonPrimitive)\n }\n }\n\n is cddl_bstr -> {\n if (jsonElement === null) {\n bstr.newByteString(value)\n } else {\n bstr.fromJson(jsonElement.jsonPrimitive)\n }\n }\n\n is cddl_tdate -> {\n if (jsonElement === null) {\n tdate.newTDate(value)\n } else {\n tdate.fromJson(jsonElement.jsonPrimitive)\n }\n }\n\n is cddl_full_date -> {\n if (jsonElement === null) {\n full_date.newFullDate(value)\n } else {\n full_date.fromJson(jsonElement.jsonPrimitive)\n }\n }\n\n is cddl_bool -> {\n if (jsonElement === null) {\n bool.newBool(value)\n } else {\n bool.fromJson(jsonElement.jsonPrimitive)\n }\n }\n\n // Use consolidated Number handling for JS/WasmJs compatibility\n // (on JS, all numeric `is` checks match any Number, making individual checks unreliable)\n is Number -> {\n if (jsonElement === null) {\n value.toCborItem()\n } else {\n val d = value.toDouble()\n if (d != kotlin.math.floor(d) || d.isInfinite() || d.isNaN()) {\n float64.fromJson(jsonElement.jsonPrimitive)\n } else {\n int.fromJson(jsonElement.jsonPrimitive)\n }\n }\n }\n\n is cddl_list<*> -> {\n if (jsonElement === null) {\n list.newList(\n value\n .map {\n if (it is CborItem<*>) {\n it\n } else {\n any.newCborItem(\n it,\n )\n }\n }.toMutableList(),\n )\n } else {\n list.fromJson(jsonElement.jsonArray)\n }\n }\n\n is cddl_map<*, *> -> {\n if (jsonElement === null) {\n map.newMap(\n mutableMapOf(\n * value\n .map {\n Pair(\n if (it.key is CborItem<*>) {\n it.key as CborItem<*>\n } else {\n any.newCborItem(it.key)\n },\n if (it.value is CborItem<*>) {\n it.value as CborItem<*>\n } else {\n any.newCborItem(it.value)\n },\n )\n }.toTypedArray(),\n ),\n )\n } else {\n map.fromJson(jsonElement.jsonObject)\n }\n }\n\n else -> {\n throw IllegalArgumentException(\"newCborItem for $value Not implemented yet\")\n }\n }\n }\n\n bool -> {\n if (jsonElement === null) {\n bool.newBool(value == true)\n } else {\n bool.fromJson(jsonElement.jsonPrimitive)\n }\n }\n\n bstr -> {\n if (jsonElement === null) {\n bstr.newByteString(value as ByteArray)\n } else {\n bstr.fromJson(jsonElement.jsonPrimitive)\n }\n }\n\n bstr_indef_length -> {\n if (jsonElement === null) {\n bstr_indef_length.newByteString(value as List<cddl_bstr>)\n } else {\n TODO(\"indef cddl from json not implemented yet\")\n }\n }\n\n bytes -> {\n if (jsonElement === null) {\n bytes.newBytes(value as ByteArray)\n } else {\n bytes.fromJson(jsonElement.jsonPrimitive)\n }\n }\n\n float -> {\n if (jsonElement === null) {\n float.newFloat(value as Float)\n } else {\n float.fromJson(jsonElement.jsonPrimitive)\n }\n }\n\n float16 -> {\n if (jsonElement === null) {\n float16.newFloat16(value as Float)\n } else {\n float16.fromJson(jsonElement.jsonPrimitive)\n }\n }\n\n float32 -> {\n if (jsonElement === null) {\n float32.newFloat32(value as Float)\n } else {\n float32.fromJson(jsonElement.jsonPrimitive)\n }\n }\n\n float64 -> {\n if (jsonElement === null) {\n float64.newFloat64(value as Double)\n } else {\n float64.fromJson(jsonElement.jsonPrimitive)\n }\n }\n\n full_date -> {\n if (jsonElement === null) {\n full_date.newFullDate(value as cddl_full_date)\n } else {\n full_date.fromJson(jsonElement.jsonPrimitive)\n }\n }\n\n int -> {\n if (jsonElement === null) {\n int.newInt(value as Int)\n } else {\n int.fromJson(jsonElement.jsonPrimitive)\n }\n }\n\n list -> {\n if (jsonElement === null) {\n if (value is CborArray<*>) {\n value\n } else {\n list.newList(\n (value as List<*>)\n .map {\n if (it is CborItem<*>) {\n it\n } else {\n any.newCborItem(\n it,\n )\n }\n }.toMutableList(),\n )\n }\n } else {\n list.fromJson(jsonElement.jsonArray)\n }\n }\n\n map -> {\n if (jsonElement === null) {\n if (value is CborMap<*, *>) {\n value\n } else {\n map.newMap(\n mutableMapOf(\n * (value as Map<*, *>)\n .map {\n Pair(\n if (it.key is CborItem<*>) {\n it.key as CborItem<*>\n } else {\n any.newCborItem(it.key)\n },\n if (it.value is CborItem<*>) {\n it.value as CborItem<*>\n } else {\n any.newCborItem(it.value)\n },\n )\n }.toTypedArray(),\n ),\n ) // fixme. Needs inspection of keys and values and map type\n }\n } else {\n return map.fromJson(jsonElement.jsonObject)\n }\n }\n\n nil -> {\n nil.newNil()\n }\n\n nint -> {\n if (jsonElement === null) {\n nint.newNInt(\n if (value is Number) {\n value.toLong()\n } else {\n value as Long\n }\n )\n } else {\n nint.fromJson(\n jsonElement.jsonPrimitive,\n )\n }\n }\n\n tdate -> {\n if (jsonElement === null) {\n tdate.newTDate(value as cddl_tdate)\n } else {\n tdate.fromJson(jsonElement.jsonPrimitive)\n }\n }\n\n text -> {\n if (jsonElement === null) {\n text.newText(value as cddl_text)\n } else {\n text.fromJson(jsonElement.jsonPrimitive)\n }\n }\n\n time -> {\n if (jsonElement === null) {\n time.newTime(value as cddl_time)\n } else {\n time.fromJson(jsonElement.jsonPrimitive)\n }\n }\n\n tstr_indef_length -> {\n if (jsonElement !== null) {\n tstr_indef_length.newStringIndefLength(value as List<cddl_tstr>)\n } else {\n TODO(\"tstr indef length from json to cbor not implemented\")\n }\n }\n\n uint -> {\n if (jsonElement === null) {\n uint.newUint(\n if (value is Long) {\n value\n } else if (value is Number) {\n value.toLong()\n } else {\n value as Long\n },\n )\n } else {\n uint.fromJson(\n jsonElement.jsonPrimitive,\n )\n }\n }\n\n undefined -> {\n undefined.newUndefined()\n }\n }\n }\n\n @OptIn(ExperimentalObjCName::class)\n @ObjCName(\"cddlTstr\")\n object tstr : CDDL(\"tstr\", MajorType.UNICODE_STRING) {\n fun newString(value: cddl_tstr) = CborString(value)\n\n fun fromJson(value: JsonPrimitive) = CborString(value.content)\n }\n\n @Serializable(with = CDDLSerializer::class)\n @OptIn(ExperimentalObjCName::class)\n @ObjCName(\"cddlUint\")\n object uint : CDDL(\"uint\", MajorType.UNSIGNED_INTEGER) {\n fun newUint(value: cddl_uint) = CborUInt(value)\n\n fun fromJson(value: JsonPrimitive) = CborUInt(value.content.toLong())\n }\n\n @Serializable(with = CDDLSerializer::class)\n @OptIn(ExperimentalObjCName::class)\n @ObjCName(\"cddlNint\")\n object nint : CDDL(\"nint\", MajorType.NEGATIVE_INTEGER) {\n fun newNInt(value: cddl_nint) = CborNInt(value)\n\n fun fromJson(value: JsonPrimitive) = CborNInt(value.content.toLong())\n }\n\n @Serializable(with = CDDLSerializer::class)\n @OptIn(ExperimentalObjCName::class)\n @ObjCName(\"cddlInt\")\n object int :\n CDDL(\"int\", null, null, aliasFor = arrayOf(uint, nint)) {\n fun newInt(value: Int) =\n if (value < 0) {\n CborNInt(value.toLong())\n } else {\n CborUInt(value.toLong())\n }\n\n fun newLong(value: Long) =\n if (value < 0) {\n CborNInt(value)\n } else {\n CborUInt(value)\n }\n\n fun fromJson(value: JsonPrimitive) =\n if (value.long < 0) {\n CborNInt(value.long)\n } else {\n CborUInt(value.long)\n }\n }\n\n @Serializable(with = CDDLSerializer::class)\n @OptIn(ExperimentalObjCName::class)\n @ObjCName(\"cddlBstr\")\n object bstr : CDDL(\"bstr\", MajorType.BYTE_STRING) {\n fun newByteString(value: cddl_bstr) = CborByteString(value)\n\n fun fromJson(\n value: JsonPrimitive,\n encoding: Encoding = Encoding.BASE64URL,\n ) = CborByteString(value.content.decodeFrom(encoding))\n }\n\n @Serializable(with = CDDLSerializer::class)\n @OptIn(ExperimentalObjCName::class)\n @ObjCName(\"cddlBstrIndefLength\")\n object bstr_indef_length : CDDL(\"bstr\", MajorType.BYTE_STRING) {\n fun newByteString(value: List<cddl_bstr>) = CborByteStringIndefLength(value)\n\n fun fromJson(\n value: JsonArray,\n encoding: Encoding = Encoding.BASE64URL,\n ): CborByteStringIndefLength = TODO(\"indef length from json to cbor not implemented yet\")\n }\n\n @Serializable(with = CDDLSerializer::class)\n @OptIn(ExperimentalObjCName::class)\n @ObjCName(\"cddlBytes\")\n object bytes : CDDL(\"bytes\", MajorType.BYTE_STRING, aliasFor = arrayOf(bstr)) {\n fun newBytes(value: cddl_bstr) = CborByteString(value)\n\n fun fromJson(\n value: JsonPrimitive,\n encoding: Encoding = Encoding.BASE64URL,\n ) = CborByteString(value.content.decodeFrom(encoding))\n }\n\n @Serializable(with = CDDLSerializer::class)\n @OptIn(ExperimentalObjCName::class)\n @ObjCName(\"cddlTstrIndefLength\")\n object tstr_indef_length : CDDL(\"tstr\", MajorType.UNICODE_STRING) {\n fun newStringIndefLength(value: List<cddl_tstr>) = CborStringIndefLength(value)\n\n fun fromJson(\n value: JsonArray,\n encoding: Encoding = Encoding.BASE64URL,\n ): CborStringIndefLength = TODO(\"indef length from json to cbor not implemented yet\")\n }\n\n @Serializable(with = CDDLSerializer::class)\n @OptIn(ExperimentalObjCName::class)\n @ObjCName(\"cddlText\")\n object text : CDDL(\"text\", MajorType.UNICODE_STRING, aliasFor = arrayOf(tstr)) {\n fun newText(value: cddl_text) = CborString(value)\n\n fun fromJson(value: JsonPrimitive) = CborString(value.content)\n }\n\n @Serializable(with = CDDLSerializer::class)\n @OptIn(ExperimentalObjCName::class)\n @ObjCName(\"cddlTdate\")\n object tdate : CDDL(\n \"tdate\",\n MajorType.TAG,\n DATE_TIME_STRING,\n ) { // RFC 7049, section 2.4.1, a tdate data item shall contain a date-time string as specified in RFC 3339\n fun newTDate(value: cddl_tdate) = CborTDate(value)\n\n fun fromJson(value: JsonPrimitive) = CborTDate(value.content)\n }\n\n @Serializable(with = CDDLSerializer::class)\n @OptIn(ExperimentalObjCName::class)\n @ObjCName(\"cddlFullDate\")\n object full_date : CDDL(\n \"full-date\",\n MajorType.TAG,\n CborTagged.FULL_DATE_STRING,\n ) { // #6.1004(tstr) In accordance with RFC 8943, a full-date data item shall contain a full-datestring as specified in RFC 3339.\n fun newFullDate(value: cddl_full_date) = CborFullDate(value)\n\n fun fromJson(value: JsonPrimitive) = CborFullDate(value.content)\n }\n\n @Serializable(with = CDDLSerializer::class)\n @OptIn(ExperimentalObjCName::class)\n @ObjCName(\"cddlTime\")\n object time : CDDL(\n \"time\",\n MajorType.TAG,\n CborTagged.DATE_TIME_NUMBER,\n ) { // RFC 7049, section 2.4.1, a tdate data item shall contain a date-time number as specified in RFC 3339\n fun newTime(value: cddl_time) = CborTime(value)\n\n fun fromJson(value: JsonPrimitive) = CborTime(value.content.toLong())\n }\n\n @Serializable(with = CDDLSerializer::class)\n @OptIn(ExperimentalObjCName::class)\n @ObjCName(\"cddlFloat16\")\n object float16 : CDDL(\"float16\", MajorType.SPECIAL, 25) {\n fun newFloat16(value: cddl_float16) = CborFloat16(value)\n\n fun fromJson(value: JsonPrimitive) = CborFloat16(value.float)\n }\n\n @Serializable(with = CDDLSerializer::class)\n @OptIn(ExperimentalObjCName::class)\n @ObjCName(\"cddlFloat32\")\n object float32 : CDDL(\"float32\", MajorType.SPECIAL, 26) {\n fun newFloat32(value: cddl_float32) = CborFloat32(value)\n\n fun fromJson(value: JsonPrimitive) = CborFloat32(value.float)\n }\n\n @Serializable(with = CDDLSerializer::class)\n @OptIn(ExperimentalObjCName::class)\n @ObjCName(\"cddlFloat64\")\n object float64 : CDDL(\"float64\", MajorType.SPECIAL, 27) {\n fun newFloat64(value: cddl_float64) = CborDouble(value)\n\n fun fromJson(value: JsonPrimitive) = CborDouble(value.double)\n }\n\n @Serializable(with = CDDLSerializer::class)\n @OptIn(ExperimentalObjCName::class)\n @ObjCName(\"cddlFloat\")\n object float : CDDL(\"float\", MajorType.SPECIAL, aliasFor = arrayOf(float16, float32, float64)) {\n fun newFloat(value: cddl_float) = CborFloat32(value)\n\n fun fromJson(value: JsonPrimitive) = CborFloat32(value.float)\n }\n\n @OptIn(ExperimentalObjCName::class)\n @ObjCName(\"cddlFalse\")\n @Serializable(with = CDDLSerializer::class)\n object False : CDDL(\"false\", MajorType.SPECIAL, 20) {\n fun newFalse() = CborSimple.FALSE\n\n fun fromJson(value: JsonPrimitive) = CborSimple.FALSE\n }\n\n @OptIn(ExperimentalObjCName::class)\n @ObjCName(\"cddlTrue\")\n @Serializable(with = CDDLSerializer::class)\n object True : CDDL(\"true\", MajorType.SPECIAL, 21) {\n fun newTrue() = CborSimple.TRUE\n\n fun fromJson(value: JsonPrimitive) = CborSimple.TRUE\n }\n\n @Serializable(with = CDDLSerializer::class)\n @OptIn(ExperimentalObjCName::class)\n @ObjCName(\"cddlBool\")\n object bool :\n CDDL(\"bool\", MajorType.SPECIAL, aliasFor = arrayOf(False, True)) {\n fun newBool(value: cddl_bool) =\n if (value) {\n CborSimple.TRUE\n } else {\n CborSimple.FALSE\n }\n\n fun fromJson(value: JsonPrimitive) =\n if (value.boolean) {\n CborSimple.TRUE\n } else {\n CborSimple.FALSE\n }\n }\n\n @Serializable(with = CDDLSerializer::class)\n @OptIn(ExperimentalObjCName::class)\n @ObjCName(\"cddlNil\")\n object nil : CDDL(\"nil\", MajorType.SPECIAL, 22) {\n fun newNil() = CborSimple.NULL\n\n fun fromJson(value: JsonElement) = CborSimple.NULL\n }\n\n @OptIn(ExperimentalObjCName::class)\n @ObjCName(\"cddlNull\")\n @Serializable(with = CDDLSerializer::class)\n object Null : CDDL(\"null\", MajorType.SPECIAL, 22, arrayOf(nil)) {\n fun newNull() = CborSimple.NULL\n\n fun fromJson(value: JsonElement) = CborSimple.NULL\n }\n\n @Serializable(with = CDDLSerializer::class)\n @OptIn(ExperimentalObjCName::class)\n @ObjCName(\"cddlUndefined\")\n object undefined :\n CDDL(\"undefined\", MajorType.SPECIAL, 23) {\n fun newUndefined() = CborSimple.UNDEFINED\n\n fun fromJson(value: JsonElement) = CborSimple.UNDEFINED\n }\n\n @Serializable(with = CDDLSerializer::class)\n @OptIn(ExperimentalObjCName::class)\n @ObjCName(\"cddlMap\")\n object map :\n CDDL(\n \"map\",\n MajorType.MAP,\n ) {\n fun newMap(value: MutableMap<CborItem<*>, CborItem<*>>): CborItem<MutableMap<CborItem<*>, CborItem<*>>> = CborMap(value)\n\n /**\n * Please note that this method is not able to map onto the exact Cbor items as the json values have no type information!\n */\n fun fromJson(value: JsonObject): CborMap<CborString, CborItem<*>> =\n CborMap(\n value.entries\n .map {\n Pair(\n CborString(it.key),\n when (it.value) {\n is JsonPrimitive -> any.fromJson(it.value)\n is JsonArray -> list.fromJson(it.value as JsonArray)\n is JsonObject -> fromJson(it.value as JsonObject)\n else -> throw IllegalArgumentException(\"Unknown type encountered\")\n },\n )\n }.toMap()\n .toMutableMap(),\n )\n }\n\n @Serializable(with = CDDLSerializer::class)\n @OptIn(ExperimentalObjCName::class)\n @ObjCName(\"cddlList\")\n object list :\n CDDL(\n \"list\",\n MajorType.ARRAY,\n ) {\n fun <T : CborItem<*>> newList(value: cddl_list<T>) = CborArray(value)\n\n /**\n * Please note that this method is not able to map onto the exact Cbor items as the json values have no type information!\n */\n fun fromJson(value: JsonArray): CborArray<CborItem<*>> =\n CborArray(\n value\n .map { elt ->\n when (elt) {\n is JsonPrimitive -> {\n any.fromJson(elt)\n }\n\n is JsonArray -> {\n fromJson(elt)\n }\n\n is JsonObject -> {\n if (CborItemJson.isCborItemValueJson(elt)) {\n newCborItemFromJson(\n elt,\n elt[CDDL_LITERAL]?.jsonPrimitive?.content?.let { CDDL.util.fromFormat(it) },\n )\n } else {\n map.fromJson(elt)\n }\n }\n\n else -> {\n throw IllegalArgumentException(\"Unknown type encountered\")\n }\n }\n }.toMutableList(),\n )\n }\n\n @Serializable(with = CDDLSerializer::class)\n @OptIn(ExperimentalObjCName::class)\n @ObjCName(\"cddlAny\")\n object any :\n CDDL(\n \"any\",\n ) {\n fun newAny(value: cddl_any) = CborAny(value)\n\n fun fromJson(value: JsonElement): CborItem<*> {\n return newCborItemFromJson(value)\n// TODO(\"Json any to cbor not implemeted yet\")\n }\n }\n\n override fun toTag(additionalInfo: Int?): String {\n if (aliasFor.isNotEmpty()) {\n if (additionalInfo == null) {\n return aliasFor[0].toTag(additionalInfo)\n }\n\n // fixme: this is not correct. We first need to traverse the aliases, as an alias could go without major and additional info\n return util.entries\n .first { it.majorType == majorType && it.info == additionalInfo }\n .toTag(additionalInfo)\n }\n\n var tag = \"#\"\n if (majorType != null) {\n tag += majorType\n }\n if (additionalInfo != null) {\n tag += \".$additionalInfo\"\n }\n return tag\n }\n\n override fun toString(): String = \"CDDL(format='$format', majorType=$majorType, info=$info, aliasFor=${aliasFor.contentToString()})\"\n\n override fun equals(other: Any?): Boolean {\n if (this === other) {\n return true\n }\n if (other !is CDDL) {\n return false\n }\n\n if (format != other.format) {\n return false\n }\n if (majorType != other.majorType) {\n return false\n }\n if (info != other.info) {\n return false\n }\n if (!aliasFor.contentEquals(other.aliasFor)) {\n return false\n }\n\n return true\n }\n\n override fun hashCode(): Int {\n var result = format.hashCode()\n result = 31 * result + (majorType?.hashCode() ?: 0)\n result = 31 * result + (info ?: 0)\n result = 31 * result + aliasFor.contentHashCode()\n return result\n }\n\n object util {\n // Lazy for serialization as this class is used as object in the above CDDL class\n val entries by lazy {\n arrayOf(\n any,\n uint,\n int,\n nint,\n bstr,\n bstr_indef_length,\n bytes,\n tstr,\n tstr_indef_length,\n text,\n tdate,\n full_date,\n time,\n float,\n False,\n True,\n bool,\n nil,\n Null,\n undefined,\n float16,\n float32,\n float64,\n map,\n list,\n )\n }\n\n fun fromFormat(format: String) = entries.first { it.format == format }\n\n fun fromTag(tag: String): CDDL {\n require(tag.startsWith(\"#\")) { \"Invalid tag supplied $tag\" }\n val parts = tag.split(\"#\", \".\")\n if (parts.size == 1) {\n return any\n }\n val majorVal = parts[1].toIntOrNull()\n return fromMajorType(majorVal?.let { MajorType.fromInt(it) }, parts[2].toIntOrNull())\n }\n\n fun fromBytes(input: Int): CDDL {\n val majorType = input shr 5\n\n // todo additionalInto\n return fromMajorType(MajorType.fromInt(majorType))\n }\n\n fun fromMajorType(\n majorType: MajorType? = null,\n additionalInfo: Int? = null,\n ) = entries.first {\n it.majorType == majorType && it.info == additionalInfo\n }\n }\n}\n\n@OptIn(ExperimentalObjCName::class)\n@ObjCName(\"MajorType\", exact = true)\n@Serializable\n@JsExportCompat\nenum class MajorType(\n val type: Int,\n) {\n /**\n * Major type 0.\n *\n * An unsigned integer in the range 0..2^64-1 inclusive. The value of the encoded item is the\n * argument itself. For example, the integer 10 is denoted as the one byte 0b000_01010 (major\n * type 0, additional information 10). The integer 500 would be 0b000_11001 (major type 0,\n * additional information 25) followed by the two bytes 0x01f4, which is 500 in decimal.\n */\n UNSIGNED_INTEGER(0),\n\n /**\n * Major type 1.\n *\n * A negative integer in the range -2^64..-1 inclusive. The value of the item is -1 minus\n * the argument. For example, the integer -500 would be 0b001_11001 (major type 1, additional\n * information 25) followed by the two bytes 0x01f3, which is 499 in decimal.\n */\n NEGATIVE_INTEGER(1),\n\n /**\n * Major type 2.\n *\n * A byte string. The number of bytes in the string is equal to the argument. For example,\n * a byte string whose length is 5 would have an initial byte of 0b010_00101 (major type 2,\n * additional information 5 for the length), followed by 5 bytes of binary content. A byte\n * string whose length is 500 would have 3 initial bytes of 0b010_11001 (major type 2,\n * additional information 25 to indicate a two-byte length) followed by the two bytes 0x01f4\n * for a length of 500, followed by 500 bytes of binary content.\n */\n BYTE_STRING(2),\n\n /**\n * Major type 3.\n *\n * A text string (Section 2) encoded as UTF-8 [RFC3629]. The number of bytes in the string\n * is equal to the argument. A string containing an invalid UTF-8 sequence is well-formed\n * but invalid (Section 1.2). This type is provided for systems that need to interpret or\n * display human-readable text, and allows the differentiation between unstructured bytes\n * and text that has a specified repertoire (that of Unicode) and encoding (UTF-8). In\n * contrast to formats such as JSON, the Unicode characters in this type are never escaped.\n * Thus, a newline character (U+000A) is always represented in a string as the byte 0x0a,\n * and never as the bytes 0x5c6e (the characters \"\\\" and \"n\") nor as 0x5c7530303061 (the\n * characters \"\\\", \"u\", \"0\", \"0\", \"0\", and \"a\").\n */\n UNICODE_STRING(3),\n\n /**\n * Major type 4.\n * An array of data items. In other formats, arrays are also called lists, sequences, or\n * tuples (a \"CBOR sequence\" is something slightly different, though [RFC8742]). The argument\n * is the number of data items in the array. Items in an array do not need to all be of the\n * same type. For example, an array that contains 10 items of any type would have an initial\n * byte of 0b100_01010 (major type 4, additional information 10 for the length) followed by\n * the 10 remaining items.\n */\n ARRAY(4),\n\n /**\n * Major type 5.\n *\n * A map of pairs of data items. Maps are also called tables, dictionaries, hashes, or\n * objects (in JSON). A map is comprised of pairs of data items, each pair consisting of a\n * key that is immediately followed by a value. The argument is the number of pairs of data\n * items in the map. For example, a map that contains 9 pairs would have an initial byte of\n * 0b101_01001 (major type 5, additional information 9 for the number of pairs) followed by\n * the 18 remaining items. The first item is the first key, the second item is the first\n * value, the third item is the second key, and so on. Because items in a map come in pairs,\n * their total number is always even: a map that contains an odd number of items (no value\n * data present after the last key data item) is not well-formed. A map that has duplicate\n * keys may be well-formed, but it is not valid, and thus it causes indeterminate decoding;\n * see also Section 5.6.\n */\n MAP(5),\n\n /**\n * Major type 6.\n *\n * A tagged data item (\"tag\") whose tag number, an integer in the range 0..2^64-1 inclusive,\n * is the argument and whose enclosed data item (tag content) is the single encoded data item\n * that follows the head. See Section 3.4.\n */\n TAG(6),\n\n /**\n * Major type 7.\n *\n * Floating-point numbers and simple values, as well as the \"break\" stop code. See Section 3.3.\n */\n SPECIAL(7),\n ;\n\n companion object {\n /**\n * Gets a [MajorType] instance from type.\n *\n * @param value an integer between 0 and 7, both inclusive\n * @return a [MajorType] for the given value.\n */\n @JsStatic\n @JvmStatic\n fun fromInt(value: Int): MajorType =\n entries.find { it.type == value }\n ?: throw IllegalArgumentException(\"Unknown major type with value $value\")\n }\n}\n\nabstract class CborSimple<Type : Any?>(\n value: Type,\n cddl: CDDL,\n) : CborItem<Type>(value, cddl) {\n init {\n val info =\n when (cddl) {\n is CDDL.bool -> {\n when (value) {\n true -> CDDL.True.info\n else -> CDDL.False.info\n }\n }\n\n else -> {\n cddl.info\n }\n }\n require(info != null)\n require(info is Int)\n check(info < 24 || (info in 32..255))\n }\n\n override fun encode(builder: ByteStringBuilder) {\n val majorTypeShifted = (majorType!!.type shl 5).toByte()\n builder.append(majorTypeShifted.or(info!!.toByte()))\n }\n\n override fun equals(other: Any?): Boolean = other is CborSimple<*> && value == other.value\n\n override fun hashCode(): Int = value.hashCode()\n\n override fun toString() =\n when (this) {\n FALSE -> \"Simple(FALSE)\"\n TRUE -> \"Simple(TRUE)\"\n NULL -> \"Simple(NULL)\"\n UNDEFINED -> \"Simple(UNDEFINED)\"\n else -> \"Simple($value)\"\n }\n\n companion object {\n /** The [Simple] value for FALSE */\n @OptIn(ExperimentalObjCName::class)\n @ObjCName(\"CBOR_FALSE\")\n @JsStatic\n @JvmStatic\n val FALSE = CborFalse()\n\n /** The [Simple] value for TRUE */\n @OptIn(ExperimentalObjCName::class)\n @ObjCName(\"CBOR_TRUE\")\n @JsStatic\n @JvmStatic\n val TRUE = CborTrue()\n\n /** The [Simple] value for NULL */\n @OptIn(ExperimentalObjCName::class)\n @ObjCName(\"CBOR_NULL\")\n @JsStatic\n @JvmStatic\n val NULL = CborNull()\n\n /** The [Simple] value for UNDEFINED */\n @JsStatic\n @JvmStatic\n val UNDEFINED = CborUndefined()\n }\n}"
},
"ScheduleVerifierDcqlActivationArgs": {
"kind": "data class",
"name": "ScheduleVerifierDcqlActivationArgs",
"module": "public",
"source": "@Serializable\ndata class ScheduleVerifierDcqlActivationArgs(\n val verifierId: String,\n val queryId: String,\n /** Version to pin at activation time. Defaults to the DCQL query's current version when null. */\n val pinnedVersion: Int? = null,\n val effectiveAt: Instant,\n)\n\n object Defaults {\n /** Default slot interval in minutes for availability calculations */\n const val SLOT_INTERVAL_MINUTES = 30\n\n /** Default concurrency limit (how many concurrent bookings allowed) */\n const val CONCURRENCY_LIMIT = 1\n\n /** Default minimum booking duration in minutes */\n const val MIN_BOOKING_DURATION_MINUTES = 30\n\n /** Default buffer time after each booking in minutes */\n const val BUFFER_AFTER_MINUTES = 0\n\n /** Default for allowing same-day bookings */\n const val ALLOW_SAME_DAY_BOOKING = true\n }"
},
"VerifierDcqlScheduledActivation": {
"kind": "data class",
"name": "VerifierDcqlScheduledActivation",
"module": "public",
"source": "@Serializable\ndata class VerifierDcqlScheduledActivation(\n val activationId: String,\n val verifierId: String,\n val queryId: String,\n /** The resolved concrete version pinned by this activation. */\n val pinnedVersion: Int,\n val effectiveAt: Instant,\n val status: ScheduledActivationStatus,\n)\n\n@Serializable\nenum class ScheduledActivationStatus {\n PENDING,\n APPLIED,\n CANCELLED,\n FAILED,\n}"
},
"CancelVerifierDcqlActivationArgs": {
"kind": "data class",
"name": "CancelVerifierDcqlActivationArgs",
"module": "public",
"source": "@Serializable\ndata class CancelVerifierDcqlActivationArgs(\n val verifierId: String,\n val queryId: String,\n val activationId: String,\n)"
},
"ListVerifiersForDcqlArgs": {
"kind": "data class",
"name": "ListVerifiersForDcqlArgs",
"module": "public",
"source": "@Serializable\ndata class ListVerifiersForDcqlArgs(\n val queryId: String,\n)"
},
"CreatePersonArgs": {
"kind": "data class",
"name": "CreatePersonArgs",
"module": "service-api",
"source": "@Serializable\ndata class CreatePersonArgs(\n val displayName: String,\n val firstName: String? = null,\n val middleName: String? = null,\n val lastName: String? = null,\n val birthDate: LocalDate? = null,\n val origin: PartyOrigin = PartyOrigin.MANAGED,\n val uri: String? = null,\n val jurisdiction: String? = null,\n val ownerId: Uuid? = null,\n val organizationUnitId: Uuid? = null,\n)\n\n@JsExportCompat\n@Serializable\nenum class PartyOrigin {\n /** Party was synced from an outside source (IdP, external system, import, auto-discovery) */\n @SerialName(\"external\")\n EXTERNAL,\n\n /** Party was created and is managed natively within this system */\n @SerialName(\"managed\")\n MANAGED,\n}\n\n@JsExportCompat\n@Serializable\ndata class Party\n @JvmOverloads\n constructor(\n /** Unique identifier for the party */\n @SerialName(\"id\")\n val partyId: Uuid,\n /** Tenant this party belongs to */\n @SerialName(\"tenantId\")\n val tenantId: String,\n /** The type of party */\n @SerialName(\"partyType\")\n val partyType: PartyType,\n /** Origin of the party (external/managed) */\n val origin: PartyOrigin,\n /**\n * User-friendly display name (editable by user). Non-null: abstract\n * identity-backed parties get filled with the identity's own UUID at\n * create-time so the schema invariant holds without a semantically-\n * empty sentinel; concrete Party roles (NaturalPerson / Organization /\n * Contact / OID4VCI-issuer / OID4VP-verifier / credential-template)\n * populate this with a meaningful human-readable name.\n */\n @SerialName(\"displayName\")\n val displayName: String,\n /** Optional URI for the party (DID, URL, etc.) */\n val uri: String? = null,\n /** Primary jurisdiction for this party (ISO 3166-1 code or region, e.g. \"EU\", \"US\", \"NL\") */\n val jurisdiction: String? = null,\n /** Reference to the owning party (for identities, this is the person/org that owns the identity) */\n @SerialName(\"ownerId\")\n val ownerId: Uuid? = null,\n /** When the party was created */\n @SerialName(\"createdAt\")\n val createdAt: Instant,\n /** Who created the party (party ID) */\n @SerialName(\"createdById\")\n val createdById: Uuid? = null,\n /** When the party was last updated */\n @SerialName(\"updatedAt\")\n val updatedAt: Instant,\n /** Who last updated the party (party ID) */\n @SerialName(\"updatedById\")\n val updatedById: Uuid? = null,\n /** When the party was soft-deleted (null if not deleted) */\n @SerialName(\"deletedAt\")\n val deletedAt: Instant? = null,\n /** Who deleted the party (party ID) */\n @SerialName(\"deletedById\")\n val deletedById: Uuid? = null,\n ) : HasId {\n override val id: String get() = partyId.toString()\n }"
},
"Person": {
"kind": "data class",
"name": "Person",
"module": "public",
"source": " * data class Person(val name: String, val age: Int)"
},
"GetPersonArgs": {
"kind": "data class",
"name": "GetPersonArgs",
"module": "service-api",
"source": "@Serializable\ndata class GetPersonArgs(val id: Uuid, val include: Set<String> = emptySet())"
},
"ListPersonsArgs": {
"kind": "data class",
"name": "ListPersonsArgs",
"module": "service-api",
"source": "@Serializable\ndata class ListPersonsArgs(\n val firstName: String? = null,\n val lastName: String? = null,\n val displayName: String? = null,\n val page: PageRequest = PageRequest.DEFAULT,\n val include: Set<String> = emptySet(),\n)\n\n@Serializable\n@JsExportCompat\ndata class PageRequest(\n val pageToken: String? = null,\n val pageSize: Int = DEFAULT_PAGE_SIZE,\n) {\n init {\n require(pageSize in 1..MAX_PAGE_SIZE) {\n \"pageSize must be in 1..$MAX_PAGE_SIZE (was $pageSize)\"\n }\n }\n\n companion object {\n const val DEFAULT_PAGE_SIZE: Int = 50\n const val MAX_PAGE_SIZE: Int = 500\n }\n}"
},
"UpdatePersonArgs": {
"kind": "data class",
"name": "UpdatePersonArgs",
"module": "service-api",
"source": "@Serializable\ndata class UpdatePersonArgs(\n val id: Uuid,\n val displayName: String? = null,\n val firstName: String? = null,\n val middleName: String? = null,\n val lastName: String? = null,\n val birthDate: LocalDate? = null,\n val uri: String? = null,\n val jurisdiction: String? = null,\n val organizationUnitId: Uuid? = null,\n)"
},
"DeletePersonArgs": {
"kind": "data class",
"name": "DeletePersonArgs",
"module": "service-api",
"source": "@Serializable\ndata class DeletePersonArgs(val id: Uuid)"
},
"DeletePersonResult": {
"kind": "data class",
"name": "DeletePersonResult",
"module": "service-api",
"source": "@Serializable\ndata class DeletePersonResult(val deleted: Boolean)"
},
"CreateOrganizationArgs": {
"kind": "data class",
"name": "CreateOrganizationArgs",
"module": "service-api",
"source": "@Serializable\ndata class CreateOrganizationArgs(\n val displayName: String,\n val legalName: String,\n val organizationType: String? = null,\n val industry: String? = null,\n val contactEmail: String? = null,\n val websiteUrl: String? = null,\n val privacyPolicyUri: String? = null,\n val tosUri: String? = null,\n val origin: PartyOrigin = PartyOrigin.MANAGED,\n val uri: String? = null,\n val jurisdiction: String? = null,\n val ownerId: Uuid? = null,\n val organizationUnitId: Uuid? = null,\n)\n\n@JsExportCompat\n@Serializable\nenum class PartyOrigin {\n /** Party was synced from an outside source (IdP, external system, import, auto-discovery) */\n @SerialName(\"external\")\n EXTERNAL,\n\n /** Party was created and is managed natively within this system */\n @SerialName(\"managed\")\n MANAGED,\n}\n\n@JsExportCompat\n@Serializable\ndata class Party\n @JvmOverloads\n constructor(\n /** Unique identifier for the party */\n @SerialName(\"id\")\n val partyId: Uuid,\n /** Tenant this party belongs to */\n @SerialName(\"tenantId\")\n val tenantId: String,\n /** The type of party */\n @SerialName(\"partyType\")\n val partyType: PartyType,\n /** Origin of the party (external/managed) */\n val origin: PartyOrigin,\n /**\n * User-friendly display name (editable by user). Non-null: abstract\n * identity-backed parties get filled with the identity's own UUID at\n * create-time so the schema invariant holds without a semantically-\n * empty sentinel; concrete Party roles (NaturalPerson / Organization /\n * Contact / OID4VCI-issuer / OID4VP-verifier / credential-template)\n * populate this with a meaningful human-readable name.\n */\n @SerialName(\"displayName\")\n val displayName: String,\n /** Optional URI for the party (DID, URL, etc.) */\n val uri: String? = null,\n /** Primary jurisdiction for this party (ISO 3166-1 code or region, e.g. \"EU\", \"US\", \"NL\") */\n val jurisdiction: String? = null,\n /** Reference to the owning party (for identities, this is the person/org that owns the identity) */\n @SerialName(\"ownerId\")\n val ownerId: Uuid? = null,\n /** When the party was created */\n @SerialName(\"createdAt\")\n val createdAt: Instant,\n /** Who created the party (party ID) */\n @SerialName(\"createdById\")\n val createdById: Uuid? = null,\n /** When the party was last updated */\n @SerialName(\"updatedAt\")\n val updatedAt: Instant,\n /** Who last updated the party (party ID) */\n @SerialName(\"updatedById\")\n val updatedById: Uuid? = null,\n /** When the party was soft-deleted (null if not deleted) */\n @SerialName(\"deletedAt\")\n val deletedAt: Instant? = null,\n /** Who deleted the party (party ID) */\n @SerialName(\"deletedById\")\n val deletedById: Uuid? = null,\n ) : HasId {\n override val id: String get() = partyId.toString()\n }"
},
"Organization": {
"kind": "data class",
"name": "Organization",
"module": "public",
"source": "@JsExportCompat\n@Serializable\n@SerialName(\"organization\")\ndata class Organization\n @JvmOverloads\n constructor(\n @SerialName(\"id\")\n override val partyId: Uuid,\n @SerialName(\"tenantId\")\n override val tenantId: String,\n override val origin: PartyOrigin,\n @SerialName(\"displayName\")\n override val displayName: String,\n override val uri: String? = null,\n override val jurisdiction: String? = null,\n @SerialName(\"ownerId\")\n override val ownerId: Uuid? = null,\n @SerialName(\"organizationUnitId\")\n override val organizationUnitId: Uuid? = null,\n @SerialName(\"specializations\")\n override val specializations: List<PartySpecialization> = emptyList(),\n @SerialName(\"createdAt\")\n override val createdAt: Instant,\n @SerialName(\"createdById\")\n override val createdById: Uuid? = null,\n @SerialName(\"updatedAt\")\n override val updatedAt: Instant,\n @SerialName(\"updatedById\")\n override val updatedById: Uuid? = null,\n @SerialName(\"deletedAt\")\n override val deletedAt: Instant? = null,\n @SerialName(\"deletedById\")\n override val deletedById: Uuid? = null,\n @SerialName(\"electronicAddresses\")\n override val electronicAddresses: List<ElectronicAddress>? = null,\n @SerialName(\"physicalAddresses\")\n override val physicalAddresses: List<PhysicalAddress>? = null,\n /** Registered legal name */\n @SerialName(\"legalName\")\n val legalName: String,\n /** Organization type (e.g. company, foundation, government) */\n @SerialName(\"organizationType\")\n val organizationType: String? = null,\n /** Industry classification */\n @SerialName(\"industry\")\n val industry: String? = null,\n /** Primary contact email */\n @SerialName(\"contactEmail\")\n val contactEmail: String? = null,\n /** Public website URL */\n @SerialName(\"websiteUrl\")\n val websiteUrl: String? = null,\n /** Privacy policy URI */\n @SerialName(\"privacyPolicyUri\")\n val privacyPolicyUri: String? = null,\n /** Terms of service URI */\n @SerialName(\"tosUri\")\n val tosUri: String? = null,\n ) : PartyEntity {\n override val partyType: PartyType get() = PartyType.ORGANIZATION\n }\n\n@JsExportCompat\n@Serializable\nenum class PartyOrigin {\n /** Party was synced from an outside source (IdP, external system, import, auto-discovery) */\n @SerialName(\"external\")\n EXTERNAL,\n\n /** Party was created and is managed natively within this system */\n @SerialName(\"managed\")\n MANAGED,\n}\n\n@JsExportCompat\n@Serializable\ndata class PartySpecialization\n @JvmOverloads\n constructor(\n /** Human role label for this specialization (e.g. \"employee\", \"customer\", \"supplier\", \"student\") */\n @SerialName(\"subtype\")\n val subtype: String,\n /** The bound semantic Profile id; null indicates an untyped declaration */\n @SerialName(\"profileId\")\n val profileId: String? = null,\n /** The profile version the values were validated/captured against */\n @SerialName(\"profileVersion\")\n val profileVersion: String? = null,\n /** Values for THIS specialization; populated only when licensed */\n @SerialName(\"attributes\")\n val attributes: JsonObject? = null,\n )\n\n@JsExportCompat\n@Serializable\ndata class ElectronicAddress(\n /** Unique identifier for this address */\n @SerialName(\"id\")\n val id: Uuid,\n /** Tenant this address belongs to */\n @SerialName(\"tenantId\")\n val tenantId: String,\n /** The party this address belongs to */\n @SerialName(\"partyId\")\n val partyId: Uuid,\n /** Optional correlation identifier this address is tied to */\n @SerialName(\"identifierId\")\n val identifierId: Uuid? = null,\n /** Type of address (e.g. EMAIL, PHONE, URL, SOCIAL_MEDIA) */\n @SerialName(\"addressType\")\n val addressType: String,\n /** The address value */\n @SerialName(\"value\")\n val value: String,\n /** Optional label (e.g. \"Work\", \"Personal\", \"Mobile\") */\n @SerialName(\"label\")\n val label: String? = null,\n /** Whether this is the primary address of its type */\n @SerialName(\"isPrimary\")\n val isPrimary: Boolean = false,\n /** Whether this address has been verified */\n @SerialName(\"isVerified\")\n val isVerified: Boolean = false,\n /** When the address was verified */\n @SerialName(\"verifiedAt\")\n val verifiedAt: Instant? = null,\n /** When the address became valid */\n @SerialName(\"validFrom\")\n val validFrom: Instant,\n /** When the address expired (null = current) */\n @SerialName(\"validUntil\")\n val validUntil: Instant? = null,\n)\n\n@JsExportCompat\n@Serializable\ndata class PhysicalAddress(\n /** Unique identifier for this address */\n @SerialName(\"id\")\n val id: Uuid,\n /** The party this address belongs to */\n @SerialName(\"partyId\")\n val partyId: Uuid,\n /** Optional correlation identifier this address is tied to */\n @SerialName(\"identifierId\")\n val identifierId: Uuid? = null,\n /** Tenant this address belongs to */\n @SerialName(\"tenantId\")\n val tenantId: String,\n /** The type/purpose of this address */\n @SerialName(\"addressType\")\n val addressType: String,\n /** User-friendly label (e.g. \"Headquarters\", \"Home\") */\n @SerialName(\"label\")\n val label: String? = null,\n /** Whether this is the primary address of its type */\n @SerialName(\"isPrimary\")\n val isPrimary: Boolean = false,\n /** Street address (house number, street name, unit) */\n @SerialName(\"streetAddress\")\n val streetAddress: String? = null,\n /** City/municipality name */\n @SerialName(\"city\")\n val city: String? = null,\n /** State/province/region */\n @SerialName(\"province\")\n val province: String? = null,\n /** Postal/ZIP code */\n @SerialName(\"postalCode\")\n val postalCode: String? = null,\n /** Country code (ISO 3166-1 alpha-2) */\n @SerialName(\"countryCode\")\n val countryCode: String? = null,\n /** Latitude coordinate */\n @SerialName(\"latitude\")\n val latitude: Double? = null,\n /** Longitude coordinate */\n @SerialName(\"longitude\")\n val longitude: Double? = null,\n /** When this address became valid */\n @SerialName(\"validFrom\")\n val validFrom: Instant,\n /** When this address expired (null = current) */\n @SerialName(\"validUntil\")\n val validUntil: Instant? = null,\n /** When the address was created */\n @SerialName(\"createdAt\")\n val createdAt: Instant,\n /** Who created the address (party ID) */\n @SerialName(\"createdById\")\n val createdById: Uuid? = null,\n /** When the address was last updated */\n @SerialName(\"updatedAt\")\n val updatedAt: Instant,\n /** Who last updated the address (party ID) */\n @SerialName(\"updatedById\")\n val updatedById: Uuid? = null,\n /** When the address was soft-deleted (null if not deleted) */\n @SerialName(\"deletedAt\")\n val deletedAt: Instant? = null,\n /** Who deleted the address (party ID) */\n @SerialName(\"deletedById\")\n val deletedById: Uuid? = null,\n)\n\n@JsExportCompat\n@Serializable\n@JsonClassDiscriminator(\"partyType\")\nsealed interface PartyEntity {\n /** Unique identifier for the party */\n val partyId: Uuid\n\n /** Tenant this party belongs to */\n val tenantId: String\n\n /** The type of party (matches the JSON class discriminator) */\n val partyType: PartyType\n\n /** Origin of the party (external/managed) */\n val origin: PartyOrigin\n\n /** User-friendly display name */\n val displayName: String\n\n /** Optional URI for the party (DID, URL, etc.) */\n val uri: String?\n\n /** Primary jurisdiction for this party (ISO 3166-1 code or region, e.g. \"EU\", \"US\", \"NL\") */\n val jurisdiction: String?\n\n /** Reference to the owning party */\n val ownerId: Uuid?\n\n /** The single home organization unit; null means the tenant root */\n val organizationUnitId: Uuid?\n\n /** The specializations (roles) this party bears; multi-typing allows several */\n val specializations: List<PartySpecialization>\n\n /** When the party was created */\n val createdAt: Instant\n\n /** Who created the party (party ID) */\n val createdById: Uuid?\n\n /** When the party was last updated */\n val updatedAt: Instant\n\n /** Who last updated the party (party ID) */\n val updatedById: Uuid?\n\n /** When the party was soft-deleted (null if not deleted) */\n val deletedAt: Instant?\n\n /** Who deleted the party (party ID) */\n val deletedById: Uuid?\n\n /**\n * The party's electronic addresses, hydrated on demand. Null means the association was not\n * requested (default); an empty list means it was requested and there are none.\n */\n val electronicAddresses: List<ElectronicAddress>?\n\n /**\n * The party's physical addresses, hydrated on demand. Null means the association was not\n * requested (default); an empty list means it was requested and there are none.\n */\n val physicalAddresses: List<PhysicalAddress>?\n}\n\n@Serializable\n@JvmInline\nvalue class PartyType(\n val value: String,\n) {\n companion object {\n /** A human individual */\n val NATURAL_PERSON = PartyType(\"natural_person\")\n\n /** Alias for [NATURAL_PERSON] */\n val PERSON = NATURAL_PERSON\n\n /** A company, institution, or other legal entity */\n val ORGANIZATION = PartyType(\"organization\")\n\n /** A software-backed service participant (endpoint, integration, automated actor) */\n val SERVICE = PartyType(\"service\")\n\n /** A unit within an organization (department, division, sub-tenant scope) */\n val ORGANIZATION_UNIT = PartyType(\"organization_unit\")\n\n /** A collection of parties grouped for addressing or authorization */\n val GROUP = PartyType(\"group\")\n\n /** An autonomous actor acting on behalf of another party */\n val AGENT = PartyType(\"agent\")\n }\n\n override fun toString(): String = value\n}\n\n@JsExportCompat\n@Serializable\ndata class Party\n @JvmOverloads\n constructor(\n /** Unique identifier for the party */\n @SerialName(\"id\")\n val partyId: Uuid,\n /** Tenant this party belongs to */\n @SerialName(\"tenantId\")\n val tenantId: String,\n /** The type of party */\n @SerialName(\"partyType\")\n val partyType: PartyType,\n /** Origin of the party (external/managed) */\n val origin: PartyOrigin,\n /**\n * User-friendly display name (editable by user). Non-null: abstract\n * identity-backed parties get filled with the identity's own UUID at\n * create-time so the schema invariant holds without a semantically-\n * empty sentinel; concrete Party roles (NaturalPerson / Organization /\n * Contact / OID4VCI-issuer / OID4VP-verifier / credential-template)\n * populate this with a meaningful human-readable name.\n */\n @SerialName(\"displayName\")\n val displayName: String,\n /** Optional URI for the party (DID, URL, etc.) */\n val uri: String? = null,\n /** Primary jurisdiction for this party (ISO 3166-1 code or region, e.g. \"EU\", \"US\", \"NL\") */\n val jurisdiction: String? = null,\n /** Reference to the owning party (for identities, this is the person/org that owns the identity) */\n @SerialName(\"ownerId\")\n val ownerId: Uuid? = null,\n /** When the party was created */\n @SerialName(\"createdAt\")\n val createdAt: Instant,\n /** Who created the party (party ID) */\n @SerialName(\"createdById\")\n val createdById: Uuid? = null,\n /** When the party was last updated */\n @SerialName(\"updatedAt\")\n val updatedAt: Instant,\n /** Who last updated the party (party ID) */\n @SerialName(\"updatedById\")\n val updatedById: Uuid? = null,\n /** When the party was soft-deleted (null if not deleted) */\n @SerialName(\"deletedAt\")\n val deletedAt: Instant? = null,\n /** Who deleted the party (party ID) */\n @SerialName(\"deletedById\")\n val deletedById: Uuid? = null,\n ) : HasId {\n override val id: String get() = partyId.toString()\n }\n\n @Serializable\n data class Human(\n override val id: String,\n /** Correlation key the engine binds to; UI signals completion against this key. */\n val correlationKey: String,\n /** Bounded wait; null means wait until the workflow's overall deadline. */\n val timeoutSeconds: Long? = null,\n val next: String? = null,\n ) : WorkflowTask()\n\n@JsExportCompat\n@Serializable\ndata class Tenant\n @JvmOverloads\n constructor(\n @SerialName(\"id\")\n val tenantId: String,\n @SerialName(\"tenantType\")\n val tenantType: TenantType,\n val name: String,\n val description: String? = null,\n /**\n * Globally unique URL-safe slug. Lowercase, hyphen-separated. Used as both the\n * platform subdomain label and the dispatcher's peelable path segment.\n */\n val slug: String,\n /**\n * Parent tenant id. `null` for root tenants. Hierarchy is enforced at insert\n * time (cycle detection walks up `parent_tenant_id`).\n */\n @SerialName(\"parentTenantId\")\n val parentTenantId: String? = null,\n val status: TenantStatus = TenantStatus.ACTIVE,\n /**\n * Generic \"system tenant\" flag. System tenants are excluded from default\n * listings and from all slug-based / parent-based resolution queries. Customer\n * tenants always have `system = false`. Higher layers (e.g. VDX) use this flag\n * to materialise their admin-control tenant; pure-EDK consumers can use it for\n * their own system-tenant patterns. EDK does not define what a system tenant\n * is or what privileges it carries.\n */\n val system: Boolean = false,\n @SerialName(\"ownerPartyId\")\n val ownerPartyId: Uuid? = null,\n @SerialName(\"createdAt\")\n val createdAt: Instant,\n @SerialName(\"createdById\")\n val createdById: Uuid? = null,\n @SerialName(\"updatedAt\")\n val updatedAt: Instant,\n @SerialName(\"updatedById\")\n val updatedById: Uuid? = null,\n @SerialName(\"deletedAt\")\n val deletedAt: Instant? = null,\n @SerialName(\"deletedById\")\n val deletedById: Uuid? = null,\n ) : HasId {\n override val id: String get() = tenantId\n }\n\n enum class Type {\n WORKFLOW_EXECUTION_STARTED,\n WORKFLOW_EXECUTION_COMPLETED,\n WORKFLOW_EXECUTION_FAILED,\n WORKFLOW_EXECUTION_TIMED_OUT,\n WORKFLOW_EXECUTION_CANCELED,\n WORKFLOW_EXECUTION_TERMINATED,\n WORKFLOW_EXECUTION_CONTINUED_AS_NEW,\n WORKFLOW_TASK_SCHEDULED,\n WORKFLOW_TASK_STARTED,\n WORKFLOW_TASK_COMPLETED,\n WORKFLOW_TASK_FAILED,\n WORKFLOW_TASK_TIMED_OUT,\n ACTIVITY_TASK_SCHEDULED,\n ACTIVITY_TASK_STARTED,\n ACTIVITY_TASK_COMPLETED,\n ACTIVITY_TASK_FAILED,\n ACTIVITY_TASK_TIMED_OUT,\n ACTIVITY_TASK_CANCEL_REQUESTED,\n ACTIVITY_TASK_CANCELED,\n TIMER_STARTED,\n TIMER_FIRED,\n TIMER_CANCELED,\n WORKFLOW_EXECUTION_SIGNALED,\n WORKFLOW_EXECUTION_UPDATE_ACCEPTED,\n WORKFLOW_EXECUTION_UPDATE_COMPLETED,\n WORKFLOW_EXECUTION_UPDATE_REJECTED,\n CHILD_WORKFLOW_EXECUTION_STARTED,\n CHILD_WORKFLOW_EXECUTION_COMPLETED,\n CHILD_WORKFLOW_EXECUTION_FAILED,\n MARKER_RECORDED,\n OTHER,\n }\n\n enum class State {\n CLOSED,\n OPEN,\n HALF_OPEN\n }\n\n /** Filter by schema object ID */\r\n @SerialName(\"schemaId\")\n\n-- discriminator-tagged sealed-interface JSON via kotlinx-serialization."
},
"CreateOrganizationUnitArgs": {
"kind": "data class",
"name": "CreateOrganizationUnitArgs",
"module": "service-api",
"source": "@Serializable\ndata class CreateOrganizationUnitArgs(\n val displayName: String,\n val name: String,\n val parentOuId: Uuid? = null,\n val tosUri: String? = null,\n val branding: JsonObject? = null,\n val ouInheritancePolicy: String = \"READ_ONLY_ANCESTOR\",\n val origin: PartyOrigin = PartyOrigin.MANAGED,\n val uri: String? = null,\n val jurisdiction: String? = null,\n val ownerId: Uuid? = null,\n val organizationUnitId: Uuid? = null,\n)\n\n@JsExportCompat\n@Serializable\nenum class PartyOrigin {\n /** Party was synced from an outside source (IdP, external system, import, auto-discovery) */\n @SerialName(\"external\")\n EXTERNAL,\n\n /** Party was created and is managed natively within this system */\n @SerialName(\"managed\")\n MANAGED,\n}\n\n@JsExportCompat\n@Serializable\ndata class Party\n @JvmOverloads\n constructor(\n /** Unique identifier for the party */\n @SerialName(\"id\")\n val partyId: Uuid,\n /** Tenant this party belongs to */\n @SerialName(\"tenantId\")\n val tenantId: String,\n /** The type of party */\n @SerialName(\"partyType\")\n val partyType: PartyType,\n /** Origin of the party (external/managed) */\n val origin: PartyOrigin,\n /**\n * User-friendly display name (editable by user). Non-null: abstract\n * identity-backed parties get filled with the identity's own UUID at\n * create-time so the schema invariant holds without a semantically-\n * empty sentinel; concrete Party roles (NaturalPerson / Organization /\n * Contact / OID4VCI-issuer / OID4VP-verifier / credential-template)\n * populate this with a meaningful human-readable name.\n */\n @SerialName(\"displayName\")\n val displayName: String,\n /** Optional URI for the party (DID, URL, etc.) */\n val uri: String? = null,\n /** Primary jurisdiction for this party (ISO 3166-1 code or region, e.g. \"EU\", \"US\", \"NL\") */\n val jurisdiction: String? = null,\n /** Reference to the owning party (for identities, this is the person/org that owns the identity) */\n @SerialName(\"ownerId\")\n val ownerId: Uuid? = null,\n /** When the party was created */\n @SerialName(\"createdAt\")\n val createdAt: Instant,\n /** Who created the party (party ID) */\n @SerialName(\"createdById\")\n val createdById: Uuid? = null,\n /** When the party was last updated */\n @SerialName(\"updatedAt\")\n val updatedAt: Instant,\n /** Who last updated the party (party ID) */\n @SerialName(\"updatedById\")\n val updatedById: Uuid? = null,\n /** When the party was soft-deleted (null if not deleted) */\n @SerialName(\"deletedAt\")\n val deletedAt: Instant? = null,\n /** Who deleted the party (party ID) */\n @SerialName(\"deletedById\")\n val deletedById: Uuid? = null,\n ) : HasId {\n override val id: String get() = partyId.toString()\n }"
},
"OrganizationUnit": {
"kind": "data class",
"name": "OrganizationUnit",
"module": "public",
"source": "@JsExportCompat\n@Serializable\n@SerialName(\"organization_unit\")\ndata class OrganizationUnit\n @JvmOverloads\n constructor(\n @SerialName(\"id\")\n override val partyId: Uuid,\n @SerialName(\"tenantId\")\n override val tenantId: String,\n override val origin: PartyOrigin,\n @SerialName(\"displayName\")\n override val displayName: String,\n override val uri: String? = null,\n override val jurisdiction: String? = null,\n @SerialName(\"ownerId\")\n override val ownerId: Uuid? = null,\n @SerialName(\"organizationUnitId\")\n override val organizationUnitId: Uuid? = null,\n @SerialName(\"specializations\")\n override val specializations: List<PartySpecialization> = emptyList(),\n @SerialName(\"createdAt\")\n override val createdAt: Instant,\n @SerialName(\"createdById\")\n override val createdById: Uuid? = null,\n @SerialName(\"updatedAt\")\n override val updatedAt: Instant,\n @SerialName(\"updatedById\")\n override val updatedById: Uuid? = null,\n @SerialName(\"deletedAt\")\n override val deletedAt: Instant? = null,\n @SerialName(\"deletedById\")\n override val deletedById: Uuid? = null,\n @SerialName(\"electronicAddresses\")\n override val electronicAddresses: List<ElectronicAddress>? = null,\n @SerialName(\"physicalAddresses\")\n override val physicalAddresses: List<PhysicalAddress>? = null,\n /** Parent organization unit; null means this unit sits directly under the organization root */\n @SerialName(\"parentOuId\")\n val parentOuId: Uuid? = null,\n /** Unit name */\n @SerialName(\"name\")\n val name: String,\n /** Terms of service URI for this unit */\n @SerialName(\"tosUri\")\n val tosUri: String? = null,\n /** Unit-level branding configuration */\n @SerialName(\"branding\")\n val branding: JsonObject? = null,\n /** How this unit inherits configuration from its ancestors */\n @SerialName(\"ouInheritancePolicy\")\n val ouInheritancePolicy: String = \"READ_ONLY_ANCESTOR\",\n /**\n * The direct child organization units, hydrated on demand. Null means the association\n * was not requested (default); an empty list means it was requested and there are none.\n */\n @SerialName(\"childUnits\")\n val childUnits: List<OrganizationUnit>? = null,\n /**\n * The parties that have this unit as their home organization unit, hydrated on demand.\n * Null means the association was not requested (default).\n */\n @SerialName(\"members\")\n val members: List<PartyEntity>? = null,\n ) : PartyEntity {\n override val partyType: PartyType get() = PartyType.ORGANIZATION_UNIT\n }\n\n@JsExportCompat\n@Serializable\nenum class PartyOrigin {\n /** Party was synced from an outside source (IdP, external system, import, auto-discovery) */\n @SerialName(\"external\")\n EXTERNAL,\n\n /** Party was created and is managed natively within this system */\n @SerialName(\"managed\")\n MANAGED,\n}\n\n@JsExportCompat\n@Serializable\ndata class PartySpecialization\n @JvmOverloads\n constructor(\n /** Human role label for this specialization (e.g. \"employee\", \"customer\", \"supplier\", \"student\") */\n @SerialName(\"subtype\")\n val subtype: String,\n /** The bound semantic Profile id; null indicates an untyped declaration */\n @SerialName(\"profileId\")\n val profileId: String? = null,\n /** The profile version the values were validated/captured against */\n @SerialName(\"profileVersion\")\n val profileVersion: String? = null,\n /** Values for THIS specialization; populated only when licensed */\n @SerialName(\"attributes\")\n val attributes: JsonObject? = null,\n )\n\n@JsExportCompat\n@Serializable\ndata class ElectronicAddress(\n /** Unique identifier for this address */\n @SerialName(\"id\")\n val id: Uuid,\n /** Tenant this address belongs to */\n @SerialName(\"tenantId\")\n val tenantId: String,\n /** The party this address belongs to */\n @SerialName(\"partyId\")\n val partyId: Uuid,\n /** Optional correlation identifier this address is tied to */\n @SerialName(\"identifierId\")\n val identifierId: Uuid? = null,\n /** Type of address (e.g. EMAIL, PHONE, URL, SOCIAL_MEDIA) */\n @SerialName(\"addressType\")\n val addressType: String,\n /** The address value */\n @SerialName(\"value\")\n val value: String,\n /** Optional label (e.g. \"Work\", \"Personal\", \"Mobile\") */\n @SerialName(\"label\")\n val label: String? = null,\n /** Whether this is the primary address of its type */\n @SerialName(\"isPrimary\")\n val isPrimary: Boolean = false,\n /** Whether this address has been verified */\n @SerialName(\"isVerified\")\n val isVerified: Boolean = false,\n /** When the address was verified */\n @SerialName(\"verifiedAt\")\n val verifiedAt: Instant? = null,\n /** When the address became valid */\n @SerialName(\"validFrom\")\n val validFrom: Instant,\n /** When the address expired (null = current) */\n @SerialName(\"validUntil\")\n val validUntil: Instant? = null,\n)\n\n@JsExportCompat\n@Serializable\ndata class PhysicalAddress(\n /** Unique identifier for this address */\n @SerialName(\"id\")\n val id: Uuid,\n /** The party this address belongs to */\n @SerialName(\"partyId\")\n val partyId: Uuid,\n /** Optional correlation identifier this address is tied to */\n @SerialName(\"identifierId\")\n val identifierId: Uuid? = null,\n /** Tenant this address belongs to */\n @SerialName(\"tenantId\")\n val tenantId: String,\n /** The type/purpose of this address */\n @SerialName(\"addressType\")\n val addressType: String,\n /** User-friendly label (e.g. \"Headquarters\", \"Home\") */\n @SerialName(\"label\")\n val label: String? = null,\n /** Whether this is the primary address of its type */\n @SerialName(\"isPrimary\")\n val isPrimary: Boolean = false,\n /** Street address (house number, street name, unit) */\n @SerialName(\"streetAddress\")\n val streetAddress: String? = null,\n /** City/municipality name */\n @SerialName(\"city\")\n val city: String? = null,\n /** State/province/region */\n @SerialName(\"province\")\n val province: String? = null,\n /** Postal/ZIP code */\n @SerialName(\"postalCode\")\n val postalCode: String? = null,\n /** Country code (ISO 3166-1 alpha-2) */\n @SerialName(\"countryCode\")\n val countryCode: String? = null,\n /** Latitude coordinate */\n @SerialName(\"latitude\")\n val latitude: Double? = null,\n /** Longitude coordinate */\n @SerialName(\"longitude\")\n val longitude: Double? = null,\n /** When this address became valid */\n @SerialName(\"validFrom\")\n val validFrom: Instant,\n /** When this address expired (null = current) */\n @SerialName(\"validUntil\")\n val validUntil: Instant? = null,\n /** When the address was created */\n @SerialName(\"createdAt\")\n val createdAt: Instant,\n /** Who created the address (party ID) */\n @SerialName(\"createdById\")\n val createdById: Uuid? = null,\n /** When the address was last updated */\n @SerialName(\"updatedAt\")\n val updatedAt: Instant,\n /** Who last updated the address (party ID) */\n @SerialName(\"updatedById\")\n val updatedById: Uuid? = null,\n /** When the address was soft-deleted (null if not deleted) */\n @SerialName(\"deletedAt\")\n val deletedAt: Instant? = null,\n /** Who deleted the address (party ID) */\n @SerialName(\"deletedById\")\n val deletedById: Uuid? = null,\n)\n\n @OptIn(ExperimentalObjCName::class)\n @ObjCName(\"cddlNull\")\n @Serializable(with = CDDLSerializer::class)\n object Null : CDDL(\"null\", MajorType.SPECIAL, 22, arrayOf(nil)) {\n fun newNull() = CborSimple.NULL\n\n fun fromJson(value: JsonElement) = CborSimple.NULL\n }\n\n@JsExportCompat\n@Serializable\n@JsonClassDiscriminator(\"partyType\")\nsealed interface PartyEntity {\n /** Unique identifier for the party */\n val partyId: Uuid\n\n /** Tenant this party belongs to */\n val tenantId: String\n\n /** The type of party (matches the JSON class discriminator) */\n val partyType: PartyType\n\n /** Origin of the party (external/managed) */\n val origin: PartyOrigin\n\n /** User-friendly display name */\n val displayName: String\n\n /** Optional URI for the party (DID, URL, etc.) */\n val uri: String?\n\n /** Primary jurisdiction for this party (ISO 3166-1 code or region, e.g. \"EU\", \"US\", \"NL\") */\n val jurisdiction: String?\n\n /** Reference to the owning party */\n val ownerId: Uuid?\n\n /** The single home organization unit; null means the tenant root */\n val organizationUnitId: Uuid?\n\n /** The specializations (roles) this party bears; multi-typing allows several */\n val specializations: List<PartySpecialization>\n\n /** When the party was created */\n val createdAt: Instant\n\n /** Who created the party (party ID) */\n val createdById: Uuid?\n\n /** When the party was last updated */\n val updatedAt: Instant\n\n /** Who last updated the party (party ID) */\n val updatedById: Uuid?\n\n /** When the party was soft-deleted (null if not deleted) */\n val deletedAt: Instant?\n\n /** Who deleted the party (party ID) */\n val deletedById: Uuid?\n\n /**\n * The party's electronic addresses, hydrated on demand. Null means the association was not\n * requested (default); an empty list means it was requested and there are none.\n */\n val electronicAddresses: List<ElectronicAddress>?\n\n /**\n * The party's physical addresses, hydrated on demand. Null means the association was not\n * requested (default); an empty list means it was requested and there are none.\n */\n val physicalAddresses: List<PhysicalAddress>?\n}\n\n@Serializable\n@JvmInline\nvalue class PartyType(\n val value: String,\n) {\n companion object {\n /** A human individual */\n val NATURAL_PERSON = PartyType(\"natural_person\")\n\n /** Alias for [NATURAL_PERSON] */\n val PERSON = NATURAL_PERSON\n\n /** A company, institution, or other legal entity */\n val ORGANIZATION = PartyType(\"organization\")\n\n /** A software-backed service participant (endpoint, integration, automated actor) */\n val SERVICE = PartyType(\"service\")\n\n /** A unit within an organization (department, division, sub-tenant scope) */\n val ORGANIZATION_UNIT = PartyType(\"organization_unit\")\n\n /** A collection of parties grouped for addressing or authorization */\n val GROUP = PartyType(\"group\")\n\n /** An autonomous actor acting on behalf of another party */\n val AGENT = PartyType(\"agent\")\n }\n\n override fun toString(): String = value\n}\n\n@JsExportCompat\n@Serializable\ndata class Party\n @JvmOverloads\n constructor(\n /** Unique identifier for the party */\n @SerialName(\"id\")\n val partyId: Uuid,\n /** Tenant this party belongs to */\n @SerialName(\"tenantId\")\n val tenantId: String,\n /** The type of party */\n @SerialName(\"partyType\")\n val partyType: PartyType,\n /** Origin of the party (external/managed) */\n val origin: PartyOrigin,\n /**\n * User-friendly display name (editable by user). Non-null: abstract\n * identity-backed parties get filled with the identity's own UUID at\n * create-time so the schema invariant holds without a semantically-\n * empty sentinel; concrete Party roles (NaturalPerson / Organization /\n * Contact / OID4VCI-issuer / OID4VP-verifier / credential-template)\n * populate this with a meaningful human-readable name.\n */\n @SerialName(\"displayName\")\n val displayName: String,\n /** Optional URI for the party (DID, URL, etc.) */\n val uri: String? = null,\n /** Primary jurisdiction for this party (ISO 3166-1 code or region, e.g. \"EU\", \"US\", \"NL\") */\n val jurisdiction: String? = null,\n /** Reference to the owning party (for identities, this is the person/org that owns the identity) */\n @SerialName(\"ownerId\")\n val ownerId: Uuid? = null,\n /** When the party was created */\n @SerialName(\"createdAt\")\n val createdAt: Instant,\n /** Who created the party (party ID) */\n @SerialName(\"createdById\")\n val createdById: Uuid? = null,\n /** When the party was last updated */\n @SerialName(\"updatedAt\")\n val updatedAt: Instant,\n /** Who last updated the party (party ID) */\n @SerialName(\"updatedById\")\n val updatedById: Uuid? = null,\n /** When the party was soft-deleted (null if not deleted) */\n @SerialName(\"deletedAt\")\n val deletedAt: Instant? = null,\n /** Who deleted the party (party ID) */\n @SerialName(\"deletedById\")\n val deletedById: Uuid? = null,\n ) : HasId {\n override val id: String get() = partyId.toString()\n }\n\n @Serializable\n data class Human(\n override val id: String,\n /** Correlation key the engine binds to; UI signals completion against this key. */\n val correlationKey: String,\n /** Bounded wait; null means wait until the workflow's overall deadline. */\n val timeoutSeconds: Long? = null,\n val next: String? = null,\n ) : WorkflowTask()\n\n@JsExportCompat\n@Serializable\ndata class Tenant\n @JvmOverloads\n constructor(\n @SerialName(\"id\")\n val tenantId: String,\n @SerialName(\"tenantType\")\n val tenantType: TenantType,\n val name: String,\n val description: String? = null,\n /**\n * Globally unique URL-safe slug. Lowercase, hyphen-separated. Used as both the\n * platform subdomain label and the dispatcher's peelable path segment.\n */\n val slug: String,\n /**\n * Parent tenant id. `null` for root tenants. Hierarchy is enforced at insert\n * time (cycle detection walks up `parent_tenant_id`).\n */\n @SerialName(\"parentTenantId\")\n val parentTenantId: String? = null,\n val status: TenantStatus = TenantStatus.ACTIVE,\n /**\n * Generic \"system tenant\" flag. System tenants are excluded from default\n * listings and from all slug-based / parent-based resolution queries. Customer\n * tenants always have `system = false`. Higher layers (e.g. VDX) use this flag\n * to materialise their admin-control tenant; pure-EDK consumers can use it for\n * their own system-tenant patterns. EDK does not define what a system tenant\n * is or what privileges it carries.\n */\n val system: Boolean = false,\n @SerialName(\"ownerPartyId\")\n val ownerPartyId: Uuid? = null,\n @SerialName(\"createdAt\")\n val createdAt: Instant,\n @SerialName(\"createdById\")\n val createdById: Uuid? = null,\n @SerialName(\"updatedAt\")\n val updatedAt: Instant,\n @SerialName(\"updatedById\")\n val updatedById: Uuid? = null,\n @SerialName(\"deletedAt\")\n val deletedAt: Instant? = null,\n @SerialName(\"deletedById\")\n val deletedById: Uuid? = null,\n ) : HasId {\n override val id: String get() = tenantId\n }\n\n enum class Type {\n WORKFLOW_EXECUTION_STARTED,\n WORKFLOW_EXECUTION_COMPLETED,\n WORKFLOW_EXECUTION_FAILED,\n WORKFLOW_EXECUTION_TIMED_OUT,\n WORKFLOW_EXECUTION_CANCELED,\n WORKFLOW_EXECUTION_TERMINATED,\n WORKFLOW_EXECUTION_CONTINUED_AS_NEW,\n WORKFLOW_TASK_SCHEDULED,\n WORKFLOW_TASK_STARTED,\n WORKFLOW_TASK_COMPLETED,\n WORKFLOW_TASK_FAILED,\n WORKFLOW_TASK_TIMED_OUT,\n ACTIVITY_TASK_SCHEDULED,\n ACTIVITY_TASK_STARTED,\n ACTIVITY_TASK_COMPLETED,\n ACTIVITY_TASK_FAILED,\n ACTIVITY_TASK_TIMED_OUT,\n ACTIVITY_TASK_CANCEL_REQUESTED,\n ACTIVITY_TASK_CANCELED,\n TIMER_STARTED,\n TIMER_FIRED,\n TIMER_CANCELED,\n WORKFLOW_EXECUTION_SIGNALED,\n WORKFLOW_EXECUTION_UPDATE_ACCEPTED,\n WORKFLOW_EXECUTION_UPDATE_COMPLETED,\n WORKFLOW_EXECUTION_UPDATE_REJECTED,\n CHILD_WORKFLOW_EXECUTION_STARTED,\n CHILD_WORKFLOW_EXECUTION_COMPLETED,\n CHILD_WORKFLOW_EXECUTION_FAILED,\n MARKER_RECORDED,\n OTHER,\n }\n\n enum class State {\n CLOSED,\n OPEN,\n HALF_OPEN\n }\n\n /** Filter by schema object ID */\r\n @SerialName(\"schemaId\")"
},
"CreateServiceArgs": {
"kind": "data class",
"name": "CreateServiceArgs",
"module": "service-api",
"source": "@Serializable\ndata class CreateServiceArgs(\n val displayName: String,\n val serviceType: String? = null,\n val endpointUri: String? = null,\n val oauthClientId: String? = null,\n val origin: PartyOrigin = PartyOrigin.MANAGED,\n val uri: String? = null,\n val jurisdiction: String? = null,\n val ownerId: Uuid? = null,\n val organizationUnitId: Uuid? = null,\n)\n\n@JsExportCompat\n@Serializable\nenum class PartyOrigin {\n /** Party was synced from an outside source (IdP, external system, import, auto-discovery) */\n @SerialName(\"external\")\n EXTERNAL,\n\n /** Party was created and is managed natively within this system */\n @SerialName(\"managed\")\n MANAGED,\n}\n\n@JsExportCompat\n@Serializable\ndata class Party\n @JvmOverloads\n constructor(\n /** Unique identifier for the party */\n @SerialName(\"id\")\n val partyId: Uuid,\n /** Tenant this party belongs to */\n @SerialName(\"tenantId\")\n val tenantId: String,\n /** The type of party */\n @SerialName(\"partyType\")\n val partyType: PartyType,\n /** Origin of the party (external/managed) */\n val origin: PartyOrigin,\n /**\n * User-friendly display name (editable by user). Non-null: abstract\n * identity-backed parties get filled with the identity's own UUID at\n * create-time so the schema invariant holds without a semantically-\n * empty sentinel; concrete Party roles (NaturalPerson / Organization /\n * Contact / OID4VCI-issuer / OID4VP-verifier / credential-template)\n * populate this with a meaningful human-readable name.\n */\n @SerialName(\"displayName\")\n val displayName: String,\n /** Optional URI for the party (DID, URL, etc.) */\n val uri: String? = null,\n /** Primary jurisdiction for this party (ISO 3166-1 code or region, e.g. \"EU\", \"US\", \"NL\") */\n val jurisdiction: String? = null,\n /** Reference to the owning party (for identities, this is the person/org that owns the identity) */\n @SerialName(\"ownerId\")\n val ownerId: Uuid? = null,\n /** When the party was created */\n @SerialName(\"createdAt\")\n val createdAt: Instant,\n /** Who created the party (party ID) */\n @SerialName(\"createdById\")\n val createdById: Uuid? = null,\n /** When the party was last updated */\n @SerialName(\"updatedAt\")\n val updatedAt: Instant,\n /** Who last updated the party (party ID) */\n @SerialName(\"updatedById\")\n val updatedById: Uuid? = null,\n /** When the party was soft-deleted (null if not deleted) */\n @SerialName(\"deletedAt\")\n val deletedAt: Instant? = null,\n /** Who deleted the party (party ID) */\n @SerialName(\"deletedById\")\n val deletedById: Uuid? = null,\n ) : HasId {\n override val id: String get() = partyId.toString()\n }"
},
"Service": {
"kind": "data class",
"name": "Service",
"module": "public",
"source": " public data class Service(\n public val uuid: Uuid,\n ) : Filter()\n\n@JsExportCompat\npublic sealed class Filter {\n /**\n * | Platform | Supported | Details |\n * |------------|:---------------:|----------------------------------------------------------------------------------------------|\n * | Android | Yes | Supported natively |\n * | Apple | Yes<sup>1</sup> | Supported natively if the only filter type used, otherwise provided by Kable via flow filter |\n * | JavaScript | Yes | Supported natively |\n *\n * <sup>1</sup>: The recommended practice is to provide only [service filter][Filter.Service]s on Apple platform.\n * If any filters other than [Filter.Service] are used on Apple platform, then filtering will not be performed natively.\n */\n public data class Service(\n public val uuid: Uuid,\n ) : Filter()\n\n public sealed class Name : Filter() {\n /**\n * | Platform | Supported | Details |\n * |------------|:---------:|-------------------------------------------|\n * | Android | Yes | Supported natively |\n * | Apple | Yes | Support provided by Kable via flow filter |\n * | JavaScript | Yes | Supported natively |\n */\n public data class Exact(\n public val exact: String,\n ) : Name()\n\n /**\n * | Platform | Supported | Details |\n * |------------|:---------:|-------------------------------------------|\n * | Android | Yes | Support provided by Kable via flow filter |\n * | Apple | Yes | Support provided by Kable via flow filter |\n * | JavaScript | Yes | Supported natively |\n */\n public data class Prefix(\n val prefix: String,\n ) : Name()\n }\n\n /**\n * | Platform | Supported | Details |\n * |------------|:---------:|----------------------------------------|\n * | Android | Yes | Supported natively |\n * | Apple | No | Throws [UnsupportedOperationException] |\n * | JavaScript | No | Throws [UnsupportedOperationException] |\n */\n public data class Address(\n public val address: String,\n ) : Filter()\n\n /**\n * Provides support for filtering against advertisement manufacturer data.\n *\n * If only portions of the manufacturer [data] needs to match, then [dataMask] can be used to identify the relevant\n * bits.\n *\n * Some examples to demonstrate the [dataMask] functionality:\n *\n * | [dataMask] value | Bit representation | [data] only needs to match... |\n * |---------------------------|---------------------|----------------------------------------------------------------|\n * | `byteArrayOf(0x0F, 0x00)` | 0000 1111 0000 0000 | bits 0-3 of the first byte of advertisement manufacturer data. |\n * | `byteArrayOf(0x00, 0xFF)` | 0000 0000 1111 1111 | the 2nd byte of advertisement manufacturer data. |\n * | `byteArrayOf(0xF0)` | 1111 0000 | bits 4-7 of the first byte of advertisement manufacturer data. |\n *\n * | Platform | Supported | Details |\n * |------------|:---------:|-------------------------------------------|\n * | Android | Yes | Supported natively |\n * | Apple | Yes | Support provided by Kable via flow filter |\n * | JavaScript | Yes | Supported natively |\n *\n * JavaScript support was added in Chrome 92 according to: https://developer.chrome.com/articles/bluetooth/#manufacturer-data-filter\n */\n public class ManufacturerData(\n /**\n * Company identifier (16-bit).\n * A negative [id] is considered an invalid id.\n *\n * List of assigned numbers can be found at (section: 7 Company Identifiers): https://www.bluetooth.com/specifications/assigned-numbers/\n */\n public val id: Int,\n /** Must be non-`null` if [dataMask] is non-`null`. */\n public val data: ByteArray? = null,\n /**\n * For any bit in the mask, set it to 1 if advertisement manufacturer data needs to match the corresponding bit\n * in [data], otherwise set it to 0. If [dataMask] is not `null`, then it must have the same length as [data].\n */\n public val dataMask: ByteArray? = null,\n ) : Filter() {\n @JvmOverloads\n public constructor(id: ByteArray, data: ByteArray? = null, dataMask: ByteArray? = null) : this(id.toShort(), data, dataMask)\n\n init {\n require(id >= 0) { \"Company identifier cannot be negative, was $id\" }\n require(id <= 65535) { \"Company identifier cannot be more than 16-bits (65535), was $id\" }\n require(data == null || data.isNotEmpty()) { \"If data is present (non-null), it must be non-empty\" }\n if (dataMask != null) {\n requireNotNull(data) { \"Data is null but must be non-null when dataMask is non-null\" }\n requireDataAndMaskHaveSameLength(data, dataMask)\n }\n }\n\n override fun toString(): String = \"ManufacturerData(id=$id, data=${data?.toHexString()}, dataMask=${dataMask?.toHexString()})\"\n }\n\n /**\n * Provides support for filtering against advertisement service data.\n *\n * If only portions of the service [data] needs to match, then [dataMask] can be used to\n * identify the relevant bits.\n *\n * Some examples to demonstrate the [dataMask] functionality:\n *\n * | [dataMask] value | Bit representation | [data] only needs to match... |\n * |---------------------------|---------------------|-----------------------------------------------------------|\n * | `byteArrayOf(0x0F, 0x00)` | 0000 1111 0000 0000 | bits 0-3 of the first byte of advertisement service data. |\n * | `byteArrayOf(0x00, 0xFF)` | 0000 0000 1111 1111 | the 2nd byte of advertisement service data. |\n * | `byteArrayOf(0xF0)` | 1111 0000 | bits 4-7 of the first byte of advertisement service data. |\n *\n * | Platform | Supported | Details |\n * |------------|:---------:|-------------------------------------------|\n * | Android | Yes | Supported natively |\n * | Apple | Yes | Support provided by Kable via flow filter |\n * | JavaScript | Yes | Support provided by Kable via flow filter |\n */\n public class ServiceData(\n public val uuid: Uuid,\n public val data: ByteArray? = null,\n /**\n * For any bit in the mask, set it to 1 if advertisement service data needs to match the\n * corresponding bit in [data], otherwise set it to 0. If [dataMask] is not `null`, then it\n * must have the same length as [data].\n */\n public val dataMask: ByteArray? = null,\n ) : Filter() {\n init {\n require(data == null || data.isNotEmpty()) { \"If data is present (non-null), it must be non-empty\" }\n if (dataMask != null) {\n requireNotNull(data) { \"Data is null but must be non-null when dataMask is non-null\" }\n requireDataAndMaskHaveSameLength(data, dataMask)\n }\n }\n\n override fun toString(): String = \"ServiceData(uuid=$uuid, data=${data?.toHexString()}, dataMask=${dataMask?.toHexString()})\"\n }\n}\n\n public sealed class Name : Filter() {\n /**\n * | Platform | Supported | Details |\n * |------------|:---------:|-------------------------------------------|\n * | Android | Yes | Supported natively |\n * | Apple | Yes | Support provided by Kable via flow filter |\n * | JavaScript | Yes | Supported natively |\n */\n public data class Exact(\n public val exact: String,\n ) : Name()\n\n /**\n * | Platform | Supported | Details |\n * |------------|:---------:|-------------------------------------------|\n * | Android | Yes | Support provided by Kable via flow filter |\n * | Apple | Yes | Support provided by Kable via flow filter |\n * | JavaScript | Yes | Supported natively |\n */\n public data class Prefix(\n val prefix: String,\n ) : Name()\n }\n\n public data class Exact(\n public val exact: String,\n ) : Name()\n\n public data class Prefix(\n val prefix: String,\n ) : Name()\n\n public data class Address(\n public val address: String,\n ) : Filter()\n\n public class ManufacturerData(\n /**\n * Company identifier (16-bit).\n * A negative [id] is considered an invalid id.\n *\n * List of assigned numbers can be found at (section: 7 Company Identifiers): https://www.bluetooth.com/specifications/assigned-numbers/\n */\n public val id: Int,\n /** Must be non-`null` if [dataMask] is non-`null`. */\n public val data: ByteArray? = null,\n /**\n * For any bit in the mask, set it to 1 if advertisement manufacturer data needs to match the corresponding bit\n * in [data], otherwise set it to 0. If [dataMask] is not `null`, then it must have the same length as [data].\n */\n public val dataMask: ByteArray? = null,\n ) : Filter() {\n @JvmOverloads\n public constructor(id: ByteArray, data: ByteArray? = null, dataMask: ByteArray? = null) : this(id.toShort(), data, dataMask)\n\n init {\n require(id >= 0) { \"Company identifier cannot be negative, was $id\" }\n require(id <= 65535) { \"Company identifier cannot be more than 16-bits (65535), was $id\" }\n require(data == null || data.isNotEmpty()) { \"If data is present (non-null), it must be non-empty\" }\n if (dataMask != null) {\n requireNotNull(data) { \"Data is null but must be non-null when dataMask is non-null\" }\n requireDataAndMaskHaveSameLength(data, dataMask)\n }\n }\n\n override fun toString(): String = \"ManufacturerData(id=$id, data=${data?.toHexString()}, dataMask=${dataMask?.toHexString()})\"\n }\n\n @OptIn(ExperimentalObjCName::class)\n @ObjCName(\"Data\", exact = true)\n data class Data(\n val value: ByteArray,\n ) : BleResponse()\n\n public class ServiceData(\n public val uuid: Uuid,\n public val data: ByteArray? = null,\n /**\n * For any bit in the mask, set it to 1 if advertisement service data needs to match the\n * corresponding bit in [data], otherwise set it to 0. If [dataMask] is not `null`, then it\n * must have the same length as [data].\n */\n public val dataMask: ByteArray? = null,\n ) : Filter() {\n init {\n require(data == null || data.isNotEmpty()) { \"If data is present (non-null), it must be non-empty\" }\n if (dataMask != null) {\n requireNotNull(data) { \"Data is null but must be non-null when dataMask is non-null\" }\n requireDataAndMaskHaveSameLength(data, dataMask)\n }\n }\n\n override fun toString(): String = \"ServiceData(uuid=$uuid, data=${data?.toHexString()}, dataMask=${dataMask?.toHexString()})\"\n }"
},
"SetApplicationLoginConfigArgs": {
"kind": "data class",
"name": "SetApplicationLoginConfigArgs",
"module": "service-api",
"source": "@Serializable\ndata class SetApplicationLoginConfigArgs(\n val applicationId: Uuid,\n val allowedMethods: Set<AuthMethod> = emptySet(),\n val loginIdentifierTypes: Set<IdentifierType> = emptySet(),\n val allowedIdpIds: Set<String> = emptySet(),\n val selfRegistration: Boolean = false,\n)\n\n@Serializable\n@JvmInline\nvalue class AuthMethod(\n val value: String,\n) {\n companion object {\n /** Username/identifier plus password. */\n val PASSWORD = AuthMethod(\"password\")\n\n /** One-time passcode delivered by email. */\n val EMAIL_OTP = AuthMethod(\"email_otp\")\n\n /** Single-use magic link delivered out of band. */\n val MAGIC_LINK = AuthMethod(\"magic_link\")\n\n /** Time-based one-time password (authenticator app). */\n val TOTP = AuthMethod(\"totp\")\n\n /** Federated login via an external OIDC identity provider. */\n val FEDERATED_OIDC = AuthMethod(\"federated_oidc\")\n\n /** Wallet-based authentication (verifiable presentation). */\n val WALLET = AuthMethod(\"wallet\")\n }\n\n override fun toString(): String = value\n}\n\n@Serializable\n@JvmInline\nvalue class IdentifierType(\n val value: String,\n) {\n companion object {\n /** W3C Decentralized Identifier */\n val DID = IdentifierType(\"did\")\n\n /** X.509 Certificate (has identifier_x509 extension) */\n val X509 = IdentifierType(\"x509\")\n }\n\n override fun toString(): String = value\n}\n\n @JsExportCompat\n @Serializable\n data class Federated(\n override val email: String,\n override val displayName: String,\n val federationProvider: FederationProviderInput,\n /**\n * Owner's stable identifier inside the external IDP — typically the `sub`\n * claim, but can be any claim agreed in [FederationProviderInput.claimMapping].\n */\n val externalSubject: String,\n ) : OwnerInput()\n\ninterface Wallet {\n /** Access to the persisted credential documents. */\n val documents: WalletDocumentStore\n\n /**\n * Creates (or retrieves) a holder key, returning the key alias.\n * If [alias] is null an alias is generated automatically.\n */\n suspend fun createHolderKey(alias: String? = null): IdkResult<String, IdkError>\n\n /**\n * Initiates an authorization code flow for the given issuer, returning the data\n * needed to redirect the user to the authorization endpoint.\n */\n suspend fun startAuthorizationCodeFlow(\n credentialIssuer: String,\n config: WalletConfig,\n scope: String? = null,\n ): IdkResult<AuthCodeStart, IdkError>\n\n /**\n * Completes an authorization code flow by exchanging the authorization code for tokens.\n */\n suspend fun completeAuthorizationCodeFlow(\n start: AuthCodeStart,\n code: String,\n ): IdkResult<TokenSet, IdkError>\n\n /**\n * Exchanges a pre-authorized code (from a credential offer) for tokens.\n */\n suspend fun exchangePreAuthorizedCode(\n credentialIssuer: String,\n preAuthorizedCode: String,\n txCode: String? = null,\n config: WalletConfig? = null,\n ): IdkResult<TokenSet, IdkError>\n\n /**\n * Obtains one or more credential instances from the issuer and stores them\n * in [documents], returning the updated [WalletDocument].\n */\n suspend fun obtainCredential(request: ObtainCredentialRequest): IdkResult<WalletDocument, IdkError>\n\n /**\n * Responds to a verifier's authorization request URI, performing a presentation exchange.\n */\n suspend fun present(\n requestUri: String,\n config: WalletConfig,\n ): IdkResult<PresentationResult, IdkError>\n}"
},
"ApplicationLoginConfigResult": {
"kind": "data class",
"name": "ApplicationLoginConfigResult",
"module": "persistence-api",
"source": "@Serializable\ndata class ApplicationLoginConfigResult(\n @SerialName(\"applicationId\")\n val applicationId: Uuid,\n\n @SerialName(\"tenantId\")\n val tenantId: String,\n\n @SerialName(\"allowedMethods\")\n val allowedMethods: Set<AuthMethod> = emptySet(),\n\n @SerialName(\"loginIdentifierTypes\")\n val loginIdentifierTypes: Set<IdentifierType> = emptySet(),\n\n @SerialName(\"allowedIdpIds\")\n val allowedIdpIds: Set<String> = emptySet(),\n\n @SerialName(\"selfRegistration\")\n val selfRegistration: Boolean = false,\n\n // Audit fields\n @SerialName(\"createdAt\")\n val createdAt: Instant,\n\n @SerialName(\"createdById\")\n val createdById: Uuid? = null,\n\n @SerialName(\"updatedAt\")\n val updatedAt: Instant,\n\n @SerialName(\"updatedById\")\n val updatedById: Uuid? = null,\n\n @SerialName(\"deletedAt\")\n val deletedAt: Instant? = null,\n\n @SerialName(\"deletedById\")\n val deletedById: Uuid? = null\n) {\n companion object {\n fun from(config: ApplicationLoginConfig) = ApplicationLoginConfigResult(\n applicationId = config.applicationId,\n tenantId = config.tenantId,\n allowedMethods = config.allowedMethods,\n loginIdentifierTypes = config.loginIdentifierTypes,\n allowedIdpIds = config.allowedIdpIds,\n selfRegistration = config.selfRegistration,\n createdAt = config.createdAt,\n createdById = config.createdById,\n updatedAt = config.updatedAt,\n updatedById = config.updatedById,\n deletedAt = config.deletedAt,\n deletedById = config.deletedById\n )\n }\n\n fun toApplicationLoginConfig() = ApplicationLoginConfig(\n applicationId = applicationId,\n tenantId = tenantId,\n allowedMethods = allowedMethods,\n loginIdentifierTypes = loginIdentifierTypes,\n allowedIdpIds = allowedIdpIds,\n selfRegistration = selfRegistration,\n createdAt = createdAt,\n createdById = createdById,\n updatedAt = updatedAt,\n updatedById = updatedById,\n deletedAt = deletedAt,\n deletedById = deletedById\n )\n}\n\n@Serializable\n@JvmInline\nvalue class AuthMethod(\n val value: String,\n) {\n companion object {\n /** Username/identifier plus password. */\n val PASSWORD = AuthMethod(\"password\")\n\n /** One-time passcode delivered by email. */\n val EMAIL_OTP = AuthMethod(\"email_otp\")\n\n /** Single-use magic link delivered out of band. */\n val MAGIC_LINK = AuthMethod(\"magic_link\")\n\n /** Time-based one-time password (authenticator app). */\n val TOTP = AuthMethod(\"totp\")\n\n /** Federated login via an external OIDC identity provider. */\n val FEDERATED_OIDC = AuthMethod(\"federated_oidc\")\n\n /** Wallet-based authentication (verifiable presentation). */\n val WALLET = AuthMethod(\"wallet\")\n }\n\n override fun toString(): String = value\n}\n\n@Serializable\n@JvmInline\nvalue class IdentifierType(\n val value: String,\n) {\n companion object {\n /** W3C Decentralized Identifier */\n val DID = IdentifierType(\"did\")\n\n /** X.509 Certificate (has identifier_x509 extension) */\n val X509 = IdentifierType(\"x509\")\n }\n\n override fun toString(): String = value\n}\n\n@Serializable\ndata class ApplicationLoginConfig(\n /** Application party id - primary key (the `service` login surface) */\n @SerialName(\"applicationId\")\n val applicationId: Uuid,\n\n /** Tenant this login config belongs to */\n @SerialName(\"tenantId\")\n val tenantId: String,\n\n /**\n * The authentication methods this application accepts.\n * Stored as a JSON-encoded TEXT column at the persistence layer.\n */\n @SerialName(\"allowedMethods\")\n val allowedMethods: Set<AuthMethod> = emptySet(),\n\n /**\n * The identifier types that may be used to log in to this application.\n * Stored as a JSON-encoded TEXT column at the persistence layer.\n */\n @SerialName(\"loginIdentifierTypes\")\n val loginIdentifierTypes: Set<IdentifierType> = emptySet(),\n\n /**\n * The external IdP ids permitted for federated login to this application.\n * Stored as a JSON-encoded TEXT column at the persistence layer.\n */\n @SerialName(\"allowedIdpIds\")\n val allowedIdpIds: Set<String> = emptySet(),\n\n /** Whether identities may self-register against this application */\n @SerialName(\"selfRegistration\")\n val selfRegistration: Boolean = false,\n\n // Audit fields\n /** When the login config was created */\n @SerialName(\"createdAt\")\n val createdAt: Instant,\n\n /** Who created the login config (party ID) */\n @SerialName(\"createdById\")\n val createdById: Uuid? = null,\n\n /** When the login config was last updated */\n @SerialName(\"updatedAt\")\n val updatedAt: Instant,\n\n /** Who last updated the login config (party ID) */\n @SerialName(\"updatedById\")\n val updatedById: Uuid? = null,\n\n /** When the login config was soft-deleted (null if not deleted) */\n @SerialName(\"deletedAt\")\n val deletedAt: Instant? = null,\n\n /** Who deleted the login config (party ID) */\n @SerialName(\"deletedById\")\n val deletedById: Uuid? = null\n) : HasId {\n override val id: String get() = applicationId.toString()\n}\n\n @JsExportCompat\n @Serializable\n data class Federated(\n override val email: String,\n override val displayName: String,\n val federationProvider: FederationProviderInput,\n /**\n * Owner's stable identifier inside the external IDP — typically the `sub`\n * claim, but can be any claim agreed in [FederationProviderInput.claimMapping].\n */\n val externalSubject: String,\n ) : OwnerInput()\n\ninterface Wallet {\n /** Access to the persisted credential documents. */\n val documents: WalletDocumentStore\n\n /**\n * Creates (or retrieves) a holder key, returning the key alias.\n * If [alias] is null an alias is generated automatically.\n */\n suspend fun createHolderKey(alias: String? = null): IdkResult<String, IdkError>\n\n /**\n * Initiates an authorization code flow for the given issuer, returning the data\n * needed to redirect the user to the authorization endpoint.\n */\n suspend fun startAuthorizationCodeFlow(\n credentialIssuer: String,\n config: WalletConfig,\n scope: String? = null,\n ): IdkResult<AuthCodeStart, IdkError>\n\n /**\n * Completes an authorization code flow by exchanging the authorization code for tokens.\n */\n suspend fun completeAuthorizationCodeFlow(\n start: AuthCodeStart,\n code: String,\n ): IdkResult<TokenSet, IdkError>\n\n /**\n * Exchanges a pre-authorized code (from a credential offer) for tokens.\n */\n suspend fun exchangePreAuthorizedCode(\n credentialIssuer: String,\n preAuthorizedCode: String,\n txCode: String? = null,\n config: WalletConfig? = null,\n ): IdkResult<TokenSet, IdkError>\n\n /**\n * Obtains one or more credential instances from the issuer and stores them\n * in [documents], returning the updated [WalletDocument].\n */\n suspend fun obtainCredential(request: ObtainCredentialRequest): IdkResult<WalletDocument, IdkError>\n\n /**\n * Responds to a verifier's authorization request URI, performing a presentation exchange.\n */\n suspend fun present(\n requestUri: String,\n config: WalletConfig,\n ): IdkResult<PresentationResult, IdkError>\n}\n\n@JsExportCompat\n@Serializable\ndata class Tenant\n @JvmOverloads\n constructor(\n @SerialName(\"id\")\n val tenantId: String,\n @SerialName(\"tenantType\")\n val tenantType: TenantType,\n val name: String,\n val description: String? = null,\n /**\n * Globally unique URL-safe slug. Lowercase, hyphen-separated. Used as both the\n * platform subdomain label and the dispatcher's peelable path segment.\n */\n val slug: String,\n /**\n * Parent tenant id. `null` for root tenants. Hierarchy is enforced at insert\n * time (cycle detection walks up `parent_tenant_id`).\n */\n @SerialName(\"parentTenantId\")\n val parentTenantId: String? = null,\n val status: TenantStatus = TenantStatus.ACTIVE,\n /**\n * Generic \"system tenant\" flag. System tenants are excluded from default\n * listings and from all slug-based / parent-based resolution queries. Customer\n * tenants always have `system = false`. Higher layers (e.g. VDX) use this flag\n * to materialise their admin-control tenant; pure-EDK consumers can use it for\n * their own system-tenant patterns. EDK does not define what a system tenant\n * is or what privileges it carries.\n */\n val system: Boolean = false,\n @SerialName(\"ownerPartyId\")\n val ownerPartyId: Uuid? = null,\n @SerialName(\"createdAt\")\n val createdAt: Instant,\n @SerialName(\"createdById\")\n val createdById: Uuid? = null,\n @SerialName(\"updatedAt\")\n val updatedAt: Instant,\n @SerialName(\"updatedById\")\n val updatedById: Uuid? = null,\n @SerialName(\"deletedAt\")\n val deletedAt: Instant? = null,\n @SerialName(\"deletedById\")\n val deletedById: Uuid? = null,\n ) : HasId {\n override val id: String get() = tenantId\n }\n\n-- discriminator-tagged sealed-interface JSON via kotlinx-serialization.\n\n /** Filter by schema object ID */\r\n @SerialName(\"schemaId\")\n\n@JsExportCompat\n@OptIn(ExperimentalObjCName::class)\n@ObjCName(\"HasId\", exact = true)\ninterface HasId {\n val id: String\n}"
},
"SetIdentityApplicationBindingArgs": {
"kind": "data class",
"name": "SetIdentityApplicationBindingArgs",
"module": "service-api",
"source": "@Serializable\ndata class SetIdentityApplicationBindingArgs(\n val identityId: Uuid,\n val applicationId: Uuid,\n val capabilities: Set<ApplicationCapability> = emptySet(),\n val allowedMethods: Set<AuthMethod> = emptySet(),\n val applicationRole: String? = null,\n val status: BindingStatus = BindingStatus.ACTIVE,\n val validFrom: Instant? = null,\n val validUntil: Instant? = null,\n)\n\n@Serializable\n@JvmInline\nvalue class ApplicationCapability(\n val value: String,\n) {\n companion object {\n /** The application can authenticate identities. */\n val AUTHENTICABLE = ApplicationCapability(\"authenticable\")\n }\n\n override fun toString(): String = value\n}\n\n@Serializable\n@JvmInline\nvalue class AuthMethod(\n val value: String,\n) {\n companion object {\n /** Username/identifier plus password. */\n val PASSWORD = AuthMethod(\"password\")\n\n /** One-time passcode delivered by email. */\n val EMAIL_OTP = AuthMethod(\"email_otp\")\n\n /** Single-use magic link delivered out of band. */\n val MAGIC_LINK = AuthMethod(\"magic_link\")\n\n /** Time-based one-time password (authenticator app). */\n val TOTP = AuthMethod(\"totp\")\n\n /** Federated login via an external OIDC identity provider. */\n val FEDERATED_OIDC = AuthMethod(\"federated_oidc\")\n\n /** Wallet-based authentication (verifiable presentation). */\n val WALLET = AuthMethod(\"wallet\")\n }\n\n override fun toString(): String = value\n}\n\n@JsExportCompat\n@Serializable\nenum class BindingStatus {\n /** The binding is active and may be used to authenticate. */\n @SerialName(\"active\")\n ACTIVE,\n\n /** The binding is temporarily suspended and may not be used to authenticate. */\n @SerialName(\"suspended\")\n SUSPENDED,\n\n /** The binding is permanently revoked. */\n @SerialName(\"revoked\")\n REVOKED,\n}\n\n @JsExportCompat\n @Serializable\n data class Federated(\n override val email: String,\n override val displayName: String,\n val federationProvider: FederationProviderInput,\n /**\n * Owner's stable identifier inside the external IDP — typically the `sub`\n * claim, but can be any claim agreed in [FederationProviderInput.claimMapping].\n */\n val externalSubject: String,\n ) : OwnerInput()\n\ninterface Wallet {\n /** Access to the persisted credential documents. */\n val documents: WalletDocumentStore\n\n /**\n * Creates (or retrieves) a holder key, returning the key alias.\n * If [alias] is null an alias is generated automatically.\n */\n suspend fun createHolderKey(alias: String? = null): IdkResult<String, IdkError>\n\n /**\n * Initiates an authorization code flow for the given issuer, returning the data\n * needed to redirect the user to the authorization endpoint.\n */\n suspend fun startAuthorizationCodeFlow(\n credentialIssuer: String,\n config: WalletConfig,\n scope: String? = null,\n ): IdkResult<AuthCodeStart, IdkError>\n\n /**\n * Completes an authorization code flow by exchanging the authorization code for tokens.\n */\n suspend fun completeAuthorizationCodeFlow(\n start: AuthCodeStart,\n code: String,\n ): IdkResult<TokenSet, IdkError>\n\n /**\n * Exchanges a pre-authorized code (from a credential offer) for tokens.\n */\n suspend fun exchangePreAuthorizedCode(\n credentialIssuer: String,\n preAuthorizedCode: String,\n txCode: String? = null,\n config: WalletConfig? = null,\n ): IdkResult<TokenSet, IdkError>\n\n /**\n * Obtains one or more credential instances from the issuer and stores them\n * in [documents], returning the updated [WalletDocument].\n */\n suspend fun obtainCredential(request: ObtainCredentialRequest): IdkResult<WalletDocument, IdkError>\n\n /**\n * Responds to a verifier's authorization request URI, performing a presentation exchange.\n */\n suspend fun present(\n requestUri: String,\n config: WalletConfig,\n ): IdkResult<PresentationResult, IdkError>\n}"
},
"IdentityApplicationBindingResult": {
"kind": "data class",
"name": "IdentityApplicationBindingResult",
"module": "persistence-api",
"source": "@Serializable\ndata class IdentityApplicationBindingResult(\n @SerialName(\"id\")\n val bindingId: Uuid,\n\n @SerialName(\"tenantId\")\n val tenantId: String,\n\n @SerialName(\"identityId\")\n val identityId: Uuid,\n\n @SerialName(\"applicationId\")\n val applicationId: Uuid,\n\n @SerialName(\"capabilities\")\n val capabilities: Set<ApplicationCapability> = emptySet(),\n\n @SerialName(\"allowedMethods\")\n val allowedMethods: Set<AuthMethod> = emptySet(),\n\n @SerialName(\"applicationRole\")\n val applicationRole: String? = null,\n\n @SerialName(\"status\")\n val status: BindingStatus = BindingStatus.ACTIVE,\n\n @SerialName(\"validFrom\")\n val validFrom: Instant,\n\n @SerialName(\"validUntil\")\n val validUntil: Instant? = null,\n\n // Audit fields\n @SerialName(\"createdAt\")\n val createdAt: Instant,\n\n @SerialName(\"createdById\")\n val createdById: Uuid? = null,\n\n @SerialName(\"updatedAt\")\n val updatedAt: Instant,\n\n @SerialName(\"updatedById\")\n val updatedById: Uuid? = null,\n\n @SerialName(\"deletedAt\")\n val deletedAt: Instant? = null,\n\n @SerialName(\"deletedById\")\n val deletedById: Uuid? = null\n) {\n companion object {\n fun from(binding: IdentityApplicationBinding) = IdentityApplicationBindingResult(\n bindingId = binding.bindingId,\n tenantId = binding.tenantId,\n identityId = binding.identityId,\n applicationId = binding.applicationId,\n capabilities = binding.capabilities,\n allowedMethods = binding.allowedMethods,\n applicationRole = binding.applicationRole,\n status = binding.status,\n validFrom = binding.validFrom,\n validUntil = binding.validUntil,\n createdAt = binding.createdAt,\n createdById = binding.createdById,\n updatedAt = binding.updatedAt,\n updatedById = binding.updatedById,\n deletedAt = binding.deletedAt,\n deletedById = binding.deletedById\n )\n }\n\n fun toIdentityApplicationBinding() = IdentityApplicationBinding(\n bindingId = bindingId,\n tenantId = tenantId,\n identityId = identityId,\n applicationId = applicationId,\n capabilities = capabilities,\n allowedMethods = allowedMethods,\n applicationRole = applicationRole,\n status = status,\n validFrom = validFrom,\n validUntil = validUntil,\n createdAt = createdAt,\n createdById = createdById,\n updatedAt = updatedAt,\n updatedById = updatedById,\n deletedAt = deletedAt,\n deletedById = deletedById\n )\n}\n\n@Serializable\n@JvmInline\nvalue class ApplicationCapability(\n val value: String,\n) {\n companion object {\n /** The application can authenticate identities. */\n val AUTHENTICABLE = ApplicationCapability(\"authenticable\")\n }\n\n override fun toString(): String = value\n}\n\n@Serializable\n@JvmInline\nvalue class AuthMethod(\n val value: String,\n) {\n companion object {\n /** Username/identifier plus password. */\n val PASSWORD = AuthMethod(\"password\")\n\n /** One-time passcode delivered by email. */\n val EMAIL_OTP = AuthMethod(\"email_otp\")\n\n /** Single-use magic link delivered out of band. */\n val MAGIC_LINK = AuthMethod(\"magic_link\")\n\n /** Time-based one-time password (authenticator app). */\n val TOTP = AuthMethod(\"totp\")\n\n /** Federated login via an external OIDC identity provider. */\n val FEDERATED_OIDC = AuthMethod(\"federated_oidc\")\n\n /** Wallet-based authentication (verifiable presentation). */\n val WALLET = AuthMethod(\"wallet\")\n }\n\n override fun toString(): String = value\n}\n\n@JsExportCompat\n@Serializable\nenum class BindingStatus {\n /** The binding is active and may be used to authenticate. */\n @SerialName(\"active\")\n ACTIVE,\n\n /** The binding is temporarily suspended and may not be used to authenticate. */\n @SerialName(\"suspended\")\n SUSPENDED,\n\n /** The binding is permanently revoked. */\n @SerialName(\"revoked\")\n REVOKED,\n}\n\n@Serializable\ndata class IdentityApplicationBinding(\n /** Unique identifier for this binding row */\n @SerialName(\"id\")\n val bindingId: Uuid,\n\n /** Tenant this binding belongs to */\n @SerialName(\"tenantId\")\n val tenantId: String,\n\n /** The identity that is bound to the application */\n @SerialName(\"identityId\")\n val identityId: Uuid,\n\n /** The application (party of party-type `service`) the identity is bound to */\n @SerialName(\"applicationId\")\n val applicationId: Uuid,\n\n /**\n * The capabilities this binding grants the identity on the application.\n * Stored as a JSON-encoded TEXT column at the persistence layer.\n */\n @SerialName(\"capabilities\")\n val capabilities: Set<ApplicationCapability> = emptySet(),\n\n /**\n * The authentication methods this binding permits the identity to use.\n * Stored as a JSON-encoded TEXT column at the persistence layer.\n */\n @SerialName(\"allowedMethods\")\n val allowedMethods: Set<AuthMethod> = emptySet(),\n\n /** The identity's role within the application, if any */\n @SerialName(\"applicationRole\")\n val applicationRole: String? = null,\n\n /** Lifecycle status of this binding */\n @SerialName(\"status\")\n val status: BindingStatus = BindingStatus.ACTIVE,\n\n /** When this binding becomes valid */\n @SerialName(\"validFrom\")\n val validFrom: Instant,\n\n /** When this binding stops being valid (null means open-ended) */\n @SerialName(\"validUntil\")\n val validUntil: Instant? = null,\n\n // Audit fields\n /** When the binding was created */\n @SerialName(\"createdAt\")\n val createdAt: Instant,\n\n /** Who created the binding (party ID) */\n @SerialName(\"createdById\")\n val createdById: Uuid? = null,\n\n /** When the binding was last updated */\n @SerialName(\"updatedAt\")\n val updatedAt: Instant,\n\n /** Who last updated the binding (party ID) */\n @SerialName(\"updatedById\")\n val updatedById: Uuid? = null,\n\n /** When the binding was soft-deleted (null if not deleted) */\n @SerialName(\"deletedAt\")\n val deletedAt: Instant? = null,\n\n /** Who deleted the binding (party ID) */\n @SerialName(\"deletedById\")\n val deletedById: Uuid? = null\n) : HasId {\n override val id: String get() = bindingId.toString()\n}\n\n @JsExportCompat\n @Serializable\n data class Federated(\n override val email: String,\n override val displayName: String,\n val federationProvider: FederationProviderInput,\n /**\n * Owner's stable identifier inside the external IDP — typically the `sub`\n * claim, but can be any claim agreed in [FederationProviderInput.claimMapping].\n */\n val externalSubject: String,\n ) : OwnerInput()\n\ninterface Wallet {\n /** Access to the persisted credential documents. */\n val documents: WalletDocumentStore\n\n /**\n * Creates (or retrieves) a holder key, returning the key alias.\n * If [alias] is null an alias is generated automatically.\n */\n suspend fun createHolderKey(alias: String? = null): IdkResult<String, IdkError>\n\n /**\n * Initiates an authorization code flow for the given issuer, returning the data\n * needed to redirect the user to the authorization endpoint.\n */\n suspend fun startAuthorizationCodeFlow(\n credentialIssuer: String,\n config: WalletConfig,\n scope: String? = null,\n ): IdkResult<AuthCodeStart, IdkError>\n\n /**\n * Completes an authorization code flow by exchanging the authorization code for tokens.\n */\n suspend fun completeAuthorizationCodeFlow(\n start: AuthCodeStart,\n code: String,\n ): IdkResult<TokenSet, IdkError>\n\n /**\n * Exchanges a pre-authorized code (from a credential offer) for tokens.\n */\n suspend fun exchangePreAuthorizedCode(\n credentialIssuer: String,\n preAuthorizedCode: String,\n txCode: String? = null,\n config: WalletConfig? = null,\n ): IdkResult<TokenSet, IdkError>\n\n /**\n * Obtains one or more credential instances from the issuer and stores them\n * in [documents], returning the updated [WalletDocument].\n */\n suspend fun obtainCredential(request: ObtainCredentialRequest): IdkResult<WalletDocument, IdkError>\n\n /**\n * Responds to a verifier's authorization request URI, performing a presentation exchange.\n */\n suspend fun present(\n requestUri: String,\n config: WalletConfig,\n ): IdkResult<PresentationResult, IdkError>\n}\n\n@JsExportCompat\n@Serializable\ndata class Tenant\n @JvmOverloads\n constructor(\n @SerialName(\"id\")\n val tenantId: String,\n @SerialName(\"tenantType\")\n val tenantType: TenantType,\n val name: String,\n val description: String? = null,\n /**\n * Globally unique URL-safe slug. Lowercase, hyphen-separated. Used as both the\n * platform subdomain label and the dispatcher's peelable path segment.\n */\n val slug: String,\n /**\n * Parent tenant id. `null` for root tenants. Hierarchy is enforced at insert\n * time (cycle detection walks up `parent_tenant_id`).\n */\n @SerialName(\"parentTenantId\")\n val parentTenantId: String? = null,\n val status: TenantStatus = TenantStatus.ACTIVE,\n /**\n * Generic \"system tenant\" flag. System tenants are excluded from default\n * listings and from all slug-based / parent-based resolution queries. Customer\n * tenants always have `system = false`. Higher layers (e.g. VDX) use this flag\n * to materialise their admin-control tenant; pure-EDK consumers can use it for\n * their own system-tenant patterns. EDK does not define what a system tenant\n * is or what privileges it carries.\n */\n val system: Boolean = false,\n @SerialName(\"ownerPartyId\")\n val ownerPartyId: Uuid? = null,\n @SerialName(\"createdAt\")\n val createdAt: Instant,\n @SerialName(\"createdById\")\n val createdById: Uuid? = null,\n @SerialName(\"updatedAt\")\n val updatedAt: Instant,\n @SerialName(\"updatedById\")\n val updatedById: Uuid? = null,\n @SerialName(\"deletedAt\")\n val deletedAt: Instant? = null,\n @SerialName(\"deletedById\")\n val deletedById: Uuid? = null,\n ) : HasId {\n override val id: String get() = tenantId\n }\n\n-- discriminator-tagged sealed-interface JSON via kotlinx-serialization.\n\n /** Filter by schema object ID */\r\n @SerialName(\"schemaId\")\n\n@JsExportCompat\n@OptIn(ExperimentalObjCName::class)\n@ObjCName(\"HasId\", exact = true)\ninterface HasId {\n val id: String\n}"
},
"DeleteIdentityApplicationBindingArgs": {
"kind": "data class",
"name": "DeleteIdentityApplicationBindingArgs",
"module": "service-api",
"source": "@Serializable\ndata class DeleteIdentityApplicationBindingArgs(val identityId: Uuid, val applicationId: Uuid)"
},
"DeleteIdentityApplicationBindingResult": {
"kind": "data class",
"name": "DeleteIdentityApplicationBindingResult",
"module": "service-api",
"source": "@Serializable\ndata class DeleteIdentityApplicationBindingResult(val deleted: Boolean)"
},
"CreateGroupArgs": {
"kind": "data class",
"name": "CreateGroupArgs",
"module": "service-api",
"source": "@Serializable\ndata class CreateGroupArgs(\n val displayName: String,\n val name: String,\n val origin: PartyOrigin = PartyOrigin.MANAGED,\n val uri: String? = null,\n val jurisdiction: String? = null,\n val ownerId: Uuid? = null,\n val organizationUnitId: Uuid? = null,\n)\n\n@JsExportCompat\n@Serializable\nenum class PartyOrigin {\n /** Party was synced from an outside source (IdP, external system, import, auto-discovery) */\n @SerialName(\"external\")\n EXTERNAL,\n\n /** Party was created and is managed natively within this system */\n @SerialName(\"managed\")\n MANAGED,\n}\n\n@JsExportCompat\n@Serializable\ndata class Party\n @JvmOverloads\n constructor(\n /** Unique identifier for the party */\n @SerialName(\"id\")\n val partyId: Uuid,\n /** Tenant this party belongs to */\n @SerialName(\"tenantId\")\n val tenantId: String,\n /** The type of party */\n @SerialName(\"partyType\")\n val partyType: PartyType,\n /** Origin of the party (external/managed) */\n val origin: PartyOrigin,\n /**\n * User-friendly display name (editable by user). Non-null: abstract\n * identity-backed parties get filled with the identity's own UUID at\n * create-time so the schema invariant holds without a semantically-\n * empty sentinel; concrete Party roles (NaturalPerson / Organization /\n * Contact / OID4VCI-issuer / OID4VP-verifier / credential-template)\n * populate this with a meaningful human-readable name.\n */\n @SerialName(\"displayName\")\n val displayName: String,\n /** Optional URI for the party (DID, URL, etc.) */\n val uri: String? = null,\n /** Primary jurisdiction for this party (ISO 3166-1 code or region, e.g. \"EU\", \"US\", \"NL\") */\n val jurisdiction: String? = null,\n /** Reference to the owning party (for identities, this is the person/org that owns the identity) */\n @SerialName(\"ownerId\")\n val ownerId: Uuid? = null,\n /** When the party was created */\n @SerialName(\"createdAt\")\n val createdAt: Instant,\n /** Who created the party (party ID) */\n @SerialName(\"createdById\")\n val createdById: Uuid? = null,\n /** When the party was last updated */\n @SerialName(\"updatedAt\")\n val updatedAt: Instant,\n /** Who last updated the party (party ID) */\n @SerialName(\"updatedById\")\n val updatedById: Uuid? = null,\n /** When the party was soft-deleted (null if not deleted) */\n @SerialName(\"deletedAt\")\n val deletedAt: Instant? = null,\n /** Who deleted the party (party ID) */\n @SerialName(\"deletedById\")\n val deletedById: Uuid? = null,\n ) : HasId {\n override val id: String get() = partyId.toString()\n }"
},
"Group": {
"kind": "data class",
"name": "Group",
"module": "public",
"source": "@JsExportCompat\n@Serializable\n@SerialName(\"group\")\ndata class Group\n @JvmOverloads\n constructor(\n @SerialName(\"id\")\n override val partyId: Uuid,\n @SerialName(\"tenantId\")\n override val tenantId: String,\n override val origin: PartyOrigin,\n @SerialName(\"displayName\")\n override val displayName: String,\n override val uri: String? = null,\n override val jurisdiction: String? = null,\n @SerialName(\"ownerId\")\n override val ownerId: Uuid? = null,\n @SerialName(\"organizationUnitId\")\n override val organizationUnitId: Uuid? = null,\n @SerialName(\"createdAt\")\n override val createdAt: Instant,\n @SerialName(\"createdById\")\n override val createdById: Uuid? = null,\n @SerialName(\"updatedAt\")\n override val updatedAt: Instant,\n @SerialName(\"updatedById\")\n override val updatedById: Uuid? = null,\n @SerialName(\"deletedAt\")\n override val deletedAt: Instant? = null,\n @SerialName(\"deletedById\")\n override val deletedById: Uuid? = null,\n @SerialName(\"electronicAddresses\")\n override val electronicAddresses: List<ElectronicAddress>? = null,\n @SerialName(\"physicalAddresses\")\n override val physicalAddresses: List<PhysicalAddress>? = null,\n /** Group name */\n @SerialName(\"name\")\n val name: String,\n /**\n * The member parties of this group, hydrated on demand. Null means the association was\n * not requested (default); an empty list means it was requested and there are none.\n */\n @SerialName(\"members\")\n val members: List<PartyEntity>? = null,\n ) : PartyEntity {\n override val partyType: PartyType get() = PartyType.GROUP\n\n /** A group never bears specializations. */\n @SerialName(\"specializations\")\n override val specializations: List<PartySpecialization> = emptyList()\n }\n\n@JsExportCompat\n@Serializable\nenum class PartyOrigin {\n /** Party was synced from an outside source (IdP, external system, import, auto-discovery) */\n @SerialName(\"external\")\n EXTERNAL,\n\n /** Party was created and is managed natively within this system */\n @SerialName(\"managed\")\n MANAGED,\n}\n\n@JsExportCompat\n@Serializable\ndata class ElectronicAddress(\n /** Unique identifier for this address */\n @SerialName(\"id\")\n val id: Uuid,\n /** Tenant this address belongs to */\n @SerialName(\"tenantId\")\n val tenantId: String,\n /** The party this address belongs to */\n @SerialName(\"partyId\")\n val partyId: Uuid,\n /** Optional correlation identifier this address is tied to */\n @SerialName(\"identifierId\")\n val identifierId: Uuid? = null,\n /** Type of address (e.g. EMAIL, PHONE, URL, SOCIAL_MEDIA) */\n @SerialName(\"addressType\")\n val addressType: String,\n /** The address value */\n @SerialName(\"value\")\n val value: String,\n /** Optional label (e.g. \"Work\", \"Personal\", \"Mobile\") */\n @SerialName(\"label\")\n val label: String? = null,\n /** Whether this is the primary address of its type */\n @SerialName(\"isPrimary\")\n val isPrimary: Boolean = false,\n /** Whether this address has been verified */\n @SerialName(\"isVerified\")\n val isVerified: Boolean = false,\n /** When the address was verified */\n @SerialName(\"verifiedAt\")\n val verifiedAt: Instant? = null,\n /** When the address became valid */\n @SerialName(\"validFrom\")\n val validFrom: Instant,\n /** When the address expired (null = current) */\n @SerialName(\"validUntil\")\n val validUntil: Instant? = null,\n)\n\n@JsExportCompat\n@Serializable\ndata class PhysicalAddress(\n /** Unique identifier for this address */\n @SerialName(\"id\")\n val id: Uuid,\n /** The party this address belongs to */\n @SerialName(\"partyId\")\n val partyId: Uuid,\n /** Optional correlation identifier this address is tied to */\n @SerialName(\"identifierId\")\n val identifierId: Uuid? = null,\n /** Tenant this address belongs to */\n @SerialName(\"tenantId\")\n val tenantId: String,\n /** The type/purpose of this address */\n @SerialName(\"addressType\")\n val addressType: String,\n /** User-friendly label (e.g. \"Headquarters\", \"Home\") */\n @SerialName(\"label\")\n val label: String? = null,\n /** Whether this is the primary address of its type */\n @SerialName(\"isPrimary\")\n val isPrimary: Boolean = false,\n /** Street address (house number, street name, unit) */\n @SerialName(\"streetAddress\")\n val streetAddress: String? = null,\n /** City/municipality name */\n @SerialName(\"city\")\n val city: String? = null,\n /** State/province/region */\n @SerialName(\"province\")\n val province: String? = null,\n /** Postal/ZIP code */\n @SerialName(\"postalCode\")\n val postalCode: String? = null,\n /** Country code (ISO 3166-1 alpha-2) */\n @SerialName(\"countryCode\")\n val countryCode: String? = null,\n /** Latitude coordinate */\n @SerialName(\"latitude\")\n val latitude: Double? = null,\n /** Longitude coordinate */\n @SerialName(\"longitude\")\n val longitude: Double? = null,\n /** When this address became valid */\n @SerialName(\"validFrom\")\n val validFrom: Instant,\n /** When this address expired (null = current) */\n @SerialName(\"validUntil\")\n val validUntil: Instant? = null,\n /** When the address was created */\n @SerialName(\"createdAt\")\n val createdAt: Instant,\n /** Who created the address (party ID) */\n @SerialName(\"createdById\")\n val createdById: Uuid? = null,\n /** When the address was last updated */\n @SerialName(\"updatedAt\")\n val updatedAt: Instant,\n /** Who last updated the address (party ID) */\n @SerialName(\"updatedById\")\n val updatedById: Uuid? = null,\n /** When the address was soft-deleted (null if not deleted) */\n @SerialName(\"deletedAt\")\n val deletedAt: Instant? = null,\n /** Who deleted the address (party ID) */\n @SerialName(\"deletedById\")\n val deletedById: Uuid? = null,\n)\n\n @OptIn(ExperimentalObjCName::class)\n @ObjCName(\"cddlNull\")\n @Serializable(with = CDDLSerializer::class)\n object Null : CDDL(\"null\", MajorType.SPECIAL, 22, arrayOf(nil)) {\n fun newNull() = CborSimple.NULL\n\n fun fromJson(value: JsonElement) = CborSimple.NULL\n }\n\n@JsExportCompat\n@Serializable\n@JsonClassDiscriminator(\"partyType\")\nsealed interface PartyEntity {\n /** Unique identifier for the party */\n val partyId: Uuid\n\n /** Tenant this party belongs to */\n val tenantId: String\n\n /** The type of party (matches the JSON class discriminator) */\n val partyType: PartyType\n\n /** Origin of the party (external/managed) */\n val origin: PartyOrigin\n\n /** User-friendly display name */\n val displayName: String\n\n /** Optional URI for the party (DID, URL, etc.) */\n val uri: String?\n\n /** Primary jurisdiction for this party (ISO 3166-1 code or region, e.g. \"EU\", \"US\", \"NL\") */\n val jurisdiction: String?\n\n /** Reference to the owning party */\n val ownerId: Uuid?\n\n /** The single home organization unit; null means the tenant root */\n val organizationUnitId: Uuid?\n\n /** The specializations (roles) this party bears; multi-typing allows several */\n val specializations: List<PartySpecialization>\n\n /** When the party was created */\n val createdAt: Instant\n\n /** Who created the party (party ID) */\n val createdById: Uuid?\n\n /** When the party was last updated */\n val updatedAt: Instant\n\n /** Who last updated the party (party ID) */\n val updatedById: Uuid?\n\n /** When the party was soft-deleted (null if not deleted) */\n val deletedAt: Instant?\n\n /** Who deleted the party (party ID) */\n val deletedById: Uuid?\n\n /**\n * The party's electronic addresses, hydrated on demand. Null means the association was not\n * requested (default); an empty list means it was requested and there are none.\n */\n val electronicAddresses: List<ElectronicAddress>?\n\n /**\n * The party's physical addresses, hydrated on demand. Null means the association was not\n * requested (default); an empty list means it was requested and there are none.\n */\n val physicalAddresses: List<PhysicalAddress>?\n}\n\n@Serializable\n@JvmInline\nvalue class PartyType(\n val value: String,\n) {\n companion object {\n /** A human individual */\n val NATURAL_PERSON = PartyType(\"natural_person\")\n\n /** Alias for [NATURAL_PERSON] */\n val PERSON = NATURAL_PERSON\n\n /** A company, institution, or other legal entity */\n val ORGANIZATION = PartyType(\"organization\")\n\n /** A software-backed service participant (endpoint, integration, automated actor) */\n val SERVICE = PartyType(\"service\")\n\n /** A unit within an organization (department, division, sub-tenant scope) */\n val ORGANIZATION_UNIT = PartyType(\"organization_unit\")\n\n /** A collection of parties grouped for addressing or authorization */\n val GROUP = PartyType(\"group\")\n\n /** An autonomous actor acting on behalf of another party */\n val AGENT = PartyType(\"agent\")\n }\n\n override fun toString(): String = value\n}\n\n@JsExportCompat\n@Serializable\ndata class PartySpecialization\n @JvmOverloads\n constructor(\n /** Human role label for this specialization (e.g. \"employee\", \"customer\", \"supplier\", \"student\") */\n @SerialName(\"subtype\")\n val subtype: String,\n /** The bound semantic Profile id; null indicates an untyped declaration */\n @SerialName(\"profileId\")\n val profileId: String? = null,\n /** The profile version the values were validated/captured against */\n @SerialName(\"profileVersion\")\n val profileVersion: String? = null,\n /** Values for THIS specialization; populated only when licensed */\n @SerialName(\"attributes\")\n val attributes: JsonObject? = null,\n )\n\n@JsExportCompat\n@Serializable\ndata class Party\n @JvmOverloads\n constructor(\n /** Unique identifier for the party */\n @SerialName(\"id\")\n val partyId: Uuid,\n /** Tenant this party belongs to */\n @SerialName(\"tenantId\")\n val tenantId: String,\n /** The type of party */\n @SerialName(\"partyType\")\n val partyType: PartyType,\n /** Origin of the party (external/managed) */\n val origin: PartyOrigin,\n /**\n * User-friendly display name (editable by user). Non-null: abstract\n * identity-backed parties get filled with the identity's own UUID at\n * create-time so the schema invariant holds without a semantically-\n * empty sentinel; concrete Party roles (NaturalPerson / Organization /\n * Contact / OID4VCI-issuer / OID4VP-verifier / credential-template)\n * populate this with a meaningful human-readable name.\n */\n @SerialName(\"displayName\")\n val displayName: String,\n /** Optional URI for the party (DID, URL, etc.) */\n val uri: String? = null,\n /** Primary jurisdiction for this party (ISO 3166-1 code or region, e.g. \"EU\", \"US\", \"NL\") */\n val jurisdiction: String? = null,\n /** Reference to the owning party (for identities, this is the person/org that owns the identity) */\n @SerialName(\"ownerId\")\n val ownerId: Uuid? = null,\n /** When the party was created */\n @SerialName(\"createdAt\")\n val createdAt: Instant,\n /** Who created the party (party ID) */\n @SerialName(\"createdById\")\n val createdById: Uuid? = null,\n /** When the party was last updated */\n @SerialName(\"updatedAt\")\n val updatedAt: Instant,\n /** Who last updated the party (party ID) */\n @SerialName(\"updatedById\")\n val updatedById: Uuid? = null,\n /** When the party was soft-deleted (null if not deleted) */\n @SerialName(\"deletedAt\")\n val deletedAt: Instant? = null,\n /** Who deleted the party (party ID) */\n @SerialName(\"deletedById\")\n val deletedById: Uuid? = null,\n ) : HasId {\n override val id: String get() = partyId.toString()\n }\n\n@JsExportCompat\n@Serializable\ndata class Tenant\n @JvmOverloads\n constructor(\n @SerialName(\"id\")\n val tenantId: String,\n @SerialName(\"tenantType\")\n val tenantType: TenantType,\n val name: String,\n val description: String? = null,\n /**\n * Globally unique URL-safe slug. Lowercase, hyphen-separated. Used as both the\n * platform subdomain label and the dispatcher's peelable path segment.\n */\n val slug: String,\n /**\n * Parent tenant id. `null` for root tenants. Hierarchy is enforced at insert\n * time (cycle detection walks up `parent_tenant_id`).\n */\n @SerialName(\"parentTenantId\")\n val parentTenantId: String? = null,\n val status: TenantStatus = TenantStatus.ACTIVE,\n /**\n * Generic \"system tenant\" flag. System tenants are excluded from default\n * listings and from all slug-based / parent-based resolution queries. Customer\n * tenants always have `system = false`. Higher layers (e.g. VDX) use this flag\n * to materialise their admin-control tenant; pure-EDK consumers can use it for\n * their own system-tenant patterns. EDK does not define what a system tenant\n * is or what privileges it carries.\n */\n val system: Boolean = false,\n @SerialName(\"ownerPartyId\")\n val ownerPartyId: Uuid? = null,\n @SerialName(\"createdAt\")\n val createdAt: Instant,\n @SerialName(\"createdById\")\n val createdById: Uuid? = null,\n @SerialName(\"updatedAt\")\n val updatedAt: Instant,\n @SerialName(\"updatedById\")\n val updatedById: Uuid? = null,\n @SerialName(\"deletedAt\")\n val deletedAt: Instant? = null,\n @SerialName(\"deletedById\")\n val deletedById: Uuid? = null,\n ) : HasId {\n override val id: String get() = tenantId\n }\n\n enum class Type {\n WORKFLOW_EXECUTION_STARTED,\n WORKFLOW_EXECUTION_COMPLETED,\n WORKFLOW_EXECUTION_FAILED,\n WORKFLOW_EXECUTION_TIMED_OUT,\n WORKFLOW_EXECUTION_CANCELED,\n WORKFLOW_EXECUTION_TERMINATED,\n WORKFLOW_EXECUTION_CONTINUED_AS_NEW,\n WORKFLOW_TASK_SCHEDULED,\n WORKFLOW_TASK_STARTED,\n WORKFLOW_TASK_COMPLETED,\n WORKFLOW_TASK_FAILED,\n WORKFLOW_TASK_TIMED_OUT,\n ACTIVITY_TASK_SCHEDULED,\n ACTIVITY_TASK_STARTED,\n ACTIVITY_TASK_COMPLETED,\n ACTIVITY_TASK_FAILED,\n ACTIVITY_TASK_TIMED_OUT,\n ACTIVITY_TASK_CANCEL_REQUESTED,\n ACTIVITY_TASK_CANCELED,\n TIMER_STARTED,\n TIMER_FIRED,\n TIMER_CANCELED,\n WORKFLOW_EXECUTION_SIGNALED,\n WORKFLOW_EXECUTION_UPDATE_ACCEPTED,\n WORKFLOW_EXECUTION_UPDATE_COMPLETED,\n WORKFLOW_EXECUTION_UPDATE_REJECTED,\n CHILD_WORKFLOW_EXECUTION_STARTED,\n CHILD_WORKFLOW_EXECUTION_COMPLETED,\n CHILD_WORKFLOW_EXECUTION_FAILED,\n MARKER_RECORDED,\n OTHER,\n }\n\n enum class State {\n CLOSED,\n OPEN,\n HALF_OPEN\n }\n\n /** Filter by schema object ID */\r\n @SerialName(\"schemaId\")\n\ninternal object CDDLSerializer : KSerializer<CDDL> {\n override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor(\"CDDL\", PrimitiveKind.STRING)\n\n override fun serialize(\n encoder: Encoder,\n value: CDDL,\n ) {\n encoder.encodeString(value.format)\n }\n\n override fun deserialize(decoder: Decoder): CDDL = CDDL.util.fromFormat(decoder.decodeString())\n}"
},
"AddGroupMemberArgs": {
"kind": "data class",
"name": "AddGroupMemberArgs",
"module": "service-api",
"source": "@Serializable\ndata class AddGroupMemberArgs(\n val groupId: Uuid,\n val memberId: Uuid,\n val role: String = \"member\",\n)"
},
"GroupMembershipResult": {
"kind": "data class",
"name": "GroupMembershipResult",
"module": "persistence-api",
"source": "@Serializable\ndata class GroupMembershipResult(\n @SerialName(\"id\")\n val membershipId: Uuid,\n\n @SerialName(\"tenantId\")\n val tenantId: String,\n\n @SerialName(\"groupId\")\n val groupId: Uuid,\n\n @SerialName(\"memberPartyId\")\n val memberPartyId: Uuid,\n\n @SerialName(\"role\")\n val role: String,\n\n // Audit fields\n @SerialName(\"createdAt\")\n val createdAt: Instant,\n\n @SerialName(\"createdById\")\n val createdById: Uuid? = null,\n\n @SerialName(\"updatedAt\")\n val updatedAt: Instant,\n\n @SerialName(\"updatedById\")\n val updatedById: Uuid? = null,\n\n @SerialName(\"deletedAt\")\n val deletedAt: Instant? = null,\n\n @SerialName(\"deletedById\")\n val deletedById: Uuid? = null\n) {\n companion object {\n fun from(membership: GroupMembership) = GroupMembershipResult(\n membershipId = membership.membershipId,\n tenantId = membership.tenantId,\n groupId = membership.groupId,\n memberPartyId = membership.memberPartyId,\n role = membership.role,\n createdAt = membership.createdAt,\n createdById = membership.createdById,\n updatedAt = membership.updatedAt,\n updatedById = membership.updatedById,\n deletedAt = membership.deletedAt,\n deletedById = membership.deletedById\n )\n }\n\n fun toGroupMembership() = GroupMembership(\n membershipId = membershipId,\n tenantId = tenantId,\n groupId = groupId,\n memberPartyId = memberPartyId,\n role = role,\n createdAt = createdAt,\n createdById = createdById,\n updatedAt = updatedAt,\n updatedById = updatedById,\n deletedAt = deletedAt,\n deletedById = deletedById\n )\n}\n\n@Serializable\ndata class GroupMembership(\n /** Unique identifier for this membership row */\n @SerialName(\"id\")\n val membershipId: Uuid,\n\n /** Tenant this membership belongs to */\n @SerialName(\"tenantId\")\n val tenantId: String,\n\n /** The group the member belongs to (party ID of the group) */\n @SerialName(\"groupId\")\n val groupId: Uuid,\n\n /** The party that is a member of the group */\n @SerialName(\"memberPartyId\")\n val memberPartyId: Uuid,\n\n /** The member's role within the group */\n @SerialName(\"role\")\n val role: String,\n\n // Audit fields\n /** When the membership was created */\n @SerialName(\"createdAt\")\n val createdAt: Instant,\n\n /** Who created the membership (party ID) */\n @SerialName(\"createdById\")\n val createdById: Uuid? = null,\n\n /** When the membership was last updated */\n @SerialName(\"updatedAt\")\n val updatedAt: Instant,\n\n /** Who last updated the membership (party ID) */\n @SerialName(\"updatedById\")\n val updatedById: Uuid? = null,\n\n /** When the membership was soft-deleted (null if not deleted) */\n @SerialName(\"deletedAt\")\n val deletedAt: Instant? = null,\n\n /** Who deleted the membership (party ID) */\n @SerialName(\"deletedById\")\n val deletedById: Uuid? = null\n) : HasId {\n override val id: String get() = membershipId.toString()\n}\n\n@JsExportCompat\n@Serializable\ndata class Tenant\n @JvmOverloads\n constructor(\n @SerialName(\"id\")\n val tenantId: String,\n @SerialName(\"tenantType\")\n val tenantType: TenantType,\n val name: String,\n val description: String? = null,\n /**\n * Globally unique URL-safe slug. Lowercase, hyphen-separated. Used as both the\n * platform subdomain label and the dispatcher's peelable path segment.\n */\n val slug: String,\n /**\n * Parent tenant id. `null` for root tenants. Hierarchy is enforced at insert\n * time (cycle detection walks up `parent_tenant_id`).\n */\n @SerialName(\"parentTenantId\")\n val parentTenantId: String? = null,\n val status: TenantStatus = TenantStatus.ACTIVE,\n /**\n * Generic \"system tenant\" flag. System tenants are excluded from default\n * listings and from all slug-based / parent-based resolution queries. Customer\n * tenants always have `system = false`. Higher layers (e.g. VDX) use this flag\n * to materialise their admin-control tenant; pure-EDK consumers can use it for\n * their own system-tenant patterns. EDK does not define what a system tenant\n * is or what privileges it carries.\n */\n val system: Boolean = false,\n @SerialName(\"ownerPartyId\")\n val ownerPartyId: Uuid? = null,\n @SerialName(\"createdAt\")\n val createdAt: Instant,\n @SerialName(\"createdById\")\n val createdById: Uuid? = null,\n @SerialName(\"updatedAt\")\n val updatedAt: Instant,\n @SerialName(\"updatedById\")\n val updatedById: Uuid? = null,\n @SerialName(\"deletedAt\")\n val deletedAt: Instant? = null,\n @SerialName(\"deletedById\")\n val deletedById: Uuid? = null,\n ) : HasId {\n override val id: String get() = tenantId\n }\n\n /** Filter by schema object ID */\r\n @SerialName(\"schemaId\")\n\n@JsExportCompat\n@OptIn(ExperimentalObjCName::class)\n@ObjCName(\"HasId\", exact = true)\ninterface HasId {\n val id: String\n}"
},
"CreateElectronicAddressArgs": {
"kind": "data class",
"name": "CreateElectronicAddressArgs",
"module": "service-api",
"source": "@Serializable\ndata class CreateElectronicAddressArgs(\n val partyId: Uuid,\n val addressType: String,\n val value: String,\n val label: String? = null,\n val isPrimary: Boolean = false,\n val isVerified: Boolean = false,\n val verifiedAt: Instant? = null,\n val validFrom: Instant? = null,\n val validUntil: Instant? = null,\n val identifierId: Uuid? = null,\n)"
},
"ElectronicAddress": {
"kind": "data class",
"name": "ElectronicAddress",
"module": "public",
"source": "@JsExportCompat\n@Serializable\ndata class ElectronicAddress(\n /** Unique identifier for this address */\n @SerialName(\"id\")\n val id: Uuid,\n /** Tenant this address belongs to */\n @SerialName(\"tenantId\")\n val tenantId: String,\n /** The party this address belongs to */\n @SerialName(\"partyId\")\n val partyId: Uuid,\n /** Optional correlation identifier this address is tied to */\n @SerialName(\"identifierId\")\n val identifierId: Uuid? = null,\n /** Type of address (e.g. EMAIL, PHONE, URL, SOCIAL_MEDIA) */\n @SerialName(\"addressType\")\n val addressType: String,\n /** The address value */\n @SerialName(\"value\")\n val value: String,\n /** Optional label (e.g. \"Work\", \"Personal\", \"Mobile\") */\n @SerialName(\"label\")\n val label: String? = null,\n /** Whether this is the primary address of its type */\n @SerialName(\"isPrimary\")\n val isPrimary: Boolean = false,\n /** Whether this address has been verified */\n @SerialName(\"isVerified\")\n val isVerified: Boolean = false,\n /** When the address was verified */\n @SerialName(\"verifiedAt\")\n val verifiedAt: Instant? = null,\n /** When the address became valid */\n @SerialName(\"validFrom\")\n val validFrom: Instant,\n /** When the address expired (null = current) */\n @SerialName(\"validUntil\")\n val validUntil: Instant? = null,\n)\n\n@JsExportCompat\n@Serializable\ndata class Tenant\n @JvmOverloads\n constructor(\n @SerialName(\"id\")\n val tenantId: String,\n @SerialName(\"tenantType\")\n val tenantType: TenantType,\n val name: String,\n val description: String? = null,\n /**\n * Globally unique URL-safe slug. Lowercase, hyphen-separated. Used as both the\n * platform subdomain label and the dispatcher's peelable path segment.\n */\n val slug: String,\n /**\n * Parent tenant id. `null` for root tenants. Hierarchy is enforced at insert\n * time (cycle detection walks up `parent_tenant_id`).\n */\n @SerialName(\"parentTenantId\")\n val parentTenantId: String? = null,\n val status: TenantStatus = TenantStatus.ACTIVE,\n /**\n * Generic \"system tenant\" flag. System tenants are excluded from default\n * listings and from all slug-based / parent-based resolution queries. Customer\n * tenants always have `system = false`. Higher layers (e.g. VDX) use this flag\n * to materialise their admin-control tenant; pure-EDK consumers can use it for\n * their own system-tenant patterns. EDK does not define what a system tenant\n * is or what privileges it carries.\n */\n val system: Boolean = false,\n @SerialName(\"ownerPartyId\")\n val ownerPartyId: Uuid? = null,\n @SerialName(\"createdAt\")\n val createdAt: Instant,\n @SerialName(\"createdById\")\n val createdById: Uuid? = null,\n @SerialName(\"updatedAt\")\n val updatedAt: Instant,\n @SerialName(\"updatedById\")\n val updatedById: Uuid? = null,\n @SerialName(\"deletedAt\")\n val deletedAt: Instant? = null,\n @SerialName(\"deletedById\")\n val deletedById: Uuid? = null,\n ) : HasId {\n override val id: String get() = tenantId\n }\n\n enum class Type {\n WORKFLOW_EXECUTION_STARTED,\n WORKFLOW_EXECUTION_COMPLETED,\n WORKFLOW_EXECUTION_FAILED,\n WORKFLOW_EXECUTION_TIMED_OUT,\n WORKFLOW_EXECUTION_CANCELED,\n WORKFLOW_EXECUTION_TERMINATED,\n WORKFLOW_EXECUTION_CONTINUED_AS_NEW,\n WORKFLOW_TASK_SCHEDULED,\n WORKFLOW_TASK_STARTED,\n WORKFLOW_TASK_COMPLETED,\n WORKFLOW_TASK_FAILED,\n WORKFLOW_TASK_TIMED_OUT,\n ACTIVITY_TASK_SCHEDULED,\n ACTIVITY_TASK_STARTED,\n ACTIVITY_TASK_COMPLETED,\n ACTIVITY_TASK_FAILED,\n ACTIVITY_TASK_TIMED_OUT,\n ACTIVITY_TASK_CANCEL_REQUESTED,\n ACTIVITY_TASK_CANCELED,\n TIMER_STARTED,\n TIMER_FIRED,\n TIMER_CANCELED,\n WORKFLOW_EXECUTION_SIGNALED,\n WORKFLOW_EXECUTION_UPDATE_ACCEPTED,\n WORKFLOW_EXECUTION_UPDATE_COMPLETED,\n WORKFLOW_EXECUTION_UPDATE_REJECTED,\n CHILD_WORKFLOW_EXECUTION_STARTED,\n CHILD_WORKFLOW_EXECUTION_COMPLETED,\n CHILD_WORKFLOW_EXECUTION_FAILED,\n MARKER_RECORDED,\n OTHER,\n }\n\n@Serializable\n@JvmInline\nvalue class TenantType(\n val value: String,\n) {\n companion object {\n /** Platform/system tenant (for multi-tenant SaaS platforms) */\n val PLATFORM = TenantType(\"platform\")\n\n /** Enterprise tenant (business, company) */\n val ENTERPRISE = TenantType(\"enterprise\")\n\n /** Partner tenant (external partner organization) */\n val PARTNER = TenantType(\"partner\")\n\n /** Sandbox tenant (for testing and development) */\n val SANDBOX = TenantType(\"sandbox\")\n }\n\n override fun toString(): String = value\n}\n\n @Serializable\n @SerialName(\"lowercase\")\n data object Lowercase : ClaimTransformation\n\n@JsExportCompat\n@Serializable\nenum class TenantStatus {\n ACTIVE,\n SUSPENDED,\n PENDING_VERIFICATION,\n}\n\n data class Generic(\n val exception: Throwable? = null,\n override val message: String = \"Consent error\",\n ) : ConsentError\n\n @Serializable\n data class System(\n override val id: String,\n val commandId: String,\n /** Mapping expression (engine-interpreted) producing the command's input from prior outputs. */\n val inputExpression: String,\n val next: String? = null,\n ) : WorkflowTask()\n\n@JsExportCompat\n@OptIn(ExperimentalObjCName::class)\n@ObjCName(\"HasId\", exact = true)\ninterface HasId {\n val id: String\n}"
},
"ListElectronicAddressesArgs": {
"kind": "data class",
"name": "ListElectronicAddressesArgs",
"module": "service-api",
"source": "@Serializable\ndata class ListElectronicAddressesArgs(val partyId: Uuid)"
},
"GetPartyArgs": {
"kind": "data class",
"name": "GetPartyArgs",
"module": "service-api",
"source": "@Serializable\ndata class GetPartyArgs(val id: Uuid, val include: Set<String> = emptySet())"
},
"PartyEntity": {
"kind": "sealed interface",
"name": "PartyEntity",
"module": "public",
"source": "@JsExportCompat\n@Serializable\n@JsonClassDiscriminator(\"partyType\")\nsealed interface PartyEntity {\n /** Unique identifier for the party */\n val partyId: Uuid\n\n /** Tenant this party belongs to */\n val tenantId: String\n\n /** The type of party (matches the JSON class discriminator) */\n val partyType: PartyType\n\n /** Origin of the party (external/managed) */\n val origin: PartyOrigin\n\n /** User-friendly display name */\n val displayName: String\n\n /** Optional URI for the party (DID, URL, etc.) */\n val uri: String?\n\n /** Primary jurisdiction for this party (ISO 3166-1 code or region, e.g. \"EU\", \"US\", \"NL\") */\n val jurisdiction: String?\n\n /** Reference to the owning party */\n val ownerId: Uuid?\n\n /** The single home organization unit; null means the tenant root */\n val organizationUnitId: Uuid?\n\n /** The specializations (roles) this party bears; multi-typing allows several */\n val specializations: List<PartySpecialization>\n\n /** When the party was created */\n val createdAt: Instant\n\n /** Who created the party (party ID) */\n val createdById: Uuid?\n\n /** When the party was last updated */\n val updatedAt: Instant\n\n /** Who last updated the party (party ID) */\n val updatedById: Uuid?\n\n /** When the party was soft-deleted (null if not deleted) */\n val deletedAt: Instant?\n\n /** Who deleted the party (party ID) */\n val deletedById: Uuid?\n\n /**\n * The party's electronic addresses, hydrated on demand. Null means the association was not\n * requested (default); an empty list means it was requested and there are none.\n */\n val electronicAddresses: List<ElectronicAddress>?\n\n /**\n * The party's physical addresses, hydrated on demand. Null means the association was not\n * requested (default); an empty list means it was requested and there are none.\n */\n val physicalAddresses: List<PhysicalAddress>?\n}\n\n@JsExportCompat\n@Serializable\ndata class Tenant\n @JvmOverloads\n constructor(\n @SerialName(\"id\")\n val tenantId: String,\n @SerialName(\"tenantType\")\n val tenantType: TenantType,\n val name: String,\n val description: String? = null,\n /**\n * Globally unique URL-safe slug. Lowercase, hyphen-separated. Used as both the\n * platform subdomain label and the dispatcher's peelable path segment.\n */\n val slug: String,\n /**\n * Parent tenant id. `null` for root tenants. Hierarchy is enforced at insert\n * time (cycle detection walks up `parent_tenant_id`).\n */\n @SerialName(\"parentTenantId\")\n val parentTenantId: String? = null,\n val status: TenantStatus = TenantStatus.ACTIVE,\n /**\n * Generic \"system tenant\" flag. System tenants are excluded from default\n * listings and from all slug-based / parent-based resolution queries. Customer\n * tenants always have `system = false`. Higher layers (e.g. VDX) use this flag\n * to materialise their admin-control tenant; pure-EDK consumers can use it for\n * their own system-tenant patterns. EDK does not define what a system tenant\n * is or what privileges it carries.\n */\n val system: Boolean = false,\n @SerialName(\"ownerPartyId\")\n val ownerPartyId: Uuid? = null,\n @SerialName(\"createdAt\")\n val createdAt: Instant,\n @SerialName(\"createdById\")\n val createdById: Uuid? = null,\n @SerialName(\"updatedAt\")\n val updatedAt: Instant,\n @SerialName(\"updatedById\")\n val updatedById: Uuid? = null,\n @SerialName(\"deletedAt\")\n val deletedAt: Instant? = null,\n @SerialName(\"deletedById\")\n val deletedById: Uuid? = null,\n ) : HasId {\n override val id: String get() = tenantId\n }\n\n-- discriminator-tagged sealed-interface JSON via kotlinx-serialization.\n\n@Serializable\n@JvmInline\nvalue class PartyType(\n val value: String,\n) {\n companion object {\n /** A human individual */\n val NATURAL_PERSON = PartyType(\"natural_person\")\n\n /** Alias for [NATURAL_PERSON] */\n val PERSON = NATURAL_PERSON\n\n /** A company, institution, or other legal entity */\n val ORGANIZATION = PartyType(\"organization\")\n\n /** A software-backed service participant (endpoint, integration, automated actor) */\n val SERVICE = PartyType(\"service\")\n\n /** A unit within an organization (department, division, sub-tenant scope) */\n val ORGANIZATION_UNIT = PartyType(\"organization_unit\")\n\n /** A collection of parties grouped for addressing or authorization */\n val GROUP = PartyType(\"group\")\n\n /** An autonomous actor acting on behalf of another party */\n val AGENT = PartyType(\"agent\")\n }\n\n override fun toString(): String = value\n}\n\n@JsExportCompat\n@Serializable\nenum class Origin {\n /** Resource was synced from an outside source (IdP, external system, import, auto-discovery) */\n @SerialName(\"external\")\n EXTERNAL,\n\n /** Resource was created and is managed natively within this system */\n @SerialName(\"managed\")\n MANAGED,\n ;\n\n companion object {\n fun fromValue(value: String): Origin =\n entries.firstOrNull { it.name.equals(value, ignoreCase = true) }\n ?: throw IllegalArgumentException(\"Unknown origin: $value\")\n }\n}\n\n@JsExportCompat\n@Serializable\nenum class PartyOrigin {\n /** Party was synced from an outside source (IdP, external system, import, auto-discovery) */\n @SerialName(\"external\")\n EXTERNAL,\n\n /** Party was created and is managed natively within this system */\n @SerialName(\"managed\")\n MANAGED,\n}\n\n@JsExportCompat\n@Serializable\ndata class PartySpecialization\n @JvmOverloads\n constructor(\n /** Human role label for this specialization (e.g. \"employee\", \"customer\", \"supplier\", \"student\") */\n @SerialName(\"subtype\")\n val subtype: String,\n /** The bound semantic Profile id; null indicates an untyped declaration */\n @SerialName(\"profileId\")\n val profileId: String? = null,\n /** The profile version the values were validated/captured against */\n @SerialName(\"profileVersion\")\n val profileVersion: String? = null,\n /** Values for THIS specialization; populated only when licensed */\n @SerialName(\"attributes\")\n val attributes: JsonObject? = null,\n )\n\n /** Filter by schema object ID */\r\n @SerialName(\"schemaId\")\n\n @OptIn(ExperimentalObjCName::class)\n @ObjCName(\"cddlNull\")\n @Serializable(with = CDDLSerializer::class)\n object Null : CDDL(\"null\", MajorType.SPECIAL, 22, arrayOf(nil)) {\n fun newNull() = CborSimple.NULL\n\n fun fromJson(value: JsonElement) = CborSimple.NULL\n }\n\n@JsExportCompat\n@Serializable\ndata class ElectronicAddress(\n /** Unique identifier for this address */\n @SerialName(\"id\")\n val id: Uuid,\n /** Tenant this address belongs to */\n @SerialName(\"tenantId\")\n val tenantId: String,\n /** The party this address belongs to */\n @SerialName(\"partyId\")\n val partyId: Uuid,\n /** Optional correlation identifier this address is tied to */\n @SerialName(\"identifierId\")\n val identifierId: Uuid? = null,\n /** Type of address (e.g. EMAIL, PHONE, URL, SOCIAL_MEDIA) */\n @SerialName(\"addressType\")\n val addressType: String,\n /** The address value */\n @SerialName(\"value\")\n val value: String,\n /** Optional label (e.g. \"Work\", \"Personal\", \"Mobile\") */\n @SerialName(\"label\")\n val label: String? = null,\n /** Whether this is the primary address of its type */\n @SerialName(\"isPrimary\")\n val isPrimary: Boolean = false,\n /** Whether this address has been verified */\n @SerialName(\"isVerified\")\n val isVerified: Boolean = false,\n /** When the address was verified */\n @SerialName(\"verifiedAt\")\n val verifiedAt: Instant? = null,\n /** When the address became valid */\n @SerialName(\"validFrom\")\n val validFrom: Instant,\n /** When the address expired (null = current) */\n @SerialName(\"validUntil\")\n val validUntil: Instant? = null,\n)\n\n@JsExportCompat\n@Serializable\ndata class PhysicalAddress(\n /** Unique identifier for this address */\n @SerialName(\"id\")\n val id: Uuid,\n /** The party this address belongs to */\n @SerialName(\"partyId\")\n val partyId: Uuid,\n /** Optional correlation identifier this address is tied to */\n @SerialName(\"identifierId\")\n val identifierId: Uuid? = null,\n /** Tenant this address belongs to */\n @SerialName(\"tenantId\")\n val tenantId: String,\n /** The type/purpose of this address */\n @SerialName(\"addressType\")\n val addressType: String,\n /** User-friendly label (e.g. \"Headquarters\", \"Home\") */\n @SerialName(\"label\")\n val label: String? = null,\n /** Whether this is the primary address of its type */\n @SerialName(\"isPrimary\")\n val isPrimary: Boolean = false,\n /** Street address (house number, street name, unit) */\n @SerialName(\"streetAddress\")\n val streetAddress: String? = null,\n /** City/municipality name */\n @SerialName(\"city\")\n val city: String? = null,\n /** State/province/region */\n @SerialName(\"province\")\n val province: String? = null,\n /** Postal/ZIP code */\n @SerialName(\"postalCode\")\n val postalCode: String? = null,\n /** Country code (ISO 3166-1 alpha-2) */\n @SerialName(\"countryCode\")\n val countryCode: String? = null,\n /** Latitude coordinate */\n @SerialName(\"latitude\")\n val latitude: Double? = null,\n /** Longitude coordinate */\n @SerialName(\"longitude\")\n val longitude: Double? = null,\n /** When this address became valid */\n @SerialName(\"validFrom\")\n val validFrom: Instant,\n /** When this address expired (null = current) */\n @SerialName(\"validUntil\")\n val validUntil: Instant? = null,\n /** When the address was created */\n @SerialName(\"createdAt\")\n val createdAt: Instant,\n /** Who created the address (party ID) */\n @SerialName(\"createdById\")\n val createdById: Uuid? = null,\n /** When the address was last updated */\n @SerialName(\"updatedAt\")\n val updatedAt: Instant,\n /** Who last updated the address (party ID) */\n @SerialName(\"updatedById\")\n val updatedById: Uuid? = null,\n /** When the address was soft-deleted (null if not deleted) */\n @SerialName(\"deletedAt\")\n val deletedAt: Instant? = null,\n /** Who deleted the address (party ID) */\n @SerialName(\"deletedById\")\n val deletedById: Uuid? = null,\n)\n\n@Serializable\n@JvmInline\nvalue class TenantType(\n val value: String,\n) {\n companion object {\n /** Platform/system tenant (for multi-tenant SaaS platforms) */\n val PLATFORM = TenantType(\"platform\")\n\n /** Enterprise tenant (business, company) */\n val ENTERPRISE = TenantType(\"enterprise\")\n\n /** Partner tenant (external partner organization) */\n val PARTNER = TenantType(\"partner\")\n\n /** Sandbox tenant (for testing and development) */\n val SANDBOX = TenantType(\"sandbox\")\n }\n\n override fun toString(): String = value\n}\n\n @Serializable\n @SerialName(\"lowercase\")\n data object Lowercase : ClaimTransformation\n\n@JsExportCompat\n@Serializable\nenum class TenantStatus {\n ACTIVE,\n SUSPENDED,\n PENDING_VERIFICATION,\n}"
},
"CreateRelationshipArgs": {
"kind": "data class",
"name": "CreateRelationshipArgs",
"module": "service-api",
"source": "@Serializable\ndata class CreateRelationshipArgs(\n val leftId: Uuid,\n val rightId: Uuid,\n val relationshipType: String,\n val status: String? = null,\n val validFrom: Instant? = null,\n val validUntil: Instant? = null,\n)"
},
"PartyRelationshipResult": {
"kind": "data class",
"name": "PartyRelationshipResult",
"module": "persistence-api",
"source": "@Serializable\ndata class PartyRelationshipResult(\n // Core fields\n /** Unique identifier for this relationship */\n @SerialName(\"id\")\n val id: Uuid,\n\n /** Tenant this relationship belongs to */\n @SerialName(\"tenantId\")\n val tenantId: String,\n\n /** The \"left\" party in the relationship */\n @SerialName(\"leftId\")\n val leftPartyId: Uuid,\n\n /** The \"right\" party in the relationship */\n @SerialName(\"rightId\")\n val rightPartyId: Uuid,\n\n /** Type of relationship */\n @SerialName(\"relationshipType\")\n val relationshipType: String,\n\n /** Status of the relationship */\n @SerialName(\"status\")\n val status: String,\n\n /** When the relationship becomes valid */\n @SerialName(\"validFrom\")\n val validFrom: Instant? = null,\n\n /** When the relationship expires */\n @SerialName(\"validUntil\")\n val validUntil: Instant? = null,\n\n /** When the relationship was verified */\n @SerialName(\"verifiedAt\")\n val verifiedAt: Instant? = null,\n\n /** Who verified the relationship (party ID) */\n @SerialName(\"verifiedById\")\n val verifiedById: Uuid? = null,\n\n // Audit fields\n /** When the record was created */\n @SerialName(\"createdAt\")\n val createdAt: Instant,\n\n /** Who created the record (party ID) */\n @SerialName(\"createdById\")\n val createdById: Uuid? = null,\n\n /** When the record was last updated */\n @SerialName(\"updatedAt\")\n val updatedAt: Instant,\n\n /** Who last updated the record (party ID) */\n @SerialName(\"updatedById\")\n val updatedById: Uuid? = null,\n\n // Populated associations (based on FetchOptions)\n /**\n * The left party details.\n * Populated when [PartyRelationshipFetchOptions.includeLeftParty] is true.\n */\n @SerialName(\"leftParty\")\n val leftParty: Party? = null,\n\n /**\n * The right party details.\n * Populated when [PartyRelationshipFetchOptions.includeRightParty] is true.\n */\n @SerialName(\"rightParty\")\n val rightParty: Party? = null,\n\n /**\n * The relationship type definition.\n * Populated when [PartyRelationshipFetchOptions.includeRelationshipType] is true.\n */\n @SerialName(\"relationshipTypeDefinition\")\n val relationshipTypeDefinition: RelationshipType? = null,\n\n /**\n * Employment extension data.\n * Populated when [PartyRelationshipFetchOptions.includeEmploymentExtension] is true.\n */\n @SerialName(\"employmentExtension\")\n val employmentExtension: RelationshipEmployment? = null,\n\n /**\n * Membership extension data.\n * Populated when [PartyRelationshipFetchOptions.includeMembershipExtension] is true.\n */\n @SerialName(\"membershipExtension\")\n val membershipExtension: RelationshipMembership? = null,\n\n /**\n * Guardianship extension data.\n * Populated when [PartyRelationshipFetchOptions.includeGuardianshipExtension] is true.\n */\n @SerialName(\"guardianshipExtension\")\n val guardianshipExtension: RelationshipGuardianship? = null,\n\n /**\n * Delegation extension data.\n * Populated when [PartyRelationshipFetchOptions.includeDelegationExtension] is true.\n */\n @SerialName(\"delegationExtension\")\n val delegationExtension: RelationshipDelegation? = null\n) {\n /** Check if the relationship has been verified */\n val isVerified: Boolean get() = verifiedAt != null\n\n companion object {\n /**\n * Create a PartyRelationshipResult from a PartyRelationship entity.\n */\n fun from(\n relationship: PartyRelationship,\n leftParty: Party? = null,\n rightParty: Party? = null,\n relationshipTypeDefinition: RelationshipType? = null,\n employmentExtension: RelationshipEmployment? = null,\n membershipExtension: RelationshipMembership? = null,\n guardianshipExtension: RelationshipGuardianship? = null,\n delegationExtension: RelationshipDelegation? = null\n ) = PartyRelationshipResult(\n id = relationship.id,\n tenantId = relationship.tenantId,\n leftPartyId = relationship.leftPartyId,\n rightPartyId = relationship.rightPartyId,\n relationshipType = relationship.relationshipType,\n status = relationship.status,\n validFrom = relationship.validFrom,\n validUntil = relationship.validUntil,\n verifiedAt = relationship.verifiedAt,\n verifiedById = relationship.verifiedById,\n createdAt = relationship.createdAt,\n createdById = relationship.createdById,\n updatedAt = relationship.updatedAt,\n updatedById = relationship.updatedById,\n leftParty = leftParty,\n rightParty = rightParty,\n relationshipTypeDefinition = relationshipTypeDefinition,\n employmentExtension = employmentExtension,\n membershipExtension = membershipExtension,\n guardianshipExtension = guardianshipExtension,\n delegationExtension = delegationExtension\n )\n }\n\n /** Convert back to the core PartyRelationship entity (without associations) */\n fun toPartyRelationship() = PartyRelationship(\n id = id,\n tenantId = tenantId,\n leftPartyId = leftPartyId,\n rightPartyId = rightPartyId,\n relationshipType = relationshipType,\n status = status,\n validFrom = validFrom,\n validUntil = validUntil,\n verifiedAt = verifiedAt,\n verifiedById = verifiedById,\n createdAt = createdAt,\n createdById = createdById,\n updatedAt = updatedAt,\n updatedById = updatedById\n )\n}\n\n@JsExportCompat\n@Serializable\ndata class Tenant\n @JvmOverloads\n constructor(\n @SerialName(\"id\")\n val tenantId: String,\n @SerialName(\"tenantType\")\n val tenantType: TenantType,\n val name: String,\n val description: String? = null,\n /**\n * Globally unique URL-safe slug. Lowercase, hyphen-separated. Used as both the\n * platform subdomain label and the dispatcher's peelable path segment.\n */\n val slug: String,\n /**\n * Parent tenant id. `null` for root tenants. Hierarchy is enforced at insert\n * time (cycle detection walks up `parent_tenant_id`).\n */\n @SerialName(\"parentTenantId\")\n val parentTenantId: String? = null,\n val status: TenantStatus = TenantStatus.ACTIVE,\n /**\n * Generic \"system tenant\" flag. System tenants are excluded from default\n * listings and from all slug-based / parent-based resolution queries. Customer\n * tenants always have `system = false`. Higher layers (e.g. VDX) use this flag\n * to materialise their admin-control tenant; pure-EDK consumers can use it for\n * their own system-tenant patterns. EDK does not define what a system tenant\n * is or what privileges it carries.\n */\n val system: Boolean = false,\n @SerialName(\"ownerPartyId\")\n val ownerPartyId: Uuid? = null,\n @SerialName(\"createdAt\")\n val createdAt: Instant,\n @SerialName(\"createdById\")\n val createdById: Uuid? = null,\n @SerialName(\"updatedAt\")\n val updatedAt: Instant,\n @SerialName(\"updatedById\")\n val updatedById: Uuid? = null,\n @SerialName(\"deletedAt\")\n val deletedAt: Instant? = null,\n @SerialName(\"deletedById\")\n val deletedById: Uuid? = null,\n ) : HasId {\n override val id: String get() = tenantId\n }\n\n enum class Type {\n WORKFLOW_EXECUTION_STARTED,\n WORKFLOW_EXECUTION_COMPLETED,\n WORKFLOW_EXECUTION_FAILED,\n WORKFLOW_EXECUTION_TIMED_OUT,\n WORKFLOW_EXECUTION_CANCELED,\n WORKFLOW_EXECUTION_TERMINATED,\n WORKFLOW_EXECUTION_CONTINUED_AS_NEW,\n WORKFLOW_TASK_SCHEDULED,\n WORKFLOW_TASK_STARTED,\n WORKFLOW_TASK_COMPLETED,\n WORKFLOW_TASK_FAILED,\n WORKFLOW_TASK_TIMED_OUT,\n ACTIVITY_TASK_SCHEDULED,\n ACTIVITY_TASK_STARTED,\n ACTIVITY_TASK_COMPLETED,\n ACTIVITY_TASK_FAILED,\n ACTIVITY_TASK_TIMED_OUT,\n ACTIVITY_TASK_CANCEL_REQUESTED,\n ACTIVITY_TASK_CANCELED,\n TIMER_STARTED,\n TIMER_FIRED,\n TIMER_CANCELED,\n WORKFLOW_EXECUTION_SIGNALED,\n WORKFLOW_EXECUTION_UPDATE_ACCEPTED,\n WORKFLOW_EXECUTION_UPDATE_COMPLETED,\n WORKFLOW_EXECUTION_UPDATE_REJECTED,\n CHILD_WORKFLOW_EXECUTION_STARTED,\n CHILD_WORKFLOW_EXECUTION_COMPLETED,\n CHILD_WORKFLOW_EXECUTION_FAILED,\n MARKER_RECORDED,\n OTHER,\n }\n\n data class Status(\n val response: HttpResponse\n ) : RetryTrigger() {\n override fun toString(): String = \"HTTP ${response.status.value}\"\n }\n\n /** Filter by schema object ID */\r\n @SerialName(\"schemaId\")\n\n@Serializable\ndata class PartyRelationshipFetchOptions(\n /** Include the left party details */\n @SerialName(\"includeLeftParty\")\n val includeLeftParty: Boolean = false,\n\n /** Include the right party details */\n @SerialName(\"includeRightParty\")\n val includeRightParty: Boolean = false,\n\n /** Include the relationship type definition */\n @SerialName(\"includeRelationshipType\")\n val includeRelationshipType: Boolean = false,\n\n /** Include employment extension data (if applicable) */\n @SerialName(\"includeEmploymentExtension\")\n val includeEmploymentExtension: Boolean = false,\n\n /** Include membership extension data (if applicable) */\n @SerialName(\"includeMembershipExtension\")\n val includeMembershipExtension: Boolean = false,\n\n /** Include guardianship extension data (if applicable) */\n @SerialName(\"includeGuardianshipExtension\")\n val includeGuardianshipExtension: Boolean = false,\n\n /** Include delegation extension data (if applicable) */\n @SerialName(\"includeDelegationExtension\")\n val includeDelegationExtension: Boolean = false\n) {\n companion object {\n /** Load only core relationship data (default) */\n val MINIMAL = PartyRelationshipFetchOptions()\n\n /** Load relationship with both parties */\n val WITH_PARTIES = PartyRelationshipFetchOptions(\n includeLeftParty = true,\n includeRightParty = true\n )\n\n /** Load relationship with all extensions */\n val WITH_EXTENSIONS = PartyRelationshipFetchOptions(\n includeEmploymentExtension = true,\n includeMembershipExtension = true,\n includeGuardianshipExtension = true,\n includeDelegationExtension = true\n )\n\n /** Load everything (all associations and extensions) */\n val FULL = PartyRelationshipFetchOptions(\n includeLeftParty = true,\n includeRightParty = true,\n includeRelationshipType = true,\n includeEmploymentExtension = true,\n includeMembershipExtension = true,\n includeGuardianshipExtension = true,\n includeDelegationExtension = true\n )\n }\n\n /** Builder method to include left party */\n fun withLeftParty() = copy(includeLeftParty = true)\n\n /** Builder method to include right party */\n fun withRightParty() = copy(includeRightParty = true)\n\n /** Builder method to include both parties */\n fun withParties() = copy(includeLeftParty = true, includeRightParty = true)\n\n /** Builder method to include relationship type */\n fun withRelationshipType() = copy(includeRelationshipType = true)\n\n /** Builder method to include all extensions */\n fun withAllExtensions() = copy(\n includeEmploymentExtension = true,\n includeMembershipExtension = true,\n includeGuardianshipExtension = true,\n includeDelegationExtension = true\n )\n}\n\n@JsExportCompat\n@Serializable\ndata class Party\n @JvmOverloads\n constructor(\n /** Unique identifier for the party */\n @SerialName(\"id\")\n val partyId: Uuid,\n /** Tenant this party belongs to */\n @SerialName(\"tenantId\")\n val tenantId: String,\n /** The type of party */\n @SerialName(\"partyType\")\n val partyType: PartyType,\n /** Origin of the party (external/managed) */\n val origin: PartyOrigin,\n /**\n * User-friendly display name (editable by user). Non-null: abstract\n * identity-backed parties get filled with the identity's own UUID at\n * create-time so the schema invariant holds without a semantically-\n * empty sentinel; concrete Party roles (NaturalPerson / Organization /\n * Contact / OID4VCI-issuer / OID4VP-verifier / credential-template)\n * populate this with a meaningful human-readable name.\n */\n @SerialName(\"displayName\")\n val displayName: String,\n /** Optional URI for the party (DID, URL, etc.) */\n val uri: String? = null,\n /** Primary jurisdiction for this party (ISO 3166-1 code or region, e.g. \"EU\", \"US\", \"NL\") */\n val jurisdiction: String? = null,\n /** Reference to the owning party (for identities, this is the person/org that owns the identity) */\n @SerialName(\"ownerId\")\n val ownerId: Uuid? = null,\n /** When the party was created */\n @SerialName(\"createdAt\")\n val createdAt: Instant,\n /** Who created the party (party ID) */\n @SerialName(\"createdById\")\n val createdById: Uuid? = null,\n /** When the party was last updated */\n @SerialName(\"updatedAt\")\n val updatedAt: Instant,\n /** Who last updated the party (party ID) */\n @SerialName(\"updatedById\")\n val updatedById: Uuid? = null,\n /** When the party was soft-deleted (null if not deleted) */\n @SerialName(\"deletedAt\")\n val deletedAt: Instant? = null,\n /** Who deleted the party (party ID) */\n @SerialName(\"deletedById\")\n val deletedById: Uuid? = null,\n ) : HasId {\n override val id: String get() = partyId.toString()\n }\n\n@Serializable\ndata class RelationshipType(\n /** The relationship type identifier (e.g., \"EMPLOYMENT\", \"MEMBERSHIP\") */\n @SerialName(\"type\")\n val type: String,\n\n /** I18n key for describing left→right direction (e.g., \"employee_of\") */\n @SerialName(\"leftToRightI18nKey\")\n val leftToRightI18nKey: String,\n\n /** I18n key for describing right→left direction (e.g., \"employs\") */\n @SerialName(\"rightToLeftI18nKey\")\n val rightToLeftI18nKey: String,\n\n /** Optional description i18n key */\n @SerialName(\"descriptionI18nKey\")\n val descriptionI18nKey: String? = null\n)\n\n@Serializable\ndata class RelationshipEmployment(\n /** The relationship this extends (references party_relationship.id) */\n @SerialName(\"relationshipId\")\n val relationshipId: Uuid,\n\n /** Job title of the employee */\n @SerialName(\"jobTitle\")\n val jobTitle: String? = null,\n\n /** Department within the organization */\n @SerialName(\"department\")\n val department: String? = null,\n\n /** Employee number/ID */\n @SerialName(\"employeeNumber\")\n val employeeNumber: String? = null,\n\n /** Cost center for accounting purposes */\n @SerialName(\"costCenter\")\n val costCenter: String? = null,\n\n /** When the record was created */\n @SerialName(\"createdAt\")\n val createdAt: Instant,\n\n /** When the record was last updated */\n @SerialName(\"updatedAt\")\n val updatedAt: Instant\n)\n\n@Serializable\ndata class RelationshipMembership(\n /** The relationship this extends (references party_relationship.id) */\n @SerialName(\"relationshipId\")\n val relationshipId: Uuid,\n\n /** Role within the membership (e.g., \"ADMIN\", \"MEMBER\", \"OBSERVER\") */\n @SerialName(\"memberRole\")\n val memberRole: String? = null,\n\n /** When the membership started */\n @SerialName(\"memberSince\")\n val memberSince: Instant? = null,\n\n /** Membership tier (e.g., \"GOLD\", \"SILVER\", \"BRONZE\") */\n @SerialName(\"tier\")\n val tier: String? = null,\n\n /** When the record was created */\n @SerialName(\"createdAt\")\n val createdAt: Instant,\n\n /** When the record was last updated */\n @SerialName(\"updatedAt\")\n val updatedAt: Instant\n)\n\n@Serializable\ndata class RelationshipGuardianship(\n /** The relationship this extends (references party_relationship.id) */\n @SerialName(\"relationshipId\")\n val relationshipId: Uuid,\n\n /** Type of guardianship (e.g., \"LEGAL\", \"TEMPORARY\", \"MEDICAL\") */\n @SerialName(\"guardianshipType\")\n val guardianshipType: String? = null,\n\n /** Reference to the court order establishing guardianship */\n @SerialName(\"courtOrderReference\")\n val courtOrderReference: String? = null,\n\n /** Jurisdiction where guardianship was established */\n @SerialName(\"jurisdiction\")\n val jurisdiction: String? = null,\n\n /** When guardianship was granted */\n @SerialName(\"grantedAt\")\n val grantedAt: Instant? = null,\n\n /** When guardianship expires */\n @SerialName(\"expiresAt\")\n val expiresAt: Instant? = null,\n\n /** When the record was created */\n @SerialName(\"createdAt\")\n val createdAt: Instant,\n\n /** When the record was last updated */\n @SerialName(\"updatedAt\")\n val updatedAt: Instant\n)\n\n@Serializable\ndata class RelationshipDelegation(\n /** The relationship this extends (references party_relationship.id) */\n @SerialName(\"relationshipId\")\n val relationshipId: Uuid,\n\n /** Type of delegation (e.g., \"POWER_OF_ATTORNEY\", \"PROXY\", \"MANDATE\") */\n @SerialName(\"delegationType\")\n val delegationType: String? = null,\n\n /** Scope of the delegation (what actions are permitted) */\n @SerialName(\"scope\")\n val scope: String? = null,\n\n /** Reference to the legal document establishing delegation */\n @SerialName(\"legalDocumentRef\")\n val legalDocumentRef: String? = null,\n\n /** Whether witness signature is required for actions */\n @SerialName(\"requiresWitness\")\n val requiresWitness: Boolean? = null,\n\n /** When the record was created */\n @SerialName(\"createdAt\")\n val createdAt: Instant,\n\n /** When the record was last updated */\n @SerialName(\"updatedAt\")\n val updatedAt: Instant\n)\n\n@Serializable\ndata class PartyRelationship(\n /** Unique identifier for this relationship */\n @SerialName(\"id\")\n val id: Uuid,\n\n /** Tenant this relationship belongs to */\n @SerialName(\"tenantId\")\n val tenantId: String,\n\n /** The \"left\" party in the relationship (e.g., employee) */\n @SerialName(\"leftPartyId\")\n val leftPartyId: Uuid,\n\n /** The \"right\" party in the relationship (e.g., employer) */\n @SerialName(\"rightPartyId\")\n val rightPartyId: Uuid,\n\n /** Type of relationship (references relationship_type.type) */\n @SerialName(\"relationshipType\")\n val relationshipType: String,\n\n /** Status of the relationship */\n @SerialName(\"status\")\n val status: String = RelationshipStatus.ACTIVE,\n\n /** When the relationship becomes valid */\n @SerialName(\"validFrom\")\n val validFrom: Instant? = null,\n\n /** When the relationship expires */\n @SerialName(\"validUntil\")\n val validUntil: Instant? = null,\n\n /** When the relationship was verified */\n @SerialName(\"verifiedAt\")\n val verifiedAt: Instant? = null,\n\n /** Who verified the relationship (party ID) */\n @SerialName(\"verifiedById\")\n val verifiedById: Uuid? = null,\n\n // Audit fields\n /** When the record was created */\n @SerialName(\"createdAt\")\n val createdAt: Instant,\n\n /** Who created the record (party ID) */\n @SerialName(\"createdById\")\n val createdById: Uuid? = null,\n\n /** When the record was last updated */\n @SerialName(\"updatedAt\")\n val updatedAt: Instant,\n\n /** Who last updated the record (party ID) */\n @SerialName(\"updatedById\")\n val updatedById: Uuid? = null\n) {\n /** Check if the relationship is currently active */\n fun isActive(at: Instant): Boolean {\n if (status != RelationshipStatus.ACTIVE) return false\n val afterStart = validFrom?.let { at >= it } ?: true\n val beforeEnd = validUntil?.let { at <= it } ?: true\n return afterStart && beforeEnd\n }\n\n /** Check if the relationship has been verified */\n val isVerified: Boolean get() = verifiedAt != null\n}\n\n@Serializable\n@JvmInline\nvalue class TenantType(\n val value: String,\n) {\n companion object {\n /** Platform/system tenant (for multi-tenant SaaS platforms) */\n val PLATFORM = TenantType(\"platform\")\n\n /** Enterprise tenant (business, company) */\n val ENTERPRISE = TenantType(\"enterprise\")\n\n /** Partner tenant (external partner organization) */\n val PARTNER = TenantType(\"partner\")\n\n /** Sandbox tenant (for testing and development) */\n val SANDBOX = TenantType(\"sandbox\")\n }\n\n override fun toString(): String = value\n}"
},
"ListRelationshipsByPartyArgs": {
"kind": "data class",
"name": "ListRelationshipsByPartyArgs",
"module": "service-api",
"source": "@Serializable\ndata class ListRelationshipsByPartyArgs(val partyId: Uuid)"
},
"CreateTenantIdpArgs": {
"kind": "data class",
"name": "CreateTenantIdpArgs",
"module": "public",
"source": "@JsExportCompat\n@Serializable\ndata class CreateTenantIdpArgs(\n val displayName: String,\n val issuer: String,\n val clientId: String,\n val idpId: String? = null,\n val clientSecret: String? = null,\n val clientSecretRef: String? = null,\n val scopes: List<String> = listOf(\"openid\", \"profile\", \"email\"),\n val claimsMapping: TenantIdpClaimsMapping = TenantIdpClaimsMapping(),\n val enabled: Boolean = false,\n)\n\n@Serializable\ndata class TenantIdpClaimsMapping(\n val subject: String = \"sub\",\n val email: String = \"email\",\n val displayName: String = \"name\",\n)"
},
"TenantIdpRecord": {
"kind": "data class",
"name": "TenantIdpRecord",
"module": "public",
"source": "@Serializable\ndata class TenantIdpRecord(\n val idpId: String,\n val displayName: String,\n val issuer: String,\n val clientId: String,\n val clientSecretRef: String? = null,\n val scopes: List<String> = listOf(\"openid\", \"profile\", \"email\"),\n val claimsMapping: TenantIdpClaimsMapping = TenantIdpClaimsMapping(),\n val enabled: Boolean = false,\n val createdAt: Instant? = null,\n val updatedAt: Instant? = null,\n)\n\n@Serializable\ndata class TenantIdpClaimsMapping(\n val subject: String = \"sub\",\n val email: String = \"email\",\n val displayName: String = \"name\",\n)"
},
"RegisterTenantArgs": {
"kind": "data class",
"name": "RegisterTenantArgs",
"module": "public",
"source": "@JsExportCompat\n@Serializable\ndata class RegisterTenantArgs(\n val tenantType: TenantType,\n val name: String,\n val description: String? = null,\n /** URL-safe lowercase slug. Doubles as platform-subdomain label and path segment. */\n val slug: String,\n /** Parent tenant id; null = root tenant. */\n val parentTenantId: String? = null,\n /** Optional Party owner. When null, no Party is linked at registration. */\n val ownerPartyId: Uuid? = null,\n /**\n * When true (default), auto-create the platform subdomain row `<slug>.<base>` in\n * `tenant_domain`.\n */\n val initialPlatformSubdomain: Boolean = true,\n /**\n * When true (default), provision a default AS instance (slug `default`) for this\n * tenant. When false, the tenant has no hosted AS — only viable with a\n * [OwnerInput.Federated] owner whose external IDP becomes the trusted issuer.\n */\n val hostedAs: Boolean = true,\n val owner: OwnerInput,\n)\n\n@Serializable\n@JvmInline\nvalue class TenantType(\n val value: String,\n) {\n companion object {\n /** Platform/system tenant (for multi-tenant SaaS platforms) */\n val PLATFORM = TenantType(\"platform\")\n\n /** Enterprise tenant (business, company) */\n val ENTERPRISE = TenantType(\"enterprise\")\n\n /** Partner tenant (external partner organization) */\n val PARTNER = TenantType(\"partner\")\n\n /** Sandbox tenant (for testing and development) */\n val SANDBOX = TenantType(\"sandbox\")\n }\n\n override fun toString(): String = value\n}\n\n@JsExportCompat\n@Serializable\ndata class Party\n @JvmOverloads\n constructor(\n /** Unique identifier for the party */\n @SerialName(\"id\")\n val partyId: Uuid,\n /** Tenant this party belongs to */\n @SerialName(\"tenantId\")\n val tenantId: String,\n /** The type of party */\n @SerialName(\"partyType\")\n val partyType: PartyType,\n /** Origin of the party (external/managed) */\n val origin: PartyOrigin,\n /**\n * User-friendly display name (editable by user). Non-null: abstract\n * identity-backed parties get filled with the identity's own UUID at\n * create-time so the schema invariant holds without a semantically-\n * empty sentinel; concrete Party roles (NaturalPerson / Organization /\n * Contact / OID4VCI-issuer / OID4VP-verifier / credential-template)\n * populate this with a meaningful human-readable name.\n */\n @SerialName(\"displayName\")\n val displayName: String,\n /** Optional URI for the party (DID, URL, etc.) */\n val uri: String? = null,\n /** Primary jurisdiction for this party (ISO 3166-1 code or region, e.g. \"EU\", \"US\", \"NL\") */\n val jurisdiction: String? = null,\n /** Reference to the owning party (for identities, this is the person/org that owns the identity) */\n @SerialName(\"ownerId\")\n val ownerId: Uuid? = null,\n /** When the party was created */\n @SerialName(\"createdAt\")\n val createdAt: Instant,\n /** Who created the party (party ID) */\n @SerialName(\"createdById\")\n val createdById: Uuid? = null,\n /** When the party was last updated */\n @SerialName(\"updatedAt\")\n val updatedAt: Instant,\n /** Who last updated the party (party ID) */\n @SerialName(\"updatedById\")\n val updatedById: Uuid? = null,\n /** When the party was soft-deleted (null if not deleted) */\n @SerialName(\"deletedAt\")\n val deletedAt: Instant? = null,\n /** Who deleted the party (party ID) */\n @SerialName(\"deletedById\")\n val deletedById: Uuid? = null,\n ) : HasId {\n override val id: String get() = partyId.toString()\n }\n\n@JsExportCompat\n@Serializable\nsealed class OwnerInput {\n abstract val email: String\n abstract val displayName: String\n\n @JsExportCompat\n @Serializable\n data class Local(\n override val email: String,\n override val displayName: String,\n ) : OwnerInput()\n\n @JsExportCompat\n @Serializable\n data class Federated(\n override val email: String,\n override val displayName: String,\n val federationProvider: FederationProviderInput,\n /**\n * Owner's stable identifier inside the external IDP — typically the `sub`\n * claim, but can be any claim agreed in [FederationProviderInput.claimMapping].\n */\n val externalSubject: String,\n ) : OwnerInput()\n\n @JsExportCompat\n @Serializable\n data class Hybrid(\n override val email: String,\n override val displayName: String,\n val federationProvider: FederationProviderInput,\n val externalSubject: String,\n ) : OwnerInput()\n}\n\n @JsExportCompat\n @Serializable\n data class Federated(\n override val email: String,\n override val displayName: String,\n val federationProvider: FederationProviderInput,\n /**\n * Owner's stable identifier inside the external IDP — typically the `sub`\n * claim, but can be any claim agreed in [FederationProviderInput.claimMapping].\n */\n val externalSubject: String,\n ) : OwnerInput()\n\n@JsExportCompat\n@Serializable\ndata class Tenant\n @JvmOverloads\n constructor(\n @SerialName(\"id\")\n val tenantId: String,\n @SerialName(\"tenantType\")\n val tenantType: TenantType,\n val name: String,\n val description: String? = null,\n /**\n * Globally unique URL-safe slug. Lowercase, hyphen-separated. Used as both the\n * platform subdomain label and the dispatcher's peelable path segment.\n */\n val slug: String,\n /**\n * Parent tenant id. `null` for root tenants. Hierarchy is enforced at insert\n * time (cycle detection walks up `parent_tenant_id`).\n */\n @SerialName(\"parentTenantId\")\n val parentTenantId: String? = null,\n val status: TenantStatus = TenantStatus.ACTIVE,\n /**\n * Generic \"system tenant\" flag. System tenants are excluded from default\n * listings and from all slug-based / parent-based resolution queries. Customer\n * tenants always have `system = false`. Higher layers (e.g. VDX) use this flag\n * to materialise their admin-control tenant; pure-EDK consumers can use it for\n * their own system-tenant patterns. EDK does not define what a system tenant\n * is or what privileges it carries.\n */\n val system: Boolean = false,\n @SerialName(\"ownerPartyId\")\n val ownerPartyId: Uuid? = null,\n @SerialName(\"createdAt\")\n val createdAt: Instant,\n @SerialName(\"createdById\")\n val createdById: Uuid? = null,\n @SerialName(\"updatedAt\")\n val updatedAt: Instant,\n @SerialName(\"updatedById\")\n val updatedById: Uuid? = null,\n @SerialName(\"deletedAt\")\n val deletedAt: Instant? = null,\n @SerialName(\"deletedById\")\n val deletedById: Uuid? = null,\n ) : HasId {\n override val id: String get() = tenantId\n }\n\n@Serializable\n@JvmInline\nvalue class PartyType(\n val value: String,\n) {\n companion object {\n /** A human individual */\n val NATURAL_PERSON = PartyType(\"natural_person\")\n\n /** Alias for [NATURAL_PERSON] */\n val PERSON = NATURAL_PERSON\n\n /** A company, institution, or other legal entity */\n val ORGANIZATION = PartyType(\"organization\")\n\n /** A software-backed service participant (endpoint, integration, automated actor) */\n val SERVICE = PartyType(\"service\")\n\n /** A unit within an organization (department, division, sub-tenant scope) */\n val ORGANIZATION_UNIT = PartyType(\"organization_unit\")\n\n /** A collection of parties grouped for addressing or authorization */\n val GROUP = PartyType(\"group\")\n\n /** An autonomous actor acting on behalf of another party */\n val AGENT = PartyType(\"agent\")\n }\n\n override fun toString(): String = value\n}\n\n@JsExportCompat\n@Serializable\nenum class Origin {\n /** Resource was synced from an outside source (IdP, external system, import, auto-discovery) */\n @SerialName(\"external\")\n EXTERNAL,\n\n /** Resource was created and is managed natively within this system */\n @SerialName(\"managed\")\n MANAGED,\n ;\n\n companion object {\n fun fromValue(value: String): Origin =\n entries.firstOrNull { it.name.equals(value, ignoreCase = true) }\n ?: throw IllegalArgumentException(\"Unknown origin: $value\")\n }\n}\n\n@JsExportCompat\n@Serializable\nenum class PartyOrigin {\n /** Party was synced from an outside source (IdP, external system, import, auto-discovery) */\n @SerialName(\"external\")\n EXTERNAL,\n\n /** Party was created and is managed natively within this system */\n @SerialName(\"managed\")\n MANAGED,\n}\n\n@Serializable\ndata class NaturalPerson(\n /** Party ID - serves as the primary key, references party.id */\n @SerialName(\"partyId\")\n val partyId: Uuid,\n\n /** Tenant this natural person belongs to */\n @SerialName(\"tenantId\")\n val tenantId: String,\n\n /** First name (given name) */\n @SerialName(\"firstName\")\n val firstName: String? = null,\n\n /** Middle name(s) */\n @SerialName(\"middleName\")\n val middleName: String? = null,\n\n /** Last name (family name) */\n @SerialName(\"lastName\")\n val lastName: String? = null,\n\n /** Display name (formatted name for UI) */\n @SerialName(\"displayName\")\n val displayName: String? = null,\n\n /** Date of birth */\n @SerialName(\"birthDate\")\n val birthDate: LocalDate? = null\n) {\n /**\n * Returns the full name by combining first, middle, and last names.\n */\n val fullName: String\n get() = listOfNotNull(firstName, middleName, lastName)\n .filter { it.isNotBlank() }\n .joinToString(\" \")\n\n /**\n * Returns the display name, or falls back to the full name if not set.\n */\n val effectiveDisplayName: String\n get() = displayName?.takeIf { it.isNotBlank() } ?: fullName\n}\n\n@JsExportCompat\n@Serializable\n@SerialName(\"organization\")\ndata class Organization\n @JvmOverloads\n constructor(\n @SerialName(\"id\")\n override val partyId: Uuid,\n @SerialName(\"tenantId\")\n override val tenantId: String,\n override val origin: PartyOrigin,\n @SerialName(\"displayName\")\n override val displayName: String,\n override val uri: String? = null,\n override val jurisdiction: String? = null,\n @SerialName(\"ownerId\")\n override val ownerId: Uuid? = null,\n @SerialName(\"organizationUnitId\")\n override val organizationUnitId: Uuid? = null,\n @SerialName(\"specializations\")\n override val specializations: List<PartySpecialization> = emptyList(),\n @SerialName(\"createdAt\")\n override val createdAt: Instant,\n @SerialName(\"createdById\")\n override val createdById: Uuid? = null,\n @SerialName(\"updatedAt\")\n override val updatedAt: Instant,\n @SerialName(\"updatedById\")\n override val updatedById: Uuid? = null,\n @SerialName(\"deletedAt\")\n override val deletedAt: Instant? = null,\n @SerialName(\"deletedById\")\n override val deletedById: Uuid? = null,\n @SerialName(\"electronicAddresses\")\n override val electronicAddresses: List<ElectronicAddress>? = null,\n @SerialName(\"physicalAddresses\")\n override val physicalAddresses: List<PhysicalAddress>? = null,\n /** Registered legal name */\n @SerialName(\"legalName\")\n val legalName: String,\n /** Organization type (e.g. company, foundation, government) */\n @SerialName(\"organizationType\")\n val organizationType: String? = null,\n /** Industry classification */\n @SerialName(\"industry\")\n val industry: String? = null,\n /** Primary contact email */\n @SerialName(\"contactEmail\")\n val contactEmail: String? = null,\n /** Public website URL */\n @SerialName(\"websiteUrl\")\n val websiteUrl: String? = null,\n /** Privacy policy URI */\n @SerialName(\"privacyPolicyUri\")\n val privacyPolicyUri: String? = null,\n /** Terms of service URI */\n @SerialName(\"tosUri\")\n val tosUri: String? = null,\n ) : PartyEntity {\n override val partyType: PartyType get() = PartyType.ORGANIZATION\n }\n\n /** Filter by schema object ID */\r\n @SerialName(\"schemaId\")\n\n@JsExportCompat\n@OptIn(ExperimentalObjCName::class)\n@ObjCName(\"HasId\", exact = true)\ninterface HasId {\n val id: String\n}\n\n @JsExportCompat\n @Serializable\n data class Local(\n override val email: String,\n override val displayName: String,\n ) : OwnerInput()"
},
"RegisterTenantResult": {
"kind": "data class",
"name": "RegisterTenantResult",
"module": "public",
"source": "@JsExportCompat\r\n@Serializable\r\ndata class RegisterTenantResult(\r\n val tenant: Tenant,\r\n /** Primary platform subdomain URL, e.g. `https://acme.saas.com`. */\r\n val primaryDomainUrl: String,\r\n /** Default AS issuer URL, null when `hostedAs = false`. */\r\n val issuerUrl: String? = null,\r\n /**\r\n * Default OID4VCI credential-issuer identifier URL, null when `hostedAs = false`.\r\n * For co-located AS + issuer deployments this is the same origin as [issuerUrl]\r\n * with an `/oid4vci` path suffix.\r\n */\r\n val oid4vciIssuerUrl: String? = null,\r\n /** Local user id assigned to the owner. */\r\n val ownerUserId: String,\r\n /** Durable tenant registration log id for onboarding/status polling. */\r\n val correlationId: String = \"\",\r\n /** Single-use invitation token, only for Local/Hybrid owners. */\r\n val invitationToken: String? = null,\r\n)\n\n@JsExportCompat\n@Serializable\ndata class Tenant\n @JvmOverloads\n constructor(\n @SerialName(\"id\")\n val tenantId: String,\n @SerialName(\"tenantType\")\n val tenantType: TenantType,\n val name: String,\n val description: String? = null,\n /**\n * Globally unique URL-safe slug. Lowercase, hyphen-separated. Used as both the\n * platform subdomain label and the dispatcher's peelable path segment.\n */\n val slug: String,\n /**\n * Parent tenant id. `null` for root tenants. Hierarchy is enforced at insert\n * time (cycle detection walks up `parent_tenant_id`).\n */\n @SerialName(\"parentTenantId\")\n val parentTenantId: String? = null,\n val status: TenantStatus = TenantStatus.ACTIVE,\n /**\n * Generic \"system tenant\" flag. System tenants are excluded from default\n * listings and from all slug-based / parent-based resolution queries. Customer\n * tenants always have `system = false`. Higher layers (e.g. VDX) use this flag\n * to materialise their admin-control tenant; pure-EDK consumers can use it for\n * their own system-tenant patterns. EDK does not define what a system tenant\n * is or what privileges it carries.\n */\n val system: Boolean = false,\n @SerialName(\"ownerPartyId\")\n val ownerPartyId: Uuid? = null,\n @SerialName(\"createdAt\")\n val createdAt: Instant,\n @SerialName(\"createdById\")\n val createdById: Uuid? = null,\n @SerialName(\"updatedAt\")\n val updatedAt: Instant,\n @SerialName(\"updatedById\")\n val updatedById: Uuid? = null,\n @SerialName(\"deletedAt\")\n val deletedAt: Instant? = null,\n @SerialName(\"deletedById\")\n val deletedById: Uuid? = null,\n ) : HasId {\n override val id: String get() = tenantId\n }\n\n @JsExportCompat\n @Serializable\n data class Local(\n override val email: String,\n override val displayName: String,\n ) : OwnerInput()\n\n @JsExportCompat\n @Serializable\n data class Hybrid(\n override val email: String,\n override val displayName: String,\n val federationProvider: FederationProviderInput,\n val externalSubject: String,\n ) : OwnerInput()\n\n@Serializable\n@JvmInline\nvalue class TenantType(\n val value: String,\n) {\n companion object {\n /** Platform/system tenant (for multi-tenant SaaS platforms) */\n val PLATFORM = TenantType(\"platform\")\n\n /** Enterprise tenant (business, company) */\n val ENTERPRISE = TenantType(\"enterprise\")\n\n /** Partner tenant (external partner organization) */\n val PARTNER = TenantType(\"partner\")\n\n /** Sandbox tenant (for testing and development) */\n val SANDBOX = TenantType(\"sandbox\")\n }\n\n override fun toString(): String = value\n}\n\n @Serializable\n @SerialName(\"lowercase\")\n data object Lowercase : ClaimTransformation\n\n@JsExportCompat\n@Serializable\nenum class TenantStatus {\n ACTIVE,\n SUSPENDED,\n PENDING_VERIFICATION,\n}\n\n data class Generic(\n val exception: Throwable? = null,\n override val message: String = \"Consent error\",\n ) : ConsentError\n\n @Serializable\n data class System(\n override val id: String,\n val commandId: String,\n /** Mapping expression (engine-interpreted) producing the command's input from prior outputs. */\n val inputExpression: String,\n val next: String? = null,\n ) : WorkflowTask()\n\n@JsExportCompat\n@OptIn(ExperimentalObjCName::class)\n@ObjCName(\"HasId\", exact = true)\ninterface HasId {\n val id: String\n}\n\n@JsExportCompat\n@Serializable\nsealed class OwnerInput {\n abstract val email: String\n abstract val displayName: String\n\n @JsExportCompat\n @Serializable\n data class Local(\n override val email: String,\n override val displayName: String,\n ) : OwnerInput()\n\n @JsExportCompat\n @Serializable\n data class Federated(\n override val email: String,\n override val displayName: String,\n val federationProvider: FederationProviderInput,\n /**\n * Owner's stable identifier inside the external IDP — typically the `sub`\n * claim, but can be any claim agreed in [FederationProviderInput.claimMapping].\n */\n val externalSubject: String,\n ) : OwnerInput()\n\n @JsExportCompat\n @Serializable\n data class Hybrid(\n override val email: String,\n override val displayName: String,\n val federationProvider: FederationProviderInput,\n val externalSubject: String,\n ) : OwnerInput()\n}\n\n@JsExportCompat\n@Serializable\ndata class FederationProviderInput(\n /** Stable slug for this provider within the AS, e.g. `azure`, `okta`. */\n val providerId: String,\n /** Human-friendly label shown in operator UI / login chooser. */\n val displayName: String,\n val issuer: String,\n val clientId: String,\n /**\n * Inline secret. The registration command writes it to KMS and replaces with a\n * reference; never persists the literal value as a config row.\n */\n val clientSecret: String,\n /**\n * Mapping from local subject claim → external claim name.\n *\n * Example: `{\"subject\": \"oid\"}` makes the AS use the external `oid` claim as the\n * federated user's local `sub`. Default mapping is `{\"subject\": \"sub\"}`.\n */\n val claimMapping: Map<String, String> = mapOf(\"subject\" to \"sub\"),\n /** Scopes requested from the external IDP. */\n val scopes: List<String> = listOf(\"openid\", \"profile\", \"email\"),\n)"
},
"RequestTenantSignupArgs": {
"kind": "data class",
"name": "RequestTenantSignupArgs",
"module": "service",
"source": "@JsExportCompat\n@Serializable\ndata class RequestTenantSignupArgs(\n val email: String,\n val slug: String,\n /** null → SaaS root signup; non-null → subtenant signup under this parent. */\n val parentTenantId: String? = null,\n val displayName: String,\n /** Hashed source IP for SOC + rate-limit. Adapter computes the hash; command never sees raw IP. */\n val sourceIpHash: String? = null,\n /** Bot-defence challenge proof. Verifier may be no-op in dev / pure-EDK. */\n val challengeProof: String? = null,\n)"
},
"RequestTenantSignupResult": {
"kind": "data class",
"name": "RequestTenantSignupResult",
"module": "service",
"source": "@JsExportCompat\n@Serializable\ndata class RequestTenantSignupResult(\n val signupRequestId: String,\n /**\n * Plaintext token. Sent out-of-band via the email channel by the calling\n * adapter; never persisted on the server. Returned ONLY in this in-process\n * call result — production REST adapters must NOT include it in the HTTP\n * response (the response is just the request id and expiry).\n */\n val plainVerificationToken: String,\n val expiresAt: Instant,\n val requiresApproval: Boolean,\n)"
},
"ConfirmTenantSignupArgs": {
"kind": "data class",
"name": "ConfirmTenantSignupArgs",
"module": "service",
"source": "@JsExportCompat\n@Serializable\ndata class ConfirmTenantSignupArgs(\n /** Plaintext token the requester clicked through email. The command hashes and looks up. */\n val plainVerificationToken: String,\n)"
},
"ConfirmTenantSignupResult": {
"kind": "data class",
"name": "ConfirmTenantSignupResult",
"module": "service",
"source": "@JsExportCompat\n@Serializable\ndata class ConfirmTenantSignupResult(\n val signupRequestId: String,\n val status: TenantSignupStatus,\n val registration: RegisterTenantResult? = null,\n)\n\n@JsExportCompat\nenum class TenantSignupStatus {\n PENDING_EMAIL,\n PENDING_APPROVAL,\n CONFIRMED,\n REGISTERED,\n REJECTED,\n EXPIRED,\n FAILED,\n}\n\n@JsExportCompat\r\n@Serializable\r\ndata class RegisterTenantResult(\r\n val tenant: Tenant,\r\n /** Primary platform subdomain URL, e.g. `https://acme.saas.com`. */\r\n val primaryDomainUrl: String,\r\n /** Default AS issuer URL, null when `hostedAs = false`. */\r\n val issuerUrl: String? = null,\r\n /**\r\n * Default OID4VCI credential-issuer identifier URL, null when `hostedAs = false`.\r\n * For co-located AS + issuer deployments this is the same origin as [issuerUrl]\r\n * with an `/oid4vci` path suffix.\r\n */\r\n val oid4vciIssuerUrl: String? = null,\r\n /** Local user id assigned to the owner. */\r\n val ownerUserId: String,\r\n /** Durable tenant registration log id for onboarding/status polling. */\r\n val correlationId: String = \"\",\r\n /** Single-use invitation token, only for Local/Hybrid owners. */\r\n val invitationToken: String? = null,\r\n)\n\n@JsExportCompat\n@Serializable\ndata class Tenant\n @JvmOverloads\n constructor(\n @SerialName(\"id\")\n val tenantId: String,\n @SerialName(\"tenantType\")\n val tenantType: TenantType,\n val name: String,\n val description: String? = null,\n /**\n * Globally unique URL-safe slug. Lowercase, hyphen-separated. Used as both the\n * platform subdomain label and the dispatcher's peelable path segment.\n */\n val slug: String,\n /**\n * Parent tenant id. `null` for root tenants. Hierarchy is enforced at insert\n * time (cycle detection walks up `parent_tenant_id`).\n */\n @SerialName(\"parentTenantId\")\n val parentTenantId: String? = null,\n val status: TenantStatus = TenantStatus.ACTIVE,\n /**\n * Generic \"system tenant\" flag. System tenants are excluded from default\n * listings and from all slug-based / parent-based resolution queries. Customer\n * tenants always have `system = false`. Higher layers (e.g. VDX) use this flag\n * to materialise their admin-control tenant; pure-EDK consumers can use it for\n * their own system-tenant patterns. EDK does not define what a system tenant\n * is or what privileges it carries.\n */\n val system: Boolean = false,\n @SerialName(\"ownerPartyId\")\n val ownerPartyId: Uuid? = null,\n @SerialName(\"createdAt\")\n val createdAt: Instant,\n @SerialName(\"createdById\")\n val createdById: Uuid? = null,\n @SerialName(\"updatedAt\")\n val updatedAt: Instant,\n @SerialName(\"updatedById\")\n val updatedById: Uuid? = null,\n @SerialName(\"deletedAt\")\n val deletedAt: Instant? = null,\n @SerialName(\"deletedById\")\n val deletedById: Uuid? = null,\n ) : HasId {\n override val id: String get() = tenantId\n }\n\n @JsExportCompat\n @Serializable\n data class Local(\n override val email: String,\n override val displayName: String,\n ) : OwnerInput()\n\n @JsExportCompat\n @Serializable\n data class Hybrid(\n override val email: String,\n override val displayName: String,\n val federationProvider: FederationProviderInput,\n val externalSubject: String,\n ) : OwnerInput()"
},
"ResendTenantSignupVerificationArgs": {
"kind": "data class",
"name": "ResendTenantSignupVerificationArgs",
"module": "service",
"source": "@JsExportCompat\n@Serializable\ndata class ResendTenantSignupVerificationArgs(\n val signupRequestId: String,\n /** Hashed source IP for rate-limit + audit. The adapter computes the hash. */\n val sourceIpHash: String? = null,\n)"
},
"ResendTenantSignupVerificationResult": {
"kind": "data class",
"name": "ResendTenantSignupVerificationResult",
"module": "service",
"source": "@JsExportCompat\n@Serializable\ndata class ResendTenantSignupVerificationResult(\n val signupRequestId: String,\n /**\n * Fresh plaintext token. Same security model as\n * [RequestTenantSignupResult.plainVerificationToken] — sent out-of-band\n * via the email channel by the calling adapter; never persisted; never\n * returned in the public HTTP response.\n */\n val plainVerificationToken: String,\n val expiresAt: Instant,\n /**\n * Whether the parent tenant's signup policy requires operator\n * approval after email verification. Carried so the resend\n * notification email matches the actual post-click journey — the\n * request-time email already carries this flag and the resend must\n * not contradict it.\n */\n val requiresApproval: Boolean,\n)\n\n@JsExportCompat\n@Serializable\ndata class RequestTenantSignupResult(\n val signupRequestId: String,\n /**\n * Plaintext token. Sent out-of-band via the email channel by the calling\n * adapter; never persisted on the server. Returned ONLY in this in-process\n * call result — production REST adapters must NOT include it in the HTTP\n * response (the response is just the request id and expiry).\n */\n val plainVerificationToken: String,\n val expiresAt: Instant,\n val requiresApproval: Boolean,\n)"
},
"ReconcileExpiredTenantSignupsArgs": {
"kind": "data class",
"name": "ReconcileExpiredTenantSignupsArgs",
"module": "service",
"source": "@JsExportCompat\n@Serializable\ndata class ReconcileExpiredTenantSignupsArgs(val now: Instant)"
},
"ReconcileExpiredTenantSignupsResult": {
"kind": "data class",
"name": "ReconcileExpiredTenantSignupsResult",
"module": "service",
"source": "@JsExportCompat\n@Serializable\ndata class ReconcileExpiredTenantSignupsResult(\n val expiredCount: Int,\n)"
},
"ApplicationTenantBootstrapRequest": {
"kind": "data class",
"name": "ApplicationTenantBootstrapRequest",
"module": "public",
"source": "@Serializable\ndata class ApplicationTenantBootstrapRequest(\n val operatorEmail: String? = null,\n val operatorDisplayName: String? = null,\n)"
},
"ApplicationTenantStatusSnapshot": {
"kind": "data class",
"name": "ApplicationTenantStatusSnapshot",
"module": "public",
"source": "@Serializable\ndata class ApplicationTenantStatusSnapshot(\n val tenantId: String,\n val status: ApplicationTenantStatus,\n val hostedAsAvailable: Boolean,\n val hostedAsIssuerUrl: String? = null,\n val canRegisterFirstRealTenant: Boolean,\n)\n\n@Serializable\nenum class ApplicationTenantStatus {\n @SerialName(\"ACTIVE\")\n ACTIVE,\n\n @SerialName(\"SUSPENDED\")\n SUSPENDED,\n\n @SerialName(\"PENDING_VERIFICATION\")\n PENDING_VERIFICATION,\n}"
},
"ApproveTenantSignupArgs": {
"kind": "data class",
"name": "ApproveTenantSignupArgs",
"module": "service",
"source": "@JsExportCompat\n@Serializable\ndata class ApproveTenantSignupArgs(\n val signupRequestId: String,\n val notes: String? = null,\n)"
},
"ApproveTenantSignupResult": {
"kind": "data class",
"name": "ApproveTenantSignupResult",
"module": "service",
"source": "@JsExportCompat\n@Serializable\ndata class ApproveTenantSignupResult(\n val signupRequestId: String,\n val status: TenantSignupStatus,\n val registration: RegisterTenantResult? = null,\n)\n\n@JsExportCompat\nenum class TenantSignupStatus {\n PENDING_EMAIL,\n PENDING_APPROVAL,\n CONFIRMED,\n REGISTERED,\n REJECTED,\n EXPIRED,\n FAILED,\n}\n\n@JsExportCompat\r\n@Serializable\r\ndata class RegisterTenantResult(\r\n val tenant: Tenant,\r\n /** Primary platform subdomain URL, e.g. `https://acme.saas.com`. */\r\n val primaryDomainUrl: String,\r\n /** Default AS issuer URL, null when `hostedAs = false`. */\r\n val issuerUrl: String? = null,\r\n /**\r\n * Default OID4VCI credential-issuer identifier URL, null when `hostedAs = false`.\r\n * For co-located AS + issuer deployments this is the same origin as [issuerUrl]\r\n * with an `/oid4vci` path suffix.\r\n */\r\n val oid4vciIssuerUrl: String? = null,\r\n /** Local user id assigned to the owner. */\r\n val ownerUserId: String,\r\n /** Durable tenant registration log id for onboarding/status polling. */\r\n val correlationId: String = \"\",\r\n /** Single-use invitation token, only for Local/Hybrid owners. */\r\n val invitationToken: String? = null,\r\n)\n\n@JsExportCompat\n@Serializable\ndata class Tenant\n @JvmOverloads\n constructor(\n @SerialName(\"id\")\n val tenantId: String,\n @SerialName(\"tenantType\")\n val tenantType: TenantType,\n val name: String,\n val description: String? = null,\n /**\n * Globally unique URL-safe slug. Lowercase, hyphen-separated. Used as both the\n * platform subdomain label and the dispatcher's peelable path segment.\n */\n val slug: String,\n /**\n * Parent tenant id. `null` for root tenants. Hierarchy is enforced at insert\n * time (cycle detection walks up `parent_tenant_id`).\n */\n @SerialName(\"parentTenantId\")\n val parentTenantId: String? = null,\n val status: TenantStatus = TenantStatus.ACTIVE,\n /**\n * Generic \"system tenant\" flag. System tenants are excluded from default\n * listings and from all slug-based / parent-based resolution queries. Customer\n * tenants always have `system = false`. Higher layers (e.g. VDX) use this flag\n * to materialise their admin-control tenant; pure-EDK consumers can use it for\n * their own system-tenant patterns. EDK does not define what a system tenant\n * is or what privileges it carries.\n */\n val system: Boolean = false,\n @SerialName(\"ownerPartyId\")\n val ownerPartyId: Uuid? = null,\n @SerialName(\"createdAt\")\n val createdAt: Instant,\n @SerialName(\"createdById\")\n val createdById: Uuid? = null,\n @SerialName(\"updatedAt\")\n val updatedAt: Instant,\n @SerialName(\"updatedById\")\n val updatedById: Uuid? = null,\n @SerialName(\"deletedAt\")\n val deletedAt: Instant? = null,\n @SerialName(\"deletedById\")\n val deletedById: Uuid? = null,\n ) : HasId {\n override val id: String get() = tenantId\n }\n\n @JsExportCompat\n @Serializable\n data class Local(\n override val email: String,\n override val displayName: String,\n ) : OwnerInput()\n\n @JsExportCompat\n @Serializable\n data class Hybrid(\n override val email: String,\n override val displayName: String,\n val federationProvider: FederationProviderInput,\n val externalSubject: String,\n ) : OwnerInput()"
},
"RejectTenantSignupArgs": {
"kind": "data class",
"name": "RejectTenantSignupArgs",
"module": "service",
"source": "@JsExportCompat\n@Serializable\ndata class RejectTenantSignupArgs(\n val signupRequestId: String,\n val reason: String? = null,\n)"
},
"RejectTenantSignupResult": {
"kind": "data class",
"name": "RejectTenantSignupResult",
"module": "service",
"source": "@JsExportCompat\n@Serializable\ndata class RejectTenantSignupResult(val rejected: Boolean)"
},
"LicenseTokenArgs": {
"kind": "data class",
"name": "LicenseTokenArgs",
"module": "public",
"source": "@JsExportCompat\n@Serializable\ndata class LicenseTokenArgs(val licenseToken: String)"
},
"LicenseSnapshotProjection": {
"kind": "data class",
"name": "LicenseSnapshotProjection",
"module": "public",
"source": "@Serializable\ndata class LicenseSnapshotProjection(\n val status: LicenseStatus,\n val features: LicenseFeatureFlags,\n val limits: LicenseLimitProjection,\n)\n\n@Serializable\nenum class LicenseStatus {\n ACTIVE,\n EXPIRED,\n INVALID,\n MISSING,\n}\n\n@Serializable\ndata class LicenseFeatureFlags(\n val selfSignup: Boolean,\n val subtenants: Boolean,\n)\n\n@Serializable\ndata class LicenseLimitProjection(\n val maxRootTenants: Long,\n val maxTotalTenants: Long,\n val maxHierarchyDepth: Int,\n val subtenantsAllowed: Boolean,\n)"
},
"SecretBackendSelection": {
"kind": "data class",
"name": "SecretBackendSelection",
"module": "public",
"source": "@Serializable\ndata class SecretBackendSelection(\n val backend: SecretBackendType,\n val configRef: String? = null,\n)\n\n@Serializable\nenum class SecretBackendType {\n @SerialName(\"azure-key-vault\")\n AZURE_KEY_VAULT,\n\n @SerialName(\"hashicorp-vault\")\n HASHICORP_VAULT,\n\n @SerialName(\"kubernetes-secret-mount\")\n KUBERNETES_SECRET_MOUNT,\n\n @SerialName(\"config-system-dev-only\")\n CONFIG_SYSTEM_DEV_ONLY,\n}"
},
"SecretBackendStatusSnapshot": {
"kind": "data class",
"name": "SecretBackendStatusSnapshot",
"module": "public",
"source": "@Serializable\ndata class SecretBackendStatusSnapshot(\n val configured: Boolean,\n val selection: SecretBackendSelection? = null,\n)\n\n@Serializable\ndata class SecretBackendSelection(\n val backend: SecretBackendType,\n val configRef: String? = null,\n)\n\n@Serializable\nenum class SecretBackendType {\n @SerialName(\"azure-key-vault\")\n AZURE_KEY_VAULT,\n\n @SerialName(\"hashicorp-vault\")\n HASHICORP_VAULT,\n\n @SerialName(\"kubernetes-secret-mount\")\n KUBERNETES_SECRET_MOUNT,\n\n @SerialName(\"config-system-dev-only\")\n CONFIG_SYSTEM_DEV_ONLY,\n}"
},
"OnboardingPolicyUpdate": {
"kind": "data class",
"name": "OnboardingPolicyUpdate",
"module": "public",
"source": "@Serializable\ndata class OnboardingPolicyUpdate(\n val rootTenantCreationEnabled: Boolean? = null,\n val adminInviteEnabled: Boolean? = null,\n val selfSignupEnabled: Boolean? = null,\n val subtenantSignupEnabled: Boolean? = null,\n val requireApprovalForSelfSignup: Boolean? = null,\n)"
},
"OnboardingPolicySnapshot": {
"kind": "data class",
"name": "OnboardingPolicySnapshot",
"module": "public",
"source": "@Serializable\ndata class OnboardingPolicySnapshot(\n val rootTenantCreationEnabled: Boolean,\n val adminInviteEnabled: Boolean,\n val selfSignupEnabled: Boolean,\n val subtenantSignupEnabled: Boolean,\n val requireApprovalForSelfSignup: Boolean,\n val updatedAt: Instant? = null,\n)"
},
"RedeemOwnerInvitationArgs": {
"kind": "data class",
"name": "RedeemOwnerInvitationArgs",
"module": "tenant-owner-bootstrap",
"source": "@JsExportCompat\n@Serializable\ndata class RedeemOwnerInvitationArgs(\n val token: String,\n val credential: String,\n)"
},
"RedeemOwnerInvitationResult": {
"kind": "data class",
"name": "RedeemOwnerInvitationResult",
"module": "tenant-owner-bootstrap",
"source": "@JsExportCompat\n@Serializable\ndata class RedeemOwnerInvitationResult(\n val ownerUserId: String,\n val tenantId: String,\n)"
},
"UpsertTenantPublicEndpointArgs": {
"kind": "data class",
"name": "UpsertTenantPublicEndpointArgs",
"module": "service",
"source": "@JsExportCompat\n@Serializable\ndata class UpsertTenantPublicEndpointArgs(\n val tenantId: String,\n val serviceType: TenantPublicEndpointServiceType,\n val host: String? = null,\n val pathPrefix: String? = null,\n val wellKnownPath: String? = null,\n val enabled: Boolean = true,\n val primaryEndpoint: Boolean = false,\n)\n\n@JsExportCompat\n@Serializable\nenum class TenantPublicEndpointServiceType {\n OID4VCI_ISSUER,\n OID4VP_VERIFIER,\n OAUTH2_AUTHORIZATION_SERVER,\n}"
},
"TenantPublicEndpoint": {
"kind": "data class",
"name": "TenantPublicEndpoint",
"module": "public",
"source": "@JsExportCompat\n@Serializable\ndata class TenantPublicEndpoint\n @JvmOverloads\n constructor(\n @SerialName(\"id\")\n val endpointId: String,\n val tenantId: String,\n val serviceType: TenantPublicEndpointServiceType,\n /**\n * Identifies which software instance (the VDX `partyId` / the IDK instance id)\n * this public endpoint belongs to. Null is the single default/legacy binding\n * for the (tenant, service type); non-null values let a tenant own multiple\n * concurrent public endpoints for the same service type, one per instance.\n */\n val instanceId: String? = null,\n /** Lowercased host without scheme or port. Null means use the runtime host/default base. */\n val host: String? = null,\n /** Protocol route prefix, for example `/acme/oid4vci`. */\n val pathPrefix: String? = null,\n /** Well-known route, for example `/.well-known/openid-credential-issuer/acme`. */\n val wellKnownPath: String? = null,\n val enabled: Boolean = true,\n val primaryEndpoint: Boolean = false,\n @SerialName(\"createdAt\")\n val createdAt: Instant,\n @SerialName(\"createdById\")\n val createdById: Uuid? = null,\n @SerialName(\"updatedAt\")\n val updatedAt: Instant,\n @SerialName(\"updatedById\")\n val updatedById: Uuid? = null,\n @SerialName(\"deletedAt\")\n val deletedAt: Instant? = null,\n @SerialName(\"deletedById\")\n val deletedById: Uuid? = null,\n ) : HasId {\n override val id: String get() = endpointId\n }\n\n@JsExportCompat\n@Serializable\nenum class TenantPublicEndpointServiceType {\n OID4VCI_ISSUER,\n OID4VP_VERIFIER,\n OAUTH2_AUTHORIZATION_SERVER,\n}\n\n @OptIn(ExperimentalObjCName::class)\n @ObjCName(\"cddlNull\")\n @Serializable(with = CDDLSerializer::class)\n object Null : CDDL(\"null\", MajorType.SPECIAL, 22, arrayOf(nil)) {\n fun newNull() = CborSimple.NULL\n\n fun fromJson(value: JsonElement) = CborSimple.NULL\n }\n\n@JsExportCompat\n@OptIn(ExperimentalObjCName::class)\n@ObjCName(\"HasId\", exact = true)\ninterface HasId {\n val id: String\n}\n\ninternal object CDDLSerializer : KSerializer<CDDL> {\n override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor(\"CDDL\", PrimitiveKind.STRING)\n\n override fun serialize(\n encoder: Encoder,\n value: CDDL,\n ) {\n encoder.encodeString(value.format)\n }\n\n override fun deserialize(decoder: Decoder): CDDL = CDDL.util.fromFormat(decoder.decodeString())\n}\n\n@Suppress(\"UNCHECKED_CAST\")\n@JsExportCompat\n@Serializable(with = CDDLSerializer::class)\nsealed class CDDL(\n override val format: String,\n override val majorType: MajorType? = null,\n override val info: Int? = null,\n override val aliasFor: Array<CDDLType> = arrayOf(),\n) : CDDLType {\n override fun newCborItemFromJson(\n element: JsonElement?,\n cddl: CDDLType?,\n ): CborItem<out Any?> {\n val jsonPrimitive: JsonPrimitive? = (element as? JsonPrimitive)?.jsonPrimitive\n val jsonArray: JsonArray? = (element as? JsonArray)?.jsonArray\n val jsonObject: JsonObject? = (element as? JsonObject)?.jsonObject\n val isNull: Boolean = element == JsonNull || element === null\n val isString: Boolean = jsonPrimitive?.isString == true\n\n if (isNull) {\n return CborNull()\n } else if (isString && jsonPrimitive !== null) {\n return CborString(jsonPrimitive.content)\n } else if (jsonArray !== null) {\n return list.fromJson(jsonArray)\n } else if (jsonObject !== null) {\n if (CborItemJson.isCborItemValueJson(jsonObject)) {\n val key =\n if (CborItemJson.isCborItemJson(jsonObject)) {\n (jsonObject[\"key\"] as? JsonPrimitive)?.content\n } else {\n null\n }\n val cddlStr = (jsonObject[\"cddl\"] as? JsonPrimitive)?.content\n\n if (cddlStr === null) {\n // cddl key found, but wasn't a primitive, returning a null value\n return CborNull()\n }\n val cddlObject = util.fromFormat(cddlStr)\n val cborObject = newCborItemFromJson(jsonObject[jsonObject.keys.find { it != CDDL_LITERAL && it != KEY_LITERAL }], cddlObject)\n if (key === null) {\n return cborObject\n }\n return CborMap(mutableMapOf(Pair(CborString(key), cborObject)))\n }\n // number label keys?\n return CborMap(mutableMapOf(* jsonObject.map { Pair(CborString(it.key), newCborItemFromJson(it.value)) }.toTypedArray()))\n } else if (jsonPrimitive !== null) {\n if (cddl == null) {\n return newCborItem(jsonPrimitive)\n }\n return when (cddl) {\n // Needed because we cannot have inheritance with Kotlin to JS, unfortunately. The fromJson would cause clashes if we put it in the interface\n tstr -> tstr.fromJson(jsonPrimitive)\n\n Null -> CborNull()\n\n False -> CborSimple.FALSE\n\n True -> CborSimple.TRUE\n\n bool -> bool.fromJson(jsonPrimitive)\n\n bstr -> bstr.fromJson(jsonPrimitive)\n\n bytes -> bytes.fromJson(jsonPrimitive)\n\n float -> float.fromJson(jsonPrimitive)\n\n float16 -> float16.fromJson(jsonPrimitive)\n\n float32 -> float32.fromJson(jsonPrimitive)\n\n float64 -> float64.fromJson(jsonPrimitive)\n\n full_date -> full_date.fromJson(jsonPrimitive)\n\n int -> int.fromJson(jsonPrimitive)\n\n nil -> nil.newNil()\n\n nint -> nint.fromJson(jsonPrimitive)\n\n tdate -> tdate.fromJson(jsonPrimitive)\n\n text -> text.fromJson(jsonPrimitive)\n\n time -> time.fromJson(jsonPrimitive)\n\n uint -> uint.fromJson(jsonPrimitive)\n\n undefined -> undefined.newUndefined()\n\n else -> cddl.newCborItem(jsonPrimitive)\n }\n }\n return newCborItem(element)\n }\n\n override fun <T : Any> newCborItem(origValue: T?): CborItem<out Any?> {\n // We are not using inheritance for the methods as that would impact JS export.\n // Since this is a sealed class anyway that is not too bad\n var value = origValue\n val jsonElement: JsonElement? =\n when (value) {\n is JsonPrimitive -> value\n is JsonArray -> value\n is JsonObject -> value\n is JsonNull -> value\n else -> null\n }\n if (value == null) {\n return nil.newNil()\n } else if (value == Unit) {\n return undefined.newUndefined()\n }\n return when (this) {\n tstr -> {\n if (jsonElement === null) {\n tstr.newString(value.toString())\n } else {\n tstr.fromJson(jsonElement.jsonPrimitive)\n }\n }\n\n False -> {\n False.newFalse()\n }\n\n Null -> {\n Null.newNull()\n }\n\n True -> {\n True.newTrue()\n }\n\n any -> {\n return when (value) {\n is JsonPrimitive -> {\n val prim = value\n when {\n prim.isString -> tstr.fromJson(prim)\n prim.content == \"true\" || prim.content == \"false\" -> bool.fromJson(prim)\n prim.content.contains('.') || prim.content.contains('e') || prim.content.contains('E') -> float64.fromJson(prim)\n else -> int.fromJson(prim) // Assume integer if not string, boolean, or float\n }\n }\n\n is cddl_tstr -> {\n if (jsonElement === null) {\n tstr.newString(value)\n } else {\n tstr.fromJson(jsonElement.jsonPrimitive)\n }\n }\n\n is cddl_bstr -> {\n if (jsonElement === null) {\n bstr.newByteString(value)\n } else {\n bstr.fromJson(jsonElement.jsonPrimitive)\n }\n }\n\n is cddl_tdate -> {\n if (jsonElement === null) {\n tdate.newTDate(value)\n } else {\n tdate.fromJson(jsonElement.jsonPrimitive)\n }\n }\n\n is cddl_full_date -> {\n if (jsonElement === null) {\n full_date.newFullDate(value)\n } else {\n full_date.fromJson(jsonElement.jsonPrimitive)\n }\n }\n\n is cddl_bool -> {\n if (jsonElement === null) {\n bool.newBool(value)\n } else {\n bool.fromJson(jsonElement.jsonPrimitive)\n }\n }\n\n // Use consolidated Number handling for JS/WasmJs compatibility\n // (on JS, all numeric `is` checks match any Number, making individual checks unreliable)\n is Number -> {\n if (jsonElement === null) {\n value.toCborItem()\n } else {\n val d = value.toDouble()\n if (d != kotlin.math.floor(d) || d.isInfinite() || d.isNaN()) {\n float64.fromJson(jsonElement.jsonPrimitive)\n } else {\n int.fromJson(jsonElement.jsonPrimitive)\n }\n }\n }\n\n is cddl_list<*> -> {\n if (jsonElement === null) {\n list.newList(\n value\n .map {\n if (it is CborItem<*>) {\n it\n } else {\n any.newCborItem(\n it,\n )\n }\n }.toMutableList(),\n )\n } else {\n list.fromJson(jsonElement.jsonArray)\n }\n }\n\n is cddl_map<*, *> -> {\n if (jsonElement === null) {\n map.newMap(\n mutableMapOf(\n * value\n .map {\n Pair(\n if (it.key is CborItem<*>) {\n it.key as CborItem<*>\n } else {\n any.newCborItem(it.key)\n },\n if (it.value is CborItem<*>) {\n it.value as CborItem<*>\n } else {\n any.newCborItem(it.value)\n },\n )\n }.toTypedArray(),\n ),\n )\n } else {\n map.fromJson(jsonElement.jsonObject)\n }\n }\n\n else -> {\n throw IllegalArgumentException(\"newCborItem for $value Not implemented yet\")\n }\n }\n }\n\n bool -> {\n if (jsonElement === null) {\n bool.newBool(value == true)\n } else {\n bool.fromJson(jsonElement.jsonPrimitive)\n }\n }\n\n bstr -> {\n if (jsonElement === null) {\n bstr.newByteString(value as ByteArray)\n } else {\n bstr.fromJson(jsonElement.jsonPrimitive)\n }\n }\n\n bstr_indef_length -> {\n if (jsonElement === null) {\n bstr_indef_length.newByteString(value as List<cddl_bstr>)\n } else {\n TODO(\"indef cddl from json not implemented yet\")\n }\n }\n\n bytes -> {\n if (jsonElement === null) {\n bytes.newBytes(value as ByteArray)\n } else {\n bytes.fromJson(jsonElement.jsonPrimitive)\n }\n }\n\n float -> {\n if (jsonElement === null) {\n float.newFloat(value as Float)\n } else {\n float.fromJson(jsonElement.jsonPrimitive)\n }\n }\n\n float16 -> {\n if (jsonElement === null) {\n float16.newFloat16(value as Float)\n } else {\n float16.fromJson(jsonElement.jsonPrimitive)\n }\n }\n\n float32 -> {\n if (jsonElement === null) {\n float32.newFloat32(value as Float)\n } else {\n float32.fromJson(jsonElement.jsonPrimitive)\n }\n }\n\n float64 -> {\n if (jsonElement === null) {\n float64.newFloat64(value as Double)\n } else {\n float64.fromJson(jsonElement.jsonPrimitive)\n }\n }\n\n full_date -> {\n if (jsonElement === null) {\n full_date.newFullDate(value as cddl_full_date)\n } else {\n full_date.fromJson(jsonElement.jsonPrimitive)\n }\n }\n\n int -> {\n if (jsonElement === null) {\n int.newInt(value as Int)\n } else {\n int.fromJson(jsonElement.jsonPrimitive)\n }\n }\n\n list -> {\n if (jsonElement === null) {\n if (value is CborArray<*>) {\n value\n } else {\n list.newList(\n (value as List<*>)\n .map {\n if (it is CborItem<*>) {\n it\n } else {\n any.newCborItem(\n it,\n )\n }\n }.toMutableList(),\n )\n }\n } else {\n list.fromJson(jsonElement.jsonArray)\n }\n }\n\n map -> {\n if (jsonElement === null) {\n if (value is CborMap<*, *>) {\n value\n } else {\n map.newMap(\n mutableMapOf(\n * (value as Map<*, *>)\n .map {\n Pair(\n if (it.key is CborItem<*>) {\n it.key as CborItem<*>\n } else {\n any.newCborItem(it.key)\n },\n if (it.value is CborItem<*>) {\n it.value as CborItem<*>\n } else {\n any.newCborItem(it.value)\n },\n )\n }.toTypedArray(),\n ),\n ) // fixme. Needs inspection of keys and values and map type\n }\n } else {\n return map.fromJson(jsonElement.jsonObject)\n }\n }\n\n nil -> {\n nil.newNil()\n }\n\n nint -> {\n if (jsonElement === null) {\n nint.newNInt(\n if (value is Number) {\n value.toLong()\n } else {\n value as Long\n }\n )\n } else {\n nint.fromJson(\n jsonElement.jsonPrimitive,\n )\n }\n }\n\n tdate -> {\n if (jsonElement === null) {\n tdate.newTDate(value as cddl_tdate)\n } else {\n tdate.fromJson(jsonElement.jsonPrimitive)\n }\n }\n\n text -> {\n if (jsonElement === null) {\n text.newText(value as cddl_text)\n } else {\n text.fromJson(jsonElement.jsonPrimitive)\n }\n }\n\n time -> {\n if (jsonElement === null) {\n time.newTime(value as cddl_time)\n } else {\n time.fromJson(jsonElement.jsonPrimitive)\n }\n }\n\n tstr_indef_length -> {\n if (jsonElement !== null) {\n tstr_indef_length.newStringIndefLength(value as List<cddl_tstr>)\n } else {\n TODO(\"tstr indef length from json to cbor not implemented\")\n }\n }\n\n uint -> {\n if (jsonElement === null) {\n uint.newUint(\n if (value is Long) {\n value\n } else if (value is Number) {\n value.toLong()\n } else {\n value as Long\n },\n )\n } else {\n uint.fromJson(\n jsonElement.jsonPrimitive,\n )\n }\n }\n\n undefined -> {\n undefined.newUndefined()\n }\n }\n }\n\n @OptIn(ExperimentalObjCName::class)\n @ObjCName(\"cddlTstr\")\n object tstr : CDDL(\"tstr\", MajorType.UNICODE_STRING) {\n fun newString(value: cddl_tstr) = CborString(value)\n\n fun fromJson(value: JsonPrimitive) = CborString(value.content)\n }\n\n @Serializable(with = CDDLSerializer::class)\n @OptIn(ExperimentalObjCName::class)\n @ObjCName(\"cddlUint\")\n object uint : CDDL(\"uint\", MajorType.UNSIGNED_INTEGER) {\n fun newUint(value: cddl_uint) = CborUInt(value)\n\n fun fromJson(value: JsonPrimitive) = CborUInt(value.content.toLong())\n }\n\n @Serializable(with = CDDLSerializer::class)\n @OptIn(ExperimentalObjCName::class)\n @ObjCName(\"cddlNint\")\n object nint : CDDL(\"nint\", MajorType.NEGATIVE_INTEGER) {\n fun newNInt(value: cddl_nint) = CborNInt(value)\n\n fun fromJson(value: JsonPrimitive) = CborNInt(value.content.toLong())\n }\n\n @Serializable(with = CDDLSerializer::class)\n @OptIn(ExperimentalObjCName::class)\n @ObjCName(\"cddlInt\")\n object int :\n CDDL(\"int\", null, null, aliasFor = arrayOf(uint, nint)) {\n fun newInt(value: Int) =\n if (value < 0) {\n CborNInt(value.toLong())\n } else {\n CborUInt(value.toLong())\n }\n\n fun newLong(value: Long) =\n if (value < 0) {\n CborNInt(value)\n } else {\n CborUInt(value)\n }\n\n fun fromJson(value: JsonPrimitive) =\n if (value.long < 0) {\n CborNInt(value.long)\n } else {\n CborUInt(value.long)\n }\n }\n\n @Serializable(with = CDDLSerializer::class)\n @OptIn(ExperimentalObjCName::class)\n @ObjCName(\"cddlBstr\")\n object bstr : CDDL(\"bstr\", MajorType.BYTE_STRING) {\n fun newByteString(value: cddl_bstr) = CborByteString(value)\n\n fun fromJson(\n value: JsonPrimitive,\n encoding: Encoding = Encoding.BASE64URL,\n ) = CborByteString(value.content.decodeFrom(encoding))\n }\n\n @Serializable(with = CDDLSerializer::class)\n @OptIn(ExperimentalObjCName::class)\n @ObjCName(\"cddlBstrIndefLength\")\n object bstr_indef_length : CDDL(\"bstr\", MajorType.BYTE_STRING) {\n fun newByteString(value: List<cddl_bstr>) = CborByteStringIndefLength(value)\n\n fun fromJson(\n value: JsonArray,\n encoding: Encoding = Encoding.BASE64URL,\n ): CborByteStringIndefLength = TODO(\"indef length from json to cbor not implemented yet\")\n }\n\n @Serializable(with = CDDLSerializer::class)\n @OptIn(ExperimentalObjCName::class)\n @ObjCName(\"cddlBytes\")\n object bytes : CDDL(\"bytes\", MajorType.BYTE_STRING, aliasFor = arrayOf(bstr)) {\n fun newBytes(value: cddl_bstr) = CborByteString(value)\n\n fun fromJson(\n value: JsonPrimitive,\n encoding: Encoding = Encoding.BASE64URL,\n ) = CborByteString(value.content.decodeFrom(encoding))\n }\n\n @Serializable(with = CDDLSerializer::class)\n @OptIn(ExperimentalObjCName::class)\n @ObjCName(\"cddlTstrIndefLength\")\n object tstr_indef_length : CDDL(\"tstr\", MajorType.UNICODE_STRING) {\n fun newStringIndefLength(value: List<cddl_tstr>) = CborStringIndefLength(value)\n\n fun fromJson(\n value: JsonArray,\n encoding: Encoding = Encoding.BASE64URL,\n ): CborStringIndefLength = TODO(\"indef length from json to cbor not implemented yet\")\n }\n\n @Serializable(with = CDDLSerializer::class)\n @OptIn(ExperimentalObjCName::class)\n @ObjCName(\"cddlText\")\n object text : CDDL(\"text\", MajorType.UNICODE_STRING, aliasFor = arrayOf(tstr)) {\n fun newText(value: cddl_text) = CborString(value)\n\n fun fromJson(value: JsonPrimitive) = CborString(value.content)\n }\n\n @Serializable(with = CDDLSerializer::class)\n @OptIn(ExperimentalObjCName::class)\n @ObjCName(\"cddlTdate\")\n object tdate : CDDL(\n \"tdate\",\n MajorType.TAG,\n DATE_TIME_STRING,\n ) { // RFC 7049, section 2.4.1, a tdate data item shall contain a date-time string as specified in RFC 3339\n fun newTDate(value: cddl_tdate) = CborTDate(value)\n\n fun fromJson(value: JsonPrimitive) = CborTDate(value.content)\n }\n\n @Serializable(with = CDDLSerializer::class)\n @OptIn(ExperimentalObjCName::class)\n @ObjCName(\"cddlFullDate\")\n object full_date : CDDL(\n \"full-date\",\n MajorType.TAG,\n CborTagged.FULL_DATE_STRING,\n ) { // #6.1004(tstr) In accordance with RFC 8943, a full-date data item shall contain a full-datestring as specified in RFC 3339.\n fun newFullDate(value: cddl_full_date) = CborFullDate(value)\n\n fun fromJson(value: JsonPrimitive) = CborFullDate(value.content)\n }\n\n @Serializable(with = CDDLSerializer::class)\n @OptIn(ExperimentalObjCName::class)\n @ObjCName(\"cddlTime\")\n object time : CDDL(\n \"time\",\n MajorType.TAG,\n CborTagged.DATE_TIME_NUMBER,\n ) { // RFC 7049, section 2.4.1, a tdate data item shall contain a date-time number as specified in RFC 3339\n fun newTime(value: cddl_time) = CborTime(value)\n\n fun fromJson(value: JsonPrimitive) = CborTime(value.content.toLong())\n }\n\n @Serializable(with = CDDLSerializer::class)\n @OptIn(ExperimentalObjCName::class)\n @ObjCName(\"cddlFloat16\")\n object float16 : CDDL(\"float16\", MajorType.SPECIAL, 25) {\n fun newFloat16(value: cddl_float16) = CborFloat16(value)\n\n fun fromJson(value: JsonPrimitive) = CborFloat16(value.float)\n }\n\n @Serializable(with = CDDLSerializer::class)\n @OptIn(ExperimentalObjCName::class)\n @ObjCName(\"cddlFloat32\")\n object float32 : CDDL(\"float32\", MajorType.SPECIAL, 26) {\n fun newFloat32(value: cddl_float32) = CborFloat32(value)\n\n fun fromJson(value: JsonPrimitive) = CborFloat32(value.float)\n }\n\n @Serializable(with = CDDLSerializer::class)\n @OptIn(ExperimentalObjCName::class)\n @ObjCName(\"cddlFloat64\")\n object float64 : CDDL(\"float64\", MajorType.SPECIAL, 27) {\n fun newFloat64(value: cddl_float64) = CborDouble(value)\n\n fun fromJson(value: JsonPrimitive) = CborDouble(value.double)\n }\n\n @Serializable(with = CDDLSerializer::class)\n @OptIn(ExperimentalObjCName::class)\n @ObjCName(\"cddlFloat\")\n object float : CDDL(\"float\", MajorType.SPECIAL, aliasFor = arrayOf(float16, float32, float64)) {\n fun newFloat(value: cddl_float) = CborFloat32(value)\n\n fun fromJson(value: JsonPrimitive) = CborFloat32(value.float)\n }\n\n @OptIn(ExperimentalObjCName::class)\n @ObjCName(\"cddlFalse\")\n @Serializable(with = CDDLSerializer::class)\n object False : CDDL(\"false\", MajorType.SPECIAL, 20) {\n fun newFalse() = CborSimple.FALSE\n\n fun fromJson(value: JsonPrimitive) = CborSimple.FALSE\n }\n\n @OptIn(ExperimentalObjCName::class)\n @ObjCName(\"cddlTrue\")\n @Serializable(with = CDDLSerializer::class)\n object True : CDDL(\"true\", MajorType.SPECIAL, 21) {\n fun newTrue() = CborSimple.TRUE\n\n fun fromJson(value: JsonPrimitive) = CborSimple.TRUE\n }\n\n @Serializable(with = CDDLSerializer::class)\n @OptIn(ExperimentalObjCName::class)\n @ObjCName(\"cddlBool\")\n object bool :\n CDDL(\"bool\", MajorType.SPECIAL, aliasFor = arrayOf(False, True)) {\n fun newBool(value: cddl_bool) =\n if (value) {\n CborSimple.TRUE\n } else {\n CborSimple.FALSE\n }\n\n fun fromJson(value: JsonPrimitive) =\n if (value.boolean) {\n CborSimple.TRUE\n } else {\n CborSimple.FALSE\n }\n }\n\n @Serializable(with = CDDLSerializer::class)\n @OptIn(ExperimentalObjCName::class)\n @ObjCName(\"cddlNil\")\n object nil : CDDL(\"nil\", MajorType.SPECIAL, 22) {\n fun newNil() = CborSimple.NULL\n\n fun fromJson(value: JsonElement) = CborSimple.NULL\n }\n\n @OptIn(ExperimentalObjCName::class)\n @ObjCName(\"cddlNull\")\n @Serializable(with = CDDLSerializer::class)\n object Null : CDDL(\"null\", MajorType.SPECIAL, 22, arrayOf(nil)) {\n fun newNull() = CborSimple.NULL\n\n fun fromJson(value: JsonElement) = CborSimple.NULL\n }\n\n @Serializable(with = CDDLSerializer::class)\n @OptIn(ExperimentalObjCName::class)\n @ObjCName(\"cddlUndefined\")\n object undefined :\n CDDL(\"undefined\", MajorType.SPECIAL, 23) {\n fun newUndefined() = CborSimple.UNDEFINED\n\n fun fromJson(value: JsonElement) = CborSimple.UNDEFINED\n }\n\n @Serializable(with = CDDLSerializer::class)\n @OptIn(ExperimentalObjCName::class)\n @ObjCName(\"cddlMap\")\n object map :\n CDDL(\n \"map\",\n MajorType.MAP,\n ) {\n fun newMap(value: MutableMap<CborItem<*>, CborItem<*>>): CborItem<MutableMap<CborItem<*>, CborItem<*>>> = CborMap(value)\n\n /**\n * Please note that this method is not able to map onto the exact Cbor items as the json values have no type information!\n */\n fun fromJson(value: JsonObject): CborMap<CborString, CborItem<*>> =\n CborMap(\n value.entries\n .map {\n Pair(\n CborString(it.key),\n when (it.value) {\n is JsonPrimitive -> any.fromJson(it.value)\n is JsonArray -> list.fromJson(it.value as JsonArray)\n is JsonObject -> fromJson(it.value as JsonObject)\n else -> throw IllegalArgumentException(\"Unknown type encountered\")\n },\n )\n }.toMap()\n .toMutableMap(),\n )\n }\n\n @Serializable(with = CDDLSerializer::class)\n @OptIn(ExperimentalObjCName::class)\n @ObjCName(\"cddlList\")\n object list :\n CDDL(\n \"list\",\n MajorType.ARRAY,\n ) {\n fun <T : CborItem<*>> newList(value: cddl_list<T>) = CborArray(value)\n\n /**\n * Please note that this method is not able to map onto the exact Cbor items as the json values have no type information!\n */\n fun fromJson(value: JsonArray): CborArray<CborItem<*>> =\n CborArray(\n value\n .map { elt ->\n when (elt) {\n is JsonPrimitive -> {\n any.fromJson(elt)\n }\n\n is JsonArray -> {\n fromJson(elt)\n }\n\n is JsonObject -> {\n if (CborItemJson.isCborItemValueJson(elt)) {\n newCborItemFromJson(\n elt,\n elt[CDDL_LITERAL]?.jsonPrimitive?.content?.let { CDDL.util.fromFormat(it) },\n )\n } else {\n map.fromJson(elt)\n }\n }\n\n else -> {\n throw IllegalArgumentException(\"Unknown type encountered\")\n }\n }\n }.toMutableList(),\n )\n }\n\n @Serializable(with = CDDLSerializer::class)\n @OptIn(ExperimentalObjCName::class)\n @ObjCName(\"cddlAny\")\n object any :\n CDDL(\n \"any\",\n ) {\n fun newAny(value: cddl_any) = CborAny(value)\n\n fun fromJson(value: JsonElement): CborItem<*> {\n return newCborItemFromJson(value)\n// TODO(\"Json any to cbor not implemeted yet\")\n }\n }\n\n override fun toTag(additionalInfo: Int?): String {\n if (aliasFor.isNotEmpty()) {\n if (additionalInfo == null) {\n return aliasFor[0].toTag(additionalInfo)\n }\n\n // fixme: this is not correct. We first need to traverse the aliases, as an alias could go without major and additional info\n return util.entries\n .first { it.majorType == majorType && it.info == additionalInfo }\n .toTag(additionalInfo)\n }\n\n var tag = \"#\"\n if (majorType != null) {\n tag += majorType\n }\n if (additionalInfo != null) {\n tag += \".$additionalInfo\"\n }\n return tag\n }\n\n override fun toString(): String = \"CDDL(format='$format', majorType=$majorType, info=$info, aliasFor=${aliasFor.contentToString()})\"\n\n override fun equals(other: Any?): Boolean {\n if (this === other) {\n return true\n }\n if (other !is CDDL) {\n return false\n }\n\n if (format != other.format) {\n return false\n }\n if (majorType != other.majorType) {\n return false\n }\n if (info != other.info) {\n return false\n }\n if (!aliasFor.contentEquals(other.aliasFor)) {\n return false\n }\n\n return true\n }\n\n override fun hashCode(): Int {\n var result = format.hashCode()\n result = 31 * result + (majorType?.hashCode() ?: 0)\n result = 31 * result + (info ?: 0)\n result = 31 * result + aliasFor.contentHashCode()\n return result\n }\n\n object util {\n // Lazy for serialization as this class is used as object in the above CDDL class\n val entries by lazy {\n arrayOf(\n any,\n uint,\n int,\n nint,\n bstr,\n bstr_indef_length,\n bytes,\n tstr,\n tstr_indef_length,\n text,\n tdate,\n full_date,\n time,\n float,\n False,\n True,\n bool,\n nil,\n Null,\n undefined,\n float16,\n float32,\n float64,\n map,\n list,\n )\n }\n\n fun fromFormat(format: String) = entries.first { it.format == format }\n\n fun fromTag(tag: String): CDDL {\n require(tag.startsWith(\"#\")) { \"Invalid tag supplied $tag\" }\n val parts = tag.split(\"#\", \".\")\n if (parts.size == 1) {\n return any\n }\n val majorVal = parts[1].toIntOrNull()\n return fromMajorType(majorVal?.let { MajorType.fromInt(it) }, parts[2].toIntOrNull())\n }\n\n fun fromBytes(input: Int): CDDL {\n val majorType = input shr 5\n\n // todo additionalInto\n return fromMajorType(MajorType.fromInt(majorType))\n }\n\n fun fromMajorType(\n majorType: MajorType? = null,\n additionalInfo: Int? = null,\n ) = entries.first {\n it.majorType == majorType && it.info == additionalInfo\n }\n }\n}\n\n@OptIn(ExperimentalObjCName::class)\n@ObjCName(\"MajorType\", exact = true)\n@Serializable\n@JsExportCompat\nenum class MajorType(\n val type: Int,\n) {\n /**\n * Major type 0.\n *\n * An unsigned integer in the range 0..2^64-1 inclusive. The value of the encoded item is the\n * argument itself. For example, the integer 10 is denoted as the one byte 0b000_01010 (major\n * type 0, additional information 10). The integer 500 would be 0b000_11001 (major type 0,\n * additional information 25) followed by the two bytes 0x01f4, which is 500 in decimal.\n */\n UNSIGNED_INTEGER(0),\n\n /**\n * Major type 1.\n *\n * A negative integer in the range -2^64..-1 inclusive. The value of the item is -1 minus\n * the argument. For example, the integer -500 would be 0b001_11001 (major type 1, additional\n * information 25) followed by the two bytes 0x01f3, which is 499 in decimal.\n */\n NEGATIVE_INTEGER(1),\n\n /**\n * Major type 2.\n *\n * A byte string. The number of bytes in the string is equal to the argument. For example,\n * a byte string whose length is 5 would have an initial byte of 0b010_00101 (major type 2,\n * additional information 5 for the length), followed by 5 bytes of binary content. A byte\n * string whose length is 500 would have 3 initial bytes of 0b010_11001 (major type 2,\n * additional information 25 to indicate a two-byte length) followed by the two bytes 0x01f4\n * for a length of 500, followed by 500 bytes of binary content.\n */\n BYTE_STRING(2),\n\n /**\n * Major type 3.\n *\n * A text string (Section 2) encoded as UTF-8 [RFC3629]. The number of bytes in the string\n * is equal to the argument. A string containing an invalid UTF-8 sequence is well-formed\n * but invalid (Section 1.2). This type is provided for systems that need to interpret or\n * display human-readable text, and allows the differentiation between unstructured bytes\n * and text that has a specified repertoire (that of Unicode) and encoding (UTF-8). In\n * contrast to formats such as JSON, the Unicode characters in this type are never escaped.\n * Thus, a newline character (U+000A) is always represented in a string as the byte 0x0a,\n * and never as the bytes 0x5c6e (the characters \"\\\" and \"n\") nor as 0x5c7530303061 (the\n * characters \"\\\", \"u\", \"0\", \"0\", \"0\", and \"a\").\n */\n UNICODE_STRING(3),\n\n /**\n * Major type 4.\n * An array of data items. In other formats, arrays are also called lists, sequences, or\n * tuples (a \"CBOR sequence\" is something slightly different, though [RFC8742]). The argument\n * is the number of data items in the array. Items in an array do not need to all be of the\n * same type. For example, an array that contains 10 items of any type would have an initial\n * byte of 0b100_01010 (major type 4, additional information 10 for the length) followed by\n * the 10 remaining items.\n */\n ARRAY(4),\n\n /**\n * Major type 5.\n *\n * A map of pairs of data items. Maps are also called tables, dictionaries, hashes, or\n * objects (in JSON). A map is comprised of pairs of data items, each pair consisting of a\n * key that is immediately followed by a value. The argument is the number of pairs of data\n * items in the map. For example, a map that contains 9 pairs would have an initial byte of\n * 0b101_01001 (major type 5, additional information 9 for the number of pairs) followed by\n * the 18 remaining items. The first item is the first key, the second item is the first\n * value, the third item is the second key, and so on. Because items in a map come in pairs,\n * their total number is always even: a map that contains an odd number of items (no value\n * data present after the last key data item) is not well-formed. A map that has duplicate\n * keys may be well-formed, but it is not valid, and thus it causes indeterminate decoding;\n * see also Section 5.6.\n */\n MAP(5),\n\n /**\n * Major type 6.\n *\n * A tagged data item (\"tag\") whose tag number, an integer in the range 0..2^64-1 inclusive,\n * is the argument and whose enclosed data item (tag content) is the single encoded data item\n * that follows the head. See Section 3.4.\n */\n TAG(6),\n\n /**\n * Major type 7.\n *\n * Floating-point numbers and simple values, as well as the \"break\" stop code. See Section 3.3.\n */\n SPECIAL(7),\n ;\n\n companion object {\n /**\n * Gets a [MajorType] instance from type.\n *\n * @param value an integer between 0 and 7, both inclusive\n * @return a [MajorType] for the given value.\n */\n @JsStatic\n @JvmStatic\n fun fromInt(value: Int): MajorType =\n entries.find { it.type == value }\n ?: throw IllegalArgumentException(\"Unknown major type with value $value\")\n }\n}\n\nabstract class CborSimple<Type : Any?>(\n value: Type,\n cddl: CDDL,\n) : CborItem<Type>(value, cddl) {\n init {\n val info =\n when (cddl) {\n is CDDL.bool -> {\n when (value) {\n true -> CDDL.True.info\n else -> CDDL.False.info\n }\n }\n\n else -> {\n cddl.info\n }\n }\n require(info != null)\n require(info is Int)\n check(info < 24 || (info in 32..255))\n }\n\n override fun encode(builder: ByteStringBuilder) {\n val majorTypeShifted = (majorType!!.type shl 5).toByte()\n builder.append(majorTypeShifted.or(info!!.toByte()))\n }\n\n override fun equals(other: Any?): Boolean = other is CborSimple<*> && value == other.value\n\n override fun hashCode(): Int = value.hashCode()\n\n override fun toString() =\n when (this) {\n FALSE -> \"Simple(FALSE)\"\n TRUE -> \"Simple(TRUE)\"\n NULL -> \"Simple(NULL)\"\n UNDEFINED -> \"Simple(UNDEFINED)\"\n else -> \"Simple($value)\"\n }\n\n companion object {\n /** The [Simple] value for FALSE */\n @OptIn(ExperimentalObjCName::class)\n @ObjCName(\"CBOR_FALSE\")\n @JsStatic\n @JvmStatic\n val FALSE = CborFalse()\n\n /** The [Simple] value for TRUE */\n @OptIn(ExperimentalObjCName::class)\n @ObjCName(\"CBOR_TRUE\")\n @JsStatic\n @JvmStatic\n val TRUE = CborTrue()\n\n /** The [Simple] value for NULL */\n @OptIn(ExperimentalObjCName::class)\n @ObjCName(\"CBOR_NULL\")\n @JsStatic\n @JvmStatic\n val NULL = CborNull()\n\n /** The [Simple] value for UNDEFINED */\n @JsStatic\n @JvmStatic\n val UNDEFINED = CborUndefined()\n }\n}"
}
}