@wisemen/wise-invoicing-web 1.0.0 → 1.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.
Files changed (92) hide show
  1. package/dist/AccountingSettingsViewDataProvider-BtDPqr_P.js +981 -0
  2. package/dist/{ApprovalReminderSettingsViewDataProvider-DyrHExKn.js → ApprovalReminderSettingsViewDataProvider-CuFo2JF5.js} +287 -287
  3. package/dist/{BillingDocumentDetailViewDataProvider-kFzqhrxW.js → BillingDocumentDetailViewDataProvider-qKW6LiRR.js} +1629 -1604
  4. package/dist/{BillingDocumentPdf-Dp6HSypy.js → BillingDocumentPdf-CgnrE4eq.js} +5 -5
  5. package/dist/{DataProvider-BtnD-BzI.js → DataProvider-Dj5ckiN2.js} +6 -9
  6. package/dist/{DunningCaseSendDialog-1S6OD9wd.js → DunningCaseSendDialog-CQ1yvbUt.js} +36 -36
  7. package/dist/{InvoiceApprovalOutOfSyncIndicator-DaM5hQVT.js → InvoiceApprovalOutOfSyncIndicator-BeqzoD3H.js} +2 -2
  8. package/dist/{InvoiceApprovalOverviewView-DM_LiO19.js → InvoiceApprovalOverviewView-B0ulYsYy.js} +230 -230
  9. package/dist/{InvoiceApprovalStatusBadge-mbYHYU3x.js → InvoiceApprovalStatusBadge-BZuyVHKk.js} +4 -4
  10. package/dist/{InvoicePdfView-YbDJpTIA.js → InvoicePdfView-BBTa7EaO.js} +2 -2
  11. package/dist/{InvoicePublicProFormaPdfViewDataProvider-BgAhcvB6.js → InvoicePublicProFormaPdfViewDataProvider-_Tbt2pTv.js} +4 -4
  12. package/dist/{InvoiceRejectDialogDataProvider-yegAlkDB.js → InvoiceRejectDialogDataProvider-ma2UsSzC.js} +33 -33
  13. package/dist/{InvoiceStatusBadge-Bo5PDjEy.js → InvoiceStatusBadge-JIR1gUDL.js} +3 -3
  14. package/dist/{InvoicingFileUploadProvider-DVh22OUB.js → InvoicingFileUploadProvider-B-eq6i9v.js} +14 -14
  15. package/dist/{IssuerSettingsViewDataProvider-BgSFemZr.js → IssuerSettingsViewDataProvider-CHyCCy9K.js} +66 -66
  16. package/dist/{PeppolSettingsViewDataProvider-_Bx0xx9e.js → PeppolSettingsViewDataProvider-j1btvXOf.js} +4 -4
  17. package/dist/{api.util-lGbimoKL.js → api.util-BkwbrwEm.js} +1026 -800
  18. package/dist/billingDocumentDetail.transformer-B-GSRQc0.js +324 -0
  19. package/dist/client/index.d.ts +2 -2
  20. package/dist/client/sdk.gen.d.ts +10 -1
  21. package/dist/client/types.gen.d.ts +452 -1
  22. package/dist/client/zod.gen.d.ts +524 -0
  23. package/dist/composables/invoicingConfig.composable.d.ts +3 -0
  24. package/dist/{creditNoteDetail.query-CqJeWeRV.js → creditNoteDetail.query-Tg4s5B8Q.js} +34 -34
  25. package/dist/{customFieldDefinitionIndex.query-Co7hoMow.js → customFieldDefinitionIndex.query-DtMibcTn.js} +28 -28
  26. package/dist/{deliveryReason.util-ny1rA7Sm.js → deliveryReason.util-BuCD1Fuz.js} +6 -6
  27. package/dist/{dist-CrNFh-CR.js → dist-AbMUaDf-.js} +93 -93
  28. package/dist/{dist-DmVrfBOT.js → dist-DaJ08k0k.js} +231 -119
  29. package/dist/{documentTitle.composable-aTEYXgaZ.js → documentTitle.composable-Bxu0YL71.js} +27 -19
  30. package/dist/{i18n.lib-B1H9r0km.js → i18n.lib-C8TA6PCf.js} +162 -2
  31. package/dist/index.d.ts +160 -0
  32. package/dist/index.js +1576 -1554
  33. package/dist/instant.transformer-KmBsH3E9.js +18 -0
  34. package/dist/{invoice.service-D9ubyWPb.js → invoice.service-BtgRZKrv.js} +152 -151
  35. package/dist/{invoiceApproval.service-BtDIOHIo.js → invoiceApproval.service-DEvaL-MH.js} +22 -21
  36. package/dist/invoiceApprovalStatus.util-NpxAuQ0t.js +83 -0
  37. package/dist/{invoiceCustomer.service-D0AtVrLg.js → invoiceCustomer.service-Cowdna7o.js} +6 -6
  38. package/dist/{invoiceDetail.query-BNL6MkvC.js → invoiceDetail.query-nEhWRrdL.js} +1 -1
  39. package/dist/{invoicingConfig.composable-DEF0lzNP.js → invoicingConfig.composable-CW47czLa.js} +20 -19
  40. package/dist/{issuerSettings.query-Cu-I6OAg.js → issuerSettings.query-CIWw1Zku.js} +27 -27
  41. package/dist/libs/i18n.lib.d.ts +160 -0
  42. package/dist/locales/en-US.json.d.ts +81 -1
  43. package/dist/locales/nl-BE.json.d.ts +81 -1
  44. package/dist/models/billing-document/billingDocumentDetail.model.d.ts +7 -1
  45. package/dist/modules/accounting/api/mutations/accountingConnectionDisconnect.mutation.d.ts +4 -0
  46. package/dist/modules/accounting/api/mutations/accountingPostingProfileUpdate.mutation.d.ts +15 -0
  47. package/dist/modules/accounting/api/mutations/exactAccountingConnect.mutation.d.ts +6 -0
  48. package/dist/modules/accounting/api/queries/accountingConnection.query.d.ts +1 -0
  49. package/dist/modules/accounting/api/queries/exactAuthorizationConfig.query.d.ts +1 -0
  50. package/dist/modules/accounting/api/queries/exactGlAccounts.query.d.ts +3 -0
  51. package/dist/modules/accounting/api/queries/exactJournals.query.d.ts +3 -0
  52. package/dist/modules/accounting/api/query-keys/accounting.queryKeys.d.ts +24 -0
  53. package/dist/modules/accounting/api/services/accountingConnection.service.d.ts +19 -0
  54. package/dist/modules/accounting/components/AccountingPostingProfileFields.vue.d.ts +14 -0
  55. package/dist/modules/accounting/components/AccountingSyncStatusBadge.vue.d.ts +7 -0
  56. package/dist/modules/accounting/components/ExactGlAccountField.vue.d.ts +12 -0
  57. package/dist/modules/accounting/components/ExactLogo.vue.d.ts +3 -0
  58. package/dist/modules/accounting/composables/exactLookupError.composable.d.ts +19 -0
  59. package/dist/modules/accounting/models/accountingConnection.model.d.ts +34 -0
  60. package/dist/modules/accounting/models/accountingConnection.transformer.d.ts +23 -0
  61. package/dist/modules/accounting/models/accountingConnection.transformer.spec.d.ts +1 -0
  62. package/dist/modules/accounting/models/accountingConnectionReadiness.util.d.ts +10 -0
  63. package/dist/modules/accounting/models/accountingConnectionUuid.model.d.ts +3 -0
  64. package/dist/modules/accounting/models/accountingError.util.d.ts +13 -0
  65. package/dist/modules/accounting/models/accountingError.util.spec.d.ts +1 -0
  66. package/dist/modules/accounting/models/accountingPostingProfileForm.model.d.ts +14 -0
  67. package/dist/modules/accounting/models/accountingPostingProfileForm.model.spec.d.ts +1 -0
  68. package/dist/modules/accounting/models/accountingPostingProfileUpdateForm.model.d.ts +17 -0
  69. package/dist/modules/accounting/models/exactAccountingConnectForm.model.d.ts +9 -0
  70. package/dist/modules/accounting/models/exactAccountingConnectForm.model.spec.d.ts +1 -0
  71. package/dist/modules/accounting/models/exactLookupOption.model.d.ts +5 -0
  72. package/dist/modules/accounting/models/exactLookupOption.util.d.ts +4 -0
  73. package/dist/modules/accounting/models/exactRegion.util.d.ts +5 -0
  74. package/dist/modules/accounting/models/exactRegion.util.spec.d.ts +1 -0
  75. package/dist/modules/accounting/routes/accounting.routes.d.ts +9 -0
  76. package/dist/modules/accounting/use-cases/settings/components/AccountingConnectionDetails.vue.d.ts +7 -0
  77. package/dist/modules/accounting/use-cases/settings/components/AccountingConnectionNotice.vue.d.ts +11 -0
  78. package/dist/modules/accounting/use-cases/settings/components/AccountingPostingProfileForm.vue.d.ts +8 -0
  79. package/dist/modules/accounting/use-cases/settings/components/ExactAccountingConnectForm.vue.d.ts +12 -0
  80. package/dist/modules/accounting/use-cases/settings/composables/accountingAuthorizationResult.composable.d.ts +5 -0
  81. package/dist/modules/accounting/use-cases/settings/composables/exactConnect.composable.d.ts +11 -0
  82. package/dist/modules/accounting/use-cases/settings/dialogs/AccountingConnectionDisconnectDialog.vue.d.ts +11 -0
  83. package/dist/modules/accounting/use-cases/settings/views/AccountingSettingsView.vue.d.ts +9 -0
  84. package/dist/modules/accounting/use-cases/settings/views/AccountingSettingsViewDataProvider.vue.d.ts +3 -0
  85. package/dist/modules/settings/routes/settings.routes.d.ts +7 -0
  86. package/dist/{plainDate.transformer-Bhiz9jW7.js → plainDate.transformer-BxvJpJOv.js} +4 -17
  87. package/dist/{reminderConfig.query-DHMHVOeX.js → reminderConfig.query-nb1P7ufx.js} +38 -37
  88. package/dist/types/queryKey.type.d.ts +3 -2
  89. package/dist/ui/data-provider/DataProvider.vue.d.ts +5 -1
  90. package/package.json +1 -1
  91. package/dist/billingDocumentDetail.transformer-C5-zjIhL.js +0 -319
  92. package/dist/invoiceApprovalStatus.util-Bqq_bILG.js +0 -83
