@zeniai/client-epic-state 4.19.53-betaAR1 → 4.19.53-betaRR0

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 (31) hide show
  1. package/lib/commonStateTypes/fileType.d.ts +1 -1
  2. package/lib/entity/account/accountSelector.d.ts +0 -18
  3. package/lib/entity/account/accountSelector.js +1 -31
  4. package/lib/entity/account/accountState.d.ts +0 -5
  5. package/lib/entity/account/accountState.js +4 -11
  6. package/lib/entity/chargeCardTransaction/chargeCardTransaction.d.ts +1 -2
  7. package/lib/entity/chargeCardTransaction/chargeCardTransactionPayload.d.ts +3 -1
  8. package/lib/entity/chargeCardTransaction/chargeCardTransactionPayload.js +26 -3
  9. package/lib/entity/chargeCardTransaction/chargeCardTransactionReducer.js +9 -4
  10. package/lib/entity/class/classSelector.d.ts +0 -5
  11. package/lib/entity/class/classSelector.js +0 -8
  12. package/lib/esm/entity/account/accountSelector.js +1 -29
  13. package/lib/esm/entity/account/accountState.js +1 -7
  14. package/lib/esm/entity/chargeCardTransaction/chargeCardTransactionPayload.js +25 -3
  15. package/lib/esm/entity/chargeCardTransaction/chargeCardTransactionReducer.js +9 -4
  16. package/lib/esm/entity/class/classSelector.js +0 -7
  17. package/lib/esm/index.js +8 -8
  18. package/lib/esm/view/expenseAutomationView/reducers/transactionsViewReducer.js +1 -11
  19. package/lib/esm/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +8 -57
  20. package/lib/esm/view/spendManagement/spendManagementFilterHelpers.js +15 -198
  21. package/lib/index.d.ts +11 -11
  22. package/lib/index.js +32 -37
  23. package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.d.ts +1 -5
  24. package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.js +2 -12
  25. package/lib/view/expenseAutomationView/selectors/transactionCategorizationSelector.d.ts +1 -4
  26. package/lib/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +8 -59
  27. package/lib/view/expenseAutomationView/types/transactionsViewState.d.ts +0 -2
  28. package/lib/view/spendManagement/spendManagementFilterHelpers.d.ts +4 -45
  29. package/lib/view/spendManagement/spendManagementFilterHelpers.js +16 -199
  30. package/package.json +1 -1
  31. package/lib/tsconfig.typecheck.tsbuildinfo +0 -1
@@ -1,3 +1,3 @@
1
1
  export declare const ALL_FILE_TYPES: readonly ["pdf", "excel", "csv"];
2
- export declare const toFileTypeStrict: (v?: string) => "excel" | "pdf" | "csv" | undefined;
2
+ export declare const toFileTypeStrict: (v?: string) => "pdf" | "excel" | "csv" | undefined;
3
3
  export type FileType = NonNullable<ReturnType<typeof toFileTypeStrict>>;
