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.
Files changed (102) hide show
  1. package/dist/src/sdk/modules/agent.module.d.ts +90 -5
  2. package/dist/src/sdk/modules/agent.module.js +87 -2
  3. package/dist/src/sdk/modules/audio.module.d.ts +143 -2
  4. package/dist/src/sdk/modules/audio.module.js +144 -5
  5. package/dist/src/sdk/modules/auth.module.d.ts +43 -0
  6. package/dist/src/sdk/modules/auth.module.js +43 -0
  7. package/dist/src/sdk/modules/data-strategy.module.d.ts +45 -7
  8. package/dist/src/sdk/modules/data-strategy.module.js +39 -1
  9. package/dist/src/sdk/modules/external-integration.module.d.ts +30 -0
  10. package/dist/src/sdk/modules/external-integration.module.js +30 -0
  11. package/dist/src/sdk/modules/integration-action.module.d.ts +39 -0
  12. package/dist/src/sdk/modules/integration-action.module.js +39 -0
  13. package/dist/src/sdk/modules/log.module.d.ts +4 -4
  14. package/dist/src/sdk/modules/organization.module.d.ts +62 -3
  15. package/dist/src/sdk/modules/organization.module.js +61 -2
  16. package/dist/src/sdk/modules/patient.module.d.ts +5 -2
  17. package/dist/src/sdk/modules/patient.module.js +5 -2
  18. package/dist/src/sdk/modules/reports.module.d.ts +4 -4
  19. package/dist/src/sdk/modules/reports.module.js +6 -6
  20. package/dist/src/sdk/modules/session/orgadmin-session.module.d.ts +46 -1
  21. package/dist/src/sdk/modules/session/orgadmin-session.module.js +53 -6
  22. package/dist/src/sdk/modules/session/session.module.d.ts +62 -1
  23. package/dist/src/sdk/modules/session/session.module.js +64 -1
  24. package/dist/src/sdk/modules/session/superuser-session.module.d.ts +46 -1
  25. package/dist/src/sdk/modules/session/superuser-session.module.js +52 -5
  26. package/dist/src/sdk/modules/session.module.d.ts +142 -3
  27. package/dist/src/sdk/modules/session.module.js +153 -12
  28. package/dist/src/sdk/modules/team.module.d.ts +56 -4
  29. package/dist/src/sdk/modules/team.module.js +54 -6
  30. package/dist/src/sdk/modules/template.module.d.ts +96 -4
  31. package/dist/src/sdk/modules/template.module.js +95 -24
  32. package/dist/src/sdk/modules/transcription-summary.module.d.ts +60 -3
  33. package/dist/src/sdk/modules/transcription-summary.module.js +60 -7
  34. package/dist/src/sdk/modules/user.module.d.ts +106 -0
  35. package/dist/src/sdk/modules/user.module.js +107 -1
  36. package/dist/src/sdk/modules/websocket.module.d.ts +25 -8
  37. package/dist/src/sdk/modules/websocket.module.js +23 -6
  38. package/dist/src/sdk/modules/workflow.module.d.ts +39 -0
  39. package/dist/src/sdk/modules/workflow.module.js +39 -0
  40. package/dist/src/sdk/sdk.d.ts +19 -29
  41. package/dist/src/sdk/sdk.js +1 -44
  42. package/dist/src/sdk/types/agent.types.d.ts +3 -0
  43. package/dist/src/sdk/types/audio.types.d.ts +8 -9
  44. package/dist/src/sdk/types/data-strategy.types.d.ts +3 -0
  45. package/dist/src/sdk/types/external-integration.types.d.ts +6 -0
  46. package/dist/src/sdk/types/log.types.d.ts +2 -21
  47. package/dist/src/sdk/types/patient.types.d.ts +2 -3
  48. package/dist/src/sdk/types/reports.types.d.ts +1 -1
  49. package/dist/src/sdk/types/session.types.d.ts +8 -8
  50. package/dist/src/sdk/types/team.types.d.ts +4 -3
  51. package/dist/src/sdk/types/template.types.d.ts +15 -7
  52. package/dist/src/sdk/types/user.types.d.ts +6 -0
  53. package/dist/src/sdk/types/websocket.types.d.ts +4 -10
  54. package/dist/src/sdk/urls.d.ts +0 -4
  55. package/dist/src/sdk/urls.js +0 -5
  56. package/dist/src/sdk/whio-orgadmin-sdk.d.ts +7 -7
  57. package/dist/src/sdk/whio-sdk.d.ts +11 -8
  58. package/dist/src/sdk/whio-sdk.js +34 -18
  59. package/dist/src/sdk/whio-superuser-sdk.d.ts +12 -16
  60. package/dist/src/sdk/whio-superuser-sdk.js +1 -16
  61. package/dist/src/sdk/whio-teamadmin-sdk.d.ts +4 -8
  62. package/dist/src/sdk/whio-teamadmin-sdk.js +1 -18
  63. package/package.json +1 -1
  64. package/src/sdk/modules/agent.module.ts +94 -9
  65. package/src/sdk/modules/audio.module.ts +146 -8
  66. package/src/sdk/modules/auth.module.ts +43 -0
  67. package/src/sdk/modules/data-strategy.module.ts +51 -13
  68. package/src/sdk/modules/external-integration.module.ts +30 -0
  69. package/src/sdk/modules/integration-action.module.ts +39 -0
  70. package/src/sdk/modules/log.module.ts +4 -4
  71. package/src/sdk/modules/organization.module.ts +64 -5
  72. package/src/sdk/modules/patient.module.ts +5 -2
  73. package/src/sdk/modules/reports.module.ts +6 -6
  74. package/src/sdk/modules/session/orgadmin-session.module.ts +53 -7
  75. package/src/sdk/modules/session/session.module.ts +64 -2
  76. package/src/sdk/modules/session/superuser-session.module.ts +52 -6
  77. package/src/sdk/modules/session.module.ts +155 -15
  78. package/src/sdk/modules/team.module.ts +58 -9
  79. package/src/sdk/modules/template.module.ts +95 -32
  80. package/src/sdk/modules/transcription-summary.module.ts +62 -8
  81. package/src/sdk/modules/user.module.ts +108 -2
  82. package/src/sdk/modules/websocket.module.ts +26 -8
  83. package/src/sdk/modules/workflow.module.ts +39 -0
  84. package/src/sdk/sdk.ts +1 -37
  85. package/src/sdk/types/agent.types.ts +5 -0
  86. package/src/sdk/types/audio.types.ts +8 -10
  87. package/src/sdk/types/data-strategy.types.ts +3 -0
  88. package/src/sdk/types/external-integration.types.ts +6 -0
  89. package/src/sdk/types/log.types.ts +4 -23
  90. package/src/sdk/types/patient.types.ts +2 -3
  91. package/src/sdk/types/reports.types.ts +1 -1
  92. package/src/sdk/types/session.types.ts +8 -8
  93. package/src/sdk/types/team.types.ts +5 -3
  94. package/src/sdk/types/template.types.ts +18 -7
  95. package/src/sdk/types/user.types.ts +6 -0
  96. package/src/sdk/types/websocket.types.ts +8 -7
  97. package/src/sdk/urls.ts +0 -7
  98. package/src/sdk/whio-sdk.ts +29 -16
  99. package/src/sdk/whio-superuser-sdk.ts +1 -16
  100. package/src/sdk/whio-teamadmin-sdk.ts +1 -16
  101. package/tsconfig.json +1 -1
  102. package/src/sdk/modules/debug.module.ts +0 -44
