@vendasta/ai-assistants 0.44.0 → 0.45.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/function.api.service.mjs +16 -2
- package/esm2020/lib/_internal/interfaces/function.interface.mjs +1 -1
- package/esm2020/lib/_internal/interfaces/index.mjs +1 -1
- package/esm2020/lib/_internal/objects/function.mjs +208 -1
- package/esm2020/lib/_internal/objects/index.mjs +3 -3
- package/fesm2015/vendasta-ai-assistants.mjs +300 -80
- package/fesm2015/vendasta-ai-assistants.mjs.map +1 -1
- package/fesm2020/vendasta-ai-assistants.mjs +300 -80
- package/fesm2020/vendasta-ai-assistants.mjs.map +1 -1
- package/lib/_internal/function.api.service.d.ts +5 -2
- package/lib/_internal/interfaces/function.interface.d.ts +33 -0
- package/lib/_internal/interfaces/index.d.ts +2 -2
- package/lib/_internal/objects/function.d.ts +54 -0
- package/lib/_internal/objects/index.d.ts +2 -2
- package/package.json +1 -1
|
@@ -297,6 +297,94 @@ function enumStringToValue$c(enumRef, value) {
|
|
|
297
297
|
}
|
|
298
298
|
return enumRef[value];
|
|
299
299
|
}
|
|
300
|
+
class PagedRequestOptions {
|
|
301
|
+
static fromProto(proto) {
|
|
302
|
+
let m = new PagedRequestOptions();
|
|
303
|
+
m = Object.assign(m, proto);
|
|
304
|
+
if (proto.pageSize) {
|
|
305
|
+
m.pageSize = parseInt(proto.pageSize, 10);
|
|
306
|
+
}
|
|
307
|
+
return m;
|
|
308
|
+
}
|
|
309
|
+
constructor(kwargs) {
|
|
310
|
+
if (!kwargs) {
|
|
311
|
+
return;
|
|
312
|
+
}
|
|
313
|
+
Object.assign(this, kwargs);
|
|
314
|
+
}
|
|
315
|
+
toApiJson() {
|
|
316
|
+
const toReturn = {};
|
|
317
|
+
if (typeof this.cursor !== 'undefined') {
|
|
318
|
+
toReturn['cursor'] = this.cursor;
|
|
319
|
+
}
|
|
320
|
+
if (typeof this.pageSize !== 'undefined') {
|
|
321
|
+
toReturn['pageSize'] = this.pageSize;
|
|
322
|
+
}
|
|
323
|
+
return toReturn;
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
class PagedResponseMetadata {
|
|
327
|
+
static fromProto(proto) {
|
|
328
|
+
let m = new PagedResponseMetadata();
|
|
329
|
+
m = Object.assign(m, proto);
|
|
330
|
+
if (proto.totalResults) {
|
|
331
|
+
m.totalResults = parseInt(proto.totalResults, 10);
|
|
332
|
+
}
|
|
333
|
+
return m;
|
|
334
|
+
}
|
|
335
|
+
constructor(kwargs) {
|
|
336
|
+
if (!kwargs) {
|
|
337
|
+
return;
|
|
338
|
+
}
|
|
339
|
+
Object.assign(this, kwargs);
|
|
340
|
+
}
|
|
341
|
+
toApiJson() {
|
|
342
|
+
const toReturn = {};
|
|
343
|
+
if (typeof this.nextCursor !== 'undefined') {
|
|
344
|
+
toReturn['nextCursor'] = this.nextCursor;
|
|
345
|
+
}
|
|
346
|
+
if (typeof this.hasMore !== 'undefined') {
|
|
347
|
+
toReturn['hasMore'] = this.hasMore;
|
|
348
|
+
}
|
|
349
|
+
if (typeof this.totalResults !== 'undefined') {
|
|
350
|
+
toReturn['totalResults'] = this.totalResults;
|
|
351
|
+
}
|
|
352
|
+
return toReturn;
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
function enumStringToValue$b(enumRef, value) {
|
|
357
|
+
if (typeof value === 'number') {
|
|
358
|
+
return value;
|
|
359
|
+
}
|
|
360
|
+
return enumRef[value];
|
|
361
|
+
}
|
|
362
|
+
class ListMCPsRequestFilters {
|
|
363
|
+
static fromProto(proto) {
|
|
364
|
+
let m = new ListMCPsRequestFilters();
|
|
365
|
+
m = Object.assign(m, proto);
|
|
366
|
+
if (proto.namespaces) {
|
|
367
|
+
m.namespaces = proto.namespaces.map(Namespace.fromProto);
|
|
368
|
+
}
|
|
369
|
+
return m;
|
|
370
|
+
}
|
|
371
|
+
constructor(kwargs) {
|
|
372
|
+
if (!kwargs) {
|
|
373
|
+
return;
|
|
374
|
+
}
|
|
375
|
+
Object.assign(this, kwargs);
|
|
376
|
+
}
|
|
377
|
+
toApiJson() {
|
|
378
|
+
const toReturn = {};
|
|
379
|
+
if (typeof this.namespaces !== 'undefined' && this.namespaces !== null) {
|
|
380
|
+
toReturn['namespaces'] = 'toApiJson' in this.namespaces ? this.namespaces.toApiJson() : this.namespaces;
|
|
381
|
+
}
|
|
382
|
+
if (typeof this.mcpIds !== 'undefined') {
|
|
383
|
+
toReturn['mcpIds'] = this.mcpIds;
|
|
384
|
+
}
|
|
385
|
+
return toReturn;
|
|
386
|
+
}
|
|
387
|
+
}
|
|
300
388
|
class Function {
|
|
301
389
|
static fromProto(proto) {
|
|
302
390
|
let m = new Function();
|
|
@@ -451,7 +539,7 @@ class FunctionParameter {
|
|
|
451
539
|
m.items = FunctionParameter.fromProto(proto.items);
|
|
452
540
|
}
|
|
453
541
|
if (proto.location) {
|
|
454
|
-
m.location = enumStringToValue$
|
|
542
|
+
m.location = enumStringToValue$b(FunctionParameterParameterLocation, proto.location);
|
|
455
543
|
}
|
|
456
544
|
return m;
|
|
457
545
|
}
|
|
@@ -487,6 +575,151 @@ class FunctionParameter {
|
|
|
487
575
|
return toReturn;
|
|
488
576
|
}
|
|
489
577
|
}
|
|
578
|
+
class ListMCPToolsRequest {
|
|
579
|
+
static fromProto(proto) {
|
|
580
|
+
let m = new ListMCPToolsRequest();
|
|
581
|
+
m = Object.assign(m, proto);
|
|
582
|
+
if (proto.namespace) {
|
|
583
|
+
m.namespace = Namespace.fromProto(proto.namespace);
|
|
584
|
+
}
|
|
585
|
+
if (proto.authStrategy) {
|
|
586
|
+
m.authStrategy = FunctionAuthStrategy.fromProto(proto.authStrategy);
|
|
587
|
+
}
|
|
588
|
+
if (proto.headers) {
|
|
589
|
+
m.headers = proto.headers.map(FunctionHeader.fromProto);
|
|
590
|
+
}
|
|
591
|
+
return m;
|
|
592
|
+
}
|
|
593
|
+
constructor(kwargs) {
|
|
594
|
+
if (!kwargs) {
|
|
595
|
+
return;
|
|
596
|
+
}
|
|
597
|
+
Object.assign(this, kwargs);
|
|
598
|
+
}
|
|
599
|
+
toApiJson() {
|
|
600
|
+
const toReturn = {};
|
|
601
|
+
if (typeof this.namespace !== 'undefined' && this.namespace !== null) {
|
|
602
|
+
toReturn['namespace'] = 'toApiJson' in this.namespace ? this.namespace.toApiJson() : this.namespace;
|
|
603
|
+
}
|
|
604
|
+
if (typeof this.url !== 'undefined') {
|
|
605
|
+
toReturn['url'] = this.url;
|
|
606
|
+
}
|
|
607
|
+
if (typeof this.authStrategy !== 'undefined' && this.authStrategy !== null) {
|
|
608
|
+
toReturn['authStrategy'] = 'toApiJson' in this.authStrategy ? this.authStrategy.toApiJson() : this.authStrategy;
|
|
609
|
+
}
|
|
610
|
+
if (typeof this.headers !== 'undefined' && this.headers !== null) {
|
|
611
|
+
toReturn['headers'] = 'toApiJson' in this.headers ? this.headers.toApiJson() : this.headers;
|
|
612
|
+
}
|
|
613
|
+
if (typeof this.mcpId !== 'undefined') {
|
|
614
|
+
toReturn['mcpId'] = this.mcpId;
|
|
615
|
+
}
|
|
616
|
+
return toReturn;
|
|
617
|
+
}
|
|
618
|
+
}
|
|
619
|
+
class ListMCPToolsResponse {
|
|
620
|
+
static fromProto(proto) {
|
|
621
|
+
let m = new ListMCPToolsResponse();
|
|
622
|
+
m = Object.assign(m, proto);
|
|
623
|
+
if (proto.functions) {
|
|
624
|
+
m.functions = proto.functions.map(Function.fromProto);
|
|
625
|
+
}
|
|
626
|
+
return m;
|
|
627
|
+
}
|
|
628
|
+
constructor(kwargs) {
|
|
629
|
+
if (!kwargs) {
|
|
630
|
+
return;
|
|
631
|
+
}
|
|
632
|
+
Object.assign(this, kwargs);
|
|
633
|
+
}
|
|
634
|
+
toApiJson() {
|
|
635
|
+
const toReturn = {};
|
|
636
|
+
if (typeof this.functions !== 'undefined' && this.functions !== null) {
|
|
637
|
+
toReturn['functions'] = 'toApiJson' in this.functions ? this.functions.toApiJson() : this.functions;
|
|
638
|
+
}
|
|
639
|
+
return toReturn;
|
|
640
|
+
}
|
|
641
|
+
}
|
|
642
|
+
class ListMCPsRequest {
|
|
643
|
+
static fromProto(proto) {
|
|
644
|
+
let m = new ListMCPsRequest();
|
|
645
|
+
m = Object.assign(m, proto);
|
|
646
|
+
if (proto.filters) {
|
|
647
|
+
m.filters = ListMCPsRequestFilters.fromProto(proto.filters);
|
|
648
|
+
}
|
|
649
|
+
if (proto.pagingOptions) {
|
|
650
|
+
m.pagingOptions = PagedRequestOptions.fromProto(proto.pagingOptions);
|
|
651
|
+
}
|
|
652
|
+
return m;
|
|
653
|
+
}
|
|
654
|
+
constructor(kwargs) {
|
|
655
|
+
if (!kwargs) {
|
|
656
|
+
return;
|
|
657
|
+
}
|
|
658
|
+
Object.assign(this, kwargs);
|
|
659
|
+
}
|
|
660
|
+
toApiJson() {
|
|
661
|
+
const toReturn = {};
|
|
662
|
+
if (typeof this.filters !== 'undefined' && this.filters !== null) {
|
|
663
|
+
toReturn['filters'] = 'toApiJson' in this.filters ? this.filters.toApiJson() : this.filters;
|
|
664
|
+
}
|
|
665
|
+
if (typeof this.pagingOptions !== 'undefined' && this.pagingOptions !== null) {
|
|
666
|
+
toReturn['pagingOptions'] = 'toApiJson' in this.pagingOptions ? this.pagingOptions.toApiJson() : this.pagingOptions;
|
|
667
|
+
}
|
|
668
|
+
return toReturn;
|
|
669
|
+
}
|
|
670
|
+
}
|
|
671
|
+
class ListMCPsResponse {
|
|
672
|
+
static fromProto(proto) {
|
|
673
|
+
let m = new ListMCPsResponse();
|
|
674
|
+
m = Object.assign(m, proto);
|
|
675
|
+
if (proto.mcps) {
|
|
676
|
+
m.mcps = proto.mcps.map(MCP.fromProto);
|
|
677
|
+
}
|
|
678
|
+
if (proto.pagingMetadata) {
|
|
679
|
+
m.pagingMetadata = PagedResponseMetadata.fromProto(proto.pagingMetadata);
|
|
680
|
+
}
|
|
681
|
+
return m;
|
|
682
|
+
}
|
|
683
|
+
constructor(kwargs) {
|
|
684
|
+
if (!kwargs) {
|
|
685
|
+
return;
|
|
686
|
+
}
|
|
687
|
+
Object.assign(this, kwargs);
|
|
688
|
+
}
|
|
689
|
+
toApiJson() {
|
|
690
|
+
const toReturn = {};
|
|
691
|
+
if (typeof this.mcps !== 'undefined' && this.mcps !== null) {
|
|
692
|
+
toReturn['mcps'] = 'toApiJson' in this.mcps ? this.mcps.toApiJson() : this.mcps;
|
|
693
|
+
}
|
|
694
|
+
if (typeof this.pagingMetadata !== 'undefined' && this.pagingMetadata !== null) {
|
|
695
|
+
toReturn['pagingMetadata'] = 'toApiJson' in this.pagingMetadata ? this.pagingMetadata.toApiJson() : this.pagingMetadata;
|
|
696
|
+
}
|
|
697
|
+
return toReturn;
|
|
698
|
+
}
|
|
699
|
+
}
|
|
700
|
+
class MCP {
|
|
701
|
+
static fromProto(proto) {
|
|
702
|
+
let m = new MCP();
|
|
703
|
+
m = Object.assign(m, proto);
|
|
704
|
+
return m;
|
|
705
|
+
}
|
|
706
|
+
constructor(kwargs) {
|
|
707
|
+
if (!kwargs) {
|
|
708
|
+
return;
|
|
709
|
+
}
|
|
710
|
+
Object.assign(this, kwargs);
|
|
711
|
+
}
|
|
712
|
+
toApiJson() {
|
|
713
|
+
const toReturn = {};
|
|
714
|
+
if (typeof this.id !== 'undefined') {
|
|
715
|
+
toReturn['id'] = this.id;
|
|
716
|
+
}
|
|
717
|
+
if (typeof this.url !== 'undefined') {
|
|
718
|
+
toReturn['url'] = this.url;
|
|
719
|
+
}
|
|
720
|
+
return toReturn;
|
|
721
|
+
}
|
|
722
|
+
}
|
|
490
723
|
class FunctionAuthStrategyPlatformManagedFunctionAuthStrategy {
|
|
491
724
|
static fromProto(proto) {
|
|
492
725
|
let m = new FunctionAuthStrategyPlatformManagedFunctionAuthStrategy();
|
|
@@ -524,8 +757,43 @@ class FunctionAuthStrategyUnspecifiedFunctionAuthStrategy {
|
|
|
524
757
|
return toReturn;
|
|
525
758
|
}
|
|
526
759
|
}
|
|
760
|
+
class UpsertMCPRequest {
|
|
761
|
+
static fromProto(proto) {
|
|
762
|
+
let m = new UpsertMCPRequest();
|
|
763
|
+
m = Object.assign(m, proto);
|
|
764
|
+
if (proto.namespace) {
|
|
765
|
+
m.namespace = Namespace.fromProto(proto.namespace);
|
|
766
|
+
}
|
|
767
|
+
if (proto.functions) {
|
|
768
|
+
m.functions = proto.functions.map(Function.fromProto);
|
|
769
|
+
}
|
|
770
|
+
return m;
|
|
771
|
+
}
|
|
772
|
+
constructor(kwargs) {
|
|
773
|
+
if (!kwargs) {
|
|
774
|
+
return;
|
|
775
|
+
}
|
|
776
|
+
Object.assign(this, kwargs);
|
|
777
|
+
}
|
|
778
|
+
toApiJson() {
|
|
779
|
+
const toReturn = {};
|
|
780
|
+
if (typeof this.namespace !== 'undefined' && this.namespace !== null) {
|
|
781
|
+
toReturn['namespace'] = 'toApiJson' in this.namespace ? this.namespace.toApiJson() : this.namespace;
|
|
782
|
+
}
|
|
783
|
+
if (typeof this.url !== 'undefined') {
|
|
784
|
+
toReturn['url'] = this.url;
|
|
785
|
+
}
|
|
786
|
+
if (typeof this.mcpId !== 'undefined') {
|
|
787
|
+
toReturn['mcpId'] = this.mcpId;
|
|
788
|
+
}
|
|
789
|
+
if (typeof this.functions !== 'undefined' && this.functions !== null) {
|
|
790
|
+
toReturn['functions'] = 'toApiJson' in this.functions ? this.functions.toApiJson() : this.functions;
|
|
791
|
+
}
|
|
792
|
+
return toReturn;
|
|
793
|
+
}
|
|
794
|
+
}
|
|
527
795
|
|
|
528
|
-
function enumStringToValue$
|
|
796
|
+
function enumStringToValue$a(enumRef, value) {
|
|
529
797
|
if (typeof value === 'number') {
|
|
530
798
|
return value;
|
|
531
799
|
}
|
|
@@ -728,7 +996,7 @@ class PromptVersion {
|
|
|
728
996
|
}
|
|
729
997
|
}
|
|
730
998
|
|
|
731
|
-
function enumStringToValue$
|
|
999
|
+
function enumStringToValue$9(enumRef, value) {
|
|
732
1000
|
if (typeof value === 'number') {
|
|
733
1001
|
return value;
|
|
734
1002
|
}
|
|
@@ -742,7 +1010,7 @@ class Goal {
|
|
|
742
1010
|
m.namespace = Namespace.fromProto(proto.namespace);
|
|
743
1011
|
}
|
|
744
1012
|
if (proto.type) {
|
|
745
|
-
m.type = enumStringToValue$
|
|
1013
|
+
m.type = enumStringToValue$9(GoalType, proto.type);
|
|
746
1014
|
}
|
|
747
1015
|
if (proto.promptModules) {
|
|
748
1016
|
m.promptModules = proto.promptModules.map(PromptModule.fromProto);
|
|
@@ -754,7 +1022,7 @@ class Goal {
|
|
|
754
1022
|
m.updated = new Date(proto.updated);
|
|
755
1023
|
}
|
|
756
1024
|
if (proto.supportedChannels) {
|
|
757
|
-
m.supportedChannels = proto.supportedChannels.map((v) => enumStringToValue$
|
|
1025
|
+
m.supportedChannels = proto.supportedChannels.map((v) => enumStringToValue$9(GoalChannel, v));
|
|
758
1026
|
}
|
|
759
1027
|
if (proto.overrideOf) {
|
|
760
1028
|
m.overrideOf = GoalKey.fromProto(proto.overrideOf);
|
|
@@ -835,7 +1103,7 @@ class GoalKey {
|
|
|
835
1103
|
}
|
|
836
1104
|
}
|
|
837
1105
|
|
|
838
|
-
function enumStringToValue$
|
|
1106
|
+
function enumStringToValue$8(enumRef, value) {
|
|
839
1107
|
if (typeof value === 'number') {
|
|
840
1108
|
return value;
|
|
841
1109
|
}
|
|
@@ -865,7 +1133,7 @@ class KeyValuePair {
|
|
|
865
1133
|
}
|
|
866
1134
|
}
|
|
867
1135
|
|
|
868
|
-
function enumStringToValue$
|
|
1136
|
+
function enumStringToValue$7(enumRef, value) {
|
|
869
1137
|
if (typeof value === 'number') {
|
|
870
1138
|
return value;
|
|
871
1139
|
}
|
|
@@ -876,10 +1144,10 @@ class Model {
|
|
|
876
1144
|
let m = new Model();
|
|
877
1145
|
m = Object.assign(m, proto);
|
|
878
1146
|
if (proto.vendor) {
|
|
879
|
-
m.vendor = enumStringToValue$
|
|
1147
|
+
m.vendor = enumStringToValue$7(ModelVendor, proto.vendor);
|
|
880
1148
|
}
|
|
881
1149
|
if (proto.type) {
|
|
882
|
-
m.type = enumStringToValue$
|
|
1150
|
+
m.type = enumStringToValue$7(ModelType, proto.type);
|
|
883
1151
|
}
|
|
884
1152
|
return m;
|
|
885
1153
|
}
|
|
@@ -910,7 +1178,7 @@ class Model {
|
|
|
910
1178
|
}
|
|
911
1179
|
}
|
|
912
1180
|
|
|
913
|
-
function enumStringToValue$
|
|
1181
|
+
function enumStringToValue$6(enumRef, value) {
|
|
914
1182
|
if (typeof value === 'number') {
|
|
915
1183
|
return value;
|
|
916
1184
|
}
|
|
@@ -924,7 +1192,7 @@ class Assistant {
|
|
|
924
1192
|
m.namespace = Namespace.fromProto(proto.namespace);
|
|
925
1193
|
}
|
|
926
1194
|
if (proto.type) {
|
|
927
|
-
m.type = enumStringToValue$
|
|
1195
|
+
m.type = enumStringToValue$6(AssistantType, proto.type);
|
|
928
1196
|
}
|
|
929
1197
|
if (proto.config) {
|
|
930
1198
|
m.config = Config.fromProto(proto.config);
|
|
@@ -1214,7 +1482,7 @@ class ConfigVoiceConfig {
|
|
|
1214
1482
|
let m = new ConfigVoiceConfig();
|
|
1215
1483
|
m = Object.assign(m, proto);
|
|
1216
1484
|
if (proto.vendorModel) {
|
|
1217
|
-
m.vendorModel = enumStringToValue$
|
|
1485
|
+
m.vendorModel = enumStringToValue$6(VendorModel, proto.vendorModel);
|
|
1218
1486
|
}
|
|
1219
1487
|
if (proto.modelConfig) {
|
|
1220
1488
|
m.modelConfig = ModelConfig.fromProto(proto.modelConfig);
|
|
@@ -1239,7 +1507,7 @@ class ConfigVoiceConfig {
|
|
|
1239
1507
|
}
|
|
1240
1508
|
}
|
|
1241
1509
|
|
|
1242
|
-
function enumStringToValue$
|
|
1510
|
+
function enumStringToValue$5(enumRef, value) {
|
|
1243
1511
|
if (typeof value === 'number') {
|
|
1244
1512
|
return value;
|
|
1245
1513
|
}
|
|
@@ -1256,7 +1524,7 @@ class Connection {
|
|
|
1256
1524
|
m.assistantKeys = proto.assistantKeys.map(AssistantKey.fromProto);
|
|
1257
1525
|
}
|
|
1258
1526
|
if (proto.supportedAssistantTypes) {
|
|
1259
|
-
m.supportedAssistantTypes = proto.supportedAssistantTypes.map((v) => enumStringToValue$
|
|
1527
|
+
m.supportedAssistantTypes = proto.supportedAssistantTypes.map((v) => enumStringToValue$5(AssistantType, v));
|
|
1260
1528
|
}
|
|
1261
1529
|
return m;
|
|
1262
1530
|
}
|
|
@@ -1331,7 +1599,7 @@ class ConnectionKey {
|
|
|
1331
1599
|
}
|
|
1332
1600
|
}
|
|
1333
1601
|
|
|
1334
|
-
function enumStringToValue$
|
|
1602
|
+
function enumStringToValue$4(enumRef, value) {
|
|
1335
1603
|
if (typeof value === 'number') {
|
|
1336
1604
|
return value;
|
|
1337
1605
|
}
|
|
@@ -1342,7 +1610,7 @@ class ChatAnswerFunctionExecutionJob {
|
|
|
1342
1610
|
let m = new ChatAnswerFunctionExecutionJob();
|
|
1343
1611
|
m = Object.assign(m, proto);
|
|
1344
1612
|
if (proto.status) {
|
|
1345
|
-
m.status = enumStringToValue$
|
|
1613
|
+
m.status = enumStringToValue$4(ChatAnswerFunctionExecutionJobStatus, proto.status);
|
|
1346
1614
|
}
|
|
1347
1615
|
if (proto.result) {
|
|
1348
1616
|
m.result = ChatAnswerFunctionExecutionJobResult.fromProto(proto.result);
|
|
@@ -1403,7 +1671,7 @@ class ChatMessage {
|
|
|
1403
1671
|
let m = new ChatMessage();
|
|
1404
1672
|
m = Object.assign(m, proto);
|
|
1405
1673
|
if (proto.role) {
|
|
1406
|
-
m.role = enumStringToValue$
|
|
1674
|
+
m.role = enumStringToValue$4(ChatMessageRole, proto.role);
|
|
1407
1675
|
}
|
|
1408
1676
|
return m;
|
|
1409
1677
|
}
|
|
@@ -1495,68 +1763,6 @@ class ContextInfo {
|
|
|
1495
1763
|
}
|
|
1496
1764
|
}
|
|
1497
1765
|
|
|
1498
|
-
function enumStringToValue$4(enumRef, value) {
|
|
1499
|
-
if (typeof value === 'number') {
|
|
1500
|
-
return value;
|
|
1501
|
-
}
|
|
1502
|
-
return enumRef[value];
|
|
1503
|
-
}
|
|
1504
|
-
class PagedRequestOptions {
|
|
1505
|
-
static fromProto(proto) {
|
|
1506
|
-
let m = new PagedRequestOptions();
|
|
1507
|
-
m = Object.assign(m, proto);
|
|
1508
|
-
if (proto.pageSize) {
|
|
1509
|
-
m.pageSize = parseInt(proto.pageSize, 10);
|
|
1510
|
-
}
|
|
1511
|
-
return m;
|
|
1512
|
-
}
|
|
1513
|
-
constructor(kwargs) {
|
|
1514
|
-
if (!kwargs) {
|
|
1515
|
-
return;
|
|
1516
|
-
}
|
|
1517
|
-
Object.assign(this, kwargs);
|
|
1518
|
-
}
|
|
1519
|
-
toApiJson() {
|
|
1520
|
-
const toReturn = {};
|
|
1521
|
-
if (typeof this.cursor !== 'undefined') {
|
|
1522
|
-
toReturn['cursor'] = this.cursor;
|
|
1523
|
-
}
|
|
1524
|
-
if (typeof this.pageSize !== 'undefined') {
|
|
1525
|
-
toReturn['pageSize'] = this.pageSize;
|
|
1526
|
-
}
|
|
1527
|
-
return toReturn;
|
|
1528
|
-
}
|
|
1529
|
-
}
|
|
1530
|
-
class PagedResponseMetadata {
|
|
1531
|
-
static fromProto(proto) {
|
|
1532
|
-
let m = new PagedResponseMetadata();
|
|
1533
|
-
m = Object.assign(m, proto);
|
|
1534
|
-
if (proto.totalResults) {
|
|
1535
|
-
m.totalResults = parseInt(proto.totalResults, 10);
|
|
1536
|
-
}
|
|
1537
|
-
return m;
|
|
1538
|
-
}
|
|
1539
|
-
constructor(kwargs) {
|
|
1540
|
-
if (!kwargs) {
|
|
1541
|
-
return;
|
|
1542
|
-
}
|
|
1543
|
-
Object.assign(this, kwargs);
|
|
1544
|
-
}
|
|
1545
|
-
toApiJson() {
|
|
1546
|
-
const toReturn = {};
|
|
1547
|
-
if (typeof this.nextCursor !== 'undefined') {
|
|
1548
|
-
toReturn['nextCursor'] = this.nextCursor;
|
|
1549
|
-
}
|
|
1550
|
-
if (typeof this.hasMore !== 'undefined') {
|
|
1551
|
-
toReturn['hasMore'] = this.hasMore;
|
|
1552
|
-
}
|
|
1553
|
-
if (typeof this.totalResults !== 'undefined') {
|
|
1554
|
-
toReturn['totalResults'] = this.totalResults;
|
|
1555
|
-
}
|
|
1556
|
-
return toReturn;
|
|
1557
|
-
}
|
|
1558
|
-
}
|
|
1559
|
-
|
|
1560
1766
|
function enumStringToValue$3(enumRef, value) {
|
|
1561
1767
|
if (typeof value === 'number') {
|
|
1562
1768
|
return value;
|
|
@@ -4944,6 +5150,20 @@ class FunctionApiService {
|
|
|
4944
5150
|
const request = (r.toApiJson) ? r : new DeleteFunctionRequest(r);
|
|
4945
5151
|
return this.http.post(this._host + "/ai_assistants.v1alpha1.FunctionService/Delete", request.toApiJson(), { ...this.apiOptions(), observe: 'response' });
|
|
4946
5152
|
}
|
|
5153
|
+
listMcpTools(r) {
|
|
5154
|
+
const request = (r.toApiJson) ? r : new ListMCPToolsRequest(r);
|
|
5155
|
+
return this.http.post(this._host + "/ai_assistants.v1alpha1.FunctionService/ListMCPTools", request.toApiJson(), this.apiOptions())
|
|
5156
|
+
.pipe(map(resp => ListMCPToolsResponse.fromProto(resp)));
|
|
5157
|
+
}
|
|
5158
|
+
upsertMcp(r) {
|
|
5159
|
+
const request = (r.toApiJson) ? r : new UpsertMCPRequest(r);
|
|
5160
|
+
return this.http.post(this._host + "/ai_assistants.v1alpha1.FunctionService/UpsertMCP", request.toApiJson(), { ...this.apiOptions(), observe: 'response' });
|
|
5161
|
+
}
|
|
5162
|
+
listMcPs(r) {
|
|
5163
|
+
const request = (r.toApiJson) ? r : new ListMCPsRequest(r);
|
|
5164
|
+
return this.http.post(this._host + "/ai_assistants.v1alpha1.FunctionService/ListMCPs", request.toApiJson(), this.apiOptions())
|
|
5165
|
+
.pipe(map(resp => ListMCPsResponse.fromProto(resp)));
|
|
5166
|
+
}
|
|
4947
5167
|
}
|
|
4948
5168
|
FunctionApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: FunctionApiService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
4949
5169
|
FunctionApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: FunctionApiService, providedIn: 'root' });
|
|
@@ -5246,5 +5466,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
5246
5466
|
* Generated bundle index. Do not edit.
|
|
5247
5467
|
*/
|
|
5248
5468
|
|
|
5249
|
-
export { Access, Assistant, AssistantApiService, AssistantKey, AssistantType, BuildDefaultAssistantRequest, BuildDefaultAssistantResponse, CancelTestRunRequest, 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, ElevenLabsConfig, ExecuteFunctionRequest, ExecuteFunctionResponse, FieldMask, Function, FunctionApiService, FunctionAuthStrategy, FunctionAuthStrategyPlatformManagedFunctionAuthStrategy, FunctionAuthStrategyUnspecifiedFunctionAuthStrategy, FunctionHeader, FunctionKey, FunctionParameter, FunctionParameterParameterLocation, GenerateChatAnswerRequest, GenerateChatAnswerRequestOptions, GenerateChatAnswerResponse, GetAssistantRequest, GetAssistantRequestOptions, 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, GetTestRunRequest, GetTestRunResponse, Goal, GoalApiService, GoalChannel, GoalKey, GoalType, GoalsDisabledForAccountGroupRequest, GoalsDisabledForAccountGroupResponse, HostService, IntegrationTestApiService, KeyValuePair, ListAllAssistantsAssociatedToConnectionRequest, ListAllAssistantsAssociatedToConnectionRequestFilters, ListAllAssistantsAssociatedToConnectionResponse, ListAssistantRequest, ListAssistantRequestFilters, ListAssistantResponse, ListAvailableModelsRequest, ListAvailableModelsRequestFilters, ListAvailableModelsResponse, ListConnectionsRequest, ListConnectionsRequestFilters, ListConnectionsResponse, ListFunctionRequest, ListFunctionRequestFilters, ListFunctionResponse, ListGoalsRequest, ListGoalsRequestFilters, ListGoalsResponse, ListPromptModuleRequest, ListPromptModuleRequestFilters, ListPromptModuleResponse, ListPromptModuleVersionsRequest, ListPromptModuleVersionsResponse, ListPromptRequest, ListPromptResponse, ListPromptVersionsRequest, ListPromptVersionsResponse, ListTestCasesByAssistantRequest, ListTestCasesByAssistantResponse, ListTestRunsByAssistantRequest, ListTestRunsByAssistantResponse, MCPOptions, Model, ModelConfig, ModelType, ModelVendor, Namespace, NamespaceAccountGroupNamespace, NamespaceGlobalNamespace, NamespacePartnerNamespace, NamespaceSystemNamespace, OpenAIRealtimeConfig, OpenAIRealtimeConfigTurnDetection, PagedRequestOptions, PagedResponseMetadata, Prompt, PromptApiService, PromptModule, PromptModuleApiService, PromptModuleKey, PromptModuleVersion, PromptVersion, RunTestsRequest, RunTestsResponse, SetAssistantConnectionsRequest, SetAssistantConnectionsRequestConnectionState, SortDirection, SortOptions, TestCase, TestResult, TestResultCitation, TestRun, UpdateAssistantRequest, UpdateGoalRequest, UpdatePromptModuleRequest, UpdatePromptRequest, UpsertAssistantRequest, UpsertAssistantRequestOptions, UpsertAssistantResponse, UpsertConnectionRequest, UpsertFunctionRequest, UpsertGoalRequest, UpsertTestCasesRequest, VendorModel };
|
|
5469
|
+
export { Access, Assistant, AssistantApiService, AssistantKey, AssistantType, BuildDefaultAssistantRequest, BuildDefaultAssistantResponse, CancelTestRunRequest, 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, ElevenLabsConfig, ExecuteFunctionRequest, ExecuteFunctionResponse, FieldMask, Function, FunctionApiService, FunctionAuthStrategy, FunctionAuthStrategyPlatformManagedFunctionAuthStrategy, FunctionAuthStrategyUnspecifiedFunctionAuthStrategy, FunctionHeader, FunctionKey, FunctionParameter, FunctionParameterParameterLocation, GenerateChatAnswerRequest, GenerateChatAnswerRequestOptions, GenerateChatAnswerResponse, GetAssistantRequest, GetAssistantRequestOptions, 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, GetTestRunRequest, GetTestRunResponse, Goal, GoalApiService, GoalChannel, GoalKey, GoalType, GoalsDisabledForAccountGroupRequest, GoalsDisabledForAccountGroupResponse, HostService, IntegrationTestApiService, KeyValuePair, ListAllAssistantsAssociatedToConnectionRequest, ListAllAssistantsAssociatedToConnectionRequestFilters, ListAllAssistantsAssociatedToConnectionResponse, ListAssistantRequest, ListAssistantRequestFilters, ListAssistantResponse, ListAvailableModelsRequest, ListAvailableModelsRequestFilters, ListAvailableModelsResponse, ListConnectionsRequest, ListConnectionsRequestFilters, ListConnectionsResponse, ListFunctionRequest, ListFunctionRequestFilters, ListFunctionResponse, ListGoalsRequest, ListGoalsRequestFilters, ListGoalsResponse, ListMCPToolsRequest, ListMCPToolsResponse, ListMCPsRequest, ListMCPsRequestFilters, ListMCPsResponse, ListPromptModuleRequest, ListPromptModuleRequestFilters, ListPromptModuleResponse, ListPromptModuleVersionsRequest, ListPromptModuleVersionsResponse, ListPromptRequest, ListPromptResponse, ListPromptVersionsRequest, ListPromptVersionsResponse, ListTestCasesByAssistantRequest, ListTestCasesByAssistantResponse, ListTestRunsByAssistantRequest, ListTestRunsByAssistantResponse, MCP, MCPOptions, Model, ModelConfig, ModelType, ModelVendor, Namespace, NamespaceAccountGroupNamespace, NamespaceGlobalNamespace, NamespacePartnerNamespace, NamespaceSystemNamespace, OpenAIRealtimeConfig, OpenAIRealtimeConfigTurnDetection, PagedRequestOptions, PagedResponseMetadata, Prompt, PromptApiService, PromptModule, PromptModuleApiService, PromptModuleKey, PromptModuleVersion, PromptVersion, RunTestsRequest, RunTestsResponse, SetAssistantConnectionsRequest, SetAssistantConnectionsRequestConnectionState, SortDirection, SortOptions, TestCase, TestResult, TestResultCitation, TestRun, UpdateAssistantRequest, UpdateGoalRequest, UpdatePromptModuleRequest, UpdatePromptRequest, UpsertAssistantRequest, UpsertAssistantRequestOptions, UpsertAssistantResponse, UpsertConnectionRequest, UpsertFunctionRequest, UpsertGoalRequest, UpsertMCPRequest, UpsertTestCasesRequest, VendorModel };
|
|
5250
5470
|
//# sourceMappingURL=vendasta-ai-assistants.mjs.map
|