@uniformdev/webhooks 17.5.1-alpha.131 → 17.5.1-alpha.6

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,4 +1,58 @@
1
- import { z, ZodTypeAny } from 'zod';
1
+ import { ZodTypeAny, z } from 'zod';
2
+
3
+ declare type DefinitionOptions<TSchema> = {
4
+ event: string;
5
+ name: string;
6
+ description: string;
7
+ schema: TSchema;
8
+ };
9
+ declare type Definition<TSchema extends ZodTypeAny = ZodTypeAny> = DefinitionOptions<TSchema> & {
10
+ _definition: true;
11
+ example: z.TypeOf<TSchema>;
12
+ };
13
+ declare const isDefinition: (obj: any) => obj is Definition<z.ZodTypeAny>;
14
+ declare const definition: <TSchema extends z.ZodTypeAny = z.ZodTypeAny>(options: DefinitionOptions<TSchema>, example: z.TypeOf<TSchema>) => Definition<TSchema>;
15
+
16
+ declare const ManifestPublishedDefinition: Definition<z.ZodObject<{
17
+ timestamp: z.ZodNumber;
18
+ site: z.ZodObject<{
19
+ name: z.ZodString;
20
+ }, "strip", z.ZodTypeAny, {
21
+ name: string;
22
+ }, {
23
+ name: string;
24
+ }>;
25
+ user: z.ZodObject<{
26
+ name: z.ZodString;
27
+ email: z.ZodString;
28
+ }, "strip", z.ZodTypeAny, {
29
+ name: string;
30
+ email: string;
31
+ }, {
32
+ name: string;
33
+ email: string;
34
+ }>;
35
+ }, "strip", z.ZodTypeAny, {
36
+ timestamp: number;
37
+ site: {
38
+ name: string;
39
+ };
40
+ user: {
41
+ name: string;
42
+ email: string;
43
+ };
44
+ }, {
45
+ timestamp: number;
46
+ site: {
47
+ name: string;
48
+ };
49
+ user: {
50
+ name: string;
51
+ email: string;
52
+ };
53
+ }>>;
54
+ declare type ManifestPublishedPayload = z.infer<typeof ManifestPublishedDefinition['schema']>;
55
+ declare const ManifestPublishedEventName: string;
2
56
 
3
57
  declare const CompositionPayloadSchema: z.ZodObject<{
4
58
  id: z.ZodString;
@@ -50,17 +104,17 @@ declare const CompositionPayloadSchema: z.ZodObject<{
50
104
  path: string;
51
105
  };
52
106
  } | undefined;
107
+ name: string;
108
+ user: {
109
+ name: string;
110
+ email: string;
111
+ };
53
112
  id: string;
54
113
  state: number;
55
- name: string;
56
114
  project: {
57
115
  id: string;
58
116
  url: string;
59
117
  };
60
- user: {
61
- name: string;
62
- email: string;
63
- };
64
118
  edit_url: string;
65
119
  }, {
66
120
  slug?: string | undefined;
@@ -69,34 +123,21 @@ declare const CompositionPayloadSchema: z.ZodObject<{
69
123
  path: string;
70
124
  };
71
125
  } | undefined;
126
+ name: string;
127
+ user: {
128
+ name: string;
129
+ email: string;
130
+ };
72
131
  id: string;
73
132
  state: number;
74
- name: string;
75
133
  project: {
76
134
  id: string;
77
135
  url: string;
78
136
  };
79
- user: {
80
- name: string;
81
- email: string;
82
- };
83
137
  edit_url: string;
84
138
  }>;
85
139
  declare type CompositionPayload = z.infer<typeof CompositionPayloadSchema>;
86
140
 
87
- declare type DefinitionOptions<TSchema> = {
88
- event: string;
89
- name: string;
90
- description: string;
91
- schema: TSchema;
92
- };
93
- declare type Definition<TSchema extends ZodTypeAny = ZodTypeAny> = DefinitionOptions<TSchema> & {
94
- _definition: true;
95
- example: z.TypeOf<TSchema>;
96
- };
97
- declare const isDefinition: (obj: any) => obj is Definition<z.ZodTypeAny>;
98
- declare const definition: <TSchema extends z.ZodTypeAny = z.ZodTypeAny>(options: DefinitionOptions<TSchema>, example: z.TypeOf<TSchema>) => Definition<TSchema>;
99
-
100
141
  declare const CompositionChangedDefinition: Definition<z.ZodObject<{
101
142
  id: z.ZodString;
102
143
  slug: z.ZodOptional<z.ZodString>;
@@ -147,17 +188,17 @@ declare const CompositionChangedDefinition: Definition<z.ZodObject<{
147
188
  path: string;
148
189
  };
149
190
  } | undefined;
