@kya-os/contracts 1.6.0 → 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.
@@ -115,13 +115,19 @@ export interface OAuthProvider {
115
115
  * Configuration for OAuth providers fetched from AgentShield API.
116
116
  * Contains all available providers for a project.
117
117
  *
118
- * Note: API does NOT return a defaultProvider field (Phase 1 architecture).
119
- * Phase 1 uses configured provider as temporary fallback.
118
+ * The `configuredProvider` field indicates which provider (if any) has been
119
+ * explicitly configured in the AgentShield dashboard for this project.
120
120
  * Phase 2+ requires tools to explicitly specify oauthProvider.
121
121
  */
122
122
  export interface OAuthConfig {
123
123
  /** Map of provider names to provider configurations */
124
124
  providers: Record<string, OAuthProvider>;
125
+ /**
126
+ * The explicitly configured OAuth provider for this project.
127
+ * Null if no provider has been configured in AgentShield dashboard.
128
+ * Used by ProviderResolver as fallback when tool doesn't specify oauthProvider.
129
+ */
130
+ configuredProvider?: string | null;
125
131
  }
126
132
  /**
127
133
  * Zod schema for OAuthProvider validation
@@ -222,6 +228,7 @@ export declare const OAuthConfigSchema: z.ZodObject<{
222
228
  responseType?: string | undefined;
223
229
  grantType?: string | undefined;
224
230
  }>>;
231
+ configuredProvider: z.ZodOptional<z.ZodNullable<z.ZodString>>;
225
232
  }, "strip", z.ZodTypeAny, {
226
233
  providers: Record<string, {
227
234
  clientId: string;
@@ -239,6 +246,7 @@ export declare const OAuthConfigSchema: z.ZodObject<{
239
246
  customParams?: Record<string, string> | undefined;
240
247
  tokenEndpointAuthMethod?: "client_secret_post" | "client_secret_basic" | undefined;
241
248
  }>;
249
+ configuredProvider?: string | null | undefined;
242
250
  }, {
243
251
  providers: Record<string, {
244
252
  clientId: string;
@@ -256,6 +264,7 @@ export declare const OAuthConfigSchema: z.ZodObject<{
256
264
  responseType?: string | undefined;
257
265
  grantType?: string | undefined;
258
266
  }>;
267
+ configuredProvider?: string | null | undefined;
259
268
  }>;
260
269
  /**
261
270
  * IDP Tokens
@@ -35,4 +35,5 @@ exports.OAuthProviderSchema = zod_1.z.object({
35
35
  */
36
36
  exports.OAuthConfigSchema = zod_1.z.object({
37
37
  providers: zod_1.z.record(zod_1.z.string(), exports.OAuthProviderSchema),
38
+ configuredProvider: zod_1.z.string().nullable().optional(),
38
39
  });
@@ -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
  }>;
@@ -196,14 +196,14 @@ export declare const consentPageConfigSchema: z.ZodEffects<z.ZodObject<{
196
196
  required: z.ZodDefault<z.ZodBoolean>;
197
197
  }, "strip", z.ZodTypeAny, {
198
198
  required: boolean;
199
- text?: string | undefined;
200
- url?: string | undefined;
201
199
  version?: string | undefined;
202
- }, {
203
- text?: string | undefined;
204
200
  url?: string | undefined;
201
+ text?: string | undefined;
202
+ }, {
205
203
  version?: string | undefined;
204
+ url?: string | undefined;
206
205
  required?: boolean | undefined;
206
+ text?: string | undefined;
207
207
  }>>;
