@anrmk/str-package 0.1.1 → 0.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.
package/README.md CHANGED
@@ -59,24 +59,36 @@ npm run build
59
59
 
60
60
  ## Publish Updates (Push)
61
61
 
62
- When you change package code and want consumers to receive updates:
62
+ When you change the package code and want consumers to receive updates, you need to ensure that the new code is compatible with the existing system.
63
63
 
64
- 1. Bump package version:
64
+ Bump package version:
65
65
 
66
66
  ```bash
67
67
  npm version patch
68
68
  ```
69
+ 2. Make sure your account is valid and you have an access
70
+
71
+ Fix npm cache ownership (one time)
72
+ ```
73
+ sudo chown -R 501:20 /Users/anrmk/.npm
74
+ ```
75
+ Re-authenticate as your npm account
76
+ ```
77
+ npm logout
78
+ npm login
79
+ npm whoami
80
+ ```
69
81
 
70
82
  Use `minor` or `major` when needed.
71
83
 
72
- 2. Build and publish:
84
+ 3. Build and publish:
73
85
 
74
86
  ```bash
75
87
  npm run build
76
88
  npm publish --access public
77
89
  ```
78
90
 
79
- 3. Push git commit and tags:
91
+ 4. Push git commit and tags:
80
92
 
81
93
  ```bash
82
94
  git push origin main --tags
@@ -1,4 +1,4 @@
1
- import { I as IBybitAccountType } from './enums-CvsmYKeP.js';
1
+ import { I as IBybitAccountType } from './enums--bdw39rp.js';
2
2
 
3
3
  type TChallengeClosedPnl = {
4
4
  challengeId: string;
@@ -1,4 +1,4 @@
1
- import { I as IBybitAccountType } from './enums-CvsmYKeP.cjs';
1
+ import { I as IBybitAccountType } from './enums--bdw39rp.cjs';
2
2
 
3
3
  type TChallengeClosedPnl = {
4
4
  challengeId: string;
@@ -15,5 +15,13 @@ declare enum IBybitUnifiedMarginStatus {
15
15
  UNIFIED_TRADING_ACCOUNT_2_0 = 5,
16
16
  UNIFIED_TRADING_ACCOUNT_2_0_PRO = 6
17
17
  }
18
+ declare enum IBybitApiKeyVipLevel {
19
+ NO_VIP = "No VIP",
20
+ VIP_1 = "VIP 1",
21
+ VIP_2 = "VIP 2",
22
+ VIP_3 = "VIP 3",
23
+ VIP_4 = "VIP 4",
24
+ VIP_5 = "VIP 5"
25
+ }
18
26
 
19
- export { IBybitAccountType as I, IBybitCoinType as a, IBybitUnifiedMarginStatus as b };
27
+ export { IBybitAccountType as I, IBybitApiKeyVipLevel as a, IBybitCoinType as b, IBybitUnifiedMarginStatus as c };
@@ -15,5 +15,13 @@ declare enum IBybitUnifiedMarginStatus {
15
15
  UNIFIED_TRADING_ACCOUNT_2_0 = 5,
16
16
  UNIFIED_TRADING_ACCOUNT_2_0_PRO = 6
17
17
  }
18
+ declare enum IBybitApiKeyVipLevel {
19
+ NO_VIP = "No VIP",
20
+ VIP_1 = "VIP 1",
21
+ VIP_2 = "VIP 2",
22
+ VIP_3 = "VIP 3",
23
+ VIP_4 = "VIP 4",
24
+ VIP_5 = "VIP 5"
25
+ }
18
26
 
19
- export { IBybitAccountType as I, IBybitCoinType as a, IBybitUnifiedMarginStatus as b };
27
+ export { IBybitAccountType as I, IBybitApiKeyVipLevel as a, IBybitCoinType as b, IBybitUnifiedMarginStatus as c };
package/dist/index.d.cts CHANGED
@@ -5,5 +5,5 @@ export { isSameUtcDay, parseNumber, toIsoDate } from './utils/helper.cjs';
5
5
  export { TSyncResponse } from './types/index.cjs';
6
6
  export { IBybitAccountInfo, IBybitApiKeyInfo, IBybitApiResponse, IBybitApiResponseList, IBybitClosedPnl, IBybitClosedPnlRequest, IBybitClosedPnlResponse, IBybitCoinBalance, IBybitCredentials, IBybitDemoApplyMoneyItem, IBybitDemoApplyMoneyPayload, IBybitDemoApplyMoneyRequest, IBybitDemoApplyMoneyResponse, IBybitPositionInfo, IBybitWalletAccount, IBybitWalletResponse } from './types/bybit/index.cjs';
7
7
  export { TChallengeAccountInfo, TChallengeApiKeyInfo, TChallengeCapital, TChallengeItem, TChallengeListItem, TChallengeMode, TChallengePositionInfo, TChallengeProvider, TChallengeRule, TChallengeStatistics, TChallengeType, TDrawdownType, TTradingType } from './types/challenge/index.cjs';
8
- export { T as TChallengeClosedPnl, a as TChallengeClosedPnlStatistics, b as TChallengeProgress, c as TChallengeWalletBalance } from './TChallengeProgress-DkZ0Q0Zu.cjs';
9
- export { I as IBybitAccountType, a as IBybitCoinType } from './enums-CvsmYKeP.cjs';
8
+ export { T as TChallengeClosedPnl, a as TChallengeClosedPnlStatistics, b as TChallengeProgress, c as TChallengeWalletBalance } from './TChallengeProgress-Dw7FSPNm.cjs';
9
+ export { I as IBybitAccountType, a as IBybitApiKeyVipLevel, b as IBybitCoinType } from './enums--bdw39rp.cjs';
package/dist/index.d.ts CHANGED
@@ -5,5 +5,5 @@ export { isSameUtcDay, parseNumber, toIsoDate } from './utils/helper.js';
5
5
  export { TSyncResponse } from './types/index.js';
6
6
  export { IBybitAccountInfo, IBybitApiKeyInfo, IBybitApiResponse, IBybitApiResponseList, IBybitClosedPnl, IBybitClosedPnlRequest, IBybitClosedPnlResponse, IBybitCoinBalance, IBybitCredentials, IBybitDemoApplyMoneyItem, IBybitDemoApplyMoneyPayload, IBybitDemoApplyMoneyRequest, IBybitDemoApplyMoneyResponse, IBybitPositionInfo, IBybitWalletAccount, IBybitWalletResponse } from './types/bybit/index.js';
7
7
  export { TChallengeAccountInfo, TChallengeApiKeyInfo, TChallengeCapital, TChallengeItem, TChallengeListItem, TChallengeMode, TChallengePositionInfo, TChallengeProvider, TChallengeRule, TChallengeStatistics, TChallengeType, TDrawdownType, TTradingType } from './types/challenge/index.js';
8
- export { T as TChallengeClosedPnl, a as TChallengeClosedPnlStatistics, b as TChallengeProgress, c as TChallengeWalletBalance } from './TChallengeProgress-e8E5Z7Tn.js';
9
- export { I as IBybitAccountType, a as IBybitCoinType } from './enums-CvsmYKeP.js';
8
+ export { T as TChallengeClosedPnl, a as TChallengeClosedPnlStatistics, b as TChallengeProgress, c as TChallengeWalletBalance } from './TChallengeProgress-B9ZKiMB2.js';
9
+ export { I as IBybitAccountType, a as IBybitApiKeyVipLevel, b as IBybitCoinType } from './enums--bdw39rp.js';
@@ -1,5 +1,5 @@
1
1
  import { IBybitCredentials, IBybitApiResponse, IBybitApiKeyInfo, IBybitAccountInfo, IBybitWalletAccount, IBybitApiResponseList, IBybitClosedPnl, IBybitPositionInfo, IBybitDemoApplyMoneyRequest, IBybitDemoApplyMoneyResponse as IBybitDemoApplyMoney } from '../../types/bybit/index.cjs';
2
- import '../../enums-CvsmYKeP.cjs';
2
+ import '../../enums--bdw39rp.cjs';
3
3
 
4
4
  declare function getApiKeyInfo(credentials: IBybitCredentials): Promise<IBybitApiResponse<IBybitApiKeyInfo>>;
5
5
 
@@ -1,5 +1,5 @@
1
1
  import { IBybitCredentials, IBybitApiResponse, IBybitApiKeyInfo, IBybitAccountInfo, IBybitWalletAccount, IBybitApiResponseList, IBybitClosedPnl, IBybitPositionInfo, IBybitDemoApplyMoneyRequest, IBybitDemoApplyMoneyResponse as IBybitDemoApplyMoney } from '../../types/bybit/index.js';
2
- import '../../enums-CvsmYKeP.js';
2
+ import '../../enums--bdw39rp.js';
3
3
 
4
4
  declare function getApiKeyInfo(credentials: IBybitCredentials): Promise<IBybitApiResponse<IBybitApiKeyInfo>>;
5
5
 
@@ -1,4 +1,5 @@
1
- import { I as IBybitAccountType, b as IBybitUnifiedMarginStatus, a as IBybitCoinType } from '../../enums-CvsmYKeP.cjs';
1
+ import { I as IBybitAccountType, c as IBybitUnifiedMarginStatus, b as IBybitCoinType } from '../../enums--bdw39rp.cjs';
2
+ export { a as IBybitApiKeyVipLevel } from '../../enums--bdw39rp.cjs';
2
3
 
3
4
  type IBybitWalletAccount = {
4
5
  accountIMRate: string;
@@ -1,4 +1,5 @@
1
- import { I as IBybitAccountType, b as IBybitUnifiedMarginStatus, a as IBybitCoinType } from '../../enums-CvsmYKeP.js';
1
+ import { I as IBybitAccountType, c as IBybitUnifiedMarginStatus, b as IBybitCoinType } from '../../enums--bdw39rp.js';
2
+ export { a as IBybitApiKeyVipLevel } from '../../enums--bdw39rp.js';
2
3
 
3
4
  type IBybitWalletAccount = {
4
5
  accountIMRate: string;
@@ -1,7 +1,7 @@
1
- import { b as TChallengeProgress, c as TChallengeWalletBalance } from '../../TChallengeProgress-DkZ0Q0Zu.cjs';
2
- export { T as TChallengeClosedPnl, a as TChallengeClosedPnlStatistics } from '../../TChallengeProgress-DkZ0Q0Zu.cjs';
1
+ import { a as IBybitApiKeyVipLevel } from '../../enums--bdw39rp.cjs';
2
+ import { b as TChallengeProgress, c as TChallengeWalletBalance } from '../../TChallengeProgress-Dw7FSPNm.cjs';
3
+ export { T as TChallengeClosedPnl, a as TChallengeClosedPnlStatistics } from '../../TChallengeProgress-Dw7FSPNm.cjs';
3
4
  export { TSyncResponse } from '../index.cjs';
4
- import '../../enums-CvsmYKeP.cjs';
5
5
 
6
6
  type TChallengeType = "ONE_STEP" | "TWO_STEPS";
7
7
  type TChallengeMode = "VERIFICATION" | "CHALLENGE" | "FUNDED";
@@ -33,7 +33,32 @@ type TChallengeAccountInfo = {
33
33
  updatedAt: string;
34
34
  };
35
35
 
36
- type TChallengeApiKeyInfo = {};
36
+ type TChallengeApiKeyInfo = {
37
+ challengeId: string;
38
+ bybitApiKeyId: string;
39
+ note: string;
40
+ apiKey: string;
41
+ readOnly: boolean;
42
+ permissions: string[];
43
+ ips: string[];
44
+ type: number;
45
+ deadlineDay: number;
46
+ expiredAt: string;
47
+ createdAt: string;
48
+ uta: string;
49
+ userId: string;
50
+ inviterId: string;
51
+ vipLevel: IBybitApiKeyVipLevel;
52
+ marketMakerLevel: number;
53
+ affiliateId: string;
54
+ rsaPublicKey: string;
55
+ isMaster: boolean;
56
+ parentUid: string;
57
+ kycLevel: number;
58
+ kycRegion: string;
59
+ hasCredentials: boolean;
60
+ readonly updatedAt: string;
61
+ };
37
62
 
38
63
  type TChallengePositionInfo = {
39
64
  symbol: string;
@@ -78,6 +103,7 @@ type TChallengeItem = {
78
103
  daysRemaining: number;
79
104
  hasCredentials: boolean;
80
105
  apiKeyHint?: string;
106
+ apiKeyInfo?: TChallengeApiKeyInfo;
81
107
  stats?: TChallengeStatistics;
82
108
  progress?: TChallengeProgress;
83
109
  rule?: TChallengeRule;
@@ -1,7 +1,7 @@
1
- import { b as TChallengeProgress, c as TChallengeWalletBalance } from '../../TChallengeProgress-e8E5Z7Tn.js';
2
- export { T as TChallengeClosedPnl, a as TChallengeClosedPnlStatistics } from '../../TChallengeProgress-e8E5Z7Tn.js';
1
+ import { a as IBybitApiKeyVipLevel } from '../../enums--bdw39rp.js';
2
+ import { b as TChallengeProgress, c as TChallengeWalletBalance } from '../../TChallengeProgress-B9ZKiMB2.js';
3
+ export { T as TChallengeClosedPnl, a as TChallengeClosedPnlStatistics } from '../../TChallengeProgress-B9ZKiMB2.js';
3
4
  export { TSyncResponse } from '../index.js';
4
- import '../../enums-CvsmYKeP.js';
5
5
 
6
6
  type TChallengeType = "ONE_STEP" | "TWO_STEPS";
7
7
  type TChallengeMode = "VERIFICATION" | "CHALLENGE" | "FUNDED";
@@ -33,7 +33,32 @@ type TChallengeAccountInfo = {
33
33
  updatedAt: string;
34
34
  };
35
35
 
36
- type TChallengeApiKeyInfo = {};
36
+ type TChallengeApiKeyInfo = {
37
+ challengeId: string;
38
+ bybitApiKeyId: string;
39
+ note: string;
40
+ apiKey: string;
41
+ readOnly: boolean;
42
+ permissions: string[];
43
+ ips: string[];
44
+ type: number;
45
+ deadlineDay: number;
46
+ expiredAt: string;
47
+ createdAt: string;
48
+ uta: string;
49
+ userId: string;
50
+ inviterId: string;
51
+ vipLevel: IBybitApiKeyVipLevel;
52
+ marketMakerLevel: number;
53
+ affiliateId: string;
54
+ rsaPublicKey: string;
55
+ isMaster: boolean;
56
+ parentUid: string;
57
+ kycLevel: number;
58
+ kycRegion: string;
59
+ hasCredentials: boolean;
60
+ readonly updatedAt: string;
61
+ };
37
62
 
38
63
  type TChallengePositionInfo = {
39
64
  symbol: string;
@@ -78,6 +103,7 @@ type TChallengeItem = {
78
103
  daysRemaining: number;
79
104
  hasCredentials: boolean;
80
105
  apiKeyHint?: string;
106
+ apiKeyInfo?: TChallengeApiKeyInfo;
81
107
  stats?: TChallengeStatistics;
82
108
  progress?: TChallengeProgress;
83
109
  rule?: TChallengeRule;
@@ -1,5 +1,5 @@
1
- import { b as TChallengeProgress, c as TChallengeWalletBalance, T as TChallengeClosedPnl } from '../TChallengeProgress-DkZ0Q0Zu.cjs';
2
- import '../enums-CvsmYKeP.cjs';
1
+ import { b as TChallengeProgress, c as TChallengeWalletBalance, T as TChallengeClosedPnl } from '../TChallengeProgress-Dw7FSPNm.cjs';
2
+ import '../enums--bdw39rp.cjs';
3
3
 
4
4
  declare const createDefaultWallet: (challengeId?: string, capital?: number) => TChallengeWalletBalance;
5
5
  declare const createDefaultProgress: (challengeId?: string, currentEquity?: number) => TChallengeProgress;
@@ -1,5 +1,5 @@
1
- import { b as TChallengeProgress, c as TChallengeWalletBalance, T as TChallengeClosedPnl } from '../TChallengeProgress-e8E5Z7Tn.js';
2
- import '../enums-CvsmYKeP.js';
1
+ import { b as TChallengeProgress, c as TChallengeWalletBalance, T as TChallengeClosedPnl } from '../TChallengeProgress-B9ZKiMB2.js';
2
+ import '../enums--bdw39rp.js';
3
3
 
4
4
  declare const createDefaultWallet: (challengeId?: string, capital?: number) => TChallengeWalletBalance;
5
5
  declare const createDefaultProgress: (challengeId?: string, currentEquity?: number) => TChallengeProgress;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anrmk/str-package",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "Shared providers, types, and utils for STR services",
5
5
  "license": "MIT",
6
6
  "type": "module",