@zeniai/client-epic-state 5.1.35-betaAK1 → 5.1.35-betaAK3
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/expenseAutomationView/selectors/reconciliationViewSelector.js +1 -2
- package/lib/esm/view/invoicing/dunningAction/dunningActionEpic.js +1 -1
- package/lib/esm/view/invoicing/invoiceAction/invoiceActionEpic.js +1 -1
- package/lib/esm/view/invoicing/paymentAction/paymentActionEpic.js +1 -1
- package/lib/esm/view/invoicing/subscriptionAction/subscriptionActionEpic.js +1 -1
- package/lib/esm/view/transactionDetail/epics/updateTransactionDetailEpic.js +1 -1
- package/lib/view/expenseAutomationView/epics/accountRecon/reparseStatementEpic.d.ts +1 -1
- package/lib/view/expenseAutomationView/selectors/reconciliationViewSelector.js +1 -2
- package/lib/view/invoicing/dunningAction/dunningActionEpic.js +1 -1
- package/lib/view/invoicing/dunningAction/dunningActionRequestPayload.d.ts +8 -8
- package/lib/view/invoicing/invoiceAction/invoiceActionEpic.js +1 -1
- package/lib/view/invoicing/invoiceAction/invoiceActionRequestPayload.d.ts +16 -16
- package/lib/view/invoicing/paymentAction/paymentActionEpic.js +1 -1
- package/lib/view/invoicing/paymentAction/paymentActionRequestPayload.d.ts +2 -2
- package/lib/view/invoicing/subscriptionAction/subscriptionActionEpic.js +1 -1
- package/lib/view/invoicing/subscriptionAction/subscriptionActionRequestPayload.d.ts +14 -14
- package/lib/view/transactionDetail/epics/updateTransactionDetailEpic.js +1 -1
- package/package.json +1 -1
|
@@ -451,8 +451,7 @@ export const getExpenseAutomationReconciliationView = createSelector((state) =>
|
|
|
451
451
|
summary: summaryWithTimeSaved,
|
|
452
452
|
};
|
|
453
453
|
});
|
|
454
|
-
export const getReparseStatementStatusByAccountId = (state, accountId) => getExpenseAutomationReconciliationView(state)
|
|
455
|
-
.accountReconciliationsByAccountID[accountId]?.reparseStatementStatus;
|
|
454
|
+
export const getReparseStatementStatusByAccountId = (state, accountId) => getExpenseAutomationReconciliationView(state).accountReconciliationsByAccountID[accountId]?.reparseStatementStatus;
|
|
456
455
|
export const isAccountReconReport = (reportId) => {
|
|
457
456
|
return reportId.endsWith('reconciliation');
|
|
458
457
|
};
|
|
@@ -7,7 +7,7 @@ export const runInvoicingDunningActionEpic = (actions$, _state$, zeniAPI) => act
|
|
|
7
7
|
const { action: kind, body, id } = action.payload;
|
|
8
8
|
const apiUrl = `${zeniAPI.apiEndPoints.invoicingMicroServiceBaseUrl}/1.0/dunning/${encodeURIComponent(id)}/${kind}`;
|
|
9
9
|
return zeniAPI
|
|
10
|
-
.postAndGetJSON(apiUrl,
|
|
10
|
+
.postAndGetJSON(apiUrl, body ?? {})
|
|
11
11
|
.pipe(mergeMap((response) => {
|
|
12
12
|
if (isSuccessResponse(response) && response.data != null) {
|
|
13
13
|
return [
|
|
@@ -7,7 +7,7 @@ export const runInvoicingInvoiceActionEpic = (actions$, _state$, zeniAPI) => act
|
|
|
7
7
|
const { action: kind, body, invoiceId } = action.payload;
|
|
8
8
|
const apiUrl = `${zeniAPI.apiEndPoints.invoicingMicroServiceBaseUrl}/1.0/invoices/${encodeURIComponent(invoiceId)}/${kind}`;
|
|
9
9
|
return zeniAPI
|
|
10
|
-
.postAndGetJSON(apiUrl,
|
|
10
|
+
.postAndGetJSON(apiUrl, body ?? {})
|
|
11
11
|
.pipe(mergeMap((response) => {
|
|
12
12
|
if (isSuccessResponse(response) && response.data != null) {
|
|
13
13
|
return [
|
|
@@ -7,7 +7,7 @@ export const runInvoicingPaymentActionEpic = (actions$, _state$, zeniAPI) => act
|
|
|
7
7
|
const { action: kind, body, id } = action.payload;
|
|
8
8
|
const apiUrl = `${zeniAPI.apiEndPoints.invoicingMicroServiceBaseUrl}/1.0/payments/${encodeURIComponent(id)}/${kind}`;
|
|
9
9
|
return zeniAPI
|
|
10
|
-
.postAndGetJSON(apiUrl,
|
|
10
|
+
.postAndGetJSON(apiUrl, body ?? {})
|
|
11
11
|
.pipe(mergeMap((response) => {
|
|
12
12
|
if (isSuccessResponse(response) && response.data != null) {
|
|
13
13
|
return [
|
|
@@ -7,7 +7,7 @@ export const runInvoicingSubscriptionActionEpic = (actions$, _state$, zeniAPI) =
|
|
|
7
7
|
const { action: kind, body, id } = action.payload;
|
|
8
8
|
const apiUrl = `${zeniAPI.apiEndPoints.invoicingMicroServiceBaseUrl}/1.0/subscriptions/${encodeURIComponent(id)}/${kind}`;
|
|
9
9
|
return zeniAPI
|
|
10
|
-
.postAndGetJSON(apiUrl,
|
|
10
|
+
.postAndGetJSON(apiUrl, body ?? {})
|
|
11
11
|
.pipe(mergeMap((response) => {
|
|
12
12
|
if (isSuccessResponse(response) && response.data != null) {
|
|
13
13
|
return [
|
|
@@ -3,7 +3,6 @@ import { from, of } from 'rxjs';
|
|
|
3
3
|
import { catchError, filter, mergeMap } from 'rxjs/operators';
|
|
4
4
|
import { toRecommendationPayload } from '../../../commonPayloadTypes/recommendationPayload';
|
|
5
5
|
import { openSnackbar } from '../../../entity/snackbar/snackbarReducer';
|
|
6
|
-
import { getIsAccountingClassesEnabled, getIsAccountingProjectsEnabled, } from '../../../entity/tenant/tenantSelector';
|
|
7
6
|
import { toCustomerTransactionPayload } from '../../../entity/transaction/payloadTypes/customerTransactionPayload';
|
|
8
7
|
import { toTransferTransactionPayload } from '../../../entity/transaction/payloadTypes/otherTransactionPayload';
|
|
9
8
|
import { toTransactionID } from '../../../entity/transaction/payloadTypes/transactionIDPayload';
|
|
@@ -20,6 +19,7 @@ import { getSupportedTransactionById } from '../../../entity/transaction/transac
|
|
|
20
19
|
import { updateVendors } from '../../../entity/vendor/vendorReducer';
|
|
21
20
|
import { getVendorByVendorId } from '../../../entity/vendor/vendorSelector';
|
|
22
21
|
import { createZeniAPIStatus, isActionNotAllowed, isSuccessResponse, } from '../../../responsePayload';
|
|
22
|
+
import { getIsAccountingClassesEnabled, getIsAccountingProjectsEnabled, } from '../../../entity/tenant/tenantSelector';
|
|
23
23
|
import { getUncategorizedAccounts } from '../../accountList/accountListSelector';
|
|
24
24
|
import { getPendingReviewLineIdsFromTransaction } from '../../expenseAutomationView/helpers/transactionCategorizationLocalDataHelper';
|
|
25
25
|
import { syncTransactionCategorizationFromDetailSave } from '../../expenseAutomationView/reducers/transactionsViewReducer';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ActionsObservable, StateObservable } from 'redux-observable';
|
|
2
|
-
import { updateAccountReconReparseStatement } from '../../../../entity/accountRecon/accountReconReducer';
|
|
3
2
|
import { RootState } from '../../../../reducer';
|
|
3
|
+
import { updateAccountReconReparseStatement } from '../../../../entity/accountRecon/accountReconReducer';
|
|
4
4
|
import { ZeniAPI } from '../../../../zeniAPI';
|
|
5
5
|
import { reparseStatement, reparseStatementFailure, reparseStatementSuccess } from '../../reducers/reconciliationViewReducer';
|
|
6
6
|
export type ActionType = ReturnType<typeof reparseStatement> | ReturnType<typeof reparseStatementSuccess> | ReturnType<typeof reparseStatementFailure> | ReturnType<typeof updateAccountReconReparseStatement>;
|
|
@@ -457,8 +457,7 @@ exports.getExpenseAutomationReconciliationView = (0, toolkit_1.createSelector)((
|
|
|
457
457
|
summary: summaryWithTimeSaved,
|
|
458
458
|
};
|
|
459
459
|
});
|
|
460
|
-
const getReparseStatementStatusByAccountId = (state, accountId) => (0, exports.getExpenseAutomationReconciliationView)(state)
|
|
461
|
-
.accountReconciliationsByAccountID[accountId]?.reparseStatementStatus;
|
|
460
|
+
const getReparseStatementStatusByAccountId = (state, accountId) => (0, exports.getExpenseAutomationReconciliationView)(state).accountReconciliationsByAccountID[accountId]?.reparseStatementStatus;
|
|
462
461
|
exports.getReparseStatementStatusByAccountId = getReparseStatementStatusByAccountId;
|
|
463
462
|
const isAccountReconReport = (reportId) => {
|
|
464
463
|
return reportId.endsWith('reconciliation');
|
|
@@ -10,7 +10,7 @@ const runInvoicingDunningActionEpic = (actions$, _state$, zeniAPI) => actions$.p
|
|
|
10
10
|
const { action: kind, body, id } = action.payload;
|
|
11
11
|
const apiUrl = `${zeniAPI.apiEndPoints.invoicingMicroServiceBaseUrl}/1.0/dunning/${encodeURIComponent(id)}/${kind}`;
|
|
12
12
|
return zeniAPI
|
|
13
|
-
.postAndGetJSON(apiUrl,
|
|
13
|
+
.postAndGetJSON(apiUrl, body ?? {})
|
|
14
14
|
.pipe((0, operators_1.mergeMap)((response) => {
|
|
15
15
|
if ((0, responsePayload_1.isSuccessResponse)(response) && response.data != null) {
|
|
16
16
|
return [
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
/** Snake_case request bodies for dunning action endpoints. */
|
|
2
|
-
export
|
|
2
|
+
export type DunningPauseBody = {
|
|
3
3
|
duration?: number;
|
|
4
4
|
reason?: string;
|
|
5
5
|
resume_date?: string;
|
|
6
|
-
}
|
|
7
|
-
export
|
|
6
|
+
};
|
|
7
|
+
export type DunningCollectBody = {
|
|
8
8
|
amount?: number;
|
|
9
9
|
payment_method?: string;
|
|
10
|
-
}
|
|
11
|
-
export
|
|
10
|
+
};
|
|
11
|
+
export type DunningEmailBody = {
|
|
12
12
|
body?: string;
|
|
13
13
|
cc?: string;
|
|
14
14
|
subject?: string;
|
|
15
15
|
to?: string;
|
|
16
|
-
}
|
|
17
|
-
export
|
|
16
|
+
};
|
|
17
|
+
export type DunningBulkEmailBody = {
|
|
18
18
|
body?: string;
|
|
19
19
|
case_ids?: string[];
|
|
20
20
|
cc?: string;
|
|
21
21
|
subject?: string;
|
|
22
22
|
to?: string;
|
|
23
|
-
}
|
|
23
|
+
};
|
|
24
24
|
export type InvoicingDunningActionBody = DunningPauseBody | DunningCollectBody | DunningEmailBody | DunningBulkEmailBody | Record<string, never>;
|
|
@@ -10,7 +10,7 @@ const runInvoicingInvoiceActionEpic = (actions$, _state$, zeniAPI) => actions$.p
|
|
|
10
10
|
const { action: kind, body, invoiceId } = action.payload;
|
|
11
11
|
const apiUrl = `${zeniAPI.apiEndPoints.invoicingMicroServiceBaseUrl}/1.0/invoices/${encodeURIComponent(invoiceId)}/${kind}`;
|
|
12
12
|
return zeniAPI
|
|
13
|
-
.postAndGetJSON(apiUrl,
|
|
13
|
+
.postAndGetJSON(apiUrl, body ?? {})
|
|
14
14
|
.pipe((0, operators_1.mergeMap)((response) => {
|
|
15
15
|
if ((0, responsePayload_1.isSuccessResponse)(response) && response.data != null) {
|
|
16
16
|
return [
|
|
@@ -1,47 +1,47 @@
|
|
|
1
1
|
/** Snake_case request bodies for invoice action endpoints. */
|
|
2
|
-
export
|
|
2
|
+
export type RecordPaymentBody = {
|
|
3
3
|
amount: number;
|
|
4
4
|
date?: string;
|
|
5
5
|
gateway?: string;
|
|
6
6
|
installment_id?: string;
|
|
7
7
|
payment_method?: string;
|
|
8
8
|
reference_number?: string;
|
|
9
|
-
}
|
|
10
|
-
export
|
|
9
|
+
};
|
|
10
|
+
export type WriteOffBody = {
|
|
11
11
|
amount: number;
|
|
12
12
|
reason?: string;
|
|
13
|
-
}
|
|
14
|
-
export
|
|
13
|
+
};
|
|
14
|
+
export type IssueCreditNoteLineItemBody = {
|
|
15
15
|
amount?: number;
|
|
16
16
|
description?: string;
|
|
17
17
|
entity_type?: string;
|
|
18
18
|
id?: string;
|
|
19
19
|
quantity?: number;
|
|
20
20
|
unit_amount?: number;
|
|
21
|
-
}
|
|
22
|
-
export
|
|
21
|
+
};
|
|
22
|
+
export type IssueCreditNoteBody = {
|
|
23
23
|
amount?: number;
|
|
24
24
|
line_items?: IssueCreditNoteLineItemBody[];
|
|
25
25
|
reason_code?: string;
|
|
26
26
|
type?: 'adjustment' | 'refundable' | 'store';
|
|
27
|
-
}
|
|
28
|
-
export
|
|
27
|
+
};
|
|
28
|
+
export type RemovePaymentBody = {
|
|
29
29
|
txn_id: string;
|
|
30
|
-
}
|
|
31
|
-
export
|
|
30
|
+
};
|
|
31
|
+
export type ApplyExcessBody = {
|
|
32
32
|
amount: number;
|
|
33
33
|
target_invoice_id: string;
|
|
34
|
-
}
|
|
35
|
-
export
|
|
34
|
+
};
|
|
35
|
+
export type PaymentInstallmentBody = {
|
|
36
36
|
amount: number;
|
|
37
37
|
due_date: string;
|
|
38
38
|
id?: string;
|
|
39
39
|
seq?: number;
|
|
40
|
-
}
|
|
41
|
-
export
|
|
40
|
+
};
|
|
41
|
+
export type PaymentScheduleBody = {
|
|
42
42
|
installments: PaymentInstallmentBody[];
|
|
43
43
|
interval_count?: number;
|
|
44
44
|
interval_unit?: 'month' | 'year' | 'week' | 'day';
|
|
45
45
|
type?: 'fixed' | 'flexible';
|
|
46
|
-
}
|
|
46
|
+
};
|
|
47
47
|
export type InvoicingInvoiceActionBody = RecordPaymentBody | WriteOffBody | IssueCreditNoteBody | RemovePaymentBody | ApplyExcessBody | PaymentScheduleBody | Record<string, never>;
|
|
@@ -10,7 +10,7 @@ const runInvoicingPaymentActionEpic = (actions$, _state$, zeniAPI) => actions$.p
|
|
|
10
10
|
const { action: kind, body, id } = action.payload;
|
|
11
11
|
const apiUrl = `${zeniAPI.apiEndPoints.invoicingMicroServiceBaseUrl}/1.0/payments/${encodeURIComponent(id)}/${kind}`;
|
|
12
12
|
return zeniAPI
|
|
13
|
-
.postAndGetJSON(apiUrl,
|
|
13
|
+
.postAndGetJSON(apiUrl, body ?? {})
|
|
14
14
|
.pipe((0, operators_1.mergeMap)((response) => {
|
|
15
15
|
if ((0, responsePayload_1.isSuccessResponse)(response) && response.data != null) {
|
|
16
16
|
return [
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/** Snake_case request bodies for payment action endpoints. */
|
|
2
|
-
export
|
|
2
|
+
export type RefundPaymentBody = {
|
|
3
3
|
amount?: number;
|
|
4
4
|
reason?: string;
|
|
5
5
|
refund_method?: string;
|
|
6
|
-
}
|
|
6
|
+
};
|
|
7
7
|
export type InvoicingPaymentActionBody = RefundPaymentBody | Record<string, never>;
|
|
@@ -10,7 +10,7 @@ const runInvoicingSubscriptionActionEpic = (actions$, _state$, zeniAPI) => actio
|
|
|
10
10
|
const { action: kind, body, id } = action.payload;
|
|
11
11
|
const apiUrl = `${zeniAPI.apiEndPoints.invoicingMicroServiceBaseUrl}/1.0/subscriptions/${encodeURIComponent(id)}/${kind}`;
|
|
12
12
|
return zeniAPI
|
|
13
|
-
.postAndGetJSON(apiUrl,
|
|
13
|
+
.postAndGetJSON(apiUrl, body ?? {})
|
|
14
14
|
.pipe((0, operators_1.mergeMap)((response) => {
|
|
15
15
|
if ((0, responsePayload_1.isSuccessResponse)(response) && response.data != null) {
|
|
16
16
|
return [
|
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
/** Snake_case request bodies for subscription action endpoints. */
|
|
2
|
-
export
|
|
2
|
+
export type ApplyCouponBody = {
|
|
3
3
|
coupon_code: string;
|
|
4
|
-
}
|
|
5
|
-
export
|
|
4
|
+
};
|
|
5
|
+
export type SubscriptionChargeItemBody = {
|
|
6
6
|
unit_price: number;
|
|
7
7
|
description?: string;
|
|
8
8
|
item_price_id?: string;
|
|
9
9
|
quantity?: number;
|
|
10
|
-
}
|
|
11
|
-
export
|
|
10
|
+
};
|
|
11
|
+
export type AddChargesBody = {
|
|
12
12
|
charges: SubscriptionChargeItemBody[];
|
|
13
|
-
}
|
|
14
|
-
export
|
|
13
|
+
};
|
|
14
|
+
export type PauseSubscriptionBody = {
|
|
15
15
|
pause_reason?: string;
|
|
16
16
|
resume_date?: string;
|
|
17
|
-
}
|
|
18
|
-
export
|
|
17
|
+
};
|
|
18
|
+
export type CancelSubscriptionBody = {
|
|
19
19
|
cancel_reason?: string;
|
|
20
20
|
cancel_reason_code?: string;
|
|
21
21
|
end_of_term?: boolean;
|
|
22
|
-
}
|
|
23
|
-
export
|
|
22
|
+
};
|
|
23
|
+
export type ChangePlanBody = {
|
|
24
24
|
billing_period?: number;
|
|
25
25
|
billing_period_unit?: 'month' | 'year' | 'week' | 'day';
|
|
26
26
|
item_price_id?: string;
|
|
@@ -33,11 +33,11 @@ export interface ChangePlanBody {
|
|
|
33
33
|
quantity?: number;
|
|
34
34
|
unit_price?: number;
|
|
35
35
|
}[];
|
|
36
|
-
}
|
|
37
|
-
export
|
|
36
|
+
};
|
|
37
|
+
export type ScheduleChargeBody = {
|
|
38
38
|
amount: number;
|
|
39
39
|
charge_date: string;
|
|
40
40
|
description: string;
|
|
41
41
|
payment_method?: string;
|
|
42
|
-
}
|
|
42
|
+
};
|
|
43
43
|
export type InvoicingSubscriptionActionBody = ApplyCouponBody | AddChargesBody | PauseSubscriptionBody | CancelSubscriptionBody | ChangePlanBody | ScheduleChargeBody | Record<string, never>;
|
|
@@ -9,7 +9,6 @@ const rxjs_1 = require("rxjs");
|
|
|
9
9
|
const operators_1 = require("rxjs/operators");
|
|
10
10
|
const recommendationPayload_1 = require("../../../commonPayloadTypes/recommendationPayload");
|
|
11
11
|
const snackbarReducer_1 = require("../../../entity/snackbar/snackbarReducer");
|
|
12
|
-
const tenantSelector_1 = require("../../../entity/tenant/tenantSelector");
|
|
13
12
|
const customerTransactionPayload_1 = require("../../../entity/transaction/payloadTypes/customerTransactionPayload");
|
|
14
13
|
const otherTransactionPayload_1 = require("../../../entity/transaction/payloadTypes/otherTransactionPayload");
|
|
15
14
|
const transactionIDPayload_1 = require("../../../entity/transaction/payloadTypes/transactionIDPayload");
|
|
@@ -26,6 +25,7 @@ const transactionSelector_1 = require("../../../entity/transaction/transactionSe
|
|
|
26
25
|
const vendorReducer_1 = require("../../../entity/vendor/vendorReducer");
|
|
27
26
|
const vendorSelector_1 = require("../../../entity/vendor/vendorSelector");
|
|
28
27
|
const responsePayload_1 = require("../../../responsePayload");
|
|
28
|
+
const tenantSelector_1 = require("../../../entity/tenant/tenantSelector");
|
|
29
29
|
const accountListSelector_1 = require("../../accountList/accountListSelector");
|
|
30
30
|
const transactionCategorizationLocalDataHelper_1 = require("../../expenseAutomationView/helpers/transactionCategorizationLocalDataHelper");
|
|
31
31
|
const transactionsViewReducer_1 = require("../../expenseAutomationView/reducers/transactionsViewReducer");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeniai/client-epic-state",
|
|
3
|
-
"version": "5.1.35-
|
|
3
|
+
"version": "5.1.35-betaAK3",
|
|
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",
|