@zeniai/client-epic-state 5.1.92-betaRD8 → 5.1.92-betaRD9
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.
|
@@ -22,13 +22,25 @@ const revertJeScheduleEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, op
|
|
|
22
22
|
const { jeScheduleId, jeScheduleTransactionKey, reason, note } = action.payload;
|
|
23
23
|
const currentTenant = (0, tenantSelector_1.getCurrentTenant)(state);
|
|
24
24
|
const selectedPeriod = selectedPeriodByTenantId[currentTenant.tenantId];
|
|
25
|
-
//
|
|
26
|
-
//
|
|
27
|
-
//
|
|
28
|
-
//
|
|
25
|
+
// Feedback nested under je_schedules[0], the same shape ignore takes -- the two endpoints were
|
|
26
|
+
// made symmetric server-side. A flat {reason, note} body, which this epic used to send while
|
|
27
|
+
// revert validated the whole body as feedback, now answers 400 "Request body must contain at
|
|
28
|
+
// least one of je_schedules".
|
|
29
|
+
//
|
|
30
|
+
// Only the id and the feedback: the rest of the fat blob is read from Datastore, not the
|
|
31
|
+
// request. The id is optional server-side but sent anyway, because it is validated against the
|
|
32
|
+
// URL and so turns a mismatch into a 400 rather than a revert of the wrong schedule.
|
|
33
|
+
// `action` is stamped server-side.
|
|
29
34
|
const payload = {
|
|
30
|
-
|
|
31
|
-
|
|
35
|
+
je_schedules: [
|
|
36
|
+
{
|
|
37
|
+
je_schedule_id: jeScheduleId,
|
|
38
|
+
feedback: {
|
|
39
|
+
reason,
|
|
40
|
+
...(note != null && note !== '' ? { note } : {}),
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
],
|
|
32
44
|
};
|
|
33
45
|
return zeniAPI
|
|
34
46
|
.putAndGetJSON(`${zeniAPI.apiEndPoints.accountMicroServiceBaseUrl}/1.0/schedules/${jeScheduleId}/revert`, payload)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeniai/client-epic-state",
|
|
3
|
-
"version": "5.1.92-
|
|
3
|
+
"version": "5.1.92-betaRD9",
|
|
4
4
|
"description": "Shared module between Web & Mobile containing required abstractions for state management, async network communication. ",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "lib/esm/index.js",
|