@zeniai/client-epic-state 5.1.39-betaAK0 → 5.1.39-betaAK1
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/esm/view/invoicing/dataImportAction/dataImportActionEpic.js +1 -7
- package/lib/esm/view/invoicing/dataImportAction/dataImportActionReducer.js +2 -7
- package/lib/index.d.ts +1 -1
- package/lib/view/invoicing/dataImportAction/dataImportActionEpic.js +1 -7
- package/lib/view/invoicing/dataImportAction/dataImportActionReducer.d.ts +1 -7
- package/lib/view/invoicing/dataImportAction/dataImportActionReducer.js +2 -7
- package/package.json +1 -1
|
@@ -22,13 +22,7 @@ const handleResponse = (kind, response$) => response$.pipe(mergeMap((response) =
|
|
|
22
22
|
}))));
|
|
23
23
|
export const invoicingDataImportActionEpic = (actions$, _state$, zeniAPI) => {
|
|
24
24
|
const base = () => `${zeniAPI.apiEndPoints.invoicingMicroServiceBaseUrl}/1.0/data-import`;
|
|
25
|
-
const connect$ = actions$.pipe(filter(connectInvoicingChargebee.match), mergeMap((
|
|
26
|
-
site: action.payload.site,
|
|
27
|
-
...(action.payload.apiKey != null &&
|
|
28
|
-
action.payload.apiKey.length > 0
|
|
29
|
-
? { api_key: action.payload.apiKey }
|
|
30
|
-
: {}),
|
|
31
|
-
}))));
|
|
25
|
+
const connect$ = actions$.pipe(filter(connectInvoicingChargebee.match), mergeMap(() => handleResponse('connect', zeniAPI.postAndGetJSON(`${base()}/chargebee/connect`, {}))));
|
|
32
26
|
const upload$ = actions$.pipe(filter(uploadInvoicingMigrationFiles.match), mergeMap((action) => {
|
|
33
27
|
const form = new FormData();
|
|
34
28
|
action.payload.files.forEach((file) => form.append('files', file, file.name));
|
|
@@ -9,13 +9,8 @@ const dataImportAction = createSlice({
|
|
|
9
9
|
name: 'invoicingDataImportAction',
|
|
10
10
|
initialState,
|
|
11
11
|
reducers: {
|
|
12
|
-
connectInvoicingChargebee
|
|
13
|
-
|
|
14
|
-
inProgress(draft, 'connect');
|
|
15
|
-
},
|
|
16
|
-
prepare(payload) {
|
|
17
|
-
return { payload };
|
|
18
|
-
},
|
|
12
|
+
connectInvoicingChargebee(draft) {
|
|
13
|
+
inProgress(draft, 'connect');
|
|
19
14
|
},
|
|
20
15
|
uploadInvoicingMigrationFiles: {
|
|
21
16
|
reducer(draft) {
|
package/lib/index.d.ts
CHANGED
|
@@ -1003,7 +1003,7 @@ export type { InvoicingDunningCase } from './entity/invoicing/dunningCase/dunnin
|
|
|
1003
1003
|
export type { InvoicingDunningStatus } from './entity/invoicing/dunningCase/dunningCasePayload';
|
|
1004
1004
|
export type { InvoicingInvoicePayload, InvoicingInvoiceStatus, } from './entity/invoicing/invoice/invoicePayload';
|
|
1005
1005
|
export type { InvoicingDunningAttempt, InvoicingInvoice, InvoicingInvoiceKPIs, InvoicingInvoiceNote, InvoicingIssuedCreditNote, InvoicingLineItem, InvoicingLinkedPayment, } from './entity/invoicing/invoice/invoiceState';
|
|
1006
|
-
export type { InvoicingBillingAddressPayload,
|
|
1006
|
+
export type { InvoicingBillingAddressPayload, InvoicingFormOption, InvoicingListCounts, InvoicingPaginatedList, InvoicingPriceType, InvoicingSettingsPayload as InvoicingSettings, } from './entity/invoicing/invoicingCommonPayload';
|
|
1007
1007
|
export type { InvoicingPlan } from './entity/invoicing/plan/planState';
|
|
1008
1008
|
export type { InvoicingAccountingDetail, InvoicingPlanTier, InvoicingProduct, } from './entity/invoicing/product/productState';
|
|
1009
1009
|
export type { InvoicingBillingPeriodUnit, InvoicingSubscriptionStatus, } from './entity/invoicing/invoicingSubscription/invoicingSubscriptionPayload';
|
|
@@ -25,13 +25,7 @@ const handleResponse = (kind, response$) => response$.pipe((0, operators_1.merge
|
|
|
25
25
|
}))));
|
|
26
26
|
const invoicingDataImportActionEpic = (actions$, _state$, zeniAPI) => {
|
|
27
27
|
const base = () => `${zeniAPI.apiEndPoints.invoicingMicroServiceBaseUrl}/1.0/data-import`;
|
|
28
|
-
const connect$ = actions$.pipe((0, operators_1.filter)(dataImportActionReducer_1.connectInvoicingChargebee.match), (0, operators_1.mergeMap)((
|
|
29
|
-
site: action.payload.site,
|
|
30
|
-
...(action.payload.apiKey != null &&
|
|
31
|
-
action.payload.apiKey.length > 0
|
|
32
|
-
? { api_key: action.payload.apiKey }
|
|
33
|
-
: {}),
|
|
34
|
-
}))));
|
|
28
|
+
const connect$ = actions$.pipe((0, operators_1.filter)(dataImportActionReducer_1.connectInvoicingChargebee.match), (0, operators_1.mergeMap)(() => handleResponse('connect', zeniAPI.postAndGetJSON(`${base()}/chargebee/connect`, {}))));
|
|
35
29
|
const upload$ = actions$.pipe((0, operators_1.filter)(dataImportActionReducer_1.uploadInvoicingMigrationFiles.match), (0, operators_1.mergeMap)((action) => {
|
|
36
30
|
const form = new FormData();
|
|
37
31
|
action.payload.files.forEach((file) => form.append('files', file, file.name));
|
|
@@ -1,13 +1,7 @@
|
|
|
1
1
|
import { ZeniAPIStatus } from '../../../responsePayload';
|
|
2
2
|
import { InvoicingDataImportActionKind, InvoicingDataImportActionState } from './dataImportActionState';
|
|
3
3
|
export declare const initialState: InvoicingDataImportActionState;
|
|
4
|
-
export declare const connectInvoicingChargebee: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[payload: {
|
|
5
|
-
site: string;
|
|
6
|
-
apiKey?: string;
|
|
7
|
-
}], {
|
|
8
|
-
site: string;
|
|
9
|
-
apiKey?: string;
|
|
10
|
-
}, "invoicingDataImportAction/connectInvoicingChargebee", never, never>, uploadInvoicingMigrationFiles: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[payload: {
|
|
4
|
+
export declare const connectInvoicingChargebee: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"invoicingDataImportAction/connectInvoicingChargebee">, uploadInvoicingMigrationFiles: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[payload: {
|
|
11
5
|
files: File[];
|
|
12
6
|
}], {
|
|
13
7
|
files: File[];
|
|
@@ -13,13 +13,8 @@ const dataImportAction = (0, toolkit_1.createSlice)({
|
|
|
13
13
|
name: 'invoicingDataImportAction',
|
|
14
14
|
initialState: exports.initialState,
|
|
15
15
|
reducers: {
|
|
16
|
-
connectInvoicingChargebee
|
|
17
|
-
|
|
18
|
-
inProgress(draft, 'connect');
|
|
19
|
-
},
|
|
20
|
-
prepare(payload) {
|
|
21
|
-
return { payload };
|
|
22
|
-
},
|
|
16
|
+
connectInvoicingChargebee(draft) {
|
|
17
|
+
inProgress(draft, 'connect');
|
|
23
18
|
},
|
|
24
19
|
uploadInvoicingMigrationFiles: {
|
|
25
20
|
reducer(draft) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeniai/client-epic-state",
|
|
3
|
-
"version": "5.1.39-
|
|
3
|
+
"version": "5.1.39-betaAK1",
|
|
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",
|