@spaceinvoices/react-ui 0.4.12 → 0.4.32

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 (334) hide show
  1. package/cli/dist/index.js +1 -1
  2. package/package.json +1 -1
  3. package/src/common/autocomplete.tsx +7 -1
  4. package/src/components/advance-invoices/advance-invoices.hooks.ts +35 -44
  5. package/src/components/advance-invoices/create/create-advance-invoice-form.tsx +190 -73
  6. package/src/components/advance-invoices/create/locales/bg.ts +17 -9
  7. package/src/components/advance-invoices/create/locales/cs.ts +17 -9
  8. package/src/components/advance-invoices/create/locales/de.ts +15 -7
  9. package/src/components/advance-invoices/create/locales/en.ts +15 -7
  10. package/src/components/advance-invoices/create/locales/es.ts +15 -7
  11. package/src/components/advance-invoices/create/locales/et.ts +17 -9
  12. package/src/components/advance-invoices/create/locales/fi.ts +18 -10
  13. package/src/components/advance-invoices/create/locales/fr.ts +16 -8
  14. package/src/components/advance-invoices/create/locales/hr.ts +15 -7
  15. package/src/components/advance-invoices/create/locales/is.ts +17 -9
  16. package/src/components/advance-invoices/create/locales/it.ts +15 -7
  17. package/src/components/advance-invoices/create/locales/nb.ts +17 -9
  18. package/src/components/advance-invoices/create/locales/nl.ts +15 -7
  19. package/src/components/advance-invoices/create/locales/pl.ts +17 -9
  20. package/src/components/advance-invoices/create/locales/pt.ts +16 -8
  21. package/src/components/advance-invoices/create/locales/sk.ts +17 -9
  22. package/src/components/advance-invoices/create/locales/sl.ts +14 -5
  23. package/src/components/advance-invoices/create/locales/sv.ts +17 -9
  24. package/src/components/advance-invoices/create/prepare-advance-invoice-submission.ts +47 -1
  25. package/src/components/advance-invoices/list/list-table.tsx +2 -1
  26. package/src/components/credit-notes/create/create-credit-note-form.tsx +254 -85
  27. package/src/components/credit-notes/create/locales/bg.ts +22 -8
  28. package/src/components/credit-notes/create/locales/cs.ts +22 -8
  29. package/src/components/credit-notes/create/locales/de.ts +20 -7
  30. package/src/components/credit-notes/create/locales/en.ts +19 -5
  31. package/src/components/credit-notes/create/locales/es.ts +20 -7
  32. package/src/components/credit-notes/create/locales/et.ts +22 -8
  33. package/src/components/credit-notes/create/locales/fi.ts +23 -9
  34. package/src/components/credit-notes/create/locales/fr.ts +21 -8
  35. package/src/components/credit-notes/create/locales/hr.ts +20 -7
  36. package/src/components/credit-notes/create/locales/is.ts +22 -8
  37. package/src/components/credit-notes/create/locales/it.ts +20 -7
  38. package/src/components/credit-notes/create/locales/nb.ts +22 -8
  39. package/src/components/credit-notes/create/locales/nl.ts +20 -7
  40. package/src/components/credit-notes/create/locales/pl.ts +22 -9
  41. package/src/components/credit-notes/create/locales/pt.ts +21 -8
  42. package/src/components/credit-notes/create/locales/sk.ts +22 -8
  43. package/src/components/credit-notes/create/locales/sl.ts +19 -5
  44. package/src/components/credit-notes/create/locales/sv.ts +22 -8
  45. package/src/components/credit-notes/create/prepare-credit-note-submission.ts +35 -1
  46. package/src/components/credit-notes/credit-notes.hooks.ts +21 -2
  47. package/src/components/credit-notes/list/list-table.tsx +2 -1
  48. package/src/components/delivery-notes/create/create-delivery-note-form.tsx +133 -30
  49. package/src/components/delivery-notes/create/locales/bg.ts +1 -0
  50. package/src/components/delivery-notes/create/locales/cs.ts +1 -0
  51. package/src/components/delivery-notes/create/locales/de.ts +1 -0
  52. package/src/components/delivery-notes/create/locales/en.ts +1 -0
  53. package/src/components/delivery-notes/create/locales/es.ts +1 -0
  54. package/src/components/delivery-notes/create/locales/et.ts +1 -0
  55. package/src/components/delivery-notes/create/locales/fi.ts +1 -0
  56. package/src/components/delivery-notes/create/locales/fr.ts +1 -0
  57. package/src/components/delivery-notes/create/locales/hr.ts +1 -0
  58. package/src/components/delivery-notes/create/locales/is.ts +1 -0
  59. package/src/components/delivery-notes/create/locales/it.ts +1 -0
  60. package/src/components/delivery-notes/create/locales/nb.ts +1 -0
  61. package/src/components/delivery-notes/create/locales/nl.ts +1 -0
  62. package/src/components/delivery-notes/create/locales/pl.ts +1 -0
  63. package/src/components/delivery-notes/create/locales/pt.ts +1 -0
  64. package/src/components/delivery-notes/create/locales/sk.ts +1 -0
  65. package/src/components/delivery-notes/create/locales/sl.ts +1 -0
  66. package/src/components/delivery-notes/create/locales/sv.ts +1 -0
  67. package/src/components/delivery-notes/create/prepare-delivery-note-submission.ts +34 -1
  68. package/src/components/delivery-notes/delivery-notes.hooks.ts +15 -1
  69. package/src/components/delivery-notes/list/list-table.tsx +2 -1
  70. package/src/components/documents/create/custom-create-template.ts +151 -0
  71. package/src/components/documents/create/document-add-item-form.tsx +12 -8
  72. package/src/components/documents/create/document-add-item-tax-rate-field.tsx +1 -2
  73. package/src/components/documents/create/document-date-validation.ts +111 -0
  74. package/src/components/documents/create/document-details-section.tsx +93 -48
  75. package/src/components/documents/create/document-form-item.ts +67 -0
  76. package/src/components/documents/create/document-item-validation.ts +6 -2
  77. package/src/components/documents/create/form-types.ts +2 -2
  78. package/src/components/documents/create/linked-documents-info.tsx +2 -11
  79. package/src/components/documents/create/live-preview.tsx +3 -3
  80. package/src/components/documents/create/mark-as-paid-section.tsx +14 -11
  81. package/src/components/documents/create/payment-rows.ts +30 -0
  82. package/src/components/documents/create/prepare-document-submission.ts +143 -103
  83. package/src/components/documents/create/prepare-preview-data.ts +12 -0
  84. package/src/components/documents/create/preserved-expected-total.ts +90 -0
  85. package/src/components/documents/public/public-document-summary.tsx +6 -13
  86. package/src/components/documents/view/document-actions-bar.tsx +10 -1
  87. package/src/components/documents/view/document-details-card.tsx +4 -12
  88. package/src/components/documents/view/document-relations-list.tsx +4 -4
  89. package/src/components/documents/view/locales/bg.ts +8 -8
  90. package/src/components/documents/view/locales/cs.ts +8 -8
  91. package/src/components/documents/view/locales/de.ts +1 -1
  92. package/src/components/documents/view/locales/en.ts +14 -14
  93. package/src/components/documents/view/locales/es.ts +1 -1
  94. package/src/components/documents/view/locales/et.ts +8 -8
  95. package/src/components/documents/view/locales/fi.ts +10 -10
  96. package/src/components/documents/view/locales/fr.ts +1 -1
  97. package/src/components/documents/view/locales/hr.ts +6 -6
  98. package/src/components/documents/view/locales/is.ts +8 -8
  99. package/src/components/documents/view/locales/it.ts +1 -1
  100. package/src/components/documents/view/locales/nb.ts +8 -8
  101. package/src/components/documents/view/locales/nl.ts +1 -1
  102. package/src/components/documents/view/locales/pl.ts +1 -1
  103. package/src/components/documents/view/locales/pt.ts +1 -1
  104. package/src/components/documents/view/locales/sk.ts +8 -8
  105. package/src/components/documents/view/locales/sl.ts +9 -9
  106. package/src/components/documents/view/locales/sv.ts +1 -1
  107. package/src/components/documents/view/use-document-download.ts +2 -2
  108. package/src/components/entities/entity-settings-form/locales/bg.ts +7 -0
  109. package/src/components/entities/entity-settings-form/locales/cs.ts +7 -0
  110. package/src/components/entities/entity-settings-form/locales/de.ts +9 -0
  111. package/src/components/entities/entity-settings-form/locales/en.ts +7 -0
  112. package/src/components/entities/entity-settings-form/locales/es.ts +7 -0
  113. package/src/components/entities/entity-settings-form/locales/et.ts +7 -0
  114. package/src/components/entities/entity-settings-form/locales/fi.ts +7 -0
  115. package/src/components/entities/entity-settings-form/locales/fr.ts +7 -0
  116. package/src/components/entities/entity-settings-form/locales/hr.ts +7 -0
  117. package/src/components/entities/entity-settings-form/locales/is.ts +7 -0
  118. package/src/components/entities/entity-settings-form/locales/it.ts +7 -0
  119. package/src/components/entities/entity-settings-form/locales/nb.ts +7 -0
  120. package/src/components/entities/entity-settings-form/locales/nl.ts +7 -0
  121. package/src/components/entities/entity-settings-form/locales/pl.ts +7 -0
  122. package/src/components/entities/entity-settings-form/locales/pt.ts +7 -0
  123. package/src/components/entities/entity-settings-form/locales/sk.ts +7 -0
  124. package/src/components/entities/entity-settings-form/locales/sl.ts +12 -4
  125. package/src/components/entities/entity-settings-form/locales/sv.ts +7 -0
  126. package/src/components/entities/settings/tax-rules-settings-form.tsx +36 -0
  127. package/src/components/estimates/create/create-estimate-form.tsx +196 -47
  128. package/src/components/estimates/create/locales/bg.ts +6 -5
  129. package/src/components/estimates/create/locales/cs.ts +6 -5
  130. package/src/components/estimates/create/locales/de.ts +4 -3
  131. package/src/components/estimates/create/locales/en.ts +4 -3
  132. package/src/components/estimates/create/locales/es.ts +4 -3
  133. package/src/components/estimates/create/locales/et.ts +6 -5
  134. package/src/components/estimates/create/locales/fi.ts +9 -8
  135. package/src/components/estimates/create/locales/fr.ts +4 -3
  136. package/src/components/estimates/create/locales/hr.ts +7 -6
  137. package/src/components/estimates/create/locales/is.ts +6 -5
  138. package/src/components/estimates/create/locales/it.ts +4 -3
  139. package/src/components/estimates/create/locales/nb.ts +6 -5
  140. package/src/components/estimates/create/locales/nl.ts +4 -3
  141. package/src/components/estimates/create/locales/pl.ts +4 -3
  142. package/src/components/estimates/create/locales/pt.ts +4 -3
  143. package/src/components/estimates/create/locales/sk.ts +6 -5
  144. package/src/components/estimates/create/locales/sl.ts +7 -6
  145. package/src/components/estimates/create/locales/sv.ts +6 -5
  146. package/src/components/estimates/create/prepare-estimate-submission.ts +37 -3
  147. package/src/components/estimates/estimates.hooks.ts +11 -2
  148. package/src/components/estimates/list/list-table.tsx +11 -1
  149. package/src/components/estimates/list/locales/bg.ts +2 -0
  150. package/src/components/estimates/list/locales/cs.ts +2 -0
  151. package/src/components/estimates/list/locales/de.ts +2 -0
  152. package/src/components/estimates/list/locales/en.ts +2 -0
  153. package/src/components/estimates/list/locales/es.ts +2 -0
  154. package/src/components/estimates/list/locales/et.ts +2 -0
  155. package/src/components/estimates/list/locales/fi.ts +2 -0
  156. package/src/components/estimates/list/locales/fr.ts +2 -0
  157. package/src/components/estimates/list/locales/hr.ts +7 -5
  158. package/src/components/estimates/list/locales/is.ts +2 -0
  159. package/src/components/estimates/list/locales/it.ts +2 -0
  160. package/src/components/estimates/list/locales/nb.ts +2 -0
  161. package/src/components/estimates/list/locales/nl.ts +2 -0
  162. package/src/components/estimates/list/locales/pl.ts +2 -0
  163. package/src/components/estimates/list/locales/pt.ts +2 -0
  164. package/src/components/estimates/list/locales/sk.ts +2 -0
  165. package/src/components/estimates/list/locales/sl.ts +9 -7
  166. package/src/components/estimates/list/locales/sv.ts +2 -0
  167. package/src/components/invoices/create/create-invoice-form.tsx +231 -60
  168. package/src/components/invoices/create/locales/bg.ts +23 -14
  169. package/src/components/invoices/create/locales/cs.ts +23 -14
  170. package/src/components/invoices/create/locales/de.ts +17 -9
  171. package/src/components/invoices/create/locales/en.ts +16 -7
  172. package/src/components/invoices/create/locales/es.ts +18 -9
  173. package/src/components/invoices/create/locales/et.ts +23 -14
  174. package/src/components/invoices/create/locales/fi.ts +24 -15
  175. package/src/components/invoices/create/locales/fr.ts +19 -11
  176. package/src/components/invoices/create/locales/hr.ts +18 -9
  177. package/src/components/invoices/create/locales/is.ts +23 -14
  178. package/src/components/invoices/create/locales/it.ts +19 -11
  179. package/src/components/invoices/create/locales/nb.ts +23 -14
  180. package/src/components/invoices/create/locales/nl.ts +19 -10
  181. package/src/components/invoices/create/locales/pl.ts +19 -11
  182. package/src/components/invoices/create/locales/pt.ts +19 -10
  183. package/src/components/invoices/create/locales/sk.ts +23 -14
  184. package/src/components/invoices/create/locales/sl.ts +17 -9
  185. package/src/components/invoices/create/locales/sv.ts +17 -8
  186. package/src/components/invoices/create/prepare-invoice-submission.ts +55 -1
  187. package/src/components/invoices/invoices.hooks.ts +11 -2
  188. package/src/components/invoices/list/list-table.tsx +2 -1
  189. package/src/components/invoices/send-email-dialog/locales/bg.ts +5 -0
  190. package/src/components/invoices/send-email-dialog/locales/cs.ts +5 -0
  191. package/src/components/invoices/send-email-dialog/locales/de.ts +5 -0
  192. package/src/components/invoices/send-email-dialog/locales/en.ts +5 -0
  193. package/src/components/invoices/send-email-dialog/locales/es.ts +5 -0
  194. package/src/components/invoices/send-email-dialog/locales/et.ts +5 -0
  195. package/src/components/invoices/send-email-dialog/locales/fi.ts +5 -0
  196. package/src/components/invoices/send-email-dialog/locales/fr.ts +5 -0
  197. package/src/components/invoices/send-email-dialog/locales/hr.ts +8 -3
  198. package/src/components/invoices/send-email-dialog/locales/is.ts +5 -0
  199. package/src/components/invoices/send-email-dialog/locales/it.ts +5 -0
  200. package/src/components/invoices/send-email-dialog/locales/nb.ts +5 -0
  201. package/src/components/invoices/send-email-dialog/locales/nl.ts +5 -0
  202. package/src/components/invoices/send-email-dialog/locales/pl.ts +5 -0
  203. package/src/components/invoices/send-email-dialog/locales/pt.ts +5 -0
  204. package/src/components/invoices/send-email-dialog/locales/sk.ts +5 -0
  205. package/src/components/invoices/send-email-dialog/locales/sl.ts +8 -3
  206. package/src/components/invoices/send-email-dialog/locales/sv.ts +5 -0
  207. package/src/components/invoices/send-email-dialog/send-email-dialog.tsx +2 -1
  208. package/src/components/items/item-combobox.tsx +4 -4
  209. package/src/components/payments/create-payment-form/create-payment-form.tsx +5 -2
  210. package/src/components/payments/edit-payment-form/edit-payment-form.tsx +5 -1
  211. package/src/components/recurring-invoices/create-recurring-invoice-form/create-recurring-invoice-form.tsx +98 -22
  212. package/src/components/recurring-invoices/create-recurring-invoice-form/locales/bg.ts +26 -26
  213. package/src/components/recurring-invoices/create-recurring-invoice-form/locales/cs.ts +25 -25
  214. package/src/components/recurring-invoices/create-recurring-invoice-form/locales/et.ts +26 -26
  215. package/src/components/recurring-invoices/create-recurring-invoice-form/locales/fi.ts +36 -36
  216. package/src/components/recurring-invoices/create-recurring-invoice-form/locales/is.ts +26 -26
  217. package/src/components/recurring-invoices/create-recurring-invoice-form/locales/nb.ts +26 -26
  218. package/src/components/recurring-invoices/create-recurring-invoice-form/locales/sk.ts +25 -25
  219. package/src/components/recurring-invoices/create-recurring-invoice-form/locales/sv.ts +26 -26
  220. package/src/components/recurring-invoices/list/list-row-actions.tsx +9 -1
  221. package/src/components/recurring-invoices/list/list-table.tsx +53 -5
  222. package/src/components/recurring-invoices/list/locales/bg.ts +4 -0
  223. package/src/components/recurring-invoices/list/locales/cs.ts +4 -0
  224. package/src/components/recurring-invoices/list/locales/de.ts +4 -0
  225. package/src/components/recurring-invoices/list/locales/en.ts +4 -0
  226. package/src/components/recurring-invoices/list/locales/es.ts +4 -0
  227. package/src/components/recurring-invoices/list/locales/et.ts +4 -0
  228. package/src/components/recurring-invoices/list/locales/fi.ts +4 -0
  229. package/src/components/recurring-invoices/list/locales/fr.ts +4 -0
  230. package/src/components/recurring-invoices/list/locales/hr.ts +4 -0
  231. package/src/components/recurring-invoices/list/locales/is.ts +4 -0
  232. package/src/components/recurring-invoices/list/locales/it.ts +4 -0
  233. package/src/components/recurring-invoices/list/locales/nb.ts +4 -0
  234. package/src/components/recurring-invoices/list/locales/nl.ts +4 -0
  235. package/src/components/recurring-invoices/list/locales/pl.ts +4 -0
  236. package/src/components/recurring-invoices/list/locales/pt.ts +4 -0
  237. package/src/components/recurring-invoices/list/locales/sk.ts +4 -0
  238. package/src/components/recurring-invoices/list/locales/sl.ts +4 -0
  239. package/src/components/recurring-invoices/list/locales/sv.ts +4 -0
  240. package/src/components/tax-reports/slovenia-tax-profile-step.tsx +4 -1
  241. package/src/components/tax-reports/slovenia-yearly-export-form.tsx +3 -0
  242. package/src/components/tax-reports/slovenia-yearly-review-step.tsx +2 -1
  243. package/src/components/ui/form.tsx +5 -13
  244. package/src/components/ui/select.tsx +0 -1
  245. package/src/components/ui/sidebar.tsx +2 -2
  246. package/src/generate-schemas.ts +132 -99
  247. package/src/generated/schemas/acceptentityinvitation_body.ts +4 -3
  248. package/src/generated/schemas/accountwebhook.ts +4 -8
  249. package/src/generated/schemas/addentityuser_body.ts +4 -3
  250. package/src/generated/schemas/advanceinvoice.ts +167 -168
  251. package/src/generated/schemas/authorizeshopify_body.ts +4 -3
  252. package/src/generated/schemas/calculatedocumentpreview.ts +120 -0
  253. package/src/generated/schemas/checktransactiontype.ts +35 -0
  254. package/src/generated/schemas/creditnote.ts +203 -76
  255. package/src/generated/schemas/customadvanceinvoice.ts +172 -165
  256. package/src/generated/schemas/customcreditnote.ts +183 -155
  257. package/src/generated/schemas/customdeliverynote.ts +166 -0
  258. package/src/generated/schemas/customer.ts +4 -8
  259. package/src/generated/schemas/customestimate.ts +123 -97
  260. package/src/generated/schemas/customincomingpurchasedocument.ts +142 -0
  261. package/src/generated/schemas/custominvoice.ts +183 -154
  262. package/src/generated/schemas/deliverynote.ts +124 -79
  263. package/src/generated/schemas/einvoice.ts +19 -0
  264. package/src/generated/schemas/einvoicingsettings.ts +21 -0
  265. package/src/generated/schemas/einvoicingsupplier.ts +45 -0
  266. package/src/generated/schemas/entity.ts +44 -40
  267. package/src/generated/schemas/entityapikey.ts +1 -3
  268. package/src/generated/schemas/entityuserrole.ts +1 -3
  269. package/src/generated/schemas/estimate.ts +120 -127
  270. package/src/generated/schemas/exportsloveniavodxml_body.ts +4 -3
  271. package/src/generated/schemas/exportsloveniayearlynormiranireport_body.ts +4 -3
  272. package/src/generated/schemas/finadevice.ts +15 -0
  273. package/src/generated/schemas/finalizedocument.ts +52 -0
  274. package/src/generated/schemas/finapremise.ts +15 -0
  275. package/src/generated/schemas/finasettings.ts +1 -3
  276. package/src/generated/schemas/furselectronicdevice.ts +15 -0
  277. package/src/generated/schemas/furssettings.ts +1 -3
  278. package/src/generated/schemas/image.ts +15 -0
  279. package/src/generated/schemas/incomingpurchasedocument.ts +7 -27
  280. package/src/generated/schemas/incomingpurchasedocumentattachment.ts +15 -0
  281. package/src/generated/schemas/incomingpurchasedocumentpayment.ts +1 -3
  282. package/src/generated/schemas/index.ts +20 -5
  283. package/src/generated/schemas/invoice.ts +182 -183
  284. package/src/generated/schemas/item.ts +6 -10
  285. package/src/generated/schemas/legacymigrationauth.ts +18 -0
  286. package/src/generated/schemas/me.ts +2 -24
  287. package/src/generated/schemas/migrationjob.ts +20 -0
  288. package/src/generated/schemas/order.ts +4 -8
  289. package/src/generated/schemas/orderintegration.ts +4 -8
  290. package/src/generated/schemas/payment.ts +4 -8
  291. package/src/generated/schemas/ptatcudseries.ts +1 -3
  292. package/src/generated/schemas/queryentitystats.ts +15 -0
  293. package/src/generated/schemas/recurringinvoice.ts +4 -8
  294. package/src/generated/schemas/registerfursmovablepremise_body.ts +1 -3
  295. package/src/generated/schemas/registerfursrealestatepremise_body.ts +1 -3
  296. package/src/generated/schemas/renderadvanceinvoicepreview_body.ts +10 -16
  297. package/src/generated/schemas/rendercreditnotepreview_body.ts +10 -16
  298. package/src/generated/schemas/renderdeliverynotepreview_body.ts +9 -5
  299. package/src/generated/schemas/renderestimatepreview_body.ts +11 -7
  300. package/src/generated/schemas/renderinvoicepreview_body.ts +10 -16
  301. package/src/generated/schemas/reviewsloveniayearlynormiranireport.ts +15 -0
  302. package/src/generated/schemas/searcheinvoicingcustomer.ts +18 -0
  303. package/src/generated/schemas/senddocument_body.ts +1 -3
  304. package/src/generated/schemas/sendemail_body.ts +2 -24
  305. package/src/generated/schemas/sloveniataxprofile.ts +8 -10
  306. package/src/generated/schemas/starteslogexport_body.ts +4 -3
  307. package/src/generated/schemas/startpdfexport_body.ts +8 -87
  308. package/src/generated/schemas/stripeappconnect_body.ts +4 -3
  309. package/src/generated/schemas/stripeappcreateinvoice_body.ts +4 -6
  310. package/src/generated/schemas/stripeappmarketplaceauthorize.ts +15 -0
  311. package/src/generated/schemas/stripeappupdatesettings_body.ts +6 -6
  312. package/src/generated/schemas/supplier.ts +4 -8
  313. package/src/generated/schemas/syncshopifyorders_body.ts +4 -3
  314. package/src/generated/schemas/tax.ts +6 -8
  315. package/src/generated/schemas/uploadfile_body.ts +1 -3
  316. package/src/generated/schemas/uploadfurscertificate_body.ts +6 -6
  317. package/src/generated/schemas/userfinasettings.ts +1 -3
  318. package/src/generated/schemas/userfurssettings.ts +1 -3
  319. package/src/generated/schemas/userptsettings.ts +1 -3
  320. package/src/generated/schemas/voidinvoice_body.ts +8 -3
  321. package/src/generated/schemas/webhook.ts +4 -8
  322. package/src/generated/schemas/wlsubscriptionbillingemail.ts +17 -0
  323. package/src/hooks/use-duplicate-document.ts +74 -32
  324. package/src/lib/date-only.ts +58 -0
  325. package/src/lib/document-display.ts +18 -0
  326. package/src/lib/payment-display.ts +5 -3
  327. package/src/lib/schemas/shared.ts +11 -0
  328. package/src/providers/wl-subscription-provider.tsx +5 -0
  329. package/src/generated/schemas/account_webhook.ts +0 -43
  330. package/src/generated/schemas/previewadvanceinvoice_body.ts +0 -354
  331. package/src/generated/schemas/previewestimate_body.ts +0 -309
  332. package/src/generated/schemas/registerfinamovablepremise_body.ts +0 -26
  333. package/src/generated/schemas/registerfinarealestatepremise_body.ts +0 -37
  334. package/src/generated/schemas/renderdocument_body.ts +0 -594
