@reventlessdev/reventless-gwt 1.0.0-alpha.185 → 1.0.0-alpha.187
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/CHANGELOG.md +20 -0
- package/package.json +9 -9
- package/src/Automation_GWT.res +0 -1
- package/src/Automation_GWT.res.mjs +1 -3
- package/src/Behavior_GWT.res +0 -2
- package/src/Behavior_GWT.res.mjs +1 -4
- package/src/Delegate_GWT.res +0 -1
- package/src/Delegate_GWT.res.mjs +1 -7
- package/src/Flow_GWT.res +0 -1
- package/src/Flow_GWT.res.mjs +1 -4
- package/src/InboundTranslation_GWT.res +0 -1
- package/src/InboundTranslation_GWT.res.mjs +1 -3
- package/src/Mapping_GWT.res +0 -1
- package/src/Mapping_GWT.res.mjs +1 -3
- package/src/MultiSourceProjection_GWT.res +0 -1
- package/src/MultiSourceProjection_GWT.res.mjs +1 -3
- package/src/OutboundTranslation_GWT.res +0 -1
- package/src/OutboundTranslation_GWT.res.mjs +1 -3
- package/src/Projection_GWT.res +0 -1
- package/src/Projection_GWT.res.mjs +1 -3
- package/src/Query_GWT.res +4 -6
- package/src/Query_GWT.res.mjs +10 -12
- package/src/SideEffect_GWT.res +0 -1
- package/src/SideEffect_GWT.res.mjs +1 -3
- package/src/StateChange/ExternalAddCategorySlice.res.mjs +9 -9
- package/src/StateChange/WithFixtures.res.mjs +7 -7
- package/src/StateChange/WithManualOpen.res.mjs +7 -7
- package/tests/AutomationGwtTest.res.mjs +13 -13
- package/tests/DelegateGwtTest.res +0 -1
- package/tests/DelegateGwtTest.res.mjs +77 -79
- package/tests/FlowAggregateGwtTest.res +0 -1
- package/tests/FlowAggregateGwtTest.res.mjs +22 -24
- package/tests/FlowCrossPluginGwtTest.res +0 -1
- package/tests/FlowCrossPluginGwtTest.res.mjs +58 -60
- package/tests/FlowGwtTest.res +0 -1
- package/tests/FlowGwtTest.res.mjs +40 -40
- package/tests/InboundTranslationGwtTest.res.mjs +8 -8
- package/tests/MappingGwtTest.res +0 -1
- package/tests/MappingGwtTest.res.mjs +30 -32
- package/tests/OutboundTranslationGwtTest.res.mjs +8 -8
- package/tests/QueryGwtTest.res +0 -1
- package/tests/QueryGwtTest.res.mjs +14 -16
- package/tests/QueryResolverGwtTest.res +0 -1
- package/tests/QueryResolverGwtTest.res.mjs +10 -12
- package/tests/SideEffect/FakeOrderNotification.res.mjs +5 -5
- package/tests/SideEffect/MockEmail.res +1 -1
- package/tests/SideEffect/MockEmail.res.mjs +6 -5
- package/tests/StateChangeSliceGwtTest.res.mjs +15 -15
- package/tests/StateViewSliceGwtTest.res.mjs +14 -14
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
// Generated by ReScript, PLEASE EDIT WITH CARE
|
|
2
2
|
|
|
3
|
-
import * as
|
|
3
|
+
import * as Sury from "sury";
|
|
4
4
|
import * as Outcome$ReventlessGwt from "../src/Outcome.res.mjs";
|
|
5
5
|
import * as Automation_GWT$ReventlessGwt from "../src/Automation_GWT.res.mjs";
|
|
6
6
|
|
|
7
|
-
let consumedEventSchema =
|
|
8
|
-
|
|
7
|
+
let consumedEventSchema = Sury.union([
|
|
8
|
+
Sury.$schema(s => ({
|
|
9
9
|
TAG: "OrderPlaced",
|
|
10
|
-
orderId: s.m(
|
|
11
|
-
shippingAddress: s.m(
|
|
10
|
+
orderId: s.m(Sury.string),
|
|
11
|
+
shippingAddress: s.m(Sury.string)
|
|
12
12
|
})),
|
|
13
|
-
|
|
13
|
+
Sury.$schema(s => ({
|
|
14
14
|
TAG: "ShipmentCreated",
|
|
15
|
-
orderId: s.m(
|
|
15
|
+
orderId: s.m(Sury.string)
|
|
16
16
|
}))
|
|
17
17
|
]);
|
|
18
18
|
|
|
19
|
-
let todoItemSchema =
|
|
20
|
-
orderId: s.m(
|
|
21
|
-
shippingAddress: s.m(
|
|
19
|
+
let todoItemSchema = Sury.$schema(s => ({
|
|
20
|
+
orderId: s.m(Sury.string),
|
|
21
|
+
shippingAddress: s.m(Sury.string)
|
|
22
22
|
}));
|
|
23
23
|
|
|
24
|
-
let commandSchema =
|
|
24
|
+
let commandSchema = Sury.$schema(s => ({
|
|
25
25
|
TAG: "CreateShipment",
|
|
26
|
-
orderId: s.m(
|
|
27
|
-
address: s.m(
|
|
26
|
+
orderId: s.m(Sury.string),
|
|
27
|
+
address: s.m(Sury.string)
|
|
28
28
|
}));
|
|
29
29
|
|
|
30
30
|
function collect(event) {
|
|
@@ -1,28 +1,26 @@
|
|
|
1
1
|
// Generated by ReScript, PLEASE EDIT WITH CARE
|
|
2
2
|
|
|
3
|
-
import * as
|
|
3
|
+
import * as Sury from "sury";
|
|
4
4
|
import * as Id$Reventless from "@reventlessdev/reventless-spec/src/types/Id.res.mjs";
|
|
5
5
|
import * as Delegate_GWT$ReventlessGwt from "../src/Delegate_GWT.res.mjs";
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
let commandSchema = Sury.literal("NoCommand");
|
|
8
8
|
|
|
9
|
-
let
|
|
10
|
-
|
|
11
|
-
let eventSchema = S.union([
|
|
12
|
-
S.schema(s => ({
|
|
9
|
+
let eventSchema = Sury.union([
|
|
10
|
+
Sury.$schema(s => ({
|
|
13
11
|
TAG: "ProductBecameAvailable",
|
|
14
|
-
productId: s.m(
|
|
15
|
-
name: s.m(
|
|
16
|
-
price: s.m(
|
|
12
|
+
productId: s.m(Sury.string),
|
|
13
|
+
name: s.m(Sury.string),
|
|
14
|
+
price: s.m(Sury.float)
|
|
17
15
|
})),
|
|
18
|
-
|
|
16
|
+
Sury.$schema(s => ({
|
|
19
17
|
TAG: "ProductPriceChanged",
|
|
20
|
-
productId: s.m(
|
|
21
|
-
price: s.m(
|
|
18
|
+
productId: s.m(Sury.string),
|
|
19
|
+
price: s.m(Sury.float)
|
|
22
20
|
}))
|
|
23
21
|
]);
|
|
24
22
|
|
|
25
|
-
let directiveSchema =
|
|
23
|
+
let directiveSchema = Sury.literal("NoDirective");
|
|
26
24
|
|
|
27
25
|
function commandAuthorization(param) {
|
|
28
26
|
return "AllowAuthenticated";
|
|
@@ -39,23 +37,23 @@ let ProductsEpSpec = {
|
|
|
39
37
|
|
|
40
38
|
let name = "Product";
|
|
41
39
|
|
|
42
|
-
let commandSchema$1 =
|
|
40
|
+
let commandSchema$1 = Sury.literal("NoCommand");
|
|
43
41
|
|
|
44
|
-
let eventSchema$1 =
|
|
45
|
-
|
|
42
|
+
let eventSchema$1 = Sury.union([
|
|
43
|
+
Sury.$schema(s => ({
|
|
46
44
|
TAG: "ProductAdded",
|
|
47
|
-
productId: s.m(
|
|
48
|
-
name: s.m(
|
|
49
|
-
price: s.m(
|
|
45
|
+
productId: s.m(Sury.string),
|
|
46
|
+
name: s.m(Sury.string),
|
|
47
|
+
price: s.m(Sury.float)
|
|
50
48
|
})),
|
|
51
|
-
|
|
49
|
+
Sury.$schema(s => ({
|
|
52
50
|
TAG: "ProductPriceChanged",
|
|
53
|
-
productId: s.m(
|
|
54
|
-
price: s.m(
|
|
51
|
+
productId: s.m(Sury.string),
|
|
52
|
+
price: s.m(Sury.float)
|
|
55
53
|
}))
|
|
56
54
|
]);
|
|
57
55
|
|
|
58
|
-
let errorSchema =
|
|
56
|
+
let errorSchema = Sury.literal("NoError");
|
|
59
57
|
|
|
60
58
|
let moduleUrl = "";
|
|
61
59
|
|
|
@@ -158,23 +156,23 @@ ProductsEpGwt.describe("Products ExtensionPoint mapping (FromExtensionPoint)", (
|
|
|
158
156
|
}));
|
|
159
157
|
});
|
|
160
158
|
|
|
161
|
-
let commandSchema$2 =
|
|
159
|
+
let commandSchema$2 = Sury.literal("NoCommand");
|
|
162
160
|
|
|
163
|
-
let eventSchema$2 =
|
|
164
|
-
|
|
161
|
+
let eventSchema$2 = Sury.union([
|
|
162
|
+
Sury.$schema(s => ({
|
|
165
163
|
TAG: "ItemOrdered",
|
|
166
|
-
productId: s.m(
|
|
167
|
-
orderId: s.m(
|
|
168
|
-
customerId: s.m(
|
|
164
|
+
productId: s.m(Sury.string),
|
|
165
|
+
orderId: s.m(Sury.string),
|
|
166
|
+
customerId: s.m(Sury.string)
|
|
169
167
|
})),
|
|
170
|
-
|
|
168
|
+
Sury.$schema(s => ({
|
|
171
169
|
TAG: "ItemOrderCancelled",
|
|
172
|
-
productId: s.m(
|
|
173
|
-
orderId: s.m(
|
|
170
|
+
productId: s.m(Sury.string),
|
|
171
|
+
orderId: s.m(Sury.string)
|
|
174
172
|
}))
|
|
175
173
|
]);
|
|
176
174
|
|
|
177
|
-
let directiveSchema$1 =
|
|
175
|
+
let directiveSchema$1 = Sury.literal("NoDirective");
|
|
178
176
|
|
|
179
177
|
function commandAuthorization$2(param) {
|
|
180
178
|
return "AllowAuthenticated";
|
|
@@ -191,23 +189,23 @@ let OrdersEpSpec = {
|
|
|
191
189
|
|
|
192
190
|
let name$1 = "Order";
|
|
193
191
|
|
|
194
|
-
let commandSchema$3 =
|
|
192
|
+
let commandSchema$3 = Sury.literal("NoCommand");
|
|
195
193
|
|
|
196
|
-
let eventSchema$3 =
|
|
197
|
-
|
|
194
|
+
let eventSchema$3 = Sury.union([
|
|
195
|
+
Sury.$schema(s => ({
|
|
198
196
|
TAG: "OrderPlaced",
|
|
199
|
-
orderId: s.m(
|
|
200
|
-
customerId: s.m(
|
|
201
|
-
productIds: s.m(
|
|
197
|
+
orderId: s.m(Sury.string),
|
|
198
|
+
customerId: s.m(Sury.string),
|
|
199
|
+
productIds: s.m(Sury.array(Sury.string))
|
|
202
200
|
})),
|
|
203
|
-
|
|
201
|
+
Sury.$schema(s => ({
|
|
204
202
|
TAG: "OrderCancelled",
|
|
205
|
-
orderId: s.m(
|
|
206
|
-
productIds: s.m(
|
|
203
|
+
orderId: s.m(Sury.string),
|
|
204
|
+
productIds: s.m(Sury.array(Sury.string))
|
|
207
205
|
}))
|
|
208
206
|
]);
|
|
209
207
|
|
|
210
|
-
let errorSchema$1 =
|
|
208
|
+
let errorSchema$1 = Sury.literal("NoError");
|
|
211
209
|
|
|
212
210
|
let moduleUrl$2 = "";
|
|
213
211
|
|
|
@@ -327,23 +325,23 @@ OrdersEpGwt.describe("Orders ExtensionPoint mapping — fan-out", () => {
|
|
|
327
325
|
|
|
328
326
|
let name$2 = "SyncCatalogProduct";
|
|
329
327
|
|
|
330
|
-
let commandSchema$4 =
|
|
331
|
-
|
|
328
|
+
let commandSchema$4 = Sury.union([
|
|
329
|
+
Sury.$schema(s => ({
|
|
332
330
|
TAG: "SyncNewProduct",
|
|
333
|
-
productId: s.m(
|
|
334
|
-
name: s.m(
|
|
335
|
-
price: s.m(
|
|
331
|
+
productId: s.m(Sury.string),
|
|
332
|
+
name: s.m(Sury.string),
|
|
333
|
+
price: s.m(Sury.float)
|
|
336
334
|
})),
|
|
337
|
-
|
|
335
|
+
Sury.$schema(s => ({
|
|
338
336
|
TAG: "ChangeSyncedPrice",
|
|
339
|
-
productId: s.m(
|
|
340
|
-
price: s.m(
|
|
337
|
+
productId: s.m(Sury.string),
|
|
338
|
+
price: s.m(Sury.float)
|
|
341
339
|
}))
|
|
342
340
|
]);
|
|
343
341
|
|
|
344
|
-
let eventSchema$4 =
|
|
342
|
+
let eventSchema$4 = Sury.literal("NoEvent");
|
|
345
343
|
|
|
346
|
-
let errorSchema$2 =
|
|
344
|
+
let errorSchema$2 = Sury.literal("NoError");
|
|
347
345
|
|
|
348
346
|
let moduleUrl$4 = "";
|
|
349
347
|
|
|
@@ -443,15 +441,15 @@ ProductsExtGwt.describe("Products Extension delegate (FromExtension)", () => {
|
|
|
443
441
|
}));
|
|
444
442
|
});
|
|
445
443
|
|
|
446
|
-
let commandSchema$5 =
|
|
444
|
+
let commandSchema$5 = Sury.$schema(s => ({
|
|
447
445
|
TAG: "Restock",
|
|
448
|
-
sku: s.m(
|
|
449
|
-
qty: s.m(
|
|
446
|
+
sku: s.m(Sury.string),
|
|
447
|
+
qty: s.m(Sury.int)
|
|
450
448
|
}));
|
|
451
449
|
|
|
452
|
-
let eventSchema$5 =
|
|
450
|
+
let eventSchema$5 = Sury.literal("NoEvent");
|
|
453
451
|
|
|
454
|
-
let directiveSchema$2 =
|
|
452
|
+
let directiveSchema$2 = Sury.literal("NoDirective");
|
|
455
453
|
|
|
456
454
|
function commandAuthorization$5(param) {
|
|
457
455
|
return "AllowAuthenticated";
|
|
@@ -468,15 +466,15 @@ let InventoryEpSpec = {
|
|
|
468
466
|
|
|
469
467
|
let name$3 = "Stock";
|
|
470
468
|
|
|
471
|
-
let commandSchema$6 =
|
|
469
|
+
let commandSchema$6 = Sury.$schema(s => ({
|
|
472
470
|
TAG: "Restock",
|
|
473
|
-
sku: s.m(
|
|
474
|
-
qty: s.m(
|
|
471
|
+
sku: s.m(Sury.string),
|
|
472
|
+
qty: s.m(Sury.int)
|
|
475
473
|
}));
|
|
476
474
|
|
|
477
|
-
let eventSchema$6 =
|
|
475
|
+
let eventSchema$6 = Sury.literal("NoEvent");
|
|
478
476
|
|
|
479
|
-
let errorSchema$3 =
|
|
477
|
+
let errorSchema$3 = Sury.literal("NoError");
|
|
480
478
|
|
|
481
479
|
let moduleUrl$6 = "";
|
|
482
480
|
|
|
@@ -548,14 +546,14 @@ InventoryEpGwt.describe("Inventory ExtensionPoint mapping — incoming command",
|
|
|
548
546
|
qty: 5
|
|
549
547
|
})));
|
|
550
548
|
|
|
551
|
-
let commandSchema$7 =
|
|
549
|
+
let commandSchema$7 = Sury.$schema(s => ({
|
|
552
550
|
TAG: "AckProduct",
|
|
553
|
-
productId: s.m(
|
|
551
|
+
productId: s.m(Sury.string)
|
|
554
552
|
}));
|
|
555
553
|
|
|
556
|
-
let eventSchema$7 =
|
|
554
|
+
let eventSchema$7 = Sury.literal("NoEvent");
|
|
557
555
|
|
|
558
|
-
let directiveSchema$3 =
|
|
556
|
+
let directiveSchema$3 = Sury.literal("NoDirective");
|
|
559
557
|
|
|
560
558
|
function commandAuthorization$7(param) {
|
|
561
559
|
return "AllowAuthenticated";
|
|
@@ -572,14 +570,14 @@ let FeedbackEpSpec = {
|
|
|
572
570
|
|
|
573
571
|
let name$4 = "SyncedProduct";
|
|
574
572
|
|
|
575
|
-
let commandSchema$8 =
|
|
573
|
+
let commandSchema$8 = Sury.literal("NoCommand");
|
|
576
574
|
|
|
577
|
-
let eventSchema$8 =
|
|
575
|
+
let eventSchema$8 = Sury.$schema(s => ({
|
|
578
576
|
TAG: "ProductSynced",
|
|
579
|
-
productId: s.m(
|
|
577
|
+
productId: s.m(Sury.string)
|
|
580
578
|
}));
|
|
581
579
|
|
|
582
|
-
let errorSchema$4 =
|
|
580
|
+
let errorSchema$4 = Sury.literal("NoError");
|
|
583
581
|
|
|
584
582
|
let moduleUrl$8 = "";
|
|
585
583
|
|
|
@@ -654,19 +652,19 @@ FeedbackExtGwt.describe("Feedback Extension delegate — outgoing command", () =
|
|
|
654
652
|
productId: "p1"
|
|
655
653
|
})));
|
|
656
654
|
|
|
657
|
-
let commandSchema$9 =
|
|
655
|
+
let commandSchema$9 = Sury.literal("NoCommand");
|
|
658
656
|
|
|
659
|
-
let eventSchema$9 =
|
|
657
|
+
let eventSchema$9 = Sury.$schema(s => ({
|
|
660
658
|
TAG: "Pinged",
|
|
661
|
-
productId: s.m(
|
|
659
|
+
productId: s.m(Sury.string)
|
|
662
660
|
}));
|
|
663
661
|
|
|
664
|
-
let directiveSchema$4 =
|
|
665
|
-
|
|
662
|
+
let directiveSchema$4 = Sury.union([
|
|
663
|
+
Sury.$schema(s => ({
|
|
666
664
|
TAG: "NotifyOps",
|
|
667
|
-
channel: s.m(
|
|
665
|
+
channel: s.m(Sury.string)
|
|
668
666
|
})),
|
|
669
|
-
|
|
667
|
+
Sury.literal("FlushCache")
|
|
670
668
|
]);
|
|
671
669
|
|
|
672
670
|
function commandAuthorization$9(param) {
|
|
@@ -888,4 +886,4 @@ export {
|
|
|
888
886
|
NotifyExtMapping,
|
|
889
887
|
NotifyExtGwt,
|
|
890
888
|
}
|
|
891
|
-
/*
|
|
889
|
+
/* commandSchema Not a pure module */
|
|
@@ -1,23 +1,21 @@
|
|
|
1
1
|
// Generated by ReScript, PLEASE EDIT WITH CARE
|
|
2
2
|
|
|
3
|
-
import * as
|
|
3
|
+
import * as Sury from "sury";
|
|
4
4
|
import * as Flow_GWT$ReventlessGwt from "../src/Flow_GWT.res.mjs";
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
let commandSchema = S.schema(s => ({
|
|
6
|
+
let commandSchema = Sury.$schema(s => ({
|
|
9
7
|
TAG: "SyncNewProduct",
|
|
10
|
-
productId: s.m(
|
|
11
|
-
name: s.m(
|
|
8
|
+
productId: s.m(Sury.string),
|
|
9
|
+
name: s.m(Sury.string)
|
|
12
10
|
}));
|
|
13
11
|
|
|
14
|
-
let eventSchema =
|
|
12
|
+
let eventSchema = Sury.$schema(s => ({
|
|
15
13
|
TAG: "CatalogProductSynced",
|
|
16
|
-
productId: s.m(
|
|
17
|
-
name: s.m(
|
|
14
|
+
productId: s.m(Sury.string),
|
|
15
|
+
name: s.m(Sury.string)
|
|
18
16
|
}));
|
|
19
17
|
|
|
20
|
-
let errorSchema =
|
|
18
|
+
let errorSchema = Sury.literal("AlreadySynced");
|
|
21
19
|
|
|
22
20
|
function commandAuthorization(param) {
|
|
23
21
|
return "AllowAuthenticated";
|
|
@@ -64,27 +62,27 @@ let CatalogProductBehavior = {
|
|
|
64
62
|
moduleUrl: moduleUrl
|
|
65
63
|
};
|
|
66
64
|
|
|
67
|
-
let commandSchema$1 =
|
|
68
|
-
|
|
65
|
+
let commandSchema$1 = Sury.union([
|
|
66
|
+
Sury.$schema(s => ({
|
|
69
67
|
TAG: "Place",
|
|
70
|
-
customerId: s.m(
|
|
71
|
-
productIds: s.m(
|
|
68
|
+
customerId: s.m(Sury.string),
|
|
69
|
+
productIds: s.m(Sury.array(Sury.string))
|
|
72
70
|
})),
|
|
73
|
-
|
|
71
|
+
Sury.literal("Ship")
|
|
74
72
|
]);
|
|
75
73
|
|
|
76
|
-
let eventSchema$1 =
|
|
77
|
-
|
|
74
|
+
let eventSchema$1 = Sury.union([
|
|
75
|
+
Sury.$schema(s => ({
|
|
78
76
|
TAG: "Placed",
|
|
79
|
-
customerId: s.m(
|
|
80
|
-
productIds: s.m(
|
|
77
|
+
customerId: s.m(Sury.string),
|
|
78
|
+
productIds: s.m(Sury.array(Sury.string))
|
|
81
79
|
})),
|
|
82
|
-
|
|
80
|
+
Sury.literal("Shipped")
|
|
83
81
|
]);
|
|
84
82
|
|
|
85
|
-
let errorSchema$1 =
|
|
86
|
-
|
|
87
|
-
|
|
83
|
+
let errorSchema$1 = Sury.union([
|
|
84
|
+
Sury.literal("AlreadyPlaced"),
|
|
85
|
+
Sury.literal("NotPlaced")
|
|
88
86
|
]);
|
|
89
87
|
|
|
90
88
|
function commandAuthorization$1(param) {
|
|
@@ -270,4 +268,4 @@ export {
|
|
|
270
268
|
Sync,
|
|
271
269
|
Place,
|
|
272
270
|
}
|
|
273
|
-
/*
|
|
271
|
+
/* commandSchema Not a pure module */
|
|
@@ -1,31 +1,29 @@
|
|
|
1
1
|
// Generated by ReScript, PLEASE EDIT WITH CARE
|
|
2
2
|
|
|
3
|
-
import * as
|
|
3
|
+
import * as Sury from "sury";
|
|
4
4
|
import * as Id$Reventless from "@reventlessdev/reventless-spec/src/types/Id.res.mjs";
|
|
5
5
|
import * as DcbTag$Reventless from "@reventlessdev/reventless-spec/src/components/DcbTag.res.mjs";
|
|
6
6
|
import * as Flow_GWT$ReventlessGwt from "../src/Flow_GWT.res.mjs";
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
let consumedEventSchema = S.schema(s => ({
|
|
8
|
+
let consumedEventSchema = Sury.$schema(s => ({
|
|
11
9
|
TAG: "ProductAdded",
|
|
12
10
|
productId: s.m(DcbTag$Reventless.string)
|
|
13
11
|
}));
|
|
14
12
|
|
|
15
|
-
let commandSchema =
|
|
13
|
+
let commandSchema = Sury.$schema(s => ({
|
|
16
14
|
TAG: "AddProduct",
|
|
17
15
|
productId: s.m(DcbTag$Reventless.string),
|
|
18
|
-
name: s.m(
|
|
19
|
-
price: s.m(
|
|
16
|
+
name: s.m(Sury.string),
|
|
17
|
+
price: s.m(Sury.float)
|
|
20
18
|
}));
|
|
21
19
|
|
|
22
|
-
let errorSchema =
|
|
20
|
+
let errorSchema = Sury.literal("AlreadyAdded");
|
|
23
21
|
|
|
24
|
-
let eventSchema =
|
|
22
|
+
let eventSchema = Sury.$schema(s => ({
|
|
25
23
|
TAG: "ProductAdded",
|
|
26
24
|
productId: s.m(DcbTag$Reventless.string),
|
|
27
|
-
name: s.m(
|
|
28
|
-
price: s.m(
|
|
25
|
+
name: s.m(Sury.string),
|
|
26
|
+
price: s.m(Sury.float)
|
|
29
27
|
}));
|
|
30
28
|
|
|
31
29
|
function commandAuthorization(param) {
|
|
@@ -78,16 +76,16 @@ let AddProductBehavior = {
|
|
|
78
76
|
decide: decide
|
|
79
77
|
};
|
|
80
78
|
|
|
81
|
-
let commandSchema$1 =
|
|
79
|
+
let commandSchema$1 = Sury.literal("NoCommand");
|
|
82
80
|
|
|
83
|
-
let eventSchema$1 =
|
|
81
|
+
let eventSchema$1 = Sury.$schema(s => ({
|
|
84
82
|
TAG: "ProductBecameAvailable",
|
|
85
|
-
productId: s.m(
|
|
86
|
-
name: s.m(
|
|
87
|
-
price: s.m(
|
|
83
|
+
productId: s.m(Sury.string),
|
|
84
|
+
name: s.m(Sury.string),
|
|
85
|
+
price: s.m(Sury.float)
|
|
88
86
|
}));
|
|
89
87
|
|
|
90
|
-
let directiveSchema =
|
|
88
|
+
let directiveSchema = Sury.literal("NoDirective");
|
|
91
89
|
|
|
92
90
|
function commandAuthorization$1(param) {
|
|
93
91
|
return "AllowAuthenticated";
|
|
@@ -104,16 +102,16 @@ let ProductsEpSpec = {
|
|
|
104
102
|
|
|
105
103
|
let name = "Product";
|
|
106
104
|
|
|
107
|
-
let commandSchema$2 =
|
|
105
|
+
let commandSchema$2 = Sury.literal("NoCommand");
|
|
108
106
|
|
|
109
|
-
let eventSchema$2 =
|
|
107
|
+
let eventSchema$2 = Sury.$schema(s => ({
|
|
110
108
|
TAG: "ProductAdded",
|
|
111
|
-
productId: s.m(
|
|
112
|
-
name: s.m(
|
|
113
|
-
price: s.m(
|
|
109
|
+
productId: s.m(Sury.string),
|
|
110
|
+
name: s.m(Sury.string),
|
|
111
|
+
price: s.m(Sury.float)
|
|
114
112
|
}));
|
|
115
113
|
|
|
116
|
-
let errorSchema$1 =
|
|
114
|
+
let errorSchema$1 = Sury.literal("NoError");
|
|
117
115
|
|
|
118
116
|
let moduleUrl = "";
|
|
119
117
|
|
|
@@ -159,15 +157,15 @@ let ProductsEpMapping = {
|
|
|
159
157
|
mapOutgoingEvent: mapOutgoingEvent
|
|
160
158
|
};
|
|
161
159
|
|
|
162
|
-
let commandSchema$3 =
|
|
160
|
+
let commandSchema$3 = Sury.literal("NoCommand");
|
|
163
161
|
|
|
164
|
-
let eventSchema$3 =
|
|
162
|
+
let eventSchema$3 = Sury.$schema(s => ({
|
|
165
163
|
TAG: "ItemOrdered",
|
|
166
|
-
productId: s.m(
|
|
167
|
-
orderId: s.m(
|
|
164
|
+
productId: s.m(Sury.string),
|
|
165
|
+
orderId: s.m(Sury.string)
|
|
168
166
|
}));
|
|
169
167
|
|
|
170
|
-
let directiveSchema$1 =
|
|
168
|
+
let directiveSchema$1 = Sury.literal("NoDirective");
|
|
171
169
|
|
|
172
170
|
function commandAuthorization$3(param) {
|
|
173
171
|
return "AllowAuthenticated";
|
|
@@ -184,15 +182,15 @@ let OrdersEpSpec = {
|
|
|
184
182
|
|
|
185
183
|
let name$1 = "Order";
|
|
186
184
|
|
|
187
|
-
let commandSchema$4 =
|
|
185
|
+
let commandSchema$4 = Sury.literal("NoCommand");
|
|
188
186
|
|
|
189
|
-
let eventSchema$4 =
|
|
187
|
+
let eventSchema$4 = Sury.$schema(s => ({
|
|
190
188
|
TAG: "OrderPlaced",
|
|
191
|
-
orderId: s.m(
|
|
192
|
-
productIds: s.m(
|
|
189
|
+
orderId: s.m(Sury.string),
|
|
190
|
+
productIds: s.m(Sury.array(Sury.string))
|
|
193
191
|
}));
|
|
194
192
|
|
|
195
|
-
let errorSchema$2 =
|
|
193
|
+
let errorSchema$2 = Sury.literal("NoError");
|
|
196
194
|
|
|
197
195
|
let moduleUrl$2 = "";
|
|
198
196
|
|
|
@@ -239,24 +237,24 @@ let OrdersEpMapping = {
|
|
|
239
237
|
|
|
240
238
|
let name$2 = "RecordDemand";
|
|
241
239
|
|
|
242
|
-
let consumedEventSchema$1 =
|
|
240
|
+
let consumedEventSchema$1 = Sury.$schema(s => ({
|
|
243
241
|
TAG: "DemandRecorded",
|
|
244
242
|
productId: s.m(DcbTag$Reventless.string),
|
|
245
|
-
orderId: s.m(
|
|
243
|
+
orderId: s.m(Sury.string)
|
|
246
244
|
}));
|
|
247
245
|
|
|
248
|
-
let commandSchema$5 =
|
|
246
|
+
let commandSchema$5 = Sury.$schema(s => ({
|
|
249
247
|
TAG: "RecordDemand",
|
|
250
248
|
productId: s.m(DcbTag$Reventless.string),
|
|
251
|
-
orderId: s.m(
|
|
249
|
+
orderId: s.m(Sury.string)
|
|
252
250
|
}));
|
|
253
251
|
|
|
254
|
-
let errorSchema$3 =
|
|
252
|
+
let errorSchema$3 = Sury.literal("NoError");
|
|
255
253
|
|
|
256
|
-
let eventSchema$5 =
|
|
254
|
+
let eventSchema$5 = Sury.$schema(s => ({
|
|
257
255
|
TAG: "DemandRecorded",
|
|
258
256
|
productId: s.m(DcbTag$Reventless.string),
|
|
259
|
-
orderId: s.m(
|
|
257
|
+
orderId: s.m(Sury.string)
|
|
260
258
|
}));
|
|
261
259
|
|
|
262
260
|
let moduleUrl$4 = "";
|
|
@@ -331,25 +329,25 @@ let OrdersExtMapping = {
|
|
|
331
329
|
|
|
332
330
|
let name$3 = "SyncProduct";
|
|
333
331
|
|
|
334
|
-
let consumedEventSchema$2 =
|
|
332
|
+
let consumedEventSchema$2 = Sury.$schema(s => ({
|
|
335
333
|
TAG: "ProductSynced",
|
|
336
334
|
productId: s.m(DcbTag$Reventless.string)
|
|
337
335
|
}));
|
|
338
336
|
|
|
339
|
-
let commandSchema$6 =
|
|
337
|
+
let commandSchema$6 = Sury.$schema(s => ({
|
|
340
338
|
TAG: "SyncProduct",
|
|
341
339
|
productId: s.m(DcbTag$Reventless.string),
|
|
342
|
-
name: s.m(
|
|
343
|
-
price: s.m(
|
|
340
|
+
name: s.m(Sury.string),
|
|
341
|
+
price: s.m(Sury.float)
|
|
344
342
|
}));
|
|
345
343
|
|
|
346
|
-
let errorSchema$4 =
|
|
344
|
+
let errorSchema$4 = Sury.literal("NoError");
|
|
347
345
|
|
|
348
|
-
let eventSchema$6 =
|
|
346
|
+
let eventSchema$6 = Sury.$schema(s => ({
|
|
349
347
|
TAG: "ProductSynced",
|
|
350
348
|
productId: s.m(DcbTag$Reventless.string),
|
|
351
|
-
name: s.m(
|
|
352
|
-
price: s.m(
|
|
349
|
+
name: s.m(Sury.string),
|
|
350
|
+
price: s.m(Sury.float)
|
|
353
351
|
}));
|
|
354
352
|
|
|
355
353
|
let moduleUrl$6 = "";
|
|
@@ -424,35 +422,35 @@ let ProductsExtMapping = {
|
|
|
424
422
|
mapOutgoingEvent: undefined
|
|
425
423
|
};
|
|
426
424
|
|
|
427
|
-
let consumedEventSchema$3 =
|
|
428
|
-
|
|
425
|
+
let consumedEventSchema$3 = Sury.union([
|
|
426
|
+
Sury.$schema(s => ({
|
|
429
427
|
TAG: "OrderPlaced",
|
|
430
428
|
orderId: s.m(DcbTag$Reventless.string)
|
|
431
429
|
})),
|
|
432
|
-
|
|
430
|
+
Sury.$schema(s => ({
|
|
433
431
|
TAG: "ProductSynced",
|
|
434
432
|
productId: s.m(DcbTag$Reventless.string)
|
|
435
433
|
}))
|
|
436
434
|
]);
|
|
437
435
|
|
|
438
|
-
let commandSchema$7 =
|
|
436
|
+
let commandSchema$7 = Sury.$schema(s => ({
|
|
439
437
|
TAG: "PlaceOrder",
|
|
440
438
|
orderId: s.m(DcbTag$Reventless.string),
|
|
441
|
-
productIds: s.m(
|
|
439
|
+
productIds: s.m(Sury.array(DcbTag$Reventless.stringForKey("productId")))
|
|
442
440
|
}));
|
|
443
441
|
|
|
444
|
-
let errorSchema$5 =
|
|
445
|
-
|
|
446
|
-
|
|
442
|
+
let errorSchema$5 = Sury.union([
|
|
443
|
+
Sury.literal("OrderAlreadyPlaced"),
|
|
444
|
+
Sury.$schema(s => ({
|
|
447
445
|
TAG: "ProductsNotAvailable",
|
|
448
|
-
missing: s.m(
|
|
446
|
+
missing: s.m(Sury.array(Sury.string))
|
|
449
447
|
}))
|
|
450
448
|
]);
|
|
451
449
|
|
|
452
|
-
let eventSchema$7 =
|
|
450
|
+
let eventSchema$7 = Sury.$schema(s => ({
|
|
453
451
|
TAG: "OrderPlaced",
|
|
454
452
|
orderId: s.m(DcbTag$Reventless.string),
|
|
455
|
-
productIds: s.m(
|
|
453
|
+
productIds: s.m(Sury.array(DcbTag$Reventless.stringForKey("productId")))
|
|
456
454
|
}));
|
|
457
455
|
|
|
458
456
|
function commandAuthorization$7(param) {
|
|
@@ -795,4 +793,4 @@ export {
|
|
|
795
793
|
OrdersExt,
|
|
796
794
|
Demand,
|
|
797
795
|
}
|
|
798
|
-
/*
|
|
796
|
+
/* consumedEventSchema Not a pure module */
|