@kya-os/contracts 1.5.4-canary.3 → 1.6.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.
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * Related Spec: MCP-I Phase 0 Implementation Plan
8
8
  */
9
- import { z } from 'zod';
9
+ import { z } from "zod";
10
10
  /**
11
11
  * Consent Branding Schema
12
12
  */
@@ -37,14 +37,14 @@ export declare const consentTermsSchema: z.ZodObject<{
37
37
  required: z.ZodDefault<z.ZodBoolean>;
38
38
  }, "strip", z.ZodTypeAny, {
39
39
  required: boolean;
40
- text?: string | undefined;
41
- url?: string | undefined;
42
40
  version?: string | undefined;
43
- }, {
44
- text?: string | undefined;
45
41
  url?: string | undefined;
42
+ text?: string | undefined;
43
+ }, {
46
44
  version?: string | undefined;
45
+ url?: string | undefined;
47
46
  required?: boolean | undefined;
47
+ text?: string | undefined;
48
48
  }>;
49
49
  export type ConsentTerms = z.infer<typeof consentTermsSchema>;
50
50
  /**
@@ -82,9 +82,9 @@ export declare const consentCustomFieldSchema: z.ZodEffects<z.ZodObject<{
82
82
  pattern: z.ZodOptional<z.ZodString>;
83
83
  }, "strip", z.ZodTypeAny, {
84
84
  type: "text" | "textarea" | "checkbox" | "select";
85
+ name: string;
85
86
  required: boolean;
86
87
  label: string;
87
- name: string;
88
88
  options?: {
89
89
  value: string;
90
90
  label: string;
@@ -93,9 +93,9 @@ export declare const consentCustomFieldSchema: z.ZodEffects<z.ZodObject<{
93
93
  pattern?: string | undefined;
94
94
  }, {
95
95
  type: "text" | "textarea" | "checkbox" | "select";
96
+ name: string;
96
97
  required: boolean;
97
98
  label: string;
98
- name: string;
99
99
  options?: {
100
100
  value: string;
101
101
  label: string;
@@ -104,9 +104,9 @@ export declare const consentCustomFieldSchema: z.ZodEffects<z.ZodObject<{
104
104
  pattern?: string | undefined;
105
105
  }>, {
106
106
  type: "text" | "textarea" | "checkbox" | "select";
107
+ name: string;
107
108
  required: boolean;
108
109
  label: string;
109
- name: string;
110
110
  options?: {
111
111
  value: string;
112
112
  label: string;
@@ -115,9 +115,9 @@ export declare const consentCustomFieldSchema: z.ZodEffects<z.ZodObject<{
115
115
  pattern?: string | undefined;
116
116
  }, {
117
117
  type: "text" | "textarea" | "checkbox" | "select";
118
+ name: string;
118
119
  required: boolean;
119
120
  label: string;
120
- name: string;
121
121
  options?: {
122
122
  value: string;
123
123
  label: string;
@@ -151,13 +151,13 @@ export declare const oauthIdentitySchema: z.ZodObject<{
151
151
  */
152
152
  name: z.ZodOptional<z.ZodString>;
153
153
  }, "strip", z.ZodTypeAny, {
154
- provider: string;
155
154
  subject: string;
155
+ provider: string;
156
156
  name?: string | undefined;
157
157
  email?: string | undefined;
158
158
  }, {
159
- provider: string;
160
159
  subject: string;
160
+ provider: string;
161
161
  name?: string | undefined;
162
162
  email?: string | undefined;
163
163
  }>;
@@ -165,13 +165,14 @@ export type OAuthIdentity = z.infer<typeof oauthIdentitySchema>;
165
165
  /**
166
166
  * Consent Page Config Schema
167
167
  */
