@mft/moneyhub-api-client
Version:
Node.JS client for the Moneyhub API
42 lines • 1.51 kB
TypeScript
import { ApiResponse, ExtraOptions, SearchParams } from "../../request";
import { SavingsGoal } from "../../schema/savings-goal";
export interface SavingsGoalsRequests {
getSavingsGoals: (params: SearchParams, userId: string, options?: ExtraOptions) => Promise<ApiResponse<SavingsGoal[]>>;
getSavingsGoal: ({ goalId, userId, }: {
goalId: string;
userId: string;
}, options?: ExtraOptions) => Promise<ApiResponse<SavingsGoal>>;
createSavingsGoal: ({ name, imageUrl, notes, accounts, amount, userId, targetDate, }: {
name: string;
imageUrl?: string;
notes?: string;
accounts: {
id: string;
}[];
amount: {
value: number;
currency?: string;
};
userId: string;
targetDate?: string;
}, options?: ExtraOptions) => Promise<ApiResponse<SavingsGoal>>;
updateSavingsGoal: ({ goalId, name, amount, imageUrl, notes, accounts, userId, targetDate, }: {
goalId: string;
name?: string;
imageUrl?: string;
notes?: string;
accounts: {
id: string;
}[];
amount?: {
value: number;
};
userId: string;
targetDate?: string;
}, options?: ExtraOptions) => Promise<ApiResponse<SavingsGoal>>;
deleteSavingsGoal: ({ goalId, userId, }: {
goalId: string;
userId: string;
}, options?: ExtraOptions) => Promise<number>;
}
//# sourceMappingURL=savings-goals.d.ts.map