@reventlessdev/reventless-gwt 1.0.0-alpha.239 → 1.0.0-alpha.240
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 +11 -0
- package/package.json +6 -6
- package/src/Behavior_GWT.res +6 -6
- package/src/Behavior_GWT.res.mjs +5 -5
- package/src/StateChange/ExternalAddCategorySlice.res +1 -1
- package/src/StateChange/ExternalAddCategorySlice.res.mjs +2 -2
- package/src/StateChange/WithFixtures.res +1 -1
- package/src/StateChange/WithFixtures.res.mjs +2 -2
- package/src/StateChange/WithManualOpen.res +1 -1
- package/src/StateChange/WithManualOpen.res.mjs +2 -2
- package/tests/AutomationFromSliceGwtTest.res.mjs +2 -2
- package/tests/AutomationGwtTest.res.mjs +2 -2
- package/tests/DelegateGwtTest.res +5 -5
- package/tests/DelegateGwtTest.res.mjs +27 -27
- package/tests/FlowAggregateGwtTest.res.mjs +4 -4
- package/tests/FlowCrossPluginGwtTest.res +4 -4
- package/tests/FlowCrossPluginGwtTest.res.mjs +22 -22
- package/tests/FlowGwtTest.res.mjs +6 -6
- package/tests/InboundFromSliceGwtTest.res +1 -1
- package/tests/InboundFromSliceGwtTest.res.mjs +2 -2
- package/tests/InboundTranslationGwtTest.res.mjs +2 -2
- package/tests/MappingGwtTest.res.mjs +12 -12
- package/tests/StateChangeSliceAuthorizeGwtTest.res.mjs +20 -16
- package/tests/StateChangeSliceGwtTest.res.mjs +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,17 @@
|
|
|
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.240 (2026-10-10)
|
|
7
|
+
|
|
8
|
+
* feat!: a command's rule is looked up by its name, without a cast ([5f02c40](https://github.com/ReventlessDev/reventless-core/commit/5f02c4081d077bf4a6951d8c9b2b16553a8ca87b))
|
|
9
|
+
|
|
10
|
+
### BREAKING CHANGES
|
|
11
|
+
|
|
12
|
+
* a spec that writes `commandAuthorization` by hand writes
|
|
13
|
+
`authorizationOf = (name: string) => …` instead; the PPX refuses the old name.
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
# 1.0.0-alpha.239 (2026-10-10)
|
|
7
18
|
|
|
8
19
|
### Bug Fixes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reventlessdev/reventless-gwt",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.240",
|
|
4
4
|
"description": "Given-When-Then DSLs and test harness for Reventless slice testing",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"jest": {
|
|
@@ -14,17 +14,17 @@
|
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
16
|
"sury": "11.0.0",
|
|
17
|
-
"@reventlessdev/rescript-effect": "0.1.0-alpha.34",
|
|
18
|
-
"@reventlessdev/reventless-core": "3.0.0-alpha.292",
|
|
19
17
|
"@reventlessdev/rescript-jest": "1.0.0-alpha.11",
|
|
20
18
|
"@reventlessdev/rescript-node": "2.0.0-alpha.22",
|
|
21
|
-
"@reventlessdev/
|
|
22
|
-
"@reventlessdev/reventless-
|
|
19
|
+
"@reventlessdev/rescript-effect": "0.1.0-alpha.34",
|
|
20
|
+
"@reventlessdev/reventless-infra": "3.0.0-alpha.190",
|
|
21
|
+
"@reventlessdev/reventless-core": "3.0.0-alpha.293",
|
|
22
|
+
"@reventlessdev/reventless-spec": "3.0.0-alpha.162"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
25
|
"rescript": "12.3.1",
|
|
26
26
|
"sury-ppx": "11.0.0",
|
|
27
|
-
"@reventlessdev/reventless-ppx": "1.0.0-alpha.
|
|
27
|
+
"@reventlessdev/reventless-ppx": "1.0.0-alpha.99"
|
|
28
28
|
},
|
|
29
29
|
"peerDependencies": {
|
|
30
30
|
"rescript": "^12.3.1"
|
package/src/Behavior_GWT.res
CHANGED
|
@@ -119,7 +119,7 @@ module type ActingSpec = {
|
|
|
119
119
|
@schema
|
|
120
120
|
type command
|
|
121
121
|
type role
|
|
122
|
-
let
|
|
122
|
+
let authorizationOf: string => Reventless.Authorization.rule<role>
|
|
123
123
|
}
|
|
124
124
|
|
|
125
125
|
module Acting = (Spec: ActingSpec) => {
|
|
@@ -142,7 +142,7 @@ module Acting = (Spec: ActingSpec) => {
|
|
|
142
142
|
// a role maps to is a deployment's fact, not the scenario's.
|
|
143
143
|
let refusedByRule = (who: Caller.t, command: Spec.command): bool =>
|
|
144
144
|
if (
|
|
145
|
-
Spec.
|
|
145
|
+
Spec.authorizationOf(commandName(command))
|
|
146
146
|
->Reventless.Authorization.named
|
|
147
147
|
->Reventless.Authorization.admits(~signedIn=who.signedIn, ~holds=role =>
|
|
148
148
|
who.roles->Array.includes(role)
|
|
@@ -240,7 +240,7 @@ module type BehaviorSpec = {
|
|
|
240
240
|
type event
|
|
241
241
|
|
|
242
242
|
type role
|
|
243
|
-
let
|
|
243
|
+
let authorizationOf: string => Reventless.Authorization.rule<role>
|
|
244
244
|
}
|
|
245
245
|
|
|
246
246
|
module type Behavior = {
|
|
@@ -460,7 +460,7 @@ module Make = (Spec: BehaviorSpec, Behavior: Behavior with module Spec := Spec):
|
|
|
460
460
|
type command = Spec.command
|
|
461
461
|
let commandSchema = Spec.commandSchema
|
|
462
462
|
type role = Spec.role
|
|
463
|
-
let
|
|
463
|
+
let authorizationOf = Spec.authorizationOf
|
|
464
464
|
})
|
|
465
465
|
let asCaller = Guard.asCaller
|
|
466
466
|
|
|
@@ -729,7 +729,7 @@ module type AggregateSpec = {
|
|
|
729
729
|
@schema
|
|
730
730
|
type error
|
|
731
731
|
type role
|
|
732
|
-
let
|
|
732
|
+
let authorizationOf: string => Reventless.Authorization.rule<role>
|
|
733
733
|
}
|
|
734
734
|
|
|
735
735
|
module type AggregateT = {
|
|
@@ -790,7 +790,7 @@ module MakeFromAggregate = (Spec: AggregateSpec, Behavior: Behavior.T with modul
|
|
|
790
790
|
type command = Spec.command
|
|
791
791
|
let commandSchema = Spec.commandSchema
|
|
792
792
|
type role = Spec.role
|
|
793
|
-
let
|
|
793
|
+
let authorizationOf = Spec.authorizationOf
|
|
794
794
|
})
|
|
795
795
|
let asCaller = Guard.asCaller
|
|
796
796
|
|
package/src/Behavior_GWT.res.mjs
CHANGED
|
@@ -106,7 +106,7 @@ function Acting(Spec) {
|
|
|
106
106
|
};
|
|
107
107
|
let commandName = command => Message$ReventlessCore.variantNameOfJson(Message$ReventlessCore.encode(command, Spec.commandSchema));
|
|
108
108
|
let refusedByRule = (who, command) => {
|
|
109
|
-
if (Authorization$Reventless.admits(Authorization$Reventless.named(Spec.
|
|
109
|
+
if (Authorization$Reventless.admits(Authorization$Reventless.named(Spec.authorizationOf(Message$ReventlessCore.variantNameOfJson(Message$ReventlessCore.encode(command, Spec.commandSchema)))), who.signedIn, role => who.roles.includes(role))) {
|
|
110
110
|
return false;
|
|
111
111
|
} else {
|
|
112
112
|
refusal.contents = {
|
|
@@ -376,7 +376,7 @@ function Make(Spec) {
|
|
|
376
376
|
let name = Spec.name;
|
|
377
377
|
let historySchema = Spec.consumedEventSchema;
|
|
378
378
|
let commandSchema = Spec.commandSchema;
|
|
379
|
-
let
|
|
379
|
+
let authorizationOf = Spec.authorizationOf;
|
|
380
380
|
let caller = {
|
|
381
381
|
contents: undefined
|
|
382
382
|
};
|
|
@@ -394,7 +394,7 @@ function Make(Spec) {
|
|
|
394
394
|
refusal.contents = undefined;
|
|
395
395
|
let claim = Stdlib_Option.map(who, w => w.claim);
|
|
396
396
|
if (Stdlib_Option.mapOr(who, false, __x => {
|
|
397
|
-
if (Authorization$Reventless.admits(Authorization$Reventless.named(
|
|
397
|
+
if (Authorization$Reventless.admits(Authorization$Reventless.named(authorizationOf(Message$ReventlessCore.variantNameOfJson(Message$ReventlessCore.encode(command, commandSchema)))), __x.signedIn, role => __x.roles.includes(role))) {
|
|
398
398
|
return false;
|
|
399
399
|
} else {
|
|
400
400
|
refusal.contents = {
|
|
@@ -747,7 +747,7 @@ function MakeFromAggregate(Spec) {
|
|
|
747
747
|
let name = Spec.name;
|
|
748
748
|
let historySchema = Spec.eventSchema;
|
|
749
749
|
let commandSchema = Spec.commandSchema;
|
|
750
|
-
let
|
|
750
|
+
let authorizationOf = Spec.authorizationOf;
|
|
751
751
|
let caller = {
|
|
752
752
|
contents: undefined
|
|
753
753
|
};
|
|
@@ -765,7 +765,7 @@ function MakeFromAggregate(Spec) {
|
|
|
765
765
|
refusal.contents = undefined;
|
|
766
766
|
let claim = Stdlib_Option.map(who, w => w.claim);
|
|
767
767
|
if (Stdlib_Option.mapOr(who, false, __x => {
|
|
768
|
-
if (Authorization$Reventless.admits(Authorization$Reventless.named(
|
|
768
|
+
if (Authorization$Reventless.admits(Authorization$Reventless.named(authorizationOf(Message$ReventlessCore.variantNameOfJson(Message$ReventlessCore.encode(command, commandSchema)))), __x.signedIn, role => __x.roles.includes(role))) {
|
|
769
769
|
return false;
|
|
770
770
|
} else {
|
|
771
771
|
refusal.contents = {
|
|
@@ -24,5 +24,5 @@ type event = CategoryAdded({categoryId: @s.matches(Reventless.DcbTag.string) str
|
|
|
24
24
|
|
|
25
25
|
// What `@@reventless.spec` injects into a real spec: the default rule.
|
|
26
26
|
type role = Reventless.Role.name
|
|
27
|
-
let
|
|
27
|
+
let authorizationOf = (_: string): Reventless.Authorization.rule<role> =>
|
|
28
28
|
Reventless.Authorization.AllowAuthenticated
|
|
@@ -22,7 +22,7 @@ let eventSchema = Sury.$schema(s => ({
|
|
|
22
22
|
name: s.m(Sury.string)
|
|
23
23
|
}));
|
|
24
24
|
|
|
25
|
-
function
|
|
25
|
+
function authorizationOf(param) {
|
|
26
26
|
return "AllowAuthenticated";
|
|
27
27
|
}
|
|
28
28
|
|
|
@@ -34,6 +34,6 @@ export {
|
|
|
34
34
|
commandSchema,
|
|
35
35
|
errorSchema,
|
|
36
36
|
eventSchema,
|
|
37
|
-
|
|
37
|
+
authorizationOf,
|
|
38
38
|
}
|
|
39
39
|
/* consumedEventSchema Not a pure module */
|
|
@@ -20,5 +20,5 @@ type event = CategoryAdded({categoryId: @s.matches(Reventless.DcbTag.string) str
|
|
|
20
20
|
|
|
21
21
|
// What `@@reventless.spec` injects into a real spec: the default rule.
|
|
22
22
|
type role = Reventless.Role.name
|
|
23
|
-
let
|
|
23
|
+
let authorizationOf = (_: string): Reventless.Authorization.rule<role> =>
|
|
24
24
|
Reventless.Authorization.AllowAuthenticated
|
|
@@ -19,7 +19,7 @@ let eventSchema = Sury.$schema(s => ({
|
|
|
19
19
|
name: s.m(Sury.string)
|
|
20
20
|
}));
|
|
21
21
|
|
|
22
|
-
function
|
|
22
|
+
function authorizationOf(param) {
|
|
23
23
|
return "AllowAuthenticated";
|
|
24
24
|
}
|
|
25
25
|
|
|
@@ -31,6 +31,6 @@ export {
|
|
|
31
31
|
commandSchema,
|
|
32
32
|
errorSchema,
|
|
33
33
|
eventSchema,
|
|
34
|
-
|
|
34
|
+
authorizationOf,
|
|
35
35
|
}
|
|
36
36
|
/* consumedEventSchema Not a pure module */
|
|
@@ -21,5 +21,5 @@ type event = CategoryAdded({categoryId: @s.matches(Reventless.DcbTag.string) str
|
|
|
21
21
|
|
|
22
22
|
// What `@@reventless.spec` injects into a real spec: the default rule.
|
|
23
23
|
type role = Reventless.Role.name
|
|
24
|
-
let
|
|
24
|
+
let authorizationOf = (_: string): Reventless.Authorization.rule<role> =>
|
|
25
25
|
Reventless.Authorization.AllowAuthenticated
|
|
@@ -19,7 +19,7 @@ let eventSchema = Sury.$schema(s => ({
|
|
|
19
19
|
name: s.m(Sury.string)
|
|
20
20
|
}));
|
|
21
21
|
|
|
22
|
-
function
|
|
22
|
+
function authorizationOf(param) {
|
|
23
23
|
return "AllowAuthenticated";
|
|
24
24
|
}
|
|
25
25
|
|
|
@@ -31,6 +31,6 @@ export {
|
|
|
31
31
|
commandSchema,
|
|
32
32
|
errorSchema,
|
|
33
33
|
eventSchema,
|
|
34
|
-
|
|
34
|
+
authorizationOf,
|
|
35
35
|
}
|
|
36
36
|
/* consumedEventSchema Not a pure module */
|
|
@@ -20,7 +20,7 @@ let commandSchema = Sury.union([
|
|
|
20
20
|
}))
|
|
21
21
|
]);
|
|
22
22
|
|
|
23
|
-
function
|
|
23
|
+
function authorizationOf(param) {
|
|
24
24
|
return "AllowAuthenticated";
|
|
25
25
|
}
|
|
26
26
|
|
|
@@ -38,7 +38,7 @@ let ShipPaid = {
|
|
|
38
38
|
maxRetries: 3,
|
|
39
39
|
heartbeatInterval: 60,
|
|
40
40
|
targetName: "Order",
|
|
41
|
-
|
|
41
|
+
authorizationOf: authorizationOf,
|
|
42
42
|
commandTransition: commandTransition,
|
|
43
43
|
traits: traits
|
|
44
44
|
};
|
|
@@ -64,7 +64,7 @@ function onExhausted(_id, _item) {
|
|
|
64
64
|
|
|
65
65
|
}
|
|
66
66
|
|
|
67
|
-
function
|
|
67
|
+
function authorizationOf(param) {
|
|
68
68
|
return "AllowAuthenticated";
|
|
69
69
|
}
|
|
70
70
|
|
|
@@ -83,7 +83,7 @@ let ShipOrderSlice = {
|
|
|
83
83
|
resolve: resolve,
|
|
84
84
|
process: process,
|
|
85
85
|
onExhausted: onExhausted,
|
|
86
|
-
|
|
86
|
+
authorizationOf: authorizationOf,
|
|
87
87
|
commandTransition: commandTransition,
|
|
88
88
|
traits: traits
|
|
89
89
|
};
|
|
@@ -46,7 +46,7 @@ module ProductDelegate = {
|
|
|
46
46
|
|
|
47
47
|
let moduleUrl = ""
|
|
48
48
|
type role = Reventless.Role.name
|
|
49
|
-
let
|
|
49
|
+
let authorizationOf = (_: string): Reventless.Authorization.rule<role> => AllowAuthenticated
|
|
50
50
|
type lifecycleState = unit
|
|
51
51
|
let commandTransition = (_: command): Reventless.Transition.t<lifecycleState> => Unrestricted
|
|
52
52
|
}
|
|
@@ -134,7 +134,7 @@ module OrderDelegate = {
|
|
|
134
134
|
|
|
135
135
|
let moduleUrl = ""
|
|
136
136
|
type role = Reventless.Role.name
|
|
137
|
-
let
|
|
137
|
+
let authorizationOf = (_: string): Reventless.Authorization.rule<role> => AllowAuthenticated
|
|
138
138
|
type lifecycleState = unit
|
|
139
139
|
let commandTransition = (_: command): Reventless.Transition.t<lifecycleState> => Unrestricted
|
|
140
140
|
}
|
|
@@ -204,7 +204,7 @@ module SyncDelegate = {
|
|
|
204
204
|
|
|
205
205
|
let moduleUrl = ""
|
|
206
206
|
type role = Reventless.Role.name
|
|
207
|
-
let
|
|
207
|
+
let authorizationOf = (_: string): Reventless.Authorization.rule<role> => AllowAuthenticated
|
|
208
208
|
type lifecycleState = unit
|
|
209
209
|
let commandTransition = (_: command): Reventless.Transition.t<lifecycleState> => Unrestricted
|
|
210
210
|
}
|
|
@@ -283,7 +283,7 @@ module StockDelegate = {
|
|
|
283
283
|
|
|
284
284
|
let moduleUrl = ""
|
|
285
285
|
type role = Reventless.Role.name
|
|
286
|
-
let
|
|
286
|
+
let authorizationOf = (_: string): Reventless.Authorization.rule<role> => AllowAuthenticated
|
|
287
287
|
type lifecycleState = unit
|
|
288
288
|
let commandTransition = (_: command): Reventless.Transition.t<lifecycleState> => Unrestricted
|
|
289
289
|
}
|
|
@@ -346,7 +346,7 @@ module SyncedDelegate = {
|
|
|
346
346
|
|
|
347
347
|
let moduleUrl = ""
|
|
348
348
|
type role = Reventless.Role.name
|
|
349
|
-
let
|
|
349
|
+
let authorizationOf = (_: string): Reventless.Authorization.rule<role> => AllowAuthenticated
|
|
350
350
|
type lifecycleState = unit
|
|
351
351
|
let commandTransition = (_: command): Reventless.Transition.t<lifecycleState> => Unrestricted
|
|
352
352
|
}
|
|
@@ -22,7 +22,7 @@ let eventSchema = Sury.union([
|
|
|
22
22
|
|
|
23
23
|
let directiveSchema = Sury.literal("NoDirective");
|
|
24
24
|
|
|
25
|
-
function
|
|
25
|
+
function authorizationOf(param) {
|
|
26
26
|
return "AllowAuthenticated";
|
|
27
27
|
}
|
|
28
28
|
|
|
@@ -38,7 +38,7 @@ let ProductsEpSpec = {
|
|
|
38
38
|
commandSchema: commandSchema,
|
|
39
39
|
eventSchema: eventSchema,
|
|
40
40
|
directiveSchema: directiveSchema,
|
|
41
|
-
|
|
41
|
+
authorizationOf: authorizationOf,
|
|
42
42
|
commandTransition: commandTransition,
|
|
43
43
|
traits: traits
|
|
44
44
|
};
|
|
@@ -65,7 +65,7 @@ let errorSchema = Sury.literal("NoError");
|
|
|
65
65
|
|
|
66
66
|
let moduleUrl = "";
|
|
67
67
|
|
|
68
|
-
function
|
|
68
|
+
function authorizationOf$1(param) {
|
|
69
69
|
return "AllowAuthenticated";
|
|
70
70
|
}
|
|
71
71
|
|
|
@@ -82,7 +82,7 @@ let ProductDelegate = {
|
|
|
82
82
|
eventSchema: eventSchema$1,
|
|
83
83
|
errorSchema: errorSchema,
|
|
84
84
|
moduleUrl: moduleUrl,
|
|
85
|
-
|
|
85
|
+
authorizationOf: authorizationOf$1,
|
|
86
86
|
commandTransition: commandTransition$1,
|
|
87
87
|
traits: traits$1
|
|
88
88
|
};
|
|
@@ -157,7 +157,7 @@ let ProductsEpGwt = Delegate_GWT$ReventlessGwt.FromExtensionPoint({
|
|
|
157
157
|
errorSchema: errorSchema,
|
|
158
158
|
commandSchema: commandSchema$1,
|
|
159
159
|
moduleUrl: moduleUrl,
|
|
160
|
-
|
|
160
|
+
authorizationOf: authorizationOf$1,
|
|
161
161
|
commandTransition: commandTransition$1,
|
|
162
162
|
traits: traits$1
|
|
163
163
|
},
|
|
@@ -209,7 +209,7 @@ let eventSchema$2 = Sury.union([
|
|
|
209
209
|
|
|
210
210
|
let directiveSchema$1 = Sury.literal("NoDirective");
|
|
211
211
|
|
|
212
|
-
function
|
|
212
|
+
function authorizationOf$2(param) {
|
|
213
213
|
return "AllowAuthenticated";
|
|
214
214
|
}
|
|
215
215
|
|
|
@@ -225,7 +225,7 @@ let OrdersEpSpec = {
|
|
|
225
225
|
commandSchema: commandSchema$2,
|
|
226
226
|
eventSchema: eventSchema$2,
|
|
227
227
|
directiveSchema: directiveSchema$1,
|
|
228
|
-
|
|
228
|
+
authorizationOf: authorizationOf$2,
|
|
229
229
|
commandTransition: commandTransition$2,
|
|
230
230
|
traits: traits$2
|
|
231
231
|
};
|
|
@@ -252,7 +252,7 @@ let errorSchema$1 = Sury.literal("NoError");
|
|
|
252
252
|
|
|
253
253
|
let moduleUrl$2 = "";
|
|
254
254
|
|
|
255
|
-
function
|
|
255
|
+
function authorizationOf$3(param) {
|
|
256
256
|
return "AllowAuthenticated";
|
|
257
257
|
}
|
|
258
258
|
|
|
@@ -269,7 +269,7 @@ let OrderDelegate = {
|
|
|
269
269
|
eventSchema: eventSchema$3,
|
|
270
270
|
errorSchema: errorSchema$1,
|
|
271
271
|
moduleUrl: moduleUrl$2,
|
|
272
|
-
|
|
272
|
+
authorizationOf: authorizationOf$3,
|
|
273
273
|
commandTransition: commandTransition$3,
|
|
274
274
|
traits: traits$3
|
|
275
275
|
};
|
|
@@ -345,7 +345,7 @@ let OrdersEpGwt = Delegate_GWT$ReventlessGwt.FromExtensionPoint({
|
|
|
345
345
|
errorSchema: errorSchema$1,
|
|
346
346
|
commandSchema: commandSchema$3,
|
|
347
347
|
moduleUrl: moduleUrl$2,
|
|
348
|
-
|
|
348
|
+
authorizationOf: authorizationOf$3,
|
|
349
349
|
commandTransition: commandTransition$3,
|
|
350
350
|
traits: traits$3
|
|
351
351
|
},
|
|
@@ -415,7 +415,7 @@ let errorSchema$2 = Sury.literal("NoError");
|
|
|
415
415
|
|
|
416
416
|
let moduleUrl$4 = "";
|
|
417
417
|
|
|
418
|
-
function
|
|
418
|
+
function authorizationOf$4(param) {
|
|
419
419
|
return "AllowAuthenticated";
|
|
420
420
|
}
|
|
421
421
|
|
|
@@ -432,7 +432,7 @@ let SyncDelegate = {
|
|
|
432
432
|
eventSchema: eventSchema$4,
|
|
433
433
|
errorSchema: errorSchema$2,
|
|
434
434
|
moduleUrl: moduleUrl$4,
|
|
435
|
-
|
|
435
|
+
authorizationOf: authorizationOf$4,
|
|
436
436
|
commandTransition: commandTransition$4,
|
|
437
437
|
traits: traits$4
|
|
438
438
|
};
|
|
@@ -503,7 +503,7 @@ let ProductsExtGwt = Delegate_GWT$ReventlessGwt.FromExtension({
|
|
|
503
503
|
errorSchema: errorSchema$2,
|
|
504
504
|
commandSchema: commandSchema$4,
|
|
505
505
|
moduleUrl: moduleUrl$4,
|
|
506
|
-
|
|
506
|
+
authorizationOf: authorizationOf$4,
|
|
507
507
|
commandTransition: commandTransition$4,
|
|
508
508
|
traits: traits$4
|
|
509
509
|
},
|
|
@@ -548,7 +548,7 @@ let eventSchema$5 = Sury.literal("NoEvent");
|
|
|
548
548
|
|
|
549
549
|
let directiveSchema$2 = Sury.literal("NoDirective");
|
|
550
550
|
|
|
551
|
-
function
|
|
551
|
+
function authorizationOf$5(param) {
|
|
552
552
|
return "AllowAuthenticated";
|
|
553
553
|
}
|
|
554
554
|
|
|
@@ -564,7 +564,7 @@ let InventoryEpSpec = {
|
|
|
564
564
|
commandSchema: commandSchema$5,
|
|
565
565
|
eventSchema: eventSchema$5,
|
|
566
566
|
directiveSchema: directiveSchema$2,
|
|
567
|
-
|
|
567
|
+
authorizationOf: authorizationOf$5,
|
|
568
568
|
commandTransition: commandTransition$5,
|
|
569
569
|
traits: traits$5
|
|
570
570
|
};
|
|
@@ -583,7 +583,7 @@ let errorSchema$3 = Sury.literal("NoError");
|
|
|
583
583
|
|
|
584
584
|
let moduleUrl$6 = "";
|
|
585
585
|
|
|
586
|
-
function
|
|
586
|
+
function authorizationOf$6(param) {
|
|
587
587
|
return "AllowAuthenticated";
|
|
588
588
|
}
|
|
589
589
|
|
|
@@ -600,7 +600,7 @@ let StockDelegate = {
|
|
|
600
600
|
eventSchema: eventSchema$6,
|
|
601
601
|
errorSchema: errorSchema$3,
|
|
602
602
|
moduleUrl: moduleUrl$6,
|
|
603
|
-
|
|
603
|
+
authorizationOf: authorizationOf$6,
|
|
604
604
|
commandTransition: commandTransition$6,
|
|
605
605
|
traits: traits$6
|
|
606
606
|
};
|
|
@@ -651,7 +651,7 @@ let InventoryEpGwt = Delegate_GWT$ReventlessGwt.FromExtensionPoint({
|
|
|
651
651
|
errorSchema: errorSchema$3,
|
|
652
652
|
commandSchema: commandSchema$6,
|
|
653
653
|
moduleUrl: moduleUrl$6,
|
|
654
|
-
|
|
654
|
+
authorizationOf: authorizationOf$6,
|
|
655
655
|
commandTransition: commandTransition$6,
|
|
656
656
|
traits: traits$6
|
|
657
657
|
},
|
|
@@ -681,7 +681,7 @@ let eventSchema$7 = Sury.literal("NoEvent");
|
|
|
681
681
|
|
|
682
682
|
let directiveSchema$3 = Sury.literal("NoDirective");
|
|
683
683
|
|
|
684
|
-
function
|
|
684
|
+
function authorizationOf$7(param) {
|
|
685
685
|
return "AllowAuthenticated";
|
|
686
686
|
}
|
|
687
687
|
|
|
@@ -697,7 +697,7 @@ let FeedbackEpSpec = {
|
|
|
697
697
|
commandSchema: commandSchema$7,
|
|
698
698
|
eventSchema: eventSchema$7,
|
|
699
699
|
directiveSchema: directiveSchema$3,
|
|
700
|
-
|
|
700
|
+
authorizationOf: authorizationOf$7,
|
|
701
701
|
commandTransition: commandTransition$7,
|
|
702
702
|
traits: traits$7
|
|
703
703
|
};
|
|
@@ -715,7 +715,7 @@ let errorSchema$4 = Sury.literal("NoError");
|
|
|
715
715
|
|
|
716
716
|
let moduleUrl$8 = "";
|
|
717
717
|
|
|
718
|
-
function
|
|
718
|
+
function authorizationOf$8(param) {
|
|
719
719
|
return "AllowAuthenticated";
|
|
720
720
|
}
|
|
721
721
|
|
|
@@ -732,7 +732,7 @@ let SyncedDelegate = {
|
|
|
732
732
|
eventSchema: eventSchema$8,
|
|
733
733
|
errorSchema: errorSchema$4,
|
|
734
734
|
moduleUrl: moduleUrl$8,
|
|
735
|
-
|
|
735
|
+
authorizationOf: authorizationOf$8,
|
|
736
736
|
commandTransition: commandTransition$8,
|
|
737
737
|
traits: traits$8
|
|
738
738
|
};
|
|
@@ -787,7 +787,7 @@ let FeedbackExtGwt = Delegate_GWT$ReventlessGwt.FromExtension({
|
|
|
787
787
|
errorSchema: errorSchema$4,
|
|
788
788
|
commandSchema: commandSchema$8,
|
|
789
789
|
moduleUrl: moduleUrl$8,
|
|
790
|
-
|
|
790
|
+
authorizationOf: authorizationOf$8,
|
|
791
791
|
commandTransition: commandTransition$8,
|
|
792
792
|
traits: traits$8
|
|
793
793
|
},
|
|
@@ -822,7 +822,7 @@ let directiveSchema$4 = Sury.union([
|
|
|
822
822
|
Sury.literal("FlushCache")
|
|
823
823
|
]);
|
|
824
824
|
|
|
825
|
-
function
|
|
825
|
+
function authorizationOf$9(param) {
|
|
826
826
|
return "AllowAuthenticated";
|
|
827
827
|
}
|
|
828
828
|
|
|
@@ -838,7 +838,7 @@ let NotifyEpSpec = {
|
|
|
838
838
|
commandSchema: commandSchema$9,
|
|
839
839
|
eventSchema: eventSchema$9,
|
|
840
840
|
directiveSchema: directiveSchema$4,
|
|
841
|
-
|
|
841
|
+
authorizationOf: authorizationOf$9,
|
|
842
842
|
commandTransition: commandTransition$9,
|
|
843
843
|
traits: traits$9
|
|
844
844
|
};
|
|
@@ -922,7 +922,7 @@ let NotifyEpGwt = Delegate_GWT$ReventlessGwt.FromExtensionPoint({
|
|
|
922
922
|
errorSchema: errorSchema,
|
|
923
923
|
commandSchema: commandSchema$1,
|
|
924
924
|
moduleUrl: moduleUrl,
|
|
925
|
-
|
|
925
|
+
authorizationOf: authorizationOf$1,
|
|
926
926
|
commandTransition: commandTransition$1,
|
|
927
927
|
traits: traits$1
|
|
928
928
|
},
|
|
@@ -1019,7 +1019,7 @@ let NotifyExtGwt = Delegate_GWT$ReventlessGwt.FromExtension({
|
|
|
1019
1019
|
errorSchema: errorSchema$2,
|
|
1020
1020
|
commandSchema: commandSchema$4,
|
|
1021
1021
|
moduleUrl: moduleUrl$4,
|
|
1022
|
-
|
|
1022
|
+
authorizationOf: authorizationOf$4,
|
|
1023
1023
|
commandTransition: commandTransition$4,
|
|
1024
1024
|
traits: traits$4
|
|
1025
1025
|
},
|
|
@@ -17,7 +17,7 @@ let eventSchema = Sury.$schema(s => ({
|
|
|
17
17
|
|
|
18
18
|
let errorSchema = Sury.literal("AlreadySynced");
|
|
19
19
|
|
|
20
|
-
function
|
|
20
|
+
function authorizationOf(param) {
|
|
21
21
|
return "AllowAuthenticated";
|
|
22
22
|
}
|
|
23
23
|
|
|
@@ -32,7 +32,7 @@ let CatalogProductAggregate = {
|
|
|
32
32
|
commandSchema: commandSchema,
|
|
33
33
|
eventSchema: eventSchema,
|
|
34
34
|
errorSchema: errorSchema,
|
|
35
|
-
|
|
35
|
+
authorizationOf: authorizationOf,
|
|
36
36
|
commandTransition: commandTransition,
|
|
37
37
|
traits: traits
|
|
38
38
|
};
|
|
@@ -93,7 +93,7 @@ let errorSchema$1 = Sury.union([
|
|
|
93
93
|
Sury.literal("NotPlaced")
|
|
94
94
|
]);
|
|
95
95
|
|
|
96
|
-
function
|
|
96
|
+
function authorizationOf$1(param) {
|
|
97
97
|
return "AllowAuthenticated";
|
|
98
98
|
}
|
|
99
99
|
|
|
@@ -108,7 +108,7 @@ let OrderAggregate = {
|
|
|
108
108
|
commandSchema: commandSchema$1,
|
|
109
109
|
eventSchema: eventSchema$1,
|
|
110
110
|
errorSchema: errorSchema$1,
|
|
111
|
-
|
|
111
|
+
authorizationOf: authorizationOf$1,
|
|
112
112
|
commandTransition: commandTransition$1,
|
|
113
113
|
traits: traits$1
|
|
114
114
|
};
|
|
@@ -81,7 +81,7 @@ module ProductDelegate = {
|
|
|
81
81
|
@schema type error = NoError
|
|
82
82
|
let moduleUrl = ""
|
|
83
83
|
type role = Reventless.Role.name
|
|
84
|
-
let
|
|
84
|
+
let authorizationOf = (_: string): Reventless.Authorization.rule<role> => AllowAuthenticated
|
|
85
85
|
type lifecycleState = unit
|
|
86
86
|
let commandTransition = (_: command): Reventless.Transition.t<lifecycleState> => Unrestricted
|
|
87
87
|
}
|
|
@@ -121,7 +121,7 @@ module OrderDelegate = {
|
|
|
121
121
|
@schema type error = NoError
|
|
122
122
|
let moduleUrl = ""
|
|
123
123
|
type role = Reventless.Role.name
|
|
124
|
-
let
|
|
124
|
+
let authorizationOf = (_: string): Reventless.Authorization.rule<role> => AllowAuthenticated
|
|
125
125
|
type lifecycleState = unit
|
|
126
126
|
let commandTransition = (_: command): Reventless.Transition.t<lifecycleState> => Unrestricted
|
|
127
127
|
}
|
|
@@ -159,7 +159,7 @@ module RecordDemandSlice = {
|
|
|
159
159
|
DemandRecorded({productId: @s.matches(Reventless.DcbTag.string) string, orderId: string})
|
|
160
160
|
let moduleUrl = ""
|
|
161
161
|
type role = Reventless.Role.name
|
|
162
|
-
let
|
|
162
|
+
let authorizationOf = (_: string): Reventless.Authorization.rule<role> => AllowAuthenticated
|
|
163
163
|
type lifecycleState = unit
|
|
164
164
|
let commandTransition = (_: command): Reventless.Transition.t<lifecycleState> => Unrestricted
|
|
165
165
|
}
|
|
@@ -220,7 +220,7 @@ module SyncProductSlice = {
|
|
|
220
220
|
})
|
|
221
221
|
let moduleUrl = ""
|
|
222
222
|
type role = Reventless.Role.name
|
|
223
|
-
let
|
|
223
|
+
let authorizationOf = (_: string): Reventless.Authorization.rule<role> => AllowAuthenticated
|
|
224
224
|
type lifecycleState = unit
|
|
225
225
|
let commandTransition = (_: command): Reventless.Transition.t<lifecycleState> => Unrestricted
|
|
226
226
|
}
|
|
@@ -26,7 +26,7 @@ let eventSchema = Sury.$schema(s => ({
|
|
|
26
26
|
price: s.m(Sury.number)
|
|
27
27
|
}));
|
|
28
28
|
|
|
29
|
-
function
|
|
29
|
+
function authorizationOf(param) {
|
|
30
30
|
return "AllowAuthenticated";
|
|
31
31
|
}
|
|
32
32
|
|
|
@@ -42,7 +42,7 @@ let AddProductSlice = {
|
|
|
42
42
|
commandSchema: commandSchema,
|
|
43
43
|
errorSchema: errorSchema,
|
|
44
44
|
eventSchema: eventSchema,
|
|
45
|
-
|
|
45
|
+
authorizationOf: authorizationOf,
|
|
46
46
|
commandTransition: commandTransition,
|
|
47
47
|
traits: traits,
|
|
48
48
|
readConsistency: "EscalateOnRetry"
|
|
@@ -95,7 +95,7 @@ let eventSchema$1 = Sury.$schema(s => ({
|
|
|
95
95
|
|
|
96
96
|
let directiveSchema = Sury.literal("NoDirective");
|
|
97
97
|
|
|
98
|
-
function
|
|
98
|
+
function authorizationOf$1(param) {
|
|
99
99
|
return "AllowAuthenticated";
|
|
100
100
|
}
|
|
101
101
|
|
|
@@ -111,7 +111,7 @@ let ProductsEpSpec = {
|
|
|
111
111
|
commandSchema: commandSchema$1,
|
|
112
112
|
eventSchema: eventSchema$1,
|
|
113
113
|
directiveSchema: directiveSchema,
|
|
114
|
-
|
|
114
|
+
authorizationOf: authorizationOf$1,
|
|
115
115
|
commandTransition: commandTransition$1,
|
|
116
116
|
traits: traits$1
|
|
117
117
|
};
|
|
@@ -131,7 +131,7 @@ let errorSchema$1 = Sury.literal("NoError");
|
|
|
131
131
|
|
|
132
132
|
let moduleUrl = "";
|
|
133
133
|
|
|
134
|
-
function
|
|
134
|
+
function authorizationOf$2(param) {
|
|
135
135
|
return "AllowAuthenticated";
|
|
136
136
|
}
|
|
137
137
|
|
|
@@ -148,7 +148,7 @@ let ProductDelegate = {
|
|
|
148
148
|
eventSchema: eventSchema$2,
|
|
149
149
|
errorSchema: errorSchema$1,
|
|
150
150
|
moduleUrl: moduleUrl,
|
|
151
|
-
|
|
151
|
+
authorizationOf: authorizationOf$2,
|
|
152
152
|
commandTransition: commandTransition$2,
|
|
153
153
|
traits: traits$2
|
|
154
154
|
};
|
|
@@ -200,7 +200,7 @@ let eventSchema$3 = Sury.$schema(s => ({
|
|
|
200
200
|
|
|
201
201
|
let directiveSchema$1 = Sury.literal("NoDirective");
|
|
202
202
|
|
|
203
|
-
function
|
|
203
|
+
function authorizationOf$3(param) {
|
|
204
204
|
return "AllowAuthenticated";
|
|
205
205
|
}
|
|
206
206
|
|
|
@@ -216,7 +216,7 @@ let OrdersEpSpec = {
|
|
|
216
216
|
commandSchema: commandSchema$3,
|
|
217
217
|
eventSchema: eventSchema$3,
|
|
218
218
|
directiveSchema: directiveSchema$1,
|
|
219
|
-
|
|
219
|
+
authorizationOf: authorizationOf$3,
|
|
220
220
|
commandTransition: commandTransition$3,
|
|
221
221
|
traits: traits$3
|
|
222
222
|
};
|
|
@@ -235,7 +235,7 @@ let errorSchema$2 = Sury.literal("NoError");
|
|
|
235
235
|
|
|
236
236
|
let moduleUrl$2 = "";
|
|
237
237
|
|
|
238
|
-
function
|
|
238
|
+
function authorizationOf$4(param) {
|
|
239
239
|
return "AllowAuthenticated";
|
|
240
240
|
}
|
|
241
241
|
|
|
@@ -252,7 +252,7 @@ let OrderDelegate = {
|
|
|
252
252
|
eventSchema: eventSchema$4,
|
|
253
253
|
errorSchema: errorSchema$2,
|
|
254
254
|
moduleUrl: moduleUrl$2,
|
|
255
|
-
|
|
255
|
+
authorizationOf: authorizationOf$4,
|
|
256
256
|
commandTransition: commandTransition$4,
|
|
257
257
|
traits: traits$4
|
|
258
258
|
};
|
|
@@ -317,7 +317,7 @@ let eventSchema$5 = Sury.$schema(s => ({
|
|
|
317
317
|
|
|
318
318
|
let moduleUrl$4 = "";
|
|
319
319
|
|
|
320
|
-
function
|
|
320
|
+
function authorizationOf$5(param) {
|
|
321
321
|
return "AllowAuthenticated";
|
|
322
322
|
}
|
|
323
323
|
|
|
@@ -335,7 +335,7 @@ let RecordDemandSlice = {
|
|
|
335
335
|
errorSchema: errorSchema$3,
|
|
336
336
|
eventSchema: eventSchema$5,
|
|
337
337
|
moduleUrl: moduleUrl$4,
|
|
338
|
-
|
|
338
|
+
authorizationOf: authorizationOf$5,
|
|
339
339
|
commandTransition: commandTransition$5,
|
|
340
340
|
traits: traits$5,
|
|
341
341
|
readConsistency: "EscalateOnRetry"
|
|
@@ -427,7 +427,7 @@ let eventSchema$6 = Sury.$schema(s => ({
|
|
|
427
427
|
|
|
428
428
|
let moduleUrl$6 = "";
|
|
429
429
|
|
|
430
|
-
function
|
|
430
|
+
function authorizationOf$6(param) {
|
|
431
431
|
return "AllowAuthenticated";
|
|
432
432
|
}
|
|
433
433
|
|
|
@@ -445,7 +445,7 @@ let SyncProductSlice = {
|
|
|
445
445
|
errorSchema: errorSchema$4,
|
|
446
446
|
eventSchema: eventSchema$6,
|
|
447
447
|
moduleUrl: moduleUrl$6,
|
|
448
|
-
|
|
448
|
+
authorizationOf: authorizationOf$6,
|
|
449
449
|
commandTransition: commandTransition$6,
|
|
450
450
|
traits: traits$6,
|
|
451
451
|
readConsistency: "EscalateOnRetry"
|
|
@@ -545,7 +545,7 @@ let eventSchema$7 = Sury.$schema(s => ({
|
|
|
545
545
|
productIds: s.m(Sury.array(DcbTag$Reventless.stringForKey("productId")))
|
|
546
546
|
}));
|
|
547
547
|
|
|
548
|
-
function
|
|
548
|
+
function authorizationOf$7(param) {
|
|
549
549
|
return "AllowAuthenticated";
|
|
550
550
|
}
|
|
551
551
|
|
|
@@ -561,7 +561,7 @@ let PlaceOrderSlice = {
|
|
|
561
561
|
commandSchema: commandSchema$7,
|
|
562
562
|
errorSchema: errorSchema$5,
|
|
563
563
|
eventSchema: eventSchema$7,
|
|
564
|
-
|
|
564
|
+
authorizationOf: authorizationOf$7,
|
|
565
565
|
commandTransition: commandTransition$7,
|
|
566
566
|
traits: traits$7,
|
|
567
567
|
readConsistency: "EscalateOnRetry"
|
|
@@ -648,7 +648,7 @@ let ProductsEp = Flow_GWT$ReventlessGwt.ExtensionPointStep({
|
|
|
648
648
|
errorSchema: errorSchema$1,
|
|
649
649
|
commandSchema: commandSchema$2,
|
|
650
650
|
moduleUrl: moduleUrl,
|
|
651
|
-
|
|
651
|
+
authorizationOf: authorizationOf$2,
|
|
652
652
|
commandTransition: commandTransition$2,
|
|
653
653
|
traits: traits$2
|
|
654
654
|
},
|
|
@@ -674,7 +674,7 @@ let ProductsExt = Flow_GWT$ReventlessGwt.ExtensionStep({
|
|
|
674
674
|
errorSchema: errorSchema$4,
|
|
675
675
|
commandSchema: commandSchema$6,
|
|
676
676
|
moduleUrl: moduleUrl$6,
|
|
677
|
-
|
|
677
|
+
authorizationOf: authorizationOf$6,
|
|
678
678
|
commandTransition: commandTransition$6,
|
|
679
679
|
traits: traits$6
|
|
680
680
|
},
|
|
@@ -692,7 +692,7 @@ let Sync = Flow_GWT$ReventlessGwt.CommandStep({
|
|
|
692
692
|
commandSchema: commandSchema$6,
|
|
693
693
|
errorSchema: errorSchema$4,
|
|
694
694
|
eventSchema: eventSchema$6,
|
|
695
|
-
|
|
695
|
+
authorizationOf: authorizationOf$6
|
|
696
696
|
})({
|
|
697
697
|
initialState: initialState$2,
|
|
698
698
|
evolve: evolve$2,
|
|
@@ -720,7 +720,7 @@ let OrdersEp = Flow_GWT$ReventlessGwt.ExtensionPointStep({
|
|
|
720
720
|
errorSchema: errorSchema$2,
|
|
721
721
|
commandSchema: commandSchema$4,
|
|
722
722
|
moduleUrl: moduleUrl$2,
|
|
723
|
-
|
|
723
|
+
authorizationOf: authorizationOf$4,
|
|
724
724
|
commandTransition: commandTransition$4,
|
|
725
725
|
traits: traits$4
|
|
726
726
|
},
|
|
@@ -746,7 +746,7 @@ let OrdersExt = Flow_GWT$ReventlessGwt.ExtensionStep({
|
|
|
746
746
|
errorSchema: errorSchema$3,
|
|
747
747
|
commandSchema: commandSchema$5,
|
|
748
748
|
moduleUrl: moduleUrl$4,
|
|
749
|
-
|
|
749
|
+
authorizationOf: authorizationOf$5,
|
|
750
750
|
commandTransition: commandTransition$5,
|
|
751
751
|
traits: traits$5
|
|
752
752
|
},
|
|
@@ -764,7 +764,7 @@ let Demand = Flow_GWT$ReventlessGwt.CommandStep({
|
|
|
764
764
|
commandSchema: commandSchema$5,
|
|
765
765
|
errorSchema: errorSchema$3,
|
|
766
766
|
eventSchema: eventSchema$5,
|
|
767
|
-
|
|
767
|
+
authorizationOf: authorizationOf$5
|
|
768
768
|
})({
|
|
769
769
|
initialState: initialState$1,
|
|
770
770
|
evolve: evolve$1,
|
|
@@ -24,7 +24,7 @@ let eventSchema = Sury.$schema(s => ({
|
|
|
24
24
|
item: s.m(Sury.string)
|
|
25
25
|
}));
|
|
26
26
|
|
|
27
|
-
function
|
|
27
|
+
function authorizationOf(param) {
|
|
28
28
|
return "AllowAuthenticated";
|
|
29
29
|
}
|
|
30
30
|
|
|
@@ -40,7 +40,7 @@ let PlaceOrderSlice = {
|
|
|
40
40
|
commandSchema: commandSchema,
|
|
41
41
|
errorSchema: errorSchema,
|
|
42
42
|
eventSchema: eventSchema,
|
|
43
|
-
|
|
43
|
+
authorizationOf: authorizationOf,
|
|
44
44
|
commandTransition: commandTransition,
|
|
45
45
|
traits: traits,
|
|
46
46
|
readConsistency: "EscalateOnRetry"
|
|
@@ -136,7 +136,7 @@ function onExhausted(_id, _todo) {
|
|
|
136
136
|
|
|
137
137
|
}
|
|
138
138
|
|
|
139
|
-
function
|
|
139
|
+
function authorizationOf$1(param) {
|
|
140
140
|
return "AllowAuthenticated";
|
|
141
141
|
}
|
|
142
142
|
|
|
@@ -155,7 +155,7 @@ let AutoShipSlice = {
|
|
|
155
155
|
resolve: resolve,
|
|
156
156
|
process: process,
|
|
157
157
|
onExhausted: onExhausted,
|
|
158
|
-
|
|
158
|
+
authorizationOf: authorizationOf$1,
|
|
159
159
|
commandTransition: commandTransition$1,
|
|
160
160
|
traits: traits$1
|
|
161
161
|
};
|
|
@@ -183,7 +183,7 @@ let eventSchema$1 = Sury.$schema(s => ({
|
|
|
183
183
|
orderId: s.m(DcbTag$Reventless.string)
|
|
184
184
|
}));
|
|
185
185
|
|
|
186
|
-
function
|
|
186
|
+
function authorizationOf$2(param) {
|
|
187
187
|
return "AllowAuthenticated";
|
|
188
188
|
}
|
|
189
189
|
|
|
@@ -199,7 +199,7 @@ let ShipOrderSlice = {
|
|
|
199
199
|
commandSchema: commandSchema$2,
|
|
200
200
|
errorSchema: errorSchema$1,
|
|
201
201
|
eventSchema: eventSchema$1,
|
|
202
|
-
|
|
202
|
+
authorizationOf: authorizationOf$2,
|
|
203
203
|
commandTransition: commandTransition$2,
|
|
204
204
|
traits: traits$2,
|
|
205
205
|
readConsistency: "EscalateOnRetry"
|
|
@@ -14,7 +14,7 @@ module PaymentHook = {
|
|
|
14
14
|
let targetName = "Order"
|
|
15
15
|
let externalSystem = Some("Payments")
|
|
16
16
|
type role = Reventless.Role.name
|
|
17
|
-
let
|
|
17
|
+
let authorizationOf = _ => Reventless.Authorization.AllowAuthenticated
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
module PaymentHook_Translation = {
|
|
@@ -13,7 +13,7 @@ let commandSchema = Sury.$schema(s => ({
|
|
|
13
13
|
orderId: s.m(Sury.string)
|
|
14
14
|
}));
|
|
15
15
|
|
|
16
|
-
function
|
|
16
|
+
function authorizationOf(param) {
|
|
17
17
|
return "AllowAuthenticated";
|
|
18
18
|
}
|
|
19
19
|
|
|
@@ -28,7 +28,7 @@ let PaymentHook = {
|
|
|
28
28
|
commandSchema: commandSchema,
|
|
29
29
|
targetName: "Order",
|
|
30
30
|
externalSystem: PaymentHook_externalSystem,
|
|
31
|
-
|
|
31
|
+
authorizationOf: authorizationOf,
|
|
32
32
|
traits: traits
|
|
33
33
|
};
|
|
34
34
|
|
|
@@ -37,7 +37,7 @@ function translate(input) {
|
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
function
|
|
40
|
+
function authorizationOf(param) {
|
|
41
41
|
return "AllowAuthenticated";
|
|
42
42
|
}
|
|
43
43
|
|
|
@@ -48,7 +48,7 @@ let PaymentWebhookSlice = {
|
|
|
48
48
|
externalInputSchema: externalInputSchema,
|
|
49
49
|
commandSchema: commandSchema,
|
|
50
50
|
translate: translate,
|
|
51
|
-
|
|
51
|
+
authorizationOf: authorizationOf,
|
|
52
52
|
traits: traits,
|
|
53
53
|
externalSystem: undefined
|
|
54
54
|
};
|
|
@@ -23,7 +23,7 @@ let errorSchema = Sury.literal("CategoryAlreadyExists");
|
|
|
23
23
|
|
|
24
24
|
let moduleUrl = "";
|
|
25
25
|
|
|
26
|
-
function
|
|
26
|
+
function authorizationOf(param) {
|
|
27
27
|
return "AllowAuthenticated";
|
|
28
28
|
}
|
|
29
29
|
|
|
@@ -40,7 +40,7 @@ let CategorySpec = {
|
|
|
40
40
|
eventSchema: eventSchema,
|
|
41
41
|
errorSchema: errorSchema,
|
|
42
42
|
moduleUrl: moduleUrl,
|
|
43
|
-
|
|
43
|
+
authorizationOf: authorizationOf,
|
|
44
44
|
commandTransition: commandTransition,
|
|
45
45
|
traits: traits
|
|
46
46
|
};
|
|
@@ -98,7 +98,7 @@ let errorSchema$1 = Sury.literal("ProductAlreadyMirrored");
|
|
|
98
98
|
|
|
99
99
|
let moduleUrl$2 = "";
|
|
100
100
|
|
|
101
|
-
function
|
|
101
|
+
function authorizationOf$1(param) {
|
|
102
102
|
return "AllowAuthenticated";
|
|
103
103
|
}
|
|
104
104
|
|
|
@@ -115,7 +115,7 @@ let ProductSpec = {
|
|
|
115
115
|
eventSchema: eventSchema$1,
|
|
116
116
|
errorSchema: errorSchema$1,
|
|
117
117
|
moduleUrl: moduleUrl$2,
|
|
118
|
-
|
|
118
|
+
authorizationOf: authorizationOf$1,
|
|
119
119
|
commandTransition: commandTransition$1,
|
|
120
120
|
traits: traits$1
|
|
121
121
|
};
|
|
@@ -197,7 +197,7 @@ function decide$2(state, command) {
|
|
|
197
197
|
}
|
|
198
198
|
}
|
|
199
199
|
|
|
200
|
-
function
|
|
200
|
+
function authorizationOf$2(param) {
|
|
201
201
|
return "AllowAuthenticated";
|
|
202
202
|
}
|
|
203
203
|
|
|
@@ -220,7 +220,7 @@ let NotificationSlice = {
|
|
|
220
220
|
errorSchema: errorSchema$2,
|
|
221
221
|
eventSchema: eventSchema$2,
|
|
222
222
|
decide: decide$2,
|
|
223
|
-
|
|
223
|
+
authorizationOf: authorizationOf$2,
|
|
224
224
|
commandTransition: commandTransition$2,
|
|
225
225
|
traits: traits$2,
|
|
226
226
|
readConsistency: "EscalateOnRetry"
|
|
@@ -269,7 +269,7 @@ function decide$3(state, command) {
|
|
|
269
269
|
}
|
|
270
270
|
}
|
|
271
271
|
|
|
272
|
-
function
|
|
272
|
+
function authorizationOf$3(param) {
|
|
273
273
|
return "AllowAuthenticated";
|
|
274
274
|
}
|
|
275
275
|
|
|
@@ -292,7 +292,7 @@ let InventorySlice = {
|
|
|
292
292
|
errorSchema: errorSchema$3,
|
|
293
293
|
eventSchema: eventSchema$3,
|
|
294
294
|
decide: decide$3,
|
|
295
|
-
|
|
295
|
+
authorizationOf: authorizationOf$3,
|
|
296
296
|
commandTransition: commandTransition$3,
|
|
297
297
|
traits: traits$3,
|
|
298
298
|
readConsistency: "EscalateOnRetry"
|
|
@@ -311,7 +311,7 @@ let CategorySource = Mapping_GWT$ReventlessGwt.FromBehavior({
|
|
|
311
311
|
errorSchema: errorSchema,
|
|
312
312
|
commandSchema: commandSchema,
|
|
313
313
|
moduleUrl: moduleUrl,
|
|
314
|
-
|
|
314
|
+
authorizationOf: authorizationOf,
|
|
315
315
|
commandTransition: commandTransition,
|
|
316
316
|
traits: traits
|
|
317
317
|
})({
|
|
@@ -328,7 +328,7 @@ let CategorySource = Mapping_GWT$ReventlessGwt.FromBehavior({
|
|
|
328
328
|
errorSchema: errorSchema,
|
|
329
329
|
commandSchema: commandSchema,
|
|
330
330
|
moduleUrl: moduleUrl,
|
|
331
|
-
|
|
331
|
+
authorizationOf: authorizationOf,
|
|
332
332
|
commandTransition: commandTransition,
|
|
333
333
|
traits: traits
|
|
334
334
|
},
|
|
@@ -352,7 +352,7 @@ let ProductTarget = Mapping_GWT$ReventlessGwt.FromBehavior({
|
|
|
352
352
|
errorSchema: errorSchema$1,
|
|
353
353
|
commandSchema: commandSchema$1,
|
|
354
354
|
moduleUrl: moduleUrl$2,
|
|
355
|
-
|
|
355
|
+
authorizationOf: authorizationOf$1,
|
|
356
356
|
commandTransition: commandTransition$1,
|
|
357
357
|
traits: traits$1
|
|
358
358
|
})({
|
|
@@ -369,7 +369,7 @@ let ProductTarget = Mapping_GWT$ReventlessGwt.FromBehavior({
|
|
|
369
369
|
errorSchema: errorSchema$1,
|
|
370
370
|
commandSchema: commandSchema$1,
|
|
371
371
|
moduleUrl: moduleUrl$2,
|
|
372
|
-
|
|
372
|
+
authorizationOf: authorizationOf$1,
|
|
373
373
|
commandTransition: commandTransition$1,
|
|
374
374
|
traits: traits$1
|
|
375
375
|
},
|
|
@@ -40,8 +40,12 @@ let eventSchema = Sury.$schema(s => ({
|
|
|
40
40
|
shelfId: s.m(DcbTag$Reventless.string)
|
|
41
41
|
}));
|
|
42
42
|
|
|
43
|
-
function
|
|
44
|
-
switch (
|
|
43
|
+
function authorizationOf(name) {
|
|
44
|
+
switch (name) {
|
|
45
|
+
case "Peek" :
|
|
46
|
+
return "AllowAnonymous";
|
|
47
|
+
case "Purge" :
|
|
48
|
+
return "DenyAll";
|
|
45
49
|
case "Shelve" :
|
|
46
50
|
return {
|
|
47
51
|
TAG: "AllowRoles",
|
|
@@ -50,12 +54,8 @@ function commandAuthorization(command) {
|
|
|
50
54
|
"Merchandiser"
|
|
51
55
|
]
|
|
52
56
|
};
|
|
53
|
-
|
|
57
|
+
default:
|
|
54
58
|
return "AllowAuthenticated";
|
|
55
|
-
case "Peek" :
|
|
56
|
-
return "AllowAnonymous";
|
|
57
|
-
case "Purge" :
|
|
58
|
-
return "DenyAll";
|
|
59
59
|
}
|
|
60
60
|
}
|
|
61
61
|
|
|
@@ -72,7 +72,7 @@ let ShelveSlice = {
|
|
|
72
72
|
commandSchema: commandSchema,
|
|
73
73
|
errorSchema: errorSchema,
|
|
74
74
|
eventSchema: eventSchema,
|
|
75
|
-
|
|
75
|
+
authorizationOf: authorizationOf,
|
|
76
76
|
commandTransition: commandTransition,
|
|
77
77
|
traits: traits,
|
|
78
78
|
readConsistency: "EscalateOnRetry"
|
|
@@ -105,7 +105,7 @@ let include = Behavior_GWT$ReventlessGwt.Make({
|
|
|
105
105
|
commandSchema: commandSchema,
|
|
106
106
|
errorSchema: errorSchema,
|
|
107
107
|
eventSchema: eventSchema,
|
|
108
|
-
|
|
108
|
+
authorizationOf: authorizationOf
|
|
109
109
|
})({
|
|
110
110
|
initialState: undefined,
|
|
111
111
|
evolve: evolve,
|
|
@@ -203,11 +203,15 @@ let eventSchema$1 = Sury.$schema(s => ({
|
|
|
203
203
|
shelfId: s.m(DcbTag$Reventless.string)
|
|
204
204
|
}));
|
|
205
205
|
|
|
206
|
-
function
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
206
|
+
function authorizationOf$1(name) {
|
|
207
|
+
if (name === "Shelve") {
|
|
208
|
+
return {
|
|
209
|
+
TAG: "AllowRoles",
|
|
210
|
+
_0: ["Merchandiser"]
|
|
211
|
+
};
|
|
212
|
+
} else {
|
|
213
|
+
return "AllowAuthenticated";
|
|
214
|
+
}
|
|
211
215
|
}
|
|
212
216
|
|
|
213
217
|
function commandTransition$1(param) {
|
|
@@ -223,7 +227,7 @@ let ClaimSlice = {
|
|
|
223
227
|
commandSchema: commandSchema$1,
|
|
224
228
|
errorSchema: errorSchema$1,
|
|
225
229
|
eventSchema: eventSchema$1,
|
|
226
|
-
|
|
230
|
+
authorizationOf: authorizationOf$1,
|
|
227
231
|
commandTransition: commandTransition$1,
|
|
228
232
|
traits: traits$1,
|
|
229
233
|
readConsistency: "EscalateOnRetry"
|
|
@@ -249,7 +253,7 @@ let Claim = Behavior_GWT$ReventlessGwt.Make({
|
|
|
249
253
|
commandSchema: commandSchema$1,
|
|
250
254
|
errorSchema: errorSchema$1,
|
|
251
255
|
eventSchema: eventSchema$1,
|
|
252
|
-
|
|
256
|
+
authorizationOf: authorizationOf$1
|
|
253
257
|
})({
|
|
254
258
|
initialState: undefined,
|
|
255
259
|
evolve: evolve$1,
|
|
@@ -24,7 +24,7 @@ let eventSchema = Sury.$schema(s => ({
|
|
|
24
24
|
name: s.m(Sury.string)
|
|
25
25
|
}));
|
|
26
26
|
|
|
27
|
-
function
|
|
27
|
+
function authorizationOf(param) {
|
|
28
28
|
return "AllowAuthenticated";
|
|
29
29
|
}
|
|
30
30
|
|
|
@@ -40,7 +40,7 @@ let AddCategorySlice = {
|
|
|
40
40
|
commandSchema: commandSchema,
|
|
41
41
|
errorSchema: errorSchema,
|
|
42
42
|
eventSchema: eventSchema,
|
|
43
|
-
|
|
43
|
+
authorizationOf: authorizationOf,
|
|
44
44
|
commandTransition: commandTransition,
|
|
45
45
|
traits: traits,
|
|
46
46
|
readConsistency: "EscalateOnRetry"
|
|
@@ -173,7 +173,7 @@ let eventSchema$1 = Sury.$schema(s => ({
|
|
|
173
173
|
id: s.m(Sury.string)
|
|
174
174
|
}));
|
|
175
175
|
|
|
176
|
-
function
|
|
176
|
+
function authorizationOf$1(param) {
|
|
177
177
|
return "AllowAuthenticated";
|
|
178
178
|
}
|
|
179
179
|
|
|
@@ -189,7 +189,7 @@ let MissingTagSlice = {
|
|
|
189
189
|
commandSchema: commandSchema$1,
|
|
190
190
|
errorSchema: errorSchema$1,
|
|
191
191
|
eventSchema: eventSchema$1,
|
|
192
|
-
|
|
192
|
+
authorizationOf: authorizationOf$1,
|
|
193
193
|
commandTransition: commandTransition$1,
|
|
194
194
|
traits: traits$1,
|
|
195
195
|
readConsistency: "EscalateOnRetry"
|
|
@@ -288,7 +288,7 @@ let eventSchema$2 = Sury.$schema(s => ({
|
|
|
288
288
|
carrierId: s.m(DcbTag$Reventless.string)
|
|
289
289
|
}));
|
|
290
290
|
|
|
291
|
-
function
|
|
291
|
+
function authorizationOf$2(param) {
|
|
292
292
|
return "AllowAuthenticated";
|
|
293
293
|
}
|
|
294
294
|
|
|
@@ -304,7 +304,7 @@ let ShipOrderSlice = {
|
|
|
304
304
|
commandSchema: commandSchema$2,
|
|
305
305
|
errorSchema: errorSchema$2,
|
|
306
306
|
eventSchema: eventSchema$2,
|
|
307
|
-
|
|
307
|
+
authorizationOf: authorizationOf$2,
|
|
308
308
|
commandTransition: commandTransition$2,
|
|
309
309
|
traits: traits$2,
|
|
310
310
|
readConsistency: "EscalateOnRetry"
|