@zeniai/client-epic-state 5.2.64 → 5.2.66

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 (26) hide show
  1. package/lib/entity/snackbar/snackbarTypes.d.ts +1 -1
  2. package/lib/entity/snackbar/snackbarTypes.js +1 -0
  3. package/lib/epic.d.ts +3 -2
  4. package/lib/epic.js +3 -1
  5. package/lib/esm/entity/snackbar/snackbarTypes.js +1 -0
  6. package/lib/esm/epic.js +3 -1
  7. package/lib/esm/index.js +2 -2
  8. package/lib/esm/view/invoicing/settingsView/settingsViewSelector.js +18 -9
  9. package/lib/esm/view/invoicing/settingsView/submitInvoicingBrandingFormEpic.js +11 -2
  10. package/lib/esm/view/spendManagement/commonSetup/epic/setup/resetKycKybEpic.js +37 -0
  11. package/lib/esm/view/spendManagement/commonSetup/setupViewReducer.js +21 -1
  12. package/lib/esm/view/spendManagement/commonSetup/setupViewSelector.js +2 -1
  13. package/lib/index.d.ts +2 -2
  14. package/lib/index.js +31 -28
  15. package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.d.ts +1 -1
  16. package/lib/view/invoicing/settingsView/settingsViewSelector.d.ts +12 -3
  17. package/lib/view/invoicing/settingsView/settingsViewSelector.js +17 -8
  18. package/lib/view/invoicing/settingsView/submitInvoicingBrandingFormEpic.js +11 -2
  19. package/lib/view/spendManagement/commonSetup/epic/setup/resetKycKybEpic.d.ts +8 -0
  20. package/lib/view/spendManagement/commonSetup/epic/setup/resetKycKybEpic.js +41 -0
  21. package/lib/view/spendManagement/commonSetup/setupViewReducer.d.ts +1 -1
  22. package/lib/view/spendManagement/commonSetup/setupViewReducer.js +22 -2
  23. package/lib/view/spendManagement/commonSetup/setupViewSelector.d.ts +1 -0
  24. package/lib/view/spendManagement/commonSetup/setupViewSelector.js +2 -1
  25. package/lib/view/spendManagement/commonSetup/setupViewState.d.ts +1 -0
  26. package/package.json +1 -1
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  var _a;
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.clearKycKybAutofillForSetup = exports.applyKybDocumentAutofillForSetup = exports.applyKycDocumentAutofillForSetup = exports.clearSetupViewDataInLocalStore = exports.saveIndustryAndIncDateInLocalStore = exports.verifyOtpFailureSpendManagementSetUp = exports.verifyOtpSuccessSpendManagementSetUp = exports.verifyOtpSpendManagementSetUp = exports.sendOtpFailureSpendManagementSetUp = exports.sendOtpSuccessSpendManagementSetUp = exports.resendOtpSpendManagementSetUp = exports.sendOtpSpendManagementSetUp = exports.saveTreasuryAdditionalDocumentsInLocalStore = exports.saveCompnayOfficerAdditionalDocumentsInLocalStore = exports.saveCompnayOfficerPhoneInLocalStore = exports.saveSetupViewDataInLocalStore = exports.updateSetupViewLocalStoreData = exports.updateSelectedCompanyOfficer = exports.updateBusinessVerificationDetailsFailure = exports.updateBusinessVerificationDetailsSuccess = exports.updateBusinessVerificationDetails = exports.enableSetupFailure = exports.enableSetupSuccess = exports.enableSetup = exports.initialState = void 0;
4
+ exports.clearKycKybAutofillForSetup = exports.applyKybDocumentAutofillForSetup = exports.applyKycDocumentAutofillForSetup = exports.clearSetupViewDataInLocalStore = exports.saveIndustryAndIncDateInLocalStore = exports.verifyOtpFailureSpendManagementSetUp = exports.verifyOtpSuccessSpendManagementSetUp = exports.verifyOtpSpendManagementSetUp = exports.sendOtpFailureSpendManagementSetUp = exports.sendOtpSuccessSpendManagementSetUp = exports.resendOtpSpendManagementSetUp = exports.sendOtpSpendManagementSetUp = exports.saveTreasuryAdditionalDocumentsInLocalStore = exports.saveCompnayOfficerAdditionalDocumentsInLocalStore = exports.saveCompnayOfficerPhoneInLocalStore = exports.saveSetupViewDataInLocalStore = exports.updateSetupViewLocalStoreData = exports.updateSelectedCompanyOfficer = exports.clearKycKybResetStatus = exports.resetKycKybFailure = exports.resetKycKybSuccess = exports.resetKycKyb = exports.updateBusinessVerificationDetailsFailure = exports.updateBusinessVerificationDetailsSuccess = exports.updateBusinessVerificationDetails = exports.enableSetupFailure = exports.enableSetupSuccess = exports.enableSetup = exports.initialState = void 0;
5
5
  const toolkit_1 = require("@reduxjs/toolkit");
