@zeniai/client-epic-state 5.0.65-betaRR6 → 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 (106) hide show
  1. package/lib/common/aiCfo/aiCfoSuggestedQuestionsPageContext.d.ts +1 -1
  2. package/lib/entity/aiCfo/aiCfoPayload.d.ts +1 -168
  3. package/lib/entity/aiCfo/aiCfoReducer.js +2 -186
  4. package/lib/entity/aiCfo/aiCfoState.d.ts +4 -164
  5. package/lib/entity/aiCfo/aiCfoState.js +1 -10
  6. package/lib/entity/jeSchedules/jeSchedulesTypes.d.ts +1 -1
  7. package/lib/entity/monthEndCloseChecks/monthEndCloseChecksState.d.ts +1 -1
  8. package/lib/entity/snackbar/snackbarTypes.d.ts +1 -1
  9. package/lib/entity/snackbar/snackbarTypes.js +0 -2
  10. package/lib/entity/tenant/clearAllEpic.d.ts +2 -6
  11. package/lib/entity/tenant/clearAllEpic.js +0 -8
  12. package/lib/epic.d.ts +1 -9
  13. package/lib/epic.js +1 -9
  14. package/lib/esm/entity/aiCfo/aiCfoReducer.js +3 -187
  15. package/lib/esm/entity/aiCfo/aiCfoState.js +0 -7
  16. package/lib/esm/entity/snackbar/snackbarTypes.js +0 -2
  17. package/lib/esm/entity/tenant/clearAllEpic.js +0 -8
  18. package/lib/esm/epic.js +1 -9
  19. package/lib/esm/index.js +3 -17
  20. package/lib/esm/reducer.js +0 -12
  21. package/lib/esm/view/aiCfoView/epics/fetchSuggestedQuestionsEpic.js +2 -12
  22. package/lib/esm/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.js +0 -25
  23. package/lib/index.d.ts +3 -16
  24. package/lib/index.js +11 -99
  25. package/lib/reducer.d.ts +0 -12
  26. package/lib/reducer.js +0 -12
  27. package/lib/tsconfig.typecheck.tsbuildinfo +1 -0
  28. package/lib/view/aiCfoView/aiCfoViewReducer.d.ts +0 -7
  29. package/lib/view/aiCfoView/epics/fetchSuggestedQuestionsEpic.d.ts +1 -8
  30. package/lib/view/aiCfoView/epics/fetchSuggestedQuestionsEpic.js +2 -12
  31. package/lib/view/companyHealthMetricView/companyHealthMetricViewSelector.d.ts +1 -1
  32. package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.d.ts +1 -1
  33. package/lib/view/expenseAutomationView/types/jeSchedulesViewState.d.ts +1 -1
  34. package/lib/view/expenseAutomationView/types/missingReceiptsViewState.d.ts +2 -2
  35. package/lib/view/expenseAutomationView/types/transactionsViewState.d.ts +1 -1
  36. package/lib/view/onboardingView/cockpitView/types/onboardingCockpitViewTypes.d.ts +1 -1
  37. package/lib/view/people/peopleTypes.d.ts +1 -1
  38. package/lib/view/scheduleView/scheduleListView/scheduleListTypes.d.ts +1 -1
  39. package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardList.d.ts +1 -1
  40. package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.d.ts +0 -14
  41. package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.js +1 -27
  42. package/lib/view/taskManager/taskListView/taskListReducer.d.ts +1 -1
  43. package/package.json +1 -1
  44. package/lib/entity/cardPolicy/cardPolicyPayload.d.ts +0 -176
  45. package/lib/entity/cardPolicy/cardPolicyPayload.js +0 -112
  46. package/lib/entity/cardPolicy/cardPolicyReducer.d.ts +0 -13
  47. package/lib/entity/cardPolicy/cardPolicyReducer.js +0 -203
  48. package/lib/entity/cardPolicy/cardPolicySelector.d.ts +0 -28
  49. package/lib/entity/cardPolicy/cardPolicySelector.js +0 -86
  50. package/lib/entity/cardPolicy/cardPolicyState.d.ts +0 -172
  51. package/lib/entity/cardPolicy/cardPolicyState.js +0 -14
  52. package/lib/entity/cardPolicy/extractPolicyDocumentEpic.d.ts +0 -18
  53. package/lib/entity/cardPolicy/extractPolicyDocumentEpic.js +0 -54
  54. package/lib/entity/cardPolicy/fetchCardPolicyVendorOptionsEpic.d.ts +0 -26
  55. package/lib/entity/cardPolicy/fetchCardPolicyVendorOptionsEpic.js +0 -47
  56. package/lib/esm/entity/cardPolicy/cardPolicyPayload.js +0 -101
  57. package/lib/esm/entity/cardPolicy/cardPolicyReducer.js +0 -199
  58. package/lib/esm/entity/cardPolicy/cardPolicySelector.js +0 -66
  59. package/lib/esm/entity/cardPolicy/cardPolicyState.js +0 -9
  60. package/lib/esm/entity/cardPolicy/extractPolicyDocumentEpic.js +0 -50
  61. package/lib/esm/entity/cardPolicy/fetchCardPolicyVendorOptionsEpic.js +0 -43
  62. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailReducer.js +0 -70
  63. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailSelector.js +0 -22
  64. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailState.js +0 -1
  65. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/fetchCardPolicyDetailEpic.js +0 -56
  66. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/updateCardPolicyEpic.js +0 -49
  67. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/archiveCardPolicyEpic.js +0 -42
  68. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListReducer.js +0 -72
  69. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListSelector.js +0 -21
  70. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListState.js +0 -1
  71. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/fetchCardPolicyListEpic.js +0 -56
  72. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyReducer.js +0 -50
  73. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicySelector.js +0 -6
  74. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyState.js +0 -1
  75. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyTemplateEpic.js +0 -34
  76. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/fetchCardPolicyMccCategoriesEpic.js +0 -25
  77. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailReducer.d.ts +0 -14
  78. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailReducer.js +0 -74
  79. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailSelector.d.ts +0 -21
  80. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailSelector.js +0 -28
  81. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailState.d.ts +0 -25
  82. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailState.js +0 -2
  83. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/fetchCardPolicyDetailEpic.d.ts +0 -19
  84. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/fetchCardPolicyDetailEpic.js +0 -60
  85. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/updateCardPolicyEpic.d.ts +0 -18
  86. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/updateCardPolicyEpic.js +0 -53
  87. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/archiveCardPolicyEpic.d.ts +0 -16
  88. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/archiveCardPolicyEpic.js +0 -46
  89. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListReducer.d.ts +0 -15
  90. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListReducer.js +0 -76
  91. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListSelector.d.ts +0 -21
  92. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListSelector.js +0 -27
  93. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListState.d.ts +0 -19
  94. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListState.js +0 -2
  95. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/fetchCardPolicyListEpic.d.ts +0 -19
  96. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/fetchCardPolicyListEpic.js +0 -60
  97. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyReducer.d.ts +0 -12
  98. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyReducer.js +0 -54
  99. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicySelector.d.ts +0 -4
  100. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicySelector.js +0 -10
  101. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyState.d.ts +0 -15
  102. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyState.js +0 -2
  103. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyTemplateEpic.d.ts +0 -8
  104. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyTemplateEpic.js +0 -38
  105. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/fetchCardPolicyMccCategoriesEpic.d.ts +0 -15
  106. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/fetchCardPolicyMccCategoriesEpic.js +0 -29
