@vendasta/ai-assistants 0.62.0 → 0.63.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.
Files changed (33) hide show
  1. package/esm2020/lib/_internal/connection.api.service.mjs +6 -2
  2. package/esm2020/lib/_internal/function.api.service.mjs +12 -2
  3. package/esm2020/lib/_internal/goal.api.service.mjs +7 -2
  4. package/esm2020/lib/_internal/interfaces/api.interface.mjs +1 -1
  5. package/esm2020/lib/_internal/interfaces/function.interface.mjs +1 -1
  6. package/esm2020/lib/_internal/interfaces/goal.interface.mjs +1 -1
  7. package/esm2020/lib/_internal/interfaces/index.mjs +1 -1
  8. package/esm2020/lib/_internal/interfaces/prompt.interface.mjs +1 -1
  9. package/esm2020/lib/_internal/objects/api.mjs +131 -102
  10. package/esm2020/lib/_internal/objects/function.mjs +99 -1
  11. package/esm2020/lib/_internal/objects/goal.mjs +44 -1
  12. package/esm2020/lib/_internal/objects/index.mjs +5 -5
  13. package/esm2020/lib/_internal/objects/prompt.mjs +50 -1
  14. package/esm2020/lib/_internal/prompt-module.api.service.mjs +7 -2
  15. package/fesm2015/vendasta-ai-assistants.mjs +345 -102
  16. package/fesm2015/vendasta-ai-assistants.mjs.map +1 -1
  17. package/fesm2020/vendasta-ai-assistants.mjs +345 -102
  18. package/fesm2020/vendasta-ai-assistants.mjs.map +1 -1
  19. package/lib/_internal/connection.api.service.d.ts +3 -2
  20. package/lib/_internal/function.api.service.d.ts +4 -2
  21. package/lib/_internal/goal.api.service.d.ts +3 -2
  22. package/lib/_internal/interfaces/api.interface.d.ts +24 -20
  23. package/lib/_internal/interfaces/function.interface.d.ts +14 -0
  24. package/lib/_internal/interfaces/goal.interface.d.ts +6 -0
  25. package/lib/_internal/interfaces/index.d.ts +4 -4
  26. package/lib/_internal/interfaces/prompt.interface.d.ts +8 -0
  27. package/lib/_internal/objects/api.d.ts +42 -35
  28. package/lib/_internal/objects/function.d.ts +26 -0
  29. package/lib/_internal/objects/goal.d.ts +12 -0
  30. package/lib/_internal/objects/index.d.ts +4 -4
  31. package/lib/_internal/objects/prompt.d.ts +14 -0
  32. package/lib/_internal/prompt-module.api.service.d.ts +3 -2
  33. package/package.json +1 -1
@@ -1062,6 +1062,104 @@ class FunctionAuthStrategyPlatformManagedFunctionAuthStrategy {
1062
1062
  return toReturn;
1063
1063
  }
1064
1064
  }