@@ -11,6 +11,15 @@ import { BaseClient } from './base-client';
11
11
  import { OrganizationRoleType } from '../types';
12
12
  import urls from '../urls';
13
13
  export class UserModule extends BaseClient {
14
+ /**
15
+ * Create a user in the current user's organization.
16
+ *
17
+ * @param firstName - First name of the new user.
18
+ * @param lastName - Last name of the new user.
19
+ * @param email - Email address of the new user.
20
+ * @param password - Initial password for the new user.
21
+ * @returns The newly created user.
22
+ */
14
23
  createUser(firstName, lastName, email, password) {
15
24
  var _a;
16
25
  return __awaiter(this, void 0, void 0, function* () {
@@ -38,31 +47,68 @@ export class UserModule extends BaseClient {
38
47
  userId: userId,
39
48
  organizationRoleId: orgRoleEditor.id,
40
49
  };
41
- this.request(urls.userOrganizationRoles, 'POST', assignRoleDto);
50
+ yield this.request(urls.userOrganizationRoles, 'POST', assignRoleDto);
42
51
  const userWithOrgRole = yield this.request(`${urls.user}/${userId}`, 'GET');
43
52
  return userWithOrgRole;
44
53
  });
45
54
  }
55
+ /**
56
+ * Assign the editor organization role to a user.
57
+ *
58
+ * @param userId - UUID of the user to assign the role to.
59
+ * @param organizationId - Optional organization UUID; defaults to the current user's organization.
60
+ * @returns The user with the assigned organization role.
61
+ */
46
62
  assignEditorToRoleToUser(userId, organizationId) {
47
63
  return __awaiter(this, void 0, void 0, function* () {
48
64
  return this.assignRoleToUser(userId, OrganizationRoleType.EDITOR, organizationId);
49
65
  });
50
66
  }
67
+ /**
68
+ * Assign the admin organization role to a user.
69
+ *
70
+ * @param userId - UUID of the user to assign the role to.
71
+ * @param organizationId - Optional organization UUID; defaults to the current user's organization.
72
+ * @returns The user with the assigned organization role.
73
+ */
51
74
  assignAdminToRoleToUser(userId, organizationId) {
52
75
  return __awaiter(this, void 0, void 0, function* () {
53
76
  return this.assignRoleToUser(userId, OrganizationRoleType.ADMIN, organizationId);
54
77
  });
55
78
  }
79
+ /**
80
+ * Assign the disabled organization role to a user.
81
+ *
82
+ * @param userId - UUID of the user to assign the role to.
83
+ * @param organizationId - Optional organization UUID; defaults to the current user's organization.
84
+ * @returns The user with the assigned organization role.
85
+ */
56
86
  assignDisabledToRoleToUser(userId, organizationId) {
57
87
  return __awaiter(this, void 0, void 0, function* () {
58
88
  return this.assignRoleToUser(userId, OrganizationRoleType.DISABLED, organizationId);
59
89
  });
60
90
  }
91
+ /**
92
+ * Remove an organization role from a user.
93
+ *
94
+ * @param userId - UUID of the user.
95
+ * @param organizationRoleId - UUID of the organization role to remove.
96
+ * @returns A promise that resolves when the role is removed.
97
+ */
61
98
  removeRoleFromUser(userId, organizationRoleId) {
62
99
  return __awaiter(this, void 0, void 0, function* () {
63
100
  yield this.request(`${urls.userOrganizationRoles}/${userId}/${organizationRoleId}`, 'DELETE');
64
101
  });
65
102
  }
103
+ /**
104
+ * Create a user and assign them the editor organization role.
105
+ *
106
+ * @param firstName - First name of the new user.
107
+ * @param lastName - Last name of the new user.
108
+ * @param email - Email address of the new user.
109
+ * @param password - Initial password for the new user.
110
+ * @returns The newly created user with the editor role assigned.
111
+ */
66
112
  createEditorUser(firstName, lastName, email, password) {
67
113
  return __awaiter(this, void 0, void 0, function* () {
68
114
  const user = yield this.createUser(firstName, lastName, email, password);
@@ -70,6 +116,15 @@ export class UserModule extends BaseClient {
70
116
  return userWithOrgRole;
71
117
  });
72
118
  }
119
+ /**
120
+ * Create a user and assign them the admin organization role.
121
+ *
122
+ * @param firstName - First name of the new user.
123
+ * @param lastName - Last name of the new user.
124
+ * @param email - Email address of the new user.
125
+ * @param password - Initial password for the new user.
126
+ * @returns The newly created user with the admin role assigned.
127
+ */
73
128
  createAdminUser(firstName, lastName, email, password) {
74
129
  return __awaiter(this, void 0, void 0, function* () {
75
130
  const user = yield this.createUser(firstName, lastName, email, password);
@@ -77,6 +132,15 @@ export class UserModule extends BaseClient {
77
132
  return userWithOrgRole;
78
133
  });
79
134
  }
135
+ /**
136
+ * Create a user and assign them the disabled organization role.
137
+ *
138
+ * @param firstName - First name of the new user.
139
+ * @param lastName - Last name of the new user.
140
+ * @param email - Email address of the new user.
141
+ * @param password - Initial password for the new user.
142
+ * @returns The newly created user with the disabled role assigned.
143
+ */
80
144
  createDisabledUser(firstName, lastName, email, password) {
81
145
  return __awaiter(this, void 0, void 0, function* () {
82
146
  const user = yield this.createUser(firstName, lastName, email, password);
@@ -84,36 +148,78 @@ export class UserModule extends BaseClient {
84
148
  return userWithOrgRole;
85
149
  });
86
150
  }
151
+ /**
152
+ * List all users the current user can access.
153
+ *
154
+ * @returns An array of users.
155
+ */
87
156
  getUsers() {
88
157
  return __awaiter(this, void 0, void 0, function* () {
89
158
  return this.request(urls.users, 'GET');
90
159
  });
91
160
  }
161
+ /**
162
+ * Get a single user by ID.
163
+ *
164
+ * @param id - UUID of the user.
165
+ * @returns The requested user.
166
+ */
92
167
  getUser(id) {
93
168
  return __awaiter(this, void 0, void 0, function* () {
94
169
  return this.request(`${urls.users}/${id}`, 'GET');
95
170
  });
96
171
  }
172
+ /**
173
+ * List all users belonging to an organization.
174
+ *
175
+ * @param organizationId - UUID of the organization.
176
+ * @returns An array of users in the organization.
177
+ */
97
178
  getUsersByOrganization(organizationId) {
98
179
  return __awaiter(this, void 0, void 0, function* () {
99
180
  return this.request(`${urls.users}/organization/${organizationId}`, 'GET');
100
181
  });
101
182
  }
183
+ /**
184
+ * Update a user by ID.
185
+ *
186
+ * @param id - UUID of the user to update.
187
+ * @param data - Fields to update on the user.
188
+ * @returns The updated user.
189
+ */
102
190
  updateUser(id, data) {
103
191
  return __awaiter(this, void 0, void 0, function* () {
104
192
  return this.request(`${urls.users}/${id}`, 'PATCH', data);
105
193
  });
106
194
  }
195
+ /**
196
+ * Delete a user by ID.
197
+ *
198
+ * @param id - UUID of the user to delete.
199
+ * @returns A promise that resolves when the user is deleted.
200
+ */
107
201
  deleteUser(id) {
108
202
  return __awaiter(this, void 0, void 0, function* () {
109
203
  yield this.request(`${urls.users}/${id}`, 'DELETE');
110
204
  });
111
205
  }
206
+ /**
207
+ * Update the current user's first and/or last name.
208
+ *
209
+ * @param data - The name fields to update.
210
+ * @returns The updated user.
211
+ */
112
212
  updateNames(data) {
113
213
  return __awaiter(this, void 0, void 0, function* () {
114
214
  return this.request(`${urls.users}/names`, 'PATCH', data);
115
215
  });
116
216
  }
217
+ /**
218
+ * Register an Expo push token for the current user.
219
+ *
220
+ * @param token - The Expo push token to add.
221
+ * @returns A confirmation message.
222
+ */
117
223
  addExpoPushToken(token) {
118
224
  return __awaiter(this, void 0, void 0, function* () {
119
225
  const dto = { token };
@@ -1,5 +1,5 @@
1
1
  import { BaseClient } from './base-client';
2
- import { WebSocketConnectionStats, WebSocketEvents, AudioChunkOptions, AudioStreamingOptions } from '../types';
2
+ import { WebSocketConnectionStats, WebSocketEvents, AudioChunkOptions, AudioStreamingOptions, SDKConfig } from '../types';
3
3
  /**
4
4
  * WebSocket connection manager with auto-reconnect and audio streaming capabilities
5
5
  */
@@ -13,7 +13,7 @@ export declare class WebSocketModule extends BaseClient {
13
13
  private reconnectTimeout;
14
14
  private connectionStats;
15
15
  private eventHandlers;
16
- constructor(baseConfig: any);
16
+ constructor(baseConfig: SDKConfig);
17
17
  /**
18
18
  * Connect to WebSocket server
19
19
  */
@@ -23,11 +23,15 @@ export declare class WebSocketModule extends BaseClient {
23
23
  */
24
24
  disconnect(): void;
25
25
  /**
26
- * Check if WebSocket is connected
26
+ * Check if the WebSocket is currently connected.
27
+ *
28
+ * @returns `true` when the underlying socket is connected, otherwise `false`.
27
29
  */
28
30
  isConnected(): boolean;
29
31
  /**
30
- * Get connection statistics
32
+ * Get a snapshot of the current connection statistics.
33
+ *
34
+ * @returns A copy of the connection stats (connection state, reconnect count, last connect/disconnect times).
31
35
  */
32
36
  getConnectionStats(): WebSocketConnectionStats;
33
37
  private ensureValidConnection;
@@ -39,15 +43,26 @@ export declare class WebSocketModule extends BaseClient {
39
43
  */
40
44
  streamAudioChunk(sessionId: string, audioChunk: string, options?: AudioChunkOptions): Promise<void>;
41
45
  /**
42
- * Stream multiple audio chunks
46
+ * Stream multiple audio chunks sequentially, with an optional delay between each.
47
+ *
48
+ * @param sessionId - Session ID to associate the chunks with.
49
+ * @param audioChunks - Ordered array of Base64 encoded audio data.
50
+ * @param options - Streaming options (e.g. `delayBetweenChunks` in ms, default 100).
51
+ * @throws Error if the WebSocket is not connected after token validation.
43
52
  */
44
53
  streamAudioChunks(sessionId: string, audioChunks: string[], options?: AudioStreamingOptions): Promise<void>;
45
54
  /**
46
- * Add event listener
55
+ * Register an event listener for a WebSocket event.
56
+ *
57
+ * @param event - The event name to listen for.
58
+ * @param handler - Callback invoked with the event payload.
47
59
  */
48
60
  on<K extends keyof WebSocketEvents>(event: K, handler: WebSocketEvents[K]): void;
49
61
  /**
50
- * Remove event listener
62
+ * Remove a previously registered event listener.
63
+ *
64
+ * @param event - The event name the handler was registered for.
65
+ * @param handler - The exact handler reference to remove.
51
66
  */
52
67
  off<K extends keyof WebSocketEvents>(event: K, handler: WebSocketEvents[K]): void;
53
68
  /**
@@ -71,7 +86,9 @@ export declare class WebSocketModule extends BaseClient {
71
86
  */
72
87
  private getWebSocketUrl;
73
88
  /**
74
- * Clean up resources
89
+ * Disconnect the socket and clear all registered event handlers.
90
+ *
91
+ * Call this when the client is no longer needed to release resources.
75
92
  */
76
93
  destroy(): void;
77
94
  }
@@ -109,14 +109,18 @@ export class WebSocketModule extends BaseClient {
109
109
  this.connectionStats.lastDisconnectedAt = new Date();
110
110
  }
111
111
  /**
112
- * Check if WebSocket is connected
112
+ * Check if the WebSocket is currently connected.
113
+ *
114
+ * @returns `true` when the underlying socket is connected, otherwise `false`.
113
115
  */
114
116
  isConnected() {
115
117
  var _a;
116
118
  return ((_a = this.socket) === null || _a === void 0 ? void 0 : _a.connected) || false;
117
119
  }
118
120
  /**
119
- * Get connection statistics
121
+ * Get a snapshot of the current connection statistics.
122
+ *
123
+ * @returns A copy of the connection stats (connection state, reconnect count, last connect/disconnect times).
120
124
  */
121
125
  getConnectionStats() {
122
126
  return Object.assign({}, this.connectionStats);
@@ -150,7 +154,12 @@ export class WebSocketModule extends BaseClient {
150
154
  });
151
155
  }
152
156
  /**
153
- * Stream multiple audio chunks
157
+ * Stream multiple audio chunks sequentially, with an optional delay between each.
158
+ *
159
+ * @param sessionId - Session ID to associate the chunks with.
160
+ * @param audioChunks - Ordered array of Base64 encoded audio data.
161
+ * @param options - Streaming options (e.g. `delayBetweenChunks` in ms, default 100).
162
+ * @throws Error if the WebSocket is not connected after token validation.
154
163
  */
155
164
  streamAudioChunks(sessionId, audioChunks, options = {}) {
156
165
  var _a;
@@ -172,7 +181,10 @@ export class WebSocketModule extends BaseClient {
172
181
  });
173
182
  }
174
183
  /**
175
- * Add event listener
184
+ * Register an event listener for a WebSocket event.
185
+ *
186
+ * @param event - The event name to listen for.
187
+ * @param handler - Callback invoked with the event payload.
176
188
  */
177
189
  on(event, handler) {
178
190
  if (!this.eventHandlers.has(event)) {
@@ -181,7 +193,10 @@ export class WebSocketModule extends BaseClient {
181
193
  this.eventHandlers.get(event).push(handler);
182
194
  }
183
195
  /**
184
- * Remove event listener
196
+ * Remove a previously registered event listener.
197
+ *
198
+ * @param event - The event name the handler was registered for.
199
+ * @param handler - The exact handler reference to remove.
185
200
  */
186
201
  off(event, handler) {
187
202
  const handlers = this.eventHandlers.get(event);
@@ -305,7 +320,9 @@ export class WebSocketModule extends BaseClient {
305
320
  return `${baseWsUrl}/${this.config.namespace}`;
306
321
  }
307
322
  /**
308
- * Clean up resources
323
+ * Disconnect the socket and clear all registered event handlers.
324
+ *
325
+ * Call this when the client is no longer needed to release resources.
309
326
  */
310
327
  destroy() {
311
328
  this.disconnect();
@@ -1,10 +1,49 @@
1
1
  import { BaseClient } from './base-client';
2
2
  import { Workflow } from '../types';
3
3
  export declare class WorkflowModule extends BaseClient {
4
+ /**
5
+ * Create a workflow for an organization.
6
+ *
7
+ * @param name - Display name of the workflow.
8
+ * @param organizationId - Optional organization UUID; defaults to the current user's organization.
9
+ * @returns The created workflow.
10
+ */
4
11
  createWorkflow(name: string, organizationId?: string): Promise<Workflow>;
12
+ /**
13
+ * List workflows, optionally filtered by organization.
14
+ *
15
+ * @param organizationId - Optional organization UUID to filter by.
16
+ * @returns An array of workflows.
17
+ */
5
18
  getWorkflows(organizationId?: string): Promise<Workflow[]>;
19
+ /**
20
+ * Get a single workflow by id.
21
+ *
22
+ * @param id - UUID of the workflow.
23
+ * @returns The workflow.
24
+ */
6
25
  getWorkflow(id: string): Promise<Workflow>;
26
+ /**
27
+ * Get the workflows for a specific organization.
28
+ *
29
+ * @param organizationId - Optional organization UUID; defaults to the current user's organization.
30
+ * @returns An array of workflows for the organization.
31
+ */
7
32
  getWorkflowsByOrganization(organizationId?: string): Promise<Workflow[]>;
33
+ /**
34
+ * Update a workflow.
35
+ *
36
+ * @param id - UUID of the workflow to update.
37
+ * @param name - New display name of the workflow.
38
+ * @param organizationId - Optional organization UUID; defaults to the current user's organization.
39
+ * @returns The updated workflow.
40
+ */
8
41
  updateWorkflow(id: string, name: string, organizationId?: string): Promise<Workflow>;
42
+ /**
43
+ * Delete a workflow.
44
+ *
45
+ * @param id - UUID of the workflow to delete.
46
+ * @returns A promise that resolves when the workflow has been deleted.
47
+ */
9
48
  deleteWorkflow(id: string): Promise<void>;
10
49
  }
@@ -10,6 +10,13 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
10
10
  import { BaseClient } from './base-client';
11
11
  import urls from '../urls';
12
12
  export class WorkflowModule extends BaseClient {
13
+ /**
14
+ * Create a workflow for an organization.
15
+ *
16
+ * @param name - Display name of the workflow.
17
+ * @param organizationId - Optional organization UUID; defaults to the current user's organization.
18
+ * @returns The created workflow.
19
+ */
13
20
  createWorkflow(name, organizationId) {
14
21
  return __awaiter(this, void 0, void 0, function* () {
15
22
  const dto = {
@@ -19,23 +26,49 @@ export class WorkflowModule extends BaseClient {
19
26
  return this.request(urls.workflows, 'POST', dto);
20
27
  });
21
28
  }
29
+ /**
30
+ * List workflows, optionally filtered by organization.
31
+ *
32
+ * @param organizationId - Optional organization UUID to filter by.
33
+ * @returns An array of workflows.
34
+ */
22
35
  getWorkflows(organizationId) {
23
36
  return __awaiter(this, void 0, void 0, function* () {
24
37
  const params = organizationId ? `?organizationId=${organizationId}` : '';
25
38
  return this.request(`${urls.workflows}${params}`, 'GET');
26
39
  });
27
40
  }
41
+ /**
42
+ * Get a single workflow by id.
43
+ *
44
+ * @param id - UUID of the workflow.
45
+ * @returns The workflow.
46
+ */
28
47
  getWorkflow(id) {
29
48
  return __awaiter(this, void 0, void 0, function* () {
30
49
  return this.request(`${urls.workflows}/${id}`, 'GET');
31
50
  });
32
51
  }
52
+ /**
53
+ * Get the workflows for a specific organization.
54
+ *
55
+ * @param organizationId - Optional organization UUID; defaults to the current user's organization.
56
+ * @returns An array of workflows for the organization.
57
+ */
33
58
  getWorkflowsByOrganization(organizationId) {
34
59
  return __awaiter(this, void 0, void 0, function* () {
35
60
  const orgId = organizationId || this.user.organizationId;
36
61
  return this.request(`${urls.workflows}?organizationId=${orgId}`, 'GET');
37
62
  });
38
63
  }
64
+ /**
65
+ * Update a workflow.
66
+ *
67
+ * @param id - UUID of the workflow to update.
68
+ * @param name - New display name of the workflow.
69
+ * @param organizationId - Optional organization UUID; defaults to the current user's organization.
70
+ * @returns The updated workflow.
71
+ */
39
72
  updateWorkflow(id, name, organizationId) {
40
73
  return __awaiter(this, void 0, void 0, function* () {
41
74
  const dto = {
@@ -45,6 +78,12 @@ export class WorkflowModule extends BaseClient {
45
78
  return this.request(`${urls.workflows}/${id}`, 'PATCH', dto);
46
79
  });
47
80
  }
81
+ /**
82
+ * Delete a workflow.
83
+ *
84
+ * @param id - UUID of the workflow to delete.
85
+ * @returns A promise that resolves when the workflow has been deleted.
86
+ */
48
87
  deleteWorkflow(id) {
49
88
  return __awaiter(this, void 0, void 0, function* () {
50
89
  yield this.request(`${urls.workflows}/${id}`, 'DELETE');
@@ -12,7 +12,6 @@ import { AudioModule } from './modules/audio.module';
12
12
  import { WorkflowModule } from './modules/workflow.module';
13
13
  import { IntegrationActionModule } from './modules/integration-action.module';
14
14
  import { LogModule } from './modules/log.module';
15
- import { DebugModule } from './modules/debug.module';
16
15
  import { ExternalIntegrationModule } from './modules/external-integration.module';
17
16
  import { WebSocketModule } from './modules/websocket.module';
18
17
  import { ReportsModule } from './modules/reports.module';
@@ -37,7 +36,6 @@ export declare class ApiSDK extends BaseClient {
37
36
  readonly workflows: WorkflowModule;
38
37
  readonly integrationActions: IntegrationActionModule;
39
38
  readonly logs: LogModule;
40
- readonly debug: DebugModule;
41
39
  readonly externalIntegrations: ExternalIntegrationModule;
42
40
  readonly websocket: WebSocketModule | null;
43
41
  readonly reports: ReportsModule;
@@ -83,19 +81,18 @@ export declare class ApiSDK extends BaseClient {
83
81
  getOrganization(...args: Parameters<OrganizationModule['getOrganization']>): Promise<import("./types").Organization>;
84
82
  updateOrganization(...args: Parameters<OrganizationModule['updateOrganization']>): Promise<import("./types").Organization>;
85
83
  deleteOrganization(...args: Parameters<OrganizationModule['deleteOrganization']>): Promise<void>;
86
- addUserToOrganization(...args: Parameters<OrganizationModule['addUserToOrganization']>): Promise<void>;
87
- removeUserFromOrganization(...args: Parameters<OrganizationModule['removeUserFromOrganization']>): Promise<void>;
84
+ addUserToOrganization(...args: Parameters<OrganizationModule['addUserToOrganization']>): Promise<User>;
85
+ removeUserFromOrganization(...args: Parameters<OrganizationModule['removeUserFromOrganization']>): Promise<User>;
88
86
  linkExternalIntegration(...args: Parameters<OrganizationModule['linkExternalIntegration']>): Promise<import("./types").Organization>;
89
87
  unlinkExternalIntegration(...args: Parameters<OrganizationModule['unlinkExternalIntegration']>): Promise<import("./types").Organization>;
90
88
  createTeam(...args: Parameters<TeamModule['createTeam']>): Promise<import("./types").Team>;
91
89
  updateTeam(...args: Parameters<TeamModule['updateTeam']>): Promise<import("./types").Team>;
92
- addUserToTeam(...args: Parameters<TeamModule['addUserToTeam']>): Promise<any>;
93
- removeUserFromTeam(...args: Parameters<TeamModule['removeUserFromTeam']>): Promise<void>;
90
+ addUserToTeam(...args: Parameters<TeamModule['addUserToTeam']>): Promise<import("./types").TeamRole>;
91
+ removeUserFromTeam(...args: Parameters<TeamModule['removeUserFromTeam']>): Promise<import("./types").TeamRole>;
94
92
  getTeams(...args: Parameters<TeamModule['getTeams']>): Promise<import("./types").Team[]>;
95
93
  getTeam(...args: Parameters<TeamModule['getTeam']>): Promise<import("./types").Team>;
96
94
  getTeamsByOrganization(...args: Parameters<TeamModule['getTeamsByOrganization']>): Promise<import("./types").Team[]>;
97
95
  deleteTeam(...args: Parameters<TeamModule['deleteTeam']>): Promise<void>;
98
- removeUserFromTeamFixed(...args: Parameters<TeamModule['removeUserFromTeamFixed']>): Promise<void>;
99
96
  createTemplate(...args: Parameters<TemplateModule['createTemplate']>): Promise<import("./types").Template>;
100
97
  updateTemplate(...args: Parameters<TemplateModule['updateTemplate']>): Promise<import("./types").Template>;
101
98
  getTemplates(...args: Parameters<TemplateModule['getTemplates']>): Promise<import("./types").Template[]>;
@@ -107,7 +104,7 @@ export declare class ApiSDK extends BaseClient {
107
104
  createTemplateCategory(...args: Parameters<TemplateModule['createTemplateCategory']>): Promise<import("./types").TemplateCategory>;
108
105
  updateTemplateCategory(...args: Parameters<TemplateModule['updateTemplateCategory']>): Promise<import("./types").TemplateCategory>;
109
106
  deleteTemplateCategory(...args: Parameters<TemplateModule['deleteTemplateCategory']>): Promise<void>;
110
- generateTranscriptionSummary(...args: Parameters<TranscriptionSummaryModule['generateTranscriptionSummary']>): Promise<import("./types").TranscriptionSummary>;
107
+ generateTranscriptionSummary(...args: Parameters<TranscriptionSummaryModule['generateTranscriptionSummary']>): Promise<import("./types").GenerateSummaryResponse>;
111
108
  updateTranscriptionSummary(...args: Parameters<TranscriptionSummaryModule['updateTranscriptionSummary']>): Promise<import("./types").TranscriptionSummary>;
112
109
  getTranscriptionSummaries(...args: Parameters<TranscriptionSummaryModule['getTranscriptionSummaries']>): Promise<import("./types").TranscriptionSummary[]>;
113
110
  getTranscriptionSummary(...args: Parameters<TranscriptionSummaryModule['getTranscriptionSummary']>): Promise<import("./types").TranscriptionSummary>;
@@ -115,14 +112,11 @@ export declare class ApiSDK extends BaseClient {
115
112
  getByOrganizationTranscriptionSummaries(...args: Parameters<TranscriptionSummaryModule['getByOrganizationTranscriptionSummaries']>): Promise<import("./types").TranscriptionSummary[]>;
116
113
  cloneTranscriptionSummary(...args: Parameters<TranscriptionSummaryModule['cloneTranscriptionSummary']>): Promise<import("./types").TranscriptionSummary>;
117
114
  deleteTranscriptionSummary(...args: Parameters<TranscriptionSummaryModule['deleteTranscriptionSummary']>): Promise<void>;
118
- uploadLargeAudioFile(...args: Parameters<TemplateModule['uploadLargeAudioFile']>): Promise<string>;
119
- uploadAudioFile(...args: Parameters<TemplateModule['uploadAudioFile']>): Promise<import("./types").TranscriptionAudioUploadResponse | null>;
120
- transcribeBase64Audio(...args: Parameters<TemplateModule['transcribeBase64Audio']>): Promise<string>;
121
115
  createSession(...args: Parameters<SessionModule['createSession']>): Promise<import("./types").Session>;
122
116
  getSessions(...args: Parameters<SessionModule['getSessions']>): Promise<import("./types").Session[]>;
123
117
  getSession(...args: Parameters<SessionModule['getSession']>): Promise<import("./types").Session>;
124
118
  updateSession(...args: Parameters<SessionModule['updateSession']>): Promise<import("./types").Session>;
125
- deleteSession(...args: Parameters<SessionModule['deleteSession']>): Promise<void>;
119
+ deleteSession(...args: Parameters<SessionModule['deleteSession']>): Promise<import("./types").Session>;
126
120
  setPrimaryTranscriptionSummary(...args: Parameters<SessionModule['setPrimaryTranscriptionSummary']>): Promise<import("./types").Session>;
127
121
  rerunTranscription(...args: Parameters<SessionModule['rerunTranscription']>): Promise<{
128
122
  message: string;
@@ -135,21 +129,21 @@ export declare class ApiSDK extends BaseClient {
135
129
  superuserGetSessionsByOrganization(...args: Parameters<SessionModule['superuserGetSessionsByOrganization']>): Promise<import("./types").SessionsResponse>;
136
130
  superuserSearchSessions(...args: Parameters<SessionModule['superuserSearchSessions']>): Promise<import("./types").SearchSessionsResponse>;
137
131
  superuserUpdateSession(...args: Parameters<SessionModule['superuserUpdateSession']>): Promise<import("./types").Session>;
138
- superuserDeleteSession(...args: Parameters<SessionModule['superuserDeleteSession']>): Promise<void>;
132
+ superuserDeleteSession(...args: Parameters<SessionModule['superuserDeleteSession']>): Promise<import("./types").Session>;
139
133
  superuserSetPrimaryTranscriptionSummary(...args: Parameters<SessionModule['superuserSetPrimaryTranscriptionSummary']>): Promise<import("./types").Session>;
140
134
  orgAdminGetSessionsByUser(...args: Parameters<SessionModule['orgAdminGetSessionsByUser']>): Promise<import("./types").Session[]>;
141
135
  orgAdminGetSessionsByOrganization(...args: Parameters<SessionModule['orgAdminGetSessionsByOrganization']>): Promise<import("./types").SessionsResponse>;
142
136
  orgAdminSearchSessions(...args: Parameters<SessionModule['orgAdminSearchSessions']>): Promise<import("./types").SearchSessionsResponse>;
143
137
  orgAdminUpdateSession(...args: Parameters<SessionModule['orgAdminUpdateSession']>): Promise<import("./types").Session>;
144
- orgAdminDeleteSession(...args: Parameters<SessionModule['orgAdminDeleteSession']>): Promise<void>;
138
+ orgAdminDeleteSession(...args: Parameters<SessionModule['orgAdminDeleteSession']>): Promise<import("./types").Session>;
145
139
  orgAdminSetPrimaryTranscriptionSummary(...args: Parameters<SessionModule['orgAdminSetPrimaryTranscriptionSummary']>): Promise<import("./types").Session>;
146
140
  createAgent(...args: Parameters<AgentModule['createAgent']>): Promise<import("./types").Agent>;
147
- getAgents(...args: Parameters<AgentModule['getAgents']>): Promise<import("./types").Agent[]>;
148
- getAgent(...args: Parameters<AgentModule['getAgent']>): Promise<import("./types").Agent>;
141
+ getAgents(...args: Parameters<AgentModule['getAgents']>): Promise<import("./types").AgentWithOrganizations[]>;
142
+ getAgent(...args: Parameters<AgentModule['getAgent']>): Promise<import("./types").AgentWithOrganizations>;
149
143
  updateAgent(...args: Parameters<AgentModule['updateAgent']>): Promise<import("./types").Agent>;
150
144
  deleteAgent(...args: Parameters<AgentModule['deleteAgent']>): Promise<void>;
151
- addAgentToOrganization(...args: Parameters<AgentModule['addAgentToOrganization']>): Promise<void>;
152
- removeAgentFromOrganization(...args: Parameters<AgentModule['removeAgentFromOrganization']>): Promise<void>;
145
+ addAgentToOrganization(...args: Parameters<AgentModule['addAgentToOrganization']>): Promise<import("./types").AgentOrganization>;
146
+ removeAgentFromOrganization(...args: Parameters<AgentModule['removeAgentFromOrganization']>): Promise<import("./types").AgentOrganization>;
153
147
  createAgentSettings(...args: Parameters<AgentModule['createAgentSettings']>): Promise<import("./types").AgentSettings>;
154
148
  getAgentSettings(...args: Parameters<AgentModule['getAgentSettings']>): Promise<import("./types").AgentSettings[]>;
155
149
  getAgentSettingsById(...args: Parameters<AgentModule['getAgentSettingsById']>): Promise<import("./types").AgentSettings>;
@@ -164,7 +158,7 @@ export declare class ApiSDK extends BaseClient {
164
158
  getAudioFilesBySession(...args: Parameters<AudioModule['getAudioFilesBySession']>): Promise<import("./types").AudioFile[]>;
165
159
  getAudioFile(...args: Parameters<AudioModule['getAudioFile']>): Promise<import("./types").AudioFile>;
166
160
  updateAudioFile(...args: Parameters<AudioModule['updateAudioFile']>): Promise<import("./types").AudioFile>;
167
- deleteAudioFile(...args: Parameters<AudioModule['deleteAudioFile']>): Promise<void>;
161
+ deleteAudioFile(...args: Parameters<AudioModule['deleteAudioFile']>): Promise<import("./types").AudioFile>;
168
162
  downloadAudioFile(...args: Parameters<AudioModule['downloadAudioFile']>): Promise<Blob>;
169
163
  downloadAudioFileAsUrl(...args: Parameters<AudioModule['downloadAudioFileAsUrl']>): Promise<string>;
170
164
  getTranscribedAudioFiles(...args: Parameters<AudioModule['getTranscribedAudioFiles']>): Promise<import("./types").AudioFile[]>;
@@ -210,10 +204,6 @@ export declare class ApiSDK extends BaseClient {
210
204
  }>;
211
205
  getSessionLogs(...args: Parameters<LogModule['getSessionLogs']>): Promise<import("./types").LogsResponse>;
212
206
  cleanupOldLogs(...args: Parameters<LogModule['cleanupOldLogs']>): Promise<import("./types").LogCleanupResponse>;
213
- getSessionsWithoutMedicalTranscriptions(...args: Parameters<DebugModule['getSessionsWithoutMedicalTranscriptions']>): Promise<import("./types").DebugSessionSummary[]>;
214
- downloadSessionAsZip(...args: Parameters<DebugModule['downloadSessionAsZip']>): Promise<Blob>;
215
- downloadSessionAsZipUrl(...args: Parameters<DebugModule['downloadSessionAsZipUrl']>): Promise<string>;
216
- downloadSessionAndTriggerDownload(...args: Parameters<DebugModule['downloadSessionAndTriggerDownload']>): Promise<void>;
217
207
  createExternalIntegration(...args: Parameters<ExternalIntegrationModule['createExternalIntegration']>): Promise<import("./types").ExternalIntegration>;
218
208
  getExternalIntegrations(...args: Parameters<ExternalIntegrationModule['getExternalIntegrations']>): Promise<import("./types").ExternalIntegration[]>;
219
209
  getExternalIntegration(...args: Parameters<ExternalIntegrationModule['getExternalIntegration']>): Promise<import("./types").ExternalIntegration>;
@@ -233,12 +223,12 @@ export declare class ApiSDK extends BaseClient {
233
223
  getCompanyDailyReportCsv(...args: Parameters<ReportsModule['getCompanyDailyReportCsv']>): Promise<string>;
234
224
  downloadCompanyDailyReport(...args: Parameters<ReportsModule['downloadCompanyDailyReport']>): Promise<Blob>;
235
225
  getPatientsFromIntegration(...args: Parameters<PatientModule['getPatientsFromIntegration']>): Promise<import("./types").PatientsFromIntegrationResponse>;
236
- createDataStrategy(...args: Parameters<DataStrategyModule['createDataStrategy']>): Promise<import("./types").DataStrategy>;
237
- getDataStrategies(...args: Parameters<DataStrategyModule['getDataStrategies']>): Promise<import("./types").DataStrategy[]>;
238
- getDataStrategy(...args: Parameters<DataStrategyModule['getDataStrategy']>): Promise<import("./types").DataStrategy>;
239
- getDataStrategyByOrganization(...args: Parameters<DataStrategyModule['getDataStrategyByOrganization']>): Promise<import("./types").DataStrategy>;
240
- updateDataStrategy(...args: Parameters<DataStrategyModule['updateDataStrategy']>): Promise<import("./types").DataStrategy>;
241
- deleteDataStrategy(...args: Parameters<DataStrategyModule['deleteDataStrategy']>): Promise<void>;
226
+ createDataStrategy(...args: Parameters<DataStrategyModule['createDataStrategy']>): Promise<import("./types").DataStrategyWithOrganization>;
227
+ getDataStrategies(...args: Parameters<DataStrategyModule['getDataStrategies']>): Promise<import("./types").DataStrategyWithOrganization[]>;
228
+ getDataStrategy(...args: Parameters<DataStrategyModule['getDataStrategy']>): Promise<import("./types").DataStrategyWithOrganization>;
229
+ getDataStrategyByOrganization(...args: Parameters<DataStrategyModule['getDataStrategyByOrganization']>): Promise<import("./types").DataStrategyWithOrganization>;
230
+ updateDataStrategy(...args: Parameters<DataStrategyModule['updateDataStrategy']>): Promise<import("./types").DataStrategyWithOrganization>;
231
+ deleteDataStrategy(...args: Parameters<DataStrategyModule['deleteDataStrategy']>): Promise<import("./types").DataStrategy>;
242
232
  getSystemSnapshots(...args: Parameters<SystemSnapshotModule['getSnapshots']>): Promise<import("./types").SystemSnapshotsResponse>;
243
233
  getLatestSystemSnapshot(...args: Parameters<SystemSnapshotModule['getLatestSnapshot']>): Promise<import("./types").SystemSnapshot | null>;
244
234
  getCurrentSystemMetrics(...args: Parameters<SystemSnapshotModule['getCurrentMetrics']>): Promise<import("./types").CurrentMetrics>;