@kya-os/contracts 1.5.2-canary.4 → 1.5.2-canary.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (97) hide show
  1. package/dist/agentshield-api/endpoints.d.ts +50 -0
  2. package/dist/agentshield-api/endpoints.js +46 -0
  3. package/dist/agentshield-api/index.d.ts +13 -0
  4. package/dist/agentshield-api/index.js +37 -0
  5. package/dist/agentshield-api/schemas.d.ts +6032 -0
  6. package/dist/agentshield-api/schemas.js +240 -0
  7. package/dist/agentshield-api/types.d.ts +231 -0
  8. package/dist/agentshield-api/types.js +26 -0
  9. package/dist/cli.d.ts +388 -0
  10. package/dist/cli.js +121 -0
  11. package/dist/config/base.d.ts +96 -0
  12. package/dist/config/base.js +11 -0
  13. package/dist/config/builder.d.ts +33 -0
  14. package/dist/config/builder.js +74 -0
  15. package/dist/config/delegation.d.ts +194 -0
  16. package/dist/config/delegation.js +10 -0
  17. package/dist/config/identity.d.ts +116 -0
  18. package/dist/config/identity.js +10 -0
  19. package/dist/config/index.d.ts +34 -0
  20. package/dist/config/index.js +14 -0
  21. package/dist/config/proofing.d.ts +120 -0
  22. package/dist/config/proofing.js +10 -0
  23. package/dist/config/tool-protection.d.ts +139 -0
  24. package/dist/config/tool-protection.js +10 -0
  25. package/dist/consent/index.d.ts +6 -0
  26. package/dist/consent/index.js +22 -0
  27. package/dist/consent/schemas.d.ts +738 -0
  28. package/dist/consent/schemas.js +186 -0
  29. package/dist/consent/types.d.ts +155 -0
  30. package/dist/consent/types.js +10 -0
  31. package/dist/dashboard-config/default-config.d.ts +49 -0
  32. package/dist/dashboard-config/default-config.js +240 -0
  33. package/dist/dashboard-config/index.d.ts +10 -0
  34. package/dist/dashboard-config/index.js +35 -0
  35. package/dist/dashboard-config/schemas.d.ts +5904 -0
  36. package/dist/dashboard-config/schemas.js +254 -0
  37. package/dist/dashboard-config/types.d.ts +337 -0
  38. package/dist/dashboard-config/types.js +10 -0
  39. package/dist/delegation/constraints.d.ts +1021 -0
  40. package/dist/delegation/constraints.js +218 -0
  41. package/dist/delegation/index.d.ts +7 -0
  42. package/dist/delegation/index.js +23 -0
  43. package/dist/delegation/schemas.d.ts +8457 -0
  44. package/dist/delegation/schemas.js +475 -0
  45. package/dist/did/index.d.ts +8 -0
  46. package/dist/did/index.js +24 -0
  47. package/dist/did/resolve-contract.d.ts +219 -0
  48. package/dist/did/resolve-contract.js +31 -0
  49. package/dist/did/schemas.d.ts +112 -0
  50. package/dist/did/schemas.js +172 -0
  51. package/dist/did/types.d.ts +163 -0
  52. package/dist/did/types.js +70 -0
  53. package/dist/env/constants.d.ts +57 -0
  54. package/dist/env/constants.js +59 -0
  55. package/dist/env/index.d.ts +4 -0
  56. package/dist/env/index.js +20 -0
  57. package/dist/handshake.d.ts +172 -0
  58. package/dist/handshake.js +60 -0
  59. package/dist/index.d.ts +25 -0
  60. package/dist/index.js +55 -0
  61. package/dist/proof/index.d.ts +9 -0
  62. package/dist/proof/index.js +38 -0
  63. package/dist/proof/proof-record.d.ts +837 -0
  64. package/dist/proof/proof-record.js +133 -0
  65. package/dist/proof/signing-spec.d.ts +146 -0
  66. package/dist/proof/signing-spec.js +122 -0
  67. package/dist/proof.d.ts +414 -0
  68. package/dist/proof.js +82 -0
  69. package/dist/registry.d.ts +342 -0
  70. package/dist/registry.js +118 -0
  71. package/dist/runtime/errors.d.ts +347 -0
  72. package/dist/runtime/errors.js +119 -0
  73. package/dist/runtime/headers.d.ts +83 -0
  74. package/dist/runtime/headers.js +81 -0
  75. package/dist/runtime/index.d.ts +5 -0
  76. package/dist/runtime/index.js +21 -0
  77. package/dist/test.d.ts +251 -0
  78. package/dist/test.js +119 -0
  79. package/dist/tlkrc/index.d.ts +4 -0
  80. package/dist/tlkrc/index.js +20 -0
  81. package/dist/tlkrc/rotation.d.ts +245 -0
  82. package/dist/tlkrc/rotation.js +126 -0
  83. package/dist/tool-protection/index.d.ts +227 -0
  84. package/dist/tool-protection/index.js +113 -0
  85. package/dist/utils/validation.d.ts +30 -0
  86. package/dist/utils/validation.js +69 -0
  87. package/dist/vc/index.d.ts +7 -0
  88. package/dist/vc/index.js +23 -0
  89. package/dist/vc/schemas.d.ts +2483 -0
  90. package/dist/vc/schemas.js +224 -0
  91. package/dist/vc/statuslist.d.ts +493 -0
  92. package/dist/vc/statuslist.js +132 -0
  93. package/dist/verifier.d.ts +205 -0
  94. package/dist/verifier.js +83 -0
  95. package/dist/well-known/index.d.ts +308 -0
  96. package/dist/well-known/index.js +134 -0
  97. package/package.json +1 -1
