whio-api-sdk 1.1.28 → 1.1.33

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (104) 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 +67 -0
  6. package/dist/src/sdk/modules/auth.module.js +81 -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 +127 -0
  35. package/dist/src/sdk/modules/user.module.js +136 -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 +23 -29
  41. package/dist/src/sdk/sdk.js +14 -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 +2 -4
  55. package/dist/src/sdk/urls.js +2 -5
  56. package/dist/src/sdk/whio-orgadmin-sdk.d.ts +9 -7
  57. package/dist/src/sdk/whio-orgadmin-sdk.js +10 -0
  58. package/dist/src/sdk/whio-sdk.d.ts +15 -8
  59. package/dist/src/sdk/whio-sdk.js +46 -18
  60. package/dist/src/sdk/whio-superuser-sdk.d.ts +14 -16
  61. package/dist/src/sdk/whio-superuser-sdk.js +11 -16
  62. package/dist/src/sdk/whio-teamadmin-sdk.d.ts +4 -8
  63. package/dist/src/sdk/whio-teamadmin-sdk.js +1 -18
  64. package/package.json +1 -1
  65. package/src/sdk/modules/agent.module.ts +94 -9
  66. package/src/sdk/modules/audio.module.ts +146 -8
  67. package/src/sdk/modules/auth.module.ts +88 -0
  68. package/src/sdk/modules/data-strategy.module.ts +51 -13
  69. package/src/sdk/modules/external-integration.module.ts +30 -0
  70. package/src/sdk/modules/integration-action.module.ts +39 -0
  71. package/src/sdk/modules/log.module.ts +4 -4
  72. package/src/sdk/modules/organization.module.ts +64 -5
  73. package/src/sdk/modules/patient.module.ts +5 -2
  74. package/src/sdk/modules/reports.module.ts +6 -6
  75. package/src/sdk/modules/session/orgadmin-session.module.ts +53 -7
  76. package/src/sdk/modules/session/session.module.ts +64 -2
  77. package/src/sdk/modules/session/superuser-session.module.ts +52 -6
  78. package/src/sdk/modules/session.module.ts +155 -15
  79. package/src/sdk/modules/team.module.ts +58 -9
  80. package/src/sdk/modules/template.module.ts +95 -32
  81. package/src/sdk/modules/transcription-summary.module.ts +62 -8
  82. package/src/sdk/modules/user.module.ts +135 -2
  83. package/src/sdk/modules/websocket.module.ts +26 -8
  84. package/src/sdk/modules/workflow.module.ts +39 -0
  85. package/src/sdk/sdk.ts +12 -37
  86. package/src/sdk/types/agent.types.ts +5 -0
  87. package/src/sdk/types/audio.types.ts +8 -10
  88. package/src/sdk/types/data-strategy.types.ts +3 -0
  89. package/src/sdk/types/external-integration.types.ts +6 -0
  90. package/src/sdk/types/log.types.ts +4 -23
  91. package/src/sdk/types/patient.types.ts +2 -3
  92. package/src/sdk/types/reports.types.ts +1 -1
  93. package/src/sdk/types/session.types.ts +8 -8
  94. package/src/sdk/types/team.types.ts +5 -3
  95. package/src/sdk/types/template.types.ts +18 -7
  96. package/src/sdk/types/user.types.ts +6 -0
  97. package/src/sdk/types/websocket.types.ts +8 -7
  98. package/src/sdk/urls.ts +3 -8
  99. package/src/sdk/whio-orgadmin-sdk.ts +8 -0
  100. package/src/sdk/whio-sdk.ts +39 -16
  101. package/src/sdk/whio-superuser-sdk.ts +9 -16
  102. package/src/sdk/whio-teamadmin-sdk.ts +1 -16
  103. package/tsconfig.json +1 -1
  104. package/src/sdk/modules/debug.module.ts +0 -44
