@zeniai/client-epic-state 5.0.65-betaRR7 → 5.0.65

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 (117) hide show
  1. package/lib/common/aiCfo/aiCfoSuggestedQuestionsPageContext.d.ts +1 -1
  2. package/lib/entity/aiCfo/aiCfoPayload.d.ts +1 -171
  3. package/lib/entity/aiCfo/aiCfoReducer.d.ts +1 -7
  4. package/lib/entity/aiCfo/aiCfoReducer.js +4 -219
  5. package/lib/entity/aiCfo/aiCfoState.d.ts +4 -163
  6. package/lib/entity/aiCfo/aiCfoState.js +1 -10
  7. package/lib/entity/jeSchedules/jeSchedulesTypes.d.ts +1 -1
  8. package/lib/entity/monthEndCloseChecks/monthEndCloseChecksState.d.ts +1 -1
  9. package/lib/entity/snackbar/snackbarTypes.d.ts +1 -1
  10. package/lib/entity/snackbar/snackbarTypes.js +0 -2
  11. package/lib/entity/tenant/clearAllEpic.d.ts +2 -6
  12. package/lib/entity/tenant/clearAllEpic.js +0 -8
  13. package/lib/epic.d.ts +1 -11
  14. package/lib/epic.js +1 -11
  15. package/lib/esm/entity/aiCfo/aiCfoReducer.js +4 -219
  16. package/lib/esm/entity/aiCfo/aiCfoState.js +0 -7
  17. package/lib/esm/entity/snackbar/snackbarTypes.js +0 -2
  18. package/lib/esm/entity/tenant/clearAllEpic.js +0 -8
  19. package/lib/esm/epic.js +1 -11
  20. package/lib/esm/index.js +4 -19
  21. package/lib/esm/reducer.js +0 -12
  22. package/lib/esm/view/aiCfoView/aiCfoViewReducer.js +3 -6
  23. package/lib/esm/view/aiCfoView/epics/createSessionAndSubmitEpic.js +2 -5
  24. package/lib/esm/view/aiCfoView/epics/createSessionEpic.js +1 -2
  25. package/lib/esm/view/aiCfoView/epics/fetchSuggestedQuestionsEpic.js +2 -12
  26. package/lib/esm/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.js +0 -25
  27. package/lib/index.d.ts +4 -17
  28. package/lib/index.js +11 -112
  29. package/lib/reducer.d.ts +0 -12
  30. package/lib/reducer.js +0 -12
  31. package/lib/tsconfig.typecheck.tsbuildinfo +1 -0
  32. package/lib/view/aiCfoView/aiCfoViewReducer.d.ts +2 -11
  33. package/lib/view/aiCfoView/aiCfoViewReducer.js +3 -6
  34. package/lib/view/aiCfoView/epics/createSessionAndSubmitEpic.js +2 -5
  35. package/lib/view/aiCfoView/epics/createSessionEpic.js +1 -2
  36. package/lib/view/aiCfoView/epics/fetchSuggestedQuestionsEpic.d.ts +1 -8
  37. package/lib/view/aiCfoView/epics/fetchSuggestedQuestionsEpic.js +2 -12
  38. package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.d.ts +1 -1
  39. package/lib/view/expenseAutomationView/types/jeSchedulesViewState.d.ts +1 -1
  40. package/lib/view/expenseAutomationView/types/missingReceiptsViewState.d.ts +2 -2
  41. package/lib/view/expenseAutomationView/types/transactionsViewState.d.ts +1 -1
  42. package/lib/view/people/peopleTypes.d.ts +1 -1
  43. package/lib/view/scheduleView/scheduleListView/scheduleListTypes.d.ts +1 -1
  44. package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardList.d.ts +1 -1
  45. package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.d.ts +0 -14
  46. package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.js +1 -27
  47. package/lib/view/taskManager/taskListView/taskListReducer.d.ts +1 -1
  48. package/package.json +1 -1
  49. package/lib/entity/cardPolicy/cardPolicyPayload.d.ts +0 -277
  50. package/lib/entity/cardPolicy/cardPolicyPayload.js +0 -143
  51. package/lib/entity/cardPolicy/cardPolicyReducer.d.ts +0 -19
  52. package/lib/entity/cardPolicy/cardPolicyReducer.js +0 -256
  53. package/lib/entity/cardPolicy/cardPolicySelector.d.ts +0 -32
  54. package/lib/entity/cardPolicy/cardPolicySelector.js +0 -103
  55. package/lib/entity/cardPolicy/cardPolicyState.d.ts +0 -205
  56. package/lib/entity/cardPolicy/cardPolicyState.js +0 -14
  57. package/lib/entity/cardPolicy/extractPolicyDocumentEpic.d.ts +0 -18
  58. package/lib/entity/cardPolicy/extractPolicyDocumentEpic.js +0 -54
  59. package/lib/entity/cardPolicy/fetchCardPolicyVendorOptionsEpic.d.ts +0 -26
  60. package/lib/entity/cardPolicy/fetchCardPolicyVendorOptionsEpic.js +0 -47
  61. package/lib/entity/cardPolicy/policyDocumentExtractionToRecommendationBridgeEpic.d.ts +0 -25
  62. package/lib/entity/cardPolicy/policyDocumentExtractionToRecommendationBridgeEpic.js +0 -39
  63. package/lib/entity/cardPolicy/policyRecommendationFromUploadEpic.d.ts +0 -23
  64. package/lib/entity/cardPolicy/policyRecommendationFromUploadEpic.js +0 -92
  65. package/lib/esm/entity/cardPolicy/cardPolicyPayload.js +0 -130
  66. package/lib/esm/entity/cardPolicy/cardPolicyReducer.js +0 -252
  67. package/lib/esm/entity/cardPolicy/cardPolicySelector.js +0 -79
  68. package/lib/esm/entity/cardPolicy/cardPolicyState.js +0 -9
  69. package/lib/esm/entity/cardPolicy/extractPolicyDocumentEpic.js +0 -50
  70. package/lib/esm/entity/cardPolicy/fetchCardPolicyVendorOptionsEpic.js +0 -43
  71. package/lib/esm/entity/cardPolicy/policyDocumentExtractionToRecommendationBridgeEpic.js +0 -35
  72. package/lib/esm/entity/cardPolicy/policyRecommendationFromUploadEpic.js +0 -88
  73. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailReducer.js +0 -70
  74. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailSelector.js +0 -22
  75. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailState.js +0 -1
  76. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/fetchCardPolicyDetailEpic.js +0 -56
  77. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/updateCardPolicyEpic.js +0 -49
  78. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/archiveCardPolicyEpic.js +0 -42
  79. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListReducer.js +0 -72
  80. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListSelector.js +0 -21
  81. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListState.js +0 -1
  82. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/fetchCardPolicyListEpic.js +0 -56
  83. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyReducer.js +0 -59
  84. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicySelector.js +0 -31
  85. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyState.js +0 -1
  86. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyTemplateEpic.js +0 -53
  87. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/fetchCardPolicyMccCategoriesEpic.js +0 -25
  88. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailReducer.d.ts +0 -14
  89. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailReducer.js +0 -74
  90. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailSelector.d.ts +0 -21
  91. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailSelector.js +0 -28
  92. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailState.d.ts +0 -25
  93. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailState.js +0 -2
  94. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/fetchCardPolicyDetailEpic.d.ts +0 -19
  95. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/fetchCardPolicyDetailEpic.js +0 -60
  96. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/updateCardPolicyEpic.d.ts +0 -18
  97. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/updateCardPolicyEpic.js +0 -53
  98. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/archiveCardPolicyEpic.d.ts +0 -16
  99. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/archiveCardPolicyEpic.js +0 -46
  100. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListReducer.d.ts +0 -15
  101. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListReducer.js +0 -76
  102. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListSelector.d.ts +0 -21
  103. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListSelector.js +0 -27
  104. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListState.d.ts +0 -19
  105. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListState.js +0 -2
  106. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/fetchCardPolicyListEpic.d.ts +0 -19
  107. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/fetchCardPolicyListEpic.js +0 -60
  108. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyReducer.d.ts +0 -13
  109. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyReducer.js +0 -63
  110. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicySelector.d.ts +0 -26
  111. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicySelector.js +0 -37
  112. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyState.d.ts +0 -36
  113. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyState.js +0 -2
  114. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyTemplateEpic.d.ts +0 -25
  115. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyTemplateEpic.js +0 -57
  116. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/fetchCardPolicyMccCategoriesEpic.d.ts +0 -15
  117. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/fetchCardPolicyMccCategoriesEpic.js +0 -29
