@ekwo-ai/mcp
Version:
MCP server for Ekwo OS: let an AI agent work on the books, under the user's own row level security.
606 lines • 29 kB
TypeScript
/**
* The writing half.
*
* One rule holds everywhere here: the ledger is written by the schema, never
* by this package. `post_document`, `post_payment`, `post_entry`, `reconcile`
* and `unreconcile` carry the accounting rules — balance, numbering, period
* locks, the counterpart that is the difference of everything else — and this
* server calls them. Nothing in this file inserts an `entries` or an
* `entry_lines` row. Direct inserts are for the objects a person types:
* contacts, draft documents and their lines, payments, bank transactions.
*
* The second rule is that a refusal from the database is the answer. A
* `period_locked:` raise is not an error to be worked around by moving a
* date; it is the company telling the agent that the month is closed.
*/
import { z } from 'zod';
import { type Backend } from '../backend.js';
export * from './import-books.js';
export { acceptDocument, cancelDocument, closeFiscalYear, closeFiscalYearFinally, createContact, createDocument, declineDocument, leaveLineUnnamed, lockPeriod, mergeContacts, postDocument, reconcile, reconcileMany, reconcileWithDifference, recordPayment, reopenFiscalYear, reverseEntry, setLineContact, settleFromStatement, undoDocument, undoDocumentAnswer, undoLeaveLineUnnamed, unreconcile, updateDocumentLines, } from '-ai/core';
export declare const CreateContactInput: z.ZodObject<{
company_id: z.ZodString;
name: z.ZodString;
contact_type: z.ZodEnum<{
customer: "customer";
supplier: "supplier";
both: "both";
employee: "employee";
other: "other";
}>;
vat_number: z.ZodOptional<z.ZodString>;
registration_number: z.ZodOptional<z.ZodString>;
identifiers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
email: z.ZodOptional<z.ZodString>;
phone: z.ZodOptional<z.ZodString>;
country: z.ZodOptional<z.ZodString>;
payment_terms_days: z.ZodOptional<z.ZodNumber>;
auxiliary_code: z.ZodOptional<z.ZodString>;
address_line1: z.ZodOptional<z.ZodString>;
postal_code: z.ZodOptional<z.ZodString>;
city: z.ZodOptional<z.ZodString>;
client_ref: z.ZodOptional<z.ZodString>;
}, z.core.$strip>;
export declare const MergeContactsInput: z.ZodObject<{
keep_contact_id: z.ZodString;
absorb_contact_id: z.ZodString;
}, z.core.$strip>;
export declare const PinAccountsInput: z.ZodObject<{
company_id: z.ZodString;
account_codes: z.ZodArray<z.ZodString>;
pinned: z.ZodOptional<z.ZodBoolean>;
}, z.core.$strip>;
export declare function pinAccounts(backend: Backend, args: z.infer<typeof PinAccountsInput>): Promise<unknown>;
export declare const CreateProductInput: z.ZodObject<{
company_id: z.ZodString;
code: z.ZodString;
name: z.ZodString;
description: z.ZodOptional<z.ZodString>;
kind: z.ZodOptional<z.ZodEnum<{
service: "service";
goods: "goods";
}>>;
unit_code: z.ZodOptional<z.ZodString>;
currency_code: z.ZodOptional<z.ZodString>;
sale_price: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
purchase_price: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
sale_account_id: z.ZodOptional<z.ZodString>;
sale_account_code: z.ZodOptional<z.ZodString>;
purchase_account_id: z.ZodOptional<z.ZodString>;
purchase_account_code: z.ZodOptional<z.ZodString>;
sale_tax_id: z.ZodOptional<z.ZodString>;
sale_tax_code: z.ZodOptional<z.ZodString>;
purchase_tax_id: z.ZodOptional<z.ZodString>;
purchase_tax_code: z.ZodOptional<z.ZodString>;
attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
}, z.core.$strip>;
export declare function createProduct(backend: Backend, args: z.infer<typeof CreateProductInput>): Promise<unknown>;
export declare const UpdateProductInput: z.ZodObject<{
product_id: z.ZodOptional<z.ZodString>;
company_id: z.ZodOptional<z.ZodString>;
product_code: z.ZodOptional<z.ZodString>;
code: z.ZodOptional<z.ZodString>;
name: z.ZodOptional<z.ZodString>;
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
kind: z.ZodOptional<z.ZodEnum<{
service: "service";
goods: "goods";
}>>;
unit_code: z.ZodOptional<z.ZodString>;
sale_price: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
purchase_price: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
sale_account_code: z.ZodOptional<z.ZodString>;
purchase_account_code: z.ZodOptional<z.ZodString>;
sale_tax_code: z.ZodOptional<z.ZodString>;
purchase_tax_code: z.ZodOptional<z.ZodString>;
active: z.ZodOptional<z.ZodBoolean>;
attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
}, z.core.$strip>;
/**
* Changes a product. What it does not do is reach into the documents that
* already reference it: a line keeps the text, the price and the account it
* was invoiced with, because an invoice is a statement about a day and a
* catalogue edited afterwards must not be able to rewrite it.
*/
export declare function updateProduct(backend: Backend, args: z.infer<typeof UpdateProductInput>): Promise<unknown>;
export declare const CreateDocumentInput: z.ZodObject<{
company_id: z.ZodString;
doc_type: z.ZodEnum<{
sale_invoice: "sale_invoice";
sale_credit_note: "sale_credit_note";
sale_quote: "sale_quote";
purchase_invoice: "purchase_invoice";
purchase_credit_note: "purchase_credit_note";
purchase_order: "purchase_order";
}>;
contact_id: z.ZodString;
document_date: z.ZodString;
due_date: z.ZodOptional<z.ZodString>;
accounting_date: z.ZodOptional<z.ZodString>;
number: z.ZodOptional<z.ZodString>;
supplier_reference: z.ZodOptional<z.ZodString>;
currency_code: z.ZodOptional<z.ZodString>;
journal_id: z.ZodOptional<z.ZodString>;
payment_reference: z.ZodOptional<z.ZodString>;
client_ref: z.ZodOptional<z.ZodString>;
lines: z.ZodArray<z.ZodObject<{
name: z.ZodOptional<z.ZodString>;
description: z.ZodOptional<z.ZodString>;
quantity: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
unit_code: z.ZodOptional<z.ZodString>;
unit_price: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
discount_percent: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
product_id: z.ZodOptional<z.ZodString>;
product_code: z.ZodOptional<z.ZodString>;
account_id: z.ZodOptional<z.ZodString>;
account_code: z.ZodOptional<z.ZodString>;
tax_id: z.ZodOptional<z.ZodString>;
tax_code: z.ZodOptional<z.ZodString>;
attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
}, z.core.$strip>>;
}, z.core.$strip>;
export declare const UpdateDocumentLinesInput: z.ZodObject<{
document_id: z.ZodString;
lines: z.ZodArray<z.ZodObject<{
name: z.ZodOptional<z.ZodString>;
description: z.ZodOptional<z.ZodString>;
quantity: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
unit_code: z.ZodOptional<z.ZodString>;
unit_price: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
discount_percent: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
product_id: z.ZodOptional<z.ZodString>;
product_code: z.ZodOptional<z.ZodString>;
account_id: z.ZodOptional<z.ZodString>;
account_code: z.ZodOptional<z.ZodString>;
tax_id: z.ZodOptional<z.ZodString>;
tax_code: z.ZodOptional<z.ZodString>;
attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
}, z.core.$strip>>;
}, z.core.$strip>;
export declare const PostDocumentInput: z.ZodObject<{
document_id: z.ZodString;
dry_run: z.ZodOptional<z.ZodBoolean>;
}, z.core.$strip>;
export declare const AcceptDocumentInput: z.ZodObject<{
document_id: z.ZodString;
accepted_by: z.ZodOptional<z.ZodString>;
at: z.ZodOptional<z.ZodString>;
}, z.core.$strip>;
export declare const DeclineDocumentInput: z.ZodObject<{
document_id: z.ZodString;
at: z.ZodOptional<z.ZodString>;
}, z.core.$strip>;
export declare const UndoDocumentAnswerInput: z.ZodObject<{
document_id: z.ZodString;
}, z.core.$strip>;
export declare const CancelDocumentInput: z.ZodObject<{
document_id: z.ZodString;
date: z.ZodOptional<z.ZodString>;
credit_note: z.ZodOptional<z.ZodBoolean>;
}, z.core.$strip>;
export declare const ReverseEntryInput: z.ZodObject<{
entry_id: z.ZodString;
date: z.ZodOptional<z.ZodString>;
}, z.core.$strip>;
export declare const RecordPaymentInput: z.ZodObject<{
company_id: z.ZodString;
direction: z.ZodOptional<z.ZodEnum<{
inbound: "inbound";
outbound: "outbound";
}>>;
amount: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
payment_date: z.ZodString;
contact_id: z.ZodOptional<z.ZodString>;
journal_id: z.ZodOptional<z.ZodString>;
journal_code: z.ZodOptional<z.ZodString>;
bank_account_id: z.ZodOptional<z.ZodString>;
reference: z.ZodOptional<z.ZodString>;
memo: z.ZodOptional<z.ZodString>;
currency_code: z.ZodOptional<z.ZodString>;
exchange_rate: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
document_id: z.ZodOptional<z.ZodString>;
client_ref: z.ZodOptional<z.ZodString>;
match_open_items: z.ZodOptional<z.ZodBoolean>;
}, z.core.$strip>;
export declare const ReconcileInput: z.ZodObject<{
line_a: z.ZodString;
line_b: z.ZodString;
amount: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
}, z.core.$strip>;
export declare const UnreconcileInput: z.ZodObject<{
reconciliation_id: z.ZodString;
}, z.core.$strip>;
export declare const SetLineContactInput: z.ZodObject<{
line_id: z.ZodString;
contact_id: z.ZodString;
}, z.core.$strip>;
export declare const ReconcileManyInput: z.ZodObject<{
line_ids: z.ZodArray<z.ZodString>;
}, z.core.$strip>;
export declare const ReconcileWithDifferenceInput: z.ZodObject<{
line_ids: z.ZodArray<z.ZodString>;
reason: z.ZodString;
}, z.core.$strip>;
export declare const LeaveLineUnnamedInput: z.ZodObject<{
line_id: z.ZodString;
reason: z.ZodString;
}, z.core.$strip>;
export declare const UndoLeaveLineUnnamedInput: z.ZodObject<{
line_id: z.ZodString;
}, z.core.$strip>;
export declare const SettleFromStatementInput: z.ZodObject<{
transaction_id: z.ZodString;
document_id: z.ZodOptional<z.ZodString>;
document_ids: z.ZodOptional<z.ZodArray<z.ZodString>>;
line_ids: z.ZodOptional<z.ZodArray<z.ZodString>>;
amounts: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
extra_lines: z.ZodOptional<z.ZodArray<z.ZodObject<{
account: z.ZodString;
amount: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
tax: z.ZodOptional<z.ZodString>;
description: z.ZodOptional<z.ZodString>;
}, z.core.$strict>>>;
}, z.core.$strip>;
export declare const CreateBankAccountInput: z.ZodObject<{
company_id: z.ZodString;
account_identifier: z.ZodOptional<z.ZodString>;
iban: z.ZodOptional<z.ZodString>;
label: z.ZodOptional<z.ZodString>;
bic: z.ZodOptional<z.ZodString>;
bank_name: z.ZodOptional<z.ZodString>;
currency_code: z.ZodOptional<z.ZodString>;
journal_id: z.ZodOptional<z.ZodString>;
journal_code: z.ZodOptional<z.ZodString>;
account_id: z.ZodOptional<z.ZodString>;
account_code: z.ZodOptional<z.ZodString>;
}, z.core.$strip>;
/**
* A bank account, wired to a journal and to a ledger account.
*
* `create_bank_account()` of the schema does the work — reads the identifier
* in the scheme of the company's country, picks the bank journal and the
* ledger account the country template chose, refuses a name already taken —
* so this tool, a web application and a script calling the REST API take one
* road. What is left here is the deprecated `iban` alias, and the codes a
* model may give in place of ids.
*/
export declare function createBankAccount(backend: Backend, args: z.infer<typeof CreateBankAccountInput>): Promise<unknown>;
export declare const CreateBankTransactionInput: z.ZodObject<{
company_id: z.ZodString;
bank_account_id: z.ZodString;
transaction_date: z.ZodString;
amount: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
description: z.ZodOptional<z.ZodString>;
counterpart_name: z.ZodOptional<z.ZodString>;
counterpart_iban: z.ZodOptional<z.ZodString>;
reference: z.ZodOptional<z.ZodString>;
structured_reference: z.ZodOptional<z.ZodString>;
statement_id: z.ZodOptional<z.ZodString>;
contact_id: z.ZodOptional<z.ZodString>;
value_date: z.ZodOptional<z.ZodString>;
}, z.core.$strip>;
export declare function createBankTransaction(backend: Backend, args: z.infer<typeof CreateBankTransactionInput>): Promise<unknown>;
/**
* The statement formats this server has a reader for. A pack names more than
* these — MT940, OFX, BAI2 — and a format is offered here the day a brick
* reads it, not the day a pack mentions it.
*
* The list moved to the core when a second caller needed it: `describePack()`
* of the command line answers, for every format a pack names, read or not yet,
* and it cannot reach this package — the command line depends on the core and
* on one driver, and a list of three strings is not a reason to make it depend
* on an MCP server. It is exported from here under the name it always had.
*/
export { STATEMENT_FORMATS } from '-ai/core';
/** The profile of a CSV's columns, as `@ekwo-ai/csv-statement` describes it. The reader checks it again. */
export declare const CsvProfileInput: z.ZodObject<{
delimiter: z.ZodString;
encoding: z.ZodOptional<z.ZodEnum<{
"utf-8": "utf-8";
"iso-8859-1": "iso-8859-1";
"windows-1252": "windows-1252";
}>>;
skipRows: z.ZodOptional<z.ZodNumber>;
header: z.ZodOptional<z.ZodBoolean>;
skipFooterRows: z.ZodOptional<z.ZodNumber>;
dateFormat: z.ZodString;
decimalSeparator: z.ZodEnum<{
",": ",";
".": ".";
}>;
thousandsSeparator: z.ZodOptional<z.ZodString>;
sign: z.ZodOptional<z.ZodEnum<{
"as-written": "as-written";
inverted: "inverted";
}>>;
newestFirst: z.ZodOptional<z.ZodBoolean>;
columns: z.ZodObject<{
date: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
valueDate: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
amount: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
debit: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
credit: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
fee: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
currency: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
counterparty: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
counterpartyAccount: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
description: z.ZodOptional<z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>>;
reference: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
balance: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
}, z.core.$strip>;
}, z.core.$strip>;
export declare const ImportBankStatementInput: z.ZodObject<{
company_id: z.ZodString;
format: z.ZodEnum<{
"camt.053": "camt.053";
coda: "coda";
cfonb120: "cfonb120";
csv: "csv";
}>;
content: z.ZodString;
file_name: z.ZodOptional<z.ZodString>;
storage_path: z.ZodOptional<z.ZodString>;
bank_account_id: z.ZodOptional<z.ZodString>;
iban_country: z.ZodOptional<z.ZodString>;
csv_profile: z.ZodOptional<z.ZodObject<{
delimiter: z.ZodString;
encoding: z.ZodOptional<z.ZodEnum<{
"utf-8": "utf-8";
"iso-8859-1": "iso-8859-1";
"windows-1252": "windows-1252";
}>>;
skipRows: z.ZodOptional<z.ZodNumber>;
header: z.ZodOptional<z.ZodBoolean>;
skipFooterRows: z.ZodOptional<z.ZodNumber>;
dateFormat: z.ZodString;
decimalSeparator: z.ZodEnum<{
",": ",";
".": ".";
}>;
thousandsSeparator: z.ZodOptional<z.ZodString>;
sign: z.ZodOptional<z.ZodEnum<{
"as-written": "as-written";
inverted: "inverted";
}>>;
newestFirst: z.ZodOptional<z.ZodBoolean>;
columns: z.ZodObject<{
date: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
valueDate: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
amount: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
debit: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
credit: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
fee: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
currency: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
counterparty: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
counterpartyAccount: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
description: z.ZodOptional<z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>>;
reference: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
balance: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
}, z.core.$strip>;
}, z.core.$strip>>;
opening_balance: z.ZodOptional<z.ZodString>;
closing_balance: z.ZodOptional<z.ZodString>;
}, z.core.$strip>;
export declare const UpdateBankAccountInput: z.ZodObject<{
company_id: z.ZodString;
bank_account_id: z.ZodString;
statement_profile: z.ZodNullable<z.ZodObject<{
delimiter: z.ZodString;
encoding: z.ZodOptional<z.ZodEnum<{
"utf-8": "utf-8";
"iso-8859-1": "iso-8859-1";
"windows-1252": "windows-1252";
}>>;
skipRows: z.ZodOptional<z.ZodNumber>;
header: z.ZodOptional<z.ZodBoolean>;
skipFooterRows: z.ZodOptional<z.ZodNumber>;
dateFormat: z.ZodString;
decimalSeparator: z.ZodEnum<{
",": ",";
".": ".";
}>;
thousandsSeparator: z.ZodOptional<z.ZodString>;
sign: z.ZodOptional<z.ZodEnum<{
"as-written": "as-written";
inverted: "inverted";
}>>;
newestFirst: z.ZodOptional<z.ZodBoolean>;
columns: z.ZodObject<{
date: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
valueDate: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
amount: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
debit: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
credit: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
fee: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
currency: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
counterparty: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
counterpartyAccount: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
description: z.ZodOptional<z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>>;
reference: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
balance: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
}, z.core.$strip>;
}, z.core.$strip>>;
}, z.core.$strip>;
/**
* Changes a bank account: today, the profile of its CSV statements — the
* lay-out of its bank's export, described once on the account. The core does
* the work, so the command line's `ekwo bank profile` takes the same road.
*/
export declare function updateBankAccount(backend: Backend, args: z.infer<typeof UpdateBankAccountInput>): Promise<unknown>;
/**
* Reads the file with the brick of its format and hands the statements to
* `import_bank_statement()`. The reading moved to the core when the command
* line needed it too (`ekwo import camt.053 <file>`); this is the same call.
*/
export declare function importBankStatement(backend: Backend, args: z.infer<typeof ImportBankStatementInput>): Promise<unknown>;
export declare const CreateCompanyInput: z.ZodObject<{
name: z.ZodString;
country: z.ZodString;
currency_code: z.ZodOptional<z.ZodString>;
language: z.ZodOptional<z.ZodString>;
chart_code: z.ZodOptional<z.ZodString>;
fiscal_year: z.ZodOptional<z.ZodNumber>;
fiscal_year_start: z.ZodOptional<z.ZodString>;
}, z.core.$strip>;
export declare function createCompany(backend: Backend, args: z.infer<typeof CreateCompanyInput>): Promise<unknown>;
export declare const UpdateCompanyProfileInput: z.ZodObject<{
company_id: z.ZodString;
name: z.ZodOptional<z.ZodString>;
trade_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
legal_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
legal_form: z.ZodOptional<z.ZodNullable<z.ZodString>>;
vat_number: z.ZodOptional<z.ZodNullable<z.ZodString>>;
registration_number: z.ZodOptional<z.ZodNullable<z.ZodString>>;
address_line1: z.ZodOptional<z.ZodNullable<z.ZodString>>;
address_line2: z.ZodOptional<z.ZodNullable<z.ZodString>>;
postal_code: z.ZodOptional<z.ZodNullable<z.ZodString>>;
city: z.ZodOptional<z.ZodNullable<z.ZodString>>;
email: z.ZodOptional<z.ZodNullable<z.ZodString>>;
phone: z.ZodOptional<z.ZodNullable<z.ZodString>>;
website: z.ZodOptional<z.ZodNullable<z.ZodString>>;
logo_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
share_capital: z.ZodOptional<z.ZodNullable<z.ZodString>>;
share_capital_currency: z.ZodOptional<z.ZodNullable<z.ZodString>>;
activity_code: z.ZodOptional<z.ZodNullable<z.ZodString>>;
activity_scheme: z.ZodOptional<z.ZodNullable<z.ZodString>>;
activity_description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
identifiers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
default_bank_account_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
document_template: z.ZodOptional<z.ZodNullable<z.ZodString>>;
invoice_accent_color: z.ZodOptional<z.ZodNullable<z.ZodString>>;
invoice_logo_position: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
left: "left";
right: "right";
}>>>;
number_format: z.ZodOptional<z.ZodNullable<z.ZodString>>;
invoice_typeface: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
classic: "classic";
elegant: "elegant";
}>>>;
agent_posting: z.ZodOptional<z.ZodEnum<{
review: "review";
autopilot: "autopilot";
review_only: "review_only";
}>>;
invoice_late_payment_mention: z.ZodOptional<z.ZodBoolean>;
}, z.core.$strip>;
export declare function updateCompanyProfile(backend: Backend, args: z.infer<typeof UpdateCompanyProfileInput>): Promise<unknown>;
export declare const SetNumberPrefixInput: z.ZodObject<{
company_id: z.ZodString;
journal_id: z.ZodOptional<z.ZodString>;
journal_code: z.ZodOptional<z.ZodString>;
number_prefix: z.ZodNullable<z.ZodString>;
}, z.core.$strip>;
/** The prefix one journal prints in its numbers, in place of its code. */
export declare function setNumberPrefix(backend: Backend, args: z.infer<typeof SetNumberPrefixInput>): Promise<unknown>;
export declare const SetPreferencesInput: z.ZodObject<{
preferred_company_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
language: z.ZodOptional<z.ZodNullable<z.ZodString>>;
timezone: z.ZodOptional<z.ZodNullable<z.ZodString>>;
date_display_format: z.ZodOptional<z.ZodNullable<z.ZodString>>;
number_display_format: z.ZodOptional<z.ZodNullable<z.ZodString>>;
theme: z.ZodOptional<z.ZodNullable<z.ZodString>>;
}, z.core.$strip>;
export declare function setPreferences(backend: Backend, args: z.infer<typeof SetPreferencesInput>): Promise<unknown>;
export declare const InviteMemberInput: z.ZodObject<{
company_id: z.ZodString;
email: z.ZodString;
role: z.ZodOptional<z.ZodEnum<{
owner: "owner";
accountant: "accountant";
viewer: "viewer";
client: "client";
}>>;
capabilities: z.ZodOptional<z.ZodArray<z.ZodString>>;
valid_for_days: z.ZodOptional<z.ZodNumber>;
}, z.core.$strip>;
export declare function inviteMember(backend: Backend, args: z.infer<typeof InviteMemberInput>): Promise<unknown>;
export declare const CreateApiKeyInput: z.ZodObject<{
company_id: z.ZodString;
name: z.ZodString;
capabilities: z.ZodArray<z.ZodString>;
expires_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
posting_mode: z.ZodOptional<z.ZodEnum<{
review: "review";
autopilot: "autopilot";
}>>;
}, z.core.$strip>;
export declare function createApiKey(backend: Backend, args: z.infer<typeof CreateApiKeyInput>): Promise<unknown>;
export declare const RevokeApiKeyInput: z.ZodObject<{
api_key_id: z.ZodString;
}, z.core.$strip>;
export declare function revokeApiKey(backend: Backend, args: z.infer<typeof RevokeApiKeyInput>): Promise<unknown>;
export declare const RevokeInvitationInput: z.ZodObject<{
invitation_id: z.ZodString;
}, z.core.$strip>;
export declare function revokeInvitation(backend: Backend, args: z.infer<typeof RevokeInvitationInput>): Promise<unknown>;
export declare const RemoveMemberInput: z.ZodObject<{
company_id: z.ZodString;
user_id: z.ZodString;
}, z.core.$strip>;
export declare function removeMember(backend: Backend, args: z.infer<typeof RemoveMemberInput>): Promise<unknown>;
export declare const SetMemberRoleInput: z.ZodObject<{
company_id: z.ZodString;
user_id: z.ZodString;
role: z.ZodEnum<{
owner: "owner";
accountant: "accountant";
viewer: "viewer";
client: "client";
}>;
capabilities: z.ZodOptional<z.ZodArray<z.ZodString>>;
}, z.core.$strip>;
export declare function setMemberRole(backend: Backend, args: z.infer<typeof SetMemberRoleInput>): Promise<unknown>;
export declare const ShareDocumentInput: z.ZodObject<{
document_id: z.ZodString;
expires_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
}, z.core.$strip>;
export declare function shareDocument(backend: Backend, args: z.infer<typeof ShareDocumentInput>): Promise<unknown>;
export declare const RevokeShareInput: z.ZodObject<{
share_id: z.ZodString;
}, z.core.$strip>;
export declare function revokeShare(backend: Backend, args: z.infer<typeof RevokeShareInput>): Promise<unknown>;
export declare const LockPeriodInput: z.ZodObject<{
company_id: z.ZodString;
lock_date: z.ZodOptional<z.ZodNullable<z.ZodString>>;
tax_lock_date: z.ZodOptional<z.ZodNullable<z.ZodString>>;
}, z.core.$strip>;
export declare const OpeningBalanceInput: z.ZodObject<{
company_id: z.ZodString;
fiscal_year_id: z.ZodString;
opening_date: z.ZodOptional<z.ZodString>;
lines: z.ZodArray<z.ZodObject<{
account_code: z.ZodString;
debit: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
credit: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
contact_id: z.ZodOptional<z.ZodString>;
label: z.ZodOptional<z.ZodString>;
}, z.core.$strip>>;
allow_result_accounts: z.ZodOptional<z.ZodBoolean>;
items: z.ZodOptional<z.ZodArray<z.ZodObject<{
doc_type: z.ZodEnum<{
sale_invoice: "sale_invoice";
sale_credit_note: "sale_credit_note";
purchase_invoice: "purchase_invoice";
purchase_credit_note: "purchase_credit_note";
}>;
number: z.ZodString;
contact_id: z.ZodString;
amount: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
document_date: z.ZodString;
due_date: z.ZodOptional<z.ZodString>;
payment_reference: z.ZodOptional<z.ZodString>;
supplier_reference: z.ZodOptional<z.ZodString>;
label: z.ZodOptional<z.ZodString>;
}, z.core.$strip>>>;
}, z.core.$strip>;
export declare function openingBalance(backend: Backend, args: z.infer<typeof OpeningBalanceInput>): Promise<unknown>;
export declare const CloseFiscalYearInput: z.ZodObject<{
fiscal_year_id: z.ZodString;
}, z.core.$strip>;
export declare const ReopenFiscalYearInput: z.ZodObject<{
fiscal_year_id: z.ZodString;
}, z.core.$strip>;
export declare const CloseFiscalYearFinallyInput: z.ZodObject<{
fiscal_year_id: z.ZodString;
}, z.core.$strip>;
//# sourceMappingURL=write.d.ts.map