208
208
  customFields: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodObject<{
209
209
  name: z.ZodString;
@@ -224,9 +224,9 @@ export declare const consentPageConfigSchema: z.ZodEffects<z.ZodObject<{
224
224
  pattern: z.ZodOptional<z.ZodString>;
225
225
  }, "strip", z.ZodTypeAny, {
226
226
  type: "text" | "textarea" | "checkbox" | "select";
227
+ name: string;
227
228
  required: boolean;
228
229
  label: string;
229
- name: string;
230
230
  options?: {
231
231
  value: string;
232
232
  label: string;
@@ -235,9 +235,9 @@ export declare const consentPageConfigSchema: z.ZodEffects<z.ZodObject<{
235
235
  pattern?: string | undefined;
236
236
  }, {
237
237
  type: "text" | "textarea" | "checkbox" | "select";
238
+ name: string;
238
239
  required: boolean;
239
240
  label: string;
240
- name: string;
241
241
  options?: {
242
242
  value: string;
243
243
  label: string;
@@ -246,9 +246,9 @@ export declare const consentPageConfigSchema: z.ZodEffects<z.ZodObject<{
246
246
  pattern?: string | undefined;
247
247
  }>, {
248
248
  type: "text" | "textarea" | "checkbox" | "select";
249
+ name: string;
249
250
  required: boolean;
250
251
  label: string;
251
- name: string;
252
252
  options?: {
253
253
  value: string;
254
254
  label: string;
@@ -257,9 +257,9 @@ export declare const consentPageConfigSchema: z.ZodEffects<z.ZodObject<{
257
257
  pattern?: string | undefined;
258
258
  }, {
259
259
  type: "text" | "textarea" | "checkbox" | "select";
260
+ name: string;
260
261
  required: boolean;
261
262
  label: string;
262
- name: string;
263
263
  options?: {
264
264
  value: string;
265
265
  label: string;
@@ -280,12 +280,12 @@ export declare const consentPageConfigSchema: z.ZodEffects<z.ZodObject<{
280
280
  */
281
281
  oauthUrl: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodLiteral<"">]>>;
282
282
  }, "strip", z.ZodTypeAny, {
283
- tool: string;
284
- toolDescription: string;
285
- scopes: string[];
286
283
  agentDid: string;
287
284
  sessionId: string;
285
+ tool: string;
286
+ scopes: string[];
288
287
  projectId: string;
288
+ toolDescription: string;
289
289
  serverUrl: string;
290
290
  provider?: string | undefined;
291
291
  branding?: {
@@ -296,15 +296,15 @@ export declare const consentPageConfigSchema: z.ZodEffects<z.ZodObject<{
296
296
  } | undefined;
297
297
  terms?: {
298
298
  required: boolean;
299
- text?: string | undefined;
300
- url?: string | undefined;
301
299
  version?: string | undefined;
300
+ url?: string | undefined;
301
+ text?: string | undefined;
302
302
  } | undefined;
303
303
  customFields?: {
304
304
  type: "text" | "textarea" | "checkbox" | "select";
305
+ name: string;
305
306
  required: boolean;
306
307
  label: string;
307
- name: string;
308
308
  options?: {
309
309
  value: string;
310
310
  label: string;
@@ -316,12 +316,12 @@ export declare const consentPageConfigSchema: z.ZodEffects<z.ZodObject<{
316
316
  oauthRequired?: boolean | undefined;
317
317
  oauthUrl?: string | undefined;
318
318
  }, {
319
- tool: string;
320
- toolDescription: string;
321
- scopes: string[];
322
319
  agentDid: string;
323
320
  sessionId: string;
321
+ tool: string;
322
+ scopes: string[];
324
323
  projectId: string;
324
+ toolDescription: string;
325
325
  serverUrl: string;
326
326
  provider?: string | undefined;
327
327
  branding?: {
@@ -331,16 +331,16 @@ export declare const consentPageConfigSchema: z.ZodEffects<z.ZodObject<{
331
331
  theme?: "light" | "dark" | "auto" | undefined;
332
332
  } | undefined;
333
333
  terms?: {
334
- text?: string | undefined;
335
- url?: string | undefined;
336
334
  version?: string | undefined;
335
+ url?: string | undefined;
337
336
  required?: boolean | undefined;
337
+ text?: string | undefined;
338
338
  } | undefined;
339
339
  customFields?: {
340
340
  type: "text" | "textarea" | "checkbox" | "select";
341
+ name: string;
341
342
  required: boolean;
342
343
  label: string;
343
- name: string;
344
344
  options?: {
345
345
  value: string;
346
346
  label: string;
@@ -352,12 +352,12 @@ export declare const consentPageConfigSchema: z.ZodEffects<z.ZodObject<{
352
352
  oauthRequired?: boolean | undefined;
353
353
  oauthUrl?: string | undefined;
354
354
  }>, {
355
- tool: string;
356
- toolDescription: string;
357
- scopes: string[];
358
355
  agentDid: string;
359
356
  sessionId: string;
357
+ tool: string;
358
+ scopes: string[];
360
359
  projectId: string;
360
+ toolDescription: string;
361
361
  serverUrl: string;
362
362
  provider?: string | undefined;
363
363
  branding?: {
@@ -368,15 +368,15 @@ export declare const consentPageConfigSchema: z.ZodEffects<z.ZodObject<{
368
368
  } | undefined;
369
369
  terms?: {
370
370
  required: boolean;
371
- text?: string | undefined;
372
- url?: string | undefined;
373
371
  version?: string | undefined;
372
+ url?: string | undefined;
373
+ text?: string | undefined;
374
374
  } | undefined;
375
375
  customFields?: {
376
376
  type: "text" | "textarea" | "checkbox" | "select";
377
+ name: string;
377
378
  required: boolean;
378
379
  label: string;
379
- name: string;
380
380
  options?: {
381
381
  value: string;
382
382
  label: string;
@@ -388,12 +388,12 @@ export declare const consentPageConfigSchema: z.ZodEffects<z.ZodObject<{
388
388
  oauthRequired?: boolean | undefined;
389
389
  oauthUrl?: string | undefined;
390
390
  }, {
391
- tool: string;
392
- toolDescription: string;
393
- scopes: string[];
394
391
  agentDid: string;
395
392
  sessionId: string;
393
+ tool: string;
394
+ scopes: string[];
396
395
  projectId: string;
396
+ toolDescription: string;
397
397
  serverUrl: string;
398
398
  provider?: string | undefined;
399
399
  branding?: {
@@ -403,16 +403,16 @@ export declare const consentPageConfigSchema: z.ZodEffects<z.ZodObject<{
403
403
  theme?: "light" | "dark" | "auto" | undefined;
404
404
  } | undefined;
405
405
  terms?: {
406
- text?: string | undefined;
407
- url?: string | undefined;
408
406
  version?: string | undefined;
407
+ url?: string | undefined;
409
408
  required?: boolean | undefined;
409
+ text?: string | undefined;
410
410
  } | undefined;
411
411
  customFields?: {
412
412
  type: "text" | "textarea" | "checkbox" | "select";
413
+ name: string;
413
414
  required: boolean;
414
415
  label: string;
415
- name: string;
416
416
  options?: {
417
417
  value: string;
418
418
  label: string;
@@ -469,13 +469,13 @@ export declare const consentApprovalRequestSchema: z.ZodObject<{
469
469
  */
470
470
  name: z.ZodOptional<z.ZodString>;
471
471
  }, "strip", z.ZodTypeAny, {
472
- provider: string;
473
472
  subject: string;
473
+ provider: string;
474
474
  name?: string | undefined;
475
475
  email?: string | undefined;
476
476
  }, {
477
- provider: string;
478
477
  subject: string;
478
+ provider: string;
479
479
  name?: string | undefined;
480
480
  email?: string | undefined;
481
481
  }>>>;
@@ -487,32 +487,32 @@ export declare const consentApprovalRequestSchema: z.ZodObject<{
487
487
  user_did: z.ZodOptional<z.ZodString>;
488
488
  }, "strip", z.ZodTypeAny, {
489
489
  tool: string;
490
+ session_id: string;
490
491
  scopes: string[];
491
492
  agent_did: string;
492
- session_id: string;
493
493
  project_id: string;
494
494
  termsAccepted: boolean;
495
495
  customFields?: Record<string, string | boolean> | undefined;
496
496
  termsVersion?: string | undefined;
497
497
  oauth_identity?: {
498
- provider: string;
499
498
  subject: string;
499
+ provider: string;
500
500
  name?: string | undefined;
501
501
  email?: string | undefined;
502
502
  } | null | undefined;
503
503
  user_did?: string | undefined;
504
504
  }, {
505
505
  tool: string;
506
+ session_id: string;
506
507
  scopes: string[];
507
508
  agent_did: string;
508
- session_id: string;
509
509
  project_id: string;
510
510
  termsAccepted: boolean;
511
511
  customFields?: Record<string, string | boolean> | undefined;
512
512
  termsVersion?: string | undefined;
513
513
  oauth_identity?: {
514
- provider: string;
515
514
  subject: string;
515
+ provider: string;
516
516
  name?: string | undefined;
517
517
  email?: string | undefined;
518
518
  } | null | undefined;
@@ -530,27 +530,27 @@ export declare const consentApprovalResponseSchema: z.ZodEffects<z.ZodObject<{
530
530
  error_code: z.ZodOptional<z.ZodString>;
531
531
  }, "strip", z.ZodTypeAny, {
532
532
  success: boolean;
533
+ error?: string | undefined;
533
534
  delegation_id?: string | undefined;
534
535
  delegation_token?: string | undefined;
535
- error?: string | undefined;
536
536
  error_code?: string | undefined;
537
537
  }, {
538
538
  success: boolean;
539
+ error?: string | undefined;
539
540
  delegation_id?: string | undefined;
540
541
  delegation_token?: string | undefined;
541
- error?: string | undefined;
542
542
  error_code?: string | undefined;
543
543
  }>, {
544
544
  success: boolean;
545
+ error?: string | undefined;
545
546
  delegation_id?: string | undefined;
546
547
  delegation_token?: string | undefined;
547
- error?: string | undefined;
548
548
  error_code?: string | undefined;
549
549
  }, {
550
550
  success: boolean;
551
+ error?: string | undefined;
551
552
  delegation_id?: string | undefined;
552
553
  delegation_token?: string | undefined;
553
- error?: string | undefined;
554
554
  error_code?: string | undefined;
555
555
  }>;
556
556
  export type ConsentApprovalResponse = z.infer<typeof consentApprovalResponseSchema>;
@@ -581,14 +581,14 @@ export declare const consentConfigSchema: z.ZodObject<{
581
581
  required: z.ZodDefault<z.ZodBoolean>;
582
582
  }, "strip", z.ZodTypeAny, {
583
583
  required: boolean;
584
- text?: string | undefined;
585
- url?: string | undefined;
586
584
  version?: string | undefined;
587
- }, {
588
- text?: string | undefined;
589
585
  url?: string | undefined;
586
+ text?: string | undefined;
587
+ }, {
590
588
  version?: string | undefined;
589
+ url?: string | undefined;
591
590
  required?: boolean | undefined;
591
+ text?: string | undefined;
592
592
  }>>;
593
593
  customFields: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodObject<{
594
594
  name: z.ZodString;
@@ -609,9 +609,9 @@ export declare const consentConfigSchema: z.ZodObject<{
609
609
  pattern: z.ZodOptional<z.ZodString>;
610
610
  }, "strip", z.ZodTypeAny, {
611
611
  type: "text" | "textarea" | "checkbox" | "select";
612
+ name: string;
612
613
  required: boolean;
613
614
  label: string;
614
- name: string;
615
615
  options?: {
616
616
  value: string;
617
617
  label: string;
@@ -620,9 +620,9 @@ export declare const consentConfigSchema: z.ZodObject<{
620
620
  pattern?: string | undefined;
621
621
  }, {
622
622
  type: "text" | "textarea" | "checkbox" | "select";
623
+ name: string;
623
624
  required: boolean;
624
625
  label: string;
625
- name: string;
626
626
  options?: {
627
627
  value: string;
628
628
  label: string;
@@ -631,9 +631,9 @@ export declare const consentConfigSchema: z.ZodObject<{
631
631
  pattern?: string | undefined;
632
632
  }>, {
633
633
  type: "text" | "textarea" | "checkbox" | "select";
634
+ name: string;
634
635
  required: boolean;
635
636
  label: string;
636
- name: string;
637
637
  options?: {
638
638
  value: string;
639
639
  label: string;
@@ -642,9 +642,9 @@ export declare const consentConfigSchema: z.ZodObject<{
642
642
  pattern?: string | undefined;
643
643
  }, {
644
644
  type: "text" | "textarea" | "checkbox" | "select";
645
+ name: string;
645
646
  required: boolean;
646
647
  label: string;
647
- name: string;
648
648
  options?: {
649
649
  value: string;
650
650
  label: string;
@@ -677,15 +677,15 @@ export declare const consentConfigSchema: z.ZodObject<{
677
677
  } | undefined;
678
678
  terms?: {
679
679
  required: boolean;
680
- text?: string | undefined;
681
- url?: string | undefined;
682
680
  version?: string | undefined;
681
+ url?: string | undefined;
682
+ text?: string | undefined;
683
683
  } | undefined;
684
684
  customFields?: {
685
685
  type: "text" | "textarea" | "checkbox" | "select";
686
+ name: string;
686
687
  required: boolean;
687
688
  label: string;
688
- name: string;
689
689
  options?: {
690
690
  value: string;
691
691
  label: string;
@@ -707,16 +707,16 @@ export declare const consentConfigSchema: z.ZodObject<{
707
707
  theme?: "light" | "dark" | "auto" | undefined;
708
708
  } | undefined;
709
709
  terms?: {
710
- text?: string | undefined;
711
- url?: string | undefined;
712
710
  version?: string | undefined;
711
+ url?: string | undefined;
713
712
  required?: boolean | undefined;
713
+ text?: string | undefined;
714
714
  } | undefined;
715
715
  customFields?: {
716
716
  type: "text" | "textarea" | "checkbox" | "select";
717
+ name: string;
717
718
  required: boolean;
718
719
  label: string;
719
- name: string;
720
720
  options?: {
721
721
  value: string;
722
722
  label: string;
@@ -742,12 +742,12 @@ export type ConsentConfig = z.infer<typeof consentConfigSchema>;
742
742
  * @returns Validation result
743
743
  */
744
744
  export declare function validateConsentPageConfig(config: unknown): z.SafeParseReturnType<{
745
- tool: string;
746
- toolDescription: string;
747
- scopes: string[];
748
745
  agentDid: string;
749
746
  sessionId: string;
747
+ tool: string;
748
+ scopes: string[];
750
749
  projectId: string;
750
+ toolDescription: string;
751
751
  serverUrl: string;
752
752
  provider?: string | undefined;
753
753
  branding?: {
@@ -757,16 +757,16 @@ export declare function validateConsentPageConfig(config: unknown): z.SafeParseR
757
757
  theme?: "light" | "dark" | "auto" | undefined;
758
758
  } | undefined;
759
759
  terms?: {
760
- text?: string | undefined;
761
- url?: string | undefined;
762
760
  version?: string | undefined;
761
+ url?: string | undefined;
763
762
  required?: boolean | undefined;
763
+ text?: string | undefined;
764
764
  } | undefined;
765
765
  customFields?: {
766
766
  type: "text" | "textarea" | "checkbox" | "select";
767
+ name: string;
767
768
  required: boolean;
768
769
  label: string;
769
- name: string;
770
770
  options?: {
771
771
  value: string;
772
772
  label: string;
@@ -778,12 +778,12 @@ export declare function validateConsentPageConfig(config: unknown): z.SafeParseR
778
778
  oauthRequired?: boolean | undefined;
779
779
  oauthUrl?: string | undefined;
780
780
  }, {
781
- tool: string;
782
- toolDescription: string;
783
- scopes: string[];
784
781
  agentDid: string;
785
782
  sessionId: string;
783
+ tool: string;
784
+ scopes: string[];
786
785
  projectId: string;
786
+ toolDescription: string;
787
787
  serverUrl: string;
788
788
  provider?: string | undefined;
789
789
  branding?: {
@@ -794,15 +794,15 @@ export declare function validateConsentPageConfig(config: unknown): z.SafeParseR
794
794
  } | undefined;
795
795
  terms?: {
796
796
  required: boolean;
797
- text?: string | undefined;
798
- url?: string | undefined;
799
797
  version?: string | undefined;
798
+ url?: string | undefined;
799
+ text?: string | undefined;
800
800
  } | undefined;
801
801
  customFields?: {
802
802
  type: "text" | "textarea" | "checkbox" | "select";
803
+ name: string;
803
804
  required: boolean;
804
805
  label: string;
805
- name: string;
806
806
  options?: {
807
807
  value: string;
808
808
  label: string;
@@ -822,32 +822,32 @@ export declare function validateConsentPageConfig(config: unknown): z.SafeParseR
822
822
  */
823
823
  export declare function validateConsentApprovalRequest(request: unknown): z.SafeParseReturnType<{
824
824
  tool: string;
825
+ session_id: string;
825
826
  scopes: string[];
826
827
  agent_did: string;
827
- session_id: string;
828
828
  project_id: string;
829
829
  termsAccepted: boolean;
830
830
  customFields?: Record<string, string | boolean> | undefined;
831
831
  termsVersion?: string | undefined;
832
832
  oauth_identity?: {
833
- provider: string;
834
833
  subject: string;
834
+ provider: string;
835
835
  name?: string | undefined;
836
836
  email?: string | undefined;
837
837
  } | null | undefined;
838
838
  user_did?: string | undefined;
839
839
  }, {
840
840
  tool: string;
841
+ session_id: string;
841
842
  scopes: string[];
842
843
  agent_did: string;
843
- session_id: string;
844
844
  project_id: string;
845
845
  termsAccepted: boolean;
846
846
  customFields?: Record<string, string | boolean> | undefined;
847
847
  termsVersion?: string | undefined;
848
848
  oauth_identity?: {
849
- provider: string;
850
849
  subject: string;
850
+ provider: string;
851
851
  name?: string | undefined;
852
852
  email?: string | undefined;
853
853
  } | null | undefined;
@@ -861,15 +861,15 @@ export declare function validateConsentApprovalRequest(request: unknown): z.Safe
861
861
  */
862
862
  export declare function validateConsentApprovalResponse(response: unknown): z.SafeParseReturnType<{
863
863
  success: boolean;
864
+ error?: string | undefined;
864
865
  delegation_id?: string | undefined;
865
866
  delegation_token?: string | undefined;
866
- error?: string | undefined;
867
867
  error_code?: string | undefined;
868
868
  }, {
869
869
  success: boolean;
870
+ error?: string | undefined;
870
871
  delegation_id?: string | undefined;
871
872
  delegation_token?: string | undefined;
872
- error?: string | undefined;
873
873
  error_code?: string | undefined;
874
874
  }>;
875
875
  /**
@@ -886,16 +886,16 @@ export declare function validateConsentConfig(config: unknown): z.SafeParseRetur
886
886
  theme?: "light" | "dark" | "auto" | undefined;
887
887
  } | undefined;
888
888
  terms?: {
889
- text?: string | undefined;
890
- url?: string | undefined;
891
889
  version?: string | undefined;
890
+ url?: string | undefined;
892
891
  required?: boolean | undefined;
892
+ text?: string | undefined;
893
893
  } | undefined;
894
894
  customFields?: {
895
895
  type: "text" | "textarea" | "checkbox" | "select";
896
+ name: string;
896
897
  required: boolean;
897
898
  label: string;
898
- name: string;
899
899
  options?: {
900
900
  value: string;
901
901
  label: string;
@@ -918,15 +918,15 @@ export declare function validateConsentConfig(config: unknown): z.SafeParseRetur
918
918
  } | undefined;
919
919
  terms?: {
920
920
  required: boolean;
921
- text?: string | undefined;
922
- url?: string | undefined;
923
921
  version?: string | undefined;
922
+ url?: string | undefined;
923
+ text?: string | undefined;
924
924
  } | undefined;
925
925
  customFields?: {
926
926
  type: "text" | "textarea" | "checkbox" | "select";
927
+ name: string;
927
928
  required: boolean;
928
929
  label: string;
929
- name: string;
930
930
  options?: {
931
931
  value: string;
932
932
  label: string;