@cranberry-money/shared-types 3.0.1 → 3.0.3

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.
package/dist/index.d.ts CHANGED
@@ -8,4 +8,5 @@ export * from './components';
8
8
  export * from './instruments';
9
9
  export * from './navigation';
10
10
  export * from './auth';
11
+ export * from './portfolio';
11
12
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC;AACvB,cAAc,aAAa,CAAC"}
package/dist/index.js CHANGED
@@ -9,3 +9,4 @@ export * from './components';
9
9
  export * from './instruments';
10
10
  export * from './navigation';
11
11
  export * from './auth';
12
+ export * from './portfolio';
@@ -0,0 +1,59 @@
1
+ /**
2
+ * Portfolio and Dashboard related type definitions
3
+ * Used across portfolio management, dashboard views, and reporting features
4
+ */
5
+ export interface PortfolioPerformanceData {
6
+ currentValue: number;
7
+ todayChange: number;
8
+ todayChangePercent: number;
9
+ totalReturn: number;
10
+ totalReturnPercent: number;
11
+ }
12
+ export interface WithdrawalSummary {
13
+ pendingRequests: number;
14
+ pendingAmount: number;
15
+ scheduledLiquidations: number;
16
+ liquidationValue: number;
17
+ inProgressLiquidations: any[];
18
+ }
19
+ export interface DashboardData {
20
+ portfolio: any;
21
+ allocations: any[];
22
+ holdings: any[];
23
+ trades: any[];
24
+ targetTrades: any[];
25
+ withdrawalRequests: any[];
26
+ withdrawalLiquidations: any[];
27
+ withdrawalSummary: WithdrawalSummary;
28
+ performanceData: PortfolioPerformanceData | null;
29
+ totalCashBalance: number;
30
+ }
31
+ export interface DashboardLoadingState {
32
+ isLoading: boolean;
33
+ isError: boolean;
34
+ error: Error | null;
35
+ }
36
+ export interface DashboardRefreshHandlers {
37
+ onRetry: () => void;
38
+ onRefresh: () => void;
39
+ onRefreshTrades: () => void;
40
+ onRefreshTargetTrades: () => void;
41
+ onRefreshCashTransactions: () => void;
42
+ onRefreshPortfolio: () => void;
43
+ onRefreshAssets: () => void;
44
+ onRefreshWithdrawals: () => void;
45
+ }
46
+ export interface AllocationDisplayItem {
47
+ instrumentUuid: string;
48
+ symbol: string;
49
+ name: string;
50
+ targetPercentage?: number;
51
+ actualPercentage?: number;
52
+ quantity?: number;
53
+ value?: number;
54
+ currentPrice?: number;
55
+ color: string;
56
+ hasTarget: boolean;
57
+ hasActual: boolean;
58
+ }
59
+ //# sourceMappingURL=portfolio.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"portfolio.d.ts","sourceRoot":"","sources":["../src/portfolio.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,MAAM,WAAW,wBAAwB;IACvC,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,WAAW,EAAE,MAAM,CAAC;IACpB,kBAAkB,EAAE,MAAM,CAAC;CAC5B;AAGD,MAAM,WAAW,iBAAiB;IAChC,eAAe,EAAE,MAAM,CAAC;IACxB,aAAa,EAAE,MAAM,CAAC;IACtB,qBAAqB,EAAE,MAAM,CAAC;IAC9B,gBAAgB,EAAE,MAAM,CAAC;IAGzB,sBAAsB,EAAE,GAAG,EAAE,CAAC;CAC/B;AAGD,MAAM,WAAW,aAAa;IAC5B,SAA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@ -0,0 +1,5 @@
1
+ /**
2
+ * Portfolio and Dashboard related type definitions
3
+ * Used across portfolio management, dashboard views, and reporting features
4
+ */
5
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cranberry-money/shared-types",
3
- "version": "3.0.1",
3
+ "version": "3.0.3",
4
4
  "description": "Shared TypeScript type definitions for MyPortfolio platform",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",