@zeniai/client-epic-state 4.19.77-betaAS2 → 4.19.77-betaML1

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.
Files changed (57) hide show
  1. package/lib/entity/company/companyPayload.d.ts +0 -1
  2. package/lib/entity/company/companyPayload.js +0 -1
  3. package/lib/entity/company/companyStateTypes.d.ts +0 -1
  4. package/lib/entity/snackbar/snackbarTypes.d.ts +1 -1
  5. package/lib/entity/snackbar/snackbarTypes.js +1 -0
  6. package/lib/epic.d.ts +2 -1
  7. package/lib/epic.js +2 -1
  8. package/lib/esm/entity/company/companyPayload.js +0 -1
  9. package/lib/esm/entity/snackbar/snackbarTypes.js +1 -0
  10. package/lib/esm/epic.js +2 -1
  11. package/lib/esm/index.js +4 -6
  12. package/lib/esm/view/accountList/accountListReducer.js +3 -1
  13. package/lib/esm/view/accountList/accountListSelector.js +8 -0
  14. package/lib/esm/view/accountList/fetchAccountListEpic.js +20 -10
  15. package/lib/esm/view/companyView/epic/companyPassport/updateCompanyDetailsEpic.js +0 -3
  16. package/lib/esm/view/companyView/types/companyPassport/companyPassportLocalData.js +0 -1
  17. package/lib/esm/view/expenseAutomationView/epics/transactionCategorization/convertTransactionTypeEpic.js +78 -0
  18. package/lib/esm/view/expenseAutomationView/epics/transactionCategorization/fetchTransactionCategorizationViewEpic.js +5 -0
  19. package/lib/esm/view/expenseAutomationView/reducers/transactionsViewReducer.js +30 -1
  20. package/lib/esm/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +3 -0
  21. package/lib/esm/view/spendManagement/commonSetup/epic/setup/updateBusinessVerificationDetailsEpic.js +1 -4
  22. package/lib/esm/view/spendManagement/commonSetup/epic/setup/updateSetupViewLocalStoreDataEpic.js +1 -2
  23. package/lib/esm/view/spendManagement/commonSetup/setupViewSelector.js +1 -2
  24. package/lib/esm/view/spendManagement/commonSetup/types/businessVerification.js +1 -141
  25. package/lib/esm/view/transactionDetail/epics/transactionDetailEpic.js +5 -0
  26. package/lib/esm/view/transactionDetail/transactionDetailSelector.js +2 -0
  27. package/lib/index.d.ts +4 -7
  28. package/lib/index.js +35 -37
  29. package/lib/tsconfig.typecheck.tsbuildinfo +1 -0
  30. package/lib/view/accountList/accountListReducer.d.ts +2 -1
  31. package/lib/view/accountList/accountListReducer.js +3 -1
  32. package/lib/view/accountList/accountListSelector.d.ts +6 -1
  33. package/lib/view/accountList/accountListSelector.js +10 -1
  34. package/lib/view/accountList/accountListState.d.ts +1 -1
  35. package/lib/view/accountList/fetchAccountListEpic.js +20 -10
  36. package/lib/view/companyView/epic/companyPassport/updateCompanyDetailsEpic.js +0 -3
  37. package/lib/view/companyView/types/companyPassport/companyDetailsLocalData.d.ts +0 -1
  38. package/lib/view/companyView/types/companyPassport/companyPassportLocalData.js +0 -1
  39. package/lib/view/expenseAutomationView/epics/transactionCategorization/convertTransactionTypeEpic.d.ts +38 -0
  40. package/lib/view/expenseAutomationView/epics/transactionCategorization/convertTransactionTypeEpic.js +82 -0
  41. package/lib/view/expenseAutomationView/epics/transactionCategorization/fetchTransactionCategorizationViewEpic.js +5 -0
  42. package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.d.ts +1 -1
  43. package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.d.ts +17 -1
  44. package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.js +31 -2
  45. package/lib/view/expenseAutomationView/selectorTypes/transactionsViewSelectorTypes.d.ts +10 -1
  46. package/lib/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +3 -0
  47. package/lib/view/spendManagement/commonSetup/epic/setup/updateBusinessVerificationDetailsEpic.js +1 -4
  48. package/lib/view/spendManagement/commonSetup/epic/setup/updateSetupViewLocalStoreDataEpic.js +1 -2
  49. package/lib/view/spendManagement/commonSetup/setupViewSelector.d.ts +0 -1
  50. package/lib/view/spendManagement/commonSetup/setupViewSelector.js +1 -2
  51. package/lib/view/spendManagement/commonSetup/setupViewState.d.ts +0 -1
  52. package/lib/view/spendManagement/commonSetup/types/businessVerification.d.ts +3 -30
  53. package/lib/view/spendManagement/commonSetup/types/businessVerification.js +0 -143
  54. package/lib/view/transactionDetail/epics/transactionDetailEpic.js +5 -0
  55. package/lib/view/transactionDetail/transactionDetailSelector.d.ts +4 -1
  56. package/lib/view/transactionDetail/transactionDetailSelector.js +2 -0
  57. package/package.json +1 -1
