@uniformdev/webhooks 17.7.1-alpha.34 → 18.0.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/LICENSE.txt +1 -1
- package/dist/index.d.ts +7 -7
- package/dist/index.esm.js +175 -1
- package/dist/index.js +212 -1
- package/dist/index.mjs +175 -1
- package/package.json +9 -6
package/LICENSE.txt
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
©
|
|
1
|
+
© 2023 Uniform Systems, Inc. All Rights Reserved.
|
|
2
2
|
See details of Uniform Systems, Inc. Master Subscription Agreement here: https://uniform.dev/eula
|
package/dist/index.d.ts
CHANGED
|
@@ -82,15 +82,15 @@ declare const CompositionPayloadSchema: z.ZodObject<{
|
|
|
82
82
|
};
|
|
83
83
|
edit_url: string;
|
|
84
84
|
}>;
|
|
85
|
-
|
|
85
|
+
type CompositionPayload = z.infer<typeof CompositionPayloadSchema>;
|
|
86
86
|
|
|
87
|
-
|
|
87
|
+
type DefinitionOptions<TSchema> = {
|
|
88
88
|
event: string;
|
|
89
89
|
name: string;
|
|
90
90
|
description: string;
|
|
91
91
|
schema: TSchema;
|
|
92
92
|
};
|
|
93
|
-
|
|
93
|
+
type Definition<TSchema extends ZodTypeAny = ZodTypeAny> = DefinitionOptions<TSchema> & {
|
|
94
94
|
_definition: true;
|
|
95
95
|
example: z.TypeOf<TSchema>;
|
|
96
96
|
};
|
|
@@ -179,7 +179,7 @@ declare const CompositionChangedDefinition: Definition<z.ZodObject<{
|
|
|
179
179
|
};
|
|
180
180
|
edit_url: string;
|
|
181
181
|
}>>;
|
|
182
|
-
|
|
182
|
+
type CompositionChangedPayload = z.infer<(typeof CompositionChangedDefinition)['schema']>;
|
|
183
183
|
declare const CompositionChangedEventName: string;
|
|
184
184
|
|
|
185
185
|
declare const CompositionDeletedDefinition: Definition<z.ZodObject<{
|
|
@@ -228,7 +228,7 @@ declare const CompositionDeletedDefinition: Definition<z.ZodObject<{
|
|
|
228
228
|
email: string;
|
|
229
229
|
};
|
|
230
230
|
}>>;
|
|
231
|
-
|
|
231
|
+
type CompositionDeletedPayload = z.infer<(typeof CompositionDeletedDefinition)['schema']>;
|
|
232
232
|
declare const CompositionDeletedEventName: string;
|
|
233
233
|
|
|
234
234
|
declare const CompositionPublishedDefinition: Definition<z.ZodObject<{
|
|
@@ -313,7 +313,7 @@ declare const CompositionPublishedDefinition: Definition<z.ZodObject<{
|
|
|
313
313
|
};
|
|
314
314
|
edit_url: string;
|
|
315
315
|
}>>;
|
|
316
|
-
|
|
316
|
+
type CompositionPublishedPayload = z.infer<(typeof CompositionPublishedDefinition)['schema']>;
|
|
317
317
|
declare const CompositionPublishedEventName: string;
|
|
318
318
|
|
|
319
319
|
declare const ManifestPublishedDefinition: Definition<z.ZodObject<{
|
|
@@ -354,7 +354,7 @@ declare const ManifestPublishedDefinition: Definition<z.ZodObject<{
|
|
|
354
354
|
name: string;
|
|
355
355
|
};
|
|
356
356
|
}>>;
|
|
357
|
-
|
|
357
|
+
type ManifestPublishedPayload = z.infer<(typeof ManifestPublishedDefinition)['schema']>;
|
|
358
358
|
declare const ManifestPublishedEventName: string;
|
|
359
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,175 @@
|
|
|
1
|
-
|
|
1
|
+
// src/composition/common.ts
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
var CompositionPayloadSchema = z.object({
|
|
4
|
+
id: z.string(),
|
|
5
|
+
slug: z.string().optional(),
|
|
6
|
+
project_map: z.object({
|
|
7
|
+
node: z.object({
|
|
8
|
+
path: z.string()
|
|
9
|
+
})
|
|
10
|
+
}).optional(),
|
|
11
|
+
state: z.number(),
|
|
12
|
+
name: z.string(),
|
|
13
|
+
project: z.object({
|
|
14
|
+
id: z.string(),
|
|
15
|
+
url: z.string()
|
|
16
|
+
}),
|
|
17
|
+
user: z.object({
|
|
18
|
+
name: z.string(),
|
|
19
|
+
email: z.string()
|
|
20
|
+
}),
|
|
21
|
+
edit_url: z.string()
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
// src/definition.ts
|
|
25
|
+
var isDefinition = (obj) => {
|
|
26
|
+
return Object.hasOwn(obj, "_definition") && obj["_definition"];
|
|
27
|
+
};
|
|
28
|
+
var definition = (options, example) => {
|
|
29
|
+
return {
|
|
30
|
+
...options,
|
|
31
|
+
_definition: true,
|
|
32
|
+
example
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
// src/composition/composition.changed.ts
|
|
37
|
+
var CompositionChangedDefinition = definition(
|
|
38
|
+
{
|
|
39
|
+
event: "composition.changed",
|
|
40
|
+
name: "Composition Changed",
|
|
41
|
+
description: "Triggers when a composition has been changed.",
|
|
42
|
+
schema: CompositionPayloadSchema
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
id: "id of composition",
|
|
46
|
+
name: "name of composition",
|
|
47
|
+
slug: "slug of composition",
|
|
48
|
+
project: {
|
|
49
|
+
id: "id of the project this composition belongs to",
|
|
50
|
+
url: "link to project this composition belongs to"
|
|
51
|
+
},
|
|
52
|
+
state: 0,
|
|
53
|
+
user: {
|
|
54
|
+
email: "email of the user who performed this action",
|
|
55
|
+
name: "name of the user who performed this action"
|
|
56
|
+
},
|
|
57
|
+
project_map: {
|
|
58
|
+
node: {
|
|
59
|
+
path: "path that this composition is associated with"
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
edit_url: "link to edit this composition"
|
|
63
|
+
}
|
|
64
|
+
);
|
|
65
|
+
var CompositionChangedEventName = CompositionChangedDefinition["event"];
|
|
66
|
+
|
|
67
|
+
// src/composition/composition.deleted.ts
|
|
68
|
+
import { z as z2 } from "zod";
|
|
69
|
+
var CompositionDeletedDefinition = definition(
|
|
70
|
+
{
|
|
71
|
+
event: "composition.deleted",
|
|
72
|
+
name: "Composition Deleted",
|
|
73
|
+
description: "Triggers when a composition has been deleted.",
|
|
74
|
+
schema: z2.object({
|
|
75
|
+
id: z2.string(),
|
|
76
|
+
state: z2.number().optional(),
|
|
77
|
+
user: z2.object({
|
|
78
|
+
name: z2.string(),
|
|
79
|
+
email: z2.string()
|
|
80
|
+
}),
|
|
81
|
+
project: z2.object({
|
|
82
|
+
id: z2.string(),
|
|
83
|
+
url: z2.string()
|
|
84
|
+
})
|
|
85
|
+
})
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
id: "id of composition",
|
|
89
|
+
state: 0,
|
|
90
|
+
user: {
|
|
91
|
+
email: "email of the user who performed this action",
|
|
92
|
+
name: "name of the user who performed this action"
|
|
93
|
+
},
|
|
94
|
+
project: {
|
|
95
|
+
id: "id of the project this composition belongs to",
|
|
96
|
+
url: "link to project this composition belongs to"
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
);
|
|
100
|
+
var CompositionDeletedEventName = CompositionDeletedDefinition["event"];
|
|
101
|
+
|
|
102
|
+
// src/composition/composition.published.ts
|
|
103
|
+
var CompositionPublishedDefinition = definition(
|
|
104
|
+
{
|
|
105
|
+
event: "composition.published",
|
|
106
|
+
name: "Composition Published",
|
|
107
|
+
description: "Triggers when a composition has been published.",
|
|
108
|
+
schema: CompositionPayloadSchema
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
id: "id of composition",
|
|
112
|
+
name: "name of composition",
|
|
113
|
+
slug: "slug of composition",
|
|
114
|
+
project: {
|
|
115
|
+
id: "id of the project this composition belongs to",
|
|
116
|
+
url: "link to project this composition belongs to"
|
|
117
|
+
},
|
|
118
|
+
state: 0,
|
|
119
|
+
user: {
|
|
120
|
+
email: "email of the user who performed this action",
|
|
121
|
+
name: "name of the user who performed this action"
|
|
122
|
+
},
|
|
123
|
+
project_map: {
|
|
124
|
+
node: {
|
|
125
|
+
path: "path that this composition is associated with"
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
edit_url: "link to edit this composition"
|
|
129
|
+
}
|
|
130
|
+
);
|
|
131
|
+
var CompositionPublishedEventName = CompositionPublishedDefinition["event"];
|
|
132
|
+
|
|
133
|
+
// src/manifest/manifest.published.ts
|
|
134
|
+
import { z as z3 } from "zod";
|
|
135
|
+
var ManifestPublishedDefinition = definition(
|
|
136
|
+
{
|
|
137
|
+
event: "manifest.published",
|
|
138
|
+
name: "Manifest Published",
|
|
139
|
+
description: "Triggers when a manifest has been published.",
|
|
140
|
+
schema: z3.object({
|
|
141
|
+
timestamp: z3.number(),
|
|
142
|
+
site: z3.object({
|
|
143
|
+
name: z3.string()
|
|
144
|
+
}),
|
|
145
|
+
user: z3.object({
|
|
146
|
+
name: z3.string(),
|
|
147
|
+
email: z3.string()
|
|
148
|
+
})
|
|
149
|
+
})
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
timestamp: 1667425322407,
|
|
153
|
+
site: {
|
|
154
|
+
name: "My Site"
|
|
155
|
+
},
|
|
156
|
+
user: {
|
|
157
|
+
email: "email of the user who performed this action",
|
|
158
|
+
name: "name of the user who performed this action"
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
);
|
|
162
|
+
var ManifestPublishedEventName = ManifestPublishedDefinition["event"];
|
|
163
|
+
export {
|
|
164
|
+
CompositionChangedDefinition,
|
|
165
|
+
CompositionChangedEventName,
|
|
166
|
+
CompositionDeletedDefinition,
|
|
167
|
+
CompositionDeletedEventName,
|
|
168
|
+
CompositionPayloadSchema,
|
|
169
|
+
CompositionPublishedDefinition,
|
|
170
|
+
CompositionPublishedEventName,
|
|
171
|
+
ManifestPublishedDefinition,
|
|
172
|
+
ManifestPublishedEventName,
|
|
173
|
+
definition,
|
|
174
|
+
isDefinition
|
|
175
|
+
};
|
package/dist/index.js
CHANGED
|
@@ -1 +1,212 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/index.ts
|
|
21
|
+
var src_exports = {};
|
|
22
|
+
__export(src_exports, {
|
|
23
|
+
CompositionChangedDefinition: () => CompositionChangedDefinition,
|
|
24
|
+
CompositionChangedEventName: () => CompositionChangedEventName,
|
|
25
|
+
CompositionDeletedDefinition: () => CompositionDeletedDefinition,
|
|
26
|
+
CompositionDeletedEventName: () => CompositionDeletedEventName,
|
|
27
|
+
CompositionPayloadSchema: () => CompositionPayloadSchema,
|
|
28
|
+
CompositionPublishedDefinition: () => CompositionPublishedDefinition,
|
|
29
|
+
CompositionPublishedEventName: () => CompositionPublishedEventName,
|
|
30
|
+
ManifestPublishedDefinition: () => ManifestPublishedDefinition,
|
|
31
|
+
ManifestPublishedEventName: () => ManifestPublishedEventName,
|
|
32
|
+
definition: () => definition,
|
|
33
|
+
isDefinition: () => isDefinition
|
|
34
|
+
});
|
|
35
|
+
module.exports = __toCommonJS(src_exports);
|
|
36
|
+
|
|
37
|
+
// src/composition/common.ts
|
|
38
|
+
var import_zod = require("zod");
|
|
39
|
+
var CompositionPayloadSchema = import_zod.z.object({
|
|
40
|
+
id: import_zod.z.string(),
|
|
41
|
+
slug: import_zod.z.string().optional(),
|
|
42
|
+
project_map: import_zod.z.object({
|
|
43
|
+
node: import_zod.z.object({
|
|
44
|
+
path: import_zod.z.string()
|
|
45
|
+
})
|
|
46
|
+
}).optional(),
|
|
47
|
+
state: import_zod.z.number(),
|
|
48
|
+
name: import_zod.z.string(),
|
|
49
|
+
project: import_zod.z.object({
|
|
50
|
+
id: import_zod.z.string(),
|
|
51
|
+
url: import_zod.z.string()
|
|
52
|
+
}),
|
|
53
|
+
user: import_zod.z.object({
|
|
54
|
+
name: import_zod.z.string(),
|
|
55
|
+
email: import_zod.z.string()
|
|
56
|
+
}),
|
|
57
|
+
edit_url: import_zod.z.string()
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
// src/definition.ts
|
|
61
|
+
var isDefinition = (obj) => {
|
|
62
|
+
return Object.hasOwn(obj, "_definition") && obj["_definition"];
|
|
63
|
+
};
|
|
64
|
+
var definition = (options, example) => {
|
|
65
|
+
return {
|
|
66
|
+
...options,
|
|
67
|
+
_definition: true,
|
|
68
|
+
example
|
|
69
|
+
};
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
// src/composition/composition.changed.ts
|
|
73
|
+
var CompositionChangedDefinition = definition(
|
|
74
|
+
{
|
|
75
|
+
event: "composition.changed",
|
|
76
|
+
name: "Composition Changed",
|
|
77
|
+
description: "Triggers when a composition has been changed.",
|
|
78
|
+
schema: CompositionPayloadSchema
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
id: "id of composition",
|
|
82
|
+
name: "name of composition",
|
|
83
|
+
slug: "slug of composition",
|
|
84
|
+
project: {
|
|
85
|
+
id: "id of the project this composition belongs to",
|
|
86
|
+
url: "link to project this composition belongs to"
|
|
87
|
+
},
|
|
88
|
+
state: 0,
|
|
89
|
+
user: {
|
|
90
|
+
email: "email of the user who performed this action",
|
|
91
|
+
name: "name of the user who performed this action"
|
|
92
|
+
},
|
|
93
|
+
project_map: {
|
|
94
|
+
node: {
|
|
95
|
+
path: "path that this composition is associated with"
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
edit_url: "link to edit this composition"
|
|
99
|
+
}
|
|
100
|
+
);
|
|
101
|
+
var CompositionChangedEventName = CompositionChangedDefinition["event"];
|
|
102
|
+
|
|
103
|
+
// src/composition/composition.deleted.ts
|
|
104
|
+
var import_zod2 = require("zod");
|
|
105
|
+
var CompositionDeletedDefinition = definition(
|
|
106
|
+
{
|
|
107
|
+
event: "composition.deleted",
|
|
108
|
+
name: "Composition Deleted",
|
|
109
|
+
description: "Triggers when a composition has been deleted.",
|
|
110
|
+
schema: import_zod2.z.object({
|
|
111
|
+
id: import_zod2.z.string(),
|
|
112
|
+
state: import_zod2.z.number().optional(),
|
|
113
|
+
user: import_zod2.z.object({
|
|
114
|
+
name: import_zod2.z.string(),
|
|
115
|
+
email: import_zod2.z.string()
|
|
116
|
+
}),
|
|
117
|
+
project: import_zod2.z.object({
|
|
118
|
+
id: import_zod2.z.string(),
|
|
119
|
+
url: import_zod2.z.string()
|
|
120
|
+
})
|
|
121
|
+
})
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
id: "id of composition",
|
|
125
|
+
state: 0,
|
|
126
|
+
user: {
|
|
127
|
+
email: "email of the user who performed this action",
|
|
128
|
+
name: "name of the user who performed this action"
|
|
129
|
+
},
|
|
130
|
+
project: {
|
|
131
|
+
id: "id of the project this composition belongs to",
|
|
132
|
+
url: "link to project this composition belongs to"
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
);
|
|
136
|
+
var CompositionDeletedEventName = CompositionDeletedDefinition["event"];
|
|
137
|
+
|
|
138
|
+
// src/composition/composition.published.ts
|
|
139
|
+
var CompositionPublishedDefinition = definition(
|
|
140
|
+
{
|
|
141
|
+
event: "composition.published",
|
|
142
|
+
name: "Composition Published",
|
|
143
|
+
description: "Triggers when a composition has been published.",
|
|
144
|
+
schema: CompositionPayloadSchema
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
id: "id of composition",
|
|
148
|
+
name: "name of composition",
|
|
149
|
+
slug: "slug of composition",
|
|
150
|
+
project: {
|
|
151
|
+
id: "id of the project this composition belongs to",
|
|
152
|
+
url: "link to project this composition belongs to"
|
|
153
|
+
},
|
|
154
|
+
state: 0,
|
|
155
|
+
user: {
|
|
156
|
+
email: "email of the user who performed this action",
|
|
157
|
+
name: "name of the user who performed this action"
|
|
158
|
+
},
|
|
159
|
+
project_map: {
|
|
160
|
+
node: {
|
|
161
|
+
path: "path that this composition is associated with"
|
|
162
|
+
}
|
|
163
|
+
},
|
|
164
|
+
edit_url: "link to edit this composition"
|
|
165
|
+
}
|
|
166
|
+
);
|
|
167
|
+
var CompositionPublishedEventName = CompositionPublishedDefinition["event"];
|
|
168
|
+
|
|
169
|
+
// src/manifest/manifest.published.ts
|
|
170
|
+
var import_zod3 = require("zod");
|
|
171
|
+
var ManifestPublishedDefinition = definition(
|
|
172
|
+
{
|
|
173
|
+
event: "manifest.published",
|
|
174
|
+
name: "Manifest Published",
|
|
175
|
+
description: "Triggers when a manifest has been published.",
|
|
176
|
+
schema: import_zod3.z.object({
|
|
177
|
+
timestamp: import_zod3.z.number(),
|
|
178
|
+
site: import_zod3.z.object({
|
|
179
|
+
name: import_zod3.z.string()
|
|
180
|
+
}),
|
|
181
|
+
user: import_zod3.z.object({
|
|
182
|
+
name: import_zod3.z.string(),
|
|
183
|
+
email: import_zod3.z.string()
|
|
184
|
+
})
|
|
185
|
+
})
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
timestamp: 1667425322407,
|
|
189
|
+
site: {
|
|
190
|
+
name: "My Site"
|
|
191
|
+
},
|
|
192
|
+
user: {
|
|
193
|
+
email: "email of the user who performed this action",
|
|
194
|
+
name: "name of the user who performed this action"
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
);
|
|
198
|
+
var ManifestPublishedEventName = ManifestPublishedDefinition["event"];
|
|
199
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
200
|
+
0 && (module.exports = {
|
|
201
|
+
CompositionChangedDefinition,
|
|
202
|
+
CompositionChangedEventName,
|
|
203
|
+
CompositionDeletedDefinition,
|
|
204
|
+
CompositionDeletedEventName,
|
|
205
|
+
CompositionPayloadSchema,
|
|
206
|
+
CompositionPublishedDefinition,
|
|
207
|
+
CompositionPublishedEventName,
|
|
208
|
+
ManifestPublishedDefinition,
|
|
209
|
+
ManifestPublishedEventName,
|
|
210
|
+
definition,
|
|
211
|
+
isDefinition
|
|
212
|
+
});
|
package/dist/index.mjs
CHANGED
|
@@ -1 +1,175 @@
|
|
|
1
|
-
|
|
1
|
+
// src/composition/common.ts
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
var CompositionPayloadSchema = z.object({
|
|
4
|
+
id: z.string(),
|
|
5
|
+
slug: z.string().optional(),
|
|
6
|
+
project_map: z.object({
|
|
7
|
+
node: z.object({
|
|
8
|
+
path: z.string()
|
|
9
|
+
})
|
|
10
|
+
}).optional(),
|
|
11
|
+
state: z.number(),
|
|
12
|
+
name: z.string(),
|
|
13
|
+
project: z.object({
|
|
14
|
+
id: z.string(),
|
|
15
|
+
url: z.string()
|
|
16
|
+
}),
|
|
17
|
+
user: z.object({
|
|
18
|
+
name: z.string(),
|
|
19
|
+
email: z.string()
|
|
20
|
+
}),
|
|
21
|
+
edit_url: z.string()
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
// src/definition.ts
|
|
25
|
+
var isDefinition = (obj) => {
|
|
26
|
+
return Object.hasOwn(obj, "_definition") && obj["_definition"];
|
|
27
|
+
};
|
|
28
|
+
var definition = (options, example) => {
|
|
29
|
+
return {
|
|
30
|
+
...options,
|
|
31
|
+
_definition: true,
|
|
32
|
+
example
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
// src/composition/composition.changed.ts
|
|
37
|
+
var CompositionChangedDefinition = definition(
|
|
38
|
+
{
|
|
39
|
+
event: "composition.changed",
|
|
40
|
+
name: "Composition Changed",
|
|
41
|
+
description: "Triggers when a composition has been changed.",
|
|
42
|
+
schema: CompositionPayloadSchema
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
id: "id of composition",
|
|
46
|
+
name: "name of composition",
|
|
47
|
+
slug: "slug of composition",
|
|
48
|
+
project: {
|
|
49
|
+
id: "id of the project this composition belongs to",
|
|
50
|
+
url: "link to project this composition belongs to"
|
|
51
|
+
},
|
|
52
|
+
state: 0,
|
|
53
|
+
user: {
|
|
54
|
+
email: "email of the user who performed this action",
|
|
55
|
+
name: "name of the user who performed this action"
|
|
56
|
+
},
|
|
57
|
+
project_map: {
|
|
58
|
+
node: {
|
|
59
|
+
path: "path that this composition is associated with"
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
edit_url: "link to edit this composition"
|
|
63
|
+
}
|
|
64
|
+
);
|
|
65
|
+
var CompositionChangedEventName = CompositionChangedDefinition["event"];
|
|
66
|
+
|
|
67
|
+
// src/composition/composition.deleted.ts
|
|
68
|
+
import { z as z2 } from "zod";
|
|
69
|
+
var CompositionDeletedDefinition = definition(
|
|
70
|
+
{
|
|
71
|
+
event: "composition.deleted",
|
|
72
|
+
name: "Composition Deleted",
|
|
73
|
+
description: "Triggers when a composition has been deleted.",
|
|
74
|
+
schema: z2.object({
|
|
75
|
+
id: z2.string(),
|
|
76
|
+
state: z2.number().optional(),
|
|
77
|
+
user: z2.object({
|
|
78
|
+
name: z2.string(),
|
|
79
|
+
email: z2.string()
|
|
80
|
+
}),
|
|
81
|
+
project: z2.object({
|
|
82
|
+
id: z2.string(),
|
|
83
|
+
url: z2.string()
|
|
84
|
+
})
|
|
85
|
+
})
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
id: "id of composition",
|
|
89
|
+
state: 0,
|
|
90
|
+
user: {
|
|
91
|
+
email: "email of the user who performed this action",
|
|
92
|
+
name: "name of the user who performed this action"
|
|
93
|
+
},
|
|
94
|
+
project: {
|
|
95
|
+
id: "id of the project this composition belongs to",
|
|
96
|
+
url: "link to project this composition belongs to"
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
);
|
|
100
|
+
var CompositionDeletedEventName = CompositionDeletedDefinition["event"];
|
|
101
|
+
|
|
102
|
+
// src/composition/composition.published.ts
|
|
103
|
+
var CompositionPublishedDefinition = definition(
|
|
104
|
+
{
|
|
105
|
+
event: "composition.published",
|
|
106
|
+
name: "Composition Published",
|
|
107
|
+
description: "Triggers when a composition has been published.",
|
|
108
|
+
schema: CompositionPayloadSchema
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
id: "id of composition",
|
|
112
|
+
name: "name of composition",
|
|
113
|
+
slug: "slug of composition",
|
|
114
|
+
project: {
|
|
115
|
+
id: "id of the project this composition belongs to",
|
|
116
|
+
url: "link to project this composition belongs to"
|
|
117
|
+
},
|
|
118
|
+
state: 0,
|
|
119
|
+
user: {
|
|
120
|
+
email: "email of the user who performed this action",
|
|
121
|
+
name: "name of the user who performed this action"
|
|
122
|
+
},
|
|
123
|
+
project_map: {
|
|
124
|
+
node: {
|
|
125
|
+
path: "path that this composition is associated with"
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
edit_url: "link to edit this composition"
|
|
129
|
+
}
|
|
130
|
+
);
|
|
131
|
+
var CompositionPublishedEventName = CompositionPublishedDefinition["event"];
|
|
132
|
+
|
|
133
|
+
// src/manifest/manifest.published.ts
|
|
134
|
+
import { z as z3 } from "zod";
|
|
135
|
+
var ManifestPublishedDefinition = definition(
|
|
136
|
+
{
|
|
137
|
+
event: "manifest.published",
|
|
138
|
+
name: "Manifest Published",
|
|
139
|
+
description: "Triggers when a manifest has been published.",
|
|
140
|
+
schema: z3.object({
|
|
141
|
+
timestamp: z3.number(),
|
|
142
|
+
site: z3.object({
|
|
143
|
+
name: z3.string()
|
|
144
|
+
}),
|
|
145
|
+
user: z3.object({
|
|
146
|
+
name: z3.string(),
|
|
147
|
+
email: z3.string()
|
|
148
|
+
})
|
|
149
|
+
})
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
timestamp: 1667425322407,
|
|
153
|
+
site: {
|
|
154
|
+
name: "My Site"
|
|
155
|
+
},
|
|
156
|
+
user: {
|
|
157
|
+
email: "email of the user who performed this action",
|
|
158
|
+
name: "name of the user who performed this action"
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
);
|
|
162
|
+
var ManifestPublishedEventName = ManifestPublishedDefinition["event"];
|
|
163
|
+
export {
|
|
164
|
+
CompositionChangedDefinition,
|
|
165
|
+
CompositionChangedEventName,
|
|
166
|
+
CompositionDeletedDefinition,
|
|
167
|
+
CompositionDeletedEventName,
|
|
168
|
+
CompositionPayloadSchema,
|
|
169
|
+
CompositionPublishedDefinition,
|
|
170
|
+
CompositionPublishedEventName,
|
|
171
|
+
ManifestPublishedDefinition,
|
|
172
|
+
ManifestPublishedEventName,
|
|
173
|
+
definition,
|
|
174
|
+
isDefinition
|
|
175
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uniformdev/webhooks",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "18.0.0",
|
|
4
4
|
"description": "Uniform Webhooks",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"types": "./dist/index.d.ts",
|
|
16
16
|
"sideEffects": false,
|
|
17
17
|
"scripts": {
|
|
18
|
-
"build": "tsup
|
|
18
|
+
"build": "tsup",
|
|
19
19
|
"dev": "tsup --watch",
|
|
20
20
|
"clean": "rimraf dist",
|
|
21
21
|
"test": "jest --maxWorkers=1 --passWithNoTests",
|
|
@@ -28,13 +28,16 @@
|
|
|
28
28
|
"/dist"
|
|
29
29
|
],
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"zod": "3.
|
|
31
|
+
"zod": "3.20.2"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"dotenv": "^16.0.3",
|
|
35
35
|
"npm-run-all": "4.1.5",
|
|
36
|
-
"svix": "^0.
|
|
37
|
-
"zod-to-json-schema": "3.
|
|
36
|
+
"svix": "^0.74.1",
|
|
37
|
+
"zod-to-json-schema": "3.20.2"
|
|
38
38
|
},
|
|
39
|
-
"
|
|
39
|
+
"publishConfig": {
|
|
40
|
+
"access": "public"
|
|
41
|
+
},
|
|
42
|
+
"gitHead": "ed311bfb657d4b90e7d7c80c046cf2f115a94abe"
|
|
40
43
|
}
|