@uniformdev/webhooks 20.72.3-alpha.2 → 20.72.3-alpha.25

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.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({
@@ -686,17 +694,110 @@ var ManifestPublishedDefinition = definition(
686
694
  );
687
695
  var ManifestPublishedEventName = ManifestPublishedDefinition["event"];
688
696
 
689
- // src/project-map/projectMap.delete.ts
697
+ // src/notification/common.ts
690
698
  import * as z6 from "zod";
699
+ var editionEntitySchema = z6.strictObject({
700
+ type: z6.enum(["entry", "composition"]),
701
+ entityId: z6.string(),
702
+ releaseId: z6.string().optional(),
703
+ editionId: z6.string().optional()
704
+ });
705
+ var releaseEntitySchema = z6.strictObject({
706
+ type: z6.enum(["entryPattern", "componentPattern", "compositionPattern"]),
707
+ entityId: z6.string(),
708
+ releaseId: z6.string().optional()
709
+ });
710
+ var platformEntitySchema = z6.strictObject({
711
+ type: z6.enum([
712
+ "component",
713
+ "contentType",
714
+ "blockType",
715
+ "asset",
716
+ "audience",
717
+ "intent",
718
+ "enrichment",
719
+ "signal",
720
+ "quirk",
721
+ "test",
722
+ "projectMapNode"
723
+ ]),
724
+ entityId: z6.string()
725
+ });
726
+ var externalEntitySchema = z6.strictObject({
727
+ type: z6.literal("external"),
728
+ url: z6.string()
729
+ });
730
+ var NotificationEntitySchema = z6.discriminatedUnion("type", [
731
+ editionEntitySchema,
732
+ releaseEntitySchema,
733
+ platformEntitySchema,
734
+ externalEntitySchema
735
+ ]);
736
+ var NotificationSummarySchema = z6.strictObject({
737
+ format: z6.literal("markdown"),
738
+ value: z6.string()
739
+ });
740
+ var NotificationPayloadSchema = z6.strictObject({
741
+ id: z6.string(),
742
+ type: z6.literal("text"),
743
+ summary: NotificationSummarySchema,
744
+ entity: NotificationEntitySchema.optional(),
745
+ recipients: z6.array(z6.string()).min(1).max(100),
746
+ timestamp: z6.string(),
747
+ project: z6.strictObject({
748
+ id: z6.string(),
749
+ url: z6.string()
750
+ }),
751
+ initiator: webhookInitiatorSchema
752
+ });
753
+
754
+ // src/notification/notification.created.ts
755
+ var NotificationCreatedDefinition = definition(
756
+ {
757
+ event: "notification.created",
758
+ name: "Notification Created",
759
+ description: "Triggers when a notification has been created.",
760
+ schema: NotificationPayloadSchema
761
+ },
762
+ {
763
+ id: "346bc4cf-3087-42e1-aadb-2722f77f32b1",
764
+ type: "text",
765
+ summary: {
766
+ format: "markdown",
767
+ value: "The About Us composition is ready for review."
768
+ },
769
+ entity: {
770
+ type: "composition",
771
+ entityId: "0b9d2118-f2d0-4fe6-9d46-7c661abaf474",
772
+ editionId: "8b937004-6c50-449a-a7cd-a6a70b25f2da"
773
+ },
774
+ recipients: ["auth0|recipient-one", "auth0|recipient-two"],
775
+ timestamp: "2026-07-20T12:42:06Z",
776
+ project: {
777
+ id: "644ede73-d6aa-4159-bf98-14ad7fb4cb66",
778
+ url: "https://uniform.app/projects/644ede73-d6aa-4159-bf98-14ad7fb4cb66"
779
+ },
780
+ initiator: {
781
+ id: "auth0|initiator",
782
+ email: "initiator@example.com",
783
+ name: "A User",
784
+ is_api_key: false
785
+ }
786
+ }
787
+ );
788
+ var NotificationCreatedEventName = NotificationCreatedDefinition["event"];
789
+
790
+ // src/project-map/projectMap.delete.ts
791
+ import * as z7 from "zod";
691
792
  var ProjectMapDeleteDefinition = definition(
692
793
  {
693
794
  event: "projectmap.delete",
694
795
  name: "Project Map Deleted",
695
796
  description: "Triggers when a project map is deleted.",
696
- schema: z6.object({
697
- id: z6.string(),
698
- base_url: z6.string().optional(),
699
- project_id: z6.string()
797
+ schema: z7.object({
798
+ id: z7.string(),
799
+ base_url: z7.string().optional(),
800
+ project_id: z7.string()
700
801
  })
701
802
  },
702
803
  {
@@ -708,25 +809,25 @@ var ProjectMapDeleteDefinition = definition(
708
809
  var ProjectMapDeletedEventName = ProjectMapDeleteDefinition["event"];
709
810
 
710
811
  // src/project-map/projectMap.node.delete.ts
711
- import * as z7 from "zod";
812
+ import * as z8 from "zod";
712
813
  var ProjectMapNodeDeleteDefinition = definition(
713
814
  {
714
815
  event: "projectmap.node.delete",
715
816
  name: "Project Map Node Deleted",
716
817
  description: "Triggers when a project map node is deleted.",
717
- schema: z7.object({
718
- project_id: z7.string(),
719
- project_map_id: z7.string(),
720
- name: z7.string(),
721
- id: z7.string(),
722
- path: z7.string(),
723
- composition_id: z7.string().optional(),
724
- locales: z7.record(
725
- z7.string(),
726
- z7.object({
727
- name: z7.string(),
728
- inherited: z7.boolean(),
729
- path: z7.string()
818
+ schema: z8.object({
819
+ project_id: z8.string(),
820
+ project_map_id: z8.string(),
821
+ name: z8.string(),
822
+ id: z8.string(),
823
+ path: z8.string(),
824
+ composition_id: z8.string().optional(),
825
+ locales: z8.record(
826
+ z8.string(),
827
+ z8.object({
828
+ name: z8.string(),
829
+ inherited: z8.boolean(),
830
+ path: z8.string()
730
831
  })
731
832
  ).optional(),
732
833
  initiator: webhookInitiatorSchema
@@ -757,25 +858,25 @@ var ProjectMapNodeDeleteDefinition = definition(
757
858
  var ProjectMapNodeDeletedEventName = ProjectMapNodeDeleteDefinition["event"];
758
859
 
759
860
  // src/project-map/projectMap.node.insert.ts
760
- import * as z8 from "zod";
861
+ import * as z9 from "zod";
761
862
  var ProjectMapNodeInsertDefinition = definition(
762
863
  {
763
864
  event: "projectmap.node.insert",
764
865
  name: "Project Map Node Inserted",
765
866
  description: "Triggers when a project map node is inserted.",
766
- schema: z8.object({
767
- id: z8.string(),
768
- name: z8.string(),
769
- project_map_id: z8.string(),
770
- project_id: z8.string(),
771
- path: z8.string(),
772
- composition_id: z8.string().optional(),
773
- locales: z8.record(
774
- z8.string(),
775
- z8.object({
776
- name: z8.string(),
777
- inherited: z8.boolean(),
778
- path: z8.string()
867
+ schema: z9.object({
868
+ id: z9.string(),
869
+ name: z9.string(),
870
+ project_map_id: z9.string(),
871
+ project_id: z9.string(),
872
+ path: z9.string(),
873
+ composition_id: z9.string().optional(),
874
+ locales: z9.record(
875
+ z9.string(),
876
+ z9.object({
877
+ name: z9.string(),
878
+ inherited: z9.boolean(),
879
+ path: z9.string()
779
880
  })
780
881
  ).optional(),
781
882
  initiator: webhookInitiatorSchema
@@ -806,27 +907,27 @@ var ProjectMapNodeInsertDefinition = definition(
806
907
  var ProjectMapNodeInsertedEventName = ProjectMapNodeInsertDefinition["event"];
807
908
 
808
909
  // src/project-map/projectMap.node.update.ts
809
- import * as z9 from "zod";
910
+ import * as z10 from "zod";
810
911
  var ProjectMapNodeUpdateDefinition = definition(
811
912
  {
812
913
  event: "projectmap.node.update",
813
914
  name: "Project Map Node Updated",
814
915
  description: "Triggers when a project map node is updated.",
815
- schema: z9.object({
816
- id: z9.string(),
817
- name: z9.string(),
818
- project_map_id: z9.string(),
819
- project_id: z9.string(),
820
- path: z9.string(),
821
- composition_id: z9.string().optional(),
822
- previous_path: z9.string(),
823
- locales: z9.record(
824
- z9.string(),
825
- z9.object({
826
- name: z9.string(),
827
- inherited: z9.boolean(),
828
- path: z9.string(),
829
- previous_path: z9.string()
916
+ schema: z10.object({
917
+ id: z10.string(),
918
+ name: z10.string(),
919
+ project_map_id: z10.string(),
920
+ project_id: z10.string(),
921
+ path: z10.string(),
922
+ composition_id: z10.string().optional(),
923
+ previous_path: z10.string(),
924
+ locales: z10.record(
925
+ z10.string(),
926
+ z10.object({
927
+ name: z10.string(),
928
+ inherited: z10.boolean(),
929
+ path: z10.string(),
930
+ previous_path: z10.string()
830
931
  })
831
932
  ).optional(),
832
933
  initiator: webhookInitiatorSchema
@@ -859,16 +960,16 @@ var ProjectMapNodeUpdateDefinition = definition(
859
960
  var ProjectMapNodeUpdatedEventName = ProjectMapNodeUpdateDefinition["event"];
860
961
 
861
962
  // src/project-map/projectMap.update.ts
862
- import * as z10 from "zod";
963
+ import * as z11 from "zod";
863
964
  var ProjectMapUpdateDefinition = definition(
864
965
  {
865
966
  event: "projectmap.update",
866
967
  name: "Project map Updated",
867
968
  description: "Triggers when a project map is updated or created.",
868
- schema: z10.object({
869
- id: z10.string(),
870
- base_url: z10.string().optional(),
871
- project_id: z10.string(),
969
+ schema: z11.object({
970
+ id: z11.string(),
971
+ base_url: z11.string().optional(),
972
+ project_id: z11.string(),
872
973
  initiator: webhookInitiatorSchema
873
974
  })
874
975
  },
@@ -887,18 +988,18 @@ var ProjectMapUpdateDefinition = definition(
887
988
  var ProjectMapUpdatedEventName = ProjectMapUpdateDefinition["event"];
888
989
 
889
990
  // src/redirect/redirect.delete.ts
890
- import * as z11 from "zod";
991
+ import * as z12 from "zod";
891
992
  var RedirectDeleteDefinition = definition(
892
993
  {
893
994
  event: "redirect.delete",
894
995
  name: "Redirect Deleted",
895
996
  description: "Triggers when a redirect is deleted.",
896
- schema: z11.object({
897
- project_id: z11.string(),
898
- id: z11.string(),
899
- source_url: z11.string(),
900
- target_url: z11.string(),
901
- target_status_code: z11.number(),
997
+ schema: z12.object({
998
+ project_id: z12.string(),
999
+ id: z12.string(),
1000
+ source_url: z12.string(),
1001
+ target_url: z12.string(),
1002
+ target_status_code: z12.number(),
902
1003
  initiator: webhookInitiatorSchema
903
1004
  })
904
1005
  },
@@ -919,18 +1020,18 @@ var RedirectDeleteDefinition = definition(
919
1020
  var RedirectDeletedEventName = RedirectDeleteDefinition["event"];
920
1021
 
921
1022
  // src/redirect/redirect.insert.ts
922
- import * as z12 from "zod";
1023
+ import * as z13 from "zod";
923
1024
  var RedirectInsertDefinition = definition(
924
1025
  {
925
1026
  event: "redirect.insert",
926
1027
  name: "Redirect Inserted",
927
1028
  description: "Triggers when a redirect is inserted.",
928
- schema: z12.object({
929
- project_id: z12.string(),
930
- id: z12.string(),
931
- source_url: z12.string(),
932
- target_url: z12.string(),
933
- target_status_code: z12.number(),
1029
+ schema: z13.object({
1030
+ project_id: z13.string(),
1031
+ id: z13.string(),
1032
+ source_url: z13.string(),
1033
+ target_url: z13.string(),
1034
+ target_status_code: z13.number(),
934
1035
  initiator: webhookInitiatorSchema
935
1036
  })
936
1037
  },
@@ -951,18 +1052,18 @@ var RedirectInsertDefinition = definition(
951
1052
  var RedirectInsertedEventName = RedirectInsertDefinition["event"];
952
1053
 
953
1054
  // src/redirect/redirect.update.ts
954
- import * as z13 from "zod";
1055
+ import * as z14 from "zod";
955
1056
  var RedirectUpdateDefinition = definition(
956
1057
  {
957
1058
  event: "redirect.update",
958
1059
  name: "Redirect Updated",
959
1060
  description: "Triggers when a redirect is updated.",
960
- schema: z13.object({
961
- project_id: z13.string(),
962
- id: z13.string(),
963
- source_url: z13.string(),
964
- target_url: z13.string(),
965
- target_status_code: z13.number(),
1061
+ schema: z14.object({
1062
+ project_id: z14.string(),
1063
+ id: z14.string(),
1064
+ source_url: z14.string(),
1065
+ target_url: z14.string(),
1066
+ target_status_code: z14.number(),
966
1067
  initiator: webhookInitiatorSchema
967
1068
  })
968
1069
  },
@@ -983,19 +1084,19 @@ var RedirectUpdateDefinition = definition(
983
1084
  var RedirectUpdatedEventName = RedirectUpdateDefinition["event"];
984
1085
 
985
1086
  // src/release/common.ts
986
- import * as z14 from "zod";
987
- var ReleasePayloadSchema = z14.object({
988
- id: z14.string(),
989
- state: z14.enum(["open", "locked", "queued", "launching", "launched", "deleting"]),
990
- name: z14.string(),
991
- project: z14.object({
992
- id: z14.string(),
993
- url: z14.string()
1087
+ import * as z15 from "zod";
1088
+ var ReleasePayloadSchema = z15.object({
1089
+ id: z15.string(),
1090
+ state: z15.enum(["open", "locked", "queued", "launching", "launched", "deleting"]),
1091
+ name: z15.string(),
1092
+ project: z15.object({
1093
+ id: z15.string(),
1094
+ url: z15.string()
994
1095
  }),
995
- autoLaunchSchedule: z14.number().optional(),
996
- autoLaunchScheduleTimeZone: z14.string().optional(),
997
- edit_url: z14.string(),
998
- api_url: z14.string()
1096
+ autoLaunchSchedule: z15.number().optional(),
1097
+ autoLaunchScheduleTimeZone: z15.string().optional(),
1098
+ edit_url: z15.string(),
1099
+ api_url: z15.string()
999
1100
  });
1000
1101
 
1001
1102
  // src/release/release.changed.ts
@@ -1117,30 +1218,30 @@ var ArchivedReleaseLaunchStartedDefinition = definition(
1117
1218
  );
1118
1219
 
1119
1220
  // src/workflow/common.ts
1120
- import * as z15 from "zod";
1121
- var WorkflowReferenceSchema = z15.strictObject({
1122
- workflowId: z15.string(),
1123
- workflowName: z15.string(),
1124
- stageId: z15.string(),
1125
- stageName: z15.string()
1221
+ import * as z16 from "zod";
1222
+ var WorkflowReferenceSchema = z16.strictObject({
1223
+ workflowId: z16.string(),
1224
+ workflowName: z16.string(),
1225
+ stageId: z16.string(),
1226
+ stageName: z16.string()
1126
1227
  });
1127
- var WorkflowEntitySchema = z15.strictObject({
1128
- type: z15.enum(["entry", "component"]),
1129
- name: z15.string(),
1130
- id: z15.string(),
1131
- editionId: z15.string().optional(),
1132
- releaseId: z15.string().optional(),
1133
- url: z15.string()
1228
+ var WorkflowEntitySchema = z16.strictObject({
1229
+ type: z16.enum(["entry", "component"]),
1230
+ name: z16.string(),
1231
+ id: z16.string(),
1232
+ editionId: z16.string().optional(),
1233
+ releaseId: z16.string().optional(),
1234
+ url: z16.string()
1134
1235
  });
1135
- var WorkflowTransitionPayloadSchema = z15.strictObject({
1236
+ var WorkflowTransitionPayloadSchema = z16.strictObject({
1136
1237
  entity: WorkflowEntitySchema,
1137
1238
  newStage: WorkflowReferenceSchema,
1138
1239
  previousStage: WorkflowReferenceSchema.optional(),
1139
1240
  initiator: webhookInitiatorSchema,
1140
- timestamp: z15.string(),
1141
- project: z15.object({
1142
- id: z15.string(),
1143
- url: z15.string()
1241
+ timestamp: z16.string(),
1242
+ project: z16.object({
1243
+ id: z16.string(),
1244
+ url: z16.string()
1144
1245
  })
1145
1246
  });
1146
1247
 
@@ -1187,6 +1288,42 @@ var WorkflowTransitionDefinition = definition(
1187
1288
  }
1188
1289
  );
1189
1290
  var WorkflowTransitionEventName = WorkflowTransitionDefinition["event"];
1291
+
1292
+ // src/catalog.ts
1293
+ var webhookEventCatalog = {
1294
+ "asset.deleted": AssetDeletedDefinition,
1295
+ "asset.published": AssetPublishedDefinition,
1296
+ "composition.changed": CompositionChangedDefinition,
1297
+ "composition.deleted": CompositionDeletedDefinition,
1298
+ "composition.published": CompositionPublishedDefinition,
1299
+ "composition.release.changed": CompositionReleaseChangedDefinition,
1300
+ "composition.release.deleted": CompositionReleaseDeletedDefinition,
1301
+ "composition.release.published": CompositionReleasePublishedDefinition,
1302
+ "composition.release.restored": CompositionReleaseRestoredDefinition,
1303
+ "entry.changed": EntryChangedDefinition,
1304
+ "entry.deleted": EntryDeletedDefinition,
1305
+ "entry.published": EntryPublishedDefinition,
1306
+ "entry.release.changed": EntryReleaseChangedDefinition,
1307
+ "entry.release.deleted": EntryReleaseDeletedDefinition,
1308
+ "entry.release.published": EntryReleasePublishedDefinition,
1309
+ "entry.release.restored": EntryReleaseRestoredDefinition,
1310
+ "manifest.published": ManifestPublishedDefinition,
1311
+ "notification.created": NotificationCreatedDefinition,
1312
+ "projectmap.delete": ProjectMapDeleteDefinition,
1313
+ "projectmap.node.delete": ProjectMapNodeDeleteDefinition,
1314
+ "projectmap.node.insert": ProjectMapNodeInsertDefinition,
1315
+ "projectmap.node.update": ProjectMapNodeUpdateDefinition,
1316
+ "projectmap.update": ProjectMapUpdateDefinition,
1317
+ "redirect.delete": RedirectDeleteDefinition,
1318
+ "redirect.insert": RedirectInsertDefinition,
1319
+ "redirect.update": RedirectUpdateDefinition,
1320
+ "release.changed": ReleaseChangedDefinition,
1321
+ "release.deleted": ReleaseDeletedDefinition,
1322
+ "release.launch_started": ReleaseLaunchStartedDefinition,
1323
+ "release.launched": ReleaseLaunchedDefinition,
1324
+ "workflow.transition": WorkflowTransitionDefinition
1325
+ };
1326
+ var webhookEventNames = Object.keys(webhookEventCatalog);
1190
1327
  export {
1191
1328
  ArchivedReleaseLaunchStartedDefinition,
1192
1329
  AssetDeletePayloadSchema,
@@ -1233,6 +1370,11 @@ export {
1233
1370
  EntryTriggerPayloadSchema,
1234
1371
  ManifestPublishedDefinition,
1235
1372
  ManifestPublishedEventName,
1373
+ NotificationCreatedDefinition,
1374
+ NotificationCreatedEventName,
1375
+ NotificationEntitySchema,
1376
+ NotificationPayloadSchema,
1377
+ NotificationSummarySchema,
1236
1378
  ProjectMapDeleteDefinition,
1237
1379
  ProjectMapDeletedEventName,
1238
1380
  ProjectMapNodeDeleteDefinition,
@@ -1267,5 +1409,7 @@ export {
1267
1409
  WorkflowTransitionPayloadSchema,
1268
1410
  definition,
1269
1411
  isDefinition,
1412
+ webhookEventCatalog,
1413
+ webhookEventNames,
1270
1414
  webhookInitiatorSchema
1271
1415
  };
package/package.json CHANGED
@@ -1,11 +1,12 @@
1
1
  {
2
2
  "name": "@uniformdev/webhooks",
3
- "version": "20.72.3-alpha.2+36e92d30ab",
3
+ "version": "20.72.3-alpha.25+cd10fe6e1e",
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": "36e92d30ab1b97fc68cf16fc22c6f7865ac8ba97"
42
+ "gitHead": "cd10fe6e1e8877ed1ec45290d74ac160d597e84e"
42
43
  }