@@ -25,18 +25,17 @@ export declare const submitQuestion: import("@reduxjs/toolkit").ActionCreatorWit
25
25
  }, "aiCfoView/updateResponseState">, updateAiCfoViewScrollPosition: import("@reduxjs/toolkit").ActionCreatorWithPayload<number, "aiCfoView/updateAiCfoViewScrollPosition">, updateCurrentInput: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "aiCfoView/updateCurrentInput">, clearInput: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"aiCfoView/clearInput">, setSession: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
26
26
  agentId: string;
27
27
  sessionId: string;
28
- }, "aiCfoView/setSession">, createSession: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[agentId: string, userId: string, contextRefId?: string | undefined, contextType?: string | undefined, pageContext?: string | undefined], {
28
+ }, "aiCfoView/setSession">, createSession: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[agentId: string, userId: string, contextRefId?: string | undefined, contextType?: string | undefined], {
29
29
  agentId: string;
30
30
  contextRefId: string | undefined;
31
31
  contextType: string | undefined;
32
- pageContext: string | undefined;
33
32
  userId: string;
34
33
  }, "aiCfoView/createSession", never, never>, createSessionSuccess: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
35
34
  agentId: string;
36
35
  sessionId: ID;
37
36
  contextMessage?: string;
38
37
  contextStatus?: ContextStatus;
39
- }, "aiCfoView/createSessionSuccess">, createSessionFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<ZeniAPIStatus<Record<string, unknown>>, "aiCfoView/createSessionFailure">, createSessionAndSubmit: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[agentId: string, userId: string, questionAnswerId: string, questionId: string, createdAt: import("dayjs").Dayjs, question: string, files?: File[] | undefined, pageContext?: string | undefined], {
38
+ }, "aiCfoView/createSessionSuccess">, createSessionFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<ZeniAPIStatus<Record<string, unknown>>, "aiCfoView/createSessionFailure">, createSessionAndSubmit: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[agentId: string, userId: string, questionAnswerId: string, questionId: string, createdAt: import("dayjs").Dayjs, question: string, files?: File[] | undefined], {
40
39
  agentId: string;
41
40
  userId: string;
42
41
  questionAnswerId: string;
@@ -44,7 +43,6 @@ export declare const submitQuestion: import("@reduxjs/toolkit").ActionCreatorWit
44
43
  createdAt: import("dayjs").Dayjs;
45
44
  question: string;
46
45
  files: File[] | undefined;
47
- pageContext: string | undefined;
48
46
  }, "aiCfoView/createSessionAndSubmit", never, never>, initializeNewSessionState: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
49
47
  agentId: string;
50
48
  sessionId: ID;
@@ -94,13 +92,6 @@ export declare const submitQuestion: import("@reduxjs/toolkit").ActionCreatorWit
94
92
  questionAnswerId: ID;
95
93
  }, "aiCfoView/updateCotCollapsedState">, fetchSuggestedQuestions: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
96
94
  pageContext: AiCfoSuggestedQuestionsPageContext;
97
- /**
98
- * AI Card Creation flow: when true, the epic appends `&no_card_created=true`
99
- * so the backend tailors prompts for a tenant that has not yet created a
100
- * card. The bucket key is unchanged (`pageContext`); see
101
- * `useFetchSuggestedQuestionsWhenReady` for the refetch-on-flag-flip rule.
102
- */
103
- noCardCreated?: boolean;
104
95
  }, "aiCfoView/fetchSuggestedQuestions">, fetchSuggestedQuestionsSuccess: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
105
96
  generatedAt: string;
106
97
  pageContext: AiCfoSuggestedQuestionsPageContext;
