@vendasta/ai-assistants 0.44.0 → 0.45.1
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 +211 -1
- package/esm2020/lib/_internal/objects/index.mjs +3 -3
- package/fesm2015/vendasta-ai-assistants.mjs +303 -80
- package/fesm2015/vendasta-ai-assistants.mjs.map +1 -1
- package/fesm2020/vendasta-ai-assistants.mjs +303 -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 +34 -0
- package/lib/_internal/interfaces/index.d.ts +2 -2
- package/lib/_internal/objects/function.d.ts +55 -0
- package/lib/_internal/objects/index.d.ts +2 -2
- package/package.json +1 -1
|
@@ -298,6 +298,94 @@ function enumStringToValue$c(enumRef, value) {
|
|
|
298
298
|
}
|
|
299
299
|
return enumRef[value];
|
|
300
300
|
}
|
|
301
|
+
class PagedRequestOptions {
|
|
302
|
+
static fromProto(proto) {
|
|
303
|
+
let m = new PagedRequestOptions();
|
|
304
|
+
m = Object.assign(m, proto);
|
|
305
|
+
if (proto.pageSize) {
|
|
306
|
+
m.pageSize = parseInt(proto.pageSize, 10);
|
|
307
|
+
}
|
|
308
|
+
return m;
|
|
309
|
+
}
|
|
310
|
+
constructor(kwargs) {
|
|
311
|
+
if (!kwargs) {
|
|
312
|
+
return;
|
|
313
|
+
}
|
|
314
|
+
Object.assign(this, kwargs);
|
|
315
|
+
}
|
|
316
|
+
toApiJson() {
|
|
317
|
+
const toReturn = {};
|
|
318
|
+
if (typeof this.cursor !== 'undefined') {
|
|
319
|
+
toReturn['cursor'] = this.cursor;
|
|
320
|
+
}
|
|
321
|
+
if (typeof this.pageSize !== 'undefined') {
|
|
322
|
+
toReturn['pageSize'] = this.pageSize;
|
|
323
|
+
}
|
|
324
|
+
return toReturn;
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
class PagedResponseMetadata {
|
|
328
|
+
static fromProto(proto) {
|
|
329
|
+
let m = new PagedResponseMetadata();
|
|
330
|
+
m = Object.assign(m, proto);
|
|
331
|
+
if (proto.totalResults) {
|
|
332
|
+
m.totalResults = parseInt(proto.totalResults, 10);
|
|
333
|
+
}
|
|
334
|
+
return m;
|
|
335
|
+
}
|
|
336
|
+
constructor(kwargs) {
|
|
337
|
+
if (!kwargs) {
|
|
338
|
+
return;
|
|
339
|
+
}
|
|
340
|
+
Object.assign(this, kwargs);
|
|
341
|
+
}
|
|
342
|
+
toApiJson() {
|
|
343
|
+
const toReturn = {};
|
|
344
|
+
if (typeof this.nextCursor !== 'undefined') {
|
|
345
|
+
toReturn['nextCursor'] = this.nextCursor;
|
|
346
|
+
}
|
|
347
|
+
if (typeof this.hasMore !== 'undefined') {
|
|
348
|
+
toReturn['hasMore'] = this.hasMore;
|
|
349
|
+
}
|
|
350
|
+
if (typeof this.totalResults !== 'undefined') {
|
|
351
|
+
toReturn['totalResults'] = this.totalResults;
|
|
352
|
+
}
|
|
353
|
+
return toReturn;
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
function enumStringToValue$b(enumRef, value) {
|
|
358
|
+
if (typeof value === 'number') {
|
|
359
|
+
return value;
|
|
360
|
+
}
|
|
361
|
+
return enumRef[value];
|
|
362
|
+
}
|
|
363
|
+
class ListMCPsRequestFilters {
|
|
364
|
+
static fromProto(proto) {
|
|
365
|
+
let m = new ListMCPsRequestFilters();
|
|
366
|
+
m = Object.assign(m, proto);
|
|
367
|
+
if (proto.namespaces) {
|
|
368
|
+
m.namespaces = proto.namespaces.map(Namespace.fromProto);
|
|
369
|
+
}
|
|
370
|
+
return m;
|
|
371
|
+
}
|
|
372
|
+
constructor(kwargs) {
|
|
373
|
+
if (!kwargs) {
|
|
374
|
+
return;
|
|
375
|
+
}
|
|
376
|
+
Object.assign(this, kwargs);
|
|
377
|
+
}
|
|
378
|
+
toApiJson() {
|
|
379
|
+
const toReturn = {};
|
|
380
|
+
if (typeof this.namespaces !== 'undefined' && this.namespaces !== null) {
|
|
381
|
+
toReturn['namespaces'] = 'toApiJson' in this.namespaces ? this.namespaces.toApiJson() : this.namespaces;
|
|
382
|
+
}
|
|
383
|
+
if (typeof this.mcpIds !== 'undefined') {
|
|
384
|
+
toReturn['mcpIds'] = this.mcpIds;
|
|
385
|
+
}
|
|
386
|
+
return toReturn;
|
|
387
|
+
}
|
|
388
|
+
}
|
|
301
389
|
class Function {
|
|
302
390
|
static fromProto(proto) {
|
|
303
391
|
let m = new Function();
|
|
@@ -360,6 +448,9 @@ class Function {
|
|
|
360
448
|
if (typeof this.authStrategy !== 'undefined' && this.authStrategy !== null) {
|
|
361
449
|
toReturn['authStrategy'] = 'toApiJson' in this.authStrategy ? this.authStrategy.toApiJson() : this.authStrategy;
|
|
362
450
|
}
|
|
451
|
+
if (typeof this.mcpId !== 'undefined') {
|
|
452
|
+
toReturn['mcpId'] = this.mcpId;
|
|
453
|
+
}
|
|
363
454
|
return toReturn;
|
|
364
455
|
}
|
|
365
456
|
}
|
|
@@ -452,7 +543,7 @@ class FunctionParameter {
|
|
|
452
543
|
m.items = FunctionParameter.fromProto(proto.items);
|
|
453
544
|
}
|
|
454
545
|
if (proto.location) {
|
|
455
|
-
m.location = enumStringToValue$
|
|
546
|
+
m.location = enumStringToValue$b(FunctionParameterParameterLocation, proto.location);
|
|
456
547
|
}
|
|
457
548
|
return m;
|
|
458
549
|
}
|
|
@@ -488,6 +579,151 @@ class FunctionParameter {
|
|
|
488
579
|
return toReturn;
|
|
489
580
|
}
|
|
490
581
|
}
|
|
582
|
+
class ListMCPToolsRequest {
|
|
583
|
+
static fromProto(proto) {
|
|
584
|
+
let m = new ListMCPToolsRequest();
|
|
585
|
+
m = Object.assign(m, proto);
|
|
586
|
+
if (proto.namespace) {
|
|
587
|
+
m.namespace = Namespace.fromProto(proto.namespace);
|
|
588
|
+
}
|
|
589
|
+
if (proto.authStrategy) {
|
|
590
|
+
m.authStrategy = FunctionAuthStrategy.fromProto(proto.authStrategy);
|
|
591
|
+
}
|
|
592
|
+
if (proto.headers) {
|
|
593
|
+
m.headers = proto.headers.map(FunctionHeader.fromProto);
|
|
594
|
+
}
|
|
595
|
+
return m;
|
|
596
|
+
}
|
|
597
|
+
constructor(kwargs) {
|
|
598
|
+
if (!kwargs) {
|
|
599
|
+
return;
|
|
600
|
+
}
|
|
601
|
+
Object.assign(this, kwargs);
|
|
602
|
+
}
|
|
603
|
+
toApiJson() {
|
|
604
|
+
const toReturn = {};
|
|
605
|
+
if (typeof this.namespace !== 'undefined' && this.namespace !== null) {
|
|
606
|
+
toReturn['namespace'] = 'toApiJson' in this.namespace ? this.namespace.toApiJson() : this.namespace;
|
|
607
|
+
}
|
|
608
|
+
if (typeof this.url !== 'undefined') {
|
|
609
|
+
toReturn['url'] = this.url;
|
|
610
|
+
}
|
|
611
|
+
if (typeof this.authStrategy !== 'undefined' && this.authStrategy !== null) {
|
|
612
|
+
toReturn['authStrategy'] = 'toApiJson' in this.authStrategy ? this.authStrategy.toApiJson() : this.authStrategy;
|
|
613
|
+
}
|
|
614
|
+
if (typeof this.headers !== 'undefined' && this.headers !== null) {
|
|
615
|
+
toReturn['headers'] = 'toApiJson' in this.headers ? this.headers.toApiJson() : this.headers;
|
|
616
|
+
}
|
|
617
|
+
if (typeof this.mcpId !== 'undefined') {
|
|
618
|
+
toReturn['mcpId'] = this.mcpId;
|
|
619
|
+
}
|
|
620
|
+
return toReturn;
|
|
621
|
+
}
|
|
622
|
+
}
|
|
623
|
+
class ListMCPToolsResponse {
|
|
624
|
+
static fromProto(proto) {
|
|
625
|
+
let m = new ListMCPToolsResponse();
|
|
626
|
+
m = Object.assign(m, proto);
|
|
627
|
+
if (proto.functions) {
|
|
628
|
+
m.functions = proto.functions.map(Function.fromProto);
|
|
629
|
+
}
|
|
630
|
+
return m;
|
|
631
|
+
}
|
|
632
|
+
constructor(kwargs) {
|
|
633
|
+
if (!kwargs) {
|
|
634
|
+
return;
|
|
635
|
+
}
|
|
636
|
+
Object.assign(this, kwargs);
|
|
637
|
+
}
|
|
638
|
+
toApiJson() {
|
|
639
|
+
const toReturn = {};
|
|
640
|
+
if (typeof this.functions !== 'undefined' && this.functions !== null) {
|
|
641
|
+
toReturn['functions'] = 'toApiJson' in this.functions ? this.functions.toApiJson() : this.functions;
|
|
642
|
+
}
|
|
643
|
+
return toReturn;
|
|
644
|
+
}
|
|
645
|
+
}
|
|
646
|
+
class ListMCPsRequest {
|
|
647
|
+
static fromProto(proto) {
|
|
648
|
+
let m = new ListMCPsRequest();
|
|
649
|
+
m = Object.assign(m, proto);
|
|
650
|
+
if (proto.filters) {
|
|
651
|
+
m.filters = ListMCPsRequestFilters.fromProto(proto.filters);
|
|
652
|
+
}
|
|
653
|
+
if (proto.pagingOptions) {
|
|
654
|
+
m.pagingOptions = PagedRequestOptions.fromProto(proto.pagingOptions);
|
|
655
|
+
}
|
|
656
|
+
return m;
|
|
657
|
+
}
|
|
658
|
+
constructor(kwargs) {
|
|
659
|
+
if (!kwargs) {
|
|
660
|
+
return;
|
|
661
|
+
}
|
|
662
|
+
Object.assign(this, kwargs);
|
|
663
|
+
}
|
|
664
|
+
toApiJson() {
|
|
665
|
+
const toReturn = {};
|
|
666
|
+
if (typeof this.filters !== 'undefined' && this.filters !== null) {
|
|
667
|
+
toReturn['filters'] = 'toApiJson' in this.filters ? this.filters.toApiJson() : this.filters;
|
|
668
|
+
}
|
|
669
|
+
if (typeof this.pagingOptions !== 'undefined' && this.pagingOptions !== null) {
|
|
670
|
+
toReturn['pagingOptions'] = 'toApiJson' in this.pagingOptions ? this.pagingOptions.toApiJson() : this.pagingOptions;
|
|
671
|
+
}
|
|
672
|
+
return toReturn;
|
|
673
|
+
}
|
|
674
|
+
}
|
|
675
|
+
class ListMCPsResponse {
|
|
676
|
+
static fromProto(proto) {
|
|
677
|
+
let m = new ListMCPsResponse();
|
|
678
|
+
m = Object.assign(m, proto);
|
|
679
|
+
if (proto.mcps) {
|
|
680
|
+
m.mcps = proto.mcps.map(MCP.fromProto);
|
|
681
|
+
}
|
|
682
|
+
if (proto.pagingMetadata) {
|
|
683
|
+
m.pagingMetadata = PagedResponseMetadata.fromProto(proto.pagingMetadata);
|
|
684
|
+
}
|
|
685
|
+
return m;
|
|
686
|
+
}
|
|
687
|
+
constructor(kwargs) {
|
|
688
|
+
if (!kwargs) {
|
|
689
|
+
return;
|
|
690
|
+
}
|
|
691
|
+
Object.assign(this, kwargs);
|
|
692
|
+
}
|
|
693
|
+
toApiJson() {
|
|
694
|
+
const toReturn = {};
|
|
695
|
+
if (typeof this.mcps !== 'undefined' && this.mcps !== null) {
|
|
696
|
+
toReturn['mcps'] = 'toApiJson' in this.mcps ? this.mcps.toApiJson() : this.mcps;
|
|
697
|
+
}
|
|
698
|
+
if (typeof this.pagingMetadata !== 'undefined' && this.pagingMetadata !== null) {
|
|
699
|
+
toReturn['pagingMetadata'] = 'toApiJson' in this.pagingMetadata ? this.pagingMetadata.toApiJson() : this.pagingMetadata;
|
|
700
|
+
}
|
|
701
|
+
return toReturn;
|
|
702
|
+
}
|
|
703
|
+
}
|
|
704
|
+
class MCP {
|
|
705
|
+
static fromProto(proto) {
|
|
706
|
+
let m = new MCP();
|
|
707
|
+
m = Object.assign(m, proto);
|
|
708
|
+
return m;
|
|
709
|
+
}
|
|
710
|
+
constructor(kwargs) {
|
|
711
|
+
if (!kwargs) {
|
|
712
|
+
return;
|
|
713
|
+
}
|
|
714
|
+
Object.assign(this, kwargs);
|
|
715
|
+
}
|
|
716
|
+
toApiJson() {
|
|
717
|
+
const toReturn = {};
|
|
718
|
+
if (typeof this.id !== 'undefined') {
|
|
719
|
+
toReturn['id'] = this.id;
|
|
720
|
+
}
|
|
721
|
+
if (typeof this.url !== 'undefined') {
|
|
722
|
+
toReturn['url'] = this.url;
|
|
723
|
+
}
|
|
724
|
+
return toReturn;
|
|
725
|
+
}
|
|
726
|
+
}
|
|
491
727
|
class FunctionAuthStrategyPlatformManagedFunctionAuthStrategy {
|
|
492
728
|
static fromProto(proto) {
|
|
493
729
|
let m = new FunctionAuthStrategyPlatformManagedFunctionAuthStrategy();
|
|
@@ -525,8 +761,43 @@ class FunctionAuthStrategyUnspecifiedFunctionAuthStrategy {
|
|
|
525
761
|
return toReturn;
|
|
526
762
|
}
|
|
527
763
|
}
|
|
764
|
+
class UpsertMCPRequest {
|
|
765
|
+
static fromProto(proto) {
|
|
766
|
+
let m = new UpsertMCPRequest();
|
|
767
|
+
m = Object.assign(m, proto);
|
|
768
|
+
if (proto.namespace) {
|
|
769
|
+
m.namespace = Namespace.fromProto(proto.namespace);
|
|
770
|
+
}
|
|
771
|
+
if (proto.functions) {
|
|
772
|
+
m.functions = proto.functions.map(Function.fromProto);
|
|
773
|
+
}
|
|
774
|
+
return m;
|
|
775
|
+
}
|
|
776
|
+
constructor(kwargs) {
|
|
777
|
+
if (!kwargs) {
|
|
778
|
+
return;
|
|
779
|
+
}
|
|
780
|
+
Object.assign(this, kwargs);
|
|
781
|
+
}
|
|
782
|
+
toApiJson() {
|
|
783
|
+
const toReturn = {};
|
|
784
|
+
if (typeof this.namespace !== 'undefined' && this.namespace !== null) {
|
|
785
|
+
toReturn['namespace'] = 'toApiJson' in this.namespace ? this.namespace.toApiJson() : this.namespace;
|
|
786
|
+
}
|
|
787
|
+
if (typeof this.url !== 'undefined') {
|
|
788
|
+
toReturn['url'] = this.url;
|
|
789
|
+
}
|
|
790
|
+
if (typeof this.mcpId !== 'undefined') {
|
|
791
|
+
toReturn['mcpId'] = this.mcpId;
|
|
792
|
+
}
|
|
793
|
+
if (typeof this.functions !== 'undefined' && this.functions !== null) {
|
|
794
|
+
toReturn['functions'] = 'toApiJson' in this.functions ? this.functions.toApiJson() : this.functions;
|
|
795
|
+
}
|
|
796
|
+
return toReturn;
|
|
797
|
+
}
|
|
798
|
+
}
|
|
528
799
|
|
|
529
|
-
function enumStringToValue$
|
|
800
|
+
function enumStringToValue$a(enumRef, value) {
|
|
530
801
|
if (typeof value === 'number') {
|
|
531
802
|
return value;
|
|
532
803
|
}
|
|
@@ -729,7 +1000,7 @@ class PromptVersion {
|
|
|
729
1000
|
}
|
|
730
1001
|
}
|
|
731
1002
|
|
|
732
|
-
function enumStringToValue$
|
|
1003
|
+
function enumStringToValue$9(enumRef, value) {
|
|
733
1004
|
if (typeof value === 'number') {
|
|
734
1005
|
return value;
|
|
735
1006
|
}
|
|
@@ -743,7 +1014,7 @@ class Goal {
|
|
|
743
1014
|
m.namespace = Namespace.fromProto(proto.namespace);
|
|
744
1015
|
}
|
|
745
1016
|
if (proto.type) {
|
|
746
|
-
m.type = enumStringToValue$
|
|
1017
|
+
m.type = enumStringToValue$9(GoalType, proto.type);
|
|
747
1018
|
}
|
|
748
1019
|
if (proto.promptModules) {
|
|
749
1020
|
m.promptModules = proto.promptModules.map(PromptModule.fromProto);
|
|
@@ -755,7 +1026,7 @@ class Goal {
|
|
|
755
1026
|
m.updated = new Date(proto.updated);
|
|
756
1027
|
}
|
|
757
1028
|
if (proto.supportedChannels) {
|
|
758
|
-
m.supportedChannels = proto.supportedChannels.map((v) => enumStringToValue$
|
|
1029
|
+
m.supportedChannels = proto.supportedChannels.map((v) => enumStringToValue$9(GoalChannel, v));
|
|
759
1030
|
}
|
|
760
1031
|
if (proto.overrideOf) {
|
|
761
1032
|
m.overrideOf = GoalKey.fromProto(proto.overrideOf);
|
|
@@ -836,7 +1107,7 @@ class GoalKey {
|
|
|
836
1107
|
}
|
|
837
1108
|
}
|
|
838
1109
|
|
|
839
|
-
function enumStringToValue$
|
|
1110
|
+
function enumStringToValue$8(enumRef, value) {
|
|
840
1111
|
if (typeof value === 'number') {
|
|
841
1112
|
return value;
|
|
842
1113
|
}
|
|
@@ -866,7 +1137,7 @@ class KeyValuePair {
|
|
|
866
1137
|
}
|
|
867
1138
|
}
|
|
868
1139
|
|
|
869
|
-
function enumStringToValue$
|
|
1140
|
+
function enumStringToValue$7(enumRef, value) {
|
|
870
1141
|
if (typeof value === 'number') {
|
|
871
1142
|
return value;
|
|
872
1143
|
}
|
|
@@ -877,10 +1148,10 @@ class Model {
|
|
|
877
1148
|
let m = new Model();
|
|
878
1149
|
m = Object.assign(m, proto);
|
|
879
1150
|
if (proto.vendor) {
|
|
880
|
-
m.vendor = enumStringToValue$
|
|
1151
|
+
m.vendor = enumStringToValue$7(ModelVendor, proto.vendor);
|
|
881
1152
|
}
|
|
882
1153
|
if (proto.type) {
|
|
883
|
-
m.type = enumStringToValue$
|
|
1154
|
+
m.type = enumStringToValue$7(ModelType, proto.type);
|
|
884
1155
|
}
|
|
885
1156
|
return m;
|
|
886
1157
|
}
|
|
@@ -911,7 +1182,7 @@ class Model {
|
|
|
911
1182
|
}
|
|
912
1183
|
}
|
|
913
1184
|
|
|
914
|
-
function enumStringToValue$
|
|
1185
|
+
function enumStringToValue$6(enumRef, value) {
|
|
915
1186
|
if (typeof value === 'number') {
|
|
916
1187
|
return value;
|
|
917
1188
|
}
|
|
@@ -925,7 +1196,7 @@ class Assistant {
|
|
|
925
1196
|
m.namespace = Namespace.fromProto(proto.namespace);
|
|
926
1197
|
}
|
|
927
1198
|
if (proto.type) {
|
|
928
|
-
m.type = enumStringToValue$
|
|
1199
|
+
m.type = enumStringToValue$6(AssistantType, proto.type);
|
|
929
1200
|
}
|
|
930
1201
|
if (proto.config) {
|
|
931
1202
|
m.config = Config.fromProto(proto.config);
|
|
@@ -1215,7 +1486,7 @@ class ConfigVoiceConfig {
|
|
|
1215
1486
|
let m = new ConfigVoiceConfig();
|
|
1216
1487
|
m = Object.assign(m, proto);
|
|
1217
1488
|
if (proto.vendorModel) {
|
|
1218
|
-
m.vendorModel = enumStringToValue$
|
|
1489
|
+
m.vendorModel = enumStringToValue$6(VendorModel, proto.vendorModel);
|
|
1219
1490
|
}
|
|
1220
1491
|
if (proto.modelConfig) {
|
|
1221
1492
|
m.modelConfig = ModelConfig.fromProto(proto.modelConfig);
|
|
@@ -1240,7 +1511,7 @@ class ConfigVoiceConfig {
|
|
|
1240
1511
|
}
|
|
1241
1512
|
}
|
|
1242
1513
|
|
|
1243
|
-
function enumStringToValue$
|
|
1514
|
+
function enumStringToValue$5(enumRef, value) {
|
|
1244
1515
|
if (typeof value === 'number') {
|
|
1245
1516
|
return value;
|
|
1246
1517
|
}
|
|
@@ -1257,7 +1528,7 @@ class Connection {
|
|
|
1257
1528
|
m.assistantKeys = proto.assistantKeys.map(AssistantKey.fromProto);
|
|
1258
1529
|
}
|
|
1259
1530
|
if (proto.supportedAssistantTypes) {
|
|
1260
|
-
m.supportedAssistantTypes = proto.supportedAssistantTypes.map((v) => enumStringToValue$
|
|
1531
|
+
m.supportedAssistantTypes = proto.supportedAssistantTypes.map((v) => enumStringToValue$5(AssistantType, v));
|
|
1261
1532
|
}
|
|
1262
1533
|
return m;
|
|
1263
1534
|
}
|
|
@@ -1332,7 +1603,7 @@ class ConnectionKey {
|
|
|
1332
1603
|
}
|
|
1333
1604
|
}
|
|
1334
1605
|
|
|
1335
|
-
function enumStringToValue$
|
|
1606
|
+
function enumStringToValue$4(enumRef, value) {
|
|
1336
1607
|
if (typeof value === 'number') {
|
|
1337
1608
|
return value;
|
|
1338
1609
|
}
|
|
@@ -1343,7 +1614,7 @@ class ChatAnswerFunctionExecutionJob {
|
|
|
1343
1614
|
let m = new ChatAnswerFunctionExecutionJob();
|
|
1344
1615
|
m = Object.assign(m, proto);
|
|
1345
1616
|
if (proto.status) {
|
|
1346
|
-
m.status = enumStringToValue$
|
|
1617
|
+
m.status = enumStringToValue$4(ChatAnswerFunctionExecutionJobStatus, proto.status);
|
|
1347
1618
|
}
|
|
1348
1619
|
if (proto.result) {
|
|
1349
1620
|
m.result = ChatAnswerFunctionExecutionJobResult.fromProto(proto.result);
|
|
@@ -1404,7 +1675,7 @@ class ChatMessage {
|
|
|
1404
1675
|
let m = new ChatMessage();
|
|
1405
1676
|
m = Object.assign(m, proto);
|
|
1406
1677
|
if (proto.role) {
|
|
1407
|
-
m.role = enumStringToValue$
|
|
1678
|
+
m.role = enumStringToValue$4(ChatMessageRole, proto.role);
|
|
1408
1679
|
}
|
|
1409
1680
|
return m;
|
|
1410
1681
|
}
|
|
@@ -1496,68 +1767,6 @@ class ContextInfo {
|
|
|
1496
1767
|
}
|
|
1497
1768
|
}
|
|
1498
1769
|
|
|
1499
|
-
function enumStringToValue$4(enumRef, value) {
|
|
1500
|
-
if (typeof value === 'number') {
|
|
1501
|
-
return value;
|
|
1502
|
-
}
|
|
1503
|
-
return enumRef[value];
|
|
1504
|
-
}
|
|
1505
|
-
class PagedRequestOptions {
|
|
1506
|
-
static fromProto(proto) {
|
|
1507
|
-
let m = new PagedRequestOptions();
|
|
1508
|
-
m = Object.assign(m, proto);
|
|
1509
|
-
if (proto.pageSize) {
|
|
1510
|
-
m.pageSize = parseInt(proto.pageSize, 10);
|
|
1511
|
-
}
|
|
1512
|
-
return m;
|
|
1513
|
-
}
|
|
1514
|
-
constructor(kwargs) {
|
|
1515
|
-
if (!kwargs) {
|
|
1516
|
-
return;
|
|
1517
|
-
}
|
|
1518
|
-
Object.assign(this, kwargs);
|
|
1519
|
-
}
|
|
1520
|
-
toApiJson() {
|
|
1521
|
-
const toReturn = {};
|
|
1522
|
-
if (typeof this.cursor !== 'undefined') {
|
|
1523
|
-
toReturn['cursor'] = this.cursor;
|
|
1524
|
-
}
|
|
1525
|
-
if (typeof this.pageSize !== 'undefined') {
|
|
1526
|
-
toReturn['pageSize'] = this.pageSize;
|
|
1527
|
-
}
|
|
1528
|
-
return toReturn;
|
|
1529
|
-
}
|
|
1530
|
-
}
|
|
1531
|
-
class PagedResponseMetadata {
|
|
1532
|
-
static fromProto(proto) {
|
|
1533
|
-
let m = new PagedResponseMetadata();
|
|
1534
|
-
m = Object.assign(m, proto);
|
|
1535
|
-
if (proto.totalResults) {
|
|
1536
|
-
m.totalResults = parseInt(proto.totalResults, 10);
|
|
1537
|
-
}
|
|
1538
|
-
return m;
|
|
1539
|
-
}
|
|
1540
|
-
constructor(kwargs) {
|
|
1541
|
-
if (!kwargs) {
|
|
1542
|
-
return;
|
|
1543
|
-
}
|
|
1544
|
-
Object.assign(this, kwargs);
|
|
1545
|
-
}
|
|
1546
|
-
toApiJson() {
|
|
1547
|
-
const toReturn = {};
|
|
1548
|
-
if (typeof this.nextCursor !== 'undefined') {
|
|
1549
|
-
toReturn['nextCursor'] = this.nextCursor;
|
|
1550
|
-
}
|
|
1551
|
-
if (typeof this.hasMore !== 'undefined') {
|
|
1552
|
-
toReturn['hasMore'] = this.hasMore;
|
|
1553
|
-
}
|
|
1554
|
-
if (typeof this.totalResults !== 'undefined') {
|
|
1555
|
-
toReturn['totalResults'] = this.totalResults;
|
|
1556
|
-
}
|
|
1557
|
-
return toReturn;
|
|
1558
|
-
}
|
|
1559
|
-
}
|
|
1560
|
-
|
|
1561
1770
|
function enumStringToValue$3(enumRef, value) {
|
|
1562
1771
|
if (typeof value === 'number') {
|
|
1563
1772
|
return value;
|
|
@@ -4945,6 +5154,20 @@ class FunctionApiService {
|
|
|
4945
5154
|
const request = (r.toApiJson) ? r : new DeleteFunctionRequest(r);
|
|
4946
5155
|
return this.http.post(this._host + "/ai_assistants.v1alpha1.FunctionService/Delete", request.toApiJson(), Object.assign(Object.assign({}, this.apiOptions()), { observe: 'response' }));
|
|
4947
5156
|
}
|
|
5157
|
+
listMcpTools(r) {
|
|
5158
|
+
const request = (r.toApiJson) ? r : new ListMCPToolsRequest(r);
|
|
5159
|
+
return this.http.post(this._host + "/ai_assistants.v1alpha1.FunctionService/ListMCPTools", request.toApiJson(), this.apiOptions())
|
|
5160
|
+
.pipe(map(resp => ListMCPToolsResponse.fromProto(resp)));
|
|
5161
|
+
}
|
|
5162
|
+
upsertMcp(r) {
|
|
5163
|
+
const request = (r.toApiJson) ? r : new UpsertMCPRequest(r);
|
|
5164
|
+
return this.http.post(this._host + "/ai_assistants.v1alpha1.FunctionService/UpsertMCP", request.toApiJson(), Object.assign(Object.assign({}, this.apiOptions()), { observe: 'response' }));
|
|
5165
|
+
}
|
|
5166
|
+
listMcPs(r) {
|
|
5167
|
+
const request = (r.toApiJson) ? r : new ListMCPsRequest(r);
|
|
5168
|
+
return this.http.post(this._host + "/ai_assistants.v1alpha1.FunctionService/ListMCPs", request.toApiJson(), this.apiOptions())
|
|
5169
|
+
.pipe(map(resp => ListMCPsResponse.fromProto(resp)));
|
|
5170
|
+
}
|
|
4948
5171
|
}
|
|
4949
5172
|
FunctionApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: FunctionApiService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
4950
5173
|
FunctionApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: FunctionApiService, providedIn: 'root' });
|
|
@@ -5247,5 +5470,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
5247
5470
|
* Generated bundle index. Do not edit.
|
|
5248
5471
|
*/
|
|
5249
5472
|
|
|
5250
|
-
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 };
|
|
5473
|
+
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 };
|
|
5251
5474
|
//# sourceMappingURL=vendasta-ai-assistants.mjs.map
|