whio-api-sdk 1.0.189-bet-staging → 1.0.191-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 +2 -2
- package/dist/src/sdk/sdk.js +5 -10
- package/dist/src/sdk/types.d.ts +3 -0
- package/package.json +1 -1
- package/src/sdk/sdk.ts +5 -9
- package/src/sdk/types.ts +3 -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>;
|
package/dist/src/sdk/sdk.js
CHANGED
|
@@ -130,12 +130,7 @@ export class ApiSDK {
|
|
|
130
130
|
}
|
|
131
131
|
logout() {
|
|
132
132
|
return __awaiter(this, void 0, void 0, function* () {
|
|
133
|
-
|
|
134
|
-
yield this.request('/auth/logout', 'POST');
|
|
135
|
-
}
|
|
136
|
-
finally {
|
|
137
|
-
yield this.clearAuth();
|
|
138
|
-
}
|
|
133
|
+
yield this.clearAuth();
|
|
139
134
|
});
|
|
140
135
|
}
|
|
141
136
|
clearAuth() {
|
|
@@ -692,9 +687,9 @@ export class ApiSDK {
|
|
|
692
687
|
// ======================
|
|
693
688
|
// AGENT METHODS
|
|
694
689
|
// ======================
|
|
695
|
-
createAgent(name) {
|
|
690
|
+
createAgent(name, templateTextReplacement) {
|
|
696
691
|
return __awaiter(this, void 0, void 0, function* () {
|
|
697
|
-
const dto = { name };
|
|
692
|
+
const dto = { name, templateTextReplacement };
|
|
698
693
|
return this.request(urls.agents, 'POST', dto);
|
|
699
694
|
});
|
|
700
695
|
}
|
|
@@ -708,9 +703,9 @@ export class ApiSDK {
|
|
|
708
703
|
return this.request(`${urls.agents}/${id}`, 'GET');
|
|
709
704
|
});
|
|
710
705
|
}
|
|
711
|
-
updateAgent(id, name) {
|
|
706
|
+
updateAgent(id, name, templateTextReplacement) {
|
|
712
707
|
return __awaiter(this, void 0, void 0, function* () {
|
|
713
|
-
const dto = { name };
|
|
708
|
+
const dto = { name, templateTextReplacement };
|
|
714
709
|
return this.request(`${urls.agents}/${id}`, 'PATCH', dto);
|
|
715
710
|
});
|
|
716
711
|
}
|
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",
|
package/package.json
CHANGED
package/src/sdk/sdk.ts
CHANGED
|
@@ -211,11 +211,7 @@ export class ApiSDK {
|
|
|
211
211
|
}
|
|
212
212
|
|
|
213
213
|
public async logout(): Promise<void> {
|
|
214
|
-
|
|
215
|
-
await this.request('/auth/logout', 'POST');
|
|
216
|
-
} finally {
|
|
217
|
-
await this.clearAuth();
|
|
218
|
-
}
|
|
214
|
+
await this.clearAuth();
|
|
219
215
|
}
|
|
220
216
|
|
|
221
217
|
private async clearAuth(): Promise<void> {
|
|
@@ -781,8 +777,8 @@ export class ApiSDK {
|
|
|
781
777
|
// AGENT METHODS
|
|
782
778
|
// ======================
|
|
783
779
|
|
|
784
|
-
public async createAgent(name: string): Promise<Agent> {
|
|
785
|
-
const dto: CreateAgentDto = { name };
|
|
780
|
+
public async createAgent(name: string, templateTextReplacement?: string): Promise<Agent> {
|
|
781
|
+
const dto: CreateAgentDto = { name, templateTextReplacement };
|
|
786
782
|
return this.request<Agent>(urls.agents, 'POST', dto);
|
|
787
783
|
}
|
|
788
784
|
|
|
@@ -794,8 +790,8 @@ export class ApiSDK {
|
|
|
794
790
|
return this.request<Agent>(`${urls.agents}/${id}`, 'GET');
|
|
795
791
|
}
|
|
796
792
|
|
|
797
|
-
public async updateAgent(id: string, name: string): Promise<Agent> {
|
|
798
|
-
const dto: UpdateAgentDto = { name };
|
|
793
|
+
public async updateAgent(id: string, name: string, templateTextReplacement?: string): Promise<Agent> {
|
|
794
|
+
const dto: UpdateAgentDto = { name, templateTextReplacement };
|
|
799
795
|
return this.request<Agent>(`${urls.agents}/${id}`, 'PATCH', dto);
|
|
800
796
|
}
|
|
801
797
|
|
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
|