@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
@@ -1061,6 +1061,104 @@ class FunctionAuthStrategyPlatformManagedFunctionAuthStrategy {
1061
1061
  return toReturn;
1062
1062
  }
1063
1063
  }
1064
+ class SerializeFunctionRequest {
1065
+ static fromProto(proto) {
1066
+ let m = new SerializeFunctionRequest();
1067
+ m = Object.assign(m, proto);
1068
+ if (proto.function) {
1069
+ m.function = Function.fromProto(proto.function);
1070
+ }
1071
+ return m;
1072
+ }
1073
+ constructor(kwargs) {
1074
+ if (!kwargs) {
1075
+ return;
1076
+ }
1077
+ Object.assign(this, kwargs);
1078
+ }
1079
+ toApiJson() {
1080
+ const toReturn = {};
1081
+ if (typeof this.function !== 'undefined' && this.function !== null) {
1082
+ toReturn['function'] = 'toApiJson' in this.function ? this.function.toApiJson() : this.function;
1083
+ }
1084
+ return toReturn;
1085
+ }
1086
+ }
1087
+ class SerializeFunctionResponse {
1088
+ static fromProto(proto) {
1089
+ let m = new SerializeFunctionResponse();
1090
+ m = Object.assign(m, proto);
1091
+ return m;
1092
+ }
1093
+ constructor(kwargs) {
1094
+ if (!kwargs) {
1095
+ return;
1096
+ }
1097
+ Object.assign(this, kwargs);
1098
+ }
1099
+ toApiJson() {
1100
+ const toReturn = {};
1101
+ if (typeof this.file !== 'undefined') {
1102
+ toReturn['file'] = this.file;
1103
+ }
1104
+ return toReturn;
1105
+ }
1106
+ }
1107
+ class SerializeMCPRequest {
1108
+ static fromProto(proto) {
1109
+ let m = new SerializeMCPRequest();
1110
+ m = Object.assign(m, proto);
1111
+ if (proto.mcp) {
1112
+ m.mcp = MCP.fromProto(proto.mcp);
1113
+ }
1114
+ if (proto.headers) {
1115
+ m.headers = proto.headers.map(FunctionHeader.fromProto);
1116
+ }
1117
+ if (proto.constraints) {
1118
+ m.constraints = proto.constraints.map(Constraint.fromProto);
1119
+ }
1120
+ return m;
1121
+ }
1122
+ constructor(kwargs) {
1123
+ if (!kwargs) {
1124
+ return;
1125
+ }
1126
+ Object.assign(this, kwargs);
1127
+ }
1128
+ toApiJson() {
1129
+ const toReturn = {};
1130
+ if (typeof this.mcp !== 'undefined' && this.mcp !== null) {
1131
+ toReturn['mcp'] = 'toApiJson' in this.mcp ? this.mcp.toApiJson() : this.mcp;
1132
+ }
1133
+ if (typeof this.headers !== 'undefined' && this.headers !== null) {
1134
+ toReturn['headers'] = 'toApiJson' in this.headers ? this.headers.toApiJson() : this.headers;
1135
+ }
1136
+ if (typeof this.constraints !== 'undefined' && this.constraints !== null) {
1137
+ toReturn['constraints'] = 'toApiJson' in this.constraints ? this.constraints.toApiJson() : this.constraints;
1138
+ }
1139
+ return toReturn;
1140
+ }
1141
+ }
1142
+ class SerializeMCPResponse {
1143
+ static fromProto(proto) {
1144
+ let m = new SerializeMCPResponse();
1145
+ m = Object.assign(m, proto);
1146
+ return m;
1147
+ }
1148
+ constructor(kwargs) {
1149
+ if (!kwargs) {
1150
+ return;
1151
+ }
1152
+ Object.assign(this, kwargs);
1153
+ }
1154
+ toApiJson() {
1155
+ const toReturn = {};
1156
+ if (typeof this.file !== 'undefined') {
1157
+ toReturn['file'] = this.file;
1158
+ }
1159
+ return toReturn;
1160
+ }
1161
+ }
1064
1162
  class FunctionAuthStrategyUnspecifiedFunctionAuthStrategy {
1065
1163
  static fromProto(proto) {
1066
1164
  let m = new FunctionAuthStrategyUnspecifiedFunctionAuthStrategy();
@@ -1414,6 +1512,55 @@ class PromptModuleVersion {
1414
1512
  return toReturn;
1415
1513
  }
1416
1514
  }
1515
+ class SerializePromptModuleRequest {
1516
+ static fromProto(proto) {
1517
+ let m = new SerializePromptModuleRequest();
1518
+ m = Object.assign(m, proto);
1519
+ if (proto.promptModule) {
1520
+ m.promptModule = PromptModule.fromProto(proto.promptModule);
1521
+ }
1522
+ return m;
1523
+ }
1524
+ constructor(kwargs) {
1525
+ if (!kwargs) {
1526
+ return;
1527
+ }
1528
+ Object.assign(this, kwargs);
1529
+ }
1530
+ toApiJson() {
1531
+ const toReturn = {};
1532
+ if (typeof this.promptModule !== 'undefined' && this.promptModule !== null) {
1533
+ toReturn['promptModule'] = 'toApiJson' in this.promptModule ? this.promptModule.toApiJson() : this.promptModule;
1534
+ }
1535
+ if (typeof this.content !== 'undefined') {
1536
+ toReturn['content'] = this.content;
1537
+ }
1538
+ return toReturn;
1539
+ }
1540
+ }
1541
+ class SerializePromptModuleResponse {
1542
+ static fromProto(proto) {
1543
+ let m = new SerializePromptModuleResponse();
1544
+ m = Object.assign(m, proto);
1545
+ return m;
1546
+ }
1547
+ constructor(kwargs) {
1548
+ if (!kwargs) {
1549
+ return;
1550
+ }
1551
+ Object.assign(this, kwargs);
1552
+ }
1553
+ toApiJson() {
1554
+ const toReturn = {};
1555
+ if (typeof this.promptModuleFile !== 'undefined') {
1556
+ toReturn['promptModuleFile'] = this.promptModuleFile;
1557
+ }
1558
+ if (typeof this.contentFile !== 'undefined') {
1559
+ toReturn['contentFile'] = this.contentFile;
1560
+ }
1561
+ return toReturn;
1562
+ }
1563
+ }
1417
1564
 
1418
1565
  function enumStringToValue$9(enumRef, value) {
1419
1566
  if (typeof value === 'number') {
@@ -1530,6 +1677,49 @@ class GoalKey {
1530
1677
  return toReturn;
1531
1678
  }
1532
1679
  }
1680
+ class SerializeGoalRequest {
1681
+ static fromProto(proto) {
1682
+ let m = new SerializeGoalRequest();
1683
+ m = Object.assign(m, proto);
1684
+ if (proto.goal) {
1685
+ m.goal = Goal.fromProto(proto.goal);
1686
+ }
1687
+ return m;
1688
+ }
1689
+ constructor(kwargs) {
1690
+ if (!kwargs) {
1691
+ return;
1692
+ }
1693
+ Object.assign(this, kwargs);
1694
+ }
1695
+ toApiJson() {
1696
+ const toReturn = {};
1697
+ if (typeof this.goal !== 'undefined' && this.goal !== null) {
1698
+ toReturn['goal'] = 'toApiJson' in this.goal ? this.goal.toApiJson() : this.goal;
1699
+ }
1700
+ return toReturn;
1701
+ }
1702
+ }
1703
+ class SerializeGoalResponse {
1704
+ static fromProto(proto) {
1705
+ let m = new SerializeGoalResponse();
1706
+ m = Object.assign(m, proto);
1707
+ return m;
1708
+ }
1709
+ constructor(kwargs) {
1710
+ if (!kwargs) {
1711
+ return;
1712
+ }
1713
+ Object.assign(this, kwargs);
1714
+ }
1715
+ toApiJson() {
1716
+ const toReturn = {};
1717
+ if (typeof this.file !== 'undefined') {
1718
+ toReturn['file'] = this.file;
1719
+ }
1720
+ return toReturn;
1721
+ }
1722
+ }
1533
1723
  class ValidateGoalsRequest {
1534
1724
  static fromProto(proto) {
1535
1725
  let m = new ValidateGoalsRequest();
@@ -3470,19 +3660,28 @@ class ExecuteFunctionResponse {
3470
3660
  return toReturn;
3471
3661
  }
3472
3662
  }
3473
- class ListFunctionRequestFilters {
3663
+ class ListGoalsRequestFilters {
3474
3664
  static fromProto(proto) {
3475
- let m = new ListFunctionRequestFilters();
3665
+ let m = new ListGoalsRequestFilters();
3476
3666
  m = Object.assign(m, proto);
3477
3667
  if (proto.namespace) {
3478
3668
  m.namespace = Namespace.fromProto(proto.namespace);
3479
3669
  }
3670
+ if (proto.type) {
3671
+ m.type = enumStringToValue(GoalType, proto.type);
3672
+ }
3673
+ if (proto.supportedChannels) {
3674
+ m.supportedChannels = proto.supportedChannels.map((v) => enumStringToValue(GoalChannel, v));
3675
+ }
3480
3676
  if (proto.namespaces) {
3481
3677
  m.namespaces = proto.namespaces.map(Namespace.fromProto);
3482
3678
  }
3483
3679
  if (proto.constraintFilters) {
3484
3680
  m.constraintFilters = proto.constraintFilters.map(ConstraintFilter.fromProto);
3485
3681
  }
3682
+ if (proto.sortOptions) {
3683
+ m.sortOptions = proto.sortOptions.map(ListGoalsRequestSortOptions.fromProto);
3684
+ }
3486
3685
  return m;
3487
3686
  }
3488
3687
  constructor(kwargs) {
@@ -3496,30 +3695,65 @@ class ListFunctionRequestFilters {
3496
3695
  if (typeof this.namespace !== 'undefined' && this.namespace !== null) {
3497
3696
  toReturn['namespace'] = 'toApiJson' in this.namespace ? this.namespace.toApiJson() : this.namespace;
3498
3697
  }
3698
+ if (typeof this.type !== 'undefined') {
3699
+ toReturn['type'] = this.type;
3700
+ }
3701
+ if (typeof this.supportedChannels !== 'undefined') {
3702
+ toReturn['supportedChannels'] = this.supportedChannels;
3703
+ }
3499
3704
  if (typeof this.namespaces !== 'undefined' && this.namespaces !== null) {
3500
3705
  toReturn['namespaces'] = 'toApiJson' in this.namespaces ? this.namespaces.toApiJson() : this.namespaces;
3501
3706
  }
3502
- if (typeof this.mcpId !== 'undefined') {
3503
- toReturn['mcpId'] = this.mcpId;
3504
- }
3505
3707
  if (typeof this.constraintFilters !== 'undefined' && this.constraintFilters !== null) {
3506
3708
  toReturn['constraintFilters'] = 'toApiJson' in this.constraintFilters ? this.constraintFilters.toApiJson() : this.constraintFilters;
3507
3709
  }
3710
+ if (typeof this.searchTerm !== 'undefined') {
3711
+ toReturn['searchTerm'] = this.searchTerm;
3712
+ }
3713
+ if (typeof this.sortOptions !== 'undefined' && this.sortOptions !== null) {
3714
+ toReturn['sortOptions'] = 'toApiJson' in this.sortOptions ? this.sortOptions.toApiJson() : this.sortOptions;
3715
+ }
3716
+ if (typeof this.omitOverrides !== 'undefined') {
3717
+ toReturn['omitOverrides'] = this.omitOverrides;
3718
+ }
3508
3719
  return toReturn;
3509
3720
  }
3510
3721
  }
3511
- class ListGoalsRequestFilters {
3722
+ class ListAssistantRequestFilters {
3512
3723
  static fromProto(proto) {
3513
- let m = new ListGoalsRequestFilters();
3724
+ let m = new ListAssistantRequestFilters();
3514
3725
  m = Object.assign(m, proto);
3515
3726
  if (proto.namespace) {
3516
3727
  m.namespace = Namespace.fromProto(proto.namespace);
3517
3728
  }
3518
3729
  if (proto.type) {
3519
- m.type = enumStringToValue(GoalType, proto.type);
3730
+ m.type = enumStringToValue(AssistantType, proto.type);
3520
3731
  }
3521
- if (proto.supportedChannels) {
3522
- m.supportedChannels = proto.supportedChannels.map((v) => enumStringToValue(GoalChannel, v));
3732
+ return m;
3733
+ }
3734
+ constructor(kwargs) {
3735
+ if (!kwargs) {
3736
+ return;
3737
+ }
3738
+ Object.assign(this, kwargs);
3739
+ }
3740
+ toApiJson() {
3741
+ const toReturn = {};
3742
+ if (typeof this.namespace !== 'undefined' && this.namespace !== null) {
3743
+ toReturn['namespace'] = 'toApiJson' in this.namespace ? this.namespace.toApiJson() : this.namespace;
3744
+ }
3745
+ if (typeof this.type !== 'undefined') {
3746
+ toReturn['type'] = this.type;
3747
+ }
3748
+ return toReturn;
3749
+ }
3750
+ }
3751
+ class ListFunctionRequestFilters {
3752
+ static fromProto(proto) {
3753
+ let m = new ListFunctionRequestFilters();
3754
+ m = Object.assign(m, proto);
3755
+ if (proto.namespace) {
3756
+ m.namespace = Namespace.fromProto(proto.namespace);
3523
3757
  }
3524
3758
  if (proto.namespaces) {
3525
3759
  m.namespaces = proto.namespaces.map(Namespace.fromProto);
@@ -3527,9 +3761,6 @@ class ListGoalsRequestFilters {
3527
3761
  if (proto.constraintFilters) {
3528
3762
  m.constraintFilters = proto.constraintFilters.map(ConstraintFilter.fromProto);
3529
3763
  }
3530
- if (proto.sortOptions) {
3531
- m.sortOptions = proto.sortOptions.map(ListGoalsRequestSortOptions.fromProto);
3532
- }
3533
3764
  return m;
3534
3765
  }
3535
3766
  constructor(kwargs) {
@@ -3543,39 +3774,27 @@ class ListGoalsRequestFilters {
3543
3774
  if (typeof this.namespace !== 'undefined' && this.namespace !== null) {
3544
3775
  toReturn['namespace'] = 'toApiJson' in this.namespace ? this.namespace.toApiJson() : this.namespace;
3545
3776
  }
3546
- if (typeof this.type !== 'undefined') {
3547
- toReturn['type'] = this.type;
3548
- }
3549
- if (typeof this.supportedChannels !== 'undefined') {
3550
- toReturn['supportedChannels'] = this.supportedChannels;
3551
- }
3552
3777
  if (typeof this.namespaces !== 'undefined' && this.namespaces !== null) {
3553
3778
  toReturn['namespaces'] = 'toApiJson' in this.namespaces ? this.namespaces.toApiJson() : this.namespaces;
3554
3779
  }
3780
+ if (typeof this.mcpId !== 'undefined') {
3781
+ toReturn['mcpId'] = this.mcpId;
3782
+ }
3555
3783
  if (typeof this.constraintFilters !== 'undefined' && this.constraintFilters !== null) {
3556
3784
  toReturn['constraintFilters'] = 'toApiJson' in this.constraintFilters ? this.constraintFilters.toApiJson() : this.constraintFilters;
3557
3785
  }
3558
- if (typeof this.searchTerm !== 'undefined') {
3559
- toReturn['searchTerm'] = this.searchTerm;
3560
- }
3561
- if (typeof this.sortOptions !== 'undefined' && this.sortOptions !== null) {
3562
- toReturn['sortOptions'] = 'toApiJson' in this.sortOptions ? this.sortOptions.toApiJson() : this.sortOptions;
3563
- }
3564
- if (typeof this.omitOverrides !== 'undefined') {
3565
- toReturn['omitOverrides'] = this.omitOverrides;
3566
- }
3567
3786
  return toReturn;
3568
3787
  }
3569
3788
  }
3570
- class ListAssistantRequestFilters {
3789
+ class ListAvailableModelsRequestFilters {
3571
3790
  static fromProto(proto) {
3572
- let m = new ListAssistantRequestFilters();
3791
+ let m = new ListAvailableModelsRequestFilters();
3573
3792
  m = Object.assign(m, proto);
3574
- if (proto.namespace) {
3575
- m.namespace = Namespace.fromProto(proto.namespace);
3793
+ if (proto.vendor) {
3794
+ m.vendor = proto.vendor.map((v) => enumStringToValue(ModelVendor, v));
3576
3795
  }
3577
3796
  if (proto.type) {
3578
- m.type = enumStringToValue(AssistantType, proto.type);
3797
+ m.type = proto.type.map((v) => enumStringToValue(ModelType, v));
3579
3798
  }
3580
3799
  return m;
3581
3800
  }
@@ -3587,8 +3806,8 @@ class ListAssistantRequestFilters {
3587
3806
  }
3588
3807
  toApiJson() {
3589
3808
  const toReturn = {};
3590
- if (typeof this.namespace !== 'undefined' && this.namespace !== null) {
3591
- toReturn['namespace'] = 'toApiJson' in this.namespace ? this.namespace.toApiJson() : this.namespace;
3809
+ if (typeof this.vendor !== 'undefined') {
3810
+ toReturn['vendor'] = this.vendor;
3592
3811
  }
3593
3812
  if (typeof this.type !== 'undefined') {
3594
3813
  toReturn['type'] = this.type;
@@ -3671,35 +3890,6 @@ class ListConnectionsRequestFilters {
3671
3890
  return toReturn;
3672
3891
  }
3673
3892
  }
3674
- class ListAvailableModelsRequestFilters {
3675
- static fromProto(proto) {
3676
- let m = new ListAvailableModelsRequestFilters();
3677
- m = Object.assign(m, proto);
3678
- if (proto.vendor) {
3679
- m.vendor = proto.vendor.map((v) => enumStringToValue(ModelVendor, v));
3680
- }
3681
- if (proto.type) {
3682
- m.type = proto.type.map((v) => enumStringToValue(ModelType, v));
3683
- }
3684
- return m;
3685
- }
3686
- constructor(kwargs) {
3687
- if (!kwargs) {
3688
- return;
3689
- }
3690
- Object.assign(this, kwargs);
3691
- }
3692
- toApiJson() {
3693
- const toReturn = {};
3694
- if (typeof this.vendor !== 'undefined') {
3695
- toReturn['vendor'] = this.vendor;
3696
- }
3697
- if (typeof this.type !== 'undefined') {
3698
- toReturn['type'] = this.type;
3699
- }
3700
- return toReturn;
3701
- }
3702
- }
3703
3893
  class GenerateChatAnswerRequest {
3704
3894
  static fromProto(proto) {
3705
3895
  let m = new GenerateChatAnswerRequest();
@@ -5002,10 +5192,13 @@ class ListTemplateVariablesResponse {
5002
5192
  return toReturn;
5003
5193
  }
5004
5194
  }
5005
- class UpsertAssistantRequestOptions {
5195
+ class GenerateChatAnswerRequestOptions {
5006
5196
  static fromProto(proto) {
5007
- let m = new UpsertAssistantRequestOptions();
5197
+ let m = new GenerateChatAnswerRequestOptions();
5008
5198
  m = Object.assign(m, proto);
5199
+ if (proto.maxTokens) {
5200
+ m.maxTokens = parseInt(proto.maxTokens, 10);
5201
+ }
5009
5202
  return m;
5010
5203
  }
5011
5204
  constructor(kwargs) {
@@ -5016,8 +5209,14 @@ class UpsertAssistantRequestOptions {
5016
5209
  }
5017
5210
  toApiJson() {
5018
5211
  const toReturn = {};
5019
- if (typeof this.applyDefaults !== 'undefined') {
5020
- toReturn['applyDefaults'] = this.applyDefaults;
5212
+ if (typeof this.includeAllCitations !== 'undefined') {
5213
+ toReturn['includeAllCitations'] = this.includeAllCitations;
5214
+ }
5215
+ if (typeof this.enableAsyncFunctions !== 'undefined') {
5216
+ toReturn['enableAsyncFunctions'] = this.enableAsyncFunctions;
5217
+ }
5218
+ if (typeof this.maxTokens !== 'undefined') {
5219
+ toReturn['maxTokens'] = this.maxTokens;
5021
5220
  }
5022
5221
  return toReturn;
5023
5222
  }
@@ -5042,9 +5241,9 @@ class GetMultiAssistantRequestOptions {
5042
5241
  return toReturn;
5043
5242
  }
5044
5243
  }
5045
- class CreatePromptModuleVersionRequestOptions {
5244
+ class UpsertAssistantRequestOptions {
5046
5245
  static fromProto(proto) {
5047
- let m = new CreatePromptModuleVersionRequestOptions();
5246
+ let m = new UpsertAssistantRequestOptions();
5048
5247
  m = Object.assign(m, proto);
5049
5248
  return m;
5050
5249
  }
@@ -5056,15 +5255,15 @@ class CreatePromptModuleVersionRequestOptions {
5056
5255
  }
5057
5256
  toApiJson() {
5058
5257
  const toReturn = {};
5059
- if (typeof this.shouldDeploy !== 'undefined') {
5060
- toReturn['shouldDeploy'] = this.shouldDeploy;
5258
+ if (typeof this.applyDefaults !== 'undefined') {
5259
+ toReturn['applyDefaults'] = this.applyDefaults;
5061
5260
  }
5062
5261
  return toReturn;
5063
5262
  }
5064
5263
  }
5065
- class CreateAssistantRequestOptions {
5264
+ class GetAssistantRequestOptions {
5066
5265
  static fromProto(proto) {
5067
- let m = new CreateAssistantRequestOptions();
5266
+ let m = new GetAssistantRequestOptions();
5068
5267
  m = Object.assign(m, proto);
5069
5268
  return m;
5070
5269
  }
@@ -5076,15 +5275,15 @@ class CreateAssistantRequestOptions {
5076
5275
  }
5077
5276
  toApiJson() {
5078
5277
  const toReturn = {};
5079
- if (typeof this.applyDefaults !== 'undefined') {
5080
- toReturn['applyDefaults'] = this.applyDefaults;
5278
+ if (typeof this.skipGoalsHydration !== 'undefined') {
5279
+ toReturn['skipGoalsHydration'] = this.skipGoalsHydration;
5081
5280
  }
5082
5281
  return toReturn;
5083
5282
  }
5084
5283
  }
5085
- class GetAssistantRequestOptions {
5284
+ class CreateAssistantRequestOptions {
5086
5285
  static fromProto(proto) {
5087
- let m = new GetAssistantRequestOptions();
5286
+ let m = new CreateAssistantRequestOptions();
5088
5287
  m = Object.assign(m, proto);
5089
5288
  return m;
5090
5289
  }
@@ -5096,18 +5295,18 @@ class GetAssistantRequestOptions {
5096
5295
  }
5097
5296
  toApiJson() {
5098
5297
  const toReturn = {};
5099
- if (typeof this.skipGoalsHydration !== 'undefined') {
5100
- toReturn['skipGoalsHydration'] = this.skipGoalsHydration;
5298
+ if (typeof this.applyDefaults !== 'undefined') {
5299
+ toReturn['applyDefaults'] = this.applyDefaults;
5101
5300
  }
5102
5301
  return toReturn;
5103
5302
  }
5104
5303
  }
5105
- class GenerateChatAnswerRequestOptions {
5304
+ class ExecuteFunctionRequestOptions {
5106
5305
  static fromProto(proto) {
5107
- let m = new GenerateChatAnswerRequestOptions();
5306
+ let m = new ExecuteFunctionRequestOptions();
5108
5307
  m = Object.assign(m, proto);
5109
- if (proto.maxTokens) {
5110
- m.maxTokens = parseInt(proto.maxTokens, 10);
5308
+ if (proto.contextInfo) {
5309
+ m.contextInfo = ContextInfo.fromProto(proto.contextInfo);
5111
5310
  }
5112
5311
  return m;
5113
5312
  }
@@ -5119,25 +5318,19 @@ class GenerateChatAnswerRequestOptions {
5119
5318
  }
5120
5319
  toApiJson() {
5121
5320
  const toReturn = {};
5122
- if (typeof this.includeAllCitations !== 'undefined') {
5123
- toReturn['includeAllCitations'] = this.includeAllCitations;
5124
- }
5125
- if (typeof this.enableAsyncFunctions !== 'undefined') {
5126
- toReturn['enableAsyncFunctions'] = this.enableAsyncFunctions;
5321
+ if (typeof this.skipComputeTemplateVariables !== 'undefined') {
5322
+ toReturn['skipComputeTemplateVariables'] = this.skipComputeTemplateVariables;
5127
5323
  }
5128
- if (typeof this.maxTokens !== 'undefined') {
5129
- toReturn['maxTokens'] = this.maxTokens;
5324
+ if (typeof this.contextInfo !== 'undefined' && this.contextInfo !== null) {
5325
+ toReturn['contextInfo'] = 'toApiJson' in this.contextInfo ? this.contextInfo.toApiJson() : this.contextInfo;
5130
5326
  }
5131
5327
  return toReturn;
5132
5328
  }
5133
5329
  }
5134
- class ExecuteFunctionRequestOptions {
5330
+ class CreatePromptModuleVersionRequestOptions {
5135
5331
  static fromProto(proto) {
5136
- let m = new ExecuteFunctionRequestOptions();
5332
+ let m = new CreatePromptModuleVersionRequestOptions();
5137
5333
  m = Object.assign(m, proto);
5138
- if (proto.contextInfo) {
5139
- m.contextInfo = ContextInfo.fromProto(proto.contextInfo);
5140
- }
5141
5334
  return m;
5142
5335
  }
5143
5336
  constructor(kwargs) {
@@ -5148,11 +5341,8 @@ class ExecuteFunctionRequestOptions {
5148
5341
  }
5149
5342
  toApiJson() {
5150
5343
  const toReturn = {};
5151
- if (typeof this.skipComputeTemplateVariables !== 'undefined') {
5152
- toReturn['skipComputeTemplateVariables'] = this.skipComputeTemplateVariables;
5153
- }
5154
- if (typeof this.contextInfo !== 'undefined' && this.contextInfo !== null) {
5155
- toReturn['contextInfo'] = 'toApiJson' in this.contextInfo ? this.contextInfo.toApiJson() : this.contextInfo;
5344
+ if (typeof this.shouldDeploy !== 'undefined') {
5345
+ toReturn['shouldDeploy'] = this.shouldDeploy;
5156
5346
  }
5157
5347
  return toReturn;
5158
5348
  }
@@ -5186,6 +5376,35 @@ class SetAssistantConnectionsRequest {
5186
5376
  return toReturn;
5187
5377
  }
5188
5378
  }
5379
+ class SetConnectionAssistantRequest {
5380
+ static fromProto(proto) {
5381
+ let m = new SetConnectionAssistantRequest();
5382
+ m = Object.assign(m, proto);
5383
+ if (proto.connectionKey) {
5384
+ m.connectionKey = ConnectionKey.fromProto(proto.connectionKey);
5385
+ }
5386
+ if (proto.assistantKey) {
5387
+ m.assistantKey = AssistantKey.fromProto(proto.assistantKey);
5388
+ }
5389
+ return m;
5390
+ }
5391
+ constructor(kwargs) {
5392
+ if (!kwargs) {
5393
+ return;
5394
+ }
5395
+ Object.assign(this, kwargs);
5396
+ }
5397
+ toApiJson() {
5398
+ const toReturn = {};
5399
+ if (typeof this.connectionKey !== 'undefined' && this.connectionKey !== null) {
5400
+ toReturn['connectionKey'] = 'toApiJson' in this.connectionKey ? this.connectionKey.toApiJson() : this.connectionKey;
5401
+ }
5402
+ if (typeof this.assistantKey !== 'undefined' && this.assistantKey !== null) {
5403
+ toReturn['assistantKey'] = 'toApiJson' in this.assistantKey ? this.assistantKey.toApiJson() : this.assistantKey;
5404
+ }
5405
+ return toReturn;
5406
+ }
5407
+ }
5189
5408
  class ListGoalsRequestSortOptions {
5190
5409
  static fromProto(proto) {
5191
5410
  let m = new ListGoalsRequestSortOptions();
@@ -5835,6 +6054,10 @@ class ConnectionApiService {
5835
6054
  return this.http.post(this._host + "/ai_assistants.v1alpha1.ConnectionService/ListConnections", request.toApiJson(), this.apiOptions())
5836
6055
  .pipe(map(resp => ListConnectionsResponse.fromProto(resp)));
5837
6056
  }
6057
+ setConnectionAssistant(r) {
6058
+ const request = (r.toApiJson) ? r : new SetConnectionAssistantRequest(r);
6059
+ return this.http.post(this._host + "/ai_assistants.v1alpha1.ConnectionService/SetConnectionAssistant", request.toApiJson(), { ...this.apiOptions(), observe: 'response' });
6060
+ }
5838
6061
  }
5839
6062
  ConnectionApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ConnectionApiService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
5840
6063
  ConnectionApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ConnectionApiService, providedIn: 'root' });
@@ -5918,6 +6141,16 @@ class FunctionApiService {
5918
6141
  return this.http.post(this._host + "/ai_assistants.v1alpha1.FunctionService/ValidateMCPs", request.toApiJson(), this.apiOptions())
5919
6142
  .pipe(map(resp => ValidateMCPsResponse.fromProto(resp)));
5920
6143
  }
6144
+ serializeFunction(r) {
6145
+ const request = (r.toApiJson) ? r : new SerializeFunctionRequest(r);
6146
+ return this.http.post(this._host + "/ai_assistants.v1alpha1.FunctionService/SerializeFunction", request.toApiJson(), this.apiOptions())
6147
+ .pipe(map(resp => SerializeFunctionResponse.fromProto(resp)));
6148
+ }
6149
+ serializeMcp(r) {
6150
+ const request = (r.toApiJson) ? r : new SerializeMCPRequest(r);
6151
+ return this.http.post(this._host + "/ai_assistants.v1alpha1.FunctionService/SerializeMCP", request.toApiJson(), this.apiOptions())
6152
+ .pipe(map(resp => SerializeMCPResponse.fromProto(resp)));
6153
+ }
5921
6154
  }
5922
6155
  FunctionApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: FunctionApiService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
5923
6156
  FunctionApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: FunctionApiService, providedIn: 'root' });
@@ -5988,6 +6221,11 @@ class GoalApiService {
5988
6221
  return this.http.post(this._host + "/ai_assistants.v1alpha1.GoalService/ValidateGoals", request.toApiJson(), this.apiOptions())
5989
6222
  .pipe(map(resp => ValidateGoalsResponse.fromProto(resp)));
5990
6223
  }
6224
+ serializeGoal(r) {
6225
+ const request = (r.toApiJson) ? r : new SerializeGoalRequest(r);
6226
+ return this.http.post(this._host + "/ai_assistants.v1alpha1.GoalService/SerializeGoal", request.toApiJson(), this.apiOptions())
6227
+ .pipe(map(resp => SerializeGoalResponse.fromProto(resp)));
6228
+ }
5991
6229
  }
5992
6230
  GoalApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: GoalApiService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
5993
6231
  GoalApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: GoalApiService, providedIn: 'root' });
@@ -6147,6 +6385,11 @@ class PromptModuleApiService {
6147
6385
  return this.http.post(this._host + "/ai_assistants.v1alpha1.PromptModuleService/ValidatePromptModuleVersions", request.toApiJson(), this.apiOptions())
6148
6386
  .pipe(map(resp => ValidatePromptModuleVersionsResponse.fromProto(resp)));
6149
6387
  }
6388
+ serializePromptModule(r) {
6389
+ const request = (r.toApiJson) ? r : new SerializePromptModuleRequest(r);
6390
+ return this.http.post(this._host + "/ai_assistants.v1alpha1.PromptModuleService/SerializePromptModule", request.toApiJson(), this.apiOptions())
6391
+ .pipe(map(resp => SerializePromptModuleResponse.fromProto(resp)));
6392
+ }
6150
6393
  }
6151
6394
  PromptModuleApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PromptModuleApiService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
6152
6395
  PromptModuleApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PromptModuleApiService, providedIn: 'root' });
@@ -6166,5 +6409,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
6166
6409
  * Generated bundle index. Do not edit.
6167
6410
  */
6168
6411
 
6169
- 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 };
6412
+ 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 };
6170
6413
  //# sourceMappingURL=vendasta-ai-assistants.mjs.map