@cygnus-wealth/data-models 0.0.1 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/dist/enums/AccountType.js +13 -0
  2. package/dist/enums/AssetType.js +16 -0
  3. package/dist/enums/Chain.d.ts +1 -0
  4. package/dist/enums/Chain.js +14 -0
  5. package/dist/enums/IntegrationSource.d.ts +1 -0
  6. package/dist/enums/IntegrationSource.js +24 -0
  7. package/dist/enums/TransactionType.js +22 -0
  8. package/dist/index.d.ts +1 -0
  9. package/dist/index.js +6 -0
  10. package/dist/interfaces/Account.js +1 -0
  11. package/dist/interfaces/ApiError.js +1 -0
  12. package/dist/interfaces/ApiResponse.js +1 -0
  13. package/dist/interfaces/Asset.js +1 -0
  14. package/dist/interfaces/Balance.js +1 -0
  15. package/dist/interfaces/BaseEntity.js +1 -0
  16. package/dist/interfaces/FilterOptions.js +1 -0
  17. package/dist/interfaces/IntegrationCredentials.js +1 -0
  18. package/dist/interfaces/LendingPosition.js +1 -0
  19. package/dist/interfaces/LiquidityPosition.js +1 -0
  20. package/dist/interfaces/MarketData.js +1 -0
  21. package/dist/interfaces/Metadata.js +1 -0
  22. package/dist/interfaces/NFT.js +1 -0
  23. package/dist/interfaces/PaginatedResponse.js +1 -0
  24. package/dist/interfaces/Portfolio.d.ts +6 -2
  25. package/dist/interfaces/Portfolio.js +1 -0
  26. package/dist/interfaces/PortfolioAsset.d.ts +13 -0
  27. package/dist/interfaces/PortfolioAsset.js +1 -0
  28. package/dist/interfaces/PortfolioItem.js +1 -0
  29. package/dist/interfaces/Price.d.ts +3 -2
  30. package/dist/interfaces/Price.js +1 -0
  31. package/dist/interfaces/StakedPosition.js +1 -0
  32. package/dist/interfaces/SyncStatus.js +1 -0
  33. package/dist/interfaces/Transaction.js +1 -0
  34. package/dist/types/AssetIdentifier.js +1 -0
  35. package/dist/types/SortOrder.js +1 -0
  36. package/dist/types/TimeRange.js +1 -0
  37. package/package.json +1 -1
