mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-15 12:20:31 +00:00
feat(server): move updating plaid transactions to background job
This commit is contained in:
@@ -47,7 +47,9 @@ export interface ICashflowCommandDTO {
|
||||
branchId?: number;
|
||||
}
|
||||
|
||||
export interface ICashflowNewCommandDTO extends ICashflowCommandDTO {}
|
||||
export interface ICashflowNewCommandDTO extends ICashflowCommandDTO {
|
||||
plaidAccountId?: string;
|
||||
}
|
||||
|
||||
export interface ICashflowTransaction {
|
||||
id?: number;
|
||||
|
||||
55
packages/server/src/interfaces/Plaid.ts
Normal file
55
packages/server/src/interfaces/Plaid.ts
Normal file
@@ -0,0 +1,55 @@
|
||||
export interface IPlaidItemCreatedEventPayload {
|
||||
tenantId: number;
|
||||
plaidAccessToken: string;
|
||||
plaidItemId: string;
|
||||
plaidInstitutionId: string;
|
||||
}
|
||||
|
||||
export interface PlaidItemDTO {
|
||||
publicToken: string;
|
||||
institutionId: string;
|
||||
}
|
||||
|
||||
export interface PlaidAccount {
|
||||
account_id: string;
|
||||
balances: {
|
||||
available: number;
|
||||
current: number;
|
||||
iso_currency_code: string;
|
||||
limit: null;
|
||||
unofficial_currency_code: null;
|
||||
};
|
||||
mask: string;
|
||||
name: string;
|
||||
official_name: string;
|
||||
persistent_account_id: string;
|
||||
subtype: string;
|
||||
type: string;
|
||||
}
|
||||
|
||||
export interface PlaidTransaction {
|
||||
date: string;
|
||||
account_id: string;
|
||||
amount: number;
|
||||
authorized_date: string;
|
||||
name: string;
|
||||
category: string[];
|
||||
check_number: number | null;
|
||||
iso_currency_code: string;
|
||||
transaction_id: string;
|
||||
transaction_type: string;
|
||||
}
|
||||
|
||||
export interface PlaidFetchedTransactionsUpdates {
|
||||
added: any[];
|
||||
modified: any[];
|
||||
removed: any[];
|
||||
accessToken: string;
|
||||
cursor: string;
|
||||
}
|
||||
|
||||
export interface SyncAccountsTransactionsTask {
|
||||
tenantId: number;
|
||||
plaidAccountId: number;
|
||||
plaidTransactions: PlaidTransaction[];
|
||||
}
|
||||
@@ -74,6 +74,7 @@ export * from './Tasks';
|
||||
export * from './Times';
|
||||
export * from './ProjectProfitabilitySummary';
|
||||
export * from './TaxRate';
|
||||
export * from './Plaid';
|
||||
|
||||
export interface I18nService {
|
||||
__: (input: string) => string;
|
||||
|
||||
Reference in New Issue
Block a user