@@ -16,4 +16,4 @@
16
16
  *
17
17
  * @see README.md in this directory for maintenance expectations.
18
18
  */
19
- export type AiCfoSuggestedQuestionsPageContext = 'balance_sheet' | 'profit_loss' | 'vendors' | 'transactions' | 'cash_flow' | 'accounts_receivable' | 'accounts_payable' | 'transaction_details' | 'dashboard' | 'cash_balance' | 'card_balance' | 'cash_in_cash_out' | 'net_burn_or_income' | 'cash_position' | 'top_expenses' | 'revenue' | 'operating_expenses' | 'command_centre' | 'je_schedules' | 'reconciliation' | 'flux_analysis' | 'receipts' | 'mei' | 'task_checklist' | 'performance' | 'bills_list' | 'bills_details' | 'reimbursement_list' | 'reimbursement_details' | 'vendors_summary' | 'opex_by_vendor' | 'prepaid_expenses' | 'fixed_assets' | 'form_1099' | 'accrued_expenses' | 'forecast' | 'checking' | 'checking_details' | 'treasury' | 'cards' | 'cards_creation' | 'cards_detail' | 'card_policy' | 'card_policy_detail' | 'people' | 'rewards' | 'notifications';
19
+ export type AiCfoSuggestedQuestionsPageContext = 'balance_sheet' | 'profit_loss' | 'vendors' | 'transactions' | 'cash_flow' | 'accounts_receivable' | 'accounts_payable' | 'transaction_details' | 'dashboard' | 'cash_balance' | 'card_balance' | 'cash_in_cash_out' | 'net_burn_or_income' | 'cash_position' | 'top_expenses' | 'revenue' | 'operating_expenses' | 'command_centre' | 'je_schedules' | 'reconciliation' | 'flux_analysis' | 'receipts' | 'mei' | 'task_checklist' | 'performance' | 'bills_list' | 'bills_details' | 'reimbursement_list' | 'reimbursement_details' | 'vendors_summary' | 'opex_by_vendor' | 'prepaid_expenses' | 'fixed_assets' | 'form_1099' | 'accrued_expenses' | 'forecast' | 'checking' | 'checking_details' | 'treasury' | 'cards' | 'cards_detail' | 'people' | 'rewards' | 'notifications';
@@ -20,175 +20,8 @@ export interface ChartVisualizationPayload {
20
20
  lines?: string[] | null;
21
21
  y_format?: YFormatPayload;
22
22
  }
