@actual-app/api
Advanced tools
Comparing version 24.10.1 to 24.11.0
@@ -89,2 +89,11 @@ import { type File } from '../../types/file'; | ||
'out-of-sync-migrations': null; | ||
'files-settings': null; | ||
'confirm-change-document-dir': { | ||
currentBudgetDirectory: string; | ||
newDirectory: string; | ||
}; | ||
'create-encryption-key': { recreate?: boolean }; | ||
@@ -280,2 +289,4 @@ 'fix-encryption-key': { | ||
}; | ||
'keyboard-shortcuts': EmptyObject; | ||
'goal-templates': EmptyObject; | ||
}; | ||
@@ -282,0 +293,0 @@ |
@@ -1,9 +0,6 @@ | ||
import { type Transports } from 'electron-log'; | ||
export interface Logger { | ||
info(...args: unknown[]): void; | ||
warn(...args: unknown[]): void; | ||
transports?: Transports; | ||
} | ||
export const logger: Logger; |
@@ -0,1 +1,2 @@ | ||
import { RuleEntity } from '../../types/models'; | ||
export declare function parseDateString(str: any): { | ||
@@ -33,2 +34,3 @@ type: string; | ||
value: any; | ||
private handlebarsTemplate?; | ||
constructor(op: ActionOperator, field: any, value: any, options: any); | ||
@@ -46,10 +48,10 @@ exec(object: any): void; | ||
export declare class Rule { | ||
actions: any; | ||
conditions: any; | ||
actions: Action[]; | ||
conditions: Condition[]; | ||
conditionsOp: any; | ||
id: any; | ||
stage: any; | ||
id?: string; | ||
stage: 'pre' | null | 'post'; | ||
constructor({ id, stage, conditionsOp, conditions, actions, }: { | ||
id?: string; | ||
stage?: any; | ||
stage?: 'pre' | null | 'post'; | ||
conditionsOp: any; | ||
@@ -59,19 +61,13 @@ conditions: any; | ||
}); | ||
evalConditions(object: any): any; | ||
evalConditions(object: any): boolean; | ||
execActions<T>(object: T): Partial<T>; | ||
exec(object: any): Partial<any>; | ||
apply(object: any): any; | ||
getId(): any; | ||
serialize(): { | ||
id: any; | ||
stage: any; | ||
conditionsOp: any; | ||
conditions: any; | ||
actions: any; | ||
}; | ||
getId(): string | undefined; | ||
serialize(): RuleEntity; | ||
} | ||
export declare class RuleIndexer { | ||
field: any; | ||
method: any; | ||
rules: any; | ||
field: string; | ||
method?: string; | ||
rules: Map<string, Set<Rule>>; | ||
constructor({ field, method }: { | ||
@@ -81,13 +77,13 @@ field: string; | ||
}); | ||
getIndex(key: any): any; | ||
getIndexForValue(value: any): any; | ||
getKey(value: any): string; | ||
getIndexes(rule: any): any[]; | ||
index(rule: any): void; | ||
remove(rule: any): void; | ||
getApplicableRules(object: any): Set<unknown>; | ||
getIndex(key: string | null): Set<Rule>; | ||
getIndexForValue(value: unknown): Set<Rule>; | ||
getKey(value: unknown): string | null; | ||
getIndexes(rule: Rule): Set<Rule>[]; | ||
index(rule: Rule): void; | ||
remove(rule: Rule): void; | ||
getApplicableRules(object: any): Set<Rule>; | ||
} | ||
export declare function rankRules(rules: any): any[]; | ||
export declare function migrateIds(rule: any, mappings: any): void; | ||
export declare function iterateIds(rules: any, fieldName: any, func: any): void; | ||
export declare function rankRules(rules: Iterable<Rule>): Rule[]; | ||
export declare function migrateIds(rule: Rule, mappings: Map<string, string>): void; | ||
export declare function iterateIds(rules: Rule[], fieldName: string, func: (rule: Rule, id: string) => void | boolean): void; | ||
export {}; |
import { type TransactionEntity, type RuleActionEntity, type RuleEntity } from '../../types/models'; | ||
import { Action } from './rules'; | ||
import { Action, Rule } from './rules'; | ||
export { iterateIds } from './rules'; | ||
@@ -22,3 +22,3 @@ export declare function resetState(): void; | ||
export declare function deleteRule(id: string): Promise<boolean>; | ||
export declare function runRules(trans: any): any; | ||
export declare function runRules(trans: any): Promise<TransactionEntity>; | ||
export declare function conditionsToAQL(conditions: any, { recurDateBounds }?: { | ||
@@ -43,5 +43,10 @@ recurDateBounds?: number; | ||
}>; | ||
export declare function getRulesForPayee(payeeId: any): any[]; | ||
export declare function getRulesForPayee(payeeId: any): Rule[]; | ||
export declare function updatePayeeRenameRule(fromNames: string[], to: string): Promise<any>; | ||
export declare function getProbableCategory(transactions: any): any; | ||
export declare function updateCategoryRules(transactions: any): Promise<void>; | ||
export type TransactionForRules = TransactionEntity & { | ||
payee_name?: string; | ||
}; | ||
export declare function prepareTransactionForRules(trans: TransactionEntity): Promise<TransactionForRules>; | ||
export declare function finalizeTransactionForRules(trans: TransactionEntity | TransactionForRules): Promise<TransactionEntity>; |
@@ -7,3 +7,3 @@ import { Handlers } from '../types/handlers'; | ||
unlistenServices: any; | ||
method<Name extends "sync" | "query" | "transaction-update" | "undo" | "redo" | "transactions-batch-update" | "transaction-add" | "transaction-delete" | "transactions-parse-file" | "transactions-export" | "transactions-export-query" | "get-categories" | "get-earliest-transaction" | "get-budget-bounds" | "envelope-budget-month" | "tracking-budget-month" | "category-create" | "category-update" | "category-move" | "category-delete" | "category-group-create" | "category-group-update" | "category-group-move" | "category-group-delete" | "must-category-transfer" | "payee-create" | "common-payees-get" | "payees-get" | "payees-get-rule-counts" | "payees-merge" | "payees-batch-change" | "payees-check-orphaned" | "payees-get-rules" | "make-filters-from-conditions" | "getCell" | "getCells" | "getCellNamesInSheet" | "debugCell" | "create-query" | "account-update" | "accounts-get" | "account-properties" | "gocardless-accounts-link" | "simplefin-accounts-link" | "account-create" | "account-close" | "account-reopen" | "account-move" | "secret-set" | "secret-check" | "gocardless-poll-web-token" | "gocardless-status" | "simplefin-status" | "simplefin-accounts" | "gocardless-get-banks" | "gocardless-poll-web-token-stop" | "gocardless-create-web-token" | "accounts-bank-sync" | "transactions-import" | "account-unlink" | "save-global-prefs" | "load-global-prefs" | "save-prefs" | "load-prefs" | "sync-reset" | "sync-repair" | "key-make" | "key-test" | "get-did-bootstrap" | "subscribe-needs-bootstrap" | "subscribe-bootstrap" | "subscribe-get-user" | "subscribe-change-password" | "subscribe-sign-in" | "subscribe-sign-out" | "get-server-version" | "get-server-url" | "set-server-url" | "get-budgets" | "get-remote-files" | "reset-budget-cache" | "upload-budget" | "download-budget" | "sync-budget" | "load-budget" | "create-demo-budget" | "close-budget" | "delete-budget" | "create-budget" | "import-budget" | "export-budget" | "upload-file-web" | "backups-get" | "backup-load" | "backup-make" | "get-last-opened-backup" | "app-focused" | "api/batch-budget-start" | "api/batch-budget-end" | "api/load-budget" | "api/download-budget" | "api/get-budgets" | "api/start-import" | "api/finish-import" | "api/abort-import" | "api/query" | "api/budget-months" | "api/budget-month" | "api/budget-set-amount" | "api/budget-set-carryover" | "api/budget-hold-for-next-month" | "api/budget-reset-hold" | "api/transactions-export" | "api/transactions-import" | "api/transactions-add" | "api/transactions-get" | "api/transaction-update" | "api/transaction-delete" | "api/sync" | "api/bank-sync" | "api/accounts-get" | "api/account-create" | "api/account-update" | "api/account-close" | "api/account-reopen" | "api/account-delete" | "api/account-balance" | "api/categories-get" | "api/category-groups-get" | "api/category-group-create" | "api/category-group-update" | "api/category-group-delete" | "api/category-create" | "api/category-update" | "api/category-delete" | "api/payees-get" | "api/common-payees-get" | "api/payee-create" | "api/payee-update" | "api/payee-delete" | "api/payees-merge" | "api/rules-get" | "api/payee-rules-get" | "api/rule-create" | "api/rule-update" | "api/rule-delete" | "budget/budget-amount" | "budget/copy-previous-month" | "budget/set-zero" | "budget/set-3month-avg" | "budget/check-templates" | "budget/apply-goal-template" | "budget/overwrite-goal-template" | "budget/cleanup-goal-template" | "budget/hold-for-next-month" | "budget/reset-hold" | "budget/cover-overspending" | "budget/transfer-available" | "budget/cover-overbudgeted" | "budget/transfer-category" | "budget/set-carryover" | "budget/apply-single-template" | "budget/set-n-month-avg" | "budget/copy-single-month" | "dashboard-update" | "dashboard-update-widget" | "dashboard-reset" | "dashboard-add-widget" | "dashboard-remove-widget" | "dashboard-import" | "filter-create" | "filter-update" | "filter-delete" | "notes-save" | "preferences/save" | "preferences/get" | "report/create" | "report/update" | "report/delete" | "rule-validate" | "rule-add" | "rule-update" | "rule-delete" | "rule-delete-all" | "rule-apply-actions" | "rule-add-payee-rename" | "rules-get" | "rule-get" | "rules-run" | "schedule/create" | "schedule/update" | "schedule/delete" | "schedule/skip-next-date" | "schedule/post-transaction" | "schedule/force-run-service" | "schedule/discover" | "schedule/get-upcoming-dates" | "tools/fix-split-transactions">(name: Name, func: Handlers[Name]): void; | ||
method<Name extends "sync" | "transaction-update" | "undo" | "redo" | "transactions-batch-update" | "transaction-add" | "transaction-delete" | "transactions-parse-file" | "transactions-export" | "transactions-export-query" | "get-categories" | "get-earliest-transaction" | "get-budget-bounds" | "envelope-budget-month" | "tracking-budget-month" | "category-create" | "category-update" | "category-move" | "category-delete" | "category-group-create" | "category-group-update" | "category-group-move" | "category-group-delete" | "must-category-transfer" | "payee-create" | "common-payees-get" | "payees-get" | "payees-get-rule-counts" | "payees-merge" | "payees-batch-change" | "payees-check-orphaned" | "payees-get-rules" | "make-filters-from-conditions" | "getCell" | "getCells" | "getCellNamesInSheet" | "debugCell" | "create-query" | "query" | "account-update" | "accounts-get" | "account-properties" | "gocardless-accounts-link" | "simplefin-accounts-link" | "account-create" | "account-close" | "account-reopen" | "account-move" | "secret-set" | "secret-check" | "gocardless-poll-web-token" | "gocardless-status" | "simplefin-status" | "simplefin-accounts" | "gocardless-get-banks" | "gocardless-poll-web-token-stop" | "gocardless-create-web-token" | "accounts-bank-sync" | "transactions-import" | "account-unlink" | "save-global-prefs" | "load-global-prefs" | "save-prefs" | "load-prefs" | "sync-reset" | "sync-repair" | "key-make" | "key-test" | "get-did-bootstrap" | "subscribe-needs-bootstrap" | "subscribe-bootstrap" | "subscribe-get-user" | "subscribe-change-password" | "subscribe-sign-in" | "subscribe-sign-out" | "get-server-version" | "get-server-url" | "set-server-url" | "get-budgets" | "get-remote-files" | "reset-budget-cache" | "upload-budget" | "download-budget" | "sync-budget" | "load-budget" | "create-demo-budget" | "close-budget" | "delete-budget" | "create-budget" | "import-budget" | "export-budget" | "upload-file-web" | "backups-get" | "backup-load" | "backup-make" | "get-last-opened-backup" | "app-focused" | "api/batch-budget-start" | "api/batch-budget-end" | "api/load-budget" | "api/download-budget" | "api/get-budgets" | "api/start-import" | "api/finish-import" | "api/abort-import" | "api/query" | "api/budget-months" | "api/budget-month" | "api/budget-set-amount" | "api/budget-set-carryover" | "api/budget-hold-for-next-month" | "api/budget-reset-hold" | "api/transactions-export" | "api/transactions-import" | "api/transactions-add" | "api/transactions-get" | "api/transaction-update" | "api/transaction-delete" | "api/sync" | "api/bank-sync" | "api/accounts-get" | "api/account-create" | "api/account-update" | "api/account-close" | "api/account-reopen" | "api/account-delete" | "api/account-balance" | "api/categories-get" | "api/category-groups-get" | "api/category-group-create" | "api/category-group-update" | "api/category-group-delete" | "api/category-create" | "api/category-update" | "api/category-delete" | "api/payees-get" | "api/common-payees-get" | "api/payee-create" | "api/payee-update" | "api/payee-delete" | "api/payees-merge" | "api/rules-get" | "api/payee-rules-get" | "api/rule-create" | "api/rule-update" | "api/rule-delete" | "budget/budget-amount" | "budget/copy-previous-month" | "budget/set-zero" | "budget/set-3month-avg" | "budget/check-templates" | "budget/apply-goal-template" | "budget/overwrite-goal-template" | "budget/cleanup-goal-template" | "budget/hold-for-next-month" | "budget/reset-hold" | "budget/cover-overspending" | "budget/transfer-available" | "budget/cover-overbudgeted" | "budget/transfer-category" | "budget/set-carryover" | "budget/apply-single-template" | "budget/set-n-month-avg" | "budget/copy-single-month" | "dashboard-update" | "dashboard-update-widget" | "dashboard-reset" | "dashboard-add-widget" | "dashboard-remove-widget" | "dashboard-import" | "filter-create" | "filter-update" | "filter-delete" | "notes-save" | "preferences/save" | "preferences/get" | "report/create" | "report/update" | "report/delete" | "rule-validate" | "rule-add" | "rule-update" | "rule-delete" | "rule-delete-all" | "rule-apply-actions" | "rule-add-payee-rename" | "rules-get" | "rule-get" | "rules-run" | "schedule/create" | "schedule/update" | "schedule/delete" | "schedule/skip-next-date" | "schedule/post-transaction" | "schedule/force-run-service" | "schedule/discover" | "schedule/get-upcoming-dates" | "tools/fix-split-transactions">(name: Name, func: Handlers[Name]): void; | ||
service(func: any): void; | ||
@@ -10,0 +10,0 @@ combine(...apps: any[]): void; |
import type { MetadataPrefs } from '../types/prefs'; | ||
export declare const BUDGET_TYPES: readonly ["report", "rollover"]; | ||
export type BudgetType = (typeof BUDGET_TYPES)[number]; | ||
export declare const UPCOMING_SCHEDULED_TRANSACTION_LENGTHS: readonly ["1", "7", "14", "30"]; | ||
export type UpcomingScheduledTransactionLength = (typeof UPCOMING_SCHEDULED_TRANSACTION_LENGTHS)[number]; | ||
export declare function loadPrefs(id?: string): Promise<MetadataPrefs>; | ||
@@ -5,0 +7,0 @@ export declare function savePrefs(prefsToSet: MetadataPrefs, { avoidSync }?: { |
@@ -28,3 +28,3 @@ import { FieldValueTypes, RuleConditionOp } from '../types/models'; | ||
}; | ||
export declare function getFieldError(type: any): "Invalid date format" | "Value cannot be empty" | "Value must be a string" | "Value must be a boolean" | "Value must be a number" | "Please choose a valid field for this type of rule" | "Internal error, sorry! Please get in touch https://actualbudget.org/contact/ for support"; | ||
export declare function getFieldError(type: any): "Invalid date format" | "Value cannot be empty" | "Value must be a string" | "Value must be a boolean" | "Value must be a number" | "Please choose a valid field for this type of rule" | "Invalid handlebars template" | "Internal error, sorry! Please get in touch https://actualbudget.org/contact/ for support"; | ||
export declare function sortNumbers(num1: any, num2: any): any[]; | ||
@@ -31,0 +31,0 @@ export declare function parse(item: any): any; |
import type { IRuleOptions } from '@rschedule/core'; | ||
export declare function getStatus(nextDate: string, completed: boolean, hasTrans: boolean): "completed" | "paid" | "due" | "upcoming" | "missed" | "scheduled"; | ||
export declare function getStatus(nextDate: string, completed: boolean, hasTrans: boolean, upcomingLength: string): "completed" | "paid" | "due" | "upcoming" | "missed" | "scheduled"; | ||
export declare function getHasTransactionsQuery(schedules: any): import("./query").Query; | ||
@@ -4,0 +4,0 @@ export declare function getRecurringDescription(config: any, dateFormat: any): string; |
@@ -23,5 +23,3 @@ export declare function last<T>(arr: Array<T>): T; | ||
id: string; | ||
}>(data: T[]): { | ||
[key: string]: T; | ||
}; | ||
}>(data: T[]): Record<string, T>; | ||
export declare function setIn(map: Map<string, unknown>, keys: string[], item: unknown): void; | ||
@@ -28,0 +26,0 @@ export declare function getIn(map: any, keys: any): any; |
@@ -7,4 +7,4 @@ import { AccountEntity } from './account'; | ||
transfer_acct?: AccountEntity['id']; | ||
favorite?: boolean; | ||
favorite?: 1 | 0; | ||
tombstone?: boolean; | ||
} |
import { type ScheduleEntity } from './schedule'; | ||
export interface NewRuleEntity { | ||
stage: string; | ||
conditionsOp: 'any' | 'and'; | ||
stage: 'pre' | null | 'post'; | ||
conditionsOp: 'or' | 'and'; | ||
conditions: RuleConditionEntity[]; | ||
@@ -38,2 +38,3 @@ actions: RuleActionEntity[]; | ||
payee: string; | ||
payee_name: string; | ||
imported_payee: string; | ||
@@ -142,2 +143,3 @@ saved: string; | ||
options?: { | ||
template?: string; | ||
splitIndex?: number; | ||
@@ -144,0 +146,0 @@ }; |
@@ -5,3 +5,4 @@ export type FeatureFlag = | ||
| 'goalTemplatesEnabled' | ||
| 'spendingReport'; | ||
| 'actionTemplating' | ||
| 'upcomingLengthAdjustment'; | ||
@@ -14,2 +15,3 @@ /** | ||
| 'budgetType' | ||
| 'upcomingScheduledTransactionLength' | ||
| 'firstDayOfWeekIdx' | ||
@@ -29,2 +31,4 @@ | 'dateFormat' | ||
| `csv-skip-lines-${string}` | ||
| `csv-in-out-mode-${string}` | ||
| `csv-out-value-${string}` | ||
| `csv-has-header-${string}` | ||
@@ -31,0 +35,0 @@ | `ofx-fallback-missing-payee-${string}` |
@@ -0,5 +1,6 @@ | ||
import { type Backup } from '../server/backups'; | ||
import { type UndoState } from '../server/undo'; | ||
export interface ServerEvents { | ||
'backups-updated': unknown; | ||
'backups-updated': Backup[]; | ||
'cells-changed': Array<{ name }>; | ||
@@ -6,0 +7,0 @@ 'fallback-write-error': unknown; |
@@ -22,3 +22,4 @@ "use strict"; | ||
('${(0, uuid_1.v4)()}','net-worth-card', 8, 2, 0, 0), | ||
('${(0, uuid_1.v4)()}', 'cash-flow-card', 4, 2, 8, 0); | ||
('${(0, uuid_1.v4)()}', 'cash-flow-card', 4, 2, 8, 0), | ||
('${(0, uuid_1.v4)()}', 'spending-card', 4, 2, 0, 2); | ||
`); | ||
@@ -25,0 +26,0 @@ // Add custom reports to the dashboard |
{ | ||
"name": "@actual-app/api", | ||
"version": "24.10.1", | ||
"version": "24.11.0", | ||
"license": "MIT", | ||
@@ -5,0 +5,0 @@ "description": "An API for Actual", |
{ | ||
"name": "@actual-app/api", | ||
"version": "24.10.1", | ||
"version": "24.11.0", | ||
"license": "MIT", | ||
@@ -5,0 +5,0 @@ "description": "An API for Actual", |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4441356
234
70651
3