@zeniai/client-epic-state 5.1.84-beta3ND → 5.1.84-beta4ND

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.
@@ -227,6 +227,9 @@ interface CompanyFeaturesActivationInfoPayload {
227
227
  is_reimbursement_feature_enabled: boolean;
228
228
  is_same_day_ach_enabled: boolean;
229
229
  is_book_keeping_enabled?: boolean;
230
+ is_cfo_enabled?: boolean;
231
+ is_payroll_enabled?: boolean;
232
+ is_tax_enabled?: boolean;
230
233
  }
231
234
  export declare const toCompanyTreasuryInfo: (payload: CompanyTreasuryInfoDataPayload) => CompanyTreasuryInfo;
232
235
  export declare const toOnboardingInfo: (onboardingInfoPayload?: OnboardingInfoPayload) => OnboardingInfo | undefined;
@@ -126,7 +126,10 @@ const toCompanyQuestionarie = (payload, currencyCode, currencySymbol) => ({
126
126
  const toCompanyFeaturesActivationInfo = (payload) => ({
127
127
  isBillPayFeatureEnabled: payload.is_bill_pay_feature_enabled,
128
128
  isBookkeepingEnabled: payload.is_book_keeping_enabled,
129
+ isCfoEnabled: payload.is_cfo_enabled,
130
+ isPayrollEnabled: payload.is_payroll_enabled,
129
131
  isReimbursementFeatureEnabled: payload.is_reimbursement_feature_enabled,
132
+ isTaxEnabled: payload.is_tax_enabled,
130
133
  connectedAccountProvider: payload.connected_account_provider,
131
134
  isFeatureVendorListingEnabled: payload.is_feature_vendor_listing_enabled,
132
135
  isSameDayAchFeatureEnabled: payload.is_same_day_ach_enabled,
@@ -272,6 +272,9 @@ export interface CompanyFeaturesActivationInfo {
272
272
  isReimbursementFeatureEnabled: boolean;
273
273
  isSameDayAchFeatureEnabled: boolean;
274
274
  isBookkeepingEnabled?: boolean;
275
+ isCfoEnabled?: boolean;
276
+ isPayrollEnabled?: boolean;
277
+ isTaxEnabled?: boolean;
275
278
  }
276
279
  export interface CompanyOnboardingAiActivationInfo {
277
280
  isOnboardingAiActivationViewed: boolean;
@@ -123,7 +123,10 @@ const toCompanyQuestionarie = (payload, currencyCode, currencySymbol) => ({
123
123
  const toCompanyFeaturesActivationInfo = (payload) => ({
124
124
  isBillPayFeatureEnabled: payload.is_bill_pay_feature_enabled,
125
125
  isBookkeepingEnabled: payload.is_book_keeping_enabled,
126
+ isCfoEnabled: payload.is_cfo_enabled,
127
+ isPayrollEnabled: payload.is_payroll_enabled,
126
128
  isReimbursementFeatureEnabled: payload.is_reimbursement_feature_enabled,
129
+ isTaxEnabled: payload.is_tax_enabled,
127
130
  connectedAccountProvider: payload.connected_account_provider,
128
131
  isFeatureVendorListingEnabled: payload.is_feature_vendor_listing_enabled,
129
132
  isSameDayAchFeatureEnabled: payload.is_same_day_ach_enabled,
@@ -122,6 +122,29 @@ const getCategoryValueForCompany = (key, company) => {
122
122
  if (key === 'annualRecurringRevenue' || key === 'monthlyRecurringRevenue') {
123
123
  return company.primarySubscription?.summary.summary[key].amount.toString();
124
124
  }
125
+ if (key === 'productVerticals') {
126
+ const featuresActivationInfo = company.company.company.featuresActivationInfo;
127
+ const enabledVerticals = [];
128
+ if (featuresActivationInfo?.isBookkeepingEnabled === true) {
129
+ enabledVerticals.push('bookkeeping');
130
+ }
131
+ if (featuresActivationInfo?.isBillPayFeatureEnabled === true) {
132
+ enabledVerticals.push('billPay');
133
+ }
134
+ if (featuresActivationInfo?.isReimbursementFeatureEnabled === true) {
135
+ enabledVerticals.push('reimbursement');
136
+ }
137
+ if (featuresActivationInfo?.isTaxEnabled === true) {
138
+ enabledVerticals.push('tax');
139
+ }
140
+ if (featuresActivationInfo?.isPayrollEnabled === true) {
141
+ enabledVerticals.push('payroll');
142
+ }
143
+ if (featuresActivationInfo?.isCfoEnabled === true) {
144
+ enabledVerticals.push('cfo');
145
+ }
146
+ return enabledVerticals;
147
+ }
125
148
  return company.company.company.managementInfo[key];
126
149
  };
127
150
  const applyAdvancedFiltersOnCompaniesList = (allCompanies, filters, filteredCompanies = [], index = 0) => {
@@ -131,6 +131,29 @@ const getCategoryValueForCompany = (key, company) => {
131
131
  if (key === 'annualRecurringRevenue' || key === 'monthlyRecurringRevenue') {
132
132
  return company.primarySubscription?.summary.summary[key].amount.toString();
133
133
  }
134
+ if (key === 'productVerticals') {
135
+ const featuresActivationInfo = company.company.company.featuresActivationInfo;
136
+ const enabledVerticals = [];
137
+ if (featuresActivationInfo?.isBookkeepingEnabled === true) {
138
+ enabledVerticals.push('bookkeeping');
139
+ }
140
+ if (featuresActivationInfo?.isBillPayFeatureEnabled === true) {
141
+ enabledVerticals.push('billPay');
142
+ }
143
+ if (featuresActivationInfo?.isReimbursementFeatureEnabled === true) {
144
+ enabledVerticals.push('reimbursement');
145
+ }
146
+ if (featuresActivationInfo?.isTaxEnabled === true) {
147
+ enabledVerticals.push('tax');
148
+ }
149
+ if (featuresActivationInfo?.isPayrollEnabled === true) {
150
+ enabledVerticals.push('payroll');
151
+ }
152
+ if (featuresActivationInfo?.isCfoEnabled === true) {
153
+ enabledVerticals.push('cfo');
154
+ }
155
+ return enabledVerticals;
156
+ }
134
157
  return company.company.company.managementInfo[key];
135
158
  };
136
159
  const applyAdvancedFiltersOnCompaniesList = (allCompanies, filters, filteredCompanies = [], index = 0) => {
@@ -14,7 +14,7 @@ export type OnboardingViewSortKey = ReturnType<typeof toOnboardingSortKeyType>;
14
14
  export type HealthViewSortKey = ReturnType<typeof toHealthSortKeyType>;
15
15
  export type TaskManagerViewSortKey = ReturnType<typeof toTaskManagerSortKeyType>;
16
16
  export type AiAccountantFilterCategoryField = 'enrollmentStatus';
17
- export type ManagementViewFilterCategoryField = 'controllerUserIds' | 'customerSuccessManagerUserIds' | 'preparerUserIds' | 'reviewerUserIds' | 'apAnalystUserIds' | 'taxLeadUserIds' | 'companyGroupId' | 'taxStatusCode' | 'statusCode' | 'plans' | 'annualRecurringRevenue' | 'monthlyRecurringRevenue' | 'customerSatisfaction' | 'zeniSatisfaction';
17
+ export type ManagementViewFilterCategoryField = 'controllerUserIds' | 'customerSuccessManagerUserIds' | 'preparerUserIds' | 'reviewerUserIds' | 'apAnalystUserIds' | 'taxLeadUserIds' | 'companyGroupId' | 'taxStatusCode' | 'statusCode' | 'plans' | 'productVerticals' | 'annualRecurringRevenue' | 'monthlyRecurringRevenue' | 'customerSatisfaction' | 'zeniSatisfaction';
18
18
  export type SubscriptionViewFilterCategoryField = 'controllerUserIds' | 'statusCode' | 'recommendedActionCode' | 'subscriptionPlans' | 'subscriptionAddOns' | 'avg2MonthExpenses' | 'slabLowerLimit' | 'slabUpperLimit' | 'monthlyRecurringRevenue';
19
19
  export type PortfolioViewFilterCategoryField = 'netBurnOrIncome' | 'cashPosition' | 'income' | 'expenses' | 'runway';
20
20
  export type HealthMonitorViewFilterCategoryField = 'verticalProductServices' | 'runway' | 'netPromoterScore' | 'customerSatisfactionScore' | 'churnProbabilityPercentage' | 'controller' | 'customerSuccessManager' | 'lastReportSent' | 'subscriptionStartDate' | 'subscriptionRenewalDate' | 'externalProductServiceExposure' | 'companyEngagementMetricsUpdatedAt' | 'companyGroupId' | 'monthlyRecurringRevenue';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zeniai/client-epic-state",
3
- "version": "5.1.84-beta3ND",
3
+ "version": "5.1.84-beta4ND",
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",