@kumori/aurora-backend-handler 1.0.27 → 1.0.29
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/helpers/user-helper.ts +1 -1
- package/package.json +1 -1
- package/websocket-manager.ts +34 -6
package/helpers/user-helper.ts
CHANGED
|
@@ -114,7 +114,7 @@ export const handleUserEvent = ({
|
|
|
114
114
|
rol: eventData.spec.userinfo.companyRole,
|
|
115
115
|
notifications: existingNotifications,
|
|
116
116
|
plans: userPlans,
|
|
117
|
-
discoveryMethod: eventData.spec.
|
|
117
|
+
discoveryMethod: eventData.spec.userinfo.discoveryMethod,
|
|
118
118
|
};
|
|
119
119
|
|
|
120
120
|
return {
|
package/package.json
CHANGED
package/websocket-manager.ts
CHANGED
|
@@ -1,6 +1,28 @@
|
|
|
1
1
|
import { v7 as uuidv7 } from "uuid";
|
|
2
2
|
import { environment } from "./environment";
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
Account,
|
|
5
|
+
Channel,
|
|
6
|
+
ClusterToken,
|
|
7
|
+
Environment,
|
|
8
|
+
Instance,
|
|
9
|
+
Link,
|
|
10
|
+
MarketplaceService,
|
|
11
|
+
Notification,
|
|
12
|
+
Organization,
|
|
13
|
+
Plan,
|
|
14
|
+
PlanProvider,
|
|
15
|
+
Platform,
|
|
16
|
+
Registry,
|
|
17
|
+
Resource,
|
|
18
|
+
Service,
|
|
19
|
+
Tenant,
|
|
20
|
+
tenantRole,
|
|
21
|
+
Token,
|
|
22
|
+
Usage,
|
|
23
|
+
User,
|
|
24
|
+
UserData,
|
|
25
|
+
} from "@kumori/aurora-interfaces";
|
|
4
26
|
import { loadMarketplaceItemsForTenant } from "./api/marketplace-api-service";
|
|
5
27
|
import { getReporting } from "./api/reporting-api-service";
|
|
6
28
|
import { parseKeyPath } from "./utils/utils";
|
|
@@ -17,7 +39,10 @@ import {
|
|
|
17
39
|
handleEnvironmentOperationError,
|
|
18
40
|
handleEnvironmentOperationSuccess,
|
|
19
41
|
} from "./helpers/environment-helper";
|
|
20
|
-
import {
|
|
42
|
+
import {
|
|
43
|
+
handleRevisionEvent,
|
|
44
|
+
processRevisionData,
|
|
45
|
+
} from "./helpers/revision-helper";
|
|
21
46
|
import {
|
|
22
47
|
handleServiceEvent,
|
|
23
48
|
handleServiceOperationError,
|
|
@@ -355,8 +380,8 @@ export const initializeGlobalWebSocketClient = async (
|
|
|
355
380
|
wsConnection?.addEventListener("error", (error) => {
|
|
356
381
|
console.error("Global WebSocket error:", error);
|
|
357
382
|
userData.status = "notlogged";
|
|
358
|
-
|
|
359
|
-
|
|
383
|
+
user = new User(userData);
|
|
384
|
+
eventHelper.user.publish.loaded(user);
|
|
360
385
|
connectionPromise = null;
|
|
361
386
|
reject(error);
|
|
362
387
|
});
|
|
@@ -594,6 +619,7 @@ const rebuildHierarchy = () => {
|
|
|
594
619
|
status: preservedUserData.status,
|
|
595
620
|
notifications: preservedUserData.notifications || [],
|
|
596
621
|
plans: preservedUserData.plans || [],
|
|
622
|
+
discoveryMethod: preservedUserData.discoveryMethod,
|
|
597
623
|
};
|
|
598
624
|
};
|
|
599
625
|
const handleEvent = async (message: WSMessage) => {
|
|
@@ -948,7 +974,7 @@ const handleEvent = async (message: WSMessage) => {
|
|
|
948
974
|
eventData,
|
|
949
975
|
parentParts,
|
|
950
976
|
tenantsMap,
|
|
951
|
-
secretsMap
|
|
977
|
+
secretsMap,
|
|
952
978
|
});
|
|
953
979
|
|
|
954
980
|
if (registryResult.tenantFound && registryResult.updatedTenant) {
|
|
@@ -1820,6 +1846,8 @@ export const updateUserComplete = (updatedUserData: UserData): User => {
|
|
|
1820
1846
|
notifications: preservedNotifications,
|
|
1821
1847
|
plans: updatedUserData.plans,
|
|
1822
1848
|
status: updatedUserData.status,
|
|
1849
|
+
discoveryMethod:
|
|
1850
|
+
updatedUserData.discoveryMethod || userData.discoveryMethod,
|
|
1823
1851
|
};
|
|
1824
1852
|
user = new User(
|
|
1825
1853
|
userData,
|
|
@@ -1832,4 +1860,4 @@ export const updateUserComplete = (updatedUserData: UserData): User => {
|
|
|
1832
1860
|
console.error("Error updating user in websocket-manager:", error);
|
|
1833
1861
|
return user;
|
|
1834
1862
|
}
|
|
1835
|
-
};
|
|
1863
|
+
};
|