@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
|
@@ -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();
|
|
@@ -359,6 +447,9 @@ class Function {
|
|
|
359
447
|
if (typeof this.authStrategy !== 'undefined' && this.authStrategy !== null) {
|
|
360
448
|
toReturn['authStrategy'] = 'toApiJson' in this.authStrategy ? this.authStrategy.toApiJson() : this.authStrategy;
|
|
361
449
|
}
|
|
450
|
+
if (typeof this.mcpId !== 'undefined') {
|
|
451
|
+
toReturn['mcpId'] = this.mcpId;
|
|
452
|
+
}
|
|
362
453
|
return toReturn;
|
|
363
454
|
}
|
|
364
455
|
}
|
|
@@ -451,7 +542,7 @@ class FunctionParameter {
|
|
|
451
542
|
m.items = FunctionParameter.fromProto(proto.items);
|
|
452
543
|
}
|
|
453
544
|
if (proto.location) {
|
|
454
|
-
m.location = enumStringToValue$
|
|
545
|
+
m.location = enumStringToValue$b(FunctionParameterParameterLocation, proto.location);
|
|
455
546
|
}
|
|
456
547
|
return m;
|
|
457
548
|
}
|
|
@@ -487,6 +578,151 @@ class FunctionParameter {
|
|
|
487
578
|
return toReturn;
|
|
488
579
|
}
|
|
489
580
|
}
|
|
581
|
+
class ListMCPToolsRequest {
|
|
582
|
+
static fromProto(proto) {
|
|
583
|
+
let m = new ListMCPToolsRequest();
|
|
584
|
+
m = Object.assign(m, proto);
|
|
585
|
+
if (proto.namespace) {
|
|
586
|
+
m.namespace = Namespace.fromProto(proto.namespace);
|
|
587
|
+
}
|
|
588
|
+
if (proto.authStrategy) {
|
|
589
|
+
m.authStrategy = FunctionAuthStrategy.fromProto(proto.authStrategy);
|
|
590
|
+
}
|
|
591
|
+
if (proto.headers) {
|
|
592
|
+
m.headers = proto.headers.map(FunctionHeader.fromProto);
|
|
593
|
+
}
|
|
594
|
+
return m;
|
|
595
|
+
}
|
|
596
|
+
constructor(kwargs) {
|
|
597
|
+
if (!kwargs) {
|
|
598
|
+
return;
|
|
599
|
+
}
|
|
600
|
+
Object.assign(this, kwargs);
|
|
601
|
+
}
|
|
602
|
+
toApiJson() {
|
|
603
|
+
const toReturn = {};
|
|
604
|
+
if (typeof this.namespace !== 'undefined' && this.namespace !== null) {
|
|
605
|
+
toReturn['namespace'] = 'toApiJson' in this.namespace ? this.namespace.toApiJson() : this.namespace;
|
|
606
|
+
}
|
|
607
|
+
if (typeof this.url !== 'undefined') {
|
|
608
|
+
toReturn['url'] = this.url;
|
|
609
|
+
}
|
|
610
|
+
if (typeof this.authStrategy !== 'undefined' && this.authStrategy !== null) {
|
|
611
|
+
toReturn['authStrategy'] = 'toApiJson' in this.authStrategy ? this.authStrategy.toApiJson() : this.authStrategy;
|
|
612
|
+
}
|
|
613
|
+
if (typeof this.headers !== 'undefined' && this.headers !== null) {
|
|
614
|
+
toReturn['headers'] = 'toApiJson' in this.headers ? this.headers.toApiJson() : this.headers;
|
|
615
|
+
}
|
|
616
|
+
if (typeof this.mcpId !== 'undefined') {
|
|
617
|
+
toReturn['mcpId'] = this.mcpId;
|
|
618
|
+
}
|
|
619
|
+
return toReturn;
|
|
620
|
+
}
|
|
621
|
+
}
|
|
622
|
+
class ListMCPToolsResponse {
|
|
623
|
+
static fromProto(proto) {
|
|
624
|
+
let m = new ListMCPToolsResponse();
|
|
625
|
+
m = Object.assign(m, proto);
|
|
626
|
+
if (proto.functions) {
|
|
627
|
+
m.functions = proto.functions.map(Function.fromProto);
|
|
628
|
+
}
|
|
629
|
+
return m;
|
|
630
|
+
}
|
|
631
|
+
constructor(kwargs) {
|
|
632
|
+
if (!kwargs) {
|
|
633
|
+
return;
|
|
634
|
+
}
|
|
635
|
+
Object.assign(this, kwargs);
|
|
636
|
+
}
|
|
637
|
+
toApiJson() {
|
|
638
|
+
const toReturn = {};
|
|
639
|
+
if (typeof this.functions !== 'undefined' && this.functions !== null) {
|
|
640
|
+
toReturn['functions'] = 'toApiJson' in this.functions ? this.functions.toApiJson() : this.functions;
|
|
641
|
+
}
|
|
642
|
+
return toReturn;
|
|
643
|
+
}
|
|
644
|
+
}
|
|
645
|
+
class ListMCPsRequest {
|
|
646
|
+
static fromProto(proto) {
|
|
647
|
+
let m = new ListMCPsRequest();
|
|
648
|
+
m = Object.assign(m, proto);
|
|
649
|
+
if (proto.filters) {
|
|
650
|
+
m.filters = ListMCPsRequestFilters.fromProto(proto.filters);
|
|
651
|
+
}
|
|
652
|
+
if (proto.pagingOptions) {
|
|
653
|
+
m.pagingOptions = PagedRequestOptions.fromProto(proto.pagingOptions);
|
|
654
|
+
}
|
|
655
|
+
return m;
|
|
656
|
+
}
|
|
657
|
+
constructor(kwargs) {
|
|
658
|
+
if (!kwargs) {
|
|
659
|
+
return;
|
|
660
|
+
}
|
|
661
|
+
Object.assign(this, kwargs);
|
|
662
|
+
}
|
|
663
|
+
toApiJson() {
|
|
664
|
+
const toReturn = {};
|
|
665
|
+
if (typeof this.filters !== 'undefined' && this.filters !== null) {
|
|
666
|
+
toReturn['filters'] = 'toApiJson' in this.filters ? this.filters.toApiJson() : this.filters;
|
|
667
|
+
}
|
|
668
|
+
if (typeof this.pagingOptions !== 'undefined' && this.pagingOptions !== null) {
|
|
669
|
+
toReturn['pagingOptions'] = 'toApiJson' in this.pagingOptions ? this.pagingOptions.toApiJson() : this.pagingOptions;
|
|
670
|
+
}
|
|
671
|
+
return toReturn;
|
|
672
|
+
}
|
|
673
|
+
}
|
|
674
|
+
class ListMCPsResponse {
|
|
675
|
+
static fromProto(proto) {
|
|
676
|
+
let m = new ListMCPsResponse();
|
|
677
|
+
m = Object.assign(m, proto);
|
|
678
|
+
if (proto.mcps) {
|
|
679
|
+
m.mcps = proto.mcps.map(MCP.fromProto);
|
|
680
|
+
}
|
|
681
|
+
if (proto.pagingMetadata) {
|
|
682
|
+
m.pagingMetadata = PagedResponseMetadata.fromProto(proto.pagingMetadata);
|
|
683
|
+
}
|
|
684
|
+
return m;
|
|
685
|
+
}
|
|
686
|
+
constructor(kwargs) {
|
|
687
|
+
if (!kwargs) {
|
|
688
|
+
return;
|
|
689
|
+
}
|
|
690
|
+
Object.assign(this, kwargs);
|
|
691
|
+
}
|
|
692
|
+
toApiJson() {
|
|
693
|
+
const toReturn = {};
|
|
694
|
+
if (typeof this.mcps !== 'undefined' && this.mcps !== null) {
|
|
695
|
+
toReturn['mcps'] = 'toApiJson' in this.mcps ? this.mcps.toApiJson() : this.mcps;
|
|
696
|
+
}
|
|
697
|
+
if (typeof this.pagingMetadata !== 'undefined' && this.pagingMetadata !== null) {
|
|
698
|
+
toReturn['pagingMetadata'] = 'toApiJson' in this.pagingMetadata ? this.pagingMetadata.toApiJson() : this.pagingMetadata;
|
|
699
|
+
}
|
|
700
|
+
return toReturn;
|
|
701
|
+
}
|
|
702
|
+
}
|
|
703
|
+
class MCP {
|
|
704
|
+
static fromProto(proto) {
|
|
705
|
+
let m = new MCP();
|
|
706
|
+
m = Object.assign(m, proto);
|
|
707
|
+
return m;
|
|
708
|
+
}
|
|
709
|
+
constructor(kwargs) {
|
|
710
|
+
if (!kwargs) {
|
|
711
|
+
return;
|
|
712
|
+
}
|
|
713
|
+
Object.assign(this, kwargs);
|
|
714
|
+
}
|
|
715
|
+
toApiJson() {
|
|
716
|
+
const toReturn = {};
|
|
717
|
+
if (typeof this.id !== 'undefined') {
|
|
718
|
+
toReturn['id'] = this.id;
|
|
719
|
+
}
|
|
720
|
+
if (typeof this.url !== 'undefined') {
|
|
721
|
+
toReturn['url'] = this.url;
|
|
722
|
+
}
|
|
723
|
+
return toReturn;
|
|
724
|
+
}
|
|
725
|
+
}
|
|
490
726
|
class FunctionAuthStrategyPlatformManagedFunctionAuthStrategy {
|
|
491
727
|
static fromProto(proto) {
|
|
492
728
|
let m = new FunctionAuthStrategyPlatformManagedFunctionAuthStrategy();
|
|
@@ -524,8 +760,43 @@ class FunctionAuthStrategyUnspecifiedFunctionAuthStrategy {
|
|
|
524
760
|
return toReturn;
|
|
525
761
|
}
|
|
526
762
|
}
|
|
763
|
+
class UpsertMCPRequest {
|
|
764
|
+
static fromProto(proto) {
|
|
765
|
+
let m = new UpsertMCPRequest();
|
|
766
|
+
m = Object.assign(m, proto);
|
|
767
|
+
if (proto.namespace) {
|
|
768
|
+
m.namespace = Namespace.fromProto(proto.namespace);
|
|
769
|
+
}
|
|
770
|
+
if (proto.functions) {
|
|
771
|
+
m.functions = proto.functions.map(Function.fromProto);
|
|
772
|
+
}
|
|
773
|
+
return m;
|
|
774
|
+
}
|
|
775
|
+
constructor(kwargs) {
|
|
776
|
+
if (!kwargs) {
|
|
777
|
+
return;
|
|
778
|
+
}
|
|
779
|
+
Object.assign(this, kwargs);
|
|
780
|
+
}
|
|
781
|
+
toApiJson() {
|
|
782
|
+
const toReturn = {};
|
|
783
|
+
if (typeof this.namespace !== 'undefined' && this.namespace !== null) {
|
|
784
|
+
toReturn['namespace'] = 'toApiJson' in this.namespace ? this.namespace.toApiJson() : this.namespace;
|
|
785
|
+
}
|
|
786
|
+
if (typeof this.url !== 'undefined') {
|
|
787
|
+
toReturn['url'] = this.url;
|
|
788
|
+
}
|
|
789
|
+
if (typeof this.mcpId !== 'undefined') {
|
|
790
|
+
toReturn['mcpId'] = this.mcpId;
|
|
791
|
+
}
|
|
792
|
+
if (typeof this.functions !== 'undefined' && this.functions !== null) {
|
|
793
|
+
toReturn['functions'] = 'toApiJson' in this.functions ? this.functions.toApiJson() : this.functions;
|
|
794
|
+
}
|
|
795
|
+
return toReturn;
|
|
796
|
+
}
|
|
797
|
+
}
|
|
527
798
|
|
|
528
|
-
function enumStringToValue$
|
|
799
|
+
function enumStringToValue$a(enumRef, value) {
|
|
529
800
|
if (typeof value === 'number') {
|
|
530
801
|
return value;
|
|
531
802
|
}
|
|
@@ -728,7 +999,7 @@ class PromptVersion {
|
|
|
728
999
|
}
|
|
729
1000
|
}
|
|
730
1001
|
|
|
731
|
-
function enumStringToValue$
|
|
1002
|
+
function enumStringToValue$9(enumRef, value) {
|
|
732
1003
|
if (typeof value === 'number') {
|
|
733
1004
|
return value;
|
|
734
1005
|
}
|
|
@@ -742,7 +1013,7 @@ class Goal {
|
|
|
742
1013
|
m.namespace = Namespace.fromProto(proto.namespace);
|
|
743
1014
|
}
|
|
744
1015
|
if (proto.type) {
|
|
745
|
-
m.type = enumStringToValue$
|
|
1016
|
+
m.type = enumStringToValue$9(GoalType, proto.type);
|
|
746
1017
|
}
|
|
747
1018
|
if (proto.promptModules) {
|
|
748
1019
|
m.promptModules = proto.promptModules.map(PromptModule.fromProto);
|
|
@@ -754,7 +1025,7 @@ class Goal {
|
|
|
754
1025
|
m.updated = new Date(proto.updated);
|
|
755
1026
|
}
|
|
756
1027
|
if (proto.supportedChannels) {
|
|
757
|
-
m.supportedChannels = proto.supportedChannels.map((v) => enumStringToValue$
|
|
1028
|
+
m.supportedChannels = proto.supportedChannels.map((v) => enumStringToValue$9(GoalChannel, v));
|
|
758
1029
|
}
|
|
759
1030
|
if (proto.overrideOf) {
|
|
760
1031
|
m.overrideOf = GoalKey.fromProto(proto.overrideOf);
|
|
@@ -835,7 +1106,7 @@ class GoalKey {
|
|
|
835
1106
|
}
|
|
836
1107
|
}
|
|
837
1108
|
|
|
838
|
-
function enumStringToValue$
|
|
1109
|
+
function enumStringToValue$8(enumRef, value) {
|
|
839
1110
|
if (typeof value === 'number') {
|
|
840
1111
|
return value;
|
|
841
1112
|
}
|
|
@@ -865,7 +1136,7 @@ class KeyValuePair {
|
|
|
865
1136
|
}
|
|
866
1137
|
}
|
|
867
1138
|
|
|
868
|
-
function enumStringToValue$
|
|
1139
|
+
function enumStringToValue$7(enumRef, value) {
|
|
869
1140
|
if (typeof value === 'number') {
|
|
870
1141
|
return value;
|
|
871
1142
|
}
|
|
@@ -876,10 +1147,10 @@ class Model {
|
|
|
876
1147
|
let m = new Model();
|
|
877
1148
|
m = Object.assign(m, proto);
|
|
878
1149
|
if (proto.vendor) {
|
|
879
|
-
m.vendor = enumStringToValue$
|
|
1150
|
+
m.vendor = enumStringToValue$7(ModelVendor, proto.vendor);
|
|
880
1151
|
}
|
|
881
1152
|
if (proto.type) {
|
|
882
|
-
m.type = enumStringToValue$
|
|
1153
|
+
m.type = enumStringToValue$7(ModelType, proto.type);
|
|
883
1154
|
}
|
|
884
1155
|
return m;
|
|
885
1156
|
}
|
|
@@ -910,7 +1181,7 @@ class Model {
|
|
|
910
1181
|
}
|
|
911
1182
|
}
|
|
912
1183
|
|
|
913
|
-
function enumStringToValue$
|
|
1184
|
+
function enumStringToValue$6(enumRef, value) {
|
|
914
1185
|
if (typeof value === 'number') {
|
|
915
1186
|
return value;
|
|
916
1187
|
}
|
|
@@ -924,7 +1195,7 @@ class Assistant {
|
|
|
924
1195
|
m.namespace = Namespace.fromProto(proto.namespace);
|
|
925
1196
|
}
|
|
926
1197
|
if (proto.type) {
|
|
927
|
-
m.type = enumStringToValue$
|
|
1198
|
+
m.type = enumStringToValue$6(AssistantType, proto.type);
|
|
928
1199
|
}
|
|
929
1200
|
if (proto.config) {
|
|
930
1201
|
m.config = Config.fromProto(proto.config);
|
|
@@ -1214,7 +1485,7 @@ class ConfigVoiceConfig {
|
|
|
1214
1485
|
let m = new ConfigVoiceConfig();
|
|
1215
1486
|
m = Object.assign(m, proto);
|
|
1216
1487
|
if (proto.vendorModel) {
|
|
1217
|
-
m.vendorModel = enumStringToValue$
|
|
1488
|
+
m.vendorModel = enumStringToValue$6(VendorModel, proto.vendorModel);
|
|
1218
1489
|
}
|
|
1219
1490
|
if (proto.modelConfig) {
|
|
1220
1491
|
m.modelConfig = ModelConfig.fromProto(proto.modelConfig);
|
|
@@ -1239,7 +1510,7 @@ class ConfigVoiceConfig {
|
|
|
1239
1510
|
}
|
|
1240
1511
|
}
|
|
1241
1512
|
|
|
1242
|
-
function enumStringToValue$
|
|
1513
|
+
function enumStringToValue$5(enumRef, value) {
|
|
1243
1514
|
if (typeof value === 'number') {
|
|
1244
1515
|
return value;
|
|
1245
1516
|
}
|
|
@@ -1256,7 +1527,7 @@ class Connection {
|
|
|
1256
1527
|
m.assistantKeys = proto.assistantKeys.map(AssistantKey.fromProto);
|
|
1257
1528
|
}
|
|
1258
1529
|
if (proto.supportedAssistantTypes) {
|
|
1259
|
-
m.supportedAssistantTypes = proto.supportedAssistantTypes.map((v) => enumStringToValue$
|
|
1530
|
+
m.supportedAssistantTypes = proto.supportedAssistantTypes.map((v) => enumStringToValue$5(AssistantType, v));
|
|
1260
1531
|
}
|
|
1261
1532
|
return m;
|
|
1262
1533
|
}
|
|
@@ -1331,7 +1602,7 @@ class ConnectionKey {
|
|
|
1331
1602
|
}
|
|
1332
1603
|
}
|
|
1333
1604
|
|
|
1334
|
-
function enumStringToValue$
|
|
1605
|
+
function enumStringToValue$4(enumRef, value) {
|
|
1335
1606
|
if (typeof value === 'number') {
|
|
1336
1607
|
return value;
|
|
1337
1608
|
}
|
|
@@ -1342,7 +1613,7 @@ class ChatAnswerFunctionExecutionJob {
|
|
|
1342
1613
|
let m = new ChatAnswerFunctionExecutionJob();
|
|
1343
1614
|
m = Object.assign(m, proto);
|
|
1344
1615
|
if (proto.status) {
|
|
1345
|
-
m.status = enumStringToValue$
|
|
1616
|
+
m.status = enumStringToValue$4(ChatAnswerFunctionExecutionJobStatus, proto.status);
|
|
1346
1617
|
}
|
|
1347
1618
|
if (proto.result) {
|
|
1348
1619
|
m.result = ChatAnswerFunctionExecutionJobResult.fromProto(proto.result);
|
|
@@ -1403,7 +1674,7 @@ class ChatMessage {
|
|
|
1403
1674
|
let m = new ChatMessage();
|
|
1404
1675
|
m = Object.assign(m, proto);
|
|
1405
1676
|
if (proto.role) {
|
|
1406
|
-
m.role = enumStringToValue$
|
|
1677
|
+
m.role = enumStringToValue$4(ChatMessageRole, proto.role);
|
|
1407
1678
|
}
|
|
1408
1679
|
return m;
|
|
1409
1680
|
}
|
|
@@ -1495,68 +1766,6 @@ class ContextInfo {
|
|
|
1495
1766
|
}
|
|
1496
1767
|
}
|
|
1497
1768
|
|
|
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
1769
|
function enumStringToValue$3(enumRef, value) {
|
|
1561
1770
|
if (typeof value === 'number') {
|
|
1562
1771
|
return value;
|
|
@@ -4944,6 +5153,20 @@ class FunctionApiService {
|
|
|
4944
5153
|
const request = (r.toApiJson) ? r : new DeleteFunctionRequest(r);
|
|
4945
5154
|
return this.http.post(this._host + "/ai_assistants.v1alpha1.FunctionService/Delete", request.toApiJson(), { ...this.apiOptions(), observe: 'response' });
|
|
4946
5155
|
}
|
|
5156
|
+
listMcpTools(r) {
|
|
5157
|
+
const request = (r.toApiJson) ? r : new ListMCPToolsRequest(r);
|
|
5158
|
+
return this.http.post(this._host + "/ai_assistants.v1alpha1.FunctionService/ListMCPTools", request.toApiJson(), this.apiOptions())
|
|
5159
|
+
.pipe(map(resp => ListMCPToolsResponse.fromProto(resp)));
|
|
5160
|
+
}
|
|
5161
|
+
upsertMcp(r) {
|
|
5162
|
+
const request = (r.toApiJson) ? r : new UpsertMCPRequest(r);
|
|
5163
|
+
return this.http.post(this._host + "/ai_assistants.v1alpha1.FunctionService/UpsertMCP", request.toApiJson(), { ...this.apiOptions(), observe: 'response' });
|
|
5164
|
+
}
|
|
5165
|
+
listMcPs(r) {
|
|
5166
|
+
const request = (r.toApiJson) ? r : new ListMCPsRequest(r);
|
|
5167
|
+
return this.http.post(this._host + "/ai_assistants.v1alpha1.FunctionService/ListMCPs", request.toApiJson(), this.apiOptions())
|
|
5168
|
+
.pipe(map(resp => ListMCPsResponse.fromProto(resp)));
|
|
5169
|
+
}
|
|
4947
5170
|
}
|
|
4948
5171
|
FunctionApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: FunctionApiService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
4949
5172
|
FunctionApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: FunctionApiService, providedIn: 'root' });
|
|
@@ -5246,5 +5469,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
5246
5469
|
* Generated bundle index. Do not edit.
|
|
5247
5470
|
*/
|
|
5248
5471
|
|
|
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 };
|
|
5472
|
+
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
5473
|
//# sourceMappingURL=vendasta-ai-assistants.mjs.map
|