@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,37 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var _a;
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.clearAllInvoicingInvoicePdf = exports.downloadInvoicePdfFailure = exports.downloadInvoicePdfSuccess = exports.downloadInvoicePdf = exports.initialState = void 0;
|
|
5
|
-
const toolkit_1 = require("@reduxjs/toolkit");
|
|
6
|
-
exports.initialState = {
|
|
7
|
-
byInvoiceId: {},
|
|
8
|
-
};
|
|
9
|
-
const invoicePdf = (0, toolkit_1.createSlice)({
|
|
10
|
-
name: 'invoicingInvoicePdf',
|
|
11
|
-
initialState: exports.initialState,
|
|
12
|
-
reducers: {
|
|
13
|
-
downloadInvoicePdf(draft, action) {
|
|
14
|
-
draft.byInvoiceId[action.payload.invoiceId] = {
|
|
15
|
-
fetchState: 'In-Progress',
|
|
16
|
-
error: undefined,
|
|
17
|
-
};
|
|
18
|
-
},
|
|
19
|
-
downloadInvoicePdfSuccess(draft, action) {
|
|
20
|
-
draft.byInvoiceId[action.payload.invoiceId] = {
|
|
21
|
-
fetchState: 'Completed',
|
|
22
|
-
error: undefined,
|
|
23
|
-
};
|
|
24
|
-
},
|
|
25
|
-
downloadInvoicePdfFailure(draft, action) {
|
|
26
|
-
draft.byInvoiceId[action.payload.invoiceId] = {
|
|
27
|
-
fetchState: 'Error',
|
|
28
|
-
error: action.payload.error,
|
|
29
|
-
};
|
|
30
|
-
},
|
|
31
|
-
clearAllInvoicingInvoicePdf(draft) {
|
|
32
|
-
draft.byInvoiceId = {};
|
|
33
|
-
},
|
|
34
|
-
},
|
|
35
|
-
});
|
|
36
|
-
_a = invoicePdf.actions, exports.downloadInvoicePdf = _a.downloadInvoicePdf, exports.downloadInvoicePdfSuccess = _a.downloadInvoicePdfSuccess, exports.downloadInvoicePdfFailure = _a.downloadInvoicePdfFailure, exports.clearAllInvoicingInvoicePdf = _a.clearAllInvoicingInvoicePdf;
|
|
37
|
-
exports.default = invoicePdf.reducer;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getInvoicingInvoicePdfState = void 0;
|
|
4
|
-
const NOT_STARTED = {
|
|
5
|
-
fetchState: 'Not-Started',
|
|
6
|
-
error: undefined,
|
|
7
|
-
};
|
|
8
|
-
const getInvoicingInvoicePdfState = (invoiceId) => (state) => state.invoicingInvoicePdfState.byInvoiceId[invoiceId] ?? NOT_STARTED;
|
|
9
|
-
exports.getInvoicingInvoicePdfState = getInvoicingInvoicePdfState;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { ZeniAPI } from '../../zeniAPI';
|
|
2
|
-
/** Default page size for invoicing list / infinite-scroll requests. */
|
|
3
|
-
export declare const INVOICING_LIST_PAGE_SIZE = 50;
|
|
4
|
-
/**
|
|
5
|
-
* Base URL for the Invoicing microservice, keeping the platform-standard
|
|
6
|
-
* `/1.0/*` path prefix. All invoicing epics route through here so auth headers
|
|
7
|
-
* (zeni-user-id / session-id / tenant-id) are attached centrally by the client.
|
|
8
|
-
*/
|
|
9
|
-
export declare const invoicingBaseUrl: (zeniAPI: ZeniAPI) => string;
|
|
10
|
-
/** Append a query string (with leading `?`) when params are present. */
|
|
11
|
-
export declare const withQuery: (path: string, params: URLSearchParams) => string;
|
|
12
|
-
/**
|
|
13
|
-
* Server-side sort descriptor shared by all invoicing list views. `field` is the
|
|
14
|
-
* backend sort key (validated against a per-entity whitelist); `dir` mirrors the
|
|
15
|
-
* DataListTable sort direction.
|
|
16
|
-
*/
|
|
17
|
-
export interface InvoicingListSort {
|
|
18
|
-
dir: 'asc' | 'desc';
|
|
19
|
-
field: string;
|
|
20
|
-
}
|
|
21
|
-
/** Attach `sort_field`/`sort_dir` to a list query when a sort is active. */
|
|
22
|
-
export declare const applyListSortParams: (params: URLSearchParams, sort?: InvoicingListSort) => void;
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.applyListSortParams = exports.withQuery = exports.invoicingBaseUrl = exports.INVOICING_LIST_PAGE_SIZE = void 0;
|
|
4
|
-
/** Default page size for invoicing list / infinite-scroll requests. */
|
|
5
|
-
exports.INVOICING_LIST_PAGE_SIZE = 50;
|
|
6
|
-
/**
|
|
7
|
-
* Hardcoded fallback for the Invoicing microservice root.
|
|
8
|
-
*
|
|
9
|
-
* The proper wiring routes the URL through `zeni-web-app-v2`'s
|
|
10
|
-
* `createAPIEndPoints` into `apiEndPoints.invoicingMicroServiceBaseUrl`. That
|
|
11
|
-
* value only reaches the running app once app-v2 is beta-published, which is a
|
|
12
|
-
* heavier step than `pnpm build-beta-and-copy` of CES + web-components. Until
|
|
13
|
-
* then we hardcode the dev service URL here so the module is runnable after a
|
|
14
|
-
* CES/web-components build alone. Once app-v2 ships the endpoint, the configured
|
|
15
|
-
* value below takes precedence automatically and this fallback is unused.
|
|
16
|
-
*/
|
|
17
|
-
const INVOICING_SERVICE_FALLBACK_URL = 'https://dev.api.zeni.ai/agents/invoicing-service';
|
|
18
|
-
/**
|
|
19
|
-
* Base URL for the Invoicing microservice, keeping the platform-standard
|
|
20
|
-
* `/1.0/*` path prefix. All invoicing epics route through here so auth headers
|
|
21
|
-
* (zeni-user-id / session-id / tenant-id) are attached centrally by the client.
|
|
22
|
-
*/
|
|
23
|
-
const invoicingBaseUrl = (zeniAPI) => {
|
|
24
|
-
const configured = zeniAPI.apiEndPoints.invoicingMicroServiceBaseUrl;
|
|
25
|
-
const root = configured != null && configured.length > 0
|
|
26
|
-
? configured
|
|
27
|
-
: INVOICING_SERVICE_FALLBACK_URL;
|
|
28
|
-
return `${root}/1.0`;
|
|
29
|
-
};
|
|
30
|
-
exports.invoicingBaseUrl = invoicingBaseUrl;
|
|
31
|
-
/** Append a query string (with leading `?`) when params are present. */
|
|
32
|
-
const withQuery = (path, params) => {
|
|
33
|
-
const qs = params.toString();
|
|
34
|
-
return qs.length > 0 ? `${path}?${qs}` : path;
|
|
35
|
-
};
|
|
36
|
-
exports.withQuery = withQuery;
|
|
37
|
-
/** Attach `sort_field`/`sort_dir` to a list query when a sort is active. */
|
|
38
|
-
const applyListSortParams = (params, sort) => {
|
|
39
|
-
if (sort != null && sort.field !== '') {
|
|
40
|
-
params.set('sort_field', sort.field);
|
|
41
|
-
params.set('sort_dir', sort.dir);
|
|
42
|
-
}
|
|
43
|
-
};
|
|
44
|
-
exports.applyListSortParams = applyListSortParams;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { ActionsObservable, StateObservable } from 'redux-observable';
|
|
2
|
-
import { Observable } from 'rxjs';
|
|
3
|
-
import { updateInvoicingTransactions } from '../../../entity/invoicing/transaction/transactionReducer';
|
|
4
|
-
import { RootState } from '../../../reducer';
|
|
5
|
-
import { ZeniAPI } from '../../../zeniAPI';
|
|
6
|
-
import { runInvoicingPaymentAction, runInvoicingPaymentActionFailure, runInvoicingPaymentActionSuccess } from './paymentActionReducer';
|
|
7
|
-
export type ActionType = ReturnType<typeof runInvoicingPaymentAction> | ReturnType<typeof runInvoicingPaymentActionSuccess> | ReturnType<typeof runInvoicingPaymentActionFailure> | ReturnType<typeof updateInvoicingTransactions>;
|
|
8
|
-
export declare const runInvoicingPaymentActionEpic: (actions$: ActionsObservable<ActionType>, _state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.runInvoicingPaymentActionEpic = void 0;
|
|
4
|
-
const rxjs_1 = require("rxjs");
|
|
5
|
-
const operators_1 = require("rxjs/operators");
|
|
6
|
-
const transactionReducer_1 = require("../../../entity/invoicing/transaction/transactionReducer");
|
|
7
|
-
const responsePayload_1 = require("../../../responsePayload");
|
|
8
|
-
const invoicingApiHelper_1 = require("../invoicingApiHelper");
|
|
9
|
-
const paymentActionReducer_1 = require("./paymentActionReducer");
|
|
10
|
-
const runInvoicingPaymentActionEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(paymentActionReducer_1.runInvoicingPaymentAction.match), (0, operators_1.mergeMap)((action) => {
|
|
11
|
-
const { action: kind, body, id } = action.payload;
|
|
12
|
-
const apiUrl = `${(0, invoicingApiHelper_1.invoicingBaseUrl)(zeniAPI)}/payments/${encodeURIComponent(id)}/${kind}`;
|
|
13
|
-
return zeniAPI
|
|
14
|
-
.postAndGetJSON(apiUrl, body ?? {})
|
|
15
|
-
.pipe((0, operators_1.mergeMap)((response) => {
|
|
16
|
-
if ((0, responsePayload_1.isSuccessResponse)(response) && response.data != null) {
|
|
17
|
-
return [
|
|
18
|
-
(0, transactionReducer_1.updateInvoicingTransactions)([response.data], 'merge'),
|
|
19
|
-
(0, paymentActionReducer_1.runInvoicingPaymentActionSuccess)({ id }),
|
|
20
|
-
];
|
|
21
|
-
}
|
|
22
|
-
return (0, rxjs_1.of)((0, paymentActionReducer_1.runInvoicingPaymentActionFailure)({
|
|
23
|
-
error: response.status,
|
|
24
|
-
id,
|
|
25
|
-
}));
|
|
26
|
-
}), (0, operators_1.catchError)((error) => (0, rxjs_1.of)((0, paymentActionReducer_1.runInvoicingPaymentActionFailure)({
|
|
27
|
-
error: (0, responsePayload_1.createZeniAPIStatus)('Unexpected Error', 'Payment action REST API call errored out ' +
|
|
28
|
-
JSON.stringify(error)),
|
|
29
|
-
id,
|
|
30
|
-
}))));
|
|
31
|
-
}));
|
|
32
|
-
exports.runInvoicingPaymentActionEpic = runInvoicingPaymentActionEpic;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { FetchStateAndError, ID } from '../../../commonStateTypes/common';
|
|
2
|
-
import { ZeniAPIStatus } from '../../../responsePayload';
|
|
3
|
-
export interface RunInvoicingPaymentActionPayload {
|
|
4
|
-
action: string;
|
|
5
|
-
id: ID;
|
|
6
|
-
/** Optional JSON body for actions that take parameters. */
|
|
7
|
-
body?: Record<string, unknown>;
|
|
8
|
-
}
|
|
9
|
-
/** Per-payment action fetch state keyed by payment id. */
|
|
10
|
-
export interface InvoicingPaymentActionState {
|
|
11
|
-
byId: Record<ID, FetchStateAndError>;
|
|
12
|
-
}
|
|
13
|
-
export declare const initialState: InvoicingPaymentActionState;
|
|
14
|
-
export declare const runInvoicingPaymentAction: import("@reduxjs/toolkit").ActionCreatorWithPayload<RunInvoicingPaymentActionPayload, "invoicingPaymentAction/runInvoicingPaymentAction">, runInvoicingPaymentActionSuccess: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
15
|
-
id: ID;
|
|
16
|
-
}, "invoicingPaymentAction/runInvoicingPaymentActionSuccess">, runInvoicingPaymentActionFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
17
|
-
error: ZeniAPIStatus;
|
|
18
|
-
id: ID;
|
|
19
|
-
}, "invoicingPaymentAction/runInvoicingPaymentActionFailure">, clearInvoicingPaymentAction: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "invoicingPaymentAction/clearInvoicingPaymentAction">, clearAllInvoicingPaymentActions: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"invoicingPaymentAction/clearAllInvoicingPaymentActions">;
|
|
20
|
-
declare const _default: import("redux").Reducer<InvoicingPaymentActionState>;
|
|
21
|
-
export default _default;
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var _a;
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.clearAllInvoicingPaymentActions = exports.clearInvoicingPaymentAction = exports.runInvoicingPaymentActionFailure = exports.runInvoicingPaymentActionSuccess = exports.runInvoicingPaymentAction = exports.initialState = void 0;
|
|
5
|
-
const toolkit_1 = require("@reduxjs/toolkit");
|
|
6
|
-
exports.initialState = {
|
|
7
|
-
byId: {},
|
|
8
|
-
};
|
|
9
|
-
const paymentAction = (0, toolkit_1.createSlice)({
|
|
10
|
-
name: 'invoicingPaymentAction',
|
|
11
|
-
initialState: exports.initialState,
|
|
12
|
-
reducers: {
|
|
13
|
-
runInvoicingPaymentAction(draft, action) {
|
|
14
|
-
draft.byId[action.payload.id] = {
|
|
15
|
-
fetchState: 'In-Progress',
|
|
16
|
-
error: undefined,
|
|
17
|
-
};
|
|
18
|
-
},
|
|
19
|
-
runInvoicingPaymentActionSuccess(draft, action) {
|
|
20
|
-
draft.byId[action.payload.id] = {
|
|
21
|
-
fetchState: 'Completed',
|
|
22
|
-
error: undefined,
|
|
23
|
-
};
|
|
24
|
-
},
|
|
25
|
-
runInvoicingPaymentActionFailure(draft, action) {
|
|
26
|
-
draft.byId[action.payload.id] = {
|
|
27
|
-
fetchState: 'Error',
|
|
28
|
-
error: action.payload.error,
|
|
29
|
-
};
|
|
30
|
-
},
|
|
31
|
-
clearInvoicingPaymentAction(draft, action) {
|
|
32
|
-
delete draft.byId[action.payload];
|
|
33
|
-
},
|
|
34
|
-
clearAllInvoicingPaymentActions(draft) {
|
|
35
|
-
draft.byId = {};
|
|
36
|
-
},
|
|
37
|
-
},
|
|
38
|
-
});
|
|
39
|
-
_a = paymentAction.actions, exports.runInvoicingPaymentAction = _a.runInvoicingPaymentAction, exports.runInvoicingPaymentActionSuccess = _a.runInvoicingPaymentActionSuccess, exports.runInvoicingPaymentActionFailure = _a.runInvoicingPaymentActionFailure, exports.clearInvoicingPaymentAction = _a.clearInvoicingPaymentAction, exports.clearAllInvoicingPaymentActions = _a.clearAllInvoicingPaymentActions;
|
|
40
|
-
exports.default = paymentAction.reducer;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getInvoicingPaymentActionState = void 0;
|
|
4
|
-
const NOT_STARTED = {
|
|
5
|
-
fetchState: 'Not-Started',
|
|
6
|
-
error: undefined,
|
|
7
|
-
};
|
|
8
|
-
const getInvoicingPaymentActionState = (id) => (state) => state.invoicingPaymentActionState.byId[id] ?? NOT_STARTED;
|
|
9
|
-
exports.getInvoicingPaymentActionState = getInvoicingPaymentActionState;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { ActionsObservable, StateObservable } from 'redux-observable';
|
|
2
|
-
import { Observable } from 'rxjs';
|
|
3
|
-
import { updateInvoicingTransactions } from '../../../entity/invoicing/transaction/transactionReducer';
|
|
4
|
-
import { RootState } from '../../../reducer';
|
|
5
|
-
import { ZeniAPI } from '../../../zeniAPI';
|
|
6
|
-
import { recordPayment, recordPaymentFailure, recordPaymentSuccess } from './recordPaymentReducer';
|
|
7
|
-
export type ActionType = ReturnType<typeof recordPayment> | ReturnType<typeof recordPaymentSuccess> | ReturnType<typeof recordPaymentFailure> | ReturnType<typeof updateInvoicingTransactions>;
|
|
8
|
-
export declare const recordPaymentEpic: (actions$: ActionsObservable<ActionType>, _state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.recordPaymentEpic = void 0;
|
|
4
|
-
const rxjs_1 = require("rxjs");
|
|
5
|
-
const operators_1 = require("rxjs/operators");
|
|
6
|
-
const transactionReducer_1 = require("../../../entity/invoicing/transaction/transactionReducer");
|
|
7
|
-
const responsePayload_1 = require("../../../responsePayload");
|
|
8
|
-
const invoicingApiHelper_1 = require("../invoicingApiHelper");
|
|
9
|
-
const recordPaymentReducer_1 = require("./recordPaymentReducer");
|
|
10
|
-
const recordPaymentEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(recordPaymentReducer_1.recordPayment.match), (0, operators_1.mergeMap)((action) => {
|
|
11
|
-
const apiUrl = `${(0, invoicingApiHelper_1.invoicingBaseUrl)(zeniAPI)}/payments`;
|
|
12
|
-
return zeniAPI
|
|
13
|
-
.postAndGetJSON(apiUrl, {
|
|
14
|
-
...action.payload,
|
|
15
|
-
})
|
|
16
|
-
.pipe((0, operators_1.mergeMap)((response) => {
|
|
17
|
-
if ((0, responsePayload_1.isSuccessResponse)(response) && response.data != null) {
|
|
18
|
-
return [
|
|
19
|
-
(0, transactionReducer_1.updateInvoicingTransactions)([response.data], 'merge'),
|
|
20
|
-
(0, recordPaymentReducer_1.recordPaymentSuccess)({ transactionId: response.data.id }),
|
|
21
|
-
];
|
|
22
|
-
}
|
|
23
|
-
return (0, rxjs_1.of)((0, recordPaymentReducer_1.recordPaymentFailure)(response.status));
|
|
24
|
-
}), (0, operators_1.catchError)((error) => (0, rxjs_1.of)((0, recordPaymentReducer_1.recordPaymentFailure)((0, responsePayload_1.createZeniAPIStatus)('Unexpected Error', 'Record payment REST API call errored out ' +
|
|
25
|
-
JSON.stringify(error))))));
|
|
26
|
-
}));
|
|
27
|
-
exports.recordPaymentEpic = recordPaymentEpic;
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { FetchedState, ID } from '../../../commonStateTypes/common';
|
|
2
|
-
import { ZeniAPIStatus } from '../../../responsePayload';
|
|
3
|
-
/** Invoice reference linked to a recorded payment (amounts in minor units). */
|
|
4
|
-
export interface RecordPaymentLinkedInvoice {
|
|
5
|
-
applied_amount: number;
|
|
6
|
-
invoice_id: string;
|
|
7
|
-
}
|
|
8
|
-
/** Request body for recording a manual payment; mirrors the Invoicing backend. */
|
|
9
|
-
export interface RecordPaymentRequest {
|
|
10
|
-
amount: number;
|
|
11
|
-
customer_id: string;
|
|
12
|
-
payment_method: string;
|
|
13
|
-
currency_code?: string;
|
|
14
|
-
date?: string;
|
|
15
|
-
gateway?: string;
|
|
16
|
-
id_at_gateway?: string;
|
|
17
|
-
linked_invoices?: RecordPaymentLinkedInvoice[];
|
|
18
|
-
notes?: string;
|
|
19
|
-
reference_number?: string;
|
|
20
|
-
status?: string;
|
|
21
|
-
type?: string;
|
|
22
|
-
}
|
|
23
|
-
export interface RecordPaymentState extends FetchedState {
|
|
24
|
-
recordedTransactionId?: ID;
|
|
25
|
-
request?: RecordPaymentRequest;
|
|
26
|
-
}
|
|
27
|
-
export declare const initialState: RecordPaymentState;
|
|
28
|
-
export declare const recordPayment: import("@reduxjs/toolkit").ActionCreatorWithPayload<RecordPaymentRequest, "invoicingRecordPayment/recordPayment">, recordPaymentSuccess: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
29
|
-
transactionId: ID;
|
|
30
|
-
}, "invoicingRecordPayment/recordPaymentSuccess">, recordPaymentFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<ZeniAPIStatus<Record<string, unknown>>, "invoicingRecordPayment/recordPaymentFailure">, resetRecordPayment: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"invoicingRecordPayment/resetRecordPayment">;
|
|
31
|
-
declare const _default: import("redux").Reducer<RecordPaymentState>;
|
|
32
|
-
export default _default;
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var _a;
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.resetRecordPayment = exports.recordPaymentFailure = exports.recordPaymentSuccess = exports.recordPayment = exports.initialState = void 0;
|
|
5
|
-
const toolkit_1 = require("@reduxjs/toolkit");
|
|
6
|
-
exports.initialState = {
|
|
7
|
-
fetchState: 'Not-Started',
|
|
8
|
-
error: undefined,
|
|
9
|
-
recordedTransactionId: undefined,
|
|
10
|
-
request: undefined,
|
|
11
|
-
hasValidState() {
|
|
12
|
-
return this.fetchState === 'Completed';
|
|
13
|
-
},
|
|
14
|
-
};
|
|
15
|
-
const recordPaymentSlice = (0, toolkit_1.createSlice)({
|
|
16
|
-
name: 'invoicingRecordPayment',
|
|
17
|
-
initialState: exports.initialState,
|
|
18
|
-
reducers: {
|
|
19
|
-
recordPayment(draft, action) {
|
|
20
|
-
draft.fetchState = 'In-Progress';
|
|
21
|
-
draft.error = undefined;
|
|
22
|
-
draft.recordedTransactionId = undefined;
|
|
23
|
-
draft.request = action.payload;
|
|
24
|
-
},
|
|
25
|
-
recordPaymentSuccess(draft, action) {
|
|
26
|
-
draft.fetchState = 'Completed';
|
|
27
|
-
draft.error = undefined;
|
|
28
|
-
draft.recordedTransactionId = action.payload.transactionId;
|
|
29
|
-
},
|
|
30
|
-
recordPaymentFailure(draft, action) {
|
|
31
|
-
draft.fetchState = 'Error';
|
|
32
|
-
draft.error = action.payload;
|
|
33
|
-
},
|
|
34
|
-
resetRecordPayment(draft) {
|
|
35
|
-
Object.assign(draft, exports.initialState);
|
|
36
|
-
},
|
|
37
|
-
},
|
|
38
|
-
});
|
|
39
|
-
_a = recordPaymentSlice.actions, exports.recordPayment = _a.recordPayment, exports.recordPaymentSuccess = _a.recordPaymentSuccess, exports.recordPaymentFailure = _a.recordPaymentFailure, exports.resetRecordPayment = _a.resetRecordPayment;
|
|
40
|
-
exports.default = recordPaymentSlice.reducer;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { FetchStateAndError, ID } from '../../../commonStateTypes/common';
|
|
2
|
-
import { RootState } from '../../../reducer';
|
|
3
|
-
export declare const getRecordPaymentFetchState: (state: RootState) => FetchStateAndError;
|
|
4
|
-
export declare const getRecordedTransactionId: (state: RootState) => ID | undefined;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getRecordedTransactionId = exports.getRecordPaymentFetchState = void 0;
|
|
4
|
-
const getRecordPaymentFetchState = (state) => ({
|
|
5
|
-
fetchState: state.invoicingRecordPaymentState.fetchState,
|
|
6
|
-
error: state.invoicingRecordPaymentState.error,
|
|
7
|
-
});
|
|
8
|
-
exports.getRecordPaymentFetchState = getRecordPaymentFetchState;
|
|
9
|
-
const getRecordedTransactionId = (state) => state.invoicingRecordPaymentState.recordedTransactionId;
|
|
10
|
-
exports.getRecordedTransactionId = getRecordedTransactionId;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { ActionsObservable, StateObservable } from 'redux-observable';
|
|
2
|
-
import { Observable } from 'rxjs';
|
|
3
|
-
import { RootState } from '../../../reducer';
|
|
4
|
-
import { ZeniAPI } from '../../../zeniAPI';
|
|
5
|
-
import { fetchInvoicingReport, updateInvoicingReport, updateInvoicingReportFailure } from './reportsViewReducer';
|
|
6
|
-
export type ActionType = ReturnType<typeof fetchInvoicingReport> | ReturnType<typeof updateInvoicingReport> | ReturnType<typeof updateInvoicingReportFailure>;
|
|
7
|
-
export declare const fetchInvoicingReportEpic: (actions$: ActionsObservable<ActionType>, _state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.fetchInvoicingReportEpic = void 0;
|
|
4
|
-
const rxjs_1 = require("rxjs");
|
|
5
|
-
const operators_1 = require("rxjs/operators");
|
|
6
|
-
const responsePayload_1 = require("../../../responsePayload");
|
|
7
|
-
const invoicingApiHelper_1 = require("../invoicingApiHelper");
|
|
8
|
-
const reportsViewReducer_1 = require("./reportsViewReducer");
|
|
9
|
-
const REPORT_PATHS = {
|
|
10
|
-
aging: '/reports/aging',
|
|
11
|
-
creditBalances: '/reports/credit-balances',
|
|
12
|
-
customerMovement: '/reports/customer-movement',
|
|
13
|
-
deferredRevenue: '/reports/deferred-revenue',
|
|
14
|
-
discounts: '/reports/discounts',
|
|
15
|
-
refunds: '/reports/refunds',
|
|
16
|
-
subscriptionCounts: '/reports/subscription-counts',
|
|
17
|
-
};
|
|
18
|
-
const fetchInvoicingReportEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(reportsViewReducer_1.fetchInvoicingReport.match), (0, operators_1.mergeMap)((action) => {
|
|
19
|
-
const key = action.payload;
|
|
20
|
-
const apiUrl = `${(0, invoicingApiHelper_1.invoicingBaseUrl)(zeniAPI)}${REPORT_PATHS[key]}`;
|
|
21
|
-
return zeniAPI.getJSON(apiUrl).pipe((0, operators_1.mergeMap)((response) => {
|
|
22
|
-
if ((0, responsePayload_1.isSuccessResponse)(response)) {
|
|
23
|
-
return (0, rxjs_1.of)((0, reportsViewReducer_1.updateInvoicingReport)({ key, data: response.data ?? undefined }));
|
|
24
|
-
}
|
|
25
|
-
return (0, rxjs_1.of)((0, reportsViewReducer_1.updateInvoicingReportFailure)({ key, error: response.status }));
|
|
26
|
-
}), (0, operators_1.catchError)((error) => (0, rxjs_1.of)((0, reportsViewReducer_1.updateInvoicingReportFailure)({
|
|
27
|
-
key,
|
|
28
|
-
error: (0, responsePayload_1.createZeniAPIStatus)('Unexpected Error', 'Fetch report REST API call errored out ' +
|
|
29
|
-
JSON.stringify(error)),
|
|
30
|
-
}))));
|
|
31
|
-
}));
|
|
32
|
-
exports.fetchInvoicingReportEpic = fetchInvoicingReportEpic;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { FetchStateAndError } from '../../../commonStateTypes/common';
|
|
2
|
-
import { ZeniAPIStatus } from '../../../responsePayload';
|
|
3
|
-
export type InvoicingReportKey = 'aging' | 'creditBalances' | 'customerMovement' | 'deferredRevenue' | 'discounts' | 'refunds' | 'subscriptionCounts';
|
|
4
|
-
export declare const INVOICING_REPORT_KEYS: InvoicingReportKey[];
|
|
5
|
-
export interface InvoicingReportSlot extends FetchStateAndError {
|
|
6
|
-
data?: unknown;
|
|
7
|
-
}
|
|
8
|
-
export interface InvoicingReportsViewState {
|
|
9
|
-
byKey: Record<InvoicingReportKey, InvoicingReportSlot>;
|
|
10
|
-
}
|
|
11
|
-
export declare const initialState: InvoicingReportsViewState;
|
|
12
|
-
export declare const fetchInvoicingReport: import("@reduxjs/toolkit").ActionCreatorWithPayload<InvoicingReportKey, "invoicingReportsView/fetchInvoicingReport">, updateInvoicingReport: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
13
|
-
data: unknown;
|
|
14
|
-
key: InvoicingReportKey;
|
|
15
|
-
}, "invoicingReportsView/updateInvoicingReport">, updateInvoicingReportFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
16
|
-
error: ZeniAPIStatus;
|
|
17
|
-
key: InvoicingReportKey;
|
|
18
|
-
}, "invoicingReportsView/updateInvoicingReportFailure">, clearInvoicingReportsView: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"invoicingReportsView/clearInvoicingReportsView">;
|
|
19
|
-
declare const _default: import("redux").Reducer<InvoicingReportsViewState>;
|
|
20
|
-
export default _default;
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var _a;
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.clearInvoicingReportsView = exports.updateInvoicingReportFailure = exports.updateInvoicingReport = exports.fetchInvoicingReport = exports.initialState = exports.INVOICING_REPORT_KEYS = void 0;
|
|
5
|
-
const toolkit_1 = require("@reduxjs/toolkit");
|
|
6
|
-
exports.INVOICING_REPORT_KEYS = [
|
|
7
|
-
'aging',
|
|
8
|
-
'creditBalances',
|
|
9
|
-
'customerMovement',
|
|
10
|
-
'deferredRevenue',
|
|
11
|
-
'discounts',
|
|
12
|
-
'refunds',
|
|
13
|
-
'subscriptionCounts',
|
|
14
|
-
];
|
|
15
|
-
const emptySlot = () => ({
|
|
16
|
-
fetchState: 'Not-Started',
|
|
17
|
-
error: undefined,
|
|
18
|
-
data: undefined,
|
|
19
|
-
});
|
|
20
|
-
const buildInitialByKey = () => exports.INVOICING_REPORT_KEYS.reduce((acc, key) => {
|
|
21
|
-
acc[key] = emptySlot();
|
|
22
|
-
return acc;
|
|
23
|
-
}, {});
|
|
24
|
-
exports.initialState = {
|
|
25
|
-
byKey: buildInitialByKey(),
|
|
26
|
-
};
|
|
27
|
-
const reportsView = (0, toolkit_1.createSlice)({
|
|
28
|
-
name: 'invoicingReportsView',
|
|
29
|
-
initialState: exports.initialState,
|
|
30
|
-
reducers: {
|
|
31
|
-
fetchInvoicingReport(draft, action) {
|
|
32
|
-
draft.byKey[action.payload] = {
|
|
33
|
-
fetchState: 'In-Progress',
|
|
34
|
-
error: undefined,
|
|
35
|
-
data: draft.byKey[action.payload]?.data,
|
|
36
|
-
};
|
|
37
|
-
},
|
|
38
|
-
updateInvoicingReport(draft, action) {
|
|
39
|
-
draft.byKey[action.payload.key] = {
|
|
40
|
-
fetchState: 'Completed',
|
|
41
|
-
error: undefined,
|
|
42
|
-
data: action.payload.data,
|
|
43
|
-
};
|
|
44
|
-
},
|
|
45
|
-
updateInvoicingReportFailure(draft, action) {
|
|
46
|
-
draft.byKey[action.payload.key] = {
|
|
47
|
-
fetchState: 'Error',
|
|
48
|
-
error: action.payload.error,
|
|
49
|
-
data: draft.byKey[action.payload.key]?.data,
|
|
50
|
-
};
|
|
51
|
-
},
|
|
52
|
-
clearInvoicingReportsView(draft) {
|
|
53
|
-
draft.byKey = buildInitialByKey();
|
|
54
|
-
},
|
|
55
|
-
},
|
|
56
|
-
});
|
|
57
|
-
_a = reportsView.actions, exports.fetchInvoicingReport = _a.fetchInvoicingReport, exports.updateInvoicingReport = _a.updateInvoicingReport, exports.updateInvoicingReportFailure = _a.updateInvoicingReportFailure, exports.clearInvoicingReportsView = _a.clearInvoicingReportsView;
|
|
58
|
-
exports.default = reportsView.reducer;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { FetchStateAndError } from '../../../commonStateTypes/common';
|
|
2
|
-
import { InvoicingAgingReport, InvoicingCustomerMovementReport, InvoicingDeferredRevenueReport } from '../../../entity/invoicing/invoicingTypes';
|
|
3
|
-
import { RootState } from '../../../reducer';
|
|
4
|
-
import { InvoicingReportKey } from './reportsViewReducer';
|
|
5
|
-
export declare const getInvoicingReportFetchState: (key: InvoicingReportKey) => (state: RootState) => FetchStateAndError;
|
|
6
|
-
export declare const getInvoicingAgingReport: (state: RootState) => InvoicingAgingReport | undefined;
|
|
7
|
-
export declare const getInvoicingCustomerMovementReport: (state: RootState) => InvoicingCustomerMovementReport | undefined;
|
|
8
|
-
export declare const getInvoicingDeferredRevenueReport: (state: RootState) => InvoicingDeferredRevenueReport | undefined;
|
|
9
|
-
export declare const getInvoicingRefundsReport: (state: RootState) => Record<string, unknown>[];
|
|
10
|
-
export declare const getInvoicingDiscountsReport: (state: RootState) => Record<string, unknown>[];
|
|
11
|
-
export declare const getInvoicingCreditBalancesReport: (state: RootState) => Record<string, unknown>[];
|
|
12
|
-
export declare const getInvoicingSubscriptionCountsReport: (state: RootState) => unknown;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getInvoicingSubscriptionCountsReport = exports.getInvoicingCreditBalancesReport = exports.getInvoicingDiscountsReport = exports.getInvoicingRefundsReport = exports.getInvoicingDeferredRevenueReport = exports.getInvoicingCustomerMovementReport = exports.getInvoicingAgingReport = exports.getInvoicingReportFetchState = void 0;
|
|
4
|
-
const getInvoicingReportFetchState = (key) => (state) => {
|
|
5
|
-
const slot = state.invoicingReportsViewState.byKey[key];
|
|
6
|
-
return { fetchState: slot.fetchState, error: slot.error };
|
|
7
|
-
};
|
|
8
|
-
exports.getInvoicingReportFetchState = getInvoicingReportFetchState;
|
|
9
|
-
const reportData = (state, key) => state.invoicingReportsViewState.byKey[key].data;
|
|
10
|
-
const getInvoicingAgingReport = (state) => reportData(state, 'aging');
|
|
11
|
-
exports.getInvoicingAgingReport = getInvoicingAgingReport;
|
|
12
|
-
const getInvoicingCustomerMovementReport = (state) => reportData(state, 'customerMovement');
|
|
13
|
-
exports.getInvoicingCustomerMovementReport = getInvoicingCustomerMovementReport;
|
|
14
|
-
const getInvoicingDeferredRevenueReport = (state) => reportData(state, 'deferredRevenue');
|
|
15
|
-
exports.getInvoicingDeferredRevenueReport = getInvoicingDeferredRevenueReport;
|
|
16
|
-
const getInvoicingRefundsReport = (state) => reportData(state, 'refunds') ?? [];
|
|
17
|
-
exports.getInvoicingRefundsReport = getInvoicingRefundsReport;
|
|
18
|
-
const getInvoicingDiscountsReport = (state) => reportData(state, 'discounts') ??
|
|
19
|
-
[];
|
|
20
|
-
exports.getInvoicingDiscountsReport = getInvoicingDiscountsReport;
|
|
21
|
-
const getInvoicingCreditBalancesReport = (state) => reportData(state, 'creditBalances') ?? [];
|
|
22
|
-
exports.getInvoicingCreditBalancesReport = getInvoicingCreditBalancesReport;
|
|
23
|
-
const getInvoicingSubscriptionCountsReport = (state) => reportData(state, 'subscriptionCounts');
|
|
24
|
-
exports.getInvoicingSubscriptionCountsReport = getInvoicingSubscriptionCountsReport;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { ActionsObservable, StateObservable } from 'redux-observable';
|
|
2
|
-
import { Observable } from 'rxjs';
|
|
3
|
-
import { RootState } from '../../../reducer';
|
|
4
|
-
import { ZeniAPI } from '../../../zeniAPI';
|
|
5
|
-
import { connectInvoicingStripe, disconnectInvoicingStripe, fetchInvoicingSettings, invoicingStripeConnectionFailure, saveInvoicingSettings, saveInvoicingSettingsFailure, saveInvoicingSettingsSuccess, updateInvoicingSettings, updateInvoicingSettingsFailure, updateInvoicingStripeConnection } from './settingsViewReducer';
|
|
6
|
-
export type ActionType = ReturnType<typeof fetchInvoicingSettings> | ReturnType<typeof updateInvoicingSettings> | ReturnType<typeof updateInvoicingSettingsFailure> | ReturnType<typeof saveInvoicingSettings> | ReturnType<typeof saveInvoicingSettingsSuccess> | ReturnType<typeof saveInvoicingSettingsFailure> | ReturnType<typeof connectInvoicingStripe> | ReturnType<typeof disconnectInvoicingStripe> | ReturnType<typeof updateInvoicingStripeConnection> | ReturnType<typeof invoicingStripeConnectionFailure>;
|
|
7
|
-
export declare const fetchInvoicingSettingsEpic: (actions$: ActionsObservable<ActionType>, _state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
|
|
8
|
-
export declare const connectInvoicingStripeEpic: (actions$: ActionsObservable<ActionType>, _state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
|
|
9
|
-
export declare const disconnectInvoicingStripeEpic: (actions$: ActionsObservable<ActionType>, _state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
|
|
10
|
-
export declare const saveInvoicingSettingsEpic: (actions$: ActionsObservable<ActionType>, _state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.saveInvoicingSettingsEpic = exports.disconnectInvoicingStripeEpic = exports.connectInvoicingStripeEpic = exports.fetchInvoicingSettingsEpic = void 0;
|
|
4
|
-
const rxjs_1 = require("rxjs");
|
|
5
|
-
const operators_1 = require("rxjs/operators");
|
|
6
|
-
const responsePayload_1 = require("../../../responsePayload");
|
|
7
|
-
const invoicingApiHelper_1 = require("../invoicingApiHelper");
|
|
8
|
-
const settingsViewReducer_1 = require("./settingsViewReducer");
|
|
9
|
-
const fetchInvoicingSettingsEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(settingsViewReducer_1.fetchInvoicingSettings.match), (0, operators_1.switchMap)(() => {
|
|
10
|
-
const apiUrl = `${(0, invoicingApiHelper_1.invoicingBaseUrl)(zeniAPI)}/settings`;
|
|
11
|
-
return zeniAPI.getJSON(apiUrl).pipe((0, operators_1.switchMap)((response) => {
|
|
12
|
-
if ((0, responsePayload_1.isSuccessResponse)(response) && response.data != null) {
|
|
13
|
-
return (0, rxjs_1.of)((0, settingsViewReducer_1.updateInvoicingSettings)(response.data));
|
|
14
|
-
}
|
|
15
|
-
return (0, rxjs_1.of)((0, settingsViewReducer_1.updateInvoicingSettingsFailure)(response.status));
|
|
16
|
-
}), (0, operators_1.catchError)((error) => (0, rxjs_1.of)((0, settingsViewReducer_1.updateInvoicingSettingsFailure)((0, responsePayload_1.createZeniAPIStatus)('Unexpected Error', 'Fetch settings REST API call errored out ' +
|
|
17
|
-
JSON.stringify(error))))));
|
|
18
|
-
}));
|
|
19
|
-
exports.fetchInvoicingSettingsEpic = fetchInvoicingSettingsEpic;
|
|
20
|
-
const connectInvoicingStripeEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(settingsViewReducer_1.connectInvoicingStripe.match), (0, operators_1.switchMap)(() => {
|
|
21
|
-
const apiUrl = `${(0, invoicingApiHelper_1.invoicingBaseUrl)(zeniAPI)}/settings/stripe-connect/setup`;
|
|
22
|
-
return zeniAPI
|
|
23
|
-
.postAndGetJSON(apiUrl, {})
|
|
24
|
-
.pipe((0, operators_1.switchMap)((response) => {
|
|
25
|
-
if ((0, responsePayload_1.isSuccessResponse)(response) && response.data != null) {
|
|
26
|
-
return (0, rxjs_1.of)((0, settingsViewReducer_1.updateInvoicingStripeConnection)(response.data.connected_account_id));
|
|
27
|
-
}
|
|
28
|
-
return (0, rxjs_1.of)((0, settingsViewReducer_1.invoicingStripeConnectionFailure)(response.status));
|
|
29
|
-
}), (0, operators_1.catchError)((error) => (0, rxjs_1.of)((0, settingsViewReducer_1.invoicingStripeConnectionFailure)((0, responsePayload_1.createZeniAPIStatus)('Unexpected Error', 'Stripe connect setup REST API call errored out ' +
|
|
30
|
-
JSON.stringify(error))))));
|
|
31
|
-
}));
|
|
32
|
-
exports.connectInvoicingStripeEpic = connectInvoicingStripeEpic;
|
|
33
|
-
const disconnectInvoicingStripeEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(settingsViewReducer_1.disconnectInvoicingStripe.match), (0, operators_1.switchMap)(() => {
|
|
34
|
-
const apiUrl = `${(0, invoicingApiHelper_1.invoicingBaseUrl)(zeniAPI)}/settings/stripe-connect/callback`;
|
|
35
|
-
return zeniAPI
|
|
36
|
-
.deleteAndGetJSON(apiUrl)
|
|
37
|
-
.pipe((0, operators_1.switchMap)((response) => {
|
|
38
|
-
if ((0, responsePayload_1.isSuccessResponse)(response)) {
|
|
39
|
-
return (0, rxjs_1.of)((0, settingsViewReducer_1.updateInvoicingStripeConnection)(response.data?.connected_account_id ?? ''));
|
|
40
|
-
}
|
|
41
|
-
return (0, rxjs_1.of)((0, settingsViewReducer_1.invoicingStripeConnectionFailure)(response.status));
|
|
42
|
-
}), (0, operators_1.catchError)((error) => (0, rxjs_1.of)((0, settingsViewReducer_1.invoicingStripeConnectionFailure)((0, responsePayload_1.createZeniAPIStatus)('Unexpected Error', 'Stripe disconnect REST API call errored out ' +
|
|
43
|
-
JSON.stringify(error))))));
|
|
44
|
-
}));
|
|
45
|
-
exports.disconnectInvoicingStripeEpic = disconnectInvoicingStripeEpic;
|
|
46
|
-
const saveInvoicingSettingsEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(settingsViewReducer_1.saveInvoicingSettings.match), (0, operators_1.switchMap)((action) => {
|
|
47
|
-
const apiUrl = `${(0, invoicingApiHelper_1.invoicingBaseUrl)(zeniAPI)}/settings`;
|
|
48
|
-
return zeniAPI
|
|
49
|
-
.putAndGetJSON(apiUrl, {
|
|
50
|
-
...action.payload,
|
|
51
|
-
})
|
|
52
|
-
.pipe((0, operators_1.switchMap)((response) => {
|
|
53
|
-
if ((0, responsePayload_1.isSuccessResponse)(response) && response.data != null) {
|
|
54
|
-
return (0, rxjs_1.of)((0, settingsViewReducer_1.saveInvoicingSettingsSuccess)(response.data));
|
|
55
|
-
}
|
|
56
|
-
return (0, rxjs_1.of)((0, settingsViewReducer_1.saveInvoicingSettingsFailure)(response.status));
|
|
57
|
-
}), (0, operators_1.catchError)((error) => (0, rxjs_1.of)((0, settingsViewReducer_1.saveInvoicingSettingsFailure)((0, responsePayload_1.createZeniAPIStatus)('Unexpected Error', 'Save settings REST API call errored out ' +
|
|
58
|
-
JSON.stringify(error))))));
|
|
59
|
-
}));
|
|
60
|
-
exports.saveInvoicingSettingsEpic = saveInvoicingSettingsEpic;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { FetchStateAndError, FetchedState } from '../../../commonStateTypes/common';
|
|
2
|
-
import { InvoicingSettings } from '../../../entity/invoicing/invoicingTypes';
|
|
3
|
-
import { ZeniAPIStatus } from '../../../responsePayload';
|
|
4
|
-
export interface InvoicingSettingsViewState extends FetchedState {
|
|
5
|
-
saveFetchState: FetchStateAndError;
|
|
6
|
-
stripeFetchState: FetchStateAndError;
|
|
7
|
-
settings?: InvoicingSettings;
|
|
8
|
-
}
|
|
9
|
-
export declare const initialState: InvoicingSettingsViewState;
|
|
10
|
-
export declare const fetchInvoicingSettings: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"invoicingSettingsView/fetchInvoicingSettings">, updateInvoicingSettings: import("@reduxjs/toolkit").ActionCreatorWithPayload<InvoicingSettings, "invoicingSettingsView/updateInvoicingSettings">, updateInvoicingSettingsFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<ZeniAPIStatus<Record<string, unknown>>, "invoicingSettingsView/updateInvoicingSettingsFailure">, saveInvoicingSettings: import("@reduxjs/toolkit").ActionCreatorWithPayload<Partial<InvoicingSettings>, "invoicingSettingsView/saveInvoicingSettings">, saveInvoicingSettingsSuccess: import("@reduxjs/toolkit").ActionCreatorWithPayload<InvoicingSettings, "invoicingSettingsView/saveInvoicingSettingsSuccess">, saveInvoicingSettingsFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<ZeniAPIStatus<Record<string, unknown>>, "invoicingSettingsView/saveInvoicingSettingsFailure">, resetSaveInvoicingSettings: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"invoicingSettingsView/resetSaveInvoicingSettings">, connectInvoicingStripe: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"invoicingSettingsView/connectInvoicingStripe">, disconnectInvoicingStripe: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"invoicingSettingsView/disconnectInvoicingStripe">, updateInvoicingStripeConnection: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "invoicingSettingsView/updateInvoicingStripeConnection">, invoicingStripeConnectionFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<ZeniAPIStatus<Record<string, unknown>>, "invoicingSettingsView/invoicingStripeConnectionFailure">, clearInvoicingSettings: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"invoicingSettingsView/clearInvoicingSettings">;
|
|
11
|
-
declare const _default: import("redux").Reducer<InvoicingSettingsViewState>;
|
|
12
|
-
export default _default;
|