@@ -0,0 +1,45 @@
1
+ /**
2
+ * This file was automatically generated using 'bun generate-schemas'.
3
+ * Do not edit this file manually. To update, run the generator again.
4
+ * @generated
5
+ */
6
+
7
+ import { z } from 'zod';
8
+
9
+ // Schemas for einvoicingsupplier endpoints
10
+
11
+ // Schema for registerEInvoicingSupplier operation
12
+ const registerEInvoicingSupplierSchemaDefinition = z.object({
13
+ company_name: z.string().min(1).max(255),
14
+ vat_number: z.string().max(50).optional(),
15
+ company_number: z.string().max(50).optional(),
16
+ iban: z.string().max(50).optional(),
17
+ address: z.string().max(500).optional(),
18
+ city: z.string().max(100).optional(),
19
+ post_code: z.string().max(20).optional(),
20
+ country_code: z.string().min(2).max(2),
21
+ contact_email: z.string().max(255).email().optional(),
22
+ contact_phone: z.string().max(50).optional(),
23
+ });
24
+
25
+
26
+ // Schema for updateEInvoicingSupplier operation
27
+ const updateEInvoicingSupplierSchemaDefinition = z
28
+ .object({
29
+ company_name: z.string().min(1).max(255),
30
+ vat_number: z.string().max(50),
31
+ company_number: z.string().max(50),
32
+ iban: z.string().max(50),
33
+ address: z.string().max(500),
34
+ city: z.string().max(100),
35
+ post_code: z.string().max(20),
36
+ country_code: z.string().min(2).max(2),
37
+ contact_email: z.string().max(255).email(),
38
+ contact_phone: z.string().max(50),
39
+ })
40
+ .partial();
41
+
42
+ export type RegisterEInvoicingSupplierSchema = z.infer<typeof registerEInvoicingSupplierSchemaDefinition>;
43
+ export const registerEInvoicingSupplierSchema = registerEInvoicingSupplierSchemaDefinition;
44
+ export type UpdateEInvoicingSupplierSchema = z.infer<typeof updateEInvoicingSupplierSchemaDefinition>;
45
+ export const updateEInvoicingSupplierSchema = updateEInvoicingSupplierSchemaDefinition;
@@ -8,7 +8,7 @@ import { z } from 'zod';
8
8
 