@@ -192,10 +192,8 @@ const aiCfoView = (0, toolkit_1.createSlice)({
192
192
  draft.createSessionState.fetchState = 'In-Progress';
193
193
  draft.createSessionState.error = undefined;
194
194
  },
195
- prepare(agentId, userId, contextRefId, contextType, pageContext) {
196
- return {
197
- payload: { agentId, contextRefId, contextType, pageContext, userId },
198
- };
195
+ prepare(agentId, userId, contextRefId, contextType) {
196
+ return { payload: { agentId, contextRefId, contextType, userId } };
199
197
  },
200
198
  },
201
199
  createSessionSuccess(draft, action) {
@@ -226,7 +224,7 @@ const aiCfoView = (0, toolkit_1.createSlice)({
226
224
  draft.createSessionAndSubmitState.fetchState = 'In-Progress';
227
225
  draft.createSessionAndSubmitState.error = undefined;
228
226
  },
229
- prepare(agentId, userId, questionAnswerId, questionId, createdAt, question, files, pageContext) {
227
+ prepare(agentId, userId, questionAnswerId, questionId, createdAt, question, files) {
230
228
  return {
231
229
  payload: {
232
230
  agentId,
@@ -236,7 +234,6 @@ const aiCfoView = (0, toolkit_1.createSlice)({
236
234
  createdAt,
237
235
  question,
238
236
  files,
239
- pageContext,
240
237
  },
241
238
  };
242
239
  },
@@ -69,11 +69,8 @@ function waitForChannelSubscription(pusherInstance, channelName, timeoutMs = 500
69
69
  }));
70
70
  }
71
71
  const createSessionAndSubmitEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(aiCfoViewReducer_1.createSessionAndSubmit.match), (0, operators_1.switchMap)((action) => {
72
- const { agentId, userId, questionAnswerId, questionId, createdAt, question, files, pageContext, } = action.payload;
73
- const payload = {
74
- agent_id: agentId,
75
- ...(pageContext != null && { page_context: pageContext }),
76
- };
72
+ const { agentId, userId, questionAnswerId, questionId, createdAt, question, files, } = action.payload;
73
+ const payload = { agent_id: agentId };
77
74
  return zeniAPI
78
75
  .postAndGetJSON(`${zeniAPI.apiEndPoints.aiCfoMicroServiceBaseUrl}/1.0/sessions`, payload)
79
76
  .pipe((0, operators_1.mergeMap)((response) => {
@@ -8,12 +8,11 @@ const responsePayload_1 = require("../../../responsePayload");
8
8
  const zeniDayJS_1 = require("../../../zeniDayJS");
9
9
  const aiCfoViewReducer_1 = require("../aiCfoViewReducer");
10
10
  const createSessionEpic = (actions$, _, zeniAPI) => actions$.pipe((0, operators_1.filter)(aiCfoViewReducer_1.createSession.match), (0, operators_1.switchMap)((action) => {
11
- const { agentId, contextRefId, contextType, pageContext, userId } = action.payload;
11
+ const { agentId, contextRefId, contextType, userId } = action.payload;
12
12
  const payload = {
13
13
  agent_id: agentId,
14
14
  ...(contextRefId != null && { context_ref_id: contextRefId }),
15
15
  ...(contextType != null && { context_type: contextType }),
16
- ...(pageContext != null && { page_context: pageContext }),
17
16
  };
18
17
  return zeniAPI
19
18
  .postAndGetJSON(`${zeniAPI.apiEndPoints.aiCfoMicroServiceBaseUrl}/1.0/sessions`, payload)
@@ -4,12 +4,5 @@ import { RootState } from '../../../reducer';
4
4
  import { ZeniAPI } from '../../../zeniAPI';
5
5
  import { fetchSuggestedQuestions, fetchSuggestedQuestionsFailure, fetchSuggestedQuestionsSuccess } from '../aiCfoViewReducer';
6
6
  export type ActionType = ReturnType<typeof fetchSuggestedQuestions> | ReturnType<typeof fetchSuggestedQuestionsSuccess> | ReturnType<typeof fetchSuggestedQuestionsFailure>;
7
- /**
8
- * GET {aiCfoMicroServiceBaseUrl}/1.0/suggested-questions?page_context=...
9
- *
10
- * Appends `&no_card_created=true` when the action payload sets
11
- * `noCardCreated: true` (AI Card Creation flow on the cards list — the tenant
12
- * has not yet created any card). Any other value omits the flag entirely so
13
- * the existing call sites continue to issue the unchanged request.
14
- */
7
+ /** GET {aiCfoMicroServiceBaseUrl}/1.0/suggested-questions?page_context=... */
15
8
  export declare const fetchSuggestedQuestionsEpic: (actions$: ActionsObservable<ActionType>, _state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
@@ -5,23 +5,13 @@ const rxjs_1 = require("rxjs");
5
5
  const operators_1 = require("rxjs/operators");
6
6
  const responsePayload_1 = require("../../../responsePayload");
7
7
  const aiCfoViewReducer_1 = require("../aiCfoViewReducer");
8
- /**
9
- * GET {aiCfoMicroServiceBaseUrl}/1.0/suggested-questions?page_context=...
10
- *
11
- * Appends `&no_card_created=true` when the action payload sets
12
- * `noCardCreated: true` (AI Card Creation flow on the cards list — the tenant
13
- * has not yet created any card). Any other value omits the flag entirely so
14
- * the existing call sites continue to issue the unchanged request.
15
- */
8
+ /** GET {aiCfoMicroServiceBaseUrl}/1.0/suggested-questions?page_context=... */
16
9
  const fetchSuggestedQuestionsEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(aiCfoViewReducer_1.fetchSuggestedQuestions.match),
17
10
  // mergeMap (not switchMap): each page_context is keyed separately in Redux; switchMap
18
11
  // would cancel in-flight HTTP for context A when B is requested, leaving A stuck In-Progress.
19
12
  (0, operators_1.mergeMap)((action) => {
20
- const { pageContext, noCardCreated } = action.payload;
13
+ const { pageContext } = action.payload;
21
14
  const query = new URLSearchParams({ page_context: pageContext });
22
- if (noCardCreated === true) {
23
- query.set('no_card_created', 'true');
24
- }
25
15
  const url = `${zeniAPI.apiEndPoints.aiCfoMicroServiceBaseUrl}/1.0/suggested-questions?${query.toString()}`;
26
16
  return zeniAPI.getJSON(url).pipe((0, operators_1.mergeMap)((response) => {
27
17
  if ((0, responsePayload_1.isSuccessResponse)(response) && response.data != null) {
@@ -38,7 +38,7 @@ export declare const getLineItemsByTransactionsIdsFromResponse: (transactions: S
38
38
  export declare const getLineItemsByTransactionIdsFromLocalData: (transactionLocalData: TransactionReviewLocalDataSelectorView[], selectedTab: TransactionsTab) => Record<ID, string[]>;
39
39
  export declare const mergeTabSpecificLineItems: (currentTabSpecificLineItems: TabSpecificLineItems, selectedTab: TransactionsTab, newLineItems: TabSpecificLineItems) => TabSpecificLineItems;
40
40
  export declare const getSnackbarMessageForTransactionReview: (updatedCount: number, failedCount: number, categorizedCount: number) => {
41
- messageSection: "common" | "transactionDetails_updatingPastTransactions" | "transactionDetails_transactionUpdated" | "cockpit_month_end_email_sent" | "cockpit_month_end_email_save" | "cockpit_month_end_email_attachment_upload" | "je_bill_link" | "je_posted" | "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_setup" | "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" | "reimbursement_bulk_submit" | "reimbursement_bulk_processed" | "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" | "bill_pay_refund" | "bill_pay_retry" | "bill_pay_marked_as_paid" | "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" | "charge_card_receipt_upload" | "charge_card_resend_invite" | "charge_card_revoke_invite" | "card_policy_created" | "card_policy_updated" | "charge_card_update_limit" | "charge_cards_update_limit" | "close_charge_card" | "lock_charge_card" | "lock_charge_card_card_user" | "lock_charge_cards" | "unlock_charge_card" | "unlock_charge_card_card_user" | "unlock_charge_cards" | "close_charge_cards" | "revoke_invite_charge_cards" | "charge_card_express_interest" | "create_schedule" | "save_schedule" | "delete_schedule" | "ignore_schedule" | "save_task_detail" | "fetch_task_detail" | "delete_task" | "archive_task" | "snooze_task" | "unsnooze_task" | "create_tag" | "delete_tag" | "update_charge_card" | "update_charge_card_name" | "update_charge_card_name_card_user" | "issue_charge_card" | "issue_charge_cards" | "notification_settings_saved" | "referral_invite_sent" | "notification_mark_as_read" | "mark_as_complete_schedule" | "cancel_journal_entry" | "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" | "task_time_spent_validation" | "missing_receipts_attachment" | "flux_analysis_unreviewed" | "flux_analysis_reviewed" | "receipt_match" | "receipts_upload" | "receipts_bulk_match" | "billing_address_view" | "express_pay_submit" | "exclude_transaction" | "reconcile" | "save_reconcile_for_later" | "recon_transaction_categorize" | "recon_transaction_match" | "update_debit_card_pin_attempt" | "set_debit_card_pin" | "ai_cfo_create_session_and_submit" | "ai_cfo_chat_session_deleted" | "charge_card_auto_pay_enable" | "charge_card_auto_pay_disable" | "treasury_setup" | "treasury_accept_term" | "treasury_transfer_money" | "treasury_transfer_money_failed" | "auto_transfer_rule_create" | "auto_transfer_rule_update" | "auto_transfer_rule_delete" | "auto_transfer_rule_pause" | "auto_transfer_rule_resume" | "treasury_update_portfolio_allocation" | "send_email_magic_link_to_user" | "complete_profile_done" | "reports_resync" | "invalid_phone_number" | "transactions_categorized_updated_failed" | "transaction_categorized_updated_failed" | "transactionsCategorized_transactionsUpdated" | "transactionsCategorized_transactionUpdated" | "transactionCategorized_transactionsUpdated" | "transactionCategorized_transactionUpdated" | "transactionsCategorized_transactionsFailed" | "transactionsCategorized_transactionFailed" | "transactionCategorized_transactionsFailed" | "transactionCategorized_transactionFailed" | "transactionsUpdated_transactionsFailed" | "transactionsUpdated_transactionFailed" | "transactionUpdated_transactionsFailed" | "transactionUpdated_transactionFailed" | "transactionsCategorized_transactionsUpdated_transactionsFailed" | "transactionsCategorized_transactionsUpdated_transactionFailed" | "transactionsCategorized_transactionUpdated_transactionsFailed" | "transactionCategorized_transactionsUpdated_transactionsFailed" | "transactionsCategorized_transactionUpdated_transactionFailed" | "transactionCategorized_transactionsUpdated_transactionFailed" | "transactionCategorized_transactionUpdated_transactionsFailed" | "transactionCategorized_transactionUpdated_transactionFailed" | "accounting_classes_enabled_update" | "account_excluded_from_reconciliation" | "account_included_in_reconciliation" | "ai_accountant_trigger_job" | "oauth_consent_approve" | "oauth_consent_invalid_request" | "credit_agent_update_profile" | "credit_agent_save_macro" | "credit_agent_schedule_cron";
41
+ messageSection: "common" | "transactionDetails_updatingPastTransactions" | "transactionDetails_transactionUpdated" | "cockpit_month_end_email_sent" | "cockpit_month_end_email_save" | "cockpit_month_end_email_attachment_upload" | "je_bill_link" | "je_posted" | "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_setup" | "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" | "reimbursement_bulk_submit" | "reimbursement_bulk_processed" | "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" | "bill_pay_refund" | "bill_pay_retry" | "bill_pay_marked_as_paid" | "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" | "charge_card_receipt_upload" | "charge_card_resend_invite" | "charge_card_revoke_invite" | "charge_card_update_limit" | "charge_cards_update_limit" | "close_charge_card" | "lock_charge_card" | "lock_charge_card_card_user" | "lock_charge_cards" | "unlock_charge_card" | "unlock_charge_card_card_user" | "unlock_charge_cards" | "close_charge_cards" | "revoke_invite_charge_cards" | "charge_card_express_interest" | "create_schedule" | "save_schedule" | "delete_schedule" | "ignore_schedule" | "save_task_detail" | "fetch_task_detail" | "delete_task" | "archive_task" | "snooze_task" | "unsnooze_task" | "create_tag" | "delete_tag" | "update_charge_card" | "update_charge_card_name" | "update_charge_card_name_card_user" | "issue_charge_card" | "issue_charge_cards" | "notification_settings_saved" | "referral_invite_sent" | "notification_mark_as_read" | "mark_as_complete_schedule" | "cancel_journal_entry" | "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" | "task_time_spent_validation" | "missing_receipts_attachment" | "flux_analysis_unreviewed" | "flux_analysis_reviewed" | "receipt_match" | "receipts_upload" | "receipts_bulk_match" | "billing_address_view" | "express_pay_submit" | "exclude_transaction" | "reconcile" | "save_reconcile_for_later" | "recon_transaction_categorize" | "recon_transaction_match" | "update_debit_card_pin_attempt" | "set_debit_card_pin" | "ai_cfo_create_session_and_submit" | "ai_cfo_chat_session_deleted" | "charge_card_auto_pay_enable" | "charge_card_auto_pay_disable" | "treasury_setup" | "treasury_accept_term" | "treasury_transfer_money" | "treasury_transfer_money_failed" | "auto_transfer_rule_create" | "auto_transfer_rule_update" | "auto_transfer_rule_delete" | "auto_transfer_rule_pause" | "auto_transfer_rule_resume" | "treasury_update_portfolio_allocation" | "send_email_magic_link_to_user" | "complete_profile_done" | "reports_resync" | "invalid_phone_number" | "transactions_categorized_updated_failed" | "transaction_categorized_updated_failed" | "transactionsCategorized_transactionsUpdated" | "transactionsCategorized_transactionUpdated" | "transactionCategorized_transactionsUpdated" | "transactionCategorized_transactionUpdated" | "transactionsCategorized_transactionsFailed" | "transactionsCategorized_transactionFailed" | "transactionCategorized_transactionsFailed" | "transactionCategorized_transactionFailed" | "transactionsUpdated_transactionsFailed" | "transactionsUpdated_transactionFailed" | "transactionUpdated_transactionsFailed" | "transactionUpdated_transactionFailed" | "transactionsCategorized_transactionsUpdated_transactionsFailed" | "transactionsCategorized_transactionsUpdated_transactionFailed" | "transactionsCategorized_transactionUpdated_transactionsFailed" | "transactionCategorized_transactionsUpdated_transactionsFailed" | "transactionsCategorized_transactionUpdated_transactionFailed" | "transactionCategorized_transactionsUpdated_transactionFailed" | "transactionCategorized_transactionUpdated_transactionsFailed" | "transactionCategorized_transactionUpdated_transactionFailed" | "accounting_classes_enabled_update" | "account_excluded_from_reconciliation" | "account_included_in_reconciliation" | "ai_accountant_trigger_job" | "oauth_consent_approve" | "oauth_consent_invalid_request" | "credit_agent_update_profile" | "credit_agent_save_macro" | "credit_agent_schedule_cron";
42
42
  messageText: "notification" | "failed" | "success";
43
43
  type: "error" | "success" | "info";
44
44
  variables: {
@@ -6,7 +6,7 @@ import { MonthYearPeriodId } from '../../../commonStateTypes/timePeriod';
6
6
  import { AccountBase } from '../../../entity/account/accountState';
7
7
  import { JEScheduleTransactionKey, ScheduleTypes } from '../../../entity/jeSchedules/jeSchedulesTypes';
8
8
  import { VendorBase } from '../../../entity/vendor/vendorState';
9
- export declare const toJEScheduleSortKey: (v: string) => "vendor" | "type" | "class" | "category" | "memo" | "transactionDate" | "totalAmount" | "runningBalance" | "depCategory" | "scheduleCategory" | "startMonth" | "amortizationPeriod" | "jePostingDate" | "remainingMonths";
9
+ export declare const toJEScheduleSortKey: (v: string) => "vendor" | "type" | "category" | "class" | "memo" | "transactionDate" | "totalAmount" | "runningBalance" | "depCategory" | "scheduleCategory" | "startMonth" | "amortizationPeriod" | "jePostingDate" | "remainingMonths";
10
10
  export type JEScheduleSortKey = ReturnType<typeof toJEScheduleSortKey>;
11
11
  export declare const toJEScheduleMainTab: (v: string) => "completed" | "pending_review" | "ongoing";
12
12
  export type JEScheduleMainTab = ReturnType<typeof toJEScheduleMainTab>;
@@ -2,7 +2,7 @@ import { FetchStateAndError, FetchedState, ID } from '../../../commonStateTypes/
2
2
  import { SortOrder } from '../../../commonStateTypes/selectorTypes/sortOrderTypes';
3
3
  import { MonthYearPeriodId } from '../../../commonStateTypes/timePeriod';
4
4
  import { CompletedSubTab } from './completedSubTab';
5
- export declare const toMissingReceiptsSortKey: (v: string) => "date" | "amount" | "vendor" | "class" | "category";
5
+ export declare const toMissingReceiptsSortKey: (v: string) => "date" | "amount" | "vendor" | "category" | "class";
6
6
  export type MissingReceiptsSortKey = ReturnType<typeof toMissingReceiptsSortKey>;
7
7
  export interface MissingReceiptsViewUIState {
8
8
  scrollPosition: {
@@ -34,7 +34,7 @@ export declare const toMissingReceiptsTab: (v: string) => "completed" | "unmatch
34
34
  export type MissingReceiptsTab = ReturnType<typeof toMissingReceiptsTab>;
35
35
  export declare const toMatchSource: (v: string) => "manual" | "ai";
36
36
  export type MatchSource = ReturnType<typeof toMatchSource>;
37
- export declare const toBulkUploadSortKey: (v: string) => "date" | "amount" | "vendor" | "class" | "category";
37
+ export declare const toBulkUploadSortKey: (v: string) => "date" | "amount" | "vendor" | "category" | "class";
38
38
  export type BulkUploadSortKey = ReturnType<typeof toBulkUploadSortKey>;
39
39
  export interface CandidateRef {
40
40
  matchScore: number;
@@ -18,7 +18,7 @@ import { ZeniDate } from '../../../zeniDayJS';
18
18
  import { EntityRecommendationKey } from '../../recommendation/recommendationState';
19
19
  import { TransactionDetailKey } from '../../transactionDetail/transactionDetailState';
20
20
  import { CompletedSubTab } from './completedSubTab';
21
- export declare const toTransactionsSortKey: (v: string) => "date" | "amount" | "vendor" | "project" | "class" | "category" | "payment_account" | "transaction_type" | "memo_and_receipt";
21
+ export declare const toTransactionsSortKey: (v: string) => "date" | "amount" | "vendor" | "project" | "category" | "class" | "payment_account" | "transaction_type" | "memo_and_receipt";
22
22
  export type TransactionsSortKey = ReturnType<typeof toTransactionsSortKey>;
23
23
  export declare const TRANSACTIONS_TABS: readonly ["review", "autoCategorized"];
24
24
  export declare const toTransactionsTabKey: (v: string) => "review" | "autoCategorized";
@@ -1,3 +1,3 @@
1
- declare const toPeopleSortKeyType: (v: string) => "department" | "name" | "role" | "manager" | "lastSeen";
1
+ declare const toPeopleSortKeyType: (v: string) => "role" | "manager" | "name" | "department" | "lastSeen";
2
2
  export type PeopleViewSortKey = ReturnType<typeof toPeopleSortKeyType>;
3
3
  export {};
@@ -7,7 +7,7 @@ export declare const getScheduleListKey: (selectedCategory: ID, selectedTimefram
7
7
  export type ScheduleListKey = ReturnType<typeof getScheduleListKey>;
8
8
  export declare const toScheduleSubTabType: (v: string) => "completed" | "new" | "ongoing" | "all";
9
9
  export type ScheduleSubTabType = ReturnType<typeof toScheduleSubTabType>;
10
- declare const toScheduleSortKeyType: (v: string) => "months" | "amount" | "vendor" | "status" | "class" | "user" | "createTime" | "memo" | "balanceAsOfToday" | "transactionDate" | "transactionType" | "assetId" | "scheduleCategory" | "startMonth" | "accruedExpenseCategory" | "expenseCategory" | "accumulatedDepreciationCategory" | "endMonth";
10
+ declare const toScheduleSortKeyType: (v: string) => "months" | "amount" | "vendor" | "status" | "user" | "createTime" | "class" | "memo" | "balanceAsOfToday" | "transactionDate" | "transactionType" | "assetId" | "scheduleCategory" | "startMonth" | "accruedExpenseCategory" | "expenseCategory" | "accumulatedDepreciationCategory" | "endMonth";
11
11
  export declare type ScheduleListSortKey = ReturnType<typeof toScheduleSortKeyType>;
12
12
  export interface DownloadJEScheduleTabOptions {
13
13
  categoryId: ID;
@@ -61,7 +61,7 @@ export declare const initialCreditAcc: CreditAccount;
61
61
  export declare const initialDebitCardSummaries: DebitCardSummaries;
62
62
  export declare const initialResendRevokeCardInvite: ResendRevokeCardInvite;
63
63
  export declare const initialCreditAccountRepayment: CreditAccountRepayment;
64
- export declare const toChargeCardSortKeyType: (v: string) => "status" | "department" | "accountType" | "owner" | "cardName" | "limit" | "cardType" | "utilisation";
64
+ export declare const toChargeCardSortKeyType: (v: string) => "status" | "accountType" | "owner" | "cardName" | "limit" | "department" | "cardType" | "utilisation";
65
65
  export declare type ChargeCardViewSortKey = ReturnType<typeof toChargeCardSortKeyType>;
66
66
  export declare const ALL_CASHBACK_SORT_KEYS: readonly ["month", "cashback"];
67
67
  export declare const toCashbackSortKeyType: (v: string) => "month" | "cashback";
@@ -54,21 +54,7 @@ export interface MyPendingActivationChargeCardListSelectorView extends SelectorV
54
54
  export interface ChargeCardListWithShippingAddressSelectorView extends SelectorView {
55
55
  cards: ChargeCardWithUserAndShippingAddress[];
56
56
  }
57
- export interface AllChargeCardsWithUserSelectorView extends SelectorView {
58
- cards: ChargeCardWithUser[];
59
- }
60
57
  export declare const getChargeCardListView: (state: RootState, includeCreditAccountDebitSummaryAndCashbackInfo: boolean, isDebitCardEnabled: boolean, isCreditCardEnabled: boolean) => ChargeCardListSelectorView;
61
- /**
62
- * Returns every enriched `ChargeCardWithUser` for the tenant, without
63
- * applying the cards-list screen's `searchText` filter or its column
64
- * `sortKey/sortOrder`. Used by surfaces that need the raw card universe
65
- * decoupled from whatever the user has typed/sorted on the cards list
66
- * (e.g. the Card Policy "Apply to Cards" picker, which owns its own
67
- * search + sort UI). The list-screen's filter/sort state is intentionally
68
- * left untouched so revisits to the cards list still restore the user's
69
- * search.
70
- */
71
- export declare const getAllChargeCardsWithUser: (state: RootState) => AllChargeCardsWithUserSelectorView;
72
58
  export declare const getMyPendingActivationChargeCardListView: (state: RootState) => MyPendingActivationChargeCardListSelectorView;
73
59
  export declare const getMyRequestOnHoldChargeCardListWithShippingAddress: (state: RootState) => ChargeCardListWithShippingAddressSelectorView;
74
60
  /**
@@ -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.getChargeCardBulkActionView = exports.getChargeCardRowActionView = exports.getChargeCardRecurringExpensesByCardIds = exports.getDebitCardSummary = exports.getDebitCardList = exports.getDepositAccountListWithDebitCardIssued = exports.getCreditAccountDetails = exports.anyCardOnHold = exports.getMyRequestOnHoldChargeCardListWithShippingAddress = exports.getMyPendingActivationChargeCardListView = exports.getAllChargeCardsWithUser = exports.getChargeCardListView = void 0;
6
+ exports.getChargeCardBulkActionView = exports.getChargeCardRowActionView = exports.getChargeCardRecurringExpensesByCardIds = exports.getDebitCardSummary = exports.getDebitCardList = exports.getDepositAccountListWithDebitCardIssued = exports.getCreditAccountDetails = exports.anyCardOnHold = exports.getMyRequestOnHoldChargeCardListWithShippingAddress = exports.getMyPendingActivationChargeCardListView = exports.getChargeCardListView = void 0;
7
7
  const toolkit_1 = require("@reduxjs/toolkit");
8
8
  const orderBy_1 = __importDefault(require("lodash/orderBy"));
9
9
  const sortOrderPayload_1 = require("../../../../commonPayloadTypes/sortOrderPayload");
@@ -94,32 +94,6 @@ const getChargeCardListView = (state, includeCreditAccountDebitSummaryAndCashbac
94
94
  };
95
95
  };
96
96
  exports.getChargeCardListView = getChargeCardListView;
97
- /**
98
- * Returns every enriched `ChargeCardWithUser` for the tenant, without
99
- * applying the cards-list screen's `searchText` filter or its column
100
- * `sortKey/sortOrder`. Used by surfaces that need the raw card universe
101
- * decoupled from whatever the user has typed/sorted on the cards list
102
- * (e.g. the Card Policy "Apply to Cards" picker, which owns its own
103
- * search + sort UI). The list-screen's filter/sort state is intentionally
104
- * left untouched so revisits to the cards list still restore the user's
105
- * search.
106
- */
107
- const getAllChargeCardsWithUser = (state) => {
108
- const { chargeCardListState, chargeCardState, chargeCardConfigState } = state;
109
- const cards = (0, chargeCardSelector_1.getChargeCardsByIds)(chargeCardState, chargeCardListState.cardIds);
110
- const chargeCardsWithUser = getChargeCardsWithUser(cards, state);
111
- const fetchState = (0, reduceFetchState_1.reduceFetchState)([
112
- chargeCardListState,
113
- chargeCardConfigState,
114
- ]).fetchState;
115
- return {
116
- fetchState,
117
- error: chargeCardListState.error,
118
- cards: chargeCardsWithUser,
119
- version: '1.0',
120
- };
121
- };
122
- exports.getAllChargeCardsWithUser = getAllChargeCardsWithUser;
123
97
  const getMyPendingActivationChargeCardListView = (state) => {
124
98
  const { tenantState, chargeCardListState, chargeCardState } = state;
125
99
  const cards = (0, chargeCardSelector_1.getChargeCardsByIds)(chargeCardState, chargeCardListState.cardIds);
@@ -14,7 +14,7 @@ export declare const fetchTaskListPage: import("@reduxjs/toolkit").ActionCreator
14
14
  archived?: TaskPayload[];
15
15
  deleted?: TaskPayload[];
16
16
  snoozed?: TaskPayload[];
17
- }, "taskList/updateTaskList">, updateTaskListTab: import("@reduxjs/toolkit").ActionCreatorWithPayload<"deleted" | "archived" | "live" | "snoozed", "taskList/updateTaskListTab">, updateTaskListFetchStatus: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
17
+ }, "taskList/updateTaskList">, updateTaskListTab: import("@reduxjs/toolkit").ActionCreatorWithPayload<"deleted" | "live" | "archived" | "snoozed", "taskList/updateTaskListTab">, updateTaskListFetchStatus: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
18
18
  fetchState: FetchState;
19
19
  error?: ZeniAPIStatus;
20
20
  }, "taskList/updateTaskListFetchStatus">, updateTaskListSearchText: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zeniai/client-epic-state",
3
- "version": "5.0.65-betaRR7",
3
+ "version": "5.0.65",
4
4
  "description": "Shared module between Web & Mobile containing required abstractions for state management, async network communication. ",
5
5
  "main": "lib/index.js",
6
6
  "module": "lib/esm/index.js",
@@ -1,277 +0,0 @@
1
- import { ID } from '../../commonStateTypes/common';
2
- import { ZeniAPIResponse } from '../../responsePayload';
3
- import { CardPolicyStats, CardPolicyTemplate, CardPolicyTemplateEntityList, CardPolicyTemplateMode, CardPolicyTemplateSpendLimits, ExtractedCardPolicyRules, MccCategory } from './cardPolicyState';
4
- export interface MccCategoryPayload {
5
- count: number;
6
- mcc_codes: string[];
7
- name: string;
8
- }
9
- /**
10
- * Wire shape for `GET /cards/1.0/cards/mcc-codes`. Beyond the universe of
11
- * MCC categories used to populate the category search dropdown, the
12
- * endpoint also ships **suggested** allow / block merchants and categories
13
- * that the chip-pickers seed into their cloud body before the user starts
14
- * editing.
15
- *
16
- * Field spellings (`*_catagories`) preserve the BE wire format verbatim;
17
- * the camelCase mapper below corrects to `Categories`.
18
- */
19
- export interface CardPolicyMccCategoriesPayload {
20
- categories: MccCategoryPayload[];
21
- suggested_allow_catagories?: MccCategoryPayload[];
22
- suggested_allow_merchants?: string[];
23
- suggested_block_catagories?: MccCategoryPayload[];
24
- suggested_block_merchants?: string[];
25
- }
26
- export type CardPolicyMccCategoriesResponse = ZeniAPIResponse<CardPolicyMccCategoriesPayload>;
27
- export declare const toMccCategory: (payload: MccCategoryPayload) => MccCategory;
28
- /**
29
- * Vendor row returned by `/accounting/1.0/vendors`. The card-policy
30
- * vendor search dropdown only needs `vendor_id` + `vendor_name`; we
31
- * deliberately ignore the rest of the payload to keep this slice
32
- * independent of the heavy `vendor` entity store.
33
- */
34
- export interface CardPolicyVendorSearchVendorPayload {
35
- vendor_id: string;
36
- vendor_name: string;
37
- }
38
- export interface CardPolicyVendorSearchData {
39
- vendors: CardPolicyVendorSearchVendorPayload[];
40
- }
41
- export type CardPolicyVendorSearchResponse = ZeniAPIResponse<CardPolicyVendorSearchData>;
42
- export interface CardPolicyVendorSearchOption {
43
- name: string;
44
- vendorId: string;
45
- }
46
- export declare const toCardPolicyVendorSearchOption: (payload: CardPolicyVendorSearchVendorPayload) => CardPolicyVendorSearchOption;
47
- interface CardPolicyTemplateEntityListPayload {
48
- category_codes: string[];
49
- merchant_names: string[];
50
- }
51
- interface CardPolicyTemplateSpendLimitsPayload {
52
- transaction: number | null;
53
- }
54
- /**
55
- * Per-template request shape. `POST /cards/1.0/policy-templates` now
56
- * accepts a bulk wrapper (`CreateCardPolicyTemplatesRequest`); this
57
- * interface describes a single entry inside the `templates` array.
58
- *
59
- * `PUT /cards/1.0/policy-templates/{id}` (update) still consumes this
60
- * shape directly — see `UpdateCardPolicyTemplateRequest` below.
61
- */
62
- export interface CreateCardPolicyTemplateRequest {
63
- allowedEntity: CardPolicyTemplateEntityList;
64
- applyToCards: ID[];
65
- blockedEntity: CardPolicyTemplateEntityList;
66
- description: string;
67
- mode: CardPolicyTemplateMode;
68
- name: string;
69
- /**
70
- * `null` indicates the require-receipt toggle is off (no threshold
71
- * configured). The BE accepts `null` and treats it as "no requirement";
72
- * `0` means the user explicitly entered zero with the toggle on.
73
- */
74
- requiredReceiptThreshold: number | null;
75
- spendLimits: CardPolicyTemplateSpendLimits;
76
- }
77
- export interface CreateCardPolicyTemplateRequestBody {
78
- allowed_entity: CardPolicyTemplateEntityListPayload;
79
- apply_to_cards: ID[];
80
- blocked_entity: CardPolicyTemplateEntityListPayload;
81
- description: string;
82
- mode: string;
83
- name: string;
84
- required_receipt_threshold: number | null;
85
- spend_limits: CardPolicyTemplateSpendLimitsPayload;
86
- }
87
- /**
88
- * Bulk request for `POST /cards/1.0/policy-templates`. The single-policy
89
- * create flow wraps its one request in a length-1 `templates` array;
90
- * future multi-policy submit (AI CFO review step) sends N entries in a
91
- * single round-trip.
92
- *
93
- * `sourceChatSessionId` ties the submit back to an AI CFO chat session so
94
- * the BE can attribute the created templates to it. Manual create-page
95
- * callers omit it.
96
- */
97
- export interface CreateCardPolicyTemplatesRequest {
98
- templates: CreateCardPolicyTemplateRequest[];
99
- sourceChatSessionId?: string;
100
- }
101
- export interface CreateCardPolicyTemplatesRequestBody {
102
- templates: CreateCardPolicyTemplateRequestBody[];
103
- source_chat_session_id?: string;
104
- }
105
- export interface CardPolicyTemplatePayload {
106
- allowed_entity: CardPolicyTemplateEntityListPayload;
107
- applied_cards: ID[];
108
- blocked_entity: CardPolicyTemplateEntityListPayload;
109
- cards_count: number;
110
- category_restrictions: unknown[];
111
- created_at: string;
112
- created_by: ID;
113
- description: string;
114
- mode: string;
115
- name: string;
116
- required_receipt_threshold: number | null;
117
- spend_limits: CardPolicyTemplateSpendLimitsPayload;
118
- status: string;
119
- template_id: ID;
120
- tenant_id: ID;
121
- updated_at: string;
122
- }
123
- /**
124
- * Per-template response envelope. Still returned by `PUT /policy-templates/{id}`,
125
- * `GET /policy-templates/{id}`, and (as the row payload) the list endpoint.
126
- * Also nested inside `CreateCardPolicyTemplatesResponseData.templates_created`.
127
- */
128
- export interface CreateCardPolicyTemplateResponseData {
129
- cards_applied: number;
130
- template: CardPolicyTemplatePayload;
131
- }
132
- export type CreateCardPolicyTemplateResponse = ZeniAPIResponse<CreateCardPolicyTemplateResponseData>;
133
- /**
134
- * Per-item error returned by the bulk POST when one or more templates in
135
- * the request fail validation / persistence. The exact field shape is
136
- * **TBD** with the BE — `message` is the only guaranteed field today; the
137
- * rest are best-effort placeholders that callers should not assume to be
138
- * present.
139
- *
140
- * TODO: lock down the shape (`index`, `name`, `code`) once the BE
141
- * documents it. See plan §"Open question to resolve with BE".
142
- */
143
- export interface BulkCreateCardPolicyTemplateErrorPayload {
144
- message: string;
145
- code?: string;
146
- index?: number;
147
- name?: string;
148
- }
149
- /**
150
- * Wire shape returned by the bulk `POST /cards/1.0/policy-templates`.
151
- * Partial success is allowed — `templates_created` holds the successfully
152
- * created rows (each in the same envelope as the single endpoint), and
153
- * `errors` holds per-item failures for the rest. `status.message` follows
154
- * the "N of M templates created" convention.
155
- */
156
- export interface CreateCardPolicyTemplatesResponseData {
157
- errors: BulkCreateCardPolicyTemplateErrorPayload[];
158
- templates_created: CreateCardPolicyTemplateResponseData[];
159
- }
160
- export type CreateCardPolicyTemplatesResponse = ZeniAPIResponse<CreateCardPolicyTemplatesResponseData>;
161
- /**
162
- * Camel-cased mirror of `BulkCreateCardPolicyTemplateErrorPayload` stored
163
- * on the create-card-policy view slice so the UI can render a partial-success
164
- * banner without re-touching the wire types.
165
- */
166
- export interface BulkCreateCardPolicyTemplateError {
167
- message: string;
168
- code?: string;
169
- index?: number;
170
- name?: string;
171
- }
172
- export type UpdateCardPolicyTemplateRequest = CreateCardPolicyTemplateRequest;
173
- export type UpdateCardPolicyTemplateRequestBody = CreateCardPolicyTemplateRequestBody;
174
- export type UpdateCardPolicyTemplateResponseData = CreateCardPolicyTemplateResponseData;
175
- export type UpdateCardPolicyTemplateResponse = CreateCardPolicyTemplateResponse;
176
- export type CardPolicyDetailResponseData = CreateCardPolicyTemplateResponseData;
177
- export type CardPolicyDetailResponse = CreateCardPolicyTemplateResponse;
178
- /**
179
- * Aggregate counters returned alongside the templates list. Stored on
180
- * the entity slice (alongside `cardPolicyTemplateById`) so any list
181
- * surface can read it without re-fetching.
182
- */
183
- export interface CardPolicyStatsPayload {
184
- active_policies: number;
185
- total_cards: number;
186
- total_templates: number;
187
- }
188
- /**
189
- * Each list row is wrapped in the same `{cards_applied, template}`
190
- * envelope the create endpoint returns. Only the `template` portion is
191
- * stored on the entity slice; `cards_applied` is a one-shot summary
192
- * carried over from create and not surfaced in the list state today.
193
- */
194
- export interface CardPolicyListRowPayload {
195
- data: CreateCardPolicyTemplateResponseData;
196
- }
197
- export interface ListCardPolicyTemplatesResponseData {
198
- stats: CardPolicyStatsPayload;
199
- templates: CardPolicyListRowPayload[];
200
- }
201
- export type ListCardPolicyTemplatesResponse = ZeniAPIResponse<ListCardPolicyTemplatesResponseData>;
202
- export declare const toCardPolicyStats: (payload: CardPolicyStatsPayload) => CardPolicyStats;
203
- export declare const toCardPolicyTemplateList: (data: ListCardPolicyTemplatesResponseData) => CardPolicyTemplate[];
204
- export declare const toCardPolicyTemplate: (payload: CardPolicyTemplatePayload) => CardPolicyTemplate;
205
- /**
206
- * Re-shape a single camelCase create request into the snake_case wire
207
- * body. Used by the bulk-create mapper to build each entry of the
208
- * `templates` array, and directly by the update epic (PUT) since the
209
- * update endpoint still consumes a single object.
210
- */
211
- export declare const toCreateCardPolicyTemplateRequestBody: (request: CreateCardPolicyTemplateRequest) => CreateCardPolicyTemplateRequestBody;
212
- /**
213
- * Re-shape a bulk create request into the snake_case wire body for
214
- * `POST /cards/1.0/policy-templates`. Maps each entry through
215
- * `toCreateCardPolicyTemplateRequestBody` and only emits
216
- * `source_chat_session_id` when the camelCase counterpart is defined,
217
- * so manual-create callers don't ship a stray `undefined` over the wire.
218
- */
219
- export declare const toCreateCardPolicyTemplatesRequestBody: (request: CreateCardPolicyTemplatesRequest) => CreateCardPolicyTemplatesRequestBody;
220
- /**
221
- * Map a single bulk-response error payload to its camelCased view shape.
222
- * Defensive against missing optional fields (see `BulkCreateCardPolicyTemplateErrorPayload`
223
- * docstring — the BE contract isn't fully locked yet).
224
- */
225
- export declare const toBulkCreateCardPolicyTemplateError: (payload: BulkCreateCardPolicyTemplateErrorPayload) => BulkCreateCardPolicyTemplateError;
226
- export declare const toUpdateCardPolicyTemplateRequestBody: (request: CreateCardPolicyTemplateRequest) => CreateCardPolicyTemplateRequestBody;
227
- /**
228
- * Seed an edit-form draft (`CreateCardPolicyTemplateRequest`) from an
229
- * existing camelCased `CardPolicyTemplate`. Used by the detail-fetch
230
- * epic so the edit page can render with the saved values pre-populated.
231
- */
232
- export declare const toCardPolicyEditFormDraft: (template: CardPolicyTemplate) => CreateCardPolicyTemplateRequest;
233
- /**
234
- * Wire shape returned by `POST /cards/1.0/policy-documents/extract`.
235
- * The backend OCRs / parses an uploaded policy document (PDF, image, etc.)
236
- * and returns a best-effort set of policy rules + a confidence score.
237
- *
238
- * Consumers (manual `CardPolicyCreatePage` + AI CFO `CardPolicyInteractiveForm`)
239
- * use `toExtractedCardPolicyRules` to map this onto the camelCase FE shape
240
- * and then feed the result through `applyExtractedPolicyRulesToFormValues`
241
- * (`@zeniai/web-components`) to seed the RHF form.
242
- */
243
- export interface ExtractedCardPolicyRulesPayload {
244
- allowed_entity: CardPolicyTemplateEntityListPayload;
245
- blocked_entity: CardPolicyTemplateEntityListPayload;
246
- confidence_score: number;
247
- policy_name: string;
248
- required_receipt_threshold: number;
249
- transaction_limit: number;
250
- }
251
- export interface PolicyDocumentExtractResponseData {
252
- extracted_rules: ExtractedCardPolicyRulesPayload;
253
- message: string;
254
- }
255
- export type PolicyDocumentExtractResponse = ZeniAPIResponse<PolicyDocumentExtractResponseData>;
256
- export declare const toExtractedCardPolicyRules: (payload: ExtractedCardPolicyRulesPayload) => ExtractedCardPolicyRules;
257
- /**
258
- * Wire shape returned by `POST /cards/1.0/ai-cfo/policy-recommendation-from-upload`.
259
- * Chained after `extractPolicyDocument` succeeds in the AI CFO `upload`
260
- * flow: the FE forwards the just-returned `extracted_rules` and the BE
261
- * synthesizes a wizard plan + upload source metadata.
262
- *
263
- * The response mirrors the same `mode`-discriminated envelope the
264
- * controller API ships for `auto` / `guided`, but always with `mode:
265
- * "upload"` and a populated `wizard_plan.step_5_review`. The FE merges
266
- * the returned `wizard_plan` + `source` into the in-flight AI CFO
267
- * answer's `CardPolicyInitialData` via
268
- * `updateAiCfoAnswerCardPolicyWizardPlan`.
269
- */
270
- export interface CardPolicyRecommendationFromUploadResponseData {
271
- mode: 'upload';
272
- source: import('../aiCfo/aiCfoPayload').CardPolicyUploadSourcePayload;
273
- tenant_id: string;
274
- wizard_plan: import('../aiCfo/aiCfoPayload').CardPolicyWizardPlanPayload;
275
- }
276
- export type CardPolicyRecommendationFromUploadResponse = ZeniAPIResponse<CardPolicyRecommendationFromUploadResponseData>;
277
- export {};