@spaceinvoices/js-sdk 2.3.4 → 2.3.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client-headers.cjs +2 -0
- package/dist/client-headers.cjs.map +1 -0
- package/dist/client-headers.js +2 -0
- package/dist/client-headers.js.map +1 -0
- package/dist/index.cjs +232 -2
- package/dist/index.cjs.map +1 -387
- package/dist/index.js +232 -2
- package/dist/index.js.map +1 -387
- package/dist/sdk/index.cjs +3 -0
- package/dist/sdk/index.cjs.map +1 -0
- package/dist/sdk/index.js +3 -0
- package/dist/sdk/index.js.map +1 -0
- package/package.json +17 -19
package/dist/index.js
CHANGED
|
@@ -1,3 +1,233 @@
|
|
|
1
|
-
class Ea{basePath;accessToken;constructor(e){this.basePath=e?.basePath,this.accessToken=e?.accessToken}}var qp={pending:"pending",success:"success",failed:"failed"};var Jp={white_label_subscriptionsubscribed:"white_label_subscription.subscribed",white_label_subscriptionupgraded:"white_label_subscription.upgraded",white_label_subscriptiondowngrade_scheduled:"white_label_subscription.downgrade_scheduled",white_label_subscriptiondowngraded:"white_label_subscription.downgraded",white_label_subscriptioncancellation_scheduled:"white_label_subscription.cancellation_scheduled",white_label_subscriptioncancelled:"white_label_subscription.cancelled",white_label_subscriptionrenewed:"white_label_subscription.renewed",white_label_subscriptionexpired:"white_label_subscription.expired",white_label_subscriptionpayment_failed:"white_label_subscription.payment_failed"};var Lp={white_label_subscriptionsubscribed:"white_label_subscription.subscribed",white_label_subscriptionupgraded:"white_label_subscription.upgraded",white_label_subscriptiondowngrade_scheduled:"white_label_subscription.downgrade_scheduled",white_label_subscriptiondowngraded:"white_label_subscription.downgraded",white_label_subscriptioncancellation_scheduled:"white_label_subscription.cancellation_scheduled",white_label_subscriptioncancelled:"white_label_subscription.cancelled",white_label_subscriptionrenewed:"white_label_subscription.renewed",white_label_subscriptionexpired:"white_label_subscription.expired",white_label_subscriptionpayment_failed:"white_label_subscription.payment_failed"};var Yp={viewer:"viewer",editor:"editor",admin:"admin"};var Kp={b2b_standard:"b2b_standard",b2c_gross_discount:"b2c_gross_discount"};var Up={product:"product",service:"service",advance:"advance"};var jp={separator:"separator"};var $p={domestic:"domestic",intra_eu_b2b:"intra_eu_b2b",intra_eu_b2c:"intra_eu_b2c","3w_b2b":"3w_b2b","3w_b2c":"3w_b2c",export:"export"};var zp={separator:"separator"};var td={b2b_standard:"b2b_standard",b2c_gross_discount:"b2c_gross_discount"};var od={invoice:"invoice",estimate:"estimate",credit_note:"credit_note",advance_invoice:"advance_invoice",delivery_note:"delivery_note"};var id={b2b_standard:"b2b_standard",b2c_gross_discount:"b2c_gross_discount"};var sd={b2b_standard:"b2b_standard",b2c_gross_discount:"b2c_gross_discount"};var ld={b2b_standard:"b2b_standard",b2c_gross_discount:"b2c_gross_discount"};var dd={b2b_standard:"b2b_standard",b2c_gross_discount:"b2c_gross_discount"};var md={estimate:"estimate",proforma_invoice:"proforma_invoice"};var vd={b2b_standard:"b2b_standard",b2c_gross_discount:"b2c_gross_discount"};var gd={white_label_subscriptionsubscribed:"white_label_subscription.subscribed",white_label_subscriptionupgraded:"white_label_subscription.upgraded",white_label_subscriptiondowngrade_scheduled:"white_label_subscription.downgrade_scheduled",white_label_subscriptiondowngraded:"white_label_subscription.downgraded",white_label_subscriptioncancellation_scheduled:"white_label_subscription.cancellation_scheduled",white_label_subscriptioncancelled:"white_label_subscription.cancelled",white_label_subscriptionrenewed:"white_label_subscription.renewed",white_label_subscriptionexpired:"white_label_subscription.expired",white_label_subscriptionpayment_failed:"white_label_subscription.payment_failed"};var bd={b2b_standard:"b2b_standard",b2c_gross_discount:"b2c_gross_discount"};var xd={monthly:"monthly",yearly:"yearly"};var _d={b2b_standard:"b2b_standard",b2c_gross_discount:"b2c_gross_discount"};var Td={b2b_standard:"b2b_standard",b2c_gross_discount:"b2c_gross_discount"};var Dd={product:"product",service:"service",advance:"advance"};var Rd={separator:"separator"};var kd={cash:"cash",bank_transfer:"bank_transfer",card:"card",check:"check",paypal:"paypal",coupon:"coupon",other:"other",credit_note:"credit_note",advance:"advance"};var wd={live:"live",sandbox:"sandbox"};var Bd={modern:"modern",classic:"classic",condensed:"condensed",minimal:"minimal",fashion:"fashion",timeless_modern_full_data:"timeless_modern_full_data"};var qd={b2b_standard:"b2b_standard",b2c_gross_discount:"b2c_gross_discount"};var Jd={estimate:"estimate",proforma_invoice:"proforma_invoice"};var Ld={domestic:"domestic",intra_eu_b2b:"intra_eu_b2b",intra_eu_b2c:"intra_eu_b2c","3w_b2b":"3w_b2b","3w_b2c":"3w_b2c",export:"export"};var Yd={invoice:"invoice",credit_note:"credit_note",advance_invoice:"advance_invoice"};var Kd={cash:"cash",bank_transfer:"bank_transfer",card:"card",check:"check",paypal:"paypal",coupon:"coupon",other:"other",credit_note:"credit_note",advance:"advance"};var Ud={b2b_standard:"b2b_standard",b2c_gross_discount:"b2c_gross_discount"};var jd={product:"product",service:"service",advance:"advance"};var $d={live:"live",sandbox:"sandbox"};var zd={pending:"pending",processing:"processing",completed:"completed",failed:"failed"};var tu={unpaid:"unpaid",paid:"paid",partially_paid:"partially_paid",refunded:"refunded"};var ou={shopify:"shopify",woocommerce:"woocommerce",manual:"manual"};var iu={shopify:"shopify",woocommerce:"woocommerce",manual:"manual"};var su={cash:"cash",bank_transfer:"bank_transfer",card:"card",check:"check",paypal:"paypal",coupon:"coupon",other:"other",credit_note:"credit_note",advance:"advance"};var lu={invoice:"invoice",advance_invoice:"advance_invoice",credit_note:"credit_note",estimate:"estimate"};var du={daily:"daily",weekly:"weekly",monthly:"monthly",yearly:"yearly"};var mu={invoicecreated:"invoice.created",invoiceupdated:"invoice.updated",invoicesent:"invoice.sent",invoicepaid:"invoice.paid",invoiceoverdue:"invoice.overdue",invoicecancelled:"invoice.cancelled",invoicedeleted:"invoice.deleted",invoicerestored:"invoice.restored",invoicevoided:"invoice.voided",invoicefinalized:"invoice.finalized",customercreated:"customer.created",customerupdated:"customer.updated",customerdeleted:"customer.deleted",customerrestored:"customer.restored",customerpermanently_deleted:"customer.permanently_deleted",paymentreceived:"payment.received",paymentfailed:"payment.failed",paymentdeleted:"payment.deleted",paymentrestored:"payment.restored",paymentpermanently_deleted:"payment.permanently_deleted",estimatecreated:"estimate.created",estimatesent:"estimate.sent",estimateaccepted:"estimate.accepted",estimaterejected:"estimate.rejected",estimatedeleted:"estimate.deleted",estimaterestored:"estimate.restored",credit_notecreated:"credit_note.created",credit_noteissued:"credit_note.issued",credit_notevoided:"credit_note.voided",credit_notedeleted:"credit_note.deleted",credit_noterestored:"credit_note.restored",advance_invoicecreated:"advance_invoice.created",advance_invoicepaid:"advance_invoice.paid",advance_invoiceapplied:"advance_invoice.applied",advance_invoicevoided:"advance_invoice.voided",advance_invoicedeleted:"advance_invoice.deleted",advance_invoicerestored:"advance_invoice.restored",itemcreated:"item.created",itemupdated:"item.updated",itemdeleted:"item.deleted",itemrestored:"item.restored",itempermanently_deleted:"item.permanently_deleted",taxcreated:"tax.created",taxupdated:"tax.updated",taxdeleted:"tax.deleted",taxrestored:"tax.restored",taxpermanently_deleted:"tax.permanently_deleted",recurring_invoicecreated:"recurring_invoice.created",recurring_invoiceupdated:"recurring_invoice.updated",recurring_invoicedeleted:"recurring_invoice.deleted",recurring_invoicerestored:"recurring_invoice.restored",recurring_invoicepermanently_deleted:"recurring_invoice.permanently_deleted",recurring_invoicepaused:"recurring_invoice.paused",recurring_invoiceresumed:"recurring_invoice.resumed",recurring_invoiceinvoice_generated:"recurring_invoice.invoice_generated",recurring_invoicegeneration_failed:"recurring_invoice.generation_failed",recurring_invoicecompleted:"recurring_invoice.completed",stripe_appconnected:"stripe_app.connected",stripe_appdisconnected:"stripe_app.disconnected",stripe_appsettings_updated:"stripe_app.settings_updated",ordercreated:"order.created",orderupdated:"order.updated",orderdeleted:"order.deleted",orderrestored:"order.restored",orderpermanently_deleted:"order.permanently_deleted",orderprocessed:"order.processed",ordercancelled:"order.cancelled",orderfailed:"order.failed",order_integrationcreated:"order_integration.created",order_integrationupdated:"order_integration.updated",order_integrationdeleted:"order_integration.deleted",delivery_notecreated:"delivery_note.created",delivery_notesent:"delivery_note.sent",delivery_notecancelled:"delivery_note.cancelled",delivery_notevoided:"delivery_note.voided",delivery_notedeleted:"delivery_note.deleted",delivery_noterestored:"delivery_note.restored",e_invoicingsubmissioncreated:"e_invoicing.submission.created",e_invoicingsubmissiondelivered:"e_invoicing.submission.delivered",e_invoicingsubmissionfailed:"e_invoicing.submission.failed",e_invoicingsupplieronboarded:"e_invoicing.supplier.onboarded",e_invoicingsupplierrejected:"e_invoicing.supplier.rejected"};var vu={standard:"standard",custom:"custom"};var gu={b2b_standard:"b2b_standard",b2c_gross_discount:"b2c_gross_discount"};var bu={product:"product",service:"service",advance:"advance"};var xu={separator:"separator"};var _u={domestic:"domestic",intra_eu_b2b:"intra_eu_b2b",intra_eu_b2c:"intra_eu_b2c","3w_b2b":"3w_b2b","3w_b2c":"3w_b2c",export:"export"};var Tu={stripe:"stripe",paypal:"paypal",bank:"bank",braintree:"braintree"};var Du={b2b_standard:"b2b_standard",b2c_gross_discount:"b2c_gross_discount"};var Ru={b2b_standard:"b2b_standard",b2c_gross_discount:"b2c_gross_discount"};var ku={b2b_standard:"b2b_standard",b2c_gross_discount:"b2c_gross_discount"};var wu={b2b_standard:"b2b_standard",b2c_gross_discount:"b2c_gross_discount"};var Bu={estimate:"estimate",proforma_invoice:"proforma_invoice"};var qu={domestic:"domestic",intra_eu_b2b:"intra_eu_b2b",intra_eu_b2c:"intra_eu_b2c","3w_b2b":"3w_b2b","3w_b2c":"3w_b2c",export:"export"};var Ju={invoice:"invoice",credit_note:"credit_note",advance_invoice:"advance_invoice"};var Lu={b2b_standard:"b2b_standard",b2c_gross_discount:"b2c_gross_discount"};var Yu={product:"product",service:"service",advance:"advance"};var Ku={separator:"separator"};var Uu={invoice:"invoice",estimate:"estimate",credit_note:"credit_note",advance_invoice:"advance_invoice",delivery_note:"delivery_note"};var ju={b2b_standard:"b2b_standard",b2c_gross_discount:"b2c_gross_discount"};var $u={product:"product",service:"service",advance:"advance"};var zu={separator:"separator"};var tm={domestic:"domestic",intra_eu_b2b:"intra_eu_b2b",intra_eu_b2c:"intra_eu_b2c","3w_b2b":"3w_b2b","3w_b2c":"3w_b2c",export:"export"};var om={b2b_standard:"b2b_standard",b2c_gross_discount:"b2c_gross_discount"};var im={domestic:"domestic",intra_eu_b2b:"intra_eu_b2b",intra_eu_b2c:"intra_eu_b2c","3w_b2b":"3w_b2b","3w_b2c":"3w_b2c",export:"export"};var sm={estimate:"estimate",proforma_invoice:"proforma_invoice"};var lm={invoice:"invoice",estimate:"estimate",credit_note:"credit_note",advance_invoice:"advance_invoice",delivery_note:"delivery_note"};var dm={invoice:"invoice",estimate:"estimate",credit_note:"credit_note",advance_invoice:"advance_invoice",delivery_note:"delivery_note"};var mm={invoice:"invoice",estimate:"estimate",credit_note:"credit_note",advance_invoice:"advance_invoice",delivery_note:"delivery_note"};var vm={invoice:"invoice",estimate:"estimate",credit_note:"credit_note",advance_invoice:"advance_invoice"};var gm={live:"live",sandbox:"sandbox"};var bm={iban:"iban",us_domestic:"us_domestic",uk_domestic:"uk_domestic",other:"other"};var xm={live:"live",sandbox:"sandbox"};var _m={viewer:"viewer",editor:"editor",admin:"admin"};var Tm={pending:"pending",accepted:"accepted",expired:"expired"};var Dm={modern:"modern",classic:"classic",condensed:"condensed",minimal:"minimal",fashion:"fashion",timeless_modern_full_data:"timeless_modern_full_data"};var Rm={viewer:"viewer",editor:"editor",admin:"admin"};var km={invoice:"invoice",estimate:"estimate",credit_note:"credit_note"};var wm={b2b_standard:"b2b_standard",b2c_gross_discount:"b2c_gross_discount"};var Bm={product:"product",service:"service",advance:"advance"};var qm={separator:"separator"};var Jm={estimate:"estimate",proforma_invoice:"proforma_invoice"};var Lm={domestic:"domestic",intra_eu_b2b:"intra_eu_b2b",intra_eu_b2c:"intra_eu_b2c","3w_b2b":"3w_b2b","3w_b2c":"3w_b2c",export:"export"};var Ym={xlsx:"xlsx",csv:"csv"};var Km={en:"en",de:"de",sl:"sl",it:"it",fr:"fr",es:"es",pt:"pt",nl:"nl",pl:"pl",hr:"hr",sv:"sv",fi:"fi",et:"et",bg:"bg",cs:"cs",sk:"sk",nb:"nb",is:"is"};var Um={invoice:"invoice",estimate:"estimate",credit_note:"credit_note",advance_invoice:"advance_invoice",delivery_note:"delivery_note"};var jm={xlsx:"xlsx",csv:"csv"};var $m={en:"en",de:"de",sl:"sl",it:"it",fr:"fr",es:"es",pt:"pt",nl:"nl",pl:"pl",hr:"hr",sv:"sv",fi:"fi",et:"et",bg:"bg",cs:"cs",sk:"sk",nb:"nb",is:"is"};var zm={invoice:"invoice",estimate:"estimate",credit_note:"credit_note",advance_invoice:"advance_invoice",delivery_note:"delivery_note"};var tf={invoice:"invoice",estimate:"estimate",credit_note:"credit_note",advance_invoice:"advance_invoice",delivery_note:"delivery_note"};var of={test:"test",production:"production"};var rf={invoice:"invoice",advance_invoice:"advance_invoice",credit_note:"credit_note",estimate:"estimate"};var cf={user:"user",api_key:"api_key",system:"system",cron:"cron",webhook:"webhook"};var pf={live:"live",sandbox:"sandbox"};var uf={pending:"pending",processing:"processing",completed:"completed",failed:"failed"};var ff={logo:"logo",signature:"signature",attachment:"attachment"};var yf={valid:"valid",expiring_soon:"expiring_soon",expired:"expired",missing:"missing"};var If={N:"N",P:"P"};var Sf={valid:"valid",expiring_soon:"expiring_soon",expired:"expired",missing:"missing"};var Pf={B:"B",C:"C"};var Af={true:"true",false:"false"};var hf={invoice:"invoice",estimate:"estimate",credit_note:"credit_note",advance_invoice:"advance_invoice",delivery_note:"delivery_note"};var Ef={pending:"pending",processing:"processing",completed:"completed",failed:"failed"};var Of={"en-US":"en-US","de-DE":"de-DE","it-IT":"it-IT","fr-FR":"fr-FR","es-ES":"es-ES","sl-SI":"sl-SI","pt-PT":"pt-PT","nl-NL":"nl-NL","pl-PL":"pl-PL","hr-HR":"hr-HR","sv-SE":"sv-SE","fi-FI":"fi-FI","et-EE":"et-EE","bg-BG":"bg-BG","cs-CZ":"cs-CZ","sk-SK":"sk-SK","nb-NO":"nb-NO","is-IS":"is-IS"};var Nf={"en-US":"en-US","de-DE":"de-DE","it-IT":"it-IT","fr-FR":"fr-FR","es-ES":"es-ES","sl-SI":"sl-SI","pt-PT":"pt-PT","nl-NL":"nl-NL","pl-PL":"pl-PL","hr-HR":"hr-HR","sv-SE":"sv-SE","fi-FI":"fi-FI","et-EE":"et-EE","bg-BG":"bg-BG","cs-CZ":"cs-CZ","sk-SK":"sk-SK","nb-NO":"nb-NO","is-IS":"is-IS"};var Cf={"en-US":"en-US","de-DE":"de-DE","it-IT":"it-IT","fr-FR":"fr-FR","es-ES":"es-ES","sl-SI":"sl-SI","pt-PT":"pt-PT","nl-NL":"nl-NL","pl-PL":"pl-PL","hr-HR":"hr-HR","sv-SE":"sv-SE","fi-FI":"fi-FI","et-EE":"et-EE","bg-BG":"bg-BG","cs-CZ":"cs-CZ","sk-SK":"sk-SK","nb-NO":"nb-NO","is-IS":"is-IS"};var Gf={"en-US":"en-US","de-DE":"de-DE","it-IT":"it-IT","fr-FR":"fr-FR","es-ES":"es-ES","sl-SI":"sl-SI","pt-PT":"pt-PT","nl-NL":"nl-NL","pl-PL":"pl-PL","hr-HR":"hr-HR","sv-SE":"sv-SE","fi-FI":"fi-FI","et-EE":"et-EE","bg-BG":"bg-BG","cs-CZ":"cs-CZ","sk-SK":"sk-SK","nb-NO":"nb-NO","is-IS":"is-IS"};var Ff={"en-US":"en-US","de-DE":"de-DE","it-IT":"it-IT","fr-FR":"fr-FR","es-ES":"es-ES","sl-SI":"sl-SI","pt-PT":"pt-PT","nl-NL":"nl-NL","pl-PL":"pl-PL","hr-HR":"hr-HR","sv-SE":"sv-SE","fi-FI":"fi-FI","et-EE":"et-EE","bg-BG":"bg-BG","cs-CZ":"cs-CZ","sk-SK":"sk-SK","nb-NO":"nb-NO","is-IS":"is-IS"};var Mf={"en-US":"en-US","de-DE":"de-DE","it-IT":"it-IT","fr-FR":"fr-FR","es-ES":"es-ES","sl-SI":"sl-SI","pt-PT":"pt-PT","nl-NL":"nl-NL","pl-PL":"pl-PL","hr-HR":"hr-HR","sv-SE":"sv-SE","fi-FI":"fi-FI","et-EE":"et-EE","bg-BG":"bg-BG","cs-CZ":"cs-CZ","sk-SK":"sk-SK","nb-NO":"nb-NO","is-IS":"is-IS"};var Hf={"en-US":"en-US","de-DE":"de-DE","it-IT":"it-IT","fr-FR":"fr-FR","es-ES":"es-ES","sl-SI":"sl-SI","pt-PT":"pt-PT","nl-NL":"nl-NL","pl-PL":"pl-PL","hr-HR":"hr-HR","sv-SE":"sv-SE","fi-FI":"fi-FI","et-EE":"et-EE","bg-BG":"bg-BG","cs-CZ":"cs-CZ","sk-SK":"sk-SK","nb-NO":"nb-NO","is-IS":"is-IS"};var Qf={"en-US":"en-US","de-DE":"de-DE","it-IT":"it-IT","fr-FR":"fr-FR","es-ES":"es-ES","sl-SI":"sl-SI","pt-PT":"pt-PT","nl-NL":"nl-NL","pl-PL":"pl-PL","hr-HR":"hr-HR","sv-SE":"sv-SE","fi-FI":"fi-FI","et-EE":"et-EE","bg-BG":"bg-BG","cs-CZ":"cs-CZ","sk-SK":"sk-SK","nb-NO":"nb-NO","is-IS":"is-IS"};var Wf={"en-US":"en-US","de-DE":"de-DE","it-IT":"it-IT","fr-FR":"fr-FR","es-ES":"es-ES","sl-SI":"sl-SI","pt-PT":"pt-PT","nl-NL":"nl-NL","pl-PL":"pl-PL","hr-HR":"hr-HR","sv-SE":"sv-SE","fi-FI":"fi-FI","et-EE":"et-EE","bg-BG":"bg-BG","cs-CZ":"cs-CZ","sk-SK":"sk-SK","nb-NO":"nb-NO","is-IS":"is-IS"};var Zf={"en-US":"en-US","de-DE":"de-DE","it-IT":"it-IT","fr-FR":"fr-FR","es-ES":"es-ES","sl-SI":"sl-SI","pt-PT":"pt-PT","nl-NL":"nl-NL","pl-PL":"pl-PL","hr-HR":"hr-HR","sv-SE":"sv-SE","fi-FI":"fi-FI","et-EE":"et-EE","bg-BG":"bg-BG","cs-CZ":"cs-CZ","sk-SK":"sk-SK","nb-NO":"nb-NO","is-IS":"is-IS"};var Vf={"en-US":"en-US","de-DE":"de-DE","it-IT":"it-IT","fr-FR":"fr-FR","es-ES":"es-ES","sl-SI":"sl-SI","pt-PT":"pt-PT","nl-NL":"nl-NL","pl-PL":"pl-PL","hr-HR":"hr-HR","sv-SE":"sv-SE","fi-FI":"fi-FI","et-EE":"et-EE","bg-BG":"bg-BG","cs-CZ":"cs-CZ","sk-SK":"sk-SK","nb-NO":"nb-NO","is-IS":"is-IS"};var Xf={"en-US":"en-US","de-DE":"de-DE","it-IT":"it-IT","fr-FR":"fr-FR","es-ES":"es-ES","sl-SI":"sl-SI","pt-PT":"pt-PT","nl-NL":"nl-NL","pl-PL":"pl-PL","hr-HR":"hr-HR","sv-SE":"sv-SE","fi-FI":"fi-FI","et-EE":"et-EE","bg-BG":"bg-BG","cs-CZ":"cs-CZ","sk-SK":"sk-SK","nb-NO":"nb-NO","is-IS":"is-IS"};var ev={"en-US":"en-US","de-DE":"de-DE","it-IT":"it-IT","fr-FR":"fr-FR","es-ES":"es-ES","sl-SI":"sl-SI","pt-PT":"pt-PT","nl-NL":"nl-NL","pl-PL":"pl-PL","hr-HR":"hr-HR","sv-SE":"sv-SE","fi-FI":"fi-FI","et-EE":"et-EE","bg-BG":"bg-BG","cs-CZ":"cs-CZ","sk-SK":"sk-SK","nb-NO":"nb-NO","is-IS":"is-IS"};var nv={"en-US":"en-US","de-DE":"de-DE","it-IT":"it-IT","fr-FR":"fr-FR","es-ES":"es-ES","sl-SI":"sl-SI","pt-PT":"pt-PT","nl-NL":"nl-NL","pl-PL":"pl-PL","hr-HR":"hr-HR","sv-SE":"sv-SE","fi-FI":"fi-FI","et-EE":"et-EE","bg-BG":"bg-BG","cs-CZ":"cs-CZ","sk-SK":"sk-SK","nb-NO":"nb-NO","is-IS":"is-IS"};var av={"en-US":"en-US","de-DE":"de-DE","it-IT":"it-IT","fr-FR":"fr-FR","es-ES":"es-ES","sl-SI":"sl-SI","pt-PT":"pt-PT","nl-NL":"nl-NL","pl-PL":"pl-PL","hr-HR":"hr-HR","sv-SE":"sv-SE","fi-FI":"fi-FI","et-EE":"et-EE","bg-BG":"bg-BG","cs-CZ":"cs-CZ","sk-SK":"sk-SK","nb-NO":"nb-NO","is-IS":"is-IS"};var rv={"en-US":"en-US","de-DE":"de-DE","it-IT":"it-IT","fr-FR":"fr-FR","es-ES":"es-ES","sl-SI":"sl-SI","pt-PT":"pt-PT","nl-NL":"nl-NL","pl-PL":"pl-PL","hr-HR":"hr-HR","sv-SE":"sv-SE","fi-FI":"fi-FI","et-EE":"et-EE","bg-BG":"bg-BG","cs-CZ":"cs-CZ","sk-SK":"sk-SK","nb-NO":"nb-NO","is-IS":"is-IS"};var cv={"en-US":"en-US","de-DE":"de-DE","it-IT":"it-IT","fr-FR":"fr-FR","es-ES":"es-ES","sl-SI":"sl-SI","pt-PT":"pt-PT","nl-NL":"nl-NL","pl-PL":"pl-PL","hr-HR":"hr-HR","sv-SE":"sv-SE","fi-FI":"fi-FI","et-EE":"et-EE","bg-BG":"bg-BG","cs-CZ":"cs-CZ","sk-SK":"sk-SK","nb-NO":"nb-NO","is-IS":"is-IS"};var pv={"en-US":"en-US","de-DE":"de-DE","it-IT":"it-IT","fr-FR":"fr-FR","es-ES":"es-ES","sl-SI":"sl-SI","pt-PT":"pt-PT","nl-NL":"nl-NL","pl-PL":"pl-PL","hr-HR":"hr-HR","sv-SE":"sv-SE","fi-FI":"fi-FI","et-EE":"et-EE","bg-BG":"bg-BG","cs-CZ":"cs-CZ","sk-SK":"sk-SK","nb-NO":"nb-NO","is-IS":"is-IS"};var uv={"en-US":"en-US","de-DE":"de-DE","it-IT":"it-IT","fr-FR":"fr-FR","es-ES":"es-ES","sl-SI":"sl-SI","pt-PT":"pt-PT","nl-NL":"nl-NL","pl-PL":"pl-PL","hr-HR":"hr-HR","sv-SE":"sv-SE","fi-FI":"fi-FI","et-EE":"et-EE","bg-BG":"bg-BG","cs-CZ":"cs-CZ","sk-SK":"sk-SK","nb-NO":"nb-NO","is-IS":"is-IS"};var fv={"en-US":"en-US","de-DE":"de-DE","it-IT":"it-IT","fr-FR":"fr-FR","es-ES":"es-ES","sl-SI":"sl-SI","pt-PT":"pt-PT","nl-NL":"nl-NL","pl-PL":"pl-PL","hr-HR":"hr-HR","sv-SE":"sv-SE","fi-FI":"fi-FI","et-EE":"et-EE","bg-BG":"bg-BG","cs-CZ":"cs-CZ","sk-SK":"sk-SK","nb-NO":"nb-NO","is-IS":"is-IS"};var yv={vod_xml:"vod_xml",vasco_xml:"vasco_xml",minimax_xml:"minimax_xml"};var Iv={sp:"sp",doo:"doo",dno:"dno",club:"club"};var Sv={stored:"stored",registry:"registry",unknown:"unknown"};var Pv={normirani:"normirani",dejanski:"dejanski"};var Av={sp:"sp",doo:"doo",dno:"dno",club:"club"};var hv={resident:"resident",non_resident:"non_resident"};var Ev={standard:"standard",special_vat_identified:"special_vat_identified",non_vat_subject:"non_vat_subject"};var Ov={records:"records",single_entry:"single_entry",double_entry:"double_entry"};var Nv={full_time_self_employed:"full_time_self_employed",other:"other"};var Cv={product:"product",service:"service"};var Gv={goods:"goods",services:"services"};var Fv={invoice:"invoice",credit_note:"credit_note",advance_invoice:"advance_invoice"};var Mv={b2b_standard:"b2b_standard",b2c_gross_discount:"b2c_gross_discount"};var Hv={product:"product",service:"service",advance:"advance"};var Qv={separator:"separator"};var Wv={domestic:"domestic",intra_eu_b2b:"intra_eu_b2b",intra_eu_b2c:"intra_eu_b2c","3w_b2b":"3w_b2b","3w_b2c":"3w_b2c",export:"export"};var Zv={product:"product",service:"service",advance:"advance"};var Vv={fiscalization_series:"fiscalization_series",accounting_categories:"accounting_categories",inventory_and_pricing:"inventory_and_pricing",sales_integrations:"sales_integrations",webhooks:"webhooks"};var Xv={percent:"percent",amount:"amount"};var ey={invoice:"invoice",advance_invoice:"advance_invoice",credit_note:"credit_note",estimate:"estimate"};var ny={pending:"pending",processing:"processing",completed:"completed",failed:"failed"};var ay={unpaid:"unpaid",paid:"paid",partially_paid:"partially_paid",refunded:"refunded"};var ry={shopify:"shopify",woocommerce:"woocommerce",manual:"manual"};var cy={pending:"pending",processing:"processing",invoiced:"invoiced",cancelled:"cancelled",failed:"failed"};var py={created:"created",paid:"paid",fulfilled:"fulfilled"};var uy={shopify:"shopify",woocommerce:"woocommerce",manual:"manual"};var fy={line_item:"line_item",shipping:"shipping"};var yy={b2b_standard:"b2b_standard",b2c_gross_discount:"b2c_gross_discount"};var Iy={percent:"percent",amount:"amount"};var Sy={separator:"separator"};var Py={b2b_standard:"b2b_standard",b2c_gross_discount:"b2c_gross_discount"};var Ay={percent:"percent",amount:"amount"};var hy={separator:"separator"};var Ey={b2b_standard:"b2b_standard",b2c_gross_discount:"b2c_gross_discount"};var Oy={percent:"percent",amount:"amount"};var Ny={separator:"separator"};var Cy={b2b_standard:"b2b_standard",b2c_gross_discount:"b2c_gross_discount"};var Gy={percent:"percent",amount:"amount"};var Fy={separator:"separator"};var My={estimate:"estimate",proforma_invoice:"proforma_invoice"};var Hy={b2b_standard:"b2b_standard",b2c_gross_discount:"b2c_gross_discount"};var Qy={percent:"percent",amount:"amount"};var Wy={separator:"separator"};var Zy={modern:"modern",classic:"classic",condensed:"condensed",minimal:"minimal",fashion:"fashion",timeless_modern_full_data:"timeless_modern_full_data"};var Vy={en:"en",de:"de",sl:"sl",it:"it",fr:"fr",es:"es",pt:"pt",nl:"nl",pl:"pl",hr:"hr",sv:"sv",fi:"fi",et:"et",bg:"bg",cs:"cs",sk:"sk",nb:"nb",is:"is"};var Xy={cash:"cash",bank_transfer:"bank_transfer",card:"card",check:"check",paypal:"paypal",coupon:"coupon",other:"other",credit_note:"credit_note",advance:"advance"};var eg={en:"en",de:"de",sl:"sl",it:"it",fr:"fr",es:"es",pt:"pt",nl:"nl",pl:"pl",hr:"hr",sv:"sv",fi:"fi",et:"et",bg:"bg",cs:"cs",sk:"sk",nb:"nb",is:"is"};var ng={"en-US":"en-US","de-DE":"de-DE","it-IT":"it-IT","fr-FR":"fr-FR","es-ES":"es-ES","sl-SI":"sl-SI","pt-PT":"pt-PT","nl-NL":"nl-NL","pl-PL":"pl-PL","hr-HR":"hr-HR","sv-SE":"sv-SE","fi-FI":"fi-FI","et-EE":"et-EE","bg-BG":"bg-BG","cs-CZ":"cs-CZ","sk-SK":"sk-SK","nb-NO":"nb-NO","is-IS":"is-IS"};var ag={invoice:"invoice",estimate:"estimate",credit_note:"credit_note",advance_invoice:"advance_invoice",delivery_note:"delivery_note"};var rg={en:"en",de:"de",sl:"sl",it:"it",fr:"fr",es:"es",pt:"pt",nl:"nl",pl:"pl",hr:"hr",sv:"sv",fi:"fi",et:"et",bg:"bg",cs:"cs",sk:"sk",nb:"nb",is:"is"};var cg={"en-US":"en-US","de-DE":"de-DE","it-IT":"it-IT","fr-FR":"fr-FR","es-ES":"es-ES","sl-SI":"sl-SI","pt-PT":"pt-PT","nl-NL":"nl-NL","pl-PL":"pl-PL","hr-HR":"hr-HR","sv-SE":"sv-SE","fi-FI":"fi-FI","et-EE":"et-EE","bg-BG":"bg-BG","cs-CZ":"cs-CZ","sk-SK":"sk-SK","nb-NO":"nb-NO","is-IS":"is-IS"};var pg={invoice:"invoice",estimate:"estimate",credit_note:"credit_note",advance_invoice:"advance_invoice",delivery_note:"delivery_note"};var ug={invoice:"invoice",advance_invoice:"advance_invoice",credit_note:"credit_note",estimate:"estimate"};var fg={daily:"daily",weekly:"weekly",monthly:"monthly",yearly:"yearly"};var yg={active:"active",paused:"paused",completed:"completed"};var Ig={A:"A",B:"B",C:"C"};var Sg={true:"true",false:"false"};var Pg={true:"true",false:"false"};var Ag={modern:"modern",classic:"classic",condensed:"condensed",minimal:"minimal",fashion:"fashion"};var hg={qr_only:"qr_only",full_slip:"full_slip"};var Eg={true:"true",false:"false"};var Og={true:"true",false:"false"};var Ng={true:"true",false:"false"};var Cg={modern:"modern",classic:"classic",condensed:"condensed",minimal:"minimal",fashion:"fashion"};var Gg={qr_only:"qr_only",full_slip:"full_slip"};var Fg={true:"true",false:"false"};var Mg={true:"true",false:"false"};var Hg={true:"true",false:"false"};var Qg={modern:"modern",classic:"classic",condensed:"condensed",minimal:"minimal",fashion:"fashion"};var Wg={qr_only:"qr_only",full_slip:"full_slip"};var Zg={true:"true",false:"false"};var Vg={modern:"modern",classic:"classic",condensed:"condensed",minimal:"minimal",fashion:"fashion"};var Xg={modern:"modern",classic:"classic",condensed:"condensed",minimal:"minimal",fashion:"fashion"};var eI={true:"true",false:"false"};var nI={true:"true",false:"false"};var aI={modern:"modern",classic:"classic",condensed:"condensed",minimal:"minimal",fashion:"fashion"};var rI={qr_only:"qr_only",full_slip:"full_slip"};var cI={true:"true",false:"false"};var pI={true:"true",false:"false"};var uI={true:"true",false:"false"};var fI={modern:"modern",classic:"classic",condensed:"condensed",minimal:"minimal",fashion:"fashion"};var yI={qr_only:"qr_only",full_slip:"full_slip"};var II={true:"true",false:"false"};var SI={invoice:"invoice",estimate:"estimate",credit_note:"credit_note",advance_invoice:"advance_invoice",delivery_note:"delivery_note"};var PI={regular_annual:"regular_annual"};var AI={invoice:"invoice",credit_note:"credit_note"};var hI={FURS:"FURS",PISRS:"PISRS"};var EI={info:"info",warning:"warning"};var OI={vod_xml:"vod_xml",vasco_xml:"vasco_xml",minimax_xml:"minimax_xml"};var NI={sp:"sp",doo:"doo",dno:"dno",club:"club"};var CI={stored:"stored",registry:"registry",unknown:"unknown"};var GI={normirani:"normirani",dejanski:"dejanski"};var FI={sp:"sp",doo:"doo",dno:"dno",club:"club"};var MI={resident:"resident",non_resident:"non_resident"};var HI={standard:"standard",special_vat_identified:"special_vat_identified",non_vat_subject:"non_vat_subject"};var QI={records:"records",single_entry:"single_entry",double_entry:"double_entry"};var WI={full_time_self_employed:"full_time_self_employed",other:"other"};var ZI={info:"info",warning:"warning"};var VI={sent:"sent",queued:"queued",skipped:"skipped"};var XI={sent:"sent",queued:"queued",skipped:"skipped"};var eb={"en-US":"en-US","de-DE":"de-DE","it-IT":"it-IT","fr-FR":"fr-FR","es-ES":"es-ES","sl-SI":"sl-SI","pt-PT":"pt-PT","nl-NL":"nl-NL","pl-PL":"pl-PL","hr-HR":"hr-HR","sv-SE":"sv-SE","fi-FI":"fi-FI","et-EE":"et-EE","bg-BG":"bg-BG","cs-CZ":"cs-CZ","sk-SK":"sk-SK","nb-NO":"nb-NO","is-IS":"is-IS"};var nb={"en-US":"en-US","de-DE":"de-DE","it-IT":"it-IT","fr-FR":"fr-FR","es-ES":"es-ES","sl-SI":"sl-SI","pt-PT":"pt-PT","nl-NL":"nl-NL","pl-PL":"pl-PL","hr-HR":"hr-HR","sv-SE":"sv-SE","fi-FI":"fi-FI","et-EE":"et-EE","bg-BG":"bg-BG","cs-CZ":"cs-CZ","sk-SK":"sk-SK","nb-NO":"nb-NO","is-IS":"is-IS"};var ab={pending:"pending",processing:"processing",completed:"completed",failed:"failed"};var rb={pending:"pending",processing:"processing",completed:"completed",failed:"failed"};var cb={count:"count",sum:"sum",avg:"avg",min:"min",max:"max"};var pb={asc:"asc",desc:"desc"};var ub={invoices:"invoices",estimates:"estimates",credit_notes:"credit_notes",advance_invoices:"advance_invoices",payments:"payments",customers:"customers",items:"items",invoice_taxes:"invoice_taxes"};var fb={payment_intentsucceeded:"payment_intent.succeeded",invoicepaid:"invoice.paid"};var yb={payment_intentsucceeded:"payment_intent.succeeded",invoicepaid:"invoice.paid"};var Ib={domestic:"domestic",intra_eu_b2b:"intra_eu_b2b",intra_eu_b2c:"intra_eu_b2c","3w_b2b":"3w_b2b","3w_b2c":"3w_b2c"};var Sb={white_label_subscriptionsubscribed:"white_label_subscription.subscribed",white_label_subscriptionupgraded:"white_label_subscription.upgraded",white_label_subscriptiondowngrade_scheduled:"white_label_subscription.downgrade_scheduled",white_label_subscriptiondowngraded:"white_label_subscription.downgraded",white_label_subscriptioncancellation_scheduled:"white_label_subscription.cancellation_scheduled",white_label_subscriptioncancelled:"white_label_subscription.cancelled",white_label_subscriptionrenewed:"white_label_subscription.renewed",white_label_subscriptionexpired:"white_label_subscription.expired",white_label_subscriptionpayment_failed:"white_label_subscription.payment_failed"};var Pb={viewer:"viewer",editor:"editor",admin:"admin"};var Ab={estimate:"estimate",proforma_invoice:"proforma_invoice"};var hb={valid:"valid",expiring_soon:"expiring_soon",expired:"expired",missing:"missing"};var Eb={N:"N",P:"P"};var Ob={N:"N",P:"P"};var Nb={valid:"valid",expiring_soon:"expiring_soon",expired:"expired",missing:"missing"};var Cb={B:"B",C:"C"};var Gb={B:"B",C:"C"};var Fb={domestic:"domestic",intra_eu_b2b:"intra_eu_b2b",intra_eu_b2c:"intra_eu_b2c","3w_b2b":"3w_b2b","3w_b2c":"3w_b2c",export:"export"};var Mb={invoice:"invoice",credit_note:"credit_note",advance_invoice:"advance_invoice"};var Hb={product:"product",service:"service",advance:"advance"};var Qb={unpaid:"unpaid",paid:"paid",partially_paid:"partially_paid",refunded:"refunded"};var Wb={created:"created",paid:"paid",fulfilled:"fulfilled"};var Zb={cash:"cash",bank_transfer:"bank_transfer",card:"card",check:"check",paypal:"paypal",coupon:"coupon",other:"other",credit_note:"credit_note",advance:"advance"};var Vb={daily:"daily",weekly:"weekly",monthly:"monthly",yearly:"yearly"};var Xb={vod_xml:"vod_xml",vasco_xml:"vasco_xml",minimax_xml:"minimax_xml"};var eS={sp:"sp",doo:"doo",dno:"dno",club:"club"};var nS={stored:"stored",registry:"registry",unknown:"unknown"};var aS={normirani:"normirani",dejanski:"dejanski"};var rS={sp:"sp",doo:"doo",dno:"dno",club:"club"};var cS={resident:"resident",non_resident:"non_resident"};var pS={standard:"standard",special_vat_identified:"special_vat_identified",non_vat_subject:"non_vat_subject"};var uS={records:"records",single_entry:"single_entry",double_entry:"double_entry"};var fS={full_time_self_employed:"full_time_self_employed",other:"other"};var yS={vod_xml:"vod_xml",vasco_xml:"vasco_xml",minimax_xml:"minimax_xml"};var IS={sp:"sp",doo:"doo",dno:"dno",club:"club"};var SS={normirani:"normirani",dejanski:"dejanski"};var PS={resident:"resident",non_resident:"non_resident"};var AS={standard:"standard",special_vat_identified:"special_vat_identified",non_vat_subject:"non_vat_subject"};var hS={records:"records",single_entry:"single_entry",double_entry:"double_entry"};var ES={full_time_self_employed:"full_time_self_employed",other:"other"};var OS={invoicecreated:"invoice.created",invoiceupdated:"invoice.updated",invoicesent:"invoice.sent",invoicepaid:"invoice.paid",invoiceoverdue:"invoice.overdue",invoicecancelled:"invoice.cancelled",invoicedeleted:"invoice.deleted",invoicerestored:"invoice.restored",invoicevoided:"invoice.voided",invoicefinalized:"invoice.finalized",customercreated:"customer.created",customerupdated:"customer.updated",customerdeleted:"customer.deleted",customerrestored:"customer.restored",customerpermanently_deleted:"customer.permanently_deleted",paymentreceived:"payment.received",paymentfailed:"payment.failed",paymentdeleted:"payment.deleted",paymentrestored:"payment.restored",paymentpermanently_deleted:"payment.permanently_deleted",estimatecreated:"estimate.created",estimatesent:"estimate.sent",estimateaccepted:"estimate.accepted",estimaterejected:"estimate.rejected",estimatedeleted:"estimate.deleted",estimaterestored:"estimate.restored",credit_notecreated:"credit_note.created",credit_noteissued:"credit_note.issued",credit_notevoided:"credit_note.voided",credit_notedeleted:"credit_note.deleted",credit_noterestored:"credit_note.restored",advance_invoicecreated:"advance_invoice.created",advance_invoicepaid:"advance_invoice.paid",advance_invoiceapplied:"advance_invoice.applied",advance_invoicevoided:"advance_invoice.voided",advance_invoicedeleted:"advance_invoice.deleted",advance_invoicerestored:"advance_invoice.restored",itemcreated:"item.created",itemupdated:"item.updated",itemdeleted:"item.deleted",itemrestored:"item.restored",itempermanently_deleted:"item.permanently_deleted",taxcreated:"tax.created",taxupdated:"tax.updated",taxdeleted:"tax.deleted",taxrestored:"tax.restored",taxpermanently_deleted:"tax.permanently_deleted",recurring_invoicecreated:"recurring_invoice.created",recurring_invoiceupdated:"recurring_invoice.updated",recurring_invoicedeleted:"recurring_invoice.deleted",recurring_invoicerestored:"recurring_invoice.restored",recurring_invoicepermanently_deleted:"recurring_invoice.permanently_deleted",recurring_invoicepaused:"recurring_invoice.paused",recurring_invoiceresumed:"recurring_invoice.resumed",recurring_invoiceinvoice_generated:"recurring_invoice.invoice_generated",recurring_invoicegeneration_failed:"recurring_invoice.generation_failed",recurring_invoicecompleted:"recurring_invoice.completed",stripe_appconnected:"stripe_app.connected",stripe_appdisconnected:"stripe_app.disconnected",stripe_appsettings_updated:"stripe_app.settings_updated",ordercreated:"order.created",orderupdated:"order.updated",orderdeleted:"order.deleted",orderrestored:"order.restored",orderpermanently_deleted:"order.permanently_deleted",orderprocessed:"order.processed",ordercancelled:"order.cancelled",orderfailed:"order.failed",order_integrationcreated:"order_integration.created",order_integrationupdated:"order_integration.updated",order_integrationdeleted:"order_integration.deleted",delivery_notecreated:"delivery_note.created",delivery_notesent:"delivery_note.sent",delivery_notecancelled:"delivery_note.cancelled",delivery_notevoided:"delivery_note.voided",delivery_notedeleted:"delivery_note.deleted",delivery_noterestored:"delivery_note.restored",e_invoicingsubmissioncreated:"e_invoicing.submission.created",e_invoicingsubmissiondelivered:"e_invoicing.submission.delivered",e_invoicingsubmissionfailed:"e_invoicing.submission.failed",e_invoicingsupplieronboarded:"e_invoicing.supplier.onboarded",e_invoicingsupplierrejected:"e_invoicing.supplier.rejected"};var NS={logo:"logo",signature:"signature",attachment:"attachment"};var CS={pending:"pending",success:"success",failed:"failed"};var GS={invoicecreated:"invoice.created",invoiceupdated:"invoice.updated",invoicesent:"invoice.sent",invoicepaid:"invoice.paid",invoiceoverdue:"invoice.overdue",invoicecancelled:"invoice.cancelled",invoicedeleted:"invoice.deleted",invoicerestored:"invoice.restored",invoicevoided:"invoice.voided",invoicefinalized:"invoice.finalized",customercreated:"customer.created",customerupdated:"customer.updated",customerdeleted:"customer.deleted",customerrestored:"customer.restored",customerpermanently_deleted:"customer.permanently_deleted",paymentreceived:"payment.received",paymentfailed:"payment.failed",paymentdeleted:"payment.deleted",paymentrestored:"payment.restored",paymentpermanently_deleted:"payment.permanently_deleted",estimatecreated:"estimate.created",estimatesent:"estimate.sent",estimateaccepted:"estimate.accepted",estimaterejected:"estimate.rejected",estimatedeleted:"estimate.deleted",estimaterestored:"estimate.restored",credit_notecreated:"credit_note.created",credit_noteissued:"credit_note.issued",credit_notevoided:"credit_note.voided",credit_notedeleted:"credit_note.deleted",credit_noterestored:"credit_note.restored",advance_invoicecreated:"advance_invoice.created",advance_invoicepaid:"advance_invoice.paid",advance_invoiceapplied:"advance_invoice.applied",advance_invoicevoided:"advance_invoice.voided",advance_invoicedeleted:"advance_invoice.deleted",advance_invoicerestored:"advance_invoice.restored",itemcreated:"item.created",itemupdated:"item.updated",itemdeleted:"item.deleted",itemrestored:"item.restored",itempermanently_deleted:"item.permanently_deleted",taxcreated:"tax.created",taxupdated:"tax.updated",taxdeleted:"tax.deleted",taxrestored:"tax.restored",taxpermanently_deleted:"tax.permanently_deleted",recurring_invoicecreated:"recurring_invoice.created",recurring_invoiceupdated:"recurring_invoice.updated",recurring_invoicedeleted:"recurring_invoice.deleted",recurring_invoicerestored:"recurring_invoice.restored",recurring_invoicepermanently_deleted:"recurring_invoice.permanently_deleted",recurring_invoicepaused:"recurring_invoice.paused",recurring_invoiceresumed:"recurring_invoice.resumed",recurring_invoiceinvoice_generated:"recurring_invoice.invoice_generated",recurring_invoicegeneration_failed:"recurring_invoice.generation_failed",recurring_invoicecompleted:"recurring_invoice.completed",stripe_appconnected:"stripe_app.connected",stripe_appdisconnected:"stripe_app.disconnected",stripe_appsettings_updated:"stripe_app.settings_updated",ordercreated:"order.created",orderupdated:"order.updated",orderdeleted:"order.deleted",orderrestored:"order.restored",orderpermanently_deleted:"order.permanently_deleted",orderprocessed:"order.processed",ordercancelled:"order.cancelled",orderfailed:"order.failed",order_integrationcreated:"order_integration.created",order_integrationupdated:"order_integration.updated",order_integrationdeleted:"order_integration.deleted",delivery_notecreated:"delivery_note.created",delivery_notesent:"delivery_note.sent",delivery_notecancelled:"delivery_note.cancelled",delivery_notevoided:"delivery_note.voided",delivery_notedeleted:"delivery_note.deleted",delivery_noterestored:"delivery_note.restored",e_invoicingsubmissioncreated:"e_invoicing.submission.created",e_invoicingsubmissiondelivered:"e_invoicing.submission.delivered",e_invoicingsubmissionfailed:"e_invoicing.submission.failed",e_invoicingsupplieronboarded:"e_invoicing.supplier.onboarded",e_invoicingsupplierrejected:"e_invoicing.supplier.rejected"};var FS={invoicecreated:"invoice.created",invoiceupdated:"invoice.updated",invoicesent:"invoice.sent",invoicepaid:"invoice.paid",invoiceoverdue:"invoice.overdue",invoicecancelled:"invoice.cancelled",invoicedeleted:"invoice.deleted",invoicerestored:"invoice.restored",invoicevoided:"invoice.voided",invoicefinalized:"invoice.finalized",customercreated:"customer.created",customerupdated:"customer.updated",customerdeleted:"customer.deleted",customerrestored:"customer.restored",customerpermanently_deleted:"customer.permanently_deleted",paymentreceived:"payment.received",paymentfailed:"payment.failed",paymentdeleted:"payment.deleted",paymentrestored:"payment.restored",paymentpermanently_deleted:"payment.permanently_deleted",estimatecreated:"estimate.created",estimatesent:"estimate.sent",estimateaccepted:"estimate.accepted",estimaterejected:"estimate.rejected",estimatedeleted:"estimate.deleted",estimaterestored:"estimate.restored",credit_notecreated:"credit_note.created",credit_noteissued:"credit_note.issued",credit_notevoided:"credit_note.voided",credit_notedeleted:"credit_note.deleted",credit_noterestored:"credit_note.restored",advance_invoicecreated:"advance_invoice.created",advance_invoicepaid:"advance_invoice.paid",advance_invoiceapplied:"advance_invoice.applied",advance_invoicevoided:"advance_invoice.voided",advance_invoicedeleted:"advance_invoice.deleted",advance_invoicerestored:"advance_invoice.restored",itemcreated:"item.created",itemupdated:"item.updated",itemdeleted:"item.deleted",itemrestored:"item.restored",itempermanently_deleted:"item.permanently_deleted",taxcreated:"tax.created",taxupdated:"tax.updated",taxdeleted:"tax.deleted",taxrestored:"tax.restored",taxpermanently_deleted:"tax.permanently_deleted",recurring_invoicecreated:"recurring_invoice.created",recurring_invoiceupdated:"recurring_invoice.updated",recurring_invoicedeleted:"recurring_invoice.deleted",recurring_invoicerestored:"recurring_invoice.restored",recurring_invoicepermanently_deleted:"recurring_invoice.permanently_deleted",recurring_invoicepaused:"recurring_invoice.paused",recurring_invoiceresumed:"recurring_invoice.resumed",recurring_invoiceinvoice_generated:"recurring_invoice.invoice_generated",recurring_invoicegeneration_failed:"recurring_invoice.generation_failed",recurring_invoicecompleted:"recurring_invoice.completed",stripe_appconnected:"stripe_app.connected",stripe_appdisconnected:"stripe_app.disconnected",stripe_appsettings_updated:"stripe_app.settings_updated",ordercreated:"order.created",orderupdated:"order.updated",orderdeleted:"order.deleted",orderrestored:"order.restored",orderpermanently_deleted:"order.permanently_deleted",orderprocessed:"order.processed",ordercancelled:"order.cancelled",orderfailed:"order.failed",order_integrationcreated:"order_integration.created",order_integrationupdated:"order_integration.updated",order_integrationdeleted:"order_integration.deleted",delivery_notecreated:"delivery_note.created",delivery_notesent:"delivery_note.sent",delivery_notecancelled:"delivery_note.cancelled",delivery_notevoided:"delivery_note.voided",delivery_notedeleted:"delivery_note.deleted",delivery_noterestored:"delivery_note.restored",e_invoicingsubmissioncreated:"e_invoicing.submission.created",e_invoicingsubmissiondelivered:"e_invoicing.submission.delivered",e_invoicingsubmissionfailed:"e_invoicing.submission.failed",e_invoicingsupplieronboarded:"e_invoicing.supplier.onboarded",e_invoicingsupplierrejected:"e_invoicing.supplier.rejected"};function v(e){return{["x-spaceinvoices-client"]:e}}var f=null,Ra=null,Oa="l.account";function y(e){f=e}function ka(){if(!f)throw Error("SDK not initialized. Call new SpaceInvoices() first.");return f}function Na(e){if(typeof document>"u")return null;let t=document.cookie.match(new RegExp(`(?:^|; )${e}=([^;]+)`));if(!t)return null;return decodeURIComponent(t[1])}function wa(e){if(!e)return{};if(e instanceof Headers){let t={};return e.forEach((n,r)=>{t[r]=n}),t}if(Array.isArray(e)){let t={};for(let[n,r]of e)t[n]=r;return t}return e}async function o(e,t){let n=ka(),r=await Promise.resolve(n.getAccessToken()),i=`${n.baseUrl}${e}`,l={...wa(t.headers)};if(n.clientName)Object.assign(l,v(n.clientName));if(r)l.Authorization=`Bearer ${r}`;let d=l["x-account-id"]||l["X-Account-Id"]||Ra||Na(Oa);if(d&&!l["x-account-id"]&&!l["X-Account-Id"])l["x-account-id"]=d;let p=await fetch(i,{...t,headers:l});if(p.status===401&&n.onUnauthorized)n.onUnauthorized(p);let m,Da=p.headers.get("content-length"),u=p.headers.get("content-type");if(Da==="0"||p.status===204)m=void 0;else if(u?.includes("application/pdf")||u?.includes("application/vnd.openxmlformats-officedocument.wordprocessingml.document")||u?.includes("application/octet-stream")||u?.includes("application/zip")||u?.includes("application/x-zip-compressed")||u?.includes("image/"))m=await p.blob();else if(u?.includes("application/xml")||u?.includes("text/xml"))m=await p.text();else if(u?.includes("text/html"))m=await p.text();else try{m=await p.json()}catch{m=void 0}return{data:m,status:p.status,headers:p.headers}}var Ca=()=>{return"/account-webhooks"},g=async(e,t)=>{return o(Ca(),{...t,method:"POST",headers:{"Content-Type":"application/json",...t?.headers},body:JSON.stringify(e)})},Ba=(e)=>{let t=new URLSearchParams;Object.entries(e||{}).forEach(([r,i])=>{if(i!==void 0)t.append(r,i===null?"null":i.toString())});let n=t.toString();return n.length>0?`/account-webhooks?${n}`:"/account-webhooks"},I=async(e,t)=>{return o(Ba(e),{...t,method:"GET"})},Ga=(e)=>{return`/account-webhooks/${e}`},b=async(e,t)=>{return o(Ga(e),{...t,method:"GET"})},qa=(e)=>{return`/account-webhooks/${e}`},S=async(e,t,n)=>{return o(qa(e),{...n,method:"PATCH",headers:{"Content-Type":"application/json",...n?.headers},body:JSON.stringify(t)})},Fa=(e)=>{return`/account-webhooks/${e}`},x=async(e,t)=>{return o(Fa(e),{...t,method:"DELETE"})},Ja=(e)=>{return`/account-webhooks/${e}/test`},P=async(e,t)=>{return o(Ja(e),{...t,method:"POST"})};var Ma=(e)=>{return`/account-webhooks/${e}/rotate-secret`},_=async(e,t)=>{return o(Ma(e),{...t,method:"POST"})};async function La(e,t){return e(...t)}function A(e){if(!e?.entity_id&&!e?.account_id&&!e?.signal)return;let t={};if(e.entity_id||e.account_id)t.headers={...e.entity_id?{"x-entity-id":e.entity_id}:{},...e.account_id?{"x-account-id":e.account_id}:{}};if(e.signal)t.signal=e.signal;return t}function a(e){return async(...t)=>{let n=t[t.length-1],r=n&&typeof n==="object"&&(("entity_id"in n)||("account_id"in n)||("signal"in n)||Object.keys(n).length===0),i,s;if(r)i=t.slice(0,-1),s=A(n);else i=[...t];i.push(s);let l=await La(e,i);if(l.status>=200&&l.status<300)return l.data;let d=Error(`API error: ${l.status}`);throw d.status=l.status,d.data=l.data,d}}function c(e){return async(t)=>{let{entity_id:n,account_id:r,signal:i,...s}=t||{},l=A({entity_id:n,account_id:r,signal:i}),d=await e(s,l);if(d.status===200)return d.data;let p=Error(`API error: ${d.status}`);throw p.status=d.status,p.data=d.data,p}}var Ha={create:a(g),list:c(I),get:a(b),update:a(S),delete:a(x),testAccountWebhook:a(P),rotateAccountWebhookSecret:a(_)};var Ya=(e)=>{let t=new URLSearchParams;Object.entries(e||{}).forEach(([r,i])=>{if(i!==void 0)t.append(r,i===null?"null":i.toString())});let n=t.toString();return n.length>0?`/activities?${n}`:"/activities"},T=async(e,t)=>{return o(Ya(e),{...t,method:"GET"})};var Qa={list:c(T)};var Ka=(e)=>{return`/advance-invoices/shareable/${e}`},h=async(e,t)=>{return o(Ka(e),{...t,method:"GET"})},Wa=(e,t)=>{let n=new URLSearchParams;Object.entries(t||{}).forEach(([i,s])=>{if(s!==void 0)n.append(i,s===null?"null":s.toString())});let r=n.toString();return r.length>0?`/advance-invoices/shareable/${e}/html?${r}`:`/advance-invoices/shareable/${e}/html`},D=async(e,t,n)=>{return o(Wa(e,t),{...n,method:"GET"})},Ua=(e,t)=>{let n=new URLSearchParams;Object.entries(t||{}).forEach(([i,s])=>{if(s!==void 0)n.append(i,s===null?"null":s.toString())});let r=n.toString();return r.length>0?`/advance-invoices/shareable/${e}/pdf?${r}`:`/advance-invoices/shareable/${e}/pdf`},E=async(e,t,n)=>{return o(Ua(e,t),{...n,method:"GET"})},Za=()=>{return"/advance-invoices"},R=async(e,t)=>{return o(Za(),{...t,method:"POST",headers:{"Content-Type":"application/json",...t?.headers},body:JSON.stringify(e)})},ja=(e)=>{let t=new URLSearchParams;Object.entries(e||{}).forEach(([r,i])=>{if(i!==void 0)t.append(r,i===null?"null":i.toString())});let n=t.toString();return n.length>0?`/advance-invoices?${n}`:"/advance-invoices"},O=async(e,t)=>{return o(ja(e),{...t,method:"GET"})},Va=()=>{return"/advance-invoices/custom"},k=async(e,t)=>{return o(Va(),{...t,method:"POST",headers:{"Content-Type":"application/json",...t?.headers},body:JSON.stringify(e)})},$a=(e,t)=>{let n=new URLSearchParams;Object.entries(t||{}).forEach(([i,s])=>{if(s!==void 0)n.append(i,s===null?"null":s.toString())});let r=n.toString();return r.length>0?`/advance-invoices/${e}?${r}`:`/advance-invoices/${e}`},N=async(e,t,n)=>{return o($a(e,t),{...n,method:"GET"})},Xa=(e)=>{return`/advance-invoices/${e}`},w=async(e,t,n)=>{return o(Xa(e),{...n,method:"PATCH",headers:{"Content-Type":"application/json",...n?.headers},body:JSON.stringify(t)})},za=(e)=>{return`/advance-invoices/${e}/versions`},C=async(e,t)=>{return o(za(e),{...t,method:"GET"})},ei=(e,t)=>{return`/advance-invoices/${e}/versions/${t}`},B=async(e,t,n)=>{return o(ei(e,t),{...n,method:"GET"})},ti=(e)=>{let t=new URLSearchParams;Object.entries(e||{}).forEach(([r,i])=>{if(i!==void 0)t.append(r,i===null?"null":i.toString())});let n=t.toString();return n.length>0?`/advance-invoices/render?${n}`:"/advance-invoices/render"},G=async(e,t,n)=>{return o(ti(t),{...n,method:"POST",headers:{"Content-Type":"application/json",...n?.headers},body:JSON.stringify(e)})},ni=(e)=>{return`/advance-invoices/${e}/void`},q=async(e,t,n)=>{return o(ni(e),{...n,method:"POST",headers:{"Content-Type":"application/json",...n?.headers},body:JSON.stringify(t)})};var oi={getShareableAdvanceInvoice:a(h),getShareableAdvanceInvoiceHtml:a(D),getShareableAdvanceInvoicePdf:a(E),create:a(R),list:c(O),createCustom:a(k),get:a(N),update:a(w),getVersions:a(C),getVersion:a(B),renderAdvanceInvoicePreview:a(G),void:a(q)};var ai=(e)=>{let t=new URLSearchParams;Object.entries(e||{}).forEach(([r,i])=>{if(i!==void 0)t.append(r,i===null?"null":i.toString())});let n=t.toString();return n.length>0?`/company-registry/search?${n}`:"/company-registry/search"},F=async(e,t)=>{return o(ai(e),{...t,method:"GET"})},ii=()=>{return"/company-registry/countries"},J=async(e)=>{return o(ii(),{...e,method:"GET"})};var ri={searchCompanyRegistry:a(F),list:a(J)};var si=(e)=>{return`/credit-notes/shareable/${e}`},M=async(e,t)=>{return o(si(e),{...t,method:"GET"})},ci=(e,t)=>{let n=new URLSearchParams;Object.entries(t||{}).forEach(([i,s])=>{if(s!==void 0)n.append(i,s===null?"null":s.toString())});let r=n.toString();return r.length>0?`/credit-notes/shareable/${e}/html?${r}`:`/credit-notes/shareable/${e}/html`},L=async(e,t,n)=>{return o(ci(e,t),{...n,method:"GET"})},li=(e,t)=>{let n=new URLSearchParams;Object.entries(t||{}).forEach(([i,s])=>{if(s!==void 0)n.append(i,s===null?"null":s.toString())});let r=n.toString();return r.length>0?`/credit-notes/shareable/${e}/pdf?${r}`:`/credit-notes/shareable/${e}/pdf`},H=async(e,t,n)=>{return o(li(e,t),{...n,method:"GET"})},pi=(e)=>{return`/credit-notes/shareable/${e}/eslog`},Y=async(e,t)=>{return o(pi(e),{...t,method:"GET"})},di=()=>{return"/credit-notes"},Q=async(e,t)=>{return o(di(),{...t,method:"POST",headers:{"Content-Type":"application/json",...t?.headers},body:JSON.stringify(e)})},ui=(e)=>{let t=new URLSearchParams;Object.entries(e||{}).forEach(([r,i])=>{if(i!==void 0)t.append(r,i===null?"null":i.toString())});let n=t.toString();return n.length>0?`/credit-notes?${n}`:"/credit-notes"},K=async(e,t)=>{return o(ui(e),{...t,method:"GET"})},mi=()=>{return"/credit-notes/custom"},W=async(e,t)=>{return o(mi(),{...t,method:"POST",headers:{"Content-Type":"application/json",...t?.headers},body:JSON.stringify(e)})},fi=(e,t)=>{let n=new URLSearchParams;Object.entries(t||{}).forEach(([i,s])=>{if(s!==void 0)n.append(i,s===null?"null":s.toString())});let r=n.toString();return r.length>0?`/credit-notes/${e}?${r}`:`/credit-notes/${e}`},U=async(e,t,n)=>{return o(fi(e,t),{...n,method:"GET"})},vi=(e)=>{return`/credit-notes/${e}`},Z=async(e,t,n)=>{return o(vi(e),{...n,method:"PATCH",headers:{"Content-Type":"application/json",...n?.headers},body:JSON.stringify(t)})},yi=(e)=>{return`/credit-notes/${e}/versions`},j=async(e,t)=>{return o(yi(e),{...t,method:"GET"})},gi=(e,t)=>{return`/credit-notes/${e}/versions/${t}`},V=async(e,t,n)=>{return o(gi(e,t),{...n,method:"GET"})},Ii=(e)=>{let t=new URLSearchParams;Object.entries(e||{}).forEach(([r,i])=>{if(i!==void 0)t.append(r,i===null?"null":i.toString())});let n=t.toString();return n.length>0?`/credit-notes/render?${n}`:"/credit-notes/render"},$=async(e,t,n)=>{return o(Ii(t),{...n,method:"POST",headers:{"Content-Type":"application/json",...n?.headers},body:JSON.stringify(e)})},bi=(e)=>{return`/credit-notes/${e}/void`},X=async(e,t,n)=>{return o(bi(e),{...n,method:"POST",headers:{"Content-Type":"application/json",...n?.headers},body:JSON.stringify(t)})};var Si={getShareableCreditNote:a(M),getShareableCreditNoteHtml:a(L),getShareableCreditNotePdf:a(H),getShareableCreditNoteEslog:a(Y),create:a(Q),list:c(K),createCustom:a(W),get:a(U),update:a(Z),getVersions:a(j),getVersion:a(V),renderCreditNotePreview:a($),void:a(X)};var xi=()=>{return"/customers"},z=async(e,t)=>{return o(xi(),{...t,method:"POST",headers:{"Content-Type":"application/json",...t?.headers},body:JSON.stringify(e)})},Pi=(e)=>{let t=new URLSearchParams;Object.entries(e||{}).forEach(([r,i])=>{if(i!==void 0)t.append(r,i===null?"null":i.toString())});let n=t.toString();return n.length>0?`/customers?${n}`:"/customers"},ee=async(e,t)=>{return o(Pi(e),{...t,method:"GET"})},_i=(e)=>{return`/customers/${e}`},te=async(e,t)=>{return o(_i(e),{...t,method:"GET"})},Ai=(e)=>{return`/customers/${e}`},ne=async(e,t,n)=>{return o(Ai(e),{...n,method:"PATCH",headers:{"Content-Type":"application/json",...n?.headers},body:JSON.stringify(t)})},Ti=(e)=>{return`/customers/${e}`},oe=async(e,t)=>{return o(Ti(e),{...t,method:"DELETE"})},hi=(e)=>{return`/customers/${e}/restore`},ae=async(e,t)=>{return o(hi(e),{...t,method:"POST"})},Di=(e)=>{return`/customers/${e}/permanent`},ie=async(e,t)=>{return o(Di(e),{...t,method:"DELETE"})};var Ei={create:a(z),list:c(ee),get:a(te),update:a(ne),delete:a(oe),restoreCustomer:a(ae),permanentDeleteCustomer:a(ie)};var Ri=(e)=>{return`/delivery-notes/shareable/${e}`},re=async(e,t)=>{return o(Ri(e),{...t,method:"GET"})},Oi=(e,t)=>{let n=new URLSearchParams;Object.entries(t||{}).forEach(([i,s])=>{if(s!==void 0)n.append(i,s===null?"null":s.toString())});let r=n.toString();return r.length>0?`/delivery-notes/shareable/${e}/html?${r}`:`/delivery-notes/shareable/${e}/html`},se=async(e,t,n)=>{return o(Oi(e,t),{...n,method:"GET"})},ki=(e,t)=>{let n=new URLSearchParams;Object.entries(t||{}).forEach(([i,s])=>{if(s!==void 0)n.append(i,s===null?"null":s.toString())});let r=n.toString();return r.length>0?`/delivery-notes/shareable/${e}/pdf?${r}`:`/delivery-notes/shareable/${e}/pdf`},ce=async(e,t,n)=>{return o(ki(e,t),{...n,method:"GET"})},Ni=()=>{return"/delivery-notes"},le=async(e,t)=>{return o(Ni(),{...t,method:"POST",headers:{"Content-Type":"application/json",...t?.headers},body:JSON.stringify(e)})},wi=(e)=>{let t=new URLSearchParams;Object.entries(e||{}).forEach(([r,i])=>{if(i!==void 0)t.append(r,i===null?"null":i.toString())});let n=t.toString();return n.length>0?`/delivery-notes?${n}`:"/delivery-notes"},pe=async(e,t)=>{return o(wi(e),{...t,method:"GET"})},Ci=()=>{return"/delivery-notes/custom"},de=async(e,t)=>{return o(Ci(),{...t,method:"POST",headers:{"Content-Type":"application/json",...t?.headers},body:JSON.stringify(e)})},Bi=(e,t)=>{let n=new URLSearchParams;Object.entries(t||{}).forEach(([i,s])=>{if(s!==void 0)n.append(i,s===null?"null":s.toString())});let r=n.toString();return r.length>0?`/delivery-notes/${e}?${r}`:`/delivery-notes/${e}`},ue=async(e,t,n)=>{return o(Bi(e,t),{...n,method:"GET"})},Gi=(e)=>{return`/delivery-notes/${e}`},me=async(e,t,n)=>{return o(Gi(e),{...n,method:"PATCH",headers:{"Content-Type":"application/json",...n?.headers},body:JSON.stringify(t)})},qi=(e)=>{return`/delivery-notes/${e}/versions`},fe=async(e,t)=>{return o(qi(e),{...t,method:"GET"})},Fi=(e,t)=>{return`/delivery-notes/${e}/versions/${t}`},ve=async(e,t,n)=>{return o(Fi(e,t),{...n,method:"GET"})},Ji=(e)=>{let t=new URLSearchParams;Object.entries(e||{}).forEach(([r,i])=>{if(i!==void 0)t.append(r,i===null?"null":i.toString())});let n=t.toString();return n.length>0?`/delivery-notes/render?${n}`:"/delivery-notes/render"},ye=async(e,t,n)=>{return o(Ji(t),{...n,method:"POST",headers:{"Content-Type":"application/json",...n?.headers},body:JSON.stringify(e)})},Mi=(e)=>{return`/delivery-notes/${e}/void`},ge=async(e,t,n)=>{return o(Mi(e),{...n,method:"POST",headers:{"Content-Type":"application/json",...n?.headers},body:JSON.stringify(t)})};var Li={getShareableDeliveryNote:a(re),getShareableDeliveryNoteHtml:a(se),getShareableDeliveryNotePdf:a(ce),create:a(le),list:c(pe),createCustom:a(de),get:a(ue),update:a(me),getVersions:a(fe),getVersion:a(ve),renderDeliveryNotePreview:a(ye),void:a(ge)};var Hi=(e)=>{let t=new URLSearchParams;Object.entries(e||{}).forEach(([r,i])=>{if(i!==void 0)t.append(r,i===null?"null":i.toString())});let n=t.toString();return n.length>0?`/documents/next-number?${n}`:"/documents/next-number"},Ie=async(e,t)=>{return o(Hi(e),{...t,method:"GET"})},Yi=(e)=>{let t=new URLSearchParams;Object.entries(e||{}).forEach(([r,i])=>{if(i!==void 0)t.append(r,i===null?"null":i.toString())});let n=t.toString();return n.length>0?`/documents/calculate?${n}`:"/documents/calculate"},be=async(e,t,n)=>{return o(Yi(t),{...n,method:"POST",headers:{"Content-Type":"application/json",...n?.headers},body:JSON.stringify(e)})},Qi=(e,t)=>{let n=new URLSearchParams;Object.entries(t||{}).forEach(([i,s])=>{if(s!==void 0)n.append(i,s===null?"null":s.toString())});let r=n.toString();return r.length>0?`/documents/${e}/finalize?${r}`:`/documents/${e}/finalize`},Se=async(e,t,n,r)=>{return o(Qi(e,n),{...r,method:"POST",headers:{"Content-Type":"application/json",...r?.headers},body:JSON.stringify(t)})},Ki=(e,t)=>{let n=new URLSearchParams;Object.entries(t||{}).forEach(([i,s])=>{if(s!==void 0)n.append(i,s===null?"null":s.toString())});let r=n.toString();return r.length>0?`/documents/${e}/fiscalize?${r}`:`/documents/${e}/fiscalize`},xe=async(e,t,n)=>{return o(Ki(e,t),{...n,method:"POST"})},Wi=(e,t)=>{let n=new URLSearchParams;Object.entries(t||{}).forEach(([i,s])=>{if(s!==void 0)n.append(i,s===null?"null":s.toString())});let r=n.toString();return r.length>0?`/documents/${e}?${r}`:`/documents/${e}`},Pe=async(e,t,n)=>{return o(Wi(e,t),{...n,method:"DELETE"})},Ui=(e,t)=>{let n=new URLSearchParams;Object.entries(t||{}).forEach(([i,s])=>{if(s!==void 0)n.append(i,s===null?"null":s.toString())});let r=n.toString();return r.length>0?`/documents/${e}/restore?${r}`:`/documents/${e}/restore`},_e=async(e,t,n)=>{return o(Ui(e,t),{...n,method:"POST"})},Zi=(e,t)=>{let n=new URLSearchParams;Object.entries(t||{}).forEach(([i,s])=>{if(s!==void 0)n.append(i,s===null?"null":s.toString())});let r=n.toString();return r.length>0?`/documents/${e}/permanent?${r}`:`/documents/${e}/permanent`},Ae=async(e,t,n)=>{return o(Zi(e,t),{...n,method:"DELETE"})},ji=(e)=>{return`/documents/${e}/send`},Te=async(e,t,n)=>{return o(ji(e),{...n,method:"POST",headers:{"Content-Type":"application/json",...n?.headers},body:JSON.stringify(t)})},Vi=(e)=>{return`/documents/${e}/share`},he=async(e,t)=>{return o(Vi(e),{...t,method:"POST"})},$i=(e)=>{return`/documents/${e}/share`},De=async(e,t)=>{return o($i(e),{...t,method:"GET"})},Xi=(e)=>{return`/documents/${e}/share`},Ee=async(e,t)=>{return o(Xi(e),{...t,method:"DELETE"})};var zi={getNextNumber:a(Ie),calculateDocumentPreview:a(be),finalizeDocument:a(Se),fiscalizeDocument:a(xe),delete:a(Pe),restoreDocument:a(_e),permanentDeleteDocument:a(Ae),sendDocument:a(Te),shareDocument:a(he),getShareableId:a(De),unshareDocument:a(Ee)};var er=()=>{return"/e-invoicing/settings"},Re=async(e)=>{return o(er(),{...e,method:"GET"})},tr=()=>{return"/e-invoicing/settings"},Oe=async(e,t)=>{return o(tr(),{...t,method:"PATCH",headers:{"Content-Type":"application/json",...t?.headers},body:JSON.stringify(e)})},nr=()=>{return"/e-invoicing/supplier"},ke=async(e,t)=>{return o(nr(),{...t,method:"POST",headers:{"Content-Type":"application/json",...t?.headers},body:JSON.stringify(e)})},or=()=>{return"/e-invoicing/supplier"},Ne=async(e)=>{return o(or(),{...e,method:"GET"})};var ar=()=>{return"/e-invoicing/customer-search"},we=async(e,t)=>{return o(ar(),{...t,method:"POST",headers:{"Content-Type":"application/json",...t?.headers},body:JSON.stringify(e)})},ir=()=>{return"/e-invoicing/send/:documentType/:documentId"},Ce=async(e,t)=>{return o(ir(),{...t,method:"POST",headers:{"Content-Type":"application/json",...t?.headers},body:JSON.stringify(e)})},rr=(e)=>{let t=new URLSearchParams;Object.entries(e||{}).forEach(([r,i])=>{if(i!==void 0)t.append(r,i===null?"null":i.toString())});let n=t.toString();return n.length>0?`/e-invoicing/submissions?${n}`:"/e-invoicing/submissions"},Be=async(e,t)=>{return o(rr(e),{...t,method:"GET"})},sr=()=>{return"/e-invoicing/submissions/:id"},Ge=async(e)=>{return o(sr(),{...e,method:"GET"})},cr=()=>{return"/e-invoicing/submissions/:id/retry"},qe=async(e)=>{return o(cr(),{...e,method:"POST"})},lr=()=>{return"/e-invoicing/webhooks/flowin"},Fe=async(e,t)=>{return o(lr(),{...t,method:"POST",headers:{"Content-Type":"application/json",...t?.headers},body:JSON.stringify(e)})};var pr={list:a(Re),update:a(Oe),registerEInvoicingSupplier:a(ke),getEInvoicingSupplier:a(Ne),searchEInvoicingCustomer:a(we),sendEInvoice:a(Ce),listEInvoicingSubmissions:a(Be),getEInvoicingSubmission:a(Ge),retryEInvoicingSubmission:a(qe),handleFlowinWebhook:a(Fe)};var dr=()=>{return"/email/send"},Je=async(e,t)=>{return o(dr(),{...t,method:"POST",headers:{"Content-Type":"application/json",...t?.headers},body:JSON.stringify(e)})};var ur={sendEmail:a(Je)};var mr=()=>{return"/entities"},Me=async(e,t)=>{return o(mr(),{...t,method:"POST",headers:{"Content-Type":"application/json",...t?.headers},body:JSON.stringify(e)})},fr=(e)=>{let t=new URLSearchParams;Object.entries(e||{}).forEach(([r,i])=>{if(i!==void 0)t.append(r,i===null?"null":i.toString())});let n=t.toString();return n.length>0?`/entities?${n}`:"/entities"},Le=async(e,t)=>{return o(fr(e),{...t,method:"GET"})},vr=(e)=>{return`/entities/${e}`},He=async(e,t)=>{return o(vr(e),{...t,method:"GET"})},yr=(e)=>{return`/entities/${e}`},Ye=async(e,t,n)=>{return o(yr(e),{...n,method:"PUT",headers:{"Content-Type":"application/json",...n?.headers},body:JSON.stringify(t)})},gr=(e)=>{return`/entities/${e}/enable`},Qe=async(e,t)=>{return o(gr(e),{...t,method:"POST"})},Ir=(e)=>{return`/entities/${e}/disable`},Ke=async(e,t)=>{return o(Ir(e),{...t,method:"POST"})};var br={create:a(Me),list:c(Le),get:a(He),update:a(Ye),enableEntity:a(Qe),disableEntity:a(Ke)};var Sr=()=>{return"/entities/api-keys"},We=async(e)=>{return o(Sr(),{...e,method:"GET"})},xr=()=>{return"/entities/api-keys"},Ue=async(e,t)=>{return o(xr(),{...t,method:"POST",headers:{"Content-Type":"application/json",...t?.headers},body:JSON.stringify(e)})},Pr=(e)=>{return`/entities/api-keys/${e}`},Ze=async(e,t)=>{return o(Pr(e),{...t,method:"DELETE"})};var _r={listEntityApiKeys:a(We),create:a(Ue),delete:a(Ze)};var Ar=()=>{return"/entities/invitations"},je=async(e)=>{return o(Ar(),{...e,method:"GET"})},Tr=(e)=>{return`/entities/invitations/${e}`},Ve=async(e,t)=>{return o(Tr(e),{...t,method:"GET"})},hr=(e)=>{return`/entities/invitations/${e}`},$e=async(e,t)=>{return o(hr(e),{...t,method:"DELETE"})},Dr=(e)=>{return`/entities/invitations/${e}/resend`},Xe=async(e,t)=>{return o(Dr(e),{...t,method:"POST"})},Er=(e)=>{let t=new URLSearchParams;Object.entries(e||{}).forEach(([r,i])=>{if(i!==void 0)t.append(r,i===null?"null":i.toString())});let n=t.toString();return n.length>0?`/invitations/accept?${n}`:"/invitations/accept"},ze=async(e,t,n)=>{return o(Er(t),{...n,method:"POST",headers:{"Content-Type":"application/json",...n?.headers},body:JSON.stringify(e)})};var Rr={listEntityInvitations:a(je),getEntityInvitation:a(Ve),cancelEntityInvitation:a($e),resendEntityInvitation:a(Xe),acceptEntityInvitation:a(ze)};var Or=()=>{return"/stats/query"},et=async(e,t)=>{return o(Or(),{...t,method:"POST",headers:{"Content-Type":"application/json",...t?.headers},body:JSON.stringify(e)})};var kr={queryEntityStats:a(et)};var Nr=()=>{return"/entities/users"},tt=async(e)=>{return o(Nr(),{...e,method:"GET"})},wr=()=>{return"/entities/users"},nt=async(e,t)=>{return o(wr(),{...t,method:"POST",headers:{"Content-Type":"application/json",...t?.headers},body:JSON.stringify(e)})},Cr=(e)=>{return`/entities/users/${e}`},ot=async(e,t,n)=>{return o(Cr(e),{...n,method:"PATCH",headers:{"Content-Type":"application/json",...n?.headers},body:JSON.stringify(t)})},Br=(e)=>{return`/entities/users/${e}`},at=async(e,t)=>{return o(Br(e),{...t,method:"DELETE"})},Gr=(e)=>{return`/entities/users/${e}/token`},it=async(e,t)=>{return o(Gr(e),{...t,method:"POST"})};var qr={list:a(tt),addEntityUser:a(nt),update:a(ot),removeEntityUser:a(at),generateEntityUserToken:a(it)};var Fr=(e)=>{return`/estimates/shareable/${e}`},rt=async(e,t)=>{return o(Fr(e),{...t,method:"GET"})},Jr=(e,t)=>{let n=new URLSearchParams;Object.entries(t||{}).forEach(([i,s])=>{if(s!==void 0)n.append(i,s===null?"null":s.toString())});let r=n.toString();return r.length>0?`/estimates/shareable/${e}/html?${r}`:`/estimates/shareable/${e}/html`},st=async(e,t,n)=>{return o(Jr(e,t),{...n,method:"GET"})},Mr=(e,t)=>{let n=new URLSearchParams;Object.entries(t||{}).forEach(([i,s])=>{if(s!==void 0)n.append(i,s===null?"null":s.toString())});let r=n.toString();return r.length>0?`/estimates/shareable/${e}/pdf?${r}`:`/estimates/shareable/${e}/pdf`},ct=async(e,t,n)=>{return o(Mr(e,t),{...n,method:"GET"})},Lr=()=>{return"/estimates"},lt=async(e,t)=>{return o(Lr(),{...t,method:"POST",headers:{"Content-Type":"application/json",...t?.headers},body:JSON.stringify(e)})},Hr=(e)=>{let t=new URLSearchParams;Object.entries(e||{}).forEach(([r,i])=>{if(i!==void 0)t.append(r,i===null?"null":i.toString())});let n=t.toString();return n.length>0?`/estimates?${n}`:"/estimates"},pt=async(e,t)=>{return o(Hr(e),{...t,method:"GET"})},Yr=()=>{return"/estimates/custom"},dt=async(e,t)=>{return o(Yr(),{...t,method:"POST",headers:{"Content-Type":"application/json",...t?.headers},body:JSON.stringify(e)})},Qr=(e,t)=>{let n=new URLSearchParams;Object.entries(t||{}).forEach(([i,s])=>{if(s!==void 0)n.append(i,s===null?"null":s.toString())});let r=n.toString();return r.length>0?`/estimates/${e}?${r}`:`/estimates/${e}`},ut=async(e,t,n)=>{return o(Qr(e,t),{...n,method:"GET"})},Kr=(e)=>{return`/estimates/${e}`},mt=async(e,t,n)=>{return o(Kr(e),{...n,method:"PATCH",headers:{"Content-Type":"application/json",...n?.headers},body:JSON.stringify(t)})},Wr=(e)=>{return`/estimates/${e}/versions`},ft=async(e,t)=>{return o(Wr(e),{...t,method:"GET"})},Ur=(e,t)=>{return`/estimates/${e}/versions/${t}`},vt=async(e,t,n)=>{return o(Ur(e,t),{...n,method:"GET"})},Zr=(e)=>{let t=new URLSearchParams;Object.entries(e||{}).forEach(([r,i])=>{if(i!==void 0)t.append(r,i===null?"null":i.toString())});let n=t.toString();return n.length>0?`/estimates/render?${n}`:"/estimates/render"},yt=async(e,t,n)=>{return o(Zr(t),{...n,method:"POST",headers:{"Content-Type":"application/json",...n?.headers},body:JSON.stringify(e)})};var jr={getShareableEstimate:a(rt),getShareableEstimateHtml:a(st),getShareableEstimatePdf:a(ct),create:a(lt),list:c(pt),createCustom:a(dt),get:a(ut),update:a(mt),getVersions:a(ft),getVersion:a(vt),renderEstimatePreview:a(yt)};var Vr=(e)=>{let t=new URLSearchParams;Object.entries(e||{}).forEach(([r,i])=>{if(i!==void 0)t.append(r,i===null?"null":i.toString())});let n=t.toString();return n.length>0?`/documents/export?${n}`:"/documents/export"},gt=async(e,t)=>{return o(Vr(e),{...t,method:"GET"})},$r=(e)=>{let t=new URLSearchParams;Object.entries(e||{}).forEach(([r,i])=>{if(i!==void 0)t.append(r,i===null?"null":i.toString())});let n=t.toString();return n.length>0?`/documents/export/sales-per-item?${n}`:"/documents/export/sales-per-item"},It=async(e,t)=>{return o($r(e),{...t,method:"GET"})},Xr=()=>{return"/documents/export/pdf"},bt=async(e,t)=>{return o(Xr(),{...t,method:"POST",headers:{"Content-Type":"application/json",...t?.headers},body:JSON.stringify(e)})},zr=(e)=>{return`/documents/export/pdf/${e}`},St=async(e,t)=>{return o(zr(e),{...t,method:"GET"})},es=(e)=>{return`/documents/export/pdf/${e}/download`},xt=async(e,t)=>{return o(es(e),{...t,method:"GET"})},ts=()=>{return"/documents/export/eslog"},Pt=async(e,t)=>{return o(ts(),{...t,method:"POST",headers:{"Content-Type":"application/json",...t?.headers},body:JSON.stringify(e)})};var ns=(e)=>{return`/documents/export/eslog/${e}/download`},_t=async(e,t)=>{return o(ns(e),{...t,method:"GET"})};var os={exportDocuments:a(gt),exportSalesPerItem:a(It),startPdfExport:a(bt),list:c(St),downloadPdfExport:a(xt),startEslogExport:a(Pt),downloadEslogExport:a(_t)};var as=()=>{return"/files"},At=async(e,t)=>{let n=new FormData;if(e.file!==void 0)n.append("file",e.file);if(n.append("category",e.category),e.account_payable_id!==void 0)n.append("account_payable_id",e.account_payable_id);if(e.incoming_purchase_document_id!==void 0)n.append("incoming_purchase_document_id",e.incoming_purchase_document_id);return o(as(),{...t,method:"POST",body:n})},is=(e)=>{let t=new URLSearchParams;Object.entries(e||{}).forEach(([r,i])=>{if(i!==void 0)t.append(r,i===null?"null":i.toString())});let n=t.toString();return n.length>0?`/files?${n}`:"/files"},Tt=async(e,t)=>{return o(is(e),{...t,method:"GET"})},rs=(e)=>{return`/files/${e}`},ht=async(e,t)=>{return o(rs(e),{...t,method:"GET"})},ss=(e)=>{return`/files/${e}`},Dt=async(e,t)=>{return o(ss(e),{...t,method:"DELETE"})};var cs={uploadFile:a(At),list:c(Tt),get:a(ht),delete:a(Dt)};var ls=()=>{return"/fiscalization/fina/settings/certificate"},Et=async(e,t)=>{let n=new FormData;if(e.file!==void 0)n.append("file",e.file);if(e.passphrase!==void 0)n.append("passphrase",e.passphrase);return o(ls(),{...t,method:"POST",body:n})},ps=()=>{return"/fiscalization/fina/settings/certificate"},Rt=async(e)=>{return o(ps(),{...e,method:"GET"})},ds=()=>{return"/fiscalization/fina/settings/certificate"},Ot=async(e)=>{return o(ds(),{...e,method:"DELETE"})};var us={uploadFinaCertificate:a(Et),getFinaCertificate:a(Rt),delete:a(Ot)};var ms=(e)=>{return`/fiscalization/fina/premises/${e}/devices`},kt=async(e,t)=>{return o(ms(e),{...t,method:"GET"})},fs=(e)=>{return`/fiscalization/fina/premises/${e}/devices`},Nt=async(e,t,n)=>{return o(fs(e),{...n,method:"POST",headers:{"Content-Type":"application/json",...n?.headers},body:JSON.stringify(t)})},vs=(e)=>{return`/fiscalization/fina/devices/${e}`},wt=async(e,t)=>{return o(vs(e),{...t,method:"GET"})},ys=(e)=>{return`/fiscalization/fina/devices/${e}`},Ct=async(e,t)=>{return o(ys(e),{...t,method:"DELETE"})};var gs={listFinaDevices:a(kt),registerFinaDevice:a(Nt),getFinaDevice:a(wt),delete:a(Ct)};var Is=()=>{return"/fiscalization/fina/premises"},Bt=async(e)=>{return o(Is(),{...e,method:"GET"})},bs=()=>{return"/fiscalization/fina/premises"},Gt=async(e,t)=>{return o(bs(),{...t,method:"POST",headers:{"Content-Type":"application/json",...t?.headers},body:JSON.stringify(e)})},Ss=(e)=>{return`/fiscalization/fina/premises/${e}`},qt=async(e,t)=>{return o(Ss(e),{...t,method:"GET"})},xs=(e)=>{return`/fiscalization/fina/premises/${e}`},Ft=async(e,t)=>{return o(xs(e),{...t,method:"DELETE"})};var Ps={listFinaPremises:a(Bt),create:a(Gt),getFinaPremise:a(qt),delete:a(Ft)};var _s=()=>{return"/fiscalization/fina/settings"},Jt=async(e)=>{return o(_s(),{...e,method:"GET"})},As=()=>{return"/fiscalization/fina/settings"},Mt=async(e,t)=>{return o(As(),{...t,method:"PUT",headers:{"Content-Type":"application/json",...t?.headers},body:JSON.stringify(e)})};var Ts={list:a(Jt),update:a(Mt)};var hs=()=>{return"/fiscalization/furs/settings/certificate"},Lt=async(e,t)=>{let n=new FormData;if(e.file!==void 0)n.append("file",e.file);if(e.passphrase!==void 0)n.append("passphrase",e.passphrase);return o(hs(),{...t,method:"POST",body:n})},Ds=()=>{return"/fiscalization/furs/settings/certificate"},Ht=async(e)=>{return o(Ds(),{...e,method:"GET"})},Es=()=>{return"/fiscalization/furs/settings/certificate"},Yt=async(e)=>{return o(Es(),{...e,method:"DELETE"})};var Rs={uploadFursCertificate:a(Lt),getFursCertificate:a(Ht),delete:a(Yt)};var Os=(e)=>{return`/fiscalization/furs/premises/${e}/devices`},Qt=async(e,t)=>{return o(Os(e),{...t,method:"GET"})},ks=(e)=>{return`/fiscalization/furs/premises/${e}/devices`},Kt=async(e,t,n)=>{return o(ks(e),{...n,method:"POST",headers:{"Content-Type":"application/json",...n?.headers},body:JSON.stringify(t)})},Ns=(e)=>{return`/fiscalization/furs/devices/${e}`},Wt=async(e,t)=>{return o(Ns(e),{...t,method:"GET"})};var ws={listFursElectronicDevices:a(Qt),registerFursElectronicDevice:a(Kt),getFursElectronicDevice:a(Wt)};var Cs=()=>{return"/fiscalization/furs/internal-act/report.pdf"},Ut=async(e)=>{return o(Cs(),{...e,method:"GET"})},Bs=()=>{return"/fiscalization/furs/internal-act/report.docx"},Zt=async(e)=>{return o(Bs(),{...e,method:"GET"})};var Gs={generateFursInternalActPdf:a(Ut),generateFursInternalActDocx:a(Zt)};var qs=()=>{return"/fiscalization/furs/premises"},jt=async(e)=>{return o(qs(),{...e,method:"GET"})},Fs=(e)=>{return`/fiscalization/furs/premises/${e}`},Vt=async(e,t)=>{return o(Fs(e),{...t,method:"GET"})},Js=()=>{return"/fiscalization/furs/premises/real-estate"},$t=async(e,t)=>{return o(Js(),{...t,method:"POST",headers:{"Content-Type":"application/json",...t?.headers},body:JSON.stringify(e)})},Ms=()=>{return"/fiscalization/furs/premises/movable"},Xt=async(e,t)=>{return o(Ms(),{...t,method:"POST",headers:{"Content-Type":"application/json",...t?.headers},body:JSON.stringify(e)})},Ls=(e)=>{return`/fiscalization/furs/premises/${e}/close`},zt=async(e,t)=>{return o(Ls(e),{...t,method:"POST"})};var Hs={listFursBusinessPremises:a(jt),getFursBusinessPremise:a(Vt),registerFursRealEstatePremise:a($t),registerFursMovablePremise:a(Xt),closeFursBusinessPremise:a(zt)};var Ys=()=>{return"/fiscalization/furs/settings"},en=async(e)=>{return o(Ys(),{...e,method:"GET"})},Qs=()=>{return"/fiscalization/furs/settings"},tn=async(e,t)=>{return o(Qs(),{...t,method:"PUT",headers:{"Content-Type":"application/json",...t?.headers},body:JSON.stringify(e)})};var Ks={list:a(en),update:a(tn)};var Ws=()=>{return"/health/live"},nn=async(e)=>{return o(Ws(),{...e,method:"GET"})},Us=()=>{return"/health/ready"},on=async(e)=>{return o(Us(),{...e,method:"GET"})},Zs=()=>{return"/health"},an=async(e)=>{return o(Zs(),{...e,method:"GET"})};var js={livenessCheck:a(nn),readinessCheck:a(on),healthCheck:a(an)};var Vs=()=>{return"/incoming-purchase-documents"},rn=async(e,t)=>{return o(Vs(),{...t,method:"POST",headers:{"Content-Type":"application/json",...t?.headers},body:JSON.stringify(e)})},$s=(e)=>{let t=new URLSearchParams;Object.entries(e||{}).forEach(([r,i])=>{if(i!==void 0)t.append(r,i===null?"null":i.toString())});let n=t.toString();return n.length>0?`/incoming-purchase-documents?${n}`:"/incoming-purchase-documents"},sn=async(e,t)=>{return o($s(e),{...t,method:"GET"})},Xs=()=>{return"/incoming-purchase-documents/custom"},cn=async(e,t)=>{return o(Xs(),{...t,method:"POST",headers:{"Content-Type":"application/json",...t?.headers},body:JSON.stringify(e)})},zs=(e)=>{return`/incoming-purchase-documents/${e}`},ln=async(e,t)=>{return o(zs(e),{...t,method:"GET"})},ec=(e)=>{return`/incoming-purchase-documents/${e}`},pn=async(e,t,n)=>{return o(ec(e),{...n,method:"PATCH",headers:{"Content-Type":"application/json",...n?.headers},body:JSON.stringify(t)})},tc=(e)=>{return`/incoming-purchase-documents/${e}/attachments`},dn=async(e,t,n)=>{let r=new FormData;if(t.file!==void 0)r.append("file",t.file);return o(tc(e),{...n,method:"POST",body:r})};var nc=(e,t)=>{return`/incoming-purchase-documents/${e}/attachments/${t}`},un=async(e,t,n)=>{return o(nc(e,t),{...n,method:"DELETE"})};var oc={create:a(rn),list:c(sn),createCustom:a(cn),get:a(ln),update:a(pn),uploadIncomingPurchaseDocumentAttachment:a(dn),delete:a(un)};var mn="https://eu.spaceinvoices.com";function ac(e){let t=typeof e==="string"?{accessToken:e}:e,n=typeof t.accessToken==="function"?t.accessToken:()=>t.accessToken;y({baseUrl:t.basePath??mn,getAccessToken:n,clientName:t.clientName??"js-sdk",onUnauthorized:t.onUnauthorized})}var ic=(e)=>{return`/invoices/shareable/${e}`},fn=async(e,t)=>{return o(ic(e),{...t,method:"GET"})},rc=(e,t)=>{let n=new URLSearchParams;Object.entries(t||{}).forEach(([i,s])=>{if(s!==void 0)n.append(i,s===null?"null":s.toString())});let r=n.toString();return r.length>0?`/invoices/shareable/${e}/html?${r}`:`/invoices/shareable/${e}/html`},vn=async(e,t,n)=>{return o(rc(e,t),{...n,method:"GET"})},sc=(e,t)=>{let n=new URLSearchParams;Object.entries(t||{}).forEach(([i,s])=>{if(s!==void 0)n.append(i,s===null?"null":s.toString())});let r=n.toString();return r.length>0?`/invoices/shareable/${e}/pdf?${r}`:`/invoices/shareable/${e}/pdf`},yn=async(e,t,n)=>{return o(sc(e,t),{...n,method:"GET"})},cc=(e)=>{return`/invoices/shareable/${e}/eslog`},gn=async(e,t)=>{return o(cc(e),{...t,method:"GET"})},lc=()=>{return"/invoices"},In=async(e,t)=>{return o(lc(),{...t,method:"POST",headers:{"Content-Type":"application/json",...t?.headers},body:JSON.stringify(e)})},pc=(e)=>{let t=new URLSearchParams;Object.entries(e||{}).forEach(([r,i])=>{if(i!==void 0)t.append(r,i===null?"null":i.toString())});let n=t.toString();return n.length>0?`/invoices?${n}`:"/invoices"},bn=async(e,t)=>{return o(pc(e),{...t,method:"GET"})},dc=()=>{return"/invoices/custom"},Sn=async(e,t)=>{return o(dc(),{...t,method:"POST",headers:{"Content-Type":"application/json",...t?.headers},body:JSON.stringify(e)})},uc=(e,t)=>{let n=new URLSearchParams;Object.entries(t||{}).forEach(([i,s])=>{if(s!==void 0)n.append(i,s===null?"null":s.toString())});let r=n.toString();return r.length>0?`/invoices/${e}?${r}`:`/invoices/${e}`},xn=async(e,t,n)=>{return o(uc(e,t),{...n,method:"GET"})},mc=(e)=>{return`/invoices/${e}`},Pn=async(e,t,n)=>{return o(mc(e),{...n,method:"PATCH",headers:{"Content-Type":"application/json",...n?.headers},body:JSON.stringify(t)})},fc=(e)=>{return`/invoices/${e}/versions`},_n=async(e,t)=>{return o(fc(e),{...t,method:"GET"})},vc=(e,t)=>{return`/invoices/${e}/versions/${t}`},An=async(e,t,n)=>{return o(vc(e,t),{...n,method:"GET"})},yc=(e)=>{let t=new URLSearchParams;Object.entries(e||{}).forEach(([r,i])=>{if(i!==void 0)t.append(r,i===null?"null":i.toString())});let n=t.toString();return n.length>0?`/invoices/render?${n}`:"/invoices/render"},Tn=async(e,t,n)=>{return o(yc(t),{...n,method:"POST",headers:{"Content-Type":"application/json",...n?.headers},body:JSON.stringify(e)})},gc=(e)=>{return`/invoices/${e}/void`},hn=async(e,t,n)=>{return o(gc(e),{...n,method:"POST",headers:{"Content-Type":"application/json",...n?.headers},body:JSON.stringify(t)})},Ic=(e)=>{return`/invoices/${e}/fiscalize`},Dn=async(e,t)=>{return o(Ic(e),{...t,method:"POST"})},bc=(e,t)=>{let n=new URLSearchParams;Object.entries(t||{}).forEach(([i,s])=>{if(s!==void 0)n.append(i,s===null?"null":s.toString())});let r=n.toString();return r.length>0?`/documents/${e}/html?${r}`:`/documents/${e}/html`},En=async(e,t,n)=>{return o(bc(e,t),{...n,method:"GET"})},Sc=(e,t)=>{let n=new URLSearchParams;Object.entries(t||{}).forEach(([i,s])=>{if(s!==void 0)n.append(i,s===null?"null":s.toString())});let r=n.toString();return r.length>0?`/documents/${e}/pdf?${r}`:`/documents/${e}/pdf`},Rn=async(e,t,n)=>{return o(Sc(e,t),{...n,method:"GET"})};function On(e,t){let n=URL.createObjectURL(e),r=document.createElement("a");r.href=n,r.download=t,document.body.appendChild(r),r.click(),document.body.removeChild(r),URL.revokeObjectURL(n)}var kn=a(Rn),xc={getShareableInvoice:a(fn),getShareableInvoiceHtml:a(vn),getShareableInvoicePdf:a(yn),getShareableInvoiceEslog:a(gn),create:a(In),list:c(bn),createCustom:a(Sn),get:a(xn),update:a(Pn),getVersions:a(_n),getVersion:a(An),renderInvoicePreview:a(Tn),void:a(hn),fiscalizeInvoice:a(Dn),renderHtml:a(En),renderPdf:kn,async downloadPdf(e,t,n,r){let i=await kn(e,n,r);On(i,t)}};var Pc=()=>{return"/items"},Nn=async(e,t)=>{return o(Pc(),{...t,method:"POST",headers:{"Content-Type":"application/json",...t?.headers},body:JSON.stringify(e)})},_c=(e)=>{let t=new URLSearchParams;Object.entries(e||{}).forEach(([r,i])=>{if(i!==void 0)t.append(r,i===null?"null":i.toString())});let n=t.toString();return n.length>0?`/items?${n}`:"/items"},wn=async(e,t)=>{return o(_c(e),{...t,method:"GET"})},Ac=(e)=>{return`/items/${e}`},Cn=async(e,t,n)=>{return o(Ac(e),{...n,method:"PATCH",headers:{"Content-Type":"application/json",...n?.headers},body:JSON.stringify(t)})},Tc=(e)=>{return`/items/${e}`},Bn=async(e,t)=>{return o(Tc(e),{...t,method:"DELETE"})},hc=(e)=>{return`/items/${e}/restore`},Gn=async(e,t)=>{return o(hc(e),{...t,method:"POST"})},Dc=(e)=>{return`/items/${e}/permanent`},qn=async(e,t)=>{return o(Dc(e),{...t,method:"DELETE"})};var Ec={create:a(Nn),list:c(wn),update:a(Cn),delete:a(Bn),restoreItem:a(Gn),permanentDeleteItem:a(qn)};var Rc=()=>{return"/legacy-migration/auth"},Fn=async(e,t)=>{return o(Rc(),{...t,method:"POST",headers:{"Content-Type":"application/json",...t?.headers},body:JSON.stringify(e)})},Oc=()=>{return"/legacy-migration/jobs"},Jn=async(e,t)=>{return o(Oc(),{...t,method:"POST",headers:{"Content-Type":"application/json",...t?.headers},body:JSON.stringify(e)})},kc=()=>{return"/legacy-migration/jobs"},Mn=async(e)=>{return o(kc(),{...e,method:"GET"})},Nc=(e)=>{return`/legacy-migration/jobs/${e}`},Ln=async(e,t)=>{return o(Nc(e),{...t,method:"GET"})};var wc={legacyMigrationAuth:a(Fn),create:a(Jn),listMigrationJobs:a(Mn),getMigrationJob:a(Ln)};var Cc=()=>{return"/locale/detect"},Hn=async(e)=>{return o(Cc(),{...e,method:"GET"})};var Bc={detectLocale:a(Hn)};var Gc=()=>{return"/order-integrations/shopify/authorize"},Yn=async(e,t)=>{return o(Gc(),{...t,method:"POST",headers:{"Content-Type":"application/json",...t?.headers},body:JSON.stringify(e)})},qc=(e)=>{return`/order-integrations/${e}/sync-shopify`},Qn=async(e,t,n)=>{return o(qc(e),{...n,method:"POST",headers:{"Content-Type":"application/json",...n?.headers},body:JSON.stringify(t)})},Fc=()=>{return"/order-integrations"},Kn=async(e,t)=>{return o(Fc(),{...t,method:"POST",headers:{"Content-Type":"application/json",...t?.headers},body:JSON.stringify(e)})},Jc=(e)=>{let t=new URLSearchParams;Object.entries(e||{}).forEach(([r,i])=>{if(i!==void 0)t.append(r,i===null?"null":i.toString())});let n=t.toString();return n.length>0?`/order-integrations?${n}`:"/order-integrations"},Wn=async(e,t)=>{return o(Jc(e),{...t,method:"GET"})},Mc=(e)=>{return`/order-integrations/${e}`},Un=async(e,t)=>{return o(Mc(e),{...t,method:"GET"})},Lc=(e)=>{return`/order-integrations/${e}`},Zn=async(e,t,n)=>{return o(Lc(e),{...n,method:"PATCH",headers:{"Content-Type":"application/json",...n?.headers},body:JSON.stringify(t)})},Hc=(e)=>{return`/order-integrations/${e}`},jn=async(e,t)=>{return o(Hc(e),{...t,method:"DELETE"})};var Yc={authorizeShopify:a(Yn),syncShopifyOrders:a(Qn),create:a(Kn),list:c(Wn),get:a(Un),update:a(Zn),delete:a(jn)};var Qc=()=>{return"/orders"},Vn=async(e,t)=>{return o(Qc(),{...t,method:"POST",headers:{"Content-Type":"application/json",...t?.headers},body:JSON.stringify(e)})},Kc=(e)=>{let t=new URLSearchParams;Object.entries(e||{}).forEach(([r,i])=>{if(i!==void 0)t.append(r,i===null?"null":i.toString())});let n=t.toString();return n.length>0?`/orders?${n}`:"/orders"},$n=async(e,t)=>{return o(Kc(e),{...t,method:"GET"})},Wc=(e)=>{return`/orders/${e}`},Xn=async(e,t)=>{return o(Wc(e),{...t,method:"GET"})},Uc=(e)=>{return`/orders/${e}`},zn=async(e,t,n)=>{return o(Uc(e),{...n,method:"PATCH",headers:{"Content-Type":"application/json",...n?.headers},body:JSON.stringify(t)})},Zc=(e)=>{return`/orders/${e}`},eo=async(e,t)=>{return o(Zc(e),{...t,method:"DELETE"})},jc=(e)=>{return`/orders/${e}/process`},to=async(e,t)=>{return o(jc(e),{...t,method:"POST"})},Vc=(e)=>{return`/orders/${e}/cancel`},no=async(e,t)=>{return o(Vc(e),{...t,method:"POST"})},$c=(e)=>{return`/orders/${e}/reissue`},oo=async(e,t)=>{return o($c(e),{...t,method:"POST"})};var Xc={create:a(Vn),list:c($n),get:a(Xn),update:a(zn),delete:a(eo),processOrder:a(to),cancelOrder:a(no),reissueOrder:a(oo)};var zc=()=>{return"/payments"},ao=async(e,t)=>{return o(zc(),{...t,method:"POST",headers:{"Content-Type":"application/json",...t?.headers},body:JSON.stringify(e)})},el=(e)=>{let t=new URLSearchParams;Object.entries(e||{}).forEach(([r,i])=>{if(i!==void 0)t.append(r,i===null?"null":i.toString())});let n=t.toString();return n.length>0?`/payments?${n}`:"/payments"},io=async(e,t)=>{return o(el(e),{...t,method:"GET"})},tl=(e,t)=>{let n=new URLSearchParams;Object.entries(t||{}).forEach(([i,s])=>{if(s!==void 0)n.append(i,s===null?"null":s.toString())});let r=n.toString();return r.length>0?`/payments/${e}?${r}`:`/payments/${e}`},ro=async(e,t,n)=>{return o(tl(e,t),{...n,method:"GET"})},nl=(e)=>{return`/payments/${e}`},so=async(e,t,n)=>{return o(nl(e),{...n,method:"PATCH",headers:{"Content-Type":"application/json",...n?.headers},body:JSON.stringify(t)})},ol=(e)=>{return`/payments/${e}`},co=async(e,t)=>{return o(ol(e),{...t,method:"DELETE"})},al=(e)=>{return`/payments/${e}/restore`},lo=async(e,t)=>{return o(al(e),{...t,method:"POST"})},il=(e)=>{return`/payments/${e}/permanent`},po=async(e,t)=>{return o(il(e),{...t,method:"DELETE"})};var rl={create:a(ao),list:c(io),get:a(ro),update:a(so),delete:a(co),restorePayment:a(lo),permanentDeletePayment:a(po)};var sl=()=>{return"/fiscalization/pt/atcud-series"},uo=async(e,t)=>{return o(sl(),{...t,method:"POST",headers:{"Content-Type":"application/json",...t?.headers},body:JSON.stringify(e)})},cl=(e)=>{let t=new URLSearchParams;Object.entries(e||{}).forEach(([r,i])=>{if(i!==void 0)t.append(r,i===null?"null":i.toString())});let n=t.toString();return n.length>0?`/fiscalization/pt/atcud-series?${n}`:"/fiscalization/pt/atcud-series"},mo=async(e,t)=>{return o(cl(e),{...t,method:"GET"})},ll=(e)=>{return`/fiscalization/pt/atcud-series/${e}`},fo=async(e,t)=>{return o(ll(e),{...t,method:"GET"})},pl=(e)=>{let t=new URLSearchParams;Object.entries(e||{}).forEach(([r,i])=>{if(i!==void 0)t.append(r,i===null?"null":i.toString())});let n=t.toString();return n.length>0?`/fiscalization/pt/atcud-series/active?${n}`:"/fiscalization/pt/atcud-series/active"},vo=async(e,t)=>{return o(pl(e),{...t,method:"POST"})};var dl={create:a(uo),list:c(mo),get:a(fo),getActive:a(vo)};var ul=(e)=>{let t=new URLSearchParams;Object.entries(e||{}).forEach(([r,i])=>{if(i!==void 0)t.append(r,i===null?"null":i.toString())});let n=t.toString();return n.length>0?`/fiscalization/pt/saft/report?${n}`:"/fiscalization/pt/saft/report"},yo=async(e,t)=>{return o(ul(e),{...t,method:"GET"})};var ml={generateReport:a(yo)};var fl=()=>{return"/recurring-invoices"},go=async(e,t)=>{return o(fl(),{...t,method:"POST",headers:{"Content-Type":"application/json",...t?.headers},body:JSON.stringify(e)})},vl=(e)=>{let t=new URLSearchParams;Object.entries(e||{}).forEach(([r,i])=>{if(i!==void 0)t.append(r,i===null?"null":i.toString())});let n=t.toString();return n.length>0?`/recurring-invoices?${n}`:"/recurring-invoices"},Io=async(e,t)=>{return o(vl(e),{...t,method:"GET"})},yl=(e)=>{return`/recurring-invoices/${e}`},bo=async(e,t)=>{return o(yl(e),{...t,method:"GET"})},gl=(e)=>{return`/recurring-invoices/${e}`},So=async(e,t,n)=>{return o(gl(e),{...n,method:"PATCH",headers:{"Content-Type":"application/json",...n?.headers},body:JSON.stringify(t)})},Il=(e)=>{return`/recurring-invoices/${e}`},xo=async(e,t)=>{return o(Il(e),{...t,method:"DELETE"})},bl=(e)=>{return`/recurring-invoices/${e}/restore`},Po=async(e,t)=>{return o(bl(e),{...t,method:"POST"})},Sl=(e)=>{return`/recurring-invoices/${e}/permanent`},_o=async(e,t)=>{return o(Sl(e),{...t,method:"DELETE"})},xl=(e)=>{return`/recurring-invoices/${e}/pause`},Ao=async(e,t)=>{return o(xl(e),{...t,method:"POST"})},Pl=(e)=>{return`/recurring-invoices/${e}/resume`},To=async(e,t)=>{return o(Pl(e),{...t,method:"POST"})},_l=(e)=>{return`/recurring-invoices/${e}/trigger`},ho=async(e,t)=>{return o(_l(e),{...t,method:"POST"})};var Al={create:a(go),list:c(Io),get:a(bo),update:a(So),delete:a(xo),restoreRecurringInvoice:a(Po),permanentDeleteRecurringInvoice:a(_o),pauseRecurringInvoice:a(Ao),resumeRecurringInvoice:a(To),triggerRecurringInvoice:a(ho)};var Tl=()=>{return"/stripe-app/authorize"},Do=async(e)=>{return o(Tl(),{...e,method:"GET"})},hl=(e)=>{let t=new URLSearchParams;Object.entries(e||{}).forEach(([r,i])=>{if(i!==void 0)t.append(r,i===null?"null":i.toString())});let n=t.toString();return n.length>0?`/stripe-app/oauth/callback?${n}`:"/stripe-app/oauth/callback"},Eo=async(e,t)=>{return o(hl(e),{...t,method:"GET"})},Dl=()=>{return"/stripe-app/webhooks"},Ro=async(e)=>{return o(Dl(),{...e,method:"POST"})},El=()=>{return"/stripe-app/marketplace-authorize"},Oo=async(e,t)=>{return o(El(),{...t,method:"POST",headers:{"Content-Type":"application/json",...t?.headers},body:JSON.stringify(e)})},Rl=()=>{return"/stripe-app/connect"},ko=async(e,t)=>{return o(Rl(),{...t,method:"POST",headers:{"Content-Type":"application/json",...t?.headers},body:JSON.stringify(e)})},Ol=()=>{return"/stripe-app/connection"},No=async(e)=>{return o(Ol(),{...e,method:"GET"})},kl=()=>{return"/stripe-app/connection"},wo=async(e)=>{return o(kl(),{...e,method:"DELETE"})},Nl=()=>{return"/stripe-app/settings"},Co=async(e)=>{return o(Nl(),{...e,method:"GET"})},wl=()=>{return"/stripe-app/settings"},Bo=async(e,t)=>{return o(wl(),{...t,method:"PATCH",headers:{"Content-Type":"application/json",...t?.headers},body:JSON.stringify(e)})},Cl=()=>{return"/stripe-app/invoices"},Go=async(e,t)=>{return o(Cl(),{...t,method:"POST",headers:{"Content-Type":"application/json",...t?.headers},body:JSON.stringify(e)})},Bl=(e)=>{let t=new URLSearchParams;Object.entries(e||{}).forEach(([r,i])=>{if(i!==void 0)t.append(r,i===null?"null":i.toString())});let n=t.toString();return n.length>0?`/stripe-app/invoices?${n}`:"/stripe-app/invoices"},qo=async(e,t)=>{return o(Bl(e),{...t,method:"GET"})},Gl=(e)=>{let t=new URLSearchParams;Object.entries(e||{}).forEach(([r,i])=>{if(i!==void 0)t.append(r,i===null?"null":i.toString())});let n=t.toString();return n.length>0?`/stripe-app/invoices/lookup?${n}`:"/stripe-app/invoices/lookup"},Fo=async(e,t)=>{return o(Gl(e),{...t,method:"GET"})},ql=(e)=>{return`/stripe-app/invoices/${e}`},Jo=async(e,t)=>{return o(ql(e),{...t,method:"GET"})},Fl=()=>{return"/stripe-app/entity-connection"},Mo=async(e)=>{return o(Fl(),{...e,method:"GET"})},Jl=()=>{return"/stripe-app/entity-connection"},Lo=async(e)=>{return o(Jl(),{...e,method:"DELETE"})},Ml=()=>{return"/stripe-app/entity-settings"},Ho=async(e)=>{return o(Ml(),{...e,method:"GET"})},Ll=()=>{return"/stripe-app/entity-settings"},Yo=async(e,t)=>{return o(Ll(),{...t,method:"PATCH",headers:{"Content-Type":"application/json",...t?.headers},body:JSON.stringify(e)})};var Hl={stripeAppAuthorize:a(Do),stripeAppOAuthCallback:a(Eo),stripeAppWebhook:a(Ro),stripeAppMarketplaceAuthorize:a(Oo),stripeAppConnect:a(ko),stripeAppGetConnection:a(No),stripeAppDisconnect:a(wo),stripeAppGetSettings:a(Co),stripeAppUpdateSettings:a(Bo),stripeAppCreateInvoice:a(Go),stripeAppListInvoices:a(qo),stripeAppLookupInvoice:a(Fo),stripeAppGetInvoice:a(Jo),stripeAppEntityGetConnection:a(Mo),stripeAppEntityDisconnect:a(Lo),stripeAppEntityGetSettings:a(Ho),stripeAppEntityUpdateSettings:a(Yo)};var Yl=()=>{return"/suppliers"},Qo=async(e,t)=>{return o(Yl(),{...t,method:"POST",headers:{"Content-Type":"application/json",...t?.headers},body:JSON.stringify(e)})},Ql=(e)=>{let t=new URLSearchParams;Object.entries(e||{}).forEach(([r,i])=>{if(i!==void 0)t.append(r,i===null?"null":i.toString())});let n=t.toString();return n.length>0?`/suppliers?${n}`:"/suppliers"},Ko=async(e,t)=>{return o(Ql(e),{...t,method:"GET"})},Kl=(e)=>{return`/suppliers/${e}`},Wo=async(e,t)=>{return o(Kl(e),{...t,method:"GET"})},Wl=(e)=>{return`/suppliers/${e}`},Uo=async(e,t,n)=>{return o(Wl(e),{...n,method:"PATCH",headers:{"Content-Type":"application/json",...n?.headers},body:JSON.stringify(t)})};var Ul={create:a(Qo),list:c(Ko),get:a(Wo),update:a(Uo)};var Zl=(e)=>{let t=new URLSearchParams;Object.entries(e||{}).forEach(([r,i])=>{if(i!==void 0)t.append(r,i===null?"null":i.toString())});let n=t.toString();return n.length>0?`/tax-reports/kir?${n}`:"/tax-reports/kir"},Zo=async(e,t)=>{return o(Zl(e),{...t,method:"POST"})},jl=()=>{return"/tax-reports/si/profile"},jo=async(e)=>{return o(jl(),{...e,method:"GET"})},Vl=()=>{return"/tax-reports/si/profile"},Vo=async(e,t)=>{return o(Vl(),{...t,method:"PUT",headers:{"Content-Type":"application/json",...t?.headers},body:JSON.stringify(e)})},$l=()=>{return"/tax-reports/si/yearly/normirani/review"},$o=async(e,t)=>{return o($l(),{...t,method:"POST",headers:{"Content-Type":"application/json",...t?.headers},body:JSON.stringify(e)})},Xl=()=>{return"/tax-reports/si/yearly/normirani/export"},Xo=async(e,t)=>{return o(Xl(),{...t,method:"POST",headers:{"Content-Type":"application/json",...t?.headers},body:JSON.stringify(e)})},zl=()=>{return"/tax-reports/si/accounting/vod/export"},zo=async(e,t)=>{return o(zl(),{...t,method:"POST",headers:{"Content-Type":"application/json",...t?.headers},body:JSON.stringify(e)})};var ep={generateKirExport:a(Zo),getSloveniaTaxProfile:a(jo),updateSloveniaTaxProfile:a(Vo),reviewSloveniaYearlyNormiraniReport:a($o),exportSloveniaYearlyNormiraniReport:a(Xo),exportSloveniaVodXml:a(zo)};var tp=()=>{return"/taxes"},ea=async(e,t)=>{return o(tp(),{...t,method:"POST",headers:{"Content-Type":"application/json",...t?.headers},body:JSON.stringify(e)})},np=(e)=>{let t=new URLSearchParams;Object.entries(e||{}).forEach(([r,i])=>{if(i!==void 0)t.append(r,i===null?"null":i.toString())});let n=t.toString();return n.length>0?`/taxes?${n}`:"/taxes"},ta=async(e,t)=>{return o(np(e),{...t,method:"GET"})},op=(e)=>{return`/taxes/${e}`},na=async(e,t,n)=>{return o(op(e),{...n,method:"PATCH",headers:{"Content-Type":"application/json",...n?.headers},body:JSON.stringify(t)})},ap=(e)=>{return`/taxes/${e}`},oa=async(e,t,n)=>{return o(ap(e),{...n,method:"PUT",headers:{"Content-Type":"application/json",...n?.headers},body:JSON.stringify(t)})},ip=(e)=>{return`/taxes/${e}`},aa=async(e,t)=>{return o(ip(e),{...t,method:"DELETE"})},rp=(e)=>{return`/taxes/${e}/restore`},ia=async(e,t)=>{return o(rp(e),{...t,method:"POST"})},sp=(e)=>{return`/taxes/${e}/permanent`},ra=async(e,t)=>{return o(sp(e),{...t,method:"DELETE"})};var cp={create:a(ea),list:c(ta),update:a(na),replaceTax:a(oa),delete:a(aa),restoreTax:a(ia),permanentDeleteTax:a(ra)};var lp=()=>{return"/transaction-type/check"},sa=async(e,t)=>{return o(lp(),{...t,method:"POST",headers:{"Content-Type":"application/json",...t?.headers},body:JSON.stringify(e)})};var pp={checkTransactionType:a(sa)};var dp=()=>{return"/upload/image"},ca=async(e,t)=>{let n=new FormData;return n.append("file",e.file),o(dp(),{...t,method:"POST",body:n})};var up={uploadImage:a(ca)};var mp=()=>{return"/users/me"},la=async(e)=>{return o(mp(),{...e,method:"GET"})},fp=()=>{return"/users/me"},pa=async(e,t)=>{return o(fp(),{...t,method:"PATCH",headers:{"Content-Type":"application/json",...t?.headers},body:JSON.stringify(e)})},vp=()=>{return"/users/me/settings/furs"},da=async(e,t)=>{return o(vp(),{...t,method:"PUT",headers:{"Content-Type":"application/json",...t?.headers},body:JSON.stringify(e)})},yp=()=>{return"/users/me/settings/fina"},ua=async(e,t)=>{return o(yp(),{...t,method:"PUT",headers:{"Content-Type":"application/json",...t?.headers},body:JSON.stringify(e)})};var gp={getMe:a(la),update:a(pa),updateFursSettings:a(da),updateFinaSettings:a(ua)};var Ip=()=>{return"/vies/check"},ma=async(e,t)=>{return o(Ip(),{...t,method:"POST",headers:{"Content-Type":"application/json",...t?.headers},body:JSON.stringify(e)})};var bp={checkVies:a(ma)};var Sp=()=>{return"/webhooks"},fa=async(e,t)=>{return o(Sp(),{...t,method:"POST",headers:{"Content-Type":"application/json",...t?.headers},body:JSON.stringify(e)})},xp=(e)=>{let t=new URLSearchParams;Object.entries(e||{}).forEach(([r,i])=>{if(i!==void 0)t.append(r,i===null?"null":i.toString())});let n=t.toString();return n.length>0?`/webhooks?${n}`:"/webhooks"},va=async(e,t)=>{return o(xp(e),{...t,method:"GET"})},Pp=(e)=>{return`/webhooks/${e}`},ya=async(e,t)=>{return o(Pp(e),{...t,method:"GET"})},_p=(e)=>{return`/webhooks/${e}`},ga=async(e,t,n)=>{return o(_p(e),{...n,method:"PATCH",headers:{"Content-Type":"application/json",...n?.headers},body:JSON.stringify(t)})},Ap=(e)=>{return`/webhooks/${e}`},Ia=async(e,t)=>{return o(Ap(e),{...t,method:"DELETE"})},Tp=(e)=>{return`/webhooks/${e}/test`},ba=async(e,t)=>{return o(Tp(e),{...t,method:"POST"})};var hp=(e)=>{return`/webhooks/${e}/rotate-secret`},Sa=async(e,t)=>{return o(hp(e),{...t,method:"POST"})};var Dp={create:a(fa),list:c(va),get:a(ya),update:a(ga),delete:a(Ia),testWebhook:a(ba),rotateWebhookSecret:a(Sa)};var Ep=()=>{return"/white-label-subscriptions"},xa=async(e)=>{return o(Ep(),{...e,method:"GET"})},Rp=()=>{return"/white-label-subscriptions/plans"},Pa=async(e)=>{return o(Rp(),{...e,method:"GET"})},Op=(e)=>{return`/white-label-subscriptions/check-feature/${e}`},_a=async(e,t)=>{return o(Op(e),{...t,method:"GET"})},kp=(e)=>{return`/white-label-subscriptions/check-limit/${e}`},Aa=async(e,t)=>{return o(kp(e),{...t,method:"GET"})},Np=()=>{return"/white-label-subscriptions/billing-email"},Ta=async(e,t)=>{return o(Np(),{...t,method:"PATCH",headers:{"Content-Type":"application/json",...t?.headers},body:JSON.stringify(e)})};var wp={getCurrentWLSubscription:a(xa),list:a(Pa),checkWLFeature:a(_a),checkWLLimit:a(Aa),update:a(Ta)};var Cp=()=>{return"/white-labels/current"},ha=async(e)=>{return o(Cp(),{...e,method:"GET"})};var Bp={getCurrentWhiteLabel:a(ha)};export{CT as zod,Bp as whiteLabels,wp as whiteLabelSubscriptions,Dp as webhooks,bp as vies,gp as users,up as upload,pp as transactionType,cp as taxes,ep as taxReports,Ul as suppliers,Hl as stripeApp,qT as setAccountId,Al as recurringInvoices,ml as ptSafT,dl as ptAtcudSeries,rl as payments,Xc as orders,Yc as orderIntegrations,Bc as locale,wc as legacyMigration,Ec as items,xc as invoices,ac as initSDK,oc as incomingPurchaseDocuments,js as health,kT as getClientHeaders,GT as getAccountId,Ks as fursSettings,Hs as fursPremises,Gs as fursInternalAct,ws as fursDevices,Rs as fursCertificate,Ts as finaSettings,Ps as finaPremises,gs as finaDevices,us as finaCertificate,cs as files,os as exports,jr as estimates,qr as entityUsers,kr as entityStats,Rr as entityInvitations,_r as entityApiKeys,br as entities,ur as email,KT as eSlog,pr as eInvoicing,YT as downloadBlob,zi as documents,Li as deliveryNotes,JT as default,Ei as customers,Si as creditNotes,ri as companyRegistry,oi as advanceInvoices,Qa as activities,Ha as accountWebhooks,FS as WebhookWithSecretEventsItem,GS as WebhookResponseEventsItem,CS as WebhookDeliveryStatus,NS as UploadFileBodyCategory,OS as UpdateWebhookBodyEventsItem,ES as UpdateSloveniaTaxProfileBodyYearlyReportingNormiranecInsuranceBasis,hS as UpdateSloveniaTaxProfileBodyYearlyReportingAccountingType,AS as UpdateSloveniaTaxProfileBodyVatProfile,PS as UpdateSloveniaTaxProfileBodyTaxResidency,SS as UpdateSloveniaTaxProfileBodyIncomeTaxRegime,IS as UpdateSloveniaTaxProfileBodyBusinessForm,yS as UpdateSloveniaTaxProfileBodyAccountingExportsPreferredFormat,fS as UpdateSloveniaTaxProfile200YearlyReportingNormiranecInsuranceBasis,uS as UpdateSloveniaTaxProfile200YearlyReportingAccountingType,pS as UpdateSloveniaTaxProfile200VatProfile,cS as UpdateSloveniaTaxProfile200TaxResidency,rS as UpdateSloveniaTaxProfile200InferredBusinessForm,aS as UpdateSloveniaTaxProfile200IncomeTaxRegime,nS as UpdateSloveniaTaxProfile200BusinessFormSource,eS as UpdateSloveniaTaxProfile200BusinessForm,Xb as UpdateSloveniaTaxProfile200AccountingExportsPreferredFormat,Vb as UpdateRecurringInvoiceBodyFrequency,Zb as UpdatePaymentBodyType,Wb as UpdateOrderIntegrationBodyAutoProcessOn,Qb as UpdateOrderBodyPaymentStatus,Hb as UpdateItemBodyClassification,Mb as UpdateIncomingPurchaseDocumentBodyType,Fb as UpdateIncomingPurchaseDocumentBodyTransactionType,Gb as UpdateFursSettingsBodyNumberingStrategy,Cb as UpdateFursSettings200NumberingStrategy,Nb as UpdateFursSettings200CertificateStatus,Ob as UpdateFinaSettingsBodyNumberingSequence,Eb as UpdateFinaSettings200NumberingSequence,hb as UpdateFinaSettings200CertificateStatus,Ab as UpdateEstimateTitleType,Pb as UpdateEntityUserRoleBodyRole,Sb as UpdateAccountWebhookBodyEventsItem,Ib as TransactionTypeCheckResponseTransactionType,yb as StripeAppUpdateSettingsBodyAutoInvoiceEventsItem,fb as StripeAppEntityUpdateSettingsBodyAutoInvoiceEventsItem,ub as StatsQueryRequestTable,pb as StatsQueryRequestOrderByItemDirection,cb as StatsQueryRequestMetricsItemType,rb as StartPdfExport202Status,ab as StartEslogExport202Status,MT as SpaceInvoices,nb as SendEmailBodyLocale,eb as SendEmailBodyLanguage,XI as SendEmail200Status,VI as SendDocument200Status,ZI as ReviewSloveniaYearlyNormiraniReport200WarningsItemSeverity,WI as ReviewSloveniaYearlyNormiraniReport200ProfileYearlyReportingNormiranecInsuranceBasis,QI as ReviewSloveniaYearlyNormiraniReport200ProfileYearlyReportingAccountingType,HI as ReviewSloveniaYearlyNormiraniReport200ProfileVatProfile,MI as ReviewSloveniaYearlyNormiraniReport200ProfileTaxResidency,FI as ReviewSloveniaYearlyNormiraniReport200ProfileInferredBusinessForm,GI as ReviewSloveniaYearlyNormiraniReport200ProfileIncomeTaxRegime,CI as ReviewSloveniaYearlyNormiraniReport200ProfileBusinessFormSource,NI as ReviewSloveniaYearlyNormiraniReport200ProfileBusinessForm,OI as ReviewSloveniaYearlyNormiraniReport200ProfileAccountingExportsPreferredFormat,EI as ReviewSloveniaYearlyNormiraniReport200IssueDetailsItemSeverity,hI as ReviewSloveniaYearlyNormiraniReport200IssueDetailsItemOfficialSourcesItemIssuer,AI as ReviewSloveniaYearlyNormiraniReport200IssueDetailsItemAffectedDocumentsItemType,PI as ReviewSloveniaYearlyNormiraniReport200FilingKind,SI as RestoreDocumentType,II as RenderInvoicePreviewUpnQrEnabled,yI as RenderInvoicePreviewUpnQrDisplayMode,fI as RenderInvoicePreviewTemplate,uI as RenderInvoicePreviewPartial,pI as RenderInvoicePreviewEpcQrEnabled,cI as RenderEstimatePreviewUpnQrEnabled,rI as RenderEstimatePreviewUpnQrDisplayMode,aI as RenderEstimatePreviewTemplate,nI as RenderEstimatePreviewPartial,eI as RenderEstimatePreviewEpcQrEnabled,Xg as RenderDocumentPdfTemplate,Vg as RenderDocumentHtmlTemplate,Zg as RenderDeliveryNotePreviewUpnQrEnabled,Wg as RenderDeliveryNotePreviewUpnQrDisplayMode,Qg as RenderDeliveryNotePreviewTemplate,Hg as RenderDeliveryNotePreviewPartial,Mg as RenderDeliveryNotePreviewEpcQrEnabled,Fg as RenderCreditNotePreviewUpnQrEnabled,Gg as RenderCreditNotePreviewUpnQrDisplayMode,Cg as RenderCreditNotePreviewTemplate,Ng as RenderCreditNotePreviewPartial,Og as RenderCreditNotePreviewEpcQrEnabled,Eg as RenderAdvanceInvoicePreviewUpnQrEnabled,hg as RenderAdvanceInvoicePreviewUpnQrDisplayMode,Ag as RenderAdvanceInvoicePreviewTemplate,Pg as RenderAdvanceInvoicePreviewPartial,Sg as RenderAdvanceInvoicePreviewEpcQrEnabled,Ig as RegisterFursMovablePremiseBodyMovablePremisePremiseType,yg as RecurringInvoiceBaseStatus,fg as RecurringInvoiceBaseFrequency,ug as PtAtcudSeriesDocumentType,pg as PermanentDeleteDocumentType,cg as PdfExportByDocumentIdsLocale,rg as PdfExportByDocumentIdsLanguage,ag as PdfExportByDateRangeTypesItem,ng as PdfExportByDateRangeLocale,eg as PdfExportByDateRangeLanguage,Xy as PaymentType,Vy as PatchMeBodyLocale,Zy as PatchEntityBodySettingsPdfTemplate,Wy as PartialInvoicePreviewItemsItemType,Qy as PartialInvoicePreviewItemsItemDiscountsItemType,Hy as PartialInvoicePreviewCalculationMode,My as PartialEstimatePreviewTitleType,Fy as PartialEstimatePreviewItemsItemType,Gy as PartialEstimatePreviewItemsItemDiscountsItemType,Cy as PartialEstimatePreviewCalculationMode,Ny as PartialDeliveryNotePreviewItemsItemType,Oy as PartialDeliveryNotePreviewItemsItemDiscountsItemType,Ey as PartialDeliveryNotePreviewCalculationMode,hy as PartialCreditNotePreviewItemsItemType,Ay as PartialCreditNotePreviewItemsItemDiscountsItemType,Py as PartialCreditNotePreviewCalculationMode,Sy as PartialAdvanceInvoicePreviewItemsItemType,Iy as PartialAdvanceInvoicePreviewItemsItemDiscountsItemType,yy as PartialAdvanceInvoicePreviewCalculationMode,fy as OrderItemKind,uy as OrderIntegrationBaseSource,py as OrderIntegrationBaseAutoProcessOn,cy as OrderBaseStatus,ry as OrderBaseSource,ay as OrderBasePaymentStatus,ny as MigrationJobResponseStatus,ey as ListPtAtcudSeriesDocumentType,Xv as LineDiscountType,Vv as LegacyAuthResponseOrganizationsItemUnsupportedItemCode,Zv as ItemClassification,Wv as InvoiceTransactionType,Qv as InvoiceItemType,Hv as InvoiceItemClassification,Mv as InvoiceCalculationMode,Fv as IncomingPurchaseDocumentType,Gv as IncomingPurchaseDocumentSummaryClassification,Cv as IncomingPurchaseDocumentItemClassification,Nv as GetSloveniaTaxProfile200YearlyReportingNormiranecInsuranceBasis,Ov as GetSloveniaTaxProfile200YearlyReportingAccountingType,Ev as GetSloveniaTaxProfile200VatProfile,hv as GetSloveniaTaxProfile200TaxResidency,Av as GetSloveniaTaxProfile200InferredBusinessForm,Pv as GetSloveniaTaxProfile200IncomeTaxRegime,Sv as GetSloveniaTaxProfile200BusinessFormSource,Iv as GetSloveniaTaxProfile200BusinessForm,yv as GetSloveniaTaxProfile200AccountingExportsPreferredFormat,fv as GetShareableInvoicePdfLocale,uv as GetShareableInvoicePdfLanguage,pv as GetShareableInvoiceHtmlLocale,cv as GetShareableInvoiceHtmlLanguage,rv as GetShareableEstimatePdfLocale,av as GetShareableEstimatePdfLanguage,nv as GetShareableEstimateHtmlLocale,ev as GetShareableEstimateHtmlLanguage,Xf as GetShareableDeliveryNotePdfLocale,Vf as GetShareableDeliveryNotePdfLanguage,Zf as GetShareableDeliveryNoteHtmlLocale,Wf as GetShareableDeliveryNoteHtmlLanguage,Qf as GetShareableCreditNotePdfLocale,Hf as GetShareableCreditNotePdfLanguage,Mf as GetShareableCreditNoteHtmlLocale,Ff as GetShareableCreditNoteHtmlLanguage,Gf as GetShareableAdvanceInvoicePdfLocale,Cf as GetShareableAdvanceInvoicePdfLanguage,Nf as GetShareableAdvanceInvoiceHtmlLocale,Of as GetShareableAdvanceInvoiceHtmlLanguage,Ef as GetPdfExportStatus200Status,hf as GetNextDocumentNumberType,Af as GetIncomingPurchaseDocumentsIsDraft,Pf as GetFursSettings200NumberingStrategy,Sf as GetFursSettings200CertificateStatus,If as GetFinaSettings200NumberingSequence,yf as GetFinaSettings200CertificateStatus,ff as GetFilesCategory,uf as GetEslogExportStatus200Status,pf as GetEntitiesEnvironment,cf as GetActivities200DataItemActorType,rf as GetActivePtAtcudSeriesDocumentType,of as FursPremiseSuccessResponseEnvironment,tf as FiscalizeDocumentType,zm as FinalizeDocumentType,$m as ExportSalesPerItemLanguage,jm as ExportSalesPerItemFormat,Um as ExportDocumentsType,Km as ExportDocumentsLanguage,Ym as ExportDocumentsFormat,Lm as EstimateTransactionType,Jm as EstimateTitleType,qm as EstimateItemType,Bm as EstimateItemClassification,wm as EstimateCalculationMode,km as EslogExportByDateRangeTypesItem,Rm as EntityUserRole,Dm as EntitySettingsPdfTemplate,Tm as EntityInvitationStatus,_m as EntityInvitationRole,xm as EntityEnvironment,bm as EntityBankAccountType,gm as EntityApiKeyEnvironment,vm as DocumentVersionDocumentType,mm as DocumentRelationTargetType,dm as DocumentRelationSourceType,lm as DocumentRelationRelatedDocumentType,sm as DocumentRelationRelatedDocumentTitleType,im as DocumentCalculationTransactionType,om as DocumentCalculationCalculationMode,tm as DeliveryNoteTransactionType,zu as DeliveryNoteItemType,$u as DeliveryNoteItemClassification,ju as DeliveryNoteCalculationMode,Uu as DeleteDocumentType,UT as DEFAULT_BASE_URL,Ku as CustomDocumentItemType,Yu as CustomDocumentItemClassification,Lu as CustomCreateInvoiceCalculationMode,Ju as CustomCreateIncomingPurchaseDocumentType,qu as CustomCreateIncomingPurchaseDocumentTransactionType,Bu as CustomCreateEstimateTitleType,wu as CustomCreateEstimateCalculationMode,ku as CustomCreateDeliveryNoteCalculationMode,Ru as CustomCreateCreditNoteCalculationMode,Du as CustomCreateAdvanceInvoiceCalculationMode,Tu as CurrentSubscriptionPaymentProvider,_u as CreditNoteTransactionType,xu as CreditNoteItemType,bu as CreditNoteItemClassification,gu as CreditNoteCalculationMode,vu as CreationSource,mu as CreateWebhookBodyEventsItem,du as CreateRecurringInvoiceBodyFrequency,lu as CreatePtAtcudSeriesBodyDocumentType,su as CreatePaymentBodyType,iu as CreateOrderIntegrationBodySource,ou as CreateOrderBodySource,tu as CreateOrderBodyPaymentStatus,zd as CreateMigrationJobResponseStatus,$d as CreateMigrationJobRequestEnvironment,jd as CreateItemBodyClassification,Ud as CreateInvoiceCalculationMode,Kd as CreateIncomingPurchaseDocumentPaymentBodyType,Yd as CreateIncomingPurchaseDocumentBodyType,Ld as CreateIncomingPurchaseDocumentBodyTransactionType,Jd as CreateEstimateTitleType,qd as CreateEstimateCalculationMode,Bd as CreateEntityBodySettingsPdfTemplate,wd as CreateEntityBodyEnvironment,kd as CreateDocumentPaymentType,Rd as CreateDocumentItemType,Dd as CreateDocumentItemClassification,Td as CreateDeliveryNoteCalculationMode,_d as CreateCreditNoteCalculationMode,xd as CreateCheckoutRequestBillingInterval,bd as CreateAdvanceInvoiceCalculationMode,gd as CreateAccountWebhookBodyEventsItem,Ea as Configuration,vd as CompleteInvoicePreviewCalculationMode,md as CompleteEstimatePreviewTitleType,dd as CompleteEstimatePreviewCalculationMode,ld as CompleteDeliveryNotePreviewCalculationMode,sd as CompleteCreditNotePreviewCalculationMode,id as CompleteAdvanceInvoicePreviewCalculationMode,zp as CalculatedItemType,od as CalculateDocumentPreviewType,td as CalculateDocumentPreviewCalculationMode,OT as CLIENT_HEADER_NAME,$p as AdvanceInvoiceTransactionType,jp as AdvanceInvoiceItemType,Up as AdvanceInvoiceItemClassification,Kp as AdvanceInvoiceCalculationMode,Yp as AddEntityUserBodyRole,Lp as AccountWebhookWithSecretEventsItem,Jp as AccountWebhookResponseEventsItem,qp as AccountWebhookDeliveryStatus};
|
|
1
|
+
import*as e from'zod';var rge=Object.defineProperty;var j=(i,d)=>{for(var u in d)rge(i,u,{get:d[u],enumerable:true});};var io="x-spaceinvoices-client";function pe(i){return {[io]:i}}var ao=class{basePath;accessToken;constructor(d){this.basePath=d?.basePath,this.accessToken=d?.accessToken;}};var iCe={pending:"pending",success:"success",failed:"failed"};var dCe={white_label_subscriptionsubscribed:"white_label_subscription.subscribed",white_label_subscriptionupgraded:"white_label_subscription.upgraded",white_label_subscriptiondowngrade_scheduled:"white_label_subscription.downgrade_scheduled",white_label_subscriptiondowngraded:"white_label_subscription.downgraded",white_label_subscriptioncancellation_scheduled:"white_label_subscription.cancellation_scheduled",white_label_subscriptioncancelled:"white_label_subscription.cancelled",white_label_subscriptionrenewed:"white_label_subscription.renewed",white_label_subscriptionexpired:"white_label_subscription.expired",white_label_subscriptionpayment_failed:"white_label_subscription.payment_failed"};var lCe={white_label_subscriptionsubscribed:"white_label_subscription.subscribed",white_label_subscriptionupgraded:"white_label_subscription.upgraded",white_label_subscriptiondowngrade_scheduled:"white_label_subscription.downgrade_scheduled",white_label_subscriptiondowngraded:"white_label_subscription.downgraded",white_label_subscriptioncancellation_scheduled:"white_label_subscription.cancellation_scheduled",white_label_subscriptioncancelled:"white_label_subscription.cancelled",white_label_subscriptionrenewed:"white_label_subscription.renewed",white_label_subscriptionexpired:"white_label_subscription.expired",white_label_subscriptionpayment_failed:"white_label_subscription.payment_failed"};var pCe={viewer:"viewer",editor:"editor",admin:"admin"};var gCe={b2b_standard:"b2b_standard",b2c_gross_discount:"b2c_gross_discount"};var hCe={product:"product",service:"service",advance:"advance"};var xCe={separator:"separator"};var _Ce={domestic:"domestic",intra_eu_b2b:"intra_eu_b2b",intra_eu_b2c:"intra_eu_b2c","3w_b2b":"3w_b2b","3w_b2c":"3w_b2c",export:"export"};var fCe={separator:"separator"};var ICe={b2b_standard:"b2b_standard",b2c_gross_discount:"b2c_gross_discount"};var SCe={invoice:"invoice",estimate:"estimate",credit_note:"credit_note",advance_invoice:"advance_invoice",delivery_note:"delivery_note"};var PCe={b2b_standard:"b2b_standard",b2c_gross_discount:"b2c_gross_discount"};var CCe={b2b_standard:"b2b_standard",b2c_gross_discount:"b2c_gross_discount"};var MCe={b2b_standard:"b2b_standard",b2c_gross_discount:"b2c_gross_discount"};var kCe={b2b_standard:"b2b_standard",b2c_gross_discount:"b2c_gross_discount"};var NCe={estimate:"estimate",proforma_invoice:"proforma_invoice"};var FCe={b2b_standard:"b2b_standard",b2c_gross_discount:"b2c_gross_discount"};var jCe={white_label_subscriptionsubscribed:"white_label_subscription.subscribed",white_label_subscriptionupgraded:"white_label_subscription.upgraded",white_label_subscriptiondowngrade_scheduled:"white_label_subscription.downgrade_scheduled",white_label_subscriptiondowngraded:"white_label_subscription.downgraded",white_label_subscriptioncancellation_scheduled:"white_label_subscription.cancellation_scheduled",white_label_subscriptioncancelled:"white_label_subscription.cancelled",white_label_subscriptionrenewed:"white_label_subscription.renewed",white_label_subscriptionexpired:"white_label_subscription.expired",white_label_subscriptionpayment_failed:"white_label_subscription.payment_failed"};var WCe={b2b_standard:"b2b_standard",b2c_gross_discount:"b2c_gross_discount"};var VCe={monthly:"monthly",yearly:"yearly"};var HCe={b2b_standard:"b2b_standard",b2c_gross_discount:"b2c_gross_discount"};var KCe={b2b_standard:"b2b_standard",b2c_gross_discount:"b2c_gross_discount"};var QCe={product:"product",service:"service",advance:"advance"};var ZCe={separator:"separator"};var eAe={cash:"cash",bank_transfer:"bank_transfer",card:"card",check:"check",paypal:"paypal",coupon:"coupon",other:"other",credit_note:"credit_note",advance:"advance"};var oAe={live:"live",sandbox:"sandbox"};var sAe={modern:"modern",classic:"classic",condensed:"condensed",minimal:"minimal",fashion:"fashion",timeless_modern_full_data:"timeless_modern_full_data"};var iAe={b2b_standard:"b2b_standard",b2c_gross_discount:"b2c_gross_discount"};var dAe={estimate:"estimate",proforma_invoice:"proforma_invoice"};var lAe={domestic:"domestic",intra_eu_b2b:"intra_eu_b2b",intra_eu_b2c:"intra_eu_b2c","3w_b2b":"3w_b2b","3w_b2c":"3w_b2c",export:"export"};var pAe={invoice:"invoice",credit_note:"credit_note",advance_invoice:"advance_invoice"};var gAe={cash:"cash",bank_transfer:"bank_transfer",card:"card",check:"check",paypal:"paypal",coupon:"coupon",other:"other",credit_note:"credit_note",advance:"advance"};var hAe={b2b_standard:"b2b_standard",b2c_gross_discount:"b2c_gross_discount"};var xAe={product:"product",service:"service",advance:"advance"};var _Ae={live:"live",sandbox:"sandbox"};var fAe={pending:"pending",processing:"processing",completed:"completed",failed:"failed"};var IAe={unpaid:"unpaid",paid:"paid",partially_paid:"partially_paid",refunded:"refunded"};var SAe={shopify:"shopify",woocommerce:"woocommerce",manual:"manual"};var PAe={shopify:"shopify",woocommerce:"woocommerce",manual:"manual"};var CAe={cash:"cash",bank_transfer:"bank_transfer",card:"card",check:"check",paypal:"paypal",coupon:"coupon",other:"other",credit_note:"credit_note",advance:"advance"};var MAe={invoice:"invoice",advance_invoice:"advance_invoice",credit_note:"credit_note",estimate:"estimate"};var kAe={daily:"daily",weekly:"weekly",monthly:"monthly",yearly:"yearly"};var NAe={invoicecreated:"invoice.created",invoiceupdated:"invoice.updated",invoicesent:"invoice.sent",invoicepaid:"invoice.paid",invoiceoverdue:"invoice.overdue",invoicecancelled:"invoice.cancelled",invoicedeleted:"invoice.deleted",invoicerestored:"invoice.restored",invoicevoided:"invoice.voided",invoicefinalized:"invoice.finalized",customercreated:"customer.created",customerupdated:"customer.updated",customerdeleted:"customer.deleted",customerrestored:"customer.restored",customerpermanently_deleted:"customer.permanently_deleted",paymentreceived:"payment.received",paymentfailed:"payment.failed",paymentdeleted:"payment.deleted",paymentrestored:"payment.restored",paymentpermanently_deleted:"payment.permanently_deleted",estimatecreated:"estimate.created",estimatesent:"estimate.sent",estimateaccepted:"estimate.accepted",estimaterejected:"estimate.rejected",estimatedeleted:"estimate.deleted",estimaterestored:"estimate.restored",credit_notecreated:"credit_note.created",credit_noteissued:"credit_note.issued",credit_notevoided:"credit_note.voided",credit_notedeleted:"credit_note.deleted",credit_noterestored:"credit_note.restored",advance_invoicecreated:"advance_invoice.created",advance_invoicepaid:"advance_invoice.paid",advance_invoiceapplied:"advance_invoice.applied",advance_invoicevoided:"advance_invoice.voided",advance_invoicedeleted:"advance_invoice.deleted",advance_invoicerestored:"advance_invoice.restored",itemcreated:"item.created",itemupdated:"item.updated",itemdeleted:"item.deleted",itemrestored:"item.restored",itempermanently_deleted:"item.permanently_deleted",taxcreated:"tax.created",taxupdated:"tax.updated",taxdeleted:"tax.deleted",taxrestored:"tax.restored",taxpermanently_deleted:"tax.permanently_deleted",recurring_invoicecreated:"recurring_invoice.created",recurring_invoiceupdated:"recurring_invoice.updated",recurring_invoicedeleted:"recurring_invoice.deleted",recurring_invoicerestored:"recurring_invoice.restored",recurring_invoicepermanently_deleted:"recurring_invoice.permanently_deleted",recurring_invoicepaused:"recurring_invoice.paused",recurring_invoiceresumed:"recurring_invoice.resumed",recurring_invoiceinvoice_generated:"recurring_invoice.invoice_generated",recurring_invoicegeneration_failed:"recurring_invoice.generation_failed",recurring_invoicecompleted:"recurring_invoice.completed",stripe_appconnected:"stripe_app.connected",stripe_appdisconnected:"stripe_app.disconnected",stripe_appsettings_updated:"stripe_app.settings_updated",ordercreated:"order.created",orderupdated:"order.updated",orderdeleted:"order.deleted",orderrestored:"order.restored",orderpermanently_deleted:"order.permanently_deleted",orderprocessed:"order.processed",ordercancelled:"order.cancelled",orderfailed:"order.failed",order_integrationcreated:"order_integration.created",order_integrationupdated:"order_integration.updated",order_integrationdeleted:"order_integration.deleted",delivery_notecreated:"delivery_note.created",delivery_notesent:"delivery_note.sent",delivery_notecancelled:"delivery_note.cancelled",delivery_notevoided:"delivery_note.voided",delivery_notedeleted:"delivery_note.deleted",delivery_noterestored:"delivery_note.restored",e_invoicingsubmissioncreated:"e_invoicing.submission.created",e_invoicingsubmissiondelivered:"e_invoicing.submission.delivered",e_invoicingsubmissionfailed:"e_invoicing.submission.failed",e_invoicingsupplieronboarded:"e_invoicing.supplier.onboarded",e_invoicingsupplierrejected:"e_invoicing.supplier.rejected"};var FAe={standard:"standard",custom:"custom"};var jAe={b2b_standard:"b2b_standard",b2c_gross_discount:"b2c_gross_discount"};var WAe={product:"product",service:"service",advance:"advance"};var VAe={separator:"separator"};var HAe={domestic:"domestic",intra_eu_b2b:"intra_eu_b2b",intra_eu_b2c:"intra_eu_b2c","3w_b2b":"3w_b2b","3w_b2c":"3w_b2c",export:"export"};var KAe={stripe:"stripe",paypal:"paypal",bank:"bank",braintree:"braintree"};var QAe={b2b_standard:"b2b_standard",b2c_gross_discount:"b2c_gross_discount"};var ZAe={b2b_standard:"b2b_standard",b2c_gross_discount:"b2c_gross_discount"};var eMe={b2b_standard:"b2b_standard",b2c_gross_discount:"b2c_gross_discount"};var oMe={b2b_standard:"b2b_standard",b2c_gross_discount:"b2c_gross_discount"};var sMe={estimate:"estimate",proforma_invoice:"proforma_invoice"};var iMe={domestic:"domestic",intra_eu_b2b:"intra_eu_b2b",intra_eu_b2c:"intra_eu_b2c","3w_b2b":"3w_b2b","3w_b2c":"3w_b2c",export:"export"};var dMe={invoice:"invoice",credit_note:"credit_note",advance_invoice:"advance_invoice"};var lMe={b2b_standard:"b2b_standard",b2c_gross_discount:"b2c_gross_discount"};var pMe={product:"product",service:"service",advance:"advance"};var gMe={separator:"separator"};var hMe={invoice:"invoice",estimate:"estimate",credit_note:"credit_note",advance_invoice:"advance_invoice",delivery_note:"delivery_note"};var xMe={b2b_standard:"b2b_standard",b2c_gross_discount:"b2c_gross_discount"};var _Me={product:"product",service:"service",advance:"advance"};var fMe={separator:"separator"};var IMe={domestic:"domestic",intra_eu_b2b:"intra_eu_b2b",intra_eu_b2c:"intra_eu_b2c","3w_b2b":"3w_b2b","3w_b2c":"3w_b2c",export:"export"};var SMe={b2b_standard:"b2b_standard",b2c_gross_discount:"b2c_gross_discount"};var PMe={domestic:"domestic",intra_eu_b2b:"intra_eu_b2b",intra_eu_b2c:"intra_eu_b2c","3w_b2b":"3w_b2b","3w_b2c":"3w_b2c",export:"export"};var CMe={estimate:"estimate",proforma_invoice:"proforma_invoice"};var MMe={invoice:"invoice",estimate:"estimate",credit_note:"credit_note",advance_invoice:"advance_invoice",delivery_note:"delivery_note"};var kMe={invoice:"invoice",estimate:"estimate",credit_note:"credit_note",advance_invoice:"advance_invoice",delivery_note:"delivery_note"};var NMe={invoice:"invoice",estimate:"estimate",credit_note:"credit_note",advance_invoice:"advance_invoice",delivery_note:"delivery_note"};var FMe={invoice:"invoice",estimate:"estimate",credit_note:"credit_note",advance_invoice:"advance_invoice"};var jMe={live:"live",sandbox:"sandbox"};var WMe={iban:"iban",us_domestic:"us_domestic",uk_domestic:"uk_domestic",other:"other"};var VMe={live:"live",sandbox:"sandbox"};var HMe={viewer:"viewer",editor:"editor",admin:"admin"};var KMe={pending:"pending",accepted:"accepted",expired:"expired"};var QMe={modern:"modern",classic:"classic",condensed:"condensed",minimal:"minimal",fashion:"fashion",timeless_modern_full_data:"timeless_modern_full_data"};var ZMe={viewer:"viewer",editor:"editor",admin:"admin"};var eTe={invoice:"invoice",estimate:"estimate",credit_note:"credit_note"};var oTe={b2b_standard:"b2b_standard",b2c_gross_discount:"b2c_gross_discount"};var sTe={product:"product",service:"service",advance:"advance"};var iTe={separator:"separator"};var dTe={estimate:"estimate",proforma_invoice:"proforma_invoice"};var lTe={domestic:"domestic",intra_eu_b2b:"intra_eu_b2b",intra_eu_b2c:"intra_eu_b2c","3w_b2b":"3w_b2b","3w_b2c":"3w_b2c",export:"export"};var pTe={xlsx:"xlsx",csv:"csv"};var gTe={en:"en",de:"de",sl:"sl",it:"it",fr:"fr",es:"es",pt:"pt",nl:"nl",pl:"pl",hr:"hr",sv:"sv",fi:"fi",et:"et",bg:"bg",cs:"cs",sk:"sk",nb:"nb",is:"is"};var hTe={invoice:"invoice",estimate:"estimate",credit_note:"credit_note",advance_invoice:"advance_invoice",delivery_note:"delivery_note"};var xTe={xlsx:"xlsx",csv:"csv"};var _Te={en:"en",de:"de",sl:"sl",it:"it",fr:"fr",es:"es",pt:"pt",nl:"nl",pl:"pl",hr:"hr",sv:"sv",fi:"fi",et:"et",bg:"bg",cs:"cs",sk:"sk",nb:"nb",is:"is"};var fTe={invoice:"invoice",estimate:"estimate",credit_note:"credit_note",advance_invoice:"advance_invoice",delivery_note:"delivery_note"};var ITe={invoice:"invoice",estimate:"estimate",credit_note:"credit_note",advance_invoice:"advance_invoice",delivery_note:"delivery_note"};var STe={test:"test",production:"production"};var PTe={invoice:"invoice",advance_invoice:"advance_invoice",credit_note:"credit_note",estimate:"estimate"};var CTe={user:"user",api_key:"api_key",system:"system",cron:"cron",webhook:"webhook"};var MTe={live:"live",sandbox:"sandbox"};var kTe={pending:"pending",processing:"processing",completed:"completed",failed:"failed"};var NTe={logo:"logo",signature:"signature",attachment:"attachment"};var FTe={valid:"valid",expiring_soon:"expiring_soon",expired:"expired",missing:"missing"};var jTe={N:"N",P:"P"};var WTe={valid:"valid",expiring_soon:"expiring_soon",expired:"expired",missing:"missing"};var VTe={B:"B",C:"C"};var HTe={true:"true",false:"false"};var KTe={invoice:"invoice",estimate:"estimate",credit_note:"credit_note",advance_invoice:"advance_invoice",delivery_note:"delivery_note"};var QTe={pending:"pending",processing:"processing",completed:"completed",failed:"failed"};var ZTe={"en-US":"en-US","de-DE":"de-DE","it-IT":"it-IT","fr-FR":"fr-FR","es-ES":"es-ES","sl-SI":"sl-SI","pt-PT":"pt-PT","nl-NL":"nl-NL","pl-PL":"pl-PL","hr-HR":"hr-HR","sv-SE":"sv-SE","fi-FI":"fi-FI","et-EE":"et-EE","bg-BG":"bg-BG","cs-CZ":"cs-CZ","sk-SK":"sk-SK","nb-NO":"nb-NO","is-IS":"is-IS"};var eke={"en-US":"en-US","de-DE":"de-DE","it-IT":"it-IT","fr-FR":"fr-FR","es-ES":"es-ES","sl-SI":"sl-SI","pt-PT":"pt-PT","nl-NL":"nl-NL","pl-PL":"pl-PL","hr-HR":"hr-HR","sv-SE":"sv-SE","fi-FI":"fi-FI","et-EE":"et-EE","bg-BG":"bg-BG","cs-CZ":"cs-CZ","sk-SK":"sk-SK","nb-NO":"nb-NO","is-IS":"is-IS"};var oke={"en-US":"en-US","de-DE":"de-DE","it-IT":"it-IT","fr-FR":"fr-FR","es-ES":"es-ES","sl-SI":"sl-SI","pt-PT":"pt-PT","nl-NL":"nl-NL","pl-PL":"pl-PL","hr-HR":"hr-HR","sv-SE":"sv-SE","fi-FI":"fi-FI","et-EE":"et-EE","bg-BG":"bg-BG","cs-CZ":"cs-CZ","sk-SK":"sk-SK","nb-NO":"nb-NO","is-IS":"is-IS"};var ske={"en-US":"en-US","de-DE":"de-DE","it-IT":"it-IT","fr-FR":"fr-FR","es-ES":"es-ES","sl-SI":"sl-SI","pt-PT":"pt-PT","nl-NL":"nl-NL","pl-PL":"pl-PL","hr-HR":"hr-HR","sv-SE":"sv-SE","fi-FI":"fi-FI","et-EE":"et-EE","bg-BG":"bg-BG","cs-CZ":"cs-CZ","sk-SK":"sk-SK","nb-NO":"nb-NO","is-IS":"is-IS"};var ike={"en-US":"en-US","de-DE":"de-DE","it-IT":"it-IT","fr-FR":"fr-FR","es-ES":"es-ES","sl-SI":"sl-SI","pt-PT":"pt-PT","nl-NL":"nl-NL","pl-PL":"pl-PL","hr-HR":"hr-HR","sv-SE":"sv-SE","fi-FI":"fi-FI","et-EE":"et-EE","bg-BG":"bg-BG","cs-CZ":"cs-CZ","sk-SK":"sk-SK","nb-NO":"nb-NO","is-IS":"is-IS"};var dke={"en-US":"en-US","de-DE":"de-DE","it-IT":"it-IT","fr-FR":"fr-FR","es-ES":"es-ES","sl-SI":"sl-SI","pt-PT":"pt-PT","nl-NL":"nl-NL","pl-PL":"pl-PL","hr-HR":"hr-HR","sv-SE":"sv-SE","fi-FI":"fi-FI","et-EE":"et-EE","bg-BG":"bg-BG","cs-CZ":"cs-CZ","sk-SK":"sk-SK","nb-NO":"nb-NO","is-IS":"is-IS"};var lke={"en-US":"en-US","de-DE":"de-DE","it-IT":"it-IT","fr-FR":"fr-FR","es-ES":"es-ES","sl-SI":"sl-SI","pt-PT":"pt-PT","nl-NL":"nl-NL","pl-PL":"pl-PL","hr-HR":"hr-HR","sv-SE":"sv-SE","fi-FI":"fi-FI","et-EE":"et-EE","bg-BG":"bg-BG","cs-CZ":"cs-CZ","sk-SK":"sk-SK","nb-NO":"nb-NO","is-IS":"is-IS"};var pke={"en-US":"en-US","de-DE":"de-DE","it-IT":"it-IT","fr-FR":"fr-FR","es-ES":"es-ES","sl-SI":"sl-SI","pt-PT":"pt-PT","nl-NL":"nl-NL","pl-PL":"pl-PL","hr-HR":"hr-HR","sv-SE":"sv-SE","fi-FI":"fi-FI","et-EE":"et-EE","bg-BG":"bg-BG","cs-CZ":"cs-CZ","sk-SK":"sk-SK","nb-NO":"nb-NO","is-IS":"is-IS"};var gke={"en-US":"en-US","de-DE":"de-DE","it-IT":"it-IT","fr-FR":"fr-FR","es-ES":"es-ES","sl-SI":"sl-SI","pt-PT":"pt-PT","nl-NL":"nl-NL","pl-PL":"pl-PL","hr-HR":"hr-HR","sv-SE":"sv-SE","fi-FI":"fi-FI","et-EE":"et-EE","bg-BG":"bg-BG","cs-CZ":"cs-CZ","sk-SK":"sk-SK","nb-NO":"nb-NO","is-IS":"is-IS"};var hke={"en-US":"en-US","de-DE":"de-DE","it-IT":"it-IT","fr-FR":"fr-FR","es-ES":"es-ES","sl-SI":"sl-SI","pt-PT":"pt-PT","nl-NL":"nl-NL","pl-PL":"pl-PL","hr-HR":"hr-HR","sv-SE":"sv-SE","fi-FI":"fi-FI","et-EE":"et-EE","bg-BG":"bg-BG","cs-CZ":"cs-CZ","sk-SK":"sk-SK","nb-NO":"nb-NO","is-IS":"is-IS"};var xke={"en-US":"en-US","de-DE":"de-DE","it-IT":"it-IT","fr-FR":"fr-FR","es-ES":"es-ES","sl-SI":"sl-SI","pt-PT":"pt-PT","nl-NL":"nl-NL","pl-PL":"pl-PL","hr-HR":"hr-HR","sv-SE":"sv-SE","fi-FI":"fi-FI","et-EE":"et-EE","bg-BG":"bg-BG","cs-CZ":"cs-CZ","sk-SK":"sk-SK","nb-NO":"nb-NO","is-IS":"is-IS"};var _ke={"en-US":"en-US","de-DE":"de-DE","it-IT":"it-IT","fr-FR":"fr-FR","es-ES":"es-ES","sl-SI":"sl-SI","pt-PT":"pt-PT","nl-NL":"nl-NL","pl-PL":"pl-PL","hr-HR":"hr-HR","sv-SE":"sv-SE","fi-FI":"fi-FI","et-EE":"et-EE","bg-BG":"bg-BG","cs-CZ":"cs-CZ","sk-SK":"sk-SK","nb-NO":"nb-NO","is-IS":"is-IS"};var fke={"en-US":"en-US","de-DE":"de-DE","it-IT":"it-IT","fr-FR":"fr-FR","es-ES":"es-ES","sl-SI":"sl-SI","pt-PT":"pt-PT","nl-NL":"nl-NL","pl-PL":"pl-PL","hr-HR":"hr-HR","sv-SE":"sv-SE","fi-FI":"fi-FI","et-EE":"et-EE","bg-BG":"bg-BG","cs-CZ":"cs-CZ","sk-SK":"sk-SK","nb-NO":"nb-NO","is-IS":"is-IS"};var Ike={"en-US":"en-US","de-DE":"de-DE","it-IT":"it-IT","fr-FR":"fr-FR","es-ES":"es-ES","sl-SI":"sl-SI","pt-PT":"pt-PT","nl-NL":"nl-NL","pl-PL":"pl-PL","hr-HR":"hr-HR","sv-SE":"sv-SE","fi-FI":"fi-FI","et-EE":"et-EE","bg-BG":"bg-BG","cs-CZ":"cs-CZ","sk-SK":"sk-SK","nb-NO":"nb-NO","is-IS":"is-IS"};var Ske={"en-US":"en-US","de-DE":"de-DE","it-IT":"it-IT","fr-FR":"fr-FR","es-ES":"es-ES","sl-SI":"sl-SI","pt-PT":"pt-PT","nl-NL":"nl-NL","pl-PL":"pl-PL","hr-HR":"hr-HR","sv-SE":"sv-SE","fi-FI":"fi-FI","et-EE":"et-EE","bg-BG":"bg-BG","cs-CZ":"cs-CZ","sk-SK":"sk-SK","nb-NO":"nb-NO","is-IS":"is-IS"};var Pke={"en-US":"en-US","de-DE":"de-DE","it-IT":"it-IT","fr-FR":"fr-FR","es-ES":"es-ES","sl-SI":"sl-SI","pt-PT":"pt-PT","nl-NL":"nl-NL","pl-PL":"pl-PL","hr-HR":"hr-HR","sv-SE":"sv-SE","fi-FI":"fi-FI","et-EE":"et-EE","bg-BG":"bg-BG","cs-CZ":"cs-CZ","sk-SK":"sk-SK","nb-NO":"nb-NO","is-IS":"is-IS"};var Cke={"en-US":"en-US","de-DE":"de-DE","it-IT":"it-IT","fr-FR":"fr-FR","es-ES":"es-ES","sl-SI":"sl-SI","pt-PT":"pt-PT","nl-NL":"nl-NL","pl-PL":"pl-PL","hr-HR":"hr-HR","sv-SE":"sv-SE","fi-FI":"fi-FI","et-EE":"et-EE","bg-BG":"bg-BG","cs-CZ":"cs-CZ","sk-SK":"sk-SK","nb-NO":"nb-NO","is-IS":"is-IS"};var Mke={"en-US":"en-US","de-DE":"de-DE","it-IT":"it-IT","fr-FR":"fr-FR","es-ES":"es-ES","sl-SI":"sl-SI","pt-PT":"pt-PT","nl-NL":"nl-NL","pl-PL":"pl-PL","hr-HR":"hr-HR","sv-SE":"sv-SE","fi-FI":"fi-FI","et-EE":"et-EE","bg-BG":"bg-BG","cs-CZ":"cs-CZ","sk-SK":"sk-SK","nb-NO":"nb-NO","is-IS":"is-IS"};var kke={"en-US":"en-US","de-DE":"de-DE","it-IT":"it-IT","fr-FR":"fr-FR","es-ES":"es-ES","sl-SI":"sl-SI","pt-PT":"pt-PT","nl-NL":"nl-NL","pl-PL":"pl-PL","hr-HR":"hr-HR","sv-SE":"sv-SE","fi-FI":"fi-FI","et-EE":"et-EE","bg-BG":"bg-BG","cs-CZ":"cs-CZ","sk-SK":"sk-SK","nb-NO":"nb-NO","is-IS":"is-IS"};var Nke={"en-US":"en-US","de-DE":"de-DE","it-IT":"it-IT","fr-FR":"fr-FR","es-ES":"es-ES","sl-SI":"sl-SI","pt-PT":"pt-PT","nl-NL":"nl-NL","pl-PL":"pl-PL","hr-HR":"hr-HR","sv-SE":"sv-SE","fi-FI":"fi-FI","et-EE":"et-EE","bg-BG":"bg-BG","cs-CZ":"cs-CZ","sk-SK":"sk-SK","nb-NO":"nb-NO","is-IS":"is-IS"};var Fke={vod_xml:"vod_xml",vasco_xml:"vasco_xml",minimax_xml:"minimax_xml"};var jke={sp:"sp",doo:"doo",dno:"dno",club:"club"};var Wke={stored:"stored",registry:"registry",unknown:"unknown"};var Vke={normirani:"normirani",dejanski:"dejanski"};var Hke={sp:"sp",doo:"doo",dno:"dno",club:"club"};var Kke={resident:"resident",non_resident:"non_resident"};var Qke={standard:"standard",special_vat_identified:"special_vat_identified",non_vat_subject:"non_vat_subject"};var Zke={records:"records",single_entry:"single_entry",double_entry:"double_entry"};var e3e={full_time_self_employed:"full_time_self_employed",other:"other"};var o3e={product:"product",service:"service"};var s3e={goods:"goods",services:"services"};var i3e={invoice:"invoice",credit_note:"credit_note",advance_invoice:"advance_invoice"};var d3e={b2b_standard:"b2b_standard",b2c_gross_discount:"b2c_gross_discount"};var l3e={product:"product",service:"service",advance:"advance"};var p3e={separator:"separator"};var g3e={domestic:"domestic",intra_eu_b2b:"intra_eu_b2b",intra_eu_b2c:"intra_eu_b2c","3w_b2b":"3w_b2b","3w_b2c":"3w_b2c",export:"export"};var h3e={product:"product",service:"service",advance:"advance"};var x3e={fiscalization_series:"fiscalization_series",accounting_categories:"accounting_categories",inventory_and_pricing:"inventory_and_pricing",sales_integrations:"sales_integrations",webhooks:"webhooks"};var _3e={percent:"percent",amount:"amount"};var f3e={invoice:"invoice",advance_invoice:"advance_invoice",credit_note:"credit_note",estimate:"estimate"};var I3e={pending:"pending",processing:"processing",completed:"completed",failed:"failed"};var S3e={unpaid:"unpaid",paid:"paid",partially_paid:"partially_paid",refunded:"refunded"};var P3e={shopify:"shopify",woocommerce:"woocommerce",manual:"manual"};var C3e={pending:"pending",processing:"processing",invoiced:"invoiced",cancelled:"cancelled",failed:"failed"};var M3e={created:"created",paid:"paid",fulfilled:"fulfilled"};var k3e={shopify:"shopify",woocommerce:"woocommerce",manual:"manual"};var N3e={line_item:"line_item",shipping:"shipping"};var F3e={b2b_standard:"b2b_standard",b2c_gross_discount:"b2c_gross_discount"};var j3e={percent:"percent",amount:"amount"};var W3e={separator:"separator"};var V3e={b2b_standard:"b2b_standard",b2c_gross_discount:"b2c_gross_discount"};var H3e={percent:"percent",amount:"amount"};var K3e={separator:"separator"};var Q3e={b2b_standard:"b2b_standard",b2c_gross_discount:"b2c_gross_discount"};var Z3e={percent:"percent",amount:"amount"};var eBe={separator:"separator"};var oBe={b2b_standard:"b2b_standard",b2c_gross_discount:"b2c_gross_discount"};var sBe={percent:"percent",amount:"amount"};var iBe={separator:"separator"};var dBe={estimate:"estimate",proforma_invoice:"proforma_invoice"};var lBe={b2b_standard:"b2b_standard",b2c_gross_discount:"b2c_gross_discount"};var pBe={percent:"percent",amount:"amount"};var gBe={separator:"separator"};var hBe={modern:"modern",classic:"classic",condensed:"condensed",minimal:"minimal",fashion:"fashion",timeless_modern_full_data:"timeless_modern_full_data"};var xBe={en:"en",de:"de",sl:"sl",it:"it",fr:"fr",es:"es",pt:"pt",nl:"nl",pl:"pl",hr:"hr",sv:"sv",fi:"fi",et:"et",bg:"bg",cs:"cs",sk:"sk",nb:"nb",is:"is"};var _Be={cash:"cash",bank_transfer:"bank_transfer",card:"card",check:"check",paypal:"paypal",coupon:"coupon",other:"other",credit_note:"credit_note",advance:"advance"};var fBe={en:"en",de:"de",sl:"sl",it:"it",fr:"fr",es:"es",pt:"pt",nl:"nl",pl:"pl",hr:"hr",sv:"sv",fi:"fi",et:"et",bg:"bg",cs:"cs",sk:"sk",nb:"nb",is:"is"};var IBe={"en-US":"en-US","de-DE":"de-DE","it-IT":"it-IT","fr-FR":"fr-FR","es-ES":"es-ES","sl-SI":"sl-SI","pt-PT":"pt-PT","nl-NL":"nl-NL","pl-PL":"pl-PL","hr-HR":"hr-HR","sv-SE":"sv-SE","fi-FI":"fi-FI","et-EE":"et-EE","bg-BG":"bg-BG","cs-CZ":"cs-CZ","sk-SK":"sk-SK","nb-NO":"nb-NO","is-IS":"is-IS"};var SBe={invoice:"invoice",estimate:"estimate",credit_note:"credit_note",advance_invoice:"advance_invoice",delivery_note:"delivery_note"};var PBe={en:"en",de:"de",sl:"sl",it:"it",fr:"fr",es:"es",pt:"pt",nl:"nl",pl:"pl",hr:"hr",sv:"sv",fi:"fi",et:"et",bg:"bg",cs:"cs",sk:"sk",nb:"nb",is:"is"};var CBe={"en-US":"en-US","de-DE":"de-DE","it-IT":"it-IT","fr-FR":"fr-FR","es-ES":"es-ES","sl-SI":"sl-SI","pt-PT":"pt-PT","nl-NL":"nl-NL","pl-PL":"pl-PL","hr-HR":"hr-HR","sv-SE":"sv-SE","fi-FI":"fi-FI","et-EE":"et-EE","bg-BG":"bg-BG","cs-CZ":"cs-CZ","sk-SK":"sk-SK","nb-NO":"nb-NO","is-IS":"is-IS"};var MBe={invoice:"invoice",estimate:"estimate",credit_note:"credit_note",advance_invoice:"advance_invoice",delivery_note:"delivery_note"};var kBe={invoice:"invoice",advance_invoice:"advance_invoice",credit_note:"credit_note",estimate:"estimate"};var NBe={daily:"daily",weekly:"weekly",monthly:"monthly",yearly:"yearly"};var FBe={active:"active",paused:"paused",completed:"completed"};var jBe={A:"A",B:"B",C:"C"};var WBe={true:"true",false:"false"};var VBe={true:"true",false:"false"};var HBe={modern:"modern",classic:"classic",condensed:"condensed",minimal:"minimal",fashion:"fashion"};var KBe={qr_only:"qr_only",full_slip:"full_slip"};var QBe={true:"true",false:"false"};var ZBe={true:"true",false:"false"};var eNe={true:"true",false:"false"};var oNe={modern:"modern",classic:"classic",condensed:"condensed",minimal:"minimal",fashion:"fashion"};var sNe={qr_only:"qr_only",full_slip:"full_slip"};var iNe={true:"true",false:"false"};var dNe={true:"true",false:"false"};var lNe={true:"true",false:"false"};var pNe={modern:"modern",classic:"classic",condensed:"condensed",minimal:"minimal",fashion:"fashion"};var gNe={qr_only:"qr_only",full_slip:"full_slip"};var hNe={true:"true",false:"false"};var xNe={modern:"modern",classic:"classic",condensed:"condensed",minimal:"minimal",fashion:"fashion"};var _Ne={modern:"modern",classic:"classic",condensed:"condensed",minimal:"minimal",fashion:"fashion"};var fNe={true:"true",false:"false"};var INe={true:"true",false:"false"};var SNe={modern:"modern",classic:"classic",condensed:"condensed",minimal:"minimal",fashion:"fashion"};var PNe={qr_only:"qr_only",full_slip:"full_slip"};var CNe={true:"true",false:"false"};var MNe={true:"true",false:"false"};var kNe={true:"true",false:"false"};var NNe={modern:"modern",classic:"classic",condensed:"condensed",minimal:"minimal",fashion:"fashion"};var FNe={qr_only:"qr_only",full_slip:"full_slip"};var jNe={true:"true",false:"false"};var WNe={invoice:"invoice",estimate:"estimate",credit_note:"credit_note",advance_invoice:"advance_invoice",delivery_note:"delivery_note"};var VNe={regular_annual:"regular_annual"};var HNe={invoice:"invoice",credit_note:"credit_note"};var KNe={FURS:"FURS",PISRS:"PISRS"};var QNe={info:"info",warning:"warning"};var ZNe={vod_xml:"vod_xml",vasco_xml:"vasco_xml",minimax_xml:"minimax_xml"};var eOe={sp:"sp",doo:"doo",dno:"dno",club:"club"};var oOe={stored:"stored",registry:"registry",unknown:"unknown"};var sOe={normirani:"normirani",dejanski:"dejanski"};var iOe={sp:"sp",doo:"doo",dno:"dno",club:"club"};var dOe={resident:"resident",non_resident:"non_resident"};var lOe={standard:"standard",special_vat_identified:"special_vat_identified",non_vat_subject:"non_vat_subject"};var pOe={records:"records",single_entry:"single_entry",double_entry:"double_entry"};var gOe={full_time_self_employed:"full_time_self_employed",other:"other"};var hOe={info:"info",warning:"warning"};var xOe={sent:"sent",queued:"queued",skipped:"skipped"};var _Oe={sent:"sent",queued:"queued",skipped:"skipped"};var fOe={"en-US":"en-US","de-DE":"de-DE","it-IT":"it-IT","fr-FR":"fr-FR","es-ES":"es-ES","sl-SI":"sl-SI","pt-PT":"pt-PT","nl-NL":"nl-NL","pl-PL":"pl-PL","hr-HR":"hr-HR","sv-SE":"sv-SE","fi-FI":"fi-FI","et-EE":"et-EE","bg-BG":"bg-BG","cs-CZ":"cs-CZ","sk-SK":"sk-SK","nb-NO":"nb-NO","is-IS":"is-IS"};var IOe={"en-US":"en-US","de-DE":"de-DE","it-IT":"it-IT","fr-FR":"fr-FR","es-ES":"es-ES","sl-SI":"sl-SI","pt-PT":"pt-PT","nl-NL":"nl-NL","pl-PL":"pl-PL","hr-HR":"hr-HR","sv-SE":"sv-SE","fi-FI":"fi-FI","et-EE":"et-EE","bg-BG":"bg-BG","cs-CZ":"cs-CZ","sk-SK":"sk-SK","nb-NO":"nb-NO","is-IS":"is-IS"};var SOe={pending:"pending",processing:"processing",completed:"completed",failed:"failed"};var POe={pending:"pending",processing:"processing",completed:"completed",failed:"failed"};var COe={count:"count",sum:"sum",avg:"avg",min:"min",max:"max"};var MOe={asc:"asc",desc:"desc"};var kOe={invoices:"invoices",estimates:"estimates",credit_notes:"credit_notes",advance_invoices:"advance_invoices",payments:"payments",customers:"customers",items:"items",invoice_taxes:"invoice_taxes"};var NOe={payment_intentsucceeded:"payment_intent.succeeded",invoicepaid:"invoice.paid"};var FOe={payment_intentsucceeded:"payment_intent.succeeded",invoicepaid:"invoice.paid"};var jOe={domestic:"domestic",intra_eu_b2b:"intra_eu_b2b",intra_eu_b2c:"intra_eu_b2c","3w_b2b":"3w_b2b","3w_b2c":"3w_b2c"};var WOe={white_label_subscriptionsubscribed:"white_label_subscription.subscribed",white_label_subscriptionupgraded:"white_label_subscription.upgraded",white_label_subscriptiondowngrade_scheduled:"white_label_subscription.downgrade_scheduled",white_label_subscriptiondowngraded:"white_label_subscription.downgraded",white_label_subscriptioncancellation_scheduled:"white_label_subscription.cancellation_scheduled",white_label_subscriptioncancelled:"white_label_subscription.cancelled",white_label_subscriptionrenewed:"white_label_subscription.renewed",white_label_subscriptionexpired:"white_label_subscription.expired",white_label_subscriptionpayment_failed:"white_label_subscription.payment_failed"};var VOe={viewer:"viewer",editor:"editor",admin:"admin"};var HOe={estimate:"estimate",proforma_invoice:"proforma_invoice"};var KOe={valid:"valid",expiring_soon:"expiring_soon",expired:"expired",missing:"missing"};var QOe={N:"N",P:"P"};var ZOe={N:"N",P:"P"};var e5e={valid:"valid",expiring_soon:"expiring_soon",expired:"expired",missing:"missing"};var o5e={B:"B",C:"C"};var s5e={B:"B",C:"C"};var i5e={domestic:"domestic",intra_eu_b2b:"intra_eu_b2b",intra_eu_b2c:"intra_eu_b2c","3w_b2b":"3w_b2b","3w_b2c":"3w_b2c",export:"export"};var d5e={invoice:"invoice",credit_note:"credit_note",advance_invoice:"advance_invoice"};var l5e={product:"product",service:"service",advance:"advance"};var p5e={unpaid:"unpaid",paid:"paid",partially_paid:"partially_paid",refunded:"refunded"};var g5e={created:"created",paid:"paid",fulfilled:"fulfilled"};var h5e={cash:"cash",bank_transfer:"bank_transfer",card:"card",check:"check",paypal:"paypal",coupon:"coupon",other:"other",credit_note:"credit_note",advance:"advance"};var x5e={daily:"daily",weekly:"weekly",monthly:"monthly",yearly:"yearly"};var _5e={vod_xml:"vod_xml",vasco_xml:"vasco_xml",minimax_xml:"minimax_xml"};var f5e={sp:"sp",doo:"doo",dno:"dno",club:"club"};var I5e={stored:"stored",registry:"registry",unknown:"unknown"};var S5e={normirani:"normirani",dejanski:"dejanski"};var P5e={sp:"sp",doo:"doo",dno:"dno",club:"club"};var C5e={resident:"resident",non_resident:"non_resident"};var M5e={standard:"standard",special_vat_identified:"special_vat_identified",non_vat_subject:"non_vat_subject"};var k5e={records:"records",single_entry:"single_entry",double_entry:"double_entry"};var N5e={full_time_self_employed:"full_time_self_employed",other:"other"};var F5e={vod_xml:"vod_xml",vasco_xml:"vasco_xml",minimax_xml:"minimax_xml"};var j5e={sp:"sp",doo:"doo",dno:"dno",club:"club"};var W5e={normirani:"normirani",dejanski:"dejanski"};var V5e={resident:"resident",non_resident:"non_resident"};var H5e={standard:"standard",special_vat_identified:"special_vat_identified",non_vat_subject:"non_vat_subject"};var K5e={records:"records",single_entry:"single_entry",double_entry:"double_entry"};var Q5e={full_time_self_employed:"full_time_self_employed",other:"other"};var Z5e={invoicecreated:"invoice.created",invoiceupdated:"invoice.updated",invoicesent:"invoice.sent",invoicepaid:"invoice.paid",invoiceoverdue:"invoice.overdue",invoicecancelled:"invoice.cancelled",invoicedeleted:"invoice.deleted",invoicerestored:"invoice.restored",invoicevoided:"invoice.voided",invoicefinalized:"invoice.finalized",customercreated:"customer.created",customerupdated:"customer.updated",customerdeleted:"customer.deleted",customerrestored:"customer.restored",customerpermanently_deleted:"customer.permanently_deleted",paymentreceived:"payment.received",paymentfailed:"payment.failed",paymentdeleted:"payment.deleted",paymentrestored:"payment.restored",paymentpermanently_deleted:"payment.permanently_deleted",estimatecreated:"estimate.created",estimatesent:"estimate.sent",estimateaccepted:"estimate.accepted",estimaterejected:"estimate.rejected",estimatedeleted:"estimate.deleted",estimaterestored:"estimate.restored",credit_notecreated:"credit_note.created",credit_noteissued:"credit_note.issued",credit_notevoided:"credit_note.voided",credit_notedeleted:"credit_note.deleted",credit_noterestored:"credit_note.restored",advance_invoicecreated:"advance_invoice.created",advance_invoicepaid:"advance_invoice.paid",advance_invoiceapplied:"advance_invoice.applied",advance_invoicevoided:"advance_invoice.voided",advance_invoicedeleted:"advance_invoice.deleted",advance_invoicerestored:"advance_invoice.restored",itemcreated:"item.created",itemupdated:"item.updated",itemdeleted:"item.deleted",itemrestored:"item.restored",itempermanently_deleted:"item.permanently_deleted",taxcreated:"tax.created",taxupdated:"tax.updated",taxdeleted:"tax.deleted",taxrestored:"tax.restored",taxpermanently_deleted:"tax.permanently_deleted",recurring_invoicecreated:"recurring_invoice.created",recurring_invoiceupdated:"recurring_invoice.updated",recurring_invoicedeleted:"recurring_invoice.deleted",recurring_invoicerestored:"recurring_invoice.restored",recurring_invoicepermanently_deleted:"recurring_invoice.permanently_deleted",recurring_invoicepaused:"recurring_invoice.paused",recurring_invoiceresumed:"recurring_invoice.resumed",recurring_invoiceinvoice_generated:"recurring_invoice.invoice_generated",recurring_invoicegeneration_failed:"recurring_invoice.generation_failed",recurring_invoicecompleted:"recurring_invoice.completed",stripe_appconnected:"stripe_app.connected",stripe_appdisconnected:"stripe_app.disconnected",stripe_appsettings_updated:"stripe_app.settings_updated",ordercreated:"order.created",orderupdated:"order.updated",orderdeleted:"order.deleted",orderrestored:"order.restored",orderpermanently_deleted:"order.permanently_deleted",orderprocessed:"order.processed",ordercancelled:"order.cancelled",orderfailed:"order.failed",order_integrationcreated:"order_integration.created",order_integrationupdated:"order_integration.updated",order_integrationdeleted:"order_integration.deleted",delivery_notecreated:"delivery_note.created",delivery_notesent:"delivery_note.sent",delivery_notecancelled:"delivery_note.cancelled",delivery_notevoided:"delivery_note.voided",delivery_notedeleted:"delivery_note.deleted",delivery_noterestored:"delivery_note.restored",e_invoicingsubmissioncreated:"e_invoicing.submission.created",e_invoicingsubmissiondelivered:"e_invoicing.submission.delivered",e_invoicingsubmissionfailed:"e_invoicing.submission.failed",e_invoicingsupplieronboarded:"e_invoicing.supplier.onboarded",e_invoicingsupplierrejected:"e_invoicing.supplier.rejected"};var e1e={logo:"logo",signature:"signature",attachment:"attachment"};var o1e={pending:"pending",success:"success",failed:"failed"};var s1e={invoicecreated:"invoice.created",invoiceupdated:"invoice.updated",invoicesent:"invoice.sent",invoicepaid:"invoice.paid",invoiceoverdue:"invoice.overdue",invoicecancelled:"invoice.cancelled",invoicedeleted:"invoice.deleted",invoicerestored:"invoice.restored",invoicevoided:"invoice.voided",invoicefinalized:"invoice.finalized",customercreated:"customer.created",customerupdated:"customer.updated",customerdeleted:"customer.deleted",customerrestored:"customer.restored",customerpermanently_deleted:"customer.permanently_deleted",paymentreceived:"payment.received",paymentfailed:"payment.failed",paymentdeleted:"payment.deleted",paymentrestored:"payment.restored",paymentpermanently_deleted:"payment.permanently_deleted",estimatecreated:"estimate.created",estimatesent:"estimate.sent",estimateaccepted:"estimate.accepted",estimaterejected:"estimate.rejected",estimatedeleted:"estimate.deleted",estimaterestored:"estimate.restored",credit_notecreated:"credit_note.created",credit_noteissued:"credit_note.issued",credit_notevoided:"credit_note.voided",credit_notedeleted:"credit_note.deleted",credit_noterestored:"credit_note.restored",advance_invoicecreated:"advance_invoice.created",advance_invoicepaid:"advance_invoice.paid",advance_invoiceapplied:"advance_invoice.applied",advance_invoicevoided:"advance_invoice.voided",advance_invoicedeleted:"advance_invoice.deleted",advance_invoicerestored:"advance_invoice.restored",itemcreated:"item.created",itemupdated:"item.updated",itemdeleted:"item.deleted",itemrestored:"item.restored",itempermanently_deleted:"item.permanently_deleted",taxcreated:"tax.created",taxupdated:"tax.updated",taxdeleted:"tax.deleted",taxrestored:"tax.restored",taxpermanently_deleted:"tax.permanently_deleted",recurring_invoicecreated:"recurring_invoice.created",recurring_invoiceupdated:"recurring_invoice.updated",recurring_invoicedeleted:"recurring_invoice.deleted",recurring_invoicerestored:"recurring_invoice.restored",recurring_invoicepermanently_deleted:"recurring_invoice.permanently_deleted",recurring_invoicepaused:"recurring_invoice.paused",recurring_invoiceresumed:"recurring_invoice.resumed",recurring_invoiceinvoice_generated:"recurring_invoice.invoice_generated",recurring_invoicegeneration_failed:"recurring_invoice.generation_failed",recurring_invoicecompleted:"recurring_invoice.completed",stripe_appconnected:"stripe_app.connected",stripe_appdisconnected:"stripe_app.disconnected",stripe_appsettings_updated:"stripe_app.settings_updated",ordercreated:"order.created",orderupdated:"order.updated",orderdeleted:"order.deleted",orderrestored:"order.restored",orderpermanently_deleted:"order.permanently_deleted",orderprocessed:"order.processed",ordercancelled:"order.cancelled",orderfailed:"order.failed",order_integrationcreated:"order_integration.created",order_integrationupdated:"order_integration.updated",order_integrationdeleted:"order_integration.deleted",delivery_notecreated:"delivery_note.created",delivery_notesent:"delivery_note.sent",delivery_notecancelled:"delivery_note.cancelled",delivery_notevoided:"delivery_note.voided",delivery_notedeleted:"delivery_note.deleted",delivery_noterestored:"delivery_note.restored",e_invoicingsubmissioncreated:"e_invoicing.submission.created",e_invoicingsubmissiondelivered:"e_invoicing.submission.delivered",e_invoicingsubmissionfailed:"e_invoicing.submission.failed",e_invoicingsupplieronboarded:"e_invoicing.supplier.onboarded",e_invoicingsupplierrejected:"e_invoicing.supplier.rejected"};var i1e={invoicecreated:"invoice.created",invoiceupdated:"invoice.updated",invoicesent:"invoice.sent",invoicepaid:"invoice.paid",invoiceoverdue:"invoice.overdue",invoicecancelled:"invoice.cancelled",invoicedeleted:"invoice.deleted",invoicerestored:"invoice.restored",invoicevoided:"invoice.voided",invoicefinalized:"invoice.finalized",customercreated:"customer.created",customerupdated:"customer.updated",customerdeleted:"customer.deleted",customerrestored:"customer.restored",customerpermanently_deleted:"customer.permanently_deleted",paymentreceived:"payment.received",paymentfailed:"payment.failed",paymentdeleted:"payment.deleted",paymentrestored:"payment.restored",paymentpermanently_deleted:"payment.permanently_deleted",estimatecreated:"estimate.created",estimatesent:"estimate.sent",estimateaccepted:"estimate.accepted",estimaterejected:"estimate.rejected",estimatedeleted:"estimate.deleted",estimaterestored:"estimate.restored",credit_notecreated:"credit_note.created",credit_noteissued:"credit_note.issued",credit_notevoided:"credit_note.voided",credit_notedeleted:"credit_note.deleted",credit_noterestored:"credit_note.restored",advance_invoicecreated:"advance_invoice.created",advance_invoicepaid:"advance_invoice.paid",advance_invoiceapplied:"advance_invoice.applied",advance_invoicevoided:"advance_invoice.voided",advance_invoicedeleted:"advance_invoice.deleted",advance_invoicerestored:"advance_invoice.restored",itemcreated:"item.created",itemupdated:"item.updated",itemdeleted:"item.deleted",itemrestored:"item.restored",itempermanently_deleted:"item.permanently_deleted",taxcreated:"tax.created",taxupdated:"tax.updated",taxdeleted:"tax.deleted",taxrestored:"tax.restored",taxpermanently_deleted:"tax.permanently_deleted",recurring_invoicecreated:"recurring_invoice.created",recurring_invoiceupdated:"recurring_invoice.updated",recurring_invoicedeleted:"recurring_invoice.deleted",recurring_invoicerestored:"recurring_invoice.restored",recurring_invoicepermanently_deleted:"recurring_invoice.permanently_deleted",recurring_invoicepaused:"recurring_invoice.paused",recurring_invoiceresumed:"recurring_invoice.resumed",recurring_invoiceinvoice_generated:"recurring_invoice.invoice_generated",recurring_invoicegeneration_failed:"recurring_invoice.generation_failed",recurring_invoicecompleted:"recurring_invoice.completed",stripe_appconnected:"stripe_app.connected",stripe_appdisconnected:"stripe_app.disconnected",stripe_appsettings_updated:"stripe_app.settings_updated",ordercreated:"order.created",orderupdated:"order.updated",orderdeleted:"order.deleted",orderrestored:"order.restored",orderpermanently_deleted:"order.permanently_deleted",orderprocessed:"order.processed",ordercancelled:"order.cancelled",orderfailed:"order.failed",order_integrationcreated:"order_integration.created",order_integrationupdated:"order_integration.updated",order_integrationdeleted:"order_integration.deleted",delivery_notecreated:"delivery_note.created",delivery_notesent:"delivery_note.sent",delivery_notecancelled:"delivery_note.cancelled",delivery_notevoided:"delivery_note.voided",delivery_notedeleted:"delivery_note.deleted",delivery_noterestored:"delivery_note.restored",e_invoicingsubmissioncreated:"e_invoicing.submission.created",e_invoicingsubmissiondelivered:"e_invoicing.submission.delivered",e_invoicingsubmissionfailed:"e_invoicing.submission.failed",e_invoicingsupplieronboarded:"e_invoicing.supplier.onboarded",e_invoicingsupplierrejected:"e_invoicing.supplier.rejected"};var Jde={};j(Jde,{accountWebhooks:()=>me,activities:()=>ge,advanceInvoices:()=>ye,companyRegistry:()=>he,creditNotes:()=>be,customers:()=>xe,deliveryNotes:()=>ze,documents:()=>_e,eInvoicing:()=>ve,email:()=>fe,entities:()=>Re,entityApiKeys:()=>Ie,entityInvitations:()=>Ee,entityStats:()=>Se,entityUsers:()=>De,estimates:()=>Pe,exports:()=>we,files:()=>Ce,finaCertificate:()=>Ae,finaDevices:()=>Me,finaPremises:()=>Te,finaSettings:()=>ke,fursCertificate:()=>Be,fursDevices:()=>Ne,fursInternalAct:()=>Oe,fursPremises:()=>Fe,fursSettings:()=>Ue,incomingPurchaseDocuments:()=>je,invoices:()=>qe,items:()=>We,legacyMigration:()=>Ge,orderIntegrations:()=>Ve,orders:()=>Le,payments:()=>He,ptAtcudSeries:()=>Ye,ptSafT:()=>Ke,recurringInvoices:()=>$e,stripeApp:()=>Qe,suppliers:()=>Je,taxReports:()=>Ze,taxes:()=>Xe,transactionType:()=>et,upload:()=>tt,users:()=>ot,vies:()=>nt,webhooks:()=>st,whiteLabelSubscriptions:()=>rt,whiteLabels:()=>it});var me={};j(me,{CreateAccountWebhookBody:()=>age,CreateAccountWebhookHeader:()=>ige,DeleteAccountWebhookHeader:()=>zge,DeleteAccountWebhookParams:()=>xge,DeleteAccountWebhookResponse:()=>_ge,GetAccountWebhookByIdHeader:()=>pge,GetAccountWebhookByIdParams:()=>uge,GetAccountWebhookByIdResponse:()=>mge,GetAccountWebhookDeliveriesHeader:()=>Sge,GetAccountWebhookDeliveriesParams:()=>Ige,GetAccountWebhookDeliveriesQueryParams:()=>Ege,GetAccountWebhookDeliveriesResponse:()=>Dge,GetAccountWebhooksHeader:()=>cge,GetAccountWebhooksQueryParams:()=>dge,GetAccountWebhooksResponse:()=>lge,RotateAccountWebhookSecretHeader:()=>wge,RotateAccountWebhookSecretParams:()=>Pge,RotateAccountWebhookSecretResponse:()=>Cge,TestAccountWebhookHeader:()=>fge,TestAccountWebhookParams:()=>vge,TestAccountWebhookResponse:()=>Rge,UpdateAccountWebhookBody:()=>hge,UpdateAccountWebhookHeader:()=>yge,UpdateAccountWebhookParams:()=>gge,UpdateAccountWebhookResponse:()=>bge,createAccountWebhookBodyActiveDefault:()=>po,createAccountWebhookBodyDescriptionMax:()=>uo,createAccountWebhookBodyUrlMax:()=>lo,createAccountWebhookHeaderXAccountIdRegExp:()=>co,deleteAccountWebhookHeaderXAccountIdRegExp:()=>Fo,deleteAccountWebhookPathIdRegExp:()=>Oo,getAccountWebhookByIdHeaderXAccountIdRegExp:()=>fo,getAccountWebhookByIdPathIdRegExp:()=>vo,getAccountWebhookByIdResponseAccountIdMax:()=>Io,getAccountWebhookByIdResponseDescriptionMax:()=>So,getAccountWebhookByIdResponseIdMax:()=>Ro,getAccountWebhookByIdResponseMetadataDefault:()=>Do,getAccountWebhookByIdResponseUrlMax:()=>Eo,getAccountWebhookDeliveriesHeaderXAccountIdRegExp:()=>rn,getAccountWebhookDeliveriesPathIdRegExp:()=>on,getAccountWebhookDeliveriesQueryLimitDefault:()=>nn,getAccountWebhookDeliveriesQueryLimitMax:()=>sn,getAccountWebhookDeliveriesResponseDataItemAccountIdMax:()=>cn,getAccountWebhookDeliveriesResponseDataItemAccountWebhookIdMax:()=>dn,getAccountWebhookDeliveriesResponseDataItemAttemptMax:()=>bn,getAccountWebhookDeliveriesResponseDataItemAttemptMin:()=>hn,getAccountWebhookDeliveriesResponseDataItemDurationMsMax:()=>vn,getAccountWebhookDeliveriesResponseDataItemDurationMsMin:()=>_n,getAccountWebhookDeliveriesResponseDataItemEntityIdMax:()=>ln,getAccountWebhookDeliveriesResponseDataItemErrorMessageMax:()=>yn,getAccountWebhookDeliveriesResponseDataItemEventTypeMax:()=>un,getAccountWebhookDeliveriesResponseDataItemIdMax:()=>an,getAccountWebhookDeliveriesResponseDataItemMaxAttemptsMax:()=>zn,getAccountWebhookDeliveriesResponseDataItemMaxAttemptsMin:()=>xn,getAccountWebhookDeliveriesResponseDataItemResponseBodyMax:()=>gn,getAccountWebhookDeliveriesResponseDataItemResponseStatusMax:()=>mn,getAccountWebhookDeliveriesResponseDataItemResponseStatusMin:()=>pn,getAccountWebhooksHeaderXAccountIdRegExp:()=>yo,getAccountWebhooksQueryLimitDefault:()=>mo,getAccountWebhooksQueryLimitMax:()=>go,getAccountWebhooksResponseDataItemAccountIdMax:()=>bo,getAccountWebhooksResponseDataItemDescriptionMax:()=>zo,getAccountWebhooksResponseDataItemIdMax:()=>ho,getAccountWebhooksResponseDataItemMetadataDefault:()=>_o,getAccountWebhooksResponseDataItemUrlMax:()=>xo,rotateAccountWebhookSecretHeaderXAccountIdRegExp:()=>Rn,rotateAccountWebhookSecretPathIdRegExp:()=>fn,rotateAccountWebhookSecretResponseAccountIdMax:()=>En,rotateAccountWebhookSecretResponseDescriptionMax:()=>Dn,rotateAccountWebhookSecretResponseIdMax:()=>In,rotateAccountWebhookSecretResponseMetadataDefault:()=>wn,rotateAccountWebhookSecretResponseSecretMax:()=>Pn,rotateAccountWebhookSecretResponseUrlMax:()=>Sn,testAccountWebhookHeaderXAccountIdRegExp:()=>jo,testAccountWebhookPathIdRegExp:()=>Uo,testAccountWebhookResponseAccountIdMax:()=>Go,testAccountWebhookResponseAccountWebhookIdMax:()=>Wo,testAccountWebhookResponseAttemptMax:()=>Jo,testAccountWebhookResponseAttemptMin:()=>Qo,testAccountWebhookResponseDurationMsMax:()=>tn,testAccountWebhookResponseDurationMsMin:()=>en,testAccountWebhookResponseEntityIdMax:()=>Vo,testAccountWebhookResponseErrorMessageMax:()=>$o,testAccountWebhookResponseEventTypeMax:()=>Lo,testAccountWebhookResponseIdMax:()=>qo,testAccountWebhookResponseMaxAttemptsMax:()=>Xo,testAccountWebhookResponseMaxAttemptsMin:()=>Zo,testAccountWebhookResponseResponseBodyMax:()=>Ko,testAccountWebhookResponseResponseStatusMax:()=>Yo,testAccountWebhookResponseResponseStatusMin:()=>Ho,updateAccountWebhookBodyDescriptionMax:()=>Ao,updateAccountWebhookBodyUrlMax:()=>Co,updateAccountWebhookHeaderXAccountIdRegExp:()=>wo,updateAccountWebhookPathIdRegExp:()=>Po,updateAccountWebhookResponseAccountIdMax:()=>To,updateAccountWebhookResponseDescriptionMax:()=>Bo,updateAccountWebhookResponseIdMax:()=>Mo,updateAccountWebhookResponseMetadataDefault:()=>No,updateAccountWebhookResponseUrlMax:()=>ko});var co=/^acc_[0-9a-fA-F]{24}$/,ige=e.object({"x-account-id":e.string().regex(co).optional().describe("Account Id on which the request is made. Optional if user is part of only one account.")}),lo=2048,uo=500,po=true,age=e.object({url:e.url().max(lo).describe("The HTTPS URL to send account-scoped webhook events to."),description:e.string().max(uo).nullish().describe("Optional description for this webhook"),events:e.array(e.enum(["white_label_subscription.subscribed","white_label_subscription.upgraded","white_label_subscription.downgrade_scheduled","white_label_subscription.downgraded","white_label_subscription.cancellation_scheduled","white_label_subscription.cancelled","white_label_subscription.renewed","white_label_subscription.expired","white_label_subscription.payment_failed"])).min(1).describe("Events that trigger this account webhook"),active:e.boolean().default(po).describe("Whether webhook is active"),metadata:e.record(e.string(),e.string()).nullish().describe("Custom key-value data for your own use. Store any JSON object up to 50 properties. Values must be strings up to 250 characters. Useful for storing external IDs, tags, or integration data.")}),mo=10,go=100,dge=e.object({limit:e.number().min(1).max(go).default(mo).describe("Number of results per request."),next_cursor:e.string().optional().describe("Opaque cursor to fetch the next page of results. Reuse only with the same effective ordering. Use the value from pagination.next_cursor in the previous response."),prev_cursor:e.string().optional().describe("Opaque cursor to fetch the previous page of results. Reuse only with the same effective ordering. Use the value from pagination.prev_cursor in the previous response."),include_total_count:e.boolean().optional().describe("Whether to include the total count of items in `pagination.total`.\nDefault is `true`.\nWhen `false`, `pagination.total` returns -1 for better performance.")}),yo=/^acc_[0-9a-fA-F]{24}$/,cge=e.object({"x-account-id":e.string().regex(yo).optional().describe("Account Id on which the request is made. Optional if user is part of only one account.")}),ho=36,bo=36,xo=2048,zo=500,_o={},lge=e.object({data:e.array(e.object({id:e.string().max(ho),account_id:e.string().max(bo),url:e.string().max(xo),description:e.string().max(zo).nullish(),events:e.array(e.enum(["white_label_subscription.subscribed","white_label_subscription.upgraded","white_label_subscription.downgrade_scheduled","white_label_subscription.downgraded","white_label_subscription.cancellation_scheduled","white_label_subscription.cancelled","white_label_subscription.renewed","white_label_subscription.expired","white_label_subscription.payment_failed"])),active:e.boolean(),metadata:e.record(e.string(),e.string()).default(_o),created_at:e.iso.datetime({}),updated_at:e.iso.datetime({}),secret:e.string().describe("Masked secret (only shown on create and rotate)")}).describe("Account webhook endpoint (secret masked)")),pagination:e.object({total:e.number().describe("Total number of items available in the collection"),next_cursor:e.string().nullable().describe("Opaque cursor for fetching the next page. It encodes the resolved sort tuple for the current result set, so reuse it only with the same effective ordering. Null if no more results are available."),prev_cursor:e.string().nullable().describe("Opaque cursor for fetching the previous page. It encodes the resolved sort tuple for the current result set, so reuse it only with the same effective ordering. Null if at the first page."),has_more:e.boolean().describe("Indicates whether more results are available after the current page")}).describe("Pagination metadata including cursors and result counts")}),vo=/^[a-z]{3,4}_[0-9a-f]{24}$/,uge=e.object({id:e.stringFormat("resource-id",vo).describe("Unique resource identifier")}),fo=/^acc_[0-9a-fA-F]{24}$/,pge=e.object({"x-account-id":e.string().regex(fo).optional().describe("Account Id on which the request is made. Optional if user is part of only one account.")}),Ro=36,Io=36,Eo=2048,So=500,Do={},mge=e.object({id:e.string().max(Ro),account_id:e.string().max(Io),url:e.string().max(Eo),description:e.string().max(So).nullish(),events:e.array(e.enum(["white_label_subscription.subscribed","white_label_subscription.upgraded","white_label_subscription.downgrade_scheduled","white_label_subscription.downgraded","white_label_subscription.cancellation_scheduled","white_label_subscription.cancelled","white_label_subscription.renewed","white_label_subscription.expired","white_label_subscription.payment_failed"])),active:e.boolean(),metadata:e.record(e.string(),e.string()).default(Do),created_at:e.iso.datetime({}),updated_at:e.iso.datetime({}),secret:e.string().describe("Masked secret (only shown on create and rotate)")}).describe("Account webhook endpoint (secret masked)"),Po=/^[a-z]{3,4}_[0-9a-f]{24}$/,gge=e.object({id:e.stringFormat("resource-id",Po).describe("Unique resource identifier")}),wo=/^acc_[0-9a-fA-F]{24}$/,yge=e.object({"x-account-id":e.string().regex(wo).optional().describe("Account Id on which the request is made. Optional if user is part of only one account.")}),Co=2048,Ao=500,hge=e.object({url:e.url().max(Co).optional().describe("The HTTPS URL to send account-scoped webhook events to."),description:e.string().max(Ao).nullish(),events:e.array(e.enum(["white_label_subscription.subscribed","white_label_subscription.upgraded","white_label_subscription.downgrade_scheduled","white_label_subscription.downgraded","white_label_subscription.cancellation_scheduled","white_label_subscription.cancelled","white_label_subscription.renewed","white_label_subscription.expired","white_label_subscription.payment_failed"])).min(1).optional(),active:e.boolean().optional(),metadata:e.record(e.string(),e.string()).nullish().describe("Custom key-value data for your own use. Store any JSON object up to 50 properties. Values must be strings up to 250 characters. Useful for storing external IDs, tags, or integration data.")}),Mo=36,To=36,ko=2048,Bo=500,No={},bge=e.object({id:e.string().max(Mo),account_id:e.string().max(To),url:e.string().max(ko),description:e.string().max(Bo).nullish(),events:e.array(e.enum(["white_label_subscription.subscribed","white_label_subscription.upgraded","white_label_subscription.downgrade_scheduled","white_label_subscription.downgraded","white_label_subscription.cancellation_scheduled","white_label_subscription.cancelled","white_label_subscription.renewed","white_label_subscription.expired","white_label_subscription.payment_failed"])),active:e.boolean(),metadata:e.record(e.string(),e.string()).default(No),created_at:e.iso.datetime({}),updated_at:e.iso.datetime({}),secret:e.string().describe("Masked secret (only shown on create and rotate)")}).describe("Account webhook endpoint (secret masked)"),Oo=/^[a-z]{3,4}_[0-9a-f]{24}$/,xge=e.object({id:e.stringFormat("resource-id",Oo).describe("Unique resource identifier")}),Fo=/^acc_[0-9a-fA-F]{24}$/,zge=e.object({"x-account-id":e.string().regex(Fo).optional().describe("Account Id on which the request is made. Optional if user is part of only one account.")}),_ge=e.object({success:e.boolean()}),Uo=/^[a-z]{3,4}_[0-9a-f]{24}$/,vge=e.object({id:e.stringFormat("resource-id",Uo).describe("Unique resource identifier")}),jo=/^acc_[0-9a-fA-F]{24}$/,fge=e.object({"x-account-id":e.string().regex(jo).optional().describe("Account Id on which the request is made. Optional if user is part of only one account.")}),qo=36,Wo=36,Go=36,Vo=36,Lo=100,Ho=-2147483648,Yo=2147483647,Ko=1e4,$o=2e3,Qo=-2147483648,Jo=2147483647,Zo=-2147483648,Xo=2147483647,en=-2147483648,tn=2147483647,Rge=e.object({id:e.string().max(qo),account_webhook_id:e.string().max(Wo),account_id:e.string().max(Go),entity_id:e.string().max(Vo).nullish(),event_type:e.string().max(Lo),status:e.enum(["pending","success","failed"]),request_body:e.record(e.string(),e.unknown()),response_status:e.number().min(Ho).max(Yo).nullish(),response_body:e.string().max(Ko).nullish(),error_message:e.string().max($o).nullish(),attempt:e.number().min(Qo).max(Jo),max_attempts:e.number().min(Zo).max(Xo),next_retry_at:e.iso.datetime({}).nullish(),duration_ms:e.number().min(en).max(tn).nullish(),created_at:e.iso.datetime({}),completed_at:e.iso.datetime({}).nullish()}).describe("Account webhook delivery attempt record"),on=/^[a-z]{3,4}_[0-9a-f]{24}$/,Ige=e.object({id:e.stringFormat("resource-id",on).describe("Unique resource identifier")}),nn=10,sn=100,Ege=e.object({limit:e.number().min(1).max(sn).default(nn).describe("Number of results per request."),next_cursor:e.string().optional().describe("Opaque cursor to fetch the next page of results. Reuse only with the same effective ordering. Use the value from pagination.next_cursor in the previous response."),prev_cursor:e.string().optional().describe("Opaque cursor to fetch the previous page of results. Reuse only with the same effective ordering. Use the value from pagination.prev_cursor in the previous response."),include_total_count:e.boolean().optional().describe("Whether to include the total count of items in `pagination.total`.\nDefault is `true`.\nWhen `false`, `pagination.total` returns -1 for better performance.")}),rn=/^acc_[0-9a-fA-F]{24}$/,Sge=e.object({"x-account-id":e.string().regex(rn).optional().describe("Account Id on which the request is made. Optional if user is part of only one account.")}),an=36,dn=36,cn=36,ln=36,un=100,pn=-2147483648,mn=2147483647,gn=1e4,yn=2e3,hn=-2147483648,bn=2147483647,xn=-2147483648,zn=2147483647,_n=-2147483648,vn=2147483647,Dge=e.object({data:e.array(e.object({id:e.string().max(an),account_webhook_id:e.string().max(dn),account_id:e.string().max(cn),entity_id:e.string().max(ln).nullish(),event_type:e.string().max(un),status:e.enum(["pending","success","failed"]),request_body:e.record(e.string(),e.unknown()),response_status:e.number().min(pn).max(mn).nullish(),response_body:e.string().max(gn).nullish(),error_message:e.string().max(yn).nullish(),attempt:e.number().min(hn).max(bn),max_attempts:e.number().min(xn).max(zn),next_retry_at:e.iso.datetime({}).nullish(),duration_ms:e.number().min(_n).max(vn).nullish(),created_at:e.iso.datetime({}),completed_at:e.iso.datetime({}).nullish()}).describe("Account webhook delivery attempt record")),pagination:e.object({total:e.number().describe("Total number of items available in the collection"),next_cursor:e.string().nullable().describe("Opaque cursor for fetching the next page. It encodes the resolved sort tuple for the current result set, so reuse it only with the same effective ordering. Null if no more results are available."),prev_cursor:e.string().nullable().describe("Opaque cursor for fetching the previous page. It encodes the resolved sort tuple for the current result set, so reuse it only with the same effective ordering. Null if at the first page."),has_more:e.boolean().describe("Indicates whether more results are available after the current page")}).describe("Pagination metadata including cursors and result counts")}),fn=/^[a-z]{3,4}_[0-9a-f]{24}$/,Pge=e.object({id:e.stringFormat("resource-id",fn).describe("Unique resource identifier")}),Rn=/^acc_[0-9a-fA-F]{24}$/,wge=e.object({"x-account-id":e.string().regex(Rn).optional().describe("Account Id on which the request is made. Optional if user is part of only one account.")}),In=36,En=36,Sn=2048,Dn=500,Pn=64,wn={},Cge=e.object({id:e.string().max(In),account_id:e.string().max(En),url:e.string().max(Sn),description:e.string().max(Dn).nullish(),secret:e.string().max(Pn),events:e.array(e.enum(["white_label_subscription.subscribed","white_label_subscription.upgraded","white_label_subscription.downgrade_scheduled","white_label_subscription.downgraded","white_label_subscription.cancellation_scheduled","white_label_subscription.cancelled","white_label_subscription.renewed","white_label_subscription.expired","white_label_subscription.payment_failed"])),active:e.boolean(),metadata:e.record(e.string(),e.string()).default(wn),created_at:e.iso.datetime({}),updated_at:e.iso.datetime({})}).describe("Account webhook endpoint with full secret visible");var ge={};j(ge,{GetActivitiesHeader:()=>Mge,GetActivitiesQueryParams:()=>Age,GetActivitiesResponse:()=>Tge,getActivitiesQueryLimitDefault:()=>Cn,getActivitiesQueryLimitMax:()=>An});var Cn=10,An=100,Age=e.object({limit:e.number().min(1).max(An).default(Cn).describe("Number of results per request."),next_cursor:e.string().optional().describe("Opaque cursor to fetch the next page of results. Reuse only with the same effective ordering. Use the value from pagination.next_cursor in the previous response."),prev_cursor:e.string().optional().describe("Opaque cursor to fetch the previous page of results. Reuse only with the same effective ordering. Use the value from pagination.prev_cursor in the previous response."),include_total_count:e.boolean().optional().describe("Whether to include the total count of items in `pagination.total`.\nDefault is `true`.\nWhen `false`, `pagination.total` returns -1 for better performance."),order_by:e.union([e.enum(["id","created_at","resource_type","action","-id","-created_at","-resource_type","-action"]),e.array(e.enum(["id","created_at","resource_type","action","-id","-created_at","-resource_type","-action"]))]).optional().describe("Sort by one field or provide a repeated array for multi-column ordering. Prefix a field with `-` for descending order. When paginating, reuse cursors only with the same effective ordering."),query:e.string().optional().describe('JSON query object for filtering results. Supports MongoDB-style operators.\n\n**Supported operators:**\n- `equals` or direct value - Exact match (default)\n- `gte` - Greater than or equal\n- `lte` - Less than or equal\n- `gt` - Greater than\n- `lt` - Less than\n- `in` - Value in array\n- `notIn` - Value not in array\n- `contains` - String contains (case-insensitive)\n- `startsWith` - String starts with\n- `endsWith` - String ends with\n- `between` - Value between two numbers/dates [min, max]\n\n**Allowed fields:** id, resource_type, resource_id, action, actor_type, created_at\n\n**Examples:**\n- `{"total": {"gte": 1000}}` - Invoices over 1000\n- `{"customer.name": {"contains": "Acme"}}` - Customer name contains "Acme"\n- `{"date": {"between": ["2025-01-01", "2025-12-31"]}}` - Date range'),resource_type:e.string().optional().describe("Filter by resource type (e.g., Invoice, Customer, Payment)"),resource_id:e.string().optional().describe("Filter by specific resource ID"),action:e.string().optional().describe("Filter by action type (e.g., created, updated, deleted, sent)")}),Mge=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),Tge=e.object({data:e.array(e.object({id:e.string().describe("Unique activity identifier"),entity_id:e.string().describe("Entity that owns this activity"),resource_type:e.string().describe("Type of resource (e.g., Invoice, Customer, Payment)"),resource_id:e.string().describe("ID of the resource"),action:e.string().describe("Action performed (e.g., created, updated, deleted, voided, sent)"),actor_type:e.enum(["user","api_key","system","cron","webhook"]).describe("Who/what triggered the activity"),actor_id:e.string().nullable().describe("User ID if actor_type is 'user'"),actor_label:e.string().nullable().describe("Display label (e.g., user email, 'Scheduled sync')"),details:e.record(e.string(),e.unknown()).nullable().describe("Additional context about the activity"),created_at:e.iso.datetime({}).describe("When the activity occurred")})),pagination:e.object({total:e.number().describe("Total number of items available in the collection"),next_cursor:e.string().nullable().describe("Opaque cursor for fetching the next page. It encodes the resolved sort tuple for the current result set, so reuse it only with the same effective ordering. Null if no more results are available."),prev_cursor:e.string().nullable().describe("Opaque cursor for fetching the previous page. It encodes the resolved sort tuple for the current result set, so reuse it only with the same effective ordering. Null if at the first page."),has_more:e.boolean().describe("Indicates whether more results are available after the current page")}).describe("Pagination metadata including cursors and result counts")});var ye={};j(ye,{CreateAdvanceInvoiceBody:()=>qge,CreateAdvanceInvoiceHeader:()=>jge,CreateCustomAdvanceInvoiceBody:()=>Hge,CreateCustomAdvanceInvoiceHeader:()=>Lge,GetAdvanceInvoiceByIdHeader:()=>$ge,GetAdvanceInvoiceByIdParams:()=>Yge,GetAdvanceInvoiceByIdQueryParams:()=>Kge,GetAdvanceInvoiceByIdResponse:()=>Qge,GetAdvanceInvoiceVersionHeader:()=>rye,GetAdvanceInvoiceVersionParams:()=>sye,GetAdvanceInvoiceVersionResponse:()=>iye,GetAdvanceInvoiceVersionsHeader:()=>oye,GetAdvanceInvoiceVersionsParams:()=>tye,GetAdvanceInvoiceVersionsResponse:()=>nye,GetAdvanceInvoicesHeader:()=>Gge,GetAdvanceInvoicesQueryParams:()=>Wge,GetAdvanceInvoicesResponse:()=>Vge,GetShareableAdvanceInvoiceHtmlParams:()=>Nge,GetShareableAdvanceInvoiceHtmlQueryParams:()=>Oge,GetShareableAdvanceInvoiceParams:()=>kge,GetShareableAdvanceInvoicePdfParams:()=>Fge,GetShareableAdvanceInvoicePdfQueryParams:()=>Uge,GetShareableAdvanceInvoiceResponse:()=>Bge,RenderAdvanceInvoicePreviewBody:()=>cye,RenderAdvanceInvoicePreviewHeader:()=>dye,RenderAdvanceInvoicePreviewQueryParams:()=>aye,UpdateAdvanceInvoiceBody:()=>Xge,UpdateAdvanceInvoiceHeader:()=>Zge,UpdateAdvanceInvoiceParams:()=>Jge,UpdateAdvanceInvoiceResponse:()=>eye,VoidAdvanceInvoiceBody:()=>pye,VoidAdvanceInvoiceHeader:()=>uye,VoidAdvanceInvoiceParams:()=>lye,VoidAdvanceInvoiceResponse:()=>mye,createAdvanceInvoiceBodyCurrencyCodeMax:()=>Cs,createAdvanceInvoiceBodyCustomerOneBankAccountTypeDefault:()=>Ps,createAdvanceInvoiceBodyCustomerOneCountryCodeMax:()=>Ds,createAdvanceInvoiceBodyCustomerOneCountryCodeMin:()=>Ss,createAdvanceInvoiceBodyDateDueRegExp:()=>Ms,createAdvanceInvoiceBodyDateRegExp:()=>fs,createAdvanceInvoiceBodyDateServiceRegExp:()=>Ts,createAdvanceInvoiceBodyDateServiceToRegExp:()=>ks,createAdvanceInvoiceBodyExpectedTotalWithTaxExclusiveMin:()=>Js,createAdvanceInvoiceBodyFinaBusinessPremiseNameMax:()=>Ls,createAdvanceInvoiceBodyFinaBusinessPremiseNameRegExp:()=>Hs,createAdvanceInvoiceBodyFinaElectronicDeviceNameMax:()=>Ys,createAdvanceInvoiceBodyFinaElectronicDeviceNameRegExp:()=>Ks,createAdvanceInvoiceBodyFinaOperatorOibMax:()=>Qs,createAdvanceInvoiceBodyFinaOperatorOibMin:()=>$s,createAdvanceInvoiceBodyFooterMax:()=>ws,createAdvanceInvoiceBodyIssuerBankAccountTypeDefault:()=>Es,createAdvanceInvoiceBodyIssuerCountryCodeMax:()=>Is,createAdvanceInvoiceBodyIssuerCountryCodeMin:()=>Rs,createAdvanceInvoiceBodyItemsItemDescriptionMax:()=>Bs,createAdvanceInvoiceBodyItemsItemDiscountsItemTypeDefault:()=>js,createAdvanceInvoiceBodyItemsItemDiscountsItemValueMin:()=>Us,createAdvanceInvoiceBodyItemsItemDiscountsMax:()=>qs,createAdvanceInvoiceBodyItemsItemQuantityMax:()=>Os,createAdvanceInvoiceBodyItemsItemQuantityMin:()=>Ns,createAdvanceInvoiceBodyItemsItemUnitMax:()=>Fs,createAdvanceInvoiceBodyPaymentsItemAmountExclusiveMin:()=>Vs,createAdvanceInvoiceBodyPaymentsItemAppliedToIncomingPurchaseDocumentIdMax:()=>Gs,createAdvanceInvoiceBodyPaymentsItemIncomingPurchaseDocumentIdMax:()=>Ws,createAdvanceInvoiceBodyPtManualSeriesCodeMax:()=>As,createCustomAdvanceInvoiceBodyCustomerOneBankAccountTypeDefault:()=>$r,createCustomAdvanceInvoiceBodyCustomerOneCountryCodeMax:()=>Kr,createCustomAdvanceInvoiceBodyCustomerOneCountryCodeMin:()=>Yr,createCustomAdvanceInvoiceBodyDateDueRegExp:()=>Qr,createCustomAdvanceInvoiceBodyDateServiceRegExp:()=>Jr,createCustomAdvanceInvoiceBodyDateServiceToRegExp:()=>Zr,createCustomAdvanceInvoiceBodyFinaBusinessPremiseNameMax:()=>ai,createCustomAdvanceInvoiceBodyFinaBusinessPremiseNameRegExp:()=>di,createCustomAdvanceInvoiceBodyFinaElectronicDeviceNameMax:()=>ci,createCustomAdvanceInvoiceBodyFinaElectronicDeviceNameRegExp:()=>li,createCustomAdvanceInvoiceBodyFinaOperatorOibMax:()=>pi,createCustomAdvanceInvoiceBodyFinaOperatorOibMin:()=>ui,createCustomAdvanceInvoiceBodyIssuerOneBankAccountTypeDefault:()=>Hr,createCustomAdvanceInvoiceBodyIssuerOneCountryCodeMax:()=>Lr,createCustomAdvanceInvoiceBodyIssuerOneCountryCodeMin:()=>Vr,createCustomAdvanceInvoiceBodyItemsItemDescriptionMax:()=>Xr,createCustomAdvanceInvoiceBodyItemsItemDiscountsItemTypeDefault:()=>oi,createCustomAdvanceInvoiceBodyItemsItemDiscountsItemValueMin:()=>ti,createCustomAdvanceInvoiceBodyItemsItemDiscountsMax:()=>ni,createCustomAdvanceInvoiceBodyItemsItemUnitMax:()=>ei,createCustomAdvanceInvoiceBodyPaymentsItemAmountExclusiveMin:()=>ii,createCustomAdvanceInvoiceBodyPaymentsItemAppliedToIncomingPurchaseDocumentIdMax:()=>ri,createCustomAdvanceInvoiceBodyPaymentsItemIncomingPurchaseDocumentIdMax:()=>si,getAdvanceInvoiceByIdPathIdRegExp:()=>mi,getAdvanceInvoiceByIdResponseCurrencyCodeMax:()=>Pi,getAdvanceInvoiceByIdResponseCustomerBankAccountTypeDefault:()=>fi,getAdvanceInvoiceByIdResponseCustomerCountryCodeMax:()=>vi,getAdvanceInvoiceByIdResponseCustomerCountryCodeMin:()=>_i,getAdvanceInvoiceByIdResponseCustomerIdMax:()=>zi,getAdvanceInvoiceByIdResponseDateDueRegExp:()=>Wi,getAdvanceInvoiceByIdResponseDateServiceRegExp:()=>Gi,getAdvanceInvoiceByIdResponseDateServiceToRegExp:()=>Vi,getAdvanceInvoiceByIdResponseDateYearMax:()=>Ai,getAdvanceInvoiceByIdResponseDateYearMin:()=>Ci,getAdvanceInvoiceByIdResponseEntityIdMax:()=>wi,getAdvanceInvoiceByIdResponseFooterMax:()=>Ri,getAdvanceInvoiceByIdResponseFursDataIterationDefault:()=>qi,getAdvanceInvoiceByIdResponseIdMax:()=>gi,getAdvanceInvoiceByIdResponseIssuerBankAccountTypeDefault:()=>xi,getAdvanceInvoiceByIdResponseIssuerCountryCodeMax:()=>bi,getAdvanceInvoiceByIdResponseIssuerCountryCodeMin:()=>hi,getAdvanceInvoiceByIdResponseItemsItemAdvanceInvoiceIdMax:()=>ta,getAdvanceInvoiceByIdResponseItemsItemDeliveryNoteIdMax:()=>oa,getAdvanceInvoiceByIdResponseItemsItemDiscountsItemTypeDefault:()=>$i,getAdvanceInvoiceByIdResponseItemsItemDiscountsItemValueMin:()=>Ki,getAdvanceInvoiceByIdResponseItemsItemDiscountsMax:()=>Qi,getAdvanceInvoiceByIdResponseItemsItemIdMax:()=>Li,getAdvanceInvoiceByIdResponseItemsItemItemIdMax:()=>na,getAdvanceInvoiceByIdResponseItemsItemNameMax:()=>Hi,getAdvanceInvoiceByIdResponseItemsItemTotalConvertedMax:()=>Zi,getAdvanceInvoiceByIdResponseItemsItemTotalConvertedMin:()=>Ji,getAdvanceInvoiceByIdResponseItemsItemTotalWithTaxConvertedMax:()=>ea,getAdvanceInvoiceByIdResponseItemsItemTotalWithTaxConvertedMin:()=>Xi,getAdvanceInvoiceByIdResponseItemsItemUnitMax:()=>Yi,getAdvanceInvoiceByIdResponseNumberMax:()=>yi,getAdvanceInvoiceByIdResponseShareableIdMax:()=>Mi,getAdvanceInvoiceByIdResponseTotalConvertedMax:()=>ki,getAdvanceInvoiceByIdResponseTotalConvertedMin:()=>Ti,getAdvanceInvoiceByIdResponseTotalDueMax:()=>ji,getAdvanceInvoiceByIdResponseTotalDueMin:()=>Ui,getAdvanceInvoiceByIdResponseTotalMax:()=>Ei,getAdvanceInvoiceByIdResponseTotalMin:()=>Ii,getAdvanceInvoiceByIdResponseTotalPaidMax:()=>Fi,getAdvanceInvoiceByIdResponseTotalPaidMin:()=>Oi,getAdvanceInvoiceByIdResponseTotalWithTaxConvertedMax:()=>Ni,getAdvanceInvoiceByIdResponseTotalWithTaxConvertedMin:()=>Bi,getAdvanceInvoiceByIdResponseTotalWithTaxMax:()=>Di,getAdvanceInvoiceByIdResponseTotalWithTaxMin:()=>Si,getAdvanceInvoiceVersionsPathIdRegExp:()=>ud,getAdvanceInvoicesQueryLimitDefault:()=>Zs,getAdvanceInvoicesQueryLimitMax:()=>Xs,getAdvanceInvoicesResponseDataItemCurrencyCodeMax:()=>gr,getAdvanceInvoicesResponseDataItemCustomerBankAccountTypeDefault:()=>dr,getAdvanceInvoicesResponseDataItemCustomerCountryCodeMax:()=>ar,getAdvanceInvoicesResponseDataItemCustomerCountryCodeMin:()=>ir,getAdvanceInvoicesResponseDataItemCustomerIdMax:()=>rr,getAdvanceInvoicesResponseDataItemDateDueRegExp:()=>Pr,getAdvanceInvoicesResponseDataItemDateServiceRegExp:()=>wr,getAdvanceInvoicesResponseDataItemDateServiceToRegExp:()=>Cr,getAdvanceInvoicesResponseDataItemDateYearMax:()=>br,getAdvanceInvoicesResponseDataItemDateYearMin:()=>hr,getAdvanceInvoicesResponseDataItemEntityIdMax:()=>yr,getAdvanceInvoicesResponseDataItemFooterMax:()=>cr,getAdvanceInvoicesResponseDataItemFursDataIterationDefault:()=>Dr,getAdvanceInvoicesResponseDataItemIdMax:()=>er,getAdvanceInvoicesResponseDataItemIssuerBankAccountTypeDefault:()=>sr,getAdvanceInvoicesResponseDataItemIssuerCountryCodeMax:()=>nr,getAdvanceInvoicesResponseDataItemIssuerCountryCodeMin:()=>or,getAdvanceInvoicesResponseDataItemItemsItemAdvanceInvoiceIdMax:()=>qr,getAdvanceInvoicesResponseDataItemItemsItemDeliveryNoteIdMax:()=>Wr,getAdvanceInvoicesResponseDataItemItemsItemDiscountsItemTypeDefault:()=>Br,getAdvanceInvoicesResponseDataItemItemsItemDiscountsItemValueMin:()=>kr,getAdvanceInvoicesResponseDataItemItemsItemDiscountsMax:()=>Nr,getAdvanceInvoicesResponseDataItemItemsItemIdMax:()=>Ar,getAdvanceInvoicesResponseDataItemItemsItemItemIdMax:()=>Gr,getAdvanceInvoicesResponseDataItemItemsItemNameMax:()=>Mr,getAdvanceInvoicesResponseDataItemItemsItemTotalConvertedMax:()=>Fr,getAdvanceInvoicesResponseDataItemItemsItemTotalConvertedMin:()=>Or,getAdvanceInvoicesResponseDataItemItemsItemTotalWithTaxConvertedMax:()=>jr,getAdvanceInvoicesResponseDataItemItemsItemTotalWithTaxConvertedMin:()=>Ur,getAdvanceInvoicesResponseDataItemItemsItemUnitMax:()=>Tr,getAdvanceInvoicesResponseDataItemNumberMax:()=>tr,getAdvanceInvoicesResponseDataItemShareableIdMax:()=>xr,getAdvanceInvoicesResponseDataItemTotalConvertedMax:()=>_r,getAdvanceInvoicesResponseDataItemTotalConvertedMin:()=>zr,getAdvanceInvoicesResponseDataItemTotalDueMax:()=>Sr,getAdvanceInvoicesResponseDataItemTotalDueMin:()=>Er,getAdvanceInvoicesResponseDataItemTotalMax:()=>ur,getAdvanceInvoicesResponseDataItemTotalMin:()=>lr,getAdvanceInvoicesResponseDataItemTotalPaidMax:()=>Ir,getAdvanceInvoicesResponseDataItemTotalPaidMin:()=>Rr,getAdvanceInvoicesResponseDataItemTotalWithTaxConvertedMax:()=>fr,getAdvanceInvoicesResponseDataItemTotalWithTaxConvertedMin:()=>vr,getAdvanceInvoicesResponseDataItemTotalWithTaxMax:()=>mr,getAdvanceInvoicesResponseDataItemTotalWithTaxMin:()=>pr,getShareableAdvanceInvoiceResponseCurrencyCodeMax:()=>Hn,getShareableAdvanceInvoiceResponseCustomerBankAccountTypeDefault:()=>jn,getShareableAdvanceInvoiceResponseCustomerCountryCodeMax:()=>Un,getShareableAdvanceInvoiceResponseCustomerCountryCodeMin:()=>Fn,getShareableAdvanceInvoiceResponseCustomerIdMax:()=>On,getShareableAdvanceInvoiceResponseDateDueRegExp:()=>is,getShareableAdvanceInvoiceResponseDateServiceRegExp:()=>as,getShareableAdvanceInvoiceResponseDateServiceToRegExp:()=>ds,getShareableAdvanceInvoiceResponseDateYearMax:()=>$n,getShareableAdvanceInvoiceResponseDateYearMin:()=>Kn,getShareableAdvanceInvoiceResponseEntityIdMax:()=>Yn,getShareableAdvanceInvoiceResponseFooterMax:()=>qn,getShareableAdvanceInvoiceResponseFursDataIterationDefault:()=>rs,getShareableAdvanceInvoiceResponseIdMax:()=>Mn,getShareableAdvanceInvoiceResponseIssuerBankAccountTypeDefault:()=>Nn,getShareableAdvanceInvoiceResponseIssuerCountryCodeMax:()=>Bn,getShareableAdvanceInvoiceResponseIssuerCountryCodeMin:()=>kn,getShareableAdvanceInvoiceResponseItemsItemAdvanceInvoiceIdMax:()=>zs,getShareableAdvanceInvoiceResponseItemsItemDeliveryNoteIdMax:()=>_s,getShareableAdvanceInvoiceResponseItemsItemDiscountsItemTypeDefault:()=>ms,getShareableAdvanceInvoiceResponseItemsItemDiscountsItemValueMin:()=>ps,getShareableAdvanceInvoiceResponseItemsItemDiscountsMax:()=>gs,getShareableAdvanceInvoiceResponseItemsItemIdMax:()=>cs,getShareableAdvanceInvoiceResponseItemsItemItemIdMax:()=>vs,getShareableAdvanceInvoiceResponseItemsItemNameMax:()=>ls,getShareableAdvanceInvoiceResponseItemsItemTotalConvertedMax:()=>hs,getShareableAdvanceInvoiceResponseItemsItemTotalConvertedMin:()=>ys,getShareableAdvanceInvoiceResponseItemsItemTotalWithTaxConvertedMax:()=>xs,getShareableAdvanceInvoiceResponseItemsItemTotalWithTaxConvertedMin:()=>bs,getShareableAdvanceInvoiceResponseItemsItemUnitMax:()=>us,getShareableAdvanceInvoiceResponseNumberMax:()=>Tn,getShareableAdvanceInvoiceResponseShareableIdMax:()=>Qn,getShareableAdvanceInvoiceResponseTotalConvertedMax:()=>Zn,getShareableAdvanceInvoiceResponseTotalConvertedMin:()=>Jn,getShareableAdvanceInvoiceResponseTotalDueMax:()=>ss,getShareableAdvanceInvoiceResponseTotalDueMin:()=>ns,getShareableAdvanceInvoiceResponseTotalMax:()=>Gn,getShareableAdvanceInvoiceResponseTotalMin:()=>Wn,getShareableAdvanceInvoiceResponseTotalPaidMax:()=>os,getShareableAdvanceInvoiceResponseTotalPaidMin:()=>ts,getShareableAdvanceInvoiceResponseTotalWithTaxConvertedMax:()=>es,getShareableAdvanceInvoiceResponseTotalWithTaxConvertedMin:()=>Xn,getShareableAdvanceInvoiceResponseTotalWithTaxMax:()=>Ln,getShareableAdvanceInvoiceResponseTotalWithTaxMin:()=>Vn,renderAdvanceInvoicePreviewBodyOneCurrencyCodeMax:()=>Ed,renderAdvanceInvoicePreviewBodyOneCustomerOneBankAccountTypeDefault:()=>Rd,renderAdvanceInvoicePreviewBodyOneCustomerOneCountryCodeMax:()=>fd,renderAdvanceInvoicePreviewBodyOneCustomerOneCountryCodeMin:()=>vd,renderAdvanceInvoicePreviewBodyOneDateDueRegExp:()=>Dd,renderAdvanceInvoicePreviewBodyOneDateRegExp:()=>bd,renderAdvanceInvoicePreviewBodyOneDateServiceRegExp:()=>Pd,renderAdvanceInvoicePreviewBodyOneDateServiceToRegExp:()=>wd,renderAdvanceInvoicePreviewBodyOneExpectedTotalWithTaxExclusiveMin:()=>Nd,renderAdvanceInvoicePreviewBodyOneFinaBusinessPremiseNameMax:()=>Cd,renderAdvanceInvoicePreviewBodyOneFinaBusinessPremiseNameRegExp:()=>Ad,renderAdvanceInvoicePreviewBodyOneFinaElectronicDeviceNameMax:()=>Md,renderAdvanceInvoicePreviewBodyOneFinaElectronicDeviceNameRegExp:()=>Td,renderAdvanceInvoicePreviewBodyOneFinaOperatorOibMax:()=>Bd,renderAdvanceInvoicePreviewBodyOneFinaOperatorOibMin:()=>kd,renderAdvanceInvoicePreviewBodyOneFooterMax:()=>Id,renderAdvanceInvoicePreviewBodyOneIssuerBankAccountTypeDefault:()=>_d,renderAdvanceInvoicePreviewBodyOneIssuerCountryCodeMax:()=>zd,renderAdvanceInvoicePreviewBodyOneIssuerCountryCodeMin:()=>xd,renderAdvanceInvoicePreviewBodyOnePtManualSeriesCodeMax:()=>Sd,renderAdvanceInvoicePreviewBodyTwoCurrencyCodeMax:()=>Ld,renderAdvanceInvoicePreviewBodyTwoCustomerOneBankAccountTypeDefault:()=>Gd,renderAdvanceInvoicePreviewBodyTwoCustomerOneCountryCodeMax:()=>Wd,renderAdvanceInvoicePreviewBodyTwoCustomerOneCountryCodeMin:()=>qd,renderAdvanceInvoicePreviewBodyTwoDateDueRegExp:()=>Yd,renderAdvanceInvoicePreviewBodyTwoDateRegExp:()=>Od,renderAdvanceInvoicePreviewBodyTwoDateServiceRegExp:()=>Kd,renderAdvanceInvoicePreviewBodyTwoDateServiceToRegExp:()=>$d,renderAdvanceInvoicePreviewBodyTwoExpectedTotalWithTaxExclusiveMin:()=>cc,renderAdvanceInvoicePreviewBodyTwoFinaBusinessPremiseNameMax:()=>nc,renderAdvanceInvoicePreviewBodyTwoFinaBusinessPremiseNameRegExp:()=>sc,renderAdvanceInvoicePreviewBodyTwoFinaElectronicDeviceNameMax:()=>rc,renderAdvanceInvoicePreviewBodyTwoFinaElectronicDeviceNameRegExp:()=>ic,renderAdvanceInvoicePreviewBodyTwoFinaOperatorOibMax:()=>dc,renderAdvanceInvoicePreviewBodyTwoFinaOperatorOibMin:()=>ac,renderAdvanceInvoicePreviewBodyTwoFooterMax:()=>Vd,renderAdvanceInvoicePreviewBodyTwoIssuerBankAccountTypeDefault:()=>jd,renderAdvanceInvoicePreviewBodyTwoIssuerCountryCodeMax:()=>Ud,renderAdvanceInvoicePreviewBodyTwoIssuerCountryCodeMin:()=>Fd,renderAdvanceInvoicePreviewBodyTwoItemsItemDescriptionMax:()=>Qd,renderAdvanceInvoicePreviewBodyTwoItemsItemDiscountsItemTypeDefault:()=>tc,renderAdvanceInvoicePreviewBodyTwoItemsItemDiscountsItemValueMin:()=>ec,renderAdvanceInvoicePreviewBodyTwoItemsItemDiscountsMax:()=>oc,renderAdvanceInvoicePreviewBodyTwoItemsItemQuantityMax:()=>Zd,renderAdvanceInvoicePreviewBodyTwoItemsItemQuantityMin:()=>Jd,renderAdvanceInvoicePreviewBodyTwoItemsItemUnitMax:()=>Xd,renderAdvanceInvoicePreviewBodyTwoPtManualSeriesCodeMax:()=>Hd,renderAdvanceInvoicePreviewQueryLanguageMax:()=>yd,renderAdvanceInvoicePreviewQueryLanguageMin:()=>gd,renderAdvanceInvoicePreviewQueryLocaleMax:()=>md,renderAdvanceInvoicePreviewQueryLocaleMin:()=>pd,renderAdvanceInvoicePreviewQueryPartialDefault:()=>hd,updateAdvanceInvoiceBodyChangeReasonMax:()=>_a,updateAdvanceInvoiceBodyCustomerOneBankAccountTypeDefault:()=>ua,updateAdvanceInvoiceBodyCustomerOneCountryCodeMax:()=>la,updateAdvanceInvoiceBodyCustomerOneCountryCodeMin:()=>ca,updateAdvanceInvoiceBodyDateRegExp:()=>ra,updateAdvanceInvoiceBodyIssuerOneBankAccountTypeDefault:()=>da,updateAdvanceInvoiceBodyIssuerOneCountryCodeMax:()=>aa,updateAdvanceInvoiceBodyIssuerOneCountryCodeMin:()=>ia,updateAdvanceInvoiceBodyItemsItemDescriptionMax:()=>pa,updateAdvanceInvoiceBodyItemsItemDiscountsItemTypeDefault:()=>ba,updateAdvanceInvoiceBodyItemsItemDiscountsItemValueMin:()=>ha,updateAdvanceInvoiceBodyItemsItemDiscountsMax:()=>xa,updateAdvanceInvoiceBodyItemsItemQuantityMax:()=>ga,updateAdvanceInvoiceBodyItemsItemQuantityMin:()=>ma,updateAdvanceInvoiceBodyItemsItemUnitMax:()=>ya,updateAdvanceInvoiceBodyReferenceMax:()=>za,updateAdvanceInvoicePathIdRegExp:()=>sa,updateAdvanceInvoiceResponseCurrencyCodeMax:()=>Ba,updateAdvanceInvoiceResponseCustomerBankAccountTypeDefault:()=>wa,updateAdvanceInvoiceResponseCustomerCountryCodeMax:()=>Pa,updateAdvanceInvoiceResponseCustomerCountryCodeMin:()=>Da,updateAdvanceInvoiceResponseCustomerIdMax:()=>Sa,updateAdvanceInvoiceResponseDateDueRegExp:()=>$a,updateAdvanceInvoiceResponseDateServiceRegExp:()=>Qa,updateAdvanceInvoiceResponseDateServiceToRegExp:()=>Ja,updateAdvanceInvoiceResponseDateYearMax:()=>Fa,updateAdvanceInvoiceResponseDateYearMin:()=>Oa,updateAdvanceInvoiceResponseEntityIdMax:()=>Na,updateAdvanceInvoiceResponseFooterMax:()=>Ca,updateAdvanceInvoiceResponseFursDataIterationDefault:()=>Ka,updateAdvanceInvoiceResponseIdMax:()=>va,updateAdvanceInvoiceResponseIssuerBankAccountTypeDefault:()=>Ea,updateAdvanceInvoiceResponseIssuerCountryCodeMax:()=>Ia,updateAdvanceInvoiceResponseIssuerCountryCodeMin:()=>Ra,updateAdvanceInvoiceResponseItemsItemAdvanceInvoiceIdMax:()=>dd,updateAdvanceInvoiceResponseItemsItemDeliveryNoteIdMax:()=>cd,updateAdvanceInvoiceResponseItemsItemDiscountsItemTypeDefault:()=>od,updateAdvanceInvoiceResponseItemsItemDiscountsItemValueMin:()=>td,updateAdvanceInvoiceResponseItemsItemDiscountsMax:()=>nd,updateAdvanceInvoiceResponseItemsItemIdMax:()=>Za,updateAdvanceInvoiceResponseItemsItemItemIdMax:()=>ld,updateAdvanceInvoiceResponseItemsItemNameMax:()=>Xa,updateAdvanceInvoiceResponseItemsItemTotalConvertedMax:()=>rd,updateAdvanceInvoiceResponseItemsItemTotalConvertedMin:()=>sd,updateAdvanceInvoiceResponseItemsItemTotalWithTaxConvertedMax:()=>ad,updateAdvanceInvoiceResponseItemsItemTotalWithTaxConvertedMin:()=>id,updateAdvanceInvoiceResponseItemsItemUnitMax:()=>ed,updateAdvanceInvoiceResponseNumberMax:()=>fa,updateAdvanceInvoiceResponseShareableIdMax:()=>Ua,updateAdvanceInvoiceResponseTotalConvertedMax:()=>qa,updateAdvanceInvoiceResponseTotalConvertedMin:()=>ja,updateAdvanceInvoiceResponseTotalDueMax:()=>Ya,updateAdvanceInvoiceResponseTotalDueMin:()=>Ha,updateAdvanceInvoiceResponseTotalMax:()=>Ma,updateAdvanceInvoiceResponseTotalMin:()=>Aa,updateAdvanceInvoiceResponseTotalPaidMax:()=>La,updateAdvanceInvoiceResponseTotalPaidMin:()=>Va,updateAdvanceInvoiceResponseTotalWithTaxConvertedMax:()=>Ga,updateAdvanceInvoiceResponseTotalWithTaxConvertedMin:()=>Wa,updateAdvanceInvoiceResponseTotalWithTaxMax:()=>ka,updateAdvanceInvoiceResponseTotalWithTaxMin:()=>Ta,voidAdvanceInvoicePathIdRegExp:()=>lc,voidAdvanceInvoiceResponseCurrencyCodeMax:()=>Ec,voidAdvanceInvoiceResponseCustomerBankAccountTypeDefault:()=>zc,voidAdvanceInvoiceResponseCustomerCountryCodeMax:()=>xc,voidAdvanceInvoiceResponseCustomerCountryCodeMin:()=>bc,voidAdvanceInvoiceResponseCustomerIdMax:()=>hc,voidAdvanceInvoiceResponseDateDueRegExp:()=>Uc,voidAdvanceInvoiceResponseDateServiceRegExp:()=>jc,voidAdvanceInvoiceResponseDateServiceToRegExp:()=>qc,voidAdvanceInvoiceResponseDateYearMax:()=>Pc,voidAdvanceInvoiceResponseDateYearMin:()=>Dc,voidAdvanceInvoiceResponseEntityIdMax:()=>Sc,voidAdvanceInvoiceResponseFooterMax:()=>_c,voidAdvanceInvoiceResponseFursDataIterationDefault:()=>Fc,voidAdvanceInvoiceResponseIdMax:()=>uc,voidAdvanceInvoiceResponseIssuerBankAccountTypeDefault:()=>yc,voidAdvanceInvoiceResponseIssuerCountryCodeMax:()=>gc,voidAdvanceInvoiceResponseIssuerCountryCodeMin:()=>mc,voidAdvanceInvoiceResponseItemsItemAdvanceInvoiceIdMax:()=>Zc,voidAdvanceInvoiceResponseItemsItemDeliveryNoteIdMax:()=>Xc,voidAdvanceInvoiceResponseItemsItemDiscountsItemTypeDefault:()=>Hc,voidAdvanceInvoiceResponseItemsItemDiscountsItemValueMin:()=>Lc,voidAdvanceInvoiceResponseItemsItemDiscountsMax:()=>Yc,voidAdvanceInvoiceResponseItemsItemIdMax:()=>Wc,voidAdvanceInvoiceResponseItemsItemItemIdMax:()=>el,voidAdvanceInvoiceResponseItemsItemNameMax:()=>Gc,voidAdvanceInvoiceResponseItemsItemTotalConvertedMax:()=>$c,voidAdvanceInvoiceResponseItemsItemTotalConvertedMin:()=>Kc,voidAdvanceInvoiceResponseItemsItemTotalWithTaxConvertedMax:()=>Jc,voidAdvanceInvoiceResponseItemsItemTotalWithTaxConvertedMin:()=>Qc,voidAdvanceInvoiceResponseItemsItemUnitMax:()=>Vc,voidAdvanceInvoiceResponseNumberMax:()=>pc,voidAdvanceInvoiceResponseShareableIdMax:()=>wc,voidAdvanceInvoiceResponseTotalConvertedMax:()=>Ac,voidAdvanceInvoiceResponseTotalConvertedMin:()=>Cc,voidAdvanceInvoiceResponseTotalDueMax:()=>Oc,voidAdvanceInvoiceResponseTotalDueMin:()=>Nc,voidAdvanceInvoiceResponseTotalMax:()=>fc,voidAdvanceInvoiceResponseTotalMin:()=>vc,voidAdvanceInvoiceResponseTotalPaidMax:()=>Bc,voidAdvanceInvoiceResponseTotalPaidMin:()=>kc,voidAdvanceInvoiceResponseTotalWithTaxConvertedMax:()=>Tc,voidAdvanceInvoiceResponseTotalWithTaxConvertedMin:()=>Mc,voidAdvanceInvoiceResponseTotalWithTaxMax:()=>Ic,voidAdvanceInvoiceResponseTotalWithTaxMin:()=>Rc});var kge=e.object({shareableId:e.string().describe("Shareable document token")}),Mn=36,Tn=100,kn=2,Bn=2,Nn="iban",On=36,Fn=2,Un=2,jn="iban",qn=500,Wn=-140737488355328,Gn=0x7fffffffffff,Vn=-140737488355328,Ln=0x7fffffffffff,Hn=3,Yn=36,Kn=-2147483648,$n=2147483647,Qn=100,Jn=-140737488355328,Zn=0x7fffffffffff,Xn=-140737488355328,es=0x7fffffffffff,ts=-140737488355328,os=0x7fffffffffff,ns=-140737488355328,ss=0x7fffffffffff,rs=0,is=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,as=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,ds=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,cs=36,ls=500,us=50,ps=0,ms="percent",gs=5,ys=-140737488355328,hs=0x7fffffffffff,bs=-140737488355328,xs=0x7fffffffffff,zs=36,_s=36,vs=36,Bge=e.object({id:e.string().max(Mn),number:e.string().max(Tn),is_draft:e.boolean().describe("Whether this is a draft document. Draft documents have no sequential number assigned, skip fiscalization, and can be deleted. Use POST /{documents}/{id}/finalize to assign a number and finalize."),date:e.iso.datetime({}).describe("Date the advance invoice was created (ISO 8601 datetime at midnight UTC)"),issuer:e.object({name:e.string().nullish(),email:e.email().nullish(),address:e.string().nullish(),address_2:e.string().nullish(),post_code:e.string().nullish(),city:e.string().nullish(),state:e.string().nullish(),country:e.string().nullish(),country_code:e.string().min(kn).max(Bn).nullish(),tax_number:e.string().nullish(),tax_number_2:e.string().nullish(),company_number:e.string().nullish(),phone:e.string().nullish(),peppol_id:e.string().nullish(),is_end_consumer:e.boolean().nullish(),bank_account:e.object({type:e.enum(["iban","us_domestic","uk_domestic","other"]).default(Nn).describe("Account type determines which fields are used"),name:e.string().nullish().describe("Display name for this account. Falls back to account number if not set"),bank_name:e.string().nullish().describe("Bank name"),iban:e.string().nullish().describe("IBAN (for type=iban)"),account_number:e.string().nullish().describe("Account number (for us_domestic, uk_domestic, other)"),bic:e.string().nullish().describe("BIC/SWIFT code for international transfers"),routing_number:e.string().nullish().describe("US ABA routing number (for type=us_domestic)"),sort_code:e.string().nullish().describe("UK sort code (for type=uk_domestic)")}).nullish()}).describe("Document issuer (entity) information"),customer_id:e.string().max(On).nullish(),customer:e.object({name:e.string().nullish(),email:e.email().nullish(),address:e.string().nullish(),address_2:e.string().nullish(),post_code:e.string().nullish(),city:e.string().nullish(),state:e.string().nullish(),country:e.string().nullish(),country_code:e.string().min(Fn).max(Un).nullish(),tax_number:e.string().nullish(),tax_number_2:e.string().nullish(),company_number:e.string().nullish(),phone:e.string().nullish(),peppol_id:e.string().nullish(),is_end_consumer:e.boolean().nullish(),bank_account:e.object({type:e.enum(["iban","us_domestic","uk_domestic","other"]).default(jn).describe("Account type determines which fields are used"),name:e.string().nullish().describe("Display name for this account. Falls back to account number if not set"),bank_name:e.string().nullish().describe("Bank name"),iban:e.string().nullish().describe("IBAN (for type=iban)"),account_number:e.string().nullish().describe("Account number (for us_domestic, uk_domestic, other)"),bic:e.string().nullish().describe("BIC/SWIFT code for international transfers"),routing_number:e.string().nullish().describe("US ABA routing number (for type=us_domestic)"),sort_code:e.string().nullish().describe("UK sort code (for type=uk_domestic)")}).nullish()}).nullish().describe("Customer information"),note:e.string().nullish().describe("Note for the document. If not provided, defaults to entity's document-type-specific note setting. Pass empty string to explicitly set no note."),tax_clause:e.string().nullish().describe("Tax clause for the document. Auto-populated based on transaction type if tax_clause_defaults are configured in entity settings. Pass empty string to explicitly set no clause."),footer:e.string().max(qn).nullish(),signature:e.string().nullish().describe("Signature text for the document (e.g. 'John Smith, CEO'). If not provided, defaults to entity's default_document_signature setting. Pass empty string to explicitly set no signature."),total:e.number().min(Wn).max(Gn),total_with_tax:e.number().min(Vn).max(Ln),total_discount:e.number().describe("Document discount total stored as a net-equivalent amount for compatibility. In `b2b_standard`, this is the net value of line-item discounts applied before tax. In `b2c_gross_discount`, gross discounts are converted back to their net-equivalent value here. 0 when no discounts applied."),creation_source:e.enum(["standard","custom"]).describe("Internal origin of the create request. `standard` means a normal create endpoint calculated the totals. `custom` means the document was created through a `/custom` endpoint."),calculation_mode:e.enum(["b2b_standard","b2c_gross_discount"]).describe("Resolved calculation mode used for this document. Stored on the document so recalculation and rendering remain stable even if entity defaults change later."),taxes:e.array(e.object({rate:e.number().nullable(),tax_id:e.string().nullish(),base:e.number(),amount:e.number(),reverse_charge:e.boolean().nullish()})).describe("Applied taxes summary"),currency_code:e.string().max(Hn),entity_id:e.string().max(Yn),date_year:e.number().min(Kn).max($n),shareable_id:e.string().max(Qn).nullish(),voided_at:e.iso.datetime({}).nullish(),transaction_type:e.union([e.literal("domestic"),e.literal("intra_eu_b2b"),e.literal("intra_eu_b2c"),e.literal("3w_b2b"),e.literal("3w_b2c"),e.literal("export"),e.literal(null)]).nullish().describe("Transaction type for VAT purposes (domestic, intra_eu_b2b, intra_eu_b2c, export). Always determined based on issuer/customer countries."),metadata:e.record(e.string(),e.string()).nullish().describe("Custom key-value data for your own use. Store any JSON object up to 50 properties. Values must be strings up to 250 characters. Useful for storing external IDs, tags, or integration data."),exchange_rate:e.object({rate:e.number().describe("Exchange rate used for conversion"),source:e.string().describe("Source of the exchange rate (e.g., 'Frankfurter')"),date:e.iso.datetime({}).describe("Date of the exchange rate"),quote_currency:e.string().describe("Quote currency (the base currency converted to)")}).nullish().describe("Currency exchange rate information if conversion was applied"),total_converted:e.number().min(Jn).max(Zn).nullish(),total_with_tax_converted:e.number().min(Xn).max(es).nullish(),rounding_correction:e.number().nullish().describe("Rounding correction applied to reconcile differences between calculated total_with_tax and expected_total_with_tax. Only present when expected_total_with_tax was provided during creation."),eslog:e.object({validation_enabled:e.boolean().nullish().describe("Override entity default: true = validate, false = skip, null = use entity setting"),validation_status:e.union([e.literal("valid"),e.literal("invalid"),e.literal("not_validated"),e.literal(null)]).nullish().describe("Validation status: 'valid', 'invalid', or 'not_validated'"),validation_errors:e.array(e.string()).nullish().describe("Array of validation error messages (if status is 'invalid')"),validated_at:e.string().nullish().describe("ISO timestamp when validation was last performed")}).nullish().describe("e-SLOG 2.0 validation data for Slovenian electronic invoices. Only applicable when entity.country_code = 'SI' and eslog validation is enabled."),reference:e.string().nullish().describe("Custom reference for the document (e.g., purchase order number, payment reference). When set, used as the UPN payment reference instead of the auto-generated one."),vies:e.object({warning:e.string().nullable().describe("Warning message if VIES validation was unavailable or the VAT number was invalid. Document creation proceeds but this indicates the transaction type may need review."),skipped:e.boolean().nullable().describe("True when VIES validation was skipped due to entity settings (vies_validate_vat: false) but would normally apply. Used for audit trail.")}).nullish().describe("VIES validation info including any warnings and skipped indicator for audit trail"),deleted_at:e.iso.datetime({}).nullish().describe("Timestamp when the document was soft-deleted. Null if not deleted."),created_at:e.iso.datetime({}),updated_at:e.iso.datetime({}),total_paid:e.number().min(ts).max(os),total_due:e.number().min(ns).max(ss),paid_in_full:e.boolean(),furs:e.object({status:e.enum(["pending","success","failed","skipped"]),fiscalized_at:e.iso.datetime({}).optional(),error:e.string().optional(),cancellation_reason:e.string().optional(),data:e.object({zoi:e.string(),eor:e.string().optional(),qr_code:e.string().optional(),business_premise_name:e.string(),electronic_device_name:e.string(),invoice_number:e.string(),iteration:e.number().default(rs),payload:e.record(e.string(),e.unknown()).describe("FURS API request payload"),issuer_tax_number:e.string().optional(),operator_tax_number:e.string().optional(),operator_label:e.string().optional(),foreign_operator:e.boolean().optional(),cancelled:e.boolean().optional(),cancelled_eor:e.string().optional(),cancellation_payload:e.record(e.string(),e.unknown()).optional().describe("FURS API cancellation payload")}).optional()}).nullish().describe("FURS (Slovenia) fiscalization data. Read-only field, not editable via API. Includes status, premise name, device name, and FURS identifiers (ZOI, EOR, QR code)."),fina:e.object({status:e.enum(["pending","success","failed"]),fiscalized_at:e.iso.datetime({}).optional(),error:e.string().optional(),data:e.object({zki:e.string(),jir:e.string().optional(),qr_code_url:e.string().optional(),business_premise_name:e.string(),electronic_device_name:e.string(),invoice_number:e.string(),operator_oib:e.string().optional(),payment_type:e.string().optional(),numbering_sequence:e.string().optional(),payload:e.record(e.string(),e.unknown()).describe("CIS SOAP request payload"),subsequent_submit:e.boolean().optional(),issuer_oib:e.string().optional(),operator_label:e.string().optional()}).optional()}).nullish().describe("FINA (Croatia) CIS fiscalization data. Read-only field. Includes status, business premise name, electronic device name, and CIS identifiers (ZKI, JIR, QR code URL)."),pt:e.union([e.string(),e.number(),e.boolean(),e.null(),e.record(e.string(),e.unknown()),e.array(e.unknown())]).optional(),date_due:e.string().regex(is).nullish().describe("Document due date in YYYY-MM-DD format"),date_service:e.string().regex(as).nullish().describe("Service date in YYYY-MM-DD format. For invoices and credit notes."),date_service_to:e.string().regex(ds).nullish().describe("Service period end date in YYYY-MM-DD format. For invoices and credit notes. Use with date_service for date ranges."),payment_terms:e.string().nullish().describe("Payment terms for the document. If not provided, defaults to entity's document-type-specific payment terms setting. Pass empty string to explicitly set no terms."),items:e.array(e.object({id:e.string().max(cs),type:e.union([e.literal("separator"),e.literal(null)]).nullish().describe("Item type. null = regular line item, 'separator' = visual section header."),name:e.string().max(ls),description:e.string().nullable(),classification:e.union([e.literal("product"),e.literal("service"),e.literal("advance"),e.literal(null)]).nullish().describe("Item classification used for Portugal SAF-T product typing."),price:e.number().nullish().describe("Per-unit net price (before tax). Always stores net price. Null for separator items."),gross_price:e.number().nullish().describe(`Per-unit gross price (includes tax).
|
|
2
|
+
Only present if user originally sent gross price.
|
|
3
|
+
Use gross pricing to keep invoice totals stable when VIES reverse charge is applied.`),quantity:e.number().nullish().describe("Item quantity. Null for separator items."),unit:e.string().max(us).nullish(),taxes:e.array(e.object({rate:e.number().nullish(),tax_id:e.string().nullish(),classification:e.string().nullish(),reverse_charge:e.boolean().nullish(),amount:e.number().nullish(),pt_exemption_code:e.string().nullish(),pt_exemption_reason:e.string().nullish()}).describe("Document Item Tax")).describe("Applied taxes (provide rate to create new tax, or tax_id to use existing tax)"),discounts:e.array(e.object({value:e.number().min(ps).describe("Discount value"),type:e.enum(["percent","amount"]).default(ms).describe("Discount type: 'percent' (default) or 'amount'")})).max(gs).describe("Line discounts (max 5) in request order. In `b2b_standard`, percentage discounts are calculated from the original line subtotal and fixed amounts are summed before tax. In `b2c_gross_discount`, discounts are applied sequentially to the running gross subtotal."),total:e.number().nullish().describe("Line total before tax. Null for separator items."),total_with_tax:e.number().nullish().describe("Line total after tax. Null for separator items."),total_converted:e.number().min(ys).max(hs).nullish(),total_with_tax_converted:e.number().min(bs).max(xs).nullish(),advance_invoice_id:e.string().max(zs).nullish(),delivery_note_id:e.string().max(_s).nullish(),item_id:e.string().max(vs).nullish(),metadata:e.record(e.string(),e.string()).nullish().describe("Custom key-value data for your own use. Store any JSON object up to 50 properties. Values must be strings up to 250 characters. Useful for storing external IDs, tags, or integration data."),created_at:e.iso.datetime({}),updated_at:e.iso.datetime({})})),document_relations:e.array(e.object({id:e.string(),source_type:e.enum(["invoice","estimate","credit_note","advance_invoice","delivery_note"]).describe("Type of document"),source_id:e.string(),target_type:e.enum(["invoice","estimate","credit_note","advance_invoice","delivery_note"]).describe("Type of document"),target_id:e.string(),relation_type:e.string(),entity_id:e.string(),created_at:e.iso.datetime({}),linked_document_voided_at:e.iso.datetime({}).nullish(),related_document:e.object({id:e.string(),type:e.enum(["invoice","estimate","credit_note","advance_invoice","delivery_note"]).describe("Type of document"),number:e.string(),date:e.string(),total_with_tax:e.number(),currency_code:e.string(),is_draft:e.boolean(),voided_at:e.string().nullable(),paid_in_full:e.boolean().nullable(),title_type:e.union([e.literal("estimate"),e.literal("proforma_invoice"),e.literal(null)]).nullable(),hide_prices:e.boolean().nullable()}).optional()})).optional()}).describe("Advance invoice for prepayments"),Nge=e.object({shareableId:e.string().describe("Shareable document token")}),Oge=e.object({locale:e.enum(["en-US","de-DE","it-IT","fr-FR","es-ES","sl-SI","pt-PT","nl-NL","pl-PL","hr-HR","sv-SE","fi-FI","et-EE","bg-BG","cs-CZ","sk-SK","nb-NO","is-IS"]).optional().describe("Locale for number and date formatting (decimal separators, date order). Defaults to entity locale."),language:e.enum(["en-US","de-DE","it-IT","fr-FR","es-ES","sl-SI","pt-PT","nl-NL","pl-PL","hr-HR","sv-SE","fi-FI","et-EE","bg-BG","cs-CZ","sk-SK","nb-NO","is-IS"]).optional().describe("Language for document labels/translations. Defaults to locale value.")}),Fge=e.object({shareableId:e.string().describe("Shareable document token")}),Uge=e.object({locale:e.enum(["en-US","de-DE","it-IT","fr-FR","es-ES","sl-SI","pt-PT","nl-NL","pl-PL","hr-HR","sv-SE","fi-FI","et-EE","bg-BG","cs-CZ","sk-SK","nb-NO","is-IS"]).optional().describe("Locale for number and date formatting (decimal separators, date order). Defaults to entity locale."),language:e.enum(["en-US","de-DE","it-IT","fr-FR","es-ES","sl-SI","pt-PT","nl-NL","pl-PL","hr-HR","sv-SE","fi-FI","et-EE","bg-BG","cs-CZ","sk-SK","nb-NO","is-IS"]).optional().describe("Language for document labels/translations. Defaults to locale value.")}),jge=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),fs=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,Rs=2,Is=2,Es="iban",Ss=2,Ds=2,Ps="iban",ws=500,Cs=3,As=35,Ms=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,Ts=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,ks=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,Bs=2e3,Ns=-140737488355328,Os=0x7fffffffffff,Fs=50,Us=0,js="percent",qs=5,Ws=36,Gs=36,Vs=0,Ls=20,Hs=/^[0-9a-zA-Z]{1,20}$/,Ys=20,Ks=/^\d{1,20}$/,$s=11,Qs=11,Js=0,qge=e.object({is_draft:e.boolean().optional().describe("Whether this is a draft document. Draft documents have no sequential number assigned, skip fiscalization, and can be deleted. Use POST /{documents}/{id}/finalize to assign a number and finalize."),date:e.string().regex(fs).optional().describe("Document date in YYYY-MM-DD format"),issuer:e.object({name:e.string().nullish(),email:e.email().nullish(),address:e.string().nullish(),address_2:e.string().nullish(),post_code:e.string().nullish(),city:e.string().nullish(),state:e.string().nullish(),country:e.string().nullish(),country_code:e.string().min(Rs).max(Is).nullish(),tax_number:e.string().nullish(),tax_number_2:e.string().nullish(),company_number:e.string().nullish(),phone:e.string().nullish(),peppol_id:e.string().nullish(),is_end_consumer:e.boolean().nullish(),bank_account:e.object({type:e.enum(["iban","us_domestic","uk_domestic","other"]).default(Es).describe("Account type determines which fields are used"),name:e.string().nullish().describe("Display name for this account. Falls back to account number if not set"),bank_name:e.string().nullish().describe("Bank name"),iban:e.string().nullish().describe("IBAN (for type=iban)"),account_number:e.string().nullish().describe("Account number (for us_domestic, uk_domestic, other)"),bic:e.string().nullish().describe("BIC/SWIFT code for international transfers"),routing_number:e.string().nullish().describe("US ABA routing number (for type=us_domestic)"),sort_code:e.string().nullish().describe("UK sort code (for type=uk_domestic)")}).nullish()}).optional().describe("Document issuer (entity) information"),customer_id:e.string().nullish().describe("Referenced Customer ID. Required if customer is not provided."),customer:e.object({name:e.string().nullish(),email:e.email().nullish(),address:e.string().nullish(),address_2:e.string().nullish(),post_code:e.string().nullish(),city:e.string().nullish(),state:e.string().nullish(),country:e.string().nullish(),country_code:e.string().min(Ss).max(Ds).nullish(),tax_number:e.string().nullish(),tax_number_2:e.string().nullish(),company_number:e.string().nullish(),phone:e.string().nullish(),peppol_id:e.string().nullish(),is_end_consumer:e.boolean().nullish(),bank_account:e.object({type:e.enum(["iban","us_domestic","uk_domestic","other"]).default(Ps).describe("Account type determines which fields are used"),name:e.string().nullish().describe("Display name for this account. Falls back to account number if not set"),bank_name:e.string().nullish().describe("Bank name"),iban:e.string().nullish().describe("IBAN (for type=iban)"),account_number:e.string().nullish().describe("Account number (for us_domestic, uk_domestic, other)"),bic:e.string().nullish().describe("BIC/SWIFT code for international transfers"),routing_number:e.string().nullish().describe("US ABA routing number (for type=us_domestic)"),sort_code:e.string().nullish().describe("UK sort code (for type=uk_domestic)")}).nullish()}).describe("Document issuer (entity) information").and(e.object({save_customer:e.boolean().nullish().describe("Whether to save (create new or update existing) the customer data.\nDefaults to `true` (best-effort).\nWhen `true` with `customer_id`, updates the existing customer.\nWhen `true` without `customer_id`, checks for duplicate customers using customer identifiers (tax/company number, country-aware when available) and reuses the existing customer if found, otherwise creates a new customer.\nWhen `false`, customer data is stored inline on the document only.\nWhen omitted, behaves like `true` but won't fail the request if persistence fails.")}).nullable()).optional().describe("Customer recipient of the document.\nBoth `customer` and `customer_id` are optional - documents can be created without customer information.\nIf both `customer_id` and `customer` are provided with `save_customer=true`, the existing customer will be updated.\nIf only `customer` is provided with `save_customer=true` (or by default), the system checks for duplicates using customer identifiers and reuses existing customers when found."),note:e.string().nullish().describe("Note for the document. If not provided, defaults to entity's document-type-specific note setting. Pass empty string to explicitly set no note."),tax_clause:e.string().nullish().describe("Tax clause for the document. Auto-populated based on transaction type if tax_clause_defaults are configured in entity settings. Pass empty string to explicitly set no clause."),footer:e.string().max(ws).nullish(),signature:e.string().nullish().describe("Signature text for the document (e.g. 'John Smith, CEO'). If not provided, defaults to entity's default_document_signature setting. Pass empty string to explicitly set no signature."),calculation_mode:e.union([e.literal("b2b_standard"),e.literal("b2c_gross_discount"),e.literal(null)]).nullish().describe("Optional calculation mode override. When omitted, the entity default is used and falls back to `b2b_standard`."),currency_code:e.string().max(Cs).optional(),metadata:e.record(e.string(),e.string()).nullish().describe("Custom key-value data for your own use. Store any JSON object up to 50 properties. Values must be strings up to 250 characters. Useful for storing external IDs, tags, or integration data."),reference:e.string().nullish().describe("Custom reference for the document (e.g., purchase order number, payment reference). When set, used as the UPN payment reference instead of the auto-generated one."),pt:e.object({series_id:e.string().nullish().describe("ATCUD series ID to use for PT numbering. Required for PT manual documents."),manual:e.boolean().nullish().describe("Marks this PT document as manually issued/offline."),manual_sequential_number:e.number().min(1).nullish().describe("Manual PT sequence number shown on the offline/original document."),manual_series_code:e.string().min(1).max(As).nullish().describe("Offline/manual PT series code shown on the original document."),operator_first_name:e.string().min(1).nullish().describe("PT operator first name snapshot for PT compliance."),operator_last_name:e.string().min(1).nullish().describe("PT operator last name snapshot for PT compliance."),operator_tax_number:e.string().min(1).nullish().describe("PT operator tax number snapshot for PT compliance."),account_first_name:e.string().min(1).nullish().describe("Deprecated alias for PT operator first name snapshot."),account_last_name:e.string().min(1).nullish().describe("Deprecated alias for PT operator last name snapshot."),account_tax_number:e.string().min(1).nullish().describe("Deprecated alias for PT operator tax number snapshot.")}).nullish(),date_due:e.string().regex(Ms).nullish().describe("Document due date in YYYY-MM-DD format"),date_service:e.string().regex(Ts).nullish().describe("Service date in YYYY-MM-DD format. For invoices and credit notes."),date_service_to:e.string().regex(ks).nullish().describe("Service period end date in YYYY-MM-DD format. For invoices and credit notes. Use with date_service for date ranges."),items:e.array(e.object({type:e.union([e.literal("separator"),e.literal(null)]).nullish().describe(`Item type. Omit or null for regular line item, 'separator' for a visual section header.
|
|
4
|
+
Separator items only use name and description \u2014 all financial fields are ignored.`),name:e.string().min(1).nullish().describe("Item name. Required unless `item_id` is provided.\nFor separator items, this is the section title (always required)."),description:e.string().max(Bs).nullish(),classification:e.union([e.literal("product"),e.literal("service"),e.literal("advance"),e.literal(null)]).nullish().describe("Item classification used for Portugal SAF-T product typing."),price:e.number().nullish().describe("Net price per unit (before tax).\nProvide either `price` OR `gross_price`, not both.\nOptional if `item_id` is provided. Ignored for separator items."),gross_price:e.number().nullish().describe("Gross price per unit (includes tax).\nIf provided, net price is calculated.\nProvide either `price` OR `gross_price`, not both.\nOptional if `item_id` is provided. Ignored for separator items."),quantity:e.number().min(Ns).max(Os).nullish().describe("Item quantity. Required for regular items. Ignored for separator items."),unit:e.string().max(Fs).nullish(),taxes:e.array(e.object({rate:e.number().nullish(),tax_id:e.string().nullish(),classification:e.string().nullish(),reverse_charge:e.boolean().nullish(),amount:e.number().nullish(),pt_exemption_code:e.string().nullish(),pt_exemption_reason:e.string().nullish()}).describe("Document Item Tax")).optional().describe("Applied taxes (provide rate to create new tax, or tax_id to use existing tax)"),discounts:e.array(e.object({value:e.number().min(Us).describe("Discount value"),type:e.enum(["percent","amount"]).default(js).describe("Discount type: 'percent' (default) or 'amount'")})).max(qs).optional().describe("Line discounts (max 5) in request order. In `b2b_standard`, percentage discounts are calculated from the original line subtotal and fixed amounts are summed before tax. In `b2c_gross_discount`, discounts are applied sequentially to the running gross subtotal."),item_id:e.string().nullish().describe(`ID of a catalog item to prefill from.
|
|
5
|
+
When provided, the item's name, description, price, and taxes are used as defaults.
|
|
6
|
+
Any field you provide will override the catalog item's value.
|
|
7
|
+
Not applicable for separator items.`),metadata:e.record(e.string(),e.string()).nullish().describe("Custom key-value data for your own use. Store any JSON object up to 50 properties. Values must be strings up to 250 characters. Useful for storing external IDs, tags, or integration data."),save_item:e.boolean().nullish().describe(`Whether to save this item to the catalog.
|
|
8
|
+
When true without item_id, matches by exact name and reuses existing, or creates a new catalog item.
|
|
9
|
+
Defaults to true (best-effort). When omitted, behaves like true but won't fail the request if persistence fails.`)})).min(1).describe("Line items for the advance invoice. At least one item is required."),linked_documents:e.array(e.string().min(1)).nullish().describe("Link this advance invoice to other documents. Creates document relations automatically."),payments:e.array(e.object({incoming_purchase_document_id:e.string().max(Ws).nullish(),applied_to_incoming_purchase_document_id:e.string().max(Gs).nullish(),amount:e.number().gt(Vs).nullish().describe("Payment amount. If not provided, uses the document total (total_with_tax)"),type:e.enum(["cash","bank_transfer","card","check","paypal","coupon","other","credit_note","advance"]).describe("Payment type/method"),date:e.string().nullish().describe("Payment date in YYYY-MM-DD format. Defaults to today."),tag:e.string().nullish(),reference:e.string().nullish(),note:e.string().nullish(),metadata:e.record(e.string(),e.string()).nullish().describe("Custom key-value data for your own use. Store any JSON object up to 50 properties. Values must be strings up to 250 characters. Useful for storing external IDs, tags, or integration data.")})).nullish().describe("Payments to record with the advance invoice. Required for non-draft advance invoices. If amounts are not provided, the total is split equally. Automatically updates payment status."),furs:e.object({business_premise_name:e.string().min(1).nullish().describe("FURS business premise name (e.g., 'P1', 'STORE1'). Required unless skip=true."),electronic_device_name:e.string().min(1).nullish().describe("FURS electronic device name (e.g., 'E1', 'POS1'). Required unless skip=true."),operator_tax_number:e.string().nullish().describe("Operator tax number. If not provided and using user authentication, defaults to user's FURS settings."),operator_label:e.string().nullish().describe("Operator label/name. If not provided and using user authentication, defaults to user's FURS settings."),skip:e.boolean().nullish().describe("Skip FURS fiscalization. Only allowed for bank transfer payments or unpaid invoices. Cash/card/check payments always require fiscalization per Slovenian law.")}).nullish(),fina:e.object({business_premise_name:e.string().min(1).max(Ls).regex(Hs).nullish().describe("CIS business premise name (OznPosPr, alphanumeric, 1-20 chars). Required when CIS is enabled."),electronic_device_name:e.string().min(1).max(Ys).regex(Ks).nullish().describe("CIS electronic device name (OznNapUr, digits only, 1-20 chars). Required when CIS is enabled."),operator_oib:e.string().min($s).max(Qs).nullish().describe("Operator OIB (11 digits). If not provided and using user authentication, defaults to the user's FINA settings. Otherwise falls back to entity settings."),operator_label:e.string().nullish().describe("Operator label/name. If not provided and using user authentication, defaults to the user's FINA settings. Otherwise falls back to entity settings."),payment_type:e.union([e.literal("cash"),e.literal("card"),e.literal("online"),e.literal("bank_transfer"),e.literal("paypal"),e.literal("crypto"),e.literal("coupon"),e.literal("other"),e.literal(null)]).nullish().describe("Expected payment method for CIS (NacinPlac field). Optional when document payments are provided because the API derives it from the document payments; when multiple payments are present, FINA uses 'other'."),subsequent_submit:e.boolean().nullish().describe("Late/subsequent submission flag (NakDost). Set to true if submitting after the normal deadline.")}).nullish(),expected_total_with_tax:e.number().gt(Js).nullish().describe("Expected total with tax. When provided, the system calculates a rounding_correction to reconcile differences between the calculated total and this expected value. Maximum allowed correction is \xB11.00. Useful when importing invoices from external systems with different rounding rules.")}),Zs=10,Xs=100,Wge=e.object({limit:e.number().min(1).max(Xs).default(Zs).describe("Number of results per request."),next_cursor:e.string().optional().describe("Opaque cursor to fetch the next page of results. Reuse only with the same effective ordering. Use the value from pagination.next_cursor in the previous response."),prev_cursor:e.string().optional().describe("Opaque cursor to fetch the previous page of results. Reuse only with the same effective ordering. Use the value from pagination.prev_cursor in the previous response."),include_total_count:e.boolean().optional().describe("Whether to include the total count of items in `pagination.total`.\nDefault is `true`.\nWhen `false`, `pagination.total` returns -1 for better performance."),order_by:e.union([e.enum(["id","number","date","total","total_with_tax","created_at","updated_at","-id","-number","-date","-total","-total_with_tax","-created_at","-updated_at"]),e.array(e.enum(["id","number","date","total","total_with_tax","created_at","updated_at","-id","-number","-date","-total","-total_with_tax","-created_at","-updated_at"]))]).optional().describe("Sort by one field or provide a repeated array for multi-column ordering. Prefix a field with `-` for descending order. When paginating, reuse cursors only with the same effective ordering."),query:e.string().optional().describe('JSON query object for filtering results. Supports MongoDB-style operators.\n\n**Supported operators:**\n- `equals` or direct value - Exact match (default)\n- `gte` - Greater than or equal\n- `lte` - Less than or equal\n- `gt` - Greater than\n- `lt` - Less than\n- `in` - Value in array\n- `notIn` - Value not in array\n- `contains` - String contains (case-insensitive)\n- `startsWith` - String starts with\n- `endsWith` - String ends with\n- `between` - Value between two numbers/dates [min, max]\n\n**Allowed fields:** id, number, date, customer, customer.name, customer.email, customer.address, customer.city, customer.country, total, total_with_tax, items.name, items.description, payments.type, payments.date, document_relations.relation_type, document_relations.target_type, metadata, created_at, updated_at, paid_in_full, voided_at, paid_in_full, voided_at\n\n**Examples:**\n- `{"total": {"gte": 1000}}` - Invoices over 1000\n- `{"customer.name": {"contains": "Acme"}}` - Customer name contains "Acme"\n- `{"date": {"between": ["2025-01-01", "2025-12-31"]}}` - Date range'),search:e.string().optional().describe(`Full-text search query to filter results across multiple fields.
|
|
10
|
+
Searches are case-insensitive and match partial strings.
|
|
11
|
+
Searches across all text fields including names, descriptions, addresses, and metadata values.`),include:e.string().optional().describe("Comma-separated list of relations to include in the response.\n\n**Available relations:**\n- `payments` - Payment records linked to this advance invoice\n- `document_relations` - Linked documents (invoices, credit notes, etc.)\n\n**Usage:**\n`?include=payments`\n`?include=payments,document_relations`"),deleted:e.boolean().optional().describe("When true, returns only soft-deleted (trashed) items. Default false excludes deleted items.")}),Gge=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),er=36,tr=100,or=2,nr=2,sr="iban",rr=36,ir=2,ar=2,dr="iban",cr=500,lr=-140737488355328,ur=0x7fffffffffff,pr=-140737488355328,mr=0x7fffffffffff,gr=3,yr=36,hr=-2147483648,br=2147483647,xr=100,zr=-140737488355328,_r=0x7fffffffffff,vr=-140737488355328,fr=0x7fffffffffff,Rr=-140737488355328,Ir=0x7fffffffffff,Er=-140737488355328,Sr=0x7fffffffffff,Dr=0,Pr=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,wr=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,Cr=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,Ar=36,Mr=500,Tr=50,kr=0,Br="percent",Nr=5,Or=-140737488355328,Fr=0x7fffffffffff,Ur=-140737488355328,jr=0x7fffffffffff,qr=36,Wr=36,Gr=36,Vge=e.object({data:e.array(e.object({id:e.string().max(er),number:e.string().max(tr),is_draft:e.boolean().describe("Whether this is a draft document. Draft documents have no sequential number assigned, skip fiscalization, and can be deleted. Use POST /{documents}/{id}/finalize to assign a number and finalize."),date:e.iso.datetime({}).describe("Date the advance invoice was created (ISO 8601 datetime at midnight UTC)"),issuer:e.object({name:e.string().nullish(),email:e.email().nullish(),address:e.string().nullish(),address_2:e.string().nullish(),post_code:e.string().nullish(),city:e.string().nullish(),state:e.string().nullish(),country:e.string().nullish(),country_code:e.string().min(or).max(nr).nullish(),tax_number:e.string().nullish(),tax_number_2:e.string().nullish(),company_number:e.string().nullish(),phone:e.string().nullish(),peppol_id:e.string().nullish(),is_end_consumer:e.boolean().nullish(),bank_account:e.object({type:e.enum(["iban","us_domestic","uk_domestic","other"]).default(sr).describe("Account type determines which fields are used"),name:e.string().nullish().describe("Display name for this account. Falls back to account number if not set"),bank_name:e.string().nullish().describe("Bank name"),iban:e.string().nullish().describe("IBAN (for type=iban)"),account_number:e.string().nullish().describe("Account number (for us_domestic, uk_domestic, other)"),bic:e.string().nullish().describe("BIC/SWIFT code for international transfers"),routing_number:e.string().nullish().describe("US ABA routing number (for type=us_domestic)"),sort_code:e.string().nullish().describe("UK sort code (for type=uk_domestic)")}).nullish()}).describe("Document issuer (entity) information"),customer_id:e.string().max(rr).nullish(),customer:e.object({name:e.string().nullish(),email:e.email().nullish(),address:e.string().nullish(),address_2:e.string().nullish(),post_code:e.string().nullish(),city:e.string().nullish(),state:e.string().nullish(),country:e.string().nullish(),country_code:e.string().min(ir).max(ar).nullish(),tax_number:e.string().nullish(),tax_number_2:e.string().nullish(),company_number:e.string().nullish(),phone:e.string().nullish(),peppol_id:e.string().nullish(),is_end_consumer:e.boolean().nullish(),bank_account:e.object({type:e.enum(["iban","us_domestic","uk_domestic","other"]).default(dr).describe("Account type determines which fields are used"),name:e.string().nullish().describe("Display name for this account. Falls back to account number if not set"),bank_name:e.string().nullish().describe("Bank name"),iban:e.string().nullish().describe("IBAN (for type=iban)"),account_number:e.string().nullish().describe("Account number (for us_domestic, uk_domestic, other)"),bic:e.string().nullish().describe("BIC/SWIFT code for international transfers"),routing_number:e.string().nullish().describe("US ABA routing number (for type=us_domestic)"),sort_code:e.string().nullish().describe("UK sort code (for type=uk_domestic)")}).nullish()}).nullish().describe("Customer information"),note:e.string().nullish().describe("Note for the document. If not provided, defaults to entity's document-type-specific note setting. Pass empty string to explicitly set no note."),tax_clause:e.string().nullish().describe("Tax clause for the document. Auto-populated based on transaction type if tax_clause_defaults are configured in entity settings. Pass empty string to explicitly set no clause."),footer:e.string().max(cr).nullish(),signature:e.string().nullish().describe("Signature text for the document (e.g. 'John Smith, CEO'). If not provided, defaults to entity's default_document_signature setting. Pass empty string to explicitly set no signature."),total:e.number().min(lr).max(ur),total_with_tax:e.number().min(pr).max(mr),total_discount:e.number().describe("Document discount total stored as a net-equivalent amount for compatibility. In `b2b_standard`, this is the net value of line-item discounts applied before tax. In `b2c_gross_discount`, gross discounts are converted back to their net-equivalent value here. 0 when no discounts applied."),creation_source:e.enum(["standard","custom"]).describe("Internal origin of the create request. `standard` means a normal create endpoint calculated the totals. `custom` means the document was created through a `/custom` endpoint."),calculation_mode:e.enum(["b2b_standard","b2c_gross_discount"]).describe("Resolved calculation mode used for this document. Stored on the document so recalculation and rendering remain stable even if entity defaults change later."),taxes:e.array(e.object({rate:e.number().nullable(),tax_id:e.string().nullish(),base:e.number(),amount:e.number(),reverse_charge:e.boolean().nullish()})).describe("Applied taxes summary"),currency_code:e.string().max(gr),entity_id:e.string().max(yr),date_year:e.number().min(hr).max(br),shareable_id:e.string().max(xr).nullish(),voided_at:e.iso.datetime({}).nullish(),transaction_type:e.union([e.literal("domestic"),e.literal("intra_eu_b2b"),e.literal("intra_eu_b2c"),e.literal("3w_b2b"),e.literal("3w_b2c"),e.literal("export"),e.literal(null)]).nullish().describe("Transaction type for VAT purposes (domestic, intra_eu_b2b, intra_eu_b2c, export). Always determined based on issuer/customer countries."),metadata:e.record(e.string(),e.string()).nullish().describe("Custom key-value data for your own use. Store any JSON object up to 50 properties. Values must be strings up to 250 characters. Useful for storing external IDs, tags, or integration data."),exchange_rate:e.object({rate:e.number().describe("Exchange rate used for conversion"),source:e.string().describe("Source of the exchange rate (e.g., 'Frankfurter')"),date:e.iso.datetime({}).describe("Date of the exchange rate"),quote_currency:e.string().describe("Quote currency (the base currency converted to)")}).nullish().describe("Currency exchange rate information if conversion was applied"),total_converted:e.number().min(zr).max(_r).nullish(),total_with_tax_converted:e.number().min(vr).max(fr).nullish(),rounding_correction:e.number().nullish().describe("Rounding correction applied to reconcile differences between calculated total_with_tax and expected_total_with_tax. Only present when expected_total_with_tax was provided during creation."),eslog:e.object({validation_enabled:e.boolean().nullish().describe("Override entity default: true = validate, false = skip, null = use entity setting"),validation_status:e.union([e.literal("valid"),e.literal("invalid"),e.literal("not_validated"),e.literal(null)]).nullish().describe("Validation status: 'valid', 'invalid', or 'not_validated'"),validation_errors:e.array(e.string()).nullish().describe("Array of validation error messages (if status is 'invalid')"),validated_at:e.string().nullish().describe("ISO timestamp when validation was last performed")}).nullish().describe("e-SLOG 2.0 validation data for Slovenian electronic invoices. Only applicable when entity.country_code = 'SI' and eslog validation is enabled."),reference:e.string().nullish().describe("Custom reference for the document (e.g., purchase order number, payment reference). When set, used as the UPN payment reference instead of the auto-generated one."),vies:e.object({warning:e.string().nullable().describe("Warning message if VIES validation was unavailable or the VAT number was invalid. Document creation proceeds but this indicates the transaction type may need review."),skipped:e.boolean().nullable().describe("True when VIES validation was skipped due to entity settings (vies_validate_vat: false) but would normally apply. Used for audit trail.")}).nullish().describe("VIES validation info including any warnings and skipped indicator for audit trail"),deleted_at:e.iso.datetime({}).nullish().describe("Timestamp when the document was soft-deleted. Null if not deleted."),created_at:e.iso.datetime({}),updated_at:e.iso.datetime({}),total_paid:e.number().min(Rr).max(Ir),total_due:e.number().min(Er).max(Sr),paid_in_full:e.boolean(),furs:e.object({status:e.enum(["pending","success","failed","skipped"]),fiscalized_at:e.iso.datetime({}).optional(),error:e.string().optional(),cancellation_reason:e.string().optional(),data:e.object({zoi:e.string(),eor:e.string().optional(),qr_code:e.string().optional(),business_premise_name:e.string(),electronic_device_name:e.string(),invoice_number:e.string(),iteration:e.number().default(Dr),payload:e.record(e.string(),e.unknown()).describe("FURS API request payload"),issuer_tax_number:e.string().optional(),operator_tax_number:e.string().optional(),operator_label:e.string().optional(),foreign_operator:e.boolean().optional(),cancelled:e.boolean().optional(),cancelled_eor:e.string().optional(),cancellation_payload:e.record(e.string(),e.unknown()).optional().describe("FURS API cancellation payload")}).optional()}).nullish().describe("FURS (Slovenia) fiscalization data. Read-only field, not editable via API. Includes status, premise name, device name, and FURS identifiers (ZOI, EOR, QR code)."),fina:e.object({status:e.enum(["pending","success","failed"]),fiscalized_at:e.iso.datetime({}).optional(),error:e.string().optional(),data:e.object({zki:e.string(),jir:e.string().optional(),qr_code_url:e.string().optional(),business_premise_name:e.string(),electronic_device_name:e.string(),invoice_number:e.string(),operator_oib:e.string().optional(),payment_type:e.string().optional(),numbering_sequence:e.string().optional(),payload:e.record(e.string(),e.unknown()).describe("CIS SOAP request payload"),subsequent_submit:e.boolean().optional(),issuer_oib:e.string().optional(),operator_label:e.string().optional()}).optional()}).nullish().describe("FINA (Croatia) CIS fiscalization data. Read-only field. Includes status, business premise name, electronic device name, and CIS identifiers (ZKI, JIR, QR code URL)."),pt:e.union([e.string(),e.number(),e.boolean(),e.null(),e.record(e.string(),e.unknown()),e.array(e.unknown())]).optional(),date_due:e.string().regex(Pr).nullish().describe("Document due date in YYYY-MM-DD format"),date_service:e.string().regex(wr).nullish().describe("Service date in YYYY-MM-DD format. For invoices and credit notes."),date_service_to:e.string().regex(Cr).nullish().describe("Service period end date in YYYY-MM-DD format. For invoices and credit notes. Use with date_service for date ranges."),payment_terms:e.string().nullish().describe("Payment terms for the document. If not provided, defaults to entity's document-type-specific payment terms setting. Pass empty string to explicitly set no terms."),items:e.array(e.object({id:e.string().max(Ar),type:e.union([e.literal("separator"),e.literal(null)]).nullish().describe("Item type. null = regular line item, 'separator' = visual section header."),name:e.string().max(Mr),description:e.string().nullable(),classification:e.union([e.literal("product"),e.literal("service"),e.literal("advance"),e.literal(null)]).nullish().describe("Item classification used for Portugal SAF-T product typing."),price:e.number().nullish().describe("Per-unit net price (before tax). Always stores net price. Null for separator items."),gross_price:e.number().nullish().describe(`Per-unit gross price (includes tax).
|
|
12
|
+
Only present if user originally sent gross price.
|
|
13
|
+
Use gross pricing to keep invoice totals stable when VIES reverse charge is applied.`),quantity:e.number().nullish().describe("Item quantity. Null for separator items."),unit:e.string().max(Tr).nullish(),taxes:e.array(e.object({rate:e.number().nullish(),tax_id:e.string().nullish(),classification:e.string().nullish(),reverse_charge:e.boolean().nullish(),amount:e.number().nullish(),pt_exemption_code:e.string().nullish(),pt_exemption_reason:e.string().nullish()}).describe("Document Item Tax")).describe("Applied taxes (provide rate to create new tax, or tax_id to use existing tax)"),discounts:e.array(e.object({value:e.number().min(kr).describe("Discount value"),type:e.enum(["percent","amount"]).default(Br).describe("Discount type: 'percent' (default) or 'amount'")})).max(Nr).describe("Line discounts (max 5) in request order. In `b2b_standard`, percentage discounts are calculated from the original line subtotal and fixed amounts are summed before tax. In `b2c_gross_discount`, discounts are applied sequentially to the running gross subtotal."),total:e.number().nullish().describe("Line total before tax. Null for separator items."),total_with_tax:e.number().nullish().describe("Line total after tax. Null for separator items."),total_converted:e.number().min(Or).max(Fr).nullish(),total_with_tax_converted:e.number().min(Ur).max(jr).nullish(),advance_invoice_id:e.string().max(qr).nullish(),delivery_note_id:e.string().max(Wr).nullish(),item_id:e.string().max(Gr).nullish(),metadata:e.record(e.string(),e.string()).nullish().describe("Custom key-value data for your own use. Store any JSON object up to 50 properties. Values must be strings up to 250 characters. Useful for storing external IDs, tags, or integration data."),created_at:e.iso.datetime({}),updated_at:e.iso.datetime({})})),document_relations:e.array(e.object({id:e.string(),source_type:e.enum(["invoice","estimate","credit_note","advance_invoice","delivery_note"]).describe("Type of document"),source_id:e.string(),target_type:e.enum(["invoice","estimate","credit_note","advance_invoice","delivery_note"]).describe("Type of document"),target_id:e.string(),relation_type:e.string(),entity_id:e.string(),created_at:e.iso.datetime({}),linked_document_voided_at:e.iso.datetime({}).nullish(),related_document:e.object({id:e.string(),type:e.enum(["invoice","estimate","credit_note","advance_invoice","delivery_note"]).describe("Type of document"),number:e.string(),date:e.string(),total_with_tax:e.number(),currency_code:e.string(),is_draft:e.boolean(),voided_at:e.string().nullable(),paid_in_full:e.boolean().nullable(),title_type:e.union([e.literal("estimate"),e.literal("proforma_invoice"),e.literal(null)]).nullable(),hide_prices:e.boolean().nullable()}).optional()})).optional()}).describe("Advance invoice for prepayments")),pagination:e.object({total:e.number().describe("Total number of items available in the collection"),next_cursor:e.string().nullable().describe("Opaque cursor for fetching the next page. It encodes the resolved sort tuple for the current result set, so reuse it only with the same effective ordering. Null if no more results are available."),prev_cursor:e.string().nullable().describe("Opaque cursor for fetching the previous page. It encodes the resolved sort tuple for the current result set, so reuse it only with the same effective ordering. Null if at the first page."),has_more:e.boolean().describe("Indicates whether more results are available after the current page")}).describe("Pagination metadata including cursors and result counts")}),Lge=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),Vr=2,Lr=2,Hr="iban",Yr=2,Kr=2,$r="iban",Qr=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,Jr=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,Zr=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,Xr=2e3,ei=50,ti=0,oi="percent",ni=5,si=36,ri=36,ii=0,ai=20,di=/^[0-9a-zA-Z]{1,20}$/,ci=20,li=/^\d{1,20}$/,ui=11,pi=11,Hge=e.object({is_draft:e.boolean().nullish(),date:e.string().nullish(),issuer:e.object({name:e.string().nullish(),email:e.email().nullish(),address:e.string().nullish(),address_2:e.string().nullish(),post_code:e.string().nullish(),city:e.string().nullish(),state:e.string().nullish(),country:e.string().nullish(),country_code:e.string().min(Vr).max(Lr).nullish(),tax_number:e.string().nullish(),tax_number_2:e.string().nullish(),company_number:e.string().nullish(),phone:e.string().nullish(),peppol_id:e.string().nullish(),is_end_consumer:e.boolean().nullish(),bank_account:e.object({type:e.enum(["iban","us_domestic","uk_domestic","other"]).default(Hr).describe("Account type determines which fields are used"),name:e.string().nullish().describe("Display name for this account. Falls back to account number if not set"),bank_name:e.string().nullish().describe("Bank name"),iban:e.string().nullish().describe("IBAN (for type=iban)"),account_number:e.string().nullish().describe("Account number (for us_domestic, uk_domestic, other)"),bic:e.string().nullish().describe("BIC/SWIFT code for international transfers"),routing_number:e.string().nullish().describe("US ABA routing number (for type=us_domestic)"),sort_code:e.string().nullish().describe("UK sort code (for type=uk_domestic)")}).nullish()}).describe("Document issuer (entity) information").and(e.looseObject({}).nullable()).optional(),customer_id:e.string().nullish().describe("Referenced Customer ID."),customer:e.object({name:e.string().nullish(),email:e.email().nullish(),address:e.string().nullish(),address_2:e.string().nullish(),post_code:e.string().nullish(),city:e.string().nullish(),state:e.string().nullish(),country:e.string().nullish(),country_code:e.string().min(Yr).max(Kr).nullish(),tax_number:e.string().nullish(),tax_number_2:e.string().nullish(),company_number:e.string().nullish(),phone:e.string().nullish(),peppol_id:e.string().nullish(),is_end_consumer:e.boolean().nullish(),bank_account:e.object({type:e.enum(["iban","us_domestic","uk_domestic","other"]).default($r).describe("Account type determines which fields are used"),name:e.string().nullish().describe("Display name for this account. Falls back to account number if not set"),bank_name:e.string().nullish().describe("Bank name"),iban:e.string().nullish().describe("IBAN (for type=iban)"),account_number:e.string().nullish().describe("Account number (for us_domestic, uk_domestic, other)"),bic:e.string().nullish().describe("BIC/SWIFT code for international transfers"),routing_number:e.string().nullish().describe("US ABA routing number (for type=us_domestic)"),sort_code:e.string().nullish().describe("UK sort code (for type=uk_domestic)")}).nullish()}).describe("Document issuer (entity) information").and(e.object({save_customer:e.boolean().nullish().describe("Whether to save (create new or update existing) the customer data.\nDefaults to `true` (best-effort).\nWhen `true` with `customer_id`, updates the existing customer.\nWhen `true` without `customer_id`, checks for duplicate customers using customer identifiers (tax/company number, country-aware when available) and reuses the existing customer if found, otherwise creates a new customer.\nWhen `false`, customer data is stored inline on the document only.\nWhen omitted, behaves like `true` but won't fail the request if persistence fails.")}).nullable()).optional().describe("Customer recipient of the document.\nBoth `customer` and `customer_id` are optional - documents can be created without customer information.\nIf both `customer_id` and `customer` are provided with `save_customer=true`, the existing customer will be updated.\nIf only `customer` is provided with `save_customer=true` (or by default), the system checks for duplicates using customer identifiers and reuses existing customers when found."),note:e.string().nullish(),tax_clause:e.string().nullish(),footer:e.string().nullish(),signature:e.string().nullish(),calculation_mode:e.union([e.literal("b2b_standard"),e.literal("b2c_gross_discount"),e.literal(null)]).nullish().describe("Optional calculation mode override. When omitted, the entity default is used and falls back to `b2b_standard`."),currency_code:e.string().nullish(),metadata:e.record(e.string(),e.string()).nullish().describe("Custom key-value data for your own use. Store any JSON object up to 50 properties. Values must be strings up to 250 characters. Useful for storing external IDs, tags, or integration data."),reference:e.string().nullish(),pt:e.union([e.string(),e.number(),e.boolean(),e.null(),e.record(e.string(),e.unknown()),e.array(e.unknown())]).optional(),date_due:e.string().regex(Qr).nullish().describe("Document due date in YYYY-MM-DD format"),date_service:e.string().regex(Jr).nullish().describe("Service date in YYYY-MM-DD format. For invoices and credit notes."),date_service_to:e.string().regex(Zr).nullish().describe("Service period end date in YYYY-MM-DD format. For invoices and credit notes. Use with date_service for date ranges."),items:e.array(e.object({type:e.union([e.literal("separator"),e.literal(null)]).nullish().describe(`Item type. Omit or null for regular line item, 'separator' for a visual section header.
|
|
14
|
+
Separator items only use name and description \u2014 all financial fields are ignored.`),name:e.string().min(1).nullish().describe("Item name. Required unless `item_id` is provided.\nFor separator items, this is the section title (always required)."),description:e.string().max(Xr).nullish(),classification:e.union([e.literal("product"),e.literal("service"),e.literal("advance"),e.literal(null)]).nullish().describe("Item classification used for Portugal SAF-T product typing."),price:e.number().nullish().describe("Net price per unit (before tax). Optional for custom documents. Ignored for separator items."),gross_price:e.number().nullish().describe("Gross price per unit (includes tax). Optional for custom documents. Ignored for separator items."),quantity:e.number().nullish().describe("Item quantity. Null for separator items."),unit:e.string().max(ei).nullish(),taxes:e.array(e.object({rate:e.number().nullish(),tax_id:e.string().nullish(),classification:e.string().nullish(),reverse_charge:e.boolean().nullish(),amount:e.number().nullish(),pt_exemption_code:e.string().nullish(),pt_exemption_reason:e.string().nullish()}).describe("Document Item Tax")).optional().describe("Applied taxes (provide rate to create new tax, or tax_id to use existing tax)"),discounts:e.array(e.object({value:e.number().min(ti).describe("Discount value"),type:e.enum(["percent","amount"]).default(oi).describe("Discount type: 'percent' (default) or 'amount'")})).max(ni).optional().describe("Line discounts (max 5) in request order. In `b2b_standard`, percentage discounts are calculated from the original line subtotal and fixed amounts are summed before tax. In `b2c_gross_discount`, discounts are applied sequentially to the running gross subtotal."),total:e.number().nullish().describe("Pre-calculated total for this line item (before tax). Ignored for separator items."),total_with_tax:e.number().nullish().describe("Pre-calculated total for this line item (after tax). Ignored for separator items."),item_id:e.string().nullish().describe(`ID of a catalog item to prefill from.
|
|
15
|
+
When provided, the item's name, description, price, and taxes are used as defaults.
|
|
16
|
+
Any field you provide will override the catalog item's value.
|
|
17
|
+
Not applicable for separator items.`),metadata:e.record(e.string(),e.string()).nullish().describe("Custom key-value data for your own use. Store any JSON object up to 50 properties. Values must be strings up to 250 characters. Useful for storing external IDs, tags, or integration data."),save_item:e.boolean().nullish().describe(`Whether to save this item to the catalog.
|
|
18
|
+
When true without item_id, matches by exact name and reuses existing, or creates a new catalog item.
|
|
19
|
+
Defaults to true (best-effort). When omitted, behaves like true but won't fail the request if persistence fails.`)})).min(1).describe("Line items with pre-calculated totals. At least one item is required."),total:e.number().describe("Pre-calculated document total (before tax)."),total_with_tax:e.number().describe("Pre-calculated document total (after tax)."),total_discount:e.number().nullish().describe("Pre-calculated total net discount amount. Defaults to 0 if not provided."),taxes:e.array(e.object({rate:e.number().nullable(),tax_id:e.string().nullish(),base:e.number(),amount:e.number(),reverse_charge:e.boolean().nullish()})).optional().describe("Pre-calculated tax summary. If not provided, defaults to empty array."),linked_documents:e.array(e.string().min(1)).nullish().describe("Link this advance invoice to other documents."),payments:e.array(e.object({incoming_purchase_document_id:e.string().max(si).nullish(),applied_to_incoming_purchase_document_id:e.string().max(ri).nullish(),amount:e.number().gt(ii).nullish().describe("Payment amount. If not provided, uses the document total (total_with_tax)"),type:e.enum(["cash","bank_transfer","card","check","paypal","coupon","other","credit_note","advance"]).describe("Payment type/method"),date:e.string().nullish().describe("Payment date in YYYY-MM-DD format. Defaults to today."),tag:e.string().nullish(),reference:e.string().nullish(),note:e.string().nullish(),metadata:e.record(e.string(),e.string()).nullish().describe("Custom key-value data for your own use. Store any JSON object up to 50 properties. Values must be strings up to 250 characters. Useful for storing external IDs, tags, or integration data.")})).nullish().describe("Payments to record with the advance invoice. Required for non-draft advance invoices. If amounts are not provided, the total is split equally. Automatically updates payment status."),furs:e.object({business_premise_name:e.string().min(1).nullish().describe("FURS business premise name (e.g., 'P1', 'STORE1'). Required unless skip=true."),electronic_device_name:e.string().min(1).nullish().describe("FURS electronic device name (e.g., 'E1', 'POS1'). Required unless skip=true."),operator_tax_number:e.string().nullish().describe("Operator tax number. If not provided and using user authentication, defaults to user's FURS settings."),operator_label:e.string().nullish().describe("Operator label/name. If not provided and using user authentication, defaults to user's FURS settings."),skip:e.boolean().nullish().describe("Skip FURS fiscalization. Only allowed for bank transfer payments or unpaid invoices. Cash/card/check payments always require fiscalization per Slovenian law.")}).nullish(),fina:e.object({business_premise_name:e.string().min(1).max(ai).regex(di).nullish().describe("CIS business premise name (OznPosPr, alphanumeric, 1-20 chars). Required when CIS is enabled."),electronic_device_name:e.string().min(1).max(ci).regex(li).nullish().describe("CIS electronic device name (OznNapUr, digits only, 1-20 chars). Required when CIS is enabled."),operator_oib:e.string().min(ui).max(pi).nullish().describe("Operator OIB (11 digits). If not provided and using user authentication, defaults to the user's FINA settings. Otherwise falls back to entity settings."),operator_label:e.string().nullish().describe("Operator label/name. If not provided and using user authentication, defaults to the user's FINA settings. Otherwise falls back to entity settings."),payment_type:e.union([e.literal("cash"),e.literal("card"),e.literal("online"),e.literal("bank_transfer"),e.literal("paypal"),e.literal("crypto"),e.literal("coupon"),e.literal("other"),e.literal(null)]).nullish().describe("Expected payment method for CIS (NacinPlac field). Optional when document payments are provided because the API derives it from the document payments; when multiple payments are present, FINA uses 'other'."),subsequent_submit:e.boolean().nullish().describe("Late/subsequent submission flag (NakDost). Set to true if submitting after the normal deadline.")}).nullish()}),mi=/^[a-z]{3,4}_[0-9a-f]{24}$/,Yge=e.object({id:e.stringFormat("resource-id",mi).describe("Unique resource identifier")}),Kge=e.object({include:e.string().optional().describe("Comma-separated list of relations to include in the response.\n\n**Available relations:**\n- `payments` - Payment records linked to this advance invoice\n- `document_relations` - Linked documents (invoices, credit notes, etc.)\n\n**Usage:**\n`?include=payments`\n`?include=payments,document_relations`")}),$ge=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),gi=36,yi=100,hi=2,bi=2,xi="iban",zi=36,_i=2,vi=2,fi="iban",Ri=500,Ii=-140737488355328,Ei=0x7fffffffffff,Si=-140737488355328,Di=0x7fffffffffff,Pi=3,wi=36,Ci=-2147483648,Ai=2147483647,Mi=100,Ti=-140737488355328,ki=0x7fffffffffff,Bi=-140737488355328,Ni=0x7fffffffffff,Oi=-140737488355328,Fi=0x7fffffffffff,Ui=-140737488355328,ji=0x7fffffffffff,qi=0,Wi=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,Gi=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,Vi=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,Li=36,Hi=500,Yi=50,Ki=0,$i="percent",Qi=5,Ji=-140737488355328,Zi=0x7fffffffffff,Xi=-140737488355328,ea=0x7fffffffffff,ta=36,oa=36,na=36,Qge=e.object({id:e.string().max(gi),number:e.string().max(yi),is_draft:e.boolean().describe("Whether this is a draft document. Draft documents have no sequential number assigned, skip fiscalization, and can be deleted. Use POST /{documents}/{id}/finalize to assign a number and finalize."),date:e.iso.datetime({}).describe("Date the advance invoice was created (ISO 8601 datetime at midnight UTC)"),issuer:e.object({name:e.string().nullish(),email:e.email().nullish(),address:e.string().nullish(),address_2:e.string().nullish(),post_code:e.string().nullish(),city:e.string().nullish(),state:e.string().nullish(),country:e.string().nullish(),country_code:e.string().min(hi).max(bi).nullish(),tax_number:e.string().nullish(),tax_number_2:e.string().nullish(),company_number:e.string().nullish(),phone:e.string().nullish(),peppol_id:e.string().nullish(),is_end_consumer:e.boolean().nullish(),bank_account:e.object({type:e.enum(["iban","us_domestic","uk_domestic","other"]).default(xi).describe("Account type determines which fields are used"),name:e.string().nullish().describe("Display name for this account. Falls back to account number if not set"),bank_name:e.string().nullish().describe("Bank name"),iban:e.string().nullish().describe("IBAN (for type=iban)"),account_number:e.string().nullish().describe("Account number (for us_domestic, uk_domestic, other)"),bic:e.string().nullish().describe("BIC/SWIFT code for international transfers"),routing_number:e.string().nullish().describe("US ABA routing number (for type=us_domestic)"),sort_code:e.string().nullish().describe("UK sort code (for type=uk_domestic)")}).nullish()}).describe("Document issuer (entity) information"),customer_id:e.string().max(zi).nullish(),customer:e.object({name:e.string().nullish(),email:e.email().nullish(),address:e.string().nullish(),address_2:e.string().nullish(),post_code:e.string().nullish(),city:e.string().nullish(),state:e.string().nullish(),country:e.string().nullish(),country_code:e.string().min(_i).max(vi).nullish(),tax_number:e.string().nullish(),tax_number_2:e.string().nullish(),company_number:e.string().nullish(),phone:e.string().nullish(),peppol_id:e.string().nullish(),is_end_consumer:e.boolean().nullish(),bank_account:e.object({type:e.enum(["iban","us_domestic","uk_domestic","other"]).default(fi).describe("Account type determines which fields are used"),name:e.string().nullish().describe("Display name for this account. Falls back to account number if not set"),bank_name:e.string().nullish().describe("Bank name"),iban:e.string().nullish().describe("IBAN (for type=iban)"),account_number:e.string().nullish().describe("Account number (for us_domestic, uk_domestic, other)"),bic:e.string().nullish().describe("BIC/SWIFT code for international transfers"),routing_number:e.string().nullish().describe("US ABA routing number (for type=us_domestic)"),sort_code:e.string().nullish().describe("UK sort code (for type=uk_domestic)")}).nullish()}).nullish().describe("Customer information"),note:e.string().nullish().describe("Note for the document. If not provided, defaults to entity's document-type-specific note setting. Pass empty string to explicitly set no note."),tax_clause:e.string().nullish().describe("Tax clause for the document. Auto-populated based on transaction type if tax_clause_defaults are configured in entity settings. Pass empty string to explicitly set no clause."),footer:e.string().max(Ri).nullish(),signature:e.string().nullish().describe("Signature text for the document (e.g. 'John Smith, CEO'). If not provided, defaults to entity's default_document_signature setting. Pass empty string to explicitly set no signature."),total:e.number().min(Ii).max(Ei),total_with_tax:e.number().min(Si).max(Di),total_discount:e.number().describe("Document discount total stored as a net-equivalent amount for compatibility. In `b2b_standard`, this is the net value of line-item discounts applied before tax. In `b2c_gross_discount`, gross discounts are converted back to their net-equivalent value here. 0 when no discounts applied."),creation_source:e.enum(["standard","custom"]).describe("Internal origin of the create request. `standard` means a normal create endpoint calculated the totals. `custom` means the document was created through a `/custom` endpoint."),calculation_mode:e.enum(["b2b_standard","b2c_gross_discount"]).describe("Resolved calculation mode used for this document. Stored on the document so recalculation and rendering remain stable even if entity defaults change later."),taxes:e.array(e.object({rate:e.number().nullable(),tax_id:e.string().nullish(),base:e.number(),amount:e.number(),reverse_charge:e.boolean().nullish()})).describe("Applied taxes summary"),currency_code:e.string().max(Pi),entity_id:e.string().max(wi),date_year:e.number().min(Ci).max(Ai),shareable_id:e.string().max(Mi).nullish(),voided_at:e.iso.datetime({}).nullish(),transaction_type:e.union([e.literal("domestic"),e.literal("intra_eu_b2b"),e.literal("intra_eu_b2c"),e.literal("3w_b2b"),e.literal("3w_b2c"),e.literal("export"),e.literal(null)]).nullish().describe("Transaction type for VAT purposes (domestic, intra_eu_b2b, intra_eu_b2c, export). Always determined based on issuer/customer countries."),metadata:e.record(e.string(),e.string()).nullish().describe("Custom key-value data for your own use. Store any JSON object up to 50 properties. Values must be strings up to 250 characters. Useful for storing external IDs, tags, or integration data."),exchange_rate:e.object({rate:e.number().describe("Exchange rate used for conversion"),source:e.string().describe("Source of the exchange rate (e.g., 'Frankfurter')"),date:e.iso.datetime({}).describe("Date of the exchange rate"),quote_currency:e.string().describe("Quote currency (the base currency converted to)")}).nullish().describe("Currency exchange rate information if conversion was applied"),total_converted:e.number().min(Ti).max(ki).nullish(),total_with_tax_converted:e.number().min(Bi).max(Ni).nullish(),rounding_correction:e.number().nullish().describe("Rounding correction applied to reconcile differences between calculated total_with_tax and expected_total_with_tax. Only present when expected_total_with_tax was provided during creation."),eslog:e.object({validation_enabled:e.boolean().nullish().describe("Override entity default: true = validate, false = skip, null = use entity setting"),validation_status:e.union([e.literal("valid"),e.literal("invalid"),e.literal("not_validated"),e.literal(null)]).nullish().describe("Validation status: 'valid', 'invalid', or 'not_validated'"),validation_errors:e.array(e.string()).nullish().describe("Array of validation error messages (if status is 'invalid')"),validated_at:e.string().nullish().describe("ISO timestamp when validation was last performed")}).nullish().describe("e-SLOG 2.0 validation data for Slovenian electronic invoices. Only applicable when entity.country_code = 'SI' and eslog validation is enabled."),reference:e.string().nullish().describe("Custom reference for the document (e.g., purchase order number, payment reference). When set, used as the UPN payment reference instead of the auto-generated one."),vies:e.object({warning:e.string().nullable().describe("Warning message if VIES validation was unavailable or the VAT number was invalid. Document creation proceeds but this indicates the transaction type may need review."),skipped:e.boolean().nullable().describe("True when VIES validation was skipped due to entity settings (vies_validate_vat: false) but would normally apply. Used for audit trail.")}).nullish().describe("VIES validation info including any warnings and skipped indicator for audit trail"),deleted_at:e.iso.datetime({}).nullish().describe("Timestamp when the document was soft-deleted. Null if not deleted."),created_at:e.iso.datetime({}),updated_at:e.iso.datetime({}),total_paid:e.number().min(Oi).max(Fi),total_due:e.number().min(Ui).max(ji),paid_in_full:e.boolean(),furs:e.object({status:e.enum(["pending","success","failed","skipped"]),fiscalized_at:e.iso.datetime({}).optional(),error:e.string().optional(),cancellation_reason:e.string().optional(),data:e.object({zoi:e.string(),eor:e.string().optional(),qr_code:e.string().optional(),business_premise_name:e.string(),electronic_device_name:e.string(),invoice_number:e.string(),iteration:e.number().default(qi),payload:e.record(e.string(),e.unknown()).describe("FURS API request payload"),issuer_tax_number:e.string().optional(),operator_tax_number:e.string().optional(),operator_label:e.string().optional(),foreign_operator:e.boolean().optional(),cancelled:e.boolean().optional(),cancelled_eor:e.string().optional(),cancellation_payload:e.record(e.string(),e.unknown()).optional().describe("FURS API cancellation payload")}).optional()}).nullish().describe("FURS (Slovenia) fiscalization data. Read-only field, not editable via API. Includes status, premise name, device name, and FURS identifiers (ZOI, EOR, QR code)."),fina:e.object({status:e.enum(["pending","success","failed"]),fiscalized_at:e.iso.datetime({}).optional(),error:e.string().optional(),data:e.object({zki:e.string(),jir:e.string().optional(),qr_code_url:e.string().optional(),business_premise_name:e.string(),electronic_device_name:e.string(),invoice_number:e.string(),operator_oib:e.string().optional(),payment_type:e.string().optional(),numbering_sequence:e.string().optional(),payload:e.record(e.string(),e.unknown()).describe("CIS SOAP request payload"),subsequent_submit:e.boolean().optional(),issuer_oib:e.string().optional(),operator_label:e.string().optional()}).optional()}).nullish().describe("FINA (Croatia) CIS fiscalization data. Read-only field. Includes status, business premise name, electronic device name, and CIS identifiers (ZKI, JIR, QR code URL)."),pt:e.union([e.string(),e.number(),e.boolean(),e.null(),e.record(e.string(),e.unknown()),e.array(e.unknown())]).optional(),date_due:e.string().regex(Wi).nullish().describe("Document due date in YYYY-MM-DD format"),date_service:e.string().regex(Gi).nullish().describe("Service date in YYYY-MM-DD format. For invoices and credit notes."),date_service_to:e.string().regex(Vi).nullish().describe("Service period end date in YYYY-MM-DD format. For invoices and credit notes. Use with date_service for date ranges."),payment_terms:e.string().nullish().describe("Payment terms for the document. If not provided, defaults to entity's document-type-specific payment terms setting. Pass empty string to explicitly set no terms."),items:e.array(e.object({id:e.string().max(Li),type:e.union([e.literal("separator"),e.literal(null)]).nullish().describe("Item type. null = regular line item, 'separator' = visual section header."),name:e.string().max(Hi),description:e.string().nullable(),classification:e.union([e.literal("product"),e.literal("service"),e.literal("advance"),e.literal(null)]).nullish().describe("Item classification used for Portugal SAF-T product typing."),price:e.number().nullish().describe("Per-unit net price (before tax). Always stores net price. Null for separator items."),gross_price:e.number().nullish().describe(`Per-unit gross price (includes tax).
|
|
20
|
+
Only present if user originally sent gross price.
|
|
21
|
+
Use gross pricing to keep invoice totals stable when VIES reverse charge is applied.`),quantity:e.number().nullish().describe("Item quantity. Null for separator items."),unit:e.string().max(Yi).nullish(),taxes:e.array(e.object({rate:e.number().nullish(),tax_id:e.string().nullish(),classification:e.string().nullish(),reverse_charge:e.boolean().nullish(),amount:e.number().nullish(),pt_exemption_code:e.string().nullish(),pt_exemption_reason:e.string().nullish()}).describe("Document Item Tax")).describe("Applied taxes (provide rate to create new tax, or tax_id to use existing tax)"),discounts:e.array(e.object({value:e.number().min(Ki).describe("Discount value"),type:e.enum(["percent","amount"]).default($i).describe("Discount type: 'percent' (default) or 'amount'")})).max(Qi).describe("Line discounts (max 5) in request order. In `b2b_standard`, percentage discounts are calculated from the original line subtotal and fixed amounts are summed before tax. In `b2c_gross_discount`, discounts are applied sequentially to the running gross subtotal."),total:e.number().nullish().describe("Line total before tax. Null for separator items."),total_with_tax:e.number().nullish().describe("Line total after tax. Null for separator items."),total_converted:e.number().min(Ji).max(Zi).nullish(),total_with_tax_converted:e.number().min(Xi).max(ea).nullish(),advance_invoice_id:e.string().max(ta).nullish(),delivery_note_id:e.string().max(oa).nullish(),item_id:e.string().max(na).nullish(),metadata:e.record(e.string(),e.string()).nullish().describe("Custom key-value data for your own use. Store any JSON object up to 50 properties. Values must be strings up to 250 characters. Useful for storing external IDs, tags, or integration data."),created_at:e.iso.datetime({}),updated_at:e.iso.datetime({})})),document_relations:e.array(e.object({id:e.string(),source_type:e.enum(["invoice","estimate","credit_note","advance_invoice","delivery_note"]).describe("Type of document"),source_id:e.string(),target_type:e.enum(["invoice","estimate","credit_note","advance_invoice","delivery_note"]).describe("Type of document"),target_id:e.string(),relation_type:e.string(),entity_id:e.string(),created_at:e.iso.datetime({}),linked_document_voided_at:e.iso.datetime({}).nullish(),related_document:e.object({id:e.string(),type:e.enum(["invoice","estimate","credit_note","advance_invoice","delivery_note"]).describe("Type of document"),number:e.string(),date:e.string(),total_with_tax:e.number(),currency_code:e.string(),is_draft:e.boolean(),voided_at:e.string().nullable(),paid_in_full:e.boolean().nullable(),title_type:e.union([e.literal("estimate"),e.literal("proforma_invoice"),e.literal(null)]).nullable(),hide_prices:e.boolean().nullable()}).optional()})).optional()}).describe("Advance invoice for prepayments"),sa=/^[a-z]{3,4}_[0-9a-f]{24}$/,Jge=e.object({id:e.stringFormat("resource-id",sa).describe("Unique resource identifier")}),Zge=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),ra=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,ia=2,aa=2,da="iban",ca=2,la=2,ua="iban",pa=2e3,ma=-140737488355328,ga=0x7fffffffffff,ya=50,ha=0,ba="percent",xa=5,za=100,_a=500,Xge=e.object({date:e.string().regex(ra).optional().describe("Document date (YYYY-MM-DD or ISO datetime format)."),issuer:e.object({name:e.string().nullish(),email:e.email().nullish(),address:e.string().nullish(),address_2:e.string().nullish(),post_code:e.string().nullish(),city:e.string().nullish(),state:e.string().nullish(),country:e.string().nullish(),country_code:e.string().min(ia).max(aa).nullish(),tax_number:e.string().nullish(),tax_number_2:e.string().nullish(),company_number:e.string().nullish(),phone:e.string().nullish(),peppol_id:e.string().nullish(),is_end_consumer:e.boolean().nullish(),bank_account:e.object({type:e.enum(["iban","us_domestic","uk_domestic","other"]).default(da).describe("Account type determines which fields are used"),name:e.string().nullish().describe("Display name for this account. Falls back to account number if not set"),bank_name:e.string().nullish().describe("Bank name"),iban:e.string().nullish().describe("IBAN (for type=iban)"),account_number:e.string().nullish().describe("Account number (for us_domestic, uk_domestic, other)"),bic:e.string().nullish().describe("BIC/SWIFT code for international transfers"),routing_number:e.string().nullish().describe("US ABA routing number (for type=us_domestic)"),sort_code:e.string().nullish().describe("UK sort code (for type=uk_domestic)")}).nullish()}).describe("Document issuer (entity) information").and(e.unknown().describe("Issuer information snapshot.")).optional(),customer_id:e.string().nullish().describe("Referenced Customer ID. Set to null to remove customer reference."),customer:e.object({name:e.string().nullish(),email:e.email().nullish(),address:e.string().nullish(),address_2:e.string().nullish(),post_code:e.string().nullish(),city:e.string().nullish(),state:e.string().nullish(),country:e.string().nullish(),country_code:e.string().min(ca).max(la).nullish(),tax_number:e.string().nullish(),tax_number_2:e.string().nullish(),company_number:e.string().nullish(),phone:e.string().nullish(),peppol_id:e.string().nullish(),is_end_consumer:e.boolean().nullish(),bank_account:e.object({type:e.enum(["iban","us_domestic","uk_domestic","other"]).default(ua).describe("Account type determines which fields are used"),name:e.string().nullish().describe("Display name for this account. Falls back to account number if not set"),bank_name:e.string().nullish().describe("Bank name"),iban:e.string().nullish().describe("IBAN (for type=iban)"),account_number:e.string().nullish().describe("Account number (for us_domestic, uk_domestic, other)"),bic:e.string().nullish().describe("BIC/SWIFT code for international transfers"),routing_number:e.string().nullish().describe("US ABA routing number (for type=us_domestic)"),sort_code:e.string().nullish().describe("UK sort code (for type=uk_domestic)")}).nullish()}).describe("Document issuer (entity) information").and(e.object({save_customer:e.boolean().nullish().describe("Whether to save (create new or update existing) the customer data.\nDefaults to `true` (best-effort).\nWhen `true` with `customer_id`, updates the existing customer.\nWhen `true` without `customer_id`, checks for duplicate customers using customer identifiers (tax/company number, country-aware when available) and reuses the existing customer if found, otherwise creates a new customer.\nWhen `false`, customer data is stored inline on the document only.\nWhen omitted, behaves like `true` but won't fail the request if persistence fails.")}).nullable()).optional().describe("Customer recipient of the document.\nBoth `customer` and `customer_id` are optional - documents can be created without customer information.\nIf both `customer_id` and `customer` are provided with `save_customer=true`, the existing customer will be updated.\nIf only `customer` is provided with `save_customer=true` (or by default), the system checks for duplicates using customer identifiers and reuses existing customers when found."),items:e.array(e.object({type:e.union([e.literal("separator"),e.literal(null)]).nullish().describe(`Item type. Omit or null for regular line item, 'separator' for a visual section header.
|
|
22
|
+
Separator items only use name and description \u2014 all financial fields are ignored.`),name:e.string().min(1).nullish().describe("Item name. Required unless `item_id` is provided.\nFor separator items, this is the section title (always required)."),description:e.string().max(pa).nullish(),classification:e.union([e.literal("product"),e.literal("service"),e.literal("advance"),e.literal(null)]).nullish().describe("Item classification used for Portugal SAF-T product typing."),price:e.number().nullish().describe("Net price per unit (before tax).\nProvide either `price` OR `gross_price`, not both.\nOptional if `item_id` is provided. Ignored for separator items."),gross_price:e.number().nullish().describe("Gross price per unit (includes tax).\nIf provided, net price is calculated.\nProvide either `price` OR `gross_price`, not both.\nOptional if `item_id` is provided. Ignored for separator items."),quantity:e.number().min(ma).max(ga).nullish().describe("Item quantity. Required for regular items. Ignored for separator items."),unit:e.string().max(ya).nullish(),taxes:e.array(e.object({rate:e.number().nullish(),tax_id:e.string().nullish(),classification:e.string().nullish(),reverse_charge:e.boolean().nullish(),amount:e.number().nullish(),pt_exemption_code:e.string().nullish(),pt_exemption_reason:e.string().nullish()}).describe("Document Item Tax")).optional().describe("Applied taxes (provide rate to create new tax, or tax_id to use existing tax)"),discounts:e.array(e.object({value:e.number().min(ha).describe("Discount value"),type:e.enum(["percent","amount"]).default(ba).describe("Discount type: 'percent' (default) or 'amount'")})).max(xa).optional().describe("Line discounts (max 5) in request order. In `b2b_standard`, percentage discounts are calculated from the original line subtotal and fixed amounts are summed before tax. In `b2c_gross_discount`, discounts are applied sequentially to the running gross subtotal."),item_id:e.string().nullish().describe(`ID of a catalog item to prefill from.
|
|
23
|
+
When provided, the item's name, description, price, and taxes are used as defaults.
|
|
24
|
+
Any field you provide will override the catalog item's value.
|
|
25
|
+
Not applicable for separator items.`),metadata:e.record(e.string(),e.string()).nullish().describe("Custom key-value data for your own use. Store any JSON object up to 50 properties. Values must be strings up to 250 characters. Useful for storing external IDs, tags, or integration data."),save_item:e.boolean().nullish().describe(`Whether to save this item to the catalog.
|
|
26
|
+
When true without item_id, matches by exact name and reuses existing, or creates a new catalog item.
|
|
27
|
+
Defaults to true (best-effort). When omitted, behaves like true but won't fail the request if persistence fails.`)})).min(1).optional().describe("Line items for the document. If provided, replaces ALL existing items. Triggers recalculation of totals."),note:e.string().nullish().describe("Document note/memo. Set to null to clear."),tax_clause:e.string().nullish().describe("Tax clause text. Set to null to clear."),footer:e.string().nullish().describe("Footer text. Set to null to clear."),signature:e.string().nullish().describe("Signature text (e.g. 'John Smith, CEO'). Set to null to clear."),currency_code:e.string().optional().describe("Currency code (ISO 4217, 3 characters). Changing currency triggers exchange rate recalculation."),reference:e.string().max(za).nullish().describe("Custom reference (e.g., purchase order number, payment reference). When set, overrides the auto-generated UPN payment reference for Slovenian invoices. Set to null to clear."),metadata:e.record(e.string(),e.unknown()).nullish().describe("Custom metadata object. Set to null to clear."),change_reason:e.string().max(_a).optional().describe("Reason for the change. Stored in version history for audit trail."),linked_documents:e.array(e.string().min(1)).nullish().describe("Link this advance invoice to other documents. Replaces existing links. Accepts invoice IDs (inv_xxx).")}),va=36,fa=100,Ra=2,Ia=2,Ea="iban",Sa=36,Da=2,Pa=2,wa="iban",Ca=500,Aa=-140737488355328,Ma=0x7fffffffffff,Ta=-140737488355328,ka=0x7fffffffffff,Ba=3,Na=36,Oa=-2147483648,Fa=2147483647,Ua=100,ja=-140737488355328,qa=0x7fffffffffff,Wa=-140737488355328,Ga=0x7fffffffffff,Va=-140737488355328,La=0x7fffffffffff,Ha=-140737488355328,Ya=0x7fffffffffff,Ka=0,$a=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,Qa=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,Ja=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,Za=36,Xa=500,ed=50,td=0,od="percent",nd=5,sd=-140737488355328,rd=0x7fffffffffff,id=-140737488355328,ad=0x7fffffffffff,dd=36,cd=36,ld=36,eye=e.object({id:e.string().max(va),number:e.string().max(fa),is_draft:e.boolean().describe("Whether this is a draft document. Draft documents have no sequential number assigned, skip fiscalization, and can be deleted. Use POST /{documents}/{id}/finalize to assign a number and finalize."),date:e.iso.datetime({}).describe("Date the advance invoice was created (ISO 8601 datetime at midnight UTC)"),issuer:e.object({name:e.string().nullish(),email:e.email().nullish(),address:e.string().nullish(),address_2:e.string().nullish(),post_code:e.string().nullish(),city:e.string().nullish(),state:e.string().nullish(),country:e.string().nullish(),country_code:e.string().min(Ra).max(Ia).nullish(),tax_number:e.string().nullish(),tax_number_2:e.string().nullish(),company_number:e.string().nullish(),phone:e.string().nullish(),peppol_id:e.string().nullish(),is_end_consumer:e.boolean().nullish(),bank_account:e.object({type:e.enum(["iban","us_domestic","uk_domestic","other"]).default(Ea).describe("Account type determines which fields are used"),name:e.string().nullish().describe("Display name for this account. Falls back to account number if not set"),bank_name:e.string().nullish().describe("Bank name"),iban:e.string().nullish().describe("IBAN (for type=iban)"),account_number:e.string().nullish().describe("Account number (for us_domestic, uk_domestic, other)"),bic:e.string().nullish().describe("BIC/SWIFT code for international transfers"),routing_number:e.string().nullish().describe("US ABA routing number (for type=us_domestic)"),sort_code:e.string().nullish().describe("UK sort code (for type=uk_domestic)")}).nullish()}).describe("Document issuer (entity) information"),customer_id:e.string().max(Sa).nullish(),customer:e.object({name:e.string().nullish(),email:e.email().nullish(),address:e.string().nullish(),address_2:e.string().nullish(),post_code:e.string().nullish(),city:e.string().nullish(),state:e.string().nullish(),country:e.string().nullish(),country_code:e.string().min(Da).max(Pa).nullish(),tax_number:e.string().nullish(),tax_number_2:e.string().nullish(),company_number:e.string().nullish(),phone:e.string().nullish(),peppol_id:e.string().nullish(),is_end_consumer:e.boolean().nullish(),bank_account:e.object({type:e.enum(["iban","us_domestic","uk_domestic","other"]).default(wa).describe("Account type determines which fields are used"),name:e.string().nullish().describe("Display name for this account. Falls back to account number if not set"),bank_name:e.string().nullish().describe("Bank name"),iban:e.string().nullish().describe("IBAN (for type=iban)"),account_number:e.string().nullish().describe("Account number (for us_domestic, uk_domestic, other)"),bic:e.string().nullish().describe("BIC/SWIFT code for international transfers"),routing_number:e.string().nullish().describe("US ABA routing number (for type=us_domestic)"),sort_code:e.string().nullish().describe("UK sort code (for type=uk_domestic)")}).nullish()}).nullish().describe("Customer information"),note:e.string().nullish().describe("Note for the document. If not provided, defaults to entity's document-type-specific note setting. Pass empty string to explicitly set no note."),tax_clause:e.string().nullish().describe("Tax clause for the document. Auto-populated based on transaction type if tax_clause_defaults are configured in entity settings. Pass empty string to explicitly set no clause."),footer:e.string().max(Ca).nullish(),signature:e.string().nullish().describe("Signature text for the document (e.g. 'John Smith, CEO'). If not provided, defaults to entity's default_document_signature setting. Pass empty string to explicitly set no signature."),total:e.number().min(Aa).max(Ma),total_with_tax:e.number().min(Ta).max(ka),total_discount:e.number().describe("Document discount total stored as a net-equivalent amount for compatibility. In `b2b_standard`, this is the net value of line-item discounts applied before tax. In `b2c_gross_discount`, gross discounts are converted back to their net-equivalent value here. 0 when no discounts applied."),creation_source:e.enum(["standard","custom"]).describe("Internal origin of the create request. `standard` means a normal create endpoint calculated the totals. `custom` means the document was created through a `/custom` endpoint."),calculation_mode:e.enum(["b2b_standard","b2c_gross_discount"]).describe("Resolved calculation mode used for this document. Stored on the document so recalculation and rendering remain stable even if entity defaults change later."),taxes:e.array(e.object({rate:e.number().nullable(),tax_id:e.string().nullish(),base:e.number(),amount:e.number(),reverse_charge:e.boolean().nullish()})).describe("Applied taxes summary"),currency_code:e.string().max(Ba),entity_id:e.string().max(Na),date_year:e.number().min(Oa).max(Fa),shareable_id:e.string().max(Ua).nullish(),voided_at:e.iso.datetime({}).nullish(),transaction_type:e.union([e.literal("domestic"),e.literal("intra_eu_b2b"),e.literal("intra_eu_b2c"),e.literal("3w_b2b"),e.literal("3w_b2c"),e.literal("export"),e.literal(null)]).nullish().describe("Transaction type for VAT purposes (domestic, intra_eu_b2b, intra_eu_b2c, export). Always determined based on issuer/customer countries."),metadata:e.record(e.string(),e.string()).nullish().describe("Custom key-value data for your own use. Store any JSON object up to 50 properties. Values must be strings up to 250 characters. Useful for storing external IDs, tags, or integration data."),exchange_rate:e.object({rate:e.number().describe("Exchange rate used for conversion"),source:e.string().describe("Source of the exchange rate (e.g., 'Frankfurter')"),date:e.iso.datetime({}).describe("Date of the exchange rate"),quote_currency:e.string().describe("Quote currency (the base currency converted to)")}).nullish().describe("Currency exchange rate information if conversion was applied"),total_converted:e.number().min(ja).max(qa).nullish(),total_with_tax_converted:e.number().min(Wa).max(Ga).nullish(),rounding_correction:e.number().nullish().describe("Rounding correction applied to reconcile differences between calculated total_with_tax and expected_total_with_tax. Only present when expected_total_with_tax was provided during creation."),eslog:e.object({validation_enabled:e.boolean().nullish().describe("Override entity default: true = validate, false = skip, null = use entity setting"),validation_status:e.union([e.literal("valid"),e.literal("invalid"),e.literal("not_validated"),e.literal(null)]).nullish().describe("Validation status: 'valid', 'invalid', or 'not_validated'"),validation_errors:e.array(e.string()).nullish().describe("Array of validation error messages (if status is 'invalid')"),validated_at:e.string().nullish().describe("ISO timestamp when validation was last performed")}).nullish().describe("e-SLOG 2.0 validation data for Slovenian electronic invoices. Only applicable when entity.country_code = 'SI' and eslog validation is enabled."),reference:e.string().nullish().describe("Custom reference for the document (e.g., purchase order number, payment reference). When set, used as the UPN payment reference instead of the auto-generated one."),vies:e.object({warning:e.string().nullable().describe("Warning message if VIES validation was unavailable or the VAT number was invalid. Document creation proceeds but this indicates the transaction type may need review."),skipped:e.boolean().nullable().describe("True when VIES validation was skipped due to entity settings (vies_validate_vat: false) but would normally apply. Used for audit trail.")}).nullish().describe("VIES validation info including any warnings and skipped indicator for audit trail"),deleted_at:e.iso.datetime({}).nullish().describe("Timestamp when the document was soft-deleted. Null if not deleted."),created_at:e.iso.datetime({}),updated_at:e.iso.datetime({}),total_paid:e.number().min(Va).max(La),total_due:e.number().min(Ha).max(Ya),paid_in_full:e.boolean(),furs:e.object({status:e.enum(["pending","success","failed","skipped"]),fiscalized_at:e.iso.datetime({}).optional(),error:e.string().optional(),cancellation_reason:e.string().optional(),data:e.object({zoi:e.string(),eor:e.string().optional(),qr_code:e.string().optional(),business_premise_name:e.string(),electronic_device_name:e.string(),invoice_number:e.string(),iteration:e.number().default(Ka),payload:e.record(e.string(),e.unknown()).describe("FURS API request payload"),issuer_tax_number:e.string().optional(),operator_tax_number:e.string().optional(),operator_label:e.string().optional(),foreign_operator:e.boolean().optional(),cancelled:e.boolean().optional(),cancelled_eor:e.string().optional(),cancellation_payload:e.record(e.string(),e.unknown()).optional().describe("FURS API cancellation payload")}).optional()}).nullish().describe("FURS (Slovenia) fiscalization data. Read-only field, not editable via API. Includes status, premise name, device name, and FURS identifiers (ZOI, EOR, QR code)."),fina:e.object({status:e.enum(["pending","success","failed"]),fiscalized_at:e.iso.datetime({}).optional(),error:e.string().optional(),data:e.object({zki:e.string(),jir:e.string().optional(),qr_code_url:e.string().optional(),business_premise_name:e.string(),electronic_device_name:e.string(),invoice_number:e.string(),operator_oib:e.string().optional(),payment_type:e.string().optional(),numbering_sequence:e.string().optional(),payload:e.record(e.string(),e.unknown()).describe("CIS SOAP request payload"),subsequent_submit:e.boolean().optional(),issuer_oib:e.string().optional(),operator_label:e.string().optional()}).optional()}).nullish().describe("FINA (Croatia) CIS fiscalization data. Read-only field. Includes status, business premise name, electronic device name, and CIS identifiers (ZKI, JIR, QR code URL)."),pt:e.union([e.string(),e.number(),e.boolean(),e.null(),e.record(e.string(),e.unknown()),e.array(e.unknown())]).optional(),date_due:e.string().regex($a).nullish().describe("Document due date in YYYY-MM-DD format"),date_service:e.string().regex(Qa).nullish().describe("Service date in YYYY-MM-DD format. For invoices and credit notes."),date_service_to:e.string().regex(Ja).nullish().describe("Service period end date in YYYY-MM-DD format. For invoices and credit notes. Use with date_service for date ranges."),payment_terms:e.string().nullish().describe("Payment terms for the document. If not provided, defaults to entity's document-type-specific payment terms setting. Pass empty string to explicitly set no terms."),items:e.array(e.object({id:e.string().max(Za),type:e.union([e.literal("separator"),e.literal(null)]).nullish().describe("Item type. null = regular line item, 'separator' = visual section header."),name:e.string().max(Xa),description:e.string().nullable(),classification:e.union([e.literal("product"),e.literal("service"),e.literal("advance"),e.literal(null)]).nullish().describe("Item classification used for Portugal SAF-T product typing."),price:e.number().nullish().describe("Per-unit net price (before tax). Always stores net price. Null for separator items."),gross_price:e.number().nullish().describe(`Per-unit gross price (includes tax).
|
|
28
|
+
Only present if user originally sent gross price.
|
|
29
|
+
Use gross pricing to keep invoice totals stable when VIES reverse charge is applied.`),quantity:e.number().nullish().describe("Item quantity. Null for separator items."),unit:e.string().max(ed).nullish(),taxes:e.array(e.object({rate:e.number().nullish(),tax_id:e.string().nullish(),classification:e.string().nullish(),reverse_charge:e.boolean().nullish(),amount:e.number().nullish(),pt_exemption_code:e.string().nullish(),pt_exemption_reason:e.string().nullish()}).describe("Document Item Tax")).describe("Applied taxes (provide rate to create new tax, or tax_id to use existing tax)"),discounts:e.array(e.object({value:e.number().min(td).describe("Discount value"),type:e.enum(["percent","amount"]).default(od).describe("Discount type: 'percent' (default) or 'amount'")})).max(nd).describe("Line discounts (max 5) in request order. In `b2b_standard`, percentage discounts are calculated from the original line subtotal and fixed amounts are summed before tax. In `b2c_gross_discount`, discounts are applied sequentially to the running gross subtotal."),total:e.number().nullish().describe("Line total before tax. Null for separator items."),total_with_tax:e.number().nullish().describe("Line total after tax. Null for separator items."),total_converted:e.number().min(sd).max(rd).nullish(),total_with_tax_converted:e.number().min(id).max(ad).nullish(),advance_invoice_id:e.string().max(dd).nullish(),delivery_note_id:e.string().max(cd).nullish(),item_id:e.string().max(ld).nullish(),metadata:e.record(e.string(),e.string()).nullish().describe("Custom key-value data for your own use. Store any JSON object up to 50 properties. Values must be strings up to 250 characters. Useful for storing external IDs, tags, or integration data."),created_at:e.iso.datetime({}),updated_at:e.iso.datetime({})})),document_relations:e.array(e.object({id:e.string(),source_type:e.enum(["invoice","estimate","credit_note","advance_invoice","delivery_note"]).describe("Type of document"),source_id:e.string(),target_type:e.enum(["invoice","estimate","credit_note","advance_invoice","delivery_note"]).describe("Type of document"),target_id:e.string(),relation_type:e.string(),entity_id:e.string(),created_at:e.iso.datetime({}),linked_document_voided_at:e.iso.datetime({}).nullish(),related_document:e.object({id:e.string(),type:e.enum(["invoice","estimate","credit_note","advance_invoice","delivery_note"]).describe("Type of document"),number:e.string(),date:e.string(),total_with_tax:e.number(),currency_code:e.string(),is_draft:e.boolean(),voided_at:e.string().nullable(),paid_in_full:e.boolean().nullable(),title_type:e.union([e.literal("estimate"),e.literal("proforma_invoice"),e.literal(null)]).nullable(),hide_prices:e.boolean().nullable()}).optional()})).optional()}).describe("Advance invoice for prepayments"),ud=/^[a-z]{3,4}_[0-9a-f]{24}$/,tye=e.object({id:e.stringFormat("resource-id",ud).describe("Unique resource identifier")}),oye=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),nye=e.object({versions:e.array(e.object({id:e.string().describe("Version record ID"),document_type:e.enum(["invoice","estimate","credit_note","advance_invoice"]).describe("Type of document"),document_id:e.string().describe("Document ID"),version:e.number().min(1).describe("Version number"),snapshot:e.record(e.string(),e.unknown()).describe("Full document snapshot at this version"),changed_fields:e.array(e.string()).describe("Fields that were changed in this update"),user:e.object({id:e.string(),name:e.string().nullable(),email:e.string()}).nullable().describe("User who made the change"),reason:e.string().nullable().describe("Reason for the change"),created_at:e.iso.datetime({}).describe("When this version was created")})).describe("List of versions"),count:e.number().describe("Total number of versions")}),sye=e.object({id:e.string().describe("Advance Invoice ID"),version:e.number().min(1).describe("Version number")}),rye=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),iye=e.object({id:e.string().describe("Version record ID"),document_type:e.enum(["invoice","estimate","credit_note","advance_invoice"]).describe("Type of document"),document_id:e.string().describe("Document ID"),version:e.number().min(1).describe("Version number"),snapshot:e.record(e.string(),e.unknown()).describe("Full document snapshot at this version"),changed_fields:e.array(e.string()).describe("Fields that were changed in this update"),user:e.object({id:e.string(),name:e.string().nullable(),email:e.string()}).nullable().describe("User who made the change"),reason:e.string().nullable().describe("Reason for the change"),created_at:e.iso.datetime({}).describe("When this version was created")}),pd=2,md=5,gd=2,yd=5,hd="true",aye=e.object({template:e.enum(["modern","classic","condensed","minimal","fashion"]).optional().describe("Document template design to use. When not specified, uses the entity's configured template."),locale:e.string().min(pd).max(md).nullish().describe("Locale for number and date formatting (decimal separators, date order). When not specified, uses the entity's configured locale. For example, 'sl-SI' formats decimals with commas (5,5%) and dates as DD. MM. YYYY."),language:e.string().min(gd).max(yd).nullish().describe("Language for document labels and translations (e.g., 'Invoice', 'Tax', 'Total'). When not specified, uses the same value as locale. Use this to get entity-locale formatting with different-language labels \u2014 for example, a Slovenian entity (sl-SI formatting with commas) but English labels."),partial:e.enum(["true","false"]).default(hd).describe("Whether to treat the document as partial (allows incomplete data) or complete (validates all required fields)"),upn_qr_enabled:e.enum(["true","false"]).optional().describe("Override UPN QR enabled setting for preview"),upn_qr_display_mode:e.enum(["qr_only","full_slip"]).optional().describe("Override UPN QR display mode for preview"),epc_qr_enabled:e.enum(["true","false"]).optional().describe("Override EPC QR enabled setting for preview")}),dye=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),bd=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,xd=2,zd=2,_d="iban",vd=2,fd=2,Rd="iban",Id=500,Ed=3,Sd=35,Dd=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,Pd=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,wd=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,Cd=20,Ad=/^[0-9a-zA-Z]{1,20}$/,Md=20,Td=/^\d{1,20}$/,kd=11,Bd=11,Nd=0,Od=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,Fd=2,Ud=2,jd="iban",qd=2,Wd=2,Gd="iban",Vd=500,Ld=3,Hd=35,Yd=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,Kd=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,$d=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,Qd=2e3,Jd=-140737488355328,Zd=0x7fffffffffff,Xd=50,ec=0,tc="percent",oc=5,nc=20,sc=/^[0-9a-zA-Z]{1,20}$/,rc=20,ic=/^\d{1,20}$/,ac=11,dc=11,cc=0,cye=e.union([e.object({is_draft:e.boolean().optional().describe("Whether this is a draft document. Draft documents have no sequential number assigned, skip fiscalization, and can be deleted. Use POST /{documents}/{id}/finalize to assign a number and finalize."),date:e.string().regex(bd).optional().describe("Document date in YYYY-MM-DD format"),issuer:e.object({name:e.string().nullish(),email:e.email().nullish(),address:e.string().nullish(),address_2:e.string().nullish(),post_code:e.string().nullish(),city:e.string().nullish(),state:e.string().nullish(),country:e.string().nullish(),country_code:e.string().min(xd).max(zd).nullish(),tax_number:e.string().nullish(),tax_number_2:e.string().nullish(),company_number:e.string().nullish(),phone:e.string().nullish(),peppol_id:e.string().nullish(),is_end_consumer:e.boolean().nullish(),bank_account:e.object({type:e.enum(["iban","us_domestic","uk_domestic","other"]).default(_d).describe("Account type determines which fields are used"),name:e.string().nullish().describe("Display name for this account. Falls back to account number if not set"),bank_name:e.string().nullish().describe("Bank name"),iban:e.string().nullish().describe("IBAN (for type=iban)"),account_number:e.string().nullish().describe("Account number (for us_domestic, uk_domestic, other)"),bic:e.string().nullish().describe("BIC/SWIFT code for international transfers"),routing_number:e.string().nullish().describe("US ABA routing number (for type=us_domestic)"),sort_code:e.string().nullish().describe("UK sort code (for type=uk_domestic)")}).nullish()}).optional().describe("Document issuer (entity) information"),customer_id:e.string().nullish().describe("Referenced Customer ID. Required if customer is not provided."),customer:e.object({name:e.string().nullish(),email:e.email().nullish(),address:e.string().nullish(),address_2:e.string().nullish(),post_code:e.string().nullish(),city:e.string().nullish(),state:e.string().nullish(),country:e.string().nullish(),country_code:e.string().min(vd).max(fd).nullish(),tax_number:e.string().nullish(),tax_number_2:e.string().nullish(),company_number:e.string().nullish(),phone:e.string().nullish(),peppol_id:e.string().nullish(),is_end_consumer:e.boolean().nullish(),bank_account:e.object({type:e.enum(["iban","us_domestic","uk_domestic","other"]).default(Rd).describe("Account type determines which fields are used"),name:e.string().nullish().describe("Display name for this account. Falls back to account number if not set"),bank_name:e.string().nullish().describe("Bank name"),iban:e.string().nullish().describe("IBAN (for type=iban)"),account_number:e.string().nullish().describe("Account number (for us_domestic, uk_domestic, other)"),bic:e.string().nullish().describe("BIC/SWIFT code for international transfers"),routing_number:e.string().nullish().describe("US ABA routing number (for type=us_domestic)"),sort_code:e.string().nullish().describe("UK sort code (for type=uk_domestic)")}).nullish()}).describe("Document issuer (entity) information").and(e.object({save_customer:e.boolean().nullish().describe("Whether to save (create new or update existing) the customer data.\nDefaults to `true` (best-effort).\nWhen `true` with `customer_id`, updates the existing customer.\nWhen `true` without `customer_id`, checks for duplicate customers using customer identifiers (tax/company number, country-aware when available) and reuses the existing customer if found, otherwise creates a new customer.\nWhen `false`, customer data is stored inline on the document only.\nWhen omitted, behaves like `true` but won't fail the request if persistence fails.")}).nullable()).optional().describe("Customer recipient of the document.\nBoth `customer` and `customer_id` are optional - documents can be created without customer information.\nIf both `customer_id` and `customer` are provided with `save_customer=true`, the existing customer will be updated.\nIf only `customer` is provided with `save_customer=true` (or by default), the system checks for duplicates using customer identifiers and reuses existing customers when found."),note:e.string().nullish().describe("Note for the document. If not provided, defaults to entity's document-type-specific note setting. Pass empty string to explicitly set no note."),tax_clause:e.string().nullish().describe("Tax clause for the document. Auto-populated based on transaction type if tax_clause_defaults are configured in entity settings. Pass empty string to explicitly set no clause."),footer:e.string().max(Id).nullish(),signature:e.string().nullish().describe("Signature text for the document (e.g. 'John Smith, CEO'). If not provided, defaults to entity's default_document_signature setting. Pass empty string to explicitly set no signature."),calculation_mode:e.union([e.literal("b2b_standard"),e.literal("b2c_gross_discount"),e.literal(null)]).nullish().describe("Optional calculation mode override. When omitted, the entity default is used and falls back to `b2b_standard`."),currency_code:e.string().max(Ed).optional(),metadata:e.record(e.string(),e.string()).nullish().describe("Custom key-value data for your own use. Store any JSON object up to 50 properties. Values must be strings up to 250 characters. Useful for storing external IDs, tags, or integration data."),reference:e.string().nullish().describe("Custom reference for the document (e.g., purchase order number, payment reference). When set, used as the UPN payment reference instead of the auto-generated one."),pt:e.object({series_id:e.string().nullish().describe("ATCUD series ID to use for PT numbering. Required for PT manual documents."),manual:e.boolean().nullish().describe("Marks this PT document as manually issued/offline."),manual_sequential_number:e.number().min(1).nullish().describe("Manual PT sequence number shown on the offline/original document."),manual_series_code:e.string().min(1).max(Sd).nullish().describe("Offline/manual PT series code shown on the original document."),operator_first_name:e.string().min(1).nullish().describe("PT operator first name snapshot for PT compliance."),operator_last_name:e.string().min(1).nullish().describe("PT operator last name snapshot for PT compliance."),operator_tax_number:e.string().min(1).nullish().describe("PT operator tax number snapshot for PT compliance."),account_first_name:e.string().min(1).nullish().describe("Deprecated alias for PT operator first name snapshot."),account_last_name:e.string().min(1).nullish().describe("Deprecated alias for PT operator last name snapshot."),account_tax_number:e.string().min(1).nullish().describe("Deprecated alias for PT operator tax number snapshot.")}).nullish(),date_due:e.string().regex(Dd).nullish().describe("Document due date in YYYY-MM-DD format"),date_service:e.string().regex(Pd).nullish().describe("Service date in YYYY-MM-DD format. For invoices and credit notes."),date_service_to:e.string().regex(wd).nullish().describe("Service period end date in YYYY-MM-DD format. For invoices and credit notes. Use with date_service for date ranges."),items:e.array(e.object({type:e.enum(["separator"]).optional(),name:e.string().optional(),quantity:e.number().optional(),price:e.number().optional(),gross_price:e.number().optional(),description:e.string().optional(),unit:e.string().optional(),discounts:e.array(e.object({value:e.number(),type:e.enum(["percent","amount"]).optional()})).optional(),taxes:e.array(e.object({rate:e.number().optional(),tax_id:e.string().optional()})).optional(),metadata:e.record(e.string(),e.string()).optional()})).min(1),linked_documents:e.array(e.string().min(1)).nullish().describe("Link this advance invoice to other documents. Creates document relations automatically."),fina:e.object({business_premise_name:e.string().min(1).max(Cd).regex(Ad).nullish().describe("CIS business premise name (OznPosPr, alphanumeric, 1-20 chars). Required when CIS is enabled."),electronic_device_name:e.string().min(1).max(Md).regex(Td).nullish().describe("CIS electronic device name (OznNapUr, digits only, 1-20 chars). Required when CIS is enabled."),operator_oib:e.string().min(kd).max(Bd).nullish().describe("Operator OIB (11 digits). If not provided and using user authentication, defaults to the user's FINA settings. Otherwise falls back to entity settings."),operator_label:e.string().nullish().describe("Operator label/name. If not provided and using user authentication, defaults to the user's FINA settings. Otherwise falls back to entity settings."),payment_type:e.union([e.literal("cash"),e.literal("card"),e.literal("online"),e.literal("bank_transfer"),e.literal("paypal"),e.literal("crypto"),e.literal("coupon"),e.literal("other"),e.literal(null)]).nullish().describe("Expected payment method for CIS (NacinPlac field). Optional when document payments are provided because the API derives it from the document payments; when multiple payments are present, FINA uses 'other'."),subsequent_submit:e.boolean().nullish().describe("Late/subsequent submission flag (NakDost). Set to true if submitting after the normal deadline.")}).nullish(),expected_total_with_tax:e.number().gt(Nd).nullish().describe("Expected total with tax. When provided, the system calculates a rounding_correction to reconcile differences between the calculated total and this expected value. Maximum allowed correction is \xB11.00. Useful when importing invoices from external systems with different rounding rules.")}),e.object({is_draft:e.boolean().optional().describe("Whether this is a draft document. Draft documents have no sequential number assigned, skip fiscalization, and can be deleted. Use POST /{documents}/{id}/finalize to assign a number and finalize."),date:e.string().regex(Od).optional().describe("Document date in YYYY-MM-DD format"),issuer:e.object({name:e.string().nullish(),email:e.email().nullish(),address:e.string().nullish(),address_2:e.string().nullish(),post_code:e.string().nullish(),city:e.string().nullish(),state:e.string().nullish(),country:e.string().nullish(),country_code:e.string().min(Fd).max(Ud).nullish(),tax_number:e.string().nullish(),tax_number_2:e.string().nullish(),company_number:e.string().nullish(),phone:e.string().nullish(),peppol_id:e.string().nullish(),is_end_consumer:e.boolean().nullish(),bank_account:e.object({type:e.enum(["iban","us_domestic","uk_domestic","other"]).default(jd).describe("Account type determines which fields are used"),name:e.string().nullish().describe("Display name for this account. Falls back to account number if not set"),bank_name:e.string().nullish().describe("Bank name"),iban:e.string().nullish().describe("IBAN (for type=iban)"),account_number:e.string().nullish().describe("Account number (for us_domestic, uk_domestic, other)"),bic:e.string().nullish().describe("BIC/SWIFT code for international transfers"),routing_number:e.string().nullish().describe("US ABA routing number (for type=us_domestic)"),sort_code:e.string().nullish().describe("UK sort code (for type=uk_domestic)")}).nullish()}).optional().describe("Document issuer (entity) information"),customer_id:e.string().nullish().describe("Referenced Customer ID. Required if customer is not provided."),customer:e.object({name:e.string().nullish(),email:e.email().nullish(),address:e.string().nullish(),address_2:e.string().nullish(),post_code:e.string().nullish(),city:e.string().nullish(),state:e.string().nullish(),country:e.string().nullish(),country_code:e.string().min(qd).max(Wd).nullish(),tax_number:e.string().nullish(),tax_number_2:e.string().nullish(),company_number:e.string().nullish(),phone:e.string().nullish(),peppol_id:e.string().nullish(),is_end_consumer:e.boolean().nullish(),bank_account:e.object({type:e.enum(["iban","us_domestic","uk_domestic","other"]).default(Gd).describe("Account type determines which fields are used"),name:e.string().nullish().describe("Display name for this account. Falls back to account number if not set"),bank_name:e.string().nullish().describe("Bank name"),iban:e.string().nullish().describe("IBAN (for type=iban)"),account_number:e.string().nullish().describe("Account number (for us_domestic, uk_domestic, other)"),bic:e.string().nullish().describe("BIC/SWIFT code for international transfers"),routing_number:e.string().nullish().describe("US ABA routing number (for type=us_domestic)"),sort_code:e.string().nullish().describe("UK sort code (for type=uk_domestic)")}).nullish()}).describe("Document issuer (entity) information").and(e.object({save_customer:e.boolean().nullish().describe("Whether to save (create new or update existing) the customer data.\nDefaults to `true` (best-effort).\nWhen `true` with `customer_id`, updates the existing customer.\nWhen `true` without `customer_id`, checks for duplicate customers using customer identifiers (tax/company number, country-aware when available) and reuses the existing customer if found, otherwise creates a new customer.\nWhen `false`, customer data is stored inline on the document only.\nWhen omitted, behaves like `true` but won't fail the request if persistence fails.")}).nullable()).optional().describe("Customer recipient of the document.\nBoth `customer` and `customer_id` are optional - documents can be created without customer information.\nIf both `customer_id` and `customer` are provided with `save_customer=true`, the existing customer will be updated.\nIf only `customer` is provided with `save_customer=true` (or by default), the system checks for duplicates using customer identifiers and reuses existing customers when found."),note:e.string().nullish().describe("Note for the document. If not provided, defaults to entity's document-type-specific note setting. Pass empty string to explicitly set no note."),tax_clause:e.string().nullish().describe("Tax clause for the document. Auto-populated based on transaction type if tax_clause_defaults are configured in entity settings. Pass empty string to explicitly set no clause."),footer:e.string().max(Vd).nullish(),signature:e.string().nullish().describe("Signature text for the document (e.g. 'John Smith, CEO'). If not provided, defaults to entity's default_document_signature setting. Pass empty string to explicitly set no signature."),calculation_mode:e.union([e.literal("b2b_standard"),e.literal("b2c_gross_discount"),e.literal(null)]).nullish().describe("Optional calculation mode override. When omitted, the entity default is used and falls back to `b2b_standard`."),currency_code:e.string().max(Ld).optional(),metadata:e.record(e.string(),e.string()).nullish().describe("Custom key-value data for your own use. Store any JSON object up to 50 properties. Values must be strings up to 250 characters. Useful for storing external IDs, tags, or integration data."),reference:e.string().nullish().describe("Custom reference for the document (e.g., purchase order number, payment reference). When set, used as the UPN payment reference instead of the auto-generated one."),pt:e.object({series_id:e.string().nullish().describe("ATCUD series ID to use for PT numbering. Required for PT manual documents."),manual:e.boolean().nullish().describe("Marks this PT document as manually issued/offline."),manual_sequential_number:e.number().min(1).nullish().describe("Manual PT sequence number shown on the offline/original document."),manual_series_code:e.string().min(1).max(Hd).nullish().describe("Offline/manual PT series code shown on the original document."),operator_first_name:e.string().min(1).nullish().describe("PT operator first name snapshot for PT compliance."),operator_last_name:e.string().min(1).nullish().describe("PT operator last name snapshot for PT compliance."),operator_tax_number:e.string().min(1).nullish().describe("PT operator tax number snapshot for PT compliance."),account_first_name:e.string().min(1).nullish().describe("Deprecated alias for PT operator first name snapshot."),account_last_name:e.string().min(1).nullish().describe("Deprecated alias for PT operator last name snapshot."),account_tax_number:e.string().min(1).nullish().describe("Deprecated alias for PT operator tax number snapshot.")}).nullish(),date_due:e.string().regex(Yd).nullish().describe("Document due date in YYYY-MM-DD format"),date_service:e.string().regex(Kd).nullish().describe("Service date in YYYY-MM-DD format. For invoices and credit notes."),date_service_to:e.string().regex($d).nullish().describe("Service period end date in YYYY-MM-DD format. For invoices and credit notes. Use with date_service for date ranges."),items:e.array(e.object({type:e.union([e.literal("separator"),e.literal(null)]).nullish().describe(`Item type. Omit or null for regular line item, 'separator' for a visual section header.
|
|
30
|
+
Separator items only use name and description \u2014 all financial fields are ignored.`),name:e.string().min(1).nullish().describe("Item name. Required unless `item_id` is provided.\nFor separator items, this is the section title (always required)."),description:e.string().max(Qd).nullish(),classification:e.union([e.literal("product"),e.literal("service"),e.literal("advance"),e.literal(null)]).nullish().describe("Item classification used for Portugal SAF-T product typing."),price:e.number().nullish().describe("Net price per unit (before tax).\nProvide either `price` OR `gross_price`, not both.\nOptional if `item_id` is provided. Ignored for separator items."),gross_price:e.number().nullish().describe("Gross price per unit (includes tax).\nIf provided, net price is calculated.\nProvide either `price` OR `gross_price`, not both.\nOptional if `item_id` is provided. Ignored for separator items."),quantity:e.number().min(Jd).max(Zd).nullish().describe("Item quantity. Required for regular items. Ignored for separator items."),unit:e.string().max(Xd).nullish(),taxes:e.array(e.object({rate:e.number().nullish(),tax_id:e.string().nullish(),classification:e.string().nullish(),reverse_charge:e.boolean().nullish(),amount:e.number().nullish(),pt_exemption_code:e.string().nullish(),pt_exemption_reason:e.string().nullish()}).describe("Document Item Tax")).optional().describe("Applied taxes (provide rate to create new tax, or tax_id to use existing tax)"),discounts:e.array(e.object({value:e.number().min(ec).describe("Discount value"),type:e.enum(["percent","amount"]).default(tc).describe("Discount type: 'percent' (default) or 'amount'")})).max(oc).optional().describe("Line discounts (max 5) in request order. In `b2b_standard`, percentage discounts are calculated from the original line subtotal and fixed amounts are summed before tax. In `b2c_gross_discount`, discounts are applied sequentially to the running gross subtotal."),item_id:e.string().nullish().describe(`ID of a catalog item to prefill from.
|
|
31
|
+
When provided, the item's name, description, price, and taxes are used as defaults.
|
|
32
|
+
Any field you provide will override the catalog item's value.
|
|
33
|
+
Not applicable for separator items.`),metadata:e.record(e.string(),e.string()).nullish().describe("Custom key-value data for your own use. Store any JSON object up to 50 properties. Values must be strings up to 250 characters. Useful for storing external IDs, tags, or integration data."),save_item:e.boolean().nullish().describe(`Whether to save this item to the catalog.
|
|
34
|
+
When true without item_id, matches by exact name and reuses existing, or creates a new catalog item.
|
|
35
|
+
Defaults to true (best-effort). When omitted, behaves like true but won't fail the request if persistence fails.`)})).min(1).describe("Line items for the advance invoice. At least one item is required."),linked_documents:e.array(e.string().min(1)).nullish().describe("Link this advance invoice to other documents. Creates document relations automatically."),fina:e.object({business_premise_name:e.string().min(1).max(nc).regex(sc).nullish().describe("CIS business premise name (OznPosPr, alphanumeric, 1-20 chars). Required when CIS is enabled."),electronic_device_name:e.string().min(1).max(rc).regex(ic).nullish().describe("CIS electronic device name (OznNapUr, digits only, 1-20 chars). Required when CIS is enabled."),operator_oib:e.string().min(ac).max(dc).nullish().describe("Operator OIB (11 digits). If not provided and using user authentication, defaults to the user's FINA settings. Otherwise falls back to entity settings."),operator_label:e.string().nullish().describe("Operator label/name. If not provided and using user authentication, defaults to the user's FINA settings. Otherwise falls back to entity settings."),payment_type:e.union([e.literal("cash"),e.literal("card"),e.literal("online"),e.literal("bank_transfer"),e.literal("paypal"),e.literal("crypto"),e.literal("coupon"),e.literal("other"),e.literal(null)]).nullish().describe("Expected payment method for CIS (NacinPlac field). Optional when document payments are provided because the API derives it from the document payments; when multiple payments are present, FINA uses 'other'."),subsequent_submit:e.boolean().nullish().describe("Late/subsequent submission flag (NakDost). Set to true if submitting after the normal deadline.")}).nullish(),expected_total_with_tax:e.number().gt(cc).nullish().describe("Expected total with tax. When provided, the system calculates a rounding_correction to reconcile differences between the calculated total and this expected value. Maximum allowed correction is \xB11.00. Useful when importing invoices from external systems with different rounding rules.")})]),lc=/^[a-z]{3,4}_[0-9a-f]{24}$/,lye=e.object({id:e.stringFormat("resource-id",lc).describe("Unique resource identifier")}),uye=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),pye=e.object({reason:e.string().min(1).optional().describe("Technical reason for voiding (e.g., 'Duplicate advance invoice', 'Technical error')"),has_original_document:e.boolean().nullish().describe("Whether the original physical/manual PT document is still available.")}),uc=36,pc=100,mc=2,gc=2,yc="iban",hc=36,bc=2,xc=2,zc="iban",_c=500,vc=-140737488355328,fc=0x7fffffffffff,Rc=-140737488355328,Ic=0x7fffffffffff,Ec=3,Sc=36,Dc=-2147483648,Pc=2147483647,wc=100,Cc=-140737488355328,Ac=0x7fffffffffff,Mc=-140737488355328,Tc=0x7fffffffffff,kc=-140737488355328,Bc=0x7fffffffffff,Nc=-140737488355328,Oc=0x7fffffffffff,Fc=0,Uc=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,jc=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,qc=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,Wc=36,Gc=500,Vc=50,Lc=0,Hc="percent",Yc=5,Kc=-140737488355328,$c=0x7fffffffffff,Qc=-140737488355328,Jc=0x7fffffffffff,Zc=36,Xc=36,el=36,mye=e.object({id:e.string().max(uc),number:e.string().max(pc),is_draft:e.boolean().describe("Whether this is a draft document. Draft documents have no sequential number assigned, skip fiscalization, and can be deleted. Use POST /{documents}/{id}/finalize to assign a number and finalize."),date:e.iso.datetime({}).describe("Date the advance invoice was created (ISO 8601 datetime at midnight UTC)"),issuer:e.object({name:e.string().nullish(),email:e.email().nullish(),address:e.string().nullish(),address_2:e.string().nullish(),post_code:e.string().nullish(),city:e.string().nullish(),state:e.string().nullish(),country:e.string().nullish(),country_code:e.string().min(mc).max(gc).nullish(),tax_number:e.string().nullish(),tax_number_2:e.string().nullish(),company_number:e.string().nullish(),phone:e.string().nullish(),peppol_id:e.string().nullish(),is_end_consumer:e.boolean().nullish(),bank_account:e.object({type:e.enum(["iban","us_domestic","uk_domestic","other"]).default(yc).describe("Account type determines which fields are used"),name:e.string().nullish().describe("Display name for this account. Falls back to account number if not set"),bank_name:e.string().nullish().describe("Bank name"),iban:e.string().nullish().describe("IBAN (for type=iban)"),account_number:e.string().nullish().describe("Account number (for us_domestic, uk_domestic, other)"),bic:e.string().nullish().describe("BIC/SWIFT code for international transfers"),routing_number:e.string().nullish().describe("US ABA routing number (for type=us_domestic)"),sort_code:e.string().nullish().describe("UK sort code (for type=uk_domestic)")}).nullish()}).describe("Document issuer (entity) information"),customer_id:e.string().max(hc).nullish(),customer:e.object({name:e.string().nullish(),email:e.email().nullish(),address:e.string().nullish(),address_2:e.string().nullish(),post_code:e.string().nullish(),city:e.string().nullish(),state:e.string().nullish(),country:e.string().nullish(),country_code:e.string().min(bc).max(xc).nullish(),tax_number:e.string().nullish(),tax_number_2:e.string().nullish(),company_number:e.string().nullish(),phone:e.string().nullish(),peppol_id:e.string().nullish(),is_end_consumer:e.boolean().nullish(),bank_account:e.object({type:e.enum(["iban","us_domestic","uk_domestic","other"]).default(zc).describe("Account type determines which fields are used"),name:e.string().nullish().describe("Display name for this account. Falls back to account number if not set"),bank_name:e.string().nullish().describe("Bank name"),iban:e.string().nullish().describe("IBAN (for type=iban)"),account_number:e.string().nullish().describe("Account number (for us_domestic, uk_domestic, other)"),bic:e.string().nullish().describe("BIC/SWIFT code for international transfers"),routing_number:e.string().nullish().describe("US ABA routing number (for type=us_domestic)"),sort_code:e.string().nullish().describe("UK sort code (for type=uk_domestic)")}).nullish()}).nullish().describe("Customer information"),note:e.string().nullish().describe("Note for the document. If not provided, defaults to entity's document-type-specific note setting. Pass empty string to explicitly set no note."),tax_clause:e.string().nullish().describe("Tax clause for the document. Auto-populated based on transaction type if tax_clause_defaults are configured in entity settings. Pass empty string to explicitly set no clause."),footer:e.string().max(_c).nullish(),signature:e.string().nullish().describe("Signature text for the document (e.g. 'John Smith, CEO'). If not provided, defaults to entity's default_document_signature setting. Pass empty string to explicitly set no signature."),total:e.number().min(vc).max(fc),total_with_tax:e.number().min(Rc).max(Ic),total_discount:e.number().describe("Document discount total stored as a net-equivalent amount for compatibility. In `b2b_standard`, this is the net value of line-item discounts applied before tax. In `b2c_gross_discount`, gross discounts are converted back to their net-equivalent value here. 0 when no discounts applied."),creation_source:e.enum(["standard","custom"]).describe("Internal origin of the create request. `standard` means a normal create endpoint calculated the totals. `custom` means the document was created through a `/custom` endpoint."),calculation_mode:e.enum(["b2b_standard","b2c_gross_discount"]).describe("Resolved calculation mode used for this document. Stored on the document so recalculation and rendering remain stable even if entity defaults change later."),taxes:e.array(e.object({rate:e.number().nullable(),tax_id:e.string().nullish(),base:e.number(),amount:e.number(),reverse_charge:e.boolean().nullish()})).describe("Applied taxes summary"),currency_code:e.string().max(Ec),entity_id:e.string().max(Sc),date_year:e.number().min(Dc).max(Pc),shareable_id:e.string().max(wc).nullish(),voided_at:e.iso.datetime({}).nullish(),transaction_type:e.union([e.literal("domestic"),e.literal("intra_eu_b2b"),e.literal("intra_eu_b2c"),e.literal("3w_b2b"),e.literal("3w_b2c"),e.literal("export"),e.literal(null)]).nullish().describe("Transaction type for VAT purposes (domestic, intra_eu_b2b, intra_eu_b2c, export). Always determined based on issuer/customer countries."),metadata:e.record(e.string(),e.string()).nullish().describe("Custom key-value data for your own use. Store any JSON object up to 50 properties. Values must be strings up to 250 characters. Useful for storing external IDs, tags, or integration data."),exchange_rate:e.object({rate:e.number().describe("Exchange rate used for conversion"),source:e.string().describe("Source of the exchange rate (e.g., 'Frankfurter')"),date:e.iso.datetime({}).describe("Date of the exchange rate"),quote_currency:e.string().describe("Quote currency (the base currency converted to)")}).nullish().describe("Currency exchange rate information if conversion was applied"),total_converted:e.number().min(Cc).max(Ac).nullish(),total_with_tax_converted:e.number().min(Mc).max(Tc).nullish(),rounding_correction:e.number().nullish().describe("Rounding correction applied to reconcile differences between calculated total_with_tax and expected_total_with_tax. Only present when expected_total_with_tax was provided during creation."),eslog:e.object({validation_enabled:e.boolean().nullish().describe("Override entity default: true = validate, false = skip, null = use entity setting"),validation_status:e.union([e.literal("valid"),e.literal("invalid"),e.literal("not_validated"),e.literal(null)]).nullish().describe("Validation status: 'valid', 'invalid', or 'not_validated'"),validation_errors:e.array(e.string()).nullish().describe("Array of validation error messages (if status is 'invalid')"),validated_at:e.string().nullish().describe("ISO timestamp when validation was last performed")}).nullish().describe("e-SLOG 2.0 validation data for Slovenian electronic invoices. Only applicable when entity.country_code = 'SI' and eslog validation is enabled."),reference:e.string().nullish().describe("Custom reference for the document (e.g., purchase order number, payment reference). When set, used as the UPN payment reference instead of the auto-generated one."),vies:e.object({warning:e.string().nullable().describe("Warning message if VIES validation was unavailable or the VAT number was invalid. Document creation proceeds but this indicates the transaction type may need review."),skipped:e.boolean().nullable().describe("True when VIES validation was skipped due to entity settings (vies_validate_vat: false) but would normally apply. Used for audit trail.")}).nullish().describe("VIES validation info including any warnings and skipped indicator for audit trail"),deleted_at:e.iso.datetime({}).nullish().describe("Timestamp when the document was soft-deleted. Null if not deleted."),created_at:e.iso.datetime({}),updated_at:e.iso.datetime({}),total_paid:e.number().min(kc).max(Bc),total_due:e.number().min(Nc).max(Oc),paid_in_full:e.boolean(),furs:e.object({status:e.enum(["pending","success","failed","skipped"]),fiscalized_at:e.iso.datetime({}).optional(),error:e.string().optional(),cancellation_reason:e.string().optional(),data:e.object({zoi:e.string(),eor:e.string().optional(),qr_code:e.string().optional(),business_premise_name:e.string(),electronic_device_name:e.string(),invoice_number:e.string(),iteration:e.number().default(Fc),payload:e.record(e.string(),e.unknown()).describe("FURS API request payload"),issuer_tax_number:e.string().optional(),operator_tax_number:e.string().optional(),operator_label:e.string().optional(),foreign_operator:e.boolean().optional(),cancelled:e.boolean().optional(),cancelled_eor:e.string().optional(),cancellation_payload:e.record(e.string(),e.unknown()).optional().describe("FURS API cancellation payload")}).optional()}).nullish().describe("FURS (Slovenia) fiscalization data. Read-only field, not editable via API. Includes status, premise name, device name, and FURS identifiers (ZOI, EOR, QR code)."),fina:e.object({status:e.enum(["pending","success","failed"]),fiscalized_at:e.iso.datetime({}).optional(),error:e.string().optional(),data:e.object({zki:e.string(),jir:e.string().optional(),qr_code_url:e.string().optional(),business_premise_name:e.string(),electronic_device_name:e.string(),invoice_number:e.string(),operator_oib:e.string().optional(),payment_type:e.string().optional(),numbering_sequence:e.string().optional(),payload:e.record(e.string(),e.unknown()).describe("CIS SOAP request payload"),subsequent_submit:e.boolean().optional(),issuer_oib:e.string().optional(),operator_label:e.string().optional()}).optional()}).nullish().describe("FINA (Croatia) CIS fiscalization data. Read-only field. Includes status, business premise name, electronic device name, and CIS identifiers (ZKI, JIR, QR code URL)."),pt:e.union([e.string(),e.number(),e.boolean(),e.null(),e.record(e.string(),e.unknown()),e.array(e.unknown())]).optional(),date_due:e.string().regex(Uc).nullish().describe("Document due date in YYYY-MM-DD format"),date_service:e.string().regex(jc).nullish().describe("Service date in YYYY-MM-DD format. For invoices and credit notes."),date_service_to:e.string().regex(qc).nullish().describe("Service period end date in YYYY-MM-DD format. For invoices and credit notes. Use with date_service for date ranges."),payment_terms:e.string().nullish().describe("Payment terms for the document. If not provided, defaults to entity's document-type-specific payment terms setting. Pass empty string to explicitly set no terms."),items:e.array(e.object({id:e.string().max(Wc),type:e.union([e.literal("separator"),e.literal(null)]).nullish().describe("Item type. null = regular line item, 'separator' = visual section header."),name:e.string().max(Gc),description:e.string().nullable(),classification:e.union([e.literal("product"),e.literal("service"),e.literal("advance"),e.literal(null)]).nullish().describe("Item classification used for Portugal SAF-T product typing."),price:e.number().nullish().describe("Per-unit net price (before tax). Always stores net price. Null for separator items."),gross_price:e.number().nullish().describe(`Per-unit gross price (includes tax).
|
|
36
|
+
Only present if user originally sent gross price.
|
|
37
|
+
Use gross pricing to keep invoice totals stable when VIES reverse charge is applied.`),quantity:e.number().nullish().describe("Item quantity. Null for separator items."),unit:e.string().max(Vc).nullish(),taxes:e.array(e.object({rate:e.number().nullish(),tax_id:e.string().nullish(),classification:e.string().nullish(),reverse_charge:e.boolean().nullish(),amount:e.number().nullish(),pt_exemption_code:e.string().nullish(),pt_exemption_reason:e.string().nullish()}).describe("Document Item Tax")).describe("Applied taxes (provide rate to create new tax, or tax_id to use existing tax)"),discounts:e.array(e.object({value:e.number().min(Lc).describe("Discount value"),type:e.enum(["percent","amount"]).default(Hc).describe("Discount type: 'percent' (default) or 'amount'")})).max(Yc).describe("Line discounts (max 5) in request order. In `b2b_standard`, percentage discounts are calculated from the original line subtotal and fixed amounts are summed before tax. In `b2c_gross_discount`, discounts are applied sequentially to the running gross subtotal."),total:e.number().nullish().describe("Line total before tax. Null for separator items."),total_with_tax:e.number().nullish().describe("Line total after tax. Null for separator items."),total_converted:e.number().min(Kc).max($c).nullish(),total_with_tax_converted:e.number().min(Qc).max(Jc).nullish(),advance_invoice_id:e.string().max(Zc).nullish(),delivery_note_id:e.string().max(Xc).nullish(),item_id:e.string().max(el).nullish(),metadata:e.record(e.string(),e.string()).nullish().describe("Custom key-value data for your own use. Store any JSON object up to 50 properties. Values must be strings up to 250 characters. Useful for storing external IDs, tags, or integration data."),created_at:e.iso.datetime({}),updated_at:e.iso.datetime({})})),document_relations:e.array(e.object({id:e.string(),source_type:e.enum(["invoice","estimate","credit_note","advance_invoice","delivery_note"]).describe("Type of document"),source_id:e.string(),target_type:e.enum(["invoice","estimate","credit_note","advance_invoice","delivery_note"]).describe("Type of document"),target_id:e.string(),relation_type:e.string(),entity_id:e.string(),created_at:e.iso.datetime({}),linked_document_voided_at:e.iso.datetime({}).nullish(),related_document:e.object({id:e.string(),type:e.enum(["invoice","estimate","credit_note","advance_invoice","delivery_note"]).describe("Type of document"),number:e.string(),date:e.string(),total_with_tax:e.number(),currency_code:e.string(),is_draft:e.boolean(),voided_at:e.string().nullable(),paid_in_full:e.boolean().nullable(),title_type:e.union([e.literal("estimate"),e.literal("proforma_invoice"),e.literal(null)]).nullable(),hide_prices:e.boolean().nullable()}).optional()})).optional()}).describe("Advance invoice for prepayments");var he={};j(he,{GetSupportedCountriesResponse:()=>hye,SearchCompanyRegistryQueryParams:()=>gye,SearchCompanyRegistryResponse:()=>yye,getSupportedCountriesResponseDataItemMax:()=>al,getSupportedCountriesResponseDataItemMin:()=>il,searchCompanyRegistryQueryCountryCodeMax:()=>ol,searchCompanyRegistryQueryCountryCodeMin:()=>tl,searchCompanyRegistryQueryQMin:()=>nl,searchCompanyRegistryResponseDataItemCountryCodeMax:()=>rl,searchCompanyRegistryResponseDataItemCountryCodeMin:()=>sl});var tl=2,ol=2,nl=2,gye=e.object({country_code:e.string().min(tl).max(ol).describe("ISO 3166-1 alpha-2 country code to search in (e.g., SI, AT, HR)"),q:e.string().min(nl).describe("Search query - company name or tax number (min 2 characters)"),limit:e.string().optional().describe("Maximum number of results (default: 10, max: 50)")}),sl=2,rl=2,yye=e.object({data:e.array(e.object({id:e.string(),country_code:e.string().min(sl).max(rl),registration_number:e.string(),tax_number:e.string().nullable(),name:e.string(),address:e.string().nullable(),post_code:e.string().nullable(),city:e.string().nullable(),legal_form:e.string().nullable(),bank_accounts:e.array(e.object({iban:e.string().describe("IBAN or bank account number"),bank:e.string().optional().describe("Bank name or code"),is_active:e.boolean().optional().describe("Whether this account is currently active")})),status:e.string()}).describe("Company from public registry for autocomplete"))}),il=2,al=2,hye=e.object({data:e.array(e.string().min(il).max(al))}).describe("List of country codes with registry data available");var be={};j(be,{CreateCreditNoteBody:()=>Eye,CreateCreditNoteHeader:()=>Iye,CreateCustomCreditNoteBody:()=>Cye,CreateCustomCreditNoteHeader:()=>wye,GetCreditNoteByIdHeader:()=>Tye,GetCreditNoteByIdParams:()=>Aye,GetCreditNoteByIdQueryParams:()=>Mye,GetCreditNoteByIdResponse:()=>kye,GetCreditNoteVersionHeader:()=>Gye,GetCreditNoteVersionParams:()=>Wye,GetCreditNoteVersionResponse:()=>Vye,GetCreditNoteVersionsHeader:()=>jye,GetCreditNoteVersionsParams:()=>Uye,GetCreditNoteVersionsResponse:()=>qye,GetCreditNotesHeader:()=>Dye,GetCreditNotesQueryParams:()=>Sye,GetCreditNotesResponse:()=>Pye,GetShareableCreditNoteEslogParams:()=>Rye,GetShareableCreditNoteHtmlParams:()=>zye,GetShareableCreditNoteHtmlQueryParams:()=>_ye,GetShareableCreditNoteParams:()=>bye,GetShareableCreditNotePdfParams:()=>vye,GetShareableCreditNotePdfQueryParams:()=>fye,GetShareableCreditNoteResponse:()=>xye,RenderCreditNotePreviewBody:()=>Yye,RenderCreditNotePreviewHeader:()=>Hye,RenderCreditNotePreviewQueryParams:()=>Lye,UpdateCreditNoteBody:()=>Oye,UpdateCreditNoteHeader:()=>Nye,UpdateCreditNoteParams:()=>Bye,UpdateCreditNoteResponse:()=>Fye,VoidCreditNoteBody:()=>Qye,VoidCreditNoteHeader:()=>$ye,VoidCreditNoteParams:()=>Kye,VoidCreditNoteResponse:()=>Jye,createCreditNoteBodyCurrencyCodeMax:()=>au,createCreditNoteBodyCustomerOneBankAccountTypeDefault:()=>ru,createCreditNoteBodyCustomerOneCountryCodeMax:()=>su,createCreditNoteBodyCustomerOneCountryCodeMin:()=>nu,createCreditNoteBodyDateDueRegExp:()=>uu,createCreditNoteBodyDateRegExp:()=>Xl,createCreditNoteBodyDateServiceRegExp:()=>cu,createCreditNoteBodyDateServiceToRegExp:()=>lu,createCreditNoteBodyExpectedTotalWithTaxExclusiveMin:()=>Pu,createCreditNoteBodyFinaBusinessPremiseNameMax:()=>fu,createCreditNoteBodyFinaBusinessPremiseNameRegExp:()=>Ru,createCreditNoteBodyFinaElectronicDeviceNameMax:()=>Iu,createCreditNoteBodyFinaElectronicDeviceNameRegExp:()=>Eu,createCreditNoteBodyFinaOperatorOibMax:()=>Du,createCreditNoteBodyFinaOperatorOibMin:()=>Su,createCreditNoteBodyFooterMax:()=>iu,createCreditNoteBodyIssuerBankAccountTypeDefault:()=>ou,createCreditNoteBodyIssuerCountryCodeMax:()=>tu,createCreditNoteBodyIssuerCountryCodeMin:()=>eu,createCreditNoteBodyItemsItemDescriptionMax:()=>pu,createCreditNoteBodyItemsItemDiscountsItemTypeDefault:()=>bu,createCreditNoteBodyItemsItemDiscountsItemValueMin:()=>hu,createCreditNoteBodyItemsItemDiscountsMax:()=>xu,createCreditNoteBodyItemsItemQuantityMax:()=>gu,createCreditNoteBodyItemsItemQuantityMin:()=>mu,createCreditNoteBodyItemsItemUnitMax:()=>yu,createCreditNoteBodyPaymentsItemAmountExclusiveMin:()=>vu,createCreditNoteBodyPaymentsItemAppliedToIncomingPurchaseDocumentIdMax:()=>_u,createCreditNoteBodyPaymentsItemIncomingPurchaseDocumentIdMax:()=>zu,createCreditNoteBodyPtManualSeriesCodeMax:()=>du,createCustomCreditNoteBodyCustomerOneBankAccountTypeDefault:()=>Dp,createCustomCreditNoteBodyCustomerOneCountryCodeMax:()=>Sp,createCustomCreditNoteBodyCustomerOneCountryCodeMin:()=>Ep,createCustomCreditNoteBodyDateDueRegExp:()=>Pp,createCustomCreditNoteBodyFinaBusinessPremiseNameMax:()=>Op,createCustomCreditNoteBodyFinaBusinessPremiseNameRegExp:()=>Fp,createCustomCreditNoteBodyFinaElectronicDeviceNameMax:()=>Up,createCustomCreditNoteBodyFinaElectronicDeviceNameRegExp:()=>jp,createCustomCreditNoteBodyFinaOperatorOibMax:()=>Wp,createCustomCreditNoteBodyFinaOperatorOibMin:()=>qp,createCustomCreditNoteBodyIssuerOneBankAccountTypeDefault:()=>Ip,createCustomCreditNoteBodyIssuerOneCountryCodeMax:()=>Rp,createCustomCreditNoteBodyIssuerOneCountryCodeMin:()=>fp,createCustomCreditNoteBodyItemsItemDescriptionMax:()=>wp,createCustomCreditNoteBodyItemsItemDiscountsItemTypeDefault:()=>Mp,createCustomCreditNoteBodyItemsItemDiscountsItemValueMin:()=>Ap,createCustomCreditNoteBodyItemsItemDiscountsMax:()=>Tp,createCustomCreditNoteBodyItemsItemUnitMax:()=>Cp,createCustomCreditNoteBodyPaymentsItemAmountExclusiveMin:()=>Np,createCustomCreditNoteBodyPaymentsItemAppliedToIncomingPurchaseDocumentIdMax:()=>Bp,createCustomCreditNoteBodyPaymentsItemIncomingPurchaseDocumentIdMax:()=>kp,getCreditNoteByIdPathIdRegExp:()=>Gp,getCreditNoteByIdResponseCurrencyCodeMax:()=>sm,getCreditNoteByIdResponseCustomerBankAccountTypeDefault:()=>Zp,getCreditNoteByIdResponseCustomerCountryCodeMax:()=>Jp,getCreditNoteByIdResponseCustomerCountryCodeMin:()=>Qp,getCreditNoteByIdResponseCustomerIdMax:()=>$p,getCreditNoteByIdResponseDateDueRegExp:()=>_m,getCreditNoteByIdResponseDateServiceRegExp:()=>xm,getCreditNoteByIdResponseDateServiceToRegExp:()=>zm,getCreditNoteByIdResponseDateYearMax:()=>am,getCreditNoteByIdResponseDateYearMin:()=>im,getCreditNoteByIdResponseEntityIdMax:()=>rm,getCreditNoteByIdResponseFooterMax:()=>Xp,getCreditNoteByIdResponseFursDataIterationDefault:()=>bm,getCreditNoteByIdResponseIdMax:()=>Vp,getCreditNoteByIdResponseIssuerBankAccountTypeDefault:()=>Kp,getCreditNoteByIdResponseIssuerCountryCodeMax:()=>Yp,getCreditNoteByIdResponseIssuerCountryCodeMin:()=>Hp,getCreditNoteByIdResponseItemsItemAdvanceInvoiceIdMax:()=>Mm,getCreditNoteByIdResponseItemsItemCreditNoteIdMax:()=>Am,getCreditNoteByIdResponseItemsItemDeliveryNoteIdMax:()=>Tm,getCreditNoteByIdResponseItemsItemDiscountsItemTypeDefault:()=>Em,getCreditNoteByIdResponseItemsItemDiscountsItemValueMin:()=>Im,getCreditNoteByIdResponseItemsItemDiscountsMax:()=>Sm,getCreditNoteByIdResponseItemsItemIdMax:()=>vm,getCreditNoteByIdResponseItemsItemItemIdMax:()=>km,getCreditNoteByIdResponseItemsItemNameMax:()=>fm,getCreditNoteByIdResponseItemsItemTotalConvertedMax:()=>Pm,getCreditNoteByIdResponseItemsItemTotalConvertedMin:()=>Dm,getCreditNoteByIdResponseItemsItemTotalWithTaxConvertedMax:()=>Cm,getCreditNoteByIdResponseItemsItemTotalWithTaxConvertedMin:()=>wm,getCreditNoteByIdResponseItemsItemUnitMax:()=>Rm,getCreditNoteByIdResponseNumberMax:()=>Lp,getCreditNoteByIdResponseShareableIdMax:()=>dm,getCreditNoteByIdResponseTotalConvertedMax:()=>lm,getCreditNoteByIdResponseTotalConvertedMin:()=>cm,getCreditNoteByIdResponseTotalDueMax:()=>hm,getCreditNoteByIdResponseTotalDueMin:()=>ym,getCreditNoteByIdResponseTotalMax:()=>tm,getCreditNoteByIdResponseTotalMin:()=>em,getCreditNoteByIdResponseTotalPaidMax:()=>gm,getCreditNoteByIdResponseTotalPaidMin:()=>mm,getCreditNoteByIdResponseTotalWithTaxConvertedMax:()=>pm,getCreditNoteByIdResponseTotalWithTaxConvertedMin:()=>um,getCreditNoteByIdResponseTotalWithTaxMax:()=>nm,getCreditNoteByIdResponseTotalWithTaxMin:()=>om,getCreditNoteVersionsPathIdRegExp:()=>Lg,getCreditNotesQueryLimitDefault:()=>wu,getCreditNotesQueryLimitMax:()=>Cu,getCreditNotesResponseDataItemCurrencyCodeMax:()=>Lu,getCreditNotesResponseDataItemCustomerBankAccountTypeDefault:()=>Uu,getCreditNotesResponseDataItemCustomerCountryCodeMax:()=>Fu,getCreditNotesResponseDataItemCustomerCountryCodeMin:()=>Ou,getCreditNotesResponseDataItemCustomerIdMax:()=>Nu,getCreditNotesResponseDataItemDateDueRegExp:()=>ap,getCreditNotesResponseDataItemDateServiceRegExp:()=>rp,getCreditNotesResponseDataItemDateServiceToRegExp:()=>ip,getCreditNotesResponseDataItemDateYearMax:()=>Ku,getCreditNotesResponseDataItemDateYearMin:()=>Yu,getCreditNotesResponseDataItemEntityIdMax:()=>Hu,getCreditNotesResponseDataItemFooterMax:()=>ju,getCreditNotesResponseDataItemFursDataIterationDefault:()=>sp,getCreditNotesResponseDataItemIdMax:()=>Au,getCreditNotesResponseDataItemIssuerBankAccountTypeDefault:()=>Bu,getCreditNotesResponseDataItemIssuerCountryCodeMax:()=>ku,getCreditNotesResponseDataItemIssuerCountryCodeMin:()=>Tu,getCreditNotesResponseDataItemItemsItemAdvanceInvoiceIdMax:()=>zp,getCreditNotesResponseDataItemItemsItemCreditNoteIdMax:()=>xp,getCreditNotesResponseDataItemItemsItemDeliveryNoteIdMax:()=>_p,getCreditNotesResponseDataItemItemsItemDiscountsItemTypeDefault:()=>pp,getCreditNotesResponseDataItemItemsItemDiscountsItemValueMin:()=>up,getCreditNotesResponseDataItemItemsItemDiscountsMax:()=>mp,getCreditNotesResponseDataItemItemsItemIdMax:()=>dp,getCreditNotesResponseDataItemItemsItemItemIdMax:()=>vp,getCreditNotesResponseDataItemItemsItemNameMax:()=>cp,getCreditNotesResponseDataItemItemsItemTotalConvertedMax:()=>yp,getCreditNotesResponseDataItemItemsItemTotalConvertedMin:()=>gp,getCreditNotesResponseDataItemItemsItemTotalWithTaxConvertedMax:()=>bp,getCreditNotesResponseDataItemItemsItemTotalWithTaxConvertedMin:()=>hp,getCreditNotesResponseDataItemItemsItemUnitMax:()=>lp,getCreditNotesResponseDataItemNumberMax:()=>Mu,getCreditNotesResponseDataItemShareableIdMax:()=>$u,getCreditNotesResponseDataItemTotalConvertedMax:()=>Ju,getCreditNotesResponseDataItemTotalConvertedMin:()=>Qu,getCreditNotesResponseDataItemTotalDueMax:()=>np,getCreditNotesResponseDataItemTotalDueMin:()=>op,getCreditNotesResponseDataItemTotalMax:()=>Wu,getCreditNotesResponseDataItemTotalMin:()=>qu,getCreditNotesResponseDataItemTotalPaidMax:()=>tp,getCreditNotesResponseDataItemTotalPaidMin:()=>ep,getCreditNotesResponseDataItemTotalWithTaxConvertedMax:()=>Xu,getCreditNotesResponseDataItemTotalWithTaxConvertedMin:()=>Zu,getCreditNotesResponseDataItemTotalWithTaxMax:()=>Vu,getCreditNotesResponseDataItemTotalWithTaxMin:()=>Gu,getShareableCreditNoteResponseCurrencyCodeMax:()=>fl,getShareableCreditNoteResponseCustomerBankAccountTypeDefault:()=>hl,getShareableCreditNoteResponseCustomerCountryCodeMax:()=>yl,getShareableCreditNoteResponseCustomerCountryCodeMin:()=>gl,getShareableCreditNoteResponseCustomerIdMax:()=>ml,getShareableCreditNoteResponseDateDueRegExp:()=>Fl,getShareableCreditNoteResponseDateServiceRegExp:()=>Nl,getShareableCreditNoteResponseDateServiceToRegExp:()=>Ol,getShareableCreditNoteResponseDateYearMax:()=>El,getShareableCreditNoteResponseDateYearMin:()=>Il,getShareableCreditNoteResponseEntityIdMax:()=>Rl,getShareableCreditNoteResponseFooterMax:()=>bl,getShareableCreditNoteResponseFursDataIterationDefault:()=>Bl,getShareableCreditNoteResponseIdMax:()=>dl,getShareableCreditNoteResponseIssuerBankAccountTypeDefault:()=>pl,getShareableCreditNoteResponseIssuerCountryCodeMax:()=>ul,getShareableCreditNoteResponseIssuerCountryCodeMin:()=>ll,getShareableCreditNoteResponseItemsItemAdvanceInvoiceIdMax:()=>Ql,getShareableCreditNoteResponseItemsItemCreditNoteIdMax:()=>$l,getShareableCreditNoteResponseItemsItemDeliveryNoteIdMax:()=>Jl,getShareableCreditNoteResponseItemsItemDiscountsItemTypeDefault:()=>Gl,getShareableCreditNoteResponseItemsItemDiscountsItemValueMin:()=>Wl,getShareableCreditNoteResponseItemsItemDiscountsMax:()=>Vl,getShareableCreditNoteResponseItemsItemIdMax:()=>Ul,getShareableCreditNoteResponseItemsItemItemIdMax:()=>Zl,getShareableCreditNoteResponseItemsItemNameMax:()=>jl,getShareableCreditNoteResponseItemsItemTotalConvertedMax:()=>Hl,getShareableCreditNoteResponseItemsItemTotalConvertedMin:()=>Ll,getShareableCreditNoteResponseItemsItemTotalWithTaxConvertedMax:()=>Kl,getShareableCreditNoteResponseItemsItemTotalWithTaxConvertedMin:()=>Yl,getShareableCreditNoteResponseItemsItemUnitMax:()=>ql,getShareableCreditNoteResponseNumberMax:()=>cl,getShareableCreditNoteResponseShareableIdMax:()=>Sl,getShareableCreditNoteResponseTotalConvertedMax:()=>Pl,getShareableCreditNoteResponseTotalConvertedMin:()=>Dl,getShareableCreditNoteResponseTotalDueMax:()=>kl,getShareableCreditNoteResponseTotalDueMin:()=>Tl,getShareableCreditNoteResponseTotalMax:()=>zl,getShareableCreditNoteResponseTotalMin:()=>xl,getShareableCreditNoteResponseTotalPaidMax:()=>Ml,getShareableCreditNoteResponseTotalPaidMin:()=>Al,getShareableCreditNoteResponseTotalWithTaxConvertedMax:()=>Cl,getShareableCreditNoteResponseTotalWithTaxConvertedMin:()=>wl,getShareableCreditNoteResponseTotalWithTaxMax:()=>vl,getShareableCreditNoteResponseTotalWithTaxMin:()=>_l,renderCreditNotePreviewBodyOneCurrencyCodeMax:()=>ry,renderCreditNotePreviewBodyOneCustomerOneBankAccountTypeDefault:()=>ny,renderCreditNotePreviewBodyOneCustomerOneCountryCodeMax:()=>oy,renderCreditNotePreviewBodyOneCustomerOneCountryCodeMin:()=>ty,renderCreditNotePreviewBodyOneDateDueRegExp:()=>cy,renderCreditNotePreviewBodyOneDateRegExp:()=>Jg,renderCreditNotePreviewBodyOneDateServiceRegExp:()=>ay,renderCreditNotePreviewBodyOneDateServiceToRegExp:()=>dy,renderCreditNotePreviewBodyOneExpectedTotalWithTaxExclusiveMin:()=>hy,renderCreditNotePreviewBodyOneFinaBusinessPremiseNameMax:()=>ly,renderCreditNotePreviewBodyOneFinaBusinessPremiseNameRegExp:()=>uy,renderCreditNotePreviewBodyOneFinaElectronicDeviceNameMax:()=>py,renderCreditNotePreviewBodyOneFinaElectronicDeviceNameRegExp:()=>my,renderCreditNotePreviewBodyOneFinaOperatorOibMax:()=>yy,renderCreditNotePreviewBodyOneFinaOperatorOibMin:()=>gy,renderCreditNotePreviewBodyOneFooterMax:()=>sy,renderCreditNotePreviewBodyOneIssuerBankAccountTypeDefault:()=>ey,renderCreditNotePreviewBodyOneIssuerCountryCodeMax:()=>Xg,renderCreditNotePreviewBodyOneIssuerCountryCodeMin:()=>Zg,renderCreditNotePreviewBodyOnePtManualSeriesCodeMax:()=>iy,renderCreditNotePreviewBodyTwoCurrencyCodeMax:()=>Ey,renderCreditNotePreviewBodyTwoCustomerOneBankAccountTypeDefault:()=>Ry,renderCreditNotePreviewBodyTwoCustomerOneCountryCodeMax:()=>fy,renderCreditNotePreviewBodyTwoCustomerOneCountryCodeMin:()=>vy,renderCreditNotePreviewBodyTwoDateDueRegExp:()=>wy,renderCreditNotePreviewBodyTwoDateRegExp:()=>by,renderCreditNotePreviewBodyTwoDateServiceRegExp:()=>Dy,renderCreditNotePreviewBodyTwoDateServiceToRegExp:()=>Py,renderCreditNotePreviewBodyTwoExpectedTotalWithTaxExclusiveMin:()=>Gy,renderCreditNotePreviewBodyTwoFinaBusinessPremiseNameMax:()=>Oy,renderCreditNotePreviewBodyTwoFinaBusinessPremiseNameRegExp:()=>Fy,renderCreditNotePreviewBodyTwoFinaElectronicDeviceNameMax:()=>Uy,renderCreditNotePreviewBodyTwoFinaElectronicDeviceNameRegExp:()=>jy,renderCreditNotePreviewBodyTwoFinaOperatorOibMax:()=>Wy,renderCreditNotePreviewBodyTwoFinaOperatorOibMin:()=>qy,renderCreditNotePreviewBodyTwoFooterMax:()=>Iy,renderCreditNotePreviewBodyTwoIssuerBankAccountTypeDefault:()=>_y,renderCreditNotePreviewBodyTwoIssuerCountryCodeMax:()=>zy,renderCreditNotePreviewBodyTwoIssuerCountryCodeMin:()=>xy,renderCreditNotePreviewBodyTwoItemsItemDescriptionMax:()=>Cy,renderCreditNotePreviewBodyTwoItemsItemDiscountsItemTypeDefault:()=>By,renderCreditNotePreviewBodyTwoItemsItemDiscountsItemValueMin:()=>ky,renderCreditNotePreviewBodyTwoItemsItemDiscountsMax:()=>Ny,renderCreditNotePreviewBodyTwoItemsItemQuantityMax:()=>My,renderCreditNotePreviewBodyTwoItemsItemQuantityMin:()=>Ay,renderCreditNotePreviewBodyTwoItemsItemUnitMax:()=>Ty,renderCreditNotePreviewBodyTwoPtManualSeriesCodeMax:()=>Sy,renderCreditNotePreviewQueryLanguageMax:()=>$g,renderCreditNotePreviewQueryLanguageMin:()=>Kg,renderCreditNotePreviewQueryLocaleMax:()=>Yg,renderCreditNotePreviewQueryLocaleMin:()=>Hg,renderCreditNotePreviewQueryPartialDefault:()=>Qg,updateCreditNoteBodyChangeReasonMax:()=>Jm,updateCreditNoteBodyCustomerOneBankAccountTypeDefault:()=>Wm,updateCreditNoteBodyCustomerOneCountryCodeMax:()=>qm,updateCreditNoteBodyCustomerOneCountryCodeMin:()=>jm,updateCreditNoteBodyDateRegExp:()=>Nm,updateCreditNoteBodyDateServiceRegExp:()=>Zm,updateCreditNoteBodyDateServiceToRegExp:()=>Xm,updateCreditNoteBodyIssuerOneBankAccountTypeDefault:()=>Um,updateCreditNoteBodyIssuerOneCountryCodeMax:()=>Fm,updateCreditNoteBodyIssuerOneCountryCodeMin:()=>Om,updateCreditNoteBodyItemsItemDescriptionMax:()=>Gm,updateCreditNoteBodyItemsItemDiscountsItemTypeDefault:()=>Km,updateCreditNoteBodyItemsItemDiscountsItemValueMin:()=>Ym,updateCreditNoteBodyItemsItemDiscountsMax:()=>$m,updateCreditNoteBodyItemsItemQuantityMax:()=>Lm,updateCreditNoteBodyItemsItemQuantityMin:()=>Vm,updateCreditNoteBodyItemsItemUnitMax:()=>Hm,updateCreditNoteBodyReferenceMax:()=>Qm,updateCreditNotePathIdRegExp:()=>Bm,updateCreditNoteResponseCurrencyCodeMax:()=>gg,updateCreditNoteResponseCustomerBankAccountTypeDefault:()=>dg,updateCreditNoteResponseCustomerCountryCodeMax:()=>ag,updateCreditNoteResponseCustomerCountryCodeMin:()=>ig,updateCreditNoteResponseCustomerIdMax:()=>rg,updateCreditNoteResponseDateDueRegExp:()=>Cg,updateCreditNoteResponseDateServiceRegExp:()=>Pg,updateCreditNoteResponseDateServiceToRegExp:()=>wg,updateCreditNoteResponseDateYearMax:()=>bg,updateCreditNoteResponseDateYearMin:()=>hg,updateCreditNoteResponseEntityIdMax:()=>yg,updateCreditNoteResponseFooterMax:()=>cg,updateCreditNoteResponseFursDataIterationDefault:()=>Dg,updateCreditNoteResponseIdMax:()=>eg,updateCreditNoteResponseIssuerBankAccountTypeDefault:()=>sg,updateCreditNoteResponseIssuerCountryCodeMax:()=>ng,updateCreditNoteResponseIssuerCountryCodeMin:()=>og,updateCreditNoteResponseItemsItemAdvanceInvoiceIdMax:()=>Wg,updateCreditNoteResponseItemsItemCreditNoteIdMax:()=>qg,updateCreditNoteResponseItemsItemDeliveryNoteIdMax:()=>Gg,updateCreditNoteResponseItemsItemDiscountsItemTypeDefault:()=>Bg,updateCreditNoteResponseItemsItemDiscountsItemValueMin:()=>kg,updateCreditNoteResponseItemsItemDiscountsMax:()=>Ng,updateCreditNoteResponseItemsItemIdMax:()=>Ag,updateCreditNoteResponseItemsItemItemIdMax:()=>Vg,updateCreditNoteResponseItemsItemNameMax:()=>Mg,updateCreditNoteResponseItemsItemTotalConvertedMax:()=>Fg,updateCreditNoteResponseItemsItemTotalConvertedMin:()=>Og,updateCreditNoteResponseItemsItemTotalWithTaxConvertedMax:()=>jg,updateCreditNoteResponseItemsItemTotalWithTaxConvertedMin:()=>Ug,updateCreditNoteResponseItemsItemUnitMax:()=>Tg,updateCreditNoteResponseNumberMax:()=>tg,updateCreditNoteResponseShareableIdMax:()=>xg,updateCreditNoteResponseTotalConvertedMax:()=>_g,updateCreditNoteResponseTotalConvertedMin:()=>zg,updateCreditNoteResponseTotalDueMax:()=>Sg,updateCreditNoteResponseTotalDueMin:()=>Eg,updateCreditNoteResponseTotalMax:()=>ug,updateCreditNoteResponseTotalMin:()=>lg,updateCreditNoteResponseTotalPaidMax:()=>Ig,updateCreditNoteResponseTotalPaidMin:()=>Rg,updateCreditNoteResponseTotalWithTaxConvertedMax:()=>fg,updateCreditNoteResponseTotalWithTaxConvertedMin:()=>vg,updateCreditNoteResponseTotalWithTaxMax:()=>mg,updateCreditNoteResponseTotalWithTaxMin:()=>pg,voidCreditNotePathIdRegExp:()=>Vy,voidCreditNoteResponseCurrencyCodeMax:()=>rh,voidCreditNoteResponseCustomerBankAccountTypeDefault:()=>Xy,voidCreditNoteResponseCustomerCountryCodeMax:()=>Zy,voidCreditNoteResponseCustomerCountryCodeMin:()=>Jy,voidCreditNoteResponseCustomerIdMax:()=>Qy,voidCreditNoteResponseDateDueRegExp:()=>vh,voidCreditNoteResponseDateServiceRegExp:()=>zh,voidCreditNoteResponseDateServiceToRegExp:()=>_h,voidCreditNoteResponseDateYearMax:()=>dh,voidCreditNoteResponseDateYearMin:()=>ah,voidCreditNoteResponseEntityIdMax:()=>ih,voidCreditNoteResponseFooterMax:()=>eh,voidCreditNoteResponseFursDataIterationDefault:()=>xh,voidCreditNoteResponseIdMax:()=>Ly,voidCreditNoteResponseIssuerBankAccountTypeDefault:()=>$y,voidCreditNoteResponseIssuerCountryCodeMax:()=>Ky,voidCreditNoteResponseIssuerCountryCodeMin:()=>Yy,voidCreditNoteResponseItemsItemAdvanceInvoiceIdMax:()=>Th,voidCreditNoteResponseItemsItemCreditNoteIdMax:()=>Mh,voidCreditNoteResponseItemsItemDeliveryNoteIdMax:()=>kh,voidCreditNoteResponseItemsItemDiscountsItemTypeDefault:()=>Sh,voidCreditNoteResponseItemsItemDiscountsItemValueMin:()=>Eh,voidCreditNoteResponseItemsItemDiscountsMax:()=>Dh,voidCreditNoteResponseItemsItemIdMax:()=>fh,voidCreditNoteResponseItemsItemItemIdMax:()=>Bh,voidCreditNoteResponseItemsItemNameMax:()=>Rh,voidCreditNoteResponseItemsItemTotalConvertedMax:()=>wh,voidCreditNoteResponseItemsItemTotalConvertedMin:()=>Ph,voidCreditNoteResponseItemsItemTotalWithTaxConvertedMax:()=>Ah,voidCreditNoteResponseItemsItemTotalWithTaxConvertedMin:()=>Ch,voidCreditNoteResponseItemsItemUnitMax:()=>Ih,voidCreditNoteResponseNumberMax:()=>Hy,voidCreditNoteResponseShareableIdMax:()=>ch,voidCreditNoteResponseTotalConvertedMax:()=>uh,voidCreditNoteResponseTotalConvertedMin:()=>lh,voidCreditNoteResponseTotalDueMax:()=>bh,voidCreditNoteResponseTotalDueMin:()=>hh,voidCreditNoteResponseTotalMax:()=>oh,voidCreditNoteResponseTotalMin:()=>th,voidCreditNoteResponseTotalPaidMax:()=>yh,voidCreditNoteResponseTotalPaidMin:()=>gh,voidCreditNoteResponseTotalWithTaxConvertedMax:()=>mh,voidCreditNoteResponseTotalWithTaxConvertedMin:()=>ph,voidCreditNoteResponseTotalWithTaxMax:()=>sh,voidCreditNoteResponseTotalWithTaxMin:()=>nh});var bye=e.object({shareableId:e.string().describe("Shareable document token")}),dl=36,cl=100,ll=2,ul=2,pl="iban",ml=36,gl=2,yl=2,hl="iban",bl=500,xl=-140737488355328,zl=0x7fffffffffff,_l=-140737488355328,vl=0x7fffffffffff,fl=3,Rl=36,Il=-2147483648,El=2147483647,Sl=100,Dl=-140737488355328,Pl=0x7fffffffffff,wl=-140737488355328,Cl=0x7fffffffffff,Al=-140737488355328,Ml=0x7fffffffffff,Tl=-140737488355328,kl=0x7fffffffffff,Bl=0,Nl=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,Ol=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,Fl=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,Ul=36,jl=500,ql=50,Wl=0,Gl="percent",Vl=5,Ll=-140737488355328,Hl=0x7fffffffffff,Yl=-140737488355328,Kl=0x7fffffffffff,$l=36,Ql=36,Jl=36,Zl=36,xye=e.object({id:e.string().max(dl),number:e.string().max(cl),is_draft:e.boolean().describe("Whether this is a draft document. Draft documents have no sequential number assigned, skip fiscalization, and can be deleted. Use POST /{documents}/{id}/finalize to assign a number and finalize."),date:e.iso.datetime({}).describe("Date the credit note was created (ISO 8601 datetime at midnight UTC)"),issuer:e.object({name:e.string().nullish(),email:e.email().nullish(),address:e.string().nullish(),address_2:e.string().nullish(),post_code:e.string().nullish(),city:e.string().nullish(),state:e.string().nullish(),country:e.string().nullish(),country_code:e.string().min(ll).max(ul).nullish(),tax_number:e.string().nullish(),tax_number_2:e.string().nullish(),company_number:e.string().nullish(),phone:e.string().nullish(),peppol_id:e.string().nullish(),is_end_consumer:e.boolean().nullish(),bank_account:e.object({type:e.enum(["iban","us_domestic","uk_domestic","other"]).default(pl).describe("Account type determines which fields are used"),name:e.string().nullish().describe("Display name for this account. Falls back to account number if not set"),bank_name:e.string().nullish().describe("Bank name"),iban:e.string().nullish().describe("IBAN (for type=iban)"),account_number:e.string().nullish().describe("Account number (for us_domestic, uk_domestic, other)"),bic:e.string().nullish().describe("BIC/SWIFT code for international transfers"),routing_number:e.string().nullish().describe("US ABA routing number (for type=us_domestic)"),sort_code:e.string().nullish().describe("UK sort code (for type=uk_domestic)")}).nullish()}).describe("Document issuer (entity) information"),customer_id:e.string().max(ml).nullish(),customer:e.object({name:e.string().nullish(),email:e.email().nullish(),address:e.string().nullish(),address_2:e.string().nullish(),post_code:e.string().nullish(),city:e.string().nullish(),state:e.string().nullish(),country:e.string().nullish(),country_code:e.string().min(gl).max(yl).nullish(),tax_number:e.string().nullish(),tax_number_2:e.string().nullish(),company_number:e.string().nullish(),phone:e.string().nullish(),peppol_id:e.string().nullish(),is_end_consumer:e.boolean().nullish(),bank_account:e.object({type:e.enum(["iban","us_domestic","uk_domestic","other"]).default(hl).describe("Account type determines which fields are used"),name:e.string().nullish().describe("Display name for this account. Falls back to account number if not set"),bank_name:e.string().nullish().describe("Bank name"),iban:e.string().nullish().describe("IBAN (for type=iban)"),account_number:e.string().nullish().describe("Account number (for us_domestic, uk_domestic, other)"),bic:e.string().nullish().describe("BIC/SWIFT code for international transfers"),routing_number:e.string().nullish().describe("US ABA routing number (for type=us_domestic)"),sort_code:e.string().nullish().describe("UK sort code (for type=uk_domestic)")}).nullish()}).nullish().describe("Customer information"),note:e.string().nullish().describe("Note for the document. If not provided, defaults to entity's document-type-specific note setting. Pass empty string to explicitly set no note."),payment_terms:e.string().nullish().describe("Payment terms for the document. If not provided, defaults to entity's document-type-specific payment terms setting. Pass empty string to explicitly set no terms."),tax_clause:e.string().nullish().describe("Tax clause for the document. Auto-populated based on transaction type if tax_clause_defaults are configured in entity settings. Pass empty string to explicitly set no clause."),footer:e.string().max(bl).nullish(),signature:e.string().nullish().describe("Signature text for the document (e.g. 'John Smith, CEO'). If not provided, defaults to entity's default_document_signature setting. Pass empty string to explicitly set no signature."),total:e.number().min(xl).max(zl),total_with_tax:e.number().min(_l).max(vl),total_discount:e.number().describe("Document discount total stored as a net-equivalent amount for compatibility. In `b2b_standard`, this is the net value of line-item discounts applied before tax. In `b2c_gross_discount`, gross discounts are converted back to their net-equivalent value here. 0 when no discounts applied."),creation_source:e.enum(["standard","custom"]).describe("Internal origin of the create request. `standard` means a normal create endpoint calculated the totals. `custom` means the document was created through a `/custom` endpoint."),calculation_mode:e.enum(["b2b_standard","b2c_gross_discount"]).describe("Resolved calculation mode used for this document. Stored on the document so recalculation and rendering remain stable even if entity defaults change later."),taxes:e.array(e.object({rate:e.number().nullable(),tax_id:e.string().nullish(),base:e.number(),amount:e.number(),reverse_charge:e.boolean().nullish()})).describe("Applied taxes summary"),currency_code:e.string().max(fl),entity_id:e.string().max(Rl),date_year:e.number().min(Il).max(El),shareable_id:e.string().max(Sl).nullish(),voided_at:e.iso.datetime({}).nullish(),transaction_type:e.union([e.literal("domestic"),e.literal("intra_eu_b2b"),e.literal("intra_eu_b2c"),e.literal("3w_b2b"),e.literal("3w_b2c"),e.literal("export"),e.literal(null)]).nullish().describe("Transaction type for VAT purposes (domestic, intra_eu_b2b, intra_eu_b2c, export). Always determined based on issuer/customer countries."),metadata:e.record(e.string(),e.string()).nullish().describe("Custom key-value data for your own use. Store any JSON object up to 50 properties. Values must be strings up to 250 characters. Useful for storing external IDs, tags, or integration data."),exchange_rate:e.object({rate:e.number().describe("Exchange rate used for conversion"),source:e.string().describe("Source of the exchange rate (e.g., 'Frankfurter')"),date:e.iso.datetime({}).describe("Date of the exchange rate"),quote_currency:e.string().describe("Quote currency (the base currency converted to)")}).nullish().describe("Currency exchange rate information if conversion was applied"),total_converted:e.number().min(Dl).max(Pl).nullish(),total_with_tax_converted:e.number().min(wl).max(Cl).nullish(),rounding_correction:e.number().nullish().describe("Rounding correction applied to reconcile differences between calculated total_with_tax and expected_total_with_tax. Only present when expected_total_with_tax was provided during creation."),eslog:e.object({validation_enabled:e.boolean().nullish().describe("Override entity default: true = validate, false = skip, null = use entity setting"),validation_status:e.union([e.literal("valid"),e.literal("invalid"),e.literal("not_validated"),e.literal(null)]).nullish().describe("Validation status: 'valid', 'invalid', or 'not_validated'"),validation_errors:e.array(e.string()).nullish().describe("Array of validation error messages (if status is 'invalid')"),validated_at:e.string().nullish().describe("ISO timestamp when validation was last performed")}).nullish().describe("e-SLOG 2.0 validation data for Slovenian electronic invoices. Only applicable when entity.country_code = 'SI' and eslog validation is enabled."),reference:e.string().nullish().describe("Custom reference for the document (e.g., purchase order number, payment reference). When set, used as the UPN payment reference instead of the auto-generated one."),vies:e.object({warning:e.string().nullable().describe("Warning message if VIES validation was unavailable or the VAT number was invalid. Document creation proceeds but this indicates the transaction type may need review."),skipped:e.boolean().nullable().describe("True when VIES validation was skipped due to entity settings (vies_validate_vat: false) but would normally apply. Used for audit trail.")}).nullish().describe("VIES validation info including any warnings and skipped indicator for audit trail"),deleted_at:e.iso.datetime({}).nullish().describe("Timestamp when the document was soft-deleted. Null if not deleted."),created_at:e.iso.datetime({}),updated_at:e.iso.datetime({}),total_paid:e.number().min(Al).max(Ml),total_due:e.number().min(Tl).max(kl),paid_in_full:e.boolean(),furs:e.object({status:e.enum(["pending","success","failed","skipped"]),fiscalized_at:e.iso.datetime({}).optional(),error:e.string().optional(),cancellation_reason:e.string().optional(),data:e.object({zoi:e.string(),eor:e.string().optional(),qr_code:e.string().optional(),business_premise_name:e.string(),electronic_device_name:e.string(),invoice_number:e.string(),iteration:e.number().default(Bl),payload:e.record(e.string(),e.unknown()).describe("FURS API request payload"),issuer_tax_number:e.string().optional(),operator_tax_number:e.string().optional(),operator_label:e.string().optional(),foreign_operator:e.boolean().optional(),cancelled:e.boolean().optional(),cancelled_eor:e.string().optional(),cancellation_payload:e.record(e.string(),e.unknown()).optional().describe("FURS API cancellation payload")}).optional()}).nullish().describe("FURS (Slovenia) fiscalization data. Read-only field, not editable via API. Includes status, premise name, device name, and FURS identifiers (ZOI, EOR, QR code)."),fina:e.object({status:e.enum(["pending","success","failed"]),fiscalized_at:e.iso.datetime({}).optional(),error:e.string().optional(),data:e.object({zki:e.string(),jir:e.string().optional(),qr_code_url:e.string().optional(),business_premise_name:e.string(),electronic_device_name:e.string(),invoice_number:e.string(),operator_oib:e.string().optional(),payment_type:e.string().optional(),numbering_sequence:e.string().optional(),payload:e.record(e.string(),e.unknown()).describe("CIS SOAP request payload"),subsequent_submit:e.boolean().optional(),issuer_oib:e.string().optional(),operator_label:e.string().optional()}).optional()}).nullish().describe("FINA (Croatia) CIS fiscalization data. Read-only field. Includes status, business premise name, electronic device name, and CIS identifiers (ZKI, JIR, QR code URL)."),pt:e.union([e.string(),e.number(),e.boolean(),e.null(),e.record(e.string(),e.unknown()),e.array(e.unknown())]).optional(),date_service:e.string().regex(Nl).nullish().describe("Service date in YYYY-MM-DD format. For invoices and credit notes."),date_service_to:e.string().regex(Ol).nullish().describe("Service period end date in YYYY-MM-DD format. For invoices and credit notes. Use with date_service for date ranges."),date_due:e.string().regex(Fl).nullish().describe("Document due date in YYYY-MM-DD format"),items:e.array(e.object({id:e.string().max(Ul),type:e.union([e.literal("separator"),e.literal(null)]).nullish().describe("Item type. null = regular line item, 'separator' = visual section header."),name:e.string().max(jl),description:e.string().nullable(),classification:e.union([e.literal("product"),e.literal("service"),e.literal("advance"),e.literal(null)]).nullish().describe("Item classification used for Portugal SAF-T product typing."),price:e.number().nullish().describe("Per-unit net price (before tax). Always stores net price. Null for separator items."),gross_price:e.number().nullish().describe(`Per-unit gross price (includes tax).
|
|
38
|
+
Only present if user originally sent gross price.
|
|
39
|
+
Use gross pricing to keep invoice totals stable when VIES reverse charge is applied.`),quantity:e.number().nullish().describe("Item quantity. Null for separator items."),unit:e.string().max(ql).nullish(),taxes:e.array(e.object({rate:e.number().nullish(),tax_id:e.string().nullish(),classification:e.string().nullish(),reverse_charge:e.boolean().nullish(),amount:e.number().nullish(),pt_exemption_code:e.string().nullish(),pt_exemption_reason:e.string().nullish()}).describe("Document Item Tax")).describe("Applied taxes (provide rate to create new tax, or tax_id to use existing tax)"),discounts:e.array(e.object({value:e.number().min(Wl).describe("Discount value"),type:e.enum(["percent","amount"]).default(Gl).describe("Discount type: 'percent' (default) or 'amount'")})).max(Vl).describe("Line discounts (max 5) in request order. In `b2b_standard`, percentage discounts are calculated from the original line subtotal and fixed amounts are summed before tax. In `b2c_gross_discount`, discounts are applied sequentially to the running gross subtotal."),total:e.number().nullish().describe("Line total before tax. Null for separator items."),total_with_tax:e.number().nullish().describe("Line total after tax. Null for separator items."),total_converted:e.number().min(Ll).max(Hl).nullish(),total_with_tax_converted:e.number().min(Yl).max(Kl).nullish(),credit_note_id:e.string().max($l).nullish(),advance_invoice_id:e.string().max(Ql).nullish(),delivery_note_id:e.string().max(Jl).nullish(),item_id:e.string().max(Zl).nullish(),metadata:e.record(e.string(),e.string()).optional(),created_at:e.iso.datetime({}),updated_at:e.iso.datetime({})})),document_relations:e.array(e.object({id:e.string(),source_type:e.enum(["invoice","estimate","credit_note","advance_invoice","delivery_note"]).describe("Type of document"),source_id:e.string(),target_type:e.enum(["invoice","estimate","credit_note","advance_invoice","delivery_note"]).describe("Type of document"),target_id:e.string(),relation_type:e.string(),entity_id:e.string(),created_at:e.iso.datetime({}),linked_document_voided_at:e.iso.datetime({}).nullish(),related_document:e.object({id:e.string(),type:e.enum(["invoice","estimate","credit_note","advance_invoice","delivery_note"]).describe("Type of document"),number:e.string(),date:e.string(),total_with_tax:e.number(),currency_code:e.string(),is_draft:e.boolean(),voided_at:e.string().nullable(),paid_in_full:e.boolean().nullable(),title_type:e.union([e.literal("estimate"),e.literal("proforma_invoice"),e.literal(null)]).nullable(),hide_prices:e.boolean().nullable()}).optional()})).optional()}).describe("Credit note document for refunds/corrections"),zye=e.object({shareableId:e.string().describe("Shareable document token")}),_ye=e.object({locale:e.enum(["en-US","de-DE","it-IT","fr-FR","es-ES","sl-SI","pt-PT","nl-NL","pl-PL","hr-HR","sv-SE","fi-FI","et-EE","bg-BG","cs-CZ","sk-SK","nb-NO","is-IS"]).optional().describe("Locale for number and date formatting (decimal separators, date order). Defaults to entity locale."),language:e.enum(["en-US","de-DE","it-IT","fr-FR","es-ES","sl-SI","pt-PT","nl-NL","pl-PL","hr-HR","sv-SE","fi-FI","et-EE","bg-BG","cs-CZ","sk-SK","nb-NO","is-IS"]).optional().describe("Language for document labels/translations. Defaults to locale value.")}),vye=e.object({shareableId:e.string().describe("Shareable document token")}),fye=e.object({locale:e.enum(["en-US","de-DE","it-IT","fr-FR","es-ES","sl-SI","pt-PT","nl-NL","pl-PL","hr-HR","sv-SE","fi-FI","et-EE","bg-BG","cs-CZ","sk-SK","nb-NO","is-IS"]).optional().describe("Locale for number and date formatting (decimal separators, date order). Defaults to entity locale."),language:e.enum(["en-US","de-DE","it-IT","fr-FR","es-ES","sl-SI","pt-PT","nl-NL","pl-PL","hr-HR","sv-SE","fi-FI","et-EE","bg-BG","cs-CZ","sk-SK","nb-NO","is-IS"]).optional().describe("Language for document labels/translations. Defaults to locale value.")}),Rye=e.object({shareableId:e.string().describe("Shareable document token")}),Iye=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),Xl=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,eu=2,tu=2,ou="iban",nu=2,su=2,ru="iban",iu=500,au=3,du=35,cu=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,lu=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,uu=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,pu=2e3,mu=-140737488355328,gu=0x7fffffffffff,yu=50,hu=0,bu="percent",xu=5,zu=36,_u=36,vu=0,fu=20,Ru=/^[0-9a-zA-Z]{1,20}$/,Iu=20,Eu=/^\d{1,20}$/,Su=11,Du=11,Pu=0,Eye=e.object({is_draft:e.boolean().optional().describe("Whether this is a draft document. Draft documents have no sequential number assigned, skip fiscalization, and can be deleted. Use POST /{documents}/{id}/finalize to assign a number and finalize."),date:e.string().regex(Xl).optional().describe("Document date in YYYY-MM-DD format"),issuer:e.object({name:e.string().nullish(),email:e.email().nullish(),address:e.string().nullish(),address_2:e.string().nullish(),post_code:e.string().nullish(),city:e.string().nullish(),state:e.string().nullish(),country:e.string().nullish(),country_code:e.string().min(eu).max(tu).nullish(),tax_number:e.string().nullish(),tax_number_2:e.string().nullish(),company_number:e.string().nullish(),phone:e.string().nullish(),peppol_id:e.string().nullish(),is_end_consumer:e.boolean().nullish(),bank_account:e.object({type:e.enum(["iban","us_domestic","uk_domestic","other"]).default(ou).describe("Account type determines which fields are used"),name:e.string().nullish().describe("Display name for this account. Falls back to account number if not set"),bank_name:e.string().nullish().describe("Bank name"),iban:e.string().nullish().describe("IBAN (for type=iban)"),account_number:e.string().nullish().describe("Account number (for us_domestic, uk_domestic, other)"),bic:e.string().nullish().describe("BIC/SWIFT code for international transfers"),routing_number:e.string().nullish().describe("US ABA routing number (for type=us_domestic)"),sort_code:e.string().nullish().describe("UK sort code (for type=uk_domestic)")}).nullish()}).optional().describe("Document issuer (entity) information"),customer_id:e.string().nullish().describe("Referenced Customer ID. Required if customer is not provided."),customer:e.object({name:e.string().nullish(),email:e.email().nullish(),address:e.string().nullish(),address_2:e.string().nullish(),post_code:e.string().nullish(),city:e.string().nullish(),state:e.string().nullish(),country:e.string().nullish(),country_code:e.string().min(nu).max(su).nullish(),tax_number:e.string().nullish(),tax_number_2:e.string().nullish(),company_number:e.string().nullish(),phone:e.string().nullish(),peppol_id:e.string().nullish(),is_end_consumer:e.boolean().nullish(),bank_account:e.object({type:e.enum(["iban","us_domestic","uk_domestic","other"]).default(ru).describe("Account type determines which fields are used"),name:e.string().nullish().describe("Display name for this account. Falls back to account number if not set"),bank_name:e.string().nullish().describe("Bank name"),iban:e.string().nullish().describe("IBAN (for type=iban)"),account_number:e.string().nullish().describe("Account number (for us_domestic, uk_domestic, other)"),bic:e.string().nullish().describe("BIC/SWIFT code for international transfers"),routing_number:e.string().nullish().describe("US ABA routing number (for type=us_domestic)"),sort_code:e.string().nullish().describe("UK sort code (for type=uk_domestic)")}).nullish()}).describe("Document issuer (entity) information").and(e.object({save_customer:e.boolean().nullish().describe("Whether to save (create new or update existing) the customer data.\nDefaults to `true` (best-effort).\nWhen `true` with `customer_id`, updates the existing customer.\nWhen `true` without `customer_id`, checks for duplicate customers using customer identifiers (tax/company number, country-aware when available) and reuses the existing customer if found, otherwise creates a new customer.\nWhen `false`, customer data is stored inline on the document only.\nWhen omitted, behaves like `true` but won't fail the request if persistence fails.")}).nullable()).optional().describe("Customer recipient of the document.\nBoth `customer` and `customer_id` are optional - documents can be created without customer information.\nIf both `customer_id` and `customer` are provided with `save_customer=true`, the existing customer will be updated.\nIf only `customer` is provided with `save_customer=true` (or by default), the system checks for duplicates using customer identifiers and reuses existing customers when found."),note:e.string().nullish().describe("Note for the document. If not provided, defaults to entity's document-type-specific note setting. Pass empty string to explicitly set no note."),payment_terms:e.string().nullish().describe("Payment terms for the document. If not provided, defaults to entity's document-type-specific payment terms setting. Pass empty string to explicitly set no terms."),tax_clause:e.string().nullish().describe("Tax clause for the document. Auto-populated based on transaction type if tax_clause_defaults are configured in entity settings. Pass empty string to explicitly set no clause."),footer:e.string().max(iu).nullish(),signature:e.string().nullish().describe("Signature text for the document (e.g. 'John Smith, CEO'). If not provided, defaults to entity's default_document_signature setting. Pass empty string to explicitly set no signature."),calculation_mode:e.union([e.literal("b2b_standard"),e.literal("b2c_gross_discount"),e.literal(null)]).nullish().describe("Optional calculation mode override. When omitted, the entity default is used and falls back to `b2b_standard`."),currency_code:e.string().max(au).optional(),metadata:e.record(e.string(),e.string()).nullish().describe("Custom key-value data for your own use. Store any JSON object up to 50 properties. Values must be strings up to 250 characters. Useful for storing external IDs, tags, or integration data."),reference:e.string().nullish().describe("Custom reference for the document (e.g., purchase order number, payment reference). When set, used as the UPN payment reference instead of the auto-generated one."),pt:e.object({series_id:e.string().nullish().describe("ATCUD series ID to use for PT numbering. Required for PT manual documents."),manual:e.boolean().nullish().describe("Marks this PT document as manually issued/offline."),manual_sequential_number:e.number().min(1).nullish().describe("Manual PT sequence number shown on the offline/original document."),manual_series_code:e.string().min(1).max(du).nullish().describe("Offline/manual PT series code shown on the original document."),operator_first_name:e.string().min(1).nullish().describe("PT operator first name snapshot for PT compliance."),operator_last_name:e.string().min(1).nullish().describe("PT operator last name snapshot for PT compliance."),operator_tax_number:e.string().min(1).nullish().describe("PT operator tax number snapshot for PT compliance."),account_first_name:e.string().min(1).nullish().describe("Deprecated alias for PT operator first name snapshot."),account_last_name:e.string().min(1).nullish().describe("Deprecated alias for PT operator last name snapshot."),account_tax_number:e.string().min(1).nullish().describe("Deprecated alias for PT operator tax number snapshot.")}).nullish(),date_service:e.string().regex(cu).nullish().describe("Service date in YYYY-MM-DD format. For invoices and credit notes."),date_service_to:e.string().regex(lu).nullish().describe("Service period end date in YYYY-MM-DD format. For invoices and credit notes. Use with date_service for date ranges."),date_due:e.string().regex(uu).nullish().describe("Document due date in YYYY-MM-DD format"),items:e.array(e.object({type:e.union([e.literal("separator"),e.literal(null)]).nullish().describe(`Item type. Omit or null for regular line item, 'separator' for a visual section header.
|
|
40
|
+
Separator items only use name and description \u2014 all financial fields are ignored.`),name:e.string().min(1).nullish().describe("Item name. Required unless `item_id` is provided.\nFor separator items, this is the section title (always required)."),description:e.string().max(pu).nullish(),classification:e.union([e.literal("product"),e.literal("service"),e.literal("advance"),e.literal(null)]).nullish().describe("Item classification used for Portugal SAF-T product typing."),price:e.number().nullish().describe("Net price per unit (before tax).\nProvide either `price` OR `gross_price`, not both.\nOptional if `item_id` is provided. Ignored for separator items."),gross_price:e.number().nullish().describe("Gross price per unit (includes tax).\nIf provided, net price is calculated.\nProvide either `price` OR `gross_price`, not both.\nOptional if `item_id` is provided. Ignored for separator items."),quantity:e.number().min(mu).max(gu).nullish().describe("Item quantity. Required for regular items. Ignored for separator items."),unit:e.string().max(yu).nullish(),taxes:e.array(e.object({rate:e.number().nullish(),tax_id:e.string().nullish(),classification:e.string().nullish(),reverse_charge:e.boolean().nullish(),amount:e.number().nullish(),pt_exemption_code:e.string().nullish(),pt_exemption_reason:e.string().nullish()}).describe("Document Item Tax")).optional().describe("Applied taxes (provide rate to create new tax, or tax_id to use existing tax)"),discounts:e.array(e.object({value:e.number().min(hu).describe("Discount value"),type:e.enum(["percent","amount"]).default(bu).describe("Discount type: 'percent' (default) or 'amount'")})).max(xu).optional().describe("Line discounts (max 5) in request order. In `b2b_standard`, percentage discounts are calculated from the original line subtotal and fixed amounts are summed before tax. In `b2c_gross_discount`, discounts are applied sequentially to the running gross subtotal."),item_id:e.string().nullish().describe(`ID of a catalog item to prefill from.
|
|
41
|
+
When provided, the item's name, description, price, and taxes are used as defaults.
|
|
42
|
+
Any field you provide will override the catalog item's value.
|
|
43
|
+
Not applicable for separator items.`),metadata:e.record(e.string(),e.string()).nullish().describe("Custom key-value data for your own use. Store any JSON object up to 50 properties. Values must be strings up to 250 characters. Useful for storing external IDs, tags, or integration data."),save_item:e.boolean().nullish().describe(`Whether to save this item to the catalog.
|
|
44
|
+
When true without item_id, matches by exact name and reuses existing, or creates a new catalog item.
|
|
45
|
+
Defaults to true (best-effort). When omitted, behaves like true but won't fail the request if persistence fails.`)})).min(1).describe("Line items for the credit note. At least one item is required."),linked_documents:e.array(e.string().min(1)).nullish().describe("Link this credit note to invoices. Accepts invoice IDs (inv_xxx). Creates 'credit_for' document relations. If no payment is specified and linked invoices have remaining balance, automatically applies the credit note to the invoices."),payments:e.array(e.object({incoming_purchase_document_id:e.string().max(zu).nullish(),applied_to_incoming_purchase_document_id:e.string().max(_u).nullish(),amount:e.number().gt(vu).nullish().describe("Payment amount. If not provided, uses the document total (total_with_tax)"),type:e.enum(["cash","bank_transfer","card","check","paypal","coupon","other","credit_note","advance"]).describe("Payment type/method"),date:e.string().nullish().describe("Payment date in YYYY-MM-DD format. Defaults to today."),tag:e.string().nullish(),reference:e.string().nullish(),note:e.string().nullish(),metadata:e.record(e.string(),e.string()).nullish().describe("Custom key-value data for your own use. Store any JSON object up to 50 properties. Values must be strings up to 250 characters. Useful for storing external IDs, tags, or integration data.")})).nullish().describe("Optional payments to record with the credit note. If amounts are not provided, the credit note total is split equally among all payments. Automatically updates credit note payment status."),furs:e.object({business_premise_name:e.string().min(1).nullish().describe("FURS business premise name (e.g., 'P1', 'STORE1'). Required unless skip=true."),electronic_device_name:e.string().min(1).nullish().describe("FURS electronic device name (e.g., 'E1', 'POS1'). Required unless skip=true."),operator_tax_number:e.string().nullish().describe("Operator tax number. If not provided and using user authentication, defaults to user's FURS settings."),operator_label:e.string().nullish().describe("Operator label/name. If not provided and using user authentication, defaults to user's FURS settings."),skip:e.boolean().nullish().describe("Skip FURS fiscalization. Only allowed for bank transfer payments or unpaid invoices. Cash/card/check payments always require fiscalization per Slovenian law.")}).nullish(),fina:e.object({business_premise_name:e.string().min(1).max(fu).regex(Ru).nullish().describe("CIS business premise name (OznPosPr, alphanumeric, 1-20 chars). Required when CIS is enabled."),electronic_device_name:e.string().min(1).max(Iu).regex(Eu).nullish().describe("CIS electronic device name (OznNapUr, digits only, 1-20 chars). Required when CIS is enabled."),operator_oib:e.string().min(Su).max(Du).nullish().describe("Operator OIB (11 digits). If not provided and using user authentication, defaults to the user's FINA settings. Otherwise falls back to entity settings."),operator_label:e.string().nullish().describe("Operator label/name. If not provided and using user authentication, defaults to the user's FINA settings. Otherwise falls back to entity settings."),payment_type:e.union([e.literal("cash"),e.literal("card"),e.literal("online"),e.literal("bank_transfer"),e.literal("paypal"),e.literal("crypto"),e.literal("coupon"),e.literal("other"),e.literal(null)]).nullish().describe("Expected payment method for CIS (NacinPlac field). Optional when document payments are provided because the API derives it from the document payments; when multiple payments are present, FINA uses 'other'."),subsequent_submit:e.boolean().nullish().describe("Late/subsequent submission flag (NakDost). Set to true if submitting after the normal deadline.")}).nullish(),eslog:e.object({validation_enabled:e.boolean().nullish().describe("Enable e-SLOG validation for this document. true = validate, false = skip, null/undefined = use entity default")}).nullish(),expected_total_with_tax:e.number().gt(Pu).nullish().describe("Expected total with tax. When provided, the system calculates a rounding_correction to reconcile differences between the calculated total and this expected value. Maximum allowed correction is \xB11.00. Useful when importing invoices from external systems with different rounding rules.")}),wu=10,Cu=100,Sye=e.object({limit:e.number().min(1).max(Cu).default(wu).describe("Number of results per request."),next_cursor:e.string().optional().describe("Opaque cursor to fetch the next page of results. Reuse only with the same effective ordering. Use the value from pagination.next_cursor in the previous response."),prev_cursor:e.string().optional().describe("Opaque cursor to fetch the previous page of results. Reuse only with the same effective ordering. Use the value from pagination.prev_cursor in the previous response."),include_total_count:e.boolean().optional().describe("Whether to include the total count of items in `pagination.total`.\nDefault is `true`.\nWhen `false`, `pagination.total` returns -1 for better performance."),order_by:e.union([e.enum(["id","number","date","total","total_with_tax","created_at","updated_at","-id","-number","-date","-total","-total_with_tax","-created_at","-updated_at"]),e.array(e.enum(["id","number","date","total","total_with_tax","created_at","updated_at","-id","-number","-date","-total","-total_with_tax","-created_at","-updated_at"]))]).optional().describe("Sort by one field or provide a repeated array for multi-column ordering. Prefix a field with `-` for descending order. When paginating, reuse cursors only with the same effective ordering."),query:e.string().optional().describe('JSON query object for filtering results. Supports MongoDB-style operators.\n\n**Supported operators:**\n- `equals` or direct value - Exact match (default)\n- `gte` - Greater than or equal\n- `lte` - Less than or equal\n- `gt` - Greater than\n- `lt` - Less than\n- `in` - Value in array\n- `notIn` - Value not in array\n- `contains` - String contains (case-insensitive)\n- `startsWith` - String starts with\n- `endsWith` - String ends with\n- `between` - Value between two numbers/dates [min, max]\n\n**Allowed fields:** id, number, date, customer, customer.name, customer.email, customer.address, customer.city, customer.country, total, total_with_tax, items.name, items.description, payments.type, payments.date, document_relations.relation_type, document_relations.target_type, metadata, created_at, updated_at, paid_in_full, voided_at\n\n**Examples:**\n- `{"total": {"gte": 1000}}` - Invoices over 1000\n- `{"customer.name": {"contains": "Acme"}}` - Customer name contains "Acme"\n- `{"date": {"between": ["2025-01-01", "2025-12-31"]}}` - Date range'),search:e.string().optional().describe(`Full-text search query to filter results across multiple fields.
|
|
46
|
+
Searches are case-insensitive and match partial strings.
|
|
47
|
+
Searches across all text fields including names, descriptions, addresses, and metadata values.`),include:e.string().optional().describe("Comma-separated list of relations to include in the response.\n\n**Available relations:**\n- `payments` - Payment records linked to this credit note\n- `document_relations` - Linked documents (invoices, advance invoices, etc.)\n\n**Usage:**\n`?include=payments`\n`?include=payments,document_relations`"),deleted:e.boolean().optional().describe("When true, returns only soft-deleted (trashed) items. Default false excludes deleted items.")}),Dye=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),Au=36,Mu=100,Tu=2,ku=2,Bu="iban",Nu=36,Ou=2,Fu=2,Uu="iban",ju=500,qu=-140737488355328,Wu=0x7fffffffffff,Gu=-140737488355328,Vu=0x7fffffffffff,Lu=3,Hu=36,Yu=-2147483648,Ku=2147483647,$u=100,Qu=-140737488355328,Ju=0x7fffffffffff,Zu=-140737488355328,Xu=0x7fffffffffff,ep=-140737488355328,tp=0x7fffffffffff,op=-140737488355328,np=0x7fffffffffff,sp=0,rp=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,ip=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,ap=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,dp=36,cp=500,lp=50,up=0,pp="percent",mp=5,gp=-140737488355328,yp=0x7fffffffffff,hp=-140737488355328,bp=0x7fffffffffff,xp=36,zp=36,_p=36,vp=36,Pye=e.object({data:e.array(e.object({id:e.string().max(Au),number:e.string().max(Mu),is_draft:e.boolean().describe("Whether this is a draft document. Draft documents have no sequential number assigned, skip fiscalization, and can be deleted. Use POST /{documents}/{id}/finalize to assign a number and finalize."),date:e.iso.datetime({}).describe("Date the credit note was created (ISO 8601 datetime at midnight UTC)"),issuer:e.object({name:e.string().nullish(),email:e.email().nullish(),address:e.string().nullish(),address_2:e.string().nullish(),post_code:e.string().nullish(),city:e.string().nullish(),state:e.string().nullish(),country:e.string().nullish(),country_code:e.string().min(Tu).max(ku).nullish(),tax_number:e.string().nullish(),tax_number_2:e.string().nullish(),company_number:e.string().nullish(),phone:e.string().nullish(),peppol_id:e.string().nullish(),is_end_consumer:e.boolean().nullish(),bank_account:e.object({type:e.enum(["iban","us_domestic","uk_domestic","other"]).default(Bu).describe("Account type determines which fields are used"),name:e.string().nullish().describe("Display name for this account. Falls back to account number if not set"),bank_name:e.string().nullish().describe("Bank name"),iban:e.string().nullish().describe("IBAN (for type=iban)"),account_number:e.string().nullish().describe("Account number (for us_domestic, uk_domestic, other)"),bic:e.string().nullish().describe("BIC/SWIFT code for international transfers"),routing_number:e.string().nullish().describe("US ABA routing number (for type=us_domestic)"),sort_code:e.string().nullish().describe("UK sort code (for type=uk_domestic)")}).nullish()}).describe("Document issuer (entity) information"),customer_id:e.string().max(Nu).nullish(),customer:e.object({name:e.string().nullish(),email:e.email().nullish(),address:e.string().nullish(),address_2:e.string().nullish(),post_code:e.string().nullish(),city:e.string().nullish(),state:e.string().nullish(),country:e.string().nullish(),country_code:e.string().min(Ou).max(Fu).nullish(),tax_number:e.string().nullish(),tax_number_2:e.string().nullish(),company_number:e.string().nullish(),phone:e.string().nullish(),peppol_id:e.string().nullish(),is_end_consumer:e.boolean().nullish(),bank_account:e.object({type:e.enum(["iban","us_domestic","uk_domestic","other"]).default(Uu).describe("Account type determines which fields are used"),name:e.string().nullish().describe("Display name for this account. Falls back to account number if not set"),bank_name:e.string().nullish().describe("Bank name"),iban:e.string().nullish().describe("IBAN (for type=iban)"),account_number:e.string().nullish().describe("Account number (for us_domestic, uk_domestic, other)"),bic:e.string().nullish().describe("BIC/SWIFT code for international transfers"),routing_number:e.string().nullish().describe("US ABA routing number (for type=us_domestic)"),sort_code:e.string().nullish().describe("UK sort code (for type=uk_domestic)")}).nullish()}).nullish().describe("Customer information"),note:e.string().nullish().describe("Note for the document. If not provided, defaults to entity's document-type-specific note setting. Pass empty string to explicitly set no note."),payment_terms:e.string().nullish().describe("Payment terms for the document. If not provided, defaults to entity's document-type-specific payment terms setting. Pass empty string to explicitly set no terms."),tax_clause:e.string().nullish().describe("Tax clause for the document. Auto-populated based on transaction type if tax_clause_defaults are configured in entity settings. Pass empty string to explicitly set no clause."),footer:e.string().max(ju).nullish(),signature:e.string().nullish().describe("Signature text for the document (e.g. 'John Smith, CEO'). If not provided, defaults to entity's default_document_signature setting. Pass empty string to explicitly set no signature."),total:e.number().min(qu).max(Wu),total_with_tax:e.number().min(Gu).max(Vu),total_discount:e.number().describe("Document discount total stored as a net-equivalent amount for compatibility. In `b2b_standard`, this is the net value of line-item discounts applied before tax. In `b2c_gross_discount`, gross discounts are converted back to their net-equivalent value here. 0 when no discounts applied."),creation_source:e.enum(["standard","custom"]).describe("Internal origin of the create request. `standard` means a normal create endpoint calculated the totals. `custom` means the document was created through a `/custom` endpoint."),calculation_mode:e.enum(["b2b_standard","b2c_gross_discount"]).describe("Resolved calculation mode used for this document. Stored on the document so recalculation and rendering remain stable even if entity defaults change later."),taxes:e.array(e.object({rate:e.number().nullable(),tax_id:e.string().nullish(),base:e.number(),amount:e.number(),reverse_charge:e.boolean().nullish()})).describe("Applied taxes summary"),currency_code:e.string().max(Lu),entity_id:e.string().max(Hu),date_year:e.number().min(Yu).max(Ku),shareable_id:e.string().max($u).nullish(),voided_at:e.iso.datetime({}).nullish(),transaction_type:e.union([e.literal("domestic"),e.literal("intra_eu_b2b"),e.literal("intra_eu_b2c"),e.literal("3w_b2b"),e.literal("3w_b2c"),e.literal("export"),e.literal(null)]).nullish().describe("Transaction type for VAT purposes (domestic, intra_eu_b2b, intra_eu_b2c, export). Always determined based on issuer/customer countries."),metadata:e.record(e.string(),e.string()).nullish().describe("Custom key-value data for your own use. Store any JSON object up to 50 properties. Values must be strings up to 250 characters. Useful for storing external IDs, tags, or integration data."),exchange_rate:e.object({rate:e.number().describe("Exchange rate used for conversion"),source:e.string().describe("Source of the exchange rate (e.g., 'Frankfurter')"),date:e.iso.datetime({}).describe("Date of the exchange rate"),quote_currency:e.string().describe("Quote currency (the base currency converted to)")}).nullish().describe("Currency exchange rate information if conversion was applied"),total_converted:e.number().min(Qu).max(Ju).nullish(),total_with_tax_converted:e.number().min(Zu).max(Xu).nullish(),rounding_correction:e.number().nullish().describe("Rounding correction applied to reconcile differences between calculated total_with_tax and expected_total_with_tax. Only present when expected_total_with_tax was provided during creation."),eslog:e.object({validation_enabled:e.boolean().nullish().describe("Override entity default: true = validate, false = skip, null = use entity setting"),validation_status:e.union([e.literal("valid"),e.literal("invalid"),e.literal("not_validated"),e.literal(null)]).nullish().describe("Validation status: 'valid', 'invalid', or 'not_validated'"),validation_errors:e.array(e.string()).nullish().describe("Array of validation error messages (if status is 'invalid')"),validated_at:e.string().nullish().describe("ISO timestamp when validation was last performed")}).nullish().describe("e-SLOG 2.0 validation data for Slovenian electronic invoices. Only applicable when entity.country_code = 'SI' and eslog validation is enabled."),reference:e.string().nullish().describe("Custom reference for the document (e.g., purchase order number, payment reference). When set, used as the UPN payment reference instead of the auto-generated one."),vies:e.object({warning:e.string().nullable().describe("Warning message if VIES validation was unavailable or the VAT number was invalid. Document creation proceeds but this indicates the transaction type may need review."),skipped:e.boolean().nullable().describe("True when VIES validation was skipped due to entity settings (vies_validate_vat: false) but would normally apply. Used for audit trail.")}).nullish().describe("VIES validation info including any warnings and skipped indicator for audit trail"),deleted_at:e.iso.datetime({}).nullish().describe("Timestamp when the document was soft-deleted. Null if not deleted."),created_at:e.iso.datetime({}),updated_at:e.iso.datetime({}),total_paid:e.number().min(ep).max(tp),total_due:e.number().min(op).max(np),paid_in_full:e.boolean(),furs:e.object({status:e.enum(["pending","success","failed","skipped"]),fiscalized_at:e.iso.datetime({}).optional(),error:e.string().optional(),cancellation_reason:e.string().optional(),data:e.object({zoi:e.string(),eor:e.string().optional(),qr_code:e.string().optional(),business_premise_name:e.string(),electronic_device_name:e.string(),invoice_number:e.string(),iteration:e.number().default(sp),payload:e.record(e.string(),e.unknown()).describe("FURS API request payload"),issuer_tax_number:e.string().optional(),operator_tax_number:e.string().optional(),operator_label:e.string().optional(),foreign_operator:e.boolean().optional(),cancelled:e.boolean().optional(),cancelled_eor:e.string().optional(),cancellation_payload:e.record(e.string(),e.unknown()).optional().describe("FURS API cancellation payload")}).optional()}).nullish().describe("FURS (Slovenia) fiscalization data. Read-only field, not editable via API. Includes status, premise name, device name, and FURS identifiers (ZOI, EOR, QR code)."),fina:e.object({status:e.enum(["pending","success","failed"]),fiscalized_at:e.iso.datetime({}).optional(),error:e.string().optional(),data:e.object({zki:e.string(),jir:e.string().optional(),qr_code_url:e.string().optional(),business_premise_name:e.string(),electronic_device_name:e.string(),invoice_number:e.string(),operator_oib:e.string().optional(),payment_type:e.string().optional(),numbering_sequence:e.string().optional(),payload:e.record(e.string(),e.unknown()).describe("CIS SOAP request payload"),subsequent_submit:e.boolean().optional(),issuer_oib:e.string().optional(),operator_label:e.string().optional()}).optional()}).nullish().describe("FINA (Croatia) CIS fiscalization data. Read-only field. Includes status, business premise name, electronic device name, and CIS identifiers (ZKI, JIR, QR code URL)."),pt:e.union([e.string(),e.number(),e.boolean(),e.null(),e.record(e.string(),e.unknown()),e.array(e.unknown())]).optional(),date_service:e.string().regex(rp).nullish().describe("Service date in YYYY-MM-DD format. For invoices and credit notes."),date_service_to:e.string().regex(ip).nullish().describe("Service period end date in YYYY-MM-DD format. For invoices and credit notes. Use with date_service for date ranges."),date_due:e.string().regex(ap).nullish().describe("Document due date in YYYY-MM-DD format"),items:e.array(e.object({id:e.string().max(dp),type:e.union([e.literal("separator"),e.literal(null)]).nullish().describe("Item type. null = regular line item, 'separator' = visual section header."),name:e.string().max(cp),description:e.string().nullable(),classification:e.union([e.literal("product"),e.literal("service"),e.literal("advance"),e.literal(null)]).nullish().describe("Item classification used for Portugal SAF-T product typing."),price:e.number().nullish().describe("Per-unit net price (before tax). Always stores net price. Null for separator items."),gross_price:e.number().nullish().describe(`Per-unit gross price (includes tax).
|
|
48
|
+
Only present if user originally sent gross price.
|
|
49
|
+
Use gross pricing to keep invoice totals stable when VIES reverse charge is applied.`),quantity:e.number().nullish().describe("Item quantity. Null for separator items."),unit:e.string().max(lp).nullish(),taxes:e.array(e.object({rate:e.number().nullish(),tax_id:e.string().nullish(),classification:e.string().nullish(),reverse_charge:e.boolean().nullish(),amount:e.number().nullish(),pt_exemption_code:e.string().nullish(),pt_exemption_reason:e.string().nullish()}).describe("Document Item Tax")).describe("Applied taxes (provide rate to create new tax, or tax_id to use existing tax)"),discounts:e.array(e.object({value:e.number().min(up).describe("Discount value"),type:e.enum(["percent","amount"]).default(pp).describe("Discount type: 'percent' (default) or 'amount'")})).max(mp).describe("Line discounts (max 5) in request order. In `b2b_standard`, percentage discounts are calculated from the original line subtotal and fixed amounts are summed before tax. In `b2c_gross_discount`, discounts are applied sequentially to the running gross subtotal."),total:e.number().nullish().describe("Line total before tax. Null for separator items."),total_with_tax:e.number().nullish().describe("Line total after tax. Null for separator items."),total_converted:e.number().min(gp).max(yp).nullish(),total_with_tax_converted:e.number().min(hp).max(bp).nullish(),credit_note_id:e.string().max(xp).nullish(),advance_invoice_id:e.string().max(zp).nullish(),delivery_note_id:e.string().max(_p).nullish(),item_id:e.string().max(vp).nullish(),metadata:e.record(e.string(),e.string()).optional(),created_at:e.iso.datetime({}),updated_at:e.iso.datetime({})})),document_relations:e.array(e.object({id:e.string(),source_type:e.enum(["invoice","estimate","credit_note","advance_invoice","delivery_note"]).describe("Type of document"),source_id:e.string(),target_type:e.enum(["invoice","estimate","credit_note","advance_invoice","delivery_note"]).describe("Type of document"),target_id:e.string(),relation_type:e.string(),entity_id:e.string(),created_at:e.iso.datetime({}),linked_document_voided_at:e.iso.datetime({}).nullish(),related_document:e.object({id:e.string(),type:e.enum(["invoice","estimate","credit_note","advance_invoice","delivery_note"]).describe("Type of document"),number:e.string(),date:e.string(),total_with_tax:e.number(),currency_code:e.string(),is_draft:e.boolean(),voided_at:e.string().nullable(),paid_in_full:e.boolean().nullable(),title_type:e.union([e.literal("estimate"),e.literal("proforma_invoice"),e.literal(null)]).nullable(),hide_prices:e.boolean().nullable()}).optional()})).optional()}).describe("Credit note document for refunds/corrections")),pagination:e.object({total:e.number().describe("Total number of items available in the collection"),next_cursor:e.string().nullable().describe("Opaque cursor for fetching the next page. It encodes the resolved sort tuple for the current result set, so reuse it only with the same effective ordering. Null if no more results are available."),prev_cursor:e.string().nullable().describe("Opaque cursor for fetching the previous page. It encodes the resolved sort tuple for the current result set, so reuse it only with the same effective ordering. Null if at the first page."),has_more:e.boolean().describe("Indicates whether more results are available after the current page")}).describe("Pagination metadata including cursors and result counts")}),wye=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),fp=2,Rp=2,Ip="iban",Ep=2,Sp=2,Dp="iban",Pp=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,wp=2e3,Cp=50,Ap=0,Mp="percent",Tp=5,kp=36,Bp=36,Np=0,Op=20,Fp=/^[0-9a-zA-Z]{1,20}$/,Up=20,jp=/^\d{1,20}$/,qp=11,Wp=11,Cye=e.object({is_draft:e.boolean().nullish(),date:e.string().nullish(),issuer:e.object({name:e.string().nullish(),email:e.email().nullish(),address:e.string().nullish(),address_2:e.string().nullish(),post_code:e.string().nullish(),city:e.string().nullish(),state:e.string().nullish(),country:e.string().nullish(),country_code:e.string().min(fp).max(Rp).nullish(),tax_number:e.string().nullish(),tax_number_2:e.string().nullish(),company_number:e.string().nullish(),phone:e.string().nullish(),peppol_id:e.string().nullish(),is_end_consumer:e.boolean().nullish(),bank_account:e.object({type:e.enum(["iban","us_domestic","uk_domestic","other"]).default(Ip).describe("Account type determines which fields are used"),name:e.string().nullish().describe("Display name for this account. Falls back to account number if not set"),bank_name:e.string().nullish().describe("Bank name"),iban:e.string().nullish().describe("IBAN (for type=iban)"),account_number:e.string().nullish().describe("Account number (for us_domestic, uk_domestic, other)"),bic:e.string().nullish().describe("BIC/SWIFT code for international transfers"),routing_number:e.string().nullish().describe("US ABA routing number (for type=us_domestic)"),sort_code:e.string().nullish().describe("UK sort code (for type=uk_domestic)")}).nullish()}).describe("Document issuer (entity) information").and(e.looseObject({}).nullable()).optional(),customer_id:e.string().nullish().describe("Referenced Customer ID."),customer:e.object({name:e.string().nullish(),email:e.email().nullish(),address:e.string().nullish(),address_2:e.string().nullish(),post_code:e.string().nullish(),city:e.string().nullish(),state:e.string().nullish(),country:e.string().nullish(),country_code:e.string().min(Ep).max(Sp).nullish(),tax_number:e.string().nullish(),tax_number_2:e.string().nullish(),company_number:e.string().nullish(),phone:e.string().nullish(),peppol_id:e.string().nullish(),is_end_consumer:e.boolean().nullish(),bank_account:e.object({type:e.enum(["iban","us_domestic","uk_domestic","other"]).default(Dp).describe("Account type determines which fields are used"),name:e.string().nullish().describe("Display name for this account. Falls back to account number if not set"),bank_name:e.string().nullish().describe("Bank name"),iban:e.string().nullish().describe("IBAN (for type=iban)"),account_number:e.string().nullish().describe("Account number (for us_domestic, uk_domestic, other)"),bic:e.string().nullish().describe("BIC/SWIFT code for international transfers"),routing_number:e.string().nullish().describe("US ABA routing number (for type=us_domestic)"),sort_code:e.string().nullish().describe("UK sort code (for type=uk_domestic)")}).nullish()}).describe("Document issuer (entity) information").and(e.object({save_customer:e.boolean().nullish().describe("Whether to save (create new or update existing) the customer data.\nDefaults to `true` (best-effort).\nWhen `true` with `customer_id`, updates the existing customer.\nWhen `true` without `customer_id`, checks for duplicate customers using customer identifiers (tax/company number, country-aware when available) and reuses the existing customer if found, otherwise creates a new customer.\nWhen `false`, customer data is stored inline on the document only.\nWhen omitted, behaves like `true` but won't fail the request if persistence fails.")}).nullable()).optional().describe("Customer recipient of the document.\nBoth `customer` and `customer_id` are optional - documents can be created without customer information.\nIf both `customer_id` and `customer` are provided with `save_customer=true`, the existing customer will be updated.\nIf only `customer` is provided with `save_customer=true` (or by default), the system checks for duplicates using customer identifiers and reuses existing customers when found."),note:e.string().nullish(),payment_terms:e.string().nullish(),tax_clause:e.string().nullish(),footer:e.string().nullish(),signature:e.string().nullish(),calculation_mode:e.union([e.literal("b2b_standard"),e.literal("b2c_gross_discount"),e.literal(null)]).nullish().describe("Optional calculation mode override. When omitted, the entity default is used and falls back to `b2b_standard`."),currency_code:e.string().nullish(),metadata:e.record(e.string(),e.string()).nullish().describe("Custom key-value data for your own use. Store any JSON object up to 50 properties. Values must be strings up to 250 characters. Useful for storing external IDs, tags, or integration data."),reference:e.string().nullish(),pt:e.union([e.string(),e.number(),e.boolean(),e.null(),e.record(e.string(),e.unknown()),e.array(e.unknown())]).optional(),date_service:e.string().nullish(),date_service_to:e.string().nullish(),date_due:e.string().regex(Pp).nullish().describe("Document due date in YYYY-MM-DD format"),items:e.array(e.object({type:e.union([e.literal("separator"),e.literal(null)]).nullish().describe(`Item type. Omit or null for regular line item, 'separator' for a visual section header.
|
|
50
|
+
Separator items only use name and description \u2014 all financial fields are ignored.`),name:e.string().min(1).nullish().describe("Item name. Required unless `item_id` is provided.\nFor separator items, this is the section title (always required)."),description:e.string().max(wp).nullish(),classification:e.union([e.literal("product"),e.literal("service"),e.literal("advance"),e.literal(null)]).nullish().describe("Item classification used for Portugal SAF-T product typing."),price:e.number().nullish().describe("Net price per unit (before tax). Optional for custom documents. Ignored for separator items."),gross_price:e.number().nullish().describe("Gross price per unit (includes tax). Optional for custom documents. Ignored for separator items."),quantity:e.number().nullish().describe("Item quantity. Null for separator items."),unit:e.string().max(Cp).nullish(),taxes:e.array(e.object({rate:e.number().nullish(),tax_id:e.string().nullish(),classification:e.string().nullish(),reverse_charge:e.boolean().nullish(),amount:e.number().nullish(),pt_exemption_code:e.string().nullish(),pt_exemption_reason:e.string().nullish()}).describe("Document Item Tax")).optional().describe("Applied taxes (provide rate to create new tax, or tax_id to use existing tax)"),discounts:e.array(e.object({value:e.number().min(Ap).describe("Discount value"),type:e.enum(["percent","amount"]).default(Mp).describe("Discount type: 'percent' (default) or 'amount'")})).max(Tp).optional().describe("Line discounts (max 5) in request order. In `b2b_standard`, percentage discounts are calculated from the original line subtotal and fixed amounts are summed before tax. In `b2c_gross_discount`, discounts are applied sequentially to the running gross subtotal."),total:e.number().nullish().describe("Pre-calculated total for this line item (before tax). Ignored for separator items."),total_with_tax:e.number().nullish().describe("Pre-calculated total for this line item (after tax). Ignored for separator items."),item_id:e.string().nullish().describe(`ID of a catalog item to prefill from.
|
|
51
|
+
When provided, the item's name, description, price, and taxes are used as defaults.
|
|
52
|
+
Any field you provide will override the catalog item's value.
|
|
53
|
+
Not applicable for separator items.`),metadata:e.record(e.string(),e.string()).nullish().describe("Custom key-value data for your own use. Store any JSON object up to 50 properties. Values must be strings up to 250 characters. Useful for storing external IDs, tags, or integration data."),save_item:e.boolean().nullish().describe(`Whether to save this item to the catalog.
|
|
54
|
+
When true without item_id, matches by exact name and reuses existing, or creates a new catalog item.
|
|
55
|
+
Defaults to true (best-effort). When omitted, behaves like true but won't fail the request if persistence fails.`)})).min(1).describe("Line items with pre-calculated totals. At least one item is required."),total:e.number().describe("Pre-calculated document total (before tax)."),total_with_tax:e.number().describe("Pre-calculated document total (after tax)."),total_discount:e.number().nullish().describe("Pre-calculated total net discount amount. Defaults to 0 if not provided."),taxes:e.array(e.object({rate:e.number().nullable(),tax_id:e.string().nullish(),base:e.number(),amount:e.number(),reverse_charge:e.boolean().nullish()})).optional().describe("Pre-calculated tax summary. If not provided, defaults to empty array."),linked_documents:e.array(e.string().min(1)).nullish().describe("Link this credit note to invoices."),payments:e.array(e.object({incoming_purchase_document_id:e.string().max(kp).nullish(),applied_to_incoming_purchase_document_id:e.string().max(Bp).nullish(),amount:e.number().gt(Np).nullish().describe("Payment amount. If not provided, uses the document total (total_with_tax)"),type:e.enum(["cash","bank_transfer","card","check","paypal","coupon","other","credit_note","advance"]).describe("Payment type/method"),date:e.string().nullish().describe("Payment date in YYYY-MM-DD format. Defaults to today."),tag:e.string().nullish(),reference:e.string().nullish(),note:e.string().nullish(),metadata:e.record(e.string(),e.string()).nullish().describe("Custom key-value data for your own use. Store any JSON object up to 50 properties. Values must be strings up to 250 characters. Useful for storing external IDs, tags, or integration data.")})).nullish().describe("Optional payments to record with the credit note. If amounts are not provided, the credit note total is split equally among all payments. Automatically updates credit note payment status."),furs:e.object({business_premise_name:e.string().min(1).nullish().describe("FURS business premise name (e.g., 'P1', 'STORE1'). Required unless skip=true."),electronic_device_name:e.string().min(1).nullish().describe("FURS electronic device name (e.g., 'E1', 'POS1'). Required unless skip=true."),operator_tax_number:e.string().nullish().describe("Operator tax number. If not provided and using user authentication, defaults to user's FURS settings."),operator_label:e.string().nullish().describe("Operator label/name. If not provided and using user authentication, defaults to user's FURS settings."),skip:e.boolean().nullish().describe("Skip FURS fiscalization. Only allowed for bank transfer payments or unpaid invoices. Cash/card/check payments always require fiscalization per Slovenian law.")}).nullish(),fina:e.object({business_premise_name:e.string().min(1).max(Op).regex(Fp).nullish().describe("CIS business premise name (OznPosPr, alphanumeric, 1-20 chars). Required when CIS is enabled."),electronic_device_name:e.string().min(1).max(Up).regex(jp).nullish().describe("CIS electronic device name (OznNapUr, digits only, 1-20 chars). Required when CIS is enabled."),operator_oib:e.string().min(qp).max(Wp).nullish().describe("Operator OIB (11 digits). If not provided and using user authentication, defaults to the user's FINA settings. Otherwise falls back to entity settings."),operator_label:e.string().nullish().describe("Operator label/name. If not provided and using user authentication, defaults to the user's FINA settings. Otherwise falls back to entity settings."),payment_type:e.union([e.literal("cash"),e.literal("card"),e.literal("online"),e.literal("bank_transfer"),e.literal("paypal"),e.literal("crypto"),e.literal("coupon"),e.literal("other"),e.literal(null)]).nullish().describe("Expected payment method for CIS (NacinPlac field). Optional when document payments are provided because the API derives it from the document payments; when multiple payments are present, FINA uses 'other'."),subsequent_submit:e.boolean().nullish().describe("Late/subsequent submission flag (NakDost). Set to true if submitting after the normal deadline.")}).nullish(),eslog:e.object({validation_enabled:e.boolean().nullish().describe("Enable e-SLOG validation for this document. true = validate, false = skip, null/undefined = use entity default")}).nullish()}),Gp=/^[a-z]{3,4}_[0-9a-f]{24}$/,Aye=e.object({id:e.stringFormat("resource-id",Gp).describe("Unique resource identifier")}),Mye=e.object({include:e.string().optional().describe("Comma-separated list of relations to include in the response.\n\n**Available relations:**\n- `payments` - Payment records linked to this credit note\n- `document_relations` - Linked documents (invoices, advance invoices, etc.)\n\n**Usage:**\n`?include=payments`\n`?include=payments,document_relations`")}),Tye=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),Vp=36,Lp=100,Hp=2,Yp=2,Kp="iban",$p=36,Qp=2,Jp=2,Zp="iban",Xp=500,em=-140737488355328,tm=0x7fffffffffff,om=-140737488355328,nm=0x7fffffffffff,sm=3,rm=36,im=-2147483648,am=2147483647,dm=100,cm=-140737488355328,lm=0x7fffffffffff,um=-140737488355328,pm=0x7fffffffffff,mm=-140737488355328,gm=0x7fffffffffff,ym=-140737488355328,hm=0x7fffffffffff,bm=0,xm=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,zm=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,_m=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,vm=36,fm=500,Rm=50,Im=0,Em="percent",Sm=5,Dm=-140737488355328,Pm=0x7fffffffffff,wm=-140737488355328,Cm=0x7fffffffffff,Am=36,Mm=36,Tm=36,km=36,kye=e.object({id:e.string().max(Vp),number:e.string().max(Lp),is_draft:e.boolean().describe("Whether this is a draft document. Draft documents have no sequential number assigned, skip fiscalization, and can be deleted. Use POST /{documents}/{id}/finalize to assign a number and finalize."),date:e.iso.datetime({}).describe("Date the credit note was created (ISO 8601 datetime at midnight UTC)"),issuer:e.object({name:e.string().nullish(),email:e.email().nullish(),address:e.string().nullish(),address_2:e.string().nullish(),post_code:e.string().nullish(),city:e.string().nullish(),state:e.string().nullish(),country:e.string().nullish(),country_code:e.string().min(Hp).max(Yp).nullish(),tax_number:e.string().nullish(),tax_number_2:e.string().nullish(),company_number:e.string().nullish(),phone:e.string().nullish(),peppol_id:e.string().nullish(),is_end_consumer:e.boolean().nullish(),bank_account:e.object({type:e.enum(["iban","us_domestic","uk_domestic","other"]).default(Kp).describe("Account type determines which fields are used"),name:e.string().nullish().describe("Display name for this account. Falls back to account number if not set"),bank_name:e.string().nullish().describe("Bank name"),iban:e.string().nullish().describe("IBAN (for type=iban)"),account_number:e.string().nullish().describe("Account number (for us_domestic, uk_domestic, other)"),bic:e.string().nullish().describe("BIC/SWIFT code for international transfers"),routing_number:e.string().nullish().describe("US ABA routing number (for type=us_domestic)"),sort_code:e.string().nullish().describe("UK sort code (for type=uk_domestic)")}).nullish()}).describe("Document issuer (entity) information"),customer_id:e.string().max($p).nullish(),customer:e.object({name:e.string().nullish(),email:e.email().nullish(),address:e.string().nullish(),address_2:e.string().nullish(),post_code:e.string().nullish(),city:e.string().nullish(),state:e.string().nullish(),country:e.string().nullish(),country_code:e.string().min(Qp).max(Jp).nullish(),tax_number:e.string().nullish(),tax_number_2:e.string().nullish(),company_number:e.string().nullish(),phone:e.string().nullish(),peppol_id:e.string().nullish(),is_end_consumer:e.boolean().nullish(),bank_account:e.object({type:e.enum(["iban","us_domestic","uk_domestic","other"]).default(Zp).describe("Account type determines which fields are used"),name:e.string().nullish().describe("Display name for this account. Falls back to account number if not set"),bank_name:e.string().nullish().describe("Bank name"),iban:e.string().nullish().describe("IBAN (for type=iban)"),account_number:e.string().nullish().describe("Account number (for us_domestic, uk_domestic, other)"),bic:e.string().nullish().describe("BIC/SWIFT code for international transfers"),routing_number:e.string().nullish().describe("US ABA routing number (for type=us_domestic)"),sort_code:e.string().nullish().describe("UK sort code (for type=uk_domestic)")}).nullish()}).nullish().describe("Customer information"),note:e.string().nullish().describe("Note for the document. If not provided, defaults to entity's document-type-specific note setting. Pass empty string to explicitly set no note."),payment_terms:e.string().nullish().describe("Payment terms for the document. If not provided, defaults to entity's document-type-specific payment terms setting. Pass empty string to explicitly set no terms."),tax_clause:e.string().nullish().describe("Tax clause for the document. Auto-populated based on transaction type if tax_clause_defaults are configured in entity settings. Pass empty string to explicitly set no clause."),footer:e.string().max(Xp).nullish(),signature:e.string().nullish().describe("Signature text for the document (e.g. 'John Smith, CEO'). If not provided, defaults to entity's default_document_signature setting. Pass empty string to explicitly set no signature."),total:e.number().min(em).max(tm),total_with_tax:e.number().min(om).max(nm),total_discount:e.number().describe("Document discount total stored as a net-equivalent amount for compatibility. In `b2b_standard`, this is the net value of line-item discounts applied before tax. In `b2c_gross_discount`, gross discounts are converted back to their net-equivalent value here. 0 when no discounts applied."),creation_source:e.enum(["standard","custom"]).describe("Internal origin of the create request. `standard` means a normal create endpoint calculated the totals. `custom` means the document was created through a `/custom` endpoint."),calculation_mode:e.enum(["b2b_standard","b2c_gross_discount"]).describe("Resolved calculation mode used for this document. Stored on the document so recalculation and rendering remain stable even if entity defaults change later."),taxes:e.array(e.object({rate:e.number().nullable(),tax_id:e.string().nullish(),base:e.number(),amount:e.number(),reverse_charge:e.boolean().nullish()})).describe("Applied taxes summary"),currency_code:e.string().max(sm),entity_id:e.string().max(rm),date_year:e.number().min(im).max(am),shareable_id:e.string().max(dm).nullish(),voided_at:e.iso.datetime({}).nullish(),transaction_type:e.union([e.literal("domestic"),e.literal("intra_eu_b2b"),e.literal("intra_eu_b2c"),e.literal("3w_b2b"),e.literal("3w_b2c"),e.literal("export"),e.literal(null)]).nullish().describe("Transaction type for VAT purposes (domestic, intra_eu_b2b, intra_eu_b2c, export). Always determined based on issuer/customer countries."),metadata:e.record(e.string(),e.string()).nullish().describe("Custom key-value data for your own use. Store any JSON object up to 50 properties. Values must be strings up to 250 characters. Useful for storing external IDs, tags, or integration data."),exchange_rate:e.object({rate:e.number().describe("Exchange rate used for conversion"),source:e.string().describe("Source of the exchange rate (e.g., 'Frankfurter')"),date:e.iso.datetime({}).describe("Date of the exchange rate"),quote_currency:e.string().describe("Quote currency (the base currency converted to)")}).nullish().describe("Currency exchange rate information if conversion was applied"),total_converted:e.number().min(cm).max(lm).nullish(),total_with_tax_converted:e.number().min(um).max(pm).nullish(),rounding_correction:e.number().nullish().describe("Rounding correction applied to reconcile differences between calculated total_with_tax and expected_total_with_tax. Only present when expected_total_with_tax was provided during creation."),eslog:e.object({validation_enabled:e.boolean().nullish().describe("Override entity default: true = validate, false = skip, null = use entity setting"),validation_status:e.union([e.literal("valid"),e.literal("invalid"),e.literal("not_validated"),e.literal(null)]).nullish().describe("Validation status: 'valid', 'invalid', or 'not_validated'"),validation_errors:e.array(e.string()).nullish().describe("Array of validation error messages (if status is 'invalid')"),validated_at:e.string().nullish().describe("ISO timestamp when validation was last performed")}).nullish().describe("e-SLOG 2.0 validation data for Slovenian electronic invoices. Only applicable when entity.country_code = 'SI' and eslog validation is enabled."),reference:e.string().nullish().describe("Custom reference for the document (e.g., purchase order number, payment reference). When set, used as the UPN payment reference instead of the auto-generated one."),vies:e.object({warning:e.string().nullable().describe("Warning message if VIES validation was unavailable or the VAT number was invalid. Document creation proceeds but this indicates the transaction type may need review."),skipped:e.boolean().nullable().describe("True when VIES validation was skipped due to entity settings (vies_validate_vat: false) but would normally apply. Used for audit trail.")}).nullish().describe("VIES validation info including any warnings and skipped indicator for audit trail"),deleted_at:e.iso.datetime({}).nullish().describe("Timestamp when the document was soft-deleted. Null if not deleted."),created_at:e.iso.datetime({}),updated_at:e.iso.datetime({}),total_paid:e.number().min(mm).max(gm),total_due:e.number().min(ym).max(hm),paid_in_full:e.boolean(),furs:e.object({status:e.enum(["pending","success","failed","skipped"]),fiscalized_at:e.iso.datetime({}).optional(),error:e.string().optional(),cancellation_reason:e.string().optional(),data:e.object({zoi:e.string(),eor:e.string().optional(),qr_code:e.string().optional(),business_premise_name:e.string(),electronic_device_name:e.string(),invoice_number:e.string(),iteration:e.number().default(bm),payload:e.record(e.string(),e.unknown()).describe("FURS API request payload"),issuer_tax_number:e.string().optional(),operator_tax_number:e.string().optional(),operator_label:e.string().optional(),foreign_operator:e.boolean().optional(),cancelled:e.boolean().optional(),cancelled_eor:e.string().optional(),cancellation_payload:e.record(e.string(),e.unknown()).optional().describe("FURS API cancellation payload")}).optional()}).nullish().describe("FURS (Slovenia) fiscalization data. Read-only field, not editable via API. Includes status, premise name, device name, and FURS identifiers (ZOI, EOR, QR code)."),fina:e.object({status:e.enum(["pending","success","failed"]),fiscalized_at:e.iso.datetime({}).optional(),error:e.string().optional(),data:e.object({zki:e.string(),jir:e.string().optional(),qr_code_url:e.string().optional(),business_premise_name:e.string(),electronic_device_name:e.string(),invoice_number:e.string(),operator_oib:e.string().optional(),payment_type:e.string().optional(),numbering_sequence:e.string().optional(),payload:e.record(e.string(),e.unknown()).describe("CIS SOAP request payload"),subsequent_submit:e.boolean().optional(),issuer_oib:e.string().optional(),operator_label:e.string().optional()}).optional()}).nullish().describe("FINA (Croatia) CIS fiscalization data. Read-only field. Includes status, business premise name, electronic device name, and CIS identifiers (ZKI, JIR, QR code URL)."),pt:e.union([e.string(),e.number(),e.boolean(),e.null(),e.record(e.string(),e.unknown()),e.array(e.unknown())]).optional(),date_service:e.string().regex(xm).nullish().describe("Service date in YYYY-MM-DD format. For invoices and credit notes."),date_service_to:e.string().regex(zm).nullish().describe("Service period end date in YYYY-MM-DD format. For invoices and credit notes. Use with date_service for date ranges."),date_due:e.string().regex(_m).nullish().describe("Document due date in YYYY-MM-DD format"),items:e.array(e.object({id:e.string().max(vm),type:e.union([e.literal("separator"),e.literal(null)]).nullish().describe("Item type. null = regular line item, 'separator' = visual section header."),name:e.string().max(fm),description:e.string().nullable(),classification:e.union([e.literal("product"),e.literal("service"),e.literal("advance"),e.literal(null)]).nullish().describe("Item classification used for Portugal SAF-T product typing."),price:e.number().nullish().describe("Per-unit net price (before tax). Always stores net price. Null for separator items."),gross_price:e.number().nullish().describe(`Per-unit gross price (includes tax).
|
|
56
|
+
Only present if user originally sent gross price.
|
|
57
|
+
Use gross pricing to keep invoice totals stable when VIES reverse charge is applied.`),quantity:e.number().nullish().describe("Item quantity. Null for separator items."),unit:e.string().max(Rm).nullish(),taxes:e.array(e.object({rate:e.number().nullish(),tax_id:e.string().nullish(),classification:e.string().nullish(),reverse_charge:e.boolean().nullish(),amount:e.number().nullish(),pt_exemption_code:e.string().nullish(),pt_exemption_reason:e.string().nullish()}).describe("Document Item Tax")).describe("Applied taxes (provide rate to create new tax, or tax_id to use existing tax)"),discounts:e.array(e.object({value:e.number().min(Im).describe("Discount value"),type:e.enum(["percent","amount"]).default(Em).describe("Discount type: 'percent' (default) or 'amount'")})).max(Sm).describe("Line discounts (max 5) in request order. In `b2b_standard`, percentage discounts are calculated from the original line subtotal and fixed amounts are summed before tax. In `b2c_gross_discount`, discounts are applied sequentially to the running gross subtotal."),total:e.number().nullish().describe("Line total before tax. Null for separator items."),total_with_tax:e.number().nullish().describe("Line total after tax. Null for separator items."),total_converted:e.number().min(Dm).max(Pm).nullish(),total_with_tax_converted:e.number().min(wm).max(Cm).nullish(),credit_note_id:e.string().max(Am).nullish(),advance_invoice_id:e.string().max(Mm).nullish(),delivery_note_id:e.string().max(Tm).nullish(),item_id:e.string().max(km).nullish(),metadata:e.record(e.string(),e.string()).optional(),created_at:e.iso.datetime({}),updated_at:e.iso.datetime({})})),document_relations:e.array(e.object({id:e.string(),source_type:e.enum(["invoice","estimate","credit_note","advance_invoice","delivery_note"]).describe("Type of document"),source_id:e.string(),target_type:e.enum(["invoice","estimate","credit_note","advance_invoice","delivery_note"]).describe("Type of document"),target_id:e.string(),relation_type:e.string(),entity_id:e.string(),created_at:e.iso.datetime({}),linked_document_voided_at:e.iso.datetime({}).nullish(),related_document:e.object({id:e.string(),type:e.enum(["invoice","estimate","credit_note","advance_invoice","delivery_note"]).describe("Type of document"),number:e.string(),date:e.string(),total_with_tax:e.number(),currency_code:e.string(),is_draft:e.boolean(),voided_at:e.string().nullable(),paid_in_full:e.boolean().nullable(),title_type:e.union([e.literal("estimate"),e.literal("proforma_invoice"),e.literal(null)]).nullable(),hide_prices:e.boolean().nullable()}).optional()})).optional()}).describe("Credit note document for refunds/corrections"),Bm=/^[a-z]{3,4}_[0-9a-f]{24}$/,Bye=e.object({id:e.stringFormat("resource-id",Bm).describe("Unique resource identifier")}),Nye=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),Nm=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,Om=2,Fm=2,Um="iban",jm=2,qm=2,Wm="iban",Gm=2e3,Vm=-140737488355328,Lm=0x7fffffffffff,Hm=50,Ym=0,Km="percent",$m=5,Qm=100,Jm=500,Zm=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,Xm=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,Oye=e.object({date:e.string().regex(Nm).optional().describe("Document date (YYYY-MM-DD or ISO datetime format)."),issuer:e.object({name:e.string().nullish(),email:e.email().nullish(),address:e.string().nullish(),address_2:e.string().nullish(),post_code:e.string().nullish(),city:e.string().nullish(),state:e.string().nullish(),country:e.string().nullish(),country_code:e.string().min(Om).max(Fm).nullish(),tax_number:e.string().nullish(),tax_number_2:e.string().nullish(),company_number:e.string().nullish(),phone:e.string().nullish(),peppol_id:e.string().nullish(),is_end_consumer:e.boolean().nullish(),bank_account:e.object({type:e.enum(["iban","us_domestic","uk_domestic","other"]).default(Um).describe("Account type determines which fields are used"),name:e.string().nullish().describe("Display name for this account. Falls back to account number if not set"),bank_name:e.string().nullish().describe("Bank name"),iban:e.string().nullish().describe("IBAN (for type=iban)"),account_number:e.string().nullish().describe("Account number (for us_domestic, uk_domestic, other)"),bic:e.string().nullish().describe("BIC/SWIFT code for international transfers"),routing_number:e.string().nullish().describe("US ABA routing number (for type=us_domestic)"),sort_code:e.string().nullish().describe("UK sort code (for type=uk_domestic)")}).nullish()}).describe("Document issuer (entity) information").and(e.unknown().describe("Issuer information snapshot.")).optional(),customer_id:e.string().nullish().describe("Referenced Customer ID. Set to null to remove customer reference."),customer:e.object({name:e.string().nullish(),email:e.email().nullish(),address:e.string().nullish(),address_2:e.string().nullish(),post_code:e.string().nullish(),city:e.string().nullish(),state:e.string().nullish(),country:e.string().nullish(),country_code:e.string().min(jm).max(qm).nullish(),tax_number:e.string().nullish(),tax_number_2:e.string().nullish(),company_number:e.string().nullish(),phone:e.string().nullish(),peppol_id:e.string().nullish(),is_end_consumer:e.boolean().nullish(),bank_account:e.object({type:e.enum(["iban","us_domestic","uk_domestic","other"]).default(Wm).describe("Account type determines which fields are used"),name:e.string().nullish().describe("Display name for this account. Falls back to account number if not set"),bank_name:e.string().nullish().describe("Bank name"),iban:e.string().nullish().describe("IBAN (for type=iban)"),account_number:e.string().nullish().describe("Account number (for us_domestic, uk_domestic, other)"),bic:e.string().nullish().describe("BIC/SWIFT code for international transfers"),routing_number:e.string().nullish().describe("US ABA routing number (for type=us_domestic)"),sort_code:e.string().nullish().describe("UK sort code (for type=uk_domestic)")}).nullish()}).describe("Document issuer (entity) information").and(e.object({save_customer:e.boolean().nullish().describe("Whether to save (create new or update existing) the customer data.\nDefaults to `true` (best-effort).\nWhen `true` with `customer_id`, updates the existing customer.\nWhen `true` without `customer_id`, checks for duplicate customers using customer identifiers (tax/company number, country-aware when available) and reuses the existing customer if found, otherwise creates a new customer.\nWhen `false`, customer data is stored inline on the document only.\nWhen omitted, behaves like `true` but won't fail the request if persistence fails.")}).nullable()).optional().describe("Customer recipient of the document.\nBoth `customer` and `customer_id` are optional - documents can be created without customer information.\nIf both `customer_id` and `customer` are provided with `save_customer=true`, the existing customer will be updated.\nIf only `customer` is provided with `save_customer=true` (or by default), the system checks for duplicates using customer identifiers and reuses existing customers when found."),items:e.array(e.object({type:e.union([e.literal("separator"),e.literal(null)]).nullish().describe(`Item type. Omit or null for regular line item, 'separator' for a visual section header.
|
|
58
|
+
Separator items only use name and description \u2014 all financial fields are ignored.`),name:e.string().min(1).nullish().describe("Item name. Required unless `item_id` is provided.\nFor separator items, this is the section title (always required)."),description:e.string().max(Gm).nullish(),classification:e.union([e.literal("product"),e.literal("service"),e.literal("advance"),e.literal(null)]).nullish().describe("Item classification used for Portugal SAF-T product typing."),price:e.number().nullish().describe("Net price per unit (before tax).\nProvide either `price` OR `gross_price`, not both.\nOptional if `item_id` is provided. Ignored for separator items."),gross_price:e.number().nullish().describe("Gross price per unit (includes tax).\nIf provided, net price is calculated.\nProvide either `price` OR `gross_price`, not both.\nOptional if `item_id` is provided. Ignored for separator items."),quantity:e.number().min(Vm).max(Lm).nullish().describe("Item quantity. Required for regular items. Ignored for separator items."),unit:e.string().max(Hm).nullish(),taxes:e.array(e.object({rate:e.number().nullish(),tax_id:e.string().nullish(),classification:e.string().nullish(),reverse_charge:e.boolean().nullish(),amount:e.number().nullish(),pt_exemption_code:e.string().nullish(),pt_exemption_reason:e.string().nullish()}).describe("Document Item Tax")).optional().describe("Applied taxes (provide rate to create new tax, or tax_id to use existing tax)"),discounts:e.array(e.object({value:e.number().min(Ym).describe("Discount value"),type:e.enum(["percent","amount"]).default(Km).describe("Discount type: 'percent' (default) or 'amount'")})).max($m).optional().describe("Line discounts (max 5) in request order. In `b2b_standard`, percentage discounts are calculated from the original line subtotal and fixed amounts are summed before tax. In `b2c_gross_discount`, discounts are applied sequentially to the running gross subtotal."),item_id:e.string().nullish().describe(`ID of a catalog item to prefill from.
|
|
59
|
+
When provided, the item's name, description, price, and taxes are used as defaults.
|
|
60
|
+
Any field you provide will override the catalog item's value.
|
|
61
|
+
Not applicable for separator items.`),metadata:e.record(e.string(),e.string()).nullish().describe("Custom key-value data for your own use. Store any JSON object up to 50 properties. Values must be strings up to 250 characters. Useful for storing external IDs, tags, or integration data."),save_item:e.boolean().nullish().describe(`Whether to save this item to the catalog.
|
|
62
|
+
When true without item_id, matches by exact name and reuses existing, or creates a new catalog item.
|
|
63
|
+
Defaults to true (best-effort). When omitted, behaves like true but won't fail the request if persistence fails.`)})).min(1).optional().describe("Line items for the document. If provided, replaces ALL existing items. Triggers recalculation of totals."),note:e.string().nullish().describe("Document note/memo. Set to null to clear."),payment_terms:e.string().nullish().describe("Payment terms text. Set to null to clear."),tax_clause:e.string().nullish().describe("Tax clause text. Set to null to clear."),footer:e.string().nullish().describe("Footer text. Set to null to clear."),signature:e.string().nullish().describe("Signature text (e.g. 'John Smith, CEO'). Set to null to clear."),currency_code:e.string().optional().describe("Currency code (ISO 4217, 3 characters). Changing currency triggers exchange rate recalculation."),reference:e.string().max(Qm).nullish().describe("Custom reference (e.g., purchase order number, payment reference). When set, overrides the auto-generated UPN payment reference for Slovenian invoices. Set to null to clear."),metadata:e.record(e.string(),e.unknown()).nullish().describe("Custom metadata object. Set to null to clear."),change_reason:e.string().max(Jm).optional().describe("Reason for the change. Stored in version history for audit trail."),date_service:e.string().regex(Zm).nullish().describe("Service/work date or start of service period. Set to null to clear."),date_service_to:e.string().regex(Xm).nullish().describe("End of service period (if different from date_service). Set to null to clear."),linked_documents:e.array(e.string().min(1)).nullish().describe("Link this credit note to invoices. Replaces existing links. Accepts invoice IDs (inv_xxx)."),eslog:e.object({validation_enabled:e.boolean().nullish().describe("Enable e-SLOG validation for this document. true = validate, false = skip, null/undefined = use entity default")}).nullish()}),eg=36,tg=100,og=2,ng=2,sg="iban",rg=36,ig=2,ag=2,dg="iban",cg=500,lg=-140737488355328,ug=0x7fffffffffff,pg=-140737488355328,mg=0x7fffffffffff,gg=3,yg=36,hg=-2147483648,bg=2147483647,xg=100,zg=-140737488355328,_g=0x7fffffffffff,vg=-140737488355328,fg=0x7fffffffffff,Rg=-140737488355328,Ig=0x7fffffffffff,Eg=-140737488355328,Sg=0x7fffffffffff,Dg=0,Pg=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,wg=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,Cg=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,Ag=36,Mg=500,Tg=50,kg=0,Bg="percent",Ng=5,Og=-140737488355328,Fg=0x7fffffffffff,Ug=-140737488355328,jg=0x7fffffffffff,qg=36,Wg=36,Gg=36,Vg=36,Fye=e.object({id:e.string().max(eg),number:e.string().max(tg),is_draft:e.boolean().describe("Whether this is a draft document. Draft documents have no sequential number assigned, skip fiscalization, and can be deleted. Use POST /{documents}/{id}/finalize to assign a number and finalize."),date:e.iso.datetime({}).describe("Date the credit note was created (ISO 8601 datetime at midnight UTC)"),issuer:e.object({name:e.string().nullish(),email:e.email().nullish(),address:e.string().nullish(),address_2:e.string().nullish(),post_code:e.string().nullish(),city:e.string().nullish(),state:e.string().nullish(),country:e.string().nullish(),country_code:e.string().min(og).max(ng).nullish(),tax_number:e.string().nullish(),tax_number_2:e.string().nullish(),company_number:e.string().nullish(),phone:e.string().nullish(),peppol_id:e.string().nullish(),is_end_consumer:e.boolean().nullish(),bank_account:e.object({type:e.enum(["iban","us_domestic","uk_domestic","other"]).default(sg).describe("Account type determines which fields are used"),name:e.string().nullish().describe("Display name for this account. Falls back to account number if not set"),bank_name:e.string().nullish().describe("Bank name"),iban:e.string().nullish().describe("IBAN (for type=iban)"),account_number:e.string().nullish().describe("Account number (for us_domestic, uk_domestic, other)"),bic:e.string().nullish().describe("BIC/SWIFT code for international transfers"),routing_number:e.string().nullish().describe("US ABA routing number (for type=us_domestic)"),sort_code:e.string().nullish().describe("UK sort code (for type=uk_domestic)")}).nullish()}).describe("Document issuer (entity) information"),customer_id:e.string().max(rg).nullish(),customer:e.object({name:e.string().nullish(),email:e.email().nullish(),address:e.string().nullish(),address_2:e.string().nullish(),post_code:e.string().nullish(),city:e.string().nullish(),state:e.string().nullish(),country:e.string().nullish(),country_code:e.string().min(ig).max(ag).nullish(),tax_number:e.string().nullish(),tax_number_2:e.string().nullish(),company_number:e.string().nullish(),phone:e.string().nullish(),peppol_id:e.string().nullish(),is_end_consumer:e.boolean().nullish(),bank_account:e.object({type:e.enum(["iban","us_domestic","uk_domestic","other"]).default(dg).describe("Account type determines which fields are used"),name:e.string().nullish().describe("Display name for this account. Falls back to account number if not set"),bank_name:e.string().nullish().describe("Bank name"),iban:e.string().nullish().describe("IBAN (for type=iban)"),account_number:e.string().nullish().describe("Account number (for us_domestic, uk_domestic, other)"),bic:e.string().nullish().describe("BIC/SWIFT code for international transfers"),routing_number:e.string().nullish().describe("US ABA routing number (for type=us_domestic)"),sort_code:e.string().nullish().describe("UK sort code (for type=uk_domestic)")}).nullish()}).nullish().describe("Customer information"),note:e.string().nullish().describe("Note for the document. If not provided, defaults to entity's document-type-specific note setting. Pass empty string to explicitly set no note."),payment_terms:e.string().nullish().describe("Payment terms for the document. If not provided, defaults to entity's document-type-specific payment terms setting. Pass empty string to explicitly set no terms."),tax_clause:e.string().nullish().describe("Tax clause for the document. Auto-populated based on transaction type if tax_clause_defaults are configured in entity settings. Pass empty string to explicitly set no clause."),footer:e.string().max(cg).nullish(),signature:e.string().nullish().describe("Signature text for the document (e.g. 'John Smith, CEO'). If not provided, defaults to entity's default_document_signature setting. Pass empty string to explicitly set no signature."),total:e.number().min(lg).max(ug),total_with_tax:e.number().min(pg).max(mg),total_discount:e.number().describe("Document discount total stored as a net-equivalent amount for compatibility. In `b2b_standard`, this is the net value of line-item discounts applied before tax. In `b2c_gross_discount`, gross discounts are converted back to their net-equivalent value here. 0 when no discounts applied."),creation_source:e.enum(["standard","custom"]).describe("Internal origin of the create request. `standard` means a normal create endpoint calculated the totals. `custom` means the document was created through a `/custom` endpoint."),calculation_mode:e.enum(["b2b_standard","b2c_gross_discount"]).describe("Resolved calculation mode used for this document. Stored on the document so recalculation and rendering remain stable even if entity defaults change later."),taxes:e.array(e.object({rate:e.number().nullable(),tax_id:e.string().nullish(),base:e.number(),amount:e.number(),reverse_charge:e.boolean().nullish()})).describe("Applied taxes summary"),currency_code:e.string().max(gg),entity_id:e.string().max(yg),date_year:e.number().min(hg).max(bg),shareable_id:e.string().max(xg).nullish(),voided_at:e.iso.datetime({}).nullish(),transaction_type:e.union([e.literal("domestic"),e.literal("intra_eu_b2b"),e.literal("intra_eu_b2c"),e.literal("3w_b2b"),e.literal("3w_b2c"),e.literal("export"),e.literal(null)]).nullish().describe("Transaction type for VAT purposes (domestic, intra_eu_b2b, intra_eu_b2c, export). Always determined based on issuer/customer countries."),metadata:e.record(e.string(),e.string()).nullish().describe("Custom key-value data for your own use. Store any JSON object up to 50 properties. Values must be strings up to 250 characters. Useful for storing external IDs, tags, or integration data."),exchange_rate:e.object({rate:e.number().describe("Exchange rate used for conversion"),source:e.string().describe("Source of the exchange rate (e.g., 'Frankfurter')"),date:e.iso.datetime({}).describe("Date of the exchange rate"),quote_currency:e.string().describe("Quote currency (the base currency converted to)")}).nullish().describe("Currency exchange rate information if conversion was applied"),total_converted:e.number().min(zg).max(_g).nullish(),total_with_tax_converted:e.number().min(vg).max(fg).nullish(),rounding_correction:e.number().nullish().describe("Rounding correction applied to reconcile differences between calculated total_with_tax and expected_total_with_tax. Only present when expected_total_with_tax was provided during creation."),eslog:e.object({validation_enabled:e.boolean().nullish().describe("Override entity default: true = validate, false = skip, null = use entity setting"),validation_status:e.union([e.literal("valid"),e.literal("invalid"),e.literal("not_validated"),e.literal(null)]).nullish().describe("Validation status: 'valid', 'invalid', or 'not_validated'"),validation_errors:e.array(e.string()).nullish().describe("Array of validation error messages (if status is 'invalid')"),validated_at:e.string().nullish().describe("ISO timestamp when validation was last performed")}).nullish().describe("e-SLOG 2.0 validation data for Slovenian electronic invoices. Only applicable when entity.country_code = 'SI' and eslog validation is enabled."),reference:e.string().nullish().describe("Custom reference for the document (e.g., purchase order number, payment reference). When set, used as the UPN payment reference instead of the auto-generated one."),vies:e.object({warning:e.string().nullable().describe("Warning message if VIES validation was unavailable or the VAT number was invalid. Document creation proceeds but this indicates the transaction type may need review."),skipped:e.boolean().nullable().describe("True when VIES validation was skipped due to entity settings (vies_validate_vat: false) but would normally apply. Used for audit trail.")}).nullish().describe("VIES validation info including any warnings and skipped indicator for audit trail"),deleted_at:e.iso.datetime({}).nullish().describe("Timestamp when the document was soft-deleted. Null if not deleted."),created_at:e.iso.datetime({}),updated_at:e.iso.datetime({}),total_paid:e.number().min(Rg).max(Ig),total_due:e.number().min(Eg).max(Sg),paid_in_full:e.boolean(),furs:e.object({status:e.enum(["pending","success","failed","skipped"]),fiscalized_at:e.iso.datetime({}).optional(),error:e.string().optional(),cancellation_reason:e.string().optional(),data:e.object({zoi:e.string(),eor:e.string().optional(),qr_code:e.string().optional(),business_premise_name:e.string(),electronic_device_name:e.string(),invoice_number:e.string(),iteration:e.number().default(Dg),payload:e.record(e.string(),e.unknown()).describe("FURS API request payload"),issuer_tax_number:e.string().optional(),operator_tax_number:e.string().optional(),operator_label:e.string().optional(),foreign_operator:e.boolean().optional(),cancelled:e.boolean().optional(),cancelled_eor:e.string().optional(),cancellation_payload:e.record(e.string(),e.unknown()).optional().describe("FURS API cancellation payload")}).optional()}).nullish().describe("FURS (Slovenia) fiscalization data. Read-only field, not editable via API. Includes status, premise name, device name, and FURS identifiers (ZOI, EOR, QR code)."),fina:e.object({status:e.enum(["pending","success","failed"]),fiscalized_at:e.iso.datetime({}).optional(),error:e.string().optional(),data:e.object({zki:e.string(),jir:e.string().optional(),qr_code_url:e.string().optional(),business_premise_name:e.string(),electronic_device_name:e.string(),invoice_number:e.string(),operator_oib:e.string().optional(),payment_type:e.string().optional(),numbering_sequence:e.string().optional(),payload:e.record(e.string(),e.unknown()).describe("CIS SOAP request payload"),subsequent_submit:e.boolean().optional(),issuer_oib:e.string().optional(),operator_label:e.string().optional()}).optional()}).nullish().describe("FINA (Croatia) CIS fiscalization data. Read-only field. Includes status, business premise name, electronic device name, and CIS identifiers (ZKI, JIR, QR code URL)."),pt:e.union([e.string(),e.number(),e.boolean(),e.null(),e.record(e.string(),e.unknown()),e.array(e.unknown())]).optional(),date_service:e.string().regex(Pg).nullish().describe("Service date in YYYY-MM-DD format. For invoices and credit notes."),date_service_to:e.string().regex(wg).nullish().describe("Service period end date in YYYY-MM-DD format. For invoices and credit notes. Use with date_service for date ranges."),date_due:e.string().regex(Cg).nullish().describe("Document due date in YYYY-MM-DD format"),items:e.array(e.object({id:e.string().max(Ag),type:e.union([e.literal("separator"),e.literal(null)]).nullish().describe("Item type. null = regular line item, 'separator' = visual section header."),name:e.string().max(Mg),description:e.string().nullable(),classification:e.union([e.literal("product"),e.literal("service"),e.literal("advance"),e.literal(null)]).nullish().describe("Item classification used for Portugal SAF-T product typing."),price:e.number().nullish().describe("Per-unit net price (before tax). Always stores net price. Null for separator items."),gross_price:e.number().nullish().describe(`Per-unit gross price (includes tax).
|
|
64
|
+
Only present if user originally sent gross price.
|
|
65
|
+
Use gross pricing to keep invoice totals stable when VIES reverse charge is applied.`),quantity:e.number().nullish().describe("Item quantity. Null for separator items."),unit:e.string().max(Tg).nullish(),taxes:e.array(e.object({rate:e.number().nullish(),tax_id:e.string().nullish(),classification:e.string().nullish(),reverse_charge:e.boolean().nullish(),amount:e.number().nullish(),pt_exemption_code:e.string().nullish(),pt_exemption_reason:e.string().nullish()}).describe("Document Item Tax")).describe("Applied taxes (provide rate to create new tax, or tax_id to use existing tax)"),discounts:e.array(e.object({value:e.number().min(kg).describe("Discount value"),type:e.enum(["percent","amount"]).default(Bg).describe("Discount type: 'percent' (default) or 'amount'")})).max(Ng).describe("Line discounts (max 5) in request order. In `b2b_standard`, percentage discounts are calculated from the original line subtotal and fixed amounts are summed before tax. In `b2c_gross_discount`, discounts are applied sequentially to the running gross subtotal."),total:e.number().nullish().describe("Line total before tax. Null for separator items."),total_with_tax:e.number().nullish().describe("Line total after tax. Null for separator items."),total_converted:e.number().min(Og).max(Fg).nullish(),total_with_tax_converted:e.number().min(Ug).max(jg).nullish(),credit_note_id:e.string().max(qg).nullish(),advance_invoice_id:e.string().max(Wg).nullish(),delivery_note_id:e.string().max(Gg).nullish(),item_id:e.string().max(Vg).nullish(),metadata:e.record(e.string(),e.string()).optional(),created_at:e.iso.datetime({}),updated_at:e.iso.datetime({})})),document_relations:e.array(e.object({id:e.string(),source_type:e.enum(["invoice","estimate","credit_note","advance_invoice","delivery_note"]).describe("Type of document"),source_id:e.string(),target_type:e.enum(["invoice","estimate","credit_note","advance_invoice","delivery_note"]).describe("Type of document"),target_id:e.string(),relation_type:e.string(),entity_id:e.string(),created_at:e.iso.datetime({}),linked_document_voided_at:e.iso.datetime({}).nullish(),related_document:e.object({id:e.string(),type:e.enum(["invoice","estimate","credit_note","advance_invoice","delivery_note"]).describe("Type of document"),number:e.string(),date:e.string(),total_with_tax:e.number(),currency_code:e.string(),is_draft:e.boolean(),voided_at:e.string().nullable(),paid_in_full:e.boolean().nullable(),title_type:e.union([e.literal("estimate"),e.literal("proforma_invoice"),e.literal(null)]).nullable(),hide_prices:e.boolean().nullable()}).optional()})).optional()}).describe("Credit note document for refunds/corrections"),Lg=/^[a-z]{3,4}_[0-9a-f]{24}$/,Uye=e.object({id:e.stringFormat("resource-id",Lg).describe("Unique resource identifier")}),jye=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),qye=e.object({versions:e.array(e.object({id:e.string().describe("Version record ID"),document_type:e.enum(["invoice","estimate","credit_note","advance_invoice"]).describe("Type of document"),document_id:e.string().describe("Document ID"),version:e.number().min(1).describe("Version number"),snapshot:e.record(e.string(),e.unknown()).describe("Full document snapshot at this version"),changed_fields:e.array(e.string()).describe("Fields that were changed in this update"),user:e.object({id:e.string(),name:e.string().nullable(),email:e.string()}).nullable().describe("User who made the change"),reason:e.string().nullable().describe("Reason for the change"),created_at:e.iso.datetime({}).describe("When this version was created")})).describe("List of versions"),count:e.number().describe("Total number of versions")}),Wye=e.object({id:e.string().describe("Credit Note ID"),version:e.number().min(1).describe("Version number")}),Gye=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),Vye=e.object({id:e.string().describe("Version record ID"),document_type:e.enum(["invoice","estimate","credit_note","advance_invoice"]).describe("Type of document"),document_id:e.string().describe("Document ID"),version:e.number().min(1).describe("Version number"),snapshot:e.record(e.string(),e.unknown()).describe("Full document snapshot at this version"),changed_fields:e.array(e.string()).describe("Fields that were changed in this update"),user:e.object({id:e.string(),name:e.string().nullable(),email:e.string()}).nullable().describe("User who made the change"),reason:e.string().nullable().describe("Reason for the change"),created_at:e.iso.datetime({}).describe("When this version was created")}),Hg=2,Yg=5,Kg=2,$g=5,Qg="true",Lye=e.object({template:e.enum(["modern","classic","condensed","minimal","fashion"]).optional().describe("Document template design to use. When not specified, uses the entity's configured template."),locale:e.string().min(Hg).max(Yg).nullish().describe("Locale for number and date formatting (decimal separators, date order). When not specified, uses the entity's configured locale. For example, 'sl-SI' formats decimals with commas (5,5%) and dates as DD. MM. YYYY."),language:e.string().min(Kg).max($g).nullish().describe("Language for document labels and translations (e.g., 'Invoice', 'Tax', 'Total'). When not specified, uses the same value as locale. Use this to get entity-locale formatting with different-language labels \u2014 for example, a Slovenian entity (sl-SI formatting with commas) but English labels."),partial:e.enum(["true","false"]).default(Qg).describe("Whether to treat the document as partial (allows incomplete data) or complete (validates all required fields)"),upn_qr_enabled:e.enum(["true","false"]).optional().describe("Override UPN QR enabled setting for preview"),upn_qr_display_mode:e.enum(["qr_only","full_slip"]).optional().describe("Override UPN QR display mode for preview"),epc_qr_enabled:e.enum(["true","false"]).optional().describe("Override EPC QR enabled setting for preview")}),Hye=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),Jg=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,Zg=2,Xg=2,ey="iban",ty=2,oy=2,ny="iban",sy=500,ry=3,iy=35,ay=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,dy=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,cy=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,ly=20,uy=/^[0-9a-zA-Z]{1,20}$/,py=20,my=/^\d{1,20}$/,gy=11,yy=11,hy=0,by=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,xy=2,zy=2,_y="iban",vy=2,fy=2,Ry="iban",Iy=500,Ey=3,Sy=35,Dy=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,Py=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,wy=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,Cy=2e3,Ay=-140737488355328,My=0x7fffffffffff,Ty=50,ky=0,By="percent",Ny=5,Oy=20,Fy=/^[0-9a-zA-Z]{1,20}$/,Uy=20,jy=/^\d{1,20}$/,qy=11,Wy=11,Gy=0,Yye=e.union([e.object({is_draft:e.boolean().optional().describe("Whether this is a draft document. Draft documents have no sequential number assigned, skip fiscalization, and can be deleted. Use POST /{documents}/{id}/finalize to assign a number and finalize."),date:e.string().regex(Jg).optional().describe("Document date in YYYY-MM-DD format"),issuer:e.object({name:e.string().nullish(),email:e.email().nullish(),address:e.string().nullish(),address_2:e.string().nullish(),post_code:e.string().nullish(),city:e.string().nullish(),state:e.string().nullish(),country:e.string().nullish(),country_code:e.string().min(Zg).max(Xg).nullish(),tax_number:e.string().nullish(),tax_number_2:e.string().nullish(),company_number:e.string().nullish(),phone:e.string().nullish(),peppol_id:e.string().nullish(),is_end_consumer:e.boolean().nullish(),bank_account:e.object({type:e.enum(["iban","us_domestic","uk_domestic","other"]).default(ey).describe("Account type determines which fields are used"),name:e.string().nullish().describe("Display name for this account. Falls back to account number if not set"),bank_name:e.string().nullish().describe("Bank name"),iban:e.string().nullish().describe("IBAN (for type=iban)"),account_number:e.string().nullish().describe("Account number (for us_domestic, uk_domestic, other)"),bic:e.string().nullish().describe("BIC/SWIFT code for international transfers"),routing_number:e.string().nullish().describe("US ABA routing number (for type=us_domestic)"),sort_code:e.string().nullish().describe("UK sort code (for type=uk_domestic)")}).nullish()}).optional().describe("Document issuer (entity) information"),customer_id:e.string().nullish().describe("Referenced Customer ID. Required if customer is not provided."),customer:e.object({name:e.string().nullish(),email:e.email().nullish(),address:e.string().nullish(),address_2:e.string().nullish(),post_code:e.string().nullish(),city:e.string().nullish(),state:e.string().nullish(),country:e.string().nullish(),country_code:e.string().min(ty).max(oy).nullish(),tax_number:e.string().nullish(),tax_number_2:e.string().nullish(),company_number:e.string().nullish(),phone:e.string().nullish(),peppol_id:e.string().nullish(),is_end_consumer:e.boolean().nullish(),bank_account:e.object({type:e.enum(["iban","us_domestic","uk_domestic","other"]).default(ny).describe("Account type determines which fields are used"),name:e.string().nullish().describe("Display name for this account. Falls back to account number if not set"),bank_name:e.string().nullish().describe("Bank name"),iban:e.string().nullish().describe("IBAN (for type=iban)"),account_number:e.string().nullish().describe("Account number (for us_domestic, uk_domestic, other)"),bic:e.string().nullish().describe("BIC/SWIFT code for international transfers"),routing_number:e.string().nullish().describe("US ABA routing number (for type=us_domestic)"),sort_code:e.string().nullish().describe("UK sort code (for type=uk_domestic)")}).nullish()}).describe("Document issuer (entity) information").and(e.object({save_customer:e.boolean().nullish().describe("Whether to save (create new or update existing) the customer data.\nDefaults to `true` (best-effort).\nWhen `true` with `customer_id`, updates the existing customer.\nWhen `true` without `customer_id`, checks for duplicate customers using customer identifiers (tax/company number, country-aware when available) and reuses the existing customer if found, otherwise creates a new customer.\nWhen `false`, customer data is stored inline on the document only.\nWhen omitted, behaves like `true` but won't fail the request if persistence fails.")}).nullable()).optional().describe("Customer recipient of the document.\nBoth `customer` and `customer_id` are optional - documents can be created without customer information.\nIf both `customer_id` and `customer` are provided with `save_customer=true`, the existing customer will be updated.\nIf only `customer` is provided with `save_customer=true` (or by default), the system checks for duplicates using customer identifiers and reuses existing customers when found."),note:e.string().nullish().describe("Note for the document. If not provided, defaults to entity's document-type-specific note setting. Pass empty string to explicitly set no note."),payment_terms:e.string().nullish().describe("Payment terms for the document. If not provided, defaults to entity's document-type-specific payment terms setting. Pass empty string to explicitly set no terms."),tax_clause:e.string().nullish().describe("Tax clause for the document. Auto-populated based on transaction type if tax_clause_defaults are configured in entity settings. Pass empty string to explicitly set no clause."),footer:e.string().max(sy).nullish(),signature:e.string().nullish().describe("Signature text for the document (e.g. 'John Smith, CEO'). If not provided, defaults to entity's default_document_signature setting. Pass empty string to explicitly set no signature."),calculation_mode:e.union([e.literal("b2b_standard"),e.literal("b2c_gross_discount"),e.literal(null)]).nullish().describe("Optional calculation mode override. When omitted, the entity default is used and falls back to `b2b_standard`."),currency_code:e.string().max(ry).optional(),metadata:e.record(e.string(),e.string()).nullish().describe("Custom key-value data for your own use. Store any JSON object up to 50 properties. Values must be strings up to 250 characters. Useful for storing external IDs, tags, or integration data."),reference:e.string().nullish().describe("Custom reference for the document (e.g., purchase order number, payment reference). When set, used as the UPN payment reference instead of the auto-generated one."),pt:e.object({series_id:e.string().nullish().describe("ATCUD series ID to use for PT numbering. Required for PT manual documents."),manual:e.boolean().nullish().describe("Marks this PT document as manually issued/offline."),manual_sequential_number:e.number().min(1).nullish().describe("Manual PT sequence number shown on the offline/original document."),manual_series_code:e.string().min(1).max(iy).nullish().describe("Offline/manual PT series code shown on the original document."),operator_first_name:e.string().min(1).nullish().describe("PT operator first name snapshot for PT compliance."),operator_last_name:e.string().min(1).nullish().describe("PT operator last name snapshot for PT compliance."),operator_tax_number:e.string().min(1).nullish().describe("PT operator tax number snapshot for PT compliance."),account_first_name:e.string().min(1).nullish().describe("Deprecated alias for PT operator first name snapshot."),account_last_name:e.string().min(1).nullish().describe("Deprecated alias for PT operator last name snapshot."),account_tax_number:e.string().min(1).nullish().describe("Deprecated alias for PT operator tax number snapshot.")}).nullish(),date_service:e.string().regex(ay).nullish().describe("Service date in YYYY-MM-DD format. For invoices and credit notes."),date_service_to:e.string().regex(dy).nullish().describe("Service period end date in YYYY-MM-DD format. For invoices and credit notes. Use with date_service for date ranges."),date_due:e.string().regex(cy).nullish().describe("Document due date in YYYY-MM-DD format"),items:e.array(e.object({type:e.enum(["separator"]).optional(),name:e.string().optional(),quantity:e.number().optional(),price:e.number().optional(),gross_price:e.number().optional(),description:e.string().optional(),unit:e.string().optional(),discounts:e.array(e.object({value:e.number(),type:e.enum(["percent","amount"]).optional()})).optional(),taxes:e.array(e.object({rate:e.number().optional(),tax_id:e.string().optional()})).optional(),metadata:e.record(e.string(),e.string()).optional()})).min(1),linked_documents:e.array(e.string().min(1)).nullish().describe("Link this credit note to invoices. Accepts invoice IDs (inv_xxx). Creates 'credit_for' document relations. If no payment is specified and linked invoices have remaining balance, automatically applies the credit note to the invoices."),fina:e.object({business_premise_name:e.string().min(1).max(ly).regex(uy).nullish().describe("CIS business premise name (OznPosPr, alphanumeric, 1-20 chars). Required when CIS is enabled."),electronic_device_name:e.string().min(1).max(py).regex(my).nullish().describe("CIS electronic device name (OznNapUr, digits only, 1-20 chars). Required when CIS is enabled."),operator_oib:e.string().min(gy).max(yy).nullish().describe("Operator OIB (11 digits). If not provided and using user authentication, defaults to the user's FINA settings. Otherwise falls back to entity settings."),operator_label:e.string().nullish().describe("Operator label/name. If not provided and using user authentication, defaults to the user's FINA settings. Otherwise falls back to entity settings."),payment_type:e.union([e.literal("cash"),e.literal("card"),e.literal("online"),e.literal("bank_transfer"),e.literal("paypal"),e.literal("crypto"),e.literal("coupon"),e.literal("other"),e.literal(null)]).nullish().describe("Expected payment method for CIS (NacinPlac field). Optional when document payments are provided because the API derives it from the document payments; when multiple payments are present, FINA uses 'other'."),subsequent_submit:e.boolean().nullish().describe("Late/subsequent submission flag (NakDost). Set to true if submitting after the normal deadline.")}).nullish(),expected_total_with_tax:e.number().gt(hy).nullish().describe("Expected total with tax. When provided, the system calculates a rounding_correction to reconcile differences between the calculated total and this expected value. Maximum allowed correction is \xB11.00. Useful when importing invoices from external systems with different rounding rules.")}),e.object({is_draft:e.boolean().optional().describe("Whether this is a draft document. Draft documents have no sequential number assigned, skip fiscalization, and can be deleted. Use POST /{documents}/{id}/finalize to assign a number and finalize."),date:e.string().regex(by).optional().describe("Document date in YYYY-MM-DD format"),issuer:e.object({name:e.string().nullish(),email:e.email().nullish(),address:e.string().nullish(),address_2:e.string().nullish(),post_code:e.string().nullish(),city:e.string().nullish(),state:e.string().nullish(),country:e.string().nullish(),country_code:e.string().min(xy).max(zy).nullish(),tax_number:e.string().nullish(),tax_number_2:e.string().nullish(),company_number:e.string().nullish(),phone:e.string().nullish(),peppol_id:e.string().nullish(),is_end_consumer:e.boolean().nullish(),bank_account:e.object({type:e.enum(["iban","us_domestic","uk_domestic","other"]).default(_y).describe("Account type determines which fields are used"),name:e.string().nullish().describe("Display name for this account. Falls back to account number if not set"),bank_name:e.string().nullish().describe("Bank name"),iban:e.string().nullish().describe("IBAN (for type=iban)"),account_number:e.string().nullish().describe("Account number (for us_domestic, uk_domestic, other)"),bic:e.string().nullish().describe("BIC/SWIFT code for international transfers"),routing_number:e.string().nullish().describe("US ABA routing number (for type=us_domestic)"),sort_code:e.string().nullish().describe("UK sort code (for type=uk_domestic)")}).nullish()}).optional().describe("Document issuer (entity) information"),customer_id:e.string().nullish().describe("Referenced Customer ID. Required if customer is not provided."),customer:e.object({name:e.string().nullish(),email:e.email().nullish(),address:e.string().nullish(),address_2:e.string().nullish(),post_code:e.string().nullish(),city:e.string().nullish(),state:e.string().nullish(),country:e.string().nullish(),country_code:e.string().min(vy).max(fy).nullish(),tax_number:e.string().nullish(),tax_number_2:e.string().nullish(),company_number:e.string().nullish(),phone:e.string().nullish(),peppol_id:e.string().nullish(),is_end_consumer:e.boolean().nullish(),bank_account:e.object({type:e.enum(["iban","us_domestic","uk_domestic","other"]).default(Ry).describe("Account type determines which fields are used"),name:e.string().nullish().describe("Display name for this account. Falls back to account number if not set"),bank_name:e.string().nullish().describe("Bank name"),iban:e.string().nullish().describe("IBAN (for type=iban)"),account_number:e.string().nullish().describe("Account number (for us_domestic, uk_domestic, other)"),bic:e.string().nullish().describe("BIC/SWIFT code for international transfers"),routing_number:e.string().nullish().describe("US ABA routing number (for type=us_domestic)"),sort_code:e.string().nullish().describe("UK sort code (for type=uk_domestic)")}).nullish()}).describe("Document issuer (entity) information").and(e.object({save_customer:e.boolean().nullish().describe("Whether to save (create new or update existing) the customer data.\nDefaults to `true` (best-effort).\nWhen `true` with `customer_id`, updates the existing customer.\nWhen `true` without `customer_id`, checks for duplicate customers using customer identifiers (tax/company number, country-aware when available) and reuses the existing customer if found, otherwise creates a new customer.\nWhen `false`, customer data is stored inline on the document only.\nWhen omitted, behaves like `true` but won't fail the request if persistence fails.")}).nullable()).optional().describe("Customer recipient of the document.\nBoth `customer` and `customer_id` are optional - documents can be created without customer information.\nIf both `customer_id` and `customer` are provided with `save_customer=true`, the existing customer will be updated.\nIf only `customer` is provided with `save_customer=true` (or by default), the system checks for duplicates using customer identifiers and reuses existing customers when found."),note:e.string().nullish().describe("Note for the document. If not provided, defaults to entity's document-type-specific note setting. Pass empty string to explicitly set no note."),payment_terms:e.string().nullish().describe("Payment terms for the document. If not provided, defaults to entity's document-type-specific payment terms setting. Pass empty string to explicitly set no terms."),tax_clause:e.string().nullish().describe("Tax clause for the document. Auto-populated based on transaction type if tax_clause_defaults are configured in entity settings. Pass empty string to explicitly set no clause."),footer:e.string().max(Iy).nullish(),signature:e.string().nullish().describe("Signature text for the document (e.g. 'John Smith, CEO'). If not provided, defaults to entity's default_document_signature setting. Pass empty string to explicitly set no signature."),calculation_mode:e.union([e.literal("b2b_standard"),e.literal("b2c_gross_discount"),e.literal(null)]).nullish().describe("Optional calculation mode override. When omitted, the entity default is used and falls back to `b2b_standard`."),currency_code:e.string().max(Ey).optional(),metadata:e.record(e.string(),e.string()).nullish().describe("Custom key-value data for your own use. Store any JSON object up to 50 properties. Values must be strings up to 250 characters. Useful for storing external IDs, tags, or integration data."),reference:e.string().nullish().describe("Custom reference for the document (e.g., purchase order number, payment reference). When set, used as the UPN payment reference instead of the auto-generated one."),pt:e.object({series_id:e.string().nullish().describe("ATCUD series ID to use for PT numbering. Required for PT manual documents."),manual:e.boolean().nullish().describe("Marks this PT document as manually issued/offline."),manual_sequential_number:e.number().min(1).nullish().describe("Manual PT sequence number shown on the offline/original document."),manual_series_code:e.string().min(1).max(Sy).nullish().describe("Offline/manual PT series code shown on the original document."),operator_first_name:e.string().min(1).nullish().describe("PT operator first name snapshot for PT compliance."),operator_last_name:e.string().min(1).nullish().describe("PT operator last name snapshot for PT compliance."),operator_tax_number:e.string().min(1).nullish().describe("PT operator tax number snapshot for PT compliance."),account_first_name:e.string().min(1).nullish().describe("Deprecated alias for PT operator first name snapshot."),account_last_name:e.string().min(1).nullish().describe("Deprecated alias for PT operator last name snapshot."),account_tax_number:e.string().min(1).nullish().describe("Deprecated alias for PT operator tax number snapshot.")}).nullish(),date_service:e.string().regex(Dy).nullish().describe("Service date in YYYY-MM-DD format. For invoices and credit notes."),date_service_to:e.string().regex(Py).nullish().describe("Service period end date in YYYY-MM-DD format. For invoices and credit notes. Use with date_service for date ranges."),date_due:e.string().regex(wy).nullish().describe("Document due date in YYYY-MM-DD format"),items:e.array(e.object({type:e.union([e.literal("separator"),e.literal(null)]).nullish().describe(`Item type. Omit or null for regular line item, 'separator' for a visual section header.
|
|
66
|
+
Separator items only use name and description \u2014 all financial fields are ignored.`),name:e.string().min(1).nullish().describe("Item name. Required unless `item_id` is provided.\nFor separator items, this is the section title (always required)."),description:e.string().max(Cy).nullish(),classification:e.union([e.literal("product"),e.literal("service"),e.literal("advance"),e.literal(null)]).nullish().describe("Item classification used for Portugal SAF-T product typing."),price:e.number().nullish().describe("Net price per unit (before tax).\nProvide either `price` OR `gross_price`, not both.\nOptional if `item_id` is provided. Ignored for separator items."),gross_price:e.number().nullish().describe("Gross price per unit (includes tax).\nIf provided, net price is calculated.\nProvide either `price` OR `gross_price`, not both.\nOptional if `item_id` is provided. Ignored for separator items."),quantity:e.number().min(Ay).max(My).nullish().describe("Item quantity. Required for regular items. Ignored for separator items."),unit:e.string().max(Ty).nullish(),taxes:e.array(e.object({rate:e.number().nullish(),tax_id:e.string().nullish(),classification:e.string().nullish(),reverse_charge:e.boolean().nullish(),amount:e.number().nullish(),pt_exemption_code:e.string().nullish(),pt_exemption_reason:e.string().nullish()}).describe("Document Item Tax")).optional().describe("Applied taxes (provide rate to create new tax, or tax_id to use existing tax)"),discounts:e.array(e.object({value:e.number().min(ky).describe("Discount value"),type:e.enum(["percent","amount"]).default(By).describe("Discount type: 'percent' (default) or 'amount'")})).max(Ny).optional().describe("Line discounts (max 5) in request order. In `b2b_standard`, percentage discounts are calculated from the original line subtotal and fixed amounts are summed before tax. In `b2c_gross_discount`, discounts are applied sequentially to the running gross subtotal."),item_id:e.string().nullish().describe(`ID of a catalog item to prefill from.
|
|
67
|
+
When provided, the item's name, description, price, and taxes are used as defaults.
|
|
68
|
+
Any field you provide will override the catalog item's value.
|
|
69
|
+
Not applicable for separator items.`),metadata:e.record(e.string(),e.string()).nullish().describe("Custom key-value data for your own use. Store any JSON object up to 50 properties. Values must be strings up to 250 characters. Useful for storing external IDs, tags, or integration data."),save_item:e.boolean().nullish().describe(`Whether to save this item to the catalog.
|
|
70
|
+
When true without item_id, matches by exact name and reuses existing, or creates a new catalog item.
|
|
71
|
+
Defaults to true (best-effort). When omitted, behaves like true but won't fail the request if persistence fails.`)})).min(1).describe("Line items for the credit note. At least one item is required."),linked_documents:e.array(e.string().min(1)).nullish().describe("Link this credit note to invoices. Accepts invoice IDs (inv_xxx). Creates 'credit_for' document relations. If no payment is specified and linked invoices have remaining balance, automatically applies the credit note to the invoices."),fina:e.object({business_premise_name:e.string().min(1).max(Oy).regex(Fy).nullish().describe("CIS business premise name (OznPosPr, alphanumeric, 1-20 chars). Required when CIS is enabled."),electronic_device_name:e.string().min(1).max(Uy).regex(jy).nullish().describe("CIS electronic device name (OznNapUr, digits only, 1-20 chars). Required when CIS is enabled."),operator_oib:e.string().min(qy).max(Wy).nullish().describe("Operator OIB (11 digits). If not provided and using user authentication, defaults to the user's FINA settings. Otherwise falls back to entity settings."),operator_label:e.string().nullish().describe("Operator label/name. If not provided and using user authentication, defaults to the user's FINA settings. Otherwise falls back to entity settings."),payment_type:e.union([e.literal("cash"),e.literal("card"),e.literal("online"),e.literal("bank_transfer"),e.literal("paypal"),e.literal("crypto"),e.literal("coupon"),e.literal("other"),e.literal(null)]).nullish().describe("Expected payment method for CIS (NacinPlac field). Optional when document payments are provided because the API derives it from the document payments; when multiple payments are present, FINA uses 'other'."),subsequent_submit:e.boolean().nullish().describe("Late/subsequent submission flag (NakDost). Set to true if submitting after the normal deadline.")}).nullish(),expected_total_with_tax:e.number().gt(Gy).nullish().describe("Expected total with tax. When provided, the system calculates a rounding_correction to reconcile differences between the calculated total and this expected value. Maximum allowed correction is \xB11.00. Useful when importing invoices from external systems with different rounding rules.")})]),Vy=/^[a-z]{3,4}_[0-9a-f]{24}$/,Kye=e.object({id:e.stringFormat("resource-id",Vy).describe("Unique resource identifier")}),$ye=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),Qye=e.object({reason:e.string().min(1).optional().describe("Technical reason for voiding (e.g., 'Duplicate credit note', 'Technical error')"),has_original_document:e.boolean().nullish().describe("Whether the original physical/manual PT document is still available.")}),Ly=36,Hy=100,Yy=2,Ky=2,$y="iban",Qy=36,Jy=2,Zy=2,Xy="iban",eh=500,th=-140737488355328,oh=0x7fffffffffff,nh=-140737488355328,sh=0x7fffffffffff,rh=3,ih=36,ah=-2147483648,dh=2147483647,ch=100,lh=-140737488355328,uh=0x7fffffffffff,ph=-140737488355328,mh=0x7fffffffffff,gh=-140737488355328,yh=0x7fffffffffff,hh=-140737488355328,bh=0x7fffffffffff,xh=0,zh=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,_h=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,vh=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,fh=36,Rh=500,Ih=50,Eh=0,Sh="percent",Dh=5,Ph=-140737488355328,wh=0x7fffffffffff,Ch=-140737488355328,Ah=0x7fffffffffff,Mh=36,Th=36,kh=36,Bh=36,Jye=e.object({id:e.string().max(Ly),number:e.string().max(Hy),is_draft:e.boolean().describe("Whether this is a draft document. Draft documents have no sequential number assigned, skip fiscalization, and can be deleted. Use POST /{documents}/{id}/finalize to assign a number and finalize."),date:e.iso.datetime({}).describe("Date the credit note was created (ISO 8601 datetime at midnight UTC)"),issuer:e.object({name:e.string().nullish(),email:e.email().nullish(),address:e.string().nullish(),address_2:e.string().nullish(),post_code:e.string().nullish(),city:e.string().nullish(),state:e.string().nullish(),country:e.string().nullish(),country_code:e.string().min(Yy).max(Ky).nullish(),tax_number:e.string().nullish(),tax_number_2:e.string().nullish(),company_number:e.string().nullish(),phone:e.string().nullish(),peppol_id:e.string().nullish(),is_end_consumer:e.boolean().nullish(),bank_account:e.object({type:e.enum(["iban","us_domestic","uk_domestic","other"]).default($y).describe("Account type determines which fields are used"),name:e.string().nullish().describe("Display name for this account. Falls back to account number if not set"),bank_name:e.string().nullish().describe("Bank name"),iban:e.string().nullish().describe("IBAN (for type=iban)"),account_number:e.string().nullish().describe("Account number (for us_domestic, uk_domestic, other)"),bic:e.string().nullish().describe("BIC/SWIFT code for international transfers"),routing_number:e.string().nullish().describe("US ABA routing number (for type=us_domestic)"),sort_code:e.string().nullish().describe("UK sort code (for type=uk_domestic)")}).nullish()}).describe("Document issuer (entity) information"),customer_id:e.string().max(Qy).nullish(),customer:e.object({name:e.string().nullish(),email:e.email().nullish(),address:e.string().nullish(),address_2:e.string().nullish(),post_code:e.string().nullish(),city:e.string().nullish(),state:e.string().nullish(),country:e.string().nullish(),country_code:e.string().min(Jy).max(Zy).nullish(),tax_number:e.string().nullish(),tax_number_2:e.string().nullish(),company_number:e.string().nullish(),phone:e.string().nullish(),peppol_id:e.string().nullish(),is_end_consumer:e.boolean().nullish(),bank_account:e.object({type:e.enum(["iban","us_domestic","uk_domestic","other"]).default(Xy).describe("Account type determines which fields are used"),name:e.string().nullish().describe("Display name for this account. Falls back to account number if not set"),bank_name:e.string().nullish().describe("Bank name"),iban:e.string().nullish().describe("IBAN (for type=iban)"),account_number:e.string().nullish().describe("Account number (for us_domestic, uk_domestic, other)"),bic:e.string().nullish().describe("BIC/SWIFT code for international transfers"),routing_number:e.string().nullish().describe("US ABA routing number (for type=us_domestic)"),sort_code:e.string().nullish().describe("UK sort code (for type=uk_domestic)")}).nullish()}).nullish().describe("Customer information"),note:e.string().nullish().describe("Note for the document. If not provided, defaults to entity's document-type-specific note setting. Pass empty string to explicitly set no note."),payment_terms:e.string().nullish().describe("Payment terms for the document. If not provided, defaults to entity's document-type-specific payment terms setting. Pass empty string to explicitly set no terms."),tax_clause:e.string().nullish().describe("Tax clause for the document. Auto-populated based on transaction type if tax_clause_defaults are configured in entity settings. Pass empty string to explicitly set no clause."),footer:e.string().max(eh).nullish(),signature:e.string().nullish().describe("Signature text for the document (e.g. 'John Smith, CEO'). If not provided, defaults to entity's default_document_signature setting. Pass empty string to explicitly set no signature."),total:e.number().min(th).max(oh),total_with_tax:e.number().min(nh).max(sh),total_discount:e.number().describe("Document discount total stored as a net-equivalent amount for compatibility. In `b2b_standard`, this is the net value of line-item discounts applied before tax. In `b2c_gross_discount`, gross discounts are converted back to their net-equivalent value here. 0 when no discounts applied."),creation_source:e.enum(["standard","custom"]).describe("Internal origin of the create request. `standard` means a normal create endpoint calculated the totals. `custom` means the document was created through a `/custom` endpoint."),calculation_mode:e.enum(["b2b_standard","b2c_gross_discount"]).describe("Resolved calculation mode used for this document. Stored on the document so recalculation and rendering remain stable even if entity defaults change later."),taxes:e.array(e.object({rate:e.number().nullable(),tax_id:e.string().nullish(),base:e.number(),amount:e.number(),reverse_charge:e.boolean().nullish()})).describe("Applied taxes summary"),currency_code:e.string().max(rh),entity_id:e.string().max(ih),date_year:e.number().min(ah).max(dh),shareable_id:e.string().max(ch).nullish(),voided_at:e.iso.datetime({}).nullish(),transaction_type:e.union([e.literal("domestic"),e.literal("intra_eu_b2b"),e.literal("intra_eu_b2c"),e.literal("3w_b2b"),e.literal("3w_b2c"),e.literal("export"),e.literal(null)]).nullish().describe("Transaction type for VAT purposes (domestic, intra_eu_b2b, intra_eu_b2c, export). Always determined based on issuer/customer countries."),metadata:e.record(e.string(),e.string()).nullish().describe("Custom key-value data for your own use. Store any JSON object up to 50 properties. Values must be strings up to 250 characters. Useful for storing external IDs, tags, or integration data."),exchange_rate:e.object({rate:e.number().describe("Exchange rate used for conversion"),source:e.string().describe("Source of the exchange rate (e.g., 'Frankfurter')"),date:e.iso.datetime({}).describe("Date of the exchange rate"),quote_currency:e.string().describe("Quote currency (the base currency converted to)")}).nullish().describe("Currency exchange rate information if conversion was applied"),total_converted:e.number().min(lh).max(uh).nullish(),total_with_tax_converted:e.number().min(ph).max(mh).nullish(),rounding_correction:e.number().nullish().describe("Rounding correction applied to reconcile differences between calculated total_with_tax and expected_total_with_tax. Only present when expected_total_with_tax was provided during creation."),eslog:e.object({validation_enabled:e.boolean().nullish().describe("Override entity default: true = validate, false = skip, null = use entity setting"),validation_status:e.union([e.literal("valid"),e.literal("invalid"),e.literal("not_validated"),e.literal(null)]).nullish().describe("Validation status: 'valid', 'invalid', or 'not_validated'"),validation_errors:e.array(e.string()).nullish().describe("Array of validation error messages (if status is 'invalid')"),validated_at:e.string().nullish().describe("ISO timestamp when validation was last performed")}).nullish().describe("e-SLOG 2.0 validation data for Slovenian electronic invoices. Only applicable when entity.country_code = 'SI' and eslog validation is enabled."),reference:e.string().nullish().describe("Custom reference for the document (e.g., purchase order number, payment reference). When set, used as the UPN payment reference instead of the auto-generated one."),vies:e.object({warning:e.string().nullable().describe("Warning message if VIES validation was unavailable or the VAT number was invalid. Document creation proceeds but this indicates the transaction type may need review."),skipped:e.boolean().nullable().describe("True when VIES validation was skipped due to entity settings (vies_validate_vat: false) but would normally apply. Used for audit trail.")}).nullish().describe("VIES validation info including any warnings and skipped indicator for audit trail"),deleted_at:e.iso.datetime({}).nullish().describe("Timestamp when the document was soft-deleted. Null if not deleted."),created_at:e.iso.datetime({}),updated_at:e.iso.datetime({}),total_paid:e.number().min(gh).max(yh),total_due:e.number().min(hh).max(bh),paid_in_full:e.boolean(),furs:e.object({status:e.enum(["pending","success","failed","skipped"]),fiscalized_at:e.iso.datetime({}).optional(),error:e.string().optional(),cancellation_reason:e.string().optional(),data:e.object({zoi:e.string(),eor:e.string().optional(),qr_code:e.string().optional(),business_premise_name:e.string(),electronic_device_name:e.string(),invoice_number:e.string(),iteration:e.number().default(xh),payload:e.record(e.string(),e.unknown()).describe("FURS API request payload"),issuer_tax_number:e.string().optional(),operator_tax_number:e.string().optional(),operator_label:e.string().optional(),foreign_operator:e.boolean().optional(),cancelled:e.boolean().optional(),cancelled_eor:e.string().optional(),cancellation_payload:e.record(e.string(),e.unknown()).optional().describe("FURS API cancellation payload")}).optional()}).nullish().describe("FURS (Slovenia) fiscalization data. Read-only field, not editable via API. Includes status, premise name, device name, and FURS identifiers (ZOI, EOR, QR code)."),fina:e.object({status:e.enum(["pending","success","failed"]),fiscalized_at:e.iso.datetime({}).optional(),error:e.string().optional(),data:e.object({zki:e.string(),jir:e.string().optional(),qr_code_url:e.string().optional(),business_premise_name:e.string(),electronic_device_name:e.string(),invoice_number:e.string(),operator_oib:e.string().optional(),payment_type:e.string().optional(),numbering_sequence:e.string().optional(),payload:e.record(e.string(),e.unknown()).describe("CIS SOAP request payload"),subsequent_submit:e.boolean().optional(),issuer_oib:e.string().optional(),operator_label:e.string().optional()}).optional()}).nullish().describe("FINA (Croatia) CIS fiscalization data. Read-only field. Includes status, business premise name, electronic device name, and CIS identifiers (ZKI, JIR, QR code URL)."),pt:e.union([e.string(),e.number(),e.boolean(),e.null(),e.record(e.string(),e.unknown()),e.array(e.unknown())]).optional(),date_service:e.string().regex(zh).nullish().describe("Service date in YYYY-MM-DD format. For invoices and credit notes."),date_service_to:e.string().regex(_h).nullish().describe("Service period end date in YYYY-MM-DD format. For invoices and credit notes. Use with date_service for date ranges."),date_due:e.string().regex(vh).nullish().describe("Document due date in YYYY-MM-DD format"),items:e.array(e.object({id:e.string().max(fh),type:e.union([e.literal("separator"),e.literal(null)]).nullish().describe("Item type. null = regular line item, 'separator' = visual section header."),name:e.string().max(Rh),description:e.string().nullable(),classification:e.union([e.literal("product"),e.literal("service"),e.literal("advance"),e.literal(null)]).nullish().describe("Item classification used for Portugal SAF-T product typing."),price:e.number().nullish().describe("Per-unit net price (before tax). Always stores net price. Null for separator items."),gross_price:e.number().nullish().describe(`Per-unit gross price (includes tax).
|
|
72
|
+
Only present if user originally sent gross price.
|
|
73
|
+
Use gross pricing to keep invoice totals stable when VIES reverse charge is applied.`),quantity:e.number().nullish().describe("Item quantity. Null for separator items."),unit:e.string().max(Ih).nullish(),taxes:e.array(e.object({rate:e.number().nullish(),tax_id:e.string().nullish(),classification:e.string().nullish(),reverse_charge:e.boolean().nullish(),amount:e.number().nullish(),pt_exemption_code:e.string().nullish(),pt_exemption_reason:e.string().nullish()}).describe("Document Item Tax")).describe("Applied taxes (provide rate to create new tax, or tax_id to use existing tax)"),discounts:e.array(e.object({value:e.number().min(Eh).describe("Discount value"),type:e.enum(["percent","amount"]).default(Sh).describe("Discount type: 'percent' (default) or 'amount'")})).max(Dh).describe("Line discounts (max 5) in request order. In `b2b_standard`, percentage discounts are calculated from the original line subtotal and fixed amounts are summed before tax. In `b2c_gross_discount`, discounts are applied sequentially to the running gross subtotal."),total:e.number().nullish().describe("Line total before tax. Null for separator items."),total_with_tax:e.number().nullish().describe("Line total after tax. Null for separator items."),total_converted:e.number().min(Ph).max(wh).nullish(),total_with_tax_converted:e.number().min(Ch).max(Ah).nullish(),credit_note_id:e.string().max(Mh).nullish(),advance_invoice_id:e.string().max(Th).nullish(),delivery_note_id:e.string().max(kh).nullish(),item_id:e.string().max(Bh).nullish(),metadata:e.record(e.string(),e.string()).optional(),created_at:e.iso.datetime({}),updated_at:e.iso.datetime({})})),document_relations:e.array(e.object({id:e.string(),source_type:e.enum(["invoice","estimate","credit_note","advance_invoice","delivery_note"]).describe("Type of document"),source_id:e.string(),target_type:e.enum(["invoice","estimate","credit_note","advance_invoice","delivery_note"]).describe("Type of document"),target_id:e.string(),relation_type:e.string(),entity_id:e.string(),created_at:e.iso.datetime({}),linked_document_voided_at:e.iso.datetime({}).nullish(),related_document:e.object({id:e.string(),type:e.enum(["invoice","estimate","credit_note","advance_invoice","delivery_note"]).describe("Type of document"),number:e.string(),date:e.string(),total_with_tax:e.number(),currency_code:e.string(),is_draft:e.boolean(),voided_at:e.string().nullable(),paid_in_full:e.boolean().nullable(),title_type:e.union([e.literal("estimate"),e.literal("proforma_invoice"),e.literal(null)]).nullable(),hide_prices:e.boolean().nullable()}).optional()})).optional()}).describe("Credit note document for refunds/corrections");var xe={};j(xe,{CreateCustomerBody:()=>Xye,CreateCustomerHeader:()=>Zye,DeleteCustomerHeader:()=>uhe,DeleteCustomerParams:()=>lhe,GetCustomerByIdHeader:()=>she,GetCustomerByIdParams:()=>nhe,GetCustomerByIdResponse:()=>rhe,GetCustomersHeader:()=>the,GetCustomersQueryParams:()=>ehe,GetCustomersResponse:()=>ohe,PermanentDeleteCustomerHeader:()=>hhe,PermanentDeleteCustomerParams:()=>yhe,RestoreCustomerHeader:()=>mhe,RestoreCustomerParams:()=>phe,RestoreCustomerResponse:()=>ghe,UpdateCustomerBody:()=>dhe,UpdateCustomerHeader:()=>ahe,UpdateCustomerParams:()=>ihe,UpdateCustomerResponse:()=>che,createCustomerBodyAddress2Max:()=>Oh,createCustomerBodyAddressMax:()=>Nh,createCustomerBodyCityMax:()=>Uh,createCustomerBodyCompanyNumberMax:()=>Vh,createCustomerBodyCountryCodeMax:()=>Wh,createCustomerBodyCountryMax:()=>qh,createCustomerBodyEmailMax:()=>Hh,createCustomerBodyPeppolIdMax:()=>Lh,createCustomerBodyPostCodeMax:()=>Fh,createCustomerBodyStateMax:()=>jh,createCustomerBodyTaxNumberMax:()=>Gh,deleteCustomerPathIdRegExp:()=>Qb,getCustomerByIdPathIdRegExp:()=>cb,getCustomerByIdResponseOneAddress2Max:()=>mb,getCustomerByIdResponseOneAddressMax:()=>pb,getCustomerByIdResponseOneCityMax:()=>yb,getCustomerByIdResponseOneCompanyNumberMax:()=>_b,getCustomerByIdResponseOneCountryCodeMax:()=>xb,getCustomerByIdResponseOneCountryMax:()=>bb,getCustomerByIdResponseOneEmailMax:()=>fb,getCustomerByIdResponseOneEntityIdMax:()=>Rb,getCustomerByIdResponseOneIdMax:()=>lb,getCustomerByIdResponseOneNameMax:()=>ub,getCustomerByIdResponseOnePeppolIdMax:()=>vb,getCustomerByIdResponseOnePostCodeMax:()=>gb,getCustomerByIdResponseOneStateMax:()=>hb,getCustomerByIdResponseOneTaxNumberMax:()=>zb,getCustomersQueryLimitDefault:()=>Yh,getCustomersQueryLimitMax:()=>Kh,getCustomersResponseDataItemOneAddress2Max:()=>Zh,getCustomersResponseDataItemOneAddressMax:()=>Jh,getCustomersResponseDataItemOneCityMax:()=>eb,getCustomersResponseDataItemOneCompanyNumberMax:()=>rb,getCustomersResponseDataItemOneCountryCodeMax:()=>nb,getCustomersResponseDataItemOneCountryMax:()=>ob,getCustomersResponseDataItemOneEmailMax:()=>ab,getCustomersResponseDataItemOneEntityIdMax:()=>db,getCustomersResponseDataItemOneIdMax:()=>$h,getCustomersResponseDataItemOneNameMax:()=>Qh,getCustomersResponseDataItemOnePeppolIdMax:()=>ib,getCustomersResponseDataItemOnePostCodeMax:()=>Xh,getCustomersResponseDataItemOneStateMax:()=>tb,getCustomersResponseDataItemOneTaxNumberMax:()=>sb,permanentDeleteCustomerPathIdRegExp:()=>px,restoreCustomerPathIdRegExp:()=>Jb,restoreCustomerResponseOneAddress2Max:()=>tx,restoreCustomerResponseOneAddressMax:()=>ex,restoreCustomerResponseOneCityMax:()=>nx,restoreCustomerResponseOneCompanyNumberMax:()=>dx,restoreCustomerResponseOneCountryCodeMax:()=>ix,restoreCustomerResponseOneCountryMax:()=>rx,restoreCustomerResponseOneEmailMax:()=>lx,restoreCustomerResponseOneEntityIdMax:()=>ux,restoreCustomerResponseOneIdMax:()=>Zb,restoreCustomerResponseOneNameMax:()=>Xb,restoreCustomerResponseOnePeppolIdMax:()=>cx,restoreCustomerResponseOnePostCodeMax:()=>ox,restoreCustomerResponseOneStateMax:()=>sx,restoreCustomerResponseOneTaxNumberMax:()=>ax,updateCustomerBodyAddress2Max:()=>Sb,updateCustomerBodyAddressMax:()=>Eb,updateCustomerBodyCityMax:()=>Pb,updateCustomerBodyCompanyNumberMax:()=>Tb,updateCustomerBodyCountryCodeMax:()=>Ab,updateCustomerBodyCountryMax:()=>Cb,updateCustomerBodyEmailMax:()=>Bb,updateCustomerBodyPeppolIdMax:()=>kb,updateCustomerBodyPostCodeMax:()=>Db,updateCustomerBodyStateMax:()=>wb,updateCustomerBodyTaxNumberMax:()=>Mb,updateCustomerPathIdRegExp:()=>Ib,updateCustomerResponseOneAddress2Max:()=>Ub,updateCustomerResponseOneAddressMax:()=>Fb,updateCustomerResponseOneCityMax:()=>qb,updateCustomerResponseOneCompanyNumberMax:()=>Hb,updateCustomerResponseOneCountryCodeMax:()=>Vb,updateCustomerResponseOneCountryMax:()=>Gb,updateCustomerResponseOneEmailMax:()=>Kb,updateCustomerResponseOneEntityIdMax:()=>$b,updateCustomerResponseOneIdMax:()=>Nb,updateCustomerResponseOneNameMax:()=>Ob,updateCustomerResponseOnePeppolIdMax:()=>Yb,updateCustomerResponseOnePostCodeMax:()=>jb,updateCustomerResponseOneStateMax:()=>Wb,updateCustomerResponseOneTaxNumberMax:()=>Lb});var Zye=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),Nh=500,Oh=500,Fh=20,Uh=100,jh=100,qh=100,Wh=2,Gh=50,Vh=50,Lh=50,Hh=255,Xye=e.object({name:e.string().min(1),address:e.string().max(Nh).nullish(),address_2:e.string().max(Oh).nullish(),post_code:e.string().max(Fh).nullish(),city:e.string().max(Uh).nullish(),state:e.string().max(jh).nullish(),country:e.string().max(qh).nullish(),country_code:e.string().max(Wh).nullish(),tax_number:e.string().max(Gh).nullish(),company_number:e.string().max(Vh).nullish(),peppol_id:e.string().max(Lh).nullish(),email:e.string().max(Hh).nullish(),is_tax_subject:e.boolean().optional(),is_end_consumer:e.boolean().nullish(),metadata:e.record(e.string(),e.string()).nullish().describe("Custom key-value data for your own use. Store any JSON object up to 50 properties. Values must be strings up to 250 characters. Useful for storing external IDs, tags, or integration data.")}),Yh=10,Kh=100,ehe=e.object({limit:e.number().min(1).max(Kh).default(Yh).describe("Number of results per request."),next_cursor:e.string().optional().describe("Opaque cursor to fetch the next page of results. Reuse only with the same effective ordering. Use the value from pagination.next_cursor in the previous response."),prev_cursor:e.string().optional().describe("Opaque cursor to fetch the previous page of results. Reuse only with the same effective ordering. Use the value from pagination.prev_cursor in the previous response."),include_total_count:e.boolean().optional().describe("Whether to include the total count of items in `pagination.total`.\nDefault is `true`.\nWhen `false`, `pagination.total` returns -1 for better performance."),order_by:e.union([e.enum(["id","name","email","address","city","country","created_at","updated_at","-id","-name","-email","-address","-city","-country","-created_at","-updated_at"]),e.array(e.enum(["id","name","email","address","city","country","created_at","updated_at","-id","-name","-email","-address","-city","-country","-created_at","-updated_at"]))]).optional().describe("Sort by one field or provide a repeated array for multi-column ordering. Prefix a field with `-` for descending order. When paginating, reuse cursors only with the same effective ordering."),query:e.string().optional().describe('JSON query object for filtering results. Supports MongoDB-style operators.\n\n**Supported operators:**\n- `equals` or direct value - Exact match (default)\n- `gte` - Greater than or equal\n- `lte` - Less than or equal\n- `gt` - Greater than\n- `lt` - Less than\n- `in` - Value in array\n- `notIn` - Value not in array\n- `contains` - String contains (case-insensitive)\n- `startsWith` - String starts with\n- `endsWith` - String ends with\n- `between` - Value between two numbers/dates [min, max]\n\n**Allowed fields:** id, name, address, city, country, tax_number, email, created_at, updated_at\n\n**Examples:**\n- `{"total": {"gte": 1000}}` - Invoices over 1000\n- `{"customer.name": {"contains": "Acme"}}` - Customer name contains "Acme"\n- `{"date": {"between": ["2025-01-01", "2025-12-31"]}}` - Date range'),search:e.string().optional().describe(`Full-text search query to filter results across multiple fields.
|
|
74
|
+
Searches are case-insensitive and match partial strings.
|
|
75
|
+
Searches across all text fields including names, descriptions, addresses, and metadata values.`),deleted:e.boolean().optional().describe("When true, returns only soft-deleted (trashed) items. Default false excludes deleted items.")}),the=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),$h=36,Qh=255,Jh=500,Zh=500,Xh=20,eb=100,tb=100,ob=100,nb=2,sb=50,rb=50,ib=50,ab=255,db=36,ohe=e.object({data:e.array(e.object({id:e.string().max($h),name:e.string().max(Qh),address:e.string().max(Jh).nullish(),address_2:e.string().max(Zh).nullish(),post_code:e.string().max(Xh).nullish(),city:e.string().max(eb).nullish(),state:e.string().max(tb).nullish(),country:e.string().max(ob).nullish(),country_code:e.string().max(nb).nullish(),tax_number:e.string().max(sb).nullish(),company_number:e.string().max(rb).nullish(),peppol_id:e.string().max(ib).nullish(),email:e.string().max(ab).nullish(),is_tax_subject:e.boolean(),is_end_consumer:e.boolean(),entity_id:e.string().max(db),vies:e.union([e.string(),e.number(),e.boolean(),e.null(),e.record(e.string(),e.unknown()),e.array(e.unknown())]).optional(),metadata:e.union([e.string(),e.number(),e.boolean(),e.null(),e.record(e.string(),e.unknown()),e.array(e.unknown())]),deleted_at:e.iso.datetime({}).nullish(),created_at:e.iso.datetime({}),updated_at:e.iso.datetime({})}).describe("Customer information").and(e.looseObject({})).describe("Customer of the Entity")),pagination:e.object({total:e.number().describe("Total number of items available in the collection"),next_cursor:e.string().nullable().describe("Opaque cursor for fetching the next page. It encodes the resolved sort tuple for the current result set, so reuse it only with the same effective ordering. Null if no more results are available."),prev_cursor:e.string().nullable().describe("Opaque cursor for fetching the previous page. It encodes the resolved sort tuple for the current result set, so reuse it only with the same effective ordering. Null if at the first page."),has_more:e.boolean().describe("Indicates whether more results are available after the current page")}).describe("Pagination metadata including cursors and result counts")}),cb=/^[a-z]{3,4}_[0-9a-f]{24}$/,nhe=e.object({id:e.stringFormat("resource-id",cb).describe("Unique resource identifier")}),she=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),lb=36,ub=255,pb=500,mb=500,gb=20,yb=100,hb=100,bb=100,xb=2,zb=50,_b=50,vb=50,fb=255,Rb=36,rhe=e.object({id:e.string().max(lb),name:e.string().max(ub),address:e.string().max(pb).nullish(),address_2:e.string().max(mb).nullish(),post_code:e.string().max(gb).nullish(),city:e.string().max(yb).nullish(),state:e.string().max(hb).nullish(),country:e.string().max(bb).nullish(),country_code:e.string().max(xb).nullish(),tax_number:e.string().max(zb).nullish(),company_number:e.string().max(_b).nullish(),peppol_id:e.string().max(vb).nullish(),email:e.string().max(fb).nullish(),is_tax_subject:e.boolean(),is_end_consumer:e.boolean(),entity_id:e.string().max(Rb),vies:e.union([e.string(),e.number(),e.boolean(),e.null(),e.record(e.string(),e.unknown()),e.array(e.unknown())]).optional(),metadata:e.union([e.string(),e.number(),e.boolean(),e.null(),e.record(e.string(),e.unknown()),e.array(e.unknown())]),deleted_at:e.iso.datetime({}).nullish(),created_at:e.iso.datetime({}),updated_at:e.iso.datetime({})}).describe("Customer information").and(e.looseObject({})).describe("Customer of the Entity"),Ib=/^[a-z]{3,4}_[0-9a-f]{24}$/,ihe=e.object({id:e.stringFormat("resource-id",Ib).describe("Unique resource identifier")}),ahe=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),Eb=500,Sb=500,Db=20,Pb=100,wb=100,Cb=100,Ab=2,Mb=50,Tb=50,kb=50,Bb=255,dhe=e.object({name:e.string().min(1).optional(),address:e.string().max(Eb).nullish(),address_2:e.string().max(Sb).nullish(),post_code:e.string().max(Db).nullish(),city:e.string().max(Pb).nullish(),state:e.string().max(wb).nullish(),country:e.string().max(Cb).nullish(),country_code:e.string().max(Ab).nullish(),tax_number:e.string().max(Mb).nullish(),company_number:e.string().max(Tb).nullish(),peppol_id:e.string().max(kb).nullish(),email:e.string().max(Bb).nullish(),is_tax_subject:e.boolean().optional(),is_end_consumer:e.boolean().nullish(),metadata:e.record(e.string(),e.string()).nullish().describe("Custom key-value data for your own use. Store any JSON object up to 50 properties. Values must be strings up to 250 characters. Useful for storing external IDs, tags, or integration data.")}),Nb=36,Ob=255,Fb=500,Ub=500,jb=20,qb=100,Wb=100,Gb=100,Vb=2,Lb=50,Hb=50,Yb=50,Kb=255,$b=36,che=e.object({id:e.string().max(Nb),name:e.string().max(Ob),address:e.string().max(Fb).nullish(),address_2:e.string().max(Ub).nullish(),post_code:e.string().max(jb).nullish(),city:e.string().max(qb).nullish(),state:e.string().max(Wb).nullish(),country:e.string().max(Gb).nullish(),country_code:e.string().max(Vb).nullish(),tax_number:e.string().max(Lb).nullish(),company_number:e.string().max(Hb).nullish(),peppol_id:e.string().max(Yb).nullish(),email:e.string().max(Kb).nullish(),is_tax_subject:e.boolean(),is_end_consumer:e.boolean(),entity_id:e.string().max($b),vies:e.union([e.string(),e.number(),e.boolean(),e.null(),e.record(e.string(),e.unknown()),e.array(e.unknown())]).optional(),metadata:e.union([e.string(),e.number(),e.boolean(),e.null(),e.record(e.string(),e.unknown()),e.array(e.unknown())]),deleted_at:e.iso.datetime({}).nullish(),created_at:e.iso.datetime({}),updated_at:e.iso.datetime({})}).describe("Customer information").and(e.looseObject({})).describe("Customer of the Entity"),Qb=/^[a-z]{3,4}_[0-9a-f]{24}$/,lhe=e.object({id:e.stringFormat("resource-id",Qb).describe("Unique resource identifier")}),uhe=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),Jb=/^[a-z]{3,4}_[0-9a-f]{24}$/,phe=e.object({id:e.stringFormat("resource-id",Jb).describe("Unique resource identifier")}),mhe=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),Zb=36,Xb=255,ex=500,tx=500,ox=20,nx=100,sx=100,rx=100,ix=2,ax=50,dx=50,cx=50,lx=255,ux=36,ghe=e.object({id:e.string().max(Zb),name:e.string().max(Xb),address:e.string().max(ex).nullish(),address_2:e.string().max(tx).nullish(),post_code:e.string().max(ox).nullish(),city:e.string().max(nx).nullish(),state:e.string().max(sx).nullish(),country:e.string().max(rx).nullish(),country_code:e.string().max(ix).nullish(),tax_number:e.string().max(ax).nullish(),company_number:e.string().max(dx).nullish(),peppol_id:e.string().max(cx).nullish(),email:e.string().max(lx).nullish(),is_tax_subject:e.boolean(),is_end_consumer:e.boolean(),entity_id:e.string().max(ux),vies:e.union([e.string(),e.number(),e.boolean(),e.null(),e.record(e.string(),e.unknown()),e.array(e.unknown())]).optional(),metadata:e.union([e.string(),e.number(),e.boolean(),e.null(),e.record(e.string(),e.unknown()),e.array(e.unknown())]),deleted_at:e.iso.datetime({}).nullish(),created_at:e.iso.datetime({}),updated_at:e.iso.datetime({})}).describe("Customer information").and(e.looseObject({})).describe("Customer of the Entity"),px=/^[a-z]{3,4}_[0-9a-f]{24}$/,yhe=e.object({id:e.stringFormat("resource-id",px).describe("Unique resource identifier")}),hhe=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")});var ze={};j(ze,{CreateCustomDeliveryNoteBody:()=>whe,CreateCustomDeliveryNoteHeader:()=>Phe,CreateDeliveryNoteBody:()=>Ihe,CreateDeliveryNoteHeader:()=>Rhe,GetDeliveryNoteByIdHeader:()=>Mhe,GetDeliveryNoteByIdParams:()=>Che,GetDeliveryNoteByIdQueryParams:()=>Ahe,GetDeliveryNoteByIdResponse:()=>The,GetDeliveryNoteVersionHeader:()=>Whe,GetDeliveryNoteVersionParams:()=>qhe,GetDeliveryNoteVersionResponse:()=>Ghe,GetDeliveryNoteVersionsHeader:()=>Uhe,GetDeliveryNoteVersionsParams:()=>Fhe,GetDeliveryNoteVersionsResponse:()=>jhe,GetDeliveryNotesHeader:()=>She,GetDeliveryNotesQueryParams:()=>Ehe,GetDeliveryNotesResponse:()=>Dhe,GetShareableDeliveryNoteHtmlParams:()=>zhe,GetShareableDeliveryNoteHtmlQueryParams:()=>_he,GetShareableDeliveryNoteParams:()=>bhe,GetShareableDeliveryNotePdfParams:()=>vhe,GetShareableDeliveryNotePdfQueryParams:()=>fhe,GetShareableDeliveryNoteResponse:()=>xhe,RenderDeliveryNotePreviewBody:()=>Hhe,RenderDeliveryNotePreviewHeader:()=>Lhe,RenderDeliveryNotePreviewQueryParams:()=>Vhe,UpdateDeliveryNoteBody:()=>Nhe,UpdateDeliveryNoteHeader:()=>Bhe,UpdateDeliveryNoteParams:()=>khe,UpdateDeliveryNoteResponse:()=>Ohe,VoidDeliveryNoteBody:()=>$he,VoidDeliveryNoteHeader:()=>Khe,VoidDeliveryNoteParams:()=>Yhe,VoidDeliveryNoteResponse:()=>Qhe,createCustomDeliveryNoteBodyCustomerOneBankAccountTypeDefault:()=>d_,createCustomDeliveryNoteBodyCustomerOneCountryCodeMax:()=>a_,createCustomDeliveryNoteBodyCustomerOneCountryCodeMin:()=>i_,createCustomDeliveryNoteBodyDateDueRegExp:()=>c_,createCustomDeliveryNoteBodyDateServiceRegExp:()=>l_,createCustomDeliveryNoteBodyDateServiceToRegExp:()=>u_,createCustomDeliveryNoteBodyIssuerOneBankAccountTypeDefault:()=>r_,createCustomDeliveryNoteBodyIssuerOneCountryCodeMax:()=>s_,createCustomDeliveryNoteBodyIssuerOneCountryCodeMin:()=>n_,createCustomDeliveryNoteBodyItemsItemDescriptionMax:()=>p_,createCustomDeliveryNoteBodyItemsItemDiscountsItemTypeDefault:()=>y_,createCustomDeliveryNoteBodyItemsItemDiscountsItemValueMin:()=>g_,createCustomDeliveryNoteBodyItemsItemDiscountsMax:()=>h_,createCustomDeliveryNoteBodyItemsItemUnitMax:()=>m_,createDeliveryNoteBodyCurrencyCodeMax:()=>rz,createDeliveryNoteBodyCustomerOneBankAccountTypeDefault:()=>nz,createDeliveryNoteBodyCustomerOneCountryCodeMax:()=>oz,createDeliveryNoteBodyCustomerOneCountryCodeMin:()=>tz,createDeliveryNoteBodyDateDueRegExp:()=>iz,createDeliveryNoteBodyDateRegExp:()=>Jx,createDeliveryNoteBodyDateServiceRegExp:()=>az,createDeliveryNoteBodyDateServiceToRegExp:()=>dz,createDeliveryNoteBodyExpectedTotalWithTaxExclusiveMin:()=>hz,createDeliveryNoteBodyFooterMax:()=>sz,createDeliveryNoteBodyIssuerBankAccountTypeDefault:()=>ez,createDeliveryNoteBodyIssuerCountryCodeMax:()=>Xx,createDeliveryNoteBodyIssuerCountryCodeMin:()=>Zx,createDeliveryNoteBodyItemsItemDescriptionMax:()=>cz,createDeliveryNoteBodyItemsItemDiscountsItemTypeDefault:()=>gz,createDeliveryNoteBodyItemsItemDiscountsItemValueMin:()=>mz,createDeliveryNoteBodyItemsItemDiscountsMax:()=>yz,createDeliveryNoteBodyItemsItemQuantityMax:()=>uz,createDeliveryNoteBodyItemsItemQuantityMin:()=>lz,createDeliveryNoteBodyItemsItemUnitMax:()=>pz,getDeliveryNoteByIdPathIdRegExp:()=>b_,getDeliveryNoteByIdResponseCurrencyCodeMax:()=>M_,getDeliveryNoteByIdResponseCustomerBankAccountTypeDefault:()=>S_,getDeliveryNoteByIdResponseCustomerCountryCodeMax:()=>E_,getDeliveryNoteByIdResponseCustomerCountryCodeMin:()=>I_,getDeliveryNoteByIdResponseCustomerIdMax:()=>R_,getDeliveryNoteByIdResponseDateDueRegExp:()=>q_,getDeliveryNoteByIdResponseDateServiceRegExp:()=>W_,getDeliveryNoteByIdResponseDateServiceToRegExp:()=>G_,getDeliveryNoteByIdResponseDateYearMax:()=>B_,getDeliveryNoteByIdResponseDateYearMin:()=>k_,getDeliveryNoteByIdResponseEntityIdMax:()=>T_,getDeliveryNoteByIdResponseFooterMax:()=>D_,getDeliveryNoteByIdResponseIdMax:()=>x_,getDeliveryNoteByIdResponseIssuerBankAccountTypeDefault:()=>f_,getDeliveryNoteByIdResponseIssuerCountryCodeMax:()=>v_,getDeliveryNoteByIdResponseIssuerCountryCodeMin:()=>__,getDeliveryNoteByIdResponseItemsItemDeliveryNoteIdMax:()=>ev,getDeliveryNoteByIdResponseItemsItemDiscountsItemTypeDefault:()=>K_,getDeliveryNoteByIdResponseItemsItemDiscountsItemValueMin:()=>Y_,getDeliveryNoteByIdResponseItemsItemDiscountsMax:()=>$_,getDeliveryNoteByIdResponseItemsItemIdMax:()=>V_,getDeliveryNoteByIdResponseItemsItemItemIdMax:()=>tv,getDeliveryNoteByIdResponseItemsItemNameMax:()=>L_,getDeliveryNoteByIdResponseItemsItemTotalConvertedMax:()=>J_,getDeliveryNoteByIdResponseItemsItemTotalConvertedMin:()=>Q_,getDeliveryNoteByIdResponseItemsItemTotalWithTaxConvertedMax:()=>X_,getDeliveryNoteByIdResponseItemsItemTotalWithTaxConvertedMin:()=>Z_,getDeliveryNoteByIdResponseItemsItemUnitMax:()=>H_,getDeliveryNoteByIdResponseNumberMax:()=>z_,getDeliveryNoteByIdResponseShareableIdMax:()=>N_,getDeliveryNoteByIdResponseTotalConvertedMax:()=>F_,getDeliveryNoteByIdResponseTotalConvertedMin:()=>O_,getDeliveryNoteByIdResponseTotalMax:()=>w_,getDeliveryNoteByIdResponseTotalMin:()=>P_,getDeliveryNoteByIdResponseTotalWithTaxConvertedMax:()=>j_,getDeliveryNoteByIdResponseTotalWithTaxConvertedMin:()=>U_,getDeliveryNoteByIdResponseTotalWithTaxMax:()=>A_,getDeliveryNoteByIdResponseTotalWithTaxMin:()=>C_,getDeliveryNoteVersionsPathIdRegExp:()=>nf,getDeliveryNotesQueryLimitDefault:()=>bz,getDeliveryNotesQueryLimitMax:()=>xz,getDeliveryNotesResponseDataItemCurrencyCodeMax:()=>Tz,getDeliveryNotesResponseDataItemCustomerBankAccountTypeDefault:()=>Dz,getDeliveryNotesResponseDataItemCustomerCountryCodeMax:()=>Sz,getDeliveryNotesResponseDataItemCustomerCountryCodeMin:()=>Ez,getDeliveryNotesResponseDataItemCustomerIdMax:()=>Iz,getDeliveryNotesResponseDataItemDateDueRegExp:()=>Wz,getDeliveryNotesResponseDataItemDateServiceRegExp:()=>Gz,getDeliveryNotesResponseDataItemDateServiceToRegExp:()=>Vz,getDeliveryNotesResponseDataItemDateYearMax:()=>Nz,getDeliveryNotesResponseDataItemDateYearMin:()=>Bz,getDeliveryNotesResponseDataItemEntityIdMax:()=>kz,getDeliveryNotesResponseDataItemFooterMax:()=>Pz,getDeliveryNotesResponseDataItemIdMax:()=>zz,getDeliveryNotesResponseDataItemIssuerBankAccountTypeDefault:()=>Rz,getDeliveryNotesResponseDataItemIssuerCountryCodeMax:()=>fz,getDeliveryNotesResponseDataItemIssuerCountryCodeMin:()=>vz,getDeliveryNotesResponseDataItemItemsItemDeliveryNoteIdMax:()=>t_,getDeliveryNotesResponseDataItemItemsItemDiscountsItemTypeDefault:()=>$z,getDeliveryNotesResponseDataItemItemsItemDiscountsItemValueMin:()=>Kz,getDeliveryNotesResponseDataItemItemsItemDiscountsMax:()=>Qz,getDeliveryNotesResponseDataItemItemsItemIdMax:()=>Lz,getDeliveryNotesResponseDataItemItemsItemItemIdMax:()=>o_,getDeliveryNotesResponseDataItemItemsItemNameMax:()=>Hz,getDeliveryNotesResponseDataItemItemsItemTotalConvertedMax:()=>Zz,getDeliveryNotesResponseDataItemItemsItemTotalConvertedMin:()=>Jz,getDeliveryNotesResponseDataItemItemsItemTotalWithTaxConvertedMax:()=>e_,getDeliveryNotesResponseDataItemItemsItemTotalWithTaxConvertedMin:()=>Xz,getDeliveryNotesResponseDataItemItemsItemUnitMax:()=>Yz,getDeliveryNotesResponseDataItemNumberMax:()=>_z,getDeliveryNotesResponseDataItemShareableIdMax:()=>Oz,getDeliveryNotesResponseDataItemTotalConvertedMax:()=>Uz,getDeliveryNotesResponseDataItemTotalConvertedMin:()=>Fz,getDeliveryNotesResponseDataItemTotalMax:()=>Cz,getDeliveryNotesResponseDataItemTotalMin:()=>wz,getDeliveryNotesResponseDataItemTotalWithTaxConvertedMax:()=>qz,getDeliveryNotesResponseDataItemTotalWithTaxConvertedMin:()=>jz,getDeliveryNotesResponseDataItemTotalWithTaxMax:()=>Mz,getDeliveryNotesResponseDataItemTotalWithTaxMin:()=>Az,getShareableDeliveryNoteResponseCurrencyCodeMax:()=>Dx,getShareableDeliveryNoteResponseCustomerBankAccountTypeDefault:()=>vx,getShareableDeliveryNoteResponseCustomerCountryCodeMax:()=>_x,getShareableDeliveryNoteResponseCustomerCountryCodeMin:()=>zx,getShareableDeliveryNoteResponseCustomerIdMax:()=>xx,getShareableDeliveryNoteResponseDateDueRegExp:()=>Nx,getShareableDeliveryNoteResponseDateServiceRegExp:()=>Ox,getShareableDeliveryNoteResponseDateServiceToRegExp:()=>Fx,getShareableDeliveryNoteResponseDateYearMax:()=>Cx,getShareableDeliveryNoteResponseDateYearMin:()=>wx,getShareableDeliveryNoteResponseEntityIdMax:()=>Px,getShareableDeliveryNoteResponseFooterMax:()=>fx,getShareableDeliveryNoteResponseIdMax:()=>mx,getShareableDeliveryNoteResponseIssuerBankAccountTypeDefault:()=>bx,getShareableDeliveryNoteResponseIssuerCountryCodeMax:()=>hx,getShareableDeliveryNoteResponseIssuerCountryCodeMin:()=>yx,getShareableDeliveryNoteResponseItemsItemDeliveryNoteIdMax:()=>$x,getShareableDeliveryNoteResponseItemsItemDiscountsItemTypeDefault:()=>Gx,getShareableDeliveryNoteResponseItemsItemDiscountsItemValueMin:()=>Wx,getShareableDeliveryNoteResponseItemsItemDiscountsMax:()=>Vx,getShareableDeliveryNoteResponseItemsItemIdMax:()=>Ux,getShareableDeliveryNoteResponseItemsItemItemIdMax:()=>Qx,getShareableDeliveryNoteResponseItemsItemNameMax:()=>jx,getShareableDeliveryNoteResponseItemsItemTotalConvertedMax:()=>Hx,getShareableDeliveryNoteResponseItemsItemTotalConvertedMin:()=>Lx,getShareableDeliveryNoteResponseItemsItemTotalWithTaxConvertedMax:()=>Kx,getShareableDeliveryNoteResponseItemsItemTotalWithTaxConvertedMin:()=>Yx,getShareableDeliveryNoteResponseItemsItemUnitMax:()=>qx,getShareableDeliveryNoteResponseNumberMax:()=>gx,getShareableDeliveryNoteResponseShareableIdMax:()=>Ax,getShareableDeliveryNoteResponseTotalConvertedMax:()=>Tx,getShareableDeliveryNoteResponseTotalConvertedMin:()=>Mx,getShareableDeliveryNoteResponseTotalMax:()=>Ix,getShareableDeliveryNoteResponseTotalMin:()=>Rx,getShareableDeliveryNoteResponseTotalWithTaxConvertedMax:()=>Bx,getShareableDeliveryNoteResponseTotalWithTaxConvertedMin:()=>kx,getShareableDeliveryNoteResponseTotalWithTaxMax:()=>Sx,getShareableDeliveryNoteResponseTotalWithTaxMin:()=>Ex,renderDeliveryNotePreviewBodyOneCurrencyCodeMax:()=>xf,renderDeliveryNotePreviewBodyOneCustomerOneBankAccountTypeDefault:()=>hf,renderDeliveryNotePreviewBodyOneCustomerOneCountryCodeMax:()=>yf,renderDeliveryNotePreviewBodyOneCustomerOneCountryCodeMin:()=>gf,renderDeliveryNotePreviewBodyOneDateDueRegExp:()=>zf,renderDeliveryNotePreviewBodyOneDateRegExp:()=>lf,renderDeliveryNotePreviewBodyOneDateServiceRegExp:()=>_f,renderDeliveryNotePreviewBodyOneDateServiceToRegExp:()=>vf,renderDeliveryNotePreviewBodyOneExpectedTotalWithTaxExclusiveMin:()=>ff,renderDeliveryNotePreviewBodyOneFooterMax:()=>bf,renderDeliveryNotePreviewBodyOneIssuerBankAccountTypeDefault:()=>mf,renderDeliveryNotePreviewBodyOneIssuerCountryCodeMax:()=>pf,renderDeliveryNotePreviewBodyOneIssuerCountryCodeMin:()=>uf,renderDeliveryNotePreviewBodyTwoCurrencyCodeMax:()=>Af,renderDeliveryNotePreviewBodyTwoCustomerOneBankAccountTypeDefault:()=>wf,renderDeliveryNotePreviewBodyTwoCustomerOneCountryCodeMax:()=>Pf,renderDeliveryNotePreviewBodyTwoCustomerOneCountryCodeMin:()=>Df,renderDeliveryNotePreviewBodyTwoDateDueRegExp:()=>Mf,renderDeliveryNotePreviewBodyTwoDateRegExp:()=>Rf,renderDeliveryNotePreviewBodyTwoDateServiceRegExp:()=>Tf,renderDeliveryNotePreviewBodyTwoDateServiceToRegExp:()=>kf,renderDeliveryNotePreviewBodyTwoExpectedTotalWithTaxExclusiveMin:()=>Wf,renderDeliveryNotePreviewBodyTwoFooterMax:()=>Cf,renderDeliveryNotePreviewBodyTwoIssuerBankAccountTypeDefault:()=>Sf,renderDeliveryNotePreviewBodyTwoIssuerCountryCodeMax:()=>Ef,renderDeliveryNotePreviewBodyTwoIssuerCountryCodeMin:()=>If,renderDeliveryNotePreviewBodyTwoItemsItemDescriptionMax:()=>Bf,renderDeliveryNotePreviewBodyTwoItemsItemDiscountsItemTypeDefault:()=>jf,renderDeliveryNotePreviewBodyTwoItemsItemDiscountsItemValueMin:()=>Uf,renderDeliveryNotePreviewBodyTwoItemsItemDiscountsMax:()=>qf,renderDeliveryNotePreviewBodyTwoItemsItemQuantityMax:()=>Of,renderDeliveryNotePreviewBodyTwoItemsItemQuantityMin:()=>Nf,renderDeliveryNotePreviewBodyTwoItemsItemUnitMax:()=>Ff,renderDeliveryNotePreviewQueryLanguageMax:()=>df,renderDeliveryNotePreviewQueryLanguageMin:()=>af,renderDeliveryNotePreviewQueryLocaleMax:()=>rf,renderDeliveryNotePreviewQueryLocaleMin:()=>sf,renderDeliveryNotePreviewQueryPartialDefault:()=>cf,updateDeliveryNoteBodyChangeReasonMax:()=>xv,updateDeliveryNoteBodyCustomerOneBankAccountTypeDefault:()=>cv,updateDeliveryNoteBodyCustomerOneCountryCodeMax:()=>dv,updateDeliveryNoteBodyCustomerOneCountryCodeMin:()=>av,updateDeliveryNoteBodyDateRegExp:()=>nv,updateDeliveryNoteBodyIssuerOneBankAccountTypeDefault:()=>iv,updateDeliveryNoteBodyIssuerOneCountryCodeMax:()=>rv,updateDeliveryNoteBodyIssuerOneCountryCodeMin:()=>sv,updateDeliveryNoteBodyItemsItemDescriptionMax:()=>lv,updateDeliveryNoteBodyItemsItemDiscountsItemTypeDefault:()=>yv,updateDeliveryNoteBodyItemsItemDiscountsItemValueMin:()=>gv,updateDeliveryNoteBodyItemsItemDiscountsMax:()=>hv,updateDeliveryNoteBodyItemsItemQuantityMax:()=>pv,updateDeliveryNoteBodyItemsItemQuantityMin:()=>uv,updateDeliveryNoteBodyItemsItemUnitMax:()=>mv,updateDeliveryNoteBodyReferenceMax:()=>bv,updateDeliveryNotePathIdRegExp:()=>ov,updateDeliveryNoteResponseCurrencyCodeMax:()=>Tv,updateDeliveryNoteResponseCustomerBankAccountTypeDefault:()=>Dv,updateDeliveryNoteResponseCustomerCountryCodeMax:()=>Sv,updateDeliveryNoteResponseCustomerCountryCodeMin:()=>Ev,updateDeliveryNoteResponseCustomerIdMax:()=>Iv,updateDeliveryNoteResponseDateDueRegExp:()=>Wv,updateDeliveryNoteResponseDateServiceRegExp:()=>Gv,updateDeliveryNoteResponseDateServiceToRegExp:()=>Vv,updateDeliveryNoteResponseDateYearMax:()=>Nv,updateDeliveryNoteResponseDateYearMin:()=>Bv,updateDeliveryNoteResponseEntityIdMax:()=>kv,updateDeliveryNoteResponseFooterMax:()=>Pv,updateDeliveryNoteResponseIdMax:()=>zv,updateDeliveryNoteResponseIssuerBankAccountTypeDefault:()=>Rv,updateDeliveryNoteResponseIssuerCountryCodeMax:()=>fv,updateDeliveryNoteResponseIssuerCountryCodeMin:()=>vv,updateDeliveryNoteResponseItemsItemDeliveryNoteIdMax:()=>tf,updateDeliveryNoteResponseItemsItemDiscountsItemTypeDefault:()=>$v,updateDeliveryNoteResponseItemsItemDiscountsItemValueMin:()=>Kv,updateDeliveryNoteResponseItemsItemDiscountsMax:()=>Qv,updateDeliveryNoteResponseItemsItemIdMax:()=>Lv,updateDeliveryNoteResponseItemsItemItemIdMax:()=>of,updateDeliveryNoteResponseItemsItemNameMax:()=>Hv,updateDeliveryNoteResponseItemsItemTotalConvertedMax:()=>Zv,updateDeliveryNoteResponseItemsItemTotalConvertedMin:()=>Jv,updateDeliveryNoteResponseItemsItemTotalWithTaxConvertedMax:()=>ef,updateDeliveryNoteResponseItemsItemTotalWithTaxConvertedMin:()=>Xv,updateDeliveryNoteResponseItemsItemUnitMax:()=>Yv,updateDeliveryNoteResponseNumberMax:()=>_v,updateDeliveryNoteResponseShareableIdMax:()=>Ov,updateDeliveryNoteResponseTotalConvertedMax:()=>Uv,updateDeliveryNoteResponseTotalConvertedMin:()=>Fv,updateDeliveryNoteResponseTotalMax:()=>Cv,updateDeliveryNoteResponseTotalMin:()=>wv,updateDeliveryNoteResponseTotalWithTaxConvertedMax:()=>qv,updateDeliveryNoteResponseTotalWithTaxConvertedMin:()=>jv,updateDeliveryNoteResponseTotalWithTaxMax:()=>Mv,updateDeliveryNoteResponseTotalWithTaxMin:()=>Av,voidDeliveryNotePathIdRegExp:()=>Gf,voidDeliveryNoteResponseCurrencyCodeMax:()=>sR,voidDeliveryNoteResponseCustomerBankAccountTypeDefault:()=>Zf,voidDeliveryNoteResponseCustomerCountryCodeMax:()=>Jf,voidDeliveryNoteResponseCustomerCountryCodeMin:()=>Qf,voidDeliveryNoteResponseCustomerIdMax:()=>$f,voidDeliveryNoteResponseDateDueRegExp:()=>mR,voidDeliveryNoteResponseDateServiceRegExp:()=>gR,voidDeliveryNoteResponseDateServiceToRegExp:()=>yR,voidDeliveryNoteResponseDateYearMax:()=>aR,voidDeliveryNoteResponseDateYearMin:()=>iR,voidDeliveryNoteResponseEntityIdMax:()=>rR,voidDeliveryNoteResponseFooterMax:()=>Xf,voidDeliveryNoteResponseIdMax:()=>Vf,voidDeliveryNoteResponseIssuerBankAccountTypeDefault:()=>Kf,voidDeliveryNoteResponseIssuerCountryCodeMax:()=>Yf,voidDeliveryNoteResponseIssuerCountryCodeMin:()=>Hf,voidDeliveryNoteResponseItemsItemDeliveryNoteIdMax:()=>SR,voidDeliveryNoteResponseItemsItemDiscountsItemTypeDefault:()=>_R,voidDeliveryNoteResponseItemsItemDiscountsItemValueMin:()=>zR,voidDeliveryNoteResponseItemsItemDiscountsMax:()=>vR,voidDeliveryNoteResponseItemsItemIdMax:()=>hR,voidDeliveryNoteResponseItemsItemItemIdMax:()=>DR,voidDeliveryNoteResponseItemsItemNameMax:()=>bR,voidDeliveryNoteResponseItemsItemTotalConvertedMax:()=>RR,voidDeliveryNoteResponseItemsItemTotalConvertedMin:()=>fR,voidDeliveryNoteResponseItemsItemTotalWithTaxConvertedMax:()=>ER,voidDeliveryNoteResponseItemsItemTotalWithTaxConvertedMin:()=>IR,voidDeliveryNoteResponseItemsItemUnitMax:()=>xR,voidDeliveryNoteResponseNumberMax:()=>Lf,voidDeliveryNoteResponseShareableIdMax:()=>dR,voidDeliveryNoteResponseTotalConvertedMax:()=>lR,voidDeliveryNoteResponseTotalConvertedMin:()=>cR,voidDeliveryNoteResponseTotalMax:()=>tR,voidDeliveryNoteResponseTotalMin:()=>eR,voidDeliveryNoteResponseTotalWithTaxConvertedMax:()=>pR,voidDeliveryNoteResponseTotalWithTaxConvertedMin:()=>uR,voidDeliveryNoteResponseTotalWithTaxMax:()=>nR,voidDeliveryNoteResponseTotalWithTaxMin:()=>oR});var bhe=e.object({shareableId:e.string().describe("Shareable document token")}),mx=36,gx=100,yx=2,hx=2,bx="iban",xx=36,zx=2,_x=2,vx="iban",fx=500,Rx=-140737488355328,Ix=0x7fffffffffff,Ex=-140737488355328,Sx=0x7fffffffffff,Dx=3,Px=36,wx=-2147483648,Cx=2147483647,Ax=100,Mx=-140737488355328,Tx=0x7fffffffffff,kx=-140737488355328,Bx=0x7fffffffffff,Nx=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,Ox=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,Fx=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,Ux=36,jx=500,qx=50,Wx=0,Gx="percent",Vx=5,Lx=-140737488355328,Hx=0x7fffffffffff,Yx=-140737488355328,Kx=0x7fffffffffff,$x=36,Qx=36,xhe=e.object({id:e.string().max(mx),number:e.string().max(gx),is_draft:e.boolean().describe("Whether this is a draft document. Draft documents have no sequential number assigned, skip fiscalization, and can be deleted. Use POST /{documents}/{id}/finalize to assign a number and finalize."),date:e.iso.datetime({}).describe("Date the delivery note was created (ISO 8601 datetime at midnight UTC)"),issuer:e.object({name:e.string().nullish(),email:e.email().nullish(),address:e.string().nullish(),address_2:e.string().nullish(),post_code:e.string().nullish(),city:e.string().nullish(),state:e.string().nullish(),country:e.string().nullish(),country_code:e.string().min(yx).max(hx).nullish(),tax_number:e.string().nullish(),tax_number_2:e.string().nullish(),company_number:e.string().nullish(),phone:e.string().nullish(),peppol_id:e.string().nullish(),is_end_consumer:e.boolean().nullish(),bank_account:e.object({type:e.enum(["iban","us_domestic","uk_domestic","other"]).default(bx).describe("Account type determines which fields are used"),name:e.string().nullish().describe("Display name for this account. Falls back to account number if not set"),bank_name:e.string().nullish().describe("Bank name"),iban:e.string().nullish().describe("IBAN (for type=iban)"),account_number:e.string().nullish().describe("Account number (for us_domestic, uk_domestic, other)"),bic:e.string().nullish().describe("BIC/SWIFT code for international transfers"),routing_number:e.string().nullish().describe("US ABA routing number (for type=us_domestic)"),sort_code:e.string().nullish().describe("UK sort code (for type=uk_domestic)")}).nullish()}).describe("Document issuer (entity) information"),customer_id:e.string().max(xx).nullish(),customer:e.object({name:e.string().nullish(),email:e.email().nullish(),address:e.string().nullish(),address_2:e.string().nullish(),post_code:e.string().nullish(),city:e.string().nullish(),state:e.string().nullish(),country:e.string().nullish(),country_code:e.string().min(zx).max(_x).nullish(),tax_number:e.string().nullish(),tax_number_2:e.string().nullish(),company_number:e.string().nullish(),phone:e.string().nullish(),peppol_id:e.string().nullish(),is_end_consumer:e.boolean().nullish(),bank_account:e.object({type:e.enum(["iban","us_domestic","uk_domestic","other"]).default(vx).describe("Account type determines which fields are used"),name:e.string().nullish().describe("Display name for this account. Falls back to account number if not set"),bank_name:e.string().nullish().describe("Bank name"),iban:e.string().nullish().describe("IBAN (for type=iban)"),account_number:e.string().nullish().describe("Account number (for us_domestic, uk_domestic, other)"),bic:e.string().nullish().describe("BIC/SWIFT code for international transfers"),routing_number:e.string().nullish().describe("US ABA routing number (for type=us_domestic)"),sort_code:e.string().nullish().describe("UK sort code (for type=uk_domestic)")}).nullish()}).nullish().describe("Customer information"),note:e.string().nullish().describe("Note for the document. If not provided, defaults to entity's document-type-specific note setting. Pass empty string to explicitly set no note."),payment_terms:e.string().nullish().describe("Payment terms for the document. If not provided, defaults to entity's document-type-specific payment terms setting. Pass empty string to explicitly set no terms."),tax_clause:e.string().nullish().describe("Tax clause for the document. Auto-populated based on transaction type if tax_clause_defaults are configured in entity settings. Pass empty string to explicitly set no clause."),footer:e.string().max(fx).nullish(),signature:e.string().nullish().describe("Signature text for the document (e.g. 'John Smith, CEO'). If not provided, defaults to entity's default_document_signature setting. Pass empty string to explicitly set no signature."),total:e.number().min(Rx).max(Ix),total_with_tax:e.number().min(Ex).max(Sx),total_discount:e.number().describe("Document discount total stored as a net-equivalent amount for compatibility. In `b2b_standard`, this is the net value of line-item discounts applied before tax. In `b2c_gross_discount`, gross discounts are converted back to their net-equivalent value here. 0 when no discounts applied."),creation_source:e.enum(["standard","custom"]).describe("Internal origin of the create request. `standard` means a normal create endpoint calculated the totals. `custom` means the document was created through a `/custom` endpoint."),calculation_mode:e.enum(["b2b_standard","b2c_gross_discount"]).describe("Resolved calculation mode used for this document. Stored on the document so recalculation and rendering remain stable even if entity defaults change later."),taxes:e.array(e.object({rate:e.number().nullable(),tax_id:e.string().nullish(),base:e.number(),amount:e.number(),reverse_charge:e.boolean().nullish()})).describe("Applied taxes summary"),currency_code:e.string().max(Dx),entity_id:e.string().max(Px),date_year:e.number().min(wx).max(Cx),shareable_id:e.string().max(Ax).nullish(),voided_at:e.iso.datetime({}).nullish(),transaction_type:e.union([e.literal("domestic"),e.literal("intra_eu_b2b"),e.literal("intra_eu_b2c"),e.literal("3w_b2b"),e.literal("3w_b2c"),e.literal("export"),e.literal(null)]).nullish().describe("Transaction type for VAT purposes (domestic, intra_eu_b2b, intra_eu_b2c, export). Always determined based on issuer/customer countries."),metadata:e.record(e.string(),e.string()).nullish().describe("Custom key-value data for your own use. Store any JSON object up to 50 properties. Values must be strings up to 250 characters. Useful for storing external IDs, tags, or integration data."),exchange_rate:e.object({rate:e.number().describe("Exchange rate used for conversion"),source:e.string().describe("Source of the exchange rate (e.g., 'Frankfurter')"),date:e.iso.datetime({}).describe("Date of the exchange rate"),quote_currency:e.string().describe("Quote currency (the base currency converted to)")}).nullish().describe("Currency exchange rate information if conversion was applied"),total_converted:e.number().min(Mx).max(Tx).nullish(),total_with_tax_converted:e.number().min(kx).max(Bx).nullish(),rounding_correction:e.number().nullish().describe("Rounding correction applied to reconcile differences between calculated total_with_tax and expected_total_with_tax. Only present when expected_total_with_tax was provided during creation."),eslog:e.object({validation_enabled:e.boolean().nullish().describe("Override entity default: true = validate, false = skip, null = use entity setting"),validation_status:e.union([e.literal("valid"),e.literal("invalid"),e.literal("not_validated"),e.literal(null)]).nullish().describe("Validation status: 'valid', 'invalid', or 'not_validated'"),validation_errors:e.array(e.string()).nullish().describe("Array of validation error messages (if status is 'invalid')"),validated_at:e.string().nullish().describe("ISO timestamp when validation was last performed")}).nullish().describe("e-SLOG 2.0 validation data for Slovenian electronic invoices. Only applicable when entity.country_code = 'SI' and eslog validation is enabled."),reference:e.string().nullish().describe("Custom reference for the document (e.g., purchase order number, payment reference). When set, used as the UPN payment reference instead of the auto-generated one."),vies:e.object({warning:e.string().nullable().describe("Warning message if VIES validation was unavailable or the VAT number was invalid. Document creation proceeds but this indicates the transaction type may need review."),skipped:e.boolean().nullable().describe("True when VIES validation was skipped due to entity settings (vies_validate_vat: false) but would normally apply. Used for audit trail.")}).nullish().describe("VIES validation info including any warnings and skipped indicator for audit trail"),deleted_at:e.iso.datetime({}).nullish().describe("Timestamp when the document was soft-deleted. Null if not deleted."),created_at:e.iso.datetime({}),updated_at:e.iso.datetime({}),hide_prices:e.boolean().describe("When true, prices and totals are hidden on the document (packing list mode)."),date_due:e.string().regex(Nx).nullish().describe("Document due date in YYYY-MM-DD format"),date_service:e.string().regex(Ox).nullish().describe("Service date in YYYY-MM-DD format. For invoices and credit notes."),date_service_to:e.string().regex(Fx).nullish().describe("Service period end date in YYYY-MM-DD format. For invoices and credit notes. Use with date_service for date ranges."),items:e.array(e.object({id:e.string().max(Ux),type:e.union([e.literal("separator"),e.literal(null)]).nullish().describe("Item type. null = regular line item, 'separator' = visual section header."),name:e.string().max(jx),description:e.string().nullable(),classification:e.union([e.literal("product"),e.literal("service"),e.literal("advance"),e.literal(null)]).nullish().describe("Item classification used for Portugal SAF-T product typing."),price:e.number().nullish().describe("Per-unit net price (before tax). Always stores net price. Null for separator items."),gross_price:e.number().nullish().describe(`Per-unit gross price (includes tax).
|
|
76
|
+
Only present if user originally sent gross price.
|
|
77
|
+
Use gross pricing to keep invoice totals stable when VIES reverse charge is applied.`),quantity:e.number().nullish().describe("Item quantity. Null for separator items."),unit:e.string().max(qx).nullish(),taxes:e.array(e.object({rate:e.number().nullish(),tax_id:e.string().nullish(),classification:e.string().nullish(),reverse_charge:e.boolean().nullish(),amount:e.number().nullish(),pt_exemption_code:e.string().nullish(),pt_exemption_reason:e.string().nullish()}).describe("Document Item Tax")).describe("Applied taxes (provide rate to create new tax, or tax_id to use existing tax)"),discounts:e.array(e.object({value:e.number().min(Wx).describe("Discount value"),type:e.enum(["percent","amount"]).default(Gx).describe("Discount type: 'percent' (default) or 'amount'")})).max(Vx).describe("Line discounts (max 5) in request order. In `b2b_standard`, percentage discounts are calculated from the original line subtotal and fixed amounts are summed before tax. In `b2c_gross_discount`, discounts are applied sequentially to the running gross subtotal."),total:e.number().nullish().describe("Line total before tax. Null for separator items."),total_with_tax:e.number().nullish().describe("Line total after tax. Null for separator items."),total_converted:e.number().min(Lx).max(Hx).nullish(),total_with_tax_converted:e.number().min(Yx).max(Kx).nullish(),delivery_note_id:e.string().max($x).nullish(),item_id:e.string().max(Qx).nullish(),metadata:e.record(e.string(),e.string()).nullish().describe("Custom key-value data for your own use. Store any JSON object up to 50 properties. Values must be strings up to 250 characters. Useful for storing external IDs, tags, or integration data."),created_at:e.iso.datetime({}),updated_at:e.iso.datetime({})})),document_relations:e.array(e.object({id:e.string(),source_type:e.enum(["invoice","estimate","credit_note","advance_invoice","delivery_note"]).describe("Type of document"),source_id:e.string(),target_type:e.enum(["invoice","estimate","credit_note","advance_invoice","delivery_note"]).describe("Type of document"),target_id:e.string(),relation_type:e.string(),entity_id:e.string(),created_at:e.iso.datetime({}),linked_document_voided_at:e.iso.datetime({}).nullish(),related_document:e.object({id:e.string(),type:e.enum(["invoice","estimate","credit_note","advance_invoice","delivery_note"]).describe("Type of document"),number:e.string(),date:e.string(),total_with_tax:e.number(),currency_code:e.string(),is_draft:e.boolean(),voided_at:e.string().nullable(),paid_in_full:e.boolean().nullable(),title_type:e.union([e.literal("estimate"),e.literal("proforma_invoice"),e.literal(null)]).nullable(),hide_prices:e.boolean().nullable()}).optional()})).optional()}).describe("Delivery note / packing list document"),zhe=e.object({shareableId:e.string().describe("Shareable document token")}),_he=e.object({locale:e.enum(["en-US","de-DE","it-IT","fr-FR","es-ES","sl-SI","pt-PT","nl-NL","pl-PL","hr-HR","sv-SE","fi-FI","et-EE","bg-BG","cs-CZ","sk-SK","nb-NO","is-IS"]).optional().describe("Locale for number and date formatting (decimal separators, date order). Defaults to entity locale."),language:e.enum(["en-US","de-DE","it-IT","fr-FR","es-ES","sl-SI","pt-PT","nl-NL","pl-PL","hr-HR","sv-SE","fi-FI","et-EE","bg-BG","cs-CZ","sk-SK","nb-NO","is-IS"]).optional().describe("Language for document labels/translations. Defaults to locale value.")}),vhe=e.object({shareableId:e.string().describe("Shareable document token")}),fhe=e.object({locale:e.enum(["en-US","de-DE","it-IT","fr-FR","es-ES","sl-SI","pt-PT","nl-NL","pl-PL","hr-HR","sv-SE","fi-FI","et-EE","bg-BG","cs-CZ","sk-SK","nb-NO","is-IS"]).optional().describe("Locale for number and date formatting (decimal separators, date order). Defaults to entity locale."),language:e.enum(["en-US","de-DE","it-IT","fr-FR","es-ES","sl-SI","pt-PT","nl-NL","pl-PL","hr-HR","sv-SE","fi-FI","et-EE","bg-BG","cs-CZ","sk-SK","nb-NO","is-IS"]).optional().describe("Language for document labels/translations. Defaults to locale value.")}),Rhe=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),Jx=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,Zx=2,Xx=2,ez="iban",tz=2,oz=2,nz="iban",sz=500,rz=3,iz=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,az=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,dz=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,cz=2e3,lz=-140737488355328,uz=0x7fffffffffff,pz=50,mz=0,gz="percent",yz=5,hz=0,Ihe=e.object({is_draft:e.boolean().optional().describe("Whether this is a draft document. Draft documents have no sequential number assigned, skip fiscalization, and can be deleted. Use POST /{documents}/{id}/finalize to assign a number and finalize."),date:e.string().regex(Jx).optional().describe("Document date in YYYY-MM-DD format"),issuer:e.object({name:e.string().nullish(),email:e.email().nullish(),address:e.string().nullish(),address_2:e.string().nullish(),post_code:e.string().nullish(),city:e.string().nullish(),state:e.string().nullish(),country:e.string().nullish(),country_code:e.string().min(Zx).max(Xx).nullish(),tax_number:e.string().nullish(),tax_number_2:e.string().nullish(),company_number:e.string().nullish(),phone:e.string().nullish(),peppol_id:e.string().nullish(),is_end_consumer:e.boolean().nullish(),bank_account:e.object({type:e.enum(["iban","us_domestic","uk_domestic","other"]).default(ez).describe("Account type determines which fields are used"),name:e.string().nullish().describe("Display name for this account. Falls back to account number if not set"),bank_name:e.string().nullish().describe("Bank name"),iban:e.string().nullish().describe("IBAN (for type=iban)"),account_number:e.string().nullish().describe("Account number (for us_domestic, uk_domestic, other)"),bic:e.string().nullish().describe("BIC/SWIFT code for international transfers"),routing_number:e.string().nullish().describe("US ABA routing number (for type=us_domestic)"),sort_code:e.string().nullish().describe("UK sort code (for type=uk_domestic)")}).nullish()}).optional().describe("Document issuer (entity) information"),customer_id:e.string().nullish().describe("Referenced Customer ID. Required if customer is not provided."),customer:e.object({name:e.string().nullish(),email:e.email().nullish(),address:e.string().nullish(),address_2:e.string().nullish(),post_code:e.string().nullish(),city:e.string().nullish(),state:e.string().nullish(),country:e.string().nullish(),country_code:e.string().min(tz).max(oz).nullish(),tax_number:e.string().nullish(),tax_number_2:e.string().nullish(),company_number:e.string().nullish(),phone:e.string().nullish(),peppol_id:e.string().nullish(),is_end_consumer:e.boolean().nullish(),bank_account:e.object({type:e.enum(["iban","us_domestic","uk_domestic","other"]).default(nz).describe("Account type determines which fields are used"),name:e.string().nullish().describe("Display name for this account. Falls back to account number if not set"),bank_name:e.string().nullish().describe("Bank name"),iban:e.string().nullish().describe("IBAN (for type=iban)"),account_number:e.string().nullish().describe("Account number (for us_domestic, uk_domestic, other)"),bic:e.string().nullish().describe("BIC/SWIFT code for international transfers"),routing_number:e.string().nullish().describe("US ABA routing number (for type=us_domestic)"),sort_code:e.string().nullish().describe("UK sort code (for type=uk_domestic)")}).nullish()}).describe("Document issuer (entity) information").and(e.object({save_customer:e.boolean().nullish().describe("Whether to save (create new or update existing) the customer data.\nDefaults to `true` (best-effort).\nWhen `true` with `customer_id`, updates the existing customer.\nWhen `true` without `customer_id`, checks for duplicate customers using customer identifiers (tax/company number, country-aware when available) and reuses the existing customer if found, otherwise creates a new customer.\nWhen `false`, customer data is stored inline on the document only.\nWhen omitted, behaves like `true` but won't fail the request if persistence fails.")}).nullable()).optional().describe("Customer recipient of the document.\nBoth `customer` and `customer_id` are optional - documents can be created without customer information.\nIf both `customer_id` and `customer` are provided with `save_customer=true`, the existing customer will be updated.\nIf only `customer` is provided with `save_customer=true` (or by default), the system checks for duplicates using customer identifiers and reuses existing customers when found."),note:e.string().nullish().describe("Note for the document. If not provided, defaults to entity's document-type-specific note setting. Pass empty string to explicitly set no note."),payment_terms:e.string().nullish().describe("Payment terms for the document. If not provided, defaults to entity's document-type-specific payment terms setting. Pass empty string to explicitly set no terms."),tax_clause:e.string().nullish().describe("Tax clause for the document. Auto-populated based on transaction type if tax_clause_defaults are configured in entity settings. Pass empty string to explicitly set no clause."),footer:e.string().max(sz).nullish(),signature:e.string().nullish().describe("Signature text for the document (e.g. 'John Smith, CEO'). If not provided, defaults to entity's default_document_signature setting. Pass empty string to explicitly set no signature."),calculation_mode:e.union([e.literal("b2b_standard"),e.literal("b2c_gross_discount"),e.literal(null)]).nullish().describe("Optional calculation mode override. When omitted, the entity default is used and falls back to `b2b_standard`."),currency_code:e.string().max(rz).optional(),metadata:e.record(e.string(),e.string()).nullish().describe("Custom key-value data for your own use. Store any JSON object up to 50 properties. Values must be strings up to 250 characters. Useful for storing external IDs, tags, or integration data."),reference:e.string().nullish().describe("Custom reference for the document (e.g., purchase order number, payment reference). When set, used as the UPN payment reference instead of the auto-generated one."),hide_prices:e.boolean().optional().describe("When true, prices and totals are hidden on the document (packing list mode)."),date_due:e.string().regex(iz).nullish().describe("Document due date in YYYY-MM-DD format"),date_service:e.string().regex(az).nullish().describe("Service date in YYYY-MM-DD format. For invoices and credit notes."),date_service_to:e.string().regex(dz).nullish().describe("Service period end date in YYYY-MM-DD format. For invoices and credit notes. Use with date_service for date ranges."),items:e.array(e.object({type:e.union([e.literal("separator"),e.literal(null)]).nullish().describe(`Item type. Omit or null for regular line item, 'separator' for a visual section header.
|
|
78
|
+
Separator items only use name and description \u2014 all financial fields are ignored.`),name:e.string().min(1).nullish().describe("Item name. Required unless `item_id` is provided.\nFor separator items, this is the section title (always required)."),description:e.string().max(cz).nullish(),classification:e.union([e.literal("product"),e.literal("service"),e.literal("advance"),e.literal(null)]).nullish().describe("Item classification used for Portugal SAF-T product typing."),price:e.number().nullish().describe("Net price per unit (before tax).\nProvide either `price` OR `gross_price`, not both.\nOptional if `item_id` is provided. Ignored for separator items."),gross_price:e.number().nullish().describe("Gross price per unit (includes tax).\nIf provided, net price is calculated.\nProvide either `price` OR `gross_price`, not both.\nOptional if `item_id` is provided. Ignored for separator items."),quantity:e.number().min(lz).max(uz).nullish().describe("Item quantity. Required for regular items. Ignored for separator items."),unit:e.string().max(pz).nullish(),taxes:e.array(e.object({rate:e.number().nullish(),tax_id:e.string().nullish(),classification:e.string().nullish(),reverse_charge:e.boolean().nullish(),amount:e.number().nullish(),pt_exemption_code:e.string().nullish(),pt_exemption_reason:e.string().nullish()}).describe("Document Item Tax")).optional().describe("Applied taxes (provide rate to create new tax, or tax_id to use existing tax)"),discounts:e.array(e.object({value:e.number().min(mz).describe("Discount value"),type:e.enum(["percent","amount"]).default(gz).describe("Discount type: 'percent' (default) or 'amount'")})).max(yz).optional().describe("Line discounts (max 5) in request order. In `b2b_standard`, percentage discounts are calculated from the original line subtotal and fixed amounts are summed before tax. In `b2c_gross_discount`, discounts are applied sequentially to the running gross subtotal."),item_id:e.string().nullish().describe(`ID of a catalog item to prefill from.
|
|
79
|
+
When provided, the item's name, description, price, and taxes are used as defaults.
|
|
80
|
+
Any field you provide will override the catalog item's value.
|
|
81
|
+
Not applicable for separator items.`),metadata:e.record(e.string(),e.string()).nullish().describe("Custom key-value data for your own use. Store any JSON object up to 50 properties. Values must be strings up to 250 characters. Useful for storing external IDs, tags, or integration data."),save_item:e.boolean().nullish().describe(`Whether to save this item to the catalog.
|
|
82
|
+
When true without item_id, matches by exact name and reuses existing, or creates a new catalog item.
|
|
83
|
+
Defaults to true (best-effort). When omitted, behaves like true but won't fail the request if persistence fails.`)})).min(1).describe("Line items for the delivery note. At least one item is required."),eslog:e.object({validation_enabled:e.boolean().nullish().describe("Enable e-SLOG validation for this document. true = validate, false = skip, null/undefined = use entity default")}).nullish(),linked_documents:e.array(e.string().min(1)).nullish().describe("Link this delivery note to other documents. Accepts estimate IDs (est_xxx) or invoice IDs (inv_xxx). Creates document relations automatically."),expected_total_with_tax:e.number().gt(hz).nullish().describe("Expected total with tax. When provided, the system calculates a rounding_correction to reconcile differences between the calculated total and this expected value. Maximum allowed correction is \xB11.00. Useful when importing invoices from external systems with different rounding rules.")}),bz=10,xz=100,Ehe=e.object({limit:e.number().min(1).max(xz).default(bz).describe("Number of results per request."),next_cursor:e.string().optional().describe("Opaque cursor to fetch the next page of results. Reuse only with the same effective ordering. Use the value from pagination.next_cursor in the previous response."),prev_cursor:e.string().optional().describe("Opaque cursor to fetch the previous page of results. Reuse only with the same effective ordering. Use the value from pagination.prev_cursor in the previous response."),include_total_count:e.boolean().optional().describe("Whether to include the total count of items in `pagination.total`.\nDefault is `true`.\nWhen `false`, `pagination.total` returns -1 for better performance."),order_by:e.union([e.enum(["id","number","date","total","total_with_tax","created_at","updated_at","-id","-number","-date","-total","-total_with_tax","-created_at","-updated_at"]),e.array(e.enum(["id","number","date","total","total_with_tax","created_at","updated_at","-id","-number","-date","-total","-total_with_tax","-created_at","-updated_at"]))]).optional().describe("Sort by one field or provide a repeated array for multi-column ordering. Prefix a field with `-` for descending order. When paginating, reuse cursors only with the same effective ordering."),query:e.string().optional().describe('JSON query object for filtering results. Supports MongoDB-style operators.\n\n**Supported operators:**\n- `equals` or direct value - Exact match (default)\n- `gte` - Greater than or equal\n- `lte` - Less than or equal\n- `gt` - Greater than\n- `lt` - Less than\n- `in` - Value in array\n- `notIn` - Value not in array\n- `contains` - String contains (case-insensitive)\n- `startsWith` - String starts with\n- `endsWith` - String ends with\n- `between` - Value between two numbers/dates [min, max]\n\n**Allowed fields:** id, number, date, customer, customer.name, customer.email, customer.address, customer.city, customer.country, total, total_with_tax, items.name, items.description, payments.type, payments.date, document_relations.relation_type, document_relations.target_type, metadata, created_at, updated_at, paid_in_full, voided_at\n\n**Examples:**\n- `{"total": {"gte": 1000}}` - Invoices over 1000\n- `{"customer.name": {"contains": "Acme"}}` - Customer name contains "Acme"\n- `{"date": {"between": ["2025-01-01", "2025-12-31"]}}` - Date range'),search:e.string().optional().describe(`Full-text search query to filter results across multiple fields.
|
|
84
|
+
Searches are case-insensitive and match partial strings.
|
|
85
|
+
Searches across all text fields including names, descriptions, addresses, and metadata values.`),include:e.string().optional().describe(`Comma-separated list of relations to include in the response.
|
|
2
86
|
|
|
3
|
-
|
|
87
|
+
**Available relations:**
|
|
88
|
+
- \`document_relations\` - Linked documents (invoices, etc.)
|
|
89
|
+
|
|
90
|
+
**Usage:**
|
|
91
|
+
\`?include=document_relations\``),deleted:e.boolean().optional().describe("When true, returns only soft-deleted (trashed) items. Default false excludes deleted items.")}),She=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),zz=36,_z=100,vz=2,fz=2,Rz="iban",Iz=36,Ez=2,Sz=2,Dz="iban",Pz=500,wz=-140737488355328,Cz=0x7fffffffffff,Az=-140737488355328,Mz=0x7fffffffffff,Tz=3,kz=36,Bz=-2147483648,Nz=2147483647,Oz=100,Fz=-140737488355328,Uz=0x7fffffffffff,jz=-140737488355328,qz=0x7fffffffffff,Wz=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,Gz=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,Vz=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,Lz=36,Hz=500,Yz=50,Kz=0,$z="percent",Qz=5,Jz=-140737488355328,Zz=0x7fffffffffff,Xz=-140737488355328,e_=0x7fffffffffff,t_=36,o_=36,Dhe=e.object({data:e.array(e.object({id:e.string().max(zz),number:e.string().max(_z),is_draft:e.boolean().describe("Whether this is a draft document. Draft documents have no sequential number assigned, skip fiscalization, and can be deleted. Use POST /{documents}/{id}/finalize to assign a number and finalize."),date:e.iso.datetime({}).describe("Date the delivery note was created (ISO 8601 datetime at midnight UTC)"),issuer:e.object({name:e.string().nullish(),email:e.email().nullish(),address:e.string().nullish(),address_2:e.string().nullish(),post_code:e.string().nullish(),city:e.string().nullish(),state:e.string().nullish(),country:e.string().nullish(),country_code:e.string().min(vz).max(fz).nullish(),tax_number:e.string().nullish(),tax_number_2:e.string().nullish(),company_number:e.string().nullish(),phone:e.string().nullish(),peppol_id:e.string().nullish(),is_end_consumer:e.boolean().nullish(),bank_account:e.object({type:e.enum(["iban","us_domestic","uk_domestic","other"]).default(Rz).describe("Account type determines which fields are used"),name:e.string().nullish().describe("Display name for this account. Falls back to account number if not set"),bank_name:e.string().nullish().describe("Bank name"),iban:e.string().nullish().describe("IBAN (for type=iban)"),account_number:e.string().nullish().describe("Account number (for us_domestic, uk_domestic, other)"),bic:e.string().nullish().describe("BIC/SWIFT code for international transfers"),routing_number:e.string().nullish().describe("US ABA routing number (for type=us_domestic)"),sort_code:e.string().nullish().describe("UK sort code (for type=uk_domestic)")}).nullish()}).describe("Document issuer (entity) information"),customer_id:e.string().max(Iz).nullish(),customer:e.object({name:e.string().nullish(),email:e.email().nullish(),address:e.string().nullish(),address_2:e.string().nullish(),post_code:e.string().nullish(),city:e.string().nullish(),state:e.string().nullish(),country:e.string().nullish(),country_code:e.string().min(Ez).max(Sz).nullish(),tax_number:e.string().nullish(),tax_number_2:e.string().nullish(),company_number:e.string().nullish(),phone:e.string().nullish(),peppol_id:e.string().nullish(),is_end_consumer:e.boolean().nullish(),bank_account:e.object({type:e.enum(["iban","us_domestic","uk_domestic","other"]).default(Dz).describe("Account type determines which fields are used"),name:e.string().nullish().describe("Display name for this account. Falls back to account number if not set"),bank_name:e.string().nullish().describe("Bank name"),iban:e.string().nullish().describe("IBAN (for type=iban)"),account_number:e.string().nullish().describe("Account number (for us_domestic, uk_domestic, other)"),bic:e.string().nullish().describe("BIC/SWIFT code for international transfers"),routing_number:e.string().nullish().describe("US ABA routing number (for type=us_domestic)"),sort_code:e.string().nullish().describe("UK sort code (for type=uk_domestic)")}).nullish()}).nullish().describe("Customer information"),note:e.string().nullish().describe("Note for the document. If not provided, defaults to entity's document-type-specific note setting. Pass empty string to explicitly set no note."),payment_terms:e.string().nullish().describe("Payment terms for the document. If not provided, defaults to entity's document-type-specific payment terms setting. Pass empty string to explicitly set no terms."),tax_clause:e.string().nullish().describe("Tax clause for the document. Auto-populated based on transaction type if tax_clause_defaults are configured in entity settings. Pass empty string to explicitly set no clause."),footer:e.string().max(Pz).nullish(),signature:e.string().nullish().describe("Signature text for the document (e.g. 'John Smith, CEO'). If not provided, defaults to entity's default_document_signature setting. Pass empty string to explicitly set no signature."),total:e.number().min(wz).max(Cz),total_with_tax:e.number().min(Az).max(Mz),total_discount:e.number().describe("Document discount total stored as a net-equivalent amount for compatibility. In `b2b_standard`, this is the net value of line-item discounts applied before tax. In `b2c_gross_discount`, gross discounts are converted back to their net-equivalent value here. 0 when no discounts applied."),creation_source:e.enum(["standard","custom"]).describe("Internal origin of the create request. `standard` means a normal create endpoint calculated the totals. `custom` means the document was created through a `/custom` endpoint."),calculation_mode:e.enum(["b2b_standard","b2c_gross_discount"]).describe("Resolved calculation mode used for this document. Stored on the document so recalculation and rendering remain stable even if entity defaults change later."),taxes:e.array(e.object({rate:e.number().nullable(),tax_id:e.string().nullish(),base:e.number(),amount:e.number(),reverse_charge:e.boolean().nullish()})).describe("Applied taxes summary"),currency_code:e.string().max(Tz),entity_id:e.string().max(kz),date_year:e.number().min(Bz).max(Nz),shareable_id:e.string().max(Oz).nullish(),voided_at:e.iso.datetime({}).nullish(),transaction_type:e.union([e.literal("domestic"),e.literal("intra_eu_b2b"),e.literal("intra_eu_b2c"),e.literal("3w_b2b"),e.literal("3w_b2c"),e.literal("export"),e.literal(null)]).nullish().describe("Transaction type for VAT purposes (domestic, intra_eu_b2b, intra_eu_b2c, export). Always determined based on issuer/customer countries."),metadata:e.record(e.string(),e.string()).nullish().describe("Custom key-value data for your own use. Store any JSON object up to 50 properties. Values must be strings up to 250 characters. Useful for storing external IDs, tags, or integration data."),exchange_rate:e.object({rate:e.number().describe("Exchange rate used for conversion"),source:e.string().describe("Source of the exchange rate (e.g., 'Frankfurter')"),date:e.iso.datetime({}).describe("Date of the exchange rate"),quote_currency:e.string().describe("Quote currency (the base currency converted to)")}).nullish().describe("Currency exchange rate information if conversion was applied"),total_converted:e.number().min(Fz).max(Uz).nullish(),total_with_tax_converted:e.number().min(jz).max(qz).nullish(),rounding_correction:e.number().nullish().describe("Rounding correction applied to reconcile differences between calculated total_with_tax and expected_total_with_tax. Only present when expected_total_with_tax was provided during creation."),eslog:e.object({validation_enabled:e.boolean().nullish().describe("Override entity default: true = validate, false = skip, null = use entity setting"),validation_status:e.union([e.literal("valid"),e.literal("invalid"),e.literal("not_validated"),e.literal(null)]).nullish().describe("Validation status: 'valid', 'invalid', or 'not_validated'"),validation_errors:e.array(e.string()).nullish().describe("Array of validation error messages (if status is 'invalid')"),validated_at:e.string().nullish().describe("ISO timestamp when validation was last performed")}).nullish().describe("e-SLOG 2.0 validation data for Slovenian electronic invoices. Only applicable when entity.country_code = 'SI' and eslog validation is enabled."),reference:e.string().nullish().describe("Custom reference for the document (e.g., purchase order number, payment reference). When set, used as the UPN payment reference instead of the auto-generated one."),vies:e.object({warning:e.string().nullable().describe("Warning message if VIES validation was unavailable or the VAT number was invalid. Document creation proceeds but this indicates the transaction type may need review."),skipped:e.boolean().nullable().describe("True when VIES validation was skipped due to entity settings (vies_validate_vat: false) but would normally apply. Used for audit trail.")}).nullish().describe("VIES validation info including any warnings and skipped indicator for audit trail"),deleted_at:e.iso.datetime({}).nullish().describe("Timestamp when the document was soft-deleted. Null if not deleted."),created_at:e.iso.datetime({}),updated_at:e.iso.datetime({}),hide_prices:e.boolean().describe("When true, prices and totals are hidden on the document (packing list mode)."),date_due:e.string().regex(Wz).nullish().describe("Document due date in YYYY-MM-DD format"),date_service:e.string().regex(Gz).nullish().describe("Service date in YYYY-MM-DD format. For invoices and credit notes."),date_service_to:e.string().regex(Vz).nullish().describe("Service period end date in YYYY-MM-DD format. For invoices and credit notes. Use with date_service for date ranges."),items:e.array(e.object({id:e.string().max(Lz),type:e.union([e.literal("separator"),e.literal(null)]).nullish().describe("Item type. null = regular line item, 'separator' = visual section header."),name:e.string().max(Hz),description:e.string().nullable(),classification:e.union([e.literal("product"),e.literal("service"),e.literal("advance"),e.literal(null)]).nullish().describe("Item classification used for Portugal SAF-T product typing."),price:e.number().nullish().describe("Per-unit net price (before tax). Always stores net price. Null for separator items."),gross_price:e.number().nullish().describe(`Per-unit gross price (includes tax).
|
|
92
|
+
Only present if user originally sent gross price.
|
|
93
|
+
Use gross pricing to keep invoice totals stable when VIES reverse charge is applied.`),quantity:e.number().nullish().describe("Item quantity. Null for separator items."),unit:e.string().max(Yz).nullish(),taxes:e.array(e.object({rate:e.number().nullish(),tax_id:e.string().nullish(),classification:e.string().nullish(),reverse_charge:e.boolean().nullish(),amount:e.number().nullish(),pt_exemption_code:e.string().nullish(),pt_exemption_reason:e.string().nullish()}).describe("Document Item Tax")).describe("Applied taxes (provide rate to create new tax, or tax_id to use existing tax)"),discounts:e.array(e.object({value:e.number().min(Kz).describe("Discount value"),type:e.enum(["percent","amount"]).default($z).describe("Discount type: 'percent' (default) or 'amount'")})).max(Qz).describe("Line discounts (max 5) in request order. In `b2b_standard`, percentage discounts are calculated from the original line subtotal and fixed amounts are summed before tax. In `b2c_gross_discount`, discounts are applied sequentially to the running gross subtotal."),total:e.number().nullish().describe("Line total before tax. Null for separator items."),total_with_tax:e.number().nullish().describe("Line total after tax. Null for separator items."),total_converted:e.number().min(Jz).max(Zz).nullish(),total_with_tax_converted:e.number().min(Xz).max(e_).nullish(),delivery_note_id:e.string().max(t_).nullish(),item_id:e.string().max(o_).nullish(),metadata:e.record(e.string(),e.string()).nullish().describe("Custom key-value data for your own use. Store any JSON object up to 50 properties. Values must be strings up to 250 characters. Useful for storing external IDs, tags, or integration data."),created_at:e.iso.datetime({}),updated_at:e.iso.datetime({})})),document_relations:e.array(e.object({id:e.string(),source_type:e.enum(["invoice","estimate","credit_note","advance_invoice","delivery_note"]).describe("Type of document"),source_id:e.string(),target_type:e.enum(["invoice","estimate","credit_note","advance_invoice","delivery_note"]).describe("Type of document"),target_id:e.string(),relation_type:e.string(),entity_id:e.string(),created_at:e.iso.datetime({}),linked_document_voided_at:e.iso.datetime({}).nullish(),related_document:e.object({id:e.string(),type:e.enum(["invoice","estimate","credit_note","advance_invoice","delivery_note"]).describe("Type of document"),number:e.string(),date:e.string(),total_with_tax:e.number(),currency_code:e.string(),is_draft:e.boolean(),voided_at:e.string().nullable(),paid_in_full:e.boolean().nullable(),title_type:e.union([e.literal("estimate"),e.literal("proforma_invoice"),e.literal(null)]).nullable(),hide_prices:e.boolean().nullable()}).optional()})).optional()}).describe("Delivery note / packing list document")),pagination:e.object({total:e.number().describe("Total number of items available in the collection"),next_cursor:e.string().nullable().describe("Opaque cursor for fetching the next page. It encodes the resolved sort tuple for the current result set, so reuse it only with the same effective ordering. Null if no more results are available."),prev_cursor:e.string().nullable().describe("Opaque cursor for fetching the previous page. It encodes the resolved sort tuple for the current result set, so reuse it only with the same effective ordering. Null if at the first page."),has_more:e.boolean().describe("Indicates whether more results are available after the current page")}).describe("Pagination metadata including cursors and result counts")}),Phe=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),n_=2,s_=2,r_="iban",i_=2,a_=2,d_="iban",c_=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,l_=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,u_=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,p_=2e3,m_=50,g_=0,y_="percent",h_=5,whe=e.object({is_draft:e.boolean().nullish(),date:e.string().nullish(),issuer:e.object({name:e.string().nullish(),email:e.email().nullish(),address:e.string().nullish(),address_2:e.string().nullish(),post_code:e.string().nullish(),city:e.string().nullish(),state:e.string().nullish(),country:e.string().nullish(),country_code:e.string().min(n_).max(s_).nullish(),tax_number:e.string().nullish(),tax_number_2:e.string().nullish(),company_number:e.string().nullish(),phone:e.string().nullish(),peppol_id:e.string().nullish(),is_end_consumer:e.boolean().nullish(),bank_account:e.object({type:e.enum(["iban","us_domestic","uk_domestic","other"]).default(r_).describe("Account type determines which fields are used"),name:e.string().nullish().describe("Display name for this account. Falls back to account number if not set"),bank_name:e.string().nullish().describe("Bank name"),iban:e.string().nullish().describe("IBAN (for type=iban)"),account_number:e.string().nullish().describe("Account number (for us_domestic, uk_domestic, other)"),bic:e.string().nullish().describe("BIC/SWIFT code for international transfers"),routing_number:e.string().nullish().describe("US ABA routing number (for type=us_domestic)"),sort_code:e.string().nullish().describe("UK sort code (for type=uk_domestic)")}).nullish()}).describe("Document issuer (entity) information").and(e.looseObject({}).nullable()).optional(),customer_id:e.string().nullish().describe("Referenced Customer ID."),customer:e.object({name:e.string().nullish(),email:e.email().nullish(),address:e.string().nullish(),address_2:e.string().nullish(),post_code:e.string().nullish(),city:e.string().nullish(),state:e.string().nullish(),country:e.string().nullish(),country_code:e.string().min(i_).max(a_).nullish(),tax_number:e.string().nullish(),tax_number_2:e.string().nullish(),company_number:e.string().nullish(),phone:e.string().nullish(),peppol_id:e.string().nullish(),is_end_consumer:e.boolean().nullish(),bank_account:e.object({type:e.enum(["iban","us_domestic","uk_domestic","other"]).default(d_).describe("Account type determines which fields are used"),name:e.string().nullish().describe("Display name for this account. Falls back to account number if not set"),bank_name:e.string().nullish().describe("Bank name"),iban:e.string().nullish().describe("IBAN (for type=iban)"),account_number:e.string().nullish().describe("Account number (for us_domestic, uk_domestic, other)"),bic:e.string().nullish().describe("BIC/SWIFT code for international transfers"),routing_number:e.string().nullish().describe("US ABA routing number (for type=us_domestic)"),sort_code:e.string().nullish().describe("UK sort code (for type=uk_domestic)")}).nullish()}).describe("Document issuer (entity) information").and(e.object({save_customer:e.boolean().nullish().describe("Whether to save (create new or update existing) the customer data.\nDefaults to `true` (best-effort).\nWhen `true` with `customer_id`, updates the existing customer.\nWhen `true` without `customer_id`, checks for duplicate customers using customer identifiers (tax/company number, country-aware when available) and reuses the existing customer if found, otherwise creates a new customer.\nWhen `false`, customer data is stored inline on the document only.\nWhen omitted, behaves like `true` but won't fail the request if persistence fails.")}).nullable()).optional().describe("Customer recipient of the document.\nBoth `customer` and `customer_id` are optional - documents can be created without customer information.\nIf both `customer_id` and `customer` are provided with `save_customer=true`, the existing customer will be updated.\nIf only `customer` is provided with `save_customer=true` (or by default), the system checks for duplicates using customer identifiers and reuses existing customers when found."),note:e.string().nullish(),payment_terms:e.string().nullish(),tax_clause:e.string().nullish(),footer:e.string().nullish(),signature:e.string().nullish(),calculation_mode:e.union([e.literal("b2b_standard"),e.literal("b2c_gross_discount"),e.literal(null)]).nullish().describe("Optional calculation mode override. When omitted, the entity default is used and falls back to `b2b_standard`."),currency_code:e.string().nullish(),metadata:e.record(e.string(),e.string()).nullish().describe("Custom key-value data for your own use. Store any JSON object up to 50 properties. Values must be strings up to 250 characters. Useful for storing external IDs, tags, or integration data."),reference:e.string().nullish(),hide_prices:e.boolean().nullish(),date_due:e.string().regex(c_).nullish().describe("Document due date in YYYY-MM-DD format"),date_service:e.string().regex(l_).nullish().describe("Service date in YYYY-MM-DD format. For invoices and credit notes."),date_service_to:e.string().regex(u_).nullish().describe("Service period end date in YYYY-MM-DD format. For invoices and credit notes. Use with date_service for date ranges."),items:e.array(e.object({type:e.union([e.literal("separator"),e.literal(null)]).nullish().describe(`Item type. Omit or null for regular line item, 'separator' for a visual section header.
|
|
94
|
+
Separator items only use name and description \u2014 all financial fields are ignored.`),name:e.string().min(1).nullish().describe("Item name. Required unless `item_id` is provided.\nFor separator items, this is the section title (always required)."),description:e.string().max(p_).nullish(),classification:e.union([e.literal("product"),e.literal("service"),e.literal("advance"),e.literal(null)]).nullish().describe("Item classification used for Portugal SAF-T product typing."),price:e.number().nullish().describe("Net price per unit (before tax). Optional for custom documents. Ignored for separator items."),gross_price:e.number().nullish().describe("Gross price per unit (includes tax). Optional for custom documents. Ignored for separator items."),quantity:e.number().nullish().describe("Item quantity. Null for separator items."),unit:e.string().max(m_).nullish(),taxes:e.array(e.object({rate:e.number().nullish(),tax_id:e.string().nullish(),classification:e.string().nullish(),reverse_charge:e.boolean().nullish(),amount:e.number().nullish(),pt_exemption_code:e.string().nullish(),pt_exemption_reason:e.string().nullish()}).describe("Document Item Tax")).optional().describe("Applied taxes (provide rate to create new tax, or tax_id to use existing tax)"),discounts:e.array(e.object({value:e.number().min(g_).describe("Discount value"),type:e.enum(["percent","amount"]).default(y_).describe("Discount type: 'percent' (default) or 'amount'")})).max(h_).optional().describe("Line discounts (max 5) in request order. In `b2b_standard`, percentage discounts are calculated from the original line subtotal and fixed amounts are summed before tax. In `b2c_gross_discount`, discounts are applied sequentially to the running gross subtotal."),total:e.number().nullish().describe("Pre-calculated total for this line item (before tax). Ignored for separator items."),total_with_tax:e.number().nullish().describe("Pre-calculated total for this line item (after tax). Ignored for separator items."),item_id:e.string().nullish().describe(`ID of a catalog item to prefill from.
|
|
95
|
+
When provided, the item's name, description, price, and taxes are used as defaults.
|
|
96
|
+
Any field you provide will override the catalog item's value.
|
|
97
|
+
Not applicable for separator items.`),metadata:e.record(e.string(),e.string()).nullish().describe("Custom key-value data for your own use. Store any JSON object up to 50 properties. Values must be strings up to 250 characters. Useful for storing external IDs, tags, or integration data."),save_item:e.boolean().nullish().describe(`Whether to save this item to the catalog.
|
|
98
|
+
When true without item_id, matches by exact name and reuses existing, or creates a new catalog item.
|
|
99
|
+
Defaults to true (best-effort). When omitted, behaves like true but won't fail the request if persistence fails.`)})).min(1).describe("Line items with pre-calculated totals. At least one item is required."),total:e.number().describe("Pre-calculated document total (before tax)."),total_with_tax:e.number().describe("Pre-calculated document total (after tax)."),total_discount:e.number().nullish().describe("Pre-calculated total net discount amount. Defaults to 0 if not provided."),taxes:e.array(e.object({rate:e.number().nullable(),tax_id:e.string().nullish(),base:e.number(),amount:e.number(),reverse_charge:e.boolean().nullish()})).optional().describe("Pre-calculated tax summary. If not provided, defaults to empty array."),linked_documents:e.array(e.string().min(1)).nullish().describe("Link this delivery note to other documents. Accepts estimate IDs (est_xxx) or invoice IDs (inv_xxx). Creates document relations automatically."),eslog:e.object({validation_enabled:e.boolean().nullish().describe("Enable e-SLOG validation for this document. true = validate, false = skip, null/undefined = use entity default")}).nullish()}),b_=/^[a-z]{3,4}_[0-9a-f]{24}$/,Che=e.object({id:e.stringFormat("resource-id",b_).describe("Unique resource identifier")}),Ahe=e.object({include:e.string().optional().describe(`Comma-separated list of relations to include in the response.
|
|
100
|
+
|
|
101
|
+
**Available relations:**
|
|
102
|
+
- \`document_relations\` - Linked documents (invoices, etc.)
|
|
103
|
+
|
|
104
|
+
**Usage:**
|
|
105
|
+
\`?include=document_relations\``)}),Mhe=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),x_=36,z_=100,__=2,v_=2,f_="iban",R_=36,I_=2,E_=2,S_="iban",D_=500,P_=-140737488355328,w_=0x7fffffffffff,C_=-140737488355328,A_=0x7fffffffffff,M_=3,T_=36,k_=-2147483648,B_=2147483647,N_=100,O_=-140737488355328,F_=0x7fffffffffff,U_=-140737488355328,j_=0x7fffffffffff,q_=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,W_=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,G_=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,V_=36,L_=500,H_=50,Y_=0,K_="percent",$_=5,Q_=-140737488355328,J_=0x7fffffffffff,Z_=-140737488355328,X_=0x7fffffffffff,ev=36,tv=36,The=e.object({id:e.string().max(x_),number:e.string().max(z_),is_draft:e.boolean().describe("Whether this is a draft document. Draft documents have no sequential number assigned, skip fiscalization, and can be deleted. Use POST /{documents}/{id}/finalize to assign a number and finalize."),date:e.iso.datetime({}).describe("Date the delivery note was created (ISO 8601 datetime at midnight UTC)"),issuer:e.object({name:e.string().nullish(),email:e.email().nullish(),address:e.string().nullish(),address_2:e.string().nullish(),post_code:e.string().nullish(),city:e.string().nullish(),state:e.string().nullish(),country:e.string().nullish(),country_code:e.string().min(__).max(v_).nullish(),tax_number:e.string().nullish(),tax_number_2:e.string().nullish(),company_number:e.string().nullish(),phone:e.string().nullish(),peppol_id:e.string().nullish(),is_end_consumer:e.boolean().nullish(),bank_account:e.object({type:e.enum(["iban","us_domestic","uk_domestic","other"]).default(f_).describe("Account type determines which fields are used"),name:e.string().nullish().describe("Display name for this account. Falls back to account number if not set"),bank_name:e.string().nullish().describe("Bank name"),iban:e.string().nullish().describe("IBAN (for type=iban)"),account_number:e.string().nullish().describe("Account number (for us_domestic, uk_domestic, other)"),bic:e.string().nullish().describe("BIC/SWIFT code for international transfers"),routing_number:e.string().nullish().describe("US ABA routing number (for type=us_domestic)"),sort_code:e.string().nullish().describe("UK sort code (for type=uk_domestic)")}).nullish()}).describe("Document issuer (entity) information"),customer_id:e.string().max(R_).nullish(),customer:e.object({name:e.string().nullish(),email:e.email().nullish(),address:e.string().nullish(),address_2:e.string().nullish(),post_code:e.string().nullish(),city:e.string().nullish(),state:e.string().nullish(),country:e.string().nullish(),country_code:e.string().min(I_).max(E_).nullish(),tax_number:e.string().nullish(),tax_number_2:e.string().nullish(),company_number:e.string().nullish(),phone:e.string().nullish(),peppol_id:e.string().nullish(),is_end_consumer:e.boolean().nullish(),bank_account:e.object({type:e.enum(["iban","us_domestic","uk_domestic","other"]).default(S_).describe("Account type determines which fields are used"),name:e.string().nullish().describe("Display name for this account. Falls back to account number if not set"),bank_name:e.string().nullish().describe("Bank name"),iban:e.string().nullish().describe("IBAN (for type=iban)"),account_number:e.string().nullish().describe("Account number (for us_domestic, uk_domestic, other)"),bic:e.string().nullish().describe("BIC/SWIFT code for international transfers"),routing_number:e.string().nullish().describe("US ABA routing number (for type=us_domestic)"),sort_code:e.string().nullish().describe("UK sort code (for type=uk_domestic)")}).nullish()}).nullish().describe("Customer information"),note:e.string().nullish().describe("Note for the document. If not provided, defaults to entity's document-type-specific note setting. Pass empty string to explicitly set no note."),payment_terms:e.string().nullish().describe("Payment terms for the document. If not provided, defaults to entity's document-type-specific payment terms setting. Pass empty string to explicitly set no terms."),tax_clause:e.string().nullish().describe("Tax clause for the document. Auto-populated based on transaction type if tax_clause_defaults are configured in entity settings. Pass empty string to explicitly set no clause."),footer:e.string().max(D_).nullish(),signature:e.string().nullish().describe("Signature text for the document (e.g. 'John Smith, CEO'). If not provided, defaults to entity's default_document_signature setting. Pass empty string to explicitly set no signature."),total:e.number().min(P_).max(w_),total_with_tax:e.number().min(C_).max(A_),total_discount:e.number().describe("Document discount total stored as a net-equivalent amount for compatibility. In `b2b_standard`, this is the net value of line-item discounts applied before tax. In `b2c_gross_discount`, gross discounts are converted back to their net-equivalent value here. 0 when no discounts applied."),creation_source:e.enum(["standard","custom"]).describe("Internal origin of the create request. `standard` means a normal create endpoint calculated the totals. `custom` means the document was created through a `/custom` endpoint."),calculation_mode:e.enum(["b2b_standard","b2c_gross_discount"]).describe("Resolved calculation mode used for this document. Stored on the document so recalculation and rendering remain stable even if entity defaults change later."),taxes:e.array(e.object({rate:e.number().nullable(),tax_id:e.string().nullish(),base:e.number(),amount:e.number(),reverse_charge:e.boolean().nullish()})).describe("Applied taxes summary"),currency_code:e.string().max(M_),entity_id:e.string().max(T_),date_year:e.number().min(k_).max(B_),shareable_id:e.string().max(N_).nullish(),voided_at:e.iso.datetime({}).nullish(),transaction_type:e.union([e.literal("domestic"),e.literal("intra_eu_b2b"),e.literal("intra_eu_b2c"),e.literal("3w_b2b"),e.literal("3w_b2c"),e.literal("export"),e.literal(null)]).nullish().describe("Transaction type for VAT purposes (domestic, intra_eu_b2b, intra_eu_b2c, export). Always determined based on issuer/customer countries."),metadata:e.record(e.string(),e.string()).nullish().describe("Custom key-value data for your own use. Store any JSON object up to 50 properties. Values must be strings up to 250 characters. Useful for storing external IDs, tags, or integration data."),exchange_rate:e.object({rate:e.number().describe("Exchange rate used for conversion"),source:e.string().describe("Source of the exchange rate (e.g., 'Frankfurter')"),date:e.iso.datetime({}).describe("Date of the exchange rate"),quote_currency:e.string().describe("Quote currency (the base currency converted to)")}).nullish().describe("Currency exchange rate information if conversion was applied"),total_converted:e.number().min(O_).max(F_).nullish(),total_with_tax_converted:e.number().min(U_).max(j_).nullish(),rounding_correction:e.number().nullish().describe("Rounding correction applied to reconcile differences between calculated total_with_tax and expected_total_with_tax. Only present when expected_total_with_tax was provided during creation."),eslog:e.object({validation_enabled:e.boolean().nullish().describe("Override entity default: true = validate, false = skip, null = use entity setting"),validation_status:e.union([e.literal("valid"),e.literal("invalid"),e.literal("not_validated"),e.literal(null)]).nullish().describe("Validation status: 'valid', 'invalid', or 'not_validated'"),validation_errors:e.array(e.string()).nullish().describe("Array of validation error messages (if status is 'invalid')"),validated_at:e.string().nullish().describe("ISO timestamp when validation was last performed")}).nullish().describe("e-SLOG 2.0 validation data for Slovenian electronic invoices. Only applicable when entity.country_code = 'SI' and eslog validation is enabled."),reference:e.string().nullish().describe("Custom reference for the document (e.g., purchase order number, payment reference). When set, used as the UPN payment reference instead of the auto-generated one."),vies:e.object({warning:e.string().nullable().describe("Warning message if VIES validation was unavailable or the VAT number was invalid. Document creation proceeds but this indicates the transaction type may need review."),skipped:e.boolean().nullable().describe("True when VIES validation was skipped due to entity settings (vies_validate_vat: false) but would normally apply. Used for audit trail.")}).nullish().describe("VIES validation info including any warnings and skipped indicator for audit trail"),deleted_at:e.iso.datetime({}).nullish().describe("Timestamp when the document was soft-deleted. Null if not deleted."),created_at:e.iso.datetime({}),updated_at:e.iso.datetime({}),hide_prices:e.boolean().describe("When true, prices and totals are hidden on the document (packing list mode)."),date_due:e.string().regex(q_).nullish().describe("Document due date in YYYY-MM-DD format"),date_service:e.string().regex(W_).nullish().describe("Service date in YYYY-MM-DD format. For invoices and credit notes."),date_service_to:e.string().regex(G_).nullish().describe("Service period end date in YYYY-MM-DD format. For invoices and credit notes. Use with date_service for date ranges."),items:e.array(e.object({id:e.string().max(V_),type:e.union([e.literal("separator"),e.literal(null)]).nullish().describe("Item type. null = regular line item, 'separator' = visual section header."),name:e.string().max(L_),description:e.string().nullable(),classification:e.union([e.literal("product"),e.literal("service"),e.literal("advance"),e.literal(null)]).nullish().describe("Item classification used for Portugal SAF-T product typing."),price:e.number().nullish().describe("Per-unit net price (before tax). Always stores net price. Null for separator items."),gross_price:e.number().nullish().describe(`Per-unit gross price (includes tax).
|
|
106
|
+
Only present if user originally sent gross price.
|
|
107
|
+
Use gross pricing to keep invoice totals stable when VIES reverse charge is applied.`),quantity:e.number().nullish().describe("Item quantity. Null for separator items."),unit:e.string().max(H_).nullish(),taxes:e.array(e.object({rate:e.number().nullish(),tax_id:e.string().nullish(),classification:e.string().nullish(),reverse_charge:e.boolean().nullish(),amount:e.number().nullish(),pt_exemption_code:e.string().nullish(),pt_exemption_reason:e.string().nullish()}).describe("Document Item Tax")).describe("Applied taxes (provide rate to create new tax, or tax_id to use existing tax)"),discounts:e.array(e.object({value:e.number().min(Y_).describe("Discount value"),type:e.enum(["percent","amount"]).default(K_).describe("Discount type: 'percent' (default) or 'amount'")})).max($_).describe("Line discounts (max 5) in request order. In `b2b_standard`, percentage discounts are calculated from the original line subtotal and fixed amounts are summed before tax. In `b2c_gross_discount`, discounts are applied sequentially to the running gross subtotal."),total:e.number().nullish().describe("Line total before tax. Null for separator items."),total_with_tax:e.number().nullish().describe("Line total after tax. Null for separator items."),total_converted:e.number().min(Q_).max(J_).nullish(),total_with_tax_converted:e.number().min(Z_).max(X_).nullish(),delivery_note_id:e.string().max(ev).nullish(),item_id:e.string().max(tv).nullish(),metadata:e.record(e.string(),e.string()).nullish().describe("Custom key-value data for your own use. Store any JSON object up to 50 properties. Values must be strings up to 250 characters. Useful for storing external IDs, tags, or integration data."),created_at:e.iso.datetime({}),updated_at:e.iso.datetime({})})),document_relations:e.array(e.object({id:e.string(),source_type:e.enum(["invoice","estimate","credit_note","advance_invoice","delivery_note"]).describe("Type of document"),source_id:e.string(),target_type:e.enum(["invoice","estimate","credit_note","advance_invoice","delivery_note"]).describe("Type of document"),target_id:e.string(),relation_type:e.string(),entity_id:e.string(),created_at:e.iso.datetime({}),linked_document_voided_at:e.iso.datetime({}).nullish(),related_document:e.object({id:e.string(),type:e.enum(["invoice","estimate","credit_note","advance_invoice","delivery_note"]).describe("Type of document"),number:e.string(),date:e.string(),total_with_tax:e.number(),currency_code:e.string(),is_draft:e.boolean(),voided_at:e.string().nullable(),paid_in_full:e.boolean().nullable(),title_type:e.union([e.literal("estimate"),e.literal("proforma_invoice"),e.literal(null)]).nullable(),hide_prices:e.boolean().nullable()}).optional()})).optional()}).describe("Delivery note / packing list document"),ov=/^[a-z]{3,4}_[0-9a-f]{24}$/,khe=e.object({id:e.stringFormat("resource-id",ov).describe("Unique resource identifier")}),Bhe=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),nv=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,sv=2,rv=2,iv="iban",av=2,dv=2,cv="iban",lv=2e3,uv=-140737488355328,pv=0x7fffffffffff,mv=50,gv=0,yv="percent",hv=5,bv=100,xv=500,Nhe=e.object({date:e.string().regex(nv).optional().describe("Document date (YYYY-MM-DD or ISO datetime format)."),issuer:e.object({name:e.string().nullish(),email:e.email().nullish(),address:e.string().nullish(),address_2:e.string().nullish(),post_code:e.string().nullish(),city:e.string().nullish(),state:e.string().nullish(),country:e.string().nullish(),country_code:e.string().min(sv).max(rv).nullish(),tax_number:e.string().nullish(),tax_number_2:e.string().nullish(),company_number:e.string().nullish(),phone:e.string().nullish(),peppol_id:e.string().nullish(),is_end_consumer:e.boolean().nullish(),bank_account:e.object({type:e.enum(["iban","us_domestic","uk_domestic","other"]).default(iv).describe("Account type determines which fields are used"),name:e.string().nullish().describe("Display name for this account. Falls back to account number if not set"),bank_name:e.string().nullish().describe("Bank name"),iban:e.string().nullish().describe("IBAN (for type=iban)"),account_number:e.string().nullish().describe("Account number (for us_domestic, uk_domestic, other)"),bic:e.string().nullish().describe("BIC/SWIFT code for international transfers"),routing_number:e.string().nullish().describe("US ABA routing number (for type=us_domestic)"),sort_code:e.string().nullish().describe("UK sort code (for type=uk_domestic)")}).nullish()}).describe("Document issuer (entity) information").and(e.unknown().describe("Issuer information snapshot.")).optional(),customer_id:e.string().nullish().describe("Referenced Customer ID. Set to null to remove customer reference."),customer:e.object({name:e.string().nullish(),email:e.email().nullish(),address:e.string().nullish(),address_2:e.string().nullish(),post_code:e.string().nullish(),city:e.string().nullish(),state:e.string().nullish(),country:e.string().nullish(),country_code:e.string().min(av).max(dv).nullish(),tax_number:e.string().nullish(),tax_number_2:e.string().nullish(),company_number:e.string().nullish(),phone:e.string().nullish(),peppol_id:e.string().nullish(),is_end_consumer:e.boolean().nullish(),bank_account:e.object({type:e.enum(["iban","us_domestic","uk_domestic","other"]).default(cv).describe("Account type determines which fields are used"),name:e.string().nullish().describe("Display name for this account. Falls back to account number if not set"),bank_name:e.string().nullish().describe("Bank name"),iban:e.string().nullish().describe("IBAN (for type=iban)"),account_number:e.string().nullish().describe("Account number (for us_domestic, uk_domestic, other)"),bic:e.string().nullish().describe("BIC/SWIFT code for international transfers"),routing_number:e.string().nullish().describe("US ABA routing number (for type=us_domestic)"),sort_code:e.string().nullish().describe("UK sort code (for type=uk_domestic)")}).nullish()}).describe("Document issuer (entity) information").and(e.object({save_customer:e.boolean().nullish().describe("Whether to save (create new or update existing) the customer data.\nDefaults to `true` (best-effort).\nWhen `true` with `customer_id`, updates the existing customer.\nWhen `true` without `customer_id`, checks for duplicate customers using customer identifiers (tax/company number, country-aware when available) and reuses the existing customer if found, otherwise creates a new customer.\nWhen `false`, customer data is stored inline on the document only.\nWhen omitted, behaves like `true` but won't fail the request if persistence fails.")}).nullable()).optional().describe("Customer recipient of the document.\nBoth `customer` and `customer_id` are optional - documents can be created without customer information.\nIf both `customer_id` and `customer` are provided with `save_customer=true`, the existing customer will be updated.\nIf only `customer` is provided with `save_customer=true` (or by default), the system checks for duplicates using customer identifiers and reuses existing customers when found."),items:e.array(e.object({type:e.union([e.literal("separator"),e.literal(null)]).nullish().describe(`Item type. Omit or null for regular line item, 'separator' for a visual section header.
|
|
108
|
+
Separator items only use name and description \u2014 all financial fields are ignored.`),name:e.string().min(1).nullish().describe("Item name. Required unless `item_id` is provided.\nFor separator items, this is the section title (always required)."),description:e.string().max(lv).nullish(),classification:e.union([e.literal("product"),e.literal("service"),e.literal("advance"),e.literal(null)]).nullish().describe("Item classification used for Portugal SAF-T product typing."),price:e.number().nullish().describe("Net price per unit (before tax).\nProvide either `price` OR `gross_price`, not both.\nOptional if `item_id` is provided. Ignored for separator items."),gross_price:e.number().nullish().describe("Gross price per unit (includes tax).\nIf provided, net price is calculated.\nProvide either `price` OR `gross_price`, not both.\nOptional if `item_id` is provided. Ignored for separator items."),quantity:e.number().min(uv).max(pv).nullish().describe("Item quantity. Required for regular items. Ignored for separator items."),unit:e.string().max(mv).nullish(),taxes:e.array(e.object({rate:e.number().nullish(),tax_id:e.string().nullish(),classification:e.string().nullish(),reverse_charge:e.boolean().nullish(),amount:e.number().nullish(),pt_exemption_code:e.string().nullish(),pt_exemption_reason:e.string().nullish()}).describe("Document Item Tax")).optional().describe("Applied taxes (provide rate to create new tax, or tax_id to use existing tax)"),discounts:e.array(e.object({value:e.number().min(gv).describe("Discount value"),type:e.enum(["percent","amount"]).default(yv).describe("Discount type: 'percent' (default) or 'amount'")})).max(hv).optional().describe("Line discounts (max 5) in request order. In `b2b_standard`, percentage discounts are calculated from the original line subtotal and fixed amounts are summed before tax. In `b2c_gross_discount`, discounts are applied sequentially to the running gross subtotal."),item_id:e.string().nullish().describe(`ID of a catalog item to prefill from.
|
|
109
|
+
When provided, the item's name, description, price, and taxes are used as defaults.
|
|
110
|
+
Any field you provide will override the catalog item's value.
|
|
111
|
+
Not applicable for separator items.`),metadata:e.record(e.string(),e.string()).nullish().describe("Custom key-value data for your own use. Store any JSON object up to 50 properties. Values must be strings up to 250 characters. Useful for storing external IDs, tags, or integration data."),save_item:e.boolean().nullish().describe(`Whether to save this item to the catalog.
|
|
112
|
+
When true without item_id, matches by exact name and reuses existing, or creates a new catalog item.
|
|
113
|
+
Defaults to true (best-effort). When omitted, behaves like true but won't fail the request if persistence fails.`)})).min(1).optional().describe("Line items for the document. If provided, replaces ALL existing items. Triggers recalculation of totals."),note:e.string().nullish().describe("Document note/memo. Set to null to clear."),payment_terms:e.string().nullish().describe("Payment terms text. Set to null to clear."),tax_clause:e.string().nullish().describe("Tax clause text. Set to null to clear."),footer:e.string().nullish().describe("Footer text. Set to null to clear."),signature:e.string().nullish().describe("Signature text (e.g. 'John Smith, CEO'). Set to null to clear."),currency_code:e.string().optional().describe("Currency code (ISO 4217, 3 characters). Changing currency triggers exchange rate recalculation."),reference:e.string().max(bv).nullish().describe("Custom reference (e.g., purchase order number, payment reference). When set, overrides the auto-generated UPN payment reference for Slovenian invoices. Set to null to clear."),metadata:e.record(e.string(),e.unknown()).nullish().describe("Custom metadata object. Set to null to clear."),change_reason:e.string().max(xv).optional().describe("Reason for the change. Stored in version history for audit trail."),hide_prices:e.boolean().optional().describe("When true, prices and totals are hidden on the document (packing list mode)."),linked_documents:e.array(e.string().min(1)).nullish().describe("Link this delivery note to other documents. Replaces existing links. Accepts invoice IDs (inv_xxx).")}),zv=36,_v=100,vv=2,fv=2,Rv="iban",Iv=36,Ev=2,Sv=2,Dv="iban",Pv=500,wv=-140737488355328,Cv=0x7fffffffffff,Av=-140737488355328,Mv=0x7fffffffffff,Tv=3,kv=36,Bv=-2147483648,Nv=2147483647,Ov=100,Fv=-140737488355328,Uv=0x7fffffffffff,jv=-140737488355328,qv=0x7fffffffffff,Wv=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,Gv=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,Vv=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,Lv=36,Hv=500,Yv=50,Kv=0,$v="percent",Qv=5,Jv=-140737488355328,Zv=0x7fffffffffff,Xv=-140737488355328,ef=0x7fffffffffff,tf=36,of=36,Ohe=e.object({id:e.string().max(zv),number:e.string().max(_v),is_draft:e.boolean().describe("Whether this is a draft document. Draft documents have no sequential number assigned, skip fiscalization, and can be deleted. Use POST /{documents}/{id}/finalize to assign a number and finalize."),date:e.iso.datetime({}).describe("Date the delivery note was created (ISO 8601 datetime at midnight UTC)"),issuer:e.object({name:e.string().nullish(),email:e.email().nullish(),address:e.string().nullish(),address_2:e.string().nullish(),post_code:e.string().nullish(),city:e.string().nullish(),state:e.string().nullish(),country:e.string().nullish(),country_code:e.string().min(vv).max(fv).nullish(),tax_number:e.string().nullish(),tax_number_2:e.string().nullish(),company_number:e.string().nullish(),phone:e.string().nullish(),peppol_id:e.string().nullish(),is_end_consumer:e.boolean().nullish(),bank_account:e.object({type:e.enum(["iban","us_domestic","uk_domestic","other"]).default(Rv).describe("Account type determines which fields are used"),name:e.string().nullish().describe("Display name for this account. Falls back to account number if not set"),bank_name:e.string().nullish().describe("Bank name"),iban:e.string().nullish().describe("IBAN (for type=iban)"),account_number:e.string().nullish().describe("Account number (for us_domestic, uk_domestic, other)"),bic:e.string().nullish().describe("BIC/SWIFT code for international transfers"),routing_number:e.string().nullish().describe("US ABA routing number (for type=us_domestic)"),sort_code:e.string().nullish().describe("UK sort code (for type=uk_domestic)")}).nullish()}).describe("Document issuer (entity) information"),customer_id:e.string().max(Iv).nullish(),customer:e.object({name:e.string().nullish(),email:e.email().nullish(),address:e.string().nullish(),address_2:e.string().nullish(),post_code:e.string().nullish(),city:e.string().nullish(),state:e.string().nullish(),country:e.string().nullish(),country_code:e.string().min(Ev).max(Sv).nullish(),tax_number:e.string().nullish(),tax_number_2:e.string().nullish(),company_number:e.string().nullish(),phone:e.string().nullish(),peppol_id:e.string().nullish(),is_end_consumer:e.boolean().nullish(),bank_account:e.object({type:e.enum(["iban","us_domestic","uk_domestic","other"]).default(Dv).describe("Account type determines which fields are used"),name:e.string().nullish().describe("Display name for this account. Falls back to account number if not set"),bank_name:e.string().nullish().describe("Bank name"),iban:e.string().nullish().describe("IBAN (for type=iban)"),account_number:e.string().nullish().describe("Account number (for us_domestic, uk_domestic, other)"),bic:e.string().nullish().describe("BIC/SWIFT code for international transfers"),routing_number:e.string().nullish().describe("US ABA routing number (for type=us_domestic)"),sort_code:e.string().nullish().describe("UK sort code (for type=uk_domestic)")}).nullish()}).nullish().describe("Customer information"),note:e.string().nullish().describe("Note for the document. If not provided, defaults to entity's document-type-specific note setting. Pass empty string to explicitly set no note."),payment_terms:e.string().nullish().describe("Payment terms for the document. If not provided, defaults to entity's document-type-specific payment terms setting. Pass empty string to explicitly set no terms."),tax_clause:e.string().nullish().describe("Tax clause for the document. Auto-populated based on transaction type if tax_clause_defaults are configured in entity settings. Pass empty string to explicitly set no clause."),footer:e.string().max(Pv).nullish(),signature:e.string().nullish().describe("Signature text for the document (e.g. 'John Smith, CEO'). If not provided, defaults to entity's default_document_signature setting. Pass empty string to explicitly set no signature."),total:e.number().min(wv).max(Cv),total_with_tax:e.number().min(Av).max(Mv),total_discount:e.number().describe("Document discount total stored as a net-equivalent amount for compatibility. In `b2b_standard`, this is the net value of line-item discounts applied before tax. In `b2c_gross_discount`, gross discounts are converted back to their net-equivalent value here. 0 when no discounts applied."),creation_source:e.enum(["standard","custom"]).describe("Internal origin of the create request. `standard` means a normal create endpoint calculated the totals. `custom` means the document was created through a `/custom` endpoint."),calculation_mode:e.enum(["b2b_standard","b2c_gross_discount"]).describe("Resolved calculation mode used for this document. Stored on the document so recalculation and rendering remain stable even if entity defaults change later."),taxes:e.array(e.object({rate:e.number().nullable(),tax_id:e.string().nullish(),base:e.number(),amount:e.number(),reverse_charge:e.boolean().nullish()})).describe("Applied taxes summary"),currency_code:e.string().max(Tv),entity_id:e.string().max(kv),date_year:e.number().min(Bv).max(Nv),shareable_id:e.string().max(Ov).nullish(),voided_at:e.iso.datetime({}).nullish(),transaction_type:e.union([e.literal("domestic"),e.literal("intra_eu_b2b"),e.literal("intra_eu_b2c"),e.literal("3w_b2b"),e.literal("3w_b2c"),e.literal("export"),e.literal(null)]).nullish().describe("Transaction type for VAT purposes (domestic, intra_eu_b2b, intra_eu_b2c, export). Always determined based on issuer/customer countries."),metadata:e.record(e.string(),e.string()).nullish().describe("Custom key-value data for your own use. Store any JSON object up to 50 properties. Values must be strings up to 250 characters. Useful for storing external IDs, tags, or integration data."),exchange_rate:e.object({rate:e.number().describe("Exchange rate used for conversion"),source:e.string().describe("Source of the exchange rate (e.g., 'Frankfurter')"),date:e.iso.datetime({}).describe("Date of the exchange rate"),quote_currency:e.string().describe("Quote currency (the base currency converted to)")}).nullish().describe("Currency exchange rate information if conversion was applied"),total_converted:e.number().min(Fv).max(Uv).nullish(),total_with_tax_converted:e.number().min(jv).max(qv).nullish(),rounding_correction:e.number().nullish().describe("Rounding correction applied to reconcile differences between calculated total_with_tax and expected_total_with_tax. Only present when expected_total_with_tax was provided during creation."),eslog:e.object({validation_enabled:e.boolean().nullish().describe("Override entity default: true = validate, false = skip, null = use entity setting"),validation_status:e.union([e.literal("valid"),e.literal("invalid"),e.literal("not_validated"),e.literal(null)]).nullish().describe("Validation status: 'valid', 'invalid', or 'not_validated'"),validation_errors:e.array(e.string()).nullish().describe("Array of validation error messages (if status is 'invalid')"),validated_at:e.string().nullish().describe("ISO timestamp when validation was last performed")}).nullish().describe("e-SLOG 2.0 validation data for Slovenian electronic invoices. Only applicable when entity.country_code = 'SI' and eslog validation is enabled."),reference:e.string().nullish().describe("Custom reference for the document (e.g., purchase order number, payment reference). When set, used as the UPN payment reference instead of the auto-generated one."),vies:e.object({warning:e.string().nullable().describe("Warning message if VIES validation was unavailable or the VAT number was invalid. Document creation proceeds but this indicates the transaction type may need review."),skipped:e.boolean().nullable().describe("True when VIES validation was skipped due to entity settings (vies_validate_vat: false) but would normally apply. Used for audit trail.")}).nullish().describe("VIES validation info including any warnings and skipped indicator for audit trail"),deleted_at:e.iso.datetime({}).nullish().describe("Timestamp when the document was soft-deleted. Null if not deleted."),created_at:e.iso.datetime({}),updated_at:e.iso.datetime({}),hide_prices:e.boolean().describe("When true, prices and totals are hidden on the document (packing list mode)."),date_due:e.string().regex(Wv).nullish().describe("Document due date in YYYY-MM-DD format"),date_service:e.string().regex(Gv).nullish().describe("Service date in YYYY-MM-DD format. For invoices and credit notes."),date_service_to:e.string().regex(Vv).nullish().describe("Service period end date in YYYY-MM-DD format. For invoices and credit notes. Use with date_service for date ranges."),items:e.array(e.object({id:e.string().max(Lv),type:e.union([e.literal("separator"),e.literal(null)]).nullish().describe("Item type. null = regular line item, 'separator' = visual section header."),name:e.string().max(Hv),description:e.string().nullable(),classification:e.union([e.literal("product"),e.literal("service"),e.literal("advance"),e.literal(null)]).nullish().describe("Item classification used for Portugal SAF-T product typing."),price:e.number().nullish().describe("Per-unit net price (before tax). Always stores net price. Null for separator items."),gross_price:e.number().nullish().describe(`Per-unit gross price (includes tax).
|
|
114
|
+
Only present if user originally sent gross price.
|
|
115
|
+
Use gross pricing to keep invoice totals stable when VIES reverse charge is applied.`),quantity:e.number().nullish().describe("Item quantity. Null for separator items."),unit:e.string().max(Yv).nullish(),taxes:e.array(e.object({rate:e.number().nullish(),tax_id:e.string().nullish(),classification:e.string().nullish(),reverse_charge:e.boolean().nullish(),amount:e.number().nullish(),pt_exemption_code:e.string().nullish(),pt_exemption_reason:e.string().nullish()}).describe("Document Item Tax")).describe("Applied taxes (provide rate to create new tax, or tax_id to use existing tax)"),discounts:e.array(e.object({value:e.number().min(Kv).describe("Discount value"),type:e.enum(["percent","amount"]).default($v).describe("Discount type: 'percent' (default) or 'amount'")})).max(Qv).describe("Line discounts (max 5) in request order. In `b2b_standard`, percentage discounts are calculated from the original line subtotal and fixed amounts are summed before tax. In `b2c_gross_discount`, discounts are applied sequentially to the running gross subtotal."),total:e.number().nullish().describe("Line total before tax. Null for separator items."),total_with_tax:e.number().nullish().describe("Line total after tax. Null for separator items."),total_converted:e.number().min(Jv).max(Zv).nullish(),total_with_tax_converted:e.number().min(Xv).max(ef).nullish(),delivery_note_id:e.string().max(tf).nullish(),item_id:e.string().max(of).nullish(),metadata:e.record(e.string(),e.string()).nullish().describe("Custom key-value data for your own use. Store any JSON object up to 50 properties. Values must be strings up to 250 characters. Useful for storing external IDs, tags, or integration data."),created_at:e.iso.datetime({}),updated_at:e.iso.datetime({})})),document_relations:e.array(e.object({id:e.string(),source_type:e.enum(["invoice","estimate","credit_note","advance_invoice","delivery_note"]).describe("Type of document"),source_id:e.string(),target_type:e.enum(["invoice","estimate","credit_note","advance_invoice","delivery_note"]).describe("Type of document"),target_id:e.string(),relation_type:e.string(),entity_id:e.string(),created_at:e.iso.datetime({}),linked_document_voided_at:e.iso.datetime({}).nullish(),related_document:e.object({id:e.string(),type:e.enum(["invoice","estimate","credit_note","advance_invoice","delivery_note"]).describe("Type of document"),number:e.string(),date:e.string(),total_with_tax:e.number(),currency_code:e.string(),is_draft:e.boolean(),voided_at:e.string().nullable(),paid_in_full:e.boolean().nullable(),title_type:e.union([e.literal("estimate"),e.literal("proforma_invoice"),e.literal(null)]).nullable(),hide_prices:e.boolean().nullable()}).optional()})).optional()}).describe("Delivery note / packing list document"),nf=/^[a-z]{3,4}_[0-9a-f]{24}$/,Fhe=e.object({id:e.stringFormat("resource-id",nf).describe("Unique resource identifier")}),Uhe=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),jhe=e.object({versions:e.array(e.object({id:e.string().describe("Version record ID"),document_type:e.enum(["invoice","estimate","credit_note","advance_invoice"]).describe("Type of document"),document_id:e.string().describe("Document ID"),version:e.number().min(1).describe("Version number"),snapshot:e.record(e.string(),e.unknown()).describe("Full document snapshot at this version"),changed_fields:e.array(e.string()).describe("Fields that were changed in this update"),user:e.object({id:e.string(),name:e.string().nullable(),email:e.string()}).nullable().describe("User who made the change"),reason:e.string().nullable().describe("Reason for the change"),created_at:e.iso.datetime({}).describe("When this version was created")})).describe("List of versions"),count:e.number().describe("Total number of versions")}),qhe=e.object({id:e.string().describe("Delivery Note ID"),version:e.number().min(1).describe("Version number")}),Whe=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),Ghe=e.object({id:e.string().describe("Version record ID"),document_type:e.enum(["invoice","estimate","credit_note","advance_invoice"]).describe("Type of document"),document_id:e.string().describe("Document ID"),version:e.number().min(1).describe("Version number"),snapshot:e.record(e.string(),e.unknown()).describe("Full document snapshot at this version"),changed_fields:e.array(e.string()).describe("Fields that were changed in this update"),user:e.object({id:e.string(),name:e.string().nullable(),email:e.string()}).nullable().describe("User who made the change"),reason:e.string().nullable().describe("Reason for the change"),created_at:e.iso.datetime({}).describe("When this version was created")}),sf=2,rf=5,af=2,df=5,cf="true",Vhe=e.object({template:e.enum(["modern","classic","condensed","minimal","fashion"]).optional().describe("Document template design to use. When not specified, uses the entity's configured template."),locale:e.string().min(sf).max(rf).nullish().describe("Locale for number and date formatting (decimal separators, date order). When not specified, uses the entity's configured locale. For example, 'sl-SI' formats decimals with commas (5,5%) and dates as DD. MM. YYYY."),language:e.string().min(af).max(df).nullish().describe("Language for document labels and translations (e.g., 'Invoice', 'Tax', 'Total'). When not specified, uses the same value as locale. Use this to get entity-locale formatting with different-language labels \u2014 for example, a Slovenian entity (sl-SI formatting with commas) but English labels."),partial:e.enum(["true","false"]).default(cf).describe("Whether to treat the document as partial (allows incomplete data) or complete (validates all required fields)"),upn_qr_enabled:e.enum(["true","false"]).optional().describe("Override UPN QR enabled setting for preview"),upn_qr_display_mode:e.enum(["qr_only","full_slip"]).optional().describe("Override UPN QR display mode for preview"),epc_qr_enabled:e.enum(["true","false"]).optional().describe("Override EPC QR enabled setting for preview")}),Lhe=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),lf=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,uf=2,pf=2,mf="iban",gf=2,yf=2,hf="iban",bf=500,xf=3,zf=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,_f=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,vf=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,ff=0,Rf=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,If=2,Ef=2,Sf="iban",Df=2,Pf=2,wf="iban",Cf=500,Af=3,Mf=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,Tf=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,kf=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,Bf=2e3,Nf=-140737488355328,Of=0x7fffffffffff,Ff=50,Uf=0,jf="percent",qf=5,Wf=0,Hhe=e.union([e.object({is_draft:e.boolean().optional().describe("Whether this is a draft document. Draft documents have no sequential number assigned, skip fiscalization, and can be deleted. Use POST /{documents}/{id}/finalize to assign a number and finalize."),date:e.string().regex(lf).optional().describe("Document date in YYYY-MM-DD format"),issuer:e.object({name:e.string().nullish(),email:e.email().nullish(),address:e.string().nullish(),address_2:e.string().nullish(),post_code:e.string().nullish(),city:e.string().nullish(),state:e.string().nullish(),country:e.string().nullish(),country_code:e.string().min(uf).max(pf).nullish(),tax_number:e.string().nullish(),tax_number_2:e.string().nullish(),company_number:e.string().nullish(),phone:e.string().nullish(),peppol_id:e.string().nullish(),is_end_consumer:e.boolean().nullish(),bank_account:e.object({type:e.enum(["iban","us_domestic","uk_domestic","other"]).default(mf).describe("Account type determines which fields are used"),name:e.string().nullish().describe("Display name for this account. Falls back to account number if not set"),bank_name:e.string().nullish().describe("Bank name"),iban:e.string().nullish().describe("IBAN (for type=iban)"),account_number:e.string().nullish().describe("Account number (for us_domestic, uk_domestic, other)"),bic:e.string().nullish().describe("BIC/SWIFT code for international transfers"),routing_number:e.string().nullish().describe("US ABA routing number (for type=us_domestic)"),sort_code:e.string().nullish().describe("UK sort code (for type=uk_domestic)")}).nullish()}).optional().describe("Document issuer (entity) information"),customer_id:e.string().nullish().describe("Referenced Customer ID. Required if customer is not provided."),customer:e.object({name:e.string().nullish(),email:e.email().nullish(),address:e.string().nullish(),address_2:e.string().nullish(),post_code:e.string().nullish(),city:e.string().nullish(),state:e.string().nullish(),country:e.string().nullish(),country_code:e.string().min(gf).max(yf).nullish(),tax_number:e.string().nullish(),tax_number_2:e.string().nullish(),company_number:e.string().nullish(),phone:e.string().nullish(),peppol_id:e.string().nullish(),is_end_consumer:e.boolean().nullish(),bank_account:e.object({type:e.enum(["iban","us_domestic","uk_domestic","other"]).default(hf).describe("Account type determines which fields are used"),name:e.string().nullish().describe("Display name for this account. Falls back to account number if not set"),bank_name:e.string().nullish().describe("Bank name"),iban:e.string().nullish().describe("IBAN (for type=iban)"),account_number:e.string().nullish().describe("Account number (for us_domestic, uk_domestic, other)"),bic:e.string().nullish().describe("BIC/SWIFT code for international transfers"),routing_number:e.string().nullish().describe("US ABA routing number (for type=us_domestic)"),sort_code:e.string().nullish().describe("UK sort code (for type=uk_domestic)")}).nullish()}).describe("Document issuer (entity) information").and(e.object({save_customer:e.boolean().nullish().describe("Whether to save (create new or update existing) the customer data.\nDefaults to `true` (best-effort).\nWhen `true` with `customer_id`, updates the existing customer.\nWhen `true` without `customer_id`, checks for duplicate customers using customer identifiers (tax/company number, country-aware when available) and reuses the existing customer if found, otherwise creates a new customer.\nWhen `false`, customer data is stored inline on the document only.\nWhen omitted, behaves like `true` but won't fail the request if persistence fails.")}).nullable()).optional().describe("Customer recipient of the document.\nBoth `customer` and `customer_id` are optional - documents can be created without customer information.\nIf both `customer_id` and `customer` are provided with `save_customer=true`, the existing customer will be updated.\nIf only `customer` is provided with `save_customer=true` (or by default), the system checks for duplicates using customer identifiers and reuses existing customers when found."),note:e.string().nullish().describe("Note for the document. If not provided, defaults to entity's document-type-specific note setting. Pass empty string to explicitly set no note."),payment_terms:e.string().nullish().describe("Payment terms for the document. If not provided, defaults to entity's document-type-specific payment terms setting. Pass empty string to explicitly set no terms."),tax_clause:e.string().nullish().describe("Tax clause for the document. Auto-populated based on transaction type if tax_clause_defaults are configured in entity settings. Pass empty string to explicitly set no clause."),footer:e.string().max(bf).nullish(),signature:e.string().nullish().describe("Signature text for the document (e.g. 'John Smith, CEO'). If not provided, defaults to entity's default_document_signature setting. Pass empty string to explicitly set no signature."),calculation_mode:e.union([e.literal("b2b_standard"),e.literal("b2c_gross_discount"),e.literal(null)]).nullish().describe("Optional calculation mode override. When omitted, the entity default is used and falls back to `b2b_standard`."),currency_code:e.string().max(xf).optional(),metadata:e.record(e.string(),e.string()).nullish().describe("Custom key-value data for your own use. Store any JSON object up to 50 properties. Values must be strings up to 250 characters. Useful for storing external IDs, tags, or integration data."),reference:e.string().nullish().describe("Custom reference for the document (e.g., purchase order number, payment reference). When set, used as the UPN payment reference instead of the auto-generated one."),hide_prices:e.boolean().optional().describe("When true, prices and totals are hidden on the document (packing list mode)."),date_due:e.string().regex(zf).nullish().describe("Document due date in YYYY-MM-DD format"),date_service:e.string().regex(_f).nullish().describe("Service date in YYYY-MM-DD format. For invoices and credit notes."),date_service_to:e.string().regex(vf).nullish().describe("Service period end date in YYYY-MM-DD format. For invoices and credit notes. Use with date_service for date ranges."),items:e.array(e.object({type:e.enum(["separator"]).optional(),name:e.string().optional(),quantity:e.number().optional(),price:e.number().optional(),gross_price:e.number().optional(),description:e.string().optional(),unit:e.string().optional(),discounts:e.array(e.object({value:e.number(),type:e.enum(["percent","amount"]).optional()})).optional(),taxes:e.array(e.object({rate:e.number().optional(),tax_id:e.string().optional()})).optional(),metadata:e.record(e.string(),e.string()).optional()})).min(1),linked_documents:e.array(e.string().min(1)).nullish().describe("Link this delivery note to other documents. Accepts estimate IDs (est_xxx) or invoice IDs (inv_xxx). Creates document relations automatically."),expected_total_with_tax:e.number().gt(ff).nullish().describe("Expected total with tax. When provided, the system calculates a rounding_correction to reconcile differences between the calculated total and this expected value. Maximum allowed correction is \xB11.00. Useful when importing invoices from external systems with different rounding rules.")}),e.object({is_draft:e.boolean().optional().describe("Whether this is a draft document. Draft documents have no sequential number assigned, skip fiscalization, and can be deleted. Use POST /{documents}/{id}/finalize to assign a number and finalize."),date:e.string().regex(Rf).optional().describe("Document date in YYYY-MM-DD format"),issuer:e.object({name:e.string().nullish(),email:e.email().nullish(),address:e.string().nullish(),address_2:e.string().nullish(),post_code:e.string().nullish(),city:e.string().nullish(),state:e.string().nullish(),country:e.string().nullish(),country_code:e.string().min(If).max(Ef).nullish(),tax_number:e.string().nullish(),tax_number_2:e.string().nullish(),company_number:e.string().nullish(),phone:e.string().nullish(),peppol_id:e.string().nullish(),is_end_consumer:e.boolean().nullish(),bank_account:e.object({type:e.enum(["iban","us_domestic","uk_domestic","other"]).default(Sf).describe("Account type determines which fields are used"),name:e.string().nullish().describe("Display name for this account. Falls back to account number if not set"),bank_name:e.string().nullish().describe("Bank name"),iban:e.string().nullish().describe("IBAN (for type=iban)"),account_number:e.string().nullish().describe("Account number (for us_domestic, uk_domestic, other)"),bic:e.string().nullish().describe("BIC/SWIFT code for international transfers"),routing_number:e.string().nullish().describe("US ABA routing number (for type=us_domestic)"),sort_code:e.string().nullish().describe("UK sort code (for type=uk_domestic)")}).nullish()}).optional().describe("Document issuer (entity) information"),customer_id:e.string().nullish().describe("Referenced Customer ID. Required if customer is not provided."),customer:e.object({name:e.string().nullish(),email:e.email().nullish(),address:e.string().nullish(),address_2:e.string().nullish(),post_code:e.string().nullish(),city:e.string().nullish(),state:e.string().nullish(),country:e.string().nullish(),country_code:e.string().min(Df).max(Pf).nullish(),tax_number:e.string().nullish(),tax_number_2:e.string().nullish(),company_number:e.string().nullish(),phone:e.string().nullish(),peppol_id:e.string().nullish(),is_end_consumer:e.boolean().nullish(),bank_account:e.object({type:e.enum(["iban","us_domestic","uk_domestic","other"]).default(wf).describe("Account type determines which fields are used"),name:e.string().nullish().describe("Display name for this account. Falls back to account number if not set"),bank_name:e.string().nullish().describe("Bank name"),iban:e.string().nullish().describe("IBAN (for type=iban)"),account_number:e.string().nullish().describe("Account number (for us_domestic, uk_domestic, other)"),bic:e.string().nullish().describe("BIC/SWIFT code for international transfers"),routing_number:e.string().nullish().describe("US ABA routing number (for type=us_domestic)"),sort_code:e.string().nullish().describe("UK sort code (for type=uk_domestic)")}).nullish()}).describe("Document issuer (entity) information").and(e.object({save_customer:e.boolean().nullish().describe("Whether to save (create new or update existing) the customer data.\nDefaults to `true` (best-effort).\nWhen `true` with `customer_id`, updates the existing customer.\nWhen `true` without `customer_id`, checks for duplicate customers using customer identifiers (tax/company number, country-aware when available) and reuses the existing customer if found, otherwise creates a new customer.\nWhen `false`, customer data is stored inline on the document only.\nWhen omitted, behaves like `true` but won't fail the request if persistence fails.")}).nullable()).optional().describe("Customer recipient of the document.\nBoth `customer` and `customer_id` are optional - documents can be created without customer information.\nIf both `customer_id` and `customer` are provided with `save_customer=true`, the existing customer will be updated.\nIf only `customer` is provided with `save_customer=true` (or by default), the system checks for duplicates using customer identifiers and reuses existing customers when found."),note:e.string().nullish().describe("Note for the document. If not provided, defaults to entity's document-type-specific note setting. Pass empty string to explicitly set no note."),payment_terms:e.string().nullish().describe("Payment terms for the document. If not provided, defaults to entity's document-type-specific payment terms setting. Pass empty string to explicitly set no terms."),tax_clause:e.string().nullish().describe("Tax clause for the document. Auto-populated based on transaction type if tax_clause_defaults are configured in entity settings. Pass empty string to explicitly set no clause."),footer:e.string().max(Cf).nullish(),signature:e.string().nullish().describe("Signature text for the document (e.g. 'John Smith, CEO'). If not provided, defaults to entity's default_document_signature setting. Pass empty string to explicitly set no signature."),calculation_mode:e.union([e.literal("b2b_standard"),e.literal("b2c_gross_discount"),e.literal(null)]).nullish().describe("Optional calculation mode override. When omitted, the entity default is used and falls back to `b2b_standard`."),currency_code:e.string().max(Af).optional(),metadata:e.record(e.string(),e.string()).nullish().describe("Custom key-value data for your own use. Store any JSON object up to 50 properties. Values must be strings up to 250 characters. Useful for storing external IDs, tags, or integration data."),reference:e.string().nullish().describe("Custom reference for the document (e.g., purchase order number, payment reference). When set, used as the UPN payment reference instead of the auto-generated one."),hide_prices:e.boolean().optional().describe("When true, prices and totals are hidden on the document (packing list mode)."),date_due:e.string().regex(Mf).nullish().describe("Document due date in YYYY-MM-DD format"),date_service:e.string().regex(Tf).nullish().describe("Service date in YYYY-MM-DD format. For invoices and credit notes."),date_service_to:e.string().regex(kf).nullish().describe("Service period end date in YYYY-MM-DD format. For invoices and credit notes. Use with date_service for date ranges."),items:e.array(e.object({type:e.union([e.literal("separator"),e.literal(null)]).nullish().describe(`Item type. Omit or null for regular line item, 'separator' for a visual section header.
|
|
116
|
+
Separator items only use name and description \u2014 all financial fields are ignored.`),name:e.string().min(1).nullish().describe("Item name. Required unless `item_id` is provided.\nFor separator items, this is the section title (always required)."),description:e.string().max(Bf).nullish(),classification:e.union([e.literal("product"),e.literal("service"),e.literal("advance"),e.literal(null)]).nullish().describe("Item classification used for Portugal SAF-T product typing."),price:e.number().nullish().describe("Net price per unit (before tax).\nProvide either `price` OR `gross_price`, not both.\nOptional if `item_id` is provided. Ignored for separator items."),gross_price:e.number().nullish().describe("Gross price per unit (includes tax).\nIf provided, net price is calculated.\nProvide either `price` OR `gross_price`, not both.\nOptional if `item_id` is provided. Ignored for separator items."),quantity:e.number().min(Nf).max(Of).nullish().describe("Item quantity. Required for regular items. Ignored for separator items."),unit:e.string().max(Ff).nullish(),taxes:e.array(e.object({rate:e.number().nullish(),tax_id:e.string().nullish(),classification:e.string().nullish(),reverse_charge:e.boolean().nullish(),amount:e.number().nullish(),pt_exemption_code:e.string().nullish(),pt_exemption_reason:e.string().nullish()}).describe("Document Item Tax")).optional().describe("Applied taxes (provide rate to create new tax, or tax_id to use existing tax)"),discounts:e.array(e.object({value:e.number().min(Uf).describe("Discount value"),type:e.enum(["percent","amount"]).default(jf).describe("Discount type: 'percent' (default) or 'amount'")})).max(qf).optional().describe("Line discounts (max 5) in request order. In `b2b_standard`, percentage discounts are calculated from the original line subtotal and fixed amounts are summed before tax. In `b2c_gross_discount`, discounts are applied sequentially to the running gross subtotal."),item_id:e.string().nullish().describe(`ID of a catalog item to prefill from.
|
|
117
|
+
When provided, the item's name, description, price, and taxes are used as defaults.
|
|
118
|
+
Any field you provide will override the catalog item's value.
|
|
119
|
+
Not applicable for separator items.`),metadata:e.record(e.string(),e.string()).nullish().describe("Custom key-value data for your own use. Store any JSON object up to 50 properties. Values must be strings up to 250 characters. Useful for storing external IDs, tags, or integration data."),save_item:e.boolean().nullish().describe(`Whether to save this item to the catalog.
|
|
120
|
+
When true without item_id, matches by exact name and reuses existing, or creates a new catalog item.
|
|
121
|
+
Defaults to true (best-effort). When omitted, behaves like true but won't fail the request if persistence fails.`)})).min(1).describe("Line items for the delivery note. At least one item is required."),linked_documents:e.array(e.string().min(1)).nullish().describe("Link this delivery note to other documents. Accepts estimate IDs (est_xxx) or invoice IDs (inv_xxx). Creates document relations automatically."),expected_total_with_tax:e.number().gt(Wf).nullish().describe("Expected total with tax. When provided, the system calculates a rounding_correction to reconcile differences between the calculated total and this expected value. Maximum allowed correction is \xB11.00. Useful when importing invoices from external systems with different rounding rules.")})]),Gf=/^[a-z]{3,4}_[0-9a-f]{24}$/,Yhe=e.object({id:e.stringFormat("resource-id",Gf).describe("Unique resource identifier")}),Khe=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),$he=e.object({reason:e.string().min(1).optional().describe("Technical reason for voiding (e.g., 'Duplicate delivery note', 'Technical error')")}),Vf=36,Lf=100,Hf=2,Yf=2,Kf="iban",$f=36,Qf=2,Jf=2,Zf="iban",Xf=500,eR=-140737488355328,tR=0x7fffffffffff,oR=-140737488355328,nR=0x7fffffffffff,sR=3,rR=36,iR=-2147483648,aR=2147483647,dR=100,cR=-140737488355328,lR=0x7fffffffffff,uR=-140737488355328,pR=0x7fffffffffff,mR=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,gR=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,yR=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,hR=36,bR=500,xR=50,zR=0,_R="percent",vR=5,fR=-140737488355328,RR=0x7fffffffffff,IR=-140737488355328,ER=0x7fffffffffff,SR=36,DR=36,Qhe=e.object({id:e.string().max(Vf),number:e.string().max(Lf),is_draft:e.boolean().describe("Whether this is a draft document. Draft documents have no sequential number assigned, skip fiscalization, and can be deleted. Use POST /{documents}/{id}/finalize to assign a number and finalize."),date:e.iso.datetime({}).describe("Date the delivery note was created (ISO 8601 datetime at midnight UTC)"),issuer:e.object({name:e.string().nullish(),email:e.email().nullish(),address:e.string().nullish(),address_2:e.string().nullish(),post_code:e.string().nullish(),city:e.string().nullish(),state:e.string().nullish(),country:e.string().nullish(),country_code:e.string().min(Hf).max(Yf).nullish(),tax_number:e.string().nullish(),tax_number_2:e.string().nullish(),company_number:e.string().nullish(),phone:e.string().nullish(),peppol_id:e.string().nullish(),is_end_consumer:e.boolean().nullish(),bank_account:e.object({type:e.enum(["iban","us_domestic","uk_domestic","other"]).default(Kf).describe("Account type determines which fields are used"),name:e.string().nullish().describe("Display name for this account. Falls back to account number if not set"),bank_name:e.string().nullish().describe("Bank name"),iban:e.string().nullish().describe("IBAN (for type=iban)"),account_number:e.string().nullish().describe("Account number (for us_domestic, uk_domestic, other)"),bic:e.string().nullish().describe("BIC/SWIFT code for international transfers"),routing_number:e.string().nullish().describe("US ABA routing number (for type=us_domestic)"),sort_code:e.string().nullish().describe("UK sort code (for type=uk_domestic)")}).nullish()}).describe("Document issuer (entity) information"),customer_id:e.string().max($f).nullish(),customer:e.object({name:e.string().nullish(),email:e.email().nullish(),address:e.string().nullish(),address_2:e.string().nullish(),post_code:e.string().nullish(),city:e.string().nullish(),state:e.string().nullish(),country:e.string().nullish(),country_code:e.string().min(Qf).max(Jf).nullish(),tax_number:e.string().nullish(),tax_number_2:e.string().nullish(),company_number:e.string().nullish(),phone:e.string().nullish(),peppol_id:e.string().nullish(),is_end_consumer:e.boolean().nullish(),bank_account:e.object({type:e.enum(["iban","us_domestic","uk_domestic","other"]).default(Zf).describe("Account type determines which fields are used"),name:e.string().nullish().describe("Display name for this account. Falls back to account number if not set"),bank_name:e.string().nullish().describe("Bank name"),iban:e.string().nullish().describe("IBAN (for type=iban)"),account_number:e.string().nullish().describe("Account number (for us_domestic, uk_domestic, other)"),bic:e.string().nullish().describe("BIC/SWIFT code for international transfers"),routing_number:e.string().nullish().describe("US ABA routing number (for type=us_domestic)"),sort_code:e.string().nullish().describe("UK sort code (for type=uk_domestic)")}).nullish()}).nullish().describe("Customer information"),note:e.string().nullish().describe("Note for the document. If not provided, defaults to entity's document-type-specific note setting. Pass empty string to explicitly set no note."),payment_terms:e.string().nullish().describe("Payment terms for the document. If not provided, defaults to entity's document-type-specific payment terms setting. Pass empty string to explicitly set no terms."),tax_clause:e.string().nullish().describe("Tax clause for the document. Auto-populated based on transaction type if tax_clause_defaults are configured in entity settings. Pass empty string to explicitly set no clause."),footer:e.string().max(Xf).nullish(),signature:e.string().nullish().describe("Signature text for the document (e.g. 'John Smith, CEO'). If not provided, defaults to entity's default_document_signature setting. Pass empty string to explicitly set no signature."),total:e.number().min(eR).max(tR),total_with_tax:e.number().min(oR).max(nR),total_discount:e.number().describe("Document discount total stored as a net-equivalent amount for compatibility. In `b2b_standard`, this is the net value of line-item discounts applied before tax. In `b2c_gross_discount`, gross discounts are converted back to their net-equivalent value here. 0 when no discounts applied."),creation_source:e.enum(["standard","custom"]).describe("Internal origin of the create request. `standard` means a normal create endpoint calculated the totals. `custom` means the document was created through a `/custom` endpoint."),calculation_mode:e.enum(["b2b_standard","b2c_gross_discount"]).describe("Resolved calculation mode used for this document. Stored on the document so recalculation and rendering remain stable even if entity defaults change later."),taxes:e.array(e.object({rate:e.number().nullable(),tax_id:e.string().nullish(),base:e.number(),amount:e.number(),reverse_charge:e.boolean().nullish()})).describe("Applied taxes summary"),currency_code:e.string().max(sR),entity_id:e.string().max(rR),date_year:e.number().min(iR).max(aR),shareable_id:e.string().max(dR).nullish(),voided_at:e.iso.datetime({}).nullish(),transaction_type:e.union([e.literal("domestic"),e.literal("intra_eu_b2b"),e.literal("intra_eu_b2c"),e.literal("3w_b2b"),e.literal("3w_b2c"),e.literal("export"),e.literal(null)]).nullish().describe("Transaction type for VAT purposes (domestic, intra_eu_b2b, intra_eu_b2c, export). Always determined based on issuer/customer countries."),metadata:e.record(e.string(),e.string()).nullish().describe("Custom key-value data for your own use. Store any JSON object up to 50 properties. Values must be strings up to 250 characters. Useful for storing external IDs, tags, or integration data."),exchange_rate:e.object({rate:e.number().describe("Exchange rate used for conversion"),source:e.string().describe("Source of the exchange rate (e.g., 'Frankfurter')"),date:e.iso.datetime({}).describe("Date of the exchange rate"),quote_currency:e.string().describe("Quote currency (the base currency converted to)")}).nullish().describe("Currency exchange rate information if conversion was applied"),total_converted:e.number().min(cR).max(lR).nullish(),total_with_tax_converted:e.number().min(uR).max(pR).nullish(),rounding_correction:e.number().nullish().describe("Rounding correction applied to reconcile differences between calculated total_with_tax and expected_total_with_tax. Only present when expected_total_with_tax was provided during creation."),eslog:e.object({validation_enabled:e.boolean().nullish().describe("Override entity default: true = validate, false = skip, null = use entity setting"),validation_status:e.union([e.literal("valid"),e.literal("invalid"),e.literal("not_validated"),e.literal(null)]).nullish().describe("Validation status: 'valid', 'invalid', or 'not_validated'"),validation_errors:e.array(e.string()).nullish().describe("Array of validation error messages (if status is 'invalid')"),validated_at:e.string().nullish().describe("ISO timestamp when validation was last performed")}).nullish().describe("e-SLOG 2.0 validation data for Slovenian electronic invoices. Only applicable when entity.country_code = 'SI' and eslog validation is enabled."),reference:e.string().nullish().describe("Custom reference for the document (e.g., purchase order number, payment reference). When set, used as the UPN payment reference instead of the auto-generated one."),vies:e.object({warning:e.string().nullable().describe("Warning message if VIES validation was unavailable or the VAT number was invalid. Document creation proceeds but this indicates the transaction type may need review."),skipped:e.boolean().nullable().describe("True when VIES validation was skipped due to entity settings (vies_validate_vat: false) but would normally apply. Used for audit trail.")}).nullish().describe("VIES validation info including any warnings and skipped indicator for audit trail"),deleted_at:e.iso.datetime({}).nullish().describe("Timestamp when the document was soft-deleted. Null if not deleted."),created_at:e.iso.datetime({}),updated_at:e.iso.datetime({}),hide_prices:e.boolean().describe("When true, prices and totals are hidden on the document (packing list mode)."),date_due:e.string().regex(mR).nullish().describe("Document due date in YYYY-MM-DD format"),date_service:e.string().regex(gR).nullish().describe("Service date in YYYY-MM-DD format. For invoices and credit notes."),date_service_to:e.string().regex(yR).nullish().describe("Service period end date in YYYY-MM-DD format. For invoices and credit notes. Use with date_service for date ranges."),items:e.array(e.object({id:e.string().max(hR),type:e.union([e.literal("separator"),e.literal(null)]).nullish().describe("Item type. null = regular line item, 'separator' = visual section header."),name:e.string().max(bR),description:e.string().nullable(),classification:e.union([e.literal("product"),e.literal("service"),e.literal("advance"),e.literal(null)]).nullish().describe("Item classification used for Portugal SAF-T product typing."),price:e.number().nullish().describe("Per-unit net price (before tax). Always stores net price. Null for separator items."),gross_price:e.number().nullish().describe(`Per-unit gross price (includes tax).
|
|
122
|
+
Only present if user originally sent gross price.
|
|
123
|
+
Use gross pricing to keep invoice totals stable when VIES reverse charge is applied.`),quantity:e.number().nullish().describe("Item quantity. Null for separator items."),unit:e.string().max(xR).nullish(),taxes:e.array(e.object({rate:e.number().nullish(),tax_id:e.string().nullish(),classification:e.string().nullish(),reverse_charge:e.boolean().nullish(),amount:e.number().nullish(),pt_exemption_code:e.string().nullish(),pt_exemption_reason:e.string().nullish()}).describe("Document Item Tax")).describe("Applied taxes (provide rate to create new tax, or tax_id to use existing tax)"),discounts:e.array(e.object({value:e.number().min(zR).describe("Discount value"),type:e.enum(["percent","amount"]).default(_R).describe("Discount type: 'percent' (default) or 'amount'")})).max(vR).describe("Line discounts (max 5) in request order. In `b2b_standard`, percentage discounts are calculated from the original line subtotal and fixed amounts are summed before tax. In `b2c_gross_discount`, discounts are applied sequentially to the running gross subtotal."),total:e.number().nullish().describe("Line total before tax. Null for separator items."),total_with_tax:e.number().nullish().describe("Line total after tax. Null for separator items."),total_converted:e.number().min(fR).max(RR).nullish(),total_with_tax_converted:e.number().min(IR).max(ER).nullish(),delivery_note_id:e.string().max(SR).nullish(),item_id:e.string().max(DR).nullish(),metadata:e.record(e.string(),e.string()).nullish().describe("Custom key-value data for your own use. Store any JSON object up to 50 properties. Values must be strings up to 250 characters. Useful for storing external IDs, tags, or integration data."),created_at:e.iso.datetime({}),updated_at:e.iso.datetime({})})),document_relations:e.array(e.object({id:e.string(),source_type:e.enum(["invoice","estimate","credit_note","advance_invoice","delivery_note"]).describe("Type of document"),source_id:e.string(),target_type:e.enum(["invoice","estimate","credit_note","advance_invoice","delivery_note"]).describe("Type of document"),target_id:e.string(),relation_type:e.string(),entity_id:e.string(),created_at:e.iso.datetime({}),linked_document_voided_at:e.iso.datetime({}).nullish(),related_document:e.object({id:e.string(),type:e.enum(["invoice","estimate","credit_note","advance_invoice","delivery_note"]).describe("Type of document"),number:e.string(),date:e.string(),total_with_tax:e.number(),currency_code:e.string(),is_draft:e.boolean(),voided_at:e.string().nullable(),paid_in_full:e.boolean().nullable(),title_type:e.union([e.literal("estimate"),e.literal("proforma_invoice"),e.literal(null)]).nullable(),hide_prices:e.boolean().nullable()}).optional()})).optional()}).describe("Delivery note / packing list document");var _e={};j(_e,{CalculateDocumentPreviewBody:()=>obe,CalculateDocumentPreviewHeader:()=>tbe,CalculateDocumentPreviewQueryParams:()=>ebe,CalculateDocumentPreviewResponse:()=>nbe,DeleteDocumentHeader:()=>ybe,DeleteDocumentParams:()=>mbe,DeleteDocumentQueryParams:()=>gbe,FinalizeDocumentBody:()=>abe,FinalizeDocumentHeader:()=>ibe,FinalizeDocumentParams:()=>sbe,FinalizeDocumentQueryParams:()=>rbe,FinalizeDocumentResponse:()=>dbe,FiscalizeDocumentHeader:()=>ube,FiscalizeDocumentParams:()=>cbe,FiscalizeDocumentQueryParams:()=>lbe,FiscalizeDocumentResponse:()=>pbe,GetNextDocumentNumberHeader:()=>Zhe,GetNextDocumentNumberQueryParams:()=>Jhe,GetNextDocumentNumberResponse:()=>Xhe,GetShareableIdHeader:()=>Abe,GetShareableIdParams:()=>Cbe,GetShareableIdResponse:()=>Mbe,PermanentDeleteDocumentHeader:()=>fbe,PermanentDeleteDocumentParams:()=>_be,PermanentDeleteDocumentQueryParams:()=>vbe,RestoreDocumentHeader:()=>xbe,RestoreDocumentParams:()=>hbe,RestoreDocumentQueryParams:()=>bbe,RestoreDocumentResponse:()=>zbe,SendDocumentBody:()=>Ebe,SendDocumentHeader:()=>Ibe,SendDocumentParams:()=>Rbe,SendDocumentResponse:()=>Sbe,ShareDocumentHeader:()=>Pbe,ShareDocumentParams:()=>Dbe,ShareDocumentResponse:()=>wbe,UnshareDocumentHeader:()=>kbe,UnshareDocumentParams:()=>Tbe,calculateDocumentPreviewBodyCustomerOneBankAccountTypeDefault:()=>OR,calculateDocumentPreviewBodyCustomerOneCountryCodeMax:()=>NR,calculateDocumentPreviewBodyCustomerOneCountryCodeMin:()=>BR,calculateDocumentPreviewBodyExpectedTotalWithTaxExclusiveMin:()=>FR,calculateDocumentPreviewBodyItemsItemDescriptionMax:()=>PR,calculateDocumentPreviewBodyItemsItemDiscountsItemTypeDefault:()=>TR,calculateDocumentPreviewBodyItemsItemDiscountsItemValueMin:()=>MR,calculateDocumentPreviewBodyItemsItemDiscountsMax:()=>kR,calculateDocumentPreviewBodyItemsItemQuantityMax:()=>CR,calculateDocumentPreviewBodyItemsItemQuantityMin:()=>wR,calculateDocumentPreviewBodyItemsItemUnitMax:()=>AR,calculateDocumentPreviewResponseItemsItemDiscountsItemTypeDefault:()=>jR,calculateDocumentPreviewResponseItemsItemDiscountsItemValueMin:()=>UR,finalizeDocumentBodyFinaBusinessPremiseNameMax:()=>qR,finalizeDocumentBodyFinaBusinessPremiseNameRegExp:()=>WR,finalizeDocumentBodyFinaElectronicDeviceNameMax:()=>GR,finalizeDocumentBodyFinaElectronicDeviceNameRegExp:()=>VR,finalizeDocumentBodyFinaOperatorOibMax:()=>HR,finalizeDocumentBodyFinaOperatorOibMin:()=>LR,getShareableIdPathIdRegExp:()=>ZR,sendDocumentBodyAttachEslogDefault:()=>$R,sendDocumentBodyAttachPdfDefault:()=>KR,sendDocumentBodySandboxSkipDeliveryDefault:()=>QR,sendDocumentBodySubjectMax:()=>YR,shareDocumentPathIdRegExp:()=>JR,unshareDocumentPathIdRegExp:()=>XR});var Jhe=e.object({type:e.enum(["invoice","estimate","credit_note","advance_invoice","delivery_note"]).describe("Document type"),business_premise_name:e.string().optional().describe("Business premise name (FURS or FINA). If provided with electronic_device_name, returns fiscalization-format number."),electronic_device_name:e.string().optional().describe("Electronic device name (FURS or FINA). Required if business_premise_name is provided. When provided, returns fiscalization-format number.")}),Zhe=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),Xhe=e.object({number:e.string().nullable().describe("Preview of the next document number. Null if cannot be determined."),furs:e.object({business_premise_name:e.string().describe("Business premise name used for this preview (Slovenia FURS)"),electronic_device_name:e.string().describe("Electronic device name used for this preview (Slovenia FURS)")}).nullish().describe("FURS (Slovenia) fiscalization info if FURS numbering was used. Null for standard numbering."),fina:e.object({business_premise_name:e.string().describe("Business premise name used for this preview (Croatia CIS)"),electronic_device_name:e.string().describe("Electronic device name used for this preview (Croatia CIS)")}).nullish().describe("FINA (Croatia) CIS fiscalization info if FINA is enabled. Null for standard numbering."),pt:e.object({series_id:e.string().describe("ATCUD series ID used for the PT preview."),series_code:e.string().describe("ATCUD series code used in the PT document number."),validation_code:e.string().describe("AT validation code for the selected PT series."),manual:e.boolean().optional().describe("Whether the PT preview uses a manual series.")}).nullish().describe("Portugal ATCUD preview info if PT numbering was used. Null for non-PT numbering.")}),ebe=e.object({type:e.enum(["invoice","estimate","credit_note","advance_invoice","delivery_note"]).describe("Document type")}),tbe=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),PR=2e3,wR=-140737488355328,CR=0x7fffffffffff,AR=50,MR=0,TR="percent",kR=5,BR=2,NR=2,OR="iban",FR=0,obe=e.object({items:e.array(e.object({type:e.union([e.literal("separator"),e.literal(null)]).nullish().describe(`Item type. Omit or null for regular line item, 'separator' for a visual section header.
|
|
124
|
+
Separator items only use name and description \u2014 all financial fields are ignored.`),name:e.string().min(1).nullish().describe("Item name. Required unless `item_id` is provided.\nFor separator items, this is the section title (always required)."),description:e.string().max(PR).nullish(),classification:e.union([e.literal("product"),e.literal("service"),e.literal("advance"),e.literal(null)]).nullish().describe("Item classification used for Portugal SAF-T product typing."),price:e.number().nullish().describe("Net price per unit (before tax).\nProvide either `price` OR `gross_price`, not both.\nOptional if `item_id` is provided. Ignored for separator items."),gross_price:e.number().nullish().describe("Gross price per unit (includes tax).\nIf provided, net price is calculated.\nProvide either `price` OR `gross_price`, not both.\nOptional if `item_id` is provided. Ignored for separator items."),quantity:e.number().min(wR).max(CR).nullish().describe("Item quantity. Required for regular items. Ignored for separator items."),unit:e.string().max(AR).nullish(),taxes:e.array(e.object({rate:e.number().nullish(),tax_id:e.string().nullish(),classification:e.string().nullish(),reverse_charge:e.boolean().nullish(),amount:e.number().nullish(),pt_exemption_code:e.string().nullish(),pt_exemption_reason:e.string().nullish()}).describe("Document Item Tax")).optional().describe("Applied taxes (provide rate to create new tax, or tax_id to use existing tax)"),discounts:e.array(e.object({value:e.number().min(MR).describe("Discount value"),type:e.enum(["percent","amount"]).default(TR).describe("Discount type: 'percent' (default) or 'amount'")})).max(kR).optional().describe("Line discounts (max 5) in request order. In `b2b_standard`, percentage discounts are calculated from the original line subtotal and fixed amounts are summed before tax. In `b2c_gross_discount`, discounts are applied sequentially to the running gross subtotal."),item_id:e.string().nullish().describe(`ID of a catalog item to prefill from.
|
|
125
|
+
When provided, the item's name, description, price, and taxes are used as defaults.
|
|
126
|
+
Any field you provide will override the catalog item's value.
|
|
127
|
+
Not applicable for separator items.`),metadata:e.record(e.string(),e.string()).nullish().describe("Custom key-value data for your own use. Store any JSON object up to 50 properties. Values must be strings up to 250 characters. Useful for storing external IDs, tags, or integration data."),save_item:e.boolean().nullish().describe(`Whether to save this item to the catalog.
|
|
128
|
+
When true without item_id, matches by exact name and reuses existing, or creates a new catalog item.
|
|
129
|
+
Defaults to true (best-effort). When omitted, behaves like true but won't fail the request if persistence fails.`)})).min(1).describe("Document line items to calculate. At least one item is required."),customer:e.object({name:e.string().nullish(),email:e.email().nullish(),address:e.string().nullish(),address_2:e.string().nullish(),post_code:e.string().nullish(),city:e.string().nullish(),state:e.string().nullish(),country:e.string().nullish(),country_code:e.string().min(BR).max(NR).nullish(),tax_number:e.string().nullish(),tax_number_2:e.string().nullish(),company_number:e.string().nullish(),phone:e.string().nullish(),peppol_id:e.string().nullish(),is_end_consumer:e.boolean().nullish(),bank_account:e.object({type:e.enum(["iban","us_domestic","uk_domestic","other"]).default(OR).describe("Account type determines which fields are used"),name:e.string().nullish().describe("Display name for this account. Falls back to account number if not set"),bank_name:e.string().nullish().describe("Bank name"),iban:e.string().nullish().describe("IBAN (for type=iban)"),account_number:e.string().nullish().describe("Account number (for us_domestic, uk_domestic, other)"),bic:e.string().nullish().describe("BIC/SWIFT code for international transfers"),routing_number:e.string().nullish().describe("US ABA routing number (for type=us_domestic)"),sort_code:e.string().nullish().describe("UK sort code (for type=uk_domestic)")}).nullish()}).describe("Document issuer (entity) information").and(e.object({save_customer:e.boolean().nullish().describe("Whether to save (create new or update existing) the customer data.\nDefaults to `true` (best-effort).\nWhen `true` with `customer_id`, updates the existing customer.\nWhen `true` without `customer_id`, checks for duplicate customers using customer identifiers (tax/company number, country-aware when available) and reuses the existing customer if found, otherwise creates a new customer.\nWhen `false`, customer data is stored inline on the document only.\nWhen omitted, behaves like `true` but won't fail the request if persistence fails.")}).nullable()).optional().describe("Customer data. Used for transaction type determination (country-based VAT rules)."),customer_id:e.string().nullish().describe("Existing customer ID. Alternative to inline customer data."),currency_code:e.string().nullish().describe("Currency code (ISO 4217). Defaults to entity's currency if not provided."),date:e.string().nullish().describe("Document date (YYYY-MM-DD). Used for tax rate date resolution. Defaults to today."),calculation_mode:e.union([e.literal("b2b_standard"),e.literal("b2c_gross_discount"),e.literal(null)]).nullish().describe("Optional calculation mode override. When omitted, the entity default is used and falls back to `b2b_standard`."),expected_total_with_tax:e.number().gt(FR).nullish().describe("Expected total with tax. When provided, the system calculates a rounding_correction to reconcile differences between the calculated total and this expected value. Maximum allowed correction is \xB11.00. Useful when importing invoices from external systems with different rounding rules.")}),UR=0,jR="percent",nbe=e.object({items:e.array(e.object({name:e.string().nullable(),description:e.string().nullable(),type:e.union([e.literal("separator"),e.literal(null)]).nullable(),price:e.number().nullable().describe("Per-unit net price (before tax)"),gross_price:e.number().nullable().describe("Per-unit gross price (includes tax)"),quantity:e.number().nullable(),unit:e.string().nullable(),taxes:e.array(e.object({rate:e.number().nullish(),tax_id:e.string().nullish(),classification:e.string().nullish(),reverse_charge:e.boolean().nullish(),amount:e.number().nullish(),pt_exemption_code:e.string().nullish(),pt_exemption_reason:e.string().nullish()}).describe("Document Item Tax")),discounts:e.array(e.object({value:e.number().min(UR).describe("Discount value"),type:e.enum(["percent","amount"]).default(jR).describe("Discount type: 'percent' (default) or 'amount'")})),total:e.number().nullable().describe("Line total before tax"),total_with_tax:e.number().nullable().describe("Line total after tax"),total_converted:e.number().nullable().describe("Line total before tax in entity currency"),total_with_tax_converted:e.number().nullable().describe("Line total after tax in entity currency")})).describe("Calculated line items"),total:e.number().describe("Document total before tax"),total_with_tax:e.number().describe("Document total after tax"),total_discount:e.number().describe("Document discount total stored as a net-equivalent amount for compatibility. In `b2b_standard`, this is the net value of line-item discounts applied before tax. In `b2c_gross_discount`, gross discounts are converted back to their net-equivalent value here."),calculation_mode:e.enum(["b2b_standard","b2c_gross_discount"]).describe("Resolved calculation mode used for the preview after applying the request override or entity default."),taxes:e.array(e.object({rate:e.number().nullable(),tax_id:e.string().nullish(),base:e.number(),amount:e.number(),reverse_charge:e.boolean().nullish()})).describe("Aggregated tax summary"),transaction_type:e.union([e.literal("domestic"),e.literal("intra_eu_b2b"),e.literal("intra_eu_b2c"),e.literal("3w_b2b"),e.literal("3w_b2c"),e.literal("export"),e.literal(null)]).nullable().describe("Transaction type for VAT purposes. Always determined based on issuer/customer countries, regardless of VIES settings."),currency_code:e.string().describe("Currency code used for calculation"),exchange_rate:e.object({rate:e.number().describe("Exchange rate used for conversion"),source:e.string().describe("Source of the exchange rate (e.g., 'Frankfurter')"),date:e.iso.datetime({}).describe("Date of the exchange rate"),quote_currency:e.string().describe("Quote currency (the base currency converted to)")}).nullable().describe("Currency exchange rate information if conversion was applied").and(e.unknown().describe("Exchange rate if currency conversion was applied")),total_converted:e.number().nullable().describe("Document total in entity currency"),total_with_tax_converted:e.number().nullable().describe("Document total with tax in entity currency"),rounding_correction:e.number().nullable().describe("Rounding correction applied when expected_total_with_tax was provided"),vies:e.object({warning:e.string().nullable().describe("Warning message if VIES validation was unavailable or the VAT number was invalid. Document creation proceeds but this indicates the transaction type may need review."),skipped:e.boolean().nullable().describe("True when VIES validation was skipped due to entity settings (vies_validate_vat: false) but would normally apply. Used for audit trail.")}).nullable().describe("VIES validation info including any warnings and skipped indicator for audit trail")}),sbe=e.object({id:e.string().describe("Document ID")}),rbe=e.object({type:e.enum(["invoice","estimate","credit_note","advance_invoice","delivery_note"]).optional().describe("Document type. Optional \u2014 automatically inferred from the document ID prefix.")}),ibe=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),qR=20,WR=/^[0-9a-zA-Z]{1,20}$/,GR=20,VR=/^\d{1,20}$/,LR=11,HR=11,abe=e.object({furs:e.object({business_premise_name:e.string().min(1).nullish().describe("FURS business premise name (e.g., 'P1', 'STORE1'). Required unless skip=true."),electronic_device_name:e.string().min(1).nullish().describe("FURS electronic device name (e.g., 'E1', 'POS1'). Required unless skip=true."),operator_tax_number:e.string().nullish().describe("Operator tax number. If not provided and using user authentication, defaults to user's FURS settings."),operator_label:e.string().nullish().describe("Operator label/name. If not provided and using user authentication, defaults to user's FURS settings."),skip:e.boolean().nullish().describe("Skip FURS fiscalization. Only allowed for bank transfer payments or unpaid invoices. Cash/card/check payments always require fiscalization per Slovenian law.")}).nullish(),fina:e.object({business_premise_name:e.string().min(1).max(qR).regex(WR).nullish().describe("CIS business premise name (OznPosPr, alphanumeric, 1-20 chars). Required when CIS is enabled."),electronic_device_name:e.string().min(1).max(GR).regex(VR).nullish().describe("CIS electronic device name (OznNapUr, digits only, 1-20 chars). Required when CIS is enabled."),operator_oib:e.string().min(LR).max(HR).nullish().describe("Operator OIB (11 digits). If not provided and using user authentication, defaults to the user's FINA settings. Otherwise falls back to entity settings."),operator_label:e.string().nullish().describe("Operator label/name. If not provided and using user authentication, defaults to the user's FINA settings. Otherwise falls back to entity settings."),payment_type:e.union([e.literal("cash"),e.literal("card"),e.literal("online"),e.literal("bank_transfer"),e.literal("paypal"),e.literal("crypto"),e.literal("coupon"),e.literal("other"),e.literal(null)]).nullish().describe("Expected payment method for CIS (NacinPlac field). Optional when document payments are provided because the API derives it from the document payments; when multiple payments are present, FINA uses 'other'."),subsequent_submit:e.boolean().nullish().describe("Late/subsequent submission flag (NakDost). Set to true if submitting after the normal deadline.")}).nullish()}),dbe=e.unknown(),cbe=e.object({id:e.string().describe("Document ID")}),lbe=e.object({type:e.enum(["invoice","estimate","credit_note","advance_invoice","delivery_note"]).optional().describe("Document type. Optional \u2014 automatically inferred from the document ID prefix.")}),ube=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),pbe=e.unknown(),mbe=e.object({id:e.string().describe("Document ID")}),gbe=e.object({type:e.enum(["invoice","estimate","credit_note","advance_invoice","delivery_note"]).optional().describe("Document type. Optional \u2014 automatically inferred from the document ID prefix.")}),ybe=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),hbe=e.object({id:e.string().describe("Document ID")}),bbe=e.object({type:e.enum(["invoice","estimate","credit_note","advance_invoice","delivery_note"]).optional().describe("Document type. Optional \u2014 automatically inferred from the document ID prefix.")}),xbe=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),zbe=e.unknown(),_be=e.object({id:e.string().describe("Document ID")}),vbe=e.object({type:e.enum(["invoice","estimate","credit_note","advance_invoice","delivery_note"]).optional().describe("Document type. Optional \u2014 automatically inferred from the document ID prefix.")}),fbe=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),Rbe=e.object({id:e.string().describe("Document ID")}),Ibe=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),YR=255,KR=false,$R=false,QR=false,Ebe=e.object({to:e.email().describe("Recipient email address"),subject:e.string().min(1).max(YR).optional().describe("Email subject line. If not provided, uses default from entity settings."),body_text:e.string().min(1).optional().describe("Email body text with optional markdown formatting and template variables ({document_number}, {customer_name}, {entity_name}, {invoice_link})."),attach_pdf:e.boolean().default(KR).describe("Whether to attach the document as a PDF."),attach_eslog:e.boolean().default($R).describe("Whether to attach the document as e-SLOG 2.0 XML (Slovenian only)."),sandbox_skip_delivery:e.boolean().default(QR).describe("Sandbox only. Build and validate the document email send flow without actually delivering the email.")}),Sbe=e.object({message_id:e.string().describe("AWS SES message ID for tracking"),status:e.enum(["sent","queued","skipped"]).describe("Email send status"),to:e.email().describe("Recipient email address"),subject:e.string().describe("Email subject"),shareable_link:e.url().optional().describe("Public URL for viewing the invoice online (if document_id was provided)"),sandbox_skip_delivery:e.boolean().optional().describe("True when sandbox testing used the send flow without delivering the email.")}),JR=/^[a-z]{3,4}_[0-9a-f]{24}$/,Dbe=e.object({id:e.stringFormat("resource-id",JR).describe("Unique resource identifier")}),Pbe=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),wbe=e.object({shareable_id:e.string().describe("Unique shareable token for public document access")}).describe("Response containing a shareable ID token"),ZR=/^[a-z]{3,4}_[0-9a-f]{24}$/,Cbe=e.object({id:e.stringFormat("resource-id",ZR).describe("Unique resource identifier")}),Abe=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),Mbe=e.object({shareable_id:e.string().describe("Unique shareable token for public document access")}).describe("Response containing a shareable ID token"),XR=/^[a-z]{3,4}_[0-9a-f]{24}$/,Tbe=e.object({id:e.stringFormat("resource-id",XR).describe("Unique resource identifier")}),kbe=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")});var ve={};j(ve,{GetEInvoicingSettingsHeader:()=>Bbe,GetEInvoicingSettingsResponse:()=>Nbe,GetEInvoicingSubmissionHeader:()=>nxe,GetEInvoicingSubmissionParams:()=>oxe,GetEInvoicingSubmissionResponse:()=>sxe,GetEInvoicingSupplierHeader:()=>Wbe,GetEInvoicingSupplierResponse:()=>Gbe,HandleFlowinWebhookBody:()=>dxe,ListEInvoicingSubmissionsHeader:()=>exe,ListEInvoicingSubmissionsQueryParams:()=>Xbe,ListEInvoicingSubmissionsResponse:()=>txe,RegisterEInvoicingSupplierBody:()=>qbe,RegisterEInvoicingSupplierHeader:()=>jbe,RetryEInvoicingSubmissionHeader:()=>ixe,RetryEInvoicingSubmissionParams:()=>rxe,RetryEInvoicingSubmissionResponse:()=>axe,SearchEInvoicingCustomerBody:()=>Kbe,SearchEInvoicingCustomerHeader:()=>Ybe,SearchEInvoicingCustomerResponse:()=>$be,SendEInvoiceBody:()=>Zbe,SendEInvoiceHeader:()=>Jbe,SendEInvoiceParams:()=>Qbe,UpdateEInvoicingSettingsBody:()=>Fbe,UpdateEInvoicingSettingsHeader:()=>Obe,UpdateEInvoicingSettingsResponse:()=>Ube,UpdateEInvoicingSupplierBody:()=>Lbe,UpdateEInvoicingSupplierHeader:()=>Vbe,UpdateEInvoicingSupplierResponse:()=>Hbe,getEInvoicingSubmissionPathIdRegExp:()=>E0,getEInvoicingSubmissionResponseDocumentIdMax:()=>C0,getEInvoicingSubmissionResponseDocumentTypeMax:()=>A0,getEInvoicingSubmissionResponseEntityIdMax:()=>D0,getEInvoicingSubmissionResponseEnvironmentMax:()=>w0,getEInvoicingSubmissionResponseFlowinDocumentIdMax:()=>M0,getEInvoicingSubmissionResponseIdMax:()=>S0,getEInvoicingSubmissionResponseMetadataDefault:()=>F0,getEInvoicingSubmissionResponseRecipientNameMax:()=>N0,getEInvoicingSubmissionResponseRecipientPeppolIdMax:()=>k0,getEInvoicingSubmissionResponseRecipientSchemeIdMax:()=>B0,getEInvoicingSubmissionResponseStatusMax:()=>O0,getEInvoicingSubmissionResponseSupplierIdMax:()=>P0,getEInvoicingSubmissionResponseTransmissionIdMax:()=>T0,getEInvoicingSupplierResponseAddressMax:()=>II,getEInvoicingSupplierResponseCityMax:()=>EI,getEInvoicingSupplierResponseCompanyNameMax:()=>_I,getEInvoicingSupplierResponseCompanyNumberMax:()=>fI,getEInvoicingSupplierResponseContactEmailMax:()=>PI,getEInvoicingSupplierResponseContactPhoneMax:()=>wI,getEInvoicingSupplierResponseCountryCodeMax:()=>DI,getEInvoicingSupplierResponseEntityIdMax:()=>mI,getEInvoicingSupplierResponseEnvironmentMax:()=>gI,getEInvoicingSupplierResponseFlowinSupplierIdMax:()=>yI,getEInvoicingSupplierResponseIbanMax:()=>RI,getEInvoicingSupplierResponseIdMax:()=>pI,getEInvoicingSupplierResponseMetadataDefault:()=>CI,getEInvoicingSupplierResponsePeppolParticipantIdMax:()=>xI,getEInvoicingSupplierResponsePeppolSchemeIdMax:()=>zI,getEInvoicingSupplierResponsePostCodeMax:()=>SI,getEInvoicingSupplierResponseProviderMax:()=>hI,getEInvoicingSupplierResponseStatusMax:()=>bI,getEInvoicingSupplierResponseVatNumberMax:()=>vI,listEInvoicingSubmissionsQueryLimitDefault:()=>l0,listEInvoicingSubmissionsQueryLimitMax:()=>u0,listEInvoicingSubmissionsResponseDataItemDocumentIdMax:()=>h0,listEInvoicingSubmissionsResponseDataItemDocumentTypeMax:()=>b0,listEInvoicingSubmissionsResponseDataItemEntityIdMax:()=>m0,listEInvoicingSubmissionsResponseDataItemEnvironmentMax:()=>y0,listEInvoicingSubmissionsResponseDataItemFlowinDocumentIdMax:()=>x0,listEInvoicingSubmissionsResponseDataItemIdMax:()=>p0,listEInvoicingSubmissionsResponseDataItemMetadataDefault:()=>I0,listEInvoicingSubmissionsResponseDataItemRecipientNameMax:()=>f0,listEInvoicingSubmissionsResponseDataItemRecipientPeppolIdMax:()=>_0,listEInvoicingSubmissionsResponseDataItemRecipientSchemeIdMax:()=>v0,listEInvoicingSubmissionsResponseDataItemStatusMax:()=>R0,listEInvoicingSubmissionsResponseDataItemSupplierIdMax:()=>g0,listEInvoicingSubmissionsResponseDataItemTransmissionIdMax:()=>z0,registerEInvoicingSupplierBodyAddressMax:()=>rI,registerEInvoicingSupplierBodyCityMax:()=>iI,registerEInvoicingSupplierBodyCompanyNameMax:()=>tI,registerEInvoicingSupplierBodyCompanyNumberMax:()=>nI,registerEInvoicingSupplierBodyContactEmailMax:()=>lI,registerEInvoicingSupplierBodyContactPhoneMax:()=>uI,registerEInvoicingSupplierBodyCountryCodeMax:()=>cI,registerEInvoicingSupplierBodyCountryCodeMin:()=>dI,registerEInvoicingSupplierBodyIbanMax:()=>sI,registerEInvoicingSupplierBodyPostCodeMax:()=>aI,registerEInvoicingSupplierBodyVatNumberMax:()=>oI,retryEInvoicingSubmissionPathIdRegExp:()=>U0,retryEInvoicingSubmissionResponseDocumentIdMax:()=>V0,retryEInvoicingSubmissionResponseDocumentTypeMax:()=>L0,retryEInvoicingSubmissionResponseEntityIdMax:()=>q0,retryEInvoicingSubmissionResponseEnvironmentMax:()=>G0,retryEInvoicingSubmissionResponseFlowinDocumentIdMax:()=>H0,retryEInvoicingSubmissionResponseIdMax:()=>j0,retryEInvoicingSubmissionResponseMetadataDefault:()=>Z0,retryEInvoicingSubmissionResponseRecipientNameMax:()=>Q0,retryEInvoicingSubmissionResponseRecipientPeppolIdMax:()=>K0,retryEInvoicingSubmissionResponseRecipientSchemeIdMax:()=>$0,retryEInvoicingSubmissionResponseStatusMax:()=>J0,retryEInvoicingSubmissionResponseSupplierIdMax:()=>W0,retryEInvoicingSubmissionResponseTransmissionIdMax:()=>Y0,searchEInvoicingCustomerBodySchemeIdMax:()=>a0,sendEInvoiceBodyRecipientNameMax:()=>c0,sendEInvoiceBodyRecipientSchemeIdMax:()=>d0,updateEInvoicingSettingsBodyDefaultSchemeIdMax:()=>eI,updateEInvoicingSupplierBodyAddressMax:()=>BI,updateEInvoicingSupplierBodyCityMax:()=>NI,updateEInvoicingSupplierBodyCompanyNameMax:()=>AI,updateEInvoicingSupplierBodyCompanyNumberMax:()=>TI,updateEInvoicingSupplierBodyContactEmailMax:()=>jI,updateEInvoicingSupplierBodyContactPhoneMax:()=>qI,updateEInvoicingSupplierBodyCountryCodeMax:()=>UI,updateEInvoicingSupplierBodyCountryCodeMin:()=>FI,updateEInvoicingSupplierBodyIbanMax:()=>kI,updateEInvoicingSupplierBodyPostCodeMax:()=>OI,updateEInvoicingSupplierBodyVatNumberMax:()=>MI,updateEInvoicingSupplierResponseAddressMax:()=>e0,updateEInvoicingSupplierResponseCityMax:()=>t0,updateEInvoicingSupplierResponseCompanyNameMax:()=>QI,updateEInvoicingSupplierResponseCompanyNumberMax:()=>ZI,updateEInvoicingSupplierResponseContactEmailMax:()=>s0,updateEInvoicingSupplierResponseContactPhoneMax:()=>r0,updateEInvoicingSupplierResponseCountryCodeMax:()=>n0,updateEInvoicingSupplierResponseEntityIdMax:()=>GI,updateEInvoicingSupplierResponseEnvironmentMax:()=>VI,updateEInvoicingSupplierResponseFlowinSupplierIdMax:()=>LI,updateEInvoicingSupplierResponseIbanMax:()=>XI,updateEInvoicingSupplierResponseIdMax:()=>WI,updateEInvoicingSupplierResponseMetadataDefault:()=>i0,updateEInvoicingSupplierResponsePeppolParticipantIdMax:()=>KI,updateEInvoicingSupplierResponsePeppolSchemeIdMax:()=>$I,updateEInvoicingSupplierResponsePostCodeMax:()=>o0,updateEInvoicingSupplierResponseProviderMax:()=>HI,updateEInvoicingSupplierResponseStatusMax:()=>YI,updateEInvoicingSupplierResponseVatNumberMax:()=>JI});var Bbe=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),Nbe=e.object({enabled:e.boolean(),provider:e.string(),auto_send:e.boolean(),default_scheme_id:e.string().optional()}).describe("Current e-invoicing settings for the entity"),Obe=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),eI=10,Fbe=e.object({enabled:e.boolean().optional().describe("Enable or disable e-invoicing for this entity"),auto_send:e.boolean().optional().describe("Automatically send invoices via e-invoice after creation"),default_scheme_id:e.string().max(eI).optional().describe("Default Peppol participant scheme ID")}).describe("Update e-invoicing settings for the entity"),Ube=e.object({enabled:e.boolean(),provider:e.string(),auto_send:e.boolean(),default_scheme_id:e.string().optional()}).describe("Current e-invoicing settings for the entity"),jbe=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),tI=255,oI=50,nI=50,sI=50,rI=500,iI=100,aI=20,dI=2,cI=2,lI=255,uI=50,qbe=e.object({company_name:e.string().min(1).max(tI).describe("Legal company name as registered"),vat_number:e.string().max(oI).optional().describe("VAT identification number"),company_number:e.string().max(nI).optional().describe("Company registration number (e.g., SIRET for France)"),iban:e.string().max(sI).optional().describe("Bank account IBAN"),address:e.string().max(rI).optional().describe("Street address"),city:e.string().max(iI).optional().describe("City"),post_code:e.string().max(aI).optional().describe("Postal code"),country_code:e.string().min(dI).max(cI).describe("ISO 3166-1 alpha-2 country code"),contact_email:e.email().max(lI).optional().describe("Contact email for KYC communication"),contact_phone:e.string().max(uI).optional().describe("Contact phone number")}).describe("Register a supplier for e-invoicing onboarding (starts KYC process)"),Wbe=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),pI=36,mI=36,gI=20,yI=255,hI=50,bI=50,xI=255,zI=10,_I=255,vI=50,fI=50,RI=50,II=500,EI=100,SI=20,DI=2,PI=255,wI=50,CI={},Gbe=e.object({id:e.string().max(pI),entity_id:e.string().max(mI),environment:e.string().max(gI),flowin_supplier_id:e.string().max(yI).nullish(),provider:e.string().max(hI),status:e.string().max(bI),reject_reason:e.string().nullish(),peppol_registered:e.boolean().nullish(),peppol_participant_id:e.string().max(xI).nullish(),peppol_scheme_id:e.string().max(zI).nullish(),company_name:e.string().max(_I),vat_number:e.string().max(vI).nullish(),company_number:e.string().max(fI).nullish(),iban:e.string().max(RI).nullish(),address:e.string().max(II).nullish(),city:e.string().max(EI).nullish(),post_code:e.string().max(SI).nullish(),country_code:e.string().max(DI),contact_email:e.string().max(PI).nullish(),contact_phone:e.string().max(wI).nullish(),kyc_id_document_url:e.string().nullish(),kyc_business_register_url:e.string().nullish(),metadata:e.record(e.string(),e.unknown()).default(CI),onboarded_at:e.iso.datetime({}).nullish(),created_at:e.iso.datetime({}),updated_at:e.iso.datetime({})}).describe("E-invoicing supplier registration (Flowin/Peppol onboarding status)"),Vbe=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),AI=255,MI=50,TI=50,kI=50,BI=500,NI=100,OI=20,FI=2,UI=2,jI=255,qI=50,Lbe=e.object({company_name:e.string().min(1).max(AI).optional(),vat_number:e.string().max(MI).optional(),company_number:e.string().max(TI).optional(),iban:e.string().max(kI).optional(),address:e.string().max(BI).optional(),city:e.string().max(NI).optional(),post_code:e.string().max(OI).optional(),country_code:e.string().min(FI).max(UI).optional(),contact_email:e.email().max(jI).optional(),contact_phone:e.string().max(qI).optional()}).describe("Update supplier onboarding data"),WI=36,GI=36,VI=20,LI=255,HI=50,YI=50,KI=255,$I=10,QI=255,JI=50,ZI=50,XI=50,e0=500,t0=100,o0=20,n0=2,s0=255,r0=50,i0={},Hbe=e.object({id:e.string().max(WI),entity_id:e.string().max(GI),environment:e.string().max(VI),flowin_supplier_id:e.string().max(LI).nullish(),provider:e.string().max(HI),status:e.string().max(YI),reject_reason:e.string().nullish(),peppol_registered:e.boolean().nullish(),peppol_participant_id:e.string().max(KI).nullish(),peppol_scheme_id:e.string().max($I).nullish(),company_name:e.string().max(QI),vat_number:e.string().max(JI).nullish(),company_number:e.string().max(ZI).nullish(),iban:e.string().max(XI).nullish(),address:e.string().max(e0).nullish(),city:e.string().max(t0).nullish(),post_code:e.string().max(o0).nullish(),country_code:e.string().max(n0),contact_email:e.string().max(s0).nullish(),contact_phone:e.string().max(r0).nullish(),kyc_id_document_url:e.string().nullish(),kyc_business_register_url:e.string().nullish(),metadata:e.record(e.string(),e.unknown()).default(i0),onboarded_at:e.iso.datetime({}).nullish(),created_at:e.iso.datetime({}),updated_at:e.iso.datetime({})}).describe("E-invoicing supplier registration (Flowin/Peppol onboarding status)"),Ybe=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),a0=10,Kbe=e.object({peppol_id:e.string().min(1).describe("Peppol participant ID to search for"),scheme_id:e.string().min(1).max(a0).describe("Peppol scheme ID")}).describe("Search for a customer on the Peppol network"),$be=e.object({data:e.array(e.object({peppol_id:e.string(),scheme_id:e.string(),name:e.string().optional(),country_code:e.string().optional(),registered:e.boolean()}).describe("Peppol customer search result"))}),Qbe=e.object({documentType:e.enum(["invoice","credit_note"]).describe("Type of document to send"),documentId:e.string().min(1).describe("Document ID")}),Jbe=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),d0=10,c0=255,Zbe=e.object({recipient_peppol_id:e.string().min(1).describe("Recipient's Peppol participant ID"),recipient_scheme_id:e.string().min(1).max(d0).describe("Recipient's Peppol scheme ID"),recipient_name:e.string().max(c0).optional().describe("Recipient name (for display purposes)")}).describe("Send a document as an e-invoice via Peppol"),l0=10,u0=100,Xbe=e.object({limit:e.number().min(1).max(u0).default(l0).describe("Number of results per request."),next_cursor:e.string().optional().describe("Opaque cursor to fetch the next page of results. Reuse only with the same effective ordering. Use the value from pagination.next_cursor in the previous response."),prev_cursor:e.string().optional().describe("Opaque cursor to fetch the previous page of results. Reuse only with the same effective ordering. Use the value from pagination.prev_cursor in the previous response."),include_total_count:e.boolean().optional().describe("Whether to include the total count of items in `pagination.total`.\nDefault is `true`.\nWhen `false`, `pagination.total` returns -1 for better performance.")}),exe=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),p0=36,m0=36,g0=36,y0=20,h0=36,b0=20,x0=255,z0=255,_0=255,v0=10,f0=255,R0=50,I0={},txe=e.object({data:e.array(e.object({id:e.string().max(p0),entity_id:e.string().max(m0),supplier_id:e.string().max(g0),environment:e.string().max(y0),document_id:e.string().max(h0),document_type:e.string().max(b0),flowin_document_id:e.string().max(x0).nullish(),transmission_id:e.string().max(z0).nullish(),recipient_peppol_id:e.string().max(_0).nullish(),recipient_scheme_id:e.string().max(v0).nullish(),recipient_name:e.string().max(f0).nullish(),status:e.string().max(R0),error_message:e.string().nullish(),metadata:e.record(e.string(),e.unknown()).default(I0),submitted_at:e.iso.datetime({}).nullish(),delivered_at:e.iso.datetime({}).nullish(),created_at:e.iso.datetime({}),updated_at:e.iso.datetime({})}).describe("E-invoice submission status (document sent via Peppol)")),pagination:e.object({total:e.number().describe("Total number of items available in the collection"),next_cursor:e.string().nullable().describe("Opaque cursor for fetching the next page. It encodes the resolved sort tuple for the current result set, so reuse it only with the same effective ordering. Null if no more results are available."),prev_cursor:e.string().nullable().describe("Opaque cursor for fetching the previous page. It encodes the resolved sort tuple for the current result set, so reuse it only with the same effective ordering. Null if at the first page."),has_more:e.boolean().describe("Indicates whether more results are available after the current page")}).describe("Pagination metadata including cursors and result counts")}),E0=/^[a-z]{3,4}_[0-9a-f]{24}$/,oxe=e.object({id:e.stringFormat("resource-id",E0).describe("Unique resource identifier")}),nxe=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),S0=36,D0=36,P0=36,w0=20,C0=36,A0=20,M0=255,T0=255,k0=255,B0=10,N0=255,O0=50,F0={},sxe=e.object({id:e.string().max(S0),entity_id:e.string().max(D0),supplier_id:e.string().max(P0),environment:e.string().max(w0),document_id:e.string().max(C0),document_type:e.string().max(A0),flowin_document_id:e.string().max(M0).nullish(),transmission_id:e.string().max(T0).nullish(),recipient_peppol_id:e.string().max(k0).nullish(),recipient_scheme_id:e.string().max(B0).nullish(),recipient_name:e.string().max(N0).nullish(),status:e.string().max(O0),error_message:e.string().nullish(),ubl_xml:e.string().nullish(),metadata:e.record(e.string(),e.unknown()).default(F0),submitted_at:e.iso.datetime({}).nullish(),delivered_at:e.iso.datetime({}).nullish(),created_at:e.iso.datetime({}),updated_at:e.iso.datetime({})}).describe("E-invoice submission detail (includes UBL XML)"),U0=/^[a-z]{3,4}_[0-9a-f]{24}$/,rxe=e.object({id:e.stringFormat("resource-id",U0).describe("Unique resource identifier")}),ixe=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),j0=36,q0=36,W0=36,G0=20,V0=36,L0=20,H0=255,Y0=255,K0=255,$0=10,Q0=255,J0=50,Z0={},axe=e.object({id:e.string().max(j0),entity_id:e.string().max(q0),supplier_id:e.string().max(W0),environment:e.string().max(G0),document_id:e.string().max(V0),document_type:e.string().max(L0),flowin_document_id:e.string().max(H0).nullish(),transmission_id:e.string().max(Y0).nullish(),recipient_peppol_id:e.string().max(K0).nullish(),recipient_scheme_id:e.string().max($0).nullish(),recipient_name:e.string().max(Q0).nullish(),status:e.string().max(J0),error_message:e.string().nullish(),metadata:e.record(e.string(),e.unknown()).default(Z0),submitted_at:e.iso.datetime({}).nullish(),delivered_at:e.iso.datetime({}).nullish(),created_at:e.iso.datetime({}),updated_at:e.iso.datetime({})}).describe("E-invoice submission status (document sent via Peppol)"),dxe=e.record(e.string(),e.unknown());var fe={};j(fe,{SendEmailBody:()=>lxe,SendEmailHeader:()=>cxe,SendEmailResponse:()=>uxe,sendEmailBodyAttachEslogDefault:()=>tE,sendEmailBodyAttachPdfDefault:()=>eE,sendEmailBodySandboxSkipDeliveryDefault:()=>oE,sendEmailBodySubjectMax:()=>X0});var cxe=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),X0=255,eE=false,tE=false,oE=false,lxe=e.object({to:e.email().describe("Recipient email address"),subject:e.string().min(1).max(X0).optional().describe("Email subject line. If not provided, uses default from entity settings or a generated subject."),body_text:e.string().min(1).optional().describe("Email body. Supports markdown formatting (**bold**, *italic*, `code`, [links](url), lists, headers). Plain text works fine too! Images and HTML tags are skipped for security. Supports template variables like {document_number}, {customer_name}, {entity_name}, and {invoice_link} for the public invoice URL. If {invoice_link} is not present, defaults to appending 'View your invoice online: {url}' at the bottom."),document_id:e.string().nullish().describe("ID of the document (invoice, etc.) to reference for sharing. Generates a public shareable link."),attach_pdf:e.boolean().default(eE).describe("Whether to attach the invoice as a PDF. By default, only the public link is included in the email body. Set to true to also attach the PDF file."),attach_eslog:e.boolean().default(tE).describe("Whether to attach the document as e-SLOG 2.0 XML (Slovenian electronic invoice format). Only available for Slovenian entities when eslog.validation_status = 'valid'. Can be combined with attach_pdf to attach both formats."),sandbox_skip_delivery:e.boolean().default(oE).describe("Sandbox only. Build and validate the full email send flow without actually delivering the email through SES. Useful for testing send behavior after sandbox caps are reached."),locale:e.union([e.literal("en-US"),e.literal("de-DE"),e.literal("it-IT"),e.literal("fr-FR"),e.literal("es-ES"),e.literal("sl-SI"),e.literal("pt-PT"),e.literal("nl-NL"),e.literal("pl-PL"),e.literal("hr-HR"),e.literal("sv-SE"),e.literal("fi-FI"),e.literal("et-EE"),e.literal("bg-BG"),e.literal("cs-CZ"),e.literal("sk-SK"),e.literal("nb-NO"),e.literal("is-IS"),e.literal(null)]).nullish().describe("Override PDF and shareable-link formatting locale. When omitted or null, defaults to the entity's locale. Use this to change date and number formatting per request."),language:e.union([e.enum(["en","de","sl","it","fr","es","pt","nl","pl","hr","sv","fi","et","bg","cs","sk","nb","is"]),e.enum(["en-US","de-DE","it-IT","fr-FR","es-ES","sl-SI","pt-PT","nl-NL","pl-PL","hr-HR","sv-SE","fi-FI","et-EE","bg-BG","cs-CZ","sk-SK","nb-NO","is-IS"]),e.null()]).optional().describe("Override the PDF and shareable-link label language. Accepts a UI language code like 'de' or a full locale like 'de-DE'. When omitted or null, defaults to the explicit locale or the entity's locale.")}),uxe=e.object({message_id:e.string().describe("AWS SES message ID for tracking"),status:e.enum(["sent","queued","skipped"]).describe("Email send status"),to:e.email().describe("Recipient email address"),subject:e.string().describe("Email subject"),shareable_link:e.url().optional().describe("Public URL for viewing the invoice online (if document_id was provided)"),sandbox_skip_delivery:e.boolean().optional().describe("True when sandbox testing used the send flow without delivering the email.")});var Re={};j(Re,{CreateEntityBody:()=>mxe,CreateEntityHeader:()=>pxe,DisableEntityHeader:()=>Pxe,DisableEntityParams:()=>Dxe,DisableEntityResponse:()=>wxe,EnableEntityHeader:()=>Exe,EnableEntityParams:()=>Ixe,EnableEntityResponse:()=>Sxe,GetEntitiesHeader:()=>yxe,GetEntitiesQueryParams:()=>gxe,GetEntitiesResponse:()=>hxe,GetEntityByIdHeader:()=>xxe,GetEntityByIdParams:()=>bxe,GetEntityByIdResponse:()=>zxe,PatchEntityBody:()=>fxe,PatchEntityHeader:()=>vxe,PatchEntityParams:()=>_xe,PatchEntityResponse:()=>Rxe,createEntityBodyAddress2Max:()=>rE,createEntityBodyAddressMax:()=>sE,createEntityBodyCityMax:()=>aE,createEntityBodyCompanyNumberMax:()=>hE,createEntityBodyCountryCodeMax:()=>uE,createEntityBodyCountryCodeMin:()=>lE,createEntityBodyCountryMax:()=>cE,createEntityBodyCurrencyCodeMax:()=>pE,createEntityBodyEmailMax:()=>xE,createEntityBodyFiscalRegionCodeMax:()=>_E,createEntityBodyLocaleMax:()=>mE,createEntityBodyPhoneMax:()=>bE,createEntityBodyPostCodeMax:()=>iE,createEntityBodySettingsBankAccountsItemTypeDefault:()=>ES,createEntityBodySettingsDefaultEstimateValidDaysExclusiveMin:()=>DE,createEntityBodySettingsDefaultInvoiceDueDaysExclusiveMin:()=>SE,createEntityBodySettingsDocumentFooterMax:()=>PE,createEntityBodySettingsEInvoicingAutoSendDefault:()=>AS,createEntityBodySettingsEInvoicingEnabledDefault:()=>wS,createEntityBodySettingsEInvoicingProviderDefault:()=>CS,createEntityBodySettingsFinaEnabledDefault:()=>aS,createEntityBodySettingsFinaNumberingSequenceDefault:()=>uS,createEntityBodySettingsFinaOperatorOibMax:()=>cS,createEntityBodySettingsFinaOperatorOibMin:()=>dS,createEntityBodySettingsFinaUSustPdvDefault:()=>lS,createEntityBodySettingsFursDefaultSkipFiscalizationDefault:()=>iS,createEntityBodySettingsFursEnabledDefault:()=>rS,createEntityBodySettingsLogoScalePercentMax:()=>EE,createEntityBodySettingsLogoScalePercentMin:()=>IE,createEntityBodySettingsOverdueNotificationsEnabledDefault:()=>bS,createEntityBodySettingsOverdueNotificationsThresholdDaysDefault:()=>zS,createEntityBodySettingsOverdueNotificationsThresholdDaysItemExclusiveMin:()=>xS,createEntityBodySettingsPrimaryColorRegExp:()=>RE,createEntityBodySettingsPtOperatorTaxNumberRegExp:()=>pS,createEntityBodySettingsReceiptFooterMax:()=>DS,createEntityBodySettingsReceiptNoteMax:()=>SS,createEntityBodySettingsReceiptSignatureMax:()=>PS,createEntityBodySettingsSloveniaAccountingExportsKontoMappingsPayablesMax:()=>kE,createEntityBodySettingsSloveniaAccountingExportsKontoMappingsPurchaseExpense22Max:()=>QE,createEntityBodySettingsSloveniaAccountingExportsKontoMappingsPurchaseExpense5Max:()=>ZE,createEntityBodySettingsSloveniaAccountingExportsKontoMappingsPurchaseExpense95Max:()=>JE,createEntityBodySettingsSloveniaAccountingExportsKontoMappingsPurchaseExpenseEuGoodsMax:()=>eS,createEntityBodySettingsSloveniaAccountingExportsKontoMappingsPurchaseExpenseEuServicesMax:()=>tS,createEntityBodySettingsSloveniaAccountingExportsKontoMappingsPurchaseExpenseExemptMax:()=>XE,createEntityBodySettingsSloveniaAccountingExportsKontoMappingsPurchaseExpenseReverseChargeMax:()=>oS,createEntityBodySettingsSloveniaAccountingExportsKontoMappingsPurchaseExpenseThirdCountryGoodsMax:()=>nS,createEntityBodySettingsSloveniaAccountingExportsKontoMappingsPurchaseExpenseThirdCountryServicesMax:()=>sS,createEntityBodySettingsSloveniaAccountingExportsKontoMappingsPurchaseVatRecoverable22Max:()=>FE,createEntityBodySettingsSloveniaAccountingExportsKontoMappingsPurchaseVatRecoverable5Max:()=>jE,createEntityBodySettingsSloveniaAccountingExportsKontoMappingsPurchaseVatRecoverable95Max:()=>UE,createEntityBodySettingsSloveniaAccountingExportsKontoMappingsReceivablesMax:()=>TE,createEntityBodySettingsSloveniaAccountingExportsKontoMappingsSalesRevenue22Max:()=>qE,createEntityBodySettingsSloveniaAccountingExportsKontoMappingsSalesRevenue5Max:()=>GE,createEntityBodySettingsSloveniaAccountingExportsKontoMappingsSalesRevenue95Max:()=>WE,createEntityBodySettingsSloveniaAccountingExportsKontoMappingsSalesRevenueEuGoodsMax:()=>LE,createEntityBodySettingsSloveniaAccountingExportsKontoMappingsSalesRevenueEuServicesMax:()=>HE,createEntityBodySettingsSloveniaAccountingExportsKontoMappingsSalesRevenueExemptMax:()=>VE,createEntityBodySettingsSloveniaAccountingExportsKontoMappingsSalesRevenueReverseChargeMax:()=>YE,createEntityBodySettingsSloveniaAccountingExportsKontoMappingsSalesRevenueThirdCountryGoodsMax:()=>KE,createEntityBodySettingsSloveniaAccountingExportsKontoMappingsSalesRevenueThirdCountryServicesMax:()=>$E,createEntityBodySettingsSloveniaAccountingExportsKontoMappingsSalesVat22Max:()=>BE,createEntityBodySettingsSloveniaAccountingExportsKontoMappingsSalesVat5Max:()=>OE,createEntityBodySettingsSloveniaAccountingExportsKontoMappingsSalesVat95Max:()=>NE,createEntityBodySettingsSloveniaYearlyReportingActivityCodeMax:()=>wE,createEntityBodySettingsSloveniaYearlyReportingDefaultForeignTaxCreditAmountMin:()=>ME,createEntityBodySettingsSloveniaYearlyReportingDefaultWithholdingTaxAmountMin:()=>AE,createEntityBodySettingsSloveniaYearlyReportingRegistrationNumberMax:()=>CE,createEntityBodySettingsTaxRulesEuAutoRemoveTaxExportDefault:()=>yS,createEntityBodySettingsTaxRulesEuAutoReverseChargeDefault:()=>gS,createEntityBodySettingsTaxRulesEuRequireGrossPricesDefault:()=>hS,createEntityBodySettingsTaxRulesEuViesValidateVatDefault:()=>mS,createEntityBodySettingsUpnQrDisplayModeDefault:()=>_S,createEntityBodySettingsUpnQrPurposeCodeDefault:()=>vS,createEntityBodySettingsUpnQrPurposeCodeMax:()=>RS,createEntityBodySettingsUpnQrPurposeCodeMin:()=>fS,createEntityBodySettingsUpnQrPurposeCodeRegExp:()=>IS,createEntityBodyStartingCapitalMax:()=>fE,createEntityBodyStartingCapitalMin:()=>vE,createEntityBodyStateMax:()=>dE,createEntityBodyTaxNumber2Max:()=>yE,createEntityBodyTaxNumberMax:()=>gE,createEntityBodyWebsiteMax:()=>zE,createEntityHeaderXAccountIdRegExp:()=>nE,disableEntityHeaderXAccountIdRegExp:()=>SM,disableEntityPathIdRegExp:()=>EM,disableEntityResponseAccountIdMax:()=>YM,disableEntityResponseAddress2Max:()=>CM,disableEntityResponseAddressMax:()=>wM,disableEntityResponseCityMax:()=>MM,disableEntityResponseCompanyNumberMax:()=>jM,disableEntityResponseCountryCodeMax:()=>BM,disableEntityResponseCountryMax:()=>kM,disableEntityResponseCurrencyCodeMax:()=>NM,disableEntityResponseEmailMax:()=>WM,disableEntityResponseFiscalRegionCodeMax:()=>VM,disableEntityResponseIdMax:()=>DM,disableEntityResponseLocaleMax:()=>OM,disableEntityResponseNameMax:()=>PM,disableEntityResponsePhoneMax:()=>qM,disableEntityResponsePostCodeMax:()=>AM,disableEntityResponseSettingsBankAccountsItemTypeDefault:()=>QT,disableEntityResponseSettingsDefaultEstimateValidDaysExclusiveMin:()=>ZM,disableEntityResponseSettingsDefaultInvoiceDueDaysExclusiveMin:()=>JM,disableEntityResponseSettingsDocumentFooterMax:()=>XM,disableEntityResponseSettingsEInvoicingAutoSendDefault:()=>ok,disableEntityResponseSettingsEInvoicingEnabledDefault:()=>ek,disableEntityResponseSettingsEInvoicingProviderDefault:()=>tk,disableEntityResponseSettingsFinaEnabledDefault:()=>MT,disableEntityResponseSettingsFinaNumberingSequenceDefault:()=>NT,disableEntityResponseSettingsFinaOperatorOibMax:()=>kT,disableEntityResponseSettingsFinaOperatorOibMin:()=>TT,disableEntityResponseSettingsFinaUSustPdvDefault:()=>BT,disableEntityResponseSettingsFursDefaultSkipFiscalizationDefault:()=>AT,disableEntityResponseSettingsFursEnabledDefault:()=>CT,disableEntityResponseSettingsLogoScalePercentMax:()=>QM,disableEntityResponseSettingsLogoScalePercentMin:()=>$M,disableEntityResponseSettingsOverdueNotificationsEnabledDefault:()=>WT,disableEntityResponseSettingsOverdueNotificationsThresholdDaysDefault:()=>VT,disableEntityResponseSettingsOverdueNotificationsThresholdDaysItemExclusiveMin:()=>GT,disableEntityResponseSettingsPrimaryColorRegExp:()=>KM,disableEntityResponseSettingsPtOperatorTaxNumberRegExp:()=>OT,disableEntityResponseSettingsReceiptFooterMax:()=>ZT,disableEntityResponseSettingsReceiptNoteMax:()=>JT,disableEntityResponseSettingsReceiptSignatureMax:()=>XT,disableEntityResponseSettingsSloveniaAccountingExportsKontoMappingsPayablesMax:()=>rT,disableEntityResponseSettingsSloveniaAccountingExportsKontoMappingsPurchaseExpense22Max:()=>vT,disableEntityResponseSettingsSloveniaAccountingExportsKontoMappingsPurchaseExpense5Max:()=>RT,disableEntityResponseSettingsSloveniaAccountingExportsKontoMappingsPurchaseExpense95Max:()=>fT,disableEntityResponseSettingsSloveniaAccountingExportsKontoMappingsPurchaseExpenseEuGoodsMax:()=>ET,disableEntityResponseSettingsSloveniaAccountingExportsKontoMappingsPurchaseExpenseEuServicesMax:()=>ST,disableEntityResponseSettingsSloveniaAccountingExportsKontoMappingsPurchaseExpenseExemptMax:()=>IT,disableEntityResponseSettingsSloveniaAccountingExportsKontoMappingsPurchaseExpenseReverseChargeMax:()=>DT,disableEntityResponseSettingsSloveniaAccountingExportsKontoMappingsPurchaseExpenseThirdCountryGoodsMax:()=>PT,disableEntityResponseSettingsSloveniaAccountingExportsKontoMappingsPurchaseExpenseThirdCountryServicesMax:()=>wT,disableEntityResponseSettingsSloveniaAccountingExportsKontoMappingsPurchaseVatRecoverable22Max:()=>cT,disableEntityResponseSettingsSloveniaAccountingExportsKontoMappingsPurchaseVatRecoverable5Max:()=>uT,disableEntityResponseSettingsSloveniaAccountingExportsKontoMappingsPurchaseVatRecoverable95Max:()=>lT,disableEntityResponseSettingsSloveniaAccountingExportsKontoMappingsReceivablesMax:()=>sT,disableEntityResponseSettingsSloveniaAccountingExportsKontoMappingsSalesRevenue22Max:()=>pT,disableEntityResponseSettingsSloveniaAccountingExportsKontoMappingsSalesRevenue5Max:()=>gT,disableEntityResponseSettingsSloveniaAccountingExportsKontoMappingsSalesRevenue95Max:()=>mT,disableEntityResponseSettingsSloveniaAccountingExportsKontoMappingsSalesRevenueEuGoodsMax:()=>hT,disableEntityResponseSettingsSloveniaAccountingExportsKontoMappingsSalesRevenueEuServicesMax:()=>bT,disableEntityResponseSettingsSloveniaAccountingExportsKontoMappingsSalesRevenueExemptMax:()=>yT,disableEntityResponseSettingsSloveniaAccountingExportsKontoMappingsSalesRevenueReverseChargeMax:()=>xT,disableEntityResponseSettingsSloveniaAccountingExportsKontoMappingsSalesRevenueThirdCountryGoodsMax:()=>zT,disableEntityResponseSettingsSloveniaAccountingExportsKontoMappingsSalesRevenueThirdCountryServicesMax:()=>_T,disableEntityResponseSettingsSloveniaAccountingExportsKontoMappingsSalesVat22Max:()=>iT,disableEntityResponseSettingsSloveniaAccountingExportsKontoMappingsSalesVat5Max:()=>dT,disableEntityResponseSettingsSloveniaAccountingExportsKontoMappingsSalesVat95Max:()=>aT,disableEntityResponseSettingsSloveniaYearlyReportingActivityCodeMax:()=>eT,disableEntityResponseSettingsSloveniaYearlyReportingDefaultForeignTaxCreditAmountMin:()=>nT,disableEntityResponseSettingsSloveniaYearlyReportingDefaultWithholdingTaxAmountMin:()=>oT,disableEntityResponseSettingsSloveniaYearlyReportingRegistrationNumberMax:()=>tT,disableEntityResponseSettingsTaxRulesEuAutoRemoveTaxExportDefault:()=>jT,disableEntityResponseSettingsTaxRulesEuAutoReverseChargeDefault:()=>UT,disableEntityResponseSettingsTaxRulesEuRequireGrossPricesDefault:()=>qT,disableEntityResponseSettingsTaxRulesEuViesValidateVatDefault:()=>FT,disableEntityResponseSettingsUpnQrDisplayModeDefault:()=>LT,disableEntityResponseSettingsUpnQrPurposeCodeDefault:()=>HT,disableEntityResponseSettingsUpnQrPurposeCodeMax:()=>KT,disableEntityResponseSettingsUpnQrPurposeCodeMin:()=>YT,disableEntityResponseSettingsUpnQrPurposeCodeRegExp:()=>$T,disableEntityResponseStartingCapitalMax:()=>HM,disableEntityResponseStartingCapitalMin:()=>LM,disableEntityResponseStateMax:()=>TM,disableEntityResponseTaxNumber2Max:()=>UM,disableEntityResponseTaxNumberMax:()=>FM,disableEntityResponseWebsiteMax:()=>GM,enableEntityHeaderXAccountIdRegExp:()=>KC,enableEntityPathIdRegExp:()=>YC,enableEntityResponseAccountIdMax:()=>yA,enableEntityResponseAddress2Max:()=>ZC,enableEntityResponseAddressMax:()=>JC,enableEntityResponseCityMax:()=>eA,enableEntityResponseCompanyNumberMax:()=>dA,enableEntityResponseCountryCodeMax:()=>nA,enableEntityResponseCountryMax:()=>oA,enableEntityResponseCurrencyCodeMax:()=>sA,enableEntityResponseEmailMax:()=>lA,enableEntityResponseFiscalRegionCodeMax:()=>pA,enableEntityResponseIdMax:()=>$C,enableEntityResponseLocaleMax:()=>rA,enableEntityResponseNameMax:()=>QC,enableEntityResponsePhoneMax:()=>cA,enableEntityResponsePostCodeMax:()=>XC,enableEntityResponseSettingsBankAccountsItemTypeDefault:()=>xM,enableEntityResponseSettingsDefaultEstimateValidDaysExclusiveMin:()=>_A,enableEntityResponseSettingsDefaultInvoiceDueDaysExclusiveMin:()=>zA,enableEntityResponseSettingsDocumentFooterMax:()=>vA,enableEntityResponseSettingsEInvoicingAutoSendDefault:()=>IM,enableEntityResponseSettingsEInvoicingEnabledDefault:()=>fM,enableEntityResponseSettingsEInvoicingProviderDefault:()=>RM,enableEntityResponseSettingsFinaEnabledDefault:()=>eM,enableEntityResponseSettingsFinaNumberingSequenceDefault:()=>sM,enableEntityResponseSettingsFinaOperatorOibMax:()=>oM,enableEntityResponseSettingsFinaOperatorOibMin:()=>tM,enableEntityResponseSettingsFinaUSustPdvDefault:()=>nM,enableEntityResponseSettingsFursDefaultSkipFiscalizationDefault:()=>XA,enableEntityResponseSettingsFursEnabledDefault:()=>ZA,enableEntityResponseSettingsLogoScalePercentMax:()=>xA,enableEntityResponseSettingsLogoScalePercentMin:()=>bA,enableEntityResponseSettingsOverdueNotificationsEnabledDefault:()=>lM,enableEntityResponseSettingsOverdueNotificationsThresholdDaysDefault:()=>pM,enableEntityResponseSettingsOverdueNotificationsThresholdDaysItemExclusiveMin:()=>uM,enableEntityResponseSettingsPrimaryColorRegExp:()=>hA,enableEntityResponseSettingsPtOperatorTaxNumberRegExp:()=>rM,enableEntityResponseSettingsReceiptFooterMax:()=>_M,enableEntityResponseSettingsReceiptNoteMax:()=>zM,enableEntityResponseSettingsReceiptSignatureMax:()=>vM,enableEntityResponseSettingsSloveniaAccountingExportsKontoMappingsPayablesMax:()=>DA,enableEntityResponseSettingsSloveniaAccountingExportsKontoMappingsPurchaseExpense22Max:()=>GA,enableEntityResponseSettingsSloveniaAccountingExportsKontoMappingsPurchaseExpense5Max:()=>LA,enableEntityResponseSettingsSloveniaAccountingExportsKontoMappingsPurchaseExpense95Max:()=>VA,enableEntityResponseSettingsSloveniaAccountingExportsKontoMappingsPurchaseExpenseEuGoodsMax:()=>YA,enableEntityResponseSettingsSloveniaAccountingExportsKontoMappingsPurchaseExpenseEuServicesMax:()=>KA,enableEntityResponseSettingsSloveniaAccountingExportsKontoMappingsPurchaseExpenseExemptMax:()=>HA,enableEntityResponseSettingsSloveniaAccountingExportsKontoMappingsPurchaseExpenseReverseChargeMax:()=>$A,enableEntityResponseSettingsSloveniaAccountingExportsKontoMappingsPurchaseExpenseThirdCountryGoodsMax:()=>QA,enableEntityResponseSettingsSloveniaAccountingExportsKontoMappingsPurchaseExpenseThirdCountryServicesMax:()=>JA,enableEntityResponseSettingsSloveniaAccountingExportsKontoMappingsPurchaseVatRecoverable22Max:()=>AA,enableEntityResponseSettingsSloveniaAccountingExportsKontoMappingsPurchaseVatRecoverable5Max:()=>TA,enableEntityResponseSettingsSloveniaAccountingExportsKontoMappingsPurchaseVatRecoverable95Max:()=>MA,enableEntityResponseSettingsSloveniaAccountingExportsKontoMappingsReceivablesMax:()=>SA,enableEntityResponseSettingsSloveniaAccountingExportsKontoMappingsSalesRevenue22Max:()=>kA,enableEntityResponseSettingsSloveniaAccountingExportsKontoMappingsSalesRevenue5Max:()=>NA,enableEntityResponseSettingsSloveniaAccountingExportsKontoMappingsSalesRevenue95Max:()=>BA,enableEntityResponseSettingsSloveniaAccountingExportsKontoMappingsSalesRevenueEuGoodsMax:()=>FA,enableEntityResponseSettingsSloveniaAccountingExportsKontoMappingsSalesRevenueEuServicesMax:()=>UA,enableEntityResponseSettingsSloveniaAccountingExportsKontoMappingsSalesRevenueExemptMax:()=>OA,enableEntityResponseSettingsSloveniaAccountingExportsKontoMappingsSalesRevenueReverseChargeMax:()=>jA,enableEntityResponseSettingsSloveniaAccountingExportsKontoMappingsSalesRevenueThirdCountryGoodsMax:()=>qA,enableEntityResponseSettingsSloveniaAccountingExportsKontoMappingsSalesRevenueThirdCountryServicesMax:()=>WA,enableEntityResponseSettingsSloveniaAccountingExportsKontoMappingsSalesVat22Max:()=>PA,enableEntityResponseSettingsSloveniaAccountingExportsKontoMappingsSalesVat5Max:()=>CA,enableEntityResponseSettingsSloveniaAccountingExportsKontoMappingsSalesVat95Max:()=>wA,enableEntityResponseSettingsSloveniaYearlyReportingActivityCodeMax:()=>fA,enableEntityResponseSettingsSloveniaYearlyReportingDefaultForeignTaxCreditAmountMin:()=>EA,enableEntityResponseSettingsSloveniaYearlyReportingDefaultWithholdingTaxAmountMin:()=>IA,enableEntityResponseSettingsSloveniaYearlyReportingRegistrationNumberMax:()=>RA,enableEntityResponseSettingsTaxRulesEuAutoRemoveTaxExportDefault:()=>dM,enableEntityResponseSettingsTaxRulesEuAutoReverseChargeDefault:()=>aM,enableEntityResponseSettingsTaxRulesEuRequireGrossPricesDefault:()=>cM,enableEntityResponseSettingsTaxRulesEuViesValidateVatDefault:()=>iM,enableEntityResponseSettingsUpnQrDisplayModeDefault:()=>mM,enableEntityResponseSettingsUpnQrPurposeCodeDefault:()=>gM,enableEntityResponseSettingsUpnQrPurposeCodeMax:()=>hM,enableEntityResponseSettingsUpnQrPurposeCodeMin:()=>yM,enableEntityResponseSettingsUpnQrPurposeCodeRegExp:()=>bM,enableEntityResponseStartingCapitalMax:()=>gA,enableEntityResponseStartingCapitalMin:()=>mA,enableEntityResponseStateMax:()=>tA,enableEntityResponseTaxNumber2Max:()=>aA,enableEntityResponseTaxNumberMax:()=>iA,enableEntityResponseWebsiteMax:()=>uA,getEntitiesHeaderXAccountIdRegExp:()=>BS,getEntitiesQueryEnvironmentDefault:()=>kS,getEntitiesQueryLimitDefault:()=>MS,getEntitiesQueryLimitMax:()=>TS,getEntitiesResponseDataItemAccountIdMax:()=>oD,getEntitiesResponseDataItemAddress2Max:()=>US,getEntitiesResponseDataItemAddressMax:()=>FS,getEntitiesResponseDataItemCityMax:()=>qS,getEntitiesResponseDataItemCompanyNumberMax:()=>$S,getEntitiesResponseDataItemCountryCodeMax:()=>VS,getEntitiesResponseDataItemCountryMax:()=>GS,getEntitiesResponseDataItemCurrencyCodeMax:()=>LS,getEntitiesResponseDataItemEmailMax:()=>JS,getEntitiesResponseDataItemFiscalRegionCodeMax:()=>XS,getEntitiesResponseDataItemIdMax:()=>NS,getEntitiesResponseDataItemLocaleMax:()=>HS,getEntitiesResponseDataItemNameMax:()=>OS,getEntitiesResponseDataItemPhoneMax:()=>QS,getEntitiesResponseDataItemPostCodeMax:()=>jS,getEntitiesResponseDataItemSettingsBankAccountsItemTypeDefault:()=>r4,getEntitiesResponseDataItemSettingsDefaultEstimateValidDaysExclusiveMin:()=>aD,getEntitiesResponseDataItemSettingsDefaultInvoiceDueDaysExclusiveMin:()=>iD,getEntitiesResponseDataItemSettingsDocumentFooterMax:()=>dD,getEntitiesResponseDataItemSettingsEInvoicingAutoSendDefault:()=>u4,getEntitiesResponseDataItemSettingsEInvoicingEnabledDefault:()=>c4,getEntitiesResponseDataItemSettingsEInvoicingProviderDefault:()=>l4,getEntitiesResponseDataItemSettingsFinaEnabledDefault:()=>qD,getEntitiesResponseDataItemSettingsFinaNumberingSequenceDefault:()=>LD,getEntitiesResponseDataItemSettingsFinaOperatorOibMax:()=>GD,getEntitiesResponseDataItemSettingsFinaOperatorOibMin:()=>WD,getEntitiesResponseDataItemSettingsFinaUSustPdvDefault:()=>VD,getEntitiesResponseDataItemSettingsFursDefaultSkipFiscalizationDefault:()=>jD,getEntitiesResponseDataItemSettingsFursEnabledDefault:()=>UD,getEntitiesResponseDataItemSettingsLogoScalePercentMax:()=>rD,getEntitiesResponseDataItemSettingsLogoScalePercentMin:()=>sD,getEntitiesResponseDataItemSettingsOverdueNotificationsEnabledDefault:()=>JD,getEntitiesResponseDataItemSettingsOverdueNotificationsThresholdDaysDefault:()=>XD,getEntitiesResponseDataItemSettingsOverdueNotificationsThresholdDaysItemExclusiveMin:()=>ZD,getEntitiesResponseDataItemSettingsPrimaryColorRegExp:()=>nD,getEntitiesResponseDataItemSettingsPtOperatorTaxNumberRegExp:()=>HD,getEntitiesResponseDataItemSettingsReceiptFooterMax:()=>a4,getEntitiesResponseDataItemSettingsReceiptNoteMax:()=>i4,getEntitiesResponseDataItemSettingsReceiptSignatureMax:()=>d4,getEntitiesResponseDataItemSettingsSloveniaAccountingExportsKontoMappingsPayablesMax:()=>gD,getEntitiesResponseDataItemSettingsSloveniaAccountingExportsKontoMappingsPurchaseExpense22Max:()=>CD,getEntitiesResponseDataItemSettingsSloveniaAccountingExportsKontoMappingsPurchaseExpense5Max:()=>MD,getEntitiesResponseDataItemSettingsSloveniaAccountingExportsKontoMappingsPurchaseExpense95Max:()=>AD,getEntitiesResponseDataItemSettingsSloveniaAccountingExportsKontoMappingsPurchaseExpenseEuGoodsMax:()=>kD,getEntitiesResponseDataItemSettingsSloveniaAccountingExportsKontoMappingsPurchaseExpenseEuServicesMax:()=>BD,getEntitiesResponseDataItemSettingsSloveniaAccountingExportsKontoMappingsPurchaseExpenseExemptMax:()=>TD,getEntitiesResponseDataItemSettingsSloveniaAccountingExportsKontoMappingsPurchaseExpenseReverseChargeMax:()=>ND,getEntitiesResponseDataItemSettingsSloveniaAccountingExportsKontoMappingsPurchaseExpenseThirdCountryGoodsMax:()=>OD,getEntitiesResponseDataItemSettingsSloveniaAccountingExportsKontoMappingsPurchaseExpenseThirdCountryServicesMax:()=>FD,getEntitiesResponseDataItemSettingsSloveniaAccountingExportsKontoMappingsPurchaseVatRecoverable22Max:()=>xD,getEntitiesResponseDataItemSettingsSloveniaAccountingExportsKontoMappingsPurchaseVatRecoverable5Max:()=>_D,getEntitiesResponseDataItemSettingsSloveniaAccountingExportsKontoMappingsPurchaseVatRecoverable95Max:()=>zD,getEntitiesResponseDataItemSettingsSloveniaAccountingExportsKontoMappingsReceivablesMax:()=>mD,getEntitiesResponseDataItemSettingsSloveniaAccountingExportsKontoMappingsSalesRevenue22Max:()=>vD,getEntitiesResponseDataItemSettingsSloveniaAccountingExportsKontoMappingsSalesRevenue5Max:()=>RD,getEntitiesResponseDataItemSettingsSloveniaAccountingExportsKontoMappingsSalesRevenue95Max:()=>fD,getEntitiesResponseDataItemSettingsSloveniaAccountingExportsKontoMappingsSalesRevenueEuGoodsMax:()=>ED,getEntitiesResponseDataItemSettingsSloveniaAccountingExportsKontoMappingsSalesRevenueEuServicesMax:()=>SD,getEntitiesResponseDataItemSettingsSloveniaAccountingExportsKontoMappingsSalesRevenueExemptMax:()=>ID,getEntitiesResponseDataItemSettingsSloveniaAccountingExportsKontoMappingsSalesRevenueReverseChargeMax:()=>DD,getEntitiesResponseDataItemSettingsSloveniaAccountingExportsKontoMappingsSalesRevenueThirdCountryGoodsMax:()=>PD,getEntitiesResponseDataItemSettingsSloveniaAccountingExportsKontoMappingsSalesRevenueThirdCountryServicesMax:()=>wD,getEntitiesResponseDataItemSettingsSloveniaAccountingExportsKontoMappingsSalesVat22Max:()=>yD,getEntitiesResponseDataItemSettingsSloveniaAccountingExportsKontoMappingsSalesVat5Max:()=>bD,getEntitiesResponseDataItemSettingsSloveniaAccountingExportsKontoMappingsSalesVat95Max:()=>hD,getEntitiesResponseDataItemSettingsSloveniaYearlyReportingActivityCodeMax:()=>cD,getEntitiesResponseDataItemSettingsSloveniaYearlyReportingDefaultForeignTaxCreditAmountMin:()=>pD,getEntitiesResponseDataItemSettingsSloveniaYearlyReportingDefaultWithholdingTaxAmountMin:()=>uD,getEntitiesResponseDataItemSettingsSloveniaYearlyReportingRegistrationNumberMax:()=>lD,getEntitiesResponseDataItemSettingsTaxRulesEuAutoRemoveTaxExportDefault:()=>$D,getEntitiesResponseDataItemSettingsTaxRulesEuAutoReverseChargeDefault:()=>KD,getEntitiesResponseDataItemSettingsTaxRulesEuRequireGrossPricesDefault:()=>QD,getEntitiesResponseDataItemSettingsTaxRulesEuViesValidateVatDefault:()=>YD,getEntitiesResponseDataItemSettingsUpnQrDisplayModeDefault:()=>e4,getEntitiesResponseDataItemSettingsUpnQrPurposeCodeDefault:()=>t4,getEntitiesResponseDataItemSettingsUpnQrPurposeCodeMax:()=>n4,getEntitiesResponseDataItemSettingsUpnQrPurposeCodeMin:()=>o4,getEntitiesResponseDataItemSettingsUpnQrPurposeCodeRegExp:()=>s4,getEntitiesResponseDataItemStartingCapitalMax:()=>tD,getEntitiesResponseDataItemStartingCapitalMin:()=>eD,getEntitiesResponseDataItemStateMax:()=>WS,getEntitiesResponseDataItemTaxNumber2Max:()=>KS,getEntitiesResponseDataItemTaxNumberMax:()=>YS,getEntitiesResponseDataItemWebsiteMax:()=>ZS,getEntityByIdHeaderXAccountIdRegExp:()=>m4,getEntityByIdPathIdRegExp:()=>p4,getEntityByIdResponseAccountIdMax:()=>k4,getEntityByIdResponseAddress2Max:()=>b4,getEntityByIdResponseAddressMax:()=>h4,getEntityByIdResponseCityMax:()=>z4,getEntityByIdResponseCompanyNumberMax:()=>D4,getEntityByIdResponseCountryCodeMax:()=>f4,getEntityByIdResponseCountryMax:()=>v4,getEntityByIdResponseCurrencyCodeMax:()=>R4,getEntityByIdResponseEmailMax:()=>w4,getEntityByIdResponseFiscalRegionCodeMax:()=>A4,getEntityByIdResponseIdMax:()=>g4,getEntityByIdResponseLocaleMax:()=>I4,getEntityByIdResponseNameMax:()=>y4,getEntityByIdResponsePhoneMax:()=>P4,getEntityByIdResponsePostCodeMax:()=>x4,getEntityByIdResponseSettingsBankAccountsItemTypeDefault:()=>OP,getEntityByIdResponseSettingsDefaultEstimateValidDaysExclusiveMin:()=>U4,getEntityByIdResponseSettingsDefaultInvoiceDueDaysExclusiveMin:()=>F4,getEntityByIdResponseSettingsDocumentFooterMax:()=>j4,getEntityByIdResponseSettingsEInvoicingAutoSendDefault:()=>GP,getEntityByIdResponseSettingsEInvoicingEnabledDefault:()=>qP,getEntityByIdResponseSettingsEInvoicingProviderDefault:()=>WP,getEntityByIdResponseSettingsFinaEnabledDefault:()=>zP,getEntityByIdResponseSettingsFinaNumberingSequenceDefault:()=>RP,getEntityByIdResponseSettingsFinaOperatorOibMax:()=>vP,getEntityByIdResponseSettingsFinaOperatorOibMin:()=>_P,getEntityByIdResponseSettingsFinaUSustPdvDefault:()=>fP,getEntityByIdResponseSettingsFursDefaultSkipFiscalizationDefault:()=>xP,getEntityByIdResponseSettingsFursEnabledDefault:()=>bP,getEntityByIdResponseSettingsLogoScalePercentMax:()=>O4,getEntityByIdResponseSettingsLogoScalePercentMin:()=>N4,getEntityByIdResponseSettingsOverdueNotificationsEnabledDefault:()=>wP,getEntityByIdResponseSettingsOverdueNotificationsThresholdDaysDefault:()=>AP,getEntityByIdResponseSettingsOverdueNotificationsThresholdDaysItemExclusiveMin:()=>CP,getEntityByIdResponseSettingsPrimaryColorRegExp:()=>B4,getEntityByIdResponseSettingsPtOperatorTaxNumberRegExp:()=>IP,getEntityByIdResponseSettingsReceiptFooterMax:()=>UP,getEntityByIdResponseSettingsReceiptNoteMax:()=>FP,getEntityByIdResponseSettingsReceiptSignatureMax:()=>jP,getEntityByIdResponseSettingsSloveniaAccountingExportsKontoMappingsPayablesMax:()=>H4,getEntityByIdResponseSettingsSloveniaAccountingExportsKontoMappingsPurchaseExpense22Max:()=>dP,getEntityByIdResponseSettingsSloveniaAccountingExportsKontoMappingsPurchaseExpense5Max:()=>lP,getEntityByIdResponseSettingsSloveniaAccountingExportsKontoMappingsPurchaseExpense95Max:()=>cP,getEntityByIdResponseSettingsSloveniaAccountingExportsKontoMappingsPurchaseExpenseEuGoodsMax:()=>pP,getEntityByIdResponseSettingsSloveniaAccountingExportsKontoMappingsPurchaseExpenseEuServicesMax:()=>mP,getEntityByIdResponseSettingsSloveniaAccountingExportsKontoMappingsPurchaseExpenseExemptMax:()=>uP,getEntityByIdResponseSettingsSloveniaAccountingExportsKontoMappingsPurchaseExpenseReverseChargeMax:()=>gP,getEntityByIdResponseSettingsSloveniaAccountingExportsKontoMappingsPurchaseExpenseThirdCountryGoodsMax:()=>yP,getEntityByIdResponseSettingsSloveniaAccountingExportsKontoMappingsPurchaseExpenseThirdCountryServicesMax:()=>hP,getEntityByIdResponseSettingsSloveniaAccountingExportsKontoMappingsPurchaseVatRecoverable22Max:()=>Q4,getEntityByIdResponseSettingsSloveniaAccountingExportsKontoMappingsPurchaseVatRecoverable5Max:()=>Z4,getEntityByIdResponseSettingsSloveniaAccountingExportsKontoMappingsPurchaseVatRecoverable95Max:()=>J4,getEntityByIdResponseSettingsSloveniaAccountingExportsKontoMappingsReceivablesMax:()=>L4,getEntityByIdResponseSettingsSloveniaAccountingExportsKontoMappingsSalesRevenue22Max:()=>X4,getEntityByIdResponseSettingsSloveniaAccountingExportsKontoMappingsSalesRevenue5Max:()=>tP,getEntityByIdResponseSettingsSloveniaAccountingExportsKontoMappingsSalesRevenue95Max:()=>eP,getEntityByIdResponseSettingsSloveniaAccountingExportsKontoMappingsSalesRevenueEuGoodsMax:()=>nP,getEntityByIdResponseSettingsSloveniaAccountingExportsKontoMappingsSalesRevenueEuServicesMax:()=>sP,getEntityByIdResponseSettingsSloveniaAccountingExportsKontoMappingsSalesRevenueExemptMax:()=>oP,getEntityByIdResponseSettingsSloveniaAccountingExportsKontoMappingsSalesRevenueReverseChargeMax:()=>rP,getEntityByIdResponseSettingsSloveniaAccountingExportsKontoMappingsSalesRevenueThirdCountryGoodsMax:()=>iP,getEntityByIdResponseSettingsSloveniaAccountingExportsKontoMappingsSalesRevenueThirdCountryServicesMax:()=>aP,getEntityByIdResponseSettingsSloveniaAccountingExportsKontoMappingsSalesVat22Max:()=>Y4,getEntityByIdResponseSettingsSloveniaAccountingExportsKontoMappingsSalesVat5Max:()=>$4,getEntityByIdResponseSettingsSloveniaAccountingExportsKontoMappingsSalesVat95Max:()=>K4,getEntityByIdResponseSettingsSloveniaYearlyReportingActivityCodeMax:()=>q4,getEntityByIdResponseSettingsSloveniaYearlyReportingDefaultForeignTaxCreditAmountMin:()=>V4,getEntityByIdResponseSettingsSloveniaYearlyReportingDefaultWithholdingTaxAmountMin:()=>G4,getEntityByIdResponseSettingsSloveniaYearlyReportingRegistrationNumberMax:()=>W4,getEntityByIdResponseSettingsTaxRulesEuAutoRemoveTaxExportDefault:()=>DP,getEntityByIdResponseSettingsTaxRulesEuAutoReverseChargeDefault:()=>SP,getEntityByIdResponseSettingsTaxRulesEuRequireGrossPricesDefault:()=>PP,getEntityByIdResponseSettingsTaxRulesEuViesValidateVatDefault:()=>EP,getEntityByIdResponseSettingsUpnQrDisplayModeDefault:()=>MP,getEntityByIdResponseSettingsUpnQrPurposeCodeDefault:()=>TP,getEntityByIdResponseSettingsUpnQrPurposeCodeMax:()=>BP,getEntityByIdResponseSettingsUpnQrPurposeCodeMin:()=>kP,getEntityByIdResponseSettingsUpnQrPurposeCodeRegExp:()=>NP,getEntityByIdResponseStartingCapitalMax:()=>T4,getEntityByIdResponseStartingCapitalMin:()=>M4,getEntityByIdResponseStateMax:()=>_4,getEntityByIdResponseTaxNumber2Max:()=>S4,getEntityByIdResponseTaxNumberMax:()=>E4,getEntityByIdResponseWebsiteMax:()=>C4,patchEntityBodyAddress2Max:()=>YP,patchEntityBodyAddressMax:()=>HP,patchEntityBodyCityMax:()=>$P,patchEntityBodyCompanyNumberMax:()=>t2,patchEntityBodyCurrencyCodeMax:()=>JP,patchEntityBodyEmailMax:()=>n2,patchEntityBodyFiscalRegionCodeMax:()=>r2,patchEntityBodyLocaleMax:()=>ZP,patchEntityBodyPhoneMax:()=>o2,patchEntityBodyPostCodeMax:()=>KP,patchEntityBodySettingsBankAccountsItemTypeDefault:()=>lw,patchEntityBodySettingsDefaultEstimateValidDaysExclusiveMin:()=>p2,patchEntityBodySettingsDefaultInvoiceDueDaysExclusiveMin:()=>u2,patchEntityBodySettingsDocumentFooterMax:()=>m2,patchEntityBodySettingsEInvoicingAutoSendDefault:()=>hw,patchEntityBodySettingsEInvoicingEnabledDefault:()=>gw,patchEntityBodySettingsEInvoicingProviderDefault:()=>yw,patchEntityBodySettingsFinaEnabledDefault:()=>H2,patchEntityBodySettingsFinaNumberingSequenceDefault:()=>Q2,patchEntityBodySettingsFinaOperatorOibMax:()=>K2,patchEntityBodySettingsFinaOperatorOibMin:()=>Y2,patchEntityBodySettingsFinaUSustPdvDefault:()=>$2,patchEntityBodySettingsFursDefaultSkipFiscalizationDefault:()=>L2,patchEntityBodySettingsFursEnabledDefault:()=>V2,patchEntityBodySettingsLogoScalePercentMax:()=>l2,patchEntityBodySettingsLogoScalePercentMin:()=>c2,patchEntityBodySettingsOverdueNotificationsEnabledDefault:()=>ow,patchEntityBodySettingsOverdueNotificationsThresholdDaysDefault:()=>sw,patchEntityBodySettingsOverdueNotificationsThresholdDaysItemExclusiveMin:()=>nw,patchEntityBodySettingsPrimaryColorRegExp:()=>d2,patchEntityBodySettingsPtOperatorTaxNumberRegExp:()=>J2,patchEntityBodySettingsReceiptFooterMax:()=>pw,patchEntityBodySettingsReceiptNoteMax:()=>uw,patchEntityBodySettingsReceiptSignatureMax:()=>mw,patchEntityBodySettingsSloveniaAccountingExportsKontoMappingsPayablesMax:()=>z2,patchEntityBodySettingsSloveniaAccountingExportsKontoMappingsPurchaseExpense22Max:()=>B2,patchEntityBodySettingsSloveniaAccountingExportsKontoMappingsPurchaseExpense5Max:()=>O2,patchEntityBodySettingsSloveniaAccountingExportsKontoMappingsPurchaseExpense95Max:()=>N2,patchEntityBodySettingsSloveniaAccountingExportsKontoMappingsPurchaseExpenseEuGoodsMax:()=>U2,patchEntityBodySettingsSloveniaAccountingExportsKontoMappingsPurchaseExpenseEuServicesMax:()=>j2,patchEntityBodySettingsSloveniaAccountingExportsKontoMappingsPurchaseExpenseExemptMax:()=>F2,patchEntityBodySettingsSloveniaAccountingExportsKontoMappingsPurchaseExpenseReverseChargeMax:()=>q2,patchEntityBodySettingsSloveniaAccountingExportsKontoMappingsPurchaseExpenseThirdCountryGoodsMax:()=>W2,patchEntityBodySettingsSloveniaAccountingExportsKontoMappingsPurchaseExpenseThirdCountryServicesMax:()=>G2,patchEntityBodySettingsSloveniaAccountingExportsKontoMappingsPurchaseVatRecoverable22Max:()=>R2,patchEntityBodySettingsSloveniaAccountingExportsKontoMappingsPurchaseVatRecoverable5Max:()=>E2,patchEntityBodySettingsSloveniaAccountingExportsKontoMappingsPurchaseVatRecoverable95Max:()=>I2,patchEntityBodySettingsSloveniaAccountingExportsKontoMappingsReceivablesMax:()=>x2,patchEntityBodySettingsSloveniaAccountingExportsKontoMappingsSalesRevenue22Max:()=>S2,patchEntityBodySettingsSloveniaAccountingExportsKontoMappingsSalesRevenue5Max:()=>P2,patchEntityBodySettingsSloveniaAccountingExportsKontoMappingsSalesRevenue95Max:()=>D2,patchEntityBodySettingsSloveniaAccountingExportsKontoMappingsSalesRevenueEuGoodsMax:()=>C2,patchEntityBodySettingsSloveniaAccountingExportsKontoMappingsSalesRevenueEuServicesMax:()=>A2,patchEntityBodySettingsSloveniaAccountingExportsKontoMappingsSalesRevenueExemptMax:()=>w2,patchEntityBodySettingsSloveniaAccountingExportsKontoMappingsSalesRevenueReverseChargeMax:()=>M2,patchEntityBodySettingsSloveniaAccountingExportsKontoMappingsSalesRevenueThirdCountryGoodsMax:()=>T2,patchEntityBodySettingsSloveniaAccountingExportsKontoMappingsSalesRevenueThirdCountryServicesMax:()=>k2,patchEntityBodySettingsSloveniaAccountingExportsKontoMappingsSalesVat22Max:()=>_2,patchEntityBodySettingsSloveniaAccountingExportsKontoMappingsSalesVat5Max:()=>f2,patchEntityBodySettingsSloveniaAccountingExportsKontoMappingsSalesVat95Max:()=>v2,patchEntityBodySettingsSloveniaYearlyReportingActivityCodeMax:()=>g2,patchEntityBodySettingsSloveniaYearlyReportingDefaultForeignTaxCreditAmountMin:()=>b2,patchEntityBodySettingsSloveniaYearlyReportingDefaultWithholdingTaxAmountMin:()=>h2,patchEntityBodySettingsSloveniaYearlyReportingRegistrationNumberMax:()=>y2,patchEntityBodySettingsTaxRulesEuAutoRemoveTaxExportDefault:()=>ew,patchEntityBodySettingsTaxRulesEuAutoReverseChargeDefault:()=>X2,patchEntityBodySettingsTaxRulesEuRequireGrossPricesDefault:()=>tw,patchEntityBodySettingsTaxRulesEuViesValidateVatDefault:()=>Z2,patchEntityBodySettingsUpnQrDisplayModeDefault:()=>rw,patchEntityBodySettingsUpnQrPurposeCodeDefault:()=>iw,patchEntityBodySettingsUpnQrPurposeCodeMax:()=>dw,patchEntityBodySettingsUpnQrPurposeCodeMin:()=>aw,patchEntityBodySettingsUpnQrPurposeCodeRegExp:()=>cw,patchEntityBodyStartingCapitalMax:()=>a2,patchEntityBodyStartingCapitalMin:()=>i2,patchEntityBodyStateMax:()=>QP,patchEntityBodyTaxNumber2Max:()=>e2,patchEntityBodyTaxNumberMax:()=>XP,patchEntityBodyWebsiteMax:()=>s2,patchEntityHeaderXAccountIdRegExp:()=>LP,patchEntityPathIdRegExp:()=>VP,patchEntityResponseAccountIdMax:()=>Ow,patchEntityResponseAddress2Max:()=>_w,patchEntityResponseAddressMax:()=>zw,patchEntityResponseCityMax:()=>fw,patchEntityResponseCompanyNumberMax:()=>Cw,patchEntityResponseCountryCodeMax:()=>Ew,patchEntityResponseCountryMax:()=>Iw,patchEntityResponseCurrencyCodeMax:()=>Sw,patchEntityResponseEmailMax:()=>Mw,patchEntityResponseFiscalRegionCodeMax:()=>kw,patchEntityResponseIdMax:()=>bw,patchEntityResponseLocaleMax:()=>Dw,patchEntityResponseNameMax:()=>xw,patchEntityResponsePhoneMax:()=>Aw,patchEntityResponsePostCodeMax:()=>vw,patchEntityResponseSettingsBankAccountsItemTypeDefault:()=>jC,patchEntityResponseSettingsDefaultEstimateValidDaysExclusiveMin:()=>Ww,patchEntityResponseSettingsDefaultInvoiceDueDaysExclusiveMin:()=>qw,patchEntityResponseSettingsDocumentFooterMax:()=>Gw,patchEntityResponseSettingsEInvoicingAutoSendDefault:()=>HC,patchEntityResponseSettingsEInvoicingEnabledDefault:()=>VC,patchEntityResponseSettingsEInvoicingProviderDefault:()=>LC,patchEntityResponseSettingsFinaEnabledDefault:()=>fC,patchEntityResponseSettingsFinaNumberingSequenceDefault:()=>SC,patchEntityResponseSettingsFinaOperatorOibMax:()=>IC,patchEntityResponseSettingsFinaOperatorOibMin:()=>RC,patchEntityResponseSettingsFinaUSustPdvDefault:()=>EC,patchEntityResponseSettingsFursDefaultSkipFiscalizationDefault:()=>vC,patchEntityResponseSettingsFursEnabledDefault:()=>_C,patchEntityResponseSettingsLogoScalePercentMax:()=>jw,patchEntityResponseSettingsLogoScalePercentMin:()=>Uw,patchEntityResponseSettingsOverdueNotificationsEnabledDefault:()=>MC,patchEntityResponseSettingsOverdueNotificationsThresholdDaysDefault:()=>kC,patchEntityResponseSettingsOverdueNotificationsThresholdDaysItemExclusiveMin:()=>TC,patchEntityResponseSettingsPrimaryColorRegExp:()=>Fw,patchEntityResponseSettingsPtOperatorTaxNumberRegExp:()=>DC,patchEntityResponseSettingsReceiptFooterMax:()=>WC,patchEntityResponseSettingsReceiptNoteMax:()=>qC,patchEntityResponseSettingsReceiptSignatureMax:()=>GC,patchEntityResponseSettingsSloveniaAccountingExportsKontoMappingsPayablesMax:()=>$w,patchEntityResponseSettingsSloveniaAccountingExportsKontoMappingsPurchaseExpense22Max:()=>uC,patchEntityResponseSettingsSloveniaAccountingExportsKontoMappingsPurchaseExpense5Max:()=>mC,patchEntityResponseSettingsSloveniaAccountingExportsKontoMappingsPurchaseExpense95Max:()=>pC,patchEntityResponseSettingsSloveniaAccountingExportsKontoMappingsPurchaseExpenseEuGoodsMax:()=>yC,patchEntityResponseSettingsSloveniaAccountingExportsKontoMappingsPurchaseExpenseEuServicesMax:()=>hC,patchEntityResponseSettingsSloveniaAccountingExportsKontoMappingsPurchaseExpenseExemptMax:()=>gC,patchEntityResponseSettingsSloveniaAccountingExportsKontoMappingsPurchaseExpenseReverseChargeMax:()=>bC,patchEntityResponseSettingsSloveniaAccountingExportsKontoMappingsPurchaseExpenseThirdCountryGoodsMax:()=>xC,patchEntityResponseSettingsSloveniaAccountingExportsKontoMappingsPurchaseExpenseThirdCountryServicesMax:()=>zC,patchEntityResponseSettingsSloveniaAccountingExportsKontoMappingsPurchaseVatRecoverable22Max:()=>Xw,patchEntityResponseSettingsSloveniaAccountingExportsKontoMappingsPurchaseVatRecoverable5Max:()=>tC,patchEntityResponseSettingsSloveniaAccountingExportsKontoMappingsPurchaseVatRecoverable95Max:()=>eC,patchEntityResponseSettingsSloveniaAccountingExportsKontoMappingsReceivablesMax:()=>Kw,patchEntityResponseSettingsSloveniaAccountingExportsKontoMappingsSalesRevenue22Max:()=>oC,patchEntityResponseSettingsSloveniaAccountingExportsKontoMappingsSalesRevenue5Max:()=>sC,patchEntityResponseSettingsSloveniaAccountingExportsKontoMappingsSalesRevenue95Max:()=>nC,patchEntityResponseSettingsSloveniaAccountingExportsKontoMappingsSalesRevenueEuGoodsMax:()=>iC,patchEntityResponseSettingsSloveniaAccountingExportsKontoMappingsSalesRevenueEuServicesMax:()=>aC,patchEntityResponseSettingsSloveniaAccountingExportsKontoMappingsSalesRevenueExemptMax:()=>rC,patchEntityResponseSettingsSloveniaAccountingExportsKontoMappingsSalesRevenueReverseChargeMax:()=>dC,patchEntityResponseSettingsSloveniaAccountingExportsKontoMappingsSalesRevenueThirdCountryGoodsMax:()=>cC,patchEntityResponseSettingsSloveniaAccountingExportsKontoMappingsSalesRevenueThirdCountryServicesMax:()=>lC,patchEntityResponseSettingsSloveniaAccountingExportsKontoMappingsSalesVat22Max:()=>Qw,patchEntityResponseSettingsSloveniaAccountingExportsKontoMappingsSalesVat5Max:()=>Zw,patchEntityResponseSettingsSloveniaAccountingExportsKontoMappingsSalesVat95Max:()=>Jw,patchEntityResponseSettingsSloveniaYearlyReportingActivityCodeMax:()=>Vw,patchEntityResponseSettingsSloveniaYearlyReportingDefaultForeignTaxCreditAmountMin:()=>Yw,patchEntityResponseSettingsSloveniaYearlyReportingDefaultWithholdingTaxAmountMin:()=>Hw,patchEntityResponseSettingsSloveniaYearlyReportingRegistrationNumberMax:()=>Lw,patchEntityResponseSettingsTaxRulesEuAutoRemoveTaxExportDefault:()=>CC,patchEntityResponseSettingsTaxRulesEuAutoReverseChargeDefault:()=>wC,patchEntityResponseSettingsTaxRulesEuRequireGrossPricesDefault:()=>AC,patchEntityResponseSettingsTaxRulesEuViesValidateVatDefault:()=>PC,patchEntityResponseSettingsUpnQrDisplayModeDefault:()=>BC,patchEntityResponseSettingsUpnQrPurposeCodeDefault:()=>NC,patchEntityResponseSettingsUpnQrPurposeCodeMax:()=>FC,patchEntityResponseSettingsUpnQrPurposeCodeMin:()=>OC,patchEntityResponseSettingsUpnQrPurposeCodeRegExp:()=>UC,patchEntityResponseStartingCapitalMax:()=>Nw,patchEntityResponseStartingCapitalMin:()=>Bw,patchEntityResponseStateMax:()=>Rw,patchEntityResponseTaxNumber2Max:()=>ww,patchEntityResponseTaxNumberMax:()=>Pw,patchEntityResponseWebsiteMax:()=>Tw});var nE=/^acc_[0-9a-fA-F]{24}$/,pxe=e.object({"x-account-id":e.string().regex(nE).optional().describe("Account Id on which the request is made. Optional if user is part of only one account.")}),sE=500,rE=500,iE=20,aE=100,dE=100,cE=100,lE=2,uE=2,pE=3,mE=20,gE=50,yE=50,hE=50,bE=50,xE=255,zE=500,_E=10,vE=-140737488355328,fE=0x7fffffffffff,RE=/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/,IE=30,EE=100,SE=0,DE=0,PE=500,wE=10,CE=50,AE=0,ME=0,TE=8,kE=8,BE=8,NE=8,OE=8,FE=8,UE=8,jE=8,qE=8,WE=8,GE=8,VE=8,LE=8,HE=8,YE=8,KE=8,$E=8,QE=8,JE=8,ZE=8,XE=8,eS=8,tS=8,oS=8,nS=8,sS=8,rS=false,iS=false,aS=false,dS=11,cS=11,lS=true,uS="P",pS=/^\d{9}$/,mS=true,gS=false,yS=false,hS=false,bS=false,xS=0,zS=[7,14,30],_S="qr_only",vS="OTHR",fS=4,RS=4,IS=/^[A-Z]{4}$/,ES="iban",SS=500,DS=500,PS=200,wS=false,CS="flowin",AS=false,mxe=e.object({name:e.string().min(1),address:e.string().max(sE).nullish(),address_2:e.string().max(rE).nullish(),post_code:e.string().max(iE).nullish(),city:e.string().max(aE).nullish(),state:e.string().max(dE).nullish(),country:e.string().max(cE),country_code:e.string().min(lE).max(uE).nullish(),currency_code:e.string().max(pE).nullish(),locale:e.string().max(mE).nullish(),tax_number:e.string().max(gE).nullish(),tax_number_2:e.string().max(yE).nullish(),company_number:e.string().max(hE).nullish(),phone:e.string().max(bE).nullish(),email:e.string().max(xE).nullish(),website:e.string().max(zE).nullish(),fiscal_region_code:e.string().max(_E).nullish(),starting_capital:e.number().min(vE).max(fE).nullish(),environment:e.enum(["live","sandbox"]).optional(),is_tax_subject:e.boolean().optional(),is_enabled:e.boolean().optional().describe("Whether the entity is enabled. Disabled entities cannot create documents (invoices, estimates, etc.) but all data remains accessible and settings can be updated."),settings:e.object({pdf_template:e.union([e.literal("modern"),e.literal("classic"),e.literal("condensed"),e.literal("minimal"),e.literal("fashion"),e.literal("timeless_modern_full_data"),e.literal(null)]).nullish().describe("Default PDF template for document rendering. Defaults to 'modern' if not set."),number_formats:e.object({invoice:e.string().nullish(),estimate:e.string().nullish(),credit_note:e.string().nullish(),advance_invoice:e.string().nullish(),delivery_note:e.string().nullish()}).nullish(),primary_color:e.string().regex(RE).nullish(),logo_scale_percent:e.number().min(IE).max(EE).nullish().describe("Scale the PDF logo size as a percentage of the template default size. 100 keeps the original size."),has_logo:e.boolean().nullish(),has_signature:e.boolean().nullish(),default_invoice_due_days:e.number().gt(SE).nullish().describe("Default number of days until invoice is due (from invoice date)"),default_estimate_valid_days:e.number().gt(DE).nullish().describe("Default number of days until estimate expires (from estimate date)"),email_defaults:e.object({invoice_subject:e.string().nullish().describe("Default subject line for invoice emails. Available variables: {document_number}, {entity_name}, {entity_email}, {entity_address}, {entity_post_code}, {entity_city}, {entity_country}, {entity_tax_number}, {entity_company_number}, {customer_name}, {document_date}, {document_due_date}, {document_total}, {document_currency}"),invoice_body:e.string().nullish().describe("Default body text for invoice emails. Available variables: {document_number}, {entity_name}, {entity_email}, {entity_address}, {entity_post_code}, {entity_city}, {entity_country}, {entity_tax_number}, {entity_company_number}, {customer_name}, {document_date}, {document_due_date}, {document_total}, {document_currency}"),estimate_subject:e.string().nullish().describe("Default subject line for estimate emails. Available variables: {document_number}, {entity_name}, {entity_email}, {entity_address}, {entity_post_code}, {entity_city}, {entity_country}, {entity_tax_number}, {entity_company_number}, {customer_name}, {document_date}, {document_valid_until}, {document_total}, {document_currency}"),estimate_body:e.string().nullish().describe("Default body text for estimate emails. Available variables: {document_number}, {entity_name}, {entity_email}, {entity_address}, {entity_post_code}, {entity_city}, {entity_country}, {entity_tax_number}, {entity_company_number}, {customer_name}, {document_date}, {document_valid_until}, {document_total}, {document_currency}"),credit_note_subject:e.string().nullish().describe("Default subject line for credit note emails. Available variables: {document_number}, {entity_name}, {entity_email}, {entity_address}, {entity_post_code}, {entity_city}, {entity_country}, {entity_tax_number}, {entity_company_number}, {customer_name}, {document_date}, {document_total}, {document_currency}"),credit_note_body:e.string().nullish().describe("Default body text for credit note emails. Available variables: {document_number}, {entity_name}, {entity_email}, {entity_address}, {entity_post_code}, {entity_city}, {entity_country}, {entity_tax_number}, {entity_company_number}, {customer_name}, {document_date}, {document_total}, {document_currency}"),advance_invoice_subject:e.string().nullish().describe("Default subject line for advance invoice emails. Available variables: {document_number}, {entity_name}, {entity_email}, {entity_address}, {entity_post_code}, {entity_city}, {entity_country}, {entity_tax_number}, {entity_company_number}, {customer_name}, {document_date}, {document_total}, {document_currency}"),advance_invoice_body:e.string().nullish().describe("Default body text for advance invoice emails. Available variables: {document_number}, {entity_name}, {entity_email}, {entity_address}, {entity_post_code}, {entity_city}, {entity_country}, {entity_tax_number}, {entity_company_number}, {customer_name}, {document_date}, {document_total}, {document_currency}"),delivery_note_subject:e.string().nullish().describe("Default subject line for delivery note emails. Available variables: {document_number}, {entity_name}, {entity_email}, {entity_address}, {entity_post_code}, {entity_city}, {entity_country}, {entity_tax_number}, {entity_company_number}, {customer_name}, {document_date}, {document_total}, {document_currency}"),delivery_note_body:e.string().nullish().describe("Default body text for delivery note emails. Available variables: {document_number}, {entity_name}, {entity_email}, {entity_address}, {entity_post_code}, {entity_city}, {entity_country}, {entity_tax_number}, {entity_company_number}, {customer_name}, {document_date}, {document_total}, {document_currency}")}).nullish(),default_invoice_note:e.string().nullish().describe("Default note for new invoices. Supports template variables: {entity_name}, {entity_email}, {document_number}, {document_date}, {document_due_date}, {document_total}, {document_currency}, {customer_name}, {customer_email}, {current_date}, {current_year}"),default_invoice_payment_terms:e.string().nullish().describe("Default payment terms for new invoices. Supports template variables: {entity_name}, {entity_email}, {document_number}, {document_date}, {document_due_date}, {document_total}, {document_currency}, {customer_name}, {customer_email}, {current_date}, {current_year}"),default_estimate_note:e.string().nullish().describe("Default note for new estimates. Supports template variables: {entity_name}, {entity_email}, {document_number}, {document_date}, {document_valid_until}, {document_total}, {document_currency}, {customer_name}, {customer_email}, {current_date}, {current_year}"),default_estimate_payment_terms:e.string().nullish().describe("Default payment terms for new estimates. Supports template variables: {entity_name}, {entity_email}, {document_number}, {document_date}, {document_valid_until}, {document_total}, {document_currency}, {customer_name}, {customer_email}, {current_date}, {current_year}"),default_credit_note_note:e.string().nullish().describe("Default note for new credit notes. Supports template variables: {entity_name}, {entity_email}, {document_number}, {document_date}, {document_total}, {document_currency}, {customer_name}, {customer_email}, {current_date}, {current_year}"),default_credit_note_payment_terms:e.string().nullish().describe("Default payment terms for new credit notes. Supports template variables: {entity_name}, {entity_email}, {document_number}, {document_date}, {document_total}, {document_currency}, {customer_name}, {customer_email}, {current_date}, {current_year}"),default_advance_invoice_note:e.string().nullish().describe("Default note for new advance invoices. Supports template variables: {entity_name}, {entity_email}, {document_number}, {document_date}, {document_total}, {document_currency}, {customer_name}, {customer_email}, {current_date}, {current_year}"),default_delivery_note_note:e.string().nullish().describe("Default note for new delivery notes. Supports template variables: {entity_name}, {entity_email}, {document_number}, {document_date}, {document_total}, {document_currency}, {customer_name}, {customer_email}, {current_date}, {current_year}"),document_footer:e.string().max(PE).nullish().describe("Footer text for PDF documents. Supports template variables: {entity_name}, {entity_email}, {document_number}, {document_date}, {document_due_date}, {document_total}, {document_currency}, {customer_name}, {customer_email}, {current_date}, {current_year}"),default_document_signature:e.string().nullish().describe("Default signature text for all new documents. Supports template variables: {entity_name}, {entity_email}, {document_number}, {document_date}, {document_due_date}, {document_total}, {document_currency}, {customer_name}, {customer_email}, {current_date}, {current_year}"),calculation:e.object({default_mode:e.union([e.literal("b2b_standard"),e.literal("b2c_gross_discount"),e.literal(null)]).nullish().describe("Default document calculation mode. `b2b_standard` applies discounts before VAT on the net basis. `b2c_gross_discount` applies discounts to the gross payable amount and derives net/VAT afterward.")}).nullish().describe("Document calculation defaults. Controls whether newly calculated documents use the standard B2B net-first model or the B2C gross-discount model by default."),slovenia:e.object({business_form:e.union([e.literal("sp"),e.literal("doo"),e.literal("dno"),e.literal("club"),e.literal(null)]).nullish().describe("Stored Slovenian legal form for country-specific exports and reporting."),income_tax_regime:e.union([e.literal("normirani"),e.literal("dejanski"),e.literal(null)]).nullish().describe("Stored Slovenian income tax regime for yearly reporting."),vat_profile:e.union([e.literal("standard"),e.literal("special_vat_identified"),e.literal("non_vat_subject"),e.literal(null)]).nullish().describe("Stored Slovenian VAT subject subtype."),tax_residency:e.union([e.literal("resident"),e.literal("non_resident"),e.literal(null)]).nullish().describe("Stored Slovenian tax residency status."),yearly_reporting:e.object({activity_code:e.string().max(wE).nullish().describe("Primary Slovenian SKD activity code used for yearly reporting."),registration_number:e.string().max(CE).nullish().describe("Optional registration number / branch registration used in yearly reporting."),accounting_type:e.union([e.literal("records"),e.literal("single_entry"),e.literal("double_entry"),e.literal(null)]).nullish().describe("Bookkeeping / records mode used in the yearly filing."),normiranec_insurance_basis:e.union([e.literal("full_time_self_employed"),e.literal("other"),e.literal(null)]).nullish().describe("Insurance basis used for normirani expense and tax rules."),default_withholding_tax_amount:e.number().min(AE).nullish().describe("Persisted default for withholding tax manually entered during yearly review."),default_foreign_tax_credit_amount:e.number().min(ME).nullish().describe("Persisted default for foreign tax credit manually entered during yearly review.")}).nullish().describe("Slovenia-specific yearly reporting defaults and profile data."),accounting_exports:e.object({preferred_format:e.union([e.literal("vod_xml"),e.literal("vasco_xml"),e.literal("minimax_xml"),e.literal(null)]).nullish().describe("Stored preferred export format for Slovenian accounting handoff."),konto_mappings:e.object({receivables:e.string().max(TE).nullish(),payables:e.string().max(kE).nullish(),sales_vat_22:e.string().max(BE).nullish(),sales_vat_95:e.string().max(NE).nullish(),sales_vat_5:e.string().max(OE).nullish(),purchase_vat_recoverable_22:e.string().max(FE).nullish(),purchase_vat_recoverable_95:e.string().max(UE).nullish(),purchase_vat_recoverable_5:e.string().max(jE).nullish(),sales_revenue_22:e.string().max(qE).nullish(),sales_revenue_95:e.string().max(WE).nullish(),sales_revenue_5:e.string().max(GE).nullish(),sales_revenue_exempt:e.string().max(VE).nullish(),sales_revenue_eu_goods:e.string().max(LE).nullish(),sales_revenue_eu_services:e.string().max(HE).nullish(),sales_revenue_reverse_charge:e.string().max(YE).nullish(),sales_revenue_third_country_goods:e.string().max(KE).nullish(),sales_revenue_third_country_services:e.string().max($E).nullish(),purchase_expense_22:e.string().max(QE).nullish(),purchase_expense_95:e.string().max(JE).nullish(),purchase_expense_5:e.string().max(ZE).nullish(),purchase_expense_exempt:e.string().max(XE).nullish(),purchase_expense_eu_goods:e.string().max(eS).nullish(),purchase_expense_eu_services:e.string().max(tS).nullish(),purchase_expense_reverse_charge:e.string().max(oS).nullish(),purchase_expense_third_country_goods:e.string().max(nS).nullish(),purchase_expense_third_country_services:e.string().max(sS).nullish()}).nullish().describe("Stored semantic konto mappings shared by Slovenian accounting exports.")}).nullish().describe("Slovenia-specific accounting export defaults and konto mappings.")}).nullish().describe("Slovenia-specific tax profile used by yearly eDavki exports and future Slovenia-specific reporting flows."),furs:e.object({enabled:e.boolean().default(rS).describe("Whether FURS fiscalization is enabled for this entity"),default_skip_fiscalization:e.boolean().default(iS).describe("Whether new FURS-capable documents should start with fiscalization skipped by default. Payment type rules still override this and require fiscalization for non-bank-transfer payments."),numbering_strategy:e.enum(["B","C"]).optional().describe("Numbering strategy: B (device-level) or C (centralized). Optional - can be set per-premise."),operator_tax_number:e.string().optional().describe("Operator tax number for this entity (used when creating invoices via API key)"),operator_label:e.string().optional().describe("Operator label/name for this entity"),foreign_operator:e.boolean().optional().describe("Whether the operator is a foreign legal entity"),environment:e.enum(["test","production"]).optional().describe("FURS environment override (test or production). When omitted, derived from entity environment.")}).nullish().describe("FURS (Slovenia) fiscalization settings. Certificate data is stored separately via the certificate upload endpoint."),fina:e.object({enabled:e.boolean().default(aS).describe("Whether CIS (FINA) fiscalization is enabled for this entity"),operator_oib:e.string().min(dS).max(cS).optional().describe("OIB of the operator (11 digits). Used when creating invoices via API key."),operator_label:e.string().optional().describe("Operator label/name for this entity"),u_sust_pdv:e.boolean().default(lS).describe("Whether the entity is in the PDV (VAT) system. Most businesses are."),numbering_sequence:e.enum(["N","P"]).default(uS).describe("Numbering sequence: P (per premise) or N (per device)"),unified_numbering:e.boolean().nullish().describe("When enabled (default: true), all documents use the same FINA numbering sequence regardless of transaction type (domestic/non-domestic)"),certificate_expiry:e.string().optional().describe("Certificate expiry date (ISO 8601 format)")}).nullish().describe("FINA (Croatia) CIS fiscalization settings. Required for Croatian B2C invoicing. Certificate data is stored separately via the certificate upload endpoint."),pt:e.object({operator_first_name:e.string().min(1).optional().describe("Default PT operator first name for API key and headless document creation"),operator_last_name:e.string().min(1).optional().describe("Default PT operator last name for API key and headless document creation"),operator_tax_number:e.string().regex(pS).optional().describe("Default PT operator tax number for API key and headless document creation")}).nullish().describe("Portugal operator defaults used for PT document creation when request-level or user-level PT operator data is not available."),tax_rules:e.object({eu:e.object({vies_validate_vat:e.boolean().default(mS).describe("Validate EU VAT numbers against the VIES API. When enabled, customer VAT numbers are checked for validity before creating invoices. Validation results are cached on customer records. If VIES is unavailable, invoice creation continues with a warning."),auto_reverse_charge:e.boolean().default(gS).describe("Automatically apply 0% tax (reverse charge) for intra-EU B2B transactions. When enabled, taxes are removed and replaced with reverse charge note for valid VIES-validated cross-border B2B sales. Requires vies_validate_vat to be enabled for VAT validation."),auto_remove_tax_export:e.boolean().default(yS).describe("Automatically remove all taxes for exports to non-EU countries. When enabled, invoices to customers outside the EU will have all tax lines removed."),require_gross_prices:e.boolean().default(hS).describe("Require gross prices when reverse charge is applied. When enabled, creates a validation error if net prices are used with reverse charge transactions, since removing tax would change the invoice total.")}).nullish().describe("EU tax rules settings. Only applicable for entities based in EU countries. Set to null or omit for non-EU entities.")}).nullish().describe("Tax rules engine settings. Controls automatic tax behaviors based on entity location and transaction characteristics (VIES validation, reverse charge, export tax removal). Defaults are set automatically based on entity country. Set to null for non-EU entities."),overdue_notifications:e.object({enabled:e.boolean().default(bS).describe("Enable automatic overdue invoice notification emails to customers"),threshold_days:e.array(e.number().gt(xS)).default(zS).describe("Days overdue when notification emails are sent (exact day match). Email is triggered when any invoice hits these thresholds."),email_subject:e.string().nullish().describe("Custom email subject. Available variables: {customer_name}, {entity_name}, {overdue_count}"),email_body:e.string().nullish().describe("Custom email body. Available variables: {customer_name}, {entity_name}, {invoice_list}, {total_amount}, {entity_email}. If {invoice_list} is not included, the invoice table will be auto-appended.")}).nullish().describe("Settings for automatic overdue invoice notification emails to customers"),upn_qr:e.object({enabled:e.boolean().describe("Whether UPN QR payment slip is enabled on invoices (Slovenia only)"),display_mode:e.enum(["qr_only","full_slip"]).default(_S).describe("Display mode for UPN payment slip: 'qr_only' shows QR code inline after content, 'full_slip' shows complete payment slip at page bottom"),purpose_code:e.string().min(fS).max(RS).regex(IS).default(vS).describe("4-letter purpose code for UPN payments (ISO 20022). Common values: OTHR (other), GDSV (goods/services), SALA (salary)")}).nullish().describe("UPN QR payment slip settings (Slovenia only). Displays payment QR code on invoices for easy bank transfers."),epc_qr:e.object({enabled:e.boolean().describe("Whether EPC QR code is enabled on EUR invoices (SEPA countries)")}).nullish().describe("EPC QR code settings (SEPA countries). Displays SEPA credit transfer QR code on EUR invoices for easy bank payment."),bank_accounts:e.array(e.object({type:e.enum(["iban","us_domestic","uk_domestic","other"]).default(ES).describe("Account type determines which fields are used"),name:e.string().nullish().describe("Display name for this account. Falls back to account number if not set"),bank_name:e.string().nullish().describe("Bank name"),iban:e.string().nullish().describe("IBAN (for type=iban)"),account_number:e.string().nullish().describe("Account number (for us_domestic, uk_domestic, other)"),bic:e.string().nullish().describe("BIC/SWIFT code for international transfers"),routing_number:e.string().nullish().describe("US ABA routing number (for type=us_domestic)"),sort_code:e.string().nullish().describe("UK sort code (for type=uk_domestic)"),is_default:e.boolean().nullish().describe("Whether this is the default account for new invoices")})).nullish().describe("Bank accounts for receiving payments. The first account with is_default=true (or first in list) is used for new invoices."),eslog_validation_enabled:e.boolean().nullish().describe("Enable e-SLOG 2.0 validation for documents. Only applicable for Slovenian entities (country_code = 'SI'). When enabled, documents are validated against e-SLOG 2.0 requirements and can be exported as e-SLOG XML if valid."),delivery_note_hide_prices:e.boolean().nullish().describe("Default hide_prices setting for new delivery notes. When true, prices and totals are hidden (packing list mode)."),credit_note_negative_values:e.boolean().nullish().describe("When true (default), credit note PDFs display line item quantities and totals as negative values while keeping prices positive. Zero quantities and totals stay unsigned. Set to false to show quantities and totals as positive."),show_payment_amounts:e.boolean().nullish().describe("When true, rendered document payment/refund sections show the payment amount next to each payment type. Defaults to false, which shows only the payment or refund type."),receipt_note:e.string().max(SS).nullish().describe("Default note printed on thermal receipts."),receipt_footer:e.string().max(DS).nullish().describe("Default footer text printed on thermal receipts (e.g. IBAN, thank-you message)."),receipt_signature:e.string().max(PS).nullish().describe("Default signature / issuer label printed on thermal receipts."),tax_clause_defaults:e.object({domestic:e.string().nullish().describe("Default tax clause for domestic transactions (same country)"),intra_eu_b2b:e.string().nullish().describe("Default tax clause for intra-EU B2B transactions (reverse charge applies)"),intra_eu_b2c:e.string().nullish().describe("Default tax clause for intra-EU B2C transactions"),"3w_b2b":e.string().nullish().describe("Default tax clause for third-world B2B transactions (non-EU, business customer)"),"3w_b2c":e.string().nullish().describe("Default tax clause for third-world B2C transactions (non-EU, end consumer)"),export:e.string().nullish().describe("Deprecated: Use 3w_b2b and 3w_b2c instead. Default tax clause for export transactions.")}).nullish().describe("Default tax clauses per transaction type. Auto-applied to documents based on transaction type determination. Supports template variables: {entity_name}, {customer_name}, {document_number}, etc."),e_invoicing:e.object({enabled:e.boolean().default(wS).describe("Whether e-invoicing is enabled for this entity. Requires supplier onboarding to be completed before documents can be sent."),provider:e.enum(["flowin"]).default(CS).describe("E-invoicing provider. Currently only Flowin (Wolters Kluwer) is supported."),auto_send:e.boolean().default(AS).describe("Automatically send invoices via e-invoice after creation. Only works when entity is fully onboarded with the provider."),default_scheme_id:e.string().optional().describe('Default Peppol participant scheme ID for this entity. Common values: "0009" (SIRET, France), "9925" (VAT, Belgium), "0088" (EAN/GLN).')}).nullish().describe("E-invoicing settings for sending documents via Peppol network (through Flowin). Requires supplier onboarding before documents can be sent electronically.")}).optional().describe("Entity settings"),metadata:e.record(e.string(),e.string()).nullish().describe("Custom key-value data for your own use. Store any JSON object up to 50 properties. Values must be strings up to 250 characters. Useful for storing external IDs, tags, or integration data.")}),MS=10,TS=100,kS="live",gxe=e.object({limit:e.number().min(1).max(TS).default(MS).describe("Number of results per request."),next_cursor:e.string().optional().describe("Opaque cursor to fetch the next page of results. Reuse only with the same effective ordering. Use the value from pagination.next_cursor in the previous response."),prev_cursor:e.string().optional().describe("Opaque cursor to fetch the previous page of results. Reuse only with the same effective ordering. Use the value from pagination.prev_cursor in the previous response."),include_total_count:e.boolean().optional().describe("Whether to include the total count of items in `pagination.total`.\nDefault is `true`.\nWhen `false`, `pagination.total` returns -1 for better performance."),order_by:e.union([e.enum(["id","name","country","created_at","updated_at","-id","-name","-country","-created_at","-updated_at"]),e.array(e.enum(["id","name","country","created_at","updated_at","-id","-name","-country","-created_at","-updated_at"]))]).optional().describe("Sort by one field or provide a repeated array for multi-column ordering. Prefix a field with `-` for descending order. When paginating, reuse cursors only with the same effective ordering."),query:e.string().optional().describe('JSON query object for filtering results. Supports MongoDB-style operators.\n\n**Supported operators:**\n- `equals` or direct value - Exact match (default)\n- `gte` - Greater than or equal\n- `lte` - Less than or equal\n- `gt` - Greater than\n- `lt` - Less than\n- `in` - Value in array\n- `notIn` - Value not in array\n- `contains` - String contains (case-insensitive)\n- `startsWith` - String starts with\n- `endsWith` - String ends with\n- `between` - Value between two numbers/dates [min, max]\n\n**Allowed fields:** id, name, country, currency_code, created_at, updated_at\n\n**Examples:**\n- `{"total": {"gte": 1000}}` - Invoices over 1000\n- `{"customer.name": {"contains": "Acme"}}` - Customer name contains "Acme"\n- `{"date": {"between": ["2025-01-01", "2025-12-31"]}}` - Date range'),search:e.string().optional().describe(`Full-text search query to filter results across multiple fields.
|
|
130
|
+
Searches are case-insensitive and match partial strings.
|
|
131
|
+
Searches across all text fields including names, descriptions, addresses, and metadata values.`),environment:e.enum(["live","sandbox"]).default(kS).describe('Environment making queries on. Defaults to "live".')}),BS=/^acc_[0-9a-fA-F]{24}$/,yxe=e.object({"x-account-id":e.string().regex(BS).optional().describe("Account Id on which the request is made. Optional if user is part of only one account.")}),NS=36,OS=255,FS=500,US=500,jS=20,qS=100,WS=100,GS=100,VS=2,LS=3,HS=20,YS=50,KS=50,$S=50,QS=50,JS=255,ZS=500,XS=10,eD=-140737488355328,tD=0x7fffffffffff,oD=36,nD=/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/,sD=30,rD=100,iD=0,aD=0,dD=500,cD=10,lD=50,uD=0,pD=0,mD=8,gD=8,yD=8,hD=8,bD=8,xD=8,zD=8,_D=8,vD=8,fD=8,RD=8,ID=8,ED=8,SD=8,DD=8,PD=8,wD=8,CD=8,AD=8,MD=8,TD=8,kD=8,BD=8,ND=8,OD=8,FD=8,UD=false,jD=false,qD=false,WD=11,GD=11,VD=true,LD="P",HD=/^\d{9}$/,YD=true,KD=false,$D=false,QD=false,JD=false,ZD=0,XD=[7,14,30],e4="qr_only",t4="OTHR",o4=4,n4=4,s4=/^[A-Z]{4}$/,r4="iban",i4=500,a4=500,d4=200,c4=false,l4="flowin",u4=false,hxe=e.object({data:e.array(e.object({id:e.string().max(NS),name:e.string().max(OS),address:e.string().max(FS).nullish(),address_2:e.string().max(US).nullish(),post_code:e.string().max(jS).nullish(),city:e.string().max(qS).nullish(),state:e.string().max(WS).nullish(),country:e.string().max(GS),country_code:e.string().max(VS),currency_code:e.string().max(LS).nullish(),locale:e.string().max(HS),tax_number:e.string().max(YS).nullish(),tax_number_2:e.string().max(KS).nullish(),company_number:e.string().max($S).nullish(),phone:e.string().max(QS).nullish(),email:e.string().max(JS).nullish(),website:e.string().max(ZS).nullish(),fiscal_region_code:e.string().max(XS).nullish(),starting_capital:e.number().min(eD).max(tD).nullish(),account_id:e.string().max(oD),environment:e.enum(["live","sandbox"]).describe("Entity environment"),is_tax_subject:e.boolean(),is_enabled:e.boolean().describe("Whether the entity is enabled. Disabled entities cannot create documents (invoices, estimates, etc.) but all data remains accessible and settings can be updated."),settings:e.object({pdf_template:e.union([e.literal("modern"),e.literal("classic"),e.literal("condensed"),e.literal("minimal"),e.literal("fashion"),e.literal("timeless_modern_full_data"),e.literal(null)]).nullish().describe("Default PDF template for document rendering. Defaults to 'modern' if not set."),number_formats:e.object({invoice:e.string().nullish(),estimate:e.string().nullish(),credit_note:e.string().nullish(),advance_invoice:e.string().nullish(),delivery_note:e.string().nullish()}).nullish(),primary_color:e.string().regex(nD).nullish(),logo_scale_percent:e.number().min(sD).max(rD).nullish().describe("Scale the PDF logo size as a percentage of the template default size. 100 keeps the original size."),has_logo:e.boolean().nullish(),has_signature:e.boolean().nullish(),default_invoice_due_days:e.number().gt(iD).nullish().describe("Default number of days until invoice is due (from invoice date)"),default_estimate_valid_days:e.number().gt(aD).nullish().describe("Default number of days until estimate expires (from estimate date)"),email_defaults:e.object({invoice_subject:e.string().nullish().describe("Default subject line for invoice emails. Available variables: {document_number}, {entity_name}, {entity_email}, {entity_address}, {entity_post_code}, {entity_city}, {entity_country}, {entity_tax_number}, {entity_company_number}, {customer_name}, {document_date}, {document_due_date}, {document_total}, {document_currency}"),invoice_body:e.string().nullish().describe("Default body text for invoice emails. Available variables: {document_number}, {entity_name}, {entity_email}, {entity_address}, {entity_post_code}, {entity_city}, {entity_country}, {entity_tax_number}, {entity_company_number}, {customer_name}, {document_date}, {document_due_date}, {document_total}, {document_currency}"),estimate_subject:e.string().nullish().describe("Default subject line for estimate emails. Available variables: {document_number}, {entity_name}, {entity_email}, {entity_address}, {entity_post_code}, {entity_city}, {entity_country}, {entity_tax_number}, {entity_company_number}, {customer_name}, {document_date}, {document_valid_until}, {document_total}, {document_currency}"),estimate_body:e.string().nullish().describe("Default body text for estimate emails. Available variables: {document_number}, {entity_name}, {entity_email}, {entity_address}, {entity_post_code}, {entity_city}, {entity_country}, {entity_tax_number}, {entity_company_number}, {customer_name}, {document_date}, {document_valid_until}, {document_total}, {document_currency}"),credit_note_subject:e.string().nullish().describe("Default subject line for credit note emails. Available variables: {document_number}, {entity_name}, {entity_email}, {entity_address}, {entity_post_code}, {entity_city}, {entity_country}, {entity_tax_number}, {entity_company_number}, {customer_name}, {document_date}, {document_total}, {document_currency}"),credit_note_body:e.string().nullish().describe("Default body text for credit note emails. Available variables: {document_number}, {entity_name}, {entity_email}, {entity_address}, {entity_post_code}, {entity_city}, {entity_country}, {entity_tax_number}, {entity_company_number}, {customer_name}, {document_date}, {document_total}, {document_currency}"),advance_invoice_subject:e.string().nullish().describe("Default subject line for advance invoice emails. Available variables: {document_number}, {entity_name}, {entity_email}, {entity_address}, {entity_post_code}, {entity_city}, {entity_country}, {entity_tax_number}, {entity_company_number}, {customer_name}, {document_date}, {document_total}, {document_currency}"),advance_invoice_body:e.string().nullish().describe("Default body text for advance invoice emails. Available variables: {document_number}, {entity_name}, {entity_email}, {entity_address}, {entity_post_code}, {entity_city}, {entity_country}, {entity_tax_number}, {entity_company_number}, {customer_name}, {document_date}, {document_total}, {document_currency}"),delivery_note_subject:e.string().nullish().describe("Default subject line for delivery note emails. Available variables: {document_number}, {entity_name}, {entity_email}, {entity_address}, {entity_post_code}, {entity_city}, {entity_country}, {entity_tax_number}, {entity_company_number}, {customer_name}, {document_date}, {document_total}, {document_currency}"),delivery_note_body:e.string().nullish().describe("Default body text for delivery note emails. Available variables: {document_number}, {entity_name}, {entity_email}, {entity_address}, {entity_post_code}, {entity_city}, {entity_country}, {entity_tax_number}, {entity_company_number}, {customer_name}, {document_date}, {document_total}, {document_currency}")}).nullish(),default_invoice_note:e.string().nullish().describe("Default note for new invoices. Supports template variables: {entity_name}, {entity_email}, {document_number}, {document_date}, {document_due_date}, {document_total}, {document_currency}, {customer_name}, {customer_email}, {current_date}, {current_year}"),default_invoice_payment_terms:e.string().nullish().describe("Default payment terms for new invoices. Supports template variables: {entity_name}, {entity_email}, {document_number}, {document_date}, {document_due_date}, {document_total}, {document_currency}, {customer_name}, {customer_email}, {current_date}, {current_year}"),default_estimate_note:e.string().nullish().describe("Default note for new estimates. Supports template variables: {entity_name}, {entity_email}, {document_number}, {document_date}, {document_valid_until}, {document_total}, {document_currency}, {customer_name}, {customer_email}, {current_date}, {current_year}"),default_estimate_payment_terms:e.string().nullish().describe("Default payment terms for new estimates. Supports template variables: {entity_name}, {entity_email}, {document_number}, {document_date}, {document_valid_until}, {document_total}, {document_currency}, {customer_name}, {customer_email}, {current_date}, {current_year}"),default_credit_note_note:e.string().nullish().describe("Default note for new credit notes. Supports template variables: {entity_name}, {entity_email}, {document_number}, {document_date}, {document_total}, {document_currency}, {customer_name}, {customer_email}, {current_date}, {current_year}"),default_credit_note_payment_terms:e.string().nullish().describe("Default payment terms for new credit notes. Supports template variables: {entity_name}, {entity_email}, {document_number}, {document_date}, {document_total}, {document_currency}, {customer_name}, {customer_email}, {current_date}, {current_year}"),default_advance_invoice_note:e.string().nullish().describe("Default note for new advance invoices. Supports template variables: {entity_name}, {entity_email}, {document_number}, {document_date}, {document_total}, {document_currency}, {customer_name}, {customer_email}, {current_date}, {current_year}"),default_delivery_note_note:e.string().nullish().describe("Default note for new delivery notes. Supports template variables: {entity_name}, {entity_email}, {document_number}, {document_date}, {document_total}, {document_currency}, {customer_name}, {customer_email}, {current_date}, {current_year}"),document_footer:e.string().max(dD).nullish().describe("Footer text for PDF documents. Supports template variables: {entity_name}, {entity_email}, {document_number}, {document_date}, {document_due_date}, {document_total}, {document_currency}, {customer_name}, {customer_email}, {current_date}, {current_year}"),default_document_signature:e.string().nullish().describe("Default signature text for all new documents. Supports template variables: {entity_name}, {entity_email}, {document_number}, {document_date}, {document_due_date}, {document_total}, {document_currency}, {customer_name}, {customer_email}, {current_date}, {current_year}"),calculation:e.object({default_mode:e.union([e.literal("b2b_standard"),e.literal("b2c_gross_discount"),e.literal(null)]).nullish().describe("Default document calculation mode. `b2b_standard` applies discounts before VAT on the net basis. `b2c_gross_discount` applies discounts to the gross payable amount and derives net/VAT afterward.")}).nullish().describe("Document calculation defaults. Controls whether newly calculated documents use the standard B2B net-first model or the B2C gross-discount model by default."),slovenia:e.object({business_form:e.union([e.literal("sp"),e.literal("doo"),e.literal("dno"),e.literal("club"),e.literal(null)]).nullish().describe("Stored Slovenian legal form for country-specific exports and reporting."),income_tax_regime:e.union([e.literal("normirani"),e.literal("dejanski"),e.literal(null)]).nullish().describe("Stored Slovenian income tax regime for yearly reporting."),vat_profile:e.union([e.literal("standard"),e.literal("special_vat_identified"),e.literal("non_vat_subject"),e.literal(null)]).nullish().describe("Stored Slovenian VAT subject subtype."),tax_residency:e.union([e.literal("resident"),e.literal("non_resident"),e.literal(null)]).nullish().describe("Stored Slovenian tax residency status."),yearly_reporting:e.object({activity_code:e.string().max(cD).nullish().describe("Primary Slovenian SKD activity code used for yearly reporting."),registration_number:e.string().max(lD).nullish().describe("Optional registration number / branch registration used in yearly reporting."),accounting_type:e.union([e.literal("records"),e.literal("single_entry"),e.literal("double_entry"),e.literal(null)]).nullish().describe("Bookkeeping / records mode used in the yearly filing."),normiranec_insurance_basis:e.union([e.literal("full_time_self_employed"),e.literal("other"),e.literal(null)]).nullish().describe("Insurance basis used for normirani expense and tax rules."),default_withholding_tax_amount:e.number().min(uD).nullish().describe("Persisted default for withholding tax manually entered during yearly review."),default_foreign_tax_credit_amount:e.number().min(pD).nullish().describe("Persisted default for foreign tax credit manually entered during yearly review.")}).nullish().describe("Slovenia-specific yearly reporting defaults and profile data."),accounting_exports:e.object({preferred_format:e.union([e.literal("vod_xml"),e.literal("vasco_xml"),e.literal("minimax_xml"),e.literal(null)]).nullish().describe("Stored preferred export format for Slovenian accounting handoff."),konto_mappings:e.object({receivables:e.string().max(mD).nullish(),payables:e.string().max(gD).nullish(),sales_vat_22:e.string().max(yD).nullish(),sales_vat_95:e.string().max(hD).nullish(),sales_vat_5:e.string().max(bD).nullish(),purchase_vat_recoverable_22:e.string().max(xD).nullish(),purchase_vat_recoverable_95:e.string().max(zD).nullish(),purchase_vat_recoverable_5:e.string().max(_D).nullish(),sales_revenue_22:e.string().max(vD).nullish(),sales_revenue_95:e.string().max(fD).nullish(),sales_revenue_5:e.string().max(RD).nullish(),sales_revenue_exempt:e.string().max(ID).nullish(),sales_revenue_eu_goods:e.string().max(ED).nullish(),sales_revenue_eu_services:e.string().max(SD).nullish(),sales_revenue_reverse_charge:e.string().max(DD).nullish(),sales_revenue_third_country_goods:e.string().max(PD).nullish(),sales_revenue_third_country_services:e.string().max(wD).nullish(),purchase_expense_22:e.string().max(CD).nullish(),purchase_expense_95:e.string().max(AD).nullish(),purchase_expense_5:e.string().max(MD).nullish(),purchase_expense_exempt:e.string().max(TD).nullish(),purchase_expense_eu_goods:e.string().max(kD).nullish(),purchase_expense_eu_services:e.string().max(BD).nullish(),purchase_expense_reverse_charge:e.string().max(ND).nullish(),purchase_expense_third_country_goods:e.string().max(OD).nullish(),purchase_expense_third_country_services:e.string().max(FD).nullish()}).nullish().describe("Stored semantic konto mappings shared by Slovenian accounting exports.")}).nullish().describe("Slovenia-specific accounting export defaults and konto mappings.")}).nullish().describe("Slovenia-specific tax profile used by yearly eDavki exports and future Slovenia-specific reporting flows."),furs:e.object({enabled:e.boolean().default(UD).describe("Whether FURS fiscalization is enabled for this entity"),default_skip_fiscalization:e.boolean().default(jD).describe("Whether new FURS-capable documents should start with fiscalization skipped by default. Payment type rules still override this and require fiscalization for non-bank-transfer payments."),numbering_strategy:e.enum(["B","C"]).optional().describe("Numbering strategy: B (device-level) or C (centralized). Optional - can be set per-premise."),operator_tax_number:e.string().optional().describe("Operator tax number for this entity (used when creating invoices via API key)"),operator_label:e.string().optional().describe("Operator label/name for this entity"),foreign_operator:e.boolean().optional().describe("Whether the operator is a foreign legal entity"),environment:e.enum(["test","production"]).optional().describe("FURS environment override (test or production). When omitted, derived from entity environment.")}).nullish().describe("FURS (Slovenia) fiscalization settings. Certificate data is stored separately via the certificate upload endpoint."),fina:e.object({enabled:e.boolean().default(qD).describe("Whether CIS (FINA) fiscalization is enabled for this entity"),operator_oib:e.string().min(WD).max(GD).optional().describe("OIB of the operator (11 digits). Used when creating invoices via API key."),operator_label:e.string().optional().describe("Operator label/name for this entity"),u_sust_pdv:e.boolean().default(VD).describe("Whether the entity is in the PDV (VAT) system. Most businesses are."),numbering_sequence:e.enum(["N","P"]).default(LD).describe("Numbering sequence: P (per premise) or N (per device)"),unified_numbering:e.boolean().nullish().describe("When enabled (default: true), all documents use the same FINA numbering sequence regardless of transaction type (domestic/non-domestic)"),certificate_expiry:e.string().optional().describe("Certificate expiry date (ISO 8601 format)")}).nullish().describe("FINA (Croatia) CIS fiscalization settings. Required for Croatian B2C invoicing. Certificate data is stored separately via the certificate upload endpoint."),pt:e.object({operator_first_name:e.string().min(1).optional().describe("Default PT operator first name for API key and headless document creation"),operator_last_name:e.string().min(1).optional().describe("Default PT operator last name for API key and headless document creation"),operator_tax_number:e.string().regex(HD).optional().describe("Default PT operator tax number for API key and headless document creation")}).nullish().describe("Portugal operator defaults used for PT document creation when request-level or user-level PT operator data is not available."),tax_rules:e.object({eu:e.object({vies_validate_vat:e.boolean().default(YD).describe("Validate EU VAT numbers against the VIES API. When enabled, customer VAT numbers are checked for validity before creating invoices. Validation results are cached on customer records. If VIES is unavailable, invoice creation continues with a warning."),auto_reverse_charge:e.boolean().default(KD).describe("Automatically apply 0% tax (reverse charge) for intra-EU B2B transactions. When enabled, taxes are removed and replaced with reverse charge note for valid VIES-validated cross-border B2B sales. Requires vies_validate_vat to be enabled for VAT validation."),auto_remove_tax_export:e.boolean().default($D).describe("Automatically remove all taxes for exports to non-EU countries. When enabled, invoices to customers outside the EU will have all tax lines removed."),require_gross_prices:e.boolean().default(QD).describe("Require gross prices when reverse charge is applied. When enabled, creates a validation error if net prices are used with reverse charge transactions, since removing tax would change the invoice total.")}).nullish().describe("EU tax rules settings. Only applicable for entities based in EU countries. Set to null or omit for non-EU entities.")}).nullish().describe("Tax rules engine settings. Controls automatic tax behaviors based on entity location and transaction characteristics (VIES validation, reverse charge, export tax removal). Defaults are set automatically based on entity country. Set to null for non-EU entities."),overdue_notifications:e.object({enabled:e.boolean().default(JD).describe("Enable automatic overdue invoice notification emails to customers"),threshold_days:e.array(e.number().gt(ZD)).default(XD).describe("Days overdue when notification emails are sent (exact day match). Email is triggered when any invoice hits these thresholds."),email_subject:e.string().nullish().describe("Custom email subject. Available variables: {customer_name}, {entity_name}, {overdue_count}"),email_body:e.string().nullish().describe("Custom email body. Available variables: {customer_name}, {entity_name}, {invoice_list}, {total_amount}, {entity_email}. If {invoice_list} is not included, the invoice table will be auto-appended.")}).nullish().describe("Settings for automatic overdue invoice notification emails to customers"),upn_qr:e.object({enabled:e.boolean().describe("Whether UPN QR payment slip is enabled on invoices (Slovenia only)"),display_mode:e.enum(["qr_only","full_slip"]).default(e4).describe("Display mode for UPN payment slip: 'qr_only' shows QR code inline after content, 'full_slip' shows complete payment slip at page bottom"),purpose_code:e.string().min(o4).max(n4).regex(s4).default(t4).describe("4-letter purpose code for UPN payments (ISO 20022). Common values: OTHR (other), GDSV (goods/services), SALA (salary)")}).nullish().describe("UPN QR payment slip settings (Slovenia only). Displays payment QR code on invoices for easy bank transfers."),epc_qr:e.object({enabled:e.boolean().describe("Whether EPC QR code is enabled on EUR invoices (SEPA countries)")}).nullish().describe("EPC QR code settings (SEPA countries). Displays SEPA credit transfer QR code on EUR invoices for easy bank payment."),bank_accounts:e.array(e.object({type:e.enum(["iban","us_domestic","uk_domestic","other"]).default(r4).describe("Account type determines which fields are used"),name:e.string().nullish().describe("Display name for this account. Falls back to account number if not set"),bank_name:e.string().nullish().describe("Bank name"),iban:e.string().nullish().describe("IBAN (for type=iban)"),account_number:e.string().nullish().describe("Account number (for us_domestic, uk_domestic, other)"),bic:e.string().nullish().describe("BIC/SWIFT code for international transfers"),routing_number:e.string().nullish().describe("US ABA routing number (for type=us_domestic)"),sort_code:e.string().nullish().describe("UK sort code (for type=uk_domestic)"),is_default:e.boolean().nullish().describe("Whether this is the default account for new invoices")})).nullish().describe("Bank accounts for receiving payments. The first account with is_default=true (or first in list) is used for new invoices."),eslog_validation_enabled:e.boolean().nullish().describe("Enable e-SLOG 2.0 validation for documents. Only applicable for Slovenian entities (country_code = 'SI'). When enabled, documents are validated against e-SLOG 2.0 requirements and can be exported as e-SLOG XML if valid."),delivery_note_hide_prices:e.boolean().nullish().describe("Default hide_prices setting for new delivery notes. When true, prices and totals are hidden (packing list mode)."),credit_note_negative_values:e.boolean().nullish().describe("When true (default), credit note PDFs display line item quantities and totals as negative values while keeping prices positive. Zero quantities and totals stay unsigned. Set to false to show quantities and totals as positive."),show_payment_amounts:e.boolean().nullish().describe("When true, rendered document payment/refund sections show the payment amount next to each payment type. Defaults to false, which shows only the payment or refund type."),receipt_note:e.string().max(i4).nullish().describe("Default note printed on thermal receipts."),receipt_footer:e.string().max(a4).nullish().describe("Default footer text printed on thermal receipts (e.g. IBAN, thank-you message)."),receipt_signature:e.string().max(d4).nullish().describe("Default signature / issuer label printed on thermal receipts."),tax_clause_defaults:e.object({domestic:e.string().nullish().describe("Default tax clause for domestic transactions (same country)"),intra_eu_b2b:e.string().nullish().describe("Default tax clause for intra-EU B2B transactions (reverse charge applies)"),intra_eu_b2c:e.string().nullish().describe("Default tax clause for intra-EU B2C transactions"),"3w_b2b":e.string().nullish().describe("Default tax clause for third-world B2B transactions (non-EU, business customer)"),"3w_b2c":e.string().nullish().describe("Default tax clause for third-world B2C transactions (non-EU, end consumer)"),export:e.string().nullish().describe("Deprecated: Use 3w_b2b and 3w_b2c instead. Default tax clause for export transactions.")}).nullish().describe("Default tax clauses per transaction type. Auto-applied to documents based on transaction type determination. Supports template variables: {entity_name}, {customer_name}, {document_number}, etc."),e_invoicing:e.object({enabled:e.boolean().default(c4).describe("Whether e-invoicing is enabled for this entity. Requires supplier onboarding to be completed before documents can be sent."),provider:e.enum(["flowin"]).default(l4).describe("E-invoicing provider. Currently only Flowin (Wolters Kluwer) is supported."),auto_send:e.boolean().default(u4).describe("Automatically send invoices via e-invoice after creation. Only works when entity is fully onboarded with the provider."),default_scheme_id:e.string().optional().describe('Default Peppol participant scheme ID for this entity. Common values: "0009" (SIRET, France), "9925" (VAT, Belgium), "0088" (EAN/GLN).')}).nullish().describe("E-invoicing settings for sending documents via Peppol network (through Flowin). Requires supplier onboarding before documents can be sent electronically.")}).describe("Entity settings"),metadata:e.record(e.string(),e.string()).nullish().describe("Custom key-value data for your own use. Store any JSON object up to 50 properties. Values must be strings up to 250 characters. Useful for storing external IDs, tags, or integration data."),created_at:e.iso.datetime({}),updated_at:e.iso.datetime({}),country_rules:e.object({max_taxes_per_item:e.number().min(1).describe("Maximum number of taxes allowed per line item"),features:e.array(e.string()).describe("Available country-specific features (availability only, not enabled status)")}).describe("Country-specific rules derived from entity's country_code")}).describe("Legal entity (business, club, sole-proprietor, ...) on which invoices and other resources are created.")),pagination:e.object({total:e.number().describe("Total number of items available in the collection"),next_cursor:e.string().nullable().describe("Opaque cursor for fetching the next page. It encodes the resolved sort tuple for the current result set, so reuse it only with the same effective ordering. Null if no more results are available."),prev_cursor:e.string().nullable().describe("Opaque cursor for fetching the previous page. It encodes the resolved sort tuple for the current result set, so reuse it only with the same effective ordering. Null if at the first page."),has_more:e.boolean().describe("Indicates whether more results are available after the current page")}).describe("Pagination metadata including cursors and result counts")}),p4=/^(?:[a-z]{3,4}_){0,2}[0-9a-f]{24}$/,bxe=e.object({id:e.stringFormat("resource-id",p4).describe("Space Invoices resource identifier (format: {prefix}_{hex24})")}),m4=/^acc_[0-9a-fA-F]{24}$/,xxe=e.object({"x-account-id":e.string().regex(m4).optional().describe("Account Id on which the request is made. Optional if user is part of only one account.")}),g4=36,y4=255,h4=500,b4=500,x4=20,z4=100,_4=100,v4=100,f4=2,R4=3,I4=20,E4=50,S4=50,D4=50,P4=50,w4=255,C4=500,A4=10,M4=-140737488355328,T4=0x7fffffffffff,k4=36,B4=/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/,N4=30,O4=100,F4=0,U4=0,j4=500,q4=10,W4=50,G4=0,V4=0,L4=8,H4=8,Y4=8,K4=8,$4=8,Q4=8,J4=8,Z4=8,X4=8,eP=8,tP=8,oP=8,nP=8,sP=8,rP=8,iP=8,aP=8,dP=8,cP=8,lP=8,uP=8,pP=8,mP=8,gP=8,yP=8,hP=8,bP=false,xP=false,zP=false,_P=11,vP=11,fP=true,RP="P",IP=/^\d{9}$/,EP=true,SP=false,DP=false,PP=false,wP=false,CP=0,AP=[7,14,30],MP="qr_only",TP="OTHR",kP=4,BP=4,NP=/^[A-Z]{4}$/,OP="iban",FP=500,UP=500,jP=200,qP=false,WP="flowin",GP=false,zxe=e.object({id:e.string().max(g4),name:e.string().max(y4),address:e.string().max(h4).nullish(),address_2:e.string().max(b4).nullish(),post_code:e.string().max(x4).nullish(),city:e.string().max(z4).nullish(),state:e.string().max(_4).nullish(),country:e.string().max(v4),country_code:e.string().max(f4),currency_code:e.string().max(R4).nullish(),locale:e.string().max(I4),tax_number:e.string().max(E4).nullish(),tax_number_2:e.string().max(S4).nullish(),company_number:e.string().max(D4).nullish(),phone:e.string().max(P4).nullish(),email:e.string().max(w4).nullish(),website:e.string().max(C4).nullish(),fiscal_region_code:e.string().max(A4).nullish(),starting_capital:e.number().min(M4).max(T4).nullish(),account_id:e.string().max(k4),environment:e.enum(["live","sandbox"]).describe("Entity environment"),is_tax_subject:e.boolean(),is_enabled:e.boolean().describe("Whether the entity is enabled. Disabled entities cannot create documents (invoices, estimates, etc.) but all data remains accessible and settings can be updated."),settings:e.object({pdf_template:e.union([e.literal("modern"),e.literal("classic"),e.literal("condensed"),e.literal("minimal"),e.literal("fashion"),e.literal("timeless_modern_full_data"),e.literal(null)]).nullish().describe("Default PDF template for document rendering. Defaults to 'modern' if not set."),number_formats:e.object({invoice:e.string().nullish(),estimate:e.string().nullish(),credit_note:e.string().nullish(),advance_invoice:e.string().nullish(),delivery_note:e.string().nullish()}).nullish(),primary_color:e.string().regex(B4).nullish(),logo_scale_percent:e.number().min(N4).max(O4).nullish().describe("Scale the PDF logo size as a percentage of the template default size. 100 keeps the original size."),has_logo:e.boolean().nullish(),has_signature:e.boolean().nullish(),default_invoice_due_days:e.number().gt(F4).nullish().describe("Default number of days until invoice is due (from invoice date)"),default_estimate_valid_days:e.number().gt(U4).nullish().describe("Default number of days until estimate expires (from estimate date)"),email_defaults:e.object({invoice_subject:e.string().nullish().describe("Default subject line for invoice emails. Available variables: {document_number}, {entity_name}, {entity_email}, {entity_address}, {entity_post_code}, {entity_city}, {entity_country}, {entity_tax_number}, {entity_company_number}, {customer_name}, {document_date}, {document_due_date}, {document_total}, {document_currency}"),invoice_body:e.string().nullish().describe("Default body text for invoice emails. Available variables: {document_number}, {entity_name}, {entity_email}, {entity_address}, {entity_post_code}, {entity_city}, {entity_country}, {entity_tax_number}, {entity_company_number}, {customer_name}, {document_date}, {document_due_date}, {document_total}, {document_currency}"),estimate_subject:e.string().nullish().describe("Default subject line for estimate emails. Available variables: {document_number}, {entity_name}, {entity_email}, {entity_address}, {entity_post_code}, {entity_city}, {entity_country}, {entity_tax_number}, {entity_company_number}, {customer_name}, {document_date}, {document_valid_until}, {document_total}, {document_currency}"),estimate_body:e.string().nullish().describe("Default body text for estimate emails. Available variables: {document_number}, {entity_name}, {entity_email}, {entity_address}, {entity_post_code}, {entity_city}, {entity_country}, {entity_tax_number}, {entity_company_number}, {customer_name}, {document_date}, {document_valid_until}, {document_total}, {document_currency}"),credit_note_subject:e.string().nullish().describe("Default subject line for credit note emails. Available variables: {document_number}, {entity_name}, {entity_email}, {entity_address}, {entity_post_code}, {entity_city}, {entity_country}, {entity_tax_number}, {entity_company_number}, {customer_name}, {document_date}, {document_total}, {document_currency}"),credit_note_body:e.string().nullish().describe("Default body text for credit note emails. Available variables: {document_number}, {entity_name}, {entity_email}, {entity_address}, {entity_post_code}, {entity_city}, {entity_country}, {entity_tax_number}, {entity_company_number}, {customer_name}, {document_date}, {document_total}, {document_currency}"),advance_invoice_subject:e.string().nullish().describe("Default subject line for advance invoice emails. Available variables: {document_number}, {entity_name}, {entity_email}, {entity_address}, {entity_post_code}, {entity_city}, {entity_country}, {entity_tax_number}, {entity_company_number}, {customer_name}, {document_date}, {document_total}, {document_currency}"),advance_invoice_body:e.string().nullish().describe("Default body text for advance invoice emails. Available variables: {document_number}, {entity_name}, {entity_email}, {entity_address}, {entity_post_code}, {entity_city}, {entity_country}, {entity_tax_number}, {entity_company_number}, {customer_name}, {document_date}, {document_total}, {document_currency}"),delivery_note_subject:e.string().nullish().describe("Default subject line for delivery note emails. Available variables: {document_number}, {entity_name}, {entity_email}, {entity_address}, {entity_post_code}, {entity_city}, {entity_country}, {entity_tax_number}, {entity_company_number}, {customer_name}, {document_date}, {document_total}, {document_currency}"),delivery_note_body:e.string().nullish().describe("Default body text for delivery note emails. Available variables: {document_number}, {entity_name}, {entity_email}, {entity_address}, {entity_post_code}, {entity_city}, {entity_country}, {entity_tax_number}, {entity_company_number}, {customer_name}, {document_date}, {document_total}, {document_currency}")}).nullish(),default_invoice_note:e.string().nullish().describe("Default note for new invoices. Supports template variables: {entity_name}, {entity_email}, {document_number}, {document_date}, {document_due_date}, {document_total}, {document_currency}, {customer_name}, {customer_email}, {current_date}, {current_year}"),default_invoice_payment_terms:e.string().nullish().describe("Default payment terms for new invoices. Supports template variables: {entity_name}, {entity_email}, {document_number}, {document_date}, {document_due_date}, {document_total}, {document_currency}, {customer_name}, {customer_email}, {current_date}, {current_year}"),default_estimate_note:e.string().nullish().describe("Default note for new estimates. Supports template variables: {entity_name}, {entity_email}, {document_number}, {document_date}, {document_valid_until}, {document_total}, {document_currency}, {customer_name}, {customer_email}, {current_date}, {current_year}"),default_estimate_payment_terms:e.string().nullish().describe("Default payment terms for new estimates. Supports template variables: {entity_name}, {entity_email}, {document_number}, {document_date}, {document_valid_until}, {document_total}, {document_currency}, {customer_name}, {customer_email}, {current_date}, {current_year}"),default_credit_note_note:e.string().nullish().describe("Default note for new credit notes. Supports template variables: {entity_name}, {entity_email}, {document_number}, {document_date}, {document_total}, {document_currency}, {customer_name}, {customer_email}, {current_date}, {current_year}"),default_credit_note_payment_terms:e.string().nullish().describe("Default payment terms for new credit notes. Supports template variables: {entity_name}, {entity_email}, {document_number}, {document_date}, {document_total}, {document_currency}, {customer_name}, {customer_email}, {current_date}, {current_year}"),default_advance_invoice_note:e.string().nullish().describe("Default note for new advance invoices. Supports template variables: {entity_name}, {entity_email}, {document_number}, {document_date}, {document_total}, {document_currency}, {customer_name}, {customer_email}, {current_date}, {current_year}"),default_delivery_note_note:e.string().nullish().describe("Default note for new delivery notes. Supports template variables: {entity_name}, {entity_email}, {document_number}, {document_date}, {document_total}, {document_currency}, {customer_name}, {customer_email}, {current_date}, {current_year}"),document_footer:e.string().max(j4).nullish().describe("Footer text for PDF documents. Supports template variables: {entity_name}, {entity_email}, {document_number}, {document_date}, {document_due_date}, {document_total}, {document_currency}, {customer_name}, {customer_email}, {current_date}, {current_year}"),default_document_signature:e.string().nullish().describe("Default signature text for all new documents. Supports template variables: {entity_name}, {entity_email}, {document_number}, {document_date}, {document_due_date}, {document_total}, {document_currency}, {customer_name}, {customer_email}, {current_date}, {current_year}"),calculation:e.object({default_mode:e.union([e.literal("b2b_standard"),e.literal("b2c_gross_discount"),e.literal(null)]).nullish().describe("Default document calculation mode. `b2b_standard` applies discounts before VAT on the net basis. `b2c_gross_discount` applies discounts to the gross payable amount and derives net/VAT afterward.")}).nullish().describe("Document calculation defaults. Controls whether newly calculated documents use the standard B2B net-first model or the B2C gross-discount model by default."),slovenia:e.object({business_form:e.union([e.literal("sp"),e.literal("doo"),e.literal("dno"),e.literal("club"),e.literal(null)]).nullish().describe("Stored Slovenian legal form for country-specific exports and reporting."),income_tax_regime:e.union([e.literal("normirani"),e.literal("dejanski"),e.literal(null)]).nullish().describe("Stored Slovenian income tax regime for yearly reporting."),vat_profile:e.union([e.literal("standard"),e.literal("special_vat_identified"),e.literal("non_vat_subject"),e.literal(null)]).nullish().describe("Stored Slovenian VAT subject subtype."),tax_residency:e.union([e.literal("resident"),e.literal("non_resident"),e.literal(null)]).nullish().describe("Stored Slovenian tax residency status."),yearly_reporting:e.object({activity_code:e.string().max(q4).nullish().describe("Primary Slovenian SKD activity code used for yearly reporting."),registration_number:e.string().max(W4).nullish().describe("Optional registration number / branch registration used in yearly reporting."),accounting_type:e.union([e.literal("records"),e.literal("single_entry"),e.literal("double_entry"),e.literal(null)]).nullish().describe("Bookkeeping / records mode used in the yearly filing."),normiranec_insurance_basis:e.union([e.literal("full_time_self_employed"),e.literal("other"),e.literal(null)]).nullish().describe("Insurance basis used for normirani expense and tax rules."),default_withholding_tax_amount:e.number().min(G4).nullish().describe("Persisted default for withholding tax manually entered during yearly review."),default_foreign_tax_credit_amount:e.number().min(V4).nullish().describe("Persisted default for foreign tax credit manually entered during yearly review.")}).nullish().describe("Slovenia-specific yearly reporting defaults and profile data."),accounting_exports:e.object({preferred_format:e.union([e.literal("vod_xml"),e.literal("vasco_xml"),e.literal("minimax_xml"),e.literal(null)]).nullish().describe("Stored preferred export format for Slovenian accounting handoff."),konto_mappings:e.object({receivables:e.string().max(L4).nullish(),payables:e.string().max(H4).nullish(),sales_vat_22:e.string().max(Y4).nullish(),sales_vat_95:e.string().max(K4).nullish(),sales_vat_5:e.string().max($4).nullish(),purchase_vat_recoverable_22:e.string().max(Q4).nullish(),purchase_vat_recoverable_95:e.string().max(J4).nullish(),purchase_vat_recoverable_5:e.string().max(Z4).nullish(),sales_revenue_22:e.string().max(X4).nullish(),sales_revenue_95:e.string().max(eP).nullish(),sales_revenue_5:e.string().max(tP).nullish(),sales_revenue_exempt:e.string().max(oP).nullish(),sales_revenue_eu_goods:e.string().max(nP).nullish(),sales_revenue_eu_services:e.string().max(sP).nullish(),sales_revenue_reverse_charge:e.string().max(rP).nullish(),sales_revenue_third_country_goods:e.string().max(iP).nullish(),sales_revenue_third_country_services:e.string().max(aP).nullish(),purchase_expense_22:e.string().max(dP).nullish(),purchase_expense_95:e.string().max(cP).nullish(),purchase_expense_5:e.string().max(lP).nullish(),purchase_expense_exempt:e.string().max(uP).nullish(),purchase_expense_eu_goods:e.string().max(pP).nullish(),purchase_expense_eu_services:e.string().max(mP).nullish(),purchase_expense_reverse_charge:e.string().max(gP).nullish(),purchase_expense_third_country_goods:e.string().max(yP).nullish(),purchase_expense_third_country_services:e.string().max(hP).nullish()}).nullish().describe("Stored semantic konto mappings shared by Slovenian accounting exports.")}).nullish().describe("Slovenia-specific accounting export defaults and konto mappings.")}).nullish().describe("Slovenia-specific tax profile used by yearly eDavki exports and future Slovenia-specific reporting flows."),furs:e.object({enabled:e.boolean().default(bP).describe("Whether FURS fiscalization is enabled for this entity"),default_skip_fiscalization:e.boolean().default(xP).describe("Whether new FURS-capable documents should start with fiscalization skipped by default. Payment type rules still override this and require fiscalization for non-bank-transfer payments."),numbering_strategy:e.enum(["B","C"]).optional().describe("Numbering strategy: B (device-level) or C (centralized). Optional - can be set per-premise."),operator_tax_number:e.string().optional().describe("Operator tax number for this entity (used when creating invoices via API key)"),operator_label:e.string().optional().describe("Operator label/name for this entity"),foreign_operator:e.boolean().optional().describe("Whether the operator is a foreign legal entity"),environment:e.enum(["test","production"]).optional().describe("FURS environment override (test or production). When omitted, derived from entity environment.")}).nullish().describe("FURS (Slovenia) fiscalization settings. Certificate data is stored separately via the certificate upload endpoint."),fina:e.object({enabled:e.boolean().default(zP).describe("Whether CIS (FINA) fiscalization is enabled for this entity"),operator_oib:e.string().min(_P).max(vP).optional().describe("OIB of the operator (11 digits). Used when creating invoices via API key."),operator_label:e.string().optional().describe("Operator label/name for this entity"),u_sust_pdv:e.boolean().default(fP).describe("Whether the entity is in the PDV (VAT) system. Most businesses are."),numbering_sequence:e.enum(["N","P"]).default(RP).describe("Numbering sequence: P (per premise) or N (per device)"),unified_numbering:e.boolean().nullish().describe("When enabled (default: true), all documents use the same FINA numbering sequence regardless of transaction type (domestic/non-domestic)"),certificate_expiry:e.string().optional().describe("Certificate expiry date (ISO 8601 format)")}).nullish().describe("FINA (Croatia) CIS fiscalization settings. Required for Croatian B2C invoicing. Certificate data is stored separately via the certificate upload endpoint."),pt:e.object({operator_first_name:e.string().min(1).optional().describe("Default PT operator first name for API key and headless document creation"),operator_last_name:e.string().min(1).optional().describe("Default PT operator last name for API key and headless document creation"),operator_tax_number:e.string().regex(IP).optional().describe("Default PT operator tax number for API key and headless document creation")}).nullish().describe("Portugal operator defaults used for PT document creation when request-level or user-level PT operator data is not available."),tax_rules:e.object({eu:e.object({vies_validate_vat:e.boolean().default(EP).describe("Validate EU VAT numbers against the VIES API. When enabled, customer VAT numbers are checked for validity before creating invoices. Validation results are cached on customer records. If VIES is unavailable, invoice creation continues with a warning."),auto_reverse_charge:e.boolean().default(SP).describe("Automatically apply 0% tax (reverse charge) for intra-EU B2B transactions. When enabled, taxes are removed and replaced with reverse charge note for valid VIES-validated cross-border B2B sales. Requires vies_validate_vat to be enabled for VAT validation."),auto_remove_tax_export:e.boolean().default(DP).describe("Automatically remove all taxes for exports to non-EU countries. When enabled, invoices to customers outside the EU will have all tax lines removed."),require_gross_prices:e.boolean().default(PP).describe("Require gross prices when reverse charge is applied. When enabled, creates a validation error if net prices are used with reverse charge transactions, since removing tax would change the invoice total.")}).nullish().describe("EU tax rules settings. Only applicable for entities based in EU countries. Set to null or omit for non-EU entities.")}).nullish().describe("Tax rules engine settings. Controls automatic tax behaviors based on entity location and transaction characteristics (VIES validation, reverse charge, export tax removal). Defaults are set automatically based on entity country. Set to null for non-EU entities."),overdue_notifications:e.object({enabled:e.boolean().default(wP).describe("Enable automatic overdue invoice notification emails to customers"),threshold_days:e.array(e.number().gt(CP)).default(AP).describe("Days overdue when notification emails are sent (exact day match). Email is triggered when any invoice hits these thresholds."),email_subject:e.string().nullish().describe("Custom email subject. Available variables: {customer_name}, {entity_name}, {overdue_count}"),email_body:e.string().nullish().describe("Custom email body. Available variables: {customer_name}, {entity_name}, {invoice_list}, {total_amount}, {entity_email}. If {invoice_list} is not included, the invoice table will be auto-appended.")}).nullish().describe("Settings for automatic overdue invoice notification emails to customers"),upn_qr:e.object({enabled:e.boolean().describe("Whether UPN QR payment slip is enabled on invoices (Slovenia only)"),display_mode:e.enum(["qr_only","full_slip"]).default(MP).describe("Display mode for UPN payment slip: 'qr_only' shows QR code inline after content, 'full_slip' shows complete payment slip at page bottom"),purpose_code:e.string().min(kP).max(BP).regex(NP).default(TP).describe("4-letter purpose code for UPN payments (ISO 20022). Common values: OTHR (other), GDSV (goods/services), SALA (salary)")}).nullish().describe("UPN QR payment slip settings (Slovenia only). Displays payment QR code on invoices for easy bank transfers."),epc_qr:e.object({enabled:e.boolean().describe("Whether EPC QR code is enabled on EUR invoices (SEPA countries)")}).nullish().describe("EPC QR code settings (SEPA countries). Displays SEPA credit transfer QR code on EUR invoices for easy bank payment."),bank_accounts:e.array(e.object({type:e.enum(["iban","us_domestic","uk_domestic","other"]).default(OP).describe("Account type determines which fields are used"),name:e.string().nullish().describe("Display name for this account. Falls back to account number if not set"),bank_name:e.string().nullish().describe("Bank name"),iban:e.string().nullish().describe("IBAN (for type=iban)"),account_number:e.string().nullish().describe("Account number (for us_domestic, uk_domestic, other)"),bic:e.string().nullish().describe("BIC/SWIFT code for international transfers"),routing_number:e.string().nullish().describe("US ABA routing number (for type=us_domestic)"),sort_code:e.string().nullish().describe("UK sort code (for type=uk_domestic)"),is_default:e.boolean().nullish().describe("Whether this is the default account for new invoices")})).nullish().describe("Bank accounts for receiving payments. The first account with is_default=true (or first in list) is used for new invoices."),eslog_validation_enabled:e.boolean().nullish().describe("Enable e-SLOG 2.0 validation for documents. Only applicable for Slovenian entities (country_code = 'SI'). When enabled, documents are validated against e-SLOG 2.0 requirements and can be exported as e-SLOG XML if valid."),delivery_note_hide_prices:e.boolean().nullish().describe("Default hide_prices setting for new delivery notes. When true, prices and totals are hidden (packing list mode)."),credit_note_negative_values:e.boolean().nullish().describe("When true (default), credit note PDFs display line item quantities and totals as negative values while keeping prices positive. Zero quantities and totals stay unsigned. Set to false to show quantities and totals as positive."),show_payment_amounts:e.boolean().nullish().describe("When true, rendered document payment/refund sections show the payment amount next to each payment type. Defaults to false, which shows only the payment or refund type."),receipt_note:e.string().max(FP).nullish().describe("Default note printed on thermal receipts."),receipt_footer:e.string().max(UP).nullish().describe("Default footer text printed on thermal receipts (e.g. IBAN, thank-you message)."),receipt_signature:e.string().max(jP).nullish().describe("Default signature / issuer label printed on thermal receipts."),tax_clause_defaults:e.object({domestic:e.string().nullish().describe("Default tax clause for domestic transactions (same country)"),intra_eu_b2b:e.string().nullish().describe("Default tax clause for intra-EU B2B transactions (reverse charge applies)"),intra_eu_b2c:e.string().nullish().describe("Default tax clause for intra-EU B2C transactions"),"3w_b2b":e.string().nullish().describe("Default tax clause for third-world B2B transactions (non-EU, business customer)"),"3w_b2c":e.string().nullish().describe("Default tax clause for third-world B2C transactions (non-EU, end consumer)"),export:e.string().nullish().describe("Deprecated: Use 3w_b2b and 3w_b2c instead. Default tax clause for export transactions.")}).nullish().describe("Default tax clauses per transaction type. Auto-applied to documents based on transaction type determination. Supports template variables: {entity_name}, {customer_name}, {document_number}, etc."),e_invoicing:e.object({enabled:e.boolean().default(qP).describe("Whether e-invoicing is enabled for this entity. Requires supplier onboarding to be completed before documents can be sent."),provider:e.enum(["flowin"]).default(WP).describe("E-invoicing provider. Currently only Flowin (Wolters Kluwer) is supported."),auto_send:e.boolean().default(GP).describe("Automatically send invoices via e-invoice after creation. Only works when entity is fully onboarded with the provider."),default_scheme_id:e.string().optional().describe('Default Peppol participant scheme ID for this entity. Common values: "0009" (SIRET, France), "9925" (VAT, Belgium), "0088" (EAN/GLN).')}).nullish().describe("E-invoicing settings for sending documents via Peppol network (through Flowin). Requires supplier onboarding before documents can be sent electronically.")}).describe("Entity settings"),metadata:e.record(e.string(),e.string()).nullish().describe("Custom key-value data for your own use. Store any JSON object up to 50 properties. Values must be strings up to 250 characters. Useful for storing external IDs, tags, or integration data."),created_at:e.iso.datetime({}),updated_at:e.iso.datetime({}),country_rules:e.object({max_taxes_per_item:e.number().min(1).describe("Maximum number of taxes allowed per line item"),features:e.array(e.string()).describe("Available country-specific features (availability only, not enabled status)")}).describe("Country-specific rules derived from entity's country_code")}).describe("Legal entity (business, club, sole-proprietor, ...) on which invoices and other resources are created."),VP=/^(?:[a-z]{3,4}_){0,2}[0-9a-f]{24}$/,_xe=e.object({id:e.stringFormat("resource-id",VP).describe("Space Invoices resource identifier (format: {prefix}_{hex24})")}),LP=/^acc_[0-9a-fA-F]{24}$/,vxe=e.object({"x-account-id":e.string().regex(LP).optional().describe("Account Id on which the request is made. Optional if user is part of only one account.")}),HP=500,YP=500,KP=20,$P=100,QP=100,JP=3,ZP=20,XP=50,e2=50,t2=50,o2=50,n2=255,s2=500,r2=10,i2=-140737488355328,a2=0x7fffffffffff,d2=/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/,c2=30,l2=100,u2=0,p2=0,m2=500,g2=10,y2=50,h2=0,b2=0,x2=8,z2=8,_2=8,v2=8,f2=8,R2=8,I2=8,E2=8,S2=8,D2=8,P2=8,w2=8,C2=8,A2=8,M2=8,T2=8,k2=8,B2=8,N2=8,O2=8,F2=8,U2=8,j2=8,q2=8,W2=8,G2=8,V2=false,L2=false,H2=false,Y2=11,K2=11,$2=true,Q2="P",J2=/^\d{9}$/,Z2=true,X2=false,ew=false,tw=false,ow=false,nw=0,sw=[7,14,30],rw="qr_only",iw="OTHR",aw=4,dw=4,cw=/^[A-Z]{4}$/,lw="iban",uw=500,pw=500,mw=200,gw=false,yw="flowin",hw=false,fxe=e.object({name:e.string().min(1).optional(),address:e.string().max(HP).nullish(),address_2:e.string().max(YP).nullish(),post_code:e.string().max(KP).nullish(),city:e.string().max($P).nullish(),state:e.string().max(QP).nullish(),currency_code:e.string().max(JP).nullish(),locale:e.string().max(ZP).nullish(),tax_number:e.string().max(XP).nullish(),tax_number_2:e.string().max(e2).nullish(),company_number:e.string().max(t2).nullish(),phone:e.string().max(o2).nullish(),email:e.string().max(n2).nullish(),website:e.string().max(s2).nullish(),fiscal_region_code:e.string().max(r2).nullish(),starting_capital:e.number().min(i2).max(a2).nullish(),is_tax_subject:e.boolean().optional(),is_enabled:e.boolean().optional().describe("Whether the entity is enabled. Disabled entities cannot create documents (invoices, estimates, etc.) but all data remains accessible and settings can be updated."),settings:e.object({pdf_template:e.union([e.literal("modern"),e.literal("classic"),e.literal("condensed"),e.literal("minimal"),e.literal("fashion"),e.literal("timeless_modern_full_data"),e.literal(null)]).nullish().describe("Default PDF template for document rendering. Defaults to 'modern' if not set."),number_formats:e.object({invoice:e.string().nullish(),estimate:e.string().nullish(),credit_note:e.string().nullish(),advance_invoice:e.string().nullish(),delivery_note:e.string().nullish()}).nullish(),primary_color:e.string().regex(d2).nullish(),logo_scale_percent:e.number().min(c2).max(l2).nullish().describe("Scale the PDF logo size as a percentage of the template default size. 100 keeps the original size."),has_logo:e.boolean().nullish(),has_signature:e.boolean().nullish(),default_invoice_due_days:e.number().gt(u2).nullish().describe("Default number of days until invoice is due (from invoice date)"),default_estimate_valid_days:e.number().gt(p2).nullish().describe("Default number of days until estimate expires (from estimate date)"),email_defaults:e.object({invoice_subject:e.string().nullish().describe("Default subject line for invoice emails. Available variables: {document_number}, {entity_name}, {entity_email}, {entity_address}, {entity_post_code}, {entity_city}, {entity_country}, {entity_tax_number}, {entity_company_number}, {customer_name}, {document_date}, {document_due_date}, {document_total}, {document_currency}"),invoice_body:e.string().nullish().describe("Default body text for invoice emails. Available variables: {document_number}, {entity_name}, {entity_email}, {entity_address}, {entity_post_code}, {entity_city}, {entity_country}, {entity_tax_number}, {entity_company_number}, {customer_name}, {document_date}, {document_due_date}, {document_total}, {document_currency}"),estimate_subject:e.string().nullish().describe("Default subject line for estimate emails. Available variables: {document_number}, {entity_name}, {entity_email}, {entity_address}, {entity_post_code}, {entity_city}, {entity_country}, {entity_tax_number}, {entity_company_number}, {customer_name}, {document_date}, {document_valid_until}, {document_total}, {document_currency}"),estimate_body:e.string().nullish().describe("Default body text for estimate emails. Available variables: {document_number}, {entity_name}, {entity_email}, {entity_address}, {entity_post_code}, {entity_city}, {entity_country}, {entity_tax_number}, {entity_company_number}, {customer_name}, {document_date}, {document_valid_until}, {document_total}, {document_currency}"),credit_note_subject:e.string().nullish().describe("Default subject line for credit note emails. Available variables: {document_number}, {entity_name}, {entity_email}, {entity_address}, {entity_post_code}, {entity_city}, {entity_country}, {entity_tax_number}, {entity_company_number}, {customer_name}, {document_date}, {document_total}, {document_currency}"),credit_note_body:e.string().nullish().describe("Default body text for credit note emails. Available variables: {document_number}, {entity_name}, {entity_email}, {entity_address}, {entity_post_code}, {entity_city}, {entity_country}, {entity_tax_number}, {entity_company_number}, {customer_name}, {document_date}, {document_total}, {document_currency}"),advance_invoice_subject:e.string().nullish().describe("Default subject line for advance invoice emails. Available variables: {document_number}, {entity_name}, {entity_email}, {entity_address}, {entity_post_code}, {entity_city}, {entity_country}, {entity_tax_number}, {entity_company_number}, {customer_name}, {document_date}, {document_total}, {document_currency}"),advance_invoice_body:e.string().nullish().describe("Default body text for advance invoice emails. Available variables: {document_number}, {entity_name}, {entity_email}, {entity_address}, {entity_post_code}, {entity_city}, {entity_country}, {entity_tax_number}, {entity_company_number}, {customer_name}, {document_date}, {document_total}, {document_currency}"),delivery_note_subject:e.string().nullish().describe("Default subject line for delivery note emails. Available variables: {document_number}, {entity_name}, {entity_email}, {entity_address}, {entity_post_code}, {entity_city}, {entity_country}, {entity_tax_number}, {entity_company_number}, {customer_name}, {document_date}, {document_total}, {document_currency}"),delivery_note_body:e.string().nullish().describe("Default body text for delivery note emails. Available variables: {document_number}, {entity_name}, {entity_email}, {entity_address}, {entity_post_code}, {entity_city}, {entity_country}, {entity_tax_number}, {entity_company_number}, {customer_name}, {document_date}, {document_total}, {document_currency}")}).nullish(),default_invoice_note:e.string().nullish().describe("Default note for new invoices. Supports template variables: {entity_name}, {entity_email}, {document_number}, {document_date}, {document_due_date}, {document_total}, {document_currency}, {customer_name}, {customer_email}, {current_date}, {current_year}"),default_invoice_payment_terms:e.string().nullish().describe("Default payment terms for new invoices. Supports template variables: {entity_name}, {entity_email}, {document_number}, {document_date}, {document_due_date}, {document_total}, {document_currency}, {customer_name}, {customer_email}, {current_date}, {current_year}"),default_estimate_note:e.string().nullish().describe("Default note for new estimates. Supports template variables: {entity_name}, {entity_email}, {document_number}, {document_date}, {document_valid_until}, {document_total}, {document_currency}, {customer_name}, {customer_email}, {current_date}, {current_year}"),default_estimate_payment_terms:e.string().nullish().describe("Default payment terms for new estimates. Supports template variables: {entity_name}, {entity_email}, {document_number}, {document_date}, {document_valid_until}, {document_total}, {document_currency}, {customer_name}, {customer_email}, {current_date}, {current_year}"),default_credit_note_note:e.string().nullish().describe("Default note for new credit notes. Supports template variables: {entity_name}, {entity_email}, {document_number}, {document_date}, {document_total}, {document_currency}, {customer_name}, {customer_email}, {current_date}, {current_year}"),default_credit_note_payment_terms:e.string().nullish().describe("Default payment terms for new credit notes. Supports template variables: {entity_name}, {entity_email}, {document_number}, {document_date}, {document_total}, {document_currency}, {customer_name}, {customer_email}, {current_date}, {current_year}"),default_advance_invoice_note:e.string().nullish().describe("Default note for new advance invoices. Supports template variables: {entity_name}, {entity_email}, {document_number}, {document_date}, {document_total}, {document_currency}, {customer_name}, {customer_email}, {current_date}, {current_year}"),default_delivery_note_note:e.string().nullish().describe("Default note for new delivery notes. Supports template variables: {entity_name}, {entity_email}, {document_number}, {document_date}, {document_total}, {document_currency}, {customer_name}, {customer_email}, {current_date}, {current_year}"),document_footer:e.string().max(m2).nullish().describe("Footer text for PDF documents. Supports template variables: {entity_name}, {entity_email}, {document_number}, {document_date}, {document_due_date}, {document_total}, {document_currency}, {customer_name}, {customer_email}, {current_date}, {current_year}"),default_document_signature:e.string().nullish().describe("Default signature text for all new documents. Supports template variables: {entity_name}, {entity_email}, {document_number}, {document_date}, {document_due_date}, {document_total}, {document_currency}, {customer_name}, {customer_email}, {current_date}, {current_year}"),calculation:e.object({default_mode:e.union([e.literal("b2b_standard"),e.literal("b2c_gross_discount"),e.literal(null)]).nullish().describe("Default document calculation mode. `b2b_standard` applies discounts before VAT on the net basis. `b2c_gross_discount` applies discounts to the gross payable amount and derives net/VAT afterward.")}).nullish().describe("Document calculation defaults. Controls whether newly calculated documents use the standard B2B net-first model or the B2C gross-discount model by default."),slovenia:e.object({business_form:e.union([e.literal("sp"),e.literal("doo"),e.literal("dno"),e.literal("club"),e.literal(null)]).nullish().describe("Stored Slovenian legal form for country-specific exports and reporting."),income_tax_regime:e.union([e.literal("normirani"),e.literal("dejanski"),e.literal(null)]).nullish().describe("Stored Slovenian income tax regime for yearly reporting."),vat_profile:e.union([e.literal("standard"),e.literal("special_vat_identified"),e.literal("non_vat_subject"),e.literal(null)]).nullish().describe("Stored Slovenian VAT subject subtype."),tax_residency:e.union([e.literal("resident"),e.literal("non_resident"),e.literal(null)]).nullish().describe("Stored Slovenian tax residency status."),yearly_reporting:e.object({activity_code:e.string().max(g2).nullish().describe("Primary Slovenian SKD activity code used for yearly reporting."),registration_number:e.string().max(y2).nullish().describe("Optional registration number / branch registration used in yearly reporting."),accounting_type:e.union([e.literal("records"),e.literal("single_entry"),e.literal("double_entry"),e.literal(null)]).nullish().describe("Bookkeeping / records mode used in the yearly filing."),normiranec_insurance_basis:e.union([e.literal("full_time_self_employed"),e.literal("other"),e.literal(null)]).nullish().describe("Insurance basis used for normirani expense and tax rules."),default_withholding_tax_amount:e.number().min(h2).nullish().describe("Persisted default for withholding tax manually entered during yearly review."),default_foreign_tax_credit_amount:e.number().min(b2).nullish().describe("Persisted default for foreign tax credit manually entered during yearly review.")}).nullish().describe("Slovenia-specific yearly reporting defaults and profile data."),accounting_exports:e.object({preferred_format:e.union([e.literal("vod_xml"),e.literal("vasco_xml"),e.literal("minimax_xml"),e.literal(null)]).nullish().describe("Stored preferred export format for Slovenian accounting handoff."),konto_mappings:e.object({receivables:e.string().max(x2).nullish(),payables:e.string().max(z2).nullish(),sales_vat_22:e.string().max(_2).nullish(),sales_vat_95:e.string().max(v2).nullish(),sales_vat_5:e.string().max(f2).nullish(),purchase_vat_recoverable_22:e.string().max(R2).nullish(),purchase_vat_recoverable_95:e.string().max(I2).nullish(),purchase_vat_recoverable_5:e.string().max(E2).nullish(),sales_revenue_22:e.string().max(S2).nullish(),sales_revenue_95:e.string().max(D2).nullish(),sales_revenue_5:e.string().max(P2).nullish(),sales_revenue_exempt:e.string().max(w2).nullish(),sales_revenue_eu_goods:e.string().max(C2).nullish(),sales_revenue_eu_services:e.string().max(A2).nullish(),sales_revenue_reverse_charge:e.string().max(M2).nullish(),sales_revenue_third_country_goods:e.string().max(T2).nullish(),sales_revenue_third_country_services:e.string().max(k2).nullish(),purchase_expense_22:e.string().max(B2).nullish(),purchase_expense_95:e.string().max(N2).nullish(),purchase_expense_5:e.string().max(O2).nullish(),purchase_expense_exempt:e.string().max(F2).nullish(),purchase_expense_eu_goods:e.string().max(U2).nullish(),purchase_expense_eu_services:e.string().max(j2).nullish(),purchase_expense_reverse_charge:e.string().max(q2).nullish(),purchase_expense_third_country_goods:e.string().max(W2).nullish(),purchase_expense_third_country_services:e.string().max(G2).nullish()}).nullish().describe("Stored semantic konto mappings shared by Slovenian accounting exports.")}).nullish().describe("Slovenia-specific accounting export defaults and konto mappings.")}).nullish().describe("Slovenia-specific tax profile used by yearly eDavki exports and future Slovenia-specific reporting flows."),furs:e.object({enabled:e.boolean().default(V2).describe("Whether FURS fiscalization is enabled for this entity"),default_skip_fiscalization:e.boolean().default(L2).describe("Whether new FURS-capable documents should start with fiscalization skipped by default. Payment type rules still override this and require fiscalization for non-bank-transfer payments."),numbering_strategy:e.enum(["B","C"]).optional().describe("Numbering strategy: B (device-level) or C (centralized). Optional - can be set per-premise."),operator_tax_number:e.string().optional().describe("Operator tax number for this entity (used when creating invoices via API key)"),operator_label:e.string().optional().describe("Operator label/name for this entity"),foreign_operator:e.boolean().optional().describe("Whether the operator is a foreign legal entity"),environment:e.enum(["test","production"]).optional().describe("FURS environment override (test or production). When omitted, derived from entity environment.")}).nullish().describe("FURS (Slovenia) fiscalization settings. Certificate data is stored separately via the certificate upload endpoint."),fina:e.object({enabled:e.boolean().default(H2).describe("Whether CIS (FINA) fiscalization is enabled for this entity"),operator_oib:e.string().min(Y2).max(K2).optional().describe("OIB of the operator (11 digits). Used when creating invoices via API key."),operator_label:e.string().optional().describe("Operator label/name for this entity"),u_sust_pdv:e.boolean().default($2).describe("Whether the entity is in the PDV (VAT) system. Most businesses are."),numbering_sequence:e.enum(["N","P"]).default(Q2).describe("Numbering sequence: P (per premise) or N (per device)"),unified_numbering:e.boolean().nullish().describe("When enabled (default: true), all documents use the same FINA numbering sequence regardless of transaction type (domestic/non-domestic)"),certificate_expiry:e.string().optional().describe("Certificate expiry date (ISO 8601 format)")}).nullish().describe("FINA (Croatia) CIS fiscalization settings. Required for Croatian B2C invoicing. Certificate data is stored separately via the certificate upload endpoint."),pt:e.object({operator_first_name:e.string().min(1).optional().describe("Default PT operator first name for API key and headless document creation"),operator_last_name:e.string().min(1).optional().describe("Default PT operator last name for API key and headless document creation"),operator_tax_number:e.string().regex(J2).optional().describe("Default PT operator tax number for API key and headless document creation")}).nullish().describe("Portugal operator defaults used for PT document creation when request-level or user-level PT operator data is not available."),tax_rules:e.object({eu:e.object({vies_validate_vat:e.boolean().default(Z2).describe("Validate EU VAT numbers against the VIES API. When enabled, customer VAT numbers are checked for validity before creating invoices. Validation results are cached on customer records. If VIES is unavailable, invoice creation continues with a warning."),auto_reverse_charge:e.boolean().default(X2).describe("Automatically apply 0% tax (reverse charge) for intra-EU B2B transactions. When enabled, taxes are removed and replaced with reverse charge note for valid VIES-validated cross-border B2B sales. Requires vies_validate_vat to be enabled for VAT validation."),auto_remove_tax_export:e.boolean().default(ew).describe("Automatically remove all taxes for exports to non-EU countries. When enabled, invoices to customers outside the EU will have all tax lines removed."),require_gross_prices:e.boolean().default(tw).describe("Require gross prices when reverse charge is applied. When enabled, creates a validation error if net prices are used with reverse charge transactions, since removing tax would change the invoice total.")}).nullish().describe("EU tax rules settings. Only applicable for entities based in EU countries. Set to null or omit for non-EU entities.")}).nullish().describe("Tax rules engine settings. Controls automatic tax behaviors based on entity location and transaction characteristics (VIES validation, reverse charge, export tax removal). Defaults are set automatically based on entity country. Set to null for non-EU entities."),overdue_notifications:e.object({enabled:e.boolean().default(ow).describe("Enable automatic overdue invoice notification emails to customers"),threshold_days:e.array(e.number().gt(nw)).default(sw).describe("Days overdue when notification emails are sent (exact day match). Email is triggered when any invoice hits these thresholds."),email_subject:e.string().nullish().describe("Custom email subject. Available variables: {customer_name}, {entity_name}, {overdue_count}"),email_body:e.string().nullish().describe("Custom email body. Available variables: {customer_name}, {entity_name}, {invoice_list}, {total_amount}, {entity_email}. If {invoice_list} is not included, the invoice table will be auto-appended.")}).nullish().describe("Settings for automatic overdue invoice notification emails to customers"),upn_qr:e.object({enabled:e.boolean().describe("Whether UPN QR payment slip is enabled on invoices (Slovenia only)"),display_mode:e.enum(["qr_only","full_slip"]).default(rw).describe("Display mode for UPN payment slip: 'qr_only' shows QR code inline after content, 'full_slip' shows complete payment slip at page bottom"),purpose_code:e.string().min(aw).max(dw).regex(cw).default(iw).describe("4-letter purpose code for UPN payments (ISO 20022). Common values: OTHR (other), GDSV (goods/services), SALA (salary)")}).nullish().describe("UPN QR payment slip settings (Slovenia only). Displays payment QR code on invoices for easy bank transfers."),epc_qr:e.object({enabled:e.boolean().describe("Whether EPC QR code is enabled on EUR invoices (SEPA countries)")}).nullish().describe("EPC QR code settings (SEPA countries). Displays SEPA credit transfer QR code on EUR invoices for easy bank payment."),bank_accounts:e.array(e.object({type:e.enum(["iban","us_domestic","uk_domestic","other"]).default(lw).describe("Account type determines which fields are used"),name:e.string().nullish().describe("Display name for this account. Falls back to account number if not set"),bank_name:e.string().nullish().describe("Bank name"),iban:e.string().nullish().describe("IBAN (for type=iban)"),account_number:e.string().nullish().describe("Account number (for us_domestic, uk_domestic, other)"),bic:e.string().nullish().describe("BIC/SWIFT code for international transfers"),routing_number:e.string().nullish().describe("US ABA routing number (for type=us_domestic)"),sort_code:e.string().nullish().describe("UK sort code (for type=uk_domestic)"),is_default:e.boolean().nullish().describe("Whether this is the default account for new invoices")})).nullish().describe("Bank accounts for receiving payments. The first account with is_default=true (or first in list) is used for new invoices."),eslog_validation_enabled:e.boolean().nullish().describe("Enable e-SLOG 2.0 validation for documents. Only applicable for Slovenian entities (country_code = 'SI'). When enabled, documents are validated against e-SLOG 2.0 requirements and can be exported as e-SLOG XML if valid."),delivery_note_hide_prices:e.boolean().nullish().describe("Default hide_prices setting for new delivery notes. When true, prices and totals are hidden (packing list mode)."),credit_note_negative_values:e.boolean().nullish().describe("When true (default), credit note PDFs display line item quantities and totals as negative values while keeping prices positive. Zero quantities and totals stay unsigned. Set to false to show quantities and totals as positive."),show_payment_amounts:e.boolean().nullish().describe("When true, rendered document payment/refund sections show the payment amount next to each payment type. Defaults to false, which shows only the payment or refund type."),receipt_note:e.string().max(uw).nullish().describe("Default note printed on thermal receipts."),receipt_footer:e.string().max(pw).nullish().describe("Default footer text printed on thermal receipts (e.g. IBAN, thank-you message)."),receipt_signature:e.string().max(mw).nullish().describe("Default signature / issuer label printed on thermal receipts."),tax_clause_defaults:e.object({domestic:e.string().nullish().describe("Default tax clause for domestic transactions (same country)"),intra_eu_b2b:e.string().nullish().describe("Default tax clause for intra-EU B2B transactions (reverse charge applies)"),intra_eu_b2c:e.string().nullish().describe("Default tax clause for intra-EU B2C transactions"),"3w_b2b":e.string().nullish().describe("Default tax clause for third-world B2B transactions (non-EU, business customer)"),"3w_b2c":e.string().nullish().describe("Default tax clause for third-world B2C transactions (non-EU, end consumer)"),export:e.string().nullish().describe("Deprecated: Use 3w_b2b and 3w_b2c instead. Default tax clause for export transactions.")}).nullish().describe("Default tax clauses per transaction type. Auto-applied to documents based on transaction type determination. Supports template variables: {entity_name}, {customer_name}, {document_number}, etc."),e_invoicing:e.object({enabled:e.boolean().default(gw).describe("Whether e-invoicing is enabled for this entity. Requires supplier onboarding to be completed before documents can be sent."),provider:e.enum(["flowin"]).default(yw).describe("E-invoicing provider. Currently only Flowin (Wolters Kluwer) is supported."),auto_send:e.boolean().default(hw).describe("Automatically send invoices via e-invoice after creation. Only works when entity is fully onboarded with the provider."),default_scheme_id:e.string().optional().describe('Default Peppol participant scheme ID for this entity. Common values: "0009" (SIRET, France), "9925" (VAT, Belgium), "0088" (EAN/GLN).')}).nullish().describe("E-invoicing settings for sending documents via Peppol network (through Flowin). Requires supplier onboarding before documents can be sent electronically.")}).optional().describe("Entity settings"),metadata:e.record(e.string(),e.string()).nullish().describe("Custom key-value data for your own use. Store any JSON object up to 50 properties. Values must be strings up to 250 characters. Useful for storing external IDs, tags, or integration data.")}),bw=36,xw=255,zw=500,_w=500,vw=20,fw=100,Rw=100,Iw=100,Ew=2,Sw=3,Dw=20,Pw=50,ww=50,Cw=50,Aw=50,Mw=255,Tw=500,kw=10,Bw=-140737488355328,Nw=0x7fffffffffff,Ow=36,Fw=/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/,Uw=30,jw=100,qw=0,Ww=0,Gw=500,Vw=10,Lw=50,Hw=0,Yw=0,Kw=8,$w=8,Qw=8,Jw=8,Zw=8,Xw=8,eC=8,tC=8,oC=8,nC=8,sC=8,rC=8,iC=8,aC=8,dC=8,cC=8,lC=8,uC=8,pC=8,mC=8,gC=8,yC=8,hC=8,bC=8,xC=8,zC=8,_C=false,vC=false,fC=false,RC=11,IC=11,EC=true,SC="P",DC=/^\d{9}$/,PC=true,wC=false,CC=false,AC=false,MC=false,TC=0,kC=[7,14,30],BC="qr_only",NC="OTHR",OC=4,FC=4,UC=/^[A-Z]{4}$/,jC="iban",qC=500,WC=500,GC=200,VC=false,LC="flowin",HC=false,Rxe=e.object({id:e.string().max(bw),name:e.string().max(xw),address:e.string().max(zw).nullish(),address_2:e.string().max(_w).nullish(),post_code:e.string().max(vw).nullish(),city:e.string().max(fw).nullish(),state:e.string().max(Rw).nullish(),country:e.string().max(Iw),country_code:e.string().max(Ew),currency_code:e.string().max(Sw).nullish(),locale:e.string().max(Dw),tax_number:e.string().max(Pw).nullish(),tax_number_2:e.string().max(ww).nullish(),company_number:e.string().max(Cw).nullish(),phone:e.string().max(Aw).nullish(),email:e.string().max(Mw).nullish(),website:e.string().max(Tw).nullish(),fiscal_region_code:e.string().max(kw).nullish(),starting_capital:e.number().min(Bw).max(Nw).nullish(),account_id:e.string().max(Ow),environment:e.enum(["live","sandbox"]).describe("Entity environment"),is_tax_subject:e.boolean(),is_enabled:e.boolean().describe("Whether the entity is enabled. Disabled entities cannot create documents (invoices, estimates, etc.) but all data remains accessible and settings can be updated."),settings:e.object({pdf_template:e.union([e.literal("modern"),e.literal("classic"),e.literal("condensed"),e.literal("minimal"),e.literal("fashion"),e.literal("timeless_modern_full_data"),e.literal(null)]).nullish().describe("Default PDF template for document rendering. Defaults to 'modern' if not set."),number_formats:e.object({invoice:e.string().nullish(),estimate:e.string().nullish(),credit_note:e.string().nullish(),advance_invoice:e.string().nullish(),delivery_note:e.string().nullish()}).nullish(),primary_color:e.string().regex(Fw).nullish(),logo_scale_percent:e.number().min(Uw).max(jw).nullish().describe("Scale the PDF logo size as a percentage of the template default size. 100 keeps the original size."),has_logo:e.boolean().nullish(),has_signature:e.boolean().nullish(),default_invoice_due_days:e.number().gt(qw).nullish().describe("Default number of days until invoice is due (from invoice date)"),default_estimate_valid_days:e.number().gt(Ww).nullish().describe("Default number of days until estimate expires (from estimate date)"),email_defaults:e.object({invoice_subject:e.string().nullish().describe("Default subject line for invoice emails. Available variables: {document_number}, {entity_name}, {entity_email}, {entity_address}, {entity_post_code}, {entity_city}, {entity_country}, {entity_tax_number}, {entity_company_number}, {customer_name}, {document_date}, {document_due_date}, {document_total}, {document_currency}"),invoice_body:e.string().nullish().describe("Default body text for invoice emails. Available variables: {document_number}, {entity_name}, {entity_email}, {entity_address}, {entity_post_code}, {entity_city}, {entity_country}, {entity_tax_number}, {entity_company_number}, {customer_name}, {document_date}, {document_due_date}, {document_total}, {document_currency}"),estimate_subject:e.string().nullish().describe("Default subject line for estimate emails. Available variables: {document_number}, {entity_name}, {entity_email}, {entity_address}, {entity_post_code}, {entity_city}, {entity_country}, {entity_tax_number}, {entity_company_number}, {customer_name}, {document_date}, {document_valid_until}, {document_total}, {document_currency}"),estimate_body:e.string().nullish().describe("Default body text for estimate emails. Available variables: {document_number}, {entity_name}, {entity_email}, {entity_address}, {entity_post_code}, {entity_city}, {entity_country}, {entity_tax_number}, {entity_company_number}, {customer_name}, {document_date}, {document_valid_until}, {document_total}, {document_currency}"),credit_note_subject:e.string().nullish().describe("Default subject line for credit note emails. Available variables: {document_number}, {entity_name}, {entity_email}, {entity_address}, {entity_post_code}, {entity_city}, {entity_country}, {entity_tax_number}, {entity_company_number}, {customer_name}, {document_date}, {document_total}, {document_currency}"),credit_note_body:e.string().nullish().describe("Default body text for credit note emails. Available variables: {document_number}, {entity_name}, {entity_email}, {entity_address}, {entity_post_code}, {entity_city}, {entity_country}, {entity_tax_number}, {entity_company_number}, {customer_name}, {document_date}, {document_total}, {document_currency}"),advance_invoice_subject:e.string().nullish().describe("Default subject line for advance invoice emails. Available variables: {document_number}, {entity_name}, {entity_email}, {entity_address}, {entity_post_code}, {entity_city}, {entity_country}, {entity_tax_number}, {entity_company_number}, {customer_name}, {document_date}, {document_total}, {document_currency}"),advance_invoice_body:e.string().nullish().describe("Default body text for advance invoice emails. Available variables: {document_number}, {entity_name}, {entity_email}, {entity_address}, {entity_post_code}, {entity_city}, {entity_country}, {entity_tax_number}, {entity_company_number}, {customer_name}, {document_date}, {document_total}, {document_currency}"),delivery_note_subject:e.string().nullish().describe("Default subject line for delivery note emails. Available variables: {document_number}, {entity_name}, {entity_email}, {entity_address}, {entity_post_code}, {entity_city}, {entity_country}, {entity_tax_number}, {entity_company_number}, {customer_name}, {document_date}, {document_total}, {document_currency}"),delivery_note_body:e.string().nullish().describe("Default body text for delivery note emails. Available variables: {document_number}, {entity_name}, {entity_email}, {entity_address}, {entity_post_code}, {entity_city}, {entity_country}, {entity_tax_number}, {entity_company_number}, {customer_name}, {document_date}, {document_total}, {document_currency}")}).nullish(),default_invoice_note:e.string().nullish().describe("Default note for new invoices. Supports template variables: {entity_name}, {entity_email}, {document_number}, {document_date}, {document_due_date}, {document_total}, {document_currency}, {customer_name}, {customer_email}, {current_date}, {current_year}"),default_invoice_payment_terms:e.string().nullish().describe("Default payment terms for new invoices. Supports template variables: {entity_name}, {entity_email}, {document_number}, {document_date}, {document_due_date}, {document_total}, {document_currency}, {customer_name}, {customer_email}, {current_date}, {current_year}"),default_estimate_note:e.string().nullish().describe("Default note for new estimates. Supports template variables: {entity_name}, {entity_email}, {document_number}, {document_date}, {document_valid_until}, {document_total}, {document_currency}, {customer_name}, {customer_email}, {current_date}, {current_year}"),default_estimate_payment_terms:e.string().nullish().describe("Default payment terms for new estimates. Supports template variables: {entity_name}, {entity_email}, {document_number}, {document_date}, {document_valid_until}, {document_total}, {document_currency}, {customer_name}, {customer_email}, {current_date}, {current_year}"),default_credit_note_note:e.string().nullish().describe("Default note for new credit notes. Supports template variables: {entity_name}, {entity_email}, {document_number}, {document_date}, {document_total}, {document_currency}, {customer_name}, {customer_email}, {current_date}, {current_year}"),default_credit_note_payment_terms:e.string().nullish().describe("Default payment terms for new credit notes. Supports template variables: {entity_name}, {entity_email}, {document_number}, {document_date}, {document_total}, {document_currency}, {customer_name}, {customer_email}, {current_date}, {current_year}"),default_advance_invoice_note:e.string().nullish().describe("Default note for new advance invoices. Supports template variables: {entity_name}, {entity_email}, {document_number}, {document_date}, {document_total}, {document_currency}, {customer_name}, {customer_email}, {current_date}, {current_year}"),default_delivery_note_note:e.string().nullish().describe("Default note for new delivery notes. Supports template variables: {entity_name}, {entity_email}, {document_number}, {document_date}, {document_total}, {document_currency}, {customer_name}, {customer_email}, {current_date}, {current_year}"),document_footer:e.string().max(Gw).nullish().describe("Footer text for PDF documents. Supports template variables: {entity_name}, {entity_email}, {document_number}, {document_date}, {document_due_date}, {document_total}, {document_currency}, {customer_name}, {customer_email}, {current_date}, {current_year}"),default_document_signature:e.string().nullish().describe("Default signature text for all new documents. Supports template variables: {entity_name}, {entity_email}, {document_number}, {document_date}, {document_due_date}, {document_total}, {document_currency}, {customer_name}, {customer_email}, {current_date}, {current_year}"),calculation:e.object({default_mode:e.union([e.literal("b2b_standard"),e.literal("b2c_gross_discount"),e.literal(null)]).nullish().describe("Default document calculation mode. `b2b_standard` applies discounts before VAT on the net basis. `b2c_gross_discount` applies discounts to the gross payable amount and derives net/VAT afterward.")}).nullish().describe("Document calculation defaults. Controls whether newly calculated documents use the standard B2B net-first model or the B2C gross-discount model by default."),slovenia:e.object({business_form:e.union([e.literal("sp"),e.literal("doo"),e.literal("dno"),e.literal("club"),e.literal(null)]).nullish().describe("Stored Slovenian legal form for country-specific exports and reporting."),income_tax_regime:e.union([e.literal("normirani"),e.literal("dejanski"),e.literal(null)]).nullish().describe("Stored Slovenian income tax regime for yearly reporting."),vat_profile:e.union([e.literal("standard"),e.literal("special_vat_identified"),e.literal("non_vat_subject"),e.literal(null)]).nullish().describe("Stored Slovenian VAT subject subtype."),tax_residency:e.union([e.literal("resident"),e.literal("non_resident"),e.literal(null)]).nullish().describe("Stored Slovenian tax residency status."),yearly_reporting:e.object({activity_code:e.string().max(Vw).nullish().describe("Primary Slovenian SKD activity code used for yearly reporting."),registration_number:e.string().max(Lw).nullish().describe("Optional registration number / branch registration used in yearly reporting."),accounting_type:e.union([e.literal("records"),e.literal("single_entry"),e.literal("double_entry"),e.literal(null)]).nullish().describe("Bookkeeping / records mode used in the yearly filing."),normiranec_insurance_basis:e.union([e.literal("full_time_self_employed"),e.literal("other"),e.literal(null)]).nullish().describe("Insurance basis used for normirani expense and tax rules."),default_withholding_tax_amount:e.number().min(Hw).nullish().describe("Persisted default for withholding tax manually entered during yearly review."),default_foreign_tax_credit_amount:e.number().min(Yw).nullish().describe("Persisted default for foreign tax credit manually entered during yearly review.")}).nullish().describe("Slovenia-specific yearly reporting defaults and profile data."),accounting_exports:e.object({preferred_format:e.union([e.literal("vod_xml"),e.literal("vasco_xml"),e.literal("minimax_xml"),e.literal(null)]).nullish().describe("Stored preferred export format for Slovenian accounting handoff."),konto_mappings:e.object({receivables:e.string().max(Kw).nullish(),payables:e.string().max($w).nullish(),sales_vat_22:e.string().max(Qw).nullish(),sales_vat_95:e.string().max(Jw).nullish(),sales_vat_5:e.string().max(Zw).nullish(),purchase_vat_recoverable_22:e.string().max(Xw).nullish(),purchase_vat_recoverable_95:e.string().max(eC).nullish(),purchase_vat_recoverable_5:e.string().max(tC).nullish(),sales_revenue_22:e.string().max(oC).nullish(),sales_revenue_95:e.string().max(nC).nullish(),sales_revenue_5:e.string().max(sC).nullish(),sales_revenue_exempt:e.string().max(rC).nullish(),sales_revenue_eu_goods:e.string().max(iC).nullish(),sales_revenue_eu_services:e.string().max(aC).nullish(),sales_revenue_reverse_charge:e.string().max(dC).nullish(),sales_revenue_third_country_goods:e.string().max(cC).nullish(),sales_revenue_third_country_services:e.string().max(lC).nullish(),purchase_expense_22:e.string().max(uC).nullish(),purchase_expense_95:e.string().max(pC).nullish(),purchase_expense_5:e.string().max(mC).nullish(),purchase_expense_exempt:e.string().max(gC).nullish(),purchase_expense_eu_goods:e.string().max(yC).nullish(),purchase_expense_eu_services:e.string().max(hC).nullish(),purchase_expense_reverse_charge:e.string().max(bC).nullish(),purchase_expense_third_country_goods:e.string().max(xC).nullish(),purchase_expense_third_country_services:e.string().max(zC).nullish()}).nullish().describe("Stored semantic konto mappings shared by Slovenian accounting exports.")}).nullish().describe("Slovenia-specific accounting export defaults and konto mappings.")}).nullish().describe("Slovenia-specific tax profile used by yearly eDavki exports and future Slovenia-specific reporting flows."),furs:e.object({enabled:e.boolean().default(_C).describe("Whether FURS fiscalization is enabled for this entity"),default_skip_fiscalization:e.boolean().default(vC).describe("Whether new FURS-capable documents should start with fiscalization skipped by default. Payment type rules still override this and require fiscalization for non-bank-transfer payments."),numbering_strategy:e.enum(["B","C"]).optional().describe("Numbering strategy: B (device-level) or C (centralized). Optional - can be set per-premise."),operator_tax_number:e.string().optional().describe("Operator tax number for this entity (used when creating invoices via API key)"),operator_label:e.string().optional().describe("Operator label/name for this entity"),foreign_operator:e.boolean().optional().describe("Whether the operator is a foreign legal entity"),environment:e.enum(["test","production"]).optional().describe("FURS environment override (test or production). When omitted, derived from entity environment.")}).nullish().describe("FURS (Slovenia) fiscalization settings. Certificate data is stored separately via the certificate upload endpoint."),fina:e.object({enabled:e.boolean().default(fC).describe("Whether CIS (FINA) fiscalization is enabled for this entity"),operator_oib:e.string().min(RC).max(IC).optional().describe("OIB of the operator (11 digits). Used when creating invoices via API key."),operator_label:e.string().optional().describe("Operator label/name for this entity"),u_sust_pdv:e.boolean().default(EC).describe("Whether the entity is in the PDV (VAT) system. Most businesses are."),numbering_sequence:e.enum(["N","P"]).default(SC).describe("Numbering sequence: P (per premise) or N (per device)"),unified_numbering:e.boolean().nullish().describe("When enabled (default: true), all documents use the same FINA numbering sequence regardless of transaction type (domestic/non-domestic)"),certificate_expiry:e.string().optional().describe("Certificate expiry date (ISO 8601 format)")}).nullish().describe("FINA (Croatia) CIS fiscalization settings. Required for Croatian B2C invoicing. Certificate data is stored separately via the certificate upload endpoint."),pt:e.object({operator_first_name:e.string().min(1).optional().describe("Default PT operator first name for API key and headless document creation"),operator_last_name:e.string().min(1).optional().describe("Default PT operator last name for API key and headless document creation"),operator_tax_number:e.string().regex(DC).optional().describe("Default PT operator tax number for API key and headless document creation")}).nullish().describe("Portugal operator defaults used for PT document creation when request-level or user-level PT operator data is not available."),tax_rules:e.object({eu:e.object({vies_validate_vat:e.boolean().default(PC).describe("Validate EU VAT numbers against the VIES API. When enabled, customer VAT numbers are checked for validity before creating invoices. Validation results are cached on customer records. If VIES is unavailable, invoice creation continues with a warning."),auto_reverse_charge:e.boolean().default(wC).describe("Automatically apply 0% tax (reverse charge) for intra-EU B2B transactions. When enabled, taxes are removed and replaced with reverse charge note for valid VIES-validated cross-border B2B sales. Requires vies_validate_vat to be enabled for VAT validation."),auto_remove_tax_export:e.boolean().default(CC).describe("Automatically remove all taxes for exports to non-EU countries. When enabled, invoices to customers outside the EU will have all tax lines removed."),require_gross_prices:e.boolean().default(AC).describe("Require gross prices when reverse charge is applied. When enabled, creates a validation error if net prices are used with reverse charge transactions, since removing tax would change the invoice total.")}).nullish().describe("EU tax rules settings. Only applicable for entities based in EU countries. Set to null or omit for non-EU entities.")}).nullish().describe("Tax rules engine settings. Controls automatic tax behaviors based on entity location and transaction characteristics (VIES validation, reverse charge, export tax removal). Defaults are set automatically based on entity country. Set to null for non-EU entities."),overdue_notifications:e.object({enabled:e.boolean().default(MC).describe("Enable automatic overdue invoice notification emails to customers"),threshold_days:e.array(e.number().gt(TC)).default(kC).describe("Days overdue when notification emails are sent (exact day match). Email is triggered when any invoice hits these thresholds."),email_subject:e.string().nullish().describe("Custom email subject. Available variables: {customer_name}, {entity_name}, {overdue_count}"),email_body:e.string().nullish().describe("Custom email body. Available variables: {customer_name}, {entity_name}, {invoice_list}, {total_amount}, {entity_email}. If {invoice_list} is not included, the invoice table will be auto-appended.")}).nullish().describe("Settings for automatic overdue invoice notification emails to customers"),upn_qr:e.object({enabled:e.boolean().describe("Whether UPN QR payment slip is enabled on invoices (Slovenia only)"),display_mode:e.enum(["qr_only","full_slip"]).default(BC).describe("Display mode for UPN payment slip: 'qr_only' shows QR code inline after content, 'full_slip' shows complete payment slip at page bottom"),purpose_code:e.string().min(OC).max(FC).regex(UC).default(NC).describe("4-letter purpose code for UPN payments (ISO 20022). Common values: OTHR (other), GDSV (goods/services), SALA (salary)")}).nullish().describe("UPN QR payment slip settings (Slovenia only). Displays payment QR code on invoices for easy bank transfers."),epc_qr:e.object({enabled:e.boolean().describe("Whether EPC QR code is enabled on EUR invoices (SEPA countries)")}).nullish().describe("EPC QR code settings (SEPA countries). Displays SEPA credit transfer QR code on EUR invoices for easy bank payment."),bank_accounts:e.array(e.object({type:e.enum(["iban","us_domestic","uk_domestic","other"]).default(jC).describe("Account type determines which fields are used"),name:e.string().nullish().describe("Display name for this account. Falls back to account number if not set"),bank_name:e.string().nullish().describe("Bank name"),iban:e.string().nullish().describe("IBAN (for type=iban)"),account_number:e.string().nullish().describe("Account number (for us_domestic, uk_domestic, other)"),bic:e.string().nullish().describe("BIC/SWIFT code for international transfers"),routing_number:e.string().nullish().describe("US ABA routing number (for type=us_domestic)"),sort_code:e.string().nullish().describe("UK sort code (for type=uk_domestic)"),is_default:e.boolean().nullish().describe("Whether this is the default account for new invoices")})).nullish().describe("Bank accounts for receiving payments. The first account with is_default=true (or first in list) is used for new invoices."),eslog_validation_enabled:e.boolean().nullish().describe("Enable e-SLOG 2.0 validation for documents. Only applicable for Slovenian entities (country_code = 'SI'). When enabled, documents are validated against e-SLOG 2.0 requirements and can be exported as e-SLOG XML if valid."),delivery_note_hide_prices:e.boolean().nullish().describe("Default hide_prices setting for new delivery notes. When true, prices and totals are hidden (packing list mode)."),credit_note_negative_values:e.boolean().nullish().describe("When true (default), credit note PDFs display line item quantities and totals as negative values while keeping prices positive. Zero quantities and totals stay unsigned. Set to false to show quantities and totals as positive."),show_payment_amounts:e.boolean().nullish().describe("When true, rendered document payment/refund sections show the payment amount next to each payment type. Defaults to false, which shows only the payment or refund type."),receipt_note:e.string().max(qC).nullish().describe("Default note printed on thermal receipts."),receipt_footer:e.string().max(WC).nullish().describe("Default footer text printed on thermal receipts (e.g. IBAN, thank-you message)."),receipt_signature:e.string().max(GC).nullish().describe("Default signature / issuer label printed on thermal receipts."),tax_clause_defaults:e.object({domestic:e.string().nullish().describe("Default tax clause for domestic transactions (same country)"),intra_eu_b2b:e.string().nullish().describe("Default tax clause for intra-EU B2B transactions (reverse charge applies)"),intra_eu_b2c:e.string().nullish().describe("Default tax clause for intra-EU B2C transactions"),"3w_b2b":e.string().nullish().describe("Default tax clause for third-world B2B transactions (non-EU, business customer)"),"3w_b2c":e.string().nullish().describe("Default tax clause for third-world B2C transactions (non-EU, end consumer)"),export:e.string().nullish().describe("Deprecated: Use 3w_b2b and 3w_b2c instead. Default tax clause for export transactions.")}).nullish().describe("Default tax clauses per transaction type. Auto-applied to documents based on transaction type determination. Supports template variables: {entity_name}, {customer_name}, {document_number}, etc."),e_invoicing:e.object({enabled:e.boolean().default(VC).describe("Whether e-invoicing is enabled for this entity. Requires supplier onboarding to be completed before documents can be sent."),provider:e.enum(["flowin"]).default(LC).describe("E-invoicing provider. Currently only Flowin (Wolters Kluwer) is supported."),auto_send:e.boolean().default(HC).describe("Automatically send invoices via e-invoice after creation. Only works when entity is fully onboarded with the provider."),default_scheme_id:e.string().optional().describe('Default Peppol participant scheme ID for this entity. Common values: "0009" (SIRET, France), "9925" (VAT, Belgium), "0088" (EAN/GLN).')}).nullish().describe("E-invoicing settings for sending documents via Peppol network (through Flowin). Requires supplier onboarding before documents can be sent electronically.")}).describe("Entity settings"),metadata:e.record(e.string(),e.string()).nullish().describe("Custom key-value data for your own use. Store any JSON object up to 50 properties. Values must be strings up to 250 characters. Useful for storing external IDs, tags, or integration data."),created_at:e.iso.datetime({}),updated_at:e.iso.datetime({}),country_rules:e.object({max_taxes_per_item:e.number().min(1).describe("Maximum number of taxes allowed per line item"),features:e.array(e.string()).describe("Available country-specific features (availability only, not enabled status)")}).describe("Country-specific rules derived from entity's country_code")}).describe("Legal entity (business, club, sole-proprietor, ...) on which invoices and other resources are created."),YC=/^(?:[a-z]{3,4}_){0,2}[0-9a-f]{24}$/,Ixe=e.object({id:e.stringFormat("resource-id",YC).describe("Space Invoices resource identifier (format: {prefix}_{hex24})")}),KC=/^acc_[0-9a-fA-F]{24}$/,Exe=e.object({"x-account-id":e.string().regex(KC).optional().describe("Account Id on which the request is made. Optional if user is part of only one account.")}),$C=36,QC=255,JC=500,ZC=500,XC=20,eA=100,tA=100,oA=100,nA=2,sA=3,rA=20,iA=50,aA=50,dA=50,cA=50,lA=255,uA=500,pA=10,mA=-140737488355328,gA=0x7fffffffffff,yA=36,hA=/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/,bA=30,xA=100,zA=0,_A=0,vA=500,fA=10,RA=50,IA=0,EA=0,SA=8,DA=8,PA=8,wA=8,CA=8,AA=8,MA=8,TA=8,kA=8,BA=8,NA=8,OA=8,FA=8,UA=8,jA=8,qA=8,WA=8,GA=8,VA=8,LA=8,HA=8,YA=8,KA=8,$A=8,QA=8,JA=8,ZA=false,XA=false,eM=false,tM=11,oM=11,nM=true,sM="P",rM=/^\d{9}$/,iM=true,aM=false,dM=false,cM=false,lM=false,uM=0,pM=[7,14,30],mM="qr_only",gM="OTHR",yM=4,hM=4,bM=/^[A-Z]{4}$/,xM="iban",zM=500,_M=500,vM=200,fM=false,RM="flowin",IM=false,Sxe=e.object({id:e.string().max($C),name:e.string().max(QC),address:e.string().max(JC).nullish(),address_2:e.string().max(ZC).nullish(),post_code:e.string().max(XC).nullish(),city:e.string().max(eA).nullish(),state:e.string().max(tA).nullish(),country:e.string().max(oA),country_code:e.string().max(nA),currency_code:e.string().max(sA).nullish(),locale:e.string().max(rA),tax_number:e.string().max(iA).nullish(),tax_number_2:e.string().max(aA).nullish(),company_number:e.string().max(dA).nullish(),phone:e.string().max(cA).nullish(),email:e.string().max(lA).nullish(),website:e.string().max(uA).nullish(),fiscal_region_code:e.string().max(pA).nullish(),starting_capital:e.number().min(mA).max(gA).nullish(),account_id:e.string().max(yA),environment:e.enum(["live","sandbox"]).describe("Entity environment"),is_tax_subject:e.boolean(),is_enabled:e.boolean().describe("Whether the entity is enabled. Disabled entities cannot create documents (invoices, estimates, etc.) but all data remains accessible and settings can be updated."),settings:e.object({pdf_template:e.union([e.literal("modern"),e.literal("classic"),e.literal("condensed"),e.literal("minimal"),e.literal("fashion"),e.literal("timeless_modern_full_data"),e.literal(null)]).nullish().describe("Default PDF template for document rendering. Defaults to 'modern' if not set."),number_formats:e.object({invoice:e.string().nullish(),estimate:e.string().nullish(),credit_note:e.string().nullish(),advance_invoice:e.string().nullish(),delivery_note:e.string().nullish()}).nullish(),primary_color:e.string().regex(hA).nullish(),logo_scale_percent:e.number().min(bA).max(xA).nullish().describe("Scale the PDF logo size as a percentage of the template default size. 100 keeps the original size."),has_logo:e.boolean().nullish(),has_signature:e.boolean().nullish(),default_invoice_due_days:e.number().gt(zA).nullish().describe("Default number of days until invoice is due (from invoice date)"),default_estimate_valid_days:e.number().gt(_A).nullish().describe("Default number of days until estimate expires (from estimate date)"),email_defaults:e.object({invoice_subject:e.string().nullish().describe("Default subject line for invoice emails. Available variables: {document_number}, {entity_name}, {entity_email}, {entity_address}, {entity_post_code}, {entity_city}, {entity_country}, {entity_tax_number}, {entity_company_number}, {customer_name}, {document_date}, {document_due_date}, {document_total}, {document_currency}"),invoice_body:e.string().nullish().describe("Default body text for invoice emails. Available variables: {document_number}, {entity_name}, {entity_email}, {entity_address}, {entity_post_code}, {entity_city}, {entity_country}, {entity_tax_number}, {entity_company_number}, {customer_name}, {document_date}, {document_due_date}, {document_total}, {document_currency}"),estimate_subject:e.string().nullish().describe("Default subject line for estimate emails. Available variables: {document_number}, {entity_name}, {entity_email}, {entity_address}, {entity_post_code}, {entity_city}, {entity_country}, {entity_tax_number}, {entity_company_number}, {customer_name}, {document_date}, {document_valid_until}, {document_total}, {document_currency}"),estimate_body:e.string().nullish().describe("Default body text for estimate emails. Available variables: {document_number}, {entity_name}, {entity_email}, {entity_address}, {entity_post_code}, {entity_city}, {entity_country}, {entity_tax_number}, {entity_company_number}, {customer_name}, {document_date}, {document_valid_until}, {document_total}, {document_currency}"),credit_note_subject:e.string().nullish().describe("Default subject line for credit note emails. Available variables: {document_number}, {entity_name}, {entity_email}, {entity_address}, {entity_post_code}, {entity_city}, {entity_country}, {entity_tax_number}, {entity_company_number}, {customer_name}, {document_date}, {document_total}, {document_currency}"),credit_note_body:e.string().nullish().describe("Default body text for credit note emails. Available variables: {document_number}, {entity_name}, {entity_email}, {entity_address}, {entity_post_code}, {entity_city}, {entity_country}, {entity_tax_number}, {entity_company_number}, {customer_name}, {document_date}, {document_total}, {document_currency}"),advance_invoice_subject:e.string().nullish().describe("Default subject line for advance invoice emails. Available variables: {document_number}, {entity_name}, {entity_email}, {entity_address}, {entity_post_code}, {entity_city}, {entity_country}, {entity_tax_number}, {entity_company_number}, {customer_name}, {document_date}, {document_total}, {document_currency}"),advance_invoice_body:e.string().nullish().describe("Default body text for advance invoice emails. Available variables: {document_number}, {entity_name}, {entity_email}, {entity_address}, {entity_post_code}, {entity_city}, {entity_country}, {entity_tax_number}, {entity_company_number}, {customer_name}, {document_date}, {document_total}, {document_currency}"),delivery_note_subject:e.string().nullish().describe("Default subject line for delivery note emails. Available variables: {document_number}, {entity_name}, {entity_email}, {entity_address}, {entity_post_code}, {entity_city}, {entity_country}, {entity_tax_number}, {entity_company_number}, {customer_name}, {document_date}, {document_total}, {document_currency}"),delivery_note_body:e.string().nullish().describe("Default body text for delivery note emails. Available variables: {document_number}, {entity_name}, {entity_email}, {entity_address}, {entity_post_code}, {entity_city}, {entity_country}, {entity_tax_number}, {entity_company_number}, {customer_name}, {document_date}, {document_total}, {document_currency}")}).nullish(),default_invoice_note:e.string().nullish().describe("Default note for new invoices. Supports template variables: {entity_name}, {entity_email}, {document_number}, {document_date}, {document_due_date}, {document_total}, {document_currency}, {customer_name}, {customer_email}, {current_date}, {current_year}"),default_invoice_payment_terms:e.string().nullish().describe("Default payment terms for new invoices. Supports template variables: {entity_name}, {entity_email}, {document_number}, {document_date}, {document_due_date}, {document_total}, {document_currency}, {customer_name}, {customer_email}, {current_date}, {current_year}"),default_estimate_note:e.string().nullish().describe("Default note for new estimates. Supports template variables: {entity_name}, {entity_email}, {document_number}, {document_date}, {document_valid_until}, {document_total}, {document_currency}, {customer_name}, {customer_email}, {current_date}, {current_year}"),default_estimate_payment_terms:e.string().nullish().describe("Default payment terms for new estimates. Supports template variables: {entity_name}, {entity_email}, {document_number}, {document_date}, {document_valid_until}, {document_total}, {document_currency}, {customer_name}, {customer_email}, {current_date}, {current_year}"),default_credit_note_note:e.string().nullish().describe("Default note for new credit notes. Supports template variables: {entity_name}, {entity_email}, {document_number}, {document_date}, {document_total}, {document_currency}, {customer_name}, {customer_email}, {current_date}, {current_year}"),default_credit_note_payment_terms:e.string().nullish().describe("Default payment terms for new credit notes. Supports template variables: {entity_name}, {entity_email}, {document_number}, {document_date}, {document_total}, {document_currency}, {customer_name}, {customer_email}, {current_date}, {current_year}"),default_advance_invoice_note:e.string().nullish().describe("Default note for new advance invoices. Supports template variables: {entity_name}, {entity_email}, {document_number}, {document_date}, {document_total}, {document_currency}, {customer_name}, {customer_email}, {current_date}, {current_year}"),default_delivery_note_note:e.string().nullish().describe("Default note for new delivery notes. Supports template variables: {entity_name}, {entity_email}, {document_number}, {document_date}, {document_total}, {document_currency}, {customer_name}, {customer_email}, {current_date}, {current_year}"),document_footer:e.string().max(vA).nullish().describe("Footer text for PDF documents. Supports template variables: {entity_name}, {entity_email}, {document_number}, {document_date}, {document_due_date}, {document_total}, {document_currency}, {customer_name}, {customer_email}, {current_date}, {current_year}"),default_document_signature:e.string().nullish().describe("Default signature text for all new documents. Supports template variables: {entity_name}, {entity_email}, {document_number}, {document_date}, {document_due_date}, {document_total}, {document_currency}, {customer_name}, {customer_email}, {current_date}, {current_year}"),calculation:e.object({default_mode:e.union([e.literal("b2b_standard"),e.literal("b2c_gross_discount"),e.literal(null)]).nullish().describe("Default document calculation mode. `b2b_standard` applies discounts before VAT on the net basis. `b2c_gross_discount` applies discounts to the gross payable amount and derives net/VAT afterward.")}).nullish().describe("Document calculation defaults. Controls whether newly calculated documents use the standard B2B net-first model or the B2C gross-discount model by default."),slovenia:e.object({business_form:e.union([e.literal("sp"),e.literal("doo"),e.literal("dno"),e.literal("club"),e.literal(null)]).nullish().describe("Stored Slovenian legal form for country-specific exports and reporting."),income_tax_regime:e.union([e.literal("normirani"),e.literal("dejanski"),e.literal(null)]).nullish().describe("Stored Slovenian income tax regime for yearly reporting."),vat_profile:e.union([e.literal("standard"),e.literal("special_vat_identified"),e.literal("non_vat_subject"),e.literal(null)]).nullish().describe("Stored Slovenian VAT subject subtype."),tax_residency:e.union([e.literal("resident"),e.literal("non_resident"),e.literal(null)]).nullish().describe("Stored Slovenian tax residency status."),yearly_reporting:e.object({activity_code:e.string().max(fA).nullish().describe("Primary Slovenian SKD activity code used for yearly reporting."),registration_number:e.string().max(RA).nullish().describe("Optional registration number / branch registration used in yearly reporting."),accounting_type:e.union([e.literal("records"),e.literal("single_entry"),e.literal("double_entry"),e.literal(null)]).nullish().describe("Bookkeeping / records mode used in the yearly filing."),normiranec_insurance_basis:e.union([e.literal("full_time_self_employed"),e.literal("other"),e.literal(null)]).nullish().describe("Insurance basis used for normirani expense and tax rules."),default_withholding_tax_amount:e.number().min(IA).nullish().describe("Persisted default for withholding tax manually entered during yearly review."),default_foreign_tax_credit_amount:e.number().min(EA).nullish().describe("Persisted default for foreign tax credit manually entered during yearly review.")}).nullish().describe("Slovenia-specific yearly reporting defaults and profile data."),accounting_exports:e.object({preferred_format:e.union([e.literal("vod_xml"),e.literal("vasco_xml"),e.literal("minimax_xml"),e.literal(null)]).nullish().describe("Stored preferred export format for Slovenian accounting handoff."),konto_mappings:e.object({receivables:e.string().max(SA).nullish(),payables:e.string().max(DA).nullish(),sales_vat_22:e.string().max(PA).nullish(),sales_vat_95:e.string().max(wA).nullish(),sales_vat_5:e.string().max(CA).nullish(),purchase_vat_recoverable_22:e.string().max(AA).nullish(),purchase_vat_recoverable_95:e.string().max(MA).nullish(),purchase_vat_recoverable_5:e.string().max(TA).nullish(),sales_revenue_22:e.string().max(kA).nullish(),sales_revenue_95:e.string().max(BA).nullish(),sales_revenue_5:e.string().max(NA).nullish(),sales_revenue_exempt:e.string().max(OA).nullish(),sales_revenue_eu_goods:e.string().max(FA).nullish(),sales_revenue_eu_services:e.string().max(UA).nullish(),sales_revenue_reverse_charge:e.string().max(jA).nullish(),sales_revenue_third_country_goods:e.string().max(qA).nullish(),sales_revenue_third_country_services:e.string().max(WA).nullish(),purchase_expense_22:e.string().max(GA).nullish(),purchase_expense_95:e.string().max(VA).nullish(),purchase_expense_5:e.string().max(LA).nullish(),purchase_expense_exempt:e.string().max(HA).nullish(),purchase_expense_eu_goods:e.string().max(YA).nullish(),purchase_expense_eu_services:e.string().max(KA).nullish(),purchase_expense_reverse_charge:e.string().max($A).nullish(),purchase_expense_third_country_goods:e.string().max(QA).nullish(),purchase_expense_third_country_services:e.string().max(JA).nullish()}).nullish().describe("Stored semantic konto mappings shared by Slovenian accounting exports.")}).nullish().describe("Slovenia-specific accounting export defaults and konto mappings.")}).nullish().describe("Slovenia-specific tax profile used by yearly eDavki exports and future Slovenia-specific reporting flows."),furs:e.object({enabled:e.boolean().default(ZA).describe("Whether FURS fiscalization is enabled for this entity"),default_skip_fiscalization:e.boolean().default(XA).describe("Whether new FURS-capable documents should start with fiscalization skipped by default. Payment type rules still override this and require fiscalization for non-bank-transfer payments."),numbering_strategy:e.enum(["B","C"]).optional().describe("Numbering strategy: B (device-level) or C (centralized). Optional - can be set per-premise."),operator_tax_number:e.string().optional().describe("Operator tax number for this entity (used when creating invoices via API key)"),operator_label:e.string().optional().describe("Operator label/name for this entity"),foreign_operator:e.boolean().optional().describe("Whether the operator is a foreign legal entity"),environment:e.enum(["test","production"]).optional().describe("FURS environment override (test or production). When omitted, derived from entity environment.")}).nullish().describe("FURS (Slovenia) fiscalization settings. Certificate data is stored separately via the certificate upload endpoint."),fina:e.object({enabled:e.boolean().default(eM).describe("Whether CIS (FINA) fiscalization is enabled for this entity"),operator_oib:e.string().min(tM).max(oM).optional().describe("OIB of the operator (11 digits). Used when creating invoices via API key."),operator_label:e.string().optional().describe("Operator label/name for this entity"),u_sust_pdv:e.boolean().default(nM).describe("Whether the entity is in the PDV (VAT) system. Most businesses are."),numbering_sequence:e.enum(["N","P"]).default(sM).describe("Numbering sequence: P (per premise) or N (per device)"),unified_numbering:e.boolean().nullish().describe("When enabled (default: true), all documents use the same FINA numbering sequence regardless of transaction type (domestic/non-domestic)"),certificate_expiry:e.string().optional().describe("Certificate expiry date (ISO 8601 format)")}).nullish().describe("FINA (Croatia) CIS fiscalization settings. Required for Croatian B2C invoicing. Certificate data is stored separately via the certificate upload endpoint."),pt:e.object({operator_first_name:e.string().min(1).optional().describe("Default PT operator first name for API key and headless document creation"),operator_last_name:e.string().min(1).optional().describe("Default PT operator last name for API key and headless document creation"),operator_tax_number:e.string().regex(rM).optional().describe("Default PT operator tax number for API key and headless document creation")}).nullish().describe("Portugal operator defaults used for PT document creation when request-level or user-level PT operator data is not available."),tax_rules:e.object({eu:e.object({vies_validate_vat:e.boolean().default(iM).describe("Validate EU VAT numbers against the VIES API. When enabled, customer VAT numbers are checked for validity before creating invoices. Validation results are cached on customer records. If VIES is unavailable, invoice creation continues with a warning."),auto_reverse_charge:e.boolean().default(aM).describe("Automatically apply 0% tax (reverse charge) for intra-EU B2B transactions. When enabled, taxes are removed and replaced with reverse charge note for valid VIES-validated cross-border B2B sales. Requires vies_validate_vat to be enabled for VAT validation."),auto_remove_tax_export:e.boolean().default(dM).describe("Automatically remove all taxes for exports to non-EU countries. When enabled, invoices to customers outside the EU will have all tax lines removed."),require_gross_prices:e.boolean().default(cM).describe("Require gross prices when reverse charge is applied. When enabled, creates a validation error if net prices are used with reverse charge transactions, since removing tax would change the invoice total.")}).nullish().describe("EU tax rules settings. Only applicable for entities based in EU countries. Set to null or omit for non-EU entities.")}).nullish().describe("Tax rules engine settings. Controls automatic tax behaviors based on entity location and transaction characteristics (VIES validation, reverse charge, export tax removal). Defaults are set automatically based on entity country. Set to null for non-EU entities."),overdue_notifications:e.object({enabled:e.boolean().default(lM).describe("Enable automatic overdue invoice notification emails to customers"),threshold_days:e.array(e.number().gt(uM)).default(pM).describe("Days overdue when notification emails are sent (exact day match). Email is triggered when any invoice hits these thresholds."),email_subject:e.string().nullish().describe("Custom email subject. Available variables: {customer_name}, {entity_name}, {overdue_count}"),email_body:e.string().nullish().describe("Custom email body. Available variables: {customer_name}, {entity_name}, {invoice_list}, {total_amount}, {entity_email}. If {invoice_list} is not included, the invoice table will be auto-appended.")}).nullish().describe("Settings for automatic overdue invoice notification emails to customers"),upn_qr:e.object({enabled:e.boolean().describe("Whether UPN QR payment slip is enabled on invoices (Slovenia only)"),display_mode:e.enum(["qr_only","full_slip"]).default(mM).describe("Display mode for UPN payment slip: 'qr_only' shows QR code inline after content, 'full_slip' shows complete payment slip at page bottom"),purpose_code:e.string().min(yM).max(hM).regex(bM).default(gM).describe("4-letter purpose code for UPN payments (ISO 20022). Common values: OTHR (other), GDSV (goods/services), SALA (salary)")}).nullish().describe("UPN QR payment slip settings (Slovenia only). Displays payment QR code on invoices for easy bank transfers."),epc_qr:e.object({enabled:e.boolean().describe("Whether EPC QR code is enabled on EUR invoices (SEPA countries)")}).nullish().describe("EPC QR code settings (SEPA countries). Displays SEPA credit transfer QR code on EUR invoices for easy bank payment."),bank_accounts:e.array(e.object({type:e.enum(["iban","us_domestic","uk_domestic","other"]).default(xM).describe("Account type determines which fields are used"),name:e.string().nullish().describe("Display name for this account. Falls back to account number if not set"),bank_name:e.string().nullish().describe("Bank name"),iban:e.string().nullish().describe("IBAN (for type=iban)"),account_number:e.string().nullish().describe("Account number (for us_domestic, uk_domestic, other)"),bic:e.string().nullish().describe("BIC/SWIFT code for international transfers"),routing_number:e.string().nullish().describe("US ABA routing number (for type=us_domestic)"),sort_code:e.string().nullish().describe("UK sort code (for type=uk_domestic)"),is_default:e.boolean().nullish().describe("Whether this is the default account for new invoices")})).nullish().describe("Bank accounts for receiving payments. The first account with is_default=true (or first in list) is used for new invoices."),eslog_validation_enabled:e.boolean().nullish().describe("Enable e-SLOG 2.0 validation for documents. Only applicable for Slovenian entities (country_code = 'SI'). When enabled, documents are validated against e-SLOG 2.0 requirements and can be exported as e-SLOG XML if valid."),delivery_note_hide_prices:e.boolean().nullish().describe("Default hide_prices setting for new delivery notes. When true, prices and totals are hidden (packing list mode)."),credit_note_negative_values:e.boolean().nullish().describe("When true (default), credit note PDFs display line item quantities and totals as negative values while keeping prices positive. Zero quantities and totals stay unsigned. Set to false to show quantities and totals as positive."),show_payment_amounts:e.boolean().nullish().describe("When true, rendered document payment/refund sections show the payment amount next to each payment type. Defaults to false, which shows only the payment or refund type."),receipt_note:e.string().max(zM).nullish().describe("Default note printed on thermal receipts."),receipt_footer:e.string().max(_M).nullish().describe("Default footer text printed on thermal receipts (e.g. IBAN, thank-you message)."),receipt_signature:e.string().max(vM).nullish().describe("Default signature / issuer label printed on thermal receipts."),tax_clause_defaults:e.object({domestic:e.string().nullish().describe("Default tax clause for domestic transactions (same country)"),intra_eu_b2b:e.string().nullish().describe("Default tax clause for intra-EU B2B transactions (reverse charge applies)"),intra_eu_b2c:e.string().nullish().describe("Default tax clause for intra-EU B2C transactions"),"3w_b2b":e.string().nullish().describe("Default tax clause for third-world B2B transactions (non-EU, business customer)"),"3w_b2c":e.string().nullish().describe("Default tax clause for third-world B2C transactions (non-EU, end consumer)"),export:e.string().nullish().describe("Deprecated: Use 3w_b2b and 3w_b2c instead. Default tax clause for export transactions.")}).nullish().describe("Default tax clauses per transaction type. Auto-applied to documents based on transaction type determination. Supports template variables: {entity_name}, {customer_name}, {document_number}, etc."),e_invoicing:e.object({enabled:e.boolean().default(fM).describe("Whether e-invoicing is enabled for this entity. Requires supplier onboarding to be completed before documents can be sent."),provider:e.enum(["flowin"]).default(RM).describe("E-invoicing provider. Currently only Flowin (Wolters Kluwer) is supported."),auto_send:e.boolean().default(IM).describe("Automatically send invoices via e-invoice after creation. Only works when entity is fully onboarded with the provider."),default_scheme_id:e.string().optional().describe('Default Peppol participant scheme ID for this entity. Common values: "0009" (SIRET, France), "9925" (VAT, Belgium), "0088" (EAN/GLN).')}).nullish().describe("E-invoicing settings for sending documents via Peppol network (through Flowin). Requires supplier onboarding before documents can be sent electronically.")}).describe("Entity settings"),metadata:e.record(e.string(),e.string()).nullish().describe("Custom key-value data for your own use. Store any JSON object up to 50 properties. Values must be strings up to 250 characters. Useful for storing external IDs, tags, or integration data."),created_at:e.iso.datetime({}),updated_at:e.iso.datetime({}),country_rules:e.object({max_taxes_per_item:e.number().min(1).describe("Maximum number of taxes allowed per line item"),features:e.array(e.string()).describe("Available country-specific features (availability only, not enabled status)")}).describe("Country-specific rules derived from entity's country_code")}).describe("Legal entity (business, club, sole-proprietor, ...) on which invoices and other resources are created."),EM=/^(?:[a-z]{3,4}_){0,2}[0-9a-f]{24}$/,Dxe=e.object({id:e.stringFormat("resource-id",EM).describe("Space Invoices resource identifier (format: {prefix}_{hex24})")}),SM=/^acc_[0-9a-fA-F]{24}$/,Pxe=e.object({"x-account-id":e.string().regex(SM).optional().describe("Account Id on which the request is made. Optional if user is part of only one account.")}),DM=36,PM=255,wM=500,CM=500,AM=20,MM=100,TM=100,kM=100,BM=2,NM=3,OM=20,FM=50,UM=50,jM=50,qM=50,WM=255,GM=500,VM=10,LM=-140737488355328,HM=0x7fffffffffff,YM=36,KM=/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/,$M=30,QM=100,JM=0,ZM=0,XM=500,eT=10,tT=50,oT=0,nT=0,sT=8,rT=8,iT=8,aT=8,dT=8,cT=8,lT=8,uT=8,pT=8,mT=8,gT=8,yT=8,hT=8,bT=8,xT=8,zT=8,_T=8,vT=8,fT=8,RT=8,IT=8,ET=8,ST=8,DT=8,PT=8,wT=8,CT=false,AT=false,MT=false,TT=11,kT=11,BT=true,NT="P",OT=/^\d{9}$/,FT=true,UT=false,jT=false,qT=false,WT=false,GT=0,VT=[7,14,30],LT="qr_only",HT="OTHR",YT=4,KT=4,$T=/^[A-Z]{4}$/,QT="iban",JT=500,ZT=500,XT=200,ek=false,tk="flowin",ok=false,wxe=e.object({id:e.string().max(DM),name:e.string().max(PM),address:e.string().max(wM).nullish(),address_2:e.string().max(CM).nullish(),post_code:e.string().max(AM).nullish(),city:e.string().max(MM).nullish(),state:e.string().max(TM).nullish(),country:e.string().max(kM),country_code:e.string().max(BM),currency_code:e.string().max(NM).nullish(),locale:e.string().max(OM),tax_number:e.string().max(FM).nullish(),tax_number_2:e.string().max(UM).nullish(),company_number:e.string().max(jM).nullish(),phone:e.string().max(qM).nullish(),email:e.string().max(WM).nullish(),website:e.string().max(GM).nullish(),fiscal_region_code:e.string().max(VM).nullish(),starting_capital:e.number().min(LM).max(HM).nullish(),account_id:e.string().max(YM),environment:e.enum(["live","sandbox"]).describe("Entity environment"),is_tax_subject:e.boolean(),is_enabled:e.boolean().describe("Whether the entity is enabled. Disabled entities cannot create documents (invoices, estimates, etc.) but all data remains accessible and settings can be updated."),settings:e.object({pdf_template:e.union([e.literal("modern"),e.literal("classic"),e.literal("condensed"),e.literal("minimal"),e.literal("fashion"),e.literal("timeless_modern_full_data"),e.literal(null)]).nullish().describe("Default PDF template for document rendering. Defaults to 'modern' if not set."),number_formats:e.object({invoice:e.string().nullish(),estimate:e.string().nullish(),credit_note:e.string().nullish(),advance_invoice:e.string().nullish(),delivery_note:e.string().nullish()}).nullish(),primary_color:e.string().regex(KM).nullish(),logo_scale_percent:e.number().min($M).max(QM).nullish().describe("Scale the PDF logo size as a percentage of the template default size. 100 keeps the original size."),has_logo:e.boolean().nullish(),has_signature:e.boolean().nullish(),default_invoice_due_days:e.number().gt(JM).nullish().describe("Default number of days until invoice is due (from invoice date)"),default_estimate_valid_days:e.number().gt(ZM).nullish().describe("Default number of days until estimate expires (from estimate date)"),email_defaults:e.object({invoice_subject:e.string().nullish().describe("Default subject line for invoice emails. Available variables: {document_number}, {entity_name}, {entity_email}, {entity_address}, {entity_post_code}, {entity_city}, {entity_country}, {entity_tax_number}, {entity_company_number}, {customer_name}, {document_date}, {document_due_date}, {document_total}, {document_currency}"),invoice_body:e.string().nullish().describe("Default body text for invoice emails. Available variables: {document_number}, {entity_name}, {entity_email}, {entity_address}, {entity_post_code}, {entity_city}, {entity_country}, {entity_tax_number}, {entity_company_number}, {customer_name}, {document_date}, {document_due_date}, {document_total}, {document_currency}"),estimate_subject:e.string().nullish().describe("Default subject line for estimate emails. Available variables: {document_number}, {entity_name}, {entity_email}, {entity_address}, {entity_post_code}, {entity_city}, {entity_country}, {entity_tax_number}, {entity_company_number}, {customer_name}, {document_date}, {document_valid_until}, {document_total}, {document_currency}"),estimate_body:e.string().nullish().describe("Default body text for estimate emails. Available variables: {document_number}, {entity_name}, {entity_email}, {entity_address}, {entity_post_code}, {entity_city}, {entity_country}, {entity_tax_number}, {entity_company_number}, {customer_name}, {document_date}, {document_valid_until}, {document_total}, {document_currency}"),credit_note_subject:e.string().nullish().describe("Default subject line for credit note emails. Available variables: {document_number}, {entity_name}, {entity_email}, {entity_address}, {entity_post_code}, {entity_city}, {entity_country}, {entity_tax_number}, {entity_company_number}, {customer_name}, {document_date}, {document_total}, {document_currency}"),credit_note_body:e.string().nullish().describe("Default body text for credit note emails. Available variables: {document_number}, {entity_name}, {entity_email}, {entity_address}, {entity_post_code}, {entity_city}, {entity_country}, {entity_tax_number}, {entity_company_number}, {customer_name}, {document_date}, {document_total}, {document_currency}"),advance_invoice_subject:e.string().nullish().describe("Default subject line for advance invoice emails. Available variables: {document_number}, {entity_name}, {entity_email}, {entity_address}, {entity_post_code}, {entity_city}, {entity_country}, {entity_tax_number}, {entity_company_number}, {customer_name}, {document_date}, {document_total}, {document_currency}"),advance_invoice_body:e.string().nullish().describe("Default body text for advance invoice emails. Available variables: {document_number}, {entity_name}, {entity_email}, {entity_address}, {entity_post_code}, {entity_city}, {entity_country}, {entity_tax_number}, {entity_company_number}, {customer_name}, {document_date}, {document_total}, {document_currency}"),delivery_note_subject:e.string().nullish().describe("Default subject line for delivery note emails. Available variables: {document_number}, {entity_name}, {entity_email}, {entity_address}, {entity_post_code}, {entity_city}, {entity_country}, {entity_tax_number}, {entity_company_number}, {customer_name}, {document_date}, {document_total}, {document_currency}"),delivery_note_body:e.string().nullish().describe("Default body text for delivery note emails. Available variables: {document_number}, {entity_name}, {entity_email}, {entity_address}, {entity_post_code}, {entity_city}, {entity_country}, {entity_tax_number}, {entity_company_number}, {customer_name}, {document_date}, {document_total}, {document_currency}")}).nullish(),default_invoice_note:e.string().nullish().describe("Default note for new invoices. Supports template variables: {entity_name}, {entity_email}, {document_number}, {document_date}, {document_due_date}, {document_total}, {document_currency}, {customer_name}, {customer_email}, {current_date}, {current_year}"),default_invoice_payment_terms:e.string().nullish().describe("Default payment terms for new invoices. Supports template variables: {entity_name}, {entity_email}, {document_number}, {document_date}, {document_due_date}, {document_total}, {document_currency}, {customer_name}, {customer_email}, {current_date}, {current_year}"),default_estimate_note:e.string().nullish().describe("Default note for new estimates. Supports template variables: {entity_name}, {entity_email}, {document_number}, {document_date}, {document_valid_until}, {document_total}, {document_currency}, {customer_name}, {customer_email}, {current_date}, {current_year}"),default_estimate_payment_terms:e.string().nullish().describe("Default payment terms for new estimates. Supports template variables: {entity_name}, {entity_email}, {document_number}, {document_date}, {document_valid_until}, {document_total}, {document_currency}, {customer_name}, {customer_email}, {current_date}, {current_year}"),default_credit_note_note:e.string().nullish().describe("Default note for new credit notes. Supports template variables: {entity_name}, {entity_email}, {document_number}, {document_date}, {document_total}, {document_currency}, {customer_name}, {customer_email}, {current_date}, {current_year}"),default_credit_note_payment_terms:e.string().nullish().describe("Default payment terms for new credit notes. Supports template variables: {entity_name}, {entity_email}, {document_number}, {document_date}, {document_total}, {document_currency}, {customer_name}, {customer_email}, {current_date}, {current_year}"),default_advance_invoice_note:e.string().nullish().describe("Default note for new advance invoices. Supports template variables: {entity_name}, {entity_email}, {document_number}, {document_date}, {document_total}, {document_currency}, {customer_name}, {customer_email}, {current_date}, {current_year}"),default_delivery_note_note:e.string().nullish().describe("Default note for new delivery notes. Supports template variables: {entity_name}, {entity_email}, {document_number}, {document_date}, {document_total}, {document_currency}, {customer_name}, {customer_email}, {current_date}, {current_year}"),document_footer:e.string().max(XM).nullish().describe("Footer text for PDF documents. Supports template variables: {entity_name}, {entity_email}, {document_number}, {document_date}, {document_due_date}, {document_total}, {document_currency}, {customer_name}, {customer_email}, {current_date}, {current_year}"),default_document_signature:e.string().nullish().describe("Default signature text for all new documents. Supports template variables: {entity_name}, {entity_email}, {document_number}, {document_date}, {document_due_date}, {document_total}, {document_currency}, {customer_name}, {customer_email}, {current_date}, {current_year}"),calculation:e.object({default_mode:e.union([e.literal("b2b_standard"),e.literal("b2c_gross_discount"),e.literal(null)]).nullish().describe("Default document calculation mode. `b2b_standard` applies discounts before VAT on the net basis. `b2c_gross_discount` applies discounts to the gross payable amount and derives net/VAT afterward.")}).nullish().describe("Document calculation defaults. Controls whether newly calculated documents use the standard B2B net-first model or the B2C gross-discount model by default."),slovenia:e.object({business_form:e.union([e.literal("sp"),e.literal("doo"),e.literal("dno"),e.literal("club"),e.literal(null)]).nullish().describe("Stored Slovenian legal form for country-specific exports and reporting."),income_tax_regime:e.union([e.literal("normirani"),e.literal("dejanski"),e.literal(null)]).nullish().describe("Stored Slovenian income tax regime for yearly reporting."),vat_profile:e.union([e.literal("standard"),e.literal("special_vat_identified"),e.literal("non_vat_subject"),e.literal(null)]).nullish().describe("Stored Slovenian VAT subject subtype."),tax_residency:e.union([e.literal("resident"),e.literal("non_resident"),e.literal(null)]).nullish().describe("Stored Slovenian tax residency status."),yearly_reporting:e.object({activity_code:e.string().max(eT).nullish().describe("Primary Slovenian SKD activity code used for yearly reporting."),registration_number:e.string().max(tT).nullish().describe("Optional registration number / branch registration used in yearly reporting."),accounting_type:e.union([e.literal("records"),e.literal("single_entry"),e.literal("double_entry"),e.literal(null)]).nullish().describe("Bookkeeping / records mode used in the yearly filing."),normiranec_insurance_basis:e.union([e.literal("full_time_self_employed"),e.literal("other"),e.literal(null)]).nullish().describe("Insurance basis used for normirani expense and tax rules."),default_withholding_tax_amount:e.number().min(oT).nullish().describe("Persisted default for withholding tax manually entered during yearly review."),default_foreign_tax_credit_amount:e.number().min(nT).nullish().describe("Persisted default for foreign tax credit manually entered during yearly review.")}).nullish().describe("Slovenia-specific yearly reporting defaults and profile data."),accounting_exports:e.object({preferred_format:e.union([e.literal("vod_xml"),e.literal("vasco_xml"),e.literal("minimax_xml"),e.literal(null)]).nullish().describe("Stored preferred export format for Slovenian accounting handoff."),konto_mappings:e.object({receivables:e.string().max(sT).nullish(),payables:e.string().max(rT).nullish(),sales_vat_22:e.string().max(iT).nullish(),sales_vat_95:e.string().max(aT).nullish(),sales_vat_5:e.string().max(dT).nullish(),purchase_vat_recoverable_22:e.string().max(cT).nullish(),purchase_vat_recoverable_95:e.string().max(lT).nullish(),purchase_vat_recoverable_5:e.string().max(uT).nullish(),sales_revenue_22:e.string().max(pT).nullish(),sales_revenue_95:e.string().max(mT).nullish(),sales_revenue_5:e.string().max(gT).nullish(),sales_revenue_exempt:e.string().max(yT).nullish(),sales_revenue_eu_goods:e.string().max(hT).nullish(),sales_revenue_eu_services:e.string().max(bT).nullish(),sales_revenue_reverse_charge:e.string().max(xT).nullish(),sales_revenue_third_country_goods:e.string().max(zT).nullish(),sales_revenue_third_country_services:e.string().max(_T).nullish(),purchase_expense_22:e.string().max(vT).nullish(),purchase_expense_95:e.string().max(fT).nullish(),purchase_expense_5:e.string().max(RT).nullish(),purchase_expense_exempt:e.string().max(IT).nullish(),purchase_expense_eu_goods:e.string().max(ET).nullish(),purchase_expense_eu_services:e.string().max(ST).nullish(),purchase_expense_reverse_charge:e.string().max(DT).nullish(),purchase_expense_third_country_goods:e.string().max(PT).nullish(),purchase_expense_third_country_services:e.string().max(wT).nullish()}).nullish().describe("Stored semantic konto mappings shared by Slovenian accounting exports.")}).nullish().describe("Slovenia-specific accounting export defaults and konto mappings.")}).nullish().describe("Slovenia-specific tax profile used by yearly eDavki exports and future Slovenia-specific reporting flows."),furs:e.object({enabled:e.boolean().default(CT).describe("Whether FURS fiscalization is enabled for this entity"),default_skip_fiscalization:e.boolean().default(AT).describe("Whether new FURS-capable documents should start with fiscalization skipped by default. Payment type rules still override this and require fiscalization for non-bank-transfer payments."),numbering_strategy:e.enum(["B","C"]).optional().describe("Numbering strategy: B (device-level) or C (centralized). Optional - can be set per-premise."),operator_tax_number:e.string().optional().describe("Operator tax number for this entity (used when creating invoices via API key)"),operator_label:e.string().optional().describe("Operator label/name for this entity"),foreign_operator:e.boolean().optional().describe("Whether the operator is a foreign legal entity"),environment:e.enum(["test","production"]).optional().describe("FURS environment override (test or production). When omitted, derived from entity environment.")}).nullish().describe("FURS (Slovenia) fiscalization settings. Certificate data is stored separately via the certificate upload endpoint."),fina:e.object({enabled:e.boolean().default(MT).describe("Whether CIS (FINA) fiscalization is enabled for this entity"),operator_oib:e.string().min(TT).max(kT).optional().describe("OIB of the operator (11 digits). Used when creating invoices via API key."),operator_label:e.string().optional().describe("Operator label/name for this entity"),u_sust_pdv:e.boolean().default(BT).describe("Whether the entity is in the PDV (VAT) system. Most businesses are."),numbering_sequence:e.enum(["N","P"]).default(NT).describe("Numbering sequence: P (per premise) or N (per device)"),unified_numbering:e.boolean().nullish().describe("When enabled (default: true), all documents use the same FINA numbering sequence regardless of transaction type (domestic/non-domestic)"),certificate_expiry:e.string().optional().describe("Certificate expiry date (ISO 8601 format)")}).nullish().describe("FINA (Croatia) CIS fiscalization settings. Required for Croatian B2C invoicing. Certificate data is stored separately via the certificate upload endpoint."),pt:e.object({operator_first_name:e.string().min(1).optional().describe("Default PT operator first name for API key and headless document creation"),operator_last_name:e.string().min(1).optional().describe("Default PT operator last name for API key and headless document creation"),operator_tax_number:e.string().regex(OT).optional().describe("Default PT operator tax number for API key and headless document creation")}).nullish().describe("Portugal operator defaults used for PT document creation when request-level or user-level PT operator data is not available."),tax_rules:e.object({eu:e.object({vies_validate_vat:e.boolean().default(FT).describe("Validate EU VAT numbers against the VIES API. When enabled, customer VAT numbers are checked for validity before creating invoices. Validation results are cached on customer records. If VIES is unavailable, invoice creation continues with a warning."),auto_reverse_charge:e.boolean().default(UT).describe("Automatically apply 0% tax (reverse charge) for intra-EU B2B transactions. When enabled, taxes are removed and replaced with reverse charge note for valid VIES-validated cross-border B2B sales. Requires vies_validate_vat to be enabled for VAT validation."),auto_remove_tax_export:e.boolean().default(jT).describe("Automatically remove all taxes for exports to non-EU countries. When enabled, invoices to customers outside the EU will have all tax lines removed."),require_gross_prices:e.boolean().default(qT).describe("Require gross prices when reverse charge is applied. When enabled, creates a validation error if net prices are used with reverse charge transactions, since removing tax would change the invoice total.")}).nullish().describe("EU tax rules settings. Only applicable for entities based in EU countries. Set to null or omit for non-EU entities.")}).nullish().describe("Tax rules engine settings. Controls automatic tax behaviors based on entity location and transaction characteristics (VIES validation, reverse charge, export tax removal). Defaults are set automatically based on entity country. Set to null for non-EU entities."),overdue_notifications:e.object({enabled:e.boolean().default(WT).describe("Enable automatic overdue invoice notification emails to customers"),threshold_days:e.array(e.number().gt(GT)).default(VT).describe("Days overdue when notification emails are sent (exact day match). Email is triggered when any invoice hits these thresholds."),email_subject:e.string().nullish().describe("Custom email subject. Available variables: {customer_name}, {entity_name}, {overdue_count}"),email_body:e.string().nullish().describe("Custom email body. Available variables: {customer_name}, {entity_name}, {invoice_list}, {total_amount}, {entity_email}. If {invoice_list} is not included, the invoice table will be auto-appended.")}).nullish().describe("Settings for automatic overdue invoice notification emails to customers"),upn_qr:e.object({enabled:e.boolean().describe("Whether UPN QR payment slip is enabled on invoices (Slovenia only)"),display_mode:e.enum(["qr_only","full_slip"]).default(LT).describe("Display mode for UPN payment slip: 'qr_only' shows QR code inline after content, 'full_slip' shows complete payment slip at page bottom"),purpose_code:e.string().min(YT).max(KT).regex($T).default(HT).describe("4-letter purpose code for UPN payments (ISO 20022). Common values: OTHR (other), GDSV (goods/services), SALA (salary)")}).nullish().describe("UPN QR payment slip settings (Slovenia only). Displays payment QR code on invoices for easy bank transfers."),epc_qr:e.object({enabled:e.boolean().describe("Whether EPC QR code is enabled on EUR invoices (SEPA countries)")}).nullish().describe("EPC QR code settings (SEPA countries). Displays SEPA credit transfer QR code on EUR invoices for easy bank payment."),bank_accounts:e.array(e.object({type:e.enum(["iban","us_domestic","uk_domestic","other"]).default(QT).describe("Account type determines which fields are used"),name:e.string().nullish().describe("Display name for this account. Falls back to account number if not set"),bank_name:e.string().nullish().describe("Bank name"),iban:e.string().nullish().describe("IBAN (for type=iban)"),account_number:e.string().nullish().describe("Account number (for us_domestic, uk_domestic, other)"),bic:e.string().nullish().describe("BIC/SWIFT code for international transfers"),routing_number:e.string().nullish().describe("US ABA routing number (for type=us_domestic)"),sort_code:e.string().nullish().describe("UK sort code (for type=uk_domestic)"),is_default:e.boolean().nullish().describe("Whether this is the default account for new invoices")})).nullish().describe("Bank accounts for receiving payments. The first account with is_default=true (or first in list) is used for new invoices."),eslog_validation_enabled:e.boolean().nullish().describe("Enable e-SLOG 2.0 validation for documents. Only applicable for Slovenian entities (country_code = 'SI'). When enabled, documents are validated against e-SLOG 2.0 requirements and can be exported as e-SLOG XML if valid."),delivery_note_hide_prices:e.boolean().nullish().describe("Default hide_prices setting for new delivery notes. When true, prices and totals are hidden (packing list mode)."),credit_note_negative_values:e.boolean().nullish().describe("When true (default), credit note PDFs display line item quantities and totals as negative values while keeping prices positive. Zero quantities and totals stay unsigned. Set to false to show quantities and totals as positive."),show_payment_amounts:e.boolean().nullish().describe("When true, rendered document payment/refund sections show the payment amount next to each payment type. Defaults to false, which shows only the payment or refund type."),receipt_note:e.string().max(JT).nullish().describe("Default note printed on thermal receipts."),receipt_footer:e.string().max(ZT).nullish().describe("Default footer text printed on thermal receipts (e.g. IBAN, thank-you message)."),receipt_signature:e.string().max(XT).nullish().describe("Default signature / issuer label printed on thermal receipts."),tax_clause_defaults:e.object({domestic:e.string().nullish().describe("Default tax clause for domestic transactions (same country)"),intra_eu_b2b:e.string().nullish().describe("Default tax clause for intra-EU B2B transactions (reverse charge applies)"),intra_eu_b2c:e.string().nullish().describe("Default tax clause for intra-EU B2C transactions"),"3w_b2b":e.string().nullish().describe("Default tax clause for third-world B2B transactions (non-EU, business customer)"),"3w_b2c":e.string().nullish().describe("Default tax clause for third-world B2C transactions (non-EU, end consumer)"),export:e.string().nullish().describe("Deprecated: Use 3w_b2b and 3w_b2c instead. Default tax clause for export transactions.")}).nullish().describe("Default tax clauses per transaction type. Auto-applied to documents based on transaction type determination. Supports template variables: {entity_name}, {customer_name}, {document_number}, etc."),e_invoicing:e.object({enabled:e.boolean().default(ek).describe("Whether e-invoicing is enabled for this entity. Requires supplier onboarding to be completed before documents can be sent."),provider:e.enum(["flowin"]).default(tk).describe("E-invoicing provider. Currently only Flowin (Wolters Kluwer) is supported."),auto_send:e.boolean().default(ok).describe("Automatically send invoices via e-invoice after creation. Only works when entity is fully onboarded with the provider."),default_scheme_id:e.string().optional().describe('Default Peppol participant scheme ID for this entity. Common values: "0009" (SIRET, France), "9925" (VAT, Belgium), "0088" (EAN/GLN).')}).nullish().describe("E-invoicing settings for sending documents via Peppol network (through Flowin). Requires supplier onboarding before documents can be sent electronically.")}).describe("Entity settings"),metadata:e.record(e.string(),e.string()).nullish().describe("Custom key-value data for your own use. Store any JSON object up to 50 properties. Values must be strings up to 250 characters. Useful for storing external IDs, tags, or integration data."),created_at:e.iso.datetime({}),updated_at:e.iso.datetime({}),country_rules:e.object({max_taxes_per_item:e.number().min(1).describe("Maximum number of taxes allowed per line item"),features:e.array(e.string()).describe("Available country-specific features (availability only, not enabled status)")}).describe("Country-specific rules derived from entity's country_code")}).describe("Legal entity (business, club, sole-proprietor, ...) on which invoices and other resources are created.");var Ie={};j(Ie,{CreateEntityApiKeyBody:()=>Txe,CreateEntityApiKeyHeader:()=>Mxe,DeleteEntityApiKeyHeader:()=>Bxe,DeleteEntityApiKeyParams:()=>kxe,DeleteEntityApiKeyResponse:()=>Nxe,ListEntityApiKeysHeader:()=>Cxe,ListEntityApiKeysResponse:()=>Axe,createEntityApiKeyBodyNameMax:()=>nk,createEntityApiKeyBodyTtlMin:()=>sk,deleteEntityApiKeyPathIdRegExp:()=>rk});var Cxe=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),Axe=e.object({data:e.array(e.object({id:e.string().describe("API key (ek_* prefix for entity-scoped keys)"),entity_id:e.string().describe("Entity ID this key is scoped to"),name:e.string().nullable().describe("Friendly name for the API key"),environment:e.enum(["live","sandbox"]).describe("Environment the key is valid for"),created_at:e.iso.datetime({}).describe("When the key was created"),expires_at:e.iso.datetime({}).nullable().describe("When the key expires, or null if it never expires")}).and(e.object({prefix_hint:e.string().describe("Masked version of the key for display")})))}),Mxe=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),nk=255,sk=60,Txe=e.object({name:e.string().max(nk).optional().describe("Friendly name for the API key"),ttl:e.number().min(sk).optional().describe("Time-to-live in seconds. The key expires after this duration. Minimum 60 seconds. Omit for a key that never expires.")}),rk=/^ek_(live|sandbox)_[0-9a-fA-F]{32}([0-9a-fA-F]{32})?$/,kxe=e.object({id:e.string().regex(rk).describe("Entity API key ID (format: ek_{environment}_{hex})")}),Bxe=e.object({"x-entity-id":e.string().min(1).optional().describe("Optional entity ID specifying which entity context to use for this operation.")}),Nxe=e.object({message:e.string()});var Ee={};j(Ee,{AcceptEntityInvitationBody:()=>$xe,AcceptEntityInvitationQueryParams:()=>Kxe,AcceptEntityInvitationResponse:()=>Qxe,CancelEntityInvitationHeader:()=>Gxe,CancelEntityInvitationParams:()=>Wxe,CancelEntityInvitationResponse:()=>Vxe,GetEntityInvitationHeader:()=>jxe,GetEntityInvitationParams:()=>Uxe,GetEntityInvitationResponse:()=>qxe,ListEntityInvitationsHeader:()=>Oxe,ListEntityInvitationsResponse:()=>Fxe,ResendEntityInvitationHeader:()=>Hxe,ResendEntityInvitationParams:()=>Lxe,ResendEntityInvitationResponse:()=>Yxe,acceptEntityInvitationBodyNameMax:()=>ck,acceptEntityInvitationBodyPasswordMin:()=>lk,cancelEntityInvitationPathIdRegExp:()=>ak,getEntityInvitationPathIdRegExp:()=>ik,resendEntityInvitationPathIdRegExp:()=>dk});var Oxe=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),Fxe=e.object({data:e.array(e.object({id:e.string().describe("Invitation ID"),entity_id:e.string().describe("Entity ID"),email:e.string().describe("Invitee email"),role:e.enum(["viewer","editor","admin"]).describe("User role on the entity"),invited_by_user_id:e.string().describe("ID of user who sent the invitation"),expires_at:e.iso.datetime({}).describe("When the invitation expires"),accepted_at:e.iso.datetime({}).nullable().describe("When the invitation was accepted (null if pending)"),status:e.enum(["pending","accepted","expired"]).describe("Current status of the invitation"),created_at:e.iso.datetime({}).describe("When the invitation was created")}))}),ik=/^(?:[a-z]{3,4}_){0,2}[0-9a-f]{24}$/,Uxe=e.object({id:e.stringFormat("resource-id",ik).describe("Space Invoices resource identifier (format: {prefix}_{hex24})")}),jxe=e.object({"x-entity-id":e.string().min(1).optional().describe("Optional entity ID specifying which entity context to use for this operation.")}),qxe=e.object({id:e.string().describe("Invitation ID"),entity_id:e.string().describe("Entity ID"),email:e.string().describe("Invitee email"),role:e.enum(["viewer","editor","admin"]).describe("User role on the entity"),invited_by_user_id:e.string().describe("ID of user who sent the invitation"),expires_at:e.iso.datetime({}).describe("When the invitation expires"),accepted_at:e.iso.datetime({}).nullable().describe("When the invitation was accepted (null if pending)"),status:e.enum(["pending","accepted","expired"]).describe("Current status of the invitation"),created_at:e.iso.datetime({}).describe("When the invitation was created")}),ak=/^(?:[a-z]{3,4}_){0,2}[0-9a-f]{24}$/,Wxe=e.object({id:e.stringFormat("resource-id",ak).describe("Space Invoices resource identifier (format: {prefix}_{hex24})")}),Gxe=e.object({"x-entity-id":e.string().min(1).optional().describe("Optional entity ID specifying which entity context to use for this operation.")}),Vxe=e.object({message:e.string()}),dk=/^(?:[a-z]{3,4}_){0,2}[0-9a-f]{24}$/,Lxe=e.object({id:e.stringFormat("resource-id",dk).describe("Space Invoices resource identifier (format: {prefix}_{hex24})")}),Hxe=e.object({"x-entity-id":e.string().min(1).optional().describe("Optional entity ID specifying which entity context to use for this operation.")}),Yxe=e.object({message:e.string(),expires_at:e.iso.datetime({})}),Kxe=e.object({token:e.string().min(1).describe("Invitation token from the invitation email")}),ck=255,lk=8,$xe=e.object({name:e.string().min(1).max(ck).describe("Name of the user accepting the invitation"),password:e.string().min(lk).describe("Password for the new user account")}),Qxe=e.object({message:e.string(),user_id:e.string(),entity_id:e.string(),access_token:e.string().describe("Access token to use for authenticated requests")});var Se={};j(Se,{QueryEntityStatsBody:()=>Zxe,QueryEntityStatsBodyItem:()=>hk,QueryEntityStatsHeader:()=>Jxe,QueryEntityStatsResponse:()=>Xxe,QueryEntityStatsResponseItem:()=>bk,queryEntityStatsBodyGroupByMax:()=>pk,queryEntityStatsBodyLimitMax:()=>yk,queryEntityStatsBodyMetricsMax:()=>uk,queryEntityStatsBodyOrderByItemDirectionDefault:()=>mk,queryEntityStatsBodyOrderByMax:()=>gk});var Jxe=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),uk=10,pk=5,mk="asc",gk=3,yk=1e3,hk=e.object({metrics:e.array(e.object({type:e.enum(["count","sum","avg","min","max"]).describe("Aggregation type"),field:e.string().optional().describe("Field to aggregate (required for sum/avg/min/max)"),alias:e.string().optional().describe("Custom name for this metric in the response")})).min(1).max(uk).describe("Metrics to compute"),table:e.enum(["invoices","estimates","credit_notes","advance_invoices","payments","customers","items","invoice_taxes"]).describe("Table to query"),date_from:e.string().optional().describe("Start date (ISO format YYYY-MM-DD)"),date_to:e.string().optional().describe("End date (ISO format YYYY-MM-DD)"),filters:e.record(e.string(),e.unknown()).optional().describe("Additional filters (field: value pairs)"),group_by:e.array(e.string()).max(pk).optional().describe("Fields to group by"),order_by:e.array(e.object({field:e.string().describe("Field to order by"),direction:e.enum(["asc","desc"]).default(mk).describe("Sort direction")})).max(gk).optional().describe("Ordering for results"),limit:e.number().min(1).max(yk).optional().describe("Maximum number of rows to return")}).describe("Stats query request specification"),Zxe=e.array(hk).min(1).max(25),bk=e.object({query:e.object({table:e.string(),date_from:e.string().nullable(),date_to:e.string().nullable(),group_by:e.array(e.string()).nullable()}).describe("Echo of query parameters"),data:e.array(e.record(e.string(),e.unknown())).describe("Query results - shape depends on metrics and group_by"),row_count:e.number().describe("Number of rows returned")}).describe("Stats query response with aggregated data"),Xxe=e.array(bk);var De={};j(De,{AddEntityUserBody:()=>nze,AddEntityUserHeader:()=>oze,GenerateEntityUserTokenHeader:()=>pze,GenerateEntityUserTokenParams:()=>uze,GenerateEntityUserTokenResponse:()=>mze,GetEntityUsersHeader:()=>eze,GetEntityUsersResponse:()=>tze,RemoveEntityUserHeader:()=>cze,RemoveEntityUserParams:()=>dze,RemoveEntityUserResponse:()=>lze,UpdateEntityUserRoleBody:()=>ize,UpdateEntityUserRoleHeader:()=>rze,UpdateEntityUserRoleParams:()=>sze,UpdateEntityUserRoleResponse:()=>aze,addEntityUserBodyRoleDefault:()=>xk,addEntityUserBodySendInviteDefault:()=>zk,generateEntityUserTokenPathUserIdRegExp:()=>fk,generateEntityUserTokenResponseOneIdMax:()=>Rk,generateEntityUserTokenResponseOneImpersonatorUserIdMax:()=>Dk,generateEntityUserTokenResponseOneScopeMax:()=>Sk,generateEntityUserTokenResponseOneTtlDefault:()=>Ek,generateEntityUserTokenResponseOneUserIdMax:()=>Ik,removeEntityUserPathUserIdRegExp:()=>vk,updateEntityUserRolePathUserIdRegExp:()=>_k});var eze=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),tze=e.object({data:e.array(e.object({user_id:e.string().describe("User ID"),entity_id:e.string().describe("Entity ID"),role:e.enum(["viewer","editor","admin"]).describe("User role on the entity"),email:e.string().describe("User email"),name:e.string().nullable().describe("User name"),invited_by_user_id:e.string().nullable().describe("ID of user who invited this user"),created_at:e.iso.datetime({}).describe("When the user was added to the entity")}))}),oze=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),xk="editor",zk=true,nze=e.object({email:e.email().describe("Email address of the user to add or invite"),role:e.enum(["viewer","editor","admin"]).default(xk).describe("Role to assign to the user"),send_invite:e.boolean().default(zk).describe("Whether to send an invitation email (only applies to new users)")}),_k=/^(?:[a-z]{3,4}_){0,2}[0-9a-f]{24}$/,sze=e.object({user_id:e.stringFormat("resource-id",_k).describe("Space Invoices resource identifier (format: {prefix}_{hex24})")}),rze=e.object({"x-entity-id":e.string().min(1).optional().describe("Optional entity ID specifying which entity context to use for this operation.")}),ize=e.object({role:e.enum(["viewer","editor","admin"]).describe("New role to assign to the user")}),aze=e.object({user_id:e.string().describe("User ID"),entity_id:e.string().describe("Entity ID"),role:e.enum(["viewer","editor","admin"]).describe("User role on the entity"),email:e.string().describe("User email"),name:e.string().nullable().describe("User name"),invited_by_user_id:e.string().nullable().describe("ID of user who invited this user"),created_at:e.iso.datetime({}).describe("When the user was added to the entity")}),vk=/^(?:[a-z]{3,4}_){0,2}[0-9a-f]{24}$/,dze=e.object({user_id:e.stringFormat("resource-id",vk).describe("Space Invoices resource identifier (format: {prefix}_{hex24})")}),cze=e.object({"x-entity-id":e.string().min(1).optional().describe("Optional entity ID specifying which entity context to use for this operation.")}),lze=e.object({message:e.string()}),fk=/^(?:[a-z]{3,4}_){0,2}[0-9a-f]{24}$/,uze=e.object({user_id:e.stringFormat("resource-id",fk).describe("Space Invoices resource identifier (format: {prefix}_{hex24})")}),pze=e.object({"x-entity-id":e.string().min(1).optional().describe("Optional entity ID specifying which entity context to use for this operation.")}),Rk=100,Ik=36,Ek=31536e3,Sk=50,Dk=36,mze=e.object({id:e.string().max(Rk),user_id:e.string().max(Ik),ttl:e.number().default(Ek).describe("Token time-to-live in seconds"),scope:e.string().max(Sk).nullish(),created_at:e.iso.datetime({}),impersonator_user_id:e.string().max(Dk).nullish(),updated_at:e.iso.datetime({})}).describe("Access token for authentication").and(e.object({entity_id:e.string().describe("Entity ID the token is scoped to")})).describe("Access token for authentication");var Pe={};j(Pe,{CreateCustomEstimateBody:()=>Sze,CreateCustomEstimateHeader:()=>Eze,CreateEstimateBody:()=>vze,CreateEstimateHeader:()=>_ze,GetEstimateByIdHeader:()=>wze,GetEstimateByIdParams:()=>Dze,GetEstimateByIdQueryParams:()=>Pze,GetEstimateByIdResponse:()=>Cze,GetEstimateVersionHeader:()=>Uze,GetEstimateVersionParams:()=>Fze,GetEstimateVersionResponse:()=>jze,GetEstimateVersionsHeader:()=>Nze,GetEstimateVersionsParams:()=>Bze,GetEstimateVersionsResponse:()=>Oze,GetEstimatesHeader:()=>Rze,GetEstimatesQueryParams:()=>fze,GetEstimatesResponse:()=>Ize,GetShareableEstimateHtmlParams:()=>hze,GetShareableEstimateHtmlQueryParams:()=>bze,GetShareableEstimateParams:()=>gze,GetShareableEstimatePdfParams:()=>xze,GetShareableEstimatePdfQueryParams:()=>zze,GetShareableEstimateResponse:()=>yze,RenderEstimatePreviewBody:()=>Gze,RenderEstimatePreviewHeader:()=>Wze,RenderEstimatePreviewQueryParams:()=>qze,UpdateEstimateBody:()=>Tze,UpdateEstimateHeader:()=>Mze,UpdateEstimateParams:()=>Aze,UpdateEstimateResponse:()=>kze,createCustomEstimateBodyCustomerOneBankAccountTypeDefault:()=>PB,createCustomEstimateBodyCustomerOneCountryCodeMax:()=>DB,createCustomEstimateBodyCustomerOneCountryCodeMin:()=>SB,createCustomEstimateBodyDateDueRegExp:()=>wB,createCustomEstimateBodyDateServiceRegExp:()=>CB,createCustomEstimateBodyDateServiceToRegExp:()=>AB,createCustomEstimateBodyIssuerOneBankAccountTypeDefault:()=>EB,createCustomEstimateBodyIssuerOneCountryCodeMax:()=>IB,createCustomEstimateBodyIssuerOneCountryCodeMin:()=>RB,createCustomEstimateBodyItemsItemDescriptionMax:()=>MB,createCustomEstimateBodyItemsItemDiscountsItemTypeDefault:()=>BB,createCustomEstimateBodyItemsItemDiscountsItemValueMin:()=>kB,createCustomEstimateBodyItemsItemDiscountsMax:()=>NB,createCustomEstimateBodyItemsItemUnitMax:()=>TB,createEstimateBodyCurrencyCodeMax:()=>f3,createEstimateBodyCustomerOneBankAccountTypeDefault:()=>_3,createEstimateBodyCustomerOneCountryCodeMax:()=>z3,createEstimateBodyCustomerOneCountryCodeMin:()=>x3,createEstimateBodyDateDueRegExp:()=>I3,createEstimateBodyDateRegExp:()=>g3,createEstimateBodyDateServiceRegExp:()=>E3,createEstimateBodyDateServiceToRegExp:()=>S3,createEstimateBodyExpectedTotalWithTaxExclusiveMin:()=>k3,createEstimateBodyFooterMax:()=>v3,createEstimateBodyIssuerBankAccountTypeDefault:()=>b3,createEstimateBodyIssuerCountryCodeMax:()=>h3,createEstimateBodyIssuerCountryCodeMin:()=>y3,createEstimateBodyItemsItemDescriptionMax:()=>D3,createEstimateBodyItemsItemDiscountsItemTypeDefault:()=>M3,createEstimateBodyItemsItemDiscountsItemValueMin:()=>A3,createEstimateBodyItemsItemDiscountsMax:()=>T3,createEstimateBodyItemsItemQuantityMax:()=>w3,createEstimateBodyItemsItemQuantityMin:()=>P3,createEstimateBodyItemsItemUnitMax:()=>C3,createEstimateBodyPtManualSeriesCodeMax:()=>R3,getEstimateByIdPathIdRegExp:()=>OB,getEstimateByIdResponseCurrencyCodeMax:()=>ZB,getEstimateByIdResponseCustomerBankAccountTypeDefault:()=>HB,getEstimateByIdResponseCustomerCountryCodeMax:()=>LB,getEstimateByIdResponseCustomerCountryCodeMin:()=>VB,getEstimateByIdResponseCustomerIdMax:()=>GB,getEstimateByIdResponseDateDueRegExp:()=>aN,getEstimateByIdResponseDateServiceRegExp:()=>dN,getEstimateByIdResponseDateServiceToRegExp:()=>cN,getEstimateByIdResponseDateYearMax:()=>tN,getEstimateByIdResponseDateYearMin:()=>eN,getEstimateByIdResponseEntityIdMax:()=>XB,getEstimateByIdResponseFooterMax:()=>YB,getEstimateByIdResponseIdMax:()=>FB,getEstimateByIdResponseIssuerBankAccountTypeDefault:()=>WB,getEstimateByIdResponseIssuerCountryCodeMax:()=>qB,getEstimateByIdResponseIssuerCountryCodeMin:()=>jB,getEstimateByIdResponseItemsItemAdvanceInvoiceIdMax:()=>vN,getEstimateByIdResponseItemsItemDeliveryNoteIdMax:()=>fN,getEstimateByIdResponseItemsItemDiscountsItemTypeDefault:()=>gN,getEstimateByIdResponseItemsItemDiscountsItemValueMin:()=>mN,getEstimateByIdResponseItemsItemDiscountsMax:()=>yN,getEstimateByIdResponseItemsItemEstimateIdMax:()=>_N,getEstimateByIdResponseItemsItemIdMax:()=>lN,getEstimateByIdResponseItemsItemItemIdMax:()=>RN,getEstimateByIdResponseItemsItemNameMax:()=>uN,getEstimateByIdResponseItemsItemTotalConvertedMax:()=>bN,getEstimateByIdResponseItemsItemTotalConvertedMin:()=>hN,getEstimateByIdResponseItemsItemTotalWithTaxConvertedMax:()=>zN,getEstimateByIdResponseItemsItemTotalWithTaxConvertedMin:()=>xN,getEstimateByIdResponseItemsItemUnitMax:()=>pN,getEstimateByIdResponseNumberMax:()=>UB,getEstimateByIdResponseShareableIdMax:()=>oN,getEstimateByIdResponseTotalConvertedMax:()=>sN,getEstimateByIdResponseTotalConvertedMin:()=>nN,getEstimateByIdResponseTotalMax:()=>$B,getEstimateByIdResponseTotalMin:()=>KB,getEstimateByIdResponseTotalWithTaxConvertedMax:()=>iN,getEstimateByIdResponseTotalWithTaxConvertedMin:()=>rN,getEstimateByIdResponseTotalWithTaxMax:()=>JB,getEstimateByIdResponseTotalWithTaxMin:()=>QB,getEstimateVersionsPathIdRegExp:()=>PO,getEstimatesQueryLimitDefault:()=>B3,getEstimatesQueryLimitMax:()=>N3,getEstimatesResponseDataItemCurrencyCodeMax:()=>J3,getEstimatesResponseDataItemCustomerBankAccountTypeDefault:()=>L3,getEstimatesResponseDataItemCustomerCountryCodeMax:()=>V3,getEstimatesResponseDataItemCustomerCountryCodeMin:()=>G3,getEstimatesResponseDataItemCustomerIdMax:()=>W3,getEstimatesResponseDataItemDateDueRegExp:()=>iB,getEstimatesResponseDataItemDateServiceRegExp:()=>aB,getEstimatesResponseDataItemDateServiceToRegExp:()=>dB,getEstimatesResponseDataItemDateYearMax:()=>eB,getEstimatesResponseDataItemDateYearMin:()=>X3,getEstimatesResponseDataItemEntityIdMax:()=>Z3,getEstimatesResponseDataItemFooterMax:()=>H3,getEstimatesResponseDataItemIdMax:()=>O3,getEstimatesResponseDataItemIssuerBankAccountTypeDefault:()=>q3,getEstimatesResponseDataItemIssuerCountryCodeMax:()=>j3,getEstimatesResponseDataItemIssuerCountryCodeMin:()=>U3,getEstimatesResponseDataItemItemsItemAdvanceInvoiceIdMax:()=>_B,getEstimatesResponseDataItemItemsItemDeliveryNoteIdMax:()=>vB,getEstimatesResponseDataItemItemsItemDiscountsItemTypeDefault:()=>mB,getEstimatesResponseDataItemItemsItemDiscountsItemValueMin:()=>pB,getEstimatesResponseDataItemItemsItemDiscountsMax:()=>gB,getEstimatesResponseDataItemItemsItemEstimateIdMax:()=>zB,getEstimatesResponseDataItemItemsItemIdMax:()=>cB,getEstimatesResponseDataItemItemsItemItemIdMax:()=>fB,getEstimatesResponseDataItemItemsItemNameMax:()=>lB,getEstimatesResponseDataItemItemsItemTotalConvertedMax:()=>hB,getEstimatesResponseDataItemItemsItemTotalConvertedMin:()=>yB,getEstimatesResponseDataItemItemsItemTotalWithTaxConvertedMax:()=>xB,getEstimatesResponseDataItemItemsItemTotalWithTaxConvertedMin:()=>bB,getEstimatesResponseDataItemItemsItemUnitMax:()=>uB,getEstimatesResponseDataItemNumberMax:()=>F3,getEstimatesResponseDataItemShareableIdMax:()=>tB,getEstimatesResponseDataItemTotalConvertedMax:()=>nB,getEstimatesResponseDataItemTotalConvertedMin:()=>oB,getEstimatesResponseDataItemTotalMax:()=>K3,getEstimatesResponseDataItemTotalMin:()=>Y3,getEstimatesResponseDataItemTotalWithTaxConvertedMax:()=>rB,getEstimatesResponseDataItemTotalWithTaxConvertedMin:()=>sB,getEstimatesResponseDataItemTotalWithTaxMax:()=>Q3,getEstimatesResponseDataItemTotalWithTaxMin:()=>$3,getShareableEstimateResponseCurrencyCodeMax:()=>Wk,getShareableEstimateResponseCustomerBankAccountTypeDefault:()=>Nk,getShareableEstimateResponseCustomerCountryCodeMax:()=>Bk,getShareableEstimateResponseCustomerCountryCodeMin:()=>kk,getShareableEstimateResponseCustomerIdMax:()=>Tk,getShareableEstimateResponseDateDueRegExp:()=>Jk,getShareableEstimateResponseDateServiceRegExp:()=>Zk,getShareableEstimateResponseDateServiceToRegExp:()=>Xk,getShareableEstimateResponseDateYearMax:()=>Lk,getShareableEstimateResponseDateYearMin:()=>Vk,getShareableEstimateResponseEntityIdMax:()=>Gk,getShareableEstimateResponseFooterMax:()=>Ok,getShareableEstimateResponseIdMax:()=>Pk,getShareableEstimateResponseIssuerBankAccountTypeDefault:()=>Mk,getShareableEstimateResponseIssuerCountryCodeMax:()=>Ak,getShareableEstimateResponseIssuerCountryCodeMin:()=>Ck,getShareableEstimateResponseItemsItemAdvanceInvoiceIdMax:()=>u3,getShareableEstimateResponseItemsItemDeliveryNoteIdMax:()=>p3,getShareableEstimateResponseItemsItemDiscountsItemTypeDefault:()=>s3,getShareableEstimateResponseItemsItemDiscountsItemValueMin:()=>n3,getShareableEstimateResponseItemsItemDiscountsMax:()=>r3,getShareableEstimateResponseItemsItemEstimateIdMax:()=>l3,getShareableEstimateResponseItemsItemIdMax:()=>e3,getShareableEstimateResponseItemsItemItemIdMax:()=>m3,getShareableEstimateResponseItemsItemNameMax:()=>t3,getShareableEstimateResponseItemsItemTotalConvertedMax:()=>a3,getShareableEstimateResponseItemsItemTotalConvertedMin:()=>i3,getShareableEstimateResponseItemsItemTotalWithTaxConvertedMax:()=>c3,getShareableEstimateResponseItemsItemTotalWithTaxConvertedMin:()=>d3,getShareableEstimateResponseItemsItemUnitMax:()=>o3,getShareableEstimateResponseNumberMax:()=>wk,getShareableEstimateResponseShareableIdMax:()=>Hk,getShareableEstimateResponseTotalConvertedMax:()=>Kk,getShareableEstimateResponseTotalConvertedMin:()=>Yk,getShareableEstimateResponseTotalMax:()=>Uk,getShareableEstimateResponseTotalMin:()=>Fk,getShareableEstimateResponseTotalWithTaxConvertedMax:()=>Qk,getShareableEstimateResponseTotalWithTaxConvertedMin:()=>$k,getShareableEstimateResponseTotalWithTaxMax:()=>qk,getShareableEstimateResponseTotalWithTaxMin:()=>jk,renderEstimatePreviewBodyOneCurrencyCodeMax:()=>WO,renderEstimatePreviewBodyOneCustomerOneBankAccountTypeDefault:()=>jO,renderEstimatePreviewBodyOneCustomerOneCountryCodeMax:()=>UO,renderEstimatePreviewBodyOneCustomerOneCountryCodeMin:()=>FO,renderEstimatePreviewBodyOneDateDueRegExp:()=>VO,renderEstimatePreviewBodyOneDateRegExp:()=>kO,renderEstimatePreviewBodyOneDateServiceRegExp:()=>LO,renderEstimatePreviewBodyOneDateServiceToRegExp:()=>HO,renderEstimatePreviewBodyOneExpectedTotalWithTaxExclusiveMin:()=>YO,renderEstimatePreviewBodyOneFooterMax:()=>qO,renderEstimatePreviewBodyOneIssuerBankAccountTypeDefault:()=>OO,renderEstimatePreviewBodyOneIssuerCountryCodeMax:()=>NO,renderEstimatePreviewBodyOneIssuerCountryCodeMin:()=>BO,renderEstimatePreviewBodyOnePtManualSeriesCodeMax:()=>GO,renderEstimatePreviewBodyTwoCurrencyCodeMax:()=>o5,renderEstimatePreviewBodyTwoCustomerOneBankAccountTypeDefault:()=>e5,renderEstimatePreviewBodyTwoCustomerOneCountryCodeMax:()=>XO,renderEstimatePreviewBodyTwoCustomerOneCountryCodeMin:()=>ZO,renderEstimatePreviewBodyTwoDateDueRegExp:()=>s5,renderEstimatePreviewBodyTwoDateRegExp:()=>KO,renderEstimatePreviewBodyTwoDateServiceRegExp:()=>r5,renderEstimatePreviewBodyTwoDateServiceToRegExp:()=>i5,renderEstimatePreviewBodyTwoExpectedTotalWithTaxExclusiveMin:()=>g5,renderEstimatePreviewBodyTwoFooterMax:()=>t5,renderEstimatePreviewBodyTwoIssuerBankAccountTypeDefault:()=>JO,renderEstimatePreviewBodyTwoIssuerCountryCodeMax:()=>QO,renderEstimatePreviewBodyTwoIssuerCountryCodeMin:()=>$O,renderEstimatePreviewBodyTwoItemsItemDescriptionMax:()=>a5,renderEstimatePreviewBodyTwoItemsItemDiscountsItemTypeDefault:()=>p5,renderEstimatePreviewBodyTwoItemsItemDiscountsItemValueMin:()=>u5,renderEstimatePreviewBodyTwoItemsItemDiscountsMax:()=>m5,renderEstimatePreviewBodyTwoItemsItemQuantityMax:()=>c5,renderEstimatePreviewBodyTwoItemsItemQuantityMin:()=>d5,renderEstimatePreviewBodyTwoItemsItemUnitMax:()=>l5,renderEstimatePreviewBodyTwoPtManualSeriesCodeMax:()=>n5,renderEstimatePreviewQueryLanguageMax:()=>MO,renderEstimatePreviewQueryLanguageMin:()=>AO,renderEstimatePreviewQueryLocaleMax:()=>CO,renderEstimatePreviewQueryLocaleMin:()=>wO,renderEstimatePreviewQueryPartialDefault:()=>TO,updateEstimateBodyChangeReasonMax:()=>jN,updateEstimateBodyCustomerOneBankAccountTypeDefault:()=>AN,updateEstimateBodyCustomerOneCountryCodeMax:()=>CN,updateEstimateBodyCustomerOneCountryCodeMin:()=>wN,updateEstimateBodyDateRegExp:()=>EN,updateEstimateBodyDateValidTillRegExp:()=>qN,updateEstimateBodyIssuerOneBankAccountTypeDefault:()=>PN,updateEstimateBodyIssuerOneCountryCodeMax:()=>DN,updateEstimateBodyIssuerOneCountryCodeMin:()=>SN,updateEstimateBodyItemsItemDescriptionMax:()=>MN,updateEstimateBodyItemsItemDiscountsItemTypeDefault:()=>ON,updateEstimateBodyItemsItemDiscountsItemValueMin:()=>NN,updateEstimateBodyItemsItemDiscountsMax:()=>FN,updateEstimateBodyItemsItemQuantityMax:()=>kN,updateEstimateBodyItemsItemQuantityMin:()=>TN,updateEstimateBodyItemsItemUnitMax:()=>BN,updateEstimateBodyReferenceMax:()=>UN,updateEstimatePathIdRegExp:()=>IN,updateEstimateResponseCurrencyCodeMax:()=>oO,updateEstimateResponseCustomerBankAccountTypeDefault:()=>QN,updateEstimateResponseCustomerCountryCodeMax:()=>$N,updateEstimateResponseCustomerCountryCodeMin:()=>KN,updateEstimateResponseCustomerIdMax:()=>YN,updateEstimateResponseDateDueRegExp:()=>uO,updateEstimateResponseDateServiceRegExp:()=>pO,updateEstimateResponseDateServiceToRegExp:()=>mO,updateEstimateResponseDateYearMax:()=>rO,updateEstimateResponseDateYearMin:()=>sO,updateEstimateResponseEntityIdMax:()=>nO,updateEstimateResponseFooterMax:()=>JN,updateEstimateResponseIdMax:()=>WN,updateEstimateResponseIssuerBankAccountTypeDefault:()=>HN,updateEstimateResponseIssuerCountryCodeMax:()=>LN,updateEstimateResponseIssuerCountryCodeMin:()=>VN,updateEstimateResponseItemsItemAdvanceInvoiceIdMax:()=>EO,updateEstimateResponseItemsItemDeliveryNoteIdMax:()=>SO,updateEstimateResponseItemsItemDiscountsItemTypeDefault:()=>xO,updateEstimateResponseItemsItemDiscountsItemValueMin:()=>bO,updateEstimateResponseItemsItemDiscountsMax:()=>zO,updateEstimateResponseItemsItemEstimateIdMax:()=>IO,updateEstimateResponseItemsItemIdMax:()=>gO,updateEstimateResponseItemsItemItemIdMax:()=>DO,updateEstimateResponseItemsItemNameMax:()=>yO,updateEstimateResponseItemsItemTotalConvertedMax:()=>vO,updateEstimateResponseItemsItemTotalConvertedMin:()=>_O,updateEstimateResponseItemsItemTotalWithTaxConvertedMax:()=>RO,updateEstimateResponseItemsItemTotalWithTaxConvertedMin:()=>fO,updateEstimateResponseItemsItemUnitMax:()=>hO,updateEstimateResponseNumberMax:()=>GN,updateEstimateResponseShareableIdMax:()=>iO,updateEstimateResponseTotalConvertedMax:()=>dO,updateEstimateResponseTotalConvertedMin:()=>aO,updateEstimateResponseTotalMax:()=>XN,updateEstimateResponseTotalMin:()=>ZN,updateEstimateResponseTotalWithTaxConvertedMax:()=>lO,updateEstimateResponseTotalWithTaxConvertedMin:()=>cO,updateEstimateResponseTotalWithTaxMax:()=>tO,updateEstimateResponseTotalWithTaxMin:()=>eO});var gze=e.object({shareableId:e.string().describe("Shareable document token")}),Pk=36,wk=100,Ck=2,Ak=2,Mk="iban",Tk=36,kk=2,Bk=2,Nk="iban",Ok=500,Fk=-140737488355328,Uk=0x7fffffffffff,jk=-140737488355328,qk=0x7fffffffffff,Wk=3,Gk=36,Vk=-2147483648,Lk=2147483647,Hk=100,Yk=-140737488355328,Kk=0x7fffffffffff,$k=-140737488355328,Qk=0x7fffffffffff,Jk=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,Zk=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,Xk=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,e3=36,t3=500,o3=50,n3=0,s3="percent",r3=5,i3=-140737488355328,a3=0x7fffffffffff,d3=-140737488355328,c3=0x7fffffffffff,l3=36,u3=36,p3=36,m3=36,yze=e.object({id:e.string().max(Pk),number:e.string().max(wk),is_draft:e.boolean().describe("Whether this is a draft document. Draft documents have no sequential number assigned, skip fiscalization, and can be deleted. Use POST /{documents}/{id}/finalize to assign a number and finalize."),date:e.iso.datetime({}).describe("Date the estimate was created (ISO 8601 datetime at midnight UTC)"),issuer:e.object({name:e.string().nullish(),email:e.email().nullish(),address:e.string().nullish(),address_2:e.string().nullish(),post_code:e.string().nullish(),city:e.string().nullish(),state:e.string().nullish(),country:e.string().nullish(),country_code:e.string().min(Ck).max(Ak).nullish(),tax_number:e.string().nullish(),tax_number_2:e.string().nullish(),company_number:e.string().nullish(),phone:e.string().nullish(),peppol_id:e.string().nullish(),is_end_consumer:e.boolean().nullish(),bank_account:e.object({type:e.enum(["iban","us_domestic","uk_domestic","other"]).default(Mk).describe("Account type determines which fields are used"),name:e.string().nullish().describe("Display name for this account. Falls back to account number if not set"),bank_name:e.string().nullish().describe("Bank name"),iban:e.string().nullish().describe("IBAN (for type=iban)"),account_number:e.string().nullish().describe("Account number (for us_domestic, uk_domestic, other)"),bic:e.string().nullish().describe("BIC/SWIFT code for international transfers"),routing_number:e.string().nullish().describe("US ABA routing number (for type=us_domestic)"),sort_code:e.string().nullish().describe("UK sort code (for type=uk_domestic)")}).nullish()}).describe("Document issuer (entity) information"),customer_id:e.string().max(Tk).nullish(),customer:e.object({name:e.string().nullish(),email:e.email().nullish(),address:e.string().nullish(),address_2:e.string().nullish(),post_code:e.string().nullish(),city:e.string().nullish(),state:e.string().nullish(),country:e.string().nullish(),country_code:e.string().min(kk).max(Bk).nullish(),tax_number:e.string().nullish(),tax_number_2:e.string().nullish(),company_number:e.string().nullish(),phone:e.string().nullish(),peppol_id:e.string().nullish(),is_end_consumer:e.boolean().nullish(),bank_account:e.object({type:e.enum(["iban","us_domestic","uk_domestic","other"]).default(Nk).describe("Account type determines which fields are used"),name:e.string().nullish().describe("Display name for this account. Falls back to account number if not set"),bank_name:e.string().nullish().describe("Bank name"),iban:e.string().nullish().describe("IBAN (for type=iban)"),account_number:e.string().nullish().describe("Account number (for us_domestic, uk_domestic, other)"),bic:e.string().nullish().describe("BIC/SWIFT code for international transfers"),routing_number:e.string().nullish().describe("US ABA routing number (for type=us_domestic)"),sort_code:e.string().nullish().describe("UK sort code (for type=uk_domestic)")}).nullish()}).nullish().describe("Customer information"),note:e.string().nullish().describe("Note for the document. If not provided, defaults to entity's document-type-specific note setting. Pass empty string to explicitly set no note."),payment_terms:e.string().nullish().describe("Payment terms for the document. If not provided, defaults to entity's document-type-specific payment terms setting. Pass empty string to explicitly set no terms."),tax_clause:e.string().nullish().describe("Tax clause for the document. Auto-populated based on transaction type if tax_clause_defaults are configured in entity settings. Pass empty string to explicitly set no clause."),footer:e.string().max(Ok).nullish(),signature:e.string().nullish().describe("Signature text for the document (e.g. 'John Smith, CEO'). If not provided, defaults to entity's default_document_signature setting. Pass empty string to explicitly set no signature."),total:e.number().min(Fk).max(Uk),total_with_tax:e.number().min(jk).max(qk),total_discount:e.number().describe("Document discount total stored as a net-equivalent amount for compatibility. In `b2b_standard`, this is the net value of line-item discounts applied before tax. In `b2c_gross_discount`, gross discounts are converted back to their net-equivalent value here. 0 when no discounts applied."),creation_source:e.enum(["standard","custom"]).describe("Internal origin of the create request. `standard` means a normal create endpoint calculated the totals. `custom` means the document was created through a `/custom` endpoint."),calculation_mode:e.enum(["b2b_standard","b2c_gross_discount"]).describe("Resolved calculation mode used for this document. Stored on the document so recalculation and rendering remain stable even if entity defaults change later."),taxes:e.array(e.object({rate:e.number().nullable(),tax_id:e.string().nullish(),base:e.number(),amount:e.number(),reverse_charge:e.boolean().nullish()})).describe("Applied taxes summary"),currency_code:e.string().max(Wk),entity_id:e.string().max(Gk),date_year:e.number().min(Vk).max(Lk),shareable_id:e.string().max(Hk).nullish(),voided_at:e.iso.datetime({}).nullish(),transaction_type:e.union([e.literal("domestic"),e.literal("intra_eu_b2b"),e.literal("intra_eu_b2c"),e.literal("3w_b2b"),e.literal("3w_b2c"),e.literal("export"),e.literal(null)]).nullish().describe("Transaction type for VAT purposes (domestic, intra_eu_b2b, intra_eu_b2c, export). Always determined based on issuer/customer countries."),metadata:e.record(e.string(),e.string()).nullish().describe("Custom key-value data for your own use. Store any JSON object up to 50 properties. Values must be strings up to 250 characters. Useful for storing external IDs, tags, or integration data."),exchange_rate:e.object({rate:e.number().describe("Exchange rate used for conversion"),source:e.string().describe("Source of the exchange rate (e.g., 'Frankfurter')"),date:e.iso.datetime({}).describe("Date of the exchange rate"),quote_currency:e.string().describe("Quote currency (the base currency converted to)")}).nullish().describe("Currency exchange rate information if conversion was applied"),total_converted:e.number().min(Yk).max(Kk).nullish(),total_with_tax_converted:e.number().min($k).max(Qk).nullish(),rounding_correction:e.number().nullish().describe("Rounding correction applied to reconcile differences between calculated total_with_tax and expected_total_with_tax. Only present when expected_total_with_tax was provided during creation."),eslog:e.object({validation_enabled:e.boolean().nullish().describe("Override entity default: true = validate, false = skip, null = use entity setting"),validation_status:e.union([e.literal("valid"),e.literal("invalid"),e.literal("not_validated"),e.literal(null)]).nullish().describe("Validation status: 'valid', 'invalid', or 'not_validated'"),validation_errors:e.array(e.string()).nullish().describe("Array of validation error messages (if status is 'invalid')"),validated_at:e.string().nullish().describe("ISO timestamp when validation was last performed")}).nullish().describe("e-SLOG 2.0 validation data for Slovenian electronic invoices. Only applicable when entity.country_code = 'SI' and eslog validation is enabled."),reference:e.string().nullish().describe("Custom reference for the document (e.g., purchase order number, payment reference). When set, used as the UPN payment reference instead of the auto-generated one."),vies:e.object({warning:e.string().nullable().describe("Warning message if VIES validation was unavailable or the VAT number was invalid. Document creation proceeds but this indicates the transaction type may need review."),skipped:e.boolean().nullable().describe("True when VIES validation was skipped due to entity settings (vies_validate_vat: false) but would normally apply. Used for audit trail.")}).nullish().describe("VIES validation info including any warnings and skipped indicator for audit trail"),deleted_at:e.iso.datetime({}).nullish().describe("Timestamp when the document was soft-deleted. Null if not deleted."),created_at:e.iso.datetime({}),updated_at:e.iso.datetime({}),pt:e.union([e.string(),e.number(),e.boolean(),e.null(),e.record(e.string(),e.unknown()),e.array(e.unknown())]).optional(),date_valid_till:e.iso.datetime({}).nullish().describe("Date until which the estimate is valid (ISO 8601 datetime at midnight UTC)"),title_type:e.union([e.literal("estimate"),e.literal("proforma_invoice"),e.literal(null)]).nullish().describe("Display name variant for the document. 'estimate' renders as 'Estimate' (Ponudba/Ponuda), 'proforma_invoice' renders as 'Proforma invoice' (Predra\u010Dun)."),date_due:e.string().regex(Jk).nullish().describe("Document due date in YYYY-MM-DD format"),date_service:e.string().regex(Zk).nullish().describe("Service date in YYYY-MM-DD format. For invoices and credit notes."),date_service_to:e.string().regex(Xk).nullish().describe("Service period end date in YYYY-MM-DD format. For invoices and credit notes. Use with date_service for date ranges."),items:e.array(e.object({id:e.string().max(e3),type:e.union([e.literal("separator"),e.literal(null)]).nullish().describe("Item type. null = regular line item, 'separator' = visual section header."),name:e.string().max(t3),description:e.string().nullable(),classification:e.union([e.literal("product"),e.literal("service"),e.literal("advance"),e.literal(null)]).nullish().describe("Item classification used for Portugal SAF-T product typing."),price:e.number().nullish().describe("Per-unit net price (before tax). Always stores net price. Null for separator items."),gross_price:e.number().nullish().describe(`Per-unit gross price (includes tax).
|
|
132
|
+
Only present if user originally sent gross price.
|
|
133
|
+
Use gross pricing to keep invoice totals stable when VIES reverse charge is applied.`),quantity:e.number().nullish().describe("Item quantity. Null for separator items."),unit:e.string().max(o3).nullish(),taxes:e.array(e.object({rate:e.number().nullish(),tax_id:e.string().nullish(),classification:e.string().nullish(),reverse_charge:e.boolean().nullish(),amount:e.number().nullish(),pt_exemption_code:e.string().nullish(),pt_exemption_reason:e.string().nullish()}).describe("Document Item Tax")).describe("Applied taxes (provide rate to create new tax, or tax_id to use existing tax)"),discounts:e.array(e.object({value:e.number().min(n3).describe("Discount value"),type:e.enum(["percent","amount"]).default(s3).describe("Discount type: 'percent' (default) or 'amount'")})).max(r3).describe("Line discounts (max 5) in request order. In `b2b_standard`, percentage discounts are calculated from the original line subtotal and fixed amounts are summed before tax. In `b2c_gross_discount`, discounts are applied sequentially to the running gross subtotal."),total:e.number().nullish().describe("Line total before tax. Null for separator items."),total_with_tax:e.number().nullish().describe("Line total after tax. Null for separator items."),total_converted:e.number().min(i3).max(a3).nullish(),total_with_tax_converted:e.number().min(d3).max(c3).nullish(),estimate_id:e.string().max(l3).nullish(),advance_invoice_id:e.string().max(u3).nullish(),delivery_note_id:e.string().max(p3).nullish(),item_id:e.string().max(m3).nullish(),metadata:e.record(e.string(),e.string()).nullish().describe("Custom key-value data for your own use. Store any JSON object up to 50 properties. Values must be strings up to 250 characters. Useful for storing external IDs, tags, or integration data."),created_at:e.iso.datetime({}),updated_at:e.iso.datetime({})})),document_relations:e.array(e.object({id:e.string(),source_type:e.enum(["invoice","estimate","credit_note","advance_invoice","delivery_note"]).describe("Type of document"),source_id:e.string(),target_type:e.enum(["invoice","estimate","credit_note","advance_invoice","delivery_note"]).describe("Type of document"),target_id:e.string(),relation_type:e.string(),entity_id:e.string(),created_at:e.iso.datetime({}),linked_document_voided_at:e.iso.datetime({}).nullish(),related_document:e.object({id:e.string(),type:e.enum(["invoice","estimate","credit_note","advance_invoice","delivery_note"]).describe("Type of document"),number:e.string(),date:e.string(),total_with_tax:e.number(),currency_code:e.string(),is_draft:e.boolean(),voided_at:e.string().nullable(),paid_in_full:e.boolean().nullable(),title_type:e.union([e.literal("estimate"),e.literal("proforma_invoice"),e.literal(null)]).nullable(),hide_prices:e.boolean().nullable()}).optional()})).optional()}).describe("Estimate or proforma invoice document"),hze=e.object({shareableId:e.string().describe("Shareable document token")}),bze=e.object({locale:e.enum(["en-US","de-DE","it-IT","fr-FR","es-ES","sl-SI","pt-PT","nl-NL","pl-PL","hr-HR","sv-SE","fi-FI","et-EE","bg-BG","cs-CZ","sk-SK","nb-NO","is-IS"]).optional().describe("Locale for number and date formatting (decimal separators, date order). Defaults to entity locale."),language:e.enum(["en-US","de-DE","it-IT","fr-FR","es-ES","sl-SI","pt-PT","nl-NL","pl-PL","hr-HR","sv-SE","fi-FI","et-EE","bg-BG","cs-CZ","sk-SK","nb-NO","is-IS"]).optional().describe("Language for document labels/translations. Defaults to locale value.")}),xze=e.object({shareableId:e.string().describe("Shareable document token")}),zze=e.object({locale:e.enum(["en-US","de-DE","it-IT","fr-FR","es-ES","sl-SI","pt-PT","nl-NL","pl-PL","hr-HR","sv-SE","fi-FI","et-EE","bg-BG","cs-CZ","sk-SK","nb-NO","is-IS"]).optional().describe("Locale for number and date formatting (decimal separators, date order). Defaults to entity locale."),language:e.enum(["en-US","de-DE","it-IT","fr-FR","es-ES","sl-SI","pt-PT","nl-NL","pl-PL","hr-HR","sv-SE","fi-FI","et-EE","bg-BG","cs-CZ","sk-SK","nb-NO","is-IS"]).optional().describe("Language for document labels/translations. Defaults to locale value.")}),_ze=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),g3=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,y3=2,h3=2,b3="iban",x3=2,z3=2,_3="iban",v3=500,f3=3,R3=35,I3=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,E3=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,S3=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,D3=2e3,P3=-140737488355328,w3=0x7fffffffffff,C3=50,A3=0,M3="percent",T3=5,k3=0,vze=e.object({is_draft:e.boolean().optional().describe("Whether this is a draft document. Draft documents have no sequential number assigned, skip fiscalization, and can be deleted. Use POST /{documents}/{id}/finalize to assign a number and finalize."),date:e.string().regex(g3).optional().describe("Document date in YYYY-MM-DD format"),issuer:e.object({name:e.string().nullish(),email:e.email().nullish(),address:e.string().nullish(),address_2:e.string().nullish(),post_code:e.string().nullish(),city:e.string().nullish(),state:e.string().nullish(),country:e.string().nullish(),country_code:e.string().min(y3).max(h3).nullish(),tax_number:e.string().nullish(),tax_number_2:e.string().nullish(),company_number:e.string().nullish(),phone:e.string().nullish(),peppol_id:e.string().nullish(),is_end_consumer:e.boolean().nullish(),bank_account:e.object({type:e.enum(["iban","us_domestic","uk_domestic","other"]).default(b3).describe("Account type determines which fields are used"),name:e.string().nullish().describe("Display name for this account. Falls back to account number if not set"),bank_name:e.string().nullish().describe("Bank name"),iban:e.string().nullish().describe("IBAN (for type=iban)"),account_number:e.string().nullish().describe("Account number (for us_domestic, uk_domestic, other)"),bic:e.string().nullish().describe("BIC/SWIFT code for international transfers"),routing_number:e.string().nullish().describe("US ABA routing number (for type=us_domestic)"),sort_code:e.string().nullish().describe("UK sort code (for type=uk_domestic)")}).nullish()}).optional().describe("Document issuer (entity) information"),customer_id:e.string().nullish().describe("Referenced Customer ID. Required if customer is not provided."),customer:e.object({name:e.string().nullish(),email:e.email().nullish(),address:e.string().nullish(),address_2:e.string().nullish(),post_code:e.string().nullish(),city:e.string().nullish(),state:e.string().nullish(),country:e.string().nullish(),country_code:e.string().min(x3).max(z3).nullish(),tax_number:e.string().nullish(),tax_number_2:e.string().nullish(),company_number:e.string().nullish(),phone:e.string().nullish(),peppol_id:e.string().nullish(),is_end_consumer:e.boolean().nullish(),bank_account:e.object({type:e.enum(["iban","us_domestic","uk_domestic","other"]).default(_3).describe("Account type determines which fields are used"),name:e.string().nullish().describe("Display name for this account. Falls back to account number if not set"),bank_name:e.string().nullish().describe("Bank name"),iban:e.string().nullish().describe("IBAN (for type=iban)"),account_number:e.string().nullish().describe("Account number (for us_domestic, uk_domestic, other)"),bic:e.string().nullish().describe("BIC/SWIFT code for international transfers"),routing_number:e.string().nullish().describe("US ABA routing number (for type=us_domestic)"),sort_code:e.string().nullish().describe("UK sort code (for type=uk_domestic)")}).nullish()}).describe("Document issuer (entity) information").and(e.object({save_customer:e.boolean().nullish().describe("Whether to save (create new or update existing) the customer data.\nDefaults to `true` (best-effort).\nWhen `true` with `customer_id`, updates the existing customer.\nWhen `true` without `customer_id`, checks for duplicate customers using customer identifiers (tax/company number, country-aware when available) and reuses the existing customer if found, otherwise creates a new customer.\nWhen `false`, customer data is stored inline on the document only.\nWhen omitted, behaves like `true` but won't fail the request if persistence fails.")}).nullable()).optional().describe("Customer recipient of the document.\nBoth `customer` and `customer_id` are optional - documents can be created without customer information.\nIf both `customer_id` and `customer` are provided with `save_customer=true`, the existing customer will be updated.\nIf only `customer` is provided with `save_customer=true` (or by default), the system checks for duplicates using customer identifiers and reuses existing customers when found."),note:e.string().nullish().describe("Note for the document. If not provided, defaults to entity's document-type-specific note setting. Pass empty string to explicitly set no note."),payment_terms:e.string().nullish().describe("Payment terms for the document. If not provided, defaults to entity's document-type-specific payment terms setting. Pass empty string to explicitly set no terms."),tax_clause:e.string().nullish().describe("Tax clause for the document. Auto-populated based on transaction type if tax_clause_defaults are configured in entity settings. Pass empty string to explicitly set no clause."),footer:e.string().max(v3).nullish(),signature:e.string().nullish().describe("Signature text for the document (e.g. 'John Smith, CEO'). If not provided, defaults to entity's default_document_signature setting. Pass empty string to explicitly set no signature."),calculation_mode:e.union([e.literal("b2b_standard"),e.literal("b2c_gross_discount"),e.literal(null)]).nullish().describe("Optional calculation mode override. When omitted, the entity default is used and falls back to `b2b_standard`."),currency_code:e.string().max(f3).optional(),metadata:e.record(e.string(),e.string()).nullish().describe("Custom key-value data for your own use. Store any JSON object up to 50 properties. Values must be strings up to 250 characters. Useful for storing external IDs, tags, or integration data."),reference:e.string().nullish().describe("Custom reference for the document (e.g., purchase order number, payment reference). When set, used as the UPN payment reference instead of the auto-generated one."),pt:e.object({series_id:e.string().nullish().describe("ATCUD series ID to use for PT numbering. Required for PT manual documents."),manual:e.boolean().nullish().describe("Marks this PT document as manually issued/offline."),manual_sequential_number:e.number().min(1).nullish().describe("Manual PT sequence number shown on the offline/original document."),manual_series_code:e.string().min(1).max(R3).nullish().describe("Offline/manual PT series code shown on the original document."),operator_first_name:e.string().min(1).nullish().describe("PT operator first name snapshot for PT compliance."),operator_last_name:e.string().min(1).nullish().describe("PT operator last name snapshot for PT compliance."),operator_tax_number:e.string().min(1).nullish().describe("PT operator tax number snapshot for PT compliance."),account_first_name:e.string().min(1).nullish().describe("Deprecated alias for PT operator first name snapshot."),account_last_name:e.string().min(1).nullish().describe("Deprecated alias for PT operator last name snapshot."),account_tax_number:e.string().min(1).nullish().describe("Deprecated alias for PT operator tax number snapshot.")}).nullish(),date_valid_till:e.string().nullish().describe("Estimate validity date in YYYY-MM-DD format"),title_type:e.union([e.literal("estimate"),e.literal("proforma_invoice"),e.literal(null)]).nullish().describe("Display name variant for the document. 'estimate' renders as 'Estimate' (Ponudba/Ponuda), 'proforma_invoice' renders as 'Proforma invoice' (Predra\u010Dun)."),date_due:e.string().regex(I3).nullish().describe("Document due date in YYYY-MM-DD format"),date_service:e.string().regex(E3).nullish().describe("Service date in YYYY-MM-DD format. For invoices and credit notes."),date_service_to:e.string().regex(S3).nullish().describe("Service period end date in YYYY-MM-DD format. For invoices and credit notes. Use with date_service for date ranges."),items:e.array(e.object({type:e.union([e.literal("separator"),e.literal(null)]).nullish().describe(`Item type. Omit or null for regular line item, 'separator' for a visual section header.
|
|
134
|
+
Separator items only use name and description \u2014 all financial fields are ignored.`),name:e.string().min(1).nullish().describe("Item name. Required unless `item_id` is provided.\nFor separator items, this is the section title (always required)."),description:e.string().max(D3).nullish(),classification:e.union([e.literal("product"),e.literal("service"),e.literal("advance"),e.literal(null)]).nullish().describe("Item classification used for Portugal SAF-T product typing."),price:e.number().nullish().describe("Net price per unit (before tax).\nProvide either `price` OR `gross_price`, not both.\nOptional if `item_id` is provided. Ignored for separator items."),gross_price:e.number().nullish().describe("Gross price per unit (includes tax).\nIf provided, net price is calculated.\nProvide either `price` OR `gross_price`, not both.\nOptional if `item_id` is provided. Ignored for separator items."),quantity:e.number().min(P3).max(w3).nullish().describe("Item quantity. Required for regular items. Ignored for separator items."),unit:e.string().max(C3).nullish(),taxes:e.array(e.object({rate:e.number().nullish(),tax_id:e.string().nullish(),classification:e.string().nullish(),reverse_charge:e.boolean().nullish(),amount:e.number().nullish(),pt_exemption_code:e.string().nullish(),pt_exemption_reason:e.string().nullish()}).describe("Document Item Tax")).optional().describe("Applied taxes (provide rate to create new tax, or tax_id to use existing tax)"),discounts:e.array(e.object({value:e.number().min(A3).describe("Discount value"),type:e.enum(["percent","amount"]).default(M3).describe("Discount type: 'percent' (default) or 'amount'")})).max(T3).optional().describe("Line discounts (max 5) in request order. In `b2b_standard`, percentage discounts are calculated from the original line subtotal and fixed amounts are summed before tax. In `b2c_gross_discount`, discounts are applied sequentially to the running gross subtotal."),item_id:e.string().nullish().describe(`ID of a catalog item to prefill from.
|
|
135
|
+
When provided, the item's name, description, price, and taxes are used as defaults.
|
|
136
|
+
Any field you provide will override the catalog item's value.
|
|
137
|
+
Not applicable for separator items.`),metadata:e.record(e.string(),e.string()).nullish().describe("Custom key-value data for your own use. Store any JSON object up to 50 properties. Values must be strings up to 250 characters. Useful for storing external IDs, tags, or integration data."),save_item:e.boolean().nullish().describe(`Whether to save this item to the catalog.
|
|
138
|
+
When true without item_id, matches by exact name and reuses existing, or creates a new catalog item.
|
|
139
|
+
Defaults to true (best-effort). When omitted, behaves like true but won't fail the request if persistence fails.`)})).min(1).describe("Line items for the estimate. At least one item is required."),eslog:e.object({validation_enabled:e.boolean().nullish().describe("Enable e-SLOG validation for this document. true = validate, false = skip, null/undefined = use entity default")}).nullish(),expected_total_with_tax:e.number().gt(k3).nullish().describe("Expected total with tax. When provided, the system calculates a rounding_correction to reconcile differences between the calculated total and this expected value. Maximum allowed correction is \xB11.00. Useful when importing invoices from external systems with different rounding rules.")}),B3=10,N3=100,fze=e.object({limit:e.number().min(1).max(N3).default(B3).describe("Number of results per request."),next_cursor:e.string().optional().describe("Opaque cursor to fetch the next page of results. Reuse only with the same effective ordering. Use the value from pagination.next_cursor in the previous response."),prev_cursor:e.string().optional().describe("Opaque cursor to fetch the previous page of results. Reuse only with the same effective ordering. Use the value from pagination.prev_cursor in the previous response."),include_total_count:e.boolean().optional().describe("Whether to include the total count of items in `pagination.total`.\nDefault is `true`.\nWhen `false`, `pagination.total` returns -1 for better performance."),order_by:e.union([e.enum(["id","number","date","total","total_with_tax","created_at","updated_at","date_valid_till","-id","-number","-date","-total","-total_with_tax","-created_at","-updated_at","-date_valid_till"]),e.array(e.enum(["id","number","date","total","total_with_tax","created_at","updated_at","date_valid_till","-id","-number","-date","-total","-total_with_tax","-created_at","-updated_at","-date_valid_till"]))]).optional().describe("Sort by one field or provide a repeated array for multi-column ordering. Prefix a field with `-` for descending order. When paginating, reuse cursors only with the same effective ordering."),query:e.string().optional().describe('JSON query object for filtering results. Supports MongoDB-style operators.\n\n**Supported operators:**\n- `equals` or direct value - Exact match (default)\n- `gte` - Greater than or equal\n- `lte` - Less than or equal\n- `gt` - Greater than\n- `lt` - Less than\n- `in` - Value in array\n- `notIn` - Value not in array\n- `contains` - String contains (case-insensitive)\n- `startsWith` - String starts with\n- `endsWith` - String ends with\n- `between` - Value between two numbers/dates [min, max]\n\n**Allowed fields:** id, number, date, customer, customer.name, customer.email, customer.address, customer.city, customer.country, total, total_with_tax, items.name, items.description, payments.type, payments.date, document_relations.relation_type, document_relations.target_type, metadata, created_at, updated_at, paid_in_full, voided_at, date_valid_till\n\n**Examples:**\n- `{"total": {"gte": 1000}}` - Invoices over 1000\n- `{"customer.name": {"contains": "Acme"}}` - Customer name contains "Acme"\n- `{"date": {"between": ["2025-01-01", "2025-12-31"]}}` - Date range'),search:e.string().optional().describe(`Full-text search query to filter results across multiple fields.
|
|
140
|
+
Searches are case-insensitive and match partial strings.
|
|
141
|
+
Searches across all text fields including names, descriptions, addresses, and metadata values.`),include:e.string().optional().describe(`Comma-separated list of relations to include in the response.
|
|
142
|
+
|
|
143
|
+
**Available relations:**
|
|
144
|
+
- \`document_relations\` - Linked documents (invoices, etc.)
|
|
145
|
+
|
|
146
|
+
**Usage:**
|
|
147
|
+
\`?include=document_relations\``),deleted:e.boolean().optional().describe("When true, returns only soft-deleted (trashed) items. Default false excludes deleted items.")}),Rze=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),O3=36,F3=100,U3=2,j3=2,q3="iban",W3=36,G3=2,V3=2,L3="iban",H3=500,Y3=-140737488355328,K3=0x7fffffffffff,$3=-140737488355328,Q3=0x7fffffffffff,J3=3,Z3=36,X3=-2147483648,eB=2147483647,tB=100,oB=-140737488355328,nB=0x7fffffffffff,sB=-140737488355328,rB=0x7fffffffffff,iB=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,aB=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,dB=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,cB=36,lB=500,uB=50,pB=0,mB="percent",gB=5,yB=-140737488355328,hB=0x7fffffffffff,bB=-140737488355328,xB=0x7fffffffffff,zB=36,_B=36,vB=36,fB=36,Ize=e.object({data:e.array(e.object({id:e.string().max(O3),number:e.string().max(F3),is_draft:e.boolean().describe("Whether this is a draft document. Draft documents have no sequential number assigned, skip fiscalization, and can be deleted. Use POST /{documents}/{id}/finalize to assign a number and finalize."),date:e.iso.datetime({}).describe("Date the estimate was created (ISO 8601 datetime at midnight UTC)"),issuer:e.object({name:e.string().nullish(),email:e.email().nullish(),address:e.string().nullish(),address_2:e.string().nullish(),post_code:e.string().nullish(),city:e.string().nullish(),state:e.string().nullish(),country:e.string().nullish(),country_code:e.string().min(U3).max(j3).nullish(),tax_number:e.string().nullish(),tax_number_2:e.string().nullish(),company_number:e.string().nullish(),phone:e.string().nullish(),peppol_id:e.string().nullish(),is_end_consumer:e.boolean().nullish(),bank_account:e.object({type:e.enum(["iban","us_domestic","uk_domestic","other"]).default(q3).describe("Account type determines which fields are used"),name:e.string().nullish().describe("Display name for this account. Falls back to account number if not set"),bank_name:e.string().nullish().describe("Bank name"),iban:e.string().nullish().describe("IBAN (for type=iban)"),account_number:e.string().nullish().describe("Account number (for us_domestic, uk_domestic, other)"),bic:e.string().nullish().describe("BIC/SWIFT code for international transfers"),routing_number:e.string().nullish().describe("US ABA routing number (for type=us_domestic)"),sort_code:e.string().nullish().describe("UK sort code (for type=uk_domestic)")}).nullish()}).describe("Document issuer (entity) information"),customer_id:e.string().max(W3).nullish(),customer:e.object({name:e.string().nullish(),email:e.email().nullish(),address:e.string().nullish(),address_2:e.string().nullish(),post_code:e.string().nullish(),city:e.string().nullish(),state:e.string().nullish(),country:e.string().nullish(),country_code:e.string().min(G3).max(V3).nullish(),tax_number:e.string().nullish(),tax_number_2:e.string().nullish(),company_number:e.string().nullish(),phone:e.string().nullish(),peppol_id:e.string().nullish(),is_end_consumer:e.boolean().nullish(),bank_account:e.object({type:e.enum(["iban","us_domestic","uk_domestic","other"]).default(L3).describe("Account type determines which fields are used"),name:e.string().nullish().describe("Display name for this account. Falls back to account number if not set"),bank_name:e.string().nullish().describe("Bank name"),iban:e.string().nullish().describe("IBAN (for type=iban)"),account_number:e.string().nullish().describe("Account number (for us_domestic, uk_domestic, other)"),bic:e.string().nullish().describe("BIC/SWIFT code for international transfers"),routing_number:e.string().nullish().describe("US ABA routing number (for type=us_domestic)"),sort_code:e.string().nullish().describe("UK sort code (for type=uk_domestic)")}).nullish()}).nullish().describe("Customer information"),note:e.string().nullish().describe("Note for the document. If not provided, defaults to entity's document-type-specific note setting. Pass empty string to explicitly set no note."),payment_terms:e.string().nullish().describe("Payment terms for the document. If not provided, defaults to entity's document-type-specific payment terms setting. Pass empty string to explicitly set no terms."),tax_clause:e.string().nullish().describe("Tax clause for the document. Auto-populated based on transaction type if tax_clause_defaults are configured in entity settings. Pass empty string to explicitly set no clause."),footer:e.string().max(H3).nullish(),signature:e.string().nullish().describe("Signature text for the document (e.g. 'John Smith, CEO'). If not provided, defaults to entity's default_document_signature setting. Pass empty string to explicitly set no signature."),total:e.number().min(Y3).max(K3),total_with_tax:e.number().min($3).max(Q3),total_discount:e.number().describe("Document discount total stored as a net-equivalent amount for compatibility. In `b2b_standard`, this is the net value of line-item discounts applied before tax. In `b2c_gross_discount`, gross discounts are converted back to their net-equivalent value here. 0 when no discounts applied."),creation_source:e.enum(["standard","custom"]).describe("Internal origin of the create request. `standard` means a normal create endpoint calculated the totals. `custom` means the document was created through a `/custom` endpoint."),calculation_mode:e.enum(["b2b_standard","b2c_gross_discount"]).describe("Resolved calculation mode used for this document. Stored on the document so recalculation and rendering remain stable even if entity defaults change later."),taxes:e.array(e.object({rate:e.number().nullable(),tax_id:e.string().nullish(),base:e.number(),amount:e.number(),reverse_charge:e.boolean().nullish()})).describe("Applied taxes summary"),currency_code:e.string().max(J3),entity_id:e.string().max(Z3),date_year:e.number().min(X3).max(eB),shareable_id:e.string().max(tB).nullish(),voided_at:e.iso.datetime({}).nullish(),transaction_type:e.union([e.literal("domestic"),e.literal("intra_eu_b2b"),e.literal("intra_eu_b2c"),e.literal("3w_b2b"),e.literal("3w_b2c"),e.literal("export"),e.literal(null)]).nullish().describe("Transaction type for VAT purposes (domestic, intra_eu_b2b, intra_eu_b2c, export). Always determined based on issuer/customer countries."),metadata:e.record(e.string(),e.string()).nullish().describe("Custom key-value data for your own use. Store any JSON object up to 50 properties. Values must be strings up to 250 characters. Useful for storing external IDs, tags, or integration data."),exchange_rate:e.object({rate:e.number().describe("Exchange rate used for conversion"),source:e.string().describe("Source of the exchange rate (e.g., 'Frankfurter')"),date:e.iso.datetime({}).describe("Date of the exchange rate"),quote_currency:e.string().describe("Quote currency (the base currency converted to)")}).nullish().describe("Currency exchange rate information if conversion was applied"),total_converted:e.number().min(oB).max(nB).nullish(),total_with_tax_converted:e.number().min(sB).max(rB).nullish(),rounding_correction:e.number().nullish().describe("Rounding correction applied to reconcile differences between calculated total_with_tax and expected_total_with_tax. Only present when expected_total_with_tax was provided during creation."),eslog:e.object({validation_enabled:e.boolean().nullish().describe("Override entity default: true = validate, false = skip, null = use entity setting"),validation_status:e.union([e.literal("valid"),e.literal("invalid"),e.literal("not_validated"),e.literal(null)]).nullish().describe("Validation status: 'valid', 'invalid', or 'not_validated'"),validation_errors:e.array(e.string()).nullish().describe("Array of validation error messages (if status is 'invalid')"),validated_at:e.string().nullish().describe("ISO timestamp when validation was last performed")}).nullish().describe("e-SLOG 2.0 validation data for Slovenian electronic invoices. Only applicable when entity.country_code = 'SI' and eslog validation is enabled."),reference:e.string().nullish().describe("Custom reference for the document (e.g., purchase order number, payment reference). When set, used as the UPN payment reference instead of the auto-generated one."),vies:e.object({warning:e.string().nullable().describe("Warning message if VIES validation was unavailable or the VAT number was invalid. Document creation proceeds but this indicates the transaction type may need review."),skipped:e.boolean().nullable().describe("True when VIES validation was skipped due to entity settings (vies_validate_vat: false) but would normally apply. Used for audit trail.")}).nullish().describe("VIES validation info including any warnings and skipped indicator for audit trail"),deleted_at:e.iso.datetime({}).nullish().describe("Timestamp when the document was soft-deleted. Null if not deleted."),created_at:e.iso.datetime({}),updated_at:e.iso.datetime({}),pt:e.union([e.string(),e.number(),e.boolean(),e.null(),e.record(e.string(),e.unknown()),e.array(e.unknown())]).optional(),date_valid_till:e.iso.datetime({}).nullish().describe("Date until which the estimate is valid (ISO 8601 datetime at midnight UTC)"),title_type:e.union([e.literal("estimate"),e.literal("proforma_invoice"),e.literal(null)]).nullish().describe("Display name variant for the document. 'estimate' renders as 'Estimate' (Ponudba/Ponuda), 'proforma_invoice' renders as 'Proforma invoice' (Predra\u010Dun)."),date_due:e.string().regex(iB).nullish().describe("Document due date in YYYY-MM-DD format"),date_service:e.string().regex(aB).nullish().describe("Service date in YYYY-MM-DD format. For invoices and credit notes."),date_service_to:e.string().regex(dB).nullish().describe("Service period end date in YYYY-MM-DD format. For invoices and credit notes. Use with date_service for date ranges."),items:e.array(e.object({id:e.string().max(cB),type:e.union([e.literal("separator"),e.literal(null)]).nullish().describe("Item type. null = regular line item, 'separator' = visual section header."),name:e.string().max(lB),description:e.string().nullable(),classification:e.union([e.literal("product"),e.literal("service"),e.literal("advance"),e.literal(null)]).nullish().describe("Item classification used for Portugal SAF-T product typing."),price:e.number().nullish().describe("Per-unit net price (before tax). Always stores net price. Null for separator items."),gross_price:e.number().nullish().describe(`Per-unit gross price (includes tax).
|
|
148
|
+
Only present if user originally sent gross price.
|
|
149
|
+
Use gross pricing to keep invoice totals stable when VIES reverse charge is applied.`),quantity:e.number().nullish().describe("Item quantity. Null for separator items."),unit:e.string().max(uB).nullish(),taxes:e.array(e.object({rate:e.number().nullish(),tax_id:e.string().nullish(),classification:e.string().nullish(),reverse_charge:e.boolean().nullish(),amount:e.number().nullish(),pt_exemption_code:e.string().nullish(),pt_exemption_reason:e.string().nullish()}).describe("Document Item Tax")).describe("Applied taxes (provide rate to create new tax, or tax_id to use existing tax)"),discounts:e.array(e.object({value:e.number().min(pB).describe("Discount value"),type:e.enum(["percent","amount"]).default(mB).describe("Discount type: 'percent' (default) or 'amount'")})).max(gB).describe("Line discounts (max 5) in request order. In `b2b_standard`, percentage discounts are calculated from the original line subtotal and fixed amounts are summed before tax. In `b2c_gross_discount`, discounts are applied sequentially to the running gross subtotal."),total:e.number().nullish().describe("Line total before tax. Null for separator items."),total_with_tax:e.number().nullish().describe("Line total after tax. Null for separator items."),total_converted:e.number().min(yB).max(hB).nullish(),total_with_tax_converted:e.number().min(bB).max(xB).nullish(),estimate_id:e.string().max(zB).nullish(),advance_invoice_id:e.string().max(_B).nullish(),delivery_note_id:e.string().max(vB).nullish(),item_id:e.string().max(fB).nullish(),metadata:e.record(e.string(),e.string()).nullish().describe("Custom key-value data for your own use. Store any JSON object up to 50 properties. Values must be strings up to 250 characters. Useful for storing external IDs, tags, or integration data."),created_at:e.iso.datetime({}),updated_at:e.iso.datetime({})})),document_relations:e.array(e.object({id:e.string(),source_type:e.enum(["invoice","estimate","credit_note","advance_invoice","delivery_note"]).describe("Type of document"),source_id:e.string(),target_type:e.enum(["invoice","estimate","credit_note","advance_invoice","delivery_note"]).describe("Type of document"),target_id:e.string(),relation_type:e.string(),entity_id:e.string(),created_at:e.iso.datetime({}),linked_document_voided_at:e.iso.datetime({}).nullish(),related_document:e.object({id:e.string(),type:e.enum(["invoice","estimate","credit_note","advance_invoice","delivery_note"]).describe("Type of document"),number:e.string(),date:e.string(),total_with_tax:e.number(),currency_code:e.string(),is_draft:e.boolean(),voided_at:e.string().nullable(),paid_in_full:e.boolean().nullable(),title_type:e.union([e.literal("estimate"),e.literal("proforma_invoice"),e.literal(null)]).nullable(),hide_prices:e.boolean().nullable()}).optional()})).optional()}).describe("Estimate or proforma invoice document")),pagination:e.object({total:e.number().describe("Total number of items available in the collection"),next_cursor:e.string().nullable().describe("Opaque cursor for fetching the next page. It encodes the resolved sort tuple for the current result set, so reuse it only with the same effective ordering. Null if no more results are available."),prev_cursor:e.string().nullable().describe("Opaque cursor for fetching the previous page. It encodes the resolved sort tuple for the current result set, so reuse it only with the same effective ordering. Null if at the first page."),has_more:e.boolean().describe("Indicates whether more results are available after the current page")}).describe("Pagination metadata including cursors and result counts")}),Eze=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),RB=2,IB=2,EB="iban",SB=2,DB=2,PB="iban",wB=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,CB=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,AB=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,MB=2e3,TB=50,kB=0,BB="percent",NB=5,Sze=e.object({is_draft:e.boolean().nullish(),date:e.string().nullish(),issuer:e.object({name:e.string().nullish(),email:e.email().nullish(),address:e.string().nullish(),address_2:e.string().nullish(),post_code:e.string().nullish(),city:e.string().nullish(),state:e.string().nullish(),country:e.string().nullish(),country_code:e.string().min(RB).max(IB).nullish(),tax_number:e.string().nullish(),tax_number_2:e.string().nullish(),company_number:e.string().nullish(),phone:e.string().nullish(),peppol_id:e.string().nullish(),is_end_consumer:e.boolean().nullish(),bank_account:e.object({type:e.enum(["iban","us_domestic","uk_domestic","other"]).default(EB).describe("Account type determines which fields are used"),name:e.string().nullish().describe("Display name for this account. Falls back to account number if not set"),bank_name:e.string().nullish().describe("Bank name"),iban:e.string().nullish().describe("IBAN (for type=iban)"),account_number:e.string().nullish().describe("Account number (for us_domestic, uk_domestic, other)"),bic:e.string().nullish().describe("BIC/SWIFT code for international transfers"),routing_number:e.string().nullish().describe("US ABA routing number (for type=us_domestic)"),sort_code:e.string().nullish().describe("UK sort code (for type=uk_domestic)")}).nullish()}).describe("Document issuer (entity) information").and(e.looseObject({}).nullable()).optional(),customer_id:e.string().nullish().describe("Referenced Customer ID."),customer:e.object({name:e.string().nullish(),email:e.email().nullish(),address:e.string().nullish(),address_2:e.string().nullish(),post_code:e.string().nullish(),city:e.string().nullish(),state:e.string().nullish(),country:e.string().nullish(),country_code:e.string().min(SB).max(DB).nullish(),tax_number:e.string().nullish(),tax_number_2:e.string().nullish(),company_number:e.string().nullish(),phone:e.string().nullish(),peppol_id:e.string().nullish(),is_end_consumer:e.boolean().nullish(),bank_account:e.object({type:e.enum(["iban","us_domestic","uk_domestic","other"]).default(PB).describe("Account type determines which fields are used"),name:e.string().nullish().describe("Display name for this account. Falls back to account number if not set"),bank_name:e.string().nullish().describe("Bank name"),iban:e.string().nullish().describe("IBAN (for type=iban)"),account_number:e.string().nullish().describe("Account number (for us_domestic, uk_domestic, other)"),bic:e.string().nullish().describe("BIC/SWIFT code for international transfers"),routing_number:e.string().nullish().describe("US ABA routing number (for type=us_domestic)"),sort_code:e.string().nullish().describe("UK sort code (for type=uk_domestic)")}).nullish()}).describe("Document issuer (entity) information").and(e.object({save_customer:e.boolean().nullish().describe("Whether to save (create new or update existing) the customer data.\nDefaults to `true` (best-effort).\nWhen `true` with `customer_id`, updates the existing customer.\nWhen `true` without `customer_id`, checks for duplicate customers using customer identifiers (tax/company number, country-aware when available) and reuses the existing customer if found, otherwise creates a new customer.\nWhen `false`, customer data is stored inline on the document only.\nWhen omitted, behaves like `true` but won't fail the request if persistence fails.")}).nullable()).optional().describe("Customer recipient of the document.\nBoth `customer` and `customer_id` are optional - documents can be created without customer information.\nIf both `customer_id` and `customer` are provided with `save_customer=true`, the existing customer will be updated.\nIf only `customer` is provided with `save_customer=true` (or by default), the system checks for duplicates using customer identifiers and reuses existing customers when found."),note:e.string().nullish(),payment_terms:e.string().nullish(),tax_clause:e.string().nullish(),footer:e.string().nullish(),signature:e.string().nullish(),calculation_mode:e.union([e.literal("b2b_standard"),e.literal("b2c_gross_discount"),e.literal(null)]).nullish().describe("Optional calculation mode override. When omitted, the entity default is used and falls back to `b2b_standard`."),currency_code:e.string().nullish(),metadata:e.record(e.string(),e.string()).nullish().describe("Custom key-value data for your own use. Store any JSON object up to 50 properties. Values must be strings up to 250 characters. Useful for storing external IDs, tags, or integration data."),reference:e.string().nullish(),pt:e.union([e.string(),e.number(),e.boolean(),e.null(),e.record(e.string(),e.unknown()),e.array(e.unknown())]).optional(),date_valid_till:e.string().nullish(),title_type:e.union([e.literal("estimate"),e.literal("proforma_invoice"),e.literal(null)]).nullish(),date_due:e.string().regex(wB).nullish().describe("Document due date in YYYY-MM-DD format"),date_service:e.string().regex(CB).nullish().describe("Service date in YYYY-MM-DD format. For invoices and credit notes."),date_service_to:e.string().regex(AB).nullish().describe("Service period end date in YYYY-MM-DD format. For invoices and credit notes. Use with date_service for date ranges."),items:e.array(e.object({type:e.union([e.literal("separator"),e.literal(null)]).nullish().describe(`Item type. Omit or null for regular line item, 'separator' for a visual section header.
|
|
150
|
+
Separator items only use name and description \u2014 all financial fields are ignored.`),name:e.string().min(1).nullish().describe("Item name. Required unless `item_id` is provided.\nFor separator items, this is the section title (always required)."),description:e.string().max(MB).nullish(),classification:e.union([e.literal("product"),e.literal("service"),e.literal("advance"),e.literal(null)]).nullish().describe("Item classification used for Portugal SAF-T product typing."),price:e.number().nullish().describe("Net price per unit (before tax). Optional for custom documents. Ignored for separator items."),gross_price:e.number().nullish().describe("Gross price per unit (includes tax). Optional for custom documents. Ignored for separator items."),quantity:e.number().nullish().describe("Item quantity. Null for separator items."),unit:e.string().max(TB).nullish(),taxes:e.array(e.object({rate:e.number().nullish(),tax_id:e.string().nullish(),classification:e.string().nullish(),reverse_charge:e.boolean().nullish(),amount:e.number().nullish(),pt_exemption_code:e.string().nullish(),pt_exemption_reason:e.string().nullish()}).describe("Document Item Tax")).optional().describe("Applied taxes (provide rate to create new tax, or tax_id to use existing tax)"),discounts:e.array(e.object({value:e.number().min(kB).describe("Discount value"),type:e.enum(["percent","amount"]).default(BB).describe("Discount type: 'percent' (default) or 'amount'")})).max(NB).optional().describe("Line discounts (max 5) in request order. In `b2b_standard`, percentage discounts are calculated from the original line subtotal and fixed amounts are summed before tax. In `b2c_gross_discount`, discounts are applied sequentially to the running gross subtotal."),total:e.number().nullish().describe("Pre-calculated total for this line item (before tax). Ignored for separator items."),total_with_tax:e.number().nullish().describe("Pre-calculated total for this line item (after tax). Ignored for separator items."),item_id:e.string().nullish().describe(`ID of a catalog item to prefill from.
|
|
151
|
+
When provided, the item's name, description, price, and taxes are used as defaults.
|
|
152
|
+
Any field you provide will override the catalog item's value.
|
|
153
|
+
Not applicable for separator items.`),metadata:e.record(e.string(),e.string()).nullish().describe("Custom key-value data for your own use. Store any JSON object up to 50 properties. Values must be strings up to 250 characters. Useful for storing external IDs, tags, or integration data."),save_item:e.boolean().nullish().describe(`Whether to save this item to the catalog.
|
|
154
|
+
When true without item_id, matches by exact name and reuses existing, or creates a new catalog item.
|
|
155
|
+
Defaults to true (best-effort). When omitted, behaves like true but won't fail the request if persistence fails.`)})).min(1).describe("Line items with pre-calculated totals. At least one item is required."),total:e.number().describe("Pre-calculated document total (before tax)."),total_with_tax:e.number().describe("Pre-calculated document total (after tax)."),total_discount:e.number().nullish().describe("Pre-calculated total net discount amount. Defaults to 0 if not provided."),taxes:e.array(e.object({rate:e.number().nullable(),tax_id:e.string().nullish(),base:e.number(),amount:e.number(),reverse_charge:e.boolean().nullish()})).optional().describe("Pre-calculated tax summary. If not provided, defaults to empty array."),eslog:e.object({validation_enabled:e.boolean().nullish().describe("Enable e-SLOG validation for this document. true = validate, false = skip, null/undefined = use entity default")}).nullish()}),OB=/^[a-z]{3,4}_[0-9a-f]{24}$/,Dze=e.object({id:e.stringFormat("resource-id",OB).describe("Unique resource identifier")}),Pze=e.object({include:e.string().optional().describe(`Comma-separated list of relations to include in the response.
|
|
156
|
+
|
|
157
|
+
**Available relations:**
|
|
158
|
+
- \`document_relations\` - Linked documents (invoices, etc.)
|
|
159
|
+
|
|
160
|
+
**Usage:**
|
|
161
|
+
\`?include=document_relations\``)}),wze=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),FB=36,UB=100,jB=2,qB=2,WB="iban",GB=36,VB=2,LB=2,HB="iban",YB=500,KB=-140737488355328,$B=0x7fffffffffff,QB=-140737488355328,JB=0x7fffffffffff,ZB=3,XB=36,eN=-2147483648,tN=2147483647,oN=100,nN=-140737488355328,sN=0x7fffffffffff,rN=-140737488355328,iN=0x7fffffffffff,aN=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,dN=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,cN=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,lN=36,uN=500,pN=50,mN=0,gN="percent",yN=5,hN=-140737488355328,bN=0x7fffffffffff,xN=-140737488355328,zN=0x7fffffffffff,_N=36,vN=36,fN=36,RN=36,Cze=e.object({id:e.string().max(FB),number:e.string().max(UB),is_draft:e.boolean().describe("Whether this is a draft document. Draft documents have no sequential number assigned, skip fiscalization, and can be deleted. Use POST /{documents}/{id}/finalize to assign a number and finalize."),date:e.iso.datetime({}).describe("Date the estimate was created (ISO 8601 datetime at midnight UTC)"),issuer:e.object({name:e.string().nullish(),email:e.email().nullish(),address:e.string().nullish(),address_2:e.string().nullish(),post_code:e.string().nullish(),city:e.string().nullish(),state:e.string().nullish(),country:e.string().nullish(),country_code:e.string().min(jB).max(qB).nullish(),tax_number:e.string().nullish(),tax_number_2:e.string().nullish(),company_number:e.string().nullish(),phone:e.string().nullish(),peppol_id:e.string().nullish(),is_end_consumer:e.boolean().nullish(),bank_account:e.object({type:e.enum(["iban","us_domestic","uk_domestic","other"]).default(WB).describe("Account type determines which fields are used"),name:e.string().nullish().describe("Display name for this account. Falls back to account number if not set"),bank_name:e.string().nullish().describe("Bank name"),iban:e.string().nullish().describe("IBAN (for type=iban)"),account_number:e.string().nullish().describe("Account number (for us_domestic, uk_domestic, other)"),bic:e.string().nullish().describe("BIC/SWIFT code for international transfers"),routing_number:e.string().nullish().describe("US ABA routing number (for type=us_domestic)"),sort_code:e.string().nullish().describe("UK sort code (for type=uk_domestic)")}).nullish()}).describe("Document issuer (entity) information"),customer_id:e.string().max(GB).nullish(),customer:e.object({name:e.string().nullish(),email:e.email().nullish(),address:e.string().nullish(),address_2:e.string().nullish(),post_code:e.string().nullish(),city:e.string().nullish(),state:e.string().nullish(),country:e.string().nullish(),country_code:e.string().min(VB).max(LB).nullish(),tax_number:e.string().nullish(),tax_number_2:e.string().nullish(),company_number:e.string().nullish(),phone:e.string().nullish(),peppol_id:e.string().nullish(),is_end_consumer:e.boolean().nullish(),bank_account:e.object({type:e.enum(["iban","us_domestic","uk_domestic","other"]).default(HB).describe("Account type determines which fields are used"),name:e.string().nullish().describe("Display name for this account. Falls back to account number if not set"),bank_name:e.string().nullish().describe("Bank name"),iban:e.string().nullish().describe("IBAN (for type=iban)"),account_number:e.string().nullish().describe("Account number (for us_domestic, uk_domestic, other)"),bic:e.string().nullish().describe("BIC/SWIFT code for international transfers"),routing_number:e.string().nullish().describe("US ABA routing number (for type=us_domestic)"),sort_code:e.string().nullish().describe("UK sort code (for type=uk_domestic)")}).nullish()}).nullish().describe("Customer information"),note:e.string().nullish().describe("Note for the document. If not provided, defaults to entity's document-type-specific note setting. Pass empty string to explicitly set no note."),payment_terms:e.string().nullish().describe("Payment terms for the document. If not provided, defaults to entity's document-type-specific payment terms setting. Pass empty string to explicitly set no terms."),tax_clause:e.string().nullish().describe("Tax clause for the document. Auto-populated based on transaction type if tax_clause_defaults are configured in entity settings. Pass empty string to explicitly set no clause."),footer:e.string().max(YB).nullish(),signature:e.string().nullish().describe("Signature text for the document (e.g. 'John Smith, CEO'). If not provided, defaults to entity's default_document_signature setting. Pass empty string to explicitly set no signature."),total:e.number().min(KB).max($B),total_with_tax:e.number().min(QB).max(JB),total_discount:e.number().describe("Document discount total stored as a net-equivalent amount for compatibility. In `b2b_standard`, this is the net value of line-item discounts applied before tax. In `b2c_gross_discount`, gross discounts are converted back to their net-equivalent value here. 0 when no discounts applied."),creation_source:e.enum(["standard","custom"]).describe("Internal origin of the create request. `standard` means a normal create endpoint calculated the totals. `custom` means the document was created through a `/custom` endpoint."),calculation_mode:e.enum(["b2b_standard","b2c_gross_discount"]).describe("Resolved calculation mode used for this document. Stored on the document so recalculation and rendering remain stable even if entity defaults change later."),taxes:e.array(e.object({rate:e.number().nullable(),tax_id:e.string().nullish(),base:e.number(),amount:e.number(),reverse_charge:e.boolean().nullish()})).describe("Applied taxes summary"),currency_code:e.string().max(ZB),entity_id:e.string().max(XB),date_year:e.number().min(eN).max(tN),shareable_id:e.string().max(oN).nullish(),voided_at:e.iso.datetime({}).nullish(),transaction_type:e.union([e.literal("domestic"),e.literal("intra_eu_b2b"),e.literal("intra_eu_b2c"),e.literal("3w_b2b"),e.literal("3w_b2c"),e.literal("export"),e.literal(null)]).nullish().describe("Transaction type for VAT purposes (domestic, intra_eu_b2b, intra_eu_b2c, export). Always determined based on issuer/customer countries."),metadata:e.record(e.string(),e.string()).nullish().describe("Custom key-value data for your own use. Store any JSON object up to 50 properties. Values must be strings up to 250 characters. Useful for storing external IDs, tags, or integration data."),exchange_rate:e.object({rate:e.number().describe("Exchange rate used for conversion"),source:e.string().describe("Source of the exchange rate (e.g., 'Frankfurter')"),date:e.iso.datetime({}).describe("Date of the exchange rate"),quote_currency:e.string().describe("Quote currency (the base currency converted to)")}).nullish().describe("Currency exchange rate information if conversion was applied"),total_converted:e.number().min(nN).max(sN).nullish(),total_with_tax_converted:e.number().min(rN).max(iN).nullish(),rounding_correction:e.number().nullish().describe("Rounding correction applied to reconcile differences between calculated total_with_tax and expected_total_with_tax. Only present when expected_total_with_tax was provided during creation."),eslog:e.object({validation_enabled:e.boolean().nullish().describe("Override entity default: true = validate, false = skip, null = use entity setting"),validation_status:e.union([e.literal("valid"),e.literal("invalid"),e.literal("not_validated"),e.literal(null)]).nullish().describe("Validation status: 'valid', 'invalid', or 'not_validated'"),validation_errors:e.array(e.string()).nullish().describe("Array of validation error messages (if status is 'invalid')"),validated_at:e.string().nullish().describe("ISO timestamp when validation was last performed")}).nullish().describe("e-SLOG 2.0 validation data for Slovenian electronic invoices. Only applicable when entity.country_code = 'SI' and eslog validation is enabled."),reference:e.string().nullish().describe("Custom reference for the document (e.g., purchase order number, payment reference). When set, used as the UPN payment reference instead of the auto-generated one."),vies:e.object({warning:e.string().nullable().describe("Warning message if VIES validation was unavailable or the VAT number was invalid. Document creation proceeds but this indicates the transaction type may need review."),skipped:e.boolean().nullable().describe("True when VIES validation was skipped due to entity settings (vies_validate_vat: false) but would normally apply. Used for audit trail.")}).nullish().describe("VIES validation info including any warnings and skipped indicator for audit trail"),deleted_at:e.iso.datetime({}).nullish().describe("Timestamp when the document was soft-deleted. Null if not deleted."),created_at:e.iso.datetime({}),updated_at:e.iso.datetime({}),pt:e.union([e.string(),e.number(),e.boolean(),e.null(),e.record(e.string(),e.unknown()),e.array(e.unknown())]).optional(),date_valid_till:e.iso.datetime({}).nullish().describe("Date until which the estimate is valid (ISO 8601 datetime at midnight UTC)"),title_type:e.union([e.literal("estimate"),e.literal("proforma_invoice"),e.literal(null)]).nullish().describe("Display name variant for the document. 'estimate' renders as 'Estimate' (Ponudba/Ponuda), 'proforma_invoice' renders as 'Proforma invoice' (Predra\u010Dun)."),date_due:e.string().regex(aN).nullish().describe("Document due date in YYYY-MM-DD format"),date_service:e.string().regex(dN).nullish().describe("Service date in YYYY-MM-DD format. For invoices and credit notes."),date_service_to:e.string().regex(cN).nullish().describe("Service period end date in YYYY-MM-DD format. For invoices and credit notes. Use with date_service for date ranges."),items:e.array(e.object({id:e.string().max(lN),type:e.union([e.literal("separator"),e.literal(null)]).nullish().describe("Item type. null = regular line item, 'separator' = visual section header."),name:e.string().max(uN),description:e.string().nullable(),classification:e.union([e.literal("product"),e.literal("service"),e.literal("advance"),e.literal(null)]).nullish().describe("Item classification used for Portugal SAF-T product typing."),price:e.number().nullish().describe("Per-unit net price (before tax). Always stores net price. Null for separator items."),gross_price:e.number().nullish().describe(`Per-unit gross price (includes tax).
|
|
162
|
+
Only present if user originally sent gross price.
|
|
163
|
+
Use gross pricing to keep invoice totals stable when VIES reverse charge is applied.`),quantity:e.number().nullish().describe("Item quantity. Null for separator items."),unit:e.string().max(pN).nullish(),taxes:e.array(e.object({rate:e.number().nullish(),tax_id:e.string().nullish(),classification:e.string().nullish(),reverse_charge:e.boolean().nullish(),amount:e.number().nullish(),pt_exemption_code:e.string().nullish(),pt_exemption_reason:e.string().nullish()}).describe("Document Item Tax")).describe("Applied taxes (provide rate to create new tax, or tax_id to use existing tax)"),discounts:e.array(e.object({value:e.number().min(mN).describe("Discount value"),type:e.enum(["percent","amount"]).default(gN).describe("Discount type: 'percent' (default) or 'amount'")})).max(yN).describe("Line discounts (max 5) in request order. In `b2b_standard`, percentage discounts are calculated from the original line subtotal and fixed amounts are summed before tax. In `b2c_gross_discount`, discounts are applied sequentially to the running gross subtotal."),total:e.number().nullish().describe("Line total before tax. Null for separator items."),total_with_tax:e.number().nullish().describe("Line total after tax. Null for separator items."),total_converted:e.number().min(hN).max(bN).nullish(),total_with_tax_converted:e.number().min(xN).max(zN).nullish(),estimate_id:e.string().max(_N).nullish(),advance_invoice_id:e.string().max(vN).nullish(),delivery_note_id:e.string().max(fN).nullish(),item_id:e.string().max(RN).nullish(),metadata:e.record(e.string(),e.string()).nullish().describe("Custom key-value data for your own use. Store any JSON object up to 50 properties. Values must be strings up to 250 characters. Useful for storing external IDs, tags, or integration data."),created_at:e.iso.datetime({}),updated_at:e.iso.datetime({})})),document_relations:e.array(e.object({id:e.string(),source_type:e.enum(["invoice","estimate","credit_note","advance_invoice","delivery_note"]).describe("Type of document"),source_id:e.string(),target_type:e.enum(["invoice","estimate","credit_note","advance_invoice","delivery_note"]).describe("Type of document"),target_id:e.string(),relation_type:e.string(),entity_id:e.string(),created_at:e.iso.datetime({}),linked_document_voided_at:e.iso.datetime({}).nullish(),related_document:e.object({id:e.string(),type:e.enum(["invoice","estimate","credit_note","advance_invoice","delivery_note"]).describe("Type of document"),number:e.string(),date:e.string(),total_with_tax:e.number(),currency_code:e.string(),is_draft:e.boolean(),voided_at:e.string().nullable(),paid_in_full:e.boolean().nullable(),title_type:e.union([e.literal("estimate"),e.literal("proforma_invoice"),e.literal(null)]).nullable(),hide_prices:e.boolean().nullable()}).optional()})).optional()}).describe("Estimate or proforma invoice document"),IN=/^[a-z]{3,4}_[0-9a-f]{24}$/,Aze=e.object({id:e.stringFormat("resource-id",IN).describe("Unique resource identifier")}),Mze=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),EN=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,SN=2,DN=2,PN="iban",wN=2,CN=2,AN="iban",MN=2e3,TN=-140737488355328,kN=0x7fffffffffff,BN=50,NN=0,ON="percent",FN=5,UN=100,jN=500,qN=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,Tze=e.object({date:e.string().regex(EN).optional().describe("Document date (YYYY-MM-DD or ISO datetime format)."),issuer:e.object({name:e.string().nullish(),email:e.email().nullish(),address:e.string().nullish(),address_2:e.string().nullish(),post_code:e.string().nullish(),city:e.string().nullish(),state:e.string().nullish(),country:e.string().nullish(),country_code:e.string().min(SN).max(DN).nullish(),tax_number:e.string().nullish(),tax_number_2:e.string().nullish(),company_number:e.string().nullish(),phone:e.string().nullish(),peppol_id:e.string().nullish(),is_end_consumer:e.boolean().nullish(),bank_account:e.object({type:e.enum(["iban","us_domestic","uk_domestic","other"]).default(PN).describe("Account type determines which fields are used"),name:e.string().nullish().describe("Display name for this account. Falls back to account number if not set"),bank_name:e.string().nullish().describe("Bank name"),iban:e.string().nullish().describe("IBAN (for type=iban)"),account_number:e.string().nullish().describe("Account number (for us_domestic, uk_domestic, other)"),bic:e.string().nullish().describe("BIC/SWIFT code for international transfers"),routing_number:e.string().nullish().describe("US ABA routing number (for type=us_domestic)"),sort_code:e.string().nullish().describe("UK sort code (for type=uk_domestic)")}).nullish()}).describe("Document issuer (entity) information").and(e.unknown().describe("Issuer information snapshot.")).optional(),customer_id:e.string().nullish().describe("Referenced Customer ID. Set to null to remove customer reference."),customer:e.object({name:e.string().nullish(),email:e.email().nullish(),address:e.string().nullish(),address_2:e.string().nullish(),post_code:e.string().nullish(),city:e.string().nullish(),state:e.string().nullish(),country:e.string().nullish(),country_code:e.string().min(wN).max(CN).nullish(),tax_number:e.string().nullish(),tax_number_2:e.string().nullish(),company_number:e.string().nullish(),phone:e.string().nullish(),peppol_id:e.string().nullish(),is_end_consumer:e.boolean().nullish(),bank_account:e.object({type:e.enum(["iban","us_domestic","uk_domestic","other"]).default(AN).describe("Account type determines which fields are used"),name:e.string().nullish().describe("Display name for this account. Falls back to account number if not set"),bank_name:e.string().nullish().describe("Bank name"),iban:e.string().nullish().describe("IBAN (for type=iban)"),account_number:e.string().nullish().describe("Account number (for us_domestic, uk_domestic, other)"),bic:e.string().nullish().describe("BIC/SWIFT code for international transfers"),routing_number:e.string().nullish().describe("US ABA routing number (for type=us_domestic)"),sort_code:e.string().nullish().describe("UK sort code (for type=uk_domestic)")}).nullish()}).describe("Document issuer (entity) information").and(e.object({save_customer:e.boolean().nullish().describe("Whether to save (create new or update existing) the customer data.\nDefaults to `true` (best-effort).\nWhen `true` with `customer_id`, updates the existing customer.\nWhen `true` without `customer_id`, checks for duplicate customers using customer identifiers (tax/company number, country-aware when available) and reuses the existing customer if found, otherwise creates a new customer.\nWhen `false`, customer data is stored inline on the document only.\nWhen omitted, behaves like `true` but won't fail the request if persistence fails.")}).nullable()).optional().describe("Customer recipient of the document.\nBoth `customer` and `customer_id` are optional - documents can be created without customer information.\nIf both `customer_id` and `customer` are provided with `save_customer=true`, the existing customer will be updated.\nIf only `customer` is provided with `save_customer=true` (or by default), the system checks for duplicates using customer identifiers and reuses existing customers when found."),items:e.array(e.object({type:e.union([e.literal("separator"),e.literal(null)]).nullish().describe(`Item type. Omit or null for regular line item, 'separator' for a visual section header.
|
|
164
|
+
Separator items only use name and description \u2014 all financial fields are ignored.`),name:e.string().min(1).nullish().describe("Item name. Required unless `item_id` is provided.\nFor separator items, this is the section title (always required)."),description:e.string().max(MN).nullish(),classification:e.union([e.literal("product"),e.literal("service"),e.literal("advance"),e.literal(null)]).nullish().describe("Item classification used for Portugal SAF-T product typing."),price:e.number().nullish().describe("Net price per unit (before tax).\nProvide either `price` OR `gross_price`, not both.\nOptional if `item_id` is provided. Ignored for separator items."),gross_price:e.number().nullish().describe("Gross price per unit (includes tax).\nIf provided, net price is calculated.\nProvide either `price` OR `gross_price`, not both.\nOptional if `item_id` is provided. Ignored for separator items."),quantity:e.number().min(TN).max(kN).nullish().describe("Item quantity. Required for regular items. Ignored for separator items."),unit:e.string().max(BN).nullish(),taxes:e.array(e.object({rate:e.number().nullish(),tax_id:e.string().nullish(),classification:e.string().nullish(),reverse_charge:e.boolean().nullish(),amount:e.number().nullish(),pt_exemption_code:e.string().nullish(),pt_exemption_reason:e.string().nullish()}).describe("Document Item Tax")).optional().describe("Applied taxes (provide rate to create new tax, or tax_id to use existing tax)"),discounts:e.array(e.object({value:e.number().min(NN).describe("Discount value"),type:e.enum(["percent","amount"]).default(ON).describe("Discount type: 'percent' (default) or 'amount'")})).max(FN).optional().describe("Line discounts (max 5) in request order. In `b2b_standard`, percentage discounts are calculated from the original line subtotal and fixed amounts are summed before tax. In `b2c_gross_discount`, discounts are applied sequentially to the running gross subtotal."),item_id:e.string().nullish().describe(`ID of a catalog item to prefill from.
|
|
165
|
+
When provided, the item's name, description, price, and taxes are used as defaults.
|
|
166
|
+
Any field you provide will override the catalog item's value.
|
|
167
|
+
Not applicable for separator items.`),metadata:e.record(e.string(),e.string()).nullish().describe("Custom key-value data for your own use. Store any JSON object up to 50 properties. Values must be strings up to 250 characters. Useful for storing external IDs, tags, or integration data."),save_item:e.boolean().nullish().describe(`Whether to save this item to the catalog.
|
|
168
|
+
When true without item_id, matches by exact name and reuses existing, or creates a new catalog item.
|
|
169
|
+
Defaults to true (best-effort). When omitted, behaves like true but won't fail the request if persistence fails.`)})).min(1).optional().describe("Line items for the document. If provided, replaces ALL existing items. Triggers recalculation of totals."),note:e.string().nullish().describe("Document note/memo. Set to null to clear."),payment_terms:e.string().nullish().describe("Payment terms text. Set to null to clear."),tax_clause:e.string().nullish().describe("Tax clause text. Set to null to clear."),footer:e.string().nullish().describe("Footer text. Set to null to clear."),signature:e.string().nullish().describe("Signature text (e.g. 'John Smith, CEO'). Set to null to clear."),currency_code:e.string().optional().describe("Currency code (ISO 4217, 3 characters). Changing currency triggers exchange rate recalculation."),reference:e.string().max(UN).nullish().describe("Custom reference (e.g., purchase order number, payment reference). When set, overrides the auto-generated UPN payment reference for Slovenian invoices. Set to null to clear."),metadata:e.record(e.string(),e.unknown()).nullish().describe("Custom metadata object. Set to null to clear."),change_reason:e.string().max(jN).optional().describe("Reason for the change. Stored in version history for audit trail."),date_valid_till:e.string().regex(qN).nullish().describe("Estimate validity date (YYYY-MM-DD or ISO datetime format). Set to null to clear."),title_type:e.enum(["estimate","proforma_invoice"]).optional().describe('Document title type. "estimate" or "proforma_invoice".'),eslog:e.object({validation_enabled:e.boolean().nullish().describe("Enable e-SLOG validation for this document. true = validate, false = skip, null/undefined = use entity default")}).nullish()}),WN=36,GN=100,VN=2,LN=2,HN="iban",YN=36,KN=2,$N=2,QN="iban",JN=500,ZN=-140737488355328,XN=0x7fffffffffff,eO=-140737488355328,tO=0x7fffffffffff,oO=3,nO=36,sO=-2147483648,rO=2147483647,iO=100,aO=-140737488355328,dO=0x7fffffffffff,cO=-140737488355328,lO=0x7fffffffffff,uO=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,pO=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,mO=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,gO=36,yO=500,hO=50,bO=0,xO="percent",zO=5,_O=-140737488355328,vO=0x7fffffffffff,fO=-140737488355328,RO=0x7fffffffffff,IO=36,EO=36,SO=36,DO=36,kze=e.object({id:e.string().max(WN),number:e.string().max(GN),is_draft:e.boolean().describe("Whether this is a draft document. Draft documents have no sequential number assigned, skip fiscalization, and can be deleted. Use POST /{documents}/{id}/finalize to assign a number and finalize."),date:e.iso.datetime({}).describe("Date the estimate was created (ISO 8601 datetime at midnight UTC)"),issuer:e.object({name:e.string().nullish(),email:e.email().nullish(),address:e.string().nullish(),address_2:e.string().nullish(),post_code:e.string().nullish(),city:e.string().nullish(),state:e.string().nullish(),country:e.string().nullish(),country_code:e.string().min(VN).max(LN).nullish(),tax_number:e.string().nullish(),tax_number_2:e.string().nullish(),company_number:e.string().nullish(),phone:e.string().nullish(),peppol_id:e.string().nullish(),is_end_consumer:e.boolean().nullish(),bank_account:e.object({type:e.enum(["iban","us_domestic","uk_domestic","other"]).default(HN).describe("Account type determines which fields are used"),name:e.string().nullish().describe("Display name for this account. Falls back to account number if not set"),bank_name:e.string().nullish().describe("Bank name"),iban:e.string().nullish().describe("IBAN (for type=iban)"),account_number:e.string().nullish().describe("Account number (for us_domestic, uk_domestic, other)"),bic:e.string().nullish().describe("BIC/SWIFT code for international transfers"),routing_number:e.string().nullish().describe("US ABA routing number (for type=us_domestic)"),sort_code:e.string().nullish().describe("UK sort code (for type=uk_domestic)")}).nullish()}).describe("Document issuer (entity) information"),customer_id:e.string().max(YN).nullish(),customer:e.object({name:e.string().nullish(),email:e.email().nullish(),address:e.string().nullish(),address_2:e.string().nullish(),post_code:e.string().nullish(),city:e.string().nullish(),state:e.string().nullish(),country:e.string().nullish(),country_code:e.string().min(KN).max($N).nullish(),tax_number:e.string().nullish(),tax_number_2:e.string().nullish(),company_number:e.string().nullish(),phone:e.string().nullish(),peppol_id:e.string().nullish(),is_end_consumer:e.boolean().nullish(),bank_account:e.object({type:e.enum(["iban","us_domestic","uk_domestic","other"]).default(QN).describe("Account type determines which fields are used"),name:e.string().nullish().describe("Display name for this account. Falls back to account number if not set"),bank_name:e.string().nullish().describe("Bank name"),iban:e.string().nullish().describe("IBAN (for type=iban)"),account_number:e.string().nullish().describe("Account number (for us_domestic, uk_domestic, other)"),bic:e.string().nullish().describe("BIC/SWIFT code for international transfers"),routing_number:e.string().nullish().describe("US ABA routing number (for type=us_domestic)"),sort_code:e.string().nullish().describe("UK sort code (for type=uk_domestic)")}).nullish()}).nullish().describe("Customer information"),note:e.string().nullish().describe("Note for the document. If not provided, defaults to entity's document-type-specific note setting. Pass empty string to explicitly set no note."),payment_terms:e.string().nullish().describe("Payment terms for the document. If not provided, defaults to entity's document-type-specific payment terms setting. Pass empty string to explicitly set no terms."),tax_clause:e.string().nullish().describe("Tax clause for the document. Auto-populated based on transaction type if tax_clause_defaults are configured in entity settings. Pass empty string to explicitly set no clause."),footer:e.string().max(JN).nullish(),signature:e.string().nullish().describe("Signature text for the document (e.g. 'John Smith, CEO'). If not provided, defaults to entity's default_document_signature setting. Pass empty string to explicitly set no signature."),total:e.number().min(ZN).max(XN),total_with_tax:e.number().min(eO).max(tO),total_discount:e.number().describe("Document discount total stored as a net-equivalent amount for compatibility. In `b2b_standard`, this is the net value of line-item discounts applied before tax. In `b2c_gross_discount`, gross discounts are converted back to their net-equivalent value here. 0 when no discounts applied."),creation_source:e.enum(["standard","custom"]).describe("Internal origin of the create request. `standard` means a normal create endpoint calculated the totals. `custom` means the document was created through a `/custom` endpoint."),calculation_mode:e.enum(["b2b_standard","b2c_gross_discount"]).describe("Resolved calculation mode used for this document. Stored on the document so recalculation and rendering remain stable even if entity defaults change later."),taxes:e.array(e.object({rate:e.number().nullable(),tax_id:e.string().nullish(),base:e.number(),amount:e.number(),reverse_charge:e.boolean().nullish()})).describe("Applied taxes summary"),currency_code:e.string().max(oO),entity_id:e.string().max(nO),date_year:e.number().min(sO).max(rO),shareable_id:e.string().max(iO).nullish(),voided_at:e.iso.datetime({}).nullish(),transaction_type:e.union([e.literal("domestic"),e.literal("intra_eu_b2b"),e.literal("intra_eu_b2c"),e.literal("3w_b2b"),e.literal("3w_b2c"),e.literal("export"),e.literal(null)]).nullish().describe("Transaction type for VAT purposes (domestic, intra_eu_b2b, intra_eu_b2c, export). Always determined based on issuer/customer countries."),metadata:e.record(e.string(),e.string()).nullish().describe("Custom key-value data for your own use. Store any JSON object up to 50 properties. Values must be strings up to 250 characters. Useful for storing external IDs, tags, or integration data."),exchange_rate:e.object({rate:e.number().describe("Exchange rate used for conversion"),source:e.string().describe("Source of the exchange rate (e.g., 'Frankfurter')"),date:e.iso.datetime({}).describe("Date of the exchange rate"),quote_currency:e.string().describe("Quote currency (the base currency converted to)")}).nullish().describe("Currency exchange rate information if conversion was applied"),total_converted:e.number().min(aO).max(dO).nullish(),total_with_tax_converted:e.number().min(cO).max(lO).nullish(),rounding_correction:e.number().nullish().describe("Rounding correction applied to reconcile differences between calculated total_with_tax and expected_total_with_tax. Only present when expected_total_with_tax was provided during creation."),eslog:e.object({validation_enabled:e.boolean().nullish().describe("Override entity default: true = validate, false = skip, null = use entity setting"),validation_status:e.union([e.literal("valid"),e.literal("invalid"),e.literal("not_validated"),e.literal(null)]).nullish().describe("Validation status: 'valid', 'invalid', or 'not_validated'"),validation_errors:e.array(e.string()).nullish().describe("Array of validation error messages (if status is 'invalid')"),validated_at:e.string().nullish().describe("ISO timestamp when validation was last performed")}).nullish().describe("e-SLOG 2.0 validation data for Slovenian electronic invoices. Only applicable when entity.country_code = 'SI' and eslog validation is enabled."),reference:e.string().nullish().describe("Custom reference for the document (e.g., purchase order number, payment reference). When set, used as the UPN payment reference instead of the auto-generated one."),vies:e.object({warning:e.string().nullable().describe("Warning message if VIES validation was unavailable or the VAT number was invalid. Document creation proceeds but this indicates the transaction type may need review."),skipped:e.boolean().nullable().describe("True when VIES validation was skipped due to entity settings (vies_validate_vat: false) but would normally apply. Used for audit trail.")}).nullish().describe("VIES validation info including any warnings and skipped indicator for audit trail"),deleted_at:e.iso.datetime({}).nullish().describe("Timestamp when the document was soft-deleted. Null if not deleted."),created_at:e.iso.datetime({}),updated_at:e.iso.datetime({}),pt:e.union([e.string(),e.number(),e.boolean(),e.null(),e.record(e.string(),e.unknown()),e.array(e.unknown())]).optional(),date_valid_till:e.iso.datetime({}).nullish().describe("Date until which the estimate is valid (ISO 8601 datetime at midnight UTC)"),title_type:e.union([e.literal("estimate"),e.literal("proforma_invoice"),e.literal(null)]).nullish().describe("Display name variant for the document. 'estimate' renders as 'Estimate' (Ponudba/Ponuda), 'proforma_invoice' renders as 'Proforma invoice' (Predra\u010Dun)."),date_due:e.string().regex(uO).nullish().describe("Document due date in YYYY-MM-DD format"),date_service:e.string().regex(pO).nullish().describe("Service date in YYYY-MM-DD format. For invoices and credit notes."),date_service_to:e.string().regex(mO).nullish().describe("Service period end date in YYYY-MM-DD format. For invoices and credit notes. Use with date_service for date ranges."),items:e.array(e.object({id:e.string().max(gO),type:e.union([e.literal("separator"),e.literal(null)]).nullish().describe("Item type. null = regular line item, 'separator' = visual section header."),name:e.string().max(yO),description:e.string().nullable(),classification:e.union([e.literal("product"),e.literal("service"),e.literal("advance"),e.literal(null)]).nullish().describe("Item classification used for Portugal SAF-T product typing."),price:e.number().nullish().describe("Per-unit net price (before tax). Always stores net price. Null for separator items."),gross_price:e.number().nullish().describe(`Per-unit gross price (includes tax).
|
|
170
|
+
Only present if user originally sent gross price.
|
|
171
|
+
Use gross pricing to keep invoice totals stable when VIES reverse charge is applied.`),quantity:e.number().nullish().describe("Item quantity. Null for separator items."),unit:e.string().max(hO).nullish(),taxes:e.array(e.object({rate:e.number().nullish(),tax_id:e.string().nullish(),classification:e.string().nullish(),reverse_charge:e.boolean().nullish(),amount:e.number().nullish(),pt_exemption_code:e.string().nullish(),pt_exemption_reason:e.string().nullish()}).describe("Document Item Tax")).describe("Applied taxes (provide rate to create new tax, or tax_id to use existing tax)"),discounts:e.array(e.object({value:e.number().min(bO).describe("Discount value"),type:e.enum(["percent","amount"]).default(xO).describe("Discount type: 'percent' (default) or 'amount'")})).max(zO).describe("Line discounts (max 5) in request order. In `b2b_standard`, percentage discounts are calculated from the original line subtotal and fixed amounts are summed before tax. In `b2c_gross_discount`, discounts are applied sequentially to the running gross subtotal."),total:e.number().nullish().describe("Line total before tax. Null for separator items."),total_with_tax:e.number().nullish().describe("Line total after tax. Null for separator items."),total_converted:e.number().min(_O).max(vO).nullish(),total_with_tax_converted:e.number().min(fO).max(RO).nullish(),estimate_id:e.string().max(IO).nullish(),advance_invoice_id:e.string().max(EO).nullish(),delivery_note_id:e.string().max(SO).nullish(),item_id:e.string().max(DO).nullish(),metadata:e.record(e.string(),e.string()).nullish().describe("Custom key-value data for your own use. Store any JSON object up to 50 properties. Values must be strings up to 250 characters. Useful for storing external IDs, tags, or integration data."),created_at:e.iso.datetime({}),updated_at:e.iso.datetime({})})),document_relations:e.array(e.object({id:e.string(),source_type:e.enum(["invoice","estimate","credit_note","advance_invoice","delivery_note"]).describe("Type of document"),source_id:e.string(),target_type:e.enum(["invoice","estimate","credit_note","advance_invoice","delivery_note"]).describe("Type of document"),target_id:e.string(),relation_type:e.string(),entity_id:e.string(),created_at:e.iso.datetime({}),linked_document_voided_at:e.iso.datetime({}).nullish(),related_document:e.object({id:e.string(),type:e.enum(["invoice","estimate","credit_note","advance_invoice","delivery_note"]).describe("Type of document"),number:e.string(),date:e.string(),total_with_tax:e.number(),currency_code:e.string(),is_draft:e.boolean(),voided_at:e.string().nullable(),paid_in_full:e.boolean().nullable(),title_type:e.union([e.literal("estimate"),e.literal("proforma_invoice"),e.literal(null)]).nullable(),hide_prices:e.boolean().nullable()}).optional()})).optional()}).describe("Estimate or proforma invoice document"),PO=/^[a-z]{3,4}_[0-9a-f]{24}$/,Bze=e.object({id:e.stringFormat("resource-id",PO).describe("Unique resource identifier")}),Nze=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),Oze=e.object({versions:e.array(e.object({id:e.string().describe("Version record ID"),document_type:e.enum(["invoice","estimate","credit_note","advance_invoice"]).describe("Type of document"),document_id:e.string().describe("Document ID"),version:e.number().min(1).describe("Version number"),snapshot:e.record(e.string(),e.unknown()).describe("Full document snapshot at this version"),changed_fields:e.array(e.string()).describe("Fields that were changed in this update"),user:e.object({id:e.string(),name:e.string().nullable(),email:e.string()}).nullable().describe("User who made the change"),reason:e.string().nullable().describe("Reason for the change"),created_at:e.iso.datetime({}).describe("When this version was created")})).describe("List of versions"),count:e.number().describe("Total number of versions")}),Fze=e.object({id:e.string().describe("Estimate ID"),version:e.number().min(1).describe("Version number")}),Uze=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),jze=e.object({id:e.string().describe("Version record ID"),document_type:e.enum(["invoice","estimate","credit_note","advance_invoice"]).describe("Type of document"),document_id:e.string().describe("Document ID"),version:e.number().min(1).describe("Version number"),snapshot:e.record(e.string(),e.unknown()).describe("Full document snapshot at this version"),changed_fields:e.array(e.string()).describe("Fields that were changed in this update"),user:e.object({id:e.string(),name:e.string().nullable(),email:e.string()}).nullable().describe("User who made the change"),reason:e.string().nullable().describe("Reason for the change"),created_at:e.iso.datetime({}).describe("When this version was created")}),wO=2,CO=5,AO=2,MO=5,TO="true",qze=e.object({template:e.enum(["modern","classic","condensed","minimal","fashion"]).optional().describe("Document template design to use. When not specified, uses the entity's configured template."),locale:e.string().min(wO).max(CO).nullish().describe("Locale for number and date formatting (decimal separators, date order). When not specified, uses the entity's configured locale. For example, 'sl-SI' formats decimals with commas (5,5%) and dates as DD. MM. YYYY."),language:e.string().min(AO).max(MO).nullish().describe("Language for document labels and translations (e.g., 'Invoice', 'Tax', 'Total'). When not specified, uses the same value as locale. Use this to get entity-locale formatting with different-language labels \u2014 for example, a Slovenian entity (sl-SI formatting with commas) but English labels."),partial:e.enum(["true","false"]).default(TO).describe("Whether to treat the document as partial (allows incomplete data) or complete (validates all required fields)"),upn_qr_enabled:e.enum(["true","false"]).optional().describe("Override UPN QR enabled setting for preview"),upn_qr_display_mode:e.enum(["qr_only","full_slip"]).optional().describe("Override UPN QR display mode for preview"),epc_qr_enabled:e.enum(["true","false"]).optional().describe("Override EPC QR enabled setting for preview")}),Wze=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),kO=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,BO=2,NO=2,OO="iban",FO=2,UO=2,jO="iban",qO=500,WO=3,GO=35,VO=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,LO=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,HO=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,YO=0,KO=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,$O=2,QO=2,JO="iban",ZO=2,XO=2,e5="iban",t5=500,o5=3,n5=35,s5=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,r5=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,i5=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,a5=2e3,d5=-140737488355328,c5=0x7fffffffffff,l5=50,u5=0,p5="percent",m5=5,g5=0,Gze=e.union([e.object({is_draft:e.boolean().optional().describe("Whether this is a draft document. Draft documents have no sequential number assigned, skip fiscalization, and can be deleted. Use POST /{documents}/{id}/finalize to assign a number and finalize."),date:e.string().regex(kO).optional().describe("Document date in YYYY-MM-DD format"),issuer:e.object({name:e.string().nullish(),email:e.email().nullish(),address:e.string().nullish(),address_2:e.string().nullish(),post_code:e.string().nullish(),city:e.string().nullish(),state:e.string().nullish(),country:e.string().nullish(),country_code:e.string().min(BO).max(NO).nullish(),tax_number:e.string().nullish(),tax_number_2:e.string().nullish(),company_number:e.string().nullish(),phone:e.string().nullish(),peppol_id:e.string().nullish(),is_end_consumer:e.boolean().nullish(),bank_account:e.object({type:e.enum(["iban","us_domestic","uk_domestic","other"]).default(OO).describe("Account type determines which fields are used"),name:e.string().nullish().describe("Display name for this account. Falls back to account number if not set"),bank_name:e.string().nullish().describe("Bank name"),iban:e.string().nullish().describe("IBAN (for type=iban)"),account_number:e.string().nullish().describe("Account number (for us_domestic, uk_domestic, other)"),bic:e.string().nullish().describe("BIC/SWIFT code for international transfers"),routing_number:e.string().nullish().describe("US ABA routing number (for type=us_domestic)"),sort_code:e.string().nullish().describe("UK sort code (for type=uk_domestic)")}).nullish()}).optional().describe("Document issuer (entity) information"),customer_id:e.string().nullish().describe("Referenced Customer ID. Required if customer is not provided."),customer:e.object({name:e.string().nullish(),email:e.email().nullish(),address:e.string().nullish(),address_2:e.string().nullish(),post_code:e.string().nullish(),city:e.string().nullish(),state:e.string().nullish(),country:e.string().nullish(),country_code:e.string().min(FO).max(UO).nullish(),tax_number:e.string().nullish(),tax_number_2:e.string().nullish(),company_number:e.string().nullish(),phone:e.string().nullish(),peppol_id:e.string().nullish(),is_end_consumer:e.boolean().nullish(),bank_account:e.object({type:e.enum(["iban","us_domestic","uk_domestic","other"]).default(jO).describe("Account type determines which fields are used"),name:e.string().nullish().describe("Display name for this account. Falls back to account number if not set"),bank_name:e.string().nullish().describe("Bank name"),iban:e.string().nullish().describe("IBAN (for type=iban)"),account_number:e.string().nullish().describe("Account number (for us_domestic, uk_domestic, other)"),bic:e.string().nullish().describe("BIC/SWIFT code for international transfers"),routing_number:e.string().nullish().describe("US ABA routing number (for type=us_domestic)"),sort_code:e.string().nullish().describe("UK sort code (for type=uk_domestic)")}).nullish()}).describe("Document issuer (entity) information").and(e.object({save_customer:e.boolean().nullish().describe("Whether to save (create new or update existing) the customer data.\nDefaults to `true` (best-effort).\nWhen `true` with `customer_id`, updates the existing customer.\nWhen `true` without `customer_id`, checks for duplicate customers using customer identifiers (tax/company number, country-aware when available) and reuses the existing customer if found, otherwise creates a new customer.\nWhen `false`, customer data is stored inline on the document only.\nWhen omitted, behaves like `true` but won't fail the request if persistence fails.")}).nullable()).optional().describe("Customer recipient of the document.\nBoth `customer` and `customer_id` are optional - documents can be created without customer information.\nIf both `customer_id` and `customer` are provided with `save_customer=true`, the existing customer will be updated.\nIf only `customer` is provided with `save_customer=true` (or by default), the system checks for duplicates using customer identifiers and reuses existing customers when found."),note:e.string().nullish().describe("Note for the document. If not provided, defaults to entity's document-type-specific note setting. Pass empty string to explicitly set no note."),payment_terms:e.string().nullish().describe("Payment terms for the document. If not provided, defaults to entity's document-type-specific payment terms setting. Pass empty string to explicitly set no terms."),tax_clause:e.string().nullish().describe("Tax clause for the document. Auto-populated based on transaction type if tax_clause_defaults are configured in entity settings. Pass empty string to explicitly set no clause."),footer:e.string().max(qO).nullish(),signature:e.string().nullish().describe("Signature text for the document (e.g. 'John Smith, CEO'). If not provided, defaults to entity's default_document_signature setting. Pass empty string to explicitly set no signature."),calculation_mode:e.union([e.literal("b2b_standard"),e.literal("b2c_gross_discount"),e.literal(null)]).nullish().describe("Optional calculation mode override. When omitted, the entity default is used and falls back to `b2b_standard`."),currency_code:e.string().max(WO).optional(),metadata:e.record(e.string(),e.string()).nullish().describe("Custom key-value data for your own use. Store any JSON object up to 50 properties. Values must be strings up to 250 characters. Useful for storing external IDs, tags, or integration data."),reference:e.string().nullish().describe("Custom reference for the document (e.g., purchase order number, payment reference). When set, used as the UPN payment reference instead of the auto-generated one."),pt:e.object({series_id:e.string().nullish().describe("ATCUD series ID to use for PT numbering. Required for PT manual documents."),manual:e.boolean().nullish().describe("Marks this PT document as manually issued/offline."),manual_sequential_number:e.number().min(1).nullish().describe("Manual PT sequence number shown on the offline/original document."),manual_series_code:e.string().min(1).max(GO).nullish().describe("Offline/manual PT series code shown on the original document."),operator_first_name:e.string().min(1).nullish().describe("PT operator first name snapshot for PT compliance."),operator_last_name:e.string().min(1).nullish().describe("PT operator last name snapshot for PT compliance."),operator_tax_number:e.string().min(1).nullish().describe("PT operator tax number snapshot for PT compliance."),account_first_name:e.string().min(1).nullish().describe("Deprecated alias for PT operator first name snapshot."),account_last_name:e.string().min(1).nullish().describe("Deprecated alias for PT operator last name snapshot."),account_tax_number:e.string().min(1).nullish().describe("Deprecated alias for PT operator tax number snapshot.")}).nullish(),date_valid_till:e.string().nullish().describe("Estimate validity date in YYYY-MM-DD format"),title_type:e.union([e.literal("estimate"),e.literal("proforma_invoice"),e.literal(null)]).nullish().describe("Display name variant for the document. 'estimate' renders as 'Estimate' (Ponudba/Ponuda), 'proforma_invoice' renders as 'Proforma invoice' (Predra\u010Dun)."),date_due:e.string().regex(VO).nullish().describe("Document due date in YYYY-MM-DD format"),date_service:e.string().regex(LO).nullish().describe("Service date in YYYY-MM-DD format. For invoices and credit notes."),date_service_to:e.string().regex(HO).nullish().describe("Service period end date in YYYY-MM-DD format. For invoices and credit notes. Use with date_service for date ranges."),items:e.array(e.object({type:e.enum(["separator"]).optional(),name:e.string().optional(),quantity:e.number().optional(),price:e.number().optional(),gross_price:e.number().optional(),description:e.string().optional(),unit:e.string().optional(),discounts:e.array(e.object({value:e.number(),type:e.enum(["percent","amount"]).optional()})).optional(),taxes:e.array(e.object({rate:e.number().optional(),tax_id:e.string().optional()})).optional(),metadata:e.record(e.string(),e.string()).optional()})).min(1),expected_total_with_tax:e.number().gt(YO).nullish().describe("Expected total with tax. When provided, the system calculates a rounding_correction to reconcile differences between the calculated total and this expected value. Maximum allowed correction is \xB11.00. Useful when importing invoices from external systems with different rounding rules.")}),e.object({is_draft:e.boolean().optional().describe("Whether this is a draft document. Draft documents have no sequential number assigned, skip fiscalization, and can be deleted. Use POST /{documents}/{id}/finalize to assign a number and finalize."),date:e.string().regex(KO).optional().describe("Document date in YYYY-MM-DD format"),issuer:e.object({name:e.string().nullish(),email:e.email().nullish(),address:e.string().nullish(),address_2:e.string().nullish(),post_code:e.string().nullish(),city:e.string().nullish(),state:e.string().nullish(),country:e.string().nullish(),country_code:e.string().min($O).max(QO).nullish(),tax_number:e.string().nullish(),tax_number_2:e.string().nullish(),company_number:e.string().nullish(),phone:e.string().nullish(),peppol_id:e.string().nullish(),is_end_consumer:e.boolean().nullish(),bank_account:e.object({type:e.enum(["iban","us_domestic","uk_domestic","other"]).default(JO).describe("Account type determines which fields are used"),name:e.string().nullish().describe("Display name for this account. Falls back to account number if not set"),bank_name:e.string().nullish().describe("Bank name"),iban:e.string().nullish().describe("IBAN (for type=iban)"),account_number:e.string().nullish().describe("Account number (for us_domestic, uk_domestic, other)"),bic:e.string().nullish().describe("BIC/SWIFT code for international transfers"),routing_number:e.string().nullish().describe("US ABA routing number (for type=us_domestic)"),sort_code:e.string().nullish().describe("UK sort code (for type=uk_domestic)")}).nullish()}).optional().describe("Document issuer (entity) information"),customer_id:e.string().nullish().describe("Referenced Customer ID. Required if customer is not provided."),customer:e.object({name:e.string().nullish(),email:e.email().nullish(),address:e.string().nullish(),address_2:e.string().nullish(),post_code:e.string().nullish(),city:e.string().nullish(),state:e.string().nullish(),country:e.string().nullish(),country_code:e.string().min(ZO).max(XO).nullish(),tax_number:e.string().nullish(),tax_number_2:e.string().nullish(),company_number:e.string().nullish(),phone:e.string().nullish(),peppol_id:e.string().nullish(),is_end_consumer:e.boolean().nullish(),bank_account:e.object({type:e.enum(["iban","us_domestic","uk_domestic","other"]).default(e5).describe("Account type determines which fields are used"),name:e.string().nullish().describe("Display name for this account. Falls back to account number if not set"),bank_name:e.string().nullish().describe("Bank name"),iban:e.string().nullish().describe("IBAN (for type=iban)"),account_number:e.string().nullish().describe("Account number (for us_domestic, uk_domestic, other)"),bic:e.string().nullish().describe("BIC/SWIFT code for international transfers"),routing_number:e.string().nullish().describe("US ABA routing number (for type=us_domestic)"),sort_code:e.string().nullish().describe("UK sort code (for type=uk_domestic)")}).nullish()}).describe("Document issuer (entity) information").and(e.object({save_customer:e.boolean().nullish().describe("Whether to save (create new or update existing) the customer data.\nDefaults to `true` (best-effort).\nWhen `true` with `customer_id`, updates the existing customer.\nWhen `true` without `customer_id`, checks for duplicate customers using customer identifiers (tax/company number, country-aware when available) and reuses the existing customer if found, otherwise creates a new customer.\nWhen `false`, customer data is stored inline on the document only.\nWhen omitted, behaves like `true` but won't fail the request if persistence fails.")}).nullable()).optional().describe("Customer recipient of the document.\nBoth `customer` and `customer_id` are optional - documents can be created without customer information.\nIf both `customer_id` and `customer` are provided with `save_customer=true`, the existing customer will be updated.\nIf only `customer` is provided with `save_customer=true` (or by default), the system checks for duplicates using customer identifiers and reuses existing customers when found."),note:e.string().nullish().describe("Note for the document. If not provided, defaults to entity's document-type-specific note setting. Pass empty string to explicitly set no note."),payment_terms:e.string().nullish().describe("Payment terms for the document. If not provided, defaults to entity's document-type-specific payment terms setting. Pass empty string to explicitly set no terms."),tax_clause:e.string().nullish().describe("Tax clause for the document. Auto-populated based on transaction type if tax_clause_defaults are configured in entity settings. Pass empty string to explicitly set no clause."),footer:e.string().max(t5).nullish(),signature:e.string().nullish().describe("Signature text for the document (e.g. 'John Smith, CEO'). If not provided, defaults to entity's default_document_signature setting. Pass empty string to explicitly set no signature."),calculation_mode:e.union([e.literal("b2b_standard"),e.literal("b2c_gross_discount"),e.literal(null)]).nullish().describe("Optional calculation mode override. When omitted, the entity default is used and falls back to `b2b_standard`."),currency_code:e.string().max(o5).optional(),metadata:e.record(e.string(),e.string()).nullish().describe("Custom key-value data for your own use. Store any JSON object up to 50 properties. Values must be strings up to 250 characters. Useful for storing external IDs, tags, or integration data."),reference:e.string().nullish().describe("Custom reference for the document (e.g., purchase order number, payment reference). When set, used as the UPN payment reference instead of the auto-generated one."),pt:e.object({series_id:e.string().nullish().describe("ATCUD series ID to use for PT numbering. Required for PT manual documents."),manual:e.boolean().nullish().describe("Marks this PT document as manually issued/offline."),manual_sequential_number:e.number().min(1).nullish().describe("Manual PT sequence number shown on the offline/original document."),manual_series_code:e.string().min(1).max(n5).nullish().describe("Offline/manual PT series code shown on the original document."),operator_first_name:e.string().min(1).nullish().describe("PT operator first name snapshot for PT compliance."),operator_last_name:e.string().min(1).nullish().describe("PT operator last name snapshot for PT compliance."),operator_tax_number:e.string().min(1).nullish().describe("PT operator tax number snapshot for PT compliance."),account_first_name:e.string().min(1).nullish().describe("Deprecated alias for PT operator first name snapshot."),account_last_name:e.string().min(1).nullish().describe("Deprecated alias for PT operator last name snapshot."),account_tax_number:e.string().min(1).nullish().describe("Deprecated alias for PT operator tax number snapshot.")}).nullish(),date_valid_till:e.string().nullish().describe("Estimate validity date in YYYY-MM-DD format"),title_type:e.union([e.literal("estimate"),e.literal("proforma_invoice"),e.literal(null)]).nullish().describe("Display name variant for the document. 'estimate' renders as 'Estimate' (Ponudba/Ponuda), 'proforma_invoice' renders as 'Proforma invoice' (Predra\u010Dun)."),date_due:e.string().regex(s5).nullish().describe("Document due date in YYYY-MM-DD format"),date_service:e.string().regex(r5).nullish().describe("Service date in YYYY-MM-DD format. For invoices and credit notes."),date_service_to:e.string().regex(i5).nullish().describe("Service period end date in YYYY-MM-DD format. For invoices and credit notes. Use with date_service for date ranges."),items:e.array(e.object({type:e.union([e.literal("separator"),e.literal(null)]).nullish().describe(`Item type. Omit or null for regular line item, 'separator' for a visual section header.
|
|
172
|
+
Separator items only use name and description \u2014 all financial fields are ignored.`),name:e.string().min(1).nullish().describe("Item name. Required unless `item_id` is provided.\nFor separator items, this is the section title (always required)."),description:e.string().max(a5).nullish(),classification:e.union([e.literal("product"),e.literal("service"),e.literal("advance"),e.literal(null)]).nullish().describe("Item classification used for Portugal SAF-T product typing."),price:e.number().nullish().describe("Net price per unit (before tax).\nProvide either `price` OR `gross_price`, not both.\nOptional if `item_id` is provided. Ignored for separator items."),gross_price:e.number().nullish().describe("Gross price per unit (includes tax).\nIf provided, net price is calculated.\nProvide either `price` OR `gross_price`, not both.\nOptional if `item_id` is provided. Ignored for separator items."),quantity:e.number().min(d5).max(c5).nullish().describe("Item quantity. Required for regular items. Ignored for separator items."),unit:e.string().max(l5).nullish(),taxes:e.array(e.object({rate:e.number().nullish(),tax_id:e.string().nullish(),classification:e.string().nullish(),reverse_charge:e.boolean().nullish(),amount:e.number().nullish(),pt_exemption_code:e.string().nullish(),pt_exemption_reason:e.string().nullish()}).describe("Document Item Tax")).optional().describe("Applied taxes (provide rate to create new tax, or tax_id to use existing tax)"),discounts:e.array(e.object({value:e.number().min(u5).describe("Discount value"),type:e.enum(["percent","amount"]).default(p5).describe("Discount type: 'percent' (default) or 'amount'")})).max(m5).optional().describe("Line discounts (max 5) in request order. In `b2b_standard`, percentage discounts are calculated from the original line subtotal and fixed amounts are summed before tax. In `b2c_gross_discount`, discounts are applied sequentially to the running gross subtotal."),item_id:e.string().nullish().describe(`ID of a catalog item to prefill from.
|
|
173
|
+
When provided, the item's name, description, price, and taxes are used as defaults.
|
|
174
|
+
Any field you provide will override the catalog item's value.
|
|
175
|
+
Not applicable for separator items.`),metadata:e.record(e.string(),e.string()).nullish().describe("Custom key-value data for your own use. Store any JSON object up to 50 properties. Values must be strings up to 250 characters. Useful for storing external IDs, tags, or integration data."),save_item:e.boolean().nullish().describe(`Whether to save this item to the catalog.
|
|
176
|
+
When true without item_id, matches by exact name and reuses existing, or creates a new catalog item.
|
|
177
|
+
Defaults to true (best-effort). When omitted, behaves like true but won't fail the request if persistence fails.`)})).min(1).describe("Line items for the estimate. At least one item is required."),expected_total_with_tax:e.number().gt(g5).nullish().describe("Expected total with tax. When provided, the system calculates a rounding_correction to reconcile differences between the calculated total and this expected value. Maximum allowed correction is \xB11.00. Useful when importing invoices from external systems with different rounding rules.")})]);var we={};j(we,{DownloadEslogExportHeader:()=>a_e,DownloadEslogExportParams:()=>i_e,DownloadPdfExportHeader:()=>e_e,DownloadPdfExportParams:()=>Xze,ExportDocumentsHeader:()=>Lze,ExportDocumentsQueryParams:()=>Vze,ExportSalesPerItemHeader:()=>Yze,ExportSalesPerItemQueryParams:()=>Hze,GetEslogExportStatusHeader:()=>s_e,GetEslogExportStatusParams:()=>n_e,GetEslogExportStatusResponse:()=>r_e,GetPdfExportStatusHeader:()=>Jze,GetPdfExportStatusParams:()=>Qze,GetPdfExportStatusResponse:()=>Zze,StartEslogExportBody:()=>o_e,StartEslogExportHeader:()=>t_e,StartPdfExportBody:()=>$ze,StartPdfExportHeader:()=>Kze});var Vze=e.object({type:e.enum(["invoice","estimate","credit_note","advance_invoice","delivery_note"]).describe("Document type to export"),format:e.enum(["xlsx","csv"]).describe("Export format"),date_from:e.string().optional().describe("Start date filter (ISO 8601 date). Date range cannot exceed 1 year."),date_to:e.string().optional().describe("End date filter (ISO 8601 date). Date range cannot exceed 1 year."),language:e.enum(["en","de","sl","it","fr","es","pt","nl","pl","hr","sv","fi","et","bg","cs","sk","nb","is"]).optional().describe("Language for column headers. Defaults to the entity locale when omitted."),query:e.string().optional().describe("JSON query filter (same as list endpoints)"),search:e.string().optional().describe("Full-text search")}),Lze=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),Hze=e.object({format:e.enum(["xlsx","csv"]).describe("Export format"),date_from:e.string().describe("Start date filter (ISO 8601 date). Required. Date range cannot exceed 1 year."),date_to:e.string().describe("End date filter (ISO 8601 date). Required. Date range cannot exceed 1 year."),language:e.enum(["en","de","sl","it","fr","es","pt","nl","pl","hr","sv","fi","et","bg","cs","sk","nb","is"]).optional().describe("Language for column headers. Defaults to the entity locale when omitted.")}),Yze=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),Kze=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),$ze=e.union([e.object({document_ids:e.array(e.string()).min(1).describe("Specific document IDs to export. Types are inferred from ID prefixes."),locale:e.union([e.literal("en-US"),e.literal("de-DE"),e.literal("it-IT"),e.literal("fr-FR"),e.literal("es-ES"),e.literal("sl-SI"),e.literal("pt-PT"),e.literal("nl-NL"),e.literal("pl-PL"),e.literal("hr-HR"),e.literal("sv-SE"),e.literal("fi-FI"),e.literal("et-EE"),e.literal("bg-BG"),e.literal("cs-CZ"),e.literal("sk-SK"),e.literal("nb-NO"),e.literal("is-IS"),e.literal(null)]).nullish().describe("Override PDF formatting locale. When omitted or null, defaults to the entity locale."),language:e.union([e.literal("en"),e.literal("de"),e.literal("sl"),e.literal("it"),e.literal("fr"),e.literal("es"),e.literal("pt"),e.literal("nl"),e.literal("pl"),e.literal("hr"),e.literal("sv"),e.literal("fi"),e.literal("et"),e.literal("bg"),e.literal("cs"),e.literal("sk"),e.literal("nb"),e.literal("is"),e.literal(null)]).nullish().describe("Override PDF label language. When omitted or null, defaults to the locale language, then entity locale.")}),e.object({types:e.array(e.enum(["invoice","estimate","credit_note","advance_invoice","delivery_note"]).describe("Document type to export")).min(1).describe("Document types to export. Supports multiple types in a single export."),date_from:e.string().nullish().describe("Start date filter (ISO 8601 date). Date range cannot exceed 1 year. Omit or use null to skip."),date_to:e.string().nullish().describe("End date filter (ISO 8601 date). Date range cannot exceed 1 year. Omit or use null to skip."),locale:e.union([e.literal("en-US"),e.literal("de-DE"),e.literal("it-IT"),e.literal("fr-FR"),e.literal("es-ES"),e.literal("sl-SI"),e.literal("pt-PT"),e.literal("nl-NL"),e.literal("pl-PL"),e.literal("hr-HR"),e.literal("sv-SE"),e.literal("fi-FI"),e.literal("et-EE"),e.literal("bg-BG"),e.literal("cs-CZ"),e.literal("sk-SK"),e.literal("nb-NO"),e.literal("is-IS"),e.literal(null)]).nullish().describe("Override PDF formatting locale. When omitted or null, defaults to the entity locale."),language:e.union([e.literal("en"),e.literal("de"),e.literal("sl"),e.literal("it"),e.literal("fr"),e.literal("es"),e.literal("pt"),e.literal("nl"),e.literal("pl"),e.literal("hr"),e.literal("sv"),e.literal("fi"),e.literal("et"),e.literal("bg"),e.literal("cs"),e.literal("sk"),e.literal("nb"),e.literal("is"),e.literal(null)]).nullish().describe("Override PDF label language. When omitted or null, defaults to the locale language, then entity locale.")})]),Qze=e.object({jobId:e.string().describe("Export job ID")}),Jze=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),Zze=e.object({id:e.string().describe("Export job ID"),status:e.enum(["pending","processing","completed","failed"]).describe("Export job status"),progress:e.number().describe("Export progress. While processing, this is the number of processed documents so far. Completed jobs return 100."),total_docs:e.number().nullable().describe("Total number of documents to export"),file_url:e.string().nullable().describe("Download URL for the completed export"),file_name:e.string().nullable().describe("Suggested ZIP filename for the completed export"),error:e.string().nullable().describe("Error message if the export failed"),result:e.object({exported_docs:e.number().describe("Number of files included in the archive"),skipped_docs:e.number().describe("Number of documents skipped because they were not valid for export")}).nullable().describe("Optional async export result summary")}),Xze=e.object({jobId:e.string().describe("Export job ID")}),e_e=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),t_e=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),o_e=e.union([e.object({document_ids:e.array(e.string()).min(1).describe("Specific document IDs to export as e-SLOG XML. Types are inferred from ID prefixes.")}),e.object({types:e.array(e.enum(["invoice","estimate","credit_note"]).describe("Document type to export as e-SLOG XML")).min(1).describe("Document types to export as e-SLOG XML. Supports multiple types in a single export."),date_from:e.string().nullish().describe("Start date filter (ISO 8601 date). Date range cannot exceed 1 year. Omit or use null to skip."),date_to:e.string().nullish().describe("End date filter (ISO 8601 date). Date range cannot exceed 1 year. Omit or use null to skip.")})]),n_e=e.object({jobId:e.string().describe("Export job ID")}),s_e=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),r_e=e.object({id:e.string().describe("Export job ID"),status:e.enum(["pending","processing","completed","failed"]).describe("Export job status"),progress:e.number().describe("Export progress. While processing, this is the number of processed documents so far. Completed jobs return 100."),total_docs:e.number().nullable().describe("Total number of documents to export"),file_url:e.string().nullable().describe("Download URL for the completed export"),file_name:e.string().nullable().describe("Suggested ZIP filename for the completed export"),error:e.string().nullable().describe("Error message if the export failed"),result:e.object({exported_docs:e.number().describe("Number of files included in the archive"),skipped_docs:e.number().describe("Number of documents skipped because they were not valid for export")}).nullable().describe("Optional async export result summary")}),i_e=e.object({jobId:e.string().describe("Export job ID")}),a_e=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")});var Ce={};j(Ce,{DeleteFileHeader:()=>b_e,DeleteFileParams:()=>h_e,GetFileByIdHeader:()=>g_e,GetFileByIdParams:()=>m_e,GetFileByIdResponse:()=>y_e,GetFilesHeader:()=>u_e,GetFilesQueryParams:()=>l_e,GetFilesResponse:()=>p_e,UploadFileBody:()=>c_e,UploadFileHeader:()=>d_e,deleteFilePathIdRegExp:()=>i1,getFileByIdPathIdRegExp:()=>F5,getFileByIdResponseOneAdvanceInvoiceIdMax:()=>V5,getFileByIdResponseOneBytesMax:()=>o1,getFileByIdResponseOneBytesMin:()=>t1,getFileByIdResponseOneCacheKeyMax:()=>r1,getFileByIdResponseOneCategoryMax:()=>H5,getFileByIdResponseOneCreditNoteIdMax:()=>G5,getFileByIdResponseOneEntityIdMax:()=>j5,getFileByIdResponseOneEstimateIdMax:()=>W5,getFileByIdResponseOneFilenameMax:()=>n1,getFileByIdResponseOneFormatMax:()=>Q5,getFileByIdResponseOneHeightMax:()=>e1,getFileByIdResponseOneHeightMin:()=>X5,getFileByIdResponseOneIdMax:()=>U5,getFileByIdResponseOneIncomingPurchaseDocumentIdMax:()=>L5,getFileByIdResponseOneInvoiceIdMax:()=>q5,getFileByIdResponseOneMimeTypeMax:()=>s1,getFileByIdResponseOnePublicIdMax:()=>$5,getFileByIdResponseOneSecureUrlMax:()=>K5,getFileByIdResponseOneUrlMax:()=>Y5,getFileByIdResponseOneWidthMax:()=>Z5,getFileByIdResponseOneWidthMin:()=>J5,getFilesQueryLimitDefault:()=>y5,getFilesQueryLimitMax:()=>h5,getFilesResponseDataItemOneAdvanceInvoiceIdMax:()=>f5,getFilesResponseDataItemOneBytesMax:()=>k5,getFilesResponseDataItemOneBytesMin:()=>T5,getFilesResponseDataItemOneCacheKeyMax:()=>O5,getFilesResponseDataItemOneCategoryMax:()=>I5,getFilesResponseDataItemOneCreditNoteIdMax:()=>v5,getFilesResponseDataItemOneEntityIdMax:()=>x5,getFilesResponseDataItemOneEstimateIdMax:()=>_5,getFilesResponseDataItemOneFilenameMax:()=>B5,getFilesResponseDataItemOneFormatMax:()=>P5,getFilesResponseDataItemOneHeightMax:()=>M5,getFilesResponseDataItemOneHeightMin:()=>A5,getFilesResponseDataItemOneIdMax:()=>b5,getFilesResponseDataItemOneIncomingPurchaseDocumentIdMax:()=>R5,getFilesResponseDataItemOneInvoiceIdMax:()=>z5,getFilesResponseDataItemOneMimeTypeMax:()=>N5,getFilesResponseDataItemOnePublicIdMax:()=>D5,getFilesResponseDataItemOneSecureUrlMax:()=>S5,getFilesResponseDataItemOneUrlMax:()=>E5,getFilesResponseDataItemOneWidthMax:()=>C5,getFilesResponseDataItemOneWidthMin:()=>w5});var d_e=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),c_e=e.object({file:e.instanceof(File).optional().describe("File to upload"),category:e.enum(["logo","signature","attachment"]).describe("File category (logo, signature, or attachment)"),account_payable_id:e.string().optional().describe("Account payable ID for attachments (optional, only for attachment category)"),incoming_purchase_document_id:e.string().optional().describe("Incoming purchase document ID for attachments (optional, only for attachment category)")}),y5=10,h5=100,l_e=e.object({limit:e.number().min(1).max(h5).default(y5).describe("Number of results per request."),next_cursor:e.string().optional().describe("Opaque cursor to fetch the next page of results. Reuse only with the same effective ordering. Use the value from pagination.next_cursor in the previous response."),prev_cursor:e.string().optional().describe("Opaque cursor to fetch the previous page of results. Reuse only with the same effective ordering. Use the value from pagination.prev_cursor in the previous response."),include_total_count:e.boolean().optional().describe("Whether to include the total count of items in `pagination.total`.\nDefault is `true`.\nWhen `false`, `pagination.total` returns -1 for better performance."),category:e.enum(["logo","signature","attachment"]).optional().describe("Filter by file category"),account_payable_id:e.string().optional().describe("Filter by account payable ID (for attachments)"),incoming_purchase_document_id:e.string().optional().describe("Filter by incoming purchase document ID (for attachments)")}),u_e=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),b5=36,x5=36,z5=36,_5=36,v5=36,f5=36,R5=36,I5=20,E5=500,S5=500,D5=200,P5=20,w5=-2147483648,C5=2147483647,A5=-2147483648,M5=2147483647,T5=-2147483648,k5=2147483647,B5=255,N5=100,O5=255,p_e=e.object({data:e.array(e.object({id:e.string().max(b5),entity_id:e.string().max(x5),invoice_id:e.string().max(z5).nullish(),estimate_id:e.string().max(_5).nullish(),credit_note_id:e.string().max(v5).nullish(),advance_invoice_id:e.string().max(f5).nullish(),incoming_purchase_document_id:e.string().max(R5).nullish(),category:e.string().max(I5),url:e.string().max(E5),secureUrl:e.string().max(S5),publicId:e.string().max(D5),format:e.string().max(P5),width:e.number().min(w5).max(C5).nullish(),height:e.number().min(A5).max(M5).nullish(),bytes:e.number().min(T5).max(k5),filename:e.string().max(B5).nullish(),mime_type:e.string().max(N5),metadata:e.union([e.string(),e.number(),e.boolean(),e.null(),e.record(e.string(),e.unknown()),e.array(e.unknown())]),cache_key:e.string().max(O5).nullish(),created_at:e.iso.datetime({}),updated_at:e.iso.datetime({})}).describe("File metadata record with upload information").and(e.looseObject({})).describe("File metadata record with upload information")),pagination:e.object({total:e.number().describe("Total number of items available in the collection"),next_cursor:e.string().nullable().describe("Opaque cursor for fetching the next page. It encodes the resolved sort tuple for the current result set, so reuse it only with the same effective ordering. Null if no more results are available."),prev_cursor:e.string().nullable().describe("Opaque cursor for fetching the previous page. It encodes the resolved sort tuple for the current result set, so reuse it only with the same effective ordering. Null if at the first page."),has_more:e.boolean().describe("Indicates whether more results are available after the current page")}).describe("Pagination metadata including cursors and result counts")}),F5=/^[a-z]{3,4}_[0-9a-f]{24}$/,m_e=e.object({id:e.stringFormat("resource-id",F5).describe("Unique resource identifier")}),g_e=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),U5=36,j5=36,q5=36,W5=36,G5=36,V5=36,L5=36,H5=20,Y5=500,K5=500,$5=200,Q5=20,J5=-2147483648,Z5=2147483647,X5=-2147483648,e1=2147483647,t1=-2147483648,o1=2147483647,n1=255,s1=100,r1=255,y_e=e.object({id:e.string().max(U5),entity_id:e.string().max(j5),invoice_id:e.string().max(q5).nullish(),estimate_id:e.string().max(W5).nullish(),credit_note_id:e.string().max(G5).nullish(),advance_invoice_id:e.string().max(V5).nullish(),incoming_purchase_document_id:e.string().max(L5).nullish(),category:e.string().max(H5),url:e.string().max(Y5),secureUrl:e.string().max(K5),publicId:e.string().max($5),format:e.string().max(Q5),width:e.number().min(J5).max(Z5).nullish(),height:e.number().min(X5).max(e1).nullish(),bytes:e.number().min(t1).max(o1),filename:e.string().max(n1).nullish(),mime_type:e.string().max(s1),metadata:e.union([e.string(),e.number(),e.boolean(),e.null(),e.record(e.string(),e.unknown()),e.array(e.unknown())]),cache_key:e.string().max(r1).nullish(),created_at:e.iso.datetime({}),updated_at:e.iso.datetime({})}).describe("File metadata record with upload information").and(e.looseObject({})).describe("File metadata record with upload information"),i1=/^[a-z]{3,4}_[0-9a-f]{24}$/,h_e=e.object({id:e.stringFormat("resource-id",i1).describe("Unique resource identifier")}),b_e=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")});var Ae={};j(Ae,{DeleteFinaCertificateHeader:()=>R_e,GetFinaCertificateHeader:()=>v_e,GetFinaCertificateResponse:()=>f_e,UploadFinaCertificateBody:()=>z_e,UploadFinaCertificateHeader:()=>x_e,UploadFinaCertificateResponse:()=>__e});var x_e=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),z_e=e.object({file:e.instanceof(File).optional().describe("P12/PFX certificate file"),passphrase:e.string().optional().describe("Certificate passphrase (will be encrypted before storage)")}),__e=e.object({certificate_expiry:e.iso.datetime({}).describe("Certificate expiration date (ISO 8601 format)"),message:e.string().describe("Success message")}),v_e=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),f_e=e.object({certificate_expiry:e.string(),certificate_cn:e.string().nullable(),certificate_issuer:e.string().nullable(),uploaded_at:e.string(),message:e.string()}),R_e=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")});var Me={};j(Me,{DeleteFinaDeviceHeader:()=>k_e,DeleteFinaDeviceParams:()=>T_e,DeleteFinaDeviceResponse:()=>B_e,GetFinaDeviceHeader:()=>A_e,GetFinaDeviceParams:()=>C_e,GetFinaDeviceResponse:()=>M_e,ListFinaDevicesHeader:()=>E_e,ListFinaDevicesParams:()=>I_e,ListFinaDevicesResponse:()=>S_e,ListFinaDevicesResponseItem:()=>a1,RegisterFinaDeviceBody:()=>w_e,RegisterFinaDeviceHeader:()=>P_e,RegisterFinaDeviceParams:()=>D_e,registerFinaDeviceBodyElectronicDeviceNameMax:()=>d1,registerFinaDeviceBodyElectronicDeviceNameRegExp:()=>c1});var I_e=e.object({id:e.string().describe("Premise ID")}),E_e=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),a1=e.object({id:e.string(),premise_id:e.string(),electronic_device_name:e.string(),is_active:e.boolean(),created_at:e.iso.datetime({}),updated_at:e.iso.datetime({})}),S_e=e.array(a1),D_e=e.object({id:e.string().describe("Premise ID")}),P_e=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),d1=20,c1=/^\d{1,20}$/,w_e=e.object({electronic_device_name:e.string().min(1).max(d1).regex(c1).describe("Electronic device name (OznNapUr), digits only, 1-20 chars")}),C_e=e.object({id:e.string().describe("Device ID")}),A_e=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),M_e=e.object({id:e.string(),premise_id:e.string(),electronic_device_name:e.string(),is_active:e.boolean(),created_at:e.iso.datetime({}),updated_at:e.iso.datetime({})}),T_e=e.object({id:e.string().describe("Device ID")}),k_e=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),B_e=e.object({success:e.boolean().describe("Operation success status"),message:e.string().describe("Success message"),electronic_device_name:e.string().describe("Name of the registered electronic device")});var Te={};j(Te,{CreateFinaPremiseBody:()=>U_e,CreateFinaPremiseHeader:()=>F_e,DeleteFinaPremiseHeader:()=>V_e,DeleteFinaPremiseParams:()=>G_e,DeleteFinaPremiseResponse:()=>L_e,GetFinaPremiseHeader:()=>q_e,GetFinaPremiseParams:()=>j_e,GetFinaPremiseResponse:()=>W_e,ListFinaPremisesHeader:()=>N_e,ListFinaPremisesResponse:()=>O_e,ListFinaPremisesResponseItem:()=>l1,createFinaPremiseBodyBusinessPremiseNameMax:()=>u1,createFinaPremiseBodyBusinessPremiseNameRegExp:()=>p1});var N_e=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),l1=e.object({id:e.string(),entity_id:e.string(),business_premise_name:e.string(),type:e.string(),real_estate:e.object({cadastral_municipality:e.string(),land_registry_number:e.string(),building_number:e.string().nullable(),sub_building_number:e.string().nullable(),street:e.string().nullable(),house_number:e.string().nullable(),house_number_additional:e.string().nullable(),settlement:e.string().nullable(),city:e.string().nullable(),postal_code:e.string().nullable()}).nullable(),movable_premise:e.object({type:e.string()}).nullable(),is_active:e.boolean(),registered_at:e.iso.datetime({}).nullable(),closed_at:e.iso.datetime({}).nullable(),created_at:e.iso.datetime({}),updated_at:e.iso.datetime({}),Devices:e.array(e.object({id:e.string(),premise_id:e.string(),electronic_device_name:e.string(),is_active:e.boolean(),created_at:e.iso.datetime({}),updated_at:e.iso.datetime({})})).optional()}),O_e=e.array(l1),F_e=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),u1=20,p1=/^[0-9a-zA-Z]{1,20}$/,U_e=e.object({business_premise_name:e.string().min(1).max(u1).regex(p1).describe("Business premise name (OznPosPr), alphanumeric, 1-20 chars. Must match the name registered on ePorezna.")}),j_e=e.object({id:e.string().describe("Premise ID")}),q_e=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),W_e=e.object({id:e.string(),entity_id:e.string(),business_premise_name:e.string(),type:e.string(),real_estate:e.object({cadastral_municipality:e.string(),land_registry_number:e.string(),building_number:e.string().nullable(),sub_building_number:e.string().nullable(),street:e.string().nullable(),house_number:e.string().nullable(),house_number_additional:e.string().nullable(),settlement:e.string().nullable(),city:e.string().nullable(),postal_code:e.string().nullable()}).nullable(),movable_premise:e.object({type:e.string()}).nullable(),is_active:e.boolean(),registered_at:e.iso.datetime({}).nullable(),closed_at:e.iso.datetime({}).nullable(),created_at:e.iso.datetime({}),updated_at:e.iso.datetime({}),Devices:e.array(e.object({id:e.string(),premise_id:e.string(),electronic_device_name:e.string(),is_active:e.boolean(),created_at:e.iso.datetime({}),updated_at:e.iso.datetime({})})).optional()}),G_e=e.object({id:e.string().describe("Premise ID")}),V_e=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),L_e=e.object({success:e.boolean().describe("Operation success status"),message:e.string().describe("Success message"),business_premise_name:e.string().describe("Business premise name")});var ke={};j(ke,{GetFinaSettingsHeader:()=>H_e,GetFinaSettingsResponse:()=>Y_e,UpdateFinaSettingsBody:()=>$_e,UpdateFinaSettingsHeader:()=>K_e,UpdateFinaSettingsResponse:()=>Q_e,getFinaSettingsResponseEnabledDefault:()=>m1,getFinaSettingsResponseNumberingSequenceDefault:()=>b1,getFinaSettingsResponseOperatorOibMax:()=>y1,getFinaSettingsResponseOperatorOibMin:()=>g1,getFinaSettingsResponseUSustPdvDefault:()=>h1,updateFinaSettingsBodyEnabledDefault:()=>x1,updateFinaSettingsBodyNumberingSequenceDefault:()=>f1,updateFinaSettingsBodyOperatorOibMax:()=>_1,updateFinaSettingsBodyOperatorOibMin:()=>z1,updateFinaSettingsBodyUSustPdvDefault:()=>v1,updateFinaSettingsResponseEnabledDefault:()=>R1,updateFinaSettingsResponseNumberingSequenceDefault:()=>D1,updateFinaSettingsResponseOperatorOibMax:()=>E1,updateFinaSettingsResponseOperatorOibMin:()=>I1,updateFinaSettingsResponseUSustPdvDefault:()=>S1});var H_e=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),m1=false,g1=11,y1=11,h1=true,b1="P",Y_e=e.object({enabled:e.boolean().default(m1).describe("Whether CIS (FINA) fiscalization is enabled for this entity"),operator_oib:e.string().min(g1).max(y1).optional().describe("OIB of the operator (11 digits). Used when creating invoices via API key."),operator_label:e.string().optional().describe("Operator label/name for this entity"),u_sust_pdv:e.boolean().default(h1).describe("Whether the entity is in the PDV (VAT) system. Most businesses are."),numbering_sequence:e.enum(["N","P"]).default(b1).describe("Numbering sequence: P (per premise) or N (per device)"),unified_numbering:e.boolean().nullish().describe("When enabled (default: true), all documents use the same FINA numbering sequence regardless of transaction type (domestic/non-domestic)"),certificate_expiry:e.string().optional().describe("Certificate expiration date"),has_certificate:e.boolean().describe("Whether a certificate is uploaded"),certificate_status:e.enum(["valid","expiring_soon","expired","missing"]).optional().describe("Certificate status")}),K_e=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),x1=false,z1=11,_1=11,v1=true,f1="P",$_e=e.object({enabled:e.boolean().default(x1).describe("Whether CIS (FINA) fiscalization is enabled for this entity"),operator_oib:e.string().min(z1).max(_1).optional().describe("OIB of the operator (11 digits). Used when creating invoices via API key."),operator_label:e.string().optional().describe("Operator label/name for this entity"),u_sust_pdv:e.boolean().default(v1).describe("Whether the entity is in the PDV (VAT) system. Most businesses are."),numbering_sequence:e.enum(["N","P"]).default(f1).describe("Numbering sequence: P (per premise) or N (per device)"),unified_numbering:e.boolean().nullish().describe("When enabled (default: true), all documents use the same FINA numbering sequence regardless of transaction type (domestic/non-domestic)")}),R1=false,I1=11,E1=11,S1=true,D1="P",Q_e=e.object({enabled:e.boolean().default(R1).describe("Whether CIS (FINA) fiscalization is enabled for this entity"),operator_oib:e.string().min(I1).max(E1).optional().describe("OIB of the operator (11 digits). Used when creating invoices via API key."),operator_label:e.string().optional().describe("Operator label/name for this entity"),u_sust_pdv:e.boolean().default(S1).describe("Whether the entity is in the PDV (VAT) system. Most businesses are."),numbering_sequence:e.enum(["N","P"]).default(D1).describe("Numbering sequence: P (per premise) or N (per device)"),unified_numbering:e.boolean().nullish().describe("When enabled (default: true), all documents use the same FINA numbering sequence regardless of transaction type (domestic/non-domestic)"),certificate_expiry:e.string().optional().describe("Certificate expiration date"),has_certificate:e.boolean().describe("Whether a certificate is uploaded"),certificate_status:e.enum(["valid","expiring_soon","expired","missing"]).optional().describe("Certificate status")});var Be={};j(Be,{DeleteFursCertificateHeader:()=>ove,GetFursCertificateHeader:()=>eve,GetFursCertificateResponse:()=>tve,UploadFursCertificateBody:()=>Z_e,UploadFursCertificateHeader:()=>J_e,UploadFursCertificateResponse:()=>X_e});var J_e=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),Z_e=e.object({file:e.instanceof(File).optional().describe("P12/PFX certificate file"),passphrase:e.string().optional().describe("Certificate passphrase (will be encrypted before storage)")}),X_e=e.object({certificate_expiry:e.iso.datetime({}).describe("Certificate expiration date (ISO 8601 format)"),message:e.string().describe("Success message")}),eve=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),tve=e.object({certificate_expiry:e.string(),certificate_cn:e.string().nullable(),certificate_issuer:e.string().nullable(),uploaded_at:e.string(),message:e.string()}),ove=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")});var Ne={};j(Ne,{GetFursElectronicDeviceHeader:()=>lve,GetFursElectronicDeviceParams:()=>cve,GetFursElectronicDeviceResponse:()=>uve,ListFursElectronicDevicesHeader:()=>sve,ListFursElectronicDevicesParams:()=>nve,ListFursElectronicDevicesResponse:()=>rve,ListFursElectronicDevicesResponseItem:()=>P1,RegisterFursElectronicDeviceBody:()=>dve,RegisterFursElectronicDeviceHeader:()=>ave,RegisterFursElectronicDeviceParams:()=>ive,registerFursElectronicDeviceBodyNameMax:()=>w1});var nve=e.object({id:e.string().describe("Business premise ID")}),sve=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),P1=e.object({id:e.string(),business_premise_id:e.string(),electronic_device_name:e.string(),is_active:e.boolean(),registered_at:e.iso.datetime({}).nullable(),created_at:e.iso.datetime({}),updated_at:e.iso.datetime({})}),rve=e.array(P1),ive=e.object({id:e.string().describe("Business premise ID")}),ave=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),w1=20,dve=e.object({name:e.string().min(1).max(w1).describe("Electronic device name/identifier (e.g., 'E1', 'POS1', 'DEVICE1')")}),cve=e.object({id:e.string().describe("Electronic device ID")}),lve=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),uve=e.object({id:e.string(),business_premise_id:e.string(),electronic_device_name:e.string(),is_active:e.boolean(),registered_at:e.iso.datetime({}).nullable(),created_at:e.iso.datetime({}),updated_at:e.iso.datetime({})});var Oe={};j(Oe,{GenerateFursInternalActDocxHeader:()=>mve,GenerateFursInternalActPdfHeader:()=>pve});var pve=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),mve=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")});var Fe={};j(Fe,{CloseFursBusinessPremiseHeader:()=>Sve,CloseFursBusinessPremiseParams:()=>Eve,CloseFursBusinessPremiseResponse:()=>Dve,GetFursBusinessPremiseHeader:()=>bve,GetFursBusinessPremiseParams:()=>hve,GetFursBusinessPremiseResponse:()=>xve,ListFursBusinessPremisesHeader:()=>gve,ListFursBusinessPremisesResponse:()=>yve,ListFursBusinessPremisesResponseItem:()=>C1,RegisterFursMovablePremiseBody:()=>Rve,RegisterFursMovablePremiseHeader:()=>fve,RegisterFursMovablePremiseResponse:()=>Ive,RegisterFursRealEstatePremiseBody:()=>_ve,RegisterFursRealEstatePremiseHeader:()=>zve,RegisterFursRealEstatePremiseResponse:()=>vve,registerFursMovablePremiseBodyBusinessPremiseNameMax:()=>G1,registerFursRealEstatePremiseBodyBusinessPremiseNameMax:()=>A1,registerFursRealEstatePremiseBodyRealEstateBuildingNumberRegExp:()=>T1,registerFursRealEstatePremiseBodyRealEstateBuildingSectionRegExp:()=>k1,registerFursRealEstatePremiseBodyRealEstateCadastralNumberRegExp:()=>M1,registerFursRealEstatePremiseBodyRealEstateCityMax:()=>U1,registerFursRealEstatePremiseBodyRealEstateCommunityMax:()=>F1,registerFursRealEstatePremiseBodyRealEstateHouseNumberAdditionalMax:()=>O1,registerFursRealEstatePremiseBodyRealEstateHouseNumberMax:()=>N1,registerFursRealEstatePremiseBodyRealEstatePostalCodeMax:()=>q1,registerFursRealEstatePremiseBodyRealEstatePostalCodeMin:()=>j1,registerFursRealEstatePremiseBodyRealEstatePostalCodeRegExp:()=>W1,registerFursRealEstatePremiseBodyRealEstateStreetMax:()=>B1});var gve=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),C1=e.object({id:e.string(),entity_id:e.string(),business_premise_name:e.string(),type:e.string(),real_estate:e.object({cadastral_number:e.string(),building_number:e.string().nullable(),building_section:e.string().nullable(),community:e.string(),street:e.string().nullable(),house_number:e.string().nullable(),house_number_additional:e.string().nullable(),city:e.string().nullable(),postal_code:e.string().nullable()}).nullable(),movable_premise:e.object({type:e.string()}).nullable(),is_active:e.boolean(),registered_at:e.iso.datetime({}),closed_at:e.iso.datetime({}).nullable(),created_at:e.iso.datetime({}),updated_at:e.iso.datetime({}),Devices:e.array(e.object({id:e.string(),business_premise_id:e.string(),electronic_device_name:e.string(),is_active:e.boolean(),registered_at:e.iso.datetime({}).nullable(),created_at:e.iso.datetime({}),updated_at:e.iso.datetime({})})).optional()}),yve=e.array(C1),hve=e.object({id:e.string().describe("Business premise ID")}),bve=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),xve=e.object({id:e.string(),entity_id:e.string(),business_premise_name:e.string(),type:e.string(),real_estate:e.object({cadastral_number:e.string(),building_number:e.string().nullable(),building_section:e.string().nullable(),community:e.string(),street:e.string().nullable(),house_number:e.string().nullable(),house_number_additional:e.string().nullable(),city:e.string().nullable(),postal_code:e.string().nullable()}).nullable(),movable_premise:e.object({type:e.string()}).nullable(),is_active:e.boolean(),registered_at:e.iso.datetime({}),closed_at:e.iso.datetime({}).nullable(),created_at:e.iso.datetime({}),updated_at:e.iso.datetime({}),Devices:e.array(e.object({id:e.string(),business_premise_id:e.string(),electronic_device_name:e.string(),is_active:e.boolean(),registered_at:e.iso.datetime({}).nullable(),created_at:e.iso.datetime({}),updated_at:e.iso.datetime({})})).optional()}),zve=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),A1=20,M1=/^\d+$/,T1=/^\d+$/,k1=/^\d+$/,B1=100,N1=10,O1=10,F1=100,U1=100,j1=4,q1=4,W1=/^\d{4}$/,_ve=e.object({business_premise_name:e.string().min(1).max(A1).describe("Business premise name/identifier (e.g., 'P1', 'TRGOVINA1')"),real_estate:e.object({cadastral_number:e.string().min(1).regex(M1).describe("Cadastral number of the property (required, numeric, max 9999)"),building_number:e.string().min(1).regex(T1).describe("Building number (required, numeric, max 99999)"),building_section:e.string().min(1).regex(k1).describe("Building section number (required, numeric, max 9999)"),street:e.string().min(1).max(B1).describe("Street name (required, max 100 chars)"),house_number:e.string().min(1).max(N1).describe("House number (required, max 10 chars)"),house_number_additional:e.string().max(O1).nullish().describe("Additional house number suffix (optional, max 10 chars)"),community:e.string().min(1).max(F1).describe("Community / ob\u010Dina name (required, max 100 chars)"),city:e.string().min(1).max(U1).describe("City name (required, max 100 chars)"),postal_code:e.string().min(j1).max(q1).regex(W1).describe("Postal code (required, exactly 4 digits)")}).describe("Real estate (physical location) details")}),vve=e.object({success:e.boolean().describe("Operation success status"),message:e.string().describe("Success message"),business_premise_name:e.string().describe("Registered business premise name"),environment:e.enum(["test","production"]).describe("FURS environment used")}),fve=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),G1=20,Rve=e.object({business_premise_name:e.string().min(1).max(G1).describe("Business premise name/identifier (e.g., 'VEHICLE1', 'STALL2')"),movable_premise:e.object({premise_type:e.enum(["A","B","C"]).describe("Type of movable premise: A=vehicle, B=market stall, C=vending machine")}).describe("Movable premise details")}),Ive=e.object({success:e.boolean().describe("Operation success status"),message:e.string().describe("Success message"),business_premise_name:e.string().describe("Registered business premise name"),environment:e.enum(["test","production"]).describe("FURS environment used")}),Eve=e.object({id:e.string().describe("Business premise ID")}),Sve=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),Dve=e.object({success:e.boolean().describe("Operation success status"),message:e.string().describe("Success message"),business_premise_name:e.string().describe("Registered business premise name"),environment:e.enum(["test","production"]).describe("FURS environment used")});var Ue={};j(Ue,{GetFursSettingsHeader:()=>Pve,GetFursSettingsResponse:()=>wve,UpdateFursSettingsBody:()=>Ave,UpdateFursSettingsHeader:()=>Cve,UpdateFursSettingsResponse:()=>Mve});var Pve=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),wve=e.object({enabled:e.boolean().describe("Whether FURS fiscalization is enabled"),default_skip_fiscalization:e.boolean().describe("Whether new FURS-capable documents skip fiscalization by default"),numbering_strategy:e.enum(["B","C"]).optional().describe("Numbering strategy"),operator_tax_number:e.string().optional().describe("Operator tax number"),operator_label:e.string().optional().describe("Operator label"),certificate_expiry:e.iso.datetime({}).optional().describe("Certificate expiration date"),has_certificate:e.boolean().describe("Whether a certificate is uploaded"),certificate_status:e.enum(["valid","expiring_soon","expired","missing"]).optional().describe("Certificate status")}),Cve=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),Ave=e.object({enabled:e.boolean().optional().describe("Enable/disable FURS fiscalization"),default_skip_fiscalization:e.boolean().optional().describe("When true, new FURS-capable documents start with fiscalization skipped by default. Payment type still controls the final state and non-bank-transfer payments force fiscalization back on."),numbering_strategy:e.enum(["B","C"]).optional().describe("Numbering strategy: B (device-level) or C (centralized)"),operator_tax_number:e.string().optional().describe("Operator tax number for API key usage"),operator_label:e.string().optional().describe("Operator label/name")}),Mve=e.object({enabled:e.boolean().describe("Whether FURS fiscalization is enabled"),default_skip_fiscalization:e.boolean().describe("Whether new FURS-capable documents skip fiscalization by default"),numbering_strategy:e.enum(["B","C"]).optional().describe("Numbering strategy"),operator_tax_number:e.string().optional().describe("Operator tax number"),operator_label:e.string().optional().describe("Operator label"),certificate_expiry:e.iso.datetime({}).optional().describe("Certificate expiration date"),has_certificate:e.boolean().describe("Whether a certificate is uploaded"),certificate_status:e.enum(["valid","expiring_soon","expired","missing"]).optional().describe("Certificate status")});var je={};j(je,{CreateCustomIncomingPurchaseDocumentBody:()=>Uve,CreateCustomIncomingPurchaseDocumentHeader:()=>Fve,CreateIncomingPurchaseDocumentBody:()=>kve,CreateIncomingPurchaseDocumentHeader:()=>Tve,CreateIncomingPurchaseDocumentPaymentBody:()=>ife,CreateIncomingPurchaseDocumentPaymentHeader:()=>rfe,CreateIncomingPurchaseDocumentPaymentParams:()=>sfe,DeleteIncomingPurchaseDocumentAttachmentHeader:()=>efe,DeleteIncomingPurchaseDocumentAttachmentParams:()=>Xve,GetIncomingPurchaseDocumentAttachmentsHeader:()=>Jve,GetIncomingPurchaseDocumentAttachmentsParams:()=>Qve,GetIncomingPurchaseDocumentAttachmentsResponse:()=>Zve,GetIncomingPurchaseDocumentByIdHeader:()=>qve,GetIncomingPurchaseDocumentByIdParams:()=>jve,GetIncomingPurchaseDocumentByIdResponse:()=>Wve,GetIncomingPurchaseDocumentPaymentsHeader:()=>ofe,GetIncomingPurchaseDocumentPaymentsParams:()=>tfe,GetIncomingPurchaseDocumentPaymentsResponse:()=>nfe,GetIncomingPurchaseDocumentsHeader:()=>Nve,GetIncomingPurchaseDocumentsQueryParams:()=>Bve,GetIncomingPurchaseDocumentsResponse:()=>Ove,UpdateIncomingPurchaseDocumentBody:()=>Lve,UpdateIncomingPurchaseDocumentHeader:()=>Vve,UpdateIncomingPurchaseDocumentParams:()=>Gve,UpdateIncomingPurchaseDocumentResponse:()=>Hve,UploadIncomingPurchaseDocumentAttachmentBody:()=>$ve,UploadIncomingPurchaseDocumentAttachmentHeader:()=>Kve,UploadIncomingPurchaseDocumentAttachmentParams:()=>Yve,createCustomIncomingPurchaseDocumentBodyCurrencyCodeMax:()=>WF,createCustomIncomingPurchaseDocumentBodyCurrencyCodeMin:()=>qF,createCustomIncomingPurchaseDocumentBodyDateDueRegExp:()=>FF,createCustomIncomingPurchaseDocumentBodyDateReceivedRegExp:()=>OF,createCustomIncomingPurchaseDocumentBodyDateRegExp:()=>NF,createCustomIncomingPurchaseDocumentBodyDateServiceRegExp:()=>UF,createCustomIncomingPurchaseDocumentBodyDateServiceToRegExp:()=>jF,createCustomIncomingPurchaseDocumentBodyItemsItemDiscountsDefault:()=>LF,createCustomIncomingPurchaseDocumentBodyItemsItemDiscountsItemTypeDefault:()=>VF,createCustomIncomingPurchaseDocumentBodyItemsItemDiscountsItemValueMin:()=>GF,createCustomIncomingPurchaseDocumentBodyItemsItemTaxesDefault:()=>HF,createCustomIncomingPurchaseDocumentBodySupplierCountryCodeMax:()=>BF,createCustomIncomingPurchaseDocumentBodySupplierCountryCodeMin:()=>kF,createIncomingPurchaseDocumentBodyCurrencyCodeMax:()=>Z1,createIncomingPurchaseDocumentBodyCurrencyCodeMin:()=>J1,createIncomingPurchaseDocumentBodyDateDueRegExp:()=>K1,createIncomingPurchaseDocumentBodyDateReceivedRegExp:()=>Y1,createIncomingPurchaseDocumentBodyDateRegExp:()=>H1,createIncomingPurchaseDocumentBodyDateServiceRegExp:()=>$1,createIncomingPurchaseDocumentBodyDateServiceToRegExp:()=>Q1,createIncomingPurchaseDocumentBodyItemsItemDiscountsDefault:()=>tF,createIncomingPurchaseDocumentBodyItemsItemDiscountsItemTypeDefault:()=>eF,createIncomingPurchaseDocumentBodyItemsItemDiscountsItemValueMin:()=>X1,createIncomingPurchaseDocumentBodyItemsItemTaxesDefault:()=>oF,createIncomingPurchaseDocumentBodySupplierCountryCodeMax:()=>L1,createIncomingPurchaseDocumentBodySupplierCountryCodeMin:()=>V1,createIncomingPurchaseDocumentPaymentBodyAmountExclusiveMin:()=>uq,createIncomingPurchaseDocumentPaymentBodyAppliedToIncomingPurchaseDocumentIdMax:()=>lq,createIncomingPurchaseDocumentPaymentBodyNoteMax:()=>gq,createIncomingPurchaseDocumentPaymentBodyReferenceMax:()=>mq,createIncomingPurchaseDocumentPaymentBodyTagMax:()=>pq,getIncomingPurchaseDocumentAttachmentsResponseDataItemOneAdvanceInvoiceIdMax:()=>bj,getIncomingPurchaseDocumentAttachmentsResponseDataItemOneBytesMax:()=>wj,getIncomingPurchaseDocumentAttachmentsResponseDataItemOneBytesMin:()=>Pj,getIncomingPurchaseDocumentAttachmentsResponseDataItemOneCacheKeyMax:()=>Mj,getIncomingPurchaseDocumentAttachmentsResponseDataItemOneCategoryMax:()=>zj,getIncomingPurchaseDocumentAttachmentsResponseDataItemOneCreditNoteIdMax:()=>hj,getIncomingPurchaseDocumentAttachmentsResponseDataItemOneEntityIdMax:()=>mj,getIncomingPurchaseDocumentAttachmentsResponseDataItemOneEstimateIdMax:()=>yj,getIncomingPurchaseDocumentAttachmentsResponseDataItemOneFilenameMax:()=>Cj,getIncomingPurchaseDocumentAttachmentsResponseDataItemOneFormatMax:()=>Rj,getIncomingPurchaseDocumentAttachmentsResponseDataItemOneHeightMax:()=>Dj,getIncomingPurchaseDocumentAttachmentsResponseDataItemOneHeightMin:()=>Sj,getIncomingPurchaseDocumentAttachmentsResponseDataItemOneIdMax:()=>pj,getIncomingPurchaseDocumentAttachmentsResponseDataItemOneIncomingPurchaseDocumentIdMax:()=>xj,getIncomingPurchaseDocumentAttachmentsResponseDataItemOneInvoiceIdMax:()=>gj,getIncomingPurchaseDocumentAttachmentsResponseDataItemOneMimeTypeMax:()=>Aj,getIncomingPurchaseDocumentAttachmentsResponseDataItemOnePublicIdMax:()=>fj,getIncomingPurchaseDocumentAttachmentsResponseDataItemOneSecureUrlMax:()=>vj,getIncomingPurchaseDocumentAttachmentsResponseDataItemOneUrlMax:()=>_j,getIncomingPurchaseDocumentAttachmentsResponseDataItemOneWidthMax:()=>Ej,getIncomingPurchaseDocumentAttachmentsResponseDataItemOneWidthMin:()=>Ij,getIncomingPurchaseDocumentByIdPathIdRegExp:()=>YF,getIncomingPurchaseDocumentByIdResponseCurrencyCodeMax:()=>rU,getIncomingPurchaseDocumentByIdResponseDateDueRegExp:()=>oU,getIncomingPurchaseDocumentByIdResponseDateReceivedRegExp:()=>tU,getIncomingPurchaseDocumentByIdResponseDateRegExp:()=>eU,getIncomingPurchaseDocumentByIdResponseDateServiceRegExp:()=>nU,getIncomingPurchaseDocumentByIdResponseDateServiceToRegExp:()=>sU,getIncomingPurchaseDocumentByIdResponseEntityIdMax:()=>$F,getIncomingPurchaseDocumentByIdResponseIdMax:()=>KF,getIncomingPurchaseDocumentByIdResponseItemsItemDiscountsDefault:()=>uU,getIncomingPurchaseDocumentByIdResponseItemsItemDiscountsItemTypeDefault:()=>lU,getIncomingPurchaseDocumentByIdResponseItemsItemDiscountsItemValueMin:()=>cU,getIncomingPurchaseDocumentByIdResponseItemsItemTaxesDefault:()=>pU,getIncomingPurchaseDocumentByIdResponseNoteMax:()=>dU,getIncomingPurchaseDocumentByIdResponseReferenceMax:()=>aU,getIncomingPurchaseDocumentByIdResponseSupplierCountryCodeMax:()=>ZF,getIncomingPurchaseDocumentByIdResponseSupplierCountryCodeMin:()=>JF,getIncomingPurchaseDocumentByIdResponseSupplierDocumentNumberMax:()=>XF,getIncomingPurchaseDocumentByIdResponseSupplierIdMax:()=>QF,getIncomingPurchaseDocumentByIdResponseTotalDiscountMax:()=>xU,getIncomingPurchaseDocumentByIdResponseTotalDiscountMin:()=>bU,getIncomingPurchaseDocumentByIdResponseTotalDueMax:()=>fU,getIncomingPurchaseDocumentByIdResponseTotalDueMin:()=>vU,getIncomingPurchaseDocumentByIdResponseTotalMax:()=>gU,getIncomingPurchaseDocumentByIdResponseTotalMin:()=>mU,getIncomingPurchaseDocumentByIdResponseTotalPaidMax:()=>_U,getIncomingPurchaseDocumentByIdResponseTotalPaidMin:()=>zU,getIncomingPurchaseDocumentByIdResponseTotalWithTaxMax:()=>hU,getIncomingPurchaseDocumentByIdResponseTotalWithTaxMin:()=>yU,getIncomingPurchaseDocumentByIdResponseTransactionTypeMax:()=>iU,getIncomingPurchaseDocumentPaymentsResponseDataItemAdvanceInvoiceIdMax:()=>Nj,getIncomingPurchaseDocumentPaymentsResponseDataItemAdvanceInvoiceIdMaxOne:()=>Zj,getIncomingPurchaseDocumentPaymentsResponseDataItemAdvanceInvoiceNumberMax:()=>Xj,getIncomingPurchaseDocumentPaymentsResponseDataItemAmountConvertedMax:()=>Gj,getIncomingPurchaseDocumentPaymentsResponseDataItemAmountConvertedMin:()=>Wj,getIncomingPurchaseDocumentPaymentsResponseDataItemAmountMax:()=>jj,getIncomingPurchaseDocumentPaymentsResponseDataItemAmountMin:()=>Uj,getIncomingPurchaseDocumentPaymentsResponseDataItemAppliedToIncomingPurchaseDocumentDateRegExp:()=>aq,getIncomingPurchaseDocumentPaymentsResponseDataItemAppliedToIncomingPurchaseDocumentIdMax:()=>Fj,getIncomingPurchaseDocumentPaymentsResponseDataItemAppliedToIncomingPurchaseDocumentIdMaxOne:()=>rq,getIncomingPurchaseDocumentPaymentsResponseDataItemAppliedToIncomingPurchaseDocumentSupplierDocumentNumberMax:()=>iq,getIncomingPurchaseDocumentPaymentsResponseDataItemAppliedToIncomingPurchaseDocumentTotalWithTaxMax:()=>cq,getIncomingPurchaseDocumentPaymentsResponseDataItemAppliedToIncomingPurchaseDocumentTotalWithTaxMin:()=>dq,getIncomingPurchaseDocumentPaymentsResponseDataItemCreditNoteIdMax:()=>Bj,getIncomingPurchaseDocumentPaymentsResponseDataItemCreditNoteIdMaxOne:()=>Qj,getIncomingPurchaseDocumentPaymentsResponseDataItemCreditNoteNumberMax:()=>Jj,getIncomingPurchaseDocumentPaymentsResponseDataItemCurrencyCodeMax:()=>qj,getIncomingPurchaseDocumentPaymentsResponseDataItemEntityIdMax:()=>Yj,getIncomingPurchaseDocumentPaymentsResponseDataItemIdMax:()=>Tj,getIncomingPurchaseDocumentPaymentsResponseDataItemIncomingPurchaseDocumentDateRegExp:()=>oq,getIncomingPurchaseDocumentPaymentsResponseDataItemIncomingPurchaseDocumentIdMax:()=>Oj,getIncomingPurchaseDocumentPaymentsResponseDataItemIncomingPurchaseDocumentIdMaxOne:()=>eq,getIncomingPurchaseDocumentPaymentsResponseDataItemIncomingPurchaseDocumentSupplierDocumentNumberMax:()=>tq,getIncomingPurchaseDocumentPaymentsResponseDataItemIncomingPurchaseDocumentTotalWithTaxMax:()=>sq,getIncomingPurchaseDocumentPaymentsResponseDataItemIncomingPurchaseDocumentTotalWithTaxMin:()=>nq,getIncomingPurchaseDocumentPaymentsResponseDataItemInvoiceIdMax:()=>kj,getIncomingPurchaseDocumentPaymentsResponseDataItemInvoiceIdMaxOne:()=>Kj,getIncomingPurchaseDocumentPaymentsResponseDataItemInvoiceNumberMax:()=>$j,getIncomingPurchaseDocumentPaymentsResponseDataItemNoteMax:()=>Hj,getIncomingPurchaseDocumentPaymentsResponseDataItemReferenceMax:()=>Lj,getIncomingPurchaseDocumentPaymentsResponseDataItemTagMax:()=>Vj,getIncomingPurchaseDocumentsQueryLimitDefault:()=>nF,getIncomingPurchaseDocumentsQueryLimitMax:()=>sF,getIncomingPurchaseDocumentsResponseDataItemCurrencyCodeMax:()=>hF,getIncomingPurchaseDocumentsResponseDataItemDateDueRegExp:()=>mF,getIncomingPurchaseDocumentsResponseDataItemDateReceivedRegExp:()=>pF,getIncomingPurchaseDocumentsResponseDataItemDateRegExp:()=>uF,getIncomingPurchaseDocumentsResponseDataItemDateServiceRegExp:()=>gF,getIncomingPurchaseDocumentsResponseDataItemDateServiceToRegExp:()=>yF,getIncomingPurchaseDocumentsResponseDataItemEntityIdMax:()=>iF,getIncomingPurchaseDocumentsResponseDataItemIdMax:()=>rF,getIncomingPurchaseDocumentsResponseDataItemItemsItemDiscountsDefault:()=>fF,getIncomingPurchaseDocumentsResponseDataItemItemsItemDiscountsItemTypeDefault:()=>vF,getIncomingPurchaseDocumentsResponseDataItemItemsItemDiscountsItemValueMin:()=>_F,getIncomingPurchaseDocumentsResponseDataItemItemsItemTaxesDefault:()=>RF,getIncomingPurchaseDocumentsResponseDataItemNoteMax:()=>zF,getIncomingPurchaseDocumentsResponseDataItemReferenceMax:()=>xF,getIncomingPurchaseDocumentsResponseDataItemSupplierCountryCodeMax:()=>cF,getIncomingPurchaseDocumentsResponseDataItemSupplierCountryCodeMin:()=>dF,getIncomingPurchaseDocumentsResponseDataItemSupplierDocumentNumberMax:()=>lF,getIncomingPurchaseDocumentsResponseDataItemSupplierIdMax:()=>aF,getIncomingPurchaseDocumentsResponseDataItemTotalDiscountMax:()=>wF,getIncomingPurchaseDocumentsResponseDataItemTotalDiscountMin:()=>PF,getIncomingPurchaseDocumentsResponseDataItemTotalDueMax:()=>TF,getIncomingPurchaseDocumentsResponseDataItemTotalDueMin:()=>MF,getIncomingPurchaseDocumentsResponseDataItemTotalMax:()=>EF,getIncomingPurchaseDocumentsResponseDataItemTotalMin:()=>IF,getIncomingPurchaseDocumentsResponseDataItemTotalPaidMax:()=>AF,getIncomingPurchaseDocumentsResponseDataItemTotalPaidMin:()=>CF,getIncomingPurchaseDocumentsResponseDataItemTotalWithTaxMax:()=>DF,getIncomingPurchaseDocumentsResponseDataItemTotalWithTaxMin:()=>SF,getIncomingPurchaseDocumentsResponseDataItemTransactionTypeMax:()=>bF,updateIncomingPurchaseDocumentBodyCurrencyCodeMax:()=>MU,updateIncomingPurchaseDocumentBodyCurrencyCodeMin:()=>AU,updateIncomingPurchaseDocumentBodyDateDueRegExp:()=>PU,updateIncomingPurchaseDocumentBodyDateReceivedRegExp:()=>DU,updateIncomingPurchaseDocumentBodyDateRegExp:()=>SU,updateIncomingPurchaseDocumentBodyDateServiceRegExp:()=>wU,updateIncomingPurchaseDocumentBodyDateServiceToRegExp:()=>CU,updateIncomingPurchaseDocumentBodyItemsItemDiscountsDefault:()=>BU,updateIncomingPurchaseDocumentBodyItemsItemDiscountsItemTypeDefault:()=>kU,updateIncomingPurchaseDocumentBodyItemsItemDiscountsItemValueMin:()=>TU,updateIncomingPurchaseDocumentBodyItemsItemTaxesDefault:()=>NU,updateIncomingPurchaseDocumentBodySupplierCountryCodeMax:()=>EU,updateIncomingPurchaseDocumentBodySupplierCountryCodeMin:()=>IU,updateIncomingPurchaseDocumentPathIdRegExp:()=>RU,updateIncomingPurchaseDocumentResponseCurrencyCodeMax:()=>KU,updateIncomingPurchaseDocumentResponseDateDueRegExp:()=>LU,updateIncomingPurchaseDocumentResponseDateReceivedRegExp:()=>VU,updateIncomingPurchaseDocumentResponseDateRegExp:()=>GU,updateIncomingPurchaseDocumentResponseDateServiceRegExp:()=>HU,updateIncomingPurchaseDocumentResponseDateServiceToRegExp:()=>YU,updateIncomingPurchaseDocumentResponseEntityIdMax:()=>FU,updateIncomingPurchaseDocumentResponseIdMax:()=>OU,updateIncomingPurchaseDocumentResponseItemsItemDiscountsDefault:()=>ej,updateIncomingPurchaseDocumentResponseItemsItemDiscountsItemTypeDefault:()=>XU,updateIncomingPurchaseDocumentResponseItemsItemDiscountsItemValueMin:()=>ZU,updateIncomingPurchaseDocumentResponseItemsItemTaxesDefault:()=>tj,updateIncomingPurchaseDocumentResponseNoteMax:()=>JU,updateIncomingPurchaseDocumentResponseReferenceMax:()=>QU,updateIncomingPurchaseDocumentResponseSupplierCountryCodeMax:()=>qU,updateIncomingPurchaseDocumentResponseSupplierCountryCodeMin:()=>jU,updateIncomingPurchaseDocumentResponseSupplierDocumentNumberMax:()=>WU,updateIncomingPurchaseDocumentResponseSupplierIdMax:()=>UU,updateIncomingPurchaseDocumentResponseTotalDiscountMax:()=>aj,updateIncomingPurchaseDocumentResponseTotalDiscountMin:()=>ij,updateIncomingPurchaseDocumentResponseTotalDueMax:()=>uj,updateIncomingPurchaseDocumentResponseTotalDueMin:()=>lj,updateIncomingPurchaseDocumentResponseTotalMax:()=>nj,updateIncomingPurchaseDocumentResponseTotalMin:()=>oj,updateIncomingPurchaseDocumentResponseTotalPaidMax:()=>cj,updateIncomingPurchaseDocumentResponseTotalPaidMin:()=>dj,updateIncomingPurchaseDocumentResponseTotalWithTaxMax:()=>rj,updateIncomingPurchaseDocumentResponseTotalWithTaxMin:()=>sj,updateIncomingPurchaseDocumentResponseTransactionTypeMax:()=>$U});var Tve=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),V1=2,L1=2,H1=/^\d{4}-\d{2}-\d{2}$/,Y1=/^\d{4}-\d{2}-\d{2}$/,K1=/^\d{4}-\d{2}-\d{2}$/,$1=/^\d{4}-\d{2}-\d{2}$/,Q1=/^\d{4}-\d{2}-\d{2}$/,J1=3,Z1=3,X1=0,eF="percent",tF=[],oF=[],kve=e.object({type:e.enum(["invoice","credit_note","advance_invoice"]),is_draft:e.boolean().nullish(),supplier_id:e.string().nullish(),supplier:e.object({name:e.string().min(1),email:e.email().nullish(),address:e.string().nullish(),address_2:e.string().nullish(),post_code:e.string().nullish(),city:e.string().nullish(),state:e.string().nullish(),country:e.string().nullish(),country_code:e.string().min(V1).max(L1).nullish(),tax_number:e.string().nullish(),company_number:e.string().nullish(),phone:e.string().nullish(),peppol_id:e.string().nullish(),is_tax_subject:e.boolean().nullish()}).nullish(),save_supplier:e.boolean().nullish(),supplier_document_number:e.string().min(1).nullish(),date:e.string().regex(H1).nullish(),date_received:e.string().regex(Y1).nullish(),date_due:e.string().regex(K1).nullish(),date_service:e.string().regex($1).nullish(),date_service_to:e.string().regex(Q1).nullish(),currency_code:e.string().min(J1).max(Z1).nullish(),transaction_type:e.union([e.literal("domestic"),e.literal("intra_eu_b2b"),e.literal("intra_eu_b2c"),e.literal("3w_b2b"),e.literal("3w_b2c"),e.literal("export"),e.literal(null)]).nullish(),reference:e.string().nullish(),note:e.string().nullish(),items:e.array(e.object({name:e.string().min(1),description:e.string().nullish(),quantity:e.number(),unit:e.string().nullish(),classification:e.enum(["product","service"]),price:e.number(),gross_price:e.number().nullish(),discounts:e.array(e.object({value:e.number().min(X1).describe("Discount value"),type:e.enum(["percent","amount"]).default(eF).describe("Discount type: 'percent' (default) or 'amount'")})).default(tF),taxes:e.array(e.object({rate:e.number().nullish(),tax_id:e.string().nullish(),classification:e.string().nullish(),reverse_charge:e.boolean().nullish(),amount:e.number().nullish(),pt_exemption_code:e.string().nullish(),pt_exemption_reason:e.string().nullish()}).describe("Document Item Tax")).default(oF),total:e.number(),total_with_tax:e.number(),total_tax:e.number()})).nullish(),taxes:e.array(e.object({rate:e.number().nullable(),tax_id:e.string().nullish(),base:e.number(),total_tax:e.number(),reverse_charged:e.boolean().nullish().describe("Whether the tax is self-assessed/reverse charged and should not be added to gross total."),is_deductible:e.boolean().nullish().describe("Whether VAT on this tax line is deductible for AP bookkeeping.")})).nullish(),total:e.number().nullish(),total_with_tax:e.number().nullish(),total_discount:e.number().nullish(),exchange_rate:e.object({rate:e.number().describe("Exchange rate used for conversion"),source:e.string().describe("Source of the exchange rate (e.g., 'Frankfurter')"),date:e.iso.datetime({}).describe("Date of the exchange rate"),quote_currency:e.string().describe("Quote currency (the base currency converted to)")}).nullish().describe("Currency exchange rate information if conversion was applied"),summary_classification:e.union([e.literal("goods"),e.literal("services"),e.literal(null)]).nullish(),cancelled_at:e.iso.datetime({}).nullish(),metadata:e.record(e.string(),e.string()).nullish().describe("Custom key-value data for your own use. Store any JSON object up to 50 properties. Values must be strings up to 250 characters. Useful for storing external IDs, tags, or integration data.")}),nF=10,sF=100,Bve=e.object({limit:e.number().min(1).max(sF).default(nF).describe("Number of results per request."),next_cursor:e.string().optional().describe("Opaque cursor to fetch the next page of results. Reuse only with the same effective ordering. Use the value from pagination.next_cursor in the previous response."),prev_cursor:e.string().optional().describe("Opaque cursor to fetch the previous page of results. Reuse only with the same effective ordering. Use the value from pagination.prev_cursor in the previous response."),include_total_count:e.boolean().optional().describe("Whether to include the total count of items in `pagination.total`.\nDefault is `true`.\nWhen `false`, `pagination.total` returns -1 for better performance."),query:e.string().optional().describe('JSON query object for filtering results. Supports MongoDB-style operators.\n\n**Supported operators:**\n- `equals` or direct value - Exact match (default)\n- `gte` - Greater than or equal\n- `lte` - Less than or equal\n- `gt` - Greater than\n- `lt` - Less than\n- `in` - Value in array\n- `notIn` - Value not in array\n- `contains` - String contains (case-insensitive)\n- `startsWith` - String starts with\n- `endsWith` - String ends with\n- `between` - Value between two numbers/dates [min, max]\n\n**Allowed fields:** id, type, is_draft, cancelled_at, supplier_id, supplier, supplier_document_number, date, date_received, date_due, date_service, date_service_to, currency_code, transaction_type, reference, note, summary_classification, total, total_with_tax, total_paid, total_due, paid_in_full, created_at, updated_at, metadata\n\n**Examples:**\n- `{"total": {"gte": 1000}}` - Invoices over 1000\n- `{"customer.name": {"contains": "Acme"}}` - Customer name contains "Acme"\n- `{"date": {"between": ["2025-01-01", "2025-12-31"]}}` - Date range'),search:e.string().optional().describe(`Full-text search query to filter results across multiple fields.
|
|
178
|
+
Searches are case-insensitive and match partial strings.
|
|
179
|
+
Searches across all text fields including names, descriptions, addresses, and metadata values.`)}),Nve=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),rF=36,iF=36,aF=36,dF=2,cF=2,lF=255,uF=/^\d{4}-\d{2}-\d{2}$/,pF=/^\d{4}-\d{2}-\d{2}$/,mF=/^\d{4}-\d{2}-\d{2}$/,gF=/^\d{4}-\d{2}-\d{2}$/,yF=/^\d{4}-\d{2}-\d{2}$/,hF=3,bF=50,xF=100,zF=2e3,_F=0,vF="percent",fF=[],RF=[],IF=-140737488355328,EF=0x7fffffffffff,SF=-140737488355328,DF=0x7fffffffffff,PF=-140737488355328,wF=0x7fffffffffff,CF=-140737488355328,AF=0x7fffffffffff,MF=-140737488355328,TF=0x7fffffffffff,Ove=e.object({data:e.array(e.object({id:e.string().max(rF),entity_id:e.string().max(iF),supplier_id:e.string().max(aF).nullish(),type:e.enum(["invoice","credit_note","advance_invoice"]),is_draft:e.boolean(),cancelled_at:e.iso.datetime({}).nullish(),supplier:e.object({name:e.string().min(1),email:e.email().nullish(),address:e.string().nullish(),address_2:e.string().nullish(),post_code:e.string().nullish(),city:e.string().nullish(),state:e.string().nullish(),country:e.string().nullish(),country_code:e.string().min(dF).max(cF).nullish(),tax_number:e.string().nullish(),company_number:e.string().nullish(),phone:e.string().nullish(),peppol_id:e.string().nullish(),is_tax_subject:e.boolean().nullish()}).nullish(),supplier_document_number:e.string().max(lF).nullish(),date:e.string().regex(uF).nullish(),date_received:e.string().regex(pF).nullish(),date_due:e.string().regex(mF).nullish(),date_service:e.string().regex(gF).nullish(),date_service_to:e.string().regex(yF).nullish(),currency_code:e.string().max(hF).nullish(),transaction_type:e.string().max(bF).nullish(),reference:e.string().max(xF).nullish(),note:e.string().max(zF).nullish(),summary_classification:e.union([e.literal("goods"),e.literal("services"),e.literal(null)]).nullish(),items:e.array(e.object({name:e.string().min(1),description:e.string().nullish(),quantity:e.number(),unit:e.string().nullish(),classification:e.enum(["product","service"]),price:e.number(),gross_price:e.number().nullish(),discounts:e.array(e.object({value:e.number().min(_F).describe("Discount value"),type:e.enum(["percent","amount"]).default(vF).describe("Discount type: 'percent' (default) or 'amount'")})).default(fF),taxes:e.array(e.object({rate:e.number().nullish(),tax_id:e.string().nullish(),classification:e.string().nullish(),reverse_charge:e.boolean().nullish(),amount:e.number().nullish(),pt_exemption_code:e.string().nullish(),pt_exemption_reason:e.string().nullish()}).describe("Document Item Tax")).default(RF),total:e.number(),total_with_tax:e.number(),total_tax:e.number()})),taxes:e.array(e.object({rate:e.number().nullable(),tax_id:e.string().nullish(),base:e.number(),total_tax:e.number(),reverse_charged:e.boolean().nullish().describe("Whether the tax is self-assessed/reverse charged and should not be added to gross total."),is_deductible:e.boolean().nullish().describe("Whether VAT on this tax line is deductible for AP bookkeeping.")})),total:e.number().min(IF).max(EF).nullish(),total_with_tax:e.number().min(SF).max(DF).nullish(),total_discount:e.number().min(PF).max(wF),total_paid:e.number().min(CF).max(AF),total_due:e.number().min(MF).max(TF),paid_in_full:e.boolean(),exchange_rate:e.object({rate:e.number().describe("Exchange rate used for conversion"),source:e.string().describe("Source of the exchange rate (e.g., 'Frankfurter')"),date:e.iso.datetime({}).describe("Date of the exchange rate"),quote_currency:e.string().describe("Quote currency (the base currency converted to)")}).nullish().describe("Currency exchange rate information if conversion was applied"),metadata:e.union([e.string(),e.number(),e.boolean(),e.null(),e.record(e.string(),e.unknown()),e.array(e.unknown())]),created_at:e.iso.datetime({}),updated_at:e.iso.datetime({})}).describe("Incoming purchase document")),pagination:e.object({total:e.number().describe("Total number of items available in the collection"),next_cursor:e.string().nullable().describe("Opaque cursor for fetching the next page. It encodes the resolved sort tuple for the current result set, so reuse it only with the same effective ordering. Null if no more results are available."),prev_cursor:e.string().nullable().describe("Opaque cursor for fetching the previous page. It encodes the resolved sort tuple for the current result set, so reuse it only with the same effective ordering. Null if at the first page."),has_more:e.boolean().describe("Indicates whether more results are available after the current page")}).describe("Pagination metadata including cursors and result counts")}),Fve=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),kF=2,BF=2,NF=/^\d{4}-\d{2}-\d{2}$/,OF=/^\d{4}-\d{2}-\d{2}$/,FF=/^\d{4}-\d{2}-\d{2}$/,UF=/^\d{4}-\d{2}-\d{2}$/,jF=/^\d{4}-\d{2}-\d{2}$/,qF=3,WF=3,GF=0,VF="percent",LF=[],HF=[],Uve=e.object({type:e.enum(["invoice","credit_note","advance_invoice"]),is_draft:e.boolean().nullish(),supplier_id:e.string().nullish(),supplier:e.object({name:e.string().min(1),email:e.email().nullish(),address:e.string().nullish(),address_2:e.string().nullish(),post_code:e.string().nullish(),city:e.string().nullish(),state:e.string().nullish(),country:e.string().nullish(),country_code:e.string().min(kF).max(BF).nullish(),tax_number:e.string().nullish(),company_number:e.string().nullish(),phone:e.string().nullish(),peppol_id:e.string().nullish(),is_tax_subject:e.boolean().nullish()}).nullish(),save_supplier:e.boolean().nullish(),supplier_document_number:e.string().min(1).nullish(),date:e.string().regex(NF).nullish(),date_received:e.string().regex(OF).nullish(),date_due:e.string().regex(FF).nullish(),date_service:e.string().regex(UF).nullish(),date_service_to:e.string().regex(jF).nullish(),currency_code:e.string().min(qF).max(WF).nullish(),transaction_type:e.union([e.literal("domestic"),e.literal("intra_eu_b2b"),e.literal("intra_eu_b2c"),e.literal("3w_b2b"),e.literal("3w_b2c"),e.literal("export"),e.literal(null)]).nullish(),reference:e.string().nullish(),note:e.string().nullish(),items:e.array(e.object({name:e.string().min(1),description:e.string().nullish(),quantity:e.number(),unit:e.string().nullish(),classification:e.enum(["product","service"]),price:e.number(),gross_price:e.number().nullish(),discounts:e.array(e.object({value:e.number().min(GF).describe("Discount value"),type:e.enum(["percent","amount"]).default(VF).describe("Discount type: 'percent' (default) or 'amount'")})).default(LF),taxes:e.array(e.object({rate:e.number().nullish(),tax_id:e.string().nullish(),classification:e.string().nullish(),reverse_charge:e.boolean().nullish(),amount:e.number().nullish(),pt_exemption_code:e.string().nullish(),pt_exemption_reason:e.string().nullish()}).describe("Document Item Tax")).default(HF),total:e.number(),total_with_tax:e.number(),total_tax:e.number()})).nullish(),taxes:e.array(e.object({rate:e.number().nullable(),tax_id:e.string().nullish(),base:e.number(),total_tax:e.number(),reverse_charged:e.boolean().nullish().describe("Whether the tax is self-assessed/reverse charged and should not be added to gross total."),is_deductible:e.boolean().nullish().describe("Whether VAT on this tax line is deductible for AP bookkeeping.")})).nullish(),total:e.number().nullish(),total_with_tax:e.number().nullish(),total_discount:e.number().nullish(),exchange_rate:e.object({rate:e.number().describe("Exchange rate used for conversion"),source:e.string().describe("Source of the exchange rate (e.g., 'Frankfurter')"),date:e.iso.datetime({}).describe("Date of the exchange rate"),quote_currency:e.string().describe("Quote currency (the base currency converted to)")}).nullish().describe("Currency exchange rate information if conversion was applied"),summary_classification:e.union([e.literal("goods"),e.literal("services"),e.literal(null)]).nullish(),cancelled_at:e.iso.datetime({}).nullish(),metadata:e.record(e.string(),e.string()).nullish().describe("Custom key-value data for your own use. Store any JSON object up to 50 properties. Values must be strings up to 250 characters. Useful for storing external IDs, tags, or integration data.")}),YF=/^[a-z]{3,4}_[0-9a-f]{24}$/,jve=e.object({id:e.stringFormat("resource-id",YF).describe("Unique resource identifier")}),qve=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),KF=36,$F=36,QF=36,JF=2,ZF=2,XF=255,eU=/^\d{4}-\d{2}-\d{2}$/,tU=/^\d{4}-\d{2}-\d{2}$/,oU=/^\d{4}-\d{2}-\d{2}$/,nU=/^\d{4}-\d{2}-\d{2}$/,sU=/^\d{4}-\d{2}-\d{2}$/,rU=3,iU=50,aU=100,dU=2e3,cU=0,lU="percent",uU=[],pU=[],mU=-140737488355328,gU=0x7fffffffffff,yU=-140737488355328,hU=0x7fffffffffff,bU=-140737488355328,xU=0x7fffffffffff,zU=-140737488355328,_U=0x7fffffffffff,vU=-140737488355328,fU=0x7fffffffffff,Wve=e.object({id:e.string().max(KF),entity_id:e.string().max($F),supplier_id:e.string().max(QF).nullish(),type:e.enum(["invoice","credit_note","advance_invoice"]),is_draft:e.boolean(),cancelled_at:e.iso.datetime({}).nullish(),supplier:e.object({name:e.string().min(1),email:e.email().nullish(),address:e.string().nullish(),address_2:e.string().nullish(),post_code:e.string().nullish(),city:e.string().nullish(),state:e.string().nullish(),country:e.string().nullish(),country_code:e.string().min(JF).max(ZF).nullish(),tax_number:e.string().nullish(),company_number:e.string().nullish(),phone:e.string().nullish(),peppol_id:e.string().nullish(),is_tax_subject:e.boolean().nullish()}).nullish(),supplier_document_number:e.string().max(XF).nullish(),date:e.string().regex(eU).nullish(),date_received:e.string().regex(tU).nullish(),date_due:e.string().regex(oU).nullish(),date_service:e.string().regex(nU).nullish(),date_service_to:e.string().regex(sU).nullish(),currency_code:e.string().max(rU).nullish(),transaction_type:e.string().max(iU).nullish(),reference:e.string().max(aU).nullish(),note:e.string().max(dU).nullish(),summary_classification:e.union([e.literal("goods"),e.literal("services"),e.literal(null)]).nullish(),items:e.array(e.object({name:e.string().min(1),description:e.string().nullish(),quantity:e.number(),unit:e.string().nullish(),classification:e.enum(["product","service"]),price:e.number(),gross_price:e.number().nullish(),discounts:e.array(e.object({value:e.number().min(cU).describe("Discount value"),type:e.enum(["percent","amount"]).default(lU).describe("Discount type: 'percent' (default) or 'amount'")})).default(uU),taxes:e.array(e.object({rate:e.number().nullish(),tax_id:e.string().nullish(),classification:e.string().nullish(),reverse_charge:e.boolean().nullish(),amount:e.number().nullish(),pt_exemption_code:e.string().nullish(),pt_exemption_reason:e.string().nullish()}).describe("Document Item Tax")).default(pU),total:e.number(),total_with_tax:e.number(),total_tax:e.number()})),taxes:e.array(e.object({rate:e.number().nullable(),tax_id:e.string().nullish(),base:e.number(),total_tax:e.number(),reverse_charged:e.boolean().nullish().describe("Whether the tax is self-assessed/reverse charged and should not be added to gross total."),is_deductible:e.boolean().nullish().describe("Whether VAT on this tax line is deductible for AP bookkeeping.")})),total:e.number().min(mU).max(gU).nullish(),total_with_tax:e.number().min(yU).max(hU).nullish(),total_discount:e.number().min(bU).max(xU),total_paid:e.number().min(zU).max(_U),total_due:e.number().min(vU).max(fU),paid_in_full:e.boolean(),exchange_rate:e.object({rate:e.number().describe("Exchange rate used for conversion"),source:e.string().describe("Source of the exchange rate (e.g., 'Frankfurter')"),date:e.iso.datetime({}).describe("Date of the exchange rate"),quote_currency:e.string().describe("Quote currency (the base currency converted to)")}).nullish().describe("Currency exchange rate information if conversion was applied"),metadata:e.union([e.string(),e.number(),e.boolean(),e.null(),e.record(e.string(),e.unknown()),e.array(e.unknown())]),created_at:e.iso.datetime({}),updated_at:e.iso.datetime({})}).describe("Incoming purchase document"),RU=/^[a-z]{3,4}_[0-9a-f]{24}$/,Gve=e.object({id:e.stringFormat("resource-id",RU).describe("Unique resource identifier")}),Vve=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),IU=2,EU=2,SU=/^\d{4}-\d{2}-\d{2}$/,DU=/^\d{4}-\d{2}-\d{2}$/,PU=/^\d{4}-\d{2}-\d{2}$/,wU=/^\d{4}-\d{2}-\d{2}$/,CU=/^\d{4}-\d{2}-\d{2}$/,AU=3,MU=3,TU=0,kU="percent",BU=[],NU=[],Lve=e.object({is_draft:e.boolean().nullish(),supplier_id:e.string().nullish(),supplier:e.object({name:e.string().min(1),email:e.email().nullish(),address:e.string().nullish(),address_2:e.string().nullish(),post_code:e.string().nullish(),city:e.string().nullish(),state:e.string().nullish(),country:e.string().nullish(),country_code:e.string().min(IU).max(EU).nullish(),tax_number:e.string().nullish(),company_number:e.string().nullish(),phone:e.string().nullish(),peppol_id:e.string().nullish(),is_tax_subject:e.boolean().nullish()}).nullish(),save_supplier:e.boolean().nullish(),supplier_document_number:e.string().min(1).nullish(),date:e.string().regex(SU).nullish(),date_received:e.string().regex(DU).nullish(),date_due:e.string().regex(PU).nullish(),date_service:e.string().regex(wU).nullish(),date_service_to:e.string().regex(CU).nullish(),currency_code:e.string().min(AU).max(MU).nullish(),transaction_type:e.union([e.literal("domestic"),e.literal("intra_eu_b2b"),e.literal("intra_eu_b2c"),e.literal("3w_b2b"),e.literal("3w_b2c"),e.literal("export"),e.literal(null)]).nullish(),reference:e.string().nullish(),note:e.string().nullish(),items:e.array(e.object({name:e.string().min(1),description:e.string().nullish(),quantity:e.number(),unit:e.string().nullish(),classification:e.enum(["product","service"]),price:e.number(),gross_price:e.number().nullish(),discounts:e.array(e.object({value:e.number().min(TU).describe("Discount value"),type:e.enum(["percent","amount"]).default(kU).describe("Discount type: 'percent' (default) or 'amount'")})).default(BU),taxes:e.array(e.object({rate:e.number().nullish(),tax_id:e.string().nullish(),classification:e.string().nullish(),reverse_charge:e.boolean().nullish(),amount:e.number().nullish(),pt_exemption_code:e.string().nullish(),pt_exemption_reason:e.string().nullish()}).describe("Document Item Tax")).default(NU),total:e.number(),total_with_tax:e.number(),total_tax:e.number()})).nullish(),taxes:e.array(e.object({rate:e.number().nullable(),tax_id:e.string().nullish(),base:e.number(),total_tax:e.number(),reverse_charged:e.boolean().nullish().describe("Whether the tax is self-assessed/reverse charged and should not be added to gross total."),is_deductible:e.boolean().nullish().describe("Whether VAT on this tax line is deductible for AP bookkeeping.")})).nullish(),total:e.number().nullish(),total_with_tax:e.number().nullish(),total_discount:e.number().nullish(),exchange_rate:e.object({rate:e.number().describe("Exchange rate used for conversion"),source:e.string().describe("Source of the exchange rate (e.g., 'Frankfurter')"),date:e.iso.datetime({}).describe("Date of the exchange rate"),quote_currency:e.string().describe("Quote currency (the base currency converted to)")}).nullish().describe("Currency exchange rate information if conversion was applied"),summary_classification:e.union([e.literal("goods"),e.literal("services"),e.literal(null)]).nullish(),cancelled_at:e.iso.datetime({}).nullish(),metadata:e.record(e.string(),e.string()).nullish().describe("Custom key-value data for your own use. Store any JSON object up to 50 properties. Values must be strings up to 250 characters. Useful for storing external IDs, tags, or integration data."),type:e.enum(["invoice","credit_note","advance_invoice"]).optional()}),OU=36,FU=36,UU=36,jU=2,qU=2,WU=255,GU=/^\d{4}-\d{2}-\d{2}$/,VU=/^\d{4}-\d{2}-\d{2}$/,LU=/^\d{4}-\d{2}-\d{2}$/,HU=/^\d{4}-\d{2}-\d{2}$/,YU=/^\d{4}-\d{2}-\d{2}$/,KU=3,$U=50,QU=100,JU=2e3,ZU=0,XU="percent",ej=[],tj=[],oj=-140737488355328,nj=0x7fffffffffff,sj=-140737488355328,rj=0x7fffffffffff,ij=-140737488355328,aj=0x7fffffffffff,dj=-140737488355328,cj=0x7fffffffffff,lj=-140737488355328,uj=0x7fffffffffff,Hve=e.object({id:e.string().max(OU),entity_id:e.string().max(FU),supplier_id:e.string().max(UU).nullish(),type:e.enum(["invoice","credit_note","advance_invoice"]),is_draft:e.boolean(),cancelled_at:e.iso.datetime({}).nullish(),supplier:e.object({name:e.string().min(1),email:e.email().nullish(),address:e.string().nullish(),address_2:e.string().nullish(),post_code:e.string().nullish(),city:e.string().nullish(),state:e.string().nullish(),country:e.string().nullish(),country_code:e.string().min(jU).max(qU).nullish(),tax_number:e.string().nullish(),company_number:e.string().nullish(),phone:e.string().nullish(),peppol_id:e.string().nullish(),is_tax_subject:e.boolean().nullish()}).nullish(),supplier_document_number:e.string().max(WU).nullish(),date:e.string().regex(GU).nullish(),date_received:e.string().regex(VU).nullish(),date_due:e.string().regex(LU).nullish(),date_service:e.string().regex(HU).nullish(),date_service_to:e.string().regex(YU).nullish(),currency_code:e.string().max(KU).nullish(),transaction_type:e.string().max($U).nullish(),reference:e.string().max(QU).nullish(),note:e.string().max(JU).nullish(),summary_classification:e.union([e.literal("goods"),e.literal("services"),e.literal(null)]).nullish(),items:e.array(e.object({name:e.string().min(1),description:e.string().nullish(),quantity:e.number(),unit:e.string().nullish(),classification:e.enum(["product","service"]),price:e.number(),gross_price:e.number().nullish(),discounts:e.array(e.object({value:e.number().min(ZU).describe("Discount value"),type:e.enum(["percent","amount"]).default(XU).describe("Discount type: 'percent' (default) or 'amount'")})).default(ej),taxes:e.array(e.object({rate:e.number().nullish(),tax_id:e.string().nullish(),classification:e.string().nullish(),reverse_charge:e.boolean().nullish(),amount:e.number().nullish(),pt_exemption_code:e.string().nullish(),pt_exemption_reason:e.string().nullish()}).describe("Document Item Tax")).default(tj),total:e.number(),total_with_tax:e.number(),total_tax:e.number()})),taxes:e.array(e.object({rate:e.number().nullable(),tax_id:e.string().nullish(),base:e.number(),total_tax:e.number(),reverse_charged:e.boolean().nullish().describe("Whether the tax is self-assessed/reverse charged and should not be added to gross total."),is_deductible:e.boolean().nullish().describe("Whether VAT on this tax line is deductible for AP bookkeeping.")})),total:e.number().min(oj).max(nj).nullish(),total_with_tax:e.number().min(sj).max(rj).nullish(),total_discount:e.number().min(ij).max(aj),total_paid:e.number().min(dj).max(cj),total_due:e.number().min(lj).max(uj),paid_in_full:e.boolean(),exchange_rate:e.object({rate:e.number().describe("Exchange rate used for conversion"),source:e.string().describe("Source of the exchange rate (e.g., 'Frankfurter')"),date:e.iso.datetime({}).describe("Date of the exchange rate"),quote_currency:e.string().describe("Quote currency (the base currency converted to)")}).nullish().describe("Currency exchange rate information if conversion was applied"),metadata:e.union([e.string(),e.number(),e.boolean(),e.null(),e.record(e.string(),e.unknown()),e.array(e.unknown())]),created_at:e.iso.datetime({}),updated_at:e.iso.datetime({})}).describe("Incoming purchase document"),Yve=e.object({id:e.string()}),Kve=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),$ve=e.object({file:e.instanceof(File).optional()}),Qve=e.object({id:e.string()}),Jve=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),pj=36,mj=36,gj=36,yj=36,hj=36,bj=36,xj=36,zj=20,_j=500,vj=500,fj=200,Rj=20,Ij=-2147483648,Ej=2147483647,Sj=-2147483648,Dj=2147483647,Pj=-2147483648,wj=2147483647,Cj=255,Aj=100,Mj=255,Zve=e.object({data:e.array(e.object({id:e.string().max(pj),entity_id:e.string().max(mj),invoice_id:e.string().max(gj).nullish(),estimate_id:e.string().max(yj).nullish(),credit_note_id:e.string().max(hj).nullish(),advance_invoice_id:e.string().max(bj).nullish(),incoming_purchase_document_id:e.string().max(xj).nullish(),category:e.string().max(zj),url:e.string().max(_j),secureUrl:e.string().max(vj),publicId:e.string().max(fj),format:e.string().max(Rj),width:e.number().min(Ij).max(Ej).nullish(),height:e.number().min(Sj).max(Dj).nullish(),bytes:e.number().min(Pj).max(wj),filename:e.string().max(Cj).nullish(),mime_type:e.string().max(Aj),metadata:e.union([e.string(),e.number(),e.boolean(),e.null(),e.record(e.string(),e.unknown()),e.array(e.unknown())]),cache_key:e.string().max(Mj).nullish(),created_at:e.iso.datetime({}),updated_at:e.iso.datetime({})}).describe("File metadata record with upload information").and(e.looseObject({})).describe("File metadata record with upload information")),pagination:e.object({total:e.number().describe("Total number of items available in the collection"),next_cursor:e.string().nullable().describe("Opaque cursor for fetching the next page. It encodes the resolved sort tuple for the current result set, so reuse it only with the same effective ordering. Null if no more results are available."),prev_cursor:e.string().nullable().describe("Opaque cursor for fetching the previous page. It encodes the resolved sort tuple for the current result set, so reuse it only with the same effective ordering. Null if at the first page."),has_more:e.boolean().describe("Indicates whether more results are available after the current page")}).describe("Pagination metadata including cursors and result counts")}),Xve=e.object({id:e.string(),fileId:e.string()}),efe=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),tfe=e.object({id:e.string()}),ofe=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),Tj=36,kj=36,Bj=36,Nj=36,Oj=36,Fj=36,Uj=-140737488355328,jj=0x7fffffffffff,qj=3,Wj=-140737488355328,Gj=0x7fffffffffff,Vj=100,Lj=100,Hj=500,Yj=36,Kj=36,$j=100,Qj=36,Jj=100,Zj=36,Xj=100,eq=36,tq=255,oq=/^\d{4}-\d{2}-\d{2}$/,nq=-140737488355328,sq=0x7fffffffffff,rq=36,iq=255,aq=/^\d{4}-\d{2}-\d{2}$/,dq=-140737488355328,cq=0x7fffffffffff,nfe=e.object({data:e.array(e.object({id:e.string().max(Tj),invoice_id:e.string().max(kj).nullish(),credit_note_id:e.string().max(Bj).nullish(),advance_invoice_id:e.string().max(Nj).nullish(),incoming_purchase_document_id:e.string().max(Oj).nullish(),applied_to_incoming_purchase_document_id:e.string().max(Fj).nullish(),amount:e.number().min(Uj).max(jj),currency_code:e.string().max(qj),amount_converted:e.number().min(Wj).max(Gj),type:e.enum(["cash","bank_transfer","card","check","paypal","coupon","other","credit_note","advance"]).describe("Payment type/method"),date:e.iso.datetime({}).describe("Date the payment was received (ISO 8601 datetime at midnight UTC)"),tag:e.string().max(Vj).nullish(),reference:e.string().max(Lj).nullish(),note:e.string().max(Hj).nullish(),entity_id:e.string().max(Yj),metadata:e.record(e.string(),e.string()).nullish().describe("Custom key-value data for your own use. Store any JSON object up to 50 properties. Values must be strings up to 250 characters. Useful for storing external IDs, tags, or integration data."),deleted_at:e.iso.datetime({}).nullish(),created_at:e.iso.datetime({}),updated_at:e.iso.datetime({}),Invoice:e.object({id:e.string().max(Kj),number:e.string().max($j)}).nullish().describe("Related invoice"),CreditNote:e.object({id:e.string().max(Qj),number:e.string().max(Jj)}).nullish().describe("Related credit note"),AdvanceInvoice:e.object({id:e.string().max(Zj),number:e.string().max(Xj)}).nullish().describe("Related advance invoice"),IncomingPurchaseDocument:e.object({id:e.string().max(eq),type:e.enum(["invoice","credit_note","advance_invoice"]),supplier_document_number:e.string().max(tq).nullish(),date:e.string().regex(oq).nullish(),total_with_tax:e.number().min(nq).max(sq).nullish()}).nullish().describe("Related incoming purchase document"),AppliedToIncomingPurchaseDocument:e.object({id:e.string().max(rq),type:e.enum(["invoice","credit_note","advance_invoice"]),supplier_document_number:e.string().max(iq).nullish(),date:e.string().regex(aq).nullish(),total_with_tax:e.number().min(dq).max(cq).nullish()}).nullish().describe("Related incoming purchase document")}).describe("Payment record for an invoice, credit note, or advance invoice")),pagination:e.object({total:e.number().describe("Total number of items available in the collection"),next_cursor:e.string().nullable().describe("Opaque cursor for fetching the next page. It encodes the resolved sort tuple for the current result set, so reuse it only with the same effective ordering. Null if no more results are available."),prev_cursor:e.string().nullable().describe("Opaque cursor for fetching the previous page. It encodes the resolved sort tuple for the current result set, so reuse it only with the same effective ordering. Null if at the first page."),has_more:e.boolean().describe("Indicates whether more results are available after the current page")}).describe("Pagination metadata including cursors and result counts")}),sfe=e.object({id:e.string()}),rfe=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),lq=36,uq=0,pq=100,mq=100,gq=500,ife=e.object({applied_to_incoming_purchase_document_id:e.string().max(lq).nullish(),amount:e.number().gt(uq),type:e.enum(["cash","bank_transfer","card","check","paypal","coupon","other","credit_note","advance"]).describe("Payment type/method"),date:e.string().optional().describe("Payment date in YYYY-MM-DD format"),tag:e.string().max(pq).nullish(),reference:e.string().max(mq).nullish(),note:e.string().max(gq).nullish(),metadata:e.record(e.string(),e.string()).nullish().describe("Custom key-value data for your own use. Store any JSON object up to 50 properties. Values must be strings up to 250 characters. Useful for storing external IDs, tags, or integration data.")});var qe={};j(qe,{CreateCustomInvoiceBody:()=>_fe,CreateCustomInvoiceHeader:()=>zfe,CreateInvoiceBody:()=>yfe,CreateInvoiceHeader:()=>gfe,FiscalizeInvoiceHeader:()=>Gfe,FiscalizeInvoiceParams:()=>Wfe,FiscalizeInvoiceResponse:()=>Vfe,GetInvoiceByIdHeader:()=>Rfe,GetInvoiceByIdParams:()=>vfe,GetInvoiceByIdQueryParams:()=>ffe,GetInvoiceByIdResponse:()=>Ife,GetInvoiceVersionHeader:()=>Tfe,GetInvoiceVersionParams:()=>Mfe,GetInvoiceVersionResponse:()=>kfe,GetInvoiceVersionsHeader:()=>Cfe,GetInvoiceVersionsParams:()=>wfe,GetInvoiceVersionsResponse:()=>Afe,GetInvoicesHeader:()=>bfe,GetInvoicesQueryParams:()=>hfe,GetInvoicesResponse:()=>xfe,GetShareableInvoiceEslogParams:()=>mfe,GetShareableInvoiceHtmlParams:()=>cfe,GetShareableInvoiceHtmlQueryParams:()=>lfe,GetShareableInvoiceParams:()=>afe,GetShareableInvoicePdfParams:()=>ufe,GetShareableInvoicePdfQueryParams:()=>pfe,GetShareableInvoiceResponse:()=>dfe,RenderDocumentHtmlHeader:()=>Yfe,RenderDocumentHtmlParams:()=>Lfe,RenderDocumentHtmlQueryParams:()=>Hfe,RenderDocumentPdfHeader:()=>Qfe,RenderDocumentPdfParams:()=>Kfe,RenderDocumentPdfQueryParams:()=>$fe,RenderInvoicePreviewBody:()=>Ofe,RenderInvoicePreviewHeader:()=>Nfe,RenderInvoicePreviewQueryParams:()=>Bfe,UpdateInvoiceBody:()=>Dfe,UpdateInvoiceHeader:()=>Sfe,UpdateInvoiceParams:()=>Efe,UpdateInvoiceResponse:()=>Pfe,VoidInvoiceBody:()=>jfe,VoidInvoiceHeader:()=>Ufe,VoidInvoiceParams:()=>Ffe,VoidInvoiceResponse:()=>qfe,createCustomInvoiceBodyCustomerOneBankAccountTypeDefault:()=>MW,createCustomInvoiceBodyCustomerOneCountryCodeMax:()=>AW,createCustomInvoiceBodyCustomerOneCountryCodeMin:()=>CW,createCustomInvoiceBodyFinaBusinessPremiseNameMax:()=>qW,createCustomInvoiceBodyFinaBusinessPremiseNameRegExp:()=>WW,createCustomInvoiceBodyFinaElectronicDeviceNameMax:()=>GW,createCustomInvoiceBodyFinaElectronicDeviceNameRegExp:()=>VW,createCustomInvoiceBodyFinaOperatorOibMax:()=>HW,createCustomInvoiceBodyFinaOperatorOibMin:()=>LW,createCustomInvoiceBodyIssuerOneBankAccountTypeDefault:()=>wW,createCustomInvoiceBodyIssuerOneCountryCodeMax:()=>PW,createCustomInvoiceBodyIssuerOneCountryCodeMin:()=>DW,createCustomInvoiceBodyItemsItemDescriptionMax:()=>TW,createCustomInvoiceBodyItemsItemDiscountsItemTypeDefault:()=>NW,createCustomInvoiceBodyItemsItemDiscountsItemValueMin:()=>BW,createCustomInvoiceBodyItemsItemDiscountsMax:()=>OW,createCustomInvoiceBodyItemsItemUnitMax:()=>kW,createCustomInvoiceBodyPaymentsItemAmountExclusiveMin:()=>jW,createCustomInvoiceBodyPaymentsItemAppliedToIncomingPurchaseDocumentIdMax:()=>UW,createCustomInvoiceBodyPaymentsItemIncomingPurchaseDocumentIdMax:()=>FW,createInvoiceBodyCurrencyCodeMax:()=>m8,createInvoiceBodyCustomerOneBankAccountTypeDefault:()=>u8,createInvoiceBodyCustomerOneCountryCodeMax:()=>l8,createInvoiceBodyCustomerOneCountryCodeMin:()=>c8,createInvoiceBodyDateDueRegExp:()=>g8,createInvoiceBodyDateRegExp:()=>r8,createInvoiceBodyDateServiceRegExp:()=>h8,createInvoiceBodyDateServiceToRegExp:()=>b8,createInvoiceBodyExpectedTotalWithTaxExclusiveMin:()=>k8,createInvoiceBodyFinaBusinessPremiseNameMax:()=>P8,createInvoiceBodyFinaBusinessPremiseNameRegExp:()=>w8,createInvoiceBodyFinaElectronicDeviceNameMax:()=>C8,createInvoiceBodyFinaElectronicDeviceNameRegExp:()=>A8,createInvoiceBodyFinaOperatorOibMax:()=>T8,createInvoiceBodyFinaOperatorOibMin:()=>M8,createInvoiceBodyFooterMax:()=>p8,createInvoiceBodyIssuerBankAccountTypeDefault:()=>d8,createInvoiceBodyIssuerCountryCodeMax:()=>a8,createInvoiceBodyIssuerCountryCodeMin:()=>i8,createInvoiceBodyItemsItemDescriptionMax:()=>x8,createInvoiceBodyItemsItemDiscountsItemTypeDefault:()=>R8,createInvoiceBodyItemsItemDiscountsItemValueMin:()=>f8,createInvoiceBodyItemsItemDiscountsMax:()=>I8,createInvoiceBodyItemsItemQuantityMax:()=>_8,createInvoiceBodyItemsItemQuantityMin:()=>z8,createInvoiceBodyItemsItemUnitMax:()=>v8,createInvoiceBodyPaymentsItemAmountExclusiveMin:()=>D8,createInvoiceBodyPaymentsItemAppliedToIncomingPurchaseDocumentIdMax:()=>S8,createInvoiceBodyPaymentsItemIncomingPurchaseDocumentIdMax:()=>E8,createInvoiceBodyPtManualSeriesCodeMax:()=>y8,fiscalizeInvoicePathIdRegExp:()=>FL,fiscalizeInvoiceResponseCurrencyCodeMax:()=>XL,fiscalizeInvoiceResponseCustomerBankAccountTypeDefault:()=>YL,fiscalizeInvoiceResponseCustomerCountryCodeMax:()=>HL,fiscalizeInvoiceResponseCustomerCountryCodeMin:()=>LL,fiscalizeInvoiceResponseCustomerIdMax:()=>VL,fiscalizeInvoiceResponseDateServiceRegExp:()=>mH,fiscalizeInvoiceResponseDateServiceToRegExp:()=>gH,fiscalizeInvoiceResponseDateYearMax:()=>oH,fiscalizeInvoiceResponseDateYearMin:()=>tH,fiscalizeInvoiceResponseEntityIdMax:()=>eH,fiscalizeInvoiceResponseFooterMax:()=>KL,fiscalizeInvoiceResponseFursDataIterationDefault:()=>pH,fiscalizeInvoiceResponseIdMax:()=>UL,fiscalizeInvoiceResponseIssuerBankAccountTypeDefault:()=>GL,fiscalizeInvoiceResponseIssuerCountryCodeMax:()=>WL,fiscalizeInvoiceResponseIssuerCountryCodeMin:()=>qL,fiscalizeInvoiceResponseItemsItemAdvanceInvoiceIdMax:()=>SH,fiscalizeInvoiceResponseItemsItemDeliveryNoteIdMax:()=>DH,fiscalizeInvoiceResponseItemsItemDiscountsItemTypeDefault:()=>zH,fiscalizeInvoiceResponseItemsItemDiscountsItemValueMin:()=>xH,fiscalizeInvoiceResponseItemsItemDiscountsMax:()=>_H,fiscalizeInvoiceResponseItemsItemIdMax:()=>yH,fiscalizeInvoiceResponseItemsItemInvoiceIdMax:()=>EH,fiscalizeInvoiceResponseItemsItemItemIdMax:()=>PH,fiscalizeInvoiceResponseItemsItemNameMax:()=>hH,fiscalizeInvoiceResponseItemsItemTotalConvertedMax:()=>fH,fiscalizeInvoiceResponseItemsItemTotalConvertedMin:()=>vH,fiscalizeInvoiceResponseItemsItemTotalWithTaxConvertedMax:()=>IH,fiscalizeInvoiceResponseItemsItemTotalWithTaxConvertedMin:()=>RH,fiscalizeInvoiceResponseItemsItemUnitMax:()=>bH,fiscalizeInvoiceResponseNumberMax:()=>jL,fiscalizeInvoiceResponseShareableIdMax:()=>nH,fiscalizeInvoiceResponseTotalConvertedMax:()=>rH,fiscalizeInvoiceResponseTotalConvertedMin:()=>sH,fiscalizeInvoiceResponseTotalDueMax:()=>uH,fiscalizeInvoiceResponseTotalDueMin:()=>lH,fiscalizeInvoiceResponseTotalMax:()=>QL,fiscalizeInvoiceResponseTotalMin:()=>$L,fiscalizeInvoiceResponseTotalPaidMax:()=>cH,fiscalizeInvoiceResponseTotalPaidMin:()=>dH,fiscalizeInvoiceResponseTotalWithTaxConvertedMax:()=>aH,fiscalizeInvoiceResponseTotalWithTaxConvertedMin:()=>iH,fiscalizeInvoiceResponseTotalWithTaxMax:()=>ZL,fiscalizeInvoiceResponseTotalWithTaxMin:()=>JL,getInvoiceByIdPathIdRegExp:()=>YW,getInvoiceByIdResponseCurrencyCodeMax:()=>d7,getInvoiceByIdResponseCustomerBankAccountTypeDefault:()=>o7,getInvoiceByIdResponseCustomerCountryCodeMax:()=>t7,getInvoiceByIdResponseCustomerCountryCodeMin:()=>e7,getInvoiceByIdResponseCustomerIdMax:()=>XW,getInvoiceByIdResponseDateServiceRegExp:()=>f7,getInvoiceByIdResponseDateServiceToRegExp:()=>R7,getInvoiceByIdResponseDateYearMax:()=>u7,getInvoiceByIdResponseDateYearMin:()=>l7,getInvoiceByIdResponseEntityIdMax:()=>c7,getInvoiceByIdResponseFooterMax:()=>n7,getInvoiceByIdResponseFursDataIterationDefault:()=>v7,getInvoiceByIdResponseIdMax:()=>KW,getInvoiceByIdResponseIssuerBankAccountTypeDefault:()=>ZW,getInvoiceByIdResponseIssuerCountryCodeMax:()=>JW,getInvoiceByIdResponseIssuerCountryCodeMin:()=>QW,getInvoiceByIdResponseItemsItemAdvanceInvoiceIdMax:()=>B7,getInvoiceByIdResponseItemsItemDeliveryNoteIdMax:()=>N7,getInvoiceByIdResponseItemsItemDiscountsItemTypeDefault:()=>P7,getInvoiceByIdResponseItemsItemDiscountsItemValueMin:()=>D7,getInvoiceByIdResponseItemsItemDiscountsMax:()=>w7,getInvoiceByIdResponseItemsItemIdMax:()=>I7,getInvoiceByIdResponseItemsItemInvoiceIdMax:()=>k7,getInvoiceByIdResponseItemsItemItemIdMax:()=>O7,getInvoiceByIdResponseItemsItemNameMax:()=>E7,getInvoiceByIdResponseItemsItemTotalConvertedMax:()=>A7,getInvoiceByIdResponseItemsItemTotalConvertedMin:()=>C7,getInvoiceByIdResponseItemsItemTotalWithTaxConvertedMax:()=>T7,getInvoiceByIdResponseItemsItemTotalWithTaxConvertedMin:()=>M7,getInvoiceByIdResponseItemsItemUnitMax:()=>S7,getInvoiceByIdResponseNumberMax:()=>$W,getInvoiceByIdResponseShareableIdMax:()=>p7,getInvoiceByIdResponseTotalConvertedMax:()=>g7,getInvoiceByIdResponseTotalConvertedMin:()=>m7,getInvoiceByIdResponseTotalDueMax:()=>_7,getInvoiceByIdResponseTotalDueMin:()=>z7,getInvoiceByIdResponseTotalMax:()=>r7,getInvoiceByIdResponseTotalMin:()=>s7,getInvoiceByIdResponseTotalPaidMax:()=>x7,getInvoiceByIdResponseTotalPaidMin:()=>b7,getInvoiceByIdResponseTotalWithTaxConvertedMax:()=>h7,getInvoiceByIdResponseTotalWithTaxConvertedMin:()=>y7,getInvoiceByIdResponseTotalWithTaxMax:()=>a7,getInvoiceByIdResponseTotalWithTaxMin:()=>i7,getInvoiceVersionsPathIdRegExp:()=>KG,getInvoicesQueryLimitDefault:()=>B8,getInvoicesQueryLimitMax:()=>N8,getInvoicesResponseDataItemCurrencyCodeMax:()=>J8,getInvoicesResponseDataItemCustomerBankAccountTypeDefault:()=>L8,getInvoicesResponseDataItemCustomerCountryCodeMax:()=>V8,getInvoicesResponseDataItemCustomerCountryCodeMin:()=>G8,getInvoicesResponseDataItemCustomerIdMax:()=>W8,getInvoicesResponseDataItemDateServiceRegExp:()=>uW,getInvoicesResponseDataItemDateServiceToRegExp:()=>pW,getInvoicesResponseDataItemDateYearMax:()=>eW,getInvoicesResponseDataItemDateYearMin:()=>X8,getInvoicesResponseDataItemEntityIdMax:()=>Z8,getInvoicesResponseDataItemFooterMax:()=>H8,getInvoicesResponseDataItemFursDataIterationDefault:()=>lW,getInvoicesResponseDataItemIdMax:()=>O8,getInvoicesResponseDataItemIssuerBankAccountTypeDefault:()=>q8,getInvoicesResponseDataItemIssuerCountryCodeMax:()=>j8,getInvoicesResponseDataItemIssuerCountryCodeMin:()=>U8,getInvoicesResponseDataItemItemsItemAdvanceInvoiceIdMax:()=>IW,getInvoicesResponseDataItemItemsItemDeliveryNoteIdMax:()=>EW,getInvoicesResponseDataItemItemsItemDiscountsItemTypeDefault:()=>bW,getInvoicesResponseDataItemItemsItemDiscountsItemValueMin:()=>hW,getInvoicesResponseDataItemItemsItemDiscountsMax:()=>xW,getInvoicesResponseDataItemItemsItemIdMax:()=>mW,getInvoicesResponseDataItemItemsItemInvoiceIdMax:()=>RW,getInvoicesResponseDataItemItemsItemItemIdMax:()=>SW,getInvoicesResponseDataItemItemsItemNameMax:()=>gW,getInvoicesResponseDataItemItemsItemTotalConvertedMax:()=>_W,getInvoicesResponseDataItemItemsItemTotalConvertedMin:()=>zW,getInvoicesResponseDataItemItemsItemTotalWithTaxConvertedMax:()=>fW,getInvoicesResponseDataItemItemsItemTotalWithTaxConvertedMin:()=>vW,getInvoicesResponseDataItemItemsItemUnitMax:()=>yW,getInvoicesResponseDataItemNumberMax:()=>F8,getInvoicesResponseDataItemShareableIdMax:()=>tW,getInvoicesResponseDataItemTotalConvertedMax:()=>nW,getInvoicesResponseDataItemTotalConvertedMin:()=>oW,getInvoicesResponseDataItemTotalDueMax:()=>cW,getInvoicesResponseDataItemTotalDueMin:()=>dW,getInvoicesResponseDataItemTotalMax:()=>K8,getInvoicesResponseDataItemTotalMin:()=>Y8,getInvoicesResponseDataItemTotalPaidMax:()=>aW,getInvoicesResponseDataItemTotalPaidMin:()=>iW,getInvoicesResponseDataItemTotalWithTaxConvertedMax:()=>rW,getInvoicesResponseDataItemTotalWithTaxConvertedMin:()=>sW,getInvoicesResponseDataItemTotalWithTaxMax:()=>Q8,getInvoicesResponseDataItemTotalWithTaxMin:()=>$8,getShareableInvoiceResponseCurrencyCodeMax:()=>wq,getShareableInvoiceResponseCustomerBankAccountTypeDefault:()=>Rq,getShareableInvoiceResponseCustomerCountryCodeMax:()=>fq,getShareableInvoiceResponseCustomerCountryCodeMin:()=>vq,getShareableInvoiceResponseCustomerIdMax:()=>_q,getShareableInvoiceResponseDateServiceRegExp:()=>Gq,getShareableInvoiceResponseDateServiceToRegExp:()=>Vq,getShareableInvoiceResponseDateYearMax:()=>Mq,getShareableInvoiceResponseDateYearMin:()=>Aq,getShareableInvoiceResponseEntityIdMax:()=>Cq,getShareableInvoiceResponseFooterMax:()=>Iq,getShareableInvoiceResponseFursDataIterationDefault:()=>Wq,getShareableInvoiceResponseIdMax:()=>yq,getShareableInvoiceResponseIssuerBankAccountTypeDefault:()=>zq,getShareableInvoiceResponseIssuerCountryCodeMax:()=>xq,getShareableInvoiceResponseIssuerCountryCodeMin:()=>bq,getShareableInvoiceResponseItemsItemAdvanceInvoiceIdMax:()=>o8,getShareableInvoiceResponseItemsItemDeliveryNoteIdMax:()=>n8,getShareableInvoiceResponseItemsItemDiscountsItemTypeDefault:()=>$q,getShareableInvoiceResponseItemsItemDiscountsItemValueMin:()=>Kq,getShareableInvoiceResponseItemsItemDiscountsMax:()=>Qq,getShareableInvoiceResponseItemsItemIdMax:()=>Lq,getShareableInvoiceResponseItemsItemInvoiceIdMax:()=>t8,getShareableInvoiceResponseItemsItemItemIdMax:()=>s8,getShareableInvoiceResponseItemsItemNameMax:()=>Hq,getShareableInvoiceResponseItemsItemTotalConvertedMax:()=>Zq,getShareableInvoiceResponseItemsItemTotalConvertedMin:()=>Jq,getShareableInvoiceResponseItemsItemTotalWithTaxConvertedMax:()=>e8,getShareableInvoiceResponseItemsItemTotalWithTaxConvertedMin:()=>Xq,getShareableInvoiceResponseItemsItemUnitMax:()=>Yq,getShareableInvoiceResponseNumberMax:()=>hq,getShareableInvoiceResponseShareableIdMax:()=>Tq,getShareableInvoiceResponseTotalConvertedMax:()=>Bq,getShareableInvoiceResponseTotalConvertedMin:()=>kq,getShareableInvoiceResponseTotalDueMax:()=>qq,getShareableInvoiceResponseTotalDueMin:()=>jq,getShareableInvoiceResponseTotalMax:()=>Sq,getShareableInvoiceResponseTotalMin:()=>Eq,getShareableInvoiceResponseTotalPaidMax:()=>Uq,getShareableInvoiceResponseTotalPaidMin:()=>Fq,getShareableInvoiceResponseTotalWithTaxConvertedMax:()=>Oq,getShareableInvoiceResponseTotalWithTaxConvertedMin:()=>Nq,getShareableInvoiceResponseTotalWithTaxMax:()=>Pq,getShareableInvoiceResponseTotalWithTaxMin:()=>Dq,renderDocumentHtmlPathIdRegExp:()=>wH,renderDocumentHtmlQueryLanguageMax:()=>TH,renderDocumentHtmlQueryLanguageMin:()=>MH,renderDocumentHtmlQueryLocaleMax:()=>AH,renderDocumentHtmlQueryLocaleMin:()=>CH,renderDocumentPdfPathIdRegExp:()=>kH,renderDocumentPdfQueryLanguageMax:()=>FH,renderDocumentPdfQueryLanguageMin:()=>OH,renderDocumentPdfQueryLocaleMax:()=>NH,renderDocumentPdfQueryLocaleMin:()=>BH,renderInvoicePreviewBodyOneCurrencyCodeMax:()=>dV,renderInvoicePreviewBodyOneCustomerOneBankAccountTypeDefault:()=>iV,renderInvoicePreviewBodyOneCustomerOneCountryCodeMax:()=>rV,renderInvoicePreviewBodyOneCustomerOneCountryCodeMin:()=>sV,renderInvoicePreviewBodyOneDateDueRegExp:()=>cV,renderInvoicePreviewBodyOneDateRegExp:()=>eV,renderInvoicePreviewBodyOneDateServiceRegExp:()=>uV,renderInvoicePreviewBodyOneDateServiceToRegExp:()=>pV,renderInvoicePreviewBodyOneExpectedTotalWithTaxExclusiveMin:()=>zV,renderInvoicePreviewBodyOneFinaBusinessPremiseNameMax:()=>mV,renderInvoicePreviewBodyOneFinaBusinessPremiseNameRegExp:()=>gV,renderInvoicePreviewBodyOneFinaElectronicDeviceNameMax:()=>yV,renderInvoicePreviewBodyOneFinaElectronicDeviceNameRegExp:()=>hV,renderInvoicePreviewBodyOneFinaOperatorOibMax:()=>xV,renderInvoicePreviewBodyOneFinaOperatorOibMin:()=>bV,renderInvoicePreviewBodyOneFooterMax:()=>aV,renderInvoicePreviewBodyOneIssuerBankAccountTypeDefault:()=>nV,renderInvoicePreviewBodyOneIssuerCountryCodeMax:()=>oV,renderInvoicePreviewBodyOneIssuerCountryCodeMin:()=>tV,renderInvoicePreviewBodyOnePtManualSeriesCodeMax:()=>lV,renderInvoicePreviewBodyTwoCurrencyCodeMax:()=>PV,renderInvoicePreviewBodyTwoCustomerOneBankAccountTypeDefault:()=>SV,renderInvoicePreviewBodyTwoCustomerOneCountryCodeMax:()=>EV,renderInvoicePreviewBodyTwoCustomerOneCountryCodeMin:()=>IV,renderInvoicePreviewBodyTwoDateDueRegExp:()=>wV,renderInvoicePreviewBodyTwoDateRegExp:()=>_V,renderInvoicePreviewBodyTwoDateServiceRegExp:()=>AV,renderInvoicePreviewBodyTwoDateServiceToRegExp:()=>MV,renderInvoicePreviewBodyTwoExpectedTotalWithTaxExclusiveMin:()=>HV,renderInvoicePreviewBodyTwoFinaBusinessPremiseNameMax:()=>jV,renderInvoicePreviewBodyTwoFinaBusinessPremiseNameRegExp:()=>qV,renderInvoicePreviewBodyTwoFinaElectronicDeviceNameMax:()=>WV,renderInvoicePreviewBodyTwoFinaElectronicDeviceNameRegExp:()=>GV,renderInvoicePreviewBodyTwoFinaOperatorOibMax:()=>LV,renderInvoicePreviewBodyTwoFinaOperatorOibMin:()=>VV,renderInvoicePreviewBodyTwoFooterMax:()=>DV,renderInvoicePreviewBodyTwoIssuerBankAccountTypeDefault:()=>RV,renderInvoicePreviewBodyTwoIssuerCountryCodeMax:()=>fV,renderInvoicePreviewBodyTwoIssuerCountryCodeMin:()=>vV,renderInvoicePreviewBodyTwoItemsItemDescriptionMax:()=>TV,renderInvoicePreviewBodyTwoItemsItemDiscountsItemTypeDefault:()=>FV,renderInvoicePreviewBodyTwoItemsItemDiscountsItemValueMin:()=>OV,renderInvoicePreviewBodyTwoItemsItemDiscountsMax:()=>UV,renderInvoicePreviewBodyTwoItemsItemQuantityMax:()=>BV,renderInvoicePreviewBodyTwoItemsItemQuantityMin:()=>kV,renderInvoicePreviewBodyTwoItemsItemUnitMax:()=>NV,renderInvoicePreviewBodyTwoPtManualSeriesCodeMax:()=>CV,renderInvoicePreviewQueryLanguageMax:()=>ZG,renderInvoicePreviewQueryLanguageMin:()=>JG,renderInvoicePreviewQueryLocaleMax:()=>QG,renderInvoicePreviewQueryLocaleMin:()=>$G,renderInvoicePreviewQueryPartialDefault:()=>XG,updateInvoiceBodyChangeReasonMax:()=>eG,updateInvoiceBodyCustomerOneBankAccountTypeDefault:()=>L7,updateInvoiceBodyCustomerOneCountryCodeMax:()=>V7,updateInvoiceBodyCustomerOneCountryCodeMin:()=>G7,updateInvoiceBodyDateDueRegExp:()=>tG,updateInvoiceBodyDateRegExp:()=>U7,updateInvoiceBodyDateServiceRegExp:()=>oG,updateInvoiceBodyDateServiceToRegExp:()=>nG,updateInvoiceBodyIssuerOneBankAccountTypeDefault:()=>W7,updateInvoiceBodyIssuerOneCountryCodeMax:()=>q7,updateInvoiceBodyIssuerOneCountryCodeMin:()=>j7,updateInvoiceBodyItemsItemDescriptionMax:()=>H7,updateInvoiceBodyItemsItemDiscountsItemTypeDefault:()=>J7,updateInvoiceBodyItemsItemDiscountsItemValueMin:()=>Q7,updateInvoiceBodyItemsItemDiscountsMax:()=>Z7,updateInvoiceBodyItemsItemQuantityMax:()=>K7,updateInvoiceBodyItemsItemQuantityMin:()=>Y7,updateInvoiceBodyItemsItemUnitMax:()=>$7,updateInvoiceBodyReferenceMax:()=>X7,updateInvoicePathIdRegExp:()=>F7,updateInvoiceResponseCurrencyCodeMax:()=>xG,updateInvoiceResponseCustomerBankAccountTypeDefault:()=>pG,updateInvoiceResponseCustomerCountryCodeMax:()=>uG,updateInvoiceResponseCustomerCountryCodeMin:()=>lG,updateInvoiceResponseCustomerIdMax:()=>cG,updateInvoiceResponseDateServiceRegExp:()=>MG,updateInvoiceResponseDateServiceToRegExp:()=>TG,updateInvoiceResponseDateYearMax:()=>vG,updateInvoiceResponseDateYearMin:()=>_G,updateInvoiceResponseEntityIdMax:()=>zG,updateInvoiceResponseFooterMax:()=>mG,updateInvoiceResponseFursDataIterationDefault:()=>AG,updateInvoiceResponseIdMax:()=>sG,updateInvoiceResponseIssuerBankAccountTypeDefault:()=>dG,updateInvoiceResponseIssuerCountryCodeMax:()=>aG,updateInvoiceResponseIssuerCountryCodeMin:()=>iG,updateInvoiceResponseItemsItemAdvanceInvoiceIdMax:()=>LG,updateInvoiceResponseItemsItemDeliveryNoteIdMax:()=>HG,updateInvoiceResponseItemsItemDiscountsItemTypeDefault:()=>FG,updateInvoiceResponseItemsItemDiscountsItemValueMin:()=>OG,updateInvoiceResponseItemsItemDiscountsMax:()=>UG,updateInvoiceResponseItemsItemIdMax:()=>kG,updateInvoiceResponseItemsItemInvoiceIdMax:()=>VG,updateInvoiceResponseItemsItemItemIdMax:()=>YG,updateInvoiceResponseItemsItemNameMax:()=>BG,updateInvoiceResponseItemsItemTotalConvertedMax:()=>qG,updateInvoiceResponseItemsItemTotalConvertedMin:()=>jG,updateInvoiceResponseItemsItemTotalWithTaxConvertedMax:()=>GG,updateInvoiceResponseItemsItemTotalWithTaxConvertedMin:()=>WG,updateInvoiceResponseItemsItemUnitMax:()=>NG,updateInvoiceResponseNumberMax:()=>rG,updateInvoiceResponseShareableIdMax:()=>fG,updateInvoiceResponseTotalConvertedMax:()=>IG,updateInvoiceResponseTotalConvertedMin:()=>RG,updateInvoiceResponseTotalDueMax:()=>CG,updateInvoiceResponseTotalDueMin:()=>wG,updateInvoiceResponseTotalMax:()=>yG,updateInvoiceResponseTotalMin:()=>gG,updateInvoiceResponseTotalPaidMax:()=>PG,updateInvoiceResponseTotalPaidMin:()=>DG,updateInvoiceResponseTotalWithTaxConvertedMax:()=>SG,updateInvoiceResponseTotalWithTaxConvertedMin:()=>EG,updateInvoiceResponseTotalWithTaxMax:()=>bG,updateInvoiceResponseTotalWithTaxMin:()=>hG,voidInvoicePathIdRegExp:()=>YV,voidInvoiceResponseCurrencyCodeMax:()=>dL,voidInvoiceResponseCustomerBankAccountTypeDefault:()=>oL,voidInvoiceResponseCustomerCountryCodeMax:()=>tL,voidInvoiceResponseCustomerCountryCodeMin:()=>eL,voidInvoiceResponseCustomerIdMax:()=>XV,voidInvoiceResponseDateServiceRegExp:()=>fL,voidInvoiceResponseDateServiceToRegExp:()=>RL,voidInvoiceResponseDateYearMax:()=>uL,voidInvoiceResponseDateYearMin:()=>lL,voidInvoiceResponseEntityIdMax:()=>cL,voidInvoiceResponseFooterMax:()=>nL,voidInvoiceResponseFursDataIterationDefault:()=>vL,voidInvoiceResponseIdMax:()=>KV,voidInvoiceResponseIssuerBankAccountTypeDefault:()=>ZV,voidInvoiceResponseIssuerCountryCodeMax:()=>JV,voidInvoiceResponseIssuerCountryCodeMin:()=>QV,voidInvoiceResponseItemsItemAdvanceInvoiceIdMax:()=>BL,voidInvoiceResponseItemsItemDeliveryNoteIdMax:()=>NL,voidInvoiceResponseItemsItemDiscountsItemTypeDefault:()=>PL,voidInvoiceResponseItemsItemDiscountsItemValueMin:()=>DL,voidInvoiceResponseItemsItemDiscountsMax:()=>wL,voidInvoiceResponseItemsItemIdMax:()=>IL,voidInvoiceResponseItemsItemInvoiceIdMax:()=>kL,voidInvoiceResponseItemsItemItemIdMax:()=>OL,voidInvoiceResponseItemsItemNameMax:()=>EL,voidInvoiceResponseItemsItemTotalConvertedMax:()=>AL,voidInvoiceResponseItemsItemTotalConvertedMin:()=>CL,voidInvoiceResponseItemsItemTotalWithTaxConvertedMax:()=>TL,voidInvoiceResponseItemsItemTotalWithTaxConvertedMin:()=>ML,voidInvoiceResponseItemsItemUnitMax:()=>SL,voidInvoiceResponseNumberMax:()=>$V,voidInvoiceResponseShareableIdMax:()=>pL,voidInvoiceResponseTotalConvertedMax:()=>gL,voidInvoiceResponseTotalConvertedMin:()=>mL,voidInvoiceResponseTotalDueMax:()=>_L,voidInvoiceResponseTotalDueMin:()=>zL,voidInvoiceResponseTotalMax:()=>rL,voidInvoiceResponseTotalMin:()=>sL,voidInvoiceResponseTotalPaidMax:()=>xL,voidInvoiceResponseTotalPaidMin:()=>bL,voidInvoiceResponseTotalWithTaxConvertedMax:()=>hL,voidInvoiceResponseTotalWithTaxConvertedMin:()=>yL,voidInvoiceResponseTotalWithTaxMax:()=>aL,voidInvoiceResponseTotalWithTaxMin:()=>iL});var afe=e.object({shareableId:e.string().describe("Shareable document token")}),yq=36,hq=100,bq=2,xq=2,zq="iban",_q=36,vq=2,fq=2,Rq="iban",Iq=500,Eq=-140737488355328,Sq=0x7fffffffffff,Dq=-140737488355328,Pq=0x7fffffffffff,wq=3,Cq=36,Aq=-2147483648,Mq=2147483647,Tq=100,kq=-140737488355328,Bq=0x7fffffffffff,Nq=-140737488355328,Oq=0x7fffffffffff,Fq=-140737488355328,Uq=0x7fffffffffff,jq=-140737488355328,qq=0x7fffffffffff,Wq=0,Gq=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,Vq=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,Lq=36,Hq=500,Yq=50,Kq=0,$q="percent",Qq=5,Jq=-140737488355328,Zq=0x7fffffffffff,Xq=-140737488355328,e8=0x7fffffffffff,t8=36,o8=36,n8=36,s8=36,dfe=e.object({id:e.string().max(yq),number:e.string().max(hq),is_draft:e.boolean().describe("Whether this is a draft document. Draft documents have no sequential number assigned, skip fiscalization, and can be deleted. Use POST /{documents}/{id}/finalize to assign a number and finalize."),date:e.iso.datetime({}).describe("Date the invoice was created (ISO 8601 datetime at midnight UTC)"),issuer:e.object({name:e.string().nullish(),email:e.email().nullish(),address:e.string().nullish(),address_2:e.string().nullish(),post_code:e.string().nullish(),city:e.string().nullish(),state:e.string().nullish(),country:e.string().nullish(),country_code:e.string().min(bq).max(xq).nullish(),tax_number:e.string().nullish(),tax_number_2:e.string().nullish(),company_number:e.string().nullish(),phone:e.string().nullish(),peppol_id:e.string().nullish(),is_end_consumer:e.boolean().nullish(),bank_account:e.object({type:e.enum(["iban","us_domestic","uk_domestic","other"]).default(zq).describe("Account type determines which fields are used"),name:e.string().nullish().describe("Display name for this account. Falls back to account number if not set"),bank_name:e.string().nullish().describe("Bank name"),iban:e.string().nullish().describe("IBAN (for type=iban)"),account_number:e.string().nullish().describe("Account number (for us_domestic, uk_domestic, other)"),bic:e.string().nullish().describe("BIC/SWIFT code for international transfers"),routing_number:e.string().nullish().describe("US ABA routing number (for type=us_domestic)"),sort_code:e.string().nullish().describe("UK sort code (for type=uk_domestic)")}).nullish()}).describe("Document issuer (entity) information"),customer_id:e.string().max(_q).nullish(),customer:e.object({name:e.string().nullish(),email:e.email().nullish(),address:e.string().nullish(),address_2:e.string().nullish(),post_code:e.string().nullish(),city:e.string().nullish(),state:e.string().nullish(),country:e.string().nullish(),country_code:e.string().min(vq).max(fq).nullish(),tax_number:e.string().nullish(),tax_number_2:e.string().nullish(),company_number:e.string().nullish(),phone:e.string().nullish(),peppol_id:e.string().nullish(),is_end_consumer:e.boolean().nullish(),bank_account:e.object({type:e.enum(["iban","us_domestic","uk_domestic","other"]).default(Rq).describe("Account type determines which fields are used"),name:e.string().nullish().describe("Display name for this account. Falls back to account number if not set"),bank_name:e.string().nullish().describe("Bank name"),iban:e.string().nullish().describe("IBAN (for type=iban)"),account_number:e.string().nullish().describe("Account number (for us_domestic, uk_domestic, other)"),bic:e.string().nullish().describe("BIC/SWIFT code for international transfers"),routing_number:e.string().nullish().describe("US ABA routing number (for type=us_domestic)"),sort_code:e.string().nullish().describe("UK sort code (for type=uk_domestic)")}).nullish()}).nullish().describe("Customer information"),note:e.string().nullish().describe("Note for the document. If not provided, defaults to entity's document-type-specific note setting. Pass empty string to explicitly set no note."),payment_terms:e.string().nullish().describe("Payment terms for the document. If not provided, defaults to entity's document-type-specific payment terms setting. Pass empty string to explicitly set no terms."),tax_clause:e.string().nullish().describe("Tax clause for the document. Auto-populated based on transaction type if tax_clause_defaults are configured in entity settings. Pass empty string to explicitly set no clause."),footer:e.string().max(Iq).nullish(),signature:e.string().nullish().describe("Signature text for the document (e.g. 'John Smith, CEO'). If not provided, defaults to entity's default_document_signature setting. Pass empty string to explicitly set no signature."),total:e.number().min(Eq).max(Sq),total_with_tax:e.number().min(Dq).max(Pq),total_discount:e.number().describe("Document discount total stored as a net-equivalent amount for compatibility. In `b2b_standard`, this is the net value of line-item discounts applied before tax. In `b2c_gross_discount`, gross discounts are converted back to their net-equivalent value here. 0 when no discounts applied."),creation_source:e.enum(["standard","custom"]).describe("Internal origin of the create request. `standard` means a normal create endpoint calculated the totals. `custom` means the document was created through a `/custom` endpoint."),calculation_mode:e.enum(["b2b_standard","b2c_gross_discount"]).describe("Resolved calculation mode used for this document. Stored on the document so recalculation and rendering remain stable even if entity defaults change later."),taxes:e.array(e.object({rate:e.number().nullable(),tax_id:e.string().nullish(),base:e.number(),amount:e.number(),reverse_charge:e.boolean().nullish()})).describe("Applied taxes summary"),currency_code:e.string().max(wq),entity_id:e.string().max(Cq),date_year:e.number().min(Aq).max(Mq),shareable_id:e.string().max(Tq).nullish(),voided_at:e.iso.datetime({}).nullish(),transaction_type:e.union([e.literal("domestic"),e.literal("intra_eu_b2b"),e.literal("intra_eu_b2c"),e.literal("3w_b2b"),e.literal("3w_b2c"),e.literal("export"),e.literal(null)]).nullish().describe("Transaction type for VAT purposes (domestic, intra_eu_b2b, intra_eu_b2c, export). Always determined based on issuer/customer countries."),metadata:e.record(e.string(),e.string()).nullish().describe("Custom key-value data for your own use. Store any JSON object up to 50 properties. Values must be strings up to 250 characters. Useful for storing external IDs, tags, or integration data."),exchange_rate:e.object({rate:e.number().describe("Exchange rate used for conversion"),source:e.string().describe("Source of the exchange rate (e.g., 'Frankfurter')"),date:e.iso.datetime({}).describe("Date of the exchange rate"),quote_currency:e.string().describe("Quote currency (the base currency converted to)")}).nullish().describe("Currency exchange rate information if conversion was applied"),total_converted:e.number().min(kq).max(Bq).nullish(),total_with_tax_converted:e.number().min(Nq).max(Oq).nullish(),rounding_correction:e.number().nullish().describe("Rounding correction applied to reconcile differences between calculated total_with_tax and expected_total_with_tax. Only present when expected_total_with_tax was provided during creation."),eslog:e.object({validation_enabled:e.boolean().nullish().describe("Override entity default: true = validate, false = skip, null = use entity setting"),validation_status:e.union([e.literal("valid"),e.literal("invalid"),e.literal("not_validated"),e.literal(null)]).nullish().describe("Validation status: 'valid', 'invalid', or 'not_validated'"),validation_errors:e.array(e.string()).nullish().describe("Array of validation error messages (if status is 'invalid')"),validated_at:e.string().nullish().describe("ISO timestamp when validation was last performed")}).nullish().describe("e-SLOG 2.0 validation data for Slovenian electronic invoices. Only applicable when entity.country_code = 'SI' and eslog validation is enabled."),reference:e.string().nullish().describe("Custom reference for the document (e.g., purchase order number, payment reference). When set, used as the UPN payment reference instead of the auto-generated one."),vies:e.object({warning:e.string().nullable().describe("Warning message if VIES validation was unavailable or the VAT number was invalid. Document creation proceeds but this indicates the transaction type may need review."),skipped:e.boolean().nullable().describe("True when VIES validation was skipped due to entity settings (vies_validate_vat: false) but would normally apply. Used for audit trail.")}).nullish().describe("VIES validation info including any warnings and skipped indicator for audit trail"),deleted_at:e.iso.datetime({}).nullish().describe("Timestamp when the document was soft-deleted. Null if not deleted."),created_at:e.iso.datetime({}),updated_at:e.iso.datetime({}),date_due:e.iso.datetime({}).nullish().describe("Date the invoice is due (ISO 8601 datetime at midnight UTC)"),total_paid:e.number().min(Fq).max(Uq),total_due:e.number().min(jq).max(qq),paid_in_full:e.boolean(),furs:e.object({status:e.enum(["pending","success","failed","skipped"]),fiscalized_at:e.iso.datetime({}).optional(),error:e.string().optional(),cancellation_reason:e.string().optional(),data:e.object({zoi:e.string(),eor:e.string().optional(),qr_code:e.string().optional(),business_premise_name:e.string(),electronic_device_name:e.string(),invoice_number:e.string(),iteration:e.number().default(Wq),payload:e.record(e.string(),e.unknown()).describe("FURS API request payload"),issuer_tax_number:e.string().optional(),operator_tax_number:e.string().optional(),operator_label:e.string().optional(),foreign_operator:e.boolean().optional(),cancelled:e.boolean().optional(),cancelled_eor:e.string().optional(),cancellation_payload:e.record(e.string(),e.unknown()).optional().describe("FURS API cancellation payload")}).optional()}).nullish().describe("FURS (Slovenia) fiscalization data. Read-only field, not editable via API. Includes status, premise name, device name, and FURS identifiers (ZOI, EOR, QR code)."),fina:e.object({status:e.enum(["pending","success","failed"]),fiscalized_at:e.iso.datetime({}).optional(),error:e.string().optional(),data:e.object({zki:e.string(),jir:e.string().optional(),qr_code_url:e.string().optional(),business_premise_name:e.string(),electronic_device_name:e.string(),invoice_number:e.string(),operator_oib:e.string().optional(),payment_type:e.string().optional(),numbering_sequence:e.string().optional(),payload:e.record(e.string(),e.unknown()).describe("CIS SOAP request payload"),subsequent_submit:e.boolean().optional(),issuer_oib:e.string().optional(),operator_label:e.string().optional()}).optional()}).nullish().describe("FINA (Croatia) CIS fiscalization data. Read-only field. Includes status, business premise name, electronic device name, and CIS identifiers (ZKI, JIR, QR code URL)."),pt:e.union([e.string(),e.number(),e.boolean(),e.null(),e.record(e.string(),e.unknown()),e.array(e.unknown())]).optional(),date_service:e.string().regex(Gq).nullish().describe("Service date in YYYY-MM-DD format. For invoices and credit notes."),date_service_to:e.string().regex(Vq).nullish().describe("Service period end date in YYYY-MM-DD format. For invoices and credit notes. Use with date_service for date ranges."),items:e.array(e.object({id:e.string().max(Lq),type:e.union([e.literal("separator"),e.literal(null)]).nullish().describe("Item type. null = regular line item, 'separator' = visual section header."),name:e.string().max(Hq),description:e.string().nullable(),classification:e.union([e.literal("product"),e.literal("service"),e.literal("advance"),e.literal(null)]).nullish().describe("Item classification used for Portugal SAF-T product typing."),price:e.number().nullish().describe("Per-unit net price (before tax). Always stores net price. Null for separator items."),gross_price:e.number().nullish().describe(`Per-unit gross price (includes tax).
|
|
180
|
+
Only present if user originally sent gross price.
|
|
181
|
+
Use gross pricing to keep invoice totals stable when VIES reverse charge is applied.`),quantity:e.number().nullish().describe("Item quantity. Null for separator items."),unit:e.string().max(Yq).nullish(),taxes:e.array(e.object({rate:e.number().nullish(),tax_id:e.string().nullish(),classification:e.string().nullish(),reverse_charge:e.boolean().nullish(),amount:e.number().nullish(),pt_exemption_code:e.string().nullish(),pt_exemption_reason:e.string().nullish()}).describe("Document Item Tax")).describe("Applied taxes (provide rate to create new tax, or tax_id to use existing tax)"),discounts:e.array(e.object({value:e.number().min(Kq).describe("Discount value"),type:e.enum(["percent","amount"]).default($q).describe("Discount type: 'percent' (default) or 'amount'")})).max(Qq).describe("Line discounts (max 5) in request order. In `b2b_standard`, percentage discounts are calculated from the original line subtotal and fixed amounts are summed before tax. In `b2c_gross_discount`, discounts are applied sequentially to the running gross subtotal."),total:e.number().nullish().describe("Line total before tax. Null for separator items."),total_with_tax:e.number().nullish().describe("Line total after tax. Null for separator items."),total_converted:e.number().min(Jq).max(Zq).nullish(),total_with_tax_converted:e.number().min(Xq).max(e8).nullish(),invoice_id:e.string().max(t8).nullish(),advance_invoice_id:e.string().max(o8).nullish(),delivery_note_id:e.string().max(n8).nullish(),item_id:e.string().max(s8).nullish(),metadata:e.record(e.string(),e.string()).nullish().describe("Custom key-value data for your own use. Store any JSON object up to 50 properties. Values must be strings up to 250 characters. Useful for storing external IDs, tags, or integration data."),created_at:e.iso.datetime({}),updated_at:e.iso.datetime({})})),document_relations:e.array(e.object({id:e.string(),source_type:e.enum(["invoice","estimate","credit_note","advance_invoice","delivery_note"]).describe("Type of document"),source_id:e.string(),target_type:e.enum(["invoice","estimate","credit_note","advance_invoice","delivery_note"]).describe("Type of document"),target_id:e.string(),relation_type:e.string(),entity_id:e.string(),created_at:e.iso.datetime({}),linked_document_voided_at:e.iso.datetime({}).nullish(),related_document:e.object({id:e.string(),type:e.enum(["invoice","estimate","credit_note","advance_invoice","delivery_note"]).describe("Type of document"),number:e.string(),date:e.string(),total_with_tax:e.number(),currency_code:e.string(),is_draft:e.boolean(),voided_at:e.string().nullable(),paid_in_full:e.boolean().nullable(),title_type:e.union([e.literal("estimate"),e.literal("proforma_invoice"),e.literal(null)]).nullable(),hide_prices:e.boolean().nullable()}).optional()})).optional()}).describe("Invoice document with fiscalization support"),cfe=e.object({shareableId:e.string().describe("Shareable document token")}),lfe=e.object({locale:e.enum(["en-US","de-DE","it-IT","fr-FR","es-ES","sl-SI","pt-PT","nl-NL","pl-PL","hr-HR","sv-SE","fi-FI","et-EE","bg-BG","cs-CZ","sk-SK","nb-NO","is-IS"]).optional().describe("Locale for number and date formatting (decimal separators, date order). Defaults to entity locale."),language:e.enum(["en-US","de-DE","it-IT","fr-FR","es-ES","sl-SI","pt-PT","nl-NL","pl-PL","hr-HR","sv-SE","fi-FI","et-EE","bg-BG","cs-CZ","sk-SK","nb-NO","is-IS"]).optional().describe("Language for document labels/translations. Defaults to locale value. Use to get entity-locale formatting with different-language labels.")}),ufe=e.object({shareableId:e.string().describe("Shareable document token")}),pfe=e.object({locale:e.enum(["en-US","de-DE","it-IT","fr-FR","es-ES","sl-SI","pt-PT","nl-NL","pl-PL","hr-HR","sv-SE","fi-FI","et-EE","bg-BG","cs-CZ","sk-SK","nb-NO","is-IS"]).optional().describe("Locale for number and date formatting (decimal separators, date order). Defaults to entity locale."),language:e.enum(["en-US","de-DE","it-IT","fr-FR","es-ES","sl-SI","pt-PT","nl-NL","pl-PL","hr-HR","sv-SE","fi-FI","et-EE","bg-BG","cs-CZ","sk-SK","nb-NO","is-IS"]).optional().describe("Language for document labels/translations. Defaults to locale value. Use to get entity-locale formatting with different-language labels.")}),mfe=e.object({shareableId:e.string().describe("Shareable document token")}),gfe=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),r8=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,i8=2,a8=2,d8="iban",c8=2,l8=2,u8="iban",p8=500,m8=3,g8=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,y8=35,h8=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,b8=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,x8=2e3,z8=-140737488355328,_8=0x7fffffffffff,v8=50,f8=0,R8="percent",I8=5,E8=36,S8=36,D8=0,P8=20,w8=/^[0-9a-zA-Z]{1,20}$/,C8=20,A8=/^\d{1,20}$/,M8=11,T8=11,k8=0,yfe=e.object({is_draft:e.boolean().optional().describe("Whether this is a draft document. Draft documents have no sequential number assigned, skip fiscalization, and can be deleted. Use POST /{documents}/{id}/finalize to assign a number and finalize."),date:e.string().regex(r8).optional().describe("Document date in YYYY-MM-DD format"),issuer:e.object({name:e.string().nullish(),email:e.email().nullish(),address:e.string().nullish(),address_2:e.string().nullish(),post_code:e.string().nullish(),city:e.string().nullish(),state:e.string().nullish(),country:e.string().nullish(),country_code:e.string().min(i8).max(a8).nullish(),tax_number:e.string().nullish(),tax_number_2:e.string().nullish(),company_number:e.string().nullish(),phone:e.string().nullish(),peppol_id:e.string().nullish(),is_end_consumer:e.boolean().nullish(),bank_account:e.object({type:e.enum(["iban","us_domestic","uk_domestic","other"]).default(d8).describe("Account type determines which fields are used"),name:e.string().nullish().describe("Display name for this account. Falls back to account number if not set"),bank_name:e.string().nullish().describe("Bank name"),iban:e.string().nullish().describe("IBAN (for type=iban)"),account_number:e.string().nullish().describe("Account number (for us_domestic, uk_domestic, other)"),bic:e.string().nullish().describe("BIC/SWIFT code for international transfers"),routing_number:e.string().nullish().describe("US ABA routing number (for type=us_domestic)"),sort_code:e.string().nullish().describe("UK sort code (for type=uk_domestic)")}).nullish()}).optional().describe("Document issuer (entity) information"),customer_id:e.string().nullish().describe("Referenced Customer ID. Required if customer is not provided."),customer:e.object({name:e.string().nullish(),email:e.email().nullish(),address:e.string().nullish(),address_2:e.string().nullish(),post_code:e.string().nullish(),city:e.string().nullish(),state:e.string().nullish(),country:e.string().nullish(),country_code:e.string().min(c8).max(l8).nullish(),tax_number:e.string().nullish(),tax_number_2:e.string().nullish(),company_number:e.string().nullish(),phone:e.string().nullish(),peppol_id:e.string().nullish(),is_end_consumer:e.boolean().nullish(),bank_account:e.object({type:e.enum(["iban","us_domestic","uk_domestic","other"]).default(u8).describe("Account type determines which fields are used"),name:e.string().nullish().describe("Display name for this account. Falls back to account number if not set"),bank_name:e.string().nullish().describe("Bank name"),iban:e.string().nullish().describe("IBAN (for type=iban)"),account_number:e.string().nullish().describe("Account number (for us_domestic, uk_domestic, other)"),bic:e.string().nullish().describe("BIC/SWIFT code for international transfers"),routing_number:e.string().nullish().describe("US ABA routing number (for type=us_domestic)"),sort_code:e.string().nullish().describe("UK sort code (for type=uk_domestic)")}).nullish()}).describe("Document issuer (entity) information").and(e.object({save_customer:e.boolean().nullish().describe("Whether to save (create new or update existing) the customer data.\nDefaults to `true` (best-effort).\nWhen `true` with `customer_id`, updates the existing customer.\nWhen `true` without `customer_id`, checks for duplicate customers using customer identifiers (tax/company number, country-aware when available) and reuses the existing customer if found, otherwise creates a new customer.\nWhen `false`, customer data is stored inline on the document only.\nWhen omitted, behaves like `true` but won't fail the request if persistence fails.")}).nullable()).optional().describe("Customer recipient of the document.\nBoth `customer` and `customer_id` are optional - documents can be created without customer information.\nIf both `customer_id` and `customer` are provided with `save_customer=true`, the existing customer will be updated.\nIf only `customer` is provided with `save_customer=true` (or by default), the system checks for duplicates using customer identifiers and reuses existing customers when found."),note:e.string().nullish().describe("Note for the document. If not provided, defaults to entity's document-type-specific note setting. Pass empty string to explicitly set no note."),payment_terms:e.string().nullish().describe("Payment terms for the document. If not provided, defaults to entity's document-type-specific payment terms setting. Pass empty string to explicitly set no terms."),tax_clause:e.string().nullish().describe("Tax clause for the document. Auto-populated based on transaction type if tax_clause_defaults are configured in entity settings. Pass empty string to explicitly set no clause."),footer:e.string().max(p8).nullish(),signature:e.string().nullish().describe("Signature text for the document (e.g. 'John Smith, CEO'). If not provided, defaults to entity's default_document_signature setting. Pass empty string to explicitly set no signature."),calculation_mode:e.union([e.literal("b2b_standard"),e.literal("b2c_gross_discount"),e.literal(null)]).nullish().describe("Optional calculation mode override. When omitted, the entity default is used and falls back to `b2b_standard`."),currency_code:e.string().max(m8).optional(),metadata:e.record(e.string(),e.string()).nullish().describe("Custom key-value data for your own use. Store any JSON object up to 50 properties. Values must be strings up to 250 characters. Useful for storing external IDs, tags, or integration data."),reference:e.string().nullish().describe("Custom reference for the document (e.g., purchase order number, payment reference). When set, used as the UPN payment reference instead of the auto-generated one."),date_due:e.string().regex(g8).nullish().describe("Document due date in YYYY-MM-DD format"),pt:e.object({series_id:e.string().nullish().describe("ATCUD series ID to use for PT numbering. Required for PT manual documents."),manual:e.boolean().nullish().describe("Marks this PT document as manually issued/offline."),manual_sequential_number:e.number().min(1).nullish().describe("Manual PT sequence number shown on the offline/original document."),manual_series_code:e.string().min(1).max(y8).nullish().describe("Offline/manual PT series code shown on the original document."),operator_first_name:e.string().min(1).nullish().describe("PT operator first name snapshot for PT compliance."),operator_last_name:e.string().min(1).nullish().describe("PT operator last name snapshot for PT compliance."),operator_tax_number:e.string().min(1).nullish().describe("PT operator tax number snapshot for PT compliance."),account_first_name:e.string().min(1).nullish().describe("Deprecated alias for PT operator first name snapshot."),account_last_name:e.string().min(1).nullish().describe("Deprecated alias for PT operator last name snapshot."),account_tax_number:e.string().min(1).nullish().describe("Deprecated alias for PT operator tax number snapshot.")}).nullish(),date_service:e.string().regex(h8).nullish().describe("Service date in YYYY-MM-DD format. For invoices and credit notes."),date_service_to:e.string().regex(b8).nullish().describe("Service period end date in YYYY-MM-DD format. For invoices and credit notes. Use with date_service for date ranges."),items:e.array(e.object({type:e.union([e.literal("separator"),e.literal(null)]).nullish().describe(`Item type. Omit or null for regular line item, 'separator' for a visual section header.
|
|
182
|
+
Separator items only use name and description \u2014 all financial fields are ignored.`),name:e.string().min(1).nullish().describe("Item name. Required unless `item_id` is provided.\nFor separator items, this is the section title (always required)."),description:e.string().max(x8).nullish(),classification:e.union([e.literal("product"),e.literal("service"),e.literal("advance"),e.literal(null)]).nullish().describe("Item classification used for Portugal SAF-T product typing."),price:e.number().nullish().describe("Net price per unit (before tax).\nProvide either `price` OR `gross_price`, not both.\nOptional if `item_id` is provided. Ignored for separator items."),gross_price:e.number().nullish().describe("Gross price per unit (includes tax).\nIf provided, net price is calculated.\nProvide either `price` OR `gross_price`, not both.\nOptional if `item_id` is provided. Ignored for separator items."),quantity:e.number().min(z8).max(_8).nullish().describe("Item quantity. Required for regular items. Ignored for separator items."),unit:e.string().max(v8).nullish(),taxes:e.array(e.object({rate:e.number().nullish(),tax_id:e.string().nullish(),classification:e.string().nullish(),reverse_charge:e.boolean().nullish(),amount:e.number().nullish(),pt_exemption_code:e.string().nullish(),pt_exemption_reason:e.string().nullish()}).describe("Document Item Tax")).optional().describe("Applied taxes (provide rate to create new tax, or tax_id to use existing tax)"),discounts:e.array(e.object({value:e.number().min(f8).describe("Discount value"),type:e.enum(["percent","amount"]).default(R8).describe("Discount type: 'percent' (default) or 'amount'")})).max(I8).optional().describe("Line discounts (max 5) in request order. In `b2b_standard`, percentage discounts are calculated from the original line subtotal and fixed amounts are summed before tax. In `b2c_gross_discount`, discounts are applied sequentially to the running gross subtotal."),item_id:e.string().nullish().describe(`ID of a catalog item to prefill from.
|
|
183
|
+
When provided, the item's name, description, price, and taxes are used as defaults.
|
|
184
|
+
Any field you provide will override the catalog item's value.
|
|
185
|
+
Not applicable for separator items.`),metadata:e.record(e.string(),e.string()).nullish().describe("Custom key-value data for your own use. Store any JSON object up to 50 properties. Values must be strings up to 250 characters. Useful for storing external IDs, tags, or integration data."),save_item:e.boolean().nullish().describe(`Whether to save this item to the catalog.
|
|
186
|
+
When true without item_id, matches by exact name and reuses existing, or creates a new catalog item.
|
|
187
|
+
Defaults to true (best-effort). When omitted, behaves like true but won't fail the request if persistence fails.`)})).min(1).describe("Line items for the invoice. At least one item is required."),linked_documents:e.array(e.string().min(1)).nullish().describe("Link this invoice to other documents. Accepts estimate IDs (est_xxx) for converted estimates or credit note IDs (cre_xxx). Creates document relations automatically."),payments:e.array(e.object({incoming_purchase_document_id:e.string().max(E8).nullish(),applied_to_incoming_purchase_document_id:e.string().max(S8).nullish(),amount:e.number().gt(D8).nullish().describe("Payment amount. If not provided, uses the document total (total_with_tax)"),type:e.enum(["cash","bank_transfer","card","check","paypal","coupon","other","credit_note","advance"]).describe("Payment type/method"),date:e.string().nullish().describe("Payment date in YYYY-MM-DD format. Defaults to today."),tag:e.string().nullish(),reference:e.string().nullish(),note:e.string().nullish(),metadata:e.record(e.string(),e.string()).nullish().describe("Custom key-value data for your own use. Store any JSON object up to 50 properties. Values must be strings up to 250 characters. Useful for storing external IDs, tags, or integration data.")})).nullish().describe("Optional payments to record with the invoice. If amounts are not provided, the invoice total is split equally among all payments. Automatically updates invoice payment status."),furs:e.object({business_premise_name:e.string().min(1).nullish().describe("FURS business premise name (e.g., 'P1', 'STORE1'). Required unless skip=true."),electronic_device_name:e.string().min(1).nullish().describe("FURS electronic device name (e.g., 'E1', 'POS1'). Required unless skip=true."),operator_tax_number:e.string().nullish().describe("Operator tax number. If not provided and using user authentication, defaults to user's FURS settings."),operator_label:e.string().nullish().describe("Operator label/name. If not provided and using user authentication, defaults to user's FURS settings."),skip:e.boolean().nullish().describe("Skip FURS fiscalization. Only allowed for bank transfer payments or unpaid invoices. Cash/card/check payments always require fiscalization per Slovenian law.")}).nullish(),fina:e.object({business_premise_name:e.string().min(1).max(P8).regex(w8).nullish().describe("CIS business premise name (OznPosPr, alphanumeric, 1-20 chars). Required when CIS is enabled."),electronic_device_name:e.string().min(1).max(C8).regex(A8).nullish().describe("CIS electronic device name (OznNapUr, digits only, 1-20 chars). Required when CIS is enabled."),operator_oib:e.string().min(M8).max(T8).nullish().describe("Operator OIB (11 digits). If not provided and using user authentication, defaults to the user's FINA settings. Otherwise falls back to entity settings."),operator_label:e.string().nullish().describe("Operator label/name. If not provided and using user authentication, defaults to the user's FINA settings. Otherwise falls back to entity settings."),payment_type:e.union([e.literal("cash"),e.literal("card"),e.literal("online"),e.literal("bank_transfer"),e.literal("paypal"),e.literal("crypto"),e.literal("coupon"),e.literal("other"),e.literal(null)]).nullish().describe("Expected payment method for CIS (NacinPlac field). Optional when document payments are provided because the API derives it from the document payments; when multiple payments are present, FINA uses 'other'."),subsequent_submit:e.boolean().nullish().describe("Late/subsequent submission flag (NakDost). Set to true if submitting after the normal deadline.")}).nullish(),eslog:e.object({validation_enabled:e.boolean().nullish().describe("Enable e-SLOG validation for this document. true = validate, false = skip, null/undefined = use entity default")}).nullish(),expected_total_with_tax:e.number().gt(k8).nullish().describe("Expected total with tax. When provided, the system calculates a rounding_correction to reconcile differences between the calculated total and this expected value. Maximum allowed correction is \xB11.00. Useful when importing invoices from external systems with different rounding rules."),force_linked_documents:e.boolean().nullish().describe("Force linking documents even if an advance invoice is already applied to another invoice. Defaults to false.")}),B8=10,N8=100,hfe=e.object({limit:e.number().min(1).max(N8).default(B8).describe("Number of results per request."),next_cursor:e.string().optional().describe("Opaque cursor to fetch the next page of results. Reuse only with the same effective ordering. Use the value from pagination.next_cursor in the previous response."),prev_cursor:e.string().optional().describe("Opaque cursor to fetch the previous page of results. Reuse only with the same effective ordering. Use the value from pagination.prev_cursor in the previous response."),include_total_count:e.boolean().optional().describe("Whether to include the total count of items in `pagination.total`.\nDefault is `true`.\nWhen `false`, `pagination.total` returns -1 for better performance."),order_by:e.union([e.enum(["id","number","date","total","total_with_tax","created_at","updated_at","date_due","-id","-number","-date","-total","-total_with_tax","-created_at","-updated_at","-date_due"]),e.array(e.enum(["id","number","date","total","total_with_tax","created_at","updated_at","date_due","-id","-number","-date","-total","-total_with_tax","-created_at","-updated_at","-date_due"]))]).optional().describe("Sort by one field or provide a repeated array for multi-column ordering. Prefix a field with `-` for descending order. When paginating, reuse cursors only with the same effective ordering."),query:e.string().optional().describe('JSON query object for filtering results. Supports MongoDB-style operators.\n\n**Supported operators:**\n- `equals` or direct value - Exact match (default)\n- `gte` - Greater than or equal\n- `lte` - Less than or equal\n- `gt` - Greater than\n- `lt` - Less than\n- `in` - Value in array\n- `notIn` - Value not in array\n- `contains` - String contains (case-insensitive)\n- `startsWith` - String starts with\n- `endsWith` - String ends with\n- `between` - Value between two numbers/dates [min, max]\n\n**Allowed fields:** id, number, date, customer, customer.name, customer.email, customer.address, customer.city, customer.country, total, total_with_tax, items.name, items.description, payments.type, payments.date, document_relations.relation_type, document_relations.target_type, metadata, created_at, updated_at, paid_in_full, voided_at, date_due, paid_in_full, total_due, total_paid, voided_at\n\n**Examples:**\n- `{"total": {"gte": 1000}}` - Invoices over 1000\n- `{"customer.name": {"contains": "Acme"}}` - Customer name contains "Acme"\n- `{"date": {"between": ["2025-01-01", "2025-12-31"]}}` - Date range'),search:e.string().optional().describe(`Full-text search query to filter results across multiple fields.
|
|
188
|
+
Searches are case-insensitive and match partial strings.
|
|
189
|
+
Searches across all text fields including names, descriptions, addresses, and metadata values.`),include:e.string().optional().describe("Comma-separated list of relations to include in the response.\n\n**Available relations:**\n- `payments` - Payment records linked to this invoice\n- `document_relations` - Linked documents (credit notes, advance invoices, etc.)\n\n**Usage:**\n`?include=payments`\n`?include=payments,document_relations`"),deleted:e.boolean().optional().describe("When true, returns only soft-deleted (trashed) items. Default false excludes deleted items.")}),bfe=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),O8=36,F8=100,U8=2,j8=2,q8="iban",W8=36,G8=2,V8=2,L8="iban",H8=500,Y8=-140737488355328,K8=0x7fffffffffff,$8=-140737488355328,Q8=0x7fffffffffff,J8=3,Z8=36,X8=-2147483648,eW=2147483647,tW=100,oW=-140737488355328,nW=0x7fffffffffff,sW=-140737488355328,rW=0x7fffffffffff,iW=-140737488355328,aW=0x7fffffffffff,dW=-140737488355328,cW=0x7fffffffffff,lW=0,uW=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,pW=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,mW=36,gW=500,yW=50,hW=0,bW="percent",xW=5,zW=-140737488355328,_W=0x7fffffffffff,vW=-140737488355328,fW=0x7fffffffffff,RW=36,IW=36,EW=36,SW=36,xfe=e.object({data:e.array(e.object({id:e.string().max(O8),number:e.string().max(F8),is_draft:e.boolean().describe("Whether this is a draft document. Draft documents have no sequential number assigned, skip fiscalization, and can be deleted. Use POST /{documents}/{id}/finalize to assign a number and finalize."),date:e.iso.datetime({}).describe("Date the invoice was created (ISO 8601 datetime at midnight UTC)"),issuer:e.object({name:e.string().nullish(),email:e.email().nullish(),address:e.string().nullish(),address_2:e.string().nullish(),post_code:e.string().nullish(),city:e.string().nullish(),state:e.string().nullish(),country:e.string().nullish(),country_code:e.string().min(U8).max(j8).nullish(),tax_number:e.string().nullish(),tax_number_2:e.string().nullish(),company_number:e.string().nullish(),phone:e.string().nullish(),peppol_id:e.string().nullish(),is_end_consumer:e.boolean().nullish(),bank_account:e.object({type:e.enum(["iban","us_domestic","uk_domestic","other"]).default(q8).describe("Account type determines which fields are used"),name:e.string().nullish().describe("Display name for this account. Falls back to account number if not set"),bank_name:e.string().nullish().describe("Bank name"),iban:e.string().nullish().describe("IBAN (for type=iban)"),account_number:e.string().nullish().describe("Account number (for us_domestic, uk_domestic, other)"),bic:e.string().nullish().describe("BIC/SWIFT code for international transfers"),routing_number:e.string().nullish().describe("US ABA routing number (for type=us_domestic)"),sort_code:e.string().nullish().describe("UK sort code (for type=uk_domestic)")}).nullish()}).describe("Document issuer (entity) information"),customer_id:e.string().max(W8).nullish(),customer:e.object({name:e.string().nullish(),email:e.email().nullish(),address:e.string().nullish(),address_2:e.string().nullish(),post_code:e.string().nullish(),city:e.string().nullish(),state:e.string().nullish(),country:e.string().nullish(),country_code:e.string().min(G8).max(V8).nullish(),tax_number:e.string().nullish(),tax_number_2:e.string().nullish(),company_number:e.string().nullish(),phone:e.string().nullish(),peppol_id:e.string().nullish(),is_end_consumer:e.boolean().nullish(),bank_account:e.object({type:e.enum(["iban","us_domestic","uk_domestic","other"]).default(L8).describe("Account type determines which fields are used"),name:e.string().nullish().describe("Display name for this account. Falls back to account number if not set"),bank_name:e.string().nullish().describe("Bank name"),iban:e.string().nullish().describe("IBAN (for type=iban)"),account_number:e.string().nullish().describe("Account number (for us_domestic, uk_domestic, other)"),bic:e.string().nullish().describe("BIC/SWIFT code for international transfers"),routing_number:e.string().nullish().describe("US ABA routing number (for type=us_domestic)"),sort_code:e.string().nullish().describe("UK sort code (for type=uk_domestic)")}).nullish()}).nullish().describe("Customer information"),note:e.string().nullish().describe("Note for the document. If not provided, defaults to entity's document-type-specific note setting. Pass empty string to explicitly set no note."),payment_terms:e.string().nullish().describe("Payment terms for the document. If not provided, defaults to entity's document-type-specific payment terms setting. Pass empty string to explicitly set no terms."),tax_clause:e.string().nullish().describe("Tax clause for the document. Auto-populated based on transaction type if tax_clause_defaults are configured in entity settings. Pass empty string to explicitly set no clause."),footer:e.string().max(H8).nullish(),signature:e.string().nullish().describe("Signature text for the document (e.g. 'John Smith, CEO'). If not provided, defaults to entity's default_document_signature setting. Pass empty string to explicitly set no signature."),total:e.number().min(Y8).max(K8),total_with_tax:e.number().min($8).max(Q8),total_discount:e.number().describe("Document discount total stored as a net-equivalent amount for compatibility. In `b2b_standard`, this is the net value of line-item discounts applied before tax. In `b2c_gross_discount`, gross discounts are converted back to their net-equivalent value here. 0 when no discounts applied."),creation_source:e.enum(["standard","custom"]).describe("Internal origin of the create request. `standard` means a normal create endpoint calculated the totals. `custom` means the document was created through a `/custom` endpoint."),calculation_mode:e.enum(["b2b_standard","b2c_gross_discount"]).describe("Resolved calculation mode used for this document. Stored on the document so recalculation and rendering remain stable even if entity defaults change later."),taxes:e.array(e.object({rate:e.number().nullable(),tax_id:e.string().nullish(),base:e.number(),amount:e.number(),reverse_charge:e.boolean().nullish()})).describe("Applied taxes summary"),currency_code:e.string().max(J8),entity_id:e.string().max(Z8),date_year:e.number().min(X8).max(eW),shareable_id:e.string().max(tW).nullish(),voided_at:e.iso.datetime({}).nullish(),transaction_type:e.union([e.literal("domestic"),e.literal("intra_eu_b2b"),e.literal("intra_eu_b2c"),e.literal("3w_b2b"),e.literal("3w_b2c"),e.literal("export"),e.literal(null)]).nullish().describe("Transaction type for VAT purposes (domestic, intra_eu_b2b, intra_eu_b2c, export). Always determined based on issuer/customer countries."),metadata:e.record(e.string(),e.string()).nullish().describe("Custom key-value data for your own use. Store any JSON object up to 50 properties. Values must be strings up to 250 characters. Useful for storing external IDs, tags, or integration data."),exchange_rate:e.object({rate:e.number().describe("Exchange rate used for conversion"),source:e.string().describe("Source of the exchange rate (e.g., 'Frankfurter')"),date:e.iso.datetime({}).describe("Date of the exchange rate"),quote_currency:e.string().describe("Quote currency (the base currency converted to)")}).nullish().describe("Currency exchange rate information if conversion was applied"),total_converted:e.number().min(oW).max(nW).nullish(),total_with_tax_converted:e.number().min(sW).max(rW).nullish(),rounding_correction:e.number().nullish().describe("Rounding correction applied to reconcile differences between calculated total_with_tax and expected_total_with_tax. Only present when expected_total_with_tax was provided during creation."),eslog:e.object({validation_enabled:e.boolean().nullish().describe("Override entity default: true = validate, false = skip, null = use entity setting"),validation_status:e.union([e.literal("valid"),e.literal("invalid"),e.literal("not_validated"),e.literal(null)]).nullish().describe("Validation status: 'valid', 'invalid', or 'not_validated'"),validation_errors:e.array(e.string()).nullish().describe("Array of validation error messages (if status is 'invalid')"),validated_at:e.string().nullish().describe("ISO timestamp when validation was last performed")}).nullish().describe("e-SLOG 2.0 validation data for Slovenian electronic invoices. Only applicable when entity.country_code = 'SI' and eslog validation is enabled."),reference:e.string().nullish().describe("Custom reference for the document (e.g., purchase order number, payment reference). When set, used as the UPN payment reference instead of the auto-generated one."),vies:e.object({warning:e.string().nullable().describe("Warning message if VIES validation was unavailable or the VAT number was invalid. Document creation proceeds but this indicates the transaction type may need review."),skipped:e.boolean().nullable().describe("True when VIES validation was skipped due to entity settings (vies_validate_vat: false) but would normally apply. Used for audit trail.")}).nullish().describe("VIES validation info including any warnings and skipped indicator for audit trail"),deleted_at:e.iso.datetime({}).nullish().describe("Timestamp when the document was soft-deleted. Null if not deleted."),created_at:e.iso.datetime({}),updated_at:e.iso.datetime({}),date_due:e.iso.datetime({}).nullish().describe("Date the invoice is due (ISO 8601 datetime at midnight UTC)"),total_paid:e.number().min(iW).max(aW),total_due:e.number().min(dW).max(cW),paid_in_full:e.boolean(),furs:e.object({status:e.enum(["pending","success","failed","skipped"]),fiscalized_at:e.iso.datetime({}).optional(),error:e.string().optional(),cancellation_reason:e.string().optional(),data:e.object({zoi:e.string(),eor:e.string().optional(),qr_code:e.string().optional(),business_premise_name:e.string(),electronic_device_name:e.string(),invoice_number:e.string(),iteration:e.number().default(lW),payload:e.record(e.string(),e.unknown()).describe("FURS API request payload"),issuer_tax_number:e.string().optional(),operator_tax_number:e.string().optional(),operator_label:e.string().optional(),foreign_operator:e.boolean().optional(),cancelled:e.boolean().optional(),cancelled_eor:e.string().optional(),cancellation_payload:e.record(e.string(),e.unknown()).optional().describe("FURS API cancellation payload")}).optional()}).nullish().describe("FURS (Slovenia) fiscalization data. Read-only field, not editable via API. Includes status, premise name, device name, and FURS identifiers (ZOI, EOR, QR code)."),fina:e.object({status:e.enum(["pending","success","failed"]),fiscalized_at:e.iso.datetime({}).optional(),error:e.string().optional(),data:e.object({zki:e.string(),jir:e.string().optional(),qr_code_url:e.string().optional(),business_premise_name:e.string(),electronic_device_name:e.string(),invoice_number:e.string(),operator_oib:e.string().optional(),payment_type:e.string().optional(),numbering_sequence:e.string().optional(),payload:e.record(e.string(),e.unknown()).describe("CIS SOAP request payload"),subsequent_submit:e.boolean().optional(),issuer_oib:e.string().optional(),operator_label:e.string().optional()}).optional()}).nullish().describe("FINA (Croatia) CIS fiscalization data. Read-only field. Includes status, business premise name, electronic device name, and CIS identifiers (ZKI, JIR, QR code URL)."),pt:e.union([e.string(),e.number(),e.boolean(),e.null(),e.record(e.string(),e.unknown()),e.array(e.unknown())]).optional(),date_service:e.string().regex(uW).nullish().describe("Service date in YYYY-MM-DD format. For invoices and credit notes."),date_service_to:e.string().regex(pW).nullish().describe("Service period end date in YYYY-MM-DD format. For invoices and credit notes. Use with date_service for date ranges."),items:e.array(e.object({id:e.string().max(mW),type:e.union([e.literal("separator"),e.literal(null)]).nullish().describe("Item type. null = regular line item, 'separator' = visual section header."),name:e.string().max(gW),description:e.string().nullable(),classification:e.union([e.literal("product"),e.literal("service"),e.literal("advance"),e.literal(null)]).nullish().describe("Item classification used for Portugal SAF-T product typing."),price:e.number().nullish().describe("Per-unit net price (before tax). Always stores net price. Null for separator items."),gross_price:e.number().nullish().describe(`Per-unit gross price (includes tax).
|
|
190
|
+
Only present if user originally sent gross price.
|
|
191
|
+
Use gross pricing to keep invoice totals stable when VIES reverse charge is applied.`),quantity:e.number().nullish().describe("Item quantity. Null for separator items."),unit:e.string().max(yW).nullish(),taxes:e.array(e.object({rate:e.number().nullish(),tax_id:e.string().nullish(),classification:e.string().nullish(),reverse_charge:e.boolean().nullish(),amount:e.number().nullish(),pt_exemption_code:e.string().nullish(),pt_exemption_reason:e.string().nullish()}).describe("Document Item Tax")).describe("Applied taxes (provide rate to create new tax, or tax_id to use existing tax)"),discounts:e.array(e.object({value:e.number().min(hW).describe("Discount value"),type:e.enum(["percent","amount"]).default(bW).describe("Discount type: 'percent' (default) or 'amount'")})).max(xW).describe("Line discounts (max 5) in request order. In `b2b_standard`, percentage discounts are calculated from the original line subtotal and fixed amounts are summed before tax. In `b2c_gross_discount`, discounts are applied sequentially to the running gross subtotal."),total:e.number().nullish().describe("Line total before tax. Null for separator items."),total_with_tax:e.number().nullish().describe("Line total after tax. Null for separator items."),total_converted:e.number().min(zW).max(_W).nullish(),total_with_tax_converted:e.number().min(vW).max(fW).nullish(),invoice_id:e.string().max(RW).nullish(),advance_invoice_id:e.string().max(IW).nullish(),delivery_note_id:e.string().max(EW).nullish(),item_id:e.string().max(SW).nullish(),metadata:e.record(e.string(),e.string()).nullish().describe("Custom key-value data for your own use. Store any JSON object up to 50 properties. Values must be strings up to 250 characters. Useful for storing external IDs, tags, or integration data."),created_at:e.iso.datetime({}),updated_at:e.iso.datetime({})})),document_relations:e.array(e.object({id:e.string(),source_type:e.enum(["invoice","estimate","credit_note","advance_invoice","delivery_note"]).describe("Type of document"),source_id:e.string(),target_type:e.enum(["invoice","estimate","credit_note","advance_invoice","delivery_note"]).describe("Type of document"),target_id:e.string(),relation_type:e.string(),entity_id:e.string(),created_at:e.iso.datetime({}),linked_document_voided_at:e.iso.datetime({}).nullish(),related_document:e.object({id:e.string(),type:e.enum(["invoice","estimate","credit_note","advance_invoice","delivery_note"]).describe("Type of document"),number:e.string(),date:e.string(),total_with_tax:e.number(),currency_code:e.string(),is_draft:e.boolean(),voided_at:e.string().nullable(),paid_in_full:e.boolean().nullable(),title_type:e.union([e.literal("estimate"),e.literal("proforma_invoice"),e.literal(null)]).nullable(),hide_prices:e.boolean().nullable()}).optional()})).optional()}).describe("Invoice document with fiscalization support")),pagination:e.object({total:e.number().describe("Total number of items available in the collection"),next_cursor:e.string().nullable().describe("Opaque cursor for fetching the next page. It encodes the resolved sort tuple for the current result set, so reuse it only with the same effective ordering. Null if no more results are available."),prev_cursor:e.string().nullable().describe("Opaque cursor for fetching the previous page. It encodes the resolved sort tuple for the current result set, so reuse it only with the same effective ordering. Null if at the first page."),has_more:e.boolean().describe("Indicates whether more results are available after the current page")}).describe("Pagination metadata including cursors and result counts")}),zfe=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),DW=2,PW=2,wW="iban",CW=2,AW=2,MW="iban",TW=2e3,kW=50,BW=0,NW="percent",OW=5,FW=36,UW=36,jW=0,qW=20,WW=/^[0-9a-zA-Z]{1,20}$/,GW=20,VW=/^\d{1,20}$/,LW=11,HW=11,_fe=e.object({is_draft:e.boolean().nullish(),date:e.string().nullish(),issuer:e.object({name:e.string().nullish(),email:e.email().nullish(),address:e.string().nullish(),address_2:e.string().nullish(),post_code:e.string().nullish(),city:e.string().nullish(),state:e.string().nullish(),country:e.string().nullish(),country_code:e.string().min(DW).max(PW).nullish(),tax_number:e.string().nullish(),tax_number_2:e.string().nullish(),company_number:e.string().nullish(),phone:e.string().nullish(),peppol_id:e.string().nullish(),is_end_consumer:e.boolean().nullish(),bank_account:e.object({type:e.enum(["iban","us_domestic","uk_domestic","other"]).default(wW).describe("Account type determines which fields are used"),name:e.string().nullish().describe("Display name for this account. Falls back to account number if not set"),bank_name:e.string().nullish().describe("Bank name"),iban:e.string().nullish().describe("IBAN (for type=iban)"),account_number:e.string().nullish().describe("Account number (for us_domestic, uk_domestic, other)"),bic:e.string().nullish().describe("BIC/SWIFT code for international transfers"),routing_number:e.string().nullish().describe("US ABA routing number (for type=us_domestic)"),sort_code:e.string().nullish().describe("UK sort code (for type=uk_domestic)")}).nullish()}).describe("Document issuer (entity) information").and(e.looseObject({}).nullable()).optional(),customer_id:e.string().nullish().describe("Referenced Customer ID."),customer:e.object({name:e.string().nullish(),email:e.email().nullish(),address:e.string().nullish(),address_2:e.string().nullish(),post_code:e.string().nullish(),city:e.string().nullish(),state:e.string().nullish(),country:e.string().nullish(),country_code:e.string().min(CW).max(AW).nullish(),tax_number:e.string().nullish(),tax_number_2:e.string().nullish(),company_number:e.string().nullish(),phone:e.string().nullish(),peppol_id:e.string().nullish(),is_end_consumer:e.boolean().nullish(),bank_account:e.object({type:e.enum(["iban","us_domestic","uk_domestic","other"]).default(MW).describe("Account type determines which fields are used"),name:e.string().nullish().describe("Display name for this account. Falls back to account number if not set"),bank_name:e.string().nullish().describe("Bank name"),iban:e.string().nullish().describe("IBAN (for type=iban)"),account_number:e.string().nullish().describe("Account number (for us_domestic, uk_domestic, other)"),bic:e.string().nullish().describe("BIC/SWIFT code for international transfers"),routing_number:e.string().nullish().describe("US ABA routing number (for type=us_domestic)"),sort_code:e.string().nullish().describe("UK sort code (for type=uk_domestic)")}).nullish()}).describe("Document issuer (entity) information").and(e.object({save_customer:e.boolean().nullish().describe("Whether to save (create new or update existing) the customer data.\nDefaults to `true` (best-effort).\nWhen `true` with `customer_id`, updates the existing customer.\nWhen `true` without `customer_id`, checks for duplicate customers using customer identifiers (tax/company number, country-aware when available) and reuses the existing customer if found, otherwise creates a new customer.\nWhen `false`, customer data is stored inline on the document only.\nWhen omitted, behaves like `true` but won't fail the request if persistence fails.")}).nullable()).optional().describe("Customer recipient of the document.\nBoth `customer` and `customer_id` are optional - documents can be created without customer information.\nIf both `customer_id` and `customer` are provided with `save_customer=true`, the existing customer will be updated.\nIf only `customer` is provided with `save_customer=true` (or by default), the system checks for duplicates using customer identifiers and reuses existing customers when found."),note:e.string().nullish(),payment_terms:e.string().nullish(),tax_clause:e.string().nullish(),footer:e.string().nullish(),signature:e.string().nullish(),calculation_mode:e.union([e.literal("b2b_standard"),e.literal("b2c_gross_discount"),e.literal(null)]).nullish().describe("Optional calculation mode override. When omitted, the entity default is used and falls back to `b2b_standard`."),currency_code:e.string().nullish(),metadata:e.record(e.string(),e.string()).nullish().describe("Custom key-value data for your own use. Store any JSON object up to 50 properties. Values must be strings up to 250 characters. Useful for storing external IDs, tags, or integration data."),reference:e.string().nullish(),date_due:e.string().nullish(),pt:e.union([e.string(),e.number(),e.boolean(),e.null(),e.record(e.string(),e.unknown()),e.array(e.unknown())]).optional(),date_service:e.string().nullish(),date_service_to:e.string().nullish(),items:e.array(e.object({type:e.union([e.literal("separator"),e.literal(null)]).nullish().describe(`Item type. Omit or null for regular line item, 'separator' for a visual section header.
|
|
192
|
+
Separator items only use name and description \u2014 all financial fields are ignored.`),name:e.string().min(1).nullish().describe("Item name. Required unless `item_id` is provided.\nFor separator items, this is the section title (always required)."),description:e.string().max(TW).nullish(),classification:e.union([e.literal("product"),e.literal("service"),e.literal("advance"),e.literal(null)]).nullish().describe("Item classification used for Portugal SAF-T product typing."),price:e.number().nullish().describe("Net price per unit (before tax). Optional for custom documents. Ignored for separator items."),gross_price:e.number().nullish().describe("Gross price per unit (includes tax). Optional for custom documents. Ignored for separator items."),quantity:e.number().nullish().describe("Item quantity. Null for separator items."),unit:e.string().max(kW).nullish(),taxes:e.array(e.object({rate:e.number().nullish(),tax_id:e.string().nullish(),classification:e.string().nullish(),reverse_charge:e.boolean().nullish(),amount:e.number().nullish(),pt_exemption_code:e.string().nullish(),pt_exemption_reason:e.string().nullish()}).describe("Document Item Tax")).optional().describe("Applied taxes (provide rate to create new tax, or tax_id to use existing tax)"),discounts:e.array(e.object({value:e.number().min(BW).describe("Discount value"),type:e.enum(["percent","amount"]).default(NW).describe("Discount type: 'percent' (default) or 'amount'")})).max(OW).optional().describe("Line discounts (max 5) in request order. In `b2b_standard`, percentage discounts are calculated from the original line subtotal and fixed amounts are summed before tax. In `b2c_gross_discount`, discounts are applied sequentially to the running gross subtotal."),total:e.number().nullish().describe("Pre-calculated total for this line item (before tax). Ignored for separator items."),total_with_tax:e.number().nullish().describe("Pre-calculated total for this line item (after tax). Ignored for separator items."),item_id:e.string().nullish().describe(`ID of a catalog item to prefill from.
|
|
193
|
+
When provided, the item's name, description, price, and taxes are used as defaults.
|
|
194
|
+
Any field you provide will override the catalog item's value.
|
|
195
|
+
Not applicable for separator items.`),metadata:e.record(e.string(),e.string()).nullish().describe("Custom key-value data for your own use. Store any JSON object up to 50 properties. Values must be strings up to 250 characters. Useful for storing external IDs, tags, or integration data."),save_item:e.boolean().nullish().describe(`Whether to save this item to the catalog.
|
|
196
|
+
When true without item_id, matches by exact name and reuses existing, or creates a new catalog item.
|
|
197
|
+
Defaults to true (best-effort). When omitted, behaves like true but won't fail the request if persistence fails.`)})).min(1).describe("Line items with pre-calculated totals. At least one item is required."),total:e.number().describe("Pre-calculated document total (before tax)."),total_with_tax:e.number().describe("Pre-calculated document total (after tax)."),total_discount:e.number().nullish().describe("Pre-calculated total net discount amount. Defaults to 0 if not provided."),taxes:e.array(e.object({rate:e.number().nullable(),tax_id:e.string().nullish(),base:e.number(),amount:e.number(),reverse_charge:e.boolean().nullish()})).optional().describe("Pre-calculated tax summary. If not provided, defaults to empty array."),linked_documents:e.array(e.string().min(1)).nullish().describe("Link this invoice to other documents."),payments:e.array(e.object({incoming_purchase_document_id:e.string().max(FW).nullish(),applied_to_incoming_purchase_document_id:e.string().max(UW).nullish(),amount:e.number().gt(jW).nullish().describe("Payment amount. If not provided, uses the document total (total_with_tax)"),type:e.enum(["cash","bank_transfer","card","check","paypal","coupon","other","credit_note","advance"]).describe("Payment type/method"),date:e.string().nullish().describe("Payment date in YYYY-MM-DD format. Defaults to today."),tag:e.string().nullish(),reference:e.string().nullish(),note:e.string().nullish(),metadata:e.record(e.string(),e.string()).nullish().describe("Custom key-value data for your own use. Store any JSON object up to 50 properties. Values must be strings up to 250 characters. Useful for storing external IDs, tags, or integration data.")})).nullish().describe("Optional payments to record with the invoice. If amounts are not provided, the invoice total is split equally among all payments. Automatically updates invoice payment status."),furs:e.object({business_premise_name:e.string().min(1).nullish().describe("FURS business premise name (e.g., 'P1', 'STORE1'). Required unless skip=true."),electronic_device_name:e.string().min(1).nullish().describe("FURS electronic device name (e.g., 'E1', 'POS1'). Required unless skip=true."),operator_tax_number:e.string().nullish().describe("Operator tax number. If not provided and using user authentication, defaults to user's FURS settings."),operator_label:e.string().nullish().describe("Operator label/name. If not provided and using user authentication, defaults to user's FURS settings."),skip:e.boolean().nullish().describe("Skip FURS fiscalization. Only allowed for bank transfer payments or unpaid invoices. Cash/card/check payments always require fiscalization per Slovenian law.")}).nullish(),fina:e.object({business_premise_name:e.string().min(1).max(qW).regex(WW).nullish().describe("CIS business premise name (OznPosPr, alphanumeric, 1-20 chars). Required when CIS is enabled."),electronic_device_name:e.string().min(1).max(GW).regex(VW).nullish().describe("CIS electronic device name (OznNapUr, digits only, 1-20 chars). Required when CIS is enabled."),operator_oib:e.string().min(LW).max(HW).nullish().describe("Operator OIB (11 digits). If not provided and using user authentication, defaults to the user's FINA settings. Otherwise falls back to entity settings."),operator_label:e.string().nullish().describe("Operator label/name. If not provided and using user authentication, defaults to the user's FINA settings. Otherwise falls back to entity settings."),payment_type:e.union([e.literal("cash"),e.literal("card"),e.literal("online"),e.literal("bank_transfer"),e.literal("paypal"),e.literal("crypto"),e.literal("coupon"),e.literal("other"),e.literal(null)]).nullish().describe("Expected payment method for CIS (NacinPlac field). Optional when document payments are provided because the API derives it from the document payments; when multiple payments are present, FINA uses 'other'."),subsequent_submit:e.boolean().nullish().describe("Late/subsequent submission flag (NakDost). Set to true if submitting after the normal deadline.")}).nullish(),eslog:e.object({validation_enabled:e.boolean().nullish().describe("Enable e-SLOG validation for this document. true = validate, false = skip, null/undefined = use entity default")}).nullish(),force_linked_documents:e.boolean().nullish().describe("Force linking documents even if an advance invoice is already applied to another invoice. Defaults to false.")}),YW=/^[a-z]{3,4}_[0-9a-f]{24}$/,vfe=e.object({id:e.stringFormat("resource-id",YW).describe("Unique resource identifier")}),ffe=e.object({include:e.string().optional().describe("Comma-separated list of relations to include in the response.\n\n**Available relations:**\n- `payments` - Payment records linked to this invoice\n- `document_relations` - Linked documents (credit notes, advance invoices, etc.)\n\n**Usage:**\n`?include=payments`\n`?include=payments,document_relations`")}),Rfe=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),KW=36,$W=100,QW=2,JW=2,ZW="iban",XW=36,e7=2,t7=2,o7="iban",n7=500,s7=-140737488355328,r7=0x7fffffffffff,i7=-140737488355328,a7=0x7fffffffffff,d7=3,c7=36,l7=-2147483648,u7=2147483647,p7=100,m7=-140737488355328,g7=0x7fffffffffff,y7=-140737488355328,h7=0x7fffffffffff,b7=-140737488355328,x7=0x7fffffffffff,z7=-140737488355328,_7=0x7fffffffffff,v7=0,f7=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,R7=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,I7=36,E7=500,S7=50,D7=0,P7="percent",w7=5,C7=-140737488355328,A7=0x7fffffffffff,M7=-140737488355328,T7=0x7fffffffffff,k7=36,B7=36,N7=36,O7=36,Ife=e.object({id:e.string().max(KW),number:e.string().max($W),is_draft:e.boolean().describe("Whether this is a draft document. Draft documents have no sequential number assigned, skip fiscalization, and can be deleted. Use POST /{documents}/{id}/finalize to assign a number and finalize."),date:e.iso.datetime({}).describe("Date the invoice was created (ISO 8601 datetime at midnight UTC)"),issuer:e.object({name:e.string().nullish(),email:e.email().nullish(),address:e.string().nullish(),address_2:e.string().nullish(),post_code:e.string().nullish(),city:e.string().nullish(),state:e.string().nullish(),country:e.string().nullish(),country_code:e.string().min(QW).max(JW).nullish(),tax_number:e.string().nullish(),tax_number_2:e.string().nullish(),company_number:e.string().nullish(),phone:e.string().nullish(),peppol_id:e.string().nullish(),is_end_consumer:e.boolean().nullish(),bank_account:e.object({type:e.enum(["iban","us_domestic","uk_domestic","other"]).default(ZW).describe("Account type determines which fields are used"),name:e.string().nullish().describe("Display name for this account. Falls back to account number if not set"),bank_name:e.string().nullish().describe("Bank name"),iban:e.string().nullish().describe("IBAN (for type=iban)"),account_number:e.string().nullish().describe("Account number (for us_domestic, uk_domestic, other)"),bic:e.string().nullish().describe("BIC/SWIFT code for international transfers"),routing_number:e.string().nullish().describe("US ABA routing number (for type=us_domestic)"),sort_code:e.string().nullish().describe("UK sort code (for type=uk_domestic)")}).nullish()}).describe("Document issuer (entity) information"),customer_id:e.string().max(XW).nullish(),customer:e.object({name:e.string().nullish(),email:e.email().nullish(),address:e.string().nullish(),address_2:e.string().nullish(),post_code:e.string().nullish(),city:e.string().nullish(),state:e.string().nullish(),country:e.string().nullish(),country_code:e.string().min(e7).max(t7).nullish(),tax_number:e.string().nullish(),tax_number_2:e.string().nullish(),company_number:e.string().nullish(),phone:e.string().nullish(),peppol_id:e.string().nullish(),is_end_consumer:e.boolean().nullish(),bank_account:e.object({type:e.enum(["iban","us_domestic","uk_domestic","other"]).default(o7).describe("Account type determines which fields are used"),name:e.string().nullish().describe("Display name for this account. Falls back to account number if not set"),bank_name:e.string().nullish().describe("Bank name"),iban:e.string().nullish().describe("IBAN (for type=iban)"),account_number:e.string().nullish().describe("Account number (for us_domestic, uk_domestic, other)"),bic:e.string().nullish().describe("BIC/SWIFT code for international transfers"),routing_number:e.string().nullish().describe("US ABA routing number (for type=us_domestic)"),sort_code:e.string().nullish().describe("UK sort code (for type=uk_domestic)")}).nullish()}).nullish().describe("Customer information"),note:e.string().nullish().describe("Note for the document. If not provided, defaults to entity's document-type-specific note setting. Pass empty string to explicitly set no note."),payment_terms:e.string().nullish().describe("Payment terms for the document. If not provided, defaults to entity's document-type-specific payment terms setting. Pass empty string to explicitly set no terms."),tax_clause:e.string().nullish().describe("Tax clause for the document. Auto-populated based on transaction type if tax_clause_defaults are configured in entity settings. Pass empty string to explicitly set no clause."),footer:e.string().max(n7).nullish(),signature:e.string().nullish().describe("Signature text for the document (e.g. 'John Smith, CEO'). If not provided, defaults to entity's default_document_signature setting. Pass empty string to explicitly set no signature."),total:e.number().min(s7).max(r7),total_with_tax:e.number().min(i7).max(a7),total_discount:e.number().describe("Document discount total stored as a net-equivalent amount for compatibility. In `b2b_standard`, this is the net value of line-item discounts applied before tax. In `b2c_gross_discount`, gross discounts are converted back to their net-equivalent value here. 0 when no discounts applied."),creation_source:e.enum(["standard","custom"]).describe("Internal origin of the create request. `standard` means a normal create endpoint calculated the totals. `custom` means the document was created through a `/custom` endpoint."),calculation_mode:e.enum(["b2b_standard","b2c_gross_discount"]).describe("Resolved calculation mode used for this document. Stored on the document so recalculation and rendering remain stable even if entity defaults change later."),taxes:e.array(e.object({rate:e.number().nullable(),tax_id:e.string().nullish(),base:e.number(),amount:e.number(),reverse_charge:e.boolean().nullish()})).describe("Applied taxes summary"),currency_code:e.string().max(d7),entity_id:e.string().max(c7),date_year:e.number().min(l7).max(u7),shareable_id:e.string().max(p7).nullish(),voided_at:e.iso.datetime({}).nullish(),transaction_type:e.union([e.literal("domestic"),e.literal("intra_eu_b2b"),e.literal("intra_eu_b2c"),e.literal("3w_b2b"),e.literal("3w_b2c"),e.literal("export"),e.literal(null)]).nullish().describe("Transaction type for VAT purposes (domestic, intra_eu_b2b, intra_eu_b2c, export). Always determined based on issuer/customer countries."),metadata:e.record(e.string(),e.string()).nullish().describe("Custom key-value data for your own use. Store any JSON object up to 50 properties. Values must be strings up to 250 characters. Useful for storing external IDs, tags, or integration data."),exchange_rate:e.object({rate:e.number().describe("Exchange rate used for conversion"),source:e.string().describe("Source of the exchange rate (e.g., 'Frankfurter')"),date:e.iso.datetime({}).describe("Date of the exchange rate"),quote_currency:e.string().describe("Quote currency (the base currency converted to)")}).nullish().describe("Currency exchange rate information if conversion was applied"),total_converted:e.number().min(m7).max(g7).nullish(),total_with_tax_converted:e.number().min(y7).max(h7).nullish(),rounding_correction:e.number().nullish().describe("Rounding correction applied to reconcile differences between calculated total_with_tax and expected_total_with_tax. Only present when expected_total_with_tax was provided during creation."),eslog:e.object({validation_enabled:e.boolean().nullish().describe("Override entity default: true = validate, false = skip, null = use entity setting"),validation_status:e.union([e.literal("valid"),e.literal("invalid"),e.literal("not_validated"),e.literal(null)]).nullish().describe("Validation status: 'valid', 'invalid', or 'not_validated'"),validation_errors:e.array(e.string()).nullish().describe("Array of validation error messages (if status is 'invalid')"),validated_at:e.string().nullish().describe("ISO timestamp when validation was last performed")}).nullish().describe("e-SLOG 2.0 validation data for Slovenian electronic invoices. Only applicable when entity.country_code = 'SI' and eslog validation is enabled."),reference:e.string().nullish().describe("Custom reference for the document (e.g., purchase order number, payment reference). When set, used as the UPN payment reference instead of the auto-generated one."),vies:e.object({warning:e.string().nullable().describe("Warning message if VIES validation was unavailable or the VAT number was invalid. Document creation proceeds but this indicates the transaction type may need review."),skipped:e.boolean().nullable().describe("True when VIES validation was skipped due to entity settings (vies_validate_vat: false) but would normally apply. Used for audit trail.")}).nullish().describe("VIES validation info including any warnings and skipped indicator for audit trail"),deleted_at:e.iso.datetime({}).nullish().describe("Timestamp when the document was soft-deleted. Null if not deleted."),created_at:e.iso.datetime({}),updated_at:e.iso.datetime({}),date_due:e.iso.datetime({}).nullish().describe("Date the invoice is due (ISO 8601 datetime at midnight UTC)"),total_paid:e.number().min(b7).max(x7),total_due:e.number().min(z7).max(_7),paid_in_full:e.boolean(),furs:e.object({status:e.enum(["pending","success","failed","skipped"]),fiscalized_at:e.iso.datetime({}).optional(),error:e.string().optional(),cancellation_reason:e.string().optional(),data:e.object({zoi:e.string(),eor:e.string().optional(),qr_code:e.string().optional(),business_premise_name:e.string(),electronic_device_name:e.string(),invoice_number:e.string(),iteration:e.number().default(v7),payload:e.record(e.string(),e.unknown()).describe("FURS API request payload"),issuer_tax_number:e.string().optional(),operator_tax_number:e.string().optional(),operator_label:e.string().optional(),foreign_operator:e.boolean().optional(),cancelled:e.boolean().optional(),cancelled_eor:e.string().optional(),cancellation_payload:e.record(e.string(),e.unknown()).optional().describe("FURS API cancellation payload")}).optional()}).nullish().describe("FURS (Slovenia) fiscalization data. Read-only field, not editable via API. Includes status, premise name, device name, and FURS identifiers (ZOI, EOR, QR code)."),fina:e.object({status:e.enum(["pending","success","failed"]),fiscalized_at:e.iso.datetime({}).optional(),error:e.string().optional(),data:e.object({zki:e.string(),jir:e.string().optional(),qr_code_url:e.string().optional(),business_premise_name:e.string(),electronic_device_name:e.string(),invoice_number:e.string(),operator_oib:e.string().optional(),payment_type:e.string().optional(),numbering_sequence:e.string().optional(),payload:e.record(e.string(),e.unknown()).describe("CIS SOAP request payload"),subsequent_submit:e.boolean().optional(),issuer_oib:e.string().optional(),operator_label:e.string().optional()}).optional()}).nullish().describe("FINA (Croatia) CIS fiscalization data. Read-only field. Includes status, business premise name, electronic device name, and CIS identifiers (ZKI, JIR, QR code URL)."),pt:e.union([e.string(),e.number(),e.boolean(),e.null(),e.record(e.string(),e.unknown()),e.array(e.unknown())]).optional(),date_service:e.string().regex(f7).nullish().describe("Service date in YYYY-MM-DD format. For invoices and credit notes."),date_service_to:e.string().regex(R7).nullish().describe("Service period end date in YYYY-MM-DD format. For invoices and credit notes. Use with date_service for date ranges."),items:e.array(e.object({id:e.string().max(I7),type:e.union([e.literal("separator"),e.literal(null)]).nullish().describe("Item type. null = regular line item, 'separator' = visual section header."),name:e.string().max(E7),description:e.string().nullable(),classification:e.union([e.literal("product"),e.literal("service"),e.literal("advance"),e.literal(null)]).nullish().describe("Item classification used for Portugal SAF-T product typing."),price:e.number().nullish().describe("Per-unit net price (before tax). Always stores net price. Null for separator items."),gross_price:e.number().nullish().describe(`Per-unit gross price (includes tax).
|
|
198
|
+
Only present if user originally sent gross price.
|
|
199
|
+
Use gross pricing to keep invoice totals stable when VIES reverse charge is applied.`),quantity:e.number().nullish().describe("Item quantity. Null for separator items."),unit:e.string().max(S7).nullish(),taxes:e.array(e.object({rate:e.number().nullish(),tax_id:e.string().nullish(),classification:e.string().nullish(),reverse_charge:e.boolean().nullish(),amount:e.number().nullish(),pt_exemption_code:e.string().nullish(),pt_exemption_reason:e.string().nullish()}).describe("Document Item Tax")).describe("Applied taxes (provide rate to create new tax, or tax_id to use existing tax)"),discounts:e.array(e.object({value:e.number().min(D7).describe("Discount value"),type:e.enum(["percent","amount"]).default(P7).describe("Discount type: 'percent' (default) or 'amount'")})).max(w7).describe("Line discounts (max 5) in request order. In `b2b_standard`, percentage discounts are calculated from the original line subtotal and fixed amounts are summed before tax. In `b2c_gross_discount`, discounts are applied sequentially to the running gross subtotal."),total:e.number().nullish().describe("Line total before tax. Null for separator items."),total_with_tax:e.number().nullish().describe("Line total after tax. Null for separator items."),total_converted:e.number().min(C7).max(A7).nullish(),total_with_tax_converted:e.number().min(M7).max(T7).nullish(),invoice_id:e.string().max(k7).nullish(),advance_invoice_id:e.string().max(B7).nullish(),delivery_note_id:e.string().max(N7).nullish(),item_id:e.string().max(O7).nullish(),metadata:e.record(e.string(),e.string()).nullish().describe("Custom key-value data for your own use. Store any JSON object up to 50 properties. Values must be strings up to 250 characters. Useful for storing external IDs, tags, or integration data."),created_at:e.iso.datetime({}),updated_at:e.iso.datetime({})})),document_relations:e.array(e.object({id:e.string(),source_type:e.enum(["invoice","estimate","credit_note","advance_invoice","delivery_note"]).describe("Type of document"),source_id:e.string(),target_type:e.enum(["invoice","estimate","credit_note","advance_invoice","delivery_note"]).describe("Type of document"),target_id:e.string(),relation_type:e.string(),entity_id:e.string(),created_at:e.iso.datetime({}),linked_document_voided_at:e.iso.datetime({}).nullish(),related_document:e.object({id:e.string(),type:e.enum(["invoice","estimate","credit_note","advance_invoice","delivery_note"]).describe("Type of document"),number:e.string(),date:e.string(),total_with_tax:e.number(),currency_code:e.string(),is_draft:e.boolean(),voided_at:e.string().nullable(),paid_in_full:e.boolean().nullable(),title_type:e.union([e.literal("estimate"),e.literal("proforma_invoice"),e.literal(null)]).nullable(),hide_prices:e.boolean().nullable()}).optional()})).optional()}).describe("Invoice document with fiscalization support"),F7=/^[a-z]{3,4}_[0-9a-f]{24}$/,Efe=e.object({id:e.stringFormat("resource-id",F7).describe("Unique resource identifier")}),Sfe=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),U7=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,j7=2,q7=2,W7="iban",G7=2,V7=2,L7="iban",H7=2e3,Y7=-140737488355328,K7=0x7fffffffffff,$7=50,Q7=0,J7="percent",Z7=5,X7=100,eG=500,tG=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,oG=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,nG=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,Dfe=e.object({date:e.string().regex(U7).optional().describe("Document date (YYYY-MM-DD or ISO datetime format)."),issuer:e.object({name:e.string().nullish(),email:e.email().nullish(),address:e.string().nullish(),address_2:e.string().nullish(),post_code:e.string().nullish(),city:e.string().nullish(),state:e.string().nullish(),country:e.string().nullish(),country_code:e.string().min(j7).max(q7).nullish(),tax_number:e.string().nullish(),tax_number_2:e.string().nullish(),company_number:e.string().nullish(),phone:e.string().nullish(),peppol_id:e.string().nullish(),is_end_consumer:e.boolean().nullish(),bank_account:e.object({type:e.enum(["iban","us_domestic","uk_domestic","other"]).default(W7).describe("Account type determines which fields are used"),name:e.string().nullish().describe("Display name for this account. Falls back to account number if not set"),bank_name:e.string().nullish().describe("Bank name"),iban:e.string().nullish().describe("IBAN (for type=iban)"),account_number:e.string().nullish().describe("Account number (for us_domestic, uk_domestic, other)"),bic:e.string().nullish().describe("BIC/SWIFT code for international transfers"),routing_number:e.string().nullish().describe("US ABA routing number (for type=us_domestic)"),sort_code:e.string().nullish().describe("UK sort code (for type=uk_domestic)")}).nullish()}).describe("Document issuer (entity) information").and(e.unknown().describe("Issuer information snapshot.")).optional(),customer_id:e.string().nullish().describe("Referenced Customer ID. Set to null to remove customer reference."),customer:e.object({name:e.string().nullish(),email:e.email().nullish(),address:e.string().nullish(),address_2:e.string().nullish(),post_code:e.string().nullish(),city:e.string().nullish(),state:e.string().nullish(),country:e.string().nullish(),country_code:e.string().min(G7).max(V7).nullish(),tax_number:e.string().nullish(),tax_number_2:e.string().nullish(),company_number:e.string().nullish(),phone:e.string().nullish(),peppol_id:e.string().nullish(),is_end_consumer:e.boolean().nullish(),bank_account:e.object({type:e.enum(["iban","us_domestic","uk_domestic","other"]).default(L7).describe("Account type determines which fields are used"),name:e.string().nullish().describe("Display name for this account. Falls back to account number if not set"),bank_name:e.string().nullish().describe("Bank name"),iban:e.string().nullish().describe("IBAN (for type=iban)"),account_number:e.string().nullish().describe("Account number (for us_domestic, uk_domestic, other)"),bic:e.string().nullish().describe("BIC/SWIFT code for international transfers"),routing_number:e.string().nullish().describe("US ABA routing number (for type=us_domestic)"),sort_code:e.string().nullish().describe("UK sort code (for type=uk_domestic)")}).nullish()}).describe("Document issuer (entity) information").and(e.object({save_customer:e.boolean().nullish().describe("Whether to save (create new or update existing) the customer data.\nDefaults to `true` (best-effort).\nWhen `true` with `customer_id`, updates the existing customer.\nWhen `true` without `customer_id`, checks for duplicate customers using customer identifiers (tax/company number, country-aware when available) and reuses the existing customer if found, otherwise creates a new customer.\nWhen `false`, customer data is stored inline on the document only.\nWhen omitted, behaves like `true` but won't fail the request if persistence fails.")}).nullable()).optional().describe("Customer recipient of the document.\nBoth `customer` and `customer_id` are optional - documents can be created without customer information.\nIf both `customer_id` and `customer` are provided with `save_customer=true`, the existing customer will be updated.\nIf only `customer` is provided with `save_customer=true` (or by default), the system checks for duplicates using customer identifiers and reuses existing customers when found."),items:e.array(e.object({type:e.union([e.literal("separator"),e.literal(null)]).nullish().describe(`Item type. Omit or null for regular line item, 'separator' for a visual section header.
|
|
200
|
+
Separator items only use name and description \u2014 all financial fields are ignored.`),name:e.string().min(1).nullish().describe("Item name. Required unless `item_id` is provided.\nFor separator items, this is the section title (always required)."),description:e.string().max(H7).nullish(),classification:e.union([e.literal("product"),e.literal("service"),e.literal("advance"),e.literal(null)]).nullish().describe("Item classification used for Portugal SAF-T product typing."),price:e.number().nullish().describe("Net price per unit (before tax).\nProvide either `price` OR `gross_price`, not both.\nOptional if `item_id` is provided. Ignored for separator items."),gross_price:e.number().nullish().describe("Gross price per unit (includes tax).\nIf provided, net price is calculated.\nProvide either `price` OR `gross_price`, not both.\nOptional if `item_id` is provided. Ignored for separator items."),quantity:e.number().min(Y7).max(K7).nullish().describe("Item quantity. Required for regular items. Ignored for separator items."),unit:e.string().max($7).nullish(),taxes:e.array(e.object({rate:e.number().nullish(),tax_id:e.string().nullish(),classification:e.string().nullish(),reverse_charge:e.boolean().nullish(),amount:e.number().nullish(),pt_exemption_code:e.string().nullish(),pt_exemption_reason:e.string().nullish()}).describe("Document Item Tax")).optional().describe("Applied taxes (provide rate to create new tax, or tax_id to use existing tax)"),discounts:e.array(e.object({value:e.number().min(Q7).describe("Discount value"),type:e.enum(["percent","amount"]).default(J7).describe("Discount type: 'percent' (default) or 'amount'")})).max(Z7).optional().describe("Line discounts (max 5) in request order. In `b2b_standard`, percentage discounts are calculated from the original line subtotal and fixed amounts are summed before tax. In `b2c_gross_discount`, discounts are applied sequentially to the running gross subtotal."),item_id:e.string().nullish().describe(`ID of a catalog item to prefill from.
|
|
201
|
+
When provided, the item's name, description, price, and taxes are used as defaults.
|
|
202
|
+
Any field you provide will override the catalog item's value.
|
|
203
|
+
Not applicable for separator items.`),metadata:e.record(e.string(),e.string()).nullish().describe("Custom key-value data for your own use. Store any JSON object up to 50 properties. Values must be strings up to 250 characters. Useful for storing external IDs, tags, or integration data."),save_item:e.boolean().nullish().describe(`Whether to save this item to the catalog.
|
|
204
|
+
When true without item_id, matches by exact name and reuses existing, or creates a new catalog item.
|
|
205
|
+
Defaults to true (best-effort). When omitted, behaves like true but won't fail the request if persistence fails.`)})).min(1).optional().describe("Line items for the document. If provided, replaces ALL existing items. Triggers recalculation of totals."),note:e.string().nullish().describe("Document note/memo. Set to null to clear."),payment_terms:e.string().nullish().describe("Payment terms text. Set to null to clear."),tax_clause:e.string().nullish().describe("Tax clause text. Set to null to clear."),footer:e.string().nullish().describe("Footer text. Set to null to clear."),signature:e.string().nullish().describe("Signature text (e.g. 'John Smith, CEO'). Set to null to clear."),currency_code:e.string().optional().describe("Currency code (ISO 4217, 3 characters). Changing currency triggers exchange rate recalculation."),reference:e.string().max(X7).nullish().describe("Custom reference (e.g., purchase order number, payment reference). When set, overrides the auto-generated UPN payment reference for Slovenian invoices. Set to null to clear."),metadata:e.record(e.string(),e.unknown()).nullish().describe("Custom metadata object. Set to null to clear."),change_reason:e.string().max(eG).optional().describe("Reason for the change. Stored in version history for audit trail."),date_due:e.string().regex(tG).nullish().describe("Payment due date (YYYY-MM-DD or ISO datetime format). Set to null to clear."),date_service:e.string().regex(oG).nullish().describe("Service/work date or start of service period. Set to null to clear."),date_service_to:e.string().regex(nG).nullish().describe("End of service period (if different from date_service). Set to null to clear."),linked_documents:e.array(e.string().min(1)).nullish().describe("Link this invoice to other documents. Replaces existing links. Accepts estimate IDs (est_xxx) or credit note IDs (cre_xxx)."),force_linked_documents:e.boolean().optional().describe("Force linking documents even if a target document is already linked to another invoice. Defaults to false."),eslog:e.object({validation_enabled:e.boolean().nullish().describe("Enable e-SLOG validation for this document. true = validate, false = skip, null/undefined = use entity default")}).nullish()}),sG=36,rG=100,iG=2,aG=2,dG="iban",cG=36,lG=2,uG=2,pG="iban",mG=500,gG=-140737488355328,yG=0x7fffffffffff,hG=-140737488355328,bG=0x7fffffffffff,xG=3,zG=36,_G=-2147483648,vG=2147483647,fG=100,RG=-140737488355328,IG=0x7fffffffffff,EG=-140737488355328,SG=0x7fffffffffff,DG=-140737488355328,PG=0x7fffffffffff,wG=-140737488355328,CG=0x7fffffffffff,AG=0,MG=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,TG=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,kG=36,BG=500,NG=50,OG=0,FG="percent",UG=5,jG=-140737488355328,qG=0x7fffffffffff,WG=-140737488355328,GG=0x7fffffffffff,VG=36,LG=36,HG=36,YG=36,Pfe=e.object({id:e.string().max(sG),number:e.string().max(rG),is_draft:e.boolean().describe("Whether this is a draft document. Draft documents have no sequential number assigned, skip fiscalization, and can be deleted. Use POST /{documents}/{id}/finalize to assign a number and finalize."),date:e.iso.datetime({}).describe("Date the invoice was created (ISO 8601 datetime at midnight UTC)"),issuer:e.object({name:e.string().nullish(),email:e.email().nullish(),address:e.string().nullish(),address_2:e.string().nullish(),post_code:e.string().nullish(),city:e.string().nullish(),state:e.string().nullish(),country:e.string().nullish(),country_code:e.string().min(iG).max(aG).nullish(),tax_number:e.string().nullish(),tax_number_2:e.string().nullish(),company_number:e.string().nullish(),phone:e.string().nullish(),peppol_id:e.string().nullish(),is_end_consumer:e.boolean().nullish(),bank_account:e.object({type:e.enum(["iban","us_domestic","uk_domestic","other"]).default(dG).describe("Account type determines which fields are used"),name:e.string().nullish().describe("Display name for this account. Falls back to account number if not set"),bank_name:e.string().nullish().describe("Bank name"),iban:e.string().nullish().describe("IBAN (for type=iban)"),account_number:e.string().nullish().describe("Account number (for us_domestic, uk_domestic, other)"),bic:e.string().nullish().describe("BIC/SWIFT code for international transfers"),routing_number:e.string().nullish().describe("US ABA routing number (for type=us_domestic)"),sort_code:e.string().nullish().describe("UK sort code (for type=uk_domestic)")}).nullish()}).describe("Document issuer (entity) information"),customer_id:e.string().max(cG).nullish(),customer:e.object({name:e.string().nullish(),email:e.email().nullish(),address:e.string().nullish(),address_2:e.string().nullish(),post_code:e.string().nullish(),city:e.string().nullish(),state:e.string().nullish(),country:e.string().nullish(),country_code:e.string().min(lG).max(uG).nullish(),tax_number:e.string().nullish(),tax_number_2:e.string().nullish(),company_number:e.string().nullish(),phone:e.string().nullish(),peppol_id:e.string().nullish(),is_end_consumer:e.boolean().nullish(),bank_account:e.object({type:e.enum(["iban","us_domestic","uk_domestic","other"]).default(pG).describe("Account type determines which fields are used"),name:e.string().nullish().describe("Display name for this account. Falls back to account number if not set"),bank_name:e.string().nullish().describe("Bank name"),iban:e.string().nullish().describe("IBAN (for type=iban)"),account_number:e.string().nullish().describe("Account number (for us_domestic, uk_domestic, other)"),bic:e.string().nullish().describe("BIC/SWIFT code for international transfers"),routing_number:e.string().nullish().describe("US ABA routing number (for type=us_domestic)"),sort_code:e.string().nullish().describe("UK sort code (for type=uk_domestic)")}).nullish()}).nullish().describe("Customer information"),note:e.string().nullish().describe("Note for the document. If not provided, defaults to entity's document-type-specific note setting. Pass empty string to explicitly set no note."),payment_terms:e.string().nullish().describe("Payment terms for the document. If not provided, defaults to entity's document-type-specific payment terms setting. Pass empty string to explicitly set no terms."),tax_clause:e.string().nullish().describe("Tax clause for the document. Auto-populated based on transaction type if tax_clause_defaults are configured in entity settings. Pass empty string to explicitly set no clause."),footer:e.string().max(mG).nullish(),signature:e.string().nullish().describe("Signature text for the document (e.g. 'John Smith, CEO'). If not provided, defaults to entity's default_document_signature setting. Pass empty string to explicitly set no signature."),total:e.number().min(gG).max(yG),total_with_tax:e.number().min(hG).max(bG),total_discount:e.number().describe("Document discount total stored as a net-equivalent amount for compatibility. In `b2b_standard`, this is the net value of line-item discounts applied before tax. In `b2c_gross_discount`, gross discounts are converted back to their net-equivalent value here. 0 when no discounts applied."),creation_source:e.enum(["standard","custom"]).describe("Internal origin of the create request. `standard` means a normal create endpoint calculated the totals. `custom` means the document was created through a `/custom` endpoint."),calculation_mode:e.enum(["b2b_standard","b2c_gross_discount"]).describe("Resolved calculation mode used for this document. Stored on the document so recalculation and rendering remain stable even if entity defaults change later."),taxes:e.array(e.object({rate:e.number().nullable(),tax_id:e.string().nullish(),base:e.number(),amount:e.number(),reverse_charge:e.boolean().nullish()})).describe("Applied taxes summary"),currency_code:e.string().max(xG),entity_id:e.string().max(zG),date_year:e.number().min(_G).max(vG),shareable_id:e.string().max(fG).nullish(),voided_at:e.iso.datetime({}).nullish(),transaction_type:e.union([e.literal("domestic"),e.literal("intra_eu_b2b"),e.literal("intra_eu_b2c"),e.literal("3w_b2b"),e.literal("3w_b2c"),e.literal("export"),e.literal(null)]).nullish().describe("Transaction type for VAT purposes (domestic, intra_eu_b2b, intra_eu_b2c, export). Always determined based on issuer/customer countries."),metadata:e.record(e.string(),e.string()).nullish().describe("Custom key-value data for your own use. Store any JSON object up to 50 properties. Values must be strings up to 250 characters. Useful for storing external IDs, tags, or integration data."),exchange_rate:e.object({rate:e.number().describe("Exchange rate used for conversion"),source:e.string().describe("Source of the exchange rate (e.g., 'Frankfurter')"),date:e.iso.datetime({}).describe("Date of the exchange rate"),quote_currency:e.string().describe("Quote currency (the base currency converted to)")}).nullish().describe("Currency exchange rate information if conversion was applied"),total_converted:e.number().min(RG).max(IG).nullish(),total_with_tax_converted:e.number().min(EG).max(SG).nullish(),rounding_correction:e.number().nullish().describe("Rounding correction applied to reconcile differences between calculated total_with_tax and expected_total_with_tax. Only present when expected_total_with_tax was provided during creation."),eslog:e.object({validation_enabled:e.boolean().nullish().describe("Override entity default: true = validate, false = skip, null = use entity setting"),validation_status:e.union([e.literal("valid"),e.literal("invalid"),e.literal("not_validated"),e.literal(null)]).nullish().describe("Validation status: 'valid', 'invalid', or 'not_validated'"),validation_errors:e.array(e.string()).nullish().describe("Array of validation error messages (if status is 'invalid')"),validated_at:e.string().nullish().describe("ISO timestamp when validation was last performed")}).nullish().describe("e-SLOG 2.0 validation data for Slovenian electronic invoices. Only applicable when entity.country_code = 'SI' and eslog validation is enabled."),reference:e.string().nullish().describe("Custom reference for the document (e.g., purchase order number, payment reference). When set, used as the UPN payment reference instead of the auto-generated one."),vies:e.object({warning:e.string().nullable().describe("Warning message if VIES validation was unavailable or the VAT number was invalid. Document creation proceeds but this indicates the transaction type may need review."),skipped:e.boolean().nullable().describe("True when VIES validation was skipped due to entity settings (vies_validate_vat: false) but would normally apply. Used for audit trail.")}).nullish().describe("VIES validation info including any warnings and skipped indicator for audit trail"),deleted_at:e.iso.datetime({}).nullish().describe("Timestamp when the document was soft-deleted. Null if not deleted."),created_at:e.iso.datetime({}),updated_at:e.iso.datetime({}),date_due:e.iso.datetime({}).nullish().describe("Date the invoice is due (ISO 8601 datetime at midnight UTC)"),total_paid:e.number().min(DG).max(PG),total_due:e.number().min(wG).max(CG),paid_in_full:e.boolean(),furs:e.object({status:e.enum(["pending","success","failed","skipped"]),fiscalized_at:e.iso.datetime({}).optional(),error:e.string().optional(),cancellation_reason:e.string().optional(),data:e.object({zoi:e.string(),eor:e.string().optional(),qr_code:e.string().optional(),business_premise_name:e.string(),electronic_device_name:e.string(),invoice_number:e.string(),iteration:e.number().default(AG),payload:e.record(e.string(),e.unknown()).describe("FURS API request payload"),issuer_tax_number:e.string().optional(),operator_tax_number:e.string().optional(),operator_label:e.string().optional(),foreign_operator:e.boolean().optional(),cancelled:e.boolean().optional(),cancelled_eor:e.string().optional(),cancellation_payload:e.record(e.string(),e.unknown()).optional().describe("FURS API cancellation payload")}).optional()}).nullish().describe("FURS (Slovenia) fiscalization data. Read-only field, not editable via API. Includes status, premise name, device name, and FURS identifiers (ZOI, EOR, QR code)."),fina:e.object({status:e.enum(["pending","success","failed"]),fiscalized_at:e.iso.datetime({}).optional(),error:e.string().optional(),data:e.object({zki:e.string(),jir:e.string().optional(),qr_code_url:e.string().optional(),business_premise_name:e.string(),electronic_device_name:e.string(),invoice_number:e.string(),operator_oib:e.string().optional(),payment_type:e.string().optional(),numbering_sequence:e.string().optional(),payload:e.record(e.string(),e.unknown()).describe("CIS SOAP request payload"),subsequent_submit:e.boolean().optional(),issuer_oib:e.string().optional(),operator_label:e.string().optional()}).optional()}).nullish().describe("FINA (Croatia) CIS fiscalization data. Read-only field. Includes status, business premise name, electronic device name, and CIS identifiers (ZKI, JIR, QR code URL)."),pt:e.union([e.string(),e.number(),e.boolean(),e.null(),e.record(e.string(),e.unknown()),e.array(e.unknown())]).optional(),date_service:e.string().regex(MG).nullish().describe("Service date in YYYY-MM-DD format. For invoices and credit notes."),date_service_to:e.string().regex(TG).nullish().describe("Service period end date in YYYY-MM-DD format. For invoices and credit notes. Use with date_service for date ranges."),items:e.array(e.object({id:e.string().max(kG),type:e.union([e.literal("separator"),e.literal(null)]).nullish().describe("Item type. null = regular line item, 'separator' = visual section header."),name:e.string().max(BG),description:e.string().nullable(),classification:e.union([e.literal("product"),e.literal("service"),e.literal("advance"),e.literal(null)]).nullish().describe("Item classification used for Portugal SAF-T product typing."),price:e.number().nullish().describe("Per-unit net price (before tax). Always stores net price. Null for separator items."),gross_price:e.number().nullish().describe(`Per-unit gross price (includes tax).
|
|
206
|
+
Only present if user originally sent gross price.
|
|
207
|
+
Use gross pricing to keep invoice totals stable when VIES reverse charge is applied.`),quantity:e.number().nullish().describe("Item quantity. Null for separator items."),unit:e.string().max(NG).nullish(),taxes:e.array(e.object({rate:e.number().nullish(),tax_id:e.string().nullish(),classification:e.string().nullish(),reverse_charge:e.boolean().nullish(),amount:e.number().nullish(),pt_exemption_code:e.string().nullish(),pt_exemption_reason:e.string().nullish()}).describe("Document Item Tax")).describe("Applied taxes (provide rate to create new tax, or tax_id to use existing tax)"),discounts:e.array(e.object({value:e.number().min(OG).describe("Discount value"),type:e.enum(["percent","amount"]).default(FG).describe("Discount type: 'percent' (default) or 'amount'")})).max(UG).describe("Line discounts (max 5) in request order. In `b2b_standard`, percentage discounts are calculated from the original line subtotal and fixed amounts are summed before tax. In `b2c_gross_discount`, discounts are applied sequentially to the running gross subtotal."),total:e.number().nullish().describe("Line total before tax. Null for separator items."),total_with_tax:e.number().nullish().describe("Line total after tax. Null for separator items."),total_converted:e.number().min(jG).max(qG).nullish(),total_with_tax_converted:e.number().min(WG).max(GG).nullish(),invoice_id:e.string().max(VG).nullish(),advance_invoice_id:e.string().max(LG).nullish(),delivery_note_id:e.string().max(HG).nullish(),item_id:e.string().max(YG).nullish(),metadata:e.record(e.string(),e.string()).nullish().describe("Custom key-value data for your own use. Store any JSON object up to 50 properties. Values must be strings up to 250 characters. Useful for storing external IDs, tags, or integration data."),created_at:e.iso.datetime({}),updated_at:e.iso.datetime({})})),document_relations:e.array(e.object({id:e.string(),source_type:e.enum(["invoice","estimate","credit_note","advance_invoice","delivery_note"]).describe("Type of document"),source_id:e.string(),target_type:e.enum(["invoice","estimate","credit_note","advance_invoice","delivery_note"]).describe("Type of document"),target_id:e.string(),relation_type:e.string(),entity_id:e.string(),created_at:e.iso.datetime({}),linked_document_voided_at:e.iso.datetime({}).nullish(),related_document:e.object({id:e.string(),type:e.enum(["invoice","estimate","credit_note","advance_invoice","delivery_note"]).describe("Type of document"),number:e.string(),date:e.string(),total_with_tax:e.number(),currency_code:e.string(),is_draft:e.boolean(),voided_at:e.string().nullable(),paid_in_full:e.boolean().nullable(),title_type:e.union([e.literal("estimate"),e.literal("proforma_invoice"),e.literal(null)]).nullable(),hide_prices:e.boolean().nullable()}).optional()})).optional()}).describe("Invoice document with fiscalization support"),KG=/^[a-z]{3,4}_[0-9a-f]{24}$/,wfe=e.object({id:e.stringFormat("resource-id",KG).describe("Unique resource identifier")}),Cfe=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),Afe=e.object({versions:e.array(e.object({id:e.string().describe("Version record ID"),document_type:e.enum(["invoice","estimate","credit_note","advance_invoice"]).describe("Type of document"),document_id:e.string().describe("Document ID"),version:e.number().min(1).describe("Version number"),snapshot:e.record(e.string(),e.unknown()).describe("Full document snapshot at this version"),changed_fields:e.array(e.string()).describe("Fields that were changed in this update"),user:e.object({id:e.string(),name:e.string().nullable(),email:e.string()}).nullable().describe("User who made the change"),reason:e.string().nullable().describe("Reason for the change"),created_at:e.iso.datetime({}).describe("When this version was created")})).describe("List of versions"),count:e.number().describe("Total number of versions")}),Mfe=e.object({id:e.string().describe("Invoice ID"),version:e.number().min(1).describe("Version number")}),Tfe=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),kfe=e.object({id:e.string().describe("Version record ID"),document_type:e.enum(["invoice","estimate","credit_note","advance_invoice"]).describe("Type of document"),document_id:e.string().describe("Document ID"),version:e.number().min(1).describe("Version number"),snapshot:e.record(e.string(),e.unknown()).describe("Full document snapshot at this version"),changed_fields:e.array(e.string()).describe("Fields that were changed in this update"),user:e.object({id:e.string(),name:e.string().nullable(),email:e.string()}).nullable().describe("User who made the change"),reason:e.string().nullable().describe("Reason for the change"),created_at:e.iso.datetime({}).describe("When this version was created")}),$G=2,QG=5,JG=2,ZG=5,XG="true",Bfe=e.object({template:e.enum(["modern","classic","condensed","minimal","fashion"]).optional().describe("Document template design to use. When not specified, uses the entity's configured template."),locale:e.string().min($G).max(QG).nullish().describe("Locale for number and date formatting (decimal separators, date order). When not specified, uses the entity's configured locale. For example, 'sl-SI' formats decimals with commas (5,5%) and dates as DD. MM. YYYY."),language:e.string().min(JG).max(ZG).nullish().describe("Language for document labels and translations (e.g., 'Invoice', 'Tax', 'Total'). When not specified, uses the same value as locale. Use this to get entity-locale formatting with different-language labels \u2014 for example, a Slovenian entity (sl-SI formatting with commas) but English labels."),partial:e.enum(["true","false"]).default(XG).describe("Whether to treat the document as partial (allows incomplete data) or complete (validates all required fields)"),upn_qr_enabled:e.enum(["true","false"]).optional().describe("Override UPN QR enabled setting for preview"),upn_qr_display_mode:e.enum(["qr_only","full_slip"]).optional().describe("Override UPN QR display mode for preview"),epc_qr_enabled:e.enum(["true","false"]).optional().describe("Override EPC QR enabled setting for preview")}),Nfe=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),eV=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,tV=2,oV=2,nV="iban",sV=2,rV=2,iV="iban",aV=500,dV=3,cV=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,lV=35,uV=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,pV=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,mV=20,gV=/^[0-9a-zA-Z]{1,20}$/,yV=20,hV=/^\d{1,20}$/,bV=11,xV=11,zV=0,_V=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,vV=2,fV=2,RV="iban",IV=2,EV=2,SV="iban",DV=500,PV=3,wV=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,CV=35,AV=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,MV=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,TV=2e3,kV=-140737488355328,BV=0x7fffffffffff,NV=50,OV=0,FV="percent",UV=5,jV=20,qV=/^[0-9a-zA-Z]{1,20}$/,WV=20,GV=/^\d{1,20}$/,VV=11,LV=11,HV=0,Ofe=e.union([e.object({is_draft:e.boolean().optional().describe("Whether this is a draft document. Draft documents have no sequential number assigned, skip fiscalization, and can be deleted. Use POST /{documents}/{id}/finalize to assign a number and finalize."),date:e.string().regex(eV).optional().describe("Document date in YYYY-MM-DD format"),issuer:e.object({name:e.string().nullish(),email:e.email().nullish(),address:e.string().nullish(),address_2:e.string().nullish(),post_code:e.string().nullish(),city:e.string().nullish(),state:e.string().nullish(),country:e.string().nullish(),country_code:e.string().min(tV).max(oV).nullish(),tax_number:e.string().nullish(),tax_number_2:e.string().nullish(),company_number:e.string().nullish(),phone:e.string().nullish(),peppol_id:e.string().nullish(),is_end_consumer:e.boolean().nullish(),bank_account:e.object({type:e.enum(["iban","us_domestic","uk_domestic","other"]).default(nV).describe("Account type determines which fields are used"),name:e.string().nullish().describe("Display name for this account. Falls back to account number if not set"),bank_name:e.string().nullish().describe("Bank name"),iban:e.string().nullish().describe("IBAN (for type=iban)"),account_number:e.string().nullish().describe("Account number (for us_domestic, uk_domestic, other)"),bic:e.string().nullish().describe("BIC/SWIFT code for international transfers"),routing_number:e.string().nullish().describe("US ABA routing number (for type=us_domestic)"),sort_code:e.string().nullish().describe("UK sort code (for type=uk_domestic)")}).nullish()}).optional().describe("Document issuer (entity) information"),customer_id:e.string().nullish().describe("Referenced Customer ID. Required if customer is not provided."),customer:e.object({name:e.string().nullish(),email:e.email().nullish(),address:e.string().nullish(),address_2:e.string().nullish(),post_code:e.string().nullish(),city:e.string().nullish(),state:e.string().nullish(),country:e.string().nullish(),country_code:e.string().min(sV).max(rV).nullish(),tax_number:e.string().nullish(),tax_number_2:e.string().nullish(),company_number:e.string().nullish(),phone:e.string().nullish(),peppol_id:e.string().nullish(),is_end_consumer:e.boolean().nullish(),bank_account:e.object({type:e.enum(["iban","us_domestic","uk_domestic","other"]).default(iV).describe("Account type determines which fields are used"),name:e.string().nullish().describe("Display name for this account. Falls back to account number if not set"),bank_name:e.string().nullish().describe("Bank name"),iban:e.string().nullish().describe("IBAN (for type=iban)"),account_number:e.string().nullish().describe("Account number (for us_domestic, uk_domestic, other)"),bic:e.string().nullish().describe("BIC/SWIFT code for international transfers"),routing_number:e.string().nullish().describe("US ABA routing number (for type=us_domestic)"),sort_code:e.string().nullish().describe("UK sort code (for type=uk_domestic)")}).nullish()}).describe("Document issuer (entity) information").and(e.object({save_customer:e.boolean().nullish().describe("Whether to save (create new or update existing) the customer data.\nDefaults to `true` (best-effort).\nWhen `true` with `customer_id`, updates the existing customer.\nWhen `true` without `customer_id`, checks for duplicate customers using customer identifiers (tax/company number, country-aware when available) and reuses the existing customer if found, otherwise creates a new customer.\nWhen `false`, customer data is stored inline on the document only.\nWhen omitted, behaves like `true` but won't fail the request if persistence fails.")}).nullable()).optional().describe("Customer recipient of the document.\nBoth `customer` and `customer_id` are optional - documents can be created without customer information.\nIf both `customer_id` and `customer` are provided with `save_customer=true`, the existing customer will be updated.\nIf only `customer` is provided with `save_customer=true` (or by default), the system checks for duplicates using customer identifiers and reuses existing customers when found."),note:e.string().nullish().describe("Note for the document. If not provided, defaults to entity's document-type-specific note setting. Pass empty string to explicitly set no note."),payment_terms:e.string().nullish().describe("Payment terms for the document. If not provided, defaults to entity's document-type-specific payment terms setting. Pass empty string to explicitly set no terms."),tax_clause:e.string().nullish().describe("Tax clause for the document. Auto-populated based on transaction type if tax_clause_defaults are configured in entity settings. Pass empty string to explicitly set no clause."),footer:e.string().max(aV).nullish(),signature:e.string().nullish().describe("Signature text for the document (e.g. 'John Smith, CEO'). If not provided, defaults to entity's default_document_signature setting. Pass empty string to explicitly set no signature."),calculation_mode:e.union([e.literal("b2b_standard"),e.literal("b2c_gross_discount"),e.literal(null)]).nullish().describe("Optional calculation mode override. When omitted, the entity default is used and falls back to `b2b_standard`."),currency_code:e.string().max(dV).optional(),metadata:e.record(e.string(),e.string()).nullish().describe("Custom key-value data for your own use. Store any JSON object up to 50 properties. Values must be strings up to 250 characters. Useful for storing external IDs, tags, or integration data."),reference:e.string().nullish().describe("Custom reference for the document (e.g., purchase order number, payment reference). When set, used as the UPN payment reference instead of the auto-generated one."),date_due:e.string().regex(cV).nullish().describe("Document due date in YYYY-MM-DD format"),pt:e.object({series_id:e.string().nullish().describe("ATCUD series ID to use for PT numbering. Required for PT manual documents."),manual:e.boolean().nullish().describe("Marks this PT document as manually issued/offline."),manual_sequential_number:e.number().min(1).nullish().describe("Manual PT sequence number shown on the offline/original document."),manual_series_code:e.string().min(1).max(lV).nullish().describe("Offline/manual PT series code shown on the original document."),operator_first_name:e.string().min(1).nullish().describe("PT operator first name snapshot for PT compliance."),operator_last_name:e.string().min(1).nullish().describe("PT operator last name snapshot for PT compliance."),operator_tax_number:e.string().min(1).nullish().describe("PT operator tax number snapshot for PT compliance."),account_first_name:e.string().min(1).nullish().describe("Deprecated alias for PT operator first name snapshot."),account_last_name:e.string().min(1).nullish().describe("Deprecated alias for PT operator last name snapshot."),account_tax_number:e.string().min(1).nullish().describe("Deprecated alias for PT operator tax number snapshot.")}).nullish(),date_service:e.string().regex(uV).nullish().describe("Service date in YYYY-MM-DD format. For invoices and credit notes."),date_service_to:e.string().regex(pV).nullish().describe("Service period end date in YYYY-MM-DD format. For invoices and credit notes. Use with date_service for date ranges."),items:e.array(e.object({type:e.enum(["separator"]).optional(),name:e.string().optional(),quantity:e.number().optional(),price:e.number().optional(),gross_price:e.number().optional(),description:e.string().optional(),unit:e.string().optional(),discounts:e.array(e.object({value:e.number(),type:e.enum(["percent","amount"]).optional()})).optional(),taxes:e.array(e.object({rate:e.number().optional(),tax_id:e.string().optional()})).optional(),metadata:e.record(e.string(),e.string()).optional()})).min(1),linked_documents:e.array(e.string().min(1)).nullish().describe("Link this invoice to other documents. Accepts estimate IDs (est_xxx) for converted estimates or credit note IDs (cre_xxx). Creates document relations automatically."),fina:e.object({business_premise_name:e.string().min(1).max(mV).regex(gV).nullish().describe("CIS business premise name (OznPosPr, alphanumeric, 1-20 chars). Required when CIS is enabled."),electronic_device_name:e.string().min(1).max(yV).regex(hV).nullish().describe("CIS electronic device name (OznNapUr, digits only, 1-20 chars). Required when CIS is enabled."),operator_oib:e.string().min(bV).max(xV).nullish().describe("Operator OIB (11 digits). If not provided and using user authentication, defaults to the user's FINA settings. Otherwise falls back to entity settings."),operator_label:e.string().nullish().describe("Operator label/name. If not provided and using user authentication, defaults to the user's FINA settings. Otherwise falls back to entity settings."),payment_type:e.union([e.literal("cash"),e.literal("card"),e.literal("online"),e.literal("bank_transfer"),e.literal("paypal"),e.literal("crypto"),e.literal("coupon"),e.literal("other"),e.literal(null)]).nullish().describe("Expected payment method for CIS (NacinPlac field). Optional when document payments are provided because the API derives it from the document payments; when multiple payments are present, FINA uses 'other'."),subsequent_submit:e.boolean().nullish().describe("Late/subsequent submission flag (NakDost). Set to true if submitting after the normal deadline.")}).nullish(),expected_total_with_tax:e.number().gt(zV).nullish().describe("Expected total with tax. When provided, the system calculates a rounding_correction to reconcile differences between the calculated total and this expected value. Maximum allowed correction is \xB11.00. Useful when importing invoices from external systems with different rounding rules."),force_linked_documents:e.boolean().nullish().describe("Force linking documents even if an advance invoice is already applied to another invoice. Defaults to false."),id:e.string().optional()}),e.object({is_draft:e.boolean().optional().describe("Whether this is a draft document. Draft documents have no sequential number assigned, skip fiscalization, and can be deleted. Use POST /{documents}/{id}/finalize to assign a number and finalize."),date:e.string().regex(_V).optional().describe("Document date in YYYY-MM-DD format"),issuer:e.object({name:e.string().nullish(),email:e.email().nullish(),address:e.string().nullish(),address_2:e.string().nullish(),post_code:e.string().nullish(),city:e.string().nullish(),state:e.string().nullish(),country:e.string().nullish(),country_code:e.string().min(vV).max(fV).nullish(),tax_number:e.string().nullish(),tax_number_2:e.string().nullish(),company_number:e.string().nullish(),phone:e.string().nullish(),peppol_id:e.string().nullish(),is_end_consumer:e.boolean().nullish(),bank_account:e.object({type:e.enum(["iban","us_domestic","uk_domestic","other"]).default(RV).describe("Account type determines which fields are used"),name:e.string().nullish().describe("Display name for this account. Falls back to account number if not set"),bank_name:e.string().nullish().describe("Bank name"),iban:e.string().nullish().describe("IBAN (for type=iban)"),account_number:e.string().nullish().describe("Account number (for us_domestic, uk_domestic, other)"),bic:e.string().nullish().describe("BIC/SWIFT code for international transfers"),routing_number:e.string().nullish().describe("US ABA routing number (for type=us_domestic)"),sort_code:e.string().nullish().describe("UK sort code (for type=uk_domestic)")}).nullish()}).optional().describe("Document issuer (entity) information"),customer_id:e.string().nullish().describe("Referenced Customer ID. Required if customer is not provided."),customer:e.object({name:e.string().nullish(),email:e.email().nullish(),address:e.string().nullish(),address_2:e.string().nullish(),post_code:e.string().nullish(),city:e.string().nullish(),state:e.string().nullish(),country:e.string().nullish(),country_code:e.string().min(IV).max(EV).nullish(),tax_number:e.string().nullish(),tax_number_2:e.string().nullish(),company_number:e.string().nullish(),phone:e.string().nullish(),peppol_id:e.string().nullish(),is_end_consumer:e.boolean().nullish(),bank_account:e.object({type:e.enum(["iban","us_domestic","uk_domestic","other"]).default(SV).describe("Account type determines which fields are used"),name:e.string().nullish().describe("Display name for this account. Falls back to account number if not set"),bank_name:e.string().nullish().describe("Bank name"),iban:e.string().nullish().describe("IBAN (for type=iban)"),account_number:e.string().nullish().describe("Account number (for us_domestic, uk_domestic, other)"),bic:e.string().nullish().describe("BIC/SWIFT code for international transfers"),routing_number:e.string().nullish().describe("US ABA routing number (for type=us_domestic)"),sort_code:e.string().nullish().describe("UK sort code (for type=uk_domestic)")}).nullish()}).describe("Document issuer (entity) information").and(e.object({save_customer:e.boolean().nullish().describe("Whether to save (create new or update existing) the customer data.\nDefaults to `true` (best-effort).\nWhen `true` with `customer_id`, updates the existing customer.\nWhen `true` without `customer_id`, checks for duplicate customers using customer identifiers (tax/company number, country-aware when available) and reuses the existing customer if found, otherwise creates a new customer.\nWhen `false`, customer data is stored inline on the document only.\nWhen omitted, behaves like `true` but won't fail the request if persistence fails.")}).nullable()).optional().describe("Customer recipient of the document.\nBoth `customer` and `customer_id` are optional - documents can be created without customer information.\nIf both `customer_id` and `customer` are provided with `save_customer=true`, the existing customer will be updated.\nIf only `customer` is provided with `save_customer=true` (or by default), the system checks for duplicates using customer identifiers and reuses existing customers when found."),note:e.string().nullish().describe("Note for the document. If not provided, defaults to entity's document-type-specific note setting. Pass empty string to explicitly set no note."),payment_terms:e.string().nullish().describe("Payment terms for the document. If not provided, defaults to entity's document-type-specific payment terms setting. Pass empty string to explicitly set no terms."),tax_clause:e.string().nullish().describe("Tax clause for the document. Auto-populated based on transaction type if tax_clause_defaults are configured in entity settings. Pass empty string to explicitly set no clause."),footer:e.string().max(DV).nullish(),signature:e.string().nullish().describe("Signature text for the document (e.g. 'John Smith, CEO'). If not provided, defaults to entity's default_document_signature setting. Pass empty string to explicitly set no signature."),calculation_mode:e.union([e.literal("b2b_standard"),e.literal("b2c_gross_discount"),e.literal(null)]).nullish().describe("Optional calculation mode override. When omitted, the entity default is used and falls back to `b2b_standard`."),currency_code:e.string().max(PV).optional(),metadata:e.record(e.string(),e.string()).nullish().describe("Custom key-value data for your own use. Store any JSON object up to 50 properties. Values must be strings up to 250 characters. Useful for storing external IDs, tags, or integration data."),reference:e.string().nullish().describe("Custom reference for the document (e.g., purchase order number, payment reference). When set, used as the UPN payment reference instead of the auto-generated one."),date_due:e.string().regex(wV).nullish().describe("Document due date in YYYY-MM-DD format"),pt:e.object({series_id:e.string().nullish().describe("ATCUD series ID to use for PT numbering. Required for PT manual documents."),manual:e.boolean().nullish().describe("Marks this PT document as manually issued/offline."),manual_sequential_number:e.number().min(1).nullish().describe("Manual PT sequence number shown on the offline/original document."),manual_series_code:e.string().min(1).max(CV).nullish().describe("Offline/manual PT series code shown on the original document."),operator_first_name:e.string().min(1).nullish().describe("PT operator first name snapshot for PT compliance."),operator_last_name:e.string().min(1).nullish().describe("PT operator last name snapshot for PT compliance."),operator_tax_number:e.string().min(1).nullish().describe("PT operator tax number snapshot for PT compliance."),account_first_name:e.string().min(1).nullish().describe("Deprecated alias for PT operator first name snapshot."),account_last_name:e.string().min(1).nullish().describe("Deprecated alias for PT operator last name snapshot."),account_tax_number:e.string().min(1).nullish().describe("Deprecated alias for PT operator tax number snapshot.")}).nullish(),date_service:e.string().regex(AV).nullish().describe("Service date in YYYY-MM-DD format. For invoices and credit notes."),date_service_to:e.string().regex(MV).nullish().describe("Service period end date in YYYY-MM-DD format. For invoices and credit notes. Use with date_service for date ranges."),items:e.array(e.object({type:e.union([e.literal("separator"),e.literal(null)]).nullish().describe(`Item type. Omit or null for regular line item, 'separator' for a visual section header.
|
|
208
|
+
Separator items only use name and description \u2014 all financial fields are ignored.`),name:e.string().min(1).nullish().describe("Item name. Required unless `item_id` is provided.\nFor separator items, this is the section title (always required)."),description:e.string().max(TV).nullish(),classification:e.union([e.literal("product"),e.literal("service"),e.literal("advance"),e.literal(null)]).nullish().describe("Item classification used for Portugal SAF-T product typing."),price:e.number().nullish().describe("Net price per unit (before tax).\nProvide either `price` OR `gross_price`, not both.\nOptional if `item_id` is provided. Ignored for separator items."),gross_price:e.number().nullish().describe("Gross price per unit (includes tax).\nIf provided, net price is calculated.\nProvide either `price` OR `gross_price`, not both.\nOptional if `item_id` is provided. Ignored for separator items."),quantity:e.number().min(kV).max(BV).nullish().describe("Item quantity. Required for regular items. Ignored for separator items."),unit:e.string().max(NV).nullish(),taxes:e.array(e.object({rate:e.number().nullish(),tax_id:e.string().nullish(),classification:e.string().nullish(),reverse_charge:e.boolean().nullish(),amount:e.number().nullish(),pt_exemption_code:e.string().nullish(),pt_exemption_reason:e.string().nullish()}).describe("Document Item Tax")).optional().describe("Applied taxes (provide rate to create new tax, or tax_id to use existing tax)"),discounts:e.array(e.object({value:e.number().min(OV).describe("Discount value"),type:e.enum(["percent","amount"]).default(FV).describe("Discount type: 'percent' (default) or 'amount'")})).max(UV).optional().describe("Line discounts (max 5) in request order. In `b2b_standard`, percentage discounts are calculated from the original line subtotal and fixed amounts are summed before tax. In `b2c_gross_discount`, discounts are applied sequentially to the running gross subtotal."),item_id:e.string().nullish().describe(`ID of a catalog item to prefill from.
|
|
209
|
+
When provided, the item's name, description, price, and taxes are used as defaults.
|
|
210
|
+
Any field you provide will override the catalog item's value.
|
|
211
|
+
Not applicable for separator items.`),metadata:e.record(e.string(),e.string()).nullish().describe("Custom key-value data for your own use. Store any JSON object up to 50 properties. Values must be strings up to 250 characters. Useful for storing external IDs, tags, or integration data."),save_item:e.boolean().nullish().describe(`Whether to save this item to the catalog.
|
|
212
|
+
When true without item_id, matches by exact name and reuses existing, or creates a new catalog item.
|
|
213
|
+
Defaults to true (best-effort). When omitted, behaves like true but won't fail the request if persistence fails.`)})).min(1).describe("Line items for the invoice. At least one item is required."),linked_documents:e.array(e.string().min(1)).nullish().describe("Link this invoice to other documents. Accepts estimate IDs (est_xxx) for converted estimates or credit note IDs (cre_xxx). Creates document relations automatically."),fina:e.object({business_premise_name:e.string().min(1).max(jV).regex(qV).nullish().describe("CIS business premise name (OznPosPr, alphanumeric, 1-20 chars). Required when CIS is enabled."),electronic_device_name:e.string().min(1).max(WV).regex(GV).nullish().describe("CIS electronic device name (OznNapUr, digits only, 1-20 chars). Required when CIS is enabled."),operator_oib:e.string().min(VV).max(LV).nullish().describe("Operator OIB (11 digits). If not provided and using user authentication, defaults to the user's FINA settings. Otherwise falls back to entity settings."),operator_label:e.string().nullish().describe("Operator label/name. If not provided and using user authentication, defaults to the user's FINA settings. Otherwise falls back to entity settings."),payment_type:e.union([e.literal("cash"),e.literal("card"),e.literal("online"),e.literal("bank_transfer"),e.literal("paypal"),e.literal("crypto"),e.literal("coupon"),e.literal("other"),e.literal(null)]).nullish().describe("Expected payment method for CIS (NacinPlac field). Optional when document payments are provided because the API derives it from the document payments; when multiple payments are present, FINA uses 'other'."),subsequent_submit:e.boolean().nullish().describe("Late/subsequent submission flag (NakDost). Set to true if submitting after the normal deadline.")}).nullish(),expected_total_with_tax:e.number().gt(HV).nullish().describe("Expected total with tax. When provided, the system calculates a rounding_correction to reconcile differences between the calculated total and this expected value. Maximum allowed correction is \xB11.00. Useful when importing invoices from external systems with different rounding rules."),force_linked_documents:e.boolean().nullish().describe("Force linking documents even if an advance invoice is already applied to another invoice. Defaults to false."),id:e.string().optional()})]),YV=/^[a-z]{3,4}_[0-9a-f]{24}$/,Ffe=e.object({id:e.stringFormat("resource-id",YV).describe("Unique resource identifier")}),Ufe=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),jfe=e.object({reason:e.string().min(1).optional().describe("Technical reason for voiding (e.g., 'Duplicate invoice', 'Technical error')"),has_original_document:e.boolean().nullish().describe("Whether the original physical/manual PT document is still available.")}),KV=36,$V=100,QV=2,JV=2,ZV="iban",XV=36,eL=2,tL=2,oL="iban",nL=500,sL=-140737488355328,rL=0x7fffffffffff,iL=-140737488355328,aL=0x7fffffffffff,dL=3,cL=36,lL=-2147483648,uL=2147483647,pL=100,mL=-140737488355328,gL=0x7fffffffffff,yL=-140737488355328,hL=0x7fffffffffff,bL=-140737488355328,xL=0x7fffffffffff,zL=-140737488355328,_L=0x7fffffffffff,vL=0,fL=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,RL=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,IL=36,EL=500,SL=50,DL=0,PL="percent",wL=5,CL=-140737488355328,AL=0x7fffffffffff,ML=-140737488355328,TL=0x7fffffffffff,kL=36,BL=36,NL=36,OL=36,qfe=e.object({id:e.string().max(KV),number:e.string().max($V),is_draft:e.boolean().describe("Whether this is a draft document. Draft documents have no sequential number assigned, skip fiscalization, and can be deleted. Use POST /{documents}/{id}/finalize to assign a number and finalize."),date:e.iso.datetime({}).describe("Date the invoice was created (ISO 8601 datetime at midnight UTC)"),issuer:e.object({name:e.string().nullish(),email:e.email().nullish(),address:e.string().nullish(),address_2:e.string().nullish(),post_code:e.string().nullish(),city:e.string().nullish(),state:e.string().nullish(),country:e.string().nullish(),country_code:e.string().min(QV).max(JV).nullish(),tax_number:e.string().nullish(),tax_number_2:e.string().nullish(),company_number:e.string().nullish(),phone:e.string().nullish(),peppol_id:e.string().nullish(),is_end_consumer:e.boolean().nullish(),bank_account:e.object({type:e.enum(["iban","us_domestic","uk_domestic","other"]).default(ZV).describe("Account type determines which fields are used"),name:e.string().nullish().describe("Display name for this account. Falls back to account number if not set"),bank_name:e.string().nullish().describe("Bank name"),iban:e.string().nullish().describe("IBAN (for type=iban)"),account_number:e.string().nullish().describe("Account number (for us_domestic, uk_domestic, other)"),bic:e.string().nullish().describe("BIC/SWIFT code for international transfers"),routing_number:e.string().nullish().describe("US ABA routing number (for type=us_domestic)"),sort_code:e.string().nullish().describe("UK sort code (for type=uk_domestic)")}).nullish()}).describe("Document issuer (entity) information"),customer_id:e.string().max(XV).nullish(),customer:e.object({name:e.string().nullish(),email:e.email().nullish(),address:e.string().nullish(),address_2:e.string().nullish(),post_code:e.string().nullish(),city:e.string().nullish(),state:e.string().nullish(),country:e.string().nullish(),country_code:e.string().min(eL).max(tL).nullish(),tax_number:e.string().nullish(),tax_number_2:e.string().nullish(),company_number:e.string().nullish(),phone:e.string().nullish(),peppol_id:e.string().nullish(),is_end_consumer:e.boolean().nullish(),bank_account:e.object({type:e.enum(["iban","us_domestic","uk_domestic","other"]).default(oL).describe("Account type determines which fields are used"),name:e.string().nullish().describe("Display name for this account. Falls back to account number if not set"),bank_name:e.string().nullish().describe("Bank name"),iban:e.string().nullish().describe("IBAN (for type=iban)"),account_number:e.string().nullish().describe("Account number (for us_domestic, uk_domestic, other)"),bic:e.string().nullish().describe("BIC/SWIFT code for international transfers"),routing_number:e.string().nullish().describe("US ABA routing number (for type=us_domestic)"),sort_code:e.string().nullish().describe("UK sort code (for type=uk_domestic)")}).nullish()}).nullish().describe("Customer information"),note:e.string().nullish().describe("Note for the document. If not provided, defaults to entity's document-type-specific note setting. Pass empty string to explicitly set no note."),payment_terms:e.string().nullish().describe("Payment terms for the document. If not provided, defaults to entity's document-type-specific payment terms setting. Pass empty string to explicitly set no terms."),tax_clause:e.string().nullish().describe("Tax clause for the document. Auto-populated based on transaction type if tax_clause_defaults are configured in entity settings. Pass empty string to explicitly set no clause."),footer:e.string().max(nL).nullish(),signature:e.string().nullish().describe("Signature text for the document (e.g. 'John Smith, CEO'). If not provided, defaults to entity's default_document_signature setting. Pass empty string to explicitly set no signature."),total:e.number().min(sL).max(rL),total_with_tax:e.number().min(iL).max(aL),total_discount:e.number().describe("Document discount total stored as a net-equivalent amount for compatibility. In `b2b_standard`, this is the net value of line-item discounts applied before tax. In `b2c_gross_discount`, gross discounts are converted back to their net-equivalent value here. 0 when no discounts applied."),creation_source:e.enum(["standard","custom"]).describe("Internal origin of the create request. `standard` means a normal create endpoint calculated the totals. `custom` means the document was created through a `/custom` endpoint."),calculation_mode:e.enum(["b2b_standard","b2c_gross_discount"]).describe("Resolved calculation mode used for this document. Stored on the document so recalculation and rendering remain stable even if entity defaults change later."),taxes:e.array(e.object({rate:e.number().nullable(),tax_id:e.string().nullish(),base:e.number(),amount:e.number(),reverse_charge:e.boolean().nullish()})).describe("Applied taxes summary"),currency_code:e.string().max(dL),entity_id:e.string().max(cL),date_year:e.number().min(lL).max(uL),shareable_id:e.string().max(pL).nullish(),voided_at:e.iso.datetime({}).nullish(),transaction_type:e.union([e.literal("domestic"),e.literal("intra_eu_b2b"),e.literal("intra_eu_b2c"),e.literal("3w_b2b"),e.literal("3w_b2c"),e.literal("export"),e.literal(null)]).nullish().describe("Transaction type for VAT purposes (domestic, intra_eu_b2b, intra_eu_b2c, export). Always determined based on issuer/customer countries."),metadata:e.record(e.string(),e.string()).nullish().describe("Custom key-value data for your own use. Store any JSON object up to 50 properties. Values must be strings up to 250 characters. Useful for storing external IDs, tags, or integration data."),exchange_rate:e.object({rate:e.number().describe("Exchange rate used for conversion"),source:e.string().describe("Source of the exchange rate (e.g., 'Frankfurter')"),date:e.iso.datetime({}).describe("Date of the exchange rate"),quote_currency:e.string().describe("Quote currency (the base currency converted to)")}).nullish().describe("Currency exchange rate information if conversion was applied"),total_converted:e.number().min(mL).max(gL).nullish(),total_with_tax_converted:e.number().min(yL).max(hL).nullish(),rounding_correction:e.number().nullish().describe("Rounding correction applied to reconcile differences between calculated total_with_tax and expected_total_with_tax. Only present when expected_total_with_tax was provided during creation."),eslog:e.object({validation_enabled:e.boolean().nullish().describe("Override entity default: true = validate, false = skip, null = use entity setting"),validation_status:e.union([e.literal("valid"),e.literal("invalid"),e.literal("not_validated"),e.literal(null)]).nullish().describe("Validation status: 'valid', 'invalid', or 'not_validated'"),validation_errors:e.array(e.string()).nullish().describe("Array of validation error messages (if status is 'invalid')"),validated_at:e.string().nullish().describe("ISO timestamp when validation was last performed")}).nullish().describe("e-SLOG 2.0 validation data for Slovenian electronic invoices. Only applicable when entity.country_code = 'SI' and eslog validation is enabled."),reference:e.string().nullish().describe("Custom reference for the document (e.g., purchase order number, payment reference). When set, used as the UPN payment reference instead of the auto-generated one."),vies:e.object({warning:e.string().nullable().describe("Warning message if VIES validation was unavailable or the VAT number was invalid. Document creation proceeds but this indicates the transaction type may need review."),skipped:e.boolean().nullable().describe("True when VIES validation was skipped due to entity settings (vies_validate_vat: false) but would normally apply. Used for audit trail.")}).nullish().describe("VIES validation info including any warnings and skipped indicator for audit trail"),deleted_at:e.iso.datetime({}).nullish().describe("Timestamp when the document was soft-deleted. Null if not deleted."),created_at:e.iso.datetime({}),updated_at:e.iso.datetime({}),date_due:e.iso.datetime({}).nullish().describe("Date the invoice is due (ISO 8601 datetime at midnight UTC)"),total_paid:e.number().min(bL).max(xL),total_due:e.number().min(zL).max(_L),paid_in_full:e.boolean(),furs:e.object({status:e.enum(["pending","success","failed","skipped"]),fiscalized_at:e.iso.datetime({}).optional(),error:e.string().optional(),cancellation_reason:e.string().optional(),data:e.object({zoi:e.string(),eor:e.string().optional(),qr_code:e.string().optional(),business_premise_name:e.string(),electronic_device_name:e.string(),invoice_number:e.string(),iteration:e.number().default(vL),payload:e.record(e.string(),e.unknown()).describe("FURS API request payload"),issuer_tax_number:e.string().optional(),operator_tax_number:e.string().optional(),operator_label:e.string().optional(),foreign_operator:e.boolean().optional(),cancelled:e.boolean().optional(),cancelled_eor:e.string().optional(),cancellation_payload:e.record(e.string(),e.unknown()).optional().describe("FURS API cancellation payload")}).optional()}).nullish().describe("FURS (Slovenia) fiscalization data. Read-only field, not editable via API. Includes status, premise name, device name, and FURS identifiers (ZOI, EOR, QR code)."),fina:e.object({status:e.enum(["pending","success","failed"]),fiscalized_at:e.iso.datetime({}).optional(),error:e.string().optional(),data:e.object({zki:e.string(),jir:e.string().optional(),qr_code_url:e.string().optional(),business_premise_name:e.string(),electronic_device_name:e.string(),invoice_number:e.string(),operator_oib:e.string().optional(),payment_type:e.string().optional(),numbering_sequence:e.string().optional(),payload:e.record(e.string(),e.unknown()).describe("CIS SOAP request payload"),subsequent_submit:e.boolean().optional(),issuer_oib:e.string().optional(),operator_label:e.string().optional()}).optional()}).nullish().describe("FINA (Croatia) CIS fiscalization data. Read-only field. Includes status, business premise name, electronic device name, and CIS identifiers (ZKI, JIR, QR code URL)."),pt:e.union([e.string(),e.number(),e.boolean(),e.null(),e.record(e.string(),e.unknown()),e.array(e.unknown())]).optional(),date_service:e.string().regex(fL).nullish().describe("Service date in YYYY-MM-DD format. For invoices and credit notes."),date_service_to:e.string().regex(RL).nullish().describe("Service period end date in YYYY-MM-DD format. For invoices and credit notes. Use with date_service for date ranges."),items:e.array(e.object({id:e.string().max(IL),type:e.union([e.literal("separator"),e.literal(null)]).nullish().describe("Item type. null = regular line item, 'separator' = visual section header."),name:e.string().max(EL),description:e.string().nullable(),classification:e.union([e.literal("product"),e.literal("service"),e.literal("advance"),e.literal(null)]).nullish().describe("Item classification used for Portugal SAF-T product typing."),price:e.number().nullish().describe("Per-unit net price (before tax). Always stores net price. Null for separator items."),gross_price:e.number().nullish().describe(`Per-unit gross price (includes tax).
|
|
214
|
+
Only present if user originally sent gross price.
|
|
215
|
+
Use gross pricing to keep invoice totals stable when VIES reverse charge is applied.`),quantity:e.number().nullish().describe("Item quantity. Null for separator items."),unit:e.string().max(SL).nullish(),taxes:e.array(e.object({rate:e.number().nullish(),tax_id:e.string().nullish(),classification:e.string().nullish(),reverse_charge:e.boolean().nullish(),amount:e.number().nullish(),pt_exemption_code:e.string().nullish(),pt_exemption_reason:e.string().nullish()}).describe("Document Item Tax")).describe("Applied taxes (provide rate to create new tax, or tax_id to use existing tax)"),discounts:e.array(e.object({value:e.number().min(DL).describe("Discount value"),type:e.enum(["percent","amount"]).default(PL).describe("Discount type: 'percent' (default) or 'amount'")})).max(wL).describe("Line discounts (max 5) in request order. In `b2b_standard`, percentage discounts are calculated from the original line subtotal and fixed amounts are summed before tax. In `b2c_gross_discount`, discounts are applied sequentially to the running gross subtotal."),total:e.number().nullish().describe("Line total before tax. Null for separator items."),total_with_tax:e.number().nullish().describe("Line total after tax. Null for separator items."),total_converted:e.number().min(CL).max(AL).nullish(),total_with_tax_converted:e.number().min(ML).max(TL).nullish(),invoice_id:e.string().max(kL).nullish(),advance_invoice_id:e.string().max(BL).nullish(),delivery_note_id:e.string().max(NL).nullish(),item_id:e.string().max(OL).nullish(),metadata:e.record(e.string(),e.string()).nullish().describe("Custom key-value data for your own use. Store any JSON object up to 50 properties. Values must be strings up to 250 characters. Useful for storing external IDs, tags, or integration data."),created_at:e.iso.datetime({}),updated_at:e.iso.datetime({})})),document_relations:e.array(e.object({id:e.string(),source_type:e.enum(["invoice","estimate","credit_note","advance_invoice","delivery_note"]).describe("Type of document"),source_id:e.string(),target_type:e.enum(["invoice","estimate","credit_note","advance_invoice","delivery_note"]).describe("Type of document"),target_id:e.string(),relation_type:e.string(),entity_id:e.string(),created_at:e.iso.datetime({}),linked_document_voided_at:e.iso.datetime({}).nullish(),related_document:e.object({id:e.string(),type:e.enum(["invoice","estimate","credit_note","advance_invoice","delivery_note"]).describe("Type of document"),number:e.string(),date:e.string(),total_with_tax:e.number(),currency_code:e.string(),is_draft:e.boolean(),voided_at:e.string().nullable(),paid_in_full:e.boolean().nullable(),title_type:e.union([e.literal("estimate"),e.literal("proforma_invoice"),e.literal(null)]).nullable(),hide_prices:e.boolean().nullable()}).optional()})).optional()}).describe("Invoice document with fiscalization support"),FL=/^[a-z]{3,4}_[0-9a-f]{24}$/,Wfe=e.object({id:e.stringFormat("resource-id",FL).describe("Unique resource identifier")}),Gfe=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),UL=36,jL=100,qL=2,WL=2,GL="iban",VL=36,LL=2,HL=2,YL="iban",KL=500,$L=-140737488355328,QL=0x7fffffffffff,JL=-140737488355328,ZL=0x7fffffffffff,XL=3,eH=36,tH=-2147483648,oH=2147483647,nH=100,sH=-140737488355328,rH=0x7fffffffffff,iH=-140737488355328,aH=0x7fffffffffff,dH=-140737488355328,cH=0x7fffffffffff,lH=-140737488355328,uH=0x7fffffffffff,pH=0,mH=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,gH=/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?Z?)?$/,yH=36,hH=500,bH=50,xH=0,zH="percent",_H=5,vH=-140737488355328,fH=0x7fffffffffff,RH=-140737488355328,IH=0x7fffffffffff,EH=36,SH=36,DH=36,PH=36,Vfe=e.object({id:e.string().max(UL),number:e.string().max(jL),is_draft:e.boolean().describe("Whether this is a draft document. Draft documents have no sequential number assigned, skip fiscalization, and can be deleted. Use POST /{documents}/{id}/finalize to assign a number and finalize."),date:e.iso.datetime({}).describe("Date the invoice was created (ISO 8601 datetime at midnight UTC)"),issuer:e.object({name:e.string().nullish(),email:e.email().nullish(),address:e.string().nullish(),address_2:e.string().nullish(),post_code:e.string().nullish(),city:e.string().nullish(),state:e.string().nullish(),country:e.string().nullish(),country_code:e.string().min(qL).max(WL).nullish(),tax_number:e.string().nullish(),tax_number_2:e.string().nullish(),company_number:e.string().nullish(),phone:e.string().nullish(),peppol_id:e.string().nullish(),is_end_consumer:e.boolean().nullish(),bank_account:e.object({type:e.enum(["iban","us_domestic","uk_domestic","other"]).default(GL).describe("Account type determines which fields are used"),name:e.string().nullish().describe("Display name for this account. Falls back to account number if not set"),bank_name:e.string().nullish().describe("Bank name"),iban:e.string().nullish().describe("IBAN (for type=iban)"),account_number:e.string().nullish().describe("Account number (for us_domestic, uk_domestic, other)"),bic:e.string().nullish().describe("BIC/SWIFT code for international transfers"),routing_number:e.string().nullish().describe("US ABA routing number (for type=us_domestic)"),sort_code:e.string().nullish().describe("UK sort code (for type=uk_domestic)")}).nullish()}).describe("Document issuer (entity) information"),customer_id:e.string().max(VL).nullish(),customer:e.object({name:e.string().nullish(),email:e.email().nullish(),address:e.string().nullish(),address_2:e.string().nullish(),post_code:e.string().nullish(),city:e.string().nullish(),state:e.string().nullish(),country:e.string().nullish(),country_code:e.string().min(LL).max(HL).nullish(),tax_number:e.string().nullish(),tax_number_2:e.string().nullish(),company_number:e.string().nullish(),phone:e.string().nullish(),peppol_id:e.string().nullish(),is_end_consumer:e.boolean().nullish(),bank_account:e.object({type:e.enum(["iban","us_domestic","uk_domestic","other"]).default(YL).describe("Account type determines which fields are used"),name:e.string().nullish().describe("Display name for this account. Falls back to account number if not set"),bank_name:e.string().nullish().describe("Bank name"),iban:e.string().nullish().describe("IBAN (for type=iban)"),account_number:e.string().nullish().describe("Account number (for us_domestic, uk_domestic, other)"),bic:e.string().nullish().describe("BIC/SWIFT code for international transfers"),routing_number:e.string().nullish().describe("US ABA routing number (for type=us_domestic)"),sort_code:e.string().nullish().describe("UK sort code (for type=uk_domestic)")}).nullish()}).nullish().describe("Customer information"),note:e.string().nullish().describe("Note for the document. If not provided, defaults to entity's document-type-specific note setting. Pass empty string to explicitly set no note."),payment_terms:e.string().nullish().describe("Payment terms for the document. If not provided, defaults to entity's document-type-specific payment terms setting. Pass empty string to explicitly set no terms."),tax_clause:e.string().nullish().describe("Tax clause for the document. Auto-populated based on transaction type if tax_clause_defaults are configured in entity settings. Pass empty string to explicitly set no clause."),footer:e.string().max(KL).nullish(),signature:e.string().nullish().describe("Signature text for the document (e.g. 'John Smith, CEO'). If not provided, defaults to entity's default_document_signature setting. Pass empty string to explicitly set no signature."),total:e.number().min($L).max(QL),total_with_tax:e.number().min(JL).max(ZL),total_discount:e.number().describe("Document discount total stored as a net-equivalent amount for compatibility. In `b2b_standard`, this is the net value of line-item discounts applied before tax. In `b2c_gross_discount`, gross discounts are converted back to their net-equivalent value here. 0 when no discounts applied."),creation_source:e.enum(["standard","custom"]).describe("Internal origin of the create request. `standard` means a normal create endpoint calculated the totals. `custom` means the document was created through a `/custom` endpoint."),calculation_mode:e.enum(["b2b_standard","b2c_gross_discount"]).describe("Resolved calculation mode used for this document. Stored on the document so recalculation and rendering remain stable even if entity defaults change later."),taxes:e.array(e.object({rate:e.number().nullable(),tax_id:e.string().nullish(),base:e.number(),amount:e.number(),reverse_charge:e.boolean().nullish()})).describe("Applied taxes summary"),currency_code:e.string().max(XL),entity_id:e.string().max(eH),date_year:e.number().min(tH).max(oH),shareable_id:e.string().max(nH).nullish(),voided_at:e.iso.datetime({}).nullish(),transaction_type:e.union([e.literal("domestic"),e.literal("intra_eu_b2b"),e.literal("intra_eu_b2c"),e.literal("3w_b2b"),e.literal("3w_b2c"),e.literal("export"),e.literal(null)]).nullish().describe("Transaction type for VAT purposes (domestic, intra_eu_b2b, intra_eu_b2c, export). Always determined based on issuer/customer countries."),metadata:e.record(e.string(),e.string()).nullish().describe("Custom key-value data for your own use. Store any JSON object up to 50 properties. Values must be strings up to 250 characters. Useful for storing external IDs, tags, or integration data."),exchange_rate:e.object({rate:e.number().describe("Exchange rate used for conversion"),source:e.string().describe("Source of the exchange rate (e.g., 'Frankfurter')"),date:e.iso.datetime({}).describe("Date of the exchange rate"),quote_currency:e.string().describe("Quote currency (the base currency converted to)")}).nullish().describe("Currency exchange rate information if conversion was applied"),total_converted:e.number().min(sH).max(rH).nullish(),total_with_tax_converted:e.number().min(iH).max(aH).nullish(),rounding_correction:e.number().nullish().describe("Rounding correction applied to reconcile differences between calculated total_with_tax and expected_total_with_tax. Only present when expected_total_with_tax was provided during creation."),eslog:e.object({validation_enabled:e.boolean().nullish().describe("Override entity default: true = validate, false = skip, null = use entity setting"),validation_status:e.union([e.literal("valid"),e.literal("invalid"),e.literal("not_validated"),e.literal(null)]).nullish().describe("Validation status: 'valid', 'invalid', or 'not_validated'"),validation_errors:e.array(e.string()).nullish().describe("Array of validation error messages (if status is 'invalid')"),validated_at:e.string().nullish().describe("ISO timestamp when validation was last performed")}).nullish().describe("e-SLOG 2.0 validation data for Slovenian electronic invoices. Only applicable when entity.country_code = 'SI' and eslog validation is enabled."),reference:e.string().nullish().describe("Custom reference for the document (e.g., purchase order number, payment reference). When set, used as the UPN payment reference instead of the auto-generated one."),vies:e.object({warning:e.string().nullable().describe("Warning message if VIES validation was unavailable or the VAT number was invalid. Document creation proceeds but this indicates the transaction type may need review."),skipped:e.boolean().nullable().describe("True when VIES validation was skipped due to entity settings (vies_validate_vat: false) but would normally apply. Used for audit trail.")}).nullish().describe("VIES validation info including any warnings and skipped indicator for audit trail"),deleted_at:e.iso.datetime({}).nullish().describe("Timestamp when the document was soft-deleted. Null if not deleted."),created_at:e.iso.datetime({}),updated_at:e.iso.datetime({}),date_due:e.iso.datetime({}).nullish().describe("Date the invoice is due (ISO 8601 datetime at midnight UTC)"),total_paid:e.number().min(dH).max(cH),total_due:e.number().min(lH).max(uH),paid_in_full:e.boolean(),furs:e.object({status:e.enum(["pending","success","failed","skipped"]),fiscalized_at:e.iso.datetime({}).optional(),error:e.string().optional(),cancellation_reason:e.string().optional(),data:e.object({zoi:e.string(),eor:e.string().optional(),qr_code:e.string().optional(),business_premise_name:e.string(),electronic_device_name:e.string(),invoice_number:e.string(),iteration:e.number().default(pH),payload:e.record(e.string(),e.unknown()).describe("FURS API request payload"),issuer_tax_number:e.string().optional(),operator_tax_number:e.string().optional(),operator_label:e.string().optional(),foreign_operator:e.boolean().optional(),cancelled:e.boolean().optional(),cancelled_eor:e.string().optional(),cancellation_payload:e.record(e.string(),e.unknown()).optional().describe("FURS API cancellation payload")}).optional()}).nullish().describe("FURS (Slovenia) fiscalization data. Read-only field, not editable via API. Includes status, premise name, device name, and FURS identifiers (ZOI, EOR, QR code)."),fina:e.object({status:e.enum(["pending","success","failed"]),fiscalized_at:e.iso.datetime({}).optional(),error:e.string().optional(),data:e.object({zki:e.string(),jir:e.string().optional(),qr_code_url:e.string().optional(),business_premise_name:e.string(),electronic_device_name:e.string(),invoice_number:e.string(),operator_oib:e.string().optional(),payment_type:e.string().optional(),numbering_sequence:e.string().optional(),payload:e.record(e.string(),e.unknown()).describe("CIS SOAP request payload"),subsequent_submit:e.boolean().optional(),issuer_oib:e.string().optional(),operator_label:e.string().optional()}).optional()}).nullish().describe("FINA (Croatia) CIS fiscalization data. Read-only field. Includes status, business premise name, electronic device name, and CIS identifiers (ZKI, JIR, QR code URL)."),pt:e.union([e.string(),e.number(),e.boolean(),e.null(),e.record(e.string(),e.unknown()),e.array(e.unknown())]).optional(),date_service:e.string().regex(mH).nullish().describe("Service date in YYYY-MM-DD format. For invoices and credit notes."),date_service_to:e.string().regex(gH).nullish().describe("Service period end date in YYYY-MM-DD format. For invoices and credit notes. Use with date_service for date ranges."),items:e.array(e.object({id:e.string().max(yH),type:e.union([e.literal("separator"),e.literal(null)]).nullish().describe("Item type. null = regular line item, 'separator' = visual section header."),name:e.string().max(hH),description:e.string().nullable(),classification:e.union([e.literal("product"),e.literal("service"),e.literal("advance"),e.literal(null)]).nullish().describe("Item classification used for Portugal SAF-T product typing."),price:e.number().nullish().describe("Per-unit net price (before tax). Always stores net price. Null for separator items."),gross_price:e.number().nullish().describe(`Per-unit gross price (includes tax).
|
|
216
|
+
Only present if user originally sent gross price.
|
|
217
|
+
Use gross pricing to keep invoice totals stable when VIES reverse charge is applied.`),quantity:e.number().nullish().describe("Item quantity. Null for separator items."),unit:e.string().max(bH).nullish(),taxes:e.array(e.object({rate:e.number().nullish(),tax_id:e.string().nullish(),classification:e.string().nullish(),reverse_charge:e.boolean().nullish(),amount:e.number().nullish(),pt_exemption_code:e.string().nullish(),pt_exemption_reason:e.string().nullish()}).describe("Document Item Tax")).describe("Applied taxes (provide rate to create new tax, or tax_id to use existing tax)"),discounts:e.array(e.object({value:e.number().min(xH).describe("Discount value"),type:e.enum(["percent","amount"]).default(zH).describe("Discount type: 'percent' (default) or 'amount'")})).max(_H).describe("Line discounts (max 5) in request order. In `b2b_standard`, percentage discounts are calculated from the original line subtotal and fixed amounts are summed before tax. In `b2c_gross_discount`, discounts are applied sequentially to the running gross subtotal."),total:e.number().nullish().describe("Line total before tax. Null for separator items."),total_with_tax:e.number().nullish().describe("Line total after tax. Null for separator items."),total_converted:e.number().min(vH).max(fH).nullish(),total_with_tax_converted:e.number().min(RH).max(IH).nullish(),invoice_id:e.string().max(EH).nullish(),advance_invoice_id:e.string().max(SH).nullish(),delivery_note_id:e.string().max(DH).nullish(),item_id:e.string().max(PH).nullish(),metadata:e.record(e.string(),e.string()).nullish().describe("Custom key-value data for your own use. Store any JSON object up to 50 properties. Values must be strings up to 250 characters. Useful for storing external IDs, tags, or integration data."),created_at:e.iso.datetime({}),updated_at:e.iso.datetime({})})),document_relations:e.array(e.object({id:e.string(),source_type:e.enum(["invoice","estimate","credit_note","advance_invoice","delivery_note"]).describe("Type of document"),source_id:e.string(),target_type:e.enum(["invoice","estimate","credit_note","advance_invoice","delivery_note"]).describe("Type of document"),target_id:e.string(),relation_type:e.string(),entity_id:e.string(),created_at:e.iso.datetime({}),linked_document_voided_at:e.iso.datetime({}).nullish(),related_document:e.object({id:e.string(),type:e.enum(["invoice","estimate","credit_note","advance_invoice","delivery_note"]).describe("Type of document"),number:e.string(),date:e.string(),total_with_tax:e.number(),currency_code:e.string(),is_draft:e.boolean(),voided_at:e.string().nullable(),paid_in_full:e.boolean().nullable(),title_type:e.union([e.literal("estimate"),e.literal("proforma_invoice"),e.literal(null)]).nullable(),hide_prices:e.boolean().nullable()}).optional()})).optional()}).describe("Invoice document with fiscalization support"),wH=/^[a-z]{3,4}_[0-9a-f]{24}$/,Lfe=e.object({id:e.stringFormat("resource-id",wH).describe("Unique resource identifier")}),CH=2,AH=5,MH=2,TH=5,Hfe=e.object({template:e.enum(["modern","classic","condensed","minimal","fashion"]).optional().describe("Document template design to use. When not specified, uses the entity's configured template."),locale:e.string().min(CH).max(AH).nullish().describe("Locale for number and date formatting (decimal separators, date order). When not specified, uses the entity's configured locale. For example, 'sl-SI' formats decimals with commas (5,5%) and dates as DD. MM. YYYY."),language:e.string().min(MH).max(TH).nullish().describe("Language for document labels and translations (e.g., 'Invoice', 'Tax', 'Total'). When not specified, uses the same value as locale. Use this to get entity-locale formatting with different-language labels \u2014 for example, a Slovenian entity (sl-SI formatting with commas) but English labels.")}),Yfe=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),kH=/^[a-z]{3,4}_[0-9a-f]{24}$/,Kfe=e.object({id:e.stringFormat("resource-id",kH).describe("Unique resource identifier")}),BH=2,NH=5,OH=2,FH=5,$fe=e.object({template:e.enum(["modern","classic","condensed","minimal","fashion"]).optional().describe("Document template design to use. When not specified, uses the entity's configured template."),locale:e.string().min(BH).max(NH).nullish().describe("Locale for number and date formatting (decimal separators, date order). When not specified, uses the entity's configured locale. For example, 'sl-SI' formats decimals with commas (5,5%) and dates as DD. MM. YYYY."),language:e.string().min(OH).max(FH).nullish().describe("Language for document labels and translations (e.g., 'Invoice', 'Tax', 'Total'). When not specified, uses the same value as locale. Use this to get entity-locale formatting with different-language labels \u2014 for example, a Slovenian entity (sl-SI formatting with commas) but English labels.")}),Qfe=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")});var We={};j(We,{CreateItemBody:()=>Zfe,CreateItemHeader:()=>Jfe,DeleteItemHeader:()=>aRe,DeleteItemParams:()=>iRe,GetItemsHeader:()=>eRe,GetItemsQueryParams:()=>Xfe,GetItemsResponse:()=>tRe,PermanentDeleteItemHeader:()=>pRe,PermanentDeleteItemParams:()=>uRe,RestoreItemHeader:()=>cRe,RestoreItemParams:()=>dRe,RestoreItemResponse:()=>lRe,UpdateItemBody:()=>sRe,UpdateItemHeader:()=>nRe,UpdateItemParams:()=>oRe,UpdateItemResponse:()=>rRe,createItemBodyDescriptionMax:()=>UH,createItemBodyTaxIdsItemMax:()=>jH,createItemBodyTaxesItemClassificationMax:()=>GH,createItemBodyTaxesItemRateMax:()=>WH,createItemBodyTaxesItemRateMin:()=>qH,createItemBodyTaxesMax:()=>VH,deleteItemPathIdRegExp:()=>gY,getItemsQueryLimitDefault:()=>LH,getItemsQueryLimitMax:()=>HH,getItemsResponseDataItemOneDescriptionMax:()=>$H,getItemsResponseDataItemOneEntityIdMax:()=>XH,getItemsResponseDataItemOneIdMax:()=>YH,getItemsResponseDataItemOneNameMax:()=>KH,getItemsResponseDataItemOneTaxIdsItemMax:()=>QH,getItemsResponseDataItemOneTotalTaxMax:()=>ZH,getItemsResponseDataItemOneTotalTaxMin:()=>JH,permanentDeleteItemPathIdRegExp:()=>RY,restoreItemPathIdRegExp:()=>yY,restoreItemResponseOneDescriptionMax:()=>xY,restoreItemResponseOneEntityIdMax:()=>fY,restoreItemResponseOneIdMax:()=>hY,restoreItemResponseOneNameMax:()=>bY,restoreItemResponseOneTaxIdsItemMax:()=>zY,restoreItemResponseOneTotalTaxMax:()=>vY,restoreItemResponseOneTotalTaxMin:()=>_Y,updateItemBodyDescriptionMax:()=>tY,updateItemBodyTaxIdsItemMax:()=>oY,updateItemBodyTaxesItemClassificationMax:()=>rY,updateItemBodyTaxesItemRateMax:()=>sY,updateItemBodyTaxesItemRateMin:()=>nY,updateItemBodyTaxesMax:()=>iY,updateItemPathIdRegExp:()=>eY,updateItemResponseOneDescriptionMax:()=>cY,updateItemResponseOneEntityIdMax:()=>mY,updateItemResponseOneIdMax:()=>aY,updateItemResponseOneNameMax:()=>dY,updateItemResponseOneTaxIdsItemMax:()=>lY,updateItemResponseOneTotalTaxMax:()=>pY,updateItemResponseOneTotalTaxMin:()=>uY});var Jfe=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),UH=2e3,jH=36,qH=0,WH=100,GH=50,VH=2,Zfe=e.object({name:e.string().min(1),description:e.string().max(UH).nullish(),classification:e.union([e.literal("product"),e.literal("service"),e.literal("advance"),e.literal(null)]).nullish().describe("Item classification used for Portugal SAF-T item/service typing."),price:e.number().optional().describe("Net price per unit (before tax). Provide either price OR gross_price, not both."),gross_price:e.number().optional().describe("Gross price per unit (includes tax). If provided, net price is calculated. Provide either price OR gross_price, not both."),tax_ids:e.array(e.string().max(jH)).optional(),metadata:e.record(e.string(),e.string()).nullish().describe("Custom key-value data for your own use. Store any JSON object up to 50 properties. Values must be strings up to 250 characters. Useful for storing external IDs, tags, or integration data."),taxes:e.array(e.object({rate:e.number().min(qH).max(WH).optional().describe("Tax rate percentage. Either rate or classification must be provided."),classification:e.string().max(GH).optional().describe("Tax classification to lookup existing tax. Either rate or classification must be provided.")})).max(VH).nullish().describe("Taxes for the item. Provide rate to auto-create, or classification to lookup existing tax.")}),LH=10,HH=100,Xfe=e.object({limit:e.number().min(1).max(HH).default(LH).describe("Number of results per request."),next_cursor:e.string().optional().describe("Opaque cursor to fetch the next page of results. Reuse only with the same effective ordering. Use the value from pagination.next_cursor in the previous response."),prev_cursor:e.string().optional().describe("Opaque cursor to fetch the previous page of results. Reuse only with the same effective ordering. Use the value from pagination.prev_cursor in the previous response."),include_total_count:e.boolean().optional().describe("Whether to include the total count of items in `pagination.total`.\nDefault is `true`.\nWhen `false`, `pagination.total` returns -1 for better performance."),order_by:e.union([e.enum(["id","name","price","created_at","updated_at","-id","-name","-price","-created_at","-updated_at"]),e.array(e.enum(["id","name","price","created_at","updated_at","-id","-name","-price","-created_at","-updated_at"]))]).optional().describe("Sort by one field or provide a repeated array for multi-column ordering. Prefix a field with `-` for descending order. When paginating, reuse cursors only with the same effective ordering."),query:e.string().optional().describe('JSON query object for filtering results. Supports MongoDB-style operators.\n\n**Supported operators:**\n- `equals` or direct value - Exact match (default)\n- `gte` - Greater than or equal\n- `lte` - Less than or equal\n- `gt` - Greater than\n- `lt` - Less than\n- `in` - Value in array\n- `notIn` - Value not in array\n- `contains` - String contains (case-insensitive)\n- `startsWith` - String starts with\n- `endsWith` - String ends with\n- `between` - Value between two numbers/dates [min, max]\n\n**Allowed fields:** id, name, description, price, unit, created_at, updated_at\n\n**Examples:**\n- `{"total": {"gte": 1000}}` - Invoices over 1000\n- `{"customer.name": {"contains": "Acme"}}` - Customer name contains "Acme"\n- `{"date": {"between": ["2025-01-01", "2025-12-31"]}}` - Date range'),search:e.string().optional().describe(`Full-text search query to filter results across multiple fields.
|
|
218
|
+
Searches are case-insensitive and match partial strings.
|
|
219
|
+
Searches across all text fields including names, descriptions, addresses, and metadata values.`),deleted:e.boolean().optional().describe("When true, returns only soft-deleted (trashed) items. Default false excludes deleted items.")}),eRe=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),YH=36,KH=500,$H=2e3,QH=36,JH=-140737488355328,ZH=0x7fffffffffff,XH=36,tRe=e.object({data:e.array(e.object({id:e.string().max(YH),name:e.string().max(KH),description:e.string().max($H).nullish(),classification:e.union([e.literal("product"),e.literal("service"),e.literal("advance"),e.literal(null)]).nullish().describe("Item classification used for Portugal SAF-T product typing."),price:e.number().describe("Per-unit net price (before tax). Always stores net price."),gross_price:e.number().nullish().describe("Per-unit gross price (includes tax). Only present if user originally sent gross price."),tax_ids:e.array(e.string().max(QH)),total_tax:e.number().min(JH).max(ZH),entity_id:e.string().max(XH),metadata:e.union([e.string(),e.number(),e.boolean(),e.null(),e.record(e.string(),e.unknown()),e.array(e.unknown())]),deleted_at:e.iso.datetime({}).nullish(),created_at:e.iso.datetime({}),updated_at:e.iso.datetime({})}).describe("Product or service item").and(e.looseObject({})).describe("Item or Service provided to customers by the Entity")),pagination:e.object({total:e.number().describe("Total number of items available in the collection"),next_cursor:e.string().nullable().describe("Opaque cursor for fetching the next page. It encodes the resolved sort tuple for the current result set, so reuse it only with the same effective ordering. Null if no more results are available."),prev_cursor:e.string().nullable().describe("Opaque cursor for fetching the previous page. It encodes the resolved sort tuple for the current result set, so reuse it only with the same effective ordering. Null if at the first page."),has_more:e.boolean().describe("Indicates whether more results are available after the current page")}).describe("Pagination metadata including cursors and result counts")}),eY=/^[a-z]{3,4}_[0-9a-f]{24}$/,oRe=e.object({id:e.stringFormat("resource-id",eY).describe("Unique resource identifier")}),nRe=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),tY=2e3,oY=36,nY=0,sY=100,rY=50,iY=2,sRe=e.object({name:e.string().min(1).optional(),description:e.string().max(tY).nullish(),classification:e.union([e.literal("product"),e.literal("service"),e.literal("advance"),e.literal(null)]).nullish().describe("Item classification used for Portugal SAF-T item/service typing."),price:e.number().optional().describe("Net price per unit (before tax). Provide either price OR gross_price, not both."),gross_price:e.number().optional().describe("Gross price per unit (includes tax). If provided, net price is calculated. Provide either price OR gross_price, not both."),tax_ids:e.array(e.string().max(oY)).optional(),metadata:e.record(e.string(),e.string()).nullish().describe("Custom key-value data for your own use. Store any JSON object up to 50 properties. Values must be strings up to 250 characters. Useful for storing external IDs, tags, or integration data."),taxes:e.array(e.object({rate:e.number().min(nY).max(sY).optional().describe("Tax rate percentage. Either rate or classification must be provided."),classification:e.string().max(rY).optional().describe("Tax classification to lookup existing tax. Either rate or classification must be provided.")})).max(iY).nullish().describe("Taxes for the item. Provide rate to auto-create, or classification to lookup existing tax.")}),aY=36,dY=500,cY=2e3,lY=36,uY=-140737488355328,pY=0x7fffffffffff,mY=36,rRe=e.object({id:e.string().max(aY),name:e.string().max(dY),description:e.string().max(cY).nullish(),classification:e.union([e.literal("product"),e.literal("service"),e.literal("advance"),e.literal(null)]).nullish().describe("Item classification used for Portugal SAF-T product typing."),price:e.number().describe("Per-unit net price (before tax). Always stores net price."),gross_price:e.number().nullish().describe("Per-unit gross price (includes tax). Only present if user originally sent gross price."),tax_ids:e.array(e.string().max(lY)),total_tax:e.number().min(uY).max(pY),entity_id:e.string().max(mY),metadata:e.union([e.string(),e.number(),e.boolean(),e.null(),e.record(e.string(),e.unknown()),e.array(e.unknown())]),deleted_at:e.iso.datetime({}).nullish(),created_at:e.iso.datetime({}),updated_at:e.iso.datetime({})}).describe("Product or service item").and(e.looseObject({})).describe("Item or Service provided to customers by the Entity"),gY=/^[a-z]{3,4}_[0-9a-f]{24}$/,iRe=e.object({id:e.stringFormat("resource-id",gY).describe("Unique resource identifier")}),aRe=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),yY=/^[a-z]{3,4}_[0-9a-f]{24}$/,dRe=e.object({id:e.stringFormat("resource-id",yY).describe("Unique resource identifier")}),cRe=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),hY=36,bY=500,xY=2e3,zY=36,_Y=-140737488355328,vY=0x7fffffffffff,fY=36,lRe=e.object({id:e.string().max(hY),name:e.string().max(bY),description:e.string().max(xY).nullish(),classification:e.union([e.literal("product"),e.literal("service"),e.literal("advance"),e.literal(null)]).nullish().describe("Item classification used for Portugal SAF-T product typing."),price:e.number().describe("Per-unit net price (before tax). Always stores net price."),gross_price:e.number().nullish().describe("Per-unit gross price (includes tax). Only present if user originally sent gross price."),tax_ids:e.array(e.string().max(zY)),total_tax:e.number().min(_Y).max(vY),entity_id:e.string().max(fY),metadata:e.union([e.string(),e.number(),e.boolean(),e.null(),e.record(e.string(),e.unknown()),e.array(e.unknown())]),deleted_at:e.iso.datetime({}).nullish(),created_at:e.iso.datetime({}),updated_at:e.iso.datetime({})}).describe("Product or service item").and(e.looseObject({})).describe("Item or Service provided to customers by the Entity"),RY=/^[a-z]{3,4}_[0-9a-f]{24}$/,uRe=e.object({id:e.stringFormat("resource-id",RY).describe("Unique resource identifier")}),pRe=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")});var Ge={};j(Ge,{CreateMigrationJobBody:()=>bRe,CreateMigrationJobHeader:()=>hRe,GetMigrationJobHeader:()=>vRe,GetMigrationJobParams:()=>_Re,GetMigrationJobResponse:()=>fRe,LegacyMigrationAuthBody:()=>gRe,LegacyMigrationAuthHeader:()=>mRe,LegacyMigrationAuthResponse:()=>yRe,ListMigrationJobsHeader:()=>xRe,ListMigrationJobsResponse:()=>zRe,createMigrationJobHeaderXAccountIdRegExp:()=>EY,getMigrationJobHeaderXAccountIdRegExp:()=>DY,legacyMigrationAuthHeaderXAccountIdRegExp:()=>IY,listMigrationJobsHeaderXAccountIdRegExp:()=>SY});var IY=/^acc_[0-9a-fA-F]{24}$/,mRe=e.object({"x-account-id":e.string().regex(IY).optional().describe("Account Id on which the request is made. Optional if user is part of only one account.")}),gRe=e.object({email:e.email().describe("Email for legacy Space Invoices account"),password:e.string().min(1).describe("Password for legacy Space Invoices account")}),yRe=e.object({organizations:e.array(e.object({id:e.string().describe("Legacy organization ID"),name:e.string().describe("Organization name"),country:e.string().nullable().describe("Country"),tax_number:e.string().nullable().describe("Tax number"),created_at:e.string().describe("Creation date"),already_migrated:e.boolean().describe("Whether this org has already been migrated"),migrated_environment:e.string().nullable().describe("Environment it was migrated to")})),legacy_session_id:e.string().describe("Temporary server-side legacy session identifier used for async file migration")}),EY=/^acc_[0-9a-fA-F]{24}$/,hRe=e.object({"x-account-id":e.string().regex(EY).optional().describe("Account Id on which the request is made. Optional if user is part of only one account.")}),bRe=e.object({legacy_org_id:e.string().min(1).describe("Legacy organization ID to migrate"),legacy_session_id:e.string().min(1).describe("Temporary legacy session ID created after legacy authentication"),environment:e.enum(["live","sandbox"]).describe("Target environment"),confirm_unsupported_data:e.boolean().optional().describe("Explicit user confirmation that unsupported legacy data will need manual setup")}),SY=/^acc_[0-9a-fA-F]{24}$/,xRe=e.object({"x-account-id":e.string().regex(SY).optional().describe("Account Id on which the request is made. Optional if user is part of only one account.")}),zRe=e.object({data:e.array(e.object({id:e.string().describe("Job ID"),legacy_org_id:e.string().describe("Legacy organization ID"),environment:e.string().describe("Target environment"),entity_id:e.string().nullable().describe("Created entity ID (on completion)"),status:e.enum(["pending","processing","completed","failed"]).describe("Migration job status"),step:e.string().nullable().describe("Current step label"),step_number:e.number().describe("Current step number"),total_steps:e.number().describe("Total number of steps"),progress_detail:e.string().nullable().describe("Progress detail"),error:e.string().nullable().describe("User-friendly error message"),created_at:e.string().describe("Job creation date"),started_at:e.string().nullable().describe("Job start date"),completed_at:e.string().nullable().describe("Job completion date")}))}),_Re=e.object({id:e.string().describe("Migration job ID")}),DY=/^acc_[0-9a-fA-F]{24}$/,vRe=e.object({"x-account-id":e.string().regex(DY).optional().describe("Account Id on which the request is made. Optional if user is part of only one account.")}),fRe=e.object({id:e.string().describe("Job ID"),legacy_org_id:e.string().describe("Legacy organization ID"),environment:e.string().describe("Target environment"),entity_id:e.string().nullable().describe("Created entity ID (on completion)"),status:e.enum(["pending","processing","completed","failed"]).describe("Migration job status"),step:e.string().nullable().describe("Current step label"),step_number:e.number().describe("Current step number"),total_steps:e.number().describe("Total number of steps"),progress_detail:e.string().nullable().describe("Progress detail"),error:e.string().nullable().describe("User-friendly error message"),created_at:e.string().describe("Job creation date"),started_at:e.string().nullable().describe("Job start date"),completed_at:e.string().nullable().describe("Job completion date")});var Ve={};j(Ve,{AuthorizeShopifyBody:()=>IRe,AuthorizeShopifyHeader:()=>RRe,AuthorizeShopifyResponse:()=>ERe,CreateOrderIntegrationBody:()=>ARe,CreateOrderIntegrationHeader:()=>CRe,DeleteOrderIntegrationHeader:()=>GRe,DeleteOrderIntegrationParams:()=>WRe,GetOrderIntegrationByIdHeader:()=>NRe,GetOrderIntegrationByIdParams:()=>BRe,GetOrderIntegrationByIdResponse:()=>ORe,GetOrderIntegrationsHeader:()=>TRe,GetOrderIntegrationsQueryParams:()=>MRe,GetOrderIntegrationsResponse:()=>kRe,SyncShopifyOrdersBody:()=>PRe,SyncShopifyOrdersHeader:()=>DRe,SyncShopifyOrdersParams:()=>SRe,SyncShopifyOrdersResponse:()=>wRe,UpdateOrderIntegrationBody:()=>jRe,UpdateOrderIntegrationHeader:()=>URe,UpdateOrderIntegrationParams:()=>FRe,UpdateOrderIntegrationResponse:()=>qRe,authorizeShopifyBodyAutoProcessDelaySecondsMin:()=>PY,createOrderIntegrationBodyBusinessPremiseIdMax:()=>TY,createOrderIntegrationBodyElectronicDeviceIdMax:()=>kY,createOrderIntegrationBodyLocaleMax:()=>MY,createOrderIntegrationBodySourceDefault:()=>AY,deleteOrderIntegrationPathIdRegExp:()=>f6,getOrderIntegrationByIdPathIdRegExp:()=>KY,getOrderIntegrationByIdResponseOneAutoProcessDelaySecondsMax:()=>o6,getOrderIntegrationByIdResponseOneAutoProcessDelaySecondsMin:()=>t6,getOrderIntegrationByIdResponseOneBusinessPremiseIdMax:()=>s6,getOrderIntegrationByIdResponseOneDefaultPaymentTypeMax:()=>e6,getOrderIntegrationByIdResponseOneElectronicDeviceIdMax:()=>r6,getOrderIntegrationByIdResponseOneEntityIdMax:()=>QY,getOrderIntegrationByIdResponseOneIdMax:()=>$Y,getOrderIntegrationByIdResponseOneLocaleMax:()=>n6,getOrderIntegrationByIdResponseOneNameMax:()=>JY,getOrderIntegrationByIdResponseOneScopesMax:()=>XY,getOrderIntegrationByIdResponseOneShopDomainMax:()=>ZY,getOrderIntegrationsQueryLimitDefault:()=>BY,getOrderIntegrationsQueryLimitMax:()=>NY,getOrderIntegrationsResponseDataItemOneAutoProcessDelaySecondsMax:()=>VY,getOrderIntegrationsResponseDataItemOneAutoProcessDelaySecondsMin:()=>GY,getOrderIntegrationsResponseDataItemOneBusinessPremiseIdMax:()=>HY,getOrderIntegrationsResponseDataItemOneDefaultPaymentTypeMax:()=>WY,getOrderIntegrationsResponseDataItemOneElectronicDeviceIdMax:()=>YY,getOrderIntegrationsResponseDataItemOneEntityIdMax:()=>FY,getOrderIntegrationsResponseDataItemOneIdMax:()=>OY,getOrderIntegrationsResponseDataItemOneLocaleMax:()=>LY,getOrderIntegrationsResponseDataItemOneNameMax:()=>UY,getOrderIntegrationsResponseDataItemOneScopesMax:()=>qY,getOrderIntegrationsResponseDataItemOneShopDomainMax:()=>jY,syncShopifyOrdersBodyLimitMax:()=>CY,syncShopifyOrdersPathIdRegExp:()=>wY,updateOrderIntegrationBodyAutoProcessDelaySecondsMin:()=>l6,updateOrderIntegrationBodyBusinessPremiseIdMax:()=>d6,updateOrderIntegrationBodyElectronicDeviceIdMax:()=>c6,updateOrderIntegrationBodyLocaleMax:()=>a6,updateOrderIntegrationPathIdRegExp:()=>i6,updateOrderIntegrationResponseOneAutoProcessDelaySecondsMax:()=>x6,updateOrderIntegrationResponseOneAutoProcessDelaySecondsMin:()=>b6,updateOrderIntegrationResponseOneBusinessPremiseIdMax:()=>_6,updateOrderIntegrationResponseOneDefaultPaymentTypeMax:()=>h6,updateOrderIntegrationResponseOneElectronicDeviceIdMax:()=>v6,updateOrderIntegrationResponseOneEntityIdMax:()=>p6,updateOrderIntegrationResponseOneIdMax:()=>u6,updateOrderIntegrationResponseOneLocaleMax:()=>z6,updateOrderIntegrationResponseOneNameMax:()=>m6,updateOrderIntegrationResponseOneScopesMax:()=>y6,updateOrderIntegrationResponseOneShopDomainMax:()=>g6});var RRe=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),PY=0,IRe=e.object({shop_domain:e.string().min(1).describe("Shopify shop domain, e.g. myshop.myshopify.com"),name:e.string().optional().describe("Integration name"),auto_process:e.boolean().optional().describe("Auto-create invoices on order receipt"),send_invoice_email:e.boolean().optional().describe("Auto-send invoice email"),issue_invoice_for_bank:e.boolean().optional().describe("Issue invoice (vs estimate) for unpaid bank transfers"),issue_invoice_on_complete:e.boolean().optional().describe("Delay document until order is fulfilled/complete"),auto_process_delay_seconds:e.number().min(PY).optional().describe("Seconds to wait before processing (0 = immediate)")}),ERe=e.object({redirect_url:e.url()}),wY=/^[a-z]{3,4}_[0-9a-f]{24}$/,SRe=e.object({id:e.stringFormat("resource-id",wY).describe("Unique resource identifier")}),DRe=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),CY=250,PRe=e.object({updated_since:e.iso.datetime({}).optional(),updated_until:e.iso.datetime({}).optional(),limit:e.number().min(1).max(CY).optional()}),wRe=e.object({imported:e.number(),updated:e.number(),queued_for_processing:e.number(),total_seen:e.number(),window_start:e.iso.datetime({}),window_end:e.iso.datetime({}).optional()}),CRe=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),AY="manual",MY=10,TY=36,kY=36,ARe=e.object({name:e.string().min(1),source:e.enum(["shopify","woocommerce","manual"]).default(AY),auto_process:e.boolean().optional(),auto_reissue_on_update:e.boolean().optional(),locale:e.string().max(MY).nullish(),business_premise_id:e.string().max(TY).nullish(),electronic_device_id:e.string().max(kY).nullish(),metadata:e.record(e.string(),e.string()).nullish().describe("Custom key-value data for your own use. Store any JSON object up to 50 properties. Values must be strings up to 250 characters. Useful for storing external IDs, tags, or integration data.")}),BY=10,NY=100,MRe=e.object({limit:e.number().min(1).max(NY).default(BY).describe("Number of results per request."),next_cursor:e.string().optional().describe("Opaque cursor to fetch the next page of results. Reuse only with the same effective ordering. Use the value from pagination.next_cursor in the previous response."),prev_cursor:e.string().optional().describe("Opaque cursor to fetch the previous page of results. Reuse only with the same effective ordering. Use the value from pagination.prev_cursor in the previous response."),include_total_count:e.boolean().optional().describe("Whether to include the total count of items in `pagination.total`.\nDefault is `true`.\nWhen `false`, `pagination.total` returns -1 for better performance."),order_by:e.union([e.enum(["id","name","source","created_at","updated_at","-id","-name","-source","-created_at","-updated_at"]),e.array(e.enum(["id","name","source","created_at","updated_at","-id","-name","-source","-created_at","-updated_at"]))]).optional().describe("Sort by one field or provide a repeated array for multi-column ordering. Prefix a field with `-` for descending order. When paginating, reuse cursors only with the same effective ordering."),query:e.string().optional().describe('JSON query object for filtering results. Supports MongoDB-style operators.\n\n**Supported operators:**\n- `equals` or direct value - Exact match (default)\n- `gte` - Greater than or equal\n- `lte` - Less than or equal\n- `gt` - Greater than\n- `lt` - Less than\n- `in` - Value in array\n- `notIn` - Value not in array\n- `contains` - String contains (case-insensitive)\n- `startsWith` - String starts with\n- `endsWith` - String ends with\n- `between` - Value between two numbers/dates [min, max]\n\n**Allowed fields:** id, name, source, is_active, created_at, updated_at\n\n**Examples:**\n- `{"total": {"gte": 1000}}` - Invoices over 1000\n- `{"customer.name": {"contains": "Acme"}}` - Customer name contains "Acme"\n- `{"date": {"between": ["2025-01-01", "2025-12-31"]}}` - Date range'),search:e.string().optional().describe(`Full-text search query to filter results across multiple fields.
|
|
220
|
+
Searches are case-insensitive and match partial strings.
|
|
221
|
+
Searches across all text fields including names, descriptions, addresses, and metadata values.`),deleted:e.boolean().optional().describe("When true, returns only soft-deleted (trashed) items. Default false excludes deleted items.")}),TRe=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),OY=36,FY=36,UY=255,jY=255,qY=1e3,WY=20,GY=-2147483648,VY=2147483647,LY=10,HY=36,YY=36,kRe=e.object({data:e.array(e.object({id:e.string().max(OY),entity_id:e.string().max(FY),name:e.string().max(UY),source:e.enum(["shopify","woocommerce","manual"]).describe("Integration source platform"),is_active:e.boolean(),shop_domain:e.string().max(jY).nullish(),scopes:e.string().max(qY).nullish(),auto_process:e.boolean(),auto_process_on:e.enum(["created","paid","fulfilled"]).describe("When to automatically process orders into invoices"),default_payment_type:e.string().max(WY).nullish(),send_invoice_email:e.boolean(),send_estimate_email:e.boolean(),issue_invoice_for_bank:e.boolean(),issue_invoice_on_complete:e.boolean(),auto_process_delay_seconds:e.number().min(GY).max(VY),auto_reissue_on_update:e.boolean(),locale:e.string().max(LY).nullish(),business_premise_id:e.string().max(HY).nullish(),electronic_device_id:e.string().max(YY).nullish(),metadata:e.union([e.string(),e.number(),e.boolean(),e.null(),e.record(e.string(),e.unknown()),e.array(e.unknown())]),deleted_at:e.iso.datetime({}).nullish(),created_at:e.iso.datetime({}),updated_at:e.iso.datetime({})}).describe("Order integration connection information").and(e.looseObject({})).describe("Order Integration")),pagination:e.object({total:e.number().describe("Total number of items available in the collection"),next_cursor:e.string().nullable().describe("Opaque cursor for fetching the next page. It encodes the resolved sort tuple for the current result set, so reuse it only with the same effective ordering. Null if no more results are available."),prev_cursor:e.string().nullable().describe("Opaque cursor for fetching the previous page. It encodes the resolved sort tuple for the current result set, so reuse it only with the same effective ordering. Null if at the first page."),has_more:e.boolean().describe("Indicates whether more results are available after the current page")}).describe("Pagination metadata including cursors and result counts")}),KY=/^[a-z]{3,4}_[0-9a-f]{24}$/,BRe=e.object({id:e.stringFormat("resource-id",KY).describe("Unique resource identifier")}),NRe=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),$Y=36,QY=36,JY=255,ZY=255,XY=1e3,e6=20,t6=-2147483648,o6=2147483647,n6=10,s6=36,r6=36,ORe=e.object({id:e.string().max($Y),entity_id:e.string().max(QY),name:e.string().max(JY),source:e.enum(["shopify","woocommerce","manual"]).describe("Integration source platform"),is_active:e.boolean(),shop_domain:e.string().max(ZY).nullish(),scopes:e.string().max(XY).nullish(),auto_process:e.boolean(),auto_process_on:e.enum(["created","paid","fulfilled"]).describe("When to automatically process orders into invoices"),default_payment_type:e.string().max(e6).nullish(),send_invoice_email:e.boolean(),send_estimate_email:e.boolean(),issue_invoice_for_bank:e.boolean(),issue_invoice_on_complete:e.boolean(),auto_process_delay_seconds:e.number().min(t6).max(o6),auto_reissue_on_update:e.boolean(),locale:e.string().max(n6).nullish(),business_premise_id:e.string().max(s6).nullish(),electronic_device_id:e.string().max(r6).nullish(),metadata:e.union([e.string(),e.number(),e.boolean(),e.null(),e.record(e.string(),e.unknown()),e.array(e.unknown())]),deleted_at:e.iso.datetime({}).nullish(),created_at:e.iso.datetime({}),updated_at:e.iso.datetime({})}).describe("Order integration connection information").and(e.looseObject({})).describe("Order Integration"),i6=/^[a-z]{3,4}_[0-9a-f]{24}$/,FRe=e.object({id:e.stringFormat("resource-id",i6).describe("Unique resource identifier")}),URe=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),a6=10,d6=36,c6=36,l6=0,jRe=e.object({name:e.string().min(1).optional(),auto_process:e.boolean().optional(),auto_reissue_on_update:e.boolean().optional(),locale:e.string().max(a6).nullish(),business_premise_id:e.string().max(d6).optional(),electronic_device_id:e.string().max(c6).optional(),metadata:e.record(e.string(),e.string()).nullish().describe("Custom key-value data for your own use. Store any JSON object up to 50 properties. Values must be strings up to 250 characters. Useful for storing external IDs, tags, or integration data."),is_active:e.boolean().optional(),auto_process_on:e.enum(["created","paid","fulfilled"]).optional(),default_payment_type:e.string().optional(),send_invoice_email:e.boolean().optional(),send_estimate_email:e.boolean().optional(),issue_invoice_for_bank:e.boolean().optional(),issue_invoice_on_complete:e.boolean().optional(),auto_process_delay_seconds:e.number().min(l6).optional()}),u6=36,p6=36,m6=255,g6=255,y6=1e3,h6=20,b6=-2147483648,x6=2147483647,z6=10,_6=36,v6=36,qRe=e.object({id:e.string().max(u6),entity_id:e.string().max(p6),name:e.string().max(m6),source:e.enum(["shopify","woocommerce","manual"]).describe("Integration source platform"),is_active:e.boolean(),shop_domain:e.string().max(g6).nullish(),scopes:e.string().max(y6).nullish(),auto_process:e.boolean(),auto_process_on:e.enum(["created","paid","fulfilled"]).describe("When to automatically process orders into invoices"),default_payment_type:e.string().max(h6).nullish(),send_invoice_email:e.boolean(),send_estimate_email:e.boolean(),issue_invoice_for_bank:e.boolean(),issue_invoice_on_complete:e.boolean(),auto_process_delay_seconds:e.number().min(b6).max(x6),auto_reissue_on_update:e.boolean(),locale:e.string().max(z6).nullish(),business_premise_id:e.string().max(_6).nullish(),electronic_device_id:e.string().max(v6).nullish(),metadata:e.union([e.string(),e.number(),e.boolean(),e.null(),e.record(e.string(),e.unknown()),e.array(e.unknown())]),deleted_at:e.iso.datetime({}).nullish(),created_at:e.iso.datetime({}),updated_at:e.iso.datetime({})}).describe("Order integration connection information").and(e.looseObject({})).describe("Order Integration"),f6=/^[a-z]{3,4}_[0-9a-f]{24}$/,WRe=e.object({id:e.stringFormat("resource-id",f6).describe("Unique resource identifier")}),GRe=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")});var Le={};j(Le,{CancelOrderHeader:()=>dIe,CancelOrderParams:()=>aIe,CancelOrderResponse:()=>cIe,CreateOrderBody:()=>LRe,CreateOrderHeader:()=>VRe,DeleteOrderHeader:()=>nIe,DeleteOrderParams:()=>oIe,GetOrderByIdHeader:()=>QRe,GetOrderByIdParams:()=>$Re,GetOrderByIdResponse:()=>JRe,GetOrdersHeader:()=>YRe,GetOrdersQueryParams:()=>HRe,GetOrdersResponse:()=>KRe,ProcessOrderHeader:()=>rIe,ProcessOrderParams:()=>sIe,ProcessOrderResponse:()=>iIe,ReissueOrderHeader:()=>uIe,ReissueOrderParams:()=>lIe,ReissueOrderResponse:()=>pIe,UpdateOrderBody:()=>eIe,UpdateOrderHeader:()=>XRe,UpdateOrderParams:()=>ZRe,UpdateOrderResponse:()=>tIe,cancelOrderPathIdRegExp:()=>G$,cancelOrderResponseOneCurrencyCodeMax:()=>Z$,cancelOrderResponseOneCustomerEmailMax:()=>Q$,cancelOrderResponseOneCustomerIdMax:()=>J$,cancelOrderResponseOneCustomerNameMax:()=>$$,cancelOrderResponseOneEntityIdMax:()=>L$,cancelOrderResponseOneErrorMax:()=>pQ,cancelOrderResponseOneEstimateIdMax:()=>lQ,cancelOrderResponseOneIdMax:()=>V$,cancelOrderResponseOneInvoiceIdMax:()=>cQ,cancelOrderResponseOneOrderIntegrationIdMax:()=>H$,cancelOrderResponseOnePaymentGatewayMax:()=>dQ,cancelOrderResponseOnePaymentMethodMax:()=>aQ,cancelOrderResponseOneSourceEventIdMax:()=>uQ,cancelOrderResponseOneSourceIdMax:()=>Y$,cancelOrderResponseOneSourceOrderNumberMax:()=>K$,cancelOrderResponseOneTotalDiscountMax:()=>sQ,cancelOrderResponseOneTotalDiscountMin:()=>nQ,cancelOrderResponseOneTotalMax:()=>eQ,cancelOrderResponseOneTotalMin:()=>X$,cancelOrderResponseOneTotalShippingMax:()=>iQ,cancelOrderResponseOneTotalShippingMin:()=>rQ,cancelOrderResponseOneTotalWithTaxMax:()=>oQ,cancelOrderResponseOneTotalWithTaxMin:()=>tQ,createOrderBodyCurrencyCodeMax:()=>P6,createOrderBodyCustomerEmailMax:()=>D6,createOrderBodyCustomerNameMax:()=>S6,createOrderBodyOrderIntegrationIdMax:()=>R6,createOrderBodyPaymentGatewayMax:()=>F6,createOrderBodyPaymentMethodMax:()=>O6,createOrderBodySourceIdMax:()=>I6,createOrderBodySourceOrderNumberMax:()=>E6,createOrderBodyTotalDiscountMax:()=>k6,createOrderBodyTotalDiscountMin:()=>T6,createOrderBodyTotalMax:()=>C6,createOrderBodyTotalMin:()=>w6,createOrderBodyTotalShippingMax:()=>N6,createOrderBodyTotalShippingMin:()=>B6,createOrderBodyTotalWithTaxMax:()=>M6,createOrderBodyTotalWithTaxMin:()=>A6,deleteOrderPathIdRegExp:()=>x$,getOrderByIdPathIdRegExp:()=>lK,getOrderByIdResponseOneCurrencyCodeMax:()=>zK,getOrderByIdResponseOneCustomerEmailMax:()=>bK,getOrderByIdResponseOneCustomerIdMax:()=>xK,getOrderByIdResponseOneCustomerNameMax:()=>hK,getOrderByIdResponseOneEntityIdMax:()=>pK,getOrderByIdResponseOneErrorMax:()=>TK,getOrderByIdResponseOneEstimateIdMax:()=>AK,getOrderByIdResponseOneIdMax:()=>uK,getOrderByIdResponseOneInvoiceIdMax:()=>CK,getOrderByIdResponseOneOrderIntegrationIdMax:()=>mK,getOrderByIdResponseOnePaymentGatewayMax:()=>wK,getOrderByIdResponseOnePaymentMethodMax:()=>PK,getOrderByIdResponseOneSourceEventIdMax:()=>MK,getOrderByIdResponseOneSourceIdMax:()=>gK,getOrderByIdResponseOneSourceOrderNumberMax:()=>yK,getOrderByIdResponseOneTotalDiscountMax:()=>EK,getOrderByIdResponseOneTotalDiscountMin:()=>IK,getOrderByIdResponseOneTotalMax:()=>vK,getOrderByIdResponseOneTotalMin:()=>_K,getOrderByIdResponseOneTotalShippingMax:()=>DK,getOrderByIdResponseOneTotalShippingMin:()=>SK,getOrderByIdResponseOneTotalWithTaxMax:()=>RK,getOrderByIdResponseOneTotalWithTaxMin:()=>fK,getOrdersQueryLimitDefault:()=>U6,getOrdersQueryLimitMax:()=>j6,getOrdersResponseDataItemOneCurrencyCodeMax:()=>$6,getOrdersResponseDataItemOneCustomerEmailMax:()=>Y6,getOrdersResponseDataItemOneCustomerIdMax:()=>K6,getOrdersResponseDataItemOneCustomerNameMax:()=>H6,getOrdersResponseDataItemOneEntityIdMax:()=>W6,getOrdersResponseDataItemOneErrorMax:()=>cK,getOrdersResponseDataItemOneEstimateIdMax:()=>aK,getOrdersResponseDataItemOneIdMax:()=>q6,getOrdersResponseDataItemOneInvoiceIdMax:()=>iK,getOrdersResponseDataItemOneOrderIntegrationIdMax:()=>G6,getOrdersResponseDataItemOnePaymentGatewayMax:()=>rK,getOrdersResponseDataItemOnePaymentMethodMax:()=>sK,getOrdersResponseDataItemOneSourceEventIdMax:()=>dK,getOrdersResponseDataItemOneSourceIdMax:()=>V6,getOrdersResponseDataItemOneSourceOrderNumberMax:()=>L6,getOrdersResponseDataItemOneTotalDiscountMax:()=>tK,getOrdersResponseDataItemOneTotalDiscountMin:()=>eK,getOrdersResponseDataItemOneTotalMax:()=>J6,getOrdersResponseDataItemOneTotalMin:()=>Q6,getOrdersResponseDataItemOneTotalShippingMax:()=>nK,getOrdersResponseDataItemOneTotalShippingMin:()=>oK,getOrdersResponseDataItemOneTotalWithTaxMax:()=>X6,getOrdersResponseDataItemOneTotalWithTaxMin:()=>Z6,processOrderPathIdRegExp:()=>z$,processOrderResponseOneCurrencyCodeMax:()=>P$,processOrderResponseOneCustomerEmailMax:()=>S$,processOrderResponseOneCustomerIdMax:()=>D$,processOrderResponseOneCustomerNameMax:()=>E$,processOrderResponseOneEntityIdMax:()=>v$,processOrderResponseOneErrorMax:()=>W$,processOrderResponseOneEstimateIdMax:()=>j$,processOrderResponseOneIdMax:()=>_$,processOrderResponseOneInvoiceIdMax:()=>U$,processOrderResponseOneOrderIntegrationIdMax:()=>f$,processOrderResponseOnePaymentGatewayMax:()=>F$,processOrderResponseOnePaymentMethodMax:()=>O$,processOrderResponseOneSourceEventIdMax:()=>q$,processOrderResponseOneSourceIdMax:()=>R$,processOrderResponseOneSourceOrderNumberMax:()=>I$,processOrderResponseOneTotalDiscountMax:()=>k$,processOrderResponseOneTotalDiscountMin:()=>T$,processOrderResponseOneTotalMax:()=>C$,processOrderResponseOneTotalMin:()=>w$,processOrderResponseOneTotalShippingMax:()=>N$,processOrderResponseOneTotalShippingMin:()=>B$,processOrderResponseOneTotalWithTaxMax:()=>M$,processOrderResponseOneTotalWithTaxMin:()=>A$,reissueOrderPathIdRegExp:()=>mQ,reissueOrderResponseOneCurrencyCodeMax:()=>fQ,reissueOrderResponseOneCustomerEmailMax:()=>_Q,reissueOrderResponseOneCustomerIdMax:()=>vQ,reissueOrderResponseOneCustomerNameMax:()=>zQ,reissueOrderResponseOneEntityIdMax:()=>yQ,reissueOrderResponseOneErrorMax:()=>NQ,reissueOrderResponseOneEstimateIdMax:()=>kQ,reissueOrderResponseOneIdMax:()=>gQ,reissueOrderResponseOneInvoiceIdMax:()=>TQ,reissueOrderResponseOneOrderIntegrationIdMax:()=>hQ,reissueOrderResponseOnePaymentGatewayMax:()=>MQ,reissueOrderResponseOnePaymentMethodMax:()=>AQ,reissueOrderResponseOneSourceEventIdMax:()=>BQ,reissueOrderResponseOneSourceIdMax:()=>bQ,reissueOrderResponseOneSourceOrderNumberMax:()=>xQ,reissueOrderResponseOneTotalDiscountMax:()=>PQ,reissueOrderResponseOneTotalDiscountMin:()=>DQ,reissueOrderResponseOneTotalMax:()=>IQ,reissueOrderResponseOneTotalMin:()=>RQ,reissueOrderResponseOneTotalShippingMax:()=>CQ,reissueOrderResponseOneTotalShippingMin:()=>wQ,reissueOrderResponseOneTotalWithTaxMax:()=>SQ,reissueOrderResponseOneTotalWithTaxMin:()=>EQ,updateOrderBodyCurrencyCodeMax:()=>FK,updateOrderBodyCustomerEmailMax:()=>OK,updateOrderBodyCustomerNameMax:()=>NK,updateOrderBodyPaymentGatewayMax:()=>KK,updateOrderBodyPaymentMethodMax:()=>YK,updateOrderBodySourceOrderNumberMax:()=>BK,updateOrderBodyTotalDiscountMax:()=>VK,updateOrderBodyTotalDiscountMin:()=>GK,updateOrderBodyTotalMax:()=>jK,updateOrderBodyTotalMin:()=>UK,updateOrderBodyTotalShippingMax:()=>HK,updateOrderBodyTotalShippingMin:()=>LK,updateOrderBodyTotalWithTaxMax:()=>WK,updateOrderBodyTotalWithTaxMin:()=>qK,updateOrderPathIdRegExp:()=>kK,updateOrderResponseOneCurrencyCodeMax:()=>n$,updateOrderResponseOneCustomerEmailMax:()=>t$,updateOrderResponseOneCustomerIdMax:()=>o$,updateOrderResponseOneCustomerNameMax:()=>e$,updateOrderResponseOneEntityIdMax:()=>QK,updateOrderResponseOneErrorMax:()=>b$,updateOrderResponseOneEstimateIdMax:()=>y$,updateOrderResponseOneIdMax:()=>$K,updateOrderResponseOneInvoiceIdMax:()=>g$,updateOrderResponseOneOrderIntegrationIdMax:()=>JK,updateOrderResponseOnePaymentGatewayMax:()=>m$,updateOrderResponseOnePaymentMethodMax:()=>p$,updateOrderResponseOneSourceEventIdMax:()=>h$,updateOrderResponseOneSourceIdMax:()=>ZK,updateOrderResponseOneSourceOrderNumberMax:()=>XK,updateOrderResponseOneTotalDiscountMax:()=>c$,updateOrderResponseOneTotalDiscountMin:()=>d$,updateOrderResponseOneTotalMax:()=>r$,updateOrderResponseOneTotalMin:()=>s$,updateOrderResponseOneTotalShippingMax:()=>u$,updateOrderResponseOneTotalShippingMin:()=>l$,updateOrderResponseOneTotalWithTaxMax:()=>a$,updateOrderResponseOneTotalWithTaxMin:()=>i$});var VRe=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),R6=36,I6=255,E6=100,S6=255,D6=255,P6=3,w6=-140737488355328,C6=0x7fffffffffff,A6=-140737488355328,M6=0x7fffffffffff,T6=-140737488355328,k6=0x7fffffffffff,B6=-140737488355328,N6=0x7fffffffffff,O6=50,F6=100,LRe=e.object({order_integration_id:e.string().max(R6),source:e.enum(["shopify","woocommerce","manual"]).describe("Order source platform"),source_id:e.string().max(I6),source_order_number:e.string().max(E6).nullish(),customer_name:e.string().max(S6).nullish(),customer_email:e.string().max(D6).nullish(),customer:e.object({phone:e.string().optional(),company_name:e.string().optional(),tax_number:e.string().optional(),company_number:e.string().optional(),is_business:e.boolean().optional(),notes:e.string().optional()}).nullish(),billing_address:e.object({address:e.string().optional(),address_2:e.string().optional(),city:e.string().optional(),state:e.string().optional(),post_code:e.string().optional(),country:e.string().optional(),country_code:e.string().optional()}).nullish(),shipping_address:e.object({address:e.string().optional(),address_2:e.string().optional(),city:e.string().optional(),state:e.string().optional(),post_code:e.string().optional(),country:e.string().optional(),country_code:e.string().optional()}).nullish(),currency_code:e.string().max(P6),total:e.number().min(w6).max(C6),total_with_tax:e.number().min(A6).max(M6),total_discount:e.number().min(T6).max(k6).optional(),total_shipping:e.number().min(B6).max(N6).optional(),items:e.array(e.object({name:e.string(),quantity:e.number(),price:e.number(),gross_price:e.number().optional(),total:e.number(),total_with_tax:e.number(),tax_rate:e.number().optional(),taxes:e.array(e.object({rate:e.number()})).optional(),sku:e.string().optional(),source_id:e.string().optional(),discount:e.number().optional(),unit:e.string().optional(),kind:e.enum(["line_item","shipping"]).optional()})).min(1),payment_status:e.enum(["unpaid","paid","partially_paid","refunded"]).optional().describe("Order payment status"),payment_method:e.string().max(O6).nullish(),payment_gateway:e.string().max(F6).nullish(),ordered_at:e.iso.datetime({}).nullish(),metadata:e.record(e.string(),e.string()).nullish().describe("Custom key-value data for your own use. Store any JSON object up to 50 properties. Values must be strings up to 250 characters. Useful for storing external IDs, tags, or integration data.")}),U6=10,j6=100,HRe=e.object({limit:e.number().min(1).max(j6).default(U6).describe("Number of results per request."),next_cursor:e.string().optional().describe("Opaque cursor to fetch the next page of results. Reuse only with the same effective ordering. Use the value from pagination.next_cursor in the previous response."),prev_cursor:e.string().optional().describe("Opaque cursor to fetch the previous page of results. Reuse only with the same effective ordering. Use the value from pagination.prev_cursor in the previous response."),include_total_count:e.boolean().optional().describe("Whether to include the total count of items in `pagination.total`.\nDefault is `true`.\nWhen `false`, `pagination.total` returns -1 for better performance."),order_by:e.union([e.enum(["id","status","source","customer_name","total","created_at","updated_at","-id","-status","-source","-customer_name","-total","-created_at","-updated_at"]),e.array(e.enum(["id","status","source","customer_name","total","created_at","updated_at","-id","-status","-source","-customer_name","-total","-created_at","-updated_at"]))]).optional().describe("Sort by one field or provide a repeated array for multi-column ordering. Prefix a field with `-` for descending order. When paginating, reuse cursors only with the same effective ordering."),query:e.string().optional().describe('JSON query object for filtering results. Supports MongoDB-style operators.\n\n**Supported operators:**\n- `equals` or direct value - Exact match (default)\n- `gte` - Greater than or equal\n- `lte` - Less than or equal\n- `gt` - Greater than\n- `lt` - Less than\n- `in` - Value in array\n- `notIn` - Value not in array\n- `contains` - String contains (case-insensitive)\n- `startsWith` - String starts with\n- `endsWith` - String ends with\n- `between` - Value between two numbers/dates [min, max]\n\n**Allowed fields:** id, status, source, source_id, customer_name, customer_email, payment_status, order_integration_id, created_at, updated_at\n\n**Examples:**\n- `{"total": {"gte": 1000}}` - Invoices over 1000\n- `{"customer.name": {"contains": "Acme"}}` - Customer name contains "Acme"\n- `{"date": {"between": ["2025-01-01", "2025-12-31"]}}` - Date range'),search:e.string().optional().describe(`Full-text search query to filter results across multiple fields.
|
|
222
|
+
Searches are case-insensitive and match partial strings.
|
|
223
|
+
Searches across all text fields including names, descriptions, addresses, and metadata values.`),deleted:e.boolean().optional().describe("When true, returns only soft-deleted (trashed) items. Default false excludes deleted items.")}),YRe=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),q6=36,W6=36,G6=36,V6=255,L6=100,H6=255,Y6=255,K6=36,$6=3,Q6=-140737488355328,J6=0x7fffffffffff,Z6=-140737488355328,X6=0x7fffffffffff,eK=-140737488355328,tK=0x7fffffffffff,oK=-140737488355328,nK=0x7fffffffffff,sK=50,rK=100,iK=36,aK=36,dK=255,cK=2e3,KRe=e.object({data:e.array(e.object({id:e.string().max(q6),entity_id:e.string().max(W6),order_integration_id:e.string().max(G6),source:e.enum(["shopify","woocommerce","manual"]).describe("Order source platform"),source_id:e.string().max(V6),source_order_number:e.string().max(L6).nullish(),status:e.enum(["pending","processing","invoiced","cancelled","failed"]).describe("Order processing status"),paid:e.boolean(),paid_at:e.iso.datetime({}).nullish(),fulfilled:e.boolean(),fulfilled_at:e.iso.datetime({}).nullish(),cancelled:e.boolean(),cancelled_at:e.iso.datetime({}).nullish(),refunded:e.boolean(),refunded_at:e.iso.datetime({}).nullish(),customer_name:e.string().max(H6).nullish(),customer_email:e.string().max(Y6).nullish(),customer:e.object({phone:e.string().optional(),company_name:e.string().optional(),tax_number:e.string().optional(),company_number:e.string().optional(),is_business:e.boolean().optional(),notes:e.string().optional()}).nullish(),billing_address:e.object({address:e.string().optional(),address_2:e.string().optional(),city:e.string().optional(),state:e.string().optional(),post_code:e.string().optional(),country:e.string().optional(),country_code:e.string().optional()}).nullish(),shipping_address:e.object({address:e.string().optional(),address_2:e.string().optional(),city:e.string().optional(),state:e.string().optional(),post_code:e.string().optional(),country:e.string().optional(),country_code:e.string().optional()}).nullish(),customer_id:e.string().max(K6).nullish(),currency_code:e.string().max($6),total:e.number().min(Q6).max(J6),total_with_tax:e.number().min(Z6).max(X6),total_discount:e.number().min(eK).max(tK),total_shipping:e.number().min(oK).max(nK),items:e.array(e.object({name:e.string(),quantity:e.number(),price:e.number(),gross_price:e.number().optional(),total:e.number(),total_with_tax:e.number(),tax_rate:e.number().optional(),taxes:e.array(e.object({rate:e.number()})).optional(),sku:e.string().optional(),source_id:e.string().optional(),discount:e.number().optional(),unit:e.string().optional(),kind:e.enum(["line_item","shipping"]).optional()})),payment_status:e.enum(["unpaid","paid","partially_paid","refunded"]).describe("Order payment status"),payment_method:e.string().max(sK).nullish(),payment_gateway:e.string().max(rK).nullish(),invoice_id:e.string().max(iK).nullish(),estimate_id:e.string().max(aK).nullish(),process_after:e.iso.datetime({}).nullish(),transactions:e.array(e.object({amount:e.number(),gateway:e.string(),status:e.string(),tag:e.string().optional(),date:e.string(),note:e.string().optional()})),complete:e.boolean(),items_changed_after_processing:e.boolean(),raw_data:e.record(e.string(),e.unknown()).nullish(),source_event_id:e.string().max(dK).nullish(),error:e.string().max(cK).nullish(),ordered_at:e.iso.datetime({}).nullish(),processed_at:e.iso.datetime({}).nullish(),metadata:e.union([e.string(),e.number(),e.boolean(),e.null(),e.record(e.string(),e.unknown()),e.array(e.unknown())]),deleted_at:e.iso.datetime({}).nullish(),created_at:e.iso.datetime({}),updated_at:e.iso.datetime({})}).describe("Order information").and(e.looseObject({})).describe("Order")),pagination:e.object({total:e.number().describe("Total number of items available in the collection"),next_cursor:e.string().nullable().describe("Opaque cursor for fetching the next page. It encodes the resolved sort tuple for the current result set, so reuse it only with the same effective ordering. Null if no more results are available."),prev_cursor:e.string().nullable().describe("Opaque cursor for fetching the previous page. It encodes the resolved sort tuple for the current result set, so reuse it only with the same effective ordering. Null if at the first page."),has_more:e.boolean().describe("Indicates whether more results are available after the current page")}).describe("Pagination metadata including cursors and result counts")}),lK=/^[a-z]{3,4}_[0-9a-f]{24}$/,$Re=e.object({id:e.stringFormat("resource-id",lK).describe("Unique resource identifier")}),QRe=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),uK=36,pK=36,mK=36,gK=255,yK=100,hK=255,bK=255,xK=36,zK=3,_K=-140737488355328,vK=0x7fffffffffff,fK=-140737488355328,RK=0x7fffffffffff,IK=-140737488355328,EK=0x7fffffffffff,SK=-140737488355328,DK=0x7fffffffffff,PK=50,wK=100,CK=36,AK=36,MK=255,TK=2e3,JRe=e.object({id:e.string().max(uK),entity_id:e.string().max(pK),order_integration_id:e.string().max(mK),source:e.enum(["shopify","woocommerce","manual"]).describe("Order source platform"),source_id:e.string().max(gK),source_order_number:e.string().max(yK).nullish(),status:e.enum(["pending","processing","invoiced","cancelled","failed"]).describe("Order processing status"),paid:e.boolean(),paid_at:e.iso.datetime({}).nullish(),fulfilled:e.boolean(),fulfilled_at:e.iso.datetime({}).nullish(),cancelled:e.boolean(),cancelled_at:e.iso.datetime({}).nullish(),refunded:e.boolean(),refunded_at:e.iso.datetime({}).nullish(),customer_name:e.string().max(hK).nullish(),customer_email:e.string().max(bK).nullish(),customer:e.object({phone:e.string().optional(),company_name:e.string().optional(),tax_number:e.string().optional(),company_number:e.string().optional(),is_business:e.boolean().optional(),notes:e.string().optional()}).nullish(),billing_address:e.object({address:e.string().optional(),address_2:e.string().optional(),city:e.string().optional(),state:e.string().optional(),post_code:e.string().optional(),country:e.string().optional(),country_code:e.string().optional()}).nullish(),shipping_address:e.object({address:e.string().optional(),address_2:e.string().optional(),city:e.string().optional(),state:e.string().optional(),post_code:e.string().optional(),country:e.string().optional(),country_code:e.string().optional()}).nullish(),customer_id:e.string().max(xK).nullish(),currency_code:e.string().max(zK),total:e.number().min(_K).max(vK),total_with_tax:e.number().min(fK).max(RK),total_discount:e.number().min(IK).max(EK),total_shipping:e.number().min(SK).max(DK),items:e.array(e.object({name:e.string(),quantity:e.number(),price:e.number(),gross_price:e.number().optional(),total:e.number(),total_with_tax:e.number(),tax_rate:e.number().optional(),taxes:e.array(e.object({rate:e.number()})).optional(),sku:e.string().optional(),source_id:e.string().optional(),discount:e.number().optional(),unit:e.string().optional(),kind:e.enum(["line_item","shipping"]).optional()})),payment_status:e.enum(["unpaid","paid","partially_paid","refunded"]).describe("Order payment status"),payment_method:e.string().max(PK).nullish(),payment_gateway:e.string().max(wK).nullish(),invoice_id:e.string().max(CK).nullish(),estimate_id:e.string().max(AK).nullish(),process_after:e.iso.datetime({}).nullish(),transactions:e.array(e.object({amount:e.number(),gateway:e.string(),status:e.string(),tag:e.string().optional(),date:e.string(),note:e.string().optional()})),complete:e.boolean(),items_changed_after_processing:e.boolean(),raw_data:e.record(e.string(),e.unknown()).nullish(),source_event_id:e.string().max(MK).nullish(),error:e.string().max(TK).nullish(),ordered_at:e.iso.datetime({}).nullish(),processed_at:e.iso.datetime({}).nullish(),metadata:e.union([e.string(),e.number(),e.boolean(),e.null(),e.record(e.string(),e.unknown()),e.array(e.unknown())]),deleted_at:e.iso.datetime({}).nullish(),created_at:e.iso.datetime({}),updated_at:e.iso.datetime({})}).describe("Order information").and(e.looseObject({})).describe("Order"),kK=/^[a-z]{3,4}_[0-9a-f]{24}$/,ZRe=e.object({id:e.stringFormat("resource-id",kK).describe("Unique resource identifier")}),XRe=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),BK=100,NK=255,OK=255,FK=3,UK=-140737488355328,jK=0x7fffffffffff,qK=-140737488355328,WK=0x7fffffffffff,GK=-140737488355328,VK=0x7fffffffffff,LK=-140737488355328,HK=0x7fffffffffff,YK=50,KK=100,eIe=e.object({source_order_number:e.string().max(BK).nullish(),customer_name:e.string().max(NK).nullish(),customer_email:e.string().max(OK).nullish(),customer:e.object({phone:e.string().optional(),company_name:e.string().optional(),tax_number:e.string().optional(),company_number:e.string().optional(),is_business:e.boolean().optional(),notes:e.string().optional()}).nullish(),billing_address:e.object({address:e.string().optional(),address_2:e.string().optional(),city:e.string().optional(),state:e.string().optional(),post_code:e.string().optional(),country:e.string().optional(),country_code:e.string().optional()}).nullish(),shipping_address:e.object({address:e.string().optional(),address_2:e.string().optional(),city:e.string().optional(),state:e.string().optional(),post_code:e.string().optional(),country:e.string().optional(),country_code:e.string().optional()}).nullish(),currency_code:e.string().max(FK).optional(),total:e.number().min(UK).max(jK).optional(),total_with_tax:e.number().min(qK).max(WK).optional(),total_discount:e.number().min(GK).max(VK).optional(),total_shipping:e.number().min(LK).max(HK).optional(),items:e.array(e.object({name:e.string(),quantity:e.number(),price:e.number(),gross_price:e.number().optional(),total:e.number(),total_with_tax:e.number(),tax_rate:e.number().optional(),taxes:e.array(e.object({rate:e.number()})).optional(),sku:e.string().optional(),source_id:e.string().optional(),discount:e.number().optional(),unit:e.string().optional(),kind:e.enum(["line_item","shipping"]).optional()})).min(1).optional(),payment_status:e.enum(["unpaid","paid","partially_paid","refunded"]).optional().describe("Order payment status"),payment_method:e.string().max(YK).nullish(),payment_gateway:e.string().max(KK).nullish(),ordered_at:e.iso.datetime({}).nullish(),metadata:e.record(e.string(),e.string()).nullish().describe("Custom key-value data for your own use. Store any JSON object up to 50 properties. Values must be strings up to 250 characters. Useful for storing external IDs, tags, or integration data.")}),$K=36,QK=36,JK=36,ZK=255,XK=100,e$=255,t$=255,o$=36,n$=3,s$=-140737488355328,r$=0x7fffffffffff,i$=-140737488355328,a$=0x7fffffffffff,d$=-140737488355328,c$=0x7fffffffffff,l$=-140737488355328,u$=0x7fffffffffff,p$=50,m$=100,g$=36,y$=36,h$=255,b$=2e3,tIe=e.object({id:e.string().max($K),entity_id:e.string().max(QK),order_integration_id:e.string().max(JK),source:e.enum(["shopify","woocommerce","manual"]).describe("Order source platform"),source_id:e.string().max(ZK),source_order_number:e.string().max(XK).nullish(),status:e.enum(["pending","processing","invoiced","cancelled","failed"]).describe("Order processing status"),paid:e.boolean(),paid_at:e.iso.datetime({}).nullish(),fulfilled:e.boolean(),fulfilled_at:e.iso.datetime({}).nullish(),cancelled:e.boolean(),cancelled_at:e.iso.datetime({}).nullish(),refunded:e.boolean(),refunded_at:e.iso.datetime({}).nullish(),customer_name:e.string().max(e$).nullish(),customer_email:e.string().max(t$).nullish(),customer:e.object({phone:e.string().optional(),company_name:e.string().optional(),tax_number:e.string().optional(),company_number:e.string().optional(),is_business:e.boolean().optional(),notes:e.string().optional()}).nullish(),billing_address:e.object({address:e.string().optional(),address_2:e.string().optional(),city:e.string().optional(),state:e.string().optional(),post_code:e.string().optional(),country:e.string().optional(),country_code:e.string().optional()}).nullish(),shipping_address:e.object({address:e.string().optional(),address_2:e.string().optional(),city:e.string().optional(),state:e.string().optional(),post_code:e.string().optional(),country:e.string().optional(),country_code:e.string().optional()}).nullish(),customer_id:e.string().max(o$).nullish(),currency_code:e.string().max(n$),total:e.number().min(s$).max(r$),total_with_tax:e.number().min(i$).max(a$),total_discount:e.number().min(d$).max(c$),total_shipping:e.number().min(l$).max(u$),items:e.array(e.object({name:e.string(),quantity:e.number(),price:e.number(),gross_price:e.number().optional(),total:e.number(),total_with_tax:e.number(),tax_rate:e.number().optional(),taxes:e.array(e.object({rate:e.number()})).optional(),sku:e.string().optional(),source_id:e.string().optional(),discount:e.number().optional(),unit:e.string().optional(),kind:e.enum(["line_item","shipping"]).optional()})),payment_status:e.enum(["unpaid","paid","partially_paid","refunded"]).describe("Order payment status"),payment_method:e.string().max(p$).nullish(),payment_gateway:e.string().max(m$).nullish(),invoice_id:e.string().max(g$).nullish(),estimate_id:e.string().max(y$).nullish(),process_after:e.iso.datetime({}).nullish(),transactions:e.array(e.object({amount:e.number(),gateway:e.string(),status:e.string(),tag:e.string().optional(),date:e.string(),note:e.string().optional()})),complete:e.boolean(),items_changed_after_processing:e.boolean(),raw_data:e.record(e.string(),e.unknown()).nullish(),source_event_id:e.string().max(h$).nullish(),error:e.string().max(b$).nullish(),ordered_at:e.iso.datetime({}).nullish(),processed_at:e.iso.datetime({}).nullish(),metadata:e.union([e.string(),e.number(),e.boolean(),e.null(),e.record(e.string(),e.unknown()),e.array(e.unknown())]),deleted_at:e.iso.datetime({}).nullish(),created_at:e.iso.datetime({}),updated_at:e.iso.datetime({})}).describe("Order information").and(e.looseObject({})).describe("Order"),x$=/^[a-z]{3,4}_[0-9a-f]{24}$/,oIe=e.object({id:e.stringFormat("resource-id",x$).describe("Unique resource identifier")}),nIe=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),z$=/^[a-z]{3,4}_[0-9a-f]{24}$/,sIe=e.object({id:e.stringFormat("resource-id",z$).describe("Unique resource identifier")}),rIe=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),_$=36,v$=36,f$=36,R$=255,I$=100,E$=255,S$=255,D$=36,P$=3,w$=-140737488355328,C$=0x7fffffffffff,A$=-140737488355328,M$=0x7fffffffffff,T$=-140737488355328,k$=0x7fffffffffff,B$=-140737488355328,N$=0x7fffffffffff,O$=50,F$=100,U$=36,j$=36,q$=255,W$=2e3,iIe=e.object({id:e.string().max(_$),entity_id:e.string().max(v$),order_integration_id:e.string().max(f$),source:e.enum(["shopify","woocommerce","manual"]).describe("Order source platform"),source_id:e.string().max(R$),source_order_number:e.string().max(I$).nullish(),status:e.enum(["pending","processing","invoiced","cancelled","failed"]).describe("Order processing status"),paid:e.boolean(),paid_at:e.iso.datetime({}).nullish(),fulfilled:e.boolean(),fulfilled_at:e.iso.datetime({}).nullish(),cancelled:e.boolean(),cancelled_at:e.iso.datetime({}).nullish(),refunded:e.boolean(),refunded_at:e.iso.datetime({}).nullish(),customer_name:e.string().max(E$).nullish(),customer_email:e.string().max(S$).nullish(),customer:e.object({phone:e.string().optional(),company_name:e.string().optional(),tax_number:e.string().optional(),company_number:e.string().optional(),is_business:e.boolean().optional(),notes:e.string().optional()}).nullish(),billing_address:e.object({address:e.string().optional(),address_2:e.string().optional(),city:e.string().optional(),state:e.string().optional(),post_code:e.string().optional(),country:e.string().optional(),country_code:e.string().optional()}).nullish(),shipping_address:e.object({address:e.string().optional(),address_2:e.string().optional(),city:e.string().optional(),state:e.string().optional(),post_code:e.string().optional(),country:e.string().optional(),country_code:e.string().optional()}).nullish(),customer_id:e.string().max(D$).nullish(),currency_code:e.string().max(P$),total:e.number().min(w$).max(C$),total_with_tax:e.number().min(A$).max(M$),total_discount:e.number().min(T$).max(k$),total_shipping:e.number().min(B$).max(N$),items:e.array(e.object({name:e.string(),quantity:e.number(),price:e.number(),gross_price:e.number().optional(),total:e.number(),total_with_tax:e.number(),tax_rate:e.number().optional(),taxes:e.array(e.object({rate:e.number()})).optional(),sku:e.string().optional(),source_id:e.string().optional(),discount:e.number().optional(),unit:e.string().optional(),kind:e.enum(["line_item","shipping"]).optional()})),payment_status:e.enum(["unpaid","paid","partially_paid","refunded"]).describe("Order payment status"),payment_method:e.string().max(O$).nullish(),payment_gateway:e.string().max(F$).nullish(),invoice_id:e.string().max(U$).nullish(),estimate_id:e.string().max(j$).nullish(),process_after:e.iso.datetime({}).nullish(),transactions:e.array(e.object({amount:e.number(),gateway:e.string(),status:e.string(),tag:e.string().optional(),date:e.string(),note:e.string().optional()})),complete:e.boolean(),items_changed_after_processing:e.boolean(),raw_data:e.record(e.string(),e.unknown()).nullish(),source_event_id:e.string().max(q$).nullish(),error:e.string().max(W$).nullish(),ordered_at:e.iso.datetime({}).nullish(),processed_at:e.iso.datetime({}).nullish(),metadata:e.union([e.string(),e.number(),e.boolean(),e.null(),e.record(e.string(),e.unknown()),e.array(e.unknown())]),deleted_at:e.iso.datetime({}).nullish(),created_at:e.iso.datetime({}),updated_at:e.iso.datetime({})}).describe("Order information").and(e.looseObject({})).describe("Order"),G$=/^[a-z]{3,4}_[0-9a-f]{24}$/,aIe=e.object({id:e.stringFormat("resource-id",G$).describe("Unique resource identifier")}),dIe=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),V$=36,L$=36,H$=36,Y$=255,K$=100,$$=255,Q$=255,J$=36,Z$=3,X$=-140737488355328,eQ=0x7fffffffffff,tQ=-140737488355328,oQ=0x7fffffffffff,nQ=-140737488355328,sQ=0x7fffffffffff,rQ=-140737488355328,iQ=0x7fffffffffff,aQ=50,dQ=100,cQ=36,lQ=36,uQ=255,pQ=2e3,cIe=e.object({id:e.string().max(V$),entity_id:e.string().max(L$),order_integration_id:e.string().max(H$),source:e.enum(["shopify","woocommerce","manual"]).describe("Order source platform"),source_id:e.string().max(Y$),source_order_number:e.string().max(K$).nullish(),status:e.enum(["pending","processing","invoiced","cancelled","failed"]).describe("Order processing status"),paid:e.boolean(),paid_at:e.iso.datetime({}).nullish(),fulfilled:e.boolean(),fulfilled_at:e.iso.datetime({}).nullish(),cancelled:e.boolean(),cancelled_at:e.iso.datetime({}).nullish(),refunded:e.boolean(),refunded_at:e.iso.datetime({}).nullish(),customer_name:e.string().max($$).nullish(),customer_email:e.string().max(Q$).nullish(),customer:e.object({phone:e.string().optional(),company_name:e.string().optional(),tax_number:e.string().optional(),company_number:e.string().optional(),is_business:e.boolean().optional(),notes:e.string().optional()}).nullish(),billing_address:e.object({address:e.string().optional(),address_2:e.string().optional(),city:e.string().optional(),state:e.string().optional(),post_code:e.string().optional(),country:e.string().optional(),country_code:e.string().optional()}).nullish(),shipping_address:e.object({address:e.string().optional(),address_2:e.string().optional(),city:e.string().optional(),state:e.string().optional(),post_code:e.string().optional(),country:e.string().optional(),country_code:e.string().optional()}).nullish(),customer_id:e.string().max(J$).nullish(),currency_code:e.string().max(Z$),total:e.number().min(X$).max(eQ),total_with_tax:e.number().min(tQ).max(oQ),total_discount:e.number().min(nQ).max(sQ),total_shipping:e.number().min(rQ).max(iQ),items:e.array(e.object({name:e.string(),quantity:e.number(),price:e.number(),gross_price:e.number().optional(),total:e.number(),total_with_tax:e.number(),tax_rate:e.number().optional(),taxes:e.array(e.object({rate:e.number()})).optional(),sku:e.string().optional(),source_id:e.string().optional(),discount:e.number().optional(),unit:e.string().optional(),kind:e.enum(["line_item","shipping"]).optional()})),payment_status:e.enum(["unpaid","paid","partially_paid","refunded"]).describe("Order payment status"),payment_method:e.string().max(aQ).nullish(),payment_gateway:e.string().max(dQ).nullish(),invoice_id:e.string().max(cQ).nullish(),estimate_id:e.string().max(lQ).nullish(),process_after:e.iso.datetime({}).nullish(),transactions:e.array(e.object({amount:e.number(),gateway:e.string(),status:e.string(),tag:e.string().optional(),date:e.string(),note:e.string().optional()})),complete:e.boolean(),items_changed_after_processing:e.boolean(),raw_data:e.record(e.string(),e.unknown()).nullish(),source_event_id:e.string().max(uQ).nullish(),error:e.string().max(pQ).nullish(),ordered_at:e.iso.datetime({}).nullish(),processed_at:e.iso.datetime({}).nullish(),metadata:e.union([e.string(),e.number(),e.boolean(),e.null(),e.record(e.string(),e.unknown()),e.array(e.unknown())]),deleted_at:e.iso.datetime({}).nullish(),created_at:e.iso.datetime({}),updated_at:e.iso.datetime({})}).describe("Order information").and(e.looseObject({})).describe("Order"),mQ=/^[a-z]{3,4}_[0-9a-f]{24}$/,lIe=e.object({id:e.stringFormat("resource-id",mQ).describe("Unique resource identifier")}),uIe=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),gQ=36,yQ=36,hQ=36,bQ=255,xQ=100,zQ=255,_Q=255,vQ=36,fQ=3,RQ=-140737488355328,IQ=0x7fffffffffff,EQ=-140737488355328,SQ=0x7fffffffffff,DQ=-140737488355328,PQ=0x7fffffffffff,wQ=-140737488355328,CQ=0x7fffffffffff,AQ=50,MQ=100,TQ=36,kQ=36,BQ=255,NQ=2e3,pIe=e.object({id:e.string().max(gQ),entity_id:e.string().max(yQ),order_integration_id:e.string().max(hQ),source:e.enum(["shopify","woocommerce","manual"]).describe("Order source platform"),source_id:e.string().max(bQ),source_order_number:e.string().max(xQ).nullish(),status:e.enum(["pending","processing","invoiced","cancelled","failed"]).describe("Order processing status"),paid:e.boolean(),paid_at:e.iso.datetime({}).nullish(),fulfilled:e.boolean(),fulfilled_at:e.iso.datetime({}).nullish(),cancelled:e.boolean(),cancelled_at:e.iso.datetime({}).nullish(),refunded:e.boolean(),refunded_at:e.iso.datetime({}).nullish(),customer_name:e.string().max(zQ).nullish(),customer_email:e.string().max(_Q).nullish(),customer:e.object({phone:e.string().optional(),company_name:e.string().optional(),tax_number:e.string().optional(),company_number:e.string().optional(),is_business:e.boolean().optional(),notes:e.string().optional()}).nullish(),billing_address:e.object({address:e.string().optional(),address_2:e.string().optional(),city:e.string().optional(),state:e.string().optional(),post_code:e.string().optional(),country:e.string().optional(),country_code:e.string().optional()}).nullish(),shipping_address:e.object({address:e.string().optional(),address_2:e.string().optional(),city:e.string().optional(),state:e.string().optional(),post_code:e.string().optional(),country:e.string().optional(),country_code:e.string().optional()}).nullish(),customer_id:e.string().max(vQ).nullish(),currency_code:e.string().max(fQ),total:e.number().min(RQ).max(IQ),total_with_tax:e.number().min(EQ).max(SQ),total_discount:e.number().min(DQ).max(PQ),total_shipping:e.number().min(wQ).max(CQ),items:e.array(e.object({name:e.string(),quantity:e.number(),price:e.number(),gross_price:e.number().optional(),total:e.number(),total_with_tax:e.number(),tax_rate:e.number().optional(),taxes:e.array(e.object({rate:e.number()})).optional(),sku:e.string().optional(),source_id:e.string().optional(),discount:e.number().optional(),unit:e.string().optional(),kind:e.enum(["line_item","shipping"]).optional()})),payment_status:e.enum(["unpaid","paid","partially_paid","refunded"]).describe("Order payment status"),payment_method:e.string().max(AQ).nullish(),payment_gateway:e.string().max(MQ).nullish(),invoice_id:e.string().max(TQ).nullish(),estimate_id:e.string().max(kQ).nullish(),process_after:e.iso.datetime({}).nullish(),transactions:e.array(e.object({amount:e.number(),gateway:e.string(),status:e.string(),tag:e.string().optional(),date:e.string(),note:e.string().optional()})),complete:e.boolean(),items_changed_after_processing:e.boolean(),raw_data:e.record(e.string(),e.unknown()).nullish(),source_event_id:e.string().max(BQ).nullish(),error:e.string().max(NQ).nullish(),ordered_at:e.iso.datetime({}).nullish(),processed_at:e.iso.datetime({}).nullish(),metadata:e.union([e.string(),e.number(),e.boolean(),e.null(),e.record(e.string(),e.unknown()),e.array(e.unknown())]),deleted_at:e.iso.datetime({}).nullish(),created_at:e.iso.datetime({}),updated_at:e.iso.datetime({})}).describe("Order information").and(e.looseObject({})).describe("Order");var He={};j(He,{CreatePaymentBody:()=>gIe,CreatePaymentHeader:()=>mIe,DeletePaymentHeader:()=>DIe,DeletePaymentParams:()=>SIe,GetPaymentByIdHeader:()=>_Ie,GetPaymentByIdParams:()=>xIe,GetPaymentByIdQueryParams:()=>zIe,GetPaymentByIdResponse:()=>vIe,GetPaymentsHeader:()=>hIe,GetPaymentsQueryParams:()=>yIe,GetPaymentsResponse:()=>bIe,PermanentDeletePaymentHeader:()=>MIe,PermanentDeletePaymentParams:()=>AIe,RestorePaymentHeader:()=>wIe,RestorePaymentParams:()=>PIe,RestorePaymentResponse:()=>CIe,UpdatePaymentBody:()=>IIe,UpdatePaymentHeader:()=>RIe,UpdatePaymentParams:()=>fIe,UpdatePaymentResponse:()=>EIe,createPaymentBodyAdvanceInvoiceIdMax:()=>UQ,createPaymentBodyAmountExclusiveMin:()=>WQ,createPaymentBodyAppliedToIncomingPurchaseDocumentIdMax:()=>qQ,createPaymentBodyCreditNoteIdMax:()=>FQ,createPaymentBodyDocumentIdMax:()=>HQ,createPaymentBodyIncomingPurchaseDocumentIdMax:()=>jQ,createPaymentBodyInvoiceIdMax:()=>OQ,createPaymentBodyNoteMax:()=>LQ,createPaymentBodyReferenceMax:()=>VQ,createPaymentBodyTagMax:()=>GQ,deletePaymentPathIdRegExp:()=>jZ,getPaymentByIdPathIdRegExp:()=>SJ,getPaymentByIdResponseAdvanceInvoiceIdMax:()=>CJ,getPaymentByIdResponseAdvanceInvoiceIdMaxOne:()=>HJ,getPaymentByIdResponseAdvanceInvoiceNumberMax:()=>YJ,getPaymentByIdResponseAmountConvertedMax:()=>OJ,getPaymentByIdResponseAmountConvertedMin:()=>NJ,getPaymentByIdResponseAmountMax:()=>kJ,getPaymentByIdResponseAmountMin:()=>TJ,getPaymentByIdResponseAppliedToIncomingPurchaseDocumentDateRegExp:()=>tZ,getPaymentByIdResponseAppliedToIncomingPurchaseDocumentIdMax:()=>MJ,getPaymentByIdResponseAppliedToIncomingPurchaseDocumentIdMaxOne:()=>XJ,getPaymentByIdResponseAppliedToIncomingPurchaseDocumentSupplierDocumentNumberMax:()=>eZ,getPaymentByIdResponseAppliedToIncomingPurchaseDocumentTotalWithTaxMax:()=>nZ,getPaymentByIdResponseAppliedToIncomingPurchaseDocumentTotalWithTaxMin:()=>oZ,getPaymentByIdResponseCreditNoteIdMax:()=>wJ,getPaymentByIdResponseCreditNoteIdMaxOne:()=>VJ,getPaymentByIdResponseCreditNoteNumberMax:()=>LJ,getPaymentByIdResponseCurrencyCodeMax:()=>BJ,getPaymentByIdResponseEntityIdMax:()=>qJ,getPaymentByIdResponseIdMax:()=>DJ,getPaymentByIdResponseIncomingPurchaseDocumentDateRegExp:()=>QJ,getPaymentByIdResponseIncomingPurchaseDocumentIdMax:()=>AJ,getPaymentByIdResponseIncomingPurchaseDocumentIdMaxOne:()=>KJ,getPaymentByIdResponseIncomingPurchaseDocumentSupplierDocumentNumberMax:()=>$J,getPaymentByIdResponseIncomingPurchaseDocumentTotalWithTaxMax:()=>ZJ,getPaymentByIdResponseIncomingPurchaseDocumentTotalWithTaxMin:()=>JJ,getPaymentByIdResponseInvoiceIdMax:()=>PJ,getPaymentByIdResponseInvoiceIdMaxOne:()=>WJ,getPaymentByIdResponseInvoiceNumberMax:()=>GJ,getPaymentByIdResponseNoteMax:()=>jJ,getPaymentByIdResponseReferenceMax:()=>UJ,getPaymentByIdResponseTagMax:()=>FJ,getPaymentsQueryLimitDefault:()=>YQ,getPaymentsQueryLimitMax:()=>KQ,getPaymentsResponseDataItemAdvanceInvoiceIdMax:()=>ZQ,getPaymentsResponseDataItemAdvanceInvoiceIdMaxOne:()=>gJ,getPaymentsResponseDataItemAdvanceInvoiceNumberMax:()=>yJ,getPaymentsResponseDataItemAmountConvertedMax:()=>rJ,getPaymentsResponseDataItemAmountConvertedMin:()=>sJ,getPaymentsResponseDataItemAmountMax:()=>oJ,getPaymentsResponseDataItemAmountMin:()=>tJ,getPaymentsResponseDataItemAppliedToIncomingPurchaseDocumentDateRegExp:()=>RJ,getPaymentsResponseDataItemAppliedToIncomingPurchaseDocumentIdMax:()=>eJ,getPaymentsResponseDataItemAppliedToIncomingPurchaseDocumentIdMaxOne:()=>vJ,getPaymentsResponseDataItemAppliedToIncomingPurchaseDocumentSupplierDocumentNumberMax:()=>fJ,getPaymentsResponseDataItemAppliedToIncomingPurchaseDocumentTotalWithTaxMax:()=>EJ,getPaymentsResponseDataItemAppliedToIncomingPurchaseDocumentTotalWithTaxMin:()=>IJ,getPaymentsResponseDataItemCreditNoteIdMax:()=>JQ,getPaymentsResponseDataItemCreditNoteIdMaxOne:()=>pJ,getPaymentsResponseDataItemCreditNoteNumberMax:()=>mJ,getPaymentsResponseDataItemCurrencyCodeMax:()=>nJ,getPaymentsResponseDataItemEntityIdMax:()=>cJ,getPaymentsResponseDataItemIdMax:()=>$Q,getPaymentsResponseDataItemIncomingPurchaseDocumentDateRegExp:()=>xJ,getPaymentsResponseDataItemIncomingPurchaseDocumentIdMax:()=>XQ,getPaymentsResponseDataItemIncomingPurchaseDocumentIdMaxOne:()=>hJ,getPaymentsResponseDataItemIncomingPurchaseDocumentSupplierDocumentNumberMax:()=>bJ,getPaymentsResponseDataItemIncomingPurchaseDocumentTotalWithTaxMax:()=>_J,getPaymentsResponseDataItemIncomingPurchaseDocumentTotalWithTaxMin:()=>zJ,getPaymentsResponseDataItemInvoiceIdMax:()=>QQ,getPaymentsResponseDataItemInvoiceIdMaxOne:()=>lJ,getPaymentsResponseDataItemInvoiceNumberMax:()=>uJ,getPaymentsResponseDataItemNoteMax:()=>dJ,getPaymentsResponseDataItemReferenceMax:()=>aJ,getPaymentsResponseDataItemTagMax:()=>iJ,permanentDeletePaymentPathIdRegExp:()=>z9,restorePaymentPathIdRegExp:()=>qZ,restorePaymentResponseAdvanceInvoiceIdMax:()=>LZ,restorePaymentResponseAdvanceInvoiceIdMaxOne:()=>a9,restorePaymentResponseAdvanceInvoiceNumberMax:()=>d9,restorePaymentResponseAmountConvertedMax:()=>ZZ,restorePaymentResponseAmountConvertedMin:()=>JZ,restorePaymentResponseAmountMax:()=>$Z,restorePaymentResponseAmountMin:()=>KZ,restorePaymentResponseAppliedToIncomingPurchaseDocumentDateRegExp:()=>h9,restorePaymentResponseAppliedToIncomingPurchaseDocumentIdMax:()=>YZ,restorePaymentResponseAppliedToIncomingPurchaseDocumentIdMaxOne:()=>g9,restorePaymentResponseAppliedToIncomingPurchaseDocumentSupplierDocumentNumberMax:()=>y9,restorePaymentResponseAppliedToIncomingPurchaseDocumentTotalWithTaxMax:()=>x9,restorePaymentResponseAppliedToIncomingPurchaseDocumentTotalWithTaxMin:()=>b9,restorePaymentResponseCreditNoteIdMax:()=>VZ,restorePaymentResponseCreditNoteIdMaxOne:()=>r9,restorePaymentResponseCreditNoteNumberMax:()=>i9,restorePaymentResponseCurrencyCodeMax:()=>QZ,restorePaymentResponseEntityIdMax:()=>o9,restorePaymentResponseIdMax:()=>WZ,restorePaymentResponseIncomingPurchaseDocumentDateRegExp:()=>u9,restorePaymentResponseIncomingPurchaseDocumentIdMax:()=>HZ,restorePaymentResponseIncomingPurchaseDocumentIdMaxOne:()=>c9,restorePaymentResponseIncomingPurchaseDocumentSupplierDocumentNumberMax:()=>l9,restorePaymentResponseIncomingPurchaseDocumentTotalWithTaxMax:()=>m9,restorePaymentResponseIncomingPurchaseDocumentTotalWithTaxMin:()=>p9,restorePaymentResponseInvoiceIdMax:()=>GZ,restorePaymentResponseInvoiceIdMaxOne:()=>n9,restorePaymentResponseInvoiceNumberMax:()=>s9,restorePaymentResponseNoteMax:()=>t9,restorePaymentResponseReferenceMax:()=>e9,restorePaymentResponseTagMax:()=>XZ,updatePaymentBodyAmountExclusiveMin:()=>rZ,updatePaymentBodyNoteMax:()=>dZ,updatePaymentBodyReferenceMax:()=>aZ,updatePaymentBodyTagMax:()=>iZ,updatePaymentPathIdRegExp:()=>sZ,updatePaymentResponseAdvanceInvoiceIdMax:()=>pZ,updatePaymentResponseAdvanceInvoiceIdMaxOne:()=>PZ,updatePaymentResponseAdvanceInvoiceNumberMax:()=>wZ,updatePaymentResponseAmountConvertedMax:()=>zZ,updatePaymentResponseAmountConvertedMin:()=>xZ,updatePaymentResponseAmountMax:()=>hZ,updatePaymentResponseAmountMin:()=>yZ,updatePaymentResponseAppliedToIncomingPurchaseDocumentDateRegExp:()=>OZ,updatePaymentResponseAppliedToIncomingPurchaseDocumentIdMax:()=>gZ,updatePaymentResponseAppliedToIncomingPurchaseDocumentIdMaxOne:()=>BZ,updatePaymentResponseAppliedToIncomingPurchaseDocumentSupplierDocumentNumberMax:()=>NZ,updatePaymentResponseAppliedToIncomingPurchaseDocumentTotalWithTaxMax:()=>UZ,updatePaymentResponseAppliedToIncomingPurchaseDocumentTotalWithTaxMin:()=>FZ,updatePaymentResponseCreditNoteIdMax:()=>uZ,updatePaymentResponseCreditNoteIdMaxOne:()=>SZ,updatePaymentResponseCreditNoteNumberMax:()=>DZ,updatePaymentResponseCurrencyCodeMax:()=>bZ,updatePaymentResponseEntityIdMax:()=>RZ,updatePaymentResponseIdMax:()=>cZ,updatePaymentResponseIncomingPurchaseDocumentDateRegExp:()=>MZ,updatePaymentResponseIncomingPurchaseDocumentIdMax:()=>mZ,updatePaymentResponseIncomingPurchaseDocumentIdMaxOne:()=>CZ,updatePaymentResponseIncomingPurchaseDocumentSupplierDocumentNumberMax:()=>AZ,updatePaymentResponseIncomingPurchaseDocumentTotalWithTaxMax:()=>kZ,updatePaymentResponseIncomingPurchaseDocumentTotalWithTaxMin:()=>TZ,updatePaymentResponseInvoiceIdMax:()=>lZ,updatePaymentResponseInvoiceIdMaxOne:()=>IZ,updatePaymentResponseInvoiceNumberMax:()=>EZ,updatePaymentResponseNoteMax:()=>fZ,updatePaymentResponseReferenceMax:()=>vZ,updatePaymentResponseTagMax:()=>_Z});var mIe=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),OQ=36,FQ=36,UQ=36,jQ=36,qQ=36,WQ=0,GQ=100,VQ=100,LQ=500,HQ=36,gIe=e.object({invoice_id:e.string().max(OQ).nullish(),credit_note_id:e.string().max(FQ).nullish(),advance_invoice_id:e.string().max(UQ).nullish(),incoming_purchase_document_id:e.string().max(jQ).nullish(),applied_to_incoming_purchase_document_id:e.string().max(qQ).nullish(),amount:e.number().gt(WQ),type:e.enum(["cash","bank_transfer","card","check","paypal","coupon","other","credit_note","advance"]).describe("Payment type/method"),date:e.string().optional().describe("Payment date in YYYY-MM-DD format"),tag:e.string().max(GQ).nullish(),reference:e.string().max(VQ).nullish(),note:e.string().max(LQ).nullish(),metadata:e.record(e.string(),e.string()).nullish().describe("Custom key-value data for your own use. Store any JSON object up to 50 properties. Values must be strings up to 250 characters. Useful for storing external IDs, tags, or integration data."),document_id:e.string().max(HQ).nullish().describe("Generic outgoing document ID for direct payments. The API infers `invoice_id`, `credit_note_id`, or `advance_invoice_id` from the ID prefix. Prefer this over type-specific fields for new integrations.")}),YQ=10,KQ=100,yIe=e.object({limit:e.number().min(1).max(KQ).default(YQ).describe("Number of results per request."),next_cursor:e.string().optional().describe("Opaque cursor to fetch the next page of results. Reuse only with the same effective ordering. Use the value from pagination.next_cursor in the previous response."),prev_cursor:e.string().optional().describe("Opaque cursor to fetch the previous page of results. Reuse only with the same effective ordering. Use the value from pagination.prev_cursor in the previous response."),include_total_count:e.boolean().optional().describe("Whether to include the total count of items in `pagination.total`.\nDefault is `true`.\nWhen `false`, `pagination.total` returns -1 for better performance."),order_by:e.union([e.enum(["id","amount","type","date","created_at","updated_at","-id","-amount","-type","-date","-created_at","-updated_at"]),e.array(e.enum(["id","amount","type","date","created_at","updated_at","-id","-amount","-type","-date","-created_at","-updated_at"]))]).optional().describe("Sort by one field or provide a repeated array for multi-column ordering. Prefix a field with `-` for descending order. When paginating, reuse cursors only with the same effective ordering."),query:e.string().optional().describe('JSON query object for filtering results. Supports MongoDB-style operators.\n\n**Supported operators:**\n- `equals` or direct value - Exact match (default)\n- `gte` - Greater than or equal\n- `lte` - Less than or equal\n- `gt` - Greater than\n- `lt` - Less than\n- `in` - Value in array\n- `notIn` - Value not in array\n- `contains` - String contains (case-insensitive)\n- `startsWith` - String starts with\n- `endsWith` - String ends with\n- `between` - Value between two numbers/dates [min, max]\n\n**Allowed fields:** id, invoice_id, credit_note_id, advance_invoice_id, incoming_purchase_document_id, applied_to_incoming_purchase_document_id, amount, type, date, reference, note, metadata, created_at, updated_at\n\n**Examples:**\n- `{"total": {"gte": 1000}}` - Invoices over 1000\n- `{"customer.name": {"contains": "Acme"}}` - Customer name contains "Acme"\n- `{"date": {"between": ["2025-01-01", "2025-12-31"]}}` - Date range'),search:e.string().optional().describe(`Full-text search query to filter results across multiple fields.
|
|
224
|
+
Searches are case-insensitive and match partial strings.
|
|
225
|
+
Searches across all text fields including names, descriptions, addresses, and metadata values.`),include:e.string().optional().describe("Comma-separated list of relations to include in the response.\n\n**Available relations:**\n- `Invoice` - The invoice this payment is linked to\n- `CreditNote` - The credit note this payment is linked to\n- `AdvanceInvoice` - The advance invoice this payment is linked to\n- `IncomingPurchaseDocument` - The incoming purchase document this payment is linked to\n- `AppliedToIncomingPurchaseDocument` - The incoming purchase invoice this credit note settlement is applied to\n\n**Usage:**\n`?include=Invoice`\n`?include=Invoice,CreditNote,AdvanceInvoice,IncomingPurchaseDocument,AppliedToIncomingPurchaseDocument`"),deleted:e.boolean().optional().describe("When true, returns only soft-deleted (trashed) items. Default false excludes deleted items.")}),hIe=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),$Q=36,QQ=36,JQ=36,ZQ=36,XQ=36,eJ=36,tJ=-140737488355328,oJ=0x7fffffffffff,nJ=3,sJ=-140737488355328,rJ=0x7fffffffffff,iJ=100,aJ=100,dJ=500,cJ=36,lJ=36,uJ=100,pJ=36,mJ=100,gJ=36,yJ=100,hJ=36,bJ=255,xJ=/^\d{4}-\d{2}-\d{2}$/,zJ=-140737488355328,_J=0x7fffffffffff,vJ=36,fJ=255,RJ=/^\d{4}-\d{2}-\d{2}$/,IJ=-140737488355328,EJ=0x7fffffffffff,bIe=e.object({data:e.array(e.object({id:e.string().max($Q),invoice_id:e.string().max(QQ).nullish(),credit_note_id:e.string().max(JQ).nullish(),advance_invoice_id:e.string().max(ZQ).nullish(),incoming_purchase_document_id:e.string().max(XQ).nullish(),applied_to_incoming_purchase_document_id:e.string().max(eJ).nullish(),amount:e.number().min(tJ).max(oJ),currency_code:e.string().max(nJ),amount_converted:e.number().min(sJ).max(rJ),type:e.enum(["cash","bank_transfer","card","check","paypal","coupon","other","credit_note","advance"]).describe("Payment type/method"),date:e.iso.datetime({}).describe("Date the payment was received (ISO 8601 datetime at midnight UTC)"),tag:e.string().max(iJ).nullish(),reference:e.string().max(aJ).nullish(),note:e.string().max(dJ).nullish(),entity_id:e.string().max(cJ),metadata:e.record(e.string(),e.string()).nullish().describe("Custom key-value data for your own use. Store any JSON object up to 50 properties. Values must be strings up to 250 characters. Useful for storing external IDs, tags, or integration data."),deleted_at:e.iso.datetime({}).nullish(),created_at:e.iso.datetime({}),updated_at:e.iso.datetime({}),Invoice:e.object({id:e.string().max(lJ),number:e.string().max(uJ)}).nullish().describe("Related invoice"),CreditNote:e.object({id:e.string().max(pJ),number:e.string().max(mJ)}).nullish().describe("Related credit note"),AdvanceInvoice:e.object({id:e.string().max(gJ),number:e.string().max(yJ)}).nullish().describe("Related advance invoice"),IncomingPurchaseDocument:e.object({id:e.string().max(hJ),type:e.enum(["invoice","credit_note","advance_invoice"]),supplier_document_number:e.string().max(bJ).nullish(),date:e.string().regex(xJ).nullish(),total_with_tax:e.number().min(zJ).max(_J).nullish()}).nullish().describe("Related incoming purchase document"),AppliedToIncomingPurchaseDocument:e.object({id:e.string().max(vJ),type:e.enum(["invoice","credit_note","advance_invoice"]),supplier_document_number:e.string().max(fJ).nullish(),date:e.string().regex(RJ).nullish(),total_with_tax:e.number().min(IJ).max(EJ).nullish()}).nullish().describe("Related incoming purchase document")}).describe("Payment record for an invoice, credit note, or advance invoice")),pagination:e.object({total:e.number().describe("Total number of items available in the collection"),next_cursor:e.string().nullable().describe("Opaque cursor for fetching the next page. It encodes the resolved sort tuple for the current result set, so reuse it only with the same effective ordering. Null if no more results are available."),prev_cursor:e.string().nullable().describe("Opaque cursor for fetching the previous page. It encodes the resolved sort tuple for the current result set, so reuse it only with the same effective ordering. Null if at the first page."),has_more:e.boolean().describe("Indicates whether more results are available after the current page")}).describe("Pagination metadata including cursors and result counts")}),SJ=/^[a-z]{3,4}_[0-9a-f]{24}$/,xIe=e.object({id:e.stringFormat("resource-id",SJ).describe("Unique resource identifier")}),zIe=e.object({include:e.string().optional().describe("Comma-separated list of relations to include in the response.\n\n**Available relations:**\n- `Invoice` - The invoice this payment is linked to\n- `CreditNote` - The credit note this payment is linked to\n- `AdvanceInvoice` - The advance invoice this payment is linked to\n- `IncomingPurchaseDocument` - The incoming purchase document this payment is linked to\n- `AppliedToIncomingPurchaseDocument` - The incoming purchase invoice this credit note settlement is applied to\n\n**Usage:**\n`?include=Invoice`\n`?include=Invoice,CreditNote,AdvanceInvoice,IncomingPurchaseDocument,AppliedToIncomingPurchaseDocument`")}),_Ie=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),DJ=36,PJ=36,wJ=36,CJ=36,AJ=36,MJ=36,TJ=-140737488355328,kJ=0x7fffffffffff,BJ=3,NJ=-140737488355328,OJ=0x7fffffffffff,FJ=100,UJ=100,jJ=500,qJ=36,WJ=36,GJ=100,VJ=36,LJ=100,HJ=36,YJ=100,KJ=36,$J=255,QJ=/^\d{4}-\d{2}-\d{2}$/,JJ=-140737488355328,ZJ=0x7fffffffffff,XJ=36,eZ=255,tZ=/^\d{4}-\d{2}-\d{2}$/,oZ=-140737488355328,nZ=0x7fffffffffff,vIe=e.object({id:e.string().max(DJ),invoice_id:e.string().max(PJ).nullish(),credit_note_id:e.string().max(wJ).nullish(),advance_invoice_id:e.string().max(CJ).nullish(),incoming_purchase_document_id:e.string().max(AJ).nullish(),applied_to_incoming_purchase_document_id:e.string().max(MJ).nullish(),amount:e.number().min(TJ).max(kJ),currency_code:e.string().max(BJ),amount_converted:e.number().min(NJ).max(OJ),type:e.enum(["cash","bank_transfer","card","check","paypal","coupon","other","credit_note","advance"]).describe("Payment type/method"),date:e.iso.datetime({}).describe("Date the payment was received (ISO 8601 datetime at midnight UTC)"),tag:e.string().max(FJ).nullish(),reference:e.string().max(UJ).nullish(),note:e.string().max(jJ).nullish(),entity_id:e.string().max(qJ),metadata:e.record(e.string(),e.string()).nullish().describe("Custom key-value data for your own use. Store any JSON object up to 50 properties. Values must be strings up to 250 characters. Useful for storing external IDs, tags, or integration data."),deleted_at:e.iso.datetime({}).nullish(),created_at:e.iso.datetime({}),updated_at:e.iso.datetime({}),Invoice:e.object({id:e.string().max(WJ),number:e.string().max(GJ)}).nullish().describe("Related invoice"),CreditNote:e.object({id:e.string().max(VJ),number:e.string().max(LJ)}).nullish().describe("Related credit note"),AdvanceInvoice:e.object({id:e.string().max(HJ),number:e.string().max(YJ)}).nullish().describe("Related advance invoice"),IncomingPurchaseDocument:e.object({id:e.string().max(KJ),type:e.enum(["invoice","credit_note","advance_invoice"]),supplier_document_number:e.string().max($J).nullish(),date:e.string().regex(QJ).nullish(),total_with_tax:e.number().min(JJ).max(ZJ).nullish()}).nullish().describe("Related incoming purchase document"),AppliedToIncomingPurchaseDocument:e.object({id:e.string().max(XJ),type:e.enum(["invoice","credit_note","advance_invoice"]),supplier_document_number:e.string().max(eZ).nullish(),date:e.string().regex(tZ).nullish(),total_with_tax:e.number().min(oZ).max(nZ).nullish()}).nullish().describe("Related incoming purchase document")}).describe("Payment record for an invoice, credit note, or advance invoice"),sZ=/^[a-z]{3,4}_[0-9a-f]{24}$/,fIe=e.object({id:e.stringFormat("resource-id",sZ).describe("Unique resource identifier")}),RIe=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),rZ=0,iZ=100,aZ=100,dZ=500,IIe=e.object({amount:e.number().gt(rZ).optional(),type:e.enum(["cash","bank_transfer","card","check","paypal","coupon","other","credit_note","advance"]).optional().describe("Payment type/method"),date:e.string().optional().describe("Payment date in YYYY-MM-DD format"),tag:e.string().max(iZ).nullish(),reference:e.string().max(aZ).nullish(),note:e.string().max(dZ).nullish(),metadata:e.record(e.string(),e.string()).nullish().describe("Custom key-value data for your own use. Store any JSON object up to 50 properties. Values must be strings up to 250 characters. Useful for storing external IDs, tags, or integration data.")}),cZ=36,lZ=36,uZ=36,pZ=36,mZ=36,gZ=36,yZ=-140737488355328,hZ=0x7fffffffffff,bZ=3,xZ=-140737488355328,zZ=0x7fffffffffff,_Z=100,vZ=100,fZ=500,RZ=36,IZ=36,EZ=100,SZ=36,DZ=100,PZ=36,wZ=100,CZ=36,AZ=255,MZ=/^\d{4}-\d{2}-\d{2}$/,TZ=-140737488355328,kZ=0x7fffffffffff,BZ=36,NZ=255,OZ=/^\d{4}-\d{2}-\d{2}$/,FZ=-140737488355328,UZ=0x7fffffffffff,EIe=e.object({id:e.string().max(cZ),invoice_id:e.string().max(lZ).nullish(),credit_note_id:e.string().max(uZ).nullish(),advance_invoice_id:e.string().max(pZ).nullish(),incoming_purchase_document_id:e.string().max(mZ).nullish(),applied_to_incoming_purchase_document_id:e.string().max(gZ).nullish(),amount:e.number().min(yZ).max(hZ),currency_code:e.string().max(bZ),amount_converted:e.number().min(xZ).max(zZ),type:e.enum(["cash","bank_transfer","card","check","paypal","coupon","other","credit_note","advance"]).describe("Payment type/method"),date:e.iso.datetime({}).describe("Date the payment was received (ISO 8601 datetime at midnight UTC)"),tag:e.string().max(_Z).nullish(),reference:e.string().max(vZ).nullish(),note:e.string().max(fZ).nullish(),entity_id:e.string().max(RZ),metadata:e.record(e.string(),e.string()).nullish().describe("Custom key-value data for your own use. Store any JSON object up to 50 properties. Values must be strings up to 250 characters. Useful for storing external IDs, tags, or integration data."),deleted_at:e.iso.datetime({}).nullish(),created_at:e.iso.datetime({}),updated_at:e.iso.datetime({}),Invoice:e.object({id:e.string().max(IZ),number:e.string().max(EZ)}).nullish().describe("Related invoice"),CreditNote:e.object({id:e.string().max(SZ),number:e.string().max(DZ)}).nullish().describe("Related credit note"),AdvanceInvoice:e.object({id:e.string().max(PZ),number:e.string().max(wZ)}).nullish().describe("Related advance invoice"),IncomingPurchaseDocument:e.object({id:e.string().max(CZ),type:e.enum(["invoice","credit_note","advance_invoice"]),supplier_document_number:e.string().max(AZ).nullish(),date:e.string().regex(MZ).nullish(),total_with_tax:e.number().min(TZ).max(kZ).nullish()}).nullish().describe("Related incoming purchase document"),AppliedToIncomingPurchaseDocument:e.object({id:e.string().max(BZ),type:e.enum(["invoice","credit_note","advance_invoice"]),supplier_document_number:e.string().max(NZ).nullish(),date:e.string().regex(OZ).nullish(),total_with_tax:e.number().min(FZ).max(UZ).nullish()}).nullish().describe("Related incoming purchase document")}).describe("Payment record for an invoice, credit note, or advance invoice"),jZ=/^[a-z]{3,4}_[0-9a-f]{24}$/,SIe=e.object({id:e.stringFormat("resource-id",jZ).describe("Unique resource identifier")}),DIe=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),qZ=/^[a-z]{3,4}_[0-9a-f]{24}$/,PIe=e.object({id:e.stringFormat("resource-id",qZ).describe("Unique resource identifier")}),wIe=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),WZ=36,GZ=36,VZ=36,LZ=36,HZ=36,YZ=36,KZ=-140737488355328,$Z=0x7fffffffffff,QZ=3,JZ=-140737488355328,ZZ=0x7fffffffffff,XZ=100,e9=100,t9=500,o9=36,n9=36,s9=100,r9=36,i9=100,a9=36,d9=100,c9=36,l9=255,u9=/^\d{4}-\d{2}-\d{2}$/,p9=-140737488355328,m9=0x7fffffffffff,g9=36,y9=255,h9=/^\d{4}-\d{2}-\d{2}$/,b9=-140737488355328,x9=0x7fffffffffff,CIe=e.object({id:e.string().max(WZ),invoice_id:e.string().max(GZ).nullish(),credit_note_id:e.string().max(VZ).nullish(),advance_invoice_id:e.string().max(LZ).nullish(),incoming_purchase_document_id:e.string().max(HZ).nullish(),applied_to_incoming_purchase_document_id:e.string().max(YZ).nullish(),amount:e.number().min(KZ).max($Z),currency_code:e.string().max(QZ),amount_converted:e.number().min(JZ).max(ZZ),type:e.enum(["cash","bank_transfer","card","check","paypal","coupon","other","credit_note","advance"]).describe("Payment type/method"),date:e.iso.datetime({}).describe("Date the payment was received (ISO 8601 datetime at midnight UTC)"),tag:e.string().max(XZ).nullish(),reference:e.string().max(e9).nullish(),note:e.string().max(t9).nullish(),entity_id:e.string().max(o9),metadata:e.record(e.string(),e.string()).nullish().describe("Custom key-value data for your own use. Store any JSON object up to 50 properties. Values must be strings up to 250 characters. Useful for storing external IDs, tags, or integration data."),deleted_at:e.iso.datetime({}).nullish(),created_at:e.iso.datetime({}),updated_at:e.iso.datetime({}),Invoice:e.object({id:e.string().max(n9),number:e.string().max(s9)}).nullish().describe("Related invoice"),CreditNote:e.object({id:e.string().max(r9),number:e.string().max(i9)}).nullish().describe("Related credit note"),AdvanceInvoice:e.object({id:e.string().max(a9),number:e.string().max(d9)}).nullish().describe("Related advance invoice"),IncomingPurchaseDocument:e.object({id:e.string().max(c9),type:e.enum(["invoice","credit_note","advance_invoice"]),supplier_document_number:e.string().max(l9).nullish(),date:e.string().regex(u9).nullish(),total_with_tax:e.number().min(p9).max(m9).nullish()}).nullish().describe("Related incoming purchase document"),AppliedToIncomingPurchaseDocument:e.object({id:e.string().max(g9),type:e.enum(["invoice","credit_note","advance_invoice"]),supplier_document_number:e.string().max(y9).nullish(),date:e.string().regex(h9).nullish(),total_with_tax:e.number().min(b9).max(x9).nullish()}).nullish().describe("Related incoming purchase document")}).describe("Payment record for an invoice, credit note, or advance invoice"),z9=/^[a-z]{3,4}_[0-9a-f]{24}$/,AIe=e.object({id:e.stringFormat("resource-id",z9).describe("Unique resource identifier")}),MIe=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")});var Ye={};j(Ye,{CreatePtAtcudSeriesBody:()=>kIe,CreatePtAtcudSeriesHeader:()=>TIe,GetActivePtAtcudSeriesHeader:()=>WIe,GetActivePtAtcudSeriesQueryParams:()=>qIe,GetActivePtAtcudSeriesResponse:()=>GIe,GetActivePtAtcudSeriesResponseItem:()=>j9,GetPtAtcudSeriesHeader:()=>UIe,GetPtAtcudSeriesParams:()=>FIe,GetPtAtcudSeriesResponse:()=>jIe,ListPtAtcudSeriesHeader:()=>NIe,ListPtAtcudSeriesQueryParams:()=>BIe,ListPtAtcudSeriesResponse:()=>OIe,ListPtAtcudSeriesResponseItem:()=>P9,createPtAtcudSeriesBodyFirstNumberMax:()=>f9,createPtAtcudSeriesBodySeriesCodeMax:()=>_9,createPtAtcudSeriesBodyValidationCodeMax:()=>v9,getActivePtAtcudSeriesResponseEntityIdMax:()=>N9,getActivePtAtcudSeriesResponseFirstNumberMax:()=>U9,getActivePtAtcudSeriesResponseIdMax:()=>B9,getActivePtAtcudSeriesResponseSeriesCodeMax:()=>O9,getActivePtAtcudSeriesResponseValidationCodeMax:()=>F9,getPtAtcudSeriesPathIdRegExp:()=>w9,getPtAtcudSeriesResponseEntityIdMax:()=>A9,getPtAtcudSeriesResponseFirstNumberMax:()=>k9,getPtAtcudSeriesResponseIdMax:()=>C9,getPtAtcudSeriesResponseSeriesCodeMax:()=>M9,getPtAtcudSeriesResponseValidationCodeMax:()=>T9,listPtAtcudSeriesResponseEntityIdMax:()=>I9,listPtAtcudSeriesResponseFirstNumberMax:()=>D9,listPtAtcudSeriesResponseIdMax:()=>R9,listPtAtcudSeriesResponseSeriesCodeMax:()=>E9,listPtAtcudSeriesResponseValidationCodeMax:()=>S9});var TIe=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),_9=35,v9=32,f9=100,kIe=e.object({document_type:e.enum(["invoice","advance_invoice","credit_note","estimate"]).describe("Portugal fiscal document type tracked for ATCUD series numbering."),series_code:e.string().min(1).max(_9).describe("AT-communicated series code used in the PT document number."),validation_code:e.string().min(1).max(v9).describe("Validation code assigned by AT for the communicated series."),first_number:e.string().min(1).max(f9).optional().describe("Legacy/legal first document number registered for this ATCUD series."),start_date:e.iso.date().describe("First date for which the communicated series is valid."),is_manual:e.boolean().optional().describe("Whether this series is reserved for manually issued PT documents."),initial_sequence:e.number().min(1).optional().describe("Initial PT legal sequence number for this series.")}),BIe=e.object({document_type:e.enum(["invoice","advance_invoice","credit_note","estimate"]).optional(),is_manual:e.boolean().nullish()}),NIe=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),R9=36,I9=36,E9=35,S9=32,D9=100,P9=e.object({id:e.string().max(R9),entity_id:e.string().max(I9),document_type:e.enum(["invoice","advance_invoice","credit_note","estimate"]).describe("Portugal fiscal document type tracked for ATCUD series numbering."),series_code:e.string().min(1).max(E9).describe("AT-communicated series code used in the PT document number."),validation_code:e.string().min(1).max(S9).describe("Validation code assigned by AT for the communicated series."),first_number:e.string().min(1).max(D9).describe("Legacy/legal first document number registered for this ATCUD series."),start_date:e.iso.date().describe("First date for which the communicated series is valid."),is_manual:e.boolean().describe("Whether this series is reserved for manually issued PT documents."),initial_sequence:e.number().min(1).describe("Initial PT legal sequence number for this series.")}).describe("Portugal ATCUD series registration metadata."),OIe=e.array(P9),w9=/^(?:[a-z]{3,4}_){0,2}[0-9a-f]{24}$/,FIe=e.object({id:e.stringFormat("resource-id",w9).describe("Space Invoices resource identifier (format: {prefix}_{hex24})")}),UIe=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),C9=36,A9=36,M9=35,T9=32,k9=100,jIe=e.object({id:e.string().max(C9),entity_id:e.string().max(A9),document_type:e.enum(["invoice","advance_invoice","credit_note","estimate"]).describe("Portugal fiscal document type tracked for ATCUD series numbering."),series_code:e.string().min(1).max(M9).describe("AT-communicated series code used in the PT document number."),validation_code:e.string().min(1).max(T9).describe("Validation code assigned by AT for the communicated series."),first_number:e.string().min(1).max(k9).describe("Legacy/legal first document number registered for this ATCUD series."),start_date:e.iso.date().describe("First date for which the communicated series is valid."),is_manual:e.boolean().describe("Whether this series is reserved for manually issued PT documents."),initial_sequence:e.number().min(1).describe("Initial PT legal sequence number for this series.")}).describe("Portugal ATCUD series registration metadata."),qIe=e.object({document_type:e.enum(["invoice","advance_invoice","credit_note","estimate"]).optional()}),WIe=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),B9=36,N9=36,O9=35,F9=32,U9=100,j9=e.object({id:e.string().max(B9),entity_id:e.string().max(N9),document_type:e.enum(["invoice","advance_invoice","credit_note","estimate"]).describe("Portugal fiscal document type tracked for ATCUD series numbering."),series_code:e.string().min(1).max(O9).describe("AT-communicated series code used in the PT document number."),validation_code:e.string().min(1).max(F9).describe("Validation code assigned by AT for the communicated series."),first_number:e.string().min(1).max(U9).describe("Legacy/legal first document number registered for this ATCUD series."),start_date:e.iso.date().describe("First date for which the communicated series is valid."),is_manual:e.boolean().describe("Whether this series is reserved for manually issued PT documents."),initial_sequence:e.number().min(1).describe("Initial PT legal sequence number for this series.")}).describe("Portugal ATCUD series registration metadata."),GIe=e.array(j9);var Ke={};j(Ke,{GeneratePtSaftReportHeader:()=>LIe,GeneratePtSaftReportQueryParams:()=>VIe});var VIe=e.object({from:e.iso.date().optional().describe("Report start date (inclusive) in YYYY-MM-DD format."),to:e.iso.date().optional().describe("Report end date (inclusive) in YYYY-MM-DD format.")}),LIe=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")});var $e={};j($e,{CreateRecurringInvoiceBody:()=>YIe,CreateRecurringInvoiceHeader:()=>HIe,DeleteRecurringInvoiceHeader:()=>r0e,DeleteRecurringInvoiceParams:()=>s0e,GetRecurringInvoiceByIdHeader:()=>ZIe,GetRecurringInvoiceByIdParams:()=>JIe,GetRecurringInvoiceByIdResponse:()=>XIe,GetRecurringInvoicesHeader:()=>$Ie,GetRecurringInvoicesQueryParams:()=>KIe,GetRecurringInvoicesResponse:()=>QIe,PauseRecurringInvoiceHeader:()=>p0e,PauseRecurringInvoiceParams:()=>u0e,PauseRecurringInvoiceResponse:()=>m0e,PermanentDeleteRecurringInvoiceHeader:()=>l0e,PermanentDeleteRecurringInvoiceParams:()=>c0e,RestoreRecurringInvoiceHeader:()=>a0e,RestoreRecurringInvoiceParams:()=>i0e,RestoreRecurringInvoiceResponse:()=>d0e,ResumeRecurringInvoiceHeader:()=>y0e,ResumeRecurringInvoiceParams:()=>g0e,ResumeRecurringInvoiceResponse:()=>h0e,TriggerRecurringInvoiceHeader:()=>x0e,TriggerRecurringInvoiceParams:()=>b0e,TriggerRecurringInvoiceResponse:()=>z0e,UpdateRecurringInvoiceBody:()=>o0e,UpdateRecurringInvoiceHeader:()=>t0e,UpdateRecurringInvoiceParams:()=>e0e,UpdateRecurringInvoiceResponse:()=>n0e,createRecurringInvoiceBodyDayOfMonthMax:()=>Y9,createRecurringInvoiceBodyDayOfMonthMin:()=>H9,createRecurringInvoiceBodyDayOfWeekMax:()=>L9,createRecurringInvoiceBodyDayOfWeekMin:()=>V9,createRecurringInvoiceBodyDocumentIdMax:()=>q9,createRecurringInvoiceBodyEndDateRegExp:()=>J9,createRecurringInvoiceBodyIntervalMax:()=>G9,createRecurringInvoiceBodyIntervalMin:()=>W9,createRecurringInvoiceBodyMonthOfYearMax:()=>$9,createRecurringInvoiceBodyMonthOfYearMin:()=>K9,createRecurringInvoiceBodyPaymentTermsDaysMax:()=>eX,createRecurringInvoiceBodyPaymentTermsDaysMin:()=>X9,createRecurringInvoiceBodySendToMax:()=>Z9,createRecurringInvoiceBodyStartDateRegExp:()=>Q9,deleteRecurringInvoicePathIdRegExp:()=>kee,getRecurringInvoiceByIdPathIdRegExp:()=>SX,getRecurringInvoiceByIdResponseOneDayOfMonthMax:()=>NX,getRecurringInvoiceByIdResponseOneDayOfMonthMin:()=>BX,getRecurringInvoiceByIdResponseOneDayOfWeekMax:()=>kX,getRecurringInvoiceByIdResponseOneDayOfWeekMin:()=>TX,getRecurringInvoiceByIdResponseOneDocumentIdMax:()=>wX,getRecurringInvoiceByIdResponseOneEndDateMax:()=>jX,getRecurringInvoiceByIdResponseOneEntityIdMax:()=>PX,getRecurringInvoiceByIdResponseOneIdMax:()=>DX,getRecurringInvoiceByIdResponseOneIntervalMax:()=>MX,getRecurringInvoiceByIdResponseOneIntervalMin:()=>AX,getRecurringInvoiceByIdResponseOneInvoicesGeneratedMax:()=>YX,getRecurringInvoiceByIdResponseOneInvoicesGeneratedMin:()=>HX,getRecurringInvoiceByIdResponseOneLastErrorMax:()=>$X,getRecurringInvoiceByIdResponseOneLastGeneratedInvoiceIdMax:()=>KX,getRecurringInvoiceByIdResponseOneLastRunDateMax:()=>WX,getRecurringInvoiceByIdResponseOneMonthOfYearMax:()=>FX,getRecurringInvoiceByIdResponseOneMonthOfYearMin:()=>OX,getRecurringInvoiceByIdResponseOneNameMax:()=>CX,getRecurringInvoiceByIdResponseOneNextRunDateMax:()=>qX,getRecurringInvoiceByIdResponseOnePaymentTermsDaysMax:()=>LX,getRecurringInvoiceByIdResponseOnePaymentTermsDaysMin:()=>VX,getRecurringInvoiceByIdResponseOneSendToMax:()=>GX,getRecurringInvoiceByIdResponseOneStartDateMax:()=>UX,getRecurringInvoicesQueryLimitDefault:()=>tX,getRecurringInvoicesQueryLimitMax:()=>oX,getRecurringInvoicesResponseDataItemOneDayOfMonthMax:()=>pX,getRecurringInvoicesResponseDataItemOneDayOfMonthMin:()=>uX,getRecurringInvoicesResponseDataItemOneDayOfWeekMax:()=>lX,getRecurringInvoicesResponseDataItemOneDayOfWeekMin:()=>cX,getRecurringInvoicesResponseDataItemOneDocumentIdMax:()=>rX,getRecurringInvoicesResponseDataItemOneEndDateMax:()=>hX,getRecurringInvoicesResponseDataItemOneEntityIdMax:()=>sX,getRecurringInvoicesResponseDataItemOneIdMax:()=>nX,getRecurringInvoicesResponseDataItemOneIntervalMax:()=>dX,getRecurringInvoicesResponseDataItemOneIntervalMin:()=>aX,getRecurringInvoicesResponseDataItemOneInvoicesGeneratedMax:()=>RX,getRecurringInvoicesResponseDataItemOneInvoicesGeneratedMin:()=>fX,getRecurringInvoicesResponseDataItemOneLastErrorMax:()=>EX,getRecurringInvoicesResponseDataItemOneLastGeneratedInvoiceIdMax:()=>IX,getRecurringInvoicesResponseDataItemOneLastRunDateMax:()=>xX,getRecurringInvoicesResponseDataItemOneMonthOfYearMax:()=>gX,getRecurringInvoicesResponseDataItemOneMonthOfYearMin:()=>mX,getRecurringInvoicesResponseDataItemOneNameMax:()=>iX,getRecurringInvoicesResponseDataItemOneNextRunDateMax:()=>bX,getRecurringInvoicesResponseDataItemOnePaymentTermsDaysMax:()=>vX,getRecurringInvoicesResponseDataItemOnePaymentTermsDaysMin:()=>_X,getRecurringInvoicesResponseDataItemOneSendToMax:()=>zX,getRecurringInvoicesResponseDataItemOneStartDateMax:()=>yX,pauseRecurringInvoicePathIdRegExp:()=>ite,pauseRecurringInvoiceResponseOneDayOfMonthMax:()=>hte,pauseRecurringInvoiceResponseOneDayOfMonthMin:()=>yte,pauseRecurringInvoiceResponseOneDayOfWeekMax:()=>gte,pauseRecurringInvoiceResponseOneDayOfWeekMin:()=>mte,pauseRecurringInvoiceResponseOneDocumentIdMax:()=>cte,pauseRecurringInvoiceResponseOneEndDateMax:()=>_te,pauseRecurringInvoiceResponseOneEntityIdMax:()=>dte,pauseRecurringInvoiceResponseOneIdMax:()=>ate,pauseRecurringInvoiceResponseOneIntervalMax:()=>pte,pauseRecurringInvoiceResponseOneIntervalMin:()=>ute,pauseRecurringInvoiceResponseOneInvoicesGeneratedMax:()=>Dte,pauseRecurringInvoiceResponseOneInvoicesGeneratedMin:()=>Ste,pauseRecurringInvoiceResponseOneLastErrorMax:()=>wte,pauseRecurringInvoiceResponseOneLastGeneratedInvoiceIdMax:()=>Pte,pauseRecurringInvoiceResponseOneLastRunDateMax:()=>fte,pauseRecurringInvoiceResponseOneMonthOfYearMax:()=>xte,pauseRecurringInvoiceResponseOneMonthOfYearMin:()=>bte,pauseRecurringInvoiceResponseOneNameMax:()=>lte,pauseRecurringInvoiceResponseOneNextRunDateMax:()=>vte,pauseRecurringInvoiceResponseOnePaymentTermsDaysMax:()=>Ete,pauseRecurringInvoiceResponseOnePaymentTermsDaysMin:()=>Ite,pauseRecurringInvoiceResponseOneSendToMax:()=>Rte,pauseRecurringInvoiceResponseOneStartDateMax:()=>zte,permanentDeleteRecurringInvoicePathIdRegExp:()=>rte,restoreRecurringInvoicePathIdRegExp:()=>Bee,restoreRecurringInvoiceResponseOneDayOfMonthMax:()=>Lee,restoreRecurringInvoiceResponseOneDayOfMonthMin:()=>Vee,restoreRecurringInvoiceResponseOneDayOfWeekMax:()=>Gee,restoreRecurringInvoiceResponseOneDayOfWeekMin:()=>Wee,restoreRecurringInvoiceResponseOneDocumentIdMax:()=>Fee,restoreRecurringInvoiceResponseOneEndDateMax:()=>$ee,restoreRecurringInvoiceResponseOneEntityIdMax:()=>Oee,restoreRecurringInvoiceResponseOneIdMax:()=>Nee,restoreRecurringInvoiceResponseOneIntervalMax:()=>qee,restoreRecurringInvoiceResponseOneIntervalMin:()=>jee,restoreRecurringInvoiceResponseOneInvoicesGeneratedMax:()=>ote,restoreRecurringInvoiceResponseOneInvoicesGeneratedMin:()=>tte,restoreRecurringInvoiceResponseOneLastErrorMax:()=>ste,restoreRecurringInvoiceResponseOneLastGeneratedInvoiceIdMax:()=>nte,restoreRecurringInvoiceResponseOneLastRunDateMax:()=>Jee,restoreRecurringInvoiceResponseOneMonthOfYearMax:()=>Yee,restoreRecurringInvoiceResponseOneMonthOfYearMin:()=>Hee,restoreRecurringInvoiceResponseOneNameMax:()=>Uee,restoreRecurringInvoiceResponseOneNextRunDateMax:()=>Qee,restoreRecurringInvoiceResponseOnePaymentTermsDaysMax:()=>ete,restoreRecurringInvoiceResponseOnePaymentTermsDaysMin:()=>Xee,restoreRecurringInvoiceResponseOneSendToMax:()=>Zee,restoreRecurringInvoiceResponseOneStartDateMax:()=>Kee,resumeRecurringInvoicePathIdRegExp:()=>Cte,resumeRecurringInvoiceResponseOneDayOfMonthMax:()=>jte,resumeRecurringInvoiceResponseOneDayOfMonthMin:()=>Ute,resumeRecurringInvoiceResponseOneDayOfWeekMax:()=>Fte,resumeRecurringInvoiceResponseOneDayOfWeekMin:()=>Ote,resumeRecurringInvoiceResponseOneDocumentIdMax:()=>Tte,resumeRecurringInvoiceResponseOneEndDateMax:()=>Vte,resumeRecurringInvoiceResponseOneEntityIdMax:()=>Mte,resumeRecurringInvoiceResponseOneIdMax:()=>Ate,resumeRecurringInvoiceResponseOneIntervalMax:()=>Nte,resumeRecurringInvoiceResponseOneIntervalMin:()=>Bte,resumeRecurringInvoiceResponseOneInvoicesGeneratedMax:()=>Jte,resumeRecurringInvoiceResponseOneInvoicesGeneratedMin:()=>Qte,resumeRecurringInvoiceResponseOneLastErrorMax:()=>Xte,resumeRecurringInvoiceResponseOneLastGeneratedInvoiceIdMax:()=>Zte,resumeRecurringInvoiceResponseOneLastRunDateMax:()=>Hte,resumeRecurringInvoiceResponseOneMonthOfYearMax:()=>Wte,resumeRecurringInvoiceResponseOneMonthOfYearMin:()=>qte,resumeRecurringInvoiceResponseOneNameMax:()=>kte,resumeRecurringInvoiceResponseOneNextRunDateMax:()=>Lte,resumeRecurringInvoiceResponseOnePaymentTermsDaysMax:()=>$te,resumeRecurringInvoiceResponseOnePaymentTermsDaysMin:()=>Kte,resumeRecurringInvoiceResponseOneSendToMax:()=>Yte,resumeRecurringInvoiceResponseOneStartDateMax:()=>Gte,triggerRecurringInvoicePathIdRegExp:()=>eoe,triggerRecurringInvoiceResponseOneDayOfMonthMax:()=>loe,triggerRecurringInvoiceResponseOneDayOfMonthMin:()=>coe,triggerRecurringInvoiceResponseOneDayOfWeekMax:()=>doe,triggerRecurringInvoiceResponseOneDayOfWeekMin:()=>aoe,triggerRecurringInvoiceResponseOneDocumentIdMax:()=>noe,triggerRecurringInvoiceResponseOneEndDateMax:()=>goe,triggerRecurringInvoiceResponseOneEntityIdMax:()=>ooe,triggerRecurringInvoiceResponseOneIdMax:()=>toe,triggerRecurringInvoiceResponseOneIntervalMax:()=>ioe,triggerRecurringInvoiceResponseOneIntervalMin:()=>roe,triggerRecurringInvoiceResponseOneInvoicesGeneratedMax:()=>voe,triggerRecurringInvoiceResponseOneInvoicesGeneratedMin:()=>_oe,triggerRecurringInvoiceResponseOneLastErrorMax:()=>Roe,triggerRecurringInvoiceResponseOneLastGeneratedInvoiceIdMax:()=>foe,triggerRecurringInvoiceResponseOneLastRunDateMax:()=>hoe,triggerRecurringInvoiceResponseOneMonthOfYearMax:()=>poe,triggerRecurringInvoiceResponseOneMonthOfYearMin:()=>uoe,triggerRecurringInvoiceResponseOneNameMax:()=>soe,triggerRecurringInvoiceResponseOneNextRunDateMax:()=>yoe,triggerRecurringInvoiceResponseOnePaymentTermsDaysMax:()=>zoe,triggerRecurringInvoiceResponseOnePaymentTermsDaysMin:()=>xoe,triggerRecurringInvoiceResponseOneSendToMax:()=>boe,triggerRecurringInvoiceResponseOneStartDateMax:()=>moe,updateRecurringInvoiceBodyDayOfMonthMax:()=>nee,updateRecurringInvoiceBodyDayOfMonthMin:()=>oee,updateRecurringInvoiceBodyDayOfWeekMax:()=>tee,updateRecurringInvoiceBodyDayOfWeekMin:()=>eee,updateRecurringInvoiceBodyEndDateRegExp:()=>aee,updateRecurringInvoiceBodyIntervalMax:()=>XX,updateRecurringInvoiceBodyIntervalMin:()=>ZX,updateRecurringInvoiceBodyMonthOfYearMax:()=>ree,updateRecurringInvoiceBodyMonthOfYearMin:()=>see,updateRecurringInvoiceBodyNameMax:()=>JX,updateRecurringInvoiceBodyPaymentTermsDaysMax:()=>lee,updateRecurringInvoiceBodyPaymentTermsDaysMin:()=>cee,updateRecurringInvoiceBodySendToMax:()=>dee,updateRecurringInvoiceBodyStartDateRegExp:()=>iee,updateRecurringInvoicePathIdRegExp:()=>QX,updateRecurringInvoiceResponseOneDayOfMonthMax:()=>_ee,updateRecurringInvoiceResponseOneDayOfMonthMin:()=>zee,updateRecurringInvoiceResponseOneDayOfWeekMax:()=>xee,updateRecurringInvoiceResponseOneDayOfWeekMin:()=>bee,updateRecurringInvoiceResponseOneDocumentIdMax:()=>mee,updateRecurringInvoiceResponseOneEndDateMax:()=>Iee,updateRecurringInvoiceResponseOneEntityIdMax:()=>pee,updateRecurringInvoiceResponseOneIdMax:()=>uee,updateRecurringInvoiceResponseOneIntervalMax:()=>hee,updateRecurringInvoiceResponseOneIntervalMin:()=>yee,updateRecurringInvoiceResponseOneInvoicesGeneratedMax:()=>Aee,updateRecurringInvoiceResponseOneInvoicesGeneratedMin:()=>Cee,updateRecurringInvoiceResponseOneLastErrorMax:()=>Tee,updateRecurringInvoiceResponseOneLastGeneratedInvoiceIdMax:()=>Mee,updateRecurringInvoiceResponseOneLastRunDateMax:()=>See,updateRecurringInvoiceResponseOneMonthOfYearMax:()=>fee,updateRecurringInvoiceResponseOneMonthOfYearMin:()=>vee,updateRecurringInvoiceResponseOneNameMax:()=>gee,updateRecurringInvoiceResponseOneNextRunDateMax:()=>Eee,updateRecurringInvoiceResponseOnePaymentTermsDaysMax:()=>wee,updateRecurringInvoiceResponseOnePaymentTermsDaysMin:()=>Pee,updateRecurringInvoiceResponseOneSendToMax:()=>Dee,updateRecurringInvoiceResponseOneStartDateMax:()=>Ree});var HIe=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),q9=36,W9=-2147483648,G9=2147483647,V9=-2147483648,L9=2147483647,H9=-2147483648,Y9=2147483647,K9=-2147483648,$9=2147483647,Q9=/^\d{4}-\d{2}-\d{2}$/,J9=/^\d{4}-\d{2}-\d{2}$/,Z9=255,X9=-2147483648,eX=2147483647,YIe=e.object({document_id:e.string().max(q9),name:e.string().min(1),frequency:e.enum(["daily","weekly","monthly","yearly"]),interval:e.number().min(W9).max(G9).optional(),day_of_week:e.number().min(V9).max(L9).nullish(),day_of_month:e.number().min(H9).max(Y9).nullish(),month_of_year:e.number().min(K9).max($9).nullish(),start_date:e.string().regex(Q9).describe("Start date in YYYY-MM-DD format"),end_date:e.string().regex(J9).optional().describe("End date in YYYY-MM-DD format (null = no end)"),auto_send:e.boolean().optional(),create_as_draft:e.boolean().optional(),send_to:e.string().max(Z9).nullish(),payment_terms_days:e.number().min(X9).max(eX).nullish(),notify_owner:e.boolean().optional(),metadata:e.record(e.string(),e.string()).nullish().describe("Custom key-value data for your own use. Store any JSON object up to 50 properties. Values must be strings up to 250 characters. Useful for storing external IDs, tags, or integration data.")}),tX=10,oX=100,KIe=e.object({limit:e.number().min(1).max(oX).default(tX).describe("Number of results per request."),next_cursor:e.string().optional().describe("Opaque cursor to fetch the next page of results. Reuse only with the same effective ordering. Use the value from pagination.next_cursor in the previous response."),prev_cursor:e.string().optional().describe("Opaque cursor to fetch the previous page of results. Reuse only with the same effective ordering. Use the value from pagination.prev_cursor in the previous response."),include_total_count:e.boolean().optional().describe("Whether to include the total count of items in `pagination.total`.\nDefault is `true`.\nWhen `false`, `pagination.total` returns -1 for better performance."),order_by:e.union([e.enum(["id","name","status","next_run_date","created_at","-id","-name","-status","-next_run_date","-created_at"]),e.array(e.enum(["id","name","status","next_run_date","created_at","-id","-name","-status","-next_run_date","-created_at"]))]).optional().describe("Sort by one field or provide a repeated array for multi-column ordering. Prefix a field with `-` for descending order. When paginating, reuse cursors only with the same effective ordering."),query:e.string().optional().describe('JSON query object for filtering results. Supports MongoDB-style operators.\n\n**Supported operators:**\n- `equals` or direct value - Exact match (default)\n- `gte` - Greater than or equal\n- `lte` - Less than or equal\n- `gt` - Greater than\n- `lt` - Less than\n- `in` - Value in array\n- `notIn` - Value not in array\n- `contains` - String contains (case-insensitive)\n- `startsWith` - String starts with\n- `endsWith` - String ends with\n- `between` - Value between two numbers/dates [min, max]\n\n**Allowed fields:** id, name, status, frequency, document_id\n\n**Examples:**\n- `{"total": {"gte": 1000}}` - Invoices over 1000\n- `{"customer.name": {"contains": "Acme"}}` - Customer name contains "Acme"\n- `{"date": {"between": ["2025-01-01", "2025-12-31"]}}` - Date range'),search:e.string().optional().describe(`Full-text search query to filter results across multiple fields.
|
|
226
|
+
Searches are case-insensitive and match partial strings.
|
|
227
|
+
Searches across all text fields including names, descriptions, addresses, and metadata values.`),deleted:e.boolean().optional().describe("When true, returns only soft-deleted (trashed) items. Default false excludes deleted items.")}),$Ie=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),nX=36,sX=36,rX=36,iX=255,aX=-2147483648,dX=2147483647,cX=-2147483648,lX=2147483647,uX=-2147483648,pX=2147483647,mX=-2147483648,gX=2147483647,yX=10,hX=10,bX=10,xX=10,zX=255,_X=-2147483648,vX=2147483647,fX=-2147483648,RX=2147483647,IX=36,EX=1e3,QIe=e.object({data:e.array(e.object({id:e.string().max(nX),entity_id:e.string().max(sX),document_id:e.string().max(rX),name:e.string().max(iX),frequency:e.enum(["daily","weekly","monthly","yearly"]).describe("Recurrence frequency"),interval:e.number().min(aX).max(dX),day_of_week:e.number().min(cX).max(lX).nullish(),day_of_month:e.number().min(uX).max(pX).nullish(),month_of_year:e.number().min(mX).max(gX).nullish(),start_date:e.string().max(yX),end_date:e.string().max(hX).nullish(),next_run_date:e.string().max(bX).nullish(),last_run_date:e.string().max(xX).nullish(),status:e.enum(["active","paused","completed"]).describe("Recurring invoice schedule status"),auto_send:e.boolean(),create_as_draft:e.boolean(),send_to:e.string().max(zX).nullish(),payment_terms_days:e.number().min(_X).max(vX).nullish(),notify_owner:e.boolean(),invoices_generated:e.number().min(fX).max(RX),last_generated_invoice_id:e.string().max(IX).nullish(),last_error:e.string().max(EX).nullish(),last_error_at:e.iso.datetime({}).nullish(),metadata:e.union([e.string(),e.number(),e.boolean(),e.null(),e.record(e.string(),e.unknown()),e.array(e.unknown())]),deleted_at:e.iso.datetime({}).nullish(),created_at:e.iso.datetime({}),updated_at:e.iso.datetime({})}).describe("Recurring invoice schedule configuration").and(e.looseObject({})).describe("Recurring invoice schedule")),pagination:e.object({total:e.number().describe("Total number of items available in the collection"),next_cursor:e.string().nullable().describe("Opaque cursor for fetching the next page. It encodes the resolved sort tuple for the current result set, so reuse it only with the same effective ordering. Null if no more results are available."),prev_cursor:e.string().nullable().describe("Opaque cursor for fetching the previous page. It encodes the resolved sort tuple for the current result set, so reuse it only with the same effective ordering. Null if at the first page."),has_more:e.boolean().describe("Indicates whether more results are available after the current page")}).describe("Pagination metadata including cursors and result counts")}),SX=/^[a-z]{3,4}_[0-9a-f]{24}$/,JIe=e.object({id:e.stringFormat("resource-id",SX).describe("Unique resource identifier")}),ZIe=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),DX=36,PX=36,wX=36,CX=255,AX=-2147483648,MX=2147483647,TX=-2147483648,kX=2147483647,BX=-2147483648,NX=2147483647,OX=-2147483648,FX=2147483647,UX=10,jX=10,qX=10,WX=10,GX=255,VX=-2147483648,LX=2147483647,HX=-2147483648,YX=2147483647,KX=36,$X=1e3,XIe=e.object({id:e.string().max(DX),entity_id:e.string().max(PX),document_id:e.string().max(wX),name:e.string().max(CX),frequency:e.enum(["daily","weekly","monthly","yearly"]).describe("Recurrence frequency"),interval:e.number().min(AX).max(MX),day_of_week:e.number().min(TX).max(kX).nullish(),day_of_month:e.number().min(BX).max(NX).nullish(),month_of_year:e.number().min(OX).max(FX).nullish(),start_date:e.string().max(UX),end_date:e.string().max(jX).nullish(),next_run_date:e.string().max(qX).nullish(),last_run_date:e.string().max(WX).nullish(),status:e.enum(["active","paused","completed"]).describe("Recurring invoice schedule status"),auto_send:e.boolean(),create_as_draft:e.boolean(),send_to:e.string().max(GX).nullish(),payment_terms_days:e.number().min(VX).max(LX).nullish(),notify_owner:e.boolean(),invoices_generated:e.number().min(HX).max(YX),last_generated_invoice_id:e.string().max(KX).nullish(),last_error:e.string().max($X).nullish(),last_error_at:e.iso.datetime({}).nullish(),metadata:e.union([e.string(),e.number(),e.boolean(),e.null(),e.record(e.string(),e.unknown()),e.array(e.unknown())]),deleted_at:e.iso.datetime({}).nullish(),created_at:e.iso.datetime({}),updated_at:e.iso.datetime({})}).describe("Recurring invoice schedule configuration").and(e.looseObject({})).describe("Recurring invoice schedule"),QX=/^[a-z]{3,4}_[0-9a-f]{24}$/,e0e=e.object({id:e.stringFormat("resource-id",QX).describe("Unique resource identifier")}),t0e=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),JX=255,ZX=-2147483648,XX=2147483647,eee=-2147483648,tee=2147483647,oee=-2147483648,nee=2147483647,see=-2147483648,ree=2147483647,iee=/^\d{4}-\d{2}-\d{2}$/,aee=/^\d{4}-\d{2}-\d{2}$/,dee=255,cee=-2147483648,lee=2147483647,o0e=e.object({name:e.string().max(JX).optional(),frequency:e.enum(["daily","weekly","monthly","yearly"]).optional(),interval:e.number().min(ZX).max(XX).optional(),day_of_week:e.number().min(eee).max(tee).nullish(),day_of_month:e.number().min(oee).max(nee).nullish(),month_of_year:e.number().min(see).max(ree).nullish(),start_date:e.string().regex(iee).optional(),end_date:e.string().regex(aee).nullish(),auto_send:e.boolean().optional(),create_as_draft:e.boolean().optional(),send_to:e.string().max(dee).nullish(),payment_terms_days:e.number().min(cee).max(lee).nullish(),notify_owner:e.boolean().optional(),metadata:e.record(e.string(),e.string()).nullish().describe("Custom key-value data for your own use. Store any JSON object up to 50 properties. Values must be strings up to 250 characters. Useful for storing external IDs, tags, or integration data.")}),uee=36,pee=36,mee=36,gee=255,yee=-2147483648,hee=2147483647,bee=-2147483648,xee=2147483647,zee=-2147483648,_ee=2147483647,vee=-2147483648,fee=2147483647,Ree=10,Iee=10,Eee=10,See=10,Dee=255,Pee=-2147483648,wee=2147483647,Cee=-2147483648,Aee=2147483647,Mee=36,Tee=1e3,n0e=e.object({id:e.string().max(uee),entity_id:e.string().max(pee),document_id:e.string().max(mee),name:e.string().max(gee),frequency:e.enum(["daily","weekly","monthly","yearly"]).describe("Recurrence frequency"),interval:e.number().min(yee).max(hee),day_of_week:e.number().min(bee).max(xee).nullish(),day_of_month:e.number().min(zee).max(_ee).nullish(),month_of_year:e.number().min(vee).max(fee).nullish(),start_date:e.string().max(Ree),end_date:e.string().max(Iee).nullish(),next_run_date:e.string().max(Eee).nullish(),last_run_date:e.string().max(See).nullish(),status:e.enum(["active","paused","completed"]).describe("Recurring invoice schedule status"),auto_send:e.boolean(),create_as_draft:e.boolean(),send_to:e.string().max(Dee).nullish(),payment_terms_days:e.number().min(Pee).max(wee).nullish(),notify_owner:e.boolean(),invoices_generated:e.number().min(Cee).max(Aee),last_generated_invoice_id:e.string().max(Mee).nullish(),last_error:e.string().max(Tee).nullish(),last_error_at:e.iso.datetime({}).nullish(),metadata:e.union([e.string(),e.number(),e.boolean(),e.null(),e.record(e.string(),e.unknown()),e.array(e.unknown())]),deleted_at:e.iso.datetime({}).nullish(),created_at:e.iso.datetime({}),updated_at:e.iso.datetime({})}).describe("Recurring invoice schedule configuration").and(e.looseObject({})).describe("Recurring invoice schedule"),kee=/^[a-z]{3,4}_[0-9a-f]{24}$/,s0e=e.object({id:e.stringFormat("resource-id",kee).describe("Unique resource identifier")}),r0e=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),Bee=/^[a-z]{3,4}_[0-9a-f]{24}$/,i0e=e.object({id:e.stringFormat("resource-id",Bee).describe("Unique resource identifier")}),a0e=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),Nee=36,Oee=36,Fee=36,Uee=255,jee=-2147483648,qee=2147483647,Wee=-2147483648,Gee=2147483647,Vee=-2147483648,Lee=2147483647,Hee=-2147483648,Yee=2147483647,Kee=10,$ee=10,Qee=10,Jee=10,Zee=255,Xee=-2147483648,ete=2147483647,tte=-2147483648,ote=2147483647,nte=36,ste=1e3,d0e=e.object({id:e.string().max(Nee),entity_id:e.string().max(Oee),document_id:e.string().max(Fee),name:e.string().max(Uee),frequency:e.enum(["daily","weekly","monthly","yearly"]).describe("Recurrence frequency"),interval:e.number().min(jee).max(qee),day_of_week:e.number().min(Wee).max(Gee).nullish(),day_of_month:e.number().min(Vee).max(Lee).nullish(),month_of_year:e.number().min(Hee).max(Yee).nullish(),start_date:e.string().max(Kee),end_date:e.string().max($ee).nullish(),next_run_date:e.string().max(Qee).nullish(),last_run_date:e.string().max(Jee).nullish(),status:e.enum(["active","paused","completed"]).describe("Recurring invoice schedule status"),auto_send:e.boolean(),create_as_draft:e.boolean(),send_to:e.string().max(Zee).nullish(),payment_terms_days:e.number().min(Xee).max(ete).nullish(),notify_owner:e.boolean(),invoices_generated:e.number().min(tte).max(ote),last_generated_invoice_id:e.string().max(nte).nullish(),last_error:e.string().max(ste).nullish(),last_error_at:e.iso.datetime({}).nullish(),metadata:e.union([e.string(),e.number(),e.boolean(),e.null(),e.record(e.string(),e.unknown()),e.array(e.unknown())]),deleted_at:e.iso.datetime({}).nullish(),created_at:e.iso.datetime({}),updated_at:e.iso.datetime({})}).describe("Recurring invoice schedule configuration").and(e.looseObject({})).describe("Recurring invoice schedule"),rte=/^[a-z]{3,4}_[0-9a-f]{24}$/,c0e=e.object({id:e.stringFormat("resource-id",rte).describe("Unique resource identifier")}),l0e=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),ite=/^[a-z]{3,4}_[0-9a-f]{24}$/,u0e=e.object({id:e.stringFormat("resource-id",ite).describe("Unique resource identifier")}),p0e=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),ate=36,dte=36,cte=36,lte=255,ute=-2147483648,pte=2147483647,mte=-2147483648,gte=2147483647,yte=-2147483648,hte=2147483647,bte=-2147483648,xte=2147483647,zte=10,_te=10,vte=10,fte=10,Rte=255,Ite=-2147483648,Ete=2147483647,Ste=-2147483648,Dte=2147483647,Pte=36,wte=1e3,m0e=e.object({id:e.string().max(ate),entity_id:e.string().max(dte),document_id:e.string().max(cte),name:e.string().max(lte),frequency:e.enum(["daily","weekly","monthly","yearly"]).describe("Recurrence frequency"),interval:e.number().min(ute).max(pte),day_of_week:e.number().min(mte).max(gte).nullish(),day_of_month:e.number().min(yte).max(hte).nullish(),month_of_year:e.number().min(bte).max(xte).nullish(),start_date:e.string().max(zte),end_date:e.string().max(_te).nullish(),next_run_date:e.string().max(vte).nullish(),last_run_date:e.string().max(fte).nullish(),status:e.enum(["active","paused","completed"]).describe("Recurring invoice schedule status"),auto_send:e.boolean(),create_as_draft:e.boolean(),send_to:e.string().max(Rte).nullish(),payment_terms_days:e.number().min(Ite).max(Ete).nullish(),notify_owner:e.boolean(),invoices_generated:e.number().min(Ste).max(Dte),last_generated_invoice_id:e.string().max(Pte).nullish(),last_error:e.string().max(wte).nullish(),last_error_at:e.iso.datetime({}).nullish(),metadata:e.union([e.string(),e.number(),e.boolean(),e.null(),e.record(e.string(),e.unknown()),e.array(e.unknown())]),deleted_at:e.iso.datetime({}).nullish(),created_at:e.iso.datetime({}),updated_at:e.iso.datetime({})}).describe("Recurring invoice schedule configuration").and(e.looseObject({})).describe("Recurring invoice schedule"),Cte=/^[a-z]{3,4}_[0-9a-f]{24}$/,g0e=e.object({id:e.stringFormat("resource-id",Cte).describe("Unique resource identifier")}),y0e=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),Ate=36,Mte=36,Tte=36,kte=255,Bte=-2147483648,Nte=2147483647,Ote=-2147483648,Fte=2147483647,Ute=-2147483648,jte=2147483647,qte=-2147483648,Wte=2147483647,Gte=10,Vte=10,Lte=10,Hte=10,Yte=255,Kte=-2147483648,$te=2147483647,Qte=-2147483648,Jte=2147483647,Zte=36,Xte=1e3,h0e=e.object({id:e.string().max(Ate),entity_id:e.string().max(Mte),document_id:e.string().max(Tte),name:e.string().max(kte),frequency:e.enum(["daily","weekly","monthly","yearly"]).describe("Recurrence frequency"),interval:e.number().min(Bte).max(Nte),day_of_week:e.number().min(Ote).max(Fte).nullish(),day_of_month:e.number().min(Ute).max(jte).nullish(),month_of_year:e.number().min(qte).max(Wte).nullish(),start_date:e.string().max(Gte),end_date:e.string().max(Vte).nullish(),next_run_date:e.string().max(Lte).nullish(),last_run_date:e.string().max(Hte).nullish(),status:e.enum(["active","paused","completed"]).describe("Recurring invoice schedule status"),auto_send:e.boolean(),create_as_draft:e.boolean(),send_to:e.string().max(Yte).nullish(),payment_terms_days:e.number().min(Kte).max($te).nullish(),notify_owner:e.boolean(),invoices_generated:e.number().min(Qte).max(Jte),last_generated_invoice_id:e.string().max(Zte).nullish(),last_error:e.string().max(Xte).nullish(),last_error_at:e.iso.datetime({}).nullish(),metadata:e.union([e.string(),e.number(),e.boolean(),e.null(),e.record(e.string(),e.unknown()),e.array(e.unknown())]),deleted_at:e.iso.datetime({}).nullish(),created_at:e.iso.datetime({}),updated_at:e.iso.datetime({})}).describe("Recurring invoice schedule configuration").and(e.looseObject({})).describe("Recurring invoice schedule"),eoe=/^[a-z]{3,4}_[0-9a-f]{24}$/,b0e=e.object({id:e.stringFormat("resource-id",eoe).describe("Unique resource identifier")}),x0e=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),toe=36,ooe=36,noe=36,soe=255,roe=-2147483648,ioe=2147483647,aoe=-2147483648,doe=2147483647,coe=-2147483648,loe=2147483647,uoe=-2147483648,poe=2147483647,moe=10,goe=10,yoe=10,hoe=10,boe=255,xoe=-2147483648,zoe=2147483647,_oe=-2147483648,voe=2147483647,foe=36,Roe=1e3,z0e=e.object({id:e.string().max(toe),entity_id:e.string().max(ooe),document_id:e.string().max(noe),name:e.string().max(soe),frequency:e.enum(["daily","weekly","monthly","yearly"]).describe("Recurrence frequency"),interval:e.number().min(roe).max(ioe),day_of_week:e.number().min(aoe).max(doe).nullish(),day_of_month:e.number().min(coe).max(loe).nullish(),month_of_year:e.number().min(uoe).max(poe).nullish(),start_date:e.string().max(moe),end_date:e.string().max(goe).nullish(),next_run_date:e.string().max(yoe).nullish(),last_run_date:e.string().max(hoe).nullish(),status:e.enum(["active","paused","completed"]).describe("Recurring invoice schedule status"),auto_send:e.boolean(),create_as_draft:e.boolean(),send_to:e.string().max(boe).nullish(),payment_terms_days:e.number().min(xoe).max(zoe).nullish(),notify_owner:e.boolean(),invoices_generated:e.number().min(_oe).max(voe),last_generated_invoice_id:e.string().max(foe).nullish(),last_error:e.string().max(Roe).nullish(),last_error_at:e.iso.datetime({}).nullish(),metadata:e.union([e.string(),e.number(),e.boolean(),e.null(),e.record(e.string(),e.unknown()),e.array(e.unknown())]),deleted_at:e.iso.datetime({}).nullish(),created_at:e.iso.datetime({}),updated_at:e.iso.datetime({})}).describe("Recurring invoice schedule configuration").and(e.looseObject({})).describe("Recurring invoice schedule");var Qe={};j(Qe,{StripeAppAuthorizeHeader:()=>_0e,StripeAppAuthorizeResponse:()=>v0e,StripeAppConnectBody:()=>S0e,StripeAppCreateInvoiceBody:()=>O0e,StripeAppCreateInvoiceHeader:()=>N0e,StripeAppDisconnectHeader:()=>w0e,StripeAppDisconnectResponse:()=>C0e,StripeAppEntityDisconnectResponse:()=>K0e,StripeAppEntityGetConnectionResponse:()=>Y0e,StripeAppEntityGetSettingsResponse:()=>$0e,StripeAppEntityUpdateSettingsBody:()=>Q0e,StripeAppEntityUpdateSettingsResponse:()=>J0e,StripeAppGetConnectionHeader:()=>D0e,StripeAppGetConnectionResponse:()=>P0e,StripeAppGetInvoiceHeader:()=>L0e,StripeAppGetInvoiceParams:()=>V0e,StripeAppGetInvoiceResponse:()=>H0e,StripeAppGetSettingsHeader:()=>A0e,StripeAppGetSettingsResponse:()=>M0e,StripeAppListInvoicesHeader:()=>U0e,StripeAppListInvoicesQueryParams:()=>F0e,StripeAppListInvoicesResponse:()=>j0e,StripeAppLookupInvoiceHeader:()=>W0e,StripeAppLookupInvoiceQueryParams:()=>q0e,StripeAppLookupInvoiceResponse:()=>G0e,StripeAppMarketplaceAuthorizeBody:()=>I0e,StripeAppMarketplaceAuthorizeResponse:()=>E0e,StripeAppOAuthCallbackQueryParams:()=>f0e,StripeAppUpdateSettingsBody:()=>k0e,StripeAppUpdateSettingsHeader:()=>T0e,StripeAppUpdateSettingsResponse:()=>B0e,StripeAppWebhookResponse:()=>R0e,stripeAppCreateInvoiceBodyNoteMax:()=>Doe,stripeAppEntityUpdateSettingsBodyDefaultNoteMax:()=>Coe,stripeAppEntityUpdateSettingsBodyDefaultTaxRateMax:()=>Moe,stripeAppEntityUpdateSettingsBodyDefaultTaxRateMin:()=>Aoe,stripeAppListInvoicesQueryLimitDefault:()=>Poe,stripeAppListInvoicesQueryLimitMax:()=>woe,stripeAppUpdateSettingsBodyDefaultNoteMax:()=>Ioe,stripeAppUpdateSettingsBodyDefaultTaxRateMax:()=>Soe,stripeAppUpdateSettingsBodyDefaultTaxRateMin:()=>Eoe});var _0e=e.object({"stripe-user-account-id":e.string().describe("Stripe account ID from the Stripe App context")}),v0e=e.object({redirect_url:e.url().describe("URL to redirect the user to for authentication")}),f0e=e.object({code:e.string().min(1).describe("OAuth authorization code from Stripe"),state:e.string().min(1).describe("Encrypted state token from the authorize step")}),R0e=e.object({received:e.boolean().describe("Whether the webhook was received successfully")}),I0e=e.object({entity_id:e.string().min(1).describe("Entity ID to connect to the Stripe account")}),E0e=e.object({redirect_url:e.url().describe("URL to redirect the user to for authentication")}),S0e=e.object({state:e.string().min(1).describe("State token from the authorize step"),entity_id:e.string().min(1).describe("Entity ID to connect to the Stripe account"),force:e.boolean().optional().describe("If true, disconnects any existing connection for this Stripe account before connecting")}),D0e=e.object({"stripe-user-account-id":e.string().describe("Stripe account ID")}),P0e=e.object({id:e.string().describe("Connection ID"),stripe_account_id:e.string().describe("Connected Stripe account ID"),entity_id:e.string().describe("Connected Space Invoices entity ID"),white_label_id:e.string().describe("White-label context for this connection"),auto_invoice_config:e.object({enabled:e.boolean(),events:e.array(e.string()),default_note:e.string().optional()}).describe("Auto-invoice configuration"),created_at:e.iso.datetime({}).describe("When the connection was created")}),w0e=e.object({"stripe-user-account-id":e.string().describe("Stripe account ID")}),C0e=e.object({message:e.string()}),A0e=e.object({"stripe-user-account-id":e.string().describe("Stripe account ID")}),M0e=e.object({auto_invoice_enabled:e.boolean().describe("Whether auto-invoicing is enabled"),auto_invoice_events:e.array(e.string()).describe("Stripe event types that trigger auto-invoice creation"),default_note:e.string().nullable().describe("Default note for auto-created invoices"),default_tax_rate:e.number().nullable().describe("Default tax rate applied when Stripe data has no tax info")}),T0e=e.object({"stripe-user-account-id":e.string().describe("Stripe account ID")}),Ioe=500,Eoe=0,Soe=100,k0e=e.object({auto_invoice_enabled:e.boolean().optional().describe("Enable or disable auto-invoicing"),auto_invoice_events:e.array(e.enum(["payment_intent.succeeded","invoice.paid"])).optional().describe("Stripe event types that trigger auto-invoice creation"),default_note:e.string().max(Ioe).optional().describe("Default note to include on auto-created invoices"),default_tax_rate:e.number().min(Eoe).max(Soe).nullish().describe("Default tax rate (%) to apply to auto-created invoices when Stripe data has no tax info. Set to null to disable.")}),B0e=e.object({auto_invoice_enabled:e.boolean().describe("Whether auto-invoicing is enabled"),auto_invoice_events:e.array(e.string()).describe("Stripe event types that trigger auto-invoice creation"),default_note:e.string().nullable().describe("Default note for auto-created invoices"),default_tax_rate:e.number().nullable().describe("Default tax rate applied when Stripe data has no tax info")}),N0e=e.object({"stripe-user-account-id":e.string().describe("Stripe account ID")}),Doe=2e3,O0e=e.object({stripe_object_id:e.string().min(1).describe("Stripe object ID (pi_xxx for payment intents, in_xxx for invoices). Type is auto-detected from prefix."),note:e.string().max(Doe).optional().describe("Optional note to include on the invoice")}),Poe=10,woe=50,F0e=e.object({limit:e.number().min(1).max(woe).default(Poe).describe("Number of invoices to return")}),U0e=e.object({"stripe-user-account-id":e.string().describe("Stripe account ID")}),j0e=e.object({data:e.array(e.object({id:e.string().describe("Space Invoices invoice ID"),number:e.string().nullable().describe("Invoice number"),status:e.string().describe("Invoice status"),total:e.number().describe("Invoice total amount"),currency:e.string().describe("Currency code"),public_url:e.url().nullable().describe("Public URL to view the invoice"),fiscalization_status:e.string().nullable().describe("Fiscalization/compliance status if applicable"),created_at:e.iso.datetime({}).describe("When the invoice was created")}))}),q0e=e.object({stripe_object_id:e.string().min(1).describe("Stripe object ID (e.g. in_xxx for invoices, pi_xxx for payment intents)")}),W0e=e.object({"stripe-user-account-id":e.string().describe("Stripe account ID")}),G0e=e.object({id:e.string().describe("Space Invoices invoice ID"),number:e.string().nullable().describe("Invoice number"),status:e.string().describe("Invoice status"),total:e.number().describe("Invoice total amount"),currency:e.string().describe("Currency code"),public_url:e.url().nullable().describe("Public URL to view the invoice"),fiscalization_status:e.string().nullable().describe("Fiscalization/compliance status if applicable"),created_at:e.iso.datetime({}).describe("When the invoice was created")}),V0e=e.object({id:e.string().describe("Invoice ID")}),L0e=e.object({"stripe-user-account-id":e.string().describe("Stripe account ID")}),H0e=e.object({id:e.string().describe("Space Invoices invoice ID"),number:e.string().nullable().describe("Invoice number"),status:e.string().describe("Invoice status"),total:e.number().describe("Invoice total amount"),currency:e.string().describe("Currency code"),public_url:e.url().nullable().describe("Public URL to view the invoice"),fiscalization_status:e.string().nullable().describe("Fiscalization/compliance status if applicable"),created_at:e.iso.datetime({}).describe("When the invoice was created")}),Y0e=e.object({id:e.string().describe("Connection ID"),stripe_account_id:e.string().describe("Connected Stripe account ID"),entity_id:e.string().describe("Connected Space Invoices entity ID"),white_label_id:e.string().describe("White-label context for this connection"),auto_invoice_config:e.object({enabled:e.boolean(),events:e.array(e.string()),default_note:e.string().optional()}).describe("Auto-invoice configuration"),created_at:e.iso.datetime({}).describe("When the connection was created")}),K0e=e.object({message:e.string()}),$0e=e.object({auto_invoice_enabled:e.boolean().describe("Whether auto-invoicing is enabled"),auto_invoice_events:e.array(e.string()).describe("Stripe event types that trigger auto-invoice creation"),default_note:e.string().nullable().describe("Default note for auto-created invoices"),default_tax_rate:e.number().nullable().describe("Default tax rate applied when Stripe data has no tax info")}),Coe=500,Aoe=0,Moe=100,Q0e=e.object({auto_invoice_enabled:e.boolean().optional().describe("Enable or disable auto-invoicing"),auto_invoice_events:e.array(e.enum(["payment_intent.succeeded","invoice.paid"])).optional().describe("Stripe event types that trigger auto-invoice creation"),default_note:e.string().max(Coe).optional().describe("Default note to include on auto-created invoices"),default_tax_rate:e.number().min(Aoe).max(Moe).nullish().describe("Default tax rate (%) to apply to auto-created invoices when Stripe data has no tax info. Set to null to disable.")}),J0e=e.object({auto_invoice_enabled:e.boolean().describe("Whether auto-invoicing is enabled"),auto_invoice_events:e.array(e.string()).describe("Stripe event types that trigger auto-invoice creation"),default_note:e.string().nullable().describe("Default note for auto-created invoices"),default_tax_rate:e.number().nullable().describe("Default tax rate applied when Stripe data has no tax info")});var Je={};j(Je,{CreateSupplierBody:()=>X0e,CreateSupplierHeader:()=>Z0e,GetSupplierByIdHeader:()=>sEe,GetSupplierByIdParams:()=>nEe,GetSupplierByIdResponse:()=>rEe,GetSuppliersHeader:()=>tEe,GetSuppliersQueryParams:()=>eEe,GetSuppliersResponse:()=>oEe,UpdateSupplierBody:()=>dEe,UpdateSupplierHeader:()=>aEe,UpdateSupplierParams:()=>iEe,UpdateSupplierResponse:()=>cEe,createSupplierBodyAddress2Max:()=>koe,createSupplierBodyAddressMax:()=>Toe,createSupplierBodyCityMax:()=>Noe,createSupplierBodyCompanyNumberMax:()=>qoe,createSupplierBodyCountryCodeMax:()=>Uoe,createSupplierBodyCountryMax:()=>Foe,createSupplierBodyEmailMax:()=>Goe,createSupplierBodyPeppolIdMax:()=>Woe,createSupplierBodyPhoneMax:()=>Voe,createSupplierBodyPostCodeMax:()=>Boe,createSupplierBodyStateMax:()=>Ooe,createSupplierBodyTaxNumberMax:()=>joe,getSupplierByIdPathIdRegExp:()=>dne,getSupplierByIdResponseOneAddress2Max:()=>mne,getSupplierByIdResponseOneAddressMax:()=>pne,getSupplierByIdResponseOneCityMax:()=>yne,getSupplierByIdResponseOneCompanyNumberMax:()=>_ne,getSupplierByIdResponseOneCountryCodeMax:()=>xne,getSupplierByIdResponseOneCountryMax:()=>bne,getSupplierByIdResponseOneEmailMax:()=>fne,getSupplierByIdResponseOneEntityIdMax:()=>lne,getSupplierByIdResponseOneIdMax:()=>cne,getSupplierByIdResponseOneNameMax:()=>une,getSupplierByIdResponseOnePeppolIdMax:()=>vne,getSupplierByIdResponseOnePhoneMax:()=>Rne,getSupplierByIdResponseOnePostCodeMax:()=>gne,getSupplierByIdResponseOneStateMax:()=>hne,getSupplierByIdResponseOneTaxNumberMax:()=>zne,getSuppliersQueryLimitDefault:()=>Loe,getSuppliersQueryLimitMax:()=>Hoe,getSuppliersResponseDataItemOneAddress2Max:()=>Joe,getSuppliersResponseDataItemOneAddressMax:()=>Qoe,getSuppliersResponseDataItemOneCityMax:()=>Xoe,getSuppliersResponseDataItemOneCompanyNumberMax:()=>sne,getSuppliersResponseDataItemOneCountryCodeMax:()=>one,getSuppliersResponseDataItemOneCountryMax:()=>tne,getSuppliersResponseDataItemOneEmailMax:()=>ine,getSuppliersResponseDataItemOneEntityIdMax:()=>Koe,getSuppliersResponseDataItemOneIdMax:()=>Yoe,getSuppliersResponseDataItemOneNameMax:()=>$oe,getSuppliersResponseDataItemOnePeppolIdMax:()=>rne,getSuppliersResponseDataItemOnePhoneMax:()=>ane,getSuppliersResponseDataItemOnePostCodeMax:()=>Zoe,getSuppliersResponseDataItemOneStateMax:()=>ene,getSuppliersResponseDataItemOneTaxNumberMax:()=>nne,updateSupplierBodyAddress2Max:()=>Sne,updateSupplierBodyAddressMax:()=>Ene,updateSupplierBodyCityMax:()=>Pne,updateSupplierBodyCompanyNumberMax:()=>Tne,updateSupplierBodyCountryCodeMax:()=>Ane,updateSupplierBodyCountryMax:()=>Cne,updateSupplierBodyEmailMax:()=>Bne,updateSupplierBodyPeppolIdMax:()=>kne,updateSupplierBodyPhoneMax:()=>Nne,updateSupplierBodyPostCodeMax:()=>Dne,updateSupplierBodyStateMax:()=>wne,updateSupplierBodyTaxNumberMax:()=>Mne,updateSupplierPathIdRegExp:()=>Ine,updateSupplierResponseOneAddress2Max:()=>qne,updateSupplierResponseOneAddressMax:()=>jne,updateSupplierResponseOneCityMax:()=>Gne,updateSupplierResponseOneCompanyNumberMax:()=>Kne,updateSupplierResponseOneCountryCodeMax:()=>Hne,updateSupplierResponseOneCountryMax:()=>Lne,updateSupplierResponseOneEmailMax:()=>Qne,updateSupplierResponseOneEntityIdMax:()=>Fne,updateSupplierResponseOneIdMax:()=>One,updateSupplierResponseOneNameMax:()=>Une,updateSupplierResponseOnePeppolIdMax:()=>$ne,updateSupplierResponseOnePhoneMax:()=>Jne,updateSupplierResponseOnePostCodeMax:()=>Wne,updateSupplierResponseOneStateMax:()=>Vne,updateSupplierResponseOneTaxNumberMax:()=>Yne});var Z0e=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),Toe=500,koe=500,Boe=20,Noe=100,Ooe=100,Foe=100,Uoe=2,joe=50,qoe=50,Woe=50,Goe=255,Voe=50,X0e=e.object({name:e.string().min(1),address:e.string().max(Toe).nullish(),address_2:e.string().max(koe).nullish(),post_code:e.string().max(Boe).nullish(),city:e.string().max(Noe).nullish(),state:e.string().max(Ooe).nullish(),country:e.string().max(Foe).nullish(),country_code:e.string().max(Uoe).nullish(),tax_number:e.string().max(joe).nullish(),company_number:e.string().max(qoe).nullish(),peppol_id:e.string().max(Woe).nullish(),email:e.string().max(Goe).nullish(),phone:e.string().max(Voe).nullish(),is_tax_subject:e.boolean().optional(),metadata:e.record(e.string(),e.string()).nullish().describe("Custom key-value data for your own use. Store any JSON object up to 50 properties. Values must be strings up to 250 characters. Useful for storing external IDs, tags, or integration data.")}),Loe=10,Hoe=100,eEe=e.object({limit:e.number().min(1).max(Hoe).default(Loe).describe("Number of results per request."),next_cursor:e.string().optional().describe("Opaque cursor to fetch the next page of results. Reuse only with the same effective ordering. Use the value from pagination.next_cursor in the previous response."),prev_cursor:e.string().optional().describe("Opaque cursor to fetch the previous page of results. Reuse only with the same effective ordering. Use the value from pagination.prev_cursor in the previous response."),include_total_count:e.boolean().optional().describe("Whether to include the total count of items in `pagination.total`.\nDefault is `true`.\nWhen `false`, `pagination.total` returns -1 for better performance."),search:e.string().optional().describe(`Full-text search query to filter results across multiple fields.
|
|
228
|
+
Searches are case-insensitive and match partial strings.
|
|
229
|
+
Searches across all text fields including names, descriptions, addresses, and metadata values.`)}),tEe=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),Yoe=36,Koe=36,$oe=255,Qoe=500,Joe=500,Zoe=20,Xoe=100,ene=100,tne=100,one=2,nne=50,sne=50,rne=50,ine=255,ane=50,oEe=e.object({data:e.array(e.object({id:e.string().max(Yoe),entity_id:e.string().max(Koe),name:e.string().max($oe),address:e.string().max(Qoe).nullish(),address_2:e.string().max(Joe).nullish(),post_code:e.string().max(Zoe).nullish(),city:e.string().max(Xoe).nullish(),state:e.string().max(ene).nullish(),country:e.string().max(tne).nullish(),country_code:e.string().max(one).nullish(),tax_number:e.string().max(nne).nullish(),company_number:e.string().max(sne).nullish(),peppol_id:e.string().max(rne).nullish(),email:e.string().max(ine).nullish(),phone:e.string().max(ane).nullish(),is_tax_subject:e.boolean(),metadata:e.union([e.string(),e.number(),e.boolean(),e.null(),e.record(e.string(),e.unknown()),e.array(e.unknown())]),deleted_at:e.iso.datetime({}).nullish(),created_at:e.iso.datetime({}),updated_at:e.iso.datetime({})}).describe("Supplier information used for incoming purchase documents.").and(e.looseObject({})).describe("Supplier directory record")),pagination:e.object({total:e.number().describe("Total number of items available in the collection"),next_cursor:e.string().nullable().describe("Opaque cursor for fetching the next page. It encodes the resolved sort tuple for the current result set, so reuse it only with the same effective ordering. Null if no more results are available."),prev_cursor:e.string().nullable().describe("Opaque cursor for fetching the previous page. It encodes the resolved sort tuple for the current result set, so reuse it only with the same effective ordering. Null if at the first page."),has_more:e.boolean().describe("Indicates whether more results are available after the current page")}).describe("Pagination metadata including cursors and result counts")}),dne=/^[a-z]{3,4}_[0-9a-f]{24}$/,nEe=e.object({id:e.stringFormat("resource-id",dne).describe("Unique resource identifier")}),sEe=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),cne=36,lne=36,une=255,pne=500,mne=500,gne=20,yne=100,hne=100,bne=100,xne=2,zne=50,_ne=50,vne=50,fne=255,Rne=50,rEe=e.object({id:e.string().max(cne),entity_id:e.string().max(lne),name:e.string().max(une),address:e.string().max(pne).nullish(),address_2:e.string().max(mne).nullish(),post_code:e.string().max(gne).nullish(),city:e.string().max(yne).nullish(),state:e.string().max(hne).nullish(),country:e.string().max(bne).nullish(),country_code:e.string().max(xne).nullish(),tax_number:e.string().max(zne).nullish(),company_number:e.string().max(_ne).nullish(),peppol_id:e.string().max(vne).nullish(),email:e.string().max(fne).nullish(),phone:e.string().max(Rne).nullish(),is_tax_subject:e.boolean(),metadata:e.union([e.string(),e.number(),e.boolean(),e.null(),e.record(e.string(),e.unknown()),e.array(e.unknown())]),deleted_at:e.iso.datetime({}).nullish(),created_at:e.iso.datetime({}),updated_at:e.iso.datetime({})}).describe("Supplier information used for incoming purchase documents.").and(e.looseObject({})).describe("Supplier directory record"),Ine=/^[a-z]{3,4}_[0-9a-f]{24}$/,iEe=e.object({id:e.stringFormat("resource-id",Ine).describe("Unique resource identifier")}),aEe=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),Ene=500,Sne=500,Dne=20,Pne=100,wne=100,Cne=100,Ane=2,Mne=50,Tne=50,kne=50,Bne=255,Nne=50,dEe=e.object({name:e.string().min(1).optional(),address:e.string().max(Ene).nullish(),address_2:e.string().max(Sne).nullish(),post_code:e.string().max(Dne).nullish(),city:e.string().max(Pne).nullish(),state:e.string().max(wne).nullish(),country:e.string().max(Cne).nullish(),country_code:e.string().max(Ane).nullish(),tax_number:e.string().max(Mne).nullish(),company_number:e.string().max(Tne).nullish(),peppol_id:e.string().max(kne).nullish(),email:e.string().max(Bne).nullish(),phone:e.string().max(Nne).nullish(),is_tax_subject:e.boolean().optional(),metadata:e.record(e.string(),e.string()).nullish().describe("Custom key-value data for your own use. Store any JSON object up to 50 properties. Values must be strings up to 250 characters. Useful for storing external IDs, tags, or integration data.")}),One=36,Fne=36,Une=255,jne=500,qne=500,Wne=20,Gne=100,Vne=100,Lne=100,Hne=2,Yne=50,Kne=50,$ne=50,Qne=255,Jne=50,cEe=e.object({id:e.string().max(One),entity_id:e.string().max(Fne),name:e.string().max(Une),address:e.string().max(jne).nullish(),address_2:e.string().max(qne).nullish(),post_code:e.string().max(Wne).nullish(),city:e.string().max(Gne).nullish(),state:e.string().max(Vne).nullish(),country:e.string().max(Lne).nullish(),country_code:e.string().max(Hne).nullish(),tax_number:e.string().max(Yne).nullish(),company_number:e.string().max(Kne).nullish(),peppol_id:e.string().max($ne).nullish(),email:e.string().max(Qne).nullish(),phone:e.string().max(Jne).nullish(),is_tax_subject:e.boolean(),metadata:e.union([e.string(),e.number(),e.boolean(),e.null(),e.record(e.string(),e.unknown()),e.array(e.unknown())]),deleted_at:e.iso.datetime({}).nullish(),created_at:e.iso.datetime({}),updated_at:e.iso.datetime({})}).describe("Supplier information used for incoming purchase documents.").and(e.looseObject({})).describe("Supplier directory record");var Ze={};j(Ze,{ExportSloveniaVodXmlBody:()=>REe,ExportSloveniaVodXmlHeader:()=>fEe,ExportSloveniaYearlyNormiraniReportBody:()=>vEe,ExportSloveniaYearlyNormiraniReportHeader:()=>_Ee,GenerateKirExportHeader:()=>uEe,GenerateKirExportQueryParams:()=>lEe,GetSloveniaTaxProfileHeader:()=>pEe,GetSloveniaTaxProfileResponse:()=>mEe,ReviewSloveniaYearlyNormiraniReportBody:()=>xEe,ReviewSloveniaYearlyNormiraniReportHeader:()=>bEe,ReviewSloveniaYearlyNormiraniReportResponse:()=>zEe,UpdateSloveniaTaxProfileBody:()=>yEe,UpdateSloveniaTaxProfileHeader:()=>gEe,UpdateSloveniaTaxProfileResponse:()=>hEe,exportSloveniaYearlyNormiraniReportBodyManualValuesForeignTaxCreditAmountMin:()=>bie,exportSloveniaYearlyNormiraniReportBodyManualValuesPriorAdvanceIncomeTaxAmountMin:()=>xie,exportSloveniaYearlyNormiraniReportBodyManualValuesRevenueAdjustmentDecreaseMin:()=>zie,exportSloveniaYearlyNormiraniReportBodyManualValuesRevenueAdjustmentIncreaseMin:()=>_ie,exportSloveniaYearlyNormiraniReportBodyManualValuesWithholdingTaxAmountMin:()=>hie,exportSloveniaYearlyNormiraniReportBodyYearMax:()=>yie,exportSloveniaYearlyNormiraniReportBodyYearMin:()=>gie,generateKirExportQueryMonthRegExp:()=>Xne,generateKirExportQueryQuarterRegExp:()=>ese,generateKirExportQueryYearRegExp:()=>Zne,getSloveniaTaxProfileResponseAccountingExportsKontoMappingsPayablesMax:()=>sse,getSloveniaTaxProfileResponseAccountingExportsKontoMappingsPurchaseExpense22Max:()=>_se,getSloveniaTaxProfileResponseAccountingExportsKontoMappingsPurchaseExpense5Max:()=>fse,getSloveniaTaxProfileResponseAccountingExportsKontoMappingsPurchaseExpense95Max:()=>vse,getSloveniaTaxProfileResponseAccountingExportsKontoMappingsPurchaseExpenseEuGoodsMax:()=>Ise,getSloveniaTaxProfileResponseAccountingExportsKontoMappingsPurchaseExpenseEuServicesMax:()=>Ese,getSloveniaTaxProfileResponseAccountingExportsKontoMappingsPurchaseExpenseExemptMax:()=>Rse,getSloveniaTaxProfileResponseAccountingExportsKontoMappingsPurchaseExpenseReverseChargeMax:()=>Sse,getSloveniaTaxProfileResponseAccountingExportsKontoMappingsPurchaseExpenseThirdCountryGoodsMax:()=>Dse,getSloveniaTaxProfileResponseAccountingExportsKontoMappingsPurchaseExpenseThirdCountryServicesMax:()=>Pse,getSloveniaTaxProfileResponseAccountingExportsKontoMappingsPurchaseVatRecoverable22Max:()=>dse,getSloveniaTaxProfileResponseAccountingExportsKontoMappingsPurchaseVatRecoverable5Max:()=>lse,getSloveniaTaxProfileResponseAccountingExportsKontoMappingsPurchaseVatRecoverable95Max:()=>cse,getSloveniaTaxProfileResponseAccountingExportsKontoMappingsReceivablesMax:()=>nse,getSloveniaTaxProfileResponseAccountingExportsKontoMappingsSalesRevenue22Max:()=>use,getSloveniaTaxProfileResponseAccountingExportsKontoMappingsSalesRevenue5Max:()=>mse,getSloveniaTaxProfileResponseAccountingExportsKontoMappingsSalesRevenue95Max:()=>pse,getSloveniaTaxProfileResponseAccountingExportsKontoMappingsSalesRevenueEuGoodsMax:()=>yse,getSloveniaTaxProfileResponseAccountingExportsKontoMappingsSalesRevenueEuServicesMax:()=>hse,getSloveniaTaxProfileResponseAccountingExportsKontoMappingsSalesRevenueExemptMax:()=>gse,getSloveniaTaxProfileResponseAccountingExportsKontoMappingsSalesRevenueReverseChargeMax:()=>bse,getSloveniaTaxProfileResponseAccountingExportsKontoMappingsSalesRevenueThirdCountryGoodsMax:()=>xse,getSloveniaTaxProfileResponseAccountingExportsKontoMappingsSalesRevenueThirdCountryServicesMax:()=>zse,getSloveniaTaxProfileResponseAccountingExportsKontoMappingsSalesVat22Max:()=>rse,getSloveniaTaxProfileResponseAccountingExportsKontoMappingsSalesVat5Max:()=>ase,getSloveniaTaxProfileResponseAccountingExportsKontoMappingsSalesVat95Max:()=>ise,getSloveniaTaxProfileResponseYearlyReportingDefaultForeignTaxCreditAmountMin:()=>ose,getSloveniaTaxProfileResponseYearlyReportingDefaultWithholdingTaxAmountMin:()=>tse,reviewSloveniaYearlyNormiraniReportBodyYearMax:()=>Mre,reviewSloveniaYearlyNormiraniReportBodyYearMin:()=>Are,reviewSloveniaYearlyNormiraniReportResponseManualValuesForeignTaxCreditAmountMin:()=>lie,reviewSloveniaYearlyNormiraniReportResponseManualValuesPriorAdvanceIncomeTaxAmountMin:()=>uie,reviewSloveniaYearlyNormiraniReportResponseManualValuesRevenueAdjustmentDecreaseMin:()=>pie,reviewSloveniaYearlyNormiraniReportResponseManualValuesRevenueAdjustmentIncreaseMin:()=>mie,reviewSloveniaYearlyNormiraniReportResponseManualValuesWithholdingTaxAmountMin:()=>cie,reviewSloveniaYearlyNormiraniReportResponseProfileAccountingExportsKontoMappingsPayablesMax:()=>Fre,reviewSloveniaYearlyNormiraniReportResponseProfileAccountingExportsKontoMappingsPurchaseExpense22Max:()=>eie,reviewSloveniaYearlyNormiraniReportResponseProfileAccountingExportsKontoMappingsPurchaseExpense5Max:()=>oie,reviewSloveniaYearlyNormiraniReportResponseProfileAccountingExportsKontoMappingsPurchaseExpense95Max:()=>tie,reviewSloveniaYearlyNormiraniReportResponseProfileAccountingExportsKontoMappingsPurchaseExpenseEuGoodsMax:()=>sie,reviewSloveniaYearlyNormiraniReportResponseProfileAccountingExportsKontoMappingsPurchaseExpenseEuServicesMax:()=>rie,reviewSloveniaYearlyNormiraniReportResponseProfileAccountingExportsKontoMappingsPurchaseExpenseExemptMax:()=>nie,reviewSloveniaYearlyNormiraniReportResponseProfileAccountingExportsKontoMappingsPurchaseExpenseReverseChargeMax:()=>iie,reviewSloveniaYearlyNormiraniReportResponseProfileAccountingExportsKontoMappingsPurchaseExpenseThirdCountryGoodsMax:()=>aie,reviewSloveniaYearlyNormiraniReportResponseProfileAccountingExportsKontoMappingsPurchaseExpenseThirdCountryServicesMax:()=>die,reviewSloveniaYearlyNormiraniReportResponseProfileAccountingExportsKontoMappingsPurchaseVatRecoverable22Max:()=>Wre,reviewSloveniaYearlyNormiraniReportResponseProfileAccountingExportsKontoMappingsPurchaseVatRecoverable5Max:()=>Vre,reviewSloveniaYearlyNormiraniReportResponseProfileAccountingExportsKontoMappingsPurchaseVatRecoverable95Max:()=>Gre,reviewSloveniaYearlyNormiraniReportResponseProfileAccountingExportsKontoMappingsReceivablesMax:()=>Ore,reviewSloveniaYearlyNormiraniReportResponseProfileAccountingExportsKontoMappingsSalesRevenue22Max:()=>Lre,reviewSloveniaYearlyNormiraniReportResponseProfileAccountingExportsKontoMappingsSalesRevenue5Max:()=>Yre,reviewSloveniaYearlyNormiraniReportResponseProfileAccountingExportsKontoMappingsSalesRevenue95Max:()=>Hre,reviewSloveniaYearlyNormiraniReportResponseProfileAccountingExportsKontoMappingsSalesRevenueEuGoodsMax:()=>$re,reviewSloveniaYearlyNormiraniReportResponseProfileAccountingExportsKontoMappingsSalesRevenueEuServicesMax:()=>Qre,reviewSloveniaYearlyNormiraniReportResponseProfileAccountingExportsKontoMappingsSalesRevenueExemptMax:()=>Kre,reviewSloveniaYearlyNormiraniReportResponseProfileAccountingExportsKontoMappingsSalesRevenueReverseChargeMax:()=>Jre,reviewSloveniaYearlyNormiraniReportResponseProfileAccountingExportsKontoMappingsSalesRevenueThirdCountryGoodsMax:()=>Zre,reviewSloveniaYearlyNormiraniReportResponseProfileAccountingExportsKontoMappingsSalesRevenueThirdCountryServicesMax:()=>Xre,reviewSloveniaYearlyNormiraniReportResponseProfileAccountingExportsKontoMappingsSalesVat22Max:()=>Ure,reviewSloveniaYearlyNormiraniReportResponseProfileAccountingExportsKontoMappingsSalesVat5Max:()=>qre,reviewSloveniaYearlyNormiraniReportResponseProfileAccountingExportsKontoMappingsSalesVat95Max:()=>jre,reviewSloveniaYearlyNormiraniReportResponseProfileYearlyReportingDefaultForeignTaxCreditAmountMin:()=>Nre,reviewSloveniaYearlyNormiraniReportResponseProfileYearlyReportingDefaultWithholdingTaxAmountMin:()=>Bre,reviewSloveniaYearlyNormiraniReportResponseYearMax:()=>kre,reviewSloveniaYearlyNormiraniReportResponseYearMin:()=>Tre,updateSloveniaTaxProfileBodyAccountingExportsKontoMappingsPayablesMax:()=>Mse,updateSloveniaTaxProfileBodyAccountingExportsKontoMappingsPurchaseExpense22Max:()=>Kse,updateSloveniaTaxProfileBodyAccountingExportsKontoMappingsPurchaseExpense5Max:()=>Qse,updateSloveniaTaxProfileBodyAccountingExportsKontoMappingsPurchaseExpense95Max:()=>$se,updateSloveniaTaxProfileBodyAccountingExportsKontoMappingsPurchaseExpenseEuGoodsMax:()=>Zse,updateSloveniaTaxProfileBodyAccountingExportsKontoMappingsPurchaseExpenseEuServicesMax:()=>Xse,updateSloveniaTaxProfileBodyAccountingExportsKontoMappingsPurchaseExpenseExemptMax:()=>Jse,updateSloveniaTaxProfileBodyAccountingExportsKontoMappingsPurchaseExpenseReverseChargeMax:()=>ere,updateSloveniaTaxProfileBodyAccountingExportsKontoMappingsPurchaseExpenseThirdCountryGoodsMax:()=>tre,updateSloveniaTaxProfileBodyAccountingExportsKontoMappingsPurchaseExpenseThirdCountryServicesMax:()=>ore,updateSloveniaTaxProfileBodyAccountingExportsKontoMappingsPurchaseVatRecoverable22Max:()=>Nse,updateSloveniaTaxProfileBodyAccountingExportsKontoMappingsPurchaseVatRecoverable5Max:()=>Fse,updateSloveniaTaxProfileBodyAccountingExportsKontoMappingsPurchaseVatRecoverable95Max:()=>Ose,updateSloveniaTaxProfileBodyAccountingExportsKontoMappingsReceivablesMax:()=>Ase,updateSloveniaTaxProfileBodyAccountingExportsKontoMappingsSalesRevenue22Max:()=>Use,updateSloveniaTaxProfileBodyAccountingExportsKontoMappingsSalesRevenue5Max:()=>qse,updateSloveniaTaxProfileBodyAccountingExportsKontoMappingsSalesRevenue95Max:()=>jse,updateSloveniaTaxProfileBodyAccountingExportsKontoMappingsSalesRevenueEuGoodsMax:()=>Gse,updateSloveniaTaxProfileBodyAccountingExportsKontoMappingsSalesRevenueEuServicesMax:()=>Vse,updateSloveniaTaxProfileBodyAccountingExportsKontoMappingsSalesRevenueExemptMax:()=>Wse,updateSloveniaTaxProfileBodyAccountingExportsKontoMappingsSalesRevenueReverseChargeMax:()=>Lse,updateSloveniaTaxProfileBodyAccountingExportsKontoMappingsSalesRevenueThirdCountryGoodsMax:()=>Hse,updateSloveniaTaxProfileBodyAccountingExportsKontoMappingsSalesRevenueThirdCountryServicesMax:()=>Yse,updateSloveniaTaxProfileBodyAccountingExportsKontoMappingsSalesVat22Max:()=>Tse,updateSloveniaTaxProfileBodyAccountingExportsKontoMappingsSalesVat5Max:()=>Bse,updateSloveniaTaxProfileBodyAccountingExportsKontoMappingsSalesVat95Max:()=>kse,updateSloveniaTaxProfileBodyYearlyReportingDefaultForeignTaxCreditAmountMin:()=>Cse,updateSloveniaTaxProfileBodyYearlyReportingDefaultWithholdingTaxAmountMin:()=>wse,updateSloveniaTaxProfileResponseAccountingExportsKontoMappingsPayablesMax:()=>ire,updateSloveniaTaxProfileResponseAccountingExportsKontoMappingsPurchaseExpense22Max:()=>fre,updateSloveniaTaxProfileResponseAccountingExportsKontoMappingsPurchaseExpense5Max:()=>Ire,updateSloveniaTaxProfileResponseAccountingExportsKontoMappingsPurchaseExpense95Max:()=>Rre,updateSloveniaTaxProfileResponseAccountingExportsKontoMappingsPurchaseExpenseEuGoodsMax:()=>Sre,updateSloveniaTaxProfileResponseAccountingExportsKontoMappingsPurchaseExpenseEuServicesMax:()=>Dre,updateSloveniaTaxProfileResponseAccountingExportsKontoMappingsPurchaseExpenseExemptMax:()=>Ere,updateSloveniaTaxProfileResponseAccountingExportsKontoMappingsPurchaseExpenseReverseChargeMax:()=>Pre,updateSloveniaTaxProfileResponseAccountingExportsKontoMappingsPurchaseExpenseThirdCountryGoodsMax:()=>wre,updateSloveniaTaxProfileResponseAccountingExportsKontoMappingsPurchaseExpenseThirdCountryServicesMax:()=>Cre,updateSloveniaTaxProfileResponseAccountingExportsKontoMappingsPurchaseVatRecoverable22Max:()=>lre,updateSloveniaTaxProfileResponseAccountingExportsKontoMappingsPurchaseVatRecoverable5Max:()=>pre,updateSloveniaTaxProfileResponseAccountingExportsKontoMappingsPurchaseVatRecoverable95Max:()=>ure,updateSloveniaTaxProfileResponseAccountingExportsKontoMappingsReceivablesMax:()=>rre,updateSloveniaTaxProfileResponseAccountingExportsKontoMappingsSalesRevenue22Max:()=>mre,updateSloveniaTaxProfileResponseAccountingExportsKontoMappingsSalesRevenue5Max:()=>yre,updateSloveniaTaxProfileResponseAccountingExportsKontoMappingsSalesRevenue95Max:()=>gre,updateSloveniaTaxProfileResponseAccountingExportsKontoMappingsSalesRevenueEuGoodsMax:()=>bre,updateSloveniaTaxProfileResponseAccountingExportsKontoMappingsSalesRevenueEuServicesMax:()=>xre,updateSloveniaTaxProfileResponseAccountingExportsKontoMappingsSalesRevenueExemptMax:()=>hre,updateSloveniaTaxProfileResponseAccountingExportsKontoMappingsSalesRevenueReverseChargeMax:()=>zre,updateSloveniaTaxProfileResponseAccountingExportsKontoMappingsSalesRevenueThirdCountryGoodsMax:()=>_re,updateSloveniaTaxProfileResponseAccountingExportsKontoMappingsSalesRevenueThirdCountryServicesMax:()=>vre,updateSloveniaTaxProfileResponseAccountingExportsKontoMappingsSalesVat22Max:()=>are,updateSloveniaTaxProfileResponseAccountingExportsKontoMappingsSalesVat5Max:()=>cre,updateSloveniaTaxProfileResponseAccountingExportsKontoMappingsSalesVat95Max:()=>dre,updateSloveniaTaxProfileResponseYearlyReportingDefaultForeignTaxCreditAmountMin:()=>sre,updateSloveniaTaxProfileResponseYearlyReportingDefaultWithholdingTaxAmountMin:()=>nre});var Zne=/^\d{4}$/,Xne=/^(1[0-2]|[1-9])$/,ese=/^[1-4]$/,lEe=e.object({year:e.string().regex(Zne).describe("Year for KIR export (e.g., 2025)"),month:e.string().regex(Xne).optional().describe("Month for monthly export (1-12). Cannot be used with quarter."),quarter:e.string().regex(ese).optional().describe("Quarter for quarterly export (1-4). Cannot be used with month.")}),uEe=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),pEe=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),tse=0,ose=0,nse=8,sse=8,rse=8,ise=8,ase=8,dse=8,cse=8,lse=8,use=8,pse=8,mse=8,gse=8,yse=8,hse=8,bse=8,xse=8,zse=8,_se=8,vse=8,fse=8,Rse=8,Ise=8,Ese=8,Sse=8,Dse=8,Pse=8,mEe=e.object({business_form:e.union([e.literal("sp"),e.literal("doo"),e.literal("dno"),e.literal("club"),e.literal(null)]).nullable().describe("Canonical Slovenian legal form for the entity."),income_tax_regime:e.union([e.literal("normirani"),e.literal("dejanski"),e.literal(null)]).nullable().describe("Income tax regime used by the Slovenian entity."),vat_profile:e.union([e.literal("standard"),e.literal("special_vat_identified"),e.literal("non_vat_subject"),e.literal(null)]).nullable().describe("Slovenia-specific VAT subject subtype."),tax_residency:e.union([e.literal("resident"),e.literal("non_resident"),e.literal(null)]).nullable().describe("Tax residency status for Slovenian yearly reporting."),yearly_reporting:e.object({activity_code:e.string().nullable().describe("Primary SKD activity code."),registration_number:e.string().nullable().describe("Optional registration number used in the filing."),accounting_type:e.union([e.literal("records"),e.literal("single_entry"),e.literal("double_entry"),e.literal(null)]).nullable().describe("Accounting / records mode used in the filing."),normiranec_insurance_basis:e.union([e.literal("full_time_self_employed"),e.literal("other"),e.literal(null)]).nullable().describe("Insurance basis used by normirani rules."),default_withholding_tax_amount:e.number().min(tse).nullable().describe("Persisted default withholding tax amount for yearly reviews."),default_foreign_tax_credit_amount:e.number().min(ose).nullable().describe("Persisted default foreign tax credit amount for yearly reviews.")}),accounting_exports:e.object({preferred_format:e.union([e.literal("vod_xml"),e.literal("vasco_xml"),e.literal("minimax_xml"),e.literal(null)]).nullable().describe("Preferred Slovenian accounting export format."),konto_mappings:e.object({receivables:e.string().max(nse).nullish(),payables:e.string().max(sse).nullish(),sales_vat_22:e.string().max(rse).nullish(),sales_vat_95:e.string().max(ise).nullish(),sales_vat_5:e.string().max(ase).nullish(),purchase_vat_recoverable_22:e.string().max(dse).nullish(),purchase_vat_recoverable_95:e.string().max(cse).nullish(),purchase_vat_recoverable_5:e.string().max(lse).nullish(),sales_revenue_22:e.string().max(use).nullish(),sales_revenue_95:e.string().max(pse).nullish(),sales_revenue_5:e.string().max(mse).nullish(),sales_revenue_exempt:e.string().max(gse).nullish(),sales_revenue_eu_goods:e.string().max(yse).nullish(),sales_revenue_eu_services:e.string().max(hse).nullish(),sales_revenue_reverse_charge:e.string().max(bse).nullish(),sales_revenue_third_country_goods:e.string().max(xse).nullish(),sales_revenue_third_country_services:e.string().max(zse).nullish(),purchase_expense_22:e.string().max(_se).nullish(),purchase_expense_95:e.string().max(vse).nullish(),purchase_expense_5:e.string().max(fse).nullish(),purchase_expense_exempt:e.string().max(Rse).nullish(),purchase_expense_eu_goods:e.string().max(Ise).nullish(),purchase_expense_eu_services:e.string().max(Ese).nullish(),purchase_expense_reverse_charge:e.string().max(Sse).nullish(),purchase_expense_third_country_goods:e.string().max(Dse).nullish(),purchase_expense_third_country_services:e.string().max(Pse).nullish()}).describe("Normalized semantic konto mappings shared by Slovenian accounting exports.")}),business_form_source:e.enum(["stored","registry","unknown"]),inferred_business_form:e.union([e.literal("sp"),e.literal("doo"),e.literal("dno"),e.literal("club"),e.literal(null)]).nullable().describe("Canonical Slovenian legal form for the entity."),supported_exports:e.object({yearly_normirani:e.boolean(),vod_xml:e.boolean(),vasco_xml:e.boolean(),minimax_xml:e.boolean()}),unsupported_reason:e.string().nullable()}),gEe=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),wse=0,Cse=0,Ase=8,Mse=8,Tse=8,kse=8,Bse=8,Nse=8,Ose=8,Fse=8,Use=8,jse=8,qse=8,Wse=8,Gse=8,Vse=8,Lse=8,Hse=8,Yse=8,Kse=8,$se=8,Qse=8,Jse=8,Zse=8,Xse=8,ere=8,tre=8,ore=8,yEe=e.object({business_form:e.union([e.literal("sp"),e.literal("doo"),e.literal("dno"),e.literal("club"),e.literal(null)]).nullish().describe("Canonical Slovenian legal form for the entity."),income_tax_regime:e.union([e.literal("normirani"),e.literal("dejanski"),e.literal(null)]).nullish().describe("Income tax regime used by the Slovenian entity."),vat_profile:e.union([e.literal("standard"),e.literal("special_vat_identified"),e.literal("non_vat_subject"),e.literal(null)]).nullish().describe("Slovenia-specific VAT subject subtype."),tax_residency:e.union([e.literal("resident"),e.literal("non_resident"),e.literal(null)]).nullish().describe("Tax residency status for Slovenian yearly reporting."),yearly_reporting:e.object({activity_code:e.string().nullish(),registration_number:e.string().nullish(),accounting_type:e.union([e.literal("records"),e.literal("single_entry"),e.literal("double_entry"),e.literal(null)]).nullish().describe("Accounting or records mode used for the yearly filing."),normiranec_insurance_basis:e.union([e.literal("full_time_self_employed"),e.literal("other"),e.literal(null)]).nullish().describe("Insurance basis used to determine the applicable normirani rules."),default_withholding_tax_amount:e.number().min(wse).nullish().describe("Monetary amount in EUR."),default_foreign_tax_credit_amount:e.number().min(Cse).nullish().describe("Monetary amount in EUR.")}).nullish(),accounting_exports:e.object({preferred_format:e.union([e.literal("vod_xml"),e.literal("vasco_xml"),e.literal("minimax_xml"),e.literal(null)]).nullish().describe("Stored preferred export format for Slovenian accounting handoff."),konto_mappings:e.object({receivables:e.string().max(Ase).nullish(),payables:e.string().max(Mse).nullish(),sales_vat_22:e.string().max(Tse).nullish(),sales_vat_95:e.string().max(kse).nullish(),sales_vat_5:e.string().max(Bse).nullish(),purchase_vat_recoverable_22:e.string().max(Nse).nullish(),purchase_vat_recoverable_95:e.string().max(Ose).nullish(),purchase_vat_recoverable_5:e.string().max(Fse).nullish(),sales_revenue_22:e.string().max(Use).nullish(),sales_revenue_95:e.string().max(jse).nullish(),sales_revenue_5:e.string().max(qse).nullish(),sales_revenue_exempt:e.string().max(Wse).nullish(),sales_revenue_eu_goods:e.string().max(Gse).nullish(),sales_revenue_eu_services:e.string().max(Vse).nullish(),sales_revenue_reverse_charge:e.string().max(Lse).nullish(),sales_revenue_third_country_goods:e.string().max(Hse).nullish(),sales_revenue_third_country_services:e.string().max(Yse).nullish(),purchase_expense_22:e.string().max(Kse).nullish(),purchase_expense_95:e.string().max($se).nullish(),purchase_expense_5:e.string().max(Qse).nullish(),purchase_expense_exempt:e.string().max(Jse).nullish(),purchase_expense_eu_goods:e.string().max(Zse).nullish(),purchase_expense_eu_services:e.string().max(Xse).nullish(),purchase_expense_reverse_charge:e.string().max(ere).nullish(),purchase_expense_third_country_goods:e.string().max(tre).nullish(),purchase_expense_third_country_services:e.string().max(ore).nullish()}).nullish()}).nullish()}),nre=0,sre=0,rre=8,ire=8,are=8,dre=8,cre=8,lre=8,ure=8,pre=8,mre=8,gre=8,yre=8,hre=8,bre=8,xre=8,zre=8,_re=8,vre=8,fre=8,Rre=8,Ire=8,Ere=8,Sre=8,Dre=8,Pre=8,wre=8,Cre=8,hEe=e.object({business_form:e.union([e.literal("sp"),e.literal("doo"),e.literal("dno"),e.literal("club"),e.literal(null)]).nullable().describe("Canonical Slovenian legal form for the entity."),income_tax_regime:e.union([e.literal("normirani"),e.literal("dejanski"),e.literal(null)]).nullable().describe("Income tax regime used by the Slovenian entity."),vat_profile:e.union([e.literal("standard"),e.literal("special_vat_identified"),e.literal("non_vat_subject"),e.literal(null)]).nullable().describe("Slovenia-specific VAT subject subtype."),tax_residency:e.union([e.literal("resident"),e.literal("non_resident"),e.literal(null)]).nullable().describe("Tax residency status for Slovenian yearly reporting."),yearly_reporting:e.object({activity_code:e.string().nullable().describe("Primary SKD activity code."),registration_number:e.string().nullable().describe("Optional registration number used in the filing."),accounting_type:e.union([e.literal("records"),e.literal("single_entry"),e.literal("double_entry"),e.literal(null)]).nullable().describe("Accounting / records mode used in the filing."),normiranec_insurance_basis:e.union([e.literal("full_time_self_employed"),e.literal("other"),e.literal(null)]).nullable().describe("Insurance basis used by normirani rules."),default_withholding_tax_amount:e.number().min(nre).nullable().describe("Persisted default withholding tax amount for yearly reviews."),default_foreign_tax_credit_amount:e.number().min(sre).nullable().describe("Persisted default foreign tax credit amount for yearly reviews.")}),accounting_exports:e.object({preferred_format:e.union([e.literal("vod_xml"),e.literal("vasco_xml"),e.literal("minimax_xml"),e.literal(null)]).nullable().describe("Preferred Slovenian accounting export format."),konto_mappings:e.object({receivables:e.string().max(rre).nullish(),payables:e.string().max(ire).nullish(),sales_vat_22:e.string().max(are).nullish(),sales_vat_95:e.string().max(dre).nullish(),sales_vat_5:e.string().max(cre).nullish(),purchase_vat_recoverable_22:e.string().max(lre).nullish(),purchase_vat_recoverable_95:e.string().max(ure).nullish(),purchase_vat_recoverable_5:e.string().max(pre).nullish(),sales_revenue_22:e.string().max(mre).nullish(),sales_revenue_95:e.string().max(gre).nullish(),sales_revenue_5:e.string().max(yre).nullish(),sales_revenue_exempt:e.string().max(hre).nullish(),sales_revenue_eu_goods:e.string().max(bre).nullish(),sales_revenue_eu_services:e.string().max(xre).nullish(),sales_revenue_reverse_charge:e.string().max(zre).nullish(),sales_revenue_third_country_goods:e.string().max(_re).nullish(),sales_revenue_third_country_services:e.string().max(vre).nullish(),purchase_expense_22:e.string().max(fre).nullish(),purchase_expense_95:e.string().max(Rre).nullish(),purchase_expense_5:e.string().max(Ire).nullish(),purchase_expense_exempt:e.string().max(Ere).nullish(),purchase_expense_eu_goods:e.string().max(Sre).nullish(),purchase_expense_eu_services:e.string().max(Dre).nullish(),purchase_expense_reverse_charge:e.string().max(Pre).nullish(),purchase_expense_third_country_goods:e.string().max(wre).nullish(),purchase_expense_third_country_services:e.string().max(Cre).nullish()}).describe("Normalized semantic konto mappings shared by Slovenian accounting exports.")}),business_form_source:e.enum(["stored","registry","unknown"]),inferred_business_form:e.union([e.literal("sp"),e.literal("doo"),e.literal("dno"),e.literal("club"),e.literal(null)]).nullable().describe("Canonical Slovenian legal form for the entity."),supported_exports:e.object({yearly_normirani:e.boolean(),vod_xml:e.boolean(),vasco_xml:e.boolean(),minimax_xml:e.boolean()}),unsupported_reason:e.string().nullable()}),bEe=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),Are=2025,Mre=2100,xEe=e.object({year:e.number().min(Are).max(Mre).describe("Tax year for the yearly Slovenia eDavki filing.")}),Tre=2025,kre=2100,Bre=0,Nre=0,Ore=8,Fre=8,Ure=8,jre=8,qre=8,Wre=8,Gre=8,Vre=8,Lre=8,Hre=8,Yre=8,Kre=8,$re=8,Qre=8,Jre=8,Zre=8,Xre=8,eie=8,tie=8,oie=8,nie=8,sie=8,rie=8,iie=8,aie=8,die=8,cie=0,lie=0,uie=0,pie=0,mie=0,zEe=e.object({entity_id:e.string(),year:e.number().min(Tre).max(kre).describe("Tax year for the yearly Slovenia eDavki filing."),filing_kind:e.enum(["regular_annual"]),profile:e.object({business_form:e.union([e.literal("sp"),e.literal("doo"),e.literal("dno"),e.literal("club"),e.literal(null)]).nullable().describe("Canonical Slovenian legal form for the entity."),income_tax_regime:e.union([e.literal("normirani"),e.literal("dejanski"),e.literal(null)]).nullable().describe("Income tax regime used by the Slovenian entity."),vat_profile:e.union([e.literal("standard"),e.literal("special_vat_identified"),e.literal("non_vat_subject"),e.literal(null)]).nullable().describe("Slovenia-specific VAT subject subtype."),tax_residency:e.union([e.literal("resident"),e.literal("non_resident"),e.literal(null)]).nullable().describe("Tax residency status for Slovenian yearly reporting."),yearly_reporting:e.object({activity_code:e.string().nullable().describe("Primary SKD activity code."),registration_number:e.string().nullable().describe("Optional registration number used in the filing."),accounting_type:e.union([e.literal("records"),e.literal("single_entry"),e.literal("double_entry"),e.literal(null)]).nullable().describe("Accounting / records mode used in the filing."),normiranec_insurance_basis:e.union([e.literal("full_time_self_employed"),e.literal("other"),e.literal(null)]).nullable().describe("Insurance basis used by normirani rules."),default_withholding_tax_amount:e.number().min(Bre).nullable().describe("Persisted default withholding tax amount for yearly reviews."),default_foreign_tax_credit_amount:e.number().min(Nre).nullable().describe("Persisted default foreign tax credit amount for yearly reviews.")}),accounting_exports:e.object({preferred_format:e.union([e.literal("vod_xml"),e.literal("vasco_xml"),e.literal("minimax_xml"),e.literal(null)]).nullable().describe("Preferred Slovenian accounting export format."),konto_mappings:e.object({receivables:e.string().max(Ore).nullish(),payables:e.string().max(Fre).nullish(),sales_vat_22:e.string().max(Ure).nullish(),sales_vat_95:e.string().max(jre).nullish(),sales_vat_5:e.string().max(qre).nullish(),purchase_vat_recoverable_22:e.string().max(Wre).nullish(),purchase_vat_recoverable_95:e.string().max(Gre).nullish(),purchase_vat_recoverable_5:e.string().max(Vre).nullish(),sales_revenue_22:e.string().max(Lre).nullish(),sales_revenue_95:e.string().max(Hre).nullish(),sales_revenue_5:e.string().max(Yre).nullish(),sales_revenue_exempt:e.string().max(Kre).nullish(),sales_revenue_eu_goods:e.string().max($re).nullish(),sales_revenue_eu_services:e.string().max(Qre).nullish(),sales_revenue_reverse_charge:e.string().max(Jre).nullish(),sales_revenue_third_country_goods:e.string().max(Zre).nullish(),sales_revenue_third_country_services:e.string().max(Xre).nullish(),purchase_expense_22:e.string().max(eie).nullish(),purchase_expense_95:e.string().max(tie).nullish(),purchase_expense_5:e.string().max(oie).nullish(),purchase_expense_exempt:e.string().max(nie).nullish(),purchase_expense_eu_goods:e.string().max(sie).nullish(),purchase_expense_eu_services:e.string().max(rie).nullish(),purchase_expense_reverse_charge:e.string().max(iie).nullish(),purchase_expense_third_country_goods:e.string().max(aie).nullish(),purchase_expense_third_country_services:e.string().max(die).nullish()}).describe("Normalized semantic konto mappings shared by Slovenian accounting exports.")}),business_form_source:e.enum(["stored","registry","unknown"]),inferred_business_form:e.union([e.literal("sp"),e.literal("doo"),e.literal("dno"),e.literal("club"),e.literal(null)]).nullable().describe("Canonical Slovenian legal form for the entity."),supported_exports:e.object({yearly_normirani:e.boolean(),vod_xml:e.boolean(),vasco_xml:e.boolean(),minimax_xml:e.boolean()}),unsupported_reason:e.string().nullable()}),auto_values:e.object({total_invoice_revenue:e.number(),total_credit_note_reduction:e.number(),computed_revenue:e.number(),adjusted_revenue:e.number(),normative_expense_rate:e.number(),normative_expenses:e.number(),tax_base:e.number(),income_tax_rate:e.number(),income_tax_amount:e.number(),advance_tax_amount:e.number(),monthly_installment_amount:e.number(),quarterly_installment_amount:e.number()}),manual_values:e.object({withholding_tax_amount:e.number().min(cie).describe("Monetary amount in EUR."),foreign_tax_credit_amount:e.number().min(lie).describe("Monetary amount in EUR."),prior_advance_income_tax_amount:e.number().min(uie).describe("Monetary amount in EUR."),revenue_adjustment_decrease:e.number().min(pie).describe("Monetary amount in EUR."),revenue_adjustment_increase:e.number().min(mie).describe("Monetary amount in EUR.")}),derived_flags:e.object({has_foreign_customers:e.boolean(),has_foreign_tax_numbers:e.boolean(),has_non_eur_documents:e.boolean()}),warnings:e.array(e.object({code:e.string(),message:e.string(),severity:e.enum(["info","warning"])})),issue_details:e.array(e.object({code:e.string(),title:e.string(),summary:e.string(),explanation:e.string(),action:e.string().nullable(),severity:e.enum(["info","warning"]),official_sources:e.array(e.object({label:e.string(),url:e.url(),issuer:e.enum(["FURS","PISRS"])})),affected_documents:e.array(e.object({id:e.string(),type:e.enum(["invoice","credit_note"]),number:e.string(),date:e.string(),customer_name:e.string().nullable(),customer_country_code:e.string().nullable(),customer_tax_number:e.string().nullable(),currency_code:e.string(),total:e.number(),total_converted:e.number().nullable(),reason:e.string(),document_path:e.string()}))})),rule_summary:e.object({normative_expense_rule:e.string(),income_tax_rule:e.string(),advance_rule:e.string()})}),_Ee=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),gie=2025,yie=2100,hie=0,bie=0,xie=0,zie=0,_ie=0,vEe=e.object({year:e.number().min(gie).max(yie).describe("Tax year for the yearly Slovenia eDavki filing."),manual_values:e.object({withholding_tax_amount:e.number().min(hie).describe("Monetary amount in EUR."),foreign_tax_credit_amount:e.number().min(bie).describe("Monetary amount in EUR."),prior_advance_income_tax_amount:e.number().min(xie).describe("Monetary amount in EUR."),revenue_adjustment_decrease:e.number().min(zie).describe("Monetary amount in EUR."),revenue_adjustment_increase:e.number().min(_ie).describe("Monetary amount in EUR.")})}),fEe=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),REe=e.object({date_from:e.iso.date().describe("Inclusive document date in YYYY-MM-DD format."),date_to:e.iso.date().describe("Inclusive document date in YYYY-MM-DD format.")});var Xe={};j(Xe,{CreateTaxBody:()=>EEe,CreateTaxHeader:()=>IEe,DeleteTaxHeader:()=>FEe,DeleteTaxParams:()=>OEe,GetTaxesHeader:()=>DEe,GetTaxesQueryParams:()=>SEe,GetTaxesResponse:()=>PEe,PermanentDeleteTaxHeader:()=>GEe,PermanentDeleteTaxParams:()=>WEe,ReplaceTaxBody:()=>BEe,ReplaceTaxHeader:()=>kEe,ReplaceTaxParams:()=>TEe,ReplaceTaxResponse:()=>NEe,RestoreTaxHeader:()=>jEe,RestoreTaxParams:()=>UEe,RestoreTaxResponse:()=>qEe,UpdateTaxBody:()=>AEe,UpdateTaxHeader:()=>CEe,UpdateTaxParams:()=>wEe,UpdateTaxResponse:()=>MEe,createTaxBodyNameMax:()=>vie,createTaxBodyTaxRatesItemRateMax:()=>Rie,createTaxBodyTaxRatesItemRateMin:()=>fie,deleteTaxPathIdRegExp:()=>Kie,getTaxesQueryLimitDefault:()=>Iie,getTaxesQueryLimitMax:()=>Eie,getTaxesResponseDataItemOneEntityIdMax:()=>Cie,getTaxesResponseDataItemOneIdMax:()=>Sie,getTaxesResponseDataItemOneNameMax:()=>Die,getTaxesResponseDataItemOneTaxRatesItemRateMax:()=>wie,getTaxesResponseDataItemOneTaxRatesItemRateMin:()=>Pie,permanentDeleteTaxPathIdRegExp:()=>tae,replaceTaxBodyNameMax:()=>jie,replaceTaxBodyTaxRatesItemRateMax:()=>Wie,replaceTaxBodyTaxRatesItemRateMin:()=>qie,replaceTaxPathIdRegExp:()=>Uie,replaceTaxResponseOneEntityIdMax:()=>Yie,replaceTaxResponseOneIdMax:()=>Gie,replaceTaxResponseOneNameMax:()=>Vie,replaceTaxResponseOneTaxRatesItemRateMax:()=>Hie,replaceTaxResponseOneTaxRatesItemRateMin:()=>Lie,restoreTaxPathIdRegExp:()=>$ie,restoreTaxResponseOneEntityIdMax:()=>eae,restoreTaxResponseOneIdMax:()=>Qie,restoreTaxResponseOneNameMax:()=>Jie,restoreTaxResponseOneTaxRatesItemRateMax:()=>Xie,restoreTaxResponseOneTaxRatesItemRateMin:()=>Zie,updateTaxBodyTaxRatesItemRateMax:()=>Tie,updateTaxBodyTaxRatesItemRateMin:()=>Mie,updateTaxPathIdRegExp:()=>Aie,updateTaxResponseOneEntityIdMax:()=>Fie,updateTaxResponseOneIdMax:()=>kie,updateTaxResponseOneNameMax:()=>Bie,updateTaxResponseOneTaxRatesItemRateMax:()=>Oie,updateTaxResponseOneTaxRatesItemRateMin:()=>Nie});var IEe=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),vie=100,fie=0,Rie=100,EEe=e.object({name:e.string().max(vie).optional(),tax_rates:e.array(e.object({rate:e.number().min(fie).max(Rie),valid_from:e.iso.datetime({}).nullish()})).min(1),is_default:e.boolean().optional().describe("Whether this is the default tax for new documents. Only one tax per entity can be default."),classification:e.string().nullish().describe('Classification for API tax lookups (e.g., "standard", "reduced", "zero"). Unique per entity. Can be used instead of rate when creating documents.'),pt_exemption_code:e.string().nullish().describe("Portugal exemption code for 0% / exempt / non-subject taxes."),pt_exemption_reason:e.string().nullish().describe("Portugal exemption reason associated with pt_exemption_code."),metadata:e.record(e.string(),e.string()).nullish().describe("Custom key-value data for your own use. Store any JSON object up to 50 properties. Values must be strings up to 250 characters. Useful for storing external IDs, tags, or integration data.")}),Iie=10,Eie=100,SEe=e.object({limit:e.number().min(1).max(Eie).default(Iie).describe("Number of results per request."),next_cursor:e.string().optional().describe("Opaque cursor to fetch the next page of results. Reuse only with the same effective ordering. Use the value from pagination.next_cursor in the previous response."),prev_cursor:e.string().optional().describe("Opaque cursor to fetch the previous page of results. Reuse only with the same effective ordering. Use the value from pagination.prev_cursor in the previous response."),include_total_count:e.boolean().optional().describe("Whether to include the total count of items in `pagination.total`.\nDefault is `true`.\nWhen `false`, `pagination.total` returns -1 for better performance."),order_by:e.union([e.enum(["id","name","created_at","updated_at","-id","-name","-created_at","-updated_at"]),e.array(e.enum(["id","name","created_at","updated_at","-id","-name","-created_at","-updated_at"]))]).optional().describe("Sort by one field or provide a repeated array for multi-column ordering. Prefix a field with `-` for descending order. When paginating, reuse cursors only with the same effective ordering."),query:e.string().optional().describe('JSON query object for filtering results. Supports MongoDB-style operators.\n\n**Supported operators:**\n- `equals` or direct value - Exact match (default)\n- `gte` - Greater than or equal\n- `lte` - Less than or equal\n- `gt` - Greater than\n- `lt` - Less than\n- `in` - Value in array\n- `notIn` - Value not in array\n- `contains` - String contains (case-insensitive)\n- `startsWith` - String starts with\n- `endsWith` - String ends with\n- `between` - Value between two numbers/dates [min, max]\n\n**Allowed fields:** id, name, is_default, created_at, updated_at\n\n**Examples:**\n- `{"total": {"gte": 1000}}` - Invoices over 1000\n- `{"customer.name": {"contains": "Acme"}}` - Customer name contains "Acme"\n- `{"date": {"between": ["2025-01-01", "2025-12-31"]}}` - Date range'),search:e.string().optional().describe(`Full-text search query to filter results across multiple fields.
|
|
230
|
+
Searches are case-insensitive and match partial strings.
|
|
231
|
+
Searches across all text fields including names, descriptions, addresses, and metadata values.`),deleted:e.boolean().optional().describe("When true, returns only soft-deleted (trashed) items. Default false excludes deleted items.")}),DEe=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),Sie=36,Die=100,Pie=0,wie=100,Cie=36,PEe=e.object({data:e.array(e.object({id:e.string().max(Sie),name:e.string().max(Die),tax_rates:e.array(e.object({rate:e.number().min(Pie).max(wie),valid_from:e.iso.datetime({})})).describe("Tax rate history"),is_default:e.boolean().describe("Whether this is the default tax for new documents. Only one tax per entity can be default."),classification:e.string().nullish().describe('Classification for API tax lookups (e.g., "standard", "reduced", "zero"). Unique per entity. Can be used instead of rate when creating documents.'),pt_exemption_code:e.string().nullish().describe("Portugal exemption code for 0% / exempt / non-subject taxes."),pt_exemption_reason:e.string().nullish().describe("Portugal exemption reason associated with pt_exemption_code."),entity_id:e.string().max(Cie),metadata:e.union([e.string(),e.number(),e.boolean(),e.null(),e.record(e.string(),e.unknown()),e.array(e.unknown())]),deleted_at:e.iso.datetime({}).nullish(),created_at:e.iso.datetime({}),updated_at:e.iso.datetime({})}).describe("Tax definition with rate history").and(e.looseObject({})).describe("Tax with one or more rates, each with a valid_from date for historical rate tracking")),pagination:e.object({total:e.number().describe("Total number of items available in the collection"),next_cursor:e.string().nullable().describe("Opaque cursor for fetching the next page. It encodes the resolved sort tuple for the current result set, so reuse it only with the same effective ordering. Null if no more results are available."),prev_cursor:e.string().nullable().describe("Opaque cursor for fetching the previous page. It encodes the resolved sort tuple for the current result set, so reuse it only with the same effective ordering. Null if at the first page."),has_more:e.boolean().describe("Indicates whether more results are available after the current page")}).describe("Pagination metadata including cursors and result counts")}),Aie=/^[a-z]{3,4}_[0-9a-f]{24}$/,wEe=e.object({id:e.stringFormat("resource-id",Aie).describe("Unique resource identifier")}),CEe=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),Mie=0,Tie=100,AEe=e.object({tax_rates:e.array(e.object({rate:e.number().min(Mie).max(Tie),valid_from:e.iso.datetime({}).nullish()})).min(1),is_default:e.boolean().optional().describe("Set to true to make this the default tax (unsets other defaults)")}),kie=36,Bie=100,Nie=0,Oie=100,Fie=36,MEe=e.object({id:e.string().max(kie),name:e.string().max(Bie),tax_rates:e.array(e.object({rate:e.number().min(Nie).max(Oie),valid_from:e.iso.datetime({})})).describe("Tax rate history"),is_default:e.boolean().describe("Whether this is the default tax for new documents. Only one tax per entity can be default."),classification:e.string().nullish().describe('Classification for API tax lookups (e.g., "standard", "reduced", "zero"). Unique per entity. Can be used instead of rate when creating documents.'),pt_exemption_code:e.string().nullish().describe("Portugal exemption code for 0% / exempt / non-subject taxes."),pt_exemption_reason:e.string().nullish().describe("Portugal exemption reason associated with pt_exemption_code."),entity_id:e.string().max(Fie),metadata:e.union([e.string(),e.number(),e.boolean(),e.null(),e.record(e.string(),e.unknown()),e.array(e.unknown())]),deleted_at:e.iso.datetime({}).nullish(),created_at:e.iso.datetime({}),updated_at:e.iso.datetime({})}).describe("Tax definition with rate history").and(e.looseObject({})).describe("Tax with one or more rates, each with a valid_from date for historical rate tracking"),Uie=/^[a-z]{3,4}_[0-9a-f]{24}$/,TEe=e.object({id:e.stringFormat("resource-id",Uie).describe("Unique resource identifier")}),kEe=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),jie=100,qie=0,Wie=100,BEe=e.object({name:e.string().max(jie).optional(),tax_rates:e.array(e.object({rate:e.number().min(qie).max(Wie),valid_from:e.iso.datetime({}).nullish()})).min(1),is_default:e.boolean().optional().describe("Whether this is the default tax for new documents. Only one tax per entity can be default."),classification:e.string().nullish().describe('Classification for API tax lookups (e.g., "standard", "reduced", "zero"). Unique per entity. Can be used instead of rate when creating documents.'),pt_exemption_code:e.string().nullish().describe("Portugal exemption code for 0% / exempt / non-subject taxes."),pt_exemption_reason:e.string().nullish().describe("Portugal exemption reason associated with pt_exemption_code."),metadata:e.record(e.string(),e.string()).nullish().describe("Custom key-value data for your own use. Store any JSON object up to 50 properties. Values must be strings up to 250 characters. Useful for storing external IDs, tags, or integration data.")}),Gie=36,Vie=100,Lie=0,Hie=100,Yie=36,NEe=e.object({id:e.string().max(Gie),name:e.string().max(Vie),tax_rates:e.array(e.object({rate:e.number().min(Lie).max(Hie),valid_from:e.iso.datetime({})})).describe("Tax rate history"),is_default:e.boolean().describe("Whether this is the default tax for new documents. Only one tax per entity can be default."),classification:e.string().nullish().describe('Classification for API tax lookups (e.g., "standard", "reduced", "zero"). Unique per entity. Can be used instead of rate when creating documents.'),pt_exemption_code:e.string().nullish().describe("Portugal exemption code for 0% / exempt / non-subject taxes."),pt_exemption_reason:e.string().nullish().describe("Portugal exemption reason associated with pt_exemption_code."),entity_id:e.string().max(Yie),metadata:e.union([e.string(),e.number(),e.boolean(),e.null(),e.record(e.string(),e.unknown()),e.array(e.unknown())]),deleted_at:e.iso.datetime({}).nullish(),created_at:e.iso.datetime({}),updated_at:e.iso.datetime({})}).describe("Tax definition with rate history").and(e.looseObject({})).describe("Tax with one or more rates, each with a valid_from date for historical rate tracking"),Kie=/^[a-z]{3,4}_[0-9a-f]{24}$/,OEe=e.object({id:e.stringFormat("resource-id",Kie).describe("Unique resource identifier")}),FEe=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),$ie=/^[a-z]{3,4}_[0-9a-f]{24}$/,UEe=e.object({id:e.stringFormat("resource-id",$ie).describe("Unique resource identifier")}),jEe=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),Qie=36,Jie=100,Zie=0,Xie=100,eae=36,qEe=e.object({id:e.string().max(Qie),name:e.string().max(Jie),tax_rates:e.array(e.object({rate:e.number().min(Zie).max(Xie),valid_from:e.iso.datetime({})})).describe("Tax rate history"),is_default:e.boolean().describe("Whether this is the default tax for new documents. Only one tax per entity can be default."),classification:e.string().nullish().describe('Classification for API tax lookups (e.g., "standard", "reduced", "zero"). Unique per entity. Can be used instead of rate when creating documents.'),pt_exemption_code:e.string().nullish().describe("Portugal exemption code for 0% / exempt / non-subject taxes."),pt_exemption_reason:e.string().nullish().describe("Portugal exemption reason associated with pt_exemption_code."),entity_id:e.string().max(eae),metadata:e.union([e.string(),e.number(),e.boolean(),e.null(),e.record(e.string(),e.unknown()),e.array(e.unknown())]),deleted_at:e.iso.datetime({}).nullish(),created_at:e.iso.datetime({}),updated_at:e.iso.datetime({})}).describe("Tax definition with rate history").and(e.looseObject({})).describe("Tax with one or more rates, each with a valid_from date for historical rate tracking"),tae=/^[a-z]{3,4}_[0-9a-f]{24}$/,WEe=e.object({id:e.stringFormat("resource-id",tae).describe("Unique resource identifier")}),GEe=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")});var et={};j(et,{CheckTransactionTypeBody:()=>VEe,CheckTransactionTypeResponse:()=>LEe,checkTransactionTypeBodyCustomerCountryCodeMax:()=>iae,checkTransactionTypeBodyCustomerCountryCodeMin:()=>rae,checkTransactionTypeBodyIssuerCountryCodeMax:()=>nae,checkTransactionTypeBodyIssuerCountryCodeMin:()=>oae,checkTransactionTypeBodyIssuerIsTaxSubjectDefault:()=>sae,checkTransactionTypeResponseCustomerCountryCodeMax:()=>lae,checkTransactionTypeResponseCustomerCountryCodeMin:()=>cae,checkTransactionTypeResponseIssuerCountryCodeMax:()=>dae,checkTransactionTypeResponseIssuerCountryCodeMin:()=>aae});var oae=2,nae=2,sae=true,rae=2,iae=2,VEe=e.object({issuer:e.object({country:e.string().optional().describe("Country name (e.g., 'Germany', 'Deutschland', 'Slovenija'). Automatically resolved to country_code."),country_code:e.string().min(oae).max(nae).optional().describe("ISO 3166-1 alpha-2 country code. If provided, takes precedence over country name."),is_tax_subject:e.boolean().default(sae).describe("Whether the issuer is a tax subject. Set false for small businesses or tax-exempt organizations.")}).describe("Issuer (seller) information"),customer:e.object({country:e.string().optional().describe("Country name (e.g., 'Germany', 'Deutschland'). Automatically resolved to country_code."),country_code:e.string().min(rae).max(iae).optional().describe("ISO 3166-1 alpha-2 country code. If provided, takes precedence over country name."),tax_number:e.string().optional().describe("Customer tax number (with or without country prefix)"),is_end_consumer:e.boolean().optional().describe("Whether the customer is an end consumer (B2C override). When true, forces B2C classification for non-EU transactions even if customer has a tax number. For intra-EU, VIES validation takes precedence.")}).describe("Customer (buyer) information")}),aae=2,dae=2,cae=2,lae=2,LEe=e.object({transaction_type:e.union([e.literal("domestic"),e.literal("intra_eu_b2b"),e.literal("intra_eu_b2c"),e.literal("3w_b2b"),e.literal("3w_b2c"),e.literal(null)]).nullable().describe("Determined transaction type based on geography and tax status. 3w_b2b/3w_b2c = third-world (non-EU) B2B/B2C."),reverse_charge_applies:e.boolean().describe("Whether reverse charge should be applied (0% tax with reverse charge note)"),issuer_country_code:e.string().min(aae).max(dae).nullable().describe("Resolved issuer country code"),customer_country_code:e.string().min(cae).max(lae).nullable().describe("Resolved customer country code"),vies_valid:e.boolean().nullable().describe("VIES validation result (true if tax number is valid, null if not checked)"),warning:e.string().nullable().describe("Warning message if VIES validation was unavailable or tax number was invalid"),is_tax_subject:e.boolean().optional().describe("False when issuer is not a tax subject (transaction treated as B2C)")});var tt={};j(tt,{UploadImageBody:()=>YEe,UploadImageHeader:()=>HEe,UploadImageResponse:()=>KEe});var HEe=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),YEe=e.object({file:e.instanceof(File).describe("Image file to upload (PNG, JPG, WEBP, GIF)")}),KEe=e.object({url:e.url().describe("Public URL of the uploaded image"),secureUrl:e.url().describe("Secure HTTPS URL of the uploaded image"),publicId:e.string().describe("Storage object key for future reference/deletion"),format:e.string().describe("Image format (jpg, png, webp, etc.)"),width:e.number().describe("Image width in pixels"),height:e.number().describe("Image height in pixels"),bytes:e.number().describe("File size in bytes"),entity_id:e.string().describe("Entity ID that the image belongs to")});var ot={};j(ot,{GetMeResponse:()=>$Ee,PatchMeBody:()=>QEe,PatchMeResponse:()=>JEe,UpdateUserFinaSettingsBody:()=>oSe,UpdateUserFinaSettingsHeader:()=>tSe,UpdateUserFinaSettingsResponse:()=>nSe,UpdateUserFursSettingsBody:()=>XEe,UpdateUserFursSettingsHeader:()=>ZEe,UpdateUserFursSettingsResponse:()=>eSe,UpdateUserPtSettingsBody:()=>rSe,UpdateUserPtSettingsHeader:()=>sSe,UpdateUserPtSettingsResponse:()=>iSe,getMeResponseAccountIdMax:()=>gae,getMeResponseEmailMax:()=>pae,getMeResponseIdMax:()=>uae,getMeResponseNameMax:()=>mae,patchMeBodyNameMin:()=>yae,patchMeResponseAccountIdMax:()=>zae,patchMeResponseEmailMax:()=>bae,patchMeResponseIdMax:()=>hae,patchMeResponseNameMax:()=>xae,updateUserFinaSettingsResponseAccountIdMax:()=>Dae,updateUserFinaSettingsResponseEmailMax:()=>Eae,updateUserFinaSettingsResponseIdMax:()=>Iae,updateUserFinaSettingsResponseNameMax:()=>Sae,updateUserFursSettingsResponseAccountIdMax:()=>Rae,updateUserFursSettingsResponseEmailMax:()=>vae,updateUserFursSettingsResponseIdMax:()=>_ae,updateUserFursSettingsResponseNameMax:()=>fae,updateUserPtSettingsResponseAccountIdMax:()=>Aae,updateUserPtSettingsResponseEmailMax:()=>wae,updateUserPtSettingsResponseIdMax:()=>Pae,updateUserPtSettingsResponseNameMax:()=>Cae});var uae=36,pae=255,mae=255,gae=36,$Ee=e.object({id:e.string().max(uae),email:e.string().max(pae),name:e.string().max(mae).nullish(),email_verified:e.boolean(),account_id:e.string().max(gae).nullish(),settings:e.union([e.string(),e.number(),e.boolean(),e.null(),e.record(e.string(),e.unknown()),e.array(e.unknown())]),metadata:e.union([e.string(),e.number(),e.boolean(),e.null(),e.record(e.string(),e.unknown()),e.array(e.unknown())]),created_at:e.iso.datetime({}),updated_at:e.iso.datetime({})}),yae=2,QEe=e.object({name:e.string().min(yae).nullish().describe("User display name"),locale:e.union([e.literal("en"),e.literal("de"),e.literal("sl"),e.literal("it"),e.literal("fr"),e.literal("es"),e.literal("pt"),e.literal("nl"),e.literal("pl"),e.literal("hr"),e.literal("sv"),e.literal("fi"),e.literal("et"),e.literal("bg"),e.literal("cs"),e.literal("sk"),e.literal("nb"),e.literal("is"),e.literal(null)]).nullish().describe("Preferred UI language. When omitted or null, the current preference is left unchanged.")}),hae=36,bae=255,xae=255,zae=36,JEe=e.object({id:e.string().max(hae),email:e.string().max(bae),name:e.string().max(xae).nullish(),email_verified:e.boolean(),account_id:e.string().max(zae).nullish(),settings:e.union([e.string(),e.number(),e.boolean(),e.null(),e.record(e.string(),e.unknown()),e.array(e.unknown())]),metadata:e.union([e.string(),e.number(),e.boolean(),e.null(),e.record(e.string(),e.unknown()),e.array(e.unknown())]),created_at:e.iso.datetime({}),updated_at:e.iso.datetime({})}),ZEe=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),XEe=e.object({operator_tax_number:e.string().optional().describe("Operator tax number for FURS fiscalization"),operator_label:e.string().optional().describe("Operator label/name for FURS fiscalization")}).describe("Update user FURS operator settings for a specific entity"),_ae=36,vae=255,fae=255,Rae=36,eSe=e.object({id:e.string().max(_ae),email:e.string().max(vae),name:e.string().max(fae).nullish(),email_verified:e.boolean(),account_id:e.string().max(Rae).nullish(),settings:e.union([e.string(),e.number(),e.boolean(),e.null(),e.record(e.string(),e.unknown()),e.array(e.unknown())]),metadata:e.union([e.string(),e.number(),e.boolean(),e.null(),e.record(e.string(),e.unknown()),e.array(e.unknown())]),created_at:e.iso.datetime({}),updated_at:e.iso.datetime({})}),tSe=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),oSe=e.object({operator_oib:e.string().optional().describe("Operator OIB for FINA fiscalization"),operator_label:e.string().optional().describe("Operator label/name for FINA fiscalization")}).describe("Update user FINA operator settings for a specific entity"),Iae=36,Eae=255,Sae=255,Dae=36,nSe=e.object({id:e.string().max(Iae),email:e.string().max(Eae),name:e.string().max(Sae).nullish(),email_verified:e.boolean(),account_id:e.string().max(Dae).nullish(),settings:e.union([e.string(),e.number(),e.boolean(),e.null(),e.record(e.string(),e.unknown()),e.array(e.unknown())]),metadata:e.union([e.string(),e.number(),e.boolean(),e.null(),e.record(e.string(),e.unknown()),e.array(e.unknown())]),created_at:e.iso.datetime({}),updated_at:e.iso.datetime({})}),sSe=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),rSe=e.object({operator_first_name:e.string().optional().describe("PT operator first name"),operator_last_name:e.string().optional().describe("PT operator last name"),operator_tax_number:e.string().optional().describe("PT operator tax number"),account_first_name:e.string().optional().describe("Deprecated alias for PT operator first name"),account_last_name:e.string().optional().describe("Deprecated alias for PT operator last name"),account_tax_number:e.string().optional().describe("Deprecated alias for PT operator tax number")}).describe("Update user PT operator settings for a specific entity"),Pae=36,wae=255,Cae=255,Aae=36,iSe=e.object({id:e.string().max(Pae),email:e.string().max(wae),name:e.string().max(Cae).nullish(),email_verified:e.boolean(),account_id:e.string().max(Aae).nullish(),settings:e.union([e.string(),e.number(),e.boolean(),e.null(),e.record(e.string(),e.unknown()),e.array(e.unknown())]),metadata:e.union([e.string(),e.number(),e.boolean(),e.null(),e.record(e.string(),e.unknown()),e.array(e.unknown())]),created_at:e.iso.datetime({}),updated_at:e.iso.datetime({})});var nt={};j(nt,{CheckViesBody:()=>aSe,CheckViesResponse:()=>dSe,checkViesBodyCustomerCountryCodeMax:()=>Nae,checkViesBodyCustomerCountryCodeMin:()=>Bae,checkViesBodyIssuerCountryCodeMax:()=>Tae,checkViesBodyIssuerCountryCodeMin:()=>Mae,checkViesBodyIssuerIsTaxSubjectDefault:()=>kae,checkViesResponseCustomerCountryCodeMax:()=>jae,checkViesResponseCustomerCountryCodeMin:()=>Uae,checkViesResponseIssuerCountryCodeMax:()=>Fae,checkViesResponseIssuerCountryCodeMin:()=>Oae});var Mae=2,Tae=2,kae=true,Bae=2,Nae=2,aSe=e.object({issuer:e.object({country:e.string().optional().describe("Country name (e.g., 'Germany', 'Deutschland', 'Slovenija'). Automatically resolved to country_code."),country_code:e.string().min(Mae).max(Tae).optional().describe("ISO 3166-1 alpha-2 country code. If provided, takes precedence over country name."),is_tax_subject:e.boolean().default(kae).describe("Whether the issuer is a tax subject. Set false for small businesses or tax-exempt organizations.")}).describe("Issuer (seller) information"),customer:e.object({country:e.string().optional().describe("Country name (e.g., 'Germany', 'Deutschland'). Automatically resolved to country_code."),country_code:e.string().min(Bae).max(Nae).optional().describe("ISO 3166-1 alpha-2 country code. If provided, takes precedence over country name."),tax_number:e.string().optional().describe("Customer tax number (with or without country prefix)"),is_end_consumer:e.boolean().optional().describe("Whether the customer is an end consumer (B2C override). When true, forces B2C classification for non-EU transactions even if customer has a tax number. For intra-EU, VIES validation takes precedence.")}).describe("Customer (buyer) information")}),Oae=2,Fae=2,Uae=2,jae=2,dSe=e.object({transaction_type:e.union([e.literal("domestic"),e.literal("intra_eu_b2b"),e.literal("intra_eu_b2c"),e.literal("3w_b2b"),e.literal("3w_b2c"),e.literal(null)]).nullable().describe("Determined transaction type based on geography and tax status. 3w_b2b/3w_b2c = third-world (non-EU) B2B/B2C."),reverse_charge_applies:e.boolean().describe("Whether reverse charge should be applied (0% tax with reverse charge note)"),issuer_country_code:e.string().min(Oae).max(Fae).nullable().describe("Resolved issuer country code"),customer_country_code:e.string().min(Uae).max(jae).nullable().describe("Resolved customer country code"),vies_valid:e.boolean().nullable().describe("VIES validation result (true if tax number is valid, null if not checked)"),warning:e.string().nullable().describe("Warning message if VIES validation was unavailable or tax number was invalid"),is_tax_subject:e.boolean().optional().describe("False when issuer is not a tax subject (transaction treated as B2C)")});var st={};j(st,{CreateWebhookBody:()=>lSe,CreateWebhookHeader:()=>cSe,DeleteWebhookHeader:()=>fSe,DeleteWebhookParams:()=>vSe,DeleteWebhookResponse:()=>RSe,GetWebhookByIdHeader:()=>ySe,GetWebhookByIdParams:()=>gSe,GetWebhookByIdResponse:()=>hSe,GetWebhookDeliveriesHeader:()=>wSe,GetWebhookDeliveriesParams:()=>DSe,GetWebhookDeliveriesQueryParams:()=>PSe,GetWebhookDeliveriesResponse:()=>CSe,GetWebhooksHeader:()=>pSe,GetWebhooksQueryParams:()=>uSe,GetWebhooksResponse:()=>mSe,RotateWebhookSecretHeader:()=>MSe,RotateWebhookSecretParams:()=>ASe,RotateWebhookSecretResponse:()=>TSe,TestWebhookHeader:()=>ESe,TestWebhookParams:()=>ISe,TestWebhookResponse:()=>SSe,UpdateWebhookBody:()=>zSe,UpdateWebhookHeader:()=>xSe,UpdateWebhookParams:()=>bSe,UpdateWebhookResponse:()=>_Se,createWebhookBodyActiveDefault:()=>Gae,createWebhookBodyDescriptionMax:()=>Wae,createWebhookBodyUrlMax:()=>qae,deleteWebhookPathIdRegExp:()=>ude,getWebhookByIdPathIdRegExp:()=>Jae,getWebhookByIdResponseDescriptionMax:()=>tde,getWebhookByIdResponseEntityIdMax:()=>Xae,getWebhookByIdResponseIdMax:()=>Zae,getWebhookByIdResponseMetadataDefault:()=>ode,getWebhookByIdResponseUrlMax:()=>ede,getWebhookDeliveriesPathIdRegExp:()=>Dde,getWebhookDeliveriesQueryLimitDefault:()=>Pde,getWebhookDeliveriesQueryLimitMax:()=>wde,getWebhookDeliveriesResponseDataItemAttemptMax:()=>Ude,getWebhookDeliveriesResponseDataItemAttemptMin:()=>Fde,getWebhookDeliveriesResponseDataItemDurationMsMax:()=>Gde,getWebhookDeliveriesResponseDataItemDurationMsMin:()=>Wde,getWebhookDeliveriesResponseDataItemEntityIdMax:()=>Mde,getWebhookDeliveriesResponseDataItemErrorMessageMax:()=>Ode,getWebhookDeliveriesResponseDataItemEventTypeMax:()=>Tde,getWebhookDeliveriesResponseDataItemIdMax:()=>Cde,getWebhookDeliveriesResponseDataItemMaxAttemptsMax:()=>qde,getWebhookDeliveriesResponseDataItemMaxAttemptsMin:()=>jde,getWebhookDeliveriesResponseDataItemResponseBodyMax:()=>Nde,getWebhookDeliveriesResponseDataItemResponseStatusMax:()=>Bde,getWebhookDeliveriesResponseDataItemResponseStatusMin:()=>kde,getWebhookDeliveriesResponseDataItemWebhookIdMax:()=>Ade,getWebhooksQueryLimitDefault:()=>Vae,getWebhooksQueryLimitMax:()=>Lae,getWebhooksResponseDataItemDescriptionMax:()=>$ae,getWebhooksResponseDataItemEntityIdMax:()=>Yae,getWebhooksResponseDataItemIdMax:()=>Hae,getWebhooksResponseDataItemMetadataDefault:()=>Qae,getWebhooksResponseDataItemUrlMax:()=>Kae,rotateWebhookSecretPathIdRegExp:()=>Vde,rotateWebhookSecretResponseDescriptionMax:()=>Kde,rotateWebhookSecretResponseEntityIdMax:()=>Hde,rotateWebhookSecretResponseIdMax:()=>Lde,rotateWebhookSecretResponseMetadataDefault:()=>Qde,rotateWebhookSecretResponseSecretMax:()=>$de,rotateWebhookSecretResponseUrlMax:()=>Yde,testWebhookPathIdRegExp:()=>pde,testWebhookResponseAttemptMax:()=>fde,testWebhookResponseAttemptMin:()=>vde,testWebhookResponseDurationMsMax:()=>Sde,testWebhookResponseDurationMsMin:()=>Ede,testWebhookResponseEntityIdMax:()=>yde,testWebhookResponseErrorMessageMax:()=>_de,testWebhookResponseEventTypeMax:()=>hde,testWebhookResponseIdMax:()=>mde,testWebhookResponseMaxAttemptsMax:()=>Ide,testWebhookResponseMaxAttemptsMin:()=>Rde,testWebhookResponseResponseBodyMax:()=>zde,testWebhookResponseResponseStatusMax:()=>xde,testWebhookResponseResponseStatusMin:()=>bde,testWebhookResponseWebhookIdMax:()=>gde,updateWebhookBodyDescriptionMax:()=>rde,updateWebhookBodyUrlMax:()=>sde,updateWebhookPathIdRegExp:()=>nde,updateWebhookResponseDescriptionMax:()=>cde,updateWebhookResponseEntityIdMax:()=>ade,updateWebhookResponseIdMax:()=>ide,updateWebhookResponseMetadataDefault:()=>lde,updateWebhookResponseUrlMax:()=>dde});var cSe=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),qae=2048,Wae=500,Gae=true,lSe=e.object({url:e.url().max(qae).describe("The HTTPS URL to send webhook events to. Cannot target localhost, private IPs, or internal domains."),description:e.string().max(Wae).optional().describe("Optional description for this webhook"),events:e.array(e.enum(["invoice.created","invoice.updated","invoice.sent","invoice.paid","invoice.overdue","invoice.cancelled","invoice.deleted","invoice.restored","invoice.voided","invoice.finalized","customer.created","customer.updated","customer.deleted","customer.restored","customer.permanently_deleted","payment.received","payment.failed","payment.deleted","payment.restored","payment.permanently_deleted","estimate.created","estimate.sent","estimate.accepted","estimate.rejected","estimate.deleted","estimate.restored","credit_note.created","credit_note.issued","credit_note.voided","credit_note.deleted","credit_note.restored","advance_invoice.created","advance_invoice.paid","advance_invoice.applied","advance_invoice.voided","advance_invoice.deleted","advance_invoice.restored","item.created","item.updated","item.deleted","item.restored","item.permanently_deleted","tax.created","tax.updated","tax.deleted","tax.restored","tax.permanently_deleted","recurring_invoice.created","recurring_invoice.updated","recurring_invoice.deleted","recurring_invoice.restored","recurring_invoice.permanently_deleted","recurring_invoice.paused","recurring_invoice.resumed","recurring_invoice.invoice_generated","recurring_invoice.generation_failed","recurring_invoice.completed","stripe_app.connected","stripe_app.disconnected","stripe_app.settings_updated","order.created","order.updated","order.deleted","order.restored","order.permanently_deleted","order.processed","order.cancelled","order.failed","order_integration.created","order_integration.updated","order_integration.deleted","delivery_note.created","delivery_note.sent","delivery_note.cancelled","delivery_note.voided","delivery_note.deleted","delivery_note.restored","e_invoicing.submission.created","e_invoicing.submission.delivered","e_invoicing.submission.failed","e_invoicing.supplier.onboarded","e_invoicing.supplier.rejected"])).min(1).describe("Events that trigger this webhook"),active:e.boolean().default(Gae).describe("Whether webhook is active"),metadata:e.record(e.string(),e.string()).nullish().describe("Custom key-value data for your own use. Store any JSON object up to 50 properties. Values must be strings up to 250 characters. Useful for storing external IDs, tags, or integration data.")}),Vae=10,Lae=100,uSe=e.object({limit:e.number().min(1).max(Lae).default(Vae).describe("Number of results per request."),next_cursor:e.string().optional().describe("Opaque cursor to fetch the next page of results. Reuse only with the same effective ordering. Use the value from pagination.next_cursor in the previous response."),prev_cursor:e.string().optional().describe("Opaque cursor to fetch the previous page of results. Reuse only with the same effective ordering. Use the value from pagination.prev_cursor in the previous response."),include_total_count:e.boolean().optional().describe("Whether to include the total count of items in `pagination.total`.\nDefault is `true`.\nWhen `false`, `pagination.total` returns -1 for better performance.")}),pSe=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),Hae=36,Yae=36,Kae=2048,$ae=500,Qae={},mSe=e.object({data:e.array(e.object({id:e.string().max(Hae),entity_id:e.string().max(Yae),url:e.string().max(Kae),description:e.string().max($ae).nullish(),events:e.array(e.enum(["invoice.created","invoice.updated","invoice.sent","invoice.paid","invoice.overdue","invoice.cancelled","invoice.deleted","invoice.restored","invoice.voided","invoice.finalized","customer.created","customer.updated","customer.deleted","customer.restored","customer.permanently_deleted","payment.received","payment.failed","payment.deleted","payment.restored","payment.permanently_deleted","estimate.created","estimate.sent","estimate.accepted","estimate.rejected","estimate.deleted","estimate.restored","credit_note.created","credit_note.issued","credit_note.voided","credit_note.deleted","credit_note.restored","advance_invoice.created","advance_invoice.paid","advance_invoice.applied","advance_invoice.voided","advance_invoice.deleted","advance_invoice.restored","item.created","item.updated","item.deleted","item.restored","item.permanently_deleted","tax.created","tax.updated","tax.deleted","tax.restored","tax.permanently_deleted","recurring_invoice.created","recurring_invoice.updated","recurring_invoice.deleted","recurring_invoice.restored","recurring_invoice.permanently_deleted","recurring_invoice.paused","recurring_invoice.resumed","recurring_invoice.invoice_generated","recurring_invoice.generation_failed","recurring_invoice.completed","stripe_app.connected","stripe_app.disconnected","stripe_app.settings_updated","order.created","order.updated","order.deleted","order.restored","order.permanently_deleted","order.processed","order.cancelled","order.failed","order_integration.created","order_integration.updated","order_integration.deleted","delivery_note.created","delivery_note.sent","delivery_note.cancelled","delivery_note.voided","delivery_note.deleted","delivery_note.restored","e_invoicing.submission.created","e_invoicing.submission.delivered","e_invoicing.submission.failed","e_invoicing.supplier.onboarded","e_invoicing.supplier.rejected"])),active:e.boolean(),metadata:e.record(e.string(),e.string()).default(Qae),created_at:e.iso.datetime({}),updated_at:e.iso.datetime({}),secret:e.string().describe("Masked secret (only shown on create and rotate)")}).describe("Webhook endpoint (secret masked)")),pagination:e.object({total:e.number().describe("Total number of items available in the collection"),next_cursor:e.string().nullable().describe("Opaque cursor for fetching the next page. It encodes the resolved sort tuple for the current result set, so reuse it only with the same effective ordering. Null if no more results are available."),prev_cursor:e.string().nullable().describe("Opaque cursor for fetching the previous page. It encodes the resolved sort tuple for the current result set, so reuse it only with the same effective ordering. Null if at the first page."),has_more:e.boolean().describe("Indicates whether more results are available after the current page")}).describe("Pagination metadata including cursors and result counts")}),Jae=/^[a-z]{3,4}_[0-9a-f]{24}$/,gSe=e.object({id:e.stringFormat("resource-id",Jae).describe("Unique resource identifier")}),ySe=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),Zae=36,Xae=36,ede=2048,tde=500,ode={},hSe=e.object({id:e.string().max(Zae),entity_id:e.string().max(Xae),url:e.string().max(ede),description:e.string().max(tde).nullish(),events:e.array(e.enum(["invoice.created","invoice.updated","invoice.sent","invoice.paid","invoice.overdue","invoice.cancelled","invoice.deleted","invoice.restored","invoice.voided","invoice.finalized","customer.created","customer.updated","customer.deleted","customer.restored","customer.permanently_deleted","payment.received","payment.failed","payment.deleted","payment.restored","payment.permanently_deleted","estimate.created","estimate.sent","estimate.accepted","estimate.rejected","estimate.deleted","estimate.restored","credit_note.created","credit_note.issued","credit_note.voided","credit_note.deleted","credit_note.restored","advance_invoice.created","advance_invoice.paid","advance_invoice.applied","advance_invoice.voided","advance_invoice.deleted","advance_invoice.restored","item.created","item.updated","item.deleted","item.restored","item.permanently_deleted","tax.created","tax.updated","tax.deleted","tax.restored","tax.permanently_deleted","recurring_invoice.created","recurring_invoice.updated","recurring_invoice.deleted","recurring_invoice.restored","recurring_invoice.permanently_deleted","recurring_invoice.paused","recurring_invoice.resumed","recurring_invoice.invoice_generated","recurring_invoice.generation_failed","recurring_invoice.completed","stripe_app.connected","stripe_app.disconnected","stripe_app.settings_updated","order.created","order.updated","order.deleted","order.restored","order.permanently_deleted","order.processed","order.cancelled","order.failed","order_integration.created","order_integration.updated","order_integration.deleted","delivery_note.created","delivery_note.sent","delivery_note.cancelled","delivery_note.voided","delivery_note.deleted","delivery_note.restored","e_invoicing.submission.created","e_invoicing.submission.delivered","e_invoicing.submission.failed","e_invoicing.supplier.onboarded","e_invoicing.supplier.rejected"])),active:e.boolean(),metadata:e.record(e.string(),e.string()).default(ode),created_at:e.iso.datetime({}),updated_at:e.iso.datetime({}),secret:e.string().describe("Masked secret (only shown on create and rotate)")}).describe("Webhook endpoint (secret masked)"),nde=/^[a-z]{3,4}_[0-9a-f]{24}$/,bSe=e.object({id:e.stringFormat("resource-id",nde).describe("Unique resource identifier")}),xSe=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),sde=2048,rde=500,zSe=e.object({url:e.url().max(sde).optional().describe("The HTTPS URL to send webhook events to. Cannot target localhost, private IPs, or internal domains."),description:e.string().max(rde).nullish(),events:e.array(e.enum(["invoice.created","invoice.updated","invoice.sent","invoice.paid","invoice.overdue","invoice.cancelled","invoice.deleted","invoice.restored","invoice.voided","invoice.finalized","customer.created","customer.updated","customer.deleted","customer.restored","customer.permanently_deleted","payment.received","payment.failed","payment.deleted","payment.restored","payment.permanently_deleted","estimate.created","estimate.sent","estimate.accepted","estimate.rejected","estimate.deleted","estimate.restored","credit_note.created","credit_note.issued","credit_note.voided","credit_note.deleted","credit_note.restored","advance_invoice.created","advance_invoice.paid","advance_invoice.applied","advance_invoice.voided","advance_invoice.deleted","advance_invoice.restored","item.created","item.updated","item.deleted","item.restored","item.permanently_deleted","tax.created","tax.updated","tax.deleted","tax.restored","tax.permanently_deleted","recurring_invoice.created","recurring_invoice.updated","recurring_invoice.deleted","recurring_invoice.restored","recurring_invoice.permanently_deleted","recurring_invoice.paused","recurring_invoice.resumed","recurring_invoice.invoice_generated","recurring_invoice.generation_failed","recurring_invoice.completed","stripe_app.connected","stripe_app.disconnected","stripe_app.settings_updated","order.created","order.updated","order.deleted","order.restored","order.permanently_deleted","order.processed","order.cancelled","order.failed","order_integration.created","order_integration.updated","order_integration.deleted","delivery_note.created","delivery_note.sent","delivery_note.cancelled","delivery_note.voided","delivery_note.deleted","delivery_note.restored","e_invoicing.submission.created","e_invoicing.submission.delivered","e_invoicing.submission.failed","e_invoicing.supplier.onboarded","e_invoicing.supplier.rejected"])).min(1).optional(),active:e.boolean().optional(),metadata:e.record(e.string(),e.string()).nullish().describe("Custom key-value data for your own use. Store any JSON object up to 50 properties. Values must be strings up to 250 characters. Useful for storing external IDs, tags, or integration data.")}),ide=36,ade=36,dde=2048,cde=500,lde={},_Se=e.object({id:e.string().max(ide),entity_id:e.string().max(ade),url:e.string().max(dde),description:e.string().max(cde).nullish(),events:e.array(e.enum(["invoice.created","invoice.updated","invoice.sent","invoice.paid","invoice.overdue","invoice.cancelled","invoice.deleted","invoice.restored","invoice.voided","invoice.finalized","customer.created","customer.updated","customer.deleted","customer.restored","customer.permanently_deleted","payment.received","payment.failed","payment.deleted","payment.restored","payment.permanently_deleted","estimate.created","estimate.sent","estimate.accepted","estimate.rejected","estimate.deleted","estimate.restored","credit_note.created","credit_note.issued","credit_note.voided","credit_note.deleted","credit_note.restored","advance_invoice.created","advance_invoice.paid","advance_invoice.applied","advance_invoice.voided","advance_invoice.deleted","advance_invoice.restored","item.created","item.updated","item.deleted","item.restored","item.permanently_deleted","tax.created","tax.updated","tax.deleted","tax.restored","tax.permanently_deleted","recurring_invoice.created","recurring_invoice.updated","recurring_invoice.deleted","recurring_invoice.restored","recurring_invoice.permanently_deleted","recurring_invoice.paused","recurring_invoice.resumed","recurring_invoice.invoice_generated","recurring_invoice.generation_failed","recurring_invoice.completed","stripe_app.connected","stripe_app.disconnected","stripe_app.settings_updated","order.created","order.updated","order.deleted","order.restored","order.permanently_deleted","order.processed","order.cancelled","order.failed","order_integration.created","order_integration.updated","order_integration.deleted","delivery_note.created","delivery_note.sent","delivery_note.cancelled","delivery_note.voided","delivery_note.deleted","delivery_note.restored","e_invoicing.submission.created","e_invoicing.submission.delivered","e_invoicing.submission.failed","e_invoicing.supplier.onboarded","e_invoicing.supplier.rejected"])),active:e.boolean(),metadata:e.record(e.string(),e.string()).default(lde),created_at:e.iso.datetime({}),updated_at:e.iso.datetime({}),secret:e.string().describe("Masked secret (only shown on create and rotate)")}).describe("Webhook endpoint (secret masked)"),ude=/^[a-z]{3,4}_[0-9a-f]{24}$/,vSe=e.object({id:e.stringFormat("resource-id",ude).describe("Unique resource identifier")}),fSe=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),RSe=e.object({success:e.boolean()}),pde=/^[a-z]{3,4}_[0-9a-f]{24}$/,ISe=e.object({id:e.stringFormat("resource-id",pde).describe("Unique resource identifier")}),ESe=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),mde=36,gde=36,yde=36,hde=100,bde=-2147483648,xde=2147483647,zde=1e4,_de=2e3,vde=-2147483648,fde=2147483647,Rde=-2147483648,Ide=2147483647,Ede=-2147483648,Sde=2147483647,SSe=e.object({id:e.string().max(mde),webhook_id:e.string().max(gde),entity_id:e.string().max(yde),event_type:e.string().max(hde),status:e.enum(["pending","success","failed"]),request_body:e.record(e.string(),e.unknown()),response_status:e.number().min(bde).max(xde).nullish(),response_body:e.string().max(zde).nullish(),error_message:e.string().max(_de).nullish(),attempt:e.number().min(vde).max(fde),max_attempts:e.number().min(Rde).max(Ide),next_retry_at:e.iso.datetime({}).nullish(),duration_ms:e.number().min(Ede).max(Sde).nullish(),created_at:e.iso.datetime({}),completed_at:e.iso.datetime({}).nullish()}).describe("Webhook delivery attempt record"),Dde=/^[a-z]{3,4}_[0-9a-f]{24}$/,DSe=e.object({id:e.stringFormat("resource-id",Dde).describe("Unique resource identifier")}),Pde=10,wde=100,PSe=e.object({limit:e.number().min(1).max(wde).default(Pde).describe("Number of results per request."),next_cursor:e.string().optional().describe("Opaque cursor to fetch the next page of results. Reuse only with the same effective ordering. Use the value from pagination.next_cursor in the previous response."),prev_cursor:e.string().optional().describe("Opaque cursor to fetch the previous page of results. Reuse only with the same effective ordering. Use the value from pagination.prev_cursor in the previous response."),include_total_count:e.boolean().optional().describe("Whether to include the total count of items in `pagination.total`.\nDefault is `true`.\nWhen `false`, `pagination.total` returns -1 for better performance.")}),wSe=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),Cde=36,Ade=36,Mde=36,Tde=100,kde=-2147483648,Bde=2147483647,Nde=1e4,Ode=2e3,Fde=-2147483648,Ude=2147483647,jde=-2147483648,qde=2147483647,Wde=-2147483648,Gde=2147483647,CSe=e.object({data:e.array(e.object({id:e.string().max(Cde),webhook_id:e.string().max(Ade),entity_id:e.string().max(Mde),event_type:e.string().max(Tde),status:e.enum(["pending","success","failed"]),request_body:e.record(e.string(),e.unknown()),response_status:e.number().min(kde).max(Bde).nullish(),response_body:e.string().max(Nde).nullish(),error_message:e.string().max(Ode).nullish(),attempt:e.number().min(Fde).max(Ude),max_attempts:e.number().min(jde).max(qde),next_retry_at:e.iso.datetime({}).nullish(),duration_ms:e.number().min(Wde).max(Gde).nullish(),created_at:e.iso.datetime({}),completed_at:e.iso.datetime({}).nullish()}).describe("Webhook delivery attempt record")),pagination:e.object({total:e.number().describe("Total number of items available in the collection"),next_cursor:e.string().nullable().describe("Opaque cursor for fetching the next page. It encodes the resolved sort tuple for the current result set, so reuse it only with the same effective ordering. Null if no more results are available."),prev_cursor:e.string().nullable().describe("Opaque cursor for fetching the previous page. It encodes the resolved sort tuple for the current result set, so reuse it only with the same effective ordering. Null if at the first page."),has_more:e.boolean().describe("Indicates whether more results are available after the current page")}).describe("Pagination metadata including cursors and result counts")}),Vde=/^[a-z]{3,4}_[0-9a-f]{24}$/,ASe=e.object({id:e.stringFormat("resource-id",Vde).describe("Unique resource identifier")}),MSe=e.object({"x-entity-id":e.string().min(1).optional().describe("Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.")}),Lde=36,Hde=36,Yde=2048,Kde=500,$de=64,Qde={},TSe=e.object({id:e.string().max(Lde),entity_id:e.string().max(Hde),url:e.string().max(Yde),description:e.string().max(Kde).nullish(),secret:e.string().max($de),events:e.array(e.enum(["invoice.created","invoice.updated","invoice.sent","invoice.paid","invoice.overdue","invoice.cancelled","invoice.deleted","invoice.restored","invoice.voided","invoice.finalized","customer.created","customer.updated","customer.deleted","customer.restored","customer.permanently_deleted","payment.received","payment.failed","payment.deleted","payment.restored","payment.permanently_deleted","estimate.created","estimate.sent","estimate.accepted","estimate.rejected","estimate.deleted","estimate.restored","credit_note.created","credit_note.issued","credit_note.voided","credit_note.deleted","credit_note.restored","advance_invoice.created","advance_invoice.paid","advance_invoice.applied","advance_invoice.voided","advance_invoice.deleted","advance_invoice.restored","item.created","item.updated","item.deleted","item.restored","item.permanently_deleted","tax.created","tax.updated","tax.deleted","tax.restored","tax.permanently_deleted","recurring_invoice.created","recurring_invoice.updated","recurring_invoice.deleted","recurring_invoice.restored","recurring_invoice.permanently_deleted","recurring_invoice.paused","recurring_invoice.resumed","recurring_invoice.invoice_generated","recurring_invoice.generation_failed","recurring_invoice.completed","stripe_app.connected","stripe_app.disconnected","stripe_app.settings_updated","order.created","order.updated","order.deleted","order.restored","order.permanently_deleted","order.processed","order.cancelled","order.failed","order_integration.created","order_integration.updated","order_integration.deleted","delivery_note.created","delivery_note.sent","delivery_note.cancelled","delivery_note.voided","delivery_note.deleted","delivery_note.restored","e_invoicing.submission.created","e_invoicing.submission.delivered","e_invoicing.submission.failed","e_invoicing.supplier.onboarded","e_invoicing.supplier.rejected"])),active:e.boolean(),metadata:e.record(e.string(),e.string()).default(Qde),created_at:e.iso.datetime({}),updated_at:e.iso.datetime({})}).describe("Webhook endpoint with full secret visible");var rt={};j(rt,{CheckWLFeatureParams:()=>NSe,CheckWLFeatureResponse:()=>OSe,CheckWLLimitParams:()=>FSe,CheckWLLimitResponse:()=>USe,GetCurrentWLSubscriptionResponse:()=>kSe,GetWLSubscriptionPlansResponse:()=>BSe,UpdateWLSubscriptionBillingEmailBody:()=>jSe,UpdateWLSubscriptionBillingEmailResponse:()=>qSe});var kSe=e.object({plan:e.object({id:e.string().describe("Unique plan ID"),slug:e.string().describe("Plan slug"),name:e.string().describe("Display name"),billing_interval:e.string().nullable().describe('Billing interval: "monthly", "yearly", or null for free plans'),base_price_cents:e.number().nullable().describe("Price in cents. Null for free plans."),limits:e.object({documents_per_month:e.number().nullable().describe("Maximum documents per month (backward compat). Null means unlimited."),invoices_per_month:e.number().nullable().describe("Maximum invoices per month. Null means unlimited."),overage_price_cents:e.number().nullable().describe("Overage price in cents per document. Null means hard block."),annual_price_cents:e.number().nullable().describe("Explicit yearly plan price in cents. Null falls back to computed yearly pricing."),included_store_count:e.number().nullable().describe("Number of connected stores included in the base plan."),extra_store_price_cents:e.number().nullable().describe("Monthly price in cents for each additional connected store."),extra_store_annual_price_cents:e.number().nullable().describe("Yearly price in cents for each additional connected store."),extra_store_invoices_per_month:e.number().nullable().describe("Pooled invoice allowance added by each additional store.")}).nullable(),features:e.array(e.string()).describe("List of features included. Empty array means all features."),is_free:e.boolean().describe("Whether this is a free plan"),display_order:e.number().describe("Display order for sorting")}).describe("A subscription plan for a white-label product"),status:e.string().describe("Subscription status"),billing_interval:e.string().nullable().describe("Current billing interval"),current_period_start:e.string().describe("Current period start date (ISO 8601)"),current_period_end:e.string().describe("Current period end date (ISO 8601)"),payment_provider:e.enum(["stripe","paypal","bank","braintree"]).describe("Billing provider used for this subscription"),bank_reference:e.string().nullable().describe("Stable bank-transfer payment reference for Apollo subscriptions"),billing_email:e.string().nullable().describe("Billing email used for subscription notifications and invoices"),coupon_code:e.string().nullable().describe('Applied saved coupon code for the base plan price, e.g. "COUPON_50".'),trial_ends_at:e.string().nullable().describe("Trial end date (ISO 8601). Null if not on trial."),trial_days_remaining:e.number().nullable().describe("Days remaining in trial. Null if not on trial."),cancel_at:e.string().nullable().describe("Scheduled cancellation date (ISO 8601). Null if not scheduled."),scheduled_change:e.object({plan:e.object({id:e.string().describe("Unique plan ID"),slug:e.string().describe("Plan slug"),name:e.string().describe("Display name"),billing_interval:e.string().nullable().describe('Billing interval: "monthly", "yearly", or null for free plans'),base_price_cents:e.number().nullable().describe("Price in cents. Null for free plans."),limits:e.object({documents_per_month:e.number().nullable().describe("Maximum documents per month (backward compat). Null means unlimited."),invoices_per_month:e.number().nullable().describe("Maximum invoices per month. Null means unlimited."),overage_price_cents:e.number().nullable().describe("Overage price in cents per document. Null means hard block."),annual_price_cents:e.number().nullable().describe("Explicit yearly plan price in cents. Null falls back to computed yearly pricing."),included_store_count:e.number().nullable().describe("Number of connected stores included in the base plan."),extra_store_price_cents:e.number().nullable().describe("Monthly price in cents for each additional connected store."),extra_store_annual_price_cents:e.number().nullable().describe("Yearly price in cents for each additional connected store."),extra_store_invoices_per_month:e.number().nullable().describe("Pooled invoice allowance added by each additional store.")}).nullable(),features:e.array(e.string()).describe("List of features included. Empty array means all features."),is_free:e.boolean().describe("Whether this is a free plan"),display_order:e.number().describe("Display order for sorting")}).describe("A subscription plan for a white-label product"),billing_interval:e.string().nullable().describe("Scheduled billing interval once the change takes effect"),effective_at:e.string().describe("When the scheduled change takes effect (ISO 8601)")}).nullable(),payment_method:e.object({last4:e.string().nullable(),brand:e.string().nullable(),has_card:e.boolean()}).nullable(),store_billing:e.object({connected_stores:e.number(),included_stores:e.number(),billable_extra_stores:e.number(),invoices_included_from_extra_stores:e.number(),extra_store_price_cents_monthly:e.number().nullable(),extra_store_price_cents_yearly:e.number().nullable()}).nullable(),usage:e.object({documents_count:e.number().describe("Documents created this period"),documents_limit:e.number().nullable().describe("Documents limit for current plan. Null means unlimited."),invoices_count:e.number().describe("Invoices created this period (invoices, credit notes, advance invoices)"),invoices_limit:e.number().nullable().describe("Invoice limit for current plan. Null means unlimited."),period_start:e.string().describe("Current period start date (ISO 8601)"),period_end:e.string().describe("Current period end date (ISO 8601)")}).describe("Usage statistics for current billing period")}).describe("Current entity subscription with usage stats"),BSe=e.object({plans:e.array(e.object({id:e.string().describe("Unique plan ID"),slug:e.string().describe("Plan slug"),name:e.string().describe("Display name"),billing_interval:e.string().nullable().describe('Billing interval: "monthly", "yearly", or null for free plans'),base_price_cents:e.number().nullable().describe("Price in cents. Null for free plans."),limits:e.object({documents_per_month:e.number().nullable().describe("Maximum documents per month (backward compat). Null means unlimited."),invoices_per_month:e.number().nullable().describe("Maximum invoices per month. Null means unlimited."),overage_price_cents:e.number().nullable().describe("Overage price in cents per document. Null means hard block."),annual_price_cents:e.number().nullable().describe("Explicit yearly plan price in cents. Null falls back to computed yearly pricing."),included_store_count:e.number().nullable().describe("Number of connected stores included in the base plan."),extra_store_price_cents:e.number().nullable().describe("Monthly price in cents for each additional connected store."),extra_store_annual_price_cents:e.number().nullable().describe("Yearly price in cents for each additional connected store."),extra_store_invoices_per_month:e.number().nullable().describe("Pooled invoice allowance added by each additional store.")}).nullable(),features:e.array(e.string()).describe("List of features included. Empty array means all features."),is_free:e.boolean().describe("Whether this is a free plan"),display_order:e.number().describe("Display order for sorting")}).describe("A subscription plan for a white-label product")).describe("Available plans for the current white-label"),current_plan_slug:e.string().nullable().describe("Current plan slug (null if no subscription)")}).describe("Available subscription plans for the current white-label"),NSe=e.object({feature:e.string().describe("Feature slug to check")}),OSe=e.object({feature:e.string().describe("Feature being checked"),allowed:e.boolean().describe("Whether the feature is allowed on the current plan"),requires_upgrade:e.boolean().describe("Whether an upgrade is needed to access this feature"),upgrade_plan_slug:e.string().nullable().describe("Minimum plan slug that includes this feature (if requires_upgrade is true)")}).describe("Feature access check result"),FSe=e.object({resource:e.string().describe("Resource type to check (e.g., 'documents')")}),USe=e.object({resource:e.string().describe("Resource being checked"),allowed:e.boolean().describe("Whether creating more of this resource is allowed"),usage:e.number().describe("Current usage count"),limit:e.number().nullable().describe("Current limit. Null means unlimited."),percentage:e.number().describe("Usage as percentage of limit (0-100). 0 if unlimited.")}).describe("Resource limit check result"),jSe=e.object({billing_email:e.email().nullable()}),qSe=e.object({billing_email:e.string().nullable()});var it={};j(it,{GetCurrentWhiteLabelResponse:()=>WSe});var WSe=e.object({slug:e.string().describe("Unique identifier for the white-label"),name:e.string().describe("Display name of the white-label"),hidden_features:e.array(e.string()).describe('UI capabilities and standalone action controls hidden for this white-label. Empty array means all configured capability families and controls stay visible. Example values include "developer_tools", "documents.credit_notes", and "actions.documents.credit_notes.create_from_invoice".'),billing_enabled:e.boolean().describe("Whether billing-related settings and subscription UI should be shown for this white-label."),account_users_full_ui_enabled:e.boolean().describe("Whether account users bypass white-label UI hiding and keep access to the full product UI on this brand."),hide_new_features_by_default:e.boolean().describe("Whether white-label-visible features added after the last capabilities review stay hidden until reviewed."),reviewed_feature_catalog_ids:e.array(e.string()).describe("Catalog IDs reviewed during the last explicit capabilities save."),theme:e.object({primary:e.string().optional().describe("Primary color in HSL format (e.g., '220 70% 50%')"),radius:e.string().optional().describe("Border radius (e.g., '0.5rem', '0.75rem')")}).nullish().describe("Theme configuration (default colors for embed-sdk). Null means use defaults."),app_name:e.string().nullable().describe("Installed app name for PWA/browser surfaces. Null means use the white-label name."),short_name:e.string().nullable().describe("Short installed app name for compact browser/PWA surfaces. Null means use the white-label name."),logo_url:e.url().nullable().describe("Branded logo URL used for app install surfaces when configured."),favicon_url:e.url().nullable().describe("Branded favicon/app icon URL used for browser and install surfaces when configured."),theme_color:e.string().nullable().describe("Resolved CSS theme color for install surfaces and browser UI."),hal_app_id:e.string().nullable().describe("Hal app ID for chat widget loading. Null means no Hal integration."),support_email:e.email().nullable().describe("Support contact email for this white-label. Null means no configured support email.")}).describe("White-label configuration for the current domain");var at=null,dt=null,GSe="l.account";function ue(i){at=i;}function VSe(i){dt=i;}function LSe(){return dt}function HSe(){if(!at)throw new Error("SDK not initialized. Call new SpaceInvoices() first.");return at}function YSe(i){if(typeof document>"u")return null;let d=document.cookie.match(new RegExp(`(?:^|; )${i}=([^;]+)`));return d?decodeURIComponent(d[1]):null}function KSe(i){if(!i)return {};if(i instanceof Headers){let d={};return i.forEach((u,S)=>{d[S]=u;}),d}if(Array.isArray(i)){let d={};for(let[u,S]of i)d[u]=S;return d}return i}async function m(i,d){let u=HSe(),S=await Promise.resolve(u.getAccessToken()),z=`${u.baseUrl}${i}`,oe={...KSe(d.headers)};u.clientName&&Object.assign(oe,pe(u.clientName)),S&&(oe.Authorization=`Bearer ${S}`);let se=oe["x-account-id"]||oe["X-Account-Id"]||dt||YSe(GSe);se&&!oe["x-account-id"]&&!oe["X-Account-Id"]&&(oe["x-account-id"]=se);let ne=await fetch(z,{...d,headers:oe});ne.status===401&&u.onUnauthorized&&u.onUnauthorized(ne);let ae,sge=ne.headers.get("content-length"),re=ne.headers.get("content-type");if(sge==="0"||ne.status===204)ae=void 0;else if(re?.includes("application/pdf")||re?.includes("application/vnd.openxmlformats-officedocument.wordprocessingml.document")||re?.includes("application/octet-stream")||re?.includes("application/zip")||re?.includes("application/x-zip-compressed")||re?.includes("image/"))ae=await ne.blob();else if(re?.includes("application/xml")||re?.includes("text/xml"))ae=await ne.text();else if(re?.includes("text/html"))ae=await ne.text();else try{ae=await ne.json();}catch{ae=void 0;}return {data:ae,status:ne.status,headers:ne.headers}}var $Se=()=>"/account-webhooks",Zde=async(i,d)=>m($Se(),{...d,method:"POST",headers:{"Content-Type":"application/json",...d?.headers},body:JSON.stringify(i)}),QSe=i=>{let d=new URLSearchParams;Object.entries(i||{}).forEach(([S,z])=>{z!==void 0&&d.append(S,z===null?"null":z.toString());});let u=d.toString();return u.length>0?`/account-webhooks?${u}`:"/account-webhooks"},Xde=async(i,d)=>m(QSe(i),{...d,method:"GET"}),JSe=i=>`/account-webhooks/${i}`,ece=async(i,d)=>m(JSe(i),{...d,method:"GET"}),ZSe=i=>`/account-webhooks/${i}`,tce=async(i,d,u)=>m(ZSe(i),{...u,method:"PATCH",headers:{"Content-Type":"application/json",...u?.headers},body:JSON.stringify(d)}),XSe=i=>`/account-webhooks/${i}`,oce=async(i,d)=>m(XSe(i),{...d,method:"DELETE"}),eDe=i=>`/account-webhooks/${i}/test`,nce=async(i,d)=>m(eDe(i),{...d,method:"POST"});var tDe=i=>`/account-webhooks/${i}/rotate-secret`,sce=async(i,d)=>m(tDe(i),{...d,method:"POST"});async function oDe(i,d){return i(...d)}function rce(i){if(!i?.entity_id&&!i?.account_id&&!i?.signal)return;let d={};return (i.entity_id||i.account_id)&&(d.headers={...i.entity_id?{"x-entity-id":i.entity_id}:{},...i.account_id?{"x-account-id":i.account_id}:{}}),i.signal&&(d.signal=i.signal),d}function g(i){return async(...d)=>{let u=d[d.length-1],S=u&&typeof u=="object"&&("entity_id"in u||"account_id"in u||"signal"in u||Object.keys(u).length===0),z,T;S?(z=d.slice(0,-1),T=rce(u)):z=[...d],z.push(T);let oe=await oDe(i,z);if(oe.status>=200&&oe.status<300)return oe.data;let se=new Error(`API error: ${oe.status}`);throw se.status=oe.status,se.data=oe.data,se}}function V(i){return async d=>{let{entity_id:u,account_id:S,signal:z,...T}=d||{},oe=rce({entity_id:u,account_id:S,signal:z}),se=await i(T,oe);if(se.status===200)return se.data;let ne=new Error(`API error: ${se.status}`);throw ne.status=se.status,ne.data=se.data,ne}}var ct={create:g(Zde),list:V(Xde),get:g(ece),update:g(tce),delete:g(oce),testAccountWebhook:g(nce),rotateAccountWebhookSecret:g(sce)};var nDe=i=>{let d=new URLSearchParams;Object.entries(i||{}).forEach(([S,z])=>{z!==void 0&&d.append(S,z===null?"null":z.toString());});let u=d.toString();return u.length>0?`/activities?${u}`:"/activities"},ice=async(i,d)=>m(nDe(i),{...d,method:"GET"});var lt={list:V(ice)};var sDe=i=>`/advance-invoices/shareable/${i}`,ace=async(i,d)=>m(sDe(i),{...d,method:"GET"}),rDe=(i,d)=>{let u=new URLSearchParams;Object.entries(d||{}).forEach(([z,T])=>{T!==void 0&&u.append(z,T===null?"null":T.toString());});let S=u.toString();return S.length>0?`/advance-invoices/shareable/${i}/html?${S}`:`/advance-invoices/shareable/${i}/html`},dce=async(i,d,u)=>m(rDe(i,d),{...u,method:"GET"}),iDe=(i,d)=>{let u=new URLSearchParams;Object.entries(d||{}).forEach(([z,T])=>{T!==void 0&&u.append(z,T===null?"null":T.toString());});let S=u.toString();return S.length>0?`/advance-invoices/shareable/${i}/pdf?${S}`:`/advance-invoices/shareable/${i}/pdf`},cce=async(i,d,u)=>m(iDe(i,d),{...u,method:"GET"}),aDe=()=>"/advance-invoices",lce=async(i,d)=>m(aDe(),{...d,method:"POST",headers:{"Content-Type":"application/json",...d?.headers},body:JSON.stringify(i)}),dDe=i=>{let d=new URLSearchParams;Object.entries(i||{}).forEach(([S,z])=>{z!==void 0&&d.append(S,z===null?"null":z.toString());});let u=d.toString();return u.length>0?`/advance-invoices?${u}`:"/advance-invoices"},uce=async(i,d)=>m(dDe(i),{...d,method:"GET"}),cDe=()=>"/advance-invoices/custom",pce=async(i,d)=>m(cDe(),{...d,method:"POST",headers:{"Content-Type":"application/json",...d?.headers},body:JSON.stringify(i)}),lDe=(i,d)=>{let u=new URLSearchParams;Object.entries(d||{}).forEach(([z,T])=>{T!==void 0&&u.append(z,T===null?"null":T.toString());});let S=u.toString();return S.length>0?`/advance-invoices/${i}?${S}`:`/advance-invoices/${i}`},mce=async(i,d,u)=>m(lDe(i,d),{...u,method:"GET"}),uDe=i=>`/advance-invoices/${i}`,gce=async(i,d,u)=>m(uDe(i),{...u,method:"PATCH",headers:{"Content-Type":"application/json",...u?.headers},body:JSON.stringify(d)}),pDe=i=>`/advance-invoices/${i}/versions`,yce=async(i,d)=>m(pDe(i),{...d,method:"GET"}),mDe=(i,d)=>`/advance-invoices/${i}/versions/${d}`,hce=async(i,d,u)=>m(mDe(i,d),{...u,method:"GET"}),gDe=i=>{let d=new URLSearchParams;Object.entries(i||{}).forEach(([S,z])=>{z!==void 0&&d.append(S,z===null?"null":z.toString());});let u=d.toString();return u.length>0?`/advance-invoices/render?${u}`:"/advance-invoices/render"},bce=async(i,d,u)=>m(gDe(d),{...u,method:"POST",headers:{"Content-Type":"application/json",...u?.headers},body:JSON.stringify(i)}),yDe=i=>`/advance-invoices/${i}/void`,xce=async(i,d,u)=>m(yDe(i),{...u,method:"POST",headers:{"Content-Type":"application/json",...u?.headers},body:JSON.stringify(d)});var ut={getShareableAdvanceInvoice:g(ace),getShareableAdvanceInvoiceHtml:g(dce),getShareableAdvanceInvoicePdf:g(cce),create:g(lce),list:V(uce),createCustom:g(pce),get:g(mce),update:g(gce),getVersions:g(yce),getVersion:g(hce),renderAdvanceInvoicePreview:g(bce),void:g(xce)};var hDe=i=>{let d=new URLSearchParams;Object.entries(i||{}).forEach(([S,z])=>{z!==void 0&&d.append(S,z===null?"null":z.toString());});let u=d.toString();return u.length>0?`/company-registry/search?${u}`:"/company-registry/search"},zce=async(i,d)=>m(hDe(i),{...d,method:"GET"}),bDe=()=>"/company-registry/countries",_ce=async i=>m(bDe(),{...i,method:"GET"});var pt={searchCompanyRegistry:g(zce),list:g(_ce)};var xDe=i=>`/credit-notes/shareable/${i}`,vce=async(i,d)=>m(xDe(i),{...d,method:"GET"}),zDe=(i,d)=>{let u=new URLSearchParams;Object.entries(d||{}).forEach(([z,T])=>{T!==void 0&&u.append(z,T===null?"null":T.toString());});let S=u.toString();return S.length>0?`/credit-notes/shareable/${i}/html?${S}`:`/credit-notes/shareable/${i}/html`},fce=async(i,d,u)=>m(zDe(i,d),{...u,method:"GET"}),_De=(i,d)=>{let u=new URLSearchParams;Object.entries(d||{}).forEach(([z,T])=>{T!==void 0&&u.append(z,T===null?"null":T.toString());});let S=u.toString();return S.length>0?`/credit-notes/shareable/${i}/pdf?${S}`:`/credit-notes/shareable/${i}/pdf`},Rce=async(i,d,u)=>m(_De(i,d),{...u,method:"GET"}),vDe=i=>`/credit-notes/shareable/${i}/eslog`,Ice=async(i,d)=>m(vDe(i),{...d,method:"GET"}),fDe=()=>"/credit-notes",Ece=async(i,d)=>m(fDe(),{...d,method:"POST",headers:{"Content-Type":"application/json",...d?.headers},body:JSON.stringify(i)}),RDe=i=>{let d=new URLSearchParams;Object.entries(i||{}).forEach(([S,z])=>{z!==void 0&&d.append(S,z===null?"null":z.toString());});let u=d.toString();return u.length>0?`/credit-notes?${u}`:"/credit-notes"},Sce=async(i,d)=>m(RDe(i),{...d,method:"GET"}),IDe=()=>"/credit-notes/custom",Dce=async(i,d)=>m(IDe(),{...d,method:"POST",headers:{"Content-Type":"application/json",...d?.headers},body:JSON.stringify(i)}),EDe=(i,d)=>{let u=new URLSearchParams;Object.entries(d||{}).forEach(([z,T])=>{T!==void 0&&u.append(z,T===null?"null":T.toString());});let S=u.toString();return S.length>0?`/credit-notes/${i}?${S}`:`/credit-notes/${i}`},Pce=async(i,d,u)=>m(EDe(i,d),{...u,method:"GET"}),SDe=i=>`/credit-notes/${i}`,wce=async(i,d,u)=>m(SDe(i),{...u,method:"PATCH",headers:{"Content-Type":"application/json",...u?.headers},body:JSON.stringify(d)}),DDe=i=>`/credit-notes/${i}/versions`,Cce=async(i,d)=>m(DDe(i),{...d,method:"GET"}),PDe=(i,d)=>`/credit-notes/${i}/versions/${d}`,Ace=async(i,d,u)=>m(PDe(i,d),{...u,method:"GET"}),wDe=i=>{let d=new URLSearchParams;Object.entries(i||{}).forEach(([S,z])=>{z!==void 0&&d.append(S,z===null?"null":z.toString());});let u=d.toString();return u.length>0?`/credit-notes/render?${u}`:"/credit-notes/render"},Mce=async(i,d,u)=>m(wDe(d),{...u,method:"POST",headers:{"Content-Type":"application/json",...u?.headers},body:JSON.stringify(i)}),CDe=i=>`/credit-notes/${i}/void`,Tce=async(i,d,u)=>m(CDe(i),{...u,method:"POST",headers:{"Content-Type":"application/json",...u?.headers},body:JSON.stringify(d)});var mt={getShareableCreditNote:g(vce),getShareableCreditNoteHtml:g(fce),getShareableCreditNotePdf:g(Rce),getShareableCreditNoteEslog:g(Ice),create:g(Ece),list:V(Sce),createCustom:g(Dce),get:g(Pce),update:g(wce),getVersions:g(Cce),getVersion:g(Ace),renderCreditNotePreview:g(Mce),void:g(Tce)};var ADe=()=>"/customers",kce=async(i,d)=>m(ADe(),{...d,method:"POST",headers:{"Content-Type":"application/json",...d?.headers},body:JSON.stringify(i)}),MDe=i=>{let d=new URLSearchParams;Object.entries(i||{}).forEach(([S,z])=>{z!==void 0&&d.append(S,z===null?"null":z.toString());});let u=d.toString();return u.length>0?`/customers?${u}`:"/customers"},Bce=async(i,d)=>m(MDe(i),{...d,method:"GET"}),TDe=i=>`/customers/${i}`,Nce=async(i,d)=>m(TDe(i),{...d,method:"GET"}),kDe=i=>`/customers/${i}`,Oce=async(i,d,u)=>m(kDe(i),{...u,method:"PATCH",headers:{"Content-Type":"application/json",...u?.headers},body:JSON.stringify(d)}),BDe=i=>`/customers/${i}`,Fce=async(i,d)=>m(BDe(i),{...d,method:"DELETE"}),NDe=i=>`/customers/${i}/restore`,Uce=async(i,d)=>m(NDe(i),{...d,method:"POST"}),ODe=i=>`/customers/${i}/permanent`,jce=async(i,d)=>m(ODe(i),{...d,method:"DELETE"});var gt={create:g(kce),list:V(Bce),get:g(Nce),update:g(Oce),delete:g(Fce),restoreCustomer:g(Uce),permanentDeleteCustomer:g(jce)};var FDe=i=>`/delivery-notes/shareable/${i}`,qce=async(i,d)=>m(FDe(i),{...d,method:"GET"}),UDe=(i,d)=>{let u=new URLSearchParams;Object.entries(d||{}).forEach(([z,T])=>{T!==void 0&&u.append(z,T===null?"null":T.toString());});let S=u.toString();return S.length>0?`/delivery-notes/shareable/${i}/html?${S}`:`/delivery-notes/shareable/${i}/html`},Wce=async(i,d,u)=>m(UDe(i,d),{...u,method:"GET"}),jDe=(i,d)=>{let u=new URLSearchParams;Object.entries(d||{}).forEach(([z,T])=>{T!==void 0&&u.append(z,T===null?"null":T.toString());});let S=u.toString();return S.length>0?`/delivery-notes/shareable/${i}/pdf?${S}`:`/delivery-notes/shareable/${i}/pdf`},Gce=async(i,d,u)=>m(jDe(i,d),{...u,method:"GET"}),qDe=()=>"/delivery-notes",Vce=async(i,d)=>m(qDe(),{...d,method:"POST",headers:{"Content-Type":"application/json",...d?.headers},body:JSON.stringify(i)}),WDe=i=>{let d=new URLSearchParams;Object.entries(i||{}).forEach(([S,z])=>{z!==void 0&&d.append(S,z===null?"null":z.toString());});let u=d.toString();return u.length>0?`/delivery-notes?${u}`:"/delivery-notes"},Lce=async(i,d)=>m(WDe(i),{...d,method:"GET"}),GDe=()=>"/delivery-notes/custom",Hce=async(i,d)=>m(GDe(),{...d,method:"POST",headers:{"Content-Type":"application/json",...d?.headers},body:JSON.stringify(i)}),VDe=(i,d)=>{let u=new URLSearchParams;Object.entries(d||{}).forEach(([z,T])=>{T!==void 0&&u.append(z,T===null?"null":T.toString());});let S=u.toString();return S.length>0?`/delivery-notes/${i}?${S}`:`/delivery-notes/${i}`},Yce=async(i,d,u)=>m(VDe(i,d),{...u,method:"GET"}),LDe=i=>`/delivery-notes/${i}`,Kce=async(i,d,u)=>m(LDe(i),{...u,method:"PATCH",headers:{"Content-Type":"application/json",...u?.headers},body:JSON.stringify(d)}),HDe=i=>`/delivery-notes/${i}/versions`,$ce=async(i,d)=>m(HDe(i),{...d,method:"GET"}),YDe=(i,d)=>`/delivery-notes/${i}/versions/${d}`,Qce=async(i,d,u)=>m(YDe(i,d),{...u,method:"GET"}),KDe=i=>{let d=new URLSearchParams;Object.entries(i||{}).forEach(([S,z])=>{z!==void 0&&d.append(S,z===null?"null":z.toString());});let u=d.toString();return u.length>0?`/delivery-notes/render?${u}`:"/delivery-notes/render"},Jce=async(i,d,u)=>m(KDe(d),{...u,method:"POST",headers:{"Content-Type":"application/json",...u?.headers},body:JSON.stringify(i)}),$De=i=>`/delivery-notes/${i}/void`,Zce=async(i,d,u)=>m($De(i),{...u,method:"POST",headers:{"Content-Type":"application/json",...u?.headers},body:JSON.stringify(d)});var yt={getShareableDeliveryNote:g(qce),getShareableDeliveryNoteHtml:g(Wce),getShareableDeliveryNotePdf:g(Gce),create:g(Vce),list:V(Lce),createCustom:g(Hce),get:g(Yce),update:g(Kce),getVersions:g($ce),getVersion:g(Qce),renderDeliveryNotePreview:g(Jce),void:g(Zce)};var QDe=i=>{let d=new URLSearchParams;Object.entries(i||{}).forEach(([S,z])=>{z!==void 0&&d.append(S,z===null?"null":z.toString());});let u=d.toString();return u.length>0?`/documents/next-number?${u}`:"/documents/next-number"},Xce=async(i,d)=>m(QDe(i),{...d,method:"GET"}),JDe=i=>{let d=new URLSearchParams;Object.entries(i||{}).forEach(([S,z])=>{z!==void 0&&d.append(S,z===null?"null":z.toString());});let u=d.toString();return u.length>0?`/documents/calculate?${u}`:"/documents/calculate"},ele=async(i,d,u)=>m(JDe(d),{...u,method:"POST",headers:{"Content-Type":"application/json",...u?.headers},body:JSON.stringify(i)}),ZDe=(i,d)=>{let u=new URLSearchParams;Object.entries(d||{}).forEach(([z,T])=>{T!==void 0&&u.append(z,T===null?"null":T.toString());});let S=u.toString();return S.length>0?`/documents/${i}/finalize?${S}`:`/documents/${i}/finalize`},tle=async(i,d,u,S)=>m(ZDe(i,u),{...S,method:"POST",headers:{"Content-Type":"application/json",...S?.headers},body:JSON.stringify(d)}),XDe=(i,d)=>{let u=new URLSearchParams;Object.entries(d||{}).forEach(([z,T])=>{T!==void 0&&u.append(z,T===null?"null":T.toString());});let S=u.toString();return S.length>0?`/documents/${i}/fiscalize?${S}`:`/documents/${i}/fiscalize`},ole=async(i,d,u)=>m(XDe(i,d),{...u,method:"POST"}),e4e=(i,d)=>{let u=new URLSearchParams;Object.entries(d||{}).forEach(([z,T])=>{T!==void 0&&u.append(z,T===null?"null":T.toString());});let S=u.toString();return S.length>0?`/documents/${i}?${S}`:`/documents/${i}`},nle=async(i,d,u)=>m(e4e(i,d),{...u,method:"DELETE"}),t4e=(i,d)=>{let u=new URLSearchParams;Object.entries(d||{}).forEach(([z,T])=>{T!==void 0&&u.append(z,T===null?"null":T.toString());});let S=u.toString();return S.length>0?`/documents/${i}/restore?${S}`:`/documents/${i}/restore`},sle=async(i,d,u)=>m(t4e(i,d),{...u,method:"POST"}),o4e=(i,d)=>{let u=new URLSearchParams;Object.entries(d||{}).forEach(([z,T])=>{T!==void 0&&u.append(z,T===null?"null":T.toString());});let S=u.toString();return S.length>0?`/documents/${i}/permanent?${S}`:`/documents/${i}/permanent`},rle=async(i,d,u)=>m(o4e(i,d),{...u,method:"DELETE"}),n4e=i=>`/documents/${i}/send`,ile=async(i,d,u)=>m(n4e(i),{...u,method:"POST",headers:{"Content-Type":"application/json",...u?.headers},body:JSON.stringify(d)}),s4e=i=>`/documents/${i}/share`,ale=async(i,d)=>m(s4e(i),{...d,method:"POST"}),r4e=i=>`/documents/${i}/share`,dle=async(i,d)=>m(r4e(i),{...d,method:"GET"}),i4e=i=>`/documents/${i}/share`,cle=async(i,d)=>m(i4e(i),{...d,method:"DELETE"});var ht={getNextNumber:g(Xce),calculateDocumentPreview:g(ele),finalizeDocument:g(tle),fiscalizeDocument:g(ole),delete:g(nle),restoreDocument:g(sle),permanentDeleteDocument:g(rle),sendDocument:g(ile),shareDocument:g(ale),getShareableId:g(dle),unshareDocument:g(cle)};var a4e=()=>"/e-invoicing/settings",lle=async i=>m(a4e(),{...i,method:"GET"}),d4e=()=>"/e-invoicing/settings",ule=async(i,d)=>m(d4e(),{...d,method:"PATCH",headers:{"Content-Type":"application/json",...d?.headers},body:JSON.stringify(i)}),c4e=()=>"/e-invoicing/supplier",ple=async(i,d)=>m(c4e(),{...d,method:"POST",headers:{"Content-Type":"application/json",...d?.headers},body:JSON.stringify(i)}),l4e=()=>"/e-invoicing/supplier",mle=async i=>m(l4e(),{...i,method:"GET"});var u4e=()=>"/e-invoicing/customer-search",gle=async(i,d)=>m(u4e(),{...d,method:"POST",headers:{"Content-Type":"application/json",...d?.headers},body:JSON.stringify(i)}),p4e=()=>"/e-invoicing/send/:documentType/:documentId",yle=async(i,d)=>m(p4e(),{...d,method:"POST",headers:{"Content-Type":"application/json",...d?.headers},body:JSON.stringify(i)}),m4e=i=>{let d=new URLSearchParams;Object.entries(i||{}).forEach(([S,z])=>{z!==void 0&&d.append(S,z===null?"null":z.toString());});let u=d.toString();return u.length>0?`/e-invoicing/submissions?${u}`:"/e-invoicing/submissions"},hle=async(i,d)=>m(m4e(i),{...d,method:"GET"}),g4e=()=>"/e-invoicing/submissions/:id",ble=async i=>m(g4e(),{...i,method:"GET"}),y4e=()=>"/e-invoicing/submissions/:id/retry",xle=async i=>m(y4e(),{...i,method:"POST"}),h4e=()=>"/e-invoicing/webhooks/flowin",zle=async(i,d)=>m(h4e(),{...d,method:"POST",headers:{"Content-Type":"application/json",...d?.headers},body:JSON.stringify(i)});var bt={list:g(lle),update:g(ule),registerEInvoicingSupplier:g(ple),getEInvoicingSupplier:g(mle),searchEInvoicingCustomer:g(gle),sendEInvoice:g(yle),listEInvoicingSubmissions:g(hle),getEInvoicingSubmission:g(ble),retryEInvoicingSubmission:g(xle),handleFlowinWebhook:g(zle)};var b4e=()=>"/email/send",_le=async(i,d)=>m(b4e(),{...d,method:"POST",headers:{"Content-Type":"application/json",...d?.headers},body:JSON.stringify(i)});var xt={sendEmail:g(_le)};var x4e=()=>"/entities",vle=async(i,d)=>m(x4e(),{...d,method:"POST",headers:{"Content-Type":"application/json",...d?.headers},body:JSON.stringify(i)}),z4e=i=>{let d=new URLSearchParams;Object.entries(i||{}).forEach(([S,z])=>{z!==void 0&&d.append(S,z===null?"null":z.toString());});let u=d.toString();return u.length>0?`/entities?${u}`:"/entities"},fle=async(i,d)=>m(z4e(i),{...d,method:"GET"}),_4e=i=>`/entities/${i}`,Rle=async(i,d)=>m(_4e(i),{...d,method:"GET"}),v4e=i=>`/entities/${i}`,Ile=async(i,d,u)=>m(v4e(i),{...u,method:"PUT",headers:{"Content-Type":"application/json",...u?.headers},body:JSON.stringify(d)}),f4e=i=>`/entities/${i}/enable`,Ele=async(i,d)=>m(f4e(i),{...d,method:"POST"}),R4e=i=>`/entities/${i}/disable`,Sle=async(i,d)=>m(R4e(i),{...d,method:"POST"});var zt={create:g(vle),list:V(fle),get:g(Rle),update:g(Ile),enableEntity:g(Ele),disableEntity:g(Sle)};var I4e=()=>"/entities/api-keys",Dle=async i=>m(I4e(),{...i,method:"GET"}),E4e=()=>"/entities/api-keys",Ple=async(i,d)=>m(E4e(),{...d,method:"POST",headers:{"Content-Type":"application/json",...d?.headers},body:JSON.stringify(i)}),S4e=i=>`/entities/api-keys/${i}`,wle=async(i,d)=>m(S4e(i),{...d,method:"DELETE"});var _t={listEntityApiKeys:g(Dle),create:g(Ple),delete:g(wle)};var D4e=()=>"/entities/invitations",Cle=async i=>m(D4e(),{...i,method:"GET"}),P4e=i=>`/entities/invitations/${i}`,Ale=async(i,d)=>m(P4e(i),{...d,method:"GET"}),w4e=i=>`/entities/invitations/${i}`,Mle=async(i,d)=>m(w4e(i),{...d,method:"DELETE"}),C4e=i=>`/entities/invitations/${i}/resend`,Tle=async(i,d)=>m(C4e(i),{...d,method:"POST"}),A4e=i=>{let d=new URLSearchParams;Object.entries(i||{}).forEach(([S,z])=>{z!==void 0&&d.append(S,z===null?"null":z.toString());});let u=d.toString();return u.length>0?`/invitations/accept?${u}`:"/invitations/accept"},kle=async(i,d,u)=>m(A4e(d),{...u,method:"POST",headers:{"Content-Type":"application/json",...u?.headers},body:JSON.stringify(i)});var vt={listEntityInvitations:g(Cle),getEntityInvitation:g(Ale),cancelEntityInvitation:g(Mle),resendEntityInvitation:g(Tle),acceptEntityInvitation:g(kle)};var M4e=()=>"/stats/query",Ble=async(i,d)=>m(M4e(),{...d,method:"POST",headers:{"Content-Type":"application/json",...d?.headers},body:JSON.stringify(i)});var ft={queryEntityStats:g(Ble)};var T4e=()=>"/entities/users",Nle=async i=>m(T4e(),{...i,method:"GET"}),k4e=()=>"/entities/users",Ole=async(i,d)=>m(k4e(),{...d,method:"POST",headers:{"Content-Type":"application/json",...d?.headers},body:JSON.stringify(i)}),B4e=i=>`/entities/users/${i}`,Fle=async(i,d,u)=>m(B4e(i),{...u,method:"PATCH",headers:{"Content-Type":"application/json",...u?.headers},body:JSON.stringify(d)}),N4e=i=>`/entities/users/${i}`,Ule=async(i,d)=>m(N4e(i),{...d,method:"DELETE"}),O4e=i=>`/entities/users/${i}/token`,jle=async(i,d)=>m(O4e(i),{...d,method:"POST"});var Rt={list:g(Nle),addEntityUser:g(Ole),update:g(Fle),removeEntityUser:g(Ule),generateEntityUserToken:g(jle)};var F4e=i=>`/estimates/shareable/${i}`,qle=async(i,d)=>m(F4e(i),{...d,method:"GET"}),U4e=(i,d)=>{let u=new URLSearchParams;Object.entries(d||{}).forEach(([z,T])=>{T!==void 0&&u.append(z,T===null?"null":T.toString());});let S=u.toString();return S.length>0?`/estimates/shareable/${i}/html?${S}`:`/estimates/shareable/${i}/html`},Wle=async(i,d,u)=>m(U4e(i,d),{...u,method:"GET"}),j4e=(i,d)=>{let u=new URLSearchParams;Object.entries(d||{}).forEach(([z,T])=>{T!==void 0&&u.append(z,T===null?"null":T.toString());});let S=u.toString();return S.length>0?`/estimates/shareable/${i}/pdf?${S}`:`/estimates/shareable/${i}/pdf`},Gle=async(i,d,u)=>m(j4e(i,d),{...u,method:"GET"}),q4e=()=>"/estimates",Vle=async(i,d)=>m(q4e(),{...d,method:"POST",headers:{"Content-Type":"application/json",...d?.headers},body:JSON.stringify(i)}),W4e=i=>{let d=new URLSearchParams;Object.entries(i||{}).forEach(([S,z])=>{z!==void 0&&d.append(S,z===null?"null":z.toString());});let u=d.toString();return u.length>0?`/estimates?${u}`:"/estimates"},Lle=async(i,d)=>m(W4e(i),{...d,method:"GET"}),G4e=()=>"/estimates/custom",Hle=async(i,d)=>m(G4e(),{...d,method:"POST",headers:{"Content-Type":"application/json",...d?.headers},body:JSON.stringify(i)}),V4e=(i,d)=>{let u=new URLSearchParams;Object.entries(d||{}).forEach(([z,T])=>{T!==void 0&&u.append(z,T===null?"null":T.toString());});let S=u.toString();return S.length>0?`/estimates/${i}?${S}`:`/estimates/${i}`},Yle=async(i,d,u)=>m(V4e(i,d),{...u,method:"GET"}),L4e=i=>`/estimates/${i}`,Kle=async(i,d,u)=>m(L4e(i),{...u,method:"PATCH",headers:{"Content-Type":"application/json",...u?.headers},body:JSON.stringify(d)}),H4e=i=>`/estimates/${i}/versions`,$le=async(i,d)=>m(H4e(i),{...d,method:"GET"}),Y4e=(i,d)=>`/estimates/${i}/versions/${d}`,Qle=async(i,d,u)=>m(Y4e(i,d),{...u,method:"GET"}),K4e=i=>{let d=new URLSearchParams;Object.entries(i||{}).forEach(([S,z])=>{z!==void 0&&d.append(S,z===null?"null":z.toString());});let u=d.toString();return u.length>0?`/estimates/render?${u}`:"/estimates/render"},Jle=async(i,d,u)=>m(K4e(d),{...u,method:"POST",headers:{"Content-Type":"application/json",...u?.headers},body:JSON.stringify(i)});var It={getShareableEstimate:g(qle),getShareableEstimateHtml:g(Wle),getShareableEstimatePdf:g(Gle),create:g(Vle),list:V(Lle),createCustom:g(Hle),get:g(Yle),update:g(Kle),getVersions:g($le),getVersion:g(Qle),renderEstimatePreview:g(Jle)};var $4e=i=>{let d=new URLSearchParams;Object.entries(i||{}).forEach(([S,z])=>{z!==void 0&&d.append(S,z===null?"null":z.toString());});let u=d.toString();return u.length>0?`/documents/export?${u}`:"/documents/export"},Zle=async(i,d)=>m($4e(i),{...d,method:"GET"}),Q4e=i=>{let d=new URLSearchParams;Object.entries(i||{}).forEach(([S,z])=>{z!==void 0&&d.append(S,z===null?"null":z.toString());});let u=d.toString();return u.length>0?`/documents/export/sales-per-item?${u}`:"/documents/export/sales-per-item"},Xle=async(i,d)=>m(Q4e(i),{...d,method:"GET"}),J4e=()=>"/documents/export/pdf",eue=async(i,d)=>m(J4e(),{...d,method:"POST",headers:{"Content-Type":"application/json",...d?.headers},body:JSON.stringify(i)}),Z4e=i=>`/documents/export/pdf/${i}`,tue=async(i,d)=>m(Z4e(i),{...d,method:"GET"}),X4e=i=>`/documents/export/pdf/${i}/download`,oue=async(i,d)=>m(X4e(i),{...d,method:"GET"}),ePe=()=>"/documents/export/eslog",nue=async(i,d)=>m(ePe(),{...d,method:"POST",headers:{"Content-Type":"application/json",...d?.headers},body:JSON.stringify(i)});var tPe=i=>`/documents/export/eslog/${i}/download`,sue=async(i,d)=>m(tPe(i),{...d,method:"GET"});var Et={exportDocuments:g(Zle),exportSalesPerItem:g(Xle),startPdfExport:g(eue),list:V(tue),downloadPdfExport:g(oue),startEslogExport:g(nue),downloadEslogExport:g(sue)};var oPe=()=>"/files",rue=async(i,d)=>{let u=new FormData;return i.file!==void 0&&u.append("file",i.file),u.append("category",i.category),i.account_payable_id!==void 0&&u.append("account_payable_id",i.account_payable_id),i.incoming_purchase_document_id!==void 0&&u.append("incoming_purchase_document_id",i.incoming_purchase_document_id),m(oPe(),{...d,method:"POST",body:u})},nPe=i=>{let d=new URLSearchParams;Object.entries(i||{}).forEach(([S,z])=>{z!==void 0&&d.append(S,z===null?"null":z.toString());});let u=d.toString();return u.length>0?`/files?${u}`:"/files"},iue=async(i,d)=>m(nPe(i),{...d,method:"GET"}),sPe=i=>`/files/${i}`,aue=async(i,d)=>m(sPe(i),{...d,method:"GET"}),rPe=i=>`/files/${i}`,due=async(i,d)=>m(rPe(i),{...d,method:"DELETE"});var St={uploadFile:g(rue),list:V(iue),get:g(aue),delete:g(due)};var iPe=()=>"/fiscalization/fina/settings/certificate",cue=async(i,d)=>{let u=new FormData;return i.file!==void 0&&u.append("file",i.file),i.passphrase!==void 0&&u.append("passphrase",i.passphrase),m(iPe(),{...d,method:"POST",body:u})},aPe=()=>"/fiscalization/fina/settings/certificate",lue=async i=>m(aPe(),{...i,method:"GET"}),dPe=()=>"/fiscalization/fina/settings/certificate",uue=async i=>m(dPe(),{...i,method:"DELETE"});var Dt={uploadFinaCertificate:g(cue),getFinaCertificate:g(lue),delete:g(uue)};var cPe=i=>`/fiscalization/fina/premises/${i}/devices`,pue=async(i,d)=>m(cPe(i),{...d,method:"GET"}),lPe=i=>`/fiscalization/fina/premises/${i}/devices`,mue=async(i,d,u)=>m(lPe(i),{...u,method:"POST",headers:{"Content-Type":"application/json",...u?.headers},body:JSON.stringify(d)}),uPe=i=>`/fiscalization/fina/devices/${i}`,gue=async(i,d)=>m(uPe(i),{...d,method:"GET"}),pPe=i=>`/fiscalization/fina/devices/${i}`,yue=async(i,d)=>m(pPe(i),{...d,method:"DELETE"});var Pt={listFinaDevices:g(pue),registerFinaDevice:g(mue),getFinaDevice:g(gue),delete:g(yue)};var mPe=()=>"/fiscalization/fina/premises",hue=async i=>m(mPe(),{...i,method:"GET"}),gPe=()=>"/fiscalization/fina/premises",bue=async(i,d)=>m(gPe(),{...d,method:"POST",headers:{"Content-Type":"application/json",...d?.headers},body:JSON.stringify(i)}),yPe=i=>`/fiscalization/fina/premises/${i}`,xue=async(i,d)=>m(yPe(i),{...d,method:"GET"}),hPe=i=>`/fiscalization/fina/premises/${i}`,zue=async(i,d)=>m(hPe(i),{...d,method:"DELETE"});var wt={listFinaPremises:g(hue),create:g(bue),getFinaPremise:g(xue),delete:g(zue)};var bPe=()=>"/fiscalization/fina/settings",_ue=async i=>m(bPe(),{...i,method:"GET"}),xPe=()=>"/fiscalization/fina/settings",vue=async(i,d)=>m(xPe(),{...d,method:"PUT",headers:{"Content-Type":"application/json",...d?.headers},body:JSON.stringify(i)});var Ct={list:g(_ue),update:g(vue)};var zPe=()=>"/fiscalization/furs/settings/certificate",fue=async(i,d)=>{let u=new FormData;return i.file!==void 0&&u.append("file",i.file),i.passphrase!==void 0&&u.append("passphrase",i.passphrase),m(zPe(),{...d,method:"POST",body:u})},_Pe=()=>"/fiscalization/furs/settings/certificate",Rue=async i=>m(_Pe(),{...i,method:"GET"}),vPe=()=>"/fiscalization/furs/settings/certificate",Iue=async i=>m(vPe(),{...i,method:"DELETE"});var At={uploadFursCertificate:g(fue),getFursCertificate:g(Rue),delete:g(Iue)};var fPe=i=>`/fiscalization/furs/premises/${i}/devices`,Eue=async(i,d)=>m(fPe(i),{...d,method:"GET"}),RPe=i=>`/fiscalization/furs/premises/${i}/devices`,Sue=async(i,d,u)=>m(RPe(i),{...u,method:"POST",headers:{"Content-Type":"application/json",...u?.headers},body:JSON.stringify(d)}),IPe=i=>`/fiscalization/furs/devices/${i}`,Due=async(i,d)=>m(IPe(i),{...d,method:"GET"});var Mt={listFursElectronicDevices:g(Eue),registerFursElectronicDevice:g(Sue),getFursElectronicDevice:g(Due)};var EPe=()=>"/fiscalization/furs/internal-act/report.pdf",Pue=async i=>m(EPe(),{...i,method:"GET"}),SPe=()=>"/fiscalization/furs/internal-act/report.docx",wue=async i=>m(SPe(),{...i,method:"GET"});var Tt={generateFursInternalActPdf:g(Pue),generateFursInternalActDocx:g(wue)};var DPe=()=>"/fiscalization/furs/premises",Cue=async i=>m(DPe(),{...i,method:"GET"}),PPe=i=>`/fiscalization/furs/premises/${i}`,Aue=async(i,d)=>m(PPe(i),{...d,method:"GET"}),wPe=()=>"/fiscalization/furs/premises/real-estate",Mue=async(i,d)=>m(wPe(),{...d,method:"POST",headers:{"Content-Type":"application/json",...d?.headers},body:JSON.stringify(i)}),CPe=()=>"/fiscalization/furs/premises/movable",Tue=async(i,d)=>m(CPe(),{...d,method:"POST",headers:{"Content-Type":"application/json",...d?.headers},body:JSON.stringify(i)}),APe=i=>`/fiscalization/furs/premises/${i}/close`,kue=async(i,d)=>m(APe(i),{...d,method:"POST"});var kt={listFursBusinessPremises:g(Cue),getFursBusinessPremise:g(Aue),registerFursRealEstatePremise:g(Mue),registerFursMovablePremise:g(Tue),closeFursBusinessPremise:g(kue)};var MPe=()=>"/fiscalization/furs/settings",Bue=async i=>m(MPe(),{...i,method:"GET"}),TPe=()=>"/fiscalization/furs/settings",Nue=async(i,d)=>m(TPe(),{...d,method:"PUT",headers:{"Content-Type":"application/json",...d?.headers},body:JSON.stringify(i)});var Bt={list:g(Bue),update:g(Nue)};var kPe=()=>"/health/live",Oue=async i=>m(kPe(),{...i,method:"GET"}),BPe=()=>"/health/ready",Fue=async i=>m(BPe(),{...i,method:"GET"}),NPe=()=>"/health",Uue=async i=>m(NPe(),{...i,method:"GET"});var Nt={livenessCheck:g(Oue),readinessCheck:g(Fue),healthCheck:g(Uue)};var OPe=()=>"/incoming-purchase-documents",jue=async(i,d)=>m(OPe(),{...d,method:"POST",headers:{"Content-Type":"application/json",...d?.headers},body:JSON.stringify(i)}),FPe=i=>{let d=new URLSearchParams;Object.entries(i||{}).forEach(([S,z])=>{z!==void 0&&d.append(S,z===null?"null":z.toString());});let u=d.toString();return u.length>0?`/incoming-purchase-documents?${u}`:"/incoming-purchase-documents"},que=async(i,d)=>m(FPe(i),{...d,method:"GET"}),UPe=()=>"/incoming-purchase-documents/custom",Wue=async(i,d)=>m(UPe(),{...d,method:"POST",headers:{"Content-Type":"application/json",...d?.headers},body:JSON.stringify(i)}),jPe=i=>`/incoming-purchase-documents/${i}`,Gue=async(i,d)=>m(jPe(i),{...d,method:"GET"}),qPe=i=>`/incoming-purchase-documents/${i}`,Vue=async(i,d,u)=>m(qPe(i),{...u,method:"PATCH",headers:{"Content-Type":"application/json",...u?.headers},body:JSON.stringify(d)}),WPe=i=>`/incoming-purchase-documents/${i}/attachments`,Lue=async(i,d,u)=>{let S=new FormData;return d.file!==void 0&&S.append("file",d.file),m(WPe(i),{...u,method:"POST",body:S})};var GPe=(i,d)=>`/incoming-purchase-documents/${i}/attachments/${d}`,Hue=async(i,d,u)=>m(GPe(i,d),{...u,method:"DELETE"});var Ot={create:g(jue),list:V(que),createCustom:g(Wue),get:g(Gue),update:g(Vue),uploadIncomingPurchaseDocumentAttachment:g(Lue),delete:g(Hue)};var VPe=i=>`/invoices/shareable/${i}`,Yue=async(i,d)=>m(VPe(i),{...d,method:"GET"}),LPe=(i,d)=>{let u=new URLSearchParams;Object.entries(d||{}).forEach(([z,T])=>{T!==void 0&&u.append(z,T===null?"null":T.toString());});let S=u.toString();return S.length>0?`/invoices/shareable/${i}/html?${S}`:`/invoices/shareable/${i}/html`},Kue=async(i,d,u)=>m(LPe(i,d),{...u,method:"GET"}),HPe=(i,d)=>{let u=new URLSearchParams;Object.entries(d||{}).forEach(([z,T])=>{T!==void 0&&u.append(z,T===null?"null":T.toString());});let S=u.toString();return S.length>0?`/invoices/shareable/${i}/pdf?${S}`:`/invoices/shareable/${i}/pdf`},$ue=async(i,d,u)=>m(HPe(i,d),{...u,method:"GET"}),YPe=i=>`/invoices/shareable/${i}/eslog`,Que=async(i,d)=>m(YPe(i),{...d,method:"GET"}),KPe=()=>"/invoices",Jue=async(i,d)=>m(KPe(),{...d,method:"POST",headers:{"Content-Type":"application/json",...d?.headers},body:JSON.stringify(i)}),$Pe=i=>{let d=new URLSearchParams;Object.entries(i||{}).forEach(([S,z])=>{z!==void 0&&d.append(S,z===null?"null":z.toString());});let u=d.toString();return u.length>0?`/invoices?${u}`:"/invoices"},Zue=async(i,d)=>m($Pe(i),{...d,method:"GET"}),QPe=()=>"/invoices/custom",Xue=async(i,d)=>m(QPe(),{...d,method:"POST",headers:{"Content-Type":"application/json",...d?.headers},body:JSON.stringify(i)}),JPe=(i,d)=>{let u=new URLSearchParams;Object.entries(d||{}).forEach(([z,T])=>{T!==void 0&&u.append(z,T===null?"null":T.toString());});let S=u.toString();return S.length>0?`/invoices/${i}?${S}`:`/invoices/${i}`},epe=async(i,d,u)=>m(JPe(i,d),{...u,method:"GET"}),ZPe=i=>`/invoices/${i}`,tpe=async(i,d,u)=>m(ZPe(i),{...u,method:"PATCH",headers:{"Content-Type":"application/json",...u?.headers},body:JSON.stringify(d)}),XPe=i=>`/invoices/${i}/versions`,ope=async(i,d)=>m(XPe(i),{...d,method:"GET"}),e2e=(i,d)=>`/invoices/${i}/versions/${d}`,npe=async(i,d,u)=>m(e2e(i,d),{...u,method:"GET"}),t2e=i=>{let d=new URLSearchParams;Object.entries(i||{}).forEach(([S,z])=>{z!==void 0&&d.append(S,z===null?"null":z.toString());});let u=d.toString();return u.length>0?`/invoices/render?${u}`:"/invoices/render"},spe=async(i,d,u)=>m(t2e(d),{...u,method:"POST",headers:{"Content-Type":"application/json",...u?.headers},body:JSON.stringify(i)}),o2e=i=>`/invoices/${i}/void`,rpe=async(i,d,u)=>m(o2e(i),{...u,method:"POST",headers:{"Content-Type":"application/json",...u?.headers},body:JSON.stringify(d)}),n2e=i=>`/invoices/${i}/fiscalize`,ipe=async(i,d)=>m(n2e(i),{...d,method:"POST"}),s2e=(i,d)=>{let u=new URLSearchParams;Object.entries(d||{}).forEach(([z,T])=>{T!==void 0&&u.append(z,T===null?"null":T.toString());});let S=u.toString();return S.length>0?`/documents/${i}/html?${S}`:`/documents/${i}/html`},ape=async(i,d,u)=>m(s2e(i,d),{...u,method:"GET"}),r2e=(i,d)=>{let u=new URLSearchParams;Object.entries(d||{}).forEach(([z,T])=>{T!==void 0&&u.append(z,T===null?"null":T.toString());});let S=u.toString();return S.length>0?`/documents/${i}/pdf?${S}`:`/documents/${i}/pdf`},dpe=async(i,d,u)=>m(r2e(i,d),{...u,method:"GET"});function Ft(i,d){let u=URL.createObjectURL(i),S=document.createElement("a");S.href=u,S.download=d,document.body.appendChild(S),S.click(),document.body.removeChild(S),URL.revokeObjectURL(u);}var cpe=g(dpe),Ut={getShareableInvoice:g(Yue),getShareableInvoiceHtml:g(Kue),getShareableInvoicePdf:g($ue),getShareableInvoiceEslog:g(Que),create:g(Jue),list:V(Zue),createCustom:g(Xue),get:g(epe),update:g(tpe),getVersions:g(ope),getVersion:g(npe),renderInvoicePreview:g(spe),void:g(rpe),fiscalizeInvoice:g(ipe),renderHtml:g(ape),renderPdf:cpe,async downloadPdf(i,d,u,S){let z=await cpe(i,u,S);Ft(z,d);}};var i2e=()=>"/items",lpe=async(i,d)=>m(i2e(),{...d,method:"POST",headers:{"Content-Type":"application/json",...d?.headers},body:JSON.stringify(i)}),a2e=i=>{let d=new URLSearchParams;Object.entries(i||{}).forEach(([S,z])=>{z!==void 0&&d.append(S,z===null?"null":z.toString());});let u=d.toString();return u.length>0?`/items?${u}`:"/items"},upe=async(i,d)=>m(a2e(i),{...d,method:"GET"}),d2e=i=>`/items/${i}`,ppe=async(i,d,u)=>m(d2e(i),{...u,method:"PATCH",headers:{"Content-Type":"application/json",...u?.headers},body:JSON.stringify(d)}),c2e=i=>`/items/${i}`,mpe=async(i,d)=>m(c2e(i),{...d,method:"DELETE"}),l2e=i=>`/items/${i}/restore`,gpe=async(i,d)=>m(l2e(i),{...d,method:"POST"}),u2e=i=>`/items/${i}/permanent`,ype=async(i,d)=>m(u2e(i),{...d,method:"DELETE"});var jt={create:g(lpe),list:V(upe),update:g(ppe),delete:g(mpe),restoreItem:g(gpe),permanentDeleteItem:g(ype)};var p2e=()=>"/legacy-migration/auth",hpe=async(i,d)=>m(p2e(),{...d,method:"POST",headers:{"Content-Type":"application/json",...d?.headers},body:JSON.stringify(i)}),m2e=()=>"/legacy-migration/jobs",bpe=async(i,d)=>m(m2e(),{...d,method:"POST",headers:{"Content-Type":"application/json",...d?.headers},body:JSON.stringify(i)}),g2e=()=>"/legacy-migration/jobs",xpe=async i=>m(g2e(),{...i,method:"GET"}),y2e=i=>`/legacy-migration/jobs/${i}`,zpe=async(i,d)=>m(y2e(i),{...d,method:"GET"});var qt={legacyMigrationAuth:g(hpe),create:g(bpe),listMigrationJobs:g(xpe),getMigrationJob:g(zpe)};var h2e=()=>"/locale/detect",_pe=async i=>m(h2e(),{...i,method:"GET"});var Wt={detectLocale:g(_pe)};var b2e=()=>"/order-integrations/shopify/authorize",vpe=async(i,d)=>m(b2e(),{...d,method:"POST",headers:{"Content-Type":"application/json",...d?.headers},body:JSON.stringify(i)}),x2e=i=>`/order-integrations/${i}/sync-shopify`,fpe=async(i,d,u)=>m(x2e(i),{...u,method:"POST",headers:{"Content-Type":"application/json",...u?.headers},body:JSON.stringify(d)}),z2e=()=>"/order-integrations",Rpe=async(i,d)=>m(z2e(),{...d,method:"POST",headers:{"Content-Type":"application/json",...d?.headers},body:JSON.stringify(i)}),_2e=i=>{let d=new URLSearchParams;Object.entries(i||{}).forEach(([S,z])=>{z!==void 0&&d.append(S,z===null?"null":z.toString());});let u=d.toString();return u.length>0?`/order-integrations?${u}`:"/order-integrations"},Ipe=async(i,d)=>m(_2e(i),{...d,method:"GET"}),v2e=i=>`/order-integrations/${i}`,Epe=async(i,d)=>m(v2e(i),{...d,method:"GET"}),f2e=i=>`/order-integrations/${i}`,Spe=async(i,d,u)=>m(f2e(i),{...u,method:"PATCH",headers:{"Content-Type":"application/json",...u?.headers},body:JSON.stringify(d)}),R2e=i=>`/order-integrations/${i}`,Dpe=async(i,d)=>m(R2e(i),{...d,method:"DELETE"});var Gt={authorizeShopify:g(vpe),syncShopifyOrders:g(fpe),create:g(Rpe),list:V(Ipe),get:g(Epe),update:g(Spe),delete:g(Dpe)};var I2e=()=>"/orders",Ppe=async(i,d)=>m(I2e(),{...d,method:"POST",headers:{"Content-Type":"application/json",...d?.headers},body:JSON.stringify(i)}),E2e=i=>{let d=new URLSearchParams;Object.entries(i||{}).forEach(([S,z])=>{z!==void 0&&d.append(S,z===null?"null":z.toString());});let u=d.toString();return u.length>0?`/orders?${u}`:"/orders"},wpe=async(i,d)=>m(E2e(i),{...d,method:"GET"}),S2e=i=>`/orders/${i}`,Cpe=async(i,d)=>m(S2e(i),{...d,method:"GET"}),D2e=i=>`/orders/${i}`,Ape=async(i,d,u)=>m(D2e(i),{...u,method:"PATCH",headers:{"Content-Type":"application/json",...u?.headers},body:JSON.stringify(d)}),P2e=i=>`/orders/${i}`,Mpe=async(i,d)=>m(P2e(i),{...d,method:"DELETE"}),w2e=i=>`/orders/${i}/process`,Tpe=async(i,d)=>m(w2e(i),{...d,method:"POST"}),C2e=i=>`/orders/${i}/cancel`,kpe=async(i,d)=>m(C2e(i),{...d,method:"POST"}),A2e=i=>`/orders/${i}/reissue`,Bpe=async(i,d)=>m(A2e(i),{...d,method:"POST"});var Vt={create:g(Ppe),list:V(wpe),get:g(Cpe),update:g(Ape),delete:g(Mpe),processOrder:g(Tpe),cancelOrder:g(kpe),reissueOrder:g(Bpe)};var M2e=()=>"/payments",Npe=async(i,d)=>m(M2e(),{...d,method:"POST",headers:{"Content-Type":"application/json",...d?.headers},body:JSON.stringify(i)}),T2e=i=>{let d=new URLSearchParams;Object.entries(i||{}).forEach(([S,z])=>{z!==void 0&&d.append(S,z===null?"null":z.toString());});let u=d.toString();return u.length>0?`/payments?${u}`:"/payments"},Ope=async(i,d)=>m(T2e(i),{...d,method:"GET"}),k2e=(i,d)=>{let u=new URLSearchParams;Object.entries(d||{}).forEach(([z,T])=>{T!==void 0&&u.append(z,T===null?"null":T.toString());});let S=u.toString();return S.length>0?`/payments/${i}?${S}`:`/payments/${i}`},Fpe=async(i,d,u)=>m(k2e(i,d),{...u,method:"GET"}),B2e=i=>`/payments/${i}`,Upe=async(i,d,u)=>m(B2e(i),{...u,method:"PATCH",headers:{"Content-Type":"application/json",...u?.headers},body:JSON.stringify(d)}),N2e=i=>`/payments/${i}`,jpe=async(i,d)=>m(N2e(i),{...d,method:"DELETE"}),O2e=i=>`/payments/${i}/restore`,qpe=async(i,d)=>m(O2e(i),{...d,method:"POST"}),F2e=i=>`/payments/${i}/permanent`,Wpe=async(i,d)=>m(F2e(i),{...d,method:"DELETE"});var Lt={create:g(Npe),list:V(Ope),get:g(Fpe),update:g(Upe),delete:g(jpe),restorePayment:g(qpe),permanentDeletePayment:g(Wpe)};var U2e=()=>"/fiscalization/pt/atcud-series",Gpe=async(i,d)=>m(U2e(),{...d,method:"POST",headers:{"Content-Type":"application/json",...d?.headers},body:JSON.stringify(i)}),j2e=i=>{let d=new URLSearchParams;Object.entries(i||{}).forEach(([S,z])=>{z!==void 0&&d.append(S,z===null?"null":z.toString());});let u=d.toString();return u.length>0?`/fiscalization/pt/atcud-series?${u}`:"/fiscalization/pt/atcud-series"},Vpe=async(i,d)=>m(j2e(i),{...d,method:"GET"}),q2e=i=>`/fiscalization/pt/atcud-series/${i}`,Lpe=async(i,d)=>m(q2e(i),{...d,method:"GET"}),W2e=i=>{let d=new URLSearchParams;Object.entries(i||{}).forEach(([S,z])=>{z!==void 0&&d.append(S,z===null?"null":z.toString());});let u=d.toString();return u.length>0?`/fiscalization/pt/atcud-series/active?${u}`:"/fiscalization/pt/atcud-series/active"},Hpe=async(i,d)=>m(W2e(i),{...d,method:"POST"});var Ht={create:g(Gpe),list:V(Vpe),get:g(Lpe),getActive:g(Hpe)};var G2e=i=>{let d=new URLSearchParams;Object.entries(i||{}).forEach(([S,z])=>{z!==void 0&&d.append(S,z===null?"null":z.toString());});let u=d.toString();return u.length>0?`/fiscalization/pt/saft/report?${u}`:"/fiscalization/pt/saft/report"},Ype=async(i,d)=>m(G2e(i),{...d,method:"GET"});var Yt={generateReport:g(Ype)};var V2e=()=>"/recurring-invoices",Kpe=async(i,d)=>m(V2e(),{...d,method:"POST",headers:{"Content-Type":"application/json",...d?.headers},body:JSON.stringify(i)}),L2e=i=>{let d=new URLSearchParams;Object.entries(i||{}).forEach(([S,z])=>{z!==void 0&&d.append(S,z===null?"null":z.toString());});let u=d.toString();return u.length>0?`/recurring-invoices?${u}`:"/recurring-invoices"},$pe=async(i,d)=>m(L2e(i),{...d,method:"GET"}),H2e=i=>`/recurring-invoices/${i}`,Qpe=async(i,d)=>m(H2e(i),{...d,method:"GET"}),Y2e=i=>`/recurring-invoices/${i}`,Jpe=async(i,d,u)=>m(Y2e(i),{...u,method:"PATCH",headers:{"Content-Type":"application/json",...u?.headers},body:JSON.stringify(d)}),K2e=i=>`/recurring-invoices/${i}`,Zpe=async(i,d)=>m(K2e(i),{...d,method:"DELETE"}),$2e=i=>`/recurring-invoices/${i}/restore`,Xpe=async(i,d)=>m($2e(i),{...d,method:"POST"}),Q2e=i=>`/recurring-invoices/${i}/permanent`,eme=async(i,d)=>m(Q2e(i),{...d,method:"DELETE"}),J2e=i=>`/recurring-invoices/${i}/pause`,tme=async(i,d)=>m(J2e(i),{...d,method:"POST"}),Z2e=i=>`/recurring-invoices/${i}/resume`,ome=async(i,d)=>m(Z2e(i),{...d,method:"POST"}),X2e=i=>`/recurring-invoices/${i}/trigger`,nme=async(i,d)=>m(X2e(i),{...d,method:"POST"});var Kt={create:g(Kpe),list:V($pe),get:g(Qpe),update:g(Jpe),delete:g(Zpe),restoreRecurringInvoice:g(Xpe),permanentDeleteRecurringInvoice:g(eme),pauseRecurringInvoice:g(tme),resumeRecurringInvoice:g(ome),triggerRecurringInvoice:g(nme)};var ewe=()=>"/stripe-app/authorize",sme=async i=>m(ewe(),{...i,method:"GET"}),twe=i=>{let d=new URLSearchParams;Object.entries(i||{}).forEach(([S,z])=>{z!==void 0&&d.append(S,z===null?"null":z.toString());});let u=d.toString();return u.length>0?`/stripe-app/oauth/callback?${u}`:"/stripe-app/oauth/callback"},rme=async(i,d)=>m(twe(i),{...d,method:"GET"}),owe=()=>"/stripe-app/webhooks",ime=async i=>m(owe(),{...i,method:"POST"}),nwe=()=>"/stripe-app/marketplace-authorize",ame=async(i,d)=>m(nwe(),{...d,method:"POST",headers:{"Content-Type":"application/json",...d?.headers},body:JSON.stringify(i)}),swe=()=>"/stripe-app/connect",dme=async(i,d)=>m(swe(),{...d,method:"POST",headers:{"Content-Type":"application/json",...d?.headers},body:JSON.stringify(i)}),rwe=()=>"/stripe-app/connection",cme=async i=>m(rwe(),{...i,method:"GET"}),iwe=()=>"/stripe-app/connection",lme=async i=>m(iwe(),{...i,method:"DELETE"}),awe=()=>"/stripe-app/settings",ume=async i=>m(awe(),{...i,method:"GET"}),dwe=()=>"/stripe-app/settings",pme=async(i,d)=>m(dwe(),{...d,method:"PATCH",headers:{"Content-Type":"application/json",...d?.headers},body:JSON.stringify(i)}),cwe=()=>"/stripe-app/invoices",mme=async(i,d)=>m(cwe(),{...d,method:"POST",headers:{"Content-Type":"application/json",...d?.headers},body:JSON.stringify(i)}),lwe=i=>{let d=new URLSearchParams;Object.entries(i||{}).forEach(([S,z])=>{z!==void 0&&d.append(S,z===null?"null":z.toString());});let u=d.toString();return u.length>0?`/stripe-app/invoices?${u}`:"/stripe-app/invoices"},gme=async(i,d)=>m(lwe(i),{...d,method:"GET"}),uwe=i=>{let d=new URLSearchParams;Object.entries(i||{}).forEach(([S,z])=>{z!==void 0&&d.append(S,z===null?"null":z.toString());});let u=d.toString();return u.length>0?`/stripe-app/invoices/lookup?${u}`:"/stripe-app/invoices/lookup"},yme=async(i,d)=>m(uwe(i),{...d,method:"GET"}),pwe=i=>`/stripe-app/invoices/${i}`,hme=async(i,d)=>m(pwe(i),{...d,method:"GET"}),mwe=()=>"/stripe-app/entity-connection",bme=async i=>m(mwe(),{...i,method:"GET"}),gwe=()=>"/stripe-app/entity-connection",xme=async i=>m(gwe(),{...i,method:"DELETE"}),ywe=()=>"/stripe-app/entity-settings",zme=async i=>m(ywe(),{...i,method:"GET"}),hwe=()=>"/stripe-app/entity-settings",_me=async(i,d)=>m(hwe(),{...d,method:"PATCH",headers:{"Content-Type":"application/json",...d?.headers},body:JSON.stringify(i)});var $t={stripeAppAuthorize:g(sme),stripeAppOAuthCallback:g(rme),stripeAppWebhook:g(ime),stripeAppMarketplaceAuthorize:g(ame),stripeAppConnect:g(dme),stripeAppGetConnection:g(cme),stripeAppDisconnect:g(lme),stripeAppGetSettings:g(ume),stripeAppUpdateSettings:g(pme),stripeAppCreateInvoice:g(mme),stripeAppListInvoices:g(gme),stripeAppLookupInvoice:g(yme),stripeAppGetInvoice:g(hme),stripeAppEntityGetConnection:g(bme),stripeAppEntityDisconnect:g(xme),stripeAppEntityGetSettings:g(zme),stripeAppEntityUpdateSettings:g(_me)};var bwe=()=>"/suppliers",vme=async(i,d)=>m(bwe(),{...d,method:"POST",headers:{"Content-Type":"application/json",...d?.headers},body:JSON.stringify(i)}),xwe=i=>{let d=new URLSearchParams;Object.entries(i||{}).forEach(([S,z])=>{z!==void 0&&d.append(S,z===null?"null":z.toString());});let u=d.toString();return u.length>0?`/suppliers?${u}`:"/suppliers"},fme=async(i,d)=>m(xwe(i),{...d,method:"GET"}),zwe=i=>`/suppliers/${i}`,Rme=async(i,d)=>m(zwe(i),{...d,method:"GET"}),_we=i=>`/suppliers/${i}`,Ime=async(i,d,u)=>m(_we(i),{...u,method:"PATCH",headers:{"Content-Type":"application/json",...u?.headers},body:JSON.stringify(d)});var Qt={create:g(vme),list:V(fme),get:g(Rme),update:g(Ime)};var vwe=i=>{let d=new URLSearchParams;Object.entries(i||{}).forEach(([S,z])=>{z!==void 0&&d.append(S,z===null?"null":z.toString());});let u=d.toString();return u.length>0?`/tax-reports/kir?${u}`:"/tax-reports/kir"},Eme=async(i,d)=>m(vwe(i),{...d,method:"POST"}),fwe=()=>"/tax-reports/si/profile",Sme=async i=>m(fwe(),{...i,method:"GET"}),Rwe=()=>"/tax-reports/si/profile",Dme=async(i,d)=>m(Rwe(),{...d,method:"PUT",headers:{"Content-Type":"application/json",...d?.headers},body:JSON.stringify(i)}),Iwe=()=>"/tax-reports/si/yearly/normirani/review",Pme=async(i,d)=>m(Iwe(),{...d,method:"POST",headers:{"Content-Type":"application/json",...d?.headers},body:JSON.stringify(i)}),Ewe=()=>"/tax-reports/si/yearly/normirani/export",wme=async(i,d)=>m(Ewe(),{...d,method:"POST",headers:{"Content-Type":"application/json",...d?.headers},body:JSON.stringify(i)}),Swe=()=>"/tax-reports/si/accounting/vod/export",Cme=async(i,d)=>m(Swe(),{...d,method:"POST",headers:{"Content-Type":"application/json",...d?.headers},body:JSON.stringify(i)});var Jt={generateKirExport:g(Eme),getSloveniaTaxProfile:g(Sme),updateSloveniaTaxProfile:g(Dme),reviewSloveniaYearlyNormiraniReport:g(Pme),exportSloveniaYearlyNormiraniReport:g(wme),exportSloveniaVodXml:g(Cme)};var Dwe=()=>"/taxes",Ame=async(i,d)=>m(Dwe(),{...d,method:"POST",headers:{"Content-Type":"application/json",...d?.headers},body:JSON.stringify(i)}),Pwe=i=>{let d=new URLSearchParams;Object.entries(i||{}).forEach(([S,z])=>{z!==void 0&&d.append(S,z===null?"null":z.toString());});let u=d.toString();return u.length>0?`/taxes?${u}`:"/taxes"},Mme=async(i,d)=>m(Pwe(i),{...d,method:"GET"}),wwe=i=>`/taxes/${i}`,Tme=async(i,d,u)=>m(wwe(i),{...u,method:"PATCH",headers:{"Content-Type":"application/json",...u?.headers},body:JSON.stringify(d)}),Cwe=i=>`/taxes/${i}`,kme=async(i,d,u)=>m(Cwe(i),{...u,method:"PUT",headers:{"Content-Type":"application/json",...u?.headers},body:JSON.stringify(d)}),Awe=i=>`/taxes/${i}`,Bme=async(i,d)=>m(Awe(i),{...d,method:"DELETE"}),Mwe=i=>`/taxes/${i}/restore`,Nme=async(i,d)=>m(Mwe(i),{...d,method:"POST"}),Twe=i=>`/taxes/${i}/permanent`,Ome=async(i,d)=>m(Twe(i),{...d,method:"DELETE"});var Zt={create:g(Ame),list:V(Mme),update:g(Tme),replaceTax:g(kme),delete:g(Bme),restoreTax:g(Nme),permanentDeleteTax:g(Ome)};var kwe=()=>"/transaction-type/check",Fme=async(i,d)=>m(kwe(),{...d,method:"POST",headers:{"Content-Type":"application/json",...d?.headers},body:JSON.stringify(i)});var Xt={checkTransactionType:g(Fme)};var le="https://eu.spaceinvoices.com";var Bwe=()=>"/upload/image",Ume=async(i,d)=>{let u=new FormData;return u.append("file",i.file),m(Bwe(),{...d,method:"POST",body:u})};var eo={uploadImage:g(Ume)};var Nwe=()=>"/users/me",jme=async i=>m(Nwe(),{...i,method:"GET"}),Owe=()=>"/users/me",qme=async(i,d)=>m(Owe(),{...d,method:"PATCH",headers:{"Content-Type":"application/json",...d?.headers},body:JSON.stringify(i)}),Fwe=()=>"/users/me/settings/furs",Wme=async(i,d)=>m(Fwe(),{...d,method:"PUT",headers:{"Content-Type":"application/json",...d?.headers},body:JSON.stringify(i)}),Uwe=()=>"/users/me/settings/fina",Gme=async(i,d)=>m(Uwe(),{...d,method:"PUT",headers:{"Content-Type":"application/json",...d?.headers},body:JSON.stringify(i)});var to={getMe:g(jme),update:g(qme),updateFursSettings:g(Wme),updateFinaSettings:g(Gme)};var jwe=()=>"/vies/check",Vme=async(i,d)=>m(jwe(),{...d,method:"POST",headers:{"Content-Type":"application/json",...d?.headers},body:JSON.stringify(i)});var oo={checkVies:g(Vme)};var qwe=()=>"/webhooks",Lme=async(i,d)=>m(qwe(),{...d,method:"POST",headers:{"Content-Type":"application/json",...d?.headers},body:JSON.stringify(i)}),Wwe=i=>{let d=new URLSearchParams;Object.entries(i||{}).forEach(([S,z])=>{z!==void 0&&d.append(S,z===null?"null":z.toString());});let u=d.toString();return u.length>0?`/webhooks?${u}`:"/webhooks"},Hme=async(i,d)=>m(Wwe(i),{...d,method:"GET"}),Gwe=i=>`/webhooks/${i}`,Yme=async(i,d)=>m(Gwe(i),{...d,method:"GET"}),Vwe=i=>`/webhooks/${i}`,Kme=async(i,d,u)=>m(Vwe(i),{...u,method:"PATCH",headers:{"Content-Type":"application/json",...u?.headers},body:JSON.stringify(d)}),Lwe=i=>`/webhooks/${i}`,$me=async(i,d)=>m(Lwe(i),{...d,method:"DELETE"}),Hwe=i=>`/webhooks/${i}/test`,Qme=async(i,d)=>m(Hwe(i),{...d,method:"POST"});var Ywe=i=>`/webhooks/${i}/rotate-secret`,Jme=async(i,d)=>m(Ywe(i),{...d,method:"POST"});var no={create:g(Lme),list:V(Hme),get:g(Yme),update:g(Kme),delete:g($me),testWebhook:g(Qme),rotateWebhookSecret:g(Jme)};var Kwe=()=>"/white-label-subscriptions",Zme=async i=>m(Kwe(),{...i,method:"GET"}),$we=()=>"/white-label-subscriptions/plans",Xme=async i=>m($we(),{...i,method:"GET"}),Qwe=i=>`/white-label-subscriptions/check-feature/${i}`,ege=async(i,d)=>m(Qwe(i),{...d,method:"GET"}),Jwe=i=>`/white-label-subscriptions/check-limit/${i}`,tge=async(i,d)=>m(Jwe(i),{...d,method:"GET"}),Zwe=()=>"/white-label-subscriptions/billing-email",oge=async(i,d)=>m(Zwe(),{...d,method:"PATCH",headers:{"Content-Type":"application/json",...d?.headers},body:JSON.stringify(i)});var so={getCurrentWLSubscription:g(Zme),list:g(Xme),checkWLFeature:g(ege),checkWLLimit:g(tge),update:g(oge)};var Xwe=()=>"/white-labels/current",nge=async i=>m(Xwe(),{...i,method:"GET"});var ro={getCurrentWhiteLabel:g(nge)};var ce=class{accountWebhooks=ct;activities=lt;advanceInvoices=ut;companyRegistry=pt;creditNotes=mt;customers=gt;deliveryNotes=yt;documents=ht;eInvoicing=bt;email=xt;entities=zt;entityApiKeys=_t;entityInvitations=vt;entityStats=ft;entityUsers=Rt;estimates=It;exports=Et;files=St;finaCertificate=Dt;finaDevices=Pt;finaPremises=wt;finaSettings=Ct;fursCertificate=At;fursDevices=Mt;fursInternalAct=Tt;fursPremises=kt;fursSettings=Bt;health=Nt;incomingPurchaseDocuments=Ot;invoices=Ut;items=jt;legacyMigration=qt;locale=Wt;orderIntegrations=Gt;orders=Vt;payments=Lt;ptAtcudSeries=Ht;ptSafT=Yt;recurringInvoices=Kt;stripeApp=$t;suppliers=Qt;taxReports=Jt;taxes=Zt;transactionType=Xt;upload=eo;users=to;vies=oo;webhooks=no;whiteLabelSubscriptions=so;whiteLabels=ro;constructor(d){let u=typeof d=="string"?{accessToken:d}:d,S=typeof u.accessToken=="function"?u.accessToken:()=>u.accessToken;ue({baseUrl:u.basePath??le,getAccessToken:S,clientName:u.clientName??"js-sdk",onUnauthorized:u.onUnauthorized});}};async function eCe(i,d,u){let S=new URLSearchParams({type:d.type}).toString();return m(`/eslog/${i}/download?${S}`,{...u,method:"GET"})}var tCe={download:g(eCe)};function oCe(i){let d=typeof i=="string"?{accessToken:i}:i,u=typeof d.accessToken=="function"?d.accessToken:()=>d.accessToken;ue({baseUrl:d.basePath??le,getAccessToken:u,clientName:d.clientName??"js-sdk",onUnauthorized:d.onUnauthorized});}
|
|
232
|
+
export{iCe as AccountWebhookDeliveryStatus,dCe as AccountWebhookResponseEventsItem,lCe as AccountWebhookWithSecretEventsItem,pCe as AddEntityUserBodyRole,gCe as AdvanceInvoiceCalculationMode,hCe as AdvanceInvoiceItemClassification,xCe as AdvanceInvoiceItemType,_Ce as AdvanceInvoiceTransactionType,io as CLIENT_HEADER_NAME,ICe as CalculateDocumentPreviewCalculationMode,SCe as CalculateDocumentPreviewType,fCe as CalculatedItemType,PCe as CompleteAdvanceInvoicePreviewCalculationMode,CCe as CompleteCreditNotePreviewCalculationMode,MCe as CompleteDeliveryNotePreviewCalculationMode,kCe as CompleteEstimatePreviewCalculationMode,NCe as CompleteEstimatePreviewTitleType,FCe as CompleteInvoicePreviewCalculationMode,ao as Configuration,jCe as CreateAccountWebhookBodyEventsItem,WCe as CreateAdvanceInvoiceCalculationMode,VCe as CreateCheckoutRequestBillingInterval,HCe as CreateCreditNoteCalculationMode,KCe as CreateDeliveryNoteCalculationMode,QCe as CreateDocumentItemClassification,ZCe as CreateDocumentItemType,eAe as CreateDocumentPaymentType,oAe as CreateEntityBodyEnvironment,sAe as CreateEntityBodySettingsPdfTemplate,iAe as CreateEstimateCalculationMode,dAe as CreateEstimateTitleType,lAe as CreateIncomingPurchaseDocumentBodyTransactionType,pAe as CreateIncomingPurchaseDocumentBodyType,gAe as CreateIncomingPurchaseDocumentPaymentBodyType,hAe as CreateInvoiceCalculationMode,xAe as CreateItemBodyClassification,_Ae as CreateMigrationJobRequestEnvironment,fAe as CreateMigrationJobResponseStatus,IAe as CreateOrderBodyPaymentStatus,SAe as CreateOrderBodySource,PAe as CreateOrderIntegrationBodySource,CAe as CreatePaymentBodyType,MAe as CreatePtAtcudSeriesBodyDocumentType,kAe as CreateRecurringInvoiceBodyFrequency,NAe as CreateWebhookBodyEventsItem,FAe as CreationSource,jAe as CreditNoteCalculationMode,WAe as CreditNoteItemClassification,VAe as CreditNoteItemType,HAe as CreditNoteTransactionType,KAe as CurrentSubscriptionPaymentProvider,QAe as CustomCreateAdvanceInvoiceCalculationMode,ZAe as CustomCreateCreditNoteCalculationMode,eMe as CustomCreateDeliveryNoteCalculationMode,oMe as CustomCreateEstimateCalculationMode,sMe as CustomCreateEstimateTitleType,iMe as CustomCreateIncomingPurchaseDocumentTransactionType,dMe as CustomCreateIncomingPurchaseDocumentType,lMe as CustomCreateInvoiceCalculationMode,pMe as CustomDocumentItemClassification,gMe as CustomDocumentItemType,le as DEFAULT_BASE_URL,hMe as DeleteDocumentType,xMe as DeliveryNoteCalculationMode,_Me as DeliveryNoteItemClassification,fMe as DeliveryNoteItemType,IMe as DeliveryNoteTransactionType,SMe as DocumentCalculationCalculationMode,PMe as DocumentCalculationTransactionType,CMe as DocumentRelationRelatedDocumentTitleType,MMe as DocumentRelationRelatedDocumentType,kMe as DocumentRelationSourceType,NMe as DocumentRelationTargetType,FMe as DocumentVersionDocumentType,jMe as EntityApiKeyEnvironment,WMe as EntityBankAccountType,VMe as EntityEnvironment,HMe as EntityInvitationRole,KMe as EntityInvitationStatus,QMe as EntitySettingsPdfTemplate,ZMe as EntityUserRole,eTe as EslogExportByDateRangeTypesItem,oTe as EstimateCalculationMode,sTe as EstimateItemClassification,iTe as EstimateItemType,dTe as EstimateTitleType,lTe as EstimateTransactionType,pTe as ExportDocumentsFormat,gTe as ExportDocumentsLanguage,hTe as ExportDocumentsType,xTe as ExportSalesPerItemFormat,_Te as ExportSalesPerItemLanguage,fTe as FinalizeDocumentType,ITe as FiscalizeDocumentType,STe as FursPremiseSuccessResponseEnvironment,PTe as GetActivePtAtcudSeriesDocumentType,CTe as GetActivities200DataItemActorType,MTe as GetEntitiesEnvironment,kTe as GetEslogExportStatus200Status,NTe as GetFilesCategory,FTe as GetFinaSettings200CertificateStatus,jTe as GetFinaSettings200NumberingSequence,WTe as GetFursSettings200CertificateStatus,VTe as GetFursSettings200NumberingStrategy,HTe as GetIncomingPurchaseDocumentsIsDraft,KTe as GetNextDocumentNumberType,QTe as GetPdfExportStatus200Status,ZTe as GetShareableAdvanceInvoiceHtmlLanguage,eke as GetShareableAdvanceInvoiceHtmlLocale,oke as GetShareableAdvanceInvoicePdfLanguage,ske as GetShareableAdvanceInvoicePdfLocale,ike as GetShareableCreditNoteHtmlLanguage,dke as GetShareableCreditNoteHtmlLocale,lke as GetShareableCreditNotePdfLanguage,pke as GetShareableCreditNotePdfLocale,gke as GetShareableDeliveryNoteHtmlLanguage,hke as GetShareableDeliveryNoteHtmlLocale,xke as GetShareableDeliveryNotePdfLanguage,_ke as GetShareableDeliveryNotePdfLocale,fke as GetShareableEstimateHtmlLanguage,Ike as GetShareableEstimateHtmlLocale,Ske as GetShareableEstimatePdfLanguage,Pke as GetShareableEstimatePdfLocale,Cke as GetShareableInvoiceHtmlLanguage,Mke as GetShareableInvoiceHtmlLocale,kke as GetShareableInvoicePdfLanguage,Nke as GetShareableInvoicePdfLocale,Fke as GetSloveniaTaxProfile200AccountingExportsPreferredFormat,jke as GetSloveniaTaxProfile200BusinessForm,Wke as GetSloveniaTaxProfile200BusinessFormSource,Vke as GetSloveniaTaxProfile200IncomeTaxRegime,Hke as GetSloveniaTaxProfile200InferredBusinessForm,Kke as GetSloveniaTaxProfile200TaxResidency,Qke as GetSloveniaTaxProfile200VatProfile,Zke as GetSloveniaTaxProfile200YearlyReportingAccountingType,e3e as GetSloveniaTaxProfile200YearlyReportingNormiranecInsuranceBasis,o3e as IncomingPurchaseDocumentItemClassification,s3e as IncomingPurchaseDocumentSummaryClassification,i3e as IncomingPurchaseDocumentType,d3e as InvoiceCalculationMode,l3e as InvoiceItemClassification,p3e as InvoiceItemType,g3e as InvoiceTransactionType,h3e as ItemClassification,x3e as LegacyAuthResponseOrganizationsItemUnsupportedItemCode,_3e as LineDiscountType,f3e as ListPtAtcudSeriesDocumentType,I3e as MigrationJobResponseStatus,S3e as OrderBasePaymentStatus,P3e as OrderBaseSource,C3e as OrderBaseStatus,M3e as OrderIntegrationBaseAutoProcessOn,k3e as OrderIntegrationBaseSource,N3e as OrderItemKind,F3e as PartialAdvanceInvoicePreviewCalculationMode,j3e as PartialAdvanceInvoicePreviewItemsItemDiscountsItemType,W3e as PartialAdvanceInvoicePreviewItemsItemType,V3e as PartialCreditNotePreviewCalculationMode,H3e as PartialCreditNotePreviewItemsItemDiscountsItemType,K3e as PartialCreditNotePreviewItemsItemType,Q3e as PartialDeliveryNotePreviewCalculationMode,Z3e as PartialDeliveryNotePreviewItemsItemDiscountsItemType,eBe as PartialDeliveryNotePreviewItemsItemType,oBe as PartialEstimatePreviewCalculationMode,sBe as PartialEstimatePreviewItemsItemDiscountsItemType,iBe as PartialEstimatePreviewItemsItemType,dBe as PartialEstimatePreviewTitleType,lBe as PartialInvoicePreviewCalculationMode,pBe as PartialInvoicePreviewItemsItemDiscountsItemType,gBe as PartialInvoicePreviewItemsItemType,hBe as PatchEntityBodySettingsPdfTemplate,xBe as PatchMeBodyLocale,_Be as PaymentType,fBe as PdfExportByDateRangeLanguage,IBe as PdfExportByDateRangeLocale,SBe as PdfExportByDateRangeTypesItem,PBe as PdfExportByDocumentIdsLanguage,CBe as PdfExportByDocumentIdsLocale,MBe as PermanentDeleteDocumentType,kBe as PtAtcudSeriesDocumentType,NBe as RecurringInvoiceBaseFrequency,FBe as RecurringInvoiceBaseStatus,jBe as RegisterFursMovablePremiseBodyMovablePremisePremiseType,WBe as RenderAdvanceInvoicePreviewEpcQrEnabled,VBe as RenderAdvanceInvoicePreviewPartial,HBe as RenderAdvanceInvoicePreviewTemplate,KBe as RenderAdvanceInvoicePreviewUpnQrDisplayMode,QBe as RenderAdvanceInvoicePreviewUpnQrEnabled,ZBe as RenderCreditNotePreviewEpcQrEnabled,eNe as RenderCreditNotePreviewPartial,oNe as RenderCreditNotePreviewTemplate,sNe as RenderCreditNotePreviewUpnQrDisplayMode,iNe as RenderCreditNotePreviewUpnQrEnabled,dNe as RenderDeliveryNotePreviewEpcQrEnabled,lNe as RenderDeliveryNotePreviewPartial,pNe as RenderDeliveryNotePreviewTemplate,gNe as RenderDeliveryNotePreviewUpnQrDisplayMode,hNe as RenderDeliveryNotePreviewUpnQrEnabled,xNe as RenderDocumentHtmlTemplate,_Ne as RenderDocumentPdfTemplate,fNe as RenderEstimatePreviewEpcQrEnabled,INe as RenderEstimatePreviewPartial,SNe as RenderEstimatePreviewTemplate,PNe as RenderEstimatePreviewUpnQrDisplayMode,CNe as RenderEstimatePreviewUpnQrEnabled,MNe as RenderInvoicePreviewEpcQrEnabled,kNe as RenderInvoicePreviewPartial,NNe as RenderInvoicePreviewTemplate,FNe as RenderInvoicePreviewUpnQrDisplayMode,jNe as RenderInvoicePreviewUpnQrEnabled,WNe as RestoreDocumentType,VNe as ReviewSloveniaYearlyNormiraniReport200FilingKind,HNe as ReviewSloveniaYearlyNormiraniReport200IssueDetailsItemAffectedDocumentsItemType,KNe as ReviewSloveniaYearlyNormiraniReport200IssueDetailsItemOfficialSourcesItemIssuer,QNe as ReviewSloveniaYearlyNormiraniReport200IssueDetailsItemSeverity,ZNe as ReviewSloveniaYearlyNormiraniReport200ProfileAccountingExportsPreferredFormat,eOe as ReviewSloveniaYearlyNormiraniReport200ProfileBusinessForm,oOe as ReviewSloveniaYearlyNormiraniReport200ProfileBusinessFormSource,sOe as ReviewSloveniaYearlyNormiraniReport200ProfileIncomeTaxRegime,iOe as ReviewSloveniaYearlyNormiraniReport200ProfileInferredBusinessForm,dOe as ReviewSloveniaYearlyNormiraniReport200ProfileTaxResidency,lOe as ReviewSloveniaYearlyNormiraniReport200ProfileVatProfile,pOe as ReviewSloveniaYearlyNormiraniReport200ProfileYearlyReportingAccountingType,gOe as ReviewSloveniaYearlyNormiraniReport200ProfileYearlyReportingNormiranecInsuranceBasis,hOe as ReviewSloveniaYearlyNormiraniReport200WarningsItemSeverity,xOe as SendDocument200Status,_Oe as SendEmail200Status,fOe as SendEmailBodyLanguage,IOe as SendEmailBodyLocale,ce as SpaceInvoices,SOe as StartEslogExport202Status,POe as StartPdfExport202Status,COe as StatsQueryRequestMetricsItemType,MOe as StatsQueryRequestOrderByItemDirection,kOe as StatsQueryRequestTable,NOe as StripeAppEntityUpdateSettingsBodyAutoInvoiceEventsItem,FOe as StripeAppUpdateSettingsBodyAutoInvoiceEventsItem,jOe as TransactionTypeCheckResponseTransactionType,WOe as UpdateAccountWebhookBodyEventsItem,VOe as UpdateEntityUserRoleBodyRole,HOe as UpdateEstimateTitleType,KOe as UpdateFinaSettings200CertificateStatus,QOe as UpdateFinaSettings200NumberingSequence,ZOe as UpdateFinaSettingsBodyNumberingSequence,e5e as UpdateFursSettings200CertificateStatus,o5e as UpdateFursSettings200NumberingStrategy,s5e as UpdateFursSettingsBodyNumberingStrategy,i5e as UpdateIncomingPurchaseDocumentBodyTransactionType,d5e as UpdateIncomingPurchaseDocumentBodyType,l5e as UpdateItemBodyClassification,p5e as UpdateOrderBodyPaymentStatus,g5e as UpdateOrderIntegrationBodyAutoProcessOn,h5e as UpdatePaymentBodyType,x5e as UpdateRecurringInvoiceBodyFrequency,_5e as UpdateSloveniaTaxProfile200AccountingExportsPreferredFormat,f5e as UpdateSloveniaTaxProfile200BusinessForm,I5e as UpdateSloveniaTaxProfile200BusinessFormSource,S5e as UpdateSloveniaTaxProfile200IncomeTaxRegime,P5e as UpdateSloveniaTaxProfile200InferredBusinessForm,C5e as UpdateSloveniaTaxProfile200TaxResidency,M5e as UpdateSloveniaTaxProfile200VatProfile,k5e as UpdateSloveniaTaxProfile200YearlyReportingAccountingType,N5e as UpdateSloveniaTaxProfile200YearlyReportingNormiranecInsuranceBasis,F5e as UpdateSloveniaTaxProfileBodyAccountingExportsPreferredFormat,j5e as UpdateSloveniaTaxProfileBodyBusinessForm,W5e as UpdateSloveniaTaxProfileBodyIncomeTaxRegime,V5e as UpdateSloveniaTaxProfileBodyTaxResidency,H5e as UpdateSloveniaTaxProfileBodyVatProfile,K5e as UpdateSloveniaTaxProfileBodyYearlyReportingAccountingType,Q5e as UpdateSloveniaTaxProfileBodyYearlyReportingNormiranecInsuranceBasis,Z5e as UpdateWebhookBodyEventsItem,e1e as UploadFileBodyCategory,o1e as WebhookDeliveryStatus,s1e as WebhookResponseEventsItem,i1e as WebhookWithSecretEventsItem,ct as accountWebhooks,lt as activities,ut as advanceInvoices,pt as companyRegistry,mt as creditNotes,gt as customers,ce as default,yt as deliveryNotes,ht as documents,Ft as downloadBlob,bt as eInvoicing,tCe as eSlog,xt as email,zt as entities,_t as entityApiKeys,vt as entityInvitations,ft as entityStats,Rt as entityUsers,It as estimates,Et as exports,St as files,Dt as finaCertificate,Pt as finaDevices,wt as finaPremises,Ct as finaSettings,At as fursCertificate,Mt as fursDevices,Tt as fursInternalAct,kt as fursPremises,Bt as fursSettings,LSe as getAccountId,pe as getClientHeaders,Nt as health,Ot as incomingPurchaseDocuments,oCe as initSDK,Ut as invoices,jt as items,qt as legacyMigration,Wt as locale,Gt as orderIntegrations,Vt as orders,Lt as payments,Ht as ptAtcudSeries,Yt as ptSafT,Kt as recurringInvoices,VSe as setAccountId,$t as stripeApp,Qt as suppliers,Jt as taxReports,Zt as taxes,Xt as transactionType,eo as upload,to as users,oo as vies,no as webhooks,so as whiteLabelSubscriptions,ro as whiteLabels,Jde as zod};//# sourceMappingURL=index.js.map
|
|
233
|
+
//# sourceMappingURL=index.js.map
|