whio-api-sdk 1.0.192-bet-staging → 1.0.194-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/agent.module.d.ts +17 -0
- package/dist/src/sdk/modules/agent.module.js +93 -0
- package/dist/src/sdk/modules/audio.module.d.ts +31 -0
- package/dist/src/sdk/modules/audio.module.js +147 -0
- package/dist/src/sdk/modules/auth.module.d.ts +9 -0
- package/dist/src/sdk/modules/auth.module.js +59 -0
- package/dist/src/sdk/modules/base-client.d.ts +25 -0
- package/dist/src/sdk/modules/base-client.js +183 -0
- package/dist/src/sdk/modules/debug.module.d.ts +20 -0
- package/dist/src/sdk/modules/debug.module.js +54 -0
- package/dist/src/sdk/modules/external-integration.module.d.ts +9 -0
- package/dist/src/sdk/modules/external-integration.module.js +38 -0
- package/dist/src/sdk/modules/log.module.d.ts +63 -0
- package/dist/src/sdk/modules/log.module.js +222 -0
- package/dist/src/sdk/modules/organization.module.d.ts +11 -0
- package/dist/src/sdk/modules/organization.module.js +50 -0
- package/dist/src/sdk/modules/session.module.d.ts +16 -0
- package/dist/src/sdk/modules/session.module.js +58 -0
- package/dist/src/sdk/modules/team.module.d.ts +13 -0
- package/dist/src/sdk/modules/team.module.js +72 -0
- package/dist/src/sdk/modules/template.module.d.ts +33 -0
- package/dist/src/sdk/modules/template.module.js +240 -0
- package/dist/src/sdk/modules/user.module.d.ts +17 -0
- package/dist/src/sdk/modules/user.module.js +104 -0
- package/dist/src/sdk/modules/workflow.module.d.ts +10 -0
- package/dist/src/sdk/modules/workflow.module.js +53 -0
- package/dist/src/sdk/sdk.d.ts +167 -206
- package/dist/src/sdk/sdk.js +375 -853
- package/dist/src/sdk/sdk.old.d.ts +222 -0
- package/dist/src/sdk/sdk.old.js +1238 -0
- package/dist/src/sdk/types/agent.types.d.ts +51 -0
- package/dist/src/sdk/types/agent.types.js +1 -0
- package/dist/src/sdk/types/audio.types.d.ts +72 -0
- package/dist/src/sdk/types/audio.types.js +8 -0
- package/dist/src/sdk/types/auth.types.d.ts +21 -0
- package/dist/src/sdk/types/auth.types.js +1 -0
- package/dist/src/sdk/types/common.types.d.ts +20 -0
- package/dist/src/sdk/types/common.types.js +9 -0
- package/dist/src/sdk/types/external-integration.types.d.ts +31 -0
- package/dist/src/sdk/types/external-integration.types.js +1 -0
- package/dist/src/sdk/types/index.d.ts +12 -0
- package/dist/src/sdk/types/index.js +13 -0
- package/dist/src/sdk/types/log.types.d.ts +61 -0
- package/dist/src/sdk/types/log.types.js +1 -0
- package/dist/src/sdk/types/organization.types.d.ts +42 -0
- package/dist/src/sdk/types/organization.types.js +6 -0
- package/dist/src/sdk/types/session.types.d.ts +54 -0
- package/dist/src/sdk/types/session.types.js +1 -0
- package/dist/src/sdk/types/team.types.d.ts +39 -0
- package/dist/src/sdk/types/team.types.js +1 -0
- package/dist/src/sdk/types/template.types.d.ts +118 -0
- package/dist/src/sdk/types/template.types.js +1 -0
- package/dist/src/sdk/types/user.types.d.ts +41 -0
- package/dist/src/sdk/types/user.types.js +1 -0
- package/dist/src/sdk/types/workflow.types.d.ts +19 -0
- package/dist/src/sdk/types/workflow.types.js +1 -0
- package/dist/src/sdk/types.d.ts +1 -517
- package/dist/src/sdk/types.js +2 -23
- package/dist/src/sdk/types.old.d.ts +517 -0
- package/dist/src/sdk/types.old.js +23 -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/agent.module.ts +74 -0
- package/src/sdk/modules/audio.module.ts +131 -0
- package/src/sdk/modules/auth.module.ts +53 -0
- package/src/sdk/modules/base-client.ts +214 -0
- package/src/sdk/modules/debug.module.ts +44 -0
- package/src/sdk/modules/external-integration.module.ts +50 -0
- package/src/sdk/modules/log.module.ts +213 -0
- package/src/sdk/modules/organization.module.ts +35 -0
- package/src/sdk/modules/session.module.ts +41 -0
- package/src/sdk/modules/team.module.ts +55 -0
- package/src/sdk/modules/template.module.ts +242 -0
- package/src/sdk/modules/user.module.ts +89 -0
- package/src/sdk/modules/workflow.module.ts +39 -0
- package/src/sdk/sdk.old.ts +1312 -0
- package/src/sdk/sdk.ts +393 -1074
- package/src/sdk/types/agent.types.ts +65 -0
- package/src/sdk/types/audio.types.ts +89 -0
- package/src/sdk/types/auth.types.ts +29 -0
- package/src/sdk/types/common.types.ts +26 -0
- package/src/sdk/types/external-integration.types.ts +37 -0
- package/src/sdk/types/index.ts +13 -0
- package/src/sdk/types/log.types.ts +68 -0
- package/src/sdk/types/organization.types.ts +55 -0
- package/src/sdk/types/session.types.ts +63 -0
- package/src/sdk/types/team.types.ts +48 -0
- package/src/sdk/types/template.types.ts +142 -0
- package/src/sdk/types/user.types.ts +50 -0
- package/src/sdk/types/workflow.types.ts +26 -0
- package/src/sdk/types.old.ts +649 -0
- package/src/sdk/types.ts +2 -649
- package/src/sdk/urls.ts +3 -0
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
import { LoginResponse, LoginCredentials, SDKConfig, User, UpdateUserDto, Organization, TemplateCategory, Template, Team, UserTemplate, TranscriptionSummary, TranscriptionAudioUploadResponse, PasswordChangeResponse, Session, CreateSessionDto, UpdateSessionDto, Agent, AudioFile, UpdateAudioFileDto, AgentSettings, CreateAgentSettingsDto, UpdateAgentSettingsDto, Workflow, Base64AudioFile, CreateBase64AudioFileDto, UpdateBase64AudioFileDto, AddBase64ChunkResponse, Log, LogsResponse, LogStats, FilterLogsDto, CreateLogDto, DebugSessionSummary } from './types';
|
|
2
|
+
export declare class ApiSDK {
|
|
3
|
+
private baseUrl;
|
|
4
|
+
private storage;
|
|
5
|
+
private accessToken;
|
|
6
|
+
private refreshToken;
|
|
7
|
+
private user;
|
|
8
|
+
constructor(config?: SDKConfig);
|
|
9
|
+
fetchConfig(url: string): Promise<void>;
|
|
10
|
+
private getToken;
|
|
11
|
+
private initialize;
|
|
12
|
+
private request;
|
|
13
|
+
private fileUploadRequest;
|
|
14
|
+
login(credentials: LoginCredentials): Promise<LoginResponse>;
|
|
15
|
+
logout(): Promise<void>;
|
|
16
|
+
private clearAuth;
|
|
17
|
+
private isTokenExpired;
|
|
18
|
+
private refreshAccessToken;
|
|
19
|
+
isAuthenticated(): boolean;
|
|
20
|
+
getCurrentUser(): User | null;
|
|
21
|
+
getAccessToken(): string | null;
|
|
22
|
+
getRefreshToken(): string | null;
|
|
23
|
+
createUser(firstName: string, lastName: string, email: string, password: string): Promise<User>;
|
|
24
|
+
private assignRoleToUser;
|
|
25
|
+
assignEditorToRoleToUser(userId: string, organizationId?: string): Promise<User>;
|
|
26
|
+
assignAdminToRoleToUser(userId: string, organizationId?: string): Promise<User>;
|
|
27
|
+
assignDisabledToRoleToUser(userId: string, organizationId?: string): Promise<User>;
|
|
28
|
+
createEditorUser(firstName: string, lastName: string, email: string, password: string): Promise<User>;
|
|
29
|
+
createAdminUser(firstName: string, lastName: string, email: string, password: string): Promise<User>;
|
|
30
|
+
createDisabledUser(firstName: string, lastName: string, email: string, password: string): Promise<User>;
|
|
31
|
+
createTeam(name: string, description: string): Promise<Team>;
|
|
32
|
+
updateTeam(id: string, name: string, description: string): Promise<Team>;
|
|
33
|
+
addUserToTeam(teamId: string, userId: string, roleName: string): Promise<any>;
|
|
34
|
+
removeUserFromTeam(teamId: string, userId: string): Promise<void>;
|
|
35
|
+
createTemplate(title: string, content: string, categoryId?: string, workflowId?: string, agentId?: string): Promise<Template>;
|
|
36
|
+
createUserTemplate(title: string, content: string, originalTemplateId: string | undefined): Promise<UserTemplate>;
|
|
37
|
+
updateTemplate(title: string, content: string, id: string, workflowId?: string, agentId?: string): Promise<Template>;
|
|
38
|
+
updateUserTemplate(title: string, content: string, id: string): Promise<UserTemplate>;
|
|
39
|
+
getTemplates(): Promise<Template[]>;
|
|
40
|
+
getTemplatesByOrganization(): Promise<Template[]>;
|
|
41
|
+
getUserTemplates(): Promise<UserTemplate[]>;
|
|
42
|
+
generateTranscriptionSummary(templateId: string, sessionId: string): Promise<TranscriptionSummary>;
|
|
43
|
+
getByOrganizationTranscriptionSummaries(organizationId: string): Promise<TranscriptionSummary[]>;
|
|
44
|
+
generateTranscriptionSummaryFromUserTemplate(userTemplateId: string, sessionId: string): Promise<TranscriptionSummary>;
|
|
45
|
+
updateTranscriptionSummary(id: string, content: string): Promise<TranscriptionSummary>;
|
|
46
|
+
uploadLargeAudioFile(formData: FormData): Promise<string>;
|
|
47
|
+
uploadAudioFile(formData: FormData): Promise<TranscriptionAudioUploadResponse | null>;
|
|
48
|
+
transcribeBase64Audio(base64String: string): Promise<string>;
|
|
49
|
+
getProfile(): Promise<User>;
|
|
50
|
+
changePassword(currentPassword: string, newPassword: string): Promise<PasswordChangeResponse>;
|
|
51
|
+
adminChangePassword(userId: string, newPassword: string): Promise<PasswordChangeResponse>;
|
|
52
|
+
createOrganization(name: string, description?: string): Promise<Organization>;
|
|
53
|
+
getOrganizations(): Promise<Organization[]>;
|
|
54
|
+
getOrganization(id: string): Promise<Organization>;
|
|
55
|
+
updateOrganization(id: string, name?: string, description?: string): Promise<Organization>;
|
|
56
|
+
deleteOrganization(id: string): Promise<void>;
|
|
57
|
+
addUserToOrganization(organizationId: string, userId: string): Promise<void>;
|
|
58
|
+
removeUserFromOrganization(organizationId: string, userId: string): Promise<void>;
|
|
59
|
+
getUsers(): Promise<User[]>;
|
|
60
|
+
getUser(id: string): Promise<User>;
|
|
61
|
+
getUsersByOrganization(organizationId: string): Promise<User[]>;
|
|
62
|
+
updateUser(id: string, data: UpdateUserDto): Promise<User>;
|
|
63
|
+
deleteUser(id: string): Promise<void>;
|
|
64
|
+
getTeams(): Promise<Team[]>;
|
|
65
|
+
getTeam(id: string): Promise<Team>;
|
|
66
|
+
getTeamsByOrganization(organizationId: string): Promise<Team[]>;
|
|
67
|
+
deleteTeam(id: string): Promise<void>;
|
|
68
|
+
getTemplateCategories(): Promise<TemplateCategory[]>;
|
|
69
|
+
getTemplateCategory(id: string): Promise<TemplateCategory>;
|
|
70
|
+
createTemplateCategory(name: string): Promise<TemplateCategory>;
|
|
71
|
+
updateTemplateCategory(id: string, name: string): Promise<TemplateCategory>;
|
|
72
|
+
deleteTemplateCategory(id: string): Promise<void>;
|
|
73
|
+
getTemplate(id: string): Promise<Template>;
|
|
74
|
+
deleteTemplate(id: string): Promise<void>;
|
|
75
|
+
getUserTemplate(id: string): Promise<UserTemplate>;
|
|
76
|
+
deleteUserTemplate(id: string): Promise<void>;
|
|
77
|
+
assignTemplateToTeam(teamId: string, templateId: string): Promise<void>;
|
|
78
|
+
removeTemplateFromTeam(teamId: string, templateId: string): Promise<void>;
|
|
79
|
+
getTranscriptionSummaries(): Promise<TranscriptionSummary[]>;
|
|
80
|
+
getTranscriptionSummary(id: string): Promise<TranscriptionSummary>;
|
|
81
|
+
getTranscriptionSummariesByUser(userId: string): Promise<TranscriptionSummary[]>;
|
|
82
|
+
deleteTranscriptionSummary(id: string): Promise<void>;
|
|
83
|
+
removeUserFromTeamFixed(teamId: string, userId: string): Promise<void>;
|
|
84
|
+
createSession(sessionData: CreateSessionDto): Promise<Session>;
|
|
85
|
+
getSessions(): Promise<Session[]>;
|
|
86
|
+
getSession(id: string): Promise<Session>;
|
|
87
|
+
getSessionsByUser(userId: string): Promise<Session[]>;
|
|
88
|
+
getSessionsByOrganization(): Promise<Session[]>;
|
|
89
|
+
updateSession(id: string, sessionData: UpdateSessionDto): Promise<Session>;
|
|
90
|
+
deleteSession(id: string): Promise<void>;
|
|
91
|
+
setPrimaryTranscriptionSummary(sessionId: string, summaryId: string): Promise<Session>;
|
|
92
|
+
rerunTranscription(sessionId: string): Promise<{
|
|
93
|
+
message: string;
|
|
94
|
+
sessionId: string;
|
|
95
|
+
}>;
|
|
96
|
+
createAgent(name: string, templateTextReplacement?: string): Promise<Agent>;
|
|
97
|
+
getAgents(): Promise<Agent[]>;
|
|
98
|
+
getAgent(id: string): Promise<Agent>;
|
|
99
|
+
updateAgent(id: string, name: string, templateTextReplacement?: string): Promise<Agent>;
|
|
100
|
+
deleteAgent(id: string): Promise<void>;
|
|
101
|
+
addAgentToOrganization(agentId: string, organizationId: string): Promise<void>;
|
|
102
|
+
removeAgentFromOrganization(agentId: string, organizationId: string): Promise<void>;
|
|
103
|
+
createAgentSettings(settingsData: CreateAgentSettingsDto): Promise<AgentSettings>;
|
|
104
|
+
getAgentSettings(organizationId?: string, agentId?: string): Promise<AgentSettings[]>;
|
|
105
|
+
getAgentSettingsById(id: string): Promise<AgentSettings>;
|
|
106
|
+
getAgentSettingsByAgentAndOrganization(agentId: string, organizationId: string): Promise<AgentSettings>;
|
|
107
|
+
updateAgentSettings(id: string, settingsData: UpdateAgentSettingsDto): Promise<AgentSettings>;
|
|
108
|
+
deleteAgentSettings(id: string): Promise<void>;
|
|
109
|
+
uploadAudioFileToSession(sessionId: string, file: File | Blob, fileName?: string, culturalTranscription?: string): Promise<AudioFile>;
|
|
110
|
+
uploadAudioFileWithTranscriptionQueue(sessionId: string, file: File | Blob, options?: {
|
|
111
|
+
fileName?: string;
|
|
112
|
+
culturalTranscription?: string;
|
|
113
|
+
}): Promise<AudioFile>;
|
|
114
|
+
getMyAudioFiles(): Promise<AudioFile[]>;
|
|
115
|
+
getAllAudioFiles(): Promise<AudioFile[]>;
|
|
116
|
+
getOrganizationAudioFiles(): Promise<AudioFile[]>;
|
|
117
|
+
getAudioFilesBySession(sessionId: string): Promise<AudioFile[]>;
|
|
118
|
+
getAudioFile(id: string): Promise<AudioFile>;
|
|
119
|
+
updateAudioFile(id: string, updates: UpdateAudioFileDto): Promise<AudioFile>;
|
|
120
|
+
deleteAudioFile(id: string): Promise<void>;
|
|
121
|
+
downloadAudioFile(id: string): Promise<Blob>;
|
|
122
|
+
downloadAudioFileAsUrl(id: string): Promise<string>;
|
|
123
|
+
getTranscribedAudioFiles(): Promise<AudioFile[]>;
|
|
124
|
+
getProcessingAudioFiles(): Promise<AudioFile[]>;
|
|
125
|
+
getFailedAudioFiles(): Promise<AudioFile[]>;
|
|
126
|
+
createBase64AudioFile(dto: CreateBase64AudioFileDto): Promise<Base64AudioFile>;
|
|
127
|
+
getAllBase64AudioFiles(): Promise<Base64AudioFile[]>;
|
|
128
|
+
getBase64AudioFilesBySession(sessionId: string): Promise<Base64AudioFile[]>;
|
|
129
|
+
getBase64AudioFile(id: string): Promise<Base64AudioFile>;
|
|
130
|
+
updateBase64AudioFile(id: string, updates: UpdateBase64AudioFileDto): Promise<Base64AudioFile>;
|
|
131
|
+
deleteBase64AudioFile(id: string): Promise<void>;
|
|
132
|
+
addBase64Chunk(sessionId: string, base64Chunks: string[]): Promise<AddBase64ChunkResponse>;
|
|
133
|
+
queueSessionBase64AudioForTranscription(sessionId: string): Promise<{
|
|
134
|
+
success: boolean;
|
|
135
|
+
}>;
|
|
136
|
+
createWorkflow(name: string, organizationId?: string): Promise<Workflow>;
|
|
137
|
+
getWorkflows(organizationId?: string): Promise<Workflow[]>;
|
|
138
|
+
getWorkflow(id: string): Promise<Workflow>;
|
|
139
|
+
getWorkflowsByOrganization(organizationId?: string): Promise<Workflow[]>;
|
|
140
|
+
updateWorkflow(id: string, name: string, organizationId?: string): Promise<Workflow>;
|
|
141
|
+
deleteWorkflow(id: string): Promise<void>;
|
|
142
|
+
/**
|
|
143
|
+
* Get logs with advanced filtering options
|
|
144
|
+
*/
|
|
145
|
+
getLogs(filters?: FilterLogsDto): Promise<LogsResponse>;
|
|
146
|
+
/**
|
|
147
|
+
* Get logs for a specific user
|
|
148
|
+
*/
|
|
149
|
+
getLogsByUser(userId: string, limit?: number, offset?: number): Promise<LogsResponse>;
|
|
150
|
+
/**
|
|
151
|
+
* Get logs for a specific controller
|
|
152
|
+
*/
|
|
153
|
+
getLogsByController(controller: string, limit?: number, offset?: number): Promise<LogsResponse>;
|
|
154
|
+
/**
|
|
155
|
+
* Get logs for the current authenticated user
|
|
156
|
+
*/
|
|
157
|
+
getMyLogs(limit?: number, offset?: number): Promise<LogsResponse>;
|
|
158
|
+
/**
|
|
159
|
+
* Get logs within a date range
|
|
160
|
+
*/
|
|
161
|
+
getLogsByDateRange(startDate: string, endDate: string, limit?: number, offset?: number): Promise<LogsResponse>;
|
|
162
|
+
/**
|
|
163
|
+
* Get logging statistics
|
|
164
|
+
*/
|
|
165
|
+
getLogStats(): Promise<LogStats>;
|
|
166
|
+
/**
|
|
167
|
+
* Create a manual log entry (app logs)
|
|
168
|
+
*/
|
|
169
|
+
createLog(logData: CreateLogDto): Promise<Log>;
|
|
170
|
+
/**
|
|
171
|
+
* Convenience methods for different log levels
|
|
172
|
+
*/
|
|
173
|
+
logInfo(message: string, context?: string, action?: string, data?: any): Promise<Log>;
|
|
174
|
+
logError(message: string, context?: string, action?: string, data?: any): Promise<Log>;
|
|
175
|
+
logWarn(message: string, context?: string, action?: string, data?: any): Promise<Log>;
|
|
176
|
+
logDebug(message: string, context?: string, action?: string, data?: any): Promise<Log>;
|
|
177
|
+
/**
|
|
178
|
+
* Get logs by role
|
|
179
|
+
*/
|
|
180
|
+
getLogsByRole(role: string, limit?: number, offset?: number): Promise<LogsResponse>;
|
|
181
|
+
/**
|
|
182
|
+
* Get logs by organization role
|
|
183
|
+
*/
|
|
184
|
+
getLogsByOrganizationRole(organizationRole: string, limit?: number, offset?: number): Promise<LogsResponse>;
|
|
185
|
+
/**
|
|
186
|
+
* Get logs by team role
|
|
187
|
+
*/
|
|
188
|
+
getLogsByTeamRole(teamRole: string, limit?: number, offset?: number): Promise<LogsResponse>;
|
|
189
|
+
/**
|
|
190
|
+
* Get available roles for filtering
|
|
191
|
+
*/
|
|
192
|
+
getAvailableRoles(): Promise<{
|
|
193
|
+
roles: string[];
|
|
194
|
+
organizationRoles: string[];
|
|
195
|
+
teamRoles: string[];
|
|
196
|
+
}>;
|
|
197
|
+
/**
|
|
198
|
+
* Get logs for a specific session ID
|
|
199
|
+
* Searches both log messages and meta data for the session ID
|
|
200
|
+
*/
|
|
201
|
+
getSessionLogs(sessionId: string, limit?: number, offset?: number): Promise<LogsResponse>;
|
|
202
|
+
/**
|
|
203
|
+
* Get sessions that do not have medical transcriptions and primary transcription summaries
|
|
204
|
+
* for the current user's organization
|
|
205
|
+
*/
|
|
206
|
+
getSessionsWithoutMedicalTranscriptions(): Promise<DebugSessionSummary[]>;
|
|
207
|
+
/**
|
|
208
|
+
* Download a session as a ZIP file containing all related data (decrypted)
|
|
209
|
+
* Returns a Blob that can be used to create a download link
|
|
210
|
+
*/
|
|
211
|
+
downloadSessionAsZip(sessionId: string): Promise<Blob>;
|
|
212
|
+
/**
|
|
213
|
+
* Download a session as a ZIP file and create a download URL
|
|
214
|
+
* Returns a URL that can be used for direct download
|
|
215
|
+
*/
|
|
216
|
+
downloadSessionAsZipUrl(sessionId: string): Promise<string>;
|
|
217
|
+
/**
|
|
218
|
+
* Download a session as a ZIP file and trigger browser download
|
|
219
|
+
* Optionally provide a custom filename
|
|
220
|
+
*/
|
|
221
|
+
downloadSessionAndTriggerDownload(sessionId: string, filename?: string): Promise<void>;
|
|
222
|
+
}
|