@@ -116,21 +116,3 @@ export declare const getAccountsOrdered: (filter: COABalancesFilter, accountStat
116
116
  export declare const getAccountsByType: (accountState: AccountState, accountTypes: AccountType[]) => Partial<Record<AccountType, Account[]>>;
117
117
  export declare const getAccountIdsForTypes: (accountState: AccountState, accountTypes: AccountType[]) => ID[];
118
118
  export declare const getAccountIdsForLabels: (accountState: AccountState, labels: string[]) => ID[];
119
- /**
120
- * Returns all accounts currently in state (single pass over accountsByKey).
121
- * Use for dropdowns that need account names and types; map to
122
- * { accountId, accountName, accountType } as needed.
123
- */
124
- export declare const getAllAccounts: (accountState: AccountState) => Account[];
125
- export interface AccountFilterOption {
126
- accountId: ID;
127
- accountName: string;
128
- }
129
- /**
130
- * Partitions accounts for transaction filter dropdowns: bank/credit_card → paymentAccountNames,
131
- * all other account types → categoryOptions. Use for payment_account_name and category filter options.
132
- */
133
- export declare const getTransactionFilterAccountOptions: (accountState: AccountState) => {
134
- categoryOptions: AccountFilterOption[];
135
- paymentAccountNames: AccountFilterOption[];
136
- };
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.getTransactionFilterAccountOptions = exports.getAllAccounts = exports.getAccountIdsForLabels = exports.getAccountIdsForTypes = exports.getAccountsByType = exports.getAccountsOrdered = exports.getAccountBase = void 0;
6
+ exports.getAccountIdsForLabels = exports.getAccountIdsForTypes = exports.getAccountsByType = exports.getAccountsOrdered = exports.getAccountBase = void 0;
7
7
  exports.getAccount = getAccount;
8
8
  exports.getAccountWithBalance = getAccountWithBalance;
9
9
  const flatMap_1 = __importDefault(require("lodash/flatMap"));
@@ -190,33 +190,3 @@ const getAccountIdsForLabels = (accountState, labels) => {
190
190
  return allAccountIdsForLabels;
191
191
  };
192
192
  exports.getAccountIdsForLabels = getAccountIdsForLabels;
193
- /**
194
- * Returns all accounts currently in state (single pass over accountsByKey).
195
- * Use for dropdowns that need account names and types; map to
196
- * { accountId, accountName, accountType } as needed.
197
- */
198
- const getAllAccounts = (accountState) => Object.values(accountState.accountsByKey);
199
- exports.getAllAccounts = getAllAccounts;
200
- /**
201
- * Partitions accounts for transaction filter dropdowns: bank/credit_card → paymentAccountNames,
202
- * all other account types → categoryOptions. Use for payment_account_name and category filter options.
203
- */
204
- const getTransactionFilterAccountOptions = (accountState) => {
205
- const accounts = (0, exports.getAllAccounts)(accountState);
206
- const paymentAccountNames = [];
207
- const categoryOptions = [];
208
- for (const account of accounts) {
209
- const option = {
210
- accountId: account.accountId,
211
- accountName: account.accountName,
212
- };
213
- if ((0, accountState_1.isPaymentAccountType)(account.accountType)) {
214
- paymentAccountNames.push(option);
215
- }
216
- else {
217
- categoryOptions.push(option);
218
- }
219
- }
220
- return { categoryOptions, paymentAccountNames };
221
- };
222
- exports.getTransactionFilterAccountOptions = getTransactionFilterAccountOptions;
@@ -7,14 +7,9 @@ import { RecommendationBase } from '../../commonStateTypes/recommendationBase';
7
7
  import { Status } from '../../commonStateTypes/status';
8
8
  import { ReportIDPlusForecastID } from '../../commonStateTypes/viewAndReport/viewAndReport';
9
9
  import { ZeniUrl } from '../../zeniUrl';
10
- export declare const ALL_ACCOUNT_TYPES: readonly ["bank", "credit_card", "expenses", "cogs", "income", "cash_in", "cash_out", "cash_position", "other_income", "other_expense", "accounts_receivable", "other_current_assets", "fixed_assets", "other_assets", "accounts_payable", "other_current_liabilities", "long_term_liabilities", "equity", "current_liabilities", "current_assets"];
11
10
  export declare const toAccountType: (v: string) => "cash_position" | "fixed_assets" | "bank" | "credit_card" | "expenses" | "cogs" | "income" | "cash_in" | "cash_out" | "other_income" | "other_expense" | "accounts_receivable" | "other_current_assets" | "other_assets" | "accounts_payable" | "other_current_liabilities" | "long_term_liabilities" | "equity" | "current_liabilities" | "current_assets";
12
11
  export type AccountType = ReturnType<typeof toAccountType>;
13
12
  export declare const toAccountTypeStrict: (v: string | null | undefined) => AccountType | undefined;
14
- /** Account types used for payment-account filters (e.g. transaction filter "payment account name"). */
15
- export declare const PAYMENT_ACCOUNT_TYPES: readonly ["bank", "credit_card"];
16
- export type PaymentAccountType = (typeof PAYMENT_ACCOUNT_TYPES)[number];
17
- export declare function isPaymentAccountType(accountType: AccountType | undefined): accountType is PaymentAccountType;
18
13
  export type UncategorizedAccountTypes = 'expense' | 'income';
19
14
  declare const toAccountLabel: (v: string) => "prepaid_expenses" | "fixed_assets" | "uncategorized_income" | "uncategorized_expense" | "bank_charges_and_fees" | "travel_transportation" | "accrued_expenses";
20
15
  export type AccountLabel = ReturnType<typeof toAccountLabel>;
@@ -1,12 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.toReconciliationAccountSourceStrict = exports.toReconciliationAccountSource = exports.toAccountLabelStrict = exports.PAYMENT_ACCOUNT_TYPES = exports.toAccountTypeStrict = exports.toAccountType = exports.ALL_ACCOUNT_TYPES = void 0;
4
- exports.isPaymentAccountType = isPaymentAccountType;
3
+ exports.toReconciliationAccountSourceStrict = exports.toReconciliationAccountSource = exports.toAccountLabelStrict = exports.toAccountTypeStrict = exports.toAccountType = void 0;
5
4
  exports.getAccountKey = getAccountKey;
6
5
  const nestedAccountID_1 = require("../../commonStateTypes/accountView/nestedAccountID");
7
6
  const nestedClassID_1 = require("../../commonStateTypes/classesView/nestedClassID");
8
7
  const stringToUnion_1 = require("../../commonStateTypes/stringToUnion");
9
- exports.ALL_ACCOUNT_TYPES = [
8
+ const ALL_ACCOUNT_TYPES = [
10
9
  'bank',
11
10
  'credit_card',
12
11
  'expenses',
@@ -28,16 +27,10 @@ exports.ALL_ACCOUNT_TYPES = [
28
27
  'current_liabilities',
29
28
  'current_assets',
30
29
  ];
31
- const toAccountType = (v) => (0, stringToUnion_1.stringToUnion)(v, exports.ALL_ACCOUNT_TYPES);
30
+ const toAccountType = (v) => (0, stringToUnion_1.stringToUnion)(v, ALL_ACCOUNT_TYPES);
32
31
  exports.toAccountType = toAccountType;
33
- const toAccountTypeStrict = (v) => (0, stringToUnion_1.stringToUnionStrict)(v ?? '', exports.ALL_ACCOUNT_TYPES);
32
+ const toAccountTypeStrict = (v) => (0, stringToUnion_1.stringToUnionStrict)(v ?? '', ALL_ACCOUNT_TYPES);
34
33
  exports.toAccountTypeStrict = toAccountTypeStrict;
35
- /** Account types used for payment-account filters (e.g. transaction filter "payment account name"). */
36
- exports.PAYMENT_ACCOUNT_TYPES = ['bank', 'credit_card'];
37
- function isPaymentAccountType(accountType) {
38
- return (accountType != null &&
39
- exports.PAYMENT_ACCOUNT_TYPES.includes(accountType));
40
- }
41
34
  const ALL_ACCOUNT_LABELS = [
42
35
  'uncategorized_income',
43
36
  'uncategorized_expense',
@@ -2,7 +2,6 @@ import { Amount } from '../../commonStateTypes/amount';
2
2
  import { ID } from '../../commonStateTypes/common';
3
3
  import { ZeniDate } from '../../zeniDayJS';
4
4
  import { Logo } from '../paymentAccount/paymentAccountState';
5
- import { Attachment } from '../transaction/stateTypes/attachment';
6
5
  import { TransactionCategory } from '../transaction/stateTypes/transactionType';
7
6
  export interface ChargeCardTransaction {
8
7
  amount: Amount;
@@ -13,7 +12,7 @@ export interface ChargeCardTransaction {
13
12
  summary: string;
14
13
  transactionStatus: ChargeCardTransactionStatus;
15
14
  transactionType: ChargeCardTransactionType;
16
- attachments?: Attachment[];
15
+ attachmentFilePaths?: string[];
17
16
  thirdPartyTransactionId?: ID;
18
17
  transactionTime?: ZeniDate;
19
18
  zeniAccountId?: ID;
@@ -1,6 +1,7 @@
1
1
  import { AllowedValueWithCodePayload } from '../../commonPayloadTypes/commonPayload';
2
2
  import { URLPayload } from '../../commonPayloadTypes/urlPayload';
3
3
  import { AttachmentPayload } from '../transaction/payloadTypes/attachmentPayload';
4
+ import { Attachment } from '../transaction/stateTypes/attachment';
4
5
  import { ChargeCardTransaction } from './chargeCardTransaction';
5
6
  export interface ChargeCardTransactionPayload {
6
7
  amount: number;
@@ -13,7 +14,7 @@ export interface ChargeCardTransactionPayload {
13
14
  transaction_status: AllowedValueWithCodePayload;
14
15
  transaction_summary: string;
15
16
  transaction_type: AllowedValueWithCodePayload;
16
- attachments?: AttachmentPayload[];
17
+ attachment_file_paths?: string[];
17
18
  third_party_transaction_id?: string;
18
19
  transaction_time?: string | null;
19
20
  zeni_account_id?: string;
@@ -27,4 +28,5 @@ export interface ChargeCardMerchantPayload {
27
28
  brand_name?: string | null;
28
29
  logo?: URLPayload;
29
30
  }
31
+ export declare const attachmentFilePathToAttachment: (path: string) => Attachment;
30
32
  export declare const toChargeCardTransaction: (payload: ChargeCardTransactionPayload) => ChargeCardTransaction;
@@ -1,12 +1,35 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.toChargeCardTransaction = void 0;
3
+ exports.toChargeCardTransaction = exports.attachmentFilePathToAttachment = void 0;
4
4
  const urlPayload_1 = require("../../commonPayloadTypes/urlPayload");
5
5
  const amount_1 = require("../../commonStateTypes/amount");
6
6
  const zeniDayJS_1 = require("../../zeniDayJS");
7
- const attachmentPayload_1 = require("../transaction/payloadTypes/attachmentPayload");
7
+ const zeniUrl_1 = require("../../zeniUrl");
8
+ const attachment_1 = require("../transaction/stateTypes/attachment");
8
9
  const transactionType_1 = require("../transaction/stateTypes/transactionType");
9
10
  const chargeCardTransaction_1 = require("./chargeCardTransaction");
11
+ const EXTENSION_TO_CONTENT_TYPE = {
12
+ pdf: 'application/pdf',
13
+ png: 'image/png',
14
+ jpg: 'image/jpeg',
15
+ jpeg: 'image/jpeg',
16
+ };
17
+ const attachmentFilePathToAttachment = (path) => {
18
+ const fileName = path.split('/').pop() ?? path;
19
+ const ext = fileName.split('.').pop()?.toLowerCase() ?? '';
20
+ const now = (0, zeniDayJS_1.dateNow)();
21
+ return {
22
+ id: path,
23
+ fileName,
24
+ contentType: (0, attachment_1.toContentType)(EXTENSION_TO_CONTENT_TYPE[ext] ?? ''),
25
+ fileDownloadUrl: (0, zeniUrl_1.toZeniUrl)(path),
26
+ createTime: now,
27
+ updateTime: now,
28
+ fileSizeInBytes: 0,
29
+ fileId: path,
30
+ };
31
+ };
32
+ exports.attachmentFilePathToAttachment = attachmentFilePathToAttachment;
10
33
  const toChargeCardTransaction = (payload) => ({
11
34
  id: payload.transaction_id,
12
35
  direction: (0, transactionType_1.toTransactionCategory)(payload.direction.toLowerCase()),
@@ -14,7 +37,7 @@ const toChargeCardTransaction = (payload) => ({
14
37
  code: (0, chargeCardTransaction_1.toCardTransactionStatusCode)(payload.transaction_status.code),
15
38
  name: payload.transaction_status.name,
16
39
  },
17
- attachments: payload.attachments?.map((attachmentPayload) => (0, attachmentPayload_1.toAttachment)(attachmentPayload)),
40
+ attachmentFilePaths: payload.attachment_file_paths,
18
41
  transactionType: {
19
42
  code: (0, chargeCardTransaction_1.toCardTransactionTypeCode)(payload.transaction_type.code),
20
43
  name: payload.transaction_type.name,
@@ -3,7 +3,6 @@ var _a;
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  exports.clearAllChargeCardTransactions = exports.removeChargeCardTransactionAttachmentByThirdPartyTransactionId = exports.removeChargeCardTransaction = exports.updateChargeCardTransactionAttachments = exports.updateChargeCardTransaction = exports.updateChargeCardTransactions = exports.initialState = void 0;
5
5
  const toolkit_1 = require("@reduxjs/toolkit");
6
- const attachmentPayload_1 = require("../transaction/payloadTypes/attachmentPayload");
7
6
  const chargeCardTransactionPayload_1 = require("./chargeCardTransactionPayload");
8
7
  exports.initialState = {
9
8
  chargeCardTransactionById: {},
@@ -20,10 +19,16 @@ const chargeCardTransaction = (0, toolkit_1.createSlice)({
20
19
  },
21
20
  updateChargeCardTransactionAttachments(draft, action) {
22
21
  const { transactionId, data } = action.payload;
23
- const attachments = data.attachments.map((attachment) => (0, attachmentPayload_1.toAttachment)(attachment));
22
+ const newPaths = data.attachments
23
+ .map((attachment) => attachment.attachment_id)
24
+ .filter((id) => id != null);
24
25
  draft.chargeCardTransactionById[transactionId] = {
25
26
  ...draft.chargeCardTransactionById[transactionId],
26
- attachments,
27
+ attachmentFilePaths: [
28
+ ...(draft.chargeCardTransactionById[transactionId]
29
+ ?.attachmentFilePaths ?? []),
30
+ ...newPaths,
31
+ ],
27
32
  };
28
33
  },
29
34
  updateChargeCardTransaction(draft, action) {
@@ -41,7 +46,7 @@ const chargeCardTransaction = (0, toolkit_1.createSlice)({
41
46
  if (transaction != null) {
42
47
  draft.chargeCardTransactionById[transactionId] = {
43
48
  ...transaction,
44
- attachments: transaction.attachments?.filter((attachment) => attachment.fileName !== attachmentFileName),
49
+ attachmentFilePaths: transaction.attachmentFilePaths?.filter((path) => !path.endsWith(`/${attachmentFileName}`)),
45
50
  };
46
51
  }
47
52
  }
@@ -20,8 +20,3 @@ export declare function getClassReport(classState: ClassState, accountState: Acc
20
20
  reportId: ReportID;
21
21
  classesViewParentId?: ClassesViewParentID;
22
22
  }, filter: COABalancesFilter): ClassReport | undefined;
23
- /**
24
- * Returns all classes currently in state (single pass over classesByKey).
25
- * Use for dropdowns that need class names; map to { classId, className } as needed.
26
- */
27
- export declare function getAllClasses(classState: ClassState): Class[];
@@ -6,7 +6,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.getClassesByIds = getClassesByIds;
7
7
  exports.getClassById = getClassById;
8
8
  exports.getClassReport = getClassReport;
9
- exports.getAllClasses = getAllClasses;
10
9
  const get_1 = __importDefault(require("lodash/get"));
11
10
  const coaBalance_1 = require("../../commonStateTypes/coaBalance/coaBalance");
12
11
  const accountSelector_1 = require("../account/accountSelector");
@@ -59,10 +58,3 @@ function getClassReport(classState, accountState, id, filter) {
59
58
  accounts: accountReport,
60
59
  };
61
60
  }
62
- /**
63
- * Returns all classes currently in state (single pass over classesByKey).
64
- * Use for dropdowns that need class names; map to { classId, className } as needed.
65
- */
66
- function getAllClasses(classState) {
67
- return Object.values(classState.classesByKey);
68
- }
@@ -1,7 +1,7 @@
1
1
  import flatMap from 'lodash/flatMap';
2
2
  import { getCOABalances } from '../../commonStateTypes/coaBalance/coaBalance';
3
3
  import { sortComparator } from '../../commonStateTypes/coaBalance/sortBalancesByFreeRangeTotal';
4
- import { getAccountKey, isPaymentAccountType, } from './accountState';
4
+ import { getAccountKey, } from './accountState';
5
5
  function getCommonAccountFields(accountState, id) {
6
6
  const key = getAccountKey(id.reportId, id.accountId, id.classesViewParentId, id.accountsViewParentId);
7
7
  const account = accountState.accountsByKey[key];
@@ -177,31 +177,3 @@ export const getAccountIdsForLabels = (accountState, labels) => {
177
177
  });
178
178
  return allAccountIdsForLabels;
179
179
  };
180
- /**
181
- * Returns all accounts currently in state (single pass over accountsByKey).
182
- * Use for dropdowns that need account names and types; map to
183
- * { accountId, accountName, accountType } as needed.
184
- */
185
- export const getAllAccounts = (accountState) => Object.values(accountState.accountsByKey);
186
- /**
187
- * Partitions accounts for transaction filter dropdowns: bank/credit_card → paymentAccountNames,
188
- * all other account types → categoryOptions. Use for payment_account_name and category filter options.
189
- */
190
- export const getTransactionFilterAccountOptions = (accountState) => {
191
- const accounts = getAllAccounts(accountState);
192
- const paymentAccountNames = [];
193
- const categoryOptions = [];
194
- for (const account of accounts) {
195
- const option = {
196
- accountId: account.accountId,
197
- accountName: account.accountName,
198
- };
199
- if (isPaymentAccountType(account.accountType)) {
200
- paymentAccountNames.push(option);
201
- }
202
- else {
203
- categoryOptions.push(option);
204
- }
205
- }
206
- return { categoryOptions, paymentAccountNames };
207
- };
@@ -1,7 +1,7 @@
1
1
  import { getNestedAccountIDStr, } from '../../commonStateTypes/accountView/nestedAccountID';
2
2
  import { getNestedClassIDStr, } from '../../commonStateTypes/classesView/nestedClassID';
3
3
  import { stringToUnion, stringToUnionStrict, } from '../../commonStateTypes/stringToUnion';
4
- export const ALL_ACCOUNT_TYPES = [
4
+ const ALL_ACCOUNT_TYPES = [
5
5
  'bank',
6
6
  'credit_card',
7
7
  'expenses',
@@ -25,12 +25,6 @@ export const ALL_ACCOUNT_TYPES = [
25
25
  ];
26
26
  export const toAccountType = (v) => stringToUnion(v, ALL_ACCOUNT_TYPES);
27
27
  export const toAccountTypeStrict = (v) => stringToUnionStrict(v ?? '', ALL_ACCOUNT_TYPES);
28
- /** Account types used for payment-account filters (e.g. transaction filter "payment account name"). */
29
- export const PAYMENT_ACCOUNT_TYPES = ['bank', 'credit_card'];
30
- export function isPaymentAccountType(accountType) {
31
- return (accountType != null &&
32
- PAYMENT_ACCOUNT_TYPES.includes(accountType));
33
- }
34
28
  const ALL_ACCOUNT_LABELS = [
35
29
  'uncategorized_income',
36
30
  'uncategorized_expense',
@@ -1,9 +1,31 @@
1
1
  import { toURL } from '../../commonPayloadTypes/urlPayload';
2
2
  import { toAmount } from '../../commonStateTypes/amount';
3
- import { dateLocal } from '../../zeniDayJS';
4
- import { toAttachment, } from '../transaction/payloadTypes/attachmentPayload';
3
+ import { dateNow, dateLocal } from '../../zeniDayJS';
4
+ import { toZeniUrl } from '../../zeniUrl';
5
+ import { toContentType, } from '../transaction/stateTypes/attachment';
5
6
  import { toTransactionCategory } from '../transaction/stateTypes/transactionType';
6
7
  import { toCardTransactionStatusCode, toCardTransactionTypeCode, } from './chargeCardTransaction';
8
+ const EXTENSION_TO_CONTENT_TYPE = {
9
+ pdf: 'application/pdf',
10
+ png: 'image/png',
11
+ jpg: 'image/jpeg',
12
+ jpeg: 'image/jpeg',
13
+ };
14
+ export const attachmentFilePathToAttachment = (path) => {
15
+ const fileName = path.split('/').pop() ?? path;
16
+ const ext = fileName.split('.').pop()?.toLowerCase() ?? '';
17
+ const now = dateNow();
18
+ return {
19
+ id: path,
20
+ fileName,
21
+ contentType: toContentType(EXTENSION_TO_CONTENT_TYPE[ext] ?? ''),
22
+ fileDownloadUrl: toZeniUrl(path),
23
+ createTime: now,
24
+ updateTime: now,
25
+ fileSizeInBytes: 0,
26
+ fileId: path,
27
+ };
28
+ };
7
29
  export const toChargeCardTransaction = (payload) => ({
8
30
  id: payload.transaction_id,
9
31
  direction: toTransactionCategory(payload.direction.toLowerCase()),
@@ -11,7 +33,7 @@ export const toChargeCardTransaction = (payload) => ({
11
33
  code: toCardTransactionStatusCode(payload.transaction_status.code),
12
34
  name: payload.transaction_status.name,
13
35
  },
14
- attachments: payload.attachments?.map((attachmentPayload) => toAttachment(attachmentPayload)),
36
+ attachmentFilePaths: payload.attachment_file_paths,
15
37
  transactionType: {
16
38
  code: toCardTransactionTypeCode(payload.transaction_type.code),
17
39
  name: payload.transaction_type.name,
@@ -1,5 +1,4 @@
1
1
  import { createSlice } from '@reduxjs/toolkit';
2
- import { toAttachment } from '../transaction/payloadTypes/attachmentPayload';
3
2
  import { toChargeCardTransaction, } from './chargeCardTransactionPayload';
4
3
  export const initialState = {
5
4
  chargeCardTransactionById: {},
@@ -16,10 +15,16 @@ const chargeCardTransaction = createSlice({
16
15
  },
17
16
  updateChargeCardTransactionAttachments(draft, action) {
18
17
  const { transactionId, data } = action.payload;
19
- const attachments = data.attachments.map((attachment) => toAttachment(attachment));
18
+ const newPaths = data.attachments
19
+ .map((attachment) => attachment.attachment_id)
20
+ .filter((id) => id != null);
20
21
  draft.chargeCardTransactionById[transactionId] = {
21
22
  ...draft.chargeCardTransactionById[transactionId],
22
- attachments,
23
+ attachmentFilePaths: [
24
+ ...(draft.chargeCardTransactionById[transactionId]
25
+ ?.attachmentFilePaths ?? []),
26
+ ...newPaths,
27
+ ],
23
28
  };
24
29
  },
25
30
  updateChargeCardTransaction(draft, action) {
@@ -37,7 +42,7 @@ const chargeCardTransaction = createSlice({
37
42
  if (transaction != null) {
38
43
  draft.chargeCardTransactionById[transactionId] = {
39
44
  ...transaction,
40
- attachments: transaction.attachments?.filter((attachment) => attachment.fileName !== attachmentFileName),
45
+ attachmentFilePaths: transaction.attachmentFilePaths?.filter((path) => !path.endsWith(`/${attachmentFileName}`)),
41
46
  };
42
47
  }
43
48
  }
@@ -50,10 +50,3 @@ export function getClassReport(classState, accountState, id, filter) {
50
50
  accounts: accountReport,
51
51
  };
52
52
  }
53
- /**
54
- * Returns all classes currently in state (single pass over classesByKey).
55
- * Use for dropdowns that need class names; map to { classId, className } as needed.
56
- */
57
- export function getAllClasses(classState) {
58
- return Object.values(classState.classesByKey);
59
- }
package/lib/esm/index.js CHANGED
@@ -22,8 +22,7 @@ import { mapTimePeriodtoTimeframeTick, toTimePeriod, toTimeframeTick, } from './
22
22
  import { isAgingReport, isCashFlowOrBalanceSheetReport, isDashboardClassesViewReport, isDashboardReport, isFluxAnalysisOpExReport, isOpExByVendorReport, isPAndLClassesViewReport, isPAndLReport, } from './commonStateTypes/viewAndReport/reportIDHelper';
23
23
  import { toReportFormatStrict, toReportID, } from './commonStateTypes/viewAndReport/viewAndReport';
24
24
  import { PAYMENT_BUSINESS_DAYS, filterDays, getNextNthWorkingDay, getPreviousNthWorkingDay, getYearsList, holidaysFormatted, isHoliday, isHolidayToday, } from './commonStateTypes/workingDayHelper';
25
- import { getAllAccounts, getTransactionFilterAccountOptions, } from './entity/account/accountSelector';
26
- import { ALL_ACCOUNT_TYPES, toAccountType, toReconciliationAccountSource, } from './entity/account/accountState';
25
+ import { toAccountType, toReconciliationAccountSource, } from './entity/account/accountState';
27
26
  import { getAccountGroupKey, toAccountGroupType, } from './entity/accountGroup/accountGroupState';
28
27
  /**
29
28
  * Expense Automation Exports starts
@@ -35,6 +34,7 @@ import { toOutsideZeniPaymentModeType, } from './entity/billPay/billTransaction/
35
34
  import { toRecurringBillFrequency, toRecurringBillFrequencyStrict, } from './entity/billPay/recurringBills/recurringBillsState';
36
35
  import { toCardAddressType, toCardType, toCreditLimitFrequencyCodeType, toShippingAddressType, } from './entity/chargeCard/chargeCard';
37
36
  import { getChargeCardById } from './entity/chargeCard/chargeCardSelector';
37
+ import { attachmentFilePathToAttachment, } from './entity/chargeCardTransaction/chargeCardTransactionPayload';
38
38
  import { updateChargeCardTransactionAttachments } from './entity/chargeCardTransaction/chargeCardTransactionReducer';
39
39
  import { getControllersName, getFirstControllerEmail, getFirstControllerId, } from './entity/company/companyHelper';
40
40
  import { getCompanyByCompanyId, getCompanyInfoForAllCockpitCompaniesInState, getControllersForCompany, } from './entity/company/companySelector';
@@ -164,7 +164,7 @@ import { clearExpenseAutomationFluxAnalysisView, fetchFluxAnalysisView, reviewFl
164
164
  import { clearJeScheduleLocalData as clearExpenseAutomationJEScheduleLocalData, clearExpenseAutomationJESchedulesView, fetchJeSchedulesPage as fetchExpenseAutomationJESchedulesPage, ignoreRecommendedJeSchedule as ignoreExpenseAutomationJESchedule, initializeAccountSettingsView as initializeJeAccountSettingsView, initializeJeScheduleLocalData, removeJeScheduleTransactionKey, retryJeSchedule as retryExpenseAutomationJESchedule, saveAccountSettings as saveJeAccountSettings, saveAccountSettingsLocalData as saveJeAccountSettingsLocalData, updateJeScheduleLocalDataById, updateJeScheduleTransactionKeys, } from './view/expenseAutomationView/reducers/jeSchedulesViewReducer';
165
165
  import { fetchMissingReceipts as fetchExpenseAutomationMissingReceipts, markMissingReceiptAsDone as markExpenseAutomationMissingReceiptAsDone, updateMissingReceiptUploadState as updateExpenseAutomationMissingReceiptUploadState, updateMissingReceiptsUIState as updateExpenseAutomationMissingReceiptsUIState, uploadMissingReceiptSuccess as uploadExpenseAutomationMissingReceiptSuccess, } from './view/expenseAutomationView/reducers/missingReceiptsViewReducer';
166
166
  import { deleteAccountStatement, fetchReconciliation as fetchReconciliationView, saveReconciliationDetail as saveExpenseAutomationReconciliationDetail, saveReconciliationReview as saveExpenseAutomationReconciliationReview, setConnectionInProgressForAccount as setConnectionInProgressForAccountReconciliation, setStatementParseInProgress, updateAccountReconciliationLocalData as updateExpenseAutomationAccountReconciliationLocalData, updateSelectedAccountId as updateExpenseAutomationAccountReconciliationSelectedAccountId, updateSelectedTab as updateExpenseAutomationAccountReconciliationSelectedTab, updateReconListScrollPosition as updateExpenseAutomationReconListScrollPosition, updateReviewTabSortState as updateExpenseAutomationReconReviewTabListSortState, updateReviewTabLocalData as updateExpenseAutomationReconReviewTabLocalData, updateReconcileTabListScrollState as updateExpenseAutomationReconcileTabListScrollState, updateReconcileTabListSortState as updateExpenseAutomationReconcileTabListSortState, updateReconcileTabLocalData as updateExpenseAutomationReconcileTabLocalData, updateSelectedDrawerAccountId as updateExpenseAutomationSelectedDrawerAccountId, updateStatementUploadChosen, uploadAccountStatement, } from './view/expenseAutomationView/reducers/reconciliationViewReducer';
167
- import { backgroundRefetchReviewTab, clearExpenseAutomationTransactionsView, fetchTransactionCategorization, fetchTransactionCategorizationFailure, fetchTransactionCategorizationView, initializeTransactionCategorizationViewLocalData, markTransactionAsNotMiscategorized, saveTransactionCategorization, saveTransactionCategorizationLocalData, setAllItemsToCategoryClassInLocalDataForCategorization, setEntityRecommendationForLineIdsForCategorization, syncTransactionCategorizationFromDetailSave, updateCurrentSelectedTransactionCategorizationTab, updateSelectedCheckboxTransactionIds, updateSelectedCustomerForTransaction, updateSelectedTransactionId, updateSelectedVendorForTransaction, updateTransactionCategorization, updateTransactionCategorizationSaveStatus, updateTransactionCategorizationUIState, updateTransactionFilters, } from './view/expenseAutomationView/reducers/transactionsViewReducer';
167
+ import { backgroundRefetchReviewTab, clearExpenseAutomationTransactionsView, fetchTransactionCategorization, fetchTransactionCategorizationFailure, fetchTransactionCategorizationView, initializeTransactionCategorizationViewLocalData, markTransactionAsNotMiscategorized, saveTransactionCategorization, saveTransactionCategorizationLocalData, setAllItemsToCategoryClassInLocalDataForCategorization, setEntityRecommendationForLineIdsForCategorization, syncTransactionCategorizationFromDetailSave, updateCurrentSelectedTransactionCategorizationTab, updateSelectedCheckboxTransactionIds, updateSelectedCustomerForTransaction, updateSelectedTransactionId, updateSelectedVendorForTransaction, updateTransactionCategorization, updateTransactionCategorizationSaveStatus, updateTransactionCategorizationUIState, } from './view/expenseAutomationView/reducers/transactionsViewReducer';
168
168
  import { getExpenseAutomationFluxAnalysisView } from './view/expenseAutomationView/selectors/fluxAnalysisViewSelector';
169
169
  import { getExpenseAutomationReconciliationView, isAccountReconReport, } from './view/expenseAutomationView/selectors/reconciliationViewSelector';
170
170
  import { getExpenseAutomationTransactionView } from './view/expenseAutomationView/selectors/transactionCategorizationSelector';
@@ -317,7 +317,7 @@ import { acceptEmployeeRemiTerms, acceptRemiTerms, clearRemiSetupView, fetchRemi
317
317
  import { getRemiBusinessVerificationDetails, getRemiSetupViewDetails, } from './view/spendManagement/reimbursement/remiSetupView/remiSetupViewSelector';
318
318
  import { approveOrRejectRemisBulkAction, autoReviewPendingApprovalRemis, cancelOrDeleteRemisBulkAction, clearAllRemisFromBulkActionList, clearRemiBulkActionView, incrementRemiBulkActionProcessedCount, removeRemiFromBulkActionList, reviewDraftRemisBulkAction, submitDraftRemisBulkAction, updateRemisBulkActionList, } from './view/spendManagement/reimbursement/remisBulkActionView/remisBulkActionViewReducer';
319
319
  import { getRemisBulkOperationProgress, getRemisBulkReviewView, } from './view/spendManagement/reimbursement/remisBulkActionView/remisBulkActionViewSelector';
320
- import { TRANSACTION_FILTER_CATEGORIES, hideCreatedByFilter, } from './view/spendManagement/spendManagementFilterHelpers';
320
+ import { hideCreatedByFilter, } from './view/spendManagement/spendManagementFilterHelpers';
321
321
  import { acceptTreasuryTerms, clearTreasurySetupView, fetchPortfolioAllocation, fetchTreasuryFunds, fetchTreasurySetupView, updateFundAllocationLocalData, updatePortfolioAllocation, updateTreasuryVideoViewed, } from './view/spendManagement/treasury/treasurySetUp/treasurySetupViewReducer';
322
322
  import { getTreasuryBusinessVerificationDetails, getTreasurySetupViewDetails, } from './view/spendManagement/treasury/treasurySetUp/treasurySetupViewSelector';
323
323
  import { getTreasuryFundsMaximumYield, } from './view/spendManagement/treasury/treasurySetUp/treasurySetupViewState';
@@ -414,15 +414,15 @@ export { toCOABalanceTypeStrict, toCOABalanceType as toCOABlanaceType, isCalcula
414
414
  export { stringToUnion, stringToUnionStrict };
415
415
  export { fetchMonthEndCloseChecks, fetchMonthClosePerformanceTrend, getMonthEndCloseChecksViewByTenantId, ALL_MONTH_END_CLOSE_CHECKS_FREQUENCY, };
416
416
  export { getExpenseAutomationView, toExpenseAutomationMissingReceiptsSortKey, toExpenseAutomationTransactionsTabKey, toExpenseAutomationViewType, uploadExpenseAutomationMissingReceiptSuccess, markExpenseAutomationMissingReceiptAsDone, fetchAllExpenseAutomationTabs, refreshExpenseAutomationCurrentTab, updateCurrentSelectedTransactionCategorizationTab, fetchExpenseAutomationMissingReceipts, fetchFluxAnalysisView, clearExpenseAutomationFluxAnalysisView, updateOperatingExpensesIdsForReview as updateFluxOperatingExpensesIdsForReview, updateSelectedSectionIdsForReview as updateFluxAnalysisSelectedSectionIdsForReview, reviewFluxAnalysisView, updateExpenseAutomationMissingReceiptUploadState, updateExpenseAutomationMissingReceiptsUIState, getExpenseAutomationFluxAnalysisView, updateCurrentSelectedView, updateCurrentSelectedPeriod, getExpenseAutomationTransactionView, updateFluxAnalysisViewUIState, updateFluxAnalysisViewPageMetaData, MAX_SELECTION_LIMIT, checkIfAllLineItemsAreCategoryClassFilled, getLineItemsByTransactionIdsFromLocalData, isAnyItemWithUncategorizedExpenseAccount, saveExpenseAutomationReconciliationDetail, updateExpenseAutomationReconcileTabListScrollState, updateExpenseAutomationReconReviewTabListSortState, updateExpenseAutomationReconcileTabListSortState, updateExpenseAutomationReconcileTabLocalData, updateExpenseAutomationAccountReconciliationSelectedTab, updateExpenseAutomationAccountReconciliationSelectedAccountId, getExpenseAutomationReconciliationView, fetchReconciliationView, uploadAccountStatementIntoDocumentAI, updateExpenseAutomationReconListScrollPosition, setConnectionInProgressForAccountReconciliation, getAccountReconByAccountIdAndSelectedPeriod, toReconciliationTabsType, isAccountReconReport, updateExpenseAutomationReconReviewTabLocalData, updateExpenseAutomationSelectedDrawerAccountId, saveExpenseAutomationReconciliationReview, updateExpenseAutomationAccountReconciliationLocalData, toReconciliationAccountSource, deleteAccountStatement, uploadAccountStatement, updateStatementUploadChosen, isReviewTransactionBankTransferType, isReviewTransactionBillPaymentType, isReviewTransactionCreditCardPaymentType, isReviewTransactionDepositType, isReviewTransactionExpenseType, isReviewTransactionCreditCardCreditType, setStatementParseInProgress, };
417
- export { fetchTransactionCategorization, fetchTransactionCategorizationView, updateTransactionCategorizationUIState, updateTransactionFilters, updateSelectedCheckboxTransactionIds, setEntityRecommendationForLineIdsForCategorization, initializeTransactionCategorizationViewLocalData, setAllItemsToCategoryClassInLocalDataForCategorization, saveTransactionCategorizationLocalData, fetchTransactionCategorizationFailure, saveTransactionCategorization, updateTransactionCategorization, updateTransactionCategorizationSaveStatus, markTransactionAsNotMiscategorized, updateSelectedVendorForTransaction, updateSelectedCustomerForTransaction, updateSelectedTransactionId, syncTransactionCategorizationFromDetailSave, backgroundRefetchReviewTab, clearExpenseAutomationTransactionsView, toTransactionsSortKey, TRANSACTION_FILTER_CATEGORIES, };
417
+ export { fetchTransactionCategorization, fetchTransactionCategorizationView, updateTransactionCategorizationUIState, updateSelectedCheckboxTransactionIds, setEntityRecommendationForLineIdsForCategorization, initializeTransactionCategorizationViewLocalData, setAllItemsToCategoryClassInLocalDataForCategorization, saveTransactionCategorizationLocalData, fetchTransactionCategorizationFailure, saveTransactionCategorization, updateTransactionCategorization, updateTransactionCategorizationSaveStatus, markTransactionAsNotMiscategorized, updateSelectedVendorForTransaction, updateSelectedCustomerForTransaction, updateSelectedTransactionId, syncTransactionCategorizationFromDetailSave, backgroundRefetchReviewTab, clearExpenseAutomationTransactionsView, toTransactionsSortKey, };
418
418
  export { TOP_EX_TIME_PERIODS };
419
419
  export { toTimeframeTick, mapTimePeriodtoTimeframeTick, toTimePeriod, toAbsoluteDay, toMonthYearPeriodId, convertToPeriod, };
420
420
  export { toVendorSpendTrendFilterTabsTypeStrict, } from './entity/vendorExpense/vendorExpenseSelector';
421
421
  export { getNumberOfPeriods };
422
422
  export { SCHEDULE_DAYS_OF_MONTH, toScheduleDaysOfMonth, toMonth, toMonthStrict, toQuarter, toQuarterStrict, };
423
423
  export { getTenantBaseById, getCurrentTenant, getTenantsByCheckInDateSelector, getTenantsBaseByCheckInDateSelector, getTenantsCoreDetailsByCheckInDateSelector, toTenantCoreDetailsView, getTenantBaseViewForTenantView, getTenantBaseViewForTenantId, isZeniDomainTenant, isTenantUsingZeniCOA, fetchActiveTenant, fetchAllTenants, updateCurrentTenant, clearAll, doMagicLinkSignIn, verifyDeviceWithTwoFA, resendVerifyDeviceOTP, sendEmailMagicLinkToUser, doSignIn, updateSignInState, doSignOut, resetSignInState, fetchExcludedResourcesForTenant, fetchExternalConnectionsForTenant, saveExternalConnectionForTenant, fetchSubscriptionSummaryForTenant, isTenantBankingOnly, isTenantCardsOnly, isTenantBookkeepingEnabled, isOtherProductsEnabledForTenant, };
424
- export { ALL_ACCOUNT_TYPES, toAccountType, getAllAccounts, getTransactionFilterAccountOptions, toAccountGroupType, getAccountGroupKey, };
425
- export { getAllClasses, getClassById } from './entity/class/classSelector';
424
+ export { toAccountType, toAccountGroupType, getAccountGroupKey, };
425
+ export { getClassById } from './entity/class/classSelector';
426
426
  export { getForecast };
427
427
  export { getUserName, getUserByUserId, getUsersByUserIds, getAllZeniUsersFromState, } from './entity/user/userSelector';
428
428
  export { toUserRoleType, toUserRoleTypeStrict, isFinOpsUserRoleType, hasAdminLevelAccess, hasFullOrAdminLevelAccess, hasReimbursementUserAccess, hasEmployeeLevelAccess, hasBookKeepingAdminLevelAccess, hasBookKeepingUserLevelAccess, isNonZeniRole, hasInvestorBankerLevelAccess, getUserRoleMap, hasOnlyBillPayAccess, hasZeniRoleOrCompanyOfficerAccess, hasSuperAdminLevelAccess, hasBillPayFallbackAdminLevelAccess, hasRemiFallbackAdminLevelAccess, hasOnlyReimbursementAccess, hasOnlyChargeCardAccess, hasOnlyZeniAccountsAccess, isZeniSignedInUser, getUserRoleByUserId, getUserRoleByUserIds, hasChargeCardAccess, hasZeniAccountsAccess, hasTreasuryAccess, hasTreasuryAdminLevelAccess, hasBillPayAccess, hasReimbursementAccess, hasReimbursementAdminLevelAccess, hasBillPayAdminLevelAccess, hasChargeCardAdminLevelAccess, hasSpendManagementAccess, hasSpendManagementAdminLevelAccess, hasZeniAccountsAdminLevelAccess, hasAnyCompanyRole, hasAnyFinOpRole, hasBillPayAccessible, hasReimbursementAccessible, hasZeniAccountsAccessible, hasChargeCardAccessible, hasTreasuryAccessible, hasAICFOAccess, };
@@ -563,7 +563,7 @@ export { fetchUserRoleConfig, getUserRoleConfig };
563
563
  export { getCompanyHealthMetricConfig, fetchCompanyHealthMetricConfig, };
564
564
  export { updateCompaniesHealth, updateCompanyHealth, };
565
565
  export { clearCompanyHealthMetricView, fetchCompanyHealthMetricView, initializeCompanyHealthMetricViewLocalData, removeSelectedCompanyId, saveCompanyHealthMetricById, updateCompanyHealthMetricLocalStore, updateCompanyHealthMetricViewErrorStatus, updateCompanyHealthMetricViewSuccessStatus, updateCompanyHealthViewUIState, };
566
- export { updateChargeCardTransactionAttachments, isCompanyRunwayInfinite, getCompanyHealthMetricView, hasCompanyHealthMetricFormFieldChanged, companyHealthMetricDropDownOptions, getChargeCardBusinessVerificationDetails, fetchDebitCardSummary, fetchChargeCardList, fetchChargeCardListPage, fetchChargeCardConfig, fetchCreditAccount, fetchCreditAccountRepayment, getChargeCardListView, getMyPendingActivationChargeCardListView, getMyRequestOnHoldChargeCardListWithShippingAddress, clearChargeCardRepaymentDetail, fetchChargeCardRepaymentDetail, initiateChargeCardRepayment, updateChargeCardRepaymentLocalStore, getChargeCardRepaymentDetail, fetchChargeCardPaymentPage, fetchChargeCardPaymentHistory, updatePaymentHistoryDownloadUIState, updatePaymentHistoryFilters, updatePaymentHistorySearchText, updatePaymentHistoryUIState, getChargeCardPaymentHistoryDownloadReport, getChargeCardPaymentHistoryView, getPaymentHistorySourceAccountName, getPaymentStatusDisplayText, PAYMENT_HISTORY_FILTER_CATEGORIES, getCreditAccountDetails, fetchChargeCardDetailPage, fetchChargeCardDetail, fetchChargeCardTransactionStatistics, fetchDepositAccountLimit, getChargeCardDetailView, getChargeCardControlDetailView, getDepositAccountLimitFetchStateByDepositAccountId, getChargeCardTransactionAttachmentView, getDebitCardSetPinView, getChargeCardRecurringExpensesByCardIds, getChargeCardRecurringExpensesView, getChargeCardRowActionView, getChargeCardBulkActionView, getChargeCardCVVActivateView, fetchChargeCardTransactionList, fetchCashbackDetail, toChargeCardSortKeyType, getCashbackDetail, getZeniDateFromPeriod, toCreditLimitFrequencyCodeType, getDepositAccountListWithDebitCardIssued, getIssueChargeCardView, getChargeCardSetupViewDetails, fetchChargeCardStatementList, getChargeCardStatements, fetchChargeCardSetupView, enableChargeCardAutoPay, acceptChargeCardTerms, expressInterestInChargeCard, getDepositAccountLimitForChargeCardByDepositAccountId, toCardAddressType, toShippingAddressType, toCardType, issueChargeCards, fetchIssueCardPage, fetchDepositAccountListForCards, getDebitCardList, getDebitCardSummary, updateCustomAddressId, updateChargeCardsLocalStore, resetIssueChargeCardForm, updateBulkActionCardIds, updateChargeCardListSearchText, updateChargeCardListUIState, updateCashbackDetailUIState, updateChargeCardDetail, updatePhysicalChargeCardAttempt, lockChargeCard, unlockChargeCard, closeChargeCard, updateChargeCardName, getCardUserOnboardingView, initializeCardUserOnboardingLocalData, updateCardUserOnboardingLocalData, saveCardOnboardingUserDetails, updateChargeCardTransactionUploadReceiptsFetchStatus, completeDebitCardSetPinWait, startDebitCardSetPinWait, updateDebitCardPinAttempt, updateChargeCardTransactionReceiptsShowTickFetchStatus, updateChargeCardTransactionIsViewReceiptClicked, fetchChargeCardTransactionAttachments, completeCVVActivationWait, startCVVActivationWait, updateChargeCardSpendLimit, updateChargeCardSpendLimitSuccessOrFailure, resendCardInvite, revokeCardInvite, updateRowActionCardId, revokeChargeCardsInvite, lockChargeCards, unlockChargeCards, closeChargeCards, updateChargeCardsSpendLimit, fetchChargeCardsRecurringExpenses, startCardUserOnboardingActivationWait, completeCardUserOnboardingActivationWait, setFirstViewAfterActivation, setFirstViewCompleteAfterActivation, setCurrentDisplayedCardId, getChargeCardById, anyCardOnHold, };
566
+ export { updateChargeCardTransactionAttachments, attachmentFilePathToAttachment, isCompanyRunwayInfinite, getCompanyHealthMetricView, hasCompanyHealthMetricFormFieldChanged, companyHealthMetricDropDownOptions, getChargeCardBusinessVerificationDetails, fetchDebitCardSummary, fetchChargeCardList, fetchChargeCardListPage, fetchChargeCardConfig, fetchCreditAccount, fetchCreditAccountRepayment, getChargeCardListView, getMyPendingActivationChargeCardListView, getMyRequestOnHoldChargeCardListWithShippingAddress, clearChargeCardRepaymentDetail, fetchChargeCardRepaymentDetail, initiateChargeCardRepayment, updateChargeCardRepaymentLocalStore, getChargeCardRepaymentDetail, fetchChargeCardPaymentPage, fetchChargeCardPaymentHistory, updatePaymentHistoryDownloadUIState, updatePaymentHistoryFilters, updatePaymentHistorySearchText, updatePaymentHistoryUIState, getChargeCardPaymentHistoryDownloadReport, getChargeCardPaymentHistoryView, getPaymentHistorySourceAccountName, getPaymentStatusDisplayText, PAYMENT_HISTORY_FILTER_CATEGORIES, getCreditAccountDetails, fetchChargeCardDetailPage, fetchChargeCardDetail, fetchChargeCardTransactionStatistics, fetchDepositAccountLimit, getChargeCardDetailView, getChargeCardControlDetailView, getDepositAccountLimitFetchStateByDepositAccountId, getChargeCardTransactionAttachmentView, getDebitCardSetPinView, getChargeCardRecurringExpensesByCardIds, getChargeCardRecurringExpensesView, getChargeCardRowActionView, getChargeCardBulkActionView, getChargeCardCVVActivateView, fetchChargeCardTransactionList, fetchCashbackDetail, toChargeCardSortKeyType, getCashbackDetail, getZeniDateFromPeriod, toCreditLimitFrequencyCodeType, getDepositAccountListWithDebitCardIssued, getIssueChargeCardView, getChargeCardSetupViewDetails, fetchChargeCardStatementList, getChargeCardStatements, fetchChargeCardSetupView, enableChargeCardAutoPay, acceptChargeCardTerms, expressInterestInChargeCard, getDepositAccountLimitForChargeCardByDepositAccountId, toCardAddressType, toShippingAddressType, toCardType, issueChargeCards, fetchIssueCardPage, fetchDepositAccountListForCards, getDebitCardList, getDebitCardSummary, updateCustomAddressId, updateChargeCardsLocalStore, resetIssueChargeCardForm, updateBulkActionCardIds, updateChargeCardListSearchText, updateChargeCardListUIState, updateCashbackDetailUIState, updateChargeCardDetail, updatePhysicalChargeCardAttempt, lockChargeCard, unlockChargeCard, closeChargeCard, updateChargeCardName, getCardUserOnboardingView, initializeCardUserOnboardingLocalData, updateCardUserOnboardingLocalData, saveCardOnboardingUserDetails, updateChargeCardTransactionUploadReceiptsFetchStatus, completeDebitCardSetPinWait, startDebitCardSetPinWait, updateDebitCardPinAttempt, updateChargeCardTransactionReceiptsShowTickFetchStatus, updateChargeCardTransactionIsViewReceiptClicked, fetchChargeCardTransactionAttachments, completeCVVActivationWait, startCVVActivationWait, updateChargeCardSpendLimit, updateChargeCardSpendLimitSuccessOrFailure, resendCardInvite, revokeCardInvite, updateRowActionCardId, revokeChargeCardsInvite, lockChargeCards, unlockChargeCards, closeChargeCards, updateChargeCardsSpendLimit, fetchChargeCardsRecurringExpenses, startCardUserOnboardingActivationWait, completeCardUserOnboardingActivationWait, setFirstViewAfterActivation, setFirstViewCompleteAfterActivation, setCurrentDisplayedCardId, getChargeCardById, anyCardOnHold, };
567
567
  export { TIME_SERIES_DURATIONS, convertToTimeSeriesSelectionRange, toTimeSeriesDuration, fetchAggregatedReport, aggregatedReportView, };
568
568
  export { fetchApAging, getApAgingReport, updateApAgingUIState, };
569
569
  export { fetchApAgingDetail, getApAgingDetailForVendor, updateApAgingDetailUIState, };
@@ -27,10 +27,6 @@ export const initialTransactionTabViewState = {
27
27
  totalCount: {},
28
28
  limit: 10,
29
29
  },
30
- filters: {
31
- categoryCombinationOperator: 'AND',
32
- categories: [],
33
- },
34
30
  fetchState: 'Not-Started',
35
31
  error: undefined,
36
32
  hasValidState() {
@@ -239,12 +235,6 @@ const expenseAutomationTransactionsView = createSlice({
239
235
  uiState.totalCount;
240
236
  }
241
237
  },
242
- updateTransactionFilters(draft, action) {
243
- const { selectedTab, filters } = action.payload;
244
- if (filters != null) {
245
- draft.transactionCategorizationView[selectedTab].filters = filters;
246
- }
247
- },
248
238
  saveTransactionCategorization: {
249
239
  prepare(selectedTab, transactionIds, cotTrackingByTransactionId, isUncategorizedExpenseCategoryEnabled) {
250
240
  return {
@@ -780,5 +770,5 @@ const expenseAutomationTransactionsView = createSlice({
780
770
  },
781
771
  },
782
772
  });
783
- export const { fetchTransactionCategorization, updateTransactionCategorizationUIState, updateTransactionFilters, initializeTransactionCategorizationViewLocalData, saveTransactionCategorizationLocalData, fetchTransactionCategorizationFailure, saveTransactionCategorization, updateTransactionCategorization, updateCurrentSelectedTransactionCategorizationTab, updateTransactionCategorizationSaveStatus, markTransactionAsNotMiscategorized, updateStatusForTransactionNotMiscategorizedUpdateForCategorization, updateSelectedVendorForTransaction, updateSelectedCustomerForTransaction, setAllItemsToCategoryClassInLocalDataForCategorization, updateTotalCountForTransactionCategorization, fetchTransactionCategorizationSuccess, resetOtherTabsFetchState, fetchTransactionCategorizationView, updateSelectedCheckboxTransactionIds, clearExpenseAutomationTransactionsViewPerTabView, clearExpenseAutomationTransactionsView, setEntityRecommendationForLineIdsForCategorization, updateSelectedTransactionId, syncTransactionCategorizationFromDetailSave, backgroundRefetchReviewTab, } = expenseAutomationTransactionsView.actions;
773
+ export const { fetchTransactionCategorization, updateTransactionCategorizationUIState, initializeTransactionCategorizationViewLocalData, saveTransactionCategorizationLocalData, fetchTransactionCategorizationFailure, saveTransactionCategorization, updateTransactionCategorization, updateCurrentSelectedTransactionCategorizationTab, updateTransactionCategorizationSaveStatus, markTransactionAsNotMiscategorized, updateStatusForTransactionNotMiscategorizedUpdateForCategorization, updateSelectedVendorForTransaction, updateSelectedCustomerForTransaction, setAllItemsToCategoryClassInLocalDataForCategorization, updateTotalCountForTransactionCategorization, fetchTransactionCategorizationSuccess, resetOtherTabsFetchState, fetchTransactionCategorizationView, updateSelectedCheckboxTransactionIds, clearExpenseAutomationTransactionsViewPerTabView, clearExpenseAutomationTransactionsView, setEntityRecommendationForLineIdsForCategorization, updateSelectedTransactionId, syncTransactionCategorizationFromDetailSave, backgroundRefetchReviewTab, } = expenseAutomationTransactionsView.actions;
784
774
  export default expenseAutomationTransactionsView.reducer;