@zeniai/client-epic-state 4.11.57 → 4.11.58

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 (75) hide show
  1. package/lib/entity/cardPayment/cardPaymentPayload.d.ts +2 -2
  2. package/lib/entity/cardPayment/cardPaymentPayload.js +11 -14
  3. package/lib/entity/chargeCardTransaction/chargeCardTransaction.d.ts +1 -1
  4. package/lib/entity/company/companyPayload.d.ts +0 -12
  5. package/lib/entity/company/companyPayload.js +0 -21
  6. package/lib/entity/company/companyReducer.d.ts +0 -7
  7. package/lib/entity/company/companyReducer.js +2 -22
  8. package/lib/entity/company/companyStateTypes.d.ts +0 -12
  9. package/lib/entity/depositAccountTransaction/depositAccountTransaction.d.ts +1 -1
  10. package/lib/entity/paymentAccount/paymentAccountPayload.d.ts +0 -2
  11. package/lib/entity/paymentAccount/paymentAccountPayload.js +0 -2
  12. package/lib/entity/paymentAccount/paymentAccountState.d.ts +0 -2
  13. package/lib/entity/snackbar/snackbarTypes.d.ts +1 -1
  14. package/lib/entity/snackbar/snackbarTypes.js +0 -1
  15. package/lib/entity/tenant/epic/fetchAllTenantsEpic.d.ts +3 -3
  16. package/lib/entity/tenant/epic/fetchAllTenantsEpic.js +3 -16
  17. package/lib/entity/toastNotification/epic/pushToastNotificationEpic.d.ts +1 -1
  18. package/lib/index.d.ts +9 -9
  19. package/lib/index.js +18 -21
  20. package/lib/view/bankAccountView/epic/createBankAccountEpic.js +3 -5
  21. package/lib/view/cardPayment/epic/addCardPaymentSourceEpic.d.ts +1 -1
  22. package/lib/view/cardPayment/epic/confirmCardSetupIntentEpic.d.ts +1 -1
  23. package/lib/view/cardPayment/epic/createCardSetupIntentEpic.d.ts +1 -1
  24. package/lib/view/cardPayment/epic/fetchPaymentSourcesEpic.d.ts +1 -1
  25. package/lib/view/companyView/types/cockpitTypes.d.ts +2 -2
  26. package/lib/view/onboardingView/customerView/epic/plaidConnection/establishOnboardingPlaidConnectionEpic.js +0 -2
  27. package/lib/view/people/changeZeniPersonRolesEpic.d.ts +1 -1
  28. package/lib/view/people/deletePersonEpic.d.ts +1 -1
  29. package/lib/view/people/invitePeopleEpic.d.ts +1 -1
  30. package/lib/view/people/inviteZeniPeopleEpic.d.ts +1 -1
  31. package/lib/view/people/resendInviteEpic.d.ts +1 -1
  32. package/lib/view/referralView/referralState.d.ts +1 -1
  33. package/lib/view/reviewCompanyView/reviewCompanyViewSelector.js +41 -45
  34. package/lib/view/scheduleView/scheduleListView/scheduleListTypes.d.ts +1 -1
  35. package/lib/view/settingsView/epic/fetchBankConnectionsViewEpic.d.ts +4 -6
  36. package/lib/view/settingsView/epic/fetchBankConnectionsViewEpic.js +6 -29
  37. package/lib/view/settingsView/epic/saveNotificationSettingsEpic.d.ts +1 -1
  38. package/lib/view/settingsView/settingsViewReducer.d.ts +1 -3
  39. package/lib/view/settingsView/settingsViewReducer.js +2 -11
  40. package/lib/view/settingsView/settingsViewSelector.d.ts +1 -1
  41. package/lib/view/settingsView/settingsViewSelector.js +7 -59
  42. package/lib/view/settingsView/types/settingsViewSelectorTypes.d.ts +2 -10
  43. package/lib/view/spendManagement/billPay/billPayReview/billPayReviewSelector.js +3 -2
  44. package/lib/view/spendManagement/billPay/billPaySetupView/billPaySetupViewSelector.js +1 -1
  45. package/lib/view/spendManagement/billPay/billPaySetupView/epic/billPaySetup/fetchBillPaySetupViewEpic.d.ts +1 -4
  46. package/lib/view/spendManagement/billPay/billPaySetupView/epic/billPaySetup/fetchBillPaySetupViewEpic.js +4 -16
  47. package/lib/view/spendManagement/billPay/editBillView/editBillViewSelector.js +12 -15
  48. package/lib/view/spendManagement/billPay/editBillView/epics/fetchEditBillDetailPageEpic.d.ts +2 -2
  49. package/lib/view/spendManagement/billPay/editBillView/epics/fetchEditBillDetailPageEpic.js +6 -6
  50. package/lib/view/spendManagement/billPay/editBillView/epics/initializeBillToLocalStoreEpic.d.ts +2 -1
  51. package/lib/view/spendManagement/chargeCards/chargeCardSetUp/chargeCardSetUpViewSelector.js +1 -1
  52. package/lib/view/spendManagement/chargeCards/chargeCardSetUp/epic/fetchChargeCardSetupViewEpic.d.ts +1 -4
  53. package/lib/view/spendManagement/chargeCards/chargeCardSetUp/epic/fetchChargeCardSetupViewEpic.js +4 -16
  54. package/lib/view/spendManagement/commonSetup/setupViewSelector.d.ts +0 -4
  55. package/lib/view/spendManagement/commonSetup/setupViewSelector.js +31 -47
  56. package/lib/view/spendManagement/plaidAccount/epic/paymentAccounts/updateMappedCashAccountEpic.js +5 -4
  57. package/lib/view/spendManagement/plaidAccount/epic/paymentAccounts/updatePaymentAccountEpic.js +2 -1
  58. package/lib/view/spendManagement/plaidAccount/epic/paymentAccounts/updatePaymentAccountStatusEpic.js +2 -1
  59. package/lib/view/spendManagement/plaidAccount/epic/paymentAccounts/updatePrimaryFundingAccountEpic.d.ts +1 -2
  60. package/lib/view/spendManagement/plaidAccount/epic/paymentAccounts/updatePrimaryFundingAccountEpic.js +12 -59
  61. package/lib/view/spendManagement/plaidAccount/epic/plaidConnection/establishPlaidConnectionEpic.d.ts +1 -2
  62. package/lib/view/spendManagement/plaidAccount/epic/plaidConnection/establishPlaidConnectionEpic.js +16 -52
  63. package/lib/view/spendManagement/plaidAccount/epic/plaidConnection/getPlaidLinkTokenEpic.js +1 -1
  64. package/lib/view/spendManagement/plaidAccount/plaidAccountViewReducer.d.ts +27 -21
  65. package/lib/view/spendManagement/plaidAccount/plaidAccountViewReducer.js +74 -47
  66. package/lib/view/spendManagement/plaidAccount/plaidAccountViewState.d.ts +8 -3
  67. package/lib/view/spendManagement/plaidAccount/plaidAccountViewState.js +3 -6
  68. package/lib/view/spendManagement/reimbursement/remiSetupView/epic/remiSetup/fetchRemiSetupViewEpic.js +19 -6
  69. package/lib/view/spendManagement/zeniAccounts/zeniAccountList/zeniAccountListSelector.js +2 -2
  70. package/lib/view/spendManagement/zeniAccounts/zeniAccountSetUp/epic/fetchZeniAccountSetupViewEpic.d.ts +1 -4
  71. package/lib/view/spendManagement/zeniAccounts/zeniAccountSetUp/epic/fetchZeniAccountSetupViewEpic.js +9 -20
  72. package/lib/view/spendManagement/zeniAccounts/zeniAccountSetUp/zeniAccountSetupViewSelector.js +1 -1
  73. package/lib/view/tagView/epics/createTagEpic.d.ts +6 -6
  74. package/lib/view/tagView/epics/deleteTagEpic.d.ts +6 -6
  75. package/package.json +2 -2
