@cygnus-wealth/data-models 1.1.1 → 1.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. package/dist/cjs/enums/AccountType.js +57 -0
  2. package/dist/cjs/enums/AssetType.js +133 -0
  3. package/dist/cjs/enums/Chain.js +73 -0
  4. package/dist/cjs/enums/IntegrationSource.js +69 -0
  5. package/dist/cjs/enums/LendingPositionType.js +29 -0
  6. package/dist/cjs/enums/TransactionType.js +75 -0
  7. package/dist/cjs/index.js +16 -0
  8. package/dist/cjs/interfaces/Account.js +2 -0
  9. package/dist/cjs/interfaces/ApiError.js +2 -0
  10. package/dist/cjs/interfaces/ApiResponse.js +2 -0
  11. package/dist/cjs/interfaces/Asset.js +2 -0
  12. package/dist/cjs/interfaces/Balance.js +2 -0
  13. package/dist/cjs/interfaces/BaseEntity.js +2 -0
  14. package/dist/cjs/interfaces/FilterOptions.js +2 -0
  15. package/dist/cjs/interfaces/IntegrationCredentials.js +2 -0
  16. package/dist/cjs/interfaces/LendingPosition.js +2 -0
  17. package/dist/cjs/interfaces/LiquidityPosition.js +2 -0
  18. package/dist/cjs/interfaces/MarketData.js +2 -0
  19. package/dist/cjs/interfaces/Metadata.js +2 -0
  20. package/dist/cjs/interfaces/NFT.js +2 -0
  21. package/dist/cjs/interfaces/PaginatedResponse.js +2 -0
  22. package/dist/cjs/interfaces/Portfolio.js +2 -0
  23. package/dist/cjs/interfaces/PortfolioAsset.js +2 -0
  24. package/dist/cjs/interfaces/PortfolioItem.js +2 -0
  25. package/dist/cjs/interfaces/Price.js +2 -0
  26. package/dist/cjs/interfaces/StakedPosition.js +2 -0
  27. package/dist/cjs/interfaces/SyncStatus.js +2 -0
  28. package/dist/cjs/interfaces/Transaction.js +2 -0
  29. package/dist/cjs/package.json +1 -0
  30. package/dist/cjs/types/AssetIdentifier.js +2 -0
  31. package/dist/cjs/types/NetworkEnvironment.js +2 -0
  32. package/dist/cjs/types/SortOrder.js +2 -0
  33. package/dist/cjs/types/TimeRange.js +2 -0
  34. package/package.json +22 -12