@@ -1,145 +1,2 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.COMPANY_ONBOARDING_SUB_INDUSTRY_CODES_BY_INDUSTRY = exports.COMPANY_ONBOARDING_INDUSTRY_TYPE_CODES = exports.COMPANY_PURPOSE_OF_ACCOUNT_CODES = exports.COMPANY_SOURCE_OF_FUNDS_CODES = exports.COMPANY_TRANSACTION_VOLUME_CODES = void 0;
4
- exports.getCompanyOnboardingSubIndustryCodesForIndustry = getCompanyOnboardingSubIndustryCodesForIndustry;
5
- exports.COMPANY_TRANSACTION_VOLUME_CODES = [
6
- 'less_than_10000',
7
- '10000_50000',
8
- '50001_250000',
9
- '250001_1000000',
10
- '1000001_2000000',
11
- 'over_2000000',
12
- ];
13
- exports.COMPANY_SOURCE_OF_FUNDS_CODES = [
14
- 'sales_of_goods',
15
- 'sales_of_services',
16
- 'customer_payments',
17
- 'investment_capital',
18
- 'business_loans',
19
- 'owner_contributions',
20
- 'franchise_revenue',
21
- 'rental_income',
22
- 'government_contracts_grants',
23
- 'donations_fundraising',
24
- 'membership_fees_subscriptions',
25
- 'licensing_royalties',
26
- 'commission_income',
27
- 'import_export_revenue',
28
- 'cryptocurrency_activity',
29
- ];
30
- exports.COMPANY_PURPOSE_OF_ACCOUNT_CODES = [
31
- 'retail_sales',
32
- 'ecommerce_sales',
33
- 'cash_heavy_operations',
34
- 'import_export_trade',
35
- 'professional_services_not_handling_funds',
36
- 'professional_services_handling_funds',
37
- 'holding_investment_company',
38
- 'property_management_real_estate',
39
- 'charitable_nonprofit',
40
- 'construction_contracting',
41
- 'commercial_cash_operations',
42
- 'freight_forwarding_logistics',
43
- 'third_party_payment_processing',
44
- 'technology_startup',
45
- 'wholesale_distribution',
46
- 'franchise_operation',
47
- 'healthcare_provider',
48
- 'educational_institution',
49
- ];
50
- /** Industry type codes for onboarding / business verification (paired with sub-industry). */
51
- exports.COMPANY_ONBOARDING_INDUSTRY_TYPE_CODES = [
52
- 'retail_consumer_goods',
53
- 'financial_services',
54
- 'food_agriculture',
55
- 'healthcare_pharmaceuticals',
56
- 'professional_services',
57
- 'manufacturing_industrial',
58
- 'real_estate_construction',
59
- 'logistics_transportation',
60
- 'wholesale_trade',
61
- 'business_support_services',
62
- 'escort_dating_adult_entertainment',
63
- ];
64
- exports.COMPANY_ONBOARDING_SUB_INDUSTRY_CODES_BY_INDUSTRY = {
65
- retail_consumer_goods: [
66
- 'grocery_stores_supermarkets',
67
- 'convenience_stores',
68
- 'specialty_food_retailers',
69
- 'gas_stations_retail',
70
- 'general_merchandise_department',
71
- 'online_retail_ecommerce',
72
- 'subscription_membership',
73
- 'direct_to_consumer',
74
- 'cannabis',
75
- ],
76
- financial_services: [
77
- 'banks_credit_unions',
78
- 'fintech_payment_processing',
79
- 'insurance_providers',
80
- 'investment_advisors_broker',
81
- 'lending_mortgage',
82
- 'treasury_management',
83
- 'personal_finance_apps',
84
- 'retirement_planning',
85
- 'real_estate_investment',
86
- 'money_service_businesses',
87
- 'cryptocurrency',
88
- 'debt_collection',
89
- 'payday_lending',
90
- 'gambling',
91
- ],
92
- food_agriculture: [
93
- 'farms_agricultural',
94
- 'food_wholesalers_distributors',
95
- 'restaurants_cafes',
96
- 'bars_nightclubs',
97
- 'catering_services',
98
- 'farmers_markets',
99
- 'restaurant_tech_pos',
100
- ],
101
- healthcare_pharmaceuticals: [
102
- 'hospitals_clinics',
103
- 'pharmacies',
104
- 'medical_equipment',
105
- 'biotechnology',
106
- 'home_health',
107
- 'healthcare_staffing',
108
- 'wellness_benefits',
109
- 'healthcare_social_assistance',
110
- ],
111
- professional_services: [
112
- 'legal_services',
113
- 'accounting_auditing',
114
- 'consulting_firms',
115
- 'marketing_advertising',
116
- 'real_estate_agents_property',
117
- 'corporate_services_incorporation',
118
- 'hr_workforce_management',
119
- 'direct_marketing_telemarketing',
120
- 'legal_accounting_consulting_programming',
121
- ],
122
- manufacturing_industrial: [
123
- 'chemical_manufacturing',
124
- 'electronics_hardware',
125
- 'automotive_manufacturing',
126
- 'construction_materials',
127
- 'textiles_apparel',
128
- 'mining',
129
- ],
130
- real_estate_construction: ['real_estate', 'construction'],
131
- logistics_transportation: ['transportation_warehousing'],
132
- wholesale_trade: ['wholesale_trade'],
133
- business_support_services: ['business_support_building'],
134
- escort_dating_adult_entertainment: [
135
- 'escort_services',
136
- 'dating_adult_entertainment',
137
- ],
138
- };
139
- function getCompanyOnboardingSubIndustryCodesForIndustry(industryTypeCode) {
140
- if (industryTypeCode == null || industryTypeCode === '') {
141
- return [];
142
- }
143
- const row = exports.COMPANY_ONBOARDING_SUB_INDUSTRY_CODES_BY_INDUSTRY[industryTypeCode];
144
- return row != null ? [...row] : [];
145
- }
@@ -40,6 +40,11 @@ const fetchTransactionDetailEpic = (actions$, state$, zeniAPI) => actions$.pipe(
40
40
  accountList.fetchState !== 'In-Progress') {
41
41
  transactionActions.push((0, accountListReducer_1.fetchAccountList)('accountList'));
42
42
  }