@@ -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
+ version?: string | undefined;
41
+ url?: string | undefined;
42
+ text?: string | undefined;
43
+ }, {
44
+ version?: string | undefined;
45
+ url?: string | undefined;
46
+ required?: boolean | undefined;
47
+ text?: string | 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
+ name: string;
86
+ required: boolean;
87
+ label: 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
+ name: string;
97
+ required: boolean;
98
+ label: 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
+ name: string;
108
+ required: boolean;
109
+ label: 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
+ name: string;
119
+ required: boolean;
120
+ label: 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
+ version?: string | undefined;
163
+ url?: string | undefined;
164
+ text?: string | undefined;
165
+ }, {
166
+ version?: string | undefined;
167
+ url?: string | undefined;
168
+ required?: boolean | undefined;
169
+ text?: string | 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
+ name: string;
191
+ required: boolean;
192
+ label: 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
+ name: string;
202
+ required: boolean;
203
+ label: 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
+ name: string;
213
+ required: boolean;
214
+ label: 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
+ name: string;
224
+ required: boolean;
225
+ label: 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
+ agentDid: string;
237
+ sessionId: string;
238
+ tool: string;
239
+ scopes: string[];
240
+ toolDescription: 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
+ version?: string | undefined;
252
+ url?: string | undefined;
253
+ text?: string | undefined;
254
+ } | undefined;
255
+ customFields?: {
256
+ type: "text" | "textarea" | "checkbox" | "select";
257
+ name: string;
258
+ required: boolean;
259
+ label: 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
+ agentDid: string;
270
+ sessionId: string;
271
+ tool: string;
272
+ scopes: string[];
273
+ toolDescription: 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
+ version?: string | undefined;
284
+ url?: string | undefined;
285
+ required?: boolean | undefined;
286
+ text?: string | undefined;
287
+ } | undefined;
288
+ customFields?: {
289
+ type: "text" | "textarea" | "checkbox" | "select";
290
+ name: string;
291
+ required: boolean;
292
+ label: 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
+ session_id: string;
320
+ scopes: string[];
321
+ agent_did: string;
322
+ project_id: string;
323
+ termsAccepted: boolean;
324
+ customFields?: Record<string, string | boolean> | undefined;
325
+ termsVersion?: string | undefined;
326
+ }, {
327
+ tool: string;
328
+ session_id: string;
329
+ scopes: string[];
330
+ agent_did: 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
+ error?: string | undefined;
349
+ delegation_id?: string | undefined;
350
+ delegation_token?: string | undefined;
351
+ error_code?: string | undefined;
352
+ }, {
353
+ success: boolean;
354
+ error?: string | undefined;
355
+ delegation_id?: string | undefined;
356
+ delegation_token?: string | undefined;
357
+ error_code?: string | undefined;
358
+ }>, {
359
+ success: boolean;
360
+ error?: string | undefined;
361
+ delegation_id?: string | undefined;
362
+ delegation_token?: string | undefined;
363
+ error_code?: string | undefined;
364
+ }, {
365
+ success: boolean;
366
+ error?: string | undefined;
367
+ delegation_id?: string | undefined;
368
+ delegation_token?: 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
+ version?: string | undefined;
400
+ url?: string | undefined;
401
+ text?: string | undefined;
402
+ }, {
403
+ version?: string | undefined;
404
+ url?: string | undefined;
405
+ required?: boolean | undefined;
406
+ text?: string | 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
+ name: string;
428
+ required: boolean;
429
+ label: 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
+ name: string;
439
+ required: boolean;
440
+ label: 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
+ name: string;
450
+ required: boolean;
451
+ label: 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
+ name: string;
461
+ required: boolean;
462
+ label: 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
+ version?: string | undefined;
496
+ url?: string | undefined;
497
+ text?: string | undefined;
498
+ } | undefined;
499
+ customFields?: {
500
+ type: "text" | "textarea" | "checkbox" | "select";
501
+ name: string;
502
+ required: boolean;
503
+ label: 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
+ version?: string | undefined;
526
+ url?: string | undefined;
527
+ required?: boolean | undefined;
528
+ text?: string | undefined;
529
+ } | undefined;
530
+ customFields?: {
531
+ type: "text" | "textarea" | "checkbox" | "select";
532
+ name: string;
533
+ required: boolean;
534
+ label: 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
+ agentDid: string;
561
+ sessionId: string;
562
+ tool: string;
563
+ scopes: string[];
564
+ toolDescription: 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
+ version?: string | undefined;
575
+ url?: string | undefined;
576
+ required?: boolean | undefined;
577
+ text?: string | undefined;
578
+ } | undefined;
579
+ customFields?: {
580
+ type: "text" | "textarea" | "checkbox" | "select";
581
+ name: string;
582
+ required: boolean;
583
+ label: 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
+ agentDid: string;
594
+ sessionId: string;
595
+ tool: string;
596
+ scopes: string[];
597
+ toolDescription: 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
+ version?: string | undefined;
609
+ url?: string | undefined;
610
+ text?: string | undefined;
611
+ } | undefined;
612
+ customFields?: {
613
+ type: "text" | "textarea" | "checkbox" | "select";
614
+ name: string;
615
+ required: boolean;
616
+ label: 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
+ session_id: string;
635
+ scopes: string[];
636
+ agent_did: string;
637
+ project_id: string;
638
+ termsAccepted: boolean;
639
+ customFields?: Record<string, string | boolean> | undefined;
640
+ termsVersion?: string | undefined;
641
+ }, {
642
+ tool: string;
643
+ session_id: string;
644
+ scopes: string[];
645
+ agent_did: 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
+ error?: string | undefined;
660
+ delegation_id?: string | undefined;
661
+ delegation_token?: string | undefined;
662
+ error_code?: string | undefined;
663
+ }, {
664
+ success: boolean;
665
+ error?: string | undefined;
666
+ delegation_id?: string | undefined;
667
+ delegation_token?: 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
+ version?: string | undefined;
685
+ url?: string | undefined;
686
+ required?: boolean | undefined;
687
+ text?: string | undefined;
688
+ } | undefined;
689
+ customFields?: {
690
+ type: "text" | "textarea" | "checkbox" | "select";
691
+ name: string;
692
+ required: boolean;
693
+ label: 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
+ version?: string | undefined;
717
+ url?: string | undefined;
718
+ text?: string | undefined;
719
+ } | undefined;
720
+ customFields?: {
721
+ type: "text" | "textarea" | "checkbox" | "select";
722
+ name: string;
723
+ required: boolean;
724
+ label: 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
+ }>;