@zeniai/client-epic-state 5.1.51-betaAK6 → 5.1.51-betaAK7
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/invoicing/creditNote/creditNotePayload.d.ts +3 -0
- package/lib/entity/invoicing/creditNote/creditNotePayload.js +3 -0
- package/lib/entity/invoicing/creditNote/creditNoteState.d.ts +3 -0
- package/lib/entity/invoicing/dunningCase/dunningCasePayload.d.ts +1 -0
- package/lib/entity/invoicing/dunningCase/dunningCasePayload.js +1 -0
- package/lib/entity/invoicing/dunningCase/dunningCaseState.d.ts +1 -0
- package/lib/entity/invoicing/invoice/invoicePayload.d.ts +1 -0
- package/lib/entity/invoicing/invoice/invoicePayload.js +1 -0
- package/lib/entity/invoicing/invoice/invoiceState.d.ts +1 -0
- package/lib/entity/invoicing/invoicingCommonPayload.d.ts +13 -0
- package/lib/entity/invoicing/invoicingCommonPayload.js +19 -0
- package/lib/entity/invoicing/invoicingCustomer/invoicingCustomerPayload.d.ts +1 -0
- package/lib/entity/invoicing/invoicingCustomer/invoicingCustomerPayload.js +1 -0
- package/lib/entity/invoicing/invoicingCustomer/invoicingCustomerState.d.ts +1 -0
- package/lib/entity/invoicing/invoicingSubscription/invoicingSubscriptionPayload.d.ts +2 -0
- package/lib/entity/invoicing/invoicingSubscription/invoicingSubscriptionPayload.js +2 -0
- package/lib/entity/invoicing/invoicingSubscription/invoicingSubscriptionState.d.ts +2 -0
- package/lib/entity/invoicing/invoicingTransaction/invoicingTransactionPayload.d.ts +1 -0
- package/lib/entity/invoicing/invoicingTransaction/invoicingTransactionPayload.js +1 -0
- package/lib/entity/invoicing/invoicingTransaction/invoicingTransactionState.d.ts +1 -0
- package/lib/entity/invoicing/plan/planPayload.d.ts +1 -1
- package/lib/entity/invoicing/plan/planPayload.js +1 -1
- package/lib/entity/invoicing/plan/planState.d.ts +1 -1
- package/lib/entity/invoicing/product/productPayload.d.ts +1 -0
- package/lib/entity/invoicing/product/productPayload.js +1 -0
- package/lib/entity/invoicing/product/productState.d.ts +1 -0
- package/lib/esm/entity/invoicing/creditNote/creditNotePayload.js +3 -0
- package/lib/esm/entity/invoicing/dunningCase/dunningCasePayload.js +1 -0
- package/lib/esm/entity/invoicing/invoice/invoicePayload.js +1 -0
- package/lib/esm/entity/invoicing/invoicingCommonPayload.js +17 -1
- package/lib/esm/entity/invoicing/invoicingCustomer/invoicingCustomerPayload.js +1 -0
- package/lib/esm/entity/invoicing/invoicingSubscription/invoicingSubscriptionPayload.js +2 -0
- package/lib/esm/entity/invoicing/invoicingTransaction/invoicingTransactionPayload.js +1 -0
- package/lib/esm/entity/invoicing/plan/planPayload.js +1 -1
- package/lib/esm/entity/invoicing/product/productPayload.js +1 -0
- package/lib/esm/index.js +1 -0
- package/lib/esm/view/invoicing/createInvoice/createInvoiceSelector.js +3 -3
- package/lib/esm/view/invoicing/editInvoicingCatalogItemDetailView/editInvoicingCatalogItemDetailViewPayload.js +57 -80
- package/lib/esm/view/invoicing/editInvoicingCatalogItemDetailView/editInvoicingCatalogItemDetailViewSelector.js +11 -39
- package/lib/esm/view/invoicing/editInvoicingCatalogItemDetailView/invoicingCatalogItemFormConfig.js +20 -24
- package/lib/esm/view/invoicing/editInvoicingCatalogItemDetailView/saveInvoicingCatalogItemEpic.js +13 -20
- package/lib/esm/view/invoicing/editInvoicingSubscriptionDetailView/editInvoicingSubscriptionDetailViewSelector.js +5 -3
- package/lib/esm/view/invoicing/invoicingCatalogItemDetailView/invoicingCatalogItemDetailViewEpics.js +2 -7
- package/lib/esm/view/invoicing/invoicingCatalogItemDetailView/invoicingCatalogItemDetailViewSelector.js +2 -8
- package/lib/esm/view/invoicing/invoicingCatalogListView/epics/fetchInvoicingCatalogProductListEpic.js +5 -8
- package/lib/esm/view/invoicing/invoicingCatalogListView/invoicingCatalogListViewSelector.js +9 -3
- package/lib/esm/view/invoicing/invoicingCatalogListView/invoicingCatalogListViewState.js +3 -1
- package/lib/esm/view/invoicing/invoicingConfigView/invoicingConfigViewReducer.js +6 -0
- package/lib/esm/view/invoicing/invoicingConfigView/invoicingConfigViewSelector.js +1 -0
- package/lib/esm/view/invoicing/invoicingOverview/invoicingOverviewPayload.js +1 -0
- package/lib/esm/view/invoicing/invoicingSubscriptionListView/invoicingSubscriptionListViewState.js +2 -0
- package/lib/index.d.ts +2 -1
- package/lib/index.js +9 -6
- package/lib/view/invoicing/createInvoice/createInvoiceSelector.d.ts +1 -2
- package/lib/view/invoicing/createInvoice/createInvoiceSelector.js +2 -2
- package/lib/view/invoicing/editInvoicingCatalogItemDetailView/editInvoicingCatalogItemDetailViewPayload.d.ts +3 -5
- package/lib/view/invoicing/editInvoicingCatalogItemDetailView/editInvoicingCatalogItemDetailViewPayload.js +57 -80
- package/lib/view/invoicing/editInvoicingCatalogItemDetailView/editInvoicingCatalogItemDetailViewSelector.d.ts +3 -5
- package/lib/view/invoicing/editInvoicingCatalogItemDetailView/editInvoicingCatalogItemDetailViewSelector.js +11 -39
- package/lib/view/invoicing/editInvoicingCatalogItemDetailView/editInvoicingCatalogItemDetailViewState.d.ts +4 -6
- package/lib/view/invoicing/editInvoicingCatalogItemDetailView/invoicingCatalogItemFormConfig.d.ts +3 -15
- package/lib/view/invoicing/editInvoicingCatalogItemDetailView/invoicingCatalogItemFormConfig.js +20 -24
- package/lib/view/invoicing/editInvoicingCatalogItemDetailView/saveInvoicingCatalogItemEpic.d.ts +2 -3
- package/lib/view/invoicing/editInvoicingCatalogItemDetailView/saveInvoicingCatalogItemEpic.js +13 -20
- package/lib/view/invoicing/editInvoicingSubscriptionDetailView/editInvoicingSubscriptionDetailViewSelector.d.ts +1 -2
- package/lib/view/invoicing/editInvoicingSubscriptionDetailView/editInvoicingSubscriptionDetailViewSelector.js +4 -2
- package/lib/view/invoicing/invoicingCatalogItemDetailView/invoicingCatalogItemDetailViewEpics.d.ts +1 -2
- package/lib/view/invoicing/invoicingCatalogItemDetailView/invoicingCatalogItemDetailViewEpics.js +2 -7
- package/lib/view/invoicing/invoicingCatalogItemDetailView/invoicingCatalogItemDetailViewPayload.d.ts +1 -2
- package/lib/view/invoicing/invoicingCatalogItemDetailView/invoicingCatalogItemDetailViewSelector.d.ts +1 -3
- package/lib/view/invoicing/invoicingCatalogItemDetailView/invoicingCatalogItemDetailViewSelector.js +2 -8
- package/lib/view/invoicing/invoicingCatalogItemDetailView/invoicingCatalogItemDetailViewState.d.ts +1 -1
- package/lib/view/invoicing/invoicingCatalogListView/epics/fetchInvoicingCatalogListPageEpic.d.ts +1 -2
- package/lib/view/invoicing/invoicingCatalogListView/epics/fetchInvoicingCatalogProductListEpic.d.ts +2 -2
- package/lib/view/invoicing/invoicingCatalogListView/epics/fetchInvoicingCatalogProductListEpic.js +5 -8
- package/lib/view/invoicing/invoicingCatalogListView/invoicingCatalogListViewPayload.d.ts +1 -2
- package/lib/view/invoicing/invoicingCatalogListView/invoicingCatalogListViewSelector.d.ts +2 -1
- package/lib/view/invoicing/invoicingCatalogListView/invoicingCatalogListViewSelector.js +11 -4
- package/lib/view/invoicing/invoicingCatalogListView/invoicingCatalogListViewState.d.ts +3 -4
- package/lib/view/invoicing/invoicingCatalogListView/invoicingCatalogListViewState.js +3 -1
- package/lib/view/invoicing/invoicingConfigView/invoicingConfigViewPayload.d.ts +2 -0
- package/lib/view/invoicing/invoicingConfigView/invoicingConfigViewReducer.d.ts +1 -1
- package/lib/view/invoicing/invoicingConfigView/invoicingConfigViewReducer.js +6 -0
- package/lib/view/invoicing/invoicingConfigView/invoicingConfigViewSelector.d.ts +2 -0
- package/lib/view/invoicing/invoicingConfigView/invoicingConfigViewSelector.js +1 -0
- package/lib/view/invoicing/invoicingConfigView/invoicingConfigViewState.d.ts +2 -0
- package/lib/view/invoicing/invoicingOverview/invoicingOverviewPayload.d.ts +1 -0
- package/lib/view/invoicing/invoicingOverview/invoicingOverviewPayload.js +1 -0
- package/lib/view/invoicing/invoicingOverview/invoicingOverviewState.d.ts +1 -0
- package/lib/view/invoicing/invoicingSubscriptionListView/invoicingSubscriptionListViewState.d.ts +2 -2
- package/lib/view/invoicing/invoicingSubscriptionListView/invoicingSubscriptionListViewState.js +2 -0
- package/package.json +1 -1
|
@@ -9,10 +9,12 @@ export interface InvoicingCreditNoteLineItemPayload {
|
|
|
9
9
|
unit_amount: number;
|
|
10
10
|
entity_type?: string;
|
|
11
11
|
id?: string;
|
|
12
|
+
product_code?: string;
|
|
12
13
|
}
|
|
13
14
|
export interface InvoicingCreditNoteAllocationPayload {
|
|
14
15
|
allocated_amount: number;
|
|
15
16
|
invoice_id: string;
|
|
17
|
+
invoice_number: string;
|
|
16
18
|
allocated_at?: string;
|
|
17
19
|
}
|
|
18
20
|
export interface InvoicingCreditNotePayload {
|
|
@@ -35,6 +37,7 @@ export interface InvoicingCreditNotePayload {
|
|
|
35
37
|
price_type?: InvoicingPriceType;
|
|
36
38
|
reason_code?: string;
|
|
37
39
|
reference_invoice_id?: string;
|
|
40
|
+
reference_invoice_number?: string | null;
|
|
38
41
|
status?: InvoicingCreditNoteStatus;
|
|
39
42
|
sub_total?: number;
|
|
40
43
|
subscription_id?: string;
|
|
@@ -12,11 +12,13 @@ const mapInvoicingCreditNoteLineItemPayloadToState = (payload, currencyCode, cur
|
|
|
12
12
|
unitAmount: (0, amount_1.toAmount)(payload.unit_amount, currencyCode, currencySymbol),
|
|
13
13
|
entityType: payload.entity_type,
|
|
14
14
|
id: payload.id,
|
|
15
|
+
productCode: payload.product_code,
|
|
15
16
|
});
|
|
16
17
|
exports.mapInvoicingCreditNoteLineItemPayloadToState = mapInvoicingCreditNoteLineItemPayloadToState;
|
|
17
18
|
const mapInvoicingCreditNoteAllocationPayloadToState = (payload, currencyCode, currencySymbol) => ({
|
|
18
19
|
allocatedAmount: (0, amount_1.toAmount)(payload.allocated_amount, currencyCode, currencySymbol),
|
|
19
20
|
invoiceID: payload.invoice_id,
|
|
21
|
+
invoiceNumber: payload.invoice_number,
|
|
20
22
|
allocatedAt: payload.allocated_at != null ? (0, zeniDayJS_1.date)(payload.allocated_at) : undefined,
|
|
21
23
|
});
|
|
22
24
|
exports.mapInvoicingCreditNoteAllocationPayloadToState = mapInvoicingCreditNoteAllocationPayloadToState;
|
|
@@ -49,6 +51,7 @@ const mapInvoicingCreditNotePayloadToState = (payload) => {
|
|
|
49
51
|
priceType: payload.price_type,
|
|
50
52
|
reasonCode: payload.reason_code,
|
|
51
53
|
referenceInvoiceID: payload.reference_invoice_id,
|
|
54
|
+
referenceInvoiceNumber: payload.reference_invoice_number ?? undefined,
|
|
52
55
|
status: payload.status,
|
|
53
56
|
subTotal: payload.sub_total != null ? toAmt(payload.sub_total) : undefined,
|
|
54
57
|
subscriptionID: payload.subscription_id,
|
|
@@ -10,10 +10,12 @@ export interface InvoicingCreditNoteLineItem {
|
|
|
10
10
|
unitAmount: Amount;
|
|
11
11
|
entityType?: string;
|
|
12
12
|
id?: ID;
|
|
13
|
+
productCode?: string;
|
|
13
14
|
}
|
|
14
15
|
export interface InvoicingCreditNoteAllocation {
|
|
15
16
|
allocatedAmount: Amount;
|
|
16
17
|
invoiceID: ID;
|
|
18
|
+
invoiceNumber: string;
|
|
17
19
|
allocatedAt?: ZeniDate;
|
|
18
20
|
}
|
|
19
21
|
export interface InvoicingCreditNote {
|
|
@@ -35,6 +37,7 @@ export interface InvoicingCreditNote {
|
|
|
35
37
|
priceType?: InvoicingPriceType;
|
|
36
38
|
reasonCode?: string;
|
|
37
39
|
referenceInvoiceID?: ID;
|
|
40
|
+
referenceInvoiceNumber?: string;
|
|
38
41
|
status?: InvoicingCreditNoteStatus;
|
|
39
42
|
subscriptionID?: ID;
|
|
40
43
|
subTotal?: Amount;
|
|
@@ -24,6 +24,7 @@ const mapInvoicingDunningCasePayloadToState = (payload) => {
|
|
|
24
24
|
failureReason: payload.failure_reason,
|
|
25
25
|
initials: payload.initials,
|
|
26
26
|
invoiceID: payload.invoice_id,
|
|
27
|
+
invoiceNumber: payload.invoice_number ?? undefined,
|
|
27
28
|
lastAttempt: payload.last_attempt != null ? (0, zeniDayJS_1.date)(payload.last_attempt) : undefined,
|
|
28
29
|
maxAttempts: payload.max_attempts,
|
|
29
30
|
nextRetry: payload.next_retry != null ? (0, zeniDayJS_1.date)(payload.next_retry) : undefined,
|
|
@@ -22,6 +22,7 @@ const mapLineItem = (payload, currencyCode, currencySymbol) => ({
|
|
|
22
22
|
itemLevelDiscountAmount: payload.item_level_discount_amount != null
|
|
23
23
|
? (0, amount_1.toAmount)(payload.item_level_discount_amount, currencyCode, currencySymbol)
|
|
24
24
|
: undefined,
|
|
25
|
+
productCode: payload.product_code,
|
|
25
26
|
subscriptionID: payload.subscription_id,
|
|
26
27
|
taxAmount: payload.tax_amount != null
|
|
27
28
|
? (0, amount_1.toAmount)(payload.tax_amount, currencyCode, currencySymbol)
|
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
import { AddressPayload } from '../address/addressPayload';
|
|
2
2
|
export type InvoicingPriceType = 'tax_exclusive' | 'tax_inclusive';
|
|
3
|
+
export declare const INVOICING_DUNNING_ACTIONS: readonly ["email_only", "email_and_retry", "do_nothing", "retry_only"];
|
|
4
|
+
export type InvoicingDunningAction = (typeof INVOICING_DUNNING_ACTIONS)[number];
|
|
5
|
+
export declare function toInvoicingDunningAction(value: string): InvoicingDunningAction;
|
|
6
|
+
export interface InvoicingDunningActionOption {
|
|
7
|
+
code: InvoicingDunningAction;
|
|
8
|
+
name: string;
|
|
9
|
+
}
|
|
10
|
+
export interface InvoicingDunningScheduleStepPayload {
|
|
11
|
+
action: InvoicingDunningAction;
|
|
12
|
+
days_after_due: number;
|
|
13
|
+
step: number;
|
|
14
|
+
}
|
|
3
15
|
/**
|
|
4
16
|
* A single select-field option (label + typed value) owned by CES so the value
|
|
5
17
|
* sets that back string-union domain fields live next to those unions and are
|
|
@@ -33,6 +45,7 @@ export interface InvoicingSettingsPayload {
|
|
|
33
45
|
default_memo?: string;
|
|
34
46
|
dunning_max_attempts?: number;
|
|
35
47
|
dunning_retry_interval?: number;
|
|
48
|
+
dunning_schedule?: InvoicingDunningScheduleStepPayload[];
|
|
36
49
|
email?: string;
|
|
37
50
|
id?: string;
|
|
38
51
|
invoice_prefix?: string;
|
|
@@ -1,2 +1,21 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.INVOICING_DUNNING_ACTIONS = void 0;
|
|
4
|
+
exports.toInvoicingDunningAction = toInvoicingDunningAction;
|
|
5
|
+
exports.INVOICING_DUNNING_ACTIONS = [
|
|
6
|
+
'email_only',
|
|
7
|
+
'email_and_retry',
|
|
8
|
+
'do_nothing',
|
|
9
|
+
'retry_only',
|
|
10
|
+
];
|
|
11
|
+
function toInvoicingDunningAction(value) {
|
|
12
|
+
switch (value) {
|
|
13
|
+
case 'email_only':
|
|
14
|
+
case 'email_and_retry':
|
|
15
|
+
case 'do_nothing':
|
|
16
|
+
case 'retry_only':
|
|
17
|
+
return value;
|
|
18
|
+
default:
|
|
19
|
+
throw new Error(`Unknown InvoicingDunningAction: ${value}`);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -55,6 +55,7 @@ const mapInvoicingCustomerPayloadToState = (payload) => {
|
|
|
55
55
|
phone: payload.phone,
|
|
56
56
|
plan: payload.plan,
|
|
57
57
|
planName: payload.plan_name,
|
|
58
|
+
productCode: payload.product_code,
|
|
58
59
|
preferredCurrencyCode: payload.preferred_currency_code,
|
|
59
60
|
promotionalCredits: payload.promotional_credits != null
|
|
60
61
|
? (0, amount_1.toAmount)(payload.promotional_credits, currencyCode, currencySymbol)
|
|
@@ -9,6 +9,7 @@ export interface InvoicingSubscriptionItemPayload {
|
|
|
9
9
|
item_name?: string;
|
|
10
10
|
item_price_id?: string;
|
|
11
11
|
item_type?: string;
|
|
12
|
+
product_code?: string;
|
|
12
13
|
quantity?: number;
|
|
13
14
|
unit_price?: number;
|
|
14
15
|
}
|
|
@@ -59,6 +60,7 @@ export interface InvoicingSubscriptionPayload {
|
|
|
59
60
|
plan_id?: string;
|
|
60
61
|
plan_name?: string;
|
|
61
62
|
po_number?: string;
|
|
63
|
+
product_code?: string;
|
|
62
64
|
remaining_billing_cycles?: number;
|
|
63
65
|
resume_date?: string;
|
|
64
66
|
setup_fee?: number;
|
|
@@ -14,6 +14,7 @@ const mapInvoicingSubscriptionItemPayloadToState = (payload, currencyCode, curre
|
|
|
14
14
|
itemName: payload.item_name,
|
|
15
15
|
itemPriceID: payload.item_price_id,
|
|
16
16
|
itemType: payload.item_type,
|
|
17
|
+
productCode: payload.product_code,
|
|
17
18
|
quantity: payload.quantity,
|
|
18
19
|
unitPrice: payload.unit_price != null
|
|
19
20
|
? (0, amount_1.toAmount)(payload.unit_price, currencyCode, currencySymbol)
|
|
@@ -93,6 +94,7 @@ const mapInvoicingSubscriptionPayloadToState = (payload) => {
|
|
|
93
94
|
: undefined,
|
|
94
95
|
planID: payload.plan_id,
|
|
95
96
|
planName: payload.plan_name,
|
|
97
|
+
productCode: payload.product_code,
|
|
96
98
|
poNumber: payload.po_number,
|
|
97
99
|
remainingBillingCycles: payload.remaining_billing_cycles,
|
|
98
100
|
resumeDate: payload.resume_date != null ? (0, zeniDayJS_1.date)(payload.resume_date) : undefined,
|
|
@@ -9,6 +9,7 @@ export interface InvoicingSubscriptionItem {
|
|
|
9
9
|
itemName?: string;
|
|
10
10
|
itemPriceID?: ID;
|
|
11
11
|
itemType?: string;
|
|
12
|
+
productCode?: string;
|
|
12
13
|
quantity?: number;
|
|
13
14
|
unitPrice?: Amount;
|
|
14
15
|
}
|
|
@@ -58,6 +59,7 @@ export interface InvoicingSubscription {
|
|
|
58
59
|
planID?: ID;
|
|
59
60
|
planName?: string;
|
|
60
61
|
poNumber?: string;
|
|
62
|
+
productCode?: string;
|
|
61
63
|
remainingBillingCycles?: number;
|
|
62
64
|
resumeDate?: ZeniDate;
|
|
63
65
|
setupFee?: Amount;
|
|
@@ -4,6 +4,7 @@ export type InvoicingTransactionStatus = 'in_progress' | 'success' | 'voided' |
|
|
|
4
4
|
export interface InvoicingLinkedInvoiceRefPayload {
|
|
5
5
|
applied_amount: number;
|
|
6
6
|
invoice_id: string;
|
|
7
|
+
invoice_number: string;
|
|
7
8
|
invoice_status?: string;
|
|
8
9
|
}
|
|
9
10
|
export interface InvoicingLinkedRefundPayload {
|
|
@@ -8,6 +8,7 @@ const zeniDayJS_1 = require("../../../zeniDayJS");
|
|
|
8
8
|
const mapLinkedInvoiceRef = (payload, currencyCode, currencySymbol) => ({
|
|
9
9
|
appliedAmount: (0, amount_1.toAmount)(payload.applied_amount, currencyCode, currencySymbol),
|
|
10
10
|
invoiceID: payload.invoice_id,
|
|
11
|
+
invoiceNumber: payload.invoice_number,
|
|
11
12
|
invoiceStatus: payload.invoice_status,
|
|
12
13
|
});
|
|
13
14
|
const mapLinkedRefund = (payload, currencyCode, currencySymbol) => ({
|
|
@@ -5,6 +5,7 @@ import { InvoicingTransactionStatus, InvoicingTransactionType } from './invoicin
|
|
|
5
5
|
export interface InvoicingLinkedInvoiceRef {
|
|
6
6
|
appliedAmount: Amount;
|
|
7
7
|
invoiceID: ID;
|
|
8
|
+
invoiceNumber: string;
|
|
8
9
|
invoiceStatus?: string;
|
|
9
10
|
}
|
|
10
11
|
export interface InvoicingLinkedRefund {
|
|
@@ -25,8 +25,8 @@ export interface InvoicingPlanPayload {
|
|
|
25
25
|
name?: string;
|
|
26
26
|
period?: number;
|
|
27
27
|
period_unit?: string;
|
|
28
|
-
plan_code?: string;
|
|
29
28
|
price?: number;
|
|
29
|
+
product_code?: string;
|
|
30
30
|
status?: string;
|
|
31
31
|
sub_families?: InvoicingProductPayload[];
|
|
32
32
|
tiers?: InvoicingPlanTierPayload[];
|
|
@@ -33,7 +33,7 @@ const mapInvoicingPlanPayloadToState = (payload) => {
|
|
|
33
33
|
name: payload.name,
|
|
34
34
|
period: payload.period,
|
|
35
35
|
periodUnit: payload.period_unit,
|
|
36
|
-
|
|
36
|
+
productCode: payload.product_code,
|
|
37
37
|
price: payload.price != null
|
|
38
38
|
? (0, amount_1.toAmount)(payload.price, currencyCode, currencySymbol)
|
|
39
39
|
: undefined,
|
|
@@ -57,6 +57,7 @@ const mapInvoicingProductPayloadToState = (payload) => {
|
|
|
57
57
|
? (0, amount_1.toAmount)(payload.price, currencyCode, currencySymbol)
|
|
58
58
|
: undefined,
|
|
59
59
|
pricingModel: payload.pricing_model,
|
|
60
|
+
productCode: payload.product_code,
|
|
60
61
|
prorationType: payload.proration_type,
|
|
61
62
|
shippingPeriod: payload.shipping_period,
|
|
62
63
|
shippingPeriodUnit: payload.shipping_period_unit,
|
|
@@ -9,10 +9,12 @@ export const mapInvoicingCreditNoteLineItemPayloadToState = (payload, currencyCo
|
|
|
9
9
|
unitAmount: toAmount(payload.unit_amount, currencyCode, currencySymbol),
|
|
10
10
|
entityType: payload.entity_type,
|
|
11
11
|
id: payload.id,
|
|
12
|
+
productCode: payload.product_code,
|
|
12
13
|
});
|
|
13
14
|
export const mapInvoicingCreditNoteAllocationPayloadToState = (payload, currencyCode, currencySymbol) => ({
|
|
14
15
|
allocatedAmount: toAmount(payload.allocated_amount, currencyCode, currencySymbol),
|
|
15
16
|
invoiceID: payload.invoice_id,
|
|
17
|
+
invoiceNumber: payload.invoice_number,
|
|
16
18
|
allocatedAt: payload.allocated_at != null ? date(payload.allocated_at) : undefined,
|
|
17
19
|
});
|
|
18
20
|
export const mapInvoicingCreditNotePayloadToState = (payload) => {
|
|
@@ -44,6 +46,7 @@ export const mapInvoicingCreditNotePayloadToState = (payload) => {
|
|
|
44
46
|
priceType: payload.price_type,
|
|
45
47
|
reasonCode: payload.reason_code,
|
|
46
48
|
referenceInvoiceID: payload.reference_invoice_id,
|
|
49
|
+
referenceInvoiceNumber: payload.reference_invoice_number ?? undefined,
|
|
47
50
|
status: payload.status,
|
|
48
51
|
subTotal: payload.sub_total != null ? toAmt(payload.sub_total) : undefined,
|
|
49
52
|
subscriptionID: payload.subscription_id,
|
|
@@ -21,6 +21,7 @@ export const mapInvoicingDunningCasePayloadToState = (payload) => {
|
|
|
21
21
|
failureReason: payload.failure_reason,
|
|
22
22
|
initials: payload.initials,
|
|
23
23
|
invoiceID: payload.invoice_id,
|
|
24
|
+
invoiceNumber: payload.invoice_number ?? undefined,
|
|
24
25
|
lastAttempt: payload.last_attempt != null ? date(payload.last_attempt) : undefined,
|
|
25
26
|
maxAttempts: payload.max_attempts,
|
|
26
27
|
nextRetry: payload.next_retry != null ? date(payload.next_retry) : undefined,
|
|
@@ -19,6 +19,7 @@ const mapLineItem = (payload, currencyCode, currencySymbol) => ({
|
|
|
19
19
|
itemLevelDiscountAmount: payload.item_level_discount_amount != null
|
|
20
20
|
? toAmount(payload.item_level_discount_amount, currencyCode, currencySymbol)
|
|
21
21
|
: undefined,
|
|
22
|
+
productCode: payload.product_code,
|
|
22
23
|
subscriptionID: payload.subscription_id,
|
|
23
24
|
taxAmount: payload.tax_amount != null
|
|
24
25
|
? toAmount(payload.tax_amount, currencyCode, currencySymbol)
|
|
@@ -1 +1,17 @@
|
|
|
1
|
-
export
|
|
1
|
+
export const INVOICING_DUNNING_ACTIONS = [
|
|
2
|
+
'email_only',
|
|
3
|
+
'email_and_retry',
|
|
4
|
+
'do_nothing',
|
|
5
|
+
'retry_only',
|
|
6
|
+
];
|
|
7
|
+
export function toInvoicingDunningAction(value) {
|
|
8
|
+
switch (value) {
|
|
9
|
+
case 'email_only':
|
|
10
|
+
case 'email_and_retry':
|
|
11
|
+
case 'do_nothing':
|
|
12
|
+
case 'retry_only':
|
|
13
|
+
return value;
|
|
14
|
+
default:
|
|
15
|
+
throw new Error(`Unknown InvoicingDunningAction: ${value}`);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -51,6 +51,7 @@ export const mapInvoicingCustomerPayloadToState = (payload) => {
|
|
|
51
51
|
phone: payload.phone,
|
|
52
52
|
plan: payload.plan,
|
|
53
53
|
planName: payload.plan_name,
|
|
54
|
+
productCode: payload.product_code,
|
|
54
55
|
preferredCurrencyCode: payload.preferred_currency_code,
|
|
55
56
|
promotionalCredits: payload.promotional_credits != null
|
|
56
57
|
? toAmount(payload.promotional_credits, currencyCode, currencySymbol)
|
|
@@ -11,6 +11,7 @@ export const mapInvoicingSubscriptionItemPayloadToState = (payload, currencyCode
|
|
|
11
11
|
itemName: payload.item_name,
|
|
12
12
|
itemPriceID: payload.item_price_id,
|
|
13
13
|
itemType: payload.item_type,
|
|
14
|
+
productCode: payload.product_code,
|
|
14
15
|
quantity: payload.quantity,
|
|
15
16
|
unitPrice: payload.unit_price != null
|
|
16
17
|
? toAmount(payload.unit_price, currencyCode, currencySymbol)
|
|
@@ -86,6 +87,7 @@ export const mapInvoicingSubscriptionPayloadToState = (payload) => {
|
|
|
86
87
|
: undefined,
|
|
87
88
|
planID: payload.plan_id,
|
|
88
89
|
planName: payload.plan_name,
|
|
90
|
+
productCode: payload.product_code,
|
|
89
91
|
poNumber: payload.po_number,
|
|
90
92
|
remainingBillingCycles: payload.remaining_billing_cycles,
|
|
91
93
|
resumeDate: payload.resume_date != null ? date(payload.resume_date) : undefined,
|
|
@@ -5,6 +5,7 @@ import { date } from '../../../zeniDayJS';
|
|
|
5
5
|
const mapLinkedInvoiceRef = (payload, currencyCode, currencySymbol) => ({
|
|
6
6
|
appliedAmount: toAmount(payload.applied_amount, currencyCode, currencySymbol),
|
|
7
7
|
invoiceID: payload.invoice_id,
|
|
8
|
+
invoiceNumber: payload.invoice_number,
|
|
8
9
|
invoiceStatus: payload.invoice_status,
|
|
9
10
|
});
|
|
10
11
|
const mapLinkedRefund = (payload, currencyCode, currencySymbol) => ({
|
|
@@ -30,7 +30,7 @@ export const mapInvoicingPlanPayloadToState = (payload) => {
|
|
|
30
30
|
name: payload.name,
|
|
31
31
|
period: payload.period,
|
|
32
32
|
periodUnit: payload.period_unit,
|
|
33
|
-
|
|
33
|
+
productCode: payload.product_code,
|
|
34
34
|
price: payload.price != null
|
|
35
35
|
? toAmount(payload.price, currencyCode, currencySymbol)
|
|
36
36
|
: undefined,
|
|
@@ -53,6 +53,7 @@ export const mapInvoicingProductPayloadToState = (payload) => {
|
|
|
53
53
|
? toAmount(payload.price, currencyCode, currencySymbol)
|
|
54
54
|
: undefined,
|
|
55
55
|
pricingModel: payload.pricing_model,
|
|
56
|
+
productCode: payload.product_code,
|
|
56
57
|
prorationType: payload.proration_type,
|
|
57
58
|
shippingPeriod: payload.shipping_period,
|
|
58
59
|
shippingPeriodUnit: payload.shipping_period_unit,
|
package/lib/esm/index.js
CHANGED
|
@@ -704,6 +704,7 @@ export { getTransactionActivityLogView, } from './view/transactionActivityLogVie
|
|
|
704
704
|
export { SessionManager } from './entity/tenant/SessionManager';
|
|
705
705
|
export { DEFAULT_SESSION_CONFIG } from './entity/tenant/sessionTypes';
|
|
706
706
|
export { toKycProvidedDocumentType, toKycProvidedDocumentTypeFromAllowed, } from './view/spendManagement/commonSetup/types/kycKybAutofill';
|
|
707
|
+
export { INVOICING_DUNNING_ACTIONS, toInvoicingDunningAction, } from './entity/invoicing/invoicingCommonPayload';
|
|
707
708
|
export { clearAllInvoices, removeInvoice, updateInvoices, } from './entity/invoicing/invoice/invoiceReducer';
|
|
708
709
|
export { getInvoiceById, getInvoicesByIds, } from './entity/invoicing/invoice/invoiceSelector';
|
|
709
710
|
export { clearInvoiceList, fetchInvoiceCounts, fetchInvoiceKPIs, fetchInvoiceList, fetchInvoiceListPage, updateInvoiceListFilters, } from './view/invoicing/invoiceList/invoiceListReducer';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getInvoicingCatalogListView } from '../invoicingCatalogListView/invoicingCatalogListViewSelector';
|
|
1
|
+
import { getInvoicingCatalogListView, getInvoicingCatalogPrices, } from '../invoicingCatalogListView/invoicingCatalogListViewSelector';
|
|
2
2
|
import { getInvoicingCustomerListView } from '../invoicingCustomerListView/invoicingCustomerListViewSelector';
|
|
3
3
|
import { getInvoicingSettings } from '../settingsView/settingsViewSelector';
|
|
4
4
|
/**
|
|
@@ -15,8 +15,8 @@ export const getCreateInvoiceFormView = (state) => {
|
|
|
15
15
|
return {
|
|
16
16
|
customers: getInvoicingCustomerListView(state).customers,
|
|
17
17
|
localData: createInvoiceState.formDraft,
|
|
18
|
-
plans: catalogListView.plans,
|
|
19
|
-
products: catalogListView.products,
|
|
18
|
+
plans: getInvoicingCatalogPrices(catalogListView.plans),
|
|
19
|
+
products: getInvoicingCatalogPrices(catalogListView.products),
|
|
20
20
|
savedInvoiceId: createInvoiceState.createdInvoiceId,
|
|
21
21
|
settings: getInvoicingSettings(state),
|
|
22
22
|
fetchState: createInvoiceState.fetchState,
|