43
+ const bankAndCreditCardAccounts = state$.value.accountListState.byReportId.bankAndCreditCardAccounts;
44
+ if (bankAndCreditCardAccounts.hasValidState() === false &&
45
+ bankAndCreditCardAccounts.fetchState !== 'In-Progress') {
46
+ transactionActions.push((0, accountListReducer_1.fetchAccountList)('bankAndCreditCardAccounts'));
47
+ }
43
48
  const classList = state$.value.classListState;
44
49
  if (classList.hasValidState() === false &&
45
50
  classList.fetchState !== 'In-Progress') {
@@ -1,7 +1,8 @@
1
1
  import { NestedAccountHierarchyForReport } from '../../commonStateTypes/accountView/nestedAccountID';
2
2
  import { NestedClassHierarchyForReport } from '../../commonStateTypes/classesView/nestedClassID';
3
- import { FetchStateAndError } from '../../commonStateTypes/common';
3
+ import { FetchState, FetchStateAndError } from '../../commonStateTypes/common';
4
4
  import { SelectorView } from '../../commonStateTypes/viewAndReport/viewAndReport';
5
+ import { AccountBase } from '../../entity/account/accountState';
5
6
  import { TransactionID } from '../../entity/transaction/stateTypes/transaction';
6
7
  import { SupportedTransactionWithCOT } from '../../entity/transaction/transactionState';
7
8
  import { Vendor } from '../../entity/vendor/vendorState';
@@ -16,10 +17,12 @@ export interface TransactionDetailReport extends SelectorView {
16
17
  allVendors: Vendor[];
17
18
  classHierarchyList: NestedClassHierarchyForReport[];
18
19
  classList: ClassListSelectorView;
20
+ createTransferEntryStatus: FetchState;
19
21
  deleteStatusByAttachmentName: Record<string, FetchStateAndError>;
20
22
  linkedTransactions: SupportedTransactionWithCOT[];
21
23
  transactionDetailLocalData: TransactionDetailLocalData;
22
24
  transactionDetailUpdateStatus: FetchStateAndError;
25
+ transferAccounts: AccountBase[];
23
26
  isUpdateNotAllowed?: boolean;
24
27
  transaction?: SupportedTransactionWithCOT;
25
28
  }
@@ -83,6 +83,8 @@ const getTransactionDetail = (state, transactionId, fetchLinkedTransactions = tr
83
83
  transactionDetailState_1.initialSupportedTransactionDetail.transactionDetailLocalData,
84
84
  selectedVendor: transactionDetail?.transactionDetailLocalData.vendorUpdates,
85
85
  allVendors: vendors,
86
+ createTransferEntryStatus: 'Not-Started',
87
+ transferAccounts: [],
86
88
  };
87
89
  };
88
90
  exports.getTransactionDetail = getTransactionDetail;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zeniai/client-epic-state",
3
- "version": "4.19.77-betaAS2",
3
+ "version": "4.19.77-betaML1",
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",