@gen3/core 0.12.3 → 0.12.5

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/index.d.ts CHANGED
@@ -1385,6 +1385,123 @@ interface FetchRequest {
1385
1385
  readonly isJSON?: boolean;
1386
1386
  }
1387
1387
 
1388
+ interface PayModel {
1389
+ bmh_workspace_id: string;
1390
+ workspace_type: string;
1391
+ user_id: string;
1392
+ account_id: string;
1393
+ request_status: string;
1394
+ local: boolean;
1395
+ region: string;
1396
+ ecs: boolean;
1397
+ subnet: number;
1398
+ 'hard-limit': number;
1399
+ 'soft-limit': number;
1400
+ 'total-usage': number;
1401
+ current_pay_model: boolean;
1402
+ }
1403
+ interface WorkspaceId {
1404
+ id: string;
1405
+ }
1406
+ interface WorkspaceInfo extends WorkspaceId {
1407
+ name: string;
1408
+ idleTimeLimit: number;
1409
+ memoryLimit: string;
1410
+ cpuLimit: string;
1411
+ }
1412
+ interface WorkspaceInfoResponse {
1413
+ id: string;
1414
+ name: string;
1415
+ 'idle-time-limit': number;
1416
+ 'memory-limit': string;
1417
+ 'cpu-limit': string;
1418
+ }
1419
+ type WorkspaceOptionsResponse = Array<WorkspaceInfoResponse>;
1420
+ type WorkspaceOptions = Array<WorkspaceInfo>;
1421
+ interface WorkspacePayModelResponse {
1422
+ currentPayModel: PayModel;
1423
+ allPayModels: PayModel[];
1424
+ noPayModel: boolean;
1425
+ }
1426
+ /**
1427
+ * Workspace Pod status
1428
+ */
1429
+ declare enum WorkspaceStatus {
1430
+ Launching = "Launching",
1431
+ Running = "Running",
1432
+ Terminating = "Terminating",
1433
+ Stopped = "Stopped",
1434
+ NotFound = "Not Found",
1435
+ Errored = "Errored",
1436
+ StatusError = "Status Error"
1437
+ }
1438
+ /**
1439
+ * requested state of pod, either by user or workspace monitor
1440
+ */
1441
+ declare enum RequestedWorkspaceStatus {
1442
+ Launch = "Launch",
1443
+ Terminate = "Terminate",
1444
+ Unset = "Unset"
1445
+ }
1446
+ declare enum PodConditionType {
1447
+ PodScheduled = "PodScheduled",
1448
+ Initialized = "Initialized",
1449
+ ContainersReady = "ContainersReady",
1450
+ PodReadyToStartContainers = "PodReadyToStartContainers",
1451
+ ProxyConnected = "ProxyConnected",
1452
+ Ready = "Ready"
1453
+ }
1454
+ declare enum PodStatus {
1455
+ True = "True",
1456
+ False = "False",
1457
+ Unknown = "Unknown"
1458
+ }
1459
+ interface WorkspaceContainerState {
1460
+ name: string;
1461
+ ready: boolean;
1462
+ state: {
1463
+ running: {
1464
+ startedAt: string;
1465
+ };
1466
+ } | {
1467
+ waiting: {
1468
+ reason: string;
1469
+ };
1470
+ } | {
1471
+ terminated: {
1472
+ reason: string;
1473
+ };
1474
+ };
1475
+ }
1476
+ interface WorkspacePodCondition {
1477
+ type: PodConditionType;
1478
+ status: PodStatus;
1479
+ }
1480
+ interface WorkspaceStatusResponse {
1481
+ status: WorkspaceStatus;
1482
+ conditions?: Array<WorkspacePodCondition>;
1483
+ containerStates?: Array<WorkspaceContainerState>;
1484
+ idleTimeLimit?: number;
1485
+ lastActivityTime: number;
1486
+ workspaceType?: string;
1487
+ }
1488
+
1489
+ interface WorkspaceState {
1490
+ id: string;
1491
+ status: WorkspaceStatus;
1492
+ requestedStatus: RequestedWorkspaceStatus;
1493
+ requestedStatusTimestamp: number;
1494
+ }
1495
+ declare const setActiveWorkspaceId: _reduxjs_toolkit.ActionCreatorWithPayload<WorkspaceId, "ActiveWorkspace/setActiveWorkspaceId">;
1496
+ declare const clearActiveWorkspaceId: _reduxjs_toolkit.ActionCreatorWithoutPayload<"ActiveWorkspace/clearActiveWorkspaceId">;
1497
+ declare const setActiveWorkspaceStatus: _reduxjs_toolkit.ActionCreatorWithPayload<WorkspaceStatus, "ActiveWorkspace/setActiveWorkspaceStatus">;
1498
+ declare const setRequestedWorkspaceStatus: _reduxjs_toolkit.ActionCreatorWithPayload<RequestedWorkspaceStatus, "ActiveWorkspace/setRequestedWorkspaceStatus">;
1499
+ declare const setActiveWorkspace: _reduxjs_toolkit.ActionCreatorWithPayload<WorkspaceState, "ActiveWorkspace/setActiveWorkspace">;
1500
+ declare const selectActiveWorkspaceId: (state: CoreState) => string;
1501
+ declare const selectActiveWorkspaceStatus: (state: CoreState) => WorkspaceStatus;
1502
+ declare const selectRequestedWorkspaceStatus: (state: CoreState) => RequestedWorkspaceStatus;
1503
+ declare const selectRequestedWorkspaceStatusTimestamp: (state: CoreState) => number;
1504
+
1388
1505
  interface NameUrl {
1389
1506
  readonly name: string;
1390
1507
  readonly url: string;
@@ -2856,123 +2973,6 @@ declare const isFetchError: <T>(obj: unknown) => obj is FetchError<T>;
2856
2973
  */
2857
2974
  declare const fetchFence: <T>({ endpoint, headers, body, method, isJSON }: FetchRequest, useService?: boolean) => Promise<Gen3FenceResponse<T>>;
2858
2975
 
2859
- interface PayModel {
2860
- bmh_workspace_id: string;
2861
- workspace_type: string;
2862
- user_id: string;
2863
- account_id: string;
2864
- request_status: string;
2865
- local: boolean;
2866
- region: string;
2867
- ecs: boolean;
2868
- subnet: number;
2869
- 'hard-limit': number;
2870
- 'soft-limit': number;
2871
- 'total-usage': number;
2872
- current_pay_model: boolean;
2873
- }
2874
- interface WorkspaceId {
2875
- id: string;
2876
- }
2877
- interface WorkspaceInfo extends WorkspaceId {
2878
- name: string;
2879
- idleTimeLimit: number;
2880
- memoryLimit: string;
2881
- cpuLimit: string;
2882
- }
2883
- interface WorkspaceInfoResponse {
2884
- id: string;
2885
- name: string;
2886
- 'idle-time-limit': number;
2887
- 'memory-limit': string;
2888
- 'cpu-limit': string;
2889
- }
2890
- type WorkspaceOptionsResponse = Array<WorkspaceInfoResponse>;
2891
- type WorkspaceOptions = Array<WorkspaceInfo>;
2892
- interface WorkspacePayModelResponse {
2893
- currentPayModel: PayModel;
2894
- allPayModels: PayModel[];
2895
- noPayModel: boolean;
2896
- }
2897
- /**
2898
- * Workspace Pod status
2899
- */
2900
- declare enum WorkspaceStatus {
2901
- Launching = "Launching",
2902
- Running = "Running",
2903
- Terminating = "Terminating",
2904
- Stopped = "Stopped",
2905
- NotFound = "Not Found",
2906
- Errored = "Errored",
2907
- StatusError = "Status Error"
2908
- }
2909
- /**
2910
- * requested state of pod, either by user or workspace monitor
2911
- */
2912
- declare enum RequestedWorkspaceStatus {
2913
- Launch = "Launch",
2914
- Terminate = "Terminate",
2915
- Unset = "Unset"
2916
- }
2917
- declare enum PodConditionType {
2918
- PodScheduled = "PodScheduled",
2919
- Initialized = "Initialized",
2920
- ContainersReady = "ContainersReady",
2921
- PodReadyToStartContainers = "PodReadyToStartContainers",
2922
- ProxyConnected = "ProxyConnected",
2923
- Ready = "Ready"
2924
- }
2925
- declare enum PodStatus {
2926
- True = "True",
2927
- False = "False",
2928
- Unknown = "Unknown"
2929
- }
2930
- interface WorkspaceContainerState {
2931
- name: string;
2932
- ready: boolean;
2933
- state: {
2934
- running: {
2935
- startedAt: string;
2936
- };
2937
- } | {
2938
- waiting: {
2939
- reason: string;
2940
- };
2941
- } | {
2942
- terminated: {
2943
- reason: string;
2944
- };
2945
- };
2946
- }
2947
- interface WorkspacePodCondition {
2948
- type: PodConditionType;
2949
- status: PodStatus;
2950
- }
2951
- interface WorkspaceStatusResponse {
2952
- status: WorkspaceStatus;
2953
- conditions?: Array<WorkspacePodCondition>;
2954
- containerStates?: Array<WorkspaceContainerState>;
2955
- idleTimeLimit?: number;
2956
- lastActivityTime: number;
2957
- workspaceType?: string;
2958
- }
2959
-
2960
- interface WorkspaceState {
2961
- id: string;
2962
- status: WorkspaceStatus;
2963
- requestedStatus: RequestedWorkspaceStatus;
2964
- requestedStatusTimestamp: number;
2965
- }
2966
- declare const setActiveWorkspaceId: _reduxjs_toolkit.ActionCreatorWithPayload<WorkspaceId, "ActiveWorkspace/setActiveWorkspaceId">;
2967
- declare const clearActiveWorkspaceId: _reduxjs_toolkit.ActionCreatorWithoutPayload<"ActiveWorkspace/clearActiveWorkspaceId">;
2968
- declare const setActiveWorkspaceStatus: _reduxjs_toolkit.ActionCreatorWithPayload<WorkspaceStatus, "ActiveWorkspace/setActiveWorkspaceStatus">;
2969
- declare const setRequestedWorkspaceStatus: _reduxjs_toolkit.ActionCreatorWithPayload<RequestedWorkspaceStatus, "ActiveWorkspace/setRequestedWorkspaceStatus">;
2970
- declare const setActiveWorkspace: _reduxjs_toolkit.ActionCreatorWithPayload<WorkspaceState, "ActiveWorkspace/setActiveWorkspace">;
2971
- declare const selectActiveWorkspaceId: (state: CoreState) => string;
2972
- declare const selectActiveWorkspaceStatus: (state: CoreState) => WorkspaceStatus;
2973
- declare const selectRequestedWorkspaceStatus: (state: CoreState) => RequestedWorkspaceStatus;
2974
- declare const selectRequestedWorkspaceStatusTimestamp: (state: CoreState) => number;
2975
-
2976
2976
  interface guppyFetchError {
2977
2977
  readonly url: string;
2978
2978
  readonly status: number;
@@ -12611,6 +12611,8 @@ declare const rootReducer: redux.Reducer<{
12611
12611
  }>>;
12612
12612
  type CoreState = ReturnType<typeof rootReducer>;
12613
12613
 
12614
+ declare const CoreProvider: React__default.FC<Record<string, unknown>>;
12615
+
12614
12616
  /**
12615
12617
  * The initial context is never used in practice. A little casting voodoo to satisfy TS.
12616
12618
  *
@@ -12785,8 +12787,6 @@ declare const ageDisplay: (ageInDays: number, yearsOnly?: boolean, defaultValue?
12785
12787
  */
12786
12788
  declare const stringifyJSONParam: (obj?: Record<string, any>, defaults?: string) => string;
12787
12789
 
12788
- declare const CoreProvider: React__default.FC<Record<string, unknown>>;
12789
-
12790
12790
  interface AiSearchParams {
12791
12791
  readonly query: string;
12792
12792
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gen3/core",
3
- "version": "0.12.3",
3
+ "version": "0.12.5",
4
4
  "author": "CTDS",
5
5
  "description": "Core module for Gen3.2. Packages provides an interface for interacting with the gen3 API, various types, and a redux store for managing state.",
6
6
  "license": "Apache-2.0",
@@ -26,6 +26,11 @@
26
26
  "types": "./dist/server.d.ts",
27
27
  "import": "./dist/esm/server.js",
28
28
  "require": "./dist/cjs/server.cjs"
29
+ },
30
+ "./exports/constants": {
31
+ "types": "./dist/constant.d.ts",
32
+ "import": "./dist/esm/constants.js",
33
+ "require": "./dist/cjs/constants.js"
29
34
  }
30
35
  },
31
36
  "scripts": {
@@ -40,7 +45,7 @@
40
45
  "test:watch": "jest unit --watch",
41
46
  "test:int": "jest int",
42
47
  "test:all": "jest",
43
- "dev": "npm run build:watch"
48
+ "dev": "echo no dev tasks"
44
49
  },
45
50
  "peerDependencies": {
46
51
  "react": "^18.3.1",
@@ -74,5 +79,6 @@
74
79
  },
75
80
  "files": [
76
81
  "dist"
77
- ]
82
+ ],
83
+ "gitHead": "9807ce76c97977628a1618e18b511e4cd6f56244"
78
84
  }