@zeniai/client-epic-state 4.11.93 → 4.11.95
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/view/billPayCard/fetchBillPayCardEpic.js +1 -1
- package/lib/view/onboardingView/cockpitView/onboardingCockpitViewPayload.js +2 -2
- package/lib/view/onboardingView/cockpitView/onboardingCockpitViewReducer.d.ts +1 -2
- package/lib/view/onboardingView/cockpitView/onboardingCockpitViewReducer.js +1 -2
- package/lib/view/reimbursementCard/fetchReimbursementCardEpic.js +1 -1
- package/lib/view/spendManagement/billPay/billDetailView/epics/approveOrRejectBillEpic.js +1 -1
- package/lib/view/spendManagement/billPay/billDetailView/epics/cancelAndDeleteBillEpic.js +1 -1
- package/lib/view/spendManagement/billPay/billDetailView/epics/deleteBillEpic.js +1 -1
- package/lib/view/spendManagement/billPay/billDetailView/epics/fetchBillDetailEpic.js +1 -1
- package/lib/view/spendManagement/billPay/billList/fetchBillListPerTabEpic.js +1 -1
- package/lib/view/spendManagement/billPay/billPayConfig/fetchBillPayConfigEpic.js +1 -1
- package/lib/view/spendManagement/billPay/billsBulkActionView/epics/approveOrRejectBillsBulkActionEpic.js +1 -1
- package/lib/view/spendManagement/billPay/billsBulkActionView/epics/cancelOrDeleteBillsBulkActionEpic.js +1 -1
- package/lib/view/spendManagement/billPay/billsBulkActionView/epics/reviewDraftBillsBulkActionEpic.ts.js +1 -1
- package/lib/view/spendManagement/billPay/billsBulkActionView/epics/submitDraftBillsBulkActionEpic.js +1 -1
- package/lib/view/spendManagement/billPay/editBillView/epics/convertAmountToHomeCurrencyEpic.js +1 -1
- package/lib/view/spendManagement/billPay/editBillView/epics/saveBillDetailEpic.js +1 -1
- package/lib/view/spendManagement/billPay/magicLinkView/epics/fetchMagicLinkBillEpic.js +1 -1
- package/lib/view/spendManagement/billPay/previousBills/fetchPreviousBillsEpic.js +1 -1
- package/lib/view/spendManagement/commonHistoryView/fetchEntityHistoryEpic.js +1 -1
- package/lib/view/spendManagement/reimbursement/editRemiView/epics/fetchCurrencyConversionValueEpic.js +1 -1
- package/lib/view/spendManagement/reimbursement/editRemiView/epics/saveRemiDetailEpic.js +2 -2
- package/lib/view/spendManagement/reimbursement/reimbursementConfig/fetchReimbursementConfigEpic.js +1 -1
- package/lib/view/spendManagement/reimbursement/remiDetailView/epics/approveOrRejectRemiEpic.js +1 -1
- package/lib/view/spendManagement/reimbursement/remiDetailView/epics/cancelAndDeleteRemiEpic.js +1 -1
- package/lib/view/spendManagement/reimbursement/remiDetailView/epics/deleteRemiEpic.js +1 -1
- package/lib/view/spendManagement/reimbursement/remiDetailView/epics/fetchDuplicateReimbursementEpic.js +1 -1
- package/lib/view/spendManagement/reimbursement/remiDetailView/epics/fetchRemiDetailEpic.js +1 -1
- package/lib/view/spendManagement/reimbursement/remiListView/fetchRemiListPerTabEpic.js +1 -1
- package/lib/zeniAPI.d.ts +1 -0
- package/package.json +1 -1
|
@@ -33,7 +33,7 @@ const fetchBillPayCardEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, o
|
|
|
33
33
|
is_include_pending_approval_transaction_ids_for_user: true,
|
|
34
34
|
};
|
|
35
35
|
return zeniAPI
|
|
36
|
-
.getJSON(`${zeniAPI.apiEndPoints.
|
|
36
|
+
.getJSON(`${zeniAPI.apiEndPoints.spendManagementMicroServiceBaseUrl}/1.0/bill-pay-card?query=${encodeURIComponent(JSON.stringify(queryParam))}`)
|
|
37
37
|
.pipe((0, operators_1.mergeMap)((response) => {
|
|
38
38
|
if ((0, responsePayload_1.isSuccessResponse)(response) && response.data != null) {
|
|
39
39
|
return (0, rxjs_1.of)((0, billPayCardReducer_1.updateBillPayCard)({
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.toOnboardingCustomerPayload = void 0;
|
|
4
4
|
const toOnboardingCustomerPayload = (onboardingCustomer, sendInvite, company, tenant) => {
|
|
5
|
-
const { companyId, companyEmailDomain,
|
|
5
|
+
const { companyId, companyEmailDomain, groupId, groupName, groupDescription, isEmailGroupCreated, customerName, name, email, accountingConnectionCreationMode, hubSpotId, selectedProducts, } = onboardingCustomer;
|
|
6
6
|
const onboardingCustomerPayload = {
|
|
7
7
|
company_email_domain: companyEmailDomain,
|
|
8
8
|
is_onboarding_tenant: true,
|
|
9
9
|
is_send_invite_to_users_with_access_to_onboarding: sendInvite,
|
|
10
10
|
is_send_invite_to_customer: sendInvite,
|
|
11
|
-
user_email_with_pre_onboard_success:
|
|
11
|
+
user_email_with_pre_onboard_success: email,
|
|
12
12
|
name,
|
|
13
13
|
customer_first_name: customerName === null || customerName === void 0 ? void 0 : customerName.firstName,
|
|
14
14
|
customer_last_name: customerName === null || customerName === void 0 ? void 0 : customerName.lastName,
|
|
@@ -16,9 +16,8 @@ export declare const fetchCompanyOnboardingView: import("@reduxjs/toolkit").Acti
|
|
|
16
16
|
error: ZeniAPIStatus<Record<string, unknown>>;
|
|
17
17
|
}, string, never, never>, updateOnboardingCompletedCompaniesOnSuccess: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[companyIds: string[]], {
|
|
18
18
|
companyIds: string[];
|
|
19
|
-
}, string, never, never>, updateOnboardingCompletedCompaniesOnFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<ZeniAPIStatus<Record<string, unknown>>, string>, getOnboardingEmailGroup: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[companyEmailDomain: string
|
|
19
|
+
}, string, never, never>, updateOnboardingCompletedCompaniesOnFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<ZeniAPIStatus<Record<string, unknown>>, string>, getOnboardingEmailGroup: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[companyEmailDomain: string], {
|
|
20
20
|
companyEmailDomain: string;
|
|
21
|
-
userEmailWithPreOnboardSuccess: string;
|
|
22
21
|
}, string, never, never>, updateOnboardingEmailGroupOnSuccess: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[onboardingEmailGroup: OnboardingEmailGroupPayload], {
|
|
23
22
|
onboardingEmailGroup: OnboardingEmailGroupPayload;
|
|
24
23
|
}, string, never, never>, updateOnboardingEmailGroupOnFailure: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[error: ZeniAPIStatus<Record<string, unknown>>], {
|
|
@@ -59,11 +59,10 @@ const onboardingCockpitView = (0, toolkit_1.createSlice)({
|
|
|
59
59
|
initialState: exports.initialState,
|
|
60
60
|
reducers: {
|
|
61
61
|
getOnboardingEmailGroup: {
|
|
62
|
-
prepare(companyEmailDomain
|
|
62
|
+
prepare(companyEmailDomain) {
|
|
63
63
|
return {
|
|
64
64
|
payload: {
|
|
65
65
|
companyEmailDomain,
|
|
66
|
-
userEmailWithPreOnboardSuccess,
|
|
67
66
|
},
|
|
68
67
|
};
|
|
69
68
|
},
|
|
@@ -28,7 +28,7 @@ const fetchReimbursementCardEpic = (actions$, _state$, zeniAPI) => actions$.pipe
|
|
|
28
28
|
get_count_only: true,
|
|
29
29
|
};
|
|
30
30
|
return zeniAPI
|
|
31
|
-
.getJSON(`${zeniAPI.apiEndPoints.
|
|
31
|
+
.getJSON(`${zeniAPI.apiEndPoints.spendManagementMicroServiceBaseUrl}/1.0/reimbursement-card?query=${encodeURIComponent(JSON.stringify(queryParam))}`)
|
|
32
32
|
.pipe((0, operators_1.mergeMap)((response) => {
|
|
33
33
|
if ((0, responsePayload_1.isSuccessResponse)(response) && response.data != null) {
|
|
34
34
|
return (0, rxjs_1.of)((0, reimbursementCardReducer_1.updateReimbursementCard)({
|
|
@@ -16,7 +16,7 @@ const approveOrRejectBillEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0
|
|
|
16
16
|
description,
|
|
17
17
|
};
|
|
18
18
|
return zeniAPI
|
|
19
|
-
.putAndGetJSON(`${zeniAPI.apiEndPoints.
|
|
19
|
+
.putAndGetJSON(`${zeniAPI.apiEndPoints.spendManagementMicroServiceBaseUrl}/1.0/bills/transactions/${billId}/approval-status`, payload)
|
|
20
20
|
.pipe((0, operators_1.mergeMap)((response) => {
|
|
21
21
|
var _a, _b;
|
|
22
22
|
if ((0, responsePayload_1.isSuccessResponse)(response) && response.data != null) {
|
|
@@ -20,7 +20,7 @@ const cancelAndDeleteBillEpic = (actions$, state$, zeniAPI) => actions$.pipe((0,
|
|
|
20
20
|
const transaction = billTransactionState.transactionById[action.payload.billId];
|
|
21
21
|
const isRecurring = (_a = transaction === null || transaction === void 0 ? void 0 : transaction.isRecurring) !== null && _a !== void 0 ? _a : false;
|
|
22
22
|
const recurringConfigId = transaction === null || transaction === void 0 ? void 0 : transaction.recurringBillConfigId;
|
|
23
|
-
let cancelApiUrl = `${zeniAPI.apiEndPoints.
|
|
23
|
+
let cancelApiUrl = `${zeniAPI.apiEndPoints.spendManagementMicroServiceBaseUrl}/1.0/bills/transactions/${action.payload.billId}`;
|
|
24
24
|
if (isRecurring === true) {
|
|
25
25
|
cancelApiUrl = `${cancelApiUrl}/recurring/cancel-payment`;
|
|
26
26
|
}
|
|
@@ -20,7 +20,7 @@ const deleteBillEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, operator
|
|
|
20
20
|
const transaction = billTransactionState.transactionById[action.payload.billId];
|
|
21
21
|
const isRecurring = (_a = transaction === null || transaction === void 0 ? void 0 : transaction.isRecurring) !== null && _a !== void 0 ? _a : false;
|
|
22
22
|
const recurringConfigId = transaction === null || transaction === void 0 ? void 0 : transaction.recurringBillConfigId;
|
|
23
|
-
let deleteApiUrl = `${zeniAPI.apiEndPoints.
|
|
23
|
+
let deleteApiUrl = `${zeniAPI.apiEndPoints.spendManagementMicroServiceBaseUrl}/1.0/bills/transactions/${action.payload.billId}`;
|
|
24
24
|
if (isRecurring === true) {
|
|
25
25
|
deleteApiUrl = `${deleteApiUrl}/recurring`;
|
|
26
26
|
}
|
|
@@ -53,7 +53,7 @@ const fetchBillDetailEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, ope
|
|
|
53
53
|
is_include_deleted: isShowDeletedBillsEnabled,
|
|
54
54
|
};
|
|
55
55
|
const getTransactionDetail$ = zeniAPI
|
|
56
|
-
.getJSON(`${zeniAPI.apiEndPoints.
|
|
56
|
+
.getJSON(`${zeniAPI.apiEndPoints.spendManagementMicroServiceBaseUrl}/1.0/bills/transactions/${billId}?query=${encodeURIComponent(JSON.stringify(query))}`)
|
|
57
57
|
.pipe((0, operators_1.mergeMap)((response) => {
|
|
58
58
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
59
59
|
if ((0, responsePayload_1.isSuccessResponse)(response) &&
|
|
@@ -25,7 +25,7 @@ const fetchBillListPerTabEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0
|
|
|
25
25
|
is_include_deleted: isShowDeletedBillsEnabled ? tab !== 'draft' : false,
|
|
26
26
|
};
|
|
27
27
|
return zeniAPI
|
|
28
|
-
.getJSON(`${zeniAPI.apiEndPoints.
|
|
28
|
+
.getJSON(`${zeniAPI.apiEndPoints.spendManagementMicroServiceBaseUrl}/1.0/bills/transactions?query=${encodeURIComponent(JSON.stringify(queryParam))}`)
|
|
29
29
|
.pipe((0, operators_1.mergeMap)((response) => {
|
|
30
30
|
var _a, _b;
|
|
31
31
|
if ((0, responsePayload_1.isSuccessResponse)(response) && response.data != null) {
|
|
@@ -13,7 +13,7 @@ const fetchBillPayConfigEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0,
|
|
|
13
13
|
is_include_payment_accounts_info: true,
|
|
14
14
|
};
|
|
15
15
|
return zeniAPI
|
|
16
|
-
.getJSON(`${zeniAPI.apiEndPoints.
|
|
16
|
+
.getJSON(`${zeniAPI.apiEndPoints.spendManagementMicroServiceBaseUrl}/1.0/bill-pay/config?query=${encodeURIComponent(JSON.stringify(queryParam))}`)
|
|
17
17
|
.pipe((0, operators_1.mergeMap)((response) => {
|
|
18
18
|
if ((0, responsePayload_1.isSuccessResponse)(response) && response.data != null) {
|
|
19
19
|
const updateActions = [];
|
|
@@ -13,7 +13,7 @@ const approveOrRejectBillsBulkActionEpic = (actions$, state$, zeniAPI) => action
|
|
|
13
13
|
const transactionIds = billsBulkActionViewState.billsSelectedForBulkAction;
|
|
14
14
|
const payload = prepareBulkApproveOrRejectPayload(transactionIds, approvalType, description);
|
|
15
15
|
return zeniAPI
|
|
16
|
-
.putAndGetJSON(`${zeniAPI.apiEndPoints.
|
|
16
|
+
.putAndGetJSON(`${zeniAPI.apiEndPoints.spendManagementMicroServiceBaseUrl}/1.0/bulk/bills/transactions`, payload)
|
|
17
17
|
.pipe((0, operators_1.mergeMap)((response) => {
|
|
18
18
|
var _a, _b, _c, _d, _e, _f;
|
|
19
19
|
if ((0, responsePayload_1.isSuccessStatus)(response)) {
|
|
@@ -12,7 +12,7 @@ const cancelOrDeleteBillsBulkActionEpic = (actions$, state$, zeniAPI) => actions
|
|
|
12
12
|
const { billsBulkActionViewState } = state$.value;
|
|
13
13
|
const transactionIds = billsBulkActionViewState.billsSelectedForBulkAction;
|
|
14
14
|
const payload = prepareBulkCancelOrDeletePayload(transactionIds, operationType, description);
|
|
15
|
-
const bulkApiUrl = `${zeniAPI.apiEndPoints.
|
|
15
|
+
const bulkApiUrl = `${zeniAPI.apiEndPoints.spendManagementMicroServiceBaseUrl}/1.0/bulk/bills/transactions`;
|
|
16
16
|
const api = operationType === 'cancel'
|
|
17
17
|
? zeniAPI.putAndGetJSON(bulkApiUrl, payload)
|
|
18
18
|
: zeniAPI.deleteAndGetJSON(bulkApiUrl, payload);
|
|
@@ -12,7 +12,7 @@ const reviewDraftBillsBulkActionEpic = (actions$, state$, zeniAPI) => actions$.p
|
|
|
12
12
|
entity_ids: transactionIds,
|
|
13
13
|
};
|
|
14
14
|
return zeniAPI
|
|
15
|
-
.getJSON(`${zeniAPI.apiEndPoints.
|
|
15
|
+
.getJSON(`${zeniAPI.apiEndPoints.spendManagementMicroServiceBaseUrl}/1.0/bulk/bills/transactions/validate?query=${encodeURIComponent(JSON.stringify(queryParam))}`)
|
|
16
16
|
.pipe((0, operators_1.mergeMap)((response) => {
|
|
17
17
|
var _a, _b;
|
|
18
18
|
if ((0, responsePayload_1.isSuccessStatus)(response)) {
|
package/lib/view/spendManagement/billPay/billsBulkActionView/epics/submitDraftBillsBulkActionEpic.js
CHANGED
|
@@ -11,7 +11,7 @@ const editBillViewSelector_1 = require("../../editBillView/editBillViewSelector"
|
|
|
11
11
|
const submitDraftBillsBulkActionEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(billsBulkActionViewReducer_1.submitDraftBillsBulkAction.match), (0, operators_1.mergeMap)(() => {
|
|
12
12
|
const { billsBulkActionViewState, billTransactionState } = state$.value;
|
|
13
13
|
const payload = prepareBulkSubmitPayload(billsBulkActionViewState, billTransactionState);
|
|
14
|
-
const bulkApiUrl = `${zeniAPI.apiEndPoints.
|
|
14
|
+
const bulkApiUrl = `${zeniAPI.apiEndPoints.spendManagementMicroServiceBaseUrl}/1.0/bulk/bills/transactions`;
|
|
15
15
|
return zeniAPI
|
|
16
16
|
.putAndGetJSON(bulkApiUrl, payload)
|
|
17
17
|
.pipe((0, operators_1.mergeMap)((response) => {
|
package/lib/view/spendManagement/billPay/editBillView/epics/convertAmountToHomeCurrencyEpic.js
CHANGED
|
@@ -27,7 +27,7 @@ const convertAmountToHomeCurrencyEpic = (actions$, state$, zeniAPI) => actions$.
|
|
|
27
27
|
home_currency_code: conversionCurrencyCode,
|
|
28
28
|
};
|
|
29
29
|
return zeniAPI
|
|
30
|
-
.postAndGetJSON(`${zeniAPI.apiEndPoints.
|
|
30
|
+
.postAndGetJSON(`${zeniAPI.apiEndPoints.spendManagementMicroServiceBaseUrl}/1.0/bills/currencies/conversion`, payload)
|
|
31
31
|
.pipe((0, operators_1.mergeMap)((response) => {
|
|
32
32
|
if ((0, responsePayload_1.isSuccessResponse)(response) && response.data != null) {
|
|
33
33
|
const updateActions = [];
|
|
@@ -32,7 +32,7 @@ const saveBillDetailEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, oper
|
|
|
32
32
|
: state.editBillDetailViewState.newBillState;
|
|
33
33
|
const payload = prepareSaveBillPayload(state.accountState, state.billTransactionState, state.paymentAccountState, state.recurringBillState, billDetail, billStageCode);
|
|
34
34
|
const isRecurringBill = billDetail.billDetailLocalData.isRecurring;
|
|
35
|
-
const saveBillBaseURL = `${zeniAPI.apiEndPoints.
|
|
35
|
+
const saveBillBaseURL = `${zeniAPI.apiEndPoints.spendManagementMicroServiceBaseUrl}/1.0/bills/transactions`;
|
|
36
36
|
const saveBillApi = billId != null
|
|
37
37
|
? zeniAPI.putAndGetJSON(getSaveBillApiURL(saveBillBaseURL, isRecurringBill, billId, state.billTransactionState), payload)
|
|
38
38
|
: zeniAPI.postAndGetJSON(getSaveBillApiURL(saveBillBaseURL, isRecurringBill), payload);
|
|
@@ -8,7 +8,7 @@ const responsePayload_1 = require("../../../../../responsePayload");
|
|
|
8
8
|
const attachmentPayload_1 = require("../../../../../entity/transaction/payloadTypes/attachmentPayload");
|
|
9
9
|
const fetchMagicLinkBillEpic = (actions$, _, zeniAPI) => actions$.pipe((0, operators_1.filter)(magicLinkViewReducer_1.fetchBillAttachment.match), (0, operators_1.mergeMap)((action) => {
|
|
10
10
|
const { billId } = action.payload;
|
|
11
|
-
let apiUrl = `${zeniAPI.apiEndPoints.
|
|
11
|
+
let apiUrl = `${zeniAPI.apiEndPoints.spendManagementMicroServiceBaseUrl}/1.0/bills/transactions/${billId}`;
|
|
12
12
|
const queryParam = {
|
|
13
13
|
transaction_type: 'bill',
|
|
14
14
|
bill_pay_provider: 'zeni',
|
|
@@ -34,7 +34,7 @@ const fetchPreviousBillsEpic = (actions$, state$, zeniAPI) => actions$.pipe((0,
|
|
|
34
34
|
limit: 3,
|
|
35
35
|
};
|
|
36
36
|
return zeniAPI
|
|
37
|
-
.getJSON(`${zeniAPI.apiEndPoints.
|
|
37
|
+
.getJSON(`${zeniAPI.apiEndPoints.spendManagementMicroServiceBaseUrl}/1.0/bills/transactions?query=${encodeURIComponent(JSON.stringify(queryParam))}`)
|
|
38
38
|
.pipe((0, operators_1.mergeMap)((response) => {
|
|
39
39
|
if ((0, responsePayload_1.isSuccessResponse)(response) && response.data != null) {
|
|
40
40
|
const updateActions = [];
|
|
@@ -26,7 +26,7 @@ const fetchEntityHistoryEpic = (actions$, state$, zeniAPI) => actions$.pipe((0,
|
|
|
26
26
|
}));
|
|
27
27
|
const entityTypeInUrl = entityType === 'bill_pay' ? 'bill' : entityType;
|
|
28
28
|
const getHistoryDetail$ = zeniAPI
|
|
29
|
-
.getJSON(`${zeniAPI.apiEndPoints.
|
|
29
|
+
.getJSON(`${zeniAPI.apiEndPoints.spendManagementMicroServiceBaseUrl}/1.0/${entityTypeInUrl}s/transactions/${entityId}/history`)
|
|
30
30
|
.pipe((0, operators_1.mergeMap)((response) => {
|
|
31
31
|
if ((0, responsePayload_1.isSuccessResponse)(response) && response.data != null) {
|
|
32
32
|
return (0, rxjs_1.of)((0, commonHistoryReducer_1.updateCommonHistory)({
|
|
@@ -25,7 +25,7 @@ const fetchCurrencyConversionValueEpic = (actions$, state$, zeniAPI) => actions$
|
|
|
25
25
|
home_currency_code: conversionCurrencyCode,
|
|
26
26
|
};
|
|
27
27
|
return zeniAPI
|
|
28
|
-
.postAndGetJSON(`${zeniAPI.apiEndPoints.
|
|
28
|
+
.postAndGetJSON(`${zeniAPI.apiEndPoints.spendManagementMicroServiceBaseUrl}/1.0/reimbursements/currencies/conversion`, payload)
|
|
29
29
|
.pipe((0, operators_1.mergeMap)((response) => {
|
|
30
30
|
if ((0, responsePayload_1.isSuccessResponse)(response) && response.data != null) {
|
|
31
31
|
const updateActions = [];
|
|
@@ -29,8 +29,8 @@ const saveRemiDetailEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, oper
|
|
|
29
29
|
: state.editRemiDetailViewState.newRemiState;
|
|
30
30
|
const payload = prepareSaveRemiPayload(state.reimbursementState, state.tenantState, remiDetail, remiStageCode, isSubmitted);
|
|
31
31
|
const saveVendorApi = reimbursementId != null
|
|
32
|
-
? zeniAPI.putAndGetJSON(`${zeniAPI.apiEndPoints.
|
|
33
|
-
: zeniAPI.postAndGetJSON(`${zeniAPI.apiEndPoints.
|
|
32
|
+
? zeniAPI.putAndGetJSON(`${zeniAPI.apiEndPoints.spendManagementMicroServiceBaseUrl}/1.0/reimbursements/transactions/${action.payload.reimbursementId}`, payload)
|
|
33
|
+
: zeniAPI.postAndGetJSON(`${zeniAPI.apiEndPoints.spendManagementMicroServiceBaseUrl}/1.0/reimbursements/transactions`, payload);
|
|
34
34
|
return saveVendorApi.pipe((0, operators_1.mergeMap)((response) => {
|
|
35
35
|
var _a, _b, _c;
|
|
36
36
|
if ((0, responsePayload_1.isSuccessResponse)(response) &&
|
package/lib/view/spendManagement/reimbursement/reimbursementConfig/fetchReimbursementConfigEpic.js
CHANGED
|
@@ -8,7 +8,7 @@ const responsePayload_1 = require("../../../../responsePayload");
|
|
|
8
8
|
const currencyReducer_1 = require("../../../../entity/currency/currencyReducer");
|
|
9
9
|
const fetchReimbursementConfigEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(reimbursementConfigReducer_1.fetchReimbursementConfig.match), (0, operators_1.mergeMap)(() => {
|
|
10
10
|
return zeniAPI
|
|
11
|
-
.getJSON(`${zeniAPI.apiEndPoints.
|
|
11
|
+
.getJSON(`${zeniAPI.apiEndPoints.spendManagementMicroServiceBaseUrl}/1.0/reimbursements/config`)
|
|
12
12
|
.pipe((0, operators_1.mergeMap)((response) => {
|
|
13
13
|
if ((0, responsePayload_1.isSuccessResponse)(response) && response.data != null) {
|
|
14
14
|
const updateActions = [];
|
package/lib/view/spendManagement/reimbursement/remiDetailView/epics/approveOrRejectRemiEpic.js
CHANGED
|
@@ -16,7 +16,7 @@ const approveOrRejectRemiEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0
|
|
|
16
16
|
description,
|
|
17
17
|
};
|
|
18
18
|
return zeniAPI
|
|
19
|
-
.putAndGetJSON(`${zeniAPI.apiEndPoints.
|
|
19
|
+
.putAndGetJSON(`${zeniAPI.apiEndPoints.spendManagementMicroServiceBaseUrl}/1.0/reimbursements/transactions/${reimbursementId}/approval-status`, payload)
|
|
20
20
|
.pipe((0, operators_1.mergeMap)((response) => {
|
|
21
21
|
var _a, _b;
|
|
22
22
|
if ((0, responsePayload_1.isSuccessResponse)(response) && response.data != null) {
|
package/lib/view/spendManagement/reimbursement/remiDetailView/epics/cancelAndDeleteRemiEpic.js
CHANGED
|
@@ -16,7 +16,7 @@ const cancelAndDeleteRemiEpic = (actions$, state$, zeniAPI) => actions$.pipe((0,
|
|
|
16
16
|
const { reimbursementState } = state$.value;
|
|
17
17
|
const transaction = reimbursementState.reimbursementById[action.payload.reimbursementId];
|
|
18
18
|
return zeniAPI
|
|
19
|
-
.putAndGetJSON(`${zeniAPI.apiEndPoints.
|
|
19
|
+
.putAndGetJSON(`${zeniAPI.apiEndPoints.spendManagementMicroServiceBaseUrl}/1.0/reimbursements/transactions/${action.payload.reimbursementId}/cancel-payment`, query)
|
|
20
20
|
.pipe((0, operators_1.mergeMap)((response) => {
|
|
21
21
|
var _a, _b;
|
|
22
22
|
if (action.payload.isDeleteRemi === true &&
|
|
@@ -16,7 +16,7 @@ const deleteRemiEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, operator
|
|
|
16
16
|
const { reimbursementState } = state$.value;
|
|
17
17
|
const transaction = reimbursementState.reimbursementById[action.payload.reimbursementId];
|
|
18
18
|
return zeniAPI
|
|
19
|
-
.deleteAndGetJSON(`${zeniAPI.apiEndPoints.
|
|
19
|
+
.deleteAndGetJSON(`${zeniAPI.apiEndPoints.spendManagementMicroServiceBaseUrl}/1.0/reimbursements/transactions/${action.payload.reimbursementId}?query=${encodeURIComponent(JSON.stringify(query))}`)
|
|
20
20
|
.pipe((0, operators_1.mergeMap)((response) => {
|
|
21
21
|
if ((0, responsePayload_1.isSuccessStatus)(response)) {
|
|
22
22
|
const actions = [
|
|
@@ -49,7 +49,7 @@ const fetchDuplicateReimbursementEpic = (actions$, state$, zeniAPI) => actions$.
|
|
|
49
49
|
lines: lines.map(reimbursementPayload_1.toReimbursementLinePayload),
|
|
50
50
|
};
|
|
51
51
|
return zeniAPI
|
|
52
|
-
.postAndGetJSON(`${zeniAPI.apiEndPoints.
|
|
52
|
+
.postAndGetJSON(`${zeniAPI.apiEndPoints.spendManagementMicroServiceBaseUrl}/1.0/reimbursements/transactions/duplicates`, payload)
|
|
53
53
|
.pipe((0, operators_1.mergeMap)((response) => {
|
|
54
54
|
if ((0, responsePayload_1.isSuccessResponse)(response) && response.data != null) {
|
|
55
55
|
const updateActions = [];
|
|
@@ -44,7 +44,7 @@ const fetchRemiDetailEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, ope
|
|
|
44
44
|
is_include_deleted: isShowDeletedReimbursementEnabled,
|
|
45
45
|
};
|
|
46
46
|
const getTransactionDetail$ = zeniAPI
|
|
47
|
-
.getJSON(`${zeniAPI.apiEndPoints.
|
|
47
|
+
.getJSON(`${zeniAPI.apiEndPoints.spendManagementMicroServiceBaseUrl}/1.0/reimbursements/transactions/${reimbursementId}?query=${encodeURIComponent(JSON.stringify(query))}`)
|
|
48
48
|
.pipe((0, operators_1.mergeMap)((response) => {
|
|
49
49
|
var _a, _b, _c, _d;
|
|
50
50
|
if ((0, responsePayload_1.isSuccessResponse)(response) &&
|
|
@@ -28,7 +28,7 @@ const fetchRemiListPerTabEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0
|
|
|
28
28
|
is_include_line_items: isIncludeLineItems ? tab !== 'draft' : false,
|
|
29
29
|
};
|
|
30
30
|
return zeniAPI
|
|
31
|
-
.getJSON(`${zeniAPI.apiEndPoints.
|
|
31
|
+
.getJSON(`${zeniAPI.apiEndPoints.spendManagementMicroServiceBaseUrl}/1.0/reimbursements/transactions?query=${encodeURIComponent(JSON.stringify(queryParam))}`)
|
|
32
32
|
.pipe((0, operators_1.mergeMap)((response) => {
|
|
33
33
|
var _a;
|
|
34
34
|
if ((0, responsePayload_1.isSuccessResponse)(response) && response.data != null) {
|
package/lib/zeniAPI.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ export interface RESTAPIEndpoints {
|
|
|
7
7
|
readonly noAuthMicroServiceBaseUrl: string;
|
|
8
8
|
readonly tenantMicroServiceBaseUrl: string;
|
|
9
9
|
readonly accountMicroServiceBaseUrl: string;
|
|
10
|
+
readonly spendManagementMicroServiceBaseUrl: string;
|
|
10
11
|
readonly insightsMicroServiceBaseUrl: string;
|
|
11
12
|
readonly searchMicroServiceBaseUrl: string;
|
|
12
13
|
readonly payMicroServiceBaseUrl: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeniai/client-epic-state",
|
|
3
|
-
"version": "4.11.
|
|
3
|
+
"version": "4.11.95",
|
|
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
|
"types": "lib/index.d.ts",
|