whio-api-sdk 1.0.193-bet-staging → 1.0.194-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/agent.module.d.ts +17 -0
- package/dist/src/sdk/modules/agent.module.js +93 -0
- package/dist/src/sdk/modules/audio.module.d.ts +31 -0
- package/dist/src/sdk/modules/audio.module.js +147 -0
- package/dist/src/sdk/modules/auth.module.d.ts +9 -0
- package/dist/src/sdk/modules/auth.module.js +59 -0
- package/dist/src/sdk/modules/base-client.d.ts +25 -0
- package/dist/src/sdk/modules/base-client.js +183 -0
- package/dist/src/sdk/modules/debug.module.d.ts +20 -0
- package/dist/src/sdk/modules/debug.module.js +54 -0
- package/dist/src/sdk/modules/external-integration.module.d.ts +9 -0
- package/dist/src/sdk/modules/external-integration.module.js +38 -0
- package/dist/src/sdk/modules/log.module.d.ts +63 -0
- package/dist/src/sdk/modules/log.module.js +222 -0
- package/dist/src/sdk/modules/organization.module.d.ts +11 -0
- package/dist/src/sdk/modules/organization.module.js +50 -0
- package/dist/src/sdk/modules/session.module.d.ts +16 -0
- package/dist/src/sdk/modules/session.module.js +58 -0
- package/dist/src/sdk/modules/team.module.d.ts +13 -0
- package/dist/src/sdk/modules/team.module.js +72 -0
- package/dist/src/sdk/modules/template.module.d.ts +33 -0
- package/dist/src/sdk/modules/template.module.js +240 -0
- package/dist/src/sdk/modules/user.module.d.ts +17 -0
- package/dist/src/sdk/modules/user.module.js +104 -0
- package/dist/src/sdk/modules/workflow.module.d.ts +10 -0
- package/dist/src/sdk/modules/workflow.module.js +53 -0
- package/dist/src/sdk/sdk.d.ts +167 -211
- package/dist/src/sdk/sdk.js +375 -869
- package/dist/src/sdk/sdk.old.d.ts +222 -0
- package/dist/src/sdk/sdk.old.js +1238 -0
- package/dist/src/sdk/types/agent.types.d.ts +51 -0
- package/dist/src/sdk/types/agent.types.js +1 -0
- package/dist/src/sdk/types/audio.types.d.ts +72 -0
- package/dist/src/sdk/types/audio.types.js +8 -0
- package/dist/src/sdk/types/auth.types.d.ts +21 -0
- package/dist/src/sdk/types/auth.types.js +1 -0
- package/dist/src/sdk/types/common.types.d.ts +20 -0
- package/dist/src/sdk/types/common.types.js +9 -0
- package/dist/src/sdk/types/external-integration.types.d.ts +31 -0
- package/dist/src/sdk/types/external-integration.types.js +1 -0
- package/dist/src/sdk/types/index.d.ts +12 -0
- package/dist/src/sdk/types/index.js +13 -0
- package/dist/src/sdk/types/log.types.d.ts +61 -0
- package/dist/src/sdk/types/log.types.js +1 -0
- package/dist/src/sdk/types/organization.types.d.ts +42 -0
- package/dist/src/sdk/types/organization.types.js +6 -0
- package/dist/src/sdk/types/session.types.d.ts +54 -0
- package/dist/src/sdk/types/session.types.js +1 -0
- package/dist/src/sdk/types/team.types.d.ts +39 -0
- package/dist/src/sdk/types/team.types.js +1 -0
- package/dist/src/sdk/types/template.types.d.ts +118 -0
- package/dist/src/sdk/types/template.types.js +1 -0
- package/dist/src/sdk/types/user.types.d.ts +41 -0
- package/dist/src/sdk/types/user.types.js +1 -0
- package/dist/src/sdk/types/workflow.types.d.ts +19 -0
- package/dist/src/sdk/types/workflow.types.js +1 -0
- package/dist/src/sdk/types.d.ts +1 -517
- package/dist/src/sdk/types.js +2 -23
- package/dist/src/sdk/types.old.d.ts +517 -0
- package/dist/src/sdk/types.old.js +23 -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/agent.module.ts +74 -0
- package/src/sdk/modules/audio.module.ts +131 -0
- package/src/sdk/modules/auth.module.ts +53 -0
- package/src/sdk/modules/base-client.ts +214 -0
- package/src/sdk/modules/debug.module.ts +44 -0
- package/src/sdk/modules/external-integration.module.ts +50 -0
- package/src/sdk/modules/log.module.ts +213 -0
- package/src/sdk/modules/organization.module.ts +35 -0
- package/src/sdk/modules/session.module.ts +41 -0
- package/src/sdk/modules/team.module.ts +55 -0
- package/src/sdk/modules/template.module.ts +242 -0
- package/src/sdk/modules/user.module.ts +89 -0
- package/src/sdk/modules/workflow.module.ts +39 -0
- package/src/sdk/sdk.old.ts +1312 -0
- package/src/sdk/sdk.ts +393 -1089
- package/src/sdk/types/agent.types.ts +65 -0
- package/src/sdk/types/audio.types.ts +89 -0
- package/src/sdk/types/auth.types.ts +29 -0
- package/src/sdk/types/common.types.ts +26 -0
- package/src/sdk/types/external-integration.types.ts +37 -0
- package/src/sdk/types/index.ts +13 -0
- package/src/sdk/types/log.types.ts +68 -0
- package/src/sdk/types/organization.types.ts +55 -0
- package/src/sdk/types/session.types.ts +63 -0
- package/src/sdk/types/team.types.ts +48 -0
- package/src/sdk/types/template.types.ts +142 -0
- package/src/sdk/types/user.types.ts +50 -0
- package/src/sdk/types/workflow.types.ts +26 -0
- package/src/sdk/types.old.ts +649 -0
- package/src/sdk/types.ts +2 -649
- package/src/sdk/urls.ts +3 -0
|
@@ -0,0 +1,38 @@
|
|
|
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 ExternalIntegrationModule extends BaseClient {
|
|
13
|
+
createExternalIntegration(data) {
|
|
14
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
15
|
+
return this.request(urls.externalIntegrations, 'POST', data);
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
getExternalIntegrations() {
|
|
19
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
20
|
+
return this.request(urls.externalIntegrations, 'GET');
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
getExternalIntegration(id) {
|
|
24
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
25
|
+
return this.request(`${urls.externalIntegrations}/${id}`, 'GET');
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
updateExternalIntegration(id, data) {
|
|
29
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
30
|
+
return this.request(`${urls.externalIntegrations}/${id}`, 'PATCH', data);
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
deleteExternalIntegration(id) {
|
|
34
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
35
|
+
yield this.request(`${urls.externalIntegrations}/${id}`, 'DELETE');
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { BaseClient } from './base-client';
|
|
2
|
+
import { Log, LogsResponse, LogStats, FilterLogsDto, CreateLogDto } from '../types';
|
|
3
|
+
export declare class LogModule extends BaseClient {
|
|
4
|
+
/**
|
|
5
|
+
* Get logs with advanced filtering options
|
|
6
|
+
*/
|
|
7
|
+
getLogs(filters?: FilterLogsDto): Promise<LogsResponse>;
|
|
8
|
+
/**
|
|
9
|
+
* Get logs for a specific user
|
|
10
|
+
*/
|
|
11
|
+
getLogsByUser(userId: string, limit?: number, offset?: number): Promise<LogsResponse>;
|
|
12
|
+
/**
|
|
13
|
+
* Get logs for a specific controller
|
|
14
|
+
*/
|
|
15
|
+
getLogsByController(controller: string, limit?: number, offset?: number): Promise<LogsResponse>;
|
|
16
|
+
/**
|
|
17
|
+
* Get logs for the current authenticated user
|
|
18
|
+
*/
|
|
19
|
+
getMyLogs(limit?: number, offset?: number): Promise<LogsResponse>;
|
|
20
|
+
/**
|
|
21
|
+
* Get logs within a date range
|
|
22
|
+
*/
|
|
23
|
+
getLogsByDateRange(startDate: string, endDate: string, limit?: number, offset?: number): Promise<LogsResponse>;
|
|
24
|
+
/**
|
|
25
|
+
* Get logging statistics
|
|
26
|
+
*/
|
|
27
|
+
getLogStats(): Promise<LogStats>;
|
|
28
|
+
/**
|
|
29
|
+
* Create a manual log entry (app logs)
|
|
30
|
+
*/
|
|
31
|
+
createLog(logData: CreateLogDto): Promise<Log>;
|
|
32
|
+
/**
|
|
33
|
+
* Convenience methods for different log levels
|
|
34
|
+
*/
|
|
35
|
+
logInfo(message: string, context?: string, action?: string, data?: any): Promise<Log>;
|
|
36
|
+
logError(message: string, context?: string, action?: string, data?: any): Promise<Log>;
|
|
37
|
+
logWarn(message: string, context?: string, action?: string, data?: any): Promise<Log>;
|
|
38
|
+
logDebug(message: string, context?: string, action?: string, data?: any): Promise<Log>;
|
|
39
|
+
/**
|
|
40
|
+
* Get logs by role
|
|
41
|
+
*/
|
|
42
|
+
getLogsByRole(role: string, limit?: number, offset?: number): Promise<LogsResponse>;
|
|
43
|
+
/**
|
|
44
|
+
* Get logs by organization role
|
|
45
|
+
*/
|
|
46
|
+
getLogsByOrganizationRole(organizationRole: string, limit?: number, offset?: number): Promise<LogsResponse>;
|
|
47
|
+
/**
|
|
48
|
+
* Get logs by team role
|
|
49
|
+
*/
|
|
50
|
+
getLogsByTeamRole(teamRole: string, limit?: number, offset?: number): Promise<LogsResponse>;
|
|
51
|
+
/**
|
|
52
|
+
* Get available roles for filtering
|
|
53
|
+
*/
|
|
54
|
+
getAvailableRoles(): Promise<{
|
|
55
|
+
roles: string[];
|
|
56
|
+
organizationRoles: string[];
|
|
57
|
+
teamRoles: string[];
|
|
58
|
+
}>;
|
|
59
|
+
/**
|
|
60
|
+
* Get logs for a specific session ID
|
|
61
|
+
*/
|
|
62
|
+
getSessionLogs(sessionId: string, limit?: number, offset?: number): Promise<LogsResponse>;
|
|
63
|
+
}
|
|
@@ -0,0 +1,222 @@
|
|
|
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 LogModule extends BaseClient {
|
|
13
|
+
/**
|
|
14
|
+
* Get logs with advanced filtering options
|
|
15
|
+
*/
|
|
16
|
+
getLogs(filters) {
|
|
17
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
18
|
+
const params = new URLSearchParams();
|
|
19
|
+
if (filters) {
|
|
20
|
+
Object.entries(filters).forEach(([key, value]) => {
|
|
21
|
+
if (value !== undefined && value !== null) {
|
|
22
|
+
params.append(key, value.toString());
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
const queryString = params.toString();
|
|
27
|
+
const url = queryString ? `${urls.logs}?${queryString}` : urls.logs;
|
|
28
|
+
return this.request(url, 'GET');
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Get logs for a specific user
|
|
33
|
+
*/
|
|
34
|
+
getLogsByUser(userId, limit, offset) {
|
|
35
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
36
|
+
const params = new URLSearchParams();
|
|
37
|
+
if (limit !== undefined)
|
|
38
|
+
params.append('limit', limit.toString());
|
|
39
|
+
if (offset !== undefined)
|
|
40
|
+
params.append('offset', offset.toString());
|
|
41
|
+
const queryString = params.toString();
|
|
42
|
+
const url = queryString ? `${urls.logs}/user/${userId}?${queryString}` : `${urls.logs}/user/${userId}`;
|
|
43
|
+
return this.request(url, 'GET');
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Get logs for a specific controller
|
|
48
|
+
*/
|
|
49
|
+
getLogsByController(controller, limit, offset) {
|
|
50
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
51
|
+
const params = new URLSearchParams();
|
|
52
|
+
if (limit !== undefined)
|
|
53
|
+
params.append('limit', limit.toString());
|
|
54
|
+
if (offset !== undefined)
|
|
55
|
+
params.append('offset', offset.toString());
|
|
56
|
+
const queryString = params.toString();
|
|
57
|
+
const url = queryString ? `${urls.logs}/controller/${controller}?${queryString}` : `${urls.logs}/controller/${controller}`;
|
|
58
|
+
return this.request(url, 'GET');
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Get logs for the current authenticated user
|
|
63
|
+
*/
|
|
64
|
+
getMyLogs(limit, offset) {
|
|
65
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
66
|
+
const params = new URLSearchParams();
|
|
67
|
+
if (limit !== undefined)
|
|
68
|
+
params.append('limit', limit.toString());
|
|
69
|
+
if (offset !== undefined)
|
|
70
|
+
params.append('offset', offset.toString());
|
|
71
|
+
const queryString = params.toString();
|
|
72
|
+
const url = queryString ? `${urls.logs}/my-logs?${queryString}` : `${urls.logs}/my-logs`;
|
|
73
|
+
return this.request(url, 'GET');
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Get logs within a date range
|
|
78
|
+
*/
|
|
79
|
+
getLogsByDateRange(startDate, endDate, limit, offset) {
|
|
80
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
81
|
+
const params = new URLSearchParams();
|
|
82
|
+
params.append('startDate', startDate);
|
|
83
|
+
params.append('endDate', endDate);
|
|
84
|
+
if (limit !== undefined)
|
|
85
|
+
params.append('limit', limit.toString());
|
|
86
|
+
if (offset !== undefined)
|
|
87
|
+
params.append('offset', offset.toString());
|
|
88
|
+
return this.request(`${urls.logs}/date-range?${params.toString()}`, 'GET');
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Get logging statistics
|
|
93
|
+
*/
|
|
94
|
+
getLogStats() {
|
|
95
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
96
|
+
return this.request(`${urls.logs}/stats`, 'GET');
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Create a manual log entry (app logs)
|
|
101
|
+
*/
|
|
102
|
+
createLog(logData) {
|
|
103
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
104
|
+
return this.request(urls.logs, 'POST', logData);
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Convenience methods for different log levels
|
|
109
|
+
*/
|
|
110
|
+
logInfo(message, context, action, data) {
|
|
111
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
112
|
+
return this.createLog({
|
|
113
|
+
level: 'info',
|
|
114
|
+
message,
|
|
115
|
+
context,
|
|
116
|
+
action,
|
|
117
|
+
data,
|
|
118
|
+
});
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
logError(message, context, action, data) {
|
|
122
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
123
|
+
return this.createLog({
|
|
124
|
+
level: 'error',
|
|
125
|
+
message,
|
|
126
|
+
context,
|
|
127
|
+
action,
|
|
128
|
+
data,
|
|
129
|
+
});
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
logWarn(message, context, action, data) {
|
|
133
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
134
|
+
return this.createLog({
|
|
135
|
+
level: 'warn',
|
|
136
|
+
message,
|
|
137
|
+
context,
|
|
138
|
+
action,
|
|
139
|
+
data,
|
|
140
|
+
});
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
logDebug(message, context, action, data) {
|
|
144
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
145
|
+
return this.createLog({
|
|
146
|
+
level: 'debug',
|
|
147
|
+
message,
|
|
148
|
+
context,
|
|
149
|
+
action,
|
|
150
|
+
data,
|
|
151
|
+
});
|
|
152
|
+
});
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* Get logs by role
|
|
156
|
+
*/
|
|
157
|
+
getLogsByRole(role, limit, offset) {
|
|
158
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
159
|
+
const params = new URLSearchParams();
|
|
160
|
+
if (limit !== undefined)
|
|
161
|
+
params.append('limit', limit.toString());
|
|
162
|
+
if (offset !== undefined)
|
|
163
|
+
params.append('offset', offset.toString());
|
|
164
|
+
const queryString = params.toString();
|
|
165
|
+
const url = queryString ? `${urls.logs}/role/${role}?${queryString}` : `${urls.logs}/role/${role}`;
|
|
166
|
+
return this.request(url, 'GET');
|
|
167
|
+
});
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
* Get logs by organization role
|
|
171
|
+
*/
|
|
172
|
+
getLogsByOrganizationRole(organizationRole, limit, offset) {
|
|
173
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
174
|
+
const params = new URLSearchParams();
|
|
175
|
+
if (limit !== undefined)
|
|
176
|
+
params.append('limit', limit.toString());
|
|
177
|
+
if (offset !== undefined)
|
|
178
|
+
params.append('offset', offset.toString());
|
|
179
|
+
const queryString = params.toString();
|
|
180
|
+
const url = queryString ? `${urls.logs}/organization-role/${organizationRole}?${queryString}` : `${urls.logs}/organization-role/${organizationRole}`;
|
|
181
|
+
return this.request(url, 'GET');
|
|
182
|
+
});
|
|
183
|
+
}
|
|
184
|
+
/**
|
|
185
|
+
* Get logs by team role
|
|
186
|
+
*/
|
|
187
|
+
getLogsByTeamRole(teamRole, limit, offset) {
|
|
188
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
189
|
+
const params = new URLSearchParams();
|
|
190
|
+
if (limit !== undefined)
|
|
191
|
+
params.append('limit', limit.toString());
|
|
192
|
+
if (offset !== undefined)
|
|
193
|
+
params.append('offset', offset.toString());
|
|
194
|
+
const queryString = params.toString();
|
|
195
|
+
const url = queryString ? `${urls.logs}/team-role/${teamRole}?${queryString}` : `${urls.logs}/team-role/${teamRole}`;
|
|
196
|
+
return this.request(url, 'GET');
|
|
197
|
+
});
|
|
198
|
+
}
|
|
199
|
+
/**
|
|
200
|
+
* Get available roles for filtering
|
|
201
|
+
*/
|
|
202
|
+
getAvailableRoles() {
|
|
203
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
204
|
+
return this.request(`${urls.logs}/available-roles`, 'GET');
|
|
205
|
+
});
|
|
206
|
+
}
|
|
207
|
+
/**
|
|
208
|
+
* Get logs for a specific session ID
|
|
209
|
+
*/
|
|
210
|
+
getSessionLogs(sessionId, limit, offset) {
|
|
211
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
212
|
+
const params = new URLSearchParams();
|
|
213
|
+
if (limit !== undefined)
|
|
214
|
+
params.append('limit', limit.toString());
|
|
215
|
+
if (offset !== undefined)
|
|
216
|
+
params.append('offset', offset.toString());
|
|
217
|
+
const queryString = params.toString();
|
|
218
|
+
const url = queryString ? `${urls.logs}/session/${sessionId}?${queryString}` : `${urls.logs}/session/${sessionId}`;
|
|
219
|
+
return this.request(url, 'GET');
|
|
220
|
+
});
|
|
221
|
+
}
|
|
222
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { BaseClient } from './base-client';
|
|
2
|
+
import { Organization } from '../types';
|
|
3
|
+
export declare class OrganizationModule extends BaseClient {
|
|
4
|
+
createOrganization(name: string, description?: string): Promise<Organization>;
|
|
5
|
+
getOrganizations(): Promise<Organization[]>;
|
|
6
|
+
getOrganization(id: string): Promise<Organization>;
|
|
7
|
+
updateOrganization(id: string, name?: string, description?: string): Promise<Organization>;
|
|
8
|
+
deleteOrganization(id: string): Promise<void>;
|
|
9
|
+
addUserToOrganization(organizationId: string, userId: string): Promise<void>;
|
|
10
|
+
removeUserFromOrganization(organizationId: string, userId: string): Promise<void>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
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 OrganizationModule extends BaseClient {
|
|
13
|
+
createOrganization(name, description) {
|
|
14
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
15
|
+
const dto = { name, description };
|
|
16
|
+
return this.request(urls.organizations, 'POST', dto);
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
getOrganizations() {
|
|
20
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
21
|
+
return this.request(urls.organizations, 'GET');
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
getOrganization(id) {
|
|
25
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
26
|
+
return this.request(`${urls.organizations}/${id}`, 'GET');
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
updateOrganization(id, name, description) {
|
|
30
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
31
|
+
const dto = { name, description };
|
|
32
|
+
return this.request(`${urls.organizations}/${id}`, 'PATCH', dto);
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
deleteOrganization(id) {
|
|
36
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
37
|
+
yield this.request(`${urls.organizations}/${id}`, 'DELETE');
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
addUserToOrganization(organizationId, userId) {
|
|
41
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
42
|
+
yield this.request(`${urls.organizations}/${organizationId}/users/${userId}`, 'POST');
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
removeUserFromOrganization(organizationId, userId) {
|
|
46
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
47
|
+
yield this.request(`${urls.organizations}/${organizationId}/users/${userId}`, 'DELETE');
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { BaseClient } from './base-client';
|
|
2
|
+
import { Session, CreateSessionDto, UpdateSessionDto } from '../types';
|
|
3
|
+
export declare class SessionModule extends BaseClient {
|
|
4
|
+
createSession(sessionData: CreateSessionDto): Promise<Session>;
|
|
5
|
+
getSessions(): Promise<Session[]>;
|
|
6
|
+
getSession(id: string): Promise<Session>;
|
|
7
|
+
getSessionsByUser(userId: string): Promise<Session[]>;
|
|
8
|
+
getSessionsByOrganization(): Promise<Session[]>;
|
|
9
|
+
updateSession(id: string, sessionData: UpdateSessionDto): Promise<Session>;
|
|
10
|
+
deleteSession(id: string): Promise<void>;
|
|
11
|
+
setPrimaryTranscriptionSummary(sessionId: string, summaryId: string): Promise<Session>;
|
|
12
|
+
rerunTranscription(sessionId: string): Promise<{
|
|
13
|
+
message: string;
|
|
14
|
+
sessionId: string;
|
|
15
|
+
}>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
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 SessionModule extends BaseClient {
|
|
13
|
+
createSession(sessionData) {
|
|
14
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
15
|
+
return this.request(urls.sessions, 'POST', sessionData);
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
getSessions() {
|
|
19
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
20
|
+
return this.request(`${urls.sessions}/my-sessions`, 'GET');
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
getSession(id) {
|
|
24
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
25
|
+
return this.request(`${urls.sessions}/${id}`, 'GET');
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
getSessionsByUser(userId) {
|
|
29
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
30
|
+
return this.request(`${urls.sessions}/user/${userId}`, 'GET');
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
getSessionsByOrganization() {
|
|
34
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
35
|
+
return this.request(`${urls.sessions}/organization`, 'GET');
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
updateSession(id, sessionData) {
|
|
39
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
40
|
+
return this.request(`${urls.sessions}/${id}`, 'PATCH', sessionData);
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
deleteSession(id) {
|
|
44
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
45
|
+
yield this.request(`${urls.sessions}/${id}`, 'DELETE');
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
setPrimaryTranscriptionSummary(sessionId, summaryId) {
|
|
49
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
50
|
+
return this.request(`${urls.sessions}/${sessionId}/primary-summary/${summaryId}`, 'PATCH');
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
rerunTranscription(sessionId) {
|
|
54
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
55
|
+
return this.request(`${urls.sessions}/${sessionId}/rerun-transcription`, 'POST');
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { BaseClient } from './base-client';
|
|
2
|
+
import { Team } from '../types';
|
|
3
|
+
export declare class TeamModule extends BaseClient {
|
|
4
|
+
createTeam(name: string, description: string): Promise<Team>;
|
|
5
|
+
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>;
|
|
8
|
+
getTeams(): Promise<Team[]>;
|
|
9
|
+
getTeam(id: string): Promise<Team>;
|
|
10
|
+
getTeamsByOrganization(organizationId: string): Promise<Team[]>;
|
|
11
|
+
deleteTeam(id: string): Promise<void>;
|
|
12
|
+
removeUserFromTeamFixed(teamId: string, userId: string): Promise<void>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
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 TeamModule extends BaseClient {
|
|
13
|
+
createTeam(name, description) {
|
|
14
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
15
|
+
const teamDto = {
|
|
16
|
+
name,
|
|
17
|
+
description,
|
|
18
|
+
organizationId: this.user.organizationId,
|
|
19
|
+
};
|
|
20
|
+
return this.request(urls.teams, 'POST', teamDto);
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
updateTeam(id, name, description) {
|
|
24
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
25
|
+
const teamDto = {
|
|
26
|
+
name,
|
|
27
|
+
description,
|
|
28
|
+
};
|
|
29
|
+
return this.request(`${urls.teams}/${id}`, 'PATCH', teamDto);
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
addUserToTeam(teamId, userId, roleName) {
|
|
33
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
34
|
+
const assignRoleDto = {
|
|
35
|
+
teamId,
|
|
36
|
+
userId,
|
|
37
|
+
name: roleName,
|
|
38
|
+
};
|
|
39
|
+
return this.request(urls.teamRoles, 'POST', assignRoleDto);
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
removeUserFromTeam(teamId, userId) {
|
|
43
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
44
|
+
yield this.request(`${urls.teamRoles}/user/${userId}/team/${teamId}`, 'DELETE');
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
getTeams() {
|
|
48
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
49
|
+
return this.request(urls.teams, 'GET');
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
getTeam(id) {
|
|
53
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
54
|
+
return this.request(`${urls.teams}/${id}`, 'GET');
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
getTeamsByOrganization(organizationId) {
|
|
58
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
59
|
+
return this.request(`${urls.teams}/organization/${organizationId}`, 'GET');
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
deleteTeam(id) {
|
|
63
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
64
|
+
yield this.request(`${urls.teams}/${id}`, 'DELETE');
|
|
65
|
+
});
|
|
66
|
+
}
|
|
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
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { BaseClient } from './base-client';
|
|
2
|
+
import { Template, TemplateCategory, UserTemplate, TranscriptionSummary, TranscriptionAudioUploadResponse } from '../types';
|
|
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>;
|
|
6
|
+
getTemplates(): Promise<Template[]>;
|
|
7
|
+
getTemplatesByOrganization(): Promise<Template[]>;
|
|
8
|
+
getTemplate(id: string): Promise<Template>;
|
|
9
|
+
deleteTemplate(id: string): Promise<void>;
|
|
10
|
+
createUserTemplate(title: string, content: string, originalTemplateId: string | undefined): Promise<UserTemplate>;
|
|
11
|
+
updateUserTemplate(title: string, content: string, id: string): Promise<UserTemplate>;
|
|
12
|
+
getUserTemplates(): Promise<UserTemplate[]>;
|
|
13
|
+
getUserTemplate(id: string): Promise<UserTemplate>;
|
|
14
|
+
deleteUserTemplate(id: string): Promise<void>;
|
|
15
|
+
getTemplateCategories(): Promise<TemplateCategory[]>;
|
|
16
|
+
getTemplateCategory(id: string): Promise<TemplateCategory>;
|
|
17
|
+
createTemplateCategory(name: string): Promise<TemplateCategory>;
|
|
18
|
+
updateTemplateCategory(id: string, name: string): Promise<TemplateCategory>;
|
|
19
|
+
deleteTemplateCategory(id: string): Promise<void>;
|
|
20
|
+
assignTemplateToTeam(teamId: string, templateId: string): Promise<void>;
|
|
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
|
+
deleteTranscriptionSummary(id: string): Promise<void>;
|
|
30
|
+
uploadLargeAudioFile(formData: FormData): Promise<string>;
|
|
31
|
+
uploadAudioFile(formData: FormData): Promise<TranscriptionAudioUploadResponse | null>;
|
|
32
|
+
transcribeBase64Audio(base64String: string): Promise<string>;
|
|
33
|
+
}
|