191
+ name: string;
192
+ user: {
193
+ name: string;
194
+ email: string;
195
+ };
150
196
  id: string;
151
197
  state: number;
152
- name: string;
153
198
  project: {
154
199
  id: string;
155
200
  url: string;
156
201
  };
157
- user: {
158
- name: string;
159
- email: string;
160
- };
161
202
  edit_url: string;
162
203
  }, {
163
204
  slug?: string | undefined;
@@ -166,17 +207,17 @@ declare const CompositionChangedDefinition: Definition<z.ZodObject<{
166
207
  path: string;
167
208
  };
168
209
  } | undefined;
210
+ name: string;
211
+ user: {
212
+ name: string;
213
+ email: string;
214
+ };
169
215
  id: string;
170
216
  state: number;
171
- name: string;
172
217
  project: {
173
218
  id: string;
174
219
  url: string;
175
220
  };
176
- user: {
177
- name: string;
178
- email: string;
179
- };
180
221
  edit_url: string;
181
222
  }>>;
182
223
  declare type CompositionChangedPayload = z.infer<typeof CompositionChangedDefinition['schema']>;
@@ -207,26 +248,26 @@ declare const CompositionDeletedDefinition: Definition<z.ZodObject<{
207
248
  }>;
208
249
  }, "strip", z.ZodTypeAny, {
209
250
  state?: number | undefined;
251
+ user: {
252
+ name: string;
253
+ email: string;
254
+ };
210
255
  id: string;
211
256
  project: {
212
257
  id: string;
213
258
  url: string;
214
259
  };
260
+ }, {
261
+ state?: number | undefined;
215
262
  user: {
216
263
  name: string;
217
264
  email: string;
218
265
  };
219
- }, {
220
- state?: number | undefined;
221
266
  id: string;
222
267
  project: {
223
268
  id: string;
224
269
  url: string;
225
270
  };
226
- user: {
227
- name: string;
228
- email: string;
229
- };
230
271
  }>>;
231
272
  declare type CompositionDeletedPayload = z.infer<typeof CompositionDeletedDefinition['schema']>;
232
273
  declare const CompositionDeletedEventName: string;
@@ -281,17 +322,17 @@ declare const CompositionPublishedDefinition: Definition<z.ZodObject<{
281
322
  path: string;
282
323
  };
283
324
  } | undefined;
325
+ name: string;
326
+ user: {
327
+ name: string;
328
+ email: string;
329
+ };
284
330
  id: string;
285
331
  state: number;
286
- name: string;
287
332
  project: {
288
333
  id: string;
289
334
  url: string;
290
335
  };
291
- user: {
292
- name: string;
293
- email: string;
294
- };
295
336
  edit_url: string;
296
337
  }, {
297
338
  slug?: string | undefined;
@@ -300,61 +341,20 @@ declare const CompositionPublishedDefinition: Definition<z.ZodObject<{
300
341
  path: string;
301
342
  };
302
343
  } | undefined;
344
+ name: string;
345
+ user: {
346
+ name: string;
347
+ email: string;
348
+ };
303
349
  id: string;
304
350
  state: number;
305
- name: string;
306
351
  project: {
307
352
  id: string;
308
353
  url: string;
309
354
  };
310
- user: {
311
- name: string;
312
- email: string;
313
- };
314
355
  edit_url: string;
315
356
  }>>;
316
357
  declare type CompositionPublishedPayload = z.infer<typeof CompositionPublishedDefinition['schema']>;
317
358
  declare const CompositionPublishedEventName: string;
318
359
 