@@ -0,0 +1,18 @@
1
+ import { Temporal as e } from "temporal-polyfill";
2
+ //#region src/utils/instant.transformer.ts
3
+ var t = class {
4
+ static fromDto(t) {
5
+ return e.Instant.from(t);
6
+ }
7
+ static fromNullableDto(e) {
8
+ return e === null ? null : this.fromDto(e);
9
+ }
10
+ static toDto(e) {
11
+ return e.toString();
12
+ }
13
+ static toNullableDto(e) {
14
+ return e === null ? null : this.toDto(e);
15
+ }
16
+ };
17
+ //#endregion
18
+ export { t };
@@ -1,11 +1,12 @@
1
- import { $ as e, A as t, D as n, E as r, F as ee, H as te, I as ne, L as i, N as a, O as o, Q as s, S as c, T as l, U as re, X as ie, Z as ae, _ as oe, a as u, b as se, bt as ce, g as le, gt as ue, ht as de, i as fe, j as pe, k as me, l as he, m as ge, mt as _e, n as ve, o as ye, r as be, rt as xe, t as d, u as Se, w as Ce, wt as we, xt as Te, y as Ee } from "./api.util-lGbimoKL.js";
2
- import { C as De, I as f, h as Oe, o as p, r as ke, v as m, w as h } from "./documentTitle.composable-aTEYXgaZ.js";
3
- import { n as Ae } from "./useCurrencyFormat.composable-MtZaqKnO.js";
4
- import { r as je } from "./src-Vz2dm4sM.js";
5
- import { t as g } from "./address.transformer-jGddczLV.js";
6
- import { n as _, r as v, t as y } from "./plainDate.transformer-Bhiz9jW7.js";
7
- import { a as b, i as x, n as S, o as Me, r as C, t as Ne } from "./billingDocumentDetail.transformer-C5-zjIhL.js";
8
- import { t as w } from "./dist-CwkVU5yS.js";
1
+ import { $ as e, A as t, Ct as n, D as r, E as ee, F as te, G as ne, L as i, M as a, Mt as o, N as s, O as c, Ot as re, R as ie, St as ae, W as oe, _ as se, a as l, b as ce, ct as le, et as ue, h as de, i as fe, j as pe, k as me, kt as he, l as ge, n as _e, nt as ve, o as ye, r as be, t as u, tt as xe, u as Se, v as Ce, w as we, wt as Te, x as Ee, z as De } from "./api.util-BkwbrwEm.js";
2
+ import { B as d, D as Oe, O as f, S as p, l as m, o as ke, v as Ae } from "./documentTitle.composable-Bxu0YL71.js";
3
+ import { n as je } from "./useCurrencyFormat.composable-MtZaqKnO.js";
4
+ import { r as Me } from "./src-Vz2dm4sM.js";
5
+ import { t as h } from "./address.transformer-jGddczLV.js";
6
+ import { t as g } from "./instant.transformer-KmBsH3E9.js";
7
+ import { a as _, i as v, n as y, o as b, r as x, t as Ne } from "./billingDocumentDetail.transformer-B-GSRQc0.js";
8
+ import { t as S } from "./dist-CwkVU5yS.js";
9
+ import { n as C, t as w } from "./plainDate.transformer-BxvJpJOv.js";
9
10
  import { n as T, t as Pe } from "./percentage.util-Bl78kSSk.js";
