@gen3/core 0.10.50 → 0.10.52
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/dist/cjs/index.js +299 -29
- package/dist/cjs/index.js.map +1 -1
- package/dist/dts/constants.d.ts +2 -1
- package/dist/dts/features/cohort/cohortSlice.d.ts +16 -1
- package/dist/dts/features/cohort/index.d.ts +2 -2
- package/dist/dts/features/download/downloadStatusApi.d.ts +303 -1
- package/dist/dts/features/download/index.d.ts +2 -2
- package/dist/dts/features/guppy/tests/conversion.unit.test.d.ts +1 -0
- package/dist/dts/features/sower/index.d.ts +2 -0
- package/dist/dts/features/sower/sowerApi.d.ts +845 -0
- package/dist/dts/features/sower/types.d.ts +8 -0
- package/dist/dts/features/user/index.d.ts +1 -1
- package/dist/dts/features/user/types.d.ts +1 -1
- package/dist/dts/features/user/userSliceRTK.d.ts +3 -0
- package/dist/dts/features/workspace/index.d.ts +5 -2
- package/dist/dts/features/workspace/types.d.ts +89 -0
- package/dist/dts/features/workspace/utils.d.ts +3 -0
- package/dist/dts/features/workspace/workspaceApi.d.ts +1523 -0
- package/dist/dts/features/workspace/workspaceSlice.d.ts +14 -0
- package/dist/dts/hooks.d.ts +2 -0
- package/dist/dts/index.d.ts +3 -2
- package/dist/dts/reducers.d.ts +2 -0
- package/dist/dts/store.d.ts +2 -0
- package/dist/dts/types/index.d.ts +5 -0
- package/dist/esm/index.js +273 -29
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +2350 -331
- package/package.json +2 -2
- package/dist/dts/features/workspace/workspacesSlice.d.ts +0 -402
|
@@ -2,4 +2,4 @@ import { useUser, useUserAuth, resetUserState, fetchUserState, isAuthenticated,
|
|
|
2
2
|
import { useFetchUserDetailsQuery, useLazyFetchUserDetailsQuery, selectUserDetails, selectUserAuthStatus, useGetCSRFQuery, selectCSRFToken, selectCSRFTokenData, selectHeadersWithCSRFToken, type CSRFToken } from './userSliceRTK';
|
|
3
3
|
import { useGetExternalLoginsQuery, useLazyGetExternalLoginsQuery, useLazyIsExternalConnectedQuery, useIsExternalConnectedQuery } from './externalLoginsSlice';
|
|
4
4
|
import { type UserProfile, type LoginStatus, type Gen3User, type ExternalProvider, type NamedURL, type JWTSessionStatus } from './types';
|
|
5
|
-
export { type Gen3User, type LoginStatus, type UserProfile, type JWTSessionStatus, type CSRFToken, type ExternalProvider, type NamedURL, useUser, useUserAuth, selectUser, selectUserData, selectUserLoginStatus, fetchUserState, isAuthenticated, isPending, useIsUserLoggedIn, resetUserState, useGetExternalLoginsQuery,
|
|
5
|
+
export { type Gen3User, type LoginStatus, type UserProfile, type JWTSessionStatus, type CSRFToken, type ExternalProvider, type NamedURL, useUser, useUserAuth, selectUser, selectUserData, selectUserLoginStatus, fetchUserState, isAuthenticated, isPending, useIsUserLoggedIn, resetUserState, useGetExternalLoginsQuery, useFetchUserDetailsQuery, useLazyFetchUserDetailsQuery, useLazyGetExternalLoginsQuery, useLazyIsExternalConnectedQuery, useIsExternalConnectedQuery, selectUserDetails, selectUserAuthStatus, useGetCSRFQuery, selectCSRFToken, selectCSRFTokenData, selectHeadersWithCSRFToken, };
|
|
@@ -1145,6 +1145,7 @@ export declare const selectCSRFToken: ((state: import("@reduxjs/toolkit/query").
|
|
|
1145
1145
|
drsHostnames: Record<string, string>;
|
|
1146
1146
|
modals: import("../modals/modalsSlice").ModalState;
|
|
1147
1147
|
cohorts: import("../cohort/cohortSlice").CohortState;
|
|
1148
|
+
activeWorkspace: import("../workspace/workspaceSlice").WorkspaceState;
|
|
1148
1149
|
userAuthApi: import("@reduxjs/toolkit/query").CombinedState<{
|
|
1149
1150
|
fetchUserDetails: import("@reduxjs/toolkit/query").QueryDefinition<void, ({ endpoint }: any, { getState }: import("@reduxjs/toolkit/query").BaseQueryApi) => Promise<{
|
|
1150
1151
|
data: {};
|
|
@@ -1388,6 +1389,7 @@ export declare const selectHeadersWithCSRFToken: ((state: import("@reduxjs/toolk
|
|
|
1388
1389
|
drsHostnames: Record<string, string>;
|
|
1389
1390
|
modals: import("../modals/modalsSlice").ModalState;
|
|
1390
1391
|
cohorts: import("../cohort/cohortSlice").CohortState;
|
|
1392
|
+
activeWorkspace: import("../workspace/workspaceSlice").WorkspaceState;
|
|
1391
1393
|
userAuthApi: import("@reduxjs/toolkit/query").CombinedState<{
|
|
1392
1394
|
fetchUserDetails: import("@reduxjs/toolkit/query").QueryDefinition<void, ({ endpoint }: any, { getState }: import("@reduxjs/toolkit/query").BaseQueryApi) => Promise<{
|
|
1393
1395
|
data: {};
|
|
@@ -1447,6 +1449,7 @@ export declare const selectHeadersWithCSRFToken: ((state: import("@reduxjs/toolk
|
|
|
1447
1449
|
drsHostnames: Record<string, string>;
|
|
1448
1450
|
modals: import("../modals/modalsSlice").ModalState;
|
|
1449
1451
|
cohorts: import("../cohort/cohortSlice").CohortState;
|
|
1452
|
+
activeWorkspace: import("../workspace/workspaceSlice").WorkspaceState;
|
|
1450
1453
|
userAuthApi: import("@reduxjs/toolkit/query").CombinedState<{
|
|
1451
1454
|
fetchUserDetails: import("@reduxjs/toolkit/query").QueryDefinition<void, ({ endpoint }: any, { getState }: import("@reduxjs/toolkit/query").BaseQueryApi) => Promise<{
|
|
1452
1455
|
data: {};
|
|
@@ -1,2 +1,5 @@
|
|
|
1
|
-
import { useGetWorkspaceOptionsQuery, useGetWorkspacePayModelsQuery,
|
|
2
|
-
|
|
1
|
+
import { useGetWorkspaceOptionsQuery, useGetWorkspaceStatusQuery, useGetWorkspacePayModelsQuery, useGetActivePayModelQuery, useSetCurrentPayModelMutation, useLaunchWorkspaceMutation, useTerminateWorkspaceMutation, EmptyWorkspaceStatusResponse, selectWorkspaceStatusFromService, selectWorkspaceStatus } from './workspaceApi';
|
|
2
|
+
import { setActiveWorkspaceId, clearActiveWorkspaceId, setActiveWorkspaceStatus, setActiveWorkspace, setRequestedWorkspaceStatus, selectActiveWorkspaceId, selectActiveWorkspaceStatus, selectRequestedWorkspaceStatus } from './workspaceSlice';
|
|
3
|
+
export * from './types';
|
|
4
|
+
export * from './utils';
|
|
5
|
+
export { EmptyWorkspaceStatusResponse, useGetWorkspaceOptionsQuery, useGetWorkspaceStatusQuery, useGetWorkspacePayModelsQuery, useGetActivePayModelQuery, useSetCurrentPayModelMutation, useLaunchWorkspaceMutation, useTerminateWorkspaceMutation, setActiveWorkspaceId, clearActiveWorkspaceId, setActiveWorkspaceStatus, setActiveWorkspace, setRequestedWorkspaceStatus, selectActiveWorkspaceId, selectActiveWorkspaceStatus, selectWorkspaceStatusFromService, selectRequestedWorkspaceStatus, selectWorkspaceStatus, };
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
export interface PayModel {
|
|
2
|
+
bmh_workspace_id: string;
|
|
3
|
+
workspace_type: string;
|
|
4
|
+
user_id: string;
|
|
5
|
+
account_id: string;
|
|
6
|
+
request_status: string;
|
|
7
|
+
local: boolean;
|
|
8
|
+
region: string;
|
|
9
|
+
ecs: boolean;
|
|
10
|
+
subnet: number;
|
|
11
|
+
'hard-limit': number;
|
|
12
|
+
'soft-limit': number;
|
|
13
|
+
'total-usage': number;
|
|
14
|
+
current_pay_model: boolean;
|
|
15
|
+
}
|
|
16
|
+
export interface WorkspaceId {
|
|
17
|
+
id: string;
|
|
18
|
+
}
|
|
19
|
+
export interface WorkspaceInfo extends WorkspaceId {
|
|
20
|
+
name: string;
|
|
21
|
+
idleTimeLimit: number;
|
|
22
|
+
memoryLimit: string;
|
|
23
|
+
cpuLimit: string;
|
|
24
|
+
}
|
|
25
|
+
export interface WorkspaceInfoResponse {
|
|
26
|
+
id: string;
|
|
27
|
+
name: string;
|
|
28
|
+
'idle-time-limit': number;
|
|
29
|
+
'memory-limit': string;
|
|
30
|
+
'cpu-limit': string;
|
|
31
|
+
}
|
|
32
|
+
export type WorkspaceOptionsResponse = Array<WorkspaceInfoResponse>;
|
|
33
|
+
export type WorkspaceOptions = Array<WorkspaceInfo>;
|
|
34
|
+
export interface WorkspacePayModelResponse {
|
|
35
|
+
currentPayModel: PayModel;
|
|
36
|
+
allPayModels: PayModel[];
|
|
37
|
+
noPayModel: boolean;
|
|
38
|
+
}
|
|
39
|
+
export declare enum WorkspaceStatus {
|
|
40
|
+
Launching = "Launching",
|
|
41
|
+
Running = "Running",
|
|
42
|
+
Terminating = "Terminating",
|
|
43
|
+
Stopped = "Stopped",
|
|
44
|
+
NotFound = "Not Found",
|
|
45
|
+
Errored = "Errored",
|
|
46
|
+
StatusError = "Status Error"
|
|
47
|
+
}
|
|
48
|
+
export declare enum PodConditionType {
|
|
49
|
+
PodScheduled = "PodScheduled",
|
|
50
|
+
Initialized = "Initialized",
|
|
51
|
+
ContainersReady = "ContainersReady",
|
|
52
|
+
PodReadyToStartContainers = "PodReadyToStartContainers",
|
|
53
|
+
ProxyConnected = "ProxyConnected",
|
|
54
|
+
Ready = "Ready"
|
|
55
|
+
}
|
|
56
|
+
export declare enum PodStatus {
|
|
57
|
+
True = "True",
|
|
58
|
+
False = "False",
|
|
59
|
+
Unknown = "Unknown"
|
|
60
|
+
}
|
|
61
|
+
export interface WorkspaceContainerState {
|
|
62
|
+
name: string;
|
|
63
|
+
ready: boolean;
|
|
64
|
+
state: {
|
|
65
|
+
running: {
|
|
66
|
+
startedAt: string;
|
|
67
|
+
};
|
|
68
|
+
} | {
|
|
69
|
+
waiting: {
|
|
70
|
+
reason: string;
|
|
71
|
+
};
|
|
72
|
+
} | {
|
|
73
|
+
terminated: {
|
|
74
|
+
reason: string;
|
|
75
|
+
};
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
export interface WorkspacePodCondition {
|
|
79
|
+
type: PodConditionType;
|
|
80
|
+
status: PodStatus;
|
|
81
|
+
}
|
|
82
|
+
export interface WorkspaceStatusResponse {
|
|
83
|
+
status: WorkspaceStatus;
|
|
84
|
+
conditions?: Array<WorkspacePodCondition>;
|
|
85
|
+
containerStates?: Array<WorkspaceContainerState>;
|
|
86
|
+
idleTimeLimit?: number;
|
|
87
|
+
lastActivityTime: number;
|
|
88
|
+
workspaceType?: string;
|
|
89
|
+
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { WorkspaceStatus } from './types';
|
|
2
|
+
export declare const isWorkspaceActive: (status: WorkspaceStatus) => status is WorkspaceStatus.Launching | WorkspaceStatus.Running | WorkspaceStatus.Terminating;
|
|
3
|
+
export declare const isWorkspaceRunningOrStopping: (status: WorkspaceStatus) => status is WorkspaceStatus.Running | WorkspaceStatus.Terminating;
|