@spaceinvoices/react-ui 0.1.1 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cli/dist/index.js +1 -1
- package/package.json +1 -1
- package/registry.json +287 -122
- package/src/components/activities/activity-timeline.tsx +8 -1
- package/src/components/activities/locales/es.ts +30 -0
- package/src/components/activities/locales/fr.ts +30 -0
- package/src/components/activities/locales/hr.ts +30 -0
- package/src/components/activities/locales/it.ts +30 -0
- package/src/components/activities/locales/nl.ts +30 -0
- package/src/components/activities/locales/pl.ts +30 -0
- package/src/components/activities/locales/pt.ts +30 -0
- package/src/components/advance-invoices/create/create-advance-invoice-form.tsx +21 -7
- package/src/components/advance-invoices/create/locales/es.ts +29 -0
- package/src/components/advance-invoices/create/locales/fr.ts +28 -0
- package/src/components/advance-invoices/create/locales/hr.ts +27 -0
- package/src/components/advance-invoices/create/locales/it.ts +29 -0
- package/src/components/advance-invoices/create/locales/nl.ts +28 -0
- package/src/components/advance-invoices/create/locales/pl.ts +28 -0
- package/src/components/advance-invoices/create/locales/pt.ts +29 -0
- package/src/components/advance-invoices/create/prepare-advance-invoice-submission.ts +3 -3
- package/src/components/advance-invoices/list/list-table.tsx +20 -3
- package/src/components/advance-invoices/list/locales/de.ts +9 -0
- package/src/components/advance-invoices/list/locales/en.ts +8 -0
- package/src/components/advance-invoices/list/locales/es.ts +41 -0
- package/src/components/advance-invoices/list/locales/fr.ts +41 -0
- package/src/components/advance-invoices/list/locales/hr.ts +41 -0
- package/src/components/advance-invoices/list/locales/it.ts +41 -0
- package/src/components/advance-invoices/list/locales/nl.ts +41 -0
- package/src/components/advance-invoices/list/locales/pl.ts +41 -0
- package/src/components/advance-invoices/list/locales/pt.ts +41 -0
- package/src/components/advance-invoices/list/locales/sl.ts +9 -0
- package/src/components/credit-notes/create/create-credit-note-form.tsx +19 -5
- package/src/components/credit-notes/create/locales/es.ts +68 -0
- package/src/components/credit-notes/create/locales/fr.ts +69 -0
- package/src/components/credit-notes/create/locales/hr.ts +68 -0
- package/src/components/credit-notes/create/locales/it.ts +68 -0
- package/src/components/credit-notes/create/locales/nl.ts +69 -0
- package/src/components/credit-notes/create/locales/pl.ts +68 -0
- package/src/components/credit-notes/create/locales/pt.ts +68 -0
- package/src/components/credit-notes/list/list-table.tsx +25 -8
- package/src/components/credit-notes/list/locales/de.ts +10 -2
- package/src/components/credit-notes/list/locales/en.ts +8 -0
- package/src/components/credit-notes/list/locales/es.ts +41 -0
- package/src/components/credit-notes/list/locales/fr.ts +41 -0
- package/src/components/credit-notes/list/locales/hr.ts +41 -0
- package/src/components/credit-notes/list/locales/it.ts +41 -0
- package/src/components/credit-notes/list/locales/nl.ts +41 -0
- package/src/components/credit-notes/list/locales/pl.ts +41 -0
- package/src/components/credit-notes/list/locales/pt.ts +41 -0
- package/src/components/credit-notes/list/locales/sl.ts +10 -2
- package/src/components/customers/create-customer-form/create-customer-form.tsx +21 -3
- package/src/components/customers/create-customer-form/locales/de.ts +1 -0
- package/src/components/customers/create-customer-form/locales/es.ts +21 -0
- package/src/components/customers/create-customer-form/locales/fr.ts +21 -0
- package/src/components/customers/create-customer-form/locales/hr.ts +21 -0
- package/src/components/customers/create-customer-form/locales/it.ts +21 -0
- package/src/components/customers/create-customer-form/locales/nl.ts +21 -0
- package/src/components/customers/create-customer-form/locales/pl.ts +21 -0
- package/src/components/customers/create-customer-form/locales/pt.ts +21 -0
- package/src/components/customers/create-customer-form/locales/sl.ts +1 -0
- package/src/components/customers/customer-list-table/customer-list-row-actions.tsx +72 -16
- package/src/components/customers/customer-list-table/customer-list-table.tsx +35 -2
- package/src/components/customers/customer-list-table/locales/de.ts +9 -0
- package/src/components/customers/customer-list-table/locales/en.ts +10 -0
- package/src/components/customers/customer-list-table/locales/es.ts +25 -0
- package/src/components/customers/customer-list-table/locales/fr.ts +25 -0
- package/src/components/customers/customer-list-table/locales/hr.ts +25 -0
- package/src/components/customers/customer-list-table/locales/it.ts +25 -0
- package/src/components/customers/customer-list-table/locales/nl.ts +25 -0
- package/src/components/customers/customer-list-table/locales/pl.ts +25 -0
- package/src/components/customers/customer-list-table/locales/pt.ts +25 -0
- package/src/components/customers/customer-list-table/locales/sl.ts +9 -0
- package/src/components/customers/customers.hooks.test.ts +8 -8
- package/src/components/customers/customers.hooks.ts +6 -1
- package/src/components/customers/edit-customer-form/edit-customer-form.tsx +143 -0
- package/src/components/customers/edit-customer-form/locales/de.ts +13 -0
- package/src/components/customers/edit-customer-form/locales/es.ts +13 -0
- package/src/components/customers/edit-customer-form/locales/fr.ts +13 -0
- package/src/components/customers/edit-customer-form/locales/hr.ts +13 -0
- package/src/components/customers/edit-customer-form/locales/it.ts +13 -0
- package/src/components/customers/edit-customer-form/locales/nl.ts +13 -0
- package/src/components/customers/edit-customer-form/locales/pl.ts +13 -0
- package/src/components/customers/edit-customer-form/locales/pt.ts +13 -0
- package/src/components/customers/edit-customer-form/locales/sl.ts +13 -0
- package/src/components/customers/index.ts +1 -0
- package/src/components/dashboard/collection-rate-card/collection-rate-card.tsx +9 -1
- package/src/components/dashboard/collection-rate-card/locales/de.ts +3 -0
- package/src/components/dashboard/collection-rate-card/locales/es.ts +3 -0
- package/src/components/dashboard/collection-rate-card/locales/fr.ts +3 -0
- package/src/components/dashboard/collection-rate-card/locales/hr.ts +3 -0
- package/src/components/dashboard/collection-rate-card/locales/it.ts +3 -0
- package/src/components/dashboard/collection-rate-card/locales/nl.ts +3 -0
- package/src/components/dashboard/collection-rate-card/locales/pl.ts +3 -0
- package/src/components/dashboard/collection-rate-card/locales/pt.ts +3 -0
- package/src/components/dashboard/invoice-status-chart/invoice-status-chart.tsx +9 -1
- package/src/components/dashboard/invoice-status-chart/locales/de.ts +9 -0
- package/src/components/dashboard/invoice-status-chart/locales/es.ts +9 -0
- package/src/components/dashboard/invoice-status-chart/locales/fr.ts +9 -0
- package/src/components/dashboard/invoice-status-chart/locales/hr.ts +9 -0
- package/src/components/dashboard/invoice-status-chart/locales/it.ts +9 -0
- package/src/components/dashboard/invoice-status-chart/locales/nl.ts +9 -0
- package/src/components/dashboard/invoice-status-chart/locales/pl.ts +9 -0
- package/src/components/dashboard/invoice-status-chart/locales/pt.ts +9 -0
- package/src/components/dashboard/payment-methods-chart/locales/de.ts +12 -0
- package/src/components/dashboard/payment-methods-chart/locales/es.ts +12 -0
- package/src/components/dashboard/payment-methods-chart/locales/fr.ts +12 -0
- package/src/components/dashboard/payment-methods-chart/locales/hr.ts +12 -0
- package/src/components/dashboard/payment-methods-chart/locales/it.ts +12 -0
- package/src/components/dashboard/payment-methods-chart/locales/nl.ts +12 -0
- package/src/components/dashboard/payment-methods-chart/locales/pl.ts +12 -0
- package/src/components/dashboard/payment-methods-chart/locales/pt.ts +12 -0
- package/src/components/dashboard/payment-methods-chart/payment-methods-chart.tsx +9 -1
- package/src/components/dashboard/payment-trend-chart/locales/de.ts +5 -0
- package/src/components/dashboard/payment-trend-chart/locales/es.ts +5 -0
- package/src/components/dashboard/payment-trend-chart/locales/fr.ts +5 -0
- package/src/components/dashboard/payment-trend-chart/locales/hr.ts +5 -0
- package/src/components/dashboard/payment-trend-chart/locales/it.ts +5 -0
- package/src/components/dashboard/payment-trend-chart/locales/nl.ts +5 -0
- package/src/components/dashboard/payment-trend-chart/locales/pl.ts +5 -0
- package/src/components/dashboard/payment-trend-chart/locales/pt.ts +5 -0
- package/src/components/dashboard/payment-trend-chart/payment-trend-chart.tsx +10 -2
- package/src/components/dashboard/revenue-trend-chart/locales/de.ts +5 -0
- package/src/components/dashboard/revenue-trend-chart/locales/es.ts +5 -0
- package/src/components/dashboard/revenue-trend-chart/locales/fr.ts +5 -0
- package/src/components/dashboard/revenue-trend-chart/locales/hr.ts +5 -0
- package/src/components/dashboard/revenue-trend-chart/locales/it.ts +5 -0
- package/src/components/dashboard/revenue-trend-chart/locales/nl.ts +5 -0
- package/src/components/dashboard/revenue-trend-chart/locales/pl.ts +5 -0
- package/src/components/dashboard/revenue-trend-chart/locales/pt.ts +5 -0
- package/src/components/dashboard/revenue-trend-chart/revenue-trend-chart.tsx +10 -2
- package/src/components/dashboard/top-customers-chart/locales/de.ts +5 -0
- package/src/components/dashboard/top-customers-chart/locales/es.ts +5 -0
- package/src/components/dashboard/top-customers-chart/locales/fr.ts +5 -0
- package/src/components/dashboard/top-customers-chart/locales/hr.ts +5 -0
- package/src/components/dashboard/top-customers-chart/locales/it.ts +5 -0
- package/src/components/dashboard/top-customers-chart/locales/nl.ts +5 -0
- package/src/components/dashboard/top-customers-chart/locales/pl.ts +5 -0
- package/src/components/dashboard/top-customers-chart/locales/pt.ts +5 -0
- package/src/components/dashboard/top-customers-chart/top-customers-chart.tsx +10 -2
- package/src/components/documents/create/document-add-item-form.tsx +1 -1
- package/src/components/documents/create/form-types.ts +1 -5
- package/src/components/documents/create/mark-as-paid-section.tsx +60 -23
- package/src/components/documents/create/prepare-document-submission.test.ts +2 -2
- package/src/components/documents/create/prepare-document-submission.ts +12 -7
- package/src/components/documents/create/prepare-preview-data.test.ts +1 -1
- package/src/components/documents/view/document-actions-bar.tsx +8 -1
- package/src/components/documents/view/document-details-card.tsx +8 -1
- package/src/components/documents/view/document-payments-list.tsx +8 -1
- package/src/components/documents/view/locales/es.ts +83 -0
- package/src/components/documents/view/locales/fr.ts +83 -0
- package/src/components/documents/view/locales/hr.ts +83 -0
- package/src/components/documents/view/locales/it.ts +83 -0
- package/src/components/documents/view/locales/nl.ts +84 -0
- package/src/components/documents/view/locales/pl.ts +83 -0
- package/src/components/documents/view/locales/pt.ts +83 -0
- package/src/components/entities/create-entity-form.tsx +12 -2
- package/src/components/entities/entity-settings-form/entity-settings-form.tsx +18 -0
- package/src/components/entities/entity-settings-form/locales/de.ts +3 -1
- package/src/components/entities/entity-settings-form/locales/es.ts +197 -0
- package/src/components/entities/entity-settings-form/locales/fr.ts +196 -0
- package/src/components/entities/entity-settings-form/locales/hr.ts +189 -0
- package/src/components/entities/entity-settings-form/locales/it.ts +195 -0
- package/src/components/entities/entity-settings-form/locales/nl.ts +192 -0
- package/src/components/entities/entity-settings-form/locales/pl.ts +193 -0
- package/src/components/entities/entity-settings-form/locales/pt.ts +194 -0
- package/src/components/entities/entity-settings-form/locales/sl.ts +2 -0
- package/src/components/entities/fina-settings-form/fina-settings-form.tsx +461 -0
- package/src/components/entities/fina-settings-form/fina-settings.hooks.ts +215 -0
- package/src/components/entities/fina-settings-form/index.ts +3 -0
- package/src/components/entities/fina-settings-form/locales/de.ts +145 -0
- package/src/components/entities/fina-settings-form/locales/en.ts +142 -0
- package/src/components/entities/fina-settings-form/locales/es.ts +143 -0
- package/src/components/entities/fina-settings-form/locales/fr.ts +142 -0
- package/src/components/entities/fina-settings-form/locales/hr.ts +144 -0
- package/src/components/entities/fina-settings-form/locales/it.ts +144 -0
- package/src/components/entities/fina-settings-form/locales/nl.ts +144 -0
- package/src/components/entities/fina-settings-form/locales/pl.ts +142 -0
- package/src/components/entities/fina-settings-form/locales/pt.ts +144 -0
- package/src/components/entities/fina-settings-form/locales/sl.ts +144 -0
- package/src/components/entities/fina-settings-form/sections/certificate-settings-section.tsx +233 -0
- package/src/components/entities/fina-settings-form/sections/premises-management-section.tsx +363 -0
- package/src/components/entities/fina-settings-form/sections/register-premise-dialog.tsx +395 -0
- package/src/components/entities/furs-settings-form/furs-settings-form.tsx +9 -2
- package/src/components/entities/furs-settings-form/furs-settings.hooks.ts +15 -11
- package/src/components/entities/furs-settings-form/locales/de.ts +52 -88
- package/src/components/entities/furs-settings-form/locales/en.ts +3 -0
- package/src/components/entities/furs-settings-form/locales/es.ts +196 -0
- package/src/components/entities/furs-settings-form/locales/fr.ts +196 -0
- package/src/components/entities/furs-settings-form/locales/hr.ts +195 -0
- package/src/components/entities/furs-settings-form/locales/it.ts +196 -0
- package/src/components/entities/furs-settings-form/locales/nl.ts +195 -0
- package/src/components/entities/furs-settings-form/locales/pl.ts +194 -0
- package/src/components/entities/furs-settings-form/locales/pt.ts +195 -0
- package/src/components/entities/furs-settings-form/locales/sl.ts +2 -0
- package/src/components/entities/furs-settings-form/sections/certificate-settings-section.tsx +19 -4
- package/src/components/entities/furs-settings-form/sections/register-premise-dialog.tsx +17 -66
- package/src/components/entities/keys.ts +1 -1
- package/src/components/entities/settings/company-settings-form.tsx +28 -0
- package/src/components/entities/settings/pdf-template-selector/locales/es.ts +18 -0
- package/src/components/entities/settings/pdf-template-selector/locales/fr.ts +18 -0
- package/src/components/entities/settings/pdf-template-selector/locales/hr.ts +18 -0
- package/src/components/entities/settings/pdf-template-selector/locales/it.ts +18 -0
- package/src/components/entities/settings/pdf-template-selector/locales/nl.ts +17 -0
- package/src/components/entities/settings/pdf-template-selector/locales/pl.ts +18 -0
- package/src/components/entities/settings/pdf-template-selector/locales/pt.ts +18 -0
- package/src/components/estimates/create/create-estimate-form.tsx +14 -0
- package/src/components/estimates/create/locales/es.ts +57 -0
- package/src/components/estimates/create/locales/fr.ts +58 -0
- package/src/components/estimates/create/locales/hr.ts +57 -0
- package/src/components/estimates/create/locales/it.ts +57 -0
- package/src/components/estimates/create/locales/nl.ts +58 -0
- package/src/components/estimates/create/locales/pl.ts +57 -0
- package/src/components/estimates/create/locales/pt.ts +58 -0
- package/src/components/estimates/create/prepare-estimate-submission.ts +1 -1
- package/src/components/estimates/list/list-table.tsx +20 -3
- package/src/components/estimates/list/locales/de.ts +9 -0
- package/src/components/estimates/list/locales/en.ts +8 -0
- package/src/components/estimates/list/locales/es.ts +32 -0
- package/src/components/estimates/list/locales/fr.ts +32 -0
- package/src/components/estimates/list/locales/hr.ts +32 -0
- package/src/components/estimates/list/locales/it.ts +32 -0
- package/src/components/estimates/list/locales/nl.ts +32 -0
- package/src/components/estimates/list/locales/pl.ts +32 -0
- package/src/components/estimates/list/locales/pt.ts +32 -0
- package/src/components/estimates/list/locales/sl.ts +9 -0
- package/src/components/export/document-export-form.tsx +0 -2
- package/src/components/invoices/create/create-invoice-form.tsx +24 -10
- package/src/components/invoices/create/eslog-validation.test.ts +2 -0
- package/src/components/invoices/create/locales/es.ts +103 -0
- package/src/components/invoices/create/locales/fr.ts +105 -0
- package/src/components/invoices/create/locales/hr.ts +103 -0
- package/src/components/invoices/create/locales/it.ts +105 -0
- package/src/components/invoices/create/locales/nl.ts +104 -0
- package/src/components/invoices/create/locales/pl.ts +104 -0
- package/src/components/invoices/create/locales/pt.ts +105 -0
- package/src/components/invoices/create/prepare-invoice-submission.test.ts +54 -55
- package/src/components/invoices/create/prepare-invoice-submission.ts +3 -3
- package/src/components/invoices/list/list-table.tsx +20 -3
- package/src/components/invoices/list/locales/de.ts +9 -0
- package/src/components/invoices/list/locales/en.ts +8 -0
- package/src/components/invoices/list/locales/es.ts +42 -0
- package/src/components/invoices/list/locales/fr.ts +42 -0
- package/src/components/invoices/list/locales/hr.ts +42 -0
- package/src/components/invoices/list/locales/it.ts +42 -0
- package/src/components/invoices/list/locales/nl.ts +42 -0
- package/src/components/invoices/list/locales/pl.ts +42 -0
- package/src/components/invoices/list/locales/pt.ts +42 -0
- package/src/components/invoices/list/locales/sl.ts +9 -0
- package/src/components/invoices/send-email-dialog/locales/es.ts +18 -0
- package/src/components/invoices/send-email-dialog/locales/fr.ts +18 -0
- package/src/components/invoices/send-email-dialog/locales/hr.ts +17 -0
- package/src/components/invoices/send-email-dialog/locales/it.ts +18 -0
- package/src/components/invoices/send-email-dialog/locales/nl.ts +18 -0
- package/src/components/invoices/send-email-dialog/locales/pl.ts +18 -0
- package/src/components/invoices/send-email-dialog/locales/pt.ts +18 -0
- package/src/components/invoices/send-email-dialog/send-email-dialog.tsx +20 -12
- package/src/components/invoices/shared/scaled-document-preview.tsx +1 -0
- package/src/components/invoices/view/eslog-info-display.tsx +1 -0
- package/src/components/invoices/view/fina-info-display.tsx +196 -0
- package/src/components/items/create-item-form/create-item-form.tsx +14 -0
- package/src/components/items/create-item-form/locales/en.ts +5 -0
- package/src/components/items/create-item-form/locales/es.ts +14 -0
- package/src/components/items/create-item-form/locales/fr.ts +14 -0
- package/src/components/items/create-item-form/locales/hr.ts +14 -0
- package/src/components/items/create-item-form/locales/it.ts +14 -0
- package/src/components/items/create-item-form/locales/nl.ts +14 -0
- package/src/components/items/create-item-form/locales/pl.ts +14 -0
- package/src/components/items/create-item-form/locales/pt.ts +14 -0
- package/src/components/items/edit-item-form/edit-item-form.tsx +170 -0
- package/src/components/items/edit-item-form/locales/de.ts +12 -0
- package/src/components/items/edit-item-form/locales/es.ts +12 -0
- package/src/components/items/edit-item-form/locales/fr.ts +12 -0
- package/src/components/items/edit-item-form/locales/hr.ts +12 -0
- package/src/components/items/edit-item-form/locales/it.ts +12 -0
- package/src/components/items/edit-item-form/locales/nl.ts +12 -0
- package/src/components/items/edit-item-form/locales/pl.ts +12 -0
- package/src/components/items/edit-item-form/locales/pt.ts +12 -0
- package/src/components/items/edit-item-form/locales/sl.ts +12 -0
- package/src/components/items/item-list-table/item-list-table.tsx +20 -13
- package/src/components/items/item-list-table/locales/de.ts +6 -0
- package/src/components/items/item-list-table/locales/en.ts +5 -0
- package/src/components/items/item-list-table/locales/es.ts +16 -0
- package/src/components/items/item-list-table/locales/fr.ts +16 -0
- package/src/components/items/item-list-table/locales/hr.ts +16 -0
- package/src/components/items/item-list-table/locales/it.ts +16 -0
- package/src/components/items/item-list-table/locales/nl.ts +16 -0
- package/src/components/items/item-list-table/locales/pl.ts +16 -0
- package/src/components/items/item-list-table/locales/pt.ts +16 -0
- package/src/components/items/item-list-table/locales/sl.ts +6 -0
- package/src/components/items/items.hooks.ts +7 -2
- package/src/components/payments/create-payment-form/create-payment-form.tsx +14 -0
- package/src/components/payments/create-payment-form/locales/es.ts +20 -0
- package/src/components/payments/create-payment-form/locales/fr.ts +20 -0
- package/src/components/payments/create-payment-form/locales/hr.ts +20 -0
- package/src/components/payments/create-payment-form/locales/it.ts +20 -0
- package/src/components/payments/create-payment-form/locales/nl.ts +20 -0
- package/src/components/payments/create-payment-form/locales/pl.ts +20 -0
- package/src/components/payments/create-payment-form/locales/pt.ts +20 -0
- package/src/components/payments/edit-payment-form/edit-payment-form.tsx +18 -2
- package/src/components/payments/edit-payment-form/locales/es.ts +20 -0
- package/src/components/payments/edit-payment-form/locales/fr.ts +20 -0
- package/src/components/payments/edit-payment-form/locales/hr.ts +20 -0
- package/src/components/payments/edit-payment-form/locales/it.ts +20 -0
- package/src/components/payments/edit-payment-form/locales/nl.ts +20 -0
- package/src/components/payments/edit-payment-form/locales/pl.ts +20 -0
- package/src/components/payments/edit-payment-form/locales/pt.ts +20 -0
- package/src/components/payments/list/list-row-actions.tsx +14 -0
- package/src/components/payments/list/list-table.tsx +21 -2
- package/src/components/payments/list/locales/de.ts +6 -0
- package/src/components/payments/list/locales/en.ts +7 -0
- package/src/components/payments/list/locales/es.ts +25 -0
- package/src/components/payments/list/locales/fr.ts +25 -0
- package/src/components/payments/list/locales/hr.ts +25 -0
- package/src/components/payments/list/locales/it.ts +25 -0
- package/src/components/payments/list/locales/nl.ts +25 -0
- package/src/components/payments/list/locales/pl.ts +25 -0
- package/src/components/payments/list/locales/pt.ts +25 -0
- package/src/components/payments/list/locales/sl.ts +6 -0
- package/src/components/payments/payments.hooks.ts +7 -2
- package/src/components/request-logs/index.ts +1 -1
- package/src/components/table/data-table.tsx +8 -3
- package/src/components/table/filter-panel.tsx +4 -4
- package/src/components/table/hooks/use-table-query.ts +3 -0
- package/src/components/table/table-empty-state.tsx +11 -4
- package/src/components/table/table-no-results.tsx +6 -4
- package/src/components/table/types.ts +2 -2
- package/src/components/tax-reports/kir-export-form.tsx +0 -1
- package/src/components/taxes/create-tax-form/create-tax-form.tsx +14 -0
- package/src/components/taxes/create-tax-form/locales/en.ts +1 -0
- package/src/components/taxes/create-tax-form/locales/es.ts +8 -0
- package/src/components/taxes/create-tax-form/locales/fr.ts +8 -0
- package/src/components/taxes/create-tax-form/locales/hr.ts +8 -0
- package/src/components/taxes/create-tax-form/locales/it.ts +8 -0
- package/src/components/taxes/create-tax-form/locales/nl.ts +8 -0
- package/src/components/taxes/create-tax-form/locales/pl.ts +8 -0
- package/src/components/taxes/create-tax-form/locales/pt.ts +8 -0
- package/src/components/taxes/edit-tax-form/edit-tax-form.tsx +119 -0
- package/src/components/taxes/edit-tax-form/locales/de.ts +6 -0
- package/src/components/taxes/edit-tax-form/locales/es.ts +6 -0
- package/src/components/taxes/edit-tax-form/locales/fr.ts +6 -0
- package/src/components/taxes/edit-tax-form/locales/hr.ts +6 -0
- package/src/components/taxes/edit-tax-form/locales/it.ts +6 -0
- package/src/components/taxes/edit-tax-form/locales/nl.ts +6 -0
- package/src/components/taxes/edit-tax-form/locales/pl.ts +6 -0
- package/src/components/taxes/edit-tax-form/locales/pt.ts +6 -0
- package/src/components/taxes/edit-tax-form/locales/sl.ts +6 -0
- package/src/components/taxes/tax-list-table/locales/de.ts +6 -0
- package/src/components/taxes/tax-list-table/locales/en.ts +6 -0
- package/src/components/taxes/tax-list-table/locales/es.ts +17 -0
- package/src/components/taxes/tax-list-table/locales/fr.ts +17 -0
- package/src/components/taxes/tax-list-table/locales/hr.ts +17 -0
- package/src/components/taxes/tax-list-table/locales/it.ts +17 -0
- package/src/components/taxes/tax-list-table/locales/nl.ts +17 -0
- package/src/components/taxes/tax-list-table/locales/pl.ts +17 -0
- package/src/components/taxes/tax-list-table/locales/pt.ts +17 -0
- package/src/components/taxes/tax-list-table/locales/sl.ts +6 -0
- package/src/components/taxes/tax-list-table/tax-list-table.tsx +18 -0
- package/src/components/taxes/taxes.hooks.ts +12 -7
- package/src/components/ui/tooltip.tsx +2 -2
- package/src/components/wl-subscription/locked-feature.tsx +1 -0
- package/src/components/wl-subscription/upgrade-modal.tsx +1 -0
- package/src/generated/schemas/acceptentityinvitation_body.ts +17 -0
- package/src/generated/schemas/addentityuser_body.ts +18 -0
- package/src/generated/schemas/advanceinvoice.ts +184 -12
- package/src/generated/schemas/creditnote.ts +96 -127
- package/src/generated/schemas/customadvanceinvoice.ts +246 -0
- package/src/generated/schemas/customcreditnote.ts +237 -0
- package/src/generated/schemas/customer.ts +26 -0
- package/src/generated/schemas/customestimate.ts +181 -0
- package/src/generated/schemas/custominvoice.ts +237 -0
- package/src/generated/schemas/entity.ts +66 -7
- package/src/generated/schemas/entityuserrole.ts +19 -0
- package/src/generated/schemas/estimate.ts +149 -1
- package/src/generated/schemas/finasettings.ts +25 -0
- package/src/generated/schemas/furssettings.ts +1 -2
- package/src/generated/schemas/index.ts +24 -5
- package/src/generated/schemas/invoice.ts +224 -22
- package/src/generated/schemas/me.ts +22 -0
- package/src/generated/schemas/registerfinamovablepremise_body.ts +26 -0
- package/src/generated/schemas/registerfinarealestatepremise_body.ts +37 -0
- package/src/generated/schemas/renderadvanceinvoicepreview_body.ts +342 -0
- package/src/generated/schemas/rendercreditnotepreview_body.ts +344 -0
- package/src/generated/schemas/renderestimatepreview_body.ts +284 -0
- package/src/generated/schemas/renderinvoicepreview_body.ts +344 -0
- package/src/generated/schemas/senddocument_body.ts +23 -0
- package/src/generated/schemas/sendemail_body.ts +8 -10
- package/src/generated/schemas/stripeappconnect_body.ts +18 -0
- package/src/generated/schemas/stripeappcreateinvoice_body.ts +20 -0
- package/src/generated/schemas/stripeappupdatesettings_body.ts +26 -0
- package/src/generated/schemas/webhook.ts +143 -0
- package/src/hooks/create-resource-hooks.ts +85 -1
- package/src/hooks/use-next-document-number.ts +1 -1
- package/src/hooks/use-resource-mutation.ts +4 -3
- package/src/lib/browser-cookies.ts +12 -1
- package/src/lib/cookies.ts +2 -2
- package/src/lib/translation.ts +1 -1
- package/src/providers/entities-provider.tsx +84 -39
- package/src/providers/sdk-provider.tsx +7 -3
- package/src/providers/white-label-provider.tsx +5 -2
- package/src/providers/wl-subscription-provider.tsx +1 -0
|
@@ -0,0 +1,342 @@
|
|
|
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 renderadvanceinvoicepreview_body endpoints
|
|
10
|
+
|
|
11
|
+
// Dependency schema for renderadvanceinvoicepreview_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 renderadvanceinvoicepreview_body
|
|
19
|
+
const CompleteAdvanceInvoicePreview = 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
|
+
tax_number_2: z.union([z.string(), z.null()]),
|
|
38
|
+
company_number: z.union([z.string(), z.null()]),
|
|
39
|
+
bank_account: z.union([
|
|
40
|
+
z
|
|
41
|
+
.object({
|
|
42
|
+
type: z
|
|
43
|
+
.enum(["iban", "us_domestic", "uk_domestic", "other"])
|
|
44
|
+
.default("iban"),
|
|
45
|
+
name: z.string(),
|
|
46
|
+
bank_name: z.string(),
|
|
47
|
+
iban: z.string(),
|
|
48
|
+
account_number: z.string(),
|
|
49
|
+
bic: z.string(),
|
|
50
|
+
routing_number: z.string(),
|
|
51
|
+
sort_code: z.string(),
|
|
52
|
+
})
|
|
53
|
+
.partial()
|
|
54
|
+
.passthrough(),
|
|
55
|
+
z.null(),
|
|
56
|
+
]),
|
|
57
|
+
})
|
|
58
|
+
.partial()
|
|
59
|
+
.passthrough()
|
|
60
|
+
.optional(),
|
|
61
|
+
customer_id: z.union([z.string(), z.null()]).optional(),
|
|
62
|
+
customer: z
|
|
63
|
+
.union([
|
|
64
|
+
z
|
|
65
|
+
.object({
|
|
66
|
+
name: z.union([z.string(), z.null()]),
|
|
67
|
+
email: z.union([z.string(), z.null()]),
|
|
68
|
+
address: z.union([z.string(), z.null()]),
|
|
69
|
+
address_2: z.union([z.string(), z.null()]),
|
|
70
|
+
post_code: z.union([z.string(), z.null()]),
|
|
71
|
+
city: z.union([z.string(), z.null()]),
|
|
72
|
+
state: z.union([z.string(), z.null()]),
|
|
73
|
+
country: z.union([z.string(), z.null()]),
|
|
74
|
+
country_code: z.union([z.string(), z.null()]),
|
|
75
|
+
tax_number: z.union([z.string(), z.null()]),
|
|
76
|
+
tax_number_2: z.union([z.string(), z.null()]),
|
|
77
|
+
company_number: z.union([z.string(), z.null()]),
|
|
78
|
+
bank_account: z.union([
|
|
79
|
+
z
|
|
80
|
+
.object({
|
|
81
|
+
type: z
|
|
82
|
+
.enum(["iban", "us_domestic", "uk_domestic", "other"])
|
|
83
|
+
.default("iban"),
|
|
84
|
+
name: z.string(),
|
|
85
|
+
bank_name: z.string(),
|
|
86
|
+
iban: z.string(),
|
|
87
|
+
account_number: z.string(),
|
|
88
|
+
bic: z.string(),
|
|
89
|
+
routing_number: z.string(),
|
|
90
|
+
sort_code: z.string(),
|
|
91
|
+
})
|
|
92
|
+
.partial()
|
|
93
|
+
.passthrough(),
|
|
94
|
+
z.null(),
|
|
95
|
+
]),
|
|
96
|
+
save_customer: z.boolean().default(true),
|
|
97
|
+
})
|
|
98
|
+
.partial()
|
|
99
|
+
.passthrough(),
|
|
100
|
+
z.null(),
|
|
101
|
+
])
|
|
102
|
+
.optional(),
|
|
103
|
+
note: z.union([z.string(), z.null()]).optional(),
|
|
104
|
+
tax_clause: z.union([z.string(), z.null()]).optional(),
|
|
105
|
+
currency_code: z.string().max(3).optional(),
|
|
106
|
+
metadata: z.union([z.record(z.string(), z.any()), z.null()]).optional(),
|
|
107
|
+
date_due: z.union([z.string(), z.null()]).optional(),
|
|
108
|
+
date_service: z.union([z.string(), z.null()]).optional(),
|
|
109
|
+
date_service_to: z.union([z.string(), z.null()]).optional(),
|
|
110
|
+
items: z
|
|
111
|
+
.array(
|
|
112
|
+
z.object({
|
|
113
|
+
name: z.string().min(1).optional(),
|
|
114
|
+
description: z.union([z.string(), z.null()]).optional(),
|
|
115
|
+
price: z.number().optional(),
|
|
116
|
+
gross_price: z.number().optional(),
|
|
117
|
+
quantity: z.number().gte(-140737488355328).lte(140737488355327),
|
|
118
|
+
unit: z.union([z.string(), z.null()]).optional(),
|
|
119
|
+
taxes: z
|
|
120
|
+
.array(
|
|
121
|
+
z
|
|
122
|
+
.object({
|
|
123
|
+
rate: z.number(),
|
|
124
|
+
tax_id: z.string(),
|
|
125
|
+
classification: z.string(),
|
|
126
|
+
reverse_charge: z.boolean(),
|
|
127
|
+
amount: z.number(),
|
|
128
|
+
})
|
|
129
|
+
.partial()
|
|
130
|
+
)
|
|
131
|
+
.optional(),
|
|
132
|
+
discounts: z.array(LineDiscount).max(5).optional(),
|
|
133
|
+
metadata: z
|
|
134
|
+
.union([
|
|
135
|
+
z.string(),
|
|
136
|
+
z.number(),
|
|
137
|
+
z.boolean(),
|
|
138
|
+
z.null(),
|
|
139
|
+
z.object({}).partial().passthrough(),
|
|
140
|
+
z.array(z.unknown()),
|
|
141
|
+
z.null(),
|
|
142
|
+
])
|
|
143
|
+
.optional(),
|
|
144
|
+
item_id: z.string().optional(),
|
|
145
|
+
})
|
|
146
|
+
)
|
|
147
|
+
.min(1),
|
|
148
|
+
fina: z
|
|
149
|
+
.union([
|
|
150
|
+
z
|
|
151
|
+
.object({
|
|
152
|
+
premise_id: z
|
|
153
|
+
.string()
|
|
154
|
+
.min(1)
|
|
155
|
+
.max(20)
|
|
156
|
+
.regex(/^[0-9a-zA-Z]{1,20}$/),
|
|
157
|
+
device_id: z
|
|
158
|
+
.string()
|
|
159
|
+
.min(1)
|
|
160
|
+
.max(20)
|
|
161
|
+
.regex(/^\d{1,20}$/),
|
|
162
|
+
operator_oib: z.string().min(11).max(11),
|
|
163
|
+
is_end_consumer: z.boolean(),
|
|
164
|
+
payment_type: z.enum([
|
|
165
|
+
"cash",
|
|
166
|
+
"card",
|
|
167
|
+
"online",
|
|
168
|
+
"bank_transfer",
|
|
169
|
+
"paypal",
|
|
170
|
+
"crypto",
|
|
171
|
+
"coupon",
|
|
172
|
+
"other",
|
|
173
|
+
]),
|
|
174
|
+
subsequent_submit: z.boolean(),
|
|
175
|
+
})
|
|
176
|
+
.partial(),
|
|
177
|
+
z.null(),
|
|
178
|
+
])
|
|
179
|
+
.optional(),
|
|
180
|
+
expected_total_with_tax: z.number().gt(0).optional(),
|
|
181
|
+
});
|
|
182
|
+
|
|
183
|
+
|
|
184
|
+
// Dependency schema for renderadvanceinvoicepreview_body
|
|
185
|
+
const PartialAdvanceInvoicePreview = z.object({
|
|
186
|
+
is_draft: z.boolean().optional(),
|
|
187
|
+
date: z
|
|
188
|
+
.string()
|
|
189
|
+
.regex(/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/)
|
|
190
|
+
.optional(),
|
|
191
|
+
issuer: z
|
|
192
|
+
.object({
|
|
193
|
+
name: z.union([z.string(), z.null()]),
|
|
194
|
+
email: z.union([z.string(), z.null()]),
|
|
195
|
+
address: z.union([z.string(), z.null()]),
|
|
196
|
+
address_2: z.union([z.string(), z.null()]),
|
|
197
|
+
post_code: z.union([z.string(), z.null()]),
|
|
198
|
+
city: z.union([z.string(), z.null()]),
|
|
199
|
+
state: z.union([z.string(), z.null()]),
|
|
200
|
+
country: z.union([z.string(), z.null()]),
|
|
201
|
+
country_code: z.union([z.string(), z.null()]),
|
|
202
|
+
tax_number: z.union([z.string(), z.null()]),
|
|
203
|
+
tax_number_2: z.union([z.string(), z.null()]),
|
|
204
|
+
company_number: z.union([z.string(), z.null()]),
|
|
205
|
+
bank_account: z.union([
|
|
206
|
+
z
|
|
207
|
+
.object({
|
|
208
|
+
type: z
|
|
209
|
+
.enum(["iban", "us_domestic", "uk_domestic", "other"])
|
|
210
|
+
.default("iban"),
|
|
211
|
+
name: z.string(),
|
|
212
|
+
bank_name: z.string(),
|
|
213
|
+
iban: z.string(),
|
|
214
|
+
account_number: z.string(),
|
|
215
|
+
bic: z.string(),
|
|
216
|
+
routing_number: z.string(),
|
|
217
|
+
sort_code: z.string(),
|
|
218
|
+
})
|
|
219
|
+
.partial()
|
|
220
|
+
.passthrough(),
|
|
221
|
+
z.null(),
|
|
222
|
+
]),
|
|
223
|
+
})
|
|
224
|
+
.partial()
|
|
225
|
+
.passthrough()
|
|
226
|
+
.optional(),
|
|
227
|
+
customer_id: z.union([z.string(), z.null()]).optional(),
|
|
228
|
+
customer: z
|
|
229
|
+
.union([
|
|
230
|
+
z
|
|
231
|
+
.object({
|
|
232
|
+
name: z.union([z.string(), z.null()]),
|
|
233
|
+
email: z.union([z.string(), z.null()]),
|
|
234
|
+
address: z.union([z.string(), z.null()]),
|
|
235
|
+
address_2: z.union([z.string(), z.null()]),
|
|
236
|
+
post_code: z.union([z.string(), z.null()]),
|
|
237
|
+
city: z.union([z.string(), z.null()]),
|
|
238
|
+
state: z.union([z.string(), z.null()]),
|
|
239
|
+
country: z.union([z.string(), z.null()]),
|
|
240
|
+
country_code: z.union([z.string(), z.null()]),
|
|
241
|
+
tax_number: z.union([z.string(), z.null()]),
|
|
242
|
+
tax_number_2: z.union([z.string(), z.null()]),
|
|
243
|
+
company_number: z.union([z.string(), z.null()]),
|
|
244
|
+
bank_account: z.union([
|
|
245
|
+
z
|
|
246
|
+
.object({
|
|
247
|
+
type: z
|
|
248
|
+
.enum(["iban", "us_domestic", "uk_domestic", "other"])
|
|
249
|
+
.default("iban"),
|
|
250
|
+
name: z.string(),
|
|
251
|
+
bank_name: z.string(),
|
|
252
|
+
iban: z.string(),
|
|
253
|
+
account_number: z.string(),
|
|
254
|
+
bic: z.string(),
|
|
255
|
+
routing_number: z.string(),
|
|
256
|
+
sort_code: z.string(),
|
|
257
|
+
})
|
|
258
|
+
.partial()
|
|
259
|
+
.passthrough(),
|
|
260
|
+
z.null(),
|
|
261
|
+
]),
|
|
262
|
+
save_customer: z.boolean().default(true),
|
|
263
|
+
})
|
|
264
|
+
.partial()
|
|
265
|
+
.passthrough(),
|
|
266
|
+
z.null(),
|
|
267
|
+
])
|
|
268
|
+
.optional(),
|
|
269
|
+
note: z.union([z.string(), z.null()]).optional(),
|
|
270
|
+
tax_clause: z.union([z.string(), z.null()]).optional(),
|
|
271
|
+
currency_code: z.string().max(3).optional(),
|
|
272
|
+
metadata: z.union([z.record(z.string(), z.any()), z.null()]).optional(),
|
|
273
|
+
date_due: z.union([z.string(), z.null()]).optional(),
|
|
274
|
+
date_service: z.union([z.string(), z.null()]).optional(),
|
|
275
|
+
date_service_to: z.union([z.string(), z.null()]).optional(),
|
|
276
|
+
items: z
|
|
277
|
+
.array(
|
|
278
|
+
z
|
|
279
|
+
.object({
|
|
280
|
+
name: z.string(),
|
|
281
|
+
quantity: z.number(),
|
|
282
|
+
price: z.number(),
|
|
283
|
+
gross_price: z.number(),
|
|
284
|
+
description: z.string(),
|
|
285
|
+
taxes: z.array(
|
|
286
|
+
z
|
|
287
|
+
.object({ rate: z.number(), tax_id: z.string() })
|
|
288
|
+
.partial()
|
|
289
|
+
.passthrough()
|
|
290
|
+
),
|
|
291
|
+
metadata: z.record(z.string(), z.any()),
|
|
292
|
+
})
|
|
293
|
+
.partial()
|
|
294
|
+
.passthrough()
|
|
295
|
+
)
|
|
296
|
+
.min(1),
|
|
297
|
+
fina: z
|
|
298
|
+
.union([
|
|
299
|
+
z
|
|
300
|
+
.object({
|
|
301
|
+
premise_id: z
|
|
302
|
+
.string()
|
|
303
|
+
.min(1)
|
|
304
|
+
.max(20)
|
|
305
|
+
.regex(/^[0-9a-zA-Z]{1,20}$/),
|
|
306
|
+
device_id: z
|
|
307
|
+
.string()
|
|
308
|
+
.min(1)
|
|
309
|
+
.max(20)
|
|
310
|
+
.regex(/^\d{1,20}$/),
|
|
311
|
+
operator_oib: z.string().min(11).max(11),
|
|
312
|
+
is_end_consumer: z.boolean(),
|
|
313
|
+
payment_type: z.enum([
|
|
314
|
+
"cash",
|
|
315
|
+
"card",
|
|
316
|
+
"online",
|
|
317
|
+
"bank_transfer",
|
|
318
|
+
"paypal",
|
|
319
|
+
"crypto",
|
|
320
|
+
"coupon",
|
|
321
|
+
"other",
|
|
322
|
+
]),
|
|
323
|
+
subsequent_submit: z.boolean(),
|
|
324
|
+
})
|
|
325
|
+
.partial(),
|
|
326
|
+
z.null(),
|
|
327
|
+
])
|
|
328
|
+
.optional(),
|
|
329
|
+
expected_total_with_tax: z.number().gt(0).optional(),
|
|
330
|
+
});
|
|
331
|
+
|
|
332
|
+
|
|
333
|
+
// Schema for render advanceinvoicepreview operation
|
|
334
|
+
const renderAdvanceInvoicePreviewSchemaDefinition = z.union([
|
|
335
|
+
PartialAdvanceInvoicePreview,
|
|
336
|
+
CompleteAdvanceInvoicePreview,
|
|
337
|
+
]);
|
|
338
|
+
|
|
339
|
+
// Type for render advanceinvoicepreview operation
|
|
340
|
+
export type RenderAdvanceInvoicePreviewSchema = z.infer<typeof renderAdvanceInvoicePreviewSchemaDefinition>;
|
|
341
|
+
|
|
342
|
+
export const renderAdvanceInvoicePreviewSchema = renderAdvanceInvoicePreviewSchemaDefinition;
|
|
@@ -0,0 +1,344 @@
|
|
|
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 rendercreditnotepreview_body endpoints
|
|
10
|
+
|
|
11
|
+
// Dependency schema for rendercreditnotepreview_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 rendercreditnotepreview_body
|
|
19
|
+
const CompleteCreditNotePreview = 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
|
+
tax_number_2: z.union([z.string(), z.null()]),
|
|
38
|
+
company_number: z.union([z.string(), z.null()]),
|
|
39
|
+
bank_account: z.union([
|
|
40
|
+
z
|
|
41
|
+
.object({
|
|
42
|
+
type: z
|
|
43
|
+
.enum(["iban", "us_domestic", "uk_domestic", "other"])
|
|
44
|
+
.default("iban"),
|
|
45
|
+
name: z.string(),
|
|
46
|
+
bank_name: z.string(),
|
|
47
|
+
iban: z.string(),
|
|
48
|
+
account_number: z.string(),
|
|
49
|
+
bic: z.string(),
|
|
50
|
+
routing_number: z.string(),
|
|
51
|
+
sort_code: z.string(),
|
|
52
|
+
})
|
|
53
|
+
.partial()
|
|
54
|
+
.passthrough(),
|
|
55
|
+
z.null(),
|
|
56
|
+
]),
|
|
57
|
+
})
|
|
58
|
+
.partial()
|
|
59
|
+
.passthrough()
|
|
60
|
+
.optional(),
|
|
61
|
+
customer_id: z.union([z.string(), z.null()]).optional(),
|
|
62
|
+
customer: z
|
|
63
|
+
.union([
|
|
64
|
+
z
|
|
65
|
+
.object({
|
|
66
|
+
name: z.union([z.string(), z.null()]),
|
|
67
|
+
email: z.union([z.string(), z.null()]),
|
|
68
|
+
address: z.union([z.string(), z.null()]),
|
|
69
|
+
address_2: z.union([z.string(), z.null()]),
|
|
70
|
+
post_code: z.union([z.string(), z.null()]),
|
|
71
|
+
city: z.union([z.string(), z.null()]),
|
|
72
|
+
state: z.union([z.string(), z.null()]),
|
|
73
|
+
country: z.union([z.string(), z.null()]),
|
|
74
|
+
country_code: z.union([z.string(), z.null()]),
|
|
75
|
+
tax_number: z.union([z.string(), z.null()]),
|
|
76
|
+
tax_number_2: z.union([z.string(), z.null()]),
|
|
77
|
+
company_number: z.union([z.string(), z.null()]),
|
|
78
|
+
bank_account: z.union([
|
|
79
|
+
z
|
|
80
|
+
.object({
|
|
81
|
+
type: z
|
|
82
|
+
.enum(["iban", "us_domestic", "uk_domestic", "other"])
|
|
83
|
+
.default("iban"),
|
|
84
|
+
name: z.string(),
|
|
85
|
+
bank_name: z.string(),
|
|
86
|
+
iban: z.string(),
|
|
87
|
+
account_number: z.string(),
|
|
88
|
+
bic: z.string(),
|
|
89
|
+
routing_number: z.string(),
|
|
90
|
+
sort_code: z.string(),
|
|
91
|
+
})
|
|
92
|
+
.partial()
|
|
93
|
+
.passthrough(),
|
|
94
|
+
z.null(),
|
|
95
|
+
]),
|
|
96
|
+
save_customer: z.boolean().default(true),
|
|
97
|
+
})
|
|
98
|
+
.partial()
|
|
99
|
+
.passthrough(),
|
|
100
|
+
z.null(),
|
|
101
|
+
])
|
|
102
|
+
.optional(),
|
|
103
|
+
note: z.union([z.string(), z.null()]).optional(),
|
|
104
|
+
payment_terms: z.union([z.string(), z.null()]).optional(),
|
|
105
|
+
tax_clause: z.union([z.string(), z.null()]).optional(),
|
|
106
|
+
currency_code: z.string().max(3).optional(),
|
|
107
|
+
metadata: z.union([z.record(z.string(), z.any()), z.null()]).optional(),
|
|
108
|
+
date_due: z.union([z.string(), z.null()]).optional(),
|
|
109
|
+
date_service: z.union([z.string(), z.null()]).optional(),
|
|
110
|
+
date_service_to: z.union([z.string(), z.null()]).optional(),
|
|
111
|
+
items: z
|
|
112
|
+
.array(
|
|
113
|
+
z.object({
|
|
114
|
+
name: z.string().min(1).optional(),
|
|
115
|
+
description: z.union([z.string(), z.null()]).optional(),
|
|
116
|
+
price: z.number().optional(),
|
|
117
|
+
gross_price: z.number().optional(),
|
|
118
|
+
quantity: z.number().gte(-140737488355328).lte(140737488355327),
|
|
119
|
+
unit: z.union([z.string(), z.null()]).optional(),
|
|
120
|
+
taxes: z
|
|
121
|
+
.array(
|
|
122
|
+
z
|
|
123
|
+
.object({
|
|
124
|
+
rate: z.number(),
|
|
125
|
+
tax_id: z.string(),
|
|
126
|
+
classification: z.string(),
|
|
127
|
+
reverse_charge: z.boolean(),
|
|
128
|
+
amount: z.number(),
|
|
129
|
+
})
|
|
130
|
+
.partial()
|
|
131
|
+
)
|
|
132
|
+
.optional(),
|
|
133
|
+
discounts: z.array(LineDiscount).max(5).optional(),
|
|
134
|
+
metadata: z
|
|
135
|
+
.union([
|
|
136
|
+
z.string(),
|
|
137
|
+
z.number(),
|
|
138
|
+
z.boolean(),
|
|
139
|
+
z.null(),
|
|
140
|
+
z.object({}).partial().passthrough(),
|
|
141
|
+
z.array(z.unknown()),
|
|
142
|
+
z.null(),
|
|
143
|
+
])
|
|
144
|
+
.optional(),
|
|
145
|
+
item_id: z.string().optional(),
|
|
146
|
+
})
|
|
147
|
+
)
|
|
148
|
+
.min(1),
|
|
149
|
+
fina: z
|
|
150
|
+
.union([
|
|
151
|
+
z
|
|
152
|
+
.object({
|
|
153
|
+
premise_id: z
|
|
154
|
+
.string()
|
|
155
|
+
.min(1)
|
|
156
|
+
.max(20)
|
|
157
|
+
.regex(/^[0-9a-zA-Z]{1,20}$/),
|
|
158
|
+
device_id: z
|
|
159
|
+
.string()
|
|
160
|
+
.min(1)
|
|
161
|
+
.max(20)
|
|
162
|
+
.regex(/^\d{1,20}$/),
|
|
163
|
+
operator_oib: z.string().min(11).max(11),
|
|
164
|
+
is_end_consumer: z.boolean(),
|
|
165
|
+
payment_type: z.enum([
|
|
166
|
+
"cash",
|
|
167
|
+
"card",
|
|
168
|
+
"online",
|
|
169
|
+
"bank_transfer",
|
|
170
|
+
"paypal",
|
|
171
|
+
"crypto",
|
|
172
|
+
"coupon",
|
|
173
|
+
"other",
|
|
174
|
+
]),
|
|
175
|
+
subsequent_submit: z.boolean(),
|
|
176
|
+
})
|
|
177
|
+
.partial(),
|
|
178
|
+
z.null(),
|
|
179
|
+
])
|
|
180
|
+
.optional(),
|
|
181
|
+
expected_total_with_tax: z.number().gt(0).optional(),
|
|
182
|
+
});
|
|
183
|
+
|
|
184
|
+
|
|
185
|
+
// Dependency schema for rendercreditnotepreview_body
|
|
186
|
+
const PartialCreditNotePreview = z.object({
|
|
187
|
+
is_draft: z.boolean().optional(),
|
|
188
|
+
date: z
|
|
189
|
+
.string()
|
|
190
|
+
.regex(/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/)
|
|
191
|
+
.optional(),
|
|
192
|
+
issuer: z
|
|
193
|
+
.object({
|
|
194
|
+
name: z.union([z.string(), z.null()]),
|
|
195
|
+
email: z.union([z.string(), z.null()]),
|
|
196
|
+
address: z.union([z.string(), z.null()]),
|
|
197
|
+
address_2: z.union([z.string(), z.null()]),
|
|
198
|
+
post_code: z.union([z.string(), z.null()]),
|
|
199
|
+
city: z.union([z.string(), z.null()]),
|
|
200
|
+
state: z.union([z.string(), z.null()]),
|
|
201
|
+
country: z.union([z.string(), z.null()]),
|
|
202
|
+
country_code: z.union([z.string(), z.null()]),
|
|
203
|
+
tax_number: z.union([z.string(), z.null()]),
|
|
204
|
+
tax_number_2: z.union([z.string(), z.null()]),
|
|
205
|
+
company_number: z.union([z.string(), z.null()]),
|
|
206
|
+
bank_account: z.union([
|
|
207
|
+
z
|
|
208
|
+
.object({
|
|
209
|
+
type: z
|
|
210
|
+
.enum(["iban", "us_domestic", "uk_domestic", "other"])
|
|
211
|
+
.default("iban"),
|
|
212
|
+
name: z.string(),
|
|
213
|
+
bank_name: z.string(),
|
|
214
|
+
iban: z.string(),
|
|
215
|
+
account_number: z.string(),
|
|
216
|
+
bic: z.string(),
|
|
217
|
+
routing_number: z.string(),
|
|
218
|
+
sort_code: z.string(),
|
|
219
|
+
})
|
|
220
|
+
.partial()
|
|
221
|
+
.passthrough(),
|
|
222
|
+
z.null(),
|
|
223
|
+
]),
|
|
224
|
+
})
|
|
225
|
+
.partial()
|
|
226
|
+
.passthrough()
|
|
227
|
+
.optional(),
|
|
228
|
+
customer_id: z.union([z.string(), z.null()]).optional(),
|
|
229
|
+
customer: z
|
|
230
|
+
.union([
|
|
231
|
+
z
|
|
232
|
+
.object({
|
|
233
|
+
name: z.union([z.string(), z.null()]),
|
|
234
|
+
email: z.union([z.string(), z.null()]),
|
|
235
|
+
address: z.union([z.string(), z.null()]),
|
|
236
|
+
address_2: z.union([z.string(), z.null()]),
|
|
237
|
+
post_code: z.union([z.string(), z.null()]),
|
|
238
|
+
city: z.union([z.string(), z.null()]),
|
|
239
|
+
state: z.union([z.string(), z.null()]),
|
|
240
|
+
country: z.union([z.string(), z.null()]),
|
|
241
|
+
country_code: z.union([z.string(), z.null()]),
|
|
242
|
+
tax_number: z.union([z.string(), z.null()]),
|
|
243
|
+
tax_number_2: z.union([z.string(), z.null()]),
|
|
244
|
+
company_number: z.union([z.string(), z.null()]),
|
|
245
|
+
bank_account: z.union([
|
|
246
|
+
z
|
|
247
|
+
.object({
|
|
248
|
+
type: z
|
|
249
|
+
.enum(["iban", "us_domestic", "uk_domestic", "other"])
|
|
250
|
+
.default("iban"),
|
|
251
|
+
name: z.string(),
|
|
252
|
+
bank_name: z.string(),
|
|
253
|
+
iban: z.string(),
|
|
254
|
+
account_number: z.string(),
|
|
255
|
+
bic: z.string(),
|
|
256
|
+
routing_number: z.string(),
|
|
257
|
+
sort_code: z.string(),
|
|
258
|
+
})
|
|
259
|
+
.partial()
|
|
260
|
+
.passthrough(),
|
|
261
|
+
z.null(),
|
|
262
|
+
]),
|
|
263
|
+
save_customer: z.boolean().default(true),
|
|
264
|
+
})
|
|
265
|
+
.partial()
|
|
266
|
+
.passthrough(),
|
|
267
|
+
z.null(),
|
|
268
|
+
])
|
|
269
|
+
.optional(),
|
|
270
|
+
note: z.union([z.string(), z.null()]).optional(),
|
|
271
|
+
payment_terms: z.union([z.string(), z.null()]).optional(),
|
|
272
|
+
tax_clause: z.union([z.string(), z.null()]).optional(),
|
|
273
|
+
currency_code: z.string().max(3).optional(),
|
|
274
|
+
metadata: z.union([z.record(z.string(), z.any()), z.null()]).optional(),
|
|
275
|
+
date_due: z.union([z.string(), z.null()]).optional(),
|
|
276
|
+
date_service: z.union([z.string(), z.null()]).optional(),
|
|
277
|
+
date_service_to: z.union([z.string(), z.null()]).optional(),
|
|
278
|
+
items: z
|
|
279
|
+
.array(
|
|
280
|
+
z
|
|
281
|
+
.object({
|
|
282
|
+
name: z.string(),
|
|
283
|
+
quantity: z.number(),
|
|
284
|
+
price: z.number(),
|
|
285
|
+
gross_price: z.number(),
|
|
286
|
+
description: z.string(),
|
|
287
|
+
taxes: z.array(
|
|
288
|
+
z
|
|
289
|
+
.object({ rate: z.number(), tax_id: z.string() })
|
|
290
|
+
.partial()
|
|
291
|
+
.passthrough()
|
|
292
|
+
),
|
|
293
|
+
metadata: z.record(z.string(), z.any()),
|
|
294
|
+
})
|
|
295
|
+
.partial()
|
|
296
|
+
.passthrough()
|
|
297
|
+
)
|
|
298
|
+
.min(1),
|
|
299
|
+
fina: z
|
|
300
|
+
.union([
|
|
301
|
+
z
|
|
302
|
+
.object({
|
|
303
|
+
premise_id: z
|
|
304
|
+
.string()
|
|
305
|
+
.min(1)
|
|
306
|
+
.max(20)
|
|
307
|
+
.regex(/^[0-9a-zA-Z]{1,20}$/),
|
|
308
|
+
device_id: z
|
|
309
|
+
.string()
|
|
310
|
+
.min(1)
|
|
311
|
+
.max(20)
|
|
312
|
+
.regex(/^\d{1,20}$/),
|
|
313
|
+
operator_oib: z.string().min(11).max(11),
|
|
314
|
+
is_end_consumer: z.boolean(),
|
|
315
|
+
payment_type: z.enum([
|
|
316
|
+
"cash",
|
|
317
|
+
"card",
|
|
318
|
+
"online",
|
|
319
|
+
"bank_transfer",
|
|
320
|
+
"paypal",
|
|
321
|
+
"crypto",
|
|
322
|
+
"coupon",
|
|
323
|
+
"other",
|
|
324
|
+
]),
|
|
325
|
+
subsequent_submit: z.boolean(),
|
|
326
|
+
})
|
|
327
|
+
.partial(),
|
|
328
|
+
z.null(),
|
|
329
|
+
])
|
|
330
|
+
.optional(),
|
|
331
|
+
expected_total_with_tax: z.number().gt(0).optional(),
|
|
332
|
+
});
|
|
333
|
+
|
|
334
|
+
|
|
335
|
+
// Schema for render creditnotepreview operation
|
|
336
|
+
const renderCreditNotePreviewSchemaDefinition = z.union([
|
|
337
|
+
PartialCreditNotePreview,
|
|
338
|
+
CompleteCreditNotePreview,
|
|
339
|
+
]);
|
|
340
|
+
|
|
341
|
+
// Type for render creditnotepreview operation
|
|
342
|
+
export type RenderCreditNotePreviewSchema = z.infer<typeof renderCreditNotePreviewSchemaDefinition>;
|
|
343
|
+
|
|
344
|
+
export const renderCreditNotePreviewSchema = renderCreditNotePreviewSchemaDefinition;
|