@wealthfolio/addon-sdk 3.2.0 → 3.5.1
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/README.md +26 -14
- package/dist/{chunk-VQ2BY7K3.js → chunk-ISD4MMHY.js} +12 -4
- package/dist/chunk-ISD4MMHY.js.map +1 -0
- package/dist/index.js +38 -15
- package/dist/index.js.map +1 -1
- package/dist/permissions.js +1 -1
- package/dist/src/data-types.d.ts +131 -33
- package/dist/src/goal-progress.d.ts +1 -3
- package/dist/src/host-api.d.ts +37 -15
- package/dist/src/index.d.ts +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -3
- package/dist/chunk-VQ2BY7K3.js.map +0 -1
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/package/@wealthfolio/addon-sdk)
|
|
4
4
|
[](https://www.npmjs.com/package/@wealthfolio/addon-sdk)
|
|
5
|
-
[](https://github.com/
|
|
5
|
+
[](https://github.com/wealthfolio/wealthfolio/blob/main/LICENSE)
|
|
6
6
|
[](https://www.typescriptlang.org/)
|
|
7
7
|
[](https://nodejs.org/)
|
|
8
8
|
|
|
@@ -492,11 +492,11 @@ export default AnalyticsDashboard;
|
|
|
492
492
|
// hooks/usePortfolioData.ts
|
|
493
493
|
import { useState, useEffect } from 'react';
|
|
494
494
|
import { getAddonContext } from '@wealthfolio/addon-sdk';
|
|
495
|
-
import type { Holding,
|
|
495
|
+
import type { Holding, PerformanceResult } from '@wealthfolio/addon-sdk/types';
|
|
496
496
|
|
|
497
497
|
export function usePortfolioData(accountId?: string) {
|
|
498
498
|
const [holdings, setHoldings] = useState<Holding[]>([]);
|
|
499
|
-
const [performance, setPerformance] = useState<
|
|
499
|
+
const [performance, setPerformance] = useState<PerformanceResult | null>(
|
|
500
500
|
null,
|
|
501
501
|
);
|
|
502
502
|
const [loading, setLoading] = useState(true);
|
|
@@ -521,6 +521,11 @@ export function usePortfolioData(accountId?: string) {
|
|
|
521
521
|
itemType: 'account',
|
|
522
522
|
itemId: accountId,
|
|
523
523
|
});
|
|
524
|
+
console.log(
|
|
525
|
+
performanceData.returns.twr,
|
|
526
|
+
performanceData.returns.irr,
|
|
527
|
+
performanceData.risk.maxDrawdown,
|
|
528
|
+
);
|
|
524
529
|
setPerformance(performanceData);
|
|
525
530
|
}
|
|
526
531
|
} catch (err) {
|
|
@@ -537,6 +542,10 @@ export function usePortfolioData(accountId?: string) {
|
|
|
537
542
|
}
|
|
538
543
|
```
|
|
539
544
|
|
|
545
|
+
`performanceData.returns.irr` is the selected-period money-weighted return.
|
|
546
|
+
`performanceData.returns.annualizedIrr` is the annualized XIRR on the same dated
|
|
547
|
+
cash flows.
|
|
548
|
+
|
|
540
549
|
## 🔐 Security & Permissions
|
|
541
550
|
|
|
542
551
|
### Permission Categories
|
|
@@ -785,6 +794,8 @@ ctx.api.logger.debug('Debug info:', debugData);
|
|
|
785
794
|
| `marketData.getAssetProfile(assetId)` | Get asset profile | `market-data` |
|
|
786
795
|
| `marketData.searchTicker(query)` | Search for tickers | `market-data` |
|
|
787
796
|
| `goals.getAll()` | Get financial goals | `financial-planning` |
|
|
797
|
+
| `goals.getFunding(goalId)` | Get funding rules for a goal | `financial-planning` |
|
|
798
|
+
| `goals.saveFunding(goalId, rules)` | Save funding rules for a goal | `financial-planning` |
|
|
788
799
|
| `settings.get()` | Get app settings | `settings` |
|
|
789
800
|
| `query.getClient()` | Get shared QueryClient instance | None |
|
|
790
801
|
|
|
@@ -1039,7 +1050,7 @@ If you want to contribute to the SDK itself:
|
|
|
1039
1050
|
|
|
1040
1051
|
```bash
|
|
1041
1052
|
# Clone the Wealthfolio repository
|
|
1042
|
-
git clone https://github.com/
|
|
1053
|
+
git clone https://github.com/wealthfolio/wealthfolio.git
|
|
1043
1054
|
cd wealthfolio/packages/addon-sdk
|
|
1044
1055
|
|
|
1045
1056
|
# Install dependencies
|
|
@@ -1330,7 +1341,7 @@ We welcome contributions to improve the addon SDK!
|
|
|
1330
1341
|
| **Scope** | `@wealthfolio` |
|
|
1331
1342
|
| **Registry** | [npmjs.com](https://www.npmjs.com/package/@wealthfolio/addon-sdk) |
|
|
1332
1343
|
| **License** | MIT |
|
|
1333
|
-
| **Repository** | [GitHub](https://github.com/
|
|
1344
|
+
| **Repository** | [GitHub](https://github.com/wealthfolio/wealthfolio) |
|
|
1334
1345
|
|
|
1335
1346
|
### Version History
|
|
1336
1347
|
|
|
@@ -1376,10 +1387,10 @@ npm install @wealthfolio/addon-sdk@1.1.0-beta.1
|
|
|
1376
1387
|
|
|
1377
1388
|
```bash
|
|
1378
1389
|
# Install directly from GitHub
|
|
1379
|
-
npm install github:
|
|
1390
|
+
npm install github:wealthfolio/wealthfolio#main
|
|
1380
1391
|
|
|
1381
|
-
# Or from a specific
|
|
1382
|
-
npm install github:
|
|
1392
|
+
# Or from a specific Wealthfolio commit
|
|
1393
|
+
npm install github:wealthfolio/wealthfolio#COMMIT_SHA
|
|
1383
1394
|
```
|
|
1384
1395
|
|
|
1385
1396
|
### Package Information Commands
|
|
@@ -1504,9 +1515,10 @@ npm pack && tar -tf *.tgz
|
|
|
1504
1515
|
|
|
1505
1516
|
1. **Documentation**: Check this README and
|
|
1506
1517
|
[docs](https://docs.wealthfolio.app/addons)
|
|
1507
|
-
2. **Issues**:
|
|
1518
|
+
2. **Issues**:
|
|
1519
|
+
[GitHub Issues](https://github.com/wealthfolio/wealthfolio/issues)
|
|
1508
1520
|
3. **Discussions**:
|
|
1509
|
-
[GitHub Discussions](https://github.com/
|
|
1521
|
+
[GitHub Discussions](https://github.com/wealthfolio/wealthfolio/discussions)
|
|
1510
1522
|
4. **Discord**: [Community Discord](https://discord.gg/wealthfolio)
|
|
1511
1523
|
5. **Email**: [support@wealthfolio.app](mailto:support@wealthfolio.app)
|
|
1512
1524
|
|
|
@@ -1519,13 +1531,13 @@ MIT - see [LICENSE](LICENSE) for details.
|
|
|
1519
1531
|
- [Wealthfolio Homepage](https://wealthfolio.app)
|
|
1520
1532
|
- [Addon Gallery](https://wealthfolio.app/addons)
|
|
1521
1533
|
- [Documentation](https://docs.wealthfolio.app/addons)
|
|
1522
|
-
- [GitHub Repository](https://github.com/
|
|
1523
|
-
- [Issue Tracker](https://github.com/
|
|
1534
|
+
- [GitHub Repository](https://github.com/wealthfolio/wealthfolio)
|
|
1535
|
+
- [Issue Tracker](https://github.com/wealthfolio/wealthfolio/issues)
|
|
1524
1536
|
|
|
1525
1537
|
## 💬 Support
|
|
1526
1538
|
|
|
1527
1539
|
- [Discord Community](https://discord.gg/wealthfolio)
|
|
1528
|
-
- [GitHub Discussions](https://github.com/
|
|
1540
|
+
- [GitHub Discussions](https://github.com/wealthfolio/wealthfolio/discussions)
|
|
1529
1541
|
- [Email Support](mailto:support@wealthfolio.app)
|
|
1530
1542
|
|
|
1531
1543
|
## 🔧 Troubleshooting
|
|
@@ -1752,7 +1764,7 @@ If you're still experiencing issues:
|
|
|
1752
1764
|
- Share the code and error logs
|
|
1753
1765
|
|
|
1754
1766
|
3. **Search Existing Issues**:
|
|
1755
|
-
- Check [GitHub Issues](https://github.com/
|
|
1767
|
+
- Check [GitHub Issues](https://github.com/wealthfolio/wealthfolio/issues)
|
|
1756
1768
|
- Look for similar problems and solutions
|
|
1757
1769
|
|
|
1758
1770
|
4. **Provide Complete Information**:
|
|
@@ -75,10 +75,18 @@ var PERMISSION_CATEGORIES = [
|
|
|
75
75
|
riskLevel: "low"
|
|
76
76
|
},
|
|
77
77
|
{
|
|
78
|
-
id: "
|
|
79
|
-
name: "
|
|
78
|
+
id: "financial-planning",
|
|
79
|
+
name: "Financial Planning",
|
|
80
80
|
description: "Access to financial goals and allocations",
|
|
81
|
-
functions: [
|
|
81
|
+
functions: [
|
|
82
|
+
"getAll",
|
|
83
|
+
"create",
|
|
84
|
+
"update",
|
|
85
|
+
"getFunding",
|
|
86
|
+
"saveFunding",
|
|
87
|
+
"updateAllocations",
|
|
88
|
+
"getAllocations"
|
|
89
|
+
],
|
|
82
90
|
riskLevel: "medium"
|
|
83
91
|
},
|
|
84
92
|
{
|
|
@@ -219,4 +227,4 @@ export {
|
|
|
219
227
|
addDetectedFunction,
|
|
220
228
|
markFunctionAsDeclared
|
|
221
229
|
};
|
|
222
|
-
//# sourceMappingURL=chunk-
|
|
230
|
+
//# sourceMappingURL=chunk-ISD4MMHY.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/permissions.ts"],"sourcesContent":["/**\n * Permission system types and constants for Wealthfolio addons\n */\n\n/**\n * Security risk levels for addon operations\n */\nexport type RiskLevel = 'low' | 'medium' | 'high';\n\n/**\n * Function permission details with declaration and detection tracking\n */\nexport interface FunctionPermission {\n /** Function name */\n name: string;\n /** Whether this function was declared by the developer in manifest */\n isDeclared: boolean;\n /** Whether this function was detected by static analysis during installation */\n isDetected: boolean;\n /** ISO timestamp when this function was detected (if isDetected is true) */\n detectedAt?: string;\n}\n\n/**\n * Permission requirement for specific addon functionality\n */\nexport interface Permission {\n /** Permission category identifier */\n category: string;\n /** List of API functions this permission grants access to with their declaration/detection status */\n functions: FunctionPermission[];\n /** Human-readable explanation of why this permission is needed */\n purpose: string;\n}\n\n/**\n * Permission category definition\n */\nexport interface PermissionCategory {\n /** Unique category identifier */\n id: string;\n /** Display name for the category */\n name: string;\n /** Detailed description of what this category covers */\n description: string;\n /** List of API functions in this category */\n functions: string[];\n /** Security risk level for this category */\n riskLevel: RiskLevel;\n}\n\n/**\n * Predefined permission categories with their associated functions and risk levels\n */\nexport const PERMISSION_CATEGORIES: PermissionCategory[] = [\n {\n id: 'accounts',\n name: 'Account Management',\n description: 'Access to account information and settings',\n functions: ['getAll', 'create'],\n riskLevel: 'high',\n },\n {\n id: 'portfolio',\n name: 'Portfolio Data',\n description: 'Access to holdings, portfolio performance, and account valuations',\n functions: [\n 'getHoldings',\n 'getHolding',\n 'update',\n 'recalculate',\n 'getIncomeSummary',\n 'getHistoricalValuations',\n 'getLatestValuations',\n ],\n riskLevel: 'high',\n },\n {\n id: 'activities',\n name: 'Transaction History',\n description: 'Access to transaction records and activity management',\n functions: [\n 'getAll',\n 'search',\n 'create',\n 'update',\n 'saveMany',\n 'import',\n 'checkImport',\n 'getImportMapping',\n 'saveImportMapping',\n ],\n riskLevel: 'high',\n },\n {\n id: 'market-data',\n name: 'Market Data',\n description: 'Access to market prices, quotes, and financial data',\n functions: ['searchTicker', 'syncHistory', 'sync', 'getProviders', 'fetchDividends'],\n riskLevel: 'low',\n },\n {\n id: 'assets',\n name: 'Asset Management',\n description: 'Access to asset profiles and data sources',\n functions: ['getProfile', 'updateProfile', 'updateQuoteMode'],\n riskLevel: 'medium',\n },\n {\n id: 'quotes',\n name: 'Quote Management',\n description: 'Access to price quotes and historical data',\n functions: ['update', 'getHistory'],\n riskLevel: 'low',\n },\n {\n id: 'performance',\n name: 'Performance Analytics',\n description: 'Access to performance calculations and metrics',\n functions: ['calculateHistory', 'calculateSummary', 'calculateAccountsSimple'],\n riskLevel: 'medium',\n },\n {\n id: 'currency',\n name: 'Exchange Rates',\n description: 'Access to currency exchange rates and conversion data',\n functions: ['getAll', 'update', 'add'],\n riskLevel: 'low',\n },\n {\n id: 'financial-planning',\n name: 'Financial Planning',\n description: 'Access to financial goals and allocations',\n functions: [\n 'getAll',\n 'create',\n 'update',\n 'getFunding',\n 'saveFunding',\n 'updateAllocations',\n 'getAllocations',\n ],\n riskLevel: 'medium',\n },\n {\n id: 'contribution-limits',\n name: 'Contribution Limits',\n description: 'Access to contribution limits and deposit calculations',\n functions: ['getAll', 'create', 'update', 'calculateDeposits'],\n riskLevel: 'medium',\n },\n {\n id: 'settings',\n name: 'Application Settings',\n description: 'Access to application settings and configuration',\n functions: ['get', 'update', 'backupDatabase'],\n riskLevel: 'medium',\n },\n {\n id: 'files',\n name: 'File Operations',\n description: 'Access to file dialogs and file system operations',\n functions: ['openCsvDialog', 'openSaveDialog'],\n riskLevel: 'medium',\n },\n {\n id: 'secrets',\n name: 'Secrets Management',\n description: 'Access to secure storage for addon secrets',\n functions: ['set', 'get', 'delete'],\n riskLevel: 'high',\n },\n {\n id: 'snapshots',\n name: 'Snapshot Management',\n description: 'Access to holdings snapshots for accounts with holdings tracking mode',\n functions: [\n 'getAll',\n 'getByDate',\n 'save',\n 'checkImport',\n 'importSnapshots',\n 'delete',\n ],\n riskLevel: 'high',\n },\n {\n id: 'events',\n name: 'Event Listeners',\n description: 'Access to application events and notifications',\n functions: [\n 'onDropHover',\n 'onDrop',\n 'onDropCancelled',\n 'onUpdateStart',\n 'onUpdateComplete',\n 'onUpdateError',\n 'onSyncStart',\n 'onSyncComplete',\n ],\n riskLevel: 'low',\n },\n {\n id: 'ui',\n name: 'User Interface',\n description: 'Access to modify navigation and add UI components',\n functions: ['sidebar.addItem', 'router.add'],\n riskLevel: 'low',\n },\n];\n\n/**\n * Helper functions for permission management\n */\n\n/**\n * Create a FunctionPermission object\n */\nexport function createFunctionPermission(\n name: string,\n isDeclared = false,\n isDetected = false,\n detectedAt?: string,\n): FunctionPermission {\n return {\n name,\n isDeclared,\n isDetected,\n detectedAt: isDetected ? detectedAt || new Date().toISOString() : undefined,\n };\n}\n\n/**\n * Get permission category by ID\n */\nexport function getPermissionCategory(id: string): PermissionCategory | undefined {\n return PERMISSION_CATEGORIES.find((category) => category.id === id);\n}\n\n/**\n * Get permission categories by risk level\n */\nexport function getPermissionCategoriesByRisk(\n riskLevel: RiskLevel,\n): PermissionCategory[] {\n return PERMISSION_CATEGORIES.filter((category) => category.riskLevel === riskLevel);\n}\n\n/**\n * Get the risk level for a specific function\n */\nexport function getFunctionRiskLevel(functionName: string): RiskLevel | undefined {\n const category = PERMISSION_CATEGORIES.find((cat) =>\n cat.functions.includes(functionName),\n );\n return category?.riskLevel;\n}\n\n/**\n * Check if a function requires a specific permission category\n */\nexport function isPermissionRequired(functionName: string, categoryId: string): boolean {\n const category = getPermissionCategory(categoryId);\n return category ? category.functions.includes(functionName) : false;\n}\n\n/**\n * Get all declared functions from a permission\n */\nexport function getDeclaredFunctions(permission: Permission): string[] {\n return permission.functions.filter((func) => func.isDeclared).map((func) => func.name);\n}\n\n/**\n * Get all detected functions from a permission\n */\nexport function getDetectedFunctions(permission: Permission): string[] {\n return permission.functions.filter((func) => func.isDetected).map((func) => func.name);\n}\n\n/**\n * Get functions that were detected but not declared (potential security concern)\n */\nexport function getUndeclaredDetectedFunctions(permission: Permission): string[] {\n return permission.functions\n .filter((func) => func.isDetected && !func.isDeclared)\n .map((func) => func.name);\n}\n\n/**\n * Check if a permission has any undeclared detected functions\n */\nexport function hasUndeclaredDetectedFunctions(permission: Permission): boolean {\n return permission.functions.some((func) => func.isDetected && !func.isDeclared);\n}\n\n/**\n * Add a detected function to a permission\n */\nexport function addDetectedFunction(\n permission: Permission,\n functionName: string,\n detectedAt?: string,\n): Permission {\n const existingFunc = permission.functions.find((f) => f.name === functionName);\n\n if (existingFunc) {\n // Update existing function to mark as detected\n existingFunc.isDetected = true;\n existingFunc.detectedAt = detectedAt || new Date().toISOString();\n } else {\n // Add new detected function\n permission.functions.push(\n createFunctionPermission(functionName, false, true, detectedAt),\n );\n }\n\n return permission;\n}\n\n/**\n * Mark a function as declared in a permission\n */\nexport function markFunctionAsDeclared(\n permission: Permission,\n functionName: string,\n): Permission {\n const existingFunc = permission.functions.find((f) => f.name === functionName);\n\n if (existingFunc) {\n existingFunc.isDeclared = true;\n } else {\n // Add new declared function\n permission.functions.push(createFunctionPermission(functionName, true, false));\n }\n\n return permission;\n}\n"],"mappings":";AAsDO,IAAM,wBAA8C;AAAA,EACzD;AAAA,IACE,IAAI;AAAA,IACJ,MAAM;AAAA,IACN,aAAa;AAAA,IACb,WAAW,CAAC,UAAU,QAAQ;AAAA,IAC9B,WAAW;AAAA,EACb;AAAA,EACA;AAAA,IACE,IAAI;AAAA,IACJ,MAAM;AAAA,IACN,aAAa;AAAA,IACb,WAAW;AAAA,MACT;AAAA,MACA;AAAA,MACA;AAAA,MAC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AAe,WAAW,UAAU,KAAK,CAAC,MAAM,EAAE,SAAS,YAAY;AAE7E,MAAI,cAAc;AAChB,iBAAa,aAAa;AAAA,EAC5B,OAAO;AAEL,eAAW,UAAU,KAAK,yBAAyB,cAAc,MAAM,KAAK,CAAC;AAAA,EAC/E;AAEA,SAAO;AACT;","names":[]}
|
package/dist/index.js
CHANGED
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
getPermissionCategoriesByRisk,
|
|
5
5
|
getPermissionCategory,
|
|
6
6
|
isPermissionRequired
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-ISD4MMHY.js";
|
|
8
8
|
|
|
9
9
|
// src/query-keys.ts
|
|
10
10
|
var QueryKeys = {
|
|
@@ -71,7 +71,7 @@ function isInstalledManifest(manifest) {
|
|
|
71
71
|
// package.json
|
|
72
72
|
var package_default = {
|
|
73
73
|
name: "@wealthfolio/addon-sdk",
|
|
74
|
-
version: "3.
|
|
74
|
+
version: "3.5.1",
|
|
75
75
|
type: "module",
|
|
76
76
|
description: "TypeScript SDK for building Wealthfolio addons with enhanced functionality and type safety",
|
|
77
77
|
main: "dist/index.js",
|
|
@@ -109,11 +109,11 @@ var package_default = {
|
|
|
109
109
|
homepage: "https://wealthfolio.app/addons",
|
|
110
110
|
repository: {
|
|
111
111
|
type: "git",
|
|
112
|
-
url: "https://github.com/
|
|
112
|
+
url: "https://github.com/wealthfolio/wealthfolio.git",
|
|
113
113
|
directory: "packages/addon-sdk"
|
|
114
114
|
},
|
|
115
115
|
bugs: {
|
|
116
|
-
url: "https://github.com/
|
|
116
|
+
url: "https://github.com/wealthfolio/wealthfolio/issues"
|
|
117
117
|
},
|
|
118
118
|
scripts: {
|
|
119
119
|
build: "tsup && pnpm run build:types",
|
|
@@ -213,35 +213,58 @@ function isAddonManifest(obj) {
|
|
|
213
213
|
}
|
|
214
214
|
|
|
215
215
|
// src/goal-progress.ts
|
|
216
|
+
function isParticipatingGoal(goal) {
|
|
217
|
+
if (goal.statusLifecycle) {
|
|
218
|
+
return goal.statusLifecycle === "active";
|
|
219
|
+
}
|
|
220
|
+
return true;
|
|
221
|
+
}
|
|
222
|
+
function getFiniteAmount(value) {
|
|
223
|
+
if (value === null || value === void 0 || value === "") {
|
|
224
|
+
return void 0;
|
|
225
|
+
}
|
|
226
|
+
const amount = typeof value === "number" ? value : Number(value);
|
|
227
|
+
return Number.isFinite(amount) ? amount : void 0;
|
|
228
|
+
}
|
|
229
|
+
function toFiniteAmount(value) {
|
|
230
|
+
return getFiniteAmount(value) ?? 0;
|
|
231
|
+
}
|
|
216
232
|
function calculateGoalProgress(accountsValuations, goals, allocations) {
|
|
217
|
-
if (!
|
|
233
|
+
if (!goals) {
|
|
218
234
|
return [];
|
|
219
235
|
}
|
|
220
|
-
const baseCurrency = accountsValuations[0]
|
|
236
|
+
const baseCurrency = accountsValuations?.[0]?.baseCurrency ?? "USD";
|
|
221
237
|
const accountValueMap = /* @__PURE__ */ new Map();
|
|
222
|
-
accountsValuations
|
|
223
|
-
const valueInBaseCurrency =
|
|
238
|
+
accountsValuations?.forEach((account) => {
|
|
239
|
+
const valueInBaseCurrency = account.totalValueBase ?? 0;
|
|
224
240
|
accountValueMap.set(account.accountId, valueInBaseCurrency);
|
|
225
241
|
});
|
|
226
242
|
const allocationsByGoal = /* @__PURE__ */ new Map();
|
|
227
|
-
allocations
|
|
243
|
+
allocations?.forEach((alloc) => {
|
|
228
244
|
const existing = allocationsByGoal.get(alloc.goalId) ?? [];
|
|
229
245
|
allocationsByGoal.set(alloc.goalId, [...existing, alloc]);
|
|
230
246
|
});
|
|
231
|
-
const sortedGoals = [...goals].
|
|
247
|
+
const sortedGoals = [...goals].filter(isParticipatingGoal).sort(
|
|
248
|
+
(a, b) => toFiniteAmount(a.summaryTargetAmount ?? a.targetAmount) - toFiniteAmount(b.summaryTargetAmount ?? b.targetAmount)
|
|
249
|
+
);
|
|
232
250
|
return sortedGoals.map((goal) => {
|
|
233
251
|
const goalAllocations = allocationsByGoal.get(goal.id) ?? [];
|
|
252
|
+
const targetAmount = toFiniteAmount(goal.summaryTargetAmount ?? goal.targetAmount);
|
|
234
253
|
const totalAllocatedValue = goalAllocations.reduce((total, allocation) => {
|
|
235
254
|
const accountValueInBase = accountValueMap.get(allocation.accountId) ?? 0;
|
|
236
|
-
return total + accountValueInBase * allocation.
|
|
255
|
+
return total + accountValueInBase * allocation.sharePercent / 100;
|
|
237
256
|
}, 0);
|
|
238
|
-
const
|
|
257
|
+
const currentValue = getFiniteAmount(goal.summaryCurrentValue) ?? totalAllocatedValue;
|
|
258
|
+
const progress = getFiniteAmount(goal.summaryProgress) ?? (targetAmount > 0 ? currentValue / targetAmount : 0);
|
|
239
259
|
return {
|
|
260
|
+
goalId: goal.id,
|
|
240
261
|
name: goal.title,
|
|
241
|
-
targetValue:
|
|
242
|
-
currentValue
|
|
262
|
+
targetValue: targetAmount,
|
|
263
|
+
currentValue,
|
|
243
264
|
progress,
|
|
244
|
-
currency: baseCurrency
|
|
265
|
+
currency: goal.currency ?? baseCurrency,
|
|
266
|
+
statusHealth: goal.statusHealth,
|
|
267
|
+
targetDate: goal.targetDate
|
|
245
268
|
};
|
|
246
269
|
});
|
|
247
270
|
}
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/query-keys.ts","../src/manifest.ts","../package.json","../src/version.ts","../src/utils.ts","../src/goal-progress.ts","../src/index.ts"],"sourcesContent":["/**\n * Shared Query Keys for React Query\n * These keys should match the main application's query keys to ensure cache consistency\n */\nexport const QueryKeys = {\n // Account related keys\n ACCOUNTS: 'accounts',\n ACCOUNTS_SUMMARY: 'accounts_summary',\n\n // Activity related keys\n ACTIVITY_DATA: 'activity-data',\n ACTIVITIES: 'activities',\n\n // Portfolio related keys\n HOLDINGS: 'holdings',\n HOLDING: 'holding',\n INCOME_SUMMARY: 'incomeSummary',\n PORTFOLIO_SUMMARY: 'portfolioSummary',\n QUOTE_HISTORY: 'quoteHistory',\n\n // Goals related keys\n GOALS: 'goals',\n GOALS_ALLOCATIONS: 'goals_allocations',\n\n // Settings related keys\n SETTINGS: 'settings',\n EXCHANGE_RATES: 'exchangeRates',\n\n // New keys for exchange rates\n EXCHANGE_RATE_SYMBOLS: 'exchange_rate_symbols',\n QUOTE: 'quote',\n\n CONTRIBUTION_LIMITS: 'contributionLimits',\n CONTRIBUTION_LIMIT_PROGRESS: 'contributionLimitProgress',\n\n ASSET_DATA: 'asset_data',\n IMPORT_MAPPING: 'import_mapping',\n\n PERFORMANCE_SUMMARY: 'performanceSummary',\n PERFORMANCE_HISTORY: 'performanceHistory',\n\n HISTORY_VALUATION: 'historyValuation',\n // Helper function to create account-specific keys\n valuationHistory: (id: string) => [QueryKeys.HISTORY_VALUATION, id],\n\n // Account simple performance\n ACCOUNTS_SIMPLE_PERFORMANCE: 'accountsSimplePerformance',\n accountsSimplePerformance: (accountIds: string[]) => [\n QueryKeys.ACCOUNTS_SIMPLE_PERFORMANCE,\n [...accountIds].sort().join(',') || 'none',\n ],\n\n // Market Data Providers\n MARKET_DATA_PROVIDERS: 'marketDataProviders',\n MARKET_DATA_PROVIDER_SETTINGS: 'marketDataProviderSettings',\n\n transactions: 'transactions',\n latestValuations: 'latest-valuations',\n\n // Market Data\n symbolSearch: 'symbol-search',\n\n ASSET_HISTORY: 'asset-history',\n\n // Addons\n INSTALLED_ADDONS: 'installedAddons',\n ADDON_STORE_LISTINGS: 'addonStoreListings',\n ADDON_AUTO_UPDATE_CHECK: 'addonAutoUpdateCheck',\n\n SNAPSHOTS: 'snapshots',\n snapshots: (accountId: string) => [QueryKeys.SNAPSHOTS, accountId],\n\n secrets: {\n apiKey: (providerId: string) => ['secrets', 'apiKey', providerId],\n },\n} as const;\n\nexport type QueryKeys = typeof QueryKeys;\n","/**\n * Addon manifest and metadata types\n */\n\nimport type { Permission } from './permissions';\n\n/**\n * Unified addon manifest structure that handles both development and runtime scenarios\n * This represents both what developers write in their manifest.json and installed addon metadata\n */\nexport interface AddonManifest {\n // Core manifest fields (always present)\n /** Unique addon identifier (lowercase, no spaces, hyphens allowed) */\n id: string;\n /** Human-readable addon name */\n name: string;\n /** Semantic version (e.g., \"1.0.0\") */\n version: string;\n /** Brief description of the addon's functionality */\n description?: string;\n /** Author name or organization */\n author?: string;\n /** Compatible SDK version */\n sdkVersion?: string;\n /** Main entry point file (relative to addon root) */\n main?: string;\n /** Whether the addon is enabled by default */\n enabled?: boolean;\n /** Permission declarations for security review */\n permissions?: Permission[];\n /** Addon homepage or documentation URL */\n homepage?: string;\n /** Support or issues URL */\n repository?: string;\n /** License identifier (e.g., \"MIT\", \"Apache-2.0\") */\n license?: string;\n /** Minimum Wealthfolio version required */\n minWealthfolioVersion?: string;\n /** Keywords for discoverability */\n keywords?: string[];\n /** Addon icon (base64 or relative path) */\n icon?: string;\n\n // Runtime fields (only present after installation)\n /** Installation timestamp in ISO format */\n installedAt?: string;\n /** Last update timestamp */\n updatedAt?: string;\n /** Installation source */\n source?: 'local' | 'store' | 'sideload';\n /** File size in bytes */\n size?: number;\n}\n\n/**\n * Type guard to check if a manifest has been installed (has runtime fields)\n */\nexport function isInstalledManifest(\n manifest: AddonManifest,\n): manifest is Required<Pick<AddonManifest, 'main' | 'enabled' | 'installedAt'>> &\n AddonManifest {\n return !!(\n manifest.installedAt &&\n manifest.main !== undefined &&\n manifest.enabled !== undefined\n );\n}\n\n/**\n * Helper type for development manifests (without runtime fields)\n */\nexport type DevelopmentManifest = Omit<\n AddonManifest,\n 'installedAt' | 'updatedAt' | 'source' | 'size'\n>;\n\n/**\n * Helper type for installed manifests (with runtime fields)\n */\nexport type InstalledManifest = Required<\n Pick<AddonManifest, 'main' | 'enabled' | 'installedAt'>\n> &\n AddonManifest;\n\n/**\n * Addon file information\n */\nexport interface AddonFile {\n /** File name */\n name: string;\n /** File content */\n content: string;\n /** Whether this is the main entry point */\n is_main: boolean;\n /** File size in bytes */\n size?: number;\n}\n\n/**\n * Extracted addon package\n */\nexport interface ExtractedAddon {\n /** Addon metadata from manifest */\n metadata: AddonManifest;\n /** List of files in the addon package */\n files: AddonFile[];\n}\n\n/**\n * Installed addon information\n */\nexport interface InstalledAddon {\n /** Addon metadata */\n metadata: AddonManifest;\n /** Installation path */\n path?: string;\n /** Whether the addon is currently active */\n active?: boolean;\n}\n\n/**\n * Addon installation result\n */\nexport interface AddonInstallResult {\n /** Whether installation was successful */\n success: boolean;\n /** Error message if installation failed */\n error?: string;\n /** Installed addon metadata */\n addon?: AddonManifest;\n}\n\n/**\n * Addon validation result\n */\nexport interface AddonValidationResult {\n /** Whether the addon is valid */\n valid: boolean;\n /** List of validation errors */\n errors: string[];\n /** List of validation warnings */\n warnings: string[];\n}\n\n/**\n * Addon update information\n */\nexport interface AddonUpdateInfo {\n /** Current installed version */\n currentVersion: string;\n /** Latest available version */\n latestVersion: string;\n /** Whether an update is available */\n updateAvailable: boolean;\n /** Download URL for the update */\n downloadUrl?: string;\n /** Release notes for the latest version */\n releaseNotes?: string;\n /** Release date of the latest version */\n releaseDate?: string;\n /** Changelog URL */\n changelogUrl?: string;\n /** Whether this is a critical security update */\n isCritical?: boolean;\n /** Breaking changes in this update */\n hasBreakingChanges?: boolean;\n /** Minimum Wealthfolio version required for this update */\n minWealthfolioVersion?: string;\n}\n\n/**\n * Addon update check result\n */\nexport interface AddonUpdateCheckResult {\n /** Addon ID */\n addonId: string;\n /** Update information */\n updateInfo: AddonUpdateInfo;\n /** Any errors during update check */\n error?: string;\n}\n\n/**\n * Addon store listing\n */\nexport interface AddonStoreListing {\n /** Addon metadata */\n metadata: AddonManifest;\n /** Download URL */\n downloadUrl: string;\n /** Number of downloads */\n downloads?: number;\n /** Average rating */\n rating?: number;\n /** Number of reviews */\n reviewCount?: number;\n /** Whether it's verified by Wealthfolio team */\n verified?: boolean;\n /** Last update date */\n lastUpdated?: string;\n /** Screenshots or images */\n images?: string[];\n /** Release notes for the latest version */\n releaseNotes?: string;\n /** Changelog URL */\n changelogUrl?: string;\n}\n","{\n \"name\": \"@wealthfolio/addon-sdk\",\n \"version\": \"3.2.0\",\n \"type\": \"module\",\n \"description\": \"TypeScript SDK for building Wealthfolio addons with enhanced functionality and type safety\",\n \"main\": \"dist/index.js\",\n \"types\": \"dist/src/index.d.ts\",\n \"exports\": {\n \".\": {\n \"import\": \"./dist/index.js\",\n \"types\": \"./dist/src/index.d.ts\"\n },\n \"./types\": {\n \"import\": \"./dist/types.js\",\n \"types\": \"./dist/src/types.d.ts\"\n },\n \"./permissions\": {\n \"import\": \"./dist/permissions.js\",\n \"types\": \"./dist/src/permissions.d.ts\"\n }\n },\n \"files\": [\n \"dist\",\n \"README.md\",\n \"CHANGELOG.md\"\n ],\n \"keywords\": [\n \"wealthfolio\",\n \"addon\",\n \"plugin\",\n \"sdk\",\n \"typescript\",\n \"financial\",\n \"portfolio\"\n ],\n \"author\": \"Wealthfolio Team\",\n \"license\": \"MIT\",\n \"homepage\": \"https://wealthfolio.app/addons\",\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"https://github.com/afadil/wealthfolio.git\",\n \"directory\": \"packages/addon-sdk\"\n },\n \"bugs\": {\n \"url\": \"https://github.com/afadil/wealthfolio/issues\"\n },\n \"scripts\": {\n \"build\": \"tsup && pnpm run build:types\",\n \"dev\": \"tsup --watch\",\n \"clean\": \"rm -rf dist\",\n \"lint\": \"eslint .\",\n \"lint:fix\": \"eslint . --fix\",\n \"lint:quiet\": \"eslint . --quiet\",\n \"format\": \"prettier --write .\",\n \"format:check\": \"prettier --check .\",\n \"type-check\": \"tsc --noEmit\",\n \"build:types\": \"tsc -p tsconfig.json\",\n \"prepack\": \"npm run build\"\n },\n \"peerDependencies\": {\n \"react\": \"^19.2.4\",\n \"react-dom\": \"^19.2.4\"\n },\n \"devDependencies\": {\n \"@tanstack/react-query\": \"^5.90.20\",\n \"@types/react\": \"^19.2.13\",\n \"@types/react-dom\": \"^19.2.3\",\n \"tsup\": \"^8.5.1\",\n \"typescript\": \"^5.9.3\"\n },\n \"engines\": {\n \"node\": \">=20.0.0\"\n }\n}\n","import packageJson from '../package.json';\n\n/**\n * Current SDK version from package.json\n */\nexport const SDK_VERSION = packageJson.version;\n","/**\n * Utility functions for addon development\n */\n\nimport type { AddonManifest, AddonValidationResult } from './manifest';\nimport { SDK_VERSION } from './version';\n\n/**\n * Validates an addon manifest\n */\nexport function validateManifest(manifest: AddonManifest): AddonValidationResult {\n const errors: string[] = [];\n const warnings: string[] = [];\n\n // Required fields\n if (!manifest.id) {\n errors.push('Addon ID is required');\n } else if (!/^[a-z0-9-]+$/.test(manifest.id)) {\n errors.push('Addon ID must contain only lowercase letters, numbers, and hyphens');\n }\n\n if (!manifest.name) {\n errors.push('Addon name is required');\n }\n\n if (!manifest.version) {\n errors.push('Addon version is required');\n } else if (!/^\\d+\\.\\d+\\.\\d+/.test(manifest.version)) {\n warnings.push('Version should follow semantic versioning (e.g., 1.0.0)');\n }\n\n // Optional but recommended fields\n if (!manifest.description) {\n warnings.push('Description is recommended for better discoverability');\n }\n\n if (!manifest.author) {\n warnings.push('Author information is recommended');\n }\n\n if (!manifest.main) {\n warnings.push('Main entry point not specified, defaulting to \"addon.js\"');\n }\n\n // Validate permissions if present\n if (manifest.permissions) {\n manifest.permissions.forEach((permission, index) => {\n if (!permission.category) {\n errors.push(`Permission ${index}: category is required`);\n }\n if (!permission.functions || permission.functions.length === 0) {\n errors.push(`Permission ${index}: at least one function must be specified`);\n }\n if (!permission.purpose) {\n warnings.push(`Permission ${index}: purpose explanation is recommended`);\n }\n });\n }\n\n return {\n valid: errors.length === 0,\n errors,\n warnings,\n };\n}\n\n/**\n * Checks if an addon version is compatible with the current SDK\n */\nexport function isCompatibleVersion(\n addonSdkVersion?: string,\n currentSdkVersion = SDK_VERSION,\n): boolean {\n if (!addonSdkVersion) return true; // Assume compatible if not specified\n\n const [addonMajor, addonMinor] = addonSdkVersion.split('.').map(Number);\n const [currentMajor, currentMinor] = currentSdkVersion.split('.').map(Number);\n\n // Same major version, and addon minor version <= current minor version\n return addonMajor === currentMajor && addonMinor <= currentMinor;\n}\n\n/**\n * Formats addon size in human-readable format\n */\nexport function formatAddonSize(bytes: number): string {\n const sizes = ['B', 'KB', 'MB', 'GB'];\n if (bytes === 0) return '0 B';\n\n const i = Math.floor(Math.log(bytes) / Math.log(1024));\n const size = bytes / Math.pow(1024, i);\n\n return `${size.toFixed(i === 0 ? 0 : 1)} ${sizes[i]}`;\n}\n\n/**\n * Generates a unique addon ID from a name\n */\nexport function generateAddonId(name: string): string {\n return name\n .toLowerCase()\n .replace(/[^a-z0-9\\s-]/g, '') // Remove special characters\n .replace(/\\s+/g, '-') // Replace spaces with hyphens\n .replace(/-+/g, '-') // Replace multiple hyphens with single\n .replace(/^-|-$/g, ''); // Remove leading/trailing hyphens\n}\n\n/**\n * Type guard to check if an object is a valid addon manifest\n */\nexport function isAddonManifest(obj: unknown): obj is AddonManifest {\n return (\n typeof obj === 'object' &&\n obj !== null &&\n typeof (obj as Record<string, unknown>).id === 'string' &&\n typeof (obj as Record<string, unknown>).name === 'string' &&\n typeof (obj as Record<string, unknown>).version === 'string'\n );\n}\n","import type { Goal, GoalAllocation, AccountValuation, GoalProgress } from './data-types';\n\n/**\n * Calculate goal progress using allocations.\n * Converts account values to base currency, applies percent allocation per account,\n * and computes progress ratio (0–1+) against target amount.\n */\nexport function calculateGoalProgress(\n accountsValuations: AccountValuation[],\n goals: Goal[],\n allocations: GoalAllocation[],\n): GoalProgress[] {\n if (!accountsValuations || accountsValuations.length === 0 || !goals || !allocations) {\n return [];\n }\n\n const baseCurrency = accountsValuations[0].baseCurrency ?? 'USD';\n\n // accountId -> totalValue in base currency\n const accountValueMap = new Map<string, number>();\n accountsValuations.forEach((account) => {\n const valueInBaseCurrency = (account.totalValue ?? 0) * (account.fxRateToBase ?? 1);\n accountValueMap.set(account.accountId, valueInBaseCurrency);\n });\n\n // goalId -> allocations\n const allocationsByGoal = new Map<string, GoalAllocation[]>();\n allocations.forEach((alloc) => {\n const existing = allocationsByGoal.get(alloc.goalId) ?? [];\n allocationsByGoal.set(alloc.goalId, [...existing, alloc]);\n });\n\n const sortedGoals = [...goals].sort((a, b) => a.targetAmount - b.targetAmount);\n\n return sortedGoals.map((goal) => {\n const goalAllocations = allocationsByGoal.get(goal.id) ?? [];\n\n const totalAllocatedValue = goalAllocations.reduce((total, allocation) => {\n const accountValueInBase = accountValueMap.get(allocation.accountId) ?? 0;\n return total + (accountValueInBase * allocation.percentAllocation) / 100;\n }, 0);\n\n const progress = goal.targetAmount > 0 ? totalAllocatedValue / goal.targetAmount : 0;\n\n return {\n name: goal.title,\n targetValue: goal.targetAmount,\n currentValue: totalAllocatedValue,\n progress,\n currency: baseCurrency,\n };\n });\n}\n","/**\n * @wealthfolio/addon-sdk\n *\n * TypeScript SDK for building Wealthfolio addons with enhanced functionality,\n * type safety, and comprehensive permission management.\n *\n * @version 1.0.0\n * @author Wealthfolio Team\n * @license MIT\n */\n\n// Core types\nexport type {\n AddonContext,\n AddonEnableFunction,\n EventCallback,\n RouteConfig,\n RouterManager,\n SidebarItemConfig,\n SidebarItemHandle,\n SidebarManager,\n UnlistenFn,\n} from './types';\n\n// Host API interface\nexport type {\n ActivitySearchFilters,\n ActivitySort,\n HostAPI,\n SnapshotsAPI,\n ToastAPI,\n YahooDividend,\n} from './host-api';\n\n// Query Client and Keys exports\nexport type { QueryClient } from '@tanstack/react-query';\nexport { QueryKeys } from './query-keys';\n\n// Comprehensive data types\nexport type * from './data-types';\n\n// Manifest and metadata types\nexport type {\n AddonFile,\n AddonInstallResult,\n AddonManifest,\n AddonStoreListing,\n AddonUpdateCheckResult,\n AddonUpdateInfo,\n AddonValidationResult,\n DevelopmentManifest,\n ExtractedAddon,\n InstalledAddon,\n InstalledManifest,\n} from './manifest';\n\nexport { isInstalledManifest } from './manifest';\n\n// Permission system\nexport type {\n FunctionPermission,\n Permission,\n PermissionCategory,\n RiskLevel,\n} from './permissions';\n\nexport {\n getFunctionRiskLevel,\n getPermissionCategoriesByRisk,\n getPermissionCategory,\n isPermissionRequired,\n PERMISSION_CATEGORIES,\n} from './permissions';\n\n// Utilities\nexport {\n formatAddonSize,\n generateAddonId,\n isAddonManifest,\n isCompatibleVersion,\n validateManifest,\n} from './utils';\n\n// Goal progress calculation\nexport { calculateGoalProgress } from './goal-progress';\n\n// -----------------------------------------------------------------------------\n// Framework version contract\n// -----------------------------------------------------------------------------\n\n/**\n * React version guaranteed by the host application. Addons may assert against\n * this at runtime if they rely on a particular React feature set.\n */\nexport const ReactVersion = '19.1.1';\n\n/**\n * Addons receive their context as a parameter to the enable() function.\n * Each addon gets its own isolated context with scoped secret storage.\n *\n * Example:\n * export default function enable(ctx: AddonContext) {\n * // Use ctx.api.secrets.set/get/delete for secure storage\n * // Use ctx.sidebar.addItem() to add navigation\n * // Use ctx.router.add() to register routes\n * }\n */\n\ninterface HostGlobals {\n React: typeof import('react');\n ReactDOM: typeof import('react-dom');\n}\nconst hostGlobals = window as unknown as Partial<HostGlobals>;\nexport const React = hostGlobals.React!;\nexport const ReactDOM = hostGlobals.ReactDOM!;\n\n// Version\nexport { SDK_VERSION } from './version';\n"],"mappings":";;;;;;;;;AAIO,IAAM,YAAY;AAAA;AAAA,EAEvB,UAAU;AAAA,EACV,kBAAkB;AAAA;AAAA,EAGlB,eAAe;AAAA,EACf,YAAY;AAAA;AAAA,EAGZ,UAAU;AAAA,EACV,SAAS;AAAA,EACT,gBAAgB;AAAA,EAChB,mBAAmB;AAAA,EACnB,eAAe;AAAA;AAAA,EAGf,OAAO;AAAA,EACP,mBAAmB;AAAA;AAAA,EAGnB,UAAU;AAAA,EACV,gBAAgB;AAAA;AAAA,EAGhB,uBAAuB;AAAA,EACvB,OAAO;AAAA,EAEP,qBAAqB;AAAA,EACrB,6BAA6B;AAAA,EAE7B,YAAY;AAAA,EACZ,gBAAgB;AAAA,EAEhB,qBAAqB;AAAA,EACrB,qBAAqB;AAAA,EAErB,mBAAmB;AAAA;AAAA,EAEnB,kBAAkB,CAAC,OAAe,C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CAAC;AACH;;;AC0CO,IAAM,eAAe;AAkB5B,IAAM,cAAc;AACb,IAAM,QAAQ,YAAY;AAC1B,IAAM,WAAW,YAAY;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../src/query-keys.ts","../src/manifest.ts","../package.json","../src/version.ts","../src/utils.ts","../src/goal-progress.ts","../src/index.ts"],"sourcesContent":["/**\n * Shared Query Keys for React Query\n * These keys should match the main application's query keys to ensure cache consistency\n */\nexport const QueryKeys = {\n // Account related keys\n ACCOUNTS: 'accounts',\n ACCOUNTS_SUMMARY: 'accounts_summary',\n\n // Activity related keys\n ACTIVITY_DATA: 'activity-data',\n ACTIVITIES: 'activities',\n\n // Portfolio related keys\n HOLDINGS: 'holdings',\n HOLDING: 'holding',\n INCOME_SUMMARY: 'incomeSummary',\n PORTFOLIO_SUMMARY: 'portfolioSummary',\n QUOTE_HISTORY: 'quoteHistory',\n\n // Goals related keys\n GOALS: 'goals',\n GOALS_ALLOCATIONS: 'goals_allocations',\n\n // Settings related keys\n SETTINGS: 'settings',\n EXCHANGE_RATES: 'exchangeRates',\n\n // New keys for exchange rates\n EXCHANGE_RATE_SYMBOLS: 'exchange_rate_symbols',\n QUOTE: 'quote',\n\n CONTRIBUTION_LIMITS: 'contributionLimits',\n CONTRIBUTION_LIMIT_PROGRESS: 'contributionLimitProgress',\n\n ASSET_DATA: 'asset_data',\n IMPORT_MAPPING: 'import_mapping',\n\n PERFORMANCE_SUMMARY: 'performanceSummary',\n PERFORMANCE_HISTORY: 'performanceHistory',\n\n HISTORY_VALUATION: 'historyValuation',\n // Helper function to create account-specific keys\n valuationHistory: (id: string) => [QueryKeys.HISTORY_VALUATION, id],\n\n // Account simple performance\n ACCOUNTS_SIMPLE_PERFORMANCE: 'accountsSimplePerformance',\n accountsSimplePerformance: (accountIds: string[]) => [\n QueryKeys.ACCOUNTS_SIMPLE_PERFORMANCE,\n [...accountIds].sort().join(',') || 'none',\n ],\n\n // Market Data Providers\n MARKET_DATA_PROVIDERS: 'marketDataProviders',\n MARKET_DATA_PROVIDER_SETTINGS: 'marketDataProviderSettings',\n\n transactions: 'transactions',\n latestValuations: 'latest-valuations',\n\n // Market Data\n symbolSearch: 'symbol-search',\n\n ASSET_HISTORY: 'asset-history',\n\n // Addons\n INSTALLED_ADDONS: 'installedAddons',\n ADDON_STORE_LISTINGS: 'addonStoreListings',\n ADDON_AUTO_UPDATE_CHECK: 'addonAutoUpdateCheck',\n\n SNAPSHOTS: 'snapshots',\n snapshots: (accountId: string) => [QueryKeys.SNAPSHOTS, accountId],\n\n secrets: {\n apiKey: (providerId: string) => ['secrets', 'apiKey', providerId],\n },\n} as const;\n\nexport type QueryKeys = typeof QueryKeys;\n","/**\n * Addon manifest and metadata types\n */\n\nimport type { Permission } from './permissions';\n\n/**\n * Unified addon manifest structure that handles both development and runtime scenarios\n * This represents both what developers write in their manifest.json and installed addon metadata\n */\nexport interface AddonManifest {\n // Core manifest fields (always present)\n /** Unique addon identifier (lowercase, no spaces, hyphens allowed) */\n id: string;\n /** Human-readable addon name */\n name: string;\n /** Semantic version (e.g., \"1.0.0\") */\n version: string;\n /** Brief description of the addon's functionality */\n description?: string;\n /** Author name or organization */\n author?: string;\n /** Compatible SDK version */\n sdkVersion?: string;\n /** Main entry point file (relative to addon root) */\n main?: string;\n /** Whether the addon is enabled by default */\n enabled?: boolean;\n /** Permission declarations for security review */\n permissions?: Permission[];\n /** Addon homepage or documentation URL */\n homepage?: string;\n /** Support or issues URL */\n repository?: string;\n /** License identifier (e.g., \"MIT\", \"Apache-2.0\") */\n license?: string;\n /** Minimum Wealthfolio version required */\n minWealthfolioVersion?: string;\n /** Keywords for discoverability */\n keywords?: string[];\n /** Addon icon (base64 or relative path) */\n icon?: string;\n\n // Runtime fields (only present after installation)\n /** Installation timestamp in ISO format */\n installedAt?: string;\n /** Last update timestamp */\n updatedAt?: string;\n /** Installation source */\n source?: 'local' | 'store' | 'sideload';\n /** File size in bytes */\n size?: number;\n}\n\n/**\n * Type guard to check if a manifest has been installed (has runtime fields)\n */\nexport function isInstalledManifest(\n manifest: AddonManifest,\n): manifest is Required<Pick<AddonManifest, 'main' | 'enabled' | 'installedAt'>> &\n AddonManifest {\n return !!(\n manifest.installedAt &&\n manifest.main !== undefined &&\n manifest.enabled !== undefined\n );\n}\n\n/**\n * Helper type for development manifests (without runtime fields)\n */\nexport type DevelopmentManifest = Omit<\n AddonManifest,\n 'installedAt' | 'updatedAt' | 'source' | 'size'\n>;\n\n/**\n * Helper type for installed manifests (with runtime fields)\n */\nexport type InstalledManifest = Required<\n Pick<AddonManifest, 'main' | 'enabled' | 'installedAt'>\n> &\n AddonManifest;\n\n/**\n * Addon file information\n */\nexport interface AddonFile {\n /** File name */\n name: string;\n /** File content */\n content: string;\n /** Whether this is the main entry point */\n is_main: boolean;\n /** File size in bytes */\n size?: number;\n}\n\n/**\n * Extracted addon package\n */\nexport interface ExtractedAddon {\n /** Addon metadata from manifest */\n metadata: AddonManifest;\n /** List of files in the addon package */\n files: AddonFile[];\n}\n\n/**\n * Installed addon information\n */\nexport interface InstalledAddon {\n /** Addon metadata */\n metadata: AddonManifest;\n /** Installation path */\n path?: string;\n /** Whether the addon is currently active */\n active?: boolean;\n}\n\n/**\n * Addon installation result\n */\nexport interface AddonInstallResult {\n /** Whether installation was successful */\n success: boolean;\n /** Error message if installation failed */\n error?: string;\n /** Installed addon metadata */\n addon?: AddonManifest;\n}\n\n/**\n * Addon validation result\n */\nexport interface AddonValidationResult {\n /** Whether the addon is valid */\n valid: boolean;\n /** List of validation errors */\n errors: string[];\n /** List of validation warnings */\n warnings: string[];\n}\n\n/**\n * Addon update information\n */\nexport interface AddonUpdateInfo {\n /** Current installed version */\n currentVersion: string;\n /** Latest available version */\n latestVersion: string;\n /** Whether an update is available */\n updateAvailable: boolean;\n /** Download URL for the update */\n downloadUrl?: string;\n /** Release notes for the latest version */\n releaseNotes?: string;\n /** Release date of the latest version */\n releaseDate?: string;\n /** Changelog URL */\n changelogUrl?: string;\n /** Whether this is a critical security update */\n isCritical?: boolean;\n /** Breaking changes in this update */\n hasBreakingChanges?: boolean;\n /** Minimum Wealthfolio version required for this update */\n minWealthfolioVersion?: string;\n}\n\n/**\n * Addon update check result\n */\nexport interface AddonUpdateCheckResult {\n /** Addon ID */\n addonId: string;\n /** Update information */\n updateInfo: AddonUpdateInfo;\n /** Any errors during update check */\n error?: string;\n}\n\n/**\n * Addon store listing\n */\nexport interface AddonStoreListing {\n /** Addon metadata */\n metadata: AddonManifest;\n /** Download URL */\n downloadUrl: string;\n /** Number of downloads */\n downloads?: number;\n /** Average rating */\n rating?: number;\n /** Number of reviews */\n reviewCount?: number;\n /** Whether it's verified by Wealthfolio team */\n verified?: boolean;\n /** Last update date */\n lastUpdated?: string;\n /** Screenshots or images */\n images?: string[];\n /** Release notes for the latest version */\n releaseNotes?: string;\n /** Changelog URL */\n changelogUrl?: string;\n}\n","{\n \"name\": \"@wealthfolio/addon-sdk\",\n \"version\": \"3.5.1\",\n \"type\": \"module\",\n \"description\": \"TypeScript SDK for building Wealthfolio addons with enhanced functionality and type safety\",\n \"main\": \"dist/index.js\",\n \"types\": \"dist/src/index.d.ts\",\n \"exports\": {\n \".\": {\n \"import\": \"./dist/index.js\",\n \"types\": \"./dist/src/index.d.ts\"\n },\n \"./types\": {\n \"import\": \"./dist/types.js\",\n \"types\": \"./dist/src/types.d.ts\"\n },\n \"./permissions\": {\n \"import\": \"./dist/permissions.js\",\n \"types\": \"./dist/src/permissions.d.ts\"\n }\n },\n \"files\": [\n \"dist\",\n \"README.md\",\n \"CHANGELOG.md\"\n ],\n \"keywords\": [\n \"wealthfolio\",\n \"addon\",\n \"plugin\",\n \"sdk\",\n \"typescript\",\n \"financial\",\n \"portfolio\"\n ],\n \"author\": \"Wealthfolio Team\",\n \"license\": \"MIT\",\n \"homepage\": \"https://wealthfolio.app/addons\",\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"https://github.com/wealthfolio/wealthfolio.git\",\n \"directory\": \"packages/addon-sdk\"\n },\n \"bugs\": {\n \"url\": \"https://github.com/wealthfolio/wealthfolio/issues\"\n },\n \"scripts\": {\n \"build\": \"tsup && pnpm run build:types\",\n \"dev\": \"tsup --watch\",\n \"clean\": \"rm -rf dist\",\n \"lint\": \"eslint .\",\n \"lint:fix\": \"eslint . --fix\",\n \"lint:quiet\": \"eslint . --quiet\",\n \"format\": \"prettier --write .\",\n \"format:check\": \"prettier --check .\",\n \"type-check\": \"tsc --noEmit\",\n \"build:types\": \"tsc -p tsconfig.json\",\n \"prepack\": \"npm run build\"\n },\n \"peerDependencies\": {\n \"react\": \"^19.2.4\",\n \"react-dom\": \"^19.2.4\"\n },\n \"devDependencies\": {\n \"@tanstack/react-query\": \"^5.90.20\",\n \"@types/react\": \"^19.2.13\",\n \"@types/react-dom\": \"^19.2.3\",\n \"tsup\": \"^8.5.1\",\n \"typescript\": \"^5.9.3\"\n },\n \"engines\": {\n \"node\": \">=20.0.0\"\n }\n}\n","import packageJson from '../package.json';\n\n/**\n * Current SDK version from package.json\n */\nexport const SDK_VERSION = packageJson.version;\n","/**\n * Utility functions for addon development\n */\n\nimport type { AddonManifest, AddonValidationResult } from './manifest';\nimport { SDK_VERSION } from './version';\n\n/**\n * Validates an addon manifest\n */\nexport function validateManifest(manifest: AddonManifest): AddonValidationResult {\n const errors: string[] = [];\n const warnings: string[] = [];\n\n // Required fields\n if (!manifest.id) {\n errors.push('Addon ID is required');\n } else if (!/^[a-z0-9-]+$/.test(manifest.id)) {\n errors.push('Addon ID must contain only lowercase letters, numbers, and hyphens');\n }\n\n if (!manifest.name) {\n errors.push('Addon name is required');\n }\n\n if (!manifest.version) {\n errors.push('Addon version is required');\n } else if (!/^\\d+\\.\\d+\\.\\d+/.test(manifest.version)) {\n warnings.push('Version should follow semantic versioning (e.g., 1.0.0)');\n }\n\n // Optional but recommended fields\n if (!manifest.description) {\n warnings.push('Description is recommended for better discoverability');\n }\n\n if (!manifest.author) {\n warnings.push('Author information is recommended');\n }\n\n if (!manifest.main) {\n warnings.push('Main entry point not specified, defaulting to \"addon.js\"');\n }\n\n // Validate permissions if present\n if (manifest.permissions) {\n manifest.permissions.forEach((permission, index) => {\n if (!permission.category) {\n errors.push(`Permission ${index}: category is required`);\n }\n if (!permission.functions || permission.functions.length === 0) {\n errors.push(`Permission ${index}: at least one function must be specified`);\n }\n if (!permission.purpose) {\n warnings.push(`Permission ${index}: purpose explanation is recommended`);\n }\n });\n }\n\n return {\n valid: errors.length === 0,\n errors,\n warnings,\n };\n}\n\n/**\n * Checks if an addon version is compatible with the current SDK\n */\nexport function isCompatibleVersion(\n addonSdkVersion?: string,\n currentSdkVersion = SDK_VERSION,\n): boolean {\n if (!addonSdkVersion) return true; // Assume compatible if not specified\n\n const [addonMajor, addonMinor] = addonSdkVersion.split('.').map(Number);\n const [currentMajor, currentMinor] = currentSdkVersion.split('.').map(Number);\n\n // Same major version, and addon minor version <= current minor version\n return addonMajor === currentMajor && addonMinor <= currentMinor;\n}\n\n/**\n * Formats addon size in human-readable format\n */\nexport function formatAddonSize(bytes: number): string {\n const sizes = ['B', 'KB', 'MB', 'GB'];\n if (bytes === 0) return '0 B';\n\n const i = Math.floor(Math.log(bytes) / Math.log(1024));\n const size = bytes / Math.pow(1024, i);\n\n return `${size.toFixed(i === 0 ? 0 : 1)} ${sizes[i]}`;\n}\n\n/**\n * Generates a unique addon ID from a name\n */\nexport function generateAddonId(name: string): string {\n return name\n .toLowerCase()\n .replace(/[^a-z0-9\\s-]/g, '') // Remove special characters\n .replace(/\\s+/g, '-') // Replace spaces with hyphens\n .replace(/-+/g, '-') // Replace multiple hyphens with single\n .replace(/^-|-$/g, ''); // Remove leading/trailing hyphens\n}\n\n/**\n * Type guard to check if an object is a valid addon manifest\n */\nexport function isAddonManifest(obj: unknown): obj is AddonManifest {\n return (\n typeof obj === 'object' &&\n obj !== null &&\n typeof (obj as Record<string, unknown>).id === 'string' &&\n typeof (obj as Record<string, unknown>).name === 'string' &&\n typeof (obj as Record<string, unknown>).version === 'string'\n );\n}\n","import type { Goal, GoalAllocation, AccountValuation, GoalProgress } from './data-types';\n\nfunction isParticipatingGoal(goal: Goal): boolean {\n if (goal.statusLifecycle) {\n return goal.statusLifecycle === 'active';\n }\n\n return true;\n}\n\nfunction getFiniteAmount(value: unknown): number | undefined {\n if (value === null || value === undefined || value === '') {\n return undefined;\n }\n\n const amount = typeof value === 'number' ? value : Number(value);\n return Number.isFinite(amount) ? amount : undefined;\n}\n\nfunction toFiniteAmount(value: unknown): number {\n return getFiniteAmount(value) ?? 0;\n}\n\n/**\n * Calculate goal progress from goal summaries, falling back to allocations.\n */\nexport function calculateGoalProgress(\n accountsValuations: AccountValuation[],\n goals: Goal[],\n allocations: GoalAllocation[],\n): GoalProgress[] {\n if (!goals) {\n return [];\n }\n\n const baseCurrency = accountsValuations?.[0]?.baseCurrency ?? 'USD';\n\n // accountId -> totalValue in base currency\n const accountValueMap = new Map<string, number>();\n accountsValuations?.forEach((account) => {\n const valueInBaseCurrency = account.totalValueBase ?? 0;\n accountValueMap.set(account.accountId, valueInBaseCurrency);\n });\n\n // goalId -> allocations\n const allocationsByGoal = new Map<string, GoalAllocation[]>();\n allocations?.forEach((alloc) => {\n const existing = allocationsByGoal.get(alloc.goalId) ?? [];\n allocationsByGoal.set(alloc.goalId, [...existing, alloc]);\n });\n\n const sortedGoals = [...goals]\n .filter(isParticipatingGoal)\n .sort(\n (a, b) =>\n toFiniteAmount(a.summaryTargetAmount ?? a.targetAmount) -\n toFiniteAmount(b.summaryTargetAmount ?? b.targetAmount),\n );\n\n return sortedGoals.map((goal) => {\n const goalAllocations = allocationsByGoal.get(goal.id) ?? [];\n const targetAmount = toFiniteAmount(goal.summaryTargetAmount ?? goal.targetAmount);\n\n const totalAllocatedValue = goalAllocations.reduce((total, allocation) => {\n const accountValueInBase = accountValueMap.get(allocation.accountId) ?? 0;\n return total + (accountValueInBase * allocation.sharePercent) / 100;\n }, 0);\n\n const currentValue = getFiniteAmount(goal.summaryCurrentValue) ?? totalAllocatedValue;\n const progress =\n getFiniteAmount(goal.summaryProgress) ??\n (targetAmount > 0 ? currentValue / targetAmount : 0);\n\n return {\n goalId: goal.id,\n name: goal.title,\n targetValue: targetAmount,\n currentValue,\n progress,\n currency: goal.currency ?? baseCurrency,\n statusHealth: goal.statusHealth,\n targetDate: goal.targetDate,\n };\n });\n}\n","/**\n * @wealthfolio/addon-sdk\n *\n * TypeScript SDK for building Wealthfolio addons with enhanced functionality,\n * type safety, and comprehensive permission management.\n *\n * @version 1.0.0\n * @author Wealthfolio Team\n * @license MIT\n */\n\n// Core types\nexport type {\n AddonContext,\n AddonEnableFunction,\n EventCallback,\n RouteConfig,\n RouterManager,\n SidebarItemConfig,\n SidebarItemHandle,\n SidebarManager,\n UnlistenFn,\n} from './types';\n\n// Host API interface\nexport type {\n ActivitySearchFilters,\n ActivitySort,\n HostAPI,\n SnapshotsAPI,\n ToastAPI,\n DividendEvent,\n FetchDividendsOptions,\n} from './host-api';\n\n// Query Client and Keys exports\nexport type { QueryClient } from '@tanstack/react-query';\nexport { QueryKeys } from './query-keys';\n\n// Comprehensive data types\nexport type * from './data-types';\n\n// Manifest and metadata types\nexport type {\n AddonFile,\n AddonInstallResult,\n AddonManifest,\n AddonStoreListing,\n AddonUpdateCheckResult,\n AddonUpdateInfo,\n AddonValidationResult,\n DevelopmentManifest,\n ExtractedAddon,\n InstalledAddon,\n InstalledManifest,\n} from './manifest';\n\nexport { isInstalledManifest } from './manifest';\n\n// Permission system\nexport type {\n FunctionPermission,\n Permission,\n PermissionCategory,\n RiskLevel,\n} from './permissions';\n\nexport {\n getFunctionRiskLevel,\n getPermissionCategoriesByRisk,\n getPermissionCategory,\n isPermissionRequired,\n PERMISSION_CATEGORIES,\n} from './permissions';\n\n// Utilities\nexport {\n formatAddonSize,\n generateAddonId,\n isAddonManifest,\n isCompatibleVersion,\n validateManifest,\n} from './utils';\n\n// Goal progress calculation\nexport { calculateGoalProgress } from './goal-progress';\n\n// -----------------------------------------------------------------------------\n// Framework version contract\n// -----------------------------------------------------------------------------\n\n/**\n * React version guaranteed by the host application. Addons may assert against\n * this at runtime if they rely on a particular React feature set.\n */\nexport const ReactVersion = '19.1.1';\n\n/**\n * Addons receive their context as a parameter to the enable() function.\n * Each addon gets its own isolated context with scoped secret storage.\n *\n * Example:\n * export default function enable(ctx: AddonContext) {\n * // Use ctx.api.secrets.set/get/delete for secure storage\n * // Use ctx.sidebar.addItem() to add navigation\n * // Use ctx.router.add() to register routes\n * }\n */\n\ninterface HostGlobals {\n React: typeof import('react');\n ReactDOM: typeof import('react-dom');\n}\nconst hostGlobals = window as unknown as Partial<HostGlobals>;\nexport const React = hostGlobals.React!;\nexport const ReactDOM = hostGlobals.ReactDOM!;\n\n// Version\nexport { SDK_VERSION } from './version';\n"],"mappings":";;;;;;;;;AAIO,IAAM,YAAY;AAAA;AAAA,EAEvB,UAAU;AAAA,EACV,kBAAkB;AAAA;AAAA,EAGlB,eAAe;AAAA,EACf,YAAY;AAAA;AAAA,EAGZ,UAAU;AAAA,EACV,SAAS;AAAA,EACT,gBAAgB;AAAA,EAChB,mBAAmB;AAAA,EACnB,eAAe;AAAA;AAAA,EAGf,OAAO;AAAA,EACP,mBAAmB;AAAA;AAAA,EAGnB,UAAU;AAAA,EACV,gBAAgB;AAAA;AAAA,EAGhB,uBAAuB;AAAA,EACvB,OAAO;AAAA,EAEP,qBAAqB;AAAA,EACrB,6BAA6B;AAAA,EAE7B,YAAY;AAAA,EACZ,gBAAgB;AAAA,EAEhB,qBAAqB;AAAA,EACrB,qBAAqB;AAAA,EAErB,mBAAmB;AAAA;AAAA,EAEnB,kBAAkB,CAAC,OAAe,CAAC,UAAU,mBAAmB,EAAE;AAAA;AAAA,EAGlE,6BAA6B;AAAA,EAC7B,2BAA2B,CAAC,eAAyB;AAAA,IACnD,UAAU;AAAA,IACV,CAAC,GAAG,UAAU,EAAE,KAAK,EAAE,KAAK,GAAG,KAAK;AAAA,EACtC;AAAA;AAAA,EAGA,uBAAuB;A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O,QAAS,qBAAqB,WAAW,eAAgB;AAAA,IAClE,GAAG,CAAC;AAEJ,UAAM,eAAe,gBAAgB,KAAK,mBAAmB,KAAK;AAClE,UAAM,WACJ,gBAAgB,KAAK,eAAe,MACnC,eAAe,IAAI,eAAe,eAAe;AAEpD,WAAO;AAAA,MACL,QAAQ,KAAK;AAAA,MACb,MAAM,KAAK;AAAA,MACX,aAAa;AAAA,MACb;AAAA,MACA;AAAA,MACA,UAAU,KAAK,YAAY;AAAA,MAC3B,cAAc,KAAK;AAAA,MACnB,YAAY,KAAK;AAAA,IACnB;AAAA,EACF,CAAC;AACH;;;ACWO,IAAM,eAAe;AAkB5B,IAAM,cAAc;AACb,IAAM,QAAQ,YAAY;AAC1B,IAAM,WAAW,YAAY;","names":[]}
|
package/dist/permissions.js
CHANGED
package/dist/src/data-types.d.ts
CHANGED
|
@@ -82,6 +82,7 @@ export type DataSource = (typeof DataSource)[keyof typeof DataSource];
|
|
|
82
82
|
export declare const AccountType: {
|
|
83
83
|
readonly SECURITIES: "SECURITIES";
|
|
84
84
|
readonly CASH: "CASH";
|
|
85
|
+
readonly CREDIT_CARD: "CREDIT_CARD";
|
|
85
86
|
readonly CRYPTOCURRENCY: "CRYPTOCURRENCY";
|
|
86
87
|
};
|
|
87
88
|
export type AccountType = (typeof AccountType)[keyof typeof AccountType];
|
|
@@ -189,14 +190,20 @@ export interface ActivitySearchResponse {
|
|
|
189
190
|
totalRowCount: number;
|
|
190
191
|
};
|
|
191
192
|
}
|
|
192
|
-
export interface
|
|
193
|
+
export interface AssetResolutionInput {
|
|
193
194
|
id?: string;
|
|
194
195
|
symbol?: string;
|
|
195
196
|
exchangeMic?: string;
|
|
196
197
|
kind?: string;
|
|
197
198
|
name?: string;
|
|
198
199
|
quoteMode?: QuoteMode;
|
|
200
|
+
quoteCcy?: string;
|
|
201
|
+
instrumentType?: string;
|
|
202
|
+
providerId?: string;
|
|
203
|
+
providerSymbol?: string;
|
|
199
204
|
}
|
|
205
|
+
/** @deprecated Use AssetResolutionInput. */
|
|
206
|
+
export type SymbolInput = AssetResolutionInput;
|
|
200
207
|
export interface ActivityCreate {
|
|
201
208
|
id?: string;
|
|
202
209
|
accountId: string;
|
|
@@ -204,7 +211,9 @@ export interface ActivityCreate {
|
|
|
204
211
|
subtype?: string | null;
|
|
205
212
|
activityDate: string | Date;
|
|
206
213
|
sourceGroupId?: string;
|
|
207
|
-
|
|
214
|
+
asset?: AssetResolutionInput;
|
|
215
|
+
/** @deprecated Use asset. */
|
|
216
|
+
symbol?: AssetResolutionInput;
|
|
208
217
|
quantity?: string | number | null;
|
|
209
218
|
unitPrice?: string | number | null;
|
|
210
219
|
amount?: string | number | null;
|
|
@@ -221,7 +230,9 @@ export interface ActivityUpdate {
|
|
|
221
230
|
subtype?: string | null;
|
|
222
231
|
activityDate: string | Date;
|
|
223
232
|
sourceGroupId?: string;
|
|
224
|
-
|
|
233
|
+
asset?: AssetResolutionInput;
|
|
234
|
+
/** @deprecated Use asset. */
|
|
235
|
+
symbol?: AssetResolutionInput;
|
|
225
236
|
quantity?: string | number | null;
|
|
226
237
|
unitPrice?: string | number | null;
|
|
227
238
|
amount?: string | number | null;
|
|
@@ -260,6 +271,7 @@ export interface ActivityImport {
|
|
|
260
271
|
subtype?: string;
|
|
261
272
|
date?: Date | string;
|
|
262
273
|
symbol?: string;
|
|
274
|
+
assetId?: string;
|
|
263
275
|
amount?: number | string | null;
|
|
264
276
|
quantity?: number | string | null;
|
|
265
277
|
unitPrice?: number | string | null;
|
|
@@ -275,6 +287,10 @@ export interface ActivityImport {
|
|
|
275
287
|
instrumentType?: string;
|
|
276
288
|
/** Resolved quote mode hint (e.g., MANUAL, MARKET) */
|
|
277
289
|
quoteMode?: string;
|
|
290
|
+
/** Market data provider that resolved this import row, if selected. */
|
|
291
|
+
providerId?: string;
|
|
292
|
+
/** Provider-native symbol/code selected by search/import. */
|
|
293
|
+
providerSymbol?: string;
|
|
278
294
|
errors?: Record<string, string[]>;
|
|
279
295
|
warnings?: Record<string, string[]>;
|
|
280
296
|
duplicateOfId?: string;
|
|
@@ -282,6 +298,7 @@ export interface ActivityImport {
|
|
|
282
298
|
isValid: boolean;
|
|
283
299
|
lineNumber?: number;
|
|
284
300
|
isDraft: boolean;
|
|
301
|
+
forceImport?: boolean;
|
|
285
302
|
comment?: string;
|
|
286
303
|
}
|
|
287
304
|
export interface ImportActivitiesSummary {
|
|
@@ -308,6 +325,14 @@ export interface SymbolSearchResult {
|
|
|
308
325
|
exchange: string;
|
|
309
326
|
/** Canonical exchange MIC code (e.g., "XNAS", "XTSE") */
|
|
310
327
|
exchangeMic?: string;
|
|
328
|
+
/** Canonical asset symbol used for persistence (e.g., "SHOP" for "SHOP.TO") */
|
|
329
|
+
canonicalSymbol?: string;
|
|
330
|
+
/** Canonical exchange MIC used for persistence */
|
|
331
|
+
canonicalExchangeMic?: string;
|
|
332
|
+
/** Market data provider that returned or resolved this symbol */
|
|
333
|
+
providerId?: string;
|
|
334
|
+
/** Provider-native symbol/code (e.g., Yahoo "BRK-B") */
|
|
335
|
+
providerSymbol?: string;
|
|
311
336
|
/** Friendly exchange name (e.g., "NASDAQ" instead of "NMS" or "XNAS") */
|
|
312
337
|
exchangeName?: string;
|
|
313
338
|
/** Currency derived from exchange (e.g., "USD", "CAD") */
|
|
@@ -443,6 +468,10 @@ export interface Holding {
|
|
|
443
468
|
realizedGainPct?: number | null;
|
|
444
469
|
totalGain?: MonetaryValue | null;
|
|
445
470
|
totalGainPct?: number | null;
|
|
471
|
+
income?: MonetaryValue | null;
|
|
472
|
+
totalReturn?: MonetaryValue | null;
|
|
473
|
+
totalReturnPct?: number | null;
|
|
474
|
+
returnBasis?: MonetaryValue | null;
|
|
446
475
|
dayChange?: MonetaryValue | null;
|
|
447
476
|
dayChangePct?: number | null;
|
|
448
477
|
prevCloseValue?: MonetaryValue | null;
|
|
@@ -501,6 +530,7 @@ export interface Settings {
|
|
|
501
530
|
theme: string;
|
|
502
531
|
font: string;
|
|
503
532
|
baseCurrency: string;
|
|
533
|
+
defaultReturnMetric: 'twr' | 'irr' | 'valueReturn';
|
|
504
534
|
timezone?: string;
|
|
505
535
|
instanceId: string;
|
|
506
536
|
onboardingCompleted: boolean;
|
|
@@ -508,26 +538,47 @@ export interface Settings {
|
|
|
508
538
|
menuBarVisible: boolean;
|
|
509
539
|
syncEnabled: boolean;
|
|
510
540
|
}
|
|
541
|
+
export type GoalType = 'retirement' | 'education' | 'wedding' | 'home' | 'car' | 'custom_save_up';
|
|
542
|
+
export type GoalLifecycle = 'active' | 'achieved' | 'archived';
|
|
543
|
+
export type GoalHealth = 'on_track' | 'at_risk' | 'off_track' | 'not_applicable';
|
|
511
544
|
export interface Goal {
|
|
512
545
|
id: string;
|
|
546
|
+
goalType?: GoalType;
|
|
513
547
|
title: string;
|
|
514
548
|
description?: string;
|
|
515
549
|
targetAmount: number;
|
|
516
|
-
|
|
550
|
+
statusLifecycle?: GoalLifecycle;
|
|
551
|
+
statusHealth?: GoalHealth;
|
|
552
|
+
priority?: number;
|
|
553
|
+
coverImageKey?: string;
|
|
554
|
+
currency?: string;
|
|
555
|
+
startDate?: string;
|
|
556
|
+
targetDate?: string;
|
|
557
|
+
summaryCurrentValue?: number;
|
|
558
|
+
summaryProgress?: number;
|
|
559
|
+
projectedCompletionDate?: string;
|
|
560
|
+
projectedValueAtTargetDate?: number;
|
|
561
|
+
summaryTargetAmount?: number;
|
|
562
|
+
createdAt?: string;
|
|
563
|
+
updatedAt?: string;
|
|
517
564
|
allocations?: GoalAllocation[];
|
|
518
565
|
}
|
|
519
566
|
export interface GoalAllocation {
|
|
520
567
|
id: string;
|
|
521
568
|
goalId: string;
|
|
522
569
|
accountId: string;
|
|
523
|
-
|
|
570
|
+
sharePercent: number;
|
|
571
|
+
taxBucket?: string;
|
|
524
572
|
}
|
|
525
573
|
export interface GoalProgress {
|
|
574
|
+
goalId: string;
|
|
526
575
|
name: string;
|
|
527
576
|
targetValue: number;
|
|
528
577
|
currentValue: number;
|
|
529
578
|
progress: number;
|
|
530
579
|
currency: string;
|
|
580
|
+
statusHealth?: GoalHealth;
|
|
581
|
+
targetDate?: string;
|
|
531
582
|
}
|
|
532
583
|
export interface IncomeByAsset {
|
|
533
584
|
assetId: string;
|
|
@@ -564,6 +615,15 @@ export interface AccountValuation {
|
|
|
564
615
|
totalValue: number;
|
|
565
616
|
costBasis: number;
|
|
566
617
|
netContribution: number;
|
|
618
|
+
cashBalanceBase: number;
|
|
619
|
+
investmentMarketValueBase: number;
|
|
620
|
+
totalValueBase: number;
|
|
621
|
+
costBasisBase: number;
|
|
622
|
+
netContributionBase: number;
|
|
623
|
+
externalInflowBase: number;
|
|
624
|
+
externalOutflowBase: number;
|
|
625
|
+
externalFlowSource: 'UNKNOWN' | 'ACTIVITY_DERIVED' | 'STORED_GROSS' | 'NET_CONTRIBUTION_FALLBACK' | 'MIXED';
|
|
626
|
+
performanceEligibleValueBase: number;
|
|
567
627
|
calculatedAt: string;
|
|
568
628
|
}
|
|
569
629
|
export interface AccountSummaryView {
|
|
@@ -575,9 +635,9 @@ export interface AccountSummaryView {
|
|
|
575
635
|
totalValueAccountCurrency: number;
|
|
576
636
|
totalValueBaseCurrency: number;
|
|
577
637
|
baseCurrency: string;
|
|
578
|
-
performance:
|
|
638
|
+
performance: SimplePerformanceResult;
|
|
579
639
|
}
|
|
580
|
-
export interface
|
|
640
|
+
export interface SimplePerformanceResult {
|
|
581
641
|
accountId: string;
|
|
582
642
|
totalValue?: number | null;
|
|
583
643
|
accountCurrency?: string | null;
|
|
@@ -585,16 +645,16 @@ export interface SimplePerformanceMetrics {
|
|
|
585
645
|
fxRateToBase?: number | null;
|
|
586
646
|
totalGainLossAmount?: number | null;
|
|
587
647
|
cumulativeReturnPercent?: number | null;
|
|
588
|
-
dayGainLossAmount?: number | null;
|
|
589
|
-
dayReturnPercentModDietz?: number | null;
|
|
590
648
|
portfolioWeight?: number | null;
|
|
591
649
|
}
|
|
650
|
+
/** @deprecated Use SimplePerformanceResult. */
|
|
651
|
+
export type SimplePerformanceMetrics = SimplePerformanceResult;
|
|
592
652
|
export interface AccountGroup {
|
|
593
653
|
groupName: string;
|
|
594
654
|
accounts: AccountSummaryView[];
|
|
595
655
|
totalValueBaseCurrency: number;
|
|
596
656
|
baseCurrency: string;
|
|
597
|
-
performance:
|
|
657
|
+
performance: SimplePerformanceResult;
|
|
598
658
|
accountCount: number;
|
|
599
659
|
}
|
|
600
660
|
export interface ExchangeRate {
|
|
@@ -635,32 +695,62 @@ export interface ReturnData {
|
|
|
635
695
|
date: string;
|
|
636
696
|
value: number;
|
|
637
697
|
}
|
|
638
|
-
export interface
|
|
698
|
+
export interface PerformanceResult {
|
|
699
|
+
scope: PerformanceScopeDescriptor;
|
|
700
|
+
period: PerformancePeriod;
|
|
701
|
+
mode: ReturnMethod;
|
|
702
|
+
returns: PerformanceReturns;
|
|
703
|
+
attribution: PerformanceAttribution;
|
|
704
|
+
risk: PerformanceRisk;
|
|
705
|
+
dataQuality: PerformanceDataQuality;
|
|
706
|
+
series: ReturnData[];
|
|
707
|
+
isHoldingsMode?: boolean;
|
|
708
|
+
isMixedTrackingMode?: boolean;
|
|
709
|
+
}
|
|
710
|
+
/** @deprecated Use PerformanceResult. */
|
|
711
|
+
export type PerformanceMetrics = PerformanceResult;
|
|
712
|
+
export interface PerformanceScopeDescriptor {
|
|
639
713
|
id: string;
|
|
640
|
-
returns: ReturnData[];
|
|
641
|
-
periodStartDate?: string | null;
|
|
642
|
-
periodEndDate?: string | null;
|
|
643
714
|
currency: string;
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
/** Annualized TWR (null for HOLDINGS mode) */
|
|
715
|
+
}
|
|
716
|
+
export interface PerformancePeriod {
|
|
717
|
+
startDate?: string | null;
|
|
718
|
+
endDate?: string | null;
|
|
719
|
+
}
|
|
720
|
+
export type ReturnMethod = 'timeWeighted' | 'valueReturn' | 'symbolPriceBased' | 'notApplicable';
|
|
721
|
+
export interface PerformanceReturns {
|
|
722
|
+
twr?: number | null;
|
|
653
723
|
annualizedTwr?: number | null;
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
/**
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
724
|
+
/** Selected-period money-weighted return derived from annualized XIRR. */
|
|
725
|
+
irr?: number | null;
|
|
726
|
+
/** Annualized XIRR using dated cash flows. */
|
|
727
|
+
annualizedIrr?: number | null;
|
|
728
|
+
valueReturn?: number | null;
|
|
729
|
+
annualizedValueReturn?: number | null;
|
|
730
|
+
}
|
|
731
|
+
export interface PerformanceAttribution {
|
|
732
|
+
contributions: number;
|
|
733
|
+
distributions: number;
|
|
734
|
+
income: number;
|
|
735
|
+
realizedPnl: number;
|
|
736
|
+
unrealizedPnlChange: number;
|
|
737
|
+
fxEffect: number;
|
|
738
|
+
fees: number;
|
|
739
|
+
taxes: number;
|
|
740
|
+
residual: number;
|
|
741
|
+
}
|
|
742
|
+
export interface PerformanceRisk {
|
|
743
|
+
volatility?: number | null;
|
|
744
|
+
maxDrawdown?: number | null;
|
|
745
|
+
peakDate?: string | null;
|
|
746
|
+
troughDate?: string | null;
|
|
747
|
+
recoveryDate?: string | null;
|
|
748
|
+
drawdownDurationDays?: number | null;
|
|
749
|
+
}
|
|
750
|
+
export interface PerformanceDataQuality {
|
|
751
|
+
status: 'ok' | 'partial' | 'noData' | 'notApplicable';
|
|
752
|
+
warnings?: string[];
|
|
753
|
+
notApplicableReasons?: string[];
|
|
664
754
|
}
|
|
665
755
|
export interface UpdateAssetProfile {
|
|
666
756
|
id: string;
|
|
@@ -735,6 +825,10 @@ export interface SnapshotHoldingInput {
|
|
|
735
825
|
currency: string;
|
|
736
826
|
averageCost?: string;
|
|
737
827
|
exchangeMic?: string;
|
|
828
|
+
quoteCcy?: string;
|
|
829
|
+
instrumentType?: string;
|
|
830
|
+
providerId?: string;
|
|
831
|
+
providerSymbol?: string;
|
|
738
832
|
name?: string;
|
|
739
833
|
dataSource?: string;
|
|
740
834
|
assetKind?: string;
|
|
@@ -745,6 +839,10 @@ export interface SnapshotPositionInput {
|
|
|
745
839
|
avgCost?: string;
|
|
746
840
|
currency: string;
|
|
747
841
|
exchangeMic?: string;
|
|
842
|
+
quoteCcy?: string;
|
|
843
|
+
instrumentType?: string;
|
|
844
|
+
providerId?: string;
|
|
845
|
+
providerSymbol?: string;
|
|
748
846
|
}
|
|
749
847
|
export interface SnapshotInput {
|
|
750
848
|
date: string;
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import type { Goal, GoalAllocation, AccountValuation, GoalProgress } from './data-types';
|
|
2
2
|
/**
|
|
3
|
-
* Calculate goal progress
|
|
4
|
-
* Converts account values to base currency, applies percent allocation per account,
|
|
5
|
-
* and computes progress ratio (0–1+) against target amount.
|
|
3
|
+
* Calculate goal progress from goal summaries, falling back to allocations.
|
|
6
4
|
*/
|
|
7
5
|
export declare function calculateGoalProgress(accountsValuations: AccountValuation[], goals: Goal[], allocations: GoalAllocation[]): GoalProgress[];
|
package/dist/src/host-api.d.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Provides comprehensive access to Wealthfolio functionality organized by domain
|
|
4
4
|
*/
|
|
5
5
|
import type { EventCallback, UnlistenFn } from './types';
|
|
6
|
-
import type { Account, Activity, ActivityBulkMutationRequest, ActivityBulkMutationResult, ActivityCreate, ActivityDetails, ActivityImport, ActivitySearchResponse, ActivityUpdate, AccountValuation, CheckSnapshotImportResult, ImportActivitiesResult, Asset, ContributionLimit, DepositsCalculation, ExchangeRate, Goal, GoalAllocation, Holding, ImportMappingData, IncomeSummary, MarketDataProviderInfo, NewContributionLimit,
|
|
6
|
+
import type { Account, Activity, ActivityBulkMutationRequest, ActivityBulkMutationResult, ActivityCreate, ActivityDetails, ActivityImport, ActivitySearchResponse, ActivityUpdate, AccountValuation, CheckSnapshotImportResult, ImportActivitiesResult, Asset, ContributionLimit, DepositsCalculation, ExchangeRate, Goal, GoalAllocation, Holding, ImportMappingData, IncomeSummary, MarketDataProviderInfo, NewContributionLimit, PerformanceResult, Quote, Settings, SimplePerformanceResult, SnapshotHoldingInput, SnapshotImportResult, SnapshotInfo, SnapshotInput, SymbolSearchResult, UpdateAssetProfile } from './data-types';
|
|
7
7
|
export interface ActivitySearchFilters {
|
|
8
8
|
accountIds?: string | string[];
|
|
9
9
|
activityTypes?: string | string[];
|
|
@@ -141,12 +141,20 @@ export interface ActivitiesAPI {
|
|
|
141
141
|
saveImportMapping(mapping: ImportMappingData): Promise<ImportMappingData>;
|
|
142
142
|
}
|
|
143
143
|
/**
|
|
144
|
-
* A
|
|
144
|
+
* A cash dividend event returned by a market data provider.
|
|
145
145
|
*/
|
|
146
|
-
export interface
|
|
146
|
+
export interface DividendEvent {
|
|
147
147
|
amount: number;
|
|
148
148
|
date: number;
|
|
149
149
|
}
|
|
150
|
+
export interface FetchDividendsOptions {
|
|
151
|
+
exchangeMic?: string;
|
|
152
|
+
instrumentType?: string;
|
|
153
|
+
quoteCcy?: string;
|
|
154
|
+
providerId?: string;
|
|
155
|
+
startDate?: string;
|
|
156
|
+
endDate?: string;
|
|
157
|
+
}
|
|
150
158
|
/**
|
|
151
159
|
* Market data and asset APIs
|
|
152
160
|
*/
|
|
@@ -176,11 +184,11 @@ export interface MarketDataAPI {
|
|
|
176
184
|
*/
|
|
177
185
|
getProviders(): Promise<MarketDataProviderInfo[]>;
|
|
178
186
|
/**
|
|
179
|
-
* Fetch dividend history for a symbol
|
|
187
|
+
* Fetch dividend history for a symbol.
|
|
180
188
|
* @param symbol Ticker symbol
|
|
181
189
|
* @returns Promise resolving to array of dividend events
|
|
182
190
|
*/
|
|
183
|
-
fetchDividends(symbol: string): Promise<
|
|
191
|
+
fetchDividends(symbol: string, options?: FetchDividendsOptions): Promise<DividendEvent[]>;
|
|
184
192
|
}
|
|
185
193
|
/**
|
|
186
194
|
* Asset management APIs
|
|
@@ -236,7 +244,7 @@ export interface PerformanceAPI {
|
|
|
236
244
|
* @param endDate End date for calculation
|
|
237
245
|
* @returns Promise resolving to performance metrics
|
|
238
246
|
*/
|
|
239
|
-
calculateHistory(itemType: 'account' | 'symbol', itemId: string, startDate
|
|
247
|
+
calculateHistory(itemType: 'account' | 'symbol', itemId: string, startDate?: string, endDate?: string): Promise<PerformanceResult>;
|
|
240
248
|
/**
|
|
241
249
|
* Calculate performance summary
|
|
242
250
|
* @param args Performance calculation arguments
|
|
@@ -247,13 +255,13 @@ export interface PerformanceAPI {
|
|
|
247
255
|
itemId: string;
|
|
248
256
|
startDate?: string | null;
|
|
249
257
|
endDate?: string | null;
|
|
250
|
-
}): Promise<
|
|
258
|
+
}): Promise<PerformanceResult>;
|
|
251
259
|
/**
|
|
252
260
|
* Calculate simple performance for multiple accounts
|
|
253
261
|
* @param accountIds Array of account identifiers
|
|
254
262
|
* @returns Promise resolving to array of simple performance metrics
|
|
255
263
|
*/
|
|
256
|
-
calculateAccountsSimple(accountIds: string[]): Promise<
|
|
264
|
+
calculateAccountsSimple(accountIds: string[]): Promise<SimplePerformanceResult[]>;
|
|
257
265
|
}
|
|
258
266
|
/**
|
|
259
267
|
* Exchange rates APIs
|
|
@@ -328,16 +336,31 @@ export interface GoalsAPI {
|
|
|
328
336
|
*/
|
|
329
337
|
update(goal: Goal): Promise<Goal>;
|
|
330
338
|
/**
|
|
331
|
-
*
|
|
332
|
-
* @param
|
|
333
|
-
* @returns Promise
|
|
339
|
+
* Get funding rules for a goal
|
|
340
|
+
* @param goalId Goal ID
|
|
341
|
+
* @returns Promise resolving to array of funding rules
|
|
334
342
|
*/
|
|
335
|
-
|
|
343
|
+
getFunding(goalId: string): Promise<GoalAllocation[]>;
|
|
336
344
|
/**
|
|
337
|
-
* Get
|
|
338
|
-
* @
|
|
345
|
+
* Get funding rules across all goals
|
|
346
|
+
* @deprecated Use getAll() and getFunding(goalId). This compatibility shim will be removed in a future major version.
|
|
347
|
+
* @returns Promise resolving to array of funding rules
|
|
339
348
|
*/
|
|
340
349
|
getAllocations(): Promise<GoalAllocation[]>;
|
|
350
|
+
/**
|
|
351
|
+
* Save funding rules for a goal
|
|
352
|
+
* @param goalId Goal ID
|
|
353
|
+
* @param rules Array of funding rule inputs
|
|
354
|
+
* @returns Promise resolving to saved rules
|
|
355
|
+
*/
|
|
356
|
+
saveFunding(goalId: string, rules: GoalAllocation[]): Promise<GoalAllocation[]>;
|
|
357
|
+
/**
|
|
358
|
+
* Save funding rules grouped by goalId
|
|
359
|
+
* @deprecated Use saveFunding(goalId, rules). This compatibility shim will be removed in a future major version.
|
|
360
|
+
* @param allocations Array of funding rules
|
|
361
|
+
* @returns Promise resolving when funding rules are saved
|
|
362
|
+
*/
|
|
363
|
+
updateAllocations(allocations: GoalAllocation[]): Promise<void>;
|
|
341
364
|
}
|
|
342
365
|
/**
|
|
343
366
|
* Application settings APIs
|
|
@@ -360,7 +383,6 @@ export interface SettingsAPI {
|
|
|
360
383
|
*/
|
|
361
384
|
backupDatabase(): Promise<{
|
|
362
385
|
filename: string;
|
|
363
|
-
data: Uint8Array;
|
|
364
386
|
}>;
|
|
365
387
|
}
|
|
366
388
|
/**
|
package/dist/src/index.d.ts
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* @license MIT
|
|
10
10
|
*/
|
|
11
11
|
export type { AddonContext, AddonEnableFunction, EventCallback, RouteConfig, RouterManager, SidebarItemConfig, SidebarItemHandle, SidebarManager, UnlistenFn, } from './types';
|
|
12
|
-
export type { ActivitySearchFilters, ActivitySort, HostAPI, SnapshotsAPI, ToastAPI,
|
|
12
|
+
export type { ActivitySearchFilters, ActivitySort, HostAPI, SnapshotsAPI, ToastAPI, DividendEvent, FetchDividendsOptions, } from './host-api';
|
|
13
13
|
export type { QueryClient } from '@tanstack/react-query';
|
|
14
14
|
export { QueryKeys } from './query-keys';
|
|
15
15
|
export type * from './data-types';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"fileNames":["../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2016.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2019.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2021.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.dom.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.dom.iterable.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.core.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2016.intl.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.date.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.object.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.string.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2019.array.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2019.object.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2019.string.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2019.intl.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.date.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.string.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.number.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2021.promise.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2021.string.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2021.intl.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.array.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.error.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.intl.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.object.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.string.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.regexp.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.decorators.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../../node_modules/.pnpm/@types+react@19.2.14/node_modules/@types/react/global.d.ts","../../../node_modules/.pnpm/csstype@3.2.3/node_modules/csstype/index.d.ts","../../../node_modules/.pnpm/@types+react@19.2.14/node_modules/@types/react/index.d.ts","../../../node_modules/.pnpm/@types+react@19.2.14/node_modules/@types/react/jsx-runtime.d.ts","../src/data-types.ts","../src/goal-progress.ts","../src/types.ts","../src/host-api.ts","../../../node_modules/.pnpm/@tanstack+query-core@5.90.20/node_modules/@tanstack/query-core/build/modern/subscribable.d.ts","../../../node_modules/.pnpm/@tanstack+query-core@5.90.20/node_modules/@tanstack/query-core/build/modern/focusmanager.d.ts","../../../node_modules/.pnpm/@tanstack+query-core@5.90.20/node_modules/@tanstack/query-core/build/modern/removable.d.ts","../../../node_modules/.pnpm/@tanstack+query-core@5.90.20/node_modules/@tanstack/query-core/build/modern/hydration-blevg2lp.d.ts","../../../node_modules/.pnpm/@tanstack+query-core@5.90.20/node_modules/@tanstack/query-core/build/modern/infinitequeryobserver.d.ts","../../../node_modules/.pnpm/@tanstack+query-core@5.90.20/node_modules/@tanstack/query-core/build/modern/notifymanager.d.ts","../../../node_modules/.pnpm/@tanstack+query-core@5.90.20/node_modules/@tanstack/query-core/build/modern/onlinemanager.d.ts","../../../node_modules/.pnpm/@tanstack+query-core@5.90.20/node_modules/@tanstack/query-core/build/modern/queriesobserver.d.ts","../../../node_modules/.pnpm/@tanstack+query-core@5.90.20/node_modules/@tanstack/query-core/build/modern/timeoutmanager.d.ts","../../../node_modules/.pnpm/@tanstack+query-core@5.90.20/node_modules/@tanstack/query-core/build/modern/streamedquery.d.ts","../../../node_modules/.pnpm/@tanstack+query-core@5.90.20/node_modules/@tanstack/query-core/build/modern/index.d.ts","../../../node_modules/.pnpm/@tanstack+react-query@5.90.21_react@19.2.4/node_modules/@tanstack/react-query/build/modern/types.d.ts","../../../node_modules/.pnpm/@tanstack+react-query@5.90.21_react@19.2.4/node_modules/@tanstack/react-query/build/modern/usequeries.d.ts","../../../node_modules/.pnpm/@tanstack+react-query@5.90.21_react@19.2.4/node_modules/@tanstack/react-query/build/modern/queryoptions.d.ts","../../../node_modules/.pnpm/@tanstack+react-query@5.90.21_react@19.2.4/node_modules/@tanstack/react-query/build/modern/usequery.d.ts","../../../node_modules/.pnpm/@tanstack+react-query@5.90.21_react@19.2.4/node_modules/@tanstack/react-query/build/modern/usesuspensequery.d.ts","../../../node_modules/.pnpm/@tanstack+react-query@5.90.21_react@19.2.4/node_modules/@tanstack/react-query/build/modern/usesuspenseinfinitequery.d.ts","../../../node_modules/.pnpm/@tanstack+react-query@5.90.21_react@19.2.4/node_modules/@tanstack/react-query/build/modern/usesuspensequeries.d.ts","../../../node_modules/.pnpm/@tanstack+react-query@5.90.21_react@19.2.4/node_modules/@tanstack/react-query/build/modern/useprefetchquery.d.ts","../../../node_modules/.pnpm/@tanstack+react-query@5.90.21_react@19.2.4/node_modules/@tanstack/react-query/build/modern/useprefetchinfinitequery.d.ts","../../../node_modules/.pnpm/@tanstack+react-query@5.90.21_react@19.2.4/node_modules/@tanstack/react-query/build/modern/infinitequeryoptions.d.ts","../../../node_modules/.pnpm/@tanstack+react-query@5.90.21_react@19.2.4/node_modules/@tanstack/react-query/build/modern/queryclientprovider.d.ts","../../../node_modules/.pnpm/@tanstack+react-query@5.90.21_react@19.2.4/node_modules/@tanstack/react-query/build/modern/queryerrorresetboundary.d.ts","../../../node_modules/.pnpm/@tanstack+react-query@5.90.21_react@19.2.4/node_modules/@tanstack/react-query/build/modern/hydrationboundary.d.ts","../../../node_modules/.pnpm/@tanstack+react-query@5.90.21_react@19.2.4/node_modules/@tanstack/react-query/build/modern/useisfetching.d.ts","../../../node_modules/.pnpm/@tanstack+react-query@5.90.21_react@19.2.4/node_modules/@tanstack/react-query/build/modern/usemutationstate.d.ts","../../../node_modules/.pnpm/@tanstack+react-query@5.90.21_react@19.2.4/node_modules/@tanstack/react-query/build/modern/usemutation.d.ts","../../../node_modules/.pnpm/@tanstack+react-query@5.90.21_react@19.2.4/node_modules/@tanstack/react-query/build/modern/mutationoptions.d.ts","../../../node_modules/.pnpm/@tanstack+react-query@5.90.21_react@19.2.4/node_modules/@tanstack/react-query/build/modern/useinfinitequery.d.ts","../../../node_modules/.pnpm/@tanstack+react-query@5.90.21_react@19.2.4/node_modules/@tanstack/react-query/build/modern/isrestoringprovider.d.ts","../../../node_modules/.pnpm/@tanstack+react-query@5.90.21_react@19.2.4/node_modules/@tanstack/react-query/build/modern/index.d.ts","../src/query-keys.ts","../src/permissions.ts","../src/manifest.ts","../package.json","../src/version.ts","../src/utils.ts","../../../node_modules/.pnpm/@types+react-dom@19.2.3_@types+react@19.2.14/node_modules/@types/react-dom/index.d.ts","../src/index.ts"],"fileIdsList":[[68],[68,70],[68,69,70,71,72,73,74,75,76,77],[68,70,71],[62,78],[62,63,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97],[78,79],[62],[62,63],[78],[78,79,88],[78,79,81],[60,61],[63],[63,64],[63,64,66],[62,63,64,65,66,67,98,99,100,101,103,104,105],[63,100],[62,63,67],[63,101,103],[63,102]],"fileInfos":[{"version":"c430d44666289dae81f30fa7b2edebf186ecc91a2d4c71266ea6ae76388792e1","affectsGlobalScope":true,"impliedFormat":1},{"version":"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","impliedFormat":1},{"version":"3facaf05f0c5fc569c5649dd359892c98a85557e3e0c847964caeb67076f4d75","impliedFormat":1},{"version":"e44bb8bbac7f10ecc786703fe0a6a4b952189f908707980ba8f3c8975a760962","impliedFormat":1},{"version":"5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","impliedFormat":1},{"version":"68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","impliedFormat":1},{"version":"5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","impliedFormat":1},{"version":"feecb1be483ed332fad555aff858affd90a48ab19ba7272ee084704eb7167569","impliedFormat":1},{"version":"ee7bad0c15b58988daa84371e0b89d313b762ab83cb5b31b8a2d1162e8eb41c2","impliedFormat":1},{"version":"080941d9f9ff9307f7e27a83bcd888b7c8270716c39af943532438932ec1d0b9","affectsGlobalScope":true,"impliedFormat":1},{"version":"2e80ee7a49e8ac312cc11b77f1475804bee36b3b2bc896bead8b6e1266befb43","affectsGlobalScope":true,"impliedFormat":1},{"version":"c57796738e7f83dbc4b8e65132f11a377649c00dd3eee333f672b8f0a6bea671","affectsGlobalScope":true,"impliedFormat":1},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true,"impliedFormat":1},{"version":"515d0b7b9bea2e31ea4ec968e9edd2c39d3eebf4a2d5cbd04e88639819ae3b71","affectsGlobalScope":true,"impliedFormat":1},{"version":"0559b1f683ac7505ae451f9a96ce4c3c92bdc71411651ca6ddb0e88baaaad6a3","affectsGlobalScope":true,"impliedFormat":1},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true,"impliedFormat":1},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true,"impliedFormat":1},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true,"impliedFormat":1},{"version":"fb0f136d372979348d59b3f5020b4cdb81b5504192b1cacff5d1fbba29378aa1","affectsGlobalScope":true,"impliedFormat":1},{"version":"d15bea3d62cbbdb9797079416b8ac375ae99162a7fba5de2c6c505446486ac0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"68d18b664c9d32a7336a70235958b8997ebc1c3b8505f4f1ae2b7e7753b87618","affectsGlobalScope":true,"impliedFormat":1},{"version":"eb3d66c8327153d8fa7dd03f9c58d351107fe824c79e9b56b462935176cdf12a","affectsGlobalScope":true,"impliedFormat":1},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true,"impliedFormat":1},{"version":"69ab18c3b76cd9b1be3d188eaf8bba06112ebbe2f47f6c322b5105a6fbc45a2e","affectsGlobalScope":true,"impliedFormat":1},{"version":"a680117f487a4d2f30ea46f1b4b7f58bef1480456e18ba53ee85c2746eeca012","affectsGlobalScope":true,"impliedFormat":1},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true,"impliedFormat":1},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true,"impliedFormat":1},{"version":"954296b30da6d508a104a3a0b5d96b76495c709785c1d11610908e63481ee667","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac9538681b19688c8eae65811b329d3744af679e0bdfa5d842d0e32524c73e1c","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a969edff4bd52585473d24995c5ef223f6652d6ef46193309b3921d65dd4376","affectsGlobalScope":true,"impliedFormat":1},{"version":"9e9fbd7030c440b33d021da145d3232984c8bb7916f277e8ffd3dc2e3eae2bdb","affectsGlobalScope":true,"impliedFormat":1},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true,"impliedFormat":1},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true,"impliedFormat":1},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true,"impliedFormat":1},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true,"impliedFormat":1},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true,"impliedFormat":1},{"version":"74f7fa2d027d5b33eb0471c8e82a6c87216223181ec31247c357a3e8e2fddc5b","affectsGlobalScope":true,"impliedFormat":1},{"version":"d6d7ae4d1f1f3772e2a3cde568ed08991a8ae34a080ff1151af28b7f798e22ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"063600664504610fe3e99b717a1223f8b1900087fab0b4cad1496a114744f8df","affectsGlobalScope":true,"impliedFormat":1},{"version":"934019d7e3c81950f9a8426d093458b65d5aff2c7c1511233c0fd5b941e608ab","affectsGlobalScope":true,"impliedFormat":1},{"version":"52ada8e0b6e0482b728070b7639ee42e83a9b1c22d205992756fe020fd9f4a47","affectsGlobalScope":true,"impliedFormat":1},{"version":"3bdefe1bfd4d6dee0e26f928f93ccc128f1b64d5d501ff4a8cf3c6371200e5e6","affectsGlobalScope":true,"impliedFormat":1},{"version":"59fb2c069260b4ba00b5643b907ef5d5341b167e7d1dbf58dfd895658bda2867","affectsGlobalScope":true,"impliedFormat":1},{"version":"639e512c0dfc3fad96a84caad71b8834d66329a1f28dc95e3946c9b58176c73a","affectsGlobalScope":true,"impliedFormat":1},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true,"impliedFormat":1},{"version":"af3dd424cf267428f30ccfc376f47a2c0114546b55c44d8c0f1d57d841e28d74","affectsGlobalScope":true,"impliedFormat":1},{"version":"995c005ab91a498455ea8dfb63aa9f83fa2ea793c3d8aa344be4a1678d06d399","affectsGlobalScope":true,"impliedFormat":1},{"version":"959d36cddf5e7d572a65045b876f2956c973a586da58e5d26cde519184fd9b8a","affectsGlobalScope":true,"impliedFormat":1},{"version":"965f36eae237dd74e6cca203a43e9ca801ce38824ead814728a2807b1910117d","affectsGlobalScope":true,"impliedFormat":1},{"version":"3925a6c820dcb1a06506c90b1577db1fdbf7705d65b62b99dce4be75c637e26b","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a3d63ef2b853447ec4f749d3f368ce642264246e02911fcb1590d8c161b8005","affectsGlobalScope":true,"impliedFormat":1},{"version":"8cdf8847677ac7d20486e54dd3fcf09eda95812ac8ace44b4418da1bbbab6eb8","affectsGlobalScope":true,"impliedFormat":1},{"version":"8444af78980e3b20b49324f4a16ba35024fef3ee069a0eb67616ea6ca821c47a","affectsGlobalScope":true,"impliedFormat":1},{"version":"3287d9d085fbd618c3971944b65b4be57859f5415f495b33a6adc994edd2f004","affectsGlobalScope":true,"impliedFormat":1},{"version":"b4b67b1a91182421f5df999988c690f14d813b9850b40acd06ed44691f6727ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e7f8264d0fb4c5339605a15daadb037bf238c10b654bb3eee14208f860a32ea","affectsGlobalScope":true,"impliedFormat":1},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true,"impliedFormat":1},{"version":"7e29f41b158de217f94cb9676bf9cbd0cd9b5a46e1985141ed36e075c52bf6ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac51dd7d31333793807a6abaa5ae168512b6131bd41d9c5b98477fc3b7800f9f","impliedFormat":1},{"version":"dc0a7f107690ee5cd8afc8dbf05c4df78085471ce16bdd9881642ec738bc81fe","impliedFormat":1},{"version":"42c169fb8c2d42f4f668c624a9a11e719d5d07dacbebb63cbcf7ef365b0a75b3","impliedFormat":1},{"version":"fe7fdeffe71ec938eee7008c79df5e3e7c57ccd66bcb06c5c6d236052fd83930","signature":"c40d03bcca3519aec4683e2ade34fa691ff94e44e0e188aaf5b1d14e88d0d92e"},{"version":"e9a999b6912c3adb6ca769819b3eba5cc65173e3dcd0780a79023020ebf200e8","signature":"ed470e2274b36f87f4d53dacdd0e3eaeb41264aa5bc3bad4260a40ab1f668a50"},{"version":"22d182f4ad8c6bd2e1924fdddc290ee86cd71f6210b56fd7ba8510249bc88810","signature":"825372ca95e5ce5f7d4afb76ece079d557ade924c3bac38213737603d2a32bc1"},{"version":"083b7db297499b0116090e6442cfd6b1f177eda2bb97c53d97e9cde874e96037","signature":"2acdc8be276730126346aa7fb0be1c11d4bc7fb94c7e7b48c2e2542438848fc0"},{"version":"50cf7a23fc93928995caec8d7956206990f82113beeb6b3242dae8124edc3ca0","impliedFormat":99},{"version":"352031ac2e53031b69a09355e09ad7d95361edf32cc827cfe2417d80247a5a50","impliedFormat":99},{"version":"9971931daaf18158fc38266e838d56eb5d9d1f13360b1181bb4735a05f534c03","impliedFormat":99},{"version":"06d635a90365afe107c7e2daaa9851f5d3f062d78ebe4524b1b23b122469a1e2","impliedFormat":99},{"version":"aa103fbc4677b71d3deda20d37088cc2f39c3db8c2566ddf516b56ce7532d00a","impliedFormat":99},{"version":"0c5b705d31420477189618154d1b6a9bb62a34fa6055f56ade1a316f6adb6b3a","impliedFormat":99},{"version":"853b8bdb5da8c8e5d31e4d715a8057d8e96059d6774b13545c3616ed216b890c","impliedFormat":99},{"version":"430f4fa4e99e5e0a7ca2bbdde84abc8536bdfde4fd0de26009db508b8f571bb5","impliedFormat":99},{"version":"fe3c64bf61fcfec9b9861725c6d92de03f33748a01d982760ccfa798d777cf9d","impliedFormat":99},{"version":"1120a39f36c968298e2ca1d8cb1405389f9696f6b49e13b335626a94c16930bb","impliedFormat":99},{"version":"0a049adb920f3b42e1933c037052bcbc5e78b4704ad080bf078353c7f8ed6225","impliedFormat":99},{"version":"af9753433dec6dc41a2d3141804113a4d34f09fb19eb9eea063bd8800aa28db6","impliedFormat":99},{"version":"832f2fd6cf5eeaac22e2bdb0e3d7e2498cd8dd4058b853cd6b42033f126680ee","impliedFormat":99},{"version":"22fe66950a6308b2c6a0e11ed74930e90ba9d8a5fd2910666565007678875c13","impliedFormat":99},{"version":"084c09a35a9611e1777c02343c11ab8b1be48eb4895bbe6da90222979940b4a6","impliedFormat":99},{"version":"4b3049a2c849f0217ff4def308637931661461c329e4cf36aeb31db34c4c0c64","impliedFormat":99},{"version":"6245aa515481727f994d1cf7adfc71e36b5fc48216a92d7e932274cee3268000","impliedFormat":99},{"version":"3550708c55e4b79c5c13870f994461bcec97208e1d6758395a178913bbf05de3","impliedFormat":99},{"version":"660ce583eaa09bb39eef5ad7af9d1b5f027a9d1fbf9f76bf5b9dc9ef1be2830e","impliedFormat":99},{"version":"b7d9ca4e3248f643fa86ff11872623fdc8ed2c6009836bec0e38b163b6faed0c","impliedFormat":99},{"version":"904a01fef87360fa2fd0c2e934af92995b669565fe0bfb546ed0ff23769999cb","impliedFormat":99},{"version":"d4f7a7a5f66b9bc6fbfd53fa08dcf8007ff752064df816da05edfa35abd2c97c","impliedFormat":99},{"version":"1f38ecf63dead74c85180bf18376dc6bc152522ef3aedf7b588cadbbd5877506","impliedFormat":99},{"version":"82fb33c00b1300c19591105fc25ccf78acba220f58d162b120fe3f4292a5605f","impliedFormat":99},{"version":"facde2bec0f59cf92f4635ece51b2c3fa2d0a3bbb67458d24af61e7e6b8f003c","impliedFormat":99},{"version":"4669194e4ca5f7c160833bbb198f25681e629418a6326aba08cf0891821bfe8f","impliedFormat":99},{"version":"db185b403e30e91c5b90f3f2cfa062832d764c9d7df3ad7f5db7e17596344fe8","impliedFormat":99},{"version":"669b62a7169354658d4ae1e043ad8203728655492a8f70a940a11ca5ed4d5029","impliedFormat":99},{"version":"a95cd11c5c8bc03eab4011f8e339a48f9a87293e90c0bf3e9003d7a6f833f557","impliedFormat":99},{"version":"e9bc0db0144701fab1e98c4d595a293c7c840d209b389144142f0adbc36b5ec2","impliedFormat":99},{"version":"9d884b885c4b2d89286685406b45911dcaab03e08e948850e3e41e29af69561c","impliedFormat":99},{"version":"e00c380ed030cef03661334abb9fdbd174664e22f7597e64e92e85e22fbef6cf","signature":"ad1d85ddc03beaf6534fb0fcf5007e7edb4220b72927b2b7ff68f83ed2d891b3"},{"version":"ad9e07fd0f0d85af2ce02f6d31c548177076bccd39b0e6f62a4c381d0886e24b","signature":"c7f6d3fb10a9e47cb60b0547d34c6e666354eb00460fe08333d3fd37a503f090"},{"version":"f3e76b04368c7fd94559fc1476e742dcf7ab229fd10b84041cbc5b643161445f","signature":"83190209db45833d4ece114448f5f6f1dde2e68076961d4ea4d1e2cb03dc85c3"},"c1411a06d262e8e199836fa423c60007ac79289656f73b50f52eb706aac99d96",{"version":"0be1bb5ea4d9ea191a1318786bb0fae4fcb29632268479b5285b20930bb60355","signature":"eb63b664e3561a8888fbd9ec8b81bb6d3063e7be5cf2d2a155d0654273a6d4d7"},{"version":"903da13ad1d4d95f9eb983055d64fbe3780e65b5cbee450a45f6e7be5335dc4c","signature":"a92f0554e1f858fc1d3671d255bd3b972767362047272f866c84767ed9423129"},{"version":"be1cc4d94ea60cbe567bc29ed479d42587bf1e6cba490f123d329976b0fe4ee5","impliedFormat":1},{"version":"226b5a1ff5216f94141fc84931062caef73ca507e0b2a19ebc46e5a7fb78ee46","signature":"be5250353bf09b4dbdd6f2b3087d4c1dc4a5674c7b8822511b2ee27e5bda0f97"}],"root":[[64,67],[99,104],106],"options":{"allowImportingTsExtensions":true,"allowSyntheticDefaultImports":true,"alwaysStrict":true,"composite":true,"declaration":true,"emitDeclarationOnly":true,"esModuleInterop":true,"jsx":4,"module":99,"noFallthroughCasesInSwitch":true,"noImplicitAny":true,"noImplicitOverride":true,"noImplicitReturns":true,"noImplicitThis":true,"noUnusedLocals":true,"noUnusedParameters":true,"outDir":"./","skipLibCheck":true,"strict":true,"strictBindCallApply":true,"strictFunctionTypes":true,"strictNullChecks":true,"strictPropertyInitialization":true,"target":9,"useDefineForClassFields":true},"referencedMap":[[69,1],[71,2],[78,3],[72,4],[74,1],[75,4],[77,4],[91,5],[98,6],[88,7],[97,8],[95,7],[89,5],[90,9],[81,7],[79,10],[96,11],[92,10],[94,7],[93,10],[87,10],[86,7],[80,7],[82,12],[84,7],[85,7],[83,7],[105,8],[62,13],[63,8],[102,14],[64,14],[65,15],[67,16],[106,17],[101,18],[100,14],[99,14],[66,19],[104,20],[103,21]],"latestChangedDtsFile":"./src/index.d.ts","version":"5.9.3"}
|
|
1
|
+
{"fileNames":["../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2016.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2019.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2021.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.dom.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.dom.iterable.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.core.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2016.intl.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.date.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.object.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.string.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2019.array.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2019.object.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2019.string.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2019.intl.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.date.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.string.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2020.number.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2021.promise.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2021.string.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2021.intl.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.array.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.error.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.intl.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.object.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.string.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.regexp.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.decorators.d.ts","../../../node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../../node_modules/.pnpm/@types+react@19.2.14/node_modules/@types/react/global.d.ts","../../../node_modules/.pnpm/csstype@3.2.3/node_modules/csstype/index.d.ts","../../../node_modules/.pnpm/@types+react@19.2.14/node_modules/@types/react/index.d.ts","../../../node_modules/.pnpm/@types+react@19.2.14/node_modules/@types/react/jsx-runtime.d.ts","../src/data-types.ts","../src/goal-progress.ts","../src/types.ts","../src/host-api.ts","../../../node_modules/.pnpm/@tanstack+query-core@5.90.20/node_modules/@tanstack/query-core/build/modern/subscribable.d.ts","../../../node_modules/.pnpm/@tanstack+query-core@5.90.20/node_modules/@tanstack/query-core/build/modern/focusmanager.d.ts","../../../node_modules/.pnpm/@tanstack+query-core@5.90.20/node_modules/@tanstack/query-core/build/modern/removable.d.ts","../../../node_modules/.pnpm/@tanstack+query-core@5.90.20/node_modules/@tanstack/query-core/build/modern/hydration-blevg2lp.d.ts","../../../node_modules/.pnpm/@tanstack+query-core@5.90.20/node_modules/@tanstack/query-core/build/modern/infinitequeryobserver.d.ts","../../../node_modules/.pnpm/@tanstack+query-core@5.90.20/node_modules/@tanstack/query-core/build/modern/notifymanager.d.ts","../../../node_modules/.pnpm/@tanstack+query-core@5.90.20/node_modules/@tanstack/query-core/build/modern/onlinemanager.d.ts","../../../node_modules/.pnpm/@tanstack+query-core@5.90.20/node_modules/@tanstack/query-core/build/modern/queriesobserver.d.ts","../../../node_modules/.pnpm/@tanstack+query-core@5.90.20/node_modules/@tanstack/query-core/build/modern/timeoutmanager.d.ts","../../../node_modules/.pnpm/@tanstack+query-core@5.90.20/node_modules/@tanstack/query-core/build/modern/streamedquery.d.ts","../../../node_modules/.pnpm/@tanstack+query-core@5.90.20/node_modules/@tanstack/query-core/build/modern/index.d.ts","../../../node_modules/.pnpm/@tanstack+react-query@5.90.21_react@19.2.4/node_modules/@tanstack/react-query/build/modern/types.d.ts","../../../node_modules/.pnpm/@tanstack+react-query@5.90.21_react@19.2.4/node_modules/@tanstack/react-query/build/modern/usequeries.d.ts","../../../node_modules/.pnpm/@tanstack+react-query@5.90.21_react@19.2.4/node_modules/@tanstack/react-query/build/modern/queryoptions.d.ts","../../../node_modules/.pnpm/@tanstack+react-query@5.90.21_react@19.2.4/node_modules/@tanstack/react-query/build/modern/usequery.d.ts","../../../node_modules/.pnpm/@tanstack+react-query@5.90.21_react@19.2.4/node_modules/@tanstack/react-query/build/modern/usesuspensequery.d.ts","../../../node_modules/.pnpm/@tanstack+react-query@5.90.21_react@19.2.4/node_modules/@tanstack/react-query/build/modern/usesuspenseinfinitequery.d.ts","../../../node_modules/.pnpm/@tanstack+react-query@5.90.21_react@19.2.4/node_modules/@tanstack/react-query/build/modern/usesuspensequeries.d.ts","../../../node_modules/.pnpm/@tanstack+react-query@5.90.21_react@19.2.4/node_modules/@tanstack/react-query/build/modern/useprefetchquery.d.ts","../../../node_modules/.pnpm/@tanstack+react-query@5.90.21_react@19.2.4/node_modules/@tanstack/react-query/build/modern/useprefetchinfinitequery.d.ts","../../../node_modules/.pnpm/@tanstack+react-query@5.90.21_react@19.2.4/node_modules/@tanstack/react-query/build/modern/infinitequeryoptions.d.ts","../../../node_modules/.pnpm/@tanstack+react-query@5.90.21_react@19.2.4/node_modules/@tanstack/react-query/build/modern/queryclientprovider.d.ts","../../../node_modules/.pnpm/@tanstack+react-query@5.90.21_react@19.2.4/node_modules/@tanstack/react-query/build/modern/queryerrorresetboundary.d.ts","../../../node_modules/.pnpm/@tanstack+react-query@5.90.21_react@19.2.4/node_modules/@tanstack/react-query/build/modern/hydrationboundary.d.ts","../../../node_modules/.pnpm/@tanstack+react-query@5.90.21_react@19.2.4/node_modules/@tanstack/react-query/build/modern/useisfetching.d.ts","../../../node_modules/.pnpm/@tanstack+react-query@5.90.21_react@19.2.4/node_modules/@tanstack/react-query/build/modern/usemutationstate.d.ts","../../../node_modules/.pnpm/@tanstack+react-query@5.90.21_react@19.2.4/node_modules/@tanstack/react-query/build/modern/usemutation.d.ts","../../../node_modules/.pnpm/@tanstack+react-query@5.90.21_react@19.2.4/node_modules/@tanstack/react-query/build/modern/mutationoptions.d.ts","../../../node_modules/.pnpm/@tanstack+react-query@5.90.21_react@19.2.4/node_modules/@tanstack/react-query/build/modern/useinfinitequery.d.ts","../../../node_modules/.pnpm/@tanstack+react-query@5.90.21_react@19.2.4/node_modules/@tanstack/react-query/build/modern/isrestoringprovider.d.ts","../../../node_modules/.pnpm/@tanstack+react-query@5.90.21_react@19.2.4/node_modules/@tanstack/react-query/build/modern/index.d.ts","../src/query-keys.ts","../src/permissions.ts","../src/manifest.ts","../package.json","../src/version.ts","../src/utils.ts","../../../node_modules/.pnpm/@types+react-dom@19.2.3_@types+react@19.2.14/node_modules/@types/react-dom/index.d.ts","../src/index.ts"],"fileIdsList":[[68],[68,70],[68,69,70,71,72,73,74,75,76,77],[68,70,71],[62,78],[62,63,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97],[78,79],[62],[62,63],[78],[78,79,88],[78,79,81],[60,61],[63],[63,64],[63,64,66],[62,63,64,65,66,67,98,99,100,101,103,104,105],[63,100],[62,63,67],[63,101,103],[63,102]],"fileInfos":[{"version":"c430d44666289dae81f30fa7b2edebf186ecc91a2d4c71266ea6ae76388792e1","affectsGlobalScope":true,"impliedFormat":1},{"version":"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","impliedFormat":1},{"version":"3facaf05f0c5fc569c5649dd359892c98a85557e3e0c847964caeb67076f4d75","impliedFormat":1},{"version":"e44bb8bbac7f10ecc786703fe0a6a4b952189f908707980ba8f3c8975a760962","impliedFormat":1},{"version":"5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","impliedFormat":1},{"version":"68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","impliedFormat":1},{"version":"5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","impliedFormat":1},{"version":"feecb1be483ed332fad555aff858affd90a48ab19ba7272ee084704eb7167569","impliedFormat":1},{"version":"ee7bad0c15b58988daa84371e0b89d313b762ab83cb5b31b8a2d1162e8eb41c2","impliedFormat":1},{"version":"080941d9f9ff9307f7e27a83bcd888b7c8270716c39af943532438932ec1d0b9","affectsGlobalScope":true,"impliedFormat":1},{"version":"2e80ee7a49e8ac312cc11b77f1475804bee36b3b2bc896bead8b6e1266befb43","affectsGlobalScope":true,"impliedFormat":1},{"version":"c57796738e7f83dbc4b8e65132f11a377649c00dd3eee333f672b8f0a6bea671","affectsGlobalScope":true,"impliedFormat":1},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true,"impliedFormat":1},{"version":"515d0b7b9bea2e31ea4ec968e9edd2c39d3eebf4a2d5cbd04e88639819ae3b71","affectsGlobalScope":true,"impliedFormat":1},{"version":"0559b1f683ac7505ae451f9a96ce4c3c92bdc71411651ca6ddb0e88baaaad6a3","affectsGlobalScope":true,"impliedFormat":1},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true,"impliedFormat":1},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true,"impliedFormat":1},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true,"impliedFormat":1},{"version":"fb0f136d372979348d59b3f5020b4cdb81b5504192b1cacff5d1fbba29378aa1","affectsGlobalScope":true,"impliedFormat":1},{"version":"d15bea3d62cbbdb9797079416b8ac375ae99162a7fba5de2c6c505446486ac0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"68d18b664c9d32a7336a70235958b8997ebc1c3b8505f4f1ae2b7e7753b87618","affectsGlobalScope":true,"impliedFormat":1},{"version":"eb3d66c8327153d8fa7dd03f9c58d351107fe824c79e9b56b462935176cdf12a","affectsGlobalScope":true,"impliedFormat":1},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true,"impliedFormat":1},{"version":"69ab18c3b76cd9b1be3d188eaf8bba06112ebbe2f47f6c322b5105a6fbc45a2e","affectsGlobalScope":true,"impliedFormat":1},{"version":"a680117f487a4d2f30ea46f1b4b7f58bef1480456e18ba53ee85c2746eeca012","affectsGlobalScope":true,"impliedFormat":1},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true,"impliedFormat":1},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true,"impliedFormat":1},{"version":"954296b30da6d508a104a3a0b5d96b76495c709785c1d11610908e63481ee667","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac9538681b19688c8eae65811b329d3744af679e0bdfa5d842d0e32524c73e1c","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a969edff4bd52585473d24995c5ef223f6652d6ef46193309b3921d65dd4376","affectsGlobalScope":true,"impliedFormat":1},{"version":"9e9fbd7030c440b33d021da145d3232984c8bb7916f277e8ffd3dc2e3eae2bdb","affectsGlobalScope":true,"impliedFormat":1},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true,"impliedFormat":1},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true,"impliedFormat":1},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true,"impliedFormat":1},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true,"impliedFormat":1},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true,"impliedFormat":1},{"version":"74f7fa2d027d5b33eb0471c8e82a6c87216223181ec31247c357a3e8e2fddc5b","affectsGlobalScope":true,"impliedFormat":1},{"version":"d6d7ae4d1f1f3772e2a3cde568ed08991a8ae34a080ff1151af28b7f798e22ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"063600664504610fe3e99b717a1223f8b1900087fab0b4cad1496a114744f8df","affectsGlobalScope":true,"impliedFormat":1},{"version":"934019d7e3c81950f9a8426d093458b65d5aff2c7c1511233c0fd5b941e608ab","affectsGlobalScope":true,"impliedFormat":1},{"version":"52ada8e0b6e0482b728070b7639ee42e83a9b1c22d205992756fe020fd9f4a47","affectsGlobalScope":true,"impliedFormat":1},{"version":"3bdefe1bfd4d6dee0e26f928f93ccc128f1b64d5d501ff4a8cf3c6371200e5e6","affectsGlobalScope":true,"impliedFormat":1},{"version":"59fb2c069260b4ba00b5643b907ef5d5341b167e7d1dbf58dfd895658bda2867","affectsGlobalScope":true,"impliedFormat":1},{"version":"639e512c0dfc3fad96a84caad71b8834d66329a1f28dc95e3946c9b58176c73a","affectsGlobalScope":true,"impliedFormat":1},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true,"impliedFormat":1},{"version":"af3dd424cf267428f30ccfc376f47a2c0114546b55c44d8c0f1d57d841e28d74","affectsGlobalScope":true,"impliedFormat":1},{"version":"995c005ab91a498455ea8dfb63aa9f83fa2ea793c3d8aa344be4a1678d06d399","affectsGlobalScope":true,"impliedFormat":1},{"version":"959d36cddf5e7d572a65045b876f2956c973a586da58e5d26cde519184fd9b8a","affectsGlobalScope":true,"impliedFormat":1},{"version":"965f36eae237dd74e6cca203a43e9ca801ce38824ead814728a2807b1910117d","affectsGlobalScope":true,"impliedFormat":1},{"version":"3925a6c820dcb1a06506c90b1577db1fdbf7705d65b62b99dce4be75c637e26b","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a3d63ef2b853447ec4f749d3f368ce642264246e02911fcb1590d8c161b8005","affectsGlobalScope":true,"impliedFormat":1},{"version":"8cdf8847677ac7d20486e54dd3fcf09eda95812ac8ace44b4418da1bbbab6eb8","affectsGlobalScope":true,"impliedFormat":1},{"version":"8444af78980e3b20b49324f4a16ba35024fef3ee069a0eb67616ea6ca821c47a","affectsGlobalScope":true,"impliedFormat":1},{"version":"3287d9d085fbd618c3971944b65b4be57859f5415f495b33a6adc994edd2f004","affectsGlobalScope":true,"impliedFormat":1},{"version":"b4b67b1a91182421f5df999988c690f14d813b9850b40acd06ed44691f6727ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e7f8264d0fb4c5339605a15daadb037bf238c10b654bb3eee14208f860a32ea","affectsGlobalScope":true,"impliedFormat":1},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true,"impliedFormat":1},{"version":"7e29f41b158de217f94cb9676bf9cbd0cd9b5a46e1985141ed36e075c52bf6ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac51dd7d31333793807a6abaa5ae168512b6131bd41d9c5b98477fc3b7800f9f","impliedFormat":1},{"version":"dc0a7f107690ee5cd8afc8dbf05c4df78085471ce16bdd9881642ec738bc81fe","impliedFormat":1},{"version":"42c169fb8c2d42f4f668c624a9a11e719d5d07dacbebb63cbcf7ef365b0a75b3","impliedFormat":1},{"version":"7415554310b00e5344992f4757a936e5a1769d8740244cffe31ad5fa89540a71","signature":"be4db75b7d3c0e8e63782e0b6c07781b0839ad89432bd500e062a3b1e29f916d"},{"version":"0f1c0d51e20ed91dfc283d9fb4d586632f8b27b90ea8b2b51a5403c7c5b52425","signature":"7457ae02c40c6b596825685b3646352ea7087a470b6abcca20a1e417876c8c52"},{"version":"22d182f4ad8c6bd2e1924fdddc290ee86cd71f6210b56fd7ba8510249bc88810","signature":"825372ca95e5ce5f7d4afb76ece079d557ade924c3bac38213737603d2a32bc1"},{"version":"0a33913e39483235398a2221cae6842a72b767fd8c419648832940db30c96a2e","signature":"603e013994aea68a54a2038a100ec7d554cfcce7c54fc07271d800a51c35e6dc"},{"version":"50cf7a23fc93928995caec8d7956206990f82113beeb6b3242dae8124edc3ca0","impliedFormat":99},{"version":"352031ac2e53031b69a09355e09ad7d95361edf32cc827cfe2417d80247a5a50","impliedFormat":99},{"version":"9971931daaf18158fc38266e838d56eb5d9d1f13360b1181bb4735a05f534c03","impliedFormat":99},{"version":"06d635a90365afe107c7e2daaa9851f5d3f062d78ebe4524b1b23b122469a1e2","impliedFormat":99},{"version":"aa103fbc4677b71d3deda20d37088cc2f39c3db8c2566ddf516b56ce7532d00a","impliedFormat":99},{"version":"0c5b705d31420477189618154d1b6a9bb62a34fa6055f56ade1a316f6adb6b3a","impliedFormat":99},{"version":"853b8bdb5da8c8e5d31e4d715a8057d8e96059d6774b13545c3616ed216b890c","impliedFormat":99},{"version":"430f4fa4e99e5e0a7ca2bbdde84abc8536bdfde4fd0de26009db508b8f571bb5","impliedFormat":99},{"version":"fe3c64bf61fcfec9b9861725c6d92de03f33748a01d982760ccfa798d777cf9d","impliedFormat":99},{"version":"1120a39f36c968298e2ca1d8cb1405389f9696f6b49e13b335626a94c16930bb","impliedFormat":99},{"version":"0a049adb920f3b42e1933c037052bcbc5e78b4704ad080bf078353c7f8ed6225","impliedFormat":99},{"version":"af9753433dec6dc41a2d3141804113a4d34f09fb19eb9eea063bd8800aa28db6","impliedFormat":99},{"version":"832f2fd6cf5eeaac22e2bdb0e3d7e2498cd8dd4058b853cd6b42033f126680ee","impliedFormat":99},{"version":"22fe66950a6308b2c6a0e11ed74930e90ba9d8a5fd2910666565007678875c13","impliedFormat":99},{"version":"084c09a35a9611e1777c02343c11ab8b1be48eb4895bbe6da90222979940b4a6","impliedFormat":99},{"version":"4b3049a2c849f0217ff4def308637931661461c329e4cf36aeb31db34c4c0c64","impliedFormat":99},{"version":"6245aa515481727f994d1cf7adfc71e36b5fc48216a92d7e932274cee3268000","impliedFormat":99},{"version":"3550708c55e4b79c5c13870f994461bcec97208e1d6758395a178913bbf05de3","impliedFormat":99},{"version":"660ce583eaa09bb39eef5ad7af9d1b5f027a9d1fbf9f76bf5b9dc9ef1be2830e","impliedFormat":99},{"version":"b7d9ca4e3248f643fa86ff11872623fdc8ed2c6009836bec0e38b163b6faed0c","impliedFormat":99},{"version":"904a01fef87360fa2fd0c2e934af92995b669565fe0bfb546ed0ff23769999cb","impliedFormat":99},{"version":"d4f7a7a5f66b9bc6fbfd53fa08dcf8007ff752064df816da05edfa35abd2c97c","impliedFormat":99},{"version":"1f38ecf63dead74c85180bf18376dc6bc152522ef3aedf7b588cadbbd5877506","impliedFormat":99},{"version":"82fb33c00b1300c19591105fc25ccf78acba220f58d162b120fe3f4292a5605f","impliedFormat":99},{"version":"facde2bec0f59cf92f4635ece51b2c3fa2d0a3bbb67458d24af61e7e6b8f003c","impliedFormat":99},{"version":"4669194e4ca5f7c160833bbb198f25681e629418a6326aba08cf0891821bfe8f","impliedFormat":99},{"version":"db185b403e30e91c5b90f3f2cfa062832d764c9d7df3ad7f5db7e17596344fe8","impliedFormat":99},{"version":"669b62a7169354658d4ae1e043ad8203728655492a8f70a940a11ca5ed4d5029","impliedFormat":99},{"version":"a95cd11c5c8bc03eab4011f8e339a48f9a87293e90c0bf3e9003d7a6f833f557","impliedFormat":99},{"version":"e9bc0db0144701fab1e98c4d595a293c7c840d209b389144142f0adbc36b5ec2","impliedFormat":99},{"version":"9d884b885c4b2d89286685406b45911dcaab03e08e948850e3e41e29af69561c","impliedFormat":99},{"version":"e00c380ed030cef03661334abb9fdbd174664e22f7597e64e92e85e22fbef6cf","signature":"ad1d85ddc03beaf6534fb0fcf5007e7edb4220b72927b2b7ff68f83ed2d891b3"},{"version":"dfdcb10f2b5cad7b34d070f6e82fc4101434a8b6a7559b1ed62025d95dfbb9c9","signature":"c7f6d3fb10a9e47cb60b0547d34c6e666354eb00460fe08333d3fd37a503f090"},{"version":"f3e76b04368c7fd94559fc1476e742dcf7ab229fd10b84041cbc5b643161445f","signature":"83190209db45833d4ece114448f5f6f1dde2e68076961d4ea4d1e2cb03dc85c3"},"e839899b930c32c4b92a5509d262adc2954877523a3f348c46386eba563d25e3",{"version":"0be1bb5ea4d9ea191a1318786bb0fae4fcb29632268479b5285b20930bb60355","signature":"eb63b664e3561a8888fbd9ec8b81bb6d3063e7be5cf2d2a155d0654273a6d4d7"},{"version":"903da13ad1d4d95f9eb983055d64fbe3780e65b5cbee450a45f6e7be5335dc4c","signature":"a92f0554e1f858fc1d3671d255bd3b972767362047272f866c84767ed9423129"},{"version":"be1cc4d94ea60cbe567bc29ed479d42587bf1e6cba490f123d329976b0fe4ee5","impliedFormat":1},{"version":"3006e51fc4225c2dc8b8f57a428baeee5ee003901010b2aec128422289ef0c87","signature":"f88433c44d9fc253e9afef63a021e489a42c8c8129cbd0c6b94d71231391eab0"}],"root":[[64,67],[99,104],106],"options":{"allowImportingTsExtensions":true,"allowSyntheticDefaultImports":true,"alwaysStrict":true,"composite":true,"declaration":true,"emitDeclarationOnly":true,"esModuleInterop":true,"jsx":4,"module":99,"noFallthroughCasesInSwitch":true,"noImplicitAny":true,"noImplicitOverride":true,"noImplicitReturns":true,"noImplicitThis":true,"noUnusedLocals":true,"noUnusedParameters":true,"outDir":"./","skipLibCheck":true,"strict":true,"strictBindCallApply":true,"strictFunctionTypes":true,"strictNullChecks":true,"strictPropertyInitialization":true,"target":9,"useDefineForClassFields":true},"referencedMap":[[69,1],[71,2],[78,3],[72,4],[74,1],[75,4],[77,4],[91,5],[98,6],[88,7],[97,8],[95,7],[89,5],[90,9],[81,7],[79,10],[96,11],[92,10],[94,7],[93,10],[87,10],[86,7],[80,7],[82,12],[84,7],[85,7],[83,7],[105,8],[62,13],[63,8],[102,14],[64,14],[65,15],[67,16],[106,17],[101,18],[100,14],[99,14],[66,19],[104,20],[103,21]],"latestChangedDtsFile":"./src/index.d.ts","version":"5.9.3"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wealthfolio/addon-sdk",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.5.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "TypeScript SDK for building Wealthfolio addons with enhanced functionality and type safety",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -38,11 +38,11 @@
|
|
|
38
38
|
"homepage": "https://wealthfolio.app/addons",
|
|
39
39
|
"repository": {
|
|
40
40
|
"type": "git",
|
|
41
|
-
"url": "https://github.com/
|
|
41
|
+
"url": "https://github.com/wealthfolio/wealthfolio.git",
|
|
42
42
|
"directory": "packages/addon-sdk"
|
|
43
43
|
},
|
|
44
44
|
"bugs": {
|
|
45
|
-
"url": "https://github.com/
|
|
45
|
+
"url": "https://github.com/wealthfolio/wealthfolio/issues"
|
|
46
46
|
},
|
|
47
47
|
"scripts": {
|
|
48
48
|
"build": "tsup && pnpm run build:types",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/permissions.ts"],"sourcesContent":["/**\n * Permission system types and constants for Wealthfolio addons\n */\n\n/**\n * Security risk levels for addon operations\n */\nexport type RiskLevel = 'low' | 'medium' | 'high';\n\n/**\n * Function permission details with declaration and detection tracking\n */\nexport interface FunctionPermission {\n /** Function name */\n name: string;\n /** Whether this function was declared by the developer in manifest */\n isDeclared: boolean;\n /** Whether this function was detected by static analysis during installation */\n isDetected: boolean;\n /** ISO timestamp when this function was detected (if isDetected is true) */\n detectedAt?: string;\n}\n\n/**\n * Permission requirement for specific addon functionality\n */\nexport interface Permission {\n /** Permission category identifier */\n category: string;\n /** List of API functions this permission grants access to with their declaration/detection status */\n functions: FunctionPermission[];\n /** Human-readable explanation of why this permission is needed */\n purpose: string;\n}\n\n/**\n * Permission category definition\n */\nexport interface PermissionCategory {\n /** Unique category identifier */\n id: string;\n /** Display name for the category */\n name: string;\n /** Detailed description of what this category covers */\n description: string;\n /** List of API functions in this category */\n functions: string[];\n /** Security risk level for this category */\n riskLevel: RiskLevel;\n}\n\n/**\n * Predefined permission categories with their associated functions and risk levels\n */\nexport const PERMISSION_CATEGORIES: PermissionCategory[] = [\n {\n id: 'accounts',\n name: 'Account Management',\n description: 'Access to account information and settings',\n functions: ['getAll', 'create'],\n riskLevel: 'high',\n },\n {\n id: 'portfolio',\n name: 'Portfolio Data',\n description: 'Access to holdings, portfolio performance, and account valuations',\n functions: [\n 'getHoldings',\n 'getHolding',\n 'update',\n 'recalculate',\n 'getIncomeSummary',\n 'getHistoricalValuations',\n 'getLatestValuations',\n ],\n riskLevel: 'high',\n },\n {\n id: 'activities',\n name: 'Transaction History',\n description: 'Access to transaction records and activity management',\n functions: [\n 'getAll',\n 'search',\n 'create',\n 'update',\n 'saveMany',\n 'import',\n 'checkImport',\n 'getImportMapping',\n 'saveImportMapping',\n ],\n riskLevel: 'high',\n },\n {\n id: 'market-data',\n name: 'Market Data',\n description: 'Access to market prices, quotes, and financial data',\n functions: ['searchTicker', 'syncHistory', 'sync', 'getProviders', 'fetchDividends'],\n riskLevel: 'low',\n },\n {\n id: 'assets',\n name: 'Asset Management',\n description: 'Access to asset profiles and data sources',\n functions: ['getProfile', 'updateProfile', 'updateQuoteMode'],\n riskLevel: 'medium',\n },\n {\n id: 'quotes',\n name: 'Quote Management',\n description: 'Access to price quotes and historical data',\n functions: ['update', 'getHistory'],\n riskLevel: 'low',\n },\n {\n id: 'performance',\n name: 'Performance Analytics',\n description: 'Access to performance calculations and metrics',\n functions: ['calculateHistory', 'calculateSummary', 'calculateAccountsSimple'],\n riskLevel: 'medium',\n },\n {\n id: 'currency',\n name: 'Exchange Rates',\n description: 'Access to currency exchange rates and conversion data',\n functions: ['getAll', 'update', 'add'],\n riskLevel: 'low',\n },\n {\n id: 'goals',\n name: 'Goals Management',\n description: 'Access to financial goals and allocations',\n functions: ['getAll', 'create', 'update', 'updateAllocations', 'getAllocations'],\n riskLevel: 'medium',\n },\n {\n id: 'contribution-limits',\n name: 'Contribution Limits',\n description: 'Access to contribution limits and deposit calculations',\n functions: ['getAll', 'create', 'update', 'calculateDeposits'],\n riskLevel: 'medium',\n },\n {\n id: 'settings',\n name: 'Application Settings',\n description: 'Access to application settings and configuration',\n functions: ['get', 'update', 'backupDatabase'],\n riskLevel: 'medium',\n },\n {\n id: 'files',\n name: 'File Operations',\n description: 'Access to file dialogs and file system operations',\n functions: ['openCsvDialog', 'openSaveDialog'],\n riskLevel: 'medium',\n },\n {\n id: 'secrets',\n name: 'Secrets Management',\n description: 'Access to secure storage for addon secrets',\n functions: ['set', 'get', 'delete'],\n riskLevel: 'high',\n },\n {\n id: 'snapshots',\n name: 'Snapshot Management',\n description: 'Access to holdings snapshots for accounts with holdings tracking mode',\n functions: [\n 'getAll',\n 'getByDate',\n 'save',\n 'checkImport',\n 'importSnapshots',\n 'delete',\n ],\n riskLevel: 'high',\n },\n {\n id: 'events',\n name: 'Event Listeners',\n description: 'Access to application events and notifications',\n functions: [\n 'onDropHover',\n 'onDrop',\n 'onDropCancelled',\n 'onUpdateStart',\n 'onUpdateComplete',\n 'onUpdateError',\n 'onSyncStart',\n 'onSyncComplete',\n ],\n riskLevel: 'low',\n },\n {\n id: 'ui',\n name: 'User Interface',\n description: 'Access to modify navigation and add UI components',\n functions: ['sidebar.addItem', 'router.add'],\n riskLevel: 'low',\n },\n];\n\n/**\n * Helper functions for permission management\n */\n\n/**\n * Create a FunctionPermission object\n */\nexport function createFunctionPermission(\n name: string,\n isDeclared = false,\n isDetected = false,\n detectedAt?: string,\n): FunctionPermission {\n return {\n name,\n isDeclared,\n isDetected,\n detectedAt: isDetected ? detectedAt || new Date().toISOString() : undefined,\n };\n}\n\n/**\n * Get permission category by ID\n */\nexport function getPermissionCategory(id: string): PermissionCategory | undefined {\n return PERMISSION_CATEGORIES.find((category) => category.id === id);\n}\n\n/**\n * Get permission categories by risk level\n */\nexport function getPermissionCategoriesByRisk(\n riskLevel: RiskLevel,\n): PermissionCategory[] {\n return PERMISSION_CATEGORIES.filter((category) => category.riskLevel === riskLevel);\n}\n\n/**\n * Get the risk level for a specific function\n */\nexport function getFunctionRiskLevel(functionName: string): RiskLevel | undefined {\n const category = PERMISSION_CATEGORIES.find((cat) =>\n cat.functions.includes(functionName),\n );\n return category?.riskLevel;\n}\n\n/**\n * Check if a function requires a specific permission category\n */\nexport function isPermissionRequired(functionName: string, categoryId: string): boolean {\n const category = getPermissionCategory(categoryId);\n return category ? category.functions.includes(functionName) : false;\n}\n\n/**\n * Get all declared functions from a permission\n */\nexport function getDeclaredFunctions(permission: Permission): string[] {\n return permission.functions.filter((func) => func.isDeclared).map((func) => func.name);\n}\n\n/**\n * Get all detected functions from a permission\n */\nexport function getDetectedFunctions(permission: Permission): string[] {\n return permission.functions.filter((func) => func.isDetected).map((func) => func.name);\n}\n\n/**\n * Get functions that were detected but not declared (potential security concern)\n */\nexport function getUndeclaredDetectedFunctions(permission: Permission): string[] {\n return permission.functions\n .filter((func) => func.isDetected && !func.isDeclared)\n .map((func) => func.name);\n}\n\n/**\n * Check if a permission has any undeclared detected functions\n */\nexport function hasUndeclaredDetectedFunctions(permission: Permission): boolean {\n return permission.functions.some((func) => func.isDetected && !func.isDeclared);\n}\n\n/**\n * Add a detected function to a permission\n */\nexport function addDetectedFunction(\n permission: Permission,\n functionName: string,\n detectedAt?: string,\n): Permission {\n const existingFunc = permission.functions.find((f) => f.name === functionName);\n\n if (existingFunc) {\n // Update existing function to mark as detected\n existingFunc.isDetected = true;\n existingFunc.detectedAt = detectedAt || new Date().toISOString();\n } else {\n // Add new detected function\n permission.functions.push(\n createFunctionPermission(functionName, false, true, detectedAt),\n );\n }\n\n return permission;\n}\n\n/**\n * Mark a function as declared in a permission\n */\nexport function markFunctionAsDeclared(\n permission: Permission,\n functionName: string,\n): Permission {\n const existingFunc = permission.functions.find((f) => f.name === functionName);\n\n if (existingFunc) {\n existingFunc.isDeclared = true;\n } else {\n // Add new declared function\n permission.functions.push(createFunctionPermission(functionName, true, false));\n }\n\n return permission;\n}\n"],"mappings":";AAsDO,IAAM,wBAA8C;AAAA,EACzD;AAAA,IACE,IAAI;AAAA,IACJ,MAAM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