@learncard/types 5.21.0 → 5.22.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,1846 @@
1
+ import { z } from 'zod/v4';
2
+ /**
3
+ * LC-2187 multi-credential share-link protocol types.
4
+ *
5
+ * This module is the single source of truth for the *recipient* payload grammar
6
+ * and the owner-facing recovery/API shapes. It is deliberately storage-agnostic:
7
+ * it defines bytes and structure, never where those bytes live.
8
+ *
9
+ * Security boundaries encoded here (see planning/lc-2187/task-a-contract.md and
10
+ * task-a2-review.md):
11
+ * - A share id / content key / IV / ciphertext is accepted only when it is
12
+ * canonical base64url: alphabet, no `=`, exact decoded byte length, and a
13
+ * re-encode round trip. Permissive decoders accept unused padding bits, so one
14
+ * byte string would otherwise have several spellings and could defeat an AAD
15
+ * or signature binding keyed on the string.
16
+ * - The recipient manifest never carries source URIs. Credentials are referenced
17
+ * by local index into the holder-signed presentation only.
18
+ * - Envelope authenticity (AES-GCM) only proves a key holder produced the bytes.
19
+ * It is NOT issuer identity. Signed VP/credential verification is a separate,
20
+ * later step (see `ShareManifestProofVerifier` in learn-card-base).
21
+ */
22
+ /** Raw byte length of the opaque share id (128 bits). */
23
+ export declare const SHARE_LINK_ID_BYTES = 16;
24
+ /** Raw byte length of the symmetric content key (256 bits). */
25
+ export declare const SHARE_CONTENT_KEY_BYTES = 32;
26
+ /** AES-GCM nonce length (96 bits). */
27
+ export declare const SHARE_IV_BYTES = 12;
28
+ /** AES-GCM authentication tag length (128 bits). */
29
+ export declare const SHARE_TAG_BYTES = 16;
30
+ /** Maximum decoded ciphertext length, tag included (512 KiB). */
31
+ export declare const MAX_SHARE_CIPHERTEXT_BYTES: number;
32
+ /** Maximum UTF-8 length of the serialized owner recovery JWE (64 KiB). */
33
+ export declare const MAX_SHARE_RECOVERY_JWE_BYTES: number;
34
+ /** Maximum number of selected credentials in one share (50). */
35
+ export declare const MAX_SELECTED_CREDENTIALS = 50;
36
+ /** Maximum number of public endorsements attached to one share (200). */
37
+ export declare const MAX_ENDORSEMENTS = 200;
38
+ /**
39
+ * Conservative total bound on holder-signed VP members (selected + endorsements).
40
+ * The sum is intentional: the two collections are disjoint and every member must
41
+ * be classified exactly once, so their maximums bound the VP.
42
+ */
43
+ export declare const MAX_VP_MEMBERS: number;
44
+ /** Maximum length of an owner-private source URI in recovery. */
45
+ export declare const MAX_SHARE_SOURCE_URI_CHARS = 2048;
46
+ /**
47
+ * Maximum UTF-8 byte length of one complete owner share-link request body,
48
+ * measured raw (before Zod strips unknown fields). This is the transport-level
49
+ * bound enforced ahead of schema parsing; individual field bounds are not a
50
+ * substitute for it.
51
+ */
52
+ export declare const MAX_SHARE_LINK_REQUEST_BYTES: number;
53
+ /** Recipient plaintext protocol id. */
54
+ export declare const SHARE_LINK_PROTOCOL = "lc-share/v1";
55
+ /** Owner recovery plaintext protocol id. */
56
+ export declare const SHARE_RECOVERY_PROTOCOL = "lc-share-recovery/v1";
57
+ /** Domain-separation prefix for the AES-GCM AAD. */
58
+ export declare const SHARE_AAD_PREFIX = "lc-share:v1";
59
+ /**
60
+ * Encode bytes as unpadded base64url. Browser/Node isomorphic on purpose: no
61
+ * `Buffer`, and no dependency on `btoa`/`atob` encoding quirks.
62
+ */
63
+ export declare const encodeBase64Url: (bytes: Uint8Array) => string;
64
+ /**
65
+ * Decode unpadded base64url to bytes. Returns `null` for any non-alphabet,
66
+ * padding or otherwise malformed input. This step is intentionally more lenient
67
+ * about trailing padding bits than {@link isCanonicalBase64Url}; callers that
68
+ * need one unambiguous spelling must re-encode and compare.
69
+ */
70
+ export declare const decodeBase64Url: (value: string) => Uint8Array | null;
71
+ /**
72
+ * Strict canonicity check: valid alphabet, no padding, and
73
+ * `encode(decode(value)) === value`. When `expectedBytes` is supplied the decoded
74
+ * length must match exactly.
75
+ */
76
+ export declare const isCanonicalBase64Url: (value: unknown, expectedBytes?: number) => boolean;
77
+ /** Base64url-encoded byte length without materializing the decoded string. */
78
+ export declare const decodedBase64UrlByteLength: (value: string) => number | null;
79
+ /** UTF-8 byte length, independent of the platform's string length semantics. */
80
+ export declare const utf8ByteLength: (value: string) => number;
81
+ /** 16-byte / 22-character share id. */
82
+ export declare const ShareLinkIdValidator: z.ZodString;
83
+ export type ShareLinkId = z.infer<typeof ShareLinkIdValidator>;
84
+ /** 32-byte / 43-character symmetric content key. */
85
+ export declare const ShareContentKeyValidator: z.ZodString;
86
+ export type ShareContentKey = z.infer<typeof ShareContentKeyValidator>;
87
+ /** 12-byte / 16-character AES-GCM nonce. */
88
+ export declare const ShareIvValidator: z.ZodString;
89
+ export type ShareIv = z.infer<typeof ShareIvValidator>;
90
+ /**
91
+ * Ciphertext||tag as canonical base64url. The decoded length includes the
92
+ * 16-byte GCM tag, must be at least that tag, and is capped at
93
+ * {@link MAX_SHARE_CIPHERTEXT_BYTES}.
94
+ */
95
+ export declare const ShareCiphertextValidator: z.ZodString;
96
+ export type ShareCiphertext = z.infer<typeof ShareCiphertextValidator>;
97
+ /**
98
+ * AES-256-GCM envelope. `v`/`alg` are literals so an unknown version or
99
+ * algorithm is rejected by the schema before any decryption is attempted.
100
+ */
101
+ export declare const ShareEnvelopeValidator: z.ZodObject<{
102
+ v: z.ZodLiteral<1>;
103
+ alg: z.ZodLiteral<"A256GCM">;
104
+ iv: z.ZodString;
105
+ ct: z.ZodString;
106
+ }, z.core.$strict>;
107
+ export type ShareEnvelope = z.infer<typeof ShareEnvelopeValidator>;
108
+ /** Index-only reference to a selected credential inside the signed VP. */
109
+ export declare const ShareSelectionEntryValidator: z.ZodObject<{
110
+ credentialIndex: z.ZodNumber;
111
+ }, z.core.$strict>;
112
+ export type ShareSelectionEntry = z.infer<typeof ShareSelectionEntryValidator>;
113
+ /**
114
+ * Index-only reference to an endorsement credential, plus the selected credential
115
+ * it endorses. Extra keys (for example a source `ref`/`uri`) are rejected so a
116
+ * recipient payload can never leak the owner's private source index.
117
+ */
118
+ export declare const ShareEndorsementEntryValidator: z.ZodObject<{
119
+ credentialIndex: z.ZodNumber;
120
+ targetCredentialIndex: z.ZodNumber;
121
+ }, z.core.$strict>;
122
+ export type ShareEndorsementEntry = z.infer<typeof ShareEndorsementEntryValidator>;
123
+ export declare const ShareSharerValidator: z.ZodObject<{
124
+ profileId: z.ZodString;
125
+ displayName: z.ZodString;
126
+ avatar: z.ZodOptional<z.ZodString>;
127
+ }, z.core.$strict>;
128
+ export type ShareSharer = z.infer<typeof ShareSharerValidator>;
129
+ export declare const ShareManifestPresentationValidator: z.ZodCustom<{
130
+ [x: string]: any;
131
+ '@context': (string | Record<string, any>)[];
132
+ type: string | string[];
133
+ proof: {
134
+ [x: string]: any;
135
+ type: string;
136
+ proofPurpose: string;
137
+ verificationMethod: string;
138
+ created?: string | undefined;
139
+ challenge?: string | undefined;
140
+ domain?: string | undefined;
141
+ nonce?: string | undefined;
142
+ jws?: string | undefined;
143
+ } | {
144
+ [x: string]: any;
145
+ type: string;
146
+ proofPurpose: string;
147
+ verificationMethod: string;
148
+ created?: string | undefined;
149
+ challenge?: string | undefined;
150
+ domain?: string | undefined;
151
+ nonce?: string | undefined;
152
+ jws?: string | undefined;
153
+ }[];
154
+ verifiableCredential: {
155
+ [x: string]: any;
156
+ '@context': (string | Record<string, any>)[];
157
+ type: string[];
158
+ issuer: string | {
159
+ [x: string]: any;
160
+ id?: string | undefined;
161
+ type?: string | string[] | undefined;
162
+ name?: string | undefined;
163
+ url?: string | undefined;
164
+ phone?: string | undefined;
165
+ description?: string | undefined;
166
+ endorsement?: any[] | undefined;
167
+ image?: string | {
168
+ id: string;
169
+ type: string;
170
+ caption?: string | undefined;
171
+ } | undefined;
172
+ email?: string | undefined;
173
+ address?: {
174
+ type: string | string[];
175
+ addressCountry?: string | undefined;
176
+ addressCountryCode?: string | undefined;
177
+ addressRegion?: string | undefined;
178
+ addressLocality?: string | undefined;
179
+ streetAddress?: string | undefined;
180
+ postOfficeBoxNumber?: string | undefined;
181
+ postalCode?: string | undefined;
182
+ geo?: {
183
+ type: string | string[];
184
+ latitude: number;
185
+ longitude: number;
186
+ } | undefined;
187
+ } | undefined;
188
+ otherIdentifier?: {
189
+ type: string | string[];
190
+ identifier: string;
191
+ identifierType: string;
192
+ }[] | undefined;
193
+ official?: string | undefined;
194
+ parentOrg?: any;
195
+ familyName?: string | undefined;
196
+ givenName?: string | undefined;
197
+ additionalName?: string | undefined;
198
+ patronymicName?: string | undefined;
199
+ honorificPrefix?: string | undefined;
200
+ honorificSuffix?: string | undefined;
201
+ familyNamePrefix?: string | undefined;
202
+ dateOfBirth?: string | undefined;
203
+ };
204
+ credentialSubject: {
205
+ [x: string]: any;
206
+ id?: string | undefined;
207
+ } | {
208
+ [x: string]: any;
209
+ id?: string | undefined;
210
+ }[];
211
+ proof: {
212
+ [x: string]: any;
213
+ type: string;
214
+ proofPurpose: string;
215
+ verificationMethod: string;
216
+ created?: string | undefined;
217
+ challenge?: string | undefined;
218
+ domain?: string | undefined;
219
+ nonce?: string | undefined;
220
+ jws?: string | undefined;
221
+ } | {
222
+ [x: string]: any;
223
+ type: string;
224
+ proofPurpose: string;
225
+ verificationMethod: string;
226
+ created?: string | undefined;
227
+ challenge?: string | undefined;
228
+ domain?: string | undefined;
229
+ nonce?: string | undefined;
230
+ jws?: string | undefined;
231
+ }[];
232
+ id?: string | undefined;
233
+ refreshService?: {
234
+ [x: string]: any;
235
+ type: string;
236
+ id?: string | undefined;
237
+ } | {
238
+ [x: string]: any;
239
+ type: string;
240
+ id?: string | undefined;
241
+ }[] | undefined;
242
+ credentialSchema?: {
243
+ [x: string]: any;
244
+ id: string;
245
+ type: string;
246
+ } | {
247
+ [x: string]: any;
248
+ id: string;
249
+ type: string;
250
+ }[] | undefined;
251
+ issuanceDate?: string | undefined;
252
+ expirationDate?: string | undefined;
253
+ credentialStatus?: {
254
+ [x: string]: any;
255
+ type: string;
256
+ id?: string | undefined;
257
+ } | {
258
+ [x: string]: any;
259
+ type: string;
260
+ id?: string | undefined;
261
+ }[] | undefined;
262
+ name?: string | undefined;
263
+ description?: string | undefined;
264
+ validFrom?: string | undefined;
265
+ validUntil?: string | undefined;
266
+ status?: {
267
+ [x: string]: any;
268
+ type: string;
269
+ id?: string | undefined;
270
+ } | {
271
+ [x: string]: any;
272
+ type: string;
273
+ id?: string | undefined;
274
+ }[] | undefined;
275
+ termsOfUse?: {
276
+ [x: string]: any;
277
+ type: string;
278
+ id?: string | undefined;
279
+ } | {
280
+ [x: string]: any;
281
+ type: string;
282
+ id?: string | undefined;
283
+ }[] | undefined;
284
+ evidence?: {
285
+ [x: string]: any;
286
+ type: string[];
287
+ id?: string | undefined;
288
+ name?: string | undefined;
289
+ narrative?: string | undefined;
290
+ description?: string | undefined;
291
+ genre?: string | undefined;
292
+ audience?: string | undefined;
293
+ } | {
294
+ [x: string]: any;
295
+ type: string[];
296
+ id?: string | undefined;
297
+ name?: string | undefined;
298
+ narrative?: string | undefined;
299
+ description?: string | undefined;
300
+ genre?: string | undefined;
301
+ audience?: string | undefined;
302
+ }[] | undefined;
303
+ renderMethod?: Record<string, any> | {
304
+ type: "TemplateRenderMethod";
305
+ renderSuite: string;
306
+ template: string;
307
+ renderProperty?: string[] | undefined;
308
+ outputPreference?: {
309
+ mediaType: string;
310
+ } | undefined;
311
+ } | (Record<string, any> | {
312
+ type: "TemplateRenderMethod";
313
+ renderSuite: string;
314
+ template: string;
315
+ renderProperty?: string[] | undefined;
316
+ outputPreference?: {
317
+ mediaType: string;
318
+ } | undefined;
319
+ })[] | undefined;
320
+ }[];
321
+ id?: string | undefined;
322
+ holder?: string | undefined;
323
+ }, {
324
+ [x: string]: any;
325
+ '@context': (string | Record<string, any>)[];
326
+ type: string | string[];
327
+ proof: {
328
+ [x: string]: any;
329
+ type: string;
330
+ proofPurpose: string;
331
+ verificationMethod: string;
332
+ created?: string | undefined;
333
+ challenge?: string | undefined;
334
+ domain?: string | undefined;
335
+ nonce?: string | undefined;
336
+ jws?: string | undefined;
337
+ } | {
338
+ [x: string]: any;
339
+ type: string;
340
+ proofPurpose: string;
341
+ verificationMethod: string;
342
+ created?: string | undefined;
343
+ challenge?: string | undefined;
344
+ domain?: string | undefined;
345
+ nonce?: string | undefined;
346
+ jws?: string | undefined;
347
+ }[];
348
+ verifiableCredential: {
349
+ [x: string]: any;
350
+ '@context': (string | Record<string, any>)[];
351
+ type: string[];
352
+ issuer: string | {
353
+ [x: string]: any;
354
+ id?: string | undefined;
355
+ type?: string | string[] | undefined;
356
+ name?: string | undefined;
357
+ url?: string | undefined;
358
+ phone?: string | undefined;
359
+ description?: string | undefined;
360
+ endorsement?: any[] | undefined;
361
+ image?: string | {
362
+ id: string;
363
+ type: string;
364
+ caption?: string | undefined;
365
+ } | undefined;
366
+ email?: string | undefined;
367
+ address?: {
368
+ type: string | string[];
369
+ addressCountry?: string | undefined;
370
+ addressCountryCode?: string | undefined;
371
+ addressRegion?: string | undefined;
372
+ addressLocality?: string | undefined;
373
+ streetAddress?: string | undefined;
374
+ postOfficeBoxNumber?: string | undefined;
375
+ postalCode?: string | undefined;
376
+ geo?: {
377
+ type: string | string[];
378
+ latitude: number;
379
+ longitude: number;
380
+ } | undefined;
381
+ } | undefined;
382
+ otherIdentifier?: {
383
+ type: string | string[];
384
+ identifier: string;
385
+ identifierType: string;
386
+ }[] | undefined;
387
+ official?: string | undefined;
388
+ parentOrg?: any;
389
+ familyName?: string | undefined;
390
+ givenName?: string | undefined;
391
+ additionalName?: string | undefined;
392
+ patronymicName?: string | undefined;
393
+ honorificPrefix?: string | undefined;
394
+ honorificSuffix?: string | undefined;
395
+ familyNamePrefix?: string | undefined;
396
+ dateOfBirth?: string | undefined;
397
+ };
398
+ credentialSubject: {
399
+ [x: string]: any;
400
+ id?: string | undefined;
401
+ } | {
402
+ [x: string]: any;
403
+ id?: string | undefined;
404
+ }[];
405
+ proof: {
406
+ [x: string]: any;
407
+ type: string;
408
+ proofPurpose: string;
409
+ verificationMethod: string;
410
+ created?: string | undefined;
411
+ challenge?: string | undefined;
412
+ domain?: string | undefined;
413
+ nonce?: string | undefined;
414
+ jws?: string | undefined;
415
+ } | {
416
+ [x: string]: any;
417
+ type: string;
418
+ proofPurpose: string;
419
+ verificationMethod: string;
420
+ created?: string | undefined;
421
+ challenge?: string | undefined;
422
+ domain?: string | undefined;
423
+ nonce?: string | undefined;
424
+ jws?: string | undefined;
425
+ }[];
426
+ id?: string | undefined;
427
+ refreshService?: {
428
+ [x: string]: any;
429
+ type: string;
430
+ id?: string | undefined;
431
+ } | {
432
+ [x: string]: any;
433
+ type: string;
434
+ id?: string | undefined;
435
+ }[] | undefined;
436
+ credentialSchema?: {
437
+ [x: string]: any;
438
+ id: string;
439
+ type: string;
440
+ } | {
441
+ [x: string]: any;
442
+ id: string;
443
+ type: string;
444
+ }[] | undefined;
445
+ issuanceDate?: string | undefined;
446
+ expirationDate?: string | undefined;
447
+ credentialStatus?: {
448
+ [x: string]: any;
449
+ type: string;
450
+ id?: string | undefined;
451
+ } | {
452
+ [x: string]: any;
453
+ type: string;
454
+ id?: string | undefined;
455
+ }[] | undefined;
456
+ name?: string | undefined;
457
+ description?: string | undefined;
458
+ validFrom?: string | undefined;
459
+ validUntil?: string | undefined;
460
+ status?: {
461
+ [x: string]: any;
462
+ type: string;
463
+ id?: string | undefined;
464
+ } | {
465
+ [x: string]: any;
466
+ type: string;
467
+ id?: string | undefined;
468
+ }[] | undefined;
469
+ termsOfUse?: {
470
+ [x: string]: any;
471
+ type: string;
472
+ id?: string | undefined;
473
+ } | {
474
+ [x: string]: any;
475
+ type: string;
476
+ id?: string | undefined;
477
+ }[] | undefined;
478
+ evidence?: {
479
+ [x: string]: any;
480
+ type: string[];
481
+ id?: string | undefined;
482
+ name?: string | undefined;
483
+ narrative?: string | undefined;
484
+ description?: string | undefined;
485
+ genre?: string | undefined;
486
+ audience?: string | undefined;
487
+ } | {
488
+ [x: string]: any;
489
+ type: string[];
490
+ id?: string | undefined;
491
+ name?: string | undefined;
492
+ narrative?: string | undefined;
493
+ description?: string | undefined;
494
+ genre?: string | undefined;
495
+ audience?: string | undefined;
496
+ }[] | undefined;
497
+ renderMethod?: Record<string, any> | {
498
+ type: "TemplateRenderMethod";
499
+ renderSuite: string;
500
+ template: string;
501
+ renderProperty?: string[] | undefined;
502
+ outputPreference?: {
503
+ mediaType: string;
504
+ } | undefined;
505
+ } | (Record<string, any> | {
506
+ type: "TemplateRenderMethod";
507
+ renderSuite: string;
508
+ template: string;
509
+ renderProperty?: string[] | undefined;
510
+ outputPreference?: {
511
+ mediaType: string;
512
+ } | undefined;
513
+ })[] | undefined;
514
+ }[];
515
+ id?: string | undefined;
516
+ holder?: string | undefined;
517
+ }>;
518
+ export type ShareManifestPresentation = z.infer<typeof ShareManifestPresentationValidator>;
519
+ export declare const SharePayloadValidatorShape: z.ZodObject<{
520
+ protocol: z.ZodLiteral<"lc-share/v1">;
521
+ shareId: z.ZodString;
522
+ contentVersion: z.ZodNumber;
523
+ createdAt: z.ZodISODateTime;
524
+ sharer: z.ZodObject<{
525
+ profileId: z.ZodString;
526
+ displayName: z.ZodString;
527
+ avatar: z.ZodOptional<z.ZodString>;
528
+ }, z.core.$strict>;
529
+ presentation: z.ZodCustom<{
530
+ [x: string]: any;
531
+ '@context': (string | Record<string, any>)[];
532
+ type: string | string[];
533
+ proof: {
534
+ [x: string]: any;
535
+ type: string;
536
+ proofPurpose: string;
537
+ verificationMethod: string;
538
+ created?: string | undefined;
539
+ challenge?: string | undefined;
540
+ domain?: string | undefined;
541
+ nonce?: string | undefined;
542
+ jws?: string | undefined;
543
+ } | {
544
+ [x: string]: any;
545
+ type: string;
546
+ proofPurpose: string;
547
+ verificationMethod: string;
548
+ created?: string | undefined;
549
+ challenge?: string | undefined;
550
+ domain?: string | undefined;
551
+ nonce?: string | undefined;
552
+ jws?: string | undefined;
553
+ }[];
554
+ verifiableCredential: {
555
+ [x: string]: any;
556
+ '@context': (string | Record<string, any>)[];
557
+ type: string[];
558
+ issuer: string | {
559
+ [x: string]: any;
560
+ id?: string | undefined;
561
+ type?: string | string[] | undefined;
562
+ name?: string | undefined;
563
+ url?: string | undefined;
564
+ phone?: string | undefined;
565
+ description?: string | undefined;
566
+ endorsement?: any[] | undefined;
567
+ image?: string | {
568
+ id: string;
569
+ type: string;
570
+ caption?: string | undefined;
571
+ } | undefined;
572
+ email?: string | undefined;
573
+ address?: {
574
+ type: string | string[];
575
+ addressCountry?: string | undefined;
576
+ addressCountryCode?: string | undefined;
577
+ addressRegion?: string | undefined;
578
+ addressLocality?: string | undefined;
579
+ streetAddress?: string | undefined;
580
+ postOfficeBoxNumber?: string | undefined;
581
+ postalCode?: string | undefined;
582
+ geo?: {
583
+ type: string | string[];
584
+ latitude: number;
585
+ longitude: number;
586
+ } | undefined;
587
+ } | undefined;
588
+ otherIdentifier?: {
589
+ type: string | string[];
590
+ identifier: string;
591
+ identifierType: string;
592
+ }[] | undefined;
593
+ official?: string | undefined;
594
+ parentOrg?: any;
595
+ familyName?: string | undefined;
596
+ givenName?: string | undefined;
597
+ additionalName?: string | undefined;
598
+ patronymicName?: string | undefined;
599
+ honorificPrefix?: string | undefined;
600
+ honorificSuffix?: string | undefined;
601
+ familyNamePrefix?: string | undefined;
602
+ dateOfBirth?: string | undefined;
603
+ };
604
+ credentialSubject: {
605
+ [x: string]: any;
606
+ id?: string | undefined;
607
+ } | {
608
+ [x: string]: any;
609
+ id?: string | undefined;
610
+ }[];
611
+ proof: {
612
+ [x: string]: any;
613
+ type: string;
614
+ proofPurpose: string;
615
+ verificationMethod: string;
616
+ created?: string | undefined;
617
+ challenge?: string | undefined;
618
+ domain?: string | undefined;
619
+ nonce?: string | undefined;
620
+ jws?: string | undefined;
621
+ } | {
622
+ [x: string]: any;
623
+ type: string;
624
+ proofPurpose: string;
625
+ verificationMethod: string;
626
+ created?: string | undefined;
627
+ challenge?: string | undefined;
628
+ domain?: string | undefined;
629
+ nonce?: string | undefined;
630
+ jws?: string | undefined;
631
+ }[];
632
+ id?: string | undefined;
633
+ refreshService?: {
634
+ [x: string]: any;
635
+ type: string;
636
+ id?: string | undefined;
637
+ } | {
638
+ [x: string]: any;
639
+ type: string;
640
+ id?: string | undefined;
641
+ }[] | undefined;
642
+ credentialSchema?: {
643
+ [x: string]: any;
644
+ id: string;
645
+ type: string;
646
+ } | {
647
+ [x: string]: any;
648
+ id: string;
649
+ type: string;
650
+ }[] | undefined;
651
+ issuanceDate?: string | undefined;
652
+ expirationDate?: string | undefined;
653
+ credentialStatus?: {
654
+ [x: string]: any;
655
+ type: string;
656
+ id?: string | undefined;
657
+ } | {
658
+ [x: string]: any;
659
+ type: string;
660
+ id?: string | undefined;
661
+ }[] | undefined;
662
+ name?: string | undefined;
663
+ description?: string | undefined;
664
+ validFrom?: string | undefined;
665
+ validUntil?: string | undefined;
666
+ status?: {
667
+ [x: string]: any;
668
+ type: string;
669
+ id?: string | undefined;
670
+ } | {
671
+ [x: string]: any;
672
+ type: string;
673
+ id?: string | undefined;
674
+ }[] | undefined;
675
+ termsOfUse?: {
676
+ [x: string]: any;
677
+ type: string;
678
+ id?: string | undefined;
679
+ } | {
680
+ [x: string]: any;
681
+ type: string;
682
+ id?: string | undefined;
683
+ }[] | undefined;
684
+ evidence?: {
685
+ [x: string]: any;
686
+ type: string[];
687
+ id?: string | undefined;
688
+ name?: string | undefined;
689
+ narrative?: string | undefined;
690
+ description?: string | undefined;
691
+ genre?: string | undefined;
692
+ audience?: string | undefined;
693
+ } | {
694
+ [x: string]: any;
695
+ type: string[];
696
+ id?: string | undefined;
697
+ name?: string | undefined;
698
+ narrative?: string | undefined;
699
+ description?: string | undefined;
700
+ genre?: string | undefined;
701
+ audience?: string | undefined;
702
+ }[] | undefined;
703
+ renderMethod?: Record<string, any> | {
704
+ type: "TemplateRenderMethod";
705
+ renderSuite: string;
706
+ template: string;
707
+ renderProperty?: string[] | undefined;
708
+ outputPreference?: {
709
+ mediaType: string;
710
+ } | undefined;
711
+ } | (Record<string, any> | {
712
+ type: "TemplateRenderMethod";
713
+ renderSuite: string;
714
+ template: string;
715
+ renderProperty?: string[] | undefined;
716
+ outputPreference?: {
717
+ mediaType: string;
718
+ } | undefined;
719
+ })[] | undefined;
720
+ }[];
721
+ id?: string | undefined;
722
+ holder?: string | undefined;
723
+ }, {
724
+ [x: string]: any;
725
+ '@context': (string | Record<string, any>)[];
726
+ type: string | string[];
727
+ proof: {
728
+ [x: string]: any;
729
+ type: string;
730
+ proofPurpose: string;
731
+ verificationMethod: string;
732
+ created?: string | undefined;
733
+ challenge?: string | undefined;
734
+ domain?: string | undefined;
735
+ nonce?: string | undefined;
736
+ jws?: string | undefined;
737
+ } | {
738
+ [x: string]: any;
739
+ type: string;
740
+ proofPurpose: string;
741
+ verificationMethod: string;
742
+ created?: string | undefined;
743
+ challenge?: string | undefined;
744
+ domain?: string | undefined;
745
+ nonce?: string | undefined;
746
+ jws?: string | undefined;
747
+ }[];
748
+ verifiableCredential: {
749
+ [x: string]: any;
750
+ '@context': (string | Record<string, any>)[];
751
+ type: string[];
752
+ issuer: string | {
753
+ [x: string]: any;
754
+ id?: string | undefined;
755
+ type?: string | string[] | undefined;
756
+ name?: string | undefined;
757
+ url?: string | undefined;
758
+ phone?: string | undefined;
759
+ description?: string | undefined;
760
+ endorsement?: any[] | undefined;
761
+ image?: string | {
762
+ id: string;
763
+ type: string;
764
+ caption?: string | undefined;
765
+ } | undefined;
766
+ email?: string | undefined;
767
+ address?: {
768
+ type: string | string[];
769
+ addressCountry?: string | undefined;
770
+ addressCountryCode?: string | undefined;
771
+ addressRegion?: string | undefined;
772
+ addressLocality?: string | undefined;
773
+ streetAddress?: string | undefined;
774
+ postOfficeBoxNumber?: string | undefined;
775
+ postalCode?: string | undefined;
776
+ geo?: {
777
+ type: string | string[];
778
+ latitude: number;
779
+ longitude: number;
780
+ } | undefined;
781
+ } | undefined;
782
+ otherIdentifier?: {
783
+ type: string | string[];
784
+ identifier: string;
785
+ identifierType: string;
786
+ }[] | undefined;
787
+ official?: string | undefined;
788
+ parentOrg?: any;
789
+ familyName?: string | undefined;
790
+ givenName?: string | undefined;
791
+ additionalName?: string | undefined;
792
+ patronymicName?: string | undefined;
793
+ honorificPrefix?: string | undefined;
794
+ honorificSuffix?: string | undefined;
795
+ familyNamePrefix?: string | undefined;
796
+ dateOfBirth?: string | undefined;
797
+ };
798
+ credentialSubject: {
799
+ [x: string]: any;
800
+ id?: string | undefined;
801
+ } | {
802
+ [x: string]: any;
803
+ id?: string | undefined;
804
+ }[];
805
+ proof: {
806
+ [x: string]: any;
807
+ type: string;
808
+ proofPurpose: string;
809
+ verificationMethod: string;
810
+ created?: string | undefined;
811
+ challenge?: string | undefined;
812
+ domain?: string | undefined;
813
+ nonce?: string | undefined;
814
+ jws?: string | undefined;
815
+ } | {
816
+ [x: string]: any;
817
+ type: string;
818
+ proofPurpose: string;
819
+ verificationMethod: string;
820
+ created?: string | undefined;
821
+ challenge?: string | undefined;
822
+ domain?: string | undefined;
823
+ nonce?: string | undefined;
824
+ jws?: string | undefined;
825
+ }[];
826
+ id?: string | undefined;
827
+ refreshService?: {
828
+ [x: string]: any;
829
+ type: string;
830
+ id?: string | undefined;
831
+ } | {
832
+ [x: string]: any;
833
+ type: string;
834
+ id?: string | undefined;
835
+ }[] | undefined;
836
+ credentialSchema?: {
837
+ [x: string]: any;
838
+ id: string;
839
+ type: string;
840
+ } | {
841
+ [x: string]: any;
842
+ id: string;
843
+ type: string;
844
+ }[] | undefined;
845
+ issuanceDate?: string | undefined;
846
+ expirationDate?: string | undefined;
847
+ credentialStatus?: {
848
+ [x: string]: any;
849
+ type: string;
850
+ id?: string | undefined;
851
+ } | {
852
+ [x: string]: any;
853
+ type: string;
854
+ id?: string | undefined;
855
+ }[] | undefined;
856
+ name?: string | undefined;
857
+ description?: string | undefined;
858
+ validFrom?: string | undefined;
859
+ validUntil?: string | undefined;
860
+ status?: {
861
+ [x: string]: any;
862
+ type: string;
863
+ id?: string | undefined;
864
+ } | {
865
+ [x: string]: any;
866
+ type: string;
867
+ id?: string | undefined;
868
+ }[] | undefined;
869
+ termsOfUse?: {
870
+ [x: string]: any;
871
+ type: string;
872
+ id?: string | undefined;
873
+ } | {
874
+ [x: string]: any;
875
+ type: string;
876
+ id?: string | undefined;
877
+ }[] | undefined;
878
+ evidence?: {
879
+ [x: string]: any;
880
+ type: string[];
881
+ id?: string | undefined;
882
+ name?: string | undefined;
883
+ narrative?: string | undefined;
884
+ description?: string | undefined;
885
+ genre?: string | undefined;
886
+ audience?: string | undefined;
887
+ } | {
888
+ [x: string]: any;
889
+ type: string[];
890
+ id?: string | undefined;
891
+ name?: string | undefined;
892
+ narrative?: string | undefined;
893
+ description?: string | undefined;
894
+ genre?: string | undefined;
895
+ audience?: string | undefined;
896
+ }[] | undefined;
897
+ renderMethod?: Record<string, any> | {
898
+ type: "TemplateRenderMethod";
899
+ renderSuite: string;
900
+ template: string;
901
+ renderProperty?: string[] | undefined;
902
+ outputPreference?: {
903
+ mediaType: string;
904
+ } | undefined;
905
+ } | (Record<string, any> | {
906
+ type: "TemplateRenderMethod";
907
+ renderSuite: string;
908
+ template: string;
909
+ renderProperty?: string[] | undefined;
910
+ outputPreference?: {
911
+ mediaType: string;
912
+ } | undefined;
913
+ })[] | undefined;
914
+ }[];
915
+ id?: string | undefined;
916
+ holder?: string | undefined;
917
+ }>;
918
+ selection: z.ZodArray<z.ZodObject<{
919
+ credentialIndex: z.ZodNumber;
920
+ }, z.core.$strict>>;
921
+ endorsements: z.ZodDefault<z.ZodArray<z.ZodObject<{
922
+ credentialIndex: z.ZodNumber;
923
+ targetCredentialIndex: z.ZodNumber;
924
+ }, z.core.$strict>>>;
925
+ }, z.core.$strict>;
926
+ export type SharePayloadShape = z.infer<typeof SharePayloadValidatorShape>;
927
+ /** Structured classification failure raised by {@link classifyShareManifest}. */
928
+ export type ShareManifestClassificationCode = 'NO_PRESENTATION_MEMBERS' | 'TOO_MANY_VP_MEMBERS' | 'BAD_SELECTION' | 'BAD_ENDORSEMENTS' | 'SELECTION_INDEX_OUT_OF_BOUNDS' | 'SELECTION_INDEX_DUPLICATE' | 'ENDORSEMENT_INDEX_OUT_OF_BOUNDS' | 'VP_MEMBER_CLASSIFIED_TWICE' | 'ENDORSEMENT_TARGET_NOT_SELECTED' | 'ENDORSEMENT_TARGET_UNBOUND' | 'UNCLASSIFIED_VP_MEMBER';
929
+ export interface ShareManifestClassification {
930
+ /** Ordered selected VP member indices, exactly as the manifest declares them. */
931
+ selectedIndices: number[];
932
+ /** Endorsement VP member indices (unordered classification helper). */
933
+ endorsementIndices: number[];
934
+ /** Total VP members, all of which are classified. */
935
+ memberCount: number;
936
+ }
937
+ export type ShareManifestClassificationResult = {
938
+ ok: true;
939
+ classification: ShareManifestClassification;
940
+ } | {
941
+ ok: false;
942
+ code: ShareManifestClassificationCode;
943
+ message: string;
944
+ path: (string | number)[];
945
+ };
946
+ /**
947
+ * Structurally classify every holder-signed VP member exactly once.
948
+ *
949
+ * This is *structural* validation only: it proves each member is either selected
950
+ * or an endorsement of a selected member and that no member is smuggled. It does
951
+ * not verify any cryptographic proof. Endorsement target binding here reads the
952
+ * endorsement's own signed claim (`credentialSubject.id` / `endorsement.id`); it
953
+ * is still not signature verification.
954
+ */
955
+ export declare const classifyShareManifest: (payload: Pick<SharePayloadShape, "presentation" | "selection" | "endorsements">) => ShareManifestClassificationResult;
956
+ /**
957
+ * Manifest validator. Beyond the strict shape it enforces the full structural
958
+ * classification, so a parsed manifest is guaranteed to classify every VP member
959
+ * exactly once with in-bounds indices and claim-bound endorsement targets.
960
+ */
961
+ export declare const SharePayloadValidator: z.ZodObject<{
962
+ protocol: z.ZodLiteral<"lc-share/v1">;
963
+ shareId: z.ZodString;
964
+ contentVersion: z.ZodNumber;
965
+ createdAt: z.ZodISODateTime;
966
+ sharer: z.ZodObject<{
967
+ profileId: z.ZodString;
968
+ displayName: z.ZodString;
969
+ avatar: z.ZodOptional<z.ZodString>;
970
+ }, z.core.$strict>;
971
+ presentation: z.ZodCustom<{
972
+ [x: string]: any;
973
+ '@context': (string | Record<string, any>)[];
974
+ type: string | string[];
975
+ proof: {
976
+ [x: string]: any;
977
+ type: string;
978
+ proofPurpose: string;
979
+ verificationMethod: string;
980
+ created?: string | undefined;
981
+ challenge?: string | undefined;
982
+ domain?: string | undefined;
983
+ nonce?: string | undefined;
984
+ jws?: string | undefined;
985
+ } | {
986
+ [x: string]: any;
987
+ type: string;
988
+ proofPurpose: string;
989
+ verificationMethod: string;
990
+ created?: string | undefined;
991
+ challenge?: string | undefined;
992
+ domain?: string | undefined;
993
+ nonce?: string | undefined;
994
+ jws?: string | undefined;
995
+ }[];
996
+ verifiableCredential: {
997
+ [x: string]: any;
998
+ '@context': (string | Record<string, any>)[];
999
+ type: string[];
1000
+ issuer: string | {
1001
+ [x: string]: any;
1002
+ id?: string | undefined;
1003
+ type?: string | string[] | undefined;
1004
+ name?: string | undefined;
1005
+ url?: string | undefined;
1006
+ phone?: string | undefined;
1007
+ description?: string | undefined;
1008
+ endorsement?: any[] | undefined;
1009
+ image?: string | {
1010
+ id: string;
1011
+ type: string;
1012
+ caption?: string | undefined;
1013
+ } | undefined;
1014
+ email?: string | undefined;
1015
+ address?: {
1016
+ type: string | string[];
1017
+ addressCountry?: string | undefined;
1018
+ addressCountryCode?: string | undefined;
1019
+ addressRegion?: string | undefined;
1020
+ addressLocality?: string | undefined;
1021
+ streetAddress?: string | undefined;
1022
+ postOfficeBoxNumber?: string | undefined;
1023
+ postalCode?: string | undefined;
1024
+ geo?: {
1025
+ type: string | string[];
1026
+ latitude: number;
1027
+ longitude: number;
1028
+ } | undefined;
1029
+ } | undefined;
1030
+ otherIdentifier?: {
1031
+ type: string | string[];
1032
+ identifier: string;
1033
+ identifierType: string;
1034
+ }[] | undefined;
1035
+ official?: string | undefined;
1036
+ parentOrg?: any;
1037
+ familyName?: string | undefined;
1038
+ givenName?: string | undefined;
1039
+ additionalName?: string | undefined;
1040
+ patronymicName?: string | undefined;
1041
+ honorificPrefix?: string | undefined;
1042
+ honorificSuffix?: string | undefined;
1043
+ familyNamePrefix?: string | undefined;
1044
+ dateOfBirth?: string | undefined;
1045
+ };
1046
+ credentialSubject: {
1047
+ [x: string]: any;
1048
+ id?: string | undefined;
1049
+ } | {
1050
+ [x: string]: any;
1051
+ id?: string | undefined;
1052
+ }[];
1053
+ proof: {
1054
+ [x: string]: any;
1055
+ type: string;
1056
+ proofPurpose: string;
1057
+ verificationMethod: string;
1058
+ created?: string | undefined;
1059
+ challenge?: string | undefined;
1060
+ domain?: string | undefined;
1061
+ nonce?: string | undefined;
1062
+ jws?: string | undefined;
1063
+ } | {
1064
+ [x: string]: any;
1065
+ type: string;
1066
+ proofPurpose: string;
1067
+ verificationMethod: string;
1068
+ created?: string | undefined;
1069
+ challenge?: string | undefined;
1070
+ domain?: string | undefined;
1071
+ nonce?: string | undefined;
1072
+ jws?: string | undefined;
1073
+ }[];
1074
+ id?: string | undefined;
1075
+ refreshService?: {
1076
+ [x: string]: any;
1077
+ type: string;
1078
+ id?: string | undefined;
1079
+ } | {
1080
+ [x: string]: any;
1081
+ type: string;
1082
+ id?: string | undefined;
1083
+ }[] | undefined;
1084
+ credentialSchema?: {
1085
+ [x: string]: any;
1086
+ id: string;
1087
+ type: string;
1088
+ } | {
1089
+ [x: string]: any;
1090
+ id: string;
1091
+ type: string;
1092
+ }[] | undefined;
1093
+ issuanceDate?: string | undefined;
1094
+ expirationDate?: string | undefined;
1095
+ credentialStatus?: {
1096
+ [x: string]: any;
1097
+ type: string;
1098
+ id?: string | undefined;
1099
+ } | {
1100
+ [x: string]: any;
1101
+ type: string;
1102
+ id?: string | undefined;
1103
+ }[] | undefined;
1104
+ name?: string | undefined;
1105
+ description?: string | undefined;
1106
+ validFrom?: string | undefined;
1107
+ validUntil?: string | undefined;
1108
+ status?: {
1109
+ [x: string]: any;
1110
+ type: string;
1111
+ id?: string | undefined;
1112
+ } | {
1113
+ [x: string]: any;
1114
+ type: string;
1115
+ id?: string | undefined;
1116
+ }[] | undefined;
1117
+ termsOfUse?: {
1118
+ [x: string]: any;
1119
+ type: string;
1120
+ id?: string | undefined;
1121
+ } | {
1122
+ [x: string]: any;
1123
+ type: string;
1124
+ id?: string | undefined;
1125
+ }[] | undefined;
1126
+ evidence?: {
1127
+ [x: string]: any;
1128
+ type: string[];
1129
+ id?: string | undefined;
1130
+ name?: string | undefined;
1131
+ narrative?: string | undefined;
1132
+ description?: string | undefined;
1133
+ genre?: string | undefined;
1134
+ audience?: string | undefined;
1135
+ } | {
1136
+ [x: string]: any;
1137
+ type: string[];
1138
+ id?: string | undefined;
1139
+ name?: string | undefined;
1140
+ narrative?: string | undefined;
1141
+ description?: string | undefined;
1142
+ genre?: string | undefined;
1143
+ audience?: string | undefined;
1144
+ }[] | undefined;
1145
+ renderMethod?: Record<string, any> | {
1146
+ type: "TemplateRenderMethod";
1147
+ renderSuite: string;
1148
+ template: string;
1149
+ renderProperty?: string[] | undefined;
1150
+ outputPreference?: {
1151
+ mediaType: string;
1152
+ } | undefined;
1153
+ } | (Record<string, any> | {
1154
+ type: "TemplateRenderMethod";
1155
+ renderSuite: string;
1156
+ template: string;
1157
+ renderProperty?: string[] | undefined;
1158
+ outputPreference?: {
1159
+ mediaType: string;
1160
+ } | undefined;
1161
+ })[] | undefined;
1162
+ }[];
1163
+ id?: string | undefined;
1164
+ holder?: string | undefined;
1165
+ }, {
1166
+ [x: string]: any;
1167
+ '@context': (string | Record<string, any>)[];
1168
+ type: string | string[];
1169
+ proof: {
1170
+ [x: string]: any;
1171
+ type: string;
1172
+ proofPurpose: string;
1173
+ verificationMethod: string;
1174
+ created?: string | undefined;
1175
+ challenge?: string | undefined;
1176
+ domain?: string | undefined;
1177
+ nonce?: string | undefined;
1178
+ jws?: string | undefined;
1179
+ } | {
1180
+ [x: string]: any;
1181
+ type: string;
1182
+ proofPurpose: string;
1183
+ verificationMethod: string;
1184
+ created?: string | undefined;
1185
+ challenge?: string | undefined;
1186
+ domain?: string | undefined;
1187
+ nonce?: string | undefined;
1188
+ jws?: string | undefined;
1189
+ }[];
1190
+ verifiableCredential: {
1191
+ [x: string]: any;
1192
+ '@context': (string | Record<string, any>)[];
1193
+ type: string[];
1194
+ issuer: string | {
1195
+ [x: string]: any;
1196
+ id?: string | undefined;
1197
+ type?: string | string[] | undefined;
1198
+ name?: string | undefined;
1199
+ url?: string | undefined;
1200
+ phone?: string | undefined;
1201
+ description?: string | undefined;
1202
+ endorsement?: any[] | undefined;
1203
+ image?: string | {
1204
+ id: string;
1205
+ type: string;
1206
+ caption?: string | undefined;
1207
+ } | undefined;
1208
+ email?: string | undefined;
1209
+ address?: {
1210
+ type: string | string[];
1211
+ addressCountry?: string | undefined;
1212
+ addressCountryCode?: string | undefined;
1213
+ addressRegion?: string | undefined;
1214
+ addressLocality?: string | undefined;
1215
+ streetAddress?: string | undefined;
1216
+ postOfficeBoxNumber?: string | undefined;
1217
+ postalCode?: string | undefined;
1218
+ geo?: {
1219
+ type: string | string[];
1220
+ latitude: number;
1221
+ longitude: number;
1222
+ } | undefined;
1223
+ } | undefined;
1224
+ otherIdentifier?: {
1225
+ type: string | string[];
1226
+ identifier: string;
1227
+ identifierType: string;
1228
+ }[] | undefined;
1229
+ official?: string | undefined;
1230
+ parentOrg?: any;
1231
+ familyName?: string | undefined;
1232
+ givenName?: string | undefined;
1233
+ additionalName?: string | undefined;
1234
+ patronymicName?: string | undefined;
1235
+ honorificPrefix?: string | undefined;
1236
+ honorificSuffix?: string | undefined;
1237
+ familyNamePrefix?: string | undefined;
1238
+ dateOfBirth?: string | undefined;
1239
+ };
1240
+ credentialSubject: {
1241
+ [x: string]: any;
1242
+ id?: string | undefined;
1243
+ } | {
1244
+ [x: string]: any;
1245
+ id?: string | undefined;
1246
+ }[];
1247
+ proof: {
1248
+ [x: string]: any;
1249
+ type: string;
1250
+ proofPurpose: string;
1251
+ verificationMethod: string;
1252
+ created?: string | undefined;
1253
+ challenge?: string | undefined;
1254
+ domain?: string | undefined;
1255
+ nonce?: string | undefined;
1256
+ jws?: string | undefined;
1257
+ } | {
1258
+ [x: string]: any;
1259
+ type: string;
1260
+ proofPurpose: string;
1261
+ verificationMethod: string;
1262
+ created?: string | undefined;
1263
+ challenge?: string | undefined;
1264
+ domain?: string | undefined;
1265
+ nonce?: string | undefined;
1266
+ jws?: string | undefined;
1267
+ }[];
1268
+ id?: string | undefined;
1269
+ refreshService?: {
1270
+ [x: string]: any;
1271
+ type: string;
1272
+ id?: string | undefined;
1273
+ } | {
1274
+ [x: string]: any;
1275
+ type: string;
1276
+ id?: string | undefined;
1277
+ }[] | undefined;
1278
+ credentialSchema?: {
1279
+ [x: string]: any;
1280
+ id: string;
1281
+ type: string;
1282
+ } | {
1283
+ [x: string]: any;
1284
+ id: string;
1285
+ type: string;
1286
+ }[] | undefined;
1287
+ issuanceDate?: string | undefined;
1288
+ expirationDate?: string | undefined;
1289
+ credentialStatus?: {
1290
+ [x: string]: any;
1291
+ type: string;
1292
+ id?: string | undefined;
1293
+ } | {
1294
+ [x: string]: any;
1295
+ type: string;
1296
+ id?: string | undefined;
1297
+ }[] | undefined;
1298
+ name?: string | undefined;
1299
+ description?: string | undefined;
1300
+ validFrom?: string | undefined;
1301
+ validUntil?: string | undefined;
1302
+ status?: {
1303
+ [x: string]: any;
1304
+ type: string;
1305
+ id?: string | undefined;
1306
+ } | {
1307
+ [x: string]: any;
1308
+ type: string;
1309
+ id?: string | undefined;
1310
+ }[] | undefined;
1311
+ termsOfUse?: {
1312
+ [x: string]: any;
1313
+ type: string;
1314
+ id?: string | undefined;
1315
+ } | {
1316
+ [x: string]: any;
1317
+ type: string;
1318
+ id?: string | undefined;
1319
+ }[] | undefined;
1320
+ evidence?: {
1321
+ [x: string]: any;
1322
+ type: string[];
1323
+ id?: string | undefined;
1324
+ name?: string | undefined;
1325
+ narrative?: string | undefined;
1326
+ description?: string | undefined;
1327
+ genre?: string | undefined;
1328
+ audience?: string | undefined;
1329
+ } | {
1330
+ [x: string]: any;
1331
+ type: string[];
1332
+ id?: string | undefined;
1333
+ name?: string | undefined;
1334
+ narrative?: string | undefined;
1335
+ description?: string | undefined;
1336
+ genre?: string | undefined;
1337
+ audience?: string | undefined;
1338
+ }[] | undefined;
1339
+ renderMethod?: Record<string, any> | {
1340
+ type: "TemplateRenderMethod";
1341
+ renderSuite: string;
1342
+ template: string;
1343
+ renderProperty?: string[] | undefined;
1344
+ outputPreference?: {
1345
+ mediaType: string;
1346
+ } | undefined;
1347
+ } | (Record<string, any> | {
1348
+ type: "TemplateRenderMethod";
1349
+ renderSuite: string;
1350
+ template: string;
1351
+ renderProperty?: string[] | undefined;
1352
+ outputPreference?: {
1353
+ mediaType: string;
1354
+ } | undefined;
1355
+ })[] | undefined;
1356
+ }[];
1357
+ id?: string | undefined;
1358
+ holder?: string | undefined;
1359
+ }>;
1360
+ selection: z.ZodArray<z.ZodObject<{
1361
+ credentialIndex: z.ZodNumber;
1362
+ }, z.core.$strict>>;
1363
+ endorsements: z.ZodDefault<z.ZodArray<z.ZodObject<{
1364
+ credentialIndex: z.ZodNumber;
1365
+ targetCredentialIndex: z.ZodNumber;
1366
+ }, z.core.$strict>>>;
1367
+ }, z.core.$strict>;
1368
+ export type SharePayload = z.infer<typeof SharePayloadValidatorShape>;
1369
+ /** Ordered selected source reference. Source URIs live only in owner recovery. */
1370
+ export declare const ShareRecoverySelectionValidator: z.ZodObject<{
1371
+ ref: z.ZodString;
1372
+ order: z.ZodNumber;
1373
+ }, z.core.$strict>;
1374
+ export type ShareRecoverySelection = z.infer<typeof ShareRecoverySelectionValidator>;
1375
+ export declare const ShareRecoveryEndorsementValidator: z.ZodObject<{
1376
+ targetRef: z.ZodString;
1377
+ }, z.core.$strict>;
1378
+ export type ShareRecoveryEndorsement = z.infer<typeof ShareRecoveryEndorsementValidator>;
1379
+ export declare const ShareRecoveryPlaintextValidator: z.ZodObject<{
1380
+ protocol: z.ZodLiteral<"lc-share-recovery/v1">;
1381
+ shareId: z.ZodString;
1382
+ ownerProfileId: z.ZodString;
1383
+ createdAt: z.ZodISODateTime;
1384
+ latest: z.ZodObject<{
1385
+ contentVersion: z.ZodNumber;
1386
+ key: z.ZodString;
1387
+ }, z.core.$strict>;
1388
+ selection: z.ZodArray<z.ZodObject<{
1389
+ ref: z.ZodString;
1390
+ order: z.ZodNumber;
1391
+ }, z.core.$strict>>;
1392
+ endorsements: z.ZodDefault<z.ZodArray<z.ZodObject<{
1393
+ targetRef: z.ZodString;
1394
+ }, z.core.$strict>>>;
1395
+ }, z.core.$strict>;
1396
+ export type ShareRecoveryPlaintext = z.infer<typeof ShareRecoveryPlaintextValidator>;
1397
+ /**
1398
+ * Owner-encrypted recovery JWE. The cap applies to the *serialized envelope*
1399
+ * (UTF-8 of the JWE), not to the plaintext index — see Task A2 review item 7.
1400
+ */
1401
+ export declare const ShareOwnerRecoveryValidator: z.ZodObject<{
1402
+ protected: z.ZodString;
1403
+ iv: z.ZodString;
1404
+ ciphertext: z.ZodString;
1405
+ tag: z.ZodString;
1406
+ aad: z.ZodOptional<z.ZodString>;
1407
+ recipients: z.ZodOptional<z.ZodArray<z.ZodObject<{
1408
+ header: z.ZodObject<{
1409
+ alg: z.ZodString;
1410
+ iv: z.ZodString;
1411
+ tag: z.ZodString;
1412
+ epk: z.ZodOptional<z.ZodObject<{
1413
+ kty: z.ZodOptional<z.ZodString>;
1414
+ crv: z.ZodOptional<z.ZodString>;
1415
+ x: z.ZodOptional<z.ZodString>;
1416
+ y: z.ZodOptional<z.ZodOptional<z.ZodString>>;
1417
+ n: z.ZodOptional<z.ZodOptional<z.ZodString>>;
1418
+ d: z.ZodOptional<z.ZodOptional<z.ZodString>>;
1419
+ }, z.core.$strip>>;
1420
+ kid: z.ZodOptional<z.ZodString>;
1421
+ apv: z.ZodOptional<z.ZodString>;
1422
+ apu: z.ZodOptional<z.ZodString>;
1423
+ }, z.core.$strip>;
1424
+ encrypted_key: z.ZodString;
1425
+ }, z.core.$strip>>>;
1426
+ }, z.core.$strip>;
1427
+ export type ShareOwnerRecovery = z.infer<typeof ShareOwnerRecoveryValidator>;
1428
+ export declare const ShareLinkStatusValidator: z.ZodEnum<{
1429
+ active: "active";
1430
+ pending: "pending";
1431
+ stopped: "stopped";
1432
+ }>;
1433
+ export type ShareLinkStatus = z.infer<typeof ShareLinkStatusValidator>;
1434
+ export declare const ShareContentStateValidator: z.ZodEnum<{
1435
+ staging: "staging";
1436
+ finalized: "finalized";
1437
+ content_missing: "content_missing";
1438
+ }>;
1439
+ export type ShareContentState = z.infer<typeof ShareContentStateValidator>;
1440
+ /**
1441
+ * Owner-facing share metadata. Never returned to unauthenticated callers; the
1442
+ * public projection below omits age-policy and owner-private fields entirely.
1443
+ */
1444
+ export declare const ShareLinkValidator: z.ZodObject<{
1445
+ id: z.ZodString;
1446
+ title: z.ZodString;
1447
+ note: z.ZodOptional<z.ZodString>;
1448
+ selectedCount: z.ZodNumber;
1449
+ version: z.ZodNumber;
1450
+ contentVersion: z.ZodNumber;
1451
+ status: z.ZodEnum<{
1452
+ active: "active";
1453
+ pending: "pending";
1454
+ stopped: "stopped";
1455
+ }>;
1456
+ contentState: z.ZodEnum<{
1457
+ staging: "staging";
1458
+ finalized: "finalized";
1459
+ content_missing: "content_missing";
1460
+ }>;
1461
+ createdAt: z.ZodISODateTime;
1462
+ updatedAt: z.ZodISODateTime;
1463
+ expiresAt: z.ZodNullable<z.ZodISODateTime>;
1464
+ stoppedAt: z.ZodNullable<z.ZodISODateTime>;
1465
+ lastViewedAt: z.ZodNullable<z.ZodISODateTime>;
1466
+ viewCount: z.ZodOptional<z.ZodNumber>;
1467
+ passcodeProtected: z.ZodBoolean;
1468
+ notifyOnView: z.ZodBoolean;
1469
+ minorPolicy: z.ZodObject<{
1470
+ isMinor: z.ZodNullable<z.ZodBoolean>;
1471
+ policyResolved: z.ZodBoolean;
1472
+ defaultExpiryDays: z.ZodUnion<readonly [z.ZodLiteral<30>, z.ZodLiteral<365>]>;
1473
+ viewCountingEnabled: z.ZodBoolean;
1474
+ }, z.core.$strip>;
1475
+ contentUrl: z.ZodOptional<z.ZodString>;
1476
+ }, z.core.$strip>;
1477
+ export type ShareLink = z.infer<typeof ShareLinkValidator>;
1478
+ export declare const CreateShareLinkInputValidator: z.ZodObject<{
1479
+ id: z.ZodString;
1480
+ clientRequestId: z.ZodString;
1481
+ title: z.ZodString;
1482
+ note: z.ZodOptional<z.ZodString>;
1483
+ expiresAt: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
1484
+ passcode: z.ZodOptional<z.ZodString>;
1485
+ notifyOnView: z.ZodDefault<z.ZodBoolean>;
1486
+ selectedCount: z.ZodNumber;
1487
+ contentVersion: z.ZodLiteral<1>;
1488
+ envelope: z.ZodObject<{
1489
+ v: z.ZodLiteral<1>;
1490
+ alg: z.ZodLiteral<"A256GCM">;
1491
+ iv: z.ZodString;
1492
+ ct: z.ZodString;
1493
+ }, z.core.$strict>;
1494
+ ownerEncryptedRecovery: z.ZodObject<{
1495
+ protected: z.ZodString;
1496
+ iv: z.ZodString;
1497
+ ciphertext: z.ZodString;
1498
+ tag: z.ZodString;
1499
+ aad: z.ZodOptional<z.ZodString>;
1500
+ recipients: z.ZodOptional<z.ZodArray<z.ZodObject<{
1501
+ header: z.ZodObject<{
1502
+ alg: z.ZodString;
1503
+ iv: z.ZodString;
1504
+ tag: z.ZodString;
1505
+ epk: z.ZodOptional<z.ZodObject<{
1506
+ kty: z.ZodOptional<z.ZodString>;
1507
+ crv: z.ZodOptional<z.ZodString>;
1508
+ x: z.ZodOptional<z.ZodString>;
1509
+ y: z.ZodOptional<z.ZodOptional<z.ZodString>>;
1510
+ n: z.ZodOptional<z.ZodOptional<z.ZodString>>;
1511
+ d: z.ZodOptional<z.ZodOptional<z.ZodString>>;
1512
+ }, z.core.$strip>>;
1513
+ kid: z.ZodOptional<z.ZodString>;
1514
+ apv: z.ZodOptional<z.ZodString>;
1515
+ apu: z.ZodOptional<z.ZodString>;
1516
+ }, z.core.$strip>;
1517
+ encrypted_key: z.ZodString;
1518
+ }, z.core.$strip>>>;
1519
+ }, z.core.$strip>;
1520
+ }, z.core.$strict>;
1521
+ export type CreateShareLinkInput = z.infer<typeof CreateShareLinkInputValidator>;
1522
+ /**
1523
+ * Dependent fields: a content replacement supplies `contentVersion`,
1524
+ * `selectedCount`, `envelope` and `ownerEncryptedRecovery` together, or none of
1525
+ * them. A metadata-only update must not touch content.
1526
+ */
1527
+ export declare const UpdateShareLinkInputValidator: z.ZodObject<{
1528
+ id: z.ZodString;
1529
+ expectedVersion: z.ZodNumber;
1530
+ clientRequestId: z.ZodString;
1531
+ title: z.ZodOptional<z.ZodString>;
1532
+ note: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1533
+ expiresAt: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
1534
+ passcode: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1535
+ notifyOnView: z.ZodOptional<z.ZodBoolean>;
1536
+ contentVersion: z.ZodOptional<z.ZodNumber>;
1537
+ selectedCount: z.ZodOptional<z.ZodNumber>;
1538
+ envelope: z.ZodOptional<z.ZodObject<{
1539
+ v: z.ZodLiteral<1>;
1540
+ alg: z.ZodLiteral<"A256GCM">;
1541
+ iv: z.ZodString;
1542
+ ct: z.ZodString;
1543
+ }, z.core.$strict>>;
1544
+ ownerEncryptedRecovery: z.ZodOptional<z.ZodObject<{
1545
+ protected: z.ZodString;
1546
+ iv: z.ZodString;
1547
+ ciphertext: z.ZodString;
1548
+ tag: z.ZodString;
1549
+ aad: z.ZodOptional<z.ZodString>;
1550
+ recipients: z.ZodOptional<z.ZodArray<z.ZodObject<{
1551
+ header: z.ZodObject<{
1552
+ alg: z.ZodString;
1553
+ iv: z.ZodString;
1554
+ tag: z.ZodString;
1555
+ epk: z.ZodOptional<z.ZodObject<{
1556
+ kty: z.ZodOptional<z.ZodString>;
1557
+ crv: z.ZodOptional<z.ZodString>;
1558
+ x: z.ZodOptional<z.ZodString>;
1559
+ y: z.ZodOptional<z.ZodOptional<z.ZodString>>;
1560
+ n: z.ZodOptional<z.ZodOptional<z.ZodString>>;
1561
+ d: z.ZodOptional<z.ZodOptional<z.ZodString>>;
1562
+ }, z.core.$strip>>;
1563
+ kid: z.ZodOptional<z.ZodString>;
1564
+ apv: z.ZodOptional<z.ZodString>;
1565
+ apu: z.ZodOptional<z.ZodString>;
1566
+ }, z.core.$strip>;
1567
+ encrypted_key: z.ZodString;
1568
+ }, z.core.$strip>>>;
1569
+ }, z.core.$strip>>;
1570
+ }, z.core.$strict>;
1571
+ export type UpdateShareLinkInput = z.infer<typeof UpdateShareLinkInputValidator>;
1572
+ export declare const ShareLinkIdInputValidator: z.ZodObject<{
1573
+ id: z.ZodString;
1574
+ }, z.core.$strict>;
1575
+ export type ShareLinkIdInput = z.infer<typeof ShareLinkIdInputValidator>;
1576
+ /**
1577
+ * Owner-scoped retry key. Only the opaque share id and the caller operation id
1578
+ * are accepted; the server re-derives every immutable binding (object ref,
1579
+ * generation, lease, hashes) from persisted Brain state under the owner's own
1580
+ * namespace. This is never a reservation descriptor.
1581
+ */
1582
+ export declare const ShareLinkOperationKeyInputValidator: z.ZodObject<{
1583
+ id: z.ZodString;
1584
+ operationId: z.ZodString;
1585
+ }, z.core.$strict>;
1586
+ export type ShareLinkOperationKeyInput = z.infer<typeof ShareLinkOperationKeyInputValidator>;
1587
+ /**
1588
+ * Sanitized owner mutation output. A pending result exposes only the retry key.
1589
+ *
1590
+ * `completed` means the request reached a recorded terminal outcome; the
1591
+ * authoritative share state (`share.status`, e.g. `stopped` after revoke) is
1592
+ * carried inside `share` and must never be overwritten by the outer tag.
1593
+ */
1594
+ export declare const ShareLinkOwnerCommitOutputValidator: z.ZodDiscriminatedUnion<[z.ZodObject<{
1595
+ status: z.ZodLiteral<"completed">;
1596
+ share: z.ZodObject<{
1597
+ id: z.ZodString;
1598
+ title: z.ZodString;
1599
+ note: z.ZodOptional<z.ZodString>;
1600
+ selectedCount: z.ZodNumber;
1601
+ version: z.ZodNumber;
1602
+ contentVersion: z.ZodNumber;
1603
+ status: z.ZodEnum<{
1604
+ active: "active";
1605
+ pending: "pending";
1606
+ stopped: "stopped";
1607
+ }>;
1608
+ contentState: z.ZodEnum<{
1609
+ staging: "staging";
1610
+ finalized: "finalized";
1611
+ content_missing: "content_missing";
1612
+ }>;
1613
+ createdAt: z.ZodISODateTime;
1614
+ updatedAt: z.ZodISODateTime;
1615
+ expiresAt: z.ZodNullable<z.ZodISODateTime>;
1616
+ stoppedAt: z.ZodNullable<z.ZodISODateTime>;
1617
+ lastViewedAt: z.ZodNullable<z.ZodISODateTime>;
1618
+ viewCount: z.ZodOptional<z.ZodNumber>;
1619
+ passcodeProtected: z.ZodBoolean;
1620
+ notifyOnView: z.ZodBoolean;
1621
+ minorPolicy: z.ZodObject<{
1622
+ isMinor: z.ZodNullable<z.ZodBoolean>;
1623
+ policyResolved: z.ZodBoolean;
1624
+ defaultExpiryDays: z.ZodUnion<readonly [z.ZodLiteral<30>, z.ZodLiteral<365>]>;
1625
+ viewCountingEnabled: z.ZodBoolean;
1626
+ }, z.core.$strip>;
1627
+ contentUrl: z.ZodOptional<z.ZodString>;
1628
+ }, z.core.$strip>;
1629
+ }, z.core.$strict>, z.ZodObject<{
1630
+ status: z.ZodLiteral<"pending">;
1631
+ id: z.ZodString;
1632
+ operationId: z.ZodString;
1633
+ }, z.core.$strict>], "status">;
1634
+ export type ShareLinkOwnerCommitOutput = z.infer<typeof ShareLinkOwnerCommitOutputValidator>;
1635
+ /**
1636
+ * Sanitized owner status output; never a raw coordinator record. `found` means a
1637
+ * share snapshot was returned and `share.status` is authoritative (active or
1638
+ * stopped); it does not itself assert the share is active.
1639
+ */
1640
+ export declare const ShareLinkOwnerStatusOutputValidator: z.ZodDiscriminatedUnion<[z.ZodObject<{
1641
+ status: z.ZodLiteral<"found">;
1642
+ share: z.ZodObject<{
1643
+ id: z.ZodString;
1644
+ title: z.ZodString;
1645
+ note: z.ZodOptional<z.ZodString>;
1646
+ selectedCount: z.ZodNumber;
1647
+ version: z.ZodNumber;
1648
+ contentVersion: z.ZodNumber;
1649
+ status: z.ZodEnum<{
1650
+ active: "active";
1651
+ pending: "pending";
1652
+ stopped: "stopped";
1653
+ }>;
1654
+ contentState: z.ZodEnum<{
1655
+ staging: "staging";
1656
+ finalized: "finalized";
1657
+ content_missing: "content_missing";
1658
+ }>;
1659
+ createdAt: z.ZodISODateTime;
1660
+ updatedAt: z.ZodISODateTime;
1661
+ expiresAt: z.ZodNullable<z.ZodISODateTime>;
1662
+ stoppedAt: z.ZodNullable<z.ZodISODateTime>;
1663
+ lastViewedAt: z.ZodNullable<z.ZodISODateTime>;
1664
+ viewCount: z.ZodOptional<z.ZodNumber>;
1665
+ passcodeProtected: z.ZodBoolean;
1666
+ notifyOnView: z.ZodBoolean;
1667
+ minorPolicy: z.ZodObject<{
1668
+ isMinor: z.ZodNullable<z.ZodBoolean>;
1669
+ policyResolved: z.ZodBoolean;
1670
+ defaultExpiryDays: z.ZodUnion<readonly [z.ZodLiteral<30>, z.ZodLiteral<365>]>;
1671
+ viewCountingEnabled: z.ZodBoolean;
1672
+ }, z.core.$strip>;
1673
+ contentUrl: z.ZodOptional<z.ZodString>;
1674
+ }, z.core.$strip>;
1675
+ }, z.core.$strict>, z.ZodObject<{
1676
+ status: z.ZodLiteral<"pending">;
1677
+ id: z.ZodString;
1678
+ operationId: z.ZodString;
1679
+ }, z.core.$strict>, z.ZodObject<{
1680
+ status: z.ZodLiteral<"not_found">;
1681
+ id: z.ZodString;
1682
+ }, z.core.$strict>], "status">;
1683
+ export type ShareLinkOwnerStatusOutput = z.infer<typeof ShareLinkOwnerStatusOutputValidator>;
1684
+ /** Owner-only recovery response: the owner-encrypted JWE and nothing else. */
1685
+ export declare const ShareLinkOwnerRecoveryOutputValidator: z.ZodObject<{
1686
+ recovery: z.ZodObject<{
1687
+ protected: z.ZodString;
1688
+ iv: z.ZodString;
1689
+ ciphertext: z.ZodString;
1690
+ tag: z.ZodString;
1691
+ aad: z.ZodOptional<z.ZodString>;
1692
+ recipients: z.ZodOptional<z.ZodArray<z.ZodObject<{
1693
+ header: z.ZodObject<{
1694
+ alg: z.ZodString;
1695
+ iv: z.ZodString;
1696
+ tag: z.ZodString;
1697
+ epk: z.ZodOptional<z.ZodObject<{
1698
+ kty: z.ZodOptional<z.ZodString>;
1699
+ crv: z.ZodOptional<z.ZodString>;
1700
+ x: z.ZodOptional<z.ZodString>;
1701
+ y: z.ZodOptional<z.ZodOptional<z.ZodString>>;
1702
+ n: z.ZodOptional<z.ZodOptional<z.ZodString>>;
1703
+ d: z.ZodOptional<z.ZodOptional<z.ZodString>>;
1704
+ }, z.core.$strip>>;
1705
+ kid: z.ZodOptional<z.ZodString>;
1706
+ apv: z.ZodOptional<z.ZodString>;
1707
+ apu: z.ZodOptional<z.ZodString>;
1708
+ }, z.core.$strip>;
1709
+ encrypted_key: z.ZodString;
1710
+ }, z.core.$strip>>>;
1711
+ }, z.core.$strip>;
1712
+ }, z.core.$strict>;
1713
+ export type ShareLinkOwnerRecoveryOutput = z.infer<typeof ShareLinkOwnerRecoveryOutputValidator>;
1714
+ /** Authenticated owner-only ciphertext response; never includes a view receipt or storage refs. */
1715
+ export declare const ShareLinkOwnerContentOutputValidator: z.ZodObject<{
1716
+ id: z.ZodString;
1717
+ contentVersion: z.ZodNumber;
1718
+ envelope: z.ZodObject<{
1719
+ v: z.ZodLiteral<1>;
1720
+ alg: z.ZodLiteral<"A256GCM">;
1721
+ iv: z.ZodString;
1722
+ ct: z.ZodString;
1723
+ }, z.core.$strict>;
1724
+ }, z.core.$strict>;
1725
+ export type ShareLinkOwnerContentOutput = z.infer<typeof ShareLinkOwnerContentOutputValidator>;
1726
+ export declare const ResolveShareLinkInputValidator: z.ZodObject<{
1727
+ id: z.ZodString;
1728
+ passcode: z.ZodOptional<z.ZodString>;
1729
+ }, z.core.$strict>;
1730
+ export type ResolveShareLinkInput = z.infer<typeof ResolveShareLinkInputValidator>;
1731
+ /** Public state. No `isMinor`, `policyResolved`, thresholds or count policy. */
1732
+ export declare const ShareLinkPublicStateValidator: z.ZodDiscriminatedUnion<[z.ZodObject<{
1733
+ state: z.ZodLiteral<"passcode_required">;
1734
+ id: z.ZodString;
1735
+ }, z.core.$strict>, z.ZodObject<{
1736
+ state: z.ZodLiteral<"try_later">;
1737
+ id: z.ZodString;
1738
+ }, z.core.$strict>, z.ZodObject<{
1739
+ state: z.ZodLiteral<"active">;
1740
+ id: z.ZodString;
1741
+ title: z.ZodString;
1742
+ note: z.ZodOptional<z.ZodString>;
1743
+ selectedCount: z.ZodNumber;
1744
+ contentVersion: z.ZodNumber;
1745
+ contentUrl: z.ZodString;
1746
+ sharer: z.ZodObject<{
1747
+ displayName: z.ZodString;
1748
+ avatar: z.ZodOptional<z.ZodString>;
1749
+ }, z.core.$strip>;
1750
+ createdAt: z.ZodISODateTime;
1751
+ updatedAt: z.ZodISODateTime;
1752
+ expiresAt: z.ZodNullable<z.ZodISODateTime>;
1753
+ }, z.core.$strict>, z.ZodObject<{
1754
+ state: z.ZodLiteral<"expired">;
1755
+ id: z.ZodString;
1756
+ expiresAt: z.ZodISODateTime;
1757
+ }, z.core.$strict>, z.ZodObject<{
1758
+ state: z.ZodLiteral<"stopped">;
1759
+ id: z.ZodString;
1760
+ stoppedAt: z.ZodISODateTime;
1761
+ }, z.core.$strict>, z.ZodObject<{
1762
+ state: z.ZodLiteral<"not_found">;
1763
+ id: z.ZodString;
1764
+ }, z.core.$strict>], "state">;
1765
+ export type ShareLinkPublicState = z.infer<typeof ShareLinkPublicStateValidator>;
1766
+ export declare const ListShareLinksInputValidator: z.ZodObject<{
1767
+ limit: z.ZodDefault<z.ZodNumber>;
1768
+ cursor: z.ZodOptional<z.ZodString>;
1769
+ }, z.core.$strict>;
1770
+ export type ListShareLinksInput = z.infer<typeof ListShareLinksInputValidator>;
1771
+ export declare const PaginatedShareLinksValidator: z.ZodObject<{
1772
+ cursor: z.ZodOptional<z.ZodString>;
1773
+ hasMore: z.ZodBoolean;
1774
+ records: z.ZodArray<z.ZodObject<{
1775
+ id: z.ZodString;
1776
+ title: z.ZodString;
1777
+ note: z.ZodOptional<z.ZodString>;
1778
+ selectedCount: z.ZodNumber;
1779
+ version: z.ZodNumber;
1780
+ contentVersion: z.ZodNumber;
1781
+ status: z.ZodEnum<{
1782
+ active: "active";
1783
+ pending: "pending";
1784
+ stopped: "stopped";
1785
+ }>;
1786
+ contentState: z.ZodEnum<{
1787
+ staging: "staging";
1788
+ finalized: "finalized";
1789
+ content_missing: "content_missing";
1790
+ }>;
1791
+ createdAt: z.ZodISODateTime;
1792
+ updatedAt: z.ZodISODateTime;
1793
+ expiresAt: z.ZodNullable<z.ZodISODateTime>;
1794
+ stoppedAt: z.ZodNullable<z.ZodISODateTime>;
1795
+ lastViewedAt: z.ZodNullable<z.ZodISODateTime>;
1796
+ viewCount: z.ZodOptional<z.ZodNumber>;
1797
+ passcodeProtected: z.ZodBoolean;
1798
+ notifyOnView: z.ZodBoolean;
1799
+ minorPolicy: z.ZodObject<{
1800
+ isMinor: z.ZodNullable<z.ZodBoolean>;
1801
+ policyResolved: z.ZodBoolean;
1802
+ defaultExpiryDays: z.ZodUnion<readonly [z.ZodLiteral<30>, z.ZodLiteral<365>]>;
1803
+ viewCountingEnabled: z.ZodBoolean;
1804
+ }, z.core.$strip>;
1805
+ contentUrl: z.ZodOptional<z.ZodString>;
1806
+ }, z.core.$strip>>;
1807
+ }, z.core.$strip>;
1808
+ export type PaginatedShareLinks = z.infer<typeof PaginatedShareLinksValidator>;
1809
+ export declare const AcknowledgeViewInputValidator: z.ZodObject<{
1810
+ receipt: z.ZodString;
1811
+ }, z.core.$strict>;
1812
+ export type AcknowledgeViewInput = z.infer<typeof AcknowledgeViewInputValidator>;
1813
+ /** Uniform response: never reveal eligibility or whether a receipt incremented a count. */
1814
+ export declare const AcknowledgeViewOutputValidator: z.ZodObject<{
1815
+ ok: z.ZodLiteral<true>;
1816
+ }, z.core.$strict>;
1817
+ export type AcknowledgeViewOutput = z.infer<typeof AcknowledgeViewOutputValidator>;
1818
+ /**
1819
+ * Fixed short TTL for a persisted view receipt. Acknowledgement binds the
1820
+ * receipt to one committed `(namespace, share, owner, contentVersion, object,
1821
+ * operation)` tuple; the node is pruned after this window (or once consumed).
1822
+ */
1823
+ export declare const SHARE_VIEW_RECEIPT_TTL_SECONDS: number;
1824
+ /**
1825
+ * Public content response. The envelope and `contentVersion` come from one
1826
+ * committed tuple; no object ref, hash, operation id, owner recovery, owner id
1827
+ * or policy field is ever returned. `receipt` is ALWAYS present with identical
1828
+ * shape/entropy whether or not the owner is eligible for counting: ineligible,
1829
+ * unknown, managed, minor or dependency-failure responses carry a CSPRNG
1830
+ * padding value that is never persisted, so the response is not an eligibility
1831
+ * oracle.
1832
+ */
1833
+ export declare const ShareLinkPublicContentViewValidator: z.ZodObject<{
1834
+ id: z.ZodString;
1835
+ contentVersion: z.ZodNumber;
1836
+ envelope: z.ZodObject<{
1837
+ v: z.ZodLiteral<1>;
1838
+ alg: z.ZodLiteral<"A256GCM">;
1839
+ iv: z.ZodString;
1840
+ ct: z.ZodString;
1841
+ }, z.core.$strict>;
1842
+ contentUrl: z.ZodString;
1843
+ receipt: z.ZodString;
1844
+ }, z.core.$strict>;
1845
+ export type ShareLinkPublicContentView = z.infer<typeof ShareLinkPublicContentViewValidator>;
1846
+ //# sourceMappingURL=share-links.d.ts.map