@microcosmmoney/portal-react 3.13.5 → 3.13.6

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/main-portal/components/auctions/AuctionsPage.js +2 -2
  2. package/dist/main-portal/components/income/ManagerIncomePage.js +1 -16
  3. package/dist/main-portal/components/layout/AppSidebar.js +1 -1
  4. package/dist/main-portal/components/layout/TerminalSidebar.js +1 -1
  5. package/dist/main-portal/components/profile/ProfilePage.js +2 -2
  6. package/dist/main-portal/components/queue/QueueStatusPage.js +2 -71
  7. package/dist/main-portal/components/stations/StationDetailPage.js +1 -3
  8. package/dist/main-portal/components/stations/StationListPage.js +2 -4
  9. package/dist/main-portal/components/stations/StationsPage.js +2 -5
  10. package/dist/main-portal/config/menu-config.d.ts +0 -2
  11. package/dist/main-portal/config/menu-config.js +14 -67
  12. package/dist/main-portal/hooks/useAuth.d.ts +1 -2
  13. package/dist/main-portal/hooks/useAuth.js +0 -2
  14. package/dist/main-portal/lib/api/blockchain.d.ts +0 -44
  15. package/dist/main-portal/lib/api/blockchain.js +0 -195
  16. package/dist/main-portal/lib/api/services/index.d.ts +0 -1
  17. package/dist/main-portal/lib/api/services/index.js +0 -1
  18. package/dist/main-portal/lib/api/services/organization.d.ts +1 -6
  19. package/dist/main-portal/lib/api/services/organization.js +0 -12
  20. package/dist/main-portal/lib/oauth-config.js +3 -3
  21. package/dist/main-portal/lib/types/common.types.d.ts +0 -32
  22. package/dist/main-portal/lib/types/user.types.d.ts +1 -33
  23. package/package.json +1 -1
  24. package/dist/main-portal/hooks/useStrategies.d.ts +0 -134
  25. package/dist/main-portal/hooks/useStrategies.js +0 -28
  26. package/dist/main-portal/lib/api/services/ai.d.ts +0 -139
  27. package/dist/main-portal/lib/api/services/ai.js +0 -214
  28. package/dist/main-portal/lib/order-id-generator.d.ts +0 -19
  29. package/dist/main-portal/lib/order-id-generator.js +0 -97
  30. package/dist/main-portal/lib/strategy/defaults.d.ts +0 -2
  31. package/dist/main-portal/lib/strategy/defaults.js +0 -58
  32. package/dist/main-portal/lib/strategy/index.d.ts +0 -3
  33. package/dist/main-portal/lib/strategy/index.js +0 -20
  34. package/dist/main-portal/lib/strategy/tooltips.d.ts +0 -1
  35. package/dist/main-portal/lib/strategy/tooltips.js +0 -50
  36. package/dist/main-portal/lib/strategy/types.d.ts +0 -74
  37. package/dist/main-portal/lib/strategy/types.js +0 -2
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.adminMenuItems = exports.agentMenuItems = exports.userMenuItems = void 0;
3
+ exports.agentMenuItems = exports.userMenuItems = void 0;
4
4
  exports.filterMenuByRole = filterMenuByRole;
5
5
  exports.getUserMenus = getUserMenus;
6
6
  exports.isMenuItemActive = isMenuItemActive;
@@ -11,130 +11,78 @@ exports.userMenuItems = [
11
11
  titleKey: "overview",
12
12
  href: "/user-system/dashboard",
13
13
  icon: lucide_react_1.LayoutDashboard,
14
- roles: ["user", "agent", "admin"],
14
+ roles: ["user"],
15
15
  descriptionKey: "overviewDesc"
16
16
  },