168
- export declare const consentPageConfigSchema: z.ZodObject<{
168
+ export declare const consentPageConfigSchema: z.ZodEffects<z.ZodObject<{
169
169
  tool: z.ZodString;
170
170
  toolDescription: z.ZodString;
171
171
  scopes: z.ZodArray<z.ZodString, "many">;
172
172
  agentDid: z.ZodString;
173
173
  sessionId: z.ZodString;
174
174
  projectId: z.ZodString;
175
+ provider: z.ZodOptional<z.ZodString>;
175
176
  branding: z.ZodOptional<z.ZodObject<{
176
177
  primaryColor: z.ZodOptional<z.ZodString>;
177
178
  logoUrl: z.ZodOptional<z.ZodString>;
@@ -195,14 +196,14 @@ export declare const consentPageConfigSchema: z.ZodObject<{
195
196
  required: z.ZodDefault<z.ZodBoolean>;
196
197
  }, "strip", z.ZodTypeAny, {
197
198
  required: boolean;
198
- text?: string | undefined;
199
- url?: string | undefined;
200
199
  version?: string | undefined;
201
- }, {
202
- text?: string | undefined;
203
200
  url?: string | undefined;
201
+ text?: string | undefined;
202
+ }, {
204
203
  version?: string | undefined;
204
+ url?: string | undefined;
205
205
  required?: boolean | undefined;
206
+ text?: string | undefined;
206
207
  }>>;
207
208
  customFields: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodObject<{
208
209
  name: z.ZodString;
@@ -223,9 +224,9 @@ export declare const consentPageConfigSchema: z.ZodObject<{
223
224
  pattern: z.ZodOptional<z.ZodString>;
224
225
  }, "strip", z.ZodTypeAny, {
225
226
  type: "text" | "textarea" | "checkbox" | "select";
227
+ name: string;
226
228
  required: boolean;
227
229
  label: string;
228
- name: string;
229
230
  options?: {
230
231
  value: string;
231
232
  label: string;
@@ -234,9 +235,9 @@ export declare const consentPageConfigSchema: z.ZodObject<{
234
235
  pattern?: string | undefined;
235
236
  }, {
236
237
  type: "text" | "textarea" | "checkbox" | "select";
238
+ name: string;
237
239
  required: boolean;
238
240
  label: string;
239
- name: string;
240
241
  options?: {
241
242
  value: string;
242
243
  label: string;
@@ -245,9 +246,9 @@ export declare const consentPageConfigSchema: z.ZodObject<{
245
246
  pattern?: string | undefined;
246
247
  }>, {
247
248
  type: "text" | "textarea" | "checkbox" | "select";
249
+ name: string;
248
250
  required: boolean;
249
251
  label: string;
250
- name: string;
251
252
  options?: {
252
253
  value: string;
253
254
  label: string;
@@ -256,9 +257,9 @@ export declare const consentPageConfigSchema: z.ZodObject<{
256
257
  pattern?: string | undefined;
257
258
  }, {
258
259
  type: "text" | "textarea" | "checkbox" | "select";
260
+ name: string;
259
261
  required: boolean;
260
262
  label: string;
261
- name: string;
262
263
  options?: {
263
264
  value: string;
264
265
  label: string;
@@ -268,14 +269,25 @@ export declare const consentPageConfigSchema: z.ZodObject<{
268
269
  }>, "many">>;
269
270
  serverUrl: z.ZodString;
270
271
  autoClose: z.ZodOptional<z.ZodBoolean>;
272
+ /**
273
+ * Whether OAuth authorization is required immediately
274
+ * If true, the consent page will act as a landing page before redirecting
275
+ */
276
+ oauthRequired: z.ZodOptional<z.ZodBoolean>;
277
+ /**
278
+ * The OAuth authorization URL to redirect to
279
+ * Required if oauthRequired is true
280
+ */
281
+ oauthUrl: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodLiteral<"">]>>;
271
282
  }, "strip", z.ZodTypeAny, {
272
- tool: string;
273
- toolDescription: string;
274
- scopes: string[];
275
283
  agentDid: string;
276
284
  sessionId: string;
285
+ tool: string;
286
+ scopes: string[];
277
287
  projectId: string;
288
+ toolDescription: string;
278
289
  serverUrl: string;
290
+ provider?: string | undefined;
279
291
  branding?: {
280
292
  primaryColor?: string | undefined;
281
293
  logoUrl?: string | undefined;
@@ -284,15 +296,15 @@ export declare const consentPageConfigSchema: z.ZodObject<{
284
296
  } | undefined;
285
297
  terms?: {
286
298
  required: boolean;
287
- text?: string | undefined;
288
- url?: string | undefined;
289
299
  version?: string | undefined;
300
+ url?: string | undefined;
301
+ text?: string | undefined;
290
302
  } | undefined;
291
303
  customFields?: {
292
304
  type: "text" | "textarea" | "checkbox" | "select";
305
+ name: string;
293
306
  required: boolean;
294
307
  label: string;
295
- name: string;
296
308
  options?: {
297
309
  value: string;
298
310
  label: string;
@@ -301,14 +313,53 @@ export declare const consentPageConfigSchema: z.ZodObject<{
301
313
  pattern?: string | undefined;
302
314
  }[] | undefined;
303
315
  autoClose?: boolean | undefined;
316
+ oauthRequired?: boolean | undefined;
317
+ oauthUrl?: string | undefined;
304
318
  }, {
319
+ agentDid: string;
320
+ sessionId: string;
305
321
  tool: string;
306
- toolDescription: string;
307
322
  scopes: string[];
323
+ projectId: string;
324
+ toolDescription: string;
325
+ serverUrl: string;
326
+ provider?: string | undefined;
327
+ branding?: {
328
+ primaryColor?: string | undefined;
329
+ logoUrl?: string | undefined;
330
+ companyName?: string | undefined;
331
+ theme?: "light" | "dark" | "auto" | undefined;
332
+ } | undefined;
333
+ terms?: {
334
+ version?: string | undefined;
335
+ url?: string | undefined;
336
+ required?: boolean | undefined;
337
+ text?: string | undefined;
338
+ } | undefined;
339
+ customFields?: {
340
+ type: "text" | "textarea" | "checkbox" | "select";
341
+ name: string;
342
+ required: boolean;
343
+ label: string;
344
+ options?: {
345
+ value: string;
346
+ label: string;
347
+ }[] | undefined;
348
+ placeholder?: string | undefined;
349
+ pattern?: string | undefined;
350
+ }[] | undefined;
351
+ autoClose?: boolean | undefined;
352
+ oauthRequired?: boolean | undefined;
353
+ oauthUrl?: string | undefined;
354
+ }>, {
308
355
  agentDid: string;
309
356
  sessionId: string;
357
+ tool: string;
358
+ scopes: string[];
310
359
  projectId: string;
360
+ toolDescription: string;
311
361
  serverUrl: string;
362
+ provider?: string | undefined;
312
363
  branding?: {
313
364
  primaryColor?: string | undefined;
314
365
  logoUrl?: string | undefined;
@@ -316,16 +367,52 @@ export declare const consentPageConfigSchema: z.ZodObject<{
316
367
  theme?: "light" | "dark" | "auto" | undefined;
317
368
  } | undefined;
318
369
  terms?: {
319
- text?: string | undefined;
370
+ required: boolean;
371
+ version?: string | undefined;
320
372
  url?: string | undefined;
373
+ text?: string | undefined;
374
+ } | undefined;
375
+ customFields?: {
376
+ type: "text" | "textarea" | "checkbox" | "select";
377
+ name: string;
378
+ required: boolean;
379
+ label: string;
380
+ options?: {
381
+ value: string;
382
+ label: string;
383
+ }[] | undefined;
384
+ placeholder?: string | undefined;
385
+ pattern?: string | undefined;
386
+ }[] | undefined;
387
+ autoClose?: boolean | undefined;
388
+ oauthRequired?: boolean | undefined;
389
+ oauthUrl?: string | undefined;
390
+ }, {
391
+ agentDid: string;
392
+ sessionId: string;
393
+ tool: string;
394
+ scopes: string[];
395
+ projectId: string;
396
+ toolDescription: string;
397
+ serverUrl: string;
398
+ provider?: string | undefined;
399
+ branding?: {
400
+ primaryColor?: string | undefined;
401
+ logoUrl?: string | undefined;
402
+ companyName?: string | undefined;
403
+ theme?: "light" | "dark" | "auto" | undefined;
404
+ } | undefined;
405
+ terms?: {
321
406
  version?: string | undefined;
407
+ url?: string | undefined;
322
408
  required?: boolean | undefined;
409
+ text?: string | undefined;
323
410
  } | undefined;
324
411
  customFields?: {
325
412
  type: "text" | "textarea" | "checkbox" | "select";
413
+ name: string;
326
414
  required: boolean;
327
415
  label: string;
328
- name: string;
329
416
  options?: {
330
417
  value: string;
331
418
  label: string;
@@ -334,6 +421,8 @@ export declare const consentPageConfigSchema: z.ZodObject<{
334
421
  pattern?: string | undefined;
335
422
  }[] | undefined;
336
423
  autoClose?: boolean | undefined;
424
+ oauthRequired?: boolean | undefined;
425
+ oauthUrl?: string | undefined;
337
426
  }>;
338
427
  export type ConsentPageConfig = z.infer<typeof consentPageConfigSchema>;
339
428
  /**
@@ -355,9 +444,11 @@ export declare const consentApprovalRequestSchema: z.ZodObject<{
355
444
  termsVersion: z.ZodOptional<z.ZodString>;
356
445
  customFields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodBoolean]>>>;
357
446
  /**
358
- * OAuth provider identity information (optional, can be null)
447
+ * OAuth provider identity information (optional)
359
448
  * Used to link OAuth accounts to persistent User DIDs
360
- * Can be null when OAuth is not configured or user hasn't authenticated
449
+ *
450
+ * CRITICAL: Uses .nullish() to accept null, undefined, or OAuthIdentity
451
+ * This matches JSON parsing behavior where missing fields become null
361
452
  */
362
453
  oauth_identity: z.ZodOptional<z.ZodNullable<z.ZodObject<{
363
454
  /**
@@ -378,13 +469,13 @@ export declare const consentApprovalRequestSchema: z.ZodObject<{
378
469
  */
379
470
  name: z.ZodOptional<z.ZodString>;
380
471
  }, "strip", z.ZodTypeAny, {
381
- provider: string;
382
472
  subject: string;
473
+ provider: string;
383
474
  name?: string | undefined;
384
475
  email?: string | undefined;
385
476
  }, {
386
- provider: string;
387
477
  subject: string;
478
+ provider: string;
388
479
  name?: string | undefined;
389
480
  email?: string | undefined;
390
481
  }>>>;
@@ -396,32 +487,32 @@ export declare const consentApprovalRequestSchema: z.ZodObject<{
396
487
  user_did: z.ZodOptional<z.ZodString>;
397
488
  }, "strip", z.ZodTypeAny, {
398
489
  tool: string;
490
+ session_id: string;
399
491
  scopes: string[];
400
492
  agent_did: string;
401
- session_id: string;
402
493
  project_id: string;
403
494
  termsAccepted: boolean;
404
495
  customFields?: Record<string, string | boolean> | undefined;
405
496
  termsVersion?: string | undefined;
406
497
  oauth_identity?: {
407
- provider: string;
408
498
  subject: string;
499
+ provider: string;
409
500
  name?: string | undefined;
410
501
  email?: string | undefined;
411
502
  } | null | undefined;
412
503
  user_did?: string | undefined;
413
504
  }, {
414
505
  tool: string;
506
+ session_id: string;
415
507
  scopes: string[];
416
508
  agent_did: string;
417
- session_id: string;
418
509
  project_id: string;
419
510
  termsAccepted: boolean;
420
511
  customFields?: Record<string, string | boolean> | undefined;
421
512
  termsVersion?: string | undefined;
422
513
  oauth_identity?: {
423
- provider: string;
424
514
  subject: string;
515
+ provider: string;
425
516
  name?: string | undefined;
426
517
  email?: string | undefined;
427
518
  } | null | undefined;
@@ -439,27 +530,27 @@ export declare const consentApprovalResponseSchema: z.ZodEffects<z.ZodObject<{
439
530
  error_code: z.ZodOptional<z.ZodString>;
440
531
  }, "strip", z.ZodTypeAny, {
441
532
  success: boolean;
533
+ error?: string | undefined;
442
534
  delegation_id?: string | undefined;
443
535
  delegation_token?: string | undefined;
444
- error?: string | undefined;
445
536
  error_code?: string | undefined;
446
537
  }, {
447
538
  success: boolean;
539
+ error?: string | undefined;
448
540
  delegation_id?: string | undefined;
449
541
  delegation_token?: string | undefined;
450
- error?: string | undefined;
451
542
  error_code?: string | undefined;
452
543
  }>, {
453
544
  success: boolean;
545
+ error?: string | undefined;
454
546
  delegation_id?: string | undefined;
455
547
  delegation_token?: string | undefined;
456
- error?: string | undefined;
457
548
  error_code?: string | undefined;
458
549
  }, {
459
550
  success: boolean;
551
+ error?: string | undefined;
460
552
  delegation_id?: string | undefined;
461
553
  delegation_token?: string | undefined;
462
- error?: string | undefined;
463
554
  error_code?: string | undefined;
464
555
  }>;
465
556
  export type ConsentApprovalResponse = z.infer<typeof consentApprovalResponseSchema>;
@@ -490,14 +581,14 @@ export declare const consentConfigSchema: z.ZodObject<{
490
581
  required: z.ZodDefault<z.ZodBoolean>;
491
582
  }, "strip", z.ZodTypeAny, {
492
583
  required: boolean;
493
- text?: string | undefined;
494
- url?: string | undefined;
495
584
  version?: string | undefined;
496
- }, {
497
- text?: string | undefined;
498
585
  url?: string | undefined;
586
+ text?: string | undefined;
587
+ }, {
499
588
  version?: string | undefined;
589
+ url?: string | undefined;
500
590
  required?: boolean | undefined;
591
+ text?: string | undefined;
501
592
  }>>;
502
593
  customFields: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodObject<{
503
594
  name: z.ZodString;
@@ -518,9 +609,9 @@ export declare const consentConfigSchema: z.ZodObject<{
518
609
  pattern: z.ZodOptional<z.ZodString>;
519
610
  }, "strip", z.ZodTypeAny, {
520
611
  type: "text" | "textarea" | "checkbox" | "select";
612
+ name: string;
521
613
  required: boolean;
522
614
  label: string;
523
- name: string;
524
615
  options?: {
525
616
  value: string;
526
617
  label: string;
@@ -529,9 +620,9 @@ export declare const consentConfigSchema: z.ZodObject<{
529
620
  pattern?: string | undefined;
530
621
  }, {
531
622
  type: "text" | "textarea" | "checkbox" | "select";
623
+ name: string;
532
624
  required: boolean;
533
625
  label: string;
534
- name: string;
535
626
  options?: {
536
627
  value: string;
537
628
  label: string;
@@ -540,9 +631,9 @@ export declare const consentConfigSchema: z.ZodObject<{
540
631
  pattern?: string | undefined;
541
632
  }>, {
542
633
  type: "text" | "textarea" | "checkbox" | "select";
634
+ name: string;
543
635
  required: boolean;
544
636
  label: string;
545
- name: string;
546
637
  options?: {
547
638
  value: string;
548
639
  label: string;
@@ -551,9 +642,9 @@ export declare const consentConfigSchema: z.ZodObject<{
551
642
  pattern?: string | undefined;
552
643
  }, {
553
644
  type: "text" | "textarea" | "checkbox" | "select";
645
+ name: string;
554
646
  required: boolean;
555
647
  label: string;
556
- name: string;
557
648
  options?: {
558
649
  value: string;
559
650
  label: string;
@@ -586,15 +677,15 @@ export declare const consentConfigSchema: z.ZodObject<{
586
677
  } | undefined;
587
678
  terms?: {
588
679
  required: boolean;
589
- text?: string | undefined;
590
- url?: string | undefined;
591
680
  version?: string | undefined;
681
+ url?: string | undefined;
682
+ text?: string | undefined;
592
683
  } | undefined;
593
684
  customFields?: {
594
685
  type: "text" | "textarea" | "checkbox" | "select";
686
+ name: string;
595
687
  required: boolean;
596
688
  label: string;
597
- name: string;
598
689
  options?: {
599
690
  value: string;
600
691
  label: string;
@@ -616,16 +707,16 @@ export declare const consentConfigSchema: z.ZodObject<{
616
707
  theme?: "light" | "dark" | "auto" | undefined;
617
708
  } | undefined;
618
709
  terms?: {
619
- text?: string | undefined;
620
- url?: string | undefined;
621
710
  version?: string | undefined;
711
+ url?: string | undefined;
622
712
  required?: boolean | undefined;
713
+ text?: string | undefined;
623
714
  } | undefined;
624
715
  customFields?: {
625
716
  type: "text" | "textarea" | "checkbox" | "select";
717
+ name: string;
626
718
  required: boolean;
627
719
  label: string;
628
- name: string;
629
720
  options?: {
630
721
  value: string;
631
722
  label: string;
@@ -651,13 +742,14 @@ export type ConsentConfig = z.infer<typeof consentConfigSchema>;
651
742
  * @returns Validation result
652
743
  */
653
744
  export declare function validateConsentPageConfig(config: unknown): z.SafeParseReturnType<{
654
- tool: string;
655
- toolDescription: string;
656
- scopes: string[];
657
745
  agentDid: string;
658
746
  sessionId: string;
747
+ tool: string;
748
+ scopes: string[];
659
749
  projectId: string;
750
+ toolDescription: string;
660
751
  serverUrl: string;
752
+ provider?: string | undefined;
661
753
  branding?: {
662
754
  primaryColor?: string | undefined;
663
755
  logoUrl?: string | undefined;
@@ -665,16 +757,16 @@ export declare function validateConsentPageConfig(config: unknown): z.SafeParseR
665
757
  theme?: "light" | "dark" | "auto" | undefined;
666
758
  } | undefined;
667
759
  terms?: {
668
- text?: string | undefined;
669
- url?: string | undefined;
670
760
  version?: string | undefined;
761
+ url?: string | undefined;
671
762
  required?: boolean | undefined;
763
+ text?: string | undefined;
672
764
  } | undefined;
673
765
  customFields?: {
674
766
  type: "text" | "textarea" | "checkbox" | "select";
767
+ name: string;
675
768
  required: boolean;
676
769
  label: string;
677
- name: string;
678
770
  options?: {
679
771
  value: string;
680
772
  label: string;
@@ -683,14 +775,17 @@ export declare function validateConsentPageConfig(config: unknown): z.SafeParseR
683
775
  pattern?: string | undefined;
684
776
  }[] | undefined;
685
777
  autoClose?: boolean | undefined;
778
+ oauthRequired?: boolean | undefined;
779
+ oauthUrl?: string | undefined;
686
780
  }, {
687
- tool: string;
688
- toolDescription: string;
689
- scopes: string[];
690
781
  agentDid: string;
691
782
  sessionId: string;
783
+ tool: string;
784
+ scopes: string[];
692
785
  projectId: string;
786
+ toolDescription: string;
693
787
  serverUrl: string;
788
+ provider?: string | undefined;
694
789
  branding?: {
695
790
  primaryColor?: string | undefined;
696
791
  logoUrl?: string | undefined;
@@ -699,15 +794,15 @@ export declare function validateConsentPageConfig(config: unknown): z.SafeParseR
699
794
  } | undefined;
700
795
  terms?: {
701
796
  required: boolean;
702
- text?: string | undefined;
703
- url?: string | undefined;
704
797
  version?: string | undefined;
798
+ url?: string | undefined;
799
+ text?: string | undefined;
705
800
  } | undefined;
706
801
  customFields?: {
707
802
  type: "text" | "textarea" | "checkbox" | "select";
803
+ name: string;
708
804
  required: boolean;
709
805
  label: string;
710
- name: string;
711
806
  options?: {
712
807
  value: string;
713
808
  label: string;
@@ -716,6 +811,8 @@ export declare function validateConsentPageConfig(config: unknown): z.SafeParseR
716
811
  pattern?: string | undefined;
717
812
  }[] | undefined;
718
813
  autoClose?: boolean | undefined;
814
+ oauthRequired?: boolean | undefined;
815
+ oauthUrl?: string | undefined;
719
816
  }>;
720
817
  /**
721
818
  * Validate a consent approval request
@@ -725,32 +822,32 @@ export declare function validateConsentPageConfig(config: unknown): z.SafeParseR
725
822
  */
726
823
  export declare function validateConsentApprovalRequest(request: unknown): z.SafeParseReturnType<{
727
824
  tool: string;
825
+ session_id: string;
728
826
  scopes: string[];
729
827
  agent_did: string;
730
- session_id: string;
731
828
  project_id: string;
732
829
  termsAccepted: boolean;
733
830
  customFields?: Record<string, string | boolean> | undefined;
734
831
  termsVersion?: string | undefined;
735
832
  oauth_identity?: {
736
- provider: string;
737
833
  subject: string;
834
+ provider: string;
738
835
  name?: string | undefined;
739
836
  email?: string | undefined;
740
837
  } | null | undefined;
741
838
  user_did?: string | undefined;
742
839
  }, {
743
840
  tool: string;
841
+ session_id: string;
744
842
  scopes: string[];
745
843
  agent_did: string;
746
- session_id: string;
747
844
  project_id: string;
748
845
  termsAccepted: boolean;
749
846
  customFields?: Record<string, string | boolean> | undefined;
750
847
  termsVersion?: string | undefined;
751
848
  oauth_identity?: {
752
- provider: string;
753
849
  subject: string;
850
+ provider: string;
754
851
  name?: string | undefined;
755
852
  email?: string | undefined;
756
853
  } | null | undefined;
@@ -764,15 +861,15 @@ export declare function validateConsentApprovalRequest(request: unknown): z.Safe
764
861
  */
765
862
  export declare function validateConsentApprovalResponse(response: unknown): z.SafeParseReturnType<{
766
863
  success: boolean;
864
+ error?: string | undefined;
767
865
  delegation_id?: string | undefined;
768
866
  delegation_token?: string | undefined;
769
- error?: string | undefined;
770
867
  error_code?: string | undefined;
771
868
  }, {
772
869
  success: boolean;
870
+ error?: string | undefined;
773
871
  delegation_id?: string | undefined;
774
872
  delegation_token?: string | undefined;
775
- error?: string | undefined;
776
873
  error_code?: string | undefined;
777
874
  }>;
778
875
  /**
@@ -789,16 +886,16 @@ export declare function validateConsentConfig(config: unknown): z.SafeParseRetur
789
886
  theme?: "light" | "dark" | "auto" | undefined;
790
887
  } | undefined;
791
888
  terms?: {
792
- text?: string | undefined;
793
- url?: string | undefined;
794
889
  version?: string | undefined;
890
+ url?: string | undefined;
795
891
  required?: boolean | undefined;
892
+ text?: string | undefined;
796
893
  } | undefined;
797
894
  customFields?: {
798
895
  type: "text" | "textarea" | "checkbox" | "select";
896
+ name: string;
799
897
  required: boolean;
800
898
  label: string;
801
- name: string;
802
899
  options?: {
803
900
  value: string;
804
901
  label: string;
@@ -821,15 +918,15 @@ export declare function validateConsentConfig(config: unknown): z.SafeParseRetur
821
918
  } | undefined;
822
919
  terms?: {
823
920
  required: boolean;
824
- text?: string | undefined;
825
- url?: string | undefined;
826
921
  version?: string | undefined;
922
+ url?: string | undefined;
923
+ text?: string | undefined;
827
924
  } | undefined;
828
925
  customFields?: {
829
926
  type: "text" | "textarea" | "checkbox" | "select";
927
+ name: string;
830
928
  required: boolean;
831
929
  label: string;
832
- name: string;
833
930
  options?: {
834
931
  value: string;
835
932
  label: string;