@spaceinvoices/js-sdk 14.15.0 → 14.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -193,7 +193,7 @@ Not applicable for separator items.`),metadata:e.record(e.string(),e.string()).r
193
193
  When true without item_id, matches by exact name and reuses existing, or creates a new catalog item.
194
194
  Defaults to true (best-effort). When omitted, behaves like true but won't fail the request if persistence fails.`),sku:e.string().max(yJ0).nullish().describe("Stock keeping unit used to link this line to a catalog item. Case-insensitive and trimmed; blank means no SKU.\nWhen `item_id` is omitted and `save_item` is not false, the line is linked to the catalog item with this SKU. Without one, it matches by name among items that have no SKU, or a new catalog item is created with this SKU.\nLinking does not copy catalog values onto the line, so use `item_id` to prefill. On document updates, only an existing item with this SKU is linked.\nNot stored on the line. Ignored when `item_id` is provided and for separator items."),financial_category_key:e.string().max(OJ0).nullish().describe("Key of the reporting financial category to assign to this line item (for example `office-supplies`), as an alternative to `financial_category_id`. Provide either, not both; a null value counts as not provided.")})).min(1).describe("Line items for the invoice. At least one item is required."),linked_documents:e.array(e.string().min(1).max(vJ0)).nullish().describe("Link this invoice to source documents. Advance invoices must use the same currency, be issued, be fully paid, and have a remaining balance; their available amount is applied automatically. Creates document relations automatically."),category_assignments:e.array(e.object({item_index:e.number().min(SJ0).nullish().describe("Zero-based index of the target line item in the request `items` array. Omit or null on a single entry to apply the assignment to all non-separator items."),financial_category_id:e.string().max(hJ0).nullish().describe("Reporting financial category to assign to the targeted document line. Use null to explicitly leave the targeted item or full document uncategorized."),financial_category_key:e.string().max(bJ0).nullish().describe("Key of the financial category to assign (for example `office-supplies`), as an alternative to `financial_category_id`. Provide either, not both; a null value counts as not provided. Use `financial_category_id: null` to explicitly leave the targeted item or full document uncategorized.")})).nullish().describe("Optional document line category assignments. Omit or send null to derive assignments from saved item defaults. Send an empty array to explicitly skip categorization. A single entry without `item_index` applies to all non-separator items."),fina:e.union([e.object({business_premise_name:e.string().min(1).max(zJ0).regex(fJ0).nullish().describe("CIS business premise name (OznPosPr, alphanumeric, 1-20 chars). Required when CIS is enabled."),electronic_device_name:e.string().min(1).max(BJ0).regex(TJ0).nullish().describe("CIS electronic device name (OznNapUr, digits only, 1-20 chars). Required when CIS is enabled."),operator_oib:e.string().min(IJ0).max(EJ0).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("credit_card"),e.literal("debit_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'.")}),e.null()]).optional(),ticketbai:e.union([e.object({lroe_income_epigraphs:e.array(e.string().regex(DJ0)).min(1).max(RJ0).nullish().describe("Explicit IAE activity epigraphs for this invoice. Required for Bizkaia model 140; unsupported for model 240."),simplified:e.boolean().nullish().describe("Issue a simplified invoice only when legally eligible. Defaults to false."),description:e.string().min(1).max(_J0).nullish(),tax_treatment:e.union([e.literal("taxable"),e.literal("exempt"),e.literal("non_subject"),e.literal("reverse_charge"),e.literal(null)]).nullish().describe("Treatment for the whole invoice. Required for zero-rate or untaxed invoices; positive VAT defaults to taxable. Mixed treatments require separate invoices in the pilot."),vat_regime:e.union([e.literal("01"),e.literal("02"),e.literal(null)]).nullish().describe("01 general regime (default); 02 export operations. Other special regimes are outside the pilot."),exemption_cause:e.union([e.literal("E1"),e.literal("E2"),e.literal("E3"),e.literal("E4"),e.literal("E5"),e.literal("E6"),e.literal(null)]).nullish(),non_subject_cause:e.union([e.literal("OT"),e.literal("RL"),e.literal("VT"),e.literal("IE"),e.literal(null)]).nullish(),recipient_id_type:e.union([e.literal("02"),e.literal("03"),e.literal("04"),e.literal("05"),e.literal("06"),e.literal(null)]).nullish().describe("Foreign recipient identification type. Required for a non-Spanish recipient."),operation_type:e.union([e.literal("goods"),e.literal("services"),e.literal(null)]).nullish().describe("Required when the foreign recipient needs an operation-level breakdown."),rectification_code:e.union([e.literal("R1"),e.literal("R2"),e.literal("R3"),e.literal("R4"),e.literal("R5"),e.literal(null)]).nullish().describe("Required for credit notes. The pilot uses difference rectification (I) and the linked source invoices.")}),e.null()]).optional(),verifactu:e.union([e.object({invoice_type:e.union([e.literal("F1"),e.literal("F2"),e.literal("R1"),e.literal("R2"),e.literal("R3"),e.literal("R4"),e.literal("R5"),e.literal(null)]).nullish().describe("AEAT invoice type. Ordinary invoices default to F1; rectifying credit notes require an explicit R1\u2013R5 reason type."),description:e.string().min(1).max(NJ0).nullish().describe("Description of the invoiced operation. Defaults to the document's line descriptions."),customer_id_type:e.union([e.literal("02"),e.literal("03"),e.literal("04"),e.literal("05"),e.literal("06"),e.literal("07"),e.literal(null)]).nullish().describe("AEAT identification type for a recipient identified without Spanish NIF: VAT ID, passport, official document, residence certificate, other evidence, or not registered in the census."),tax_treatments:e.array(e.object({tax_index:e.number().min(MJ0).describe("Zero-based index in the document tax summary, available from calculation preview."),tax:e.enum(["01","02","03","05"]).describe("AEAT tax code: IVA, IPSI, IGIC or other."),regime:e.string().regex(UJ0).describe("Applicable AEAT tax-regime code, supplied by the issuer."),qualification:e.enum(["S1","S2","N1","N2","E1","E2","E3","E4","E5","E6"]).describe("Taxable, reverse-charge, non-subject or statutory exemption classification.")})).max(PJ0).nullish().describe("Explicit classifications for exceptional tax rows. Ordinary domestic positive-rate IVA defaults to 01/01/S1. Zero, exempt, reverse-charge and non-domestic rows require classification.")}).describe("Fiscal classifications supplied before issue, or as an append-only fiscal metadata correction."),e.null()]).optional(),e_invoicing:e.union([e.object({send_enabled:e.boolean().nullish().describe("Whether to send this document electronically after creation. True explicitly opts in even when entity auto-send is disabled; false opts out unless sending is legally required. When omitted, the entity auto-send setting applies.")}).describe("Per-document Peppol sending controls for invoices and credit notes."),e.null()]).optional(),xrechnung:e.union([e.object({validation_enabled:e.boolean().nullish().describe("Override whether this document should be validated for German XRechnung/ZUGFeRD on this request. Entity-level XRechnung/ZUGFeRD settings enable soft validation by default; false can suppress that optional validation for this request unless validation_required is true."),validation_required:e.boolean().nullish().describe("Request strict German validation for this document. Final document creation/finalization fails if current validation is invalid; draft creation stores validation status without blocking. Export/download always re-validates the current document when the stored result is not current, and fails with a 422 if that validation is invalid, regardless of this flag.")}).describe("Optional per-document German validation controls accepted on invoice and credit-note create/preview payloads as xrechnung or zugferd. This input does not contain XRechnung buyer reference or Leitweg-ID; send that value as customer.e_invoicing.buyer_reference."),e.null()]).optional(),zugferd:e.union([e.object({validation_enabled:e.boolean().nullish().describe("Override whether this document should be validated for German XRechnung/ZUGFeRD on this request. Entity-level XRechnung/ZUGFeRD settings enable soft validation by default; false can suppress that optional validation for this request unless validation_required is true."),validation_required:e.boolean().nullish().describe("Request strict German validation for this document. Final document creation/finalization fails if current validation is invalid; draft creation stores validation status without blocking. Export/download always re-validates the current document when the stored result is not current, and fails with a 422 if that validation is invalid, regardless of this flag.")}).describe("Optional per-document German validation controls accepted on invoice and credit-note create/preview payloads as xrechnung or zugferd. This input does not contain XRechnung buyer reference or Leitweg-ID; send that value as customer.e_invoicing.buyer_reference."),e.null()]).optional(),ujp:e.union([e.object({validation_enabled:e.boolean().nullish().describe("Enable UJP package validation for this document. true = validate, false = skip, null/undefined = use default."),validation_required:e.boolean().nullish().describe("Require UJP validation to pass before final document creation. Draft creation records validation status but does not block.")}),e.null()]).optional(),tax_rules:e.union([e.object({slovenia:e.union([e.object({article_76a:e.boolean().nullish().describe("Apply Slovenian domestic reverse charge under Article 76.a ZDDV-1. Null is treated as omitted.")}),e.null()]).optional()}),e.null()]).optional(),expected_total_with_tax:e.number().gt(CJ0).nullish().describe("Expected total with tax in the currency's major unit; for EUR, `29.90` means \u20AC29.90, not 2,990 cents. 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 in the same major unit. Useful when importing invoices from external systems with different rounding rules."),force_linked_documents:e.boolean().nullish().describe("Force linking an estimate or delivery note that is already linked to another invoice. This does not bypass advance-invoice eligibility or available-balance validation. Defaults to false."),id:e.string().nullish(),furs:e.union([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."),payment_amount:e.number().min(wJ0).nullish().describe("Optional FURS PaymentAmount override in the document currency. Cannot be supplied with skip=true; provide payment_amount when subsequently fiscalizing instead. When omitted, PaymentAmount equals InvoiceAmount. When provided, FURS uses this value for PaymentAmount (converted to EUR the same way as InvoiceAmount) while InvoiceAmount and taxes stay based on the full invoice total. Do not derive this from payments, total_paid, or total_due. Send a non-negative logical amount from 0 through total_with_tax; credit-note sign is applied server-side. Use this for cases such as a \u20AC30 ZZZS copayment on a \u20AC100 invoice.")}),e.null()]).optional(),creation_source:e.union([e.literal("custom"),e.literal(null)]).nullish(),total:e.number().nullish(),total_with_tax:e.number().nullish(),total_discount:e.number().nullish(),taxes:e.array(e.object({rate:e.number().nullable(),tax_id:e.string().nullish(),base:e.number(),amount:e.number(),base_converted:e.number().nullish(),amount_converted:e.number().nullish(),reverse_charge:e.boolean().nullish()})).nullish()})]),AJ0=new RegExp("^[a-z]{3,4}_[0-9a-f]{24}$"),sxS=e.object({id:e.stringFormat("resource-id",AJ0).describe("Unique resource identifier. Prefix depends on the resource, for example inv_, cus_, or ent_.")}),oxS=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.")}),ixS=e.object({reason:e.string().min(1).optional().describe("Technical reason for voiding. Required for TicketBAI: 1\u2013500 characters after trimming."),has_original_document:e.boolean().nullish().describe("Whether the original physical/manual PT document is still available.")}),FJ0=36,kJ0=100,jJ0=255,HJ0=2,LJ0=500,GJ0=500,VJ0=20,KJ0=100,ZJ0="FR",qJ0=2,WJ0=2,YJ0="iban",$J0=new RegExp("^[A-Za-z0-9]{7}$"),QJ0=new RegExp("^(?:[0-9]{11}|[A-Z0-9]{16})$"),JJ0=new RegExp("^RF\\d{2}$"),XJ0="iban",eX0=20,tX0=128,nX0=new RegExp("^[A-Za-z0-9:]+$"),sX0=50,oX0=2,iX0=2,aX0=new RegExp("^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$"),rX0=30,lX0=100,dX0=2e3,uX0=2e3,cX0=2e3,pX0=2e3,mX0=2e3,xX0=2e3,gX0=2e3,yX0=2e3,OX0=2e3,vX0=2e3,SX0=2e3,hX0=2e3,bX0=2e3,zX0=2e3,fX0=2e3,BX0=2e3,TX0=2e3,IX0=2e3,EX0=2e3,DX0=500,RX0=500,_X0=500,NX0=500,MX0=500,UX0=500,PX0=500,CX0=500,wX0=500,AX0=500,FX0=500,kX0=500,jX0=500,HX0=500,LX0=500,GX0=500,VX0=500,KX0=500,ZX0=500,qX0=2e3,WX0=2e3,YX0=2e3,$X0=2e3,QX0=2e3,JX0=2e3,XX0=2e3,eey=2e3,tey=2e3,ney=2e3,sey=2e3,oey=2e3,iey=2e3,aey=2e3,rey=2e3,ley=2e3,dey=2e3,uey=2e3,cey=2e3,pey=500,mey=500,xey=500,gey=500,yey=500,Oey=500,vey=500,Sey=500,hey=500,bey=500,zey=500,fey=500,Bey=500,Tey=500,Iey=500,Eey=500,Dey=500,Rey=500,_ey=500,Ney=2e3,Mey=2e3,Uey=2e3,Pey=2e3,Cey=2e3,wey=2e3,Aey=2e3,Fey=2e3,key=2e3,jey=2e3,Hey=2e3,Ley=2e3,Gey=2e3,Vey=2e3,Key=2e3,Zey=2e3,qey=2e3,Wey=2e3,Yey=2e3,$ey=500,Qey=500,Jey=500,Xey=500,ety=500,tty=500,nty=500,sty=500,oty=500,ity=500,aty=500,rty=500,lty=500,dty=500,uty=500,cty=500,pty=500,mty=500,xty=500,gty=2e3,yty=2e3,Oty=2e3,vty=2e3,Sty=2e3,hty=2e3,bty=2e3,zty=2e3,fty=2e3,Bty=2e3,Tty=2e3,Ity=2e3,Ety=2e3,Dty=2e3,Rty=2e3,_ty=2e3,Nty=2e3,Mty=2e3,Uty=2e3,Pty=2e3,Cty=2e3,wty=2e3,Aty=2e3,Fty=2e3,kty=2e3,jty=2e3,Hty=2e3,Lty=2e3,Gty=2e3,Vty=2e3,Kty=2e3,Zty=2e3,qty=2e3,Wty=2e3,Yty=2e3,$ty=2e3,Qty=2e3,Jty=2e3,Xty=500,eny=500,tny=500,nny=500,sny=500,ony=500,iny=500,any=500,rny=500,lny=500,dny=500,uny=500,cny=500,pny=500,mny=500,xny=500,gny=500,yny=500,Ony=500,vny=1e3,Sny=1e3,hny=1e3,bny=1e3,zny=1e3,fny=1e3,Bny=1e3,Tny=1e3,Iny=1e3,Eny=1e3,Dny=1e3,Rny=1e3,_ny=1e3,Nny=1e3,Mny=1e3,Uny=1e3,Pny=1e3,Cny=1e3,wny=1e3,Any=500,Fny=500,kny=500,jny=500,Hny=500,Lny=500,Gny=500,Vny=500,Kny=500,Zny=500,qny=500,Wny=500,Yny=500,$ny=500,Qny=500,Jny=500,Xny=500,esy=500,tsy=500,nsy=2e3,ssy=2e3,osy=2e3,isy=2e3,asy=2e3,rsy=2e3,lsy=2e3,dsy=2e3,usy=2e3,csy=2e3,psy=2e3,msy=2e3,xsy=2e3,gsy=2e3,ysy=2e3,Osy=2e3,vsy=2e3,Ssy=2e3,hsy=2e3,bsy=500,zsy=500,fsy=500,Bsy=500,Tsy=500,Isy=500,Esy=500,Dsy=500,Rsy=500,_sy=500,Nsy=500,Msy=500,Usy=500,Psy=500,Csy=500,wsy=500,Asy=500,Fsy=500,ksy=500,jsy=2e3,Hsy=2e3,Lsy=2e3,Gsy=2e3,Vsy=2e3,Ksy=2e3,Zsy=2e3,qsy=2e3,Wsy=2e3,Ysy=2e3,$sy=2e3,Qsy=2e3,Jsy=2e3,Xsy=2e3,eoy=2e3,toy=2e3,noy=2e3,soy=2e3,ooy=2e3,ioy=500,aoy=500,roy=500,loy=500,doy=500,uoy=500,coy=500,poy=500,moy=500,xoy=500,goy=500,yoy=500,Ooy=500,voy=500,Soy=500,hoy=500,boy=500,zoy=500,foy=500,Boy=2e3,Toy=2e3,Ioy=2e3,Eoy=2e3,Doy=2e3,Roy=2e3,_oy=2e3,Noy=2e3,Moy=2e3,Uoy=2e3,Poy=2e3,Coy=2e3,woy=2e3,Aoy=2e3,Foy=2e3,koy=2e3,joy=2e3,Hoy=2e3,Loy=2e3,Goy=500,Voy=500,Koy=500,Zoy=500,qoy=500,Woy=500,Yoy=500,$oy=500,Qoy=500,Joy=500,Xoy=500,eiy=500,tiy=500,niy=500,siy=500,oiy=500,iiy=500,aiy=500,riy=500,liy=2e3,diy=2e3,uiy=2e3,ciy=2e3,piy=2e3,miy=2e3,xiy=2e3,giy=2e3,yiy=2e3,Oiy=2e3,viy=2e3,Siy=2e3,hiy=2e3,biy=2e3,ziy=2e3,fiy=2e3,Biy=2e3,Tiy=2e3,Iiy=2e3,Eiy=500,Diy=500,Riy=500,_iy=500,Niy=500,Miy=500,Uiy=500,Piy=500,Ciy=500,wiy=500,Aiy=500,Fiy=500,kiy=500,jiy=500,Hiy=500,Liy=500,Giy=500,Viy=500,Kiy=500,Ziy=2e3,qiy=2e3,Wiy=2e3,Yiy=2e3,$iy=2e3,Qiy=2e3,Jiy=2e3,Xiy=2e3,eay=2e3,tay=2e3,nay=2e3,say=2e3,oay=2e3,iay=2e3,aay=2e3,ray=2e3,lay=2e3,day=2e3,uay=2e3,cay=500,pay=500,may=500,xay=500,gay=500,yay=500,Oay=500,vay=500,Say=500,hay=500,bay=500,zay=500,fay=500,Bay=500,Tay=500,Iay=500,Eay=500,Day=500,Ray=500,_ay=2e3,Nay=2e3,May=2e3,Uay=2e3,Pay=2e3,Cay=2e3,way=2e3,Aay=2e3,Fay=2e3,kay=2e3,jay=2e3,Hay=2e3,Lay=2e3,Gay=2e3,Vay=2e3,Kay=2e3,Zay=2e3,qay=2e3,Way=2e3,Yay=500,$ay=500,Qay=500,Jay=500,Xay=500,ery=500,nry=500,sry=500,ory=500,iry=500,ary=500,rry=500,lry=500,dry=500,ury=500,cry=500,pry=500,mry=500,xry=500,gry=2e3,yry=2e3,Ory=2e3,vry=2e3,Sry=2e3,hry=2e3,bry=2e3,zry=2e3,fry=2e3,Bry=2e3,Try=2e3,Iry=2e3,Ery=2e3,Dry=2e3,Rry=2e3,_ry=2e3,Nry=2e3,Mry=2e3,Ury=2e3,Pry=2e3,Cry=2e3,wry=2e3,Ary=2e3,Fry=2e3,kry=2e3,jry=2e3,Hry=2e3,Lry=2e3,Gry=2e3,Vry=2e3,Kry=2e3,Zry=2e3,qry=2e3,Wry=2e3,Yry=2e3,$ry=2e3,Qry=2e3,Jry=2e3,Xry=2e3,ely=2e3,tly=2e3,nly=2e3,sly=2e3,oly=2e3,ily=2e3,aly=2e3,rly=2e3,lly=2e3,dly=2e3,uly=2e3,cly=2e3,ply=2e3,mly=2e3,xly=2e3,gly=2e3,yly=2e3,Oly=2e3,vly=2e3,Sly=2e3,hly=2e3,bly=2e3,zly=2e3,fly=2e3,Bly=2e3,Tly=2e3,Ily=2e3,Ely=2e3,Dly=2e3,Rly=2e3,_ly=2e3,Nly=2e3,Mly=2e3,Uly=2e3,Ply=2e3,Cly=2e3,wly=2e3,Aly=2e3,Fly=2e3,kly=2e3,jly=2e3,Hly=2e3,Lly=2e3,Gly=2e3,Vly=2e3,Kly=2e3,Zly=2e3,qly=2e3,Wly=2e3,Yly=2e3,$ly=2e3,Qly=2e3,Jly=2e3,Xly=2e3,edy=2e3,tdy=2e3,ndy=2e3,sdy=2e3,ody=2e3,idy=2e3,ady=2e3,rdy=2e3,ldy=2e3,ddy=2e3,udy=2e3,cdy=2e3,pdy=2e3,mdy=2e3,xdy=2e3,gdy=2e3,ydy=2e3,Ody=2e3,vdy=2e3,Sdy=2e3,hdy=2e3,bdy=2e3,zdy=2e3,fdy=2e3,Bdy=2e3,Tdy=2e3,Idy=2e3,Edy=2e3,Ddy=2e3,Rdy=2e3,_dy=2e3,Ndy=2e3,Mdy=2e3,Udy=2e3,Pdy=2e3,Cdy=2e3,wdy=2e3,Ady=2e3,Fdy=2e3,kdy=2e3,jdy=2e3,Hdy=2e3,Ldy=2e3,Gdy=2e3,Vdy=2e3,Kdy=2e3,Zdy=2e3,qdy=2e3,Wdy=2e3,Ydy=2e3,$dy=2e3,Qdy=2e3,Jdy=2e3,Xdy=2e3,euy=2e3,tuy=2e3,nuy=2e3,suy=2e3,ouy=2e3,iuy=2e3,auy=2e3,ruy=2e3,luy=2e3,duy=2e3,uuy=2e3,cuy=2e3,puy=2e3,muy=2e3,xuy=2e3,guy=2e3,yuy=2e3,Ouy=2e3,vuy=2e3,Suy=2e3,huy=2e3,buy=2e3,zuy=2e3,fuy=2e3,Buy=2e3,Tuy=2e3,Iuy=2e3,Euy=2e3,Duy=2e3,Ruy=2e3,_uy=2e3,Nuy=2e3,Muy=2e3,Uuy=2e3,Puy=2e3,Cuy=2e3,wuy=2e3,Auy=2e3,Fuy=2e3,kuy=2e3,juy=2e3,Huy=2e3,Luy=2e3,Guy=500,Vuy="iban",Kuy=36,Zuy=255,quy=2,Wuy=500,Yuy=500,$uy=20,Quy=100,Juy="FR",Xuy=2,ecy=2,tcy="iban",ncy=new RegExp("^[A-Za-z0-9]{7}$"),scy=new RegExp("^(?:[0-9]{11}|[A-Z0-9]{16})$"),ocy=new RegExp("^RF\\d{2}$"),icy="iban",acy=500,rcy=2e3,lcy=2e3,dcy=2e3,ucy=2e3,ccy=2e3,pcy=2e3,mcy=2e3,xcy=2e3,gcy=2e3,ycy=2e3,Ocy=2e3,vcy=2e3,Scy=2e3,hcy=2e3,bcy=2e3,zcy=2e3,fcy=2e3,Bcy=2e3,Tcy=2e3,Icy=500,Ecy=500,Dcy=500,Rcy=500,_cy=500,Ncy=500,Mcy=500,Ucy=500,Pcy=500,Ccy=500,wcy=500,Acy=500,Fcy=500,kcy=500,jcy=500,Hcy=500,Lcy=500,Gcy=500,Vcy=500,Kcy=2e3,Zcy=2e3,qcy=2e3,Wcy=2e3,Ycy=2e3,$cy=2e3,Qcy=2e3,Jcy=2e3,Xcy=2e3,epy=2e3,tpy=2e3,npy=2e3,spy=2e3,opy=2e3,ipy=2e3,apy=2e3,rpy=2e3,lpy=2e3,dpy=2e3,upy=500,cpy=500,ppy=500,mpy=500,xpy=500,gpy=500,ypy=500,Opy=500,vpy=500,Spy=500,hpy=500,bpy=500,zpy=500,fpy=500,Bpy=500,Tpy=500,Ipy=500,Epy=500,Dpy=500,Rpy=1e3,_py=1e3,Npy=1e3,Mpy=1e3,Upy=1e3,Ppy=1e3,Cpy=1e3,wpy=1e3,Apy=1e3,Fpy=1e3,kpy=1e3,jpy=1e3,Hpy=1e3,Lpy=1e3,Gpy=1e3,Vpy=1e3,Kpy=1e3,Zpy=1e3,qpy=1e3,Wpy=10,Ypy=36,$py=-2147483648,Qpy=2147483647,Jpy=100,Xpy=0,emy=3,tmy=3,nmy=0,smy=-140737488355328,omy=0x7fffffffffff,imy=-140737488355328,amy=0x7fffffffffff,rmy=-140737488355328,lmy=0x7fffffffffff,dmy=-140737488355328,umy=0x7fffffffffff,cmy=500,pmy=0,mmy=new RegExp("^\\d{2}$"),xmy=12,gmy=0,ymy=0,Omy=0,vmy=new RegExp("^\\d{1,7}$"),Smy=10,hmy=250,bmy=0,zmy=100,fmy=1e-4,Bmy=0,Tmy=3650,Imy=0,Emy=4,Dmy=0,Rmy=0,_my=new RegExp("^\\d{4}-\\d{2}-\\d{2}(T\\d{2}:\\d{2}:\\d{2}(\\.\\d{3})?Z?)?$"),Nmy=new RegExp("^\\d{4}-\\d{2}-\\d{2}(T\\d{2}:\\d{2}:\\d{2}(\\.\\d{3})?Z?)?$"),Mmy=36,Umy=500,Pmy=8,Cmy=new RegExp("^VATEX-[A-Z0-9-]{2,24}$"),wmy=500,Amy=100,Fmy=200,kmy=200,jmy=0,Hmy=100,Lmy=2,Gmy=2,Vmy=0,Kmy="percent",Zmy=5,qmy=-140737488355328,Wmy=0x7fffffffffff,Ymy=-140737488355328,$my=0x7fffffffffff,Qmy=36,Jmy=36,Xmy=36,exy=36,txy=36,nxy=500,sxy=500,oxy=500,ixy=500,axy=500,rxy=500,lxy=500,dxy=500,uxy=500,cxy=500,pxy=500,mxy=500,xxy=500,gxy=500,yxy=500,Oxy=500,vxy=500,Sxy=500,hxy=500,bxy=2e3,zxy=2e3,fxy=2e3,Bxy=2e3,Txy=2e3,Ixy=2e3,Exy=2e3,Dxy=2e3,Rxy=2e3,_xy=2e3,Nxy=2e3,Mxy=2e3,Uxy=2e3,Pxy=2e3,Cxy=2e3,wxy=2e3,Axy=2e3,Fxy=2e3,kxy=2e3,jxy=36,Hxy=36,Lxy=36,Gxy=36,Vxy=36,Kxy=36,Zxy=10,qxy=-140737488355328,Wxy=0x7fffffffffff,Yxy=100,$xy=100,Qxy=500,Jxy=36,Xxy=36,egy=100,tgy=36,ngy=100,sgy=36,ogy=100,igy=36,agy=255,rgy=new RegExp("^\\d{4}-\\d{2}-\\d{2}$"),lgy=-140737488355328,dgy=0x7fffffffffff,ugy=36,cgy=255,pgy=new RegExp("^\\d{4}-\\d{2}-\\d{2}$"),mgy=-140737488355328,xgy=0x7fffffffffff,axS=e.object({id:e.string().max(FJ0),number:e.string().max(kJ0),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(),unit_name:e.string().nullish().describe("Deprecated compatibility field. This value is no longer used for business-unit rendering; use `business_unit.name` on the document instead."),email:e.string().max(jJ0).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().max(HJ0).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(),peppol_scheme_id:e.string().nullish(),e_invoicing:e.union([e.object({buyer_reference:e.string().nullish().describe("Canonical EN 16931 BT-10 buyer reference stored on the document customer snapshot. For German public-sector recipients, enter the Leitweg-ID here. For German B2B recipients this is optional unless the buyer requires it. Do not send a separate leitweg_id, routing_id, or top-level buyer_reference field.")}).describe("Customer e-invoicing data copied into the document customer snapshot. These fields are buyer/customer document data, not German validation state."),e.null()]).optional(),delivery_address:e.union([e.object({address:e.string().min(1).max(LJ0),address_2:e.string().max(GJ0).nullish(),post_code:e.string().min(1).max(VJ0),city:e.string().min(1).max(KJ0),country_code:e.string().min(qJ0).max(WJ0).nullish().default(ZJ0)}).describe("Physical delivery address when it differs from the buyer's billing address. Required by French law when applicable."),e.null()]).optional().describe("Physical delivery address for this document when it differs from the customer's billing address. It is stored only on the document snapshot and is not saved to the customer record."),bank_accounts:e.array(e.object({type:e.enum(["iban","us_domestic","uk_domestic","other"]).default(YJ0).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(),is_end_consumer:e.boolean().nullish(),is_tax_subject:e.boolean().nullish().describe("Whether the customer is VAT identified. Stored in the document snapshot and used by country-specific tax reports; a country code alone does not imply VAT identification."),ujp:e.union([e.object({receiver_name:e.string().min(1).nullish().describe("UJP envelope recipient name. If omitted, package generation falls back to the document customer name."),receiver_identifier:e.string().min(1).nullish().describe("Optional recipient tax number or identifier override for the UJP envelope. If omitted, package generation falls back to the document customer tax number."),receiver_agent:e.string().min(1).nullish().describe("Recipient BIC for the UJP envelope. Public budget users normally use UJPLSI2DICL."),receiver_mailbox:e.string().min(1).nullish().describe("Recipient IBAN/TRR mailbox for the UJP envelope.")}).describe("Optional Slovenian UJP recipient routing data stored on customers and copied into document customer snapshots."),e.null()]).optional(),sdi:e.union([e.object({recipient_code:e.string().regex($J0).nullish().describe("Italian SdI recipient code for buyer routing. When neither a code nor PEC is supplied, domestic invoices use 0000000 and the seller must provide the buyer a courtesy copy and availability notice."),pec:e.email().nullish().describe("Italian certified email address for buyer routing. When provided without an SdI recipient code, FatturaPA uses `CodiceDestinatario = 0000000` plus `PECDestinatario`."),fiscal_code:e.string().regex(QJ0).nullish().describe("Buyer's Italian codice fiscale, independent of their VAT number. For a domestic consumer, legacy tax_number remains a fallback fiscal-code input. Required for VAT-group participants where applicable."),fiscal_regime:e.string().regex(JJ0).nullish().describe("Issuer-only fiscal regime snapshot, captured from settings.tax_rules.italy at issuance. Ignored for buyer routing.")}),e.null()]).optional(),bank_account:e.object({type:e.enum(["iban","us_domestic","uk_domestic","other"]).default(XJ0).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(),crypto_wallet:e.union([e.object({code:e.enum(["BTC","ETH","SOL","USDC","USDT"]).describe("Crypto asset code this wallet receives."),address:e.string().min(eX0).max(tX0).regex(nX0).describe("Wallet address for this asset."),network:e.string().max(sX0).nullish().describe("Free-text network label printed alongside the wallet address, e.g. 'Ethereum', 'Solana', 'Tron'.")}),e.null()]).optional()}).describe("Document issuer (entity) information"),business_unit_id:e.string().nullish().describe("Selected business-unit ID used to derive document presentation and defaults."),business_unit:e.union([e.object({id:e.string(),name:e.string(),deleted_at:e.iso.datetime({}).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(oX0).max(iX0).nullish(),email:e.email().nullish(),phone:e.string().nullish(),website:e.url().nullish(),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."),primary_color:e.string().regex(aX0).nullish(),logo_scale_percent:e.number().min(rX0).max(lX0).nullish().describe("Scale the PDF logo size as a percentage of the template default size. 100 keeps the original size."),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}"),purchase_order_subject:e.string().nullish().describe("Default subject line for purchase order 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}"),purchase_order_body:e.string().nullish().describe("Default body text for purchase order 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(),translations:e.union([e.object({default_invoice_note:e.object({"en-US":e.string().max(dX0).optional(),"de-DE":e.string().max(uX0).optional(),"it-IT":e.string().max(cX0).optional(),"fr-FR":e.string().max(pX0).optional(),"es-ES":e.string().max(mX0).optional(),"sl-SI":e.string().max(xX0).optional(),"pt-PT":e.string().max(gX0).optional(),"nl-NL":e.string().max(yX0).optional(),"pl-PL":e.string().max(OX0).optional(),"hr-HR":e.string().max(vX0).optional(),"sv-SE":e.string().max(SX0).optional(),"fi-FI":e.string().max(hX0).optional(),"et-EE":e.string().max(bX0).optional(),"bg-BG":e.string().max(zX0).optional(),"cs-CZ":e.string().max(fX0).optional(),"sk-SK":e.string().max(BX0).optional(),"nb-NO":e.string().max(TX0).optional(),"is-IS":e.string().max(IX0).optional(),"hu-HU":e.string().max(EX0).optional()}).optional().describe("Translated user-authored document content keyed by full supported locales such as `de-DE`. Values may be empty strings to intentionally blank content for a locale."),default_invoice_payment_terms:e.object({"en-US":e.string().max(DX0).optional(),"de-DE":e.string().max(RX0).optional(),"it-IT":e.string().max(_X0).optional(),"fr-FR":e.string().max(NX0).optional(),"es-ES":e.string().max(MX0).optional(),"sl-SI":e.string().max(UX0).optional(),"pt-PT":e.string().max(PX0).optional(),"nl-NL":e.string().max(CX0).optional(),"pl-PL":e.string().max(wX0).optional(),"hr-HR":e.string().max(AX0).optional(),"sv-SE":e.string().max(FX0).optional(),"fi-FI":e.string().max(kX0).optional(),"et-EE":e.string().max(jX0).optional(),"bg-BG":e.string().max(HX0).optional(),"cs-CZ":e.string().max(LX0).optional(),"sk-SK":e.string().max(GX0).optional(),"nb-NO":e.string().max(VX0).optional(),"is-IS":e.string().max(KX0).optional(),"hu-HU":e.string().max(ZX0).optional()}).optional().describe("Translated user-authored document content keyed by full supported locales such as `de-DE`. Values may be empty strings to intentionally blank content for a locale."),default_estimate_note:e.object({"en-US":e.string().max(qX0).optional(),"de-DE":e.string().max(WX0).optional(),"it-IT":e.string().max(YX0).optional(),"fr-FR":e.string().max($X0).optional(),"es-ES":e.string().max(QX0).optional(),"sl-SI":e.string().max(JX0).optional(),"pt-PT":e.string().max(XX0).optional(),"nl-NL":e.string().max(eey).optional(),"pl-PL":e.string().max(tey).optional(),"hr-HR":e.string().max(ney).optional(),"sv-SE":e.string().max(sey).optional(),"fi-FI":e.string().max(oey).optional(),"et-EE":e.string().max(iey).optional(),"bg-BG":e.string().max(aey).optional(),"cs-CZ":e.string().max(rey).optional(),"sk-SK":e.string().max(ley).optional(),"nb-NO":e.string().max(dey).optional(),"is-IS":e.string().max(uey).optional(),"hu-HU":e.string().max(cey).optional()}).optional().describe("Translated user-authored document content keyed by full supported locales such as `de-DE`. Values may be empty strings to intentionally blank content for a locale."),default_estimate_payment_terms:e.object({"en-US":e.string().max(pey).optional(),"de-DE":e.string().max(mey).optional(),"it-IT":e.string().max(xey).optional(),"fr-FR":e.string().max(gey).optional(),"es-ES":e.string().max(yey).optional(),"sl-SI":e.string().max(Oey).optional(),"pt-PT":e.string().max(vey).optional(),"nl-NL":e.string().max(Sey).optional(),"pl-PL":e.string().max(hey).optional(),"hr-HR":e.string().max(bey).optional(),"sv-SE":e.string().max(zey).optional(),"fi-FI":e.string().max(fey).optional(),"et-EE":e.string().max(Bey).optional(),"bg-BG":e.string().max(Tey).optional(),"cs-CZ":e.string().max(Iey).optional(),"sk-SK":e.string().max(Eey).optional(),"nb-NO":e.string().max(Dey).optional(),"is-IS":e.string().max(Rey).optional(),"hu-HU":e.string().max(_ey).optional()}).optional().describe("Translated user-authored document content keyed by full supported locales such as `de-DE`. Values may be empty strings to intentionally blank content for a locale."),default_credit_note_note:e.object({"en-US":e.string().max(Ney).optional(),"de-DE":e.string().max(Mey).optional(),"it-IT":e.string().max(Uey).optional(),"fr-FR":e.string().max(Pey).optional(),"es-ES":e.string().max(Cey).optional(),"sl-SI":e.string().max(wey).optional(),"pt-PT":e.string().max(Aey).optional(),"nl-NL":e.string().max(Fey).optional(),"pl-PL":e.string().max(key).optional(),"hr-HR":e.string().max(jey).optional(),"sv-SE":e.string().max(Hey).optional(),"fi-FI":e.string().max(Ley).optional(),"et-EE":e.string().max(Gey).optional(),"bg-BG":e.string().max(Vey).optional(),"cs-CZ":e.string().max(Key).optional(),"sk-SK":e.string().max(Zey).optional(),"nb-NO":e.string().max(qey).optional(),"is-IS":e.string().max(Wey).optional(),"hu-HU":e.string().max(Yey).optional()}).optional().describe("Translated user-authored document content keyed by full supported locales such as `de-DE`. Values may be empty strings to intentionally blank content for a locale."),default_credit_note_payment_terms:e.object({"en-US":e.string().max($ey).optional(),"de-DE":e.string().max(Qey).optional(),"it-IT":e.string().max(Jey).optional(),"fr-FR":e.string().max(Xey).optional(),"es-ES":e.string().max(ety).optional(),"sl-SI":e.string().max(tty).optional(),"pt-PT":e.string().max(nty).optional(),"nl-NL":e.string().max(sty).optional(),"pl-PL":e.string().max(oty).optional(),"hr-HR":e.string().max(ity).optional(),"sv-SE":e.string().max(aty).optional(),"fi-FI":e.string().max(rty).optional(),"et-EE":e.string().max(lty).optional(),"bg-BG":e.string().max(dty).optional(),"cs-CZ":e.string().max(uty).optional(),"sk-SK":e.string().max(cty).optional(),"nb-NO":e.string().max(pty).optional(),"is-IS":e.string().max(mty).optional(),"hu-HU":e.string().max(xty).optional()}).optional().describe("Translated user-authored document content keyed by full supported locales such as `de-DE`. Values may be empty strings to intentionally blank content for a locale."),default_advance_invoice_note:e.object({"en-US":e.string().max(gty).optional(),"de-DE":e.string().max(yty).optional(),"it-IT":e.string().max(Oty).optional(),"fr-FR":e.string().max(vty).optional(),"es-ES":e.string().max(Sty).optional(),"sl-SI":e.string().max(hty).optional(),"pt-PT":e.string().max(bty).optional(),"nl-NL":e.string().max(zty).optional(),"pl-PL":e.string().max(fty).optional(),"hr-HR":e.string().max(Bty).optional(),"sv-SE":e.string().max(Tty).optional(),"fi-FI":e.string().max(Ity).optional(),"et-EE":e.string().max(Ety).optional(),"bg-BG":e.string().max(Dty).optional(),"cs-CZ":e.string().max(Rty).optional(),"sk-SK":e.string().max(_ty).optional(),"nb-NO":e.string().max(Nty).optional(),"is-IS":e.string().max(Mty).optional(),"hu-HU":e.string().max(Uty).optional()}).optional().describe("Translated user-authored document content keyed by full supported locales such as `de-DE`. Values may be empty strings to intentionally blank content for a locale."),default_delivery_note_note:e.object({"en-US":e.string().max(Pty).optional(),"de-DE":e.string().max(Cty).optional(),"it-IT":e.string().max(wty).optional(),"fr-FR":e.string().max(Aty).optional(),"es-ES":e.string().max(Fty).optional(),"sl-SI":e.string().max(kty).optional(),"pt-PT":e.string().max(jty).optional(),"nl-NL":e.string().max(Hty).optional(),"pl-PL":e.string().max(Lty).optional(),"hr-HR":e.string().max(Gty).optional(),"sv-SE":e.string().max(Vty).optional(),"fi-FI":e.string().max(Kty).optional(),"et-EE":e.string().max(Zty).optional(),"bg-BG":e.string().max(qty).optional(),"cs-CZ":e.string().max(Wty).optional(),"sk-SK":e.string().max(Yty).optional(),"nb-NO":e.string().max($ty).optional(),"is-IS":e.string().max(Qty).optional(),"hu-HU":e.string().max(Jty).optional()}).optional().describe("Translated user-authored document content keyed by full supported locales such as `de-DE`. Values may be empty strings to intentionally blank content for a locale."),document_footer:e.object({"en-US":e.string().max(Xty).optional(),"de-DE":e.string().max(eny).optional(),"it-IT":e.string().max(tny).optional(),"fr-FR":e.string().max(nny).optional(),"es-ES":e.string().max(sny).optional(),"sl-SI":e.string().max(ony).optional(),"pt-PT":e.string().max(iny).optional(),"nl-NL":e.string().max(any).optional(),"pl-PL":e.string().max(rny).optional(),"hr-HR":e.string().max(lny).optional(),"sv-SE":e.string().max(dny).optional(),"fi-FI":e.string().max(uny).optional(),"et-EE":e.string().max(cny).optional(),"bg-BG":e.string().max(pny).optional(),"cs-CZ":e.string().max(mny).optional(),"sk-SK":e.string().max(xny).optional(),"nb-NO":e.string().max(gny).optional(),"is-IS":e.string().max(yny).optional(),"hu-HU":e.string().max(Ony).optional()}).optional().describe("Translated user-authored document content keyed by full supported locales such as `de-DE`. Values may be empty strings to intentionally blank content for a locale."),default_document_signature:e.object({"en-US":e.string().max(vny).optional(),"de-DE":e.string().max(Sny).optional(),"it-IT":e.string().max(hny).optional(),"fr-FR":e.string().max(bny).optional(),"es-ES":e.string().max(zny).optional(),"sl-SI":e.string().max(fny).optional(),"pt-PT":e.string().max(Bny).optional(),"nl-NL":e.string().max(Tny).optional(),"pl-PL":e.string().max(Iny).optional(),"hr-HR":e.string().max(Eny).optional(),"sv-SE":e.string().max(Dny).optional(),"fi-FI":e.string().max(Rny).optional(),"et-EE":e.string().max(_ny).optional(),"bg-BG":e.string().max(Nny).optional(),"cs-CZ":e.string().max(Mny).optional(),"sk-SK":e.string().max(Uny).optional(),"nb-NO":e.string().max(Pny).optional(),"is-IS":e.string().max(Cny).optional(),"hu-HU":e.string().max(wny).optional()}).optional().describe("Translated user-authored document content keyed by full supported locales such as `de-DE`. Values may be empty strings to intentionally blank content for a locale."),email_defaults:e.object({invoice_subject:e.object({"en-US":e.string().max(Any).optional(),"de-DE":e.string().max(Fny).optional(),"it-IT":e.string().max(kny).optional(),"fr-FR":e.string().max(jny).optional(),"es-ES":e.string().max(Hny).optional(),"sl-SI":e.string().max(Lny).optional(),"pt-PT":e.string().max(Gny).optional(),"nl-NL":e.string().max(Vny).optional(),"pl-PL":e.string().max(Kny).optional(),"hr-HR":e.string().max(Zny).optional(),"sv-SE":e.string().max(qny).optional(),"fi-FI":e.string().max(Wny).optional(),"et-EE":e.string().max(Yny).optional(),"bg-BG":e.string().max($ny).optional(),"cs-CZ":e.string().max(Qny).optional(),"sk-SK":e.string().max(Jny).optional(),"nb-NO":e.string().max(Xny).optional(),"is-IS":e.string().max(esy).optional(),"hu-HU":e.string().max(tsy).optional()}).optional().describe("Translated user-authored document content keyed by full supported locales such as `de-DE`. Values may be empty strings to intentionally blank content for a locale."),invoice_body:e.object({"en-US":e.string().max(nsy).optional(),"de-DE":e.string().max(ssy).optional(),"it-IT":e.string().max(osy).optional(),"fr-FR":e.string().max(isy).optional(),"es-ES":e.string().max(asy).optional(),"sl-SI":e.string().max(rsy).optional(),"pt-PT":e.string().max(lsy).optional(),"nl-NL":e.string().max(dsy).optional(),"pl-PL":e.string().max(usy).optional(),"hr-HR":e.string().max(csy).optional(),"sv-SE":e.string().max(psy).optional(),"fi-FI":e.string().max(msy).optional(),"et-EE":e.string().max(xsy).optional(),"bg-BG":e.string().max(gsy).optional(),"cs-CZ":e.string().max(ysy).optional(),"sk-SK":e.string().max(Osy).optional(),"nb-NO":e.string().max(vsy).optional(),"is-IS":e.string().max(Ssy).optional(),"hu-HU":e.string().max(hsy).optional()}).optional().describe("Translated user-authored document content keyed by full supported locales such as `de-DE`. Values may be empty strings to intentionally blank content for a locale."),estimate_subject:e.object({"en-US":e.string().max(bsy).optional(),"de-DE":e.string().max(zsy).optional(),"it-IT":e.string().max(fsy).optional(),"fr-FR":e.string().max(Bsy).optional(),"es-ES":e.string().max(Tsy).optional(),"sl-SI":e.string().max(Isy).optional(),"pt-PT":e.string().max(Esy).optional(),"nl-NL":e.string().max(Dsy).optional(),"pl-PL":e.string().max(Rsy).optional(),"hr-HR":e.string().max(_sy).optional(),"sv-SE":e.string().max(Nsy).optional(),"fi-FI":e.string().max(Msy).optional(),"et-EE":e.string().max(Usy).optional(),"bg-BG":e.string().max(Psy).optional(),"cs-CZ":e.string().max(Csy).optional(),"sk-SK":e.string().max(wsy).optional(),"nb-NO":e.string().max(Asy).optional(),"is-IS":e.string().max(Fsy).optional(),"hu-HU":e.string().max(ksy).optional()}).optional().describe("Translated user-authored document content keyed by full supported locales such as `de-DE`. Values may be empty strings to intentionally blank content for a locale."),estimate_body:e.object({"en-US":e.string().max(jsy).optional(),"de-DE":e.string().max(Hsy).optional(),"it-IT":e.string().max(Lsy).optional(),"fr-FR":e.string().max(Gsy).optional(),"es-ES":e.string().max(Vsy).optional(),"sl-SI":e.string().max(Ksy).optional(),"pt-PT":e.string().max(Zsy).optional(),"nl-NL":e.string().max(qsy).optional(),"pl-PL":e.string().max(Wsy).optional(),"hr-HR":e.string().max(Ysy).optional(),"sv-SE":e.string().max($sy).optional(),"fi-FI":e.string().max(Qsy).optional(),"et-EE":e.string().max(Jsy).optional(),"bg-BG":e.string().max(Xsy).optional(),"cs-CZ":e.string().max(eoy).optional(),"sk-SK":e.string().max(toy).optional(),"nb-NO":e.string().max(noy).optional(),"is-IS":e.string().max(soy).optional(),"hu-HU":e.string().max(ooy).optional()}).optional().describe("Translated user-authored document content keyed by full supported locales such as `de-DE`. Values may be empty strings to intentionally blank content for a locale."),credit_note_subject:e.object({"en-US":e.string().max(ioy).optional(),"de-DE":e.string().max(aoy).optional(),"it-IT":e.string().max(roy).optional(),"fr-FR":e.string().max(loy).optional(),"es-ES":e.string().max(doy).optional(),"sl-SI":e.string().max(uoy).optional(),"pt-PT":e.string().max(coy).optional(),"nl-NL":e.string().max(poy).optional(),"pl-PL":e.string().max(moy).optional(),"hr-HR":e.string().max(xoy).optional(),"sv-SE":e.string().max(goy).optional(),"fi-FI":e.string().max(yoy).optional(),"et-EE":e.string().max(Ooy).optional(),"bg-BG":e.string().max(voy).optional(),"cs-CZ":e.string().max(Soy).optional(),"sk-SK":e.string().max(hoy).optional(),"nb-NO":e.string().max(boy).optional(),"is-IS":e.string().max(zoy).optional(),"hu-HU":e.string().max(foy).optional()}).optional().describe("Translated user-authored document content keyed by full supported locales such as `de-DE`. Values may be empty strings to intentionally blank content for a locale."),credit_note_body:e.object({"en-US":e.string().max(Boy).optional(),"de-DE":e.string().max(Toy).optional(),"it-IT":e.string().max(Ioy).optional(),"fr-FR":e.string().max(Eoy).optional(),"es-ES":e.string().max(Doy).optional(),"sl-SI":e.string().max(Roy).optional(),"pt-PT":e.string().max(_oy).optional(),"nl-NL":e.string().max(Noy).optional(),"pl-PL":e.string().max(Moy).optional(),"hr-HR":e.string().max(Uoy).optional(),"sv-SE":e.string().max(Poy).optional(),"fi-FI":e.string().max(Coy).optional(),"et-EE":e.string().max(woy).optional(),"bg-BG":e.string().max(Aoy).optional(),"cs-CZ":e.string().max(Foy).optional(),"sk-SK":e.string().max(koy).optional(),"nb-NO":e.string().max(joy).optional(),"is-IS":e.string().max(Hoy).optional(),"hu-HU":e.string().max(Loy).optional()}).optional().describe("Translated user-authored document content keyed by full supported locales such as `de-DE`. Values may be empty strings to intentionally blank content for a locale."),advance_invoice_subject:e.object({"en-US":e.string().max(Goy).optional(),"de-DE":e.string().max(Voy).optional(),"it-IT":e.string().max(Koy).optional(),"fr-FR":e.string().max(Zoy).optional(),"es-ES":e.string().max(qoy).optional(),"sl-SI":e.string().max(Woy).optional(),"pt-PT":e.string().max(Yoy).optional(),"nl-NL":e.string().max($oy).optional(),"pl-PL":e.string().max(Qoy).optional(),"hr-HR":e.string().max(Joy).optional(),"sv-SE":e.string().max(Xoy).optional(),"fi-FI":e.string().max(eiy).optional(),"et-EE":e.string().max(tiy).optional(),"bg-BG":e.string().max(niy).optional(),"cs-CZ":e.string().max(siy).optional(),"sk-SK":e.string().max(oiy).optional(),"nb-NO":e.string().max(iiy).optional(),"is-IS":e.string().max(aiy).optional(),"hu-HU":e.string().max(riy).optional()}).optional().describe("Translated user-authored document content keyed by full supported locales such as `de-DE`. Values may be empty strings to intentionally blank content for a locale."),advance_invoice_body:e.object({"en-US":e.string().max(liy).optional(),"de-DE":e.string().max(diy).optional(),"it-IT":e.string().max(uiy).optional(),"fr-FR":e.string().max(ciy).optional(),"es-ES":e.string().max(piy).optional(),"sl-SI":e.string().max(miy).optional(),"pt-PT":e.string().max(xiy).optional(),"nl-NL":e.string().max(giy).optional(),"pl-PL":e.string().max(yiy).optional(),"hr-HR":e.string().max(Oiy).optional(),"sv-SE":e.string().max(viy).optional(),"fi-FI":e.string().max(Siy).optional(),"et-EE":e.string().max(hiy).optional(),"bg-BG":e.string().max(biy).optional(),"cs-CZ":e.string().max(ziy).optional(),"sk-SK":e.string().max(fiy).optional(),"nb-NO":e.string().max(Biy).optional(),"is-IS":e.string().max(Tiy).optional(),"hu-HU":e.string().max(Iiy).optional()}).optional().describe("Translated user-authored document content keyed by full supported locales such as `de-DE`. Values may be empty strings to intentionally blank content for a locale."),delivery_note_subject:e.object({"en-US":e.string().max(Eiy).optional(),"de-DE":e.string().max(Diy).optional(),"it-IT":e.string().max(Riy).optional(),"fr-FR":e.string().max(_iy).optional(),"es-ES":e.string().max(Niy).optional(),"sl-SI":e.string().max(Miy).optional(),"pt-PT":e.string().max(Uiy).optional(),"nl-NL":e.string().max(Piy).optional(),"pl-PL":e.string().max(Ciy).optional(),"hr-HR":e.string().max(wiy).optional(),"sv-SE":e.string().max(Aiy).optional(),"fi-FI":e.string().max(Fiy).optional(),"et-EE":e.string().max(kiy).optional(),"bg-BG":e.string().max(jiy).optional(),"cs-CZ":e.string().max(Hiy).optional(),"sk-SK":e.string().max(Liy).optional(),"nb-NO":e.string().max(Giy).optional(),"is-IS":e.string().max(Viy).optional(),"hu-HU":e.string().max(Kiy).optional()}).optional().describe("Translated user-authored document content keyed by full supported locales such as `de-DE`. Values may be empty strings to intentionally blank content for a locale."),delivery_note_body:e.object({"en-US":e.string().max(Ziy).optional(),"de-DE":e.string().max(qiy).optional(),"it-IT":e.string().max(Wiy).optional(),"fr-FR":e.string().max(Yiy).optional(),"es-ES":e.string().max($iy).optional(),"sl-SI":e.string().max(Qiy).optional(),"pt-PT":e.string().max(Jiy).optional(),"nl-NL":e.string().max(Xiy).optional(),"pl-PL":e.string().max(eay).optional(),"hr-HR":e.string().max(tay).optional(),"sv-SE":e.string().max(nay).optional(),"fi-FI":e.string().max(say).optional(),"et-EE":e.string().max(oay).optional(),"bg-BG":e.string().max(iay).optional(),"cs-CZ":e.string().max(aay).optional(),"sk-SK":e.string().max(ray).optional(),"nb-NO":e.string().max(lay).optional(),"is-IS":e.string().max(day).optional(),"hu-HU":e.string().max(uay).optional()}).optional().describe("Translated user-authored document content keyed by full supported locales such as `de-DE`. Values may be empty strings to intentionally blank content for a locale."),purchase_order_subject:e.object({"en-US":e.string().max(cay).nullish(),"de-DE":e.string().max(pay).nullish(),"it-IT":e.string().max(may).nullish(),"fr-FR":e.string().max(xay).nullish(),"es-ES":e.string().max(gay).nullish(),"sl-SI":e.string().max(yay).nullish(),"pt-PT":e.string().max(Oay).nullish(),"nl-NL":e.string().max(vay).nullish(),"pl-PL":e.string().max(Say).nullish(),"hr-HR":e.string().max(hay).nullish(),"sv-SE":e.string().max(bay).nullish(),"fi-FI":e.string().max(zay).nullish(),"et-EE":e.string().max(fay).nullish(),"bg-BG":e.string().max(Bay).nullish(),"cs-CZ":e.string().max(Tay).nullish(),"sk-SK":e.string().max(Iay).nullish(),"nb-NO":e.string().max(Eay).nullish(),"is-IS":e.string().max(Day).nullish(),"hu-HU":e.string().max(Ray).nullish()}).nullish().describe("Translated user-authored document content keyed by full supported locales such as `de-DE`. Values may be empty strings to intentionally blank content for a locale."),purchase_order_body:e.object({"en-US":e.string().max(_ay).nullish(),"de-DE":e.string().max(Nay).nullish(),"it-IT":e.string().max(May).nullish(),"fr-FR":e.string().max(Uay).nullish(),"es-ES":e.string().max(Pay).nullish(),"sl-SI":e.string().max(Cay).nullish(),"pt-PT":e.string().max(way).nullish(),"nl-NL":e.string().max(Aay).nullish(),"pl-PL":e.string().max(Fay).nullish(),"hr-HR":e.string().max(kay).nullish(),"sv-SE":e.string().max(jay).nullish(),"fi-FI":e.string().max(Hay).nullish(),"et-EE":e.string().max(Lay).nullish(),"bg-BG":e.string().max(Gay).nullish(),"cs-CZ":e.string().max(Vay).nullish(),"sk-SK":e.string().max(Kay).nullish(),"nb-NO":e.string().max(Zay).nullish(),"is-IS":e.string().max(qay).nullish(),"hu-HU":e.string().max(Way).nullish()}).nullish().describe("Translated user-authored document content keyed by full supported locales such as `de-DE`. Values may be empty strings to intentionally blank content for a locale.")}).optional().describe("Translated default email subjects and bodies keyed by full supported locales. Base scalar email defaults remain the default-language source of truth."),payment_reminders:e.object({email_subject:e.object({"en-US":e.string().max(Yay).optional(),"de-DE":e.string().max($ay).optional(),"it-IT":e.string().max(Qay).optional(),"fr-FR":e.string().max(Jay).optional(),"es-ES":e.string().max(Xay).optional(),"sl-SI":e.string().max(ery).optional(),"pt-PT":e.string().max(nry).optional(),"nl-NL":e.string().max(sry).optional(),"pl-PL":e.string().max(ory).optional(),"hr-HR":e.string().max(iry).optional(),"sv-SE":e.string().max(ary).optional(),"fi-FI":e.string().max(rry).optional(),"et-EE":e.string().max(lry).optional(),"bg-BG":e.string().max(dry).optional(),"cs-CZ":e.string().max(ury).optional(),"sk-SK":e.string().max(cry).optional(),"nb-NO":e.string().max(pry).optional(),"is-IS":e.string().max(mry).optional(),"hu-HU":e.string().max(xry).optional()}).optional().describe("Translated user-authored document content keyed by full supported locales such as `de-DE`. Values may be empty strings to intentionally blank content for a locale."),email_body:e.object({"en-US":e.string().max(gry).optional(),"de-DE":e.string().max(yry).optional(),"it-IT":e.string().max(Ory).optional(),"fr-FR":e.string().max(vry).optional(),"es-ES":e.string().max(Sry).optional(),"sl-SI":e.string().max(hry).optional(),"pt-PT":e.string().max(bry).optional(),"nl-NL":e.string().max(zry).optional(),"pl-PL":e.string().max(fry).optional(),"hr-HR":e.string().max(Bry).optional(),"sv-SE":e.string().max(Try).optional(),"fi-FI":e.string().max(Iry).optional(),"et-EE":e.string().max(Ery).optional(),"bg-BG":e.string().max(Dry).optional(),"cs-CZ":e.string().max(Rry).optional(),"sk-SK":e.string().max(_ry).optional(),"nb-NO":e.string().max(Nry).optional(),"is-IS":e.string().max(Mry).optional(),"hu-HU":e.string().max(Ury).optional()}).optional().describe("Translated user-authored document content keyed by full supported locales such as `de-DE`. Values may be empty strings to intentionally blank content for a locale."),payment_instructions:e.object({"en-US":e.string().max(Pry).optional(),"de-DE":e.string().max(Cry).optional(),"it-IT":e.string().max(wry).optional(),"fr-FR":e.string().max(Ary).optional(),"es-ES":e.string().max(Fry).optional(),"sl-SI":e.string().max(kry).optional(),"pt-PT":e.string().max(jry).optional(),"nl-NL":e.string().max(Hry).optional(),"pl-PL":e.string().max(Lry).optional(),"hr-HR":e.string().max(Gry).optional(),"sv-SE":e.string().max(Vry).optional(),"fi-FI":e.string().max(Kry).optional(),"et-EE":e.string().max(Zry).optional(),"bg-BG":e.string().max(qry).optional(),"cs-CZ":e.string().max(Wry).optional(),"sk-SK":e.string().max(Yry).optional(),"nb-NO":e.string().max($ry).optional(),"is-IS":e.string().max(Qry).optional(),"hu-HU":e.string().max(Jry).optional()}).optional().describe("Translated user-authored document content keyed by full supported locales such as `de-DE`. Values may be empty strings to intentionally blank content for a locale.")}).optional().describe("Translated default payment reminder subject, body, and payment instructions keyed by full supported locales."),tax_clause_defaults:e.object({domestic:e.object({"en-US":e.string().max(Xry).optional(),"de-DE":e.string().max(ely).optional(),"it-IT":e.string().max(tly).optional(),"fr-FR":e.string().max(nly).optional(),"es-ES":e.string().max(sly).optional(),"sl-SI":e.string().max(oly).optional(),"pt-PT":e.string().max(ily).optional(),"nl-NL":e.string().max(aly).optional(),"pl-PL":e.string().max(rly).optional(),"hr-HR":e.string().max(lly).optional(),"sv-SE":e.string().max(dly).optional(),"fi-FI":e.string().max(uly).optional(),"et-EE":e.string().max(cly).optional(),"bg-BG":e.string().max(ply).optional(),"cs-CZ":e.string().max(mly).optional(),"sk-SK":e.string().max(xly).optional(),"nb-NO":e.string().max(gly).optional(),"is-IS":e.string().max(yly).optional(),"hu-HU":e.string().max(Oly).optional()}).optional().describe("Translated user-authored document content keyed by full supported locales such as `de-DE`. Values may be empty strings to intentionally blank content for a locale."),article_76a:e.object({"en-US":e.string().max(vly).nullish(),"de-DE":e.string().max(Sly).nullish(),"it-IT":e.string().max(hly).nullish(),"fr-FR":e.string().max(bly).nullish(),"es-ES":e.string().max(zly).nullish(),"sl-SI":e.string().max(fly).nullish(),"pt-PT":e.string().max(Bly).nullish(),"nl-NL":e.string().max(Tly).nullish(),"pl-PL":e.string().max(Ily).nullish(),"hr-HR":e.string().max(Ely).nullish(),"sv-SE":e.string().max(Dly).nullish(),"fi-FI":e.string().max(Rly).nullish(),"et-EE":e.string().max(_ly).nullish(),"bg-BG":e.string().max(Nly).nullish(),"cs-CZ":e.string().max(Mly).nullish(),"sk-SK":e.string().max(Uly).nullish(),"nb-NO":e.string().max(Ply).nullish(),"is-IS":e.string().max(Cly).nullish(),"hu-HU":e.string().max(wly).nullish()}).nullish().describe("Translated user-authored document content keyed by full supported locales such as `de-DE`. Values may be empty strings to intentionally blank content for a locale."),intra_eu_b2b:e.object({"en-US":e.string().max(Aly).optional(),"de-DE":e.string().max(Fly).optional(),"it-IT":e.string().max(kly).optional(),"fr-FR":e.string().max(jly).optional(),"es-ES":e.string().max(Hly).optional(),"sl-SI":e.string().max(Lly).optional(),"pt-PT":e.string().max(Gly).optional(),"nl-NL":e.string().max(Vly).optional(),"pl-PL":e.string().max(Kly).optional(),"hr-HR":e.string().max(Zly).optional(),"sv-SE":e.string().max(qly).optional(),"fi-FI":e.string().max(Wly).optional(),"et-EE":e.string().max(Yly).optional(),"bg-BG":e.string().max($ly).optional(),"cs-CZ":e.string().max(Qly).optional(),"sk-SK":e.string().max(Jly).optional(),"nb-NO":e.string().max(Xly).optional(),"is-IS":e.string().max(edy).optional(),"hu-HU":e.string().max(tdy).optional()}).optional().describe("Translated user-authored document content keyed by full supported locales such as `de-DE`. Values may be empty strings to intentionally blank content for a locale."),intra_eu_b2b_goods:e.object({"en-US":e.string().max(ndy).nullish(),"de-DE":e.string().max(sdy).nullish(),"it-IT":e.string().max(ody).nullish(),"fr-FR":e.string().max(idy).nullish(),"es-ES":e.string().max(ady).nullish(),"sl-SI":e.string().max(rdy).nullish(),"pt-PT":e.string().max(ldy).nullish(),"nl-NL":e.string().max(ddy).nullish(),"pl-PL":e.string().max(udy).nullish(),"hr-HR":e.string().max(cdy).nullish(),"sv-SE":e.string().max(pdy).nullish(),"fi-FI":e.string().max(mdy).nullish(),"et-EE":e.string().max(xdy).nullish(),"bg-BG":e.string().max(gdy).nullish(),"cs-CZ":e.string().max(ydy).nullish(),"sk-SK":e.string().max(Ody).nullish(),"nb-NO":e.string().max(vdy).nullish(),"is-IS":e.string().max(Sdy).nullish(),"hu-HU":e.string().max(hdy).nullish()}).nullish().describe("Translated user-authored document content keyed by full supported locales such as `de-DE`. Values may be empty strings to intentionally blank content for a locale."),intra_eu_b2c:e.object({"en-US":e.string().max(bdy).optional(),"de-DE":e.string().max(zdy).optional(),"it-IT":e.string().max(fdy).optional(),"fr-FR":e.string().max(Bdy).optional(),"es-ES":e.string().max(Tdy).optional(),"sl-SI":e.string().max(Idy).optional(),"pt-PT":e.string().max(Edy).optional(),"nl-NL":e.string().max(Ddy).optional(),"pl-PL":e.string().max(Rdy).optional(),"hr-HR":e.string().max(_dy).optional(),"sv-SE":e.string().max(Ndy).optional(),"fi-FI":e.string().max(Mdy).optional(),"et-EE":e.string().max(Udy).optional(),"bg-BG":e.string().max(Pdy).optional(),"cs-CZ":e.string().max(Cdy).optional(),"sk-SK":e.string().max(wdy).optional(),"nb-NO":e.string().max(Ady).optional(),"is-IS":e.string().max(Fdy).optional(),"hu-HU":e.string().max(kdy).optional()}).optional().describe("Translated user-authored document content keyed by full supported locales such as `de-DE`. Values may be empty strings to intentionally blank content for a locale."),"3w_b2b":e.object({"en-US":e.string().max(jdy).optional(),"de-DE":e.string().max(Hdy).optional(),"it-IT":e.string().max(Ldy).optional(),"fr-FR":e.string().max(Gdy).optional(),"es-ES":e.string().max(Vdy).optional(),"sl-SI":e.string().max(Kdy).optional(),"pt-PT":e.string().max(Zdy).optional(),"nl-NL":e.string().max(qdy).optional(),"pl-PL":e.string().max(Wdy).optional(),"hr-HR":e.string().max(Ydy).optional(),"sv-SE":e.string().max($dy).optional(),"fi-FI":e.string().max(Qdy).optional(),"et-EE":e.string().max(Jdy).optional(),"bg-BG":e.string().max(Xdy).optional(),"cs-CZ":e.string().max(euy).optional(),"sk-SK":e.string().max(tuy).optional(),"nb-NO":e.string().max(nuy).optional(),"is-IS":e.string().max(suy).optional(),"hu-HU":e.string().max(ouy).optional()}).optional().describe("Translated user-authored document content keyed by full supported locales such as `de-DE`. Values may be empty strings to intentionally blank content for a locale."),"3w_b2c":e.object({"en-US":e.string().max(iuy).optional(),"de-DE":e.string().max(auy).optional(),"it-IT":e.string().max(ruy).optional(),"fr-FR":e.string().max(luy).optional(),"es-ES":e.string().max(duy).optional(),"sl-SI":e.string().max(uuy).optional(),"pt-PT":e.string().max(cuy).optional(),"nl-NL":e.string().max(puy).optional(),"pl-PL":e.string().max(muy).optional(),"hr-HR":e.string().max(xuy).optional(),"sv-SE":e.string().max(guy).optional(),"fi-FI":e.string().max(yuy).optional(),"et-EE":e.string().max(Ouy).optional(),"bg-BG":e.string().max(vuy).optional(),"cs-CZ":e.string().max(Suy).optional(),"sk-SK":e.string().max(huy).optional(),"nb-NO":e.string().max(buy).optional(),"is-IS":e.string().max(zuy).optional(),"hu-HU":e.string().max(fuy).optional()}).optional().describe("Translated user-authored document content keyed by full supported locales such as `de-DE`. Values may be empty strings to intentionally blank content for a locale."),export:e.object({"en-US":e.string().max(Buy).optional(),"de-DE":e.string().max(Tuy).optional(),"it-IT":e.string().max(Iuy).optional(),"fr-FR":e.string().max(Euy).optional(),"es-ES":e.string().max(Duy).optional(),"sl-SI":e.string().max(Ruy).optional(),"pt-PT":e.string().max(_uy).optional(),"nl-NL":e.string().max(Nuy).optional(),"pl-PL":e.string().max(Muy).optional(),"hr-HR":e.string().max(Uuy).optional(),"sv-SE":e.string().max(Puy).optional(),"fi-FI":e.string().max(Cuy).optional(),"et-EE":e.string().max(wuy).optional(),"bg-BG":e.string().max(Auy).optional(),"cs-CZ":e.string().max(Fuy).optional(),"sk-SK":e.string().max(kuy).optional(),"nb-NO":e.string().max(juy).optional(),"is-IS":e.string().max(Huy).optional(),"hu-HU":e.string().max(Luy).optional()}).optional().describe("Translated user-authored document content keyed by full supported locales such as `de-DE`. Values may be empty strings to intentionally blank content for a locale.")}).optional().describe("Translated default tax clauses keyed by transaction type. Each transaction-type entry is a localized-content map keyed by full supported locales.")}).describe("Translated default document-facing settings keyed by full supported locales. Base scalar settings remain the default-language source of truth."),e.null()]).optional().describe("Translated default document-facing settings keyed by full supported locales. Used when new documents inherit default texts and when document defaults are rendered in an explicit non-default language."),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(Guy).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}"),bank_accounts:e.array(e.object({type:e.enum(["iban","us_domestic","uk_domestic","other"]).default(Vuy).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."),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)."),purchase_order_hide_prices:e.boolean().nullish().describe("Default hide_prices for new purchase orders. When true, prices and totals are hidden by default. When false or unset, prices are hidden only while no line has a price."),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."),hide_tax_when_untaxed:e.boolean().nullish().describe("When true, rendered documents omit the tax row and per-line tax rate for lines and totals where no tax was applied. An explicitly applied 0% tax rate is still shown. Defaults to false, which keeps the 0% row for untaxed amounts."),tax_clause_defaults:e.union([e.object({domestic:e.string().nullish().describe("Default tax clause for domestic transactions (same country)"),article_76a:e.string().nullish().describe("Default clause for Slovenian domestic reverse charge under Article 76.a ZDDV-1."),intra_eu_b2b:e.string().nullish().describe("Default tax clause for intra-EU B2B transactions (reverse charge applies)"),intra_eu_b2b_goods:e.string().nullish().describe("Default tax clause for intra-EU B2B sales of goods (intra-community supply). Used when the lines are classified as product; falls back to intra_eu_b2b when empty."),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.")}),e.null()]).optional().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."),default_warehouse_id:e.string().nullish().describe("Warehouse to use for inventory movements created on documents issued by this business unit, when set and not deleted. Falls back to the entity's default warehouse otherwise. Send null to clear.")}).describe("Business-unit overrides for document-facing settings. Uses the same field names as entity settings while excluding entity-only compliance and fiscalization settings."),logo_url:e.url().nullish(),signature_url:e.url().nullish()}).describe("Frozen business-unit snapshot persisted on documents for rendering and history."),e.null()]).optional().describe("Frozen business-unit snapshot used for stable rendering and historical accuracy."),warehouse_id:e.string().nullish().describe("Warehouse the document's stock effect applies to. Omit or send null to use the business unit's default warehouse, then the entity default. Used by invoices, credit notes and expenses; stored but inert on other document types."),customer_id:e.string().max(Kuy).nullish(),customer:e.union([e.object({name:e.string().nullish(),unit_name:e.string().nullish().describe("Deprecated compatibility field. This value is no longer used for business-unit rendering; use `business_unit.name` on the document instead."),email:e.string().max(Zuy).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().max(quy).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(),peppol_scheme_id:e.string().nullish(),e_invoicing:e.union([e.object({buyer_reference:e.string().nullish().describe("Canonical EN 16931 BT-10 buyer reference stored on the document customer snapshot. For German public-sector recipients, enter the Leitweg-ID here. For German B2B recipients this is optional unless the buyer requires it. Do not send a separate leitweg_id, routing_id, or top-level buyer_reference field.")}).describe("Customer e-invoicing data copied into the document customer snapshot. These fields are buyer/customer document data, not German validation state."),e.null()]).optional(),delivery_address:e.union([e.object({address:e.string().min(1).max(Wuy),address_2:e.string().max(Yuy).nullish(),post_code:e.string().min(1).max($uy),city:e.string().min(1).max(Quy),country_code:e.string().min(Xuy).max(ecy).nullish().default(Juy)}).describe("Physical delivery address when it differs from the buyer's billing address. Required by French law when applicable."),e.null()]).optional().describe("Physical delivery address for this document when it differs from the customer's billing address. It is stored only on the document snapshot and is not saved to the customer record."),bank_accounts:e.array(e.object({type:e.enum(["iban","us_domestic","uk_domestic","other"]).default(tcy).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(),is_end_consumer:e.boolean().nullish(),is_tax_subject:e.boolean().nullish().describe("Whether the customer is VAT identified. Stored in the document snapshot and used by country-specific tax reports; a country code alone does not imply VAT identification."),ujp:e.union([e.object({receiver_name:e.string().min(1).nullish().describe("UJP envelope recipient name. If omitted, package generation falls back to the document customer name."),receiver_identifier:e.string().min(1).nullish().describe("Optional recipient tax number or identifier override for the UJP envelope. If omitted, package generation falls back to the document customer tax number."),receiver_agent:e.string().min(1).nullish().describe("Recipient BIC for the UJP envelope. Public budget users normally use UJPLSI2DICL."),receiver_mailbox:e.string().min(1).nullish().describe("Recipient IBAN/TRR mailbox for the UJP envelope.")}).describe("Optional Slovenian UJP recipient routing data stored on customers and copied into document customer snapshots."),e.null()]).optional(),sdi:e.union([e.object({recipient_code:e.string().regex(ncy).nullish().describe("Italian SdI recipient code for buyer routing. When neither a code nor PEC is supplied, domestic invoices use 0000000 and the seller must provide the buyer a courtesy copy and availability notice."),pec:e.email().nullish().describe("Italian certified email address for buyer routing. When provided without an SdI recipient code, FatturaPA uses `CodiceDestinatario = 0000000` plus `PECDestinatario`."),fiscal_code:e.string().regex(scy).nullish().describe("Buyer's Italian codice fiscale, independent of their VAT number. For a domestic consumer, legacy tax_number remains a fallback fiscal-code input. Required for VAT-group participants where applicable."),fiscal_regime:e.string().regex(ocy).nullish().describe("Issuer-only fiscal regime snapshot, captured from settings.tax_rules.italy at issuance. Ignored for buyer routing.")}),e.null()]).optional(),bank_account:e.object({type:e.enum(["iban","us_domestic","uk_domestic","other"]).default(icy).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("Customer recipient snapshot stored on the document. When a document is created with customer_id only, the snapshot is populated from the saved customer. When an explicit customer object is provided, the snapshot is built from that payload and known omitted fields are stored and returned as null instead of being backfilled from the saved customer."),e.null()]).optional().describe("Customer information snapshot stored on the document. Null means no customer. When present, known customer fields are returned with null for omitted values."),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(acy).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."),translations:e.object({note:e.object({"en-US":e.string().max(rcy).optional(),"de-DE":e.string().max(lcy).optional(),"it-IT":e.string().max(dcy).optional(),"fr-FR":e.string().max(ucy).optional(),"es-ES":e.string().max(ccy).optional(),"sl-SI":e.string().max(pcy).optional(),"pt-PT":e.string().max(mcy).optional(),"nl-NL":e.string().max(xcy).optional(),"pl-PL":e.string().max(gcy).optional(),"hr-HR":e.string().max(ycy).optional(),"sv-SE":e.string().max(Ocy).optional(),"fi-FI":e.string().max(vcy).optional(),"et-EE":e.string().max(Scy).optional(),"bg-BG":e.string().max(hcy).optional(),"cs-CZ":e.string().max(bcy).optional(),"sk-SK":e.string().max(zcy).optional(),"nb-NO":e.string().max(fcy).optional(),"is-IS":e.string().max(Bcy).optional(),"hu-HU":e.string().max(Tcy).optional()}).optional().describe("Translated user-authored document content keyed by full supported locales such as `de-DE`. Values may be empty strings to intentionally blank content for a locale."),payment_terms:e.object({"en-US":e.string().max(Icy).optional(),"de-DE":e.string().max(Ecy).optional(),"it-IT":e.string().max(Dcy).optional(),"fr-FR":e.string().max(Rcy).optional(),"es-ES":e.string().max(_cy).optional(),"sl-SI":e.string().max(Ncy).optional(),"pt-PT":e.string().max(Mcy).optional(),"nl-NL":e.string().max(Ucy).optional(),"pl-PL":e.string().max(Pcy).optional(),"hr-HR":e.string().max(Ccy).optional(),"sv-SE":e.string().max(wcy).optional(),"fi-FI":e.string().max(Acy).optional(),"et-EE":e.string().max(Fcy).optional(),"bg-BG":e.string().max(kcy).optional(),"cs-CZ":e.string().max(jcy).optional(),"sk-SK":e.string().max(Hcy).optional(),"nb-NO":e.string().max(Lcy).optional(),"is-IS":e.string().max(Gcy).optional(),"hu-HU":e.string().max(Vcy).optional()}).optional().describe("Translated user-authored document content keyed by full supported locales such as `de-DE`. Values may be empty strings to intentionally blank content for a locale."),tax_clause:e.object({"en-US":e.string().max(Kcy).optional(),"de-DE":e.string().max(Zcy).optional(),"it-IT":e.string().max(qcy).optional(),"fr-FR":e.string().max(Wcy).optional(),"es-ES":e.string().max(Ycy).optional(),"sl-SI":e.string().max($cy).optional(),"pt-PT":e.string().max(Qcy).optional(),"nl-NL":e.string().max(Jcy).optional(),"pl-PL":e.string().max(Xcy).optional(),"hr-HR":e.string().max(epy).optional(),"sv-SE":e.string().max(tpy).optional(),"fi-FI":e.string().max(npy).optional(),"et-EE":e.string().max(spy).optional(),"bg-BG":e.string().max(opy).optional(),"cs-CZ":e.string().max(ipy).optional(),"sk-SK":e.string().max(apy).optional(),"nb-NO":e.string().max(rpy).optional(),"is-IS":e.string().max(lpy).optional(),"hu-HU":e.string().max(dpy).optional()}).optional().describe("Translated user-authored document content keyed by full supported locales such as `de-DE`. Values may be empty strings to intentionally blank content for a locale."),footer:e.object({"en-US":e.string().max(upy).optional(),"de-DE":e.string().max(cpy).optional(),"it-IT":e.string().max(ppy).optional(),"fr-FR":e.string().max(mpy).optional(),"es-ES":e.string().max(xpy).optional(),"sl-SI":e.string().max(gpy).optional(),"pt-PT":e.string().max(ypy).optional(),"nl-NL":e.string().max(Opy).optional(),"pl-PL":e.string().max(vpy).optional(),"hr-HR":e.string().max(Spy).optional(),"sv-SE":e.string().max(hpy).optional(),"fi-FI":e.string().max(bpy).optional(),"et-EE":e.string().max(zpy).optional(),"bg-BG":e.string().max(fpy).optional(),"cs-CZ":e.string().max(Bpy).optional(),"sk-SK":e.string().max(Tpy).optional(),"nb-NO":e.string().max(Ipy).optional(),"is-IS":e.string().max(Epy).optional(),"hu-HU":e.string().max(Dpy).optional()}).optional().describe("Translated user-authored document content keyed by full supported locales such as `de-DE`. Values may be empty strings to intentionally blank content for a locale."),signature:e.object({"en-US":e.string().max(Rpy).optional(),"de-DE":e.string().max(_py).optional(),"it-IT":e.string().max(Npy).optional(),"fr-FR":e.string().max(Mpy).optional(),"es-ES":e.string().max(Upy).optional(),"sl-SI":e.string().max(Ppy).optional(),"pt-PT":e.string().max(Cpy).optional(),"nl-NL":e.string().max(wpy).optional(),"pl-PL":e.string().max(Apy).optional(),"hr-HR":e.string().max(Fpy).optional(),"sv-SE":e.string().max(kpy).optional(),"fi-FI":e.string().max(jpy).optional(),"et-EE":e.string().max(Hpy).optional(),"bg-BG":e.string().max(Lpy).optional(),"cs-CZ":e.string().max(Gpy).optional(),"sk-SK":e.string().max(Vpy).optional(),"nb-NO":e.string().max(Kpy).optional(),"is-IS":e.string().max(Zpy).optional(),"hu-HU":e.string().max(qpy).optional()}).optional().describe("Translated user-authored document content keyed by full supported locales such as `de-DE`. Values may be empty strings to intentionally blank content for a locale.")}).describe("Translated user-authored document content keyed by full supported locales. Empty string intentionally blanks the field for that locale."),total:e.number().describe("Document total before tax in the currency's major unit. For EUR, `29.90` means \u20AC29.90, not 2,990 cents."),total_with_tax:e.number().describe("Document total after tax in the currency's major unit. For EUR, `29.90` means \u20AC29.90, not 2,990 cents."),total_discount:e.number().describe("Document discount total in the currency's major unit, 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(),base_converted:e.number().nullish(),amount_converted:e.number().nullish(),reverse_charge:e.boolean().nullish()})).describe("Applied taxes summary"),currency_code:e.string().max(Wpy),entity_id:e.string().max(Ypy),date_year:e.number().min($py).max(Qpy),shareable_id:e.string().max(Jpy).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()).refine(d=>Object.keys(d).length<=50,"Metadata can have maximum 50 properties").nullish().describe("Custom string key-value data for your own use, with up to 50 properties. Keys are opaque and may contain periods. Useful for storing external IDs, tags, or integration data."),exchange_rate:e.union([e.object({rate:e.number().gt(Xpy).describe("Positive exchange rate used for conversion"),source:e.string().describe("Source of the exchange rate (e.g., 'auto' or 'manual')"),date:e.iso.datetime({}).describe("Date of the exchange rate"),quote_currency:e.string().min(emy).max(tmy).describe("Quote currency (the base currency converted to)")}),e.null()]).optional().describe("Currency exchange rate information if conversion was applied. Resolved for the supply/tax-point date (date_service_to, else date_service) when it falls on or before the issue date (date); otherwise resolved for the issue date."),crypto_equivalents:e.array(e.object({code:e.enum(["BTC","ETH","SOL","USDC","USDT"]).describe("Crypto asset code."),amount:e.number().describe("Crypto amount equivalent to the document's total_with_tax at `rate`."),rate:e.number().gt(nmy).describe("Units of the document currency per 1 unit of `code`, at `date`."),quote_currency:e.string().describe("The document's currency_code this equivalent was computed against."),source:e.string().describe("Source of the rate (e.g. 'auto')."),date:e.iso.datetime({}).describe("Date the rate was resolved for."),wallet_address:e.string().nullable().describe("Wallet address snapshot from entity settings at the time this equivalent was computed."),network:e.string().nullable().describe("Network label snapshot from entity settings at the time this equivalent was computed.")})).nullish().describe("Opt-in, informational crypto amount(s) equivalent to total_with_tax at the document-date rate. Null unless entity settings.crypto_equivalents is enabled and the document type supports it (invoice, advance_invoice, estimate). The document itself is always invoiced and settled in currency_code."),total_converted:e.number().min(smy).max(omy).nullish(),total_with_tax_converted:e.number().min(imy).max(amy).nullish(),rounding_correction:e.number().nullish().describe("Rounding correction in the currency's major unit, 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.union([e.object({validation_enabled:e.boolean().nullish().describe("Override entity default: true = validate, false = skip, null = use entity setting"),validation_required:e.boolean().nullish().describe("When true, final document creation/finalization must fail if current e-SLOG validation fails. Draft creation stores validation status without blocking."),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"),validation_version:e.string().nullish().describe("Validator/generator version used for the stored validation result"),validation_cache_key:e.string().nullish().describe("Hash of the relevant document/entity data used for the stored validation result")}),e.null()]).optional().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.union([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."),request_id:e.string().nullish().describe("VIES consultation number, returned when the check was made with the entity's own VAT number. Read-only.")}),e.null(),e.null()]).optional().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({}),created_by_user_id:e.string().nullish().describe("ID of the user who created the document; null for documents created with an API key, by automation, or before this field existed. Read-only."),date_due:e.iso.datetime({}).nullish().describe("Date the invoice is due (ISO 8601 datetime at midnight UTC)"),total_paid:e.number().min(rmy).max(lmy),total_due:e.number().min(dmy).max(umy),paid_in_full:e.boolean(),verifactu:e.union([e.object({record_id:e.string().describe("Immutable fiscal record identifier."),status:e.enum(["pending","accepted","accepted_with_errors","rejected","cancelled"]).describe("Authority submission state. Pending and accepted-with-errors invoices remain deliverable; rejected, cancelled and locally voided invoices are blocked."),hash:e.string().describe("Uppercase SHA-256 fingerprint of the canonical AEAT record."),generated_at:e.string().describe("Immutable record-generation timestamp including timezone."),qr_url:e.string().describe("AEAT invoice verification URL encoded by the printed QR."),software_version:e.string().describe("Fiscal software version that generated this record."),csv:e.string().nullable().describe("AEAT submission receipt code, when supplied."),error_code:e.string().nullable().describe("AEAT validation code or local transport error classification."),error_message:e.string().nullable().describe("Authority validation message or retry information.")}).describe("The latest retained fiscal record and its AEAT submission outcome."),e.object({invoice_type:e.union([e.literal("F1"),e.literal("F2"),e.literal("R1"),e.literal("R2"),e.literal("R3"),e.literal("R4"),e.literal("R5"),e.literal(null)]).nullish().describe("AEAT invoice type. Ordinary invoices default to F1; rectifying credit notes require an explicit R1\u2013R5 reason type."),description:e.string().min(1).max(cmy).nullish().describe("Description of the invoiced operation. Defaults to the document's line descriptions."),customer_id_type:e.union([e.literal("02"),e.literal("03"),e.literal("04"),e.literal("05"),e.literal("06"),e.literal("07"),e.literal(null)]).nullish().describe("AEAT identification type for a recipient identified without Spanish NIF: VAT ID, passport, official document, residence certificate, other evidence, or not registered in the census."),tax_treatments:e.array(e.object({tax_index:e.number().min(pmy).describe("Zero-based index in the document tax summary, available from calculation preview."),tax:e.enum(["01","02","03","05"]).describe("AEAT tax code: IVA, IPSI, IGIC or other."),regime:e.string().regex(mmy).describe("Applicable AEAT tax-regime code, supplied by the issuer."),qualification:e.enum(["S1","S2","N1","N2","E1","E2","E3","E4","E5","E6"]).describe("Taxable, reverse-charge, non-subject or statutory exemption classification.")})).max(xmy).nullish().describe("Explicit classifications for exceptional tax rows. Ordinary domestic positive-rate IVA defaults to 01/01/S1. Zero, exempt, reverse-charge and non-domestic rows require classification.")}).describe("Fiscal classifications supplied before issue, or as an append-only fiscal metadata correction."),e.null()]).optional(),furs:e.union([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(gmy),issue_date_time:e.string().optional(),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(),print_count:e.number().min(ymy).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()}).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)."),e.null()]).optional(),fina:e.union([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(),payment_type_changed_at:e.iso.datetime({}).optional().describe("Set when the method was corrected after issuing and the change was accepted by CIS."),payment_change_unconfirmed:e.object({attempt_id:e.string().describe("Identifies the unresolved payment-method change. Retries of the same change retain this identifier."),payment_type:e.string().describe("CIS NacinPlac code the change was sent with."),payment_id:e.string().optional(),attempted_at:e.iso.datetime({}),reason:e.enum(["sent","unreachable","unrecorded","refused"]).describe("`sent` \u2014 awaiting CIS; `unreachable` \u2014 the answer never came; `unrecorded` \u2014 CIS accepted but the record could not be written; `refused` \u2014 a retry was refused while the first send is still unconfirmed.")}).optional().describe("A payment-method change was sent to CIS and not yet confirmed. The stored method is the old one; CIS may hold the new one. Cleared when a retry of the same change is confirmed; any other change is refused (409) while this is set."),numbering_sequence:e.string().optional(),issue_date_time:e.string().optional(),issue_date_time_iso:e.iso.datetime({}).optional(),payload:e.record(e.string(),e.unknown()).describe("CIS SOAP request payload"),cis_record:e.record(e.string(),e.unknown()).optional().describe("The record as submitted to CIS. Retained so a later payment-method change can resend it verbatim; never rewritten, since the ZKI was computed over these exact values."),subsequent_submit:e.boolean().optional().describe("Server-managed subsequent submission state (FINA NakDost); never accepted as document input."),issuer_oib:e.string().optional(),operator_label:e.string().optional(),print_count:e.number().min(Omy).optional()}).optional()}).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)."),e.null()]).optional(),pt:e.union([e.string(),e.number(),e.boolean(),e.null(),e.record(e.string(),e.unknown()),e.array(e.unknown())]).optional(),ticketbai:e.union([e.object({lroe_income_epigraphs:e.array(e.string().regex(vmy)).min(1).max(Smy).nullish().describe("Explicit IAE activity epigraphs for this invoice. Required for Bizkaia model 140; unsupported for model 240."),simplified:e.boolean().nullish().describe("Issue a simplified invoice only when legally eligible. Defaults to false."),description:e.string().min(1).max(hmy).nullish(),tax_treatment:e.union([e.literal("taxable"),e.literal("exempt"),e.literal("non_subject"),e.literal("reverse_charge"),e.literal(null)]).nullish().describe("Treatment for the whole invoice. Required for zero-rate or untaxed invoices; positive VAT defaults to taxable. Mixed treatments require separate invoices in the pilot."),vat_regime:e.union([e.literal("01"),e.literal("02"),e.literal(null)]).nullish().describe("01 general regime (default); 02 export operations. Other special regimes are outside the pilot."),exemption_cause:e.union([e.literal("E1"),e.literal("E2"),e.literal("E3"),e.literal("E4"),e.literal("E5"),e.literal("E6"),e.literal(null)]).nullish(),non_subject_cause:e.union([e.literal("OT"),e.literal("RL"),e.literal("VT"),e.literal("IE"),e.literal(null)]).nullish(),recipient_id_type:e.union([e.literal("02"),e.literal("03"),e.literal("04"),e.literal("05"),e.literal("06"),e.literal(null)]).nullish().describe("Foreign recipient identification type. Required for a non-Spanish recipient."),operation_type:e.union([e.literal("goods"),e.literal("services"),e.literal(null)]).nullish().describe("Required when the foreign recipient needs an operation-level breakdown."),rectification_code:e.union([e.literal("R1"),e.literal("R2"),e.literal("R3"),e.literal("R4"),e.literal("R5"),e.literal(null)]).nullish().describe("Required for credit notes. The pilot uses difference rectification (I) and the linked source invoices."),cancellation:e.object({record_id:e.string(),status:e.enum(["pending","sending","accepted","accepted_with_errors","rejected","unknown"]),reason:e.string()}).nullish(),record_id:e.string().nullish(),identifier:e.string().nullish(),qr_url:e.string().nullish(),status:e.union([e.literal("pending"),e.literal("sending"),e.literal("accepted"),e.literal("accepted_with_errors"),e.literal("rejected"),e.literal("unknown"),e.literal(null)]).nullish()}),e.null()]).optional(),ksef:e.union([e.object({submission_id:e.string(),status:e.enum(["reserved","processing","dispatching","submitted","accepted","rejected","retryable_error"]),revision:e.number(),error_code:e.string().nullable(),error_message:e.string().nullable(),ksef_number:e.string().nullable(),invoice_hash:e.string().nullable(),upo_available:e.boolean(),recovery_available:e.boolean().optional().describe("Whether recovery can be requested. The recovery action verifies definitive nonacceptance before returning the document to draft; ambiguous results return 409.")}).describe("Server-managed Poland KSeF lifecycle. Dispatching is ambiguous and cannot be automatically resent. Acceptance requires authority invoice hash verification."),e.null()]).optional(),early_payment_discount:e.union([e.object({terms_id:e.string().optional(),percentage:e.number().gt(bmy).lt(zmy).multipleOf(fmy).describe("Discount percentage with at most four decimal places, greater than zero and less than 100."),days:e.number().min(Bmy).max(Tmy),deadline:e.string().describe("Inclusive, snapshotted local eligibility date (YYYY-MM-DD)."),timezone:e.string().describe("Issuer IANA timezone snapshotted with the terms."),currency_precision:e.number().min(Imy).max(Emy),eligible_base:e.number(),discount_amount:e.number().describe("Available conditional discount; does not reduce the invoice total."),discounted_payable:e.number().describe("Cash required in total within the discount window, before subtracting partial cash already received."),remaining_discounted_payable:e.number().describe("Conditional cash still required after payments already received; usable only while the offer remains eligible."),discount_taken:e.number().describe("Realised non-cash settlement, recorded separately from payments and ordinary discounts."),total_cash_received:e.number(),total_non_cash_applied:e.number().describe("Applied credits and advances/deposits, separate from cash and the realised discount."),qualification_base:e.number().nullable().describe("Historical earned qualification base, retained to revalidate cash after later credits, advances and payment restoration. Null before any qualification."),total_settled:e.number().describe("Cash, applied advances/credits and realised discount combined. Can exceed invoice total for an overpayment."),qualifying_payment_id:e.string().nullable()}),e.null()]).optional(),xrechnung:e.union([e.object({validation_enabled:e.boolean().nullish().describe("Whether German XRechnung/ZUGFeRD validation was enabled when this document was last validated. This is server-managed document validation state, not buyer/customer routing data."),validation_required:e.boolean().nullish().describe("Whether this validation result was required for the save/finalization call. When true, final document creation/finalization fails if current German e-invoice validation fails. Draft creation stores validation status without blocking."),validation_status:e.union([e.literal("valid"),e.literal("invalid"),e.literal("not_validated"),e.literal(null)]).nullish().describe("Stored German validation status from the last saved validation: 'valid', 'invalid', or 'not_validated'. German export downloads use this stored result when it is still current for the document; otherwise export re-validates the current document and returns a 422 with field errors if that live validation fails."),validation_errors:e.array(e.string()).nullish().describe("German XRechnung/ZUGFeRD validation error messages from the last validation run. These messages describe missing or invalid document/entity/customer data."),validated_at:e.string().nullish().describe("ISO timestamp when validation was last performed."),validation_version:e.string().nullish().describe("Validator/generator version used for the stored validation result."),validation_cache_key:e.string().nullish().describe("Hash of the relevant document, entity, and customer data used for the stored validation result. Export code uses this with validation_version to avoid trusting stale validation state.")}).describe("Server-managed validation state for a German e-invoice standard. Stored on invoice and credit-note documents as either xrechnung or zugferd. Buyer reference / Leitweg-ID input belongs under customer.e_invoicing.buyer_reference, not here."),e.null()]).optional().describe("Server-managed German XRechnung validation data stored on invoices. Only applicable when entity.country_code = 'DE' and XRechnung is enabled. Buyer reference / Leitweg-ID input is stored on customer.e_invoicing.buyer_reference."),zugferd:e.union([e.object({validation_enabled:e.boolean().nullish().describe("Whether German XRechnung/ZUGFeRD validation was enabled when this document was last validated. This is server-managed document validation state, not buyer/customer routing data."),validation_required:e.boolean().nullish().describe("Whether this validation result was required for the save/finalization call. When true, final document creation/finalization fails if current German e-invoice validation fails. Draft creation stores validation status without blocking."),validation_status:e.union([e.literal("valid"),e.literal("invalid"),e.literal("not_validated"),e.literal(null)]).nullish().describe("Stored German validation status from the last saved validation: 'valid', 'invalid', or 'not_validated'. German export downloads use this stored result when it is still current for the document; otherwise export re-validates the current document and returns a 422 with field errors if that live validation fails."),validation_errors:e.array(e.string()).nullish().describe("German XRechnung/ZUGFeRD validation error messages from the last validation run. These messages describe missing or invalid document/entity/customer data."),validated_at:e.string().nullish().describe("ISO timestamp when validation was last performed."),validation_version:e.string().nullish().describe("Validator/generator version used for the stored validation result."),validation_cache_key:e.string().nullish().describe("Hash of the relevant document, entity, and customer data used for the stored validation result. Export code uses this with validation_version to avoid trusting stale validation state.")}).describe("Server-managed validation state for a German e-invoice standard. Stored on invoice and credit-note documents as either xrechnung or zugferd. Buyer reference / Leitweg-ID input belongs under customer.e_invoicing.buyer_reference, not here."),e.null()]).optional().describe("Server-managed German ZUGFeRD/Factur-X validation data stored on invoices. Only applicable when entity.country_code = 'DE' and ZUGFeRD is enabled. Buyer reference / Leitweg-ID input is stored on customer.e_invoicing.buyer_reference."),ujp:e.union([e.object({validation_enabled:e.boolean().nullish().describe("Override entity/default behavior: true = validate UJP package requirements, false = skip, null = use default."),validation_required:e.boolean().nullish().describe("When true, final document creation must fail if current UJP package validation fails."),validation_status:e.union([e.literal("valid"),e.literal("invalid"),e.literal("not_validated"),e.literal(null)]).nullish().describe("Validation status for UJP package/envelope requirements."),validation_errors:e.array(e.string()).nullish().describe("Array of validation error messages when status is invalid."),validated_at:e.string().nullish().describe("ISO timestamp when UJP validation was last performed."),validation_version:e.string().nullish().describe("Validator/generator version used for the stored UJP validation result."),validation_cache_key:e.string().nullish().describe("Hash of the relevant document/entity data used for the stored UJP validation result.")}).describe("UJP package validation data for Slovenian invoice/credit-note exports. Web may expose UJP download as a secondary e-SLOG dropdown action when current UJP validation is valid."),e.null()]).optional().describe("UJP package validation data for Slovenian invoice exports. Only applicable when entity.country_code = 'SI' and UJP validation is enabled."),nav:e.union([e.object({status:e.enum(["reserved","dispatching","submitted","done","done_with_warnings","aborted","ambiguous","failed","annulment_pending","annulled"]).describe("Lifecycle status of a document's NAV submission."),operation:e.enum(["CREATE","MODIFY","STORNO"]).describe("NAV `invoiceOperation` used for this document's submission."),submission_id:e.string().describe("Identifier of the underlying nav_submissions row driving this document's NAV lifecycle."),environment:e.enum(["test","production"]).describe("NAV Online Sz\xE1mla environment. Test and production are fully separate NAV registrations."),invoice_number:e.string().describe("Invoice number as reported to NAV."),original_invoice_number:e.string().nullable().describe("Original invoice number this submission modifies/cancels, if this is a MODIFY/STORNO."),modification_index:e.number().nullable().describe("Modification index within the original invoice's NAV chain, if this is a MODIFY/STORNO."),transaction_id:e.string().nullable().describe("NAV transaction ID once the submission has been accepted by NAV."),submitted_at:e.string().nullable().describe("ISO datetime the submission was sent to NAV, if it has been."),completed_at:e.string().nullable().describe("ISO datetime NAV processing finished (done/failed/aborted/annulled), if it has."),error_code:e.string().nullable().describe("Top-level NAV error code, if the submission failed."),error_message:e.string().nullable().describe("Top-level NAV error message, if the submission failed."),messages:e.array(e.object({severity:e.enum(["error","warning","info"]).describe("Severity of the NAV validation/processing message."),code:e.string().nullable().describe("NAV validation/error code, if any."),message:e.string().nullable().describe("Human-readable message text from NAV, if any."),tag:e.string().nullable().describe("XML tag the message points to, if any."),line:e.number().nullable().describe("XML line number the message points to, if any.")}).describe("A single NAV technical or business validation/processing message.")).describe("Technical and business validation/processing messages returned by NAV."),retry_available:e.boolean().describe("Whether a retry action is currently available for this document's NAV submission."),reconcile_available:e.boolean().describe("Whether a manual reconcile-with-NAV action is currently available for this document."),annulment_available:e.boolean().describe("Whether a technical annulment action is currently available for this document's NAV submission.")}).describe("Server-managed Hungarian NAV Online Sz\xE1mla submission state for an invoice, credit note, or advance invoice. Never accepted as create/update input."),e.null()]).optional().describe("Server-managed Hungarian NAV Online Sz\xE1mla submission state for this invoice. Only applicable when entity.country_code = 'HU' and NAV is enabled."),sdi:e.union([e.object({country_code:e.enum(["IT"]).describe("Country code for Italy SDI lifecycle data."),status:e.enum(["pending","submitted","accepted","delivered","rejected","non_deliverable","failed","retry_scheduled"]).describe("Current SDI lifecycle status for the document."),latest_submission_id:e.string().nullish(),file_name:e.string().nullish(),sdi_identifier:e.string().nullish(),submitted_at:e.iso.datetime({}).nullish(),accepted_at:e.iso.datetime({}).nullish(),delivered_at:e.iso.datetime({}).nullish(),rejected_at:e.iso.datetime({}).nullish(),non_deliverable_at:e.iso.datetime({}).nullish(),failed_at:e.iso.datetime({}).nullish(),next_retry_at:e.iso.datetime({}).nullish(),retry_attempts:e.number().min(Dmy).nullish(),last_error:e.object({code:e.string().nullish(),message:e.string(),source:e.union([e.literal("validation"),e.literal("soap"),e.literal("callback"),e.literal("config"),e.literal("unknown"),e.literal(null)]).nullish()}).nullish(),diagnostics:e.object({requires_reconciliation:e.boolean().nullish().describe("True when dispatch may have reached SdI but no authoritative outcome is known; never automatically resend."),preparation_retry_count:e.number().min(Rmy).nullish(),certificate_warnings:e.array(e.string()).nullish(),endpoint:e.string().nullish(),certificate_fingerprint:e.string().nullish(),certificate_expires_at:e.iso.datetime({}).nullish()}).nullish()}).describe("Italy SDI/FatturaPA document lifecycle data. This is current document-facing state; full attempt history lives in SDI submissions and activities."),e.null()]).optional(),date_service:e.string().regex(_my).nullish().describe("Service date in YYYY-MM-DD format. For invoices and credit notes. When it (or date_service_to, if later) falls on or before date, foreign-currency conversion uses it as the exchange-rate reference date instead of date."),date_service_to:e.string().regex(Nmy).nullish().describe("Service period end date in YYYY-MM-DD format. For invoices and credit notes. Use with date_service for date ranges. Continuous/period supplies are chargeable at period end, so this takes precedence over date_service as the exchange-rate reference date when it falls on or before date."),tax_rules:e.object({slovenia:e.object({article_76a:e.boolean().describe("Whether this domestic Slovenian document uses reverse charge under Article 76.a ZDDV-1. VAT remains reported but is not added to the payable total.")})}).optional(),items:e.array(e.object({id:e.string().max(Mmy),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(Umy),description:e.string().nullable(),classification:e.union([e.literal("product"),e.literal("service"),e.literal("advance"),e.literal(null)]).nullish().describe("Item classification: product, service, or advance. Used by country-specific tax and e-invoicing mappings, including Poland goods/services and Portugal SAF-T product typing."),price:e.number().nullish().describe("Per-unit net price before tax in the document currency's major unit; for EUR, `29.90` means \u20AC29.90, not 2,990 cents. Always stores net price. Null for separator items."),gross_price:e.number().nullish().describe("Per-unit gross price including tax in the document currency's major unit; for EUR, `29.90` means \u20AC29.90, not 2,990 cents.\nOnly present if user originally sent gross price.\nUse 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().nullish().describe("Display unit for this line item. E-invoicing XML unit output may be overridden by `e_invoicing.unit_code`."),e_invoicing:e.union([e.object({unit_code:e.string().min(1).max(Pmy).nullish().describe("Optional XML unit-code override for e-SLOG, Peppol, XRechnung, and ZUGFeRD output. Use a supported UN/ECE Rec 20 / Rec 21 code such as C62, HUR, MGM, MLT, or SET."),vat_category:e.union([e.object({code:e.enum(["Z","E","AE","K","G"]).describe("EN 16931 VAT category code: K, AE, G, E or Z."),exemption_reason_code:e.string().regex(Cmy).nullish().describe("VATEX exemption reason code (BT-121). Not allowed with Z."),exemption_reason:e.string().min(1).max(wmy).nullish().describe("Exemption reason text (BT-120). Not allowed with Z.")}).describe("EN 16931 VAT category override for a line without VAT charged."),e.null()]).optional(),italy:e.union([e.object({nature:e.enum(["N2.1","N2.2","N3.1","N3.2"]).describe("Supported zero-VAT treatment: N2.1 territorial exclusion, N2.2 flat-rate (RF19) operations, N3.1 exports, N3.2 intra-community supplies. N2.2 is only accepted for an RF19 (regime forfettario) seller invoicing a domestic Italian buyer; ordinary RF01 sellers, and RF19 sellers invoicing a foreign buyer, must use N2.1/N3.1/N3.2 instead. Other special/exempt treatments are not supported and must not be relabelled."),legal_reference:e.string().min(1).max(Amy).describe("Actual legal basis for this zero-VAT operation, emitted as RiferimentoNormativo.")}),e.null()]).optional(),hungary:e.object({vat_treatment:e.union([e.object({type:e.enum(["exemption"]),case:e.enum(["AAM","TAM","KBAET","KBAUK","EAM","NAM"]).describe("NAV VAT exemption case code (invoiceData.xsd `VatExemptionCaseType`)."),reason:e.string().min(1).max(Fmy).describe("Free-text justification for the exemption/out-of-scope case (invoiceData.xsd DetailedReasonType.reason, common:SimpleText200NotBlankType: max 200 characters, non-blank).")}),e.object({type:e.enum(["out_of_scope"]),case:e.enum(["ATK","EUFAD37","EUFADE","EUE","HO"]).describe("NAV out-of-scope VAT case code (invoiceData.xsd `VatOutOfScopeCaseType`)."),reason:e.string().min(1).max(kmy).describe("Free-text justification for the exemption/out-of-scope case (invoiceData.xsd DetailedReasonType.reason, common:SimpleText200NotBlankType: max 200 characters, non-blank).")}),e.object({type:e.enum(["domestic_reverse_charge"])}),e.object({type:e.enum(["no_vat_charge"])}),e.null()]).optional().describe("Explicit Hungarian NAV VAT treatment for a document line, required whenever a line has no positive, non-reverse-charge VAT percentage. Never auto-derived from transaction_type, customer country, or product classification.")}).nullish().describe("Hungary-specific line-level e-invoicing options for NAV reporting. `vat_treatment` is required whenever the line has no positive, non-reverse-charge VAT percentage; NAV country validation itself is enforced elsewhere, not by this schema.")}).describe("Line-level e-invoicing options. `unit_code` overrides only XML unit output; the line `unit` field remains the display unit. `vat_category` overrides the derived EN 16931 VAT category in XRechnung and ZUGFeRD exports. `hungary` carries NAV-specific reporting input."),e.null()]).optional().describe("Line-level e-invoicing options for XML output."),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(),is_deductible:e.boolean().nullish().describe("AP compatibility flag derived from deductible_percentage when supplied. Without a percentage, true resolves to 100 and false resolves to 0."),deductible_percentage:e.number().min(jmy).max(Hmy).nullish().describe("Percentage of input tax that is deductible for AP bookkeeping, from 0 through 100."),pt_exemption_code:e.string().nullish(),pt_exemption_reason:e.string().nullish().describe("Optional Portugal legal wording override, at most 60 characters at issuance. Omit to use the explicitly selected tax's matching wording or the standard wording of pt_exemption_code. M19 has no default and requires a specific legal reason. The effective wording is saved on issuance."),destination_vat_country_code:e.string().min(Lmy).max(Gmy).nullish().describe("Server-owned ISO 3166-1 alpha-2 destination country marker indicating that this line tax is destination VAT for EU OSS. Null or omitted means issuer-country VAT.")}).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(Vmy).describe("Discount value"),type:e.enum(["percent","amount"]).default(Kmy).describe("Discount type: 'percent' (default) or 'amount'")})).max(Zmy).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 in the document currency's major unit. Null for separator items."),total_with_tax:e.number().nullish().describe("Line total after tax in the document currency's major unit. Null for separator items."),total_converted:e.number().min(qmy).max(Wmy).nullish(),total_with_tax_converted:e.number().min(Ymy).max($my).nullish(),invoice_id:e.string().max(Qmy).nullish(),advance_invoice_id:e.string().max(Jmy).nullish(),delivery_note_id:e.string().max(Xmy).nullish(),expense_id:e.string().max(exy).nullish(),item_id:e.string().max(txy).nullish(),metadata:e.record(e.string(),e.string()).refine(d=>Object.keys(d).length<=50,"Metadata can have maximum 50 properties").nullish().describe("Custom string key-value data for your own use, with up to 50 properties. Keys are opaque and may contain periods. Useful for storing external IDs, tags, or integration data."),revenue_recognition:e.union([e.object({method:e.union([e.literal("immediate"),e.literal("service_period_daily"),e.literal(null)]).nullish().describe("Line-level revenue recognition override. immediate recognizes on the document date; service_period_daily spreads over date_from/date_to."),date_from:e.string().nullish().describe("Line-level service period start date in YYYY-MM-DD format."),date_to:e.string().nullish().describe("Line-level service period end date in YYYY-MM-DD format.")}),e.null()]).optional().describe("Optional line-level revenue recognition override."),translations:e.object({name:e.object({"en-US":e.string().max(nxy).optional(),"de-DE":e.string().max(sxy).optional(),"it-IT":e.string().max(oxy).optional(),"fr-FR":e.string().max(ixy).optional(),"es-ES":e.string().max(axy).optional(),"sl-SI":e.string().max(rxy).optional(),"pt-PT":e.string().max(lxy).optional(),"nl-NL":e.string().max(dxy).optional(),"pl-PL":e.string().max(uxy).optional(),"hr-HR":e.string().max(cxy).optional(),"sv-SE":e.string().max(pxy).optional(),"fi-FI":e.string().max(mxy).optional(),"et-EE":e.string().max(xxy).optional(),"bg-BG":e.string().max(gxy).optional(),"cs-CZ":e.string().max(yxy).optional(),"sk-SK":e.string().max(Oxy).optional(),"nb-NO":e.string().max(vxy).optional(),"is-IS":e.string().max(Sxy).optional(),"hu-HU":e.string().max(hxy).optional()}).optional().describe("Translated user-authored document content keyed by full supported locales such as `de-DE`. Values may be empty strings to intentionally blank content for a locale."),description:e.object({"en-US":e.string().max(bxy).optional(),"de-DE":e.string().max(zxy).optional(),"it-IT":e.string().max(fxy).optional(),"fr-FR":e.string().max(Bxy).optional(),"es-ES":e.string().max(Txy).optional(),"sl-SI":e.string().max(Ixy).optional(),"pt-PT":e.string().max(Exy).optional(),"nl-NL":e.string().max(Dxy).optional(),"pl-PL":e.string().max(Rxy).optional(),"hr-HR":e.string().max(_xy).optional(),"sv-SE":e.string().max(Nxy).optional(),"fi-FI":e.string().max(Mxy).optional(),"et-EE":e.string().max(Uxy).optional(),"bg-BG":e.string().max(Pxy).optional(),"cs-CZ":e.string().max(Cxy).optional(),"sk-SK":e.string().max(wxy).optional(),"nb-NO":e.string().max(Axy).optional(),"is-IS":e.string().max(Fxy).optional(),"hu-HU":e.string().max(kxy).optional()}).optional().describe("Translated user-authored document content keyed by full supported locales such as `de-DE`. Values may be empty strings to intentionally blank content for a locale.")}).describe("Translated user-authored line-item content keyed by full supported locales. Empty string intentionally blanks the field for that locale."),created_at:e.iso.datetime({}),updated_at:e.iso.datetime({}),financial_category_id:e.string().nullish().describe("Reporting financial category assigned to this document line.")})),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(),payments:e.array(e.object({id:e.string().max(jxy),invoice_id:e.string().max(Hxy).nullish(),credit_note_id:e.string().max(Lxy).nullish(),advance_invoice_id:e.string().max(Gxy).nullish(),expense_id:e.string().max(Vxy).nullish(),applied_to_expense_id:e.string().max(Kxy).nullish(),amount:e.number().describe("Payment amount in the linked document currency's major unit; for EUR, `29.90` means \u20AC29.90, not 2,990 cents."),currency_code:e.string().max(Zxy),amount_converted:e.number().min(qxy).max(Wxy),type:e.enum(["cash","bank_transfer","card","credit_card","debit_card","check","paypal","coupon","crypto","other","credit_note","advance"]).describe("Payment method. Use credit_card or debit_card to preserve the card distinction in Portuguese SAF-T (CC/CD). Legacy card remains accepted and exports as CC. crypto is opt-in: it is accepted only on a crypto-currency document, or when the entity enabled settings.crypto_invoicing or settings.crypto_equivalents; otherwise the API answers 422 with cause.code crypto_payment_type_not_enabled."),date:e.iso.datetime({}).describe("Date the payment was received (ISO 8601 datetime at midnight UTC)"),tag:e.string().max(Yxy).nullish(),reference:e.string().max($xy).nullish(),note:e.string().max(Qxy).nullish(),entity_id:e.string().max(Jxy),metadata:e.record(e.string(),e.string()).refine(d=>Object.keys(d).length<=50,"Metadata can have maximum 50 properties").nullish().describe("Custom string key-value data for your own use, with up to 50 properties. Keys are opaque and may contain periods. 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(Xxy),number:e.string().max(egy),voided_at:e.iso.datetime({}).nullish()}).nullish().describe("Related invoice, including cancellation status for payment controls"),CreditNote:e.object({id:e.string().max(tgy),number:e.string().max(ngy),voided_at:e.iso.datetime({}).nullish()}).nullish().describe("Related credit note, including cancellation status for payment controls"),AdvanceInvoice:e.object({id:e.string().max(sgy),number:e.string().max(ogy),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."),voided_at:e.iso.datetime({}).nullish()}).nullish().describe("Related advance invoice with lifecycle state used to determine payment mutability"),Expense:e.object({id:e.string().max(igy),type:e.enum(["invoice","credit_note","advance_invoice"]).describe("Expense document type. V1 accepts `invoice` only; AP credit notes and advance invoices are reserved for a later version."),supplier_document_number:e.string().max(agy).nullish(),date:e.string().regex(rgy).nullish(),total_with_tax:e.number().min(lgy).max(dgy).nullish()}).nullish().describe("Related expense"),AppliedToExpense:e.object({id:e.string().max(ugy),type:e.enum(["invoice","credit_note","advance_invoice"]).describe("Expense document type. V1 accepts `invoice` only; AP credit notes and advance invoices are reserved for a later version."),supplier_document_number:e.string().max(cgy).nullish(),date:e.string().regex(pgy).nullish(),total_with_tax:e.number().min(mgy).max(xgy).nullish()}).nullish().describe("Related expense")}).describe("Payment record for an outgoing document or expense")).optional().describe("Payment records linked to this invoice. Only present when requested via `?include=payments`.")}).describe("Invoice document with fiscalization support"),ggy=new RegExp("^[a-z]{3,4}_[0-9a-f]{24}$"),rxS=e.object({id:e.stringFormat("resource-id",ggy).describe("Unique resource identifier. Prefix depends on the resource, for example inv_, cus_, or ent_.")}),lxS=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.")}),ygy=36,Ogy=100,vgy=255,Sgy=2,hgy=500,bgy=500,zgy=20,fgy=100,Bgy="FR",Tgy=2,Igy=2,Egy="iban",Dgy=new RegExp("^[A-Za-z0-9]{7}$"),Rgy=new RegExp("^(?:[0-9]{11}|[A-Z0-9]{16})$"),_gy=new RegExp("^RF\\d{2}$"),Ngy="iban",Mgy=20,Ugy=128,Pgy=new RegExp("^[A-Za-z0-9:]+$"),Cgy=50,wgy=2,Agy=2,Fgy=new RegExp("^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$"),kgy=30,jgy=100,Hgy=2e3,Lgy=2e3,Ggy=2e3,Vgy=2e3,Kgy=2e3,Zgy=2e3,qgy=2e3,Wgy=2e3,Ygy=2e3,$gy=2e3,Qgy=2e3,Jgy=2e3,Xgy=2e3,e0y=2e3,t0y=2e3,n0y=2e3,s0y=2e3,o0y=2e3,i0y=2e3,a0y=500,r0y=500,l0y=500,d0y=500,u0y=500,c0y=500,p0y=500,m0y=500,x0y=500,g0y=500,y0y=500,O0y=500,v0y=500,S0y=500,h0y=500,b0y=500,z0y=500,f0y=500,B0y=500,T0y=2e3,I0y=2e3,E0y=2e3,D0y=2e3,R0y=2e3,_0y=2e3,N0y=2e3,M0y=2e3,U0y=2e3,P0y=2e3,C0y=2e3,w0y=2e3,A0y=2e3,F0y=2e3,k0y=2e3,j0y=2e3,H0y=2e3,L0y=2e3,G0y=2e3,V0y=500,K0y=500,Z0y=500,q0y=500,W0y=500,Y0y=500,$0y=500,Q0y=500,J0y=500,X0y=500,eyy=500,tyy=500,nyy=500,syy=500,oyy=500,iyy=500,ayy=500,ryy=500,lyy=500,dyy=2e3,uyy=2e3,cyy=2e3,pyy=2e3,myy=2e3,xyy=2e3,gyy=2e3,yyy=2e3,Oyy=2e3,vyy=2e3,Syy=2e3,hyy=2e3,byy=2e3,zyy=2e3,fyy=2e3,Byy=2e3,Tyy=2e3,Iyy=2e3,Eyy=2e3,Dyy=500,Ryy=500,_yy=500,Nyy=500,Myy=500,Uyy=500,Pyy=500,Cyy=500,wyy=500,Ayy=500,Fyy=500,kyy=500,jyy=500,Hyy=500,Lyy=500,Gyy=500,Vyy=500,Kyy=500,Zyy=500,qyy=2e3,Wyy=2e3,Yyy=2e3,$yy=2e3,Qyy=2e3,Jyy=2e3,Xyy=2e3,eOy=2e3,tOy=2e3,nOy=2e3,sOy=2e3,oOy=2e3,iOy=2e3,aOy=2e3,rOy=2e3,lOy=2e3,dOy=2e3,uOy=2e3,cOy=2e3,pOy=2e3,mOy=2e3,xOy=2e3,gOy=2e3,yOy=2e3,OOy=2e3,vOy=2e3,SOy=2e3,hOy=2e3,bOy=2e3,zOy=2e3,fOy=2e3,BOy=2e3,TOy=2e3,IOy=2e3,EOy=2e3,DOy=2e3,ROy=2e3,_Oy=2e3,NOy=500,MOy=500,UOy=500,POy=500,COy=500,wOy=500,AOy=500,FOy=500,kOy=500,jOy=500,HOy=500,LOy=500,GOy=500,VOy=500,KOy=500,ZOy=500,qOy=500,WOy=500,YOy=500,$Oy=1e3,QOy=1e3,JOy=1e3,XOy=1e3,evy=1e3,tvy=1e3,nvy=1e3,svy=1e3,ovy=1e3,ivy=1e3,avy=1e3,rvy=1e3,lvy=1e3,dvy=1e3,uvy=1e3,cvy=1e3,pvy=1e3,mvy=1e3,xvy=1e3,gvy=500,yvy=500,Ovy=500,vvy=500,Svy=500,hvy=500,bvy=500,zvy=500,fvy=500,Bvy=500,Tvy=500,Ivy=500,Evy=500,Dvy=500,Rvy=500,_vy=500,Nvy=500,Mvy=500,Uvy=500,Pvy=2e3,Cvy=2e3,wvy=2e3,Avy=2e3,Fvy=2e3,kvy=2e3,jvy=2e3,Hvy=2e3,Lvy=2e3,Gvy=2e3,Vvy=2e3,Kvy=2e3,Zvy=2e3,qvy=2e3,Wvy=2e3,Yvy=2e3,$vy=2e3,Qvy=2e3,Jvy=2e3,Xvy=500,eSy=500,tSy=500,nSy=500,sSy=500,oSy=500,iSy=500,aSy=500,rSy=500,lSy=500,dSy=500,uSy=500,cSy=500,pSy=500,mSy=500,xSy=500,gSy=500,ySy=500,OSy=500,vSy=2e3,SSy=2e3,hSy=2e3,bSy=2e3,zSy=2e3,fSy=2e3,BSy=2e3,TSy=2e3,ISy=2e3,ESy=2e3,DSy=2e3,RSy=2e3,_Sy=2e3,NSy=2e3,MSy=2e3,USy=2e3,PSy=2e3,CSy=2e3,wSy=2e3,ASy=500,FSy=500,kSy=500,jSy=500,HSy=500,LSy=500,GSy=500,VSy=500,KSy=500,ZSy=500,qSy=500,WSy=500,YSy=500,$Sy=500,QSy=500,JSy=500,XSy=500,ehy=500,thy=500,nhy=2e3,shy=2e3,ohy=2e3,ihy=2e3,ahy=2e3,rhy=2e3,lhy=2e3,dhy=2e3,uhy=2e3,chy=2e3,phy=2e3,mhy=2e3,xhy=2e3,ghy=2e3,yhy=2e3,Ohy=2e3,vhy=2e3,Shy=2e3,hhy=2e3,bhy=500,zhy=500,fhy=500,Bhy=500,Thy=500,Ihy=500,Ehy=500,Dhy=500,Rhy=500,_hy=500,Nhy=500,Mhy=500,Uhy=500,Phy=500,Chy=500,why=500,Ahy=500,Fhy=500,khy=500,jhy=2e3,Hhy=2e3,Lhy=2e3,Ghy=2e3,Vhy=2e3,Khy=2e3,Zhy=2e3,qhy=2e3,Why=2e3,Yhy=2e3,$hy=2e3,Qhy=2e3,Jhy=2e3,Xhy=2e3,eby=2e3,tby=2e3,nby=2e3,sby=2e3,oby=2e3,iby=500,aby=500,rby=500,lby=500,dby=500,uby=500,cby=500,pby=500,mby=500,xby=500,gby=500,yby=500,Oby=500,vby=500,Sby=500,hby=500,bby=500,zby=500,fby=500,Bby=2e3,Tby=2e3,Iby=2e3,Eby=2e3,Dby=2e3,Rby=2e3,_by=2e3,Nby=2e3,Mby=2e3,Uby=2e3,Pby=2e3,Cby=2e3,wby=2e3,Aby=2e3,Fby=2e3,kby=2e3,jby=2e3,Hby=2e3,Lby=2e3,Gby=500,Vby=500,Kby=500,Zby=500,qby=500,Wby=500,Yby=500,$by=500,Qby=500,Jby=500,Xby=500,ezy=500,tzy=500,nzy=500,szy=500,ozy=500,izy=500,azy=500,rzy=500,lzy=2e3,dzy=2e3,uzy=2e3,czy=2e3,pzy=2e3,mzy=2e3,xzy=2e3,gzy=2e3,yzy=2e3,Ozy=2e3,vzy=2e3,Szy=2e3,hzy=2e3,bzy=2e3,zzy=2e3,fzy=2e3,Bzy=2e3,Tzy=2e3,Izy=2e3,Ezy=500,Dzy=500,Rzy=500,_zy=500,Nzy=500,Mzy=500,Uzy=500,Pzy=500,Czy=500,wzy=500,Azy=500,Fzy=500,kzy=500,jzy=500,Hzy=500,Lzy=500,Gzy=500,Vzy=500,Kzy=500,Zzy=2e3,qzy=2e3,Wzy=2e3,Yzy=2e3,$zy=2e3,Qzy=2e3,Jzy=2e3,Xzy=2e3,efy=2e3,tfy=2e3,nfy=2e3,sfy=2e3,ofy=2e3,ify=2e3,afy=2e3,rfy=2e3,lfy=2e3,dfy=2e3,ufy=2e3,cfy=2e3,pfy=2e3,mfy=2e3,xfy=2e3,gfy=2e3,yfy=2e3,Ofy=2e3,vfy=2e3,Sfy=2e3,hfy=2e3,bfy=2e3,zfy=2e3,ffy=2e3,Bfy=2e3,Tfy=2e3,Ify=2e3,Efy=2e3,Dfy=2e3,Rfy=2e3,_fy=2e3,Nfy=2e3,Mfy=2e3,Ufy=2e3,Pfy=2e3,Cfy=2e3,wfy=2e3,Afy=2e3,Ffy=2e3,kfy=2e3,jfy=2e3,Hfy=2e3,Lfy=2e3,Gfy=2e3,Vfy=2e3,Kfy=2e3,Zfy=2e3,qfy=2e3,Wfy=2e3,Yfy=2e3,$fy=2e3,Qfy=2e3,Jfy=2e3,Xfy=2e3,eBy=2e3,tBy=2e3,nBy=2e3,sBy=2e3,oBy=2e3,iBy=2e3,aBy=2e3,rBy=2e3,lBy=2e3,dBy=2e3,uBy=2e3,cBy=2e3,pBy=2e3,mBy=2e3,xBy=2e3,gBy=2e3,yBy=2e3,OBy=2e3,vBy=2e3,SBy=2e3,hBy=2e3,bBy=2e3,zBy=2e3,fBy=2e3,BBy=2e3,TBy=2e3,IBy=2e3,EBy=2e3,DBy=2e3,RBy=2e3,_By=2e3,NBy=2e3,MBy=2e3,UBy=2e3,PBy=2e3,CBy=2e3,wBy=2e3,ABy=2e3,FBy=2e3,kBy=2e3,jBy=2e3,HBy=2e3,LBy=2e3,GBy=2e3,VBy=2e3,KBy=2e3,ZBy=2e3,qBy=2e3,WBy=2e3,YBy=2e3,$By=2e3,QBy=2e3,JBy=2e3,XBy=2e3,eTy=2e3,tTy=2e3,nTy=2e3,sTy=2e3,oTy=2e3,iTy=2e3,aTy=2e3,rTy=2e3,lTy=2e3,dTy=2e3,uTy=2e3,cTy=2e3,pTy=2e3,mTy=2e3,xTy=2e3,gTy=2e3,yTy=2e3,OTy=2e3,vTy=2e3,STy=2e3,hTy=2e3,bTy=2e3,zTy=2e3,fTy=2e3,BTy=2e3,TTy=2e3,ITy=2e3,ETy=2e3,DTy=2e3,RTy=2e3,_Ty=2e3,NTy=2e3,MTy=2e3,UTy=2e3,PTy=2e3,CTy=2e3,wTy=2e3,ATy=2e3,FTy=2e3,kTy=2e3,jTy=2e3,HTy=2e3,LTy=2e3,GTy=2e3,VTy=2e3,KTy=2e3,ZTy=2e3,qTy=2e3,WTy=2e3,YTy=2e3,$Ty=2e3,QTy=2e3,JTy=2e3,XTy=2e3,eIy=2e3,tIy=2e3,nIy=2e3,sIy=2e3,oIy=2e3,iIy=2e3,aIy=2e3,rIy=2e3,lIy=2e3,dIy=2e3,uIy=2e3,cIy=2e3,pIy=2e3,mIy=2e3,xIy=2e3,gIy=2e3,yIy=2e3,OIy=2e3,vIy=2e3,SIy=2e3,hIy=500,bIy="iban",zIy=36,fIy=255,BIy=2,TIy=500,IIy=500,EIy=20,DIy=100,RIy="FR",_Iy=2,NIy=2,MIy="iban",UIy=new RegExp("^[A-Za-z0-9]{7}$"),PIy=new RegExp("^(?:[0-9]{11}|[A-Z0-9]{16})$"),CIy=new RegExp("^RF\\d{2}$"),wIy="iban",AIy=500,FIy=2e3,kIy=2e3,jIy=2e3,HIy=2e3,LIy=2e3,GIy=2e3,VIy=2e3,KIy=2e3,ZIy=2e3,qIy=2e3,WIy=2e3,YIy=2e3,$Iy=2e3,QIy=2e3,JIy=2e3,XIy=2e3,eEy=2e3,tEy=2e3,nEy=2e3,sEy=500,oEy=500,iEy=500,aEy=500,rEy=500,lEy=500,dEy=500,uEy=500,cEy=500,pEy=500,mEy=500,xEy=500,gEy=500,yEy=500,OEy=500,vEy=500,SEy=500,hEy=500,bEy=500,zEy=2e3,fEy=2e3,BEy=2e3,TEy=2e3,IEy=2e3,EEy=2e3,DEy=2e3,REy=2e3,_Ey=2e3,NEy=2e3,MEy=2e3,UEy=2e3,PEy=2e3,CEy=2e3,wEy=2e3,AEy=2e3,FEy=2e3,kEy=2e3,jEy=2e3,HEy=500,LEy=500,GEy=500,VEy=500,KEy=500,ZEy=500,qEy=500,WEy=500,YEy=500,$Ey=500,QEy=500,JEy=500,XEy=500,eDy=500,tDy=500,nDy=500,sDy=500,oDy=500,iDy=500,aDy=1e3,rDy=1e3,lDy=1e3,dDy=1e3,uDy=1e3,cDy=1e3,pDy=1e3,mDy=1e3,xDy=1e3,gDy=1e3,yDy=1e3,ODy=1e3,vDy=1e3,SDy=1e3,hDy=1e3,bDy=1e3,zDy=1e3,fDy=1e3,BDy=1e3,TDy=10,IDy=36,EDy=-2147483648,DDy=2147483647,RDy=100,_Dy=0,NDy=3,MDy=3,UDy=0,PDy=-140737488355328,CDy=0x7fffffffffff,wDy=-140737488355328,ADy=0x7fffffffffff,FDy=-140737488355328,kDy=0x7fffffffffff,jDy=-140737488355328,HDy=0x7fffffffffff,LDy=500,GDy=0,VDy=new RegExp("^\\d{2}$"),KDy=12,ZDy=0,qDy=0,WDy=0,YDy=new RegExp("^\\d{1,7}$"),$Dy=10,QDy=250,JDy=0,XDy=100,eRy=1e-4,tRy=0,nRy=3650,sRy=0,oRy=4,iRy=0,aRy=0,rRy=new RegExp("^\\d{4}-\\d{2}-\\d{2}(T\\d{2}:\\d{2}:\\d{2}(\\.\\d{3})?Z?)?$"),lRy=new RegExp("^\\d{4}-\\d{2}-\\d{2}(T\\d{2}:\\d{2}:\\d{2}(\\.\\d{3})?Z?)?$"),dRy=36,uRy=500,cRy=8,pRy=new RegExp("^VATEX-[A-Z0-9-]{2,24}$"),mRy=500,xRy=100,gRy=200,yRy=200,ORy=0,vRy=100,SRy=2,hRy=2,bRy=0,zRy="percent",fRy=5,BRy=-140737488355328,TRy=0x7fffffffffff,IRy=-140737488355328,ERy=0x7fffffffffff,DRy=36,RRy=36,_Ry=36,NRy=36,MRy=36,URy=500,PRy=500,CRy=500,wRy=500,ARy=500,FRy=500,kRy=500,jRy=500,HRy=500,LRy=500,GRy=500,VRy=500,KRy=500,ZRy=500,qRy=500,WRy=500,YRy=500,$Ry=500,QRy=500,JRy=2e3,XRy=2e3,e_y=2e3,t_y=2e3,n_y=2e3,s_y=2e3,o_y=2e3,i_y=2e3,a_y=2e3,r_y=2e3,l_y=2e3,d_y=2e3,u_y=2e3,c_y=2e3,p_y=2e3,m_y=2e3,x_y=2e3,g_y=2e3,y_y=2e3,O_y=36,v_y=36,S_y=36,h_y=36,b_y=36,z_y=36,f_y=10,B_y=-140737488355328,T_y=0x7fffffffffff,I_y=100,E_y=100,D_y=500,R_y=36,__y=36,N_y=100,M_y=36,U_y=100,P_y=36,C_y=100,w_y=36,A_y=255,F_y=new RegExp("^\\d{4}-\\d{2}-\\d{2}$"),k_y=-140737488355328,j_y=0x7fffffffffff,H_y=36,L_y=255,G_y=new RegExp("^\\d{4}-\\d{2}-\\d{2}$"),V_y=-140737488355328,K_y=0x7fffffffffff,dxS=e.object({id:e.string().max(ygy),number:e.string().max(Ogy),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(),unit_name:e.string().nullish().describe("Deprecated compatibility field. This value is no longer used for business-unit rendering; use `business_unit.name` on the document instead."),email:e.string().max(vgy).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().max(Sgy).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(),peppol_scheme_id:e.string().nullish(),e_invoicing:e.union([e.object({buyer_reference:e.string().nullish().describe("Canonical EN 16931 BT-10 buyer reference stored on the document customer snapshot. For German public-sector recipients, enter the Leitweg-ID here. For German B2B recipients this is optional unless the buyer requires it. Do not send a separate leitweg_id, routing_id, or top-level buyer_reference field.")}).describe("Customer e-invoicing data copied into the document customer snapshot. These fields are buyer/customer document data, not German validation state."),e.null()]).optional(),delivery_address:e.union([e.object({address:e.string().min(1).max(hgy),address_2:e.string().max(bgy).nullish(),post_code:e.string().min(1).max(zgy),city:e.string().min(1).max(fgy),country_code:e.string().min(Tgy).max(Igy).nullish().default(Bgy)}).describe("Physical delivery address when it differs from the buyer's billing address. Required by French law when applicable."),e.null()]).optional().describe("Physical delivery address for this document when it differs from the customer's billing address. It is stored only on the document snapshot and is not saved to the customer record."),bank_accounts:e.array(e.object({type:e.enum(["iban","us_domestic","uk_domestic","other"]).default(Egy).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(),is_end_consumer:e.boolean().nullish(),is_tax_subject:e.boolean().nullish().describe("Whether the customer is VAT identified. Stored in the document snapshot and used by country-specific tax reports; a country code alone does not imply VAT identification."),ujp:e.union([e.object({receiver_name:e.string().min(1).nullish().describe("UJP envelope recipient name. If omitted, package generation falls back to the document customer name."),receiver_identifier:e.string().min(1).nullish().describe("Optional recipient tax number or identifier override for the UJP envelope. If omitted, package generation falls back to the document customer tax number."),receiver_agent:e.string().min(1).nullish().describe("Recipient BIC for the UJP envelope. Public budget users normally use UJPLSI2DICL."),receiver_mailbox:e.string().min(1).nullish().describe("Recipient IBAN/TRR mailbox for the UJP envelope.")}).describe("Optional Slovenian UJP recipient routing data stored on customers and copied into document customer snapshots."),e.null()]).optional(),sdi:e.union([e.object({recipient_code:e.string().regex(Dgy).nullish().describe("Italian SdI recipient code for buyer routing. When neither a code nor PEC is supplied, domestic invoices use 0000000 and the seller must provide the buyer a courtesy copy and availability notice."),pec:e.email().nullish().describe("Italian certified email address for buyer routing. When provided without an SdI recipient code, FatturaPA uses `CodiceDestinatario = 0000000` plus `PECDestinatario`."),fiscal_code:e.string().regex(Rgy).nullish().describe("Buyer's Italian codice fiscale, independent of their VAT number. For a domestic consumer, legacy tax_number remains a fallback fiscal-code input. Required for VAT-group participants where applicable."),fiscal_regime:e.string().regex(_gy).nullish().describe("Issuer-only fiscal regime snapshot, captured from settings.tax_rules.italy at issuance. Ignored for buyer routing.")}),e.null()]).optional(),bank_account:e.object({type:e.enum(["iban","us_domestic","uk_domestic","other"]).default(Ngy).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(),crypto_wallet:e.union([e.object({code:e.enum(["BTC","ETH","SOL","USDC","USDT"]).describe("Crypto asset code this wallet receives."),address:e.string().min(Mgy).max(Ugy).regex(Pgy).describe("Wallet address for this asset."),network:e.string().max(Cgy).nullish().describe("Free-text network label printed alongside the wallet address, e.g. 'Ethereum', 'Solana', 'Tron'.")}),e.null()]).optional()}).describe("Document issuer (entity) information"),business_unit_id:e.string().nullish().describe("Selected business-unit ID used to derive document presentation and defaults."),business_unit:e.union([e.object({id:e.string(),name:e.string(),deleted_at:e.iso.datetime({}).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(wgy).max(Agy).nullish(),email:e.email().nullish(),phone:e.string().nullish(),website:e.url().nullish(),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."),primary_color:e.string().regex(Fgy).nullish(),logo_scale_percent:e.number().min(kgy).max(jgy).nullish().describe("Scale the PDF logo size as a percentage of the template default size. 100 keeps the original size."),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}"),purchase_order_subject:e.string().nullish().describe("Default subject line for purchase order 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}"),purchase_order_body:e.string().nullish().describe("Default body text for purchase order 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(),translations:e.union([e.object({default_invoice_note:e.object({"en-US":e.string().max(Hgy).optional(),"de-DE":e.string().max(Lgy).optional(),"it-IT":e.string().max(Ggy).optional(),"fr-FR":e.string().max(Vgy).optional(),"es-ES":e.string().max(Kgy).optional(),"sl-SI":e.string().max(Zgy).optional(),"pt-PT":e.string().max(qgy).optional(),"nl-NL":e.string().max(Wgy).optional(),"pl-PL":e.string().max(Ygy).optional(),"hr-HR":e.string().max($gy).optional(),"sv-SE":e.string().max(Qgy).optional(),"fi-FI":e.string().max(Jgy).optional(),"et-EE":e.string().max(Xgy).optional(),"bg-BG":e.string().max(e0y).optional(),"cs-CZ":e.string().max(t0y).optional(),"sk-SK":e.string().max(n0y).optional(),"nb-NO":e.string().max(s0y).optional(),"is-IS":e.string().max(o0y).optional(),"hu-HU":e.string().max(i0y).optional()}).optional().describe("Translated user-authored document content keyed by full supported locales such as `de-DE`. Values may be empty strings to intentionally blank content for a locale."),default_invoice_payment_terms:e.object({"en-US":e.string().max(a0y).optional(),"de-DE":e.string().max(r0y).optional(),"it-IT":e.string().max(l0y).optional(),"fr-FR":e.string().max(d0y).optional(),"es-ES":e.string().max(u0y).optional(),"sl-SI":e.string().max(c0y).optional(),"pt-PT":e.string().max(p0y).optional(),"nl-NL":e.string().max(m0y).optional(),"pl-PL":e.string().max(x0y).optional(),"hr-HR":e.string().max(g0y).optional(),"sv-SE":e.string().max(y0y).optional(),"fi-FI":e.string().max(O0y).optional(),"et-EE":e.string().max(v0y).optional(),"bg-BG":e.string().max(S0y).optional(),"cs-CZ":e.string().max(h0y).optional(),"sk-SK":e.string().max(b0y).optional(),"nb-NO":e.string().max(z0y).optional(),"is-IS":e.string().max(f0y).optional(),"hu-HU":e.string().max(B0y).optional()}).optional().describe("Translated user-authored document content keyed by full supported locales such as `de-DE`. Values may be empty strings to intentionally blank content for a locale."),default_estimate_note:e.object({"en-US":e.string().max(T0y).optional(),"de-DE":e.string().max(I0y).optional(),"it-IT":e.string().max(E0y).optional(),"fr-FR":e.string().max(D0y).optional(),"es-ES":e.string().max(R0y).optional(),"sl-SI":e.string().max(_0y).optional(),"pt-PT":e.string().max(N0y).optional(),"nl-NL":e.string().max(M0y).optional(),"pl-PL":e.string().max(U0y).optional(),"hr-HR":e.string().max(P0y).optional(),"sv-SE":e.string().max(C0y).optional(),"fi-FI":e.string().max(w0y).optional(),"et-EE":e.string().max(A0y).optional(),"bg-BG":e.string().max(F0y).optional(),"cs-CZ":e.string().max(k0y).optional(),"sk-SK":e.string().max(j0y).optional(),"nb-NO":e.string().max(H0y).optional(),"is-IS":e.string().max(L0y).optional(),"hu-HU":e.string().max(G0y).optional()}).optional().describe("Translated user-authored document content keyed by full supported locales such as `de-DE`. Values may be empty strings to intentionally blank content for a locale."),default_estimate_payment_terms:e.object({"en-US":e.string().max(V0y).optional(),"de-DE":e.string().max(K0y).optional(),"it-IT":e.string().max(Z0y).optional(),"fr-FR":e.string().max(q0y).optional(),"es-ES":e.string().max(W0y).optional(),"sl-SI":e.string().max(Y0y).optional(),"pt-PT":e.string().max($0y).optional(),"nl-NL":e.string().max(Q0y).optional(),"pl-PL":e.string().max(J0y).optional(),"hr-HR":e.string().max(X0y).optional(),"sv-SE":e.string().max(eyy).optional(),"fi-FI":e.string().max(tyy).optional(),"et-EE":e.string().max(nyy).optional(),"bg-BG":e.string().max(syy).optional(),"cs-CZ":e.string().max(oyy).optional(),"sk-SK":e.string().max(iyy).optional(),"nb-NO":e.string().max(ayy).optional(),"is-IS":e.string().max(ryy).optional(),"hu-HU":e.string().max(lyy).optional()}).optional().describe("Translated user-authored document content keyed by full supported locales such as `de-DE`. Values may be empty strings to intentionally blank content for a locale."),default_credit_note_note:e.object({"en-US":e.string().max(dyy).optional(),"de-DE":e.string().max(uyy).optional(),"it-IT":e.string().max(cyy).optional(),"fr-FR":e.string().max(pyy).optional(),"es-ES":e.string().max(myy).optional(),"sl-SI":e.string().max(xyy).optional(),"pt-PT":e.string().max(gyy).optional(),"nl-NL":e.string().max(yyy).optional(),"pl-PL":e.string().max(Oyy).optional(),"hr-HR":e.string().max(vyy).optional(),"sv-SE":e.string().max(Syy).optional(),"fi-FI":e.string().max(hyy).optional(),"et-EE":e.string().max(byy).optional(),"bg-BG":e.string().max(zyy).optional(),"cs-CZ":e.string().max(fyy).optional(),"sk-SK":e.string().max(Byy).optional(),"nb-NO":e.string().max(Tyy).optional(),"is-IS":e.string().max(Iyy).optional(),"hu-HU":e.string().max(Eyy).optional()}).optional().describe("Translated user-authored document content keyed by full supported locales such as `de-DE`. Values may be empty strings to intentionally blank content for a locale."),default_credit_note_payment_terms:e.object({"en-US":e.string().max(Dyy).optional(),"de-DE":e.string().max(Ryy).optional(),"it-IT":e.string().max(_yy).optional(),"fr-FR":e.string().max(Nyy).optional(),"es-ES":e.string().max(Myy).optional(),"sl-SI":e.string().max(Uyy).optional(),"pt-PT":e.string().max(Pyy).optional(),"nl-NL":e.string().max(Cyy).optional(),"pl-PL":e.string().max(wyy).optional(),"hr-HR":e.string().max(Ayy).optional(),"sv-SE":e.string().max(Fyy).optional(),"fi-FI":e.string().max(kyy).optional(),"et-EE":e.string().max(jyy).optional(),"bg-BG":e.string().max(Hyy).optional(),"cs-CZ":e.string().max(Lyy).optional(),"sk-SK":e.string().max(Gyy).optional(),"nb-NO":e.string().max(Vyy).optional(),"is-IS":e.string().max(Kyy).optional(),"hu-HU":e.string().max(Zyy).optional()}).optional().describe("Translated user-authored document content keyed by full supported locales such as `de-DE`. Values may be empty strings to intentionally blank content for a locale."),default_advance_invoice_note:e.object({"en-US":e.string().max(qyy).optional(),"de-DE":e.string().max(Wyy).optional(),"it-IT":e.string().max(Yyy).optional(),"fr-FR":e.string().max($yy).optional(),"es-ES":e.string().max(Qyy).optional(),"sl-SI":e.string().max(Jyy).optional(),"pt-PT":e.string().max(Xyy).optional(),"nl-NL":e.string().max(eOy).optional(),"pl-PL":e.string().max(tOy).optional(),"hr-HR":e.string().max(nOy).optional(),"sv-SE":e.string().max(sOy).optional(),"fi-FI":e.string().max(oOy).optional(),"et-EE":e.string().max(iOy).optional(),"bg-BG":e.string().max(aOy).optional(),"cs-CZ":e.string().max(rOy).optional(),"sk-SK":e.string().max(lOy).optional(),"nb-NO":e.string().max(dOy).optional(),"is-IS":e.string().max(uOy).optional(),"hu-HU":e.string().max(cOy).optional()}).optional().describe("Translated user-authored document content keyed by full supported locales such as `de-DE`. Values may be empty strings to intentionally blank content for a locale."),default_delivery_note_note:e.object({"en-US":e.string().max(pOy).optional(),"de-DE":e.string().max(mOy).optional(),"it-IT":e.string().max(xOy).optional(),"fr-FR":e.string().max(gOy).optional(),"es-ES":e.string().max(yOy).optional(),"sl-SI":e.string().max(OOy).optional(),"pt-PT":e.string().max(vOy).optional(),"nl-NL":e.string().max(SOy).optional(),"pl-PL":e.string().max(hOy).optional(),"hr-HR":e.string().max(bOy).optional(),"sv-SE":e.string().max(zOy).optional(),"fi-FI":e.string().max(fOy).optional(),"et-EE":e.string().max(BOy).optional(),"bg-BG":e.string().max(TOy).optional(),"cs-CZ":e.string().max(IOy).optional(),"sk-SK":e.string().max(EOy).optional(),"nb-NO":e.string().max(DOy).optional(),"is-IS":e.string().max(ROy).optional(),"hu-HU":e.string().max(_Oy).optional()}).optional().describe("Translated user-authored document content keyed by full supported locales such as `de-DE`. Values may be empty strings to intentionally blank content for a locale."),document_footer:e.object({"en-US":e.string().max(NOy).optional(),"de-DE":e.string().max(MOy).optional(),"it-IT":e.string().max(UOy).optional(),"fr-FR":e.string().max(POy).optional(),"es-ES":e.string().max(COy).optional(),"sl-SI":e.string().max(wOy).optional(),"pt-PT":e.string().max(AOy).optional(),"nl-NL":e.string().max(FOy).optional(),"pl-PL":e.string().max(kOy).optional(),"hr-HR":e.string().max(jOy).optional(),"sv-SE":e.string().max(HOy).optional(),"fi-FI":e.string().max(LOy).optional(),"et-EE":e.string().max(GOy).optional(),"bg-BG":e.string().max(VOy).optional(),"cs-CZ":e.string().max(KOy).optional(),"sk-SK":e.string().max(ZOy).optional(),"nb-NO":e.string().max(qOy).optional(),"is-IS":e.string().max(WOy).optional(),"hu-HU":e.string().max(YOy).optional()}).optional().describe("Translated user-authored document content keyed by full supported locales such as `de-DE`. Values may be empty strings to intentionally blank content for a locale."),default_document_signature:e.object({"en-US":e.string().max($Oy).optional(),"de-DE":e.string().max(QOy).optional(),"it-IT":e.string().max(JOy).optional(),"fr-FR":e.string().max(XOy).optional(),"es-ES":e.string().max(evy).optional(),"sl-SI":e.string().max(tvy).optional(),"pt-PT":e.string().max(nvy).optional(),"nl-NL":e.string().max(svy).optional(),"pl-PL":e.string().max(ovy).optional(),"hr-HR":e.string().max(ivy).optional(),"sv-SE":e.string().max(avy).optional(),"fi-FI":e.string().max(rvy).optional(),"et-EE":e.string().max(lvy).optional(),"bg-BG":e.string().max(dvy).optional(),"cs-CZ":e.string().max(uvy).optional(),"sk-SK":e.string().max(cvy).optional(),"nb-NO":e.string().max(pvy).optional(),"is-IS":e.string().max(mvy).optional(),"hu-HU":e.string().max(xvy).optional()}).optional().describe("Translated user-authored document content keyed by full supported locales such as `de-DE`. Values may be empty strings to intentionally blank content for a locale."),email_defaults:e.object({invoice_subject:e.object({"en-US":e.string().max(gvy).optional(),"de-DE":e.string().max(yvy).optional(),"it-IT":e.string().max(Ovy).optional(),"fr-FR":e.string().max(vvy).optional(),"es-ES":e.string().max(Svy).optional(),"sl-SI":e.string().max(hvy).optional(),"pt-PT":e.string().max(bvy).optional(),"nl-NL":e.string().max(zvy).optional(),"pl-PL":e.string().max(fvy).optional(),"hr-HR":e.string().max(Bvy).optional(),"sv-SE":e.string().max(Tvy).optional(),"fi-FI":e.string().max(Ivy).optional(),"et-EE":e.string().max(Evy).optional(),"bg-BG":e.string().max(Dvy).optional(),"cs-CZ":e.string().max(Rvy).optional(),"sk-SK":e.string().max(_vy).optional(),"nb-NO":e.string().max(Nvy).optional(),"is-IS":e.string().max(Mvy).optional(),"hu-HU":e.string().max(Uvy).optional()}).optional().describe("Translated user-authored document content keyed by full supported locales such as `de-DE`. Values may be empty strings to intentionally blank content for a locale."),invoice_body:e.object({"en-US":e.string().max(Pvy).optional(),"de-DE":e.string().max(Cvy).optional(),"it-IT":e.string().max(wvy).optional(),"fr-FR":e.string().max(Avy).optional(),"es-ES":e.string().max(Fvy).optional(),"sl-SI":e.string().max(kvy).optional(),"pt-PT":e.string().max(jvy).optional(),"nl-NL":e.string().max(Hvy).optional(),"pl-PL":e.string().max(Lvy).optional(),"hr-HR":e.string().max(Gvy).optional(),"sv-SE":e.string().max(Vvy).optional(),"fi-FI":e.string().max(Kvy).optional(),"et-EE":e.string().max(Zvy).optional(),"bg-BG":e.string().max(qvy).optional(),"cs-CZ":e.string().max(Wvy).optional(),"sk-SK":e.string().max(Yvy).optional(),"nb-NO":e.string().max($vy).optional(),"is-IS":e.string().max(Qvy).optional(),"hu-HU":e.string().max(Jvy).optional()}).optional().describe("Translated user-authored document content keyed by full supported locales such as `de-DE`. Values may be empty strings to intentionally blank content for a locale."),estimate_subject:e.object({"en-US":e.string().max(Xvy).optional(),"de-DE":e.string().max(eSy).optional(),"it-IT":e.string().max(tSy).optional(),"fr-FR":e.string().max(nSy).optional(),"es-ES":e.string().max(sSy).optional(),"sl-SI":e.string().max(oSy).optional(),"pt-PT":e.string().max(iSy).optional(),"nl-NL":e.string().max(aSy).optional(),"pl-PL":e.string().max(rSy).optional(),"hr-HR":e.string().max(lSy).optional(),"sv-SE":e.string().max(dSy).optional(),"fi-FI":e.string().max(uSy).optional(),"et-EE":e.string().max(cSy).optional(),"bg-BG":e.string().max(pSy).optional(),"cs-CZ":e.string().max(mSy).optional(),"sk-SK":e.string().max(xSy).optional(),"nb-NO":e.string().max(gSy).optional(),"is-IS":e.string().max(ySy).optional(),"hu-HU":e.string().max(OSy).optional()}).optional().describe("Translated user-authored document content keyed by full supported locales such as `de-DE`. Values may be empty strings to intentionally blank content for a locale."),estimate_body:e.object({"en-US":e.string().max(vSy).optional(),"de-DE":e.string().max(SSy).optional(),"it-IT":e.string().max(hSy).optional(),"fr-FR":e.string().max(bSy).optional(),"es-ES":e.string().max(zSy).optional(),"sl-SI":e.string().max(fSy).optional(),"pt-PT":e.string().max(BSy).optional(),"nl-NL":e.string().max(TSy).optional(),"pl-PL":e.string().max(ISy).optional(),"hr-HR":e.string().max(ESy).optional(),"sv-SE":e.string().max(DSy).optional(),"fi-FI":e.string().max(RSy).optional(),"et-EE":e.string().max(_Sy).optional(),"bg-BG":e.string().max(NSy).optional(),"cs-CZ":e.string().max(MSy).optional(),"sk-SK":e.string().max(USy).optional(),"nb-NO":e.string().max(PSy).optional(),"is-IS":e.string().max(CSy).optional(),"hu-HU":e.string().max(wSy).optional()}).optional().describe("Translated user-authored document content keyed by full supported locales such as `de-DE`. Values may be empty strings to intentionally blank content for a locale."),credit_note_subject:e.object({"en-US":e.string().max(ASy).optional(),"de-DE":e.string().max(FSy).optional(),"it-IT":e.string().max(kSy).optional(),"fr-FR":e.string().max(jSy).optional(),"es-ES":e.string().max(HSy).optional(),"sl-SI":e.string().max(LSy).optional(),"pt-PT":e.string().max(GSy).optional(),"nl-NL":e.string().max(VSy).optional(),"pl-PL":e.string().max(KSy).optional(),"hr-HR":e.string().max(ZSy).optional(),"sv-SE":e.string().max(qSy).optional(),"fi-FI":e.string().max(WSy).optional(),"et-EE":e.string().max(YSy).optional(),"bg-BG":e.string().max($Sy).optional(),"cs-CZ":e.string().max(QSy).optional(),"sk-SK":e.string().max(JSy).optional(),"nb-NO":e.string().max(XSy).optional(),"is-IS":e.string().max(ehy).optional(),"hu-HU":e.string().max(thy).optional()}).optional().describe("Translated user-authored document content keyed by full supported locales such as `de-DE`. Values may be empty strings to intentionally blank content for a locale."),credit_note_body:e.object({"en-US":e.string().max(nhy).optional(),"de-DE":e.string().max(shy).optional(),"it-IT":e.string().max(ohy).optional(),"fr-FR":e.string().max(ihy).optional(),"es-ES":e.string().max(ahy).optional(),"sl-SI":e.string().max(rhy).optional(),"pt-PT":e.string().max(lhy).optional(),"nl-NL":e.string().max(dhy).optional(),"pl-PL":e.string().max(uhy).optional(),"hr-HR":e.string().max(chy).optional(),"sv-SE":e.string().max(phy).optional(),"fi-FI":e.string().max(mhy).optional(),"et-EE":e.string().max(xhy).optional(),"bg-BG":e.string().max(ghy).optional(),"cs-CZ":e.string().max(yhy).optional(),"sk-SK":e.string().max(Ohy).optional(),"nb-NO":e.string().max(vhy).optional(),"is-IS":e.string().max(Shy).optional(),"hu-HU":e.string().max(hhy).optional()}).optional().describe("Translated user-authored document content keyed by full supported locales such as `de-DE`. Values may be empty strings to intentionally blank content for a locale."),advance_invoice_subject:e.object({"en-US":e.string().max(bhy).optional(),"de-DE":e.string().max(zhy).optional(),"it-IT":e.string().max(fhy).optional(),"fr-FR":e.string().max(Bhy).optional(),"es-ES":e.string().max(Thy).optional(),"sl-SI":e.string().max(Ihy).optional(),"pt-PT":e.string().max(Ehy).optional(),"nl-NL":e.string().max(Dhy).optional(),"pl-PL":e.string().max(Rhy).optional(),"hr-HR":e.string().max(_hy).optional(),"sv-SE":e.string().max(Nhy).optional(),"fi-FI":e.string().max(Mhy).optional(),"et-EE":e.string().max(Uhy).optional(),"bg-BG":e.string().max(Phy).optional(),"cs-CZ":e.string().max(Chy).optional(),"sk-SK":e.string().max(why).optional(),"nb-NO":e.string().max(Ahy).optional(),"is-IS":e.string().max(Fhy).optional(),"hu-HU":e.string().max(khy).optional()}).optional().describe("Translated user-authored document content keyed by full supported locales such as `de-DE`. Values may be empty strings to intentionally blank content for a locale."),advance_invoice_body:e.object({"en-US":e.string().max(jhy).optional(),"de-DE":e.string().max(Hhy).optional(),"it-IT":e.string().max(Lhy).optional(),"fr-FR":e.string().max(Ghy).optional(),"es-ES":e.string().max(Vhy).optional(),"sl-SI":e.string().max(Khy).optional(),"pt-PT":e.string().max(Zhy).optional(),"nl-NL":e.string().max(qhy).optional(),"pl-PL":e.string().max(Why).optional(),"hr-HR":e.string().max(Yhy).optional(),"sv-SE":e.string().max($hy).optional(),"fi-FI":e.string().max(Qhy).optional(),"et-EE":e.string().max(Jhy).optional(),"bg-BG":e.string().max(Xhy).optional(),"cs-CZ":e.string().max(eby).optional(),"sk-SK":e.string().max(tby).optional(),"nb-NO":e.string().max(nby).optional(),"is-IS":e.string().max(sby).optional(),"hu-HU":e.string().max(oby).optional()}).optional().describe("Translated user-authored document content keyed by full supported locales such as `de-DE`. Values may be empty strings to intentionally blank content for a locale."),delivery_note_subject:e.object({"en-US":e.string().max(iby).optional(),"de-DE":e.string().max(aby).optional(),"it-IT":e.string().max(rby).optional(),"fr-FR":e.string().max(lby).optional(),"es-ES":e.string().max(dby).optional(),"sl-SI":e.string().max(uby).optional(),"pt-PT":e.string().max(cby).optional(),"nl-NL":e.string().max(pby).optional(),"pl-PL":e.string().max(mby).optional(),"hr-HR":e.string().max(xby).optional(),"sv-SE":e.string().max(gby).optional(),"fi-FI":e.string().max(yby).optional(),"et-EE":e.string().max(Oby).optional(),"bg-BG":e.string().max(vby).optional(),"cs-CZ":e.string().max(Sby).optional(),"sk-SK":e.string().max(hby).optional(),"nb-NO":e.string().max(bby).optional(),"is-IS":e.string().max(zby).optional(),"hu-HU":e.string().max(fby).optional()}).optional().describe("Translated user-authored document content keyed by full supported locales such as `de-DE`. Values may be empty strings to intentionally blank content for a locale."),delivery_note_body:e.object({"en-US":e.string().max(Bby).optional(),"de-DE":e.string().max(Tby).optional(),"it-IT":e.string().max(Iby).optional(),"fr-FR":e.string().max(Eby).optional(),"es-ES":e.string().max(Dby).optional(),"sl-SI":e.string().max(Rby).optional(),"pt-PT":e.string().max(_by).optional(),"nl-NL":e.string().max(Nby).optional(),"pl-PL":e.string().max(Mby).optional(),"hr-HR":e.string().max(Uby).optional(),"sv-SE":e.string().max(Pby).optional(),"fi-FI":e.string().max(Cby).optional(),"et-EE":e.string().max(wby).optional(),"bg-BG":e.string().max(Aby).optional(),"cs-CZ":e.string().max(Fby).optional(),"sk-SK":e.string().max(kby).optional(),"nb-NO":e.string().max(jby).optional(),"is-IS":e.string().max(Hby).optional(),"hu-HU":e.string().max(Lby).optional()}).optional().describe("Translated user-authored document content keyed by full supported locales such as `de-DE`. Values may be empty strings to intentionally blank content for a locale."),purchase_order_subject:e.object({"en-US":e.string().max(Gby).nullish(),"de-DE":e.string().max(Vby).nullish(),"it-IT":e.string().max(Kby).nullish(),"fr-FR":e.string().max(Zby).nullish(),"es-ES":e.string().max(qby).nullish(),"sl-SI":e.string().max(Wby).nullish(),"pt-PT":e.string().max(Yby).nullish(),"nl-NL":e.string().max($by).nullish(),"pl-PL":e.string().max(Qby).nullish(),"hr-HR":e.string().max(Jby).nullish(),"sv-SE":e.string().max(Xby).nullish(),"fi-FI":e.string().max(ezy).nullish(),"et-EE":e.string().max(tzy).nullish(),"bg-BG":e.string().max(nzy).nullish(),"cs-CZ":e.string().max(szy).nullish(),"sk-SK":e.string().max(ozy).nullish(),"nb-NO":e.string().max(izy).nullish(),"is-IS":e.string().max(azy).nullish(),"hu-HU":e.string().max(rzy).nullish()}).nullish().describe("Translated user-authored document content keyed by full supported locales such as `de-DE`. Values may be empty strings to intentionally blank content for a locale."),purchase_order_body:e.object({"en-US":e.string().max(lzy).nullish(),"de-DE":e.string().max(dzy).nullish(),"it-IT":e.string().max(uzy).nullish(),"fr-FR":e.string().max(czy).nullish(),"es-ES":e.string().max(pzy).nullish(),"sl-SI":e.string().max(mzy).nullish(),"pt-PT":e.string().max(xzy).nullish(),"nl-NL":e.string().max(gzy).nullish(),"pl-PL":e.string().max(yzy).nullish(),"hr-HR":e.string().max(Ozy).nullish(),"sv-SE":e.string().max(vzy).nullish(),"fi-FI":e.string().max(Szy).nullish(),"et-EE":e.string().max(hzy).nullish(),"bg-BG":e.string().max(bzy).nullish(),"cs-CZ":e.string().max(zzy).nullish(),"sk-SK":e.string().max(fzy).nullish(),"nb-NO":e.string().max(Bzy).nullish(),"is-IS":e.string().max(Tzy).nullish(),"hu-HU":e.string().max(Izy).nullish()}).nullish().describe("Translated user-authored document content keyed by full supported locales such as `de-DE`. Values may be empty strings to intentionally blank content for a locale.")}).optional().describe("Translated default email subjects and bodies keyed by full supported locales. Base scalar email defaults remain the default-language source of truth."),payment_reminders:e.object({email_subject:e.object({"en-US":e.string().max(Ezy).optional(),"de-DE":e.string().max(Dzy).optional(),"it-IT":e.string().max(Rzy).optional(),"fr-FR":e.string().max(_zy).optional(),"es-ES":e.string().max(Nzy).optional(),"sl-SI":e.string().max(Mzy).optional(),"pt-PT":e.string().max(Uzy).optional(),"nl-NL":e.string().max(Pzy).optional(),"pl-PL":e.string().max(Czy).optional(),"hr-HR":e.string().max(wzy).optional(),"sv-SE":e.string().max(Azy).optional(),"fi-FI":e.string().max(Fzy).optional(),"et-EE":e.string().max(kzy).optional(),"bg-BG":e.string().max(jzy).optional(),"cs-CZ":e.string().max(Hzy).optional(),"sk-SK":e.string().max(Lzy).optional(),"nb-NO":e.string().max(Gzy).optional(),"is-IS":e.string().max(Vzy).optional(),"hu-HU":e.string().max(Kzy).optional()}).optional().describe("Translated user-authored document content keyed by full supported locales such as `de-DE`. Values may be empty strings to intentionally blank content for a locale."),email_body:e.object({"en-US":e.string().max(Zzy).optional(),"de-DE":e.string().max(qzy).optional(),"it-IT":e.string().max(Wzy).optional(),"fr-FR":e.string().max(Yzy).optional(),"es-ES":e.string().max($zy).optional(),"sl-SI":e.string().max(Qzy).optional(),"pt-PT":e.string().max(Jzy).optional(),"nl-NL":e.string().max(Xzy).optional(),"pl-PL":e.string().max(efy).optional(),"hr-HR":e.string().max(tfy).optional(),"sv-SE":e.string().max(nfy).optional(),"fi-FI":e.string().max(sfy).optional(),"et-EE":e.string().max(ofy).optional(),"bg-BG":e.string().max(ify).optional(),"cs-CZ":e.string().max(afy).optional(),"sk-SK":e.string().max(rfy).optional(),"nb-NO":e.string().max(lfy).optional(),"is-IS":e.string().max(dfy).optional(),"hu-HU":e.string().max(ufy).optional()}).optional().describe("Translated user-authored document content keyed by full supported locales such as `de-DE`. Values may be empty strings to intentionally blank content for a locale."),payment_instructions:e.object({"en-US":e.string().max(cfy).optional(),"de-DE":e.string().max(pfy).optional(),"it-IT":e.string().max(mfy).optional(),"fr-FR":e.string().max(xfy).optional(),"es-ES":e.string().max(gfy).optional(),"sl-SI":e.string().max(yfy).optional(),"pt-PT":e.string().max(Ofy).optional(),"nl-NL":e.string().max(vfy).optional(),"pl-PL":e.string().max(Sfy).optional(),"hr-HR":e.string().max(hfy).optional(),"sv-SE":e.string().max(bfy).optional(),"fi-FI":e.string().max(zfy).optional(),"et-EE":e.string().max(ffy).optional(),"bg-BG":e.string().max(Bfy).optional(),"cs-CZ":e.string().max(Tfy).optional(),"sk-SK":e.string().max(Ify).optional(),"nb-NO":e.string().max(Efy).optional(),"is-IS":e.string().max(Dfy).optional(),"hu-HU":e.string().max(Rfy).optional()}).optional().describe("Translated user-authored document content keyed by full supported locales such as `de-DE`. Values may be empty strings to intentionally blank content for a locale.")}).optional().describe("Translated default payment reminder subject, body, and payment instructions keyed by full supported locales."),tax_clause_defaults:e.object({domestic:e.object({"en-US":e.string().max(_fy).optional(),"de-DE":e.string().max(Nfy).optional(),"it-IT":e.string().max(Mfy).optional(),"fr-FR":e.string().max(Ufy).optional(),"es-ES":e.string().max(Pfy).optional(),"sl-SI":e.string().max(Cfy).optional(),"pt-PT":e.string().max(wfy).optional(),"nl-NL":e.string().max(Afy).optional(),"pl-PL":e.string().max(Ffy).optional(),"hr-HR":e.string().max(kfy).optional(),"sv-SE":e.string().max(jfy).optional(),"fi-FI":e.string().max(Hfy).optional(),"et-EE":e.string().max(Lfy).optional(),"bg-BG":e.string().max(Gfy).optional(),"cs-CZ":e.string().max(Vfy).optional(),"sk-SK":e.string().max(Kfy).optional(),"nb-NO":e.string().max(Zfy).optional(),"is-IS":e.string().max(qfy).optional(),"hu-HU":e.string().max(Wfy).optional()}).optional().describe("Translated user-authored document content keyed by full supported locales such as `de-DE`. Values may be empty strings to intentionally blank content for a locale."),article_76a:e.object({"en-US":e.string().max(Yfy).nullish(),"de-DE":e.string().max($fy).nullish(),"it-IT":e.string().max(Qfy).nullish(),"fr-FR":e.string().max(Jfy).nullish(),"es-ES":e.string().max(Xfy).nullish(),"sl-SI":e.string().max(eBy).nullish(),"pt-PT":e.string().max(tBy).nullish(),"nl-NL":e.string().max(nBy).nullish(),"pl-PL":e.string().max(sBy).nullish(),"hr-HR":e.string().max(oBy).nullish(),"sv-SE":e.string().max(iBy).nullish(),"fi-FI":e.string().max(aBy).nullish(),"et-EE":e.string().max(rBy).nullish(),"bg-BG":e.string().max(lBy).nullish(),"cs-CZ":e.string().max(dBy).nullish(),"sk-SK":e.string().max(uBy).nullish(),"nb-NO":e.string().max(cBy).nullish(),"is-IS":e.string().max(pBy).nullish(),"hu-HU":e.string().max(mBy).nullish()}).nullish().describe("Translated user-authored document content keyed by full supported locales such as `de-DE`. Values may be empty strings to intentionally blank content for a locale."),intra_eu_b2b:e.object({"en-US":e.string().max(xBy).optional(),"de-DE":e.string().max(gBy).optional(),"it-IT":e.string().max(yBy).optional(),"fr-FR":e.string().max(OBy).optional(),"es-ES":e.string().max(vBy).optional(),"sl-SI":e.string().max(SBy).optional(),"pt-PT":e.string().max(hBy).optional(),"nl-NL":e.string().max(bBy).optional(),"pl-PL":e.string().max(zBy).optional(),"hr-HR":e.string().max(fBy).optional(),"sv-SE":e.string().max(BBy).optional(),"fi-FI":e.string().max(TBy).optional(),"et-EE":e.string().max(IBy).optional(),"bg-BG":e.string().max(EBy).optional(),"cs-CZ":e.string().max(DBy).optional(),"sk-SK":e.string().max(RBy).optional(),"nb-NO":e.string().max(_By).optional(),"is-IS":e.string().max(NBy).optional(),"hu-HU":e.string().max(MBy).optional()}).optional().describe("Translated user-authored document content keyed by full supported locales such as `de-DE`. Values may be empty strings to intentionally blank content for a locale."),intra_eu_b2b_goods:e.object({"en-US":e.string().max(UBy).nullish(),"de-DE":e.string().max(PBy).nullish(),"it-IT":e.string().max(CBy).nullish(),"fr-FR":e.string().max(wBy).nullish(),"es-ES":e.string().max(ABy).nullish(),"sl-SI":e.string().max(FBy).nullish(),"pt-PT":e.string().max(kBy).nullish(),"nl-NL":e.string().max(jBy).nullish(),"pl-PL":e.string().max(HBy).nullish(),"hr-HR":e.string().max(LBy).nullish(),"sv-SE":e.string().max(GBy).nullish(),"fi-FI":e.string().max(VBy).nullish(),"et-EE":e.string().max(KBy).nullish(),"bg-BG":e.string().max(ZBy).nullish(),"cs-CZ":e.string().max(qBy).nullish(),"sk-SK":e.string().max(WBy).nullish(),"nb-NO":e.string().max(YBy).nullish(),"is-IS":e.string().max($By).nullish(),"hu-HU":e.string().max(QBy).nullish()}).nullish().describe("Translated user-authored document content keyed by full supported locales such as `de-DE`. Values may be empty strings to intentionally blank content for a locale."),intra_eu_b2c:e.object({"en-US":e.string().max(JBy).optional(),"de-DE":e.string().max(XBy).optional(),"it-IT":e.string().max(eTy).optional(),"fr-FR":e.string().max(tTy).optional(),"es-ES":e.string().max(nTy).optional(),"sl-SI":e.string().max(sTy).optional(),"pt-PT":e.string().max(oTy).optional(),"nl-NL":e.string().max(iTy).optional(),"pl-PL":e.string().max(aTy).optional(),"hr-HR":e.string().max(rTy).optional(),"sv-SE":e.string().max(lTy).optional(),"fi-FI":e.string().max(dTy).optional(),"et-EE":e.string().max(uTy).optional(),"bg-BG":e.string().max(cTy).optional(),"cs-CZ":e.string().max(pTy).optional(),"sk-SK":e.string().max(mTy).optional(),"nb-NO":e.string().max(xTy).optional(),"is-IS":e.string().max(gTy).optional(),"hu-HU":e.string().max(yTy).optional()}).optional().describe("Translated user-authored document content keyed by full supported locales such as `de-DE`. Values may be empty strings to intentionally blank content for a locale."),"3w_b2b":e.object({"en-US":e.string().max(OTy).optional(),"de-DE":e.string().max(vTy).optional(),"it-IT":e.string().max(STy).optional(),"fr-FR":e.string().max(hTy).optional(),"es-ES":e.string().max(bTy).optional(),"sl-SI":e.string().max(zTy).optional(),"pt-PT":e.string().max(fTy).optional(),"nl-NL":e.string().max(BTy).optional(),"pl-PL":e.string().max(TTy).optional(),"hr-HR":e.string().max(ITy).optional(),"sv-SE":e.string().max(ETy).optional(),"fi-FI":e.string().max(DTy).optional(),"et-EE":e.string().max(RTy).optional(),"bg-BG":e.string().max(_Ty).optional(),"cs-CZ":e.string().max(NTy).optional(),"sk-SK":e.string().max(MTy).optional(),"nb-NO":e.string().max(UTy).optional(),"is-IS":e.string().max(PTy).optional(),"hu-HU":e.string().max(CTy).optional()}).optional().describe("Translated user-authored document content keyed by full supported locales such as `de-DE`. Values may be empty strings to intentionally blank content for a locale."),"3w_b2c":e.object({"en-US":e.string().max(wTy).optional(),"de-DE":e.string().max(ATy).optional(),"it-IT":e.string().max(FTy).optional(),"fr-FR":e.string().max(kTy).optional(),"es-ES":e.string().max(jTy).optional(),"sl-SI":e.string().max(HTy).optional(),"pt-PT":e.string().max(LTy).optional(),"nl-NL":e.string().max(GTy).optional(),"pl-PL":e.string().max(VTy).optional(),"hr-HR":e.string().max(KTy).optional(),"sv-SE":e.string().max(ZTy).optional(),"fi-FI":e.string().max(qTy).optional(),"et-EE":e.string().max(WTy).optional(),"bg-BG":e.string().max(YTy).optional(),"cs-CZ":e.string().max($Ty).optional(),"sk-SK":e.string().max(QTy).optional(),"nb-NO":e.string().max(JTy).optional(),"is-IS":e.string().max(XTy).optional(),"hu-HU":e.string().max(eIy).optional()}).optional().describe("Translated user-authored document content keyed by full supported locales such as `de-DE`. Values may be empty strings to intentionally blank content for a locale."),export:e.object({"en-US":e.string().max(tIy).optional(),"de-DE":e.string().max(nIy).optional(),"it-IT":e.string().max(sIy).optional(),"fr-FR":e.string().max(oIy).optional(),"es-ES":e.string().max(iIy).optional(),"sl-SI":e.string().max(aIy).optional(),"pt-PT":e.string().max(rIy).optional(),"nl-NL":e.string().max(lIy).optional(),"pl-PL":e.string().max(dIy).optional(),"hr-HR":e.string().max(uIy).optional(),"sv-SE":e.string().max(cIy).optional(),"fi-FI":e.string().max(pIy).optional(),"et-EE":e.string().max(mIy).optional(),"bg-BG":e.string().max(xIy).optional(),"cs-CZ":e.string().max(gIy).optional(),"sk-SK":e.string().max(yIy).optional(),"nb-NO":e.string().max(OIy).optional(),"is-IS":e.string().max(vIy).optional(),"hu-HU":e.string().max(SIy).optional()}).optional().describe("Translated user-authored document content keyed by full supported locales such as `de-DE`. Values may be empty strings to intentionally blank content for a locale.")}).optional().describe("Translated default tax clauses keyed by transaction type. Each transaction-type entry is a localized-content map keyed by full supported locales.")}).describe("Translated default document-facing settings keyed by full supported locales. Base scalar settings remain the default-language source of truth."),e.null()]).optional().describe("Translated default document-facing settings keyed by full supported locales. Used when new documents inherit default texts and when document defaults are rendered in an explicit non-default language."),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(hIy).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}"),bank_accounts:e.array(e.object({type:e.enum(["iban","us_domestic","uk_domestic","other"]).default(bIy).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."),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)."),purchase_order_hide_prices:e.boolean().nullish().describe("Default hide_prices for new purchase orders. When true, prices and totals are hidden by default. When false or unset, prices are hidden only while no line has a price."),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."),hide_tax_when_untaxed:e.boolean().nullish().describe("When true, rendered documents omit the tax row and per-line tax rate for lines and totals where no tax was applied. An explicitly applied 0% tax rate is still shown. Defaults to false, which keeps the 0% row for untaxed amounts."),tax_clause_defaults:e.union([e.object({domestic:e.string().nullish().describe("Default tax clause for domestic transactions (same country)"),article_76a:e.string().nullish().describe("Default clause for Slovenian domestic reverse charge under Article 76.a ZDDV-1."),intra_eu_b2b:e.string().nullish().describe("Default tax clause for intra-EU B2B transactions (reverse charge applies)"),intra_eu_b2b_goods:e.string().nullish().describe("Default tax clause for intra-EU B2B sales of goods (intra-community supply). Used when the lines are classified as product; falls back to intra_eu_b2b when empty."),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.")}),e.null()]).optional().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."),default_warehouse_id:e.string().nullish().describe("Warehouse to use for inventory movements created on documents issued by this business unit, when set and not deleted. Falls back to the entity's default warehouse otherwise. Send null to clear.")}).describe("Business-unit overrides for document-facing settings. Uses the same field names as entity settings while excluding entity-only compliance and fiscalization settings."),logo_url:e.url().nullish(),signature_url:e.url().nullish()}).describe("Frozen business-unit snapshot persisted on documents for rendering and history."),e.null()]).optional().describe("Frozen business-unit snapshot used for stable rendering and historical accuracy."),warehouse_id:e.string().nullish().describe("Warehouse the document's stock effect applies to. Omit or send null to use the business unit's default warehouse, then the entity default. Used by invoices, credit notes and expenses; stored but inert on other document types."),customer_id:e.string().max(zIy).nullish(),customer:e.union([e.object({name:e.string().nullish(),unit_name:e.string().nullish().describe("Deprecated compatibility field. This value is no longer used for business-unit rendering; use `business_unit.name` on the document instead."),email:e.string().max(fIy).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().max(BIy).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(),peppol_scheme_id:e.string().nullish(),e_invoicing:e.union([e.object({buyer_reference:e.string().nullish().describe("Canonical EN 16931 BT-10 buyer reference stored on the document customer snapshot. For German public-sector recipients, enter the Leitweg-ID here. For German B2B recipients this is optional unless the buyer requires it. Do not send a separate leitweg_id, routing_id, or top-level buyer_reference field.")}).describe("Customer e-invoicing data copied into the document customer snapshot. These fields are buyer/customer document data, not German validation state."),e.null()]).optional(),delivery_address:e.union([e.object({address:e.string().min(1).max(TIy),address_2:e.string().max(IIy).nullish(),post_code:e.string().min(1).max(EIy),city:e.string().min(1).max(DIy),country_code:e.string().min(_Iy).max(NIy).nullish().default(RIy)}).describe("Physical delivery address when it differs from the buyer's billing address. Required by French law when applicable."),e.null()]).optional().describe("Physical delivery address for this document when it differs from the customer's billing address. It is stored only on the document snapshot and is not saved to the customer record."),bank_accounts:e.array(e.object({type:e.enum(["iban","us_domestic","uk_domestic","other"]).default(MIy).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(),is_end_consumer:e.boolean().nullish(),is_tax_subject:e.boolean().nullish().describe("Whether the customer is VAT identified. Stored in the document snapshot and used by country-specific tax reports; a country code alone does not imply VAT identification."),ujp:e.union([e.object({receiver_name:e.string().min(1).nullish().describe("UJP envelope recipient name. If omitted, package generation falls back to the document customer name."),receiver_identifier:e.string().min(1).nullish().describe("Optional recipient tax number or identifier override for the UJP envelope. If omitted, package generation falls back to the document customer tax number."),receiver_agent:e.string().min(1).nullish().describe("Recipient BIC for the UJP envelope. Public budget users normally use UJPLSI2DICL."),receiver_mailbox:e.string().min(1).nullish().describe("Recipient IBAN/TRR mailbox for the UJP envelope.")}).describe("Optional Slovenian UJP recipient routing data stored on customers and copied into document customer snapshots."),e.null()]).optional(),sdi:e.union([e.object({recipient_code:e.string().regex(UIy).nullish().describe("Italian SdI recipient code for buyer routing. When neither a code nor PEC is supplied, domestic invoices use 0000000 and the seller must provide the buyer a courtesy copy and availability notice."),pec:e.email().nullish().describe("Italian certified email address for buyer routing. When provided without an SdI recipient code, FatturaPA uses `CodiceDestinatario = 0000000` plus `PECDestinatario`."),fiscal_code:e.string().regex(PIy).nullish().describe("Buyer's Italian codice fiscale, independent of their VAT number. For a domestic consumer, legacy tax_number remains a fallback fiscal-code input. Required for VAT-group participants where applicable."),fiscal_regime:e.string().regex(CIy).nullish().describe("Issuer-only fiscal regime snapshot, captured from settings.tax_rules.italy at issuance. Ignored for buyer routing.")}),e.null()]).optional(),bank_account:e.object({type:e.enum(["iban","us_domestic","uk_domestic","other"]).default(wIy).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("Customer recipient snapshot stored on the document. When a document is created with customer_id only, the snapshot is populated from the saved customer. When an explicit customer object is provided, the snapshot is built from that payload and known omitted fields are stored and returned as null instead of being backfilled from the saved customer."),e.null()]).optional().describe("Customer information snapshot stored on the document. Null means no customer. When present, known customer fields are returned with null for omitted values."),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(AIy).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."),translations:e.object({note:e.object({"en-US":e.string().max(FIy).optional(),"de-DE":e.string().max(kIy).optional(),"it-IT":e.string().max(jIy).optional(),"fr-FR":e.string().max(HIy).optional(),"es-ES":e.string().max(LIy).optional(),"sl-SI":e.string().max(GIy).optional(),"pt-PT":e.string().max(VIy).optional(),"nl-NL":e.string().max(KIy).optional(),"pl-PL":e.string().max(ZIy).optional(),"hr-HR":e.string().max(qIy).optional(),"sv-SE":e.string().max(WIy).optional(),"fi-FI":e.string().max(YIy).optional(),"et-EE":e.string().max($Iy).optional(),"bg-BG":e.string().max(QIy).optional(),"cs-CZ":e.string().max(JIy).optional(),"sk-SK":e.string().max(XIy).optional(),"nb-NO":e.string().max(eEy).optional(),"is-IS":e.string().max(tEy).optional(),"hu-HU":e.string().max(nEy).optional()}).optional().describe("Translated user-authored document content keyed by full supported locales such as `de-DE`. Values may be empty strings to intentionally blank content for a locale."),payment_terms:e.object({"en-US":e.string().max(sEy).optional(),"de-DE":e.string().max(oEy).optional(),"it-IT":e.string().max(iEy).optional(),"fr-FR":e.string().max(aEy).optional(),"es-ES":e.string().max(rEy).optional(),"sl-SI":e.string().max(lEy).optional(),"pt-PT":e.string().max(dEy).optional(),"nl-NL":e.string().max(uEy).optional(),"pl-PL":e.string().max(cEy).optional(),"hr-HR":e.string().max(pEy).optional(),"sv-SE":e.string().max(mEy).optional(),"fi-FI":e.string().max(xEy).optional(),"et-EE":e.string().max(gEy).optional(),"bg-BG":e.string().max(yEy).optional(),"cs-CZ":e.string().max(OEy).optional(),"sk-SK":e.string().max(vEy).optional(),"nb-NO":e.string().max(SEy).optional(),"is-IS":e.string().max(hEy).optional(),"hu-HU":e.string().max(bEy).optional()}).optional().describe("Translated user-authored document content keyed by full supported locales such as `de-DE`. Values may be empty strings to intentionally blank content for a locale."),tax_clause:e.object({"en-US":e.string().max(zEy).optional(),"de-DE":e.string().max(fEy).optional(),"it-IT":e.string().max(BEy).optional(),"fr-FR":e.string().max(TEy).optional(),"es-ES":e.string().max(IEy).optional(),"sl-SI":e.string().max(EEy).optional(),"pt-PT":e.string().max(DEy).optional(),"nl-NL":e.string().max(REy).optional(),"pl-PL":e.string().max(_Ey).optional(),"hr-HR":e.string().max(NEy).optional(),"sv-SE":e.string().max(MEy).optional(),"fi-FI":e.string().max(UEy).optional(),"et-EE":e.string().max(PEy).optional(),"bg-BG":e.string().max(CEy).optional(),"cs-CZ":e.string().max(wEy).optional(),"sk-SK":e.string().max(AEy).optional(),"nb-NO":e.string().max(FEy).optional(),"is-IS":e.string().max(kEy).optional(),"hu-HU":e.string().max(jEy).optional()}).optional().describe("Translated user-authored document content keyed by full supported locales such as `de-DE`. Values may be empty strings to intentionally blank content for a locale."),footer:e.object({"en-US":e.string().max(HEy).optional(),"de-DE":e.string().max(LEy).optional(),"it-IT":e.string().max(GEy).optional(),"fr-FR":e.string().max(VEy).optional(),"es-ES":e.string().max(KEy).optional(),"sl-SI":e.string().max(ZEy).optional(),"pt-PT":e.string().max(qEy).optional(),"nl-NL":e.string().max(WEy).optional(),"pl-PL":e.string().max(YEy).optional(),"hr-HR":e.string().max($Ey).optional(),"sv-SE":e.string().max(QEy).optional(),"fi-FI":e.string().max(JEy).optional(),"et-EE":e.string().max(XEy).optional(),"bg-BG":e.string().max(eDy).optional(),"cs-CZ":e.string().max(tDy).optional(),"sk-SK":e.string().max(nDy).optional(),"nb-NO":e.string().max(sDy).optional(),"is-IS":e.string().max(oDy).optional(),"hu-HU":e.string().max(iDy).optional()}).optional().describe("Translated user-authored document content keyed by full supported locales such as `de-DE`. Values may be empty strings to intentionally blank content for a locale."),signature:e.object({"en-US":e.string().max(aDy).optional(),"de-DE":e.string().max(rDy).optional(),"it-IT":e.string().max(lDy).optional(),"fr-FR":e.string().max(dDy).optional(),"es-ES":e.string().max(uDy).optional(),"sl-SI":e.string().max(cDy).optional(),"pt-PT":e.string().max(pDy).optional(),"nl-NL":e.string().max(mDy).optional(),"pl-PL":e.string().max(xDy).optional(),"hr-HR":e.string().max(gDy).optional(),"sv-SE":e.string().max(yDy).optional(),"fi-FI":e.string().max(ODy).optional(),"et-EE":e.string().max(vDy).optional(),"bg-BG":e.string().max(SDy).optional(),"cs-CZ":e.string().max(hDy).optional(),"sk-SK":e.string().max(bDy).optional(),"nb-NO":e.string().max(zDy).optional(),"is-IS":e.string().max(fDy).optional(),"hu-HU":e.string().max(BDy).optional()}).optional().describe("Translated user-authored document content keyed by full supported locales such as `de-DE`. Values may be empty strings to intentionally blank content for a locale.")}).describe("Translated user-authored document content keyed by full supported locales. Empty string intentionally blanks the field for that locale."),total:e.number().describe("Document total before tax in the currency's major unit. For EUR, `29.90` means \u20AC29.90, not 2,990 cents."),total_with_tax:e.number().describe("Document total after tax in the currency's major unit. For EUR, `29.90` means \u20AC29.90, not 2,990 cents."),total_discount:e.number().describe("Document discount total in the currency's major unit, 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(),base_converted:e.number().nullish(),amount_converted:e.number().nullish(),reverse_charge:e.boolean().nullish()})).describe("Applied taxes summary"),currency_code:e.string().max(TDy),entity_id:e.string().max(IDy),date_year:e.number().min(EDy).max(DDy),shareable_id:e.string().max(RDy).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()).refine(d=>Object.keys(d).length<=50,"Metadata can have maximum 50 properties").nullish().describe("Custom string key-value data for your own use, with up to 50 properties. Keys are opaque and may contain periods. Useful for storing external IDs, tags, or integration data."),exchange_rate:e.union([e.object({rate:e.number().gt(_Dy).describe("Positive exchange rate used for conversion"),source:e.string().describe("Source of the exchange rate (e.g., 'auto' or 'manual')"),date:e.iso.datetime({}).describe("Date of the exchange rate"),quote_currency:e.string().min(NDy).max(MDy).describe("Quote currency (the base currency converted to)")}),e.null()]).optional().describe("Currency exchange rate information if conversion was applied. Resolved for the supply/tax-point date (date_service_to, else date_service) when it falls on or before the issue date (date); otherwise resolved for the issue date."),crypto_equivalents:e.array(e.object({code:e.enum(["BTC","ETH","SOL","USDC","USDT"]).describe("Crypto asset code."),amount:e.number().describe("Crypto amount equivalent to the document's total_with_tax at `rate`."),rate:e.number().gt(UDy).describe("Units of the document currency per 1 unit of `code`, at `date`."),quote_currency:e.string().describe("The document's currency_code this equivalent was computed against."),source:e.string().describe("Source of the rate (e.g. 'auto')."),date:e.iso.datetime({}).describe("Date the rate was resolved for."),wallet_address:e.string().nullable().describe("Wallet address snapshot from entity settings at the time this equivalent was computed."),network:e.string().nullable().describe("Network label snapshot from entity settings at the time this equivalent was computed.")})).nullish().describe("Opt-in, informational crypto amount(s) equivalent to total_with_tax at the document-date rate. Null unless entity settings.crypto_equivalents is enabled and the document type supports it (invoice, advance_invoice, estimate). The document itself is always invoiced and settled in currency_code."),total_converted:e.number().min(PDy).max(CDy).nullish(),total_with_tax_converted:e.number().min(wDy).max(ADy).nullish(),rounding_correction:e.number().nullish().describe("Rounding correction in the currency's major unit, 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.union([e.object({validation_enabled:e.boolean().nullish().describe("Override entity default: true = validate, false = skip, null = use entity setting"),validation_required:e.boolean().nullish().describe("When true, final document creation/finalization must fail if current e-SLOG validation fails. Draft creation stores validation status without blocking."),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"),validation_version:e.string().nullish().describe("Validator/generator version used for the stored validation result"),validation_cache_key:e.string().nullish().describe("Hash of the relevant document/entity data used for the stored validation result")}),e.null()]).optional().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.union([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."),request_id:e.string().nullish().describe("VIES consultation number, returned when the check was made with the entity's own VAT number. Read-only.")}),e.null(),e.null()]).optional().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({}),created_by_user_id:e.string().nullish().describe("ID of the user who created the document; null for documents created with an API key, by automation, or before this field existed. Read-only."),date_due:e.iso.datetime({}).nullish().describe("Date the invoice is due (ISO 8601 datetime at midnight UTC)"),total_paid:e.number().min(FDy).max(kDy),total_due:e.number().min(jDy).max(HDy),paid_in_full:e.boolean(),verifactu:e.union([e.object({record_id:e.string().describe("Immutable fiscal record identifier."),status:e.enum(["pending","accepted","accepted_with_errors","rejected","cancelled"]).describe("Authority submission state. Pending and accepted-with-errors invoices remain deliverable; rejected, cancelled and locally voided invoices are blocked."),hash:e.string().describe("Uppercase SHA-256 fingerprint of the canonical AEAT record."),generated_at:e.string().describe("Immutable record-generation timestamp including timezone."),qr_url:e.string().describe("AEAT invoice verification URL encoded by the printed QR."),software_version:e.string().describe("Fiscal software version that generated this record."),csv:e.string().nullable().describe("AEAT submission receipt code, when supplied."),error_code:e.string().nullable().describe("AEAT validation code or local transport error classification."),error_message:e.string().nullable().describe("Authority validation message or retry information.")}).describe("The latest retained fiscal record and its AEAT submission outcome."),e.object({invoice_type:e.union([e.literal("F1"),e.literal("F2"),e.literal("R1"),e.literal("R2"),e.literal("R3"),e.literal("R4"),e.literal("R5"),e.literal(null)]).nullish().describe("AEAT invoice type. Ordinary invoices default to F1; rectifying credit notes require an explicit R1\u2013R5 reason type."),description:e.string().min(1).max(LDy).nullish().describe("Description of the invoiced operation. Defaults to the document's line descriptions."),customer_id_type:e.union([e.literal("02"),e.literal("03"),e.literal("04"),e.literal("05"),e.literal("06"),e.literal("07"),e.literal(null)]).nullish().describe("AEAT identification type for a recipient identified without Spanish NIF: VAT ID, passport, official document, residence certificate, other evidence, or not registered in the census."),tax_treatments:e.array(e.object({tax_index:e.number().min(GDy).describe("Zero-based index in the document tax summary, available from calculation preview."),tax:e.enum(["01","02","03","05"]).describe("AEAT tax code: IVA, IPSI, IGIC or other."),regime:e.string().regex(VDy).describe("Applicable AEAT tax-regime code, supplied by the issuer."),qualification:e.enum(["S1","S2","N1","N2","E1","E2","E3","E4","E5","E6"]).describe("Taxable, reverse-charge, non-subject or statutory exemption classification.")})).max(KDy).nullish().describe("Explicit classifications for exceptional tax rows. Ordinary domestic positive-rate IVA defaults to 01/01/S1. Zero, exempt, reverse-charge and non-domestic rows require classification.")}).describe("Fiscal classifications supplied before issue, or as an append-only fiscal metadata correction."),e.null()]).optional(),furs:e.union([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(ZDy),issue_date_time:e.string().optional(),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(),print_count:e.number().min(qDy).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()}).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)."),e.null()]).optional(),fina:e.union([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(),payment_type_changed_at:e.iso.datetime({}).optional().describe("Set when the method was corrected after issuing and the change was accepted by CIS."),payment_change_unconfirmed:e.object({attempt_id:e.string().describe("Identifies the unresolved payment-method change. Retries of the same change retain this identifier."),payment_type:e.string().describe("CIS NacinPlac code the change was sent with."),payment_id:e.string().optional(),attempted_at:e.iso.datetime({}),reason:e.enum(["sent","unreachable","unrecorded","refused"]).describe("`sent` \u2014 awaiting CIS; `unreachable` \u2014 the answer never came; `unrecorded` \u2014 CIS accepted but the record could not be written; `refused` \u2014 a retry was refused while the first send is still unconfirmed.")}).optional().describe("A payment-method change was sent to CIS and not yet confirmed. The stored method is the old one; CIS may hold the new one. Cleared when a retry of the same change is confirmed; any other change is refused (409) while this is set."),numbering_sequence:e.string().optional(),issue_date_time:e.string().optional(),issue_date_time_iso:e.iso.datetime({}).optional(),payload:e.record(e.string(),e.unknown()).describe("CIS SOAP request payload"),cis_record:e.record(e.string(),e.unknown()).optional().describe("The record as submitted to CIS. Retained so a later payment-method change can resend it verbatim; never rewritten, since the ZKI was computed over these exact values."),subsequent_submit:e.boolean().optional().describe("Server-managed subsequent submission state (FINA NakDost); never accepted as document input."),issuer_oib:e.string().optional(),operator_label:e.string().optional(),print_count:e.number().min(WDy).optional()}).optional()}).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)."),e.null()]).optional(),pt:e.union([e.string(),e.number(),e.boolean(),e.null(),e.record(e.string(),e.unknown()),e.array(e.unknown())]).optional(),ticketbai:e.union([e.object({lroe_income_epigraphs:e.array(e.string().regex(YDy)).min(1).max($Dy).nullish().describe("Explicit IAE activity epigraphs for this invoice. Required for Bizkaia model 140; unsupported for model 240."),simplified:e.boolean().nullish().describe("Issue a simplified invoice only when legally eligible. Defaults to false."),description:e.string().min(1).max(QDy).nullish(),tax_treatment:e.union([e.literal("taxable"),e.literal("exempt"),e.literal("non_subject"),e.literal("reverse_charge"),e.literal(null)]).nullish().describe("Treatment for the whole invoice. Required for zero-rate or untaxed invoices; positive VAT defaults to taxable. Mixed treatments require separate invoices in the pilot."),vat_regime:e.union([e.literal("01"),e.literal("02"),e.literal(null)]).nullish().describe("01 general regime (default); 02 export operations. Other special regimes are outside the pilot."),exemption_cause:e.union([e.literal("E1"),e.literal("E2"),e.literal("E3"),e.literal("E4"),e.literal("E5"),e.literal("E6"),e.literal(null)]).nullish(),non_subject_cause:e.union([e.literal("OT"),e.literal("RL"),e.literal("VT"),e.literal("IE"),e.literal(null)]).nullish(),recipient_id_type:e.union([e.literal("02"),e.literal("03"),e.literal("04"),e.literal("05"),e.literal("06"),e.literal(null)]).nullish().describe("Foreign recipient identification type. Required for a non-Spanish recipient."),operation_type:e.union([e.literal("goods"),e.literal("services"),e.literal(null)]).nullish().describe("Required when the foreign recipient needs an operation-level breakdown."),rectification_code:e.union([e.literal("R1"),e.literal("R2"),e.literal("R3"),e.literal("R4"),e.literal("R5"),e.literal(null)]).nullish().describe("Required for credit notes. The pilot uses difference rectification (I) and the linked source invoices."),cancellation:e.object({record_id:e.string(),status:e.enum(["pending","sending","accepted","accepted_with_errors","rejected","unknown"]),reason:e.string()}).nullish(),record_id:e.string().nullish(),identifier:e.string().nullish(),qr_url:e.string().nullish(),status:e.union([e.literal("pending"),e.literal("sending"),e.literal("accepted"),e.literal("accepted_with_errors"),e.literal("rejected"),e.literal("unknown"),e.literal(null)]).nullish()}),e.null()]).optional(),ksef:e.union([e.object({submission_id:e.string(),status:e.enum(["reserved","processing","dispatching","submitted","accepted","rejected","retryable_error"]),revision:e.number(),error_code:e.string().nullable(),error_message:e.string().nullable(),ksef_number:e.string().nullable(),invoice_hash:e.string().nullable(),upo_available:e.boolean(),recovery_available:e.boolean().optional().describe("Whether recovery can be requested. The recovery action verifies definitive nonacceptance before returning the document to draft; ambiguous results return 409.")}).describe("Server-managed Poland KSeF lifecycle. Dispatching is ambiguous and cannot be automatically resent. Acceptance requires authority invoice hash verification."),e.null()]).optional(),early_payment_discount:e.union([e.object({terms_id:e.string().optional(),percentage:e.number().gt(JDy).lt(XDy).multipleOf(eRy).describe("Discount percentage with at most four decimal places, greater than zero and less than 100."),days:e.number().min(tRy).max(nRy),deadline:e.string().describe("Inclusive, snapshotted local eligibility date (YYYY-MM-DD)."),timezone:e.string().describe("Issuer IANA timezone snapshotted with the terms."),currency_precision:e.number().min(sRy).max(oRy),eligible_base:e.number(),discount_amount:e.number().describe("Available conditional discount; does not reduce the invoice total."),discounted_payable:e.number().describe("Cash required in total within the discount window, before subtracting partial cash already received."),remaining_discounted_payable:e.number().describe("Conditional cash still required after payments already received; usable only while the offer remains eligible."),discount_taken:e.number().describe("Realised non-cash settlement, recorded separately from payments and ordinary discounts."),total_cash_received:e.number(),total_non_cash_applied:e.number().describe("Applied credits and advances/deposits, separate from cash and the realised discount."),qualification_base:e.number().nullable().describe("Historical earned qualification base, retained to revalidate cash after later credits, advances and payment restoration. Null before any qualification."),total_settled:e.number().describe("Cash, applied advances/credits and realised discount combined. Can exceed invoice total for an overpayment."),qualifying_payment_id:e.string().nullable()}),e.null()]).optional(),xrechnung:e.union([e.object({validation_enabled:e.boolean().nullish().describe("Whether German XRechnung/ZUGFeRD validation was enabled when this document was last validated. This is server-managed document validation state, not buyer/customer routing data."),validation_required:e.boolean().nullish().describe("Whether this validation result was required for the save/finalization call. When true, final document creation/finalization fails if current German e-invoice validation fails. Draft creation stores validation status without blocking."),validation_status:e.union([e.literal("valid"),e.literal("invalid"),e.literal("not_validated"),e.literal(null)]).nullish().describe("Stored German validation status from the last saved validation: 'valid', 'invalid', or 'not_validated'. German export downloads use this stored result when it is still current for the document; otherwise export re-validates the current document and returns a 422 with field errors if that live validation fails."),validation_errors:e.array(e.string()).nullish().describe("German XRechnung/ZUGFeRD validation error messages from the last validation run. These messages describe missing or invalid document/entity/customer data."),validated_at:e.string().nullish().describe("ISO timestamp when validation was last performed."),validation_version:e.string().nullish().describe("Validator/generator version used for the stored validation result."),validation_cache_key:e.string().nullish().describe("Hash of the relevant document, entity, and customer data used for the stored validation result. Export code uses this with validation_version to avoid trusting stale validation state.")}).describe("Server-managed validation state for a German e-invoice standard. Stored on invoice and credit-note documents as either xrechnung or zugferd. Buyer reference / Leitweg-ID input belongs under customer.e_invoicing.buyer_reference, not here."),e.null()]).optional().describe("Server-managed German XRechnung validation data stored on invoices. Only applicable when entity.country_code = 'DE' and XRechnung is enabled. Buyer reference / Leitweg-ID input is stored on customer.e_invoicing.buyer_reference."),zugferd:e.union([e.object({validation_enabled:e.boolean().nullish().describe("Whether German XRechnung/ZUGFeRD validation was enabled when this document was last validated. This is server-managed document validation state, not buyer/customer routing data."),validation_required:e.boolean().nullish().describe("Whether this validation result was required for the save/finalization call. When true, final document creation/finalization fails if current German e-invoice validation fails. Draft creation stores validation status without blocking."),validation_status:e.union([e.literal("valid"),e.literal("invalid"),e.literal("not_validated"),e.literal(null)]).nullish().describe("Stored German validation status from the last saved validation: 'valid', 'invalid', or 'not_validated'. German export downloads use this stored result when it is still current for the document; otherwise export re-validates the current document and returns a 422 with field errors if that live validation fails."),validation_errors:e.array(e.string()).nullish().describe("German XRechnung/ZUGFeRD validation error messages from the last validation run. These messages describe missing or invalid document/entity/customer data."),validated_at:e.string().nullish().describe("ISO timestamp when validation was last performed."),validation_version:e.string().nullish().describe("Validator/generator version used for the stored validation result."),validation_cache_key:e.string().nullish().describe("Hash of the relevant document, entity, and customer data used for the stored validation result. Export code uses this with validation_version to avoid trusting stale validation state.")}).describe("Server-managed validation state for a German e-invoice standard. Stored on invoice and credit-note documents as either xrechnung or zugferd. Buyer reference / Leitweg-ID input belongs under customer.e_invoicing.buyer_reference, not here."),e.null()]).optional().describe("Server-managed German ZUGFeRD/Factur-X validation data stored on invoices. Only applicable when entity.country_code = 'DE' and ZUGFeRD is enabled. Buyer reference / Leitweg-ID input is stored on customer.e_invoicing.buyer_reference."),ujp:e.union([e.object({validation_enabled:e.boolean().nullish().describe("Override entity/default behavior: true = validate UJP package requirements, false = skip, null = use default."),validation_required:e.boolean().nullish().describe("When true, final document creation must fail if current UJP package validation fails."),validation_status:e.union([e.literal("valid"),e.literal("invalid"),e.literal("not_validated"),e.literal(null)]).nullish().describe("Validation status for UJP package/envelope requirements."),validation_errors:e.array(e.string()).nullish().describe("Array of validation error messages when status is invalid."),validated_at:e.string().nullish().describe("ISO timestamp when UJP validation was last performed."),validation_version:e.string().nullish().describe("Validator/generator version used for the stored UJP validation result."),validation_cache_key:e.string().nullish().describe("Hash of the relevant document/entity data used for the stored UJP validation result.")}).describe("UJP package validation data for Slovenian invoice/credit-note exports. Web may expose UJP download as a secondary e-SLOG dropdown action when current UJP validation is valid."),e.null()]).optional().describe("UJP package validation data for Slovenian invoice exports. Only applicable when entity.country_code = 'SI' and UJP validation is enabled."),nav:e.union([e.object({status:e.enum(["reserved","dispatching","submitted","done","done_with_warnings","aborted","ambiguous","failed","annulment_pending","annulled"]).describe("Lifecycle status of a document's NAV submission."),operation:e.enum(["CREATE","MODIFY","STORNO"]).describe("NAV `invoiceOperation` used for this document's submission."),submission_id:e.string().describe("Identifier of the underlying nav_submissions row driving this document's NAV lifecycle."),environment:e.enum(["test","production"]).describe("NAV Online Sz\xE1mla environment. Test and production are fully separate NAV registrations."),invoice_number:e.string().describe("Invoice number as reported to NAV."),original_invoice_number:e.string().nullable().describe("Original invoice number this submission modifies/cancels, if this is a MODIFY/STORNO."),modification_index:e.number().nullable().describe("Modification index within the original invoice's NAV chain, if this is a MODIFY/STORNO."),transaction_id:e.string().nullable().describe("NAV transaction ID once the submission has been accepted by NAV."),submitted_at:e.string().nullable().describe("ISO datetime the submission was sent to NAV, if it has been."),completed_at:e.string().nullable().describe("ISO datetime NAV processing finished (done/failed/aborted/annulled), if it has."),error_code:e.string().nullable().describe("Top-level NAV error code, if the submission failed."),error_message:e.string().nullable().describe("Top-level NAV error message, if the submission failed."),messages:e.array(e.object({severity:e.enum(["error","warning","info"]).describe("Severity of the NAV validation/processing message."),code:e.string().nullable().describe("NAV validation/error code, if any."),message:e.string().nullable().describe("Human-readable message text from NAV, if any."),tag:e.string().nullable().describe("XML tag the message points to, if any."),line:e.number().nullable().describe("XML line number the message points to, if any.")}).describe("A single NAV technical or business validation/processing message.")).describe("Technical and business validation/processing messages returned by NAV."),retry_available:e.boolean().describe("Whether a retry action is currently available for this document's NAV submission."),reconcile_available:e.boolean().describe("Whether a manual reconcile-with-NAV action is currently available for this document."),annulment_available:e.boolean().describe("Whether a technical annulment action is currently available for this document's NAV submission.")}).describe("Server-managed Hungarian NAV Online Sz\xE1mla submission state for an invoice, credit note, or advance invoice. Never accepted as create/update input."),e.null()]).optional().describe("Server-managed Hungarian NAV Online Sz\xE1mla submission state for this invoice. Only applicable when entity.country_code = 'HU' and NAV is enabled."),sdi:e.union([e.object({country_code:e.enum(["IT"]).describe("Country code for Italy SDI lifecycle data."),status:e.enum(["pending","submitted","accepted","delivered","rejected","non_deliverable","failed","retry_scheduled"]).describe("Current SDI lifecycle status for the document."),latest_submission_id:e.string().nullish(),file_name:e.string().nullish(),sdi_identifier:e.string().nullish(),submitted_at:e.iso.datetime({}).nullish(),accepted_at:e.iso.datetime({}).nullish(),delivered_at:e.iso.datetime({}).nullish(),rejected_at:e.iso.datetime({}).nullish(),non_deliverable_at:e.iso.datetime({}).nullish(),failed_at:e.iso.datetime({}).nullish(),next_retry_at:e.iso.datetime({}).nullish(),retry_attempts:e.number().min(iRy).nullish(),last_error:e.object({code:e.string().nullish(),message:e.string(),source:e.union([e.literal("validation"),e.literal("soap"),e.literal("callback"),e.literal("config"),e.literal("unknown"),e.literal(null)]).nullish()}).nullish(),diagnostics:e.object({requires_reconciliation:e.boolean().nullish().describe("True when dispatch may have reached SdI but no authoritative outcome is known; never automatically resend."),preparation_retry_count:e.number().min(aRy).nullish(),certificate_warnings:e.array(e.string()).nullish(),endpoint:e.string().nullish(),certificate_fingerprint:e.string().nullish(),certificate_expires_at:e.iso.datetime({}).nullish()}).nullish()}).describe("Italy SDI/FatturaPA document lifecycle data. This is current document-facing state; full attempt history lives in SDI submissions and activities."),e.null()]).optional(),date_service:e.string().regex(rRy).nullish().describe("Service date in YYYY-MM-DD format. For invoices and credit notes. When it (or date_service_to, if later) falls on or before date, foreign-currency conversion uses it as the exchange-rate reference date instead of date."),date_service_to:e.string().regex(lRy).nullish().describe("Service period end date in YYYY-MM-DD format. For invoices and credit notes. Use with date_service for date ranges. Continuous/period supplies are chargeable at period end, so this takes precedence over date_service as the exchange-rate reference date when it falls on or before date."),tax_rules:e.object({slovenia:e.object({article_76a:e.boolean().describe("Whether this domestic Slovenian document uses reverse charge under Article 76.a ZDDV-1. VAT remains reported but is not added to the payable total.")})}).optional(),items:e.array(e.object({id:e.string().max(dRy),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(uRy),description:e.string().nullable(),classification:e.union([e.literal("product"),e.literal("service"),e.literal("advance"),e.literal(null)]).nullish().describe("Item classification: product, service, or advance. Used by country-specific tax and e-invoicing mappings, including Poland goods/services and Portugal SAF-T product typing."),price:e.number().nullish().describe("Per-unit net price before tax in the document currency's major unit; for EUR, `29.90` means \u20AC29.90, not 2,990 cents. Always stores net price. Null for separator items."),gross_price:e.number().nullish().describe("Per-unit gross price including tax in the document currency's major unit; for EUR, `29.90` means \u20AC29.90, not 2,990 cents.\nOnly present if user originally sent gross price.\nUse 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().nullish().describe("Display unit for this line item. E-invoicing XML unit output may be overridden by `e_invoicing.unit_code`."),e_invoicing:e.union([e.object({unit_code:e.string().min(1).max(cRy).nullish().describe("Optional XML unit-code override for e-SLOG, Peppol, XRechnung, and ZUGFeRD output. Use a supported UN/ECE Rec 20 / Rec 21 code such as C62, HUR, MGM, MLT, or SET."),vat_category:e.union([e.object({code:e.enum(["Z","E","AE","K","G"]).describe("EN 16931 VAT category code: K, AE, G, E or Z."),exemption_reason_code:e.string().regex(pRy).nullish().describe("VATEX exemption reason code (BT-121). Not allowed with Z."),exemption_reason:e.string().min(1).max(mRy).nullish().describe("Exemption reason text (BT-120). Not allowed with Z.")}).describe("EN 16931 VAT category override for a line without VAT charged."),e.null()]).optional(),italy:e.union([e.object({nature:e.enum(["N2.1","N2.2","N3.1","N3.2"]).describe("Supported zero-VAT treatment: N2.1 territorial exclusion, N2.2 flat-rate (RF19) operations, N3.1 exports, N3.2 intra-community supplies. N2.2 is only accepted for an RF19 (regime forfettario) seller invoicing a domestic Italian buyer; ordinary RF01 sellers, and RF19 sellers invoicing a foreign buyer, must use N2.1/N3.1/N3.2 instead. Other special/exempt treatments are not supported and must not be relabelled."),legal_reference:e.string().min(1).max(xRy).describe("Actual legal basis for this zero-VAT operation, emitted as RiferimentoNormativo.")}),e.null()]).optional(),hungary:e.object({vat_treatment:e.union([e.object({type:e.enum(["exemption"]),case:e.enum(["AAM","TAM","KBAET","KBAUK","EAM","NAM"]).describe("NAV VAT exemption case code (invoiceData.xsd `VatExemptionCaseType`)."),reason:e.string().min(1).max(gRy).describe("Free-text justification for the exemption/out-of-scope case (invoiceData.xsd DetailedReasonType.reason, common:SimpleText200NotBlankType: max 200 characters, non-blank).")}),e.object({type:e.enum(["out_of_scope"]),case:e.enum(["ATK","EUFAD37","EUFADE","EUE","HO"]).describe("NAV out-of-scope VAT case code (invoiceData.xsd `VatOutOfScopeCaseType`)."),reason:e.string().min(1).max(yRy).describe("Free-text justification for the exemption/out-of-scope case (invoiceData.xsd DetailedReasonType.reason, common:SimpleText200NotBlankType: max 200 characters, non-blank).")}),e.object({type:e.enum(["domestic_reverse_charge"])}),e.object({type:e.enum(["no_vat_charge"])}),e.null()]).optional().describe("Explicit Hungarian NAV VAT treatment for a document line, required whenever a line has no positive, non-reverse-charge VAT percentage. Never auto-derived from transaction_type, customer country, or product classification.")}).nullish().describe("Hungary-specific line-level e-invoicing options for NAV reporting. `vat_treatment` is required whenever the line has no positive, non-reverse-charge VAT percentage; NAV country validation itself is enforced elsewhere, not by this schema.")}).describe("Line-level e-invoicing options. `unit_code` overrides only XML unit output; the line `unit` field remains the display unit. `vat_category` overrides the derived EN 16931 VAT category in XRechnung and ZUGFeRD exports. `hungary` carries NAV-specific reporting input."),e.null()]).optional().describe("Line-level e-invoicing options for XML output."),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(),is_deductible:e.boolean().nullish().describe("AP compatibility flag derived from deductible_percentage when supplied. Without a percentage, true resolves to 100 and false resolves to 0."),deductible_percentage:e.number().min(ORy).max(vRy).nullish().describe("Percentage of input tax that is deductible for AP bookkeeping, from 0 through 100."),pt_exemption_code:e.string().nullish(),pt_exemption_reason:e.string().nullish().describe("Optional Portugal legal wording override, at most 60 characters at issuance. Omit to use the explicitly selected tax's matching wording or the standard wording of pt_exemption_code. M19 has no default and requires a specific legal reason. The effective wording is saved on issuance."),destination_vat_country_code:e.string().min(SRy).max(hRy).nullish().describe("Server-owned ISO 3166-1 alpha-2 destination country marker indicating that this line tax is destination VAT for EU OSS. Null or omitted means issuer-country VAT.")}).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(bRy).describe("Discount value"),type:e.enum(["percent","amount"]).default(zRy).describe("Discount type: 'percent' (default) or 'amount'")})).max(fRy).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 in the document currency's major unit. Null for separator items."),total_with_tax:e.number().nullish().describe("Line total after tax in the document currency's major unit. Null for separator items."),total_converted:e.number().min(BRy).max(TRy).nullish(),total_with_tax_converted:e.number().min(IRy).max(ERy).nullish(),invoice_id:e.string().max(DRy).nullish(),advance_invoice_id:e.string().max(RRy).nullish(),delivery_note_id:e.string().max(_Ry).nullish(),expense_id:e.string().max(NRy).nullish(),item_id:e.string().max(MRy).nullish(),metadata:e.record(e.string(),e.string()).refine(d=>Object.keys(d).length<=50,"Metadata can have maximum 50 properties").nullish().describe("Custom string key-value data for your own use, with up to 50 properties. Keys are opaque and may contain periods. Useful for storing external IDs, tags, or integration data."),revenue_recognition:e.union([e.object({method:e.union([e.literal("immediate"),e.literal("service_period_daily"),e.literal(null)]).nullish().describe("Line-level revenue recognition override. immediate recognizes on the document date; service_period_daily spreads over date_from/date_to."),date_from:e.string().nullish().describe("Line-level service period start date in YYYY-MM-DD format."),date_to:e.string().nullish().describe("Line-level service period end date in YYYY-MM-DD format.")}),e.null()]).optional().describe("Optional line-level revenue recognition override."),translations:e.object({name:e.object({"en-US":e.string().max(URy).optional(),"de-DE":e.string().max(PRy).optional(),"it-IT":e.string().max(CRy).optional(),"fr-FR":e.string().max(wRy).optional(),"es-ES":e.string().max(ARy).optional(),"sl-SI":e.string().max(FRy).optional(),"pt-PT":e.string().max(kRy).optional(),"nl-NL":e.string().max(jRy).optional(),"pl-PL":e.string().max(HRy).optional(),"hr-HR":e.string().max(LRy).optional(),"sv-SE":e.string().max(GRy).optional(),"fi-FI":e.string().max(VRy).optional(),"et-EE":e.string().max(KRy).optional(),"bg-BG":e.string().max(ZRy).optional(),"cs-CZ":e.string().max(qRy).optional(),"sk-SK":e.string().max(WRy).optional(),"nb-NO":e.string().max(YRy).optional(),"is-IS":e.string().max($Ry).optional(),"hu-HU":e.string().max(QRy).optional()}).optional().describe("Translated user-authored document content keyed by full supported locales such as `de-DE`. Values may be empty strings to intentionally blank content for a locale."),description:e.object({"en-US":e.string().max(JRy).optional(),"de-DE":e.string().max(XRy).optional(),"it-IT":e.string().max(e_y).optional(),"fr-FR":e.string().max(t_y).optional(),"es-ES":e.string().max(n_y).optional(),"sl-SI":e.string().max(s_y).optional(),"pt-PT":e.string().max(o_y).optional(),"nl-NL":e.string().max(i_y).optional(),"pl-PL":e.string().max(a_y).optional(),"hr-HR":e.string().max(r_y).optional(),"sv-SE":e.string().max(l_y).optional(),"fi-FI":e.string().max(d_y).optional(),"et-EE":e.string().max(u_y).optional(),"bg-BG":e.string().max(c_y).optional(),"cs-CZ":e.string().max(p_y).optional(),"sk-SK":e.string().max(m_y).optional(),"nb-NO":e.string().max(x_y).optional(),"is-IS":e.string().max(g_y).optional(),"hu-HU":e.string().max(y_y).optional()}).optional().describe("Translated user-authored document content keyed by full supported locales such as `de-DE`. Values may be empty strings to intentionally blank content for a locale.")}).describe("Translated user-authored line-item content keyed by full supported locales. Empty string intentionally blanks the field for that locale."),created_at:e.iso.datetime({}),updated_at:e.iso.datetime({}),financial_category_id:e.string().nullish().describe("Reporting financial category assigned to this document line.")})),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(),payments:e.array(e.object({id:e.string().max(O_y),invoice_id:e.string().max(v_y).nullish(),credit_note_id:e.string().max(S_y).nullish(),advance_invoice_id:e.string().max(h_y).nullish(),expense_id:e.string().max(b_y).nullish(),applied_to_expense_id:e.string().max(z_y).nullish(),amount:e.number().describe("Payment amount in the linked document currency's major unit; for EUR, `29.90` means \u20AC29.90, not 2,990 cents."),currency_code:e.string().max(f_y),amount_converted:e.number().min(B_y).max(T_y),type:e.enum(["cash","bank_transfer","card","credit_card","debit_card","check","paypal","coupon","crypto","other","credit_note","advance"]).describe("Payment method. Use credit_card or debit_card to preserve the card distinction in Portuguese SAF-T (CC/CD). Legacy card remains accepted and exports as CC. crypto is opt-in: it is accepted only on a crypto-currency document, or when the entity enabled settings.crypto_invoicing or settings.crypto_equivalents; otherwise the API answers 422 with cause.code crypto_payment_type_not_enabled."),date:e.iso.datetime({}).describe("Date the payment was received (ISO 8601 datetime at midnight UTC)"),tag:e.string().max(I_y).nullish(),reference:e.string().max(E_y).nullish(),note:e.string().max(D_y).nullish(),entity_id:e.string().max(R_y),metadata:e.record(e.string(),e.string()).refine(d=>Object.keys(d).length<=50,"Metadata can have maximum 50 properties").nullish().describe("Custom string key-value data for your own use, with up to 50 properties. Keys are opaque and may contain periods. 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(__y),number:e.string().max(N_y),voided_at:e.iso.datetime({}).nullish()}).nullish().describe("Related invoice, including cancellation status for payment controls"),CreditNote:e.object({id:e.string().max(M_y),number:e.string().max(U_y),voided_at:e.iso.datetime({}).nullish()}).nullish().describe("Related credit note, including cancellation status for payment controls"),AdvanceInvoice:e.object({id:e.string().max(P_y),number:e.string().max(C_y),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."),voided_at:e.iso.datetime({}).nullish()}).nullish().describe("Related advance invoice with lifecycle state used to determine payment mutability"),Expense:e.object({id:e.string().max(w_y),type:e.enum(["invoice","credit_note","advance_invoice"]).describe("Expense document type. V1 accepts `invoice` only; AP credit notes and advance invoices are reserved for a later version."),supplier_document_number:e.string().max(A_y).nullish(),date:e.string().regex(F_y).nullish(),total_with_tax:e.number().min(k_y).max(j_y).nullish()}).nullish().describe("Related expense"),AppliedToExpense:e.object({id:e.string().max(H_y),type:e.enum(["invoice","credit_note","advance_invoice"]).describe("Expense document type. V1 accepts `invoice` only; AP credit notes and advance invoices are reserved for a later version."),supplier_document_number:e.string().max(L_y).nullish(),date:e.string().regex(G_y).nullish(),total_with_tax:e.number().min(V_y).max(K_y).nullish()}).nullish().describe("Related expense")}).describe("Payment record for an outgoing document or expense")).optional().describe("Payment records linked to this invoice. Only present when requested via `?include=payments`.")}).describe("Invoice document with fiscalization support"),Z_y=new RegExp("^(?:[a-z]{3,4}|po)_[0-9a-f]{24}$"),uxS=e.object({id:e.stringFormat("resource-id",Z_y).describe("Document identifier. Prefix depends on the document type: inv_, est_, crn_, adv_, dln_ or po_ (purchase order).")}),q_y=2,W_y=5,Y_y=2,$_y=5,cxS=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(q_y).max(W_y).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(Y_y).max($_y).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.")}),pxS=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_y=new RegExp("^(?:[a-z]{3,4}|po)_[0-9a-f]{24}$"),mxS=e.object({id:e.stringFormat("resource-id",Q_y).describe("Document identifier. Prefix depends on the document type: inv_, est_, crn_, adv_, dln_ or po_ (purchase order).")}),J_y=2,X_y=5,eNy=2,tNy=5,xxS=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(J_y).max(X_y).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(eNy).max(tNy).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.")}),gxS=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 ct={};W(ct,{CreateItemBody:()=>OxS,CreateItemHeader:()=>yxS,CreateItemInventoryMovementBody:()=>QxS,CreateItemInventoryMovementHeader:()=>$xS,CreateItemInventoryMovementParams:()=>YxS,DeleteItemHeader:()=>wxS,DeleteItemInventoryMovementHeader:()=>XxS,DeleteItemInventoryMovementParams:()=>JxS,DeleteItemParams:()=>CxS,GetItemCategoriesHeader:()=>bxS,GetItemCategoriesResponse:()=>zxS,GetItemInventoryHeader:()=>GxS,GetItemInventoryMovementsHeader:()=>qxS,GetItemInventoryMovementsParams:()=>KxS,GetItemInventoryMovementsQueryParams:()=>ZxS,GetItemInventoryMovementsResponse:()=>WxS,GetItemInventoryParams:()=>LxS,GetItemInventoryResponse:()=>VxS,GetItemsHeader:()=>SxS,GetItemsImportTemplateHeader:()=>BxS,GetItemsImportTemplateQueryParams:()=>fxS,GetItemsQueryParams:()=>vxS,GetItemsResponse:()=>hxS,ImportItemsBody:()=>RxS,ImportItemsHeader:()=>DxS,ImportItemsResponse:()=>_xS,PermanentDeleteItemHeader:()=>HxS,PermanentDeleteItemParams:()=>jxS,PreviewItemsImportBody:()=>IxS,PreviewItemsImportHeader:()=>TxS,PreviewItemsImportResponse:()=>ExS,RestoreItemHeader:()=>FxS,RestoreItemParams:()=>AxS,RestoreItemResponse:()=>kxS,UpdateItemBody:()=>UxS,UpdateItemHeader:()=>MxS,UpdateItemParams:()=>NxS,UpdateItemResponse:()=>PxS,createItemBodyBarcodeMax:()=>pNy,createItemBodyCategoriesItemMax:()=>uNy,createItemBodyDescriptionMax:()=>nNy,createItemBodyEInvoicingOneHungaryVatTreatmentOneReasonMax:()=>rNy,createItemBodyEInvoicingOneHungaryVatTreatmentTwoReasonMax:()=>lNy,createItemBodyEInvoicingOneItalyOneLegalReferenceMax:()=>aNy,createItemBodyEInvoicingOneUnitCodeMax:()=>sNy,createItemBodyEInvoicingOneVatCategoryOneExemptionReasonCodeRegExp:()=>oNy,createItemBodyEInvoicingOneVatCategoryOneExemptionReasonMax:()=>iNy,createItemBodyFinancialCategoryKeyMax:()=>JNy,createItemBodyPurchasePriceMin:()=>mNy,createItemBodySkuMax:()=>cNy,createItemBodyTaxIdsItemMax:()=>dNy,createItemBodyTaxesItemClassificationMax:()=>tMy,createItemBodyTaxesItemRateMax:()=>eMy,createItemBodyTaxesItemRateMin:()=>XNy,createItemBodyTaxesMax:()=>nMy,createItemBodyTranslationsOneDescriptionBgBGMax:()=>ZNy,createItemBodyTranslationsOneDescriptionCsCZMax:()=>qNy,createItemBodyTranslationsOneDescriptionDeDEMax:()=>PNy,createItemBodyTranslationsOneDescriptionEnUSMax:()=>UNy,createItemBodyTranslationsOneDescriptionEsESMax:()=>ANy,createItemBodyTranslationsOneDescriptionEtEEMax:()=>KNy,createItemBodyTranslationsOneDescriptionFiFIMax:()=>VNy,createItemBodyTranslationsOneDescriptionFrFRMax:()=>wNy,createItemBodyTranslationsOneDescriptionHrHRMax:()=>LNy,createItemBodyTranslationsOneDescriptionHuHUMax:()=>QNy,createItemBodyTranslationsOneDescriptionIsISMax:()=>$Ny,createItemBodyTranslationsOneDescriptionItITMax:()=>CNy,createItemBodyTranslationsOneDescriptionNbNOMax:()=>YNy,createItemBodyTranslationsOneDescriptionNlNLMax:()=>jNy,createItemBodyTranslationsOneDescriptionPlPLMax:()=>HNy,createItemBodyTranslationsOneDescriptionPtPTMax:()=>kNy,createItemBodyTranslationsOneDescriptionSkSKMax:()=>WNy,createItemBodyTranslationsOneDescriptionSlSIMax:()=>FNy,createItemBodyTranslationsOneDescriptionSvSEMax:()=>GNy,createItemBodyTranslationsOneNameBgBGMax:()=>ENy,createItemBodyTranslationsOneNameCsCZMax:()=>DNy,createItemBodyTranslationsOneNameDeDEMax:()=>gNy,createItemBodyTranslationsOneNameEnUSMax:()=>xNy,createItemBodyTranslationsOneNameEsESMax:()=>vNy,createItemBodyTranslationsOneNameEtEEMax:()=>INy,createItemBodyTranslationsOneNameFiFIMax:()=>TNy,createItemBodyTranslationsOneNameFrFRMax:()=>ONy,createItemBodyTranslationsOneNameHrHRMax:()=>fNy,createItemBodyTranslationsOneNameHuHUMax:()=>MNy,createItemBodyTranslationsOneNameIsISMax:()=>NNy,createItemBodyTranslationsOneNameItITMax:()=>yNy,createItemBodyTranslationsOneNameNbNOMax:()=>_Ny,createItemBodyTranslationsOneNameNlNLMax:()=>bNy,createItemBodyTranslationsOneNamePlPLMax:()=>zNy,createItemBodyTranslationsOneNamePtPTMax:()=>hNy,createItemBodyTranslationsOneNameSkSKMax:()=>RNy,createItemBodyTranslationsOneNameSlSIMax:()=>SNy,createItemBodyTranslationsOneNameSvSEMax:()=>BNy,createItemInventoryMovementBodyNoteMax:()=>cCy,createItemInventoryMovementBodyQuantityExclusiveMin:()=>dCy,createItemInventoryMovementBodyUnitCostMin:()=>uCy,createItemInventoryMovementPathIdRegExp:()=>lCy,deleteItemInventoryMovementPathIdRegExp:()=>pCy,deleteItemInventoryMovementPathMovementIdRegExp:()=>mCy,deleteItemPathIdRegExp:()=>s2y,getItemInventoryMovementsPathIdRegExp:()=>iCy,getItemInventoryMovementsQueryLimitDefault:()=>aCy,getItemInventoryMovementsQueryLimitMax:()=>rCy,getItemInventoryPathIdRegExp:()=>oCy,getItemsQueryLimitDefault:()=>sMy,getItemsQueryLimitMax:()=>oMy,getItemsResponseDataItemOneCategoriesItemMax:()=>gMy,getItemsResponseDataItemOneDescriptionMax:()=>rMy,getItemsResponseDataItemOneEInvoicingOneHungaryVatTreatmentOneReasonMax:()=>pMy,getItemsResponseDataItemOneEInvoicingOneHungaryVatTreatmentTwoReasonMax:()=>mMy,getItemsResponseDataItemOneEInvoicingOneItalyOneLegalReferenceMax:()=>cMy,getItemsResponseDataItemOneEInvoicingOneUnitCodeMax:()=>lMy,getItemsResponseDataItemOneEInvoicingOneVatCategoryOneExemptionReasonCodeRegExp:()=>dMy,getItemsResponseDataItemOneEInvoicingOneVatCategoryOneExemptionReasonMax:()=>uMy,getItemsResponseDataItemOneEntityIdMax:()=>vMy,getItemsResponseDataItemOneIdMax:()=>iMy,getItemsResponseDataItemOneNameMax:()=>aMy,getItemsResponseDataItemOneTaxIdsItemMax:()=>xMy,getItemsResponseDataItemOneTotalTaxMax:()=>OMy,getItemsResponseDataItemOneTotalTaxMin:()=>yMy,getItemsResponseDataItemOneTranslationsDescriptionBgBGMax:()=>QMy,getItemsResponseDataItemOneTranslationsDescriptionCsCZMax:()=>JMy,getItemsResponseDataItemOneTranslationsDescriptionDeDEMax:()=>kMy,getItemsResponseDataItemOneTranslationsDescriptionEnUSMax:()=>FMy,getItemsResponseDataItemOneTranslationsDescriptionEsESMax:()=>LMy,getItemsResponseDataItemOneTranslationsDescriptionEtEEMax:()=>$My,getItemsResponseDataItemOneTranslationsDescriptionFiFIMax:()=>YMy,getItemsResponseDataItemOneTranslationsDescriptionFrFRMax:()=>HMy,getItemsResponseDataItemOneTranslationsDescriptionHrHRMax:()=>qMy,getItemsResponseDataItemOneTranslationsDescriptionHuHUMax:()=>nUy,getItemsResponseDataItemOneTranslationsDescriptionIsISMax:()=>tUy,getItemsResponseDataItemOneTranslationsDescriptionItITMax:()=>jMy,getItemsResponseDataItemOneTranslationsDescriptionNbNOMax:()=>eUy,getItemsResponseDataItemOneTranslationsDescriptionNlNLMax:()=>KMy,getItemsResponseDataItemOneTranslationsDescriptionPlPLMax:()=>ZMy,getItemsResponseDataItemOneTranslationsDescriptionPtPTMax:()=>VMy,getItemsResponseDataItemOneTranslationsDescriptionSkSKMax:()=>XMy,getItemsResponseDataItemOneTranslationsDescriptionSlSIMax:()=>GMy,getItemsResponseDataItemOneTranslationsDescriptionSvSEMax:()=>WMy,getItemsResponseDataItemOneTranslationsNameBgBGMax:()=>MMy,getItemsResponseDataItemOneTranslationsNameCsCZMax:()=>UMy,getItemsResponseDataItemOneTranslationsNameDeDEMax:()=>hMy,getItemsResponseDataItemOneTranslationsNameEnUSMax:()=>SMy,getItemsResponseDataItemOneTranslationsNameEsESMax:()=>fMy,getItemsResponseDataItemOneTranslationsNameEtEEMax:()=>NMy,getItemsResponseDataItemOneTranslationsNameFiFIMax:()=>_My,getItemsResponseDataItemOneTranslationsNameFrFRMax:()=>zMy,getItemsResponseDataItemOneTranslationsNameHrHRMax:()=>DMy,getItemsResponseDataItemOneTranslationsNameHuHUMax:()=>AMy,getItemsResponseDataItemOneTranslationsNameIsISMax:()=>wMy,getItemsResponseDataItemOneTranslationsNameItITMax:()=>bMy,getItemsResponseDataItemOneTranslationsNameNbNOMax:()=>CMy,getItemsResponseDataItemOneTranslationsNameNlNLMax:()=>IMy,getItemsResponseDataItemOneTranslationsNamePlPLMax:()=>EMy,getItemsResponseDataItemOneTranslationsNamePtPTMax:()=>TMy,getItemsResponseDataItemOneTranslationsNameSkSKMax:()=>PMy,getItemsResponseDataItemOneTranslationsNameSlSIMax:()=>BMy,getItemsResponseDataItemOneTranslationsNameSvSEMax:()=>RMy,permanentDeleteItemPathIdRegExp:()=>sCy,restoreItemPathIdRegExp:()=>o2y,restoreItemResponseOneCategoriesItemMax:()=>g2y,restoreItemResponseOneDescriptionMax:()=>r2y,restoreItemResponseOneEInvoicingOneHungaryVatTreatmentOneReasonMax:()=>p2y,restoreItemResponseOneEInvoicingOneHungaryVatTreatmentTwoReasonMax:()=>m2y,restoreItemResponseOneEInvoicingOneItalyOneLegalReferenceMax:()=>c2y,restoreItemResponseOneEInvoicingOneUnitCodeMax:()=>l2y,restoreItemResponseOneEInvoicingOneVatCategoryOneExemptionReasonCodeRegExp:()=>d2y,restoreItemResponseOneEInvoicingOneVatCategoryOneExemptionReasonMax:()=>u2y,restoreItemResponseOneEntityIdMax:()=>v2y,restoreItemResponseOneIdMax:()=>i2y,restoreItemResponseOneNameMax:()=>a2y,restoreItemResponseOneTaxIdsItemMax:()=>x2y,restoreItemResponseOneTotalTaxMax:()=>O2y,restoreItemResponseOneTotalTaxMin:()=>y2y,restoreItemResponseOneTranslationsDescriptionBgBGMax:()=>Q2y,restoreItemResponseOneTranslationsDescriptionCsCZMax:()=>J2y,restoreItemResponseOneTranslationsDescriptionDeDEMax:()=>k2y,restoreItemResponseOneTranslationsDescriptionEnUSMax:()=>F2y,restoreItemResponseOneTranslationsDescriptionEsESMax:()=>L2y,restoreItemResponseOneTranslationsDescriptionEtEEMax:()=>$2y,restoreItemResponseOneTranslationsDescriptionFiFIMax:()=>Y2y,restoreItemResponseOneTranslationsDescriptionFrFRMax:()=>H2y,restoreItemResponseOneTranslationsDescriptionHrHRMax:()=>q2y,restoreItemResponseOneTranslationsDescriptionHuHUMax:()=>nCy,restoreItemResponseOneTranslationsDescriptionIsISMax:()=>tCy,restoreItemResponseOneTranslationsDescriptionItITMax:()=>j2y,restoreItemResponseOneTranslationsDescriptionNbNOMax:()=>eCy,restoreItemResponseOneTranslationsDescriptionNlNLMax:()=>K2y,restoreItemResponseOneTranslationsDescriptionPlPLMax:()=>Z2y,restoreItemResponseOneTranslationsDescriptionPtPTMax:()=>V2y,restoreItemResponseOneTranslationsDescriptionSkSKMax:()=>X2y,restoreItemResponseOneTranslationsDescriptionSlSIMax:()=>G2y,restoreItemResponseOneTranslationsDescriptionSvSEMax:()=>W2y,restoreItemResponseOneTranslationsNameBgBGMax:()=>M2y,restoreItemResponseOneTranslationsNameCsCZMax:()=>U2y,restoreItemResponseOneTranslationsNameDeDEMax:()=>h2y,restoreItemResponseOneTranslationsNameEnUSMax:()=>S2y,restoreItemResponseOneTranslationsNameEsESMax:()=>f2y,restoreItemResponseOneTranslationsNameEtEEMax:()=>N2y,restoreItemResponseOneTranslationsNameFiFIMax:()=>_2y,restoreItemResponseOneTranslationsNameFrFRMax:()=>z2y,restoreItemResponseOneTranslationsNameHrHRMax:()=>D2y,restoreItemResponseOneTranslationsNameHuHUMax:()=>A2y,restoreItemResponseOneTranslationsNameIsISMax:()=>w2y,restoreItemResponseOneTranslationsNameItITMax:()=>b2y,restoreItemResponseOneTranslationsNameNbNOMax:()=>C2y,restoreItemResponseOneTranslationsNameNlNLMax:()=>I2y,restoreItemResponseOneTranslationsNamePlPLMax:()=>E2y,restoreItemResponseOneTranslationsNamePtPTMax:()=>T2y,restoreItemResponseOneTranslationsNameSkSKMax:()=>P2y,restoreItemResponseOneTranslationsNameSlSIMax:()=>B2y,restoreItemResponseOneTranslationsNameSvSEMax:()=>R2y,updateItemBodyBarcodeMax:()=>xUy,updateItemBodyCategoriesItemMax:()=>pUy,updateItemBodyDescriptionMax:()=>oUy,updateItemBodyEInvoicingOneHungaryVatTreatmentOneReasonMax:()=>dUy,updateItemBodyEInvoicingOneHungaryVatTreatmentTwoReasonMax:()=>uUy,updateItemBodyEInvoicingOneItalyOneLegalReferenceMax:()=>lUy,updateItemBodyEInvoicingOneUnitCodeMax:()=>iUy,updateItemBodyEInvoicingOneVatCategoryOneExemptionReasonCodeRegExp:()=>aUy,updateItemBodyEInvoicingOneVatCategoryOneExemptionReasonMax:()=>rUy,updateItemBodyFinancialCategoryKeyMax:()=>ePy,updateItemBodyPurchasePriceMin:()=>gUy,updateItemBodySkuMax:()=>mUy,updateItemBodyTaxIdsItemMax:()=>cUy,updateItemBodyTaxesItemClassificationMax:()=>sPy,updateItemBodyTaxesItemRateMax:()=>nPy,updateItemBodyTaxesItemRateMin:()=>tPy,updateItemBodyTaxesMax:()=>oPy,updateItemBodyTranslationsOneDescriptionBgBGMax:()=>WUy,updateItemBodyTranslationsOneDescriptionCsCZMax:()=>YUy,updateItemBodyTranslationsOneDescriptionDeDEMax:()=>wUy,updateItemBodyTranslationsOneDescriptionEnUSMax:()=>CUy,updateItemBodyTranslationsOneDescriptionEsESMax:()=>kUy,updateItemBodyTranslationsOneDescriptionEtEEMax:()=>qUy,updateItemBodyTranslationsOneDescriptionFiFIMax:()=>ZUy,updateItemBodyTranslationsOneDescriptionFrFRMax:()=>FUy,updateItemBodyTranslationsOneDescriptionHrHRMax:()=>VUy,updateItemBodyTranslationsOneDescriptionHuHUMax:()=>XUy,updateItemBodyTranslationsOneDescriptionIsISMax:()=>JUy,updateItemBodyTranslationsOneDescriptionItITMax:()=>AUy,updateItemBodyTranslationsOneDescriptionNbNOMax:()=>QUy,updateItemBodyTranslationsOneDescriptionNlNLMax:()=>LUy,updateItemBodyTranslationsOneDescriptionPlPLMax:()=>GUy,updateItemBodyTranslationsOneDescriptionPtPTMax:()=>HUy,updateItemBodyTranslationsOneDescriptionSkSKMax:()=>$Uy,updateItemBodyTranslationsOneDescriptionSlSIMax:()=>jUy,updateItemBodyTranslationsOneDescriptionSvSEMax:()=>KUy,updateItemBodyTranslationsOneNameBgBGMax:()=>RUy,updateItemBodyTranslationsOneNameCsCZMax:()=>_Uy,updateItemBodyTranslationsOneNameDeDEMax:()=>OUy,updateItemBodyTranslationsOneNameEnUSMax:()=>yUy,updateItemBodyTranslationsOneNameEsESMax:()=>hUy,updateItemBodyTranslationsOneNameEtEEMax:()=>DUy,updateItemBodyTranslationsOneNameFiFIMax:()=>EUy,updateItemBodyTranslationsOneNameFrFRMax:()=>SUy,updateItemBodyTranslationsOneNameHrHRMax:()=>TUy,updateItemBodyTranslationsOneNameHuHUMax:()=>PUy,updateItemBodyTranslationsOneNameIsISMax:()=>UUy,updateItemBodyTranslationsOneNameItITMax:()=>vUy,updateItemBodyTranslationsOneNameNbNOMax:()=>MUy,updateItemBodyTranslationsOneNameNlNLMax:()=>fUy,updateItemBodyTranslationsOneNamePlPLMax:()=>BUy,updateItemBodyTranslationsOneNamePtPTMax:()=>zUy,updateItemBodyTranslationsOneNameSkSKMax:()=>NUy,updateItemBodyTranslationsOneNameSlSIMax:()=>bUy,updateItemBodyTranslationsOneNameSvSEMax:()=>IUy,updateItemPathIdRegExp:()=>sUy,updateItemResponseOneCategoriesItemMax:()=>gPy,updateItemResponseOneDescriptionMax:()=>rPy,updateItemResponseOneEInvoicingOneHungaryVatTreatmentOneReasonMax:()=>pPy,updateItemResponseOneEInvoicingOneHungaryVatTreatmentTwoReasonMax:()=>mPy,updateItemResponseOneEInvoicingOneItalyOneLegalReferenceMax:()=>cPy,updateItemResponseOneEInvoicingOneUnitCodeMax:()=>lPy,updateItemResponseOneEInvoicingOneVatCategoryOneExemptionReasonCodeRegExp:()=>dPy,updateItemResponseOneEInvoicingOneVatCategoryOneExemptionReasonMax:()=>uPy,updateItemResponseOneEntityIdMax:()=>vPy,updateItemResponseOneIdMax:()=>iPy,updateItemResponseOneNameMax:()=>aPy,updateItemResponseOneTaxIdsItemMax:()=>xPy,updateItemResponseOneTotalTaxMax:()=>OPy,updateItemResponseOneTotalTaxMin:()=>yPy,updateItemResponseOneTranslationsDescriptionBgBGMax:()=>QPy,updateItemResponseOneTranslationsDescriptionCsCZMax:()=>JPy,updateItemResponseOneTranslationsDescriptionDeDEMax:()=>kPy,updateItemResponseOneTranslationsDescriptionEnUSMax:()=>FPy,updateItemResponseOneTranslationsDescriptionEsESMax:()=>LPy,updateItemResponseOneTranslationsDescriptionEtEEMax:()=>$Py,updateItemResponseOneTranslationsDescriptionFiFIMax:()=>YPy,updateItemResponseOneTranslationsDescriptionFrFRMax:()=>HPy,updateItemResponseOneTranslationsDescriptionHrHRMax:()=>qPy,updateItemResponseOneTranslationsDescriptionHuHUMax:()=>n2y,updateItemResponseOneTranslationsDescriptionIsISMax:()=>t2y,updateItemResponseOneTranslationsDescriptionItITMax:()=>jPy,updateItemResponseOneTranslationsDescriptionNbNOMax:()=>e2y,updateItemResponseOneTranslationsDescriptionNlNLMax:()=>KPy,updateItemResponseOneTranslationsDescriptionPlPLMax:()=>ZPy,updateItemResponseOneTranslationsDescriptionPtPTMax:()=>VPy,updateItemResponseOneTranslationsDescriptionSkSKMax:()=>XPy,updateItemResponseOneTranslationsDescriptionSlSIMax:()=>GPy,updateItemResponseOneTranslationsDescriptionSvSEMax:()=>WPy,updateItemResponseOneTranslationsNameBgBGMax:()=>MPy,updateItemResponseOneTranslationsNameCsCZMax:()=>UPy,updateItemResponseOneTranslationsNameDeDEMax:()=>hPy,updateItemResponseOneTranslationsNameEnUSMax:()=>SPy,updateItemResponseOneTranslationsNameEsESMax:()=>fPy,updateItemResponseOneTranslationsNameEtEEMax:()=>NPy,updateItemResponseOneTranslationsNameFiFIMax:()=>_Py,updateItemResponseOneTranslationsNameFrFRMax:()=>zPy,updateItemResponseOneTranslationsNameHrHRMax:()=>DPy,updateItemResponseOneTranslationsNameHuHUMax:()=>APy,updateItemResponseOneTranslationsNameIsISMax:()=>wPy,updateItemResponseOneTranslationsNameItITMax:()=>bPy,updateItemResponseOneTranslationsNameNbNOMax:()=>CPy,updateItemResponseOneTranslationsNameNlNLMax:()=>IPy,updateItemResponseOneTranslationsNamePlPLMax:()=>EPy,updateItemResponseOneTranslationsNamePtPTMax:()=>TPy,updateItemResponseOneTranslationsNameSkSKMax:()=>PPy,updateItemResponseOneTranslationsNameSlSIMax:()=>BPy,updateItemResponseOneTranslationsNameSvSEMax:()=>RPy});var yxS=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.")}),nNy=2e3,sNy=8,oNy=/^VATEX-[A-Z0-9-]{2,24}$/,iNy=500,aNy=100,rNy=200,lNy=200,dNy=36,uNy=100,cNy=100,pNy=50,mNy=0,xNy=500,gNy=500,yNy=500,ONy=500,vNy=500,SNy=500,hNy=500,bNy=500,zNy=500,fNy=500,BNy=500,TNy=500,INy=500,ENy=500,DNy=500,RNy=500,_Ny=500,NNy=500,MNy=500,UNy=2e3,PNy=2e3,CNy=2e3,wNy=2e3,ANy=2e3,FNy=2e3,kNy=2e3,jNy=2e3,HNy=2e3,LNy=2e3,GNy=2e3,VNy=2e3,KNy=2e3,ZNy=2e3,qNy=2e3,WNy=2e3,YNy=2e3,$Ny=2e3,QNy=2e3,JNy=200,XNy=0,eMy=100,tMy=50,nMy=2,OxS=e.object({name:e.string().min(1),description:e.string().max(nNy).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 in the item's currency major unit; for EUR, `29.90` means \u20AC29.90, not 2,990 cents. Provide either price OR gross_price, not both."),gross_price:e.number().optional().describe("Gross price per unit including tax in the item's currency major unit; for EUR, `29.90` means \u20AC29.90, not 2,990 cents. If provided, net price is calculated. Provide either price OR gross_price, not both."),unit:e.string().nullish().describe("Default display unit for document lines created from this saved item."),e_invoicing:e.union([e.object({unit_code:e.string().min(1).max(sNy).nullish().describe("Optional XML unit-code override for e-SLOG, Peppol, XRechnung, and ZUGFeRD output. Use a supported UN/ECE Rec 20 / Rec 21 code such as C62, HUR, MGM, MLT, or SET."),vat_category:e.union([e.object({code:e.enum(["Z","E","AE","K","G"]).describe("EN 16931 VAT category code: K, AE, G, E or Z."),exemption_reason_code:e.string().regex(oNy).nullish().describe("VATEX exemption reason code (BT-121). Not allowed with Z."),exemption_reason:e.string().min(1).max(iNy).nullish().describe("Exemption reason text (BT-120). Not allowed with Z.")}).describe("EN 16931 VAT category override for a line without VAT charged."),e.null()]).optional(),italy:e.union([e.object({nature:e.enum(["N2.1","N2.2","N3.1","N3.2"]).describe("Supported zero-VAT treatment: N2.1 territorial exclusion, N2.2 flat-rate (RF19) operations, N3.1 exports, N3.2 intra-community supplies. N2.2 is only accepted for an RF19 (regime forfettario) seller invoicing a domestic Italian buyer; ordinary RF01 sellers, and RF19 sellers invoicing a foreign buyer, must use N2.1/N3.1/N3.2 instead. Other special/exempt treatments are not supported and must not be relabelled."),legal_reference:e.string().min(1).max(aNy).describe("Actual legal basis for this zero-VAT operation, emitted as RiferimentoNormativo.")}),e.null()]).optional(),hungary:e.object({vat_treatment:e.union([e.object({type:e.enum(["exemption"]),case:e.enum(["AAM","TAM","KBAET","KBAUK","EAM","NAM"]).describe("NAV VAT exemption case code (invoiceData.xsd `VatExemptionCaseType`)."),reason:e.string().min(1).max(rNy).describe("Free-text justification for the exemption/out-of-scope case (invoiceData.xsd DetailedReasonType.reason, common:SimpleText200NotBlankType: max 200 characters, non-blank).")}),e.object({type:e.enum(["out_of_scope"]),case:e.enum(["ATK","EUFAD37","EUFADE","EUE","HO"]).describe("NAV out-of-scope VAT case code (invoiceData.xsd `VatOutOfScopeCaseType`)."),reason:e.string().min(1).max(lNy).describe("Free-text justification for the exemption/out-of-scope case (invoiceData.xsd DetailedReasonType.reason, common:SimpleText200NotBlankType: max 200 characters, non-blank).")}),e.object({type:e.enum(["domestic_reverse_charge"])}),e.object({type:e.enum(["no_vat_charge"])}),e.null()]).optional().describe("Explicit Hungarian NAV VAT treatment for a document line, required whenever a line has no positive, non-reverse-charge VAT percentage. Never auto-derived from transaction_type, customer country, or product classification.")}).nullish().describe("Hungary-specific line-level e-invoicing options for NAV reporting. `vat_treatment` is required whenever the line has no positive, non-reverse-charge VAT percentage; NAV country validation itself is enforced elsewhere, not by this schema.")}).describe("Line-level e-invoicing options. `unit_code` overrides only XML unit output; the line `unit` field remains the display unit. `vat_category` overrides the derived EN 16931 VAT category in XRechnung and ZUGFeRD exports. `hungary` carries NAV-specific reporting input."),e.null()]).optional().describe("Default line-level e-invoicing options for document lines created from this saved item."),tax_ids:e.array(e.string().max(dNy)).optional(),categories:e.array(e.string().max(uNy)).nullish().describe("Free-form groupings used to filter the catalog. Values are trimmed, lower-cased and de-duplicated on write. Omit or send null for none; on update, null clears the list."),track_inventory:e.boolean().nullish().describe("Opt in to stock tracking for this item. When enabled, inventory movements can be recorded and finalizing an invoice with this item automatically records a `sale` movement. Omit or send null for false."),sku:e.string().max(cNy).nullish().describe("Stock-keeping unit, free-form and merchant-defined. Omit or send null for none."),usage:e.union([e.literal("sale"),e.literal("purchase"),e.literal(null)]).nullish().describe("What the item is used for: `sale` (shown when picking items for sales documents), `purchase` (shown when picking items for expenses and purchase orders). Omit or send null for both."),barcode:e.string().max(pNy).nullish().describe("GTIN/EAN/UPC barcode. Omit or send null for none."),purchase_price:e.number().min(mNy).nullish().describe("Net purchase price per unit in the entity's currency major unit. Used as the default `unit_cost` for inbound inventory movements when none is given. Omit or send null for none."),financial_category_id:e.string().nullish().describe("Default financial category for this item. In v1 only income categories can be assigned."),metadata:e.record(e.string(),e.string()).refine(d=>Object.keys(d).length<=50,"Metadata can have maximum 50 properties").nullish().describe("Custom string key-value data for your own use, with up to 50 properties. Keys are opaque and may contain periods. Useful for storing external IDs, tags, or integration data."),translations:e.union([e.object({name:e.object({"en-US":e.string().max(xNy).nullish(),"de-DE":e.string().max(gNy).nullish(),"it-IT":e.string().max(yNy).nullish(),"fr-FR":e.string().max(ONy).nullish(),"es-ES":e.string().max(vNy).nullish(),"sl-SI":e.string().max(SNy).nullish(),"pt-PT":e.string().max(hNy).nullish(),"nl-NL":e.string().max(bNy).nullish(),"pl-PL":e.string().max(zNy).nullish(),"hr-HR":e.string().max(fNy).nullish(),"sv-SE":e.string().max(BNy).nullish(),"fi-FI":e.string().max(TNy).nullish(),"et-EE":e.string().max(INy).nullish(),"bg-BG":e.string().max(ENy).nullish(),"cs-CZ":e.string().max(DNy).nullish(),"sk-SK":e.string().max(RNy).nullish(),"nb-NO":e.string().max(_Ny).nullish(),"is-IS":e.string().max(NNy).nullish(),"hu-HU":e.string().max(MNy).nullish()}).nullish().describe("Translated user-authored document content keyed by full supported locales such as `de-DE`. Values may be empty strings to intentionally blank content for a locale."),description:e.object({"en-US":e.string().max(UNy).nullish(),"de-DE":e.string().max(PNy).nullish(),"it-IT":e.string().max(CNy).nullish(),"fr-FR":e.string().max(wNy).nullish(),"es-ES":e.string().max(ANy).nullish(),"sl-SI":e.string().max(FNy).nullish(),"pt-PT":e.string().max(kNy).nullish(),"nl-NL":e.string().max(jNy).nullish(),"pl-PL":e.string().max(HNy).nullish(),"hr-HR":e.string().max(LNy).nullish(),"sv-SE":e.string().max(GNy).nullish(),"fi-FI":e.string().max(VNy).nullish(),"et-EE":e.string().max(KNy).nullish(),"bg-BG":e.string().max(ZNy).nullish(),"cs-CZ":e.string().max(qNy).nullish(),"sk-SK":e.string().max(WNy).nullish(),"nb-NO":e.string().max(YNy).nullish(),"is-IS":e.string().max($Ny).nullish(),"hu-HU":e.string().max(QNy).nullish()}).nullish().describe("Translated user-authored document content keyed by full supported locales such as `de-DE`. Values may be empty strings to intentionally blank content for a locale.")}).describe("Translated user-authored line-item content accepted on create and update. Same shape as `DocumentItemTranslations`; an explicit `null` for a field or a locale is treated as omitted."),e.null()]).optional().describe("Optional or null translated user-authored line-item content keyed by full supported locales. Empty string intentionally blanks the field for that locale."),financial_category_key:e.string().max(JNy).nullish().describe("Key of the default financial category (for example `office-supplies`), as an alternative to `financial_category_id`. Provide either, not both. On create a null value counts as not provided; on update null clears the default, and sending both fields is rejected."),taxes:e.array(e.object({rate:e.number().min(XNy).max(eMy).optional().describe("Tax rate percentage. Either rate or classification must be provided."),classification:e.string().max(tMy).optional().describe("Tax classification to lookup existing tax. Either rate or classification must be provided.")})).max(nMy).nullish().describe("Taxes for the item. Provide rate to auto-create, or classification to lookup existing tax.")}),sMy=10,oMy=100,vxS=e.object({limit:e.number().min(1).max(oMy).default(sMy).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**Array columns** (such as an item\'s `categories`) compare as sets: a direct value asks whether the list contains it, `contains` takes an array and requires all of them, `in` matches any of them, and `notIn` matches none. Scalar operators such as `gt` do not apply and are ignored.\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, categories, track_inventory, usage, 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.
195
195
  Searches are case-insensitive and match partial strings.
196
- 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."),categories:e.string().optional().describe("Comma-separated categories. Returns items in *any* of them, which is what a point-of-sale category chip filters by. Shorthand for the equivalent `query` operator form, kept because a filter row should not have to build JSON."),usage:e.enum(["sale","purchase"]).optional().describe("Items for this side: items with this usage, items without a usage, and inventory-tracked items. Use `sale` for pickers on sales documents and `purchase` for pickers on expenses and purchase orders. Omit to list every item.")}),SxS=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.")}),iMy=36,aMy=500,rMy=2e3,lMy=8,dMy=/^VATEX-[A-Z0-9-]{2,24}$/,uMy=500,cMy=100,pMy=200,mMy=200,xMy=36,gMy=100,yMy=-140737488355328,OMy=0x7fffffffffff,vMy=36,SMy=500,hMy=500,bMy=500,zMy=500,fMy=500,BMy=500,TMy=500,IMy=500,EMy=500,DMy=500,RMy=500,_My=500,NMy=500,MMy=500,UMy=500,PMy=500,CMy=500,wMy=500,AMy=500,FMy=2e3,kMy=2e3,jMy=2e3,HMy=2e3,LMy=2e3,GMy=2e3,VMy=2e3,KMy=2e3,ZMy=2e3,qMy=2e3,WMy=2e3,YMy=2e3,$My=2e3,QMy=2e3,JMy=2e3,XMy=2e3,eUy=2e3,tUy=2e3,nUy=2e3,hxS=e.object({data:e.array(e.object({id:e.string().max(iMy),name:e.string().max(aMy),description:e.string().max(rMy).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."),price_with_tax:e.number().describe("Per-unit price including tax. Stored for fast B2C/POS display regardless of input mode."),unit:e.string().nullish().describe("Default display unit for document lines created from this saved item."),e_invoicing:e.union([e.object({unit_code:e.string().min(1).max(lMy).nullish().describe("Optional XML unit-code override for e-SLOG, Peppol, XRechnung, and ZUGFeRD output. Use a supported UN/ECE Rec 20 / Rec 21 code such as C62, HUR, MGM, MLT, or SET."),vat_category:e.union([e.object({code:e.enum(["Z","E","AE","K","G"]).describe("EN 16931 VAT category code: K, AE, G, E or Z."),exemption_reason_code:e.string().regex(dMy).nullish().describe("VATEX exemption reason code (BT-121). Not allowed with Z."),exemption_reason:e.string().min(1).max(uMy).nullish().describe("Exemption reason text (BT-120). Not allowed with Z.")}).describe("EN 16931 VAT category override for a line without VAT charged."),e.null()]).optional(),italy:e.union([e.object({nature:e.enum(["N2.1","N2.2","N3.1","N3.2"]).describe("Supported zero-VAT treatment: N2.1 territorial exclusion, N2.2 flat-rate (RF19) operations, N3.1 exports, N3.2 intra-community supplies. N2.2 is only accepted for an RF19 (regime forfettario) seller invoicing a domestic Italian buyer; ordinary RF01 sellers, and RF19 sellers invoicing a foreign buyer, must use N2.1/N3.1/N3.2 instead. Other special/exempt treatments are not supported and must not be relabelled."),legal_reference:e.string().min(1).max(cMy).describe("Actual legal basis for this zero-VAT operation, emitted as RiferimentoNormativo.")}),e.null()]).optional(),hungary:e.object({vat_treatment:e.union([e.object({type:e.enum(["exemption"]),case:e.enum(["AAM","TAM","KBAET","KBAUK","EAM","NAM"]).describe("NAV VAT exemption case code (invoiceData.xsd `VatExemptionCaseType`)."),reason:e.string().min(1).max(pMy).describe("Free-text justification for the exemption/out-of-scope case (invoiceData.xsd DetailedReasonType.reason, common:SimpleText200NotBlankType: max 200 characters, non-blank).")}),e.object({type:e.enum(["out_of_scope"]),case:e.enum(["ATK","EUFAD37","EUFADE","EUE","HO"]).describe("NAV out-of-scope VAT case code (invoiceData.xsd `VatOutOfScopeCaseType`)."),reason:e.string().min(1).max(mMy).describe("Free-text justification for the exemption/out-of-scope case (invoiceData.xsd DetailedReasonType.reason, common:SimpleText200NotBlankType: max 200 characters, non-blank).")}),e.object({type:e.enum(["domestic_reverse_charge"])}),e.object({type:e.enum(["no_vat_charge"])}),e.null()]).optional().describe("Explicit Hungarian NAV VAT treatment for a document line, required whenever a line has no positive, non-reverse-charge VAT percentage. Never auto-derived from transaction_type, customer country, or product classification.")}).nullish().describe("Hungary-specific line-level e-invoicing options for NAV reporting. `vat_treatment` is required whenever the line has no positive, non-reverse-charge VAT percentage; NAV country validation itself is enforced elsewhere, not by this schema.")}).describe("Line-level e-invoicing options. `unit_code` overrides only XML unit output; the line `unit` field remains the display unit. `vat_category` overrides the derived EN 16931 VAT category in XRechnung and ZUGFeRD exports. `hungary` carries NAV-specific reporting input."),e.null()]).optional().describe("Default line-level e-invoicing options for document lines created from this saved item."),tax_ids:e.array(e.string().max(xMy)),categories:e.array(e.string().max(gMy)).optional().describe("Free-form groupings used to filter the catalog, typically shown as chips at a point of sale. An item can belong to several. Distinct from `financial_category_id` (accounting) and `classification` (e-invoicing). Empty when the item is in none."),track_inventory:e.boolean().optional().describe("Whether stock tracking is enabled for this item. When true, inventory movements can be recorded and invoicing this item records automatic `sale` movements."),sku:e.string().nullish().describe("Stock-keeping unit, free-form and merchant-defined."),usage:e.union([e.literal("sale"),e.literal("purchase"),e.literal(null)]).nullish().describe("What the item is used for: `sale` (shown when picking items for sales documents), `purchase` (shown when picking items for expenses and purchase orders), or null for both."),barcode:e.string().nullish().describe("GTIN/EAN/UPC barcode"),purchase_price:e.number().nullish().describe("Net purchase price per unit in the entity's currency major unit. Used as the default `unit_cost` for inbound inventory movements when none is given."),total_tax:e.number().min(yMy).max(OMy),entity_id:e.string().max(vMy),financial_category_id:e.string().nullish().describe("Default financial category for this item. In v1 only income categories can be assigned."),metadata:e.union([e.string(),e.number(),e.boolean(),e.null(),e.record(e.string(),e.unknown()),e.array(e.unknown())]),translations:e.object({name:e.object({"en-US":e.string().max(SMy).optional(),"de-DE":e.string().max(hMy).optional(),"it-IT":e.string().max(bMy).optional(),"fr-FR":e.string().max(zMy).optional(),"es-ES":e.string().max(fMy).optional(),"sl-SI":e.string().max(BMy).optional(),"pt-PT":e.string().max(TMy).optional(),"nl-NL":e.string().max(IMy).optional(),"pl-PL":e.string().max(EMy).optional(),"hr-HR":e.string().max(DMy).optional(),"sv-SE":e.string().max(RMy).optional(),"fi-FI":e.string().max(_My).optional(),"et-EE":e.string().max(NMy).optional(),"bg-BG":e.string().max(MMy).optional(),"cs-CZ":e.string().max(UMy).optional(),"sk-SK":e.string().max(PMy).optional(),"nb-NO":e.string().max(CMy).optional(),"is-IS":e.string().max(wMy).optional(),"hu-HU":e.string().max(AMy).optional()}).optional().describe("Translated user-authored document content keyed by full supported locales such as `de-DE`. Values may be empty strings to intentionally blank content for a locale."),description:e.object({"en-US":e.string().max(FMy).optional(),"de-DE":e.string().max(kMy).optional(),"it-IT":e.string().max(jMy).optional(),"fr-FR":e.string().max(HMy).optional(),"es-ES":e.string().max(LMy).optional(),"sl-SI":e.string().max(GMy).optional(),"pt-PT":e.string().max(VMy).optional(),"nl-NL":e.string().max(KMy).optional(),"pl-PL":e.string().max(ZMy).optional(),"hr-HR":e.string().max(qMy).optional(),"sv-SE":e.string().max(WMy).optional(),"fi-FI":e.string().max(YMy).optional(),"et-EE":e.string().max($My).optional(),"bg-BG":e.string().max(QMy).optional(),"cs-CZ":e.string().max(JMy).optional(),"sk-SK":e.string().max(XMy).optional(),"nb-NO":e.string().max(eUy).optional(),"is-IS":e.string().max(tUy).optional(),"hu-HU":e.string().max(nUy).optional()}).optional().describe("Translated user-authored document content keyed by full supported locales such as `de-DE`. Values may be empty strings to intentionally blank content for a locale.")}).describe("Translated user-authored line-item content keyed by full supported locales. Empty string intentionally blanks the field for that locale."),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")}),bxS=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.")}),zxS=e.object({data:e.array(e.string())}),fxS=e.object({format:e.enum(["csv","xlsx"]).describe("Template file format."),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("hu"),e.literal(null)]).nullish().describe("Language for the example row's free-text values (name, description, unit, category). Defaults to the entity locale when omitted. Column headers are always the English identifiers documented below.")}),BxS=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.")}),TxS=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.")}),IxS=e.object({file:e.custom(d=>typeof File<"u"&&d instanceof File,"Input not instance of File").describe("CSV or XLSX file to import")}),ExS=e.object({total_rows:e.number(),created:e.number(),updated:e.number(),skipped:e.number(),errors:e.number(),stock_movements:e.number().describe("Number of rows with starting stock to record as `adjustment_in` movements (0 when nothing to commit). For a preview, these are planned movements that would be created on commit; the movements themselves are only written once `committed` is true."),committed:e.boolean().describe("false for a preview; true once the commit endpoint has written the changes."),rows:e.array(e.object({row:e.number().describe("1-based data row number (header row is not counted)."),sku:e.string().nullable(),name:e.string().nullable(),action:e.enum(["create","update","skip","error"]).describe("What this row did (or would do) to the item catalog."),stock:e.enum(["create","skip","none"]).describe("What this row did (or would do) to starting stock."),messages:e.array(e.string()).describe("Human-readable notes and errors for this row.")}))}),DxS=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.")}),RxS=e.object({file:e.custom(d=>typeof File<"u"&&d instanceof File,"Input not instance of File").describe("CSV or XLSX file to import")}),_xS=e.object({total_rows:e.number(),created:e.number(),updated:e.number(),skipped:e.number(),errors:e.number(),stock_movements:e.number().describe("Number of rows with starting stock to record as `adjustment_in` movements (0 when nothing to commit). For a preview, these are planned movements that would be created on commit; the movements themselves are only written once `committed` is true."),committed:e.boolean().describe("false for a preview; true once the commit endpoint has written the changes."),rows:e.array(e.object({row:e.number().describe("1-based data row number (header row is not counted)."),sku:e.string().nullable(),name:e.string().nullable(),action:e.enum(["create","update","skip","error"]).describe("What this row did (or would do) to the item catalog."),stock:e.enum(["create","skip","none"]).describe("What this row did (or would do) to starting stock."),messages:e.array(e.string()).describe("Human-readable notes and errors for this row.")}))}),sUy=/^[a-z]{3,4}_[0-9a-f]{24}$/,NxS=e.object({id:e.stringFormat("resource-id",sUy).describe("Unique resource identifier. Prefix depends on the resource, for example inv_, cus_, or ent_.")}),MxS=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.")}),oUy=2e3,iUy=8,aUy=/^VATEX-[A-Z0-9-]{2,24}$/,rUy=500,lUy=100,dUy=200,uUy=200,cUy=36,pUy=100,mUy=100,xUy=50,gUy=0,yUy=500,OUy=500,vUy=500,SUy=500,hUy=500,bUy=500,zUy=500,fUy=500,BUy=500,TUy=500,IUy=500,EUy=500,DUy=500,RUy=500,_Uy=500,NUy=500,MUy=500,UUy=500,PUy=500,CUy=2e3,wUy=2e3,AUy=2e3,FUy=2e3,kUy=2e3,jUy=2e3,HUy=2e3,LUy=2e3,GUy=2e3,VUy=2e3,KUy=2e3,ZUy=2e3,qUy=2e3,WUy=2e3,YUy=2e3,$Uy=2e3,QUy=2e3,JUy=2e3,XUy=2e3,ePy=200,tPy=0,nPy=100,sPy=50,oPy=2,UxS=e.object({name:e.string().min(1).optional(),description:e.string().max(oUy).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 in the item's currency major unit; for EUR, `29.90` means \u20AC29.90, not 2,990 cents. Provide either price OR gross_price, not both."),gross_price:e.number().optional().describe("Gross price per unit including tax in the item's currency major unit; for EUR, `29.90` means \u20AC29.90, not 2,990 cents. If provided, net price is calculated. Provide either price OR gross_price, not both."),unit:e.string().nullish().describe("Default display unit for document lines created from this saved item."),e_invoicing:e.union([e.object({unit_code:e.string().min(1).max(iUy).nullish().describe("Optional XML unit-code override for e-SLOG, Peppol, XRechnung, and ZUGFeRD output. Use a supported UN/ECE Rec 20 / Rec 21 code such as C62, HUR, MGM, MLT, or SET."),vat_category:e.union([e.object({code:e.enum(["Z","E","AE","K","G"]).describe("EN 16931 VAT category code: K, AE, G, E or Z."),exemption_reason_code:e.string().regex(aUy).nullish().describe("VATEX exemption reason code (BT-121). Not allowed with Z."),exemption_reason:e.string().min(1).max(rUy).nullish().describe("Exemption reason text (BT-120). Not allowed with Z.")}).describe("EN 16931 VAT category override for a line without VAT charged."),e.null()]).optional(),italy:e.union([e.object({nature:e.enum(["N2.1","N2.2","N3.1","N3.2"]).describe("Supported zero-VAT treatment: N2.1 territorial exclusion, N2.2 flat-rate (RF19) operations, N3.1 exports, N3.2 intra-community supplies. N2.2 is only accepted for an RF19 (regime forfettario) seller invoicing a domestic Italian buyer; ordinary RF01 sellers, and RF19 sellers invoicing a foreign buyer, must use N2.1/N3.1/N3.2 instead. Other special/exempt treatments are not supported and must not be relabelled."),legal_reference:e.string().min(1).max(lUy).describe("Actual legal basis for this zero-VAT operation, emitted as RiferimentoNormativo.")}),e.null()]).optional(),hungary:e.object({vat_treatment:e.union([e.object({type:e.enum(["exemption"]),case:e.enum(["AAM","TAM","KBAET","KBAUK","EAM","NAM"]).describe("NAV VAT exemption case code (invoiceData.xsd `VatExemptionCaseType`)."),reason:e.string().min(1).max(dUy).describe("Free-text justification for the exemption/out-of-scope case (invoiceData.xsd DetailedReasonType.reason, common:SimpleText200NotBlankType: max 200 characters, non-blank).")}),e.object({type:e.enum(["out_of_scope"]),case:e.enum(["ATK","EUFAD37","EUFADE","EUE","HO"]).describe("NAV out-of-scope VAT case code (invoiceData.xsd `VatOutOfScopeCaseType`)."),reason:e.string().min(1).max(uUy).describe("Free-text justification for the exemption/out-of-scope case (invoiceData.xsd DetailedReasonType.reason, common:SimpleText200NotBlankType: max 200 characters, non-blank).")}),e.object({type:e.enum(["domestic_reverse_charge"])}),e.object({type:e.enum(["no_vat_charge"])}),e.null()]).optional().describe("Explicit Hungarian NAV VAT treatment for a document line, required whenever a line has no positive, non-reverse-charge VAT percentage. Never auto-derived from transaction_type, customer country, or product classification.")}).nullish().describe("Hungary-specific line-level e-invoicing options for NAV reporting. `vat_treatment` is required whenever the line has no positive, non-reverse-charge VAT percentage; NAV country validation itself is enforced elsewhere, not by this schema.")}).describe("Line-level e-invoicing options. `unit_code` overrides only XML unit output; the line `unit` field remains the display unit. `vat_category` overrides the derived EN 16931 VAT category in XRechnung and ZUGFeRD exports. `hungary` carries NAV-specific reporting input."),e.null()]).optional().describe("Default line-level e-invoicing options for document lines created from this saved item."),tax_ids:e.array(e.string().max(cUy)).optional(),categories:e.array(e.string().max(pUy)).nullish().describe("Free-form groupings used to filter the catalog. Values are trimmed, lower-cased and de-duplicated on write. Omit or send null for none; on update, null clears the list."),track_inventory:e.boolean().nullish().describe("Opt in to stock tracking for this item. When enabled, inventory movements can be recorded and finalizing an invoice with this item automatically records a `sale` movement. Omit or send null for false."),sku:e.string().max(mUy).nullish().describe("Stock-keeping unit, free-form and merchant-defined. Omit or send null for none."),usage:e.union([e.literal("sale"),e.literal("purchase"),e.literal(null)]).nullish().describe("What the item is used for: `sale` (shown when picking items for sales documents), `purchase` (shown when picking items for expenses and purchase orders). Omit to keep the current value; send null to clear it so the item is used for both."),barcode:e.string().max(xUy).nullish().describe("GTIN/EAN/UPC barcode. Omit or send null for none."),purchase_price:e.number().min(gUy).nullish().describe("Net purchase price per unit in the entity's currency major unit. Used as the default `unit_cost` for inbound inventory movements when none is given. Omit or send null for none."),financial_category_id:e.string().nullish().describe("Default financial category for this item. In v1 only income categories can be assigned."),metadata:e.record(e.string(),e.string()).refine(d=>Object.keys(d).length<=50,"Metadata can have maximum 50 properties").nullish().describe("Custom string key-value data for your own use, with up to 50 properties. Keys are opaque and may contain periods. Useful for storing external IDs, tags, or integration data."),translations:e.union([e.object({name:e.object({"en-US":e.string().max(yUy).nullish(),"de-DE":e.string().max(OUy).nullish(),"it-IT":e.string().max(vUy).nullish(),"fr-FR":e.string().max(SUy).nullish(),"es-ES":e.string().max(hUy).nullish(),"sl-SI":e.string().max(bUy).nullish(),"pt-PT":e.string().max(zUy).nullish(),"nl-NL":e.string().max(fUy).nullish(),"pl-PL":e.string().max(BUy).nullish(),"hr-HR":e.string().max(TUy).nullish(),"sv-SE":e.string().max(IUy).nullish(),"fi-FI":e.string().max(EUy).nullish(),"et-EE":e.string().max(DUy).nullish(),"bg-BG":e.string().max(RUy).nullish(),"cs-CZ":e.string().max(_Uy).nullish(),"sk-SK":e.string().max(NUy).nullish(),"nb-NO":e.string().max(MUy).nullish(),"is-IS":e.string().max(UUy).nullish(),"hu-HU":e.string().max(PUy).nullish()}).nullish().describe("Translated user-authored document content keyed by full supported locales such as `de-DE`. Values may be empty strings to intentionally blank content for a locale."),description:e.object({"en-US":e.string().max(CUy).nullish(),"de-DE":e.string().max(wUy).nullish(),"it-IT":e.string().max(AUy).nullish(),"fr-FR":e.string().max(FUy).nullish(),"es-ES":e.string().max(kUy).nullish(),"sl-SI":e.string().max(jUy).nullish(),"pt-PT":e.string().max(HUy).nullish(),"nl-NL":e.string().max(LUy).nullish(),"pl-PL":e.string().max(GUy).nullish(),"hr-HR":e.string().max(VUy).nullish(),"sv-SE":e.string().max(KUy).nullish(),"fi-FI":e.string().max(ZUy).nullish(),"et-EE":e.string().max(qUy).nullish(),"bg-BG":e.string().max(WUy).nullish(),"cs-CZ":e.string().max(YUy).nullish(),"sk-SK":e.string().max($Uy).nullish(),"nb-NO":e.string().max(QUy).nullish(),"is-IS":e.string().max(JUy).nullish(),"hu-HU":e.string().max(XUy).nullish()}).nullish().describe("Translated user-authored document content keyed by full supported locales such as `de-DE`. Values may be empty strings to intentionally blank content for a locale.")}).describe("Translated user-authored line-item content accepted on create and update. Same shape as `DocumentItemTranslations`; an explicit `null` for a field or a locale is treated as omitted."),e.null()]).optional().describe("Translated catalog-item content. Set to null to clear all translations."),financial_category_key:e.string().max(ePy).nullish().describe("Key of the default financial category (for example `office-supplies`), as an alternative to `financial_category_id`. Provide either, not both. On create a null value counts as not provided; on update null clears the default, and sending both fields is rejected."),taxes:e.array(e.object({rate:e.number().min(tPy).max(nPy).optional().describe("Tax rate percentage. Either rate or classification must be provided."),classification:e.string().max(sPy).optional().describe("Tax classification to lookup existing tax. Either rate or classification must be provided.")})).max(oPy).nullish().describe("Taxes for the item. Provide rate to auto-create, or classification to lookup existing tax.")}),iPy=36,aPy=500,rPy=2e3,lPy=8,dPy=/^VATEX-[A-Z0-9-]{2,24}$/,uPy=500,cPy=100,pPy=200,mPy=200,xPy=36,gPy=100,yPy=-140737488355328,OPy=0x7fffffffffff,vPy=36,SPy=500,hPy=500,bPy=500,zPy=500,fPy=500,BPy=500,TPy=500,IPy=500,EPy=500,DPy=500,RPy=500,_Py=500,NPy=500,MPy=500,UPy=500,PPy=500,CPy=500,wPy=500,APy=500,FPy=2e3,kPy=2e3,jPy=2e3,HPy=2e3,LPy=2e3,GPy=2e3,VPy=2e3,KPy=2e3,ZPy=2e3,qPy=2e3,WPy=2e3,YPy=2e3,$Py=2e3,QPy=2e3,JPy=2e3,XPy=2e3,e2y=2e3,t2y=2e3,n2y=2e3,PxS=e.object({id:e.string().max(iPy),name:e.string().max(aPy),description:e.string().max(rPy).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."),price_with_tax:e.number().describe("Per-unit price including tax. Stored for fast B2C/POS display regardless of input mode."),unit:e.string().nullish().describe("Default display unit for document lines created from this saved item."),e_invoicing:e.union([e.object({unit_code:e.string().min(1).max(lPy).nullish().describe("Optional XML unit-code override for e-SLOG, Peppol, XRechnung, and ZUGFeRD output. Use a supported UN/ECE Rec 20 / Rec 21 code such as C62, HUR, MGM, MLT, or SET."),vat_category:e.union([e.object({code:e.enum(["Z","E","AE","K","G"]).describe("EN 16931 VAT category code: K, AE, G, E or Z."),exemption_reason_code:e.string().regex(dPy).nullish().describe("VATEX exemption reason code (BT-121). Not allowed with Z."),exemption_reason:e.string().min(1).max(uPy).nullish().describe("Exemption reason text (BT-120). Not allowed with Z.")}).describe("EN 16931 VAT category override for a line without VAT charged."),e.null()]).optional(),italy:e.union([e.object({nature:e.enum(["N2.1","N2.2","N3.1","N3.2"]).describe("Supported zero-VAT treatment: N2.1 territorial exclusion, N2.2 flat-rate (RF19) operations, N3.1 exports, N3.2 intra-community supplies. N2.2 is only accepted for an RF19 (regime forfettario) seller invoicing a domestic Italian buyer; ordinary RF01 sellers, and RF19 sellers invoicing a foreign buyer, must use N2.1/N3.1/N3.2 instead. Other special/exempt treatments are not supported and must not be relabelled."),legal_reference:e.string().min(1).max(cPy).describe("Actual legal basis for this zero-VAT operation, emitted as RiferimentoNormativo.")}),e.null()]).optional(),hungary:e.object({vat_treatment:e.union([e.object({type:e.enum(["exemption"]),case:e.enum(["AAM","TAM","KBAET","KBAUK","EAM","NAM"]).describe("NAV VAT exemption case code (invoiceData.xsd `VatExemptionCaseType`)."),reason:e.string().min(1).max(pPy).describe("Free-text justification for the exemption/out-of-scope case (invoiceData.xsd DetailedReasonType.reason, common:SimpleText200NotBlankType: max 200 characters, non-blank).")}),e.object({type:e.enum(["out_of_scope"]),case:e.enum(["ATK","EUFAD37","EUFADE","EUE","HO"]).describe("NAV out-of-scope VAT case code (invoiceData.xsd `VatOutOfScopeCaseType`)."),reason:e.string().min(1).max(mPy).describe("Free-text justification for the exemption/out-of-scope case (invoiceData.xsd DetailedReasonType.reason, common:SimpleText200NotBlankType: max 200 characters, non-blank).")}),e.object({type:e.enum(["domestic_reverse_charge"])}),e.object({type:e.enum(["no_vat_charge"])}),e.null()]).optional().describe("Explicit Hungarian NAV VAT treatment for a document line, required whenever a line has no positive, non-reverse-charge VAT percentage. Never auto-derived from transaction_type, customer country, or product classification.")}).nullish().describe("Hungary-specific line-level e-invoicing options for NAV reporting. `vat_treatment` is required whenever the line has no positive, non-reverse-charge VAT percentage; NAV country validation itself is enforced elsewhere, not by this schema.")}).describe("Line-level e-invoicing options. `unit_code` overrides only XML unit output; the line `unit` field remains the display unit. `vat_category` overrides the derived EN 16931 VAT category in XRechnung and ZUGFeRD exports. `hungary` carries NAV-specific reporting input."),e.null()]).optional().describe("Default line-level e-invoicing options for document lines created from this saved item."),tax_ids:e.array(e.string().max(xPy)),categories:e.array(e.string().max(gPy)).optional().describe("Free-form groupings used to filter the catalog, typically shown as chips at a point of sale. An item can belong to several. Distinct from `financial_category_id` (accounting) and `classification` (e-invoicing). Empty when the item is in none."),track_inventory:e.boolean().optional().describe("Whether stock tracking is enabled for this item. When true, inventory movements can be recorded and invoicing this item records automatic `sale` movements."),sku:e.string().nullish().describe("Stock-keeping unit, free-form and merchant-defined."),usage:e.union([e.literal("sale"),e.literal("purchase"),e.literal(null)]).nullish().describe("What the item is used for: `sale` (shown when picking items for sales documents), `purchase` (shown when picking items for expenses and purchase orders), or null for both."),barcode:e.string().nullish().describe("GTIN/EAN/UPC barcode"),purchase_price:e.number().nullish().describe("Net purchase price per unit in the entity's currency major unit. Used as the default `unit_cost` for inbound inventory movements when none is given."),total_tax:e.number().min(yPy).max(OPy),entity_id:e.string().max(vPy),financial_category_id:e.string().nullish().describe("Default financial category for this item. In v1 only income categories can be assigned."),metadata:e.union([e.string(),e.number(),e.boolean(),e.null(),e.record(e.string(),e.unknown()),e.array(e.unknown())]),translations:e.object({name:e.object({"en-US":e.string().max(SPy).optional(),"de-DE":e.string().max(hPy).optional(),"it-IT":e.string().max(bPy).optional(),"fr-FR":e.string().max(zPy).optional(),"es-ES":e.string().max(fPy).optional(),"sl-SI":e.string().max(BPy).optional(),"pt-PT":e.string().max(TPy).optional(),"nl-NL":e.string().max(IPy).optional(),"pl-PL":e.string().max(EPy).optional(),"hr-HR":e.string().max(DPy).optional(),"sv-SE":e.string().max(RPy).optional(),"fi-FI":e.string().max(_Py).optional(),"et-EE":e.string().max(NPy).optional(),"bg-BG":e.string().max(MPy).optional(),"cs-CZ":e.string().max(UPy).optional(),"sk-SK":e.string().max(PPy).optional(),"nb-NO":e.string().max(CPy).optional(),"is-IS":e.string().max(wPy).optional(),"hu-HU":e.string().max(APy).optional()}).optional().describe("Translated user-authored document content keyed by full supported locales such as `de-DE`. Values may be empty strings to intentionally blank content for a locale."),description:e.object({"en-US":e.string().max(FPy).optional(),"de-DE":e.string().max(kPy).optional(),"it-IT":e.string().max(jPy).optional(),"fr-FR":e.string().max(HPy).optional(),"es-ES":e.string().max(LPy).optional(),"sl-SI":e.string().max(GPy).optional(),"pt-PT":e.string().max(VPy).optional(),"nl-NL":e.string().max(KPy).optional(),"pl-PL":e.string().max(ZPy).optional(),"hr-HR":e.string().max(qPy).optional(),"sv-SE":e.string().max(WPy).optional(),"fi-FI":e.string().max(YPy).optional(),"et-EE":e.string().max($Py).optional(),"bg-BG":e.string().max(QPy).optional(),"cs-CZ":e.string().max(JPy).optional(),"sk-SK":e.string().max(XPy).optional(),"nb-NO":e.string().max(e2y).optional(),"is-IS":e.string().max(t2y).optional(),"hu-HU":e.string().max(n2y).optional()}).optional().describe("Translated user-authored document content keyed by full supported locales such as `de-DE`. Values may be empty strings to intentionally blank content for a locale.")}).describe("Translated user-authored line-item content keyed by full supported locales. Empty string intentionally blanks the field for that locale."),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"),s2y=/^[a-z]{3,4}_[0-9a-f]{24}$/,CxS=e.object({id:e.stringFormat("resource-id",s2y).describe("Unique resource identifier. Prefix depends on the resource, for example inv_, cus_, or ent_.")}),wxS=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.")}),o2y=/^[a-z]{3,4}_[0-9a-f]{24}$/,AxS=e.object({id:e.stringFormat("resource-id",o2y).describe("Unique resource identifier. Prefix depends on the resource, for example inv_, cus_, or ent_.")}),FxS=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.")}),i2y=36,a2y=500,r2y=2e3,l2y=8,d2y=/^VATEX-[A-Z0-9-]{2,24}$/,u2y=500,c2y=100,p2y=200,m2y=200,x2y=36,g2y=100,y2y=-140737488355328,O2y=0x7fffffffffff,v2y=36,S2y=500,h2y=500,b2y=500,z2y=500,f2y=500,B2y=500,T2y=500,I2y=500,E2y=500,D2y=500,R2y=500,_2y=500,N2y=500,M2y=500,U2y=500,P2y=500,C2y=500,w2y=500,A2y=500,F2y=2e3,k2y=2e3,j2y=2e3,H2y=2e3,L2y=2e3,G2y=2e3,V2y=2e3,K2y=2e3,Z2y=2e3,q2y=2e3,W2y=2e3,Y2y=2e3,$2y=2e3,Q2y=2e3,J2y=2e3,X2y=2e3,eCy=2e3,tCy=2e3,nCy=2e3,kxS=e.object({id:e.string().max(i2y),name:e.string().max(a2y),description:e.string().max(r2y).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."),price_with_tax:e.number().describe("Per-unit price including tax. Stored for fast B2C/POS display regardless of input mode."),unit:e.string().nullish().describe("Default display unit for document lines created from this saved item."),e_invoicing:e.union([e.object({unit_code:e.string().min(1).max(l2y).nullish().describe("Optional XML unit-code override for e-SLOG, Peppol, XRechnung, and ZUGFeRD output. Use a supported UN/ECE Rec 20 / Rec 21 code such as C62, HUR, MGM, MLT, or SET."),vat_category:e.union([e.object({code:e.enum(["Z","E","AE","K","G"]).describe("EN 16931 VAT category code: K, AE, G, E or Z."),exemption_reason_code:e.string().regex(d2y).nullish().describe("VATEX exemption reason code (BT-121). Not allowed with Z."),exemption_reason:e.string().min(1).max(u2y).nullish().describe("Exemption reason text (BT-120). Not allowed with Z.")}).describe("EN 16931 VAT category override for a line without VAT charged."),e.null()]).optional(),italy:e.union([e.object({nature:e.enum(["N2.1","N2.2","N3.1","N3.2"]).describe("Supported zero-VAT treatment: N2.1 territorial exclusion, N2.2 flat-rate (RF19) operations, N3.1 exports, N3.2 intra-community supplies. N2.2 is only accepted for an RF19 (regime forfettario) seller invoicing a domestic Italian buyer; ordinary RF01 sellers, and RF19 sellers invoicing a foreign buyer, must use N2.1/N3.1/N3.2 instead. Other special/exempt treatments are not supported and must not be relabelled."),legal_reference:e.string().min(1).max(c2y).describe("Actual legal basis for this zero-VAT operation, emitted as RiferimentoNormativo.")}),e.null()]).optional(),hungary:e.object({vat_treatment:e.union([e.object({type:e.enum(["exemption"]),case:e.enum(["AAM","TAM","KBAET","KBAUK","EAM","NAM"]).describe("NAV VAT exemption case code (invoiceData.xsd `VatExemptionCaseType`)."),reason:e.string().min(1).max(p2y).describe("Free-text justification for the exemption/out-of-scope case (invoiceData.xsd DetailedReasonType.reason, common:SimpleText200NotBlankType: max 200 characters, non-blank).")}),e.object({type:e.enum(["out_of_scope"]),case:e.enum(["ATK","EUFAD37","EUFADE","EUE","HO"]).describe("NAV out-of-scope VAT case code (invoiceData.xsd `VatOutOfScopeCaseType`)."),reason:e.string().min(1).max(m2y).describe("Free-text justification for the exemption/out-of-scope case (invoiceData.xsd DetailedReasonType.reason, common:SimpleText200NotBlankType: max 200 characters, non-blank).")}),e.object({type:e.enum(["domestic_reverse_charge"])}),e.object({type:e.enum(["no_vat_charge"])}),e.null()]).optional().describe("Explicit Hungarian NAV VAT treatment for a document line, required whenever a line has no positive, non-reverse-charge VAT percentage. Never auto-derived from transaction_type, customer country, or product classification.")}).nullish().describe("Hungary-specific line-level e-invoicing options for NAV reporting. `vat_treatment` is required whenever the line has no positive, non-reverse-charge VAT percentage; NAV country validation itself is enforced elsewhere, not by this schema.")}).describe("Line-level e-invoicing options. `unit_code` overrides only XML unit output; the line `unit` field remains the display unit. `vat_category` overrides the derived EN 16931 VAT category in XRechnung and ZUGFeRD exports. `hungary` carries NAV-specific reporting input."),e.null()]).optional().describe("Default line-level e-invoicing options for document lines created from this saved item."),tax_ids:e.array(e.string().max(x2y)),categories:e.array(e.string().max(g2y)).optional().describe("Free-form groupings used to filter the catalog, typically shown as chips at a point of sale. An item can belong to several. Distinct from `financial_category_id` (accounting) and `classification` (e-invoicing). Empty when the item is in none."),track_inventory:e.boolean().optional().describe("Whether stock tracking is enabled for this item. When true, inventory movements can be recorded and invoicing this item records automatic `sale` movements."),sku:e.string().nullish().describe("Stock-keeping unit, free-form and merchant-defined."),usage:e.union([e.literal("sale"),e.literal("purchase"),e.literal(null)]).nullish().describe("What the item is used for: `sale` (shown when picking items for sales documents), `purchase` (shown when picking items for expenses and purchase orders), or null for both."),barcode:e.string().nullish().describe("GTIN/EAN/UPC barcode"),purchase_price:e.number().nullish().describe("Net purchase price per unit in the entity's currency major unit. Used as the default `unit_cost` for inbound inventory movements when none is given."),total_tax:e.number().min(y2y).max(O2y),entity_id:e.string().max(v2y),financial_category_id:e.string().nullish().describe("Default financial category for this item. In v1 only income categories can be assigned."),metadata:e.union([e.string(),e.number(),e.boolean(),e.null(),e.record(e.string(),e.unknown()),e.array(e.unknown())]),translations:e.object({name:e.object({"en-US":e.string().max(S2y).optional(),"de-DE":e.string().max(h2y).optional(),"it-IT":e.string().max(b2y).optional(),"fr-FR":e.string().max(z2y).optional(),"es-ES":e.string().max(f2y).optional(),"sl-SI":e.string().max(B2y).optional(),"pt-PT":e.string().max(T2y).optional(),"nl-NL":e.string().max(I2y).optional(),"pl-PL":e.string().max(E2y).optional(),"hr-HR":e.string().max(D2y).optional(),"sv-SE":e.string().max(R2y).optional(),"fi-FI":e.string().max(_2y).optional(),"et-EE":e.string().max(N2y).optional(),"bg-BG":e.string().max(M2y).optional(),"cs-CZ":e.string().max(U2y).optional(),"sk-SK":e.string().max(P2y).optional(),"nb-NO":e.string().max(C2y).optional(),"is-IS":e.string().max(w2y).optional(),"hu-HU":e.string().max(A2y).optional()}).optional().describe("Translated user-authored document content keyed by full supported locales such as `de-DE`. Values may be empty strings to intentionally blank content for a locale."),description:e.object({"en-US":e.string().max(F2y).optional(),"de-DE":e.string().max(k2y).optional(),"it-IT":e.string().max(j2y).optional(),"fr-FR":e.string().max(H2y).optional(),"es-ES":e.string().max(L2y).optional(),"sl-SI":e.string().max(G2y).optional(),"pt-PT":e.string().max(V2y).optional(),"nl-NL":e.string().max(K2y).optional(),"pl-PL":e.string().max(Z2y).optional(),"hr-HR":e.string().max(q2y).optional(),"sv-SE":e.string().max(W2y).optional(),"fi-FI":e.string().max(Y2y).optional(),"et-EE":e.string().max($2y).optional(),"bg-BG":e.string().max(Q2y).optional(),"cs-CZ":e.string().max(J2y).optional(),"sk-SK":e.string().max(X2y).optional(),"nb-NO":e.string().max(eCy).optional(),"is-IS":e.string().max(tCy).optional(),"hu-HU":e.string().max(nCy).optional()}).optional().describe("Translated user-authored document content keyed by full supported locales such as `de-DE`. Values may be empty strings to intentionally blank content for a locale.")}).describe("Translated user-authored line-item content keyed by full supported locales. Empty string intentionally blanks the field for that locale."),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"),sCy=/^[a-z]{3,4}_[0-9a-f]{24}$/,jxS=e.object({id:e.stringFormat("resource-id",sCy).describe("Unique resource identifier. Prefix depends on the resource, for example inv_, cus_, or ent_.")}),HxS=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.")}),oCy=/^[a-z]{3,4}_[0-9a-f]{24}$/,LxS=e.object({id:e.stringFormat("resource-id",oCy).describe("Unique resource identifier. Prefix depends on the resource, for example inv_, cus_, or ent_.")}),GxS=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.")}),VxS=e.object({item_id:e.string(),track_inventory:e.boolean(),quantity_on_hand:e.number().describe("Current stock on hand. May be negative if outbound movements outpaced recorded inbound stock."),total_value:e.number().describe("Remaining value of stock on hand, from FIFO cost layers."),average_unit_cost:e.number().nullable().describe("total_value / quantity_on_hand, or null when there is no stock on hand."),layers:e.array(e.object({movement_id:e.string(),occurred_at:e.iso.datetime({}),unit_cost:e.number(),quantity_remaining:e.number()})).describe("Current FIFO cost layers, oldest first."),warehouses:e.array(e.object({warehouse_id:e.string(),warehouse_name:e.string(),quantity_on_hand:e.number(),total_value:e.number().describe("Warehouse quantity \xD7 the entity's average cost. Cost layers are entity-level, not per-warehouse.")})).describe("Per-warehouse quantity and value. Includes every warehouse with a non-zero quantity, plus the entity's default warehouse even when empty.")}),iCy=/^[a-z]{3,4}_[0-9a-f]{24}$/,KxS=e.object({id:e.stringFormat("resource-id",iCy).describe("Unique resource identifier. Prefix depends on the resource, for example inv_, cus_, or ent_.")}),aCy=10,rCy=100,ZxS=e.object({limit:e.number().min(1).max(rCy).default(aCy).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."),warehouse_id:e.string().optional().describe("Filter to movements where this warehouse is the source or destination."),document_id:e.string().nullish().describe("Filter to movements generated automatically by this document (e.g. the invoice or credit note whose finalization recorded them). Movements created manually through this endpoint have no document and never match.")}),qxS=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.")}),WxS=e.object({data:e.array(e.object({id:e.string(),item_id:e.string(),type:e.enum(["purchase","sale","adjustment_in","adjustment_out","sale_return","write_off","transfer"]).describe("Movement type. Inbound: `purchase`, `sale_return`, `adjustment_in`. Outbound: `sale`, `adjustment_out`, `write_off`. `transfer` relocates quantity between warehouses and never touches cost layers. `purchase`, `sale` and `sale_return` are recorded automatically by finalizing an expense, invoice, or credit note, respectively, for a tracked item \u2014 they cannot be created manually."),quantity:e.number(),unit_cost:e.number().nullable(),cost_total:e.number().describe("Total cost for this movement. For inbound movements this is quantity \xD7 unit_cost; for outbound movements it is derived from the FIFO layers consumed."),occurred_at:e.iso.datetime({}),warehouse_id:e.string().describe("Warehouse this movement affects (source warehouse for `transfer`)."),destination_warehouse_id:e.string().nullable().describe("Destination warehouse for `transfer` movements; null otherwise."),source_movement_id:e.string().nullable().describe("For `sale_return`: the `sale` movement being reversed, when known."),source_document_id:e.string().nullable().describe("For `sale_return`: the invoice being reversed, used to derive cost when `source_movement_id` is unavailable."),document_id:e.string().nullable().describe("The document that generated this movement, when it was created automatically (e.g. an invoice)."),document_type:e.string().nullable().describe("The kind of document that generated this movement automatically, e.g. `invoice` (sale), `credit_note` (sale_return), or `expense` (purchase). Null for manually-recorded movements."),note:e.string().nullable(),created_at:e.iso.datetime({}),updated_at:e.iso.datetime({})})),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")}),lCy=/^[a-z]{3,4}_[0-9a-f]{24}$/,YxS=e.object({id:e.stringFormat("resource-id",lCy).describe("Unique resource identifier. Prefix depends on the resource, for example inv_, cus_, or ent_.")}),$xS=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.")}),dCy=0,uCy=0,cCy=500,QxS=e.object({type:e.enum(["adjustment_in","adjustment_out","write_off","transfer"]).describe("Movement type for manually-recorded movements. `purchase`, `sale` and `sale_return` are recorded automatically by finalizing an expense, invoice, or credit note, respectively, and cannot be created through this endpoint. Use `adjustment_in` (with `unit_cost`) for opening stock, stock counts, or returns received without a credit note."),quantity:e.number().gt(dCy).describe("Movement quantity. Always positive; direction is determined by `type`."),unit_cost:e.number().min(uCy).nullish().describe("Per-unit cost in the entity's currency major unit. Required for `adjustment_in` unless the item has a `purchase_price`; ignored (forced to null) for outbound movements and `transfer`, whose cost is derived from FIFO layers."),occurred_at:e.iso.datetime({}).nullish().describe("When the movement occurred (ISO 8601 datetime with offset). Defaults to now."),warehouse_id:e.string().nullish().describe("Warehouse this movement affects (source warehouse for `transfer`). Omitted resolves to the business unit's default warehouse (if configured) or the entity's default warehouse, created on demand."),destination_warehouse_id:e.string().nullish().describe("Required for `transfer`: the warehouse quantity moves into. Must differ from `warehouse_id`."),note:e.string().max(cCy).nullish().describe("Optional free-text note about this movement.")}),pCy=/^[a-z]{3,4}_[0-9a-f]{24}$/,mCy=/^[a-z]{3,4}_[0-9a-f]{24}$/,JxS=e.object({id:e.stringFormat("resource-id",pCy).describe("Unique resource identifier. Prefix depends on the resource, for example inv_, cus_, or ent_."),movementId:e.stringFormat("resource-id",mCy).describe("Inventory movement identifier.")}),XxS=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 pt={};W(pt,{CreateMigrationJobBody:()=>lgS,CreateMigrationJobHeader:()=>rgS,GetLegacyMigrationOrganizationHeader:()=>igS,GetLegacyMigrationOrganizationParams:()=>sgS,GetLegacyMigrationOrganizationQueryParams:()=>ogS,GetLegacyMigrationOrganizationResponse:()=>agS,GetMigrationJobHeader:()=>pgS,GetMigrationJobParams:()=>cgS,GetMigrationJobResponse:()=>mgS,LegacyMigrationAuthBody:()=>tgS,LegacyMigrationAuthHeader:()=>egS,LegacyMigrationAuthResponse:()=>ngS,ListMigrationJobsHeader:()=>dgS,ListMigrationJobsResponse:()=>ugS,createMigrationJobHeaderXAccountIdRegExp:()=>yCy,getLegacyMigrationOrganizationHeaderXAccountIdRegExp:()=>gCy,getMigrationJobHeaderXAccountIdRegExp:()=>vCy,legacyMigrationAuthHeaderXAccountIdRegExp:()=>xCy,listMigrationJobsHeaderXAccountIdRegExp:()=>OCy});var xCy=/^acc_[0-9a-fA-F]{24}$/,egS=e.object({"x-account-id":e.string().regex(xCy).optional().describe("Account Id on which the request is made. Optional if user is part of only one account.")}),tgS=e.object({email:e.email().describe("Email for legacy Space Invoices account"),password:e.string().min(1).describe("Password for legacy Space Invoices account")}),ngS=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")}),sgS=e.object({legacyOrgId:e.string().describe("Legacy organization ID")}),ogS=e.object({legacy_session_id:e.string().min(1).describe("Temporary legacy session ID created after legacy authentication")}),gCy=/^acc_[0-9a-fA-F]{24}$/,igS=e.object({"x-account-id":e.string().regex(gCy).optional().describe("Account Id on which the request is made. Optional if user is part of only one account.")}),agS=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"),unsupported:e.array(e.object({code:e.enum(["fiscalization_series","accounting_categories","inventory_and_pricing","sales_integrations","webhooks"]).describe("Unsupported migration warning code"),label:e.string().describe("User-facing label for the unsupported data group"),description:e.string().describe("Explanation of what must be set up manually"),count:e.number().describe("Records still requiring manual follow-up after migration"),collections:e.array(e.string()).describe("Legacy collections covered by the warning group"),coverage:e.object({migratable_count:e.number().describe("Records that can be migrated automatically"),total_count:e.number().describe("Total relevant legacy records detected")}).optional().describe("Optional automatic migration coverage details for partially supported groups")})).describe("Unsupported legacy data groups that require confirmation before migration"),requires_confirmation:e.boolean().describe("Whether the user must confirm migration despite unsupported legacy data"),subscription_review:e.object({legacy_subscription:e.object({gateway:e.enum(["braintree","bank","paypal","unknown"]),tier:e.number(),plan_name:e.string(),duration_months:e.number(),additions:e.array(e.string()),active_until:e.string().nullable(),price_cents:e.number().nullable()}).nullable(),recommended_plan:e.object({slug:e.string(),name:e.string(),billing_interval:e.enum(["monthly","yearly"]),price_cents:e.number(),base_price_cents:e.number(),extra_store_count:e.number(),extra_store_price_cents:e.number(),reasons:e.array(e.string())}).nullable(),trial_offer:e.object({eligible:e.boolean(),trial_days:e.number()}),price_difference_cents:e.number().nullable(),renewal_payment_provider:e.union([e.literal("braintree"),e.literal("bank"),e.literal("paypal"),e.literal("unknown"),e.literal(null)]).nullable(),requires_payment_method_update:e.boolean(),usage_signals:e.object({member_count:e.number(),recurring_count:e.number(),sales_integrations_count:e.number(),billable_store_count:e.number(),business_units_count:e.number(),financial_categories_count:e.number(),has_furs:e.boolean()})}).nullable().describe("Legacy subscription snapshot and recommended Apollo white-label plan for this organization")}),yCy=/^acc_[0-9a-fA-F]{24}$/,rgS=e.object({"x-account-id":e.string().regex(yCy).optional().describe("Account Id on which the request is made. Optional if user is part of only one account.")}),lgS=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")}),OCy=/^acc_[0-9a-fA-F]{24}$/,dgS=e.object({"x-account-id":e.string().regex(OCy).optional().describe("Account Id on which the request is made. Optional if user is part of only one account.")}),ugS=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")}))}),cgS=e.object({id:e.string().describe("Migration job ID")}),vCy=/^acc_[0-9a-fA-F]{24}$/,pgS=e.object({"x-account-id":e.string().regex(vCy).optional().describe("Account Id on which the request is made. Optional if user is part of only one account.")}),mgS=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 mt={};W(mt,{AuthorizeMagentoBody:()=>bgS,AuthorizeMagentoHeader:()=>hgS,AuthorizeMagentoResponse:()=>zgS,AuthorizeShopifyBody:()=>ggS,AuthorizeShopifyHeader:()=>xgS,AuthorizeShopifyResponse:()=>ygS,AuthorizeWooCommerceBody:()=>vgS,AuthorizeWooCommerceHeader:()=>OgS,AuthorizeWooCommerceResponse:()=>SgS,ConnectCustomStoreBody:()=>jgS,ConnectCustomStoreHeader:()=>kgS,CreateOrderIntegrationBody:()=>YgS,CreateOrderIntegrationHeader:()=>WgS,DeleteOrderIntegrationHeader:()=>r0S,DeleteOrderIntegrationParams:()=>a0S,GetMagentoAuthorizationHeader:()=>BgS,GetMagentoAuthorizationParams:()=>fgS,GetMagentoAuthorizationResponse:()=>TgS,GetOrderIntegrationByIdHeader:()=>e0S,GetOrderIntegrationByIdParams:()=>XgS,GetOrderIntegrationByIdResponse:()=>t0S,GetOrderIntegrationsHeader:()=>QgS,GetOrderIntegrationsQueryParams:()=>$gS,GetOrderIntegrationsResponse:()=>JgS,PromoteShopifyBillingHeader:()=>RgS,PromoteShopifyBillingParams:()=>DgS,PromoteShopifyBillingResponse:()=>_gS,PushCustomStoreOrderBody:()=>ZgS,PushCustomStoreOrderHeader:()=>KgS,PushCustomStoreOrderParams:()=>VgS,PushCustomStoreOrderResponse:()=>qgS,ResumeShopifyInstallBody:()=>IgS,ResumeShopifyInstallResponse:()=>EgS,RotateCustomStoreSecretHeader:()=>LgS,RotateCustomStoreSecretParams:()=>HgS,RotateCustomStoreSecretResponse:()=>GgS,SyncOrderIntegrationBody:()=>AgS,SyncOrderIntegrationHeader:()=>wgS,SyncOrderIntegrationParams:()=>CgS,SyncOrderIntegrationResponse:()=>FgS,SyncShopifyOrdersBody:()=>UgS,SyncShopifyOrdersHeader:()=>MgS,SyncShopifyOrdersParams:()=>NgS,SyncShopifyOrdersResponse:()=>PgS,UpdateOrderIntegrationBody:()=>o0S,UpdateOrderIntegrationHeader:()=>s0S,UpdateOrderIntegrationParams:()=>n0S,UpdateOrderIntegrationResponse:()=>i0S,authorizeMagentoBodyAutoProcessDelaySecondsMin:()=>ICy,authorizeMagentoBodyBusinessUnitIdMax:()=>ECy,authorizeMagentoBodyReconnectIntegrationIdMax:()=>RCy,authorizeMagentoBodyStoreUrlMax:()=>DCy,authorizeShopifyBodyAutoProcessDelaySecondsMin:()=>hCy,authorizeShopifyBodyBusinessUnitIdMax:()=>bCy,authorizeShopifyBodyPendingInstallTokenMax:()=>SCy,authorizeWooCommerceBodyAutoProcessDelaySecondsMin:()=>zCy,authorizeWooCommerceBodyBusinessUnitIdMax:()=>fCy,authorizeWooCommerceBodyReconnectIntegrationIdMax:()=>TCy,authorizeWooCommerceBodyStoreUrlMax:()=>BCy,connectCustomStoreBodyAutoProcessDelaySecondsMin:()=>jCy,connectCustomStoreBodyBusinessUnitIdMax:()=>HCy,connectCustomStoreBodyNameMax:()=>kCy,connectCustomStoreBodyStoreUrlMax:()=>LCy,createOrderIntegrationBodyBusinessPremiseIdMax:()=>Cwy,createOrderIntegrationBodyBusinessUnitIdMax:()=>Pwy,createOrderIntegrationBodyElectronicDeviceIdMax:()=>wwy,createOrderIntegrationBodyLocaleMax:()=>Uwy,createOrderIntegrationBodySourceDefault:()=>Mwy,deleteOrderIntegrationPathIdRegExp:()=>NAy,getMagentoAuthorizationPathIdRegExp:()=>_Cy,getOrderIntegrationByIdPathIdRegExp:()=>Jwy,getOrderIntegrationByIdResponseOneAutoProcessDelaySecondsMax:()=>rAy,getOrderIntegrationByIdResponseOneAutoProcessDelaySecondsMin:()=>aAy,getOrderIntegrationByIdResponseOneBusinessPremiseIdMax:()=>uAy,getOrderIntegrationByIdResponseOneBusinessUnitIdMax:()=>dAy,getOrderIntegrationByIdResponseOneDefaultPaymentTypeMax:()=>iAy,getOrderIntegrationByIdResponseOneElectronicDeviceIdMax:()=>cAy,getOrderIntegrationByIdResponseOneEntityIdMax:()=>eAy,getOrderIntegrationByIdResponseOneIdMax:()=>Xwy,getOrderIntegrationByIdResponseOneLocaleMax:()=>lAy,getOrderIntegrationByIdResponseOneNameMax:()=>tAy,getOrderIntegrationByIdResponseOneScopesMax:()=>sAy,getOrderIntegrationByIdResponseOneShopDomainMax:()=>nAy,getOrderIntegrationByIdResponseOneStoreUrlMax:()=>oAy,getOrderIntegrationsQueryLimitDefault:()=>Awy,getOrderIntegrationsQueryLimitMax:()=>Fwy,getOrderIntegrationsResponseDataItemOneAutoProcessDelaySecondsMax:()=>qwy,getOrderIntegrationsResponseDataItemOneAutoProcessDelaySecondsMin:()=>Zwy,getOrderIntegrationsResponseDataItemOneBusinessPremiseIdMax:()=>$wy,getOrderIntegrationsResponseDataItemOneBusinessUnitIdMax:()=>Ywy,getOrderIntegrationsResponseDataItemOneDefaultPaymentTypeMax:()=>Kwy,getOrderIntegrationsResponseDataItemOneElectronicDeviceIdMax:()=>Qwy,getOrderIntegrationsResponseDataItemOneEntityIdMax:()=>jwy,getOrderIntegrationsResponseDataItemOneIdMax:()=>kwy,getOrderIntegrationsResponseDataItemOneLocaleMax:()=>Wwy,getOrderIntegrationsResponseDataItemOneNameMax:()=>Hwy,getOrderIntegrationsResponseDataItemOneScopesMax:()=>Gwy,getOrderIntegrationsResponseDataItemOneShopDomainMax:()=>Lwy,getOrderIntegrationsResponseDataItemOneStoreUrlMax:()=>Vwy,promoteShopifyBillingPathIdRegExp:()=>NCy,pushCustomStoreOrderBodyBillingAddressAddress2Max:()=>iwy,pushCustomStoreOrderBodyBillingAddressAddressMax:()=>owy,pushCustomStoreOrderBodyBillingAddressCityMax:()=>awy,pushCustomStoreOrderBodyBillingAddressCountryCodeMax:()=>cwy,pushCustomStoreOrderBodyBillingAddressCountryCodeMin:()=>uwy,pushCustomStoreOrderBodyBillingAddressCountryMax:()=>dwy,pushCustomStoreOrderBodyBillingAddressPostCodeMax:()=>lwy,pushCustomStoreOrderBodyBillingAddressStateMax:()=>rwy,pushCustomStoreOrderBodyCurrencyCodeRegExp:()=>WCy,pushCustomStoreOrderBodyCustomerCompanyNameMax:()=>ewy,pushCustomStoreOrderBodyCustomerCompanyNumberMax:()=>nwy,pushCustomStoreOrderBodyCustomerEmailMax:()=>JCy,pushCustomStoreOrderBodyCustomerNameMax:()=>QCy,pushCustomStoreOrderBodyCustomerNotesMax:()=>swy,pushCustomStoreOrderBodyCustomerPhoneMax:()=>XCy,pushCustomStoreOrderBodyCustomerTaxNumberMax:()=>twy,pushCustomStoreOrderBodyEventIdMax:()=>qCy,pushCustomStoreOrderBodyIdMax:()=>KCy,pushCustomStoreOrderBodyItemsItemDiscountMin:()=>Twy,pushCustomStoreOrderBodyItemsItemIdMax:()=>hwy,pushCustomStoreOrderBodyItemsItemNameMax:()=>bwy,pushCustomStoreOrderBodyItemsItemQuantityExclusiveMin:()=>fwy,pushCustomStoreOrderBodyItemsItemSkuMax:()=>zwy,pushCustomStoreOrderBodyItemsItemTaxRateMax:()=>Ewy,pushCustomStoreOrderBodyItemsItemTaxRateMin:()=>Iwy,pushCustomStoreOrderBodyItemsItemUnitMax:()=>Dwy,pushCustomStoreOrderBodyItemsItemUnitPriceMin:()=>Bwy,pushCustomStoreOrderBodyItemsMax:()=>Rwy,pushCustomStoreOrderBodyLocaleMax:()=>$Cy,pushCustomStoreOrderBodyOrderNumberMax:()=>ZCy,pushCustomStoreOrderBodyPaymentMethodMax:()=>_wy,pushCustomStoreOrderBodyPaymentReferenceMax:()=>Nwy,pushCustomStoreOrderBodyShippingAddressAddress2Max:()=>mwy,pushCustomStoreOrderBodyShippingAddressAddressMax:()=>pwy,pushCustomStoreOrderBodyShippingAddressCityMax:()=>xwy,pushCustomStoreOrderBodyShippingAddressCountryCodeMax:()=>Swy,pushCustomStoreOrderBodyShippingAddressCountryCodeMin:()=>vwy,pushCustomStoreOrderBodyShippingAddressCountryMax:()=>Owy,pushCustomStoreOrderBodyShippingAddressPostCodeMax:()=>ywy,pushCustomStoreOrderBodyShippingAddressStateMax:()=>gwy,pushCustomStoreOrderBodyTotalWithTaxMin:()=>YCy,pushCustomStoreOrderPathIdRegExp:()=>VCy,rotateCustomStoreSecretPathIdRegExp:()=>GCy,syncOrderIntegrationBodyCursorMax:()=>ACy,syncOrderIntegrationBodyDefault:()=>wCy,syncOrderIntegrationBodyLimitMax:()=>FCy,syncOrderIntegrationPathIdRegExp:()=>CCy,syncShopifyOrdersBodyCursorMax:()=>UCy,syncShopifyOrdersBodyLimitMax:()=>PCy,syncShopifyOrdersPathIdRegExp:()=>MCy,updateOrderIntegrationBodyAutoProcessDelaySecondsMin:()=>OAy,updateOrderIntegrationBodyBusinessPremiseIdMax:()=>gAy,updateOrderIntegrationBodyBusinessUnitIdMax:()=>xAy,updateOrderIntegrationBodyElectronicDeviceIdMax:()=>yAy,updateOrderIntegrationBodyLocaleMax:()=>mAy,updateOrderIntegrationPathIdRegExp:()=>pAy,updateOrderIntegrationResponseOneAutoProcessDelaySecondsMax:()=>IAy,updateOrderIntegrationResponseOneAutoProcessDelaySecondsMin:()=>TAy,updateOrderIntegrationResponseOneBusinessPremiseIdMax:()=>RAy,updateOrderIntegrationResponseOneBusinessUnitIdMax:()=>DAy,updateOrderIntegrationResponseOneDefaultPaymentTypeMax:()=>BAy,updateOrderIntegrationResponseOneElectronicDeviceIdMax:()=>_Ay,updateOrderIntegrationResponseOneEntityIdMax:()=>SAy,updateOrderIntegrationResponseOneIdMax:()=>vAy,updateOrderIntegrationResponseOneLocaleMax:()=>EAy,updateOrderIntegrationResponseOneNameMax:()=>hAy,updateOrderIntegrationResponseOneScopesMax:()=>zAy,updateOrderIntegrationResponseOneShopDomainMax:()=>bAy,updateOrderIntegrationResponseOneStoreUrlMax:()=>fAy});var xgS=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.")}),SCy=80,hCy=0,bCy=36,ggS=e.object({shop_domain:e.string().min(1).describe("Shopify shop domain, e.g. myshop.myshopify.com"),name:e.string().optional().describe("Integration name"),app_store_install:e.boolean().nullish().describe("Deprecated client hint; verified App Store launches require app_store_launch."),app_store_launch:e.object({shop:e.string().min(1),host:e.string().min(1),hmac:e.string().min(1),timestamp:e.string().min(1)}).nullish().describe("Original signed Shopify App Store launch parameters."),pending_install_token:e.string().min(1).max(SCy).nullish().describe("Opaque continuation token returned after Shopify OAuth. Used to bind an authenticated App Store install to an Apollo entity."),auto_process:e.boolean().optional().describe("Auto-create invoices on order receipt"),auto_process_on:e.union([e.literal("created"),e.literal("paid"),e.literal("fulfilled"),e.literal(null)]).nullish().describe("Order lifecycle event that triggers automatic processing"),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(hCy).optional().describe("Seconds to wait before processing (0 = immediate)"),business_unit_id:e.string().max(bCy).nullish().describe("Business unit to use for auto-created documents.")}),ygS=e.object({redirect_url:e.url()}),OgS=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.")}),zCy=0,fCy=36,BCy=2048,TCy=36,vgS=e.object({name:e.string().nullish().describe("Integration name"),auto_process:e.boolean().nullish().describe("Auto-create invoices on order receipt"),auto_process_on:e.union([e.literal("created"),e.literal("paid"),e.literal("fulfilled"),e.literal(null)]).nullish().describe("Order lifecycle event that triggers automatic processing"),send_invoice_email:e.boolean().nullish().describe("Auto-send invoice email"),issue_invoice_for_bank:e.boolean().nullish().describe("Issue invoice (vs estimate) for unpaid bank transfers"),issue_invoice_on_complete:e.boolean().nullish().describe("Delay document until order is fulfilled/complete"),auto_process_delay_seconds:e.number().min(zCy).nullish().describe("Seconds to wait before processing (0 = immediate)"),business_unit_id:e.string().max(fCy).nullish().describe("Business unit to use for auto-created documents."),store_url:e.url().max(BCy).describe("WooCommerce store URL, including a WordPress subdirectory when applicable."),reconnect_integration_id:e.string().max(TCy).nullish().describe("Migrated WooCommerce integration to reconnect in place. Omit when connecting a new store.")}),SgS=e.object({redirect_url:e.url()}),hgS=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.")}),ICy=0,ECy=36,DCy=2048,RCy=36,bgS=e.object({name:e.string().nullish().describe("Integration name"),auto_process:e.boolean().nullish().describe("Auto-create invoices on order receipt"),auto_process_on:e.union([e.literal("created"),e.literal("paid"),e.literal(null)]).nullish().describe("Order lifecycle event that triggers automatic processing. The fulfilled trigger isn't available for Magento stores."),send_invoice_email:e.boolean().nullish().describe("Auto-send invoice email"),issue_invoice_for_bank:e.boolean().nullish().describe("Issue invoice (vs estimate) for unpaid bank transfers"),issue_invoice_on_complete:e.boolean().nullish().describe("Delay document until order is fulfilled/complete"),auto_process_delay_seconds:e.number().min(ICy).nullish().describe("Seconds to wait before processing (0 = immediate)"),business_unit_id:e.string().max(ECy).nullish().describe("Business unit to use for auto-created documents."),store_url:e.url().max(DCy).describe("Magento store base URL, including a path prefix when the store is served from a subdirectory."),reconnect_integration_id:e.string().max(RCy).nullish().describe("Existing Magento integration to reconnect in place with fresh credentials. Omit when connecting a new store.")}),zgS=e.object({authorization_id:e.string().describe("Authorization identifier; poll GET /order-integrations/magento/authorizations/{id}"),endpoint_url:e.url().describe("Endpoint URL to paste into the Magento integration form. Treat it as a secret."),identity_link_url:e.url().describe("Identity link URL to paste into the Magento integration form. Treat it as a secret."),expires_at:e.iso.datetime({}).describe("When this authorization stops working")}),_Cy=/^oipa_[0-9a-f]{24}$/,fgS=e.object({id:e.stringFormat("resource-id",_Cy).describe("Magento authorization identifier returned by the authorize endpoint")}),BgS=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.")}),TgS=e.object({id:e.string(),status:e.enum(["awaiting_credentials","awaiting_activation","connected","failed","expired"]).describe("awaiting_credentials: Magento has not posted its credentials yet. awaiting_activation: credentials received, waiting for the activation popup. connected: done. failed: see failure_reason. expired: start a new connection."),integration_id:e.string().nullable().describe("Set once the status is connected"),failure_reason:e.union([e.literal("missing_permissions"),e.literal("unauthorized"),e.literal("unreachable"),e.literal("token_exchange_failed"),e.literal(null)]).nullable().describe("Why the last activation attempt failed, when known"),expires_at:e.iso.datetime({})}),IgS=e.object({shop:e.string().min(1)}),EgS=e.object({redirect_url:e.url(),entity_id:e.string(),frontend_origin:e.url().nullish()}),NCy=/^[a-z]{3,4}_[0-9a-f]{24}$/,DgS=e.object({id:e.stringFormat("resource-id",NCy).describe("Unique resource identifier. Prefix depends on the resource, for example inv_, cus_, or ent_.")}),RgS=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.")}),_gS=e.object({redirect_url:e.url()}),MCy=/^[a-z]{3,4}_[0-9a-f]{24}$/,NgS=e.object({id:e.stringFormat("resource-id",MCy).describe("Unique resource identifier. Prefix depends on the resource, for example inv_, cus_, or ent_.")}),MgS=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.")}),UCy=2048,PCy=250,UgS=e.object({updated_since:e.iso.datetime({}).optional().describe("Inclusive Shopify update window start."),updated_until:e.iso.datetime({}).optional().describe("Inclusive Shopify update window end."),cursor:e.string().min(1).max(UCy).optional().describe("Opaque cursor returned by an incomplete prior sync to resume its exact window."),resumable:e.boolean().optional().describe("Opt into bounded, resumable processing. Omit for legacy one-request completion; cursor requests are always bounded."),limit:e.number().min(1).max(PCy).optional().describe("Shopify page size. The server also enforces total-order and page-count caps.")}),PgS=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(),complete:e.boolean().optional(),truncated:e.boolean().optional(),pages_fetched:e.number().optional(),completion_state:e.enum(["complete","resumable"]).optional(),next_cursor:e.string().optional()}),CCy=/^oint_[0-9a-f]{24}$/,CgS=e.object({id:e.stringFormat("resource-id",CCy).describe("Unique order integration identifier")}),wgS=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.")}),wCy={},ACy=2048,FCy=100,AgS=e.object({updated_since:e.iso.datetime({}).nullish(),updated_until:e.iso.datetime({}).nullish(),cursor:e.string().min(1).max(ACy).nullish(),limit:e.number().min(1).max(FCy).nullish()}).default(wCy),FgS=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(),complete:e.boolean(),truncated:e.boolean(),pages_fetched:e.number(),completion_state:e.enum(["complete","resumable"]),next_cursor:e.string().optional()}),kgS=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.")}),kCy=255,jCy=0,HCy=36,LCy=2048,jgS=e.object({name:e.string().min(1).max(kCy).describe("Integration name"),auto_process:e.boolean().nullish().describe("Auto-create invoices on order receipt"),auto_process_on:e.union([e.literal("created"),e.literal("paid"),e.literal("fulfilled"),e.literal(null)]).nullish().describe("Order lifecycle event that triggers automatic processing"),send_invoice_email:e.boolean().nullish().describe("Auto-send invoice email"),issue_invoice_for_bank:e.boolean().nullish().describe("Issue invoice (vs estimate) for unpaid bank transfers"),issue_invoice_on_complete:e.boolean().nullish().describe("Delay document until order is fulfilled/complete"),auto_process_delay_seconds:e.number().min(jCy).nullish().describe("Seconds to wait before processing (0 = immediate)"),business_unit_id:e.string().max(HCy).nullish().describe("Business unit to use for auto-created documents."),store_url:e.url().max(LCy).nullish().describe("Public URL of the store, shown for reference. One active connection per URL.")}),GCy=/^oint_[0-9a-f]{24}$/,HgS=e.object({id:e.stringFormat("resource-id",GCy).describe("Unique order integration identifier")}),LgS=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.")}),GgS=e.object({webhook_url:e.url().describe("Endpoint your store posts signed order webhooks to"),signing_secret:e.string().describe("HMAC-SHA256 signing secret. Shown only in this response; store it securely.")}),VCy=/^oint_[0-9a-f]{24}$/,VgS=e.object({id:e.stringFormat("resource-id",VCy).describe("Unique order integration identifier")}),KgS=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.")}),KCy=255,ZCy=100,qCy=255,WCy=/^[A-Z]{3}$/,YCy=0,$Cy=20,QCy=255,JCy=255,XCy=50,ewy=255,twy=50,nwy=50,swy=2e3,owy=500,iwy=500,awy=255,rwy=255,lwy=50,dwy=255,uwy=2,cwy=2,pwy=500,mwy=500,xwy=255,gwy=255,ywy=50,Owy=255,vwy=2,Swy=2,hwy=255,bwy=500,zwy=255,fwy=0,Bwy=0,Twy=0,Iwy=0,Ewy=100,Dwy=50,Rwy=500,_wy=100,Nwy=255,ZgS=e.object({id:e.string().min(1).max(KCy).describe("Your store's unique order ID. Repeated pushes update the same order."),order_number:e.string().max(ZCy).nullish().describe("Order number shown to buyers"),event_id:e.string().max(qCy).nullish().describe("Stable ID of this logical event (e.g. `1042:paid`), kept the same across retries. Every applied event ID is remembered per order, so any repeated ID is acknowledged without effects. Takes precedence over the X-SI-Event-Id header."),currency_code:e.string().regex(WCy),prices_include_tax:e.boolean().nullish().describe("Whether `unit_price` and `discount` include tax. Defaults to false."),total_with_tax:e.number().min(YCy).describe("Order total the buyer pays. Lines must reconcile to it within rounding: 0.02, or half a cent per line for larger orders."),ordered_at:e.iso.datetime({}).nullish(),locale:e.string().max($Cy).nullish().describe("Buyer or checkout language, used for the document language"),customer:e.object({name:e.string().max(QCy).nullish(),email:e.email().max(JCy).nullish(),phone:e.string().max(XCy).nullish(),company_name:e.string().max(ewy).nullish(),tax_number:e.string().max(twy).nullish().describe("Buyer VAT or tax number, kept as text"),company_number:e.string().max(nwy).nullish(),is_business:e.boolean().nullish(),notes:e.string().max(swy).nullish()}).nullish(),billing_address:e.object({address:e.string().max(owy).nullish(),address_2:e.string().max(iwy).nullish(),city:e.string().max(awy).nullish(),state:e.string().max(rwy).nullish(),post_code:e.string().max(lwy).nullish(),country:e.string().max(dwy).nullish(),country_code:e.string().min(uwy).max(cwy).nullish().describe("ISO 3166-1 alpha-2 country code")}).nullish(),shipping_address:e.object({address:e.string().max(pwy).nullish(),address_2:e.string().max(mwy).nullish(),city:e.string().max(xwy).nullish(),state:e.string().max(gwy).nullish(),post_code:e.string().max(ywy).nullish(),country:e.string().max(Owy).nullish(),country_code:e.string().min(vwy).max(Swy).nullish().describe("ISO 3166-1 alpha-2 country code")}).nullish(),items:e.array(e.object({id:e.string().max(hwy).nullish().describe("Your line identifier"),kind:e.union([e.literal("line_item"),e.literal("shipping"),e.literal("fee"),e.literal(null)]).nullish().describe("Line type. Defaults to `line_item`."),name:e.string().min(1).max(bwy),sku:e.string().max(zwy).nullish().describe("Links product lines to the catalog item with this SKU"),quantity:e.number().gt(fwy),unit_price:e.number().min(Bwy).describe("Price per unit. Gross when `prices_include_tax` is true, net otherwise."),discount:e.number().min(Twy).nullish().describe("Discount amount for the whole line, on the same tax basis as `unit_price`."),tax_rate:e.number().min(Iwy).max(Ewy).nullish().describe("Tax percentage. Send 0 for an explicit zero rate; omit when the line has no tax."),unit:e.string().max(Dwy).nullish()})).min(1).max(Rwy),payment_method:e.string().max(_wy).nullish().describe("How the buyer pays: `card`, `paypal`, `bank_transfer`, `cash` (cash on delivery) or `coupon`. Common spellings such as `Bank transfer`, `cod` or `cash_on_delivery` are recognized; other values count as online payments."),payment_reference:e.string().max(Nwy).nullish().describe("Payment provider transaction reference"),paid:e.boolean().nullish().describe("Whether the order is fully paid. Defaults to false."),paid_at:e.iso.datetime({}).nullish(),fulfilled:e.boolean().nullish().describe("Whether the order is shipped/completed."),fulfilled_at:e.iso.datetime({}).nullish(),cancelled:e.boolean().nullish().describe("Cancelled orders never create new documents."),cancelled_at:e.iso.datetime({}).nullish(),refunded:e.boolean().nullish().describe("Fully refunded. An issued invoice is voided with a credit note."),refunded_at:e.iso.datetime({}).nullish()}).describe("Full current snapshot of a custom store order. Send the complete order on every push; omitted lifecycle flags mean false."),qgS=e.object({order_id:e.string().nullable().describe("Order ID, or null when the push was ignored for an unknown order"),action:e.enum(["created","updated","ignored"]).describe("`ignored` means the push changed nothing, e.g. a repeated event_id"),processing_queued:e.boolean().describe("Whether document processing was started")}),WgS=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.")}),Mwy="manual",Uwy=10,Pwy=36,Cwy=36,wwy=36,YgS=e.object({name:e.string().min(1),source:e.enum(["shopify","woocommerce","magento","custom","manual"]).default(Mwy),auto_process:e.boolean().optional(),auto_reissue_on_update:e.boolean().optional(),classify_imported_items_as_products:e.boolean().nullish().describe("Treat otherwise-unclassified regular imported order lines as products. Null is equivalent to false."),locale:e.string().max(Uwy).nullish(),business_unit_id:e.string().max(Pwy).nullish(),business_premise_id:e.string().max(Cwy).nullish(),electronic_device_id:e.string().max(wwy).nullish(),metadata:e.record(e.string(),e.string()).refine(d=>Object.keys(d).length<=50,"Metadata can have maximum 50 properties").nullish().describe("Custom string key-value data for your own use, with up to 50 properties. Keys are opaque and may contain periods. Useful for storing external IDs, tags, or integration data.")}),Awy=10,Fwy=100,$gS=e.object({limit:e.number().min(1).max(Fwy).default(Awy).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**Array columns** (such as an item\'s `categories`) compare as sets: a direct value asks whether the list contains it, `contains` takes an array and requires all of them, `in` matches any of them, and `notIn` matches none. Scalar operators such as `gt` do not apply and are ignored.\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.
196
+ 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."),categories:e.string().optional().describe("Comma-separated categories. Returns items in *any* of them, which is what a point-of-sale category chip filters by. Shorthand for the equivalent `query` operator form, kept because a filter row should not have to build JSON."),usage:e.enum(["sale","purchase"]).optional().describe("Items for this side: items with this usage, items without a usage, and inventory-tracked items. Use `sale` for pickers on sales documents and `purchase` for pickers on expenses and purchase orders. Omit to list every item.")}),SxS=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.")}),iMy=36,aMy=500,rMy=2e3,lMy=8,dMy=/^VATEX-[A-Z0-9-]{2,24}$/,uMy=500,cMy=100,pMy=200,mMy=200,xMy=36,gMy=100,yMy=-140737488355328,OMy=0x7fffffffffff,vMy=36,SMy=500,hMy=500,bMy=500,zMy=500,fMy=500,BMy=500,TMy=500,IMy=500,EMy=500,DMy=500,RMy=500,_My=500,NMy=500,MMy=500,UMy=500,PMy=500,CMy=500,wMy=500,AMy=500,FMy=2e3,kMy=2e3,jMy=2e3,HMy=2e3,LMy=2e3,GMy=2e3,VMy=2e3,KMy=2e3,ZMy=2e3,qMy=2e3,WMy=2e3,YMy=2e3,$My=2e3,QMy=2e3,JMy=2e3,XMy=2e3,eUy=2e3,tUy=2e3,nUy=2e3,hxS=e.object({data:e.array(e.object({id:e.string().max(iMy),name:e.string().max(aMy),description:e.string().max(rMy).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."),price_with_tax:e.number().describe("Per-unit price including tax. Stored for fast B2C/POS display regardless of input mode."),unit:e.string().nullish().describe("Default display unit for document lines created from this saved item."),e_invoicing:e.union([e.object({unit_code:e.string().min(1).max(lMy).nullish().describe("Optional XML unit-code override for e-SLOG, Peppol, XRechnung, and ZUGFeRD output. Use a supported UN/ECE Rec 20 / Rec 21 code such as C62, HUR, MGM, MLT, or SET."),vat_category:e.union([e.object({code:e.enum(["Z","E","AE","K","G"]).describe("EN 16931 VAT category code: K, AE, G, E or Z."),exemption_reason_code:e.string().regex(dMy).nullish().describe("VATEX exemption reason code (BT-121). Not allowed with Z."),exemption_reason:e.string().min(1).max(uMy).nullish().describe("Exemption reason text (BT-120). Not allowed with Z.")}).describe("EN 16931 VAT category override for a line without VAT charged."),e.null()]).optional(),italy:e.union([e.object({nature:e.enum(["N2.1","N2.2","N3.1","N3.2"]).describe("Supported zero-VAT treatment: N2.1 territorial exclusion, N2.2 flat-rate (RF19) operations, N3.1 exports, N3.2 intra-community supplies. N2.2 is only accepted for an RF19 (regime forfettario) seller invoicing a domestic Italian buyer; ordinary RF01 sellers, and RF19 sellers invoicing a foreign buyer, must use N2.1/N3.1/N3.2 instead. Other special/exempt treatments are not supported and must not be relabelled."),legal_reference:e.string().min(1).max(cMy).describe("Actual legal basis for this zero-VAT operation, emitted as RiferimentoNormativo.")}),e.null()]).optional(),hungary:e.object({vat_treatment:e.union([e.object({type:e.enum(["exemption"]),case:e.enum(["AAM","TAM","KBAET","KBAUK","EAM","NAM"]).describe("NAV VAT exemption case code (invoiceData.xsd `VatExemptionCaseType`)."),reason:e.string().min(1).max(pMy).describe("Free-text justification for the exemption/out-of-scope case (invoiceData.xsd DetailedReasonType.reason, common:SimpleText200NotBlankType: max 200 characters, non-blank).")}),e.object({type:e.enum(["out_of_scope"]),case:e.enum(["ATK","EUFAD37","EUFADE","EUE","HO"]).describe("NAV out-of-scope VAT case code (invoiceData.xsd `VatOutOfScopeCaseType`)."),reason:e.string().min(1).max(mMy).describe("Free-text justification for the exemption/out-of-scope case (invoiceData.xsd DetailedReasonType.reason, common:SimpleText200NotBlankType: max 200 characters, non-blank).")}),e.object({type:e.enum(["domestic_reverse_charge"])}),e.object({type:e.enum(["no_vat_charge"])}),e.null()]).optional().describe("Explicit Hungarian NAV VAT treatment for a document line, required whenever a line has no positive, non-reverse-charge VAT percentage. Never auto-derived from transaction_type, customer country, or product classification.")}).nullish().describe("Hungary-specific line-level e-invoicing options for NAV reporting. `vat_treatment` is required whenever the line has no positive, non-reverse-charge VAT percentage; NAV country validation itself is enforced elsewhere, not by this schema.")}).describe("Line-level e-invoicing options. `unit_code` overrides only XML unit output; the line `unit` field remains the display unit. `vat_category` overrides the derived EN 16931 VAT category in XRechnung and ZUGFeRD exports. `hungary` carries NAV-specific reporting input."),e.null()]).optional().describe("Default line-level e-invoicing options for document lines created from this saved item."),tax_ids:e.array(e.string().max(xMy)),categories:e.array(e.string().max(gMy)).optional().describe("Free-form groupings used to filter the catalog, typically shown as chips at a point of sale. An item can belong to several. Distinct from `financial_category_id` (accounting) and `classification` (e-invoicing). Empty when the item is in none."),track_inventory:e.boolean().optional().describe("Whether stock tracking is enabled for this item. When true, inventory movements can be recorded and invoicing this item records automatic `sale` movements."),sku:e.string().nullish().describe("Stock-keeping unit, free-form and merchant-defined."),usage:e.union([e.literal("sale"),e.literal("purchase"),e.literal(null)]).nullish().describe("What the item is used for: `sale` (shown when picking items for sales documents), `purchase` (shown when picking items for expenses and purchase orders), or null for both."),barcode:e.string().nullish().describe("GTIN/EAN/UPC barcode"),purchase_price:e.number().nullish().describe("Net purchase price per unit in the entity's currency major unit. Used as the default `unit_cost` for inbound inventory movements when none is given."),total_tax:e.number().min(yMy).max(OMy),entity_id:e.string().max(vMy),financial_category_id:e.string().nullish().describe("Default financial category for this item. In v1 only income categories can be assigned."),metadata:e.union([e.string(),e.number(),e.boolean(),e.null(),e.record(e.string(),e.unknown()),e.array(e.unknown())]),translations:e.object({name:e.object({"en-US":e.string().max(SMy).optional(),"de-DE":e.string().max(hMy).optional(),"it-IT":e.string().max(bMy).optional(),"fr-FR":e.string().max(zMy).optional(),"es-ES":e.string().max(fMy).optional(),"sl-SI":e.string().max(BMy).optional(),"pt-PT":e.string().max(TMy).optional(),"nl-NL":e.string().max(IMy).optional(),"pl-PL":e.string().max(EMy).optional(),"hr-HR":e.string().max(DMy).optional(),"sv-SE":e.string().max(RMy).optional(),"fi-FI":e.string().max(_My).optional(),"et-EE":e.string().max(NMy).optional(),"bg-BG":e.string().max(MMy).optional(),"cs-CZ":e.string().max(UMy).optional(),"sk-SK":e.string().max(PMy).optional(),"nb-NO":e.string().max(CMy).optional(),"is-IS":e.string().max(wMy).optional(),"hu-HU":e.string().max(AMy).optional()}).optional().describe("Translated user-authored document content keyed by full supported locales such as `de-DE`. Values may be empty strings to intentionally blank content for a locale."),description:e.object({"en-US":e.string().max(FMy).optional(),"de-DE":e.string().max(kMy).optional(),"it-IT":e.string().max(jMy).optional(),"fr-FR":e.string().max(HMy).optional(),"es-ES":e.string().max(LMy).optional(),"sl-SI":e.string().max(GMy).optional(),"pt-PT":e.string().max(VMy).optional(),"nl-NL":e.string().max(KMy).optional(),"pl-PL":e.string().max(ZMy).optional(),"hr-HR":e.string().max(qMy).optional(),"sv-SE":e.string().max(WMy).optional(),"fi-FI":e.string().max(YMy).optional(),"et-EE":e.string().max($My).optional(),"bg-BG":e.string().max(QMy).optional(),"cs-CZ":e.string().max(JMy).optional(),"sk-SK":e.string().max(XMy).optional(),"nb-NO":e.string().max(eUy).optional(),"is-IS":e.string().max(tUy).optional(),"hu-HU":e.string().max(nUy).optional()}).optional().describe("Translated user-authored document content keyed by full supported locales such as `de-DE`. Values may be empty strings to intentionally blank content for a locale.")}).describe("Translated user-authored line-item content keyed by full supported locales. Empty string intentionally blanks the field for that locale."),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")}),bxS=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.")}),zxS=e.object({data:e.array(e.string())}),fxS=e.object({format:e.enum(["csv","xlsx"]).describe("Template file format."),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("hu"),e.literal(null)]).nullish().describe("Language for the example row's free-text values (name, description, unit, category). Defaults to the entity locale when omitted. Column headers are always the English identifiers documented below.")}),BxS=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.")}),TxS=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.")}),IxS=e.object({file:e.custom(d=>typeof File<"u"&&d instanceof File,"Input not instance of File").describe("CSV or XLSX file to import")}),ExS=e.object({total_rows:e.number(),created:e.number(),updated:e.number(),skipped:e.number(),errors:e.number(),stock_movements:e.number().describe("Number of rows with starting stock to record as `adjustment_in` movements (0 when nothing to commit). For a preview, these are planned movements that would be created on commit; the movements themselves are only written once `committed` is true."),committed:e.boolean().describe("false for a preview; true once the commit endpoint has written the changes."),rows:e.array(e.object({row:e.number().describe("1-based data row number (header row is not counted)."),sku:e.string().nullable(),name:e.string().nullable(),action:e.enum(["create","update","skip","error"]).describe("What this row did (or would do) to the item catalog."),stock:e.enum(["create","skip","none"]).describe("What this row did (or would do) to starting stock."),messages:e.array(e.string()).describe("Human-readable notes and errors for this row.")}))}),DxS=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.")}),RxS=e.object({file:e.custom(d=>typeof File<"u"&&d instanceof File,"Input not instance of File").describe("CSV or XLSX file to import")}),_xS=e.object({total_rows:e.number(),created:e.number(),updated:e.number(),skipped:e.number(),errors:e.number(),stock_movements:e.number().describe("Number of rows with starting stock to record as `adjustment_in` movements (0 when nothing to commit). For a preview, these are planned movements that would be created on commit; the movements themselves are only written once `committed` is true."),committed:e.boolean().describe("false for a preview; true once the commit endpoint has written the changes."),rows:e.array(e.object({row:e.number().describe("1-based data row number (header row is not counted)."),sku:e.string().nullable(),name:e.string().nullable(),action:e.enum(["create","update","skip","error"]).describe("What this row did (or would do) to the item catalog."),stock:e.enum(["create","skip","none"]).describe("What this row did (or would do) to starting stock."),messages:e.array(e.string()).describe("Human-readable notes and errors for this row.")}))}),sUy=/^[a-z]{3,4}_[0-9a-f]{24}$/,NxS=e.object({id:e.stringFormat("resource-id",sUy).describe("Unique resource identifier. Prefix depends on the resource, for example inv_, cus_, or ent_.")}),MxS=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.")}),oUy=2e3,iUy=8,aUy=/^VATEX-[A-Z0-9-]{2,24}$/,rUy=500,lUy=100,dUy=200,uUy=200,cUy=36,pUy=100,mUy=100,xUy=50,gUy=0,yUy=500,OUy=500,vUy=500,SUy=500,hUy=500,bUy=500,zUy=500,fUy=500,BUy=500,TUy=500,IUy=500,EUy=500,DUy=500,RUy=500,_Uy=500,NUy=500,MUy=500,UUy=500,PUy=500,CUy=2e3,wUy=2e3,AUy=2e3,FUy=2e3,kUy=2e3,jUy=2e3,HUy=2e3,LUy=2e3,GUy=2e3,VUy=2e3,KUy=2e3,ZUy=2e3,qUy=2e3,WUy=2e3,YUy=2e3,$Uy=2e3,QUy=2e3,JUy=2e3,XUy=2e3,ePy=200,tPy=0,nPy=100,sPy=50,oPy=2,UxS=e.object({name:e.string().min(1).optional(),description:e.string().max(oUy).nullish().describe("Free-form description of the item. Omit to keep the current value; send null to clear it."),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 in the item's currency major unit; for EUR, `29.90` means \u20AC29.90, not 2,990 cents. Provide either price OR gross_price, not both."),gross_price:e.number().optional().describe("Gross price per unit including tax in the item's currency major unit; for EUR, `29.90` means \u20AC29.90, not 2,990 cents. If provided, net price is calculated. Provide either price OR gross_price, not both."),unit:e.string().nullish().describe("Default display unit for document lines created from this saved item. Omit to keep the current value; send null to clear it."),e_invoicing:e.union([e.object({unit_code:e.string().min(1).max(iUy).nullish().describe("Optional XML unit-code override for e-SLOG, Peppol, XRechnung, and ZUGFeRD output. Use a supported UN/ECE Rec 20 / Rec 21 code such as C62, HUR, MGM, MLT, or SET."),vat_category:e.union([e.object({code:e.enum(["Z","E","AE","K","G"]).describe("EN 16931 VAT category code: K, AE, G, E or Z."),exemption_reason_code:e.string().regex(aUy).nullish().describe("VATEX exemption reason code (BT-121). Not allowed with Z."),exemption_reason:e.string().min(1).max(rUy).nullish().describe("Exemption reason text (BT-120). Not allowed with Z.")}).describe("EN 16931 VAT category override for a line without VAT charged."),e.null()]).optional(),italy:e.union([e.object({nature:e.enum(["N2.1","N2.2","N3.1","N3.2"]).describe("Supported zero-VAT treatment: N2.1 territorial exclusion, N2.2 flat-rate (RF19) operations, N3.1 exports, N3.2 intra-community supplies. N2.2 is only accepted for an RF19 (regime forfettario) seller invoicing a domestic Italian buyer; ordinary RF01 sellers, and RF19 sellers invoicing a foreign buyer, must use N2.1/N3.1/N3.2 instead. Other special/exempt treatments are not supported and must not be relabelled."),legal_reference:e.string().min(1).max(lUy).describe("Actual legal basis for this zero-VAT operation, emitted as RiferimentoNormativo.")}),e.null()]).optional(),hungary:e.object({vat_treatment:e.union([e.object({type:e.enum(["exemption"]),case:e.enum(["AAM","TAM","KBAET","KBAUK","EAM","NAM"]).describe("NAV VAT exemption case code (invoiceData.xsd `VatExemptionCaseType`)."),reason:e.string().min(1).max(dUy).describe("Free-text justification for the exemption/out-of-scope case (invoiceData.xsd DetailedReasonType.reason, common:SimpleText200NotBlankType: max 200 characters, non-blank).")}),e.object({type:e.enum(["out_of_scope"]),case:e.enum(["ATK","EUFAD37","EUFADE","EUE","HO"]).describe("NAV out-of-scope VAT case code (invoiceData.xsd `VatOutOfScopeCaseType`)."),reason:e.string().min(1).max(uUy).describe("Free-text justification for the exemption/out-of-scope case (invoiceData.xsd DetailedReasonType.reason, common:SimpleText200NotBlankType: max 200 characters, non-blank).")}),e.object({type:e.enum(["domestic_reverse_charge"])}),e.object({type:e.enum(["no_vat_charge"])}),e.null()]).optional().describe("Explicit Hungarian NAV VAT treatment for a document line, required whenever a line has no positive, non-reverse-charge VAT percentage. Never auto-derived from transaction_type, customer country, or product classification.")}).nullish().describe("Hungary-specific line-level e-invoicing options for NAV reporting. `vat_treatment` is required whenever the line has no positive, non-reverse-charge VAT percentage; NAV country validation itself is enforced elsewhere, not by this schema.")}).describe("Line-level e-invoicing options. `unit_code` overrides only XML unit output; the line `unit` field remains the display unit. `vat_category` overrides the derived EN 16931 VAT category in XRechnung and ZUGFeRD exports. `hungary` carries NAV-specific reporting input."),e.null()]).optional().describe("Default line-level e-invoicing options for document lines created from this saved item."),tax_ids:e.array(e.string().max(cUy)).optional(),categories:e.array(e.string().max(pUy)).nullish().describe("Free-form groupings used to filter the catalog. Values are trimmed, lower-cased and de-duplicated on write. Omit or send null for none; on update, null clears the list."),track_inventory:e.boolean().nullish().describe("Opt in to stock tracking for this item. When enabled, inventory movements can be recorded and finalizing an invoice with this item automatically records a `sale` movement. Omit or send null for false."),sku:e.string().max(mUy).nullish().describe("Stock-keeping unit, free-form and merchant-defined. Omit to keep the current value; send null to clear it."),usage:e.union([e.literal("sale"),e.literal("purchase"),e.literal(null)]).nullish().describe("What the item is used for: `sale` (shown when picking items for sales documents), `purchase` (shown when picking items for expenses and purchase orders). Omit to keep the current value; send null to clear it so the item is used for both."),barcode:e.string().max(xUy).nullish().describe("GTIN/EAN/UPC barcode. Omit to keep the current value; send null to clear it."),purchase_price:e.number().min(gUy).nullish().describe("Net purchase price per unit in the entity's currency major unit. Used as the default `unit_cost` for inbound inventory movements when none is given. Omit to keep the current value; send null to clear it."),financial_category_id:e.string().nullish().describe("Default financial category for this item. In v1 only income categories can be assigned. Omit to keep the current value; send null to clear it."),metadata:e.record(e.string(),e.string()).refine(d=>Object.keys(d).length<=50,"Metadata can have maximum 50 properties").nullish().describe("Custom string key-value data for your own use, with up to 50 properties. Keys are opaque and may contain periods. Useful for storing external IDs, tags, or integration data."),translations:e.union([e.object({name:e.object({"en-US":e.string().max(yUy).nullish(),"de-DE":e.string().max(OUy).nullish(),"it-IT":e.string().max(vUy).nullish(),"fr-FR":e.string().max(SUy).nullish(),"es-ES":e.string().max(hUy).nullish(),"sl-SI":e.string().max(bUy).nullish(),"pt-PT":e.string().max(zUy).nullish(),"nl-NL":e.string().max(fUy).nullish(),"pl-PL":e.string().max(BUy).nullish(),"hr-HR":e.string().max(TUy).nullish(),"sv-SE":e.string().max(IUy).nullish(),"fi-FI":e.string().max(EUy).nullish(),"et-EE":e.string().max(DUy).nullish(),"bg-BG":e.string().max(RUy).nullish(),"cs-CZ":e.string().max(_Uy).nullish(),"sk-SK":e.string().max(NUy).nullish(),"nb-NO":e.string().max(MUy).nullish(),"is-IS":e.string().max(UUy).nullish(),"hu-HU":e.string().max(PUy).nullish()}).nullish().describe("Translated user-authored document content keyed by full supported locales such as `de-DE`. Values may be empty strings to intentionally blank content for a locale."),description:e.object({"en-US":e.string().max(CUy).nullish(),"de-DE":e.string().max(wUy).nullish(),"it-IT":e.string().max(AUy).nullish(),"fr-FR":e.string().max(FUy).nullish(),"es-ES":e.string().max(kUy).nullish(),"sl-SI":e.string().max(jUy).nullish(),"pt-PT":e.string().max(HUy).nullish(),"nl-NL":e.string().max(LUy).nullish(),"pl-PL":e.string().max(GUy).nullish(),"hr-HR":e.string().max(VUy).nullish(),"sv-SE":e.string().max(KUy).nullish(),"fi-FI":e.string().max(ZUy).nullish(),"et-EE":e.string().max(qUy).nullish(),"bg-BG":e.string().max(WUy).nullish(),"cs-CZ":e.string().max(YUy).nullish(),"sk-SK":e.string().max($Uy).nullish(),"nb-NO":e.string().max(QUy).nullish(),"is-IS":e.string().max(JUy).nullish(),"hu-HU":e.string().max(XUy).nullish()}).nullish().describe("Translated user-authored document content keyed by full supported locales such as `de-DE`. Values may be empty strings to intentionally blank content for a locale.")}).describe("Translated user-authored line-item content accepted on create and update. Same shape as `DocumentItemTranslations`; an explicit `null` for a field or a locale is treated as omitted."),e.null()]).optional().describe("Translated catalog-item content. Set to null to clear all translations."),financial_category_key:e.string().max(ePy).nullish().describe("Key of the default financial category (for example `office-supplies`), as an alternative to `financial_category_id`. Provide either, not both. On create a null value counts as not provided; on update null clears the default, and sending both fields is rejected."),taxes:e.array(e.object({rate:e.number().min(tPy).max(nPy).optional().describe("Tax rate percentage. Either rate or classification must be provided."),classification:e.string().max(sPy).optional().describe("Tax classification to lookup existing tax. Either rate or classification must be provided.")})).max(oPy).nullish().describe("Taxes for the item. Provide rate to auto-create, or classification to lookup existing tax.")}),iPy=36,aPy=500,rPy=2e3,lPy=8,dPy=/^VATEX-[A-Z0-9-]{2,24}$/,uPy=500,cPy=100,pPy=200,mPy=200,xPy=36,gPy=100,yPy=-140737488355328,OPy=0x7fffffffffff,vPy=36,SPy=500,hPy=500,bPy=500,zPy=500,fPy=500,BPy=500,TPy=500,IPy=500,EPy=500,DPy=500,RPy=500,_Py=500,NPy=500,MPy=500,UPy=500,PPy=500,CPy=500,wPy=500,APy=500,FPy=2e3,kPy=2e3,jPy=2e3,HPy=2e3,LPy=2e3,GPy=2e3,VPy=2e3,KPy=2e3,ZPy=2e3,qPy=2e3,WPy=2e3,YPy=2e3,$Py=2e3,QPy=2e3,JPy=2e3,XPy=2e3,e2y=2e3,t2y=2e3,n2y=2e3,PxS=e.object({id:e.string().max(iPy),name:e.string().max(aPy),description:e.string().max(rPy).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."),price_with_tax:e.number().describe("Per-unit price including tax. Stored for fast B2C/POS display regardless of input mode."),unit:e.string().nullish().describe("Default display unit for document lines created from this saved item."),e_invoicing:e.union([e.object({unit_code:e.string().min(1).max(lPy).nullish().describe("Optional XML unit-code override for e-SLOG, Peppol, XRechnung, and ZUGFeRD output. Use a supported UN/ECE Rec 20 / Rec 21 code such as C62, HUR, MGM, MLT, or SET."),vat_category:e.union([e.object({code:e.enum(["Z","E","AE","K","G"]).describe("EN 16931 VAT category code: K, AE, G, E or Z."),exemption_reason_code:e.string().regex(dPy).nullish().describe("VATEX exemption reason code (BT-121). Not allowed with Z."),exemption_reason:e.string().min(1).max(uPy).nullish().describe("Exemption reason text (BT-120). Not allowed with Z.")}).describe("EN 16931 VAT category override for a line without VAT charged."),e.null()]).optional(),italy:e.union([e.object({nature:e.enum(["N2.1","N2.2","N3.1","N3.2"]).describe("Supported zero-VAT treatment: N2.1 territorial exclusion, N2.2 flat-rate (RF19) operations, N3.1 exports, N3.2 intra-community supplies. N2.2 is only accepted for an RF19 (regime forfettario) seller invoicing a domestic Italian buyer; ordinary RF01 sellers, and RF19 sellers invoicing a foreign buyer, must use N2.1/N3.1/N3.2 instead. Other special/exempt treatments are not supported and must not be relabelled."),legal_reference:e.string().min(1).max(cPy).describe("Actual legal basis for this zero-VAT operation, emitted as RiferimentoNormativo.")}),e.null()]).optional(),hungary:e.object({vat_treatment:e.union([e.object({type:e.enum(["exemption"]),case:e.enum(["AAM","TAM","KBAET","KBAUK","EAM","NAM"]).describe("NAV VAT exemption case code (invoiceData.xsd `VatExemptionCaseType`)."),reason:e.string().min(1).max(pPy).describe("Free-text justification for the exemption/out-of-scope case (invoiceData.xsd DetailedReasonType.reason, common:SimpleText200NotBlankType: max 200 characters, non-blank).")}),e.object({type:e.enum(["out_of_scope"]),case:e.enum(["ATK","EUFAD37","EUFADE","EUE","HO"]).describe("NAV out-of-scope VAT case code (invoiceData.xsd `VatOutOfScopeCaseType`)."),reason:e.string().min(1).max(mPy).describe("Free-text justification for the exemption/out-of-scope case (invoiceData.xsd DetailedReasonType.reason, common:SimpleText200NotBlankType: max 200 characters, non-blank).")}),e.object({type:e.enum(["domestic_reverse_charge"])}),e.object({type:e.enum(["no_vat_charge"])}),e.null()]).optional().describe("Explicit Hungarian NAV VAT treatment for a document line, required whenever a line has no positive, non-reverse-charge VAT percentage. Never auto-derived from transaction_type, customer country, or product classification.")}).nullish().describe("Hungary-specific line-level e-invoicing options for NAV reporting. `vat_treatment` is required whenever the line has no positive, non-reverse-charge VAT percentage; NAV country validation itself is enforced elsewhere, not by this schema.")}).describe("Line-level e-invoicing options. `unit_code` overrides only XML unit output; the line `unit` field remains the display unit. `vat_category` overrides the derived EN 16931 VAT category in XRechnung and ZUGFeRD exports. `hungary` carries NAV-specific reporting input."),e.null()]).optional().describe("Default line-level e-invoicing options for document lines created from this saved item."),tax_ids:e.array(e.string().max(xPy)),categories:e.array(e.string().max(gPy)).optional().describe("Free-form groupings used to filter the catalog, typically shown as chips at a point of sale. An item can belong to several. Distinct from `financial_category_id` (accounting) and `classification` (e-invoicing). Empty when the item is in none."),track_inventory:e.boolean().optional().describe("Whether stock tracking is enabled for this item. When true, inventory movements can be recorded and invoicing this item records automatic `sale` movements."),sku:e.string().nullish().describe("Stock-keeping unit, free-form and merchant-defined."),usage:e.union([e.literal("sale"),e.literal("purchase"),e.literal(null)]).nullish().describe("What the item is used for: `sale` (shown when picking items for sales documents), `purchase` (shown when picking items for expenses and purchase orders), or null for both."),barcode:e.string().nullish().describe("GTIN/EAN/UPC barcode"),purchase_price:e.number().nullish().describe("Net purchase price per unit in the entity's currency major unit. Used as the default `unit_cost` for inbound inventory movements when none is given."),total_tax:e.number().min(yPy).max(OPy),entity_id:e.string().max(vPy),financial_category_id:e.string().nullish().describe("Default financial category for this item. In v1 only income categories can be assigned."),metadata:e.union([e.string(),e.number(),e.boolean(),e.null(),e.record(e.string(),e.unknown()),e.array(e.unknown())]),translations:e.object({name:e.object({"en-US":e.string().max(SPy).optional(),"de-DE":e.string().max(hPy).optional(),"it-IT":e.string().max(bPy).optional(),"fr-FR":e.string().max(zPy).optional(),"es-ES":e.string().max(fPy).optional(),"sl-SI":e.string().max(BPy).optional(),"pt-PT":e.string().max(TPy).optional(),"nl-NL":e.string().max(IPy).optional(),"pl-PL":e.string().max(EPy).optional(),"hr-HR":e.string().max(DPy).optional(),"sv-SE":e.string().max(RPy).optional(),"fi-FI":e.string().max(_Py).optional(),"et-EE":e.string().max(NPy).optional(),"bg-BG":e.string().max(MPy).optional(),"cs-CZ":e.string().max(UPy).optional(),"sk-SK":e.string().max(PPy).optional(),"nb-NO":e.string().max(CPy).optional(),"is-IS":e.string().max(wPy).optional(),"hu-HU":e.string().max(APy).optional()}).optional().describe("Translated user-authored document content keyed by full supported locales such as `de-DE`. Values may be empty strings to intentionally blank content for a locale."),description:e.object({"en-US":e.string().max(FPy).optional(),"de-DE":e.string().max(kPy).optional(),"it-IT":e.string().max(jPy).optional(),"fr-FR":e.string().max(HPy).optional(),"es-ES":e.string().max(LPy).optional(),"sl-SI":e.string().max(GPy).optional(),"pt-PT":e.string().max(VPy).optional(),"nl-NL":e.string().max(KPy).optional(),"pl-PL":e.string().max(ZPy).optional(),"hr-HR":e.string().max(qPy).optional(),"sv-SE":e.string().max(WPy).optional(),"fi-FI":e.string().max(YPy).optional(),"et-EE":e.string().max($Py).optional(),"bg-BG":e.string().max(QPy).optional(),"cs-CZ":e.string().max(JPy).optional(),"sk-SK":e.string().max(XPy).optional(),"nb-NO":e.string().max(e2y).optional(),"is-IS":e.string().max(t2y).optional(),"hu-HU":e.string().max(n2y).optional()}).optional().describe("Translated user-authored document content keyed by full supported locales such as `de-DE`. Values may be empty strings to intentionally blank content for a locale.")}).describe("Translated user-authored line-item content keyed by full supported locales. Empty string intentionally blanks the field for that locale."),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"),s2y=/^[a-z]{3,4}_[0-9a-f]{24}$/,CxS=e.object({id:e.stringFormat("resource-id",s2y).describe("Unique resource identifier. Prefix depends on the resource, for example inv_, cus_, or ent_.")}),wxS=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.")}),o2y=/^[a-z]{3,4}_[0-9a-f]{24}$/,AxS=e.object({id:e.stringFormat("resource-id",o2y).describe("Unique resource identifier. Prefix depends on the resource, for example inv_, cus_, or ent_.")}),FxS=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.")}),i2y=36,a2y=500,r2y=2e3,l2y=8,d2y=/^VATEX-[A-Z0-9-]{2,24}$/,u2y=500,c2y=100,p2y=200,m2y=200,x2y=36,g2y=100,y2y=-140737488355328,O2y=0x7fffffffffff,v2y=36,S2y=500,h2y=500,b2y=500,z2y=500,f2y=500,B2y=500,T2y=500,I2y=500,E2y=500,D2y=500,R2y=500,_2y=500,N2y=500,M2y=500,U2y=500,P2y=500,C2y=500,w2y=500,A2y=500,F2y=2e3,k2y=2e3,j2y=2e3,H2y=2e3,L2y=2e3,G2y=2e3,V2y=2e3,K2y=2e3,Z2y=2e3,q2y=2e3,W2y=2e3,Y2y=2e3,$2y=2e3,Q2y=2e3,J2y=2e3,X2y=2e3,eCy=2e3,tCy=2e3,nCy=2e3,kxS=e.object({id:e.string().max(i2y),name:e.string().max(a2y),description:e.string().max(r2y).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."),price_with_tax:e.number().describe("Per-unit price including tax. Stored for fast B2C/POS display regardless of input mode."),unit:e.string().nullish().describe("Default display unit for document lines created from this saved item."),e_invoicing:e.union([e.object({unit_code:e.string().min(1).max(l2y).nullish().describe("Optional XML unit-code override for e-SLOG, Peppol, XRechnung, and ZUGFeRD output. Use a supported UN/ECE Rec 20 / Rec 21 code such as C62, HUR, MGM, MLT, or SET."),vat_category:e.union([e.object({code:e.enum(["Z","E","AE","K","G"]).describe("EN 16931 VAT category code: K, AE, G, E or Z."),exemption_reason_code:e.string().regex(d2y).nullish().describe("VATEX exemption reason code (BT-121). Not allowed with Z."),exemption_reason:e.string().min(1).max(u2y).nullish().describe("Exemption reason text (BT-120). Not allowed with Z.")}).describe("EN 16931 VAT category override for a line without VAT charged."),e.null()]).optional(),italy:e.union([e.object({nature:e.enum(["N2.1","N2.2","N3.1","N3.2"]).describe("Supported zero-VAT treatment: N2.1 territorial exclusion, N2.2 flat-rate (RF19) operations, N3.1 exports, N3.2 intra-community supplies. N2.2 is only accepted for an RF19 (regime forfettario) seller invoicing a domestic Italian buyer; ordinary RF01 sellers, and RF19 sellers invoicing a foreign buyer, must use N2.1/N3.1/N3.2 instead. Other special/exempt treatments are not supported and must not be relabelled."),legal_reference:e.string().min(1).max(c2y).describe("Actual legal basis for this zero-VAT operation, emitted as RiferimentoNormativo.")}),e.null()]).optional(),hungary:e.object({vat_treatment:e.union([e.object({type:e.enum(["exemption"]),case:e.enum(["AAM","TAM","KBAET","KBAUK","EAM","NAM"]).describe("NAV VAT exemption case code (invoiceData.xsd `VatExemptionCaseType`)."),reason:e.string().min(1).max(p2y).describe("Free-text justification for the exemption/out-of-scope case (invoiceData.xsd DetailedReasonType.reason, common:SimpleText200NotBlankType: max 200 characters, non-blank).")}),e.object({type:e.enum(["out_of_scope"]),case:e.enum(["ATK","EUFAD37","EUFADE","EUE","HO"]).describe("NAV out-of-scope VAT case code (invoiceData.xsd `VatOutOfScopeCaseType`)."),reason:e.string().min(1).max(m2y).describe("Free-text justification for the exemption/out-of-scope case (invoiceData.xsd DetailedReasonType.reason, common:SimpleText200NotBlankType: max 200 characters, non-blank).")}),e.object({type:e.enum(["domestic_reverse_charge"])}),e.object({type:e.enum(["no_vat_charge"])}),e.null()]).optional().describe("Explicit Hungarian NAV VAT treatment for a document line, required whenever a line has no positive, non-reverse-charge VAT percentage. Never auto-derived from transaction_type, customer country, or product classification.")}).nullish().describe("Hungary-specific line-level e-invoicing options for NAV reporting. `vat_treatment` is required whenever the line has no positive, non-reverse-charge VAT percentage; NAV country validation itself is enforced elsewhere, not by this schema.")}).describe("Line-level e-invoicing options. `unit_code` overrides only XML unit output; the line `unit` field remains the display unit. `vat_category` overrides the derived EN 16931 VAT category in XRechnung and ZUGFeRD exports. `hungary` carries NAV-specific reporting input."),e.null()]).optional().describe("Default line-level e-invoicing options for document lines created from this saved item."),tax_ids:e.array(e.string().max(x2y)),categories:e.array(e.string().max(g2y)).optional().describe("Free-form groupings used to filter the catalog, typically shown as chips at a point of sale. An item can belong to several. Distinct from `financial_category_id` (accounting) and `classification` (e-invoicing). Empty when the item is in none."),track_inventory:e.boolean().optional().describe("Whether stock tracking is enabled for this item. When true, inventory movements can be recorded and invoicing this item records automatic `sale` movements."),sku:e.string().nullish().describe("Stock-keeping unit, free-form and merchant-defined."),usage:e.union([e.literal("sale"),e.literal("purchase"),e.literal(null)]).nullish().describe("What the item is used for: `sale` (shown when picking items for sales documents), `purchase` (shown when picking items for expenses and purchase orders), or null for both."),barcode:e.string().nullish().describe("GTIN/EAN/UPC barcode"),purchase_price:e.number().nullish().describe("Net purchase price per unit in the entity's currency major unit. Used as the default `unit_cost` for inbound inventory movements when none is given."),total_tax:e.number().min(y2y).max(O2y),entity_id:e.string().max(v2y),financial_category_id:e.string().nullish().describe("Default financial category for this item. In v1 only income categories can be assigned."),metadata:e.union([e.string(),e.number(),e.boolean(),e.null(),e.record(e.string(),e.unknown()),e.array(e.unknown())]),translations:e.object({name:e.object({"en-US":e.string().max(S2y).optional(),"de-DE":e.string().max(h2y).optional(),"it-IT":e.string().max(b2y).optional(),"fr-FR":e.string().max(z2y).optional(),"es-ES":e.string().max(f2y).optional(),"sl-SI":e.string().max(B2y).optional(),"pt-PT":e.string().max(T2y).optional(),"nl-NL":e.string().max(I2y).optional(),"pl-PL":e.string().max(E2y).optional(),"hr-HR":e.string().max(D2y).optional(),"sv-SE":e.string().max(R2y).optional(),"fi-FI":e.string().max(_2y).optional(),"et-EE":e.string().max(N2y).optional(),"bg-BG":e.string().max(M2y).optional(),"cs-CZ":e.string().max(U2y).optional(),"sk-SK":e.string().max(P2y).optional(),"nb-NO":e.string().max(C2y).optional(),"is-IS":e.string().max(w2y).optional(),"hu-HU":e.string().max(A2y).optional()}).optional().describe("Translated user-authored document content keyed by full supported locales such as `de-DE`. Values may be empty strings to intentionally blank content for a locale."),description:e.object({"en-US":e.string().max(F2y).optional(),"de-DE":e.string().max(k2y).optional(),"it-IT":e.string().max(j2y).optional(),"fr-FR":e.string().max(H2y).optional(),"es-ES":e.string().max(L2y).optional(),"sl-SI":e.string().max(G2y).optional(),"pt-PT":e.string().max(V2y).optional(),"nl-NL":e.string().max(K2y).optional(),"pl-PL":e.string().max(Z2y).optional(),"hr-HR":e.string().max(q2y).optional(),"sv-SE":e.string().max(W2y).optional(),"fi-FI":e.string().max(Y2y).optional(),"et-EE":e.string().max($2y).optional(),"bg-BG":e.string().max(Q2y).optional(),"cs-CZ":e.string().max(J2y).optional(),"sk-SK":e.string().max(X2y).optional(),"nb-NO":e.string().max(eCy).optional(),"is-IS":e.string().max(tCy).optional(),"hu-HU":e.string().max(nCy).optional()}).optional().describe("Translated user-authored document content keyed by full supported locales such as `de-DE`. Values may be empty strings to intentionally blank content for a locale.")}).describe("Translated user-authored line-item content keyed by full supported locales. Empty string intentionally blanks the field for that locale."),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"),sCy=/^[a-z]{3,4}_[0-9a-f]{24}$/,jxS=e.object({id:e.stringFormat("resource-id",sCy).describe("Unique resource identifier. Prefix depends on the resource, for example inv_, cus_, or ent_.")}),HxS=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.")}),oCy=/^[a-z]{3,4}_[0-9a-f]{24}$/,LxS=e.object({id:e.stringFormat("resource-id",oCy).describe("Unique resource identifier. Prefix depends on the resource, for example inv_, cus_, or ent_.")}),GxS=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.")}),VxS=e.object({item_id:e.string(),track_inventory:e.boolean(),quantity_on_hand:e.number().describe("Current stock on hand. May be negative if outbound movements outpaced recorded inbound stock."),total_value:e.number().describe("Remaining value of stock on hand, from FIFO cost layers."),average_unit_cost:e.number().nullable().describe("total_value / quantity_on_hand, or null when there is no stock on hand."),layers:e.array(e.object({movement_id:e.string(),occurred_at:e.iso.datetime({}),unit_cost:e.number(),quantity_remaining:e.number()})).describe("Current FIFO cost layers, oldest first."),warehouses:e.array(e.object({warehouse_id:e.string(),warehouse_name:e.string(),quantity_on_hand:e.number(),total_value:e.number().describe("Warehouse quantity \xD7 the entity's average cost. Cost layers are entity-level, not per-warehouse.")})).describe("Per-warehouse quantity and value. Includes every warehouse with a non-zero quantity, plus the entity's default warehouse even when empty.")}),iCy=/^[a-z]{3,4}_[0-9a-f]{24}$/,KxS=e.object({id:e.stringFormat("resource-id",iCy).describe("Unique resource identifier. Prefix depends on the resource, for example inv_, cus_, or ent_.")}),aCy=10,rCy=100,ZxS=e.object({limit:e.number().min(1).max(rCy).default(aCy).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."),warehouse_id:e.string().optional().describe("Filter to movements where this warehouse is the source or destination."),document_id:e.string().nullish().describe("Filter to movements generated automatically by this document (e.g. the invoice or credit note whose finalization recorded them). Movements created manually through this endpoint have no document and never match.")}),qxS=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.")}),WxS=e.object({data:e.array(e.object({id:e.string(),item_id:e.string(),type:e.enum(["purchase","sale","adjustment_in","adjustment_out","sale_return","write_off","transfer"]).describe("Movement type. Inbound: `purchase`, `sale_return`, `adjustment_in`. Outbound: `sale`, `adjustment_out`, `write_off`. `transfer` relocates quantity between warehouses and never touches cost layers. `purchase`, `sale` and `sale_return` are recorded automatically by finalizing an expense, invoice, or credit note, respectively, for a tracked item \u2014 they cannot be created manually."),quantity:e.number(),unit_cost:e.number().nullable(),cost_total:e.number().describe("Total cost for this movement. For inbound movements this is quantity \xD7 unit_cost; for outbound movements it is derived from the FIFO layers consumed."),occurred_at:e.iso.datetime({}),warehouse_id:e.string().describe("Warehouse this movement affects (source warehouse for `transfer`)."),destination_warehouse_id:e.string().nullable().describe("Destination warehouse for `transfer` movements; null otherwise."),source_movement_id:e.string().nullable().describe("For `sale_return`: the `sale` movement being reversed, when known."),source_document_id:e.string().nullable().describe("For `sale_return`: the invoice being reversed, used to derive cost when `source_movement_id` is unavailable."),document_id:e.string().nullable().describe("The document that generated this movement, when it was created automatically (e.g. an invoice)."),document_type:e.string().nullable().describe("The kind of document that generated this movement automatically, e.g. `invoice` (sale), `credit_note` (sale_return), or `expense` (purchase). Null for manually-recorded movements."),note:e.string().nullable(),created_at:e.iso.datetime({}),updated_at:e.iso.datetime({})})),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")}),lCy=/^[a-z]{3,4}_[0-9a-f]{24}$/,YxS=e.object({id:e.stringFormat("resource-id",lCy).describe("Unique resource identifier. Prefix depends on the resource, for example inv_, cus_, or ent_.")}),$xS=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.")}),dCy=0,uCy=0,cCy=500,QxS=e.object({type:e.enum(["adjustment_in","adjustment_out","write_off","transfer"]).describe("Movement type for manually-recorded movements. `purchase`, `sale` and `sale_return` are recorded automatically by finalizing an expense, invoice, or credit note, respectively, and cannot be created through this endpoint. Use `adjustment_in` (with `unit_cost`) for opening stock, stock counts, or returns received without a credit note."),quantity:e.number().gt(dCy).describe("Movement quantity. Always positive; direction is determined by `type`."),unit_cost:e.number().min(uCy).nullish().describe("Per-unit cost in the entity's currency major unit. Required for `adjustment_in` unless the item has a `purchase_price`; ignored (forced to null) for outbound movements and `transfer`, whose cost is derived from FIFO layers."),occurred_at:e.iso.datetime({}).nullish().describe("When the movement occurred (ISO 8601 datetime with offset). Defaults to now."),warehouse_id:e.string().nullish().describe("Warehouse this movement affects (source warehouse for `transfer`). Omitted resolves to the business unit's default warehouse (if configured) or the entity's default warehouse, created on demand."),destination_warehouse_id:e.string().nullish().describe("Required for `transfer`: the warehouse quantity moves into. Must differ from `warehouse_id`."),note:e.string().max(cCy).nullish().describe("Optional free-text note about this movement.")}),pCy=/^[a-z]{3,4}_[0-9a-f]{24}$/,mCy=/^[a-z]{3,4}_[0-9a-f]{24}$/,JxS=e.object({id:e.stringFormat("resource-id",pCy).describe("Unique resource identifier. Prefix depends on the resource, for example inv_, cus_, or ent_."),movementId:e.stringFormat("resource-id",mCy).describe("Inventory movement identifier.")}),XxS=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 pt={};W(pt,{CreateMigrationJobBody:()=>lgS,CreateMigrationJobHeader:()=>rgS,GetLegacyMigrationOrganizationHeader:()=>igS,GetLegacyMigrationOrganizationParams:()=>sgS,GetLegacyMigrationOrganizationQueryParams:()=>ogS,GetLegacyMigrationOrganizationResponse:()=>agS,GetMigrationJobHeader:()=>pgS,GetMigrationJobParams:()=>cgS,GetMigrationJobResponse:()=>mgS,LegacyMigrationAuthBody:()=>tgS,LegacyMigrationAuthHeader:()=>egS,LegacyMigrationAuthResponse:()=>ngS,ListMigrationJobsHeader:()=>dgS,ListMigrationJobsResponse:()=>ugS,createMigrationJobHeaderXAccountIdRegExp:()=>yCy,getLegacyMigrationOrganizationHeaderXAccountIdRegExp:()=>gCy,getMigrationJobHeaderXAccountIdRegExp:()=>vCy,legacyMigrationAuthHeaderXAccountIdRegExp:()=>xCy,listMigrationJobsHeaderXAccountIdRegExp:()=>OCy});var xCy=/^acc_[0-9a-fA-F]{24}$/,egS=e.object({"x-account-id":e.string().regex(xCy).optional().describe("Account Id on which the request is made. Optional if user is part of only one account.")}),tgS=e.object({email:e.email().describe("Email for legacy Space Invoices account"),password:e.string().min(1).describe("Password for legacy Space Invoices account")}),ngS=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")}),sgS=e.object({legacyOrgId:e.string().describe("Legacy organization ID")}),ogS=e.object({legacy_session_id:e.string().min(1).describe("Temporary legacy session ID created after legacy authentication")}),gCy=/^acc_[0-9a-fA-F]{24}$/,igS=e.object({"x-account-id":e.string().regex(gCy).optional().describe("Account Id on which the request is made. Optional if user is part of only one account.")}),agS=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"),unsupported:e.array(e.object({code:e.enum(["fiscalization_series","accounting_categories","inventory_and_pricing","sales_integrations","webhooks"]).describe("Unsupported migration warning code"),label:e.string().describe("User-facing label for the unsupported data group"),description:e.string().describe("Explanation of what must be set up manually"),count:e.number().describe("Records still requiring manual follow-up after migration"),collections:e.array(e.string()).describe("Legacy collections covered by the warning group"),coverage:e.object({migratable_count:e.number().describe("Records that can be migrated automatically"),total_count:e.number().describe("Total relevant legacy records detected")}).optional().describe("Optional automatic migration coverage details for partially supported groups")})).describe("Unsupported legacy data groups that require confirmation before migration"),requires_confirmation:e.boolean().describe("Whether the user must confirm migration despite unsupported legacy data"),subscription_review:e.object({legacy_subscription:e.object({gateway:e.enum(["braintree","bank","paypal","unknown"]),tier:e.number(),plan_name:e.string(),duration_months:e.number(),additions:e.array(e.string()),active_until:e.string().nullable(),price_cents:e.number().nullable()}).nullable(),recommended_plan:e.object({slug:e.string(),name:e.string(),billing_interval:e.enum(["monthly","yearly"]),price_cents:e.number(),base_price_cents:e.number(),extra_store_count:e.number(),extra_store_price_cents:e.number(),reasons:e.array(e.string())}).nullable(),trial_offer:e.object({eligible:e.boolean(),trial_days:e.number()}),price_difference_cents:e.number().nullable(),renewal_payment_provider:e.union([e.literal("braintree"),e.literal("bank"),e.literal("paypal"),e.literal("unknown"),e.literal(null)]).nullable(),requires_payment_method_update:e.boolean(),usage_signals:e.object({member_count:e.number(),recurring_count:e.number(),sales_integrations_count:e.number(),billable_store_count:e.number(),business_units_count:e.number(),financial_categories_count:e.number(),has_furs:e.boolean()})}).nullable().describe("Legacy subscription snapshot and recommended Apollo white-label plan for this organization")}),yCy=/^acc_[0-9a-fA-F]{24}$/,rgS=e.object({"x-account-id":e.string().regex(yCy).optional().describe("Account Id on which the request is made. Optional if user is part of only one account.")}),lgS=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")}),OCy=/^acc_[0-9a-fA-F]{24}$/,dgS=e.object({"x-account-id":e.string().regex(OCy).optional().describe("Account Id on which the request is made. Optional if user is part of only one account.")}),ugS=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")}))}),cgS=e.object({id:e.string().describe("Migration job ID")}),vCy=/^acc_[0-9a-fA-F]{24}$/,pgS=e.object({"x-account-id":e.string().regex(vCy).optional().describe("Account Id on which the request is made. Optional if user is part of only one account.")}),mgS=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 mt={};W(mt,{AuthorizeMagentoBody:()=>bgS,AuthorizeMagentoHeader:()=>hgS,AuthorizeMagentoResponse:()=>zgS,AuthorizeShopifyBody:()=>ggS,AuthorizeShopifyHeader:()=>xgS,AuthorizeShopifyResponse:()=>ygS,AuthorizeWooCommerceBody:()=>vgS,AuthorizeWooCommerceHeader:()=>OgS,AuthorizeWooCommerceResponse:()=>SgS,ConnectCustomStoreBody:()=>jgS,ConnectCustomStoreHeader:()=>kgS,CreateOrderIntegrationBody:()=>YgS,CreateOrderIntegrationHeader:()=>WgS,DeleteOrderIntegrationHeader:()=>r0S,DeleteOrderIntegrationParams:()=>a0S,GetMagentoAuthorizationHeader:()=>BgS,GetMagentoAuthorizationParams:()=>fgS,GetMagentoAuthorizationResponse:()=>TgS,GetOrderIntegrationByIdHeader:()=>e0S,GetOrderIntegrationByIdParams:()=>XgS,GetOrderIntegrationByIdResponse:()=>t0S,GetOrderIntegrationsHeader:()=>QgS,GetOrderIntegrationsQueryParams:()=>$gS,GetOrderIntegrationsResponse:()=>JgS,PromoteShopifyBillingHeader:()=>RgS,PromoteShopifyBillingParams:()=>DgS,PromoteShopifyBillingResponse:()=>_gS,PushCustomStoreOrderBody:()=>ZgS,PushCustomStoreOrderHeader:()=>KgS,PushCustomStoreOrderParams:()=>VgS,PushCustomStoreOrderResponse:()=>qgS,ResumeShopifyInstallBody:()=>IgS,ResumeShopifyInstallResponse:()=>EgS,RotateCustomStoreSecretHeader:()=>LgS,RotateCustomStoreSecretParams:()=>HgS,RotateCustomStoreSecretResponse:()=>GgS,SyncOrderIntegrationBody:()=>AgS,SyncOrderIntegrationHeader:()=>wgS,SyncOrderIntegrationParams:()=>CgS,SyncOrderIntegrationResponse:()=>FgS,SyncShopifyOrdersBody:()=>UgS,SyncShopifyOrdersHeader:()=>MgS,SyncShopifyOrdersParams:()=>NgS,SyncShopifyOrdersResponse:()=>PgS,UpdateOrderIntegrationBody:()=>o0S,UpdateOrderIntegrationHeader:()=>s0S,UpdateOrderIntegrationParams:()=>n0S,UpdateOrderIntegrationResponse:()=>i0S,authorizeMagentoBodyAutoProcessDelaySecondsMin:()=>ICy,authorizeMagentoBodyBusinessUnitIdMax:()=>ECy,authorizeMagentoBodyReconnectIntegrationIdMax:()=>RCy,authorizeMagentoBodyStoreUrlMax:()=>DCy,authorizeShopifyBodyAutoProcessDelaySecondsMin:()=>hCy,authorizeShopifyBodyBusinessUnitIdMax:()=>bCy,authorizeShopifyBodyPendingInstallTokenMax:()=>SCy,authorizeWooCommerceBodyAutoProcessDelaySecondsMin:()=>zCy,authorizeWooCommerceBodyBusinessUnitIdMax:()=>fCy,authorizeWooCommerceBodyReconnectIntegrationIdMax:()=>TCy,authorizeWooCommerceBodyStoreUrlMax:()=>BCy,connectCustomStoreBodyAutoProcessDelaySecondsMin:()=>jCy,connectCustomStoreBodyBusinessUnitIdMax:()=>HCy,connectCustomStoreBodyNameMax:()=>kCy,connectCustomStoreBodyStoreUrlMax:()=>LCy,createOrderIntegrationBodyBusinessPremiseIdMax:()=>Cwy,createOrderIntegrationBodyBusinessUnitIdMax:()=>Pwy,createOrderIntegrationBodyElectronicDeviceIdMax:()=>wwy,createOrderIntegrationBodyLocaleMax:()=>Uwy,createOrderIntegrationBodySourceDefault:()=>Mwy,deleteOrderIntegrationPathIdRegExp:()=>NAy,getMagentoAuthorizationPathIdRegExp:()=>_Cy,getOrderIntegrationByIdPathIdRegExp:()=>Jwy,getOrderIntegrationByIdResponseOneAutoProcessDelaySecondsMax:()=>rAy,getOrderIntegrationByIdResponseOneAutoProcessDelaySecondsMin:()=>aAy,getOrderIntegrationByIdResponseOneBusinessPremiseIdMax:()=>uAy,getOrderIntegrationByIdResponseOneBusinessUnitIdMax:()=>dAy,getOrderIntegrationByIdResponseOneDefaultPaymentTypeMax:()=>iAy,getOrderIntegrationByIdResponseOneElectronicDeviceIdMax:()=>cAy,getOrderIntegrationByIdResponseOneEntityIdMax:()=>eAy,getOrderIntegrationByIdResponseOneIdMax:()=>Xwy,getOrderIntegrationByIdResponseOneLocaleMax:()=>lAy,getOrderIntegrationByIdResponseOneNameMax:()=>tAy,getOrderIntegrationByIdResponseOneScopesMax:()=>sAy,getOrderIntegrationByIdResponseOneShopDomainMax:()=>nAy,getOrderIntegrationByIdResponseOneStoreUrlMax:()=>oAy,getOrderIntegrationsQueryLimitDefault:()=>Awy,getOrderIntegrationsQueryLimitMax:()=>Fwy,getOrderIntegrationsResponseDataItemOneAutoProcessDelaySecondsMax:()=>qwy,getOrderIntegrationsResponseDataItemOneAutoProcessDelaySecondsMin:()=>Zwy,getOrderIntegrationsResponseDataItemOneBusinessPremiseIdMax:()=>$wy,getOrderIntegrationsResponseDataItemOneBusinessUnitIdMax:()=>Ywy,getOrderIntegrationsResponseDataItemOneDefaultPaymentTypeMax:()=>Kwy,getOrderIntegrationsResponseDataItemOneElectronicDeviceIdMax:()=>Qwy,getOrderIntegrationsResponseDataItemOneEntityIdMax:()=>jwy,getOrderIntegrationsResponseDataItemOneIdMax:()=>kwy,getOrderIntegrationsResponseDataItemOneLocaleMax:()=>Wwy,getOrderIntegrationsResponseDataItemOneNameMax:()=>Hwy,getOrderIntegrationsResponseDataItemOneScopesMax:()=>Gwy,getOrderIntegrationsResponseDataItemOneShopDomainMax:()=>Lwy,getOrderIntegrationsResponseDataItemOneStoreUrlMax:()=>Vwy,promoteShopifyBillingPathIdRegExp:()=>NCy,pushCustomStoreOrderBodyBillingAddressAddress2Max:()=>iwy,pushCustomStoreOrderBodyBillingAddressAddressMax:()=>owy,pushCustomStoreOrderBodyBillingAddressCityMax:()=>awy,pushCustomStoreOrderBodyBillingAddressCountryCodeMax:()=>cwy,pushCustomStoreOrderBodyBillingAddressCountryCodeMin:()=>uwy,pushCustomStoreOrderBodyBillingAddressCountryMax:()=>dwy,pushCustomStoreOrderBodyBillingAddressPostCodeMax:()=>lwy,pushCustomStoreOrderBodyBillingAddressStateMax:()=>rwy,pushCustomStoreOrderBodyCurrencyCodeRegExp:()=>WCy,pushCustomStoreOrderBodyCustomerCompanyNameMax:()=>ewy,pushCustomStoreOrderBodyCustomerCompanyNumberMax:()=>nwy,pushCustomStoreOrderBodyCustomerEmailMax:()=>JCy,pushCustomStoreOrderBodyCustomerNameMax:()=>QCy,pushCustomStoreOrderBodyCustomerNotesMax:()=>swy,pushCustomStoreOrderBodyCustomerPhoneMax:()=>XCy,pushCustomStoreOrderBodyCustomerTaxNumberMax:()=>twy,pushCustomStoreOrderBodyEventIdMax:()=>qCy,pushCustomStoreOrderBodyIdMax:()=>KCy,pushCustomStoreOrderBodyItemsItemDiscountMin:()=>Twy,pushCustomStoreOrderBodyItemsItemIdMax:()=>hwy,pushCustomStoreOrderBodyItemsItemNameMax:()=>bwy,pushCustomStoreOrderBodyItemsItemQuantityExclusiveMin:()=>fwy,pushCustomStoreOrderBodyItemsItemSkuMax:()=>zwy,pushCustomStoreOrderBodyItemsItemTaxRateMax:()=>Ewy,pushCustomStoreOrderBodyItemsItemTaxRateMin:()=>Iwy,pushCustomStoreOrderBodyItemsItemUnitMax:()=>Dwy,pushCustomStoreOrderBodyItemsItemUnitPriceMin:()=>Bwy,pushCustomStoreOrderBodyItemsMax:()=>Rwy,pushCustomStoreOrderBodyLocaleMax:()=>$Cy,pushCustomStoreOrderBodyOrderNumberMax:()=>ZCy,pushCustomStoreOrderBodyPaymentMethodMax:()=>_wy,pushCustomStoreOrderBodyPaymentReferenceMax:()=>Nwy,pushCustomStoreOrderBodyShippingAddressAddress2Max:()=>mwy,pushCustomStoreOrderBodyShippingAddressAddressMax:()=>pwy,pushCustomStoreOrderBodyShippingAddressCityMax:()=>xwy,pushCustomStoreOrderBodyShippingAddressCountryCodeMax:()=>Swy,pushCustomStoreOrderBodyShippingAddressCountryCodeMin:()=>vwy,pushCustomStoreOrderBodyShippingAddressCountryMax:()=>Owy,pushCustomStoreOrderBodyShippingAddressPostCodeMax:()=>ywy,pushCustomStoreOrderBodyShippingAddressStateMax:()=>gwy,pushCustomStoreOrderBodyTotalWithTaxMin:()=>YCy,pushCustomStoreOrderPathIdRegExp:()=>VCy,rotateCustomStoreSecretPathIdRegExp:()=>GCy,syncOrderIntegrationBodyCursorMax:()=>ACy,syncOrderIntegrationBodyDefault:()=>wCy,syncOrderIntegrationBodyLimitMax:()=>FCy,syncOrderIntegrationPathIdRegExp:()=>CCy,syncShopifyOrdersBodyCursorMax:()=>UCy,syncShopifyOrdersBodyLimitMax:()=>PCy,syncShopifyOrdersPathIdRegExp:()=>MCy,updateOrderIntegrationBodyAutoProcessDelaySecondsMin:()=>OAy,updateOrderIntegrationBodyBusinessPremiseIdMax:()=>gAy,updateOrderIntegrationBodyBusinessUnitIdMax:()=>xAy,updateOrderIntegrationBodyElectronicDeviceIdMax:()=>yAy,updateOrderIntegrationBodyLocaleMax:()=>mAy,updateOrderIntegrationPathIdRegExp:()=>pAy,updateOrderIntegrationResponseOneAutoProcessDelaySecondsMax:()=>IAy,updateOrderIntegrationResponseOneAutoProcessDelaySecondsMin:()=>TAy,updateOrderIntegrationResponseOneBusinessPremiseIdMax:()=>RAy,updateOrderIntegrationResponseOneBusinessUnitIdMax:()=>DAy,updateOrderIntegrationResponseOneDefaultPaymentTypeMax:()=>BAy,updateOrderIntegrationResponseOneElectronicDeviceIdMax:()=>_Ay,updateOrderIntegrationResponseOneEntityIdMax:()=>SAy,updateOrderIntegrationResponseOneIdMax:()=>vAy,updateOrderIntegrationResponseOneLocaleMax:()=>EAy,updateOrderIntegrationResponseOneNameMax:()=>hAy,updateOrderIntegrationResponseOneScopesMax:()=>zAy,updateOrderIntegrationResponseOneShopDomainMax:()=>bAy,updateOrderIntegrationResponseOneStoreUrlMax:()=>fAy});var xgS=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.")}),SCy=80,hCy=0,bCy=36,ggS=e.object({shop_domain:e.string().min(1).describe("Shopify shop domain, e.g. myshop.myshopify.com"),name:e.string().optional().describe("Integration name"),app_store_install:e.boolean().nullish().describe("Deprecated client hint; verified App Store launches require app_store_launch."),app_store_launch:e.object({shop:e.string().min(1),host:e.string().min(1),hmac:e.string().min(1),timestamp:e.string().min(1)}).nullish().describe("Original signed Shopify App Store launch parameters."),pending_install_token:e.string().min(1).max(SCy).nullish().describe("Opaque continuation token returned after Shopify OAuth. Used to bind an authenticated App Store install to an Apollo entity."),auto_process:e.boolean().optional().describe("Auto-create invoices on order receipt"),auto_process_on:e.union([e.literal("created"),e.literal("paid"),e.literal("fulfilled"),e.literal(null)]).nullish().describe("Order lifecycle event that triggers automatic processing"),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(hCy).optional().describe("Seconds to wait before processing (0 = immediate)"),business_unit_id:e.string().max(bCy).nullish().describe("Business unit to use for auto-created documents.")}),ygS=e.object({redirect_url:e.url()}),OgS=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.")}),zCy=0,fCy=36,BCy=2048,TCy=36,vgS=e.object({name:e.string().nullish().describe("Integration name"),auto_process:e.boolean().nullish().describe("Auto-create invoices on order receipt"),auto_process_on:e.union([e.literal("created"),e.literal("paid"),e.literal("fulfilled"),e.literal(null)]).nullish().describe("Order lifecycle event that triggers automatic processing"),send_invoice_email:e.boolean().nullish().describe("Auto-send invoice email"),issue_invoice_for_bank:e.boolean().nullish().describe("Issue invoice (vs estimate) for unpaid bank transfers"),issue_invoice_on_complete:e.boolean().nullish().describe("Delay document until order is fulfilled/complete"),auto_process_delay_seconds:e.number().min(zCy).nullish().describe("Seconds to wait before processing (0 = immediate)"),business_unit_id:e.string().max(fCy).nullish().describe("Business unit to use for auto-created documents."),store_url:e.url().max(BCy).describe("WooCommerce store URL, including a WordPress subdirectory when applicable."),reconnect_integration_id:e.string().max(TCy).nullish().describe("Migrated WooCommerce integration to reconnect in place. Omit when connecting a new store.")}),SgS=e.object({redirect_url:e.url()}),hgS=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.")}),ICy=0,ECy=36,DCy=2048,RCy=36,bgS=e.object({name:e.string().nullish().describe("Integration name"),auto_process:e.boolean().nullish().describe("Auto-create invoices on order receipt"),auto_process_on:e.union([e.literal("created"),e.literal("paid"),e.literal(null)]).nullish().describe("Order lifecycle event that triggers automatic processing. The fulfilled trigger isn't available for Magento stores."),send_invoice_email:e.boolean().nullish().describe("Auto-send invoice email"),issue_invoice_for_bank:e.boolean().nullish().describe("Issue invoice (vs estimate) for unpaid bank transfers"),issue_invoice_on_complete:e.boolean().nullish().describe("Delay document until order is fulfilled/complete"),auto_process_delay_seconds:e.number().min(ICy).nullish().describe("Seconds to wait before processing (0 = immediate)"),business_unit_id:e.string().max(ECy).nullish().describe("Business unit to use for auto-created documents."),store_url:e.url().max(DCy).describe("Magento store base URL, including a path prefix when the store is served from a subdirectory."),reconnect_integration_id:e.string().max(RCy).nullish().describe("Existing Magento integration to reconnect in place with fresh credentials. Omit when connecting a new store.")}),zgS=e.object({authorization_id:e.string().describe("Authorization identifier; poll GET /order-integrations/magento/authorizations/{id}"),endpoint_url:e.url().describe("Endpoint URL to paste into the Magento integration form. Treat it as a secret."),identity_link_url:e.url().describe("Identity link URL to paste into the Magento integration form. Treat it as a secret."),expires_at:e.iso.datetime({}).describe("When this authorization stops working")}),_Cy=/^oipa_[0-9a-f]{24}$/,fgS=e.object({id:e.stringFormat("resource-id",_Cy).describe("Magento authorization identifier returned by the authorize endpoint")}),BgS=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.")}),TgS=e.object({id:e.string(),status:e.enum(["awaiting_credentials","awaiting_activation","connected","failed","expired"]).describe("awaiting_credentials: Magento has not posted its credentials yet. awaiting_activation: credentials received, waiting for the activation popup. connected: done. failed: see failure_reason. expired: start a new connection."),integration_id:e.string().nullable().describe("Set once the status is connected"),failure_reason:e.union([e.literal("missing_permissions"),e.literal("unauthorized"),e.literal("unreachable"),e.literal("token_exchange_failed"),e.literal(null)]).nullable().describe("Why the last activation attempt failed, when known"),expires_at:e.iso.datetime({})}),IgS=e.object({shop:e.string().min(1)}),EgS=e.object({redirect_url:e.url(),entity_id:e.string(),frontend_origin:e.url().nullish()}),NCy=/^[a-z]{3,4}_[0-9a-f]{24}$/,DgS=e.object({id:e.stringFormat("resource-id",NCy).describe("Unique resource identifier. Prefix depends on the resource, for example inv_, cus_, or ent_.")}),RgS=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.")}),_gS=e.object({redirect_url:e.url()}),MCy=/^[a-z]{3,4}_[0-9a-f]{24}$/,NgS=e.object({id:e.stringFormat("resource-id",MCy).describe("Unique resource identifier. Prefix depends on the resource, for example inv_, cus_, or ent_.")}),MgS=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.")}),UCy=2048,PCy=250,UgS=e.object({updated_since:e.iso.datetime({}).optional().describe("Inclusive Shopify update window start."),updated_until:e.iso.datetime({}).optional().describe("Inclusive Shopify update window end."),cursor:e.string().min(1).max(UCy).optional().describe("Opaque cursor returned by an incomplete prior sync to resume its exact window."),resumable:e.boolean().optional().describe("Opt into bounded, resumable processing. Omit for legacy one-request completion; cursor requests are always bounded."),limit:e.number().min(1).max(PCy).optional().describe("Shopify page size. The server also enforces total-order and page-count caps.")}),PgS=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(),complete:e.boolean().optional(),truncated:e.boolean().optional(),pages_fetched:e.number().optional(),completion_state:e.enum(["complete","resumable"]).optional(),next_cursor:e.string().optional()}),CCy=/^oint_[0-9a-f]{24}$/,CgS=e.object({id:e.stringFormat("resource-id",CCy).describe("Unique order integration identifier")}),wgS=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.")}),wCy={},ACy=2048,FCy=100,AgS=e.object({updated_since:e.iso.datetime({}).nullish(),updated_until:e.iso.datetime({}).nullish(),cursor:e.string().min(1).max(ACy).nullish(),limit:e.number().min(1).max(FCy).nullish()}).default(wCy),FgS=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(),complete:e.boolean(),truncated:e.boolean(),pages_fetched:e.number(),completion_state:e.enum(["complete","resumable"]),next_cursor:e.string().optional()}),kgS=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.")}),kCy=255,jCy=0,HCy=36,LCy=2048,jgS=e.object({name:e.string().min(1).max(kCy).describe("Integration name"),auto_process:e.boolean().nullish().describe("Auto-create invoices on order receipt"),auto_process_on:e.union([e.literal("created"),e.literal("paid"),e.literal("fulfilled"),e.literal(null)]).nullish().describe("Order lifecycle event that triggers automatic processing"),send_invoice_email:e.boolean().nullish().describe("Auto-send invoice email"),issue_invoice_for_bank:e.boolean().nullish().describe("Issue invoice (vs estimate) for unpaid bank transfers"),issue_invoice_on_complete:e.boolean().nullish().describe("Delay document until order is fulfilled/complete"),auto_process_delay_seconds:e.number().min(jCy).nullish().describe("Seconds to wait before processing (0 = immediate)"),business_unit_id:e.string().max(HCy).nullish().describe("Business unit to use for auto-created documents."),store_url:e.url().max(LCy).nullish().describe("Public URL of the store, shown for reference. One active connection per URL.")}),GCy=/^oint_[0-9a-f]{24}$/,HgS=e.object({id:e.stringFormat("resource-id",GCy).describe("Unique order integration identifier")}),LgS=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.")}),GgS=e.object({webhook_url:e.url().describe("Endpoint your store posts signed order webhooks to"),signing_secret:e.string().describe("HMAC-SHA256 signing secret. Shown only in this response; store it securely.")}),VCy=/^oint_[0-9a-f]{24}$/,VgS=e.object({id:e.stringFormat("resource-id",VCy).describe("Unique order integration identifier")}),KgS=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.")}),KCy=255,ZCy=100,qCy=255,WCy=/^[A-Z]{3}$/,YCy=0,$Cy=20,QCy=255,JCy=255,XCy=50,ewy=255,twy=50,nwy=50,swy=2e3,owy=500,iwy=500,awy=255,rwy=255,lwy=50,dwy=255,uwy=2,cwy=2,pwy=500,mwy=500,xwy=255,gwy=255,ywy=50,Owy=255,vwy=2,Swy=2,hwy=255,bwy=500,zwy=255,fwy=0,Bwy=0,Twy=0,Iwy=0,Ewy=100,Dwy=50,Rwy=500,_wy=100,Nwy=255,ZgS=e.object({id:e.string().min(1).max(KCy).describe("Your store's unique order ID. Repeated pushes update the same order."),order_number:e.string().max(ZCy).nullish().describe("Order number shown to buyers"),event_id:e.string().max(qCy).nullish().describe("Stable ID of this logical event (e.g. `1042:paid`), kept the same across retries. Every applied event ID is remembered per order, so any repeated ID is acknowledged without effects. Takes precedence over the X-SI-Event-Id header."),currency_code:e.string().regex(WCy),prices_include_tax:e.boolean().nullish().describe("Whether `unit_price` and `discount` include tax. Defaults to false."),total_with_tax:e.number().min(YCy).describe("Order total the buyer pays. Lines must reconcile to it within rounding: 0.02, or half a cent per line for larger orders."),ordered_at:e.iso.datetime({}).nullish(),locale:e.string().max($Cy).nullish().describe("Buyer or checkout language, used for the document language"),customer:e.object({name:e.string().max(QCy).nullish(),email:e.email().max(JCy).nullish(),phone:e.string().max(XCy).nullish(),company_name:e.string().max(ewy).nullish(),tax_number:e.string().max(twy).nullish().describe("Buyer VAT or tax number, kept as text"),company_number:e.string().max(nwy).nullish(),is_business:e.boolean().nullish(),notes:e.string().max(swy).nullish()}).nullish(),billing_address:e.object({address:e.string().max(owy).nullish(),address_2:e.string().max(iwy).nullish(),city:e.string().max(awy).nullish(),state:e.string().max(rwy).nullish(),post_code:e.string().max(lwy).nullish(),country:e.string().max(dwy).nullish(),country_code:e.string().min(uwy).max(cwy).nullish().describe("ISO 3166-1 alpha-2 country code")}).nullish(),shipping_address:e.object({address:e.string().max(pwy).nullish(),address_2:e.string().max(mwy).nullish(),city:e.string().max(xwy).nullish(),state:e.string().max(gwy).nullish(),post_code:e.string().max(ywy).nullish(),country:e.string().max(Owy).nullish(),country_code:e.string().min(vwy).max(Swy).nullish().describe("ISO 3166-1 alpha-2 country code")}).nullish(),items:e.array(e.object({id:e.string().max(hwy).nullish().describe("Your line identifier"),kind:e.union([e.literal("line_item"),e.literal("shipping"),e.literal("fee"),e.literal(null)]).nullish().describe("Line type. Defaults to `line_item`."),name:e.string().min(1).max(bwy),sku:e.string().max(zwy).nullish().describe("Links product lines to the catalog item with this SKU"),quantity:e.number().gt(fwy),unit_price:e.number().min(Bwy).describe("Price per unit. Gross when `prices_include_tax` is true, net otherwise."),discount:e.number().min(Twy).nullish().describe("Discount amount for the whole line, on the same tax basis as `unit_price`."),tax_rate:e.number().min(Iwy).max(Ewy).nullish().describe("Tax percentage. Send 0 for an explicit zero rate; omit when the line has no tax."),unit:e.string().max(Dwy).nullish()})).min(1).max(Rwy),payment_method:e.string().max(_wy).nullish().describe("How the buyer pays: `card`, `paypal`, `bank_transfer`, `cash` (cash on delivery) or `coupon`. Common spellings such as `Bank transfer`, `cod` or `cash_on_delivery` are recognized; other values count as online payments."),payment_reference:e.string().max(Nwy).nullish().describe("Payment provider transaction reference"),paid:e.boolean().nullish().describe("Whether the order is fully paid. Defaults to false."),paid_at:e.iso.datetime({}).nullish(),fulfilled:e.boolean().nullish().describe("Whether the order is shipped/completed."),fulfilled_at:e.iso.datetime({}).nullish(),cancelled:e.boolean().nullish().describe("Cancelled orders never create new documents."),cancelled_at:e.iso.datetime({}).nullish(),refunded:e.boolean().nullish().describe("Fully refunded. An issued invoice is voided with a credit note."),refunded_at:e.iso.datetime({}).nullish()}).describe("Full current snapshot of a custom store order. Send the complete order on every push; omitted lifecycle flags mean false."),qgS=e.object({order_id:e.string().nullable().describe("Order ID, or null when the push was ignored for an unknown order"),action:e.enum(["created","updated","ignored"]).describe("`ignored` means the push changed nothing, e.g. a repeated event_id"),processing_queued:e.boolean().describe("Whether document processing was started")}),WgS=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.")}),Mwy="manual",Uwy=10,Pwy=36,Cwy=36,wwy=36,YgS=e.object({name:e.string().min(1),source:e.enum(["shopify","woocommerce","magento","custom","manual"]).default(Mwy),auto_process:e.boolean().optional(),auto_reissue_on_update:e.boolean().optional(),classify_imported_items_as_products:e.boolean().nullish().describe("Treat otherwise-unclassified regular imported order lines as products. Null is equivalent to false."),locale:e.string().max(Uwy).nullish(),business_unit_id:e.string().max(Pwy).nullish(),business_premise_id:e.string().max(Cwy).nullish(),electronic_device_id:e.string().max(wwy).nullish(),metadata:e.record(e.string(),e.string()).refine(d=>Object.keys(d).length<=50,"Metadata can have maximum 50 properties").nullish().describe("Custom string key-value data for your own use, with up to 50 properties. Keys are opaque and may contain periods. Useful for storing external IDs, tags, or integration data.")}),Awy=10,Fwy=100,$gS=e.object({limit:e.number().min(1).max(Fwy).default(Awy).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**Array columns** (such as an item\'s `categories`) compare as sets: a direct value asks whether the list contains it, `contains` takes an array and requires all of them, `in` matches any of them, and `notIn` matches none. Scalar operators such as `gt` do not apply and are ignored.\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.
197
197
  Searches are case-insensitive and match partial strings.
198
198
  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.")}),QgS=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.")}),kwy=36,jwy=36,Hwy=255,Lwy=255,Gwy=1e3,Vwy=2048,Kwy=20,Zwy=-2147483648,qwy=2147483647,Wwy=10,Ywy=36,$wy=36,Qwy=36,JgS=e.object({data:e.array(e.object({id:e.string().max(kwy),entity_id:e.string().max(jwy),name:e.string().max(Hwy),source:e.enum(["shopify","woocommerce","magento","custom","manual"]).describe("Integration source platform"),is_active:e.boolean(),shop_domain:e.string().max(Lwy).nullish(),scopes:e.string().max(Gwy).nullish(),store_url:e.string().max(Vwy).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(Kwy).nullish(),send_invoice_email:e.boolean(),send_estimate_email:e.boolean(),attach_pdf_to_email:e.boolean(),issue_invoice_for_bank:e.boolean(),issue_invoice_on_complete:e.boolean(),auto_process_delay_seconds:e.number().min(Zwy).max(qwy),auto_reissue_on_update:e.boolean(),classify_imported_items_as_products:e.boolean().optional().describe("Treat otherwise-unclassified regular imported order lines as products. Shipping and fee lines are never affected."),locale:e.string().max(Wwy).nullish(),business_unit_id:e.string().max(Ywy).nullish(),business_premise_id:e.string().max($wy).nullish(),electronic_device_id:e.string().max(Qwy).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")}),Jwy=/^[a-z]{3,4}_[0-9a-f]{24}$/,XgS=e.object({id:e.stringFormat("resource-id",Jwy).describe("Unique resource identifier. Prefix depends on the resource, for example inv_, cus_, or ent_.")}),e0S=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.")}),Xwy=36,eAy=36,tAy=255,nAy=255,sAy=1e3,oAy=2048,iAy=20,aAy=-2147483648,rAy=2147483647,lAy=10,dAy=36,uAy=36,cAy=36,t0S=e.object({id:e.string().max(Xwy),entity_id:e.string().max(eAy),name:e.string().max(tAy),source:e.enum(["shopify","woocommerce","magento","custom","manual"]).describe("Integration source platform"),is_active:e.boolean(),shop_domain:e.string().max(nAy).nullish(),scopes:e.string().max(sAy).nullish(),store_url:e.string().max(oAy).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(iAy).nullish(),send_invoice_email:e.boolean(),send_estimate_email:e.boolean(),attach_pdf_to_email:e.boolean(),issue_invoice_for_bank:e.boolean(),issue_invoice_on_complete:e.boolean(),auto_process_delay_seconds:e.number().min(aAy).max(rAy),auto_reissue_on_update:e.boolean(),classify_imported_items_as_products:e.boolean().optional().describe("Treat otherwise-unclassified regular imported order lines as products. Shipping and fee lines are never affected."),locale:e.string().max(lAy).nullish(),business_unit_id:e.string().max(dAy).nullish(),business_premise_id:e.string().max(uAy).nullish(),electronic_device_id:e.string().max(cAy).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"),pAy=/^[a-z]{3,4}_[0-9a-f]{24}$/,n0S=e.object({id:e.stringFormat("resource-id",pAy).describe("Unique resource identifier. Prefix depends on the resource, for example inv_, cus_, or ent_.")}),s0S=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.")}),mAy=10,xAy=36,gAy=36,yAy=36,OAy=0,o0S=e.object({name:e.string().min(1).optional(),auto_process:e.boolean().optional(),auto_reissue_on_update:e.boolean().optional(),classify_imported_items_as_products:e.boolean().nullish().describe("Treat otherwise-unclassified regular imported order lines as products. Set null or false to disable."),locale:e.string().max(mAy).nullish(),business_unit_id:e.string().max(xAy).nullish(),business_premise_id:e.string().max(gAy).nullish(),electronic_device_id:e.string().max(yAy).nullish(),metadata:e.record(e.string(),e.string()).refine(d=>Object.keys(d).length<=50,"Metadata can have maximum 50 properties").nullish().describe("Custom string key-value data for your own use, with up to 50 properties. Keys are opaque and may contain periods. Useful for storing external IDs, tags, or integration data."),is_active:e.boolean().optional(),auto_process_on:e.enum(["created","paid","fulfilled"]).optional().describe("Order lifecycle event that triggers automatic processing. `fulfilled` is only supported for custom store integrations; Magento integrations reject it with 400."),default_payment_type:e.string().optional(),send_invoice_email:e.boolean().optional(),send_estimate_email:e.boolean().optional(),attach_pdf_to_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(OAy).optional()}),vAy=36,SAy=36,hAy=255,bAy=255,zAy=1e3,fAy=2048,BAy=20,TAy=-2147483648,IAy=2147483647,EAy=10,DAy=36,RAy=36,_Ay=36,i0S=e.object({id:e.string().max(vAy),entity_id:e.string().max(SAy),name:e.string().max(hAy),source:e.enum(["shopify","woocommerce","magento","custom","manual"]).describe("Integration source platform"),is_active:e.boolean(),shop_domain:e.string().max(bAy).nullish(),scopes:e.string().max(zAy).nullish(),store_url:e.string().max(fAy).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(BAy).nullish(),send_invoice_email:e.boolean(),send_estimate_email:e.boolean(),attach_pdf_to_email:e.boolean(),issue_invoice_for_bank:e.boolean(),issue_invoice_on_complete:e.boolean(),auto_process_delay_seconds:e.number().min(TAy).max(IAy),auto_reissue_on_update:e.boolean(),classify_imported_items_as_products:e.boolean().optional().describe("Treat otherwise-unclassified regular imported order lines as products. Shipping and fee lines are never affected."),locale:e.string().max(EAy).nullish(),business_unit_id:e.string().max(DAy).nullish(),business_premise_id:e.string().max(RAy).nullish(),electronic_device_id:e.string().max(_Ay).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"),NAy=/^[a-z]{3,4}_[0-9a-f]{24}$/,a0S=e.object({id:e.stringFormat("resource-id",NAy).describe("Unique resource identifier. Prefix depends on the resource, for example inv_, cus_, or ent_.")}),r0S=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 xt={};W(xt,{CancelOrderHeader:()=>I0S,CancelOrderParams:()=>T0S,CancelOrderResponse:()=>E0S,CreateOrderBody:()=>d0S,CreateOrderHeader:()=>l0S,DeleteOrderHeader:()=>b0S,DeleteOrderParams:()=>h0S,GetOrderByIdHeader:()=>x0S,GetOrderByIdParams:()=>m0S,GetOrderByIdResponse:()=>g0S,GetOrdersHeader:()=>c0S,GetOrdersQueryParams:()=>u0S,GetOrdersResponse:()=>p0S,ProcessOrderHeader:()=>f0S,ProcessOrderParams:()=>z0S,ProcessOrderResponse:()=>B0S,ReissueOrderHeader:()=>R0S,ReissueOrderParams:()=>D0S,ReissueOrderResponse:()=>_0S,UpdateOrderBody:()=>v0S,UpdateOrderHeader:()=>O0S,UpdateOrderParams:()=>y0S,UpdateOrderResponse:()=>S0S,cancelOrderPathIdRegExp:()=>oky,cancelOrderResponseOneCurrencyCodeMax:()=>xky,cancelOrderResponseOneCustomerEmailMax:()=>pky,cancelOrderResponseOneCustomerIdMax:()=>mky,cancelOrderResponseOneCustomerNameMax:()=>cky,cancelOrderResponseOneDocumentLocaleMax:()=>uky,cancelOrderResponseOneEntityIdMax:()=>aky,cancelOrderResponseOneErrorMax:()=>Dky,cancelOrderResponseOneEstimateIdMax:()=>Iky,cancelOrderResponseOneIdMax:()=>iky,cancelOrderResponseOneInvoiceIdMax:()=>Tky,cancelOrderResponseOneOrderIntegrationIdMax:()=>rky,cancelOrderResponseOnePaymentGatewayMax:()=>Bky,cancelOrderResponseOnePaymentMethodMax:()=>fky,cancelOrderResponseOneSourceEventIdMax:()=>Eky,cancelOrderResponseOneSourceIdMax:()=>lky,cancelOrderResponseOneSourceOrderNumberMax:()=>dky,cancelOrderResponseOneTotalDiscountMax:()=>hky,cancelOrderResponseOneTotalDiscountMin:()=>Sky,cancelOrderResponseOneTotalMax:()=>yky,cancelOrderResponseOneTotalMin:()=>gky,cancelOrderResponseOneTotalShippingMax:()=>zky,cancelOrderResponseOneTotalShippingMin:()=>bky,cancelOrderResponseOneTotalWithTaxMax:()=>vky,cancelOrderResponseOneTotalWithTaxMin:()=>Oky,createOrderBodyCurrencyCodeMax:()=>FAy,createOrderBodyCustomerEmailMax:()=>AAy,createOrderBodyCustomerNameMax:()=>wAy,createOrderBodyDocumentLocaleMax:()=>CAy,createOrderBodyOrderIntegrationIdMax:()=>MAy,createOrderBodyPaymentGatewayMax:()=>WAy,createOrderBodyPaymentMethodMax:()=>qAy,createOrderBodySourceIdMax:()=>UAy,createOrderBodySourceOrderNumberMax:()=>PAy,createOrderBodyTotalDiscountMax:()=>VAy,createOrderBodyTotalDiscountMin:()=>GAy,createOrderBodyTotalMax:()=>jAy,createOrderBodyTotalMin:()=>kAy,createOrderBodyTotalShippingMax:()=>ZAy,createOrderBodyTotalShippingMin:()=>KAy,createOrderBodyTotalWithTaxMax:()=>LAy,createOrderBodyTotalWithTaxMin:()=>HAy,deleteOrderPathIdRegExp:()=>M5y,getOrderByIdPathIdRegExp:()=>bFy,getOrderByIdResponseOneCurrencyCodeMax:()=>NFy,getOrderByIdResponseOneCustomerEmailMax:()=>RFy,getOrderByIdResponseOneCustomerIdMax:()=>_Fy,getOrderByIdResponseOneCustomerNameMax:()=>DFy,getOrderByIdResponseOneDocumentLocaleMax:()=>EFy,getOrderByIdResponseOneEntityIdMax:()=>fFy,getOrderByIdResponseOneErrorMax:()=>KFy,getOrderByIdResponseOneEstimateIdMax:()=>GFy,getOrderByIdResponseOneIdMax:()=>zFy,getOrderByIdResponseOneInvoiceIdMax:()=>LFy,getOrderByIdResponseOneOrderIntegrationIdMax:()=>BFy,getOrderByIdResponseOnePaymentGatewayMax:()=>HFy,getOrderByIdResponseOnePaymentMethodMax:()=>jFy,getOrderByIdResponseOneSourceEventIdMax:()=>VFy,getOrderByIdResponseOneSourceIdMax:()=>TFy,getOrderByIdResponseOneSourceOrderNumberMax:()=>IFy,getOrderByIdResponseOneTotalDiscountMax:()=>AFy,getOrderByIdResponseOneTotalDiscountMin:()=>wFy,getOrderByIdResponseOneTotalMax:()=>UFy,getOrderByIdResponseOneTotalMin:()=>MFy,getOrderByIdResponseOneTotalShippingMax:()=>kFy,getOrderByIdResponseOneTotalShippingMin:()=>FFy,getOrderByIdResponseOneTotalWithTaxMax:()=>CFy,getOrderByIdResponseOneTotalWithTaxMin:()=>PFy,getOrdersQueryLimitDefault:()=>YAy,getOrdersQueryLimitMax:()=>$Ay,getOrdersResponseDataItemOneCurrencyCodeMax:()=>aFy,getOrdersResponseDataItemOneCustomerEmailMax:()=>oFy,getOrdersResponseDataItemOneCustomerIdMax:()=>iFy,getOrdersResponseDataItemOneCustomerNameMax:()=>sFy,getOrdersResponseDataItemOneDocumentLocaleMax:()=>nFy,getOrdersResponseDataItemOneEntityIdMax:()=>JAy,getOrdersResponseDataItemOneErrorMax:()=>hFy,getOrdersResponseDataItemOneEstimateIdMax:()=>vFy,getOrdersResponseDataItemOneIdMax:()=>QAy,getOrdersResponseDataItemOneInvoiceIdMax:()=>OFy,getOrdersResponseDataItemOneOrderIntegrationIdMax:()=>XAy,getOrdersResponseDataItemOnePaymentGatewayMax:()=>yFy,getOrdersResponseDataItemOnePaymentMethodMax:()=>gFy,getOrdersResponseDataItemOneSourceEventIdMax:()=>SFy,getOrdersResponseDataItemOneSourceIdMax:()=>eFy,getOrdersResponseDataItemOneSourceOrderNumberMax:()=>tFy,getOrdersResponseDataItemOneTotalDiscountMax:()=>pFy,getOrdersResponseDataItemOneTotalDiscountMin:()=>cFy,getOrdersResponseDataItemOneTotalMax:()=>lFy,getOrdersResponseDataItemOneTotalMin:()=>rFy,getOrdersResponseDataItemOneTotalShippingMax:()=>xFy,getOrdersResponseDataItemOneTotalShippingMin:()=>mFy,getOrdersResponseDataItemOneTotalWithTaxMax:()=>uFy,getOrdersResponseDataItemOneTotalWithTaxMin:()=>dFy,processOrderPathIdRegExp:()=>U5y,processOrderResponseOneCurrencyCodeMax:()=>G5y,processOrderResponseOneCustomerEmailMax:()=>H5y,processOrderResponseOneCustomerIdMax:()=>L5y,processOrderResponseOneCustomerNameMax:()=>j5y,processOrderResponseOneDocumentLocaleMax:()=>k5y,processOrderResponseOneEntityIdMax:()=>C5y,processOrderResponseOneErrorMax:()=>sky,processOrderResponseOneEstimateIdMax:()=>tky,processOrderResponseOneIdMax:()=>P5y,processOrderResponseOneInvoiceIdMax:()=>eky,processOrderResponseOneOrderIntegrationIdMax:()=>w5y,processOrderResponseOnePaymentGatewayMax:()=>X5y,processOrderResponseOnePaymentMethodMax:()=>J5y,processOrderResponseOneSourceEventIdMax:()=>nky,processOrderResponseOneSourceIdMax:()=>A5y,processOrderResponseOneSourceOrderNumberMax:()=>F5y,processOrderResponseOneTotalDiscountMax:()=>Y5y,processOrderResponseOneTotalDiscountMin:()=>W5y,processOrderResponseOneTotalMax:()=>K5y,processOrderResponseOneTotalMin:()=>V5y,processOrderResponseOneTotalShippingMax:()=>Q5y,processOrderResponseOneTotalShippingMin:()=>$5y,processOrderResponseOneTotalWithTaxMax:()=>q5y,processOrderResponseOneTotalWithTaxMin:()=>Z5y,reissueOrderPathIdRegExp:()=>Rky,reissueOrderResponseOneCurrencyCodeMax:()=>kky,reissueOrderResponseOneCustomerEmailMax:()=>Aky,reissueOrderResponseOneCustomerIdMax:()=>Fky,reissueOrderResponseOneCustomerNameMax:()=>wky,reissueOrderResponseOneDocumentLocaleMax:()=>Cky,reissueOrderResponseOneEntityIdMax:()=>Nky,reissueOrderResponseOneErrorMax:()=>Xky,reissueOrderResponseOneEstimateIdMax:()=>Qky,reissueOrderResponseOneIdMax:()=>_ky,reissueOrderResponseOneInvoiceIdMax:()=>$ky,reissueOrderResponseOneOrderIntegrationIdMax:()=>Mky,reissueOrderResponseOnePaymentGatewayMax:()=>Yky,reissueOrderResponseOnePaymentMethodMax:()=>Wky,reissueOrderResponseOneSourceEventIdMax:()=>Jky,reissueOrderResponseOneSourceIdMax:()=>Uky,reissueOrderResponseOneSourceOrderNumberMax:()=>Pky,reissueOrderResponseOneTotalDiscountMax:()=>Kky,reissueOrderResponseOneTotalDiscountMin:()=>Vky,reissueOrderResponseOneTotalMax:()=>Hky,reissueOrderResponseOneTotalMin:()=>jky,reissueOrderResponseOneTotalShippingMax:()=>qky,reissueOrderResponseOneTotalShippingMin:()=>Zky,reissueOrderResponseOneTotalWithTaxMax:()=>Gky,reissueOrderResponseOneTotalWithTaxMin:()=>Lky,updateOrderBodyCurrencyCodeMax:()=>QFy,updateOrderBodyCustomerEmailMax:()=>$Fy,updateOrderBodyCustomerNameMax:()=>YFy,updateOrderBodyDocumentLocaleMax:()=>WFy,updateOrderBodyPaymentGatewayMax:()=>r5y,updateOrderBodyPaymentMethodMax:()=>a5y,updateOrderBodySourceOrderNumberMax:()=>qFy,updateOrderBodyTotalDiscountMax:()=>s5y,updateOrderBodyTotalDiscountMin:()=>n5y,updateOrderBodyTotalMax:()=>XFy,updateOrderBodyTotalMin:()=>JFy,updateOrderBodyTotalShippingMax:()=>i5y,updateOrderBodyTotalShippingMin:()=>o5y,updateOrderBodyTotalWithTaxMax:()=>t5y,updateOrderBodyTotalWithTaxMin:()=>e5y,updateOrderPathIdRegExp:()=>ZFy,updateOrderResponseOneCurrencyCodeMax:()=>O5y,updateOrderResponseOneCustomerEmailMax:()=>g5y,updateOrderResponseOneCustomerIdMax:()=>y5y,updateOrderResponseOneCustomerNameMax:()=>x5y,updateOrderResponseOneDocumentLocaleMax:()=>m5y,updateOrderResponseOneEntityIdMax:()=>d5y,updateOrderResponseOneErrorMax:()=>N5y,updateOrderResponseOneEstimateIdMax:()=>R5y,updateOrderResponseOneIdMax:()=>l5y,updateOrderResponseOneInvoiceIdMax:()=>D5y,updateOrderResponseOneOrderIntegrationIdMax:()=>u5y,updateOrderResponseOnePaymentGatewayMax:()=>E5y,updateOrderResponseOnePaymentMethodMax:()=>I5y,updateOrderResponseOneSourceEventIdMax:()=>_5y,updateOrderResponseOneSourceIdMax:()=>c5y,updateOrderResponseOneSourceOrderNumberMax:()=>p5y,updateOrderResponseOneTotalDiscountMax:()=>f5y,updateOrderResponseOneTotalDiscountMin:()=>z5y,updateOrderResponseOneTotalMax:()=>S5y,updateOrderResponseOneTotalMin:()=>v5y,updateOrderResponseOneTotalShippingMax:()=>T5y,updateOrderResponseOneTotalShippingMin:()=>B5y,updateOrderResponseOneTotalWithTaxMax:()=>b5y,updateOrderResponseOneTotalWithTaxMin:()=>h5y});var l0S=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.")}),MAy=36,UAy=255,PAy=100,CAy=20,wAy=255,AAy=255,FAy=3,kAy=-140737488355328,jAy=0x7fffffffffff,HAy=-140737488355328,LAy=0x7fffffffffff,GAy=-140737488355328,VAy=0x7fffffffffff,KAy=-140737488355328,ZAy=0x7fffffffffff,qAy=50,WAy=100,d0S=e.object({order_integration_id:e.string().max(MAy),source:e.enum(["shopify","woocommerce","magento","custom","manual"]).describe("Order source platform"),source_id:e.string().max(UAy),source_order_number:e.string().max(PAy).nullish(),document_locale:e.string().max(CAy).nullish(),customer_name:e.string().max(wAy).nullish(),customer_email:e.string().max(AAy).nullish(),customer:e.union([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()}),e.null()]).optional(),billing_address:e.union([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()}),e.null()]).optional(),shipping_address:e.union([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()}),e.null()]).optional(),currency_code:e.string().max(FAy),total:e.number().min(kAy).max(jAy),total_with_tax:e.number().min(HAy).max(LAy),total_discount:e.number().min(GAy).max(VAy).optional(),total_shipping:e.number().min(KAy).max(ZAy).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","fee"]).optional()})).min(1),payment_status:e.enum(["unpaid","paid","partially_paid","refunded"]).optional().describe("Order payment status"),payment_method:e.string().max(qAy).nullish(),payment_gateway:e.string().max(WAy).nullish(),ordered_at:e.iso.datetime({}).nullish(),metadata:e.record(e.string(),e.string()).refine(d=>Object.keys(d).length<=50,"Metadata can have maximum 50 properties").nullish().describe("Custom string key-value data for your own use, with up to 50 properties. Keys are opaque and may contain periods. Useful for storing external IDs, tags, or integration data.")}),YAy=10,$Ay=100,u0S=e.object({limit:e.number().min(1).max($Ay).default(YAy).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**Array columns** (such as an item\'s `categories`) compare as sets: a direct value asks whether the list contains it, `contains` takes an array and requires all of them, `in` matches any of them, and `notIn` matches none. Scalar operators such as `gt` do not apply and are ignored.\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, ordered_at, 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.
199
199
  Searches are case-insensitive and match partial strings.