@zeniai/client-epic-state 5.1.18-betaAA0 → 5.1.18-betaDI10
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/commonStateTypes/viewAndReport/agingReportStateTypes.d.ts +1 -1
- package/lib/entity/snackbar/snackbarTypes.d.ts +1 -1
- package/lib/entity/snackbar/snackbarTypes.js +1 -0
- package/lib/entity/task/taskPayload.d.ts +1 -0
- package/lib/entity/task/taskPayload.js +1 -0
- package/lib/entity/task/taskReducer.d.ts +5 -1
- package/lib/entity/task/taskReducer.js +8 -2
- package/lib/entity/task/taskState.d.ts +2 -1
- package/lib/entity/tenant/clearAllEpic.d.ts +2 -39
- package/lib/entity/tenant/clearAllEpic.js +8 -82
- package/lib/entity/tenant/tenantReducer.js +3 -3
- package/lib/entity/transaction/payloadTypes/customerTransactionPayload.js +3 -1
- package/lib/epic.d.ts +4 -31
- package/lib/epic.js +4 -32
- package/lib/esm/entity/snackbar/snackbarTypes.js +1 -0
- package/lib/esm/entity/task/taskPayload.js +1 -0
- package/lib/esm/entity/task/taskReducer.js +7 -1
- package/lib/esm/entity/tenant/clearAllEpic.js +0 -74
- package/lib/esm/entity/tenant/tenantReducer.js +3 -3
- package/lib/esm/entity/transaction/payloadTypes/customerTransactionPayload.js +3 -1
- package/lib/esm/epic.js +4 -32
- package/lib/esm/index.js +3 -80
- package/lib/esm/reducer.js +0 -114
- package/lib/esm/view/companyTaskManagerView/epics/fetchCompanyTaskManagerViewEpic.js +2 -0
- package/lib/esm/view/companyTaskManagerView/epics/fetchTaskManagerMetricsEpic.js +8 -1
- package/lib/esm/view/taskManager/taskDetailView/epics/createSubTaskEpic.js +80 -0
- package/lib/esm/view/taskManager/taskDetailView/epics/fetchSubTasksEpic.js +36 -0
- package/lib/esm/view/taskManager/taskDetailView/epics/fetchTaskDetailEpic.js +13 -0
- package/lib/esm/view/taskManager/taskDetailView/epics/initializeTaskToLocalStoreEpic.js +1 -0
- package/lib/esm/view/taskManager/taskDetailView/epics/saveTaskDetailEpic.js +24 -4
- package/lib/esm/view/taskManager/taskDetailView/epics/sendCommentMentionNotificationEpic.js +37 -0
- package/lib/esm/view/taskManager/taskDetailView/taskDetailReducer.js +56 -2
- package/lib/esm/view/taskManager/taskDetailView/taskDetailSelector.js +21 -9
- package/lib/esm/view/taskManager/taskListView/epics/fetchTaskListEpic.js +3 -1
- package/lib/esm/view/taskManager/taskListView/taskList.js +1 -0
- package/lib/esm/view/taskManager/taskListView/taskListReducer.js +189 -10
- package/lib/esm/view/taskManager/taskListView/taskListSelector.js +1 -0
- package/lib/index.d.ts +4 -100
- package/lib/index.js +13 -372
- package/lib/reducer.d.ts +0 -114
- package/lib/reducer.js +12 -126
- package/lib/view/companyTaskManagerView/epics/fetchCompanyTaskManagerViewEpic.js +2 -0
- package/lib/view/companyTaskManagerView/epics/fetchTaskManagerMetricsEpic.js +8 -1
- package/lib/view/companyView/types/cockpitTypes.d.ts +2 -0
- package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.d.ts +1 -1
- package/lib/view/reviewCompanyView/reviewCompanyViewState.d.ts +1 -1
- package/lib/view/spendManagement/billPay/billList/billListReducer.d.ts +1 -1
- package/lib/view/spendManagement/billPay/billList/billListState.d.ts +1 -1
- package/lib/view/spendManagement/reimbursement/remiListView/remiListReducer.d.ts +1 -1
- package/lib/view/spendManagement/reimbursement/remiListView/remiListState.d.ts +3 -3
- package/lib/view/taskManager/taskDetailView/epics/createSubTaskEpic.d.ts +9 -0
- package/lib/view/taskManager/taskDetailView/epics/createSubTaskEpic.js +84 -0
- package/lib/view/taskManager/taskDetailView/epics/fetchSubTasksEpic.d.ts +8 -0
- package/lib/view/taskManager/taskDetailView/epics/fetchSubTasksEpic.js +40 -0
- package/lib/view/taskManager/taskDetailView/epics/fetchTaskDetailEpic.d.ts +2 -1
- package/lib/view/taskManager/taskDetailView/epics/fetchTaskDetailEpic.js +13 -0
- package/lib/view/taskManager/taskDetailView/epics/initializeTaskToLocalStoreEpic.js +1 -0
- package/lib/view/taskManager/taskDetailView/epics/saveTaskDetailEpic.js +24 -4
- package/lib/view/taskManager/taskDetailView/epics/sendCommentMentionNotificationEpic.d.ts +20 -0
- package/lib/view/taskManager/taskDetailView/epics/sendCommentMentionNotificationEpic.js +41 -0
- package/lib/view/taskManager/taskDetailView/taskDetail.d.ts +14 -0
- package/lib/view/taskManager/taskDetailView/taskDetailReducer.d.ts +14 -2
- package/lib/view/taskManager/taskDetailView/taskDetailReducer.js +57 -3
- package/lib/view/taskManager/taskDetailView/taskDetailSelector.d.ts +2 -1
- package/lib/view/taskManager/taskDetailView/taskDetailSelector.js +19 -7
- package/lib/view/taskManager/taskListView/epics/fetchTaskListEpic.js +3 -1
- package/lib/view/taskManager/taskListView/taskList.d.ts +1 -1
- package/lib/view/taskManager/taskListView/taskList.js +1 -0
- package/lib/view/taskManager/taskListView/taskListPayload.d.ts +4 -0
- package/lib/view/taskManager/taskListView/taskListReducer.d.ts +2 -1
- package/lib/view/taskManager/taskListView/taskListReducer.js +189 -10
- package/lib/view/taskManager/taskListView/taskListSelector.js +1 -0
- package/lib/zeniAPI.d.ts +0 -1
- package/package.json +1 -1
- package/lib/entity/invoicing/coupon/couponReducer.d.ts +0 -12
- package/lib/entity/invoicing/coupon/couponReducer.js +0 -33
- package/lib/entity/invoicing/creditNote/creditNoteReducer.d.ts +0 -12
- package/lib/entity/invoicing/creditNote/creditNoteReducer.js +0 -35
- package/lib/entity/invoicing/customer/customerReducer.d.ts +0 -12
- package/lib/entity/invoicing/customer/customerReducer.js +0 -33
- package/lib/entity/invoicing/dunningCase/dunningCaseReducer.d.ts +0 -12
- package/lib/entity/invoicing/dunningCase/dunningCaseReducer.js +0 -35
- package/lib/entity/invoicing/invoice/invoiceReducer.d.ts +0 -10
- package/lib/entity/invoicing/invoice/invoiceReducer.js +0 -36
- package/lib/entity/invoicing/invoice/invoiceSelector.d.ts +0 -5
- package/lib/entity/invoicing/invoice/invoiceSelector.js +0 -9
- package/lib/entity/invoicing/invoice/invoiceState.d.ts +0 -5
- package/lib/entity/invoicing/invoice/invoiceState.js +0 -2
- package/lib/entity/invoicing/invoicingTypes.d.ts +0 -766
- package/lib/entity/invoicing/invoicingTypes.js +0 -15
- package/lib/entity/invoicing/plan/planReducer.d.ts +0 -12
- package/lib/entity/invoicing/plan/planReducer.js +0 -33
- package/lib/entity/invoicing/product/productReducer.d.ts +0 -12
- package/lib/entity/invoicing/product/productReducer.js +0 -33
- package/lib/entity/invoicing/subscription/subscriptionReducer.d.ts +0 -12
- package/lib/entity/invoicing/subscription/subscriptionReducer.js +0 -35
- package/lib/entity/invoicing/transaction/transactionReducer.d.ts +0 -12
- package/lib/entity/invoicing/transaction/transactionReducer.js +0 -35
- package/lib/esm/entity/invoicing/coupon/couponReducer.js +0 -29
- package/lib/esm/entity/invoicing/creditNote/creditNoteReducer.js +0 -31
- package/lib/esm/entity/invoicing/customer/customerReducer.js +0 -29
- package/lib/esm/entity/invoicing/dunningCase/dunningCaseReducer.js +0 -31
- package/lib/esm/entity/invoicing/invoice/invoiceReducer.js +0 -32
- package/lib/esm/entity/invoicing/invoice/invoiceSelector.js +0 -4
- package/lib/esm/entity/invoicing/invoice/invoiceState.js +0 -1
- package/lib/esm/entity/invoicing/invoicingTypes.js +0 -14
- package/lib/esm/entity/invoicing/plan/planReducer.js +0 -29
- package/lib/esm/entity/invoicing/product/productReducer.js +0 -29
- package/lib/esm/entity/invoicing/subscription/subscriptionReducer.js +0 -31
- package/lib/esm/entity/invoicing/transaction/transactionReducer.js +0 -31
- package/lib/esm/view/invoicing/analyticsView/analyticsViewEpics.js +0 -42
- package/lib/esm/view/invoicing/analyticsView/analyticsViewReducer.js +0 -45
- package/lib/esm/view/invoicing/analyticsView/analyticsViewSelector.js +0 -10
- package/lib/esm/view/invoicing/approvalAction/approvalActionEpic.js +0 -28
- package/lib/esm/view/invoicing/approvalAction/approvalActionReducer.js +0 -36
- package/lib/esm/view/invoicing/approvalAction/approvalActionSelector.js +0 -5
- package/lib/esm/view/invoicing/approvalsView/approvalsViewEpics.js +0 -37
- package/lib/esm/view/invoicing/approvalsView/approvalsViewReducer.js +0 -62
- package/lib/esm/view/invoicing/approvalsView/approvalsViewSelector.js +0 -8
- package/lib/esm/view/invoicing/auditView/auditViewEpics.js +0 -46
- package/lib/esm/view/invoicing/auditView/auditViewReducer.js +0 -56
- package/lib/esm/view/invoicing/auditView/auditViewSelector.js +0 -8
- package/lib/esm/view/invoicing/catalogView/catalogViewEpics.js +0 -143
- package/lib/esm/view/invoicing/catalogView/catalogViewReducer.js +0 -162
- package/lib/esm/view/invoicing/catalogView/catalogViewSelector.js +0 -31
- package/lib/esm/view/invoicing/catalogWrite/catalogWriteEpic.js +0 -34
- package/lib/esm/view/invoicing/catalogWrite/catalogWriteReducer.js +0 -39
- package/lib/esm/view/invoicing/catalogWrite/catalogWriteSelector.js +0 -6
- package/lib/esm/view/invoicing/couponView/couponViewEpics.js +0 -83
- package/lib/esm/view/invoicing/couponView/couponViewReducer.js +0 -105
- package/lib/esm/view/invoicing/couponView/couponViewSelector.js +0 -18
- package/lib/esm/view/invoicing/couponWrite/couponWriteEpic.js +0 -29
- package/lib/esm/view/invoicing/couponWrite/couponWriteReducer.js +0 -36
- package/lib/esm/view/invoicing/couponWrite/couponWriteSelector.js +0 -5
- package/lib/esm/view/invoicing/createInvoice/createInvoiceEpic.js +0 -23
- package/lib/esm/view/invoicing/createInvoice/createInvoiceReducer.js +0 -36
- package/lib/esm/view/invoicing/createInvoice/createInvoiceSelector.js +0 -5
- package/lib/esm/view/invoicing/creditNoteView/creditNoteViewEpics.js +0 -87
- package/lib/esm/view/invoicing/creditNoteView/creditNoteViewReducer.js +0 -105
- package/lib/esm/view/invoicing/creditNoteView/creditNoteViewSelector.js +0 -20
- package/lib/esm/view/invoicing/customerPaymentMethod/customerPaymentMethodEpic.js +0 -63
- package/lib/esm/view/invoicing/customerPaymentMethod/customerPaymentMethodReducer.js +0 -84
- package/lib/esm/view/invoicing/customerPaymentMethod/customerPaymentMethodSelector.js +0 -7
- package/lib/esm/view/invoicing/customerView/customerViewEpics.js +0 -71
- package/lib/esm/view/invoicing/customerView/customerViewReducer.js +0 -90
- package/lib/esm/view/invoicing/customerView/customerViewSelector.js +0 -17
- package/lib/esm/view/invoicing/customerWrite/customerWriteEpic.js +0 -23
- package/lib/esm/view/invoicing/customerWrite/customerWriteReducer.js +0 -36
- package/lib/esm/view/invoicing/customerWrite/customerWriteSelector.js +0 -5
- package/lib/esm/view/invoicing/dataImportAction/dataImportActionEpic.js +0 -41
- package/lib/esm/view/invoicing/dataImportAction/dataImportActionReducer.js +0 -73
- package/lib/esm/view/invoicing/dataImportAction/dataImportActionSelector.js +0 -5
- package/lib/esm/view/invoicing/dataImportView/dataImportViewEpics.js +0 -41
- package/lib/esm/view/invoicing/dataImportView/dataImportViewReducer.js +0 -66
- package/lib/esm/view/invoicing/dataImportView/dataImportViewSelector.js +0 -6
- package/lib/esm/view/invoicing/dunningAction/dunningActionEpic.js +0 -28
- package/lib/esm/view/invoicing/dunningAction/dunningActionReducer.js +0 -36
- package/lib/esm/view/invoicing/dunningAction/dunningActionSelector.js +0 -5
- package/lib/esm/view/invoicing/dunningCaseView/dunningCaseViewEpics.js +0 -85
- package/lib/esm/view/invoicing/dunningCaseView/dunningCaseViewReducer.js +0 -105
- package/lib/esm/view/invoicing/dunningCaseView/dunningCaseViewSelector.js +0 -20
- package/lib/esm/view/invoicing/invoiceAction/invoiceActionEpic.js +0 -50
- package/lib/esm/view/invoicing/invoiceAction/invoiceActionReducer.js +0 -42
- package/lib/esm/view/invoicing/invoiceAction/invoiceActionSelector.js +0 -5
- package/lib/esm/view/invoicing/invoiceDetail/fetchInvoiceDetailEpic.js +0 -20
- package/lib/esm/view/invoicing/invoiceDetail/invoiceDetailReducer.js +0 -34
- package/lib/esm/view/invoicing/invoiceDetail/invoiceDetailSelector.js +0 -9
- package/lib/esm/view/invoicing/invoiceDetail/invoiceDetailState.js +0 -1
- package/lib/esm/view/invoicing/invoiceList/fetchInvoiceCountsEpic.js +0 -32
- package/lib/esm/view/invoicing/invoiceList/fetchInvoiceKPIsEpic.js +0 -17
- package/lib/esm/view/invoicing/invoiceList/fetchInvoiceListEpic.js +0 -55
- package/lib/esm/view/invoicing/invoiceList/invoiceListReducer.js +0 -90
- package/lib/esm/view/invoicing/invoiceList/invoiceListSelector.js +0 -11
- package/lib/esm/view/invoicing/invoiceList/invoiceListState.js +0 -1
- package/lib/esm/view/invoicing/invoicePdf/invoicePdfEpic.js +0 -37
- package/lib/esm/view/invoicing/invoicePdf/invoicePdfReducer.js +0 -33
- package/lib/esm/view/invoicing/invoicePdf/invoicePdfSelector.js +0 -5
- package/lib/esm/view/invoicing/invoicingApiHelper.js +0 -38
- package/lib/esm/view/invoicing/paymentAction/paymentActionEpic.js +0 -28
- package/lib/esm/view/invoicing/paymentAction/paymentActionReducer.js +0 -36
- package/lib/esm/view/invoicing/paymentAction/paymentActionSelector.js +0 -5
- package/lib/esm/view/invoicing/recordPayment/recordPaymentEpic.js +0 -23
- package/lib/esm/view/invoicing/recordPayment/recordPaymentReducer.js +0 -36
- package/lib/esm/view/invoicing/recordPayment/recordPaymentSelector.js +0 -5
- package/lib/esm/view/invoicing/reportsView/reportsViewEpics.js +0 -28
- package/lib/esm/view/invoicing/reportsView/reportsViewReducer.js +0 -54
- package/lib/esm/view/invoicing/reportsView/reportsViewSelector.js +0 -13
- package/lib/esm/view/invoicing/settingsView/settingsViewEpics.js +0 -53
- package/lib/esm/view/invoicing/settingsView/settingsViewReducer.js +0 -69
- package/lib/esm/view/invoicing/settingsView/settingsViewSelector.js +0 -7
- package/lib/esm/view/invoicing/subscriptionAction/subscriptionActionEpic.js +0 -28
- package/lib/esm/view/invoicing/subscriptionAction/subscriptionActionReducer.js +0 -36
- package/lib/esm/view/invoicing/subscriptionAction/subscriptionActionSelector.js +0 -5
- package/lib/esm/view/invoicing/subscriptionView/subscriptionViewEpics.js +0 -85
- package/lib/esm/view/invoicing/subscriptionView/subscriptionViewReducer.js +0 -90
- package/lib/esm/view/invoicing/subscriptionView/subscriptionViewSelector.js +0 -19
- package/lib/esm/view/invoicing/subscriptionWrite/subscriptionWriteEpic.js +0 -25
- package/lib/esm/view/invoicing/subscriptionWrite/subscriptionWriteReducer.js +0 -36
- package/lib/esm/view/invoicing/subscriptionWrite/subscriptionWriteSelector.js +0 -5
- package/lib/esm/view/invoicing/transactionView/transactionViewEpics.js +0 -76
- package/lib/esm/view/invoicing/transactionView/transactionViewReducer.js +0 -90
- package/lib/esm/view/invoicing/transactionView/transactionViewSelector.js +0 -19
- package/lib/view/invoicing/analyticsView/analyticsViewEpics.d.ts +0 -7
- package/lib/view/invoicing/analyticsView/analyticsViewEpics.js +0 -46
- package/lib/view/invoicing/analyticsView/analyticsViewReducer.d.ts +0 -22
- package/lib/view/invoicing/analyticsView/analyticsViewReducer.js +0 -49
- package/lib/view/invoicing/analyticsView/analyticsViewSelector.d.ts +0 -10
- package/lib/view/invoicing/analyticsView/analyticsViewSelector.js +0 -20
- package/lib/view/invoicing/approvalAction/approvalActionEpic.d.ts +0 -8
- package/lib/view/invoicing/approvalAction/approvalActionEpic.js +0 -32
- package/lib/view/invoicing/approvalAction/approvalActionReducer.d.ts +0 -20
- package/lib/view/invoicing/approvalAction/approvalActionReducer.js +0 -40
- package/lib/view/invoicing/approvalAction/approvalActionSelector.d.ts +0 -3
- package/lib/view/invoicing/approvalAction/approvalActionSelector.js +0 -9
- package/lib/view/invoicing/approvalsView/approvalsViewEpics.d.ts +0 -7
- package/lib/view/invoicing/approvalsView/approvalsViewEpics.js +0 -41
- package/lib/view/invoicing/approvalsView/approvalsViewReducer.d.ts +0 -33
- package/lib/view/invoicing/approvalsView/approvalsViewReducer.js +0 -66
- package/lib/view/invoicing/approvalsView/approvalsViewSelector.d.ts +0 -9
- package/lib/view/invoicing/approvalsView/approvalsViewSelector.js +0 -16
- package/lib/view/invoicing/auditView/auditViewEpics.d.ts +0 -7
- package/lib/view/invoicing/auditView/auditViewEpics.js +0 -50
- package/lib/view/invoicing/auditView/auditViewReducer.d.ts +0 -36
- package/lib/view/invoicing/auditView/auditViewReducer.js +0 -60
- package/lib/view/invoicing/auditView/auditViewSelector.d.ts +0 -9
- package/lib/view/invoicing/auditView/auditViewSelector.js +0 -16
- package/lib/view/invoicing/catalogView/catalogViewEpics.d.ts +0 -14
- package/lib/view/invoicing/catalogView/catalogViewEpics.js +0 -152
- package/lib/view/invoicing/catalogView/catalogViewReducer.d.ts +0 -76
- package/lib/view/invoicing/catalogView/catalogViewReducer.js +0 -166
- package/lib/view/invoicing/catalogView/catalogViewSelector.d.ts +0 -22
- package/lib/view/invoicing/catalogView/catalogViewSelector.js +0 -52
- package/lib/view/invoicing/catalogWrite/catalogWriteEpic.d.ts +0 -9
- package/lib/view/invoicing/catalogWrite/catalogWriteEpic.js +0 -38
- package/lib/view/invoicing/catalogWrite/catalogWriteReducer.d.ts +0 -21
- package/lib/view/invoicing/catalogWrite/catalogWriteReducer.js +0 -43
- package/lib/view/invoicing/catalogWrite/catalogWriteSelector.d.ts +0 -6
- package/lib/view/invoicing/catalogWrite/catalogWriteSelector.js +0 -12
- package/lib/view/invoicing/couponView/couponViewEpics.d.ts +0 -11
- package/lib/view/invoicing/couponView/couponViewEpics.js +0 -90
- package/lib/view/invoicing/couponView/couponViewReducer.d.ts +0 -42
- package/lib/view/invoicing/couponView/couponViewReducer.js +0 -109
- package/lib/view/invoicing/couponView/couponViewSelector.d.ts +0 -14
- package/lib/view/invoicing/couponView/couponViewSelector.js +0 -31
- package/lib/view/invoicing/couponWrite/couponWriteEpic.d.ts +0 -8
- package/lib/view/invoicing/couponWrite/couponWriteEpic.js +0 -33
- package/lib/view/invoicing/couponWrite/couponWriteReducer.d.ts +0 -17
- package/lib/view/invoicing/couponWrite/couponWriteReducer.js +0 -40
- package/lib/view/invoicing/couponWrite/couponWriteSelector.d.ts +0 -4
- package/lib/view/invoicing/couponWrite/couponWriteSelector.js +0 -10
- package/lib/view/invoicing/createInvoice/createInvoiceEpic.d.ts +0 -8
- package/lib/view/invoicing/createInvoice/createInvoiceEpic.js +0 -27
- package/lib/view/invoicing/createInvoice/createInvoiceReducer.d.ts +0 -34
- package/lib/view/invoicing/createInvoice/createInvoiceReducer.js +0 -40
- package/lib/view/invoicing/createInvoice/createInvoiceSelector.d.ts +0 -4
- package/lib/view/invoicing/createInvoice/createInvoiceSelector.js +0 -10
- package/lib/view/invoicing/creditNoteView/creditNoteViewEpics.d.ts +0 -11
- package/lib/view/invoicing/creditNoteView/creditNoteViewEpics.js +0 -94
- package/lib/view/invoicing/creditNoteView/creditNoteViewReducer.d.ts +0 -43
- package/lib/view/invoicing/creditNoteView/creditNoteViewReducer.js +0 -109
- package/lib/view/invoicing/creditNoteView/creditNoteViewSelector.d.ts +0 -14
- package/lib/view/invoicing/creditNoteView/creditNoteViewSelector.js +0 -33
- package/lib/view/invoicing/customerPaymentMethod/customerPaymentMethodEpic.d.ts +0 -11
- package/lib/view/invoicing/customerPaymentMethod/customerPaymentMethodEpic.js +0 -70
- package/lib/view/invoicing/customerPaymentMethod/customerPaymentMethodReducer.d.ts +0 -42
- package/lib/view/invoicing/customerPaymentMethod/customerPaymentMethodReducer.js +0 -88
- package/lib/view/invoicing/customerPaymentMethod/customerPaymentMethodSelector.d.ts +0 -10
- package/lib/view/invoicing/customerPaymentMethod/customerPaymentMethodSelector.js +0 -17
- package/lib/view/invoicing/customerView/customerViewEpics.d.ts +0 -10
- package/lib/view/invoicing/customerView/customerViewEpics.js +0 -77
- package/lib/view/invoicing/customerView/customerViewReducer.d.ts +0 -41
- package/lib/view/invoicing/customerView/customerViewReducer.js +0 -94
- package/lib/view/invoicing/customerView/customerViewSelector.d.ts +0 -13
- package/lib/view/invoicing/customerView/customerViewSelector.js +0 -29
- package/lib/view/invoicing/customerWrite/customerWriteEpic.d.ts +0 -8
- package/lib/view/invoicing/customerWrite/customerWriteEpic.js +0 -27
- package/lib/view/invoicing/customerWrite/customerWriteReducer.d.ts +0 -17
- package/lib/view/invoicing/customerWrite/customerWriteReducer.js +0 -40
- package/lib/view/invoicing/customerWrite/customerWriteSelector.d.ts +0 -4
- package/lib/view/invoicing/customerWrite/customerWriteSelector.js +0 -10
- package/lib/view/invoicing/dataImportAction/dataImportActionEpic.d.ts +0 -7
- package/lib/view/invoicing/dataImportAction/dataImportActionEpic.js +0 -45
- package/lib/view/invoicing/dataImportAction/dataImportActionReducer.d.ts +0 -23
- package/lib/view/invoicing/dataImportAction/dataImportActionReducer.js +0 -77
- package/lib/view/invoicing/dataImportAction/dataImportActionSelector.d.ts +0 -4
- package/lib/view/invoicing/dataImportAction/dataImportActionSelector.js +0 -9
- package/lib/view/invoicing/dataImportView/dataImportViewEpics.d.ts +0 -9
- package/lib/view/invoicing/dataImportView/dataImportViewEpics.js +0 -47
- package/lib/view/invoicing/dataImportView/dataImportViewReducer.d.ts +0 -15
- package/lib/view/invoicing/dataImportView/dataImportViewReducer.js +0 -70
- package/lib/view/invoicing/dataImportView/dataImportViewSelector.d.ts +0 -9
- package/lib/view/invoicing/dataImportView/dataImportViewSelector.js +0 -15
- package/lib/view/invoicing/dunningAction/dunningActionEpic.d.ts +0 -8
- package/lib/view/invoicing/dunningAction/dunningActionEpic.js +0 -32
- package/lib/view/invoicing/dunningAction/dunningActionReducer.d.ts +0 -21
- package/lib/view/invoicing/dunningAction/dunningActionReducer.js +0 -40
- package/lib/view/invoicing/dunningAction/dunningActionSelector.d.ts +0 -3
- package/lib/view/invoicing/dunningAction/dunningActionSelector.js +0 -9
- package/lib/view/invoicing/dunningCaseView/dunningCaseViewEpics.d.ts +0 -11
- package/lib/view/invoicing/dunningCaseView/dunningCaseViewEpics.js +0 -92
- package/lib/view/invoicing/dunningCaseView/dunningCaseViewReducer.d.ts +0 -42
- package/lib/view/invoicing/dunningCaseView/dunningCaseViewReducer.js +0 -109
- package/lib/view/invoicing/dunningCaseView/dunningCaseViewSelector.d.ts +0 -14
- package/lib/view/invoicing/dunningCaseView/dunningCaseViewSelector.js +0 -33
- package/lib/view/invoicing/invoiceAction/invoiceActionEpic.d.ts +0 -9
- package/lib/view/invoicing/invoiceAction/invoiceActionEpic.js +0 -55
- package/lib/view/invoicing/invoiceAction/invoiceActionReducer.d.ts +0 -26
- package/lib/view/invoicing/invoiceAction/invoiceActionReducer.js +0 -46
- package/lib/view/invoicing/invoiceAction/invoiceActionSelector.d.ts +0 -3
- package/lib/view/invoicing/invoiceAction/invoiceActionSelector.js +0 -9
- package/lib/view/invoicing/invoiceDetail/fetchInvoiceDetailEpic.d.ts +0 -8
- package/lib/view/invoicing/invoiceDetail/fetchInvoiceDetailEpic.js +0 -24
- package/lib/view/invoicing/invoiceDetail/invoiceDetailReducer.d.ts +0 -11
- package/lib/view/invoicing/invoiceDetail/invoiceDetailReducer.js +0 -38
- package/lib/view/invoicing/invoiceDetail/invoiceDetailSelector.d.ts +0 -5
- package/lib/view/invoicing/invoiceDetail/invoiceDetailSelector.js +0 -14
- package/lib/view/invoicing/invoiceDetail/invoiceDetailState.d.ts +0 -4
- package/lib/view/invoicing/invoiceDetail/invoiceDetailState.js +0 -2
- package/lib/view/invoicing/invoiceList/fetchInvoiceCountsEpic.d.ts +0 -7
- package/lib/view/invoicing/invoiceList/fetchInvoiceCountsEpic.js +0 -36
- package/lib/view/invoicing/invoiceList/fetchInvoiceKPIsEpic.d.ts +0 -7
- package/lib/view/invoicing/invoiceList/fetchInvoiceKPIsEpic.js +0 -21
- package/lib/view/invoicing/invoiceList/fetchInvoiceListEpic.d.ts +0 -8
- package/lib/view/invoicing/invoiceList/fetchInvoiceListEpic.js +0 -59
- package/lib/view/invoicing/invoiceList/invoiceListReducer.d.ts +0 -22
- package/lib/view/invoicing/invoiceList/invoiceListReducer.js +0 -94
- package/lib/view/invoicing/invoiceList/invoiceListSelector.d.ts +0 -11
- package/lib/view/invoicing/invoiceList/invoiceListSelector.js +0 -21
- package/lib/view/invoicing/invoiceList/invoiceListState.d.ts +0 -25
- package/lib/view/invoicing/invoiceList/invoiceListState.js +0 -2
- package/lib/view/invoicing/invoicePdf/invoicePdfEpic.d.ts +0 -7
- package/lib/view/invoicing/invoicePdf/invoicePdfEpic.js +0 -41
- package/lib/view/invoicing/invoicePdf/invoicePdfReducer.d.ts +0 -20
- package/lib/view/invoicing/invoicePdf/invoicePdfReducer.js +0 -37
- package/lib/view/invoicing/invoicePdf/invoicePdfSelector.d.ts +0 -3
- package/lib/view/invoicing/invoicePdf/invoicePdfSelector.js +0 -9
- package/lib/view/invoicing/invoicingApiHelper.d.ts +0 -22
- package/lib/view/invoicing/invoicingApiHelper.js +0 -44
- package/lib/view/invoicing/paymentAction/paymentActionEpic.d.ts +0 -8
- package/lib/view/invoicing/paymentAction/paymentActionEpic.js +0 -32
- package/lib/view/invoicing/paymentAction/paymentActionReducer.d.ts +0 -21
- package/lib/view/invoicing/paymentAction/paymentActionReducer.js +0 -40
- package/lib/view/invoicing/paymentAction/paymentActionSelector.d.ts +0 -3
- package/lib/view/invoicing/paymentAction/paymentActionSelector.js +0 -9
- package/lib/view/invoicing/recordPayment/recordPaymentEpic.d.ts +0 -8
- package/lib/view/invoicing/recordPayment/recordPaymentEpic.js +0 -27
- package/lib/view/invoicing/recordPayment/recordPaymentReducer.d.ts +0 -32
- package/lib/view/invoicing/recordPayment/recordPaymentReducer.js +0 -40
- package/lib/view/invoicing/recordPayment/recordPaymentSelector.d.ts +0 -4
- package/lib/view/invoicing/recordPayment/recordPaymentSelector.js +0 -10
- package/lib/view/invoicing/reportsView/reportsViewEpics.d.ts +0 -7
- package/lib/view/invoicing/reportsView/reportsViewEpics.js +0 -32
- package/lib/view/invoicing/reportsView/reportsViewReducer.d.ts +0 -20
- package/lib/view/invoicing/reportsView/reportsViewReducer.js +0 -58
- package/lib/view/invoicing/reportsView/reportsViewSelector.d.ts +0 -12
- package/lib/view/invoicing/reportsView/reportsViewSelector.js +0 -24
- package/lib/view/invoicing/settingsView/settingsViewEpics.d.ts +0 -10
- package/lib/view/invoicing/settingsView/settingsViewEpics.js +0 -60
- package/lib/view/invoicing/settingsView/settingsViewReducer.d.ts +0 -12
- package/lib/view/invoicing/settingsView/settingsViewReducer.js +0 -73
- package/lib/view/invoicing/settingsView/settingsViewSelector.d.ts +0 -7
- package/lib/view/invoicing/settingsView/settingsViewSelector.js +0 -14
- package/lib/view/invoicing/subscriptionAction/subscriptionActionEpic.d.ts +0 -8
- package/lib/view/invoicing/subscriptionAction/subscriptionActionEpic.js +0 -32
- package/lib/view/invoicing/subscriptionAction/subscriptionActionReducer.d.ts +0 -21
- package/lib/view/invoicing/subscriptionAction/subscriptionActionReducer.js +0 -40
- package/lib/view/invoicing/subscriptionAction/subscriptionActionSelector.d.ts +0 -3
- package/lib/view/invoicing/subscriptionAction/subscriptionActionSelector.js +0 -9
- package/lib/view/invoicing/subscriptionView/subscriptionViewEpics.d.ts +0 -10
- package/lib/view/invoicing/subscriptionView/subscriptionViewEpics.js +0 -91
- package/lib/view/invoicing/subscriptionView/subscriptionViewReducer.d.ts +0 -44
- package/lib/view/invoicing/subscriptionView/subscriptionViewReducer.js +0 -94
- package/lib/view/invoicing/subscriptionView/subscriptionViewSelector.d.ts +0 -13
- package/lib/view/invoicing/subscriptionView/subscriptionViewSelector.js +0 -31
- package/lib/view/invoicing/subscriptionWrite/subscriptionWriteEpic.d.ts +0 -8
- package/lib/view/invoicing/subscriptionWrite/subscriptionWriteEpic.js +0 -29
- package/lib/view/invoicing/subscriptionWrite/subscriptionWriteReducer.d.ts +0 -17
- package/lib/view/invoicing/subscriptionWrite/subscriptionWriteReducer.js +0 -40
- package/lib/view/invoicing/subscriptionWrite/subscriptionWriteSelector.d.ts +0 -4
- package/lib/view/invoicing/subscriptionWrite/subscriptionWriteSelector.js +0 -10
- package/lib/view/invoicing/transactionView/transactionViewEpics.d.ts +0 -10
- package/lib/view/invoicing/transactionView/transactionViewEpics.js +0 -82
- package/lib/view/invoicing/transactionView/transactionViewReducer.d.ts +0 -43
- package/lib/view/invoicing/transactionView/transactionViewReducer.js +0 -94
- package/lib/view/invoicing/transactionView/transactionViewSelector.d.ts +0 -13
- package/lib/view/invoicing/transactionView/transactionViewSelector.js +0 -31
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { getInvoicesByIds } from '../../../entity/invoicing/invoice/invoiceSelector';
|
|
2
|
-
export const getInvoiceListFetchState = (state) => ({
|
|
3
|
-
fetchState: state.invoicingInvoiceListState.fetchState,
|
|
4
|
-
error: state.invoicingInvoiceListState.error,
|
|
5
|
-
});
|
|
6
|
-
export const getInvoiceListItems = (state) => getInvoicesByIds(state, state.invoicingInvoiceListState.invoiceIds);
|
|
7
|
-
export const getInvoiceListNextCursor = (state) => state.invoicingInvoiceListState.nextCursor;
|
|
8
|
-
export const getInvoiceListHasMore = (state) => state.invoicingInvoiceListState.nextCursor != null;
|
|
9
|
-
export const getInvoiceListFilters = (state) => state.invoicingInvoiceListState.filters;
|
|
10
|
-
export const getInvoiceCounts = (state) => state.invoicingInvoiceListState.counts;
|
|
11
|
-
export const getInvoiceKPIs = (state) => state.invoicingInvoiceListState.kpis;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { of } from 'rxjs';
|
|
2
|
-
import { catchError, filter, map, mergeMap } from 'rxjs/operators';
|
|
3
|
-
import { createZeniAPIStatus } from '../../../responsePayload';
|
|
4
|
-
import { invoicingBaseUrl } from '../invoicingApiHelper';
|
|
5
|
-
import { downloadInvoicePdf, downloadInvoicePdfFailure, downloadInvoicePdfSuccess, } from './invoicePdfReducer';
|
|
6
|
-
/**
|
|
7
|
-
* Turn the auth-fetched PDF bytes into a browser download. The invoicing PDF
|
|
8
|
-
* endpoint requires the zeni-* auth headers, so the blob must be fetched via
|
|
9
|
-
* ZeniAPI (a plain <a href>/<iframe> cannot attach them) and then handed to the
|
|
10
|
-
* browser as an object URL.
|
|
11
|
-
*/
|
|
12
|
-
const triggerBrowserDownload = (data, fileName) => {
|
|
13
|
-
if (typeof document === 'undefined' || typeof URL === 'undefined') {
|
|
14
|
-
return;
|
|
15
|
-
}
|
|
16
|
-
const blob = new Blob([data], { type: 'application/pdf' });
|
|
17
|
-
const objectUrl = URL.createObjectURL(blob);
|
|
18
|
-
const anchor = document.createElement('a');
|
|
19
|
-
anchor.href = objectUrl;
|
|
20
|
-
anchor.download = fileName;
|
|
21
|
-
document.body.appendChild(anchor);
|
|
22
|
-
anchor.click();
|
|
23
|
-
anchor.remove();
|
|
24
|
-
URL.revokeObjectURL(objectUrl);
|
|
25
|
-
};
|
|
26
|
-
export const downloadInvoicePdfEpic = (actions$, _state$, zeniAPI) => actions$.pipe(filter(downloadInvoicePdf.match), mergeMap((action) => {
|
|
27
|
-
const { fileName, invoiceId } = action.payload;
|
|
28
|
-
const apiUrl = `${invoicingBaseUrl(zeniAPI)}/invoices/${encodeURIComponent(invoiceId)}/pdf`;
|
|
29
|
-
return zeniAPI.getFile(apiUrl).pipe(map((data) => {
|
|
30
|
-
triggerBrowserDownload(data, fileName != null && fileName !== '' ? fileName : `${invoiceId}.pdf`);
|
|
31
|
-
return downloadInvoicePdfSuccess({ invoiceId });
|
|
32
|
-
}), catchError((error) => of(downloadInvoicePdfFailure({
|
|
33
|
-
error: createZeniAPIStatus('Unexpected Error', 'Invoice PDF download REST API call errored out ' +
|
|
34
|
-
JSON.stringify(error)),
|
|
35
|
-
invoiceId,
|
|
36
|
-
}))));
|
|
37
|
-
}));
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { createSlice } from '@reduxjs/toolkit';
|
|
2
|
-
export const initialState = {
|
|
3
|
-
byInvoiceId: {},
|
|
4
|
-
};
|
|
5
|
-
const invoicePdf = createSlice({
|
|
6
|
-
name: 'invoicingInvoicePdf',
|
|
7
|
-
initialState,
|
|
8
|
-
reducers: {
|
|
9
|
-
downloadInvoicePdf(draft, action) {
|
|
10
|
-
draft.byInvoiceId[action.payload.invoiceId] = {
|
|
11
|
-
fetchState: 'In-Progress',
|
|
12
|
-
error: undefined,
|
|
13
|
-
};
|
|
14
|
-
},
|
|
15
|
-
downloadInvoicePdfSuccess(draft, action) {
|
|
16
|
-
draft.byInvoiceId[action.payload.invoiceId] = {
|
|
17
|
-
fetchState: 'Completed',
|
|
18
|
-
error: undefined,
|
|
19
|
-
};
|
|
20
|
-
},
|
|
21
|
-
downloadInvoicePdfFailure(draft, action) {
|
|
22
|
-
draft.byInvoiceId[action.payload.invoiceId] = {
|
|
23
|
-
fetchState: 'Error',
|
|
24
|
-
error: action.payload.error,
|
|
25
|
-
};
|
|
26
|
-
},
|
|
27
|
-
clearAllInvoicingInvoicePdf(draft) {
|
|
28
|
-
draft.byInvoiceId = {};
|
|
29
|
-
},
|
|
30
|
-
},
|
|
31
|
-
});
|
|
32
|
-
export const { downloadInvoicePdf, downloadInvoicePdfSuccess, downloadInvoicePdfFailure, clearAllInvoicingInvoicePdf, } = invoicePdf.actions;
|
|
33
|
-
export default invoicePdf.reducer;
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
/** Default page size for invoicing list / infinite-scroll requests. */
|
|
2
|
-
export const INVOICING_LIST_PAGE_SIZE = 50;
|
|
3
|
-
/**
|
|
4
|
-
* Hardcoded fallback for the Invoicing microservice root.
|
|
5
|
-
*
|
|
6
|
-
* The proper wiring routes the URL through `zeni-web-app-v2`'s
|
|
7
|
-
* `createAPIEndPoints` into `apiEndPoints.invoicingMicroServiceBaseUrl`. That
|
|
8
|
-
* value only reaches the running app once app-v2 is beta-published, which is a
|
|
9
|
-
* heavier step than `pnpm build-beta-and-copy` of CES + web-components. Until
|
|
10
|
-
* then we hardcode the dev service URL here so the module is runnable after a
|
|
11
|
-
* CES/web-components build alone. Once app-v2 ships the endpoint, the configured
|
|
12
|
-
* value below takes precedence automatically and this fallback is unused.
|
|
13
|
-
*/
|
|
14
|
-
const INVOICING_SERVICE_FALLBACK_URL = 'https://dev.api.zeni.ai/agents/invoicing-service';
|
|
15
|
-
/**
|
|
16
|
-
* Base URL for the Invoicing microservice, keeping the platform-standard
|
|
17
|
-
* `/1.0/*` path prefix. All invoicing epics route through here so auth headers
|
|
18
|
-
* (zeni-user-id / session-id / tenant-id) are attached centrally by the client.
|
|
19
|
-
*/
|
|
20
|
-
export const invoicingBaseUrl = (zeniAPI) => {
|
|
21
|
-
const configured = zeniAPI.apiEndPoints.invoicingMicroServiceBaseUrl;
|
|
22
|
-
const root = configured != null && configured.length > 0
|
|
23
|
-
? configured
|
|
24
|
-
: INVOICING_SERVICE_FALLBACK_URL;
|
|
25
|
-
return `${root}/1.0`;
|
|
26
|
-
};
|
|
27
|
-
/** Append a query string (with leading `?`) when params are present. */
|
|
28
|
-
export const withQuery = (path, params) => {
|
|
29
|
-
const qs = params.toString();
|
|
30
|
-
return qs.length > 0 ? `${path}?${qs}` : path;
|
|
31
|
-
};
|
|
32
|
-
/** Attach `sort_field`/`sort_dir` to a list query when a sort is active. */
|
|
33
|
-
export const applyListSortParams = (params, sort) => {
|
|
34
|
-
if (sort != null && sort.field !== '') {
|
|
35
|
-
params.set('sort_field', sort.field);
|
|
36
|
-
params.set('sort_dir', sort.dir);
|
|
37
|
-
}
|
|
38
|
-
};
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { of } from 'rxjs';
|
|
2
|
-
import { catchError, filter, mergeMap } from 'rxjs/operators';
|
|
3
|
-
import { updateInvoicingTransactions } from '../../../entity/invoicing/transaction/transactionReducer';
|
|
4
|
-
import { createZeniAPIStatus, isSuccessResponse, } from '../../../responsePayload';
|
|
5
|
-
import { invoicingBaseUrl } from '../invoicingApiHelper';
|
|
6
|
-
import { runInvoicingPaymentAction, runInvoicingPaymentActionFailure, runInvoicingPaymentActionSuccess, } from './paymentActionReducer';
|
|
7
|
-
export const runInvoicingPaymentActionEpic = (actions$, _state$, zeniAPI) => actions$.pipe(filter(runInvoicingPaymentAction.match), mergeMap((action) => {
|
|
8
|
-
const { action: kind, body, id } = action.payload;
|
|
9
|
-
const apiUrl = `${invoicingBaseUrl(zeniAPI)}/payments/${encodeURIComponent(id)}/${kind}`;
|
|
10
|
-
return zeniAPI
|
|
11
|
-
.postAndGetJSON(apiUrl, body ?? {})
|
|
12
|
-
.pipe(mergeMap((response) => {
|
|
13
|
-
if (isSuccessResponse(response) && response.data != null) {
|
|
14
|
-
return [
|
|
15
|
-
updateInvoicingTransactions([response.data], 'merge'),
|
|
16
|
-
runInvoicingPaymentActionSuccess({ id }),
|
|
17
|
-
];
|
|
18
|
-
}
|
|
19
|
-
return of(runInvoicingPaymentActionFailure({
|
|
20
|
-
error: response.status,
|
|
21
|
-
id,
|
|
22
|
-
}));
|
|
23
|
-
}), catchError((error) => of(runInvoicingPaymentActionFailure({
|
|
24
|
-
error: createZeniAPIStatus('Unexpected Error', 'Payment action REST API call errored out ' +
|
|
25
|
-
JSON.stringify(error)),
|
|
26
|
-
id,
|
|
27
|
-
}))));
|
|
28
|
-
}));
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { createSlice } from '@reduxjs/toolkit';
|
|
2
|
-
export const initialState = {
|
|
3
|
-
byId: {},
|
|
4
|
-
};
|
|
5
|
-
const paymentAction = createSlice({
|
|
6
|
-
name: 'invoicingPaymentAction',
|
|
7
|
-
initialState,
|
|
8
|
-
reducers: {
|
|
9
|
-
runInvoicingPaymentAction(draft, action) {
|
|
10
|
-
draft.byId[action.payload.id] = {
|
|
11
|
-
fetchState: 'In-Progress',
|
|
12
|
-
error: undefined,
|
|
13
|
-
};
|
|
14
|
-
},
|
|
15
|
-
runInvoicingPaymentActionSuccess(draft, action) {
|
|
16
|
-
draft.byId[action.payload.id] = {
|
|
17
|
-
fetchState: 'Completed',
|
|
18
|
-
error: undefined,
|
|
19
|
-
};
|
|
20
|
-
},
|
|
21
|
-
runInvoicingPaymentActionFailure(draft, action) {
|
|
22
|
-
draft.byId[action.payload.id] = {
|
|
23
|
-
fetchState: 'Error',
|
|
24
|
-
error: action.payload.error,
|
|
25
|
-
};
|
|
26
|
-
},
|
|
27
|
-
clearInvoicingPaymentAction(draft, action) {
|
|
28
|
-
delete draft.byId[action.payload];
|
|
29
|
-
},
|
|
30
|
-
clearAllInvoicingPaymentActions(draft) {
|
|
31
|
-
draft.byId = {};
|
|
32
|
-
},
|
|
33
|
-
},
|
|
34
|
-
});
|
|
35
|
-
export const { runInvoicingPaymentAction, runInvoicingPaymentActionSuccess, runInvoicingPaymentActionFailure, clearInvoicingPaymentAction, clearAllInvoicingPaymentActions, } = paymentAction.actions;
|
|
36
|
-
export default paymentAction.reducer;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { of } from 'rxjs';
|
|
2
|
-
import { catchError, filter, mergeMap } from 'rxjs/operators';
|
|
3
|
-
import { updateInvoicingTransactions } from '../../../entity/invoicing/transaction/transactionReducer';
|
|
4
|
-
import { createZeniAPIStatus, isSuccessResponse, } from '../../../responsePayload';
|
|
5
|
-
import { invoicingBaseUrl } from '../invoicingApiHelper';
|
|
6
|
-
import { recordPayment, recordPaymentFailure, recordPaymentSuccess, } from './recordPaymentReducer';
|
|
7
|
-
export const recordPaymentEpic = (actions$, _state$, zeniAPI) => actions$.pipe(filter(recordPayment.match), mergeMap((action) => {
|
|
8
|
-
const apiUrl = `${invoicingBaseUrl(zeniAPI)}/payments`;
|
|
9
|
-
return zeniAPI
|
|
10
|
-
.postAndGetJSON(apiUrl, {
|
|
11
|
-
...action.payload,
|
|
12
|
-
})
|
|
13
|
-
.pipe(mergeMap((response) => {
|
|
14
|
-
if (isSuccessResponse(response) && response.data != null) {
|
|
15
|
-
return [
|
|
16
|
-
updateInvoicingTransactions([response.data], 'merge'),
|
|
17
|
-
recordPaymentSuccess({ transactionId: response.data.id }),
|
|
18
|
-
];
|
|
19
|
-
}
|
|
20
|
-
return of(recordPaymentFailure(response.status));
|
|
21
|
-
}), catchError((error) => of(recordPaymentFailure(createZeniAPIStatus('Unexpected Error', 'Record payment REST API call errored out ' +
|
|
22
|
-
JSON.stringify(error))))));
|
|
23
|
-
}));
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { createSlice } from '@reduxjs/toolkit';
|
|
2
|
-
export const initialState = {
|
|
3
|
-
fetchState: 'Not-Started',
|
|
4
|
-
error: undefined,
|
|
5
|
-
recordedTransactionId: undefined,
|
|
6
|
-
request: undefined,
|
|
7
|
-
hasValidState() {
|
|
8
|
-
return this.fetchState === 'Completed';
|
|
9
|
-
},
|
|
10
|
-
};
|
|
11
|
-
const recordPaymentSlice = createSlice({
|
|
12
|
-
name: 'invoicingRecordPayment',
|
|
13
|
-
initialState,
|
|
14
|
-
reducers: {
|
|
15
|
-
recordPayment(draft, action) {
|
|
16
|
-
draft.fetchState = 'In-Progress';
|
|
17
|
-
draft.error = undefined;
|
|
18
|
-
draft.recordedTransactionId = undefined;
|
|
19
|
-
draft.request = action.payload;
|
|
20
|
-
},
|
|
21
|
-
recordPaymentSuccess(draft, action) {
|
|
22
|
-
draft.fetchState = 'Completed';
|
|
23
|
-
draft.error = undefined;
|
|
24
|
-
draft.recordedTransactionId = action.payload.transactionId;
|
|
25
|
-
},
|
|
26
|
-
recordPaymentFailure(draft, action) {
|
|
27
|
-
draft.fetchState = 'Error';
|
|
28
|
-
draft.error = action.payload;
|
|
29
|
-
},
|
|
30
|
-
resetRecordPayment(draft) {
|
|
31
|
-
Object.assign(draft, initialState);
|
|
32
|
-
},
|
|
33
|
-
},
|
|
34
|
-
});
|
|
35
|
-
export const { recordPayment, recordPaymentSuccess, recordPaymentFailure, resetRecordPayment, } = recordPaymentSlice.actions;
|
|
36
|
-
export default recordPaymentSlice.reducer;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export const getRecordPaymentFetchState = (state) => ({
|
|
2
|
-
fetchState: state.invoicingRecordPaymentState.fetchState,
|
|
3
|
-
error: state.invoicingRecordPaymentState.error,
|
|
4
|
-
});
|
|
5
|
-
export const getRecordedTransactionId = (state) => state.invoicingRecordPaymentState.recordedTransactionId;
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { of } from 'rxjs';
|
|
2
|
-
import { catchError, filter, mergeMap } from 'rxjs/operators';
|
|
3
|
-
import { createZeniAPIStatus, isSuccessResponse, } from '../../../responsePayload';
|
|
4
|
-
import { invoicingBaseUrl } from '../invoicingApiHelper';
|
|
5
|
-
import { fetchInvoicingReport, updateInvoicingReport, updateInvoicingReportFailure, } from './reportsViewReducer';
|
|
6
|
-
const REPORT_PATHS = {
|
|
7
|
-
aging: '/reports/aging',
|
|
8
|
-
creditBalances: '/reports/credit-balances',
|
|
9
|
-
customerMovement: '/reports/customer-movement',
|
|
10
|
-
deferredRevenue: '/reports/deferred-revenue',
|
|
11
|
-
discounts: '/reports/discounts',
|
|
12
|
-
refunds: '/reports/refunds',
|
|
13
|
-
subscriptionCounts: '/reports/subscription-counts',
|
|
14
|
-
};
|
|
15
|
-
export const fetchInvoicingReportEpic = (actions$, _state$, zeniAPI) => actions$.pipe(filter(fetchInvoicingReport.match), mergeMap((action) => {
|
|
16
|
-
const key = action.payload;
|
|
17
|
-
const apiUrl = `${invoicingBaseUrl(zeniAPI)}${REPORT_PATHS[key]}`;
|
|
18
|
-
return zeniAPI.getJSON(apiUrl).pipe(mergeMap((response) => {
|
|
19
|
-
if (isSuccessResponse(response)) {
|
|
20
|
-
return of(updateInvoicingReport({ key, data: response.data ?? undefined }));
|
|
21
|
-
}
|
|
22
|
-
return of(updateInvoicingReportFailure({ key, error: response.status }));
|
|
23
|
-
}), catchError((error) => of(updateInvoicingReportFailure({
|
|
24
|
-
key,
|
|
25
|
-
error: createZeniAPIStatus('Unexpected Error', 'Fetch report REST API call errored out ' +
|
|
26
|
-
JSON.stringify(error)),
|
|
27
|
-
}))));
|
|
28
|
-
}));
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import { createSlice } from '@reduxjs/toolkit';
|
|
2
|
-
export const INVOICING_REPORT_KEYS = [
|
|
3
|
-
'aging',
|
|
4
|
-
'creditBalances',
|
|
5
|
-
'customerMovement',
|
|
6
|
-
'deferredRevenue',
|
|
7
|
-
'discounts',
|
|
8
|
-
'refunds',
|
|
9
|
-
'subscriptionCounts',
|
|
10
|
-
];
|
|
11
|
-
const emptySlot = () => ({
|
|
12
|
-
fetchState: 'Not-Started',
|
|
13
|
-
error: undefined,
|
|
14
|
-
data: undefined,
|
|
15
|
-
});
|
|
16
|
-
const buildInitialByKey = () => INVOICING_REPORT_KEYS.reduce((acc, key) => {
|
|
17
|
-
acc[key] = emptySlot();
|
|
18
|
-
return acc;
|
|
19
|
-
}, {});
|
|
20
|
-
export const initialState = {
|
|
21
|
-
byKey: buildInitialByKey(),
|
|
22
|
-
};
|
|
23
|
-
const reportsView = createSlice({
|
|
24
|
-
name: 'invoicingReportsView',
|
|
25
|
-
initialState,
|
|
26
|
-
reducers: {
|
|
27
|
-
fetchInvoicingReport(draft, action) {
|
|
28
|
-
draft.byKey[action.payload] = {
|
|
29
|
-
fetchState: 'In-Progress',
|
|
30
|
-
error: undefined,
|
|
31
|
-
data: draft.byKey[action.payload]?.data,
|
|
32
|
-
};
|
|
33
|
-
},
|
|
34
|
-
updateInvoicingReport(draft, action) {
|
|
35
|
-
draft.byKey[action.payload.key] = {
|
|
36
|
-
fetchState: 'Completed',
|
|
37
|
-
error: undefined,
|
|
38
|
-
data: action.payload.data,
|
|
39
|
-
};
|
|
40
|
-
},
|
|
41
|
-
updateInvoicingReportFailure(draft, action) {
|
|
42
|
-
draft.byKey[action.payload.key] = {
|
|
43
|
-
fetchState: 'Error',
|
|
44
|
-
error: action.payload.error,
|
|
45
|
-
data: draft.byKey[action.payload.key]?.data,
|
|
46
|
-
};
|
|
47
|
-
},
|
|
48
|
-
clearInvoicingReportsView(draft) {
|
|
49
|
-
draft.byKey = buildInitialByKey();
|
|
50
|
-
},
|
|
51
|
-
},
|
|
52
|
-
});
|
|
53
|
-
export const { fetchInvoicingReport, updateInvoicingReport, updateInvoicingReportFailure, clearInvoicingReportsView, } = reportsView.actions;
|
|
54
|
-
export default reportsView.reducer;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export const getInvoicingReportFetchState = (key) => (state) => {
|
|
2
|
-
const slot = state.invoicingReportsViewState.byKey[key];
|
|
3
|
-
return { fetchState: slot.fetchState, error: slot.error };
|
|
4
|
-
};
|
|
5
|
-
const reportData = (state, key) => state.invoicingReportsViewState.byKey[key].data;
|
|
6
|
-
export const getInvoicingAgingReport = (state) => reportData(state, 'aging');
|
|
7
|
-
export const getInvoicingCustomerMovementReport = (state) => reportData(state, 'customerMovement');
|
|
8
|
-
export const getInvoicingDeferredRevenueReport = (state) => reportData(state, 'deferredRevenue');
|
|
9
|
-
export const getInvoicingRefundsReport = (state) => reportData(state, 'refunds') ?? [];
|
|
10
|
-
export const getInvoicingDiscountsReport = (state) => reportData(state, 'discounts') ??
|
|
11
|
-
[];
|
|
12
|
-
export const getInvoicingCreditBalancesReport = (state) => reportData(state, 'creditBalances') ?? [];
|
|
13
|
-
export const getInvoicingSubscriptionCountsReport = (state) => reportData(state, 'subscriptionCounts');
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import { of } from 'rxjs';
|
|
2
|
-
import { catchError, filter, switchMap } from 'rxjs/operators';
|
|
3
|
-
import { createZeniAPIStatus, isSuccessResponse, } from '../../../responsePayload';
|
|
4
|
-
import { invoicingBaseUrl } from '../invoicingApiHelper';
|
|
5
|
-
import { connectInvoicingStripe, disconnectInvoicingStripe, fetchInvoicingSettings, invoicingStripeConnectionFailure, saveInvoicingSettings, saveInvoicingSettingsFailure, saveInvoicingSettingsSuccess, updateInvoicingSettings, updateInvoicingSettingsFailure, updateInvoicingStripeConnection, } from './settingsViewReducer';
|
|
6
|
-
export const fetchInvoicingSettingsEpic = (actions$, _state$, zeniAPI) => actions$.pipe(filter(fetchInvoicingSettings.match), switchMap(() => {
|
|
7
|
-
const apiUrl = `${invoicingBaseUrl(zeniAPI)}/settings`;
|
|
8
|
-
return zeniAPI.getJSON(apiUrl).pipe(switchMap((response) => {
|
|
9
|
-
if (isSuccessResponse(response) && response.data != null) {
|
|
10
|
-
return of(updateInvoicingSettings(response.data));
|
|
11
|
-
}
|
|
12
|
-
return of(updateInvoicingSettingsFailure(response.status));
|
|
13
|
-
}), catchError((error) => of(updateInvoicingSettingsFailure(createZeniAPIStatus('Unexpected Error', 'Fetch settings REST API call errored out ' +
|
|
14
|
-
JSON.stringify(error))))));
|
|
15
|
-
}));
|
|
16
|
-
export const connectInvoicingStripeEpic = (actions$, _state$, zeniAPI) => actions$.pipe(filter(connectInvoicingStripe.match), switchMap(() => {
|
|
17
|
-
const apiUrl = `${invoicingBaseUrl(zeniAPI)}/settings/stripe-connect/setup`;
|
|
18
|
-
return zeniAPI
|
|
19
|
-
.postAndGetJSON(apiUrl, {})
|
|
20
|
-
.pipe(switchMap((response) => {
|
|
21
|
-
if (isSuccessResponse(response) && response.data != null) {
|
|
22
|
-
return of(updateInvoicingStripeConnection(response.data.connected_account_id));
|
|
23
|
-
}
|
|
24
|
-
return of(invoicingStripeConnectionFailure(response.status));
|
|
25
|
-
}), catchError((error) => of(invoicingStripeConnectionFailure(createZeniAPIStatus('Unexpected Error', 'Stripe connect setup REST API call errored out ' +
|
|
26
|
-
JSON.stringify(error))))));
|
|
27
|
-
}));
|
|
28
|
-
export const disconnectInvoicingStripeEpic = (actions$, _state$, zeniAPI) => actions$.pipe(filter(disconnectInvoicingStripe.match), switchMap(() => {
|
|
29
|
-
const apiUrl = `${invoicingBaseUrl(zeniAPI)}/settings/stripe-connect/callback`;
|
|
30
|
-
return zeniAPI
|
|
31
|
-
.deleteAndGetJSON(apiUrl)
|
|
32
|
-
.pipe(switchMap((response) => {
|
|
33
|
-
if (isSuccessResponse(response)) {
|
|
34
|
-
return of(updateInvoicingStripeConnection(response.data?.connected_account_id ?? ''));
|
|
35
|
-
}
|
|
36
|
-
return of(invoicingStripeConnectionFailure(response.status));
|
|
37
|
-
}), catchError((error) => of(invoicingStripeConnectionFailure(createZeniAPIStatus('Unexpected Error', 'Stripe disconnect REST API call errored out ' +
|
|
38
|
-
JSON.stringify(error))))));
|
|
39
|
-
}));
|
|
40
|
-
export const saveInvoicingSettingsEpic = (actions$, _state$, zeniAPI) => actions$.pipe(filter(saveInvoicingSettings.match), switchMap((action) => {
|
|
41
|
-
const apiUrl = `${invoicingBaseUrl(zeniAPI)}/settings`;
|
|
42
|
-
return zeniAPI
|
|
43
|
-
.putAndGetJSON(apiUrl, {
|
|
44
|
-
...action.payload,
|
|
45
|
-
})
|
|
46
|
-
.pipe(switchMap((response) => {
|
|
47
|
-
if (isSuccessResponse(response) && response.data != null) {
|
|
48
|
-
return of(saveInvoicingSettingsSuccess(response.data));
|
|
49
|
-
}
|
|
50
|
-
return of(saveInvoicingSettingsFailure(response.status));
|
|
51
|
-
}), catchError((error) => of(saveInvoicingSettingsFailure(createZeniAPIStatus('Unexpected Error', 'Save settings REST API call errored out ' +
|
|
52
|
-
JSON.stringify(error))))));
|
|
53
|
-
}));
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import { createSlice } from '@reduxjs/toolkit';
|
|
2
|
-
export const initialState = {
|
|
3
|
-
fetchState: 'Not-Started',
|
|
4
|
-
error: undefined,
|
|
5
|
-
saveFetchState: { fetchState: 'Not-Started', error: undefined },
|
|
6
|
-
stripeFetchState: { fetchState: 'Not-Started', error: undefined },
|
|
7
|
-
settings: undefined,
|
|
8
|
-
hasValidState() {
|
|
9
|
-
return this.fetchState === 'Completed' && this.settings != null;
|
|
10
|
-
},
|
|
11
|
-
};
|
|
12
|
-
const settingsView = createSlice({
|
|
13
|
-
name: 'invoicingSettingsView',
|
|
14
|
-
initialState,
|
|
15
|
-
reducers: {
|
|
16
|
-
fetchInvoicingSettings(draft) {
|
|
17
|
-
draft.fetchState = 'In-Progress';
|
|
18
|
-
draft.error = undefined;
|
|
19
|
-
},
|
|
20
|
-
updateInvoicingSettings(draft, action) {
|
|
21
|
-
draft.settings = action.payload;
|
|
22
|
-
draft.fetchState = 'Completed';
|
|
23
|
-
draft.error = undefined;
|
|
24
|
-
},
|
|
25
|
-
updateInvoicingSettingsFailure(draft, action) {
|
|
26
|
-
draft.fetchState = 'Error';
|
|
27
|
-
draft.error = action.payload;
|
|
28
|
-
},
|
|
29
|
-
saveInvoicingSettings(draft, action) {
|
|
30
|
-
draft.saveFetchState = { fetchState: 'In-Progress', error: undefined };
|
|
31
|
-
if (draft.settings != null) {
|
|
32
|
-
draft.settings = { ...draft.settings, ...action.payload };
|
|
33
|
-
}
|
|
34
|
-
},
|
|
35
|
-
saveInvoicingSettingsSuccess(draft, action) {
|
|
36
|
-
draft.settings = action.payload;
|
|
37
|
-
draft.saveFetchState = { fetchState: 'Completed', error: undefined };
|
|
38
|
-
},
|
|
39
|
-
saveInvoicingSettingsFailure(draft, action) {
|
|
40
|
-
draft.saveFetchState = { fetchState: 'Error', error: action.payload };
|
|
41
|
-
},
|
|
42
|
-
resetSaveInvoicingSettings(draft) {
|
|
43
|
-
draft.saveFetchState = { fetchState: 'Not-Started', error: undefined };
|
|
44
|
-
},
|
|
45
|
-
connectInvoicingStripe(draft) {
|
|
46
|
-
draft.stripeFetchState = { fetchState: 'In-Progress', error: undefined };
|
|
47
|
-
},
|
|
48
|
-
disconnectInvoicingStripe(draft) {
|
|
49
|
-
draft.stripeFetchState = { fetchState: 'In-Progress', error: undefined };
|
|
50
|
-
},
|
|
51
|
-
updateInvoicingStripeConnection(draft, action) {
|
|
52
|
-
draft.stripeFetchState = { fetchState: 'Completed', error: undefined };
|
|
53
|
-
if (draft.settings != null) {
|
|
54
|
-
draft.settings = {
|
|
55
|
-
...draft.settings,
|
|
56
|
-
stripe_connected_account_id: action.payload,
|
|
57
|
-
};
|
|
58
|
-
}
|
|
59
|
-
},
|
|
60
|
-
invoicingStripeConnectionFailure(draft, action) {
|
|
61
|
-
draft.stripeFetchState = { fetchState: 'Error', error: action.payload };
|
|
62
|
-
},
|
|
63
|
-
clearInvoicingSettings(draft) {
|
|
64
|
-
Object.assign(draft, initialState);
|
|
65
|
-
},
|
|
66
|
-
},
|
|
67
|
-
});
|
|
68
|
-
export const { fetchInvoicingSettings, updateInvoicingSettings, updateInvoicingSettingsFailure, saveInvoicingSettings, saveInvoicingSettingsSuccess, saveInvoicingSettingsFailure, resetSaveInvoicingSettings, connectInvoicingStripe, disconnectInvoicingStripe, updateInvoicingStripeConnection, invoicingStripeConnectionFailure, clearInvoicingSettings, } = settingsView.actions;
|
|
69
|
-
export default settingsView.reducer;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export const getInvoicingSettings = (state) => state.invoicingSettingsViewState.settings;
|
|
2
|
-
export const getInvoicingSettingsFetchState = (state) => ({
|
|
3
|
-
fetchState: state.invoicingSettingsViewState.fetchState,
|
|
4
|
-
error: state.invoicingSettingsViewState.error,
|
|
5
|
-
});
|
|
6
|
-
export const getInvoicingSettingsSaveState = (state) => state.invoicingSettingsViewState.saveFetchState;
|
|
7
|
-
export const getInvoicingStripeConnectState = (state) => state.invoicingSettingsViewState.stripeFetchState;
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { of } from 'rxjs';
|
|
2
|
-
import { catchError, filter, mergeMap } from 'rxjs/operators';
|
|
3
|
-
import { updateInvoicingSubscriptions } from '../../../entity/invoicing/subscription/subscriptionReducer';
|
|
4
|
-
import { createZeniAPIStatus, isSuccessResponse, } from '../../../responsePayload';
|
|
5
|
-
import { invoicingBaseUrl } from '../invoicingApiHelper';
|
|
6
|
-
import { runInvoicingSubscriptionAction, runInvoicingSubscriptionActionFailure, runInvoicingSubscriptionActionSuccess, } from './subscriptionActionReducer';
|
|
7
|
-
export const runInvoicingSubscriptionActionEpic = (actions$, _state$, zeniAPI) => actions$.pipe(filter(runInvoicingSubscriptionAction.match), mergeMap((action) => {
|
|
8
|
-
const { action: kind, body, id } = action.payload;
|
|
9
|
-
const apiUrl = `${invoicingBaseUrl(zeniAPI)}/subscriptions/${encodeURIComponent(id)}/${kind}`;
|
|
10
|
-
return zeniAPI
|
|
11
|
-
.postAndGetJSON(apiUrl, body ?? {})
|
|
12
|
-
.pipe(mergeMap((response) => {
|
|
13
|
-
if (isSuccessResponse(response) && response.data != null) {
|
|
14
|
-
return [
|
|
15
|
-
updateInvoicingSubscriptions([response.data], 'merge'),
|
|
16
|
-
runInvoicingSubscriptionActionSuccess({ id }),
|
|
17
|
-
];
|
|
18
|
-
}
|
|
19
|
-
return of(runInvoicingSubscriptionActionFailure({
|
|
20
|
-
error: response.status,
|
|
21
|
-
id,
|
|
22
|
-
}));
|
|
23
|
-
}), catchError((error) => of(runInvoicingSubscriptionActionFailure({
|
|
24
|
-
error: createZeniAPIStatus('Unexpected Error', 'Subscription action REST API call errored out ' +
|
|
25
|
-
JSON.stringify(error)),
|
|
26
|
-
id,
|
|
27
|
-
}))));
|
|
28
|
-
}));
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { createSlice } from '@reduxjs/toolkit';
|
|
2
|
-
export const initialState = {
|
|
3
|
-
byId: {},
|
|
4
|
-
};
|
|
5
|
-
const subscriptionAction = createSlice({
|
|
6
|
-
name: 'invoicingSubscriptionAction',
|
|
7
|
-
initialState,
|
|
8
|
-
reducers: {
|
|
9
|
-
runInvoicingSubscriptionAction(draft, action) {
|
|
10
|
-
draft.byId[action.payload.id] = {
|
|
11
|
-
fetchState: 'In-Progress',
|
|
12
|
-
error: undefined,
|
|
13
|
-
};
|
|
14
|
-
},
|
|
15
|
-
runInvoicingSubscriptionActionSuccess(draft, action) {
|
|
16
|
-
draft.byId[action.payload.id] = {
|
|
17
|
-
fetchState: 'Completed',
|
|
18
|
-
error: undefined,
|
|
19
|
-
};
|
|
20
|
-
},
|
|
21
|
-
runInvoicingSubscriptionActionFailure(draft, action) {
|
|
22
|
-
draft.byId[action.payload.id] = {
|
|
23
|
-
fetchState: 'Error',
|
|
24
|
-
error: action.payload.error,
|
|
25
|
-
};
|
|
26
|
-
},
|
|
27
|
-
clearInvoicingSubscriptionAction(draft, action) {
|
|
28
|
-
delete draft.byId[action.payload];
|
|
29
|
-
},
|
|
30
|
-
clearAllInvoicingSubscriptionActions(draft) {
|
|
31
|
-
draft.byId = {};
|
|
32
|
-
},
|
|
33
|
-
},
|
|
34
|
-
});
|
|
35
|
-
export const { runInvoicingSubscriptionAction, runInvoicingSubscriptionActionSuccess, runInvoicingSubscriptionActionFailure, clearInvoicingSubscriptionAction, clearAllInvoicingSubscriptionActions, } = subscriptionAction.actions;
|
|
36
|
-
export default subscriptionAction.reducer;
|