@uniformdev/webhooks 19.196.1 → 19.198.0

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.esm.js CHANGED
@@ -1,59 +1,69 @@
1
1
  // src/composition/common.ts
2
+ import { z as z2 } from "zod";
3
+
4
+ // src/definition.ts
2
5
  import { z } from "zod";
3
- var CompositionCorePayloadSchema = z.object({
6
+ var isDefinition = (obj) => {
7
+ return Object.hasOwn(obj, "_definition") && obj["_definition"];
8
+ };
9
+ var definition = (options, example) => {
10
+ return {
11
+ ...options,
12
+ _definition: true,
13
+ example
14
+ };
15
+ };
16
+ var webhookInitiatorSchema = z.strictObject({
4
17
  id: z.string(),
5
- editionId: z.string().optional(),
6
- slug: z.string().optional(),
7
- name: z.string(),
8
- type: z.string(),
9
- project: z.object({
10
- id: z.string(),
11
- url: z.string()
12
- })
18
+ name: z.string().optional(),
19
+ email: z.string().optional(),
20
+ is_api_key: z.boolean()
21
+ });
22
+
23
+ // src/composition/common.ts
24
+ var CompositionCorePayloadSchema = z2.object({
25
+ id: z2.string(),
26
+ editionId: z2.string().optional(),
27
+ slug: z2.string().optional(),
28
+ name: z2.string(),
29
+ type: z2.string(),
30
+ project: z2.object({
31
+ id: z2.string(),
32
+ url: z2.string()
33
+ }),
34
+ initiator: webhookInitiatorSchema
13
35
  });
14
- var CompositionTriggerPayloadSchema = z.object({
15
- trigger: z.object({
16
- type: z.enum(["release"]),
17
- id: z.string()
36
+ var CompositionTriggerPayloadSchema = z2.object({
37
+ trigger: z2.object({
38
+ type: z2.enum(["release"]),
39
+ id: z2.string()
18
40
  }).optional()
19
41
  });
20
42
  var CompositionDeletePayloadSchema = CompositionCorePayloadSchema.and(
21
- z.object({
22
- state: z.number().optional()
43
+ z2.object({
44
+ state: z2.number().optional()
23
45
  })
24
46
  );
25
47
  var CompositionRestorePayloadSchema = CompositionCorePayloadSchema.and(
26
- z.object({
27
- state: z.number()
48
+ z2.object({
49
+ state: z2.number()
28
50
  })
29
51
  );
30
52
  var CompositionPayloadSchema = CompositionCorePayloadSchema.and(
31
- z.object({
32
- state: z.number(),
33
- edit_url: z.string(),
34
- api_url: z.string(),
35
- edge_url: z.string()
53
+ z2.object({
54
+ state: z2.number(),
55
+ edit_url: z2.string(),
56
+ api_url: z2.string(),
57
+ edge_url: z2.string()
36
58
  })
37
59
  );
38
- var ReleaseCompositionPayloadSchema = z.object({
39
- release: z.object({
40
- id: z.string(),
41
- url: z.string()
60
+ var ReleaseCompositionPayloadSchema = z2.object({
61
+ release: z2.object({
62
+ id: z2.string(),
63
+ url: z2.string()
42
64
  })
43
65
  });
44
66
 
45
- // src/definition.ts
46
- var isDefinition = (obj) => {
47
- return Object.hasOwn(obj, "_definition") && obj["_definition"];
48
- };
49
- var definition = (options, example) => {
50
- return {
51
- ...options,
52
- _definition: true,
53
- example
54
- };
55
- };
56
-
57
67
  // src/composition/composition.changed.ts
58
68
  var CompositionChangedDefinition = definition(
59
69
  {
@@ -79,6 +89,12 @@ var CompositionChangedDefinition = definition(
79
89
  trigger: {
80
90
  type: "release",
81
91
  id: "a7bce3da-9727-4ca8-b95b-57f731445c3f"
92
+ },
93
+ initiator: {
94
+ id: "useruniqueid",
95
+ email: "foo@bar.com",
96
+ name: "A User",
97
+ is_api_key: false
82
98
  }
83
99
  }
84
100
  );
@@ -106,6 +122,12 @@ var CompositionDeletedDefinition = definition(
106
122
  trigger: {
107
123
  type: "release",
108
124
  id: "a7bce3da-9727-4ca8-b95b-57f731445c3f"
125
+ },
126
+ initiator: {
127
+ id: "useruniqueid",
128
+ email: "foo@bar.com",
129
+ name: "A User",
130
+ is_api_key: false
109
131
  }
110
132
  }
111
133
  );
@@ -136,6 +158,12 @@ var CompositionPublishedDefinition = definition(
136
158
  trigger: {
137
159
  type: "release",
138
160
  id: "a7bce3da-9727-4ca8-b95b-57f731445c3f"
161
+ },
162
+ initiator: {
163
+ id: "useruniqueid",
164
+ email: "foo@bar.com",
165
+ name: "A User",
166
+ is_api_key: false
139
167
  }
140
168
  }
141
169
  );
@@ -166,7 +194,13 @@ var CompositionReleaseChangedDefinition = definition(
166
194
  state: 64,
167
195
  edit_url: `https://uniform.app/projects/644ede73-d6aa-4159-bf98-14ad7fb4cb66/dashboards/canvas/edit/0b9d2118-f2d0-4fe6-9d46-7c661abaf474?release=48293345-f2d0-1125-afda-7c661abad432`,
168
196
  api_url: `https://uniform.app/api/v1/canvas?projectId=644ede73-d6aa-4159-bf98-14ad7fb4cb66&compositionId=0b9d2118-f2d0-4fe6-9d46-7c661abaf474&state=64&releaseId=48293345-f2d0-1125-afda-7c661abad432`,
169
- edge_url: `https://uniform.global/api/v1/compositions?projectId=644ede73-d6aa-4159-bf98-14ad7fb4cb66&compositionId=0b9d2118-f2d0-4fe6-9d46-7c661abaf474&state=64&releaseId=48293345-f2d0-1125-afda-7c661abad432`
197
+ edge_url: `https://uniform.global/api/v1/compositions?projectId=644ede73-d6aa-4159-bf98-14ad7fb4cb66&compositionId=0b9d2118-f2d0-4fe6-9d46-7c661abaf474&state=64&releaseId=48293345-f2d0-1125-afda-7c661abad432`,
198
+ initiator: {
199
+ id: "useruniqueid",
200
+ email: "foo@bar.com",
201
+ name: "A User",
202
+ is_api_key: false
203
+ }
170
204
  }
171
205
  );
172
206
  var CompositionReleaseChangedEventName = CompositionReleaseChangedDefinition["event"];
@@ -193,6 +227,12 @@ var CompositionReleaseDeletedDefinition = definition(
193
227
  project: {
194
228
  id: "644ede73-d6aa-4159-bf98-14ad7fb4cb66",
195
229
  url: `https://uniform.app/projects/644ede73-d6aa-4159-bf98-14ad7fb4cb66`
230
+ },
231
+ initiator: {
232
+ id: "useruniqueid",
233
+ email: "foo@bar.com",
234
+ name: "A User",
235
+ is_api_key: false
196
236
  }
197
237
  }
198
238
  );
@@ -223,7 +263,13 @@ var CompositionReleasePublishedDefinition = definition(
223
263
  state: 64,
224
264
  edit_url: `https://uniform.app/projects/644ede73-d6aa-4159-bf98-14ad7fb4cb66/dashboards/canvas/edit/0b9d2118-f2d0-4fe6-9d46-7c661abaf474?release=48293345-f2d0-1125-afda-7c661abad432`,
225
265
  api_url: `https://uniform.app/api/v1/canvas?projectId=644ede73-d6aa-4159-bf98-14ad7fb4cb66&compositionId=0b9d2118-f2d0-4fe6-9d46-7c661abaf474&state=64?releaseId=48293345-f2d0-1125-afda-7c661abad432`,
226
- edge_url: `https://uniform.global/api/v1/compositions?projectId=644ede73-d6aa-4159-bf98-14ad7fb4cb66&compositionId=0b9d2118-f2d0-4fe6-9d46-7c661abaf474&state=64?releaseId=48293345-f2d0-1125-afda-7c661abad432`
266
+ edge_url: `https://uniform.global/api/v1/compositions?projectId=644ede73-d6aa-4159-bf98-14ad7fb4cb66&compositionId=0b9d2118-f2d0-4fe6-9d46-7c661abaf474&state=64?releaseId=48293345-f2d0-1125-afda-7c661abad432`,
267
+ initiator: {
268
+ id: "useruniqueid",
269
+ email: "foo@bar.com",
270
+ name: "A User",
271
+ is_api_key: false
272
+ }
227
273
  }
228
274
  );
229
275
  var CompositionReleasePublishedEventName = CompositionReleasePublishedDefinition["event"];
@@ -250,52 +296,59 @@ var CompositionReleaseRestoredDefinition = definition(
250
296
  project: {
251
297
  id: "644ede73-d6aa-4159-bf98-14ad7fb4cb66",
252
298
  url: `https://uniform.app/projects/644ede73-d6aa-4159-bf98-14ad7fb4cb66`
299
+ },
300
+ initiator: {
301
+ id: "useruniqueid",
302
+ email: "foo@bar.com",
303
+ name: "A User",
304
+ is_api_key: false
253
305
  }
254
306
  }
255
307
  );
256
308
  var CompositionReleaseRestoredEventName = CompositionReleaseRestoredDefinition["event"];
257
309
 
258
310
  // src/entry/common.ts
259
- import { z as z2 } from "zod";
260
- var EntryCorePayloadSchema = z2.object({
261
- id: z2.string(),
262
- editionId: z2.string().optional(),
263
- slug: z2.string().optional(),
264
- name: z2.string(),
265
- type: z2.string(),
266
- project: z2.object({
267
- id: z2.string(),
268
- url: z2.string()
269
- })
311
+ import { z as z3 } from "zod";
312
+ var EntryCorePayloadSchema = z3.object({
313
+ id: z3.string(),
314
+ editionId: z3.string().optional(),
315
+ slug: z3.string().optional(),
316
+ name: z3.string(),
317
+ type: z3.string(),
318
+ project: z3.object({
319
+ id: z3.string(),
320
+ url: z3.string()
321
+ }),
322
+ initiator: webhookInitiatorSchema
270
323
  });
271
- var EntryTriggerPayloadSchema = z2.object({
272
- trigger: z2.object({
273
- type: z2.enum(["release"]),
274
- id: z2.string()
324
+ var EntryTriggerPayloadSchema = z3.object({
325
+ trigger: z3.object({
326
+ type: z3.enum(["release"]),
327
+ id: z3.string()
275
328
  }).optional()
276
329
  });
277
330
  var EntryDeletePayloadSchema = EntryCorePayloadSchema.and(
278
- z2.object({
279
- state: z2.number().optional()
331
+ z3.object({
332
+ state: z3.number().optional()
280
333
  })
281
334
  );
282
335
  var EntryRestorePayloadSchema = EntryCorePayloadSchema.and(
283
- z2.object({
284
- state: z2.number()
336
+ z3.object({
337
+ state: z3.number()
285
338
  })
286
339
  );
287
340
  var EntryPayloadSchema = EntryCorePayloadSchema.and(
288
- z2.object({
289
- state: z2.number(),
290
- edit_url: z2.string(),
291
- api_url: z2.string(),
292
- edge_url: z2.string()
341
+ z3.object({
342
+ state: z3.number(),
343
+ edit_url: z3.string(),
344
+ api_url: z3.string(),
345
+ edge_url: z3.string()
293
346
  })
294
347
  );
295
- var ReleaseEntryPayloadSchema = z2.object({
296
- release: z2.object({
297
- id: z2.string(),
298
- url: z2.string()
348
+ var ReleaseEntryPayloadSchema = z3.object({
349
+ release: z3.object({
350
+ id: z3.string(),
351
+ url: z3.string()
299
352
  })
300
353
  });
301
354
 
@@ -324,6 +377,12 @@ var EntryChangedDefinition = definition(
324
377
  trigger: {
325
378
  type: "release",
326
379
  id: "a7bce3da-9727-4ca8-b95b-57f731445c3f"
380
+ },
381
+ initiator: {
382
+ id: "useruniqueid",
383
+ email: "foo@bar.com",
384
+ name: "A User",
385
+ is_api_key: false
327
386
  }
328
387
  }
329
388
  );
@@ -351,6 +410,12 @@ var EntryDeletedDefinition = definition(
351
410
  trigger: {
352
411
  type: "release",
353
412
  id: "a7bce3da-9727-4ca8-b95b-57f731445c3f"
413
+ },
414
+ initiator: {
415
+ id: "useruniqueid",
416
+ email: "foo@bar.com",
417
+ name: "A User",
418
+ is_api_key: false
354
419
  }
355
420
  }
356
421
  );
@@ -381,6 +446,12 @@ var EntryPublishedDefinition = definition(
381
446
  trigger: {
382
447
  type: "release",
383
448
  id: "a7bce3da-9727-4ca8-b95b-57f731445c3f"
449
+ },
450
+ initiator: {
451
+ id: "useruniqueid",
452
+ email: "foo@bar.com",
453
+ name: "A User",
454
+ is_api_key: false
384
455
  }
385
456
  }
386
457
  );
@@ -411,7 +482,13 @@ var EntryReleaseChangedDefinition = definition(
411
482
  state: 64,
412
483
  edit_url: `https://uniform.app/projects/644ede73-d6aa-4159-bf98-14ad7fb4cb66/dashboards/canvas/entries/e5c95c60-314b-4700-9035-6f9c2a4ff800?release=48293345-f2d0-1125-afda-7c661abad432`,
413
484
  api_url: `https://uniform.app/api/v1/entries?projectId=644ede73-d6aa-4159-bf98-14ad7fb4cb66&entryIDs=e5c95c60-314b-4700-9035-6f9c2a4ff800&state=64&releaseId=48293345-f2d0-1125-afda-7c661abad432`,
414
- edge_url: `https://uniform.global/api/v1/entries?projectId=644ede73-d6aa-4159-bf98-14ad7fb4cb66&entryIDs=e5c95c60-314b-4700-9035-6f9c2a4ff800&state=64&releaseId=48293345-f2d0-1125-afda-7c661abad432`
485
+ edge_url: `https://uniform.global/api/v1/entries?projectId=644ede73-d6aa-4159-bf98-14ad7fb4cb66&entryIDs=e5c95c60-314b-4700-9035-6f9c2a4ff800&state=64&releaseId=48293345-f2d0-1125-afda-7c661abad432`,
486
+ initiator: {
487
+ id: "useruniqueid",
488
+ email: "foo@bar.com",
489
+ name: "A User",
490
+ is_api_key: false
491
+ }
415
492
  }
416
493
  );
417
494
  var EntryReleaseChangedEventName = EntryReleaseChangedDefinition["event"];
@@ -438,7 +515,13 @@ var EntryReleaseDeletedDefinition = definition(
438
515
  id: "644ede73-d6aa-4159-bf98-14ad7fb4cb66",
439
516
  url: `https://uniform.app/projects/644ede73-d6aa-4159-bf98-14ad7fb4cb66`
440
517
  },
441
- state: 64
518
+ state: 64,
519
+ initiator: {
520
+ id: "useruniqueid",
521
+ email: "foo@bar.com",
522
+ name: "A User",
523
+ is_api_key: false
524
+ }
442
525
  }
443
526
  );
444
527
  var EntryReleaseDeletedEventName = EntryReleaseDeletedDefinition["event"];
@@ -468,7 +551,13 @@ var EntryReleasePublishedDefinition = definition(
468
551
  state: 64,
469
552
  edit_url: `https://uniform.app/projects/644ede73-d6aa-4159-bf98-14ad7fb4cb66/dashboards/canvas/entries/e5c95c60-314b-4700-9035-6f9c2a4ff800?release=48293345-f2d0-1125-afda-7c661abad432`,
470
553
  api_url: `https://uniform.app/api/v1/entries?projectId=644ede73-d6aa-4159-bf98-14ad7fb4cb66&entryIDs=e5c95c60-314b-4700-9035-6f9c2a4ff800&state=64&releaseId=48293345-f2d0-1125-afda-7c661abad432`,
471
- edge_url: `https://uniform.global/api/v1/entries?projectId=644ede73-d6aa-4159-bf98-14ad7fb4cb66&entryIDs=e5c95c60-314b-4700-9035-6f9c2a4ff800&state=64&releaseId=48293345-f2d0-1125-afda-7c661abad432`
554
+ edge_url: `https://uniform.global/api/v1/entries?projectId=644ede73-d6aa-4159-bf98-14ad7fb4cb66&entryIDs=e5c95c60-314b-4700-9035-6f9c2a4ff800&state=64&releaseId=48293345-f2d0-1125-afda-7c661abad432`,
555
+ initiator: {
556
+ id: "useruniqueid",
557
+ email: "foo@bar.com",
558
+ name: "A User",
559
+ is_api_key: false
560
+ }
472
561
  }
473
562
  );
474
563
  var EntryReleasePublishedEventName = EntryReleasePublishedDefinition["event"];
@@ -495,23 +584,29 @@ var EntryReleaseRestoredDefinition = definition(
495
584
  id: "644ede73-d6aa-4159-bf98-14ad7fb4cb66",
496
585
  url: `https://uniform.app/projects/644ede73-d6aa-4159-bf98-14ad7fb4cb66`
497
586
  },
498
- state: 64
587
+ state: 64,
588
+ initiator: {
589
+ id: "useruniqueid",
590
+ email: "foo@bar.com",
591
+ name: "A User",
592
+ is_api_key: false
593
+ }
499
594
  }
500
595
  );
501
596
  var EntryReleaseRestoredEventName = EntryReleaseRestoredDefinition["event"];
502
597
 
503
598
  // src/manifest/manifest.published.ts
504
- import { z as z3 } from "zod";
599
+ import { z as z4 } from "zod";
505
600
  var ManifestPublishedDefinition = definition(
506
601
  {
507
602
  event: "manifest.published",
508
603
  name: "Manifest Published",
509
604
  description: "Triggers when a manifest has been published.",
510
- schema: z3.object({
511
- timestamp: z3.number(),
512
- site: z3.object({
513
- id: z3.string(),
514
- name: z3.string()
605
+ schema: z4.object({
606
+ timestamp: z4.number(),
607
+ site: z4.object({
608
+ id: z4.string(),
609
+ name: z4.string()
515
610
  })
516
611
  })
517
612
  },
@@ -526,16 +621,16 @@ var ManifestPublishedDefinition = definition(
526
621
  var ManifestPublishedEventName = ManifestPublishedDefinition["event"];
527
622
 
528
623
  // src/project-map/projectMap.delete.ts
529
- import { z as z4 } from "zod";
624
+ import { z as z5 } from "zod";
530
625
  var ProjectMapDeleteDefinition = definition(
531
626
  {
532
627
  event: "projectmap.delete",
533
628
  name: "Project Map Deleted",
534
629
  description: "Triggers when a project map is deleted.",
535
- schema: z4.object({
536
- id: z4.string(),
537
- base_url: z4.string().optional(),
538
- project_id: z4.string()
630
+ schema: z5.object({
631
+ id: z5.string(),
632
+ base_url: z5.string().optional(),
633
+ project_id: z5.string()
539
634
  })
540
635
  },
541
636
  {
@@ -547,26 +642,27 @@ var ProjectMapDeleteDefinition = definition(
547
642
  var ProjectMapDeletedEventName = ProjectMapDeleteDefinition["event"];
548
643
 
549
644
  // src/project-map/projectMap.node.delete.ts
550
- import { z as z5 } from "zod";
645
+ import { z as z6 } from "zod";
551
646
  var ProjectMapNodeDeleteDefinition = definition(
552
647
  {
553
648
  event: "projectmap.node.delete",
554
649
  name: "Project Map Node Deleted",
555
650
  description: "Triggers when a project map node is deleted.",
556
- schema: z5.object({
557
- project_id: z5.string(),
558
- project_map_id: z5.string(),
559
- name: z5.string(),
560
- id: z5.string(),
561
- path: z5.string(),
562
- composition_id: z5.string().optional(),
563
- locales: z5.record(
564
- z5.object({
565
- name: z5.string(),
566
- inherited: z5.boolean(),
567
- path: z5.string()
651
+ schema: z6.object({
652
+ project_id: z6.string(),
653
+ project_map_id: z6.string(),
654
+ name: z6.string(),
655
+ id: z6.string(),
656
+ path: z6.string(),
657
+ composition_id: z6.string().optional(),
658
+ locales: z6.record(
659
+ z6.object({
660
+ name: z6.string(),
661
+ inherited: z6.boolean(),
662
+ path: z6.string()
568
663
  })
569
- ).optional()
664
+ ).optional(),
665
+ initiator: webhookInitiatorSchema
570
666
  })
571
667
  },
572
668
  {
@@ -582,32 +678,39 @@ var ProjectMapNodeDeleteDefinition = definition(
582
678
  inherited: false,
583
679
  path: "/produktdetail"
584
680
  }
681
+ },
682
+ initiator: {
683
+ id: "useruniqueid",
684
+ email: "foo@bar.com",
685
+ name: "A User",
686
+ is_api_key: false
585
687
  }
586
688
  }
587
689
  );
588
690
  var ProjectMapNodeDeletedEventName = ProjectMapNodeDeleteDefinition["event"];
589
691
 
590
692
  // src/project-map/projectMap.node.insert.ts
591
- import { z as z6 } from "zod";
693
+ import { z as z7 } from "zod";
592
694
  var ProjectMapNodeInsertDefinition = definition(
593
695
  {
594
696
  event: "projectmap.node.insert",
595
697
  name: "Project Map Node Inserted",
596
698
  description: "Triggers when a project map node is inserted.",
597
- schema: z6.object({
598
- id: z6.string(),
599
- name: z6.string(),
600
- project_map_id: z6.string(),
601
- project_id: z6.string(),
602
- path: z6.string(),
603
- composition_id: z6.string().optional(),
604
- locales: z6.record(
605
- z6.object({
606
- name: z6.string(),
607
- inherited: z6.boolean(),
608
- path: z6.string()
699
+ schema: z7.object({
700
+ id: z7.string(),
701
+ name: z7.string(),
702
+ project_map_id: z7.string(),
703
+ project_id: z7.string(),
704
+ path: z7.string(),
705
+ composition_id: z7.string().optional(),
706
+ locales: z7.record(
707
+ z7.object({
708
+ name: z7.string(),
709
+ inherited: z7.boolean(),
710
+ path: z7.string()
609
711
  })
610
- ).optional()
712
+ ).optional(),
713
+ initiator: webhookInitiatorSchema
611
714
  })
612
715
  },
613
716
  {
@@ -623,34 +726,41 @@ var ProjectMapNodeInsertDefinition = definition(
623
726
  inherited: false,
624
727
  path: "/produktdetail"
625
728
  }
729
+ },
730
+ initiator: {
731
+ id: "useruniqueid",
732
+ email: "foo@bar.com",
733
+ name: "A User",
734
+ is_api_key: false
626
735
  }
627
736
  }
628
737
  );
629
738
  var ProjectMapNodeInsertedEventName = ProjectMapNodeInsertDefinition["event"];
630
739
 
631
740
  // src/project-map/projectMap.node.update.ts
632
- import { z as z7 } from "zod";
741
+ import { z as z8 } from "zod";
633
742
  var ProjectMapNodeUpdateDefinition = definition(
634
743
  {
635
744
  event: "projectmap.node.update",
636
745
  name: "Project Map Node Updated",
637
746
  description: "Triggers when a project map node is updated.",
638
- schema: z7.object({
639
- id: z7.string(),
640
- name: z7.string(),
641
- project_map_id: z7.string(),
642
- project_id: z7.string(),
643
- path: z7.string(),
644
- composition_id: z7.string().optional(),
645
- previous_path: z7.string(),
646
- locales: z7.record(
647
- z7.object({
648
- name: z7.string(),
649
- inherited: z7.boolean(),
650
- path: z7.string(),
651
- previous_path: z7.string()
747
+ schema: z8.object({
748
+ id: z8.string(),
749
+ name: z8.string(),
750
+ project_map_id: z8.string(),
751
+ project_id: z8.string(),
752
+ path: z8.string(),
753
+ composition_id: z8.string().optional(),
754
+ previous_path: z8.string(),
755
+ locales: z8.record(
756
+ z8.object({
757
+ name: z8.string(),
758
+ inherited: z8.boolean(),
759
+ path: z8.string(),
760
+ previous_path: z8.string()
652
761
  })
653
- ).optional()
762
+ ).optional(),
763
+ initiator: webhookInitiatorSchema
654
764
  })
655
765
  },
656
766
  {
@@ -668,22 +778,28 @@ var ProjectMapNodeUpdateDefinition = definition(
668
778
  path: "/produktdetail",
669
779
  previous_path: "/promo/product-detail"
670
780
  }
781
+ },
782
+ initiator: {
783
+ id: "useruniqueid",
784
+ email: "foo@bar.com",
785
+ name: "A User",
786
+ is_api_key: false
671
787
  }
672
788
  }
673
789
  );
674
790
  var ProjectMapNodeUpdatedEventName = ProjectMapNodeUpdateDefinition["event"];
675
791
 
676
792
  // src/project-map/projectMap.update.ts
677
- import { z as z8 } from "zod";
793
+ import { z as z9 } from "zod";
678
794
  var ProjectMapUpdateDefinition = definition(
679
795
  {
680
796
  event: "projectmap.update",
681
797
  name: "Project Map Updated",
682
798
  description: "Triggers when a project map is updated or created.",
683
- schema: z8.object({
684
- id: z8.string(),
685
- base_url: z8.string().optional(),
686
- project_id: z8.string()
799
+ schema: z9.object({
800
+ id: z9.string(),
801
+ base_url: z9.string().optional(),
802
+ project_id: z9.string()
687
803
  })
688
804
  },
689
805
  {
@@ -695,18 +811,19 @@ var ProjectMapUpdateDefinition = definition(
695
811
  var ProjectMapUpdatedEventName = ProjectMapUpdateDefinition["event"];
696
812
 
697
813
  // src/redirect/redirect.delete.ts
698
- import { z as z9 } from "zod";
814
+ import { z as z10 } from "zod";
699
815
  var RedirectDeleteDefinition = definition(
700
816
  {
701
817
  event: "redirect.delete",
702
818
  name: "Redirect Deleted",
703
819
  description: "Triggers when a redirect is deleted.",
704
- schema: z9.object({
705
- project_id: z9.string(),
706
- id: z9.string(),
707
- source_url: z9.string(),
708
- target_url: z9.string(),
709
- target_status_code: z9.number()
820
+ schema: z10.object({
821
+ project_id: z10.string(),
822
+ id: z10.string(),
823
+ source_url: z10.string(),
824
+ target_url: z10.string(),
825
+ target_status_code: z10.number(),
826
+ initiator: webhookInitiatorSchema
710
827
  })
711
828
  },
712
829
  {
@@ -714,24 +831,31 @@ var RedirectDeleteDefinition = definition(
714
831
  id: "644ede73-d6aa-4159-bf98-14ad7fb4cb66",
715
832
  source_url: "/product-info",
716
833
  target_url: "/product-details",
717
- target_status_code: 301
834
+ target_status_code: 301,
835
+ initiator: {
836
+ id: "useruniqueid",
837
+ email: "foo@bar.com",
838
+ name: "A User",
839
+ is_api_key: false
840
+ }
718
841
  }
719
842
  );
720
843
  var RedirectDeletedEventName = RedirectDeleteDefinition["event"];
721
844
 
722
845
  // src/redirect/redirect.insert.ts
723
- import { z as z10 } from "zod";
846
+ import { z as z11 } from "zod";
724
847
  var RedirectInsertDefinition = definition(
725
848
  {
726
849
  event: "redirect.insert",
727
850
  name: "Redirect Inserted",
728
851
  description: "Triggers when a redirect is inserted.",
729
- schema: z10.object({
730
- project_id: z10.string(),
731
- id: z10.string(),
732
- source_url: z10.string(),
733
- target_url: z10.string(),
734
- target_status_code: z10.number()
852
+ schema: z11.object({
853
+ project_id: z11.string(),
854
+ id: z11.string(),
855
+ source_url: z11.string(),
856
+ target_url: z11.string(),
857
+ target_status_code: z11.number(),
858
+ initiator: webhookInitiatorSchema
735
859
  })
736
860
  },
737
861
  {
@@ -739,24 +863,31 @@ var RedirectInsertDefinition = definition(
739
863
  id: "644ede73-d6aa-4159-bf98-14ad7fb4cb66",
740
864
  source_url: "/product-info",
741
865
  target_url: "/product-details",
742
- target_status_code: 301
866
+ target_status_code: 301,
867
+ initiator: {
868
+ id: "useruniqueid",
869
+ email: "foo@bar.com",
870
+ name: "A User",
871
+ is_api_key: false
872
+ }
743
873
  }
744
874
  );
745
875
  var RedirectInsertedEventName = RedirectInsertDefinition["event"];
746
876
 
747
877
  // src/redirect/redirect.update.ts
748
- import { z as z11 } from "zod";
878
+ import { z as z12 } from "zod";
749
879
  var RedirectUpdateDefinition = definition(
750
880
  {
751
881
  event: "redirect.update",
752
882
  name: "Redirect Updated",
753
883
  description: "Triggers when a redirect is updated.",
754
- schema: z11.object({
755
- project_id: z11.string(),
756
- id: z11.string(),
757
- source_url: z11.string(),
758
- target_url: z11.string(),
759
- target_status_code: z11.number()
884
+ schema: z12.object({
885
+ project_id: z12.string(),
886
+ id: z12.string(),
887
+ source_url: z12.string(),
888
+ target_url: z12.string(),
889
+ target_status_code: z12.number(),
890
+ initiator: webhookInitiatorSchema
760
891
  })
761
892
  },
762
893
  {
@@ -764,25 +895,31 @@ var RedirectUpdateDefinition = definition(
764
895
  id: "644ede73-d6aa-4159-bf98-14ad7fb4cb66",
765
896
  source_url: "/product-info",
766
897
  target_url: "/product-details",
767
- target_status_code: 301
898
+ target_status_code: 301,
899
+ initiator: {
900
+ id: "useruniqueid",
901
+ email: "foo@bar.com",
902
+ name: "A User",
903
+ is_api_key: false
904
+ }
768
905
  }
769
906
  );
770
907
  var RedirectUpdatedEventName = RedirectUpdateDefinition["event"];
771
908
 
772
909
  // src/release/common.ts
773
- import { z as z12 } from "zod";
774
- var ReleasePayloadSchema = z12.object({
775
- id: z12.string(),
776
- state: z12.enum(["open", "locked", "queued", "launching", "launched", "deleting"]),
777
- name: z12.string(),
778
- project: z12.object({
779
- id: z12.string(),
780
- url: z12.string()
910
+ import { z as z13 } from "zod";
911
+ var ReleasePayloadSchema = z13.object({
912
+ id: z13.string(),
913
+ state: z13.enum(["open", "locked", "queued", "launching", "launched", "deleting"]),
914
+ name: z13.string(),
915
+ project: z13.object({
916
+ id: z13.string(),
917
+ url: z13.string()
781
918
  }),
782
- autoLaunchSchedule: z12.number().optional(),
783
- autoLaunchScheduleTimeZone: z12.string().optional(),
784
- edit_url: z12.string(),
785
- api_url: z12.string()
919
+ autoLaunchSchedule: z13.number().optional(),
920
+ autoLaunchScheduleTimeZone: z13.string().optional(),
921
+ edit_url: z13.string(),
922
+ api_url: z13.string()
786
923
  });
787
924
 
788
925
  // src/release/release.changed.ts
@@ -904,35 +1041,30 @@ var ArchivedReleaseLaunchStartedDefinition = definition(
904
1041
  );
905
1042
 
906
1043
  // src/workflow/common.ts
907
- import { z as z13 } from "zod";
908
- var WorkflowReferenceSchema = z13.strictObject({
909
- workflowId: z13.string(),
910
- workflowName: z13.string(),
911
- stageId: z13.string(),
912
- stageName: z13.string()
1044
+ import { z as z14 } from "zod";
1045
+ var WorkflowReferenceSchema = z14.strictObject({
1046
+ workflowId: z14.string(),
1047
+ workflowName: z14.string(),
1048
+ stageId: z14.string(),
1049
+ stageName: z14.string()
913
1050
  });
914
- var WorkflowIdentitySchema = z13.strictObject({
915
- id: z13.string(),
916
- name: z13.string().optional(),
917
- email: z13.string().optional()
918
- });
919
- var WorkflowEntitySchema = z13.strictObject({
920
- type: z13.enum(["entry", "component"]),
921
- name: z13.string(),
922
- id: z13.string(),
923
- editionId: z13.string().optional(),
924
- releaseId: z13.string().optional(),
925
- url: z13.string()
1051
+ var WorkflowEntitySchema = z14.strictObject({
1052
+ type: z14.enum(["entry", "component"]),
1053
+ name: z14.string(),
1054
+ id: z14.string(),
1055
+ editionId: z14.string().optional(),
1056
+ releaseId: z14.string().optional(),
1057
+ url: z14.string()
926
1058
  });
927
- var WorkflowTransitionPayloadSchema = z13.strictObject({
1059
+ var WorkflowTransitionPayloadSchema = z14.strictObject({
928
1060
  entity: WorkflowEntitySchema,
929
1061
  newStage: WorkflowReferenceSchema,
930
1062
  previousStage: WorkflowReferenceSchema.optional(),
931
- initiator: WorkflowIdentitySchema,
932
- timestamp: z13.string(),
933
- project: z13.object({
934
- id: z13.string(),
935
- url: z13.string()
1063
+ initiator: webhookInitiatorSchema,
1064
+ timestamp: z14.string(),
1065
+ project: z14.object({
1066
+ id: z14.string(),
1067
+ url: z14.string()
936
1068
  })
937
1069
  });
938
1070
 
@@ -969,7 +1101,8 @@ var WorkflowTransitionDefinition = definition(
969
1101
  initiator: {
970
1102
  id: "user-unique-identifier",
971
1103
  name: "User Name",
972
- email: "user@company.com"
1104
+ email: "user@company.com",
1105
+ is_api_key: false
973
1106
  },
974
1107
  project: {
975
1108
  id: "644ede73-d6aa-4159-bf98-14ad7fb4cb66",
@@ -1046,11 +1179,11 @@ export {
1046
1179
  ReleaseLaunchedEventName,
1047
1180
  ReleasePayloadSchema,
1048
1181
  WorkflowEntitySchema,
1049
- WorkflowIdentitySchema,
1050
1182
  WorkflowReferenceSchema,
1051
1183
  WorkflowTransitionDefinition,
1052
1184
  WorkflowTransitionEventName,
1053
1185
  WorkflowTransitionPayloadSchema,
1054
1186
  definition,
1055
- isDefinition
1187
+ isDefinition,
1188
+ webhookInitiatorSchema
1056
1189
  };