whio-api-sdk 1.1.21 → 1.1.23
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/exampleuse.js +0 -5
- package/dist/src/sdk/index.d.ts +9 -2
- package/dist/src/sdk/index.js +13 -2
- package/dist/src/sdk/modules/session/index.d.ts +3 -0
- package/dist/src/sdk/modules/session/index.js +3 -0
- package/dist/src/sdk/modules/session/orgadmin-session.module.d.ts +15 -0
- package/dist/src/sdk/modules/session/orgadmin-session.module.js +83 -0
- package/dist/src/sdk/modules/session/session.module.d.ts +21 -0
- package/dist/src/sdk/modules/session/session.module.js +95 -0
- package/dist/src/sdk/modules/session/superuser-session.module.d.ts +15 -0
- package/dist/src/sdk/modules/session/superuser-session.module.js +83 -0
- package/dist/src/sdk/modules/session.module.d.ts +13 -2
- package/dist/src/sdk/modules/session.module.js +111 -36
- package/dist/src/sdk/modules/template.module.d.ts +1 -8
- package/dist/src/sdk/modules/template.module.js +0 -53
- package/dist/src/sdk/modules/transcription-summary.module.d.ts +0 -1
- package/dist/src/sdk/modules/transcription-summary.module.js +0 -14
- package/dist/src/sdk/modules/websocket.module.d.ts +5 -2
- package/dist/src/sdk/modules/websocket.module.js +6 -5
- package/dist/src/sdk/sdk.d.ts +12 -10
- package/dist/src/sdk/sdk.js +63 -51
- package/dist/src/sdk/types/team.types.d.ts +0 -2
- package/dist/src/sdk/types/template.types.d.ts +0 -36
- package/dist/src/sdk/types/websocket.types.d.ts +7 -0
- package/dist/src/sdk/urls.d.ts +0 -2
- package/dist/src/sdk/urls.js +0 -2
- package/dist/src/sdk/whio-orgadmin-sdk.d.ts +104 -0
- package/dist/src/sdk/whio-orgadmin-sdk.js +437 -0
- package/dist/src/sdk/whio-sdk.d.ts +102 -0
- package/dist/src/sdk/whio-sdk.js +389 -0
- package/dist/src/sdk/whio-superuser-sdk.d.ts +135 -0
- package/dist/src/sdk/whio-superuser-sdk.js +576 -0
- package/dist/src/sdk/whio-teamadmin-sdk.d.ts +104 -0
- package/dist/src/sdk/whio-teamadmin-sdk.js +388 -0
- package/package.json +1 -1
- package/src/sdk/exampleuse.ts +0 -16
- package/src/sdk/index.ts +17 -3
- package/src/sdk/modules/session/index.ts +3 -0
- package/src/sdk/modules/session/orgadmin-session.module.ts +64 -0
- package/src/sdk/modules/session/session.module.ts +75 -0
- package/src/sdk/modules/session/superuser-session.module.ts +64 -0
- package/src/sdk/modules/session.module.ts +84 -15
- package/src/sdk/modules/template.module.ts +0 -54
- package/src/sdk/modules/transcription-summary.module.ts +0 -17
- package/src/sdk/modules/websocket.module.ts +15 -8
- package/src/sdk/sdk.ts +51 -41
- package/src/sdk/types/team.types.ts +0 -2
- package/src/sdk/types/template.types.ts +0 -45
- package/src/sdk/types/websocket.types.ts +12 -4
- package/src/sdk/urls.ts +1 -3
- package/src/sdk/whio-orgadmin-sdk.ts +408 -0
- package/src/sdk/whio-sdk.ts +374 -0
- package/src/sdk/whio-superuser-sdk.ts +530 -0
- package/src/sdk/whio-teamadmin-sdk.ts +372 -0
|
@@ -0,0 +1,576 @@
|
|
|
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 './modules/base-client';
|
|
11
|
+
import { AuthModule } from './modules/auth.module';
|
|
12
|
+
import { UserModule } from './modules/user.module';
|
|
13
|
+
import { OrganizationModule } from './modules/organization.module';
|
|
14
|
+
import { TeamModule } from './modules/team.module';
|
|
15
|
+
import { TemplateModule } from './modules/template.module';
|
|
16
|
+
import { TranscriptionSummaryModule } from './modules/transcription-summary.module';
|
|
17
|
+
import { SuperuserSessionModule } from './modules/session/superuser-session.module';
|
|
18
|
+
import { AgentModule } from './modules/agent.module';
|
|
19
|
+
import { AudioModule } from './modules/audio.module';
|
|
20
|
+
import { WorkflowModule } from './modules/workflow.module';
|
|
21
|
+
import { IntegrationActionModule } from './modules/integration-action.module';
|
|
22
|
+
import { LogModule } from './modules/log.module';
|
|
23
|
+
import { DebugModule } from './modules/debug.module';
|
|
24
|
+
import { ExternalIntegrationModule } from './modules/external-integration.module';
|
|
25
|
+
import { WebSocketModule } from './modules/websocket.module';
|
|
26
|
+
import { ReportsModule } from './modules/reports.module';
|
|
27
|
+
import { PatientModule } from './modules/patient.module';
|
|
28
|
+
import { DataStrategyModule } from './modules/data-strategy.module';
|
|
29
|
+
import { SystemSnapshotModule } from './modules/system-snapshot.module';
|
|
30
|
+
import { RatingModule } from './modules/rating.module';
|
|
31
|
+
import { TiakiModule } from './modules/tiaki.module';
|
|
32
|
+
/**
|
|
33
|
+
* WhioSuperuserSDK - SDK for superusers
|
|
34
|
+
* Provides access to system-wide operations across all organizations
|
|
35
|
+
*/
|
|
36
|
+
export class WhioSuperuserSDK extends BaseClient {
|
|
37
|
+
constructor(config = {}) {
|
|
38
|
+
super(config);
|
|
39
|
+
this.sdkInitialized = false;
|
|
40
|
+
this.authModule = new AuthModule(config);
|
|
41
|
+
this.usersModule = new UserModule(config);
|
|
42
|
+
this.organizationsModule = new OrganizationModule(config);
|
|
43
|
+
this.teamsModule = new TeamModule(config);
|
|
44
|
+
this.templatesModule = new TemplateModule(config);
|
|
45
|
+
this.transcriptionSummariesModule = new TranscriptionSummaryModule(config);
|
|
46
|
+
this.sessionsModule = new SuperuserSessionModule(config);
|
|
47
|
+
this.agentsModule = new AgentModule(config);
|
|
48
|
+
this.audioModule = new AudioModule(config);
|
|
49
|
+
this.workflowsModule = new WorkflowModule(config);
|
|
50
|
+
this.integrationActionsModule = new IntegrationActionModule(config);
|
|
51
|
+
this.logsModule = new LogModule(config);
|
|
52
|
+
this.debugModule = new DebugModule(config);
|
|
53
|
+
this.externalIntegrationsModule = new ExternalIntegrationModule(config);
|
|
54
|
+
this.websocketModule = config.skipWebsocket ? null : new WebSocketModule(config);
|
|
55
|
+
this.reportsModule = new ReportsModule(config);
|
|
56
|
+
this.patientsModule = new PatientModule(config);
|
|
57
|
+
this.dataStrategiesModule = new DataStrategyModule(config);
|
|
58
|
+
this.systemSnapshotsModule = new SystemSnapshotModule(config);
|
|
59
|
+
this.ratingsModule = new RatingModule(config);
|
|
60
|
+
this.tiakiModule = new TiakiModule(config);
|
|
61
|
+
this.modules = [
|
|
62
|
+
this.authModule, this.usersModule, this.organizationsModule, this.teamsModule, this.templatesModule,
|
|
63
|
+
this.transcriptionSummariesModule, this.sessionsModule, this.agentsModule, this.audioModule,
|
|
64
|
+
this.workflowsModule, this.integrationActionsModule, this.logsModule, this.debugModule, this.externalIntegrationsModule,
|
|
65
|
+
this.reportsModule, this.patientsModule, this.dataStrategiesModule, this.systemSnapshotsModule, this.ratingsModule,
|
|
66
|
+
this.tiakiModule,
|
|
67
|
+
...(this.websocketModule ? [this.websocketModule] : [])
|
|
68
|
+
];
|
|
69
|
+
this.initialize().catch(error => {
|
|
70
|
+
console.error('Failed to initialize SDK:', error);
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
initialize() {
|
|
74
|
+
const _super = Object.create(null, {
|
|
75
|
+
initialize: { get: () => super.initialize }
|
|
76
|
+
});
|
|
77
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
78
|
+
if (this.sdkInitialized) {
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
81
|
+
yield _super.initialize.call(this);
|
|
82
|
+
yield Promise.all(this.modules.map(module => module.initialize()));
|
|
83
|
+
yield this.syncUserStateAcrossModules();
|
|
84
|
+
this.sdkInitialized = true;
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
isReady() {
|
|
88
|
+
return this.sdkInitialized;
|
|
89
|
+
}
|
|
90
|
+
syncUserStateAcrossModules() {
|
|
91
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
92
|
+
const currentUser = this.getCurrentUser();
|
|
93
|
+
const accessToken = this.getAccessToken();
|
|
94
|
+
const refreshToken = this.getRefreshToken();
|
|
95
|
+
yield Promise.all(this.modules.map(module => module.syncUserState(currentUser, accessToken, refreshToken)));
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
syncUserState(user, accessToken, refreshToken) {
|
|
99
|
+
const _super = Object.create(null, {
|
|
100
|
+
syncUserState: { get: () => super.syncUserState }
|
|
101
|
+
});
|
|
102
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
103
|
+
yield _super.syncUserState.call(this, user, accessToken, refreshToken);
|
|
104
|
+
yield Promise.all(this.modules.map(module => module.syncUserState(user, accessToken, refreshToken)));
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
// ======================
|
|
108
|
+
// AUTH METHODS
|
|
109
|
+
// ======================
|
|
110
|
+
login(...args) {
|
|
111
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
112
|
+
const result = yield this.authModule.login(...args);
|
|
113
|
+
yield this.syncUserState(result.user, result.access_token, result.refresh_token);
|
|
114
|
+
return result;
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
logout(...args) {
|
|
118
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
119
|
+
const result = yield this.authModule.logout(...args);
|
|
120
|
+
yield this.syncUserState(null, null, null);
|
|
121
|
+
return result;
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
loginWithCode(...args) {
|
|
125
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
126
|
+
const result = yield this.authModule.loginWithCode(...args);
|
|
127
|
+
yield this.syncUserState(result.user, result.access_token, result.refresh_token);
|
|
128
|
+
return result;
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
getProfile(...args) {
|
|
132
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
133
|
+
return this.authModule.getProfile(...args);
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
changePassword(...args) {
|
|
137
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
138
|
+
return this.authModule.changePassword(...args);
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
adminChangePassword(...args) {
|
|
142
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
143
|
+
return this.authModule.adminChangePassword(...args);
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
// ======================
|
|
147
|
+
// SESSION METHODS (Superuser - all sessions)
|
|
148
|
+
// ======================
|
|
149
|
+
getSessionsByUser(...args) {
|
|
150
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
151
|
+
return this.sessionsModule.getSessionsByUser(...args);
|
|
152
|
+
});
|
|
153
|
+
}
|
|
154
|
+
getSessionsByOrganization(...args) {
|
|
155
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
156
|
+
return this.sessionsModule.getSessionsByOrganization(...args);
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
searchSessions(...args) {
|
|
160
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
161
|
+
return this.sessionsModule.searchSessions(...args);
|
|
162
|
+
});
|
|
163
|
+
}
|
|
164
|
+
updateSession(...args) {
|
|
165
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
166
|
+
return this.sessionsModule.updateSession(...args);
|
|
167
|
+
});
|
|
168
|
+
}
|
|
169
|
+
deleteSession(...args) {
|
|
170
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
171
|
+
return this.sessionsModule.deleteSession(...args);
|
|
172
|
+
});
|
|
173
|
+
}
|
|
174
|
+
setPrimaryTranscriptionSummary(...args) {
|
|
175
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
176
|
+
return this.sessionsModule.setPrimaryTranscriptionSummary(...args);
|
|
177
|
+
});
|
|
178
|
+
}
|
|
179
|
+
getSession(...args) {
|
|
180
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
181
|
+
return this.sessionsModule.getSession(...args);
|
|
182
|
+
});
|
|
183
|
+
}
|
|
184
|
+
// ======================
|
|
185
|
+
// USER METHODS (Superuser - all users)
|
|
186
|
+
// ======================
|
|
187
|
+
createUser(...args) {
|
|
188
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
189
|
+
return this.usersModule.createUser(...args);
|
|
190
|
+
});
|
|
191
|
+
}
|
|
192
|
+
getUsers(...args) {
|
|
193
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
194
|
+
return this.usersModule.getUsers(...args);
|
|
195
|
+
});
|
|
196
|
+
}
|
|
197
|
+
getUser(...args) {
|
|
198
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
199
|
+
return this.usersModule.getUser(...args);
|
|
200
|
+
});
|
|
201
|
+
}
|
|
202
|
+
getUsersByOrganization(...args) {
|
|
203
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
204
|
+
return this.usersModule.getUsersByOrganization(...args);
|
|
205
|
+
});
|
|
206
|
+
}
|
|
207
|
+
updateUser(...args) {
|
|
208
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
209
|
+
return this.usersModule.updateUser(...args);
|
|
210
|
+
});
|
|
211
|
+
}
|
|
212
|
+
deleteUser(...args) {
|
|
213
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
214
|
+
return this.usersModule.deleteUser(...args);
|
|
215
|
+
});
|
|
216
|
+
}
|
|
217
|
+
createEditorUser(...args) {
|
|
218
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
219
|
+
return this.usersModule.createEditorUser(...args);
|
|
220
|
+
});
|
|
221
|
+
}
|
|
222
|
+
createAdminUser(...args) {
|
|
223
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
224
|
+
return this.usersModule.createAdminUser(...args);
|
|
225
|
+
});
|
|
226
|
+
}
|
|
227
|
+
assignEditorToRoleToUser(...args) {
|
|
228
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
229
|
+
return this.usersModule.assignEditorToRoleToUser(...args);
|
|
230
|
+
});
|
|
231
|
+
}
|
|
232
|
+
assignAdminToRoleToUser(...args) {
|
|
233
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
234
|
+
return this.usersModule.assignAdminToRoleToUser(...args);
|
|
235
|
+
});
|
|
236
|
+
}
|
|
237
|
+
removeRoleFromUser(...args) {
|
|
238
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
239
|
+
return this.usersModule.removeRoleFromUser(...args);
|
|
240
|
+
});
|
|
241
|
+
}
|
|
242
|
+
// ======================
|
|
243
|
+
// ORGANIZATION METHODS
|
|
244
|
+
// ======================
|
|
245
|
+
createOrganization(...args) {
|
|
246
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
247
|
+
return this.organizationsModule.createOrganization(...args);
|
|
248
|
+
});
|
|
249
|
+
}
|
|
250
|
+
getOrganizations(...args) {
|
|
251
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
252
|
+
return this.organizationsModule.getOrganizations(...args);
|
|
253
|
+
});
|
|
254
|
+
}
|
|
255
|
+
getOrganization(...args) {
|
|
256
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
257
|
+
return this.organizationsModule.getOrganization(...args);
|
|
258
|
+
});
|
|
259
|
+
}
|
|
260
|
+
updateOrganization(...args) {
|
|
261
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
262
|
+
return this.organizationsModule.updateOrganization(...args);
|
|
263
|
+
});
|
|
264
|
+
}
|
|
265
|
+
deleteOrganization(...args) {
|
|
266
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
267
|
+
return this.organizationsModule.deleteOrganization(...args);
|
|
268
|
+
});
|
|
269
|
+
}
|
|
270
|
+
addUserToOrganization(...args) {
|
|
271
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
272
|
+
return this.organizationsModule.addUserToOrganization(...args);
|
|
273
|
+
});
|
|
274
|
+
}
|
|
275
|
+
removeUserFromOrganization(...args) {
|
|
276
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
277
|
+
return this.organizationsModule.removeUserFromOrganization(...args);
|
|
278
|
+
});
|
|
279
|
+
}
|
|
280
|
+
// ======================
|
|
281
|
+
// TEAM METHODS
|
|
282
|
+
// ======================
|
|
283
|
+
createTeam(...args) {
|
|
284
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
285
|
+
return this.teamsModule.createTeam(...args);
|
|
286
|
+
});
|
|
287
|
+
}
|
|
288
|
+
getTeams(...args) {
|
|
289
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
290
|
+
return this.teamsModule.getTeams(...args);
|
|
291
|
+
});
|
|
292
|
+
}
|
|
293
|
+
getTeam(...args) {
|
|
294
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
295
|
+
return this.teamsModule.getTeam(...args);
|
|
296
|
+
});
|
|
297
|
+
}
|
|
298
|
+
getTeamsByOrganization(...args) {
|
|
299
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
300
|
+
return this.teamsModule.getTeamsByOrganization(...args);
|
|
301
|
+
});
|
|
302
|
+
}
|
|
303
|
+
updateTeam(...args) {
|
|
304
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
305
|
+
return this.teamsModule.updateTeam(...args);
|
|
306
|
+
});
|
|
307
|
+
}
|
|
308
|
+
deleteTeam(...args) {
|
|
309
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
310
|
+
return this.teamsModule.deleteTeam(...args);
|
|
311
|
+
});
|
|
312
|
+
}
|
|
313
|
+
addUserToTeam(...args) {
|
|
314
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
315
|
+
return this.teamsModule.addUserToTeam(...args);
|
|
316
|
+
});
|
|
317
|
+
}
|
|
318
|
+
removeUserFromTeam(...args) {
|
|
319
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
320
|
+
return this.teamsModule.removeUserFromTeam(...args);
|
|
321
|
+
});
|
|
322
|
+
}
|
|
323
|
+
// ======================
|
|
324
|
+
// TEMPLATE METHODS
|
|
325
|
+
// ======================
|
|
326
|
+
createTemplate(...args) {
|
|
327
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
328
|
+
return this.templatesModule.createTemplate(...args);
|
|
329
|
+
});
|
|
330
|
+
}
|
|
331
|
+
getTemplates(...args) {
|
|
332
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
333
|
+
return this.templatesModule.getTemplates(...args);
|
|
334
|
+
});
|
|
335
|
+
}
|
|
336
|
+
getTemplate(...args) {
|
|
337
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
338
|
+
return this.templatesModule.getTemplate(...args);
|
|
339
|
+
});
|
|
340
|
+
}
|
|
341
|
+
updateTemplate(...args) {
|
|
342
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
343
|
+
return this.templatesModule.updateTemplate(...args);
|
|
344
|
+
});
|
|
345
|
+
}
|
|
346
|
+
deleteTemplate(...args) {
|
|
347
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
348
|
+
return this.templatesModule.deleteTemplate(...args);
|
|
349
|
+
});
|
|
350
|
+
}
|
|
351
|
+
getTemplateCategories(...args) {
|
|
352
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
353
|
+
return this.templatesModule.getTemplateCategories(...args);
|
|
354
|
+
});
|
|
355
|
+
}
|
|
356
|
+
createTemplateCategory(...args) {
|
|
357
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
358
|
+
return this.templatesModule.createTemplateCategory(...args);
|
|
359
|
+
});
|
|
360
|
+
}
|
|
361
|
+
updateTemplateCategory(...args) {
|
|
362
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
363
|
+
return this.templatesModule.updateTemplateCategory(...args);
|
|
364
|
+
});
|
|
365
|
+
}
|
|
366
|
+
deleteTemplateCategory(...args) {
|
|
367
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
368
|
+
return this.templatesModule.deleteTemplateCategory(...args);
|
|
369
|
+
});
|
|
370
|
+
}
|
|
371
|
+
// ======================
|
|
372
|
+
// TRANSCRIPTION SUMMARY METHODS
|
|
373
|
+
// ======================
|
|
374
|
+
getTranscriptionSummaries(...args) {
|
|
375
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
376
|
+
return this.transcriptionSummariesModule.getTranscriptionSummaries(...args);
|
|
377
|
+
});
|
|
378
|
+
}
|
|
379
|
+
getTranscriptionSummary(...args) {
|
|
380
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
381
|
+
return this.transcriptionSummariesModule.getTranscriptionSummary(...args);
|
|
382
|
+
});
|
|
383
|
+
}
|
|
384
|
+
getTranscriptionSummariesByUser(...args) {
|
|
385
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
386
|
+
return this.transcriptionSummariesModule.getTranscriptionSummariesByUser(...args);
|
|
387
|
+
});
|
|
388
|
+
}
|
|
389
|
+
getByOrganizationTranscriptionSummaries(...args) {
|
|
390
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
391
|
+
return this.transcriptionSummariesModule.getByOrganizationTranscriptionSummaries(...args);
|
|
392
|
+
});
|
|
393
|
+
}
|
|
394
|
+
// ======================
|
|
395
|
+
// AGENT METHODS
|
|
396
|
+
// ======================
|
|
397
|
+
createAgent(...args) {
|
|
398
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
399
|
+
return this.agentsModule.createAgent(...args);
|
|
400
|
+
});
|
|
401
|
+
}
|
|
402
|
+
getAgents(...args) {
|
|
403
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
404
|
+
return this.agentsModule.getAgents(...args);
|
|
405
|
+
});
|
|
406
|
+
}
|
|
407
|
+
getAgent(...args) {
|
|
408
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
409
|
+
return this.agentsModule.getAgent(...args);
|
|
410
|
+
});
|
|
411
|
+
}
|
|
412
|
+
updateAgent(...args) {
|
|
413
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
414
|
+
return this.agentsModule.updateAgent(...args);
|
|
415
|
+
});
|
|
416
|
+
}
|
|
417
|
+
deleteAgent(...args) {
|
|
418
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
419
|
+
return this.agentsModule.deleteAgent(...args);
|
|
420
|
+
});
|
|
421
|
+
}
|
|
422
|
+
// ======================
|
|
423
|
+
// WORKFLOW METHODS
|
|
424
|
+
// ======================
|
|
425
|
+
createWorkflow(...args) {
|
|
426
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
427
|
+
return this.workflowsModule.createWorkflow(...args);
|
|
428
|
+
});
|
|
429
|
+
}
|
|
430
|
+
getWorkflows(...args) {
|
|
431
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
432
|
+
return this.workflowsModule.getWorkflows(...args);
|
|
433
|
+
});
|
|
434
|
+
}
|
|
435
|
+
getWorkflow(...args) {
|
|
436
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
437
|
+
return this.workflowsModule.getWorkflow(...args);
|
|
438
|
+
});
|
|
439
|
+
}
|
|
440
|
+
updateWorkflow(...args) {
|
|
441
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
442
|
+
return this.workflowsModule.updateWorkflow(...args);
|
|
443
|
+
});
|
|
444
|
+
}
|
|
445
|
+
deleteWorkflow(...args) {
|
|
446
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
447
|
+
return this.workflowsModule.deleteWorkflow(...args);
|
|
448
|
+
});
|
|
449
|
+
}
|
|
450
|
+
// ======================
|
|
451
|
+
// AUDIO METHODS
|
|
452
|
+
// ======================
|
|
453
|
+
getAllAudioFiles(...args) {
|
|
454
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
455
|
+
return this.audioModule.getAllAudioFiles(...args);
|
|
456
|
+
});
|
|
457
|
+
}
|
|
458
|
+
getOrganizationAudioFiles(...args) {
|
|
459
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
460
|
+
return this.audioModule.getOrganizationAudioFiles(...args);
|
|
461
|
+
});
|
|
462
|
+
}
|
|
463
|
+
// ======================
|
|
464
|
+
// LOG METHODS
|
|
465
|
+
// ======================
|
|
466
|
+
getLogs(...args) {
|
|
467
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
468
|
+
return this.logsModule.getLogs(...args);
|
|
469
|
+
});
|
|
470
|
+
}
|
|
471
|
+
getLogsByUser(...args) {
|
|
472
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
473
|
+
return this.logsModule.getLogsByUser(...args);
|
|
474
|
+
});
|
|
475
|
+
}
|
|
476
|
+
getLogStats(...args) {
|
|
477
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
478
|
+
return this.logsModule.getLogStats(...args);
|
|
479
|
+
});
|
|
480
|
+
}
|
|
481
|
+
// ======================
|
|
482
|
+
// DEBUG METHODS
|
|
483
|
+
// ======================
|
|
484
|
+
getSessionsWithoutMedicalTranscriptions(...args) {
|
|
485
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
486
|
+
return this.debugModule.getSessionsWithoutMedicalTranscriptions(...args);
|
|
487
|
+
});
|
|
488
|
+
}
|
|
489
|
+
downloadSessionAsZip(...args) {
|
|
490
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
491
|
+
return this.debugModule.downloadSessionAsZip(...args);
|
|
492
|
+
});
|
|
493
|
+
}
|
|
494
|
+
// ======================
|
|
495
|
+
// SYSTEM SNAPSHOT METHODS
|
|
496
|
+
// ======================
|
|
497
|
+
getSystemSnapshots(...args) {
|
|
498
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
499
|
+
return this.systemSnapshotsModule.getSnapshots(...args);
|
|
500
|
+
});
|
|
501
|
+
}
|
|
502
|
+
getLatestSystemSnapshot(...args) {
|
|
503
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
504
|
+
return this.systemSnapshotsModule.getLatestSnapshot(...args);
|
|
505
|
+
});
|
|
506
|
+
}
|
|
507
|
+
getCurrentSystemMetrics(...args) {
|
|
508
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
509
|
+
return this.systemSnapshotsModule.getCurrentMetrics(...args);
|
|
510
|
+
});
|
|
511
|
+
}
|
|
512
|
+
// ======================
|
|
513
|
+
// EXTERNAL INTEGRATION METHODS
|
|
514
|
+
// ======================
|
|
515
|
+
createExternalIntegration(...args) {
|
|
516
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
517
|
+
return this.externalIntegrationsModule.createExternalIntegration(...args);
|
|
518
|
+
});
|
|
519
|
+
}
|
|
520
|
+
getExternalIntegrations(...args) {
|
|
521
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
522
|
+
return this.externalIntegrationsModule.getExternalIntegrations(...args);
|
|
523
|
+
});
|
|
524
|
+
}
|
|
525
|
+
updateExternalIntegration(...args) {
|
|
526
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
527
|
+
return this.externalIntegrationsModule.updateExternalIntegration(...args);
|
|
528
|
+
});
|
|
529
|
+
}
|
|
530
|
+
deleteExternalIntegration(...args) {
|
|
531
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
532
|
+
return this.externalIntegrationsModule.deleteExternalIntegration(...args);
|
|
533
|
+
});
|
|
534
|
+
}
|
|
535
|
+
// ======================
|
|
536
|
+
// DATA STRATEGY METHODS
|
|
537
|
+
// ======================
|
|
538
|
+
createDataStrategy(...args) {
|
|
539
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
540
|
+
return this.dataStrategiesModule.createDataStrategy(...args);
|
|
541
|
+
});
|
|
542
|
+
}
|
|
543
|
+
getDataStrategies(...args) {
|
|
544
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
545
|
+
return this.dataStrategiesModule.getDataStrategies(...args);
|
|
546
|
+
});
|
|
547
|
+
}
|
|
548
|
+
getDataStrategy(...args) {
|
|
549
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
550
|
+
return this.dataStrategiesModule.getDataStrategy(...args);
|
|
551
|
+
});
|
|
552
|
+
}
|
|
553
|
+
updateDataStrategy(...args) {
|
|
554
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
555
|
+
return this.dataStrategiesModule.updateDataStrategy(...args);
|
|
556
|
+
});
|
|
557
|
+
}
|
|
558
|
+
deleteDataStrategy(...args) {
|
|
559
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
560
|
+
return this.dataStrategiesModule.deleteDataStrategy(...args);
|
|
561
|
+
});
|
|
562
|
+
}
|
|
563
|
+
// ======================
|
|
564
|
+
// REPORTS METHODS
|
|
565
|
+
// ======================
|
|
566
|
+
getCompanyDailyReportCsv(...args) {
|
|
567
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
568
|
+
return this.reportsModule.getCompanyDailyReportCsv(...args);
|
|
569
|
+
});
|
|
570
|
+
}
|
|
571
|
+
downloadCompanyDailyReport(...args) {
|
|
572
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
573
|
+
return this.reportsModule.downloadCompanyDailyReport(...args);
|
|
574
|
+
});
|
|
575
|
+
}
|
|
576
|
+
}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { SDKConfig, User } from './types';
|
|
2
|
+
import { BaseClient } from './modules/base-client';
|
|
3
|
+
import { AuthModule } from './modules/auth.module';
|
|
4
|
+
import { UserModule } from './modules/user.module';
|
|
5
|
+
import { TemplateModule } from './modules/template.module';
|
|
6
|
+
import { TranscriptionSummaryModule } from './modules/transcription-summary.module';
|
|
7
|
+
import { SessionModule } from './modules/session/session.module';
|
|
8
|
+
import { AgentModule } from './modules/agent.module';
|
|
9
|
+
import { AudioModule } from './modules/audio.module';
|
|
10
|
+
import { WorkflowModule } from './modules/workflow.module';
|
|
11
|
+
import { PatientModule } from './modules/patient.module';
|
|
12
|
+
import { RatingModule } from './modules/rating.module';
|
|
13
|
+
import { TiakiModule } from './modules/tiaki.module';
|
|
14
|
+
/**
|
|
15
|
+
* WhioTeamAdminSDK - SDK for team administrators
|
|
16
|
+
* Provides access to team-level operations
|
|
17
|
+
*
|
|
18
|
+
* Note: Team admin specific modules will be added as endpoints are implemented
|
|
19
|
+
*/
|
|
20
|
+
export declare class WhioTeamAdminSDK extends BaseClient {
|
|
21
|
+
private readonly authModule;
|
|
22
|
+
private readonly usersModule;
|
|
23
|
+
private readonly organizationsModule;
|
|
24
|
+
private readonly teamsModule;
|
|
25
|
+
private readonly templatesModule;
|
|
26
|
+
private readonly transcriptionSummariesModule;
|
|
27
|
+
private readonly sessionsModule;
|
|
28
|
+
private readonly agentsModule;
|
|
29
|
+
private readonly audioModule;
|
|
30
|
+
private readonly workflowsModule;
|
|
31
|
+
private readonly integrationActionsModule;
|
|
32
|
+
private readonly logsModule;
|
|
33
|
+
private readonly debugModule;
|
|
34
|
+
private readonly externalIntegrationsModule;
|
|
35
|
+
private readonly websocketModule;
|
|
36
|
+
private readonly reportsModule;
|
|
37
|
+
private readonly patientsModule;
|
|
38
|
+
private readonly dataStrategiesModule;
|
|
39
|
+
private readonly systemSnapshotsModule;
|
|
40
|
+
private readonly ratingsModule;
|
|
41
|
+
private readonly tiakiModule;
|
|
42
|
+
private modules;
|
|
43
|
+
private sdkInitialized;
|
|
44
|
+
constructor(config?: SDKConfig);
|
|
45
|
+
initialize(): Promise<void>;
|
|
46
|
+
isReady(): boolean;
|
|
47
|
+
private syncUserStateAcrossModules;
|
|
48
|
+
syncUserState(user: User | null, accessToken: string | null, refreshToken: string | null): Promise<void>;
|
|
49
|
+
login(...args: Parameters<AuthModule['login']>): Promise<import("./types").LoginResponse>;
|
|
50
|
+
logout(...args: Parameters<AuthModule['logout']>): Promise<void>;
|
|
51
|
+
loginWithCode(...args: Parameters<AuthModule['loginWithCode']>): Promise<import("./types").LoginResponse>;
|
|
52
|
+
getProfile(...args: Parameters<AuthModule['getProfile']>): Promise<User>;
|
|
53
|
+
changePassword(...args: Parameters<AuthModule['changePassword']>): Promise<import("./types").PasswordChangeResponse>;
|
|
54
|
+
requestLoginCode(...args: Parameters<AuthModule['requestLoginCode']>): Promise<{
|
|
55
|
+
message: string;
|
|
56
|
+
}>;
|
|
57
|
+
createSession(...args: Parameters<SessionModule['createSession']>): Promise<import("./types").Session>;
|
|
58
|
+
getSessions(...args: Parameters<SessionModule['getSessions']>): Promise<import("./types").Session[]>;
|
|
59
|
+
getSession(...args: Parameters<SessionModule['getSession']>): Promise<import("./types").Session>;
|
|
60
|
+
updateSession(...args: Parameters<SessionModule['updateSession']>): Promise<import("./types").Session>;
|
|
61
|
+
deleteSession(...args: Parameters<SessionModule['deleteSession']>): Promise<void>;
|
|
62
|
+
searchSessions(...args: Parameters<SessionModule['searchSessions']>): Promise<import("./types").SearchSessionsResponse>;
|
|
63
|
+
setPrimaryTranscriptionSummary(...args: Parameters<SessionModule['setPrimaryTranscriptionSummary']>): Promise<import("./types").Session>;
|
|
64
|
+
rerunTranscription(...args: Parameters<SessionModule['rerunTranscription']>): Promise<{
|
|
65
|
+
message: string;
|
|
66
|
+
sessionId: string;
|
|
67
|
+
}>;
|
|
68
|
+
setAudioStreamStatus(...args: Parameters<SessionModule['setAudioStreamStatus']>): Promise<import("./types").Session>;
|
|
69
|
+
forwardToTiaki(...args: Parameters<SessionModule['forwardToTiaki']>): Promise<import("./types").ForwardToTiakiResponse>;
|
|
70
|
+
getUser(...args: Parameters<UserModule['getUser']>): Promise<User>;
|
|
71
|
+
updateUser(...args: Parameters<UserModule['updateUser']>): Promise<User>;
|
|
72
|
+
addExpoPushToken(...args: Parameters<UserModule['addExpoPushToken']>): Promise<{
|
|
73
|
+
message: string;
|
|
74
|
+
}>;
|
|
75
|
+
getTemplates(...args: Parameters<TemplateModule['getTemplates']>): Promise<import("./types").Template[]>;
|
|
76
|
+
getTemplate(...args: Parameters<TemplateModule['getTemplate']>): Promise<import("./types").Template>;
|
|
77
|
+
getTemplatesByOrganization(...args: Parameters<TemplateModule['getTemplatesByOrganization']>): Promise<import("./types").Template[]>;
|
|
78
|
+
getTemplateCategories(...args: Parameters<TemplateModule['getTemplateCategories']>): Promise<import("./types").TemplateCategory[]>;
|
|
79
|
+
getTemplateCategory(...args: Parameters<TemplateModule['getTemplateCategory']>): Promise<import("./types").TemplateCategory>;
|
|
80
|
+
generateTranscriptionSummary(...args: Parameters<TranscriptionSummaryModule['generateTranscriptionSummary']>): Promise<import("./types").TranscriptionSummary>;
|
|
81
|
+
updateTranscriptionSummary(...args: Parameters<TranscriptionSummaryModule['updateTranscriptionSummary']>): Promise<import("./types").TranscriptionSummary>;
|
|
82
|
+
getTranscriptionSummaries(...args: Parameters<TranscriptionSummaryModule['getTranscriptionSummaries']>): Promise<import("./types").TranscriptionSummary[]>;
|
|
83
|
+
getTranscriptionSummary(...args: Parameters<TranscriptionSummaryModule['getTranscriptionSummary']>): Promise<import("./types").TranscriptionSummary>;
|
|
84
|
+
cloneTranscriptionSummary(...args: Parameters<TranscriptionSummaryModule['cloneTranscriptionSummary']>): Promise<import("./types").TranscriptionSummary>;
|
|
85
|
+
deleteTranscriptionSummary(...args: Parameters<TranscriptionSummaryModule['deleteTranscriptionSummary']>): Promise<void>;
|
|
86
|
+
uploadAudioFile(...args: Parameters<TemplateModule['uploadAudioFile']>): Promise<import("./types").TranscriptionAudioUploadResponse | null>;
|
|
87
|
+
uploadLargeAudioFile(...args: Parameters<TemplateModule['uploadLargeAudioFile']>): Promise<string>;
|
|
88
|
+
transcribeBase64Audio(...args: Parameters<TemplateModule['transcribeBase64Audio']>): Promise<string>;
|
|
89
|
+
uploadAudioFileToSession(...args: Parameters<AudioModule['uploadAudioFileToSession']>): Promise<import("./types").AudioFile>;
|
|
90
|
+
getMyAudioFiles(...args: Parameters<AudioModule['getMyAudioFiles']>): Promise<import("./types").AudioFile[]>;
|
|
91
|
+
getAudioFilesBySession(...args: Parameters<AudioModule['getAudioFilesBySession']>): Promise<import("./types").AudioFile[]>;
|
|
92
|
+
getAudioFile(...args: Parameters<AudioModule['getAudioFile']>): Promise<import("./types").AudioFile>;
|
|
93
|
+
downloadAudioFile(...args: Parameters<AudioModule['downloadAudioFile']>): Promise<Blob>;
|
|
94
|
+
downloadAudioFileAsUrl(...args: Parameters<AudioModule['downloadAudioFileAsUrl']>): Promise<string>;
|
|
95
|
+
getWorkflows(...args: Parameters<WorkflowModule['getWorkflows']>): Promise<import("./types").Workflow[]>;
|
|
96
|
+
getWorkflow(...args: Parameters<WorkflowModule['getWorkflow']>): Promise<import("./types").Workflow>;
|
|
97
|
+
getWorkflowsByOrganization(...args: Parameters<WorkflowModule['getWorkflowsByOrganization']>): Promise<import("./types").Workflow[]>;
|
|
98
|
+
getAgents(...args: Parameters<AgentModule['getAgents']>): Promise<import("./types").Agent[]>;
|
|
99
|
+
getAgent(...args: Parameters<AgentModule['getAgent']>): Promise<import("./types").Agent>;
|
|
100
|
+
createRating(...args: Parameters<RatingModule['createRating']>): Promise<import("./types").SummaryRating>;
|
|
101
|
+
getRatingsBySession(...args: Parameters<RatingModule['getRatingsBySession']>): Promise<import("./types").SummaryRatingsResponse>;
|
|
102
|
+
createTiakiCalendarEvent(...args: Parameters<TiakiModule['createCalendarEvent']>): Promise<import("./types").TiakiCalendarEventResponse>;
|
|
103
|
+
getPatientsFromIntegration(...args: Parameters<PatientModule['getPatientsFromIntegration']>): Promise<import("./types").PatientsFromIntegrationResponse>;
|
|
104
|
+
}
|