@ ekwo-ai/ 核心
TypeScript 行类型和输入客户端 电子操作系统 会计计划.
- 整个计划的类型a手写的,故他们可以读取, 日记、条目和行数、文件和行数、税款和税务通知, 和行塑造报表函数返回.
- 法国FEC住在
@ekwo-ai/fec,这是麻省理工学院 并依赖于什么。 不再在此再出口: 从 在这里. - 瘦客户端 (b) 具有会计规则的职能——
post_document, (中文(简体) ),reconcile, (中文(简体) ),trial_balance, (中文(简体) ),vat_return, (中文(简体) ),fec_lines。 。 。 . 其他一切都是一张桌子 Supabase已经把那些都暴露为REST了. - 命令行和 MCP 服务器共享功能 - 留着 书籍,开出电子发票,通过散列证明存档 规则存在一次.
- 没有自己的运行时间依赖.
@supabase/supabase-js是可选的 对等点;@ekwo-ai/fec是因为generateFec()在客户端上写 刚刚拿到的文件.
安装
npm install @ekwo-ai/core
使用量
import { EkwoClient } from '@ekwo-ai/core';
import { fecFileName } from '@ekwo-ai/fec';
import { createClient } from '@supabase/supabase-js';
const ekwo = new EkwoClient(createClient(url, key));
const entry = await ekwo.postDocument(documentId);
await ekwo.reconcile(receivableLineId, bankLineId);
const balance = await ekwo.trialBalance({ companyId, from: '2026-01-01', to: '2026-12-31' });
const boxes = await ekwo.vatReturn({ companyId, from: '2026-07-01', to: '2026-09-30' });
const aged = await ekwo.agedBalance(companyId, '2026-09-30', 'receivable');
const fec = await ekwo.generateFec({ companyId, from: '2026-01-01', to: '2026-12-31' });
await writeFile(fecFileName('123456789', '2026-12-31'), fec, 'utf8');
没有 Supabase 客户端, 请从
fec_lines()数字 :
import { checkFec, fromQueryRow, generateFec } from '@ekwo-ai/fec';
const lines = rows.map(fromQueryRow);
const violations = checkFec(lines); // [] when the file is clean
const file = generateFec(lines, { decimalSeparator: ',', fieldSeparator: '|' });
API 密码
| 导出 | 说明 |
|---|---|
EkwoClient | 包揽计划会计功能. |
initInstance, (中文(简体) ), claimInstanceAdmin | 记录安装并占据第一个管理员席位. |
registerInstance, (中文(简体) ), unregisterInstance | 选择被Ekwo接触到,然后再次出局. 从来没有要求. |
ACCOUNT_TYPES, (中文(简体) ), internalGroup(type) | 十八个账户类型及其资产负债表组. |
isRegistered(instance) | 运营商是否选择在 Ekwo 注册 . |
isSale, (中文(简体) ), isCreditNote, (中文(简体) ), isAccountable | 文档类型上游. |
createContact, (中文(简体) ), createDocument, (中文(简体) ), addDocumentLine, (中文(简体) ), updateDocumentLines, (中文(简体) ), postDocument, (中文(简体) ), recordPayment, (中文(简体) ), reconcile, (中文(简体) ), settleFromStatement, (中文(简体) ), listDocuments, (中文(简体) ), getDocument,, , , , , , , , | 保存帐簿,每平面保存一次: MCP 服务器和 ekwo 命令行两个调用。 每个需要一个 Backend - 五项行动, select insert update remove rpc ——呼叫者执行作为用户进入数据库的任何内容. 他们没有会计规则,而是有计划. |
validateEinvoice, (中文(简体) ), issueEinvoice, (中文(简体) ), einvoiceStatus, (中文(简体) ), listEinvoiceTransmissions, (中文(简体) ), EinvoiceTransport, (中文(简体) ), directoryTransport | 网上销售的电子发票,通过 einvoicing 运输工具 send, (中文(简体) ), status, (中文(简体) ), receive, (中文(简体) ), lookup没有证书可以穿过它。 船的运输者把文件写进文件夹. |
proveFile, (中文(简体) ), upgradeFilingProofs, (中文(简体) ), lookupFilingProof, (中文(简体) ), checkProof | 通过公开的OpenTimestamps日历向Bitcoin承诺的存档文件的sha256,稍后由持有文件的任何人检查(docs/filing-proofs.md) (中文(简体) ). |
BooksError, (中文(简体) ), isRefusalState, (中文(简体) ), socleCode, (中文(简体) ), isServiceRoleKey | 这层的错象什么, 算作数据库拒绝, 和一个没有表面接受的密钥. |
| 类型 | Instance, (中文(简体) ), InstanceAdmin, (中文(简体) ), MemberRole, (中文(简体) ), CompanyRole, (中文(简体) ), Account, (中文(简体) ), Journal, (中文(简体) ), Entry, (中文(简体) ), EntryLine, (中文(简体) ), EkwoDocument, (中文(简体) ), DocumentLine, (中文(简体) ), Tax, (中文(简体) ), TaxPosting, (中文(简体) ), Contact, (中文(简体) ), TrialBalanceRow, (中文(简体) ), AgedBalanceRow, (中文(简体) ), VatReturnRow,, , , , , , , , |
数量从Postgres回来作为字符串,类型是这样说的: numeric
以 Decimal = string 而不是在路上绕入浮点
进去.
许可证
仅限AGPL-3.0 (原始内容存档于2018-03-21). Ekwo AI.