whio-api-sdk 1.1.28 → 1.1.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/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 +43 -0
- package/dist/src/sdk/modules/auth.module.js +43 -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 +106 -0
- package/dist/src/sdk/modules/user.module.js +107 -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 +19 -29
- package/dist/src/sdk/sdk.js +1 -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 +0 -4
- package/dist/src/sdk/urls.js +0 -5
- package/dist/src/sdk/whio-orgadmin-sdk.d.ts +7 -7
- package/dist/src/sdk/whio-sdk.d.ts +11 -8
- package/dist/src/sdk/whio-sdk.js +34 -18
- package/dist/src/sdk/whio-superuser-sdk.d.ts +12 -16
- package/dist/src/sdk/whio-superuser-sdk.js +1 -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 +43 -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 +108 -2
- package/src/sdk/modules/websocket.module.ts +26 -8
- package/src/sdk/modules/workflow.module.ts +39 -0
- package/src/sdk/sdk.ts +1 -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 +0 -7
- package/src/sdk/whio-sdk.ts +29 -16
- package/src/sdk/whio-superuser-sdk.ts +1 -16
- package/src/sdk/whio-teamadmin-sdk.ts +1 -16
- package/tsconfig.json +1 -1
- package/src/sdk/modules/debug.module.ts +0 -44
package/src/sdk/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';
|
|
@@ -39,7 +38,6 @@ export class ApiSDK extends BaseClient {
|
|
|
39
38
|
public readonly workflows: WorkflowModule;
|
|
40
39
|
public readonly integrationActions: IntegrationActionModule;
|
|
41
40
|
public readonly logs: LogModule;
|
|
42
|
-
public readonly debug: DebugModule;
|
|
43
41
|
public readonly externalIntegrations: ExternalIntegrationModule;
|
|
44
42
|
public readonly websocket: WebSocketModule | null;
|
|
45
43
|
public readonly reports: ReportsModule;
|
|
@@ -68,7 +66,6 @@ export class ApiSDK extends BaseClient {
|
|
|
68
66
|
this.workflows = new WorkflowModule(config);
|
|
69
67
|
this.integrationActions = new IntegrationActionModule(config);
|
|
70
68
|
this.logs = new LogModule(config);
|
|
71
|
-
this.debug = new DebugModule(config);
|
|
72
69
|
this.externalIntegrations = new ExternalIntegrationModule(config);
|
|
73
70
|
this.websocket = config.skipWebsocket ? null : new WebSocketModule(config);
|
|
74
71
|
this.reports = new ReportsModule(config);
|
|
@@ -82,7 +79,7 @@ export class ApiSDK extends BaseClient {
|
|
|
82
79
|
this.modules = [
|
|
83
80
|
this.auth, this.users, this.organizations, this.teams, this.templates,
|
|
84
81
|
this.transcriptionSummaries, this.sessions, this.agents, this.audio,
|
|
85
|
-
this.workflows, this.integrationActions, this.logs, this.
|
|
82
|
+
this.workflows, this.integrationActions, this.logs, this.externalIntegrations,
|
|
86
83
|
this.reports, this.patients, this.dataStrategies, this.systemSnapshots, this.ratings,
|
|
87
84
|
this.tiaki,
|
|
88
85
|
...(this.websocket ? [this.websocket] : [])
|
|
@@ -310,10 +307,6 @@ export class ApiSDK extends BaseClient {
|
|
|
310
307
|
return this.teams.deleteTeam(...args);
|
|
311
308
|
}
|
|
312
309
|
|
|
313
|
-
public async removeUserFromTeamFixed(...args: Parameters<TeamModule['removeUserFromTeamFixed']>) {
|
|
314
|
-
return this.teams.removeUserFromTeamFixed(...args);
|
|
315
|
-
}
|
|
316
|
-
|
|
317
310
|
// Template methods
|
|
318
311
|
public async createTemplate(...args: Parameters<TemplateModule['createTemplate']>) {
|
|
319
312
|
return this.templates.createTemplate(...args);
|
|
@@ -391,18 +384,6 @@ export class ApiSDK extends BaseClient {
|
|
|
391
384
|
return this.transcriptionSummaries.deleteTranscriptionSummary(...args);
|
|
392
385
|
}
|
|
393
386
|
|
|
394
|
-
public async uploadLargeAudioFile(...args: Parameters<TemplateModule['uploadLargeAudioFile']>) {
|
|
395
|
-
return this.templates.uploadLargeAudioFile(...args);
|
|
396
|
-
}
|
|
397
|
-
|
|
398
|
-
public async uploadAudioFile(...args: Parameters<TemplateModule['uploadAudioFile']>) {
|
|
399
|
-
return this.templates.uploadAudioFile(...args);
|
|
400
|
-
}
|
|
401
|
-
|
|
402
|
-
public async transcribeBase64Audio(...args: Parameters<TemplateModule['transcribeBase64Audio']>) {
|
|
403
|
-
return this.templates.transcribeBase64Audio(...args);
|
|
404
|
-
}
|
|
405
|
-
|
|
406
387
|
// Session methods (user - own sessions only)
|
|
407
388
|
public async createSession(...args: Parameters<SessionModule['createSession']>) {
|
|
408
389
|
return this.sessions.createSession(...args);
|
|
@@ -734,23 +715,6 @@ export class ApiSDK extends BaseClient {
|
|
|
734
715
|
return this.logs.cleanupOldLogs(...args);
|
|
735
716
|
}
|
|
736
717
|
|
|
737
|
-
// Debug methods
|
|
738
|
-
public async getSessionsWithoutMedicalTranscriptions(...args: Parameters<DebugModule['getSessionsWithoutMedicalTranscriptions']>) {
|
|
739
|
-
return this.debug.getSessionsWithoutMedicalTranscriptions(...args);
|
|
740
|
-
}
|
|
741
|
-
|
|
742
|
-
public async downloadSessionAsZip(...args: Parameters<DebugModule['downloadSessionAsZip']>) {
|
|
743
|
-
return this.debug.downloadSessionAsZip(...args);
|
|
744
|
-
}
|
|
745
|
-
|
|
746
|
-
public async downloadSessionAsZipUrl(...args: Parameters<DebugModule['downloadSessionAsZipUrl']>) {
|
|
747
|
-
return this.debug.downloadSessionAsZipUrl(...args);
|
|
748
|
-
}
|
|
749
|
-
|
|
750
|
-
public async downloadSessionAndTriggerDownload(...args: Parameters<DebugModule['downloadSessionAndTriggerDownload']>) {
|
|
751
|
-
return this.debug.downloadSessionAndTriggerDownload(...args);
|
|
752
|
-
}
|
|
753
|
-
|
|
754
718
|
// External Integration methods
|
|
755
719
|
public async createExternalIntegration(...args: Parameters<ExternalIntegrationModule['createExternalIntegration']>) {
|
|
756
720
|
return this.externalIntegrations.createExternalIntegration(...args);
|
|
@@ -19,6 +19,11 @@ export interface AgentOrganization {
|
|
|
19
19
|
organization?: Organization;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
+
// Agent with guaranteed organizations relation (list/detail responses)
|
|
23
|
+
export interface AgentWithOrganizations extends Agent {
|
|
24
|
+
organizations: AgentOrganization[];
|
|
25
|
+
}
|
|
26
|
+
|
|
22
27
|
// Agent DTOs
|
|
23
28
|
export interface CreateAgentDto {
|
|
24
29
|
name: string;
|
|
@@ -13,13 +13,17 @@ export interface AudioFile {
|
|
|
13
13
|
id: string;
|
|
14
14
|
originalName: string;
|
|
15
15
|
fileName: string;
|
|
16
|
-
filePath
|
|
17
|
-
fileSize
|
|
16
|
+
filePath?: string;
|
|
17
|
+
fileSize?: number;
|
|
18
18
|
mimeType: string;
|
|
19
19
|
uploadId?: string;
|
|
20
20
|
transcriptionUrl?: string;
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
taskId?: string;
|
|
22
|
+
uploadStatus?: string;
|
|
23
|
+
statusLink?: string;
|
|
24
|
+
cancelLink?: string;
|
|
25
|
+
downloadLink?: string;
|
|
26
|
+
progressPercent?: number;
|
|
23
27
|
status: AudioFileStatus;
|
|
24
28
|
createdAt: string;
|
|
25
29
|
updatedAt: string;
|
|
@@ -44,15 +48,9 @@ export interface CreateAudioFileDto {
|
|
|
44
48
|
|
|
45
49
|
export interface UpdateAudioFileDto {
|
|
46
50
|
transcriptionUrl?: string;
|
|
47
|
-
transcription?: string;
|
|
48
|
-
cultural_transcription?: string;
|
|
49
51
|
status?: AudioFileStatus;
|
|
50
52
|
}
|
|
51
53
|
|
|
52
|
-
export interface UploadAudioFileDto {
|
|
53
|
-
cultural_transcription?: string;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
54
|
// Base64 Audio File types
|
|
57
55
|
export interface Base64AudioFile {
|
|
58
56
|
id: string;
|
|
@@ -15,6 +15,9 @@ export interface DataStrategy {
|
|
|
15
15
|
organization?: Organization;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
+
// DataStrategy with guaranteed organization relation (API read responses always include it)
|
|
19
|
+
export type DataStrategyWithOrganization = DataStrategy & { organization: Organization };
|
|
20
|
+
|
|
18
21
|
// DataStrategy DTOs
|
|
19
22
|
export interface CreateDataStrategyDto {
|
|
20
23
|
organizationId: string;
|
|
@@ -7,6 +7,12 @@ export interface ExternalIntegration {
|
|
|
7
7
|
getUserEndpoint: string;
|
|
8
8
|
getPatientDataEndpoint: string;
|
|
9
9
|
saveSummaryEndpoint: string;
|
|
10
|
+
/**
|
|
11
|
+
* The integration's API key.
|
|
12
|
+
*
|
|
13
|
+
* Sent as plaintext on write (create/update), stored encrypted at rest by the API,
|
|
14
|
+
* and returned MASKED on read (e.g. `****abcd`) — never the full plaintext value.
|
|
15
|
+
*/
|
|
10
16
|
apiKey: string;
|
|
11
17
|
headerName: string;
|
|
12
18
|
createdAt: string;
|
|
@@ -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
|
@@ -29,10 +29,6 @@ const urls = {
|
|
|
29
29
|
transcriptionSummaries: '/transcription-summaries',
|
|
30
30
|
transcriptionSummaryCreate: '/transcription-summaries/create',
|
|
31
31
|
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
32
|
// Roles
|
|
37
33
|
roles: '/roles',
|
|
38
34
|
userRoles: '/user-roles',
|
|
@@ -58,9 +54,6 @@ const urls = {
|
|
|
58
54
|
// Logs
|
|
59
55
|
logs: '/logs',
|
|
60
56
|
|
|
61
|
-
// Debug
|
|
62
|
-
debug: '/debug',
|
|
63
|
-
|
|
64
57
|
// External Integrations
|
|
65
58
|
externalIntegrations: '/external-integrations',
|
|
66
59
|
|
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] : [])
|
|
@@ -280,18 +277,6 @@ export class WhioSDK extends BaseClient {
|
|
|
280
277
|
// AUDIO METHODS
|
|
281
278
|
// ======================
|
|
282
279
|
|
|
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
280
|
public async uploadAudioFileToSession(...args: Parameters<AudioModule['uploadAudioFileToSession']>) {
|
|
296
281
|
return this.audioModule.uploadAudioFileToSession(...args);
|
|
297
282
|
}
|
|
@@ -371,4 +356,32 @@ export class WhioSDK extends BaseClient {
|
|
|
371
356
|
public async getPatientsFromIntegration(...args: Parameters<PatientModule['getPatientsFromIntegration']>) {
|
|
372
357
|
return this.patientsModule.getPatientsFromIntegration(...args);
|
|
373
358
|
}
|
|
359
|
+
|
|
360
|
+
// ======================
|
|
361
|
+
// INTEGRATION ACTION METHODS
|
|
362
|
+
// ======================
|
|
363
|
+
|
|
364
|
+
public async createIntegrationAction(...args: Parameters<IntegrationActionModule['createIntegrationAction']>) {
|
|
365
|
+
return this.integrationActionsModule.createIntegrationAction(...args);
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
public async getIntegrationActions(...args: Parameters<IntegrationActionModule['getIntegrationActions']>) {
|
|
369
|
+
return this.integrationActionsModule.getIntegrationActions(...args);
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
public async getIntegrationAction(...args: Parameters<IntegrationActionModule['getIntegrationAction']>) {
|
|
373
|
+
return this.integrationActionsModule.getIntegrationAction(...args);
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
public async getIntegrationActionsByOrganization(...args: Parameters<IntegrationActionModule['getIntegrationActionsByOrganization']>) {
|
|
377
|
+
return this.integrationActionsModule.getIntegrationActionsByOrganization(...args);
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
public async updateIntegrationAction(...args: Parameters<IntegrationActionModule['updateIntegrationAction']>) {
|
|
381
|
+
return this.integrationActionsModule.updateIntegrationAction(...args);
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
public async deleteIntegrationAction(...args: Parameters<IntegrationActionModule['deleteIntegrationAction']>) {
|
|
385
|
+
return this.integrationActionsModule.deleteIntegrationAction(...args);
|
|
386
|
+
}
|
|
374
387
|
}
|
|
@@ -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] : [])
|
|
@@ -444,18 +441,6 @@ export class WhioSuperuserSDK extends BaseClient {
|
|
|
444
441
|
return this.logsModule.getLogStats(...args);
|
|
445
442
|
}
|
|
446
443
|
|
|
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
444
|
// ======================
|
|
460
445
|
// SYSTEM SNAPSHOT METHODS
|
|
461
446
|
// ======================
|
|
@@ -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