@zeniai/client-epic-state 4.9.28 → 4.9.29
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/entity/billPay/billTransaction/billTransactionPayload.d.ts +8 -1
- package/lib/entity/billPay/billTransaction/billTransactionPayload.js +11 -2
- package/lib/entity/billPay/billTransaction/billTransactionState.d.ts +7 -0
- package/lib/entity/billPay/billTransaction/billTransactionState.js +4 -1
- package/lib/entity/reimbursement/reimbursementPayload.d.ts +2 -1
- package/lib/entity/reimbursement/reimbursementPayload.js +1 -0
- package/lib/entity/reimbursement/reimbursementState.d.ts +2 -1
- package/lib/index.d.ts +2 -2
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ID } from '../../../commonStateTypes/common';
|
|
2
2
|
import { VendorTransactionPayload } from '../../transaction/payloadTypes/vendorTransactionPayload';
|
|
3
|
-
import { BillPayInfo, BillStage, BillTransaction, BillAccount, BillPaymentMethod, BillPaymentStatus, BillStatus, FromBillAccount } from './billTransactionState';
|
|
3
|
+
import { BillPayInfo, BillStage, BillTransaction, BillAccount, BillPaymentMethod, BillPaymentStatus, BillStatus, FromBillAccount, DeletionInfo } from './billTransactionState';
|
|
4
4
|
export interface BillTransactionPayload extends VendorTransactionPayload {
|
|
5
5
|
bill_pay_info: BillPayInfoPayload;
|
|
6
6
|
entity_approval_id: ID;
|
|
@@ -13,6 +13,7 @@ export interface BillTransactionPayload extends VendorTransactionPayload {
|
|
|
13
13
|
created_by_user_id?: ID | null;
|
|
14
14
|
total_fee: number;
|
|
15
15
|
is_deleted: boolean;
|
|
16
|
+
deletion_info: DeletionInfoPayload;
|
|
16
17
|
last_updated_by_user_id?: string;
|
|
17
18
|
candidate_vendor_name?: string;
|
|
18
19
|
tax?: number;
|
|
@@ -72,6 +73,11 @@ export interface BillAccountPayload {
|
|
|
72
73
|
account_type: string | null;
|
|
73
74
|
account_holder_type?: string | null;
|
|
74
75
|
}
|
|
76
|
+
export interface DeletionInfoPayload {
|
|
77
|
+
deletion_source: string | null;
|
|
78
|
+
deleted_by_user_id: string | null;
|
|
79
|
+
deleted_by_user_name: string | null;
|
|
80
|
+
}
|
|
75
81
|
export declare const toBillTransaction: (payload: BillTransactionPayload) => BillTransaction;
|
|
76
82
|
export declare const toBillPayInfo: (payload: BillPayInfoPayload) => BillPayInfo;
|
|
77
83
|
export declare const toBillStage: (payload: BillStagePayload) => BillStage;
|
|
@@ -80,3 +86,4 @@ export declare const toBillAccount: (payload: BillAccountPayload) => BillAccount
|
|
|
80
86
|
export declare const toFromBillAccount: (payload: BillAccountPayload) => FromBillAccount;
|
|
81
87
|
export declare const toBillPaymentStatus: (payload: BillPaymentStatusPayload) => BillPaymentStatus;
|
|
82
88
|
export declare const toBillStatus: (payload: BillStatusPayload) => BillStatus;
|
|
89
|
+
export declare const toDeletionInfo: (payload: DeletionInfoPayload) => DeletionInfo;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.toBillStatus = exports.toBillPaymentStatus = exports.toFromBillAccount = exports.toBillAccount = exports.toBillPaymentMethod = exports.toBillStage = exports.toBillPayInfo = exports.toBillTransaction = void 0;
|
|
3
|
+
exports.toDeletionInfo = exports.toBillStatus = exports.toBillPaymentStatus = exports.toFromBillAccount = exports.toBillAccount = exports.toBillPaymentMethod = exports.toBillStage = exports.toBillPayInfo = exports.toBillTransaction = void 0;
|
|
4
4
|
const amount_1 = require("../../../commonStateTypes/amount");
|
|
5
5
|
const zeniDayJS_1 = require("../../../zeniDayJS");
|
|
6
6
|
const vendorTransactionPayload_1 = require("../../transaction/payloadTypes/vendorTransactionPayload");
|
|
@@ -9,7 +9,7 @@ const billTransactionState_1 = require("./billTransactionState");
|
|
|
9
9
|
const billPayConfigPayload_1 = require("../../../view/spendManagement/billPay/billPayConfig/billPayConfigPayload");
|
|
10
10
|
const toBillTransaction = (payload) => {
|
|
11
11
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
12
|
-
return (Object.assign(Object.assign({}, (0, vendorTransactionPayload_1.toVendorTransaction)(payload)), { billPayInfo: (0, exports.toBillPayInfo)(payload.bill_pay_info), classId: (_a = payload.class_id) !== null && _a !== void 0 ? _a : '', className: (_b = payload.class_name) !== null && _b !== void 0 ? _b : '', qboClassId: (_c = payload.qbo_class_id) !== null && _c !== void 0 ? _c : '', transactionReferenceId: (_d = payload.transaction_reference_id) !== null && _d !== void 0 ? _d : '', entityApprovalId: payload.entity_approval_id, updateTime: (0, zeniDayJS_1.date)(payload.update_time), createdBy: (_e = payload.created_by_user_id) !== null && _e !== void 0 ? _e : '', candidateVendorName: (_f = payload.candidate_vendor_name) !== null && _f !== void 0 ? _f : '', bookCloseDate: payload.book_close_date != null ? (0, zeniDayJS_1.date)(payload.book_close_date) : undefined, lastUpdatedByUserId: (_g = payload.last_updated_by_user_id) !== null && _g !== void 0 ? _g : '', paymentProcessingTotalFee: (0, amount_1.toAmount)((_h = payload.total_fee) !== null && _h !== void 0 ? _h : 0, payload.currency_code, payload.currency_symbol), isDeleted: payload.is_deleted, isRecurring: payload.is_recurring, recurringBillConfigId: (_j = payload.recurring_bill_config_id) !== null && _j !== void 0 ? _j : undefined, recurringBillInstance: (_k = payload.recurring_bill_instance) !== null && _k !== void 0 ? _k : undefined }));
|
|
12
|
+
return (Object.assign(Object.assign({}, (0, vendorTransactionPayload_1.toVendorTransaction)(payload)), { billPayInfo: (0, exports.toBillPayInfo)(payload.bill_pay_info), classId: (_a = payload.class_id) !== null && _a !== void 0 ? _a : '', className: (_b = payload.class_name) !== null && _b !== void 0 ? _b : '', qboClassId: (_c = payload.qbo_class_id) !== null && _c !== void 0 ? _c : '', transactionReferenceId: (_d = payload.transaction_reference_id) !== null && _d !== void 0 ? _d : '', entityApprovalId: payload.entity_approval_id, updateTime: (0, zeniDayJS_1.date)(payload.update_time), createdBy: (_e = payload.created_by_user_id) !== null && _e !== void 0 ? _e : '', candidateVendorName: (_f = payload.candidate_vendor_name) !== null && _f !== void 0 ? _f : '', bookCloseDate: payload.book_close_date != null ? (0, zeniDayJS_1.date)(payload.book_close_date) : undefined, lastUpdatedByUserId: (_g = payload.last_updated_by_user_id) !== null && _g !== void 0 ? _g : '', paymentProcessingTotalFee: (0, amount_1.toAmount)((_h = payload.total_fee) !== null && _h !== void 0 ? _h : 0, payload.currency_code, payload.currency_symbol), isDeleted: payload.is_deleted, deletionInfo: (0, exports.toDeletionInfo)(payload.deletion_info), isRecurring: payload.is_recurring, recurringBillConfigId: (_j = payload.recurring_bill_config_id) !== null && _j !== void 0 ? _j : undefined, recurringBillInstance: (_k = payload.recurring_bill_instance) !== null && _k !== void 0 ? _k : undefined }));
|
|
13
13
|
};
|
|
14
14
|
exports.toBillTransaction = toBillTransaction;
|
|
15
15
|
const toBillPayInfo = (payload) => {
|
|
@@ -118,3 +118,12 @@ const toBillStatus = (payload) => ({
|
|
|
118
118
|
description: payload.description,
|
|
119
119
|
});
|
|
120
120
|
exports.toBillStatus = toBillStatus;
|
|
121
|
+
const toDeletionInfo = (payload) => ({
|
|
122
|
+
deletionSource: payload.deletion_source != null
|
|
123
|
+
? (0, billTransactionState_1.toDeletionSourceType)(payload.deletion_source)
|
|
124
|
+
: undefined,
|
|
125
|
+
deletedByUserName: payload.deleted_by_user_name != null
|
|
126
|
+
? payload.deleted_by_user_name
|
|
127
|
+
: undefined,
|
|
128
|
+
});
|
|
129
|
+
exports.toDeletionInfo = toDeletionInfo;
|
|
@@ -18,6 +18,7 @@ export interface BillTransaction extends VendorTransaction {
|
|
|
18
18
|
candidateVendorName: string;
|
|
19
19
|
lastUpdatedByUserId?: ID;
|
|
20
20
|
isDeleted: boolean;
|
|
21
|
+
deletionInfo: DeletionInfo;
|
|
21
22
|
isRecurring: boolean;
|
|
22
23
|
recurringBillConfigId?: ID;
|
|
23
24
|
recurringBillInstance?: number;
|
|
@@ -80,6 +81,10 @@ export interface FromBillAccount extends Omit<BillAccount, 'billAccountType'> {
|
|
|
80
81
|
export interface BillTransactionState {
|
|
81
82
|
transactionById: Record<ID | BillTransactionDetailKey, BillTransaction | undefined>;
|
|
82
83
|
}
|
|
84
|
+
export interface DeletionInfo {
|
|
85
|
+
deletionSource?: DeletionSourceType;
|
|
86
|
+
deletedByUserName?: string;
|
|
87
|
+
}
|
|
83
88
|
export declare const toBillStageCodeType: (v: string) => "paid" | "pending_approval" | "scheduled" | "draft";
|
|
84
89
|
export declare type BillStageCodeType = ReturnType<typeof toBillStageCodeType>;
|
|
85
90
|
export declare const toBillPaymentStatusCodeType: (v: string) => "failed" | "paid" | "returned" | "processing" | "posted" | "cancelled" | "pending_vendor_action";
|
|
@@ -96,3 +101,5 @@ export declare const toBillAccountType: (v: string) => "deposit_account" | "paym
|
|
|
96
101
|
export declare type BillAccountType = ReturnType<typeof toBillAccountType>;
|
|
97
102
|
export declare const toBillAccountHolderType: (v: string) => "vendor" | "customer";
|
|
98
103
|
export declare type BillAccountHolderType = ReturnType<typeof toBillAccountHolderType>;
|
|
104
|
+
export declare const toDeletionSourceType: (v: string) => "zeni_dashboard" | "qbo" | "netsuite";
|
|
105
|
+
export declare type DeletionSourceType = ReturnType<typeof toDeletionSourceType>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.toBillAccountHolderType = exports.toBillAccountType = exports.toBillPaymentStatusDescriptionCodeType = exports.toBillPaymentStatusSummaryCodeType = exports.toBillStatusSummaryCodeType = exports.toBillStatusCodeType = exports.toBillPaymentStatusCodeType = exports.toBillStageCodeType = exports.toInternationalTransferFeeBearerPaymentMethod = void 0;
|
|
3
|
+
exports.toDeletionSourceType = exports.toBillAccountHolderType = exports.toBillAccountType = exports.toBillPaymentStatusDescriptionCodeType = exports.toBillPaymentStatusSummaryCodeType = exports.toBillStatusSummaryCodeType = exports.toBillStatusCodeType = exports.toBillPaymentStatusCodeType = exports.toBillStageCodeType = exports.toInternationalTransferFeeBearerPaymentMethod = void 0;
|
|
4
4
|
const stringToUnion_1 = require("../../../commonStateTypes/stringToUnion");
|
|
5
5
|
const ALL_INTERNATIONAL_TRANSFER_FEE_BEARER_PAYMENT_METHOD = [
|
|
6
6
|
'swift_our',
|
|
@@ -72,3 +72,6 @@ exports.toBillAccountType = toBillAccountType;
|
|
|
72
72
|
const BILL_ACCOUNT_HOLDER_CODE = ['customer', 'vendor'];
|
|
73
73
|
const toBillAccountHolderType = (v) => (0, stringToUnion_1.stringToUnion)(v, BILL_ACCOUNT_HOLDER_CODE);
|
|
74
74
|
exports.toBillAccountHolderType = toBillAccountHolderType;
|
|
75
|
+
const DELETION_SOURCE = ['zeni_dashboard', 'qbo', 'netsuite'];
|
|
76
|
+
const toDeletionSourceType = (v) => (0, stringToUnion_1.stringToUnion)(v, DELETION_SOURCE);
|
|
77
|
+
exports.toDeletionSourceType = toDeletionSourceType;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { URLPayload } from '../../commonPayloadTypes/urlPayload';
|
|
2
2
|
import { AccountBasePayload } from '../account/accountPayload';
|
|
3
|
-
import { BillAccountPayload, BillPaymentMethodPayload, BillPaymentStatusPayload, BillStagePayload, BillStatusPayload } from '../billPay/billTransaction/billTransactionPayload';
|
|
3
|
+
import { BillAccountPayload, BillPaymentMethodPayload, BillPaymentStatusPayload, BillStagePayload, BillStatusPayload, DeletionInfoPayload } from '../billPay/billTransaction/billTransactionPayload';
|
|
4
4
|
import { ClassBasePayload } from '../class/classPayload';
|
|
5
5
|
import { MerchantBasePayload } from '../merchant/merchantPayload';
|
|
6
6
|
import { AttachmentPayload } from '../transaction/payloadTypes/attachmentPayload';
|
|
@@ -17,6 +17,7 @@ export interface ReimbursementPayload {
|
|
|
17
17
|
currency_symbol: string;
|
|
18
18
|
currency_code: string;
|
|
19
19
|
is_deleted: boolean;
|
|
20
|
+
deletion_info: DeletionInfoPayload;
|
|
20
21
|
qbo_id?: string | null;
|
|
21
22
|
due_date: string | null;
|
|
22
23
|
document_id: string | null;
|
|
@@ -27,6 +27,7 @@ const toReimbursement = (payload) => {
|
|
|
27
27
|
reimburseeUserId: payload.reimbursee_user_id,
|
|
28
28
|
amount: (0, amount_1.toAmount)(payload.total_amount, payload.currency_code, payload.currency_symbol),
|
|
29
29
|
isDeleted: payload.is_deleted,
|
|
30
|
+
deletionInfo: (0, billTransactionPayload_1.toDeletionInfo)(payload.deletion_info),
|
|
30
31
|
qboId: (_a = payload.qbo_id) !== null && _a !== void 0 ? _a : '',
|
|
31
32
|
dueDate: payload.due_date != null ? (0, zeniDayJS_1.date)(payload.due_date) : undefined,
|
|
32
33
|
documentId: (_b = payload.document_id) !== null && _b !== void 0 ? _b : '',
|
|
@@ -5,7 +5,7 @@ import { Attachment } from '../transaction/stateTypes/attachment';
|
|
|
5
5
|
import { ZeniUrl as Url } from '../../zeniUrl';
|
|
6
6
|
import { AccountBase } from '../account/accountState';
|
|
7
7
|
import { ClassBase } from '../class/classState';
|
|
8
|
-
import { BillPaymentStatus, BillStage, BillStatus } from '../billPay/billTransaction/billTransactionState';
|
|
8
|
+
import { BillPaymentStatus, BillStage, BillStatus, DeletionInfo } from '../billPay/billTransaction/billTransactionState';
|
|
9
9
|
import { BillPaymentConfigCodeType, BillPaymentSubConfigCodeType } from '../../view/spendManagement/billPay/billPayConfig/billPayConfigState';
|
|
10
10
|
import { ReimbursementTransactionType } from './reimbursementPayload';
|
|
11
11
|
import { MerchantBase } from '../merchant/merchant';
|
|
@@ -19,6 +19,7 @@ export interface Reimbursement {
|
|
|
19
19
|
reimburseeUserId: ID;
|
|
20
20
|
amount: Amount;
|
|
21
21
|
isDeleted: boolean;
|
|
22
|
+
deletionInfo: DeletionInfo;
|
|
22
23
|
qboId: ID;
|
|
23
24
|
dueDate?: ZeniDate;
|
|
24
25
|
documentId: string;
|
package/lib/index.d.ts
CHANGED
|
@@ -361,8 +361,8 @@ export { VendorsTabVendorDetailLocalData };
|
|
|
361
361
|
import { createBankAccount, deleteBankAccount, updateBankAccountViewLocalStoreData, updateInternationalBankAccountViewLocalStoreData, clearBankAccountView, fetchBankNameByRouting, fetchBankNameBySwift, fetchBankCountryNameByIban, updateStatusForCreateBankAccountFlow, createUserBankAccount, deleteUserBankAccount, resetCreateBankAccountDetails } from './view/bankAccountView/bankAccountViewReducer';
|
|
362
362
|
import { BankNameByRoutingState, BankNameBySwiftState, BankAccountContext, CreateBankAccountDetails, CreateInternationalBankAccountDetails, CreateBankAccountLocalData, CreateInternationalBankAccountLocalData } from './view/bankAccountView/bankAccountViewState';
|
|
363
363
|
export { fetchVendorsList, updateScrollYOffset, VendorDetailLocalData, VendorContactInfo, fetchVendor, saveVendor, removeBankAccountsInVendorView, updateSelectedVendorForCreateFlow, initializeVendorAddress, updateBankAccountViewLocalStoreData, updateInternationalBankAccountViewLocalStoreData, clearBankAccountView, updateStatusForCreateBankAccountFlow, fetchVendorDetails, fetchVendorDetailPageView, fetchBankNameByRouting, fetchBankNameBySwift, fetchBankCountryNameByIban, deleteBankAccount, createBankAccount, resetCreateBankAccountDetails, BankNameByRoutingState, BankNameBySwiftState, BankAccountContext, createUserBankAccount, deleteUserBankAccount, CreateBankAccountDetails, CreateInternationalBankAccountDetails, CreateBankAccountLocalData, CreateInternationalBankAccountLocalData, };
|
|
364
|
-
import { BillTransaction, BillPayInfo, BillStage, BillStageCodeType, BillPaymentStatus, BillPaymentStatusCodeType, BillStatus, InternationalTransferFeeBearerPaymentMethod, BillStatusCodeType } from './entity/billPay/billTransaction/billTransactionState';
|
|
365
|
-
export { BillTransaction, BillPayInfo, BillStage, BillStageCodeType, BillTransactionView, InternationalTransferFeeBearerPaymentMethod, };
|
|
364
|
+
import { BillTransaction, BillPayInfo, BillStage, BillStageCodeType, BillPaymentStatus, BillPaymentStatusCodeType, BillStatus, InternationalTransferFeeBearerPaymentMethod, BillStatusCodeType, DeletionSourceType } from './entity/billPay/billTransaction/billTransactionState';
|
|
365
|
+
export { BillTransaction, BillPayInfo, BillStage, BillStageCodeType, BillTransactionView, InternationalTransferFeeBearerPaymentMethod, DeletionSourceType };
|
|
366
366
|
import { BillsSubTabType, BillTab, SaveBillStageCode, BillListUIState, BillPayViewSortKey, BillPayFilters, BillPayFilterCategory, BillListViewFilterCategoryField, BILL_PAY_FILTER_CATEGORIES } from './view/spendManagement/billPay/billList/billListState';
|
|
367
367
|
import { fetchBillList, fetchBillListPerTab, updateTab, updateSubTab, updateSelectedBillId, updateBillDetailSaveBillCode, updateBillListUIState, updateSearchResult as updateBillListSearchResult, updateFilterResult as updateBillListFilterResult, updateBillListDownloadUIState } from './view/spendManagement/billPay/billList/billListReducer';
|
|
368
368
|
import { getBillList, BillListReport, BillTransactionView } from './view/spendManagement/billPay/billList/billListSelector';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeniai/client-epic-state",
|
|
3
|
-
"version": "4.9.
|
|
3
|
+
"version": "4.9.29",
|
|
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",
|