whio-api-sdk 1.1.28 → 1.1.33
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/agent.module.d.ts +90 -5
- package/dist/src/sdk/modules/agent.module.js +87 -2
- package/dist/src/sdk/modules/audio.module.d.ts +143 -2
- package/dist/src/sdk/modules/audio.module.js +144 -5
- package/dist/src/sdk/modules/auth.module.d.ts +67 -0
- package/dist/src/sdk/modules/auth.module.js +81 -0
- package/dist/src/sdk/modules/data-strategy.module.d.ts +45 -7
- package/dist/src/sdk/modules/data-strategy.module.js +39 -1
- package/dist/src/sdk/modules/external-integration.module.d.ts +30 -0
- package/dist/src/sdk/modules/external-integration.module.js +30 -0
- package/dist/src/sdk/modules/integration-action.module.d.ts +39 -0
- package/dist/src/sdk/modules/integration-action.module.js +39 -0
- package/dist/src/sdk/modules/log.module.d.ts +4 -4
- package/dist/src/sdk/modules/organization.module.d.ts +62 -3
- package/dist/src/sdk/modules/organization.module.js +61 -2
- package/dist/src/sdk/modules/patient.module.d.ts +5 -2
- package/dist/src/sdk/modules/patient.module.js +5 -2
- package/dist/src/sdk/modules/reports.module.d.ts +4 -4
- package/dist/src/sdk/modules/reports.module.js +6 -6
- package/dist/src/sdk/modules/session/orgadmin-session.module.d.ts +46 -1
- package/dist/src/sdk/modules/session/orgadmin-session.module.js +53 -6
- package/dist/src/sdk/modules/session/session.module.d.ts +62 -1
- package/dist/src/sdk/modules/session/session.module.js +64 -1
- package/dist/src/sdk/modules/session/superuser-session.module.d.ts +46 -1
- package/dist/src/sdk/modules/session/superuser-session.module.js +52 -5
- package/dist/src/sdk/modules/session.module.d.ts +142 -3
- package/dist/src/sdk/modules/session.module.js +153 -12
- package/dist/src/sdk/modules/team.module.d.ts +56 -4
- package/dist/src/sdk/modules/team.module.js +54 -6
- package/dist/src/sdk/modules/template.module.d.ts +96 -4
- package/dist/src/sdk/modules/template.module.js +95 -24
- package/dist/src/sdk/modules/transcription-summary.module.d.ts +60 -3
- package/dist/src/sdk/modules/transcription-summary.module.js +60 -7
- package/dist/src/sdk/modules/user.module.d.ts +127 -0
- package/dist/src/sdk/modules/user.module.js +136 -1
- package/dist/src/sdk/modules/websocket.module.d.ts +25 -8
- package/dist/src/sdk/modules/websocket.module.js +23 -6
- package/dist/src/sdk/modules/workflow.module.d.ts +39 -0
- package/dist/src/sdk/modules/workflow.module.js +39 -0
- package/dist/src/sdk/sdk.d.ts +23 -29
- package/dist/src/sdk/sdk.js +14 -44
- package/dist/src/sdk/types/agent.types.d.ts +3 -0
- package/dist/src/sdk/types/audio.types.d.ts +8 -9
- package/dist/src/sdk/types/data-strategy.types.d.ts +3 -0
- package/dist/src/sdk/types/external-integration.types.d.ts +6 -0
- package/dist/src/sdk/types/log.types.d.ts +2 -21
- package/dist/src/sdk/types/patient.types.d.ts +2 -3
- package/dist/src/sdk/types/reports.types.d.ts +1 -1
- package/dist/src/sdk/types/session.types.d.ts +8 -8
- package/dist/src/sdk/types/team.types.d.ts +4 -3
- package/dist/src/sdk/types/template.types.d.ts +15 -7
- package/dist/src/sdk/types/user.types.d.ts +6 -0
- package/dist/src/sdk/types/websocket.types.d.ts +4 -10
- package/dist/src/sdk/urls.d.ts +2 -4
- package/dist/src/sdk/urls.js +2 -5
- package/dist/src/sdk/whio-orgadmin-sdk.d.ts +9 -7
- package/dist/src/sdk/whio-orgadmin-sdk.js +10 -0
- package/dist/src/sdk/whio-sdk.d.ts +15 -8
- package/dist/src/sdk/whio-sdk.js +46 -18
- package/dist/src/sdk/whio-superuser-sdk.d.ts +14 -16
- package/dist/src/sdk/whio-superuser-sdk.js +11 -16
- package/dist/src/sdk/whio-teamadmin-sdk.d.ts +4 -8
- package/dist/src/sdk/whio-teamadmin-sdk.js +1 -18
- package/package.json +1 -1
- package/src/sdk/modules/agent.module.ts +94 -9
- package/src/sdk/modules/audio.module.ts +146 -8
- package/src/sdk/modules/auth.module.ts +88 -0
- package/src/sdk/modules/data-strategy.module.ts +51 -13
- package/src/sdk/modules/external-integration.module.ts +30 -0
- package/src/sdk/modules/integration-action.module.ts +39 -0
- package/src/sdk/modules/log.module.ts +4 -4
- package/src/sdk/modules/organization.module.ts +64 -5
- package/src/sdk/modules/patient.module.ts +5 -2
- package/src/sdk/modules/reports.module.ts +6 -6
- package/src/sdk/modules/session/orgadmin-session.module.ts +53 -7
- package/src/sdk/modules/session/session.module.ts +64 -2
- package/src/sdk/modules/session/superuser-session.module.ts +52 -6
- package/src/sdk/modules/session.module.ts +155 -15
- package/src/sdk/modules/team.module.ts +58 -9
- package/src/sdk/modules/template.module.ts +95 -32
- package/src/sdk/modules/transcription-summary.module.ts +62 -8
- package/src/sdk/modules/user.module.ts +135 -2
- package/src/sdk/modules/websocket.module.ts +26 -8
- package/src/sdk/modules/workflow.module.ts +39 -0
- package/src/sdk/sdk.ts +12 -37
- package/src/sdk/types/agent.types.ts +5 -0
- package/src/sdk/types/audio.types.ts +8 -10
- package/src/sdk/types/data-strategy.types.ts +3 -0
- package/src/sdk/types/external-integration.types.ts +6 -0
- package/src/sdk/types/log.types.ts +4 -23
- package/src/sdk/types/patient.types.ts +2 -3
- package/src/sdk/types/reports.types.ts +1 -1
- package/src/sdk/types/session.types.ts +8 -8
- package/src/sdk/types/team.types.ts +5 -3
- package/src/sdk/types/template.types.ts +18 -7
- package/src/sdk/types/user.types.ts +6 -0
- package/src/sdk/types/websocket.types.ts +8 -7
- package/src/sdk/urls.ts +3 -8
- package/src/sdk/whio-orgadmin-sdk.ts +8 -0
- package/src/sdk/whio-sdk.ts +39 -16
- package/src/sdk/whio-superuser-sdk.ts +9 -16
- package/src/sdk/whio-teamadmin-sdk.ts +1 -16
- package/tsconfig.json +1 -1
- package/src/sdk/modules/debug.module.ts +0 -44
|
@@ -3,7 +3,8 @@ export interface Log {
|
|
|
3
3
|
id: number;
|
|
4
4
|
level: string;
|
|
5
5
|
message: string;
|
|
6
|
-
meta:
|
|
6
|
+
meta: Record<string, unknown>;
|
|
7
|
+
// ISO-8601 string over the wire (serialised from a Date by the API)
|
|
7
8
|
timestamp: string;
|
|
8
9
|
}
|
|
9
10
|
|
|
@@ -43,33 +44,13 @@ export interface CreateLogDto {
|
|
|
43
44
|
message: string;
|
|
44
45
|
context?: string;
|
|
45
46
|
action?: string;
|
|
46
|
-
data?:
|
|
47
|
+
data?: Record<string, unknown>;
|
|
47
48
|
additionalMeta?: Record<string, any>;
|
|
48
49
|
}
|
|
49
50
|
|
|
50
51
|
export interface LogCleanupResponse {
|
|
51
52
|
deletedCount: number;
|
|
53
|
+
// ISO-8601 string over the wire (serialised from a Date by the API)
|
|
52
54
|
cutoffDate: string;
|
|
53
55
|
message: string;
|
|
54
56
|
}
|
|
55
|
-
|
|
56
|
-
// Debug types
|
|
57
|
-
export interface DebugSessionSummary {
|
|
58
|
-
id: string;
|
|
59
|
-
sessionName?: string;
|
|
60
|
-
dateTime: string;
|
|
61
|
-
createdAt: string;
|
|
62
|
-
user: {
|
|
63
|
-
id: string;
|
|
64
|
-
email: string;
|
|
65
|
-
firstName?: string;
|
|
66
|
-
lastName?: string;
|
|
67
|
-
organizationId?: string;
|
|
68
|
-
};
|
|
69
|
-
template?: {
|
|
70
|
-
id: string;
|
|
71
|
-
title: string;
|
|
72
|
-
};
|
|
73
|
-
hasMedicalTranscription: boolean;
|
|
74
|
-
hasPrimaryTranscriptionSummary: boolean;
|
|
75
|
-
}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
// Patient types for SDK
|
|
2
|
-
export interface
|
|
2
|
+
export interface SafePatient {
|
|
3
3
|
id: number;
|
|
4
4
|
first_name: string;
|
|
5
5
|
last_name: string;
|
|
6
|
-
nationalid: string;
|
|
7
6
|
}
|
|
8
7
|
|
|
9
|
-
export type PatientsFromIntegrationResponse =
|
|
8
|
+
export type PatientsFromIntegrationResponse = SafePatient[];
|
|
@@ -17,8 +17,8 @@ export interface Session {
|
|
|
17
17
|
summary?: string;
|
|
18
18
|
sessionName?: string;
|
|
19
19
|
patientName?: string;
|
|
20
|
-
integrationMeta?:
|
|
21
|
-
generationMeta?:
|
|
20
|
+
integrationMeta?: Record<string, unknown> | null;
|
|
21
|
+
generationMeta?: Record<string, unknown> | null;
|
|
22
22
|
summaryStatus: SummaryStatus;
|
|
23
23
|
audioStreamStatus: AudioStreamStatus;
|
|
24
24
|
createdAt: string;
|
|
@@ -71,8 +71,8 @@ export interface UpdateSessionDto {
|
|
|
71
71
|
summary?: string;
|
|
72
72
|
sessionName?: string;
|
|
73
73
|
patientName?: string;
|
|
74
|
-
integrationMeta?:
|
|
75
|
-
generationMeta?:
|
|
74
|
+
integrationMeta?: Record<string, unknown> | null;
|
|
75
|
+
generationMeta?: Record<string, unknown> | null;
|
|
76
76
|
summaryStatus?: SummaryStatus;
|
|
77
77
|
audioStreamStatus?: AudioStreamStatus;
|
|
78
78
|
primaryTranscriptionSummaryId?: string;
|
|
@@ -84,8 +84,7 @@ export interface SetAudioStreamStatusDto {
|
|
|
84
84
|
}
|
|
85
85
|
|
|
86
86
|
export interface ForwardToTiakiResponse {
|
|
87
|
-
|
|
88
|
-
message?: string;
|
|
87
|
+
message: string;
|
|
89
88
|
}
|
|
90
89
|
|
|
91
90
|
export interface SessionsResponse {
|
|
@@ -106,6 +105,7 @@ export interface SearchSessionsDto {
|
|
|
106
105
|
templateId?: string;
|
|
107
106
|
hasSummary?: boolean;
|
|
108
107
|
includeTranscriptions?: boolean;
|
|
108
|
+
includeArchived?: boolean;
|
|
109
109
|
limit?: number;
|
|
110
110
|
offset?: number;
|
|
111
111
|
}
|
|
@@ -121,8 +121,8 @@ export interface SearchSessionResult {
|
|
|
121
121
|
audioStreamStatus: AudioStreamStatus;
|
|
122
122
|
medicalTranscription: string | null;
|
|
123
123
|
culturalTranscription: string | null;
|
|
124
|
-
integrationMeta?:
|
|
125
|
-
generationMeta?:
|
|
124
|
+
integrationMeta?: Record<string, unknown> | null;
|
|
125
|
+
generationMeta?: Record<string, unknown> | null;
|
|
126
126
|
templateId?: string;
|
|
127
127
|
userId: string;
|
|
128
128
|
primaryTranscriptionSummaryId?: string;
|
|
@@ -5,7 +5,7 @@ export interface TeamRole {
|
|
|
5
5
|
id: string;
|
|
6
6
|
name: string;
|
|
7
7
|
createdAt: string;
|
|
8
|
-
|
|
8
|
+
updatedAt: string;
|
|
9
9
|
userId: string;
|
|
10
10
|
teamId: string;
|
|
11
11
|
|
|
@@ -18,7 +18,7 @@ export interface Team {
|
|
|
18
18
|
name: string;
|
|
19
19
|
description?: string;
|
|
20
20
|
createdAt: string;
|
|
21
|
-
|
|
21
|
+
updatedAt: string;
|
|
22
22
|
organizationId: string;
|
|
23
23
|
|
|
24
24
|
organization?: Organization;
|
|
@@ -38,9 +38,11 @@ export interface UpdateTeamDto {
|
|
|
38
38
|
organizationId?: string;
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
+
export type TeamRoleName = 'member' | 'editor' | 'contributor' | 'lead';
|
|
42
|
+
|
|
41
43
|
// Team Role assignment DTO
|
|
42
44
|
export interface AssignTeamRoleDto {
|
|
43
45
|
userId: string;
|
|
44
46
|
teamId: string;
|
|
45
|
-
name:
|
|
47
|
+
name: TeamRoleName;
|
|
46
48
|
}
|
|
@@ -19,7 +19,7 @@ export interface Template {
|
|
|
19
19
|
title: string;
|
|
20
20
|
content: string;
|
|
21
21
|
createdAt: string;
|
|
22
|
-
|
|
22
|
+
updatedAt: string;
|
|
23
23
|
isGlobal: boolean;
|
|
24
24
|
organizationId?: string;
|
|
25
25
|
categoryId: string;
|
|
@@ -41,9 +41,9 @@ export interface TranscriptionSummary {
|
|
|
41
41
|
id: string;
|
|
42
42
|
anonymisedTranscript?: string;
|
|
43
43
|
content: string;
|
|
44
|
-
metadata?:
|
|
44
|
+
metadata?: Record<string, unknown>;
|
|
45
45
|
createdAt: string;
|
|
46
|
-
|
|
46
|
+
updatedAt: string;
|
|
47
47
|
templateId: string;
|
|
48
48
|
userId: string;
|
|
49
49
|
|
|
@@ -91,19 +91,30 @@ export interface GenerateTranscriptionSummaryDto {
|
|
|
91
91
|
sessionId: string;
|
|
92
92
|
}
|
|
93
93
|
|
|
94
|
+
export interface GenerateSummaryQueuedResponse {
|
|
95
|
+
message: string;
|
|
96
|
+
jobId: string | undefined;
|
|
97
|
+
sessionId: string;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
export interface TemplateUpdatedResponse {
|
|
101
|
+
message: string;
|
|
102
|
+
sessionId: string;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
export type GenerateSummaryResponse = GenerateSummaryQueuedResponse | TemplateUpdatedResponse;
|
|
106
|
+
|
|
94
107
|
export interface CreateTranscriptionSummaryDto {
|
|
95
|
-
userId
|
|
108
|
+
userId: string;
|
|
96
109
|
templateId: string;
|
|
97
110
|
content: string;
|
|
98
|
-
sessionId
|
|
111
|
+
sessionId?: string;
|
|
99
112
|
anonymisedTranscript?: string;
|
|
100
|
-
metadata?: Record<string, any>;
|
|
101
113
|
}
|
|
102
114
|
|
|
103
115
|
export interface UpdateTranscriptionSummaryDto {
|
|
104
116
|
anonymisedTranscript?: string;
|
|
105
117
|
content?: string;
|
|
106
|
-
metadata?: Record<string, any>;
|
|
107
118
|
templateId?: string;
|
|
108
119
|
}
|
|
109
120
|
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Organization, UserOrganizationRole } from './organization.types';
|
|
2
2
|
import { Role } from './common.types';
|
|
3
|
+
import { TeamRole } from './team.types';
|
|
3
4
|
|
|
4
5
|
// User Role association
|
|
5
6
|
export interface UserRole {
|
|
@@ -15,12 +16,15 @@ export interface User {
|
|
|
15
16
|
email: string;
|
|
16
17
|
firstName: string;
|
|
17
18
|
lastName: string;
|
|
19
|
+
isActive: boolean;
|
|
20
|
+
customFields: Record<string, unknown> | null;
|
|
18
21
|
createdAt: string;
|
|
19
22
|
updatedAt: string;
|
|
20
23
|
organizationId: string;
|
|
21
24
|
organization: Organization;
|
|
22
25
|
roles: UserRole[];
|
|
23
26
|
organizationRoles: UserOrganizationRole[];
|
|
27
|
+
teamRoles: TeamRole[];
|
|
24
28
|
}
|
|
25
29
|
|
|
26
30
|
// User creation DTO
|
|
@@ -30,6 +34,7 @@ export interface CreateUserDto {
|
|
|
30
34
|
firstName?: string;
|
|
31
35
|
lastName?: string;
|
|
32
36
|
organizationId?: string;
|
|
37
|
+
customFields?: Record<string, unknown>;
|
|
33
38
|
}
|
|
34
39
|
|
|
35
40
|
// User update DTO
|
|
@@ -39,6 +44,7 @@ export interface UpdateUserDto {
|
|
|
39
44
|
firstName?: string;
|
|
40
45
|
lastName?: string;
|
|
41
46
|
organizationId?: string;
|
|
47
|
+
customFields?: Record<string, unknown>;
|
|
42
48
|
}
|
|
43
49
|
|
|
44
50
|
// User names update DTO
|
|
@@ -37,14 +37,16 @@ export interface WebSocketEvents {
|
|
|
37
37
|
disconnected: (reason: string) => void;
|
|
38
38
|
'audio-chunk-received': (data: {
|
|
39
39
|
sessionId: string;
|
|
40
|
-
chunkCount
|
|
40
|
+
chunkCount?: number; // non-VAD paths
|
|
41
|
+
bufferedDuration?: number; // VAD paths
|
|
41
42
|
timestamp: string;
|
|
42
43
|
lastSequenceId?: number; // Highest sequence ID received by server
|
|
43
44
|
}) => void;
|
|
44
|
-
'transcription-queued': (data: {
|
|
45
|
-
sessionId: string;
|
|
46
|
-
|
|
47
|
-
|
|
45
|
+
'transcription-queued': (data: {
|
|
46
|
+
sessionId: string;
|
|
47
|
+
duration?: number;
|
|
48
|
+
isFinalChunk: boolean;
|
|
49
|
+
timestamp: string;
|
|
48
50
|
}) => void;
|
|
49
51
|
'transcription-complete': (data: {
|
|
50
52
|
sessionId: string;
|
|
@@ -62,9 +64,8 @@ export interface WebSocketEvents {
|
|
|
62
64
|
sessionId: string;
|
|
63
65
|
timestamp: string;
|
|
64
66
|
}) => void;
|
|
65
|
-
'audio-started': (data: { sessionId: string; timestamp: string }) => void;
|
|
66
|
-
'audio-stopped': (data: { sessionId: string; timestamp: string }) => void;
|
|
67
67
|
'audio-error': (error: { sessionId: string; error: string }) => void;
|
|
68
|
+
// TODO: not emitted by current gateway
|
|
68
69
|
'transcription-error': (error: { sessionId: string; error: string }) => void;
|
|
69
70
|
'connection-error': (error: Error) => void;
|
|
70
71
|
'reconnecting': (attemptNumber: number) => void;
|
package/src/sdk/urls.ts
CHANGED
|
@@ -7,7 +7,9 @@ const urls = {
|
|
|
7
7
|
logout: '/auth/logout',
|
|
8
8
|
changePassword: '/auth/change-password',
|
|
9
9
|
adminChangePassword: '/auth/admin/change-password',
|
|
10
|
-
|
|
10
|
+
entra: '/auth/entra',
|
|
11
|
+
entraConnect: '/auth/entra/connect',
|
|
12
|
+
|
|
11
13
|
// Users
|
|
12
14
|
user: '/users',
|
|
13
15
|
users: '/users',
|
|
@@ -29,10 +31,6 @@ const urls = {
|
|
|
29
31
|
transcriptionSummaries: '/transcription-summaries',
|
|
30
32
|
transcriptionSummaryCreate: '/transcription-summaries/create',
|
|
31
33
|
transcriptionSummary: '/transcription-summaries/generate',
|
|
32
|
-
uploadAudioLarge: '/transcription-summaries/upload-audio-large',
|
|
33
|
-
uploadAudio: '/transcription-summaries/upload-audio',
|
|
34
|
-
transcribeBase64Audio: '/transcription-summaries/transcribe-base64',
|
|
35
|
-
|
|
36
34
|
// Roles
|
|
37
35
|
roles: '/roles',
|
|
38
36
|
userRoles: '/user-roles',
|
|
@@ -58,9 +56,6 @@ const urls = {
|
|
|
58
56
|
// Logs
|
|
59
57
|
logs: '/logs',
|
|
60
58
|
|
|
61
|
-
// Debug
|
|
62
|
-
debug: '/debug',
|
|
63
|
-
|
|
64
59
|
// External Integrations
|
|
65
60
|
externalIntegrations: '/external-integrations',
|
|
66
61
|
|
|
@@ -198,6 +198,14 @@ export class WhioOrgAdminSDK extends BaseClient {
|
|
|
198
198
|
return this.usersModule.updateUser(...args);
|
|
199
199
|
}
|
|
200
200
|
|
|
201
|
+
public async activateUser(...args: Parameters<UserModule['activateUser']>) {
|
|
202
|
+
return this.usersModule.activateUser(...args);
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
public async deactivateUser(...args: Parameters<UserModule['deactivateUser']>) {
|
|
206
|
+
return this.usersModule.deactivateUser(...args);
|
|
207
|
+
}
|
|
208
|
+
|
|
201
209
|
public async deleteUser(...args: Parameters<UserModule['deleteUser']>) {
|
|
202
210
|
return this.usersModule.deleteUser(...args);
|
|
203
211
|
}
|
package/src/sdk/whio-sdk.ts
CHANGED
|
@@ -13,7 +13,6 @@ import { AudioModule } from './modules/audio.module';
|
|
|
13
13
|
import { WorkflowModule } from './modules/workflow.module';
|
|
14
14
|
import { IntegrationActionModule } from './modules/integration-action.module';
|
|
15
15
|
import { LogModule } from './modules/log.module';
|
|
16
|
-
import { DebugModule } from './modules/debug.module';
|
|
17
16
|
import { ExternalIntegrationModule } from './modules/external-integration.module';
|
|
18
17
|
import { WebSocketModule } from './modules/websocket.module';
|
|
19
18
|
import { ReportsModule } from './modules/reports.module';
|
|
@@ -40,7 +39,6 @@ export class WhioSDK extends BaseClient {
|
|
|
40
39
|
private readonly workflowsModule: WorkflowModule;
|
|
41
40
|
private readonly integrationActionsModule: IntegrationActionModule;
|
|
42
41
|
private readonly logsModule: LogModule;
|
|
43
|
-
private readonly debugModule: DebugModule;
|
|
44
42
|
private readonly externalIntegrationsModule: ExternalIntegrationModule;
|
|
45
43
|
private readonly websocketModule: WebSocketModule | null;
|
|
46
44
|
private readonly reportsModule: ReportsModule;
|
|
@@ -69,7 +67,6 @@ export class WhioSDK extends BaseClient {
|
|
|
69
67
|
this.workflowsModule = new WorkflowModule(config);
|
|
70
68
|
this.integrationActionsModule = new IntegrationActionModule(config);
|
|
71
69
|
this.logsModule = new LogModule(config);
|
|
72
|
-
this.debugModule = new DebugModule(config);
|
|
73
70
|
this.externalIntegrationsModule = new ExternalIntegrationModule(config);
|
|
74
71
|
this.websocketModule = config.skipWebsocket ? null : new WebSocketModule(config);
|
|
75
72
|
this.reportsModule = new ReportsModule(config);
|
|
@@ -83,7 +80,7 @@ export class WhioSDK extends BaseClient {
|
|
|
83
80
|
this.modules = [
|
|
84
81
|
this.authModule, this.usersModule, this.organizationsModule, this.teamsModule, this.templatesModule,
|
|
85
82
|
this.transcriptionSummariesModule, this.sessionsModule, this.agentsModule, this.audioModule,
|
|
86
|
-
this.workflowsModule, this.integrationActionsModule, this.logsModule, this.
|
|
83
|
+
this.workflowsModule, this.integrationActionsModule, this.logsModule, this.externalIntegrationsModule,
|
|
87
84
|
this.reportsModule, this.patientsModule, this.dataStrategiesModule, this.systemSnapshotsModule, this.ratingsModule,
|
|
88
85
|
this.tiakiModule,
|
|
89
86
|
...(this.websocketModule ? [this.websocketModule] : [])
|
|
@@ -152,6 +149,16 @@ export class WhioSDK extends BaseClient {
|
|
|
152
149
|
return result;
|
|
153
150
|
}
|
|
154
151
|
|
|
152
|
+
public async loginWithEntra(...args: Parameters<AuthModule['loginWithEntra']>) {
|
|
153
|
+
const result = await this.authModule.loginWithEntra(...args);
|
|
154
|
+
await this.syncUserState(result.user, result.access_token, result.refresh_token);
|
|
155
|
+
return result;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
public async connectEntra(...args: Parameters<AuthModule['connectEntra']>) {
|
|
159
|
+
return this.authModule.connectEntra(...args);
|
|
160
|
+
}
|
|
161
|
+
|
|
155
162
|
public async getProfile(...args: Parameters<AuthModule['getProfile']>) {
|
|
156
163
|
return this.authModule.getProfile(...args);
|
|
157
164
|
}
|
|
@@ -280,18 +287,6 @@ export class WhioSDK extends BaseClient {
|
|
|
280
287
|
// AUDIO METHODS
|
|
281
288
|
// ======================
|
|
282
289
|
|
|
283
|
-
public async uploadAudioFile(...args: Parameters<TemplateModule['uploadAudioFile']>) {
|
|
284
|
-
return this.templatesModule.uploadAudioFile(...args);
|
|
285
|
-
}
|
|
286
|
-
|
|
287
|
-
public async uploadLargeAudioFile(...args: Parameters<TemplateModule['uploadLargeAudioFile']>) {
|
|
288
|
-
return this.templatesModule.uploadLargeAudioFile(...args);
|
|
289
|
-
}
|
|
290
|
-
|
|
291
|
-
public async transcribeBase64Audio(...args: Parameters<TemplateModule['transcribeBase64Audio']>) {
|
|
292
|
-
return this.templatesModule.transcribeBase64Audio(...args);
|
|
293
|
-
}
|
|
294
|
-
|
|
295
290
|
public async uploadAudioFileToSession(...args: Parameters<AudioModule['uploadAudioFileToSession']>) {
|
|
296
291
|
return this.audioModule.uploadAudioFileToSession(...args);
|
|
297
292
|
}
|
|
@@ -371,4 +366,32 @@ export class WhioSDK extends BaseClient {
|
|
|
371
366
|
public async getPatientsFromIntegration(...args: Parameters<PatientModule['getPatientsFromIntegration']>) {
|
|
372
367
|
return this.patientsModule.getPatientsFromIntegration(...args);
|
|
373
368
|
}
|
|
369
|
+
|
|
370
|
+
// ======================
|
|
371
|
+
// INTEGRATION ACTION METHODS
|
|
372
|
+
// ======================
|
|
373
|
+
|
|
374
|
+
public async createIntegrationAction(...args: Parameters<IntegrationActionModule['createIntegrationAction']>) {
|
|
375
|
+
return this.integrationActionsModule.createIntegrationAction(...args);
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
public async getIntegrationActions(...args: Parameters<IntegrationActionModule['getIntegrationActions']>) {
|
|
379
|
+
return this.integrationActionsModule.getIntegrationActions(...args);
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
public async getIntegrationAction(...args: Parameters<IntegrationActionModule['getIntegrationAction']>) {
|
|
383
|
+
return this.integrationActionsModule.getIntegrationAction(...args);
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
public async getIntegrationActionsByOrganization(...args: Parameters<IntegrationActionModule['getIntegrationActionsByOrganization']>) {
|
|
387
|
+
return this.integrationActionsModule.getIntegrationActionsByOrganization(...args);
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
public async updateIntegrationAction(...args: Parameters<IntegrationActionModule['updateIntegrationAction']>) {
|
|
391
|
+
return this.integrationActionsModule.updateIntegrationAction(...args);
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
public async deleteIntegrationAction(...args: Parameters<IntegrationActionModule['deleteIntegrationAction']>) {
|
|
395
|
+
return this.integrationActionsModule.deleteIntegrationAction(...args);
|
|
396
|
+
}
|
|
374
397
|
}
|
|
@@ -13,7 +13,6 @@ import { AudioModule } from './modules/audio.module';
|
|
|
13
13
|
import { WorkflowModule } from './modules/workflow.module';
|
|
14
14
|
import { IntegrationActionModule } from './modules/integration-action.module';
|
|
15
15
|
import { LogModule } from './modules/log.module';
|
|
16
|
-
import { DebugModule } from './modules/debug.module';
|
|
17
16
|
import { ExternalIntegrationModule } from './modules/external-integration.module';
|
|
18
17
|
import { WebSocketModule } from './modules/websocket.module';
|
|
19
18
|
import { ReportsModule } from './modules/reports.module';
|
|
@@ -40,7 +39,6 @@ export class WhioSuperuserSDK extends BaseClient {
|
|
|
40
39
|
private readonly workflowsModule: WorkflowModule;
|
|
41
40
|
private readonly integrationActionsModule: IntegrationActionModule;
|
|
42
41
|
private readonly logsModule: LogModule;
|
|
43
|
-
private readonly debugModule: DebugModule;
|
|
44
42
|
private readonly externalIntegrationsModule: ExternalIntegrationModule;
|
|
45
43
|
private readonly websocketModule: WebSocketModule | null;
|
|
46
44
|
private readonly reportsModule: ReportsModule;
|
|
@@ -68,7 +66,6 @@ export class WhioSuperuserSDK extends BaseClient {
|
|
|
68
66
|
this.workflowsModule = new WorkflowModule(config);
|
|
69
67
|
this.integrationActionsModule = new IntegrationActionModule(config);
|
|
70
68
|
this.logsModule = new LogModule(config);
|
|
71
|
-
this.debugModule = new DebugModule(config);
|
|
72
69
|
this.externalIntegrationsModule = new ExternalIntegrationModule(config);
|
|
73
70
|
this.websocketModule = config.skipWebsocket ? null : new WebSocketModule(config);
|
|
74
71
|
this.reportsModule = new ReportsModule(config);
|
|
@@ -81,7 +78,7 @@ export class WhioSuperuserSDK extends BaseClient {
|
|
|
81
78
|
this.modules = [
|
|
82
79
|
this.authModule, this.usersModule, this.organizationsModule, this.teamsModule, this.templatesModule,
|
|
83
80
|
this.transcriptionSummariesModule, this.sessionsModule, this.agentsModule, this.audioModule,
|
|
84
|
-
this.workflowsModule, this.integrationActionsModule, this.logsModule, this.
|
|
81
|
+
this.workflowsModule, this.integrationActionsModule, this.logsModule, this.externalIntegrationsModule,
|
|
85
82
|
this.reportsModule, this.patientsModule, this.dataStrategiesModule, this.systemSnapshotsModule, this.ratingsModule,
|
|
86
83
|
this.tiakiModule,
|
|
87
84
|
...(this.websocketModule ? [this.websocketModule] : [])
|
|
@@ -216,6 +213,14 @@ export class WhioSuperuserSDK extends BaseClient {
|
|
|
216
213
|
return this.usersModule.updateUser(...args);
|
|
217
214
|
}
|
|
218
215
|
|
|
216
|
+
public async activateUser(...args: Parameters<UserModule['activateUser']>) {
|
|
217
|
+
return this.usersModule.activateUser(...args);
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
public async deactivateUser(...args: Parameters<UserModule['deactivateUser']>) {
|
|
221
|
+
return this.usersModule.deactivateUser(...args);
|
|
222
|
+
}
|
|
223
|
+
|
|
219
224
|
public async deleteUser(...args: Parameters<UserModule['deleteUser']>) {
|
|
220
225
|
return this.usersModule.deleteUser(...args);
|
|
221
226
|
}
|
|
@@ -444,18 +449,6 @@ export class WhioSuperuserSDK extends BaseClient {
|
|
|
444
449
|
return this.logsModule.getLogStats(...args);
|
|
445
450
|
}
|
|
446
451
|
|
|
447
|
-
// ======================
|
|
448
|
-
// DEBUG METHODS
|
|
449
|
-
// ======================
|
|
450
|
-
|
|
451
|
-
public async getSessionsWithoutMedicalTranscriptions(...args: Parameters<DebugModule['getSessionsWithoutMedicalTranscriptions']>) {
|
|
452
|
-
return this.debugModule.getSessionsWithoutMedicalTranscriptions(...args);
|
|
453
|
-
}
|
|
454
|
-
|
|
455
|
-
public async downloadSessionAsZip(...args: Parameters<DebugModule['downloadSessionAsZip']>) {
|
|
456
|
-
return this.debugModule.downloadSessionAsZip(...args);
|
|
457
|
-
}
|
|
458
|
-
|
|
459
452
|
// ======================
|
|
460
453
|
// SYSTEM SNAPSHOT METHODS
|
|
461
454
|
// ======================
|
|
@@ -13,7 +13,6 @@ import { AudioModule } from './modules/audio.module';
|
|
|
13
13
|
import { WorkflowModule } from './modules/workflow.module';
|
|
14
14
|
import { IntegrationActionModule } from './modules/integration-action.module';
|
|
15
15
|
import { LogModule } from './modules/log.module';
|
|
16
|
-
import { DebugModule } from './modules/debug.module';
|
|
17
16
|
import { ExternalIntegrationModule } from './modules/external-integration.module';
|
|
18
17
|
import { WebSocketModule } from './modules/websocket.module';
|
|
19
18
|
import { ReportsModule } from './modules/reports.module';
|
|
@@ -42,7 +41,6 @@ export class WhioTeamAdminSDK extends BaseClient {
|
|
|
42
41
|
private readonly workflowsModule: WorkflowModule;
|
|
43
42
|
private readonly integrationActionsModule: IntegrationActionModule;
|
|
44
43
|
private readonly logsModule: LogModule;
|
|
45
|
-
private readonly debugModule: DebugModule;
|
|
46
44
|
private readonly externalIntegrationsModule: ExternalIntegrationModule;
|
|
47
45
|
private readonly websocketModule: WebSocketModule | null;
|
|
48
46
|
private readonly reportsModule: ReportsModule;
|
|
@@ -70,7 +68,6 @@ export class WhioTeamAdminSDK extends BaseClient {
|
|
|
70
68
|
this.workflowsModule = new WorkflowModule(config);
|
|
71
69
|
this.integrationActionsModule = new IntegrationActionModule(config);
|
|
72
70
|
this.logsModule = new LogModule(config);
|
|
73
|
-
this.debugModule = new DebugModule(config);
|
|
74
71
|
this.externalIntegrationsModule = new ExternalIntegrationModule(config);
|
|
75
72
|
this.websocketModule = config.skipWebsocket ? null : new WebSocketModule(config);
|
|
76
73
|
this.reportsModule = new ReportsModule(config);
|
|
@@ -83,7 +80,7 @@ export class WhioTeamAdminSDK extends BaseClient {
|
|
|
83
80
|
this.modules = [
|
|
84
81
|
this.authModule, this.usersModule, this.organizationsModule, this.teamsModule, this.templatesModule,
|
|
85
82
|
this.transcriptionSummariesModule, this.sessionsModule, this.agentsModule, this.audioModule,
|
|
86
|
-
this.workflowsModule, this.integrationActionsModule, this.logsModule, this.
|
|
83
|
+
this.workflowsModule, this.integrationActionsModule, this.logsModule, this.externalIntegrationsModule,
|
|
87
84
|
this.reportsModule, this.patientsModule, this.dataStrategiesModule, this.systemSnapshotsModule, this.ratingsModule,
|
|
88
85
|
this.tiakiModule,
|
|
89
86
|
...(this.websocketModule ? [this.websocketModule] : [])
|
|
@@ -278,18 +275,6 @@ export class WhioTeamAdminSDK extends BaseClient {
|
|
|
278
275
|
// AUDIO METHODS
|
|
279
276
|
// ======================
|
|
280
277
|
|
|
281
|
-
public async uploadAudioFile(...args: Parameters<TemplateModule['uploadAudioFile']>) {
|
|
282
|
-
return this.templatesModule.uploadAudioFile(...args);
|
|
283
|
-
}
|
|
284
|
-
|
|
285
|
-
public async uploadLargeAudioFile(...args: Parameters<TemplateModule['uploadLargeAudioFile']>) {
|
|
286
|
-
return this.templatesModule.uploadLargeAudioFile(...args);
|
|
287
|
-
}
|
|
288
|
-
|
|
289
|
-
public async transcribeBase64Audio(...args: Parameters<TemplateModule['transcribeBase64Audio']>) {
|
|
290
|
-
return this.templatesModule.transcribeBase64Audio(...args);
|
|
291
|
-
}
|
|
292
|
-
|
|
293
278
|
public async uploadAudioFileToSession(...args: Parameters<AudioModule['uploadAudioFileToSession']>) {
|
|
294
279
|
return this.audioModule.uploadAudioFileToSession(...args);
|
|
295
280
|
}
|
package/tsconfig.json
CHANGED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { BaseClient } from './base-client';
|
|
2
|
-
import { DebugSessionSummary } from '../types';
|
|
3
|
-
import urls from '../urls';
|
|
4
|
-
|
|
5
|
-
export class DebugModule extends BaseClient {
|
|
6
|
-
/**
|
|
7
|
-
* Get sessions that do not have medical transcriptions and primary transcription summaries
|
|
8
|
-
*/
|
|
9
|
-
public async getSessionsWithoutMedicalTranscriptions(): Promise<DebugSessionSummary[]> {
|
|
10
|
-
return this.request<DebugSessionSummary[]>(`${urls.debug}/sessions/missing-medical-transcriptions`, 'GET');
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* Download a session as a ZIP file containing all related data (decrypted)
|
|
15
|
-
*/
|
|
16
|
-
public async downloadSessionAsZip(sessionId: string): Promise<Blob> {
|
|
17
|
-
return this.downloadRequest(`${urls.debug}/sessions/${sessionId}/download`);
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* Download a session as a ZIP file and create a download URL
|
|
22
|
-
*/
|
|
23
|
-
public async downloadSessionAsZipUrl(sessionId: string): Promise<string> {
|
|
24
|
-
const blob = await this.downloadSessionAsZip(sessionId);
|
|
25
|
-
return URL.createObjectURL(blob);
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* Download a session as a ZIP file and trigger browser download
|
|
30
|
-
*/
|
|
31
|
-
public async downloadSessionAndTriggerDownload(sessionId: string, filename?: string): Promise<void> {
|
|
32
|
-
const blob = await this.downloadSessionAsZip(sessionId);
|
|
33
|
-
const url = URL.createObjectURL(blob);
|
|
34
|
-
|
|
35
|
-
const link = document.createElement('a');
|
|
36
|
-
link.href = url;
|
|
37
|
-
link.download = filename || `session_${sessionId}_${new Date().toISOString().split('T')[0]}.zip`;
|
|
38
|
-
document.body.appendChild(link);
|
|
39
|
-
link.click();
|
|
40
|
-
document.body.removeChild(link);
|
|
41
|
-
|
|
42
|
-
URL.revokeObjectURL(url);
|
|
43
|
-
}
|
|
44
|
-
}
|