23
- export interface CardsCardOptionPayload {
24
- id: string;
25
- label: string;
26
- description?: string | null;
27
- }
28
- /**
29
- * Single AI-suggested card on the wire. The controller ships an array of
30
- * these mixing vendor and department entries; entries with
31
- * `is_suggested: true` seed step 1 of the form pre-checked, while entries
32
- * with `is_suggested: false` are available in the step-2 Card dropdown and
33
- * step-1 search but don't appear as initial rows.
34
- */
35
- export interface SuggestedCardPayload {
36
- avg_spend: number;
37
- card_name: string;
38
- card_name_id: string;
39
- card_type: 'vendor' | 'department';
40
- credit_limit: number;
41
- is_suggested: boolean;
42
- owner_id: string;
43
- }
44
- /**
45
- * Discriminated payload for the AI Card Creation interactive form. The wire
46
- * format mirrors the FE-side `CardsCreationInitialData` field-for-field
47
- * (with snake_case field names converted to camelCase by the reducer).
48
- *
49
- * - `team-then-cards` (default): the AI suggests rows (vendors + departments);
50
- * user reviews them in step 1, then configures cards in step 2. The wire
51
- * format ships a flat `suggested_cards` array. Both suggested and
52
- * not-suggested entries are included; the reducer splits them into seed
53
- * rows vs. dropdown options. The legacy `team_rows` /
54
- * `suggested_owner_user_id_by_team_id` shape is also accepted for
55
- * backward compatibility with mocks and tests.
56
- * - `cards-only` (1-step): the AI has already chosen cards; user lands
57
- * directly on the editable card table for confirmation.
58
- */
59
- export type CardsCreationInitialDataPayload = {
60
- card_options: CardsCardOptionPayload[];
61
- mode: 'team-then-cards';
62
- /**
63
- * Preferred wire format: flat list of vendor/department cards with an
64
- * `is_suggested` discriminator. The reducer derives `team_rows`,
65
- * `suggested_owner_user_id_by_team_id`, and the full `cardNameOptions`
66
- * universe from this single array.
67
- */
68
- suggested_cards?: SuggestedCardPayload[];
69
- /**
70
- * Legacy/test shape — pre-shaped seed rows. Mutually exclusive with
71
- * `suggested_cards`; when both are present, `suggested_cards` wins.
72
- */
73
- suggested_owner_user_id_by_team_id?: Record<string, string | null>;
74
- team_rows?: Array<{
75
- avg_monthly_spend: string;
76
- id: string;
77
- label: string;
78
- recommended_limit: string;
79
- card_kind?: 'vendor' | 'class' | null;
80
- recommended_limit_cadence?: string | null;
81
- }>;
82
- } | {
83
- card_options: CardsCardOptionPayload[];
84
- card_rows: Array<{
85
- card_option_id: string;
86
- id: string;
87
- /**
88
- * Optional team-derived display label rendered in the card cell
89
- * trigger (e.g. "Engineering"). Drives the row's first-letter avatar
90
- * in step 2.
91
- */
92
- label?: string | null;
93
- recommended_limit?: number | null;
94
- suggested_owner_user_id?: string | null;
95
- }>;
96
- mode: 'cards-only';
97
- };
98
- /**
99
- * Vendor / category seed for the AI Card Policy interactive form.
100
- * `optional_code` carries the MCC (e.g. "6051") for category items; vendor
101
- * items omit it.
102
- */
103
- export interface CardPolicyTagSeedPayload {
104
- id: string;
105
- is_selected: boolean;
106
- label: string;
107
- optional_code?: string | null;
108
- }
109
- export interface CardPolicyOwnerSeedPayload {
110
- display_name: string;
111
- user_id: string;
112
- role_label?: string | null;
113
- }
114
- export interface CardPolicyCardRowSeedPayload {
115
- card_name: string;
116
- id: string;
117
- is_checked: boolean;
118
- last4: string;
119
- limit_amount: number;
120
- owner: CardPolicyOwnerSeedPayload;
121
- utilization_amount: number;
122
- limit_cadence?: string | null;
123
- }
124
- export interface CardPolicyLimitRowSeedPayload {
125
- id: string;
126
- is_enabled: boolean;
127
- amount?: number | null;
128
- }
129
- /**
130
- * Suggested-policy seed for the 1-step `review-only` variant and Step 5 of
131
- * the `full-builder` variant. Each chip group is a flat list rendered inside
132
- * the expandable policy card; the FE classifies them visually via the
133
- * `chip_kind` discriminator.
134
- */
135
- export interface CardPolicySuggestedPolicyChipPayload {
136
- chip_kind: 'positive' | 'negative' | 'avatar';
137
- id: string;
138
- label: string;
139
- }
140
- export interface CardPolicySuggestedPolicyChipGroupPayload {
141
- chips: CardPolicySuggestedPolicyChipPayload[];
142
- id: string;
143
- label: string;
144
- }
145
- export interface CardPolicySuggestedPolicyPayload {
146
- chip_groups: CardPolicySuggestedPolicyChipGroupPayload[];
147
- id: string;
148
- is_checked: boolean;
149
- name: string;
150
- }
151
- /**
152
- * Discriminated payload for the AI Card Policy interactive form. Mirrors
153
- * the FE-side `CardPolicyInitialData`.
154
- *
155
- * - `review-only` (1-step): AI auto-applied default rules; user sees only
156
- * the policy review.
157
- * - `full-builder` (5-step): vendors → categories → cards → limits →
158
- * review.
159
- * - `doc-upload` (3-step): upload → cards → review. Vendors / categories
160
- * / limits are filled in by the policy-document-extract API on the FE,
161
- * so the payload only carries `cards` (still user-picked) and any
162
- * optional suggested-policy seed.
163
- */
164
- export type CardPolicyInitialDataPayload = {
165
- policy_kind: 'review-only';
166
- suggested_policies: CardPolicySuggestedPolicyPayload[];
167
- } | {
168
- cards: CardPolicyCardRowSeedPayload[];
169
- categories: CardPolicyTagSeedPayload[];
170
- default_limits: CardPolicyLimitRowSeedPayload[];
171
- policy_kind: 'full-builder';
172
- suggested_policies: CardPolicySuggestedPolicyPayload[];
173
- vendors: CardPolicyTagSeedPayload[];
174
- } | {
175
- cards: CardPolicyCardRowSeedPayload[];
176
- policy_kind: 'doc-upload';
177
- suggested_policies: CardPolicySuggestedPolicyPayload[];
178
- };
179
- /**
180
- * Discriminated visualization payload. The FE narrows on `form_type` and
181
- * casts `payload` to the matching shape.
182
- */
183
- export type InteractiveFormVisualizationPayload = {
184
- form_type: 'cards_creation';
185
- payload: CardsCreationInitialDataPayload;
186
- } | {
187
- form_type: 'card_policy';
188
- payload: CardPolicyInitialDataPayload;
189
- };
190
23
  export interface AiCfoVisualizationPayload {
191
- data: TableVisualizationPayload | ChartVisualizationPayload | InteractiveFormVisualizationPayload | null;
24
+ data: TableVisualizationPayload | ChartVisualizationPayload | null;
192
25
  type: string | null;
193
26
  }
