@zeniai/client-epic-state 4.14.46 → 4.14.47
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/companyHealthMetric/companyHealthMetricPayload.d.ts +11 -0
- package/lib/entity/companyHealthMetric/companyHealthMetricPayload.js +25 -0
- package/lib/entity/companyHealthMetric/companyHealthMetricState.d.ts +11 -0
- package/lib/index.d.ts +3 -3
- package/lib/index.js +3 -3
- package/lib/view/companyHealthMetricView/companyHealthMetricViewSelector.js +3 -1
- package/lib/view/companyView/types/cockpitTypes.d.ts +1 -1
- package/lib/view/companyView/types/cockpitTypes.js +2 -0
- package/package.json +1 -1
|
@@ -9,6 +9,16 @@ interface ChurnProbabilityReasonPayload {
|
|
|
9
9
|
interface CompanyRunwayPayload {
|
|
10
10
|
runway_months: number | null;
|
|
11
11
|
}
|
|
12
|
+
interface LastEngagementPayload {
|
|
13
|
+
type: string;
|
|
14
|
+
date: string;
|
|
15
|
+
subject: string | null;
|
|
16
|
+
to: string[] | null;
|
|
17
|
+
from: string | null;
|
|
18
|
+
cc: string[] | null;
|
|
19
|
+
host_name: string | null;
|
|
20
|
+
attendees: string[] | null;
|
|
21
|
+
}
|
|
12
22
|
export interface CompanyHealthMetricPayload {
|
|
13
23
|
company_id: string;
|
|
14
24
|
runway: CompanyRunwayPayload;
|
|
@@ -29,6 +39,7 @@ export interface CompanyHealthMetricPayload {
|
|
|
29
39
|
code: string | null;
|
|
30
40
|
name: string | null;
|
|
31
41
|
} | null;
|
|
42
|
+
last_engagements: LastEngagementPayload[];
|
|
32
43
|
}
|
|
33
44
|
export declare const toCompanyHealthMetrics: (payload: CompanyHealthMetricPayload) => CompanyHealthMetric;
|
|
34
45
|
export {};
|
|
@@ -31,9 +31,34 @@ const toCompanyHealthMetrics = (payload) => {
|
|
|
31
31
|
externalProductServiceExposure: payload.external_product_service_exposure != null
|
|
32
32
|
? (0, companyPayload_1.toAllowedValueWithCode)(payload.external_product_service_exposure)
|
|
33
33
|
: undefined,
|
|
34
|
+
lastEngagements: payload.last_engagements != null
|
|
35
|
+
? toLastEngagements(payload.last_engagements)
|
|
36
|
+
: [],
|
|
34
37
|
};
|
|
35
38
|
};
|
|
36
39
|
exports.toCompanyHealthMetrics = toCompanyHealthMetrics;
|
|
40
|
+
const toLastEngagements = (payload) => {
|
|
41
|
+
return payload.map((engagement) => {
|
|
42
|
+
var _a, _b, _c, _d;
|
|
43
|
+
if (engagement.type === 'email') {
|
|
44
|
+
return {
|
|
45
|
+
type: 'email',
|
|
46
|
+
date: (0, zeniDayJS_1.date)(engagement.date),
|
|
47
|
+
subject: (_a = engagement.subject) !== null && _a !== void 0 ? _a : '',
|
|
48
|
+
to: engagement.to != null ? engagement.to.join(', ') : '',
|
|
49
|
+
from: (_b = engagement.from) !== null && _b !== void 0 ? _b : '',
|
|
50
|
+
cc: engagement.cc != null ? engagement.cc.join(', ') : '',
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
return {
|
|
54
|
+
type: 'meeting',
|
|
55
|
+
date: (0, zeniDayJS_1.date)(engagement.date),
|
|
56
|
+
subject: (_c = engagement.subject) !== null && _c !== void 0 ? _c : '',
|
|
57
|
+
hostName: (_d = engagement.host_name) !== null && _d !== void 0 ? _d : '',
|
|
58
|
+
attendees: engagement.attendees != null ? engagement.attendees.join(', ') : '',
|
|
59
|
+
};
|
|
60
|
+
});
|
|
61
|
+
};
|
|
37
62
|
const toCompanyRunway = (payload) => {
|
|
38
63
|
if (payload.runway_months != null) {
|
|
39
64
|
return { runwayMonths: payload.runway_months };
|
|
@@ -25,7 +25,18 @@ export interface CompanyHealthMetric {
|
|
|
25
25
|
customerSatisfactionScore?: number;
|
|
26
26
|
finOpsEngagementFrequency?: AllowedValueWithCode;
|
|
27
27
|
externalProductServiceExposure?: AllowedValueWithCode;
|
|
28
|
+
lastEngagements: LastEngagement[];
|
|
28
29
|
}
|
|
29
30
|
export interface CompanyHealthState {
|
|
30
31
|
companyHealthStateByCompanyId: Record<ID, CompanyHealthMetric>;
|
|
31
32
|
}
|
|
33
|
+
export interface LastEngagement {
|
|
34
|
+
type: string;
|
|
35
|
+
date: ZeniDate;
|
|
36
|
+
subject: string;
|
|
37
|
+
to?: string;
|
|
38
|
+
from?: string;
|
|
39
|
+
cc?: string;
|
|
40
|
+
hostName?: string;
|
|
41
|
+
attendees?: string;
|
|
42
|
+
}
|
package/lib/index.d.ts
CHANGED
|
@@ -58,8 +58,6 @@ import { updateChargeCardTransactionAttachments } from './entity/chargeCardTrans
|
|
|
58
58
|
import { getControllersName, getFirstControllerEmail, getFirstControllerId } from './entity/company/companyHelper';
|
|
59
59
|
import { CompanyWithSchema, ControllerUserDetails, getCompanyByCompanyId, getCompanyInfoForAllCockpitCompaniesInState, getControllersForCompany } from './entity/company/companySelector';
|
|
60
60
|
import { ALL_ACCOUNTING_CONNECTION_CREATION_MODES, AccountingConnectionCreationMode, Company, CompanyBillPayInfo, CompanyConfigInfo, CompanyFeaturesActivationInfo, CompanyIncInfo, CompanyInfo, CompanyLocaleInfo, CompanyManagementInfo, CompanyManagementUserRole, CompanyMileageConfigInfo, CompanyQuestionaire, CompanyReimbursementInfo, CompanyTaxInfo, CompanyZeniAccountInfo, IdentityVerificationStatus, OnboardingIdentityVerficationStatus, OnboardingInfo, OnboardingStepInfo, OnboardingStepsInfo, ParentSubsidiaryInfo, UserReimbursementInfo } from './entity/company/companyStateTypes';
|
|
61
|
-
import { updateCompaniesHealth, updateCompanyHealth } from './entity/companyHealthMetric/companyHealthMetricReducer';
|
|
62
|
-
import { CompanyHealthMetric, CompanyRunway, VerticalProductServices } from './entity/companyHealthMetric/companyHealthMetricState';
|
|
63
61
|
import { Country } from './entity/countryList/countryListState';
|
|
64
62
|
import { CountryWithCurrency } from './entity/currency/currency';
|
|
65
63
|
import { Customer, CustomerBase, defaultCustomerCurrency } from './entity/customer/customerState';
|
|
@@ -206,6 +204,8 @@ import { VendorDetailTabsType, VendorsTabVendorBasic, VendorsTabVendorDetailPage
|
|
|
206
204
|
import { CollapsableStatusKey, VendorsTabVendorDetailLocalData, VendorsTabVendorViewUIState } from './view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewState';
|
|
207
205
|
import { fetchCompanyConfig } from './view/companyConfigView/companyConfigReducer';
|
|
208
206
|
import { getCompanyConfig } from './view/companyConfigView/companyConfigSelector';
|
|
207
|
+
import { updateCompanyHealth, updateCompaniesHealth } from './entity/companyHealthMetric/companyHealthMetricReducer';
|
|
208
|
+
import { CompanyHealthMetric, VerticalProductServices, CompanyRunway, LastEngagement } from './entity/companyHealthMetric/companyHealthMetricState';
|
|
209
209
|
import { CompanyHealthMetricsLocalData, CompanyHealthViewUIState } from './view/companyHealthMetricView/companyHealthMetricView';
|
|
210
210
|
import { clearCompanyHealthMetricView, fetchCompanyHealthMetricView, initializeCompanyHealthMetricViewLocalData, removeSelectedCompanyId, saveCompanyHealthMetricById, updateLocalStore as updateCompanyHealthMetricLocalStore, updateCompanyHealthMetricViewErrorStatus, updateCompanyHealthMetricViewSuccessStatus, updateCompanyHealthViewUIState } from './view/companyHealthMetricView/companyHealthMetricViewReducer';
|
|
211
211
|
import { CompanyDetailWithHealthMetric, CompanyHealthMetricDropDownOption, CompanyHealthMetricViewSelector, ProductServiceKey, ProductServices, companyHealthMetricDropDownOptions, getCompanyHealthMetricView, hasCompanyHealthMetricFormFieldChanged, isCompanyRunwayInfinite } from './view/companyHealthMetricView/companyHealthMetricViewSelector';
|
|
@@ -763,7 +763,7 @@ export { getWiseRedirect, fetchWiseRedirectStatus };
|
|
|
763
763
|
export { getInternationalWireView, InternationalWireSelectorView, DynamicFormField, CreateInternationalWireDetailsLocalData, SupportedAccountType, VendorCurrency, initializeInternationalWireLocalData, updateInternationalWireLocalStoreData, initializeDynamicForm, fetchInternationalWireDynamicForm, createPaymentInstrument, createPaymentInstrumentUpdateStatus, deletePaymentInstrument, clearInternationalWire, };
|
|
764
764
|
export { fetchUserRoleConfig, getUserRoleConfig };
|
|
765
765
|
export { CompanyHealthMetricsLocalData, CompanyHealthViewUIState };
|
|
766
|
-
export { CompanyHealthMetric, CompanyRunway, updateCompaniesHealth, updateCompanyHealth, VerticalProductServices, };
|
|
766
|
+
export { CompanyHealthMetric, CompanyRunway, updateCompaniesHealth, updateCompanyHealth, VerticalProductServices, LastEngagement, };
|
|
767
767
|
export { clearCompanyHealthMetricView, fetchCompanyHealthMetricView, initializeCompanyHealthMetricViewLocalData, removeSelectedCompanyId, saveCompanyHealthMetricById, updateCompanyHealthMetricLocalStore, updateCompanyHealthMetricViewErrorStatus, updateCompanyHealthMetricViewSuccessStatus, updateCompanyHealthViewUIState, };
|
|
768
768
|
export { CardStatusCodeType, updateChargeCardTransactionAttachments, TransactionReceiptsPayload, ProductServices, ProductServiceKey, isCompanyRunwayInfinite, getCompanyHealthMetricView, hasCompanyHealthMetricFormFieldChanged, companyHealthMetricDropDownOptions, CompanyHealthMetricViewSelector, CompanyHealthMetricDropDownOption, CompanyDetailWithHealthMetric, ChargeCardBusinessVerificationDetails, getChargeCardBusinessVerificationDetails, fetchChargeCardList, fetchChargeCardListPage, fetchChargeCardConfig, fetchCreditAccount, getChargeCardListView, getMyPendingActivationChargeCardListView, getMyChargeCardListWithShippingAddress, getCreditAccount, ChargeCardStatementsSelectorView, fetchChargeCardDetailPage, getChargeCardDetailView, ChargeCardTransactionAttachmentView, getChargeCardTransactionAttachmentView, ChargeCardCVVActivateSelectorView, getChargeCardCVVActivateView, fetchChargeCardTransactionList, fetchCashbackDetail, ChargeCard, ChargeCardWithUser, ChargeCardWithUserAndShippingAddress, ChargeCardViewSortKey, ChargeCardRecommendation, toChargeCardSortKeyType, CashbackPeriod, CashbackDetailUIState, CashbackViewSortKey, getCashbackDetail, getZeniDateFromPeriod, CashbackDetailSelectorView, toCreditLimitFrequencyCodeType, ChargeCardListSelectorView, ChargeCardListWithShippingAddressSelectorView, MyPendingActivationChargeCardListSelectorView, ChargeCardDetailSelectorView, IssueChargeCardSelectorView, ActiveChargeCardCount, IssueChargeCardState, getIssueChargeCardView, ChargeCardConfigState, ChargeCardListUIState, ChargeCardTransaction, ChargeCardTransactionStatusCode, ChargeCardTransactionTypeCode, ChargeCardTransactionStatus, ChargeCardDetailUiState, ChargeCardTransactionSortKey, getChargeCardSetupViewDetails, ChargeCardSetupView, fetchChargeCardStatementList, ChargeCardStatement, getChargeCardStatements, fetchChargeCardSetupView, acceptChargeCardTerms, IssueChargeCardLocalData, PhysicalCardData, VirtualCardData, CreditLimitFrequencyCodeType, CardAddressType, toCardAddressType, ShippingAddressType, toShippingAddressType, CardActivationEventCodeType, CreditLimitFrequency, CardCodeType, toCardType, issueChargeCards, fetchIssueCardPage, updateCustomAddressId, updateChargeCardsLocalStore, resetIssueChargeCardForm, updateChargeCardListSearchText, updateChargeCardListUIState, updateCashbackDetailUIState, updateChargeCardDetail, updatePhysicalChargeCardAttempt, CardUserOnboardingLocalData, getCardUserOnboardingView, initializeCardUserOnboardingLocalData, updateCardUserOnboardingLocalData, CardUserOnboardingView, saveCardOnboardingUserDetails, updateChargeCardTransactionUploadReceiptsFetchStatus, updateChargeCardTransactionReceiptsShowTickFetchStatus, updateChargeCardTransactionIsViewReceiptClicked, fetchChargeCardTransactionAttachments, completeCVVActivationWait, startCVVActivationWait, updateChargeCardSpendLimit, updateChargeCardSpendLimitSuccessOrFailure, resendCardInvite, revokeCardInvite, startCardUserOnboardingActivationWait, completeCardUserOnboardingActivationWait, setFirstViewAfterActivation, setFirstViewCompleteAfterActivation, setCurrentDisplayedCardId, anyCardOnHold, };
|
|
769
769
|
export { fetchApAging, getApAgingReport, updateApAgingUIState, AgingReportId, ApAgingReport, AgingBalance, AgingPeriod, AgingReportSortKey, AgingBalancesByVendor, AgingReportUIState, AgingDetailReportUIState, AgingDetailReportInvoice, AgingDateSelectionType, };
|
package/lib/index.js
CHANGED
|
@@ -186,9 +186,6 @@ Object.defineProperty(exports, "getCompanyInfoForAllCockpitCompaniesInState", {
|
|
|
186
186
|
Object.defineProperty(exports, "getControllersForCompany", { enumerable: true, get: function () { return companySelector_1.getControllersForCompany; } });
|
|
187
187
|
const companyStateTypes_1 = require("./entity/company/companyStateTypes");
|
|
188
188
|
Object.defineProperty(exports, "ALL_ACCOUNTING_CONNECTION_CREATION_MODES", { enumerable: true, get: function () { return companyStateTypes_1.ALL_ACCOUNTING_CONNECTION_CREATION_MODES; } });
|
|
189
|
-
const companyHealthMetricReducer_1 = require("./entity/companyHealthMetric/companyHealthMetricReducer");
|
|
190
|
-
Object.defineProperty(exports, "updateCompaniesHealth", { enumerable: true, get: function () { return companyHealthMetricReducer_1.updateCompaniesHealth; } });
|
|
191
|
-
Object.defineProperty(exports, "updateCompanyHealth", { enumerable: true, get: function () { return companyHealthMetricReducer_1.updateCompanyHealth; } });
|
|
192
189
|
const customerState_1 = require("./entity/customer/customerState");
|
|
193
190
|
Object.defineProperty(exports, "defaultCustomerCurrency", { enumerable: true, get: function () { return customerState_1.defaultCustomerCurrency; } });
|
|
194
191
|
const customerIncomeTrend_1 = require("./entity/customerIncome/customerIncomeTrend");
|
|
@@ -543,6 +540,9 @@ const companyConfigReducer_1 = require("./view/companyConfigView/companyConfigRe
|
|
|
543
540
|
Object.defineProperty(exports, "fetchCompanyConfig", { enumerable: true, get: function () { return companyConfigReducer_1.fetchCompanyConfig; } });
|
|
544
541
|
const companyConfigSelector_1 = require("./view/companyConfigView/companyConfigSelector");
|
|
545
542
|
Object.defineProperty(exports, "getCompanyConfig", { enumerable: true, get: function () { return companyConfigSelector_1.getCompanyConfig; } });
|
|
543
|
+
const companyHealthMetricReducer_1 = require("./entity/companyHealthMetric/companyHealthMetricReducer");
|
|
544
|
+
Object.defineProperty(exports, "updateCompanyHealth", { enumerable: true, get: function () { return companyHealthMetricReducer_1.updateCompanyHealth; } });
|
|
545
|
+
Object.defineProperty(exports, "updateCompaniesHealth", { enumerable: true, get: function () { return companyHealthMetricReducer_1.updateCompaniesHealth; } });
|
|
546
546
|
const companyHealthMetricViewReducer_1 = require("./view/companyHealthMetricView/companyHealthMetricViewReducer");
|
|
547
547
|
Object.defineProperty(exports, "clearCompanyHealthMetricView", { enumerable: true, get: function () { return companyHealthMetricViewReducer_1.clearCompanyHealthMetricView; } });
|
|
548
548
|
Object.defineProperty(exports, "fetchCompanyHealthMetricView", { enumerable: true, get: function () { return companyHealthMetricViewReducer_1.fetchCompanyHealthMetricView; } });
|
|
@@ -466,7 +466,7 @@ const sortAndFilterCompanies = (sortKey, sortOrder, filterText, filters, compani
|
|
|
466
466
|
}
|
|
467
467
|
});
|
|
468
468
|
const sortedCompaniesWithSortKeyValue = (0, orderBy_1.default)(companiesWithSortKeyValues, (company) => {
|
|
469
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
469
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
470
470
|
switch (sortKey) {
|
|
471
471
|
case 'productVerticals':
|
|
472
472
|
return company.noOfProductVerticalsEnabled;
|
|
@@ -508,6 +508,8 @@ const sortAndFilterCompanies = (sortKey, sortOrder, filterText, filters, compani
|
|
|
508
508
|
: 0;
|
|
509
509
|
case 'group':
|
|
510
510
|
return (_j = company.managementInfo.companyGroupId) === null || _j === void 0 ? void 0 : _j.toLowerCase();
|
|
511
|
+
case 'lastEngagement':
|
|
512
|
+
return ((_l = (_k = company.companyHealthMetric.lastEngagements[0]) === null || _k === void 0 ? void 0 : _k.date) !== null && _l !== void 0 ? _l : DEFAULT_DATE);
|
|
511
513
|
case 'companyName':
|
|
512
514
|
default:
|
|
513
515
|
return company.companyInfo.name;
|
|
@@ -6,7 +6,7 @@ import { CockpitDownloadTabsID, CockpitTabsFileType } from './cockpitTabsID';
|
|
|
6
6
|
export declare const toPortfolioSortKeyType: (v: string) => "expenses" | "runway" | "companyName" | "cashBalance" | "revenues" | "netIncome";
|
|
7
7
|
export declare const toManagementSortKeyType: (v: string) => "status" | "group" | "bookCloseDate" | "controller" | "preparer" | "reviewer" | "annualRecurringRevenue" | "monthlyRecurringRevenue" | "companyName" | "taxStatus" | "notes" | "plans" | "task" | "customerSuccessManager" | "apAnalyst" | "reportSent" | "taxLead" | "satisfaction";
|
|
8
8
|
export declare const toOnboardingSortKeyType: (v: string) => "companyName" | "notes" | "bankAccountLinked" | "qboLinked" | "identityVerified" | "businessVerified" | "groupCreated" | "customerCreated" | "enroller" | "invite" | "latestCreated";
|
|
9
|
-
export declare const toHealthSortKeyType: (v: string) => "group" | "runway" | "controller" | "monthlyRecurringRevenue" | "companyName" | "
|
|
9
|
+
export declare const toHealthSortKeyType: (v: string) => "group" | "runway" | "controller" | "monthlyRecurringRevenue" | "companyName" | "customerSuccessManager" | "issues" | "externalProductServiceExposure" | "finOpsEngagementFrequency" | "companyEngagementMetricsUpdatedAt" | "productVerticals" | "churnProbability" | "netPromoterScore" | "customerSatisfactionScore" | "lastReportSent" | "subscriptionDate" | "renewalDate" | "dashboardLastSeen" | "lastEngagement";
|
|
10
10
|
export declare const toTaskManagerSortKeyType: (v: string) => "name" | "priority" | "status" | "dueDate" | "tags" | "createdBy" | "taskName" | "assignee";
|
|
11
11
|
export type PortfolioViewSortKey = ReturnType<typeof toPortfolioSortKeyType>;
|
|
12
12
|
export type ManagementViewSortKey = ReturnType<typeof toManagementSortKeyType>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeniai/client-epic-state",
|
|
3
|
-
"version": "4.14.
|
|
3
|
+
"version": "4.14.47",
|
|
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",
|