whio-api-sdk 1.0.204-beta-staging → 1.0.205-beta-staging
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/sdk/modules/template.module.d.ts +1 -10
- package/dist/src/sdk/modules/template.module.js +0 -68
- package/dist/src/sdk/modules/transcription-summary.module.d.ts +13 -0
- package/dist/src/sdk/modules/transcription-summary.module.js +81 -0
- package/dist/src/sdk/sdk.d.ts +11 -8
- package/dist/src/sdk/sdk.js +15 -8
- package/package.json +1 -1
- package/src/sdk/modules/template.module.ts +0 -71
- package/src/sdk/modules/transcription-summary.module.ts +78 -0
- package/src/sdk/sdk.ts +23 -16
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BaseClient } from './base-client';
|
|
2
|
-
import { Template, TemplateCategory, UserTemplate,
|
|
2
|
+
import { Template, TemplateCategory, UserTemplate, TranscriptionAudioUploadResponse } from '../types';
|
|
3
3
|
export declare class TemplateModule extends BaseClient {
|
|
4
4
|
createTemplate(title: string, content: string, categoryId?: string, workflowId?: string, agentId?: string): Promise<Template>;
|
|
5
5
|
updateTemplate(title: string, content: string, id: string, workflowId?: string, agentId?: string): Promise<Template>;
|
|
@@ -19,15 +19,6 @@ export declare class TemplateModule extends BaseClient {
|
|
|
19
19
|
deleteTemplateCategory(id: string): Promise<void>;
|
|
20
20
|
assignTemplateToTeam(teamId: string, templateId: string): Promise<void>;
|
|
21
21
|
removeTemplateFromTeam(teamId: string, templateId: string): Promise<void>;
|
|
22
|
-
generateTranscriptionSummary(templateId: string, sessionId: string): Promise<TranscriptionSummary>;
|
|
23
|
-
generateTranscriptionSummaryFromUserTemplate(userTemplateId: string, sessionId: string): Promise<TranscriptionSummary>;
|
|
24
|
-
updateTranscriptionSummary(id: string, content: string): Promise<TranscriptionSummary>;
|
|
25
|
-
getTranscriptionSummaries(): Promise<TranscriptionSummary[]>;
|
|
26
|
-
getTranscriptionSummary(id: string): Promise<TranscriptionSummary>;
|
|
27
|
-
getTranscriptionSummariesByUser(userId: string): Promise<TranscriptionSummary[]>;
|
|
28
|
-
getByOrganizationTranscriptionSummaries(organizationId: string): Promise<TranscriptionSummary[]>;
|
|
29
|
-
cloneTranscriptionSummary(id: string, content: string): Promise<TranscriptionSummary>;
|
|
30
|
-
deleteTranscriptionSummary(id: string): Promise<void>;
|
|
31
22
|
uploadLargeAudioFile(formData: FormData): Promise<string>;
|
|
32
23
|
uploadAudioFile(formData: FormData): Promise<TranscriptionAudioUploadResponse | null>;
|
|
33
24
|
transcribeBase64Audio(base64String: string): Promise<string>;
|
|
@@ -154,74 +154,6 @@ export class TemplateModule extends BaseClient {
|
|
|
154
154
|
});
|
|
155
155
|
}
|
|
156
156
|
// ======================
|
|
157
|
-
// TRANSCRIPTION SUMMARY METHODS
|
|
158
|
-
// ======================
|
|
159
|
-
generateTranscriptionSummary(templateId, sessionId) {
|
|
160
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
161
|
-
const generateSummaryDto = {
|
|
162
|
-
templateId,
|
|
163
|
-
userId: this.user.id,
|
|
164
|
-
fromUserTemplate: false,
|
|
165
|
-
sessionId: sessionId,
|
|
166
|
-
};
|
|
167
|
-
const transcriptionSummary = yield this.request(urls.transcriptionSummary, 'POST', generateSummaryDto);
|
|
168
|
-
return transcriptionSummary;
|
|
169
|
-
});
|
|
170
|
-
}
|
|
171
|
-
generateTranscriptionSummaryFromUserTemplate(userTemplateId, sessionId) {
|
|
172
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
173
|
-
const generateSummaryDto = {
|
|
174
|
-
templateId: userTemplateId,
|
|
175
|
-
userId: this.user.id,
|
|
176
|
-
fromUserTemplate: true,
|
|
177
|
-
sessionId: sessionId,
|
|
178
|
-
};
|
|
179
|
-
const transcriptionSummary = yield this.request(urls.transcriptionSummary, 'POST', generateSummaryDto);
|
|
180
|
-
return transcriptionSummary;
|
|
181
|
-
});
|
|
182
|
-
}
|
|
183
|
-
updateTranscriptionSummary(id, content) {
|
|
184
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
185
|
-
const updateSummaryDto = {
|
|
186
|
-
content,
|
|
187
|
-
};
|
|
188
|
-
return this.request(`${urls.transcriptionSummary}/${id}`, 'PATCH', updateSummaryDto);
|
|
189
|
-
});
|
|
190
|
-
}
|
|
191
|
-
getTranscriptionSummaries() {
|
|
192
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
193
|
-
return this.request(urls.transcriptionSummaries, 'GET');
|
|
194
|
-
});
|
|
195
|
-
}
|
|
196
|
-
getTranscriptionSummary(id) {
|
|
197
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
198
|
-
return this.request(`${urls.transcriptionSummaries}/${id}`, 'GET');
|
|
199
|
-
});
|
|
200
|
-
}
|
|
201
|
-
getTranscriptionSummariesByUser(userId) {
|
|
202
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
203
|
-
return this.request(`${urls.transcriptionSummaries}/user/${userId}`, 'GET');
|
|
204
|
-
});
|
|
205
|
-
}
|
|
206
|
-
getByOrganizationTranscriptionSummaries(organizationId) {
|
|
207
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
208
|
-
return this.request(`${urls.transcriptionSummaries}/organization/${organizationId}`, 'GET');
|
|
209
|
-
});
|
|
210
|
-
}
|
|
211
|
-
cloneTranscriptionSummary(id, content) {
|
|
212
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
213
|
-
const cloneDto = {
|
|
214
|
-
content,
|
|
215
|
-
};
|
|
216
|
-
return this.request(`${urls.transcriptionSummaries}/${id}/clone`, 'POST', cloneDto);
|
|
217
|
-
});
|
|
218
|
-
}
|
|
219
|
-
deleteTranscriptionSummary(id) {
|
|
220
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
221
|
-
yield this.request(`${urls.transcriptionSummaries}/${id}`, 'DELETE');
|
|
222
|
-
});
|
|
223
|
-
}
|
|
224
|
-
// ======================
|
|
225
157
|
// AUDIO UPLOAD METHODS (for transcription)
|
|
226
158
|
// ======================
|
|
227
159
|
uploadLargeAudioFile(formData) {
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { BaseClient } from './base-client';
|
|
2
|
+
import { TranscriptionSummary } from '../types';
|
|
3
|
+
export declare class TranscriptionSummaryModule extends BaseClient {
|
|
4
|
+
generateTranscriptionSummary(templateId: string, sessionId: string): Promise<TranscriptionSummary>;
|
|
5
|
+
generateTranscriptionSummaryFromUserTemplate(userTemplateId: string, sessionId: string): Promise<TranscriptionSummary>;
|
|
6
|
+
updateTranscriptionSummary(id: string, content: string): Promise<TranscriptionSummary>;
|
|
7
|
+
getTranscriptionSummaries(): Promise<TranscriptionSummary[]>;
|
|
8
|
+
getTranscriptionSummary(id: string): Promise<TranscriptionSummary>;
|
|
9
|
+
getTranscriptionSummariesByUser(userId: string): Promise<TranscriptionSummary[]>;
|
|
10
|
+
getByOrganizationTranscriptionSummaries(organizationId: string): Promise<TranscriptionSummary[]>;
|
|
11
|
+
cloneTranscriptionSummary(id: string, content: string): Promise<TranscriptionSummary>;
|
|
12
|
+
deleteTranscriptionSummary(id: string): Promise<void>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,81 @@
|
|
|
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 './base-client';
|
|
11
|
+
import urls from '../urls';
|
|
12
|
+
export class TranscriptionSummaryModule extends BaseClient {
|
|
13
|
+
// ======================
|
|
14
|
+
// TRANSCRIPTION SUMMARY METHODS
|
|
15
|
+
// ======================
|
|
16
|
+
generateTranscriptionSummary(templateId, sessionId) {
|
|
17
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
18
|
+
const generateSummaryDto = {
|
|
19
|
+
templateId,
|
|
20
|
+
userId: this.user.id,
|
|
21
|
+
fromUserTemplate: false,
|
|
22
|
+
sessionId: sessionId,
|
|
23
|
+
};
|
|
24
|
+
const transcriptionSummary = yield this.request(urls.transcriptionSummary, 'POST', generateSummaryDto);
|
|
25
|
+
return transcriptionSummary;
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
generateTranscriptionSummaryFromUserTemplate(userTemplateId, sessionId) {
|
|
29
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
30
|
+
const generateSummaryDto = {
|
|
31
|
+
templateId: userTemplateId,
|
|
32
|
+
userId: this.user.id,
|
|
33
|
+
fromUserTemplate: true,
|
|
34
|
+
sessionId: sessionId,
|
|
35
|
+
};
|
|
36
|
+
const transcriptionSummary = yield this.request(urls.transcriptionSummary, 'POST', generateSummaryDto);
|
|
37
|
+
return transcriptionSummary;
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
updateTranscriptionSummary(id, content) {
|
|
41
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
42
|
+
const updateSummaryDto = {
|
|
43
|
+
content,
|
|
44
|
+
};
|
|
45
|
+
return this.request(`${urls.transcriptionSummaries}/${id}`, 'PATCH', updateSummaryDto);
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
getTranscriptionSummaries() {
|
|
49
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
50
|
+
return this.request(urls.transcriptionSummaries, 'GET');
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
getTranscriptionSummary(id) {
|
|
54
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
55
|
+
return this.request(`${urls.transcriptionSummaries}/${id}`, 'GET');
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
getTranscriptionSummariesByUser(userId) {
|
|
59
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
60
|
+
return this.request(`${urls.transcriptionSummaries}/user/${userId}`, 'GET');
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
getByOrganizationTranscriptionSummaries(organizationId) {
|
|
64
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
65
|
+
return this.request(`${urls.transcriptionSummaries}/organization/${organizationId}`, 'GET');
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
cloneTranscriptionSummary(id, content) {
|
|
69
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
70
|
+
const cloneDto = {
|
|
71
|
+
content,
|
|
72
|
+
};
|
|
73
|
+
return this.request(`${urls.transcriptionSummaries}/${id}/clone`, 'POST', cloneDto);
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
deleteTranscriptionSummary(id) {
|
|
77
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
78
|
+
yield this.request(`${urls.transcriptionSummaries}/${id}`, 'DELETE');
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
}
|
package/dist/src/sdk/sdk.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ import { UserModule } from './modules/user.module';
|
|
|
5
5
|
import { OrganizationModule } from './modules/organization.module';
|
|
6
6
|
import { TeamModule } from './modules/team.module';
|
|
7
7
|
import { TemplateModule } from './modules/template.module';
|
|
8
|
+
import { TranscriptionSummaryModule } from './modules/transcription-summary.module';
|
|
8
9
|
import { SessionModule } from './modules/session.module';
|
|
9
10
|
import { AgentModule } from './modules/agent.module';
|
|
10
11
|
import { AudioModule } from './modules/audio.module';
|
|
@@ -22,6 +23,7 @@ export declare class ApiSDK extends BaseClient {
|
|
|
22
23
|
readonly organizations: OrganizationModule;
|
|
23
24
|
readonly teams: TeamModule;
|
|
24
25
|
readonly templates: TemplateModule;
|
|
26
|
+
readonly transcriptionSummaries: TranscriptionSummaryModule;
|
|
25
27
|
readonly sessions: SessionModule;
|
|
26
28
|
readonly agents: AgentModule;
|
|
27
29
|
readonly audio: AudioModule;
|
|
@@ -88,14 +90,15 @@ export declare class ApiSDK extends BaseClient {
|
|
|
88
90
|
deleteTemplateCategory(...args: Parameters<TemplateModule['deleteTemplateCategory']>): Promise<void>;
|
|
89
91
|
assignTemplateToTeam(...args: Parameters<TemplateModule['assignTemplateToTeam']>): Promise<void>;
|
|
90
92
|
removeTemplateFromTeam(...args: Parameters<TemplateModule['removeTemplateFromTeam']>): Promise<void>;
|
|
91
|
-
generateTranscriptionSummary(...args: Parameters<
|
|
92
|
-
generateTranscriptionSummaryFromUserTemplate(...args: Parameters<
|
|
93
|
-
updateTranscriptionSummary(...args: Parameters<
|
|
94
|
-
getTranscriptionSummaries(...args: Parameters<
|
|
95
|
-
getTranscriptionSummary(...args: Parameters<
|
|
96
|
-
getTranscriptionSummariesByUser(...args: Parameters<
|
|
97
|
-
getByOrganizationTranscriptionSummaries(...args: Parameters<
|
|
98
|
-
|
|
93
|
+
generateTranscriptionSummary(...args: Parameters<TranscriptionSummaryModule['generateTranscriptionSummary']>): Promise<import("./types").TranscriptionSummary>;
|
|
94
|
+
generateTranscriptionSummaryFromUserTemplate(...args: Parameters<TranscriptionSummaryModule['generateTranscriptionSummaryFromUserTemplate']>): Promise<import("./types").TranscriptionSummary>;
|
|
95
|
+
updateTranscriptionSummary(...args: Parameters<TranscriptionSummaryModule['updateTranscriptionSummary']>): Promise<import("./types").TranscriptionSummary>;
|
|
96
|
+
getTranscriptionSummaries(...args: Parameters<TranscriptionSummaryModule['getTranscriptionSummaries']>): Promise<import("./types").TranscriptionSummary[]>;
|
|
97
|
+
getTranscriptionSummary(...args: Parameters<TranscriptionSummaryModule['getTranscriptionSummary']>): Promise<import("./types").TranscriptionSummary>;
|
|
98
|
+
getTranscriptionSummariesByUser(...args: Parameters<TranscriptionSummaryModule['getTranscriptionSummariesByUser']>): Promise<import("./types").TranscriptionSummary[]>;
|
|
99
|
+
getByOrganizationTranscriptionSummaries(...args: Parameters<TranscriptionSummaryModule['getByOrganizationTranscriptionSummaries']>): Promise<import("./types").TranscriptionSummary[]>;
|
|
100
|
+
cloneTranscriptionSummary(...args: Parameters<TranscriptionSummaryModule['cloneTranscriptionSummary']>): Promise<import("./types").TranscriptionSummary>;
|
|
101
|
+
deleteTranscriptionSummary(...args: Parameters<TranscriptionSummaryModule['deleteTranscriptionSummary']>): Promise<void>;
|
|
99
102
|
uploadLargeAudioFile(...args: Parameters<TemplateModule['uploadLargeAudioFile']>): Promise<string>;
|
|
100
103
|
uploadAudioFile(...args: Parameters<TemplateModule['uploadAudioFile']>): Promise<import("./types").TranscriptionAudioUploadResponse | null>;
|
|
101
104
|
transcribeBase64Audio(...args: Parameters<TemplateModule['transcribeBase64Audio']>): Promise<string>;
|
package/dist/src/sdk/sdk.js
CHANGED
|
@@ -13,6 +13,7 @@ import { UserModule } from './modules/user.module';
|
|
|
13
13
|
import { OrganizationModule } from './modules/organization.module';
|
|
14
14
|
import { TeamModule } from './modules/team.module';
|
|
15
15
|
import { TemplateModule } from './modules/template.module';
|
|
16
|
+
import { TranscriptionSummaryModule } from './modules/transcription-summary.module';
|
|
16
17
|
import { SessionModule } from './modules/session.module';
|
|
17
18
|
import { AgentModule } from './modules/agent.module';
|
|
18
19
|
import { AudioModule } from './modules/audio.module';
|
|
@@ -33,6 +34,7 @@ export class ApiSDK extends BaseClient {
|
|
|
33
34
|
this.organizations = new OrganizationModule(config);
|
|
34
35
|
this.teams = new TeamModule(config);
|
|
35
36
|
this.templates = new TemplateModule(config);
|
|
37
|
+
this.transcriptionSummaries = new TranscriptionSummaryModule(config);
|
|
36
38
|
this.sessions = new SessionModule(config);
|
|
37
39
|
this.agents = new AgentModule(config);
|
|
38
40
|
this.audio = new AudioModule(config);
|
|
@@ -328,42 +330,47 @@ export class ApiSDK extends BaseClient {
|
|
|
328
330
|
}
|
|
329
331
|
generateTranscriptionSummary(...args) {
|
|
330
332
|
return __awaiter(this, void 0, void 0, function* () {
|
|
331
|
-
return this.
|
|
333
|
+
return this.transcriptionSummaries.generateTranscriptionSummary(...args);
|
|
332
334
|
});
|
|
333
335
|
}
|
|
334
336
|
generateTranscriptionSummaryFromUserTemplate(...args) {
|
|
335
337
|
return __awaiter(this, void 0, void 0, function* () {
|
|
336
|
-
return this.
|
|
338
|
+
return this.transcriptionSummaries.generateTranscriptionSummaryFromUserTemplate(...args);
|
|
337
339
|
});
|
|
338
340
|
}
|
|
339
341
|
updateTranscriptionSummary(...args) {
|
|
340
342
|
return __awaiter(this, void 0, void 0, function* () {
|
|
341
|
-
return this.
|
|
343
|
+
return this.transcriptionSummaries.updateTranscriptionSummary(...args);
|
|
342
344
|
});
|
|
343
345
|
}
|
|
344
346
|
getTranscriptionSummaries(...args) {
|
|
345
347
|
return __awaiter(this, void 0, void 0, function* () {
|
|
346
|
-
return this.
|
|
348
|
+
return this.transcriptionSummaries.getTranscriptionSummaries(...args);
|
|
347
349
|
});
|
|
348
350
|
}
|
|
349
351
|
getTranscriptionSummary(...args) {
|
|
350
352
|
return __awaiter(this, void 0, void 0, function* () {
|
|
351
|
-
return this.
|
|
353
|
+
return this.transcriptionSummaries.getTranscriptionSummary(...args);
|
|
352
354
|
});
|
|
353
355
|
}
|
|
354
356
|
getTranscriptionSummariesByUser(...args) {
|
|
355
357
|
return __awaiter(this, void 0, void 0, function* () {
|
|
356
|
-
return this.
|
|
358
|
+
return this.transcriptionSummaries.getTranscriptionSummariesByUser(...args);
|
|
357
359
|
});
|
|
358
360
|
}
|
|
359
361
|
getByOrganizationTranscriptionSummaries(...args) {
|
|
360
362
|
return __awaiter(this, void 0, void 0, function* () {
|
|
361
|
-
return this.
|
|
363
|
+
return this.transcriptionSummaries.getByOrganizationTranscriptionSummaries(...args);
|
|
364
|
+
});
|
|
365
|
+
}
|
|
366
|
+
cloneTranscriptionSummary(...args) {
|
|
367
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
368
|
+
return this.transcriptionSummaries.cloneTranscriptionSummary(...args);
|
|
362
369
|
});
|
|
363
370
|
}
|
|
364
371
|
deleteTranscriptionSummary(...args) {
|
|
365
372
|
return __awaiter(this, void 0, void 0, function* () {
|
|
366
|
-
return this.
|
|
373
|
+
return this.transcriptionSummaries.deleteTranscriptionSummary(...args);
|
|
367
374
|
});
|
|
368
375
|
}
|
|
369
376
|
uploadLargeAudioFile(...args) {
|
package/package.json
CHANGED
|
@@ -3,7 +3,6 @@ import {
|
|
|
3
3
|
Template,
|
|
4
4
|
TemplateCategory,
|
|
5
5
|
UserTemplate,
|
|
6
|
-
TranscriptionSummary,
|
|
7
6
|
CreateTemplateDto,
|
|
8
7
|
UpdateTemplateDto,
|
|
9
8
|
CreateUserTemplateDto,
|
|
@@ -11,9 +10,6 @@ import {
|
|
|
11
10
|
CreateTemplateCategoryDto,
|
|
12
11
|
UpdateTemplateCategoryDto,
|
|
13
12
|
AssignTeamTemplateDto,
|
|
14
|
-
GenerateTranscriptionSummaryDto,
|
|
15
|
-
UpdateTranscriptionSummaryDto,
|
|
16
|
-
CloneTranscriptionSummaryDto,
|
|
17
13
|
TranscriptionAudioUploadResponse,
|
|
18
14
|
} from '../types';
|
|
19
15
|
import urls from '../urls';
|
|
@@ -151,73 +147,6 @@ export class TemplateModule extends BaseClient {
|
|
|
151
147
|
await this.request(`${urls.teamTemplates}/team/${teamId}/template/${templateId}`, 'DELETE');
|
|
152
148
|
}
|
|
153
149
|
|
|
154
|
-
// ======================
|
|
155
|
-
// TRANSCRIPTION SUMMARY METHODS
|
|
156
|
-
// ======================
|
|
157
|
-
|
|
158
|
-
public async generateTranscriptionSummary(templateId: string, sessionId: string): Promise<TranscriptionSummary> {
|
|
159
|
-
const generateSummaryDto: GenerateTranscriptionSummaryDto = {
|
|
160
|
-
templateId,
|
|
161
|
-
userId: this.user!.id,
|
|
162
|
-
fromUserTemplate: false,
|
|
163
|
-
sessionId: sessionId,
|
|
164
|
-
};
|
|
165
|
-
const transcriptionSummary: TranscriptionSummary = await this.request(
|
|
166
|
-
urls.transcriptionSummary,
|
|
167
|
-
'POST',
|
|
168
|
-
generateSummaryDto
|
|
169
|
-
);
|
|
170
|
-
return transcriptionSummary;
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
public async generateTranscriptionSummaryFromUserTemplate(userTemplateId: string, sessionId: string): Promise<TranscriptionSummary> {
|
|
174
|
-
const generateSummaryDto: GenerateTranscriptionSummaryDto = {
|
|
175
|
-
templateId: userTemplateId,
|
|
176
|
-
userId: this.user!.id,
|
|
177
|
-
fromUserTemplate: true,
|
|
178
|
-
sessionId: sessionId,
|
|
179
|
-
};
|
|
180
|
-
const transcriptionSummary: TranscriptionSummary = await this.request(
|
|
181
|
-
urls.transcriptionSummary,
|
|
182
|
-
'POST',
|
|
183
|
-
generateSummaryDto
|
|
184
|
-
);
|
|
185
|
-
return transcriptionSummary;
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
public async updateTranscriptionSummary(id: string, content: string): Promise<TranscriptionSummary> {
|
|
189
|
-
const updateSummaryDto: UpdateTranscriptionSummaryDto = {
|
|
190
|
-
content,
|
|
191
|
-
};
|
|
192
|
-
return this.request<TranscriptionSummary>(`${urls.transcriptionSummary}/${id}`, 'PATCH', updateSummaryDto);
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
public async getTranscriptionSummaries(): Promise<TranscriptionSummary[]> {
|
|
196
|
-
return this.request<TranscriptionSummary[]>(urls.transcriptionSummaries, 'GET');
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
public async getTranscriptionSummary(id: string): Promise<TranscriptionSummary> {
|
|
200
|
-
return this.request<TranscriptionSummary>(`${urls.transcriptionSummaries}/${id}`, 'GET');
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
public async getTranscriptionSummariesByUser(userId: string): Promise<TranscriptionSummary[]> {
|
|
204
|
-
return this.request<TranscriptionSummary[]>(`${urls.transcriptionSummaries}/user/${userId}`, 'GET');
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
public async getByOrganizationTranscriptionSummaries(organizationId: string): Promise<TranscriptionSummary[]> {
|
|
208
|
-
return this.request<TranscriptionSummary[]>(`${urls.transcriptionSummaries}/organization/${organizationId}`, 'GET');
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
public async cloneTranscriptionSummary(id: string, content: string): Promise<TranscriptionSummary> {
|
|
212
|
-
const cloneDto: CloneTranscriptionSummaryDto = {
|
|
213
|
-
content,
|
|
214
|
-
};
|
|
215
|
-
return this.request<TranscriptionSummary>(`${urls.transcriptionSummaries}/${id}/clone`, 'POST', cloneDto);
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
public async deleteTranscriptionSummary(id: string): Promise<void> {
|
|
219
|
-
await this.request(`${urls.transcriptionSummaries}/${id}`, 'DELETE');
|
|
220
|
-
}
|
|
221
150
|
|
|
222
151
|
// ======================
|
|
223
152
|
// AUDIO UPLOAD METHODS (for transcription)
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { BaseClient } from './base-client';
|
|
2
|
+
import {
|
|
3
|
+
TranscriptionSummary,
|
|
4
|
+
GenerateTranscriptionSummaryDto,
|
|
5
|
+
UpdateTranscriptionSummaryDto,
|
|
6
|
+
CloneTranscriptionSummaryDto,
|
|
7
|
+
} from '../types';
|
|
8
|
+
import urls from '../urls';
|
|
9
|
+
|
|
10
|
+
export class TranscriptionSummaryModule extends BaseClient {
|
|
11
|
+
// ======================
|
|
12
|
+
// TRANSCRIPTION SUMMARY METHODS
|
|
13
|
+
// ======================
|
|
14
|
+
|
|
15
|
+
public async generateTranscriptionSummary(templateId: string, sessionId: string): Promise<TranscriptionSummary> {
|
|
16
|
+
const generateSummaryDto: GenerateTranscriptionSummaryDto = {
|
|
17
|
+
templateId,
|
|
18
|
+
userId: this.user!.id,
|
|
19
|
+
fromUserTemplate: false,
|
|
20
|
+
sessionId: sessionId,
|
|
21
|
+
};
|
|
22
|
+
const transcriptionSummary: TranscriptionSummary = await this.request(
|
|
23
|
+
urls.transcriptionSummary,
|
|
24
|
+
'POST',
|
|
25
|
+
generateSummaryDto
|
|
26
|
+
);
|
|
27
|
+
return transcriptionSummary;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
public async generateTranscriptionSummaryFromUserTemplate(userTemplateId: string, sessionId: string): Promise<TranscriptionSummary> {
|
|
31
|
+
const generateSummaryDto: GenerateTranscriptionSummaryDto = {
|
|
32
|
+
templateId: userTemplateId,
|
|
33
|
+
userId: this.user!.id,
|
|
34
|
+
fromUserTemplate: true,
|
|
35
|
+
sessionId: sessionId,
|
|
36
|
+
};
|
|
37
|
+
const transcriptionSummary: TranscriptionSummary = await this.request(
|
|
38
|
+
urls.transcriptionSummary,
|
|
39
|
+
'POST',
|
|
40
|
+
generateSummaryDto
|
|
41
|
+
);
|
|
42
|
+
return transcriptionSummary;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
public async updateTranscriptionSummary(id: string, content: string): Promise<TranscriptionSummary> {
|
|
46
|
+
const updateSummaryDto: UpdateTranscriptionSummaryDto = {
|
|
47
|
+
content,
|
|
48
|
+
};
|
|
49
|
+
return this.request<TranscriptionSummary>(`${urls.transcriptionSummaries}/${id}`, 'PATCH', updateSummaryDto);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
public async getTranscriptionSummaries(): Promise<TranscriptionSummary[]> {
|
|
53
|
+
return this.request<TranscriptionSummary[]>(urls.transcriptionSummaries, 'GET');
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
public async getTranscriptionSummary(id: string): Promise<TranscriptionSummary> {
|
|
57
|
+
return this.request<TranscriptionSummary>(`${urls.transcriptionSummaries}/${id}`, 'GET');
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
public async getTranscriptionSummariesByUser(userId: string): Promise<TranscriptionSummary[]> {
|
|
61
|
+
return this.request<TranscriptionSummary[]>(`${urls.transcriptionSummaries}/user/${userId}`, 'GET');
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
public async getByOrganizationTranscriptionSummaries(organizationId: string): Promise<TranscriptionSummary[]> {
|
|
65
|
+
return this.request<TranscriptionSummary[]>(`${urls.transcriptionSummaries}/organization/${organizationId}`, 'GET');
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
public async cloneTranscriptionSummary(id: string, content: string): Promise<TranscriptionSummary> {
|
|
69
|
+
const cloneDto: CloneTranscriptionSummaryDto = {
|
|
70
|
+
content,
|
|
71
|
+
};
|
|
72
|
+
return this.request<TranscriptionSummary>(`${urls.transcriptionSummaries}/${id}/clone`, 'POST', cloneDto);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
public async deleteTranscriptionSummary(id: string): Promise<void> {
|
|
76
|
+
await this.request(`${urls.transcriptionSummaries}/${id}`, 'DELETE');
|
|
77
|
+
}
|
|
78
|
+
}
|
package/src/sdk/sdk.ts
CHANGED
|
@@ -6,6 +6,7 @@ import { UserModule } from './modules/user.module';
|
|
|
6
6
|
import { OrganizationModule } from './modules/organization.module';
|
|
7
7
|
import { TeamModule } from './modules/team.module';
|
|
8
8
|
import { TemplateModule } from './modules/template.module';
|
|
9
|
+
import { TranscriptionSummaryModule } from './modules/transcription-summary.module';
|
|
9
10
|
import { SessionModule } from './modules/session.module';
|
|
10
11
|
import { AgentModule } from './modules/agent.module';
|
|
11
12
|
import { AudioModule } from './modules/audio.module';
|
|
@@ -24,6 +25,7 @@ export class ApiSDK extends BaseClient {
|
|
|
24
25
|
public readonly organizations: OrganizationModule;
|
|
25
26
|
public readonly teams: TeamModule;
|
|
26
27
|
public readonly templates: TemplateModule;
|
|
28
|
+
public readonly transcriptionSummaries: TranscriptionSummaryModule;
|
|
27
29
|
public readonly sessions: SessionModule;
|
|
28
30
|
public readonly agents: AgentModule;
|
|
29
31
|
public readonly audio: AudioModule;
|
|
@@ -42,6 +44,7 @@ export class ApiSDK extends BaseClient {
|
|
|
42
44
|
this.organizations = new OrganizationModule(config);
|
|
43
45
|
this.teams = new TeamModule(config);
|
|
44
46
|
this.templates = new TemplateModule(config);
|
|
47
|
+
this.transcriptionSummaries = new TranscriptionSummaryModule(config);
|
|
45
48
|
this.sessions = new SessionModule(config);
|
|
46
49
|
this.agents = new AgentModule(config);
|
|
47
50
|
this.audio = new AudioModule(config);
|
|
@@ -282,36 +285,40 @@ export class ApiSDK extends BaseClient {
|
|
|
282
285
|
return this.templates.removeTemplateFromTeam(...args);
|
|
283
286
|
}
|
|
284
287
|
|
|
285
|
-
public async generateTranscriptionSummary(...args: Parameters<
|
|
286
|
-
return this.
|
|
288
|
+
public async generateTranscriptionSummary(...args: Parameters<TranscriptionSummaryModule['generateTranscriptionSummary']>) {
|
|
289
|
+
return this.transcriptionSummaries.generateTranscriptionSummary(...args);
|
|
287
290
|
}
|
|
288
291
|
|
|
289
|
-
public async generateTranscriptionSummaryFromUserTemplate(...args: Parameters<
|
|
290
|
-
return this.
|
|
292
|
+
public async generateTranscriptionSummaryFromUserTemplate(...args: Parameters<TranscriptionSummaryModule['generateTranscriptionSummaryFromUserTemplate']>) {
|
|
293
|
+
return this.transcriptionSummaries.generateTranscriptionSummaryFromUserTemplate(...args);
|
|
291
294
|
}
|
|
292
295
|
|
|
293
|
-
public async updateTranscriptionSummary(...args: Parameters<
|
|
294
|
-
return this.
|
|
296
|
+
public async updateTranscriptionSummary(...args: Parameters<TranscriptionSummaryModule['updateTranscriptionSummary']>) {
|
|
297
|
+
return this.transcriptionSummaries.updateTranscriptionSummary(...args);
|
|
295
298
|
}
|
|
296
299
|
|
|
297
|
-
public async getTranscriptionSummaries(...args: Parameters<
|
|
298
|
-
return this.
|
|
300
|
+
public async getTranscriptionSummaries(...args: Parameters<TranscriptionSummaryModule['getTranscriptionSummaries']>) {
|
|
301
|
+
return this.transcriptionSummaries.getTranscriptionSummaries(...args);
|
|
299
302
|
}
|
|
300
303
|
|
|
301
|
-
public async getTranscriptionSummary(...args: Parameters<
|
|
302
|
-
return this.
|
|
304
|
+
public async getTranscriptionSummary(...args: Parameters<TranscriptionSummaryModule['getTranscriptionSummary']>) {
|
|
305
|
+
return this.transcriptionSummaries.getTranscriptionSummary(...args);
|
|
303
306
|
}
|
|
304
307
|
|
|
305
|
-
public async getTranscriptionSummariesByUser(...args: Parameters<
|
|
306
|
-
return this.
|
|
308
|
+
public async getTranscriptionSummariesByUser(...args: Parameters<TranscriptionSummaryModule['getTranscriptionSummariesByUser']>) {
|
|
309
|
+
return this.transcriptionSummaries.getTranscriptionSummariesByUser(...args);
|
|
307
310
|
}
|
|
308
311
|
|
|
309
|
-
public async getByOrganizationTranscriptionSummaries(...args: Parameters<
|
|
310
|
-
return this.
|
|
312
|
+
public async getByOrganizationTranscriptionSummaries(...args: Parameters<TranscriptionSummaryModule['getByOrganizationTranscriptionSummaries']>) {
|
|
313
|
+
return this.transcriptionSummaries.getByOrganizationTranscriptionSummaries(...args);
|
|
311
314
|
}
|
|
312
315
|
|
|
313
|
-
public async
|
|
314
|
-
return this.
|
|
316
|
+
public async cloneTranscriptionSummary(...args: Parameters<TranscriptionSummaryModule['cloneTranscriptionSummary']>) {
|
|
317
|
+
return this.transcriptionSummaries.cloneTranscriptionSummary(...args);
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
public async deleteTranscriptionSummary(...args: Parameters<TranscriptionSummaryModule['deleteTranscriptionSummary']>) {
|
|
321
|
+
return this.transcriptionSummaries.deleteTranscriptionSummary(...args);
|
|
315
322
|
}
|
|
316
323
|
|
|
317
324
|
public async uploadLargeAudioFile(...args: Parameters<TemplateModule['uploadLargeAudioFile']>) {
|