@zeniai/client-epic-state 4.14.29 → 4.14.30

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.
@@ -9,16 +9,6 @@ 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
- }
22
12
  export interface CompanyHealthMetricPayload {
23
13
  company_id: string;
24
14
  runway: CompanyRunwayPayload;
@@ -39,7 +29,6 @@ export interface CompanyHealthMetricPayload {
39
29
  code: string | null;
40
30
  name: string | null;
41
31
  } | null;
42
- last_engagements: LastEngagementPayload[];
43
32
  }
44
33
  export declare const toCompanyHealthMetrics: (payload: CompanyHealthMetricPayload) => CompanyHealthMetric;
45
34
  export {};
@@ -31,34 +31,9 @@ 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
- : [],
37
34
  };
38
35
  };
39
36
  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
- };
62
37
  const toCompanyRunway = (payload) => {
63
38
  if (payload.runway_months != null) {
64
39
  return { runwayMonths: payload.runway_months };
@@ -25,18 +25,7 @@ export interface CompanyHealthMetric {
25
25
  customerSatisfactionScore?: number;
26
26
  finOpsEngagementFrequency?: AllowedValueWithCode;
27
27
  externalProductServiceExposure?: AllowedValueWithCode;
28
- lastEngagements: LastEngagement[];
29
28
  }
30
29
  export interface CompanyHealthState {
31
30
  companyHealthStateByCompanyId: Record<ID, CompanyHealthMetric>;
32
31
  }
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
@@ -640,8 +640,8 @@ export { CompanyHealthMetricsLocalData, CompanyHealthViewUIState };
640
640
  import { CompanyDetailWithHealthMetric, CompanyHealthMetricDropDownOption, companyHealthMetricDropDownOptions, CompanyHealthMetricViewSelector, getCompanyHealthMetricView, hasCompanyHealthMetricFormFieldChanged, ProductServices, ProductServiceKey, isCompanyRunwayInfinite } from './view/companyHealthMetricView/companyHealthMetricViewSelector';
641
641
  import { clearCompanyHealthMetricView, fetchCompanyHealthMetricView, initializeCompanyHealthMetricViewLocalData, removeSelectedCompanyId, saveCompanyHealthMetricById, updateCompanyHealthMetricViewErrorStatus, updateCompanyHealthMetricViewSuccessStatus, updateCompanyHealthViewUIState, updateLocalStore as updateCompanyHealthMetricLocalStore } from './view/companyHealthMetricView/companyHealthMetricViewReducer';
642
642
  import { updateCompanyHealth, updateCompaniesHealth } from './entity/companyHealthMetric/companyHealthMetricReducer';
643
- import { CompanyHealthMetric, VerticalProductServices, CompanyRunway, LastEngagement } from './entity/companyHealthMetric/companyHealthMetricState';
644
- export { CompanyHealthMetric, CompanyRunway, updateCompaniesHealth, updateCompanyHealth, VerticalProductServices, LastEngagement, };
643
+ import { CompanyHealthMetric, VerticalProductServices, CompanyRunway } from './entity/companyHealthMetric/companyHealthMetricState';
644
+ export { CompanyHealthMetric, CompanyRunway, updateCompaniesHealth, updateCompanyHealth, VerticalProductServices, };
645
645
  export { clearCompanyHealthMetricView, fetchCompanyHealthMetricView, initializeCompanyHealthMetricViewLocalData, removeSelectedCompanyId, saveCompanyHealthMetricById, updateCompanyHealthMetricLocalStore, updateCompanyHealthMetricViewErrorStatus, updateCompanyHealthMetricViewSuccessStatus, updateCompanyHealthViewUIState, };
646
646
  import { ChargeCardViewSortKey, ChargeCardListUIState, toChargeCardSortKeyType } from './view/spendManagement/chargeCards/chargeCardList/chargeCardList';
647
647
  import { ChargeCardListSelectorView, ChargeCardWithUser, ChargeCardWithUserAndShippingAddress, getChargeCardListView, getMyPendingActivationChargeCardListView, getMyChargeCardListWithShippingAddress, getCreditAccount, anyCardOnHold, ChargeCardListWithShippingAddressSelectorView, MyPendingActivationChargeCardListSelectorView } from './view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector';
@@ -462,7 +462,7 @@ const sortAndFilterCompanies = (sortKey, sortOrder, filterText, filters, compani
462
462
  }
463
463
  });
464
464
  const sortedCompaniesWithSortKeyValue = (0, orderBy_1.default)(companiesWithSortKeyValues, (company) => {
465
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
465
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
466
466
  switch (sortKey) {
467
467
  case 'productVerticals':
468
468
  return company.noOfProductVerticalsEnabled;
@@ -504,8 +504,6 @@ const sortAndFilterCompanies = (sortKey, sortOrder, filterText, filters, compani
504
504
  : 0;
505
505
  case 'group':
506
506
  return (_j = company.managementInfo.companyGroupId) === null || _j === void 0 ? void 0 : _j.toLowerCase();
507
- case 'lastEngagement':
508
- return ((_l = (_k = company.companyHealthMetric.lastEngagements[0]) === null || _k === void 0 ? void 0 : _k.date) !== null && _l !== void 0 ? _l : DEFAULT_DATE);
509
507
  case 'companyName':
510
508
  default:
511
509
  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" | "taxStatus" | "controller" | "preparer" | "reviewer" | "annualRecurringRevenue" | "monthlyRecurringRevenue" | "companyName" | "notes" | "plans" | "task" | "customerSuccessManager" | "apAnalyst" | "reportSent" | "taxLead" | "satisfaction";
8
8
  export declare const toOnboardingSortKeyType: (v: string) => "companyName" | "identityVerified" | "businessVerified" | "bankAccountLinked" | "qboLinked" | "groupCreated" | "customerCreated" | "notes" | "enroller" | "invite" | "latestCreated";
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";
9
+ export declare const toHealthSortKeyType: (v: string) => "group" | "runway" | "controller" | "monthlyRecurringRevenue" | "companyName" | "customerSuccessManager" | "issues" | "externalProductServiceExposure" | "finOpsEngagementFrequency" | "companyEngagementMetricsUpdatedAt" | "productVerticals" | "churnProbability" | "netPromoterScore" | "customerSatisfactionScore" | "lastReportSent" | "subscriptionDate" | "renewalDate";
10
10
  export declare const toTaskManagerSortKeyType: (v: string) => "priority" | "name" | "status" | "dueDate" | "tags" | "createdBy" | "taskName" | "assignee";
11
11
  export declare type PortfolioViewSortKey = ReturnType<typeof toPortfolioSortKeyType>;
12
12
  export declare type ManagementViewSortKey = ReturnType<typeof toManagementSortKeyType>;
@@ -61,8 +61,6 @@ const ALL_HEALTH_SORT_KEYS = [
61
61
  'lastReportSent',
62
62
  'subscriptionDate',
63
63
  'renewalDate',
64
- 'dashboardLastSeen',
65
- 'lastEngagement',
66
64
  ];
67
65
  const ALL_TASK_MANAGER_SORT_KEYS = [
68
66
  'name',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zeniai/client-epic-state",
3
- "version": "4.14.29",
3
+ "version": "4.14.30",
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",