@zeniai/client-epic-state 4.19.13-beta2AD → 4.19.13-betaRR0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of @zeniai/client-epic-state might be problematic. Click here for more details.
- package/lib/epic.d.ts +1 -2
- package/lib/epic.js +1 -2
- package/lib/index.d.ts +1 -1
- package/lib/index.js +2 -3
- package/lib/view/aiCfoView/aiCfoViewReducer.d.ts +1 -8
- package/lib/view/aiCfoView/aiCfoViewReducer.js +2 -36
- package/lib/view/aiCfoView/aiCfoViewSelector.d.ts +0 -1
- package/lib/view/aiCfoView/aiCfoViewSelector.js +1 -2
- package/lib/view/aiCfoView/aiCfoViewState.d.ts +0 -1
- package/lib/view/spendManagement/chargeCards/chargeCardSetUp/chargeCardSetUpViewReducer.d.ts +2 -1
- package/lib/view/spendManagement/chargeCards/chargeCardSetUp/chargeCardSetUpViewReducer.js +2 -1
- package/lib/view/spendManagement/chargeCards/chargeCardSetUp/epic/acceptChargeCardTermsEpic.js +6 -2
- package/lib/zeniAPI.d.ts +0 -1
- package/lib/zeniAPI.js +0 -6
- package/package.json +2 -2
- package/lib/tsconfig.typecheck.tsbuildinfo +0 -1
- package/lib/view/aiCfoView/epics/deleteChatSessionEpic.d.ts +0 -21
- package/lib/view/aiCfoView/epics/deleteChatSessionEpic.js +0 -35
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { ActionsObservable, StateObservable } from 'redux-observable';
|
|
2
|
-
import { clearSession } from '../../../entity/aiCfo/aiCfoReducer';
|
|
3
|
-
import { RootState } from '../../../reducer';
|
|
4
|
-
import { ZeniAPI } from '../../../zeniAPI';
|
|
5
|
-
import { deleteChatSession, deleteChatSessionFailure, deleteChatSessionSuccess } from '../aiCfoViewReducer';
|
|
6
|
-
export type ActionType = ReturnType<typeof deleteChatSession> | ReturnType<typeof clearSession> | ReturnType<typeof deleteChatSessionSuccess> | ReturnType<typeof deleteChatSessionFailure>;
|
|
7
|
-
export declare const deleteChatSessionEpic: (actions$: ActionsObservable<ActionType>, _state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => import("rxjs").Observable<{
|
|
8
|
-
payload: string;
|
|
9
|
-
type: "aiCfo/clearSession";
|
|
10
|
-
} | {
|
|
11
|
-
payload: {
|
|
12
|
-
chatSessionId: import("../../..").ID;
|
|
13
|
-
};
|
|
14
|
-
type: "aiCfoView/deleteChatSessionSuccess";
|
|
15
|
-
} | {
|
|
16
|
-
payload: {
|
|
17
|
-
chatSessionId: import("../../..").ID;
|
|
18
|
-
error: import("../../../responsePayload").ZeniAPIStatus;
|
|
19
|
-
};
|
|
20
|
-
type: "aiCfoView/deleteChatSessionFailure";
|
|
21
|
-
}>;
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.deleteChatSessionEpic = void 0;
|
|
4
|
-
const rxjs_1 = require("rxjs");
|
|
5
|
-
const operators_1 = require("rxjs/operators");
|
|
6
|
-
const aiCfoReducer_1 = require("../../../entity/aiCfo/aiCfoReducer");
|
|
7
|
-
const responsePayload_1 = require("../../../responsePayload");
|
|
8
|
-
const aiCfoViewReducer_1 = require("../aiCfoViewReducer");
|
|
9
|
-
const deleteChatSessionEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(aiCfoViewReducer_1.deleteChatSession.match), (0, operators_1.mergeMap)((action) => {
|
|
10
|
-
const { chatSessionId } = action.payload;
|
|
11
|
-
// No request body; chat_session_id is in the path. API returns 204 No Content on success.
|
|
12
|
-
return zeniAPI
|
|
13
|
-
.deleteAndGetJSON(`https://chat-dot-zeni-apis-dev.appspot.com/1.0/sessions/${chatSessionId}`)
|
|
14
|
-
.pipe((0, operators_1.mergeMap)((response) => {
|
|
15
|
-
if ((0, responsePayload_1.isSuccessStatus)(response)) {
|
|
16
|
-
console.log('response', response);
|
|
17
|
-
return (0, rxjs_1.from)([
|
|
18
|
-
(0, aiCfoViewReducer_1.deleteChatSessionSuccess)({ chatSessionId }),
|
|
19
|
-
(0, aiCfoReducer_1.clearSession)(chatSessionId)
|
|
20
|
-
]);
|
|
21
|
-
}
|
|
22
|
-
else {
|
|
23
|
-
console.log('response', response.status, response.status.message);
|
|
24
|
-
return (0, rxjs_1.of)((0, aiCfoViewReducer_1.deleteChatSessionFailure)({
|
|
25
|
-
chatSessionId,
|
|
26
|
-
error: response.status,
|
|
27
|
-
}));
|
|
28
|
-
}
|
|
29
|
-
}), (0, operators_1.catchError)((error) => (0, rxjs_1.of)((0, aiCfoViewReducer_1.deleteChatSessionFailure)({
|
|
30
|
-
chatSessionId,
|
|
31
|
-
error: (0, responsePayload_1.createZeniAPIStatus)('Unexpected Error', 'Delete chat session REST API call errored out ' +
|
|
32
|
-
JSON.stringify(error)),
|
|
33
|
-
}))));
|
|
34
|
-
}));
|
|
35
|
-
exports.deleteChatSessionEpic = deleteChatSessionEpic;
|