@mcdylanproperenterprise/nodejs-proper-money-types 0.0.21 → 0.0.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/types.ts +15 -18
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mcdylanproperenterprise/nodejs-proper-money-types",
3
- "version": "0.0.21",
3
+ "version": "0.0.22",
4
4
  "description": "",
5
5
  "main": "",
6
6
  "types": "index.d.ts",
package/types.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import {
2
+ EGetTransactionsByType,
2
3
  EMissionType,
3
4
  EPointFromType,
4
5
  EPointType,
@@ -182,29 +183,25 @@ export type TGetTransactionsDashboardQuery = {
182
183
  startTransactedAt: Date;
183
184
  endTransactedAt: Date;
184
185
  userId: string;
186
+ transactionCategoryType: ETransactionCategoryType;
185
187
  };
186
188
 
187
- export type TGetTransactionDashboardResponse = {
188
- user: {
189
- transactions: TTransaction[];
190
- transactionCategories: TTransactionCategory[];
191
- transactionLabels: TTransactionLabel[];
192
- timelineTransactions: TTimelineTransaction[];
193
- };
194
- sharedUser: {
195
- transactions: TTransaction[];
196
- transactionCategories: TTransactionCategory[];
197
- transactionLabels: TTransactionLabel[];
198
- timelineTransactions: TTimelineTransaction[];
199
- };
200
- total: {
201
- transactions: TTransaction[];
202
- transactionCategories: TTransactionCategory[];
203
- transactionLabels: TTransactionLabel[];
204
- timelineTransactions: TTimelineTransaction[];
189
+ export type TTransactionDashboardCategoryType = {
190
+ currency: string;
191
+ totalAmount: number;
192
+ categories: TTransactionCategory & {
193
+ totalAmount: number;
194
+ percentage: number;
205
195
  };
206
196
  };
207
197
 
198
+ export type TGetTransactionDashboardResponse =
199
+ | {
200
+ income: TTransactionDashboardCategoryType[];
201
+ expense: TTransactionDashboardCategoryType[];
202
+ }
203
+ | undefined;
204
+
208
205
  export type TPostTransactionCreateBody = {
209
206
  transactionCategoryId: string;
210
207
  transactionLabelIds: string[];