17
- { titleKey: "blockchainSection", href: "#blockchain", icon: lucide_react_1.Coins, roles: ["user", "agent", "admin"], isSection: true },
17
+ { titleKey: "blockchainSection", href: "#blockchain", icon: lucide_react_1.Coins, roles: ["user"], isSection: true },
18
18
  {
19
19
  titleKey: "mint",
20
20
  href: "/mcc/mining",
21
21
  icon: lucide_react_1.Pickaxe,
22
- roles: ["user", "agent", "admin"],
22
+ roles: ["user"],
23
23
  descriptionKey: "mintDesc"
24
24
  },
25
25
  {
26
26
  titleKey: "wallet",
27
27
  href: "/mcc/wallet",
28
28
  icon: lucide_react_1.Wallet,
29
- roles: ["user", "agent", "admin"],
29
+ roles: ["user"],
30
30
  descriptionKey: "walletDesc"
31
31
  },
32
32
  {
33
33
  titleKey: "mcdCredits",
34
34
  href: "/mcc/mcd",
35
35
  icon: lucide_react_1.Ticket,
36
- roles: ["user", "agent", "admin"],
36
+ roles: ["user"],
37
37
  descriptionKey: "mcdCreditsDesc"
38
38
  },
39
- { titleKey: "web3osSection", href: "#web3os", icon: lucide_react_1.Users, roles: ["user", "agent", "admin"], isSection: true },
39
+ { titleKey: "web3osSection", href: "#web3os", icon: lucide_react_1.Users, roles: ["user"], isSection: true },
40
40
  {
41
41
  titleKey: "auctionMarket",
42
42
  href: "/mcc/auctions",
43
43
  icon: lucide_react_1.Gift,
44
- roles: ["user", "agent", "admin"],
44
+ roles: ["user"],
45
45
  descriptionKey: "auctionMarketDesc"
46
46
  },
47
47
  {
48
48
  titleKey: "territoryManagement",
49
49
  href: "/user-system/territory",
50
50
  icon: lucide_react_1.Building2,
51
- roles: ["user", "agent", "admin"],
51
+ roles: ["user"],
52
52
  descriptionKey: "territoryManagementDesc"
53
53
  },
54
54
  {
55
55
  titleKey: "nftFragments",
56
56
  href: "/mcc/fragment",
57
57
  icon: lucide_react_1.Puzzle,
58
- roles: ["user", "agent", "admin"],
58
+ roles: ["user"],
59
59
  descriptionKey: "nftFragmentsDesc"
60
60
  },
61
61
  {
62
62
  titleKey: "lending",
63
63
  href: "/mcc/lending",
64
64
  icon: lucide_react_1.Landmark,
65
- roles: ["user", "agent", "admin"],
65
+ roles: ["user"],
66
66
  descriptionKey: "lendingDesc"
67
67
  },
68
68
  {
69
69
  titleKey: "communityVoting",
70
70
  href: "/mcc/voting",
71
71
  icon: lucide_react_1.Vote,
72
- roles: ["user", "agent", "admin"],
72
+ roles: ["user"],
73
73
  descriptionKey: "communityVotingDesc"
74
74
  },
75
75
  {
76
76
  titleKey: "orgStructure",
77
77
  href: "/user-system/organization",
78
78
  icon: lucide_react_1.Users,
79
- roles: ["user", "agent", "admin"],
79
+ roles: ["user"],
80
80
  descriptionKey: "orgStructureDesc"
81
81
  }
82
82
  ];
83
83
  exports.agentMenuItems = [];
