@uniformdev/webhooks 20.31.1-alpha.0 → 20.31.1-alpha.184

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.js CHANGED
@@ -1,7 +1,9 @@
1
1
  "use strict";
2
+ var __create = Object.create;
2
3
  var __defProp = Object.defineProperty;
3
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
5
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
6
8
  var __export = (target, all) => {
7
9
  for (var name in all)
@@ -15,6 +17,14 @@ var __copyProps = (to, from, except, desc) => {
15
17
  }
16
18
  return to;
17
19
  };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
18
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
29
 
20
30
  // src/index.ts
@@ -98,68 +108,70 @@ __export(src_exports, {
98
108
  module.exports = __toCommonJS(src_exports);
99
109
 
100
110
  // src/composition/common.ts
101
- var import_zod2 = require("zod");
111
+ var z2 = __toESM(require("zod"));
102
112
 
103
113
  // src/definition.ts
104
- var import_zod = require("zod");
114
+ var z = __toESM(require("zod"));
115
+ var addEventTypeToSchema = (schema, eventType) => z.object({
116
+ ...schema.shape,
117
+ eventType: z.literal(eventType)
118
+ });
105
119
  var isDefinition = (obj) => {
106
120
  return Object.hasOwn(obj, "_definition") && obj["_definition"];
107
121
  };
108
122
  var definition = (options, example) => {
109
123
  return {
110
124
  ...options,
125
+ schema: addEventTypeToSchema(options.schema, options.event),
111
126
  _definition: true,
112
- example
127
+ example: {
128
+ ...example,
129
+ eventType: options.event
130
+ }
113
131
  };
114
132
  };
115
- var webhookInitiatorSchema = import_zod.z.strictObject({
116
- id: import_zod.z.string(),
117
- name: import_zod.z.string().optional(),
118
- email: import_zod.z.string().optional(),
119
- is_api_key: import_zod.z.boolean()
133
+ var webhookInitiatorSchema = z.strictObject({
134
+ id: z.string(),
135
+ name: z.string().optional(),
136
+ email: z.string().optional(),
137
+ is_api_key: z.boolean()
120
138
  });
121
139
 
122
140
  // src/composition/common.ts
123
- var CompositionCorePayloadSchema = import_zod2.z.object({
124
- id: import_zod2.z.string(),
125
- editionId: import_zod2.z.string().optional(),
126
- slug: import_zod2.z.string().optional(),
127
- name: import_zod2.z.string(),
128
- type: import_zod2.z.string(),
129
- project: import_zod2.z.object({
130
- id: import_zod2.z.string(),
131
- url: import_zod2.z.string()
141
+ var CompositionCorePayloadSchema = z2.object({
142
+ id: z2.string(),
143
+ editionId: z2.string().optional(),
144
+ slug: z2.string().optional(),
145
+ name: z2.string(),
146
+ type: z2.string(),
147
+ project: z2.object({
148
+ id: z2.string(),
149
+ url: z2.string()
132
150
  }),
133
151
  initiator: webhookInitiatorSchema
134
152
  });
135
- var CompositionTriggerPayloadSchema = import_zod2.z.object({
136
- trigger: import_zod2.z.object({
137
- type: import_zod2.z.enum(["release"]),
138
- id: import_zod2.z.string()
153
+ var CompositionTriggerPayloadSchema = z2.object({
154
+ trigger: z2.object({
155
+ type: z2.enum(["release"]),
156
+ id: z2.string()
139
157
  }).optional()
140
158
  });
141
- var CompositionDeletePayloadSchema = CompositionCorePayloadSchema.and(
142
- import_zod2.z.object({
143
- state: import_zod2.z.number().optional()
144
- })
145
- );
146
- var CompositionRestorePayloadSchema = CompositionCorePayloadSchema.and(
147
- import_zod2.z.object({
148
- state: import_zod2.z.number()
149
- })
150
- );
151
- var CompositionPayloadSchema = CompositionCorePayloadSchema.and(
152
- import_zod2.z.object({
153
- state: import_zod2.z.number(),
154
- edit_url: import_zod2.z.string(),
155
- api_url: import_zod2.z.string(),
156
- edge_url: import_zod2.z.string()
157
- })
158
- );
159
- var ReleaseCompositionPayloadSchema = import_zod2.z.object({
160
- release: import_zod2.z.object({
161
- id: import_zod2.z.string(),
162
- url: import_zod2.z.string()
159
+ var CompositionDeletePayloadSchema = CompositionCorePayloadSchema.extend({
160
+ state: z2.number().optional()
161
+ });
162
+ var CompositionRestorePayloadSchema = CompositionCorePayloadSchema.extend({
163
+ state: z2.number()
164
+ });
165
+ var CompositionPayloadSchema = CompositionCorePayloadSchema.extend({
166
+ state: z2.number(),
167
+ edit_url: z2.string(),
168
+ api_url: z2.string(),
169
+ edge_url: z2.string()
170
+ });
171
+ var ReleaseCompositionPayloadSchema = z2.object({
172
+ release: z2.object({
173
+ id: z2.string(),
174
+ url: z2.string()
163
175
  })
164
176
  });
165
177
 
@@ -169,7 +181,7 @@ var CompositionChangedDefinition = definition(
169
181
  event: "composition.changed",
170
182
  name: "Composition Changed",
171
183
  description: "Triggers when a composition has been changed.",
172
- schema: CompositionPayloadSchema.and(CompositionTriggerPayloadSchema)
184
+ schema: CompositionPayloadSchema.extend(CompositionTriggerPayloadSchema.shape)
173
185
  },
174
186
  {
175
187
  id: "0b9d2118-f2d0-4fe6-9d46-7c661abaf474",
@@ -205,7 +217,7 @@ var CompositionDeletedDefinition = definition(
205
217
  event: "composition.deleted",
206
218
  name: "Composition Deleted",
207
219
  description: "Triggers when a composition has been deleted.",
208
- schema: CompositionDeletePayloadSchema.and(CompositionTriggerPayloadSchema)
220
+ schema: CompositionDeletePayloadSchema.extend(CompositionTriggerPayloadSchema.shape)
209
221
  },
210
222
  {
211
223
  id: "0b9d2118-f2d0-4fe6-9d46-7c661abaf474",
@@ -238,7 +250,7 @@ var CompositionPublishedDefinition = definition(
238
250
  event: "composition.published",
239
251
  name: "Composition Published",
240
252
  description: "Triggers when a composition has been published.",
241
- schema: CompositionPayloadSchema.and(CompositionTriggerPayloadSchema)
253
+ schema: CompositionPayloadSchema.extend(CompositionTriggerPayloadSchema.shape)
242
254
  },
243
255
  {
244
256
  id: "0b9d2118-f2d0-4fe6-9d46-7c661abaf474",
@@ -274,7 +286,7 @@ var CompositionReleaseChangedDefinition = definition(
274
286
  event: "composition.release.changed",
275
287
  name: "Composition Changed on Release",
276
288
  description: "Triggers when a composition has been changed or copied to a pre-launch release.",
277
- schema: CompositionPayloadSchema.and(ReleaseCompositionPayloadSchema)
289
+ schema: CompositionPayloadSchema.extend(ReleaseCompositionPayloadSchema.shape)
278
290
  },
279
291
  {
280
292
  release: {
@@ -310,7 +322,7 @@ var CompositionReleaseDeletedDefinition = definition(
310
322
  event: "composition.release.deleted",
311
323
  name: "Composition Deleted on Release",
312
324
  description: "Triggers when a composition is deleted that is attached to a pre-launch release.",
313
- schema: CompositionDeletePayloadSchema.and(ReleaseCompositionPayloadSchema)
325
+ schema: CompositionDeletePayloadSchema.extend(ReleaseCompositionPayloadSchema.shape)
314
326
  },
315
327
  {
316
328
  release: {
@@ -343,7 +355,7 @@ var CompositionReleasePublishedDefinition = definition(
343
355
  event: "composition.release.published",
344
356
  name: "Composition Published on Release",
345
357
  description: "Triggers when a composition has been published that is attached to an pre-launch release.",
346
- schema: CompositionPayloadSchema.and(ReleaseCompositionPayloadSchema)
358
+ schema: CompositionPayloadSchema.extend(ReleaseCompositionPayloadSchema.shape)
347
359
  },
348
360
  {
349
361
  release: {
@@ -379,7 +391,7 @@ var CompositionReleaseRestoredDefinition = definition(
379
391
  event: "composition.release.restored",
380
392
  name: "Composition Restored on Release",
381
393
  description: "Triggers when a composition deleted in a pre-launch release is restored.",
382
- schema: CompositionRestorePayloadSchema.and(ReleaseCompositionPayloadSchema)
394
+ schema: CompositionRestorePayloadSchema.extend(ReleaseCompositionPayloadSchema.shape)
383
395
  },
384
396
  {
385
397
  release: {
@@ -407,47 +419,41 @@ var CompositionReleaseRestoredDefinition = definition(
407
419
  var CompositionReleaseRestoredEventName = CompositionReleaseRestoredDefinition["event"];
408
420
 
409
421
  // src/entry/common.ts
410
- var import_zod3 = require("zod");
411
- var EntryCorePayloadSchema = import_zod3.z.object({
412
- id: import_zod3.z.string(),
413
- editionId: import_zod3.z.string().optional(),
414
- slug: import_zod3.z.string().optional(),
415
- name: import_zod3.z.string(),
416
- type: import_zod3.z.string(),
417
- project: import_zod3.z.object({
418
- id: import_zod3.z.string(),
419
- url: import_zod3.z.string()
422
+ var z3 = __toESM(require("zod"));
423
+ var EntryCorePayloadSchema = z3.object({
424
+ id: z3.string(),
425
+ editionId: z3.string().optional(),
426
+ slug: z3.string().optional(),
427
+ name: z3.string(),
428
+ type: z3.string(),
429
+ project: z3.object({
430
+ id: z3.string(),
431
+ url: z3.string()
420
432
  }),
421
433
  initiator: webhookInitiatorSchema
422
434
  });
423
- var EntryTriggerPayloadSchema = import_zod3.z.object({
424
- trigger: import_zod3.z.object({
425
- type: import_zod3.z.enum(["release"]),
426
- id: import_zod3.z.string()
435
+ var EntryTriggerPayloadSchema = z3.object({
436
+ trigger: z3.object({
437
+ type: z3.enum(["release"]),
438
+ id: z3.string()
427
439
  }).optional()
428
440
  });
429
- var EntryDeletePayloadSchema = EntryCorePayloadSchema.and(
430
- import_zod3.z.object({
431
- state: import_zod3.z.number().optional()
432
- })
433
- );
434
- var EntryRestorePayloadSchema = EntryCorePayloadSchema.and(
435
- import_zod3.z.object({
436
- state: import_zod3.z.number()
437
- })
438
- );
439
- var EntryPayloadSchema = EntryCorePayloadSchema.and(
440
- import_zod3.z.object({
441
- state: import_zod3.z.number(),
442
- edit_url: import_zod3.z.string(),
443
- api_url: import_zod3.z.string(),
444
- edge_url: import_zod3.z.string()
445
- })
446
- );
447
- var ReleaseEntryPayloadSchema = import_zod3.z.object({
448
- release: import_zod3.z.object({
449
- id: import_zod3.z.string(),
450
- url: import_zod3.z.string()
441
+ var EntryDeletePayloadSchema = EntryCorePayloadSchema.extend({
442
+ state: z3.number().optional()
443
+ });
444
+ var EntryRestorePayloadSchema = EntryCorePayloadSchema.extend({
445
+ state: z3.number()
446
+ });
447
+ var EntryPayloadSchema = EntryCorePayloadSchema.extend({
448
+ state: z3.number(),
449
+ edit_url: z3.string(),
450
+ api_url: z3.string(),
451
+ edge_url: z3.string()
452
+ });
453
+ var ReleaseEntryPayloadSchema = z3.object({
454
+ release: z3.object({
455
+ id: z3.string(),
456
+ url: z3.string()
451
457
  })
452
458
  });
453
459
 
@@ -457,7 +463,7 @@ var EntryChangedDefinition = definition(
457
463
  event: "entry.changed",
458
464
  name: "Entry Changed",
459
465
  description: "Triggers when an entry has been changed.",
460
- schema: EntryPayloadSchema.and(EntryTriggerPayloadSchema)
466
+ schema: EntryPayloadSchema.extend(EntryTriggerPayloadSchema.shape)
461
467
  },
462
468
  {
463
469
  id: "e5c95c60-314b-4700-9035-6f9c2a4ff800",
@@ -493,7 +499,7 @@ var EntryDeletedDefinition = definition(
493
499
  event: "entry.deleted",
494
500
  name: "Entry Deleted",
495
501
  description: "Triggers when an entry has been deleted.",
496
- schema: EntryDeletePayloadSchema.and(EntryTriggerPayloadSchema)
502
+ schema: EntryDeletePayloadSchema.extend(EntryTriggerPayloadSchema.shape)
497
503
  },
498
504
  {
499
505
  id: "e5c95c60-314b-4700-9035-6f9c2a4ff800",
@@ -526,7 +532,7 @@ var EntryPublishedDefinition = definition(
526
532
  event: "entry.published",
527
533
  name: "Entry Published",
528
534
  description: "Triggers when an entry has been published.",
529
- schema: EntryPayloadSchema.and(EntryTriggerPayloadSchema)
535
+ schema: EntryPayloadSchema.extend(EntryTriggerPayloadSchema.shape)
530
536
  },
531
537
  {
532
538
  id: "e5c95c60-314b-4700-9035-6f9c2a4ff800",
@@ -562,7 +568,7 @@ var EntryReleaseChangedDefinition = definition(
562
568
  event: "entry.release.changed",
563
569
  name: "Entry Changed on Release",
564
570
  description: "Triggers when an entry has been changed that is attached to a pre-launch release.",
565
- schema: EntryPayloadSchema.and(ReleaseEntryPayloadSchema)
571
+ schema: EntryPayloadSchema.extend(ReleaseEntryPayloadSchema.shape)
566
572
  },
567
573
  {
568
574
  release: {
@@ -598,7 +604,7 @@ var EntryReleaseDeletedDefinition = definition(
598
604
  event: "entry.release.deleted",
599
605
  name: "Entry Deleted on Release",
600
606
  description: "Triggers when an entry has been deleted that is attached to a pre-launch release.",
601
- schema: EntryDeletePayloadSchema.and(ReleaseEntryPayloadSchema)
607
+ schema: EntryDeletePayloadSchema.extend(ReleaseEntryPayloadSchema.shape)
602
608
  },
603
609
  {
604
610
  release: {
@@ -631,7 +637,7 @@ var EntryReleasePublishedDefinition = definition(
631
637
  event: "entry.release.published",
632
638
  name: "Entry Published on Release",
633
639
  description: "Triggers when an entry has been published that is attached to a pre-launch release.",
634
- schema: EntryPayloadSchema.and(ReleaseEntryPayloadSchema)
640
+ schema: EntryPayloadSchema.extend(ReleaseEntryPayloadSchema.shape)
635
641
  },
636
642
  {
637
643
  release: {
@@ -667,7 +673,7 @@ var EntryReleaseRestoredDefinition = definition(
667
673
  event: "entry.release.restored",
668
674
  name: "Entry Restored on Release",
669
675
  description: "Triggers when an entry deleted in a pre-launch release is restored.",
670
- schema: EntryRestorePayloadSchema.and(ReleaseEntryPayloadSchema)
676
+ schema: EntryRestorePayloadSchema.extend(ReleaseEntryPayloadSchema.shape)
671
677
  },
672
678
  {
673
679
  release: {
@@ -695,17 +701,17 @@ var EntryReleaseRestoredDefinition = definition(
695
701
  var EntryReleaseRestoredEventName = EntryReleaseRestoredDefinition["event"];
696
702
 
697
703
  // src/manifest/manifest.published.ts
698
- var import_zod4 = require("zod");
704
+ var z4 = __toESM(require("zod"));
699
705
  var ManifestPublishedDefinition = definition(
700
706
  {
701
707
  event: "manifest.published",
702
708
  name: "Manifest Published",
703
709
  description: "Triggers when a manifest has been published.",
704
- schema: import_zod4.z.object({
705
- timestamp: import_zod4.z.string(),
706
- site: import_zod4.z.object({
707
- id: import_zod4.z.string(),
708
- name: import_zod4.z.string()
710
+ schema: z4.object({
711
+ timestamp: z4.string(),
712
+ site: z4.object({
713
+ id: z4.string(),
714
+ name: z4.string()
709
715
  })
710
716
  })
711
717
  },
@@ -720,16 +726,16 @@ var ManifestPublishedDefinition = definition(
720
726
  var ManifestPublishedEventName = ManifestPublishedDefinition["event"];
721
727
 
722
728
  // src/project-map/projectMap.delete.ts
723
- var import_zod5 = require("zod");
729
+ var z5 = __toESM(require("zod"));
724
730
  var ProjectMapDeleteDefinition = definition(
725
731
  {
726
732
  event: "projectmap.delete",
727
733
  name: "Project Map Deleted",
728
734
  description: "Triggers when a project map is deleted.",
729
- schema: import_zod5.z.object({
730
- id: import_zod5.z.string(),
731
- base_url: import_zod5.z.string().optional(),
732
- project_id: import_zod5.z.string()
735
+ schema: z5.object({
736
+ id: z5.string(),
737
+ base_url: z5.string().optional(),
738
+ project_id: z5.string()
733
739
  })
734
740
  },
735
741
  {
@@ -741,24 +747,24 @@ var ProjectMapDeleteDefinition = definition(
741
747
  var ProjectMapDeletedEventName = ProjectMapDeleteDefinition["event"];
742
748
 
743
749
  // src/project-map/projectMap.node.delete.ts
744
- var import_zod6 = require("zod");
750
+ var z6 = __toESM(require("zod"));
745
751
  var ProjectMapNodeDeleteDefinition = definition(
746
752
  {
747
753
  event: "projectmap.node.delete",
748
754
  name: "Project Map Node Deleted",
749
755
  description: "Triggers when a project map node is deleted.",
750
- schema: import_zod6.z.object({
751
- project_id: import_zod6.z.string(),
752
- project_map_id: import_zod6.z.string(),
753
- name: import_zod6.z.string(),
754
- id: import_zod6.z.string(),
755
- path: import_zod6.z.string(),
756
- composition_id: import_zod6.z.string().optional(),
757
- locales: import_zod6.z.record(
758
- import_zod6.z.object({
759
- name: import_zod6.z.string(),
760
- inherited: import_zod6.z.boolean(),
761
- path: import_zod6.z.string()
756
+ schema: z6.object({
757
+ project_id: z6.string(),
758
+ project_map_id: z6.string(),
759
+ name: z6.string(),
760
+ id: z6.string(),
761
+ path: z6.string(),
762
+ composition_id: z6.string().optional(),
763
+ locales: z6.record(
764
+ z6.object({
765
+ name: z6.string(),
766
+ inherited: z6.boolean(),
767
+ path: z6.string()
762
768
  })
763
769
  ).optional(),
764
770
  initiator: webhookInitiatorSchema
@@ -789,24 +795,24 @@ var ProjectMapNodeDeleteDefinition = definition(
789
795
  var ProjectMapNodeDeletedEventName = ProjectMapNodeDeleteDefinition["event"];
790
796
 
791
797
  // src/project-map/projectMap.node.insert.ts
792
- var import_zod7 = require("zod");
798
+ var z7 = __toESM(require("zod"));
793
799
  var ProjectMapNodeInsertDefinition = definition(
794
800
  {
795
801
  event: "projectmap.node.insert",
796
802
  name: "Project Map Node Inserted",
797
803
  description: "Triggers when a project map node is inserted.",
798
- schema: import_zod7.z.object({
799
- id: import_zod7.z.string(),
800
- name: import_zod7.z.string(),
801
- project_map_id: import_zod7.z.string(),
802
- project_id: import_zod7.z.string(),
803
- path: import_zod7.z.string(),
804
- composition_id: import_zod7.z.string().optional(),
805
- locales: import_zod7.z.record(
806
- import_zod7.z.object({
807
- name: import_zod7.z.string(),
808
- inherited: import_zod7.z.boolean(),
809
- path: import_zod7.z.string()
804
+ schema: z7.object({
805
+ id: z7.string(),
806
+ name: z7.string(),
807
+ project_map_id: z7.string(),
808
+ project_id: z7.string(),
809
+ path: z7.string(),
810
+ composition_id: z7.string().optional(),
811
+ locales: z7.record(
812
+ z7.object({
813
+ name: z7.string(),
814
+ inherited: z7.boolean(),
815
+ path: z7.string()
810
816
  })
811
817
  ).optional(),
812
818
  initiator: webhookInitiatorSchema
@@ -837,26 +843,26 @@ var ProjectMapNodeInsertDefinition = definition(
837
843
  var ProjectMapNodeInsertedEventName = ProjectMapNodeInsertDefinition["event"];
838
844
 
839
845
  // src/project-map/projectMap.node.update.ts
840
- var import_zod8 = require("zod");
846
+ var z8 = __toESM(require("zod"));
841
847
  var ProjectMapNodeUpdateDefinition = definition(
842
848
  {
843
849
  event: "projectmap.node.update",
844
850
  name: "Project Map Node Updated",
845
851
  description: "Triggers when a project map node is updated.",
846
- schema: import_zod8.z.object({
847
- id: import_zod8.z.string(),
848
- name: import_zod8.z.string(),
849
- project_map_id: import_zod8.z.string(),
850
- project_id: import_zod8.z.string(),
851
- path: import_zod8.z.string(),
852
- composition_id: import_zod8.z.string().optional(),
853
- previous_path: import_zod8.z.string(),
854
- locales: import_zod8.z.record(
855
- import_zod8.z.object({
856
- name: import_zod8.z.string(),
857
- inherited: import_zod8.z.boolean(),
858
- path: import_zod8.z.string(),
859
- previous_path: import_zod8.z.string()
852
+ schema: z8.object({
853
+ id: z8.string(),
854
+ name: z8.string(),
855
+ project_map_id: z8.string(),
856
+ project_id: z8.string(),
857
+ path: z8.string(),
858
+ composition_id: z8.string().optional(),
859
+ previous_path: z8.string(),
860
+ locales: z8.record(
861
+ z8.object({
862
+ name: z8.string(),
863
+ inherited: z8.boolean(),
864
+ path: z8.string(),
865
+ previous_path: z8.string()
860
866
  })
861
867
  ).optional(),
862
868
  initiator: webhookInitiatorSchema
@@ -889,16 +895,16 @@ var ProjectMapNodeUpdateDefinition = definition(
889
895
  var ProjectMapNodeUpdatedEventName = ProjectMapNodeUpdateDefinition["event"];
890
896
 
891
897
  // src/project-map/projectMap.update.ts
892
- var import_zod9 = require("zod");
898
+ var z9 = __toESM(require("zod"));
893
899
  var ProjectMapUpdateDefinition = definition(
894
900
  {
895
901
  event: "projectmap.update",
896
902
  name: "Project map Updated",
897
903
  description: "Triggers when a project map is updated or created.",
898
- schema: import_zod9.z.object({
899
- id: import_zod9.z.string(),
900
- base_url: import_zod9.z.string().optional(),
901
- project_id: import_zod9.z.string()
904
+ schema: z9.object({
905
+ id: z9.string(),
906
+ base_url: z9.string().optional(),
907
+ project_id: z9.string()
902
908
  })
903
909
  },
904
910
  {
@@ -910,18 +916,18 @@ var ProjectMapUpdateDefinition = definition(
910
916
  var ProjectMapUpdatedEventName = ProjectMapUpdateDefinition["event"];
911
917
 
912
918
  // src/redirect/redirect.delete.ts
913
- var import_zod10 = require("zod");
919
+ var z10 = __toESM(require("zod"));
914
920
  var RedirectDeleteDefinition = definition(
915
921
  {
916
922
  event: "redirect.delete",
917
923
  name: "Redirect Deleted",
918
924
  description: "Triggers when a redirect is deleted.",
919
- schema: import_zod10.z.object({
920
- project_id: import_zod10.z.string(),
921
- id: import_zod10.z.string(),
922
- source_url: import_zod10.z.string(),
923
- target_url: import_zod10.z.string(),
924
- target_status_code: import_zod10.z.number(),
925
+ schema: z10.object({
926
+ project_id: z10.string(),
927
+ id: z10.string(),
928
+ source_url: z10.string(),
929
+ target_url: z10.string(),
930
+ target_status_code: z10.number(),
925
931
  initiator: webhookInitiatorSchema
926
932
  })
927
933
  },
@@ -942,18 +948,18 @@ var RedirectDeleteDefinition = definition(
942
948
  var RedirectDeletedEventName = RedirectDeleteDefinition["event"];
943
949
 
944
950
  // src/redirect/redirect.insert.ts
945
- var import_zod11 = require("zod");
951
+ var z11 = __toESM(require("zod"));
946
952
  var RedirectInsertDefinition = definition(
947
953
  {
948
954
  event: "redirect.insert",
949
955
  name: "Redirect Inserted",
950
956
  description: "Triggers when a redirect is inserted.",
951
- schema: import_zod11.z.object({
952
- project_id: import_zod11.z.string(),
953
- id: import_zod11.z.string(),
954
- source_url: import_zod11.z.string(),
955
- target_url: import_zod11.z.string(),
956
- target_status_code: import_zod11.z.number(),
957
+ schema: z11.object({
958
+ project_id: z11.string(),
959
+ id: z11.string(),
960
+ source_url: z11.string(),
961
+ target_url: z11.string(),
962
+ target_status_code: z11.number(),
957
963
  initiator: webhookInitiatorSchema
958
964
  })
959
965
  },
@@ -974,18 +980,18 @@ var RedirectInsertDefinition = definition(
974
980
  var RedirectInsertedEventName = RedirectInsertDefinition["event"];
975
981
 
976
982
  // src/redirect/redirect.update.ts
977
- var import_zod12 = require("zod");
983
+ var z12 = __toESM(require("zod"));
978
984
  var RedirectUpdateDefinition = definition(
979
985
  {
980
986
  event: "redirect.update",
981
987
  name: "Redirect Updated",
982
988
  description: "Triggers when a redirect is updated.",
983
- schema: import_zod12.z.object({
984
- project_id: import_zod12.z.string(),
985
- id: import_zod12.z.string(),
986
- source_url: import_zod12.z.string(),
987
- target_url: import_zod12.z.string(),
988
- target_status_code: import_zod12.z.number(),
989
+ schema: z12.object({
990
+ project_id: z12.string(),
991
+ id: z12.string(),
992
+ source_url: z12.string(),
993
+ target_url: z12.string(),
994
+ target_status_code: z12.number(),
989
995
  initiator: webhookInitiatorSchema
990
996
  })
991
997
  },
@@ -1006,19 +1012,19 @@ var RedirectUpdateDefinition = definition(
1006
1012
  var RedirectUpdatedEventName = RedirectUpdateDefinition["event"];
1007
1013
 
1008
1014
  // src/release/common.ts
1009
- var import_zod13 = require("zod");
1010
- var ReleasePayloadSchema = import_zod13.z.object({
1011
- id: import_zod13.z.string(),
1012
- state: import_zod13.z.enum(["open", "locked", "queued", "launching", "launched", "deleting"]),
1013
- name: import_zod13.z.string(),
1014
- project: import_zod13.z.object({
1015
- id: import_zod13.z.string(),
1016
- url: import_zod13.z.string()
1015
+ var z13 = __toESM(require("zod"));
1016
+ var ReleasePayloadSchema = z13.object({
1017
+ id: z13.string(),
1018
+ state: z13.enum(["open", "locked", "queued", "launching", "launched", "deleting"]),
1019
+ name: z13.string(),
1020
+ project: z13.object({
1021
+ id: z13.string(),
1022
+ url: z13.string()
1017
1023
  }),
1018
- autoLaunchSchedule: import_zod13.z.number().optional(),
1019
- autoLaunchScheduleTimeZone: import_zod13.z.string().optional(),
1020
- edit_url: import_zod13.z.string(),
1021
- api_url: import_zod13.z.string()
1024
+ autoLaunchSchedule: z13.number().optional(),
1025
+ autoLaunchScheduleTimeZone: z13.string().optional(),
1026
+ edit_url: z13.string(),
1027
+ api_url: z13.string()
1022
1028
  });
1023
1029
 
1024
1030
  // src/release/release.changed.ts
@@ -1140,30 +1146,30 @@ var ArchivedReleaseLaunchStartedDefinition = definition(
1140
1146
  );
1141
1147
 
1142
1148
  // src/workflow/common.ts
1143
- var import_zod14 = require("zod");
1144
- var WorkflowReferenceSchema = import_zod14.z.strictObject({
1145
- workflowId: import_zod14.z.string(),
1146
- workflowName: import_zod14.z.string(),
1147
- stageId: import_zod14.z.string(),
1148
- stageName: import_zod14.z.string()
1149
+ var z14 = __toESM(require("zod"));
1150
+ var WorkflowReferenceSchema = z14.strictObject({
1151
+ workflowId: z14.string(),
1152
+ workflowName: z14.string(),
1153
+ stageId: z14.string(),
1154
+ stageName: z14.string()
1149
1155
  });
1150
- var WorkflowEntitySchema = import_zod14.z.strictObject({
1151
- type: import_zod14.z.enum(["entry", "component"]),
1152
- name: import_zod14.z.string(),
1153
- id: import_zod14.z.string(),
1154
- editionId: import_zod14.z.string().optional(),
1155
- releaseId: import_zod14.z.string().optional(),
1156
- url: import_zod14.z.string()
1156
+ var WorkflowEntitySchema = z14.strictObject({
1157
+ type: z14.enum(["entry", "component"]),
1158
+ name: z14.string(),
1159
+ id: z14.string(),
1160
+ editionId: z14.string().optional(),
1161
+ releaseId: z14.string().optional(),
1162
+ url: z14.string()
1157
1163
  });
1158
- var WorkflowTransitionPayloadSchema = import_zod14.z.strictObject({
1164
+ var WorkflowTransitionPayloadSchema = z14.strictObject({
1159
1165
  entity: WorkflowEntitySchema,
1160
1166
  newStage: WorkflowReferenceSchema,
1161
1167
  previousStage: WorkflowReferenceSchema.optional(),
1162
1168
  initiator: webhookInitiatorSchema,
1163
- timestamp: import_zod14.z.string(),
1164
- project: import_zod14.z.object({
1165
- id: import_zod14.z.string(),
1166
- url: import_zod14.z.string()
1169
+ timestamp: z14.string(),
1170
+ project: z14.object({
1171
+ id: z14.string(),
1172
+ url: z14.string()
1167
1173
  })
1168
1174
  });
1169
1175