whio-api-sdk 1.0.188-bet-staging → 1.0.190-bet-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/sdk.d.ts +22 -2
- package/dist/src/sdk/sdk.js +57 -4
- package/dist/src/sdk/types.d.ts +6 -0
- package/package.json +1 -1
- package/src/sdk/sdk.ts +61 -4
- package/src/sdk/types.ts +6 -0
package/dist/src/sdk/sdk.d.ts
CHANGED
|
@@ -93,10 +93,10 @@ export declare class ApiSDK {
|
|
|
93
93
|
message: string;
|
|
94
94
|
sessionId: string;
|
|
95
95
|
}>;
|
|
96
|
-
createAgent(name: string): Promise<Agent>;
|
|
96
|
+
createAgent(name: string, templateTextReplacement?: string): Promise<Agent>;
|
|
97
97
|
getAgents(): Promise<Agent[]>;
|
|
98
98
|
getAgent(id: string): Promise<Agent>;
|
|
99
|
-
updateAgent(id: string, name: string): Promise<Agent>;
|
|
99
|
+
updateAgent(id: string, name: string, templateTextReplacement?: string): Promise<Agent>;
|
|
100
100
|
deleteAgent(id: string): Promise<void>;
|
|
101
101
|
addAgentToOrganization(agentId: string, organizationId: string): Promise<void>;
|
|
102
102
|
removeAgentFromOrganization(agentId: string, organizationId: string): Promise<void>;
|
|
@@ -174,4 +174,24 @@ export declare class ApiSDK {
|
|
|
174
174
|
logError(message: string, context?: string, action?: string, data?: any): Promise<Log>;
|
|
175
175
|
logWarn(message: string, context?: string, action?: string, data?: any): Promise<Log>;
|
|
176
176
|
logDebug(message: string, context?: string, action?: string, data?: any): Promise<Log>;
|
|
177
|
+
/**
|
|
178
|
+
* Get logs by role
|
|
179
|
+
*/
|
|
180
|
+
getLogsByRole(role: string, limit?: number, offset?: number): Promise<LogsResponse>;
|
|
181
|
+
/**
|
|
182
|
+
* Get logs by organization role
|
|
183
|
+
*/
|
|
184
|
+
getLogsByOrganizationRole(organizationRole: string, limit?: number, offset?: number): Promise<LogsResponse>;
|
|
185
|
+
/**
|
|
186
|
+
* Get logs by team role
|
|
187
|
+
*/
|
|
188
|
+
getLogsByTeamRole(teamRole: string, limit?: number, offset?: number): Promise<LogsResponse>;
|
|
189
|
+
/**
|
|
190
|
+
* Get available roles for filtering
|
|
191
|
+
*/
|
|
192
|
+
getAvailableRoles(): Promise<{
|
|
193
|
+
roles: string[];
|
|
194
|
+
organizationRoles: string[];
|
|
195
|
+
teamRoles: string[];
|
|
196
|
+
}>;
|
|
177
197
|
}
|
package/dist/src/sdk/sdk.js
CHANGED
|
@@ -692,9 +692,9 @@ export class ApiSDK {
|
|
|
692
692
|
// ======================
|
|
693
693
|
// AGENT METHODS
|
|
694
694
|
// ======================
|
|
695
|
-
createAgent(name) {
|
|
695
|
+
createAgent(name, templateTextReplacement) {
|
|
696
696
|
return __awaiter(this, void 0, void 0, function* () {
|
|
697
|
-
const dto = { name };
|
|
697
|
+
const dto = { name, templateTextReplacement };
|
|
698
698
|
return this.request(urls.agents, 'POST', dto);
|
|
699
699
|
});
|
|
700
700
|
}
|
|
@@ -708,9 +708,9 @@ export class ApiSDK {
|
|
|
708
708
|
return this.request(`${urls.agents}/${id}`, 'GET');
|
|
709
709
|
});
|
|
710
710
|
}
|
|
711
|
-
updateAgent(id, name) {
|
|
711
|
+
updateAgent(id, name, templateTextReplacement) {
|
|
712
712
|
return __awaiter(this, void 0, void 0, function* () {
|
|
713
|
-
const dto = { name };
|
|
713
|
+
const dto = { name, templateTextReplacement };
|
|
714
714
|
return this.request(`${urls.agents}/${id}`, 'PATCH', dto);
|
|
715
715
|
});
|
|
716
716
|
}
|
|
@@ -1106,4 +1106,57 @@ export class ApiSDK {
|
|
|
1106
1106
|
});
|
|
1107
1107
|
});
|
|
1108
1108
|
}
|
|
1109
|
+
/**
|
|
1110
|
+
* Get logs by role
|
|
1111
|
+
*/
|
|
1112
|
+
getLogsByRole(role, limit, offset) {
|
|
1113
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1114
|
+
const params = new URLSearchParams();
|
|
1115
|
+
if (limit !== undefined)
|
|
1116
|
+
params.append('limit', limit.toString());
|
|
1117
|
+
if (offset !== undefined)
|
|
1118
|
+
params.append('offset', offset.toString());
|
|
1119
|
+
const queryString = params.toString();
|
|
1120
|
+
const url = queryString ? `${urls.logs}/role/${role}?${queryString}` : `${urls.logs}/role/${role}`;
|
|
1121
|
+
return this.request(url, 'GET');
|
|
1122
|
+
});
|
|
1123
|
+
}
|
|
1124
|
+
/**
|
|
1125
|
+
* Get logs by organization role
|
|
1126
|
+
*/
|
|
1127
|
+
getLogsByOrganizationRole(organizationRole, limit, offset) {
|
|
1128
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1129
|
+
const params = new URLSearchParams();
|
|
1130
|
+
if (limit !== undefined)
|
|
1131
|
+
params.append('limit', limit.toString());
|
|
1132
|
+
if (offset !== undefined)
|
|
1133
|
+
params.append('offset', offset.toString());
|
|
1134
|
+
const queryString = params.toString();
|
|
1135
|
+
const url = queryString ? `${urls.logs}/organization-role/${organizationRole}?${queryString}` : `${urls.logs}/organization-role/${organizationRole}`;
|
|
1136
|
+
return this.request(url, 'GET');
|
|
1137
|
+
});
|
|
1138
|
+
}
|
|
1139
|
+
/**
|
|
1140
|
+
* Get logs by team role
|
|
1141
|
+
*/
|
|
1142
|
+
getLogsByTeamRole(teamRole, limit, offset) {
|
|
1143
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1144
|
+
const params = new URLSearchParams();
|
|
1145
|
+
if (limit !== undefined)
|
|
1146
|
+
params.append('limit', limit.toString());
|
|
1147
|
+
if (offset !== undefined)
|
|
1148
|
+
params.append('offset', offset.toString());
|
|
1149
|
+
const queryString = params.toString();
|
|
1150
|
+
const url = queryString ? `${urls.logs}/team-role/${teamRole}?${queryString}` : `${urls.logs}/team-role/${teamRole}`;
|
|
1151
|
+
return this.request(url, 'GET');
|
|
1152
|
+
});
|
|
1153
|
+
}
|
|
1154
|
+
/**
|
|
1155
|
+
* Get available roles for filtering
|
|
1156
|
+
*/
|
|
1157
|
+
getAvailableRoles() {
|
|
1158
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1159
|
+
return this.request(`${urls.logs}/available-roles`, 'GET');
|
|
1160
|
+
});
|
|
1161
|
+
}
|
|
1109
1162
|
}
|
package/dist/src/sdk/types.d.ts
CHANGED
|
@@ -328,6 +328,7 @@ export interface UpdateSessionDto {
|
|
|
328
328
|
export interface Agent {
|
|
329
329
|
id: string;
|
|
330
330
|
name: string;
|
|
331
|
+
templateTextReplacement?: string;
|
|
331
332
|
createdAt: string;
|
|
332
333
|
updatedAt: string;
|
|
333
334
|
organizations?: AgentOrganization[];
|
|
@@ -341,9 +342,11 @@ export interface AgentOrganization {
|
|
|
341
342
|
}
|
|
342
343
|
export interface CreateAgentDto {
|
|
343
344
|
name: string;
|
|
345
|
+
templateTextReplacement?: string;
|
|
344
346
|
}
|
|
345
347
|
export interface UpdateAgentDto {
|
|
346
348
|
name?: string;
|
|
349
|
+
templateTextReplacement?: string;
|
|
347
350
|
}
|
|
348
351
|
export declare enum AudioFileStatus {
|
|
349
352
|
UPLOADED = "UPLOADED",
|
|
@@ -477,6 +480,9 @@ export interface FilterLogsDto {
|
|
|
477
480
|
userId?: string;
|
|
478
481
|
organizationId?: string;
|
|
479
482
|
level?: 'error' | 'warn' | 'info' | 'debug' | 'verbose';
|
|
483
|
+
role?: string;
|
|
484
|
+
organizationRole?: string;
|
|
485
|
+
teamRole?: string;
|
|
480
486
|
startDate?: string;
|
|
481
487
|
endDate?: string;
|
|
482
488
|
limit?: number;
|
package/package.json
CHANGED
package/src/sdk/sdk.ts
CHANGED
|
@@ -781,8 +781,8 @@ export class ApiSDK {
|
|
|
781
781
|
// AGENT METHODS
|
|
782
782
|
// ======================
|
|
783
783
|
|
|
784
|
-
public async createAgent(name: string): Promise<Agent> {
|
|
785
|
-
const dto: CreateAgentDto = { name };
|
|
784
|
+
public async createAgent(name: string, templateTextReplacement?: string): Promise<Agent> {
|
|
785
|
+
const dto: CreateAgentDto = { name, templateTextReplacement };
|
|
786
786
|
return this.request<Agent>(urls.agents, 'POST', dto);
|
|
787
787
|
}
|
|
788
788
|
|
|
@@ -794,8 +794,8 @@ export class ApiSDK {
|
|
|
794
794
|
return this.request<Agent>(`${urls.agents}/${id}`, 'GET');
|
|
795
795
|
}
|
|
796
796
|
|
|
797
|
-
public async updateAgent(id: string, name: string): Promise<Agent> {
|
|
798
|
-
const dto: UpdateAgentDto = { name };
|
|
797
|
+
public async updateAgent(id: string, name: string, templateTextReplacement?: string): Promise<Agent> {
|
|
798
|
+
const dto: UpdateAgentDto = { name, templateTextReplacement };
|
|
799
799
|
return this.request<Agent>(`${urls.agents}/${id}`, 'PATCH', dto);
|
|
800
800
|
}
|
|
801
801
|
|
|
@@ -1168,4 +1168,61 @@ export class ApiSDK {
|
|
|
1168
1168
|
});
|
|
1169
1169
|
}
|
|
1170
1170
|
|
|
1171
|
+
/**
|
|
1172
|
+
* Get logs by role
|
|
1173
|
+
*/
|
|
1174
|
+
public async getLogsByRole(role: string, limit?: number, offset?: number): Promise<LogsResponse> {
|
|
1175
|
+
const params = new URLSearchParams();
|
|
1176
|
+
if (limit !== undefined) params.append('limit', limit.toString());
|
|
1177
|
+
if (offset !== undefined) params.append('offset', offset.toString());
|
|
1178
|
+
|
|
1179
|
+
const queryString = params.toString();
|
|
1180
|
+
const url = queryString ? `${urls.logs}/role/${role}?${queryString}` : `${urls.logs}/role/${role}`;
|
|
1181
|
+
|
|
1182
|
+
return this.request<LogsResponse>(url, 'GET');
|
|
1183
|
+
}
|
|
1184
|
+
|
|
1185
|
+
/**
|
|
1186
|
+
* Get logs by organization role
|
|
1187
|
+
*/
|
|
1188
|
+
public async getLogsByOrganizationRole(organizationRole: string, limit?: number, offset?: number): Promise<LogsResponse> {
|
|
1189
|
+
const params = new URLSearchParams();
|
|
1190
|
+
if (limit !== undefined) params.append('limit', limit.toString());
|
|
1191
|
+
if (offset !== undefined) params.append('offset', offset.toString());
|
|
1192
|
+
|
|
1193
|
+
const queryString = params.toString();
|
|
1194
|
+
const url = queryString ? `${urls.logs}/organization-role/${organizationRole}?${queryString}` : `${urls.logs}/organization-role/${organizationRole}`;
|
|
1195
|
+
|
|
1196
|
+
return this.request<LogsResponse>(url, 'GET');
|
|
1197
|
+
}
|
|
1198
|
+
|
|
1199
|
+
/**
|
|
1200
|
+
* Get logs by team role
|
|
1201
|
+
*/
|
|
1202
|
+
public async getLogsByTeamRole(teamRole: string, limit?: number, offset?: number): Promise<LogsResponse> {
|
|
1203
|
+
const params = new URLSearchParams();
|
|
1204
|
+
if (limit !== undefined) params.append('limit', limit.toString());
|
|
1205
|
+
if (offset !== undefined) params.append('offset', offset.toString());
|
|
1206
|
+
|
|
1207
|
+
const queryString = params.toString();
|
|
1208
|
+
const url = queryString ? `${urls.logs}/team-role/${teamRole}?${queryString}` : `${urls.logs}/team-role/${teamRole}`;
|
|
1209
|
+
|
|
1210
|
+
return this.request<LogsResponse>(url, 'GET');
|
|
1211
|
+
}
|
|
1212
|
+
|
|
1213
|
+
/**
|
|
1214
|
+
* Get available roles for filtering
|
|
1215
|
+
*/
|
|
1216
|
+
public async getAvailableRoles(): Promise<{
|
|
1217
|
+
roles: string[];
|
|
1218
|
+
organizationRoles: string[];
|
|
1219
|
+
teamRoles: string[];
|
|
1220
|
+
}> {
|
|
1221
|
+
return this.request<{
|
|
1222
|
+
roles: string[];
|
|
1223
|
+
organizationRoles: string[];
|
|
1224
|
+
teamRoles: string[];
|
|
1225
|
+
}>(`${urls.logs}/available-roles`, 'GET');
|
|
1226
|
+
}
|
|
1227
|
+
|
|
1171
1228
|
}
|
package/src/sdk/types.ts
CHANGED
|
@@ -413,6 +413,7 @@ export interface UpdateSessionDto {
|
|
|
413
413
|
export interface Agent {
|
|
414
414
|
id: string;
|
|
415
415
|
name: string;
|
|
416
|
+
templateTextReplacement?: string;
|
|
416
417
|
createdAt: string;
|
|
417
418
|
updatedAt: string;
|
|
418
419
|
organizations?: AgentOrganization[];
|
|
@@ -430,10 +431,12 @@ export interface AgentOrganization {
|
|
|
430
431
|
// Agent DTOs
|
|
431
432
|
export interface CreateAgentDto {
|
|
432
433
|
name: string;
|
|
434
|
+
templateTextReplacement?: string;
|
|
433
435
|
}
|
|
434
436
|
|
|
435
437
|
export interface UpdateAgentDto {
|
|
436
438
|
name?: string;
|
|
439
|
+
templateTextReplacement?: string;
|
|
437
440
|
}
|
|
438
441
|
|
|
439
442
|
// Audio File types
|
|
@@ -606,6 +609,9 @@ export interface FilterLogsDto {
|
|
|
606
609
|
userId?: string;
|
|
607
610
|
organizationId?: string;
|
|
608
611
|
level?: 'error' | 'warn' | 'info' | 'debug' | 'verbose';
|
|
612
|
+
role?: string;
|
|
613
|
+
organizationRole?: string;
|
|
614
|
+
teamRole?: string;
|
|
609
615
|
startDate?: string;
|
|
610
616
|
endDate?: string;
|
|
611
617
|
limit?: number;
|