@@ -0,0 +1,13 @@
1
+ export var AccountType;
2
+ (function (AccountType) {
3
+ AccountType["SPOT"] = "SPOT";
4
+ AccountType["MARGIN"] = "MARGIN";
5
+ AccountType["FUTURES"] = "FUTURES";
6
+ AccountType["SAVINGS"] = "SAVINGS";
7
+ AccountType["STAKING"] = "STAKING";
8
+ AccountType["WALLET"] = "WALLET";
9
+ AccountType["DEFI"] = "DEFI";
10
+ AccountType["BROKERAGE"] = "BROKERAGE";
11
+ AccountType["RETIREMENT"] = "RETIREMENT";
12
+ AccountType["OTHER"] = "OTHER";
13
+ })(AccountType || (AccountType = {}));
@@ -0,0 +1,16 @@
1
+ export var AssetType;
2
+ (function (AssetType) {
3
+ AssetType["CRYPTOCURRENCY"] = "CRYPTOCURRENCY";
4
+ AssetType["STOCK"] = "STOCK";
5
+ AssetType["ETF"] = "ETF";
6
+ AssetType["MUTUAL_FUND"] = "MUTUAL_FUND";
7
+ AssetType["BOND"] = "BOND";
8
+ AssetType["COMMODITY"] = "COMMODITY";
9
+ AssetType["FIAT"] = "FIAT";
10
+ AssetType["NFT"] = "NFT";
11
+ AssetType["DERIVATIVE"] = "DERIVATIVE";
12
+ AssetType["LIQUIDITY_POOL"] = "LIQUIDITY_POOL";
13
+ AssetType["STAKED_POSITION"] = "STAKED_POSITION";
14
+ AssetType["LENDING_POSITION"] = "LENDING_POSITION";
15
+ AssetType["OTHER"] = "OTHER";
16
+ })(AssetType || (AssetType = {}));
@@ -5,6 +5,7 @@ export declare enum Chain {
5
5
  OPTIMISM = "OPTIMISM",
6
6
  AVALANCHE = "AVALANCHE",
7
7
  BSC = "BSC",
8
+ BASE = "BASE",
8
9
  SOLANA = "SOLANA",
9
10
  SUI = "SUI",
10
11
  BITCOIN = "BITCOIN",
@@ -0,0 +1,14 @@
1
+ export var Chain;
2
+ (function (Chain) {
3
+ Chain["ETHEREUM"] = "ETHEREUM";
4
+ Chain["POLYGON"] = "POLYGON";
5
+ Chain["ARBITRUM"] = "ARBITRUM";
6
+ Chain["OPTIMISM"] = "OPTIMISM";
7
+ Chain["AVALANCHE"] = "AVALANCHE";
8
+ Chain["BSC"] = "BSC";
9
+ Chain["BASE"] = "BASE";
10
+ Chain["SOLANA"] = "SOLANA";
11
+ Chain["SUI"] = "SUI";
12
+ Chain["BITCOIN"] = "BITCOIN";
13
+ Chain["OTHER"] = "OTHER";
14
+ })(Chain || (Chain = {}));
@@ -12,6 +12,7 @@ export declare enum IntegrationSource {
12
12
  RABBY = "RABBY",
13
13
  PHANTOM = "PHANTOM",
14
14
  SLUSH = "SLUSH",
15
+ SUIET = "SUIET",
15
16
  MANUAL_ENTRY = "MANUAL_ENTRY",
16
17
  BLOCKCHAIN_DIRECT = "BLOCKCHAIN_DIRECT",
17
18
  OTHER = "OTHER"
@@ -0,0 +1,24 @@
1
+ export var IntegrationSource;
2
+ (function (IntegrationSource) {
3
+ // CEXs
4
+ IntegrationSource["ROBINHOOD"] = "ROBINHOOD";
5
+ IntegrationSource["KRAKEN"] = "KRAKEN";
6
+ IntegrationSource["COINBASE"] = "COINBASE";
7
+ IntegrationSource["BINANCE"] = "BINANCE";
8
+ // DEXs
9
+ IntegrationSource["UNISWAP"] = "UNISWAP";
10
+ IntegrationSource["SUSHISWAP"] = "SUSHISWAP";
11
+ IntegrationSource["PANCAKESWAP"] = "PANCAKESWAP";
12
+ IntegrationSource["CURVE"] = "CURVE";
13
+ IntegrationSource["BALANCER"] = "BALANCER";
14
+ // Wallets
15
+ IntegrationSource["METAMASK"] = "METAMASK";
16
+ IntegrationSource["RABBY"] = "RABBY";
17
+ IntegrationSource["PHANTOM"] = "PHANTOM";
18
+ IntegrationSource["SLUSH"] = "SLUSH";
19
+ IntegrationSource["SUIET"] = "SUIET";
20
+ // Other
21
+ IntegrationSource["MANUAL_ENTRY"] = "MANUAL_ENTRY";
22
+ IntegrationSource["BLOCKCHAIN_DIRECT"] = "BLOCKCHAIN_DIRECT";
23
+ IntegrationSource["OTHER"] = "OTHER";
24
+ })(IntegrationSource || (IntegrationSource = {}));
@@ -0,0 +1,22 @@
1
+ export var TransactionType;
2
+ (function (TransactionType) {
3
+ TransactionType["BUY"] = "BUY";
4
+ TransactionType["SELL"] = "SELL";
5
+ TransactionType["TRANSFER_IN"] = "TRANSFER_IN";
6
+ TransactionType["TRANSFER_OUT"] = "TRANSFER_OUT";
7
+ TransactionType["SWAP"] = "SWAP";
8
+ TransactionType["STAKE"] = "STAKE";
9
+ TransactionType["UNSTAKE"] = "UNSTAKE";
10
+ TransactionType["CLAIM_REWARD"] = "CLAIM_REWARD";
11
+ TransactionType["PROVIDE_LIQUIDITY"] = "PROVIDE_LIQUIDITY";
12
+ TransactionType["REMOVE_LIQUIDITY"] = "REMOVE_LIQUIDITY";
13
+ TransactionType["BORROW"] = "BORROW";
14
+ TransactionType["REPAY"] = "REPAY";
15
+ TransactionType["LIQUIDATION"] = "LIQUIDATION";
16
+ TransactionType["MINT"] = "MINT";
17
+ TransactionType["BURN"] = "BURN";
18
+ TransactionType["FEE"] = "FEE";
19
+ TransactionType["DIVIDEND"] = "DIVIDEND";
20
+ TransactionType["INTEREST"] = "INTEREST";
21
+ TransactionType["OTHER"] = "OTHER";
22
+ })(TransactionType || (TransactionType = {}));
package/dist/index.d.ts CHANGED
@@ -15,6 +15,7 @@ export { StakedPosition } from './interfaces/StakedPosition';
15
15
  export { LendingPosition } from './interfaces/LendingPosition';
16
16
  export { Account } from './interfaces/Account';
17
17
  export { Portfolio } from './interfaces/Portfolio';
18
+ export { PortfolioAsset } from './interfaces/PortfolioAsset';
18
19
  export { Transaction } from './interfaces/Transaction';
19
20
  export { IntegrationCredentials } from './interfaces/IntegrationCredentials';
20
21
  export { SyncStatus } from './interfaces/SyncStatus';
package/dist/index.js ADDED
@@ -0,0 +1,6 @@
1
+ // Enums
2
+ export { AssetType } from './enums/AssetType';
3
+ export { Chain } from './enums/Chain';
4
+ export { IntegrationSource } from './enums/IntegrationSource';
5
+ export { TransactionType } from './enums/TransactionType';
6
+ export { AccountType } from './enums/AccountType';
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -1,10 +1,13 @@
1
1
  import { Account } from './Account';
2
2
  import { Price } from './Price';
3
+ import { PortfolioAsset } from './PortfolioAsset';
4
+ import { Metadata } from './Metadata';
3
5
  export interface Portfolio {
4
6
  id: string;
5
- userId: string;
7
+ userId?: string;
6
8
  name: string;
7
- accounts: Account[];
9
+ accounts?: Account[];
10
+ items?: PortfolioAsset[];
8
11
  totalValue: Price;
9
12
  totalValueHistory?: Array<{
10
13
  timestamp: Date;
@@ -18,4 +21,5 @@ export interface Portfolio {
18
21
  all_time: number;
19
22
  };
20
23
  lastUpdated: Date;
24
+ metadata?: Metadata;
21
25
  }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,13 @@
1
+ import { Asset } from './Asset';
2
+ import { Balance } from './Balance';
3
+ import { Price } from './Price';
4
+ export interface PortfolioAsset {
5
+ id: string;
6
+ accountId: string;
7
+ assetId: string;
8
+ asset: Asset;
9
+ balance: Balance;
10
+ value: Price;
11
+ allocation: number;
12
+ lastUpdated: Date;
13
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -1,7 +1,8 @@
1
1
  import { IntegrationSource } from '../enums/IntegrationSource';
2
2
  export interface Price {
3
- value: number;
3
+ value?: number;
4
+ amount?: number;
4
5
  currency: string;
5
6
  timestamp: Date;
6
- source: IntegrationSource;
7
+ source?: IntegrationSource;
7
8
  }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cygnus-wealth/data-models",
3
- "version": "0.0.1",
3
+ "version": "0.0.3",
4
4
  "description": "Shared TypeScript data models for CygnusWealth project",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",