319
- declare const ManifestPublishedDefinition: Definition<z.ZodObject<{
320
- timestamp: z.ZodNumber;
321
- site: z.ZodObject<{
322
- name: z.ZodString;
323
- }, "strip", z.ZodTypeAny, {
324
- name: string;
325
- }, {
326
- name: string;
327
- }>;
328
- user: z.ZodObject<{
329
- name: z.ZodString;
330
- email: z.ZodString;
331
- }, "strip", z.ZodTypeAny, {
332
- name: string;
333
- email: string;
334
- }, {
335
- name: string;
336
- email: string;
337
- }>;
338
- }, "strip", z.ZodTypeAny, {
339
- user: {
340
- name: string;
341
- email: string;
342
- };
343
- timestamp: number;
344
- site: {
345
- name: string;
346
- };
347
- }, {
348
- user: {
349
- name: string;
350
- email: string;
351
- };
352
- timestamp: number;
353
- site: {
354
- name: string;
355
- };
356
- }>>;
357
- declare type ManifestPublishedPayload = z.infer<typeof ManifestPublishedDefinition['schema']>;
358
- declare const ManifestPublishedEventName: string;
359
-
360
360
  export { CompositionChangedDefinition, CompositionChangedEventName, CompositionChangedPayload, CompositionDeletedDefinition, CompositionDeletedEventName, CompositionDeletedPayload, CompositionPayload, CompositionPayloadSchema, CompositionPublishedDefinition, CompositionPublishedEventName, CompositionPublishedPayload, Definition, DefinitionOptions, ManifestPublishedDefinition, ManifestPublishedEventName, ManifestPublishedPayload, definition, isDefinition };
