whio-api-sdk 1.0.237-beta-staging → 1.0.238-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/integration-action.module.d.ts +10 -0
- package/dist/src/sdk/modules/integration-action.module.js +53 -0
- package/dist/src/sdk/modules/log.module.d.ts +6 -1
- package/dist/src/sdk/modules/log.module.js +9 -0
- package/dist/src/sdk/modules/template.module.d.ts +3 -0
- package/dist/src/sdk/modules/template.module.js +18 -0
- package/dist/src/sdk/sdk.d.ts +3 -0
- package/dist/src/sdk/sdk.js +8 -1
- package/dist/src/sdk/types/audio.types.d.ts +0 -8
- package/dist/src/sdk/types/index.d.ts +1 -0
- package/dist/src/sdk/types/index.js +1 -0
- package/dist/src/sdk/types/integration-action.types.d.ts +26 -0
- package/dist/src/sdk/types/integration-action.types.js +1 -0
- package/dist/src/sdk/types/log.types.d.ts +5 -0
- package/dist/src/sdk/types/template.types.d.ts +9 -0
- package/dist/src/sdk/urls.d.ts +1 -0
- package/dist/src/sdk/urls.js +2 -0
- package/package.json +1 -1
- package/src/sdk/modules/integration-action.module.ts +39 -0
- package/src/sdk/modules/log.module.ts +9 -1
- package/src/sdk/modules/template.module.ts +28 -0
- package/src/sdk/sdk.ts +8 -1
- package/src/sdk/types/audio.types.ts +0 -9
- package/src/sdk/types/index.ts +1 -0
- package/src/sdk/types/integration-action.types.ts +35 -0
- package/src/sdk/types/log.types.ts +6 -0
- package/src/sdk/types/template.types.ts +12 -0
- package/src/sdk/urls.ts +3 -0
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { BaseClient } from './base-client';
|
|
2
|
+
import { IntegrationAction } from '../types';
|
|
3
|
+
export declare class IntegrationActionModule extends BaseClient {
|
|
4
|
+
createIntegrationAction(name: string, organizationId?: string): Promise<IntegrationAction>;
|
|
5
|
+
getIntegrationActions(organizationId?: string): Promise<IntegrationAction[]>;
|
|
6
|
+
getIntegrationAction(id: string): Promise<IntegrationAction>;
|
|
7
|
+
getIntegrationActionsByOrganization(organizationId?: string): Promise<IntegrationAction[]>;
|
|
8
|
+
updateIntegrationAction(id: string, name: string, organizationId?: string): Promise<IntegrationAction>;
|
|
9
|
+
deleteIntegrationAction(id: string): Promise<void>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
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 IntegrationActionModule extends BaseClient {
|
|
13
|
+
createIntegrationAction(name, organizationId) {
|
|
14
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
15
|
+
const dto = {
|
|
16
|
+
name,
|
|
17
|
+
organizationId: organizationId || this.user.organizationId,
|
|
18
|
+
};
|
|
19
|
+
return this.request(urls.integrationActions, 'POST', dto);
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
getIntegrationActions(organizationId) {
|
|
23
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
24
|
+
const params = organizationId ? `?organizationId=${organizationId}` : '';
|
|
25
|
+
return this.request(`${urls.integrationActions}${params}`, 'GET');
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
getIntegrationAction(id) {
|
|
29
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
30
|
+
return this.request(`${urls.integrationActions}/${id}`, 'GET');
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
getIntegrationActionsByOrganization(organizationId) {
|
|
34
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
35
|
+
const orgId = organizationId || this.user.organizationId;
|
|
36
|
+
return this.request(`${urls.integrationActions}?organizationId=${orgId}`, 'GET');
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
updateIntegrationAction(id, name, organizationId) {
|
|
40
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
41
|
+
const dto = {
|
|
42
|
+
name,
|
|
43
|
+
organizationId: organizationId || this.user.organizationId,
|
|
44
|
+
};
|
|
45
|
+
return this.request(`${urls.integrationActions}/${id}`, 'PATCH', dto);
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
deleteIntegrationAction(id) {
|
|
49
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
50
|
+
yield this.request(`${urls.integrationActions}/${id}`, 'DELETE');
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BaseClient } from './base-client';
|
|
2
|
-
import { Log, LogsResponse, LogStats, FilterLogsDto, CreateLogDto } from '../types';
|
|
2
|
+
import { Log, LogsResponse, LogStats, FilterLogsDto, CreateLogDto, LogCleanupResponse } from '../types';
|
|
3
3
|
export declare class LogModule extends BaseClient {
|
|
4
4
|
/**
|
|
5
5
|
* Get logs with advanced filtering options
|
|
@@ -60,4 +60,9 @@ export declare class LogModule extends BaseClient {
|
|
|
60
60
|
* Get logs for a specific session ID
|
|
61
61
|
*/
|
|
62
62
|
getSessionLogs(sessionId: string, limit?: number, offset?: number): Promise<LogsResponse>;
|
|
63
|
+
/**
|
|
64
|
+
* Cleanup old logs (superuser only)
|
|
65
|
+
* Deletes all logs older than 10 days from the database
|
|
66
|
+
*/
|
|
67
|
+
cleanupOldLogs(): Promise<LogCleanupResponse>;
|
|
63
68
|
}
|
|
@@ -219,4 +219,13 @@ export class LogModule extends BaseClient {
|
|
|
219
219
|
return this.request(url, 'GET');
|
|
220
220
|
});
|
|
221
221
|
}
|
|
222
|
+
/**
|
|
223
|
+
* Cleanup old logs (superuser only)
|
|
224
|
+
* Deletes all logs older than 10 days from the database
|
|
225
|
+
*/
|
|
226
|
+
cleanupOldLogs() {
|
|
227
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
228
|
+
return this.request(`${urls.logs}/cleanup`, 'POST');
|
|
229
|
+
});
|
|
230
|
+
}
|
|
222
231
|
}
|
|
@@ -7,6 +7,9 @@ export declare class TemplateModule extends BaseClient {
|
|
|
7
7
|
getTemplatesByOrganization(): Promise<Template[]>;
|
|
8
8
|
getTemplate(id: string): Promise<Template>;
|
|
9
9
|
deleteTemplate(id: string): Promise<void>;
|
|
10
|
+
setTemplateIntegrationActions(templateId: string, integrationActionIds: string[]): Promise<Template>;
|
|
11
|
+
addTemplateIntegrationActions(templateId: string, integrationActionIds: string[]): Promise<Template>;
|
|
12
|
+
removeTemplateIntegrationActions(templateId: string, integrationActionIds: string[]): Promise<Template>;
|
|
10
13
|
createUserTemplate(title: string, content: string, originalTemplateId: string | undefined): Promise<UserTemplate>;
|
|
11
14
|
updateUserTemplate(title: string, content: string, id: string): Promise<UserTemplate>;
|
|
12
15
|
getUserTemplates(): Promise<UserTemplate[]>;
|
|
@@ -71,6 +71,24 @@ export class TemplateModule extends BaseClient {
|
|
|
71
71
|
});
|
|
72
72
|
}
|
|
73
73
|
// ======================
|
|
74
|
+
// TEMPLATE INTEGRATION ACTION METHODS
|
|
75
|
+
// ======================
|
|
76
|
+
setTemplateIntegrationActions(templateId, integrationActionIds) {
|
|
77
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
78
|
+
return this.request(`${urls.templates}/${templateId}/integration-actions`, 'PUT', { integrationActionIds });
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
addTemplateIntegrationActions(templateId, integrationActionIds) {
|
|
82
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
83
|
+
return this.request(`${urls.templates}/${templateId}/integration-actions`, 'POST', { integrationActionIds });
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
removeTemplateIntegrationActions(templateId, integrationActionIds) {
|
|
87
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
88
|
+
return this.request(`${urls.templates}/${templateId}/integration-actions`, 'DELETE', { integrationActionIds });
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
// ======================
|
|
74
92
|
// USER TEMPLATE METHODS
|
|
75
93
|
// ======================
|
|
76
94
|
createUserTemplate(title, content, originalTemplateId) {
|
package/dist/src/sdk/sdk.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ import { SessionModule } from './modules/session.module';
|
|
|
10
10
|
import { AgentModule } from './modules/agent.module';
|
|
11
11
|
import { AudioModule } from './modules/audio.module';
|
|
12
12
|
import { WorkflowModule } from './modules/workflow.module';
|
|
13
|
+
import { IntegrationActionModule } from './modules/integration-action.module';
|
|
13
14
|
import { LogModule } from './modules/log.module';
|
|
14
15
|
import { DebugModule } from './modules/debug.module';
|
|
15
16
|
import { ExternalIntegrationModule } from './modules/external-integration.module';
|
|
@@ -30,6 +31,7 @@ export declare class ApiSDK extends BaseClient {
|
|
|
30
31
|
readonly agents: AgentModule;
|
|
31
32
|
readonly audio: AudioModule;
|
|
32
33
|
readonly workflows: WorkflowModule;
|
|
34
|
+
readonly integrationActions: IntegrationActionModule;
|
|
33
35
|
readonly logs: LogModule;
|
|
34
36
|
readonly debug: DebugModule;
|
|
35
37
|
readonly externalIntegrations: ExternalIntegrationModule;
|
|
@@ -195,6 +197,7 @@ export declare class ApiSDK extends BaseClient {
|
|
|
195
197
|
teamRoles: string[];
|
|
196
198
|
}>;
|
|
197
199
|
getSessionLogs(...args: Parameters<LogModule['getSessionLogs']>): Promise<import("./types").LogsResponse>;
|
|
200
|
+
cleanupOldLogs(...args: Parameters<LogModule['cleanupOldLogs']>): Promise<import("./types").LogCleanupResponse>;
|
|
198
201
|
getSessionsWithoutMedicalTranscriptions(...args: Parameters<DebugModule['getSessionsWithoutMedicalTranscriptions']>): Promise<import("./types").DebugSessionSummary[]>;
|
|
199
202
|
downloadSessionAsZip(...args: Parameters<DebugModule['downloadSessionAsZip']>): Promise<Blob>;
|
|
200
203
|
downloadSessionAsZipUrl(...args: Parameters<DebugModule['downloadSessionAsZipUrl']>): Promise<string>;
|
package/dist/src/sdk/sdk.js
CHANGED
|
@@ -18,6 +18,7 @@ import { SessionModule } from './modules/session.module';
|
|
|
18
18
|
import { AgentModule } from './modules/agent.module';
|
|
19
19
|
import { AudioModule } from './modules/audio.module';
|
|
20
20
|
import { WorkflowModule } from './modules/workflow.module';
|
|
21
|
+
import { IntegrationActionModule } from './modules/integration-action.module';
|
|
21
22
|
import { LogModule } from './modules/log.module';
|
|
22
23
|
import { DebugModule } from './modules/debug.module';
|
|
23
24
|
import { ExternalIntegrationModule } from './modules/external-integration.module';
|
|
@@ -42,6 +43,7 @@ export class ApiSDK extends BaseClient {
|
|
|
42
43
|
this.agents = new AgentModule(config);
|
|
43
44
|
this.audio = new AudioModule(config);
|
|
44
45
|
this.workflows = new WorkflowModule(config);
|
|
46
|
+
this.integrationActions = new IntegrationActionModule(config);
|
|
45
47
|
this.logs = new LogModule(config);
|
|
46
48
|
this.debug = new DebugModule(config);
|
|
47
49
|
this.externalIntegrations = new ExternalIntegrationModule(config);
|
|
@@ -52,7 +54,7 @@ export class ApiSDK extends BaseClient {
|
|
|
52
54
|
this.modules = [
|
|
53
55
|
this.auth, this.users, this.organizations, this.teams, this.templates,
|
|
54
56
|
this.transcriptionSummaries, this.sessions, this.agents, this.audio,
|
|
55
|
-
this.workflows, this.logs, this.debug, this.externalIntegrations,
|
|
57
|
+
this.workflows, this.integrationActions, this.logs, this.debug, this.externalIntegrations,
|
|
56
58
|
this.websocket, this.reports, this.patients
|
|
57
59
|
];
|
|
58
60
|
// Auto-initialize the SDK
|
|
@@ -808,6 +810,11 @@ export class ApiSDK extends BaseClient {
|
|
|
808
810
|
return this.logs.getSessionLogs(...args);
|
|
809
811
|
});
|
|
810
812
|
}
|
|
813
|
+
cleanupOldLogs(...args) {
|
|
814
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
815
|
+
return this.logs.cleanupOldLogs(...args);
|
|
816
|
+
});
|
|
817
|
+
}
|
|
811
818
|
// Debug methods
|
|
812
819
|
getSessionsWithoutMedicalTranscriptions(...args) {
|
|
813
820
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -43,14 +43,6 @@ export interface UpdateAudioFileDto {
|
|
|
43
43
|
export interface UploadAudioFileDto {
|
|
44
44
|
cultural_transcription?: string;
|
|
45
45
|
}
|
|
46
|
-
export interface TranscriptionAudioUploadResponse {
|
|
47
|
-
success: boolean;
|
|
48
|
-
transcription: string;
|
|
49
|
-
model_version: string;
|
|
50
|
-
metadata: any[];
|
|
51
|
-
duration: number;
|
|
52
|
-
log: string;
|
|
53
|
-
}
|
|
54
46
|
export interface Base64AudioFile {
|
|
55
47
|
id: string;
|
|
56
48
|
sessionId: string;
|
|
@@ -8,6 +8,7 @@ export * from './agent.types';
|
|
|
8
8
|
export * from './session.types';
|
|
9
9
|
export * from './audio.types';
|
|
10
10
|
export * from './workflow.types';
|
|
11
|
+
export * from './integration-action.types';
|
|
11
12
|
export * from './log.types';
|
|
12
13
|
export * from './external-integration.types';
|
|
13
14
|
export * from './websocket.types';
|
|
@@ -9,6 +9,7 @@ export * from './agent.types';
|
|
|
9
9
|
export * from './session.types';
|
|
10
10
|
export * from './audio.types';
|
|
11
11
|
export * from './workflow.types';
|
|
12
|
+
export * from './integration-action.types';
|
|
12
13
|
export * from './log.types';
|
|
13
14
|
export * from './external-integration.types';
|
|
14
15
|
export * from './websocket.types';
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Organization } from './organization.types';
|
|
2
|
+
import { Template } from './template.types';
|
|
3
|
+
export interface IntegrationAction {
|
|
4
|
+
id: string;
|
|
5
|
+
name: string;
|
|
6
|
+
createdAt: string;
|
|
7
|
+
updatedAt: string;
|
|
8
|
+
organizationId: string;
|
|
9
|
+
organization?: Organization;
|
|
10
|
+
templates?: TemplateIntegrationAction[];
|
|
11
|
+
}
|
|
12
|
+
export interface TemplateIntegrationAction {
|
|
13
|
+
createdAt: string;
|
|
14
|
+
templateId: string;
|
|
15
|
+
integrationActionId: string;
|
|
16
|
+
template?: Template;
|
|
17
|
+
integrationAction?: IntegrationAction;
|
|
18
|
+
}
|
|
19
|
+
export interface CreateIntegrationActionDto {
|
|
20
|
+
name: string;
|
|
21
|
+
organizationId: string;
|
|
22
|
+
}
|
|
23
|
+
export interface UpdateIntegrationActionDto {
|
|
24
|
+
name?: string;
|
|
25
|
+
organizationId: string;
|
|
26
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -40,6 +40,11 @@ export interface CreateLogDto {
|
|
|
40
40
|
data?: any;
|
|
41
41
|
additionalMeta?: Record<string, any>;
|
|
42
42
|
}
|
|
43
|
+
export interface LogCleanupResponse {
|
|
44
|
+
deletedCount: number;
|
|
45
|
+
cutoffDate: string;
|
|
46
|
+
message: string;
|
|
47
|
+
}
|
|
43
48
|
export interface DebugSessionSummary {
|
|
44
49
|
id: string;
|
|
45
50
|
sessionName?: string;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Organization } from './organization.types';
|
|
2
2
|
import { User } from './user.types';
|
|
3
3
|
import { Workflow } from './workflow.types';
|
|
4
|
+
import { TemplateIntegrationAction } from './integration-action.types';
|
|
4
5
|
import { Agent } from './agent.types';
|
|
5
6
|
import { Team } from './team.types';
|
|
6
7
|
export interface TemplateCategory {
|
|
@@ -24,6 +25,7 @@ export interface Template {
|
|
|
24
25
|
createdBy?: User;
|
|
25
26
|
workflow?: Workflow;
|
|
26
27
|
agent?: Agent;
|
|
28
|
+
integrationActions?: TemplateIntegrationAction[];
|
|
27
29
|
userTemplates?: UserTemplate[];
|
|
28
30
|
transcriptionSummaries?: TranscriptionSummary[];
|
|
29
31
|
teamTemplates?: TeamTemplate[];
|
|
@@ -119,3 +121,10 @@ export interface UpdateTranscriptionSummaryDto {
|
|
|
119
121
|
export interface CloneTranscriptionSummaryDto {
|
|
120
122
|
content: string;
|
|
121
123
|
}
|
|
124
|
+
export interface ManageTemplateIntegrationActionsDto {
|
|
125
|
+
integrationActionIds: string[];
|
|
126
|
+
}
|
|
127
|
+
export interface TranscriptionAudioUploadResponse {
|
|
128
|
+
uploadId?: string;
|
|
129
|
+
message?: string;
|
|
130
|
+
}
|
package/dist/src/sdk/urls.d.ts
CHANGED
package/dist/src/sdk/urls.js
CHANGED
package/package.json
CHANGED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { BaseClient } from './base-client';
|
|
2
|
+
import { IntegrationAction, CreateIntegrationActionDto, UpdateIntegrationActionDto } from '../types';
|
|
3
|
+
import urls from '../urls';
|
|
4
|
+
|
|
5
|
+
export class IntegrationActionModule extends BaseClient {
|
|
6
|
+
public async createIntegrationAction(name: string, organizationId?: string): Promise<IntegrationAction> {
|
|
7
|
+
const dto: CreateIntegrationActionDto = {
|
|
8
|
+
name,
|
|
9
|
+
organizationId: organizationId || this.user!.organizationId,
|
|
10
|
+
};
|
|
11
|
+
return this.request<IntegrationAction>(urls.integrationActions, 'POST', dto);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
public async getIntegrationActions(organizationId?: string): Promise<IntegrationAction[]> {
|
|
15
|
+
const params = organizationId ? `?organizationId=${organizationId}` : '';
|
|
16
|
+
return this.request<IntegrationAction[]>(`${urls.integrationActions}${params}`, 'GET');
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
public async getIntegrationAction(id: string): Promise<IntegrationAction> {
|
|
20
|
+
return this.request<IntegrationAction>(`${urls.integrationActions}/${id}`, 'GET');
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
public async getIntegrationActionsByOrganization(organizationId?: string): Promise<IntegrationAction[]> {
|
|
24
|
+
const orgId = organizationId || this.user!.organizationId;
|
|
25
|
+
return this.request<IntegrationAction[]>(`${urls.integrationActions}?organizationId=${orgId}`, 'GET');
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
public async updateIntegrationAction(id: string, name: string, organizationId?: string): Promise<IntegrationAction> {
|
|
29
|
+
const dto: UpdateIntegrationActionDto = {
|
|
30
|
+
name,
|
|
31
|
+
organizationId: organizationId || this.user!.organizationId,
|
|
32
|
+
};
|
|
33
|
+
return this.request<IntegrationAction>(`${urls.integrationActions}/${id}`, 'PATCH', dto);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
public async deleteIntegrationAction(id: string): Promise<void> {
|
|
37
|
+
await this.request(`${urls.integrationActions}/${id}`, 'DELETE');
|
|
38
|
+
}
|
|
39
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BaseClient } from './base-client';
|
|
2
|
-
import { Log, LogsResponse, LogStats, FilterLogsDto, CreateLogDto } from '../types';
|
|
2
|
+
import { Log, LogsResponse, LogStats, FilterLogsDto, CreateLogDto, LogCleanupResponse } from '../types';
|
|
3
3
|
import urls from '../urls';
|
|
4
4
|
|
|
5
5
|
export class LogModule extends BaseClient {
|
|
@@ -210,4 +210,12 @@ export class LogModule extends BaseClient {
|
|
|
210
210
|
|
|
211
211
|
return this.request<LogsResponse>(url, 'GET');
|
|
212
212
|
}
|
|
213
|
+
|
|
214
|
+
/**
|
|
215
|
+
* Cleanup old logs (superuser only)
|
|
216
|
+
* Deletes all logs older than 10 days from the database
|
|
217
|
+
*/
|
|
218
|
+
public async cleanupOldLogs(): Promise<LogCleanupResponse> {
|
|
219
|
+
return this.request<LogCleanupResponse>(`${urls.logs}/cleanup`, 'POST');
|
|
220
|
+
}
|
|
213
221
|
}
|
|
@@ -74,6 +74,34 @@ export class TemplateModule extends BaseClient {
|
|
|
74
74
|
await this.request(`${urls.templates}/${id}`, 'DELETE');
|
|
75
75
|
}
|
|
76
76
|
|
|
77
|
+
// ======================
|
|
78
|
+
// TEMPLATE INTEGRATION ACTION METHODS
|
|
79
|
+
// ======================
|
|
80
|
+
|
|
81
|
+
public async setTemplateIntegrationActions(templateId: string, integrationActionIds: string[]): Promise<Template> {
|
|
82
|
+
return this.request<Template>(
|
|
83
|
+
`${urls.templates}/${templateId}/integration-actions`,
|
|
84
|
+
'PUT',
|
|
85
|
+
{ integrationActionIds }
|
|
86
|
+
);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
public async addTemplateIntegrationActions(templateId: string, integrationActionIds: string[]): Promise<Template> {
|
|
90
|
+
return this.request<Template>(
|
|
91
|
+
`${urls.templates}/${templateId}/integration-actions`,
|
|
92
|
+
'POST',
|
|
93
|
+
{ integrationActionIds }
|
|
94
|
+
);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
public async removeTemplateIntegrationActions(templateId: string, integrationActionIds: string[]): Promise<Template> {
|
|
98
|
+
return this.request<Template>(
|
|
99
|
+
`${urls.templates}/${templateId}/integration-actions`,
|
|
100
|
+
'DELETE',
|
|
101
|
+
{ integrationActionIds }
|
|
102
|
+
);
|
|
103
|
+
}
|
|
104
|
+
|
|
77
105
|
// ======================
|
|
78
106
|
// USER TEMPLATE METHODS
|
|
79
107
|
// ======================
|
package/src/sdk/sdk.ts
CHANGED
|
@@ -11,6 +11,7 @@ import { SessionModule } from './modules/session.module';
|
|
|
11
11
|
import { AgentModule } from './modules/agent.module';
|
|
12
12
|
import { AudioModule } from './modules/audio.module';
|
|
13
13
|
import { WorkflowModule } from './modules/workflow.module';
|
|
14
|
+
import { IntegrationActionModule } from './modules/integration-action.module';
|
|
14
15
|
import { LogModule } from './modules/log.module';
|
|
15
16
|
import { DebugModule } from './modules/debug.module';
|
|
16
17
|
import { ExternalIntegrationModule } from './modules/external-integration.module';
|
|
@@ -32,6 +33,7 @@ export class ApiSDK extends BaseClient {
|
|
|
32
33
|
public readonly agents: AgentModule;
|
|
33
34
|
public readonly audio: AudioModule;
|
|
34
35
|
public readonly workflows: WorkflowModule;
|
|
36
|
+
public readonly integrationActions: IntegrationActionModule;
|
|
35
37
|
public readonly logs: LogModule;
|
|
36
38
|
public readonly debug: DebugModule;
|
|
37
39
|
public readonly externalIntegrations: ExternalIntegrationModule;
|
|
@@ -56,6 +58,7 @@ export class ApiSDK extends BaseClient {
|
|
|
56
58
|
this.agents = new AgentModule(config);
|
|
57
59
|
this.audio = new AudioModule(config);
|
|
58
60
|
this.workflows = new WorkflowModule(config);
|
|
61
|
+
this.integrationActions = new IntegrationActionModule(config);
|
|
59
62
|
this.logs = new LogModule(config);
|
|
60
63
|
this.debug = new DebugModule(config);
|
|
61
64
|
this.externalIntegrations = new ExternalIntegrationModule(config);
|
|
@@ -67,7 +70,7 @@ export class ApiSDK extends BaseClient {
|
|
|
67
70
|
this.modules = [
|
|
68
71
|
this.auth, this.users, this.organizations, this.teams, this.templates,
|
|
69
72
|
this.transcriptionSummaries, this.sessions, this.agents, this.audio,
|
|
70
|
-
this.workflows, this.logs, this.debug, this.externalIntegrations,
|
|
73
|
+
this.workflows, this.integrationActions, this.logs, this.debug, this.externalIntegrations,
|
|
71
74
|
this.websocket, this.reports, this.patients
|
|
72
75
|
];
|
|
73
76
|
|
|
@@ -695,6 +698,10 @@ export class ApiSDK extends BaseClient {
|
|
|
695
698
|
return this.logs.getSessionLogs(...args);
|
|
696
699
|
}
|
|
697
700
|
|
|
701
|
+
public async cleanupOldLogs(...args: Parameters<LogModule['cleanupOldLogs']>) {
|
|
702
|
+
return this.logs.cleanupOldLogs(...args);
|
|
703
|
+
}
|
|
704
|
+
|
|
698
705
|
// Debug methods
|
|
699
706
|
public async getSessionsWithoutMedicalTranscriptions(...args: Parameters<DebugModule['getSessionsWithoutMedicalTranscriptions']>) {
|
|
700
707
|
return this.debug.getSessionsWithoutMedicalTranscriptions(...args);
|
|
@@ -53,15 +53,6 @@ export interface UploadAudioFileDto {
|
|
|
53
53
|
cultural_transcription?: string;
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
-
export interface TranscriptionAudioUploadResponse {
|
|
57
|
-
success: boolean;
|
|
58
|
-
transcription: string;
|
|
59
|
-
model_version: string;
|
|
60
|
-
metadata: any[];
|
|
61
|
-
duration: number;
|
|
62
|
-
log: string;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
56
|
// Base64 Audio File types
|
|
66
57
|
export interface Base64AudioFile {
|
|
67
58
|
id: string;
|
package/src/sdk/types/index.ts
CHANGED
|
@@ -9,6 +9,7 @@ export * from './agent.types';
|
|
|
9
9
|
export * from './session.types';
|
|
10
10
|
export * from './audio.types';
|
|
11
11
|
export * from './workflow.types';
|
|
12
|
+
export * from './integration-action.types';
|
|
12
13
|
export * from './log.types';
|
|
13
14
|
export * from './external-integration.types';
|
|
14
15
|
export * from './websocket.types';
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { Organization } from './organization.types';
|
|
2
|
+
import { Template } from './template.types';
|
|
3
|
+
|
|
4
|
+
// IntegrationAction types
|
|
5
|
+
export interface IntegrationAction {
|
|
6
|
+
id: string;
|
|
7
|
+
name: string;
|
|
8
|
+
createdAt: string;
|
|
9
|
+
updatedAt: string;
|
|
10
|
+
organizationId: string;
|
|
11
|
+
|
|
12
|
+
// Relationships (populated by API)
|
|
13
|
+
organization?: Organization;
|
|
14
|
+
templates?: TemplateIntegrationAction[];
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
// Join table type for many-to-many relationship
|
|
18
|
+
export interface TemplateIntegrationAction {
|
|
19
|
+
createdAt: string;
|
|
20
|
+
templateId: string;
|
|
21
|
+
integrationActionId: string;
|
|
22
|
+
template?: Template;
|
|
23
|
+
integrationAction?: IntegrationAction;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
// IntegrationAction DTOs
|
|
27
|
+
export interface CreateIntegrationActionDto {
|
|
28
|
+
name: string;
|
|
29
|
+
organizationId: string;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export interface UpdateIntegrationActionDto {
|
|
33
|
+
name?: string;
|
|
34
|
+
organizationId: string;
|
|
35
|
+
}
|
|
@@ -46,6 +46,12 @@ export interface CreateLogDto {
|
|
|
46
46
|
additionalMeta?: Record<string, any>;
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
+
export interface LogCleanupResponse {
|
|
50
|
+
deletedCount: number;
|
|
51
|
+
cutoffDate: string;
|
|
52
|
+
message: string;
|
|
53
|
+
}
|
|
54
|
+
|
|
49
55
|
// Debug types
|
|
50
56
|
export interface DebugSessionSummary {
|
|
51
57
|
id: string;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Organization } from './organization.types';
|
|
2
2
|
import { User } from './user.types';
|
|
3
3
|
import { Workflow } from './workflow.types';
|
|
4
|
+
import { IntegrationAction, TemplateIntegrationAction } from './integration-action.types';
|
|
4
5
|
import { Agent } from './agent.types';
|
|
5
6
|
import { Team } from './team.types';
|
|
6
7
|
|
|
@@ -27,6 +28,7 @@ export interface Template {
|
|
|
27
28
|
createdBy?: User;
|
|
28
29
|
workflow?: Workflow;
|
|
29
30
|
agent?: Agent;
|
|
31
|
+
integrationActions?: TemplateIntegrationAction[];
|
|
30
32
|
userTemplates?: UserTemplate[];
|
|
31
33
|
transcriptionSummaries?: TranscriptionSummary[];
|
|
32
34
|
teamTemplates?: TeamTemplate[];
|
|
@@ -144,3 +146,13 @@ export interface UpdateTranscriptionSummaryDto {
|
|
|
144
146
|
export interface CloneTranscriptionSummaryDto {
|
|
145
147
|
content: string;
|
|
146
148
|
}
|
|
149
|
+
|
|
150
|
+
// Template Integration Action DTOs
|
|
151
|
+
export interface ManageTemplateIntegrationActionsDto {
|
|
152
|
+
integrationActionIds: string[];
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
export interface TranscriptionAudioUploadResponse {
|
|
156
|
+
uploadId?: string;
|
|
157
|
+
message?: string;
|
|
158
|
+
}
|