@uniformdev/webhooks 20.29.2-alpha.14 → 20.29.2-alpha.8

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
@@ -3,14 +3,22 @@ import { z as z2 } from "zod";
3
3
 
4
4
  // src/definition.ts
5
5
  import { z } from "zod";
6
+ var addEventTypeToSchema = (schema, eventType) => z.object({
7
+ ...schema.shape,
8
+ eventType: z.literal(eventType)
9
+ });
6
10
  var isDefinition = (obj) => {
7
11
  return Object.hasOwn(obj, "_definition") && obj["_definition"];
8
12
  };
9
13
  var definition = (options, example) => {
10
14
  return {
11
15
  ...options,
16
+ schema: addEventTypeToSchema(options.schema, options.event),
12
17
  _definition: true,
13
- example
18
+ example: {
19
+ ...example,
20
+ eventType: options.event
21
+ }
14
22
  };
15
23
  };
16
24
  var webhookInitiatorSchema = z.strictObject({
@@ -39,24 +47,18 @@ var CompositionTriggerPayloadSchema = z2.object({
39
47
  id: z2.string()
40
48
  }).optional()
41
49
  });
42
- var CompositionDeletePayloadSchema = CompositionCorePayloadSchema.and(
43
- z2.object({
44
- state: z2.number().optional()
45
- })
46
- );
47
- var CompositionRestorePayloadSchema = CompositionCorePayloadSchema.and(
48
- z2.object({
49
- state: z2.number()
50
- })
51
- );
52
- var CompositionPayloadSchema = CompositionCorePayloadSchema.and(
53
- z2.object({
54
- state: z2.number(),
55
- edit_url: z2.string(),
56
- api_url: z2.string(),
57
- edge_url: z2.string()
58
- })
59
- );
50
+ var CompositionDeletePayloadSchema = CompositionCorePayloadSchema.extend({
51
+ state: z2.number().optional()
52
+ });
53
+ var CompositionRestorePayloadSchema = CompositionCorePayloadSchema.extend({
54
+ state: z2.number()
55
+ });
56
+ var CompositionPayloadSchema = CompositionCorePayloadSchema.extend({
57
+ state: z2.number(),
58
+ edit_url: z2.string(),
59
+ api_url: z2.string(),
60
+ edge_url: z2.string()
61
+ });
60
62
  var ReleaseCompositionPayloadSchema = z2.object({
61
63
  release: z2.object({
62
64
  id: z2.string(),
@@ -70,7 +72,7 @@ var CompositionChangedDefinition = definition(
70
72
  event: "composition.changed",
71
73
  name: "Composition Changed",
72
74
  description: "Triggers when a composition has been changed.",
73
- schema: CompositionPayloadSchema.and(CompositionTriggerPayloadSchema)
75
+ schema: CompositionPayloadSchema.extend(CompositionTriggerPayloadSchema.shape)
74
76
  },
75
77
  {
76
78
  id: "0b9d2118-f2d0-4fe6-9d46-7c661abaf474",
@@ -106,7 +108,7 @@ var CompositionDeletedDefinition = definition(
106
108
  event: "composition.deleted",
107
109
  name: "Composition Deleted",
108
110
  description: "Triggers when a composition has been deleted.",
109
- schema: CompositionDeletePayloadSchema.and(CompositionTriggerPayloadSchema)
111
+ schema: CompositionDeletePayloadSchema.extend(CompositionTriggerPayloadSchema.shape)
110
112
  },
111
113
  {
112
114
  id: "0b9d2118-f2d0-4fe6-9d46-7c661abaf474",
@@ -139,7 +141,7 @@ var CompositionPublishedDefinition = definition(
139
141
  event: "composition.published",
140
142
  name: "Composition Published",
141
143
  description: "Triggers when a composition has been published.",
142
- schema: CompositionPayloadSchema.and(CompositionTriggerPayloadSchema)
144
+ schema: CompositionPayloadSchema.extend(CompositionTriggerPayloadSchema.shape)
143
145
  },
144
146
  {
145
147
  id: "0b9d2118-f2d0-4fe6-9d46-7c661abaf474",
@@ -175,7 +177,7 @@ var CompositionReleaseChangedDefinition = definition(
175
177
  event: "composition.release.changed",
176
178
  name: "Composition Changed on Release",
177
179
  description: "Triggers when a composition has been changed or copied to a pre-launch release.",
178
- schema: CompositionPayloadSchema.and(ReleaseCompositionPayloadSchema)
180
+ schema: CompositionPayloadSchema.extend(ReleaseCompositionPayloadSchema.shape)
179
181
  },
180
182
  {
181
183
  release: {
@@ -211,7 +213,7 @@ var CompositionReleaseDeletedDefinition = definition(
211
213
  event: "composition.release.deleted",
212
214
  name: "Composition Deleted on Release",
213
215
  description: "Triggers when a composition is deleted that is attached to a pre-launch release.",
214
- schema: CompositionDeletePayloadSchema.and(ReleaseCompositionPayloadSchema)
216
+ schema: CompositionDeletePayloadSchema.extend(ReleaseCompositionPayloadSchema.shape)
215
217
  },
216
218
  {
217
219
  release: {
@@ -244,7 +246,7 @@ var CompositionReleasePublishedDefinition = definition(
244
246
  event: "composition.release.published",
245
247
  name: "Composition Published on Release",
246
248
  description: "Triggers when a composition has been published that is attached to an pre-launch release.",
247
- schema: CompositionPayloadSchema.and(ReleaseCompositionPayloadSchema)
249
+ schema: CompositionPayloadSchema.extend(ReleaseCompositionPayloadSchema.shape)
248
250
  },
249
251
  {
250
252
  release: {
@@ -280,7 +282,7 @@ var CompositionReleaseRestoredDefinition = definition(
280
282
  event: "composition.release.restored",
281
283
  name: "Composition Restored on Release",
282
284
  description: "Triggers when a composition deleted in a pre-launch release is restored.",
283
- schema: CompositionRestorePayloadSchema.and(ReleaseCompositionPayloadSchema)
285
+ schema: CompositionRestorePayloadSchema.extend(ReleaseCompositionPayloadSchema.shape)
284
286
  },
285
287
  {
286
288
  release: {
@@ -327,24 +329,18 @@ var EntryTriggerPayloadSchema = z3.object({
327
329
  id: z3.string()
328
330
  }).optional()
329
331
  });
330
- var EntryDeletePayloadSchema = EntryCorePayloadSchema.and(
331
- z3.object({
332
- state: z3.number().optional()
333
- })
334
- );
335
- var EntryRestorePayloadSchema = EntryCorePayloadSchema.and(
336
- z3.object({
337
- state: z3.number()
338
- })
339
- );
340
- var EntryPayloadSchema = EntryCorePayloadSchema.and(
341
- z3.object({
342
- state: z3.number(),
343
- edit_url: z3.string(),
344
- api_url: z3.string(),
345
- edge_url: z3.string()
346
- })
347
- );
332
+ var EntryDeletePayloadSchema = EntryCorePayloadSchema.extend({
333
+ state: z3.number().optional()
334
+ });
335
+ var EntryRestorePayloadSchema = EntryCorePayloadSchema.extend({
336
+ state: z3.number()
337
+ });
338
+ var EntryPayloadSchema = EntryCorePayloadSchema.extend({
339
+ state: z3.number(),
340
+ edit_url: z3.string(),
341
+ api_url: z3.string(),
342
+ edge_url: z3.string()
343
+ });
348
344
  var ReleaseEntryPayloadSchema = z3.object({
349
345
  release: z3.object({
350
346
  id: z3.string(),
@@ -358,7 +354,7 @@ var EntryChangedDefinition = definition(
358
354
  event: "entry.changed",
359
355
  name: "Entry Changed",
360
356
  description: "Triggers when an entry has been changed.",
361
- schema: EntryPayloadSchema.and(EntryTriggerPayloadSchema)
357
+ schema: EntryPayloadSchema.extend(EntryTriggerPayloadSchema.shape)
362
358
  },
363
359
  {
364
360
  id: "e5c95c60-314b-4700-9035-6f9c2a4ff800",
@@ -394,7 +390,7 @@ var EntryDeletedDefinition = definition(
394
390
  event: "entry.deleted",
395
391
  name: "Entry Deleted",
396
392
  description: "Triggers when an entry has been deleted.",
397
- schema: EntryDeletePayloadSchema.and(EntryTriggerPayloadSchema)
393
+ schema: EntryDeletePayloadSchema.extend(EntryTriggerPayloadSchema.shape)
398
394
  },
399
395
  {
400
396
  id: "e5c95c60-314b-4700-9035-6f9c2a4ff800",
@@ -427,7 +423,7 @@ var EntryPublishedDefinition = definition(
427
423
  event: "entry.published",
428
424
  name: "Entry Published",
429
425
  description: "Triggers when an entry has been published.",
430
- schema: EntryPayloadSchema.and(EntryTriggerPayloadSchema)
426
+ schema: EntryPayloadSchema.extend(EntryTriggerPayloadSchema.shape)
431
427
  },
432
428
  {
433
429
  id: "e5c95c60-314b-4700-9035-6f9c2a4ff800",
@@ -463,7 +459,7 @@ var EntryReleaseChangedDefinition = definition(
463
459
  event: "entry.release.changed",
464
460
  name: "Entry Changed on Release",
465
461
  description: "Triggers when an entry has been changed that is attached to a pre-launch release.",
466
- schema: EntryPayloadSchema.and(ReleaseEntryPayloadSchema)
462
+ schema: EntryPayloadSchema.extend(ReleaseEntryPayloadSchema.shape)
467
463
  },
468
464
  {
469
465
  release: {
@@ -499,7 +495,7 @@ var EntryReleaseDeletedDefinition = definition(
499
495
  event: "entry.release.deleted",
500
496
  name: "Entry Deleted on Release",
501
497
  description: "Triggers when an entry has been deleted that is attached to a pre-launch release.",
502
- schema: EntryDeletePayloadSchema.and(ReleaseEntryPayloadSchema)
498
+ schema: EntryDeletePayloadSchema.extend(ReleaseEntryPayloadSchema.shape)
503
499
  },
504
500
  {
505
501
  release: {
@@ -532,7 +528,7 @@ var EntryReleasePublishedDefinition = definition(
532
528
  event: "entry.release.published",
533
529
  name: "Entry Published on Release",
534
530
  description: "Triggers when an entry has been published that is attached to a pre-launch release.",
535
- schema: EntryPayloadSchema.and(ReleaseEntryPayloadSchema)
531
+ schema: EntryPayloadSchema.extend(ReleaseEntryPayloadSchema.shape)
536
532
  },
537
533
  {
538
534
  release: {
@@ -568,7 +564,7 @@ var EntryReleaseRestoredDefinition = definition(
568
564
  event: "entry.release.restored",
569
565
  name: "Entry Restored on Release",
570
566
  description: "Triggers when an entry deleted in a pre-launch release is restored.",
571
- schema: EntryRestorePayloadSchema.and(ReleaseEntryPayloadSchema)
567
+ schema: EntryRestorePayloadSchema.extend(ReleaseEntryPayloadSchema.shape)
572
568
  },
573
569
  {
574
570
  release: {
package/dist/index.js CHANGED
@@ -102,14 +102,22 @@ var import_zod2 = require("zod");
102
102
 
103
103
  // src/definition.ts
104
104
  var import_zod = require("zod");
105
+ var addEventTypeToSchema = (schema, eventType) => import_zod.z.object({
106
+ ...schema.shape,
107
+ eventType: import_zod.z.literal(eventType)
108
+ });
105
109
  var isDefinition = (obj) => {
106
110
  return Object.hasOwn(obj, "_definition") && obj["_definition"];
107
111
  };
108
112
  var definition = (options, example) => {
109
113
  return {
110
114
  ...options,
115
+ schema: addEventTypeToSchema(options.schema, options.event),
111
116
  _definition: true,
112
- example
117
+ example: {
118
+ ...example,
119
+ eventType: options.event
120
+ }
113
121
  };
114
122
  };
115
123
  var webhookInitiatorSchema = import_zod.z.strictObject({
@@ -138,24 +146,18 @@ var CompositionTriggerPayloadSchema = import_zod2.z.object({
138
146
  id: import_zod2.z.string()
139
147
  }).optional()
140
148
  });
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
- );
149
+ var CompositionDeletePayloadSchema = CompositionCorePayloadSchema.extend({
150
+ state: import_zod2.z.number().optional()
151
+ });
152
+ var CompositionRestorePayloadSchema = CompositionCorePayloadSchema.extend({
153
+ state: import_zod2.z.number()
154
+ });
155
+ var CompositionPayloadSchema = CompositionCorePayloadSchema.extend({
156
+ state: import_zod2.z.number(),
157
+ edit_url: import_zod2.z.string(),
158
+ api_url: import_zod2.z.string(),
159
+ edge_url: import_zod2.z.string()
160
+ });
159
161
  var ReleaseCompositionPayloadSchema = import_zod2.z.object({
160
162
  release: import_zod2.z.object({
161
163
  id: import_zod2.z.string(),
@@ -169,7 +171,7 @@ var CompositionChangedDefinition = definition(
169
171
  event: "composition.changed",
170
172
  name: "Composition Changed",
171
173
  description: "Triggers when a composition has been changed.",
172
- schema: CompositionPayloadSchema.and(CompositionTriggerPayloadSchema)
174
+ schema: CompositionPayloadSchema.extend(CompositionTriggerPayloadSchema.shape)
173
175
  },
174
176
  {
175
177
  id: "0b9d2118-f2d0-4fe6-9d46-7c661abaf474",
@@ -205,7 +207,7 @@ var CompositionDeletedDefinition = definition(
205
207
  event: "composition.deleted",
206
208
  name: "Composition Deleted",
207
209
  description: "Triggers when a composition has been deleted.",
208
- schema: CompositionDeletePayloadSchema.and(CompositionTriggerPayloadSchema)
210
+ schema: CompositionDeletePayloadSchema.extend(CompositionTriggerPayloadSchema.shape)
209
211
  },
210
212
  {
211
213
  id: "0b9d2118-f2d0-4fe6-9d46-7c661abaf474",
@@ -238,7 +240,7 @@ var CompositionPublishedDefinition = definition(
238
240
  event: "composition.published",
239
241
  name: "Composition Published",
240
242
  description: "Triggers when a composition has been published.",
241
- schema: CompositionPayloadSchema.and(CompositionTriggerPayloadSchema)
243
+ schema: CompositionPayloadSchema.extend(CompositionTriggerPayloadSchema.shape)
242
244
  },
243
245
  {
244
246
  id: "0b9d2118-f2d0-4fe6-9d46-7c661abaf474",
@@ -274,7 +276,7 @@ var CompositionReleaseChangedDefinition = definition(
274
276
  event: "composition.release.changed",
275
277
  name: "Composition Changed on Release",
276
278
  description: "Triggers when a composition has been changed or copied to a pre-launch release.",
277
- schema: CompositionPayloadSchema.and(ReleaseCompositionPayloadSchema)
279
+ schema: CompositionPayloadSchema.extend(ReleaseCompositionPayloadSchema.shape)
278
280
  },
279
281
  {
280
282
  release: {
@@ -310,7 +312,7 @@ var CompositionReleaseDeletedDefinition = definition(
310
312
  event: "composition.release.deleted",
311
313
  name: "Composition Deleted on Release",
312
314
  description: "Triggers when a composition is deleted that is attached to a pre-launch release.",
313
- schema: CompositionDeletePayloadSchema.and(ReleaseCompositionPayloadSchema)
315
+ schema: CompositionDeletePayloadSchema.extend(ReleaseCompositionPayloadSchema.shape)
314
316
  },
315
317
  {
316
318
  release: {
@@ -343,7 +345,7 @@ var CompositionReleasePublishedDefinition = definition(
343
345
  event: "composition.release.published",
344
346
  name: "Composition Published on Release",
345
347
  description: "Triggers when a composition has been published that is attached to an pre-launch release.",
346
- schema: CompositionPayloadSchema.and(ReleaseCompositionPayloadSchema)
348
+ schema: CompositionPayloadSchema.extend(ReleaseCompositionPayloadSchema.shape)
347
349
  },
348
350
  {
349
351
  release: {
@@ -379,7 +381,7 @@ var CompositionReleaseRestoredDefinition = definition(
379
381
  event: "composition.release.restored",
380
382
  name: "Composition Restored on Release",
381
383
  description: "Triggers when a composition deleted in a pre-launch release is restored.",
382
- schema: CompositionRestorePayloadSchema.and(ReleaseCompositionPayloadSchema)
384
+ schema: CompositionRestorePayloadSchema.extend(ReleaseCompositionPayloadSchema.shape)
383
385
  },
384
386
  {
385
387
  release: {
@@ -426,24 +428,18 @@ var EntryTriggerPayloadSchema = import_zod3.z.object({
426
428
  id: import_zod3.z.string()
427
429
  }).optional()
428
430
  });
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
- );
431
+ var EntryDeletePayloadSchema = EntryCorePayloadSchema.extend({
432
+ state: import_zod3.z.number().optional()
433
+ });
434
+ var EntryRestorePayloadSchema = EntryCorePayloadSchema.extend({
435
+ state: import_zod3.z.number()
436
+ });
437
+ var EntryPayloadSchema = EntryCorePayloadSchema.extend({
438
+ state: import_zod3.z.number(),
439
+ edit_url: import_zod3.z.string(),
440
+ api_url: import_zod3.z.string(),
441
+ edge_url: import_zod3.z.string()
442
+ });
447
443
  var ReleaseEntryPayloadSchema = import_zod3.z.object({
448
444
  release: import_zod3.z.object({
449
445
  id: import_zod3.z.string(),
@@ -457,7 +453,7 @@ var EntryChangedDefinition = definition(
457
453
  event: "entry.changed",
458
454
  name: "Entry Changed",
459
455
  description: "Triggers when an entry has been changed.",
460
- schema: EntryPayloadSchema.and(EntryTriggerPayloadSchema)
456
+ schema: EntryPayloadSchema.extend(EntryTriggerPayloadSchema.shape)
461
457
  },
462
458
  {
463
459
  id: "e5c95c60-314b-4700-9035-6f9c2a4ff800",
@@ -493,7 +489,7 @@ var EntryDeletedDefinition = definition(
493
489
  event: "entry.deleted",
494
490
  name: "Entry Deleted",
495
491
  description: "Triggers when an entry has been deleted.",
496
- schema: EntryDeletePayloadSchema.and(EntryTriggerPayloadSchema)
492
+ schema: EntryDeletePayloadSchema.extend(EntryTriggerPayloadSchema.shape)
497
493
  },
498
494
  {
499
495
  id: "e5c95c60-314b-4700-9035-6f9c2a4ff800",
@@ -526,7 +522,7 @@ var EntryPublishedDefinition = definition(
526
522
  event: "entry.published",
527
523
  name: "Entry Published",
528
524
  description: "Triggers when an entry has been published.",
529
- schema: EntryPayloadSchema.and(EntryTriggerPayloadSchema)
525
+ schema: EntryPayloadSchema.extend(EntryTriggerPayloadSchema.shape)
530
526
  },
531
527
  {
532
528
  id: "e5c95c60-314b-4700-9035-6f9c2a4ff800",
@@ -562,7 +558,7 @@ var EntryReleaseChangedDefinition = definition(
562
558
  event: "entry.release.changed",
563
559
  name: "Entry Changed on Release",
564
560
  description: "Triggers when an entry has been changed that is attached to a pre-launch release.",
565
- schema: EntryPayloadSchema.and(ReleaseEntryPayloadSchema)
561
+ schema: EntryPayloadSchema.extend(ReleaseEntryPayloadSchema.shape)
566
562
  },
567
563
  {
568
564
  release: {
@@ -598,7 +594,7 @@ var EntryReleaseDeletedDefinition = definition(
598
594
  event: "entry.release.deleted",
599
595
  name: "Entry Deleted on Release",
600
596
  description: "Triggers when an entry has been deleted that is attached to a pre-launch release.",
601
- schema: EntryDeletePayloadSchema.and(ReleaseEntryPayloadSchema)
597
+ schema: EntryDeletePayloadSchema.extend(ReleaseEntryPayloadSchema.shape)
602
598
  },
603
599
  {
604
600
  release: {
@@ -631,7 +627,7 @@ var EntryReleasePublishedDefinition = definition(
631
627
  event: "entry.release.published",
632
628
  name: "Entry Published on Release",
633
629
  description: "Triggers when an entry has been published that is attached to a pre-launch release.",
634
- schema: EntryPayloadSchema.and(ReleaseEntryPayloadSchema)
630
+ schema: EntryPayloadSchema.extend(ReleaseEntryPayloadSchema.shape)
635
631
  },
636
632
  {
637
633
  release: {
@@ -667,7 +663,7 @@ var EntryReleaseRestoredDefinition = definition(
667
663
  event: "entry.release.restored",
668
664
  name: "Entry Restored on Release",
669
665
  description: "Triggers when an entry deleted in a pre-launch release is restored.",
670
- schema: EntryRestorePayloadSchema.and(ReleaseEntryPayloadSchema)
666
+ schema: EntryRestorePayloadSchema.extend(ReleaseEntryPayloadSchema.shape)
671
667
  },
672
668
  {
673
669
  release: {
package/dist/index.mjs CHANGED
@@ -3,14 +3,22 @@ import { z as z2 } from "zod";
3
3
 
4
4
  // src/definition.ts
5
5
  import { z } from "zod";
6
+ var addEventTypeToSchema = (schema, eventType) => z.object({
7
+ ...schema.shape,
8
+ eventType: z.literal(eventType)
9
+ });
6
10
  var isDefinition = (obj) => {
7
11
  return Object.hasOwn(obj, "_definition") && obj["_definition"];
8
12
  };
9
13
  var definition = (options, example) => {
10
14
  return {
11
15
  ...options,
16
+ schema: addEventTypeToSchema(options.schema, options.event),
12
17
  _definition: true,
13
- example
18
+ example: {
19
+ ...example,
20
+ eventType: options.event
21
+ }
14
22
  };
15
23
  };
16
24
  var webhookInitiatorSchema = z.strictObject({
@@ -39,24 +47,18 @@ var CompositionTriggerPayloadSchema = z2.object({
39
47
  id: z2.string()
40
48
  }).optional()
41
49
  });
42
- var CompositionDeletePayloadSchema = CompositionCorePayloadSchema.and(
43
- z2.object({
44
- state: z2.number().optional()
45
- })
46
- );
47
- var CompositionRestorePayloadSchema = CompositionCorePayloadSchema.and(
48
- z2.object({
49
- state: z2.number()
50
- })
51
- );
52
- var CompositionPayloadSchema = CompositionCorePayloadSchema.and(
53
- z2.object({
54
- state: z2.number(),
55
- edit_url: z2.string(),
56
- api_url: z2.string(),
57
- edge_url: z2.string()
58
- })
59
- );
50
+ var CompositionDeletePayloadSchema = CompositionCorePayloadSchema.extend({
51
+ state: z2.number().optional()
52
+ });
53
+ var CompositionRestorePayloadSchema = CompositionCorePayloadSchema.extend({
54
+ state: z2.number()
55
+ });
56
+ var CompositionPayloadSchema = CompositionCorePayloadSchema.extend({
57
+ state: z2.number(),
58
+ edit_url: z2.string(),
59
+ api_url: z2.string(),
60
+ edge_url: z2.string()
61
+ });
60
62
  var ReleaseCompositionPayloadSchema = z2.object({
61
63
  release: z2.object({
62
64
  id: z2.string(),
@@ -70,7 +72,7 @@ var CompositionChangedDefinition = definition(
70
72
  event: "composition.changed",
71
73
  name: "Composition Changed",
72
74
  description: "Triggers when a composition has been changed.",
73
- schema: CompositionPayloadSchema.and(CompositionTriggerPayloadSchema)
75
+ schema: CompositionPayloadSchema.extend(CompositionTriggerPayloadSchema.shape)
74
76
  },
75
77
  {
76
78
  id: "0b9d2118-f2d0-4fe6-9d46-7c661abaf474",
@@ -106,7 +108,7 @@ var CompositionDeletedDefinition = definition(
106
108
  event: "composition.deleted",
107
109
  name: "Composition Deleted",
108
110
  description: "Triggers when a composition has been deleted.",
109
- schema: CompositionDeletePayloadSchema.and(CompositionTriggerPayloadSchema)
111
+ schema: CompositionDeletePayloadSchema.extend(CompositionTriggerPayloadSchema.shape)
110
112
  },
111
113
  {
112
114
  id: "0b9d2118-f2d0-4fe6-9d46-7c661abaf474",
@@ -139,7 +141,7 @@ var CompositionPublishedDefinition = definition(
139
141
  event: "composition.published",
140
142
  name: "Composition Published",
141
143
  description: "Triggers when a composition has been published.",
142
- schema: CompositionPayloadSchema.and(CompositionTriggerPayloadSchema)
144
+ schema: CompositionPayloadSchema.extend(CompositionTriggerPayloadSchema.shape)
143
145
  },
144
146
  {
145
147
  id: "0b9d2118-f2d0-4fe6-9d46-7c661abaf474",
@@ -175,7 +177,7 @@ var CompositionReleaseChangedDefinition = definition(
175
177
  event: "composition.release.changed",
176
178
  name: "Composition Changed on Release",
177
179
  description: "Triggers when a composition has been changed or copied to a pre-launch release.",
178
- schema: CompositionPayloadSchema.and(ReleaseCompositionPayloadSchema)
180
+ schema: CompositionPayloadSchema.extend(ReleaseCompositionPayloadSchema.shape)
179
181
  },
180
182
  {
181
183
  release: {
@@ -211,7 +213,7 @@ var CompositionReleaseDeletedDefinition = definition(
211
213
  event: "composition.release.deleted",
212
214
  name: "Composition Deleted on Release",
213
215
  description: "Triggers when a composition is deleted that is attached to a pre-launch release.",
214
- schema: CompositionDeletePayloadSchema.and(ReleaseCompositionPayloadSchema)
216
+ schema: CompositionDeletePayloadSchema.extend(ReleaseCompositionPayloadSchema.shape)
215
217
  },
216
218
  {
217
219
  release: {
@@ -244,7 +246,7 @@ var CompositionReleasePublishedDefinition = definition(
244
246
  event: "composition.release.published",
245
247
  name: "Composition Published on Release",
246
248
  description: "Triggers when a composition has been published that is attached to an pre-launch release.",
247
- schema: CompositionPayloadSchema.and(ReleaseCompositionPayloadSchema)
249
+ schema: CompositionPayloadSchema.extend(ReleaseCompositionPayloadSchema.shape)
248
250
  },
249
251
  {
250
252
  release: {
@@ -280,7 +282,7 @@ var CompositionReleaseRestoredDefinition = definition(
280
282
  event: "composition.release.restored",
281
283
  name: "Composition Restored on Release",
282
284
  description: "Triggers when a composition deleted in a pre-launch release is restored.",
283
- schema: CompositionRestorePayloadSchema.and(ReleaseCompositionPayloadSchema)
285
+ schema: CompositionRestorePayloadSchema.extend(ReleaseCompositionPayloadSchema.shape)
284
286
  },
285
287
  {
286
288
  release: {
@@ -327,24 +329,18 @@ var EntryTriggerPayloadSchema = z3.object({
327
329
  id: z3.string()
328
330
  }).optional()
329
331
  });
330
- var EntryDeletePayloadSchema = EntryCorePayloadSchema.and(
331
- z3.object({
332
- state: z3.number().optional()
333
- })
334
- );
335
- var EntryRestorePayloadSchema = EntryCorePayloadSchema.and(
336
- z3.object({
337
- state: z3.number()
338
- })
339
- );
340
- var EntryPayloadSchema = EntryCorePayloadSchema.and(
341
- z3.object({
342
- state: z3.number(),
343
- edit_url: z3.string(),
344
- api_url: z3.string(),
345
- edge_url: z3.string()
346
- })
347
- );
332
+ var EntryDeletePayloadSchema = EntryCorePayloadSchema.extend({
333
+ state: z3.number().optional()
334
+ });
335
+ var EntryRestorePayloadSchema = EntryCorePayloadSchema.extend({
336
+ state: z3.number()
337
+ });
338
+ var EntryPayloadSchema = EntryCorePayloadSchema.extend({
339
+ state: z3.number(),
340
+ edit_url: z3.string(),
341
+ api_url: z3.string(),
342
+ edge_url: z3.string()
343
+ });
348
344
  var ReleaseEntryPayloadSchema = z3.object({
349
345
  release: z3.object({
350
346
  id: z3.string(),
@@ -358,7 +354,7 @@ var EntryChangedDefinition = definition(
358
354
  event: "entry.changed",
359
355
  name: "Entry Changed",
360
356
  description: "Triggers when an entry has been changed.",
361
- schema: EntryPayloadSchema.and(EntryTriggerPayloadSchema)
357
+ schema: EntryPayloadSchema.extend(EntryTriggerPayloadSchema.shape)
362
358
  },
363
359
  {
364
360
  id: "e5c95c60-314b-4700-9035-6f9c2a4ff800",
@@ -394,7 +390,7 @@ var EntryDeletedDefinition = definition(
394
390
  event: "entry.deleted",
395
391
  name: "Entry Deleted",
396
392
  description: "Triggers when an entry has been deleted.",
397
- schema: EntryDeletePayloadSchema.and(EntryTriggerPayloadSchema)
393
+ schema: EntryDeletePayloadSchema.extend(EntryTriggerPayloadSchema.shape)
398
394
  },
399
395
  {
400
396
  id: "e5c95c60-314b-4700-9035-6f9c2a4ff800",
@@ -427,7 +423,7 @@ var EntryPublishedDefinition = definition(
427
423
  event: "entry.published",
428
424
  name: "Entry Published",
429
425
  description: "Triggers when an entry has been published.",
430
- schema: EntryPayloadSchema.and(EntryTriggerPayloadSchema)
426
+ schema: EntryPayloadSchema.extend(EntryTriggerPayloadSchema.shape)
431
427
  },
432
428
  {
433
429
  id: "e5c95c60-314b-4700-9035-6f9c2a4ff800",
@@ -463,7 +459,7 @@ var EntryReleaseChangedDefinition = definition(
463
459
  event: "entry.release.changed",
464
460
  name: "Entry Changed on Release",
465
461
  description: "Triggers when an entry has been changed that is attached to a pre-launch release.",
466
- schema: EntryPayloadSchema.and(ReleaseEntryPayloadSchema)
462
+ schema: EntryPayloadSchema.extend(ReleaseEntryPayloadSchema.shape)
467
463
  },
468
464
  {
469
465
  release: {
@@ -499,7 +495,7 @@ var EntryReleaseDeletedDefinition = definition(
499
495
  event: "entry.release.deleted",
500
496
  name: "Entry Deleted on Release",
501
497
  description: "Triggers when an entry has been deleted that is attached to a pre-launch release.",
502
- schema: EntryDeletePayloadSchema.and(ReleaseEntryPayloadSchema)
498
+ schema: EntryDeletePayloadSchema.extend(ReleaseEntryPayloadSchema.shape)
503
499
  },
504
500
  {
505
501
  release: {
@@ -532,7 +528,7 @@ var EntryReleasePublishedDefinition = definition(
532
528
  event: "entry.release.published",
533
529
  name: "Entry Published on Release",
534
530
  description: "Triggers when an entry has been published that is attached to a pre-launch release.",
535
- schema: EntryPayloadSchema.and(ReleaseEntryPayloadSchema)
531
+ schema: EntryPayloadSchema.extend(ReleaseEntryPayloadSchema.shape)
536
532
  },
537
533
  {
538
534
  release: {
@@ -568,7 +564,7 @@ var EntryReleaseRestoredDefinition = definition(
568
564
  event: "entry.release.restored",
569
565
  name: "Entry Restored on Release",
570
566
  description: "Triggers when an entry deleted in a pre-launch release is restored.",
571
- schema: EntryRestorePayloadSchema.and(ReleaseEntryPayloadSchema)
567
+ schema: EntryRestorePayloadSchema.extend(ReleaseEntryPayloadSchema.shape)
572
568
  },
573
569
  {
574
570
  release: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniformdev/webhooks",
3
- "version": "20.29.2-alpha.14+f2c4af25fb",
3
+ "version": "20.29.2-alpha.8+15e0719a77",
4
4
  "description": "Uniform Webhooks",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "main": "./dist/index.js",
@@ -41,5 +41,5 @@
41
41
  "publishConfig": {
42
42
  "access": "public"
43
43
  },
44
- "gitHead": "f2c4af25fbc09fcc9f412d56b48fa6fffa8c9037"
44
+ "gitHead": "15e0719a772469a53e0a81dbf571e528d4a45974"
45
45
  }