@vendasta/ai-assistants 0.30.0 → 0.32.0
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/esm2020/lib/_internal/enums/assistant.enum.mjs +3 -1
- package/esm2020/lib/_internal/index.mjs +2 -1
- package/esm2020/lib/_internal/integration-test.api.service.mjs +53 -0
- package/esm2020/lib/_internal/interfaces/answer.interface.mjs +1 -1
- package/esm2020/lib/_internal/interfaces/api.interface.mjs +1 -1
- package/esm2020/lib/_internal/interfaces/index.mjs +1 -1
- package/esm2020/lib/_internal/interfaces/integration-tests.interface.mjs +2 -0
- package/esm2020/lib/_internal/interfaces/namespace.interface.mjs +1 -1
- package/esm2020/lib/_internal/objects/answer.mjs +24 -1
- package/esm2020/lib/_internal/objects/api.mjs +14 -2
- package/esm2020/lib/_internal/objects/index.mjs +5 -4
- package/esm2020/lib/_internal/objects/integration-tests.mjs +201 -0
- package/esm2020/lib/_internal/objects/namespace.mjs +1 -53
- package/fesm2015/vendasta-ai-assistants.mjs +313 -84
- package/fesm2015/vendasta-ai-assistants.mjs.map +1 -1
- package/fesm2020/vendasta-ai-assistants.mjs +313 -84
- package/fesm2020/vendasta-ai-assistants.mjs.map +1 -1
- package/lib/_internal/enums/assistant.enum.d.ts +3 -1
- package/lib/_internal/index.d.ts +1 -0
- package/lib/_internal/integration-test.api.service.d.ts +17 -0
- package/lib/_internal/interfaces/answer.interface.d.ts +3 -0
- package/lib/_internal/interfaces/api.interface.d.ts +3 -1
- package/lib/_internal/interfaces/index.d.ts +4 -3
- package/lib/_internal/interfaces/integration-tests.interface.d.ts +32 -0
- package/lib/_internal/interfaces/namespace.interface.d.ts +0 -8
- package/lib/_internal/objects/answer.d.ts +6 -0
- package/lib/_internal/objects/api.d.ts +3 -1
- package/lib/_internal/objects/index.d.ts +4 -3
- package/lib/_internal/objects/integration-tests.d.ts +55 -0
- package/lib/_internal/objects/namespace.d.ts +0 -14
- package/package.json +1 -1
|
@@ -80,6 +80,8 @@ var AssistantType;
|
|
|
80
80
|
AssistantType[AssistantType["ASSISTANT_TYPE_SOCIAL_MARKETING"] = 3] = "ASSISTANT_TYPE_SOCIAL_MARKETING";
|
|
81
81
|
AssistantType[AssistantType["ASSISTANT_TYPE_VOICE_RECEPTIONIST"] = 4] = "ASSISTANT_TYPE_VOICE_RECEPTIONIST";
|
|
82
82
|
AssistantType[AssistantType["ASSISTANT_TYPE_CUSTOM"] = 5] = "ASSISTANT_TYPE_CUSTOM";
|
|
83
|
+
AssistantType[AssistantType["ASSISTANT_TYPE_SALES_COACH"] = 6] = "ASSISTANT_TYPE_SALES_COACH";
|
|
84
|
+
AssistantType[AssistantType["ASSISTANT_TYPE_REPUTATION_MANAGEMENT_REVIEW_AGENT"] = 7] = "ASSISTANT_TYPE_REPUTATION_MANAGEMENT_REVIEW_AGENT";
|
|
83
85
|
})(AssistantType || (AssistantType = {}));
|
|
84
86
|
var VendorModel;
|
|
85
87
|
(function (VendorModel) {
|
|
@@ -127,7 +129,7 @@ var ChatMessageRole;
|
|
|
127
129
|
// Enums Index.
|
|
128
130
|
// *********************************
|
|
129
131
|
|
|
130
|
-
function enumStringToValue$
|
|
132
|
+
function enumStringToValue$c(enumRef, value) {
|
|
131
133
|
if (typeof value === 'number') {
|
|
132
134
|
return value;
|
|
133
135
|
}
|
|
@@ -153,46 +155,6 @@ class NamespaceAccountGroupNamespace {
|
|
|
153
155
|
return toReturn;
|
|
154
156
|
}
|
|
155
157
|
}
|
|
156
|
-
class NamespaceAccountGroupsForGroupNamespace {
|
|
157
|
-
static fromProto(proto) {
|
|
158
|
-
let m = new NamespaceAccountGroupsForGroupNamespace();
|
|
159
|
-
m = Object.assign(m, proto);
|
|
160
|
-
return m;
|
|
161
|
-
}
|
|
162
|
-
constructor(kwargs) {
|
|
163
|
-
if (!kwargs) {
|
|
164
|
-
return;
|
|
165
|
-
}
|
|
166
|
-
Object.assign(this, kwargs);
|
|
167
|
-
}
|
|
168
|
-
toApiJson() {
|
|
169
|
-
const toReturn = {};
|
|
170
|
-
if (typeof this.groupPath !== 'undefined') {
|
|
171
|
-
toReturn['groupPath'] = this.groupPath;
|
|
172
|
-
}
|
|
173
|
-
return toReturn;
|
|
174
|
-
}
|
|
175
|
-
}
|
|
176
|
-
class NamespaceAccountGroupsForPartnerNamespace {
|
|
177
|
-
static fromProto(proto) {
|
|
178
|
-
let m = new NamespaceAccountGroupsForPartnerNamespace();
|
|
179
|
-
m = Object.assign(m, proto);
|
|
180
|
-
return m;
|
|
181
|
-
}
|
|
182
|
-
constructor(kwargs) {
|
|
183
|
-
if (!kwargs) {
|
|
184
|
-
return;
|
|
185
|
-
}
|
|
186
|
-
Object.assign(this, kwargs);
|
|
187
|
-
}
|
|
188
|
-
toApiJson() {
|
|
189
|
-
const toReturn = {};
|
|
190
|
-
if (typeof this.partnerId !== 'undefined') {
|
|
191
|
-
toReturn['partnerId'] = this.partnerId;
|
|
192
|
-
}
|
|
193
|
-
return toReturn;
|
|
194
|
-
}
|
|
195
|
-
}
|
|
196
158
|
class NamespaceGlobalNamespace {
|
|
197
159
|
static fromProto(proto) {
|
|
198
160
|
let m = new NamespaceGlobalNamespace();
|
|
@@ -223,12 +185,6 @@ class Namespace {
|
|
|
223
185
|
if (proto.systemNamespace) {
|
|
224
186
|
m.systemNamespace = NamespaceSystemNamespace.fromProto(proto.systemNamespace);
|
|
225
187
|
}
|
|
226
|
-
if (proto.accountGroupsForPartnerNamespace) {
|
|
227
|
-
m.accountGroupsForPartnerNamespace = NamespaceAccountGroupsForPartnerNamespace.fromProto(proto.accountGroupsForPartnerNamespace);
|
|
228
|
-
}
|
|
229
|
-
if (proto.accountGroupsForGroupNamespace) {
|
|
230
|
-
m.accountGroupsForGroupNamespace = NamespaceAccountGroupsForGroupNamespace.fromProto(proto.accountGroupsForGroupNamespace);
|
|
231
|
-
}
|
|
232
188
|
if (proto.globalNamespace) {
|
|
233
189
|
m.globalNamespace = NamespaceGlobalNamespace.fromProto(proto.globalNamespace);
|
|
234
190
|
}
|
|
@@ -251,12 +207,6 @@ class Namespace {
|
|
|
251
207
|
if (typeof this.systemNamespace !== 'undefined' && this.systemNamespace !== null) {
|
|
252
208
|
toReturn['systemNamespace'] = 'toApiJson' in this.systemNamespace ? this.systemNamespace.toApiJson() : this.systemNamespace;
|
|
253
209
|
}
|
|
254
|
-
if (typeof this.accountGroupsForPartnerNamespace !== 'undefined' && this.accountGroupsForPartnerNamespace !== null) {
|
|
255
|
-
toReturn['accountGroupsForPartnerNamespace'] = 'toApiJson' in this.accountGroupsForPartnerNamespace ? this.accountGroupsForPartnerNamespace.toApiJson() : this.accountGroupsForPartnerNamespace;
|
|
256
|
-
}
|
|
257
|
-
if (typeof this.accountGroupsForGroupNamespace !== 'undefined' && this.accountGroupsForGroupNamespace !== null) {
|
|
258
|
-
toReturn['accountGroupsForGroupNamespace'] = 'toApiJson' in this.accountGroupsForGroupNamespace ? this.accountGroupsForGroupNamespace.toApiJson() : this.accountGroupsForGroupNamespace;
|
|
259
|
-
}
|
|
260
210
|
if (typeof this.globalNamespace !== 'undefined' && this.globalNamespace !== null) {
|
|
261
211
|
toReturn['globalNamespace'] = 'toApiJson' in this.globalNamespace ? this.globalNamespace.toApiJson() : this.globalNamespace;
|
|
262
212
|
}
|
|
@@ -301,7 +251,7 @@ class NamespaceSystemNamespace {
|
|
|
301
251
|
}
|
|
302
252
|
}
|
|
303
253
|
|
|
304
|
-
function enumStringToValue$
|
|
254
|
+
function enumStringToValue$b(enumRef, value) {
|
|
305
255
|
if (typeof value === 'number') {
|
|
306
256
|
return value;
|
|
307
257
|
}
|
|
@@ -461,7 +411,7 @@ class FunctionParameter {
|
|
|
461
411
|
m.items = FunctionParameter.fromProto(proto.items);
|
|
462
412
|
}
|
|
463
413
|
if (proto.location) {
|
|
464
|
-
m.location = enumStringToValue$
|
|
414
|
+
m.location = enumStringToValue$b(FunctionParameterParameterLocation, proto.location);
|
|
465
415
|
}
|
|
466
416
|
return m;
|
|
467
417
|
}
|
|
@@ -535,7 +485,7 @@ class FunctionAuthStrategyUnspecifiedFunctionAuthStrategy {
|
|
|
535
485
|
}
|
|
536
486
|
}
|
|
537
487
|
|
|
538
|
-
function enumStringToValue$
|
|
488
|
+
function enumStringToValue$a(enumRef, value) {
|
|
539
489
|
if (typeof value === 'number') {
|
|
540
490
|
return value;
|
|
541
491
|
}
|
|
@@ -738,7 +688,7 @@ class PromptVersion {
|
|
|
738
688
|
}
|
|
739
689
|
}
|
|
740
690
|
|
|
741
|
-
function enumStringToValue$
|
|
691
|
+
function enumStringToValue$9(enumRef, value) {
|
|
742
692
|
if (typeof value === 'number') {
|
|
743
693
|
return value;
|
|
744
694
|
}
|
|
@@ -752,7 +702,7 @@ class Goal {
|
|
|
752
702
|
m.namespace = Namespace.fromProto(proto.namespace);
|
|
753
703
|
}
|
|
754
704
|
if (proto.type) {
|
|
755
|
-
m.type = enumStringToValue$
|
|
705
|
+
m.type = enumStringToValue$9(GoalType, proto.type);
|
|
756
706
|
}
|
|
757
707
|
if (proto.promptModules) {
|
|
758
708
|
m.promptModules = proto.promptModules.map(PromptModule.fromProto);
|
|
@@ -764,7 +714,7 @@ class Goal {
|
|
|
764
714
|
m.updated = new Date(proto.updated);
|
|
765
715
|
}
|
|
766
716
|
if (proto.supportedChannels) {
|
|
767
|
-
m.supportedChannels = proto.supportedChannels.map((v) => enumStringToValue$
|
|
717
|
+
m.supportedChannels = proto.supportedChannels.map((v) => enumStringToValue$9(GoalChannel, v));
|
|
768
718
|
}
|
|
769
719
|
return m;
|
|
770
720
|
}
|
|
@@ -839,7 +789,7 @@ class GoalKey {
|
|
|
839
789
|
}
|
|
840
790
|
}
|
|
841
791
|
|
|
842
|
-
function enumStringToValue$
|
|
792
|
+
function enumStringToValue$8(enumRef, value) {
|
|
843
793
|
if (typeof value === 'number') {
|
|
844
794
|
return value;
|
|
845
795
|
}
|
|
@@ -869,7 +819,7 @@ class KeyValuePair {
|
|
|
869
819
|
}
|
|
870
820
|
}
|
|
871
821
|
|
|
872
|
-
function enumStringToValue$
|
|
822
|
+
function enumStringToValue$7(enumRef, value) {
|
|
873
823
|
if (typeof value === 'number') {
|
|
874
824
|
return value;
|
|
875
825
|
}
|
|
@@ -883,7 +833,7 @@ class Assistant {
|
|
|
883
833
|
m.namespace = Namespace.fromProto(proto.namespace);
|
|
884
834
|
}
|
|
885
835
|
if (proto.type) {
|
|
886
|
-
m.type = enumStringToValue$
|
|
836
|
+
m.type = enumStringToValue$7(AssistantType, proto.type);
|
|
887
837
|
}
|
|
888
838
|
if (proto.config) {
|
|
889
839
|
m.config = Config.fromProto(proto.config);
|
|
@@ -1141,7 +1091,7 @@ class ConfigVoiceConfig {
|
|
|
1141
1091
|
let m = new ConfigVoiceConfig();
|
|
1142
1092
|
m = Object.assign(m, proto);
|
|
1143
1093
|
if (proto.vendorModel) {
|
|
1144
|
-
m.vendorModel = enumStringToValue$
|
|
1094
|
+
m.vendorModel = enumStringToValue$7(VendorModel, proto.vendorModel);
|
|
1145
1095
|
}
|
|
1146
1096
|
if (proto.modelConfig) {
|
|
1147
1097
|
m.modelConfig = ModelConfig.fromProto(proto.modelConfig);
|
|
@@ -1166,7 +1116,7 @@ class ConfigVoiceConfig {
|
|
|
1166
1116
|
}
|
|
1167
1117
|
}
|
|
1168
1118
|
|
|
1169
|
-
function enumStringToValue$
|
|
1119
|
+
function enumStringToValue$6(enumRef, value) {
|
|
1170
1120
|
if (typeof value === 'number') {
|
|
1171
1121
|
return value;
|
|
1172
1122
|
}
|
|
@@ -1183,7 +1133,7 @@ class Connection {
|
|
|
1183
1133
|
m.assistantKeys = proto.assistantKeys.map(AssistantKey.fromProto);
|
|
1184
1134
|
}
|
|
1185
1135
|
if (proto.supportedAssistantTypes) {
|
|
1186
|
-
m.supportedAssistantTypes = proto.supportedAssistantTypes.map((v) => enumStringToValue$
|
|
1136
|
+
m.supportedAssistantTypes = proto.supportedAssistantTypes.map((v) => enumStringToValue$6(AssistantType, v));
|
|
1187
1137
|
}
|
|
1188
1138
|
return m;
|
|
1189
1139
|
}
|
|
@@ -1258,7 +1208,7 @@ class ConnectionKey {
|
|
|
1258
1208
|
}
|
|
1259
1209
|
}
|
|
1260
1210
|
|
|
1261
|
-
function enumStringToValue$
|
|
1211
|
+
function enumStringToValue$5(enumRef, value) {
|
|
1262
1212
|
if (typeof value === 'number') {
|
|
1263
1213
|
return value;
|
|
1264
1214
|
}
|
|
@@ -1269,7 +1219,7 @@ class ChatAnswerFunctionExecutionJob {
|
|
|
1269
1219
|
let m = new ChatAnswerFunctionExecutionJob();
|
|
1270
1220
|
m = Object.assign(m, proto);
|
|
1271
1221
|
if (proto.status) {
|
|
1272
|
-
m.status = enumStringToValue$
|
|
1222
|
+
m.status = enumStringToValue$5(ChatAnswerFunctionExecutionJobStatus, proto.status);
|
|
1273
1223
|
}
|
|
1274
1224
|
if (proto.result) {
|
|
1275
1225
|
m.result = ChatAnswerFunctionExecutionJobResult.fromProto(proto.result);
|
|
@@ -1330,7 +1280,7 @@ class ChatMessage {
|
|
|
1330
1280
|
let m = new ChatMessage();
|
|
1331
1281
|
m = Object.assign(m, proto);
|
|
1332
1282
|
if (proto.role) {
|
|
1333
|
-
m.role = enumStringToValue$
|
|
1283
|
+
m.role = enumStringToValue$5(ChatMessageRole, proto.role);
|
|
1334
1284
|
}
|
|
1335
1285
|
return m;
|
|
1336
1286
|
}
|
|
@@ -1398,17 +1348,13 @@ class ChatUserInfo {
|
|
|
1398
1348
|
return toReturn;
|
|
1399
1349
|
}
|
|
1400
1350
|
}
|
|
1401
|
-
|
|
1402
|
-
function enumStringToValue$3(enumRef, value) {
|
|
1403
|
-
if (typeof value === 'number') {
|
|
1404
|
-
return value;
|
|
1405
|
-
}
|
|
1406
|
-
return enumRef[value];
|
|
1407
|
-
}
|
|
1408
|
-
class Access {
|
|
1351
|
+
class ContextInfo {
|
|
1409
1352
|
static fromProto(proto) {
|
|
1410
|
-
let m = new
|
|
1353
|
+
let m = new ContextInfo();
|
|
1411
1354
|
m = Object.assign(m, proto);
|
|
1355
|
+
if (proto.variables) {
|
|
1356
|
+
m.variables = proto.variables.map(KeyValuePair.fromProto);
|
|
1357
|
+
}
|
|
1412
1358
|
return m;
|
|
1413
1359
|
}
|
|
1414
1360
|
constructor(kwargs) {
|
|
@@ -1419,17 +1365,14 @@ class Access {
|
|
|
1419
1365
|
}
|
|
1420
1366
|
toApiJson() {
|
|
1421
1367
|
const toReturn = {};
|
|
1422
|
-
if (typeof this.
|
|
1423
|
-
toReturn['
|
|
1424
|
-
}
|
|
1425
|
-
if (typeof this.public !== 'undefined') {
|
|
1426
|
-
toReturn['public'] = this.public;
|
|
1368
|
+
if (typeof this.variables !== 'undefined' && this.variables !== null) {
|
|
1369
|
+
toReturn['variables'] = 'toApiJson' in this.variables ? this.variables.toApiJson() : this.variables;
|
|
1427
1370
|
}
|
|
1428
1371
|
return toReturn;
|
|
1429
1372
|
}
|
|
1430
1373
|
}
|
|
1431
1374
|
|
|
1432
|
-
function enumStringToValue$
|
|
1375
|
+
function enumStringToValue$4(enumRef, value) {
|
|
1433
1376
|
if (typeof value === 'number') {
|
|
1434
1377
|
return value;
|
|
1435
1378
|
}
|
|
@@ -1491,6 +1434,234 @@ class PagedResponseMetadata {
|
|
|
1491
1434
|
}
|
|
1492
1435
|
}
|
|
1493
1436
|
|
|
1437
|
+
function enumStringToValue$3(enumRef, value) {
|
|
1438
|
+
if (typeof value === 'number') {
|
|
1439
|
+
return value;
|
|
1440
|
+
}
|
|
1441
|
+
return enumRef[value];
|
|
1442
|
+
}
|
|
1443
|
+
class DeleteTestCasesRequest {
|
|
1444
|
+
static fromProto(proto) {
|
|
1445
|
+
let m = new DeleteTestCasesRequest();
|
|
1446
|
+
m = Object.assign(m, proto);
|
|
1447
|
+
if (proto.connection) {
|
|
1448
|
+
m.connection = ConnectionKey.fromProto(proto.connection);
|
|
1449
|
+
}
|
|
1450
|
+
return m;
|
|
1451
|
+
}
|
|
1452
|
+
constructor(kwargs) {
|
|
1453
|
+
if (!kwargs) {
|
|
1454
|
+
return;
|
|
1455
|
+
}
|
|
1456
|
+
Object.assign(this, kwargs);
|
|
1457
|
+
}
|
|
1458
|
+
toApiJson() {
|
|
1459
|
+
const toReturn = {};
|
|
1460
|
+
if (typeof this.connection !== 'undefined' && this.connection !== null) {
|
|
1461
|
+
toReturn['connection'] = 'toApiJson' in this.connection ? this.connection.toApiJson() : this.connection;
|
|
1462
|
+
}
|
|
1463
|
+
if (typeof this.testCaseIds !== 'undefined') {
|
|
1464
|
+
toReturn['testCaseIds'] = this.testCaseIds;
|
|
1465
|
+
}
|
|
1466
|
+
return toReturn;
|
|
1467
|
+
}
|
|
1468
|
+
}
|
|
1469
|
+
class ListTestCasesByConnectionRequest {
|
|
1470
|
+
static fromProto(proto) {
|
|
1471
|
+
let m = new ListTestCasesByConnectionRequest();
|
|
1472
|
+
m = Object.assign(m, proto);
|
|
1473
|
+
if (proto.connection) {
|
|
1474
|
+
m.connection = ConnectionKey.fromProto(proto.connection);
|
|
1475
|
+
}
|
|
1476
|
+
if (proto.pagingOptions) {
|
|
1477
|
+
m.pagingOptions = PagedRequestOptions.fromProto(proto.pagingOptions);
|
|
1478
|
+
}
|
|
1479
|
+
return m;
|
|
1480
|
+
}
|
|
1481
|
+
constructor(kwargs) {
|
|
1482
|
+
if (!kwargs) {
|
|
1483
|
+
return;
|
|
1484
|
+
}
|
|
1485
|
+
Object.assign(this, kwargs);
|
|
1486
|
+
}
|
|
1487
|
+
toApiJson() {
|
|
1488
|
+
const toReturn = {};
|
|
1489
|
+
if (typeof this.connection !== 'undefined' && this.connection !== null) {
|
|
1490
|
+
toReturn['connection'] = 'toApiJson' in this.connection ? this.connection.toApiJson() : this.connection;
|
|
1491
|
+
}
|
|
1492
|
+
if (typeof this.pagingOptions !== 'undefined' && this.pagingOptions !== null) {
|
|
1493
|
+
toReturn['pagingOptions'] = 'toApiJson' in this.pagingOptions ? this.pagingOptions.toApiJson() : this.pagingOptions;
|
|
1494
|
+
}
|
|
1495
|
+
return toReturn;
|
|
1496
|
+
}
|
|
1497
|
+
}
|
|
1498
|
+
class ListTestCasesByConnectionResponse {
|
|
1499
|
+
static fromProto(proto) {
|
|
1500
|
+
let m = new ListTestCasesByConnectionResponse();
|
|
1501
|
+
m = Object.assign(m, proto);
|
|
1502
|
+
if (proto.testCases) {
|
|
1503
|
+
m.testCases = proto.testCases.map(TestCase.fromProto);
|
|
1504
|
+
}
|
|
1505
|
+
if (proto.pagingMetadata) {
|
|
1506
|
+
m.pagingMetadata = PagedResponseMetadata.fromProto(proto.pagingMetadata);
|
|
1507
|
+
}
|
|
1508
|
+
return m;
|
|
1509
|
+
}
|
|
1510
|
+
constructor(kwargs) {
|
|
1511
|
+
if (!kwargs) {
|
|
1512
|
+
return;
|
|
1513
|
+
}
|
|
1514
|
+
Object.assign(this, kwargs);
|
|
1515
|
+
}
|
|
1516
|
+
toApiJson() {
|
|
1517
|
+
const toReturn = {};
|
|
1518
|
+
if (typeof this.testCases !== 'undefined' && this.testCases !== null) {
|
|
1519
|
+
toReturn['testCases'] = 'toApiJson' in this.testCases ? this.testCases.toApiJson() : this.testCases;
|
|
1520
|
+
}
|
|
1521
|
+
if (typeof this.pagingMetadata !== 'undefined' && this.pagingMetadata !== null) {
|
|
1522
|
+
toReturn['pagingMetadata'] = 'toApiJson' in this.pagingMetadata ? this.pagingMetadata.toApiJson() : this.pagingMetadata;
|
|
1523
|
+
}
|
|
1524
|
+
return toReturn;
|
|
1525
|
+
}
|
|
1526
|
+
}
|
|
1527
|
+
class RunTestsRequest {
|
|
1528
|
+
static fromProto(proto) {
|
|
1529
|
+
let m = new RunTestsRequest();
|
|
1530
|
+
m = Object.assign(m, proto);
|
|
1531
|
+
if (proto.connection) {
|
|
1532
|
+
m.connection = ConnectionKey.fromProto(proto.connection);
|
|
1533
|
+
}
|
|
1534
|
+
return m;
|
|
1535
|
+
}
|
|
1536
|
+
constructor(kwargs) {
|
|
1537
|
+
if (!kwargs) {
|
|
1538
|
+
return;
|
|
1539
|
+
}
|
|
1540
|
+
Object.assign(this, kwargs);
|
|
1541
|
+
}
|
|
1542
|
+
toApiJson() {
|
|
1543
|
+
const toReturn = {};
|
|
1544
|
+
if (typeof this.connection !== 'undefined' && this.connection !== null) {
|
|
1545
|
+
toReturn['connection'] = 'toApiJson' in this.connection ? this.connection.toApiJson() : this.connection;
|
|
1546
|
+
}
|
|
1547
|
+
if (typeof this.testCaseIds !== 'undefined') {
|
|
1548
|
+
toReturn['testCaseIds'] = this.testCaseIds;
|
|
1549
|
+
}
|
|
1550
|
+
return toReturn;
|
|
1551
|
+
}
|
|
1552
|
+
}
|
|
1553
|
+
class RunTestsResponse {
|
|
1554
|
+
static fromProto(proto) {
|
|
1555
|
+
let m = new RunTestsResponse();
|
|
1556
|
+
m = Object.assign(m, proto);
|
|
1557
|
+
return m;
|
|
1558
|
+
}
|
|
1559
|
+
constructor(kwargs) {
|
|
1560
|
+
if (!kwargs) {
|
|
1561
|
+
return;
|
|
1562
|
+
}
|
|
1563
|
+
Object.assign(this, kwargs);
|
|
1564
|
+
}
|
|
1565
|
+
toApiJson() {
|
|
1566
|
+
const toReturn = {};
|
|
1567
|
+
if (typeof this.buildUrl !== 'undefined') {
|
|
1568
|
+
toReturn['buildUrl'] = this.buildUrl;
|
|
1569
|
+
}
|
|
1570
|
+
return toReturn;
|
|
1571
|
+
}
|
|
1572
|
+
}
|
|
1573
|
+
class TestCase {
|
|
1574
|
+
static fromProto(proto) {
|
|
1575
|
+
let m = new TestCase();
|
|
1576
|
+
m = Object.assign(m, proto);
|
|
1577
|
+
if (proto.chatHistory) {
|
|
1578
|
+
m.chatHistory = proto.chatHistory.map(ChatMessage.fromProto);
|
|
1579
|
+
}
|
|
1580
|
+
return m;
|
|
1581
|
+
}
|
|
1582
|
+
constructor(kwargs) {
|
|
1583
|
+
if (!kwargs) {
|
|
1584
|
+
return;
|
|
1585
|
+
}
|
|
1586
|
+
Object.assign(this, kwargs);
|
|
1587
|
+
}
|
|
1588
|
+
toApiJson() {
|
|
1589
|
+
const toReturn = {};
|
|
1590
|
+
if (typeof this.id !== 'undefined') {
|
|
1591
|
+
toReturn['id'] = this.id;
|
|
1592
|
+
}
|
|
1593
|
+
if (typeof this.name !== 'undefined') {
|
|
1594
|
+
toReturn['name'] = this.name;
|
|
1595
|
+
}
|
|
1596
|
+
if (typeof this.chatHistory !== 'undefined' && this.chatHistory !== null) {
|
|
1597
|
+
toReturn['chatHistory'] = 'toApiJson' in this.chatHistory ? this.chatHistory.toApiJson() : this.chatHistory;
|
|
1598
|
+
}
|
|
1599
|
+
if (typeof this.expectation !== 'undefined') {
|
|
1600
|
+
toReturn['expectation'] = this.expectation;
|
|
1601
|
+
}
|
|
1602
|
+
return toReturn;
|
|
1603
|
+
}
|
|
1604
|
+
}
|
|
1605
|
+
class UpsertTestCasesRequest {
|
|
1606
|
+
static fromProto(proto) {
|
|
1607
|
+
let m = new UpsertTestCasesRequest();
|
|
1608
|
+
m = Object.assign(m, proto);
|
|
1609
|
+
if (proto.connection) {
|
|
1610
|
+
m.connection = ConnectionKey.fromProto(proto.connection);
|
|
1611
|
+
}
|
|
1612
|
+
if (proto.testCases) {
|
|
1613
|
+
m.testCases = proto.testCases.map(TestCase.fromProto);
|
|
1614
|
+
}
|
|
1615
|
+
return m;
|
|
1616
|
+
}
|
|
1617
|
+
constructor(kwargs) {
|
|
1618
|
+
if (!kwargs) {
|
|
1619
|
+
return;
|
|
1620
|
+
}
|
|
1621
|
+
Object.assign(this, kwargs);
|
|
1622
|
+
}
|
|
1623
|
+
toApiJson() {
|
|
1624
|
+
const toReturn = {};
|
|
1625
|
+
if (typeof this.connection !== 'undefined' && this.connection !== null) {
|
|
1626
|
+
toReturn['connection'] = 'toApiJson' in this.connection ? this.connection.toApiJson() : this.connection;
|
|
1627
|
+
}
|
|
1628
|
+
if (typeof this.testCases !== 'undefined' && this.testCases !== null) {
|
|
1629
|
+
toReturn['testCases'] = 'toApiJson' in this.testCases ? this.testCases.toApiJson() : this.testCases;
|
|
1630
|
+
}
|
|
1631
|
+
return toReturn;
|
|
1632
|
+
}
|
|
1633
|
+
}
|
|
1634
|
+
|
|
1635
|
+
function enumStringToValue$2(enumRef, value) {
|
|
1636
|
+
if (typeof value === 'number') {
|
|
1637
|
+
return value;
|
|
1638
|
+
}
|
|
1639
|
+
return enumRef[value];
|
|
1640
|
+
}
|
|
1641
|
+
class Access {
|
|
1642
|
+
static fromProto(proto) {
|
|
1643
|
+
let m = new Access();
|
|
1644
|
+
m = Object.assign(m, proto);
|
|
1645
|
+
return m;
|
|
1646
|
+
}
|
|
1647
|
+
constructor(kwargs) {
|
|
1648
|
+
if (!kwargs) {
|
|
1649
|
+
return;
|
|
1650
|
+
}
|
|
1651
|
+
Object.assign(this, kwargs);
|
|
1652
|
+
}
|
|
1653
|
+
toApiJson() {
|
|
1654
|
+
const toReturn = {};
|
|
1655
|
+
if (typeof this.scope !== 'undefined') {
|
|
1656
|
+
toReturn['scope'] = this.scope;
|
|
1657
|
+
}
|
|
1658
|
+
if (typeof this.public !== 'undefined') {
|
|
1659
|
+
toReturn['public'] = this.public;
|
|
1660
|
+
}
|
|
1661
|
+
return toReturn;
|
|
1662
|
+
}
|
|
1663
|
+
}
|
|
1664
|
+
|
|
1494
1665
|
function enumStringToValue$1(enumRef, value) {
|
|
1495
1666
|
if (typeof value === 'number') {
|
|
1496
1667
|
return value;
|
|
@@ -2266,6 +2437,9 @@ class GenerateChatAnswerRequest {
|
|
|
2266
2437
|
if (proto.assistantKey) {
|
|
2267
2438
|
m.assistantKey = AssistantKey.fromProto(proto.assistantKey);
|
|
2268
2439
|
}
|
|
2440
|
+
if (proto.contextInfo) {
|
|
2441
|
+
m.contextInfo = ContextInfo.fromProto(proto.contextInfo);
|
|
2442
|
+
}
|
|
2269
2443
|
return m;
|
|
2270
2444
|
}
|
|
2271
2445
|
constructor(kwargs) {
|
|
@@ -2294,6 +2468,9 @@ class GenerateChatAnswerRequest {
|
|
|
2294
2468
|
if (typeof this.assistantKey !== 'undefined' && this.assistantKey !== null) {
|
|
2295
2469
|
toReturn['assistantKey'] = 'toApiJson' in this.assistantKey ? this.assistantKey.toApiJson() : this.assistantKey;
|
|
2296
2470
|
}
|
|
2471
|
+
if (typeof this.contextInfo !== 'undefined' && this.contextInfo !== null) {
|
|
2472
|
+
toReturn['contextInfo'] = 'toApiJson' in this.contextInfo ? this.contextInfo.toApiJson() : this.contextInfo;
|
|
2473
|
+
}
|
|
2297
2474
|
return toReturn;
|
|
2298
2475
|
}
|
|
2299
2476
|
}
|
|
@@ -3157,6 +3334,9 @@ class ListAllAssistantsAssociatedToConnectionRequest {
|
|
|
3157
3334
|
if (proto.filters) {
|
|
3158
3335
|
m.filters = ListAllAssistantsAssociatedToConnectionRequestFilters.fromProto(proto.filters);
|
|
3159
3336
|
}
|
|
3337
|
+
if (proto.fieldMask) {
|
|
3338
|
+
m.fieldMask = FieldMask.fromProto(proto.fieldMask);
|
|
3339
|
+
}
|
|
3160
3340
|
return m;
|
|
3161
3341
|
}
|
|
3162
3342
|
constructor(kwargs) {
|
|
@@ -3173,6 +3353,9 @@ class ListAllAssistantsAssociatedToConnectionRequest {
|
|
|
3173
3353
|
if (typeof this.filters !== 'undefined' && this.filters !== null) {
|
|
3174
3354
|
toReturn['filters'] = 'toApiJson' in this.filters ? this.filters.toApiJson() : this.filters;
|
|
3175
3355
|
}
|
|
3356
|
+
if (typeof this.fieldMask !== 'undefined' && this.fieldMask !== null) {
|
|
3357
|
+
toReturn['fieldMask'] = 'toApiJson' in this.fieldMask ? this.fieldMask.toApiJson() : this.fieldMask;
|
|
3358
|
+
}
|
|
3176
3359
|
return toReturn;
|
|
3177
3360
|
}
|
|
3178
3361
|
}
|
|
@@ -4276,6 +4459,52 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
4276
4459
|
args: [{ providedIn: 'root' }]
|
|
4277
4460
|
}] });
|
|
4278
4461
|
|
|
4462
|
+
// *********************************
|
|
4463
|
+
// Code generated by sdkgen
|
|
4464
|
+
// DO NOT EDIT!.
|
|
4465
|
+
//
|
|
4466
|
+
// API Service.
|
|
4467
|
+
// *********************************
|
|
4468
|
+
class IntegrationTestApiService {
|
|
4469
|
+
constructor() {
|
|
4470
|
+
this.hostService = inject(HostService);
|
|
4471
|
+
this.http = inject(HttpClient);
|
|
4472
|
+
this._host = this.hostService.hostWithScheme;
|
|
4473
|
+
}
|
|
4474
|
+
apiOptions() {
|
|
4475
|
+
return {
|
|
4476
|
+
headers: new HttpHeaders({
|
|
4477
|
+
'Content-Type': 'application/json'
|
|
4478
|
+
}),
|
|
4479
|
+
withCredentials: true
|
|
4480
|
+
};
|
|
4481
|
+
}
|
|
4482
|
+
listTestCasesByConnection(r) {
|
|
4483
|
+
const request = (r.toApiJson) ? r : new ListTestCasesByConnectionRequest(r);
|
|
4484
|
+
return this.http.post(this._host + "/ai_assistants.v1alpha1.IntegrationTestService/ListTestCasesByConnection", request.toApiJson(), this.apiOptions())
|
|
4485
|
+
.pipe(map(resp => ListTestCasesByConnectionResponse.fromProto(resp)));
|
|
4486
|
+
}
|
|
4487
|
+
upsertTestCases(r) {
|
|
4488
|
+
const request = (r.toApiJson) ? r : new UpsertTestCasesRequest(r);
|
|
4489
|
+
return this.http.post(this._host + "/ai_assistants.v1alpha1.IntegrationTestService/UpsertTestCases", request.toApiJson(), { ...this.apiOptions(), observe: 'response' });
|
|
4490
|
+
}
|
|
4491
|
+
deleteTestCases(r) {
|
|
4492
|
+
const request = (r.toApiJson) ? r : new DeleteTestCasesRequest(r);
|
|
4493
|
+
return this.http.post(this._host + "/ai_assistants.v1alpha1.IntegrationTestService/DeleteTestCases", request.toApiJson(), { ...this.apiOptions(), observe: 'response' });
|
|
4494
|
+
}
|
|
4495
|
+
runTests(r) {
|
|
4496
|
+
const request = (r.toApiJson) ? r : new RunTestsRequest(r);
|
|
4497
|
+
return this.http.post(this._host + "/ai_assistants.v1alpha1.IntegrationTestService/RunTests", request.toApiJson(), this.apiOptions())
|
|
4498
|
+
.pipe(map(resp => RunTestsResponse.fromProto(resp)));
|
|
4499
|
+
}
|
|
4500
|
+
}
|
|
4501
|
+
IntegrationTestApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: IntegrationTestApiService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
4502
|
+
IntegrationTestApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: IntegrationTestApiService, providedIn: 'root' });
|
|
4503
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: IntegrationTestApiService, decorators: [{
|
|
4504
|
+
type: Injectable,
|
|
4505
|
+
args: [{ providedIn: 'root' }]
|
|
4506
|
+
}] });
|
|
4507
|
+
|
|
4279
4508
|
// *********************************
|
|
4280
4509
|
// Code generated by sdkgen
|
|
4281
4510
|
// DO NOT EDIT!.
|
|
@@ -4445,5 +4674,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
4445
4674
|
* Generated bundle index. Do not edit.
|
|
4446
4675
|
*/
|
|
4447
4676
|
|
|
4448
|
-
export { Access, Assistant, AssistantApiService, AssistantKey, AssistantType, BuildDefaultAssistantRequest, BuildDefaultAssistantResponse, ChatAnswerFunctionExecutionJob, ChatAnswerFunctionExecutionJobResult, ChatAnswerFunctionExecutionJobStatus, ChatChannel, ChatMessage, ChatMessageRole, ChatUserInfo, Config, ConfigInboxConfig, ConfigVoiceConfig, ConfigurableGoal, Connection, ConnectionApiService, ConnectionKey, CreateAssistantRequest, CreateAssistantRequestOptions, CreateAssistantResponse, CreateGoalRequest, CreateGoalResponse, CreatePromptModuleRequest, CreatePromptModuleResponse, CreatePromptModuleVersionRequest, CreatePromptModuleVersionRequestOptions, CreatePromptRequest, DeepgramConfig, DeleteAssistantRequest, DeleteConnectionRequest, DeleteFunctionRequest, DeleteGoalRequest, DeletePromptModuleRequest, DeletePromptRequest, DeployPromptModuleRequest, DeployPromptRequest, ExecuteFunctionRequest, ExecuteFunctionResponse, FieldMask, Function, FunctionApiService, FunctionAuthStrategy, FunctionAuthStrategyPlatformManagedFunctionAuthStrategy, FunctionAuthStrategyUnspecifiedFunctionAuthStrategy, FunctionHeader, FunctionKey, FunctionParameter, FunctionParameterParameterLocation, GenerateChatAnswerRequest, GenerateChatAnswerRequestOptions, GenerateChatAnswerResponse, GetAssistantRequest, GetAssistantResponse, GetChatAnswerFunctionExecutionJobRequest, GetChatAnswerFunctionExecutionJobResponse, GetConnectionRequest, GetConnectionResponse, GetDeployedPromptModuleVersionRequest, GetDeployedPromptModuleVersionResponse, GetDeployedPromptVersionRequest, GetDeployedPromptVersionResponse, GetFunctionRequest, GetFunctionResponse, GetGoalRequest, GetGoalResponse, GetHydratedDeployedPromptModuleVersionRequest, GetHydratedDeployedPromptModuleVersionResponse, GetMultiDeployedPromptVersionRequest, GetMultiDeployedPromptVersionResponse, GetMultiFunctionRequest, GetMultiFunctionResponse, GetMultiGoalRequest, GetMultiGoalResponse, GetMultiHydratedDeployedPromptModuleVersionRequest, GetMultiHydratedDeployedPromptModuleVersionResponse, GetPromptModuleRequest, GetPromptModuleResponse, GetPromptModuleVersionRequest, GetPromptModuleVersionResponse, GetPromptRequest, GetPromptResponse, GetPromptVersionRequest, GetPromptVersionResponse, Goal, GoalApiService, GoalChannel, GoalKey, GoalType, GoalsDisabledForAccountGroupRequest, GoalsDisabledForAccountGroupResponse, HostService, KeyValuePair, ListAllAssistantsAssociatedToConnectionRequest, ListAllAssistantsAssociatedToConnectionRequestFilters, ListAllAssistantsAssociatedToConnectionResponse, ListAssistantRequest, ListAssistantRequestFilters, ListAssistantResponse, ListConnectionsRequest, ListConnectionsRequestFilters, ListConnectionsResponse, ListFunctionRequest, ListFunctionRequestFilters, ListFunctionResponse, ListGoalsRequest, ListGoalsRequestFilters, ListGoalsResponse, ListPromptModuleRequest, ListPromptModuleRequestFilters, ListPromptModuleResponse, ListPromptModuleVersionsRequest, ListPromptModuleVersionsResponse, ListPromptRequest, ListPromptResponse, ListPromptVersionsRequest, ListPromptVersionsResponse,
|
|
4677
|
+
export { Access, Assistant, AssistantApiService, AssistantKey, AssistantType, BuildDefaultAssistantRequest, BuildDefaultAssistantResponse, ChatAnswerFunctionExecutionJob, ChatAnswerFunctionExecutionJobResult, ChatAnswerFunctionExecutionJobStatus, ChatChannel, ChatMessage, ChatMessageRole, ChatUserInfo, Config, ConfigInboxConfig, ConfigVoiceConfig, ConfigurableGoal, Connection, ConnectionApiService, ConnectionKey, ContextInfo, CreateAssistantRequest, CreateAssistantRequestOptions, CreateAssistantResponse, CreateGoalRequest, CreateGoalResponse, CreatePromptModuleRequest, CreatePromptModuleResponse, CreatePromptModuleVersionRequest, CreatePromptModuleVersionRequestOptions, CreatePromptRequest, DeepgramConfig, DeleteAssistantRequest, DeleteConnectionRequest, DeleteFunctionRequest, DeleteGoalRequest, DeletePromptModuleRequest, DeletePromptRequest, DeleteTestCasesRequest, DeployPromptModuleRequest, DeployPromptRequest, ExecuteFunctionRequest, ExecuteFunctionResponse, FieldMask, Function, FunctionApiService, FunctionAuthStrategy, FunctionAuthStrategyPlatformManagedFunctionAuthStrategy, FunctionAuthStrategyUnspecifiedFunctionAuthStrategy, FunctionHeader, FunctionKey, FunctionParameter, FunctionParameterParameterLocation, GenerateChatAnswerRequest, GenerateChatAnswerRequestOptions, GenerateChatAnswerResponse, GetAssistantRequest, GetAssistantResponse, GetChatAnswerFunctionExecutionJobRequest, GetChatAnswerFunctionExecutionJobResponse, GetConnectionRequest, GetConnectionResponse, GetDeployedPromptModuleVersionRequest, GetDeployedPromptModuleVersionResponse, GetDeployedPromptVersionRequest, GetDeployedPromptVersionResponse, GetFunctionRequest, GetFunctionResponse, GetGoalRequest, GetGoalResponse, GetHydratedDeployedPromptModuleVersionRequest, GetHydratedDeployedPromptModuleVersionResponse, GetMultiDeployedPromptVersionRequest, GetMultiDeployedPromptVersionResponse, GetMultiFunctionRequest, GetMultiFunctionResponse, GetMultiGoalRequest, GetMultiGoalResponse, GetMultiHydratedDeployedPromptModuleVersionRequest, GetMultiHydratedDeployedPromptModuleVersionResponse, GetPromptModuleRequest, GetPromptModuleResponse, GetPromptModuleVersionRequest, GetPromptModuleVersionResponse, GetPromptRequest, GetPromptResponse, GetPromptVersionRequest, GetPromptVersionResponse, Goal, GoalApiService, GoalChannel, GoalKey, GoalType, GoalsDisabledForAccountGroupRequest, GoalsDisabledForAccountGroupResponse, HostService, IntegrationTestApiService, KeyValuePair, ListAllAssistantsAssociatedToConnectionRequest, ListAllAssistantsAssociatedToConnectionRequestFilters, ListAllAssistantsAssociatedToConnectionResponse, ListAssistantRequest, ListAssistantRequestFilters, ListAssistantResponse, ListConnectionsRequest, ListConnectionsRequestFilters, ListConnectionsResponse, ListFunctionRequest, ListFunctionRequestFilters, ListFunctionResponse, ListGoalsRequest, ListGoalsRequestFilters, ListGoalsResponse, ListPromptModuleRequest, ListPromptModuleRequestFilters, ListPromptModuleResponse, ListPromptModuleVersionsRequest, ListPromptModuleVersionsResponse, ListPromptRequest, ListPromptResponse, ListPromptVersionsRequest, ListPromptVersionsResponse, ListTestCasesByConnectionRequest, ListTestCasesByConnectionResponse, ModelConfig, Namespace, NamespaceAccountGroupNamespace, NamespaceGlobalNamespace, NamespacePartnerNamespace, NamespaceSystemNamespace, OpenAIRealtimeConfig, OpenAIRealtimeConfigTurnDetection, PagedRequestOptions, PagedResponseMetadata, Prompt, PromptApiService, PromptModule, PromptModuleApiService, PromptModuleKey, PromptModuleVersion, PromptVersion, RunTestsRequest, RunTestsResponse, SetAssistantConnectionsRequest, SetAssistantConnectionsRequestConnectionState, TestCase, UpdateAssistantRequest, UpdateGoalRequest, UpdatePromptModuleRequest, UpdatePromptRequest, UpsertAssistantRequest, UpsertAssistantRequestOptions, UpsertAssistantResponse, UpsertConnectionRequest, UpsertFunctionRequest, UpsertGoalRequest, UpsertTestCasesRequest, VendorModel };
|
|
4449
4678
|
//# sourceMappingURL=vendasta-ai-assistants.mjs.map
|