9
9
  // Schemas for entity endpoints
10
10
 
11
- // Schema for create entity operation
11
+ // Schema for createEntity operation
12
12
  const createEntitySchemaDefinition = z.object({
13
13
  name: z.string().min(1),
14
14
  address: z.union([z.string(), z.null()]).optional(),
@@ -34,15 +34,7 @@ const createEntitySchemaDefinition = z.object({
34
34
  settings: z
35
35
  .object({
36
36
  pdf_template: z.union([
37
- z.enum([
38
- "modern",
39
- "classic",
40
- "condensed",
41
- "minimal",
42
- "fashion",
43
- "timeless_modern_full_data",
44
- null,
45
- ]),
37
+ z.union([z.enum(["modern", "classic", "condensed", "minimal", "fashion", "timeless_modern_full_data"]), z.null()]),
46
38
  z.null(),
47
39
  ]),
48
40
  number_formats: z.union([
@@ -92,23 +84,35 @@ const createEntitySchemaDefinition = z.object({
92
84
  default_delivery_note_note: z.union([z.string(), z.null()]),
93
85
  document_footer: z.union([z.string(), z.null()]),
94
86
  default_document_signature: z.union([z.string(), z.null()]),
87
+ calculation: z.union([
88
+ z
89
+ .object({
90
+ default_mode: z.union([
91
+ z.union([z.enum(["b2b_standard", "b2c_gross_discount"]), z.null()]),
92
+ z.null(),
93
+ ]),
94
+ })
95
+ .partial()
96
+ .passthrough(),
97
+ z.null(),
98
+ ]),
95
99
  slovenia: z.union([
96
100
  z
97
101
  .object({
98
102
  business_form: z.union([
99
- z.enum(["sp", "doo", "dno", "club", null]),
103
+ z.union([z.enum(["sp", "doo", "dno", "club"]), z.null()]),
100
104
  z.null(),
101
105
  ]),
102
106
  income_tax_regime: z.union([
103
- z.enum(["normirani", "dejanski", null]),
107
+ z.union([z.enum(["normirani", "dejanski"]), z.null()]),
104
108
  z.null(),
105
109
  ]),
106
110
  vat_profile: z.union([
107
- z.enum(["standard", "special_vat_identified", null]),
111
+ z.union([z.enum(["standard", "special_vat_identified", "non_vat_subject"]), z.null()]),
108
112
  z.null(),
109
113
  ]),
110
114
  tax_residency: z.union([
111
- z.enum(["resident", "non_resident", null]),
115
+ z.union([z.enum(["resident", "non_resident"]), z.null()]),
112
116
  z.null(),
113
117
  ]),
114
118
  yearly_reporting: z.union([
@@ -117,11 +121,11 @@ const createEntitySchemaDefinition = z.object({
117
121
  activity_code: z.union([z.string(), z.null()]),
118
122
  registration_number: z.union([z.string(), z.null()]),
119
123
  accounting_type: z.union([
120
- z.enum(["records", "single_entry", "double_entry", null]),
124
+ z.union([z.enum(["records", "single_entry", "double_entry"]), z.null()]),
121
125
  z.null(),
122
126
  ]),
123
127
  normiranec_insurance_basis: z.union([
124
- z.enum(["full_time_self_employed", "other", null]),
128
+ z.union([z.enum(["full_time_self_employed", "other"]), z.null()]),
125
129
  z.null(),
126
130
  ]),
127
131
  default_withholding_tax_amount: z.union([
@@ -141,7 +145,7 @@ const createEntitySchemaDefinition = z.object({
141
145
  z
142
146
  .object({
143
147
  preferred_format: z.union([
144
- z.enum(["vod_xml", "vasco_xml", "minimax_xml", null]),
148
+ z.union([z.enum(["vod_xml", "vasco_xml", "minimax_xml"]), z.null()]),
145
149
  z.null(),
146
150
  ]),
147
151
  konto_mappings: z.union([
@@ -347,11 +351,8 @@ const createEntitySchemaDefinition = z.object({
347
351
  metadata: z.union([z.record(z.string(), z.any()), z.null()]).optional(),
348
352
  });
349
353
 
350
- // Type for create entity operation
351
- export type CreateEntitySchema = z.infer<typeof createEntitySchemaDefinition>;
352
-
353
354
 
354
- // Schema for patch entity operation
355
+ // Schema for patchEntity operation
355
356
  const patchEntitySchemaDefinition = z
356
357
  .object({
357
358
  name: z.string().min(1),
@@ -375,15 +376,7 @@ const patchEntitySchemaDefinition = z
375
376
  settings: z
376
377
  .object({
377
378
  pdf_template: z.union([
378
- z.enum([
379
- "modern",
380
- "classic",
381
- "condensed",
382
- "minimal",
383
- "fashion",
384
- "timeless_modern_full_data",
385
- null,
386
- ]),
379
+ z.union([z.enum(["modern", "classic", "condensed", "minimal", "fashion", "timeless_modern_full_data"]), z.null()]),
387
380
  z.null(),
388
381
  ]),
389
382
  number_formats: z.union([
@@ -433,23 +426,35 @@ const patchEntitySchemaDefinition = z
433
426
  default_delivery_note_note: z.union([z.string(), z.null()]),
434
427
  document_footer: z.union([z.string(), z.null()]),
435
428
  default_document_signature: z.union([z.string(), z.null()]),
429
+ calculation: z.union([
430
+ z
431
+ .object({
432
+ default_mode: z.union([
433
+ z.union([z.enum(["b2b_standard", "b2c_gross_discount"]), z.null()]),
434
+ z.null(),
435
+ ]),
436
+ })
437
+ .partial()
438
+ .passthrough(),
439
+ z.null(),
440
+ ]),
436
441
  slovenia: z.union([
437
442
  z
438
443
  .object({
439
444
  business_form: z.union([
440
- z.enum(["sp", "doo", "dno", "club", null]),
445
+ z.union([z.enum(["sp", "doo", "dno", "club"]), z.null()]),
441
446
  z.null(),
442
447
  ]),
443
448
  income_tax_regime: z.union([
444
- z.enum(["normirani", "dejanski", null]),
449
+ z.union([z.enum(["normirani", "dejanski"]), z.null()]),
445
450
  z.null(),
446
451
  ]),
447
452
  vat_profile: z.union([
448
- z.enum(["standard", "special_vat_identified", null]),
453
+ z.union([z.enum(["standard", "special_vat_identified", "non_vat_subject"]), z.null()]),
449
454
  z.null(),
450
455
  ]),
451
456
  tax_residency: z.union([
452
- z.enum(["resident", "non_resident", null]),
457
+ z.union([z.enum(["resident", "non_resident"]), z.null()]),
453
458
  z.null(),
454
459
  ]),
455
460
  yearly_reporting: z.union([
@@ -458,11 +463,11 @@ const patchEntitySchemaDefinition = z
458
463
  activity_code: z.union([z.string(), z.null()]),
459
464
  registration_number: z.union([z.string(), z.null()]),
460
465
  accounting_type: z.union([
461
- z.enum(["records", "single_entry", "double_entry", null]),
466
+ z.union([z.enum(["records", "single_entry", "double_entry"]), z.null()]),
462
467
  z.null(),
463
468
  ]),
464
469
  normiranec_insurance_basis: z.union([
465
- z.enum(["full_time_self_employed", "other", null]),
470
+ z.union([z.enum(["full_time_self_employed", "other"]), z.null()]),
466
471
  z.null(),
467
472
  ]),
468
473
  default_withholding_tax_amount: z.union([
@@ -482,7 +487,7 @@ const patchEntitySchemaDefinition = z
482
487
  z
483
488
  .object({
484
489
  preferred_format: z.union([
485
- z.enum(["vod_xml", "vasco_xml", "minimax_xml", null]),
490
+ z.union([z.enum(["vod_xml", "vasco_xml", "minimax_xml"]), z.null()]),
486
491
  z.null(),
487
492
  ]),
488
493
  konto_mappings: z.union([
@@ -691,8 +696,7 @@ const patchEntitySchemaDefinition = z
691
696
  })
692
697
  .partial();
693
698
 
694
- // Type for patch entity operation
695
- export type PatchEntitySchema = z.infer<typeof patchEntitySchemaDefinition>;
696
-
699
+ export type CreateEntitySchema = z.infer<typeof createEntitySchemaDefinition>;
697
700
  export const createEntitySchema = createEntitySchemaDefinition;
701
+ export type PatchEntitySchema = z.infer<typeof patchEntitySchemaDefinition>;
698
702
  export const patchEntitySchema = patchEntitySchemaDefinition;
@@ -8,12 +8,10 @@ import { z } from 'zod';
8
8
 
9
9
  // Schemas for entityapikey endpoints
10
10
 
11
- // Schema for create entityapikey operation
11
+ // Schema for createEntityApiKey operation
12
12
  const createEntityApiKeySchemaDefinition = z
13
13
  .object({ name: z.string().max(255), ttl: z.number().int().gte(60) })
14
14
  .partial();
15
15
 
16
- // Type for create entityapikey operation
17
16
  export type CreateEntityApiKeySchema = z.infer<typeof createEntityApiKeySchemaDefinition>;
18
-
19
17
  export const createEntityApiKeySchema = createEntityApiKeySchemaDefinition;
@@ -8,12 +8,10 @@ import { z } from 'zod';
8
8
 
9
9
  // Schemas for entityuserrole endpoints
10
10
 
11
- // Schema for update entityuserrole operation
11
+ // Schema for updateEntityUserRole operation
12
12
  const updateEntityUserRoleSchemaDefinition = z.object({
13
13
  role: z.enum(["viewer", "editor", "admin"]),
14
14
  });
15
15
 
16
- // Type for update entityuserrole operation
17
16
  export type UpdateEntityUserRoleSchema = z.infer<typeof updateEntityUserRoleSchemaDefinition>;
18
-
19
17
  export const updateEntityUserRoleSchema = updateEntityUserRoleSchemaDefinition;
@@ -8,25 +8,6 @@ import { z } from 'zod';
8
8
 
9
9
  // Schemas for estimate endpoints
10
10
 
11
- // Dependency schema for estimate
12
- const LineDiscount = z.object({
13
- value: z.number().gte(0),
14
- type: z.enum(["percent", "amount"]).optional().default("percent"),
15
- });
16
-
17
-
18
- // Dependency schema for estimate
19
- const DocumentItemTax = z
20
- .object({
21
- rate: z.number(),
22
- tax_id: z.string(),
23
- classification: z.string(),
24
- reverse_charge: z.boolean(),
25
- amount: z.number(),
26
- })
27
- .partial();
28
-
29
-
30
11
  // Dependency schema for estimate
31
12
  const DocumentEntity = z
32
13
  .object({
@@ -42,19 +23,22 @@ const DocumentEntity = z
42
23
  tax_number: z.union([z.string(), z.null()]),
43
24
  tax_number_2: z.union([z.string(), z.null()]),
44
25
  company_number: z.union([z.string(), z.null()]),
26
+ phone: z.union([z.string(), z.null()]),
27
+ peppol_id: z.union([z.string(), z.null()]),
28
+ is_end_consumer: z.union([z.boolean(), z.null()]),
45
29
  bank_account: z.union([
46
30
  z
47
31
  .object({
48
32
  type: z
49
33
  .enum(["iban", "us_domestic", "uk_domestic", "other"])
50
34
  .default("iban"),
51
- name: z.string(),
52
- bank_name: z.string(),
53
- iban: z.string(),
54
- account_number: z.string(),
55
- bic: z.string(),
56
- routing_number: z.string(),
57
- sort_code: z.string(),
35
+ name: z.union([z.string(), z.null()]),
36
+ bank_name: z.union([z.string(), z.null()]),
37
+ iban: z.union([z.string(), z.null()]),
38
+ account_number: z.union([z.string(), z.null()]),
39
+ bic: z.union([z.string(), z.null()]),
40
+ routing_number: z.union([z.string(), z.null()]),
41
+ sort_code: z.union([z.string(), z.null()]),
58
42
  })
59
43
  .partial()
60
44
  .passthrough(),
@@ -65,7 +49,93 @@ const DocumentEntity = z
65
49
  .passthrough();
66
50
 
67
51
 
68
- // Schema for create estimate operation
52
+ // Dependency schema for estimate
53
+ const CreateDocumentCustomer = DocumentEntity.and(
54
+ z.union([
55
+ z
56
+ .object({ save_customer: z.union([z.boolean(), z.null()]) })
57
+ .partial()
58
+ .passthrough(),
59
+ z.null(),
60
+ ])
61
+ );
62
+
63
+
64
+ // Dependency schema for estimate
65
+ const PtDocumentInput = z.union([
66
+ z
67
+ .object({
68
+ series_id: z.union([z.string(), z.null()]),
69
+ manual: z.union([z.boolean(), z.null()]),
70
+ manual_sequential_number: z.union([z.number(), z.null()]),
71
+ manual_series_code: z.union([z.string(), z.null()]),
72
+ operator_first_name: z.union([z.string(), z.null()]),
73
+ operator_last_name: z.union([z.string(), z.null()]),
74
+ operator_tax_number: z.union([z.string(), z.null()]),
75
+ account_first_name: z.union([z.string(), z.null()]),
76
+ account_last_name: z.union([z.string(), z.null()]),
77
+ account_tax_number: z.union([z.string(), z.null()]),
78
+ })
79
+ .partial(),
80
+ z.null(),
81
+ ]);
82
+
83
+
84
+ // Dependency schema for estimate
85
+ const DocumentItemTax = z
86
+ .object({
87
+ rate: z.union([z.number(), z.null()]),
88
+ tax_id: z.union([z.string(), z.null()]),
89
+ classification: z.union([z.string(), z.null()]),
90
+ reverse_charge: z.union([z.boolean(), z.null()]),
91
+ amount: z.union([z.number(), z.null()]),
92
+ pt_exemption_code: z.union([z.string(), z.null()]),
93
+ pt_exemption_reason: z.union([z.string(), z.null()]),
94
+ })
95
+ .partial();
96
+
97
+
98
+ // Dependency schema for estimate
99
+ const LineDiscount = z.object({
100
+ value: z.number().gte(0),
101
+ type: z.enum(["percent", "amount"]).optional().default("percent"),
102
+ });
103
+
104
+
105
+ // Dependency schema for estimate
106
+ const CreateDocumentItem = z
107
+ .object({
108
+ type: z.union([z.union([z.enum(["separator"]), z.null()]), z.null()]),
109
+ name: z.union([z.string(), z.null()]),
110
+ description: z.union([z.string(), z.null()]),
111
+ classification: z.union([
112
+ z.union([z.enum(["product", "service", "advance"]), z.null()]),
113
+ z.null(),
114
+ ]),
115
+ price: z.union([z.number(), z.null()]),
116
+ gross_price: z.union([z.number(), z.null()]),
117
+ quantity: z.union([z.number(), z.null()]),
118
+ unit: z.union([z.string(), z.null()]),
119
+ taxes: z.array(DocumentItemTax),
120
+ discounts: z.array(LineDiscount).max(5),
121
+ item_id: z.union([z.string(), z.null()]),
122
+ metadata: z.union([z.record(z.string(), z.any()), z.null()]),
123
+ save_item: z.union([z.boolean(), z.null()]),
124
+ })
125
+ .partial();
126
+
127
+
128
+ // Dependency schema for estimate
129
+ const EslogInput = z.union([
130
+ z
131
+ .object({ validation_enabled: z.union([z.boolean(), z.null()]) })
132
+ .partial()
133
+ .passthrough(),
134
+ z.null(),
135
+ ]);
136
+
137
+
138
+ // Schema for createEstimate operation
69
139
  const createEstimateSchemaDefinition = z.object({
70
140
  is_draft: z.boolean().optional(),
71
141
  date: z
@@ -74,72 +144,33 @@ const createEstimateSchemaDefinition = z.object({
74
144
  .optional(),
75
145
  issuer: DocumentEntity.optional(),
76
146
  customer_id: z.union([z.string(), z.null()]).optional(),
77
- customer: DocumentEntity.and(
78
- z.union([
79
- z
80
- .object({ save_customer: z.boolean().default(true) })
81
- .partial()
82
- .passthrough(),
83
- z.null(),
84
- ])
85
- ).optional(),
147
+ customer: CreateDocumentCustomer.optional(),
86
148
  note: z.union([z.string(), z.null()]).optional(),
87
149
  payment_terms: z.union([z.string(), z.null()]).optional(),
88
150
  tax_clause: z.union([z.string(), z.null()]).optional(),
89
151
  footer: z.union([z.string(), z.null()]).optional(),
90
152
  signature: z.union([z.string(), z.null()]).optional(),
91
- reference: z.union([z.string(), z.null()]).optional(),
153
+ calculation_mode: z
154
+ .union([z.union([z.enum(["b2b_standard", "b2c_gross_discount"]), z.null()]), z.null()])
155
+ .optional(),
92
156
  currency_code: z.string().max(3).optional(),
93
157
  metadata: z.union([z.record(z.string(), z.any()), z.null()]).optional(),
158
+ reference: z.union([z.string(), z.null()]).optional(),
159
+ pt: PtDocumentInput.optional(),
94
160
  date_valid_till: z.union([z.string(), z.null()]).optional(),
95
- title_type: z.union([z.enum(["estimate", "quote"]), z.null()]).optional(),
161
+ title_type: z
162
+ .union([z.union([z.enum(["estimate", "proforma_invoice"]), z.null()]), z.null()])
163
+ .optional(),
96
164
  date_due: z.union([z.string(), z.null()]).optional(),
97
165
  date_service: z.union([z.string(), z.null()]).optional(),
98
166
  date_service_to: z.union([z.string(), z.null()]).optional(),
99
- items: z
100
- .array(
101
- z.object({
102
- type: z.enum(["separator"]).optional(),
103
- name: z.string().min(1).optional(),
104
- description: z.union([z.string().max(4000, "Description must not exceed 4000 characters"), z.null()]).optional(),
105
- price: z.number().optional(),
106
- gross_price: z.number().optional(),
107
- quantity: z.number().gte(-140737488355328).lte(140737488355327).optional(),
108
- unit: z.union([z.string(), z.null()]).optional(),
109
- taxes: z.array(DocumentItemTax).optional(),
110
- discounts: z.array(LineDiscount).max(5).optional(),
111
- metadata: z
112
- .union([
113
- z.string(),
114
- z.number(),
115
- z.boolean(),
116
- z.null(),
117
- z.object({}).partial().passthrough(),
118
- z.array(z.unknown()),
119
- z.null(),
120
- ])
121
- .optional(),
122
- item_id: z.string().optional(),
123
- })
124
- )
125
- .min(1),
126
- eslog: z
127
- .union([
128
- z
129
- .object({ validation_enabled: z.union([z.boolean(), z.null()]) })
130
- .partial()
131
- .passthrough(),
132
- z.null(),
133
- ])
134
- .optional(),
135
- expected_total_with_tax: z.number().gt(0).optional(),
167
+ items: z.array(CreateDocumentItem).min(1),
168
+ eslog: EslogInput.optional(),
169
+ expected_total_with_tax: z.union([z.number(), z.null()]).optional(),
136
170
  });
137
171
 
138
- // Type for create estimate operation
139
- export type CreateEstimateSchema = z.infer<typeof createEstimateSchemaDefinition>;
140
172
 
141
-
142
- // Schema for update estimate operation
173
+ // Schema for updateEstimate operation
143
174
  const updateEstimateSchemaDefinition = z
144
175
  .object({
145
176
  date: z
@@ -147,62 +178,24 @@ const updateEstimateSchemaDefinition = z
147
178
  .regex(/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/),
148
179
  issuer: DocumentEntity.and(z.unknown()),
149
180
  customer_id: z.union([z.string(), z.null()]),
150
- customer: DocumentEntity.and(
151
- z.union([
152
- z
153
- .object({ save_customer: z.boolean().default(true) })
154
- .partial()
155
- .passthrough(),
156
- z.null(),
157
- ])
158
- ),
159
- items: z
160
- .array(
161
- z.object({
162
- type: z.enum(["separator"]).optional(),
163
- name: z.string().min(1).optional(),
164
- description: z.union([z.string().max(4000, "Description must not exceed 4000 characters"), z.null()]).optional(),
165
- price: z.number().optional(),
166
- gross_price: z.number().optional(),
167
- quantity: z.number().gte(-140737488355328).lte(140737488355327).optional(),
168
- unit: z.union([z.string(), z.null()]).optional(),
169
- taxes: z.array(DocumentItemTax).optional(),
170
- discounts: z.array(LineDiscount).max(5).optional(),
171
- metadata: z
172
- .union([
173
- z.string(),
174
- z.number(),
175
- z.boolean(),
176
- z.null(),
177
- z.object({}).partial().passthrough(),
178
- z.array(z.unknown()),
179
- z.null(),
180
- ])
181
- .optional(),
182
- item_id: z.string().optional(),
183
- })
184
- )
185
- .min(1),
181
+ customer: CreateDocumentCustomer,
182
+ items: z.array(CreateDocumentItem).min(1),
186
183
  note: z.union([z.string(), z.null()]),
187
- footer: z.union([z.string(), z.null()]),
188
184
  payment_terms: z.union([z.string(), z.null()]),
185
+ tax_clause: z.union([z.string(), z.null()]),
186
+ footer: z.union([z.string(), z.null()]),
187
+ signature: z.union([z.string(), z.null()]),
189
188
  currency_code: z.string(),
189
+ reference: z.union([z.string(), z.null()]),
190
190
  metadata: z.union([z.object({}).partial().passthrough(), z.null()]),
191
191
  change_reason: z.string().max(500),
192
192
  date_valid_till: z.union([z.string(), z.null()]),
193
- title_type: z.enum(["estimate", "quote"]),
194
- eslog: z.union([
195
- z
196
- .object({ validation_enabled: z.union([z.boolean(), z.null()]) })
197
- .partial()
198
- .passthrough(),
199
- z.null(),
200
- ]),
193
+ title_type: z.enum(["estimate", "proforma_invoice"]),
194
+ eslog: EslogInput,
201
195
  })
202
196
  .partial();
203
197
 
204
- // Type for update estimate operation
205
- export type UpdateEstimateSchema = z.infer<typeof updateEstimateSchemaDefinition>;
206
-
198
+ export type CreateEstimateSchema = z.infer<typeof createEstimateSchemaDefinition>;
207
199
  export const createEstimateSchema = createEstimateSchemaDefinition;
200
+ export type UpdateEstimateSchema = z.infer<typeof updateEstimateSchemaDefinition>;
208
201
  export const updateEstimateSchema = updateEstimateSchemaDefinition;
@@ -8,9 +8,10 @@ import { z } from 'zod';
8
8
 
9
9
  // Schemas for exportsloveniavodxml_body endpoints
10
10
 
11
- // Dependency schema for exportsloveniavodxml_body
12
- const exportSloveniaVodXml_Body = z
11
+ // Schema for exportSloveniaVodXml operation
12
+ const exportSloveniaVodXmlSchemaDefinition = z
13
13
  .object({ date_from: z.string(), date_to: z.string() })
14
14
  .passthrough();
15
15
 
16
-
16
+ export type ExportSloveniaVodXmlSchema = z.infer<typeof exportSloveniaVodXmlSchemaDefinition>;
17
+ export const exportSloveniaVodXmlSchema = exportSloveniaVodXmlSchemaDefinition;
@@ -8,8 +8,8 @@ import { z } from 'zod';
8
8
 
9
9
  // Schemas for exportsloveniayearlynormiranireport_body endpoints
10
10
 
11
- // Dependency schema for exportsloveniayearlynormiranireport_body
12
- const exportSloveniaYearlyNormiraniReport_Body = z
11
+ // Schema for exportSloveniaYearlyNormiraniReport operation
12
+ const exportSloveniaYearlyNormiraniReportSchemaDefinition = z
13
13
  .object({
14
14
  year: z.number().int().gte(2025).lte(2100),
15
15
  manual_values: z
@@ -24,4 +24,5 @@ const exportSloveniaYearlyNormiraniReport_Body = z
24
24
  })
25
25
  .passthrough();
26
26
 
27
-
27
+ export type ExportSloveniaYearlyNormiraniReportSchema = z.infer<typeof exportSloveniaYearlyNormiraniReportSchemaDefinition>;
28
+ export const exportSloveniaYearlyNormiraniReportSchema = exportSloveniaYearlyNormiraniReportSchemaDefinition;
@@ -0,0 +1,15 @@
1
+ /**
2
+ * This file was automatically generated using 'bun generate-schemas'.
3
+ * Do not edit this file manually. To update, run the generator again.
4
+ * @generated
5
+ */
6
+
7
+ import { z } from 'zod';
8
+
9
+ // Schemas for finadevice endpoints
10
+
11
+ // Schema for registerFinaDevice operation
12
+ const registerFinaDeviceSchemaDefinition = z.object({ code: z.string(), message: z.string() }).passthrough();
13
+
14
+ export type RegisterFinaDeviceSchema = z.infer<typeof registerFinaDeviceSchemaDefinition>;
15
+ export const registerFinaDeviceSchema = registerFinaDeviceSchemaDefinition;
@@ -0,0 +1,52 @@
1
+ /**
2
+ * This file was automatically generated using 'bun generate-schemas'.
3
+ * Do not edit this file manually. To update, run the generator again.
4
+ * @generated
5
+ */
6
+
7
+ import { z } from 'zod';
8
+
9
+ // Schemas for finalizedocument endpoints
10
+
11
+ // Dependency schema for finalizedocument
12
+ const CreateFursDocumentData = z.union([
13
+ z
14
+ .object({
15
+ business_premise_name: z.union([z.string(), z.null()]),
16
+ electronic_device_name: z.union([z.string(), z.null()]),
17
+ operator_tax_number: z.union([z.string(), z.null()]),
18
+ operator_label: z.union([z.string(), z.null()]),
19
+ skip: z.union([z.boolean(), z.null()]),
20
+ })
21
+ .partial(),
22
+ z.null(),
23
+ ]);
24
+
25
+
26
+ // Dependency schema for finalizedocument
27
+ const CreateFinaInvoiceData = z.union([
28
+ z
29
+ .object({
30
+ business_premise_name: z.union([z.string(), z.null()]),
31
+ electronic_device_name: z.union([z.string(), z.null()]),
32
+ operator_oib: z.union([z.string(), z.null()]),
33
+ operator_label: z.union([z.string(), z.null()]),
34
+ payment_type: z.union([
35
+ z.union([z.enum(["cash", "card", "online", "bank_transfer", "paypal", "crypto", "coupon", "other"]), z.null()]),
36
+ z.null(),
37
+ ]),
38
+ subsequent_submit: z.union([z.boolean(), z.null()]),
39
+ })
40
+ .partial(),
41
+ z.null(),
42
+ ]);
43
+
44
+
45
+ // Schema for finalizeDocument operation
46
+ const finalizeDocumentSchemaDefinition = z
47
+ .object({ furs: CreateFursDocumentData, fina: CreateFinaInvoiceData })
48
+ .partial()
49
+ .passthrough();
50
+
51
+ export type FinalizeDocumentSchema = z.infer<typeof finalizeDocumentSchemaDefinition>;
52
+ export const finalizeDocumentSchema = finalizeDocumentSchemaDefinition;