10
11
  import E from "zod";
11
12
  import { ref as Fe } from "vue";
@@ -39,7 +40,7 @@ var O = class e {
39
40
  }
40
41
  static toForm(e) {
41
42
  return {
42
- approvalMode: e ?? p.PRO_FORMA,
43
+ approvalMode: e ?? m.PRO_FORMA,
43
44
  requiresApproval: e !== null
44
45
  };
45
46
  }
@@ -47,12 +48,12 @@ var O = class e {
47
48
  static toDto(e) {
48
49
  return {
49
50
  fileUuids: e.files.map((e) => e.uuid),
50
- internalNote: w.trimOrNull(e.internalNote)
51
+ internalNote: S.trimOrNull(e.internalNote)
51
52
  };
52
53
  }
53
54
  static toForm(e, t) {
54
55
  return {
55
- files: t.map(C.toForm),
56
+ files: t.map(x.toForm),
56
57
  internalNote: e
57
58
  };
58
59
  }
@@ -60,12 +61,12 @@ var O = class e {
60
61
  static toDto(e) {
61
62
  return {
62
63
  fileUuids: e.files.map((e) => e.uuid),
63
- internalNote: w.trimOrNull(e.internalNote)
64
+ internalNote: S.trimOrNull(e.internalNote)
64
65
  };
65
66
  }
66
67
  static toForm(e, t) {
67
68
  return {
68
- files: t.map(C.toForm),
69
+ files: t.map(x.toForm),
69
70
  internalNote: e
70
71
  };
71
72
  }
@@ -74,13 +75,13 @@ var O = class e {
74
75
  if (e.reason === null) throw Error("A rejection reason is required");
75
76
  return {
76
77
  fileUuids: e.files.map((e) => e.uuid),
77
- internalNote: w.trimOrNull(e.internalNote),
78
+ internalNote: S.trimOrNull(e.internalNote),
78
79
  reason: e.reason
79
80
  };
80
81
  }
81
82
  static toForm(e, t) {
82
83
  return {
83
- files: t.map(C.toForm),
84
+ files: t.map(x.toForm),
84
85
  internalNote: e,
85
86
  reason: null
86
87
  };
@@ -94,8 +95,8 @@ var O = class e {
94
95
  }, P = class {
95
96
  static toDateRangeDto(e) {
96
97
  if (e != null && e.from !== null && e.until !== null) return {
97
- startDate: y.toDto(e.from),
98
- endDate: y.toDto(e.until)
98
+ startDate: w.toDto(e.from),
99
+ endDate: w.toDto(e.until)
99
100
  };
100
101
  }
101
102
  static toDto(e) {
@@ -104,11 +105,11 @@ var O = class e {
104
105
  pagination: e.pagination,
105
106
  search: N.toDto(e.search),
106
107
  sort: Ie.toDto(e.sort, {
107
- created_at: f.CREATED_AT,
108
- issued_on: f.ISSUED_ON,
109
- customer: f.CUSTOMER,
110
- netAmount: f.NET_AMOUNT,
111
- sequence: f.SEQUENCE
108
+ created_at: d.CREATED_AT,
109
+ issued_on: d.ISSUED_ON,
110
+ customer: d.CUSTOMER,
111
+ netAmount: d.NET_AMOUNT,
112
+ sequence: d.SEQUENCE
112
113
  })
113
114
  };
114
115
  }
@@ -119,12 +120,12 @@ var O = class e {
119
120
  }, F = class {
120
121
  static toDto(e) {
121
122
  if (e.type === "invoices") return { filter: { invoiceUuids: {
122
- scope: m.INCLUDE,
123
+ scope: p.INCLUDE,
123
124
  values: e.invoiceUuids
124
125
  } } };
125
126
  let t = P.toFilterDto(e.queryParams.filters);
126
127
  return e.excludedInvoiceUuids.length > 0 && (t.invoiceUuids = {
127
- scope: m.EXCLUDE,
128
+ scope: p.EXCLUDE,
128
129
  values: e.excludedInvoiceUuids
129
130
  }), {
130
131
  filter: t,
@@ -138,16 +139,16 @@ var O = class e {
138
139
  }, I = class {
139
140
  static fromDetailDto(e) {
140
141
  return {
141
- reminderSentAt: v.fromNullableDto(e.reminderSentAt),
142
- sentAt: v.fromNullableDto(e.sentAt),
142
+ reminderSentAt: g.fromNullableDto(e.reminderSentAt),
143
+ sentAt: g.fromNullableDto(e.sentAt),
143
144
  level: e.level,
144
145
  status: e.status
145
146
  };
146
147
  }
147
148
  static fromIndexDto(e) {
148
149
  return e === null ? null : {
149
- reminderSentAt: v.fromNullableDto(e.reminderSentAt),
150
- sentAt: v.fromNullableDto(e.sentAt),
150
+ reminderSentAt: g.fromNullableDto(e.reminderSentAt),
151
+ sentAt: g.fromNullableDto(e.sentAt),
151
152
  level: e.level,
152
153
  status: e.status
153
154
  };
@@ -165,9 +166,9 @@ var O = class e {
165
166
  static fromDto(t) {
166
167
  let n = e.findActiveApproval(t), r = t.approval.find((e) => e.rejectionReason !== null) ?? null;
167
168
  return {
168
- ...Ne.fromViewInvoiceDetailDto(t, t.uuid, h.STANDARD),
169
+ ...Ne.fromViewInvoiceDetailDto(t, t.uuid, f.STANDARD),
169
170
  approvalUuid: n === null ? null : n.uuid,
170
- approvalAnsweredAt: v.fromNullableDto(n?.answeredAt ?? null),
171
+ approvalAnsweredAt: g.fromNullableDto(n?.answeredAt ?? null),
171
172
  hasApprovalHistory: t.approval.length > 0,
172
173
  hasChangesSinceApprovalSent: t.hasChangesSinceApprovalSent,
173
174
  isEditable: t.isEditable,
@@ -175,36 +176,36 @@ var O = class e {
175
176
  approvalEmail: t.approvalRecipient?.email ?? null,
176
177
  approvalInternalNote: n?.internalNote ?? null,
177
178
  approvalMode: t.approvalMode,
178
- approvalProFormaFile: n === null ? null : C.fromNullableDto(n.proFormaFile),
179
+ approvalProFormaFile: n === null ? null : x.fromNullableDto(n.proFormaFile),
179
180
  rejection: r === null ? null : I.rejectionFromDetailDto(r),
180
- requiresPriorApproval: t.approvalMode === p.PRO_FORMA
181
+ requiresPriorApproval: t.approvalMode === m.PRO_FORMA
181
182
  };
182
183
  }
183
184
  }, ze = class {
184
185
  static fromDto(e) {
185
186
  return {
186
187
  uuid: e.uuid,
187
- createdAt: v.fromDto(e.createdAt),
188
- dueOn: y.fromNullableDto(e.dueOn),
189
- issuedOn: y.fromNullableDto(e.issuedOn),
188
+ createdAt: g.fromDto(e.createdAt),
189
+ dueOn: w.fromNullableDto(e.dueOn),
190
+ issuedOn: w.fromNullableDto(e.issuedOn),
190
191
  hasChangesSinceApprovalSent: e.hasChangesSinceApprovalSent,
191
192
  isDisputed: e.isDisputed,
192
193
  isOverdue: e.isOverdue,
193
194
  approval: I.fromIndexDto(e.approval),
194
- balanceDueAmount: _.fromNullableDto(e.balanceDueAmount),
195
+ balanceDueAmount: C.fromNullableDto(e.balanceDueAmount),
195
196
  customerName: e.customer.name,
196
- customFields: e.customFields.map(S.fromDto),
197
+ customFields: e.customFields.map(y.fromDto),
197
198
  deliveryStatus: e.deliveryStatus,
198
- grossAmount: _.fromDto(e.grossAmount),
199
+ grossAmount: C.fromDto(e.grossAmount),
199
200
  lifecycleStatus: e.lifecycleStatus,
200
- paidAmount: _.fromNullableDto(e.paidAmount),
201
- requiresPriorApproval: e.approvalMode === p.PRO_FORMA,
201
+ paidAmount: C.fromNullableDto(e.paidAmount),
202
+ requiresPriorApproval: e.approvalMode === m.PRO_FORMA,
202
203
  sequence: e.sequence,
203
204
  settlementStatus: e.settlementStatus,
204
205
  status: e.status,
205
206
  subject: e.subject,
206
- total: _.fromDto(e.netAmount),
207
- totalCreditedAmount: _.fromNullableDto(e.totalCreditedAmount),
207
+ total: C.fromDto(e.netAmount),
208
+ totalCreditedAmount: C.fromNullableDto(e.totalCreditedAmount),
208
209
  type: e.type
209
210
  };
210
211
  }
@@ -394,7 +395,7 @@ var Ve = class {
394
395
  static toDto(e) {
395
396
  return {
396
397
  amount: O.toDto({
397
- amount: je(e.amount, e.precision),
398
+ amount: Me(e.amount, e.precision),
398
399
  currency: e.currency,
399
400
  precision: e.precision
400
401
  }),
@@ -409,7 +410,7 @@ var Ve = class {
409
410
  function We(e) {
410
411
  return {
411
412
  uuid: e.uuid,
412
- createdAt: v.fromDto(e.createdAt),
413
+ createdAt: g.fromDto(e.createdAt),
413
414
  sequence: e.sequence,
414
415
  status: e.status
415
416
  };
@@ -419,15 +420,15 @@ function q(e) {
419
420
  uuid: e.uuid,
420
421
  isDiscount: e.isDiscount,
421
422
  name: e.name,
422
- customFields: e.customFields.map(S.fromDto),
423
+ customFields: e.customFields.map(y.fromDto),
423
424
  description: e.description,
424
- discount: b.fromDto(e.discount),
425
- grossAmount: _.fromDto(e.grossAmount),
426
- netAmount: _.fromDto(e.netAmount),
425
+ discount: _.fromDto(e.discount),
426
+ grossAmount: C.fromDto(e.grossAmount),
427
+ netAmount: C.fromDto(e.netAmount),
427
428
  position: e.position,
428
429
  quantity: e.quantity,
429
430
  unit: e.unit,
430
- unitPrice: _.fromDto(e.unitPrice),
431
+ unitPrice: C.fromDto(e.unitPrice),
431
432
  vatRate: e.vatRate,
432
433
  vatRatePercentage: T.fromDto(e.vatRatePercentage)
433
434
  };
@@ -436,7 +437,7 @@ function J(e) {
436
437
  return {
437
438
  uuid: e.uuid,
438
439
  name: e.name,
439
- customFields: e.customFields.map(S.fromDto),
440
+ customFields: e.customFields.map(y.fromDto),
440
441
  description: e.description,
441
442
  groups: e.groups.toSorted((e, t) => e.position - t.position).map(J),
442
443
  lines: e.lines.toSorted((e, t) => e.position - t.position).map(q),
@@ -444,14 +445,14 @@ function J(e) {
444
445
  };
445
446
  }
446
447
  function Ge(e) {
447
- return [...e.ungroupedLines, ...x.flattenLines(e.groups)].toSorted((e, t) => e.position - t.position);
448
+ return [...e.ungroupedLines, ...v.flattenLines(e.groups)].toSorted((e, t) => e.position - t.position);
448
449
  }
449
450
  var Y = class e {
450
451
  static fromPublicDto(t) {
451
452
  return {
452
453
  ...e.fromPublicProFormaDto(t),
453
- deliveredOn: y.fromNullableDto(t.deliveredOn),
454
- dueOn: y.fromNullableDto(t.dueOn),
454
+ deliveredOn: w.fromNullableDto(t.deliveredOn),
455
+ dueOn: w.fromNullableDto(t.dueOn),
455
456
  originalInvoice: t.originalInvoice === null ? null : We(t.originalInvoice),
456
457
  recipient: t.recipient === null ? null : {
457
458
  name: t.recipient.name,
@@ -464,15 +465,15 @@ var Y = class e {
464
465
  }
465
466
  static fromPublicProFormaDto(e) {
466
467
  return {
467
- createdAt: v.fromDto(e.createdAt),
468
+ createdAt: g.fromDto(e.createdAt),
468
469
  deliveredOn: null,
469
470
  dueOn: null,
470
- issueOn: y.fromNullableDto(e.issueOn),
471
- updatedAt: v.fromDto(e.updatedAt),
471
+ issueOn: w.fromNullableDto(e.issueOn),
472
+ updatedAt: g.fromDto(e.updatedAt),
472
473
  issuer: {
473
474
  uuid: e.issuer.uuid,
474
475
  name: e.issuer.name,
475
- address: g.fromNullableDto(e.issuer.address),
476
+ address: h.fromNullableDto(e.issuer.address),
476
477
  alternativeBankAccountNumber: e.issuer.alternativeBankAccountNumber,
477
478
  bankAccountNumber: e.issuer.bankAccountNumber,
478
479
  email: e.issuer.email,
@@ -480,37 +481,37 @@ var Y = class e {
480
481
  vatNumber: e.issuer.vatNumber,
481
482
  website: e.issuer.website
482
483
  },
483
- advancePaymentAmount: _.fromNullableDto(e.advancePaymentAmount),
484
+ advancePaymentAmount: C.fromNullableDto(e.advancePaymentAmount),
484
485
  customer: {
485
486
  uuid: e.customer.uuid,
486
487
  name: e.customer.name,
487
- address: g.fromNullableDto(e.customer.address),
488
+ address: h.fromNullableDto(e.customer.address),
488
489
  email: e.customer.email,
489
490
  phoneNumber: e.customer.phoneNumber,
490
491
  vatNumber: e.customer.vatNumber
491
492
  },
492
- customFields: e.customFields.map(S.fromDto),
493
- effectiveNet: _.fromDto(e.effectiveNet),
493
+ customFields: e.customFields.map(y.fromDto),
494
+ effectiveNet: C.fromDto(e.effectiveNet),
494
495
  externalRemarks: e.externalRemarks,
495
- globalDiscount: b.fromDto(e.globalDiscount),
496
- grossAmount: _.fromDto(e.grossAmount),
496
+ globalDiscount: _.fromDto(e.globalDiscount),
497
+ grossAmount: C.fromDto(e.grossAmount),
497
498
  groups: e.groups.toSorted((e, t) => e.position - t.position).map(J),
498
499
  lines: Ge(e).map(q),
499
- netAmount: _.fromDto(e.netAmount),
500
+ netAmount: C.fromDto(e.netAmount),
500
501
  originalInvoice: null,
501
502
  paymentReference: e.paymentReference,
502
503
  poNumber: e.poNumber,
503
504
  recipient: null,
504
505
  sequence: null,
505
- status: De.READY,
506
+ status: Oe.READY,
506
507
  subject: e.subject,
507
- totalDiscountAmount: _.fromNullableDto(e.totalDiscountAmount),
508
- type: h.STANDARD,
508
+ totalDiscountAmount: C.fromNullableDto(e.totalDiscountAmount),
509
+ type: f.STANDARD,
509
510
  ungroupedLines: e.ungroupedLines.map(q),
510
- vatAmount: _.fromDto(e.vatAmount),
511
+ vatAmount: C.fromDto(e.vatAmount),
511
512
  vatSummaries: e.vatSummaries.map((e) => ({
512
- netAmount: _.fromDto(e.netAmount),
513
- vatAmount: _.fromDto(e.vatAmount),
513
+ netAmount: C.fromDto(e.netAmount),
514
+ vatAmount: C.fromDto(e.vatAmount),
514
515
  vatRate: e.vatRate
515
516
  }))
516
517
  };
@@ -518,14 +519,14 @@ var Y = class e {
518
519
  }, Ke = class {
519
520
  static toDto(e) {
520
521
  let t = Math.abs(e.value);
521
- return e.type === Oe.PERCENTAGE ? { discount: {
522
+ return e.type === Ae.PERCENTAGE ? { discount: {
522
523
  amount: null,
523
524
  description: null,
524
525
  percentage: T.toDto(new Pe(t)),
525
526
  type: e.type
526
527
  } } : { discount: {
527
- amount: _.toDto({
528
- amount: Ae(t, e.precision),
528
+ amount: C.toDto({
529
+ amount: je(t, e.precision),
529
530
  currency: e.currency,
530
531
  precision: e.precision
531
532
  }),
@@ -552,14 +553,14 @@ var Y = class e {
552
553
  static toDto(e) {
553
554
  return {
554
555
  preparedByUuid: e.preparedBy.uuid,
555
- deliveredOn: y.toNullableDto(e.deliveredOn),
556
- dueOn: y.toDto(e.dueOn),
557
- issuedOn: y.toDto(e.issuedOn),
558
- customFields: e.customFields.map(S.toDto),
559
- externalRemarks: w.trimOrNull(e.externalRemarks),
560
- poNumber: w.trimOrNull(e.poNumber),
561
- reference: w.trimOrNull(e.reference),
562
- subject: w.trimOrNull(e.subject)
556
+ deliveredOn: w.toNullableDto(e.deliveredOn),
557
+ dueOn: w.toDto(e.dueOn),
558
+ issuedOn: w.toDto(e.issuedOn),
559
+ customFields: e.customFields.map(y.toDto),
560
+ externalRemarks: S.trimOrNull(e.externalRemarks),
561
+ poNumber: S.trimOrNull(e.poNumber),
562
+ reference: S.trimOrNull(e.reference),
563
+ subject: S.trimOrNull(e.subject)
563
564
  };
564
565
  }
565
566
  static toForm(e) {
@@ -583,13 +584,13 @@ function Q(e) {
583
584
  externalId: e.externalId,
584
585
  isDiscount: e.quantity < 0 || e.isDiscount,
585
586
  name: e.name,
586
- customFields: e.customFields.map(S.toDto),
587
+ customFields: e.customFields.map(y.toDto),
587
588
  description: e.description,
588
- discount: b.toDto(e.discount),
589
+ discount: _.toDto(e.discount),
589
590
  position: e.position,
590
591
  quantity: e.quantity,
591
592
  unit: e.unit,
592
- unitPrice: _.toDto(e.unitPrice),
593
+ unitPrice: C.toDto(e.unitPrice),
593
594
  vatRate: e.vatRate
594
595
  };
595
596
  }
@@ -597,7 +598,7 @@ function $(e) {
597
598
  return {
598
599
  externalId: e.externalId,
599
600
  name: e.name,
600
- customFields: e.customFields.map(S.toDto),
601
+ customFields: e.customFields.map(y.toDto),
601
602
  description: e.description,
602
603
  groups: e.groups.map($),
603
604
  lines: e.lines.map(Q),
@@ -613,74 +614,74 @@ var qe = class {
613
614
  }
614
615
  }, Je = class {
615
616
  static async applyDiscount(e, t) {
616
- let n = await d.fromPromise(ve({
617
+ let n = await u.fromPromise(_e({
617
618
  body: Ke.toDto(t),
618
619
  path: { uuid: e }
619
620
  }));
620
- return d.void(n);
621
+ return u.void(n);
621
622
  }
622
623
  static async approveApproval(e, t) {
623
- let n = await d.fromPromise(be({
624
+ let n = await u.fromPromise(be({
624
625
  body: j.toDto(t),
625
626
  path: { uuid: e }
626
627
  }));
627
- return d.void(n);
628
+ return u.void(n);
628
629
  }
629
630
  static async archiveApproval(e) {
630
- let t = await d.fromPromise(Se({ path: { uuid: e } }));
631
- return d.void(t);
631
+ let t = await u.fromPromise(Se({ path: { uuid: e } }));
632
+ return u.void(t);
632
633
  }
633
634
  static async bulkDelete(e) {
634
- return (await d.fromPromise(fe({ query: F.toDto(e) }))).map((e) => e.data);
635
+ return (await u.fromPromise(fe({ query: F.toDto(e) }))).map((e) => e.data);
635
636
  }
636
637
  static async bulkFinalize(e, t) {
637
- return (await d.fromPromise(u({
638
+ return (await u.fromPromise(l({
638
639
  body: { sendOnFinalization: t },
639
640
  query: F.toDto(e)
640
641
  }))).map((e) => e.data);
641
642
  }
642
643
  static async bulkMarkAsReady(e) {
643
- return (await d.fromPromise(ye({ query: F.toDto(e) }))).map((e) => e.data);
644
+ return (await u.fromPromise(ye({ query: F.toDto(e) }))).map((e) => e.data);
644
645
  }
645
646
  static async bulkSendApproval(e) {
646
- return (await d.fromPromise(he({ query: F.toDto(e) }))).map((e) => e.data);
647
+ return (await u.fromPromise(ge({ query: F.toDto(e) }))).map((e) => e.data);
647
648
  }
648
649
  static async create(e) {
649
- return (await d.fromPromise(le({ body: Le.toDto(e) }))).map((e) => e.data.uuid);
650
+ return (await u.fromPromise(se({ body: Le.toDto(e) }))).map((e) => e.data.uuid);
650
651
  }
651
652
  static async createCreditNote(e) {
652
- return (await d.fromPromise(ge({ path: { uuid: e } }))).map((e) => e.data.uuid);
653
+ return (await u.fromPromise(de({ path: { uuid: e } }))).map((e) => e.data.uuid);
653
654
  }
654
655
  static async createPayment(e, t) {
655
- let n = await d.fromPromise(oe({
656
+ let n = await u.fromPromise(Ce({
656
657
  body: Ue.toDto(t),
657
658
  path: { uuid: e }
658
659
  }));
659
- return d.void(n);
660
+ return u.void(n);
660
661
  }
661
662
  static async delete(e) {
662
- let t = await d.fromPromise(Ee({ path: { uuid: e } }));
663
- return d.void(t);
663
+ let t = await u.fromPromise(ce({ path: { uuid: e } }));
664
+ return u.void(t);
664
665
  }
665
666
  static async deletePayment(e, t) {
666
- let n = await d.fromPromise(se({ path: {
667
+ let n = await u.fromPromise(Ee({ path: {
667
668
  uuid: e,
668
669
  paymentUuid: t
669
670
  } }));
670
- return d.void(n);
671
+ return u.void(n);
671
672
  }
672
673
  static async duplicate(e) {
673
- return (await d.fromPromise(c({ path: { uuid: e } }))).map((e) => e.data.uuid);
674
+ return (await u.fromPromise(we({ path: { uuid: e } }))).map((e) => e.data.uuid);
674
675
  }
675
676
  static async finalize(e) {
676
- let t = await d.fromPromise(Ce({
677
+ let t = await u.fromPromise(ee({
677
678
  body: {},
678
679
  path: { uuid: e }
679
680
  }));
680
- return d.void(t);
681
+ return u.void(t);
681
682
  }
682
683
  static async getActivityLogs(e, t) {
683
- return (await d.fromPromise(xe({ query: {
684
+ return (await u.fromPromise(le({ query: {
684
685
  filter: {
685
686
  entityUuids: [e],
686
687
  roles: [ke.INVOICE]
@@ -690,12 +691,12 @@ var qe = class {
690
691
  limit: t.pagination.limit
691
692
  }
692
693
  } }))).map((e) => ({
693
- data: e.data.logs.map(Me.fromDto),
694
+ data: e.data.logs.map(b.fromDto),
694
695
  meta: { next: e.data.nextKey }
695
696
  }));
696
697
  }
697
698
  static async getAll(e) {
698
- return (await d.fromPromise(de({
699
+ return (await u.fromPromise(n({
699
700
  query: P.toDto(e),
700
701
  responseValidator: void 0
701
702
  }))).map((e) => ({
@@ -704,102 +705,102 @@ var qe = class {
704
705
  }));
705
706
  }
706
707
  static async getByUuid(e) {
707
- return (await d.fromPromise(_e({ path: { uuid: e } }))).map((e) => Re.fromDto(e.data));
708
+ return (await u.fromPromise(ae({ path: { uuid: e } }))).map((e) => Re.fromDto(e.data));
708
709
  }
709
710
  static async getPayments(e) {
710
- return (await d.fromPromise(ue({ path: { uuid: e } }))).map((e) => e.data.items.map(He.fromDto));
711
+ return (await u.fromPromise(Te({ path: { uuid: e } }))).map((e) => e.data.items.map(He.fromDto));
711
712
  }
712
713
  static async getPublicDetail(e) {
713
- return (await d.fromPromise(ce({ query: { token: e } }))).map((e) => Y.fromPublicDto(e.data));
714
+ return (await u.fromPromise(re({ query: { token: e } }))).map((e) => Y.fromPublicDto(e.data));
714
715
  }
715
716
  static async getPublicProFormaDetail(e) {
716
- return (await d.fromPromise(Te({ query: { token: e } }))).map((e) => Y.fromPublicProFormaDto(e.data));
717
+ return (await u.fromPromise(he({ query: { token: e } }))).map((e) => Y.fromPublicProFormaDto(e.data));
717
718
  }
718
719
  static async markAsDraft(e) {
719
- let t = await d.fromPromise(r({ path: { uuid: e } }));
720
- return d.void(t);
720
+ let t = await u.fromPromise(c({ path: { uuid: e } }));
721
+ return u.void(t);
721
722
  }
722
723
  static async markAsPaid(e) {
723
- let t = await d.fromPromise(n({ path: { uuid: e } }));
724
- return d.void(t);
724
+ let t = await u.fromPromise(me({ path: { uuid: e } }));
725
+ return u.void(t);
725
726
  }
726
727
  static async markAsProtested(e) {
727
- let t = await d.fromPromise(l({ path: { uuid: e } }));
728
- return d.void(t);
728
+ let t = await u.fromPromise(r({ path: { uuid: e } }));
729
+ return u.void(t);
729
730
  }
730
731
  static async markAsReady(e) {
731
- let t = await d.fromPromise(o({ path: { uuid: e } }));
732
- return d.void(t);
732
+ let n = await u.fromPromise(t({ path: { uuid: e } }));
733
+ return u.void(n);
733
734
  }
734
735
  static async previewBulkDelete(e) {
735
- return (await d.fromPromise(me({ query: F.toDto(e) }))).map((e) => e.data);
736
+ return (await u.fromPromise(pe({ query: F.toDto(e) }))).map((e) => e.data);
736
737
  }
737
738
  static async previewBulkFinalize(e) {
738
- return (await d.fromPromise(t({ query: F.toDto(e) }))).map((e) => e.data);
739
+ return (await u.fromPromise(a({ query: F.toDto(e) }))).map((e) => e.data);
739
740
  }
740
741
  static async previewBulkMarkAsReady(e) {
741
- return (await d.fromPromise(pe({ query: F.toDto(e) }))).map((e) => e.data);
742
+ return (await u.fromPromise(s({ query: F.toDto(e) }))).map((e) => e.data);
742
743
  }
743
744
  static async previewBulkSendApproval(e) {
744
- return (await d.fromPromise(a({ query: F.toDto(e) }))).map((e) => e.data);
745
+ return (await u.fromPromise(te({ query: F.toDto(e) }))).map((e) => e.data);
745
746
  }
746
747
  static async rejectApproval(e, t) {
747
- let n = await d.fromPromise(ee({
748
+ let n = await u.fromPromise(i({
748
749
  body: M.toDto(t),
749
750
  path: { uuid: e }
750
751
  }));
751
- return d.void(n);
752
+ return u.void(n);
752
753
  }
753
754
  static async restartApproval(e) {
754
- let t = await d.fromPromise(ne({ path: { uuid: e } }));
755
- return d.void(t);
755
+ let t = await u.fromPromise(ie({ path: { uuid: e } }));
756
+ return u.void(t);
756
757
  }
757
758
  static async restoreFromProForma(e) {
758
- let t = await d.fromPromise(i({ path: { uuid: e } }));
759
- return d.void(t);
759
+ let t = await u.fromPromise(De({ path: { uuid: e } }));
760
+ return u.void(t);
760
761
  }
761
762
  static async sendApproval(e) {
762
- let t = await d.fromPromise(te({ path: { uuid: e } }));
763
- return d.void(t);
763
+ let t = await u.fromPromise(oe({ path: { uuid: e } }));
764
+ return u.void(t);
764
765
  }
765
766
  static async setApprovalMode(e, t) {
766
- let n = await d.fromPromise(re({
767
+ let n = await u.fromPromise(ne({
767
768
  body: k.toDto(t),
768
769
  path: { uuid: e }
769
770
  }));
770
- return d.void(n);
771
+ return u.void(n);
771
772
  }
772
- static async update(t, n) {
773
- let r = await d.fromPromise(e({
774
- body: Z.toDto(n),
775
- path: { uuid: t }
773
+ static async update(e, t) {
774
+ let n = await u.fromPromise(ve({
775
+ body: Z.toDto(t),
776
+ path: { uuid: e }
776
777
  }));
777
- return d.void(r);
778
+ return u.void(n);
778
779
  }
779
- static async updateApproval(e, t) {
780
- let n = await d.fromPromise(ie({
781
- body: A.toDto(t),
782
- path: { uuid: e }
780
+ static async updateApproval(t, n) {
781
+ let r = await u.fromPromise(e({
782
+ body: A.toDto(n),
783
+ path: { uuid: t }
783
784
  }));
784
- return d.void(n);
785
+ return u.void(r);
785
786
  }
786
787
  static async updateAttachments(e, t) {
787
- let n = await d.fromPromise(ae({
788
+ let n = await u.fromPromise(ue({
788
789
  body: X.toDto(t),
789
790
  path: { uuid: e }
790
791
  }));
791
- return d.void(n);
792
+ return u.void(n);
792
793
  }
793
794
  static async updateLines(e, t) {
794
- let n = await d.fromPromise(s({
795
+ let n = await u.fromPromise(xe({
795
796
  body: qe.toDto(t),
796
797
  path: { uuid: e }
797
798
  }));
798
- return d.void(n);
799
+ return u.void(n);
799
800
  }
800
801
  static async withdrawProtest(e) {
801
- let t = await d.fromPromise(we({ path: { uuid: e } }));
802
- return d.void(t);
802
+ let t = await u.fromPromise(o({ path: { uuid: e } }));
803
+ return u.void(t);
803
804
  }
804
805
  };
805
806
  //#endregion