6
6
  const rootActions_1 = require("../../../rootActions");
7
7
  const kycKybAutofillActions_1 = require("./kycKybAutofillActions");
@@ -17,6 +17,7 @@ const emptyOfficerSlot = {
17
17
  };
18
18
  exports.initialState = {
19
19
  updateStatus: { fetchState: 'Not-Started', error: undefined },
20
+ kycKybResetStatus: { fetchState: 'Not-Started', error: undefined },
20
21
  parsingDocumentFileIds: [],
21
22
  companyDetails: { autoFilledFields: [] },
22
23
  companyOfficerUpdateStatus: {
@@ -88,6 +89,25 @@ const setupView = (0, toolkit_1.createSlice)({
88
89
  };
89
90
  },
90
91
  },
92
+ resetKycKyb(draft) {
93
+ draft.kycKybResetStatus = { fetchState: 'In-Progress', error: undefined };
94
+ },
95
+ resetKycKybSuccess(draft) {
96
+ draft.kycKybResetStatus = { fetchState: 'Completed', error: undefined };
97
+ },
98
+ resetKycKybFailure: {
99
+ reducer(draft, action) {
100
+ draft.kycKybResetStatus = { fetchState: 'Error', error: action.payload };
101
+ },
102
+ prepare(error) {
103
+ return {
104
+ payload: error,
105
+ };
106
+ },
107
+ },
108
+ clearKycKybResetStatus(draft) {
109
+ draft.kycKybResetStatus = { fetchState: 'Not-Started', error: undefined };
110
+ },
91
111
  updateSelectedCompanyOfficer: {
92
112
  reducer(draft, action) {
93
113
  const { selectedOfficerType } = action.payload;
@@ -363,5 +383,5 @@ const setupView = (0, toolkit_1.createSlice)({
363
383
  });
364
384
  },
365
385
  });