194
27
  export interface AiCfoAnswerPayload {
@@ -139,196 +139,12 @@ const toAiCfoVisualization = (visualization) => {
139
139
  if (visualization.type == null || visualization.data == null) {
140
140
  return undefined;
141
141
  }
142
- const normalizedType = (0, aiCfoState_1.toAiCfoVisualizationTypeStrict)(visualization.type) ?? 'table';
143
142
  return {
144
- type: normalizedType,
145
- data: normalizedType === 'interactive_form'
146
- ? toInteractiveFormVisualization(visualization.data)
147
- : toAiCfoVisualizationData(visualization.data),
143
+ type: (0, aiCfoState_1.toAiCfoVisualizationTypeStrict)(visualization.type) ?? 'table',
144
+ data: toAiCfoVisualizationData(visualization.data),
148
145
  };
149
146
  };
150
147
  exports.toAiCfoVisualization = toAiCfoVisualization;
151
- const toInteractiveFormVisualization = (data) => {
152
- const formType = (0, aiCfoState_1.toInteractiveFormTypeStrict)(data.form_type) ?? 'cards_creation';
153
- if (formType === 'card_policy') {
154
- return {
155
- formType: 'card_policy',
156
- payload: toCardPolicyInitialData(data.payload),
157
- };
158
- }
159
- return {
160
- formType: 'cards_creation',
161
- payload: toCardsCreationInitialData(data.payload),
162
- };
163
- };
164
- const toCardsCreationInitialData = (payload) => {
165
- const cardOptions = (payload.card_options ?? []).map((option) => ({
166
- id: option.id,
167
- label: option.label,
168
- description: option.description ?? undefined,
169
- }));
170
- if (payload.mode === 'cards-only') {
171
- return {
172
- mode: 'cards-only',
173
- cardOptions,
174
- cardRows: (payload.card_rows ?? []).map((row) => ({
175
- cardOptionId: row.card_option_id,
176
- id: row.id,
177
- label: row.label ?? undefined,
178
- recommendedLimit: row.recommended_limit ?? undefined,
179
- suggestedOwnerUserId: row.suggested_owner_user_id ?? undefined,
180
- })),
181
- };
182
- }
183
- // Preferred wire format: a flat `suggested_cards` array with an
184
- // `is_suggested` discriminator. The adapter splits it into seed rows,
185
- // owner map, and the full dropdown universe.
186
- if (payload.suggested_cards != null) {
187
- return fromSuggestedCards(payload.suggested_cards, cardOptions);
188
- }
189
- // Legacy / test shape: backend already pre-shapes seeds. Synthesize an
190
- // empty `cardNameOptions` (step 2 dropdown still works via row-self ids).
191
- const teamRows = (payload.team_rows ?? []).map((row) => ({
192
- avgMonthlySpend: row.avg_monthly_spend,
193
- cardKind: (row.card_kind ?? 'vendor'),
194
- id: row.id,
195
- label: row.label,
196
- recommendedLimit: row.recommended_limit,
197
- recommendedLimitCadence: row.recommended_limit_cadence ?? undefined,
198
- }));
199
- return {
200
- mode: 'team-then-cards',
201
- cardOptions,
202
- cardNameOptions: teamRows.map((row) => ({
203
- id: row.id,
204
- kind: row.cardKind,
205
- label: row.label,
206
- })),
207
- suggestedOwnerUserIdByTeamId: Object.fromEntries(Object.entries(payload.suggested_owner_user_id_by_team_id ?? {}).map(([teamId, userId]) => [teamId, userId ?? undefined])),
208
- teamRows,
209
- };
210
- };
211
- const CURRENCY_FORMATTER = new Intl.NumberFormat('en-US', {
212
- style: 'currency',
213
- currency: 'USD',
214
- maximumFractionDigits: 0,
215
- });
216
- const fromSuggestedCards = (suggestedCards, cardOptions) => {
217
- const ordered = [...suggestedCards].sort((a, b) => {
218
- if (a.card_type === b.card_type) {
219
- return 0;
220
- }
221
- return a.card_type === 'vendor' ? -1 : 1;
222
- });
223
- const withUniqueIds = withSynthesizedIds(ordered);
224
- const teamRows = withUniqueIds
225
- .filter(({ card }) => card.is_suggested)
226
- .map(({ card, uniqueId }) => ({
227
- avgMonthlySpend: CURRENCY_FORMATTER.format(card.avg_spend),
228
- cardKind: card.card_type === 'department' ? 'class' : 'vendor',
229
- id: uniqueId,
230
- label: card.card_name,
231
- recommendedLimit: CURRENCY_FORMATTER.format(card.credit_limit),
232
- recommendedLimitCadence: 'Monthly',
233
- }));
234
- const suggestedOwnerUserIdByTeamId = Object.fromEntries(withUniqueIds
235
- .filter(({ card }) => card.is_suggested)
236
- .map(({ card, uniqueId }) => [uniqueId, card.owner_id]));
237
- const cardNameOptions = withUniqueIds.map(({ card, uniqueId }) => ({
238
- id: uniqueId,
239
- kind: card.card_type === 'department' ? 'class' : 'vendor',
240
- label: card.card_name,
241
- }));
242
- return {
243
- mode: 'team-then-cards',
244
- cardOptions,
245
- cardNameOptions,
246
- suggestedOwnerUserIdByTeamId,
247
- teamRows,
248
- };
249
- };
250
- /**
251
- * Stamp each suggested card with a stable unique id derived from its
252
- * `card_name_id`. If two cards in the same payload share the same
253
- * `card_name_id` (which happens in the current sample payload where
254
- * `card_name_id` is the literal `"vendor_uuid"`), fall back to a
255
- * synthesized id `${kind}__${card_name_id}__${index}` so RHF row keying
256
- * stays unique.
257
- */
258
- const withSynthesizedIds = (cards) => {
259
- const seen = new Set();
260
- return cards.map((card, index) => {
261
- const preferred = card.card_name_id;
262
- if (preferred != null && preferred !== '' && !seen.has(preferred)) {
263
- seen.add(preferred);
264
- return { card, uniqueId: preferred };
265
- }
266
- const synthesized = `${card.card_type}__${preferred ?? 'unknown'}__${index}`;
267
- seen.add(synthesized);
268
- return { card, uniqueId: synthesized };
269
- });
270
- };
271
- const toCardPolicyInitialData = (payload) => {
272
- const suggestedPolicies = (payload.suggested_policies ?? []).map((policy) => ({
273
- id: policy.id,
274
- isChecked: policy.is_checked,
275
- name: policy.name,
276
- chipGroups: (policy.chip_groups ?? []).map((group) => ({
277
- id: group.id,
278
- label: group.label,
279
- chips: (group.chips ?? []).map((chip) => ({
280
- id: chip.id,
281
- label: chip.label,
282
- chipKind: chip.chip_kind,
283
- })),
284
- })),
285
- }));
286
- if (payload.policy_kind === 'review-only') {
287
- return {
288
- policyKind: 'review-only',
289
- suggestedPolicies,
290
- };
291
- }
292
- const toCardRowSeed = (card) => ({
293
- cardName: card.card_name,
294
- id: card.id,
295
- isChecked: card.is_checked,
296
- last4: card.last4,
297
- limitAmount: card.limit_amount,
298
- limitCadence: card.limit_cadence ?? undefined,
299
- owner: {
300
- userId: card.owner.user_id,
301
- displayName: card.owner.display_name,
302
- roleLabel: card.owner.role_label ?? undefined,
303
- },
304
- utilizationAmount: card.utilization_amount,
305
- });
306
- if (payload.policy_kind === 'doc-upload') {
307
- return {
308
- policyKind: 'doc-upload',
309
- suggestedPolicies,
310
- cards: (payload.cards ?? []).map(toCardRowSeed),
311
- };
312
- }
313
- return {
314
- policyKind: 'full-builder',
315
- suggestedPolicies,
316
- vendors: (payload.vendors ?? []).map(toCardPolicyTagSeed),
317
- categories: (payload.categories ?? []).map(toCardPolicyTagSeed),
318
- cards: (payload.cards ?? []).map(toCardRowSeed),
319
- defaultLimits: (payload.default_limits ?? []).map((row) => ({
320
- id: row.id,
321
- isEnabled: row.is_enabled,
322
- amount: row.amount ?? undefined,
323
- })),
324
- };
325
- };
326
- const toCardPolicyTagSeed = (tag) => ({
327
- id: tag.id,
328
- isSelected: tag.is_selected,
329
- label: tag.label,
330
- optionalCode: tag.optional_code ?? undefined,
331
- });
332
148
  const toAiCfoVisualizationData = (data) => {
333
149
  if ('x' in data && 'y' in data) {
334
150
  // Normalize y to always be an array
@@ -9,13 +9,9 @@ export interface AiCfoAnswerParagraph {
9
9
  }>;
10
10
  }
11
11
  export declare const ALL_AI_CFO_CHARTS_TYPES: readonly ["bar_chart", "pie_chart", "line_chart"];
12
- export declare const ALL_AI_CFO_VISUALIZATION_TYPES: readonly ["bar_chart", "pie_chart", "line_chart", "table", "interactive_form"];
13
- export declare const ALL_INTERACTIVE_FORM_TYPES: readonly ["cards_creation", "card_policy"];
14
- export declare const toInteractiveFormType: (v: string) => "cards_creation" | "card_policy";
15
- export declare const toInteractiveFormTypeStrict: (v: string) => "cards_creation" | "card_policy" | undefined;
16
- export type InteractiveFormType = ReturnType<typeof toInteractiveFormType>;
17
- export declare const toAiCfoVisualizationType: (v: string) => "bar_chart" | "pie_chart" | "line_chart" | "table" | "interactive_form";
18
- export declare const toAiCfoVisualizationTypeStrict: (v: string) => "bar_chart" | "pie_chart" | "line_chart" | "table" | "interactive_form" | undefined;
12
+ export declare const ALL_AI_CFO_VISUALIZATION_TYPES: readonly ["bar_chart", "pie_chart", "line_chart", "table"];
13
+ export declare const toAiCfoVisualizationType: (v: string) => "bar_chart" | "pie_chart" | "line_chart" | "table";
14
+ export declare const toAiCfoVisualizationTypeStrict: (v: string) => "bar_chart" | "pie_chart" | "line_chart" | "table" | undefined;
19
15
  export type AiCfoVisualizationType = ReturnType<typeof toAiCfoVisualizationType>;
20
16
  export declare const toAiCfoChartType: (v: string) => "bar_chart" | "pie_chart" | "line_chart";
21
17
  export declare const toAiCfoChartTypeStrict: (v: string) => "bar_chart" | "pie_chart" | "line_chart" | undefined;
@@ -57,164 +53,8 @@ export interface ChartVisualization {
57
53
  lines?: string[];
58
54
  yFormat?: YFormat;
59
55
  }
60
- export interface CardsCardOption {
61
- id: string;
62
- label: string;
63
- description?: string;
64
- }
65
- /**
66
- * Card kind for AI Card Creation rows. `vendor` = vendor-bound card,
67
- * `class` = department-scoped card. The wire format ships `department`;
68
- * the reducer maps it to `class` (the FE-side term for accounting class /
69
- * department) so it lines up with the rest of the codebase.
70
- */
71
- export type CardsCardKind = 'vendor' | 'class';
72
- /**
73
- * Single entry in the unified vendor + department dropdown universe shipped
74
- * by the AI controller for the `team-then-cards` flow. Powers both the
75
- * step-2 Card cell dropdown (filtered to entries with matching `kind`) and
76
- * the step-1 "Add something else" search (no kind filter — user can add
77
- * either).
78
- */
79
- export interface CardNameOption {
80
- id: string;
81
- kind: CardsCardKind;
82
- label: string;
83
- }
84
- /**
85
- * Initial data for the AI Card Creation interactive form. Discriminated on
86
- * `mode`:
87
- *
88
- * - `team-then-cards` (default): AI suggests rows (mix of vendors +
89
- * departments); user reviews them in step 1, then configures one card per
90
- * row in step 2. `cardNameOptions` is the full universe (suggested +
91
- * not-suggested) used to populate the dropdown / search.
92
- * - `cards-only` (1-step): AI has already chosen cards; user lands directly
93
- * on the editable card table for confirmation.
94
- */
95
- export type CardsCreationInitialData = {
96
- cardNameOptions: CardNameOption[];
97
- cardOptions: CardsCardOption[];
98
- mode: 'team-then-cards';
99
- /**
100
- * Map of `teamRow.id` -> suggested owner `userId`. Resolved against
101
- * `allUsers` (sourced from the tenant) at render time.
102
- */
103
- suggestedOwnerUserIdByTeamId: Record<string, ID | undefined>;
104
- teamRows: Array<{
105
- avgMonthlySpend: string;
106
- cardKind: CardsCardKind;
107
- id: string;
108
- label: string;
109
- recommendedLimit: string;
110
- recommendedLimitCadence?: string;
111
- }>;
112
- } | {
113
- cardOptions: CardsCardOption[];
114
- cardRows: Array<{
115
- cardOptionId: string;
116
- id: string;
117
- /**
118
- * Optional team-derived display label rendered in the card cell
119
- * trigger (e.g. "Engineering"). Drives the row's first-letter avatar
120
- * in step 2.
121
- */
122
- label?: string;
123
- recommendedLimit?: number;
124
- suggestedOwnerUserId?: ID;
125
- }>;
126
- mode: 'cards-only';
127
- };
128
- /**
129
- * Vendor / category seed for the AI Card Policy interactive form.
130
- * `optionalCode` carries the MCC (e.g. "6051") for category items; vendor
131
- * items omit it.
132
- */
133
- export interface CardPolicyTagSeed {
134
- id: string;
135
- isSelected: boolean;
136
- label: string;
137
- optionalCode?: string;
138
- }
139
- export interface CardPolicyOwnerSeed {
140
- displayName: string;
141
- userId: ID;
142
- roleLabel?: string;
143
- }
144
- export interface CardPolicyCardRowSeed {
145
- cardName: string;
146
- id: string;
147
- isChecked: boolean;
148
- last4: string;
149
- limitAmount: number;
150
- owner: CardPolicyOwnerSeed;
151
- utilizationAmount: number;
152
- limitCadence?: string;
153
- }
154
- export interface CardPolicyLimitRowSeed {
155
- id: string;
156
- isEnabled: boolean;
157
- amount?: number;
158
- }
159
- export interface CardPolicySuggestedPolicyChip {
160
- chipKind: 'positive' | 'negative' | 'avatar';
161
- id: string;
162
- label: string;
163
- }
164
- export interface CardPolicySuggestedPolicyChipGroup {
165
- chips: CardPolicySuggestedPolicyChip[];
166
- id: string;
167
- label: string;
168
- }
169
- export interface CardPolicySuggestedPolicy {
170
- chipGroups: CardPolicySuggestedPolicyChipGroup[];
171
- id: string;
172
- isChecked: boolean;
173
- name: string;
174
- }
175
- /**
176
- * Initial data for the AI Card Policy interactive form. Discriminated on
177
- * `policyKind`:
178
- *
179
- * - `review-only` (1-step): AI auto-applied default rules; user sees the
180
- * policy review only.
181
- * - `full-builder` (5-step): vendors → categories → cards → limits →
182
- * review.
183
- * - `doc-upload` (3-step): upload → cards → review. The user uploads a
184
- * policy document on Step 1; the cards micro-service extracts the rules
185
- * and the form is pre-filled via the `policyDocumentExtraction` slice
186
- * before the user lands on Step 2. `cards` is still required because
187
- * the user picks which cards the policy applies to in Step 2.
188
- */
189
- export type CardPolicyInitialData = {
190
- policyKind: 'review-only';
191
- suggestedPolicies: CardPolicySuggestedPolicy[];
192
- } | {
193
- cards: CardPolicyCardRowSeed[];
194
- categories: CardPolicyTagSeed[];
195
- defaultLimits: CardPolicyLimitRowSeed[];
196
- policyKind: 'full-builder';
197
- suggestedPolicies: CardPolicySuggestedPolicy[];
198
- vendors: CardPolicyTagSeed[];
199
- } | {
200
- cards: CardPolicyCardRowSeed[];
201
- policyKind: 'doc-upload';
202
- suggestedPolicies: CardPolicySuggestedPolicy[];
203
- };
204
- /**
205
- * Visualization variant rendered as an interactive RHF form (in lieu of a
206
- * chart or table). Discriminated on `formType`; each branch carries its own
207
- * payload shape.
208
- */
209
- export type InteractiveFormVisualization = {
210
- formType: 'cards_creation';
211
- payload: CardsCreationInitialData;
212
- } | {
213
- formType: 'card_policy';
214
- payload: CardPolicyInitialData;
215
- };
216
56
  export interface AiCfoVisualization {
217
- data: TableVisualization | ChartVisualization | InteractiveFormVisualization;
57
+ data: TableVisualization | ChartVisualization;
218
58
  type: AiCfoVisualizationType;
219
59
  }
220
60
  export declare const toMessageSender: (v: string) => "user" | "agent";
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.toMessageTypeStrict = exports.toMessageSenderStrict = exports.toMessageType = exports.toMessageSender = exports.toAiCfoAnswerResponseTypeStrict = exports.toAiCfoAnswerStateTypeStrict = exports.toAiCfoAnswerResponseType = exports.toAiCfoAnswerStateType = exports.toYFormatScaleStrict = exports.toYFormatUnitStrict = exports.toYFormatTypeStrict = exports.toYFormatScale = exports.toYFormatUnit = exports.toYFormatType = exports.ALL_Y_FORMAT_SCALES = exports.ALL_Y_FORMAT_NON_CURRENCY_UNITS = exports.ALL_Y_FORMAT_TYPES = exports.ALL_AI_CFO_ANSWER_RESPONSE_TYPES = exports.ALL_AI_CFO_ANSWER_STATE_TYPES = exports.toAiCfoChartTypeStrict = exports.toAiCfoChartType = exports.toAiCfoVisualizationTypeStrict = exports.toAiCfoVisualizationType = exports.toInteractiveFormTypeStrict = exports.toInteractiveFormType = exports.ALL_INTERACTIVE_FORM_TYPES = exports.ALL_AI_CFO_VISUALIZATION_TYPES = exports.ALL_AI_CFO_CHARTS_TYPES = void 0;
3
+ exports.toMessageTypeStrict = exports.toMessageSenderStrict = exports.toMessageType = exports.toMessageSender = exports.toAiCfoAnswerResponseTypeStrict = exports.toAiCfoAnswerStateTypeStrict = exports.toAiCfoAnswerResponseType = exports.toAiCfoAnswerStateType = exports.toYFormatScaleStrict = exports.toYFormatUnitStrict = exports.toYFormatTypeStrict = exports.toYFormatScale = exports.toYFormatUnit = exports.toYFormatType = exports.ALL_Y_FORMAT_SCALES = exports.ALL_Y_FORMAT_NON_CURRENCY_UNITS = exports.ALL_Y_FORMAT_TYPES = exports.ALL_AI_CFO_ANSWER_RESPONSE_TYPES = exports.ALL_AI_CFO_ANSWER_STATE_TYPES = exports.toAiCfoChartTypeStrict = exports.toAiCfoChartType = exports.toAiCfoVisualizationTypeStrict = exports.toAiCfoVisualizationType = exports.ALL_AI_CFO_VISUALIZATION_TYPES = exports.ALL_AI_CFO_CHARTS_TYPES = void 0;
4
4
  const stringToUnion_1 = require("../../commonStateTypes/stringToUnion");
5
5
  exports.ALL_AI_CFO_CHARTS_TYPES = [
6
6
  'bar_chart',
@@ -10,16 +10,7 @@ exports.ALL_AI_CFO_CHARTS_TYPES = [
10
10
  exports.ALL_AI_CFO_VISUALIZATION_TYPES = [
11
11
  ...exports.ALL_AI_CFO_CHARTS_TYPES,
12
12
  'table',
13
- 'interactive_form',
14
13
  ];
15
- exports.ALL_INTERACTIVE_FORM_TYPES = [
16
- 'cards_creation',
17
- 'card_policy',
18
- ];
19
- const toInteractiveFormType = (v) => (0, stringToUnion_1.stringToUnion)(v, exports.ALL_INTERACTIVE_FORM_TYPES);
20
- exports.toInteractiveFormType = toInteractiveFormType;
21
- const toInteractiveFormTypeStrict = (v) => (0, stringToUnion_1.stringToUnionStrict)(v, exports.ALL_INTERACTIVE_FORM_TYPES);
22
- exports.toInteractiveFormTypeStrict = toInteractiveFormTypeStrict;
23
14
  const toAiCfoVisualizationType = (v) => (0, stringToUnion_1.stringToUnion)(v, exports.ALL_AI_CFO_VISUALIZATION_TYPES);
24
15
  exports.toAiCfoVisualizationType = toAiCfoVisualizationType;
25
16
  const toAiCfoVisualizationTypeStrict = (v) => (0, stringToUnion_1.stringToUnionStrict)(v, exports.ALL_AI_CFO_VISUALIZATION_TYPES);
@@ -10,7 +10,7 @@ export declare const ALL_SCHEDULES_TYPES: readonly ["prepaid_expenses", "fixed_a
10
10
  export declare const toScheduleTypesType: (v: string) => "prepaid_expenses" | "fixed_assets" | "accrued_expenses" | "deferred_revenue";
11
11
  export type ScheduleTypes = ReturnType<typeof toScheduleTypesType>;
12
12
  export declare const toScheduleTypesTypeStrict: (v?: string) => "prepaid_expenses" | "fixed_assets" | "accrued_expenses" | "deferred_revenue" | undefined;
13
- export declare const toScheduleJournalEntryStatusCodeType: (v: string) => "pending" | "unknown" | "posted" | "canceled" | "recorded";
13
+ export declare const toScheduleJournalEntryStatusCodeType: (v: string) => "pending" | "posted" | "unknown" | "canceled" | "recorded";
14
14
  export type ScheduleJournalEntryStatusCodeType = ReturnType<typeof toScheduleJournalEntryStatusCodeType>;
15
15
  export declare const toScheduleStatusCodeType: (v: string) => "completed" | "draft" | "new" | "ongoing" | "marked_as_completed";
16
16
  export type ScheduleStatusCodeType = ReturnType<typeof toScheduleStatusCodeType>;
@@ -3,7 +3,7 @@ import { MonthYearPeriod, MonthYearPeriodId } from '../../commonStateTypes/timeP
3
3
  import { ExpenseAutomationViewType } from '../../view/expenseAutomationView/expenseAutomationViewState';
4
4
  import { ZeniDate } from '../../zeniDayJS';
5
5
  export declare const ALL_MONTH_END_CLOSE_CHECKS_FREQUENCY: readonly ["Weekly", "Monthly"];
6
- export declare const toMonthEndCloseCheckFrequency: (v?: string) => "Monthly" | "Weekly";
6
+ export declare const toMonthEndCloseCheckFrequency: (v?: string) => "Weekly" | "Monthly";
7
7
  export type MonthEndCloseCheckFrequency = NonNullable<ReturnType<typeof toMonthEndCloseCheckFrequency>>;
8
8
  export interface MonthCloseCheckMetrics {
9
9
  columnIndex: number;
@@ -1,4 +1,4 @@
1
- export declare const toSnackbarMessageSection: (v: string) => "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";
1
+ export declare const toSnackbarMessageSection: (v: string) => "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";
2
2
  export type SnackbarMessageSections = ReturnType<typeof toSnackbarMessageSection>;
3
3
  export declare const toSnackbarMessageSectionTexts: (v: string) => "notification" | "failed" | "success";
4
4
  export type SnackbarMessageSectionTexts = ReturnType<typeof toSnackbarMessageSectionTexts>;
@@ -98,8 +98,6 @@ const ALL_SNACKBAR_MESSAGE_SECTIONS = [
98
98
  'charge_card_receipt_upload',
99
99
  'charge_card_resend_invite',
100
100
  'charge_card_revoke_invite',
101
- 'card_policy_created',
102
- 'card_policy_updated',
103
101
  'charge_card_update_limit',
104
102
  'charge_cards_update_limit',
105
103
  'close_charge_card',