diff --git a/CHANGELOG.md b/CHANGELOG.md index 19f5ef6..a40a473 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # Changelog +## 0.5.18 - 2026-05-07 +- accounting: add pdf_name and name in different models to support specifying a name for a pdf + ## 0.5.17 - 2026-05-06 - pos: add `Tax` model and `get tax rates` endpoint (`/pos/tax-rates`) diff --git a/chift/openapi/openapi.json b/chift/openapi/openapi.json index b3a2f24..ebd6aeb 100644 --- a/chift/openapi/openapi.json +++ b/chift/openapi/openapi.json @@ -5,7 +5,9 @@ "description": "The Chift API is a universal API giving you access to financial data from the software of your clients. It helps software companies to offer native integrations to their clients without the effort needed to maintain those native integrations. By using the APIs (Accounting, POS, eCommerce) of Chift, you connect once and allow your clients to use their software packages.", "version": "1.0.0" }, - "servers": [{ "url": "https://api.chift.eu", "description": "Chift" }], + "servers": [ + { "url": "https://api.chift.eu", "description": "Chift" } + ], "paths": { "/token": { "post": { @@ -17304,7 +17306,20 @@ }, "AttachmentItem": { "properties": { - "base64_string": { "type": "string", "title": "Base64 String" } + "base64_string": { "type": "string", "title": "Base64 String" }, + "name": { + "anyOf": [ + { + "type": "string", + "maxLength": 200, + "minLength": 1, + "pattern": "^[a-zA-Z0-9\\-_ ]{1,196}+(?:.pdf)?$" + }, + { "type": "null" } + ], + "title": "Name", + "description": "A name for the PDF file to be created for accounting software that support it." + } }, "type": "object", "required": ["base64_string"], @@ -17517,6 +17532,19 @@ "title": "Pdf", "description": "Base64 PDF attachment of the bank statement." }, + "pdf_name": { + "anyOf": [ + { + "type": "string", + "maxLength": 200, + "minLength": 1, + "pattern": "^[a-zA-Z0-9\\-_ ]{1,196}+(?:.pdf)?$" + }, + { "type": "null" } + ], + "title": "Pdf Name", + "description": "A name for the PDF file to be created for accounting software that support it." + }, "items": { "items": { "$ref": "#/components/schemas/BankTransactionItemIn" }, "type": "array", @@ -20944,6 +20972,19 @@ "title": "Pdf", "description": "Base64 PDF attachment of the expense document." }, + "pdf_name": { + "anyOf": [ + { + "type": "string", + "maxLength": 200, + "minLength": 1, + "pattern": "^[a-zA-Z0-9\\-_ ]{1,196}+(?:.pdf)?$" + }, + { "type": "null" } + ], + "title": "Pdf Name", + "description": "A name for the PDF file to be created for accounting software that support it." + }, "lines": { "items": { "$ref": "#/components/schemas/ExpenseLineItem" }, "type": "array", @@ -21018,6 +21059,19 @@ "title": "Pdf", "description": "Base64 PDF attachment of the expense document." }, + "pdf_name": { + "anyOf": [ + { + "type": "string", + "maxLength": 200, + "minLength": 1, + "pattern": "^[a-zA-Z0-9\\-_ ]{1,196}+(?:.pdf)?$" + }, + { "type": "null" } + ], + "title": "Pdf Name", + "description": "A name for the PDF file to be created for accounting software that support it." + }, "lines": { "items": { "$ref": "#/components/schemas/ExpenseLineItem" }, "type": "array", @@ -21382,6 +21436,19 @@ "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Pdf", "description": "Base 64 string representing the PDF attached to the sale/purchase entry." + }, + "pdf_name": { + "anyOf": [ + { + "type": "string", + "maxLength": 200, + "minLength": 1, + "pattern": "^[a-zA-Z0-9\\-_ ]{1,196}+(?:.pdf)?$" + }, + { "type": "null" } + ], + "title": "Pdf Name", + "description": "A name for the PDF file to be created for accounting software that support it." } }, "type": "object", @@ -21858,6 +21925,19 @@ "title": "Pdf", "description": "Base 64 string representing the PDF attached to the item." }, + "pdf_name": { + "anyOf": [ + { + "type": "string", + "maxLength": 200, + "minLength": 1, + "pattern": "^[a-zA-Z0-9\\-_ ]{1,196}+(?:.pdf)?$" + }, + { "type": "null" } + ], + "title": "Pdf Name", + "description": "A name for the PDF file to be created for accounting software that support it." + }, "posted": { "anyOf": [{ "type": "boolean" }, { "type": "null" }], "title": "Posted", @@ -22467,6 +22547,19 @@ "title": "Pdf", "description": "Base 64 string representing the PDF attached to the invoice." }, + "pdf_name": { + "anyOf": [ + { + "type": "string", + "maxLength": 200, + "minLength": 1, + "pattern": "^[a-zA-Z0-9\\-_ ]{1,196}+(?:.pdf)?$" + }, + { "type": "null" } + ], + "title": "Pdf Name", + "description": "A name for the PDF file to be created for accounting software that support it." + }, "currency_exchange_rate": { "anyOf": [{ "type": "number" }, { "type": "null" }], "title": "Currency Exchange Rate", @@ -22634,6 +22727,19 @@ "title": "Pdf", "description": "Base 64 string representing the PDF attached to the invoice." }, + "pdf_name": { + "anyOf": [ + { + "type": "string", + "maxLength": 200, + "minLength": 1, + "pattern": "^[a-zA-Z0-9\\-_ ]{1,196}+(?:.pdf)?$" + }, + { "type": "null" } + ], + "title": "Pdf Name", + "description": "A name for the PDF file to be created for accounting software that support it." + }, "currency_exchange_rate": { "anyOf": [{ "type": "number" }, { "type": "null" }], "title": "Currency Exchange Rate", @@ -30993,4 +31099,4 @@ } }, "security": [{ "bearerAuth": [] }] -} \ No newline at end of file +} diff --git a/chift/openapi/openapi.py b/chift/openapi/openapi.py index 6d52c5b..13f486c 100644 --- a/chift/openapi/openapi.py +++ b/chift/openapi/openapi.py @@ -1,6 +1,6 @@ # generated by datamodel-codegen: # filename: openapi.json -# timestamp: 2026-05-06T18:03:11+00:00 +# timestamp: 2026-05-07T14:06:52+00:00 from __future__ import annotations @@ -421,6 +421,15 @@ class Api(Enum): class AttachmentItem(BaseModel): base64_string: str = Field(..., title="Base64 String") + name: Optional[ + constr( + pattern=r"^[a-zA-Z0-9\-_ ]{1,196}+(?:.pdf)?$", min_length=1, max_length=200 + ) + ] = Field( + None, + description="A name for the PDF file to be created for accounting software that support it.", + title="Name", + ) class AttachmentItemOut(BaseModel): @@ -4159,6 +4168,15 @@ class ExpenseItemIn(BaseModel): pdf: Optional[str] = Field( None, description="Base64 PDF attachment of the expense document.", title="Pdf" ) + pdf_name: Optional[ + constr( + pattern=r"^[a-zA-Z0-9\-_ ]{1,196}+(?:.pdf)?$", min_length=1, max_length=200 + ) + ] = Field( + None, + description="A name for the PDF file to be created for accounting software that support it.", + title="Pdf Name", + ) lines: List[ExpenseLineItem] = Field( ..., description="Expense lines.", min_length=1, title="Lines" ) @@ -4199,6 +4217,15 @@ class ExpenseItemOut(BaseModel): pdf: Optional[str] = Field( None, description="Base64 PDF attachment of the expense document.", title="Pdf" ) + pdf_name: Optional[ + constr( + pattern=r"^[a-zA-Z0-9\-_ ]{1,196}+(?:.pdf)?$", min_length=1, max_length=200 + ) + ] = Field( + None, + description="A name for the PDF file to be created for accounting software that support it.", + title="Pdf Name", + ) lines: List[ExpenseLineItem] = Field( ..., description="Expense lines.", min_length=1, title="Lines" ) @@ -6127,6 +6154,15 @@ class BankStatementItemIn(BaseModel): pdf: Optional[str] = Field( None, description="Base64 PDF attachment of the bank statement.", title="Pdf" ) + pdf_name: Optional[ + constr( + pattern=r"^[a-zA-Z0-9\-_ ]{1,196}+(?:.pdf)?$", min_length=1, max_length=200 + ) + ] = Field( + None, + description="A name for the PDF file to be created for accounting software that support it.", + title="Pdf Name", + ) items: List[BankTransactionItemIn] = Field( ..., description="List of transaction items", title="Items" ) @@ -6559,6 +6595,15 @@ class FinancialEntryItemIn(BaseModel): description="Base 64 string representing the PDF attached to the sale/purchase entry.", title="Pdf", ) + pdf_name: Optional[ + constr( + pattern=r"^[a-zA-Z0-9\-_ ]{1,196}+(?:.pdf)?$", min_length=1, max_length=200 + ) + ] = Field( + None, + description="A name for the PDF file to be created for accounting software that support it.", + title="Pdf Name", + ) class FinancialEntryItemOut(BaseModel): @@ -6647,6 +6692,15 @@ class GenericJournalEntry(BaseModel): description="Base 64 string representing the PDF attached to the item.", title="Pdf", ) + pdf_name: Optional[ + constr( + pattern=r"^[a-zA-Z0-9\-_ ]{1,196}+(?:.pdf)?$", min_length=1, max_length=200 + ) + ] = Field( + None, + description="A name for the PDF file to be created for accounting software that support it.", + title="Pdf Name", + ) posted: Optional[bool] = Field( True, description="Indicates if the journal entry has been posted (finalized) in the accounting system. If not provided, it defaults to True.", @@ -6805,6 +6859,15 @@ class InvoiceItemInMonoAnalyticPlan(BaseModel): description="Base 64 string representing the PDF attached to the invoice.", title="Pdf", ) + pdf_name: Optional[ + constr( + pattern=r"^[a-zA-Z0-9\-_ ]{1,196}+(?:.pdf)?$", min_length=1, max_length=200 + ) + ] = Field( + None, + description="A name for the PDF file to be created for accounting software that support it.", + title="Pdf Name", + ) currency_exchange_rate: Optional[float] = Field( 1, description="Exchange rate applicable at the date of the invoice. Required when the invoice currency is different from the folder's default currency.", @@ -6922,6 +6985,15 @@ class InvoiceItemInMultiAnalyticPlans(BaseModel): description="Base 64 string representing the PDF attached to the invoice.", title="Pdf", ) + pdf_name: Optional[ + constr( + pattern=r"^[a-zA-Z0-9\-_ ]{1,196}+(?:.pdf)?$", min_length=1, max_length=200 + ) + ] = Field( + None, + description="A name for the PDF file to be created for accounting software that support it.", + title="Pdf Name", + ) currency_exchange_rate: Optional[float] = Field( 1, description="Exchange rate applicable at the date of the invoice. Required when the invoice currency is different from the folder's default currency.", diff --git a/pyproject.toml b/pyproject.toml index bc6adaf..901ad53 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "chift" -version = "0.5.17" +version = "0.5.18" description = "Chift API client" authors = ["Henry Hertoghe "] readme = "README.md"