@kya-os/contracts 1.5.1 → 1.5.2-canary.1

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,738 @@
1
+ /**
2
+ * Consent Schemas
3
+ *
4
+ * Zod schemas for runtime validation of consent-related data structures.
5
+ * All types are derived from these schemas using z.infer.
6
+ *
7
+ * Related Spec: MCP-I Phase 0 Implementation Plan
8
+ */
9
+ import { z } from 'zod';
10
+ /**
11
+ * Consent Branding Schema
12
+ */
13
+ export declare const consentBrandingSchema: z.ZodObject<{
14
+ primaryColor: z.ZodOptional<z.ZodString>;
15
+ logoUrl: z.ZodOptional<z.ZodString>;
16
+ companyName: z.ZodOptional<z.ZodString>;
17
+ theme: z.ZodOptional<z.ZodEnum<["light", "dark", "auto"]>>;
18
+ }, "strip", z.ZodTypeAny, {
19
+ primaryColor?: string | undefined;
20
+ logoUrl?: string | undefined;
21
+ companyName?: string | undefined;
22
+ theme?: "light" | "dark" | "auto" | undefined;
23
+ }, {
24
+ primaryColor?: string | undefined;
25
+ logoUrl?: string | undefined;
26
+ companyName?: string | undefined;
27
+ theme?: "light" | "dark" | "auto" | undefined;
28
+ }>;
29
+ export type ConsentBranding = z.infer<typeof consentBrandingSchema>;
30
+ /**
31
+ * Consent Terms Schema
32
+ */
33
+ export declare const consentTermsSchema: z.ZodObject<{
34
+ text: z.ZodOptional<z.ZodString>;
35
+ url: z.ZodOptional<z.ZodString>;
36
+ version: z.ZodOptional<z.ZodString>;
37
+ required: z.ZodDefault<z.ZodBoolean>;
38
+ }, "strip", z.ZodTypeAny, {
39
+ required: boolean;
40
+ text?: string | undefined;
41
+ url?: string | undefined;
42
+ version?: string | undefined;
43
+ }, {
44
+ text?: string | undefined;
45
+ url?: string | undefined;
46
+ version?: string | undefined;
47
+ required?: boolean | undefined;
48
+ }>;
49
+ export type ConsentTerms = z.infer<typeof consentTermsSchema>;
50
+ /**
51
+ * Consent Custom Field Option Schema
52
+ */
53
+ export declare const consentCustomFieldOptionSchema: z.ZodObject<{
54
+ value: z.ZodString;
55
+ label: z.ZodString;
56
+ }, "strip", z.ZodTypeAny, {
57
+ value: string;
58
+ label: string;
59
+ }, {
60
+ value: string;
61
+ label: string;
62
+ }>;
63
+ /**
64
+ * Consent Custom Field Schema
65
+ */
66
+ export declare const consentCustomFieldSchema: z.ZodEffects<z.ZodObject<{
67
+ name: z.ZodString;
68
+ label: z.ZodString;
69
+ type: z.ZodEnum<["text", "textarea", "checkbox", "select"]>;
70
+ required: z.ZodBoolean;
71
+ placeholder: z.ZodOptional<z.ZodString>;
72
+ options: z.ZodOptional<z.ZodArray<z.ZodObject<{
73
+ value: z.ZodString;
74
+ label: z.ZodString;
75
+ }, "strip", z.ZodTypeAny, {
76
+ value: string;
77
+ label: string;
78
+ }, {
79
+ value: string;
80
+ label: string;
81
+ }>, "many">>;
82
+ pattern: z.ZodOptional<z.ZodString>;
83
+ }, "strip", z.ZodTypeAny, {
84
+ type: "text" | "textarea" | "checkbox" | "select";
85
+ required: boolean;
86
+ label: string;
87
+ name: string;
88
+ options?: {
89
+ value: string;
90
+ label: string;
91
+ }[] | undefined;
92
+ placeholder?: string | undefined;
93
+ pattern?: string | undefined;
94
+ }, {
95
+ type: "text" | "textarea" | "checkbox" | "select";
96
+ required: boolean;
97
+ label: string;
98
+ name: string;
99
+ options?: {
100
+ value: string;
101
+ label: string;
102
+ }[] | undefined;
103
+ placeholder?: string | undefined;
104
+ pattern?: string | undefined;
105
+ }>, {
106
+ type: "text" | "textarea" | "checkbox" | "select";
107
+ required: boolean;
108
+ label: string;
109
+ name: string;
110
+ options?: {
111
+ value: string;
112
+ label: string;
113
+ }[] | undefined;
114
+ placeholder?: string | undefined;
115
+ pattern?: string | undefined;
116
+ }, {
117
+ type: "text" | "textarea" | "checkbox" | "select";
118
+ required: boolean;
119
+ label: string;
120
+ name: string;
121
+ options?: {
122
+ value: string;
123
+ label: string;
124
+ }[] | undefined;
125
+ placeholder?: string | undefined;
126
+ pattern?: string | undefined;
127
+ }>;
128
+ export type ConsentCustomField = z.infer<typeof consentCustomFieldSchema>;
129
+ /**
130
+ * Consent Page Config Schema
131
+ */
132
+ export declare const consentPageConfigSchema: z.ZodObject<{
133
+ tool: z.ZodString;
134
+ toolDescription: z.ZodString;
135
+ scopes: z.ZodArray<z.ZodString, "many">;
136
+ agentDid: z.ZodString;
137
+ sessionId: z.ZodString;
138
+ projectId: z.ZodString;
139
+ branding: z.ZodOptional<z.ZodObject<{
140
+ primaryColor: z.ZodOptional<z.ZodString>;
141
+ logoUrl: z.ZodOptional<z.ZodString>;
142
+ companyName: z.ZodOptional<z.ZodString>;
143
+ theme: z.ZodOptional<z.ZodEnum<["light", "dark", "auto"]>>;
144
+ }, "strip", z.ZodTypeAny, {
145
+ primaryColor?: string | undefined;
146
+ logoUrl?: string | undefined;
147
+ companyName?: string | undefined;
148
+ theme?: "light" | "dark" | "auto" | undefined;
149
+ }, {
150
+ primaryColor?: string | undefined;
151
+ logoUrl?: string | undefined;
152
+ companyName?: string | undefined;
153
+ theme?: "light" | "dark" | "auto" | undefined;
154
+ }>>;
155
+ terms: z.ZodOptional<z.ZodObject<{
156
+ text: z.ZodOptional<z.ZodString>;
157
+ url: z.ZodOptional<z.ZodString>;
158
+ version: z.ZodOptional<z.ZodString>;
159
+ required: z.ZodDefault<z.ZodBoolean>;
160
+ }, "strip", z.ZodTypeAny, {
161
+ required: boolean;
162
+ text?: string | undefined;
163
+ url?: string | undefined;
164
+ version?: string | undefined;
165
+ }, {
166
+ text?: string | undefined;
167
+ url?: string | undefined;
168
+ version?: string | undefined;
169
+ required?: boolean | undefined;
170
+ }>>;
171
+ customFields: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodObject<{
172
+ name: z.ZodString;
173
+ label: z.ZodString;
174
+ type: z.ZodEnum<["text", "textarea", "checkbox", "select"]>;
175
+ required: z.ZodBoolean;
176
+ placeholder: z.ZodOptional<z.ZodString>;
177
+ options: z.ZodOptional<z.ZodArray<z.ZodObject<{
178
+ value: z.ZodString;
179
+ label: z.ZodString;
180
+ }, "strip", z.ZodTypeAny, {
181
+ value: string;
182
+ label: string;
183
+ }, {
184
+ value: string;
185
+ label: string;
186
+ }>, "many">>;
187
+ pattern: z.ZodOptional<z.ZodString>;
188
+ }, "strip", z.ZodTypeAny, {
189
+ type: "text" | "textarea" | "checkbox" | "select";
190
+ required: boolean;
191
+ label: string;
192
+ name: string;
193
+ options?: {
194
+ value: string;
195
+ label: string;
196
+ }[] | undefined;
197
+ placeholder?: string | undefined;
198
+ pattern?: string | undefined;
199
+ }, {
200
+ type: "text" | "textarea" | "checkbox" | "select";
201
+ required: boolean;
202
+ label: string;
203
+ name: string;
204
+ options?: {
205
+ value: string;
206
+ label: string;
207
+ }[] | undefined;
208
+ placeholder?: string | undefined;
209
+ pattern?: string | undefined;
210
+ }>, {
211
+ type: "text" | "textarea" | "checkbox" | "select";
212
+ required: boolean;
213
+ label: string;
214
+ name: string;
215
+ options?: {
216
+ value: string;
217
+ label: string;
218
+ }[] | undefined;
219
+ placeholder?: string | undefined;
220
+ pattern?: string | undefined;
221
+ }, {
222
+ type: "text" | "textarea" | "checkbox" | "select";
223
+ required: boolean;
224
+ label: string;
225
+ name: string;
226
+ options?: {
227
+ value: string;
228
+ label: string;
229
+ }[] | undefined;
230
+ placeholder?: string | undefined;
231
+ pattern?: string | undefined;
232
+ }>, "many">>;
233
+ serverUrl: z.ZodString;
234
+ autoClose: z.ZodOptional<z.ZodBoolean>;
235
+ }, "strip", z.ZodTypeAny, {
236
+ tool: string;
237
+ toolDescription: string;
238
+ scopes: string[];
239
+ agentDid: string;
240
+ sessionId: string;
241
+ projectId: string;
242
+ serverUrl: string;
243
+ branding?: {
244
+ primaryColor?: string | undefined;
245
+ logoUrl?: string | undefined;
246
+ companyName?: string | undefined;
247
+ theme?: "light" | "dark" | "auto" | undefined;
248
+ } | undefined;
249
+ terms?: {
250
+ required: boolean;
251
+ text?: string | undefined;
252
+ url?: string | undefined;
253
+ version?: string | undefined;
254
+ } | undefined;
255
+ customFields?: {
256
+ type: "text" | "textarea" | "checkbox" | "select";
257
+ required: boolean;
258
+ label: string;
259
+ name: string;
260
+ options?: {
261
+ value: string;
262
+ label: string;
263
+ }[] | undefined;
264
+ placeholder?: string | undefined;
265
+ pattern?: string | undefined;
266
+ }[] | undefined;
267
+ autoClose?: boolean | undefined;
268
+ }, {
269
+ tool: string;
270
+ toolDescription: string;
271
+ scopes: string[];
272
+ agentDid: string;
273
+ sessionId: string;
274
+ projectId: string;
275
+ serverUrl: string;
276
+ branding?: {
277
+ primaryColor?: string | undefined;
278
+ logoUrl?: string | undefined;
279
+ companyName?: string | undefined;
280
+ theme?: "light" | "dark" | "auto" | undefined;
281
+ } | undefined;
282
+ terms?: {
283
+ text?: string | undefined;
284
+ url?: string | undefined;
285
+ version?: string | undefined;
286
+ required?: boolean | undefined;
287
+ } | undefined;
288
+ customFields?: {
289
+ type: "text" | "textarea" | "checkbox" | "select";
290
+ required: boolean;
291
+ label: string;
292
+ name: string;
293
+ options?: {
294
+ value: string;
295
+ label: string;
296
+ }[] | undefined;
297
+ placeholder?: string | undefined;
298
+ pattern?: string | undefined;
299
+ }[] | undefined;
300
+ autoClose?: boolean | undefined;
301
+ }>;
302
+ export type ConsentPageConfig = z.infer<typeof consentPageConfigSchema>;
303
+ /**
304
+ * Consent Approval Request Schema
305
+ *
306
+ * Note: Uses snake_case for API compatibility (agent_did, session_id, project_id)
307
+ */
308
+ export declare const consentApprovalRequestSchema: z.ZodObject<{
309
+ tool: z.ZodString;
310
+ scopes: z.ZodArray<z.ZodString, "many">;
311
+ agent_did: z.ZodString;
312
+ session_id: z.ZodString;
313
+ project_id: z.ZodString;
314
+ termsAccepted: z.ZodBoolean;
315
+ termsVersion: z.ZodOptional<z.ZodString>;
316
+ customFields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodBoolean]>>>;
317
+ }, "strip", z.ZodTypeAny, {
318
+ tool: string;
319
+ scopes: string[];
320
+ agent_did: string;
321
+ session_id: string;
322
+ project_id: string;
323
+ termsAccepted: boolean;
324
+ customFields?: Record<string, string | boolean> | undefined;
325
+ termsVersion?: string | undefined;
326
+ }, {
327
+ tool: string;
328
+ scopes: string[];
329
+ agent_did: string;
330
+ session_id: string;
331
+ project_id: string;
332
+ termsAccepted: boolean;
333
+ customFields?: Record<string, string | boolean> | undefined;
334
+ termsVersion?: string | undefined;
335
+ }>;
336
+ export type ConsentApprovalRequest = z.infer<typeof consentApprovalRequestSchema>;
337
+ /**
338
+ * Consent Approval Response Schema
339
+ */
340
+ export declare const consentApprovalResponseSchema: z.ZodEffects<z.ZodObject<{
341
+ success: z.ZodBoolean;
342
+ delegation_id: z.ZodOptional<z.ZodString>;
343
+ delegation_token: z.ZodOptional<z.ZodString>;
344
+ error: z.ZodOptional<z.ZodString>;
345
+ error_code: z.ZodOptional<z.ZodString>;
346
+ }, "strip", z.ZodTypeAny, {
347
+ success: boolean;
348
+ delegation_id?: string | undefined;
349
+ delegation_token?: string | undefined;
350
+ error?: string | undefined;
351
+ error_code?: string | undefined;
352
+ }, {
353
+ success: boolean;
354
+ delegation_id?: string | undefined;
355
+ delegation_token?: string | undefined;
356
+ error?: string | undefined;
357
+ error_code?: string | undefined;
358
+ }>, {
359
+ success: boolean;
360
+ delegation_id?: string | undefined;
361
+ delegation_token?: string | undefined;
362
+ error?: string | undefined;
363
+ error_code?: string | undefined;
364
+ }, {
365
+ success: boolean;
366
+ delegation_id?: string | undefined;
367
+ delegation_token?: string | undefined;
368
+ error?: string | undefined;
369
+ error_code?: string | undefined;
370
+ }>;
371
+ export type ConsentApprovalResponse = z.infer<typeof consentApprovalResponseSchema>;
372
+ /**
373
+ * Consent Config Schema
374
+ */
375
+ export declare const consentConfigSchema: z.ZodObject<{
376
+ branding: z.ZodOptional<z.ZodObject<{
377
+ primaryColor: z.ZodOptional<z.ZodString>;
378
+ logoUrl: z.ZodOptional<z.ZodString>;
379
+ companyName: z.ZodOptional<z.ZodString>;
380
+ theme: z.ZodOptional<z.ZodEnum<["light", "dark", "auto"]>>;
381
+ }, "strip", z.ZodTypeAny, {
382
+ primaryColor?: string | undefined;
383
+ logoUrl?: string | undefined;
384
+ companyName?: string | undefined;
385
+ theme?: "light" | "dark" | "auto" | undefined;
386
+ }, {
387
+ primaryColor?: string | undefined;
388
+ logoUrl?: string | undefined;
389
+ companyName?: string | undefined;
390
+ theme?: "light" | "dark" | "auto" | undefined;
391
+ }>>;
392
+ terms: z.ZodOptional<z.ZodObject<{
393
+ text: z.ZodOptional<z.ZodString>;
394
+ url: z.ZodOptional<z.ZodString>;
395
+ version: z.ZodOptional<z.ZodString>;
396
+ required: z.ZodDefault<z.ZodBoolean>;
397
+ }, "strip", z.ZodTypeAny, {
398
+ required: boolean;
399
+ text?: string | undefined;
400
+ url?: string | undefined;
401
+ version?: string | undefined;
402
+ }, {
403
+ text?: string | undefined;
404
+ url?: string | undefined;
405
+ version?: string | undefined;
406
+ required?: boolean | undefined;
407
+ }>>;
408
+ customFields: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodObject<{
409
+ name: z.ZodString;
410
+ label: z.ZodString;
411
+ type: z.ZodEnum<["text", "textarea", "checkbox", "select"]>;
412
+ required: z.ZodBoolean;
413
+ placeholder: z.ZodOptional<z.ZodString>;
414
+ options: z.ZodOptional<z.ZodArray<z.ZodObject<{
415
+ value: z.ZodString;
416
+ label: z.ZodString;
417
+ }, "strip", z.ZodTypeAny, {
418
+ value: string;
419
+ label: string;
420
+ }, {
421
+ value: string;
422
+ label: string;
423
+ }>, "many">>;
424
+ pattern: z.ZodOptional<z.ZodString>;
425
+ }, "strip", z.ZodTypeAny, {
426
+ type: "text" | "textarea" | "checkbox" | "select";
427
+ required: boolean;
428
+ label: string;
429
+ name: string;
430
+ options?: {
431
+ value: string;
432
+ label: string;
433
+ }[] | undefined;
434
+ placeholder?: string | undefined;
435
+ pattern?: string | undefined;
436
+ }, {
437
+ type: "text" | "textarea" | "checkbox" | "select";
438
+ required: boolean;
439
+ label: string;
440
+ name: string;
441
+ options?: {
442
+ value: string;
443
+ label: string;
444
+ }[] | undefined;
445
+ placeholder?: string | undefined;
446
+ pattern?: string | undefined;
447
+ }>, {
448
+ type: "text" | "textarea" | "checkbox" | "select";
449
+ required: boolean;
450
+ label: string;
451
+ name: string;
452
+ options?: {
453
+ value: string;
454
+ label: string;
455
+ }[] | undefined;
456
+ placeholder?: string | undefined;
457
+ pattern?: string | undefined;
458
+ }, {
459
+ type: "text" | "textarea" | "checkbox" | "select";
460
+ required: boolean;
461
+ label: string;
462
+ name: string;
463
+ options?: {
464
+ value: string;
465
+ label: string;
466
+ }[] | undefined;
467
+ placeholder?: string | undefined;
468
+ pattern?: string | undefined;
469
+ }>, "many">>;
470
+ ui: z.ZodOptional<z.ZodObject<{
471
+ theme: z.ZodOptional<z.ZodEnum<["light", "dark", "auto"]>>;
472
+ popupEnabled: z.ZodOptional<z.ZodBoolean>;
473
+ autoClose: z.ZodOptional<z.ZodBoolean>;
474
+ autoCloseDelay: z.ZodOptional<z.ZodNumber>;
475
+ }, "strip", z.ZodTypeAny, {
476
+ theme?: "light" | "dark" | "auto" | undefined;
477
+ autoClose?: boolean | undefined;
478
+ popupEnabled?: boolean | undefined;
479
+ autoCloseDelay?: number | undefined;
480
+ }, {
481
+ theme?: "light" | "dark" | "auto" | undefined;
482
+ autoClose?: boolean | undefined;
483
+ popupEnabled?: boolean | undefined;
484
+ autoCloseDelay?: number | undefined;
485
+ }>>;
486
+ }, "strip", z.ZodTypeAny, {
487
+ branding?: {
488
+ primaryColor?: string | undefined;
489
+ logoUrl?: string | undefined;
490
+ companyName?: string | undefined;
491
+ theme?: "light" | "dark" | "auto" | undefined;
492
+ } | undefined;
493
+ terms?: {
494
+ required: boolean;
495
+ text?: string | undefined;
496
+ url?: string | undefined;
497
+ version?: string | undefined;
498
+ } | undefined;
499
+ customFields?: {
500
+ type: "text" | "textarea" | "checkbox" | "select";
501
+ required: boolean;
502
+ label: string;
503
+ name: string;
504
+ options?: {
505
+ value: string;
506
+ label: string;
507
+ }[] | undefined;
508
+ placeholder?: string | undefined;
509
+ pattern?: string | undefined;
510
+ }[] | undefined;
511
+ ui?: {
512
+ theme?: "light" | "dark" | "auto" | undefined;
513
+ autoClose?: boolean | undefined;
514
+ popupEnabled?: boolean | undefined;
515
+ autoCloseDelay?: number | undefined;
516
+ } | undefined;
517
+ }, {
518
+ branding?: {
519
+ primaryColor?: string | undefined;
520
+ logoUrl?: string | undefined;
521
+ companyName?: string | undefined;
522
+ theme?: "light" | "dark" | "auto" | undefined;
523
+ } | undefined;
524
+ terms?: {
525
+ text?: string | undefined;
526
+ url?: string | undefined;
527
+ version?: string | undefined;
528
+ required?: boolean | undefined;
529
+ } | undefined;
530
+ customFields?: {
531
+ type: "text" | "textarea" | "checkbox" | "select";
532
+ required: boolean;
533
+ label: string;
534
+ name: string;
535
+ options?: {
536
+ value: string;
537
+ label: string;
538
+ }[] | undefined;
539
+ placeholder?: string | undefined;
540
+ pattern?: string | undefined;
541
+ }[] | undefined;
542
+ ui?: {
543
+ theme?: "light" | "dark" | "auto" | undefined;
544
+ autoClose?: boolean | undefined;
545
+ popupEnabled?: boolean | undefined;
546
+ autoCloseDelay?: number | undefined;
547
+ } | undefined;
548
+ }>;
549
+ export type ConsentConfig = z.infer<typeof consentConfigSchema>;
550
+ /**
551
+ * Validation Helpers
552
+ */
553
+ /**
554
+ * Validate a consent page config
555
+ *
556
+ * @param config - The config to validate
557
+ * @returns Validation result
558
+ */
559
+ export declare function validateConsentPageConfig(config: unknown): z.SafeParseReturnType<{
560
+ tool: string;
561
+ toolDescription: string;
562
+ scopes: string[];
563
+ agentDid: string;
564
+ sessionId: string;
565
+ projectId: string;
566
+ serverUrl: string;
567
+ branding?: {
568
+ primaryColor?: string | undefined;
569
+ logoUrl?: string | undefined;
570
+ companyName?: string | undefined;
571
+ theme?: "light" | "dark" | "auto" | undefined;
572
+ } | undefined;
573
+ terms?: {
574
+ text?: string | undefined;
575
+ url?: string | undefined;
576
+ version?: string | undefined;
577
+ required?: boolean | undefined;
578
+ } | undefined;
579
+ customFields?: {
580
+ type: "text" | "textarea" | "checkbox" | "select";
581
+ required: boolean;
582
+ label: string;
583
+ name: string;
584
+ options?: {
585
+ value: string;
586
+ label: string;
587
+ }[] | undefined;
588
+ placeholder?: string | undefined;
589
+ pattern?: string | undefined;
590
+ }[] | undefined;
591
+ autoClose?: boolean | undefined;
592
+ }, {
593
+ tool: string;
594
+ toolDescription: string;
595
+ scopes: string[];
596
+ agentDid: string;
597
+ sessionId: string;
598
+ projectId: string;
599
+ serverUrl: string;
600
+ branding?: {
601
+ primaryColor?: string | undefined;
602
+ logoUrl?: string | undefined;
603
+ companyName?: string | undefined;
604
+ theme?: "light" | "dark" | "auto" | undefined;
605
+ } | undefined;
606
+ terms?: {
607
+ required: boolean;
608
+ text?: string | undefined;
609
+ url?: string | undefined;
610
+ version?: string | undefined;
611
+ } | undefined;
612
+ customFields?: {
613
+ type: "text" | "textarea" | "checkbox" | "select";
614
+ required: boolean;
615
+ label: string;
616
+ name: string;
617
+ options?: {
618
+ value: string;
619
+ label: string;
620
+ }[] | undefined;
621
+ placeholder?: string | undefined;
622
+ pattern?: string | undefined;
623
+ }[] | undefined;
624
+ autoClose?: boolean | undefined;
625
+ }>;
626
+ /**
627
+ * Validate a consent approval request
628
+ *
629
+ * @param request - The request to validate
630
+ * @returns Validation result
631
+ */
632
+ export declare function validateConsentApprovalRequest(request: unknown): z.SafeParseReturnType<{
633
+ tool: string;
634
+ scopes: string[];
635
+ agent_did: string;
636
+ session_id: string;
637
+ project_id: string;
638
+ termsAccepted: boolean;
639
+ customFields?: Record<string, string | boolean> | undefined;
640
+ termsVersion?: string | undefined;
641
+ }, {
642
+ tool: string;
643
+ scopes: string[];
644
+ agent_did: string;
645
+ session_id: string;
646
+ project_id: string;
647
+ termsAccepted: boolean;
648
+ customFields?: Record<string, string | boolean> | undefined;
649
+ termsVersion?: string | undefined;
650
+ }>;
651
+ /**
652
+ * Validate a consent approval response
653
+ *
654
+ * @param response - The response to validate
655
+ * @returns Validation result
656
+ */
657
+ export declare function validateConsentApprovalResponse(response: unknown): z.SafeParseReturnType<{
658
+ success: boolean;
659
+ delegation_id?: string | undefined;
660
+ delegation_token?: string | undefined;
661
+ error?: string | undefined;
662
+ error_code?: string | undefined;
663
+ }, {
664
+ success: boolean;
665
+ delegation_id?: string | undefined;
666
+ delegation_token?: string | undefined;
667
+ error?: string | undefined;
668
+ error_code?: string | undefined;
669
+ }>;
670
+ /**
671
+ * Validate a consent config
672
+ *
673
+ * @param config - The config to validate
674
+ * @returns Validation result
675
+ */
676
+ export declare function validateConsentConfig(config: unknown): z.SafeParseReturnType<{
677
+ branding?: {
678
+ primaryColor?: string | undefined;
679
+ logoUrl?: string | undefined;
680
+ companyName?: string | undefined;
681
+ theme?: "light" | "dark" | "auto" | undefined;
682
+ } | undefined;
683
+ terms?: {
684
+ text?: string | undefined;
685
+ url?: string | undefined;
686
+ version?: string | undefined;
687
+ required?: boolean | undefined;
688
+ } | undefined;
689
+ customFields?: {
690
+ type: "text" | "textarea" | "checkbox" | "select";
691
+ required: boolean;
692
+ label: string;
693
+ name: string;
694
+ options?: {
695
+ value: string;
696
+ label: string;
697
+ }[] | undefined;
698
+ placeholder?: string | undefined;
699
+ pattern?: string | undefined;
700
+ }[] | undefined;
701
+ ui?: {
702
+ theme?: "light" | "dark" | "auto" | undefined;
703
+ autoClose?: boolean | undefined;
704
+ popupEnabled?: boolean | undefined;
705
+ autoCloseDelay?: number | undefined;
706
+ } | undefined;
707
+ }, {
708
+ branding?: {
709
+ primaryColor?: string | undefined;
710
+ logoUrl?: string | undefined;
711
+ companyName?: string | undefined;
712
+ theme?: "light" | "dark" | "auto" | undefined;
713
+ } | undefined;
714
+ terms?: {
715
+ required: boolean;
716
+ text?: string | undefined;
717
+ url?: string | undefined;
718
+ version?: string | undefined;
719
+ } | undefined;
720
+ customFields?: {
721
+ type: "text" | "textarea" | "checkbox" | "select";
722
+ required: boolean;
723
+ label: string;
724
+ name: string;
725
+ options?: {
726
+ value: string;
727
+ label: string;
728
+ }[] | undefined;
729
+ placeholder?: string | undefined;
730
+ pattern?: string | undefined;
731
+ }[] | undefined;
732
+ ui?: {
733
+ theme?: "light" | "dark" | "auto" | undefined;
734
+ autoClose?: boolean | undefined;
735
+ popupEnabled?: boolean | undefined;
736
+ autoCloseDelay?: number | undefined;
737
+ } | undefined;
738
+ }>;