@zeniai/client-epic-state 5.2.22-betaAK1 → 5.2.22
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 +1 -0
- package/lib/entity/invoicing/creditNote/creditNotePayload.js +1 -0
- package/lib/entity/invoicing/creditNote/creditNoteState.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 +0 -2
- 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 -1
- package/lib/entity/invoicing/invoicingSubscription/invoicingSubscriptionPayload.js +2 -1
- package/lib/entity/invoicing/invoicingSubscription/invoicingSubscriptionState.d.ts +2 -1
- package/lib/esm/entity/invoicing/creditNote/creditNotePayload.js +1 -0
- package/lib/esm/entity/invoicing/invoice/invoicePayload.js +1 -0
- package/lib/esm/entity/invoicing/invoicingCustomer/invoicingCustomerPayload.js +1 -0
- package/lib/esm/entity/invoicing/invoicingSubscription/invoicingSubscriptionPayload.js +2 -1
- package/lib/esm/view/expenseAutomationView/epics/accountRecon/deleteAccountStatementEpic.js +1 -3
- package/lib/esm/view/invoicing/invoicingConfigView/invoicingConfigViewReducer.js +0 -2
- package/lib/esm/view/invoicing/invoicingOverview/invoicingOverviewPayload.js +1 -0
- package/lib/esm/view/invoicing/invoicingSubscriptionDetailView/invoicingSubscriptionDetailViewSelector.js +1 -2
- package/lib/esm/view/invoicing/invoicingSubscriptionListView/invoicingSubscriptionListViewSelector.js +0 -1
- package/lib/esm/view/invoicing/invoicingSubscriptionListView/invoicingSubscriptionListViewState.js +2 -0
- package/lib/esm/view/invoicing/settingsView/invoicingBrandingFormConfig.js +0 -5
- package/lib/esm/view/spendManagement/billPay/billPaySetupApproverView/epic/fetchBillPaySetupApproverViewEpic.js +18 -2
- package/lib/esm/view/spendManagement/billPay/billPaySetupApproverView/epic/initializeBillPaySetupApproverViewUpdateDataEpic.js +0 -1
- package/lib/esm/view/spendManagement/billPay/billPaySetupApproverView/types/commonPayload.js +0 -3
- package/lib/esm/view/spendManagement/reimbursement/remiSetupApproverView/epic/fetchRemiSetupApproverViewEpic.js +18 -2
- package/lib/esm/view/spendManagement/reimbursement/remiSetupApproverView/epic/initializeRemiSetupApproverViewUpdateDataEpic.js +0 -1
- package/lib/index.d.ts +0 -1
- package/lib/view/expenseAutomationView/epics/accountRecon/deleteAccountStatementEpic.d.ts +1 -2
- package/lib/view/expenseAutomationView/epics/accountRecon/deleteAccountStatementEpic.js +1 -3
- package/lib/view/invoicing/invoicingConfigView/invoicingConfigViewPayload.d.ts +0 -1
- package/lib/view/invoicing/invoicingConfigView/invoicingConfigViewReducer.d.ts +1 -1
- package/lib/view/invoicing/invoicingConfigView/invoicingConfigViewReducer.js +0 -2
- package/lib/view/invoicing/invoicingConfigView/invoicingConfigViewState.d.ts +0 -1
- 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/invoicingSubscriptionDetailView/invoicingSubscriptionDetailViewSelector.d.ts +1 -3
- package/lib/view/invoicing/invoicingSubscriptionDetailView/invoicingSubscriptionDetailViewSelector.js +0 -1
- package/lib/view/invoicing/invoicingSubscriptionListView/invoicingSubscriptionListViewSelector.d.ts +0 -2
- package/lib/view/invoicing/invoicingSubscriptionListView/invoicingSubscriptionListViewSelector.js +0 -1
- package/lib/view/invoicing/invoicingSubscriptionListView/invoicingSubscriptionListViewState.d.ts +2 -2
- package/lib/view/invoicing/invoicingSubscriptionListView/invoicingSubscriptionListViewState.js +2 -0
- package/lib/view/invoicing/issueCreditNote/issueCreditNotePayload.d.ts +1 -0
- package/lib/view/invoicing/settingsView/invoicingBrandingFormConfig.d.ts +0 -1
- package/lib/view/invoicing/settingsView/invoicingBrandingFormConfig.js +0 -5
- package/lib/view/invoicing/subscriptionAction/subscriptionActionRequestPayload.d.ts +0 -8
- package/lib/view/spendManagement/billPay/billPaySetupApproverView/epic/fetchBillPaySetupApproverViewEpic.d.ts +2 -1
- package/lib/view/spendManagement/billPay/billPaySetupApproverView/epic/fetchBillPaySetupApproverViewEpic.js +18 -2
- package/lib/view/spendManagement/billPay/billPaySetupApproverView/epic/initializeBillPaySetupApproverViewUpdateDataEpic.js +0 -1
- package/lib/view/spendManagement/billPay/billPaySetupApproverView/types/commonPayload.d.ts +0 -1
- package/lib/view/spendManagement/billPay/billPaySetupApproverView/types/commonPayload.js +0 -3
- package/lib/view/spendManagement/billPay/billPaySetupApproverView/types/commonState.d.ts +0 -1
- package/lib/view/spendManagement/reimbursement/remiSetupApproverView/epic/fetchRemiSetupApproverViewEpic.d.ts +2 -1
- package/lib/view/spendManagement/reimbursement/remiSetupApproverView/epic/fetchRemiSetupApproverViewEpic.js +18 -2
- package/lib/view/spendManagement/reimbursement/remiSetupApproverView/epic/initializeRemiSetupApproverViewUpdateDataEpic.js +0 -1
- package/package.json +38 -71
|
@@ -12,6 +12,7 @@ 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) => ({
|
|
@@ -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)
|
|
@@ -164,8 +164,6 @@ export interface InvoicingSettingsPayload {
|
|
|
164
164
|
dunning_schedule?: InvoicingDunningScheduleStepPayload[];
|
|
165
165
|
email?: string;
|
|
166
166
|
id?: string;
|
|
167
|
-
/** Empty string means hide the footer line; absent means use the default. */
|
|
168
|
-
invoice_footer_text?: string;
|
|
169
167
|
invoice_prefix?: string;
|
|
170
168
|
logo_file_id?: string;
|
|
171
169
|
logo_url?: string;
|
|
@@ -76,6 +76,7 @@ const mapInvoicingCustomerPayloadToState = (payload) => {
|
|
|
76
76
|
phone: payload.phone,
|
|
77
77
|
plan: payload.plan,
|
|
78
78
|
planName: payload.plan_name,
|
|
79
|
+
productCode: payload.product_code,
|
|
79
80
|
preferredCurrencyCode: payload.preferred_currency_code,
|
|
80
81
|
promotionalCredits: payload.promotional_credits != null
|
|
81
82
|
? (0, amount_1.toAmount)(payload.promotional_credits, currencyCode, currencySymbol)
|
|
@@ -9,6 +9,7 @@ export interface InvoicingSubscriptionItemPayload {
|
|
|
9
9
|
item_price_code?: 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
|
}
|
|
@@ -39,7 +40,6 @@ export interface InvoicingSubscriptionPayload {
|
|
|
39
40
|
billing_period?: number;
|
|
40
41
|
billing_period_unit?: InvoicingBillingPeriodUnit;
|
|
41
42
|
cancel_reason?: string;
|
|
42
|
-
cancel_reason_code?: string;
|
|
43
43
|
cancelled_at?: string;
|
|
44
44
|
catalog_item_id?: string;
|
|
45
45
|
contract_term?: InvoicingContractTermPayload;
|
|
@@ -60,6 +60,7 @@ export interface InvoicingSubscriptionPayload {
|
|
|
60
60
|
plan_id?: string;
|
|
61
61
|
plan_name?: string;
|
|
62
62
|
po_number?: string;
|
|
63
|
+
product_code?: string;
|
|
63
64
|
remaining_billing_cycles?: number;
|
|
64
65
|
resume_date?: string;
|
|
65
66
|
setup_fee?: number;
|
|
@@ -15,6 +15,7 @@ const mapInvoicingSubscriptionItemPayloadToState = (payload, currencyCode, curre
|
|
|
15
15
|
itemPriceCode: payload.item_price_code,
|
|
16
16
|
itemPriceID: payload.item_price_id,
|
|
17
17
|
itemType: payload.item_type,
|
|
18
|
+
productCode: payload.product_code,
|
|
18
19
|
quantity: payload.quantity,
|
|
19
20
|
unitPrice: payload.unit_price != null
|
|
20
21
|
? (0, amount_1.toAmount)(payload.unit_price, currencyCode, currencySymbol)
|
|
@@ -64,7 +65,6 @@ const mapInvoicingSubscriptionPayloadToState = (payload) => {
|
|
|
64
65
|
billingPeriod: payload.billing_period,
|
|
65
66
|
billingPeriodUnit: payload.billing_period_unit,
|
|
66
67
|
cancelReason: payload.cancel_reason,
|
|
67
|
-
cancelReasonCode: payload.cancel_reason_code,
|
|
68
68
|
cancelledAt: payload.cancelled_at != null ? (0, zeniDayJS_1.date)(payload.cancelled_at) : undefined,
|
|
69
69
|
catalogItemID: payload.catalog_item_id,
|
|
70
70
|
contractTerm: payload.contract_term != null
|
|
@@ -95,6 +95,7 @@ const mapInvoicingSubscriptionPayloadToState = (payload) => {
|
|
|
95
95
|
: undefined,
|
|
96
96
|
planID: payload.plan_id,
|
|
97
97
|
planName: payload.plan_name,
|
|
98
|
+
productCode: payload.product_code,
|
|
98
99
|
poNumber: payload.po_number,
|
|
99
100
|
remainingBillingCycles: payload.remaining_billing_cycles,
|
|
100
101
|
resumeDate: payload.resume_date != null ? (0, zeniDayJS_1.date)(payload.resume_date) : undefined,
|
|
@@ -10,6 +10,7 @@ export interface InvoicingSubscriptionItem {
|
|
|
10
10
|
itemPriceCode?: string;
|
|
11
11
|
itemPriceID?: ID;
|
|
12
12
|
itemType?: string;
|
|
13
|
+
productCode?: string;
|
|
13
14
|
quantity?: number;
|
|
14
15
|
unitPrice?: Amount;
|
|
15
16
|
}
|
|
@@ -41,7 +42,6 @@ export interface InvoicingSubscription {
|
|
|
41
42
|
billingPeriodUnit?: InvoicingBillingPeriodUnit;
|
|
42
43
|
cancelledAt?: ZeniDate;
|
|
43
44
|
cancelReason?: string;
|
|
44
|
-
cancelReasonCode?: string;
|
|
45
45
|
catalogItemID?: ID;
|
|
46
46
|
contractTerm?: InvoicingContractTerm;
|
|
47
47
|
coupons?: InvoicingSubscriptionCoupon[];
|
|
@@ -60,6 +60,7 @@ export interface InvoicingSubscription {
|
|
|
60
60
|
planID?: ID;
|
|
61
61
|
planName?: string;
|
|
62
62
|
poNumber?: string;
|
|
63
|
+
productCode?: string;
|
|
63
64
|
remainingBillingCycles?: number;
|
|
64
65
|
resumeDate?: ZeniDate;
|
|
65
66
|
setupFee?: Amount;
|
|
@@ -9,6 +9,7 @@ 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),
|
|
@@ -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)
|
|
@@ -72,6 +72,7 @@ export const mapInvoicingCustomerPayloadToState = (payload) => {
|
|
|
72
72
|
phone: payload.phone,
|
|
73
73
|
plan: payload.plan,
|
|
74
74
|
planName: payload.plan_name,
|
|
75
|
+
productCode: payload.product_code,
|
|
75
76
|
preferredCurrencyCode: payload.preferred_currency_code,
|
|
76
77
|
promotionalCredits: payload.promotional_credits != null
|
|
77
78
|
? toAmount(payload.promotional_credits, currencyCode, currencySymbol)
|
|
@@ -12,6 +12,7 @@ export const mapInvoicingSubscriptionItemPayloadToState = (payload, currencyCode
|
|
|
12
12
|
itemPriceCode: payload.item_price_code,
|
|
13
13
|
itemPriceID: payload.item_price_id,
|
|
14
14
|
itemType: payload.item_type,
|
|
15
|
+
productCode: payload.product_code,
|
|
15
16
|
quantity: payload.quantity,
|
|
16
17
|
unitPrice: payload.unit_price != null
|
|
17
18
|
? toAmount(payload.unit_price, currencyCode, currencySymbol)
|
|
@@ -57,7 +58,6 @@ export const mapInvoicingSubscriptionPayloadToState = (payload) => {
|
|
|
57
58
|
billingPeriod: payload.billing_period,
|
|
58
59
|
billingPeriodUnit: payload.billing_period_unit,
|
|
59
60
|
cancelReason: payload.cancel_reason,
|
|
60
|
-
cancelReasonCode: payload.cancel_reason_code,
|
|
61
61
|
cancelledAt: payload.cancelled_at != null ? date(payload.cancelled_at) : undefined,
|
|
62
62
|
catalogItemID: payload.catalog_item_id,
|
|
63
63
|
contractTerm: payload.contract_term != null
|
|
@@ -88,6 +88,7 @@ export const mapInvoicingSubscriptionPayloadToState = (payload) => {
|
|
|
88
88
|
: undefined,
|
|
89
89
|
planID: payload.plan_id,
|
|
90
90
|
planName: payload.plan_name,
|
|
91
|
+
productCode: payload.product_code,
|
|
91
92
|
poNumber: payload.po_number,
|
|
92
93
|
remainingBillingCycles: payload.remaining_billing_cycles,
|
|
93
94
|
resumeDate: payload.resume_date != null ? date(payload.resume_date) : undefined,
|
|
@@ -2,17 +2,15 @@ import { of } from 'rxjs';
|
|
|
2
2
|
import { catchError, filter, mergeMap, switchMap } from 'rxjs/operators';
|
|
3
3
|
import { updateAccountReconDeleteStatement } from '../../../../entity/accountRecon/accountReconReducer';
|
|
4
4
|
import { toAccountReconKey } from '../../../../entity/accountRecon/accountReconState';
|
|
5
|
-
import { removeFiles } from '../../../../entity/file/fileReducer';
|
|
6
5
|
import { createZeniAPIStatus, isSuccessResponse, } from '../../../../responsePayload';
|
|
7
6
|
import { deleteAccountStatement, deleteAccountStatementFailure, deleteAccountStatementSuccess, } from '../../reducers/reconciliationViewReducer';
|
|
8
7
|
export const deleteAccountStatementEpic = (actions$, _state$, zeniAPI) => actions$.pipe(filter(deleteAccountStatement.match), switchMap((action) => {
|
|
9
|
-
const { accountId, selectedPeriod, statementUploadId
|
|
8
|
+
const { accountId, selectedPeriod, statementUploadId } = action.payload;
|
|
10
9
|
const request = zeniAPI.deleteAndGetJSON(`${zeniAPI.apiEndPoints.reconciliationMicroServiceBaseUrl}/1.0/reconciliation/statements/${statementUploadId}`);
|
|
11
10
|
return request.pipe(mergeMap((response) => {
|
|
12
11
|
if (isSuccessResponse(response)) {
|
|
13
12
|
const actions = [];
|
|
14
13
|
const accountReconKey = toAccountReconKey(accountId, selectedPeriod);
|
|
15
|
-
actions.push(removeFiles([fileId]));
|
|
16
14
|
if (response.data != null) {
|
|
17
15
|
actions.push(updateAccountReconDeleteStatement(accountReconKey, response.data));
|
|
18
16
|
}
|
|
@@ -34,7 +34,6 @@ export const initialState = {
|
|
|
34
34
|
discountStatusOptions: [],
|
|
35
35
|
dunningCaseStatusOptions: [],
|
|
36
36
|
invoiceStatusOptions: [],
|
|
37
|
-
subscriptionCancelReasonCodeOptions: [],
|
|
38
37
|
subscriptionStatusOptions: [],
|
|
39
38
|
transactionStatusOptions: [],
|
|
40
39
|
transactionTypeOptions: [],
|
|
@@ -104,7 +103,6 @@ export function mapInvoicingConfigPayloadToState(payload) {
|
|
|
104
103
|
discountStatusOptions: (payload.discount_status_options ?? []).map(toInvoicingNamedOption),
|
|
105
104
|
dunningCaseStatusOptions: (payload.dunning_case_status_options ?? []).map(toInvoicingNamedOption),
|
|
106
105
|
invoiceStatusOptions: (payload.invoice_status_options ?? []).map(toInvoicingNamedOption),
|
|
107
|
-
subscriptionCancelReasonCodeOptions: (payload.subscription_cancel_reason_code_options ?? []).map(toInvoicingNamedOption),
|
|
108
106
|
subscriptionStatusOptions: (payload.subscription_status_options ?? []).map(toInvoicingNamedOption),
|
|
109
107
|
transactionStatusOptions: (payload.transaction_status_options ?? []).map(toInvoicingNamedOption),
|
|
110
108
|
transactionTypeOptions: (payload.transaction_type_options ?? []).map(toInvoicingNamedOption),
|
|
@@ -37,6 +37,7 @@ export const mapInvoicingPlanRevenuePointPayloadToState = (payload) => ({
|
|
|
37
37
|
mrr: toAmount(payload.mrr, 'USD', '$'),
|
|
38
38
|
pct: payload.pct,
|
|
39
39
|
planID: payload.plan,
|
|
40
|
+
productCode: payload.product_code,
|
|
40
41
|
});
|
|
41
42
|
export const mapInvoicingDashboardSummaryPayloadToState = (payload) => ({
|
|
42
43
|
customerMovement: {
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { getInvoicingSubscriptionById as getInvoicingSubscriptionByIdFromState } from '../../../entity/invoicing/invoicingSubscription/invoicingSubscriptionSelector';
|
|
2
|
-
import {
|
|
2
|
+
import { invoicingFieldHelpForGroup } from '../invoicingConfigView/invoicingConfigViewSelector';
|
|
3
3
|
import { getInvoicingSubscriptionActionState } from '../subscriptionAction/subscriptionActionSelector';
|
|
4
4
|
export const getInvoicingSubscriptionById = (state, id) => getInvoicingSubscriptionByIdFromState(state.invoicingSubscriptionState, id);
|
|
5
5
|
export const getInvoicingSubscriptionDetail = (state, invoicingSubscriptionID) => {
|
|
6
6
|
const { error, fetchState } = state.invoicingSubscriptionDetailViewState;
|
|
7
7
|
return {
|
|
8
8
|
fieldHelp: invoicingFieldHelpForGroup(state, 'subscription'),
|
|
9
|
-
cancelReasonCodeOptions: getInvoicingConfigView(state).subscriptionCancelReasonCodeOptions,
|
|
10
9
|
actionState: getInvoicingSubscriptionActionState(invoicingSubscriptionID)(state),
|
|
11
10
|
subscription: getInvoicingSubscriptionById(state, invoicingSubscriptionID),
|
|
12
11
|
fetchState,
|
|
@@ -28,7 +28,6 @@ export const getInvoicingSubscriptionListView = createSelector((state) => state.
|
|
|
28
28
|
count: listViewState.counts,
|
|
29
29
|
countsFetchState: listViewState.countsFetchState,
|
|
30
30
|
subscriptionCommercialEditAllowedFromStatuses: configState.subscriptionCommercialEditAllowedFromStatuses,
|
|
31
|
-
cancelReasonCodeOptions: configState.subscriptionCancelReasonCodeOptions,
|
|
32
31
|
subscriptionLifecycleActionOptions: configState.subscriptionLifecycleActionOptions,
|
|
33
32
|
subscriptionMetadataEditAllowedFromStatuses: configState.subscriptionMetadataEditAllowedFromStatuses,
|
|
34
33
|
statusOptions,
|
package/lib/esm/view/invoicing/invoicingSubscriptionListView/invoicingSubscriptionListViewState.js
CHANGED
|
@@ -3,6 +3,7 @@ export const ALL_INVOICING_SUBSCRIPTION_SORT_KEYS = [
|
|
|
3
3
|
'subscription',
|
|
4
4
|
'customer',
|
|
5
5
|
'plan',
|
|
6
|
+
'product_code',
|
|
6
7
|
'term_end',
|
|
7
8
|
'next_billing',
|
|
8
9
|
'auto_collect',
|
|
@@ -14,6 +15,7 @@ export const INVOICING_SUBSCRIPTION_COLUMNS = [
|
|
|
14
15
|
{ key: 'subscription', sortable: true },
|
|
15
16
|
{ key: 'customer', sortable: false },
|
|
16
17
|
{ key: 'plan', sortable: true },
|
|
18
|
+
{ key: 'product_code', sortable: true },
|
|
17
19
|
{ key: 'term_end', sortable: true },
|
|
18
20
|
{ key: 'next_billing', sortable: true },
|
|
19
21
|
{ key: 'auto_collect', sortable: true },
|
|
@@ -7,7 +7,6 @@ export const initialInvoicingBrandingFormLocalData = {
|
|
|
7
7
|
dateFormat: '',
|
|
8
8
|
defaultMemo: '',
|
|
9
9
|
email: '',
|
|
10
|
-
invoiceFooterText: '',
|
|
11
10
|
invoicePrefix: '',
|
|
12
11
|
logoFileId: '',
|
|
13
12
|
phone: '',
|
|
@@ -20,7 +19,6 @@ export const entityToInvoicingBrandingFormLocalData = (settings) => ({
|
|
|
20
19
|
dateFormat: settings?.date_format ?? '',
|
|
21
20
|
defaultMemo: settings?.default_memo ?? '',
|
|
22
21
|
email: settings?.email ?? '',
|
|
23
|
-
invoiceFooterText: settings?.invoice_footer_text ?? '',
|
|
24
22
|
invoicePrefix: settings?.invoice_prefix ?? '',
|
|
25
23
|
logoFileId: settings?.logo_file_id ?? '',
|
|
26
24
|
phone: settings?.phone ?? '',
|
|
@@ -41,9 +39,6 @@ export const brandingLocalDataToSettingsPayload = (localData, address) => ({
|
|
|
41
39
|
date_format: trimOrUndefined(localData.dateFormat),
|
|
42
40
|
default_memo: trimOrUndefined(localData.defaultMemo),
|
|
43
41
|
email: trimOrUndefined(localData.email),
|
|
44
|
-
// Sent even when blank: "" is how the API is told to hide the footer line,
|
|
45
|
-
// so this one must not collapse to `undefined` like the fields above.
|
|
46
|
-
invoice_footer_text: localData.invoiceFooterText.trim(),
|
|
47
42
|
invoice_prefix: trimOrUndefined(localData.invoicePrefix),
|
|
48
43
|
logo_file_id: localData.logoFileId,
|
|
49
44
|
phone: trimOrUndefined(localData.phone),
|
|
@@ -2,13 +2,20 @@ import { from, of } from 'rxjs';
|
|
|
2
2
|
import { catchError, filter, mergeMap, switchMap } from 'rxjs/operators';
|
|
3
3
|
import { updateApprovalRules } from '../../../../../entity/approvalRule/approvalRuleReducer';
|
|
4
4
|
import { getApprovalRulesByIds } from '../../../../../entity/approvalRule/approvalRuleSelector';
|
|
5
|
+
import { getIsAccountingClassesEnabled } from '../../../../../entity/tenant/tenantSelector';
|
|
5
6
|
import { updateAllUsers } from '../../../../../entity/user/userReducer';
|
|
6
7
|
import { createZeniAPIStatus, isSuccessResponse, } from '../../../../../responsePayload';
|
|
8
|
+
import { fetchClassList } from '../../../../classList/classListReducer';
|
|
7
9
|
import { fetchBillPaySetupApproverView, fetchBillPaySetupApproverViewFailure, fetchBillPaySetupApproverViewSuccess, } from '../billPaySetupApproverViewReducer';
|
|
8
10
|
export const fetchBillPaySetupApproverViewEpic = (actions$, state$, zeniAPI) => actions$.pipe(filter(fetchBillPaySetupApproverView.match), switchMap((action) => {
|
|
9
11
|
const { cacheOverride, useV3 } = action.payload;
|
|
10
|
-
const { billPaySetupApproverViewState, approvalRuleState } = state$.value;
|
|
12
|
+
const { billPaySetupApproverViewState, approvalRuleState, classListState } = state$.value;
|
|
13
|
+
const isAccountingClassesEnabled = getIsAccountingClassesEnabled(state$.value);
|
|
11
14
|
const approvalRules = getApprovalRulesByIds(approvalRuleState, billPaySetupApproverViewState.approvalRuleIds);
|
|
15
|
+
const shouldFetchClassList = isAccountingClassesEnabled &&
|
|
16
|
+
(cacheOverride === true ||
|
|
17
|
+
(classListState.hasValidState() === false &&
|
|
18
|
+
classListState.fetchState !== 'In-Progress'));
|
|
12
19
|
if (cacheOverride === true ||
|
|
13
20
|
approvalRules.length !==
|
|
14
21
|
billPaySetupApproverViewState.approvalRuleIds.length ||
|
|
@@ -28,6 +35,9 @@ export const fetchBillPaySetupApproverViewEpic = (actions$, state$, zeniAPI) =>
|
|
|
28
35
|
updateApprovalRules(response.data.approval_rules),
|
|
29
36
|
fetchBillPaySetupApproverViewSuccess(approvalRuleIds),
|
|
30
37
|
];
|
|
38
|
+
if (shouldFetchClassList) {
|
|
39
|
+
actions.push(fetchClassList());
|
|
40
|
+
}
|
|
31
41
|
return from(actions);
|
|
32
42
|
}
|
|
33
43
|
else {
|
|
@@ -37,6 +47,12 @@ export const fetchBillPaySetupApproverViewEpic = (actions$, state$, zeniAPI) =>
|
|
|
37
47
|
}
|
|
38
48
|
else {
|
|
39
49
|
const { approvalRuleIds } = billPaySetupApproverViewState;
|
|
40
|
-
|
|
50
|
+
const actions = [
|
|
51
|
+
fetchBillPaySetupApproverViewSuccess(approvalRuleIds),
|
|
52
|
+
];
|
|
53
|
+
if (shouldFetchClassList) {
|
|
54
|
+
actions.push(fetchClassList());
|
|
55
|
+
}
|
|
56
|
+
return from(actions);
|
|
41
57
|
}
|
|
42
58
|
}));
|
|
@@ -21,7 +21,6 @@ export const initializeBillPaySetupApproverViewUpdateDataEpic = (actions$, state
|
|
|
21
21
|
name: approvalRule.name,
|
|
22
22
|
description: approvalRule.description,
|
|
23
23
|
separationOfDuties: approvalRule.separationOfDuties,
|
|
24
|
-
isFallback: approvalRule.isFallback,
|
|
25
24
|
};
|
|
26
25
|
fetchActions.push(clearBillPaySetupApproverViewUpdateData(), saveBillPaySetupApproverViewUpdateData(billPaySetupApproverViewUpdateData));
|
|
27
26
|
}
|
package/lib/esm/view/spendManagement/billPay/billPaySetupApproverView/types/commonPayload.js
CHANGED
|
@@ -86,9 +86,6 @@ export const toApprovalChangableInfoPayload = (approverViewUpdateData) => {
|
|
|
86
86
|
payload.is_separation_of_duty_enabled =
|
|
87
87
|
approverViewUpdateData.separationOfDuties;
|
|
88
88
|
}
|
|
89
|
-
if (approverViewUpdateData.isFallback != null) {
|
|
90
|
-
payload.is_fallback = approverViewUpdateData.isFallback;
|
|
91
|
-
}
|
|
92
89
|
if (isUpdate) {
|
|
93
90
|
payload.approval_rule_id = approverViewUpdateData.approvalRuleId;
|
|
94
91
|
}
|
|
@@ -2,13 +2,20 @@ import { from, of } from 'rxjs';
|
|
|
2
2
|
import { catchError, filter, mergeMap, switchMap } from 'rxjs/operators';
|
|
3
3
|
import { updateApprovalRules } from '../../../../../entity/approvalRule/approvalRuleReducer';
|
|
4
4
|
import { getApprovalRulesByIds } from '../../../../../entity/approvalRule/approvalRuleSelector';
|
|
5
|
+
import { getIsAccountingClassesEnabled } from '../../../../../entity/tenant/tenantSelector';
|
|
5
6
|
import { updateAllUsers } from '../../../../../entity/user/userReducer';
|
|
6
7
|
import { createZeniAPIStatus, isSuccessResponse, } from '../../../../../responsePayload';
|
|
8
|
+
import { fetchClassList } from '../../../../classList/classListReducer';
|
|
7
9
|
import { fetchRemiSetupApproverView, fetchRemiSetupApproverViewFailure, fetchRemiSetupApproverViewSuccess, } from '../remiSetupApproverViewReducer';
|
|
8
10
|
export const fetchRemiSetupApproverViewEpic = (actions$, state$, zeniAPI) => actions$.pipe(filter(fetchRemiSetupApproverView.match), switchMap((action) => {
|
|
9
11
|
const { cacheOverride, resolveAttributeToUser, includeImplicitActors, useV3, } = action.payload;
|
|
10
|
-
const { remiSetupApproverViewState, approvalRuleState } = state$.value;
|
|
12
|
+
const { remiSetupApproverViewState, approvalRuleState, classListState } = state$.value;
|
|
13
|
+
const isAccountingClassesEnabled = getIsAccountingClassesEnabled(state$.value);
|
|
11
14
|
const approvalRules = getApprovalRulesByIds(approvalRuleState, remiSetupApproverViewState.approvalRuleIds);
|
|
15
|
+
const shouldFetchClassList = isAccountingClassesEnabled &&
|
|
16
|
+
(cacheOverride === true ||
|
|
17
|
+
(classListState.hasValidState() === false &&
|
|
18
|
+
classListState.fetchState !== 'In-Progress'));
|
|
12
19
|
if (cacheOverride === true ||
|
|
13
20
|
approvalRules.length !==
|
|
14
21
|
remiSetupApproverViewState.approvalRuleIds.length ||
|
|
@@ -30,6 +37,9 @@ export const fetchRemiSetupApproverViewEpic = (actions$, state$, zeniAPI) => act
|
|
|
30
37
|
updateApprovalRules(response.data.approval_rules),
|
|
31
38
|
fetchRemiSetupApproverViewSuccess(approvalRuleIds),
|
|
32
39
|
];
|
|
40
|
+
if (shouldFetchClassList) {
|
|
41
|
+
actions.push(fetchClassList());
|
|
42
|
+
}
|
|
33
43
|
return from(actions);
|
|
34
44
|
}
|
|
35
45
|
else {
|
|
@@ -39,6 +49,12 @@ export const fetchRemiSetupApproverViewEpic = (actions$, state$, zeniAPI) => act
|
|
|
39
49
|
}
|
|
40
50
|
else {
|
|
41
51
|
const { approvalRuleIds } = remiSetupApproverViewState;
|
|
42
|
-
|
|
52
|
+
const actions = [
|
|
53
|
+
fetchRemiSetupApproverViewSuccess(approvalRuleIds),
|
|
54
|
+
];
|
|
55
|
+
if (shouldFetchClassList) {
|
|
56
|
+
actions.push(fetchClassList());
|
|
57
|
+
}
|
|
58
|
+
return from(actions);
|
|
43
59
|
}
|
|
44
60
|
}));
|
|
@@ -21,7 +21,6 @@ export const initializeRemiSetupApproverViewUpdateDataEpic = (actions$, state$)
|
|
|
21
21
|
name: approvalRule.name,
|
|
22
22
|
description: approvalRule.description,
|
|
23
23
|
separationOfDuties: approvalRule.separationOfDuties,
|
|
24
|
-
isFallback: approvalRule.isFallback,
|
|
25
24
|
};
|
|
26
25
|
fetchActions.push(clearRemiSetupApproverViewUpdateData(), saveRemiSetupApproverViewUpdateData(remiSetupApproverViewUpdateData));
|
|
27
26
|
}
|
package/lib/index.d.ts
CHANGED
|
@@ -1150,7 +1150,6 @@ export { getInvoicingDiscountActionState } from './view/invoicing/discountAction
|
|
|
1150
1150
|
export { runInvoicingSubscriptionAction } from './view/invoicing/subscriptionAction/subscriptionActionReducer';
|
|
1151
1151
|
export type { InvoicingSubscriptionActionState } from './view/invoicing/subscriptionAction/subscriptionActionState';
|
|
1152
1152
|
export type { RunInvoicingSubscriptionActionPayload } from './view/invoicing/subscriptionAction/subscriptionActionReducer';
|
|
1153
|
-
export type { InvoicingCancelSubscriptionValues } from './view/invoicing/subscriptionAction/subscriptionActionRequestPayload';
|
|
1154
1153
|
export { getInvoicingSubscriptionActionState } from './view/invoicing/subscriptionAction/subscriptionActionSelector';
|
|
1155
1154
|
export { runInvoicingDunningAction } from './view/invoicing/dunningAction/dunningActionReducer';
|
|
1156
1155
|
export type { InvoicingDunningActionState } from './view/invoicing/dunningAction/dunningActionState';
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { ActionsObservable, StateObservable } from 'redux-observable';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
3
|
import { updateAccountReconDeleteStatement } from '../../../../entity/accountRecon/accountReconReducer';
|
|
4
|
-
import { removeFiles } from '../../../../entity/file/fileReducer';
|
|
5
4
|
import { RootState } from '../../../../rootStateTypes';
|
|
6
5
|
import { ZeniAPI } from '../../../../zeniAPI';
|
|
7
6
|
import { deleteAccountStatement, deleteAccountStatementFailure, deleteAccountStatementSuccess } from '../../reducers/reconciliationViewReducer';
|
|
8
|
-
export type ActionType = ReturnType<typeof deleteAccountStatement> | ReturnType<typeof
|
|
7
|
+
export type ActionType = ReturnType<typeof deleteAccountStatement> | ReturnType<typeof updateAccountReconDeleteStatement> | ReturnType<typeof deleteAccountStatementFailure> | ReturnType<typeof deleteAccountStatementSuccess>;
|
|
9
8
|
export declare const deleteAccountStatementEpic: (actions$: ActionsObservable<ActionType>, _state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
|
|
@@ -5,17 +5,15 @@ const rxjs_1 = require("rxjs");
|
|
|
5
5
|
const operators_1 = require("rxjs/operators");
|
|
6
6
|
const accountReconReducer_1 = require("../../../../entity/accountRecon/accountReconReducer");
|
|
7
7
|
const accountReconState_1 = require("../../../../entity/accountRecon/accountReconState");
|
|
8
|
-
const fileReducer_1 = require("../../../../entity/file/fileReducer");
|
|
9
8
|
const responsePayload_1 = require("../../../../responsePayload");
|
|
10
9
|
const reconciliationViewReducer_1 = require("../../reducers/reconciliationViewReducer");
|
|
11
10
|
const deleteAccountStatementEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(reconciliationViewReducer_1.deleteAccountStatement.match), (0, operators_1.switchMap)((action) => {
|
|
12
|
-
const { accountId, selectedPeriod, statementUploadId
|
|
11
|
+
const { accountId, selectedPeriod, statementUploadId } = action.payload;
|
|
13
12
|
const request = zeniAPI.deleteAndGetJSON(`${zeniAPI.apiEndPoints.reconciliationMicroServiceBaseUrl}/1.0/reconciliation/statements/${statementUploadId}`);
|
|
14
13
|
return request.pipe((0, operators_1.mergeMap)((response) => {
|
|
15
14
|
if ((0, responsePayload_1.isSuccessResponse)(response)) {
|
|
16
15
|
const actions = [];
|
|
17
16
|
const accountReconKey = (0, accountReconState_1.toAccountReconKey)(accountId, selectedPeriod);
|
|
18
|
-
actions.push((0, fileReducer_1.removeFiles)([fileId]));
|
|
19
17
|
if (response.data != null) {
|
|
20
18
|
actions.push((0, accountReconReducer_1.updateAccountReconDeleteStatement)(accountReconKey, response.data));
|
|
21
19
|
}
|
|
@@ -54,7 +54,6 @@ export interface InvoicingConfigPayload {
|
|
|
54
54
|
qbo_account_mapping_kind_options?: InvoicingQboAccountMappingKindOptionWire[];
|
|
55
55
|
qbo_customer_matching_options?: InvoicingNamedOptionWire[];
|
|
56
56
|
qbo_sync_status_options?: InvoicingNamedOptionWire[];
|
|
57
|
-
subscription_cancel_reason_code_options?: InvoicingNamedOptionWire[];
|
|
58
57
|
subscription_status_options?: InvoicingNamedOptionWire[];
|
|
59
58
|
taxability_options?: InvoicingNamedOptionWire[];
|
|
60
59
|
transaction_status_options?: InvoicingNamedOptionWire[];
|
|
@@ -2,7 +2,7 @@ import { ZeniAPIStatus } from '../../../responsePayload';
|
|
|
2
2
|
import { InvoicingConfigPayload } from './invoicingConfigViewPayload';
|
|
3
3
|
import { InvoicingConfigViewState } from './invoicingConfigViewState';
|
|
4
4
|
export declare const initialState: InvoicingConfigViewState;
|
|
5
|
-
export declare function mapInvoicingConfigPayloadToState(payload: InvoicingConfigPayload): Pick<InvoicingConfigViewState, 'auditLogEntityRouteOptions' | 'auditLogListSortFieldOptions' | 'auditLogSourceLabels' | 'autoCollectionOptions' | 'billingPeriodUnitOptions' | 'catalogTierTypeOptionsByPricingModel' | 'catalogTrialEndActionOptions' | 'catalogTrialUnitOptions' | 'customerTypeOptions' | 'dateFormatOptions' | 'fieldHelp' | 'discountApplyOnOptions' | 'discountDurationTypeOptions' | 'discountTypeOptions' | 'manualPaymentMethodOptions' | 'netTermDayOptions' | 'paymentGatewayOptions' | 'taxabilityOptions' | 'cardStatusOptions' | 'catalogItemStatusOptions' | 'catalogItemTypeOptions' | 'creditNoteReasonCodeOptions' | 'creditNoteStatusOptions' | 'creditNoteTypeOptions' | 'customerStatusOptions' | 'discountStatusOptions' | 'dunningCaseStatusOptions' | 'invoiceStatusOptions' | '
|
|
5
|
+
export declare function mapInvoicingConfigPayloadToState(payload: InvoicingConfigPayload): Pick<InvoicingConfigViewState, 'auditLogEntityRouteOptions' | 'auditLogListSortFieldOptions' | 'auditLogSourceLabels' | 'autoCollectionOptions' | 'billingPeriodUnitOptions' | 'catalogTierTypeOptionsByPricingModel' | 'catalogTrialEndActionOptions' | 'catalogTrialUnitOptions' | 'customerTypeOptions' | 'dateFormatOptions' | 'fieldHelp' | 'discountApplyOnOptions' | 'discountDurationTypeOptions' | 'discountTypeOptions' | 'manualPaymentMethodOptions' | 'netTermDayOptions' | 'paymentGatewayOptions' | 'taxabilityOptions' | 'cardStatusOptions' | 'catalogItemStatusOptions' | 'catalogItemTypeOptions' | 'creditNoteReasonCodeOptions' | 'creditNoteStatusOptions' | 'creditNoteTypeOptions' | 'customerStatusOptions' | 'discountStatusOptions' | 'dunningCaseStatusOptions' | 'invoiceStatusOptions' | 'subscriptionStatusOptions' | 'transactionStatusOptions' | 'transactionTypeOptions' | 'createdAt' | 'updatedAt' | 'dunningScheduleActionOptions' | 'subscriptionLifecycleActionOptions' | 'subscriptionCommercialEditAllowedFromStatuses' | 'subscriptionMetadataEditAllowedFromStatuses' | 'subscriptionEditFieldOptions' | 'subscriptionCancelTimingOptions' | 'subscriptionChangeOptionOptions' | 'catalogItemLifecycleActionOptions' | 'catalogProductLifecycleActionOptions' | 'discountLifecycleActionOptions' | 'qboAccountMappingKindOptions' | 'qboCustomerMatchingOptions' | 'qboSyncStatusOptions' | 'isInvoicingEnabled' | 'isInvoicingTosAccepted' | 'invoicingTosAcceptanceIp' | 'invoicingTosAcceptanceTime' | 'invoicingTosAcceptanceUserAgent' | 'invoicingTosAcceptanceUserId' | 'isInvoicingSettingsSeeded'>;
|
|
6
6
|
export declare const fetchInvoicingConfig: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[payload?: {
|
|
7
7
|
cacheOverride?: boolean;
|
|
8
8
|
} | undefined], {
|
|
@@ -39,7 +39,6 @@ exports.initialState = {
|
|
|
39
39
|
discountStatusOptions: [],
|
|
40
40
|
dunningCaseStatusOptions: [],
|
|
41
41
|
invoiceStatusOptions: [],
|
|
42
|
-
subscriptionCancelReasonCodeOptions: [],
|
|
43
42
|
subscriptionStatusOptions: [],
|
|
44
43
|
transactionStatusOptions: [],
|
|
45
44
|
transactionTypeOptions: [],
|
|
@@ -109,7 +108,6 @@ function mapInvoicingConfigPayloadToState(payload) {
|
|
|
109
108
|
discountStatusOptions: (payload.discount_status_options ?? []).map(invoicingCommonPayload_1.toInvoicingNamedOption),
|
|
110
109
|
dunningCaseStatusOptions: (payload.dunning_case_status_options ?? []).map(invoicingCommonPayload_1.toInvoicingNamedOption),
|
|
111
110
|
invoiceStatusOptions: (payload.invoice_status_options ?? []).map(invoicingCommonPayload_1.toInvoicingNamedOption),
|
|
112
|
-
subscriptionCancelReasonCodeOptions: (payload.subscription_cancel_reason_code_options ?? []).map(invoicingCommonPayload_1.toInvoicingNamedOption),
|
|
113
111
|
subscriptionStatusOptions: (payload.subscription_status_options ?? []).map(invoicingCommonPayload_1.toInvoicingNamedOption),
|
|
114
112
|
transactionStatusOptions: (payload.transaction_status_options ?? []).map(invoicingCommonPayload_1.toInvoicingNamedOption),
|
|
115
113
|
transactionTypeOptions: (payload.transaction_type_options ?? []).map(invoicingCommonPayload_1.toInvoicingNamedOption),
|
|
@@ -38,7 +38,6 @@ export interface InvoicingConfigViewState extends FetchedState {
|
|
|
38
38
|
qboAccountMappingKindOptions: InvoicingQboAccountMappingKindOption[];
|
|
39
39
|
qboCustomerMatchingOptions: InvoicingNamedOption[];
|
|
40
40
|
qboSyncStatusOptions: InvoicingNamedOption[];
|
|
41
|
-
subscriptionCancelReasonCodeOptions: InvoicingNamedOption[];
|
|
42
41
|
subscriptionCancelTimingOptions: InvoicingNamedOption[];
|
|
43
42
|
subscriptionChangeOptionOptions: InvoicingNamedOption[];
|
|
44
43
|
subscriptionCommercialEditAllowedFromStatuses: string[];
|
|
@@ -44,6 +44,7 @@ const mapInvoicingPlanRevenuePointPayloadToState = (payload) => ({
|
|
|
44
44
|
mrr: (0, amount_1.toAmount)(payload.mrr, 'USD', '$'),
|
|
45
45
|
pct: payload.pct,
|
|
46
46
|
planID: payload.plan,
|
|
47
|
+
productCode: payload.product_code,
|
|
47
48
|
});
|
|
48
49
|
exports.mapInvoicingPlanRevenuePointPayloadToState = mapInvoicingPlanRevenuePointPayloadToState;
|
|
49
50
|
const mapInvoicingDashboardSummaryPayloadToState = (payload) => ({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FetchStateAndError, ID } from '../../../commonStateTypes/common';
|
|
2
2
|
import { SelectorView } from '../../../commonStateTypes/viewAndReport/viewAndReport';
|
|
3
|
-
import type { InvoicingFieldHelpByCode
|
|
3
|
+
import type { InvoicingFieldHelpByCode } from '../../../entity/invoicing/invoicingCommonPayload';
|
|
4
4
|
import { InvoicingSubscription } from '../../../entity/invoicing/invoicingSubscription/invoicingSubscriptionState';
|
|
5
5
|
import { RootState } from '../../../rootStateTypes';
|
|
6
6
|
/**
|
|
@@ -10,8 +10,6 @@ import { RootState } from '../../../rootStateTypes';
|
|
|
10
10
|
*/
|
|
11
11
|
export interface InvoicingSubscriptionDetailView extends SelectorView {
|
|
12
12
|
actionState: FetchStateAndError;
|
|
13
|
-
/** Cancel reasons from `/1.0/config`, so the dialog hardcodes nothing. */
|
|
14
|
-
cancelReasonCodeOptions: InvoicingNamedOption[];
|
|
15
13
|
/**
|
|
16
14
|
* Backend help copy for this screen's field group, keyed by field code.
|
|
17
15
|
* Folded in here so the screen never reaches for the config view itself.
|
|
@@ -10,7 +10,6 @@ const getInvoicingSubscriptionDetail = (state, invoicingSubscriptionID) => {
|
|
|
10
10
|
const { error, fetchState } = state.invoicingSubscriptionDetailViewState;
|
|
11
11
|
return {
|
|
12
12
|
fieldHelp: (0, invoicingConfigViewSelector_1.invoicingFieldHelpForGroup)(state, 'subscription'),
|
|
13
|
-
cancelReasonCodeOptions: (0, invoicingConfigViewSelector_1.getInvoicingConfigView)(state).subscriptionCancelReasonCodeOptions,
|
|
14
13
|
actionState: (0, subscriptionActionSelector_1.getInvoicingSubscriptionActionState)(invoicingSubscriptionID)(state),
|
|
15
14
|
subscription: (0, exports.getInvoicingSubscriptionById)(state, invoicingSubscriptionID),
|
|
16
15
|
fetchState,
|
package/lib/view/invoicing/invoicingSubscriptionListView/invoicingSubscriptionListViewSelector.d.ts
CHANGED
|
@@ -7,8 +7,6 @@ import { InvoicingListSort } from '../invoicingApiHelper';
|
|
|
7
7
|
import { InvoicingSubscriptionColumnConfig, InvoicingSubscriptionFilters, InvoicingSubscriptionTabId } from './invoicingSubscriptionListViewState';
|
|
8
8
|
export interface InvoicingSubscriptionListView extends SelectorView {
|
|
9
9
|
activeTab: InvoicingSubscriptionTabId;
|
|
10
|
-
/** Cancel reasons from `/1.0/config`, so the dialog hardcodes nothing. */
|
|
11
|
-
cancelReasonCodeOptions: InvoicingNamedOption[];
|
|
12
10
|
columns: InvoicingSubscriptionColumnConfig[];
|
|
13
11
|
count: InvoicingListCounts;
|
|
14
12
|
countsFetchState: FetchStateAndError;
|
package/lib/view/invoicing/invoicingSubscriptionListView/invoicingSubscriptionListViewSelector.js
CHANGED
|
@@ -31,7 +31,6 @@ exports.getInvoicingSubscriptionListView = (0, toolkit_1.createSelector)((state)
|
|
|
31
31
|
count: listViewState.counts,
|
|
32
32
|
countsFetchState: listViewState.countsFetchState,
|
|
33
33
|
subscriptionCommercialEditAllowedFromStatuses: configState.subscriptionCommercialEditAllowedFromStatuses,
|
|
34
|
-
cancelReasonCodeOptions: configState.subscriptionCancelReasonCodeOptions,
|
|
35
34
|
subscriptionLifecycleActionOptions: configState.subscriptionLifecycleActionOptions,
|
|
36
35
|
subscriptionMetadataEditAllowedFromStatuses: configState.subscriptionMetadataEditAllowedFromStatuses,
|
|
37
36
|
statusOptions,
|
package/lib/view/invoicing/invoicingSubscriptionListView/invoicingSubscriptionListViewState.d.ts
CHANGED
|
@@ -7,8 +7,8 @@ export interface InvoicingSubscriptionFilters {
|
|
|
7
7
|
startedFrom?: string;
|
|
8
8
|
startedTo?: string;
|
|
9
9
|
}
|
|
10
|
-
export declare const ALL_INVOICING_SUBSCRIPTION_SORT_KEYS: readonly ["subscription", "customer", "plan", "term_end", "next_billing", "auto_collect", "status", "mrr"];
|
|
11
|
-
export declare const toInvoicingSubscriptionSortKey: (v: string) => "status" | "customer" | "subscription" | "plan" | "term_end" | "next_billing" | "auto_collect" | "mrr";
|
|
10
|
+
export declare const ALL_INVOICING_SUBSCRIPTION_SORT_KEYS: readonly ["subscription", "customer", "plan", "product_code", "term_end", "next_billing", "auto_collect", "status", "mrr"];
|
|
11
|
+
export declare const toInvoicingSubscriptionSortKey: (v: string) => "status" | "customer" | "subscription" | "plan" | "product_code" | "term_end" | "next_billing" | "auto_collect" | "mrr";
|
|
12
12
|
export type InvoicingSubscriptionSortKey = ReturnType<typeof toInvoicingSubscriptionSortKey>;
|
|
13
13
|
/**
|
|
14
14
|
* Structural column descriptor owned by CES so the subscription-list column set,
|
package/lib/view/invoicing/invoicingSubscriptionListView/invoicingSubscriptionListViewState.js
CHANGED
|
@@ -6,6 +6,7 @@ exports.ALL_INVOICING_SUBSCRIPTION_SORT_KEYS = [
|
|
|
6
6
|
'subscription',
|
|
7
7
|
'customer',
|
|
8
8
|
'plan',
|
|
9
|
+
'product_code',
|
|
9
10
|
'term_end',
|
|
10
11
|
'next_billing',
|
|
11
12
|
'auto_collect',
|
|
@@ -18,6 +19,7 @@ exports.INVOICING_SUBSCRIPTION_COLUMNS = [
|
|
|
18
19
|
{ key: 'subscription', sortable: true },
|
|
19
20
|
{ key: 'customer', sortable: false },
|
|
20
21
|
{ key: 'plan', sortable: true },
|
|
22
|
+
{ key: 'product_code', sortable: true },
|
|
21
23
|
{ key: 'term_end', sortable: true },
|
|
22
24
|
{ key: 'next_billing', sortable: true },
|
|
23
25
|
{ key: 'auto_collect', sortable: true },
|
|
@@ -10,7 +10,6 @@ exports.initialInvoicingBrandingFormLocalData = {
|
|
|
10
10
|
dateFormat: '',
|
|
11
11
|
defaultMemo: '',
|
|
12
12
|
email: '',
|
|
13
|
-
invoiceFooterText: '',
|
|
14
13
|
invoicePrefix: '',
|
|
15
14
|
logoFileId: '',
|
|
16
15
|
phone: '',
|
|
@@ -23,7 +22,6 @@ const entityToInvoicingBrandingFormLocalData = (settings) => ({
|
|
|
23
22
|
dateFormat: settings?.date_format ?? '',
|
|
24
23
|
defaultMemo: settings?.default_memo ?? '',
|
|
25
24
|
email: settings?.email ?? '',
|
|
26
|
-
invoiceFooterText: settings?.invoice_footer_text ?? '',
|
|
27
25
|
invoicePrefix: settings?.invoice_prefix ?? '',
|
|
28
26
|
logoFileId: settings?.logo_file_id ?? '',
|
|
29
27
|
phone: settings?.phone ?? '',
|
|
@@ -45,9 +43,6 @@ const brandingLocalDataToSettingsPayload = (localData, address) => ({
|
|
|
45
43
|
date_format: trimOrUndefined(localData.dateFormat),
|
|
46
44
|
default_memo: trimOrUndefined(localData.defaultMemo),
|
|
47
45
|
email: trimOrUndefined(localData.email),
|
|
48
|
-
// Sent even when blank: "" is how the API is told to hide the footer line,
|
|
49
|
-
// so this one must not collapse to `undefined` like the fields above.
|
|
50
|
-
invoice_footer_text: localData.invoiceFooterText.trim(),
|
|
51
46
|
invoice_prefix: trimOrUndefined(localData.invoicePrefix),
|
|
52
47
|
logo_file_id: localData.logoFileId,
|
|
53
48
|
phone: trimOrUndefined(localData.phone),
|
|
@@ -18,14 +18,6 @@ export type PauseSubscriptionBody = {
|
|
|
18
18
|
pause_reason?: string;
|
|
19
19
|
resume_date?: string;
|
|
20
20
|
};
|
|
21
|
-
/**
|
|
22
|
-
* What the cancel dialog collects. Form values, not the request body: the screen
|
|
23
|
-
* turns these into {@link CancelSubscriptionBody}.
|
|
24
|
-
*/
|
|
25
|
-
export type InvoicingCancelSubscriptionValues = {
|
|
26
|
-
cancelReasonCode: string;
|
|
27
|
-
cancelReason?: string;
|
|
28
|
-
};
|
|
29
21
|
export type CancelSubscriptionBody = {
|
|
30
22
|
cancel_reason?: string;
|
|
31
23
|
cancel_reason_code?: string;
|
|
@@ -4,6 +4,7 @@ import { updateApprovalRules } from '../../../../../entity/approvalRule/approval
|
|
|
4
4
|
import { updateAllUsers } from '../../../../../entity/user/userReducer';
|
|
5
5
|
import { RootState } from '../../../../../rootStateTypes';
|
|
6
6
|
import { ZeniAPI } from '../../../../../zeniAPI';
|
|
7
|
+
import { fetchClassList } from '../../../../classList/classListReducer';
|
|
7
8
|
import { fetchBillPaySetupApproverView, fetchBillPaySetupApproverViewFailure, fetchBillPaySetupApproverViewSuccess } from '../billPaySetupApproverViewReducer';
|
|
8
|
-
export type ActionType = ReturnType<typeof fetchBillPaySetupApproverView> | ReturnType<typeof updateAllUsers> | ReturnType<typeof updateApprovalRules> | ReturnType<typeof fetchBillPaySetupApproverViewSuccess> | ReturnType<typeof fetchBillPaySetupApproverViewFailure>;
|
|
9
|
+
export type ActionType = ReturnType<typeof fetchBillPaySetupApproverView> | ReturnType<typeof fetchClassList> | ReturnType<typeof updateAllUsers> | ReturnType<typeof updateApprovalRules> | ReturnType<typeof fetchBillPaySetupApproverViewSuccess> | ReturnType<typeof fetchBillPaySetupApproverViewFailure>;
|
|
9
10
|
export declare const fetchBillPaySetupApproverViewEpic: (actions$: ActionsObservable<ActionType>, state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
|
|
@@ -5,13 +5,20 @@ const rxjs_1 = require("rxjs");
|
|
|
5
5
|
const operators_1 = require("rxjs/operators");
|
|
6
6
|
const approvalRuleReducer_1 = require("../../../../../entity/approvalRule/approvalRuleReducer");
|
|
7
7
|
const approvalRuleSelector_1 = require("../../../../../entity/approvalRule/approvalRuleSelector");
|
|
8
|
+
const tenantSelector_1 = require("../../../../../entity/tenant/tenantSelector");
|
|
8
9
|
const userReducer_1 = require("../../../../../entity/user/userReducer");
|
|
9
10
|
const responsePayload_1 = require("../../../../../responsePayload");
|
|
11
|
+
const classListReducer_1 = require("../../../../classList/classListReducer");
|
|
10
12
|
const billPaySetupApproverViewReducer_1 = require("../billPaySetupApproverViewReducer");
|
|
11
13
|
const fetchBillPaySetupApproverViewEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(billPaySetupApproverViewReducer_1.fetchBillPaySetupApproverView.match), (0, operators_1.switchMap)((action) => {
|
|
12
14
|
const { cacheOverride, useV3 } = action.payload;
|
|
13
|
-
const { billPaySetupApproverViewState, approvalRuleState } = state$.value;
|
|
15
|
+
const { billPaySetupApproverViewState, approvalRuleState, classListState } = state$.value;
|
|
16
|
+
const isAccountingClassesEnabled = (0, tenantSelector_1.getIsAccountingClassesEnabled)(state$.value);
|
|
14
17
|
const approvalRules = (0, approvalRuleSelector_1.getApprovalRulesByIds)(approvalRuleState, billPaySetupApproverViewState.approvalRuleIds);
|
|
18
|
+
const shouldFetchClassList = isAccountingClassesEnabled &&
|
|
19
|
+
(cacheOverride === true ||
|
|
20
|
+
(classListState.hasValidState() === false &&
|
|
21
|
+
classListState.fetchState !== 'In-Progress'));
|
|
15
22
|
if (cacheOverride === true ||
|
|
16
23
|
approvalRules.length !==
|
|
17
24
|
billPaySetupApproverViewState.approvalRuleIds.length ||
|
|
@@ -31,6 +38,9 @@ const fetchBillPaySetupApproverViewEpic = (actions$, state$, zeniAPI) => actions
|
|
|
31
38
|
(0, approvalRuleReducer_1.updateApprovalRules)(response.data.approval_rules),
|
|
32
39
|
(0, billPaySetupApproverViewReducer_1.fetchBillPaySetupApproverViewSuccess)(approvalRuleIds),
|
|
33
40
|
];
|
|
41
|
+
if (shouldFetchClassList) {
|
|
42
|
+
actions.push((0, classListReducer_1.fetchClassList)());
|
|
43
|
+
}
|
|
34
44
|
return (0, rxjs_1.from)(actions);
|
|
35
45
|
}
|
|
36
46
|
else {
|
|
@@ -40,7 +50,13 @@ const fetchBillPaySetupApproverViewEpic = (actions$, state$, zeniAPI) => actions
|
|
|
40
50
|
}
|
|
41
51
|
else {
|
|
42
52
|
const { approvalRuleIds } = billPaySetupApproverViewState;
|
|
43
|
-
|
|
53
|
+
const actions = [
|
|
54
|
+
(0, billPaySetupApproverViewReducer_1.fetchBillPaySetupApproverViewSuccess)(approvalRuleIds),
|
|
55
|
+
];
|
|
56
|
+
if (shouldFetchClassList) {
|
|
57
|
+
actions.push((0, classListReducer_1.fetchClassList)());
|
|
58
|
+
}
|
|
59
|
+
return (0, rxjs_1.from)(actions);
|
|
44
60
|
}
|
|
45
61
|
}));
|
|
46
62
|
exports.fetchBillPaySetupApproverViewEpic = fetchBillPaySetupApproverViewEpic;
|
|
@@ -24,7 +24,6 @@ const initializeBillPaySetupApproverViewUpdateDataEpic = (actions$, state$) => a
|
|
|
24
24
|
name: approvalRule.name,
|
|
25
25
|
description: approvalRule.description,
|
|
26
26
|
separationOfDuties: approvalRule.separationOfDuties,
|
|
27
|
-
isFallback: approvalRule.isFallback,
|
|
28
27
|
};
|
|
29
28
|
fetchActions.push((0, billPaySetupApproverViewReducer_1.clearBillPaySetupApproverViewUpdateData)(), (0, billPaySetupApproverViewReducer_1.saveBillPaySetupApproverViewUpdateData)(billPaySetupApproverViewUpdateData));
|
|
30
29
|
}
|
|
@@ -18,7 +18,6 @@ interface ApprovalUpdatableInfoPayload {
|
|
|
18
18
|
is_applicable_on_pending_approval_entity: boolean;
|
|
19
19
|
steps: ApproverViewStepPayload[];
|
|
20
20
|
description?: string;
|
|
21
|
-
is_fallback?: boolean;
|
|
22
21
|
is_separation_of_duty_enabled?: boolean;
|
|
23
22
|
/**
|
|
24
23
|
* Approval Rules 3.0 — rule-level wire fields. The backend accepts these
|
|
@@ -89,9 +89,6 @@ const toApprovalChangableInfoPayload = (approverViewUpdateData) => {
|
|
|
89
89
|
payload.is_separation_of_duty_enabled =
|
|
90
90
|
approverViewUpdateData.separationOfDuties;
|
|
91
91
|
}
|
|
92
|
-
if (approverViewUpdateData.isFallback != null) {
|
|
93
|
-
payload.is_fallback = approverViewUpdateData.isFallback;
|
|
94
|
-
}
|
|
95
92
|
if (isUpdate) {
|
|
96
93
|
payload.approval_rule_id = approverViewUpdateData.approvalRuleId;
|
|
97
94
|
}
|
|
@@ -4,6 +4,7 @@ import { updateApprovalRules } from '../../../../../entity/approvalRule/approval
|
|
|
4
4
|
import { updateAllUsers } from '../../../../../entity/user/userReducer';
|
|
5
5
|
import { RootState } from '../../../../../rootStateTypes';
|
|
6
6
|
import { ZeniAPI } from '../../../../../zeniAPI';
|
|
7
|
+
import { fetchClassList } from '../../../../classList/classListReducer';
|
|
7
8
|
import { fetchRemiSetupApproverView, fetchRemiSetupApproverViewFailure, fetchRemiSetupApproverViewSuccess } from '../remiSetupApproverViewReducer';
|
|
8
|
-
export type ActionType = ReturnType<typeof fetchRemiSetupApproverView> | ReturnType<typeof updateAllUsers> | ReturnType<typeof updateApprovalRules> | ReturnType<typeof fetchRemiSetupApproverViewSuccess> | ReturnType<typeof fetchRemiSetupApproverViewFailure>;
|
|
9
|
+
export type ActionType = ReturnType<typeof fetchRemiSetupApproverView> | ReturnType<typeof fetchClassList> | ReturnType<typeof updateAllUsers> | ReturnType<typeof updateApprovalRules> | ReturnType<typeof fetchRemiSetupApproverViewSuccess> | ReturnType<typeof fetchRemiSetupApproverViewFailure>;
|
|
9
10
|
export declare const fetchRemiSetupApproverViewEpic: (actions$: ActionsObservable<ActionType>, state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
|
|
@@ -5,13 +5,20 @@ const rxjs_1 = require("rxjs");
|
|
|
5
5
|
const operators_1 = require("rxjs/operators");
|
|
6
6
|
const approvalRuleReducer_1 = require("../../../../../entity/approvalRule/approvalRuleReducer");
|
|
7
7
|
const approvalRuleSelector_1 = require("../../../../../entity/approvalRule/approvalRuleSelector");
|
|
8
|
+
const tenantSelector_1 = require("../../../../../entity/tenant/tenantSelector");
|
|
8
9
|
const userReducer_1 = require("../../../../../entity/user/userReducer");
|
|
9
10
|
const responsePayload_1 = require("../../../../../responsePayload");
|
|
11
|
+
const classListReducer_1 = require("../../../../classList/classListReducer");
|
|
10
12
|
const remiSetupApproverViewReducer_1 = require("../remiSetupApproverViewReducer");
|
|
11
13
|
const fetchRemiSetupApproverViewEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(remiSetupApproverViewReducer_1.fetchRemiSetupApproverView.match), (0, operators_1.switchMap)((action) => {
|
|
12
14
|
const { cacheOverride, resolveAttributeToUser, includeImplicitActors, useV3, } = action.payload;
|
|
13
|
-
const { remiSetupApproverViewState, approvalRuleState } = state$.value;
|
|
15
|
+
const { remiSetupApproverViewState, approvalRuleState, classListState } = state$.value;
|
|
16
|
+
const isAccountingClassesEnabled = (0, tenantSelector_1.getIsAccountingClassesEnabled)(state$.value);
|
|
14
17
|
const approvalRules = (0, approvalRuleSelector_1.getApprovalRulesByIds)(approvalRuleState, remiSetupApproverViewState.approvalRuleIds);
|
|
18
|
+
const shouldFetchClassList = isAccountingClassesEnabled &&
|
|
19
|
+
(cacheOverride === true ||
|
|
20
|
+
(classListState.hasValidState() === false &&
|
|
21
|
+
classListState.fetchState !== 'In-Progress'));
|
|
15
22
|
if (cacheOverride === true ||
|
|
16
23
|
approvalRules.length !==
|
|
17
24
|
remiSetupApproverViewState.approvalRuleIds.length ||
|
|
@@ -33,6 +40,9 @@ const fetchRemiSetupApproverViewEpic = (actions$, state$, zeniAPI) => actions$.p
|
|
|
33
40
|
(0, approvalRuleReducer_1.updateApprovalRules)(response.data.approval_rules),
|
|
34
41
|
(0, remiSetupApproverViewReducer_1.fetchRemiSetupApproverViewSuccess)(approvalRuleIds),
|
|
35
42
|
];
|
|
43
|
+
if (shouldFetchClassList) {
|
|
44
|
+
actions.push((0, classListReducer_1.fetchClassList)());
|
|
45
|
+
}
|
|
36
46
|
return (0, rxjs_1.from)(actions);
|
|
37
47
|
}
|
|
38
48
|
else {
|
|
@@ -42,7 +52,13 @@ const fetchRemiSetupApproverViewEpic = (actions$, state$, zeniAPI) => actions$.p
|
|
|
42
52
|
}
|
|
43
53
|
else {
|
|
44
54
|
const { approvalRuleIds } = remiSetupApproverViewState;
|
|
45
|
-
|
|
55
|
+
const actions = [
|
|
56
|
+
(0, remiSetupApproverViewReducer_1.fetchRemiSetupApproverViewSuccess)(approvalRuleIds),
|
|
57
|
+
];
|
|
58
|
+
if (shouldFetchClassList) {
|
|
59
|
+
actions.push((0, classListReducer_1.fetchClassList)());
|
|
60
|
+
}
|
|
61
|
+
return (0, rxjs_1.from)(actions);
|
|
46
62
|
}
|
|
47
63
|
}));
|
|
48
64
|
exports.fetchRemiSetupApproverViewEpic = fetchRemiSetupApproverViewEpic;
|
|
@@ -24,7 +24,6 @@ const initializeRemiSetupApproverViewUpdateDataEpic = (actions$, state$) => acti
|
|
|
24
24
|
name: approvalRule.name,
|
|
25
25
|
description: approvalRule.description,
|
|
26
26
|
separationOfDuties: approvalRule.separationOfDuties,
|
|
27
|
-
isFallback: approvalRule.isFallback,
|
|
28
27
|
};
|
|
29
28
|
fetchActions.push((0, remiSetupApproverViewReducer_1.clearRemiSetupApproverViewUpdateData)(), (0, remiSetupApproverViewReducer_1.saveRemiSetupApproverViewUpdateData)(remiSetupApproverViewUpdateData));
|
|
30
29
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeniai/client-epic-state",
|
|
3
|
-
"version": "5.2.22
|
|
3
|
+
"version": "5.2.22",
|
|
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",
|
|
@@ -33,44 +33,6 @@
|
|
|
33
33
|
"require": "./lib/view/*.js"
|
|
34
34
|
}
|
|
35
35
|
},
|
|
36
|
-
"scripts": {
|
|
37
|
-
"clean": "rimraf lib",
|
|
38
|
-
"test:typecheck": "echo 'Typechecking test files...' && NODE_OPTIONS=--max-old-space-size=4096 time tsc -p tsconfig.typecheck.json",
|
|
39
|
-
"test:typecheck-modified-files": "chmod +x ./scripts/tsc-modified-files.sh && SINCE_DAYS=30 ./scripts/tsc-modified-files.sh master tsconfig.typecheck.json",
|
|
40
|
-
"test:typecheck-mocks": "echo 'Typechecking mock files...' && NODE_OPTIONS=--max-old-space-size=4096 time tsc -p tsconfig.mocks.json",
|
|
41
|
-
"test:typecheck-mocks-modified-files": "chmod +x ./scripts/tsc-modified-files.sh && SINCE_DAYS=30 ./scripts/tsc-modified-files.sh master tsconfig.mocks.json",
|
|
42
|
-
"test": "pnpm lint-modified-files && pnpm test:typecheck-modified-files && pnpm test:typecheck-mocks-modified-files && vitest run --typecheck",
|
|
43
|
-
"test:full": "pnpm test:typecheck-modified-files && pnpm test:typecheck-mocks-modified-files && vitest run --typecheck",
|
|
44
|
-
"lint": "eslint . --ext .js,.jsx,.ts,.tsx --max-warnings 0 --fix",
|
|
45
|
-
"lint-modified-files": "chmod +x ./scripts/lint-modified-files.sh && ./scripts/lint-modified-files.sh",
|
|
46
|
-
"lint:fix-modified-files": "chmod +x ./scripts/lint-modified-files.sh && LINT_FIX=true ./scripts/lint-modified-files.sh",
|
|
47
|
-
"tsc-modified-files": "chmod +x ./scripts/tsc-modified-files.sh && ./scripts/tsc-modified-files.sh",
|
|
48
|
-
"typecheck": "tsc --noEmit",
|
|
49
|
-
"circular-dependency": "madge --circular --extensions ts ./src",
|
|
50
|
-
"circular-dependency-modified-files": "chmod +x ./scripts/circular-dependency-modified-files.sh && ./scripts/circular-dependency-modified-files.sh",
|
|
51
|
-
"build": "chmod +x ./scripts/run_build.sh && ./scripts/run_build.sh && rimraf \"lib/**/__mocks__\" \"lib/**/__testHelpers__\"",
|
|
52
|
-
"only-build": "eslint . --ext .js,.jsx,.ts,.tsx && time tsc && tsc -p tsconfig.esm.json && rimraf \"lib/**/__mocks__\" \"lib/**/__testHelpers__\"",
|
|
53
|
-
"only-build-dev": "eslint . --ext .js,.jsx,.ts,.tsx && time tsc -p tsconfig.dev.json && tsc -p tsconfig.esm.dev.json && rimraf \"lib/**/__mocks__\" \"lib/**/__testHelpers__\"",
|
|
54
|
-
"format": "prettier --write --ignore-unknown \"src/**/*\" && pnpm lint",
|
|
55
|
-
"format-watch": "bash ./scripts/run-format-watch.sh",
|
|
56
|
-
"check-version": "node ./scripts/check_version.js",
|
|
57
|
-
"prepublishOnly": "chmod +x ./scripts/branch_validation.sh && ./scripts/branch_validation.sh && pnpm update-slack-group-topic && pnpm run check-version && pnpm clean && pnpm build",
|
|
58
|
-
"version": "git add -A src",
|
|
59
|
-
"postversion": "git push && git push --tags",
|
|
60
|
-
"check-dependencies": "node ./scripts/check_dependencies.js",
|
|
61
|
-
"clean-overrides": "node ./scripts/clean_overrides.js",
|
|
62
|
-
"create-or-update-release-branch": "chmod +x ./scripts/create_or_update_release_branch.sh && ./scripts/create_or_update_release_branch.sh",
|
|
63
|
-
"bump-versions-master": "chmod +x ./scripts/bump_versions_master.sh && ./scripts/bump_versions_master.sh",
|
|
64
|
-
"bump-versions-beta": "chmod +x ./scripts/bump_versions_beta.sh && ./scripts/bump_versions_beta.sh",
|
|
65
|
-
"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",
|
|
66
|
-
"send-release-notes": "chmod +x ./scripts/send_release_notes.sh && ./scripts/send_release_notes.sh",
|
|
67
|
-
"update-slack-group-topic": "chmod +x ./scripts/update-slack-group-topic.sh && ./scripts/update-slack-group-topic.sh",
|
|
68
|
-
"build-beta-and-copy": "chmod +x ./scripts/build_and_copy.sh && ./scripts/build_and_copy.sh",
|
|
69
|
-
"pr-approvals-update": "chmod +x ./scripts/pr_approvals.sh && ./scripts/pr_approvals.sh",
|
|
70
|
-
"raise-pr-automation": "chmod +x ./scripts/raise_pr_automation.sh && ./scripts/raise_pr_automation.sh",
|
|
71
|
-
"test:file": "bash ./scripts/test-file.sh",
|
|
72
|
-
"find-unused-code": "knip"
|
|
73
|
-
},
|
|
74
36
|
"files": [
|
|
75
37
|
"lib/**/*"
|
|
76
38
|
],
|
|
@@ -138,36 +100,41 @@
|
|
|
138
100
|
"dayjs": "^1.10.7",
|
|
139
101
|
"url-parse": "^1.5.10"
|
|
140
102
|
},
|
|
141
|
-
"
|
|
142
|
-
"
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
103
|
+
"scripts": {
|
|
104
|
+
"clean": "rimraf lib",
|
|
105
|
+
"test:typecheck": "echo 'Typechecking test files...' && NODE_OPTIONS=--max-old-space-size=4096 time tsc -p tsconfig.typecheck.json",
|
|
106
|
+
"test:typecheck-modified-files": "chmod +x ./scripts/tsc-modified-files.sh && SINCE_DAYS=30 ./scripts/tsc-modified-files.sh master tsconfig.typecheck.json",
|
|
107
|
+
"test:typecheck-mocks": "echo 'Typechecking mock files...' && NODE_OPTIONS=--max-old-space-size=4096 time tsc -p tsconfig.mocks.json",
|
|
108
|
+
"test:typecheck-mocks-modified-files": "chmod +x ./scripts/tsc-modified-files.sh && SINCE_DAYS=30 ./scripts/tsc-modified-files.sh master tsconfig.mocks.json",
|
|
109
|
+
"test": "pnpm lint-modified-files && pnpm test:typecheck-modified-files && pnpm test:typecheck-mocks-modified-files && vitest run --typecheck",
|
|
110
|
+
"test:full": "pnpm test:typecheck-modified-files && pnpm test:typecheck-mocks-modified-files && vitest run --typecheck",
|
|
111
|
+
"lint": "eslint . --ext .js,.jsx,.ts,.tsx --max-warnings 0 --fix",
|
|
112
|
+
"lint-modified-files": "chmod +x ./scripts/lint-modified-files.sh && ./scripts/lint-modified-files.sh",
|
|
113
|
+
"lint:fix-modified-files": "chmod +x ./scripts/lint-modified-files.sh && LINT_FIX=true ./scripts/lint-modified-files.sh",
|
|
114
|
+
"tsc-modified-files": "chmod +x ./scripts/tsc-modified-files.sh && ./scripts/tsc-modified-files.sh",
|
|
115
|
+
"typecheck": "tsc --noEmit",
|
|
116
|
+
"circular-dependency": "madge --circular --extensions ts ./src",
|
|
117
|
+
"circular-dependency-modified-files": "chmod +x ./scripts/circular-dependency-modified-files.sh && ./scripts/circular-dependency-modified-files.sh",
|
|
118
|
+
"build": "chmod +x ./scripts/run_build.sh && ./scripts/run_build.sh && rimraf \"lib/**/__mocks__\" \"lib/**/__testHelpers__\"",
|
|
119
|
+
"only-build": "eslint . --ext .js,.jsx,.ts,.tsx && time tsc && tsc -p tsconfig.esm.json && rimraf \"lib/**/__mocks__\" \"lib/**/__testHelpers__\"",
|
|
120
|
+
"only-build-dev": "eslint . --ext .js,.jsx,.ts,.tsx && time tsc -p tsconfig.dev.json && tsc -p tsconfig.esm.dev.json && rimraf \"lib/**/__mocks__\" \"lib/**/__testHelpers__\"",
|
|
121
|
+
"format": "prettier --write --ignore-unknown \"src/**/*\" && pnpm lint",
|
|
122
|
+
"format-watch": "bash ./scripts/run-format-watch.sh",
|
|
123
|
+
"check-version": "node ./scripts/check_version.js",
|
|
124
|
+
"version": "git add -A src",
|
|
125
|
+
"postversion": "git push && git push --tags",
|
|
126
|
+
"check-dependencies": "node ./scripts/check_dependencies.js",
|
|
127
|
+
"clean-overrides": "node ./scripts/clean_overrides.js",
|
|
128
|
+
"create-or-update-release-branch": "chmod +x ./scripts/create_or_update_release_branch.sh && ./scripts/create_or_update_release_branch.sh",
|
|
129
|
+
"bump-versions-master": "chmod +x ./scripts/bump_versions_master.sh && ./scripts/bump_versions_master.sh",
|
|
130
|
+
"bump-versions-beta": "chmod +x ./scripts/bump_versions_beta.sh && ./scripts/bump_versions_beta.sh",
|
|
131
|
+
"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",
|
|
132
|
+
"send-release-notes": "chmod +x ./scripts/send_release_notes.sh && ./scripts/send_release_notes.sh",
|
|
133
|
+
"update-slack-group-topic": "chmod +x ./scripts/update-slack-group-topic.sh && ./scripts/update-slack-group-topic.sh",
|
|
134
|
+
"build-beta-and-copy": "chmod +x ./scripts/build_and_copy.sh && ./scripts/build_and_copy.sh",
|
|
135
|
+
"pr-approvals-update": "chmod +x ./scripts/pr_approvals.sh && ./scripts/pr_approvals.sh",
|
|
136
|
+
"raise-pr-automation": "chmod +x ./scripts/raise_pr_automation.sh && ./scripts/raise_pr_automation.sh",
|
|
137
|
+
"test:file": "bash ./scripts/test-file.sh",
|
|
138
|
+
"find-unused-code": "knip"
|
|
172
139
|
}
|
|
173
|
-
}
|
|
140
|
+
}
|