84
- exports.adminMenuItems = [
85
- {
86
- titleKey: "systemAddresses",
87
- href: "/admin/system-addresses",
88
- icon: lucide_react_1.Server,
89
- roles: ["admin"],
90
- descriptionKey: "systemAddressesDesc"
91
- },
92
- {
93
- titleKey: "projectReview",
94
- href: "/admin/project-applications",
95
- icon: lucide_react_1.FileText,
96
- roles: ["admin"],
97
- descriptionKey: "projectReviewDesc"
98
- },
99
- {
100
- titleKey: "userManagement",
101
- href: "/admin/members",
102
- icon: lucide_react_1.UserCog,
103
- roles: ["admin"],
104
- descriptionKey: "userManagementDesc"
105
- },
106
- {
107
- titleKey: "alertCenter",
108
- href: "/admin/alerts",
109
- icon: lucide_react_1.Bell,
110
- roles: ["admin"],
111
- descriptionKey: "alertCenterDesc"
112
- },
113
- {
114
- titleKey: "simulationEngine",
115
- href: "/admin/simulation",
116
- icon: lucide_react_1.Bot,
117
- roles: ["admin"],
118
- descriptionKey: "simulationEngineDesc"
119
- },
120
- {
121
- titleKey: "mccHolders",
122
- href: "/admin/mcc-holders",
123
- icon: lucide_react_1.Eye,
124
- roles: ["admin"],
125
- descriptionKey: "mccHoldersDesc"
126
- },
127
- {
128
- titleKey: "aiManagement",
129
- href: "/admin/ai-management",
130
- icon: lucide_react_1.Bot,
131
- roles: ["admin"],
132
- descriptionKey: "aiManagementDesc"
133
- }
134
- ];
135
84
  function filterMenuByRole(menuItems, userRole) {
136
85
  const roleHierarchy = {
137
- admin: ["admin", "agent", "user"],
138
86
  agent: ["agent", "user"],
139
87
  user: ["user"]
140
88
  };
@@ -151,8 +99,7 @@ function filterMenuByRole(menuItems, userRole) {
151
99
  function getUserMenus(userRole) {
152
100
  return {
153
101
  userMenu: filterMenuByRole(exports.userMenuItems, userRole),
154
- agentMenu: filterMenuByRole(exports.agentMenuItems, userRole),
155
- adminMenu: filterMenuByRole(exports.adminMenuItems, userRole)
102
+ agentMenu: filterMenuByRole(exports.agentMenuItems, userRole)
156
103
  };
157
104
  }
158
105
  function isMenuItemActive(itemHref, currentPath) {
@@ -1,5 +1,5 @@
1
1
  import { type NativeUser } from '../lib/auth-service';
2
- export type UserRole = 'admin' | 'agent' | 'user';
2
+ export type UserRole = 'agent' | 'user';
3
3
  export interface WalletEntry {
4
4
  wallet_address: string;
5
5
  is_primary?: boolean;
@@ -22,7 +22,6 @@ export declare const useAuth: () => {
22
22
  loading: boolean;
23
23
  error: string | null;
24
24
  isAuthenticated: () => boolean;
25
- isAdmin: () => boolean;
26
25
  isAgent: () => boolean;
27
26
  isTrader: () => boolean;
28
27
  hasPermission: (requiredRole: UserRole) => boolean;
@@ -8,7 +8,6 @@ const auth_service_1 = require("../lib/auth-service");
8
8
  const core_1 = require("../lib/api/core");
9
9
  const getCurrentUserProfile = () => (0, core_1.fetchApi)('/users/profile');
10
10
  const ROLE_HIERARCHY = {
11
- 'admin': ['admin', 'agent', 'user'],
12
11
  'agent': ['agent', 'user'],
13
12
  'user': ['user']
14
13
  };
@@ -126,7 +125,6 @@ const useAuth = () => {
126
125
  loading,
127
126
  error,
128
127
  isAuthenticated: () => user !== null && userInfo !== null,
129
- isAdmin: () => hasPermission('admin'),
130
128
  isAgent: () => hasPermission('agent'),
131
129
  isTrader: () => hasPermission('agent'),
132
130
  hasPermission,
@@ -46,9 +46,6 @@ export interface McdAccountResult {
46
46
  status: 'created' | 'exists';
47
47
  tx_signature?: string;
48
48
  }
49
- export declare function getMcdAccountStatus(uid: string): Promise<McdAccountStatus | null>;
50
- export declare function ensureUserMcdAccount(uid: string): Promise<McdAccountResult>;
51
- export declare function batchGetMcdAccountStatus(uids: string[]): Promise<Record<string, McdAccountStatus>>;
52
49
  export interface ZombieAccount {
53
50
  uid: string;
54
51
  email: string;
@@ -113,19 +110,6 @@ export interface ClosureHistory {
113
110
  }>;
114
111
  total: number;
115
112
  }
116
- export declare function getZombieAccounts(options?: {
117
- limit?: number;
118
- offset?: number;
119
- min_inactive_days?: number;
120
- }): Promise<ZombieAccountsResult>;
121
- export declare function closeMcdAccount(uid: string, reason?: 'zombie' | 'user_request' | 'admin'): Promise<ClosureResult>;
122
- export declare function batchCloseMcdAccounts(uids: string[], reason?: 'zombie' | 'admin'): Promise<BatchClosureResult>;
123
- export declare function getRentStatistics(startDate?: string, endDate?: string): Promise<RentStatistics>;
124
- export declare function getClosureHistory(options?: {
125
- limit?: number;
126
- offset?: number;
127
- reason?: string;
128
- }): Promise<ClosureHistory>;
129
113
  export interface SystemAddress {
130
114
  id: number;
131
115
  category: string;
@@ -148,31 +132,3 @@ export interface SystemAddressStats {
148
132
  by_category: Record<string, number>;
149
133
  by_status: Record<string, number>;
150
134
  }
151
- export declare function getSystemAddresses(options?: {
152
- category?: string;
153
- status?: string;
154
- search?: string;
155
- limit?: number;
156
- offset?: number;
157
- }): Promise<{
158
- addresses: SystemAddress[];
159
- total: number;
160
- }>;
161
- export declare function getSystemAddressStats(): Promise<SystemAddressStats>;
162
- export declare function updateSystemAddress(id: number, data: {
163
- description?: string;
164
- status?: string;
165
- archived_reason?: string;
166
- }): Promise<{
167
- success: boolean;
168
- id?: number;
169
- name?: string;
170
- status?: string;
171
- error?: string;
172
- }>;
173
- export declare function seedSystemAddresses(): Promise<{
174
- success: boolean;
175
- inserted: number;
176
- updated: number;
177
- total: number;
178
- }>;
@@ -8,18 +8,6 @@ exports.invalidateWalletCache = invalidateWalletCache;
8
8
  exports.getPoolStatus = getPoolStatus;
9
9
  exports.getTokenFromBalance = getTokenFromBalance;
10
10
  exports.formatTokenBalance = formatTokenBalance;
11
- exports.getMcdAccountStatus = getMcdAccountStatus;
12
- exports.ensureUserMcdAccount = ensureUserMcdAccount;
13
- exports.batchGetMcdAccountStatus = batchGetMcdAccountStatus;
14
- exports.getZombieAccounts = getZombieAccounts;
15
- exports.closeMcdAccount = closeMcdAccount;
16
- exports.batchCloseMcdAccounts = batchCloseMcdAccounts;
17
- exports.getRentStatistics = getRentStatistics;
18
- exports.getClosureHistory = getClosureHistory;
19
- exports.getSystemAddresses = getSystemAddresses;
20
- exports.getSystemAddressStats = getSystemAddressStats;
21
- exports.updateSystemAddress = updateSystemAddress;
22
- exports.seedSystemAddresses = seedSystemAddresses;
23
11
  // AI-generated · AI-managed · AI-maintained
24
12
  const core_1 = require("./core");
25
13
  async function getMccPrice() {
@@ -117,186 +105,3 @@ function formatTokenBalance(balance, decimals = 2) {
117
105
  maximumFractionDigits: decimals
118
106
  });
119
107
  }
120
- async function getMcdAccountStatus(uid) {
121
- try {
122
- const response = await (0, core_1.fetchApi)(`/blockchain/mcd/admin/account-status/${uid}`, { method: 'GET' });
123
- if (response.success && response.data) {
124
- return response.data;
125
- }
126
- return null;
127
- }
128
- catch (error) {
129
- console.error('[Blockchain API] 获取 MCD 账户状态失败:', error);
130
- throw error;
131
- }
132
- }
133
- async function ensureUserMcdAccount(uid) {
134
- try {
135
- const response = await (0, core_1.fetchApi)(`/blockchain/mcd/admin/account/ensure/${uid}`, { method: 'POST' });
136
- if (response.success && response.data) {
137
- return response.data;
138
- }
139
- throw new Error(response.error || '创建 MCD 账户失败');
140
- }
141
- catch (error) {
142
- console.error('[Blockchain API] 创建 MCD 账户失败:', error);
143
- throw error;
144
- }
145
- }
146
- async function batchGetMcdAccountStatus(uids) {
147
- try {
148
- const response = await (0, core_1.fetchApi)(`/blockchain/mcd/admin/batch-status`, {
149
- method: 'POST',
150
- body: JSON.stringify({ uids })
151
- });
152
- if (response.success && response.data) {
153
- return response.data;
154
- }
155
- return {};
156
- }
157
- catch (error) {
158
- console.error('[Blockchain API] 批量获取 MCD 账户状态失败:', error);
159
- return {};
160
- }
161
- }
162
- async function getZombieAccounts(options = {}) {
163
- const { limit = 50, offset = 0, min_inactive_days = 180 } = options;
164
- try {
165
- const response = await (0, core_1.fetchApi)(`/blockchain/mcd/admin/zombie-accounts?limit=${limit}&offset=${offset}&inactive_days=${min_inactive_days}`, { method: 'GET' });
166
- if (response.success && response.data) {
167
- return response.data;
168
- }
169
- throw new Error(response.error || '获取僵尸账户失败');
170
- }
171
- catch (error) {
172
- console.error('[Blockchain API] 获取僵尸账户失败:', error);
173
- throw error;
174
- }
175
- }
176
- async function closeMcdAccount(uid, reason = 'zombie') {
177
- try {
178
- const response = await (0, core_1.fetchApi)(`/blockchain/mcd/admin/close-account/${uid}`, {
179
- method: 'POST',
180
- body: JSON.stringify({ reason })
181
- });
182
- if (response.success && response.data) {
183
- return response.data;
184
- }
185
- throw new Error(response.error || '关闭账户失败');
186
- }
187
- catch (error) {
188
- console.error('[Blockchain API] 关闭 MCD 账户失败:', error);
189
- throw error;
190
- }
191
- }
192
- async function batchCloseMcdAccounts(uids, reason = 'zombie') {
193
- try {
194
- const response = await (0, core_1.fetchApi)(`/blockchain/mcd/admin/batch-close-accounts`, {
195
- method: 'POST',
196
- body: JSON.stringify({ uids, reason })
197
- });
198
- if (response.success && response.data) {
199
- return response.data;
200
- }
201
- throw new Error(response.error || '批量关闭账户失败');
202
- }
203
- catch (error) {
204
- console.error('[Blockchain API] 批量关闭 MCD 账户失败:', error);
205
- throw error;
206
- }
207
- }
208
- async function getRentStatistics(startDate, endDate) {
209
- try {
210
- const params = new URLSearchParams();
211
- if (startDate)
212
- params.append('start_date', startDate);
213
- if (endDate)
214
- params.append('end_date', endDate);
215
- const url = `/blockchain/mcd/admin/rent-statistics${params.toString() ? `?${params.toString()}` : ''}`;
216
- const response = await (0, core_1.fetchApi)(url, { method: 'GET' });
217
- if (response.success && response.data) {
218
- return response.data;
219
- }
220
- throw new Error(response.error || '获取租金统计失败');
221
- }
222
- catch (error) {
223
- console.error('[Blockchain API] 获取租金统计失败:', error);
224
- throw error;
225
- }
226
- }
227
- async function getClosureHistory(options = {}) {
228
- const { limit = 50, offset = 0, reason } = options;
229
- try {
230
- let url = `/blockchain/mcd/admin/closure-history?limit=${limit}&offset=${offset}`;
231
- if (reason)
232
- url += `&reason=${reason}`;
233
- const response = await (0, core_1.fetchApi)(url, { method: 'GET' });
234
- if (response.success && response.data) {
235
- return response.data;
236
- }
237
- throw new Error(response.error || '获取关闭历史失败');
238
- }
239
- catch (error) {
240
- console.error('[Blockchain API] 获取关闭历史失败:', error);
241
- throw error;
242
- }
243
- }
244
- async function getSystemAddresses(options = {}) {
245
- const { category, status, search, limit = 200, offset = 0 } = options;
246
- try {
247
- const params = new URLSearchParams();
248
- params.set('limit', String(limit));
249
- params.set('offset', String(offset));
250
- if (category)
251
- params.set('category', category);
252
- if (status)
253
- params.set('status', status);
254
- if (search)
255
- params.set('search', search);
256
- const response = await (0, core_1.fetchApi)(`/blockchain/system-addresses/admin/list?${params.toString()}`, { method: 'GET' });
257
- if (response.success && response.data) {
258
- return response.data;
259
- }
260
- throw new Error(response.error || 'Failed to load system addresses');
261
- }
262
- catch (error) {
263
- console.error('[Blockchain API] getSystemAddresses failed:', error);
264
- throw error;
265
- }
266
- }
267
- async function getSystemAddressStats() {
268
- try {
269
- const response = await (0, core_1.fetchApi)('/blockchain/system-addresses/admin/stats', { method: 'GET' });
270
- if (response.success && response.data) {
271
- return response.data;
272
- }
273
- throw new Error(response.error || 'Failed to load stats');
274
- }
275
- catch (error) {
276
- console.error('[Blockchain API] getSystemAddressStats failed:', error);
277
- throw error;
278
- }
279
- }
280
- async function updateSystemAddress(id, data) {
281
- try {
282
- const response = await (0, core_1.fetchApi)(`/blockchain/system-addresses/admin/${id}`, {
283
- method: 'PUT',
284
- body: JSON.stringify(data)
285
- });
286
- return response;
287
- }
288
- catch (error) {
289
- console.error('[Blockchain API] updateSystemAddress failed:', error);
290
- throw error;
291
- }
292
- }
293
- async function seedSystemAddresses() {
294
- try {
295
- const response = await (0, core_1.fetchApi)('/blockchain/system-addresses/admin/seed', { method: 'POST' });
296
- return response;
297
- }
298
- catch (error) {
299
- console.error('[Blockchain API] seedSystemAddresses failed:', error);
300
- throw error;
301
- }
302
- }
@@ -1,4 +1,3 @@
1
- export * from './ai';
2
1
  export * from './mining';
3
2
  export * from './finance';
4
3
  export * from './organization';
@@ -14,7 +14,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./ai"), exports);
18
17
  __exportStar(require("./mining"), exports);
19
18
  __exportStar(require("./finance"), exports);
20
19
  __exportStar(require("./organization"), exports);
@@ -1,4 +1,4 @@
1
- import type { APIResponse, Unit, Member, Auction, Bid, PlaceBidRequest, AuctionHistoryParams, MiningWeight, TechBonusDetail, StationKPI, UserRank, LevelProgress, UserLevelStatus, LevelSystemConfig, UserQueueStatus, AdminQueueStatus, QueueProcessResult, ExpansionCheckResult, ExpansionTriggerResult, ManagerIncomeSummary, StationIncomeSummary, TeamCustodySummary } from '../../types/api';
1
+ import type { APIResponse, Unit, Member, Auction, Bid, PlaceBidRequest, AuctionHistoryParams, MiningWeight, TechBonusDetail, StationKPI, UserRank, LevelProgress, UserLevelStatus, LevelSystemConfig, UserQueueStatus, ManagerIncomeSummary, StationIncomeSummary } from '../../types/api';
2
2
  export declare const getUnits: (unitType?: string) => Promise<APIResponse<Unit[]>>;
3
3
  export declare const getUnitDetails: (unitId: string) => Promise<APIResponse<Unit>>;
4
4
  export declare const createUnit: (unitData: {
@@ -152,10 +152,5 @@ export declare function getQueueStatus(): Promise<UserQueueStatus>;
152
152
  export declare function cancelQueue(): Promise<APIResponse<{
153
153
  message: string;
154
154
  }>>;
155
- export declare function getAdminQueueStatus(): Promise<AdminQueueStatus>;
156
- export declare function processQueue(batchSize?: number): Promise<QueueProcessResult>;
157
- export declare function checkExpansionNeeded(): Promise<ExpansionCheckResult>;
158
- export declare function triggerExpansion(): Promise<ExpansionTriggerResult>;
159
155
  export declare function getStationIncome(stationId: string, startDate?: string, endDate?: string): Promise<StationIncomeSummary>;
160
156
  export declare function getManagerIncome(startDate?: string, endDate?: string): Promise<ManagerIncomeSummary>;
161
- export declare function getTeamCustodySummary(): Promise<TeamCustodySummary>;
@@ -6,13 +6,8 @@ exports.leaveStation = leaveStation;
6
6
  exports.joinStationQueue = joinStationQueue;
7
7
  exports.getQueueStatus = getQueueStatus;
8
8
  exports.cancelQueue = cancelQueue;
9
- exports.getAdminQueueStatus = getAdminQueueStatus;
10
- exports.processQueue = processQueue;
11
- exports.checkExpansionNeeded = checkExpansionNeeded;
12
- exports.triggerExpansion = triggerExpansion;
13
9
  exports.getStationIncome = getStationIncome;
14
10
  exports.getManagerIncome = getManagerIncome;
15
- exports.getTeamCustodySummary = getTeamCustodySummary;
16
11
  const core_1 = require("../core");
17
12
  const getUnits = async (unitType) => {
18
13
  const query = unitType ? `?unit_type=${unitType}` : '';
@@ -112,12 +107,6 @@ async function joinStationQueue(preferredTerritoryId) {
112
107
  }
113
108
  async function getQueueStatus() { return (0, core_1.fetchApi)('/organization-service/station/queue/status'); }
114
109
  async function cancelQueue() { return (0, core_1.fetchApi)('/organization-service/station/queue', { method: 'DELETE' }); }
115
- async function getAdminQueueStatus() { return (0, core_1.fetchApi)('/organization-service/station/queue/admin'); }
116
- async function processQueue(batchSize = 50) {
117
- return (0, core_1.fetchApi)('/organization-service/station/queue/process', { method: 'POST', body: JSON.stringify({ batch_size: batchSize }) });
118
- }
119
- async function checkExpansionNeeded() { return (0, core_1.fetchApi)('/organization-service/station/expansion/check'); }
120
- async function triggerExpansion() { return (0, core_1.fetchApi)('/organization-service/station/expansion/trigger', { method: 'POST' }); }
121
110
  async function getStationIncome(stationId, startDate, endDate) {
122
111
  const p = new URLSearchParams();
123
112
  if (startDate)
@@ -136,4 +125,3 @@ async function getManagerIncome(startDate, endDate) {
136
125
  const qs = p.toString();
137
126
  return (0, core_1.fetchApi)(`/organization-service/manager/income${qs ? `?${qs}` : ''}`);
138
127
  }
139
- async function getTeamCustodySummary() { return (0, core_1.fetchApi)('/organization-service/team-custody/summary'); }
@@ -10,11 +10,11 @@ exports.OAUTH_CONFIG = {
10
10
  authorizationEndpoint: process.env.NEXT_PUBLIC_OAUTH_AUTH_ENDPOINT || 'https://microcosm.money/login',
11
11
  tokenEndpoint: process.env.NEXT_PUBLIC_OAUTH_TOKEN_ENDPOINT || 'https://microcosm.money/api/oauth/token',
12
12
  firebaseTokenEndpoint: process.env.NEXT_PUBLIC_OAUTH_FIREBASE_ENDPOINT || 'https://microcosm.money/api/oauth/firebase-token',
13
- clientId: process.env.NEXT_PUBLIC_OAUTH_CLIENT_ID || 'doublehelix',
13
+ clientId: process.env.NEXT_PUBLIC_OAUTH_CLIENT_ID || '',
14
14
  redirectUri: typeof window !== 'undefined'
15
15
  ? `${window.location.origin}/auth/callback`
16
- : process.env.NEXT_PUBLIC_OAUTH_REDIRECT_URI || 'https://doublehelix.money/auth/callback',
17
- scopes: ['openid', 'profile', 'email', 'trading'],
16
+ : process.env.NEXT_PUBLIC_OAUTH_REDIRECT_URI || '',
17
+ scopes: ['openid', 'profile', 'email'],
18
18
  };
19
19
  function generateState() {
20
20
  const array = new Uint8Array(32);
@@ -129,38 +129,6 @@ export interface UserQueueStatus {
129
129
  status?: QueueStatus;
130
130
  error?: string;
131
131
  }
132
- export interface AdminQueueStatus {
133
- success: boolean;
134
- pending_count: number;
135
- processing_count: number;
136
- oldest_pending?: string;
137
- total_in_queue: number;
138
- error?: string;
139
- }
140
- export interface QueueProcessResult {
141
- success: boolean;
142
- processed: number;
143
- assigned: number;
144
- failed: number;
145
- errors?: string[];
146
- }
147
- export interface ExpansionCheckResult {
148
- success: boolean;
149
- needs_expansion: boolean;
150
- reason?: string;
151
- current_stats: {
152
- total_stations: number;
153
- full_stations: number;
154
- avg_occupancy: number;
155
- pending_queue: number;
156
- };
157
- }
158
- export interface ExpansionTriggerResult {
159
- success: boolean;
160
- new_territory_id?: string;
161
- message?: string;
162
- error?: string;
163
- }
164
132
  export interface PreparedTransaction {
165
133
  transaction: string;
166
134
  message: string;
@@ -25,7 +25,7 @@ export interface TransactionResult {
25
25
  balanceAfter: number;
26
26
  transaction: Transaction;
27
27
  }
28
- export type UserRole = 'admin' | 'agent' | 'user';
28
+ export type UserRole = 'agent' | 'user';
29
29
  export interface UserInfo {
30
30
  uid: string;
31
31
  email: string | null;
@@ -209,35 +209,3 @@ export interface IncomeHistoryResponse {
209
209
  page_size: number;
210
210
  error?: string;
211
211
  }
212
- export interface StrategyConfig {
213
- symbol: string;
214
- leverage: number;
215
- position_size: number;
216
- stop_loss?: number;
217
- take_profit?: number;
218
- parameters: Record<string, unknown>;
219
- }
220
- export interface BinanceOrderResponse {
221
- success: boolean;
222
- order?: {
223
- orderId: number;
224
- clientOrderId: string;
225
- symbol: string;
226
- status: string;
227
- price: string;
228
- avgPrice: string;
229
- origQty: string;
230
- executedQty: string;
231
- type: string;
232
- side: string;
233
- positionSide: string;
234
- time: number;
235
- updateTime: number;
236
- };
237
- error?: string;
238
- }
239
- export interface BinanceCancelResponse {
240
- success: boolean;
241
- cancelled?: boolean;
242
- error?: string;
243
- }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@microcosmmoney/portal-react",
3
- "version": "3.13.5",
3
+ "version": "3.13.6",
4
4
  "description": "Microcosm Portal UI components for React/Next.js",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",