@spaceinvoices/react-ui 0.4.12 → 0.4.31
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/cli/dist/index.js +1 -1
- package/package.json +1 -1
- package/src/common/autocomplete.tsx +7 -1
- package/src/components/advance-invoices/advance-invoices.hooks.ts +35 -44
- package/src/components/advance-invoices/create/create-advance-invoice-form.tsx +189 -73
- package/src/components/advance-invoices/create/locales/bg.ts +17 -9
- package/src/components/advance-invoices/create/locales/cs.ts +17 -9
- package/src/components/advance-invoices/create/locales/de.ts +15 -7
- package/src/components/advance-invoices/create/locales/en.ts +15 -7
- package/src/components/advance-invoices/create/locales/es.ts +15 -7
- package/src/components/advance-invoices/create/locales/et.ts +17 -9
- package/src/components/advance-invoices/create/locales/fi.ts +18 -10
- package/src/components/advance-invoices/create/locales/fr.ts +16 -8
- package/src/components/advance-invoices/create/locales/hr.ts +15 -7
- package/src/components/advance-invoices/create/locales/is.ts +17 -9
- package/src/components/advance-invoices/create/locales/it.ts +15 -7
- package/src/components/advance-invoices/create/locales/nb.ts +17 -9
- package/src/components/advance-invoices/create/locales/nl.ts +15 -7
- package/src/components/advance-invoices/create/locales/pl.ts +17 -9
- package/src/components/advance-invoices/create/locales/pt.ts +16 -8
- package/src/components/advance-invoices/create/locales/sk.ts +17 -9
- package/src/components/advance-invoices/create/locales/sl.ts +14 -5
- package/src/components/advance-invoices/create/locales/sv.ts +17 -9
- package/src/components/advance-invoices/create/prepare-advance-invoice-submission.ts +47 -1
- package/src/components/advance-invoices/list/list-table.tsx +2 -1
- package/src/components/credit-notes/create/create-credit-note-form.tsx +253 -85
- package/src/components/credit-notes/create/locales/bg.ts +22 -8
- package/src/components/credit-notes/create/locales/cs.ts +22 -8
- package/src/components/credit-notes/create/locales/de.ts +20 -7
- package/src/components/credit-notes/create/locales/en.ts +19 -5
- package/src/components/credit-notes/create/locales/es.ts +20 -7
- package/src/components/credit-notes/create/locales/et.ts +22 -8
- package/src/components/credit-notes/create/locales/fi.ts +23 -9
- package/src/components/credit-notes/create/locales/fr.ts +21 -8
- package/src/components/credit-notes/create/locales/hr.ts +20 -7
- package/src/components/credit-notes/create/locales/is.ts +22 -8
- package/src/components/credit-notes/create/locales/it.ts +20 -7
- package/src/components/credit-notes/create/locales/nb.ts +22 -8
- package/src/components/credit-notes/create/locales/nl.ts +20 -7
- package/src/components/credit-notes/create/locales/pl.ts +22 -9
- package/src/components/credit-notes/create/locales/pt.ts +21 -8
- package/src/components/credit-notes/create/locales/sk.ts +22 -8
- package/src/components/credit-notes/create/locales/sl.ts +19 -5
- package/src/components/credit-notes/create/locales/sv.ts +22 -8
- package/src/components/credit-notes/create/prepare-credit-note-submission.ts +35 -1
- package/src/components/credit-notes/credit-notes.hooks.ts +21 -2
- package/src/components/credit-notes/list/list-table.tsx +2 -1
- package/src/components/delivery-notes/create/create-delivery-note-form.tsx +132 -30
- package/src/components/delivery-notes/create/locales/bg.ts +1 -0
- package/src/components/delivery-notes/create/locales/cs.ts +1 -0
- package/src/components/delivery-notes/create/locales/de.ts +1 -0
- package/src/components/delivery-notes/create/locales/en.ts +1 -0
- package/src/components/delivery-notes/create/locales/es.ts +1 -0
- package/src/components/delivery-notes/create/locales/et.ts +1 -0
- package/src/components/delivery-notes/create/locales/fi.ts +1 -0
- package/src/components/delivery-notes/create/locales/fr.ts +1 -0
- package/src/components/delivery-notes/create/locales/hr.ts +1 -0
- package/src/components/delivery-notes/create/locales/is.ts +1 -0
- package/src/components/delivery-notes/create/locales/it.ts +1 -0
- package/src/components/delivery-notes/create/locales/nb.ts +1 -0
- package/src/components/delivery-notes/create/locales/nl.ts +1 -0
- package/src/components/delivery-notes/create/locales/pl.ts +1 -0
- package/src/components/delivery-notes/create/locales/pt.ts +1 -0
- package/src/components/delivery-notes/create/locales/sk.ts +1 -0
- package/src/components/delivery-notes/create/locales/sl.ts +1 -0
- package/src/components/delivery-notes/create/locales/sv.ts +1 -0
- package/src/components/delivery-notes/create/prepare-delivery-note-submission.ts +34 -1
- package/src/components/delivery-notes/delivery-notes.hooks.ts +15 -1
- package/src/components/delivery-notes/list/list-table.tsx +2 -1
- package/src/components/documents/create/custom-create-template.ts +114 -0
- package/src/components/documents/create/document-add-item-form.tsx +12 -8
- package/src/components/documents/create/document-add-item-tax-rate-field.tsx +1 -2
- package/src/components/documents/create/document-date-validation.ts +111 -0
- package/src/components/documents/create/document-details-section.tsx +93 -48
- package/src/components/documents/create/document-form-item.ts +67 -0
- package/src/components/documents/create/document-item-validation.ts +6 -2
- package/src/components/documents/create/form-types.ts +2 -2
- package/src/components/documents/create/linked-documents-info.tsx +2 -11
- package/src/components/documents/create/live-preview.tsx +3 -3
- package/src/components/documents/create/mark-as-paid-section.tsx +14 -11
- package/src/components/documents/create/payment-rows.ts +30 -0
- package/src/components/documents/create/prepare-document-submission.ts +143 -103
- package/src/components/documents/create/prepare-preview-data.ts +12 -0
- package/src/components/documents/create/preserved-expected-total.ts +90 -0
- package/src/components/documents/public/public-document-summary.tsx +6 -13
- package/src/components/documents/view/document-actions-bar.tsx +10 -1
- package/src/components/documents/view/document-details-card.tsx +4 -12
- package/src/components/documents/view/document-relations-list.tsx +4 -4
- package/src/components/documents/view/locales/bg.ts +8 -8
- package/src/components/documents/view/locales/cs.ts +8 -8
- package/src/components/documents/view/locales/de.ts +1 -1
- package/src/components/documents/view/locales/en.ts +14 -14
- package/src/components/documents/view/locales/es.ts +1 -1
- package/src/components/documents/view/locales/et.ts +8 -8
- package/src/components/documents/view/locales/fi.ts +10 -10
- package/src/components/documents/view/locales/fr.ts +1 -1
- package/src/components/documents/view/locales/hr.ts +6 -6
- package/src/components/documents/view/locales/is.ts +8 -8
- package/src/components/documents/view/locales/it.ts +1 -1
- package/src/components/documents/view/locales/nb.ts +8 -8
- package/src/components/documents/view/locales/nl.ts +1 -1
- package/src/components/documents/view/locales/pl.ts +1 -1
- package/src/components/documents/view/locales/pt.ts +1 -1
- package/src/components/documents/view/locales/sk.ts +8 -8
- package/src/components/documents/view/locales/sl.ts +9 -9
- package/src/components/documents/view/locales/sv.ts +1 -1
- package/src/components/documents/view/use-document-download.ts +2 -2
- package/src/components/entities/entity-settings-form/locales/bg.ts +7 -0
- package/src/components/entities/entity-settings-form/locales/cs.ts +7 -0
- package/src/components/entities/entity-settings-form/locales/de.ts +9 -0
- package/src/components/entities/entity-settings-form/locales/en.ts +7 -0
- package/src/components/entities/entity-settings-form/locales/es.ts +7 -0
- package/src/components/entities/entity-settings-form/locales/et.ts +7 -0
- package/src/components/entities/entity-settings-form/locales/fi.ts +7 -0
- package/src/components/entities/entity-settings-form/locales/fr.ts +7 -0
- package/src/components/entities/entity-settings-form/locales/hr.ts +7 -0
- package/src/components/entities/entity-settings-form/locales/is.ts +7 -0
- package/src/components/entities/entity-settings-form/locales/it.ts +7 -0
- package/src/components/entities/entity-settings-form/locales/nb.ts +7 -0
- package/src/components/entities/entity-settings-form/locales/nl.ts +7 -0
- package/src/components/entities/entity-settings-form/locales/pl.ts +7 -0
- package/src/components/entities/entity-settings-form/locales/pt.ts +7 -0
- package/src/components/entities/entity-settings-form/locales/sk.ts +7 -0
- package/src/components/entities/entity-settings-form/locales/sl.ts +12 -4
- package/src/components/entities/entity-settings-form/locales/sv.ts +7 -0
- package/src/components/entities/settings/tax-rules-settings-form.tsx +36 -0
- package/src/components/estimates/create/create-estimate-form.tsx +195 -47
- package/src/components/estimates/create/locales/bg.ts +6 -5
- package/src/components/estimates/create/locales/cs.ts +6 -5
- package/src/components/estimates/create/locales/de.ts +4 -3
- package/src/components/estimates/create/locales/en.ts +4 -3
- package/src/components/estimates/create/locales/es.ts +4 -3
- package/src/components/estimates/create/locales/et.ts +6 -5
- package/src/components/estimates/create/locales/fi.ts +9 -8
- package/src/components/estimates/create/locales/fr.ts +4 -3
- package/src/components/estimates/create/locales/hr.ts +7 -6
- package/src/components/estimates/create/locales/is.ts +6 -5
- package/src/components/estimates/create/locales/it.ts +4 -3
- package/src/components/estimates/create/locales/nb.ts +6 -5
- package/src/components/estimates/create/locales/nl.ts +4 -3
- package/src/components/estimates/create/locales/pl.ts +4 -3
- package/src/components/estimates/create/locales/pt.ts +4 -3
- package/src/components/estimates/create/locales/sk.ts +6 -5
- package/src/components/estimates/create/locales/sl.ts +7 -6
- package/src/components/estimates/create/locales/sv.ts +6 -5
- package/src/components/estimates/create/prepare-estimate-submission.ts +37 -3
- package/src/components/estimates/estimates.hooks.ts +11 -2
- package/src/components/estimates/list/list-table.tsx +11 -1
- package/src/components/estimates/list/locales/bg.ts +2 -0
- package/src/components/estimates/list/locales/cs.ts +2 -0
- package/src/components/estimates/list/locales/de.ts +2 -0
- package/src/components/estimates/list/locales/en.ts +2 -0
- package/src/components/estimates/list/locales/es.ts +2 -0
- package/src/components/estimates/list/locales/et.ts +2 -0
- package/src/components/estimates/list/locales/fi.ts +2 -0
- package/src/components/estimates/list/locales/fr.ts +2 -0
- package/src/components/estimates/list/locales/hr.ts +7 -5
- package/src/components/estimates/list/locales/is.ts +2 -0
- package/src/components/estimates/list/locales/it.ts +2 -0
- package/src/components/estimates/list/locales/nb.ts +2 -0
- package/src/components/estimates/list/locales/nl.ts +2 -0
- package/src/components/estimates/list/locales/pl.ts +2 -0
- package/src/components/estimates/list/locales/pt.ts +2 -0
- package/src/components/estimates/list/locales/sk.ts +2 -0
- package/src/components/estimates/list/locales/sl.ts +9 -7
- package/src/components/estimates/list/locales/sv.ts +2 -0
- package/src/components/invoices/create/create-invoice-form.tsx +230 -60
- package/src/components/invoices/create/locales/bg.ts +23 -14
- package/src/components/invoices/create/locales/cs.ts +23 -14
- package/src/components/invoices/create/locales/de.ts +17 -9
- package/src/components/invoices/create/locales/en.ts +16 -7
- package/src/components/invoices/create/locales/es.ts +18 -9
- package/src/components/invoices/create/locales/et.ts +23 -14
- package/src/components/invoices/create/locales/fi.ts +24 -15
- package/src/components/invoices/create/locales/fr.ts +19 -11
- package/src/components/invoices/create/locales/hr.ts +18 -9
- package/src/components/invoices/create/locales/is.ts +23 -14
- package/src/components/invoices/create/locales/it.ts +19 -11
- package/src/components/invoices/create/locales/nb.ts +23 -14
- package/src/components/invoices/create/locales/nl.ts +19 -10
- package/src/components/invoices/create/locales/pl.ts +19 -11
- package/src/components/invoices/create/locales/pt.ts +19 -10
- package/src/components/invoices/create/locales/sk.ts +23 -14
- package/src/components/invoices/create/locales/sl.ts +17 -9
- package/src/components/invoices/create/locales/sv.ts +17 -8
- package/src/components/invoices/create/prepare-invoice-submission.ts +55 -1
- package/src/components/invoices/invoices.hooks.ts +11 -2
- package/src/components/invoices/list/list-table.tsx +2 -1
- package/src/components/invoices/send-email-dialog/locales/bg.ts +5 -0
- package/src/components/invoices/send-email-dialog/locales/cs.ts +5 -0
- package/src/components/invoices/send-email-dialog/locales/de.ts +5 -0
- package/src/components/invoices/send-email-dialog/locales/en.ts +5 -0
- package/src/components/invoices/send-email-dialog/locales/es.ts +5 -0
- package/src/components/invoices/send-email-dialog/locales/et.ts +5 -0
- package/src/components/invoices/send-email-dialog/locales/fi.ts +5 -0
- package/src/components/invoices/send-email-dialog/locales/fr.ts +5 -0
- package/src/components/invoices/send-email-dialog/locales/hr.ts +8 -3
- package/src/components/invoices/send-email-dialog/locales/is.ts +5 -0
- package/src/components/invoices/send-email-dialog/locales/it.ts +5 -0
- package/src/components/invoices/send-email-dialog/locales/nb.ts +5 -0
- package/src/components/invoices/send-email-dialog/locales/nl.ts +5 -0
- package/src/components/invoices/send-email-dialog/locales/pl.ts +5 -0
- package/src/components/invoices/send-email-dialog/locales/pt.ts +5 -0
- package/src/components/invoices/send-email-dialog/locales/sk.ts +5 -0
- package/src/components/invoices/send-email-dialog/locales/sl.ts +8 -3
- package/src/components/invoices/send-email-dialog/locales/sv.ts +5 -0
- package/src/components/invoices/send-email-dialog/send-email-dialog.tsx +2 -1
- package/src/components/items/item-combobox.tsx +4 -4
- package/src/components/payments/create-payment-form/create-payment-form.tsx +5 -2
- package/src/components/payments/edit-payment-form/edit-payment-form.tsx +5 -1
- package/src/components/recurring-invoices/create-recurring-invoice-form/create-recurring-invoice-form.tsx +98 -22
- package/src/components/recurring-invoices/create-recurring-invoice-form/locales/bg.ts +26 -26
- package/src/components/recurring-invoices/create-recurring-invoice-form/locales/cs.ts +25 -25
- package/src/components/recurring-invoices/create-recurring-invoice-form/locales/et.ts +26 -26
- package/src/components/recurring-invoices/create-recurring-invoice-form/locales/fi.ts +36 -36
- package/src/components/recurring-invoices/create-recurring-invoice-form/locales/is.ts +26 -26
- package/src/components/recurring-invoices/create-recurring-invoice-form/locales/nb.ts +26 -26
- package/src/components/recurring-invoices/create-recurring-invoice-form/locales/sk.ts +25 -25
- package/src/components/recurring-invoices/create-recurring-invoice-form/locales/sv.ts +26 -26
- package/src/components/recurring-invoices/list/list-row-actions.tsx +9 -1
- package/src/components/recurring-invoices/list/list-table.tsx +53 -5
- package/src/components/recurring-invoices/list/locales/bg.ts +4 -0
- package/src/components/recurring-invoices/list/locales/cs.ts +4 -0
- package/src/components/recurring-invoices/list/locales/de.ts +4 -0
- package/src/components/recurring-invoices/list/locales/en.ts +4 -0
- package/src/components/recurring-invoices/list/locales/es.ts +4 -0
- package/src/components/recurring-invoices/list/locales/et.ts +4 -0
- package/src/components/recurring-invoices/list/locales/fi.ts +4 -0
- package/src/components/recurring-invoices/list/locales/fr.ts +4 -0
- package/src/components/recurring-invoices/list/locales/hr.ts +4 -0
- package/src/components/recurring-invoices/list/locales/is.ts +4 -0
- package/src/components/recurring-invoices/list/locales/it.ts +4 -0
- package/src/components/recurring-invoices/list/locales/nb.ts +4 -0
- package/src/components/recurring-invoices/list/locales/nl.ts +4 -0
- package/src/components/recurring-invoices/list/locales/pl.ts +4 -0
- package/src/components/recurring-invoices/list/locales/pt.ts +4 -0
- package/src/components/recurring-invoices/list/locales/sk.ts +4 -0
- package/src/components/recurring-invoices/list/locales/sl.ts +4 -0
- package/src/components/recurring-invoices/list/locales/sv.ts +4 -0
- package/src/components/tax-reports/slovenia-tax-profile-step.tsx +4 -1
- package/src/components/tax-reports/slovenia-yearly-export-form.tsx +3 -0
- package/src/components/tax-reports/slovenia-yearly-review-step.tsx +2 -1
- package/src/components/ui/form.tsx +5 -13
- package/src/components/ui/select.tsx +0 -1
- package/src/components/ui/sidebar.tsx +2 -2
- package/src/generate-schemas.ts +132 -99
- package/src/generated/schemas/acceptentityinvitation_body.ts +4 -3
- package/src/generated/schemas/accountwebhook.ts +4 -8
- package/src/generated/schemas/addentityuser_body.ts +4 -3
- package/src/generated/schemas/advanceinvoice.ts +167 -168
- package/src/generated/schemas/authorizeshopify_body.ts +4 -3
- package/src/generated/schemas/calculatedocumentpreview.ts +120 -0
- package/src/generated/schemas/checktransactiontype.ts +35 -0
- package/src/generated/schemas/creditnote.ts +203 -76
- package/src/generated/schemas/customadvanceinvoice.ts +172 -165
- package/src/generated/schemas/customcreditnote.ts +183 -155
- package/src/generated/schemas/customdeliverynote.ts +166 -0
- package/src/generated/schemas/customer.ts +4 -8
- package/src/generated/schemas/customestimate.ts +123 -97
- package/src/generated/schemas/customincomingpurchasedocument.ts +142 -0
- package/src/generated/schemas/custominvoice.ts +183 -154
- package/src/generated/schemas/deliverynote.ts +124 -79
- package/src/generated/schemas/einvoice.ts +19 -0
- package/src/generated/schemas/einvoicingsettings.ts +21 -0
- package/src/generated/schemas/einvoicingsupplier.ts +45 -0
- package/src/generated/schemas/entity.ts +44 -40
- package/src/generated/schemas/entityapikey.ts +1 -3
- package/src/generated/schemas/entityuserrole.ts +1 -3
- package/src/generated/schemas/estimate.ts +120 -127
- package/src/generated/schemas/exportsloveniavodxml_body.ts +4 -3
- package/src/generated/schemas/exportsloveniayearlynormiranireport_body.ts +4 -3
- package/src/generated/schemas/finadevice.ts +15 -0
- package/src/generated/schemas/finalizedocument.ts +52 -0
- package/src/generated/schemas/finapremise.ts +15 -0
- package/src/generated/schemas/finasettings.ts +1 -3
- package/src/generated/schemas/furselectronicdevice.ts +15 -0
- package/src/generated/schemas/furssettings.ts +1 -3
- package/src/generated/schemas/image.ts +15 -0
- package/src/generated/schemas/incomingpurchasedocument.ts +7 -27
- package/src/generated/schemas/incomingpurchasedocumentattachment.ts +15 -0
- package/src/generated/schemas/incomingpurchasedocumentpayment.ts +1 -3
- package/src/generated/schemas/index.ts +20 -5
- package/src/generated/schemas/invoice.ts +182 -183
- package/src/generated/schemas/item.ts +6 -10
- package/src/generated/schemas/legacymigrationauth.ts +18 -0
- package/src/generated/schemas/me.ts +2 -24
- package/src/generated/schemas/migrationjob.ts +20 -0
- package/src/generated/schemas/order.ts +4 -8
- package/src/generated/schemas/orderintegration.ts +4 -8
- package/src/generated/schemas/payment.ts +4 -8
- package/src/generated/schemas/ptatcudseries.ts +1 -3
- package/src/generated/schemas/queryentitystats.ts +15 -0
- package/src/generated/schemas/recurringinvoice.ts +4 -8
- package/src/generated/schemas/registerfursmovablepremise_body.ts +1 -3
- package/src/generated/schemas/registerfursrealestatepremise_body.ts +1 -3
- package/src/generated/schemas/renderadvanceinvoicepreview_body.ts +10 -16
- package/src/generated/schemas/rendercreditnotepreview_body.ts +10 -16
- package/src/generated/schemas/renderdeliverynotepreview_body.ts +9 -5
- package/src/generated/schemas/renderestimatepreview_body.ts +11 -7
- package/src/generated/schemas/renderinvoicepreview_body.ts +10 -16
- package/src/generated/schemas/reviewsloveniayearlynormiranireport.ts +15 -0
- package/src/generated/schemas/searcheinvoicingcustomer.ts +18 -0
- package/src/generated/schemas/senddocument_body.ts +1 -3
- package/src/generated/schemas/sendemail_body.ts +2 -24
- package/src/generated/schemas/sloveniataxprofile.ts +8 -10
- package/src/generated/schemas/starteslogexport_body.ts +4 -3
- package/src/generated/schemas/startpdfexport_body.ts +8 -87
- package/src/generated/schemas/stripeappconnect_body.ts +4 -3
- package/src/generated/schemas/stripeappcreateinvoice_body.ts +4 -6
- package/src/generated/schemas/stripeappmarketplaceauthorize.ts +15 -0
- package/src/generated/schemas/stripeappupdatesettings_body.ts +6 -6
- package/src/generated/schemas/supplier.ts +4 -8
- package/src/generated/schemas/syncshopifyorders_body.ts +4 -3
- package/src/generated/schemas/tax.ts +6 -8
- package/src/generated/schemas/uploadfile_body.ts +1 -3
- package/src/generated/schemas/uploadfurscertificate_body.ts +6 -6
- package/src/generated/schemas/userfinasettings.ts +1 -3
- package/src/generated/schemas/userfurssettings.ts +1 -3
- package/src/generated/schemas/userptsettings.ts +1 -3
- package/src/generated/schemas/voidinvoice_body.ts +8 -3
- package/src/generated/schemas/webhook.ts +4 -8
- package/src/generated/schemas/wlsubscriptionbillingemail.ts +17 -0
- package/src/hooks/use-duplicate-document.ts +61 -30
- package/src/lib/date-only.ts +58 -0
- package/src/lib/document-display.ts +18 -0
- package/src/lib/payment-display.ts +5 -3
- package/src/lib/schemas/shared.ts +11 -0
- package/src/providers/wl-subscription-provider.tsx +5 -0
- package/src/generated/schemas/account_webhook.ts +0 -43
- package/src/generated/schemas/previewadvanceinvoice_body.ts +0 -354
- package/src/generated/schemas/previewestimate_body.ts +0 -309
- package/src/generated/schemas/registerfinamovablepremise_body.ts +0 -26
- package/src/generated/schemas/registerfinarealestatepremise_body.ts +0 -37
- package/src/generated/schemas/renderdocument_body.ts +0 -594
|
@@ -1,594 +0,0 @@
|
|
|
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 renderdocument_body endpoints
|
|
10
|
-
|
|
11
|
-
// Dependency schema for renderdocument_body
|
|
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 renderdocument_body
|
|
19
|
-
const CompleteEstimatePreview = z.object({
|
|
20
|
-
is_draft: z.boolean().optional(),
|
|
21
|
-
date: z
|
|
22
|
-
.string()
|
|
23
|
-
.regex(/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/)
|
|
24
|
-
.optional(),
|
|
25
|
-
issuer: z
|
|
26
|
-
.object({
|
|
27
|
-
name: z.union([z.string(), z.null()]),
|
|
28
|
-
email: z.union([z.string(), z.null()]),
|
|
29
|
-
address: z.union([z.string(), z.null()]),
|
|
30
|
-
address_2: z.union([z.string(), z.null()]),
|
|
31
|
-
post_code: z.union([z.string(), z.null()]),
|
|
32
|
-
city: z.union([z.string(), z.null()]),
|
|
33
|
-
state: z.union([z.string(), z.null()]),
|
|
34
|
-
country: z.union([z.string(), z.null()]),
|
|
35
|
-
country_code: z.union([z.string(), z.null()]),
|
|
36
|
-
tax_number: z.union([z.string(), z.null()]),
|
|
37
|
-
bank_account: z.union([
|
|
38
|
-
z
|
|
39
|
-
.object({
|
|
40
|
-
type: z
|
|
41
|
-
.enum(["iban", "us_domestic", "uk_domestic", "other"])
|
|
42
|
-
.default("iban"),
|
|
43
|
-
name: z.string(),
|
|
44
|
-
bank_name: z.string(),
|
|
45
|
-
iban: z.string(),
|
|
46
|
-
account_number: z.string(),
|
|
47
|
-
bic: z.string(),
|
|
48
|
-
routing_number: z.string(),
|
|
49
|
-
sort_code: z.string(),
|
|
50
|
-
})
|
|
51
|
-
.partial()
|
|
52
|
-
.passthrough(),
|
|
53
|
-
z.null(),
|
|
54
|
-
]),
|
|
55
|
-
})
|
|
56
|
-
.partial()
|
|
57
|
-
.passthrough()
|
|
58
|
-
.optional(),
|
|
59
|
-
customer_id: z.union([z.string(), z.null()]).optional(),
|
|
60
|
-
customer: z
|
|
61
|
-
.union([
|
|
62
|
-
z
|
|
63
|
-
.object({
|
|
64
|
-
name: z.union([z.string(), z.null()]),
|
|
65
|
-
email: z.union([z.string(), z.null()]),
|
|
66
|
-
address: z.union([z.string(), z.null()]),
|
|
67
|
-
address_2: z.union([z.string(), z.null()]),
|
|
68
|
-
post_code: z.union([z.string(), z.null()]),
|
|
69
|
-
city: z.union([z.string(), z.null()]),
|
|
70
|
-
state: z.union([z.string(), z.null()]),
|
|
71
|
-
country: z.union([z.string(), z.null()]),
|
|
72
|
-
country_code: z.union([z.string(), z.null()]),
|
|
73
|
-
tax_number: z.union([z.string(), z.null()]),
|
|
74
|
-
bank_account: z.union([
|
|
75
|
-
z
|
|
76
|
-
.object({
|
|
77
|
-
type: z
|
|
78
|
-
.enum(["iban", "us_domestic", "uk_domestic", "other"])
|
|
79
|
-
.default("iban"),
|
|
80
|
-
name: z.string(),
|
|
81
|
-
bank_name: z.string(),
|
|
82
|
-
iban: z.string(),
|
|
83
|
-
account_number: z.string(),
|
|
84
|
-
bic: z.string(),
|
|
85
|
-
routing_number: z.string(),
|
|
86
|
-
sort_code: z.string(),
|
|
87
|
-
})
|
|
88
|
-
.partial()
|
|
89
|
-
.passthrough(),
|
|
90
|
-
z.null(),
|
|
91
|
-
]),
|
|
92
|
-
save_customer: z.boolean().default(true),
|
|
93
|
-
})
|
|
94
|
-
.partial()
|
|
95
|
-
.passthrough(),
|
|
96
|
-
z.null(),
|
|
97
|
-
])
|
|
98
|
-
.optional(),
|
|
99
|
-
note: z.union([z.string(), z.null()]).optional(),
|
|
100
|
-
payment_terms: z.union([z.string(), z.null()]).optional(),
|
|
101
|
-
currency_code: z.string().max(3).optional(),
|
|
102
|
-
metadata: z.union([z.record(z.string(), z.any()), z.null()]).optional(),
|
|
103
|
-
date_valid_till: z.union([z.string(), z.null()]).optional(),
|
|
104
|
-
title_type: z.union([z.enum(["estimate", "quote"]), z.null()]).optional(),
|
|
105
|
-
date_due: z.union([z.string(), z.null()]).optional(),
|
|
106
|
-
date_service: z.union([z.string(), z.null()]).optional(),
|
|
107
|
-
date_service_to: z.union([z.string(), z.null()]).optional(),
|
|
108
|
-
items: z
|
|
109
|
-
.array(
|
|
110
|
-
z.object({
|
|
111
|
-
name: z.string().min(1),
|
|
112
|
-
description: z.union([z.string(), z.null()]).optional(),
|
|
113
|
-
price: z.number().optional(),
|
|
114
|
-
gross_price: z.number().optional(),
|
|
115
|
-
quantity: z.number().gte(-140737488355328).lte(140737488355327),
|
|
116
|
-
unit: z.union([z.string(), z.null()]).optional(),
|
|
117
|
-
taxes: z
|
|
118
|
-
.array(
|
|
119
|
-
z
|
|
120
|
-
.object({
|
|
121
|
-
rate: z.number(),
|
|
122
|
-
tax_id: z.string(),
|
|
123
|
-
classification: z.string(),
|
|
124
|
-
reverse_charge: z.boolean(),
|
|
125
|
-
amount: z.number(),
|
|
126
|
-
})
|
|
127
|
-
.partial()
|
|
128
|
-
)
|
|
129
|
-
.optional(),
|
|
130
|
-
discounts: z.array(LineDiscount).max(5).optional(),
|
|
131
|
-
metadata: z
|
|
132
|
-
.union([
|
|
133
|
-
z.string(),
|
|
134
|
-
z.number(),
|
|
135
|
-
z.boolean(),
|
|
136
|
-
z.null(),
|
|
137
|
-
z.object({}).partial().passthrough(),
|
|
138
|
-
z.array(z.unknown()),
|
|
139
|
-
z.null(),
|
|
140
|
-
])
|
|
141
|
-
.optional(),
|
|
142
|
-
})
|
|
143
|
-
)
|
|
144
|
-
.min(1),
|
|
145
|
-
eslog: z
|
|
146
|
-
.union([
|
|
147
|
-
z
|
|
148
|
-
.object({ validation_enabled: z.union([z.boolean(), z.null()]) })
|
|
149
|
-
.partial()
|
|
150
|
-
.passthrough(),
|
|
151
|
-
z.null(),
|
|
152
|
-
])
|
|
153
|
-
.optional(),
|
|
154
|
-
});
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
// Dependency schema for renderdocument_body
|
|
158
|
-
const PartialEstimatePreview = z.object({
|
|
159
|
-
is_draft: z.boolean().optional(),
|
|
160
|
-
date: z
|
|
161
|
-
.string()
|
|
162
|
-
.regex(/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/)
|
|
163
|
-
.optional(),
|
|
164
|
-
issuer: z
|
|
165
|
-
.object({
|
|
166
|
-
name: z.union([z.string(), z.null()]),
|
|
167
|
-
email: z.union([z.string(), z.null()]),
|
|
168
|
-
address: z.union([z.string(), z.null()]),
|
|
169
|
-
address_2: z.union([z.string(), z.null()]),
|
|
170
|
-
post_code: z.union([z.string(), z.null()]),
|
|
171
|
-
city: z.union([z.string(), z.null()]),
|
|
172
|
-
state: z.union([z.string(), z.null()]),
|
|
173
|
-
country: z.union([z.string(), z.null()]),
|
|
174
|
-
country_code: z.union([z.string(), z.null()]),
|
|
175
|
-
tax_number: z.union([z.string(), z.null()]),
|
|
176
|
-
bank_account: z.union([
|
|
177
|
-
z
|
|
178
|
-
.object({
|
|
179
|
-
type: z
|
|
180
|
-
.enum(["iban", "us_domestic", "uk_domestic", "other"])
|
|
181
|
-
.default("iban"),
|
|
182
|
-
name: z.string(),
|
|
183
|
-
bank_name: z.string(),
|
|
184
|
-
iban: z.string(),
|
|
185
|
-
account_number: z.string(),
|
|
186
|
-
bic: z.string(),
|
|
187
|
-
routing_number: z.string(),
|
|
188
|
-
sort_code: z.string(),
|
|
189
|
-
})
|
|
190
|
-
.partial()
|
|
191
|
-
.passthrough(),
|
|
192
|
-
z.null(),
|
|
193
|
-
]),
|
|
194
|
-
})
|
|
195
|
-
.partial()
|
|
196
|
-
.passthrough()
|
|
197
|
-
.optional(),
|
|
198
|
-
customer_id: z.union([z.string(), z.null()]).optional(),
|
|
199
|
-
customer: z
|
|
200
|
-
.union([
|
|
201
|
-
z
|
|
202
|
-
.object({
|
|
203
|
-
name: z.union([z.string(), z.null()]),
|
|
204
|
-
email: z.union([z.string(), z.null()]),
|
|
205
|
-
address: z.union([z.string(), z.null()]),
|
|
206
|
-
address_2: z.union([z.string(), z.null()]),
|
|
207
|
-
post_code: z.union([z.string(), z.null()]),
|
|
208
|
-
city: z.union([z.string(), z.null()]),
|
|
209
|
-
state: z.union([z.string(), z.null()]),
|
|
210
|
-
country: z.union([z.string(), z.null()]),
|
|
211
|
-
country_code: z.union([z.string(), z.null()]),
|
|
212
|
-
tax_number: z.union([z.string(), z.null()]),
|
|
213
|
-
bank_account: z.union([
|
|
214
|
-
z
|
|
215
|
-
.object({
|
|
216
|
-
type: z
|
|
217
|
-
.enum(["iban", "us_domestic", "uk_domestic", "other"])
|
|
218
|
-
.default("iban"),
|
|
219
|
-
name: z.string(),
|
|
220
|
-
bank_name: z.string(),
|
|
221
|
-
iban: z.string(),
|
|
222
|
-
account_number: z.string(),
|
|
223
|
-
bic: z.string(),
|
|
224
|
-
routing_number: z.string(),
|
|
225
|
-
sort_code: z.string(),
|
|
226
|
-
})
|
|
227
|
-
.partial()
|
|
228
|
-
.passthrough(),
|
|
229
|
-
z.null(),
|
|
230
|
-
]),
|
|
231
|
-
save_customer: z.boolean().default(true),
|
|
232
|
-
})
|
|
233
|
-
.partial()
|
|
234
|
-
.passthrough(),
|
|
235
|
-
z.null(),
|
|
236
|
-
])
|
|
237
|
-
.optional(),
|
|
238
|
-
note: z.union([z.string(), z.null()]).optional(),
|
|
239
|
-
payment_terms: z.union([z.string(), z.null()]).optional(),
|
|
240
|
-
currency_code: z.string().max(3).optional(),
|
|
241
|
-
metadata: z.union([z.record(z.string(), z.any()), z.null()]).optional(),
|
|
242
|
-
date_valid_till: z.union([z.string(), z.null()]).optional(),
|
|
243
|
-
title_type: z.union([z.enum(["estimate", "quote"]), z.null()]).optional(),
|
|
244
|
-
date_due: z.union([z.string(), z.null()]).optional(),
|
|
245
|
-
date_service: z.union([z.string(), z.null()]).optional(),
|
|
246
|
-
date_service_to: z.union([z.string(), z.null()]).optional(),
|
|
247
|
-
items: z
|
|
248
|
-
.array(
|
|
249
|
-
z
|
|
250
|
-
.object({
|
|
251
|
-
name: z.string(),
|
|
252
|
-
quantity: z.number(),
|
|
253
|
-
price: z.number(),
|
|
254
|
-
gross_price: z.number(),
|
|
255
|
-
description: z.string(),
|
|
256
|
-
taxes: z.array(
|
|
257
|
-
z
|
|
258
|
-
.object({ rate: z.number(), tax_id: z.string() })
|
|
259
|
-
.partial()
|
|
260
|
-
.passthrough()
|
|
261
|
-
),
|
|
262
|
-
metadata: z.record(z.string(), z.any()),
|
|
263
|
-
})
|
|
264
|
-
.partial()
|
|
265
|
-
.passthrough()
|
|
266
|
-
)
|
|
267
|
-
.min(1),
|
|
268
|
-
eslog: z
|
|
269
|
-
.union([
|
|
270
|
-
z
|
|
271
|
-
.object({ validation_enabled: z.union([z.boolean(), z.null()]) })
|
|
272
|
-
.partial()
|
|
273
|
-
.passthrough(),
|
|
274
|
-
z.null(),
|
|
275
|
-
])
|
|
276
|
-
.optional(),
|
|
277
|
-
});
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
// Dependency schema for renderdocument_body
|
|
281
|
-
const CompleteDocumentPreview = z.object({
|
|
282
|
-
is_draft: z.boolean().optional(),
|
|
283
|
-
date: z
|
|
284
|
-
.string()
|
|
285
|
-
.regex(/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/)
|
|
286
|
-
.optional(),
|
|
287
|
-
issuer: z
|
|
288
|
-
.object({
|
|
289
|
-
name: z.union([z.string(), z.null()]),
|
|
290
|
-
email: z.union([z.string(), z.null()]),
|
|
291
|
-
address: z.union([z.string(), z.null()]),
|
|
292
|
-
address_2: z.union([z.string(), z.null()]),
|
|
293
|
-
post_code: z.union([z.string(), z.null()]),
|
|
294
|
-
city: z.union([z.string(), z.null()]),
|
|
295
|
-
state: z.union([z.string(), z.null()]),
|
|
296
|
-
country: z.union([z.string(), z.null()]),
|
|
297
|
-
country_code: z.union([z.string(), z.null()]),
|
|
298
|
-
tax_number: z.union([z.string(), z.null()]),
|
|
299
|
-
bank_account: z.union([
|
|
300
|
-
z
|
|
301
|
-
.object({
|
|
302
|
-
type: z
|
|
303
|
-
.enum(["iban", "us_domestic", "uk_domestic", "other"])
|
|
304
|
-
.default("iban"),
|
|
305
|
-
name: z.string(),
|
|
306
|
-
bank_name: z.string(),
|
|
307
|
-
iban: z.string(),
|
|
308
|
-
account_number: z.string(),
|
|
309
|
-
bic: z.string(),
|
|
310
|
-
routing_number: z.string(),
|
|
311
|
-
sort_code: z.string(),
|
|
312
|
-
})
|
|
313
|
-
.partial()
|
|
314
|
-
.passthrough(),
|
|
315
|
-
z.null(),
|
|
316
|
-
]),
|
|
317
|
-
})
|
|
318
|
-
.partial()
|
|
319
|
-
.passthrough()
|
|
320
|
-
.optional(),
|
|
321
|
-
customer_id: z.union([z.string(), z.null()]).optional(),
|
|
322
|
-
customer: z
|
|
323
|
-
.union([
|
|
324
|
-
z
|
|
325
|
-
.object({
|
|
326
|
-
name: z.union([z.string(), z.null()]),
|
|
327
|
-
email: z.union([z.string(), z.null()]),
|
|
328
|
-
address: z.union([z.string(), z.null()]),
|
|
329
|
-
address_2: z.union([z.string(), z.null()]),
|
|
330
|
-
post_code: z.union([z.string(), z.null()]),
|
|
331
|
-
city: z.union([z.string(), z.null()]),
|
|
332
|
-
state: z.union([z.string(), z.null()]),
|
|
333
|
-
country: z.union([z.string(), z.null()]),
|
|
334
|
-
country_code: z.union([z.string(), z.null()]),
|
|
335
|
-
tax_number: z.union([z.string(), z.null()]),
|
|
336
|
-
bank_account: z.union([
|
|
337
|
-
z
|
|
338
|
-
.object({
|
|
339
|
-
type: z
|
|
340
|
-
.enum(["iban", "us_domestic", "uk_domestic", "other"])
|
|
341
|
-
.default("iban"),
|
|
342
|
-
name: z.string(),
|
|
343
|
-
bank_name: z.string(),
|
|
344
|
-
iban: z.string(),
|
|
345
|
-
account_number: z.string(),
|
|
346
|
-
bic: z.string(),
|
|
347
|
-
routing_number: z.string(),
|
|
348
|
-
sort_code: z.string(),
|
|
349
|
-
})
|
|
350
|
-
.partial()
|
|
351
|
-
.passthrough(),
|
|
352
|
-
z.null(),
|
|
353
|
-
]),
|
|
354
|
-
save_customer: z.boolean().default(true),
|
|
355
|
-
})
|
|
356
|
-
.partial()
|
|
357
|
-
.passthrough(),
|
|
358
|
-
z.null(),
|
|
359
|
-
])
|
|
360
|
-
.optional(),
|
|
361
|
-
note: z.union([z.string(), z.null()]).optional(),
|
|
362
|
-
payment_terms: z.union([z.string(), z.null()]).optional(),
|
|
363
|
-
currency_code: z.string().max(3).optional(),
|
|
364
|
-
metadata: z.union([z.record(z.string(), z.any()), z.null()]).optional(),
|
|
365
|
-
date_due: z.union([z.string(), z.null()]).optional(),
|
|
366
|
-
date_service: z.union([z.string(), z.null()]).optional(),
|
|
367
|
-
date_service_to: z.union([z.string(), z.null()]).optional(),
|
|
368
|
-
items: z
|
|
369
|
-
.array(
|
|
370
|
-
z.object({
|
|
371
|
-
name: z.string().min(1),
|
|
372
|
-
description: z.union([z.string(), z.null()]).optional(),
|
|
373
|
-
price: z.number().optional(),
|
|
374
|
-
gross_price: z.number().optional(),
|
|
375
|
-
quantity: z.number().gte(-140737488355328).lte(140737488355327),
|
|
376
|
-
unit: z.union([z.string(), z.null()]).optional(),
|
|
377
|
-
taxes: z
|
|
378
|
-
.array(
|
|
379
|
-
z
|
|
380
|
-
.object({
|
|
381
|
-
rate: z.number(),
|
|
382
|
-
tax_id: z.string(),
|
|
383
|
-
classification: z.string(),
|
|
384
|
-
reverse_charge: z.boolean(),
|
|
385
|
-
amount: z.number(),
|
|
386
|
-
})
|
|
387
|
-
.partial()
|
|
388
|
-
)
|
|
389
|
-
.optional(),
|
|
390
|
-
discounts: z.array(LineDiscount).max(5).optional(),
|
|
391
|
-
metadata: z
|
|
392
|
-
.union([
|
|
393
|
-
z.string(),
|
|
394
|
-
z.number(),
|
|
395
|
-
z.boolean(),
|
|
396
|
-
z.null(),
|
|
397
|
-
z.object({}).partial().passthrough(),
|
|
398
|
-
z.array(z.unknown()),
|
|
399
|
-
z.null(),
|
|
400
|
-
])
|
|
401
|
-
.optional(),
|
|
402
|
-
})
|
|
403
|
-
)
|
|
404
|
-
.min(1),
|
|
405
|
-
linked_documents: z.array(z.string().min(1)).optional(),
|
|
406
|
-
payment: z
|
|
407
|
-
.union([
|
|
408
|
-
z.object({
|
|
409
|
-
credit_note_id: z.union([z.string(), z.null()]).optional(),
|
|
410
|
-
advance_invoice_id: z.union([z.string(), z.null()]).optional(),
|
|
411
|
-
amount: z.number().gt(0).optional(),
|
|
412
|
-
type: z.string().max(20),
|
|
413
|
-
date: z.string().optional(),
|
|
414
|
-
reference: z.union([z.string(), z.null()]).optional(),
|
|
415
|
-
note: z.union([z.string(), z.null()]).optional(),
|
|
416
|
-
metadata: z.union([z.record(z.string(), z.any()), z.null()]).optional(),
|
|
417
|
-
}),
|
|
418
|
-
z.null(),
|
|
419
|
-
])
|
|
420
|
-
.optional(),
|
|
421
|
-
furs: z
|
|
422
|
-
.union([
|
|
423
|
-
z
|
|
424
|
-
.object({
|
|
425
|
-
business_premise_name: z.string().min(1),
|
|
426
|
-
electronic_device_name: z.string().min(1),
|
|
427
|
-
operator_tax_number: z.string(),
|
|
428
|
-
operator_label: z.string(),
|
|
429
|
-
skip: z.boolean(),
|
|
430
|
-
})
|
|
431
|
-
.partial(),
|
|
432
|
-
z.null(),
|
|
433
|
-
])
|
|
434
|
-
.optional(),
|
|
435
|
-
eslog: z
|
|
436
|
-
.union([
|
|
437
|
-
z
|
|
438
|
-
.object({ validation_enabled: z.union([z.boolean(), z.null()]) })
|
|
439
|
-
.partial()
|
|
440
|
-
.passthrough(),
|
|
441
|
-
z.null(),
|
|
442
|
-
])
|
|
443
|
-
.optional(),
|
|
444
|
-
});
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
// Dependency schema for renderdocument_body
|
|
448
|
-
const PartialDocumentPreview = z.object({
|
|
449
|
-
is_draft: z.boolean().optional(),
|
|
450
|
-
date: z
|
|
451
|
-
.string()
|
|
452
|
-
.regex(/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/)
|
|
453
|
-
.optional(),
|
|
454
|
-
issuer: z
|
|
455
|
-
.object({
|
|
456
|
-
name: z.union([z.string(), z.null()]),
|
|
457
|
-
email: z.union([z.string(), z.null()]),
|
|
458
|
-
address: z.union([z.string(), z.null()]),
|
|
459
|
-
address_2: z.union([z.string(), z.null()]),
|
|
460
|
-
post_code: z.union([z.string(), z.null()]),
|
|
461
|
-
city: z.union([z.string(), z.null()]),
|
|
462
|
-
state: z.union([z.string(), z.null()]),
|
|
463
|
-
country: z.union([z.string(), z.null()]),
|
|
464
|
-
country_code: z.union([z.string(), z.null()]),
|
|
465
|
-
tax_number: z.union([z.string(), z.null()]),
|
|
466
|
-
bank_account: z.union([
|
|
467
|
-
z
|
|
468
|
-
.object({
|
|
469
|
-
type: z
|
|
470
|
-
.enum(["iban", "us_domestic", "uk_domestic", "other"])
|
|
471
|
-
.default("iban"),
|
|
472
|
-
name: z.string(),
|
|
473
|
-
bank_name: z.string(),
|
|
474
|
-
iban: z.string(),
|
|
475
|
-
account_number: z.string(),
|
|
476
|
-
bic: z.string(),
|
|
477
|
-
routing_number: z.string(),
|
|
478
|
-
sort_code: z.string(),
|
|
479
|
-
})
|
|
480
|
-
.partial()
|
|
481
|
-
.passthrough(),
|
|
482
|
-
z.null(),
|
|
483
|
-
]),
|
|
484
|
-
})
|
|
485
|
-
.partial()
|
|
486
|
-
.passthrough()
|
|
487
|
-
.optional(),
|
|
488
|
-
customer_id: z.union([z.string(), z.null()]).optional(),
|
|
489
|
-
customer: z
|
|
490
|
-
.union([
|
|
491
|
-
z
|
|
492
|
-
.object({
|
|
493
|
-
name: z.union([z.string(), z.null()]),
|
|
494
|
-
email: z.union([z.string(), z.null()]),
|
|
495
|
-
address: z.union([z.string(), z.null()]),
|
|
496
|
-
address_2: z.union([z.string(), z.null()]),
|
|
497
|
-
post_code: z.union([z.string(), z.null()]),
|
|
498
|
-
city: z.union([z.string(), z.null()]),
|
|
499
|
-
state: z.union([z.string(), z.null()]),
|
|
500
|
-
country: z.union([z.string(), z.null()]),
|
|
501
|
-
country_code: z.union([z.string(), z.null()]),
|
|
502
|
-
tax_number: z.union([z.string(), z.null()]),
|
|
503
|
-
bank_account: z.union([
|
|
504
|
-
z
|
|
505
|
-
.object({
|
|
506
|
-
type: z
|
|
507
|
-
.enum(["iban", "us_domestic", "uk_domestic", "other"])
|
|
508
|
-
.default("iban"),
|
|
509
|
-
name: z.string(),
|
|
510
|
-
bank_name: z.string(),
|
|
511
|
-
iban: z.string(),
|
|
512
|
-
account_number: z.string(),
|
|
513
|
-
bic: z.string(),
|
|
514
|
-
routing_number: z.string(),
|
|
515
|
-
sort_code: z.string(),
|
|
516
|
-
})
|
|
517
|
-
.partial()
|
|
518
|
-
.passthrough(),
|
|
519
|
-
z.null(),
|
|
520
|
-
]),
|
|
521
|
-
save_customer: z.boolean().default(true),
|
|
522
|
-
})
|
|
523
|
-
.partial()
|
|
524
|
-
.passthrough(),
|
|
525
|
-
z.null(),
|
|
526
|
-
])
|
|
527
|
-
.optional(),
|
|
528
|
-
note: z.union([z.string(), z.null()]).optional(),
|
|
529
|
-
payment_terms: z.union([z.string(), z.null()]).optional(),
|
|
530
|
-
currency_code: z.string().max(3).optional(),
|
|
531
|
-
metadata: z.union([z.record(z.string(), z.any()), z.null()]).optional(),
|
|
532
|
-
date_due: z.union([z.string(), z.null()]).optional(),
|
|
533
|
-
date_service: z.union([z.string(), z.null()]).optional(),
|
|
534
|
-
date_service_to: z.union([z.string(), z.null()]).optional(),
|
|
535
|
-
items: z
|
|
536
|
-
.array(
|
|
537
|
-
z
|
|
538
|
-
.object({
|
|
539
|
-
name: z.string(),
|
|
540
|
-
quantity: z.number(),
|
|
541
|
-
price: z.number(),
|
|
542
|
-
gross_price: z.number(),
|
|
543
|
-
description: z.string(),
|
|
544
|
-
taxes: z.array(
|
|
545
|
-
z
|
|
546
|
-
.object({ rate: z.number(), tax_id: z.string() })
|
|
547
|
-
.partial()
|
|
548
|
-
.passthrough()
|
|
549
|
-
),
|
|
550
|
-
metadata: z.record(z.string(), z.any()),
|
|
551
|
-
})
|
|
552
|
-
.partial()
|
|
553
|
-
.passthrough()
|
|
554
|
-
)
|
|
555
|
-
.min(1),
|
|
556
|
-
linked_documents: z.array(z.string().min(1)).optional(),
|
|
557
|
-
furs: z
|
|
558
|
-
.union([
|
|
559
|
-
z
|
|
560
|
-
.object({
|
|
561
|
-
business_premise_name: z.string().min(1),
|
|
562
|
-
electronic_device_name: z.string().min(1),
|
|
563
|
-
operator_tax_number: z.string(),
|
|
564
|
-
operator_label: z.string(),
|
|
565
|
-
skip: z.boolean(),
|
|
566
|
-
})
|
|
567
|
-
.partial(),
|
|
568
|
-
z.null(),
|
|
569
|
-
])
|
|
570
|
-
.optional(),
|
|
571
|
-
eslog: z
|
|
572
|
-
.union([
|
|
573
|
-
z
|
|
574
|
-
.object({ validation_enabled: z.union([z.boolean(), z.null()]) })
|
|
575
|
-
.partial()
|
|
576
|
-
.passthrough(),
|
|
577
|
-
z.null(),
|
|
578
|
-
])
|
|
579
|
-
.optional(),
|
|
580
|
-
});
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
// Schema for render document operation
|
|
584
|
-
const renderDocumentSchemaDefinition = z.union([
|
|
585
|
-
PartialDocumentPreview,
|
|
586
|
-
CompleteDocumentPreview,
|
|
587
|
-
PartialEstimatePreview,
|
|
588
|
-
CompleteEstimatePreview,
|
|
589
|
-
]);
|
|
590
|
-
|
|
591
|
-
// Type for render document operation
|
|
592
|
-
export type RenderDocumentSchema = z.infer<typeof renderDocumentSchemaDefinition>;
|
|
593
|
-
|
|
594
|
-
export const renderDocumentSchema = renderDocumentSchemaDefinition;
|