@@ -7,12 +7,9 @@ const zeniDayJS_1 = require("../../../zeniDayJS");
7
7
  const plaidAccountViewState_1 = require("./plaidAccountViewState");
8
8
  exports.initialState = {
9
9
  spend_management_setup: plaidAccountViewState_1.initialPlaidAccountState,
10
- bill_pay_setup: plaidAccountViewState_1.initialPlaidAccountState,
11
- reimbursement_setup: plaidAccountViewState_1.initialPlaidAccountState,
12
- account_setup: plaidAccountViewState_1.initialPlaidAccountState,
13
- charge_card_setup: plaidAccountViewState_1.initialPlaidAccountState,
14
10
  user_reimbursement_account: plaidAccountViewState_1.initialPlaidAccountState,
15
11
  external_account: plaidAccountViewState_1.initialPlaidAccountState,
12
+ reimbursement_setup: plaidAccountViewState_1.initialPlaidAccountState,
16
13
  billing_setup: plaidAccountViewState_1.initialPlaidAccountState,
17
14
  };
18
15
  const plaidAccountView = (0, toolkit_1.createSlice)({
@@ -39,7 +36,7 @@ const plaidAccountView = (0, toolkit_1.createSlice)({
39
36
  },
40
37
  getPaymentAccountsSuccess: {
41
38
  reducer(draft, action) {
42
- const { plaidAccountKeyType, paymentAccountIds } = action.payload;
39
+ const { paymentAccountIds, plaidAccountKeyType } = action.payload;
43
40
  draft[plaidAccountKeyType].accountDetails.fetchStatus = {
44
41
  fetchState: 'Completed',
45
42
  error: undefined,
@@ -70,7 +67,7 @@ const plaidAccountView = (0, toolkit_1.createSlice)({
70
67
  updatePaymentAccount: {
71
68
  reducer(draft, action) {
72
69
  const { plaidAccountKeyType } = action.payload;
73
- draft[plaidAccountKeyType].accountDetails.cashAccountUpdateStatus = {
70
+ draft[plaidAccountKeyType].accountDetails.updateStatus = {
74
71
  fetchState: 'In-Progress',
75
72
  error: undefined,
76
73
  };
@@ -89,21 +86,21 @@ const plaidAccountView = (0, toolkit_1.createSlice)({
89
86
  updatePaymentAccountSuccess: {
90
87
  reducer(draft, action) {
91
88
  const { plaidAccountKeyType } = action.payload;
92
- draft[plaidAccountKeyType].accountDetails.cashAccountUpdateStatus = {
89
+ draft[plaidAccountKeyType].accountDetails.updateStatus = {
93
90
  fetchState: 'Completed',
94
91
  error: undefined,
95
92
  };
96
93
  },
97
- prepare(plaidAccountKeyType) {
94
+ prepare(paymentAccountIds, plaidAccountKeyType) {
98
95
  return {
99
- payload: { plaidAccountKeyType },
96
+ payload: { paymentAccountIds, plaidAccountKeyType },
100
97
  };
101
98
  },
102
99
  },
103
100
  updatePaymentAccountFailure: {
104
101
  reducer(draft, action) {
105
102
  const { error, plaidAccountKeyType } = action.payload;
106
- draft[plaidAccountKeyType].accountDetails.cashAccountUpdateStatus = {
103
+ draft[plaidAccountKeyType].accountDetails.updateStatus = {
107
104
  fetchState: 'Error',
108
105
  error,
109
106
  };
@@ -136,15 +133,19 @@ const plaidAccountView = (0, toolkit_1.createSlice)({
136
133
  },
137
134
  updatePaymentAccountStatusSuccess: {
138
135
  reducer(draft, action) {
139
- const { linkTokenType, plaidAccountKeyType } = action.payload;
136
+ const { paymentAccountIds, linkTokenType, plaidAccountKeyType } = action.payload;
140
137
  draft[plaidAccountKeyType].plaidConnectionDetails[linkTokenType] = Object.assign(Object.assign({}, draft[plaidAccountKeyType].plaidConnectionDetails[linkTokenType]), { updateStatus: {
141
138
  fetchState: 'Completed',
142
139
  error: undefined,
143
140
  } });
141
+ if (plaidAccountKeyType !== 'reimbursement_setup') {
142
+ draft[plaidAccountKeyType].accountDetails.paymentAccountIds =
143
+ paymentAccountIds;
144
+ }
144
145
  },
145
- prepare(linkTokenType, plaidAccountKeyType) {
146
+ prepare(paymentAccountIds, linkTokenType, plaidAccountKeyType) {
146
147
  return {
147
- payload: { linkTokenType, plaidAccountKeyType },
148
+ payload: { paymentAccountIds, linkTokenType, plaidAccountKeyType },
148
149
  };
149
150
  },
150
151
  },
@@ -184,11 +185,13 @@ const plaidAccountView = (0, toolkit_1.createSlice)({
184
185
  },
185
186
  updatePaymentAccountLoginStatusSuccess: {
186
187
  reducer(draft, action) {
187
- const { linkTokenType, plaidAccountKeyType } = action.payload;
188
+ const { paymentAccountIds, linkTokenType, plaidAccountKeyType } = action.payload;
188
189
  draft[plaidAccountKeyType].plaidConnectionDetails[linkTokenType] = Object.assign(Object.assign({}, draft[plaidAccountKeyType].plaidConnectionDetails[linkTokenType]), { updateStatus: {
189
190
  fetchState: 'Completed',
190
191
  error: undefined,
191
192
  } });
193
+ draft[plaidAccountKeyType].accountDetails.paymentAccountIds =
194
+ paymentAccountIds;
192
195
  },
193
196
  prepare(paymentAccountIds, linkTokenType, plaidAccountKeyType) {
194
197
  return {
@@ -212,11 +215,17 @@ const plaidAccountView = (0, toolkit_1.createSlice)({
212
215
  },
213
216
  getPlaidLinkToken: {
214
217
  reducer(draft, action) {
215
- const { linkTokenType, plaidAccountKeyType } = action.payload;
218
+ const { linkTokenType, paymentAccountId, plaidAccountKeyType } = action.payload;
216
219
  draft[plaidAccountKeyType].plaidConnectionDetails[linkTokenType] = Object.assign(Object.assign({}, draft[plaidAccountKeyType].plaidConnectionDetails[linkTokenType]), { fetchStatus: {
217
220
  fetchState: 'In-Progress',
218
221
  error: undefined,
219
222
  } });
223
+ if (paymentAccountId != null &&
224
+ plaidAccountKeyType !== 'reimbursement_setup') {
225
+ draft[plaidAccountKeyType].accountDetails.paymentAccountIds = [
226
+ paymentAccountId,
227
+ ];
228
+ }
220
229
  },
221
230
  prepare(plaidAccountKeyType, linkTokenType, paymentAccountId) {
222
231
  return {
@@ -264,11 +273,10 @@ const plaidAccountView = (0, toolkit_1.createSlice)({
264
273
  error: undefined,
265
274
  } });
266
275
  },
267
- prepare(publicToken, companyId, plaidAccountKeyType, setupViewType, linkTokenType) {
276
+ prepare(publicToken, plaidAccountKeyType, setupViewType, linkTokenType) {
268
277
  return {
269
278
  payload: {
270
279
  publicToken,
271
- companyId,
272
280
  setupViewType,
273
281
  linkTokenType: linkTokenType !== null && linkTokenType !== void 0 ? linkTokenType : 'link_account',
274
282
  plaidAccountKeyType,
@@ -278,15 +286,23 @@ const plaidAccountView = (0, toolkit_1.createSlice)({
278
286
  },
279
287
  establishPlaidConnectionSuccess: {
280
288
  reducer(draft, action) {
281
- const { linkTokenType, plaidAccountKeyType } = action.payload;
289
+ const { primaryFundingAccountId, paymentAccountIds, linkTokenType, plaidAccountKeyType, } = action.payload;
282
290
  draft[plaidAccountKeyType].plaidConnectionDetails[linkTokenType] = Object.assign(Object.assign({}, draft[plaidAccountKeyType].plaidConnectionDetails[linkTokenType]), { updateStatus: {
283
291
  fetchState: 'Completed',
284
292
  error: undefined,
285
293
  } });
294
+ draft[plaidAccountKeyType].accountDetails.primaryFundingAccount = {
295
+ accountId: primaryFundingAccountId,
296
+ accountType: 'paymentAccount',
297
+ };
298
+ draft[plaidAccountKeyType].accountDetails.paymentAccountIds =
299
+ paymentAccountIds;
286
300
  },
287
- prepare(linkTokenType, plaidAccountKeyType) {
301
+ prepare(primaryFundingAccountId, paymentAccountIds, linkTokenType, plaidAccountKeyType) {
288
302
  return {
289
303
  payload: {
304
+ primaryFundingAccountId,
305
+ paymentAccountIds,
290
306
  linkTokenType,
291
307
  plaidAccountKeyType,
292
308
  },
@@ -308,18 +324,27 @@ const plaidAccountView = (0, toolkit_1.createSlice)({
308
324
  },
309
325
  },
310
326
  updatePlaidAccountViewAccountDetails: {
311
- prepare(allBankAccountIds, plaidAccountKeyType) {
327
+ prepare(allBankAccountIds, paymentAccountIds, plaidAccountKeyType, depositAccountIds, primaryFundingAccount) {
312
328
  return {
313
329
  payload: {
314
330
  allBankAccountIds,
331
+ paymentAccountIds,
315
332
  plaidAccountKeyType,
333
+ depositAccountIds,
334
+ primaryFundingAccount,
316
335
  },
317
336
  };
318
337
  },
319
338
  reducer(draft, action) {
320
- const { allBankAccountIds, plaidAccountKeyType } = action.payload;
339
+ const { allBankAccountIds, paymentAccountIds, depositAccountIds, primaryFundingAccount, plaidAccountKeyType, } = action.payload;
321
340
  draft[plaidAccountKeyType].accountDetails.allBankAccountIds =
322
341
  allBankAccountIds;
342
+ draft[plaidAccountKeyType].accountDetails.paymentAccountIds =
343
+ paymentAccountIds;
344
+ draft[plaidAccountKeyType].accountDetails.depositAccountIds =
345
+ depositAccountIds !== null && depositAccountIds !== void 0 ? depositAccountIds : [];
346
+ draft[plaidAccountKeyType].accountDetails.primaryFundingAccount =
347
+ primaryFundingAccount;
323
348
  draft[plaidAccountKeyType].accountDetails.fetchStatus = {
324
349
  fetchState: 'Completed',
325
350
  error: undefined,
@@ -327,79 +352,81 @@ const plaidAccountView = (0, toolkit_1.createSlice)({
327
352
  },
328
353
  },
329
354
  updatePrimaryFundingAccount: {
330
- reducer(draft, action) {
331
- draft[action.payload.plaidAccountKeyType].accountDetails.primaryFundingAccountUpdateStatus = {
355
+ reducer(draft) {
356
+ draft['reimbursement_setup'].accountDetails.primaryFundingAccountUpdateStatus = {
332
357
  fetchState: 'In-Progress',
333
358
  error: undefined,
334
359
  };
335
360
  },
336
- prepare(companyId, plaidAccountKeyType, accountId, accountType) {
337
- return {
338
- payload: { companyId, plaidAccountKeyType, accountId, accountType },
339
- };
361
+ prepare(companyId, accountId, accountType) {
362
+ return { payload: { companyId, accountId, accountType } };
340
363
  },
341
364
  },
342
365
  updatePrimaryFundingAccountSuccess: {
343
366
  reducer(draft, action) {
344
- const { plaidAccountKeyType } = action.payload;
345
- draft[plaidAccountKeyType].accountDetails.primaryFundingAccountUpdateStatus = {
367
+ const { accountId, accountType } = action.payload;
368
+ draft['reimbursement_setup'].accountDetails.primaryFundingAccountUpdateStatus = {
346
369
  fetchState: 'Completed',
347
370
  error: undefined,
348
371
  };
372
+ draft['reimbursement_setup'].accountDetails.primaryFundingAccount = {
373
+ accountId: accountId,
374
+ accountType: accountType,
375
+ };
349
376
  },
350
- prepare(plaidAccountKeyType) {
377
+ prepare(accountId, accountType) {
351
378
  return {
352
- payload: { plaidAccountKeyType },
379
+ payload: { accountId, accountType },
353
380
  };
354
381
  },
355
382
  },
356
383
  updatePrimaryFundingAccountFailure: {
357
384
  reducer(draft, action) {
358
- draft[action.payload.plaidAccountKeyType].accountDetails.primaryFundingAccountUpdateStatus = {
385
+ draft['reimbursement_setup'].accountDetails.primaryFundingAccountUpdateStatus = {
359
386
  fetchState: 'Error',
360
- error: action.payload.error,
387
+ error: action.payload,
361
388
  };
362
389
  },
363
- prepare(plaidAccountKeyType, error) {
390
+ prepare(error) {
364
391
  return {
365
- payload: { error, plaidAccountKeyType },
392
+ payload: error,
366
393
  };
367
394
  },
368
395
  },
369
396
  updateMappedCashAccount: {
370
- reducer(draft, action) {
371
- draft[action.payload.plaidAccountKeyType].accountDetails.cashAccountUpdateStatus = {
397
+ reducer(draft) {
398
+ draft['reimbursement_setup'].accountDetails.updateStatus = {
372
399
  fetchState: 'In-Progress',
373
400
  error: undefined,
374
401
  };
375
402
  },
376
- prepare(plaidAccountKeyType, accountId, depositAccountId) {
377
- return { payload: { plaidAccountKeyType, accountId, depositAccountId } };
403
+ prepare(accountId, depositAccountId) {
404
+ return { payload: { accountId, depositAccountId } };
378
405
  },
379
406
  },
380
407
  updateMappedCashAccountSuccess: {
381
- reducer(draft, action) {
382
- draft[action.payload.plaidAccountKeyType].accountDetails.cashAccountUpdateStatus = {
408
+ reducer(draft) {
409
+ draft['reimbursement_setup'].accountDetails.updateStatus = {
383
410
  fetchState: 'Completed',
384
411
  error: undefined,
385
412
  };
386
413
  },
387
- prepare(plaidAccountKeyType) {
414
+ prepare(depositAccountIds) {
388
415
  return {
389
- payload: { plaidAccountKeyType },
416
+ payload: { depositAccountIds },
390
417
  };
391
418
  },
392
419
  },
393
420
  updateMappedCashAccountFailure: {
394
421
  reducer(draft, action) {
395
- draft[action.payload.plaidAccountKeyType].accountDetails.cashAccountUpdateStatus = {
422
+ draft['reimbursement_setup'].accountDetails.updateStatus = {
396
423
  fetchState: 'Error',
397
- error: action.payload.error,
424
+ error: action.payload,
398
425
  };
399
426
  },
400
- prepare(plaidAccountKeyType, error) {
427
+ prepare(error) {
401
428
  return {
402
- payload: { plaidAccountKeyType, error },
429
+ payload: error,
403
430
  };
404
431
  },
405
432
  },
@@ -1,7 +1,7 @@
1
1
  import { FetchStateAndError, ID } from '../../../commonStateTypes/common';
2
2
  import { ZeniDate } from '../../../zeniDayJS';
3
3
  export declare type PlaidLinkTokenType = 'link_account' | 'update_account' | 'link_account_no_microdeposit' | 'link_external_account';
4
- export declare type PlaidAccountKeyType = 'spend_management_setup' | 'bill_pay_setup' | 'reimbursement_setup' | 'account_setup' | 'charge_card_setup' | 'user_reimbursement_account' | 'external_account' | 'billing_setup';
4
+ export declare type PlaidAccountKeyType = 'spend_management_setup' | 'reimbursement_setup' | 'user_reimbursement_account' | 'external_account' | 'billing_setup';
5
5
  export declare type PlaidConnectionDetails = Record<PlaidLinkTokenType, {
6
6
  linkToken?: string;
7
7
  expiration?: ZeniDate;
@@ -12,10 +12,15 @@ export declare const initialPlaidAccountState: PlaidAccountState;
12
12
  export interface PlaidAccountState {
13
13
  accountDetails: {
14
14
  fetchStatus: FetchStateAndError;
15
- cashAccountUpdateStatus: FetchStateAndError;
15
+ updateStatus: FetchStateAndError;
16
16
  primaryFundingAccountUpdateStatus?: FetchStateAndError;
17
- allBankAccountIds: ID[];
17
+ primaryFundingAccount?: {
18
+ accountId: ID;
19
+ accountType: string;
20
+ };
18
21
  paymentAccountIds: ID[];
22
+ depositAccountIds: ID[];
23
+ allBankAccountIds: ID[];
19
24
  };
20
25
  plaidConnectionDetails: PlaidConnectionDetails;
21
26
  }
@@ -4,13 +4,10 @@ exports.initialPlaidAccountState = void 0;
4
4
  exports.initialPlaidAccountState = {
5
5
  accountDetails: {
6
6
  fetchStatus: { fetchState: 'Not-Started', error: undefined },
7
- cashAccountUpdateStatus: { fetchState: 'Not-Started', error: undefined },
8
- primaryFundingAccountUpdateStatus: {
9
- fetchState: 'Not-Started',
10
- error: undefined,
11
- },
12
- allBankAccountIds: [],
7
+ updateStatus: { fetchState: 'Not-Started', error: undefined },
13
8
  paymentAccountIds: [],
9
+ depositAccountIds: [],
10
+ allBankAccountIds: [],
14
11
  },
15
12
  plaidConnectionDetails: {
16
13
  link_account: {
@@ -16,6 +16,8 @@ const snackbarReducer_1 = require("../../../../../../entity/snackbar/snackbarRed
16
16
  const setupViewReducer_1 = require("../../../../commonSetup/setupViewReducer");
17
17
  const remiSetupViewReducer_1 = require("../../remiSetupViewReducer");
18
18
  const plaidAccountViewReducer_1 = require("../../../../plaidAccount/plaidAccountViewReducer");
19
+ const billPayConfigPayload_1 = require("../../../../billPay/billPayConfig/billPayConfigPayload");
20
+ const billPayConfigState_1 = require("../../../../billPay/billPayConfig/billPayConfigState");
19
21
  const depositAccountReducer_1 = require("../../../../../../entity/depositAccount/depositAccountReducer");
20
22
  const paymentAccountListReducer_1 = require("../../../../zeniAccounts/paymentAccountList/paymentAccountListReducer");
21
23
  const depositAccountListReducer_1 = require("../../../../zeniAccounts/depositAccountList/depositAccountListReducer");
@@ -32,9 +34,20 @@ const fetchRemiSetupViewEpic = (actions$, state$, zeniAPI) => actions$.pipe((0,
32
34
  return zeniAPI
33
35
  .getJSON(`${zeniAPI.apiEndPoints.tenantMicroServiceBaseUrl}/1.0/companies/${companyId}?query={"view":"reimbursement_setup"}`)
34
36
  .pipe((0, operators_1.mergeMap)((response) => {
35
- var _a, _b, _c;
37
+ var _a, _b, _c, _d;
36
38
  if ((0, responsePayload_1.isSuccessResponse)(response) && response.data != null) {
37
39
  const allBankAccountIds = response.data.accounts.map((account) => account.account_id);
40
+ const paymentAccountIds = response.data.payment_accounts.map((paymentAccount) => paymentAccount.payment_account_id);
41
+ const depositAccountIds = (_a = response.data.deposit_accounts) === null || _a === void 0 ? void 0 : _a.map((depositAccount) => depositAccount.deposit_account_id);
42
+ const primaryFundingAccountPayload = response.data.companies[0].reimbursement_info
43
+ .primary_funding_account;
44
+ const primaryFundingAccount = primaryFundingAccountPayload.account_id != null &&
45
+ primaryFundingAccountPayload.account_type != null
46
+ ? {
47
+ accountId: primaryFundingAccountPayload.account_id,
48
+ accountType: (0, billPayConfigPayload_1.getAccountTypeSubConfigCodeKey)((0, billPayConfigState_1.toAccType)(primaryFundingAccountPayload.account_type)),
49
+ }
50
+ : undefined;
38
51
  const actions = [
39
52
  (0, userReducer_1.updateAllUsers)({ users: response.data.users }),
40
53
  (0, userRoleReducer_1.updateUserRoles)(response.data.user_roles),
@@ -50,9 +63,9 @@ const fetchRemiSetupViewEpic = (actions$, state$, zeniAPI) => actions$.pipe((0,
50
63
  data: response.data.payment_accounts,
51
64
  updateType: 'replace',
52
65
  }),
53
- (0, depositAccountReducer_1.updateDepositAccounts)((_a = response.data.deposit_accounts) !== null && _a !== void 0 ? _a : []),
66
+ (0, depositAccountReducer_1.updateDepositAccounts)((_b = response.data.deposit_accounts) !== null && _b !== void 0 ? _b : []),
54
67
  (0, depositAccountListReducer_1.updateDepositAccountList)({
55
- data: (_c = (_b = response.data) === null || _b === void 0 ? void 0 : _b.deposit_accounts) !== null && _c !== void 0 ? _c : [],
68
+ data: (_d = (_c = response.data) === null || _c === void 0 ? void 0 : _c.deposit_accounts) !== null && _d !== void 0 ? _d : [],
56
69
  updateType: 'replace',
57
70
  }),
58
71
  (0, setupViewReducer_1.updateSetupViewLocalStoreData)({
@@ -61,7 +74,7 @@ const fetchRemiSetupViewEpic = (actions$, state$, zeniAPI) => actions$.pipe((0,
61
74
  (0, remiSetupViewReducer_1.updateRemiSetupViewLocalStoreData)({
62
75
  companyId: response.data.companies[0].company_id,
63
76
  }),
64
- (0, plaidAccountViewReducer_1.updatePlaidAccountViewAccountDetails)(allBankAccountIds, 'reimbursement_setup'),
77
+ (0, plaidAccountViewReducer_1.updatePlaidAccountViewAccountDetails)(allBankAccountIds, paymentAccountIds, 'reimbursement_setup', depositAccountIds, primaryFundingAccount),
65
78
  (0, remiSetupViewReducer_1.fetchRemiSetupViewSuccess)(),
66
79
  ];
67
80
  return (0, rxjs_1.from)(actions);
@@ -76,10 +89,10 @@ const fetchRemiSetupViewEpic = (actions$, state$, zeniAPI) => actions$.pipe((0,
76
89
  }), (0, operators_1.catchError)((error) => (0, rxjs_1.of)((0, remiSetupViewReducer_1.fetchRemiSetupViewFailure)((0, responsePayload_1.createZeniAPIStatus)('Unexpected Error', 'Fetch Remi Setup view errored out' + JSON.stringify(error))))));
77
90
  }
78
91
  else {
79
- const { allBankAccountIds } = plaidAccountViewState['reimbursement_setup'].accountDetails;
92
+ const { allBankAccountIds, paymentAccountIds, depositAccountIds, primaryFundingAccount, } = plaidAccountViewState['reimbursement_setup'].accountDetails;
80
93
  return (0, rxjs_1.of)((0, setupViewReducer_1.updateSetupViewLocalStoreData)({
81
94
  companyId,
82
- }), (0, plaidAccountViewReducer_1.updatePlaidAccountViewAccountDetails)(allBankAccountIds, 'reimbursement_setup'), (0, remiSetupViewReducer_1.fetchRemiSetupViewSuccess)());
95
+ }), (0, plaidAccountViewReducer_1.updatePlaidAccountViewAccountDetails)(allBankAccountIds, paymentAccountIds, 'reimbursement_setup', depositAccountIds, primaryFundingAccount), (0, remiSetupViewReducer_1.fetchRemiSetupViewSuccess)());
83
96
  }
84
97
  }));
85
98
  exports.fetchRemiSetupViewEpic = fetchRemiSetupViewEpic;
@@ -9,12 +9,12 @@ const paymentAccountListSelector_1 = require("../paymentAccountList/paymentAccou
9
9
  const zeniAccountsConfigSelector_1 = require("../zeniAccountsConfig/zeniAccountsConfigSelector");
10
10
  const getZeniAccountList = (state, companyId) => {
11
11
  const { zeniAccountListState, depositAccountState, paymentAccountState, plaidAccountViewState, depositAccountListState, paymentAccountListState, } = state;
12
- const { plaidConnectionDetails } = plaidAccountViewState['external_account'];
12
+ const { accountDetails, plaidConnectionDetails } = plaidAccountViewState['external_account'];
13
13
  const depositAccountsSelectorView = (0, depositAccountListSelector_1.getAllDepostAccounts)(depositAccountState, depositAccountListState);
14
14
  const zeniAccountsConfig = (0, zeniAccountsConfigSelector_1.getZeniAccountsConfigDetail)(state);
15
15
  const companyView = (0, getCompanyView_1.getCompanyView)(state, companyId, []);
16
16
  const companyBillPayInfo = companyView === null || companyView === void 0 ? void 0 : companyView.company.company.companyBillPayInfo;
17
- const { paymentAccountIds } = paymentAccountListState;
17
+ const { paymentAccountIds } = accountDetails;
18
18
  const externalAccountsSelectorView = (0, paymentAccountListSelector_1.getAllPaymentAccounts)(paymentAccountState, paymentAccountListState);
19
19
  let summary = undefined;
20
20
  if (zeniAccountListState.currentTab.id === 'zeniAccounts') {
@@ -13,8 +13,5 @@ import { ZeniAPI } from '../../../../../zeniAPI';
13
13
  import { updateSetupViewLocalStoreData } from '../../../commonSetup/setupViewReducer';
14
14
  import { fetchZeniAccountSetupView, fetchZeniAccountSetupViewFailure, fetchZeniAccountSetupViewSuccess } from '../zeniAccountSetupViewReducer';
15
15
  import { updatePlaidAccountViewAccountDetails } from '../../../plaidAccount/plaidAccountViewReducer';
16
- import { updatePaymentAccountList } from '../../paymentAccountList/paymentAccountListReducer';
17
- import { updateDepositAccounts } from '../../../../../entity/depositAccount/depositAccountReducer';
18
- import { updateDepositAccountList } from '../../depositAccountList/depositAccountListReducer';
19
- export declare type ActionType = ReturnType<typeof fetchZeniAccountSetupView> | ReturnType<typeof updateAllUsers> | ReturnType<typeof updateUserRoles> | ReturnType<typeof updateCompanies> | ReturnType<typeof updateFiles> | ReturnType<typeof updateAccounts> | ReturnType<typeof updateAddresses> | ReturnType<typeof updatePaymentAccounts> | ReturnType<typeof updatePaymentAccountList> | ReturnType<typeof updateDepositAccounts> | ReturnType<typeof updateDepositAccountList> | ReturnType<typeof updatePlaidAccountViewAccountDetails> | ReturnType<typeof updateSetupViewLocalStoreData> | ReturnType<typeof openSnackbar> | ReturnType<typeof fetchZeniAccountSetupViewSuccess> | ReturnType<typeof fetchZeniAccountSetupViewFailure>;
16
+ export declare type ActionType = ReturnType<typeof fetchZeniAccountSetupView> | ReturnType<typeof updateAllUsers> | ReturnType<typeof updateUserRoles> | ReturnType<typeof updateCompanies> | ReturnType<typeof updateFiles> | ReturnType<typeof updateAccounts> | ReturnType<typeof updateAddresses> | ReturnType<typeof updatePaymentAccounts> | ReturnType<typeof updatePlaidAccountViewAccountDetails> | ReturnType<typeof updateSetupViewLocalStoreData> | ReturnType<typeof openSnackbar> | ReturnType<typeof fetchZeniAccountSetupViewSuccess> | ReturnType<typeof fetchZeniAccountSetupViewFailure>;
20
17
  export declare const fetchZeniAccountSetupViewEpic: (actions$: ActionsObservable<ActionType>, state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
@@ -16,9 +16,6 @@ const responsePayload_1 = require("../../../../../responsePayload");
16
16
  const setupViewReducer_1 = require("../../../commonSetup/setupViewReducer");
17
17
  const zeniAccountSetupViewReducer_1 = require("../zeniAccountSetupViewReducer");
18
18
  const plaidAccountViewReducer_1 = require("../../../plaidAccount/plaidAccountViewReducer");
19
- const paymentAccountListReducer_1 = require("../../paymentAccountList/paymentAccountListReducer");
20
- const depositAccountReducer_1 = require("../../../../../entity/depositAccount/depositAccountReducer");
21
- const depositAccountListReducer_1 = require("../../depositAccountList/depositAccountListReducer");
22
19
  const fetchZeniAccountSetupViewEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(zeniAccountSetupViewReducer_1.fetchZeniAccountSetupView.match), (0, operators_1.switchMap)((action) => {
23
20
  var _a;
24
21
  const { companyId, cacheOverride, refreshViewInBackground } = action.payload;
@@ -32,9 +29,10 @@ const fetchZeniAccountSetupViewEpic = (actions$, state$, zeniAPI) => actions$.pi
32
29
  return zeniAPI
33
30
  .getJSON(`${zeniAPI.apiEndPoints.tenantMicroServiceBaseUrl}/1.0/companies/${companyId}?query={"view":"deposit_accounts_setup"}`)
34
31
  .pipe((0, operators_1.mergeMap)((response) => {
35
- var _a, _b, _c, _d, _e, _f, _g;
32
+ var _a, _b, _c, _d, _e, _f;
36
33
  if ((0, responsePayload_1.isSuccessResponse)(response) && response.data != null) {
37
34
  const allBankAccountIds = (_a = response.data.accounts) === null || _a === void 0 ? void 0 : _a.map((account) => account.account_id);
35
+ const paymentAccountIds = (_b = response.data.payment_accounts) === null || _b === void 0 ? void 0 : _b.map((paymentAccount) => paymentAccount.payment_account_id);
38
36
  const actions = [
39
37
  (0, userReducer_1.updateAllUsers)({ users: response.data.users }),
40
38
  (0, userRoleReducer_1.updateUserRoles)(response.data.user_roles),
@@ -42,23 +40,14 @@ const fetchZeniAccountSetupViewEpic = (actions$, state$, zeniAPI) => actions$.pi
42
40
  payload: response.data.companies,
43
41
  schema: {},
44
42
  }),
45
- (0, addressReducer_1.updateAddresses)((_b = response.data.addresses) !== null && _b !== void 0 ? _b : []),
46
- (0, fileReducer_1.updateFiles)({ files: (_c = response.data.files) !== null && _c !== void 0 ? _c : [] }),
47
- (0, accountReducer_1.updateAccounts)((_d = response.data.accounts) !== null && _d !== void 0 ? _d : [], 'zeni_accounts'),
48
- (0, paymentAccountReducer_1.updatePaymentAccounts)(response.data.payment_accounts),
49
- (0, paymentAccountListReducer_1.updatePaymentAccountList)({
50
- data: response.data.payment_accounts,
51
- updateType: 'replace',
52
- }),
53
- (0, depositAccountReducer_1.updateDepositAccounts)((_e = response.data.deposit_accounts) !== null && _e !== void 0 ? _e : []),
54
- (0, depositAccountListReducer_1.updateDepositAccountList)({
55
- data: (_g = (_f = response.data) === null || _f === void 0 ? void 0 : _f.deposit_accounts) !== null && _g !== void 0 ? _g : [],
56
- updateType: 'replace',
57
- }),
43
+ (0, addressReducer_1.updateAddresses)((_c = response.data.addresses) !== null && _c !== void 0 ? _c : []),
44
+ (0, fileReducer_1.updateFiles)({ files: (_d = response.data.files) !== null && _d !== void 0 ? _d : [] }),
45
+ (0, accountReducer_1.updateAccounts)((_e = response.data.accounts) !== null && _e !== void 0 ? _e : [], 'zeni_accounts'),
46
+ (0, paymentAccountReducer_1.updatePaymentAccounts)((_f = response.data.payment_accounts) !== null && _f !== void 0 ? _f : []),
58
47
  (0, setupViewReducer_1.updateSetupViewLocalStoreData)({
59
48
  companyId: response.data.companies[0].company_id,
60
49
  }),
61
- (0, plaidAccountViewReducer_1.updatePlaidAccountViewAccountDetails)(allBankAccountIds, 'account_setup'),
50
+ (0, plaidAccountViewReducer_1.updatePlaidAccountViewAccountDetails)(allBankAccountIds, paymentAccountIds, 'spend_management_setup'),
62
51
  (0, zeniAccountSetupViewReducer_1.fetchZeniAccountSetupViewSuccess)(),
63
52
  ];
64
53
  return (0, rxjs_1.from)(actions);
@@ -74,10 +63,10 @@ const fetchZeniAccountSetupViewEpic = (actions$, state$, zeniAPI) => actions$.pi
74
63
  JSON.stringify(error))))));
75
64
  }
76
65
  else {
77
- const { allBankAccountIds } = plaidAccountViewState['spend_management_setup'].accountDetails;
66
+ const { allBankAccountIds, paymentAccountIds } = plaidAccountViewState['spend_management_setup'].accountDetails;
78
67
  return (0, rxjs_1.of)((0, setupViewReducer_1.updateSetupViewLocalStoreData)({
79
68
  companyId,
80
- }), (0, plaidAccountViewReducer_1.updatePlaidAccountViewAccountDetails)(allBankAccountIds, 'account_setup'), (0, zeniAccountSetupViewReducer_1.fetchZeniAccountSetupViewSuccess)());
69
+ }), (0, plaidAccountViewReducer_1.updatePlaidAccountViewAccountDetails)(allBankAccountIds, paymentAccountIds, 'spend_management_setup'), (0, zeniAccountSetupViewReducer_1.fetchZeniAccountSetupViewSuccess)());
81
70
  }
82
71
  }));
83
72
  exports.fetchZeniAccountSetupViewEpic = fetchZeniAccountSetupViewEpic;
@@ -5,7 +5,7 @@ const getCompanyView_1 = require("../../../companyView/selectorHelpers/getCompan
5
5
  const setupViewSelector_1 = require("../../commonSetup/setupViewSelector");
6
6
  const helpers_1 = require("../../helpers");
7
7
  function getZeniAccountSetupViewDetails(state, companyId) {
8
- const zeniAccountSetupViewDetails = (0, setupViewSelector_1.getCommonSetupViewDetails)(state, companyId, 'zeni_accounts', 'account_setup');
8
+ const zeniAccountSetupViewDetails = (0, setupViewSelector_1.getCommonSetupViewDetails)(state, companyId, 'zeni_accounts', 'spend_management_setup');
9
9
  const companyView = (0, getCompanyView_1.getCompanyView)(state, companyId, []);
10
10
  const companyZeniAccountInfo = companyView === null || companyView === void 0 ? void 0 : companyView.company.company.companyZeniAccountInfo;
11
11
  const { zeniAccountSetupViewState, setupViewState } = state;
@@ -8,7 +8,7 @@ import { updateCreatedTagToLocalStore } from '../../taskManager/taskDetailView/t
8
8
  export declare type ActionType = ReturnType<typeof createTag> | ReturnType<typeof updateTagCreateStatus> | ReturnType<typeof openSnackbar> | ReturnType<typeof updateCreatedTagToLocalStore> | ReturnType<typeof updateTags>;
9
9
  export declare const createTagEpic: (actions$: ActionsObservable<ActionType>, _state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => import("rxjs").Observable<{
10
10
  payload: {
11
- messageSection: "bill_pay_setup" | "reimbursement_setup" | "charge_card_setup" | "common" | "transactionDetails_updatingPastTransactions" | "transactionDetails_transactionUpdated" | "cockpit_month_end_email_sent" | "cockpit_month_end_email_save" | "cockpit_month_end_email_attachment_upload" | "audit_score_updated" | "people_invite_people" | "people_invite_multiple_people" | "people_delete_person" | "people_update_person" | "reimbursement_updated" | "reimbursement_deleted" | "reimbursement_cancelled_deleted" | "reimbursement_cancelled" | "reimbursement_approved" | "reimbursement_rejected" | "reimbursement_sent_for_approval" | "account_added" | "business_verification_save" | "business_verification_submit" | "business_verification_from_bills_submit" | "plaid_connection" | "unlink_deposit_account" | "reimbursement_approval_create" | "reimbursement_duplicate_approval_create" | "reimbursement_approval_update" | "reimbursement_duplicate_approval_update" | "reimbursement_approval_delete" | "reimbursement_create_mileage" | "reimbursement_update_mileage" | "reimbursement_accept_term" | "reimbursement_accept_employee_term" | "zeni_accounts_setup" | "bill_pay_approval_create" | "bill_pay_duplicate_approval_create" | "bill_pay_approval_update" | "bill_pay_duplicate_approval_update" | "bill_pay_approval_delete" | "bill_pay_updated" | "bill_pay_deleted" | "bill_pay_cancelled_deleted" | "bill_pay_cancelled" | "bill_pay_approved" | "real_time_approver_added" | "bill_pay_rejected" | "bill_pay_sent_for_approval" | "bill_pay_accept_term" | "bill_pay_bulk_submit" | "bill_pay_bulk_processed" | "zeni_account_accept_term" | "update_vendor" | "data_refresh_update" | "delete_bank_account" | "create_bank_account" | "create_bank_account_ach" | "create_bank_account_wire" | "create_bank_account_international" | "transfer_money" | "update_zeni_account_nickname" | "create_checking_account" | "deposit_check" | "create_vendor" | "onboarding_customer_view" | "onboarding_customer_view_complete" | "onboarding_customer_identity_verification_save" | "onboarding_customer_identity_verification_submit" | "onboarding_customer_business_verification_save" | "onboarding_customer_business_verification_submit" | "retry_bank_account_connection" | "dashboard_invite_sent" | "onboarding_info_saved" | "approve_original_merchant" | "approve_global_merchant" | "reject_global_merchant" | "create_global_merchant" | "fetch_global_merchant_no_recommendation" | "save_vendor_renamed" | "save_vendor_sent_for_review" | "save_vendor_marked_as_employee" | "save_vendor_marked_as_local_contractor" | "charge_card_accept_term" | "create_schedule" | "save_schedule" | "delete_schedule" | "save_task_detail" | "fetch_task_detail" | "delete_task" | "archive_task" | "create_tag" | "delete_tag" | "update_charge_card" | "issue_charge_card" | "notification_settings_saved" | "referral_invite_sent" | "notification_mark_as_read" | "mark_as_complete_schedule" | "settings_accounting_accounts_updated" | "create_card_setup" | "confirm_card_setup" | "add_card_payment_source" | "fetch_payment_sources" | "task_assigned_toast_notification" | "task_due_tomorrow_toast_notification" | "task_deleted_toast_notification" | "task_archived_toast_notification" | "task_overdue_toast_notification" | "task_overdue_toast_notification_creator" | "task_notification_count" | "task_activities_toast_notification" | "task_created_toast_notification" | "task_group_creation_success" | "task_group_deletion_success" | "task_group_update_success" | "primary_funding_account_updated";
11
+ messageSection: "reimbursement_setup" | "common" | "transactionDetails_updatingPastTransactions" | "transactionDetails_transactionUpdated" | "cockpit_month_end_email_sent" | "cockpit_month_end_email_save" | "cockpit_month_end_email_attachment_upload" | "audit_score_updated" | "people_invite_people" | "people_invite_multiple_people" | "people_delete_person" | "people_update_person" | "reimbursement_updated" | "reimbursement_deleted" | "reimbursement_cancelled_deleted" | "reimbursement_cancelled" | "reimbursement_approved" | "reimbursement_rejected" | "reimbursement_sent_for_approval" | "account_added" | "business_verification_save" | "business_verification_submit" | "business_verification_from_bills_submit" | "plaid_connection" | "unlink_deposit_account" | "reimbursement_approval_create" | "reimbursement_duplicate_approval_create" | "reimbursement_approval_update" | "reimbursement_duplicate_approval_update" | "reimbursement_approval_delete" | "reimbursement_create_mileage" | "reimbursement_update_mileage" | "reimbursement_accept_term" | "reimbursement_accept_employee_term" | "bill_pay_setup" | "zeni_accounts_setup" | "bill_pay_approval_create" | "bill_pay_duplicate_approval_create" | "bill_pay_approval_update" | "bill_pay_duplicate_approval_update" | "bill_pay_approval_delete" | "bill_pay_updated" | "bill_pay_deleted" | "bill_pay_cancelled_deleted" | "bill_pay_cancelled" | "bill_pay_approved" | "real_time_approver_added" | "bill_pay_rejected" | "bill_pay_sent_for_approval" | "bill_pay_accept_term" | "bill_pay_bulk_submit" | "bill_pay_bulk_processed" | "zeni_account_accept_term" | "update_vendor" | "data_refresh_update" | "delete_bank_account" | "create_bank_account" | "create_bank_account_ach" | "create_bank_account_wire" | "create_bank_account_international" | "transfer_money" | "update_zeni_account_nickname" | "create_checking_account" | "deposit_check" | "create_vendor" | "onboarding_customer_view" | "onboarding_customer_view_complete" | "onboarding_customer_identity_verification_save" | "onboarding_customer_identity_verification_submit" | "onboarding_customer_business_verification_save" | "onboarding_customer_business_verification_submit" | "retry_bank_account_connection" | "dashboard_invite_sent" | "onboarding_info_saved" | "approve_original_merchant" | "approve_global_merchant" | "reject_global_merchant" | "create_global_merchant" | "fetch_global_merchant_no_recommendation" | "save_vendor_renamed" | "save_vendor_sent_for_review" | "save_vendor_marked_as_employee" | "save_vendor_marked_as_local_contractor" | "charge_card_setup" | "charge_card_accept_term" | "create_schedule" | "save_schedule" | "delete_schedule" | "save_task_detail" | "fetch_task_detail" | "delete_task" | "archive_task" | "create_tag" | "delete_tag" | "update_charge_card" | "issue_charge_card" | "notification_settings_saved" | "referral_invite_sent" | "notification_mark_as_read" | "mark_as_complete_schedule" | "settings_accounting_accounts_updated" | "create_card_setup" | "confirm_card_setup" | "add_card_payment_source" | "fetch_payment_sources" | "task_assigned_toast_notification" | "task_due_tomorrow_toast_notification" | "task_deleted_toast_notification" | "task_archived_toast_notification" | "task_overdue_toast_notification" | "task_overdue_toast_notification_creator" | "task_notification_count" | "task_activities_toast_notification" | "task_created_toast_notification" | "task_group_creation_success" | "task_group_deletion_success" | "task_group_update_success";
12
12
  messageText: "failed" | "success" | "notification";
13
13
  type: import("../../..").SnackbarMessageType;
14
14
  showStatusIcon?: boolean | undefined;
@@ -20,15 +20,15 @@ export declare const createTagEpic: (actions$: ActionsObservable<ActionType>, _s
20
20
  type: string;
21
21
  } | {
22
22
  payload: {
23
- tagId: string;
24
- taskId?: string | undefined;
23
+ fetchState: import("../../../commonStateTypes/common").FetchState;
24
+ tagsId: string[];
25
+ error?: import("../../../responsePayload").ZeniAPIStatus<Record<string, unknown>> | undefined;
25
26
  };
26
27
  type: string;
27
28
  } | {
28
29
  payload: {
29
- fetchState: import("../../../commonStateTypes/common").FetchState;
30
- tagsId: string[];
31
- error?: import("../../../responsePayload").ZeniAPIStatus<Record<string, unknown>> | undefined;
30
+ tagId: string;
31
+ taskId?: string | undefined;
32
32
  };
33
33
  type: string;
34
34
  } | import("@reduxjs/toolkit").PayloadAction<import("../../../entity/tag/tagPayload").TagPayload[], string, {
@@ -9,7 +9,7 @@ export declare const deleteTagEpic: (actions$: ActionsObservable<ActionType>, _s
9
9
  type: string;
10
10
  } | {
11
11
  payload: {
12
- messageSection: "bill_pay_setup" | "reimbursement_setup" | "charge_card_setup" | "common" | "transactionDetails_updatingPastTransactions" | "transactionDetails_transactionUpdated" | "cockpit_month_end_email_sent" | "cockpit_month_end_email_save" | "cockpit_month_end_email_attachment_upload" | "audit_score_updated" | "people_invite_people" | "people_invite_multiple_people" | "people_delete_person" | "people_update_person" | "reimbursement_updated" | "reimbursement_deleted" | "reimbursement_cancelled_deleted" | "reimbursement_cancelled" | "reimbursement_approved" | "reimbursement_rejected" | "reimbursement_sent_for_approval" | "account_added" | "business_verification_save" | "business_verification_submit" | "business_verification_from_bills_submit" | "plaid_connection" | "unlink_deposit_account" | "reimbursement_approval_create" | "reimbursement_duplicate_approval_create" | "reimbursement_approval_update" | "reimbursement_duplicate_approval_update" | "reimbursement_approval_delete" | "reimbursement_create_mileage" | "reimbursement_update_mileage" | "reimbursement_accept_term" | "reimbursement_accept_employee_term" | "zeni_accounts_setup" | "bill_pay_approval_create" | "bill_pay_duplicate_approval_create" | "bill_pay_approval_update" | "bill_pay_duplicate_approval_update" | "bill_pay_approval_delete" | "bill_pay_updated" | "bill_pay_deleted" | "bill_pay_cancelled_deleted" | "bill_pay_cancelled" | "bill_pay_approved" | "real_time_approver_added" | "bill_pay_rejected" | "bill_pay_sent_for_approval" | "bill_pay_accept_term" | "bill_pay_bulk_submit" | "bill_pay_bulk_processed" | "zeni_account_accept_term" | "update_vendor" | "data_refresh_update" | "delete_bank_account" | "create_bank_account" | "create_bank_account_ach" | "create_bank_account_wire" | "create_bank_account_international" | "transfer_money" | "update_zeni_account_nickname" | "create_checking_account" | "deposit_check" | "create_vendor" | "onboarding_customer_view" | "onboarding_customer_view_complete" | "onboarding_customer_identity_verification_save" | "onboarding_customer_identity_verification_submit" | "onboarding_customer_business_verification_save" | "onboarding_customer_business_verification_submit" | "retry_bank_account_connection" | "dashboard_invite_sent" | "onboarding_info_saved" | "approve_original_merchant" | "approve_global_merchant" | "reject_global_merchant" | "create_global_merchant" | "fetch_global_merchant_no_recommendation" | "save_vendor_renamed" | "save_vendor_sent_for_review" | "save_vendor_marked_as_employee" | "save_vendor_marked_as_local_contractor" | "charge_card_accept_term" | "create_schedule" | "save_schedule" | "delete_schedule" | "save_task_detail" | "fetch_task_detail" | "delete_task" | "archive_task" | "create_tag" | "delete_tag" | "update_charge_card" | "issue_charge_card" | "notification_settings_saved" | "referral_invite_sent" | "notification_mark_as_read" | "mark_as_complete_schedule" | "settings_accounting_accounts_updated" | "create_card_setup" | "confirm_card_setup" | "add_card_payment_source" | "fetch_payment_sources" | "task_assigned_toast_notification" | "task_due_tomorrow_toast_notification" | "task_deleted_toast_notification" | "task_archived_toast_notification" | "task_overdue_toast_notification" | "task_overdue_toast_notification_creator" | "task_notification_count" | "task_activities_toast_notification" | "task_created_toast_notification" | "task_group_creation_success" | "task_group_deletion_success" | "task_group_update_success" | "primary_funding_account_updated";
12
+ messageSection: "reimbursement_setup" | "common" | "transactionDetails_updatingPastTransactions" | "transactionDetails_transactionUpdated" | "cockpit_month_end_email_sent" | "cockpit_month_end_email_save" | "cockpit_month_end_email_attachment_upload" | "audit_score_updated" | "people_invite_people" | "people_invite_multiple_people" | "people_delete_person" | "people_update_person" | "reimbursement_updated" | "reimbursement_deleted" | "reimbursement_cancelled_deleted" | "reimbursement_cancelled" | "reimbursement_approved" | "reimbursement_rejected" | "reimbursement_sent_for_approval" | "account_added" | "business_verification_save" | "business_verification_submit" | "business_verification_from_bills_submit" | "plaid_connection" | "unlink_deposit_account" | "reimbursement_approval_create" | "reimbursement_duplicate_approval_create" | "reimbursement_approval_update" | "reimbursement_duplicate_approval_update" | "reimbursement_approval_delete" | "reimbursement_create_mileage" | "reimbursement_update_mileage" | "reimbursement_accept_term" | "reimbursement_accept_employee_term" | "bill_pay_setup" | "zeni_accounts_setup" | "bill_pay_approval_create" | "bill_pay_duplicate_approval_create" | "bill_pay_approval_update" | "bill_pay_duplicate_approval_update" | "bill_pay_approval_delete" | "bill_pay_updated" | "bill_pay_deleted" | "bill_pay_cancelled_deleted" | "bill_pay_cancelled" | "bill_pay_approved" | "real_time_approver_added" | "bill_pay_rejected" | "bill_pay_sent_for_approval" | "bill_pay_accept_term" | "bill_pay_bulk_submit" | "bill_pay_bulk_processed" | "zeni_account_accept_term" | "update_vendor" | "data_refresh_update" | "delete_bank_account" | "create_bank_account" | "create_bank_account_ach" | "create_bank_account_wire" | "create_bank_account_international" | "transfer_money" | "update_zeni_account_nickname" | "create_checking_account" | "deposit_check" | "create_vendor" | "onboarding_customer_view" | "onboarding_customer_view_complete" | "onboarding_customer_identity_verification_save" | "onboarding_customer_identity_verification_submit" | "onboarding_customer_business_verification_save" | "onboarding_customer_business_verification_submit" | "retry_bank_account_connection" | "dashboard_invite_sent" | "onboarding_info_saved" | "approve_original_merchant" | "approve_global_merchant" | "reject_global_merchant" | "create_global_merchant" | "fetch_global_merchant_no_recommendation" | "save_vendor_renamed" | "save_vendor_sent_for_review" | "save_vendor_marked_as_employee" | "save_vendor_marked_as_local_contractor" | "charge_card_setup" | "charge_card_accept_term" | "create_schedule" | "save_schedule" | "delete_schedule" | "save_task_detail" | "fetch_task_detail" | "delete_task" | "archive_task" | "create_tag" | "delete_tag" | "update_charge_card" | "issue_charge_card" | "notification_settings_saved" | "referral_invite_sent" | "notification_mark_as_read" | "mark_as_complete_schedule" | "settings_accounting_accounts_updated" | "create_card_setup" | "confirm_card_setup" | "add_card_payment_source" | "fetch_payment_sources" | "task_assigned_toast_notification" | "task_due_tomorrow_toast_notification" | "task_deleted_toast_notification" | "task_archived_toast_notification" | "task_overdue_toast_notification" | "task_overdue_toast_notification_creator" | "task_notification_count" | "task_activities_toast_notification" | "task_created_toast_notification" | "task_group_creation_success" | "task_group_deletion_success" | "task_group_update_success";
13
13
  messageText: "failed" | "success" | "notification";
14
14
  type: import("../../..").SnackbarMessageType;
15
15
  showStatusIcon?: boolean | undefined;
@@ -21,15 +21,15 @@ export declare const deleteTagEpic: (actions$: ActionsObservable<ActionType>, _s
21
21
  type: string;
22
22
  } | {
23
23
  payload: {
24
- tagId: string | undefined;
25
- taskId: string | undefined;
24
+ fetchState: import("../../..").FetchState;
25
+ tagId: string;
26
+ error?: import("../../../responsePayload").ZeniAPIStatus<Record<string, unknown>> | undefined;
26
27
  };
27
28
  type: string;
28
29
  } | {
29
30
  payload: {
30
- fetchState: import("../../..").FetchState;
31
- tagId: string;
32
- error?: import("../../../responsePayload").ZeniAPIStatus<Record<string, unknown>> | undefined;
31
+ tagId: string | undefined;
32
+ taskId: string | undefined;
33
33
  };
34
34
  type: string;
35
35
  }>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zeniai/client-epic-state",
3
- "version": "4.11.57",
3
+ "version": "4.11.58",
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",
@@ -48,7 +48,7 @@
48
48
  },
49
49
  "dependencies": {
50
50
  "@reduxjs/toolkit": "^1.6.2",
51
- "@stripe/stripe-js": "^4.4.0",
51
+ "@stripe/stripe-js": "^4.1.0",
52
52
  "cross-fetch": "^3.1.2",
53
53
  "date-holidays": "^3.23.8",
54
54
  "dayjs": "^1.10.7",