@@ -0,0 +1,57 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AccountType = void 0;
4
+ /**
5
+ * Classification of account types.
6
+ *
7
+ * Categorizes account containers for display, grouping, and business logic.
8
+ * Enables specialized UI components and processing based on account purpose
9
+ * and characteristics.
10
+ *
11
+ * @example
12
+ * ```typescript
13
+ * import { AccountType } from '@cygnus-wealth/data-models';
14
+ *
15
+ * // Route account to specialized handler
16
+ * function processAccount(type: AccountType) {
17
+ * switch(type) {
18
+ * case AccountType.SPOT:
19
+ * return processCEXSpotAccount();
20
+ * case AccountType.WALLET:
21
+ * return processWalletAccount();
22
+ * case AccountType.DEFI:
23
+ * return processDeFiPositions();
24
+ * case AccountType.RETIREMENT:
25
+ * return processTaxAdvantaged();
26
+ * default:
27
+ * return processGenericAccount();
28
+ * }
29
+ * }
30
+ * ```
31
+ *
32
+ * @since 0.0.1
33
+ * @stability standard
34
+ */
35
+ var AccountType;
36
+ (function (AccountType) {
37
+ /** Spot trading account on centralized exchange */
38
+ AccountType["SPOT"] = "SPOT";
39
+ /** Margin trading account with leverage */
40
+ AccountType["MARGIN"] = "MARGIN";
41
+ /** Futures or derivatives trading account */
42
+ AccountType["FUTURES"] = "FUTURES";
43
+ /** Savings or interest-earning account */
44
+ AccountType["SAVINGS"] = "SAVINGS";
45
+ /** Staking account for proof-of-stake rewards */
46
+ AccountType["STAKING"] = "STAKING";
47
+ /** Self-custody blockchain wallet */
48
+ AccountType["WALLET"] = "WALLET";
49
+ /** DeFi protocol positions (lending, liquidity, etc.) */
50
+ AccountType["DEFI"] = "DEFI";
51
+ /** Traditional brokerage account */
52
+ AccountType["BROKERAGE"] = "BROKERAGE";
53
+ /** Tax-advantaged retirement account (IRA, 401k, etc.) */
54
+ AccountType["RETIREMENT"] = "RETIREMENT";
55
+ /** Other or unclassified account type */
56
+ AccountType["OTHER"] = "OTHER";
57
+ })(AccountType || (exports.AccountType = AccountType = {}));
@@ -0,0 +1,133 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AssetType = void 0;
4
+ /**
5
+ * Classification of financial asset types across all integration sources.
6
+ *
7
+ * AssetType provides standardized categorization for all tradeable, holdable, or
8
+ * stakeable instruments within the CygnusWealth ecosystem. This enum serves as
9
+ * the primary taxonomy for asset classification across CEX, DEX, traditional
10
+ * finance, and DeFi sources.
11
+ *
12
+ * **Design Rationale:**
13
+ * - Covers both traditional finance (stocks, bonds) and crypto (tokens, NFTs, DeFi positions)
14
+ * - Distinguishes between base assets and derivative/yield-generating positions
15
+ * - Extensible via OTHER for edge cases without breaking existing types
16
+ *
17
+ * **Integration Guidance:**
18
+ * - Integration domains should map external classifications to these types
19
+ * - When in doubt between similar types, prefer more specific (e.g., NFT over CRYPTOCURRENCY)
20
+ * - Use metadata field for preserving source-specific asset classifications
21
+ *
22
+ * @example
23
+ * ```typescript
24
+ * // Mapping external asset types
25
+ * function mapRobinhoodAsset(rhAsset: any): AssetType {
26
+ * switch (rhAsset.type) {
27
+ * case 'stock': return AssetType.STOCK;
28
+ * case 'cryptocurrency': return AssetType.CRYPTOCURRENCY;
29
+ * case 'etp': return AssetType.ETF;
30
+ * default: return AssetType.OTHER;
31
+ * }
32
+ * }
33
+ * ```
34
+ *
35
+ * @since 0.0.1
36
+ * @stability core
37
+ *
38
+ * @see {@link Asset} for usage in asset models
39
+ */
40
+ var AssetType;
41
+ (function (AssetType) {
42
+ /**
43
+ * Fungible digital currencies and tokens (BTC, ETH, ERC-20 tokens, SPL tokens).
44
+ *
45
+ * Includes all blockchain-based fungible assets that serve as currencies or
46
+ * utility tokens. Does not include NFTs or DeFi positions (use specific types for those).
47
+ */
48
+ AssetType["CRYPTOCURRENCY"] = "CRYPTOCURRENCY";
49
+ /**
50
+ * Equity securities in publicly traded companies (AAPL, TSLA, etc.).
51
+ *
52
+ * Represents ownership shares in corporations. Sourced from traditional
53
+ * exchanges (NYSE, NASDAQ) via brokerages like Robinhood or Kraken.
54
+ */
55
+ AssetType["STOCK"] = "STOCK";
56
+ /**
57
+ * Exchange-Traded Funds - baskets of securities trading on exchanges (SPY, QQQ).
58
+ *
59
+ * Investment funds that track indices, commodities, or asset baskets and
60
+ * trade like stocks on traditional exchanges.
61
+ */
62
+ AssetType["ETF"] = "ETF";
63
+ /**
64
+ * Mutual funds - professionally managed investment portfolios.
65
+ *
66
+ * Pooled investment vehicles typically accessed through brokerages,
67
+ * not traded on exchanges. Examples: VTSAX, FXAIX.
68
+ */
69
+ AssetType["MUTUAL_FUND"] = "MUTUAL_FUND";
70
+ /**
71
+ * Fixed-income debt securities (government bonds, corporate bonds).
72
+ *
73
+ * Instruments representing loans to governments or corporations with
74
+ * defined interest payments and maturity dates.
75
+ */
76
+ AssetType["BOND"] = "BOND";
77
+ /**
78
+ * Physical goods or raw materials (gold, oil, wheat).
79
+ *
80
+ * Tangible assets traded on commodity exchanges or held as commodities-backed
81
+ * instruments. Includes precious metals, energy, agricultural products.
82
+ */
83
+ AssetType["COMMODITY"] = "COMMODITY";
84
+ /**
85
+ * Government-issued currencies (USD, EUR, JPY).
86
+ *
87
+ * Traditional fiat money held in brokerage cash accounts or wallets.
88
+ * Represents purchasing power in sovereign currencies.
89
+ */
90
+ AssetType["FIAT"] = "FIAT";
91
+ /**
92
+ * Non-fungible tokens - unique digital assets (ERC-721, ERC-1155, Solana NFTs).
93
+ *
94
+ * Blockchain-based unique or semi-fungible assets with distinct identities.
95
+ * Includes art, collectibles, gaming assets, membership tokens.
96
+ */
97
+ AssetType["NFT"] = "NFT";
98
+ /**
99
+ * Financial instruments deriving value from underlying assets (options, futures).
100
+ *
101
+ * Contracts whose value depends on underlying securities, indices, or commodities.
102
+ * Includes options, futures, swaps, and structured products.
103
+ */
104
+ AssetType["DERIVATIVE"] = "DERIVATIVE";
105
+ /**
106
+ * DeFi liquidity pool positions (Uniswap V2/V3 LP, Curve LP tokens).
107
+ *
108
+ * Represents shares in automated market maker (AMM) liquidity pools.
109
+ * These are yield-generating positions, not base assets.
110
+ */
111
+ AssetType["LIQUIDITY_POOL"] = "LIQUIDITY_POOL";
112
+ /**
113
+ * Staked cryptocurrency positions (ETH 2.0 staking, validator delegations).
114
+ *
115
+ * Assets locked in proof-of-stake protocols to earn rewards.
116
+ * Includes direct staking and delegated staking positions.
117
+ */
118
+ AssetType["STAKED_POSITION"] = "STAKED_POSITION";
119
+ /**
120
+ * DeFi lending protocol positions (Aave deposits, Compound supplies).
121
+ *
122
+ * Assets supplied to lending protocols to earn interest.
123
+ * Represents yield-generating positions in money markets.
124
+ */
125
+ AssetType["LENDING_POSITION"] = "LENDING_POSITION";
126
+ /**
127
+ * Catch-all for assets not fitting standard categories.
128
+ *
129
+ * Use sparingly for genuinely novel asset types. Document the specific
130
+ * type in the asset's metadata field for future classification refinement.
131
+ */
132
+ AssetType["OTHER"] = "OTHER";
133
+ })(AssetType || (exports.AssetType = AssetType = {}));
@@ -0,0 +1,73 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Chain = void 0;
4
+ /**
5
+ * Blockchain network identifiers for multi-chain asset tracking.
6
+ *
7
+ * Provides standardized identifiers for all supported blockchain networks.
8
+ * Enables consistent asset identification across EVM chains, alternative L1s,
9
+ * and traditional finance systems.
10
+ *
11
+ * **Design Rationale:**
12
+ * - Covers major EVM chains (Ethereum, Polygon, Arbitrum, Optimism, Avalanche, BSC, Base)
13
+ * - Includes alternative L1s (Solana, SUI, Bitcoin)
14
+ * - Extensible via OTHER for new chains without breaking changes
15
+ * - Chain-agnostic operations use Chain type for abstraction
16
+ *
17
+ * **Integration Guidance:**
18
+ * - Map chain IDs (1, 137, 42161) to these enum values in integration domains
19
+ * - Use Chain.OTHER for unsupported chains, document actual chain in metadata
20
+ * - Testnets should be distinguished in metadata, not separate enum values
21
+ *
22
+ * @example
23
+ * ```typescript
24
+ * function getChainFromId(chainId: number): Chain {
25
+ * const chainMap: Record<number, Chain> = {
26
+ * 1: Chain.ETHEREUM,
27
+ * 137: Chain.POLYGON,
28
+ * 42161: Chain.ARBITRUM,
29
+ * 10: Chain.OPTIMISM,
30
+ * 43114: Chain.AVALANCHE,
31
+ * 56: Chain.BSC,
32
+ * 8453: Chain.BASE
33
+ * };
34
+ * return chainMap[chainId] || Chain.OTHER;
35
+ * }
36
+ * ```
37
+ *
38
+ * @since 0.0.1
39
+ * @stability core
40
+ *
41
+ * @see {@link Asset} for usage in asset identification
42
+ * @see {@link Transaction} for usage in transaction tracking
43
+ */
44
+ var Chain;
45
+ (function (Chain) {
46
+ /** Ethereum mainnet (Chain ID: 1) - Primary EVM L1 */
47
+ Chain["ETHEREUM"] = "ETHEREUM";
48
+ /** Polygon PoS (Chain ID: 137) - EVM sidechain for Ethereum */
49
+ Chain["POLYGON"] = "POLYGON";
50
+ /** Arbitrum One (Chain ID: 42161) - Optimistic rollup L2 for Ethereum */
51
+ Chain["ARBITRUM"] = "ARBITRUM";
52
+ /** Optimism (Chain ID: 10) - Optimistic rollup L2 for Ethereum */
53
+ Chain["OPTIMISM"] = "OPTIMISM";
54
+ /** Avalanche C-Chain (Chain ID: 43114) - EVM-compatible L1 */
55
+ Chain["AVALANCHE"] = "AVALANCHE";
56
+ /** Binance Smart Chain (Chain ID: 56) - EVM-compatible chain */
57
+ Chain["BSC"] = "BSC";
58
+ /** Base (Chain ID: 8453) - Coinbase's Optimistic rollup L2 */
59
+ Chain["BASE"] = "BASE";
60
+ /** Solana mainnet - High-performance L1, non-EVM */
61
+ Chain["SOLANA"] = "SOLANA";
62
+ /** SUI mainnet - Move-based L1, non-EVM */
63
+ Chain["SUI"] = "SUI";
64
+ /** Bitcoin mainnet - Original blockchain, UTXO model */
65
+ Chain["BITCOIN"] = "BITCOIN";
66
+ /**
67
+ * Unsupported or emerging chains.
68
+ *
69
+ * Use for chains not yet explicitly enumerated. Store actual chain
70
+ * identifier in asset metadata for future classification.
71
+ */
72
+ Chain["OTHER"] = "OTHER";
73
+ })(Chain || (exports.Chain = Chain = {}));
@@ -0,0 +1,69 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.IntegrationSource = void 0;
4
+ /**
5
+ * Data source identifiers for integration traceability.
6
+ *
7
+ * Tracks origin of data flowing through the system, enabling source-specific
8
+ * logic, validation, and troubleshooting. This comprehensive enum covers centralized
9
+ * exchanges (CEXs), decentralized exchanges (DEXs), wallet providers, and manual entries.
10
+ *
11
+ * @example
12
+ * ```typescript
13
+ * import { IntegrationSource } from '@cygnus-wealth/data-models';
14
+ *
15
+ * // Identify data source for routing logic
16
+ * function processAccountData(source: IntegrationSource) {
17
+ * switch(source) {
18
+ * case IntegrationSource.ROBINHOOD:
19
+ * return fetchCEXData();
20
+ * case IntegrationSource.UNISWAP:
21
+ * return fetchDEXData();
22
+ * case IntegrationSource.METAMASK:
23
+ * return fetchWalletData();
24
+ * default:
25
+ * return fetchGenericData();
26
+ * }
27
+ * }
28
+ * ```
29
+ *
30
+ * @since 0.0.1
31
+ * @stability standard
32
+ */
33
+ var IntegrationSource;
34
+ (function (IntegrationSource) {
35
+ /** Robinhood centralized exchange */
36
+ IntegrationSource["ROBINHOOD"] = "ROBINHOOD";
37
+ /** Kraken centralized exchange */
38
+ IntegrationSource["KRAKEN"] = "KRAKEN";
39
+ /** Coinbase centralized exchange */
40
+ IntegrationSource["COINBASE"] = "COINBASE";
41
+ /** Binance centralized exchange */
42
+ IntegrationSource["BINANCE"] = "BINANCE";
43
+ /** Uniswap decentralized exchange */
44
+ IntegrationSource["UNISWAP"] = "UNISWAP";
45
+ /** SushiSwap decentralized exchange */
46
+ IntegrationSource["SUSHISWAP"] = "SUSHISWAP";
47
+ /** PancakeSwap decentralized exchange */
48
+ IntegrationSource["PANCAKESWAP"] = "PANCAKESWAP";
49
+ /** Curve Finance decentralized exchange */
50
+ IntegrationSource["CURVE"] = "CURVE";
51
+ /** Balancer decentralized exchange */
52
+ IntegrationSource["BALANCER"] = "BALANCER";
53
+ /** MetaMask wallet provider */
54
+ IntegrationSource["METAMASK"] = "METAMASK";
55
+ /** Rabby wallet provider */
56
+ IntegrationSource["RABBY"] = "RABBY";
57
+ /** Phantom wallet provider (Solana) */
58
+ IntegrationSource["PHANTOM"] = "PHANTOM";
59
+ /** Slush wallet provider (SUI) */
60
+ IntegrationSource["SLUSH"] = "SLUSH";
61
+ /** Suiet wallet provider (SUI) */
62
+ IntegrationSource["SUIET"] = "SUIET";
63
+ /** Manually entered data by user */
64
+ IntegrationSource["MANUAL_ENTRY"] = "MANUAL_ENTRY";
65
+ /** Data fetched directly from blockchain via RPC */
66
+ IntegrationSource["BLOCKCHAIN_DIRECT"] = "BLOCKCHAIN_DIRECT";
67
+ /** Other or unclassified data source */
68
+ IntegrationSource["OTHER"] = "OTHER";
69
+ })(IntegrationSource || (exports.IntegrationSource = IntegrationSource = {}));
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.LendingPositionType = void 0;
4
+ /**
5
+ * Type of lending position: supply (lender) or borrow (borrower).
6
+ *
7
+ * Discriminates between assets deposited to earn interest (SUPPLY) and
8
+ * assets borrowed while paying interest (BORROW) in DeFi lending protocols.
9
+ *
10
+ * @example
11
+ * ```typescript
12
+ * import { LendingPositionType } from '@cygnus-wealth/data-models';
13
+ *
14
+ * const supplyType = LendingPositionType.SUPPLY;
15
+ * const borrowType = LendingPositionType.BORROW;
16
+ * ```
17
+ *
18
+ * @since 0.2.0
19
+ * @stability core
20
+ *
21
+ * @see {@link LendingPosition} for usage in lending positions
22
+ */
23
+ var LendingPositionType;
24
+ (function (LendingPositionType) {
25
+ /** User supplied assets earning interest (lender) */
26
+ LendingPositionType["SUPPLY"] = "SUPPLY";
27
+ /** User borrowed assets paying interest (borrower) */
28
+ LendingPositionType["BORROW"] = "BORROW";
29
+ })(LendingPositionType || (exports.LendingPositionType = LendingPositionType = {}));
@@ -0,0 +1,75 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TransactionType = void 0;
4
+ /**
5
+ * Standardized transaction type classification.
6
+ *
7
+ * Unified categorization for all financial operations across CEX, DEX,
8
+ * blockchain transfers, and DeFi protocols. Enables consistent transaction
9
+ * history and analytics across all integration sources.
10
+ *
11
+ * @example
12
+ * ```typescript
13
+ * import { TransactionType } from '@cygnus-wealth/data-models';
14
+ *
15
+ * // Classify transaction based on operation
16
+ * function getTransactionIcon(type: TransactionType): string {
17
+ * switch(type) {
18
+ * case TransactionType.BUY:
19
+ * return '📈';
20
+ * case TransactionType.SELL:
21
+ * return '📉';
22
+ * case TransactionType.STAKE:
23
+ * return '🔒';
24
+ * case TransactionType.SWAP:
25
+ * return '🔄';
26
+ * default:
27
+ * return '📄';
28
+ * }
29
+ * }
30
+ * ```
31
+ *
32
+ * @since 0.0.1
33
+ * @stability standard
34
+ */
35
+ var TransactionType;
36
+ (function (TransactionType) {
37
+ /** Purchase of an asset with fiat or another asset */
38
+ TransactionType["BUY"] = "BUY";
39
+ /** Sale of an asset for fiat or another asset */
40
+ TransactionType["SELL"] = "SELL";
41
+ /** Incoming transfer of assets to account */
42
+ TransactionType["TRANSFER_IN"] = "TRANSFER_IN";
43
+ /** Outgoing transfer of assets from account */
44
+ TransactionType["TRANSFER_OUT"] = "TRANSFER_OUT";
45
+ /** Exchange of one asset for another via DEX or CEX */
46
+ TransactionType["SWAP"] = "SWAP";
47
+ /** Locking assets for staking rewards */
48
+ TransactionType["STAKE"] = "STAKE";
49
+ /** Unlocking previously staked assets */
50
+ TransactionType["UNSTAKE"] = "UNSTAKE";
51
+ /** Claiming earned staking or liquidity rewards */
52
+ TransactionType["CLAIM_REWARD"] = "CLAIM_REWARD";
53
+ /** Adding assets to a liquidity pool */
54
+ TransactionType["PROVIDE_LIQUIDITY"] = "PROVIDE_LIQUIDITY";
55
+ /** Removing assets from a liquidity pool */
56
+ TransactionType["REMOVE_LIQUIDITY"] = "REMOVE_LIQUIDITY";
57
+ /** Borrowing assets from a lending protocol */
58
+ TransactionType["BORROW"] = "BORROW";
59
+ /** Repaying borrowed assets to a lending protocol */
60
+ TransactionType["REPAY"] = "REPAY";
61
+ /** Forced liquidation of collateralized position */
62
+ TransactionType["LIQUIDATION"] = "LIQUIDATION";
63
+ /** Creation of new tokens (NFT minting, token minting) */
64
+ TransactionType["MINT"] = "MINT";
65
+ /** Destruction of tokens */
66
+ TransactionType["BURN"] = "BURN";
67
+ /** Transaction fee payment */
68
+ TransactionType["FEE"] = "FEE";
69
+ /** Dividend payment received */
70
+ TransactionType["DIVIDEND"] = "DIVIDEND";
71
+ /** Interest payment received or paid */
72
+ TransactionType["INTEREST"] = "INTEREST";
73
+ /** Other or unclassified transaction type */
74
+ TransactionType["OTHER"] = "OTHER";
75
+ })(TransactionType || (exports.TransactionType = TransactionType = {}));
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.LendingPositionType = exports.AccountType = exports.TransactionType = exports.IntegrationSource = exports.Chain = exports.AssetType = void 0;
4
+ // Enums
5
+ var AssetType_1 = require("./enums/AssetType");
6
+ Object.defineProperty(exports, "AssetType", { enumerable: true, get: function () { return AssetType_1.AssetType; } });
7
+ var Chain_1 = require("./enums/Chain");
8
+ Object.defineProperty(exports, "Chain", { enumerable: true, get: function () { return Chain_1.Chain; } });
9
+ var IntegrationSource_1 = require("./enums/IntegrationSource");
10
+ Object.defineProperty(exports, "IntegrationSource", { enumerable: true, get: function () { return IntegrationSource_1.IntegrationSource; } });
11
+ var TransactionType_1 = require("./enums/TransactionType");
12
+ Object.defineProperty(exports, "TransactionType", { enumerable: true, get: function () { return TransactionType_1.TransactionType; } });
13
+ var AccountType_1 = require("./enums/AccountType");
14
+ Object.defineProperty(exports, "AccountType", { enumerable: true, get: function () { return AccountType_1.AccountType; } });
15
+ var LendingPositionType_1 = require("./enums/LendingPositionType");
16
+ Object.defineProperty(exports, "LendingPositionType", { enumerable: true, get: function () { return LendingPositionType_1.LendingPositionType; } });
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1 @@
1
+ {"type":"commonjs"}
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/package.json CHANGED
@@ -1,49 +1,59 @@
1
1
  {
2
2
  "name": "@cygnus-wealth/data-models",
3
- "version": "1.1.1",
3
+ "version": "1.1.2",
4
4
  "description": "Shared TypeScript data models for CygnusWealth project",
5
- "main": "dist/index.js",
5
+ "main": "dist/cjs/index.js",
6
+ "module": "dist/index.js",
6
7
  "types": "dist/index.d.ts",
7
8
  "exports": {
8
9
  ".": {
9
10
  "types": "./dist/index.d.ts",
10
- "import": "./dist/index.js"
11
+ "import": "./dist/index.js",
12
+ "require": "./dist/cjs/index.js"
11
13
  },
12
14
  "./enums/AssetType": {
13
15
  "types": "./dist/enums/AssetType.d.ts",
14
- "import": "./dist/enums/AssetType.js"
16
+ "import": "./dist/enums/AssetType.js",
17
+ "require": "./dist/cjs/enums/AssetType.js"
15
18
  },
16
19
  "./enums/Chain": {
17
20
  "types": "./dist/enums/Chain.d.ts",
18
- "import": "./dist/enums/Chain.js"
21
+ "import": "./dist/enums/Chain.js",
22
+ "require": "./dist/cjs/enums/Chain.js"
19
23
  },
20
24
  "./enums/IntegrationSource": {
21
25
  "types": "./dist/enums/IntegrationSource.d.ts",
22
- "import": "./dist/enums/IntegrationSource.js"
26
+ "import": "./dist/enums/IntegrationSource.js",
27
+ "require": "./dist/cjs/enums/IntegrationSource.js"
23
28
  },
24
29
  "./enums/TransactionType": {
25
30
  "types": "./dist/enums/TransactionType.d.ts",
26
- "import": "./dist/enums/TransactionType.js"
31
+ "import": "./dist/enums/TransactionType.js",
32
+ "require": "./dist/cjs/enums/TransactionType.js"
27
33
  },
28
34
  "./enums/AccountType": {
29
35
  "types": "./dist/enums/AccountType.d.ts",
30
- "import": "./dist/enums/AccountType.js"
36
+ "import": "./dist/enums/AccountType.js",
37
+ "require": "./dist/cjs/enums/AccountType.js"
31
38
  },
32
39
  "./enums/LendingPositionType": {
33
40
  "types": "./dist/enums/LendingPositionType.d.ts",
34
- "import": "./dist/enums/LendingPositionType.js"
41
+ "import": "./dist/enums/LendingPositionType.js",
42
+ "require": "./dist/cjs/enums/LendingPositionType.js"
35
43
  },
36
44
  "./interfaces/*": {
37
45
  "types": "./dist/interfaces/*.d.ts",
38
- "import": "./dist/interfaces/*.js"
46
+ "import": "./dist/interfaces/*.js",
47
+ "require": "./dist/cjs/interfaces/*.js"
39
48
  },
40
49
  "./types/*": {
41
50
  "types": "./dist/types/*.d.ts",
42
- "import": "./dist/types/*.js"
51
+ "import": "./dist/types/*.js",
52
+ "require": "./dist/cjs/types/*.js"
43
53
  }
44
54
  },
45
55
  "scripts": {
46
- "build": "tsc",
56
+ "build": "tsc && tsc -p tsconfig.cjs.json && echo '{\"type\":\"commonjs\"}' > dist/cjs/package.json",
47
57
  "test": "vitest",
48
58
  "test:run": "vitest --run",
49
59
  "test:coverage": "vitest --coverage --run",