Add recurring transaction methods to api service

This commit is contained in:
William Brawner 2021-11-25 07:03:20 -07:00
parent c3cee37add
commit 5d0be6cd84

View file

@ -3,6 +3,7 @@ import { Observable } from 'rxjs';
import { User, UserPermission } from '../users/user';
import { Budget } from '../budgets/budget';
import { Category } from '../categories/category';
import { RecurringTransaction, Frequency } from '../recurringtransactions/recurringtransaction';
import { Transaction } from '../transactions/transaction';
export interface TwigsService {
@ -54,6 +55,26 @@ export interface TwigsService {
updateTransaction(id: string, changes: object): Observable<Transaction>;
deleteTransaction(id: string): Observable<void>;
// Recurring Transactions
getRecurringTransactions(
budgetId: string,
): Observable<RecurringTransaction[]>;
getRecurringTransaction(id: string): Observable<RecurringTransaction>;
createRecurringTransaction(
id: string,
budgetId: string,
name: string,
description: string,
amount: number,
frequency: Frequency,
start: Date,
expense: boolean,
category: string,
end?: Date,
): Observable<RecurringTransaction>;
updateRecurringTransaction(id: string, changes: object): Observable<RecurringTransaction>;
deleteRecurringTransaction(id: string): Observable<void>;
getProfile(id: string): Observable<User>;
getUsersByUsername(username: string): Observable<User[]>;
}