whio-api-sdk 1.1.26 → 1.1.28
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.
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { BaseClient } from './base-client';
|
|
2
|
-
import { Template, TemplateCategory, TranscriptionAudioUploadResponse } from '../types';
|
|
2
|
+
import { Template, TemplateCategory, TranscriptionAudioUploadResponse, SummaryQueueType } from '../types';
|
|
3
3
|
export declare class TemplateModule extends BaseClient {
|
|
4
|
-
createTemplate(title: string, content: string, categoryId?: string, workflowId?: string, agentId?: string): Promise<Template>;
|
|
5
|
-
updateTemplate(title: string, content: string, id: string, workflowId?: string, agentId?: string): Promise<Template>;
|
|
4
|
+
createTemplate(title: string, content: string, categoryId?: string, workflowId?: string, agentId?: string, summaryQueueType?: SummaryQueueType): Promise<Template>;
|
|
5
|
+
updateTemplate(title: string, content: string, id: string, workflowId?: string, agentId?: string, summaryQueueType?: SummaryQueueType | null): Promise<Template>;
|
|
6
6
|
getTemplates(): Promise<Template[]>;
|
|
7
7
|
getTemplatesByOrganization(): Promise<Template[]>;
|
|
8
8
|
getTemplate(id: string): Promise<Template>;
|
|
@@ -13,7 +13,7 @@ export class TemplateModule extends BaseClient {
|
|
|
13
13
|
// ======================
|
|
14
14
|
// TEMPLATE METHODS
|
|
15
15
|
// ======================
|
|
16
|
-
createTemplate(title, content, categoryId, workflowId, agentId) {
|
|
16
|
+
createTemplate(title, content, categoryId, workflowId, agentId, summaryQueueType) {
|
|
17
17
|
var _a;
|
|
18
18
|
return __awaiter(this, void 0, void 0, function* () {
|
|
19
19
|
let finalCategoryId = categoryId;
|
|
@@ -33,11 +33,12 @@ export class TemplateModule extends BaseClient {
|
|
|
33
33
|
organizationId: this.user.organizationId,
|
|
34
34
|
workflowId,
|
|
35
35
|
agentId,
|
|
36
|
+
summaryQueueType,
|
|
36
37
|
};
|
|
37
38
|
return this.request(urls.templates, 'POST', createTemplateDto);
|
|
38
39
|
});
|
|
39
40
|
}
|
|
40
|
-
updateTemplate(title, content, id, workflowId, agentId) {
|
|
41
|
+
updateTemplate(title, content, id, workflowId, agentId, summaryQueueType) {
|
|
41
42
|
return __awaiter(this, void 0, void 0, function* () {
|
|
42
43
|
const templateDto = {
|
|
43
44
|
title,
|
|
@@ -46,6 +47,7 @@ export class TemplateModule extends BaseClient {
|
|
|
46
47
|
organizationId: this.user.organizationId,
|
|
47
48
|
workflowId,
|
|
48
49
|
agentId,
|
|
50
|
+
summaryQueueType,
|
|
49
51
|
};
|
|
50
52
|
return this.request(`${urls.templates}/${id}`, 'PATCH', templateDto);
|
|
51
53
|
});
|
|
@@ -54,6 +54,10 @@ export interface WebSocketEvents {
|
|
|
54
54
|
sessionId: string;
|
|
55
55
|
timestamp: string;
|
|
56
56
|
}) => void;
|
|
57
|
+
'summary-failed': (data: {
|
|
58
|
+
sessionId: string;
|
|
59
|
+
timestamp: string;
|
|
60
|
+
}) => void;
|
|
57
61
|
'audio-started': (data: {
|
|
58
62
|
sessionId: string;
|
|
59
63
|
timestamp: string;
|
package/package.json
CHANGED
|
@@ -7,6 +7,7 @@ import {
|
|
|
7
7
|
CreateTemplateCategoryDto,
|
|
8
8
|
UpdateTemplateCategoryDto,
|
|
9
9
|
TranscriptionAudioUploadResponse,
|
|
10
|
+
SummaryQueueType,
|
|
10
11
|
} from '../types';
|
|
11
12
|
import urls from '../urls';
|
|
12
13
|
|
|
@@ -15,7 +16,7 @@ export class TemplateModule extends BaseClient {
|
|
|
15
16
|
// TEMPLATE METHODS
|
|
16
17
|
// ======================
|
|
17
18
|
|
|
18
|
-
public async createTemplate(title: string, content: string, categoryId?: string, workflowId?: string, agentId?: string): Promise<Template> {
|
|
19
|
+
public async createTemplate(title: string, content: string, categoryId?: string, workflowId?: string, agentId?: string, summaryQueueType?: SummaryQueueType): Promise<Template> {
|
|
19
20
|
let finalCategoryId = categoryId;
|
|
20
21
|
if (!finalCategoryId) {
|
|
21
22
|
const templateCategories = await this.request<TemplateCategory[]>(
|
|
@@ -37,11 +38,12 @@ export class TemplateModule extends BaseClient {
|
|
|
37
38
|
organizationId: this.user!.organizationId,
|
|
38
39
|
workflowId,
|
|
39
40
|
agentId,
|
|
41
|
+
summaryQueueType,
|
|
40
42
|
};
|
|
41
43
|
return this.request<Template>(urls.templates, 'POST', createTemplateDto);
|
|
42
44
|
}
|
|
43
45
|
|
|
44
|
-
public async updateTemplate(title: string, content: string, id: string, workflowId?: string, agentId?: string): Promise<Template> {
|
|
46
|
+
public async updateTemplate(title: string, content: string, id: string, workflowId?: string, agentId?: string, summaryQueueType?: SummaryQueueType | null): Promise<Template> {
|
|
45
47
|
const templateDto: UpdateTemplateDto = {
|
|
46
48
|
title,
|
|
47
49
|
content,
|
|
@@ -49,6 +51,7 @@ export class TemplateModule extends BaseClient {
|
|
|
49
51
|
organizationId: this.user!.organizationId,
|
|
50
52
|
workflowId,
|
|
51
53
|
agentId,
|
|
54
|
+
summaryQueueType,
|
|
52
55
|
};
|
|
53
56
|
return this.request<Template>(`${urls.templates}/${id}`, 'PATCH', templateDto);
|
|
54
57
|
}
|
|
@@ -58,6 +58,10 @@ export interface WebSocketEvents {
|
|
|
58
58
|
sessionId: string;
|
|
59
59
|
timestamp: string;
|
|
60
60
|
}) => void;
|
|
61
|
+
'summary-failed': (data: {
|
|
62
|
+
sessionId: string;
|
|
63
|
+
timestamp: string;
|
|
64
|
+
}) => void;
|
|
61
65
|
'audio-started': (data: { sessionId: string; timestamp: string }) => void;
|
|
62
66
|
'audio-stopped': (data: { sessionId: string; timestamp: string }) => void;
|
|
63
67
|
'audio-error': (error: { sessionId: string; error: string }) => void;
|