@uniformdev/mesh-edgehancer-sdk 20.34.3-alpha.70 → 20.35.1-alpha.188

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