1065
+ class SerializeFunctionRequest {
1066
+ static fromProto(proto) {
1067
+ let m = new SerializeFunctionRequest();
1068
+ m = Object.assign(m, proto);
1069
+ if (proto.function) {
1070
+ m.function = Function.fromProto(proto.function);
1071
+ }
1072
+ return m;
1073
+ }
1074
+ constructor(kwargs) {
1075
+ if (!kwargs) {
1076
+ return;
1077
+ }
1078
+ Object.assign(this, kwargs);
1079
+ }
1080
+ toApiJson() {
1081
+ const toReturn = {};
1082
+ if (typeof this.function !== 'undefined' && this.function !== null) {
1083
+ toReturn['function'] = 'toApiJson' in this.function ? this.function.toApiJson() : this.function;
1084
+ }
1085
+ return toReturn;
1086
+ }
1087
+ }
1088
+ class SerializeFunctionResponse {
1089
+ static fromProto(proto) {
1090
+ let m = new SerializeFunctionResponse();
1091
+ m = Object.assign(m, proto);
1092
+ return m;
1093
+ }
1094
+ constructor(kwargs) {
1095
+ if (!kwargs) {
1096
+ return;
1097
+ }
1098
+ Object.assign(this, kwargs);
1099
+ }
1100
+ toApiJson() {
1101
+ const toReturn = {};
1102
+ if (typeof this.file !== 'undefined') {
1103
+ toReturn['file'] = this.file;
1104
+ }
1105
+ return toReturn;
1106
+ }
1107
+ }
1108
+ class SerializeMCPRequest {
1109
+ static fromProto(proto) {
1110
+ let m = new SerializeMCPRequest();
1111
+ m = Object.assign(m, proto);
1112
+ if (proto.mcp) {
1113
+ m.mcp = MCP.fromProto(proto.mcp);
1114
+ }
1115
+ if (proto.headers) {
1116
+ m.headers = proto.headers.map(FunctionHeader.fromProto);
1117
+ }
1118
+ if (proto.constraints) {
1119
+ m.constraints = proto.constraints.map(Constraint.fromProto);
1120
+ }
1121
+ return m;
1122
+ }
1123
+ constructor(kwargs) {
1124
+ if (!kwargs) {
1125
+ return;
1126
+ }
1127
+ Object.assign(this, kwargs);
1128
+ }
1129
+ toApiJson() {
1130
+ const toReturn = {};
1131
+ if (typeof this.mcp !== 'undefined' && this.mcp !== null) {
1132
+ toReturn['mcp'] = 'toApiJson' in this.mcp ? this.mcp.toApiJson() : this.mcp;
1133
+ }
1134
+ if (typeof this.headers !== 'undefined' && this.headers !== null) {
1135
+ toReturn['headers'] = 'toApiJson' in this.headers ? this.headers.toApiJson() : this.headers;
1136
+ }
1137
+ if (typeof this.constraints !== 'undefined' && this.constraints !== null) {
1138
+ toReturn['constraints'] = 'toApiJson' in this.constraints ? this.constraints.toApiJson() : this.constraints;
1139
+ }
1140
+ return toReturn;
1141
+ }
1142
+ }
1143
+ class SerializeMCPResponse {
1144
+ static fromProto(proto) {
1145
+ let m = new SerializeMCPResponse();
1146
+ m = Object.assign(m, proto);
1147
+ return m;
1148
+ }
1149
+ constructor(kwargs) {
1150
+ if (!kwargs) {
1151
+ return;
1152
+ }
1153
+ Object.assign(this, kwargs);
1154
+ }
1155
+ toApiJson() {
1156
+ const toReturn = {};
1157
+ if (typeof this.file !== 'undefined') {
1158
+ toReturn['file'] = this.file;
1159
+ }
1160
+ return toReturn;
1161
+ }
1162
+ }
1065
1163
  class FunctionAuthStrategyUnspecifiedFunctionAuthStrategy {
1066
1164
  static fromProto(proto) {
1067
1165
  let m = new FunctionAuthStrategyUnspecifiedFunctionAuthStrategy();
@@ -1415,6 +1513,55 @@ class PromptModuleVersion {
1415
1513
  return toReturn;
1416
1514
  }
1417
1515
  }
1516
+ class SerializePromptModuleRequest {
1517
+ static fromProto(proto) {
1518
+ let m = new SerializePromptModuleRequest();
1519
+ m = Object.assign(m, proto);
1520
+ if (proto.promptModule) {
1521
+ m.promptModule = PromptModule.fromProto(proto.promptModule);
1522
+ }
1523
+ return m;
1524
+ }
1525
+ constructor(kwargs) {
1526
+ if (!kwargs) {
1527
+ return;
1528
+ }
1529
+ Object.assign(this, kwargs);
1530
+ }
1531
+ toApiJson() {
1532
+ const toReturn = {};
1533
+ if (typeof this.promptModule !== 'undefined' && this.promptModule !== null) {
1534
+ toReturn['promptModule'] = 'toApiJson' in this.promptModule ? this.promptModule.toApiJson() : this.promptModule;
1535
+ }
1536
+ if (typeof this.content !== 'undefined') {
1537
+ toReturn['content'] = this.content;
1538
+ }
1539
+ return toReturn;
1540
+ }
1541
+ }
1542
+ class SerializePromptModuleResponse {
1543
+ static fromProto(proto) {
1544
+ let m = new SerializePromptModuleResponse();
1545
+ m = Object.assign(m, proto);
1546
+ return m;
1547
+ }
1548
+ constructor(kwargs) {
1549
+ if (!kwargs) {
1550
+ return;
1551
+ }
1552
+ Object.assign(this, kwargs);
1553
+ }
1554
+ toApiJson() {
1555
+ const toReturn = {};
1556
+ if (typeof this.promptModuleFile !== 'undefined') {
1557
+ toReturn['promptModuleFile'] = this.promptModuleFile;
1558
+ }
1559
+ if (typeof this.contentFile !== 'undefined') {
1560
+ toReturn['contentFile'] = this.contentFile;
1561
+ }
1562
+ return toReturn;
1563
+ }
1564
+ }
1418
1565
 
1419
1566
  function enumStringToValue$9(enumRef, value) {
1420
1567
  if (typeof value === 'number') {
@@ -1531,6 +1678,49 @@ class GoalKey {
1531
1678
  return toReturn;
1532
1679
  }
1533
1680
  }
1681
+ class SerializeGoalRequest {
1682
+ static fromProto(proto) {
1683
+ let m = new SerializeGoalRequest();
1684
+ m = Object.assign(m, proto);
1685
+ if (proto.goal) {
1686
+ m.goal = Goal.fromProto(proto.goal);
1687
+ }
1688
+ return m;
1689
+ }
1690
+ constructor(kwargs) {
1691
+ if (!kwargs) {
1692
+ return;
1693
+ }
1694
+ Object.assign(this, kwargs);
1695
+ }
1696
+ toApiJson() {
1697
+ const toReturn = {};
1698
+ if (typeof this.goal !== 'undefined' && this.goal !== null) {
1699
+ toReturn['goal'] = 'toApiJson' in this.goal ? this.goal.toApiJson() : this.goal;
1700
+ }
1701
+ return toReturn;
1702
+ }
1703
+ }
1704
+ class SerializeGoalResponse {
1705
+ static fromProto(proto) {
1706
+ let m = new SerializeGoalResponse();
1707
+ m = Object.assign(m, proto);
1708
+ return m;
1709
+ }
1710
+ constructor(kwargs) {
1711
+ if (!kwargs) {
1712
+ return;
1713
+ }
1714
+ Object.assign(this, kwargs);
1715
+ }
1716
+ toApiJson() {
1717
+ const toReturn = {};
1718
+ if (typeof this.file !== 'undefined') {
1719
+ toReturn['file'] = this.file;
1720
+ }
1721
+ return toReturn;
1722
+ }
1723
+ }
1534
1724
  class ValidateGoalsRequest {
1535
1725
  static fromProto(proto) {
1536
1726
  let m = new ValidateGoalsRequest();
@@ -3471,19 +3661,28 @@ class ExecuteFunctionResponse {
3471
3661
  return toReturn;
3472
3662
  }
3473
3663
  }
3474
- class ListFunctionRequestFilters {
3664
+ class ListGoalsRequestFilters {
3475
3665
  static fromProto(proto) {
3476
- let m = new ListFunctionRequestFilters();
3666
+ let m = new ListGoalsRequestFilters();
3477
3667
  m = Object.assign(m, proto);
3478
3668
  if (proto.namespace) {
3479
3669
  m.namespace = Namespace.fromProto(proto.namespace);
3480
3670
  }
3671
+ if (proto.type) {
3672
+ m.type = enumStringToValue(GoalType, proto.type);
3673
+ }
3674
+ if (proto.supportedChannels) {
3675
+ m.supportedChannels = proto.supportedChannels.map((v) => enumStringToValue(GoalChannel, v));
3676
+ }
3481
3677
  if (proto.namespaces) {
3482
3678
  m.namespaces = proto.namespaces.map(Namespace.fromProto);
3483
3679
  }
3484
3680
  if (proto.constraintFilters) {
3485
3681
  m.constraintFilters = proto.constraintFilters.map(ConstraintFilter.fromProto);
3486
3682
  }
3683
+ if (proto.sortOptions) {
3684
+ m.sortOptions = proto.sortOptions.map(ListGoalsRequestSortOptions.fromProto);
3685
+ }
3487
3686
  return m;
3488
3687
  }
3489
3688
  constructor(kwargs) {
@@ -3497,30 +3696,65 @@ class ListFunctionRequestFilters {
3497
3696
  if (typeof this.namespace !== 'undefined' && this.namespace !== null) {
3498
3697
  toReturn['namespace'] = 'toApiJson' in this.namespace ? this.namespace.toApiJson() : this.namespace;
3499
3698
  }
3699
+ if (typeof this.type !== 'undefined') {
3700
+ toReturn['type'] = this.type;
3701
+ }
3702
+ if (typeof this.supportedChannels !== 'undefined') {
3703
+ toReturn['supportedChannels'] = this.supportedChannels;
3704
+ }
3500
3705
  if (typeof this.namespaces !== 'undefined' && this.namespaces !== null) {
3501
3706
  toReturn['namespaces'] = 'toApiJson' in this.namespaces ? this.namespaces.toApiJson() : this.namespaces;
3502
3707
  }
3503
- if (typeof this.mcpId !== 'undefined') {
3504
- toReturn['mcpId'] = this.mcpId;
3505
- }
3506
3708
  if (typeof this.constraintFilters !== 'undefined' && this.constraintFilters !== null) {
3507
3709
  toReturn['constraintFilters'] = 'toApiJson' in this.constraintFilters ? this.constraintFilters.toApiJson() : this.constraintFilters;
3508
3710
  }
3711
+ if (typeof this.searchTerm !== 'undefined') {
3712
+ toReturn['searchTerm'] = this.searchTerm;
3713
+ }
3714
+ if (typeof this.sortOptions !== 'undefined' && this.sortOptions !== null) {
3715
+ toReturn['sortOptions'] = 'toApiJson' in this.sortOptions ? this.sortOptions.toApiJson() : this.sortOptions;
3716
+ }
3717
+ if (typeof this.omitOverrides !== 'undefined') {
3718
+ toReturn['omitOverrides'] = this.omitOverrides;
3719
+ }
3509
3720
  return toReturn;
3510
3721
  }
3511
3722
  }
3512
- class ListGoalsRequestFilters {
3723
+ class ListAssistantRequestFilters {
3513
3724
  static fromProto(proto) {
3514
- let m = new ListGoalsRequestFilters();
3725
+ let m = new ListAssistantRequestFilters();
3515
3726
  m = Object.assign(m, proto);
3516
3727
  if (proto.namespace) {
3517
3728
  m.namespace = Namespace.fromProto(proto.namespace);
3518
3729
  }
3519
3730
  if (proto.type) {
3520
- m.type = enumStringToValue(GoalType, proto.type);
3731
+ m.type = enumStringToValue(AssistantType, proto.type);
3521
3732
  }
3522
- if (proto.supportedChannels) {
3523
- m.supportedChannels = proto.supportedChannels.map((v) => enumStringToValue(GoalChannel, v));
3733
+ return m;
3734
+ }
3735
+ constructor(kwargs) {
3736
+ if (!kwargs) {
3737
+ return;
3738
+ }
3739
+ Object.assign(this, kwargs);
3740
+ }
3741
+ toApiJson() {
3742
+ const toReturn = {};
3743
+ if (typeof this.namespace !== 'undefined' && this.namespace !== null) {
3744
+ toReturn['namespace'] = 'toApiJson' in this.namespace ? this.namespace.toApiJson() : this.namespace;
3745
+ }
3746
+ if (typeof this.type !== 'undefined') {
3747
+ toReturn['type'] = this.type;
3748
+ }
3749
+ return toReturn;
3750
+ }
3751
+ }
3752
+ class ListFunctionRequestFilters {
3753
+ static fromProto(proto) {
3754
+ let m = new ListFunctionRequestFilters();
3755
+ m = Object.assign(m, proto);
3756
+ if (proto.namespace) {
3757
+ m.namespace = Namespace.fromProto(proto.namespace);
3524
3758
  }
3525
3759
  if (proto.namespaces) {
3526
3760
  m.namespaces = proto.namespaces.map(Namespace.fromProto);
@@ -3528,9 +3762,6 @@ class ListGoalsRequestFilters {
3528
3762
  if (proto.constraintFilters) {
3529
3763
  m.constraintFilters = proto.constraintFilters.map(ConstraintFilter.fromProto);
3530
3764
  }
3531
- if (proto.sortOptions) {
3532
- m.sortOptions = proto.sortOptions.map(ListGoalsRequestSortOptions.fromProto);
3533
- }
3534
3765
  return m;
3535
3766
  }
3536
3767
  constructor(kwargs) {
@@ -3544,39 +3775,27 @@ class ListGoalsRequestFilters {
3544
3775
  if (typeof this.namespace !== 'undefined' && this.namespace !== null) {
3545
3776
  toReturn['namespace'] = 'toApiJson' in this.namespace ? this.namespace.toApiJson() : this.namespace;
3546
3777
  }
3547
- if (typeof this.type !== 'undefined') {
3548
- toReturn['type'] = this.type;
3549
- }
3550
- if (typeof this.supportedChannels !== 'undefined') {
3551
- toReturn['supportedChannels'] = this.supportedChannels;
3552
- }
3553
3778
  if (typeof this.namespaces !== 'undefined' && this.namespaces !== null) {
3554
3779
  toReturn['namespaces'] = 'toApiJson' in this.namespaces ? this.namespaces.toApiJson() : this.namespaces;
3555
3780
  }
3781
+ if (typeof this.mcpId !== 'undefined') {
3782
+ toReturn['mcpId'] = this.mcpId;
3783
+ }
3556
3784
  if (typeof this.constraintFilters !== 'undefined' && this.constraintFilters !== null) {
3557
3785
  toReturn['constraintFilters'] = 'toApiJson' in this.constraintFilters ? this.constraintFilters.toApiJson() : this.constraintFilters;
3558
3786
  }
3559
- if (typeof this.searchTerm !== 'undefined') {
3560
- toReturn['searchTerm'] = this.searchTerm;
3561
- }
3562
- if (typeof this.sortOptions !== 'undefined' && this.sortOptions !== null) {
3563
- toReturn['sortOptions'] = 'toApiJson' in this.sortOptions ? this.sortOptions.toApiJson() : this.sortOptions;
3564
- }
3565
- if (typeof this.omitOverrides !== 'undefined') {
3566
- toReturn['omitOverrides'] = this.omitOverrides;
3567
- }
3568
3787
  return toReturn;
3569
3788
  }
3570
3789
  }
3571
- class ListAssistantRequestFilters {
3790
+ class ListAvailableModelsRequestFilters {
3572
3791
  static fromProto(proto) {
3573
- let m = new ListAssistantRequestFilters();
3792
+ let m = new ListAvailableModelsRequestFilters();
3574
3793
  m = Object.assign(m, proto);
3575
- if (proto.namespace) {
3576
- m.namespace = Namespace.fromProto(proto.namespace);
3794
+ if (proto.vendor) {
3795
+ m.vendor = proto.vendor.map((v) => enumStringToValue(ModelVendor, v));
3577
3796
  }
3578
3797
  if (proto.type) {
3579
- m.type = enumStringToValue(AssistantType, proto.type);
3798
+ m.type = proto.type.map((v) => enumStringToValue(ModelType, v));
3580
3799
  }
3581
3800
  return m;
3582
3801
  }
@@ -3588,8 +3807,8 @@ class ListAssistantRequestFilters {
3588
3807
  }
3589
3808
  toApiJson() {
3590
3809
  const toReturn = {};
3591
- if (typeof this.namespace !== 'undefined' && this.namespace !== null) {
3592
- toReturn['namespace'] = 'toApiJson' in this.namespace ? this.namespace.toApiJson() : this.namespace;
3810
+ if (typeof this.vendor !== 'undefined') {
3811
+ toReturn['vendor'] = this.vendor;
3593
3812
  }
3594
3813
  if (typeof this.type !== 'undefined') {
3595
3814
  toReturn['type'] = this.type;
@@ -3672,35 +3891,6 @@ class ListConnectionsRequestFilters {
3672
3891
  return toReturn;
3673
3892
  }
3674
3893
  }
3675
- class ListAvailableModelsRequestFilters {
3676
- static fromProto(proto) {
3677
- let m = new ListAvailableModelsRequestFilters();
3678
- m = Object.assign(m, proto);
3679
- if (proto.vendor) {
3680
- m.vendor = proto.vendor.map((v) => enumStringToValue(ModelVendor, v));
3681
- }
3682
- if (proto.type) {
3683
- m.type = proto.type.map((v) => enumStringToValue(ModelType, v));
3684
- }
3685
- return m;
3686
- }
3687
- constructor(kwargs) {
3688
- if (!kwargs) {
3689
- return;
3690
- }
3691
- Object.assign(this, kwargs);
3692
- }
3693
- toApiJson() {
3694
- const toReturn = {};
3695
- if (typeof this.vendor !== 'undefined') {
3696
- toReturn['vendor'] = this.vendor;
3697
- }
3698
- if (typeof this.type !== 'undefined') {
3699
- toReturn['type'] = this.type;
3700
- }
3701
- return toReturn;
3702
- }
3703
- }
3704
3894
  class GenerateChatAnswerRequest {
3705
3895
  static fromProto(proto) {
3706
3896
  let m = new GenerateChatAnswerRequest();
@@ -5003,10 +5193,13 @@ class ListTemplateVariablesResponse {
5003
5193
  return toReturn;
5004
5194
  }
5005
5195
  }
5006
- class UpsertAssistantRequestOptions {
5196
+ class GenerateChatAnswerRequestOptions {
5007
5197
  static fromProto(proto) {
5008
- let m = new UpsertAssistantRequestOptions();
5198
+ let m = new GenerateChatAnswerRequestOptions();
5009
5199
  m = Object.assign(m, proto);
5200
+ if (proto.maxTokens) {
5201
+ m.maxTokens = parseInt(proto.maxTokens, 10);
5202
+ }
5010
5203
  return m;
5011
5204
  }
5012
5205
  constructor(kwargs) {
@@ -5017,8 +5210,14 @@ class UpsertAssistantRequestOptions {
5017
5210
  }
5018
5211
  toApiJson() {
5019
5212
  const toReturn = {};
5020
- if (typeof this.applyDefaults !== 'undefined') {
5021
- toReturn['applyDefaults'] = this.applyDefaults;
5213
+ if (typeof this.includeAllCitations !== 'undefined') {
5214
+ toReturn['includeAllCitations'] = this.includeAllCitations;
5215
+ }
5216
+ if (typeof this.enableAsyncFunctions !== 'undefined') {
5217
+ toReturn['enableAsyncFunctions'] = this.enableAsyncFunctions;
5218
+ }
5219
+ if (typeof this.maxTokens !== 'undefined') {
5220
+ toReturn['maxTokens'] = this.maxTokens;
5022
5221
  }
5023
5222
  return toReturn;
5024
5223
  }
@@ -5043,9 +5242,9 @@ class GetMultiAssistantRequestOptions {
5043
5242
  return toReturn;
5044
5243
  }
5045
5244
  }
5046
- class CreatePromptModuleVersionRequestOptions {
5245
+ class UpsertAssistantRequestOptions {
5047
5246
  static fromProto(proto) {
5048
- let m = new CreatePromptModuleVersionRequestOptions();
5247
+ let m = new UpsertAssistantRequestOptions();
5049
5248
  m = Object.assign(m, proto);
5050
5249
  return m;
5051
5250
  }
@@ -5057,15 +5256,15 @@ class CreatePromptModuleVersionRequestOptions {
5057
5256
  }
5058
5257
  toApiJson() {
5059
5258
  const toReturn = {};
5060
- if (typeof this.shouldDeploy !== 'undefined') {
5061
- toReturn['shouldDeploy'] = this.shouldDeploy;
5259
+ if (typeof this.applyDefaults !== 'undefined') {
5260
+ toReturn['applyDefaults'] = this.applyDefaults;
5062
5261
  }
5063
5262
  return toReturn;
5064
5263
  }
5065
5264
  }
5066
- class CreateAssistantRequestOptions {
5265
+ class GetAssistantRequestOptions {
5067
5266
  static fromProto(proto) {
5068
- let m = new CreateAssistantRequestOptions();
5267
+ let m = new GetAssistantRequestOptions();
5069
5268
  m = Object.assign(m, proto);
5070
5269
  return m;
5071
5270
  }
@@ -5077,15 +5276,15 @@ class CreateAssistantRequestOptions {
5077
5276
  }
5078
5277
  toApiJson() {
5079
5278
  const toReturn = {};
5080
- if (typeof this.applyDefaults !== 'undefined') {
5081
- toReturn['applyDefaults'] = this.applyDefaults;
5279
+ if (typeof this.skipGoalsHydration !== 'undefined') {
5280
+ toReturn['skipGoalsHydration'] = this.skipGoalsHydration;
5082
5281
  }
5083
5282
  return toReturn;
5084
5283
  }
5085
5284
  }
5086
- class GetAssistantRequestOptions {
5285
+ class CreateAssistantRequestOptions {
5087
5286
  static fromProto(proto) {
5088
- let m = new GetAssistantRequestOptions();
5287
+ let m = new CreateAssistantRequestOptions();
5089
5288
  m = Object.assign(m, proto);
5090
5289
  return m;
5091
5290
  }
@@ -5097,18 +5296,18 @@ class GetAssistantRequestOptions {
5097
5296
  }
5098
5297
  toApiJson() {
5099
5298
  const toReturn = {};
5100
- if (typeof this.skipGoalsHydration !== 'undefined') {
5101
- toReturn['skipGoalsHydration'] = this.skipGoalsHydration;
5299
+ if (typeof this.applyDefaults !== 'undefined') {
5300
+ toReturn['applyDefaults'] = this.applyDefaults;
5102
5301
  }
5103
5302
  return toReturn;
5104
5303
  }
5105
5304
  }
5106
- class GenerateChatAnswerRequestOptions {
5305
+ class ExecuteFunctionRequestOptions {
5107
5306
  static fromProto(proto) {
5108
- let m = new GenerateChatAnswerRequestOptions();
5307
+ let m = new ExecuteFunctionRequestOptions();
5109
5308
  m = Object.assign(m, proto);
5110
- if (proto.maxTokens) {
5111
- m.maxTokens = parseInt(proto.maxTokens, 10);
5309
+ if (proto.contextInfo) {
5310
+ m.contextInfo = ContextInfo.fromProto(proto.contextInfo);
5112
5311
  }
5113
5312
  return m;
5114
5313
  }
@@ -5120,25 +5319,19 @@ class GenerateChatAnswerRequestOptions {
5120
5319
  }
5121
5320
  toApiJson() {
5122
5321
  const toReturn = {};
5123
- if (typeof this.includeAllCitations !== 'undefined') {
5124
- toReturn['includeAllCitations'] = this.includeAllCitations;
5125
- }
5126
- if (typeof this.enableAsyncFunctions !== 'undefined') {
5127
- toReturn['enableAsyncFunctions'] = this.enableAsyncFunctions;
5322
+ if (typeof this.skipComputeTemplateVariables !== 'undefined') {
5323
+ toReturn['skipComputeTemplateVariables'] = this.skipComputeTemplateVariables;
5128
5324
  }
5129
- if (typeof this.maxTokens !== 'undefined') {
5130
- toReturn['maxTokens'] = this.maxTokens;
5325
+ if (typeof this.contextInfo !== 'undefined' && this.contextInfo !== null) {
5326
+ toReturn['contextInfo'] = 'toApiJson' in this.contextInfo ? this.contextInfo.toApiJson() : this.contextInfo;
5131
5327
  }
5132
5328
  return toReturn;
5133
5329
  }
5134
5330
  }
5135
- class ExecuteFunctionRequestOptions {
5331
+ class CreatePromptModuleVersionRequestOptions {
5136
5332
  static fromProto(proto) {
5137
- let m = new ExecuteFunctionRequestOptions();
5333
+ let m = new CreatePromptModuleVersionRequestOptions();
5138
5334
  m = Object.assign(m, proto);
5139
- if (proto.contextInfo) {
5140
- m.contextInfo = ContextInfo.fromProto(proto.contextInfo);
5141
- }
5142
5335
  return m;
5143
5336
  }
5144
5337
  constructor(kwargs) {
@@ -5149,11 +5342,8 @@ class ExecuteFunctionRequestOptions {
5149
5342
  }
5150
5343
  toApiJson() {
5151
5344
  const toReturn = {};
5152
- if (typeof this.skipComputeTemplateVariables !== 'undefined') {
5153
- toReturn['skipComputeTemplateVariables'] = this.skipComputeTemplateVariables;
5154
- }
5155
- if (typeof this.contextInfo !== 'undefined' && this.contextInfo !== null) {
5156
- toReturn['contextInfo'] = 'toApiJson' in this.contextInfo ? this.contextInfo.toApiJson() : this.contextInfo;
5345
+ if (typeof this.shouldDeploy !== 'undefined') {
5346
+ toReturn['shouldDeploy'] = this.shouldDeploy;
5157
5347
  }
5158
5348
  return toReturn;
5159
5349
  }
@@ -5187,6 +5377,35 @@ class SetAssistantConnectionsRequest {
5187
5377
  return toReturn;
5188
5378
  }
5189
5379
  }
5380
+ class SetConnectionAssistantRequest {
5381
+ static fromProto(proto) {
5382
+ let m = new SetConnectionAssistantRequest();
5383
+ m = Object.assign(m, proto);
5384
+ if (proto.connectionKey) {
5385
+ m.connectionKey = ConnectionKey.fromProto(proto.connectionKey);
5386
+ }
5387
+ if (proto.assistantKey) {
5388
+ m.assistantKey = AssistantKey.fromProto(proto.assistantKey);
5389
+ }
5390
+ return m;
5391
+ }
5392
+ constructor(kwargs) {
5393
+ if (!kwargs) {
5394
+ return;
5395
+ }
5396
+ Object.assign(this, kwargs);
5397
+ }
5398
+ toApiJson() {
5399
+ const toReturn = {};
5400
+ if (typeof this.connectionKey !== 'undefined' && this.connectionKey !== null) {
5401
+ toReturn['connectionKey'] = 'toApiJson' in this.connectionKey ? this.connectionKey.toApiJson() : this.connectionKey;
5402
+ }
5403
+ if (typeof this.assistantKey !== 'undefined' && this.assistantKey !== null) {
5404
+ toReturn['assistantKey'] = 'toApiJson' in this.assistantKey ? this.assistantKey.toApiJson() : this.assistantKey;
5405
+ }
5406
+ return toReturn;
5407
+ }
5408
+ }
5190
5409
  class ListGoalsRequestSortOptions {
5191
5410
  static fromProto(proto) {
5192
5411
  let m = new ListGoalsRequestSortOptions();
@@ -5836,6 +6055,10 @@ class ConnectionApiService {
5836
6055
  return this.http.post(this._host + "/ai_assistants.v1alpha1.ConnectionService/ListConnections", request.toApiJson(), this.apiOptions())
5837
6056
  .pipe(map(resp => ListConnectionsResponse.fromProto(resp)));
5838
6057
  }
6058
+ setConnectionAssistant(r) {
6059
+ const request = (r.toApiJson) ? r : new SetConnectionAssistantRequest(r);
6060
+ return this.http.post(this._host + "/ai_assistants.v1alpha1.ConnectionService/SetConnectionAssistant", request.toApiJson(), Object.assign(Object.assign({}, this.apiOptions()), { observe: 'response' }));
6061
+ }
5839
6062
  }
5840
6063
  ConnectionApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ConnectionApiService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
5841
6064
  ConnectionApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ConnectionApiService, providedIn: 'root' });
@@ -5919,6 +6142,16 @@ class FunctionApiService {
5919
6142
  return this.http.post(this._host + "/ai_assistants.v1alpha1.FunctionService/ValidateMCPs", request.toApiJson(), this.apiOptions())
5920
6143
  .pipe(map(resp => ValidateMCPsResponse.fromProto(resp)));
5921
6144
  }
6145
+ serializeFunction(r) {
6146
+ const request = (r.toApiJson) ? r : new SerializeFunctionRequest(r);
6147
+ return this.http.post(this._host + "/ai_assistants.v1alpha1.FunctionService/SerializeFunction", request.toApiJson(), this.apiOptions())
6148
+ .pipe(map(resp => SerializeFunctionResponse.fromProto(resp)));
6149
+ }
6150
+ serializeMcp(r) {
6151
+ const request = (r.toApiJson) ? r : new SerializeMCPRequest(r);
6152
+ return this.http.post(this._host + "/ai_assistants.v1alpha1.FunctionService/SerializeMCP", request.toApiJson(), this.apiOptions())
6153
+ .pipe(map(resp => SerializeMCPResponse.fromProto(resp)));
6154
+ }
5922
6155
  }
5923
6156
  FunctionApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: FunctionApiService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
5924
6157
  FunctionApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: FunctionApiService, providedIn: 'root' });
@@ -5989,6 +6222,11 @@ class GoalApiService {
5989
6222
  return this.http.post(this._host + "/ai_assistants.v1alpha1.GoalService/ValidateGoals", request.toApiJson(), this.apiOptions())
5990
6223
  .pipe(map(resp => ValidateGoalsResponse.fromProto(resp)));
5991
6224
  }
6225
+ serializeGoal(r) {
6226
+ const request = (r.toApiJson) ? r : new SerializeGoalRequest(r);
6227
+ return this.http.post(this._host + "/ai_assistants.v1alpha1.GoalService/SerializeGoal", request.toApiJson(), this.apiOptions())
6228
+ .pipe(map(resp => SerializeGoalResponse.fromProto(resp)));
6229
+ }
5992
6230
  }
5993
6231
  GoalApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: GoalApiService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
5994
6232
  GoalApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: GoalApiService, providedIn: 'root' });
@@ -6148,6 +6386,11 @@ class PromptModuleApiService {
6148
6386
  return this.http.post(this._host + "/ai_assistants.v1alpha1.PromptModuleService/ValidatePromptModuleVersions", request.toApiJson(), this.apiOptions())
6149
6387
  .pipe(map(resp => ValidatePromptModuleVersionsResponse.fromProto(resp)));
6150
6388
  }
6389
+ serializePromptModule(r) {
6390
+ const request = (r.toApiJson) ? r : new SerializePromptModuleRequest(r);
6391
+ return this.http.post(this._host + "/ai_assistants.v1alpha1.PromptModuleService/SerializePromptModule", request.toApiJson(), this.apiOptions())
6392
+ .pipe(map(resp => SerializePromptModuleResponse.fromProto(resp)));
6393
+ }
6151
6394
  }
6152
6395
  PromptModuleApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PromptModuleApiService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
6153
6396
  PromptModuleApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PromptModuleApiService, providedIn: 'root' });
@@ -6167,5 +6410,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
6167
6410
  * Generated bundle index. Do not edit.
6168
6411
  */
6169
6412
 
6170
- export { Access, Action, AgentArchitecture, Assistant, AssistantApiService, AssistantKey, AssistantType, BuildDefaultAssistantRequest, BuildDefaultAssistantResponse, CancelTestRunRequest, ChatAnswerFunctionExecutionJob, ChatAnswerFunctionExecutionJobResult, ChatAnswerFunctionExecutionJobStatus, ChatChannel, ChatContent, ChatMessage, ChatMessageRole, ChatUserInfo, Config, ConfigInboxConfig, ConfigVoiceConfig, ConfigurableGoal, Connection, ConnectionApiService, ConnectionKey, Constraint, ConstraintFilter, ContextInfo, CreateAssistantRequest, CreateAssistantRequestOptions, CreateAssistantResponse, CreateGoalRequest, CreateGoalResponse, CreateMCPFromIntegrationRequest, CreatePromptModuleRequest, CreatePromptModuleResponse, CreatePromptModuleVersionRequest, CreatePromptModuleVersionRequestOptions, DeepgramConfig, DeleteAssistantRequest, DeleteConnectionRequest, DeleteFunctionRequest, DeleteGoalRequest, DeleteMCPRequest, DeletePromptModuleRequest, DeleteTestCasesRequest, DeployPromptModuleRequest, Effect, ElevenLabsConfig, ExecuteFunctionRequest, ExecuteFunctionRequestOptions, ExecuteFunctionResponse, FieldMask, Function, FunctionApiService, FunctionAuthStrategy, FunctionAuthStrategyConnectedIntegrationAuthStrategy, FunctionAuthStrategyImpersonationAuthStrategy, FunctionAuthStrategyPlatformManagedFunctionAuthStrategy, FunctionAuthStrategyUnspecifiedFunctionAuthStrategy, FunctionHeader, FunctionKey, FunctionParameter, FunctionParameterParameterLocation, GenerateChatAnswerRequest, GenerateChatAnswerRequestOptions, GenerateChatAnswerResponse, GetAssistantRequest, GetAssistantRequestOptions, GetAssistantResponse, GetChatAnswerFunctionExecutionJobRequest, GetChatAnswerFunctionExecutionJobResponse, GetConnectionRequest, GetConnectionResponse, GetDeployedPromptModuleVersionRequest, GetDeployedPromptModuleVersionResponse, GetFunctionRequest, GetFunctionResponse, GetGoalRequest, GetGoalResponse, GetHydratedDeployedPromptModuleVersionRequest, GetHydratedDeployedPromptModuleVersionResponse, GetMultiAssistantRequest, GetMultiAssistantRequestOptions, GetMultiAssistantResponse, GetMultiFunctionRequest, GetMultiFunctionResponse, GetMultiGoalRequest, GetMultiGoalResponse, GetMultiHydratedDeployedPromptModuleVersionRequest, GetMultiHydratedDeployedPromptModuleVersionResponse, GetPromptModuleRequest, GetPromptModuleResponse, GetPromptModuleVersionRequest, GetPromptModuleVersionResponse, GetTestRunRequest, GetTestRunResponse, Goal, GoalApiService, GoalChannel, GoalKey, GoalType, GoalsDisabledForAccountGroupRequest, GoalsDisabledForAccountGroupResponse, HostService, ImageContent, IntegrationTestApiService, KeyValuePair, ListAllAssistantsAssociatedToConnectionRequest, ListAllAssistantsAssociatedToConnectionRequestFilters, ListAllAssistantsAssociatedToConnectionResponse, ListAssistantRequest, ListAssistantRequestFilters, ListAssistantResponse, ListAvailableModelsRequest, ListAvailableModelsRequestFilters, ListAvailableModelsResponse, ListConnectionsRequest, ListConnectionsRequestFilters, ListConnectionsResponse, ListFunctionRequest, ListFunctionRequestFilters, ListFunctionResponse, ListGoalsRequest, ListGoalsRequestFilters, ListGoalsRequestSortOptions, ListGoalsRequestSortingOrder, ListGoalsResponse, ListMCPToolsRequest, ListMCPToolsResponse, ListMCPsRequest, ListMCPsRequestFilters, ListMCPsResponse, ListPromptModuleRequest, ListPromptModuleRequestFilters, ListPromptModuleResponse, ListPromptModuleVersionsRequest, ListPromptModuleVersionsResponse, ListTemplateVariablesRequest, ListTemplateVariablesResponse, ListTestCasesByAssistantRequest, ListTestCasesByAssistantResponse, ListTestRunsByAssistantRequest, ListTestRunsByAssistantResponse, MCP, MCPOptions, Model, ModelConfig, ModelType, ModelVendor, Namespace, NamespaceAccountGroupNamespace, NamespaceGlobalNamespace, NamespacePartnerNamespace, NamespaceSystemNamespace, NamespaceType, OpenAIConfig, OpenAIRealtimeConfig, OpenAIRealtimeConfigTurnDetection, PagedRequestOptions, PagedResponseMetadata, PromptModule, PromptModuleApiService, PromptModuleKey, PromptModuleVersion, RunTestsRequest, RunTestsResponse, Scope, SetAssistantConnectionsRequest, SetAssistantConnectionsRequestConnectionState, SortDirection, SortOptions, StreamingGenerateChatAnswerResponseContentType, TemplateVariable, TestCase, TestResult, TestResultCitation, TestRun, UpdateAssistantRequest, UpdateGoalRequest, UpdatePromptModuleRequest, UpsertAssistantRequest, UpsertAssistantRequestOptions, UpsertAssistantResponse, UpsertConnectionRequest, UpsertFunctionRequest, UpsertGoalRequest, UpsertMCPRequest, UpsertTestCasesRequest, ValidateFunctionsRequest, ValidateFunctionsResponse, ValidateFunctionsResponseValidationResult, ValidateGoalsRequest, ValidateGoalsResponse, ValidateGoalsResponseValidationResult, ValidateMCPsRequest, ValidateMCPsResponse, ValidateMCPsResponseValidationResult, ValidatePromptModuleRequest, ValidatePromptModuleResponse, ValidatePromptModuleVersionsRequest, ValidatePromptModuleVersionsResponse, ValidatePromptModuleVersionsResponseValidationResult, ValidatePromptModulesRequest, ValidatePromptModulesResponse, ValidatePromptModulesResponseValidationResult, ValidationFailureAction, ValidationResult, ValidationViolation, VendorModel };
6413
+ export { Access, Action, AgentArchitecture, Assistant, AssistantApiService, AssistantKey, AssistantType, BuildDefaultAssistantRequest, BuildDefaultAssistantResponse, CancelTestRunRequest, ChatAnswerFunctionExecutionJob, ChatAnswerFunctionExecutionJobResult, ChatAnswerFunctionExecutionJobStatus, ChatChannel, ChatContent, ChatMessage, ChatMessageRole, ChatUserInfo, Config, ConfigInboxConfig, ConfigVoiceConfig, ConfigurableGoal, Connection, ConnectionApiService, ConnectionKey, Constraint, ConstraintFilter, ContextInfo, CreateAssistantRequest, CreateAssistantRequestOptions, CreateAssistantResponse, CreateGoalRequest, CreateGoalResponse, CreateMCPFromIntegrationRequest, CreatePromptModuleRequest, CreatePromptModuleResponse, CreatePromptModuleVersionRequest, CreatePromptModuleVersionRequestOptions, DeepgramConfig, DeleteAssistantRequest, DeleteConnectionRequest, DeleteFunctionRequest, DeleteGoalRequest, DeleteMCPRequest, DeletePromptModuleRequest, DeleteTestCasesRequest, DeployPromptModuleRequest, Effect, ElevenLabsConfig, ExecuteFunctionRequest, ExecuteFunctionRequestOptions, ExecuteFunctionResponse, FieldMask, Function, FunctionApiService, FunctionAuthStrategy, FunctionAuthStrategyConnectedIntegrationAuthStrategy, FunctionAuthStrategyImpersonationAuthStrategy, FunctionAuthStrategyPlatformManagedFunctionAuthStrategy, FunctionAuthStrategyUnspecifiedFunctionAuthStrategy, FunctionHeader, FunctionKey, FunctionParameter, FunctionParameterParameterLocation, GenerateChatAnswerRequest, GenerateChatAnswerRequestOptions, GenerateChatAnswerResponse, GetAssistantRequest, GetAssistantRequestOptions, GetAssistantResponse, GetChatAnswerFunctionExecutionJobRequest, GetChatAnswerFunctionExecutionJobResponse, GetConnectionRequest, GetConnectionResponse, GetDeployedPromptModuleVersionRequest, GetDeployedPromptModuleVersionResponse, GetFunctionRequest, GetFunctionResponse, GetGoalRequest, GetGoalResponse, GetHydratedDeployedPromptModuleVersionRequest, GetHydratedDeployedPromptModuleVersionResponse, GetMultiAssistantRequest, GetMultiAssistantRequestOptions, GetMultiAssistantResponse, GetMultiFunctionRequest, GetMultiFunctionResponse, GetMultiGoalRequest, GetMultiGoalResponse, GetMultiHydratedDeployedPromptModuleVersionRequest, GetMultiHydratedDeployedPromptModuleVersionResponse, GetPromptModuleRequest, GetPromptModuleResponse, GetPromptModuleVersionRequest, GetPromptModuleVersionResponse, GetTestRunRequest, GetTestRunResponse, Goal, GoalApiService, GoalChannel, GoalKey, GoalType, GoalsDisabledForAccountGroupRequest, GoalsDisabledForAccountGroupResponse, HostService, ImageContent, IntegrationTestApiService, KeyValuePair, ListAllAssistantsAssociatedToConnectionRequest, ListAllAssistantsAssociatedToConnectionRequestFilters, ListAllAssistantsAssociatedToConnectionResponse, ListAssistantRequest, ListAssistantRequestFilters, ListAssistantResponse, ListAvailableModelsRequest, ListAvailableModelsRequestFilters, ListAvailableModelsResponse, ListConnectionsRequest, ListConnectionsRequestFilters, ListConnectionsResponse, ListFunctionRequest, ListFunctionRequestFilters, ListFunctionResponse, ListGoalsRequest, ListGoalsRequestFilters, ListGoalsRequestSortOptions, ListGoalsRequestSortingOrder, ListGoalsResponse, ListMCPToolsRequest, ListMCPToolsResponse, ListMCPsRequest, ListMCPsRequestFilters, ListMCPsResponse, ListPromptModuleRequest, ListPromptModuleRequestFilters, ListPromptModuleResponse, ListPromptModuleVersionsRequest, ListPromptModuleVersionsResponse, ListTemplateVariablesRequest, ListTemplateVariablesResponse, ListTestCasesByAssistantRequest, ListTestCasesByAssistantResponse, ListTestRunsByAssistantRequest, ListTestRunsByAssistantResponse, MCP, MCPOptions, Model, ModelConfig, ModelType, ModelVendor, Namespace, NamespaceAccountGroupNamespace, NamespaceGlobalNamespace, NamespacePartnerNamespace, NamespaceSystemNamespace, NamespaceType, OpenAIConfig, OpenAIRealtimeConfig, OpenAIRealtimeConfigTurnDetection, PagedRequestOptions, PagedResponseMetadata, PromptModule, PromptModuleApiService, PromptModuleKey, PromptModuleVersion, RunTestsRequest, RunTestsResponse, Scope, SerializeFunctionRequest, SerializeFunctionResponse, SerializeGoalRequest, SerializeGoalResponse, SerializeMCPRequest, SerializeMCPResponse, SerializePromptModuleRequest, SerializePromptModuleResponse, SetAssistantConnectionsRequest, SetAssistantConnectionsRequestConnectionState, SetConnectionAssistantRequest, SortDirection, SortOptions, StreamingGenerateChatAnswerResponseContentType, TemplateVariable, TestCase, TestResult, TestResultCitation, TestRun, UpdateAssistantRequest, UpdateGoalRequest, UpdatePromptModuleRequest, UpsertAssistantRequest, UpsertAssistantRequestOptions, UpsertAssistantResponse, UpsertConnectionRequest, UpsertFunctionRequest, UpsertGoalRequest, UpsertMCPRequest, UpsertTestCasesRequest, ValidateFunctionsRequest, ValidateFunctionsResponse, ValidateFunctionsResponseValidationResult, ValidateGoalsRequest, ValidateGoalsResponse, ValidateGoalsResponseValidationResult, ValidateMCPsRequest, ValidateMCPsResponse, ValidateMCPsResponseValidationResult, ValidatePromptModuleRequest, ValidatePromptModuleResponse, ValidatePromptModuleVersionsRequest, ValidatePromptModuleVersionsResponse, ValidatePromptModuleVersionsResponseValidationResult, ValidatePromptModulesRequest, ValidatePromptModulesResponse, ValidatePromptModulesResponseValidationResult, ValidationFailureAction, ValidationResult, ValidationViolation, VendorModel };
6171
6414
  //# sourceMappingURL=vendasta-ai-assistants.mjs.map