@@ -13,51 +13,112 @@ export class SessionModule extends BaseClient {
13
13
  // ======================
14
14
  // USER METHODS (own sessions only)
15
15
  // ======================
16
+ /**
17
+ * Create a new session.
18
+ *
19
+ * @param sessionData - The session payload to create.
20
+ * @returns The created session.
21
+ */
16
22
  createSession(sessionData) {
17
23
  return __awaiter(this, void 0, void 0, function* () {
18
24
  return this.request(urls.sessions, 'POST', sessionData);
19
25
  });
20
26
  }
27
+ /**
28
+ * Retrieve the authenticated user's own sessions.
29
+ *
30
+ * @returns The current user's sessions.
31
+ */
21
32
  getSessions() {
22
33
  return __awaiter(this, void 0, void 0, function* () {
23
34
  return this.request(`${urls.sessions}/my-sessions`, 'GET');
24
35
  });
25
36
  }
37
+ /**
38
+ * Retrieve a single session by its id.
39
+ *
40
+ * @param id - UUID of the session to fetch.
41
+ * @returns The requested session.
42
+ */
26
43
  getSession(id) {
27
44
  return __awaiter(this, void 0, void 0, function* () {
28
45
  return this.request(`${urls.sessions}/${id}`, 'GET');
29
46
  });
30
47
  }
48
+ /**
49
+ * Update a session.
50
+ *
51
+ * @param id - UUID of the session to update.
52
+ * @param sessionData - Fields to update on the session.
53
+ * @returns The updated session.
54
+ */
31
55
  updateSession(id, sessionData) {
32
56
  return __awaiter(this, void 0, void 0, function* () {
33
57
  return this.request(`${urls.sessions}/${id}`, 'PATCH', sessionData);
34
58
  });
35
59
  }
60
+ /**
61
+ * Delete a session.
62
+ *
63
+ * @param id - UUID of the session to delete.
64
+ * @returns The deleted session.
65
+ */
36
66
  deleteSession(id) {
37
67
  return __awaiter(this, void 0, void 0, function* () {
38
- yield this.request(`${urls.sessions}/${id}`, 'DELETE');
68
+ return this.request(`${urls.sessions}/${id}`, 'DELETE');
39
69
  });
40
70
  }
71
+ /**
72
+ * Set the primary transcription summary for a session.
73
+ *
74
+ * @param sessionId - UUID of the session.
75
+ * @param summaryId - UUID of the transcription summary to mark as primary.
76
+ * @returns The updated session.
77
+ */
41
78
  setPrimaryTranscriptionSummary(sessionId, summaryId) {
42
79
  return __awaiter(this, void 0, void 0, function* () {
43
80
  return this.request(`${urls.sessions}/${sessionId}/primary-summary/${summaryId}`, 'PATCH');
44
81
  });
45
82
  }
83
+ /**
84
+ * Re-run transcription for a session.
85
+ *
86
+ * @param sessionId - UUID of the session to re-transcribe.
87
+ * @returns A confirmation message with the session id.
88
+ */
46
89
  rerunTranscription(sessionId) {
47
90
  return __awaiter(this, void 0, void 0, function* () {
48
91
  return this.request(`${urls.sessions}/${sessionId}/rerun-transcription`, 'POST');
49
92
  });
50
93
  }
94
+ /**
95
+ * Update the audio stream status of a session.
96
+ *
97
+ * @param data - The session id and the new audio stream status.
98
+ * @returns The updated session.
99
+ */
51
100
  setAudioStreamStatus(data) {
52
101
  return __awaiter(this, void 0, void 0, function* () {
53
102
  return this.request(`${urls.sessions}/set-audio-stream-status`, 'PATCH', data);
54
103
  });
55
104
  }
105
+ /**
106
+ * Forward a session to Tiaki.
107
+ *
108
+ * @param sessionId - UUID of the session to forward.
109
+ * @returns A response containing a status message.
110
+ */
56
111
  forwardToTiaki(sessionId) {
57
112
  return __awaiter(this, void 0, void 0, function* () {
58
113
  return this.request(`${urls.sessions}/forward-to-tiaki/${sessionId}`, 'POST');
59
114
  });
60
115
  }
116
+ /**
117
+ * Search the authenticated user's sessions using the provided filters.
118
+ *
119
+ * @param filters - Optional search filters (date range, user, template, pagination, etc.).
120
+ * @returns A paginated search response of matching sessions.
121
+ */
61
122
  searchSessions(filters = {}) {
62
123
  return __awaiter(this, void 0, void 0, function* () {
63
124
  const params = this.buildSearchParams(filters);
@@ -69,11 +130,24 @@ export class SessionModule extends BaseClient {
69
130
  // ======================
70
131
  // SUPERUSER METHODS
71
132
  // ======================
133
+ /**
134
+ * Retrieve all sessions belonging to a specific user (superuser scope).
135
+ *
136
+ * @param userId - UUID of the user whose sessions to fetch.
137
+ * @returns The user's sessions.
138
+ */
72
139
  superuserGetSessionsByUser(userId) {
73
140
  return __awaiter(this, void 0, void 0, function* () {
74
- return this.request(`${urls.sessions}/superuser/user/${userId}`, 'GET');
141
+ return this.request(`${urls.sessions}/user/${userId}`, 'GET');
75
142
  });
76
143
  }
144
+ /**
145
+ * Retrieve a paginated list of sessions for the organization (superuser scope).
146
+ *
147
+ * @param limit - Maximum number of sessions to return (default 100).
148
+ * @param offset - Number of sessions to skip for pagination (default 0).
149
+ * @returns A paginated sessions response.
150
+ */
77
151
  superuserGetSessionsByOrganization(limit = 100, offset = 0) {
78
152
  return __awaiter(this, void 0, void 0, function* () {
79
153
  const params = new URLSearchParams();
@@ -82,66 +156,131 @@ export class SessionModule extends BaseClient {
82
156
  return this.request(`${urls.sessions}/organization?${params.toString()}`, 'GET');
83
157
  });
84
158
  }
159
+ /**
160
+ * Search sessions using the provided filters (superuser scope).
161
+ *
162
+ * @param filters - Optional search filters (date range, user, template, pagination, etc.).
163
+ * @returns A paginated search response of matching sessions.
164
+ */
85
165
  superuserSearchSessions(filters = {}) {
86
166
  return __awaiter(this, void 0, void 0, function* () {
87
167
  const params = this.buildSearchParams(filters);
88
168
  const queryString = params.toString();
89
- const url = queryString ? `${urls.sessions}/superuser/search?${queryString}` : `${urls.sessions}/superuser/search`;
169
+ const url = queryString ? `${urls.sessions}/search?${queryString}` : `${urls.sessions}/search`;
90
170
  return this.request(url, 'GET');
91
171
  });
92
172
  }
173
+ /**
174
+ * Update a session (superuser scope).
175
+ *
176
+ * @param id - UUID of the session to update.
177
+ * @param sessionData - Fields to update on the session.
178
+ * @returns The updated session.
179
+ */
93
180
  superuserUpdateSession(id, sessionData) {
94
181
  return __awaiter(this, void 0, void 0, function* () {
95
- return this.request(`${urls.sessions}/superuser/${id}`, 'PATCH', sessionData);
182
+ return this.request(`${urls.sessions}/${id}`, 'PATCH', sessionData);
96
183
  });
97
184
  }
185
+ /**
186
+ * Delete a session (superuser scope).
187
+ *
188
+ * @param id - UUID of the session to delete.
189
+ * @returns The deleted session.
190
+ */
98
191
  superuserDeleteSession(id) {
99
192
  return __awaiter(this, void 0, void 0, function* () {
100
- yield this.request(`${urls.sessions}/superuser/${id}`, 'DELETE');
193
+ return this.request(`${urls.sessions}/${id}`, 'DELETE');
101
194
  });
102
195
  }
196
+ /**
197
+ * Set the primary transcription summary for a session (superuser scope).
198
+ *
199
+ * @param sessionId - UUID of the session.
200
+ * @param summaryId - UUID of the transcription summary to mark as primary.
201
+ * @returns The updated session.
202
+ */
103
203
  superuserSetPrimaryTranscriptionSummary(sessionId, summaryId) {
104
204
  return __awaiter(this, void 0, void 0, function* () {
105
- return this.request(`${urls.sessions}/superuser/${sessionId}/primary-summary/${summaryId}`, 'PATCH');
205
+ return this.request(`${urls.sessions}/${sessionId}/primary-summary/${summaryId}`, 'PATCH');
106
206
  });
107
207
  }
108
208
  // ======================
109
209
  // ORG ADMIN METHODS
110
210
  // ======================
211
+ /**
212
+ * Retrieve all sessions belonging to a specific user (org admin scope).
213
+ *
214
+ * @param userId - UUID of the user whose sessions to fetch.
215
+ * @returns The user's sessions.
216
+ */
111
217
  orgAdminGetSessionsByUser(userId) {
112
218
  return __awaiter(this, void 0, void 0, function* () {
113
- return this.request(`${urls.sessions}/orgadmin/user/${userId}`, 'GET');
219
+ return this.request(`${urls.sessions}/user/${userId}`, 'GET');
114
220
  });
115
221
  }
222
+ /**
223
+ * Retrieve a paginated list of sessions for the organization (org admin scope).
224
+ *
225
+ * @param limit - Maximum number of sessions to return (default 100).
226
+ * @param offset - Number of sessions to skip for pagination (default 0).
227
+ * @returns A paginated sessions response.
228
+ */
116
229
  orgAdminGetSessionsByOrganization(limit = 100, offset = 0) {
117
230
  return __awaiter(this, void 0, void 0, function* () {
118
231
  const params = new URLSearchParams();
119
232
  params.append('limit', limit.toString());
120
233
  params.append('offset', offset.toString());
121
- return this.request(`${urls.sessions}/orgadmin/organization?${params.toString()}`, 'GET');
234
+ return this.request(`${urls.sessions}/organization?${params.toString()}`, 'GET');
122
235
  });
123
236
  }
237
+ /**
238
+ * Search sessions using the provided filters (org admin scope).
239
+ *
240
+ * @param filters - Optional search filters (date range, user, template, pagination, etc.).
241
+ * @returns A paginated search response of matching sessions.
242
+ */
124
243
  orgAdminSearchSessions(filters = {}) {
125
244
  return __awaiter(this, void 0, void 0, function* () {
126
245
  const params = this.buildSearchParams(filters);
127
246
  const queryString = params.toString();
128
- const url = queryString ? `${urls.sessions}/orgadmin/search?${queryString}` : `${urls.sessions}/orgadmin/search`;
247
+ const url = queryString ? `${urls.sessions}/search?${queryString}` : `${urls.sessions}/search`;
129
248
  return this.request(url, 'GET');
130
249
  });
131
250
  }
251
+ /**
252
+ * Update a session (org admin scope).
253
+ *
254
+ * @param id - UUID of the session to update.
255
+ * @param sessionData - Fields to update on the session.
256
+ * @returns The updated session.
257
+ */
132
258
  orgAdminUpdateSession(id, sessionData) {
133
259
  return __awaiter(this, void 0, void 0, function* () {
134
- return this.request(`${urls.sessions}/orgadmin/${id}`, 'PATCH', sessionData);
260
+ return this.request(`${urls.sessions}/${id}`, 'PATCH', sessionData);
135
261
  });
136
262
  }
263
+ /**
264
+ * Delete a session (org admin scope).
265
+ *
266
+ * @param id - UUID of the session to delete.
267
+ * @returns The deleted session.
268
+ */
137
269
  orgAdminDeleteSession(id) {
138
270
  return __awaiter(this, void 0, void 0, function* () {
139
- yield this.request(`${urls.sessions}/orgadmin/${id}`, 'DELETE');
271
+ return this.request(`${urls.sessions}/${id}`, 'DELETE');
140
272
  });
141
273
  }
274
+ /**
275
+ * Set the primary transcription summary for a session (org admin scope).
276
+ *
277
+ * @param sessionId - UUID of the session.
278
+ * @param summaryId - UUID of the transcription summary to mark as primary.
279
+ * @returns The updated session.
280
+ */
142
281
  orgAdminSetPrimaryTranscriptionSummary(sessionId, summaryId) {
143
282
  return __awaiter(this, void 0, void 0, function* () {
144
- return this.request(`${urls.sessions}/orgadmin/${sessionId}/primary-summary/${summaryId}`, 'PATCH');
283
+ return this.request(`${urls.sessions}/${sessionId}/primary-summary/${summaryId}`, 'PATCH');
145
284
  });
146
285
  }
147
286
  // ======================
@@ -167,6 +306,8 @@ export class SessionModule extends BaseClient {
167
306
  params.append('hasSummary', filters.hasSummary.toString());
168
307
  if (filters.includeTranscriptions !== undefined)
169
308
  params.append('includeTranscriptions', filters.includeTranscriptions.toString());
309
+ if (filters.includeArchived !== undefined)
310
+ params.append('includeArchived', filters.includeArchived.toString());
170
311
  if (filters.limit !== undefined)
171
312
  params.append('limit', filters.limit.toString());
172
313
  if (filters.offset !== undefined)
@@ -1,13 +1,65 @@
1
1
  import { BaseClient } from './base-client';
2
- import { Team } from '../types';
2
+ import { Team, TeamRole, TeamRoleName } from '../types';
3
3
  export declare class TeamModule extends BaseClient {
4
+ /**
5
+ * Create a team within the current user's organization.
6
+ *
7
+ * @param name - Display name of the team.
8
+ * @param description - Description of the team.
9
+ * @returns The newly created team.
10
+ */
4
11
  createTeam(name: string, description: string): Promise<Team>;
12
+ /**
13
+ * Update a team's name and description.
14
+ *
15
+ * @param id - UUID of the team to update.
16
+ * @param name - New display name for the team.
17
+ * @param description - New description for the team.
18
+ * @returns The updated team.
19
+ */
5
20
  updateTeam(id: string, name: string, description: string): Promise<Team>;
6
- addUserToTeam(teamId: string, userId: string, roleName: string): Promise<any>;
7
- removeUserFromTeam(teamId: string, userId: string): Promise<void>;
21
+ /**
22
+ * Add a user to a team with the given role.
23
+ *
24
+ * @param teamId - UUID of the team.
25
+ * @param userId - UUID of the user to add.
26
+ * @param roleName - Role to assign within the team.
27
+ * @returns The created team role.
28
+ */
29
+ addUserToTeam(teamId: string, userId: string, roleName: TeamRoleName): Promise<TeamRole>;
30
+ /**
31
+ * Remove a user from a team.
32
+ *
33
+ * @param teamId - UUID of the team.
34
+ * @param userId - UUID of the user to remove.
35
+ * @returns The removed team role.
36
+ */
37
+ removeUserFromTeam(teamId: string, userId: string): Promise<TeamRole>;
38
+ /**
39
+ * List all teams the current user can access.
40
+ *
41
+ * @returns An array of teams.
42
+ */
8
43
  getTeams(): Promise<Team[]>;
44
+ /**
45
+ * Get a single team by ID.
46
+ *
47
+ * @param id - UUID of the team.
48
+ * @returns The requested team.
49
+ */
9
50
  getTeam(id: string): Promise<Team>;
51
+ /**
52
+ * List all teams belonging to an organization.
53
+ *
54
+ * @param organizationId - UUID of the organization.
55
+ * @returns An array of teams in the organization.
56
+ */
10
57
  getTeamsByOrganization(organizationId: string): Promise<Team[]>;
58
+ /**
59
+ * Delete a team by ID.
60
+ *
61
+ * @param id - UUID of the team to delete.
62
+ * @returns A promise that resolves when the team is deleted.
63
+ */
11
64
  deleteTeam(id: string): Promise<void>;
12
- removeUserFromTeamFixed(teamId: string, userId: string): Promise<void>;
13
65
  }
@@ -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 TeamModule extends BaseClient {
13
+ /**
14
+ * Create a team within the current user's organization.
15
+ *
16
+ * @param name - Display name of the team.
17
+ * @param description - Description of the team.
18
+ * @returns The newly created team.
19
+ */
13
20
  createTeam(name, description) {
14
21
  return __awaiter(this, void 0, void 0, function* () {
15
22
  const teamDto = {
@@ -20,6 +27,14 @@ export class TeamModule extends BaseClient {
20
27
  return this.request(urls.teams, 'POST', teamDto);
21
28
  });
22
29
  }
30
+ /**
31
+ * Update a team's name and description.
32
+ *
33
+ * @param id - UUID of the team to update.
34
+ * @param name - New display name for the team.
35
+ * @param description - New description for the team.
36
+ * @returns The updated team.
37
+ */
23
38
  updateTeam(id, name, description) {
24
39
  return __awaiter(this, void 0, void 0, function* () {
25
40
  const teamDto = {
@@ -29,6 +44,14 @@ export class TeamModule extends BaseClient {
29
44
  return this.request(`${urls.teams}/${id}`, 'PATCH', teamDto);
30
45
  });
31
46
  }
47
+ /**
48
+ * Add a user to a team with the given role.
49
+ *
50
+ * @param teamId - UUID of the team.
51
+ * @param userId - UUID of the user to add.
52
+ * @param roleName - Role to assign within the team.
53
+ * @returns The created team role.
54
+ */
32
55
  addUserToTeam(teamId, userId, roleName) {
33
56
  return __awaiter(this, void 0, void 0, function* () {
34
57
  const assignRoleDto = {
@@ -39,34 +62,59 @@ export class TeamModule extends BaseClient {
39
62
  return this.request(urls.teamRoles, 'POST', assignRoleDto);
40
63
  });
41
64
  }
65
+ /**
66
+ * Remove a user from a team.
67
+ *
68
+ * @param teamId - UUID of the team.
69
+ * @param userId - UUID of the user to remove.
70
+ * @returns The removed team role.
71
+ */
42
72
  removeUserFromTeam(teamId, userId) {
43
73
  return __awaiter(this, void 0, void 0, function* () {
44
- yield this.request(`${urls.teamRoles}/user/${userId}/team/${teamId}`, 'DELETE');
74
+ return this.request(`${urls.teamRoles}/user/${userId}/team/${teamId}`, 'DELETE');
45
75
  });
46
76
  }
77
+ /**
78
+ * List all teams the current user can access.
79
+ *
80
+ * @returns An array of teams.
81
+ */
47
82
  getTeams() {
48
83
  return __awaiter(this, void 0, void 0, function* () {
49
84
  return this.request(urls.teams, 'GET');
50
85
  });
51
86
  }
87
+ /**
88
+ * Get a single team by ID.
89
+ *
90
+ * @param id - UUID of the team.
91
+ * @returns The requested team.
92
+ */
52
93
  getTeam(id) {
53
94
  return __awaiter(this, void 0, void 0, function* () {
54
95
  return this.request(`${urls.teams}/${id}`, 'GET');
55
96
  });
56
97
  }
98
+ /**
99
+ * List all teams belonging to an organization.
100
+ *
101
+ * @param organizationId - UUID of the organization.
102
+ * @returns An array of teams in the organization.
103
+ */
57
104
  getTeamsByOrganization(organizationId) {
58
105
  return __awaiter(this, void 0, void 0, function* () {
59
106
  return this.request(`${urls.teams}/organization/${organizationId}`, 'GET');
60
107
  });
61
108
  }
109
+ /**
110
+ * Delete a team by ID.
111
+ *
112
+ * @param id - UUID of the team to delete.
113
+ * @returns A promise that resolves when the team is deleted.
114
+ */
62
115
  deleteTeam(id) {
63
116
  return __awaiter(this, void 0, void 0, function* () {
64
117
  yield this.request(`${urls.teams}/${id}`, 'DELETE');
65
118
  });
66
119
  }
67
- removeUserFromTeamFixed(teamId, userId) {
68
- return __awaiter(this, void 0, void 0, function* () {
69
- yield this.request(`${urls.teamRoles}/user/${userId}/team/${teamId}`, 'DELETE');
70
- });
71
- }
72
120
  }
@@ -1,21 +1,113 @@
1
1
  import { BaseClient } from './base-client';
2
- import { Template, TemplateCategory, TranscriptionAudioUploadResponse, SummaryQueueType } from '../types';
2
+ import { Template, TemplateCategory, SummaryQueueType } from '../types';
3
3
  export declare class TemplateModule extends BaseClient {
4
+ /**
5
+ * Create a template for the current user's organization, defaulting to the first category if none is given.
6
+ *
7
+ * @param title - Title of the template.
8
+ * @param content - Body content of the template.
9
+ * @param categoryId - Optional category UUID; the first available category is used when omitted.
10
+ * @param workflowId - Optional workflow UUID to associate with the template.
11
+ * @param agentId - Optional agent UUID to associate with the template.
12
+ * @param summaryQueueType - Optional queue type (PRIMARY or SECONDARY) for generated summaries.
13
+ * @returns The created template.
14
+ */
4
15
  createTemplate(title: string, content: string, categoryId?: string, workflowId?: string, agentId?: string, summaryQueueType?: SummaryQueueType): Promise<Template>;
16
+ /**
17
+ * Update an existing template.
18
+ *
19
+ * @param title - New title of the template.
20
+ * @param content - New body content of the template.
21
+ * @param id - UUID of the template to update.
22
+ * @param workflowId - Optional workflow UUID to associate with the template.
23
+ * @param agentId - Optional agent UUID to associate with the template.
24
+ * @param summaryQueueType - Optional queue type (PRIMARY or SECONDARY), or null to clear it.
25
+ * @returns The updated template.
26
+ */
5
27
  updateTemplate(title: string, content: string, id: string, workflowId?: string, agentId?: string, summaryQueueType?: SummaryQueueType | null): Promise<Template>;
28
+ /**
29
+ * Retrieve all templates accessible to the current user.
30
+ *
31
+ * @returns An array of templates.
32
+ */
6
33
  getTemplates(): Promise<Template[]>;
34
+ /**
35
+ * Retrieve all templates belonging to the current user's organization.
36
+ *
37
+ * @returns An array of templates.
38
+ */
7
39
  getTemplatesByOrganization(): Promise<Template[]>;
40
+ /**
41
+ * Retrieve a single template by id.
42
+ *
43
+ * @param id - UUID of the template.
44
+ * @returns The requested template.
45
+ */
8
46
  getTemplate(id: string): Promise<Template>;
47
+ /**
48
+ * Delete a template by id.
49
+ *
50
+ * @param id - UUID of the template to delete.
51
+ * @returns A promise that resolves once the template is deleted.
52
+ */
9
53
  deleteTemplate(id: string): Promise<void>;
54
+ /**
55
+ * Replace the full set of integration actions linked to a template.
56
+ *
57
+ * @param templateId - UUID of the template.
58
+ * @param integrationActionIds - The complete list of integration action UUIDs to set.
59
+ * @returns The updated template.
60
+ */
10
61
  setTemplateIntegrationActions(templateId: string, integrationActionIds: string[]): Promise<Template>;
62
+ /**
63
+ * Add integration actions to a template without removing existing ones.
64
+ *
65
+ * @param templateId - UUID of the template.
66
+ * @param integrationActionIds - The integration action UUIDs to add.
67
+ * @returns The updated template.
68
+ */
11
69
  addTemplateIntegrationActions(templateId: string, integrationActionIds: string[]): Promise<Template>;
70
+ /**
71
+ * Remove integration actions from a template.
72
+ *
73
+ * @param templateId - UUID of the template.
74
+ * @param integrationActionIds - The integration action UUIDs to remove.
75
+ * @returns The updated template.
76
+ */
12
77
  removeTemplateIntegrationActions(templateId: string, integrationActionIds: string[]): Promise<Template>;
78
+ /**
79
+ * Retrieve all template categories.
80
+ *
81
+ * @returns An array of template categories.
82
+ */
13
83
  getTemplateCategories(): Promise<TemplateCategory[]>;
84
+ /**
85
+ * Retrieve a single template category by id.
86
+ *
87
+ * @param id - UUID of the template category.
88
+ * @returns The requested template category.
89
+ */
14
90
  getTemplateCategory(id: string): Promise<TemplateCategory>;
91
+ /**
92
+ * Create a template category.
93
+ *
94
+ * @param name - Name of the new category.
95
+ * @returns The created template category.
96
+ */
15
97
  createTemplateCategory(name: string): Promise<TemplateCategory>;
98
+ /**
99
+ * Update a template category's name.
100
+ *
101
+ * @param id - UUID of the template category to update.
102
+ * @param name - New name for the category.
103
+ * @returns The updated template category.
104
+ */
16
105
  updateTemplateCategory(id: string, name: string): Promise<TemplateCategory>;
106
+ /**
107
+ * Delete a template category by id.
108
+ *
109
+ * @param id - UUID of the template category to delete.
110
+ * @returns A promise that resolves once the category is deleted.
111
+ */
17
112
  deleteTemplateCategory(id: string): Promise<void>;
18
- uploadLargeAudioFile(formData: FormData, onProgress?: (percentage: number) => void): Promise<string>;
19
- uploadAudioFile(formData: FormData, onProgress?: (percentage: number) => void): Promise<TranscriptionAudioUploadResponse | null>;
20
- transcribeBase64Audio(base64String: string): Promise<string>;
21
113
  }