whio-api-sdk 1.0.242-beta-staging → 1.0.243-beta-staging
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/src/sdk/modules/system-snapshot.module.d.ts +16 -0
- package/dist/src/sdk/modules/system-snapshot.module.js +54 -0
- package/dist/src/sdk/sdk.d.ts +5 -0
- package/dist/src/sdk/sdk.js +19 -1
- package/dist/src/sdk/types/index.d.ts +1 -0
- package/dist/src/sdk/types/index.js +1 -0
- package/dist/src/sdk/types/system-snapshot.types.d.ts +31 -0
- package/dist/src/sdk/types/system-snapshot.types.js +1 -0
- package/dist/src/sdk/urls.d.ts +1 -0
- package/dist/src/sdk/urls.js +2 -0
- package/package.json +1 -1
- package/src/sdk/modules/system-snapshot.module.ts +59 -0
- package/src/sdk/sdk.ts +19 -3
- package/src/sdk/types/index.ts +1 -0
- package/src/sdk/types/system-snapshot.types.ts +34 -0
- package/src/sdk/urls.ts +3 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { BaseClient } from './base-client';
|
|
2
|
+
import { SystemSnapshot, SystemSnapshotsResponse, QuerySnapshotsParams, CurrentMetrics } from '../types';
|
|
3
|
+
export declare class SystemSnapshotModule extends BaseClient {
|
|
4
|
+
/**
|
|
5
|
+
* Get historical system snapshots with optional filtering
|
|
6
|
+
*/
|
|
7
|
+
getSnapshots(params?: QuerySnapshotsParams): Promise<SystemSnapshotsResponse>;
|
|
8
|
+
/**
|
|
9
|
+
* Get the most recent stored snapshot
|
|
10
|
+
*/
|
|
11
|
+
getLatestSnapshot(): Promise<SystemSnapshot | null>;
|
|
12
|
+
/**
|
|
13
|
+
* Get current live metrics without persisting
|
|
14
|
+
*/
|
|
15
|
+
getCurrentMetrics(): Promise<CurrentMetrics>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
import { BaseClient } from './base-client';
|
|
11
|
+
import urls from '../urls';
|
|
12
|
+
export class SystemSnapshotModule extends BaseClient {
|
|
13
|
+
/**
|
|
14
|
+
* Get historical system snapshots with optional filtering
|
|
15
|
+
*/
|
|
16
|
+
getSnapshots(params) {
|
|
17
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
18
|
+
const searchParams = new URLSearchParams();
|
|
19
|
+
if (params === null || params === void 0 ? void 0 : params.startDate) {
|
|
20
|
+
searchParams.append('startDate', params.startDate);
|
|
21
|
+
}
|
|
22
|
+
if (params === null || params === void 0 ? void 0 : params.endDate) {
|
|
23
|
+
searchParams.append('endDate', params.endDate);
|
|
24
|
+
}
|
|
25
|
+
if ((params === null || params === void 0 ? void 0 : params.limit) !== undefined) {
|
|
26
|
+
searchParams.append('limit', params.limit.toString());
|
|
27
|
+
}
|
|
28
|
+
if ((params === null || params === void 0 ? void 0 : params.offset) !== undefined) {
|
|
29
|
+
searchParams.append('offset', params.offset.toString());
|
|
30
|
+
}
|
|
31
|
+
const queryString = searchParams.toString();
|
|
32
|
+
const url = queryString
|
|
33
|
+
? `${urls.systemSnapshots}?${queryString}`
|
|
34
|
+
: urls.systemSnapshots;
|
|
35
|
+
return this.request(url, 'GET');
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Get the most recent stored snapshot
|
|
40
|
+
*/
|
|
41
|
+
getLatestSnapshot() {
|
|
42
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
43
|
+
return this.request(`${urls.systemSnapshots}/latest`, 'GET');
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Get current live metrics without persisting
|
|
48
|
+
*/
|
|
49
|
+
getCurrentMetrics() {
|
|
50
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
51
|
+
return this.request(`${urls.systemSnapshots}/current`, 'GET');
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
}
|
package/dist/src/sdk/sdk.d.ts
CHANGED
|
@@ -18,6 +18,7 @@ import { WebSocketModule } from './modules/websocket.module';
|
|
|
18
18
|
import { ReportsModule } from './modules/reports.module';
|
|
19
19
|
import { PatientModule } from './modules/patient.module';
|
|
20
20
|
import { DataStrategyModule } from './modules/data-strategy.module';
|
|
21
|
+
import { SystemSnapshotModule } from './modules/system-snapshot.module';
|
|
21
22
|
/**
|
|
22
23
|
* Main SDK class that provides access to all domain-specific modules
|
|
23
24
|
*/
|
|
@@ -40,6 +41,7 @@ export declare class ApiSDK extends BaseClient {
|
|
|
40
41
|
readonly reports: ReportsModule;
|
|
41
42
|
readonly patients: PatientModule;
|
|
42
43
|
readonly dataStrategies: DataStrategyModule;
|
|
44
|
+
readonly systemSnapshots: SystemSnapshotModule;
|
|
43
45
|
private modules;
|
|
44
46
|
private sdkInitialized;
|
|
45
47
|
constructor(config?: SDKConfig);
|
|
@@ -229,4 +231,7 @@ export declare class ApiSDK extends BaseClient {
|
|
|
229
231
|
getDataStrategyByOrganization(...args: Parameters<DataStrategyModule['getDataStrategyByOrganization']>): Promise<import("./types").DataStrategy>;
|
|
230
232
|
updateDataStrategy(...args: Parameters<DataStrategyModule['updateDataStrategy']>): Promise<import("./types").DataStrategy>;
|
|
231
233
|
deleteDataStrategy(...args: Parameters<DataStrategyModule['deleteDataStrategy']>): Promise<void>;
|
|
234
|
+
getSystemSnapshots(...args: Parameters<SystemSnapshotModule['getSnapshots']>): Promise<import("./types").SystemSnapshotsResponse>;
|
|
235
|
+
getLatestSystemSnapshot(...args: Parameters<SystemSnapshotModule['getLatestSnapshot']>): Promise<import("./types").SystemSnapshot | null>;
|
|
236
|
+
getCurrentSystemMetrics(...args: Parameters<SystemSnapshotModule['getCurrentMetrics']>): Promise<import("./types").CurrentMetrics>;
|
|
232
237
|
}
|
package/dist/src/sdk/sdk.js
CHANGED
|
@@ -26,6 +26,7 @@ import { WebSocketModule } from './modules/websocket.module';
|
|
|
26
26
|
import { ReportsModule } from './modules/reports.module';
|
|
27
27
|
import { PatientModule } from './modules/patient.module';
|
|
28
28
|
import { DataStrategyModule } from './modules/data-strategy.module';
|
|
29
|
+
import { SystemSnapshotModule } from './modules/system-snapshot.module';
|
|
29
30
|
/**
|
|
30
31
|
* Main SDK class that provides access to all domain-specific modules
|
|
31
32
|
*/
|
|
@@ -52,12 +53,13 @@ export class ApiSDK extends BaseClient {
|
|
|
52
53
|
this.reports = new ReportsModule(config);
|
|
53
54
|
this.patients = new PatientModule(config);
|
|
54
55
|
this.dataStrategies = new DataStrategyModule(config);
|
|
56
|
+
this.systemSnapshots = new SystemSnapshotModule(config);
|
|
55
57
|
// Store all modules for batch operations
|
|
56
58
|
this.modules = [
|
|
57
59
|
this.auth, this.users, this.organizations, this.teams, this.templates,
|
|
58
60
|
this.transcriptionSummaries, this.sessions, this.agents, this.audio,
|
|
59
61
|
this.workflows, this.integrationActions, this.logs, this.debug, this.externalIntegrations,
|
|
60
|
-
this.websocket, this.reports, this.patients, this.dataStrategies
|
|
62
|
+
this.websocket, this.reports, this.patients, this.dataStrategies, this.systemSnapshots
|
|
61
63
|
];
|
|
62
64
|
// Auto-initialize the SDK
|
|
63
65
|
this.initialize().catch(error => {
|
|
@@ -948,4 +950,20 @@ export class ApiSDK extends BaseClient {
|
|
|
948
950
|
return this.dataStrategies.deleteDataStrategy(...args);
|
|
949
951
|
});
|
|
950
952
|
}
|
|
953
|
+
// SystemSnapshot methods
|
|
954
|
+
getSystemSnapshots(...args) {
|
|
955
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
956
|
+
return this.systemSnapshots.getSnapshots(...args);
|
|
957
|
+
});
|
|
958
|
+
}
|
|
959
|
+
getLatestSystemSnapshot(...args) {
|
|
960
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
961
|
+
return this.systemSnapshots.getLatestSnapshot(...args);
|
|
962
|
+
});
|
|
963
|
+
}
|
|
964
|
+
getCurrentSystemMetrics(...args) {
|
|
965
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
966
|
+
return this.systemSnapshots.getCurrentMetrics(...args);
|
|
967
|
+
});
|
|
968
|
+
}
|
|
951
969
|
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export interface SystemSnapshot {
|
|
2
|
+
id: string;
|
|
3
|
+
websocketConnectionCount: number;
|
|
4
|
+
transcriptionQueueSize: number;
|
|
5
|
+
summaryQueueSize: number;
|
|
6
|
+
systemRamUsageBytes: string;
|
|
7
|
+
systemRamTotalBytes: string;
|
|
8
|
+
systemCpuUsagePercent: number;
|
|
9
|
+
createdAt: string;
|
|
10
|
+
}
|
|
11
|
+
export interface SystemSnapshotsResponse {
|
|
12
|
+
data: SystemSnapshot[];
|
|
13
|
+
total: number;
|
|
14
|
+
limit: number;
|
|
15
|
+
offset: number;
|
|
16
|
+
}
|
|
17
|
+
export interface QuerySnapshotsParams {
|
|
18
|
+
startDate?: string;
|
|
19
|
+
endDate?: string;
|
|
20
|
+
limit?: number;
|
|
21
|
+
offset?: number;
|
|
22
|
+
}
|
|
23
|
+
export interface CurrentMetrics {
|
|
24
|
+
websocketConnectionCount: number;
|
|
25
|
+
transcriptionQueueSize: number;
|
|
26
|
+
summaryQueueSize: number;
|
|
27
|
+
systemRamUsageBytes: string;
|
|
28
|
+
systemRamTotalBytes: string;
|
|
29
|
+
systemCpuUsagePercent: number;
|
|
30
|
+
capturedAt: string;
|
|
31
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/src/sdk/urls.d.ts
CHANGED
package/dist/src/sdk/urls.js
CHANGED
package/package.json
CHANGED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { BaseClient } from './base-client';
|
|
2
|
+
import {
|
|
3
|
+
SystemSnapshot,
|
|
4
|
+
SystemSnapshotsResponse,
|
|
5
|
+
QuerySnapshotsParams,
|
|
6
|
+
CurrentMetrics,
|
|
7
|
+
} from '../types';
|
|
8
|
+
import urls from '../urls';
|
|
9
|
+
|
|
10
|
+
export class SystemSnapshotModule extends BaseClient {
|
|
11
|
+
/**
|
|
12
|
+
* Get historical system snapshots with optional filtering
|
|
13
|
+
*/
|
|
14
|
+
public async getSnapshots(
|
|
15
|
+
params?: QuerySnapshotsParams,
|
|
16
|
+
): Promise<SystemSnapshotsResponse> {
|
|
17
|
+
const searchParams = new URLSearchParams();
|
|
18
|
+
|
|
19
|
+
if (params?.startDate) {
|
|
20
|
+
searchParams.append('startDate', params.startDate);
|
|
21
|
+
}
|
|
22
|
+
if (params?.endDate) {
|
|
23
|
+
searchParams.append('endDate', params.endDate);
|
|
24
|
+
}
|
|
25
|
+
if (params?.limit !== undefined) {
|
|
26
|
+
searchParams.append('limit', params.limit.toString());
|
|
27
|
+
}
|
|
28
|
+
if (params?.offset !== undefined) {
|
|
29
|
+
searchParams.append('offset', params.offset.toString());
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
const queryString = searchParams.toString();
|
|
33
|
+
const url = queryString
|
|
34
|
+
? `${urls.systemSnapshots}?${queryString}`
|
|
35
|
+
: urls.systemSnapshots;
|
|
36
|
+
|
|
37
|
+
return this.request<SystemSnapshotsResponse>(url, 'GET');
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Get the most recent stored snapshot
|
|
42
|
+
*/
|
|
43
|
+
public async getLatestSnapshot(): Promise<SystemSnapshot | null> {
|
|
44
|
+
return this.request<SystemSnapshot | null>(
|
|
45
|
+
`${urls.systemSnapshots}/latest`,
|
|
46
|
+
'GET',
|
|
47
|
+
);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Get current live metrics without persisting
|
|
52
|
+
*/
|
|
53
|
+
public async getCurrentMetrics(): Promise<CurrentMetrics> {
|
|
54
|
+
return this.request<CurrentMetrics>(
|
|
55
|
+
`${urls.systemSnapshots}/current`,
|
|
56
|
+
'GET',
|
|
57
|
+
);
|
|
58
|
+
}
|
|
59
|
+
}
|
package/src/sdk/sdk.ts
CHANGED
|
@@ -19,6 +19,7 @@ import { WebSocketModule } from './modules/websocket.module';
|
|
|
19
19
|
import { ReportsModule } from './modules/reports.module';
|
|
20
20
|
import { PatientModule } from './modules/patient.module';
|
|
21
21
|
import { DataStrategyModule } from './modules/data-strategy.module';
|
|
22
|
+
import { SystemSnapshotModule } from './modules/system-snapshot.module';
|
|
22
23
|
|
|
23
24
|
/**
|
|
24
25
|
* Main SDK class that provides access to all domain-specific modules
|
|
@@ -42,7 +43,8 @@ export class ApiSDK extends BaseClient {
|
|
|
42
43
|
public readonly reports: ReportsModule;
|
|
43
44
|
public readonly patients: PatientModule;
|
|
44
45
|
public readonly dataStrategies: DataStrategyModule;
|
|
45
|
-
|
|
46
|
+
public readonly systemSnapshots: SystemSnapshotModule;
|
|
47
|
+
|
|
46
48
|
private modules: BaseClient[];
|
|
47
49
|
private sdkInitialized: boolean = false;
|
|
48
50
|
|
|
@@ -68,13 +70,14 @@ export class ApiSDK extends BaseClient {
|
|
|
68
70
|
this.reports = new ReportsModule(config);
|
|
69
71
|
this.patients = new PatientModule(config);
|
|
70
72
|
this.dataStrategies = new DataStrategyModule(config);
|
|
71
|
-
|
|
73
|
+
this.systemSnapshots = new SystemSnapshotModule(config);
|
|
74
|
+
|
|
72
75
|
// Store all modules for batch operations
|
|
73
76
|
this.modules = [
|
|
74
77
|
this.auth, this.users, this.organizations, this.teams, this.templates,
|
|
75
78
|
this.transcriptionSummaries, this.sessions, this.agents, this.audio,
|
|
76
79
|
this.workflows, this.integrationActions, this.logs, this.debug, this.externalIntegrations,
|
|
77
|
-
this.websocket, this.reports, this.patients, this.dataStrategies
|
|
80
|
+
this.websocket, this.reports, this.patients, this.dataStrategies, this.systemSnapshots
|
|
78
81
|
];
|
|
79
82
|
|
|
80
83
|
// Auto-initialize the SDK
|
|
@@ -827,4 +830,17 @@ export class ApiSDK extends BaseClient {
|
|
|
827
830
|
return this.dataStrategies.deleteDataStrategy(...args);
|
|
828
831
|
}
|
|
829
832
|
|
|
833
|
+
// SystemSnapshot methods
|
|
834
|
+
public async getSystemSnapshots(...args: Parameters<SystemSnapshotModule['getSnapshots']>) {
|
|
835
|
+
return this.systemSnapshots.getSnapshots(...args);
|
|
836
|
+
}
|
|
837
|
+
|
|
838
|
+
public async getLatestSystemSnapshot(...args: Parameters<SystemSnapshotModule['getLatestSnapshot']>) {
|
|
839
|
+
return this.systemSnapshots.getLatestSnapshot(...args);
|
|
840
|
+
}
|
|
841
|
+
|
|
842
|
+
public async getCurrentSystemMetrics(...args: Parameters<SystemSnapshotModule['getCurrentMetrics']>) {
|
|
843
|
+
return this.systemSnapshots.getCurrentMetrics(...args);
|
|
844
|
+
}
|
|
845
|
+
|
|
830
846
|
}
|
package/src/sdk/types/index.ts
CHANGED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export interface SystemSnapshot {
|
|
2
|
+
id: string;
|
|
3
|
+
websocketConnectionCount: number;
|
|
4
|
+
transcriptionQueueSize: number;
|
|
5
|
+
summaryQueueSize: number;
|
|
6
|
+
systemRamUsageBytes: string;
|
|
7
|
+
systemRamTotalBytes: string;
|
|
8
|
+
systemCpuUsagePercent: number;
|
|
9
|
+
createdAt: string;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export interface SystemSnapshotsResponse {
|
|
13
|
+
data: SystemSnapshot[];
|
|
14
|
+
total: number;
|
|
15
|
+
limit: number;
|
|
16
|
+
offset: number;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export interface QuerySnapshotsParams {
|
|
20
|
+
startDate?: string;
|
|
21
|
+
endDate?: string;
|
|
22
|
+
limit?: number;
|
|
23
|
+
offset?: number;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export interface CurrentMetrics {
|
|
27
|
+
websocketConnectionCount: number;
|
|
28
|
+
transcriptionQueueSize: number;
|
|
29
|
+
summaryQueueSize: number;
|
|
30
|
+
systemRamUsageBytes: string;
|
|
31
|
+
systemRamTotalBytes: string;
|
|
32
|
+
systemCpuUsagePercent: number;
|
|
33
|
+
capturedAt: string;
|
|
34
|
+
}
|