From 5d0be6cd845b02e25445a95db9c2fb1a08b2f6c8 Mon Sep 17 00:00:00 2001 From: William Brawner Date: Thu, 25 Nov 2021 07:03:20 -0700 Subject: [PATCH] Add recurring transaction methods to api service --- src/app/shared/twigs.service.ts | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/app/shared/twigs.service.ts b/src/app/shared/twigs.service.ts index 68d182c..95bd531 100644 --- a/src/app/shared/twigs.service.ts +++ b/src/app/shared/twigs.service.ts @@ -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; deleteTransaction(id: string): Observable; + // Recurring Transactions + getRecurringTransactions( + budgetId: string, + ): Observable; + getRecurringTransaction(id: string): Observable; + createRecurringTransaction( + id: string, + budgetId: string, + name: string, + description: string, + amount: number, + frequency: Frequency, + start: Date, + expense: boolean, + category: string, + end?: Date, + ): Observable; + updateRecurringTransaction(id: string, changes: object): Observable; + deleteRecurringTransaction(id: string): Observable; + getProfile(id: string): Observable; getUsersByUsername(username: string): Observable; }