@zeniai/client-epic-state 5.1.28 → 5.1.29
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/README.md +1 -3
- package/lib/commonPayloadTypes/payloadIdentifier.d.ts +6 -0
- package/lib/commonPayloadTypes/payloadIdentifier.js +18 -0
- package/lib/entity/customer/customerPayload.js +2 -11
- package/lib/entity/jeSchedules/jeSchedulesPayload.js +3 -2
- package/lib/entity/transaction/payloadTypes/vendorTransactionPayload.js +1 -1
- package/lib/entity/vendor/vendorPayload.d.ts +4 -2
- package/lib/entity/vendor/vendorPayload.js +12 -3
- package/lib/entity/vendor/vendorReducer.js +3 -0
- package/lib/epic.d.ts +1 -2
- package/lib/epic.js +1 -2
- package/lib/esm/commonPayloadTypes/payloadIdentifier.js +14 -0
- package/lib/esm/entity/customer/customerPayload.js +2 -11
- package/lib/esm/entity/jeSchedules/jeSchedulesPayload.js +3 -2
- package/lib/esm/entity/transaction/payloadTypes/vendorTransactionPayload.js +2 -2
- package/lib/esm/entity/vendor/vendorPayload.js +10 -2
- package/lib/esm/entity/vendor/vendorReducer.js +4 -1
- package/lib/esm/epic.js +1 -2
- package/lib/esm/index.js +2 -2
- package/lib/esm/view/aiCfoView/aiCfoViewReducer.js +3 -29
- package/lib/esm/view/aiCfoView/aiCfoViewSelector.js +0 -11
- package/lib/esm/view/aiCfoView/epics/createSessionAndSubmitEpic.js +2 -2
- package/lib/esm/view/aiCfoView/epics/submitQuestionEpic.js +1 -7
- package/lib/esm/view/commonVendorView/transactionVendorView/epics/saveTransactionVendorEpic.js +9 -6
- package/lib/esm/view/commonVendorView/transactionVendorView/transactionVendorViewReducer.js +2 -0
- package/lib/esm/view/createTransferEntry/epics/createTransferEntryEpic.js +1 -1
- package/lib/esm/view/onboardingView/cockpitView/epic/initializeOnboardingCustomerViewUpdateDataEpic.js +16 -4
- package/lib/esm/view/onboardingView/cockpitView/onboardingCockpitViewPayload.js +2 -2
- package/lib/esm/view/referralView/epics/sendReferralInviteEpic.js +1 -9
- package/lib/esm/view/spendManagement/billPay/billDetailView/epics/fetchBillDetailEpic.js +3 -3
- package/lib/esm/view/transactionDetail/epics/transactionDetailEpic.js +10 -9
- package/lib/esm/view/transactionDetail/epics/updateTransactionDetailEpic.js +1 -1
- package/lib/esm/view/vendorFiling1099/vendorFiling1099List/vendorFiling1099ListReducer.js +3 -1
- package/lib/esm/view/vendorList/vendorListReducer.js +3 -1
- package/lib/esm/view/vendorReviewView/vendorFirstReviewView/vendorFirstReviewViewReducer.js +2 -2
- package/lib/index.d.ts +4 -4
- package/lib/index.js +5 -9
- package/lib/view/aiCfoView/aiCfoViewPayload.d.ts +0 -14
- package/lib/view/aiCfoView/aiCfoViewReducer.d.ts +4 -8
- package/lib/view/aiCfoView/aiCfoViewReducer.js +4 -30
- package/lib/view/aiCfoView/aiCfoViewSelector.d.ts +1 -2
- package/lib/view/aiCfoView/aiCfoViewSelector.js +0 -12
- package/lib/view/aiCfoView/aiCfoViewState.d.ts +0 -15
- package/lib/view/aiCfoView/epics/createSessionAndSubmitEpic.js +2 -2
- package/lib/view/aiCfoView/epics/submitQuestionEpic.js +1 -7
- package/lib/view/commonVendorView/transactionVendorView/epics/saveTransactionVendorEpic.js +9 -6
- package/lib/view/commonVendorView/transactionVendorView/transactionVendorViewReducer.js +2 -0
- package/lib/view/createTransferEntry/epics/createTransferEntryEpic.js +1 -1
- package/lib/view/onboardingView/cockpitView/epic/initializeOnboardingCustomerViewUpdateDataEpic.js +15 -3
- package/lib/view/onboardingView/cockpitView/onboardingCockpitViewPayload.js +2 -2
- package/lib/view/referralView/epics/sendReferralInviteEpic.js +1 -9
- package/lib/view/spendManagement/billPay/billDetailView/epics/fetchBillDetailEpic.js +3 -3
- package/lib/view/transactionDetail/epics/transactionDetailEpic.js +9 -8
- package/lib/view/transactionDetail/epics/updateTransactionDetailEpic.js +1 -1
- package/lib/view/vendorFiling1099/vendorFiling1099List/vendorFiling1099ListReducer.js +3 -1
- package/lib/view/vendorList/vendorListReducer.js +3 -1
- package/lib/view/vendorReviewView/vendorFirstReviewView/vendorFirstReviewViewReducer.js +2 -2
- package/package.json +2 -5
- package/lib/esm/view/aiCfoView/epics/fetchSkillsEpic.js +0 -34
- package/lib/view/aiCfoView/epics/fetchSkillsEpic.d.ts +0 -8
- package/lib/view/aiCfoView/epics/fetchSkillsEpic.js +0 -38
|
@@ -317,8 +317,8 @@ const toVendorReviewViewLocalDataById = (vendorsPayload) => {
|
|
|
317
317
|
const mapPayloadToVendorFirstReviewView = (payload) => {
|
|
318
318
|
const { recommendationIds, nonExistingRecommendations } = (0, commonTypes_1.toAllRecommendationsFromPayload)(payload.recommendations);
|
|
319
319
|
return {
|
|
320
|
-
vendorId: payload.vendor_id,
|
|
321
|
-
selectedVendorId: payload.vendor_id,
|
|
320
|
+
vendorId: payload.vendor_id ?? '',
|
|
321
|
+
selectedVendorId: payload.vendor_id ?? '',
|
|
322
322
|
status: {
|
|
323
323
|
code: (0, commonTypes_1.toVendorFirstReviewViewStatusesTypeStrict)(payload.status.code),
|
|
324
324
|
name: payload.status.name,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeniai/client-epic-state",
|
|
3
|
-
"version": "5.1.
|
|
3
|
+
"version": "5.1.29",
|
|
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",
|
|
@@ -79,7 +79,6 @@
|
|
|
79
79
|
"ts-prune": "^0.10.3",
|
|
80
80
|
"ts-unused-exports": "^11.0.1",
|
|
81
81
|
"typescript": "^5.7.3",
|
|
82
|
-
"vite": "^7.3.5",
|
|
83
82
|
"vitest": "^4.1.8"
|
|
84
83
|
},
|
|
85
84
|
"dependencies": {
|
|
@@ -130,9 +129,7 @@
|
|
|
130
129
|
"postversion": "git push && git push --tags",
|
|
131
130
|
"check-dependencies": "node ./scripts/check_dependencies.js",
|
|
132
131
|
"clean-overrides": "node ./scripts/clean_overrides.js",
|
|
133
|
-
"create-
|
|
134
|
-
"bump-versions-master": "chmod +x ./scripts/bump_versions_master.sh && ./scripts/bump_versions_master.sh",
|
|
135
|
-
"bump-versions-beta": "chmod +x ./scripts/bump_versions_beta.sh && ./scripts/bump_versions_beta.sh",
|
|
132
|
+
"create-release-branch": "chmod +x ./scripts/create_release_branch.sh && ./scripts/create_release_branch.sh",
|
|
136
133
|
"bump-update-web-app-cockpit-beta": "chmod +x ./scripts/bump_and_update_web_app_ui_beta.sh && ./scripts/bump_and_update_web_app_ui_beta.sh",
|
|
137
134
|
"send-release-notes": "chmod +x ./scripts/send_release_notes.sh && ./scripts/send_release_notes.sh",
|
|
138
135
|
"update-slack-group-topic": "chmod +x ./scripts/update-slack-group-topic.sh && ./scripts/update-slack-group-topic.sh",
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { of } from 'rxjs';
|
|
2
|
-
import { catchError, filter, mergeMap, switchMap } from 'rxjs/operators';
|
|
3
|
-
import { createZeniAPIStatus, isSuccessResponse } from '../../../responsePayload';
|
|
4
|
-
import { fetchSkills, fetchSkillsFailure, fetchSkillsSuccess, } from '../aiCfoViewReducer';
|
|
5
|
-
const toSkill = (s) => ({
|
|
6
|
-
macroId: s.macro_id,
|
|
7
|
-
name: s.name,
|
|
8
|
-
displayName: s.display_name,
|
|
9
|
-
description: s.description,
|
|
10
|
-
semver: s.semver,
|
|
11
|
-
parameterHints: s.parameter_hints,
|
|
12
|
-
hasScripts: s.has_scripts,
|
|
13
|
-
});
|
|
14
|
-
/** GET {aiCfoMicroServiceBaseUrl}/1.0/skills — chat-visible skills for the `/` menu. */
|
|
15
|
-
export const fetchSkillsEpic = (actions$,
|
|
16
|
-
// state$ intentionally unused: the `/` menu dispatches this once per slash-entry
|
|
17
|
-
// (the composer dedupes), so we always re-fetch the (small, singleton) list.
|
|
18
|
-
_state$, zeniAPI) => actions$.pipe(filter(fetchSkills.match),
|
|
19
|
-
// switchMap: a singleton list endpoint with no key — cancel any in-flight
|
|
20
|
-
// fetch so the latest dispatch wins (no racing writes to `skills`).
|
|
21
|
-
switchMap(() => {
|
|
22
|
-
// aiCfoMicroServiceBaseUrl already targets the chat service (it serves the
|
|
23
|
-
// /1.0/agents/{id} submit route too); /1.0/skills lives on the same service.
|
|
24
|
-
const url = `${zeniAPI.apiEndPoints.aiCfoMicroServiceBaseUrl}/1.0/skills`;
|
|
25
|
-
return zeniAPI.getJSON(url).pipe(mergeMap((response) => {
|
|
26
|
-
if (isSuccessResponse(response) && response.data != null) {
|
|
27
|
-
// Guard the array: a malformed 2xx body without `skills` must not crash .map.
|
|
28
|
-
return of(fetchSkillsSuccess({
|
|
29
|
-
skills: (response.data.skills ?? []).map(toSkill),
|
|
30
|
-
}));
|
|
31
|
-
}
|
|
32
|
-
return of(fetchSkillsFailure(response.status));
|
|
33
|
-
}), catchError((error) => of(fetchSkillsFailure(createZeniAPIStatus('Unexpected Error', 'Fetch skills REST API call failed', error instanceof Error ? { message: error.message } : undefined)))));
|
|
34
|
-
}));
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { ActionsObservable, StateObservable } from 'redux-observable';
|
|
2
|
-
import { Observable } from 'rxjs';
|
|
3
|
-
import { RootState } from '../../../reducer';
|
|
4
|
-
import { ZeniAPI } from '../../../zeniAPI';
|
|
5
|
-
import { fetchSkills, fetchSkillsFailure, fetchSkillsSuccess } from '../aiCfoViewReducer';
|
|
6
|
-
export type ActionType = ReturnType<typeof fetchSkills> | ReturnType<typeof fetchSkillsSuccess> | ReturnType<typeof fetchSkillsFailure>;
|
|
7
|
-
/** GET {aiCfoMicroServiceBaseUrl}/1.0/skills — chat-visible skills for the `/` menu. */
|
|
8
|
-
export declare const fetchSkillsEpic: (actions$: ActionsObservable<ActionType>, _state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.fetchSkillsEpic = void 0;
|
|
4
|
-
const rxjs_1 = require("rxjs");
|
|
5
|
-
const operators_1 = require("rxjs/operators");
|
|
6
|
-
const responsePayload_1 = require("../../../responsePayload");
|
|
7
|
-
const aiCfoViewReducer_1 = require("../aiCfoViewReducer");
|
|
8
|
-
const toSkill = (s) => ({
|
|
9
|
-
macroId: s.macro_id,
|
|
10
|
-
name: s.name,
|
|
11
|
-
displayName: s.display_name,
|
|
12
|
-
description: s.description,
|
|
13
|
-
semver: s.semver,
|
|
14
|
-
parameterHints: s.parameter_hints,
|
|
15
|
-
hasScripts: s.has_scripts,
|
|
16
|
-
});
|
|
17
|
-
/** GET {aiCfoMicroServiceBaseUrl}/1.0/skills — chat-visible skills for the `/` menu. */
|
|
18
|
-
const fetchSkillsEpic = (actions$,
|
|
19
|
-
// state$ intentionally unused: the `/` menu dispatches this once per slash-entry
|
|
20
|
-
// (the composer dedupes), so we always re-fetch the (small, singleton) list.
|
|
21
|
-
_state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(aiCfoViewReducer_1.fetchSkills.match),
|
|
22
|
-
// switchMap: a singleton list endpoint with no key — cancel any in-flight
|
|
23
|
-
// fetch so the latest dispatch wins (no racing writes to `skills`).
|
|
24
|
-
(0, operators_1.switchMap)(() => {
|
|
25
|
-
// aiCfoMicroServiceBaseUrl already targets the chat service (it serves the
|
|
26
|
-
// /1.0/agents/{id} submit route too); /1.0/skills lives on the same service.
|
|
27
|
-
const url = `${zeniAPI.apiEndPoints.aiCfoMicroServiceBaseUrl}/1.0/skills`;
|
|
28
|
-
return zeniAPI.getJSON(url).pipe((0, operators_1.mergeMap)((response) => {
|
|
29
|
-
if ((0, responsePayload_1.isSuccessResponse)(response) && response.data != null) {
|
|
30
|
-
// Guard the array: a malformed 2xx body without `skills` must not crash .map.
|
|
31
|
-
return (0, rxjs_1.of)((0, aiCfoViewReducer_1.fetchSkillsSuccess)({
|
|
32
|
-
skills: (response.data.skills ?? []).map(toSkill),
|
|
33
|
-
}));
|
|
34
|
-
}
|
|
35
|
-
return (0, rxjs_1.of)((0, aiCfoViewReducer_1.fetchSkillsFailure)(response.status));
|
|
36
|
-
}), (0, operators_1.catchError)((error) => (0, rxjs_1.of)((0, aiCfoViewReducer_1.fetchSkillsFailure)((0, responsePayload_1.createZeniAPIStatus)('Unexpected Error', 'Fetch skills REST API call failed', error instanceof Error ? { message: error.message } : undefined)))));
|
|
37
|
-
}));
|
|
38
|
-
exports.fetchSkillsEpic = fetchSkillsEpic;
|