@uniformdev/mesh-edgehancer-sdk 20.31.1-alpha.1 → 20.31.1-alpha.185

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.
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- import * as zod from 'zod';
2
- import { z } from 'zod';
1
+ import * as _uniformdev_canvas from '@uniformdev/canvas';
3
2
  import { DataType, DataSource, DataSourceVariantsKeys, DataSourceVariantData } from '@uniformdev/canvas';
3
+ import * as z from 'zod';
4
4
 
5
5
  /**
6
6
  * The context we are fetching the data resource in:
@@ -32,12 +32,18 @@ declare const resolvingIssueSchema: z.ZodUnion<[z.ZodString, z.ZodObject<{
32
32
  declare const customEdgehancerDefinitionSchema: z.ZodObject<{
33
33
  preRequest: z.ZodOptional<z.ZodString>;
34
34
  request: z.ZodOptional<z.ZodString>;
35
+ createAIDataResourceEdit: z.ZodOptional<z.ZodString>;
36
+ afterAIDataResourceEdit: z.ZodOptional<z.ZodString>;
35
37
  }, "strip", z.ZodTypeAny, {
36
38
  preRequest?: string | undefined;
37
39
  request?: string | undefined;
40
+ createAIDataResourceEdit?: string | undefined;
41
+ afterAIDataResourceEdit?: string | undefined;
38
42
  }, {
39
43
  preRequest?: string | undefined;
40
44
  request?: string | undefined;
45
+ createAIDataResourceEdit?: string | undefined;
46
+ afterAIDataResourceEdit?: string | undefined;
41
47
  }>;
42
48
  declare const mergedDataTypeSchema: z.ZodObject<{
43
49
  id: z.ZodString;
@@ -52,12 +58,12 @@ declare const mergedDataTypeSchema: z.ZodObject<{
52
58
  value: z.ZodString;
53
59
  omitIfEmpty: z.ZodOptional<z.ZodBoolean>;
54
60
  }, "strip", z.ZodTypeAny, {
55
- key: string;
56
61
  value: string;
62
+ key: string;
57
63
  omitIfEmpty?: boolean | undefined;
58
64
  }, {
59
- key: string;
60
65
  value: string;
66
+ key: string;
61
67
  omitIfEmpty?: boolean | undefined;
62
68
  }>, "many">>;
63
69
  parameters: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -65,12 +71,12 @@ declare const mergedDataTypeSchema: z.ZodObject<{
65
71
  value: z.ZodString;
66
72
  omitIfEmpty: z.ZodOptional<z.ZodBoolean>;
67
73
  }, "strip", z.ZodTypeAny, {
68
- key: string;
69
74
  value: string;
75
+ key: string;
70
76
  omitIfEmpty?: boolean | undefined;
71
77
  }, {
72
- key: string;
73
78
  value: string;
79
+ key: string;
74
80
  omitIfEmpty?: boolean | undefined;
75
81
  }>, "many">>;
76
82
  body: z.ZodOptional<z.ZodString>;
@@ -105,12 +111,18 @@ declare const mergedDataTypeSchema: z.ZodObject<{
105
111
  edgehancer: z.ZodOptional<z.ZodObject<{
106
112
  preRequest: z.ZodOptional<z.ZodString>;
107
113
  request: z.ZodOptional<z.ZodString>;
114
+ createAIDataResourceEdit: z.ZodOptional<z.ZodString>;
115
+ afterAIDataResourceEdit: z.ZodOptional<z.ZodString>;
108
116
  }, "strip", z.ZodTypeAny, {
109
117
  preRequest?: string | undefined;
110
118
  request?: string | undefined;
119
+ createAIDataResourceEdit?: string | undefined;
120
+ afterAIDataResourceEdit?: string | undefined;
111
121
  }, {
112
122
  preRequest?: string | undefined;
113
123
  request?: string | undefined;
124
+ createAIDataResourceEdit?: string | undefined;
125
+ afterAIDataResourceEdit?: string | undefined;
114
126
  }>>;
115
127
  uiBadgeText: z.ZodOptional<z.ZodString>;
116
128
  variants: z.ZodOptional<z.ZodObject<{
@@ -120,12 +132,12 @@ declare const mergedDataTypeSchema: z.ZodObject<{
120
132
  value: z.ZodString;
121
133
  omitIfEmpty: z.ZodOptional<z.ZodBoolean>;
122
134
  }, "strip", z.ZodTypeAny, {
123
- key: string;
124
135
  value: string;
136
+ key: string;
125
137
  omitIfEmpty?: boolean | undefined;
126
138
  }, {
127
- key: string;
128
139
  value: string;
140
+ key: string;
129
141
  omitIfEmpty?: boolean | undefined;
130
142
  }>, "many">>;
131
143
  parameters: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -133,12 +145,12 @@ declare const mergedDataTypeSchema: z.ZodObject<{
133
145
  value: z.ZodString;
134
146
  omitIfEmpty: z.ZodOptional<z.ZodBoolean>;
135
147
  }, "strip", z.ZodTypeAny, {
136
- key: string;
137
148
  value: string;
149
+ key: string;
138
150
  omitIfEmpty?: boolean | undefined;
139
151
  }, {
140
- key: string;
141
152
  value: string;
153
+ key: string;
142
154
  omitIfEmpty?: boolean | undefined;
143
155
  }>, "many">>;
144
156
  variables: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
@@ -165,13 +177,13 @@ declare const mergedDataTypeSchema: z.ZodObject<{
165
177
  }>>>;
166
178
  }, "strip", z.ZodTypeAny, {
167
179
  headers?: {
168
- key: string;
169
180
  value: string;
181
+ key: string;
170
182
  omitIfEmpty?: boolean | undefined;
171
183
  }[] | undefined;
172
184
  parameters?: {
173
- key: string;
174
185
  value: string;
186
+ key: string;
175
187
  omitIfEmpty?: boolean | undefined;
176
188
  }[] | undefined;
177
189
  variables?: Record<string, {
@@ -184,13 +196,13 @@ declare const mergedDataTypeSchema: z.ZodObject<{
184
196
  }> | undefined;
185
197
  }, {
186
198
  headers?: {
187
- key: string;
188
199
  value: string;
200
+ key: string;
189
201
  omitIfEmpty?: boolean | undefined;
190
202
  }[] | undefined;
191
203
  parameters?: {
192
- key: string;
193
204
  value: string;
205
+ key: string;
194
206
  omitIfEmpty?: boolean | undefined;
195
207
  }[] | undefined;
196
208
  variables?: Record<string, {
@@ -211,13 +223,13 @@ declare const mergedDataTypeSchema: z.ZodObject<{
211
223
  }, "strip", z.ZodTypeAny, {
212
224
  unpublished?: ({
213
225
  headers?: {
214
- key: string;
215
226
  value: string;
227
+ key: string;
216
228
  omitIfEmpty?: boolean | undefined;
217
229
  }[] | undefined;
218
230
  parameters?: {
219
- key: string;
220
231
  value: string;
232
+ key: string;
221
233
  omitIfEmpty?: boolean | undefined;
222
234
  }[] | undefined;
223
235
  variables?: Record<string, {
@@ -234,13 +246,13 @@ declare const mergedDataTypeSchema: z.ZodObject<{
234
246
  }, {
235
247
  unpublished?: ({
236
248
  headers?: {
237
- key: string;
238
249
  value: string;
250
+ key: string;
239
251
  omitIfEmpty?: boolean | undefined;
240
252
  }[] | undefined;
241
253
  parameters?: {
242
- key: string;
243
254
  value: string;
255
+ key: string;
244
256
  omitIfEmpty?: boolean | undefined;
245
257
  }[] | undefined;
246
258
  variables?: Record<string, {
@@ -257,20 +269,20 @@ declare const mergedDataTypeSchema: z.ZodObject<{
257
269
  }>>;
258
270
  enableUnpublishedMode: z.ZodOptional<z.ZodBoolean>;
259
271
  }, "strip", z.ZodTypeAny, {
272
+ id: string;
260
273
  displayName: string;
261
274
  url: string;
262
- id: string;
263
275
  connectorType: string;
264
276
  method: "GET" | "POST" | "HEAD";
265
277
  custom?: Record<string, unknown> | undefined;
266
278
  headers?: {
267
- key: string;
268
279
  value: string;
280
+ key: string;
269
281
  omitIfEmpty?: boolean | undefined;
270
282
  }[] | undefined;
271
283
  parameters?: {
272
- key: string;
273
284
  value: string;
285
+ key: string;
274
286
  omitIfEmpty?: boolean | undefined;
275
287
  }[] | undefined;
276
288
  variables?: Record<string, {
@@ -292,18 +304,20 @@ declare const mergedDataTypeSchema: z.ZodObject<{
292
304
  edgehancer?: {
293
305
  preRequest?: string | undefined;
294
306
  request?: string | undefined;
307
+ createAIDataResourceEdit?: string | undefined;
308
+ afterAIDataResourceEdit?: string | undefined;
295
309
  } | undefined;
296
310
  uiBadgeText?: string | undefined;
297
311
  variants?: {
298
312
  unpublished?: ({
299
313
  headers?: {
300
- key: string;
301
314
  value: string;
315
+ key: string;
302
316
  omitIfEmpty?: boolean | undefined;
303
317
  }[] | undefined;
304
318
  parameters?: {
305
- key: string;
306
319
  value: string;
320
+ key: string;
307
321
  omitIfEmpty?: boolean | undefined;
308
322
  }[] | undefined;
309
323
  variables?: Record<string, {
@@ -320,20 +334,20 @@ declare const mergedDataTypeSchema: z.ZodObject<{
320
334
  } | undefined;
321
335
  enableUnpublishedMode?: boolean | undefined;
322
336
  }, {
337
+ id: string;
323
338
  displayName: string;
324
339
  url: string;
325
- id: string;
326
340
  connectorType: string;
327
341
  method: "GET" | "POST" | "HEAD";
328
342
  custom?: Record<string, unknown> | undefined;
329
343
  headers?: {
330
- key: string;
331
344
  value: string;
345
+ key: string;
332
346
  omitIfEmpty?: boolean | undefined;
333
347
  }[] | undefined;
334
348
  parameters?: {
335
- key: string;
336
349
  value: string;
350
+ key: string;
337
351
  omitIfEmpty?: boolean | undefined;
338
352
  }[] | undefined;
339
353
  variables?: Record<string, {
@@ -355,18 +369,20 @@ declare const mergedDataTypeSchema: z.ZodObject<{
355
369
  edgehancer?: {
356
370
  preRequest?: string | undefined;
357
371
  request?: string | undefined;
372
+ createAIDataResourceEdit?: string | undefined;
373
+ afterAIDataResourceEdit?: string | undefined;
358
374
  } | undefined;
359
375
  uiBadgeText?: string | undefined;
360
376
  variants?: {
361
377
  unpublished?: ({
362
378
  headers?: {
363
- key: string;
364
379
  value: string;
380
+ key: string;
365
381
  omitIfEmpty?: boolean | undefined;
366
382
  }[] | undefined;
367
383
  parameters?: {
368
- key: string;
369
384
  value: string;
385
+ key: string;
370
386
  omitIfEmpty?: boolean | undefined;
371
387
  }[] | undefined;
372
388
  variables?: Record<string, {
@@ -418,6 +434,467 @@ declare const dataResourceSchema: z.ZodUnion<[z.ZodString, z.ZodObject<{}, "stri
418
434
  type DataResource = z.infer<typeof dataResourceSchema>;
419
435
  type EdgehancerDataIssue = z.infer<typeof resolvingIssueSchema>;
420
436
 
437
+ declare const afterAIDataResourceEditResultSchema: z.ZodObject<{
438
+ newValue: z.ZodRecord<z.ZodString, z.ZodString>;
439
+ success: z.ZodBoolean;
440
+ summary: z.ZodOptional<z.ZodString>;
441
+ }, "strict", z.ZodTypeAny, {
442
+ newValue: Record<string, string>;
443
+ success: boolean;
444
+ summary?: string | undefined;
445
+ }, {
446
+ newValue: Record<string, string>;
447
+ success: boolean;
448
+ summary?: string | undefined;
449
+ }>;
450
+ declare const afterAIDataResourceEditContextSchema: z.ZodObject<{
451
+ /**
452
+ * The the data type of the data resource being edited (merged with its data source)
453
+ * NOTE: this can contain secrets, API keys, etc. Do not directly expose it to the AI agent!
454
+ * NOTE: this does not include the current value's variables, if any
455
+ */
456
+ mergedDataType: z.ZodType<MergedDataType, z.ZodTypeDef, MergedDataType>;
457
+ /** Which data source variant is currently active (undefined = published data) */
458
+ dataSourceVariant: z.ZodOptional<z.ZodType<"unpublished", z.ZodTypeDef, "unpublished">>;
459
+ /** The edit request details */
460
+ editRequest: z.ZodObject<{
461
+ /** The edit instruction from the AI agent */
462
+ edit: z.ZodString;
463
+ /** Current value of the data resource's variables (if any) */
464
+ currentValue: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
465
+ }, "strip", z.ZodTypeAny, {
466
+ edit: string;
467
+ currentValue?: Record<string, string> | undefined;
468
+ }, {
469
+ edit: string;
470
+ currentValue?: Record<string, string> | undefined;
471
+ }>;
472
+ /** AI invocation context */
473
+ invocationContext: z.ZodEnum<["composition", "compositionPattern", "componentPattern", "entry", "entryPattern", "general"]>;
474
+ /** User ID making the edit */
475
+ userId: z.ZodString;
476
+ /** Project ID */
477
+ projectId: z.ZodString;
478
+ /** The new value generated by AI */
479
+ newValue: z.ZodRecord<z.ZodString, z.ZodString>;
480
+ /** The result from the AI editing process */
481
+ result: z.ZodObject<{
482
+ success: z.ZodBoolean;
483
+ summary: z.ZodOptional<z.ZodString>;
484
+ }, "strip", z.ZodTypeAny, {
485
+ success: boolean;
486
+ summary?: string | undefined;
487
+ }, {
488
+ success: boolean;
489
+ summary?: string | undefined;
490
+ }>;
491
+ }, "strict", z.ZodTypeAny, {
492
+ invocationContext: "composition" | "compositionPattern" | "componentPattern" | "entry" | "entryPattern" | "general";
493
+ newValue: Record<string, string>;
494
+ mergedDataType: Omit<{
495
+ id: string;
496
+ displayName: string;
497
+ dataSourceId: string;
498
+ archetype?: string;
499
+ allowedOnComponents?: string[];
500
+ path: string;
501
+ ttl?: number;
502
+ purgeKey?: string;
503
+ badgeIconUrl?: string;
504
+ headers?: {
505
+ key: string;
506
+ value: string;
507
+ omitIfEmpty?: boolean;
508
+ }[];
509
+ parameters?: {
510
+ key: string;
511
+ value: string;
512
+ omitIfEmpty?: boolean;
513
+ }[];
514
+ body?: string;
515
+ method: "GET" | "POST" | "HEAD";
516
+ variables?: {
517
+ [key: string]: {
518
+ displayName?: string;
519
+ helpText?: string;
520
+ type?: string;
521
+ default: string;
522
+ order?: number;
523
+ source?: string;
524
+ };
525
+ };
526
+ custom?: {
527
+ [key: string]: unknown;
528
+ };
529
+ }, "path" | "dataSourceId"> & Pick<{
530
+ id: string;
531
+ displayName: string;
532
+ connectorType: string;
533
+ baseUrl: string;
534
+ headers?: {
535
+ key: string;
536
+ value: string;
537
+ }[];
538
+ parameters?: {
539
+ key: string;
540
+ value: string;
541
+ }[];
542
+ variables?: {
543
+ [key: string]: {
544
+ displayName?: string;
545
+ helpText?: string;
546
+ type?: string;
547
+ default: string;
548
+ order?: number;
549
+ source?: string;
550
+ };
551
+ };
552
+ localeMapping?: {
553
+ [key: string]: string;
554
+ };
555
+ enableUnpublishedMode?: boolean;
556
+ customPublic?: {
557
+ [key: string]: unknown;
558
+ };
559
+ custom?: {
560
+ [key: string]: unknown;
561
+ };
562
+ variants?: {
563
+ unpublished?: {
564
+ baseUrl: string;
565
+ headers?: {
566
+ key: string;
567
+ value: string;
568
+ omitIfEmpty?: boolean;
569
+ }[];
570
+ parameters?: {
571
+ key: string;
572
+ value: string;
573
+ omitIfEmpty?: boolean;
574
+ }[];
575
+ variables?: {
576
+ [key: string]: {
577
+ displayName?: string;
578
+ helpText?: string;
579
+ type?: string;
580
+ default: string;
581
+ order?: number;
582
+ source?: string;
583
+ };
584
+ };
585
+ };
586
+ };
587
+ }, "connectorType" | "customPublic" | "localeMapping" | "enableUnpublishedMode"> & {
588
+ variants?: Partial<Record<DataSourceVariantsKeys, Omit<NonNullable<_uniformdev_canvas.DataSourceVariantData>, "baseUrl"> & {
589
+ url: string;
590
+ }>>;
591
+ url: string;
592
+ edgehancer?: CustomEdgehancerDefinition;
593
+ uiBadgeText?: string;
594
+ };
595
+ editRequest: {
596
+ edit: string;
597
+ currentValue?: Record<string, string> | undefined;
598
+ };
599
+ userId: string;
600
+ projectId: string;
601
+ result: {
602
+ success: boolean;
603
+ summary?: string | undefined;
604
+ };
605
+ dataSourceVariant?: "unpublished" | undefined;
606
+ }, {
607
+ invocationContext: "composition" | "compositionPattern" | "componentPattern" | "entry" | "entryPattern" | "general";
608
+ newValue: Record<string, string>;
609
+ mergedDataType: Omit<{
610
+ id: string;
611
+ displayName: string;
612
+ dataSourceId: string;
613
+ archetype?: string;
614
+ allowedOnComponents?: string[];
615
+ path: string;
616
+ ttl?: number;
617
+ purgeKey?: string;
618
+ badgeIconUrl?: string;
619
+ headers?: {
620
+ key: string;
621
+ value: string;
622
+ omitIfEmpty?: boolean;
623
+ }[];
624
+ parameters?: {
625
+ key: string;
626
+ value: string;
627
+ omitIfEmpty?: boolean;
628
+ }[];
629
+ body?: string;
630
+ method: "GET" | "POST" | "HEAD";
631
+ variables?: {
632
+ [key: string]: {
633
+ displayName?: string;
634
+ helpText?: string;
635
+ type?: string;
636
+ default: string;
637
+ order?: number;
638
+ source?: string;
639
+ };
640
+ };
641
+ custom?: {
642
+ [key: string]: unknown;
643
+ };
644
+ }, "path" | "dataSourceId"> & Pick<{
645
+ id: string;
646
+ displayName: string;
647
+ connectorType: string;
648
+ baseUrl: string;
649
+ headers?: {
650
+ key: string;
651
+ value: string;
652
+ }[];
653
+ parameters?: {
654
+ key: string;
655
+ value: string;
656
+ }[];
657
+ variables?: {
658
+ [key: string]: {
659
+ displayName?: string;
660
+ helpText?: string;
661
+ type?: string;
662
+ default: string;
663
+ order?: number;
664
+ source?: string;
665
+ };
666
+ };
667
+ localeMapping?: {
668
+ [key: string]: string;
669
+ };
670
+ enableUnpublishedMode?: boolean;
671
+ customPublic?: {
672
+ [key: string]: unknown;
673
+ };
674
+ custom?: {
675
+ [key: string]: unknown;
676
+ };
677
+ variants?: {
678
+ unpublished?: {
679
+ baseUrl: string;
680
+ headers?: {
681
+ key: string;
682
+ value: string;
683
+ omitIfEmpty?: boolean;
684
+ }[];
685
+ parameters?: {
686
+ key: string;
687
+ value: string;
688
+ omitIfEmpty?: boolean;
689
+ }[];
690
+ variables?: {
691
+ [key: string]: {
692
+ displayName?: string;
693
+ helpText?: string;
694
+ type?: string;
695
+ default: string;
696
+ order?: number;
697
+ source?: string;
698
+ };
699
+ };
700
+ };
701
+ };
702
+ }, "connectorType" | "customPublic" | "localeMapping" | "enableUnpublishedMode"> & {
703
+ variants?: Partial<Record<DataSourceVariantsKeys, Omit<NonNullable<_uniformdev_canvas.DataSourceVariantData>, "baseUrl"> & {
704
+ url: string;
705
+ }>>;
706
+ url: string;
707
+ edgehancer?: CustomEdgehancerDefinition;
708
+ uiBadgeText?: string;
709
+ };
710
+ editRequest: {
711
+ edit: string;
712
+ currentValue?: Record<string, string> | undefined;
713
+ };
714
+ userId: string;
715
+ projectId: string;
716
+ result: {
717
+ success: boolean;
718
+ summary?: string | undefined;
719
+ };
720
+ dataSourceVariant?: "unpublished" | undefined;
721
+ }>;
722
+ type AfterAIDataResourceEditContext = z.infer<typeof afterAIDataResourceEditContextSchema>;
723
+ type AfterAIDataResourceEditResult = z.infer<typeof afterAIDataResourceEditResultSchema>;
724
+ /**
725
+ * Shape of a hook function that is invoked after an AI edit has been performed on a data resource.
726
+ * The function can alter the success or value of the edit performed by the LLM.
727
+ *
728
+ * This hook allows you to:
729
+ * - Apply custom business rules to AI-generated edits
730
+ * - Detect and correct hallucinations in AI output
731
+ * - Transform the AI result into a different format
732
+ * - Validate that the AI edit meets your specific requirements
733
+ *
734
+ * NOTE: this function is only invoked when a value is edited. If the value is cleared or
735
+ * reset, the function is not invoked (those are internally handled).
736
+ *
737
+ * NOTE: in most cases, you want createAIDataResourceEdit well before this hook. This hook allows catching
738
+ * hallucinations, applying deterministic business rules, or transforming the format of the AI result
739
+ * into another format.
740
+ */
741
+ type AfterAIDataResourceEditHookFn = (context: AfterAIDataResourceEditContext) => Promise<AfterAIDataResourceEditResult>;
742
+
743
+ declare const afterAIEditResultSchema: z.ZodObject<{
744
+ newValue: z.ZodUnknown;
745
+ success: z.ZodBoolean;
746
+ summary: z.ZodOptional<z.ZodString>;
747
+ }, "strict", z.ZodTypeAny, {
748
+ success: boolean;
749
+ newValue?: unknown;
750
+ summary?: string | undefined;
751
+ }, {
752
+ success: boolean;
753
+ newValue?: unknown;
754
+ summary?: string | undefined;
755
+ }>;
756
+ declare const afterAIEditContextSchema: z.ZodObject<{
757
+ editRequest: z.ZodObject<{
758
+ edit: z.ZodString;
759
+ currentValue: z.ZodOptional<z.ZodUnknown>;
760
+ projectGuidance: z.ZodOptional<z.ZodString>;
761
+ componentGuidance: z.ZodOptional<z.ZodString>;
762
+ audienceGuidance: z.ZodOptional<z.ZodString>;
763
+ propertyDefinition: z.ZodObject<{
764
+ id: z.ZodString;
765
+ name: z.ZodString;
766
+ type: z.ZodString;
767
+ guidance: z.ZodOptional<z.ZodString>;
768
+ typeConfig: z.ZodOptional<z.ZodUnknown>;
769
+ }, "strip", z.ZodTypeAny, {
770
+ type: string;
771
+ id: string;
772
+ name: string;
773
+ guidance?: string | undefined;
774
+ typeConfig?: unknown;
775
+ }, {
776
+ type: string;
777
+ id: string;
778
+ name: string;
779
+ guidance?: string | undefined;
780
+ typeConfig?: unknown;
781
+ }>;
782
+ outputLocale: z.ZodOptional<z.ZodString>;
783
+ documentContext: z.ZodOptional<z.ZodString>;
784
+ }, "strip", z.ZodTypeAny, {
785
+ edit: string;
786
+ propertyDefinition: {
787
+ type: string;
788
+ id: string;
789
+ name: string;
790
+ guidance?: string | undefined;
791
+ typeConfig?: unknown;
792
+ };
793
+ currentValue?: unknown;
794
+ projectGuidance?: string | undefined;
795
+ componentGuidance?: string | undefined;
796
+ audienceGuidance?: string | undefined;
797
+ outputLocale?: string | undefined;
798
+ documentContext?: string | undefined;
799
+ }, {
800
+ edit: string;
801
+ propertyDefinition: {
802
+ type: string;
803
+ id: string;
804
+ name: string;
805
+ guidance?: string | undefined;
806
+ typeConfig?: unknown;
807
+ };
808
+ currentValue?: unknown;
809
+ projectGuidance?: string | undefined;
810
+ componentGuidance?: string | undefined;
811
+ audienceGuidance?: string | undefined;
812
+ outputLocale?: string | undefined;
813
+ documentContext?: string | undefined;
814
+ }>;
815
+ invocationContext: z.ZodEnum<["composition", "compositionPattern", "componentPattern", "entry", "entryPattern", "general"]>;
816
+ userId: z.ZodString;
817
+ currentLocale: z.ZodOptional<z.ZodString>;
818
+ projectId: z.ZodString;
819
+ newValue: z.ZodUnknown;
820
+ result: z.ZodObject<{
821
+ success: z.ZodBoolean;
822
+ summary: z.ZodOptional<z.ZodString>;
823
+ }, "strip", z.ZodTypeAny, {
824
+ success: boolean;
825
+ summary?: string | undefined;
826
+ }, {
827
+ success: boolean;
828
+ summary?: string | undefined;
829
+ }>;
830
+ }, "strict", z.ZodTypeAny, {
831
+ invocationContext: "composition" | "compositionPattern" | "componentPattern" | "entry" | "entryPattern" | "general";
832
+ editRequest: {
833
+ edit: string;
834
+ propertyDefinition: {
835
+ type: string;
836
+ id: string;
837
+ name: string;
838
+ guidance?: string | undefined;
839
+ typeConfig?: unknown;
840
+ };
841
+ currentValue?: unknown;
842
+ projectGuidance?: string | undefined;
843
+ componentGuidance?: string | undefined;
844
+ audienceGuidance?: string | undefined;
845
+ outputLocale?: string | undefined;
846
+ documentContext?: string | undefined;
847
+ };
848
+ userId: string;
849
+ projectId: string;
850
+ result: {
851
+ success: boolean;
852
+ summary?: string | undefined;
853
+ };
854
+ newValue?: unknown;
855
+ currentLocale?: string | undefined;
856
+ }, {
857
+ invocationContext: "composition" | "compositionPattern" | "componentPattern" | "entry" | "entryPattern" | "general";
858
+ editRequest: {
859
+ edit: string;
860
+ propertyDefinition: {
861
+ type: string;
862
+ id: string;
863
+ name: string;
864
+ guidance?: string | undefined;
865
+ typeConfig?: unknown;
866
+ };
867
+ currentValue?: unknown;
868
+ projectGuidance?: string | undefined;
869
+ componentGuidance?: string | undefined;
870
+ audienceGuidance?: string | undefined;
871
+ outputLocale?: string | undefined;
872
+ documentContext?: string | undefined;
873
+ };
874
+ userId: string;
875
+ projectId: string;
876
+ result: {
877
+ success: boolean;
878
+ summary?: string | undefined;
879
+ };
880
+ newValue?: unknown;
881
+ currentLocale?: string | undefined;
882
+ }>;
883
+ type AfterAIEditContext = z.infer<typeof afterAIEditContextSchema>;
884
+ type AfterAIEditResult = z.infer<typeof afterAIEditResultSchema>;
885
+ /**
886
+ * Shape of a hook function that is invoked after an AI edit has been performed to a custom property type.
887
+ * The function can alter the success or value of the edit performed by the LLM.
888
+ *
889
+ * NOTE: this function is only invoked when a value is edited. If the value is cleared or
890
+ * overrides reset, the function is not invoked (those are internally handled)
891
+ *
892
+ * NOTE: in most cases, you want createAIEdit well before this hook. This hook allows catching
893
+ * hallucinations, applying deterministic business rules, or transforming the format of the AI result
894
+ * into another format.
895
+ */
896
+ type AfterAIEditHookFn = (context: AfterAIEditContext) => Promise<AfterAIEditResult>;
897
+
421
898
  type RequestEdgehancerDataResourceContext = {
422
899
  /**
423
900
  * The data resource to fetch.
@@ -490,6 +967,7 @@ declare const requestEdgehancerDataResourceResolutionResultSchema: z.ZodObject<{
490
967
  surrogateKeys: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
491
968
  result: z.ZodUnion<[z.ZodString, z.ZodObject<{}, "strip", z.ZodUnknown, z.objectOutputType<{}, z.ZodUnknown, "strip">, z.objectInputType<{}, z.ZodUnknown, "strip">>, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodUnknown, "many">, z.ZodUndefined]>;
492
969
  }, "strict", z.ZodTypeAny, {
970
+ result?: string | number | boolean | unknown[] | z.objectOutputType<{}, z.ZodUnknown, "strip"> | undefined;
493
971
  errors?: (string | {
494
972
  message: string;
495
973
  subType?: "unpublishedData" | "configuration" | undefined;
@@ -509,8 +987,8 @@ declare const requestEdgehancerDataResourceResolutionResultSchema: z.ZodObject<{
509
987
  deepLink?: string | undefined;
510
988
  })[] | undefined;
511
989
  surrogateKeys?: string[] | undefined;
512
- result?: string | number | boolean | unknown[] | z.objectOutputType<{}, z.ZodUnknown, "strip"> | undefined;
513
990
  }, {
991
+ result?: string | number | boolean | unknown[] | z.objectInputType<{}, z.ZodUnknown, "strip"> | undefined;
514
992
  errors?: (string | {
515
993
  message: string;
516
994
  subType?: "unpublishedData" | "configuration" | undefined;
@@ -530,7 +1008,6 @@ declare const requestEdgehancerDataResourceResolutionResultSchema: z.ZodObject<{
530
1008
  deepLink?: string | undefined;
531
1009
  })[] | undefined;
532
1010
  surrogateKeys?: string[] | undefined;
533
- result?: string | number | boolean | unknown[] | z.objectInputType<{}, z.ZodUnknown, "strip"> | undefined;
534
1011
  }>;
535
1012
  declare const requestEdgehancerResultSchema: z.ZodObject<{
536
1013
  results: z.ZodArray<z.ZodObject<{
@@ -585,6 +1062,7 @@ declare const requestEdgehancerResultSchema: z.ZodObject<{
585
1062
  surrogateKeys: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
586
1063
  result: z.ZodUnion<[z.ZodString, z.ZodObject<{}, "strip", z.ZodUnknown, z.objectOutputType<{}, z.ZodUnknown, "strip">, z.objectInputType<{}, z.ZodUnknown, "strip">>, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodUnknown, "many">, z.ZodUndefined]>;
587
1064
  }, "strict", z.ZodTypeAny, {
1065
+ result?: string | number | boolean | unknown[] | z.objectOutputType<{}, z.ZodUnknown, "strip"> | undefined;
588
1066
  errors?: (string | {
589
1067
  message: string;
590
1068
  subType?: "unpublishedData" | "configuration" | undefined;
@@ -604,8 +1082,8 @@ declare const requestEdgehancerResultSchema: z.ZodObject<{
604
1082
  deepLink?: string | undefined;
605
1083
  })[] | undefined;
606
1084
  surrogateKeys?: string[] | undefined;
607
- result?: string | number | boolean | unknown[] | z.objectOutputType<{}, z.ZodUnknown, "strip"> | undefined;
608
1085
  }, {
1086
+ result?: string | number | boolean | unknown[] | z.objectInputType<{}, z.ZodUnknown, "strip"> | undefined;
609
1087
  errors?: (string | {
610
1088
  message: string;
611
1089
  subType?: "unpublishedData" | "configuration" | undefined;
@@ -625,10 +1103,10 @@ declare const requestEdgehancerResultSchema: z.ZodObject<{
625
1103
  deepLink?: string | undefined;
626
1104
  })[] | undefined;
627
1105
  surrogateKeys?: string[] | undefined;
628
- result?: string | number | boolean | unknown[] | z.objectInputType<{}, z.ZodUnknown, "strip"> | undefined;
629
1106
  }>, "many">;
630
1107
  }, "strict", z.ZodTypeAny, {
631
1108
  results: {
1109
+ result?: string | number | boolean | unknown[] | z.objectOutputType<{}, z.ZodUnknown, "strip"> | undefined;
632
1110
  errors?: (string | {
633
1111
  message: string;
634
1112
  subType?: "unpublishedData" | "configuration" | undefined;
@@ -648,10 +1126,10 @@ declare const requestEdgehancerResultSchema: z.ZodObject<{
648
1126
  deepLink?: string | undefined;
649
1127
  })[] | undefined;
650
1128
  surrogateKeys?: string[] | undefined;
651
- result?: string | number | boolean | unknown[] | z.objectOutputType<{}, z.ZodUnknown, "strip"> | undefined;
652
1129
  }[];
653
1130
  }, {
654
1131
  results: {
1132
+ result?: string | number | boolean | unknown[] | z.objectInputType<{}, z.ZodUnknown, "strip"> | undefined;
655
1133
  errors?: (string | {
656
1134
  message: string;
657
1135
  subType?: "unpublishedData" | "configuration" | undefined;
@@ -671,7 +1149,6 @@ declare const requestEdgehancerResultSchema: z.ZodObject<{
671
1149
  deepLink?: string | undefined;
672
1150
  })[] | undefined;
673
1151
  surrogateKeys?: string[] | undefined;
674
- result?: string | number | boolean | unknown[] | z.objectInputType<{}, z.ZodUnknown, "strip"> | undefined;
675
1152
  }[];
676
1153
  }>;
677
1154
  type RequestEdgehancerResult = z.infer<typeof requestEdgehancerResultSchema>;
@@ -690,6 +1167,7 @@ type ConvertBatchResultsToEdgehancerResultOptions<TID, TResultItem extends DataR
690
1167
  * Given a batch of data resources and their batch-fetch results, convert them into a result that can be returned from a request hook.
691
1168
  */
692
1169
  declare function convertBatchResultsToEdgehancerResult<TID, TResultItem extends DataResource>({ batch, batchFetchIds: { invalidBatchIndices, validIdToOriginalIndexMap }, batchResults, resolveIdFromBatchResultFn, knownInvalidErrorMessage, missingBatchResultErrorMessage, }: ConvertBatchResultsToEdgehancerResultOptions<TID, TResultItem>): {
1170
+ result?: string | number | boolean | unknown[] | z.objectOutputType<{}, z.ZodUnknown, "strip"> | undefined;
693
1171
  errors?: (string | {
694
1172
  message: string;
695
1173
  subType?: "unpublishedData" | "configuration" | undefined;
@@ -709,7 +1187,6 @@ declare function convertBatchResultsToEdgehancerResult<TID, TResultItem extends
709
1187
  deepLink?: string | undefined;
710
1188
  })[] | undefined;
711
1189
  surrogateKeys?: string[] | undefined;
712
- result?: string | number | boolean | unknown[] | zod.objectOutputType<{}, zod.ZodUnknown, "strip"> | undefined;
713
1190
  }[];
714
1191
  type ResolveBatchIdsResult<TID> = {
715
1192
  /** The IDs that are valid that should be fetched */
@@ -729,6 +1206,404 @@ declare const COLLECTION_DEFAULT_LIMIT = 20;
729
1206
  declare const COLLECTION_MAX_LIMIT = 50;
730
1207
  declare const COLLECTION_DEFAULT_OFFSET = 0;
731
1208
 
1209
+ declare const createAIDataResourceEditContextSchema: z.ZodObject<{
1210
+ /**
1211
+ * The the data type of the data resource being edited (merged with its data source)
1212
+ * NOTE: this can contain secrets, API keys, etc. Do not directly expose it to the AI agent!
1213
+ * NOTE: this does not include the current value's variables, if any
1214
+ */
1215
+ mergedDataType: z.ZodType<MergedDataType, z.ZodTypeDef, MergedDataType>;
1216
+ /** Which data source variant is currently active (undefined = published data) */
1217
+ dataSourceVariant: z.ZodOptional<z.ZodType<"unpublished", z.ZodTypeDef, "unpublished">>;
1218
+ /** The edit request details */
1219
+ editRequest: z.ZodObject<{
1220
+ /** The edit instruction from the AI agent */
1221
+ edit: z.ZodString;
1222
+ /** Current value of the data resource's variables (if any) */
1223
+ currentValue: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1224
+ }, "strip", z.ZodTypeAny, {
1225
+ edit: string;
1226
+ currentValue?: Record<string, string> | undefined;
1227
+ }, {
1228
+ edit: string;
1229
+ currentValue?: Record<string, string> | undefined;
1230
+ }>;
1231
+ /** AI invocation context */
1232
+ invocationContext: z.ZodEnum<["composition", "compositionPattern", "componentPattern", "entry", "entryPattern", "general"]>;
1233
+ /** User ID making the edit */
1234
+ userId: z.ZodString;
1235
+ /** Project ID */
1236
+ projectId: z.ZodString;
1237
+ }, "strict", z.ZodTypeAny, {
1238
+ invocationContext: "composition" | "compositionPattern" | "componentPattern" | "entry" | "entryPattern" | "general";
1239
+ mergedDataType: Omit<{
1240
+ id: string;
1241
+ displayName: string;
1242
+ dataSourceId: string;
1243
+ archetype?: string;
1244
+ allowedOnComponents?: string[];
1245
+ path: string;
1246
+ ttl?: number;
1247
+ purgeKey?: string;
1248
+ badgeIconUrl?: string;
1249
+ headers?: {
1250
+ key: string;
1251
+ value: string;
1252
+ omitIfEmpty?: boolean;
1253
+ }[];
1254
+ parameters?: {
1255
+ key: string;
1256
+ value: string;
1257
+ omitIfEmpty?: boolean;
1258
+ }[];
1259
+ body?: string;
1260
+ method: "GET" | "POST" | "HEAD";
1261
+ variables?: {
1262
+ [key: string]: {
1263
+ displayName?: string;
1264
+ helpText?: string;
1265
+ type?: string;
1266
+ default: string;
1267
+ order?: number;
1268
+ source?: string;
1269
+ };
1270
+ };
1271
+ custom?: {
1272
+ [key: string]: unknown;
1273
+ };
1274
+ }, "path" | "dataSourceId"> & Pick<{
1275
+ id: string;
1276
+ displayName: string;
1277
+ connectorType: string;
1278
+ baseUrl: string;
1279
+ headers?: {
1280
+ key: string;
1281
+ value: string;
1282
+ }[];
1283
+ parameters?: {
1284
+ key: string;
1285
+ value: string;
1286
+ }[];
1287
+ variables?: {
1288
+ [key: string]: {
1289
+ displayName?: string;
1290
+ helpText?: string;
1291
+ type?: string;
1292
+ default: string;
1293
+ order?: number;
1294
+ source?: string;
1295
+ };
1296
+ };
1297
+ localeMapping?: {
1298
+ [key: string]: string;
1299
+ };
1300
+ enableUnpublishedMode?: boolean;
1301
+ customPublic?: {
1302
+ [key: string]: unknown;
1303
+ };
1304
+ custom?: {
1305
+ [key: string]: unknown;
1306
+ };
1307
+ variants?: {
1308
+ unpublished?: {
1309
+ baseUrl: string;
1310
+ headers?: {
1311
+ key: string;
1312
+ value: string;
1313
+ omitIfEmpty?: boolean;
1314
+ }[];
1315
+ parameters?: {
1316
+ key: string;
1317
+ value: string;
1318
+ omitIfEmpty?: boolean;
1319
+ }[];
1320
+ variables?: {
1321
+ [key: string]: {
1322
+ displayName?: string;
1323
+ helpText?: string;
1324
+ type?: string;
1325
+ default: string;
1326
+ order?: number;
1327
+ source?: string;
1328
+ };
1329
+ };
1330
+ };
1331
+ };
1332
+ }, "connectorType" | "customPublic" | "localeMapping" | "enableUnpublishedMode"> & {
1333
+ variants?: Partial<Record<DataSourceVariantsKeys, Omit<NonNullable<_uniformdev_canvas.DataSourceVariantData>, "baseUrl"> & {
1334
+ url: string;
1335
+ }>>;
1336
+ url: string;
1337
+ edgehancer?: CustomEdgehancerDefinition;
1338
+ uiBadgeText?: string;
1339
+ };
1340
+ editRequest: {
1341
+ edit: string;
1342
+ currentValue?: Record<string, string> | undefined;
1343
+ };
1344
+ userId: string;
1345
+ projectId: string;
1346
+ dataSourceVariant?: "unpublished" | undefined;
1347
+ }, {
1348
+ invocationContext: "composition" | "compositionPattern" | "componentPattern" | "entry" | "entryPattern" | "general";
1349
+ mergedDataType: Omit<{
1350
+ id: string;
1351
+ displayName: string;
1352
+ dataSourceId: string;
1353
+ archetype?: string;
1354
+ allowedOnComponents?: string[];
1355
+ path: string;
1356
+ ttl?: number;
1357
+ purgeKey?: string;
1358
+ badgeIconUrl?: string;
1359
+ headers?: {
1360
+ key: string;
1361
+ value: string;
1362
+ omitIfEmpty?: boolean;
1363
+ }[];
1364
+ parameters?: {
1365
+ key: string;
1366
+ value: string;
1367
+ omitIfEmpty?: boolean;
1368
+ }[];
1369
+ body?: string;
1370
+ method: "GET" | "POST" | "HEAD";
1371
+ variables?: {
1372
+ [key: string]: {
1373
+ displayName?: string;
1374
+ helpText?: string;
1375
+ type?: string;
1376
+ default: string;
1377
+ order?: number;
1378
+ source?: string;
1379
+ };
1380
+ };
1381
+ custom?: {
1382
+ [key: string]: unknown;
1383
+ };
1384
+ }, "path" | "dataSourceId"> & Pick<{
1385
+ id: string;
1386
+ displayName: string;
1387
+ connectorType: string;
1388
+ baseUrl: string;
1389
+ headers?: {
1390
+ key: string;
1391
+ value: string;
1392
+ }[];
1393
+ parameters?: {
1394
+ key: string;
1395
+ value: string;
1396
+ }[];
1397
+ variables?: {
1398
+ [key: string]: {
1399
+ displayName?: string;
1400
+ helpText?: string;
1401
+ type?: string;
1402
+ default: string;
1403
+ order?: number;
1404
+ source?: string;
1405
+ };
1406
+ };
1407
+ localeMapping?: {
1408
+ [key: string]: string;
1409
+ };
1410
+ enableUnpublishedMode?: boolean;
1411
+ customPublic?: {
1412
+ [key: string]: unknown;
1413
+ };
1414
+ custom?: {
1415
+ [key: string]: unknown;
1416
+ };
1417
+ variants?: {
1418
+ unpublished?: {
1419
+ baseUrl: string;
1420
+ headers?: {
1421
+ key: string;
1422
+ value: string;
1423
+ omitIfEmpty?: boolean;
1424
+ }[];
1425
+ parameters?: {
1426
+ key: string;
1427
+ value: string;
1428
+ omitIfEmpty?: boolean;
1429
+ }[];
1430
+ variables?: {
1431
+ [key: string]: {
1432
+ displayName?: string;
1433
+ helpText?: string;
1434
+ type?: string;
1435
+ default: string;
1436
+ order?: number;
1437
+ source?: string;
1438
+ };
1439
+ };
1440
+ };
1441
+ };
1442
+ }, "connectorType" | "customPublic" | "localeMapping" | "enableUnpublishedMode"> & {
1443
+ variants?: Partial<Record<DataSourceVariantsKeys, Omit<NonNullable<_uniformdev_canvas.DataSourceVariantData>, "baseUrl"> & {
1444
+ url: string;
1445
+ }>>;
1446
+ url: string;
1447
+ edgehancer?: CustomEdgehancerDefinition;
1448
+ uiBadgeText?: string;
1449
+ };
1450
+ editRequest: {
1451
+ edit: string;
1452
+ currentValue?: Record<string, string> | undefined;
1453
+ };
1454
+ userId: string;
1455
+ projectId: string;
1456
+ dataSourceVariant?: "unpublished" | undefined;
1457
+ }>;
1458
+ type CreateAIDataResourceEditContext = z.infer<typeof createAIDataResourceEditContextSchema>;
1459
+ declare const createAIDataResourceEditResultSchema: z.ZodObject<{
1460
+ outputJsonSchema: z.ZodRecord<z.ZodString, z.ZodAny>;
1461
+ instructions: z.ZodString;
1462
+ }, "strict", z.ZodTypeAny, {
1463
+ outputJsonSchema: Record<string, any>;
1464
+ instructions: string;
1465
+ }, {
1466
+ outputJsonSchema: Record<string, any>;
1467
+ instructions: string;
1468
+ }>;
1469
+ type CreateAIDataResourceEditResult = z.infer<typeof createAIDataResourceEditResultSchema>;
1470
+ /**
1471
+ * Shape of a hook function that is invoked to create the prompt and output schema for an AI edit to a data resource.
1472
+ *
1473
+ * This hook is called when AI needs to edit the content of a data resource. It should return instructions
1474
+ * for the AI and a JSON schema describing the expected output format.
1475
+ *
1476
+ * NOTE: the instructions returned by this hook are part of a larger system editing prompt. Only describe how to edit
1477
+ * the data resource content itself, not general editing instructions.
1478
+ */
1479
+ type CreateAIDataResourceEditHookFn = (context: CreateAIDataResourceEditContext) => Promise<CreateAIDataResourceEditResult>;
1480
+
1481
+ declare const createAIEditContextSchema: z.ZodObject<{
1482
+ editRequest: z.ZodObject<{
1483
+ edit: z.ZodString;
1484
+ currentValue: z.ZodOptional<z.ZodUnknown>;
1485
+ projectGuidance: z.ZodOptional<z.ZodString>;
1486
+ componentGuidance: z.ZodOptional<z.ZodString>;
1487
+ audienceGuidance: z.ZodOptional<z.ZodString>;
1488
+ propertyDefinition: z.ZodObject<{
1489
+ id: z.ZodString;
1490
+ name: z.ZodString;
1491
+ type: z.ZodString;
1492
+ guidance: z.ZodOptional<z.ZodString>;
1493
+ typeConfig: z.ZodOptional<z.ZodUnknown>;
1494
+ }, "strip", z.ZodTypeAny, {
1495
+ type: string;
1496
+ id: string;
1497
+ name: string;
1498
+ guidance?: string | undefined;
1499
+ typeConfig?: unknown;
1500
+ }, {
1501
+ type: string;
1502
+ id: string;
1503
+ name: string;
1504
+ guidance?: string | undefined;
1505
+ typeConfig?: unknown;
1506
+ }>;
1507
+ outputLocale: z.ZodOptional<z.ZodString>;
1508
+ documentContext: z.ZodOptional<z.ZodString>;
1509
+ }, "strip", z.ZodTypeAny, {
1510
+ edit: string;
1511
+ propertyDefinition: {
1512
+ type: string;
1513
+ id: string;
1514
+ name: string;
1515
+ guidance?: string | undefined;
1516
+ typeConfig?: unknown;
1517
+ };
1518
+ currentValue?: unknown;
1519
+ projectGuidance?: string | undefined;
1520
+ componentGuidance?: string | undefined;
1521
+ audienceGuidance?: string | undefined;
1522
+ outputLocale?: string | undefined;
1523
+ documentContext?: string | undefined;
1524
+ }, {
1525
+ edit: string;
1526
+ propertyDefinition: {
1527
+ type: string;
1528
+ id: string;
1529
+ name: string;
1530
+ guidance?: string | undefined;
1531
+ typeConfig?: unknown;
1532
+ };
1533
+ currentValue?: unknown;
1534
+ projectGuidance?: string | undefined;
1535
+ componentGuidance?: string | undefined;
1536
+ audienceGuidance?: string | undefined;
1537
+ outputLocale?: string | undefined;
1538
+ documentContext?: string | undefined;
1539
+ }>;
1540
+ invocationContext: z.ZodEnum<["composition", "compositionPattern", "componentPattern", "entry", "entryPattern", "general"]>;
1541
+ userId: z.ZodString;
1542
+ currentLocale: z.ZodOptional<z.ZodString>;
1543
+ projectId: z.ZodString;
1544
+ }, "strict", z.ZodTypeAny, {
1545
+ invocationContext: "composition" | "compositionPattern" | "componentPattern" | "entry" | "entryPattern" | "general";
1546
+ editRequest: {
1547
+ edit: string;
1548
+ propertyDefinition: {
1549
+ type: string;
1550
+ id: string;
1551
+ name: string;
1552
+ guidance?: string | undefined;
1553
+ typeConfig?: unknown;
1554
+ };
1555
+ currentValue?: unknown;
1556
+ projectGuidance?: string | undefined;
1557
+ componentGuidance?: string | undefined;
1558
+ audienceGuidance?: string | undefined;
1559
+ outputLocale?: string | undefined;
1560
+ documentContext?: string | undefined;
1561
+ };
1562
+ userId: string;
1563
+ projectId: string;
1564
+ currentLocale?: string | undefined;
1565
+ }, {
1566
+ invocationContext: "composition" | "compositionPattern" | "componentPattern" | "entry" | "entryPattern" | "general";
1567
+ editRequest: {
1568
+ edit: string;
1569
+ propertyDefinition: {
1570
+ type: string;
1571
+ id: string;
1572
+ name: string;
1573
+ guidance?: string | undefined;
1574
+ typeConfig?: unknown;
1575
+ };
1576
+ currentValue?: unknown;
1577
+ projectGuidance?: string | undefined;
1578
+ componentGuidance?: string | undefined;
1579
+ audienceGuidance?: string | undefined;
1580
+ outputLocale?: string | undefined;
1581
+ documentContext?: string | undefined;
1582
+ };
1583
+ userId: string;
1584
+ projectId: string;
1585
+ currentLocale?: string | undefined;
1586
+ }>;
1587
+ type CreateAIEditContext = z.infer<typeof createAIEditContextSchema>;
1588
+ declare const createAIEditResultSchema: z.ZodObject<{
1589
+ outputJsonSchema: z.ZodRecord<z.ZodString, z.ZodAny>;
1590
+ instructions: z.ZodString;
1591
+ }, "strict", z.ZodTypeAny, {
1592
+ outputJsonSchema: Record<string, any>;
1593
+ instructions: string;
1594
+ }, {
1595
+ outputJsonSchema: Record<string, any>;
1596
+ instructions: string;
1597
+ }>;
1598
+ type CreateAIEditResult = z.infer<typeof createAIEditResultSchema>;
1599
+ /**
1600
+ * Shape of a hook function that is invoked to create the prompt and output schema for an AI edit to a custom property type.
1601
+
1602
+ * NOTE: the prompt returned by this hook is part of a larger system editing prompt. Only describe how to edit
1603
+ * the custom property type itself.
1604
+ */
1605
+ type CreateAIEditHookFn = (context: CreateAIEditContext) => Promise<CreateAIEditResult>;
1606
+
732
1607
  declare const edgehancerMergedDataTypeSchema: z.ZodObject<Omit<{
733
1608
  id: z.ZodString;
734
1609
  displayName: z.ZodString;
@@ -742,12 +1617,12 @@ declare const edgehancerMergedDataTypeSchema: z.ZodObject<Omit<{
742
1617
  value: z.ZodString;
743
1618
  omitIfEmpty: z.ZodOptional<z.ZodBoolean>;
744
1619
  }, "strip", z.ZodTypeAny, {
745
- key: string;
746
1620
  value: string;
1621
+ key: string;
747
1622
  omitIfEmpty?: boolean | undefined;
748
1623
  }, {
749
- key: string;
750
1624
  value: string;
1625
+ key: string;
751
1626
  omitIfEmpty?: boolean | undefined;
752
1627
  }>, "many">>;
753
1628
  parameters: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -755,12 +1630,12 @@ declare const edgehancerMergedDataTypeSchema: z.ZodObject<Omit<{
755
1630
  value: z.ZodString;
756
1631
  omitIfEmpty: z.ZodOptional<z.ZodBoolean>;
757
1632
  }, "strip", z.ZodTypeAny, {
758
- key: string;
759
1633
  value: string;
1634
+ key: string;
760
1635
  omitIfEmpty?: boolean | undefined;
761
1636
  }, {
762
- key: string;
763
1637
  value: string;
1638
+ key: string;
764
1639
  omitIfEmpty?: boolean | undefined;
765
1640
  }>, "many">>;
766
1641
  body: z.ZodOptional<z.ZodString>;
@@ -795,12 +1670,18 @@ declare const edgehancerMergedDataTypeSchema: z.ZodObject<Omit<{
795
1670
  edgehancer: z.ZodOptional<z.ZodObject<{
796
1671
  preRequest: z.ZodOptional<z.ZodString>;
797
1672
  request: z.ZodOptional<z.ZodString>;
1673
+ createAIDataResourceEdit: z.ZodOptional<z.ZodString>;
1674
+ afterAIDataResourceEdit: z.ZodOptional<z.ZodString>;
798
1675
  }, "strip", z.ZodTypeAny, {
799
1676
  preRequest?: string | undefined;
800
1677
  request?: string | undefined;
1678
+ createAIDataResourceEdit?: string | undefined;
1679
+ afterAIDataResourceEdit?: string | undefined;
801
1680
  }, {
802
1681
  preRequest?: string | undefined;
803
1682
  request?: string | undefined;
1683
+ createAIDataResourceEdit?: string | undefined;
1684
+ afterAIDataResourceEdit?: string | undefined;
804
1685
  }>>;
805
1686
  uiBadgeText: z.ZodOptional<z.ZodString>;
806
1687
  variants: z.ZodOptional<z.ZodObject<{
@@ -810,12 +1691,12 @@ declare const edgehancerMergedDataTypeSchema: z.ZodObject<Omit<{
810
1691
  value: z.ZodString;
811
1692
  omitIfEmpty: z.ZodOptional<z.ZodBoolean>;
812
1693
  }, "strip", z.ZodTypeAny, {
813
- key: string;
814
1694
  value: string;
1695
+ key: string;
815
1696
  omitIfEmpty?: boolean | undefined;
816
1697
  }, {
817
- key: string;
818
1698
  value: string;
1699
+ key: string;
819
1700
  omitIfEmpty?: boolean | undefined;
820
1701
  }>, "many">>;
821
1702
  parameters: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -823,12 +1704,12 @@ declare const edgehancerMergedDataTypeSchema: z.ZodObject<Omit<{
823
1704
  value: z.ZodString;
824
1705
  omitIfEmpty: z.ZodOptional<z.ZodBoolean>;
825
1706
  }, "strip", z.ZodTypeAny, {
826
- key: string;
827
1707
  value: string;
1708
+ key: string;
828
1709
  omitIfEmpty?: boolean | undefined;
829
1710
  }, {
830
- key: string;
831
1711
  value: string;
1712
+ key: string;
832
1713
  omitIfEmpty?: boolean | undefined;
833
1714
  }>, "many">>;
834
1715
  variables: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
@@ -855,13 +1736,13 @@ declare const edgehancerMergedDataTypeSchema: z.ZodObject<Omit<{
855
1736
  }>>>;
856
1737
  }, "strip", z.ZodTypeAny, {
857
1738
  headers?: {
858
- key: string;
859
1739
  value: string;
1740
+ key: string;
860
1741
  omitIfEmpty?: boolean | undefined;
861
1742
  }[] | undefined;
862
1743
  parameters?: {
863
- key: string;
864
1744
  value: string;
1745
+ key: string;
865
1746
  omitIfEmpty?: boolean | undefined;
866
1747
  }[] | undefined;
867
1748
  variables?: Record<string, {
@@ -874,13 +1755,13 @@ declare const edgehancerMergedDataTypeSchema: z.ZodObject<Omit<{
874
1755
  }> | undefined;
875
1756
  }, {
876
1757
  headers?: {
877
- key: string;
878
1758
  value: string;
1759
+ key: string;
879
1760
  omitIfEmpty?: boolean | undefined;
880
1761
  }[] | undefined;
881
1762
  parameters?: {
882
- key: string;
883
1763
  value: string;
1764
+ key: string;
884
1765
  omitIfEmpty?: boolean | undefined;
885
1766
  }[] | undefined;
886
1767
  variables?: Record<string, {
@@ -901,13 +1782,13 @@ declare const edgehancerMergedDataTypeSchema: z.ZodObject<Omit<{
901
1782
  }, "strip", z.ZodTypeAny, {
902
1783
  unpublished?: ({
903
1784
  headers?: {
904
- key: string;
905
1785
  value: string;
1786
+ key: string;
906
1787
  omitIfEmpty?: boolean | undefined;
907
1788
  }[] | undefined;
908
1789
  parameters?: {
909
- key: string;
910
1790
  value: string;
1791
+ key: string;
911
1792
  omitIfEmpty?: boolean | undefined;
912
1793
  }[] | undefined;
913
1794
  variables?: Record<string, {
@@ -924,13 +1805,13 @@ declare const edgehancerMergedDataTypeSchema: z.ZodObject<Omit<{
924
1805
  }, {
925
1806
  unpublished?: ({
926
1807
  headers?: {
927
- key: string;
928
1808
  value: string;
1809
+ key: string;
929
1810
  omitIfEmpty?: boolean | undefined;
930
1811
  }[] | undefined;
931
1812
  parameters?: {
932
- key: string;
933
1813
  value: string;
1814
+ key: string;
934
1815
  omitIfEmpty?: boolean | undefined;
935
1816
  }[] | undefined;
936
1817
  variables?: Record<string, {
@@ -946,19 +1827,19 @@ declare const edgehancerMergedDataTypeSchema: z.ZodObject<Omit<{
946
1827
  }) | undefined;
947
1828
  }>>;
948
1829
  enableUnpublishedMode: z.ZodOptional<z.ZodBoolean>;
949
- }, "displayName" | "variables" | "id" | "allowedOnComponents" | "badgeIconUrl" | "purgeKey" | "edgehancer">, "strip", z.ZodTypeAny, {
1830
+ }, "id" | "displayName" | "variables" | "allowedOnComponents" | "badgeIconUrl" | "purgeKey" | "edgehancer">, "strip", z.ZodTypeAny, {
950
1831
  url: string;
951
1832
  connectorType: string;
952
1833
  method: "GET" | "POST" | "HEAD";
953
1834
  custom?: Record<string, unknown> | undefined;
954
1835
  headers?: {
955
- key: string;
956
1836
  value: string;
1837
+ key: string;
957
1838
  omitIfEmpty?: boolean | undefined;
958
1839
  }[] | undefined;
959
1840
  parameters?: {
960
- key: string;
961
1841
  value: string;
1842
+ key: string;
962
1843
  omitIfEmpty?: boolean | undefined;
963
1844
  }[] | undefined;
964
1845
  archetype?: string | undefined;
@@ -970,13 +1851,13 @@ declare const edgehancerMergedDataTypeSchema: z.ZodObject<Omit<{
970
1851
  variants?: {
971
1852
  unpublished?: ({
972
1853
  headers?: {
973
- key: string;
974
1854
  value: string;
1855
+ key: string;
975
1856
  omitIfEmpty?: boolean | undefined;
976
1857
  }[] | undefined;
977
1858
  parameters?: {
978
- key: string;
979
1859
  value: string;
1860
+ key: string;
980
1861
  omitIfEmpty?: boolean | undefined;
981
1862
  }[] | undefined;
982
1863
  variables?: Record<string, {
@@ -998,13 +1879,13 @@ declare const edgehancerMergedDataTypeSchema: z.ZodObject<Omit<{
998
1879
  method: "GET" | "POST" | "HEAD";
999
1880
  custom?: Record<string, unknown> | undefined;
1000
1881
  headers?: {
1001
- key: string;
1002
1882
  value: string;
1883
+ key: string;
1003
1884
  omitIfEmpty?: boolean | undefined;
1004
1885
  }[] | undefined;
1005
1886
  parameters?: {
1006
- key: string;
1007
1887
  value: string;
1888
+ key: string;
1008
1889
  omitIfEmpty?: boolean | undefined;
1009
1890
  }[] | undefined;
1010
1891
  archetype?: string | undefined;
@@ -1016,13 +1897,13 @@ declare const edgehancerMergedDataTypeSchema: z.ZodObject<Omit<{
1016
1897
  variants?: {
1017
1898
  unpublished?: ({
1018
1899
  headers?: {
1019
- key: string;
1020
1900
  value: string;
1901
+ key: string;
1021
1902
  omitIfEmpty?: boolean | undefined;
1022
1903
  }[] | undefined;
1023
1904
  parameters?: {
1024
- key: string;
1025
1905
  value: string;
1906
+ key: string;
1026
1907
  omitIfEmpty?: boolean | undefined;
1027
1908
  }[] | undefined;
1028
1909
  variables?: Record<string, {
@@ -1120,12 +2001,12 @@ declare const preRequestEdgehancerDataResourceResultSchema: z.ZodObject<{
1120
2001
  value: z.ZodString;
1121
2002
  omitIfEmpty: z.ZodOptional<z.ZodBoolean>;
1122
2003
  }, "strip", z.ZodTypeAny, {
1123
- key: string;
1124
2004
  value: string;
2005
+ key: string;
1125
2006
  omitIfEmpty?: boolean | undefined;
1126
2007
  }, {
1127
- key: string;
1128
2008
  value: string;
2009
+ key: string;
1129
2010
  omitIfEmpty?: boolean | undefined;
1130
2011
  }>, "many">>;
1131
2012
  parameters: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -1133,12 +2014,12 @@ declare const preRequestEdgehancerDataResourceResultSchema: z.ZodObject<{
1133
2014
  value: z.ZodString;
1134
2015
  omitIfEmpty: z.ZodOptional<z.ZodBoolean>;
1135
2016
  }, "strip", z.ZodTypeAny, {
1136
- key: string;
1137
2017
  value: string;
2018
+ key: string;
1138
2019
  omitIfEmpty?: boolean | undefined;
1139
2020
  }, {
1140
- key: string;
1141
2021
  value: string;
2022
+ key: string;
1142
2023
  omitIfEmpty?: boolean | undefined;
1143
2024
  }>, "many">>;
1144
2025
  body: z.ZodOptional<z.ZodString>;
@@ -1173,12 +2054,18 @@ declare const preRequestEdgehancerDataResourceResultSchema: z.ZodObject<{
1173
2054
  edgehancer: z.ZodOptional<z.ZodObject<{
1174
2055
  preRequest: z.ZodOptional<z.ZodString>;
1175
2056
  request: z.ZodOptional<z.ZodString>;
2057
+ createAIDataResourceEdit: z.ZodOptional<z.ZodString>;
2058
+ afterAIDataResourceEdit: z.ZodOptional<z.ZodString>;
1176
2059
  }, "strip", z.ZodTypeAny, {
1177
2060
  preRequest?: string | undefined;
1178
2061
  request?: string | undefined;
2062
+ createAIDataResourceEdit?: string | undefined;
2063
+ afterAIDataResourceEdit?: string | undefined;
1179
2064
  }, {
1180
2065
  preRequest?: string | undefined;
1181
2066
  request?: string | undefined;
2067
+ createAIDataResourceEdit?: string | undefined;
2068
+ afterAIDataResourceEdit?: string | undefined;
1182
2069
  }>>;
1183
2070
  uiBadgeText: z.ZodOptional<z.ZodString>;
1184
2071
  variants: z.ZodOptional<z.ZodObject<{
@@ -1188,12 +2075,12 @@ declare const preRequestEdgehancerDataResourceResultSchema: z.ZodObject<{
1188
2075
  value: z.ZodString;
1189
2076
  omitIfEmpty: z.ZodOptional<z.ZodBoolean>;
1190
2077
  }, "strip", z.ZodTypeAny, {
1191
- key: string;
1192
2078
  value: string;
2079
+ key: string;
1193
2080
  omitIfEmpty?: boolean | undefined;
1194
2081
  }, {
1195
- key: string;
1196
2082
  value: string;
2083
+ key: string;
1197
2084
  omitIfEmpty?: boolean | undefined;
1198
2085
  }>, "many">>;
1199
2086
  parameters: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -1201,12 +2088,12 @@ declare const preRequestEdgehancerDataResourceResultSchema: z.ZodObject<{
1201
2088
  value: z.ZodString;
1202
2089
  omitIfEmpty: z.ZodOptional<z.ZodBoolean>;
1203
2090
  }, "strip", z.ZodTypeAny, {
1204
- key: string;
1205
2091
  value: string;
2092
+ key: string;
1206
2093
  omitIfEmpty?: boolean | undefined;
1207
2094
  }, {
1208
- key: string;
1209
2095
  value: string;
2096
+ key: string;
1210
2097
  omitIfEmpty?: boolean | undefined;
1211
2098
  }>, "many">>;
1212
2099
  variables: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
@@ -1233,13 +2120,13 @@ declare const preRequestEdgehancerDataResourceResultSchema: z.ZodObject<{
1233
2120
  }>>>;
1234
2121
  }, "strip", z.ZodTypeAny, {
1235
2122
  headers?: {
1236
- key: string;
1237
2123
  value: string;
2124
+ key: string;
1238
2125
  omitIfEmpty?: boolean | undefined;
1239
2126
  }[] | undefined;
1240
2127
  parameters?: {
1241
- key: string;
1242
2128
  value: string;
2129
+ key: string;
1243
2130
  omitIfEmpty?: boolean | undefined;
1244
2131
  }[] | undefined;
1245
2132
  variables?: Record<string, {
@@ -1252,13 +2139,13 @@ declare const preRequestEdgehancerDataResourceResultSchema: z.ZodObject<{
1252
2139
  }> | undefined;
1253
2140
  }, {
1254
2141
  headers?: {
1255
- key: string;
1256
2142
  value: string;
2143
+ key: string;
1257
2144
  omitIfEmpty?: boolean | undefined;
1258
2145
  }[] | undefined;
1259
2146
  parameters?: {
1260
- key: string;
1261
2147
  value: string;
2148
+ key: string;
1262
2149
  omitIfEmpty?: boolean | undefined;
1263
2150
  }[] | undefined;
1264
2151
  variables?: Record<string, {
@@ -1279,13 +2166,13 @@ declare const preRequestEdgehancerDataResourceResultSchema: z.ZodObject<{
1279
2166
  }, "strip", z.ZodTypeAny, {
1280
2167
  unpublished?: ({
1281
2168
  headers?: {
1282
- key: string;
1283
2169
  value: string;
2170
+ key: string;
1284
2171
  omitIfEmpty?: boolean | undefined;
1285
2172
  }[] | undefined;
1286
2173
  parameters?: {
1287
- key: string;
1288
2174
  value: string;
2175
+ key: string;
1289
2176
  omitIfEmpty?: boolean | undefined;
1290
2177
  }[] | undefined;
1291
2178
  variables?: Record<string, {
@@ -1302,13 +2189,13 @@ declare const preRequestEdgehancerDataResourceResultSchema: z.ZodObject<{
1302
2189
  }, {
1303
2190
  unpublished?: ({
1304
2191
  headers?: {
1305
- key: string;
1306
2192
  value: string;
2193
+ key: string;
1307
2194
  omitIfEmpty?: boolean | undefined;
1308
2195
  }[] | undefined;
1309
2196
  parameters?: {
1310
- key: string;
1311
2197
  value: string;
2198
+ key: string;
1312
2199
  omitIfEmpty?: boolean | undefined;
1313
2200
  }[] | undefined;
1314
2201
  variables?: Record<string, {
@@ -1324,19 +2211,19 @@ declare const preRequestEdgehancerDataResourceResultSchema: z.ZodObject<{
1324
2211
  }) | undefined;
1325
2212
  }>>;
1326
2213
  enableUnpublishedMode: z.ZodOptional<z.ZodBoolean>;
1327
- }, "displayName" | "variables" | "id" | "allowedOnComponents" | "badgeIconUrl" | "purgeKey" | "edgehancer">, "strip", z.ZodTypeAny, {
2214
+ }, "id" | "displayName" | "variables" | "allowedOnComponents" | "badgeIconUrl" | "purgeKey" | "edgehancer">, "strip", z.ZodTypeAny, {
1328
2215
  url: string;
1329
2216
  connectorType: string;
1330
2217
  method: "GET" | "POST" | "HEAD";
1331
2218
  custom?: Record<string, unknown> | undefined;
1332
2219
  headers?: {
1333
- key: string;
1334
2220
  value: string;
2221
+ key: string;
1335
2222
  omitIfEmpty?: boolean | undefined;
1336
2223
  }[] | undefined;
1337
2224
  parameters?: {
1338
- key: string;
1339
2225
  value: string;
2226
+ key: string;
1340
2227
  omitIfEmpty?: boolean | undefined;
1341
2228
  }[] | undefined;
1342
2229
  archetype?: string | undefined;
@@ -1348,13 +2235,13 @@ declare const preRequestEdgehancerDataResourceResultSchema: z.ZodObject<{
1348
2235
  variants?: {
1349
2236
  unpublished?: ({
1350
2237
  headers?: {
1351
- key: string;
1352
2238
  value: string;
2239
+ key: string;
1353
2240
  omitIfEmpty?: boolean | undefined;
1354
2241
  }[] | undefined;
1355
2242
  parameters?: {
1356
- key: string;
1357
2243
  value: string;
2244
+ key: string;
1358
2245
  omitIfEmpty?: boolean | undefined;
1359
2246
  }[] | undefined;
1360
2247
  variables?: Record<string, {
@@ -1376,13 +2263,13 @@ declare const preRequestEdgehancerDataResourceResultSchema: z.ZodObject<{
1376
2263
  method: "GET" | "POST" | "HEAD";
1377
2264
  custom?: Record<string, unknown> | undefined;
1378
2265
  headers?: {
1379
- key: string;
1380
2266
  value: string;
2267
+ key: string;
1381
2268
  omitIfEmpty?: boolean | undefined;
1382
2269
  }[] | undefined;
1383
2270
  parameters?: {
1384
- key: string;
1385
2271
  value: string;
2272
+ key: string;
1386
2273
  omitIfEmpty?: boolean | undefined;
1387
2274
  }[] | undefined;
1388
2275
  archetype?: string | undefined;
@@ -1394,13 +2281,13 @@ declare const preRequestEdgehancerDataResourceResultSchema: z.ZodObject<{
1394
2281
  variants?: {
1395
2282
  unpublished?: ({
1396
2283
  headers?: {
1397
- key: string;
1398
2284
  value: string;
2285
+ key: string;
1399
2286
  omitIfEmpty?: boolean | undefined;
1400
2287
  }[] | undefined;
1401
2288
  parameters?: {
1402
- key: string;
1403
2289
  value: string;
2290
+ key: string;
1404
2291
  omitIfEmpty?: boolean | undefined;
1405
2292
  }[] | undefined;
1406
2293
  variables?: Record<string, {
@@ -1424,13 +2311,13 @@ declare const preRequestEdgehancerDataResourceResultSchema: z.ZodObject<{
1424
2311
  method: "GET" | "POST" | "HEAD";
1425
2312
  custom?: Record<string, unknown> | undefined;
1426
2313
  headers?: {
1427
- key: string;
1428
2314
  value: string;
2315
+ key: string;
1429
2316
  omitIfEmpty?: boolean | undefined;
1430
2317
  }[] | undefined;
1431
2318
  parameters?: {
1432
- key: string;
1433
2319
  value: string;
2320
+ key: string;
1434
2321
  omitIfEmpty?: boolean | undefined;
1435
2322
  }[] | undefined;
1436
2323
  archetype?: string | undefined;
@@ -1442,13 +2329,13 @@ declare const preRequestEdgehancerDataResourceResultSchema: z.ZodObject<{
1442
2329
  variants?: {
1443
2330
  unpublished?: ({
1444
2331
  headers?: {
1445
- key: string;
1446
2332
  value: string;
2333
+ key: string;
1447
2334
  omitIfEmpty?: boolean | undefined;
1448
2335
  }[] | undefined;
1449
2336
  parameters?: {
1450
- key: string;
1451
2337
  value: string;
2338
+ key: string;
1452
2339
  omitIfEmpty?: boolean | undefined;
1453
2340
  }[] | undefined;
1454
2341
  variables?: Record<string, {
@@ -1490,13 +2377,13 @@ declare const preRequestEdgehancerDataResourceResultSchema: z.ZodObject<{
1490
2377
  method: "GET" | "POST" | "HEAD";
1491
2378
  custom?: Record<string, unknown> | undefined;
1492
2379
  headers?: {
1493
- key: string;
1494
2380
  value: string;
2381
+ key: string;
1495
2382
  omitIfEmpty?: boolean | undefined;
1496
2383
  }[] | undefined;
1497
2384
  parameters?: {
1498
- key: string;
1499
2385
  value: string;
2386
+ key: string;
1500
2387
  omitIfEmpty?: boolean | undefined;
1501
2388
  }[] | undefined;
1502
2389
  archetype?: string | undefined;
@@ -1508,13 +2395,13 @@ declare const preRequestEdgehancerDataResourceResultSchema: z.ZodObject<{
1508
2395
  variants?: {
1509
2396
  unpublished?: ({
1510
2397
  headers?: {
1511
- key: string;
1512
2398
  value: string;
2399
+ key: string;
1513
2400
  omitIfEmpty?: boolean | undefined;
1514
2401
  }[] | undefined;
1515
2402
  parameters?: {
1516
- key: string;
1517
2403
  value: string;
2404
+ key: string;
1518
2405
  omitIfEmpty?: boolean | undefined;
1519
2406
  }[] | undefined;
1520
2407
  variables?: Record<string, {
@@ -1613,12 +2500,12 @@ declare const preRequestEdgehancerResultSchema: z.ZodObject<{
1613
2500
  value: z.ZodString;
1614
2501
  omitIfEmpty: z.ZodOptional<z.ZodBoolean>;
1615
2502
  }, "strip", z.ZodTypeAny, {
1616
- key: string;
1617
2503
  value: string;
2504
+ key: string;
1618
2505
  omitIfEmpty?: boolean | undefined;
1619
2506
  }, {
1620
- key: string;
1621
2507
  value: string;
2508
+ key: string;
1622
2509
  omitIfEmpty?: boolean | undefined;
1623
2510
  }>, "many">>;
1624
2511
  parameters: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -1626,12 +2513,12 @@ declare const preRequestEdgehancerResultSchema: z.ZodObject<{
1626
2513
  value: z.ZodString;
1627
2514
  omitIfEmpty: z.ZodOptional<z.ZodBoolean>;
1628
2515
  }, "strip", z.ZodTypeAny, {
1629
- key: string;
1630
2516
  value: string;
2517
+ key: string;
1631
2518
  omitIfEmpty?: boolean | undefined;
1632
2519
  }, {
1633
- key: string;
1634
2520
  value: string;
2521
+ key: string;
1635
2522
  omitIfEmpty?: boolean | undefined;
1636
2523
  }>, "many">>;
1637
2524
  body: z.ZodOptional<z.ZodString>;
@@ -1666,12 +2553,18 @@ declare const preRequestEdgehancerResultSchema: z.ZodObject<{
1666
2553
  edgehancer: z.ZodOptional<z.ZodObject<{
1667
2554
  preRequest: z.ZodOptional<z.ZodString>;
1668
2555
  request: z.ZodOptional<z.ZodString>;
2556
+ createAIDataResourceEdit: z.ZodOptional<z.ZodString>;
2557
+ afterAIDataResourceEdit: z.ZodOptional<z.ZodString>;
1669
2558
  }, "strip", z.ZodTypeAny, {
1670
2559
  preRequest?: string | undefined;
1671
2560
  request?: string | undefined;
2561
+ createAIDataResourceEdit?: string | undefined;
2562
+ afterAIDataResourceEdit?: string | undefined;
1672
2563
  }, {
1673
2564
  preRequest?: string | undefined;
1674
2565
  request?: string | undefined;
2566
+ createAIDataResourceEdit?: string | undefined;
2567
+ afterAIDataResourceEdit?: string | undefined;
1675
2568
  }>>;
1676
2569
  uiBadgeText: z.ZodOptional<z.ZodString>;
1677
2570
  variants: z.ZodOptional<z.ZodObject<{
@@ -1681,12 +2574,12 @@ declare const preRequestEdgehancerResultSchema: z.ZodObject<{
1681
2574
  value: z.ZodString;
1682
2575
  omitIfEmpty: z.ZodOptional<z.ZodBoolean>;
1683
2576
  }, "strip", z.ZodTypeAny, {
1684
- key: string;
1685
2577
  value: string;
2578
+ key: string;
1686
2579
  omitIfEmpty?: boolean | undefined;
1687
2580
  }, {
1688
- key: string;
1689
2581
  value: string;
2582
+ key: string;
1690
2583
  omitIfEmpty?: boolean | undefined;
1691
2584
  }>, "many">>;
1692
2585
  parameters: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -1694,12 +2587,12 @@ declare const preRequestEdgehancerResultSchema: z.ZodObject<{
1694
2587
  value: z.ZodString;
1695
2588
  omitIfEmpty: z.ZodOptional<z.ZodBoolean>;
1696
2589
  }, "strip", z.ZodTypeAny, {
1697
- key: string;
1698
2590
  value: string;
2591
+ key: string;
1699
2592
  omitIfEmpty?: boolean | undefined;
1700
2593
  }, {
1701
- key: string;
1702
2594
  value: string;
2595
+ key: string;
1703
2596
  omitIfEmpty?: boolean | undefined;
1704
2597
  }>, "many">>;
1705
2598
  variables: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
@@ -1726,13 +2619,13 @@ declare const preRequestEdgehancerResultSchema: z.ZodObject<{
1726
2619
  }>>>;
1727
2620
  }, "strip", z.ZodTypeAny, {
1728
2621
  headers?: {
1729
- key: string;
1730
2622
  value: string;
2623
+ key: string;
1731
2624
  omitIfEmpty?: boolean | undefined;
1732
2625
  }[] | undefined;
1733
2626
  parameters?: {
1734
- key: string;
1735
2627
  value: string;
2628
+ key: string;
1736
2629
  omitIfEmpty?: boolean | undefined;
1737
2630
  }[] | undefined;
1738
2631
  variables?: Record<string, {
@@ -1745,13 +2638,13 @@ declare const preRequestEdgehancerResultSchema: z.ZodObject<{
1745
2638
  }> | undefined;
1746
2639
  }, {
1747
2640
  headers?: {
1748
- key: string;
1749
2641
  value: string;
2642
+ key: string;
1750
2643
  omitIfEmpty?: boolean | undefined;
1751
2644
  }[] | undefined;
1752
2645
  parameters?: {
1753
- key: string;
1754
2646
  value: string;
2647
+ key: string;
1755
2648
  omitIfEmpty?: boolean | undefined;
1756
2649
  }[] | undefined;
1757
2650
  variables?: Record<string, {
@@ -1772,13 +2665,13 @@ declare const preRequestEdgehancerResultSchema: z.ZodObject<{
1772
2665
  }, "strip", z.ZodTypeAny, {
1773
2666
  unpublished?: ({
1774
2667
  headers?: {
1775
- key: string;
1776
2668
  value: string;
2669
+ key: string;
1777
2670
  omitIfEmpty?: boolean | undefined;
1778
2671
  }[] | undefined;
1779
2672
  parameters?: {
1780
- key: string;
1781
2673
  value: string;
2674
+ key: string;
1782
2675
  omitIfEmpty?: boolean | undefined;
1783
2676
  }[] | undefined;
1784
2677
  variables?: Record<string, {
@@ -1795,13 +2688,13 @@ declare const preRequestEdgehancerResultSchema: z.ZodObject<{
1795
2688
  }, {
1796
2689
  unpublished?: ({
1797
2690
  headers?: {
1798
- key: string;
1799
2691
  value: string;
2692
+ key: string;
1800
2693
  omitIfEmpty?: boolean | undefined;
1801
2694
  }[] | undefined;
1802
2695
  parameters?: {
1803
- key: string;
1804
2696
  value: string;
2697
+ key: string;
1805
2698
  omitIfEmpty?: boolean | undefined;
1806
2699
  }[] | undefined;
1807
2700
  variables?: Record<string, {
@@ -1817,19 +2710,19 @@ declare const preRequestEdgehancerResultSchema: z.ZodObject<{
1817
2710
  }) | undefined;
1818
2711
  }>>;
1819
2712
  enableUnpublishedMode: z.ZodOptional<z.ZodBoolean>;
1820
- }, "displayName" | "variables" | "id" | "allowedOnComponents" | "badgeIconUrl" | "purgeKey" | "edgehancer">, "strip", z.ZodTypeAny, {
2713
+ }, "id" | "displayName" | "variables" | "allowedOnComponents" | "badgeIconUrl" | "purgeKey" | "edgehancer">, "strip", z.ZodTypeAny, {
1821
2714
  url: string;
1822
2715
  connectorType: string;
1823
2716
  method: "GET" | "POST" | "HEAD";
1824
2717
  custom?: Record<string, unknown> | undefined;
1825
2718
  headers?: {
1826
- key: string;
1827
2719
  value: string;
2720
+ key: string;
1828
2721
  omitIfEmpty?: boolean | undefined;
1829
2722
  }[] | undefined;
1830
2723
  parameters?: {
1831
- key: string;
1832
2724
  value: string;
2725
+ key: string;
1833
2726
  omitIfEmpty?: boolean | undefined;
1834
2727
  }[] | undefined;
1835
2728
  archetype?: string | undefined;
@@ -1841,13 +2734,13 @@ declare const preRequestEdgehancerResultSchema: z.ZodObject<{
1841
2734
  variants?: {
1842
2735
  unpublished?: ({
1843
2736
  headers?: {
1844
- key: string;
1845
2737
  value: string;
2738
+ key: string;
1846
2739
  omitIfEmpty?: boolean | undefined;
1847
2740
  }[] | undefined;
1848
2741
  parameters?: {
1849
- key: string;
1850
2742
  value: string;
2743
+ key: string;
1851
2744
  omitIfEmpty?: boolean | undefined;
1852
2745
  }[] | undefined;
1853
2746
  variables?: Record<string, {
@@ -1869,13 +2762,13 @@ declare const preRequestEdgehancerResultSchema: z.ZodObject<{
1869
2762
  method: "GET" | "POST" | "HEAD";
1870
2763
  custom?: Record<string, unknown> | undefined;
1871
2764
  headers?: {
1872
- key: string;
1873
2765
  value: string;
2766
+ key: string;
1874
2767
  omitIfEmpty?: boolean | undefined;
1875
2768
  }[] | undefined;
1876
2769
  parameters?: {
1877
- key: string;
1878
2770
  value: string;
2771
+ key: string;
1879
2772
  omitIfEmpty?: boolean | undefined;
1880
2773
  }[] | undefined;
1881
2774
  archetype?: string | undefined;
@@ -1887,13 +2780,13 @@ declare const preRequestEdgehancerResultSchema: z.ZodObject<{
1887
2780
  variants?: {
1888
2781
  unpublished?: ({
1889
2782
  headers?: {
1890
- key: string;
1891
2783
  value: string;
2784
+ key: string;
1892
2785
  omitIfEmpty?: boolean | undefined;
1893
2786
  }[] | undefined;
1894
2787
  parameters?: {
1895
- key: string;
1896
2788
  value: string;
2789
+ key: string;
1897
2790
  omitIfEmpty?: boolean | undefined;
1898
2791
  }[] | undefined;
1899
2792
  variables?: Record<string, {
@@ -1917,13 +2810,13 @@ declare const preRequestEdgehancerResultSchema: z.ZodObject<{
1917
2810
  method: "GET" | "POST" | "HEAD";
1918
2811
  custom?: Record<string, unknown> | undefined;
1919
2812
  headers?: {
1920
- key: string;
1921
2813
  value: string;
2814
+ key: string;
1922
2815
  omitIfEmpty?: boolean | undefined;
1923
2816
  }[] | undefined;
1924
2817
  parameters?: {
1925
- key: string;
1926
2818
  value: string;
2819
+ key: string;
1927
2820
  omitIfEmpty?: boolean | undefined;
1928
2821
  }[] | undefined;
1929
2822
  archetype?: string | undefined;
@@ -1935,13 +2828,13 @@ declare const preRequestEdgehancerResultSchema: z.ZodObject<{
1935
2828
  variants?: {
1936
2829
  unpublished?: ({
1937
2830
  headers?: {
1938
- key: string;
1939
2831
  value: string;
2832
+ key: string;
1940
2833
  omitIfEmpty?: boolean | undefined;
1941
2834
  }[] | undefined;
1942
2835
  parameters?: {
1943
- key: string;
1944
2836
  value: string;
2837
+ key: string;
1945
2838
  omitIfEmpty?: boolean | undefined;
1946
2839
  }[] | undefined;
1947
2840
  variables?: Record<string, {
@@ -1983,13 +2876,13 @@ declare const preRequestEdgehancerResultSchema: z.ZodObject<{
1983
2876
  method: "GET" | "POST" | "HEAD";
1984
2877
  custom?: Record<string, unknown> | undefined;
1985
2878
  headers?: {
1986
- key: string;
1987
2879
  value: string;
2880
+ key: string;
1988
2881
  omitIfEmpty?: boolean | undefined;
1989
2882
  }[] | undefined;
1990
2883
  parameters?: {
1991
- key: string;
1992
2884
  value: string;
2885
+ key: string;
1993
2886
  omitIfEmpty?: boolean | undefined;
1994
2887
  }[] | undefined;
1995
2888
  archetype?: string | undefined;
@@ -2001,13 +2894,13 @@ declare const preRequestEdgehancerResultSchema: z.ZodObject<{
2001
2894
  variants?: {
2002
2895
  unpublished?: ({
2003
2896
  headers?: {
2004
- key: string;
2005
2897
  value: string;
2898
+ key: string;
2006
2899
  omitIfEmpty?: boolean | undefined;
2007
2900
  }[] | undefined;
2008
2901
  parameters?: {
2009
- key: string;
2010
2902
  value: string;
2903
+ key: string;
2011
2904
  omitIfEmpty?: boolean | undefined;
2012
2905
  }[] | undefined;
2013
2906
  variables?: Record<string, {
@@ -2051,13 +2944,13 @@ declare const preRequestEdgehancerResultSchema: z.ZodObject<{
2051
2944
  method: "GET" | "POST" | "HEAD";
2052
2945
  custom?: Record<string, unknown> | undefined;
2053
2946
  headers?: {
2054
- key: string;
2055
2947
  value: string;
2948
+ key: string;
2056
2949
  omitIfEmpty?: boolean | undefined;
2057
2950
  }[] | undefined;
2058
2951
  parameters?: {
2059
- key: string;
2060
2952
  value: string;
2953
+ key: string;
2061
2954
  omitIfEmpty?: boolean | undefined;
2062
2955
  }[] | undefined;
2063
2956
  archetype?: string | undefined;
@@ -2069,13 +2962,13 @@ declare const preRequestEdgehancerResultSchema: z.ZodObject<{
2069
2962
  variants?: {
2070
2963
  unpublished?: ({
2071
2964
  headers?: {
2072
- key: string;
2073
2965
  value: string;
2966
+ key: string;
2074
2967
  omitIfEmpty?: boolean | undefined;
2075
2968
  }[] | undefined;
2076
2969
  parameters?: {
2077
- key: string;
2078
2970
  value: string;
2971
+ key: string;
2079
2972
  omitIfEmpty?: boolean | undefined;
2080
2973
  }[] | undefined;
2081
2974
  variables?: Record<string, {
@@ -2119,13 +3012,13 @@ declare const preRequestEdgehancerResultSchema: z.ZodObject<{
2119
3012
  method: "GET" | "POST" | "HEAD";
2120
3013
  custom?: Record<string, unknown> | undefined;
2121
3014
  headers?: {
2122
- key: string;
2123
3015
  value: string;
3016
+ key: string;
2124
3017
  omitIfEmpty?: boolean | undefined;
2125
3018
  }[] | undefined;
2126
3019
  parameters?: {
2127
- key: string;
2128
3020
  value: string;
3021
+ key: string;
2129
3022
  omitIfEmpty?: boolean | undefined;
2130
3023
  }[] | undefined;
2131
3024
  archetype?: string | undefined;
@@ -2137,13 +3030,13 @@ declare const preRequestEdgehancerResultSchema: z.ZodObject<{
2137
3030
  variants?: {
2138
3031
  unpublished?: ({
2139
3032
  headers?: {
2140
- key: string;
2141
3033
  value: string;
3034
+ key: string;
2142
3035
  omitIfEmpty?: boolean | undefined;
2143
3036
  }[] | undefined;
2144
3037
  parameters?: {
2145
- key: string;
2146
3038
  value: string;
3039
+ key: string;
2147
3040
  omitIfEmpty?: boolean | undefined;
2148
3041
  }[] | undefined;
2149
3042
  variables?: Record<string, {
@@ -2193,4 +3086,4 @@ declare function getDataResourceQueryString({ parameters, url }: EdgehancerMerge
2193
3086
  /** Gets the HTTP headers for a data resource */
2194
3087
  declare function getDataResourceHeaders({ headers }: EdgehancerMergedDataType): Headers;
2195
3088
 
2196
- export { COLLECTION_DEFAULT_LIMIT, COLLECTION_DEFAULT_OFFSET, COLLECTION_MAX_LIMIT, type ConvertBatchResultsToEdgehancerResultOptions, type CustomEdgehancerDefinition, type DataResource, type DataResourceFetchContext, type EdgehancerDataIssue, type EdgehancerMergedDataType, type MergedDataType, type PreRequestEdgehancerContext, type PreRequestEdgehancerDataResourceContext, type PreRequestEdgehancerDataResourceResult, type PreRequestEdgehancerResult, type PreRequestHookFn, type RequestEdgehancerContext, type RequestEdgehancerDataResourceContext, type RequestEdgehancerDataResourceResolutionResult, type RequestEdgehancerResult, type RequestHookFn, type ResolveBatchIdsResult, convertBatchResultsToEdgehancerResult, dataResourceSchema, edgehancerMergedDataTypeSchema, getDataResourceAsRequest, getDataResourceHeaders, getDataResourceQueryString, getDataResourceUrl, mergedDataTypeSchema, preRequestEdgehancerDataResourceResultSchema, preRequestEdgehancerResultSchema, requestEdgehancerDataResourceResolutionResultSchema, requestEdgehancerResultSchema, resolveBatchFetchIds, resolvingIssueSchema };
3089
+ export { type AfterAIDataResourceEditContext, type AfterAIDataResourceEditHookFn, type AfterAIDataResourceEditResult, type AfterAIEditContext, type AfterAIEditHookFn, type AfterAIEditResult, COLLECTION_DEFAULT_LIMIT, COLLECTION_DEFAULT_OFFSET, COLLECTION_MAX_LIMIT, type ConvertBatchResultsToEdgehancerResultOptions, type CreateAIDataResourceEditContext, type CreateAIDataResourceEditHookFn, type CreateAIDataResourceEditResult, type CreateAIEditContext, type CreateAIEditHookFn, type CreateAIEditResult, type CustomEdgehancerDefinition, type DataResource, type DataResourceFetchContext, type EdgehancerDataIssue, type EdgehancerMergedDataType, type MergedDataType, type PreRequestEdgehancerContext, type PreRequestEdgehancerDataResourceContext, type PreRequestEdgehancerDataResourceResult, type PreRequestEdgehancerResult, type PreRequestHookFn, type RequestEdgehancerContext, type RequestEdgehancerDataResourceContext, type RequestEdgehancerDataResourceResolutionResult, type RequestEdgehancerResult, type RequestHookFn, type ResolveBatchIdsResult, afterAIDataResourceEditContextSchema, afterAIDataResourceEditResultSchema, afterAIEditContextSchema, afterAIEditResultSchema, convertBatchResultsToEdgehancerResult, createAIDataResourceEditContextSchema, createAIDataResourceEditResultSchema, createAIEditContextSchema, createAIEditResultSchema, dataResourceSchema, edgehancerMergedDataTypeSchema, getDataResourceAsRequest, getDataResourceHeaders, getDataResourceQueryString, getDataResourceUrl, mergedDataTypeSchema, preRequestEdgehancerDataResourceResultSchema, preRequestEdgehancerResultSchema, requestEdgehancerDataResourceResolutionResultSchema, requestEdgehancerResultSchema, resolveBatchFetchIds, resolvingIssueSchema };