366
- _a = setupView.actions, exports.enableSetup = _a.enableSetup, exports.enableSetupSuccess = _a.enableSetupSuccess, exports.enableSetupFailure = _a.enableSetupFailure, exports.updateBusinessVerificationDetails = _a.updateBusinessVerificationDetails, exports.updateBusinessVerificationDetailsSuccess = _a.updateBusinessVerificationDetailsSuccess, exports.updateBusinessVerificationDetailsFailure = _a.updateBusinessVerificationDetailsFailure, exports.updateSelectedCompanyOfficer = _a.updateSelectedCompanyOfficer, exports.updateSetupViewLocalStoreData = _a.updateSetupViewLocalStoreData, exports.saveSetupViewDataInLocalStore = _a.saveSetupViewDataInLocalStore, exports.saveCompnayOfficerPhoneInLocalStore = _a.saveCompnayOfficerPhoneInLocalStore, exports.saveCompnayOfficerAdditionalDocumentsInLocalStore = _a.saveCompnayOfficerAdditionalDocumentsInLocalStore, exports.saveTreasuryAdditionalDocumentsInLocalStore = _a.saveTreasuryAdditionalDocumentsInLocalStore, exports.sendOtpSpendManagementSetUp = _a.sendOtp, exports.resendOtpSpendManagementSetUp = _a.resendOtp, exports.sendOtpSuccessSpendManagementSetUp = _a.sendOtpSuccess, exports.sendOtpFailureSpendManagementSetUp = _a.sendOtpFailure, exports.verifyOtpSpendManagementSetUp = _a.verifyOtp, exports.verifyOtpSuccessSpendManagementSetUp = _a.verifyOtpSuccess, exports.verifyOtpFailureSpendManagementSetUp = _a.verifyOtpFailure, exports.saveIndustryAndIncDateInLocalStore = _a.saveIndustryAndIncDateInLocalStore, exports.clearSetupViewDataInLocalStore = _a.clearSetupViewDataInLocalStore, exports.applyKycDocumentAutofillForSetup = _a.applyKycDocumentAutofillForSetup, exports.applyKybDocumentAutofillForSetup = _a.applyKybDocumentAutofillForSetup, exports.clearKycKybAutofillForSetup = _a.clearKycKybAutofillForSetup;
386
+ _a = setupView.actions, exports.enableSetup = _a.enableSetup, exports.enableSetupSuccess = _a.enableSetupSuccess, exports.enableSetupFailure = _a.enableSetupFailure, exports.updateBusinessVerificationDetails = _a.updateBusinessVerificationDetails, exports.updateBusinessVerificationDetailsSuccess = _a.updateBusinessVerificationDetailsSuccess, exports.updateBusinessVerificationDetailsFailure = _a.updateBusinessVerificationDetailsFailure, exports.resetKycKyb = _a.resetKycKyb, exports.resetKycKybSuccess = _a.resetKycKybSuccess, exports.resetKycKybFailure = _a.resetKycKybFailure, exports.clearKycKybResetStatus = _a.clearKycKybResetStatus, exports.updateSelectedCompanyOfficer = _a.updateSelectedCompanyOfficer, exports.updateSetupViewLocalStoreData = _a.updateSetupViewLocalStoreData, exports.saveSetupViewDataInLocalStore = _a.saveSetupViewDataInLocalStore, exports.saveCompnayOfficerPhoneInLocalStore = _a.saveCompnayOfficerPhoneInLocalStore, exports.saveCompnayOfficerAdditionalDocumentsInLocalStore = _a.saveCompnayOfficerAdditionalDocumentsInLocalStore, exports.saveTreasuryAdditionalDocumentsInLocalStore = _a.saveTreasuryAdditionalDocumentsInLocalStore, exports.sendOtpSpendManagementSetUp = _a.sendOtp, exports.resendOtpSpendManagementSetUp = _a.resendOtp, exports.sendOtpSuccessSpendManagementSetUp = _a.sendOtpSuccess, exports.sendOtpFailureSpendManagementSetUp = _a.sendOtpFailure, exports.verifyOtpSpendManagementSetUp = _a.verifyOtp, exports.verifyOtpSuccessSpendManagementSetUp = _a.verifyOtpSuccess, exports.verifyOtpFailureSpendManagementSetUp = _a.verifyOtpFailure, exports.saveIndustryAndIncDateInLocalStore = _a.saveIndustryAndIncDateInLocalStore, exports.clearSetupViewDataInLocalStore = _a.clearSetupViewDataInLocalStore, exports.applyKycDocumentAutofillForSetup = _a.applyKycDocumentAutofillForSetup, exports.applyKybDocumentAutofillForSetup = _a.applyKybDocumentAutofillForSetup, exports.clearKycKybAutofillForSetup = _a.clearKycKybAutofillForSetup;
367
387
  exports.default = setupView.reducer;
@@ -21,6 +21,7 @@ export interface SetupView {
21
21
  }
22
22
  export interface BusinessVerificationDetails extends CompanyAndOfficerLocalData {
23
23
  allNationalityCountries: Country[];
24
+ kycKybResetStatus: FetchStateAndError;
24
25
  updateStatus: FetchStateAndError;
25
26
  companyView?: CompanyView;
26
27
  }
@@ -90,7 +90,7 @@ function getPrimaryAccountForTheProduct(state, companyId, setupViewType) {
90
90
  }
91
91
  function getBusinessVerificationDetails(state, companyId) {
92
92
  const { setupViewState, countryListState } = state;
93
- const { companyDetails, companyOfficerUpdateStatus, primaryContactDetails, updateStatus, } = setupViewState;
93
+ const { companyDetails, companyOfficerUpdateStatus, kycKybResetStatus, primaryContactDetails, updateStatus, } = setupViewState;
94
94
  const companyView = (0, getCompanyView_1.getCompanyView)(state, companyId, []);
95
95
  const { companyDetailsLocalData, companyOfficerLocalData, parsingDocumentFileIds, } = (0, exports.getCompanyAndIdentityDetails)(state, companyId, {
96
96
  companyDetails,
@@ -105,6 +105,7 @@ function getBusinessVerificationDetails(state, companyId) {
105
105
  parsingDocumentFileIds,
106
106
  companyView,
107
107
  updateStatus,
108
+ kycKybResetStatus,
108
109
  allNationalityCountries,
109
110
  };
110
111
  }
@@ -185,6 +185,7 @@ export interface CompanyAndIdentityDetails {
185
185
  };
186
186
  }
187
187
  export interface SetupViewState extends CompanyAndIdentityDetails {
188
+ kycKybResetStatus: FetchStateAndError;
188
189
  /**
189
190
  * File IDs currently being parsed by the AI autofill epic. Populated when
190
191
  * `parseUploadedKyc/KybDocument` dispatches and cleared when the
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zeniai/client-epic-state",
3
- "version": "5.2.64",
3
+ "version": "5.2.66",
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",