@fayz-ai/plugin-financial 0.23.4 → 0.24.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/components/AccountPicker.d.ts +1 -1
- package/dist/components/AccountPicker.d.ts.map +1 -1
- package/dist/components/BankPicker.d.ts +1 -1
- package/dist/components/BankPicker.d.ts.map +1 -1
- package/dist/components/CancelInvoiceDialog.d.ts +1 -1
- package/dist/components/CancelInvoiceDialog.d.ts.map +1 -1
- package/dist/components/CashSessionHeaderControl.d.ts +2 -2
- package/dist/components/CashSessionHeaderControl.d.ts.map +1 -1
- package/dist/components/CashSessionReviewModal.d.ts.map +1 -1
- package/dist/components/ChartOfAccountsTree.d.ts.map +1 -1
- package/dist/components/ClientAccountModal.d.ts +2 -7
- package/dist/components/ClientAccountModal.d.ts.map +1 -1
- package/dist/components/CnabRemittanceModal.d.ts +4 -3
- package/dist/components/CnabRemittanceModal.d.ts.map +1 -1
- package/dist/components/CommissionFunctionsDialog.d.ts +2 -2
- package/dist/components/CommissionFunctionsDialog.d.ts.map +1 -1
- package/dist/components/CommissionRuleDialog.d.ts +2 -2
- package/dist/components/CommissionRuleDialog.d.ts.map +1 -1
- package/dist/components/FinancialCounterpartySearchSelect.d.ts +1 -1
- package/dist/components/FinancialCounterpartySearchSelect.d.ts.map +1 -1
- package/dist/components/FinancialSettings.d.ts.map +1 -1
- package/dist/components/InstallmentSource.d.ts +1 -1
- package/dist/components/InstallmentSource.d.ts.map +1 -1
- package/dist/components/PaymentFields.d.ts +3 -1
- package/dist/components/PaymentFields.d.ts.map +1 -1
- package/dist/components/PaymentIcons.d.ts +2 -1
- package/dist/components/PaymentIcons.d.ts.map +1 -1
- package/dist/components/PaymentModal.d.ts +1 -1
- package/dist/components/PaymentModal.d.ts.map +1 -1
- package/dist/components/PaymentReceiptModal.d.ts +2 -2
- package/dist/components/PaymentReceiptModal.d.ts.map +1 -1
- package/dist/components/PersonStatementWidget.d.ts +1 -1
- package/dist/components/PersonStatementWidget.d.ts.map +1 -1
- package/dist/components/ReceivePaymentModal.d.ts +2 -8
- package/dist/components/ReceivePaymentModal.d.ts.map +1 -1
- package/dist/components/ReceiveStockDialog.d.ts +1 -1
- package/dist/components/ReceiveStockDialog.d.ts.map +1 -1
- package/dist/components/ReconcileFlow.d.ts +2 -2
- package/dist/components/ReconcileFlow.d.ts.map +1 -1
- package/dist/components/ReconcileModals.d.ts +1 -1
- package/dist/components/ReconcileModals.d.ts.map +1 -1
- package/dist/components/TransferModal.d.ts.map +1 -1
- package/dist/components/financialZoneWidgets.d.ts +4 -0
- package/dist/components/financialZoneWidgets.d.ts.map +1 -0
- package/dist/context.d.ts +2 -2
- package/dist/context.d.ts.map +1 -1
- package/dist/data/registries.d.ts.map +1 -1
- package/dist/index.d.ts +9 -12
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4349 -8604
- package/dist/index.js.map +1 -1
- package/dist/lib/analytics-cards.d.ts +1 -1
- package/dist/lib/analytics-cards.d.ts.map +1 -1
- package/dist/lib/receipt-reading.d.ts +1 -1
- package/dist/lib/receipt-reading.d.ts.map +1 -1
- package/dist/lib/routes.d.ts +1 -3
- package/dist/lib/routes.d.ts.map +1 -1
- package/dist/lib/settings-only.d.ts.map +1 -1
- package/dist/locales/en.d.ts.map +1 -1
- package/dist/locales/pt-BR.d.ts.map +1 -1
- package/dist/migrations/index.d.ts +4 -0
- package/dist/migrations/index.d.ts.map +1 -1
- package/dist/settings/CardMachinesSettings.d.ts +8 -0
- package/dist/settings/CardMachinesSettings.d.ts.map +1 -0
- package/dist/settings/v1-settings.d.ts +2 -0
- package/dist/settings/v1-settings.d.ts.map +1 -0
- package/dist/views/CashRegistersView.d.ts.map +1 -1
- package/dist/views/ClientAccountPanel.d.ts.map +1 -1
- package/dist/views/CommissionRulesView.d.ts +1 -1
- package/dist/views/CommissionRulesView.d.ts.map +1 -1
- package/dist/views/CommissionsView.d.ts.map +1 -1
- package/dist/views/FinancialPage.d.ts +2 -2
- package/dist/views/FinancialPage.d.ts.map +1 -1
- package/dist/views/GoalsView.d.ts.map +1 -1
- package/dist/views/InvoiceDetailView.d.ts +1 -1
- package/dist/views/InvoiceDetailView.d.ts.map +1 -1
- package/dist/views/InvoiceFormView.d.ts +1 -1
- package/dist/views/InvoiceFormView.d.ts.map +1 -1
- package/dist/views/InvoiceListView.d.ts +2 -1
- package/dist/views/InvoiceListView.d.ts.map +1 -1
- package/dist/views/ReconciliationView.d.ts.map +1 -1
- package/dist/views/RecurringBillsView.d.ts +1 -1
- package/dist/views/RecurringBillsView.d.ts.map +1 -1
- package/dist/views/StatementsView.d.ts.map +1 -1
- package/dist/views/dashboardWidgets.d.ts +2 -2
- package/dist/views/dashboardWidgets.d.ts.map +1 -1
- package/dist/views/document-memory.d.ts.map +1 -1
- package/dist/views/payable-agent.d.ts +1 -1
- package/dist/views/payable-agent.d.ts.map +1 -1
- package/dist/views/payable-lines.d.ts +0 -2
- package/dist/views/payable-lines.d.ts.map +1 -1
- package/package.json +5 -4
- package/dist/data/index.d.ts +0 -4
- package/dist/data/index.d.ts.map +0 -1
- package/dist/data/match-statement.d.ts +0 -34
- package/dist/data/match-statement.d.ts.map +0 -1
- package/dist/data/mock.d.ts +0 -25
- package/dist/data/mock.d.ts.map +0 -1
- package/dist/data/supabase.d.ts +0 -3
- package/dist/data/supabase.d.ts.map +0 -1
- package/dist/data/tables.d.ts +0 -43
- package/dist/data/tables.d.ts.map +0 -1
- package/dist/data/types.d.ts +0 -327
- package/dist/data/types.d.ts.map +0 -1
- package/dist/lib/accounts.d.ts +0 -16
- package/dist/lib/accounts.d.ts.map +0 -1
- package/dist/lib/chart-tree.d.ts +0 -28
- package/dist/lib/chart-tree.d.ts.map +0 -1
- package/dist/lib/cnab240.d.ts +0 -106
- package/dist/lib/cnab240.d.ts.map +0 -1
- package/dist/lib/fx-auto.d.ts +0 -7
- package/dist/lib/fx-auto.d.ts.map +0 -1
- package/dist/lib/idempotency.d.ts +0 -2
- package/dist/lib/idempotency.d.ts.map +0 -1
- package/dist/lib/invoice-list.d.ts +0 -46
- package/dist/lib/invoice-list.d.ts.map +0 -1
- package/dist/lib/payment-how.d.ts +0 -31
- package/dist/lib/payment-how.d.ts.map +0 -1
- package/dist/lib/reconcile.d.ts +0 -151
- package/dist/lib/reconcile.d.ts.map +0 -1
- package/dist/lib/settlements.d.ts +0 -28
- package/dist/lib/settlements.d.ts.map +0 -1
- package/dist/lib/statement-order.d.ts +0 -4
- package/dist/lib/statement-order.d.ts.map +0 -1
- package/dist/lib/tenant.d.ts +0 -3
- package/dist/lib/tenant.d.ts.map +0 -1
- package/dist/store.d.ts +0 -51
- package/dist/store.d.ts.map +0 -1
- package/dist/types.d.ts +0 -1362
- package/dist/types.d.ts.map +0 -1
package/dist/data/types.d.ts
DELETED
|
@@ -1,327 +0,0 @@
|
|
|
1
|
-
import type { CommissionEntry, CommissionQuery, GenerateCommissionsInput, CommissionGenerationResult, CommissionRule, CommissionRuleInput, CommissionFunction, CommissionCatalogs, CommissionGeneration, CommissionApproveResult, CommissionPayRunResult, GoalMonth, SaveGoalInput, CashSessionReview, GiftCard, GiftCardQuery, IssueGiftCardsInput, FinancialPeriod, TrialBalanceRow, AgingRow, MarginRow, Invoice, InvoiceItem, FinancialMovement, BankAccount, CashSession, PaymentMethod, PaymentMethodType, ChartOfAccountsNode, CostCenter, CardTransaction, CreateInvoiceInput, CreateInvoiceItemInput, PayMovementInput, CancelInvoiceInput, CreateTransferInput, TransferResult, CancellationReason, InvoiceStockEntry, CancelInvoiceItemsInput, CancelInvoiceItemsResult, InstallmentChargeInput, OpenCashSessionInput, CloseCashSessionInput, CreateBankAccountInput, InvoiceQuery, MovementQuery, StatementQuery, DreQuery, DreRow, PaginatedResult, FinancialSummary, StatementResult, CashSessionSummary, DateRange, ImportBankTransactionsInput, ImportBankTransactionsResult, UnreconciledQuery, ReconciliationCandidate, ReconcileInput, ReconciliationTargetQuery, ReconciliationTargetResult, StatementLinesQuery, StatementLinesResult, ReconcileAsTransferInput, ImportedStatementLine, ReconcileAsBillInput, NotaFiscal, CreateNotaFiscalInput, NotaFiscalQuery, ClientAccount, CardReceivable, InvoiceAttachment, RecurringBill, RecurringBillDirection, SaveRecurringBillInput, BankCatalogEntry, CnabContext, SaveCnabPayeeInput, SaveCompanyInput, RecordCnabBatchInput } from '../types';
|
|
2
|
-
export interface FinancialDataProvider {
|
|
3
|
-
getInvoices(query: InvoiceQuery): Promise<PaginatedResult<Invoice>>;
|
|
4
|
-
getInvoiceById(id: string): Promise<Invoice | null>;
|
|
5
|
-
getInvoiceItems(invoiceId: string): Promise<InvoiceItem[]>;
|
|
6
|
-
/** Os recibos da conta. Vazio quando ela não tem — não é erro. */
|
|
7
|
-
getInvoiceAttachments?(invoiceId: string): Promise<InvoiceAttachment[]>;
|
|
8
|
-
/** Uploads a file to the tenant's private bucket and links it to the invoice. */
|
|
9
|
-
addInvoiceAttachment?(invoiceId: string, file: File): Promise<void>;
|
|
10
|
-
createInvoice(input: CreateInvoiceInput): Promise<Invoice>;
|
|
11
|
-
updateInvoice(id: string, data: Partial<Invoice>): Promise<Invoice>;
|
|
12
|
-
/**
|
|
13
|
-
* Move o vencimento (e o valor) de uma parcela ainda em aberto.
|
|
14
|
-
*
|
|
15
|
-
* O cronograma vive em `plg_financial_invoice_installments`, tabela própria —
|
|
16
|
-
* não é campo do título. Sem esta porta, mudar a data no formulário e salvar
|
|
17
|
-
* não tinha para onde escrever: o `updateInvoice` recebia o cabeçalho e as
|
|
18
|
-
* parcelas ficavam no rascunho.
|
|
19
|
-
*
|
|
20
|
-
* Uma parcela PAGA não se move por aqui. A data dela já virou extrato, e
|
|
21
|
-
* reescrevê-la faria o razão discordar do banco — quem precisa desfazer um
|
|
22
|
-
* pagamento estorna (`reverseMovement`), que deixa rastro.
|
|
23
|
-
*/
|
|
24
|
-
updateInstallment?(id: string, data: {
|
|
25
|
-
dueDate?: string;
|
|
26
|
-
amount?: number;
|
|
27
|
-
metadata?: Record<string, unknown>;
|
|
28
|
-
}): Promise<void>;
|
|
29
|
-
/**
|
|
30
|
-
* Troca o CRONOGRAMA INTEIRO de um título que ainda não recebeu nada — é o
|
|
31
|
-
* que "mudar de 2x para 3x" significa.
|
|
32
|
-
*
|
|
33
|
-
* Não é um `updateInstallment` em laço: (invoice_id, number) é UNIQUE, a soma
|
|
34
|
-
* das parcelas tem de bater com o total do título, e ir de três linhas para
|
|
35
|
-
* duas passa obrigatoriamente por um estado inválido. Por isso uma chamada
|
|
36
|
-
* só, que o banco resolve numa transação.
|
|
37
|
-
*/
|
|
38
|
-
rescheduleInvoice?(invoiceId: string, installments: Array<{
|
|
39
|
-
dueDate: string;
|
|
40
|
-
amount: number;
|
|
41
|
-
metadata?: Record<string, unknown>;
|
|
42
|
-
}>): Promise<void>;
|
|
43
|
-
/**
|
|
44
|
-
* Troca os ITENS de um título que ainda não recebeu nada, e com eles o total.
|
|
45
|
-
*
|
|
46
|
-
* Substitui, não remenda: casar linha a linha exigiria um id estável que o
|
|
47
|
-
* formulário não carrega, e uma fatura tem unidades de linhas, não milhares.
|
|
48
|
-
* O total do título vai junto porque é a soma delas — separá-los deixaria a
|
|
49
|
-
* conta somando um valor e cobrando outro.
|
|
50
|
-
*/
|
|
51
|
-
replaceInvoiceItems?(invoiceId: string, items: CreateInvoiceItemInput[]): Promise<void>;
|
|
52
|
-
cancelInvoice(input: CancelInvoiceInput): Promise<void>;
|
|
53
|
-
/** The house's cancellation reasons (seeded with the V1 three on first read). */
|
|
54
|
-
listCancellationReasons?(): Promise<CancellationReason[]>;
|
|
55
|
-
/** Which payable lines brought goods into stock, and how much is still there. */
|
|
56
|
-
getInvoiceStockEntries?(invoiceId: string): Promise<InvoiceStockEntry[]>;
|
|
57
|
-
/** Where stock can be received: the tenant's stock locations. Absent without the stock module. */
|
|
58
|
-
listStockLocations?(): Promise<Array<{
|
|
59
|
-
id: string;
|
|
60
|
-
name: string;
|
|
61
|
-
}>>;
|
|
62
|
-
/** Products a bill line can be linked to, by name. */
|
|
63
|
-
searchStockProducts?(query: string): Promise<Array<{
|
|
64
|
-
id: string;
|
|
65
|
-
name: string;
|
|
66
|
-
}>>;
|
|
67
|
-
/** Currencies this house keeps money in: its own, plus each account's. */
|
|
68
|
-
listCurrencies?(): Promise<string[]>;
|
|
69
|
-
/** Product id → picture, for lines picked from the catalog. */
|
|
70
|
-
getProductPictures?(ids: string[]): Promise<Record<string, string>>;
|
|
71
|
-
/** How much 1 `from` is worth in `to` today, from the tenant's rates; fetched when none is on file. */
|
|
72
|
-
getFxRate?(from: string, to: string): Promise<number | null>;
|
|
73
|
-
/** The sizes/colours of a product, for a receipt that splits by them. */
|
|
74
|
-
listProductVariants?(productId: string): Promise<Array<{
|
|
75
|
-
id: string;
|
|
76
|
-
name: string;
|
|
77
|
-
isDefault: boolean;
|
|
78
|
-
}>>;
|
|
79
|
-
/** What already entered stock for this bill, by line and variant. */
|
|
80
|
-
getInvoiceStockDetails?(invoiceId: string): Promise<Array<{
|
|
81
|
-
itemId: string;
|
|
82
|
-
variantId?: string;
|
|
83
|
-
variantName?: string;
|
|
84
|
-
quantity: number;
|
|
85
|
-
/** Cost in the currency the stock is kept in. */
|
|
86
|
-
unitCost: number;
|
|
87
|
-
currency: string;
|
|
88
|
-
/** What was paid, when it was paid in another currency, and the rate used. */
|
|
89
|
-
sourceUnitCost?: number;
|
|
90
|
-
sourceCurrency?: string;
|
|
91
|
-
fxRate?: number;
|
|
92
|
-
locationName?: string;
|
|
93
|
-
enteredOn?: string;
|
|
94
|
-
}>>;
|
|
95
|
-
/**
|
|
96
|
-
* Receives one payable line into stock as it really arrived: any number of
|
|
97
|
-
* entries (variant + counted quantity), and again later for what comes next.
|
|
98
|
-
* `unitCost` overrides the billed one; `fxRate` only when the bill's currency
|
|
99
|
-
* is not the stock unit's and the day has no rate.
|
|
100
|
-
*/
|
|
101
|
-
receiveInvoiceItemStock?(input: {
|
|
102
|
-
itemId: string;
|
|
103
|
-
locationId: string;
|
|
104
|
-
productId?: string;
|
|
105
|
-
entries: Array<{
|
|
106
|
-
variantId?: string;
|
|
107
|
-
quantity: number;
|
|
108
|
-
}>;
|
|
109
|
-
unitCost?: number;
|
|
110
|
-
fxRate?: number;
|
|
111
|
-
idempotencyKey?: string;
|
|
112
|
-
}): Promise<void>;
|
|
113
|
-
/** Cancel some lines or all of them; what was paid becomes counterparty credit. */
|
|
114
|
-
cancelInvoiceItems?(input: CancelInvoiceItemsInput): Promise<CancelInvoiceItemsResult>;
|
|
115
|
-
/** Interest, fine or discount as a line of the bill itself (V1 parity). */
|
|
116
|
-
addInstallmentCharge?(input: InstallmentChargeInput): Promise<void>;
|
|
117
|
-
/** Credit a supplier holds with us from cancelled bills, minus what was spent. */
|
|
118
|
-
getSupplierCredit?(personId: string): Promise<number>;
|
|
119
|
-
getMovements(query: MovementQuery): Promise<PaginatedResult<FinancialMovement>>;
|
|
120
|
-
payMovement(input: PayMovementInput): Promise<FinancialMovement>;
|
|
121
|
-
/** Estorna um pagamento liquidado, com motivo. O razão ganha a contrapartida;
|
|
122
|
-
* nada é apagado. */
|
|
123
|
-
reverseMovement(movementId: string, reason: string): Promise<void>;
|
|
124
|
-
/** A conta do CLIENTE: o que ele contratou, pagou e ainda deve, com as
|
|
125
|
-
* contratações que compõem isso. */
|
|
126
|
-
getClientAccount(personId: string): Promise<ClientAccount>;
|
|
127
|
-
/**
|
|
128
|
-
* COMPRA ANTECIPADA — o serviço vendido hoje para ser feito um dia.
|
|
129
|
-
*
|
|
130
|
-
* *"Tá na promoção, vou comprar esse Botox e deixar guardado."* Sem
|
|
131
|
-
* agendamento, sem contrato e sem proposta; o efeito é um item **a executar**
|
|
132
|
-
* na conta da cliente. Opcional: onde não há prontuário, não existe "a
|
|
133
|
-
* executar" e a venda antecipada não tem onde repousar.
|
|
134
|
-
*/
|
|
135
|
-
prepayServices?(personId: string, lines: Array<{
|
|
136
|
-
serviceId: string;
|
|
137
|
-
name: string;
|
|
138
|
-
quantity: number;
|
|
139
|
-
unitPrice: number;
|
|
140
|
-
}>): Promise<{
|
|
141
|
-
ok: boolean;
|
|
142
|
-
reason?: string;
|
|
143
|
-
orderId?: string;
|
|
144
|
-
total?: number;
|
|
145
|
-
}>;
|
|
146
|
-
/** O catálogo de serviços vendáveis, para a compra antecipada. */
|
|
147
|
-
searchSellableServices?(term: string): Promise<Array<{
|
|
148
|
-
id: string;
|
|
149
|
-
name: string;
|
|
150
|
-
price: number;
|
|
151
|
-
}>>;
|
|
152
|
-
/** As parcelas de cartão ainda a liquidar, com taxa e líquido. */
|
|
153
|
-
getCardReceivables(): Promise<CardReceivable[]>;
|
|
154
|
-
cancelMovement(id: string): Promise<void>;
|
|
155
|
-
createTransfer(input: CreateTransferInput): Promise<TransferResult>;
|
|
156
|
-
getBankAccounts(): Promise<BankAccount[]>;
|
|
157
|
-
/** Server-side lookup across ledger accounts, including people and units. */
|
|
158
|
-
searchFinancialAccounts?(query: string, limit?: number): Promise<BankAccount[]>;
|
|
159
|
-
/**
|
|
160
|
-
* As contas que TEM extrato — banco, caixa, cartoes e recebiveis.
|
|
161
|
-
*
|
|
162
|
-
* Existe separada de `getBankAccounts` porque aquela puxa o plano INTEIRO
|
|
163
|
-
* ordenado por nome, e num tenant com milhares de contas de pessoa o teto da
|
|
164
|
-
* resposta se enche antes de chegar em «Itau». O recorte tem que ir na
|
|
165
|
-
* consulta, nao no cliente: filtrar depois e filtrar o que nao veio.
|
|
166
|
-
*/
|
|
167
|
-
getStatementAccounts?(): Promise<BankAccount[]>;
|
|
168
|
-
/** Names ledger accounts by id, inactive ones included — a payment keeps
|
|
169
|
-
* pointing at the account it left even after that account is closed. */
|
|
170
|
-
getAccountsByIds?(ids: string[]): Promise<BankAccount[]>;
|
|
171
|
-
createBankAccount(data: CreateBankAccountInput): Promise<BankAccount>;
|
|
172
|
-
updateBankAccount(id: string, data: Partial<BankAccount>): Promise<BankAccount>;
|
|
173
|
-
getCashSessions(bankAccountId?: string): Promise<CashSession[]>;
|
|
174
|
-
getOpenSession(bankAccountId: string): Promise<CashSession | null>;
|
|
175
|
-
openCashSession(input: OpenCashSessionInput): Promise<CashSession>;
|
|
176
|
-
closeCashSession(input: CloseCashSessionInput): Promise<CashSession>;
|
|
177
|
-
getCashSessionSummary(sessionId: string): Promise<CashSessionSummary>;
|
|
178
|
-
getPaymentMethods(): Promise<PaymentMethod[]>;
|
|
179
|
-
getPaymentMethodTypes(): Promise<PaymentMethodType[]>;
|
|
180
|
-
getChartOfAccounts(): Promise<ChartOfAccountsNode[]>;
|
|
181
|
-
/** Resolve migrated V1 numeric/UUID references to current chart-account IDs. */
|
|
182
|
-
resolveChartAccountRefs?(refs: string[]): Promise<Record<string, string>>;
|
|
183
|
-
getCostCenters(): Promise<CostCenter[]>;
|
|
184
|
-
getCardTransactions(dateRange?: DateRange): Promise<CardTransaction[]>;
|
|
185
|
-
getStatement(query: StatementQuery): Promise<StatementResult>;
|
|
186
|
-
/** Accrual-basis income statement, including the complete account tree. */
|
|
187
|
-
getDre(query: DreQuery): Promise<DreRow[]>;
|
|
188
|
-
getSummary(dateRange?: DateRange): Promise<FinancialSummary>;
|
|
189
|
-
/** Opcionais: um provider antigo não as tem, e a tela diz isso em vez de quebrar. */
|
|
190
|
-
getCommissions?(query: CommissionQuery): Promise<CommissionEntry[]>;
|
|
191
|
-
generateCommissions?(input: GenerateCommissionsInput): Promise<CommissionGenerationResult>;
|
|
192
|
-
/** Os lotes apurados, do mais recente para trás. */
|
|
193
|
-
getCommissionGenerations?(): Promise<CommissionGeneration[]>;
|
|
194
|
-
/** Apurar não é autorizar: aprovar é a segunda decisão, e a que o borderô exige. */
|
|
195
|
-
approveCommissions?(generationId: string): Promise<CommissionApproveResult>;
|
|
196
|
-
/** O borderô: junta o aprovado por pessoa e levanta UMA conta a pagar para cada. */
|
|
197
|
-
payRunCommissions?(generationId: string, dueDate?: string): Promise<CommissionPayRunResult>;
|
|
198
|
-
getCommissionRules?(): Promise<CommissionRule[]>;
|
|
199
|
-
saveCommissionRule?(input: CommissionRuleInput): Promise<string>;
|
|
200
|
-
deleteCommissionRule?(id: string): Promise<void>;
|
|
201
|
-
duplicateCommissionRule?(id: string): Promise<string>;
|
|
202
|
-
/** Substitui o conjunto de funções da regra — é como o diálogo do V1 salva. */
|
|
203
|
-
saveCommissionFunctions?(ruleId: string, functions: CommissionFunction[]): Promise<void>;
|
|
204
|
-
/** Serviços, categorias, profissionais e unidades — o que os critérios escolhem. */
|
|
205
|
-
getCommissionCatalogs?(): Promise<CommissionCatalogs>;
|
|
206
|
-
getCashSessionReviews?(): Promise<CashSessionReview[]>;
|
|
207
|
-
reviewCashSession?(sessionId: string, verdict: 'approved' | 'rejected', notes?: string): Promise<void>;
|
|
208
|
-
getGoalYear?(unitId: string, year: number): Promise<GoalMonth[]>;
|
|
209
|
-
saveGoal?(input: SaveGoalInput): Promise<void>;
|
|
210
|
-
deleteGoal?(id: string): Promise<void>;
|
|
211
|
-
/** Os vales existem na loja; sem ela a tela se explica em vez de quebrar. */
|
|
212
|
-
giftCardsEnabled?(): Promise<boolean>;
|
|
213
|
-
getGiftCards?(query?: GiftCardQuery): Promise<GiftCard[]>;
|
|
214
|
-
/** Exact code match (case and spacing ignored); null when no card has it. */
|
|
215
|
-
findGiftCardByCode?(code: string): Promise<GiftCard | null>;
|
|
216
|
-
/** Um lote uniforme. Devolve os códigos gerados, na ordem em que saíram. */
|
|
217
|
-
issueGiftCards?(input: IssueGiftCardsInput): Promise<string[]>;
|
|
218
|
-
activateGiftCard?(id: string): Promise<void>;
|
|
219
|
-
getPeriods?(): Promise<FinancialPeriod[]>;
|
|
220
|
-
closePeriod?(month: string, notes?: string): Promise<void>;
|
|
221
|
-
reopenPeriod?(month: string, reason: string): Promise<void>;
|
|
222
|
-
getTrialBalance?(competenceMonth?: string): Promise<TrialBalanceRow[]>;
|
|
223
|
-
getAging?(): Promise<AgingRow[]>;
|
|
224
|
-
getMarginByMonth?(): Promise<MarginRow[]>;
|
|
225
|
-
getRecurringBills?(direction: RecurringBillDirection): Promise<RecurringBill[]>;
|
|
226
|
-
/**
|
|
227
|
-
* As ocorrências PROVISIONADAS — o previsto que ainda não virou conta.
|
|
228
|
-
*
|
|
229
|
-
* Opcional: um provider que não modela recorrência simplesmente não as
|
|
230
|
-
* oferece, e a lista segue mostrando só o que existe.
|
|
231
|
-
*/
|
|
232
|
-
getProvisionedOccurrences?(query: InvoiceQuery): Promise<Invoice[]>;
|
|
233
|
-
/** Transforma UMA ocorrência na conta real. Devolve o id da fatura gerada. */
|
|
234
|
-
consolidateOccurrence?(occurrenceId: string): Promise<string | null>;
|
|
235
|
-
/** Escreve os vencimentos futuros de uma régua como previsões. */
|
|
236
|
-
provisionRecurringBill?(billId: string): Promise<number>;
|
|
237
|
-
saveRecurringBill?(input: SaveRecurringBillInput): Promise<RecurringBill>;
|
|
238
|
-
updateRecurringBill?(id: string, patch: Partial<Pick<RecurringBill, 'isActive' | 'endsOn'>>): Promise<void>;
|
|
239
|
-
runRecurring?(through?: string): Promise<{
|
|
240
|
-
created: number;
|
|
241
|
-
total: number;
|
|
242
|
-
}>;
|
|
243
|
-
/** Upsert normalized bank-statement lines as movements (idempotent by external id). */
|
|
244
|
-
importBankTransactions?(input: ImportBankTransactionsInput): Promise<ImportBankTransactionsResult>;
|
|
245
|
-
/** Imported lines not yet reconciled (externalSource set, reconciledAt null). */
|
|
246
|
-
getUnreconciled?(query?: UnreconciledQuery): Promise<ImportedStatementLine[]>;
|
|
247
|
-
/**
|
|
248
|
-
* O extrato importado com os recortes da tela: conta, periodo, tipo, status,
|
|
249
|
-
* busca e pagina. `getUnreconciled` continua sendo o atalho de quem so quer a
|
|
250
|
-
* fila pendente; esta e a porta da tela de Conciliacao, que tambem mostra o
|
|
251
|
-
* que JA foi conciliado — sem ela nao ha como conferir o que se conciliou
|
|
252
|
-
* ontem, e o V1 mostra as duas coisas na mesma lista.
|
|
253
|
-
*/
|
|
254
|
-
getStatementLines?(query?: StatementLinesQuery): Promise<StatementLinesResult>;
|
|
255
|
-
/** Internal-movement candidates to match a given imported line, ranked by score. */
|
|
256
|
-
suggestReconciliation?(bankMovementId: string): Promise<ReconciliationCandidate[]>;
|
|
257
|
-
/**
|
|
258
|
-
* Free search over the bills this line can settle — open ones (settle) and
|
|
259
|
-
* paid ones whose payment the bank has not proven yet (link only). Without
|
|
260
|
-
* it the link step only offers what the matcher guessed, and a bill paid
|
|
261
|
-
* with a different amount or date can never be chosen.
|
|
262
|
-
*/
|
|
263
|
-
searchReconciliationTargets?(bankMovementId: string, query: ReconciliationTargetQuery): Promise<ReconciliationTargetResult>;
|
|
264
|
-
/**
|
|
265
|
-
* A PÁGINA INTEIRA DE UMA VEZ, por linha do extrato.
|
|
266
|
-
*
|
|
267
|
-
* Uma pergunta por linha são cinquenta idas ao banco para pintar uma tela, e
|
|
268
|
-
* é por isso que a sugestão do V1 (que chega sozinha, em laranja) nunca cabia
|
|
269
|
-
* aqui: ela virava um botão. A tela já tem as linhas em mãos, então elas
|
|
270
|
-
* entram por parâmetro — o provedor busca os candidatos de todas de uma vez e
|
|
271
|
-
* devolve `{ [lineId]: candidatos }`.
|
|
272
|
-
*/
|
|
273
|
-
suggestReconciliationBatch?(lines: ImportedStatementLine[]): Promise<Record<string, ReconciliationCandidate[]>>;
|
|
274
|
-
/** Reconcile: link to an internal movement, or accept the line standalone. */
|
|
275
|
-
reconcileMovement?(input: ReconcileInput): Promise<void>;
|
|
276
|
-
/** Undo a reconciliation. */
|
|
277
|
-
unreconcileMovement?(bankMovementId: string): Promise<void>;
|
|
278
|
-
/**
|
|
279
|
-
* Concilia a linha como TRANSFERENCIA entre contas da casa: cria as duas
|
|
280
|
-
* pernas e casa a linha com a perna da conta do extrato, para que a evidencia
|
|
281
|
-
* nao conte duas vezes.
|
|
282
|
-
*/
|
|
283
|
-
reconcileAsTransfer?(input: ReconcileAsTransferInput): Promise<TransferResult>;
|
|
284
|
-
/**
|
|
285
|
-
* Cria a conta que a linha do extrato evidencia, quita-a contra a conta do
|
|
286
|
-
* extrato e casa as duas. E o «Lancar como conta» do V1, e o unico caminho
|
|
287
|
-
* pelo qual uma linha sem contrapartida vira evento economico de verdade.
|
|
288
|
-
*/
|
|
289
|
-
reconcileAsBill?(input: ReconcileAsBillInput): Promise<Invoice>;
|
|
290
|
-
getNotas?(query: NotaFiscalQuery): Promise<PaginatedResult<NotaFiscal>>;
|
|
291
|
-
getNotaById?(id: string): Promise<NotaFiscal | null>;
|
|
292
|
-
createNota?(input: CreateNotaFiscalInput): Promise<NotaFiscal>;
|
|
293
|
-
updateNota?(id: string, data: Partial<NotaFiscal>): Promise<NotaFiscal>;
|
|
294
|
-
/** Request authorization. Decoupled from the fiscal gateway — see note above. */
|
|
295
|
-
issueNota?(id: string): Promise<NotaFiscal>;
|
|
296
|
-
/** Reconcile an asynchronous issuer result with the server-committed document. */
|
|
297
|
-
refreshNota?(id: string): Promise<NotaFiscal>;
|
|
298
|
-
/** Resolve a short-lived artifact URL just in time; signed URLs are not ledger fields. */
|
|
299
|
-
getNotaArtifactUrl?(id: string, kind: 'xml' | 'pdf' | 'cancellation_xml'): Promise<string>;
|
|
300
|
-
cancelNota?(id: string, reason?: string): Promise<NotaFiscal>;
|
|
301
|
-
/**
|
|
302
|
-
* O catálogo de instituições do Bacen (`public.banks`, migration 167).
|
|
303
|
-
* Opcional de propósito: enquanto a tabela não existir no pool, o seletor cai
|
|
304
|
-
* na lista estática de `lib/br-banks` e continua funcionando.
|
|
305
|
-
*/
|
|
306
|
-
searchBanks?(query: string, limit?: number): Promise<BankCatalogEntry[]>;
|
|
307
|
-
getCnabContext?(input: {
|
|
308
|
-
contactIds: string[];
|
|
309
|
-
bankAccountId: string;
|
|
310
|
-
unitId?: string;
|
|
311
|
-
}): Promise<CnabContext>;
|
|
312
|
-
/** Saves the document and the account the wizard collected, so the next file reuses them. */
|
|
313
|
-
saveCnabPayees?(payees: SaveCnabPayeeInput[]): Promise<void>;
|
|
314
|
-
/**
|
|
315
|
-
* Grava a empresa pagadora. Existe aqui porque `company_legal_entities` é um
|
|
316
|
-
* read model sem porta: nenhuma tela do SDK escreve nela, e sem esta o CNPJ
|
|
317
|
-
* teria de ser digitado de novo em toda remessa.
|
|
318
|
-
*/
|
|
319
|
-
saveCompany?(input: SaveCompanyInput): Promise<{
|
|
320
|
-
id: string;
|
|
321
|
-
}>;
|
|
322
|
-
/** Files the generated remittance. The sequence number is the bank's, not the file's. */
|
|
323
|
-
recordCnabBatch?(input: RecordCnabBatchInput): Promise<{
|
|
324
|
-
id: string;
|
|
325
|
-
}>;
|
|
326
|
-
}
|
|
327
|
-
//# sourceMappingURL=types.d.ts.map
|
package/dist/data/types.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/data/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,eAAe,EAAE,eAAe,EAAE,wBAAwB,EAAE,0BAA0B,EACtF,cAAc,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,kBAAkB,EAC3E,oBAAoB,EAAE,uBAAuB,EAAE,sBAAsB,EACrE,SAAS,EAAE,aAAa,EAAE,iBAAiB,EAC3C,QAAQ,EAAE,aAAa,EAAE,mBAAmB,EAC5C,eAAe,EAAE,eAAe,EAAE,QAAQ,EAAE,SAAS,EACrD,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,WAAW,EACpD,WAAW,EAAE,aAAa,EAAE,iBAAiB,EAAE,mBAAmB,EAClE,UAAU,EAAE,eAAe,EAC3B,kBAAkB,EAAE,sBAAsB,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,cAAc,EACrH,kBAAkB,EAAE,iBAAiB,EAAE,uBAAuB,EAAE,wBAAwB,EAAE,sBAAsB,EAChH,oBAAoB,EAAE,qBAAqB,EAAE,sBAAsB,EACnE,YAAY,EAAE,aAAa,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,EAC7D,eAAe,EAAE,gBAAgB,EAAE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K,EAAE;QAAE,UAAU,EAAE,MAAM,EAAE,CAAC;QAAC,aAAa,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,WAAW,CAAC,CAAA;IAC9G,6FAA6F;IAC7F,cAAc,CAAC,CAAC,MAAM,EAAE,kBAAkB,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IAC5D;;;;OAIG;IACH,WAAW,CAAC,CAAC,KAAK,EAAE,gBAAgB,GAAG,OAAO,CAAC;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;IAC9D,yFAAyF;IACzF,eAAe,CAAC,CAAC,KAAK,EAAE,oBAAoB,GAAG,OAAO,CAAC;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;CACvE"}
|
package/dist/lib/accounts.d.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { ChartOfAccountsNode } from '../types';
|
|
2
|
-
/**
|
|
3
|
-
* The accounts a document line can actually be posted to.
|
|
4
|
-
*
|
|
5
|
-
* A chart of accounts is mostly structure: Artorius's has 88 entries of which
|
|
6
|
-
* 82 are parents. Offering all 88 in a picker is a wall of headings the user
|
|
7
|
-
* must not choose. Only leaves are postable.
|
|
8
|
-
*
|
|
9
|
-
* `node_type` is the declared answer, but it is defaulted to 'leaf' at the DDL
|
|
10
|
-
* level, so a tree imported without setting it would come through as 88 leaves.
|
|
11
|
-
* Anything that is somebody's parent is therefore treated as a group regardless
|
|
12
|
-
* of what it says about itself.
|
|
13
|
-
*/
|
|
14
|
-
export declare function postableAccounts(accounts: ChartOfAccountsNode[]): ChartOfAccountsNode[];
|
|
15
|
-
export declare function accountLabel(account: ChartOfAccountsNode): string;
|
|
16
|
-
//# sourceMappingURL=accounts.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"accounts.d.ts","sourceRoot":"","sources":["../../src/lib/accounts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAA;AAEnD;;;;;;;;;;;GAWG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,mBAAmB,EAAE,GAAG,mBAAmB,EAAE,CAGvF;AAED,wBAAgB,YAAY,CAAC,OAAO,EAAE,mBAAmB,GAAG,MAAM,CAEjE"}
|
package/dist/lib/chart-tree.d.ts
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import type { ChartOfAccountsNode } from '../types';
|
|
2
|
-
export interface ChartTree {
|
|
3
|
-
byId: Map<string, ChartOfAccountsNode>;
|
|
4
|
-
/** Children ids per parent id; roots live under ''. Sorted by code. */
|
|
5
|
-
children: Map<string, string[]>;
|
|
6
|
-
}
|
|
7
|
-
export declare function compareCodes(a: string, b: string): number;
|
|
8
|
-
export declare function buildChartTree(nodes: ChartOfAccountsNode[]): ChartTree;
|
|
9
|
-
export declare function rootIds(tree: ChartTree): string[];
|
|
10
|
-
export declare function childIds(tree: ChartTree, id: string): string[];
|
|
11
|
-
/** Group by declaration or by having children — same rule as postableAccounts. */
|
|
12
|
-
export declare function isGroupNode(tree: ChartTree, node: ChartOfAccountsNode): boolean;
|
|
13
|
-
export declare function descendantIds(tree: ChartTree, id: string): Set<string>;
|
|
14
|
-
/**
|
|
15
|
-
* Ids to show for a search: every match plus all of its ancestors, so a hit
|
|
16
|
-
* is never shown without the path that explains where it sits.
|
|
17
|
-
* Returns null when there is no query (show everything).
|
|
18
|
-
*/
|
|
19
|
-
export declare function searchVisibleIds(tree: ChartTree, query: string): {
|
|
20
|
-
visible: Set<string>;
|
|
21
|
-
matches: Set<string>;
|
|
22
|
-
} | null;
|
|
23
|
-
/**
|
|
24
|
-
* A code for the next account under `parentId` (or at the root): one past the
|
|
25
|
-
* last sibling's final segment, keeping its zero padding — 4.07 → 4.08.
|
|
26
|
-
*/
|
|
27
|
-
export declare function suggestNextCode(tree: ChartTree, parentId: string | null): string;
|
|
28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BhF"}
|
package/dist/lib/cnab240.d.ts
DELETED
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
export type CnabPaymentForm = 'pix' | 'ted' | 'boleto' | 'tributo';
|
|
2
|
-
export interface CnabCompany {
|
|
3
|
-
/** Razão social / trade name printed in the file header. */
|
|
4
|
-
name: string;
|
|
5
|
-
/** CNPJ or CPF, digits or formatted — normalised here. */
|
|
6
|
-
document: string;
|
|
7
|
-
}
|
|
8
|
-
export interface CnabPayerBank {
|
|
9
|
-
code: string;
|
|
10
|
-
name: string;
|
|
11
|
-
agency: string;
|
|
12
|
-
agencyDigit?: string;
|
|
13
|
-
account: string;
|
|
14
|
-
accountDigit?: string;
|
|
15
|
-
/** Convênio / company code. Required by some banks, blank for others. */
|
|
16
|
-
agreement?: string;
|
|
17
|
-
}
|
|
18
|
-
export interface CnabPayee {
|
|
19
|
-
name: string;
|
|
20
|
-
document: string;
|
|
21
|
-
bankCode?: string;
|
|
22
|
-
agency?: string;
|
|
23
|
-
agencyDigit?: string;
|
|
24
|
-
account?: string;
|
|
25
|
-
accountDigit?: string;
|
|
26
|
-
pixKey?: string;
|
|
27
|
-
pixKeyType?: string;
|
|
28
|
-
street?: string;
|
|
29
|
-
number?: string;
|
|
30
|
-
complement?: string;
|
|
31
|
-
district?: string;
|
|
32
|
-
city?: string;
|
|
33
|
-
state?: string;
|
|
34
|
-
postalCode?: string;
|
|
35
|
-
}
|
|
36
|
-
export interface CnabItem {
|
|
37
|
-
/** The installment this line pays — carried back to plg_financial_cnab_items. */
|
|
38
|
-
reference: string;
|
|
39
|
-
amount: number;
|
|
40
|
-
/** ISO date (YYYY-MM-DD). */
|
|
41
|
-
paymentDate: string;
|
|
42
|
-
paymentForm: CnabPaymentForm;
|
|
43
|
-
/** Barcode or linha digitável, for boleto and tributo. */
|
|
44
|
-
barcode?: string;
|
|
45
|
-
payee: CnabPayee;
|
|
46
|
-
}
|
|
47
|
-
export interface CnabInput {
|
|
48
|
-
/** NSA — the bank counts it. Two files with the same number is a rejected remittance. */
|
|
49
|
-
sequence: number;
|
|
50
|
-
company: CnabCompany;
|
|
51
|
-
bank: CnabPayerBank;
|
|
52
|
-
items: CnabItem[];
|
|
53
|
-
/** Injectable so a test gets a stable file. */
|
|
54
|
-
generatedAt?: Date;
|
|
55
|
-
}
|
|
56
|
-
export interface CnabResult {
|
|
57
|
-
fileName: string;
|
|
58
|
-
content: string;
|
|
59
|
-
layout: string;
|
|
60
|
-
totalAmount: number;
|
|
61
|
-
itemsCount: number;
|
|
62
|
-
/** One entry per lote, for the review screen. */
|
|
63
|
-
batches: Array<{
|
|
64
|
-
form: CnabPaymentForm;
|
|
65
|
-
count: number;
|
|
66
|
-
total: number;
|
|
67
|
-
}>;
|
|
68
|
-
}
|
|
69
|
-
/** 01 phone · 02 email · 03 CPF/CNPJ · 04 random key · 05 bank details. */
|
|
70
|
-
export declare const pixInitiationCodeFor: (pixKeyType?: string, pixKey?: string) => "01" | "02" | "03" | "04" | "05";
|
|
71
|
-
/**
|
|
72
|
-
* Linha digitável (47 digits for a boleto, 48 for a tribute) to barcode (44).
|
|
73
|
-
* A 44-digit input is already the barcode and passes through.
|
|
74
|
-
*/
|
|
75
|
-
export declare function linhaDigitavelToBarcode(input: string): string;
|
|
76
|
-
export declare function generateCnab240(input: CnabInput): CnabResult;
|
|
77
|
-
export interface CnabPayeeGap {
|
|
78
|
-
reference: string;
|
|
79
|
-
name: string;
|
|
80
|
-
field: 'document' | 'pixKey' | 'pixKeyTypeEmv' | 'bankDetails' | 'barcode';
|
|
81
|
-
message: string;
|
|
82
|
-
}
|
|
83
|
-
/**
|
|
84
|
-
* The gaps, named one by one. "Faltam dados" is a dead end; the person needs to
|
|
85
|
-
* know which payee and which field, which is what the V1 wizard asked for.
|
|
86
|
-
*/
|
|
87
|
-
export declare function cnabPayeeGaps(items: CnabItem[]): CnabPayeeGap[];
|
|
88
|
-
/**
|
|
89
|
-
* The form a bill suggests. A 44–48 digit code is a boleto; anything else in
|
|
90
|
-
* that field is a PIX key or copia-e-cola, and PIX is the only form that can
|
|
91
|
-
* use it.
|
|
92
|
-
*/
|
|
93
|
-
export declare function suggestPaymentForm(barcode?: string | null): CnabPaymentForm;
|
|
94
|
-
/** The PIX key type a key implies, when nobody recorded one. */
|
|
95
|
-
export declare function inferPixKeyType(key: string): string;
|
|
96
|
-
/**
|
|
97
|
-
* Separa «99379-9» em número e dígito.
|
|
98
|
-
*
|
|
99
|
-
* O arquivo lê conta e DAC em campos diferentes, e o cadastro do V1 guardou os
|
|
100
|
-
* dois numa string só. Sem partir, `99379-9` vira a conta `993799` com o DAC em
|
|
101
|
-
* branco — um número que não existe, num arquivo que o banco aceita e devolve.
|
|
102
|
-
* Só vale quando o campo de dígito está vazio: um dígito já informado é o que a
|
|
103
|
-
* pessoa disse, e ele manda.
|
|
104
|
-
*/
|
|
105
|
-
export declare function splitAccountDigit(value: string, digit: string): [string, string];
|
|
106
|
-
//# sourceMappingURL=cnab240.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cnab240.d.ts","sourceRoot":"","sources":["../../src/lib/cnab240.ts"],"names":[],"mappings":"AAWA,MAAM,MAAM,eAAe,GAAG,KAAK,GAAG,KAAK,GAAG,QAAQ,GAAG,SAAS,CAAA;AAElE,MAAM,WAAW,WAAW;IAC1B,4DAA4D;IAC5D,IAAI,EAAE,MAAM,CAAA;IACZ,0DAA0D;IAC1D,QAAQ,EAAE,MAAM,CAAA;CACjB;AAED,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,MAAM,CAAA;IACd,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,OAAO,EAAE,MAAM,CAAA;IACf,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,yEAAyE;IACzE,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,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E,KAAK,CAAC;QAAE,IAAI,EAAE,eAAe,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;CACxE;AA0DD,2EAA2E;AAC3E,eAAO,MAAM,oBAAoB,GAAI,aAAa,MAAM,EAAE,SAAS,MAAM,qCA2BxE,CAAA;AAsBD;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAe7D;AAwQD,wBAAgB,eAAe,CAAC,KAAK,EAAE,SAAS,GAAG,UAAU,CA6D5D;AAID,MAAM,WAAW,YAAY;IAC3B,SAAS,EAAE,MAAM,CAAA;IACjB,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,UAAU,GAAG,QAAQ,GAAG,eAAe,GAAG,aAAa,GAAG,SAAS,CAAA;IAC1E,OAAO,EAAE,MAAM,CAAA;CAChB;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,QAAQ,EAAE,GAAG,YAAY,EAAE,CAyB/D;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,eAAe,CAK3E;AAED,gEAAgE;AAChE,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CASnD;AAED;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAIhF"}
|
package/dist/lib/fx-auto.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Writes today's reference rate for `house → each currency` that has none.
|
|
3
|
-
* Returns true when at least one rate was written. Never throws: without a
|
|
4
|
-
* rate the amounts simply stay outside the totals, which the screen says.
|
|
5
|
-
*/
|
|
6
|
-
export declare function ensureReferenceRates(pub: any, tenantId: string, house: string, currencies: string[]): Promise<boolean>;
|
|
7
|
-
//# sourceMappingURL=fx-auto.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"fx-auto.d.ts","sourceRoot":"","sources":["../../src/lib/fx-auto.ts"],"names":[],"mappings":"AAaA;;;;GAIG;AACH,wBAAsB,oBAAoB,CACxC,GAAG,EAAE,GAAG,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,GAC9D,OAAO,CAAC,OAAO,CAAC,CAwBlB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"idempotency.d.ts","sourceRoot":"","sources":["../../src/lib/idempotency.ts"],"names":[],"mappings":"AAAA,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAU1D"}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
interface InvoiceLineSummarySource {
|
|
2
|
-
invoice_id?: string | null;
|
|
3
|
-
name?: string | null;
|
|
4
|
-
description?: string | null;
|
|
5
|
-
quantity?: number | string | null;
|
|
6
|
-
}
|
|
7
|
-
interface InvoiceItemType {
|
|
8
|
-
value: string;
|
|
9
|
-
label: string;
|
|
10
|
-
icon?: string;
|
|
11
|
-
}
|
|
12
|
-
/** Product and service are catalog-backed choices; Other is always available. */
|
|
13
|
-
export declare function availableInvoiceItemTypes<T extends InvoiceItemType>(itemTypes: T[], lookupKinds: Iterable<string>, otherLabel: string,
|
|
14
|
-
/** A tela fala `debit`, a recorrência fala `payable` — as duas são conta a
|
|
15
|
-
* PAGAR. Ausente mantém o comportamento antigo. */
|
|
16
|
-
direction?: 'debit' | 'credit' | 'payable' | 'receivable'): T[];
|
|
17
|
-
export interface CounterpartyAccountingPolicy {
|
|
18
|
-
defaultAccountId?: string;
|
|
19
|
-
defaultCostCenterId?: string;
|
|
20
|
-
allowedAccountIds: string[];
|
|
21
|
-
limitAccounts: boolean;
|
|
22
|
-
addItemsAutomatically: boolean;
|
|
23
|
-
}
|
|
24
|
-
/** Read migrated V1 supplier policy from both historical metadata shapes. */
|
|
25
|
-
export declare function counterpartyAccountingPolicy(optionData: unknown): CounterpartyAccountingPolicy;
|
|
26
|
-
export declare function resolveCounterpartyAccountingPolicy(policy: CounterpartyAccountingPolicy, resolvedRefs: Record<string, string>): CounterpartyAccountingPolicy;
|
|
27
|
-
/** Compact the real invoice lines for list display. Import notes and invoice
|
|
28
|
-
* descriptions are fallbacks, never substitutes for the things being billed. */
|
|
29
|
-
export declare function summarizeInvoiceLines(rows: InvoiceLineSummarySource[], visible?: number): Map<string, string>;
|
|
30
|
-
/**
|
|
31
|
-
* Abrir uma conta é editá-la — enquanto ela ainda puder mudar.
|
|
32
|
-
*
|
|
33
|
-
* Uma conta em aberto é um RASCUNHO COM NÚMERO: quem clica nela da lista ou da
|
|
34
|
-
* agenda quase sempre vai corrigir o vencimento, o fornecedor ou um item, e
|
|
35
|
-
* aterrissar numa ficha de leitura custa um segundo clique toda vez. Uma conta
|
|
36
|
-
* paga ou cancelada é o contrário: ela virou extrato, não se reescreve, e abrir
|
|
37
|
-
* um formulário sobre ela convida a tentar.
|
|
38
|
-
*
|
|
39
|
-
* `partial` fica do lado editável de propósito — ela ainda deve, e o cabeçalho
|
|
40
|
-
* continua corrigível. O que o primeiro centágo trava é o CRONOGRAMA e os
|
|
41
|
-
* ITENS, e disso quem cuida é `canReschedule`/`canEditItems` no próprio
|
|
42
|
-
* formulário (098/099), não esta porta.
|
|
43
|
-
*/
|
|
44
|
-
export declare function invoiceOpensForEditing(status: string | undefined): boolean;
|
|
45
|
-
export {};
|
|
46
|
-
//# sourceMappingURL=invoice-list.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"invoice-list.d.ts","sourceRoot":"","sources":["../../src/lib/invoice-list.ts"],"names":[],"mappings":"AAAA,UAAU,wBAAwB;IAChC,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC1B,IA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1
|
-
import type { BankAccount, FinancialMovement, PaymentMethod, PaymentMethodType } from '../types';
|
|
2
|
-
export interface PaymentHow {
|
|
3
|
-
/** "Pix", "Cartão de crédito", or the registry's method/type name. */
|
|
4
|
-
method?: string;
|
|
5
|
-
/** Where the money left from (payable) or landed (receivable). */
|
|
6
|
-
account?: BankAccount;
|
|
7
|
-
/**
|
|
8
|
-
* A ESPÉCIE da forma — `cash`, `pix`, `credit_card`…
|
|
9
|
-
*
|
|
10
|
-
* O nome já vinha; a espécie é o que permite DESENHAR a forma em vez de
|
|
11
|
-
* escrevê-la. Uma linha de parcela tem espaço para um ícone e não para
|
|
12
|
-
* "Cartão de crédito · Mercado Pago Vini [Brisah]".
|
|
13
|
-
*/
|
|
14
|
-
typeKind?: string;
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* The account a payment moved through. `bank_account_id` is null whenever the
|
|
18
|
-
* holder is not a bank (and on reconciled or migrated rows), so the ledger leg
|
|
19
|
-
* is the reliable answer: a payable payment is a debit to "payables" and a
|
|
20
|
-
* credit to the holder, a receivable the mirror image.
|
|
21
|
-
*/
|
|
22
|
-
export declare function paymentHolderId(p: FinancialMovement): string | undefined;
|
|
23
|
-
/** O que é preciso saber para traduzir um pagamento em palavras. */
|
|
24
|
-
export interface DescribePaymentContext {
|
|
25
|
-
paymentMethods: PaymentMethod[];
|
|
26
|
-
paymentMethodTypes: PaymentMethodType[];
|
|
27
|
-
accountsById: Map<string, BankAccount>;
|
|
28
|
-
t: (key: string) => string;
|
|
29
|
-
}
|
|
30
|
-
export declare function describePayment(p: FinancialMovement, ctx: DescribePaymentContext): PaymentHow;
|
|
31
|
-
//# sourceMappingURL=payment-how.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"payment-how.d.ts","sourceRoot":"","sources":["../../src/lib/payment-how.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,iBAAiB,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAA;AAEhG,MAAM,WAAW,UAAU;IACzB,sEAAsE;IACtE,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,kEAAkE;IAClE,OAAO,CAAC,EAAE,WAAW,CAAA;IACrB;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB;AAMD;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,CAAC,EAAE,iBAAiB,GAAG,MAAM,GAAG,SAAS,CAGxE;AAED,oEAAoE;AACpE,MAAM,WAAW,sBAAsB;IACrC,cAAc,EAAE,aAAa,EAAE,CAAA;IAC/B,kBAAkB,EAAE,iBAAiB,EAAE,CAAA;IACvC,YAAY,EAAE,GAAG,CAAC,MAAM,EAAE,WAAW,CAAC,CAAA;IACtC,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,CAAA;CAC3B;AAED,wBAAgB,eAAe,CAAC,CAAC,EAAE,iBAAiB,EAAE,GAAG,EAAE,sBAAsB,GAAG,UAAU,CAa7F"}
|