package/dist/index.esm.js CHANGED
@@ -1 +1 @@
1
- import{z as o}from"zod";var s=o.object({id:o.string(),slug:o.string().optional(),project_map:o.object({node:o.object({path:o.string()})}).optional(),state:o.number(),name:o.string(),project:o.object({id:o.string(),url:o.string()}),user:o.object({name:o.string(),email:o.string()}),edit_url:o.string()});var f=n=>Object.hasOwn(n,"_definition")&&n._definition,i=(n,m)=>({...n,_definition:!0,example:m});var r=i({event:"composition.changed",name:"Composition Changed",description:"Triggers when a composition has been changed.",schema:s},{id:"id of composition",name:"name of composition",slug:"slug of composition",project:{id:"id of the project this composition belongs to",url:"link to project this composition belongs to"},state:0,user:{email:"email of the user who performed this action",name:"name of the user who performed this action"},project_map:{node:{path:"path that this composition is associated with"}},edit_url:"link to edit this composition"}),b=r.event;import{z as e}from"zod";var p=i({event:"composition.deleted",name:"Composition Deleted",description:"Triggers when a composition has been deleted.",schema:e.object({id:e.string(),state:e.number().optional(),user:e.object({name:e.string(),email:e.string()}),project:e.object({id:e.string(),url:e.string()})})},{id:"id of composition",state:0,user:{email:"email of the user who performed this action",name:"name of the user who performed this action"},project:{id:"id of the project this composition belongs to",url:"link to project this composition belongs to"}}),x=p.event;var a=i({event:"composition.published",name:"Composition Published",description:"Triggers when a composition has been published.",schema:s},{id:"id of composition",name:"name of composition",slug:"slug of composition",project:{id:"id of the project this composition belongs to",url:"link to project this composition belongs to"},state:0,user:{email:"email of the user who performed this action",name:"name of the user who performed this action"},project_map:{node:{path:"path that this composition is associated with"}},edit_url:"link to edit this composition"}),w=a.event;import{z as t}from"zod";var c=i({event:"manifest.published",name:"Manifest Published",description:"Triggers when a manifest has been published.",schema:t.object({timestamp:t.number(),site:t.object({name:t.string()}),user:t.object({name:t.string(),email:t.string()})})},{timestamp:1667425322407,site:{name:"My Site"},user:{email:"email of the user who performed this action",name:"name of the user who performed this action"}}),_=c.event;export{r as CompositionChangedDefinition,b as CompositionChangedEventName,p as CompositionDeletedDefinition,x as CompositionDeletedEventName,s as CompositionPayloadSchema,a as CompositionPublishedDefinition,w as CompositionPublishedEventName,c as ManifestPublishedDefinition,_ as ManifestPublishedEventName,i as definition,f as isDefinition};
1
+ import{z as t}from"zod";var h=n=>Object.hasOwn(n,"_definition")&&n._definition,i=(n,m)=>({...n,_definition:!0,example:m});var r=i({event:"manifest.published",name:"Manifest Published",description:"Triggers when a manifest has been published.",schema:t.object({timestamp:t.number(),site:t.object({name:t.string()}),user:t.object({name:t.string(),email:t.string()})})},{timestamp:1667425322407,site:{name:"My Site"},user:{email:"email of the user who performed this action",name:"name of the user who performed this action"}}),u=r.event;import{z as o}from"zod";var s=o.object({id:o.string(),slug:o.string().optional(),project_map:o.object({node:o.object({path:o.string()})}).optional(),state:o.number(),name:o.string(),project:o.object({id:o.string(),url:o.string()}),user:o.object({name:o.string(),email:o.string()}),edit_url:o.string()});var p=i({event:"composition.changed",name:"Composition Changed",description:"Triggers when a composition has been changed.",schema:s},{id:"id of composition",name:"name of composition",slug:"slug of composition",project:{id:"id of the project this composition belongs to",url:"link to project this composition belongs to"},state:0,user:{email:"email of the user who performed this action",name:"name of the user who performed this action"},project_map:{node:{path:"path that this composition is associated with"}},edit_url:"link to edit this composition"}),x=p.event;import{z as e}from"zod";var a=i({event:"composition.deleted",name:"Composition Deleted",description:"Triggers when a composition has been deleted.",schema:e.object({id:e.string(),state:e.number().optional(),user:e.object({name:e.string(),email:e.string()}),project:e.object({id:e.string(),url:e.string()})})},{id:"id of composition",state:0,user:{email:"email of the user who performed this action",name:"name of the user who performed this action"},project:{id:"id of the project this composition belongs to",url:"link to project this composition belongs to"}}),w=a.event;var c=i({event:"composition.published",name:"Composition Published",description:"Triggers when a composition has been published.",schema:s},{id:"id of composition",name:"name of composition",slug:"slug of composition",project:{id:"id of the project this composition belongs to",url:"link to project this composition belongs to"},state:0,user:{email:"email of the user who performed this action",name:"name of the user who performed this action"},project_map:{node:{path:"path that this composition is associated with"}},edit_url:"link to edit this composition"}),_=c.event;export{p as CompositionChangedDefinition,x as CompositionChangedEventName,a as CompositionDeletedDefinition,w as CompositionDeletedEventName,s as CompositionPayloadSchema,c as CompositionPublishedDefinition,_ as CompositionPublishedEventName,r as ManifestPublishedDefinition,u as ManifestPublishedEventName,i as definition,h as isDefinition};
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- "use strict";var a=Object.defineProperty;var u=Object.getOwnPropertyDescriptor;var g=Object.getOwnPropertyNames;var b=Object.prototype.hasOwnProperty;var y=(e,i)=>{for(var p in i)a(e,p,{get:i[p],enumerable:!0})},j=(e,i,p,c)=>{if(i&&typeof i=="object"||typeof i=="function")for(let m of g(i))!b.call(e,m)&&m!==p&&a(e,m,{get:()=>i[m],enumerable:!(c=u(i,m))||c.enumerable});return e};var C=e=>j(a({},"__esModule",{value:!0}),e);var S={};y(S,{CompositionChangedDefinition:()=>h,CompositionChangedEventName:()=>D,CompositionDeletedDefinition:()=>d,CompositionDeletedEventName:()=>P,CompositionPayloadSchema:()=>r,CompositionPublishedDefinition:()=>f,CompositionPublishedEventName:()=>T,ManifestPublishedDefinition:()=>l,ManifestPublishedEventName:()=>w,definition:()=>n,isDefinition:()=>x});module.exports=C(S);var o=require("zod"),r=o.z.object({id:o.z.string(),slug:o.z.string().optional(),project_map:o.z.object({node:o.z.object({path:o.z.string()})}).optional(),state:o.z.number(),name:o.z.string(),project:o.z.object({id:o.z.string(),url:o.z.string()}),user:o.z.object({name:o.z.string(),email:o.z.string()}),edit_url:o.z.string()});var x=e=>Object.hasOwn(e,"_definition")&&e._definition,n=(e,i)=>({...e,_definition:!0,example:i});var h=n({event:"composition.changed",name:"Composition Changed",description:"Triggers when a composition has been changed.",schema:r},{id:"id of composition",name:"name of composition",slug:"slug of composition",project:{id:"id of the project this composition belongs to",url:"link to project this composition belongs to"},state:0,user:{email:"email of the user who performed this action",name:"name of the user who performed this action"},project_map:{node:{path:"path that this composition is associated with"}},edit_url:"link to edit this composition"}),D=h.event;var t=require("zod");var d=n({event:"composition.deleted",name:"Composition Deleted",description:"Triggers when a composition has been deleted.",schema:t.z.object({id:t.z.string(),state:t.z.number().optional(),user:t.z.object({name:t.z.string(),email:t.z.string()}),project:t.z.object({id:t.z.string(),url:t.z.string()})})},{id:"id of composition",state:0,user:{email:"email of the user who performed this action",name:"name of the user who performed this action"},project:{id:"id of the project this composition belongs to",url:"link to project this composition belongs to"}}),P=d.event;var f=n({event:"composition.published",name:"Composition Published",description:"Triggers when a composition has been published.",schema:r},{id:"id of composition",name:"name of composition",slug:"slug of composition",project:{id:"id of the project this composition belongs to",url:"link to project this composition belongs to"},state:0,user:{email:"email of the user who performed this action",name:"name of the user who performed this action"},project_map:{node:{path:"path that this composition is associated with"}},edit_url:"link to edit this composition"}),T=f.event;var s=require("zod");var l=n({event:"manifest.published",name:"Manifest Published",description:"Triggers when a manifest has been published.",schema:s.z.object({timestamp:s.z.number(),site:s.z.object({name:s.z.string()}),user:s.z.object({name:s.z.string(),email:s.z.string()})})},{timestamp:1667425322407,site:{name:"My Site"},user:{email:"email of the user who performed this action",name:"name of the user who performed this action"}}),w=l.event;0&&(module.exports={CompositionChangedDefinition,CompositionChangedEventName,CompositionDeletedDefinition,CompositionDeletedEventName,CompositionPayloadSchema,CompositionPublishedDefinition,CompositionPublishedEventName,ManifestPublishedDefinition,ManifestPublishedEventName,definition,isDefinition});
1
+ "use strict";var a=Object.defineProperty;var u=Object.getOwnPropertyDescriptor;var g=Object.getOwnPropertyNames;var b=Object.prototype.hasOwnProperty;var y=(e,i)=>{for(var p in i)a(e,p,{get:i[p],enumerable:!0})},j=(e,i,p,c)=>{if(i&&typeof i=="object"||typeof i=="function")for(let m of g(i))!b.call(e,m)&&m!==p&&a(e,m,{get:()=>i[m],enumerable:!(c=u(i,m))||c.enumerable});return e};var C=e=>j(a({},"__esModule",{value:!0}),e);var S={};y(S,{CompositionChangedDefinition:()=>d,CompositionChangedEventName:()=>P,CompositionDeletedDefinition:()=>f,CompositionDeletedEventName:()=>T,CompositionPayloadSchema:()=>r,CompositionPublishedDefinition:()=>l,CompositionPublishedEventName:()=>w,ManifestPublishedDefinition:()=>h,ManifestPublishedEventName:()=>D,definition:()=>n,isDefinition:()=>x});module.exports=C(S);var s=require("zod");var x=e=>Object.hasOwn(e,"_definition")&&e._definition,n=(e,i)=>({...e,_definition:!0,example:i});var h=n({event:"manifest.published",name:"Manifest Published",description:"Triggers when a manifest has been published.",schema:s.z.object({timestamp:s.z.number(),site:s.z.object({name:s.z.string()}),user:s.z.object({name:s.z.string(),email:s.z.string()})})},{timestamp:1667425322407,site:{name:"My Site"},user:{email:"email of the user who performed this action",name:"name of the user who performed this action"}}),D=h.event;var o=require("zod"),r=o.z.object({id:o.z.string(),slug:o.z.string().optional(),project_map:o.z.object({node:o.z.object({path:o.z.string()})}).optional(),state:o.z.number(),name:o.z.string(),project:o.z.object({id:o.z.string(),url:o.z.string()}),user:o.z.object({name:o.z.string(),email:o.z.string()}),edit_url:o.z.string()});var d=n({event:"composition.changed",name:"Composition Changed",description:"Triggers when a composition has been changed.",schema:r},{id:"id of composition",name:"name of composition",slug:"slug of composition",project:{id:"id of the project this composition belongs to",url:"link to project this composition belongs to"},state:0,user:{email:"email of the user who performed this action",name:"name of the user who performed this action"},project_map:{node:{path:"path that this composition is associated with"}},edit_url:"link to edit this composition"}),P=d.event;var t=require("zod");var f=n({event:"composition.deleted",name:"Composition Deleted",description:"Triggers when a composition has been deleted.",schema:t.z.object({id:t.z.string(),state:t.z.number().optional(),user:t.z.object({name:t.z.string(),email:t.z.string()}),project:t.z.object({id:t.z.string(),url:t.z.string()})})},{id:"id of composition",state:0,user:{email:"email of the user who performed this action",name:"name of the user who performed this action"},project:{id:"id of the project this composition belongs to",url:"link to project this composition belongs to"}}),T=f.event;var l=n({event:"composition.published",name:"Composition Published",description:"Triggers when a composition has been published.",schema:r},{id:"id of composition",name:"name of composition",slug:"slug of composition",project:{id:"id of the project this composition belongs to",url:"link to project this composition belongs to"},state:0,user:{email:"email of the user who performed this action",name:"name of the user who performed this action"},project_map:{node:{path:"path that this composition is associated with"}},edit_url:"link to edit this composition"}),w=l.event;0&&(module.exports={CompositionChangedDefinition,CompositionChangedEventName,CompositionDeletedDefinition,CompositionDeletedEventName,CompositionPayloadSchema,CompositionPublishedDefinition,CompositionPublishedEventName,ManifestPublishedDefinition,ManifestPublishedEventName,definition,isDefinition});
package/dist/index.mjs CHANGED
@@ -1 +1 @@
1
- import{z as o}from"zod";var s=o.object({id:o.string(),slug:o.string().optional(),project_map:o.object({node:o.object({path:o.string()})}).optional(),state:o.number(),name:o.string(),project:o.object({id:o.string(),url:o.string()}),user:o.object({name:o.string(),email:o.string()}),edit_url:o.string()});var f=n=>Object.hasOwn(n,"_definition")&&n._definition,i=(n,m)=>({...n,_definition:!0,example:m});var r=i({event:"composition.changed",name:"Composition Changed",description:"Triggers when a composition has been changed.",schema:s},{id:"id of composition",name:"name of composition",slug:"slug of composition",project:{id:"id of the project this composition belongs to",url:"link to project this composition belongs to"},state:0,user:{email:"email of the user who performed this action",name:"name of the user who performed this action"},project_map:{node:{path:"path that this composition is associated with"}},edit_url:"link to edit this composition"}),b=r.event;import{z as e}from"zod";var p=i({event:"composition.deleted",name:"Composition Deleted",description:"Triggers when a composition has been deleted.",schema:e.object({id:e.string(),state:e.number().optional(),user:e.object({name:e.string(),email:e.string()}),project:e.object({id:e.string(),url:e.string()})})},{id:"id of composition",state:0,user:{email:"email of the user who performed this action",name:"name of the user who performed this action"},project:{id:"id of the project this composition belongs to",url:"link to project this composition belongs to"}}),x=p.event;var a=i({event:"composition.published",name:"Composition Published",description:"Triggers when a composition has been published.",schema:s},{id:"id of composition",name:"name of composition",slug:"slug of composition",project:{id:"id of the project this composition belongs to",url:"link to project this composition belongs to"},state:0,user:{email:"email of the user who performed this action",name:"name of the user who performed this action"},project_map:{node:{path:"path that this composition is associated with"}},edit_url:"link to edit this composition"}),w=a.event;import{z as t}from"zod";var c=i({event:"manifest.published",name:"Manifest Published",description:"Triggers when a manifest has been published.",schema:t.object({timestamp:t.number(),site:t.object({name:t.string()}),user:t.object({name:t.string(),email:t.string()})})},{timestamp:1667425322407,site:{name:"My Site"},user:{email:"email of the user who performed this action",name:"name of the user who performed this action"}}),_=c.event;export{r as CompositionChangedDefinition,b as CompositionChangedEventName,p as CompositionDeletedDefinition,x as CompositionDeletedEventName,s as CompositionPayloadSchema,a as CompositionPublishedDefinition,w as CompositionPublishedEventName,c as ManifestPublishedDefinition,_ as ManifestPublishedEventName,i as definition,f as isDefinition};
1
+ import{z as t}from"zod";var h=n=>Object.hasOwn(n,"_definition")&&n._definition,i=(n,m)=>({...n,_definition:!0,example:m});var r=i({event:"manifest.published",name:"Manifest Published",description:"Triggers when a manifest has been published.",schema:t.object({timestamp:t.number(),site:t.object({name:t.string()}),user:t.object({name:t.string(),email:t.string()})})},{timestamp:1667425322407,site:{name:"My Site"},user:{email:"email of the user who performed this action",name:"name of the user who performed this action"}}),u=r.event;import{z as o}from"zod";var s=o.object({id:o.string(),slug:o.string().optional(),project_map:o.object({node:o.object({path:o.string()})}).optional(),state:o.number(),name:o.string(),project:o.object({id:o.string(),url:o.string()}),user:o.object({name:o.string(),email:o.string()}),edit_url:o.string()});var p=i({event:"composition.changed",name:"Composition Changed",description:"Triggers when a composition has been changed.",schema:s},{id:"id of composition",name:"name of composition",slug:"slug of composition",project:{id:"id of the project this composition belongs to",url:"link to project this composition belongs to"},state:0,user:{email:"email of the user who performed this action",name:"name of the user who performed this action"},project_map:{node:{path:"path that this composition is associated with"}},edit_url:"link to edit this composition"}),x=p.event;import{z as e}from"zod";var a=i({event:"composition.deleted",name:"Composition Deleted",description:"Triggers when a composition has been deleted.",schema:e.object({id:e.string(),state:e.number().optional(),user:e.object({name:e.string(),email:e.string()}),project:e.object({id:e.string(),url:e.string()})})},{id:"id of composition",state:0,user:{email:"email of the user who performed this action",name:"name of the user who performed this action"},project:{id:"id of the project this composition belongs to",url:"link to project this composition belongs to"}}),w=a.event;var c=i({event:"composition.published",name:"Composition Published",description:"Triggers when a composition has been published.",schema:s},{id:"id of composition",name:"name of composition",slug:"slug of composition",project:{id:"id of the project this composition belongs to",url:"link to project this composition belongs to"},state:0,user:{email:"email of the user who performed this action",name:"name of the user who performed this action"},project_map:{node:{path:"path that this composition is associated with"}},edit_url:"link to edit this composition"}),_=c.event;export{p as CompositionChangedDefinition,x as CompositionChangedEventName,a as CompositionDeletedDefinition,w as CompositionDeletedEventName,s as CompositionPayloadSchema,c as CompositionPublishedDefinition,_ as CompositionPublishedEventName,r as ManifestPublishedDefinition,u as ManifestPublishedEventName,i as definition,h as isDefinition};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniformdev/webhooks",
3
- "version": "17.5.1-alpha.131+1a06e230b",
3
+ "version": "17.5.1-alpha.6+56c22015c",
4
4
  "description": "Uniform Webhooks",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "main": "./dist/index.js",
@@ -33,8 +33,8 @@
33
33
  "devDependencies": {
34
34
  "dotenv": "^16.0.3",
35
35
  "npm-run-all": "4.1.5",
36
- "svix": "^0.70.0",
37
- "zod-to-json-schema": "3.19.3"
36
+ "svix": "^0.69.0",
37
+ "zod-to-json-schema": "3.18.1"
38
38
  },
39
- "gitHead": "1a06e230be7112298a5d5bf6d93bd66c9cbc39f6"
39
+ "gitHead": "56c22015c4959f040eb9d2cd02edadd53e122ca9"
40
40
  }