This repository has been archived by the owner on May 11, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(stats): add endpoint implementation for sources ans categories
- Loading branch information
1 parent
b14a934
commit 439d78d
Showing
13 changed files
with
149 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
import { AbstractTransaction } from '@back/money/domain/dto/AbstarctTransaction' | ||
import { AbstractTransaction } from '@back/money/domain/interfaces/AbstarctTransaction' | ||
|
||
export const amountMapper = (item: AbstractTransaction) => item.amount |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { Intersection } from 'utility-types' | ||
|
||
import { CategoryGroupOutcomeModel } from '@shared/models/money/CategoryGroupOutcomeModel' | ||
import { SourceGroupIncomeModel } from '@shared/models/money/SourceGroupIncomeModel' | ||
|
||
export type SummedGroup<T extends string, K extends string> = Intersection< | ||
CategoryGroupOutcomeModel, | ||
SourceGroupIncomeModel | ||
> & | ||
{ [key in T]: string } & | ||
{ [key in K]: number } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { Option } from 'tsoption' | ||
|
||
import { DateRange } from '@back/utils/infrastructure/dto/DateRange' | ||
|
||
import { AbstractTransaction } from './AbstarctTransaction' | ||
|
||
export interface TransactionRepository { | ||
findForUser( | ||
id: string, | ||
userLogin: string, | ||
): Promise<Option<AbstractTransaction>> | ||
|
||
findEarliest(userLogin: string): Promise<Option<AbstractTransaction>> | ||
|
||
findByRangeForUser( | ||
userLogin: string, | ||
range: DateRange, | ||
): Promise<AbstractTransaction[]> | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters