@reventlessdev/online-shop-dcb-catalog 1.0.0-alpha.280 → 1.0.0-alpha.282

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.
Files changed (92) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/lib/bs/.compiler.log +2 -2
  3. package/lib/bs/compiler-info.json +1 -1
  4. package/lib/bs/src/Plugin-CatalogPlugin.cmi +0 -0
  5. package/lib/bs/src/Plugin-CatalogPlugin.cmt +0 -0
  6. package/lib/bs/src/Plugin.res.mjs +2 -1
  7. package/lib/bs/src/Product/InboundTranslation/ImportProduct-CatalogPlugin.cmi +0 -0
  8. package/lib/bs/src/Product/InboundTranslation/ImportProduct-CatalogPlugin.cmt +0 -0
  9. package/lib/bs/src/Product/InboundTranslation/ImportProduct.ast +0 -0
  10. package/lib/bs/src/Product/InboundTranslation/ImportProduct.res +17 -0
  11. package/lib/bs/src/Product/InboundTranslation/ImportProduct.res.mjs +19 -1
  12. package/lib/bs/src/Product/InboundTranslation/ImportProduct_Translation-CatalogPlugin.cmi +0 -0
  13. package/lib/bs/src/Product/InboundTranslation/ImportProduct_Translation-CatalogPlugin.cmt +0 -0
  14. package/lib/bs/src/Task/ImportProducts-CatalogPlugin.cmi +0 -0
  15. package/lib/bs/src/Task/ImportProducts-CatalogPlugin.cmt +0 -0
  16. package/lib/bs/tests/Category/StateChange/AddCategory_GWT-CatalogPlugin.cmi +0 -0
  17. package/lib/bs/tests/Category/StateChange/AddCategory_GWT-CatalogPlugin.cmt +0 -0
  18. package/lib/bs/tests/Category/StateChange/ArchiveCategory_GWT-CatalogPlugin.cmi +0 -0
  19. package/lib/bs/tests/Category/StateChange/ArchiveCategory_GWT-CatalogPlugin.cmt +0 -0
  20. package/lib/bs/tests/Category/StateChange/RenameCategory_GWT-CatalogPlugin.cmi +0 -0
  21. package/lib/bs/tests/Category/StateChange/RenameCategory_GWT-CatalogPlugin.cmt +0 -0
  22. package/lib/bs/tests/Category/StateView/Categories_GWT-CatalogPlugin.cmi +0 -0
  23. package/lib/bs/tests/Category/StateView/Categories_GWT-CatalogPlugin.cmt +0 -0
  24. package/lib/bs/tests/CategoryActivity/ReadModel/CategoryActivity_GWT-CatalogPlugin.cmi +0 -0
  25. package/lib/bs/tests/CategoryActivity/ReadModel/CategoryActivity_GWT-CatalogPlugin.cmt +0 -0
  26. package/lib/bs/tests/Extension/Orders_Extension_GWT-CatalogPlugin.cmi +0 -0
  27. package/lib/bs/tests/Extension/Orders_Extension_GWT-CatalogPlugin.cmt +0 -0
  28. package/lib/bs/tests/ExtensionPoint/Products_ExtensionPointMapping_GWT-CatalogPlugin.cmi +0 -0
  29. package/lib/bs/tests/ExtensionPoint/Products_ExtensionPointMapping_GWT-CatalogPlugin.cmt +0 -0
  30. package/lib/bs/tests/Product/InboundTranslation/ImportProduct_GWT-CatalogPlugin.cmi +0 -0
  31. package/lib/bs/tests/Product/InboundTranslation/ImportProduct_GWT-CatalogPlugin.cmt +0 -0
  32. package/lib/bs/tests/Product/InboundTranslation/ImportProduct_GWT.res.mjs +2 -1
  33. package/lib/bs/tests/Product/StateChange/AddProduct_GWT-CatalogPlugin.cmi +0 -0
  34. package/lib/bs/tests/Product/StateChange/AddProduct_GWT-CatalogPlugin.cmt +0 -0
  35. package/lib/bs/tests/Product/StateChange/ChangeProductDescription_GWT-CatalogPlugin.cmi +0 -0
  36. package/lib/bs/tests/Product/StateChange/ChangeProductDescription_GWT-CatalogPlugin.cmt +0 -0
  37. package/lib/bs/tests/Product/StateChange/ChangeProductName_GWT-CatalogPlugin.cmi +0 -0
  38. package/lib/bs/tests/Product/StateChange/ChangeProductName_GWT-CatalogPlugin.cmt +0 -0
  39. package/lib/bs/tests/Product/StateChange/ChangeProductPrice_GWT-CatalogPlugin.cmi +0 -0
  40. package/lib/bs/tests/Product/StateChange/ChangeProductPrice_GWT-CatalogPlugin.cmt +0 -0
  41. package/lib/bs/tests/Product/StateView/Products_GWT-CatalogPlugin.cmi +0 -0
  42. package/lib/bs/tests/Product/StateView/Products_GWT-CatalogPlugin.cmt +0 -0
  43. package/lib/bs/tests/ProductDemand/StateChange/RecordProductDemand_GWT-CatalogPlugin.cmi +0 -0
  44. package/lib/bs/tests/ProductDemand/StateChange/RecordProductDemand_GWT-CatalogPlugin.cmt +0 -0
  45. package/lib/bs/tests/ProductDemand/StateView/ProductDemand_GWT-CatalogPlugin.cmi +0 -0
  46. package/lib/bs/tests/ProductDemand/StateView/ProductDemand_GWT-CatalogPlugin.cmt +0 -0
  47. package/lib/ocaml/.compiler.log +2 -2
  48. package/lib/ocaml/AddCategory_GWT-CatalogPlugin.cmi +0 -0
  49. package/lib/ocaml/AddCategory_GWT-CatalogPlugin.cmt +0 -0
  50. package/lib/ocaml/AddProduct_GWT-CatalogPlugin.cmi +0 -0
  51. package/lib/ocaml/AddProduct_GWT-CatalogPlugin.cmt +0 -0
  52. package/lib/ocaml/ArchiveCategory_GWT-CatalogPlugin.cmi +0 -0
  53. package/lib/ocaml/ArchiveCategory_GWT-CatalogPlugin.cmt +0 -0
  54. package/lib/ocaml/Categories_GWT-CatalogPlugin.cmi +0 -0
  55. package/lib/ocaml/Categories_GWT-CatalogPlugin.cmt +0 -0
  56. package/lib/ocaml/CategoryActivity_GWT-CatalogPlugin.cmi +0 -0
  57. package/lib/ocaml/CategoryActivity_GWT-CatalogPlugin.cmt +0 -0
  58. package/lib/ocaml/ChangeProductDescription_GWT-CatalogPlugin.cmi +0 -0
  59. package/lib/ocaml/ChangeProductDescription_GWT-CatalogPlugin.cmt +0 -0
  60. package/lib/ocaml/ChangeProductName_GWT-CatalogPlugin.cmi +0 -0
  61. package/lib/ocaml/ChangeProductName_GWT-CatalogPlugin.cmt +0 -0
  62. package/lib/ocaml/ChangeProductPrice_GWT-CatalogPlugin.cmi +0 -0
  63. package/lib/ocaml/ChangeProductPrice_GWT-CatalogPlugin.cmt +0 -0
  64. package/lib/ocaml/ImportProduct-CatalogPlugin.cmi +0 -0
  65. package/lib/ocaml/ImportProduct-CatalogPlugin.cmt +0 -0
  66. package/lib/ocaml/ImportProduct.ast +0 -0
  67. package/lib/ocaml/ImportProduct.res +17 -0
  68. package/lib/ocaml/ImportProduct_GWT-CatalogPlugin.cmi +0 -0
  69. package/lib/ocaml/ImportProduct_GWT-CatalogPlugin.cmt +0 -0
  70. package/lib/ocaml/ImportProduct_Translation-CatalogPlugin.cmi +0 -0
  71. package/lib/ocaml/ImportProduct_Translation-CatalogPlugin.cmt +0 -0
  72. package/lib/ocaml/ImportProducts-CatalogPlugin.cmi +0 -0
  73. package/lib/ocaml/ImportProducts-CatalogPlugin.cmt +0 -0
  74. package/lib/ocaml/Orders_Extension_GWT-CatalogPlugin.cmi +0 -0
  75. package/lib/ocaml/Orders_Extension_GWT-CatalogPlugin.cmt +0 -0
  76. package/lib/ocaml/Plugin-CatalogPlugin.cmi +0 -0
  77. package/lib/ocaml/Plugin-CatalogPlugin.cmt +0 -0
  78. package/lib/ocaml/ProductDemand_GWT-CatalogPlugin.cmi +0 -0
  79. package/lib/ocaml/ProductDemand_GWT-CatalogPlugin.cmt +0 -0
  80. package/lib/ocaml/Products_ExtensionPointMapping_GWT-CatalogPlugin.cmi +0 -0
  81. package/lib/ocaml/Products_ExtensionPointMapping_GWT-CatalogPlugin.cmt +0 -0
  82. package/lib/ocaml/Products_GWT-CatalogPlugin.cmi +0 -0
  83. package/lib/ocaml/Products_GWT-CatalogPlugin.cmt +0 -0
  84. package/lib/ocaml/RecordProductDemand_GWT-CatalogPlugin.cmi +0 -0
  85. package/lib/ocaml/RecordProductDemand_GWT-CatalogPlugin.cmt +0 -0
  86. package/lib/ocaml/RenameCategory_GWT-CatalogPlugin.cmi +0 -0
  87. package/lib/ocaml/RenameCategory_GWT-CatalogPlugin.cmt +0 -0
  88. package/package.json +9 -9
  89. package/src/Plugin.res.mjs +2 -1
  90. package/src/Product/InboundTranslation/ImportProduct.res +17 -0
  91. package/src/Product/InboundTranslation/ImportProduct.res.mjs +19 -1
  92. package/tests/Product/InboundTranslation/ImportProduct_GWT.res.mjs +2 -1
