@zeniai/client-epic-state 5.2.34 → 5.2.35
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/editInvoicingCustomerDetailView/editInvoicingCustomerDetailViewPayload.js +4 -0
- package/lib/index.d.ts +1 -1
- package/lib/view/invoicing/editInvoicingCustomerDetailView/editInvoicingCustomerDetailViewPayload.d.ts +1 -11
- package/lib/view/invoicing/editInvoicingCustomerDetailView/editInvoicingCustomerDetailViewPayload.js +4 -0
- package/lib/view/invoicing/editInvoicingCustomerDetailView/editInvoicingCustomerDetailViewReducer.d.ts +1 -2
- package/lib/view/invoicing/editInvoicingCustomerDetailView/editInvoicingCustomerDetailViewSelector.d.ts +1 -2
- package/lib/view/invoicing/editInvoicingCustomerDetailView/editInvoicingCustomerDetailViewState.d.ts +15 -1
- package/lib/view/invoicing/invoicingCustomerListView/invoicingCustomerListViewReducer.d.ts +1 -1
- package/lib/view/invoicing/invoicingCustomerListView/invoicingCustomerListViewState.d.ts +1 -1
- package/package.json +1 -1
|
@@ -30,6 +30,10 @@ export const localDataToSaveInvoicingCustomerPayload = (localData, billingAddres
|
|
|
30
30
|
: {}),
|
|
31
31
|
};
|
|
32
32
|
};
|
|
33
|
+
/**
|
|
34
|
+
* The email rendered once with sentinel tokens standing in for the subject and
|
|
35
|
+
* body, so the composer can splice a draft into it without another request.
|
|
36
|
+
*/
|
|
33
37
|
export const toInvoicingPaymentLinkEmailPreview = (payload) => ({
|
|
34
38
|
body: payload.body,
|
|
35
39
|
bodyToken: payload.body_token,
|
package/lib/index.d.ts
CHANGED
|
@@ -1171,7 +1171,7 @@ export type { InvoicingCustomerColumnConfig, InvoicingCustomerFilters, Invoicing
|
|
|
1171
1171
|
export { getInvoicingCustomerListView } from './view/invoicing/invoicingCustomerListView/invoicingCustomerListViewSelector';
|
|
1172
1172
|
export type { InvoicingCustomerListView } from './view/invoicing/invoicingCustomerListView/invoicingCustomerListViewSelector';
|
|
1173
1173
|
export { fetchInvoicingCustomerDetail, fetchInvoicingCustomerDetailPage, fetchInvoicingPaymentLinkEmailPreviewPage, } from './view/invoicing/editInvoicingCustomerDetailView/editInvoicingCustomerDetailViewReducer';
|
|
1174
|
-
export type { InvoicingPaymentLinkEmailPreviewData } from './view/invoicing/editInvoicingCustomerDetailView/
|
|
1174
|
+
export type { InvoicingPaymentLinkEmailPreviewData } from './view/invoicing/editInvoicingCustomerDetailView/editInvoicingCustomerDetailViewState';
|
|
1175
1175
|
export { createInvoicingSetupIntent, fetchInvoicingPlaidLinkToken, resetInvoicingCustomerPaymentMethod, saveInvoicingPaymentMethod, sendInvoicingPaymentLink, } from './view/invoicing/customerPaymentMethod/customerPaymentMethodReducer';
|
|
1176
1176
|
export type { InvoicingSetupIntent } from './view/invoicing/customerPaymentMethod/customerPaymentMethodState';
|
|
1177
1177
|
export { getInvoicingPaymentLinkSendState, getInvoicingPaymentMethodSaveState, getInvoicingPlaidLinkToken, getInvoicingSentPaymentLinkEmail, getInvoicingSentPaymentLinkMagicUrl, getInvoicingSetupIntent, getInvoicingSetupIntentFetchState, } from './view/invoicing/customerPaymentMethod/customerPaymentMethodSelector';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { InvoicingCustomerPayload } from '../../../entity/invoicing/invoicingCustomer/invoicingCustomerPayload';
|
|
2
2
|
import { ZeniAPIResponse } from '../../../responsePayload';
|
|
3
3
|
import { AddressUpdatableInfo } from '../../addressView/addressViewState';
|
|
4
|
-
import { InvoicingCustomerFormLocalData } from './editInvoicingCustomerDetailViewState';
|
|
4
|
+
import { InvoicingCustomerFormLocalData, InvoicingPaymentLinkEmailPreviewData } from './editInvoicingCustomerDetailViewState';
|
|
5
5
|
export type SaveInvoicingCustomerResponse = ZeniAPIResponse<InvoicingCustomerPayload>;
|
|
6
6
|
/**
|
|
7
7
|
* Build the create/update customer request body from the form draft. The
|
|
@@ -25,15 +25,5 @@ export type InvoicingPaymentLinkEmailPreviewResponse = ZeniAPIResponse<Invoicing
|
|
|
25
25
|
* The email rendered once with sentinel tokens standing in for the subject and
|
|
26
26
|
* body, so the composer can splice a draft into it without another request.
|
|
27
27
|
*/
|
|
28
|
-
export interface InvoicingPaymentLinkEmailPreviewData {
|
|
29
|
-
/** Default body prefill, plain text. */
|
|
30
|
-
body: string;
|
|
31
|
-
bodyToken: string;
|
|
32
|
-
renderedHtmlTemplate: string;
|
|
33
|
-
/** Default subject prefill. */
|
|
34
|
-
subject: string;
|
|
35
|
-
subjectToken: string;
|
|
36
|
-
to: string;
|
|
37
|
-
}
|
|
38
28
|
export declare const toInvoicingPaymentLinkEmailPreview: (payload: InvoicingPaymentLinkEmailPreviewPayload) => InvoicingPaymentLinkEmailPreviewData;
|
|
39
29
|
export type AddPromotionalCreditsResponse = ZeniAPIResponse<InvoicingCustomerPayload>;
|
package/lib/view/invoicing/editInvoicingCustomerDetailView/editInvoicingCustomerDetailViewPayload.js
CHANGED
|
@@ -34,6 +34,10 @@ const localDataToSaveInvoicingCustomerPayload = (localData, billingAddress) => {
|
|
|
34
34
|
};
|
|
35
35
|
};
|
|
36
36
|
exports.localDataToSaveInvoicingCustomerPayload = localDataToSaveInvoicingCustomerPayload;
|
|
37
|
+
/**
|
|
38
|
+
* The email rendered once with sentinel tokens standing in for the subject and
|
|
39
|
+
* body, so the composer can splice a draft into it without another request.
|
|
40
|
+
*/
|
|
37
41
|
const toInvoicingPaymentLinkEmailPreview = (payload) => ({
|
|
38
42
|
body: payload.body,
|
|
39
43
|
bodyToken: payload.body_token,
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { ID } from '../../../commonStateTypes/common';
|
|
2
2
|
import { ZeniAPIStatus } from '../../../responsePayload';
|
|
3
|
-
import { InvoicingPaymentLinkEmailPreviewData } from './
|
|
4
|
-
import { EditInvoicingCustomerDetailViewState, InvoicingCustomerFormLocalData } from './editInvoicingCustomerDetailViewState';
|
|
3
|
+
import { EditInvoicingCustomerDetailViewState, InvoicingCustomerFormLocalData, InvoicingPaymentLinkEmailPreviewData } from './editInvoicingCustomerDetailViewState';
|
|
5
4
|
/** Add promotional credits to a customer. */
|
|
6
5
|
export interface SubmitAddPromotionalCreditsPayload {
|
|
7
6
|
amount: number;
|
|
@@ -5,8 +5,7 @@ import { InvoicingFieldHelpByCode, InvoicingNamedOption } from '../../../entity/
|
|
|
5
5
|
import { InvoicingCustomer, InvoicingCustomerPaymentMethod } from '../../../entity/invoicing/invoicingCustomer/invoicingCustomerState';
|
|
6
6
|
import { RootState } from '../../../rootStateTypes';
|
|
7
7
|
import { InvoicingSetupIntent } from '../customerPaymentMethod/customerPaymentMethodState';
|
|
8
|
-
import { InvoicingPaymentLinkEmailPreviewData } from './
|
|
9
|
-
import { InvoicingCustomerFormLocalData } from './editInvoicingCustomerDetailViewState';
|
|
8
|
+
import { InvoicingCustomerFormLocalData, InvoicingPaymentLinkEmailPreviewData } from './editInvoicingCustomerDetailViewState';
|
|
10
9
|
/**
|
|
11
10
|
* Read-only view for the customer detail page: the customer entity + its fetch
|
|
12
11
|
* state, plus everything the page renders in view mode — recent invoices, the
|
package/lib/view/invoicing/editInvoicingCustomerDetailView/editInvoicingCustomerDetailViewState.d.ts
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
import { FetchStateAndError, FetchedState, ID } from '../../../commonStateTypes/common';
|
|
2
|
-
|
|
2
|
+
/**
|
|
3
|
+
* The payment-link email the composer opens with: the backend's prefill plus
|
|
4
|
+
* the tokens the frontend splices the user's edits into. State, not wire shape
|
|
5
|
+
* — `toInvoicingPaymentLinkEmailPreview` in the payload file maps onto it.
|
|
6
|
+
*/
|
|
7
|
+
export interface InvoicingPaymentLinkEmailPreviewData {
|
|
8
|
+
/** Default body prefill, plain text. */
|
|
9
|
+
body: string;
|
|
10
|
+
bodyToken: string;
|
|
11
|
+
renderedHtmlTemplate: string;
|
|
12
|
+
/** Default subject prefill. */
|
|
13
|
+
subject: string;
|
|
14
|
+
subjectToken: string;
|
|
15
|
+
to: string;
|
|
16
|
+
}
|
|
3
17
|
/**
|
|
4
18
|
* Draft form state for the create/edit customer form. Held in CES so the form
|
|
5
19
|
* flows its data from here (mirrors the bill-pay / reimbursement pattern). The
|
|
@@ -26,7 +26,7 @@ export declare const fetchInvoicingCustomerList: import("@reduxjs/toolkit").Acti
|
|
|
26
26
|
ids: ID[];
|
|
27
27
|
keepExistingListItems: boolean;
|
|
28
28
|
nextCursor: string | null;
|
|
29
|
-
}, "invoicingCustomerListView/updateInvoicingCustomerList">, updateInvoicingCustomerListFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<ZeniAPIStatus<Record<string, unknown>>, "invoicingCustomerListView/updateInvoicingCustomerListFailure">, fetchInvoicingCustomerCounts: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"invoicingCustomerListView/fetchInvoicingCustomerCounts">, updateInvoicingCustomerCounts: import("@reduxjs/toolkit").ActionCreatorWithPayload<InvoicingListCounts, "invoicingCustomerListView/updateInvoicingCustomerCounts">, updateInvoicingCustomerCountsFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<ZeniAPIStatus<Record<string, unknown>>, "invoicingCustomerListView/updateInvoicingCustomerCountsFailure">, updateInvoicingCustomerFilters: import("@reduxjs/toolkit").ActionCreatorWithPayload<InvoicingCustomerFilters, "invoicingCustomerListView/updateInvoicingCustomerFilters">, setInvoicingCustomerActiveTab: import("@reduxjs/toolkit").ActionCreatorWithPayload<"active" | "all" | "
|
|
29
|
+
}, "invoicingCustomerListView/updateInvoicingCustomerList">, updateInvoicingCustomerListFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<ZeniAPIStatus<Record<string, unknown>>, "invoicingCustomerListView/updateInvoicingCustomerListFailure">, fetchInvoicingCustomerCounts: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"invoicingCustomerListView/fetchInvoicingCustomerCounts">, updateInvoicingCustomerCounts: import("@reduxjs/toolkit").ActionCreatorWithPayload<InvoicingListCounts, "invoicingCustomerListView/updateInvoicingCustomerCounts">, updateInvoicingCustomerCountsFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<ZeniAPIStatus<Record<string, unknown>>, "invoicingCustomerListView/updateInvoicingCustomerCountsFailure">, updateInvoicingCustomerFilters: import("@reduxjs/toolkit").ActionCreatorWithPayload<InvoicingCustomerFilters, "invoicingCustomerListView/updateInvoicingCustomerFilters">, setInvoicingCustomerActiveTab: import("@reduxjs/toolkit").ActionCreatorWithPayload<"active" | "all" | "trial" | "at_risk", "invoicingCustomerListView/setInvoicingCustomerActiveTab">, addInvoicingCustomerToList: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
30
30
|
id: ID;
|
|
31
31
|
status?: string;
|
|
32
32
|
}, "invoicingCustomerListView/addInvoicingCustomerToList">;
|
|
@@ -20,7 +20,7 @@ export interface InvoicingCustomerColumnConfig {
|
|
|
20
20
|
}
|
|
21
21
|
export declare const INVOICING_CUSTOMER_COLUMNS: InvoicingCustomerColumnConfig[];
|
|
22
22
|
export declare const ALL_INVOICING_CUSTOMER_TAB_IDS: readonly ["all", "active", "trial", "at_risk"];
|
|
23
|
-
export declare const toInvoicingCustomerTabId: (v: string) => "active" | "all" | "
|
|
23
|
+
export declare const toInvoicingCustomerTabId: (v: string) => "active" | "all" | "trial" | "at_risk";
|
|
24
24
|
export type InvoicingCustomerTabId = ReturnType<typeof toInvoicingCustomerTabId>;
|
|
25
25
|
export interface InvoicingCustomerListViewState extends FetchedState {
|
|
26
26
|
/** Selected status tab (CES-owned so it persists across page revisits). */
|
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.35",
|
|
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",
|