@uniformdev/webhooks 20.72.2-alpha.3 → 20.72.3-alpha.14
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.mts +843 -28
- package/dist/index.d.ts +843 -28
- package/dist/index.esm.js +142 -0
- package/dist/index.js +149 -0
- package/dist/index.mjs +142 -0
- package/package.json +3 -2
package/dist/index.esm.js
CHANGED
|
@@ -109,6 +109,10 @@ var CompositionCorePayloadSchema = z3.object({
|
|
|
109
109
|
id: z3.string(),
|
|
110
110
|
url: z3.string()
|
|
111
111
|
}),
|
|
112
|
+
/**
|
|
113
|
+
* The composition's modified time (ISO 8601) after this change. Only present for change/publish events.
|
|
114
|
+
*/
|
|
115
|
+
timestamp: z3.string().optional(),
|
|
112
116
|
initiator: webhookInitiatorSchema
|
|
113
117
|
});
|
|
114
118
|
var CompositionTriggerPayloadSchema = z3.object({
|
|
@@ -391,6 +395,10 @@ var EntryCorePayloadSchema = z4.object({
|
|
|
391
395
|
id: z4.string(),
|
|
392
396
|
url: z4.string()
|
|
393
397
|
}),
|
|
398
|
+
/**
|
|
399
|
+
* The entry's server-of-record modified time (ISO 8601) after this change. Only present for change/publish events.
|
|
400
|
+
*/
|
|
401
|
+
timestamp: z4.string().optional(),
|
|
394
402
|
initiator: webhookInitiatorSchema
|
|
395
403
|
});
|
|
396
404
|
var EntryTriggerPayloadSchema = z4.object({
|
|
@@ -1187,6 +1195,133 @@ var WorkflowTransitionDefinition = definition(
|
|
|
1187
1195
|
}
|
|
1188
1196
|
);
|
|
1189
1197
|
var WorkflowTransitionEventName = WorkflowTransitionDefinition["event"];
|
|
1198
|
+
|
|
1199
|
+
// src/catalog.ts
|
|
1200
|
+
var webhookEventCatalog = {
|
|
1201
|
+
"asset.deleted": AssetDeletedDefinition,
|
|
1202
|
+
"asset.published": AssetPublishedDefinition,
|
|
1203
|
+
"composition.changed": CompositionChangedDefinition,
|
|
1204
|
+
"composition.deleted": CompositionDeletedDefinition,
|
|
1205
|
+
"composition.published": CompositionPublishedDefinition,
|
|
1206
|
+
"composition.release.changed": CompositionReleaseChangedDefinition,
|
|
1207
|
+
"composition.release.deleted": CompositionReleaseDeletedDefinition,
|
|
1208
|
+
"composition.release.published": CompositionReleasePublishedDefinition,
|
|
1209
|
+
"composition.release.restored": CompositionReleaseRestoredDefinition,
|
|
1210
|
+
"entry.changed": EntryChangedDefinition,
|
|
1211
|
+
"entry.deleted": EntryDeletedDefinition,
|
|
1212
|
+
"entry.published": EntryPublishedDefinition,
|
|
1213
|
+
"entry.release.changed": EntryReleaseChangedDefinition,
|
|
1214
|
+
"entry.release.deleted": EntryReleaseDeletedDefinition,
|
|
1215
|
+
"entry.release.published": EntryReleasePublishedDefinition,
|
|
1216
|
+
"entry.release.restored": EntryReleaseRestoredDefinition,
|
|
1217
|
+
"manifest.published": ManifestPublishedDefinition,
|
|
1218
|
+
"projectmap.delete": ProjectMapDeleteDefinition,
|
|
1219
|
+
"projectmap.node.delete": ProjectMapNodeDeleteDefinition,
|
|
1220
|
+
"projectmap.node.insert": ProjectMapNodeInsertDefinition,
|
|
1221
|
+
"projectmap.node.update": ProjectMapNodeUpdateDefinition,
|
|
1222
|
+
"projectmap.update": ProjectMapUpdateDefinition,
|
|
1223
|
+
"redirect.delete": RedirectDeleteDefinition,
|
|
1224
|
+
"redirect.insert": RedirectInsertDefinition,
|
|
1225
|
+
"redirect.update": RedirectUpdateDefinition,
|
|
1226
|
+
"release.changed": ReleaseChangedDefinition,
|
|
1227
|
+
"release.deleted": ReleaseDeletedDefinition,
|
|
1228
|
+
"release.launch_started": ReleaseLaunchStartedDefinition,
|
|
1229
|
+
"release.launched": ReleaseLaunchedDefinition,
|
|
1230
|
+
"workflow.transition": WorkflowTransitionDefinition
|
|
1231
|
+
};
|
|
1232
|
+
var webhookEventNames = Object.keys(webhookEventCatalog);
|
|
1233
|
+
|
|
1234
|
+
// src/notification/common.ts
|
|
1235
|
+
import * as z16 from "zod";
|
|
1236
|
+
var editionEntitySchema = z16.strictObject({
|
|
1237
|
+
type: z16.enum(["entry", "composition"]),
|
|
1238
|
+
entityId: z16.string(),
|
|
1239
|
+
releaseId: z16.string().optional(),
|
|
1240
|
+
editionId: z16.string().optional()
|
|
1241
|
+
});
|
|
1242
|
+
var releaseEntitySchema = z16.strictObject({
|
|
1243
|
+
type: z16.enum(["entryPattern", "componentPattern", "compositionPattern"]),
|
|
1244
|
+
entityId: z16.string(),
|
|
1245
|
+
releaseId: z16.string().optional()
|
|
1246
|
+
});
|
|
1247
|
+
var platformEntitySchema = z16.strictObject({
|
|
1248
|
+
type: z16.enum([
|
|
1249
|
+
"component",
|
|
1250
|
+
"contentType",
|
|
1251
|
+
"blockType",
|
|
1252
|
+
"asset",
|
|
1253
|
+
"aggregate",
|
|
1254
|
+
"enrichment",
|
|
1255
|
+
"signal",
|
|
1256
|
+
"quirk",
|
|
1257
|
+
"test",
|
|
1258
|
+
"projectMapNode"
|
|
1259
|
+
]),
|
|
1260
|
+
entityId: z16.string()
|
|
1261
|
+
});
|
|
1262
|
+
var externalEntitySchema = z16.strictObject({
|
|
1263
|
+
type: z16.literal("external"),
|
|
1264
|
+
url: z16.string()
|
|
1265
|
+
});
|
|
1266
|
+
var NotificationEntitySchema = z16.discriminatedUnion("type", [
|
|
1267
|
+
editionEntitySchema,
|
|
1268
|
+
releaseEntitySchema,
|
|
1269
|
+
platformEntitySchema,
|
|
1270
|
+
externalEntitySchema
|
|
1271
|
+
]);
|
|
1272
|
+
var NotificationSummarySchema = z16.strictObject({
|
|
1273
|
+
format: z16.literal("markdown"),
|
|
1274
|
+
value: z16.string()
|
|
1275
|
+
});
|
|
1276
|
+
var NotificationPayloadSchema = z16.strictObject({
|
|
1277
|
+
id: z16.string(),
|
|
1278
|
+
type: z16.literal("text"),
|
|
1279
|
+
summary: NotificationSummarySchema,
|
|
1280
|
+
entity: NotificationEntitySchema.optional(),
|
|
1281
|
+
recipients: z16.array(z16.string()).min(1).max(100),
|
|
1282
|
+
timestamp: z16.string(),
|
|
1283
|
+
project: z16.strictObject({
|
|
1284
|
+
id: z16.string(),
|
|
1285
|
+
url: z16.string()
|
|
1286
|
+
}),
|
|
1287
|
+
initiator: webhookInitiatorSchema
|
|
1288
|
+
});
|
|
1289
|
+
|
|
1290
|
+
// src/notification/notification.created.ts
|
|
1291
|
+
var NotificationCreatedDefinition = definition(
|
|
1292
|
+
{
|
|
1293
|
+
event: "notification.created",
|
|
1294
|
+
name: "Notification Created",
|
|
1295
|
+
description: "Triggers when a notification has been created.",
|
|
1296
|
+
schema: NotificationPayloadSchema
|
|
1297
|
+
},
|
|
1298
|
+
{
|
|
1299
|
+
id: "346bc4cf-3087-42e1-aadb-2722f77f32b1",
|
|
1300
|
+
type: "text",
|
|
1301
|
+
summary: {
|
|
1302
|
+
format: "markdown",
|
|
1303
|
+
value: "The About Us composition is ready for review."
|
|
1304
|
+
},
|
|
1305
|
+
entity: {
|
|
1306
|
+
type: "composition",
|
|
1307
|
+
entityId: "0b9d2118-f2d0-4fe6-9d46-7c661abaf474",
|
|
1308
|
+
editionId: "8b937004-6c50-449a-a7cd-a6a70b25f2da"
|
|
1309
|
+
},
|
|
1310
|
+
recipients: ["auth0|recipient-one", "auth0|recipient-two"],
|
|
1311
|
+
timestamp: "2026-07-20T12:42:06Z",
|
|
1312
|
+
project: {
|
|
1313
|
+
id: "644ede73-d6aa-4159-bf98-14ad7fb4cb66",
|
|
1314
|
+
url: "https://uniform.app/projects/644ede73-d6aa-4159-bf98-14ad7fb4cb66"
|
|
1315
|
+
},
|
|
1316
|
+
initiator: {
|
|
1317
|
+
id: "auth0|initiator",
|
|
1318
|
+
email: "initiator@example.com",
|
|
1319
|
+
name: "A User",
|
|
1320
|
+
is_api_key: false
|
|
1321
|
+
}
|
|
1322
|
+
}
|
|
1323
|
+
);
|
|
1324
|
+
var NotificationCreatedEventName = NotificationCreatedDefinition["event"];
|
|
1190
1325
|
export {
|
|
1191
1326
|
ArchivedReleaseLaunchStartedDefinition,
|
|
1192
1327
|
AssetDeletePayloadSchema,
|
|
@@ -1233,6 +1368,11 @@ export {
|
|
|
1233
1368
|
EntryTriggerPayloadSchema,
|
|
1234
1369
|
ManifestPublishedDefinition,
|
|
1235
1370
|
ManifestPublishedEventName,
|
|
1371
|
+
NotificationCreatedDefinition,
|
|
1372
|
+
NotificationCreatedEventName,
|
|
1373
|
+
NotificationEntitySchema,
|
|
1374
|
+
NotificationPayloadSchema,
|
|
1375
|
+
NotificationSummarySchema,
|
|
1236
1376
|
ProjectMapDeleteDefinition,
|
|
1237
1377
|
ProjectMapDeletedEventName,
|
|
1238
1378
|
ProjectMapNodeDeleteDefinition,
|
|
@@ -1267,5 +1407,7 @@ export {
|
|
|
1267
1407
|
WorkflowTransitionPayloadSchema,
|
|
1268
1408
|
definition,
|
|
1269
1409
|
isDefinition,
|
|
1410
|
+
webhookEventCatalog,
|
|
1411
|
+
webhookEventNames,
|
|
1270
1412
|
webhookInitiatorSchema
|
|
1271
1413
|
};
|
package/dist/index.js
CHANGED
|
@@ -75,6 +75,11 @@ __export(index_exports, {
|
|
|
75
75
|
EntryTriggerPayloadSchema: () => EntryTriggerPayloadSchema,
|
|
76
76
|
ManifestPublishedDefinition: () => ManifestPublishedDefinition,
|
|
77
77
|
ManifestPublishedEventName: () => ManifestPublishedEventName,
|
|
78
|
+
NotificationCreatedDefinition: () => NotificationCreatedDefinition,
|
|
79
|
+
NotificationCreatedEventName: () => NotificationCreatedEventName,
|
|
80
|
+
NotificationEntitySchema: () => NotificationEntitySchema,
|
|
81
|
+
NotificationPayloadSchema: () => NotificationPayloadSchema,
|
|
82
|
+
NotificationSummarySchema: () => NotificationSummarySchema,
|
|
78
83
|
ProjectMapDeleteDefinition: () => ProjectMapDeleteDefinition,
|
|
79
84
|
ProjectMapDeletedEventName: () => ProjectMapDeletedEventName,
|
|
80
85
|
ProjectMapNodeDeleteDefinition: () => ProjectMapNodeDeleteDefinition,
|
|
@@ -109,6 +114,8 @@ __export(index_exports, {
|
|
|
109
114
|
WorkflowTransitionPayloadSchema: () => WorkflowTransitionPayloadSchema,
|
|
110
115
|
definition: () => definition,
|
|
111
116
|
isDefinition: () => isDefinition,
|
|
117
|
+
webhookEventCatalog: () => webhookEventCatalog,
|
|
118
|
+
webhookEventNames: () => webhookEventNames,
|
|
112
119
|
webhookInitiatorSchema: () => webhookInitiatorSchema
|
|
113
120
|
});
|
|
114
121
|
module.exports = __toCommonJS(index_exports);
|
|
@@ -224,6 +231,10 @@ var CompositionCorePayloadSchema = z3.object({
|
|
|
224
231
|
id: z3.string(),
|
|
225
232
|
url: z3.string()
|
|
226
233
|
}),
|
|
234
|
+
/**
|
|
235
|
+
* The composition's modified time (ISO 8601) after this change. Only present for change/publish events.
|
|
236
|
+
*/
|
|
237
|
+
timestamp: z3.string().optional(),
|
|
227
238
|
initiator: webhookInitiatorSchema
|
|
228
239
|
});
|
|
229
240
|
var CompositionTriggerPayloadSchema = z3.object({
|
|
@@ -506,6 +517,10 @@ var EntryCorePayloadSchema = z4.object({
|
|
|
506
517
|
id: z4.string(),
|
|
507
518
|
url: z4.string()
|
|
508
519
|
}),
|
|
520
|
+
/**
|
|
521
|
+
* The entry's server-of-record modified time (ISO 8601) after this change. Only present for change/publish events.
|
|
522
|
+
*/
|
|
523
|
+
timestamp: z4.string().optional(),
|
|
509
524
|
initiator: webhookInitiatorSchema
|
|
510
525
|
});
|
|
511
526
|
var EntryTriggerPayloadSchema = z4.object({
|
|
@@ -1302,6 +1317,133 @@ var WorkflowTransitionDefinition = definition(
|
|
|
1302
1317
|
}
|
|
1303
1318
|
);
|
|
1304
1319
|
var WorkflowTransitionEventName = WorkflowTransitionDefinition["event"];
|
|
1320
|
+
|
|
1321
|
+
// src/catalog.ts
|
|
1322
|
+
var webhookEventCatalog = {
|
|
1323
|
+
"asset.deleted": AssetDeletedDefinition,
|
|
1324
|
+
"asset.published": AssetPublishedDefinition,
|
|
1325
|
+
"composition.changed": CompositionChangedDefinition,
|
|
1326
|
+
"composition.deleted": CompositionDeletedDefinition,
|
|
1327
|
+
"composition.published": CompositionPublishedDefinition,
|
|
1328
|
+
"composition.release.changed": CompositionReleaseChangedDefinition,
|
|
1329
|
+
"composition.release.deleted": CompositionReleaseDeletedDefinition,
|
|
1330
|
+
"composition.release.published": CompositionReleasePublishedDefinition,
|
|
1331
|
+
"composition.release.restored": CompositionReleaseRestoredDefinition,
|
|
1332
|
+
"entry.changed": EntryChangedDefinition,
|
|
1333
|
+
"entry.deleted": EntryDeletedDefinition,
|
|
1334
|
+
"entry.published": EntryPublishedDefinition,
|
|
1335
|
+
"entry.release.changed": EntryReleaseChangedDefinition,
|
|
1336
|
+
"entry.release.deleted": EntryReleaseDeletedDefinition,
|
|
1337
|
+
"entry.release.published": EntryReleasePublishedDefinition,
|
|
1338
|
+
"entry.release.restored": EntryReleaseRestoredDefinition,
|
|
1339
|
+
"manifest.published": ManifestPublishedDefinition,
|
|
1340
|
+
"projectmap.delete": ProjectMapDeleteDefinition,
|
|
1341
|
+
"projectmap.node.delete": ProjectMapNodeDeleteDefinition,
|
|
1342
|
+
"projectmap.node.insert": ProjectMapNodeInsertDefinition,
|
|
1343
|
+
"projectmap.node.update": ProjectMapNodeUpdateDefinition,
|
|
1344
|
+
"projectmap.update": ProjectMapUpdateDefinition,
|
|
1345
|
+
"redirect.delete": RedirectDeleteDefinition,
|
|
1346
|
+
"redirect.insert": RedirectInsertDefinition,
|
|
1347
|
+
"redirect.update": RedirectUpdateDefinition,
|
|
1348
|
+
"release.changed": ReleaseChangedDefinition,
|
|
1349
|
+
"release.deleted": ReleaseDeletedDefinition,
|
|
1350
|
+
"release.launch_started": ReleaseLaunchStartedDefinition,
|
|
1351
|
+
"release.launched": ReleaseLaunchedDefinition,
|
|
1352
|
+
"workflow.transition": WorkflowTransitionDefinition
|
|
1353
|
+
};
|
|
1354
|
+
var webhookEventNames = Object.keys(webhookEventCatalog);
|
|
1355
|
+
|
|
1356
|
+
// src/notification/common.ts
|
|
1357
|
+
var z16 = __toESM(require("zod"));
|
|
1358
|
+
var editionEntitySchema = z16.strictObject({
|
|
1359
|
+
type: z16.enum(["entry", "composition"]),
|
|
1360
|
+
entityId: z16.string(),
|
|
1361
|
+
releaseId: z16.string().optional(),
|
|
1362
|
+
editionId: z16.string().optional()
|
|
1363
|
+
});
|
|
1364
|
+
var releaseEntitySchema = z16.strictObject({
|
|
1365
|
+
type: z16.enum(["entryPattern", "componentPattern", "compositionPattern"]),
|
|
1366
|
+
entityId: z16.string(),
|
|
1367
|
+
releaseId: z16.string().optional()
|
|
1368
|
+
});
|
|
1369
|
+
var platformEntitySchema = z16.strictObject({
|
|
1370
|
+
type: z16.enum([
|
|
1371
|
+
"component",
|
|
1372
|
+
"contentType",
|
|
1373
|
+
"blockType",
|
|
1374
|
+
"asset",
|
|
1375
|
+
"aggregate",
|
|
1376
|
+
"enrichment",
|
|
1377
|
+
"signal",
|
|
1378
|
+
"quirk",
|
|
1379
|
+
"test",
|
|
1380
|
+
"projectMapNode"
|
|
1381
|
+
]),
|
|
1382
|
+
entityId: z16.string()
|
|
1383
|
+
});
|
|
1384
|
+
var externalEntitySchema = z16.strictObject({
|
|
1385
|
+
type: z16.literal("external"),
|
|
1386
|
+
url: z16.string()
|
|
1387
|
+
});
|
|
1388
|
+
var NotificationEntitySchema = z16.discriminatedUnion("type", [
|
|
1389
|
+
editionEntitySchema,
|
|
1390
|
+
releaseEntitySchema,
|
|
1391
|
+
platformEntitySchema,
|
|
1392
|
+
externalEntitySchema
|
|
1393
|
+
]);
|
|
1394
|
+
var NotificationSummarySchema = z16.strictObject({
|
|
1395
|
+
format: z16.literal("markdown"),
|
|
1396
|
+
value: z16.string()
|
|
1397
|
+
});
|
|
1398
|
+
var NotificationPayloadSchema = z16.strictObject({
|
|
1399
|
+
id: z16.string(),
|
|
1400
|
+
type: z16.literal("text"),
|
|
1401
|
+
summary: NotificationSummarySchema,
|
|
1402
|
+
entity: NotificationEntitySchema.optional(),
|
|
1403
|
+
recipients: z16.array(z16.string()).min(1).max(100),
|
|
1404
|
+
timestamp: z16.string(),
|
|
1405
|
+
project: z16.strictObject({
|
|
1406
|
+
id: z16.string(),
|
|
1407
|
+
url: z16.string()
|
|
1408
|
+
}),
|
|
1409
|
+
initiator: webhookInitiatorSchema
|
|
1410
|
+
});
|
|
1411
|
+
|
|
1412
|
+
// src/notification/notification.created.ts
|
|
1413
|
+
var NotificationCreatedDefinition = definition(
|
|
1414
|
+
{
|
|
1415
|
+
event: "notification.created",
|
|
1416
|
+
name: "Notification Created",
|
|
1417
|
+
description: "Triggers when a notification has been created.",
|
|
1418
|
+
schema: NotificationPayloadSchema
|
|
1419
|
+
},
|
|
1420
|
+
{
|
|
1421
|
+
id: "346bc4cf-3087-42e1-aadb-2722f77f32b1",
|
|
1422
|
+
type: "text",
|
|
1423
|
+
summary: {
|
|
1424
|
+
format: "markdown",
|
|
1425
|
+
value: "The About Us composition is ready for review."
|
|
1426
|
+
},
|
|
1427
|
+
entity: {
|
|
1428
|
+
type: "composition",
|
|
1429
|
+
entityId: "0b9d2118-f2d0-4fe6-9d46-7c661abaf474",
|
|
1430
|
+
editionId: "8b937004-6c50-449a-a7cd-a6a70b25f2da"
|
|
1431
|
+
},
|
|
1432
|
+
recipients: ["auth0|recipient-one", "auth0|recipient-two"],
|
|
1433
|
+
timestamp: "2026-07-20T12:42:06Z",
|
|
1434
|
+
project: {
|
|
1435
|
+
id: "644ede73-d6aa-4159-bf98-14ad7fb4cb66",
|
|
1436
|
+
url: "https://uniform.app/projects/644ede73-d6aa-4159-bf98-14ad7fb4cb66"
|
|
1437
|
+
},
|
|
1438
|
+
initiator: {
|
|
1439
|
+
id: "auth0|initiator",
|
|
1440
|
+
email: "initiator@example.com",
|
|
1441
|
+
name: "A User",
|
|
1442
|
+
is_api_key: false
|
|
1443
|
+
}
|
|
1444
|
+
}
|
|
1445
|
+
);
|
|
1446
|
+
var NotificationCreatedEventName = NotificationCreatedDefinition["event"];
|
|
1305
1447
|
// Annotate the CommonJS export names for ESM import in node:
|
|
1306
1448
|
0 && (module.exports = {
|
|
1307
1449
|
ArchivedReleaseLaunchStartedDefinition,
|
|
@@ -1349,6 +1491,11 @@ var WorkflowTransitionEventName = WorkflowTransitionDefinition["event"];
|
|
|
1349
1491
|
EntryTriggerPayloadSchema,
|
|
1350
1492
|
ManifestPublishedDefinition,
|
|
1351
1493
|
ManifestPublishedEventName,
|
|
1494
|
+
NotificationCreatedDefinition,
|
|
1495
|
+
NotificationCreatedEventName,
|
|
1496
|
+
NotificationEntitySchema,
|
|
1497
|
+
NotificationPayloadSchema,
|
|
1498
|
+
NotificationSummarySchema,
|
|
1352
1499
|
ProjectMapDeleteDefinition,
|
|
1353
1500
|
ProjectMapDeletedEventName,
|
|
1354
1501
|
ProjectMapNodeDeleteDefinition,
|
|
@@ -1383,5 +1530,7 @@ var WorkflowTransitionEventName = WorkflowTransitionDefinition["event"];
|
|
|
1383
1530
|
WorkflowTransitionPayloadSchema,
|
|
1384
1531
|
definition,
|
|
1385
1532
|
isDefinition,
|
|
1533
|
+
webhookEventCatalog,
|
|
1534
|
+
webhookEventNames,
|
|
1386
1535
|
webhookInitiatorSchema
|
|
1387
1536
|
});
|
package/dist/index.mjs
CHANGED
|
@@ -109,6 +109,10 @@ var CompositionCorePayloadSchema = z3.object({
|
|
|
109
109
|
id: z3.string(),
|
|
110
110
|
url: z3.string()
|
|
111
111
|
}),
|
|
112
|
+
/**
|
|
113
|
+
* The composition's modified time (ISO 8601) after this change. Only present for change/publish events.
|
|
114
|
+
*/
|
|
115
|
+
timestamp: z3.string().optional(),
|
|
112
116
|
initiator: webhookInitiatorSchema
|
|
113
117
|
});
|
|
114
118
|
var CompositionTriggerPayloadSchema = z3.object({
|
|
@@ -391,6 +395,10 @@ var EntryCorePayloadSchema = z4.object({
|
|
|
391
395
|
id: z4.string(),
|
|
392
396
|
url: z4.string()
|
|
393
397
|
}),
|
|
398
|
+
/**
|
|
399
|
+
* The entry's server-of-record modified time (ISO 8601) after this change. Only present for change/publish events.
|
|
400
|
+
*/
|
|
401
|
+
timestamp: z4.string().optional(),
|
|
394
402
|
initiator: webhookInitiatorSchema
|
|
395
403
|
});
|
|
396
404
|
var EntryTriggerPayloadSchema = z4.object({
|
|
@@ -1187,6 +1195,133 @@ var WorkflowTransitionDefinition = definition(
|
|
|
1187
1195
|
}
|
|
1188
1196
|
);
|
|
1189
1197
|
var WorkflowTransitionEventName = WorkflowTransitionDefinition["event"];
|
|
1198
|
+
|
|
1199
|
+
// src/catalog.ts
|
|
1200
|
+
var webhookEventCatalog = {
|
|
1201
|
+
"asset.deleted": AssetDeletedDefinition,
|
|
1202
|
+
"asset.published": AssetPublishedDefinition,
|
|
1203
|
+
"composition.changed": CompositionChangedDefinition,
|
|
1204
|
+
"composition.deleted": CompositionDeletedDefinition,
|
|
1205
|
+
"composition.published": CompositionPublishedDefinition,
|
|
1206
|
+
"composition.release.changed": CompositionReleaseChangedDefinition,
|
|
1207
|
+
"composition.release.deleted": CompositionReleaseDeletedDefinition,
|
|
1208
|
+
"composition.release.published": CompositionReleasePublishedDefinition,
|
|
1209
|
+
"composition.release.restored": CompositionReleaseRestoredDefinition,
|
|
1210
|
+
"entry.changed": EntryChangedDefinition,
|
|
1211
|
+
"entry.deleted": EntryDeletedDefinition,
|
|
1212
|
+
"entry.published": EntryPublishedDefinition,
|
|
1213
|
+
"entry.release.changed": EntryReleaseChangedDefinition,
|
|
1214
|
+
"entry.release.deleted": EntryReleaseDeletedDefinition,
|
|
1215
|
+
"entry.release.published": EntryReleasePublishedDefinition,
|
|
1216
|
+
"entry.release.restored": EntryReleaseRestoredDefinition,
|
|
1217
|
+
"manifest.published": ManifestPublishedDefinition,
|
|
1218
|
+
"projectmap.delete": ProjectMapDeleteDefinition,
|
|
1219
|
+
"projectmap.node.delete": ProjectMapNodeDeleteDefinition,
|
|
1220
|
+
"projectmap.node.insert": ProjectMapNodeInsertDefinition,
|
|
1221
|
+
"projectmap.node.update": ProjectMapNodeUpdateDefinition,
|
|
1222
|
+
"projectmap.update": ProjectMapUpdateDefinition,
|
|
1223
|
+
"redirect.delete": RedirectDeleteDefinition,
|
|
1224
|
+
"redirect.insert": RedirectInsertDefinition,
|
|
1225
|
+
"redirect.update": RedirectUpdateDefinition,
|
|
1226
|
+
"release.changed": ReleaseChangedDefinition,
|
|
1227
|
+
"release.deleted": ReleaseDeletedDefinition,
|
|
1228
|
+
"release.launch_started": ReleaseLaunchStartedDefinition,
|
|
1229
|
+
"release.launched": ReleaseLaunchedDefinition,
|
|
1230
|
+
"workflow.transition": WorkflowTransitionDefinition
|
|
1231
|
+
};
|
|
1232
|
+
var webhookEventNames = Object.keys(webhookEventCatalog);
|
|
1233
|
+
|
|
1234
|
+
// src/notification/common.ts
|
|
1235
|
+
import * as z16 from "zod";
|
|
1236
|
+
var editionEntitySchema = z16.strictObject({
|
|
1237
|
+
type: z16.enum(["entry", "composition"]),
|
|
1238
|
+
entityId: z16.string(),
|
|
1239
|
+
releaseId: z16.string().optional(),
|
|
1240
|
+
editionId: z16.string().optional()
|
|
1241
|
+
});
|
|
1242
|
+
var releaseEntitySchema = z16.strictObject({
|
|
1243
|
+
type: z16.enum(["entryPattern", "componentPattern", "compositionPattern"]),
|
|
1244
|
+
entityId: z16.string(),
|
|
1245
|
+
releaseId: z16.string().optional()
|
|
1246
|
+
});
|
|
1247
|
+
var platformEntitySchema = z16.strictObject({
|
|
1248
|
+
type: z16.enum([
|
|
1249
|
+
"component",
|
|
1250
|
+
"contentType",
|
|
1251
|
+
"blockType",
|
|
1252
|
+
"asset",
|
|
1253
|
+
"aggregate",
|
|
1254
|
+
"enrichment",
|
|
1255
|
+
"signal",
|
|
1256
|
+
"quirk",
|
|
1257
|
+
"test",
|
|
1258
|
+
"projectMapNode"
|
|
1259
|
+
]),
|
|
1260
|
+
entityId: z16.string()
|
|
1261
|
+
});
|
|
1262
|
+
var externalEntitySchema = z16.strictObject({
|
|
1263
|
+
type: z16.literal("external"),
|
|
1264
|
+
url: z16.string()
|
|
1265
|
+
});
|
|
1266
|
+
var NotificationEntitySchema = z16.discriminatedUnion("type", [
|
|
1267
|
+
editionEntitySchema,
|
|
1268
|
+
releaseEntitySchema,
|
|
1269
|
+
platformEntitySchema,
|
|
1270
|
+
externalEntitySchema
|
|
1271
|
+
]);
|
|
1272
|
+
var NotificationSummarySchema = z16.strictObject({
|
|
1273
|
+
format: z16.literal("markdown"),
|
|
1274
|
+
value: z16.string()
|
|
1275
|
+
});
|
|
1276
|
+
var NotificationPayloadSchema = z16.strictObject({
|
|
1277
|
+
id: z16.string(),
|
|
1278
|
+
type: z16.literal("text"),
|
|
1279
|
+
summary: NotificationSummarySchema,
|
|
1280
|
+
entity: NotificationEntitySchema.optional(),
|
|
1281
|
+
recipients: z16.array(z16.string()).min(1).max(100),
|
|
1282
|
+
timestamp: z16.string(),
|
|
1283
|
+
project: z16.strictObject({
|
|
1284
|
+
id: z16.string(),
|
|
1285
|
+
url: z16.string()
|
|
1286
|
+
}),
|
|
1287
|
+
initiator: webhookInitiatorSchema
|
|
1288
|
+
});
|
|
1289
|
+
|
|
1290
|
+
// src/notification/notification.created.ts
|
|
1291
|
+
var NotificationCreatedDefinition = definition(
|
|
1292
|
+
{
|
|
1293
|
+
event: "notification.created",
|
|
1294
|
+
name: "Notification Created",
|
|
1295
|
+
description: "Triggers when a notification has been created.",
|
|
1296
|
+
schema: NotificationPayloadSchema
|
|
1297
|
+
},
|
|
1298
|
+
{
|
|
1299
|
+
id: "346bc4cf-3087-42e1-aadb-2722f77f32b1",
|
|
1300
|
+
type: "text",
|
|
1301
|
+
summary: {
|
|
1302
|
+
format: "markdown",
|
|
1303
|
+
value: "The About Us composition is ready for review."
|
|
1304
|
+
},
|
|
1305
|
+
entity: {
|
|
1306
|
+
type: "composition",
|
|
1307
|
+
entityId: "0b9d2118-f2d0-4fe6-9d46-7c661abaf474",
|
|
1308
|
+
editionId: "8b937004-6c50-449a-a7cd-a6a70b25f2da"
|
|
1309
|
+
},
|
|
1310
|
+
recipients: ["auth0|recipient-one", "auth0|recipient-two"],
|
|
1311
|
+
timestamp: "2026-07-20T12:42:06Z",
|
|
1312
|
+
project: {
|
|
1313
|
+
id: "644ede73-d6aa-4159-bf98-14ad7fb4cb66",
|
|
1314
|
+
url: "https://uniform.app/projects/644ede73-d6aa-4159-bf98-14ad7fb4cb66"
|
|
1315
|
+
},
|
|
1316
|
+
initiator: {
|
|
1317
|
+
id: "auth0|initiator",
|
|
1318
|
+
email: "initiator@example.com",
|
|
1319
|
+
name: "A User",
|
|
1320
|
+
is_api_key: false
|
|
1321
|
+
}
|
|
1322
|
+
}
|
|
1323
|
+
);
|
|
1324
|
+
var NotificationCreatedEventName = NotificationCreatedDefinition["event"];
|
|
1190
1325
|
export {
|
|
1191
1326
|
ArchivedReleaseLaunchStartedDefinition,
|
|
1192
1327
|
AssetDeletePayloadSchema,
|
|
@@ -1233,6 +1368,11 @@ export {
|
|
|
1233
1368
|
EntryTriggerPayloadSchema,
|
|
1234
1369
|
ManifestPublishedDefinition,
|
|
1235
1370
|
ManifestPublishedEventName,
|
|
1371
|
+
NotificationCreatedDefinition,
|
|
1372
|
+
NotificationCreatedEventName,
|
|
1373
|
+
NotificationEntitySchema,
|
|
1374
|
+
NotificationPayloadSchema,
|
|
1375
|
+
NotificationSummarySchema,
|
|
1236
1376
|
ProjectMapDeleteDefinition,
|
|
1237
1377
|
ProjectMapDeletedEventName,
|
|
1238
1378
|
ProjectMapNodeDeleteDefinition,
|
|
@@ -1267,5 +1407,7 @@ export {
|
|
|
1267
1407
|
WorkflowTransitionPayloadSchema,
|
|
1268
1408
|
definition,
|
|
1269
1409
|
isDefinition,
|
|
1410
|
+
webhookEventCatalog,
|
|
1411
|
+
webhookEventNames,
|
|
1270
1412
|
webhookInitiatorSchema
|
|
1271
1413
|
};
|
package/package.json
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uniformdev/webhooks",
|
|
3
|
-
"version": "20.72.
|
|
3
|
+
"version": "20.72.3-alpha.14+1e232e59cd",
|
|
4
4
|
"description": "Uniform Webhooks",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"main": "./dist/index.js",
|
|
7
7
|
"module": "./dist/index.esm.js",
|
|
8
8
|
"exports": {
|
|
9
|
+
"source": "./src/index.ts",
|
|
9
10
|
"import": {
|
|
10
11
|
"types": "./dist/index.d.mts",
|
|
11
12
|
"node": "./dist/index.mjs",
|
|
@@ -38,5 +39,5 @@
|
|
|
38
39
|
"publishConfig": {
|
|
39
40
|
"access": "public"
|
|
40
41
|
},
|
|
41
|
-
"gitHead": "
|
|
42
|
+
"gitHead": "1e232e59cd3ded97b85b063986cc95e954b8c937"
|
|
42
43
|
}
|