package/CHANGELOG.md CHANGED
@@ -3,6 +3,26 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # 1.0.0-alpha.282 (2026-10-16)
7
+
8
+ * feat!(inbound): a translation slice can declare a signed webhook URL ([0ad6994](https://github.com/ReventlessDev/reventless-core/commit/0ad69949fcc91c2756c60ca8cb120dd468841d8b))
9
+
10
+ ### BREAKING CHANGES
11
+
12
+ * InboundTranslationSlice.Spec requires `endpoint`. Specs under
13
+ @@reventless.spec get it from the PPX (republish reventless-ppx with this
14
+ release); hand-written specs add `let endpoint = None`.
15
+
16
+
17
+
18
+ # 1.0.0-alpha.281 (2026-10-16)
19
+
20
+ **Note:** Version bump only for package @reventlessdev/online-shop-dcb-catalog
21
+
22
+
23
+
24
+
25
+
6
26
  # 1.0.0-alpha.280 (2026-10-16)
7
27
 
8
28
  **Note:** Version bump only for package @reventlessdev/online-shop-dcb-catalog
@@ -1,2 +1,2 @@
1
- #Start(1792143692768)
2
- #Done(1792143695947)
1
+ #Start(1792162610379)
2
+ #Done(1792162613537)
@@ -4,5 +4,5 @@
4
4
  "bsc_hash": "1006241435e8d5052329c523202a7fe6359a37e1e1688c023d37d6a7ebb5fb6d",
5
5
  "rescript_config_hash": "ca6bf04caf4f6b27dbf31b935f934d99c6fe59248cc8b122f9cc48ff2675eb4a",
6
6
  "runtime_path": "/home/runner/work/reventless-core/reventless-core/node_modules/@rescript/runtime",
7
- "generated_at": "1792143695961"
7
+ "generated_at": "1792162613542"
8
8
  }
Binary file
Binary file
@@ -282,7 +282,8 @@ function Make(Platform) {
282
282
  commandSchema: ImportProduct$CatalogPlugin.commandSchema,
283
283
  targetName: ImportProduct$CatalogPlugin.targetName,
284
284
  externalSystem: ImportProduct$CatalogPlugin.externalSystem,
285
- authorizationOf: ImportProduct$CatalogPlugin.authorizationOf
285
+ authorizationOf: ImportProduct$CatalogPlugin.authorizationOf,
286
+ endpoint: ImportProduct$CatalogPlugin.endpoint
286
287
  })({
287
288
  translate: ImportProduct_Translation$CatalogPlugin.translate,
288
289
  moduleUrl: ImportProduct_Translation$CatalogPlugin.moduleUrl
@@ -1,7 +1,10 @@
1
1
  // ImportProduct InboundTranslationSlice.
2
2
  // Receives external supplier JSON, validates and translates to an AddProduct command.
3
+ // The supplier posts to a signed webhook; the mutation stays as an operator's
4
+ // replay door, which is why the command needs Admin rather than any signed-in user.
3
5
 
4
6
  @@reventless.spec
7
+ @@reventless.authorize(AllowRoles([Admin]))
5
8
 
6
9
  @schema
7
10
  type externalInput = {
@@ -20,3 +23,17 @@ let targetName = "AddProduct"
20
23
  // Foreign system this anti-corruption slice receives product data from — drawn as an
21
24
  // external box outside the Catalog plugin in the Event Graph.
22
25
  let externalSystem = Some("SupplierFeed")
26
+
27
+ // The supplier signs each post with the secret `supplierFeed`
28
+ // (`pulumi config set --secret webhook:supplierFeed …` on AWS,
29
+ // `REVENTLESS_WEBHOOK_SECRET_SUPPLIERFEED` locally); a signed post acts as Admin.
30
+ let endpoint = Some({
31
+ Reventless.InboundTranslationSlice.path: "supplier-feed",
32
+ auth: SignedBody({
33
+ header: "X-Signature-256",
34
+ prefix: "sha256=",
35
+ timestampHeader: "X-Signature-Timestamp",
36
+ secret: "supplierFeed",
37
+ }),
38
+ role: Roles.Admin,
39
+ })
@@ -21,7 +21,10 @@ let commandSchema = Sury.$schema(s => ({
21
21
  }));
22
22
 
23
23
  function authorizationOf(param) {
24
- return "AllowAuthenticated";
24
+ return {
25
+ TAG: "AllowRoles",
26
+ _0: ["Admin"]
27
+ };
25
28
  }
26
29
 
27
30
  let traits = [];
@@ -34,6 +37,20 @@ let targetName = "AddProduct";
34
37
 
35
38
  let externalSystem = "SupplierFeed";
36
39
 
40
+ let endpoint = {
41
+ path: "supplier-feed",
42
+ auth: {
43
+ TAG: "SignedBody",
44
+ _0: {
45
+ header: "X-Signature-256",
46
+ prefix: "sha256=",
47
+ timestampHeader: "X-Signature-Timestamp",
48
+ secret: "supplierFeed"
49
+ }
50
+ },
51
+ role: "Admin"
52
+ };
53
+
37
54
  let moduleUrl = "@reventlessdev/online-shop-dcb-catalog/src/Product/InboundTranslation/ImportProduct.res.mjs";
38
55
 
39
56
  export {
@@ -43,6 +60,7 @@ export {
43
60
  commandSchema,
44
61
  targetName,
45
62
  externalSystem,
63
+ endpoint,
46
64
  moduleUrl,
47
65
  authorizationOf,
48
66
  traits,
@@ -13,7 +13,8 @@ let include = InboundTranslation_GWT$ReventlessGwt.FromSlice({
13
13
  commandSchema: ImportProduct$CatalogPlugin.commandSchema,
14
14
  targetName: ImportProduct$CatalogPlugin.targetName,
15
15
  externalSystem: ImportProduct$CatalogPlugin.externalSystem,
16
- authorizationOf: ImportProduct$CatalogPlugin.authorizationOf
16
+ authorizationOf: ImportProduct$CatalogPlugin.authorizationOf,
17
+ endpoint: ImportProduct$CatalogPlugin.endpoint
17
18
  })({
18
19
  translate: ImportProduct_Translation$CatalogPlugin.translate,
19
20
  moduleUrl: ImportProduct_Translation$CatalogPlugin.moduleUrl
@@ -1,2 +1,2 @@
1
- #Start(1792143692768)
2
- #Done(1792143695947)
1
+ #Start(1792162610379)
2
+ #Done(1792162613537)
Binary file
@@ -1,7 +1,10 @@
1
1
  // ImportProduct InboundTranslationSlice.
2
2
  // Receives external supplier JSON, validates and translates to an AddProduct command.
3
+ // The supplier posts to a signed webhook; the mutation stays as an operator's
4
+ // replay door, which is why the command needs Admin rather than any signed-in user.
3
5
 
4
6
  @@reventless.spec
7
+ @@reventless.authorize(AllowRoles([Admin]))
5
8
 
6
9
  @schema
7
10
  type externalInput = {
@@ -20,3 +23,17 @@ let targetName = "AddProduct"
20
23
  // Foreign system this anti-corruption slice receives product data from — drawn as an
21
24
  // external box outside the Catalog plugin in the Event Graph.
22
25
  let externalSystem = Some("SupplierFeed")
26
+
27
+ // The supplier signs each post with the secret `supplierFeed`
28
+ // (`pulumi config set --secret webhook:supplierFeed …` on AWS,
29
+ // `REVENTLESS_WEBHOOK_SECRET_SUPPLIERFEED` locally); a signed post acts as Admin.
30
+ let endpoint = Some({
31
+ Reventless.InboundTranslationSlice.path: "supplier-feed",
32
+ auth: SignedBody({
33
+ header: "X-Signature-256",
34
+ prefix: "sha256=",
35
+ timestampHeader: "X-Signature-Timestamp",
36
+ secret: "supplierFeed",
37
+ }),
38
+ role: Roles.Admin,
39
+ })
Binary file
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reventlessdev/online-shop-dcb-catalog",
3
- "version": "1.0.0-alpha.280",
3
+ "version": "1.0.0-alpha.282",
4
4
  "description": "Online Shop example — Catalog bounded context (Product & Category) using the DCB pattern",
5
5
  "license": "Apache-2.0",
6
6
  "jest": {
@@ -21,18 +21,18 @@
21
21
  },
22
22
  "dependencies": {
23
23
  "sury": "11.0.0",
24
- "@reventlessdev/online-shop-dcb-catalog-spec": "1.0.0-alpha.165",
25
- "@reventlessdev/online-shop-dcb-ordering-spec": "1.0.0-alpha.165",
26
- "@reventlessdev/reventless-gwt": "1.0.0-alpha.244",
27
- "@reventlessdev/rescript-pulumi-pulumi": "2.3.0-alpha.23",
28
- "@reventlessdev/reventless-infra": "3.0.0-alpha.193",
29
- "@reventlessdev/reventless-spec": "3.0.0-alpha.165",
30
- "@reventlessdev/reventless-local": "3.0.0-alpha.287"
24
+ "@reventlessdev/online-shop-dcb-catalog-spec": "1.0.0-alpha.167",
25
+ "@reventlessdev/online-shop-dcb-ordering-spec": "1.0.0-alpha.167",
26
+ "@reventlessdev/rescript-pulumi-pulumi": "3.0.0-alpha.0",
27
+ "@reventlessdev/reventless-infra": "3.0.0-alpha.195",
28
+ "@reventlessdev/reventless-gwt": "1.0.0-alpha.246",
29
+ "@reventlessdev/reventless-local": "3.0.0-alpha.289",
30
+ "@reventlessdev/reventless-spec": "3.0.0-alpha.167"
31
31
  },
32
32
  "devDependencies": {
33
33
  "rescript": "12.3.1",
34
34
  "sury-ppx": "11.0.0",
35
- "@reventlessdev/reventless-ppx": "1.0.0-alpha.101"
35
+ "@reventlessdev/reventless-ppx": "1.0.0-alpha.102"
36
36
  },
37
37
  "peerDependencies": {
38
38
  "rescript": "^12.3.1"
@@ -282,7 +282,8 @@ function Make(Platform) {
282
282
  commandSchema: ImportProduct$CatalogPlugin.commandSchema,
283
283
  targetName: ImportProduct$CatalogPlugin.targetName,
284
284
  externalSystem: ImportProduct$CatalogPlugin.externalSystem,
285
- authorizationOf: ImportProduct$CatalogPlugin.authorizationOf
285
+ authorizationOf: ImportProduct$CatalogPlugin.authorizationOf,
286
+ endpoint: ImportProduct$CatalogPlugin.endpoint
286
287
  })({
287
288
  translate: ImportProduct_Translation$CatalogPlugin.translate,
288
289
  moduleUrl: ImportProduct_Translation$CatalogPlugin.moduleUrl
@@ -1,7 +1,10 @@
1
1
  // ImportProduct InboundTranslationSlice.
2
2
  // Receives external supplier JSON, validates and translates to an AddProduct command.
3
+ // The supplier posts to a signed webhook; the mutation stays as an operator's
4
+ // replay door, which is why the command needs Admin rather than any signed-in user.
3
5
 
4
6
  @@reventless.spec
7
+ @@reventless.authorize(AllowRoles([Admin]))
5
8
 
6
9
  @schema
7
10
  type externalInput = {
@@ -20,3 +23,17 @@ let targetName = "AddProduct"
20
23
  // Foreign system this anti-corruption slice receives product data from — drawn as an
21
24
  // external box outside the Catalog plugin in the Event Graph.
22
25
  let externalSystem = Some("SupplierFeed")
26
+
27
+ // The supplier signs each post with the secret `supplierFeed`
28
+ // (`pulumi config set --secret webhook:supplierFeed …` on AWS,
29
+ // `REVENTLESS_WEBHOOK_SECRET_SUPPLIERFEED` locally); a signed post acts as Admin.
30
+ let endpoint = Some({
31
+ Reventless.InboundTranslationSlice.path: "supplier-feed",
32
+ auth: SignedBody({
33
+ header: "X-Signature-256",
34
+ prefix: "sha256=",
35
+ timestampHeader: "X-Signature-Timestamp",
36
+ secret: "supplierFeed",
37
+ }),
38
+ role: Roles.Admin,
39
+ })
@@ -21,7 +21,10 @@ let commandSchema = Sury.$schema(s => ({
21
21
  }));
22
22
 
23
23
  function authorizationOf(param) {
24
- return "AllowAuthenticated";
24
+ return {
25
+ TAG: "AllowRoles",
26
+ _0: ["Admin"]
27
+ };
25
28
  }
26
29
 
27
30
  let traits = [];
@@ -34,6 +37,20 @@ let targetName = "AddProduct";
34
37
 
35
38
  let externalSystem = "SupplierFeed";
36
39
 
40
+ let endpoint = {
41
+ path: "supplier-feed",
42
+ auth: {
43
+ TAG: "SignedBody",
44
+ _0: {
45
+ header: "X-Signature-256",
46
+ prefix: "sha256=",
47
+ timestampHeader: "X-Signature-Timestamp",
48
+ secret: "supplierFeed"
49
+ }
50
+ },
51
+ role: "Admin"
52
+ };
53
+
37
54
  let moduleUrl = "@reventlessdev/online-shop-dcb-catalog/src/Product/InboundTranslation/ImportProduct.res.mjs";
38
55
 
39
56
  export {
@@ -43,6 +60,7 @@ export {
43
60
  commandSchema,
44
61
  targetName,
45
62
  externalSystem,
63
+ endpoint,
46
64
  moduleUrl,
47
65
  authorizationOf,
48
66
  traits,
@@ -13,7 +13,8 @@ let include = InboundTranslation_GWT$ReventlessGwt.FromSlice({
13
13
  commandSchema: ImportProduct$CatalogPlugin.commandSchema,
14
14
  targetName: ImportProduct$CatalogPlugin.targetName,
15
15
  externalSystem: ImportProduct$CatalogPlugin.externalSystem,
16
- authorizationOf: ImportProduct$CatalogPlugin.authorizationOf
16
+ authorizationOf: ImportProduct$CatalogPlugin.authorizationOf,
17
+ endpoint: ImportProduct$CatalogPlugin.endpoint
17
18
  })({
18
19
  translate: ImportProduct_Translation$CatalogPlugin.translate,
19
20
  moduleUrl: ImportProduct_Translation$CatalogPlugin.moduleUrl