@wisemen/wise-invoicing-web 0.1.0 → 0.2.0
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/dist/ApprovalReminderSettingsViewDataProvider-D-qXZrPT.js +151 -0
- package/dist/{BillingDocumentDetailViewDataProvider-BemnzVNY.js → BillingDocumentDetailViewDataProvider-DDdtlW-2.js} +1417 -1459
- package/dist/BillingDocumentDetailViewDataProvider.css +1 -1
- package/dist/{BillingDocumentPdf-5vi2pgRM.js → BillingDocumentPdf-ehdFB6mr.js} +4 -4
- package/dist/{CreditNoteDetailViewDataProvider-BuY9ELoK.js → CreditNoteDetailViewDataProvider-11a-JO3H.js} +201 -201
- package/dist/{CreditNotePdfViewDataProvider-DI4eQkpM.js → CreditNotePdfViewDataProvider-bfeaya3P.js} +3 -3
- package/dist/{CustomFieldValueText-BGbQwhON.js → CustomFieldValueText-CZQXGE5F.js} +81 -81
- package/dist/DataProvider-C3uEds9v.js +75 -0
- package/dist/{DunningCaseDetailViewDataProvider-DKuuysqS.js → DunningCaseDetailViewDataProvider-DC-ziMoO.js} +35 -35
- package/dist/{DunningCaseOverviewView-aWttPLrC.js → DunningCaseOverviewView-y_bCmi5j.js} +180 -180
- package/dist/{DunningCaseReminderPdfViewDataProvider-I0I_WQQB.js → DunningCaseReminderPdfViewDataProvider-DNODfED_.js} +22 -23
- package/dist/{DunningCaseSendDialog-DyvA5R1p.js → DunningCaseSendDialog-BPXcqit5.js} +82 -82
- package/dist/InvoiceApprovalOverviewView-DZ14mi4L.js +870 -0
- package/dist/InvoiceApprovalStatusBadge-U-dW2hR4.js +161 -0
- package/dist/InvoiceApproveDialog-2LXneG2r.js +308 -0
- package/dist/InvoiceDetailViewDataProvider-BYeaaQzL.js +2156 -0
- package/dist/InvoiceOverviewBulkSendApprovalDialog-99dfuN4i.js +318 -0
- package/dist/InvoiceOverviewViewDataProvider-CZIQeftL.js +1620 -0
- package/dist/{InvoicePdfView-C-7m2g3b.js → InvoicePdfView-BJRTg_TH.js} +2 -2
- package/dist/{InvoicePdfViewDataProvider-BPiK110e.js → InvoicePdfViewDataProvider-CwI_uGm3.js} +4 -4
- package/dist/InvoicePublicPdfViewDataProvider-uZUfsr5K.js +45 -0
- package/dist/InvoicingFileUploadProvider-D9Xk4rQM.js +94 -0
- package/dist/{IssuerSettingsViewDataProvider-COqHGUE6.js → IssuerSettingsViewDataProvider-CGRa8F-2.js} +4 -4
- package/dist/{ReminderSettingsViewDataProvider-Dys4bUU7.js → ReminderSettingsViewDataProvider-1ucp3z2T.js} +58 -58
- package/dist/{api.util-BCSgCfpS.js → api.util-C_kMGlJN.js} +1456 -846
- package/dist/{billingDocumentDetail.transformer-BBn9R_cx.js → billingDocumentDetail.transformer-Da6_-Hv9.js} +58 -59
- package/dist/client/index.d.ts +2 -2
- package/dist/client/sdk.gen.d.ts +18 -1
- package/dist/client/types.gen.d.ts +1059 -106
- package/dist/client/zod.gen.d.ts +32759 -16136
- package/dist/{creditNoteDetail.query-BcPsB96h.js → creditNoteDetail.query-DLR7L0Ep.js} +30 -30
- package/dist/{dist-BBjpqvUl.js → dist-CoztMdYH.js} +614 -614
- package/dist/{dist-D9lp7NDv.js → dist-Cxdm09Lp.js} +210 -98
- package/dist/{documentTitle.composable-4ApFl9TZ.js → documentTitle.composable-DsBbzhXN.js} +23 -15
- package/dist/{customFieldValue.util-BwsX8exl.js → download.util-B5Q7KUC9.js} +6 -6
- package/dist/{i18n.lib-C6eb-F-e.js → i18n.lib-Cvr8pcDw.js} +272 -8
- package/dist/index.d.ts +297 -31
- package/dist/index.js +344 -324
- package/dist/invoice.service-DEEA9mal.js +745 -0
- package/dist/invoiceApproval.service-DvL3LliM.js +72 -0
- package/dist/invoiceApprovalStatus.util-3Zh10Pj8.js +79 -0
- package/dist/invoiceDeliveryStatus.util-nCsqDypY.js +211 -0
- package/dist/{invoiceDetail.query-Cek8nyaw.js → invoiceDetail.query-CRoH_SgM.js} +1 -1
- package/dist/{invoicingConfig.composable-DTmad1fe.js → invoicingConfig.composable-rxjGK882.js} +2 -2
- package/dist/{issuerSettings.query-Bvz-Oj5D.js → issuerSettings.query-Dc5gsaEm.js} +5 -5
- package/dist/libs/i18n.lib.d.ts +270 -6
- package/dist/locales/en-US.json.d.ts +136 -4
- package/dist/locales/nl-BE.json.d.ts +136 -4
- package/dist/modules/dunning-case/models/dunningCase.transformer.d.ts +0 -1
- package/dist/modules/invoice/api/mutations/invoiceApproveApproval.mutation.d.ts +16 -0
- package/dist/modules/invoice/api/mutations/invoiceArchiveApproval.mutation.d.ts +6 -0
- package/dist/modules/invoice/api/mutations/invoiceBulkSendApproval.mutation.d.ts +5 -0
- package/dist/modules/invoice/api/mutations/invoiceMarkAsPriorApprovalRequired.mutation.d.ts +4 -0
- package/dist/modules/invoice/api/mutations/invoiceRejectApproval.mutation.d.ts +9 -0
- package/dist/modules/invoice/api/mutations/invoiceRestoreFromProForma.mutation.d.ts +4 -0
- package/dist/modules/invoice/api/mutations/invoiceSendApproval.mutation.d.ts +5 -0
- package/dist/modules/invoice/api/mutations/invoiceUnmarkAsPriorApprovalRequired.mutation.d.ts +4 -0
- package/dist/modules/invoice/api/services/invoice.service.d.ts +14 -1
- package/dist/modules/invoice/components/InvoiceApprovalOutOfSyncIndicator.vue.d.ts +3 -0
- package/dist/{ui/DisplayState.vue.d.ts → modules/invoice/components/InvoiceApprovalStatusBadge.vue.d.ts} +7 -10
- package/dist/modules/invoice/components/InvoiceApprovalStatusChip.vue.d.ts +16 -0
- package/dist/modules/invoice/models/invoice/approval/invoiceApprovalTransformers.spec.d.ts +1 -0
- package/dist/modules/invoice/models/invoice/approval/invoiceApprovalUuid.model.d.ts +3 -0
- package/dist/modules/invoice/models/invoice/approval/invoiceApprove.transformer.d.ts +5 -0
- package/dist/modules/invoice/models/invoice/approval/invoiceApproveForm.model.d.ts +13 -0
- package/dist/modules/invoice/models/invoice/approval/invoiceReject.transformer.d.ts +5 -0
- package/dist/modules/invoice/models/invoice/approval/invoiceRejectForm.model.d.ts +7 -0
- package/dist/modules/invoice/models/invoice/approval/invoiceRejectForm.model.spec.d.ts +1 -0
- package/dist/modules/invoice/models/invoice/detail/invoiceDetail.model.d.ts +13 -1
- package/dist/modules/invoice/models/invoice/detail/invoiceDetail.transformer.d.ts +1 -0
- package/dist/modules/invoice/models/invoice/index/invoiceIndex.model.d.ts +4 -0
- package/dist/modules/invoice/models/invoice/index/invoiceIndexQueryParams.model.d.ts +3 -0
- package/dist/modules/invoice/models/invoice/invoiceApproval.transformer.d.ts +7 -0
- package/dist/modules/invoice/models/invoice/invoiceApprovalStatus.model.d.ts +34 -0
- package/dist/modules/invoice/models/invoice/invoiceApprovalStatus.util.d.ts +10 -0
- package/dist/modules/invoice/models/invoice/invoiceApprovalStatus.util.spec.d.ts +1 -0
- package/dist/modules/invoice/use-cases/detail/components/InvoiceApprovalBanner.vue.d.ts +19 -0
- package/dist/modules/invoice/use-cases/detail/components/InvoiceDetailHeaderSection.vue.d.ts +4 -0
- package/dist/modules/invoice/use-cases/detail/composables/invoiceDetailHeaderActions.composable.d.ts +5 -0
- package/dist/modules/invoice/use-cases/detail/composables/invoiceDetailPaymentsTableColumns.composable.d.ts +1 -1
- package/dist/modules/invoice/use-cases/detail/dialogs/InvoiceApprovalArchiveDialog.vue.d.ts +13 -0
- package/dist/modules/invoice/use-cases/detail/dialogs/InvoiceApprovalRevertDialog.vue.d.ts +15 -0
- package/dist/modules/invoice/use-cases/detail/dialogs/InvoiceApproveDialog.vue.d.ts +13 -0
- package/dist/modules/invoice/use-cases/detail/dialogs/InvoiceFinalizeOutOfSyncDialog.vue.d.ts +21 -0
- package/dist/modules/invoice/use-cases/detail/dialogs/InvoiceRejectDialog.vue.d.ts +13 -0
- package/dist/modules/invoice/use-cases/overview/components/InvoiceOverviewBulkActionBar.vue.d.ts +3 -0
- package/dist/modules/invoice/use-cases/overview/components/InvoiceOverviewTableApprovalCell.vue.d.ts +9 -0
- package/dist/modules/invoice/use-cases/overview/composables/invoiceOverviewDataTableFilters.composable.d.ts +3 -0
- package/dist/modules/invoice/use-cases/overview/dialogs/InvoiceOverviewBulkActionDialog.vue.d.ts +1 -0
- package/dist/modules/invoice/use-cases/overview/dialogs/InvoiceOverviewBulkSendApprovalDialog.vue.d.ts +12 -0
- package/dist/modules/invoice/use-cases/overview/utils/invoiceOverviewBulkActionFeedback.util.d.ts +2 -0
- package/dist/modules/invoice/use-cases/overview/views/InvoiceOverviewView.vue.d.ts +0 -5
- package/dist/modules/invoice-approval/actions/invoiceApproval.actions.d.ts +5 -0
- package/dist/modules/invoice-approval/actions/invoiceApprovalArchive.action.d.ts +1 -0
- package/dist/modules/invoice-approval/actions/invoiceApprovalMarkAsApproved.action.d.ts +1 -0
- package/dist/modules/invoice-approval/actions/invoiceApprovalReject.action.d.ts +1 -0
- package/dist/modules/invoice-approval/actions/invoiceApprovalSendRequest.action.d.ts +1 -0
- package/dist/modules/invoice-approval/actions/invoiceApprovalUnmarkAsNeedsApproval.action.d.ts +1 -0
- package/dist/modules/invoice-approval/api/mutations/approvalReminderConfigUpdate.mutation.d.ts +8 -0
- package/dist/modules/invoice-approval/api/queries/approvalReminderConfig.query.d.ts +1 -0
- package/dist/modules/invoice-approval/api/queries/invoiceApprovalIndex.query.d.ts +3 -0
- package/dist/modules/invoice-approval/api/query-keys/invoiceApproval.queryKeys.d.ts +15 -0
- package/dist/modules/invoice-approval/api/services/invoiceApproval.service.d.ts +10 -0
- package/dist/modules/invoice-approval/components/InvoiceApprovalReminderLevelIndicator.vue.d.ts +7 -0
- package/dist/modules/invoice-approval/models/approvalReminderConfig.transformer.d.ts +6 -0
- package/dist/modules/invoice-approval/models/approvalReminderConfigForm.model.d.ts +11 -0
- package/dist/modules/invoice-approval/models/approvalReminderConfigForm.spec.d.ts +1 -0
- package/dist/modules/invoice-approval/models/invoiceApprovalIndex.model.d.ts +21 -0
- package/dist/modules/invoice-approval/models/invoiceApprovalIndex.transformer.d.ts +5 -0
- package/dist/modules/invoice-approval/models/invoiceApprovalIndexQueryParams.model.d.ts +9 -0
- package/dist/modules/invoice-approval/models/invoiceApprovalIndexQueryParams.transformer.d.ts +6 -0
- package/dist/modules/invoice-approval/routes/invoiceApproval.routes.d.ts +24 -0
- package/dist/modules/invoice-approval/use-cases/overview/components/InvoiceApprovalOverviewActionsCell.vue.d.ts +7 -0
- package/dist/modules/invoice-approval/use-cases/overview/components/InvoiceApprovalOverviewAmountCell.vue.d.ts +7 -0
- package/dist/modules/invoice-approval/use-cases/overview/components/InvoiceApprovalOverviewInvoiceCell.vue.d.ts +7 -0
- package/dist/modules/invoice-approval/use-cases/overview/components/InvoiceApprovalOverviewMetrics.vue.d.ts +18 -0
- package/dist/modules/invoice-approval/use-cases/overview/components/InvoiceApprovalOverviewNextReminderCell.vue.d.ts +7 -0
- package/dist/modules/invoice-approval/use-cases/overview/components/InvoiceApprovalOverviewStatusCell.vue.d.ts +7 -0
- package/dist/modules/invoice-approval/use-cases/overview/composables/invoiceApprovalOverview.composable.d.ts +42 -0
- package/dist/modules/invoice-approval/use-cases/overview/composables/invoiceApprovalOverviewFilters.composable.d.ts +10 -0
- package/dist/modules/invoice-approval/use-cases/overview/composables/invoiceApprovalOverviewTableColumns.composable.d.ts +3 -0
- package/dist/modules/invoice-approval/use-cases/overview/views/InvoiceApprovalOverviewView.vue.d.ts +3 -0
- package/dist/modules/invoice-approval/use-cases/settings/views/ApprovalReminderSettingsView.vue.d.ts +7 -0
- package/dist/modules/invoice-approval/use-cases/settings/views/ApprovalReminderSettingsViewDataProvider.vue.d.ts +3 -0
- package/dist/modules/settings/routes/settings.routes.d.ts +7 -0
- package/dist/{plainDate.transformer-BxvJpJOv.js → plainDate.transformer-Bhiz9jW7.js} +17 -4
- package/dist/reminderConfig.query-snaHQmrY.js +309 -0
- package/dist/routes/invoicingRoutes.composable.d.ts +14 -6
- package/dist/search.composable-CU9OpyUB.js +52 -0
- package/dist/{src-BFgnUugN.js → src-DUSgQTKr.js} +45 -45
- package/dist/style.css +1 -1
- package/dist/types/queryKey.type.d.ts +3 -2
- package/dist/ui/billing-document/table/utils/billingDocumentLineItemsEditor.util.d.ts +15 -0
- package/dist/utils/html.util.d.ts +4 -0
- package/package.json +2 -1
- package/dist/AddOpenBoundaryIcon-9SqBHfoz.js +0 -25
- package/dist/AirlineIcon-Z6sH_StM.js +0 -26
- package/dist/AirplaneIcon-C-nSkD1w.js +0 -19
- package/dist/AirportIcon-m4itDKCV.js +0 -16
- package/dist/AlertTriangleIcon-DtYLCC-Y.js +0 -23
- package/dist/AllocationsIcon-hcg93Sll.js +0 -16
- package/dist/ArrowNarrowRightIcon-2-Sml68f.js +0 -23
- package/dist/AssetIcon-qOYs6Wna.js +0 -16
- package/dist/BarChartIcon-DDyzpV_3.js +0 -22
- package/dist/BellIcon-DF1OBFta.js +0 -21
- package/dist/BuildingIcon-CC5PMNeP.js +0 -22
- package/dist/ChargerIcon-aM_endLr.js +0 -16
- package/dist/ChevronDownIcon-4QiK-Z6-.js +0 -23
- package/dist/ChevronUpIcon-qBsjZ5Dz.js +0 -23
- package/dist/ClockIcon-BNiPCaiB.js +0 -23
- package/dist/ClockSnoozeIcon-BxGfwJB6.js +0 -23
- package/dist/CopyIcon-DH5ly0dZ.js +0 -19
- package/dist/DataProvider-Dj34ljUX.js +0 -75
- package/dist/DownloadCloudIcon-Cf8ftklG.js +0 -22
- package/dist/EditIcon-Dr7OHBBR.js +0 -21
- package/dist/EraserIcon-B1VJSvdI.js +0 -23
- package/dist/FileIcon-ssmQI5Yl.js +0 -23
- package/dist/FilterLinesIcon-C7YdyPBk.js +0 -23
- package/dist/GlobeIcon-BfRM6Ike.js +0 -22
- package/dist/HelpIcon-BrJ49P5y.js +0 -22
- package/dist/HourGlassIcon-D9rfU1Is.js +0 -22
- package/dist/InfoCircleIcon-Ee0SyiMc.js +0 -23
- package/dist/InvoiceDetailViewDataProvider-D6E7YVV1.js +0 -1670
- package/dist/InvoiceOverviewViewDataProvider-i8tXATJE.js +0 -1677
- package/dist/InvoicePublicPdfViewDataProvider-BJe-8hC5.js +0 -45
- package/dist/KeyboardIcon-T3o_g-1c.js +0 -22
- package/dist/LinkExternalIcon-BkHS4fCx.js +0 -22
- package/dist/LinkIcon-DuPwae98.js +0 -22
- package/dist/MarkerIcon-B1Jqenjb.js +0 -28
- package/dist/MobileBatteryIcon-GZ1SMRDV.js +0 -16
- package/dist/MonitorIcon-pbK22reU.js +0 -22
- package/dist/NotificationIcon-Ctv8vyWt.js +0 -19
- package/dist/ParkingIcon-DnUPW3pB.js +0 -24
- package/dist/PlanningIcon-CXvrskgj.js +0 -16
- package/dist/PreferenceIcon-BHS8uDyi.js +0 -22
- package/dist/ReceiptCheckIcon-QTestqCJ.js +0 -23
- package/dist/RefreshIcon-DShY-aoS.js +0 -22
- package/dist/RemoveOpenBoundaryIcon-CN8YWs6o.js +0 -28
- package/dist/RewindIcon-GWg2AQax.js +0 -22
- package/dist/SettingsIcon-CBLJ6B5u.js +0 -25
- package/dist/ShieldIcon-CVnrOcxl.js +0 -19
- package/dist/ShieldOffIcon-B9l0dDVb.js +0 -23
- package/dist/SignOutIcon-CmDkjJ5F.js +0 -21
- package/dist/SlashCircleIcon-jY5FBko5.js +0 -22
- package/dist/StandIcon-CoYnBLMn.js +0 -23
- package/dist/StarsIcon-D7ZlqOW7.js +0 -22
- package/dist/StopwatchIcon-BK0vh1lg.js +0 -22
- package/dist/TargetIcon-HMWj77-Q.js +0 -22
- package/dist/ThreeDotsIcon-BtFruOKz.js +0 -32
- package/dist/ToolIcon-DRfDb7fE.js +0 -22
- package/dist/TrashIcon-BwxBjHv5.js +0 -19
- package/dist/TurnaroundIcon-b1X61TwZ.js +0 -27
- package/dist/UploadCloudIcon-BF0equKg.js +0 -22
- package/dist/UserIcon-B0rCC6KE.js +0 -22
- package/dist/UsersIcon-cK5l_zKG.js +0 -22
- package/dist/VerifiedIcon-CELYlqcv.js +0 -22
- package/dist/WifiIcon--JPvMNEF.js +0 -23
- package/dist/WifiOffIcon-BS2KftcP.js +0 -23
- package/dist/ZapIcon-BHwcIQc0.js +0 -23
- package/dist/ZoomInIcon-Cu6r915V.js +0 -23
- package/dist/ZoomOutIcon-DwB4FRj-.js +0 -23
- package/dist/_plugin-vue_export-helper-B3ysoDQm.js +0 -8
- package/dist/instant.transformer-KmBsH3E9.js +0 -18
- package/dist/invoice.service-Bb8VqQvc.js +0 -635
- package/dist/invoiceDeliveryStatus.util-BPkGCQM6.js +0 -331
- package/dist/reminderConfig.query-DsJNqqi7.js +0 -331
- package/dist/search.composable-BCtYqudV.js +0 -52
|
@@ -1,635 +0,0 @@
|
|
|
1
|
-
import { A as e, C as t, D as n, F as r, H as ee, M as te, S as ne, T as i, U as a, W as o, X as s, _ as c, b as l, c as u, d, f, h as p, i as m, j as re, n as ie, o as ae, p as oe, q as se, r as ce, t as h, u as le, v as ue, x as de, y as fe } from "./api.util-BCSgCfpS.js";
|
|
2
|
-
import { f as g, g as pe, l as me, r as he, w as _ } from "./documentTitle.composable-4ApFl9TZ.js";
|
|
3
|
-
import { n as ge } from "./useCurrencyFormat.composable-MtZaqKnO.js";
|
|
4
|
-
import { r as v } from "./src-BFgnUugN.js";
|
|
5
|
-
import { n as y, t as b } from "./plainDate.transformer-BxvJpJOv.js";
|
|
6
|
-
import { n as x, t as S } from "./percentage.util-Bl78kSSk.js";
|
|
7
|
-
import { t as C } from "./address.transformer-jGddczLV.js";
|
|
8
|
-
import { t as w } from "./instant.transformer-KmBsH3E9.js";
|
|
9
|
-
import { i as T, n as E, r as D, t as O } from "./billingDocumentDetail.transformer-BBn9R_cx.js";
|
|
10
|
-
import { t as k } from "./dist-BFx8U4Su.js";
|
|
11
|
-
import A from "zod";
|
|
12
|
-
import { ref as j } from "vue";
|
|
13
|
-
import { SortUtil as M } from "@wisemen/vue-core-api-utils";
|
|
14
|
-
import { Temporal as N } from "temporal-polyfill";
|
|
15
|
-
//#region ../toolkit/src/utils/monetary/monetary.util.ts
|
|
16
|
-
var P = class e {
|
|
17
|
-
static fromDto(e) {
|
|
18
|
-
return {
|
|
19
|
-
amount: e.amount,
|
|
20
|
-
currency: e.currency,
|
|
21
|
-
precision: e.precision
|
|
22
|
-
};
|
|
23
|
-
}
|
|
24
|
-
static fromNullableDto(t) {
|
|
25
|
-
return t == null ? null : e.fromDto(t);
|
|
26
|
-
}
|
|
27
|
-
static toDto(e) {
|
|
28
|
-
return {
|
|
29
|
-
amount: e.amount,
|
|
30
|
-
currency: e.currency,
|
|
31
|
-
precision: e.precision
|
|
32
|
-
};
|
|
33
|
-
}
|
|
34
|
-
static toNullableDto(t) {
|
|
35
|
-
return t === null ? null : e.toDto(t);
|
|
36
|
-
}
|
|
37
|
-
}, F = class {
|
|
38
|
-
static toDto(e) {
|
|
39
|
-
return { customerUuid: e.customer.uuid };
|
|
40
|
-
}
|
|
41
|
-
}, I = class {
|
|
42
|
-
static fromDto(e) {
|
|
43
|
-
return O.fromViewInvoiceDetailDto(e, e.uuid, pe.STANDARD);
|
|
44
|
-
}
|
|
45
|
-
}, L = class {
|
|
46
|
-
static fromDto(e) {
|
|
47
|
-
return {
|
|
48
|
-
uuid: e.uuid,
|
|
49
|
-
createdAt: w.fromDto(e.createdAt),
|
|
50
|
-
dueOn: b.fromNullableDto(e.dueOn),
|
|
51
|
-
issuedOn: b.fromNullableDto(e.issuedOn),
|
|
52
|
-
isDisputed: e.isDisputed,
|
|
53
|
-
isOverdue: e.isOverdue,
|
|
54
|
-
balanceDueAmount: y.fromNullableDto(e.balanceDueAmount),
|
|
55
|
-
customerName: e.customer.name,
|
|
56
|
-
customFields: e.customFields.map(E.fromDto),
|
|
57
|
-
deliveryStatus: e.deliveryStatus,
|
|
58
|
-
grossAmount: y.fromDto(e.grossAmount),
|
|
59
|
-
lifecycleStatus: e.lifecycleStatus,
|
|
60
|
-
paidAmount: y.fromNullableDto(e.paidAmount),
|
|
61
|
-
sequence: e.sequence,
|
|
62
|
-
settlementStatus: e.settlementStatus,
|
|
63
|
-
status: e.status,
|
|
64
|
-
subject: e.subject,
|
|
65
|
-
total: y.fromDto(e.netAmount),
|
|
66
|
-
totalCreditedAmount: y.fromNullableDto(e.totalCreditedAmount),
|
|
67
|
-
type: e.type
|
|
68
|
-
};
|
|
69
|
-
}
|
|
70
|
-
}, R = class {
|
|
71
|
-
static toDto(e) {
|
|
72
|
-
if (e == null) return;
|
|
73
|
-
let t = e.trim();
|
|
74
|
-
return t === "" ? void 0 : t;
|
|
75
|
-
}
|
|
76
|
-
}, _e = class {
|
|
77
|
-
static toDateRangeDto(e) {
|
|
78
|
-
if (e != null && e.from !== null && e.until !== null) return {
|
|
79
|
-
startDate: b.toDto(e.from),
|
|
80
|
-
endDate: b.toDto(e.until)
|
|
81
|
-
};
|
|
82
|
-
}
|
|
83
|
-
static toDto(e) {
|
|
84
|
-
let t = {};
|
|
85
|
-
return e.filters?.customerExternalIds?.length && (t.customerExternalIds = e.filters.customerExternalIds), e.filters?.customerUuids?.length && (t.customerUuids = e.filters.customerUuids), e.filters?.customFields?.length && (t.customFields = e.filters.customFields), e.filters?.issuedOnRange && (t.issuedOnRange = this.toDateRangeDto(e.filters.issuedOnRange)), e.filters?.dueOnRange && (t.dueOnRange = this.toDateRangeDto(e.filters.dueOnRange)), e.filters?.isOverdue !== null && e.filters?.isOverdue !== void 0 && (t.isOverdue = e.filters.isOverdue), e.filters?.lifecycleStatuses?.length && (t.lifecycleStatuses = e.filters.lifecycleStatuses), e.filters?.settlementStatuses?.length && (t.settlementStatuses = e.filters.settlementStatuses), e.filters?.statuses && (t.statuses = e.filters.statuses), {
|
|
86
|
-
filter: t,
|
|
87
|
-
pagination: e.pagination,
|
|
88
|
-
search: R.toDto(e.search),
|
|
89
|
-
sort: M.toDto(e.sort, {
|
|
90
|
-
created_at: _.CREATED_AT,
|
|
91
|
-
issued_on: _.ISSUED_ON,
|
|
92
|
-
customer: _.CUSTOMER,
|
|
93
|
-
netAmount: _.NET_AMOUNT,
|
|
94
|
-
sequence: _.SEQUENCE
|
|
95
|
-
})
|
|
96
|
-
};
|
|
97
|
-
}
|
|
98
|
-
}, z = class {
|
|
99
|
-
static getCurrentLocale() {
|
|
100
|
-
return Intl.DateTimeFormat(navigator.language).resolvedOptions().locale;
|
|
101
|
-
}
|
|
102
|
-
}, B = class {
|
|
103
|
-
static earliest(...e) {
|
|
104
|
-
return e.reduce((e, t) => t.epochMilliseconds < e.epochMilliseconds ? t : e);
|
|
105
|
-
}
|
|
106
|
-
static getNow() {
|
|
107
|
-
return N.Now.instant();
|
|
108
|
-
}
|
|
109
|
-
static getToday(e = V.getCurrentTimeZone()) {
|
|
110
|
-
return this.getNow().toZonedDateTimeISO(e).toPlainDate();
|
|
111
|
-
}
|
|
112
|
-
static instantFrom(e) {
|
|
113
|
-
return N.Instant.from(e);
|
|
114
|
-
}
|
|
115
|
-
static instantFromDateAndTime(e, t, n) {
|
|
116
|
-
return e.toPlainDateTime(t).toZonedDateTime(n).toInstant();
|
|
117
|
-
}
|
|
118
|
-
static instantToPlainDate(e, t) {
|
|
119
|
-
return e.toZonedDateTimeISO(t).toPlainDate();
|
|
120
|
-
}
|
|
121
|
-
static instantToPlainTime(e, t) {
|
|
122
|
-
return e.toZonedDateTimeISO(t).toPlainTime();
|
|
123
|
-
}
|
|
124
|
-
static instantToZonedDateTime(e, t) {
|
|
125
|
-
return e.toZonedDateTimeISO(t);
|
|
126
|
-
}
|
|
127
|
-
static isAfter(e, t) {
|
|
128
|
-
return e.epochMilliseconds > t.epochMilliseconds;
|
|
129
|
-
}
|
|
130
|
-
static isBefore(e, t) {
|
|
131
|
-
return e.epochMilliseconds < t.epochMilliseconds;
|
|
132
|
-
}
|
|
133
|
-
static isEqual(e, t) {
|
|
134
|
-
return e.epochMilliseconds === t.epochMilliseconds;
|
|
135
|
-
}
|
|
136
|
-
static latest(...e) {
|
|
137
|
-
return e.reduce((e, t) => t.epochMilliseconds > e.epochMilliseconds ? t : e);
|
|
138
|
-
}
|
|
139
|
-
static plainDateAndTimeToZonedDateTime(e, t, n = V.getCurrentTimeZone()) {
|
|
140
|
-
return this.plainDateTimeFromDateAndTime(e, t).toZonedDateTime(n);
|
|
141
|
-
}
|
|
142
|
-
static plainDateRangeToDateTimeInstantRange(e) {
|
|
143
|
-
if (e.startDate === null || e.endDate === null) return null;
|
|
144
|
-
let t = V.getCurrentTimeZone();
|
|
145
|
-
return {
|
|
146
|
-
startDate: e.startDate.toZonedDateTime({ timeZone: t }).toInstant(),
|
|
147
|
-
endDate: e.endDate.toZonedDateTime({ timeZone: t }).with({
|
|
148
|
-
hour: 23,
|
|
149
|
-
millisecond: 999,
|
|
150
|
-
minute: 59,
|
|
151
|
-
second: 59
|
|
152
|
-
}).toInstant()
|
|
153
|
-
};
|
|
154
|
-
}
|
|
155
|
-
static plainDateTimeFromDateAndTime(e, t) {
|
|
156
|
-
return N.PlainDate.from(e).toPlainDateTime(N.PlainTime.from(t));
|
|
157
|
-
}
|
|
158
|
-
static plainDateTimeToZonedDateTime(e, t = V.getCurrentTimeZone()) {
|
|
159
|
-
return e.toZonedDateTime(t);
|
|
160
|
-
}
|
|
161
|
-
static plainDateToInstant(e, t) {
|
|
162
|
-
return e.toZonedDateTime(t).toInstant();
|
|
163
|
-
}
|
|
164
|
-
}, V = class {
|
|
165
|
-
static getAvailableTimeZones() {
|
|
166
|
-
return Intl.supportedValuesOf("timeZone");
|
|
167
|
-
}
|
|
168
|
-
static getCurrentTimeZone() {
|
|
169
|
-
return Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
170
|
-
}
|
|
171
|
-
static getOffset(e) {
|
|
172
|
-
let { offset: t } = B.getNow().toZonedDateTimeISO(e), [n, r] = t.split(":");
|
|
173
|
-
return r === "00" ? n : t;
|
|
174
|
-
}
|
|
175
|
-
}, ve = {
|
|
176
|
-
appLanguage: z.getCurrentLocale(),
|
|
177
|
-
hourCycle: "locale-default",
|
|
178
|
-
locale: z.getCurrentLocale(),
|
|
179
|
-
timeZone: V.getCurrentTimeZone()
|
|
180
|
-
};
|
|
181
|
-
j(ve);
|
|
182
|
-
//#endregion
|
|
183
|
-
//#region ../date/src/models/form/plainDateField.model.ts
|
|
184
|
-
var H = A.instanceof(N.PlainDate, { error: () => "Invalid date format" }), U = A.instanceof(N.PlainTime, { error: () => "Invalid time format" }), W = A.object({
|
|
185
|
-
date: H,
|
|
186
|
-
time: U
|
|
187
|
-
}), G = A.object({
|
|
188
|
-
date: H.nullable(),
|
|
189
|
-
time: U.nullable()
|
|
190
|
-
}).superRefine(({ date: e, time: t }, n) => {
|
|
191
|
-
e === null != (t === null) && n.addIssue({
|
|
192
|
-
code: "custom",
|
|
193
|
-
message: "Date and time must both be filled in or both be empty",
|
|
194
|
-
path: [e === null ? "date" : "time"]
|
|
195
|
-
});
|
|
196
|
-
});
|
|
197
|
-
function K(e) {
|
|
198
|
-
return N.PlainDate.from(e.date).toPlainDateTime(N.PlainTime.from(e.time));
|
|
199
|
-
}
|
|
200
|
-
function q(e, t) {
|
|
201
|
-
return K(e).since(K(t)).total("seconds") < 0;
|
|
202
|
-
}
|
|
203
|
-
A.object({
|
|
204
|
-
end: W,
|
|
205
|
-
start: W
|
|
206
|
-
}).superRefine(({ end: e, start: t }, n) => {
|
|
207
|
-
q(t, e) || n.addIssue({
|
|
208
|
-
code: "custom",
|
|
209
|
-
message: "End date/time must be after start date/time",
|
|
210
|
-
path: ["end", "time"]
|
|
211
|
-
});
|
|
212
|
-
}), A.object({
|
|
213
|
-
end: G,
|
|
214
|
-
start: G
|
|
215
|
-
}).superRefine(({ end: e, start: t }, n) => {
|
|
216
|
-
t.date !== null && t.time !== null && e.date !== null && e.time !== null && (q(t, e) || n.addIssue({
|
|
217
|
-
code: "custom",
|
|
218
|
-
message: "End date/time must be after start date/time",
|
|
219
|
-
path: ["end", "time"]
|
|
220
|
-
}));
|
|
221
|
-
}), A.object({
|
|
222
|
-
end: W,
|
|
223
|
-
start: G
|
|
224
|
-
}).superRefine(({ end: e, start: t }, n) => {
|
|
225
|
-
t.time !== null && t.date !== null && (q(t, e) || n.addIssue({
|
|
226
|
-
code: "custom",
|
|
227
|
-
message: "End date/time must be after start date/time",
|
|
228
|
-
path: ["end", "time"]
|
|
229
|
-
}));
|
|
230
|
-
}), A.object({
|
|
231
|
-
end: G,
|
|
232
|
-
start: W
|
|
233
|
-
}).superRefine(({ end: e, start: t }, n) => {
|
|
234
|
-
e.date !== null && e.time !== null && (q(t, e) || n.addIssue({
|
|
235
|
-
code: "custom",
|
|
236
|
-
message: "End date/time must be after start date/time",
|
|
237
|
-
path: ["end", "time"]
|
|
238
|
-
}));
|
|
239
|
-
});
|
|
240
|
-
//#endregion
|
|
241
|
-
//#region ../date/src/transformers/instant.transformer.ts
|
|
242
|
-
var ye = class {
|
|
243
|
-
static fromDto(e) {
|
|
244
|
-
return N.Instant.from(e);
|
|
245
|
-
}
|
|
246
|
-
static fromNullableDto(e) {
|
|
247
|
-
return e === null ? null : this.fromDto(e);
|
|
248
|
-
}
|
|
249
|
-
static toDto(e) {
|
|
250
|
-
return e.toString();
|
|
251
|
-
}
|
|
252
|
-
static toNullableDto(e) {
|
|
253
|
-
return e === null ? null : this.toDto(e);
|
|
254
|
-
}
|
|
255
|
-
}, J = class {
|
|
256
|
-
static fromDto(e) {
|
|
257
|
-
return N.PlainDate.from(e);
|
|
258
|
-
}
|
|
259
|
-
static fromNullableDto(e) {
|
|
260
|
-
return e === null ? null : this.fromDto(e);
|
|
261
|
-
}
|
|
262
|
-
static toDto(e) {
|
|
263
|
-
return e.toString();
|
|
264
|
-
}
|
|
265
|
-
static toNullableDto(e) {
|
|
266
|
-
return e === null ? null : this.toDto(e);
|
|
267
|
-
}
|
|
268
|
-
}, be = class {
|
|
269
|
-
static fromDto(e) {
|
|
270
|
-
return {
|
|
271
|
-
uuid: e.uuid,
|
|
272
|
-
createdAt: ye.fromDto(e.createdAt),
|
|
273
|
-
amount: P.fromDto(e.amount),
|
|
274
|
-
date: J.fromDto(e.date),
|
|
275
|
-
paymentReference: e.paymentReference,
|
|
276
|
-
remarks: e.remarks,
|
|
277
|
-
source: e.source
|
|
278
|
-
};
|
|
279
|
-
}
|
|
280
|
-
}, xe = class {
|
|
281
|
-
static toDto(e) {
|
|
282
|
-
return {
|
|
283
|
-
amount: P.toDto({
|
|
284
|
-
amount: v(e.amount, e.precision),
|
|
285
|
-
currency: e.currency,
|
|
286
|
-
precision: e.precision
|
|
287
|
-
}),
|
|
288
|
-
date: J.toDto(e.date),
|
|
289
|
-
paymentReference: e.paymentReference,
|
|
290
|
-
remarks: e.remarks
|
|
291
|
-
};
|
|
292
|
-
}
|
|
293
|
-
};
|
|
294
|
-
//#endregion
|
|
295
|
-
//#region src/modules/invoice/models/invoice/pdf/invoicePdfDetail.transformer.ts
|
|
296
|
-
function Se(e) {
|
|
297
|
-
return {
|
|
298
|
-
uuid: e.uuid,
|
|
299
|
-
createdAt: w.fromDto(e.createdAt),
|
|
300
|
-
sequence: e.sequence,
|
|
301
|
-
status: e.status
|
|
302
|
-
};
|
|
303
|
-
}
|
|
304
|
-
function Y(e) {
|
|
305
|
-
return {
|
|
306
|
-
uuid: e.uuid,
|
|
307
|
-
isDiscount: e.isDiscount,
|
|
308
|
-
name: e.name,
|
|
309
|
-
customFields: e.customFields.map(E.fromDto),
|
|
310
|
-
description: e.description,
|
|
311
|
-
discount: D.fromDto(e.discount),
|
|
312
|
-
grossAmount: y.fromDto(e.grossAmount),
|
|
313
|
-
netAmount: y.fromDto(e.netAmount),
|
|
314
|
-
position: e.position,
|
|
315
|
-
quantity: e.quantity,
|
|
316
|
-
unit: e.unit,
|
|
317
|
-
unitPrice: y.fromDto(e.unitPrice),
|
|
318
|
-
vatRate: e.vatRate,
|
|
319
|
-
vatRatePercentage: x.fromDto(e.vatRatePercentage)
|
|
320
|
-
};
|
|
321
|
-
}
|
|
322
|
-
function Ce(e) {
|
|
323
|
-
return {
|
|
324
|
-
uuid: e.uuid,
|
|
325
|
-
name: e.name,
|
|
326
|
-
customFields: e.customFields.map(E.fromDto),
|
|
327
|
-
description: e.description,
|
|
328
|
-
lines: e.lines.toSorted((e, t) => e.position - t.position).map(Y),
|
|
329
|
-
position: e.position
|
|
330
|
-
};
|
|
331
|
-
}
|
|
332
|
-
function X(e) {
|
|
333
|
-
return [...e.ungroupedLines, ...e.groups.flatMap((e) => e.lines)].toSorted((e, t) => e.position - t.position);
|
|
334
|
-
}
|
|
335
|
-
var we = class {
|
|
336
|
-
static fromPublicDto(e) {
|
|
337
|
-
return {
|
|
338
|
-
createdAt: w.fromDto(e.createdAt),
|
|
339
|
-
deliveredOn: b.fromNullableDto(e.deliveredOn),
|
|
340
|
-
dueOn: b.fromNullableDto(e.dueOn),
|
|
341
|
-
issueOn: b.fromNullableDto(e.issueOn),
|
|
342
|
-
updatedAt: w.fromDto(e.updatedAt),
|
|
343
|
-
issuer: {
|
|
344
|
-
uuid: e.issuer.uuid,
|
|
345
|
-
name: e.issuer.name,
|
|
346
|
-
address: C.fromNullableDto(e.issuer.address),
|
|
347
|
-
alternativeBankAccountNumber: e.issuer.alternativeBankAccountNumber,
|
|
348
|
-
bankAccountNumber: e.issuer.bankAccountNumber,
|
|
349
|
-
email: e.issuer.email,
|
|
350
|
-
phoneNumber: e.issuer.phoneNumber,
|
|
351
|
-
vatNumber: e.issuer.vatNumber,
|
|
352
|
-
website: e.issuer.website
|
|
353
|
-
},
|
|
354
|
-
customer: {
|
|
355
|
-
uuid: e.customer.uuid,
|
|
356
|
-
name: e.customer.name,
|
|
357
|
-
address: C.fromNullableDto(e.customer.address),
|
|
358
|
-
email: e.customer.email,
|
|
359
|
-
phoneNumber: e.customer.phoneNumber,
|
|
360
|
-
vatNumber: e.customer.vatNumber
|
|
361
|
-
},
|
|
362
|
-
customFields: e.customFields.map(E.fromDto),
|
|
363
|
-
effectiveNet: y.fromDto(e.effectiveNet),
|
|
364
|
-
externalRemarks: e.externalRemarks,
|
|
365
|
-
globalDiscount: D.fromDto(e.globalDiscount),
|
|
366
|
-
grossAmount: y.fromDto(e.grossAmount),
|
|
367
|
-
groups: e.groups.toSorted((e, t) => e.position - t.position).map(Ce),
|
|
368
|
-
lines: X(e).map(Y),
|
|
369
|
-
netAmount: y.fromDto(e.netAmount),
|
|
370
|
-
originalInvoice: e.originalInvoice === null ? null : Se(e.originalInvoice),
|
|
371
|
-
paymentReference: e.paymentReference,
|
|
372
|
-
poNumber: e.poNumber,
|
|
373
|
-
recipient: e.recipient === null ? null : {
|
|
374
|
-
uuid: e.recipient.uuid,
|
|
375
|
-
name: e.recipient.name,
|
|
376
|
-
email: e.recipient.email
|
|
377
|
-
},
|
|
378
|
-
sequence: e.sequence,
|
|
379
|
-
status: e.status,
|
|
380
|
-
subject: e.subject,
|
|
381
|
-
totalDiscountAmount: y.fromNullableDto(e.totalDiscountAmount),
|
|
382
|
-
type: e.type,
|
|
383
|
-
ungroupedLines: e.ungroupedLines.map(Y),
|
|
384
|
-
vatAmount: y.fromDto(e.vatAmount),
|
|
385
|
-
vatSummaries: e.vatSummaries.map((e) => ({
|
|
386
|
-
netAmount: y.fromDto(e.netAmount),
|
|
387
|
-
vatAmount: y.fromDto(e.vatAmount),
|
|
388
|
-
vatRate: e.vatRate
|
|
389
|
-
}))
|
|
390
|
-
};
|
|
391
|
-
}
|
|
392
|
-
}, Te = class {
|
|
393
|
-
static toDto(e) {
|
|
394
|
-
let t = Math.abs(e.value);
|
|
395
|
-
return e.type === me.PERCENTAGE ? { discount: {
|
|
396
|
-
amount: null,
|
|
397
|
-
description: null,
|
|
398
|
-
percentage: x.toDto(new S(t)),
|
|
399
|
-
type: e.type
|
|
400
|
-
} } : { discount: {
|
|
401
|
-
amount: y.toDto({
|
|
402
|
-
amount: ge(t, e.precision),
|
|
403
|
-
currency: e.currency,
|
|
404
|
-
precision: e.precision
|
|
405
|
-
}),
|
|
406
|
-
description: null,
|
|
407
|
-
percentage: null,
|
|
408
|
-
type: e.type
|
|
409
|
-
} };
|
|
410
|
-
}
|
|
411
|
-
}, Z = class {
|
|
412
|
-
static toDto(e) {
|
|
413
|
-
return { fileUuids: e.attachments.map((e) => e.uuid) };
|
|
414
|
-
}
|
|
415
|
-
static toForm(e) {
|
|
416
|
-
return { attachments: e.map((e, t) => ({
|
|
417
|
-
uuid: e.uuid,
|
|
418
|
-
name: e.name,
|
|
419
|
-
blurHash: e.blurHash,
|
|
420
|
-
mimeType: e.mimeType,
|
|
421
|
-
order: t,
|
|
422
|
-
url: null
|
|
423
|
-
})) };
|
|
424
|
-
}
|
|
425
|
-
}, Q = class {
|
|
426
|
-
static toDto(e) {
|
|
427
|
-
return {
|
|
428
|
-
preparedByUuid: e.preparedBy.uuid,
|
|
429
|
-
deliveredOn: b.toNullableDto(e.deliveredOn),
|
|
430
|
-
dueOn: b.toDto(e.dueOn),
|
|
431
|
-
issuedOn: b.toDto(e.issuedOn),
|
|
432
|
-
customFields: e.customFields.map(E.toDto),
|
|
433
|
-
externalRemarks: k.trimOrNull(e.externalRemarks),
|
|
434
|
-
poNumber: k.trimOrNull(e.poNumber),
|
|
435
|
-
subject: k.trimOrNull(e.subject)
|
|
436
|
-
};
|
|
437
|
-
}
|
|
438
|
-
static toForm(e) {
|
|
439
|
-
return {
|
|
440
|
-
deliveredOn: e.deliveredOn,
|
|
441
|
-
dueOn: e.dueOn,
|
|
442
|
-
issuedOn: e.issueOn,
|
|
443
|
-
customFields: e.customFields,
|
|
444
|
-
externalRemarks: e.externalRemarks ?? "",
|
|
445
|
-
poNumber: e.poNumber ?? "",
|
|
446
|
-
preparedBy: e.preparedBy,
|
|
447
|
-
subject: e.subject ?? ""
|
|
448
|
-
};
|
|
449
|
-
}
|
|
450
|
-
};
|
|
451
|
-
//#endregion
|
|
452
|
-
//#region src/modules/invoice/models/invoice/update/invoiceUpdateLines.transformer.ts
|
|
453
|
-
function $(e) {
|
|
454
|
-
return {
|
|
455
|
-
isDiscount: e.quantity < 0 || e.isDiscount,
|
|
456
|
-
name: e.name,
|
|
457
|
-
customFields: e.customFields.map(E.toDto),
|
|
458
|
-
description: e.description,
|
|
459
|
-
discount: D.toDto(e.discount),
|
|
460
|
-
position: e.position,
|
|
461
|
-
quantity: e.quantity,
|
|
462
|
-
unit: e.unit,
|
|
463
|
-
unitPrice: y.toDto(e.unitPrice),
|
|
464
|
-
vatRate: e.vatRate
|
|
465
|
-
};
|
|
466
|
-
}
|
|
467
|
-
var Ee = class {
|
|
468
|
-
static toDto(e) {
|
|
469
|
-
return {
|
|
470
|
-
groups: e.groups.map((e) => ({
|
|
471
|
-
name: e.name,
|
|
472
|
-
customFields: e.customFields.map(E.toDto),
|
|
473
|
-
description: e.description,
|
|
474
|
-
lines: e.lines.map($),
|
|
475
|
-
position: e.position
|
|
476
|
-
})),
|
|
477
|
-
ungroupedLines: e.ungroupedLines.map($)
|
|
478
|
-
};
|
|
479
|
-
}
|
|
480
|
-
}, De = class {
|
|
481
|
-
static async applyDiscount(e, t) {
|
|
482
|
-
let n = await h.fromPromise(ie({
|
|
483
|
-
body: Te.toDto(t),
|
|
484
|
-
path: { uuid: e }
|
|
485
|
-
}));
|
|
486
|
-
return h.void(n);
|
|
487
|
-
}
|
|
488
|
-
static async bulkFinalize(e) {
|
|
489
|
-
return (await h.fromPromise(ce({ query: { filter: { invoiceUuids: {
|
|
490
|
-
scope: g.INCLUDE,
|
|
491
|
-
values: e
|
|
492
|
-
} } } }))).map((e) => e.data);
|
|
493
|
-
}
|
|
494
|
-
static async bulkMarkAsReady(e) {
|
|
495
|
-
return (await h.fromPromise(m({ query: { filter: { invoiceUuids: {
|
|
496
|
-
scope: g.INCLUDE,
|
|
497
|
-
values: e
|
|
498
|
-
} } } }))).map((e) => e.data);
|
|
499
|
-
}
|
|
500
|
-
static async bulkSend(e) {
|
|
501
|
-
return (await h.fromPromise(ae({ query: { filter: { invoiceUuids: {
|
|
502
|
-
scope: g.INCLUDE,
|
|
503
|
-
values: e
|
|
504
|
-
} } } }))).map((e) => e.data);
|
|
505
|
-
}
|
|
506
|
-
static async create(e) {
|
|
507
|
-
return (await h.fromPromise(le({ body: F.toDto(e) }))).map((e) => e.data.uuid);
|
|
508
|
-
}
|
|
509
|
-
static async createCreditNote(e) {
|
|
510
|
-
return (await h.fromPromise(u({ path: { uuid: e } }))).map((e) => e.data.uuid);
|
|
511
|
-
}
|
|
512
|
-
static async createPayment(e, t) {
|
|
513
|
-
let n = await h.fromPromise(d({
|
|
514
|
-
body: xe.toDto(t),
|
|
515
|
-
path: { uuid: e }
|
|
516
|
-
}));
|
|
517
|
-
return h.void(n);
|
|
518
|
-
}
|
|
519
|
-
static async delete(e) {
|
|
520
|
-
let t = await h.fromPromise(f({ path: { uuid: e } }));
|
|
521
|
-
return h.void(t);
|
|
522
|
-
}
|
|
523
|
-
static async deletePayment(e, t) {
|
|
524
|
-
let n = await h.fromPromise(oe({ path: {
|
|
525
|
-
uuid: e,
|
|
526
|
-
paymentUuid: t
|
|
527
|
-
} }));
|
|
528
|
-
return h.void(n);
|
|
529
|
-
}
|
|
530
|
-
static async duplicate(e) {
|
|
531
|
-
return (await h.fromPromise(p({ path: { uuid: e } }))).map((e) => e.data.uuid);
|
|
532
|
-
}
|
|
533
|
-
static async finalize(e) {
|
|
534
|
-
let t = await h.fromPromise(c({ path: { uuid: e } }));
|
|
535
|
-
return h.void(t);
|
|
536
|
-
}
|
|
537
|
-
static async getActivityLogs(e, t) {
|
|
538
|
-
return (await h.fromPromise(r({ query: {
|
|
539
|
-
filter: {
|
|
540
|
-
entityUuids: [e],
|
|
541
|
-
roles: [he.INVOICE]
|
|
542
|
-
},
|
|
543
|
-
pagination: {
|
|
544
|
-
key: t.pagination.key ?? null,
|
|
545
|
-
limit: t.pagination.limit
|
|
546
|
-
}
|
|
547
|
-
} }))).map((e) => ({
|
|
548
|
-
data: e.data.logs.map(T.fromDto),
|
|
549
|
-
meta: { next: e.data.nextKey }
|
|
550
|
-
}));
|
|
551
|
-
}
|
|
552
|
-
static async getAll(e) {
|
|
553
|
-
return (await h.fromPromise(a({
|
|
554
|
-
query: _e.toDto(e),
|
|
555
|
-
responseValidator: void 0
|
|
556
|
-
}))).map((e) => ({
|
|
557
|
-
data: e.data.items.map(L.fromDto),
|
|
558
|
-
meta: e.data.meta
|
|
559
|
-
}));
|
|
560
|
-
}
|
|
561
|
-
static async getByUuid(e) {
|
|
562
|
-
return (await h.fromPromise(ee({ path: { uuid: e } }))).map((e) => I.fromDto(e.data));
|
|
563
|
-
}
|
|
564
|
-
static async getPayments(e) {
|
|
565
|
-
return (await h.fromPromise(o({ path: { uuid: e } }))).map((e) => e.data.items.map(be.fromDto));
|
|
566
|
-
}
|
|
567
|
-
static async getPublicDetail(e) {
|
|
568
|
-
return (await h.fromPromise(se({ query: { token: e } }))).map((e) => we.fromPublicDto(e.data));
|
|
569
|
-
}
|
|
570
|
-
static async markAsDraft(e) {
|
|
571
|
-
let t = await h.fromPromise(fe({ path: { uuid: e } }));
|
|
572
|
-
return h.void(t);
|
|
573
|
-
}
|
|
574
|
-
static async markAsPaid(e) {
|
|
575
|
-
let t = await h.fromPromise(l({ path: { uuid: e } }));
|
|
576
|
-
return h.void(t);
|
|
577
|
-
}
|
|
578
|
-
static async markAsProtested(e) {
|
|
579
|
-
let t = await h.fromPromise(ue({ path: { uuid: e } }));
|
|
580
|
-
return h.void(t);
|
|
581
|
-
}
|
|
582
|
-
static async markAsReady(e) {
|
|
583
|
-
let t = await h.fromPromise(de({ path: { uuid: e } }));
|
|
584
|
-
return h.void(t);
|
|
585
|
-
}
|
|
586
|
-
static async previewBulkFinalize(e) {
|
|
587
|
-
return (await h.fromPromise(ne({ query: { filter: { invoiceUuids: {
|
|
588
|
-
scope: g.INCLUDE,
|
|
589
|
-
values: e
|
|
590
|
-
} } } }))).map((e) => e.data);
|
|
591
|
-
}
|
|
592
|
-
static async previewBulkMarkAsReady(e) {
|
|
593
|
-
return (await h.fromPromise(t({ query: { filter: { invoiceUuids: {
|
|
594
|
-
scope: g.INCLUDE,
|
|
595
|
-
values: e
|
|
596
|
-
} } } }))).map((e) => e.data);
|
|
597
|
-
}
|
|
598
|
-
static async previewBulkSend(e) {
|
|
599
|
-
return (await h.fromPromise(i({ query: { filter: { invoiceUuids: {
|
|
600
|
-
scope: g.INCLUDE,
|
|
601
|
-
values: e
|
|
602
|
-
} } } }))).map((e) => e.data);
|
|
603
|
-
}
|
|
604
|
-
static async send(e) {
|
|
605
|
-
let t = await h.fromPromise(n({ path: { uuid: e } }));
|
|
606
|
-
return h.void(t);
|
|
607
|
-
}
|
|
608
|
-
static async update(e, t) {
|
|
609
|
-
let n = await h.fromPromise(te({
|
|
610
|
-
body: Q.toDto(t),
|
|
611
|
-
path: { uuid: e }
|
|
612
|
-
}));
|
|
613
|
-
return h.void(n);
|
|
614
|
-
}
|
|
615
|
-
static async updateAttachments(t, n) {
|
|
616
|
-
let r = await h.fromPromise(e({
|
|
617
|
-
body: Z.toDto(n),
|
|
618
|
-
path: { uuid: t }
|
|
619
|
-
}));
|
|
620
|
-
return h.void(r);
|
|
621
|
-
}
|
|
622
|
-
static async updateLines(e, t) {
|
|
623
|
-
let n = await h.fromPromise(re({
|
|
624
|
-
body: Ee.toDto(t),
|
|
625
|
-
path: { uuid: e }
|
|
626
|
-
}));
|
|
627
|
-
return h.void(n);
|
|
628
|
-
}
|
|
629
|
-
static async withdrawProtest(e) {
|
|
630
|
-
let t = await h.fromPromise(s({ path: { uuid: e } }));
|
|
631
|
-
return h.void(t);
|
|
632
|
-
}
|
|
633
|
-
};
|
|
634
|
-
//#endregion
|
|
635
|
-
export { B as a, H as i, Q as n, R as o, Z as r, De as t };
|