@zeniai/client-epic-state 5.2.19 → 5.2.20
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.
- package/lib/entity/aiCfo/aiCfoPayload.d.ts +11 -0
- package/lib/entity/aiCfo/aiCfoReducer.js +32 -1
- package/lib/entity/aiCfo/aiCfoState.d.ts +14 -0
- package/lib/esm/entity/aiCfo/aiCfoReducer.js +32 -1
- package/lib/esm/view/expenseAutomationView/epics/accountRecon/confirmStatementMappingEpic.js +2 -2
- package/lib/esm/view/expenseAutomationView/epics/accountRecon/updateCombinedStatementInfoEpic.js +2 -2
- package/lib/index.d.ts +1 -1
- package/lib/view/expenseAutomationView/epics/accountRecon/confirmStatementMappingEpic.d.ts +2 -10
- package/lib/view/expenseAutomationView/epics/accountRecon/confirmStatementMappingEpic.js +1 -1
- package/lib/view/expenseAutomationView/epics/accountRecon/updateCombinedStatementInfoEpic.d.ts +10 -2
- package/lib/view/expenseAutomationView/epics/accountRecon/updateCombinedStatementInfoEpic.js +1 -1
- package/lib/view/spendManagement/commonHistoryView/commonHistory.d.ts +1 -1
- package/package.json +1 -1
|
@@ -102,11 +102,22 @@ export interface AiCfoAnswerPayload {
|
|
|
102
102
|
artifact?: string | null;
|
|
103
103
|
artifact_host_url?: string | null;
|
|
104
104
|
artifact_title?: string | null;
|
|
105
|
+
capability_promo?: AiCfoCapabilityPromoPayload | null;
|
|
105
106
|
exports?: AiCfoExportPayload[] | null;
|
|
106
107
|
follow_up_questions?: string[];
|
|
107
108
|
suggested_reply?: string | null;
|
|
108
109
|
table?: AiCfoVisualizationPayload | null;
|
|
109
110
|
}
|
|
111
|
+
export interface AiCfoCapabilityPromoPayload {
|
|
112
|
+
copy: string;
|
|
113
|
+
id: string;
|
|
114
|
+
surface: string;
|
|
115
|
+
cta?: AiCfoCapabilityPromoCtaPayload | null;
|
|
116
|
+
}
|
|
117
|
+
export interface AiCfoCapabilityPromoCtaPayload {
|
|
118
|
+
label: string;
|
|
119
|
+
prefill: string;
|
|
120
|
+
}
|
|
110
121
|
export interface AiCfoExportPayload {
|
|
111
122
|
export_id: ID;
|
|
112
123
|
name: string;
|
|
@@ -114,6 +114,7 @@ function chatHistoryToQA(history) {
|
|
|
114
114
|
? parsedAgentMessage.follow_up_questions
|
|
115
115
|
: [],
|
|
116
116
|
suggestedReply: parsedAgentMessage.suggested_reply ?? undefined,
|
|
117
|
+
capabilityPromo: toCapabilityPromo(parsedAgentMessage.capability_promo),
|
|
117
118
|
assumptions: parsedAgentMessage.assumptions ?? '',
|
|
118
119
|
insights: parsedAgentMessage.insights ?? '',
|
|
119
120
|
summarizedTitle: parsedAgentMessage.summarized_title ?? undefined,
|
|
@@ -374,8 +375,37 @@ const toAiCfoVisualizationData = (data) => {
|
|
|
374
375
|
columns,
|
|
375
376
|
};
|
|
376
377
|
};
|
|
378
|
+
const AI_CFO_CAPABILITY_PROMO_SURFACES = [
|
|
379
|
+
'banner',
|
|
380
|
+
'inline',
|
|
381
|
+
];
|
|
382
|
+
const toAiCfoCapabilityPromoSurface = (value) => AI_CFO_CAPABILITY_PROMO_SURFACES.find((surface) => surface === value);
|
|
383
|
+
const toCapabilityPromo = (payload) => {
|
|
384
|
+
// Runtime payloads can miss fields regardless of the wire type — drop the
|
|
385
|
+
// promo on a missing/empty id or copy, and narrow surface to the union.
|
|
386
|
+
if (payload == null || !payload.id || !payload.copy) {
|
|
387
|
+
return undefined;
|
|
388
|
+
}
|
|
389
|
+
const surface = toAiCfoCapabilityPromoSurface(payload.surface);
|
|
390
|
+
if (surface == null) {
|
|
391
|
+
return undefined;
|
|
392
|
+
}
|
|
393
|
+
const cta = toCapabilityPromoCta(payload.cta);
|
|
394
|
+
return {
|
|
395
|
+
copy: payload.copy,
|
|
396
|
+
id: payload.id,
|
|
397
|
+
surface,
|
|
398
|
+
...(cta != null && { cta }),
|
|
399
|
+
};
|
|
400
|
+
};
|
|
401
|
+
const toCapabilityPromoCta = (payload) => {
|
|
402
|
+
if (payload == null || !payload.label || !payload.prefill) {
|
|
403
|
+
return undefined;
|
|
404
|
+
}
|
|
405
|
+
return { label: payload.label, prefill: payload.prefill };
|
|
406
|
+
};
|
|
377
407
|
const toResponseBlockType = (answer, userId) => {
|
|
378
|
-
const { metadata, state, type, text, visualization, table, follow_up_questions, suggested_reply, assumptions, insights, summarized_title, artifact, artifact_title, artifact_host_url, exports, } = answer;
|
|
408
|
+
const { metadata, state, type, text, visualization, table, follow_up_questions, suggested_reply, assumptions, insights, summarized_title, artifact, artifact_title, artifact_host_url, capability_promo, exports, } = answer;
|
|
379
409
|
const { chat_session_id, message_id, timestamp, chain_of_thought_action_steps: chainOfThoughtActionSteps = [], } = metadata;
|
|
380
410
|
return {
|
|
381
411
|
messageId: message_id,
|
|
@@ -390,6 +420,7 @@ const toResponseBlockType = (answer, userId) => {
|
|
|
390
420
|
table: table != null ? (0, exports.toAiCfoVisualization)(table) : undefined,
|
|
391
421
|
followUpQuestions: follow_up_questions ?? [],
|
|
392
422
|
suggestedReply: suggested_reply ?? undefined,
|
|
423
|
+
capabilityPromo: toCapabilityPromo(capability_promo),
|
|
393
424
|
assumptions: assumptions ?? '',
|
|
394
425
|
insights: insights ?? '',
|
|
395
426
|
summarizedTitle: summarized_title ?? undefined,
|
|
@@ -154,6 +154,18 @@ export interface ResponseBlockBase {
|
|
|
154
154
|
state: AiCfoAnswerStateType;
|
|
155
155
|
userId: ID;
|
|
156
156
|
}
|
|
157
|
+
/** Where a capability promo renders; 'banner' = dismissible hint bar above the composer. */
|
|
158
|
+
export type AiCfoCapabilityPromoSurface = 'banner' | 'inline';
|
|
159
|
+
export interface AiCfoCapabilityPromo {
|
|
160
|
+
copy: string;
|
|
161
|
+
id: string;
|
|
162
|
+
surface: AiCfoCapabilityPromoSurface;
|
|
163
|
+
cta?: AiCfoCapabilityPromoCta;
|
|
164
|
+
}
|
|
165
|
+
export interface AiCfoCapabilityPromoCta {
|
|
166
|
+
label: string;
|
|
167
|
+
prefill: string;
|
|
168
|
+
}
|
|
157
169
|
/** A downloadable spreadsheet attached to one answer. See AiCfoExportPayload. */
|
|
158
170
|
export interface AiCfoExport {
|
|
159
171
|
exportId: ID;
|
|
@@ -169,6 +181,8 @@ export interface AnswerContentBlockBase {
|
|
|
169
181
|
artifact?: string;
|
|
170
182
|
artifactHostUrl?: string;
|
|
171
183
|
artifactTitle?: string;
|
|
184
|
+
/** Feature-discovery promo (banner surface): dismissible hint bar above the composer. */
|
|
185
|
+
capabilityPromo?: AiCfoCapabilityPromo;
|
|
172
186
|
exports?: AiCfoExport[];
|
|
173
187
|
suggestedReply?: string;
|
|
174
188
|
summarizedTitle?: string;
|
|
@@ -110,6 +110,7 @@ function chatHistoryToQA(history) {
|
|
|
110
110
|
? parsedAgentMessage.follow_up_questions
|
|
111
111
|
: [],
|
|
112
112
|
suggestedReply: parsedAgentMessage.suggested_reply ?? undefined,
|
|
113
|
+
capabilityPromo: toCapabilityPromo(parsedAgentMessage.capability_promo),
|
|
113
114
|
assumptions: parsedAgentMessage.assumptions ?? '',
|
|
114
115
|
insights: parsedAgentMessage.insights ?? '',
|
|
115
116
|
summarizedTitle: parsedAgentMessage.summarized_title ?? undefined,
|
|
@@ -368,8 +369,37 @@ const toAiCfoVisualizationData = (data) => {
|
|
|
368
369
|
columns,
|
|
369
370
|
};
|
|
370
371
|
};
|
|
372
|
+
const AI_CFO_CAPABILITY_PROMO_SURFACES = [
|
|
373
|
+
'banner',
|
|
374
|
+
'inline',
|
|
375
|
+
];
|
|
376
|
+
const toAiCfoCapabilityPromoSurface = (value) => AI_CFO_CAPABILITY_PROMO_SURFACES.find((surface) => surface === value);
|
|
377
|
+
const toCapabilityPromo = (payload) => {
|
|
378
|
+
// Runtime payloads can miss fields regardless of the wire type — drop the
|
|
379
|
+
// promo on a missing/empty id or copy, and narrow surface to the union.
|
|
380
|
+
if (payload == null || !payload.id || !payload.copy) {
|
|
381
|
+
return undefined;
|
|
382
|
+
}
|
|
383
|
+
const surface = toAiCfoCapabilityPromoSurface(payload.surface);
|
|
384
|
+
if (surface == null) {
|
|
385
|
+
return undefined;
|
|
386
|
+
}
|
|
387
|
+
const cta = toCapabilityPromoCta(payload.cta);
|
|
388
|
+
return {
|
|
389
|
+
copy: payload.copy,
|
|
390
|
+
id: payload.id,
|
|
391
|
+
surface,
|
|
392
|
+
...(cta != null && { cta }),
|
|
393
|
+
};
|
|
394
|
+
};
|
|
395
|
+
const toCapabilityPromoCta = (payload) => {
|
|
396
|
+
if (payload == null || !payload.label || !payload.prefill) {
|
|
397
|
+
return undefined;
|
|
398
|
+
}
|
|
399
|
+
return { label: payload.label, prefill: payload.prefill };
|
|
400
|
+
};
|
|
371
401
|
const toResponseBlockType = (answer, userId) => {
|
|
372
|
-
const { metadata, state, type, text, visualization, table, follow_up_questions, suggested_reply, assumptions, insights, summarized_title, artifact, artifact_title, artifact_host_url, exports, } = answer;
|
|
402
|
+
const { metadata, state, type, text, visualization, table, follow_up_questions, suggested_reply, assumptions, insights, summarized_title, artifact, artifact_title, artifact_host_url, capability_promo, exports, } = answer;
|
|
373
403
|
const { chat_session_id, message_id, timestamp, chain_of_thought_action_steps: chainOfThoughtActionSteps = [], } = metadata;
|
|
374
404
|
return {
|
|
375
405
|
messageId: message_id,
|
|
@@ -384,6 +414,7 @@ const toResponseBlockType = (answer, userId) => {
|
|
|
384
414
|
table: table != null ? toAiCfoVisualization(table) : undefined,
|
|
385
415
|
followUpQuestions: follow_up_questions ?? [],
|
|
386
416
|
suggestedReply: suggested_reply ?? undefined,
|
|
417
|
+
capabilityPromo: toCapabilityPromo(capability_promo),
|
|
387
418
|
assumptions: assumptions ?? '',
|
|
388
419
|
insights: insights ?? '',
|
|
389
420
|
summarizedTitle: summarized_title ?? undefined,
|
package/lib/esm/view/expenseAutomationView/epics/accountRecon/confirmStatementMappingEpic.js
CHANGED
|
@@ -3,7 +3,7 @@ import { catchError, exhaustMap, filter, mergeMap } from 'rxjs/operators';
|
|
|
3
3
|
import { openSnackbar } from '../../../../entity/snackbar/snackbarReducer';
|
|
4
4
|
import { createZeniAPIStatus, isSuccessResponse, } from '../../../../responsePayload';
|
|
5
5
|
import { isConfirmStatementMappingConflictResponse, transformConfirmStatementMappingConflictToState, transformConfirmStatementMappingPayloadToState, } from '../../payload/reconciliationPayload';
|
|
6
|
-
import { confirmStatementMapping, confirmStatementMappingFailure, confirmStatementMappingSuccess,
|
|
6
|
+
import { confirmStatementMapping, confirmStatementMappingFailure, confirmStatementMappingSuccess, } from '../../reducers/reconciliationViewReducer';
|
|
7
7
|
function createConfirmStatementMappingErrorSnackbar(apiMessage) {
|
|
8
8
|
const trimmedApiMessage = apiMessage?.trim();
|
|
9
9
|
if (trimmedApiMessage != null && trimmedApiMessage !== '') {
|
|
@@ -39,7 +39,7 @@ export const confirmStatementMappingEpic = (actions$, _state$, zeniAPI) => actio
|
|
|
39
39
|
accountId,
|
|
40
40
|
selectedPeriod,
|
|
41
41
|
statementUploads: transformConfirmStatementMappingPayloadToState(response.data),
|
|
42
|
-
})
|
|
42
|
+
}));
|
|
43
43
|
}
|
|
44
44
|
const mappingConflict = isConfirmStatementMappingConflictResponse(response)
|
|
45
45
|
? transformConfirmStatementMappingConflictToState(response)
|
package/lib/esm/view/expenseAutomationView/epics/accountRecon/updateCombinedStatementInfoEpic.js
CHANGED
|
@@ -5,7 +5,7 @@ import { createZeniAPIStatus, isSuccessResponse, } from '../../../../responsePay
|
|
|
5
5
|
import { mapCombinedStatementUpdateLocalDataToRequestBody } from '../../helpers/mapStatementUpdateLocalDataToRequestBody';
|
|
6
6
|
import { resolveCombinedStatementGroupId } from '../../helpers/reconciliationHelpers';
|
|
7
7
|
import { isStatementDateConflictResponse, transformStatementDateConflictToState, transformUpdateStatementInfoPayloadToState, } from '../../payload/reconciliationPayload';
|
|
8
|
-
import { submitCombinedStatementUpdate, submitStatementUpdateFailure, submitStatementUpdateSuccess, updateParsedStatementData, } from '../../reducers/reconciliationViewReducer';
|
|
8
|
+
import { fetchReconciliation, submitCombinedStatementUpdate, submitStatementUpdateFailure, submitStatementUpdateSuccess, updateParsedStatementData, } from '../../reducers/reconciliationViewReducer';
|
|
9
9
|
import { getStatementUploadsFromParsedData } from '../../selectors/statementParseViewSelector';
|
|
10
10
|
export const updateCombinedStatementInfoEpic = (actions$, state$, zeniAPI) => actions$.pipe(filter(submitCombinedStatementUpdate.match), switchMap((action) => {
|
|
11
11
|
const { accountId, selectedPeriod } = action.payload;
|
|
@@ -45,7 +45,7 @@ export const updateCombinedStatementInfoEpic = (actions$, state$, zeniAPI) => ac
|
|
|
45
45
|
}), submitStatementUpdateSuccess({
|
|
46
46
|
accountId,
|
|
47
47
|
selectedPeriod,
|
|
48
|
-
}));
|
|
48
|
+
}), fetchReconciliation(selectedPeriod, undefined, true, true));
|
|
49
49
|
}
|
|
50
50
|
const dateConflict = isStatementDateConflictResponse(response)
|
|
51
51
|
? transformStatementDateConflictToState(response)
|
package/lib/index.d.ts
CHANGED
|
@@ -984,7 +984,7 @@ export { AiCfoViewSelector, getAiCfoView, getSuggestedQuestionsForPageContext, g
|
|
|
984
984
|
export { MessagePayload, ChatSessionPayload, AiCfoAnswerPayload, } from './entity/aiCfo/aiCfoPayload';
|
|
985
985
|
export { setNewSession, setSessions, updateAiCfoAnswerCardPolicyWizardPlan, upsertAnswerPayload, upsertOrAddQuestionAnswerPayload, addQuestionPayload, clearSession, toAiCfoExports, toAiCfoVisualization, appendSyntheticAiCfoAnswer, updateSyntheticAiCfoAnswer, removeSyntheticAiCfoAnswer, } from './entity/aiCfo/aiCfoReducer';
|
|
986
986
|
export { AiCfoSelectorView, getAllQuestionAnswersForChatSession, getQuestionAnswerByIdForChatSession, getAllQuestionsForChatSession, getAiCfoSelectorView, getSyntheticAiCfoAnswersForChatSession, getSyntheticAiCfoAnswerByQuestionAnswerId, ChatSessionWithOrderedQuestionAnswers, } from './entity/aiCfo/aiCfoSelector';
|
|
987
|
-
export { AiCfoQuestionWithAnswer, AiCfoAnswerParagraph, AiCfoAnswerStateType, AiCfoChartType, AiCfoAnswerResponseType, TableVisualization, ChartVisualization, CardNameOption, CardsCardKind, CardsCreationInitialData, CardPolicyDraftPolicy, CardPolicyDraftPolicyEntity, CardPolicyInitialData, CardPolicySpendLimits, CardPolicyStep5Review, CardPolicyUploadSource, CardPolicyWizardPlan, InteractiveFormType, InteractiveFormVisualization, AiCfoExport, AiCfoVisualization, AiCfoVisualizationType, AiCfoState, ChatSession, ALL_AI_CFO_CHARTS_TYPES, ALL_AI_CFO_VISUALIZATION_TYPES, ALL_AI_CFO_ANSWER_STATE_TYPES, ALL_AI_CFO_ANSWER_RESPONSE_TYPES, ALL_INTERACTIVE_FORM_TYPES, toAiCfoVisualizationType, toAiCfoVisualizationTypeStrict, toAiCfoChartType, toAiCfoChartTypeStrict, toAiCfoAnswerStateType, toAiCfoAnswerStateTypeStrict, toAiCfoAnswerResponseType, toAiCfoAnswerResponseTypeStrict, toInteractiveFormType, toInteractiveFormTypeStrict, ChatSessionWithMessages, ResponseBlockBase, AnswerContentBlockBase, FileAttachmentMetadata, QuestionContentBlockBase, ResponseBlockType, SyntheticAiCfoAnswer, SyntheticAiCfoAnswerKind, ALL_SYNTHETIC_AI_CFO_ANSWER_KINDS, toMessageSender, toMessageType, MessageSender, MessageType, } from './entity/aiCfo/aiCfoState';
|
|
987
|
+
export { AiCfoQuestionWithAnswer, AiCfoAnswerParagraph, AiCfoAnswerStateType, AiCfoChartType, AiCfoAnswerResponseType, TableVisualization, ChartVisualization, CardNameOption, CardsCardKind, CardsCreationInitialData, CardPolicyDraftPolicy, CardPolicyDraftPolicyEntity, CardPolicyInitialData, CardPolicySpendLimits, CardPolicyStep5Review, CardPolicyUploadSource, CardPolicyWizardPlan, InteractiveFormType, InteractiveFormVisualization, AiCfoCapabilityPromo, AiCfoCapabilityPromoCta, AiCfoCapabilityPromoSurface, AiCfoExport, AiCfoVisualization, AiCfoVisualizationType, AiCfoState, ChatSession, ALL_AI_CFO_CHARTS_TYPES, ALL_AI_CFO_VISUALIZATION_TYPES, ALL_AI_CFO_ANSWER_STATE_TYPES, ALL_AI_CFO_ANSWER_RESPONSE_TYPES, ALL_INTERACTIVE_FORM_TYPES, toAiCfoVisualizationType, toAiCfoVisualizationTypeStrict, toAiCfoChartType, toAiCfoChartTypeStrict, toAiCfoAnswerStateType, toAiCfoAnswerStateTypeStrict, toAiCfoAnswerResponseType, toAiCfoAnswerResponseTypeStrict, toInteractiveFormType, toInteractiveFormTypeStrict, ChatSessionWithMessages, ResponseBlockBase, AnswerContentBlockBase, FileAttachmentMetadata, QuestionContentBlockBase, ResponseBlockType, SyntheticAiCfoAnswer, SyntheticAiCfoAnswerKind, ALL_SYNTHETIC_AI_CFO_ANSWER_KINDS, toMessageSender, toMessageType, MessageSender, MessageType, } from './entity/aiCfo/aiCfoState';
|
|
988
988
|
export { clearPolicyDocumentExtraction, extractPolicyDocument, fetchCardPolicyMccCategories, fetchCardPolicyRecommendationFromUpload, fetchCardPolicyVendorOptions, removeCardPolicyTemplate, updateCardPolicyMccCategories, updateCardPolicyMccCategoriesFailure, updateCardPolicyStats, updateCardPolicyTemplates, updateCardPolicyVendorOptions, updateCardPolicyVendorOptionsFailure, updateCreatedCardPolicyTemplate, updatePolicyDocumentExtractionFailure, updatePolicyDocumentExtractionSuccess, updatePolicyRecommendationFromUploadFailure, updatePolicyRecommendationFromUploadSuccess, } from './entity/cardPolicy/cardPolicyReducer';
|
|
989
989
|
export { getAllCardPolicyTemplates, getCardPolicyMccCategories, getCardPolicyMccCategoriesError, getCardPolicyMccCategoriesFetchState, getCardPolicyStats, getCardPolicySuggestedAllowCategories, getCardPolicySuggestedAllowMerchants, getCardPolicySuggestedBlockCategories, getCardPolicySuggestedBlockMerchants, getCardPolicyTemplateById, getCardPolicyTemplatesByIds, getCardPolicyVendorSearchFetchState, getCardPolicyVendorSearchOptions, getCardPolicyVendorSearchString, getExtractedCardPolicyRules, getPolicyDocumentExtractionError, getPolicyDocumentExtractionFetchState, getPolicyRecommendationFromUploadAnswerId, getPolicyRecommendationFromUploadChatSessionId, getPolicyRecommendationFromUploadError, getPolicyRecommendationFromUploadFetchState, getUploadedPolicyDocumentFileName, } from './entity/cardPolicy/cardPolicySelector';
|
|
990
990
|
export { ALL_CARD_POLICY_TEMPLATE_MODES, ALL_CARD_POLICY_TEMPLATE_STATUSES, CardPolicyState, CardPolicyStats, CardPolicyTemplate, CardPolicyTemplateEntityList, CardPolicyTemplateMode, CardPolicyTemplateSpendLimits, CardPolicyTemplateStatus, CardPolicyVendorSearchEntry, CardPolicyVendorSearchState, ExtractedCardPolicyRules, MccCategory, PolicyDocumentExtractionState, PolicyRecommendationFromUploadState, toCardPolicyTemplateMode, toCardPolicyTemplateStatus, } from './entity/cardPolicy/cardPolicyState';
|
|
@@ -2,8 +2,8 @@ import { ActionsObservable, StateObservable } from 'redux-observable';
|
|
|
2
2
|
import { openSnackbar } from '../../../../entity/snackbar/snackbarReducer';
|
|
3
3
|
import { RootState } from '../../../../rootStateTypes';
|
|
4
4
|
import { ZeniAPI } from '../../../../zeniAPI';
|
|
5
|
-
import { confirmStatementMapping, confirmStatementMappingFailure, confirmStatementMappingSuccess
|
|
6
|
-
export type ActionType = ReturnType<typeof confirmStatementMapping> | ReturnType<typeof confirmStatementMappingSuccess> | ReturnType<typeof confirmStatementMappingFailure> | ReturnType<typeof
|
|
5
|
+
import { confirmStatementMapping, confirmStatementMappingFailure, confirmStatementMappingSuccess } from '../../reducers/reconciliationViewReducer';
|
|
6
|
+
export type ActionType = ReturnType<typeof confirmStatementMapping> | ReturnType<typeof confirmStatementMappingSuccess> | ReturnType<typeof confirmStatementMappingFailure> | ReturnType<typeof openSnackbar>;
|
|
7
7
|
export declare const confirmStatementMappingEpic: (actions$: ActionsObservable<ActionType>, _state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => import("rxjs").Observable<{
|
|
8
8
|
payload: {
|
|
9
9
|
messageSection: import("../../../..").SnackbarMessageSections;
|
|
@@ -31,12 +31,4 @@ export declare const confirmStatementMappingEpic: (actions$: ActionsObservable<A
|
|
|
31
31
|
mappingConflict?: import("../../types/reconciliationViewState").ConfirmStatementMappingConflict | null;
|
|
32
32
|
};
|
|
33
33
|
type: "expenseAutomationReconciliationView/confirmStatementMappingFailure";
|
|
34
|
-
} | {
|
|
35
|
-
payload: {
|
|
36
|
-
selectedPeriod: import("../../../..").MonthYearPeriod;
|
|
37
|
-
accountId: string | undefined;
|
|
38
|
-
cacheOverride: any;
|
|
39
|
-
refreshViewInBackground: any;
|
|
40
|
-
};
|
|
41
|
-
type: "expenseAutomationReconciliationView/fetchReconciliation";
|
|
42
34
|
}>;
|
|
@@ -42,7 +42,7 @@ const confirmStatementMappingEpic = (actions$, _state$, zeniAPI) => actions$.pip
|
|
|
42
42
|
accountId,
|
|
43
43
|
selectedPeriod,
|
|
44
44
|
statementUploads: (0, reconciliationPayload_1.transformConfirmStatementMappingPayloadToState)(response.data),
|
|
45
|
-
})
|
|
45
|
+
}));
|
|
46
46
|
}
|
|
47
47
|
const mappingConflict = (0, reconciliationPayload_1.isConfirmStatementMappingConflictResponse)(response)
|
|
48
48
|
? (0, reconciliationPayload_1.transformConfirmStatementMappingConflictToState)(response)
|
package/lib/view/expenseAutomationView/epics/accountRecon/updateCombinedStatementInfoEpic.d.ts
CHANGED
|
@@ -1,9 +1,17 @@
|
|
|
1
1
|
import { ActionsObservable, StateObservable } from 'redux-observable';
|
|
2
2
|
import { RootState } from '../../../../rootStateTypes';
|
|
3
3
|
import { ZeniAPI } from '../../../../zeniAPI';
|
|
4
|
-
import { submitCombinedStatementUpdate, submitStatementUpdateFailure, submitStatementUpdateSuccess, updateParsedStatementData } from '../../reducers/reconciliationViewReducer';
|
|
5
|
-
export type ActionType = ReturnType<typeof submitCombinedStatementUpdate> | ReturnType<typeof submitStatementUpdateSuccess> | ReturnType<typeof submitStatementUpdateFailure> | ReturnType<typeof updateParsedStatementData>;
|
|
4
|
+
import { fetchReconciliation, submitCombinedStatementUpdate, submitStatementUpdateFailure, submitStatementUpdateSuccess, updateParsedStatementData } from '../../reducers/reconciliationViewReducer';
|
|
5
|
+
export type ActionType = ReturnType<typeof submitCombinedStatementUpdate> | ReturnType<typeof submitStatementUpdateSuccess> | ReturnType<typeof submitStatementUpdateFailure> | ReturnType<typeof updateParsedStatementData> | ReturnType<typeof fetchReconciliation>;
|
|
6
6
|
export declare const updateCombinedStatementInfoEpic: (actions$: ActionsObservable<ActionType>, state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => import("rxjs").Observable<{
|
|
7
|
+
payload: {
|
|
8
|
+
selectedPeriod: import("../../../../commonStateTypes/timePeriod").MonthYearPeriod;
|
|
9
|
+
accountId: string | undefined;
|
|
10
|
+
cacheOverride: any;
|
|
11
|
+
refreshViewInBackground: any;
|
|
12
|
+
};
|
|
13
|
+
type: "expenseAutomationReconciliationView/fetchReconciliation";
|
|
14
|
+
} | {
|
|
7
15
|
payload: {
|
|
8
16
|
accountId: import("../../../..").ID;
|
|
9
17
|
parsedStatementData: import("../../types/reconciliationViewState").ParsedStatementData;
|
package/lib/view/expenseAutomationView/epics/accountRecon/updateCombinedStatementInfoEpic.js
CHANGED
|
@@ -48,7 +48,7 @@ const updateCombinedStatementInfoEpic = (actions$, state$, zeniAPI) => actions$.
|
|
|
48
48
|
}), (0, reconciliationViewReducer_1.submitStatementUpdateSuccess)({
|
|
49
49
|
accountId,
|
|
50
50
|
selectedPeriod,
|
|
51
|
-
}));
|
|
51
|
+
}), (0, reconciliationViewReducer_1.fetchReconciliation)(selectedPeriod, undefined, true, true));
|
|
52
52
|
}
|
|
53
53
|
const dateConflict = (0, reconciliationPayload_1.isStatementDateConflictResponse)(response)
|
|
54
54
|
? (0, reconciliationPayload_1.transformStatementDateConflictToState)(response)
|
|
@@ -25,6 +25,6 @@ export interface CommonHistoryState {
|
|
|
25
25
|
}
|
|
26
26
|
export declare const toHistoricEventUpdateType: (v: string) => "deleted" | "created" | "updated";
|
|
27
27
|
type HistoricEventUpdateType = ReturnType<typeof toHistoricEventUpdateType>;
|
|
28
|
-
export declare const toHistoricEventUpdateDisplayType: (v: string) => "
|
|
28
|
+
export declare const toHistoricEventUpdateDisplayType: (v: string) => "inline" | "list" | "sentence";
|
|
29
29
|
type HistoricEventUpdateDisplayType = ReturnType<typeof toHistoricEventUpdateDisplayType>;
|
|
30
30
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeniai/client-epic-state",
|
|
3
|
-
"version": "5.2.
|
|
3
|
+
"version": "5.2.20",
|
|
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",
|