@zeniai/client-epic-state 5.0.82-betaAR6 → 5.0.82-betaAR8
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/lib/esm/view/spendManagement/billPay/billPaySetupApproverView/epic/deleteBillPayApprovalRuleEpic.js +2 -2
- package/lib/esm/view/spendManagement/billPay/billPaySetupApproverView/epic/fetchBillPaySetupApproverViewEpic.js +2 -2
- package/lib/esm/view/spendManagement/billPay/billPaySetupApproverView/epic/reorderBillPayApprovalRulesEpic.js +4 -3
- package/lib/esm/view/spendManagement/billPay/billPaySetupApproverView/epic/saveBillPaySetupApproverViewUpdatesEpic.js +2 -2
- package/lib/esm/view/spendManagement/reimbursement/remiSetupApproverView/epic/deleteRemiApprovalRuleEpic.js +2 -2
- package/lib/esm/view/spendManagement/reimbursement/remiSetupApproverView/epic/fetchRemiSetupApproverViewEpic.js +2 -2
- package/lib/esm/view/spendManagement/reimbursement/remiSetupApproverView/epic/reorderRemiApprovalRulesEpic.js +4 -3
- package/lib/esm/view/spendManagement/reimbursement/remiSetupApproverView/epic/saveRemiSetupApproverViewUpdatesEpic.js +2 -2
- package/lib/view/spendManagement/billPay/billPaySetupApproverView/billPaySetupApproverViewState.d.ts +4 -4
- package/lib/view/spendManagement/billPay/billPaySetupApproverView/epic/deleteBillPayApprovalRuleEpic.js +2 -2
- package/lib/view/spendManagement/billPay/billPaySetupApproverView/epic/fetchBillPaySetupApproverViewEpic.js +2 -2
- package/lib/view/spendManagement/billPay/billPaySetupApproverView/epic/reorderBillPayApprovalRulesEpic.js +4 -3
- package/lib/view/spendManagement/billPay/billPaySetupApproverView/epic/saveBillPaySetupApproverViewUpdatesEpic.js +2 -2
- package/lib/view/spendManagement/reimbursement/remiSetupApproverView/epic/deleteRemiApprovalRuleEpic.js +2 -2
- package/lib/view/spendManagement/reimbursement/remiSetupApproverView/epic/fetchRemiSetupApproverViewEpic.js +2 -2
- package/lib/view/spendManagement/reimbursement/remiSetupApproverView/epic/reorderRemiApprovalRulesEpic.js +4 -3
- package/lib/view/spendManagement/reimbursement/remiSetupApproverView/epic/saveRemiSetupApproverViewUpdatesEpic.js +2 -2
- package/lib/view/spendManagement/reimbursement/remiSetupApproverView/remiSetupApproverViewState.d.ts +4 -4
- package/package.json +1 -1
|
@@ -11,8 +11,8 @@ export const deleteBillPayApprovalRuleEpic = (actions$, _state$, zeniAPI) => act
|
|
|
11
11
|
// Explicit `=== true` keeps `strict-boolean-expressions` happy
|
|
12
12
|
// when RTK's payload type widens to `any` in some configs.
|
|
13
13
|
const endpoint = useV3 === true
|
|
14
|
-
? //
|
|
15
|
-
|
|
14
|
+
? // `https://dev.api.zeni.ai/version/approval/tarun/1.0/bill-pay/approval-rules-v2`
|
|
15
|
+
`${zeniAPI.apiEndPoints.approvalMicroServiceBaseUrl}/1.0/bill-pay/approval-rules-v2`
|
|
16
16
|
: `${zeniAPI.apiEndPoints.approvalMicroServiceBaseUrl}/1.0/bill-pay/approval-rules`;
|
|
17
17
|
return zeniAPI
|
|
18
18
|
.deleteAndGetJSON(endpoint, {
|
|
@@ -18,8 +18,8 @@ export const fetchBillPaySetupApproverViewEpic = (actions$, state$, zeniAPI) =>
|
|
|
18
18
|
// Explicit `=== true` keeps `strict-boolean-expressions` happy
|
|
19
19
|
// when RTK's payload type widens to `any` in some configs.
|
|
20
20
|
const endpoint = useV3 === true
|
|
21
|
-
? //
|
|
22
|
-
|
|
21
|
+
? // `https://dev.api.zeni.ai/version/approval/tarun/1.0/bill-pay/approval-rules-v2`
|
|
22
|
+
`${zeniAPI.apiEndPoints.approvalMicroServiceBaseUrl}/1.0/bill-pay/approval-rules-v2`
|
|
23
23
|
: `${zeniAPI.apiEndPoints.approvalMicroServiceBaseUrl}/1.0/bill-pay/approval-rules`;
|
|
24
24
|
return zeniAPI.getJSON(endpoint).pipe(mergeMap((response) => {
|
|
25
25
|
if (isSuccessResponse(response) && response.data != null) {
|
|
@@ -9,9 +9,10 @@ export const reorderBillPayApprovalRulesEpic = (actions$, _state$, zeniAPI) => a
|
|
|
9
9
|
// Approval Rules 3.0 — flag-gated endpoint selection. Mirrors
|
|
10
10
|
// the pattern used by delete + fetch epics: the v3 dev host
|
|
11
11
|
// until the production base URL ships the v2 reorder route.
|
|
12
|
-
const endpoint =
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
const endpoint =
|
|
13
|
+
// useV3 === true
|
|
14
|
+
// ? `https://dev.api.zeni.ai/version/approval/tarun/1.0/bill-pay/approval-rules-v2/reorder` :
|
|
15
|
+
`${zeniAPI.apiEndPoints.approvalMicroServiceBaseUrl}/1.0/bill-pay/approval-rules-v2/reorder`;
|
|
15
16
|
return zeniAPI
|
|
16
17
|
.putAndGetJSON(endpoint, {
|
|
17
18
|
rule_ids: approvalRuleIds,
|
|
@@ -19,8 +19,8 @@ export const saveBillPaySetupApproverViewUpdatesEpic = (actions$, state$, zeniAP
|
|
|
19
19
|
? toApprovalChangableInfoPayload(billPaySetupApproverViewUpdateData.data)
|
|
20
20
|
: toApprovalChangableInfoPayloadV1(billPaySetupApproverViewUpdateData.data);
|
|
21
21
|
const endpoint = useV3
|
|
22
|
-
? //
|
|
23
|
-
|
|
22
|
+
? // `https://dev.api.zeni.ai/version/approval/tarun/1.0/bill-pay/approval-rules-v2`
|
|
23
|
+
`${zeniAPI.apiEndPoints.approvalMicroServiceBaseUrl}/1.0/bill-pay/approval-rules-v2`
|
|
24
24
|
: `${zeniAPI.apiEndPoints.approvalMicroServiceBaseUrl}/1.0/bill-pay/approval-rules`;
|
|
25
25
|
return zeniAPI
|
|
26
26
|
.postAndGetJSON(endpoint, payload)
|
|
@@ -11,8 +11,8 @@ export const deleteRemiApprovalRuleEpic = (actions$, _state$, zeniAPI) => action
|
|
|
11
11
|
// Explicit `=== true` keeps `strict-boolean-expressions` happy
|
|
12
12
|
// when RTK's payload type widens to `any` in some configs.
|
|
13
13
|
const endpoint = useV3 === true
|
|
14
|
-
? //
|
|
15
|
-
|
|
14
|
+
? // `https://dev.api.zeni.ai/version/approval/tarun/1.0/reimbursements/approval-rules-v2`
|
|
15
|
+
`${zeniAPI.apiEndPoints.approvalMicroServiceBaseUrl}/1.0/reimbursements/approval-rules-v2`
|
|
16
16
|
: `${zeniAPI.apiEndPoints.approvalMicroServiceBaseUrl}/1.0/reimbursements/approval-rules`;
|
|
17
17
|
return zeniAPI
|
|
18
18
|
.deleteAndGetJSON(endpoint, {
|
|
@@ -18,8 +18,8 @@ export const fetchRemiSetupApproverViewEpic = (actions$, state$, zeniAPI) => act
|
|
|
18
18
|
// Explicit `=== true` keeps `strict-boolean-expressions` happy
|
|
19
19
|
// when RTK's payload type widens to `any` in some configs.
|
|
20
20
|
const basePath = useV3 === true
|
|
21
|
-
? //
|
|
22
|
-
|
|
21
|
+
? // `https://dev.api.zeni.ai/version/approval/tarun/1.0/reimbursements/approval-rules-v2`
|
|
22
|
+
`${zeniAPI.apiEndPoints.approvalMicroServiceBaseUrl}/1.0/reimbursements/approval-rules-v2`
|
|
23
23
|
: `${zeniAPI.apiEndPoints.approvalMicroServiceBaseUrl}/1.0/reimbursements/approval-rules`;
|
|
24
24
|
return zeniAPI
|
|
25
25
|
.getJSON(`${basePath}?query={"is_include_implicit_actors": ${includeImplicitActors}, "is_resolve_attribute_to_user":${resolveAttributeToUser}}`)
|
|
@@ -6,9 +6,10 @@ import { createZeniAPIStatus, isSuccessResponse, } from '../../../../../response
|
|
|
6
6
|
import { fetchRemiSetupApproverView, reorderRemiApprovalRules, reorderRemiApprovalRulesFailure, reorderRemiApprovalRulesSuccess, } from '../remiSetupApproverViewReducer';
|
|
7
7
|
export const reorderRemiApprovalRulesEpic = (actions$, _state$, zeniAPI) => actions$.pipe(filter(reorderRemiApprovalRules.match), switchMap((action) => {
|
|
8
8
|
const { approvalRuleIds, useV3 } = action.payload;
|
|
9
|
-
const endpoint =
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
const endpoint =
|
|
10
|
+
// useV3 === true
|
|
11
|
+
// ? `https://dev.api.zeni.ai/version/approval/tarun/1.0/reimbursements/approval-rules-v2/reorder` :
|
|
12
|
+
`${zeniAPI.apiEndPoints.approvalMicroServiceBaseUrl}/1.0/reimbursements/approval-rules-v2/reorder`;
|
|
12
13
|
return zeniAPI
|
|
13
14
|
.putAndGetJSON(endpoint, {
|
|
14
15
|
rule_ids: approvalRuleIds,
|
|
@@ -19,8 +19,8 @@ export const saveRemiSetupApproverViewUpdatesEpic = (actions$, state$, zeniAPI)
|
|
|
19
19
|
? toApprovalChangableInfoPayload(remiSetupApproverViewUpdateData.data)
|
|
20
20
|
: toApprovalChangableInfoPayloadV1(remiSetupApproverViewUpdateData.data);
|
|
21
21
|
const endpoint = useV3
|
|
22
|
-
? //
|
|
23
|
-
|
|
22
|
+
? // `https://dev.api.zeni.ai/version/approval/tarun/1.0/reimbursements/approval-rules-v2`
|
|
23
|
+
`${zeniAPI.apiEndPoints.approvalMicroServiceBaseUrl}/1.0/reimbursements/approval-rules-v2`
|
|
24
24
|
: `${zeniAPI.apiEndPoints.approvalMicroServiceBaseUrl}/1.0/reimbursements/approval-rules`;
|
|
25
25
|
return zeniAPI
|
|
26
26
|
.postAndGetJSON(endpoint, payload)
|
package/lib/view/spendManagement/billPay/billPaySetupApproverView/billPaySetupApproverViewState.d.ts
CHANGED
|
@@ -9,10 +9,6 @@ export interface BillPaySetupApproverViewState extends FetchedState {
|
|
|
9
9
|
attributes: AttributeType[];
|
|
10
10
|
fetchStatus: FetchStateAndError;
|
|
11
11
|
};
|
|
12
|
-
affectedEntityIds?: ID[];
|
|
13
|
-
billPaySetupApproverViewUpdateData?: ApproverViewUpdateData;
|
|
14
|
-
listeningToPusherEvent?: boolean;
|
|
15
|
-
newApprovalRuleId?: ID;
|
|
16
12
|
/**
|
|
17
13
|
* Tracks the in-flight status of the list-page reorder PUT
|
|
18
14
|
* (approval-rules-v2/reorder). The reducer optimistically updates
|
|
@@ -21,4 +17,8 @@ export interface BillPaySetupApproverViewState extends FetchedState {
|
|
|
21
17
|
* truth.
|
|
22
18
|
*/
|
|
23
19
|
reorderStatus: FetchStateAndError;
|
|
20
|
+
affectedEntityIds?: ID[];
|
|
21
|
+
billPaySetupApproverViewUpdateData?: ApproverViewUpdateData;
|
|
22
|
+
listeningToPusherEvent?: boolean;
|
|
23
|
+
newApprovalRuleId?: ID;
|
|
24
24
|
}
|
|
@@ -14,8 +14,8 @@ const deleteBillPayApprovalRuleEpic = (actions$, _state$, zeniAPI) => actions$.p
|
|
|
14
14
|
// Explicit `=== true` keeps `strict-boolean-expressions` happy
|
|
15
15
|
// when RTK's payload type widens to `any` in some configs.
|
|
16
16
|
const endpoint = useV3 === true
|
|
17
|
-
? //
|
|
18
|
-
|
|
17
|
+
? // `https://dev.api.zeni.ai/version/approval/tarun/1.0/bill-pay/approval-rules-v2`
|
|
18
|
+
`${zeniAPI.apiEndPoints.approvalMicroServiceBaseUrl}/1.0/bill-pay/approval-rules-v2`
|
|
19
19
|
: `${zeniAPI.apiEndPoints.approvalMicroServiceBaseUrl}/1.0/bill-pay/approval-rules`;
|
|
20
20
|
return zeniAPI
|
|
21
21
|
.deleteAndGetJSON(endpoint, {
|
|
@@ -21,8 +21,8 @@ const fetchBillPaySetupApproverViewEpic = (actions$, state$, zeniAPI) => actions
|
|
|
21
21
|
// Explicit `=== true` keeps `strict-boolean-expressions` happy
|
|
22
22
|
// when RTK's payload type widens to `any` in some configs.
|
|
23
23
|
const endpoint = useV3 === true
|
|
24
|
-
? //
|
|
25
|
-
|
|
24
|
+
? // `https://dev.api.zeni.ai/version/approval/tarun/1.0/bill-pay/approval-rules-v2`
|
|
25
|
+
`${zeniAPI.apiEndPoints.approvalMicroServiceBaseUrl}/1.0/bill-pay/approval-rules-v2`
|
|
26
26
|
: `${zeniAPI.apiEndPoints.approvalMicroServiceBaseUrl}/1.0/bill-pay/approval-rules`;
|
|
27
27
|
return zeniAPI.getJSON(endpoint).pipe((0, operators_1.mergeMap)((response) => {
|
|
28
28
|
if ((0, responsePayload_1.isSuccessResponse)(response) && response.data != null) {
|
|
@@ -12,9 +12,10 @@ const reorderBillPayApprovalRulesEpic = (actions$, _state$, zeniAPI) => actions$
|
|
|
12
12
|
// Approval Rules 3.0 — flag-gated endpoint selection. Mirrors
|
|
13
13
|
// the pattern used by delete + fetch epics: the v3 dev host
|
|
14
14
|
// until the production base URL ships the v2 reorder route.
|
|
15
|
-
const endpoint =
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
const endpoint =
|
|
16
|
+
// useV3 === true
|
|
17
|
+
// ? `https://dev.api.zeni.ai/version/approval/tarun/1.0/bill-pay/approval-rules-v2/reorder` :
|
|
18
|
+
`${zeniAPI.apiEndPoints.approvalMicroServiceBaseUrl}/1.0/bill-pay/approval-rules-v2/reorder`;
|
|
18
19
|
return zeniAPI
|
|
19
20
|
.putAndGetJSON(endpoint, {
|
|
20
21
|
rule_ids: approvalRuleIds,
|
|
@@ -22,8 +22,8 @@ const saveBillPaySetupApproverViewUpdatesEpic = (actions$, state$, zeniAPI) => a
|
|
|
22
22
|
? (0, commonPayload_1.toApprovalChangableInfoPayload)(billPaySetupApproverViewUpdateData.data)
|
|
23
23
|
: (0, commonPayload_1.toApprovalChangableInfoPayloadV1)(billPaySetupApproverViewUpdateData.data);
|
|
24
24
|
const endpoint = useV3
|
|
25
|
-
? //
|
|
26
|
-
|
|
25
|
+
? // `https://dev.api.zeni.ai/version/approval/tarun/1.0/bill-pay/approval-rules-v2`
|
|
26
|
+
`${zeniAPI.apiEndPoints.approvalMicroServiceBaseUrl}/1.0/bill-pay/approval-rules-v2`
|
|
27
27
|
: `${zeniAPI.apiEndPoints.approvalMicroServiceBaseUrl}/1.0/bill-pay/approval-rules`;
|
|
28
28
|
return zeniAPI
|
|
29
29
|
.postAndGetJSON(endpoint, payload)
|
|
@@ -14,8 +14,8 @@ const deleteRemiApprovalRuleEpic = (actions$, _state$, zeniAPI) => actions$.pipe
|
|
|
14
14
|
// Explicit `=== true` keeps `strict-boolean-expressions` happy
|
|
15
15
|
// when RTK's payload type widens to `any` in some configs.
|
|
16
16
|
const endpoint = useV3 === true
|
|
17
|
-
? //
|
|
18
|
-
|
|
17
|
+
? // `https://dev.api.zeni.ai/version/approval/tarun/1.0/reimbursements/approval-rules-v2`
|
|
18
|
+
`${zeniAPI.apiEndPoints.approvalMicroServiceBaseUrl}/1.0/reimbursements/approval-rules-v2`
|
|
19
19
|
: `${zeniAPI.apiEndPoints.approvalMicroServiceBaseUrl}/1.0/reimbursements/approval-rules`;
|
|
20
20
|
return zeniAPI
|
|
21
21
|
.deleteAndGetJSON(endpoint, {
|
|
@@ -21,8 +21,8 @@ const fetchRemiSetupApproverViewEpic = (actions$, state$, zeniAPI) => actions$.p
|
|
|
21
21
|
// Explicit `=== true` keeps `strict-boolean-expressions` happy
|
|
22
22
|
// when RTK's payload type widens to `any` in some configs.
|
|
23
23
|
const basePath = useV3 === true
|
|
24
|
-
? //
|
|
25
|
-
|
|
24
|
+
? // `https://dev.api.zeni.ai/version/approval/tarun/1.0/reimbursements/approval-rules-v2`
|
|
25
|
+
`${zeniAPI.apiEndPoints.approvalMicroServiceBaseUrl}/1.0/reimbursements/approval-rules-v2`
|
|
26
26
|
: `${zeniAPI.apiEndPoints.approvalMicroServiceBaseUrl}/1.0/reimbursements/approval-rules`;
|
|
27
27
|
return zeniAPI
|
|
28
28
|
.getJSON(`${basePath}?query={"is_include_implicit_actors": ${includeImplicitActors}, "is_resolve_attribute_to_user":${resolveAttributeToUser}}`)
|
|
@@ -9,9 +9,10 @@ const responsePayload_1 = require("../../../../../responsePayload");
|
|
|
9
9
|
const remiSetupApproverViewReducer_1 = require("../remiSetupApproverViewReducer");
|
|
10
10
|
const reorderRemiApprovalRulesEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(remiSetupApproverViewReducer_1.reorderRemiApprovalRules.match), (0, operators_1.switchMap)((action) => {
|
|
11
11
|
const { approvalRuleIds, useV3 } = action.payload;
|
|
12
|
-
const endpoint =
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
const endpoint =
|
|
13
|
+
// useV3 === true
|
|
14
|
+
// ? `https://dev.api.zeni.ai/version/approval/tarun/1.0/reimbursements/approval-rules-v2/reorder` :
|
|
15
|
+
`${zeniAPI.apiEndPoints.approvalMicroServiceBaseUrl}/1.0/reimbursements/approval-rules-v2/reorder`;
|
|
15
16
|
return zeniAPI
|
|
16
17
|
.putAndGetJSON(endpoint, {
|
|
17
18
|
rule_ids: approvalRuleIds,
|
|
@@ -22,8 +22,8 @@ const saveRemiSetupApproverViewUpdatesEpic = (actions$, state$, zeniAPI) => acti
|
|
|
22
22
|
? (0, commonPayload_1.toApprovalChangableInfoPayload)(remiSetupApproverViewUpdateData.data)
|
|
23
23
|
: (0, commonPayload_1.toApprovalChangableInfoPayloadV1)(remiSetupApproverViewUpdateData.data);
|
|
24
24
|
const endpoint = useV3
|
|
25
|
-
? //
|
|
26
|
-
|
|
25
|
+
? // `https://dev.api.zeni.ai/version/approval/tarun/1.0/reimbursements/approval-rules-v2`
|
|
26
|
+
`${zeniAPI.apiEndPoints.approvalMicroServiceBaseUrl}/1.0/reimbursements/approval-rules-v2`
|
|
27
27
|
: `${zeniAPI.apiEndPoints.approvalMicroServiceBaseUrl}/1.0/reimbursements/approval-rules`;
|
|
28
28
|
return zeniAPI
|
|
29
29
|
.postAndGetJSON(endpoint, payload)
|
package/lib/view/spendManagement/reimbursement/remiSetupApproverView/remiSetupApproverViewState.d.ts
CHANGED
|
@@ -10,13 +10,13 @@ export interface RemiSetupApproverViewState extends FetchedState {
|
|
|
10
10
|
fetchStatus: FetchStateAndError;
|
|
11
11
|
attributeSubTypeToUserIdMapping?: Record<AttributeType, ID>;
|
|
12
12
|
};
|
|
13
|
-
affectedEntityIds?: ID[];
|
|
14
|
-
listeningToPusherEvent?: boolean;
|
|
15
|
-
newApprovalRuleId?: ID;
|
|
16
|
-
remiSetupApproverViewUpdateData?: ApproverViewUpdateData;
|
|
17
13
|
/**
|
|
18
14
|
* List-page reorder PUT status. See BillPay equivalent for the
|
|
19
15
|
* longer rationale.
|
|
20
16
|
*/
|
|
21
17
|
reorderStatus: FetchStateAndError;
|
|
18
|
+
affectedEntityIds?: ID[];
|
|
19
|
+
listeningToPusherEvent?: boolean;
|
|
20
|
+
newApprovalRuleId?: ID;
|
|
21
|
+
remiSetupApproverViewUpdateData?: ApproverViewUpdateData;
|
|
22
22
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeniai/client-epic-state",
|
|
3
|
-
"version": "5.0.82-
|
|
3
|
+
"version": "5.0.82-betaAR8",
|
|
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",
|