Documentation
¶
Overview ¶
Package orgreports is the HTTP client for Bitwave organization reports. It is intentionally separate from the CLI ledger workspace client: these reports run against the organization's product data, not ledger journals.
Index ¶
- Constants
- type AccountingConnection
- type ActionsExportInput
- type BabelRollupRule
- type BulkCategorizeResult
- type BulkStateRequest
- type BulkStateResponse
- type Category
- type Client
- func (c *Client) AccountingConnections(ctx context.Context, orgID string) ([]AccountingConnection, error)
- func (c *Client) ActionColumnValues(ctx context.Context, orgID, inventoryViewID, column, from, to string) ([]string, error)
- func (c *Client) BulkCategorizeTransactions(ctx context.Context, orgID string, body json.RawMessage) ([]BulkCategorizeResult, error)
- func (c *Client) BulkTransactionStateStatus(ctx context.Context, orgID, workflowID string) (*BulkStateResponse, error)
- func (c *Client) BulkUpdateTransactionState(ctx context.Context, orgID string, input BulkStateRequest) (*BulkStateResponse, error)
- func (c *Client) CancelInventoryViewUpdate(ctx context.Context, orgID, viewID, updateID string) (*InventoryMutationResult, error)
- func (c *Client) Categories(ctx context.Context, orgID string) ([]Category, error)
- func (c *Client) CategorizeTransaction(ctx context.Context, orgID, transactionID string, body json.RawMessage) error
- func (c *Client) Contacts(ctx context.Context, orgID string) ([]Contact, error)
- func (c *Client) CreateChartAccount(ctx context.Context, orgID string, input CreateChartAccountInput) (*CreateChartAccountResponse, error)
- func (c *Client) CreateContact(ctx context.Context, orgID string, input CreateContactInput) (string, error)
- func (c *Client) CreateInternalTransfer(ctx context.Context, orgID string, input InternalTransferInput) (json.RawMessage, error)
- func (c *Client) CreateInventoryView(ctx context.Context, orgID string, input json.RawMessage) (*InventoryMutationResult, error)
- func (c *Client) CreateManualAccountingConnection(ctx context.Context, orgID string) (*CreateManualAccountingConnectionResponse, error)
- func (c *Client) CreateOrgWallet(ctx context.Context, orgID string, wallet map[string]any, ...) (*OrgWallet, error)
- func (c *Client) CreateRule(ctx context.Context, orgID string, rule json.RawMessage) (*RuleCreateResult, error)
- func (c *Client) CreateTransactions(ctx context.Context, orgID string, input []CreateTransaction) (json.RawMessage, error)
- func (c *Client) DeleteInventoryView(ctx context.Context, orgID, viewID string) error
- func (c *Client) DeleteRule(ctx context.Context, orgID, ruleID string) error
- func (c *Client) DisableCategories(ctx context.Context, orgID string) error
- func (c *Client) DisableContacts(ctx context.Context, orgID string) error
- func (c *Client) Download(ctx context.Context, orgID, runID string) ([]byte, error)
- func (c *Client) DownloadLink(ctx context.Context, href string) ([]byte, error)
- func (c *Client) ExecuteBulkRules(ctx context.Context, orgID string, after, before int64) error
- func (c *Client) ExportDownloadURL(ctx context.Context, orgID, exportID, exportType string) (string, error)
- func (c *Client) FindInvoiceForContact(ctx context.Context, orgID string, input FindInvoiceInput) (*Invoice, error)
- func (c *Client) FullWalletResync(ctx context.Context, orgID, walletID string, execute bool) (*FullWalletResyncResponse, error)
- func (c *Client) InventoryViewUpdates(ctx context.Context, orgID, viewID string) ([]InventoryViewUpdate, error)
- func (c *Client) InventoryViews(ctx context.Context, orgID string) ([]InventoryView, error)
- func (c *Client) Invoice(ctx context.Context, orgID, invoiceID string) (*Invoice, error)
- func (c *Client) Invoices(ctx context.Context, orgID string, input InvoiceListInput) (*InvoicePage, error)
- func (c *Client) LegacyReport(ctx context.Context, orgID, runID string, includeDownloadURL bool) (*LegacyReport, error)
- func (c *Client) Org(ctx context.Context, orgID string) (*OrgDetails, error)
- func (c *Client) OrgWallets(ctx context.Context, orgID string) ([]OrgWallet, error)
- func (c *Client) RawEndpoint(service, path string) (string, error)
- func (c *Client) RawRequest(ctx context.Context, service, method, path string, body any) ([]byte, error)
- func (c *Client) RawRequestBytes(ctx context.Context, service, method, path string, body []byte, ...) ([]byte, error)
- func (c *Client) Result(ctx context.Context, orgID, runID string) (*ReportData, error)
- func (c *Client) Rule(ctx context.Context, orgID, ruleID string) (json.RawMessage, error)
- func (c *Client) Rules(ctx context.Context, orgID string) ([]json.RawMessage, error)
- func (c *Client) RulesPage(ctx context.Context, orgID string, pageLimit int, paginationToken string) (*RulesPage, error)
- func (c *Client) RunRules(ctx context.Context, orgID string) error
- func (c *Client) SearchContacts(ctx context.Context, orgID, query string, limit int) ([]Contact, error)
- func (c *Client) SearchTransactions(ctx context.Context, orgID string, input TransactionSearchRequest) (*TransactionSearchResponse, error)
- func (c *Client) StartActionsExport(ctx context.Context, orgID, inventoryViewID string, input ActionsExportInput) (*ExportResponse, error)
- func (c *Client) StartBalance(ctx context.Context, orgID string, inputs []Input) (*Run, error)
- func (c *Client) StartLegacyBalance(ctx context.Context, orgID string, input LegacyBalanceInput) (*LegacyRun, error)
- func (c *Client) Status(ctx context.Context, orgID, runID string) (*RunStatus, error)
- func (c *Client) StreamTransactionExport(ctx context.Context, orgID string, input TransactionExportRequest, ...) error
- func (c *Client) Subsidiaries(ctx context.Context, orgID string) ([]Subsidiary, error)
- func (c *Client) ToggleRule(ctx context.Context, orgID, ruleID string, disabled bool) error
- func (c *Client) Transaction(ctx context.Context, orgID, transactionID string) (json.RawMessage, error)
- func (c *Client) TransactionAssetIDs(ctx context.Context, orgID string, input TransactionAssetRequest) ([]string, error)
- func (c *Client) TransactionCategorizationContext(ctx context.Context, orgID, transactionID string) (*TransactionCategorizationContext, error)
- func (c *Client) TransactionSummaryAddresses(ctx context.Context, orgID, walletID, from, to, sortField string, ...) ([]TransactionSummaryAddressRecord, error)
- func (c *Client) TransactionSummaryAssets(ctx context.Context, orgID string) ([]TransactionSummaryAsset, error)
- func (c *Client) TransactionSummaryWallets(ctx context.Context, orgID, from, to string, page, pageSize int) ([]TransactionSummaryWalletRecord, error)
- func (c *Client) TransactionWithAccountingDetails(ctx context.Context, orgID, transactionID string) (json.RawMessage, error)
- func (c *Client) TriggerInventoryViewUpdate(ctx context.Context, orgID, viewID string, input InventoryViewUpdateRequest) (*InventoryMutationResult, error)
- func (c *Client) UpdateCategoryEnabled(ctx context.Context, orgID, categoryID string, enabled bool) (json.RawMessage, error)
- func (c *Client) UpdateContact(ctx context.Context, orgID string, input json.RawMessage) (json.RawMessage, error)
- func (c *Client) UpdateRule(ctx context.Context, orgID, ruleID string, rule json.RawMessage) (*RuleCreateResult, error)
- func (c *Client) UpsertWalletRollup(ctx context.Context, orgID, walletID string, input WalletRollupRequest) error
- func (c *Client) ValidateRule(ctx context.Context, orgID, transactionID, ruleID string) (json.RawMessage, error)
- func (c *Client) WalletRollup(ctx context.Context, orgID, walletID string) (json.RawMessage, error)
- func (c *Client) Wallets(ctx context.Context, orgID string) ([]Wallet, error)
- type ColumnUniqueValues
- type Contact
- type ContactAddress
- type ContactSearchResponse
- type CreateChartAccountInput
- type CreateChartAccountResponse
- type CreateContactInput
- type CreateManualAccountingConnectionResponse
- type CreateTransaction
- type ExportResponse
- type FindInvoiceInput
- type FullWalletResyncResponse
- type Input
- type InternalTransferInput
- type InventoryMutationResult
- type InventoryView
- type InventoryViewUpdate
- type InventoryViewUpdateRequest
- type Invoice
- type InvoiceListInput
- type InvoicePage
- type LegacyBalanceInput
- type LegacyReport
- type LegacyRun
- type Link
- type OrgDetails
- type OrgWallet
- type ReportData
- type ReportRow
- type RuleCreateResult
- type RulesPage
- type Run
- type RunStatus
- type StartRequest
- type Subsidiary
- type TransactionAssetRequest
- type TransactionAssetValue
- type TransactionCategorizationContext
- type TransactionCategorizationLine
- type TransactionDateRange
- type TransactionExchangeRate
- type TransactionExportFilters
- type TransactionExportRequest
- type TransactionFailure
- type TransactionSearchRequest
- type TransactionSearchResponse
- type TransactionSummaryAddressRecord
- type TransactionSummaryAsset
- type TransactionSummaryWalletRecord
- type Wallet
- type WalletPermission
- type WalletResyncStateTarget
- type WalletRollupRequest
Constants ¶
const ( APIServiceCore = "core" APIServiceApp = "app" APIServiceReports = "reports" )
const ( TransactionStateIgnore = "ignore" TransactionStateUnignore = "un-ignore" )
const BalanceReportType = "balance-report"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountingConnection ¶
type ActionsExportInput ¶
type BabelRollupRule ¶
type BabelRollupRule struct {
RuleName string `json:"ruleName"`
Classification string `json:"classification"`
FingerPrint string `json:"fingerPrint"`
RollupAction string `json:"rollupAction"`
Cadence string `json:"cadence"`
Metadata map[string]string `json:"metadata,omitempty"`
InvolvedAccounts []string `json:"involvedAccounts,omitempty"`
CounterParties []string `json:"counterParties,omitempty"`
CounterPartyExcludeFees bool `json:"counterPartyExcludeFees,omitempty"`
StartSEC *int64 `json:"startSec,omitempty"`
EndSEC *int64 `json:"endSec,omitempty"`
SeparateByInvolvedAccounts bool `json:"separateByInvolvedAccounts,omitempty"`
SeparateByCounterParty bool `json:"separateByCounterParty,omitempty"`
SeparateByTrade string `json:"separateByTrade,omitempty"`
RoundPeriod string `json:"roundPeriod,omitempty"`
}
type BulkCategorizeResult ¶
type BulkStateRequest ¶
type BulkStateResponse ¶
type BulkStateResponse struct {
WorkflowID string `json:"workflowId,omitempty"`
BulkActionID string `json:"bulkActionId,omitempty"`
Status string `json:"status,omitempty"`
Success bool `json:"success"`
Processed int `json:"processed"`
SuccessCount int `json:"successCount"`
Failed []TransactionFailure `json:"failed"`
Transactions []struct {
TransactionID string `json:"transactionId"`
Status string `json:"status"`
Error string `json:"error,omitempty"`
} `json:"transactions,omitempty"`
}
type Client ¶
type Client struct {
BaseURL string
RulesQueryURL string
RulesMutationURL string
TokenResolver func() (string, error)
HTTPClient *http.Client
}
func (*Client) AccountingConnections ¶
func (*Client) ActionColumnValues ¶
func (c *Client) ActionColumnValues(ctx context.Context, orgID, inventoryViewID, column, from, to string) ([]string, error)
ActionColumnValues returns all unique values for one Actions column.
func (*Client) BulkCategorizeTransactions ¶
func (c *Client) BulkCategorizeTransactions(ctx context.Context, orgID string, body json.RawMessage) ([]BulkCategorizeResult, error)
func (*Client) BulkTransactionStateStatus ¶
func (*Client) BulkUpdateTransactionState ¶
func (c *Client) BulkUpdateTransactionState(ctx context.Context, orgID string, input BulkStateRequest) (*BulkStateResponse, error)
func (*Client) CancelInventoryViewUpdate ¶
func (*Client) Categories ¶
func (*Client) CategorizeTransaction ¶
func (c *Client) CategorizeTransaction(ctx context.Context, orgID, transactionID string, body json.RawMessage) error
CategorizeTransaction sends the complete Bitwave categorization DTO. The shape is deliberately json.RawMessage because it is a tagged union whose required fields depend on the transaction and categorization type.
func (*Client) CreateChartAccount ¶
func (c *Client) CreateChartAccount(ctx context.Context, orgID string, input CreateChartAccountInput) (*CreateChartAccountResponse, error)
func (*Client) CreateContact ¶
func (*Client) CreateInternalTransfer ¶
func (c *Client) CreateInternalTransfer(ctx context.Context, orgID string, input InternalTransferInput) (json.RawMessage, error)
func (*Client) CreateInventoryView ¶
func (c *Client) CreateInventoryView(ctx context.Context, orgID string, input json.RawMessage) (*InventoryMutationResult, error)
func (*Client) CreateManualAccountingConnection ¶
func (*Client) CreateOrgWallet ¶
func (*Client) CreateRule ¶
func (c *Client) CreateRule(ctx context.Context, orgID string, rule json.RawMessage) (*RuleCreateResult, error)
func (*Client) CreateTransactions ¶
func (c *Client) CreateTransactions(ctx context.Context, orgID string, input []CreateTransaction) (json.RawMessage, error)
func (*Client) DeleteInventoryView ¶
func (*Client) DeleteRule ¶
func (*Client) DisableCategories ¶ added in v0.3.1
func (*Client) DisableContacts ¶ added in v0.3.1
func (*Client) DownloadLink ¶
func (*Client) ExecuteBulkRules ¶
func (*Client) ExportDownloadURL ¶
func (*Client) FindInvoiceForContact ¶ added in v0.4.0
func (*Client) FullWalletResync ¶ added in v0.3.1
func (*Client) InventoryViewUpdates ¶
func (*Client) InventoryViews ¶
func (*Client) Invoices ¶ added in v0.4.0
func (c *Client) Invoices(ctx context.Context, orgID string, input InvoiceListInput) (*InvoicePage, error)
func (*Client) LegacyReport ¶
func (*Client) OrgWallets ¶
func (*Client) RawEndpoint ¶ added in v0.3.1
RawEndpoint resolves a relative API path against a fixed Bitwave service. It is exported so the CLI can show the exact request during a dry run.
func (*Client) RawRequest ¶ added in v0.3.1
func (c *Client) RawRequest(ctx context.Context, service, method, path string, body any) ([]byte, error)
RawRequest sends an authenticated request to one of Bitwave's known API services. The path must be relative so an organization token can never be forwarded to an arbitrary host.
func (*Client) RawRequestBytes ¶ added in v0.3.1
func (c *Client) RawRequestBytes(ctx context.Context, service, method, path string, body []byte, headers http.Header) ([]byte, error)
RawRequestBytes sends an exact request body and caller-provided headers to a known Bitwave service. Authentication is still owned by the client.
func (*Client) SearchContacts ¶ added in v0.4.0
func (*Client) SearchTransactions ¶
func (c *Client) SearchTransactions(ctx context.Context, orgID string, input TransactionSearchRequest) (*TransactionSearchResponse, error)
func (*Client) StartActionsExport ¶
func (c *Client) StartActionsExport(ctx context.Context, orgID, inventoryViewID string, input ActionsExportInput) (*ExportResponse, error)
func (*Client) StartBalance ¶
func (*Client) StartLegacyBalance ¶
func (c *Client) StartLegacyBalance(ctx context.Context, orgID string, input LegacyBalanceInput) (*LegacyRun, error)
StartLegacyBalance uses the production-stable report controller that backs the web application's default Balance Report path. The V3 report-run API is retained separately because some deployments expose start/status without yet exposing result/download.
func (*Client) StreamTransactionExport ¶
func (c *Client) StreamTransactionExport(ctx context.Context, orgID string, input TransactionExportRequest, dst io.Writer) error
StreamTransactionExport writes the V3 Transaction Export CSV to dst. The request uses the same filter contract as transaction search; pagination fields are deliberately absent because the export endpoint streams all rows.
func (*Client) Subsidiaries ¶
func (*Client) ToggleRule ¶
func (*Client) Transaction ¶
func (*Client) TransactionAssetIDs ¶
func (c *Client) TransactionAssetIDs(ctx context.Context, orgID string, input TransactionAssetRequest) ([]string, error)
TransactionAssetIDs returns the transaction search facet. Supplying wallet IDs or a date range makes this a dependent choice list without downloading transaction rows into the LLM context.
func (*Client) TransactionCategorizationContext ¶ added in v0.4.0
func (*Client) TransactionSummaryAddresses ¶ added in v0.3.1
func (*Client) TransactionSummaryAssets ¶ added in v0.3.1
func (*Client) TransactionSummaryWallets ¶ added in v0.3.1
func (*Client) TransactionWithAccountingDetails ¶ added in v0.4.0
func (c *Client) TransactionWithAccountingDetails(ctx context.Context, orgID, transactionID string) (json.RawMessage, error)
TransactionWithAccountingDetails uses the legacy read representation because the v3 transaction endpoint intentionally omits saved accounting details.
func (*Client) TriggerInventoryViewUpdate ¶
func (c *Client) TriggerInventoryViewUpdate(ctx context.Context, orgID, viewID string, input InventoryViewUpdateRequest) (*InventoryMutationResult, error)
func (*Client) UpdateCategoryEnabled ¶ added in v0.3.1
func (*Client) UpdateContact ¶ added in v0.3.1
func (c *Client) UpdateContact(ctx context.Context, orgID string, input json.RawMessage) (json.RawMessage, error)
func (*Client) UpdateRule ¶
func (c *Client) UpdateRule(ctx context.Context, orgID, ruleID string, rule json.RawMessage) (*RuleCreateResult, error)
func (*Client) UpsertWalletRollup ¶
func (*Client) ValidateRule ¶
func (*Client) WalletRollup ¶
type ColumnUniqueValues ¶
type Contact ¶
type Contact struct {
ID string `json:"id"`
Name string `json:"name"`
RemoteID string `json:"remoteId,omitempty"`
FirstName string `json:"firstName,omitempty"`
LastName string `json:"lastName,omitempty"`
EmailAddress string `json:"emailAddress,omitempty"`
Enabled bool `json:"enabled"`
Source string `json:"source,omitempty"`
Type string `json:"type,omitempty"`
AccountingConnectionID string `json:"accountingConnectionId,omitempty"`
DefaultExpenseCategoryID string `json:"defaultExpenseCategoryId,omitempty"`
DefaultRevenueCategoryID string `json:"defaultRevenueCategoryId,omitempty"`
Metadata map[string]any `json:"metadata,omitempty"`
Addresses []ContactAddress `json:"addresses,omitempty"`
}
type ContactAddress ¶ added in v0.3.1
type ContactAddress struct {
Coin string `json:"coin,omitempty"`
Address string `json:"address,omitempty"`
Memo string `json:"memo,omitempty"`
NetworkID string `json:"networkId,omitempty"`
DefaultExpenseCategoryID string `json:"defaultExpenseCategoryId,omitempty"`
DefaultRevenueCategoryID string `json:"defaultRevenueCategoryId,omitempty"`
}
type ContactSearchResponse ¶ added in v0.4.0
type ContactSearchResponse struct {
Items []Contact `json:"items"`
}
type CreateChartAccountInput ¶
type CreateChartAccountInput struct {
ConnectionID string `json:"connectionId"`
Source string `json:"source"`
ID string `json:"id"`
Name string `json:"name"`
Type string `json:"type"`
Code string `json:"code"`
Description string `json:"description"`
}
CreateChartAccountInput is Bitwave's category creation contract. In a manual accounting connection these categories are the organization chart of accounts used by categorization and rules.
type CreateChartAccountResponse ¶
type CreateChartAccountResponse struct {
ID string `json:"id"`
}
type CreateContactInput ¶
type CreateContactInput struct {
ConnectionID string `json:"connectionId"`
RemoteID string `json:"remoteId,omitempty"`
Name string `json:"name"`
Type string `json:"type"`
FirstName string `json:"firstName,omitempty"`
LastName string `json:"lastName,omitempty"`
EmailAddress string `json:"emailAddress,omitempty"`
}
type CreateManualAccountingConnectionResponse ¶
type CreateManualAccountingConnectionResponse struct {
ConnectionID string `json:"connectionId"`
}
type CreateTransaction ¶
type CreateTransaction struct {
SystemID string `json:"systemId"`
Time string `json:"time"`
AccountID string `json:"accountId"`
Amount string `json:"amount"`
AmountTicker string `json:"amountTicker"`
TransactionType string `json:"transactionType"`
TradeID string `json:"tradeId,omitempty"`
GroupID string `json:"groupId,omitempty"`
BlockchainID string `json:"blockchainId,omitempty"`
Cost string `json:"cost,omitempty"`
CostTicker string `json:"costTicker,omitempty"`
Fee string `json:"fee,omitempty"`
FeeTicker string `json:"feeTicker,omitempty"`
CategoryID string `json:"categoryId,omitempty"`
ContactID string `json:"contactId,omitempty"`
AccountingConnectionID string `json:"accountingConnectionId,omitempty"`
Memo string `json:"memo,omitempty"`
Description string `json:"description,omitempty"`
FromAddress string `json:"fromAddress,omitempty"`
ToAddress string `json:"toAddress,omitempty"`
Metadata map[string]any `json:"metadata,omitempty"`
}
CreateTransaction is the public transaction-ingest contract used by the Bitwave transaction UI. Numeric quantities remain strings to avoid losing precision in automation and LLM tool calls.
type ExportResponse ¶
type ExportResponse struct {
FileType string `json:"fileType,omitempty"`
ExportID string `json:"exportId,omitempty"`
Filename string `json:"filename,omitempty"`
ExportIDs []string `json:"exportIds,omitempty"`
}
func (ExportResponse) IDs ¶
func (r ExportResponse) IDs() []string
type FindInvoiceInput ¶ added in v0.4.0
FindInvoiceInput mirrors the contact-first invoice picker in the Bitwave UI. Title is matched exactly (case-insensitively) after fetching only the selected contact's invoices. This avoids enumerating an organization's full invoice population, which can contain hundreds of thousands of records.
type FullWalletResyncResponse ¶ added in v0.3.1
type FullWalletResyncResponse struct {
Success bool `json:"success"`
DryRun bool `json:"dryRun"`
OrgID string `json:"orgId"`
WalletID string `json:"walletId"`
Syncer string `json:"syncer,omitempty"`
WorkflowHref string `json:"workflowHref,omitempty"`
ClearedState []WalletResyncStateTarget `json:"clearedState,omitempty"`
ExecutionID string `json:"executionId,omitempty"`
Message string `json:"message,omitempty"`
}
type InternalTransferInput ¶
type InventoryMutationResult ¶
type InventoryView ¶
type InventoryViewUpdate ¶
type InventoryViewUpdate struct {
ID string `json:"id"`
Status string `json:"status"`
InventoryViewID string `json:"inventoryViewId"`
UpdateRequestedSEC int64 `json:"updateRequestedSEC"`
UpdateCompletedSEC int64 `json:"updateCompletedSEC,omitempty"`
Errors []string `json:"errors,omitempty"`
RunIDReference string `json:"runIdReference,omitempty"`
StartingSEC int64 `json:"startingSEC,omitempty"`
EndingSEC int64 `json:"endingSEC,omitempty"`
TransferAtHistoricalCost bool `json:"transferAtHistoricalCost,omitempty"`
}
type Invoice ¶ added in v0.4.0
type Invoice struct {
ID string `json:"id"`
Title string `json:"title,omitempty"`
Type string `json:"type,omitempty"`
Status string `json:"status,omitempty"`
Date string `json:"date,omitempty"`
DueDate string `json:"dueDate,omitempty"`
DueAmount json.Number `json:"dueAmount,omitempty"`
TotalAmount json.Number `json:"totalAmount,omitempty"`
Currency string `json:"currency,omitempty"`
Source string `json:"source,omitempty"`
Enabled bool `json:"enabled"`
ContactID string `json:"contactId,omitempty"`
OrgID string `json:"orgId,omitempty"`
AccountingConnectionID string `json:"accountingConnectionId,omitempty"`
HasMatchedTransactions bool `json:"hasMatchedTransactions"`
ExchangeRate json.Number `json:"exchangeRate,omitempty"`
LastUpdatedSEC int64 `json:"lastUpdatedSEC,omitempty"`
Lines json.RawMessage `json:"lines,omitempty"`
}
type InvoiceListInput ¶ added in v0.4.0
type InvoicePage ¶ added in v0.4.0
type LegacyBalanceInput ¶
type LegacyReport ¶
type OrgDetails ¶
type OrgWallet ¶
type OrgWallet struct {
ID string `json:"id"`
Name string `json:"name"`
Description string `json:"description,omitempty"`
Type int `json:"type,omitempty"`
NetworkID string `json:"networkId,omitempty"`
Address string `json:"address,omitempty"`
Addresses []string `json:"addresses,omitempty"`
SubsidiaryID string `json:"subsidiaryId,omitempty"`
IsBalanceMonitoringOnly bool `json:"isBalanceMonitoringOnly,omitempty"`
Metadata map[string]any `json:"metadata,omitempty"`
}
OrgWallet is the complete discovery-safe wallet shape returned by the org GraphQL API. Address and Addresses are both retained because legacy watch wallets and modern account-based wallets expose different fields.
type ReportData ¶
type ReportData struct {
ReportType string `json:"reportType"`
ReportRunID string `json:"reportRunId"`
Columns []string `json:"columns"`
Rows []ReportRow `json:"rows"`
}
ReportData is the deployed report-result representation. It provides the same columns and cell rows shown by the web application and is used as a compatibility download path when the dedicated CSV route is unavailable.
type RuleCreateResult ¶
type RuleCreateResult struct {
Success bool `json:"success"`
Errors json.RawMessage `json:"errors,omitempty"`
}
type RulesPage ¶
type RulesPage struct {
Items []json.RawMessage `json:"items"`
NextPageToken string `json:"nextPageToken,omitempty"`
}
type StartRequest ¶
type Subsidiary ¶
type TransactionAssetRequest ¶
type TransactionAssetRequest struct {
Timezone string `json:"timezone,omitempty"`
Limit int `json:"limit"`
Filters TransactionExportFilters `json:"filters"`
}
type TransactionAssetValue ¶ added in v0.4.0
type TransactionCategorizationContext ¶ added in v0.4.0
type TransactionCategorizationContext struct {
State struct {
State string `json:"state"`
Categorization json.RawMessage `json:"categorization"`
Price struct {
ExchangeRates map[string]TransactionExchangeRate `json:"exchangeRates"`
TransactionPriceVersion *int `json:"transactionPriceVersion"`
} `json:"price"`
Transaction struct {
TransactionID string `json:"transactionId"`
TransactionType string `json:"txnType"`
TimestampSEC int64 `json:"txnTimestampSEC"`
Lines []TransactionCategorizationLine `json:"txnLines"`
} `json:"txn"`
} `json:"state"`
Assets []struct {
CurrencyID string `json:"currencyId"`
Ticker string `json:"ticker"`
Unit string `json:"unit,omitempty"`
} `json:"assets"`
}
type TransactionCategorizationLine ¶ added in v0.4.0
type TransactionCategorizationLine struct {
ID string `json:"id,omitempty"`
TxnLineID int `json:"txnLineId"`
Operation string `json:"operation"`
Amount TransactionAssetValue `json:"amount"`
Value TransactionAssetValue `json:"value"`
WalletID string `json:"walletId"`
From string `json:"from,omitempty"`
To string `json:"to,omitempty"`
ExchangeRate *TransactionExchangeRate `json:"exchangeRate,omitempty"`
}
type TransactionDateRange ¶
type TransactionExchangeRate ¶ added in v0.4.0
type TransactionExportFilters ¶
type TransactionExportFilters struct {
DateRange *TransactionDateRange `json:"dateRange,omitempty"`
WalletIDs []string `json:"walletIds,omitempty"`
SubsidiaryIDs []string `json:"subsidiaryIds,omitempty"`
AssetIDs []string `json:"assetIds,omitempty"`
TransactionTypes []string `json:"transactionTypes,omitempty"`
States []string `json:"states,omitempty"`
CategorizationStatuses []string `json:"categorizationStatuses,omitempty"`
ReconciliationStatuses []string `json:"reconciliationStatuses,omitempty"`
IgnoredStatuses []string `json:"ignoredStatuses,omitempty"`
SearchTokens []string `json:"searchTokens,omitempty"`
TransactionIDs []string `json:"transactionIds,omitempty"`
FromAddresses []string `json:"fromAddresses,omitempty"`
ToAddresses []string `json:"toAddresses,omitempty"`
Addresses []string `json:"addresses,omitempty"`
Operations []string `json:"operations,omitempty"`
IncludeCombinedTransactions bool `json:"includeCombinedTransactions,omitempty"`
}
type TransactionExportRequest ¶
type TransactionExportRequest struct {
Timezone string `json:"timezone"`
SortBy string `json:"sortBy,omitempty"`
SortDirection string `json:"sortDirection,omitempty"`
Filters TransactionExportFilters `json:"filters"`
}
type TransactionFailure ¶
type TransactionSearchResponse ¶
type TransactionSearchResponse struct {
Transactions []json.RawMessage `json:"transactions"`
NextToken string `json:"nextToken,omitempty"`
PrevToken string `json:"prevToken,omitempty"`
AssetIDs []string `json:"assetIds,omitempty"`
}
type TransactionSummaryAddressRecord ¶ added in v0.3.1
type TransactionSummaryAddressRecord struct {
WalletID string `json:"walletId"`
InteractingAddress string `json:"interactingAddress"`
DepositsTransactionCount int `json:"depositsTxnsCount"`
DepositsUncategorized int `json:"depositsUncategorized"`
DepositsFMV float64 `json:"depositsFmv"`
WithdrawalsTransactionCount int `json:"withdrawalsTxnsCount"`
WithdrawalsUncategorized int `json:"withdrawalsUncategorized"`
WithdrawalsFMV float64 `json:"withdrawalsFmv"`
}
type TransactionSummaryAsset ¶ added in v0.3.1
type TransactionSummaryWalletRecord ¶ added in v0.3.1
type TransactionSummaryWalletRecord struct {
Wallet string `json:"wallet"`
WalletID string `json:"walletId"`
InteractingAddressesCount int `json:"interactingAddressesCount"`
DepositsTransactionCount int `json:"depositsTxnsCount"`
DepositsUncategorized int `json:"depositsUncategorized"`
DepositsFMV float64 `json:"depositsFmv"`
WithdrawalsTransactionCount int `json:"withdrawalsTxnsCount"`
WithdrawalsUncategorized int `json:"withdrawalsUncategorized"`
WithdrawalsFMV float64 `json:"withdrawalsFmv"`
TotalTransactionCount int `json:"totalTxnsCount"`
TotalUncategorized int `json:"totalUncategorized"`
TotalUnreconciled int `json:"totalUnreconciled"`
NetFMV float64 `json:"netFmv"`
TotalFMV float64 `json:"totalFmv"`
}
type Wallet ¶
type Wallet struct {
ID string `json:"id"`
Name string `json:"name"`
NetworkID string `json:"networkId,omitempty"`
Address string `json:"address,omitempty"`
Addresses []string `json:"addresses,omitempty"`
SubsidiaryID string `json:"subsidiaryId,omitempty"`
}
Wallet and Subsidiary intentionally contain only discovery-safe fields used to resolve human labels to stable report filter IDs.
type WalletPermission ¶
type WalletResyncStateTarget ¶ added in v0.3.1
type WalletRollupRequest ¶
type WalletRollupRequest struct {
Address string `json:"address"`
Type string `json:"type"`
Rules []BabelRollupRule `json:"rules"`
}