@vendasta/ai-assistants 0.29.0 → 0.31.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 (29) hide show
  1. package/esm2020/lib/_internal/assistant.api.service.mjs +11 -2
  2. package/esm2020/lib/_internal/enums/assistant.enum.mjs +3 -1
  3. package/esm2020/lib/_internal/interfaces/answer.interface.mjs +1 -1
  4. package/esm2020/lib/_internal/interfaces/api.interface.mjs +1 -1
  5. package/esm2020/lib/_internal/interfaces/field-mask.interface.mjs +8 -0
  6. package/esm2020/lib/_internal/interfaces/index.mjs +1 -1
  7. package/esm2020/lib/_internal/interfaces/namespace.interface.mjs +1 -1
  8. package/esm2020/lib/_internal/objects/answer.mjs +27 -1
  9. package/esm2020/lib/_internal/objects/api.mjs +142 -28
  10. package/esm2020/lib/_internal/objects/field-mask.mjs +27 -0
  11. package/esm2020/lib/_internal/objects/index.mjs +5 -4
  12. package/esm2020/lib/_internal/objects/namespace.mjs +1 -53
  13. package/fesm2015/vendasta-ai-assistants.mjs +222 -97
  14. package/fesm2015/vendasta-ai-assistants.mjs.map +1 -1
  15. package/fesm2020/vendasta-ai-assistants.mjs +222 -97
  16. package/fesm2020/vendasta-ai-assistants.mjs.map +1 -1
  17. package/lib/_internal/assistant.api.service.d.ts +4 -2
  18. package/lib/_internal/enums/assistant.enum.d.ts +3 -1
  19. package/lib/_internal/interfaces/answer.interface.d.ts +4 -0
  20. package/lib/_internal/interfaces/api.interface.d.ts +28 -11
  21. package/lib/_internal/interfaces/field-mask.interface.d.ts +3 -0
  22. package/lib/_internal/interfaces/index.d.ts +4 -3
  23. package/lib/_internal/interfaces/namespace.interface.d.ts +0 -8
  24. package/lib/_internal/objects/answer.d.ts +7 -0
  25. package/lib/_internal/objects/api.d.ts +44 -15
  26. package/lib/_internal/objects/field-mask.d.ts +8 -0
  27. package/lib/_internal/objects/index.d.ts +4 -3
  28. package/lib/_internal/objects/namespace.d.ts +0 -14
  29. package/package.json +1 -1
@@ -81,6 +81,8 @@ var AssistantType;
81
81
  AssistantType[AssistantType["ASSISTANT_TYPE_SOCIAL_MARKETING"] = 3] = "ASSISTANT_TYPE_SOCIAL_MARKETING";
82
82
  AssistantType[AssistantType["ASSISTANT_TYPE_VOICE_RECEPTIONIST"] = 4] = "ASSISTANT_TYPE_VOICE_RECEPTIONIST";
83
83
  AssistantType[AssistantType["ASSISTANT_TYPE_CUSTOM"] = 5] = "ASSISTANT_TYPE_CUSTOM";
84
+ AssistantType[AssistantType["ASSISTANT_TYPE_SALES_COACH"] = 6] = "ASSISTANT_TYPE_SALES_COACH";
85
+ AssistantType[AssistantType["ASSISTANT_TYPE_REPUTATION_MANAGEMENT_REVIEW_AGENT"] = 7] = "ASSISTANT_TYPE_REPUTATION_MANAGEMENT_REVIEW_AGENT";
84
86
  })(AssistantType || (AssistantType = {}));
85
87
  var VendorModel;
86
88
  (function (VendorModel) {
@@ -128,7 +130,7 @@ var ChatMessageRole;
128
130
  // Enums Index.
129
131
  // *********************************
130
132
 
131
- function enumStringToValue$a(enumRef, value) {
133
+ function enumStringToValue$b(enumRef, value) {
132
134
  if (typeof value === 'number') {
133
135
  return value;
134
136
  }
@@ -154,46 +156,6 @@ class NamespaceAccountGroupNamespace {
154
156
  return toReturn;
155
157
  }
156
158
  }
157
- class NamespaceAccountGroupsForGroupNamespace {
158
- static fromProto(proto) {
159
- let m = new NamespaceAccountGroupsForGroupNamespace();
160
- m = Object.assign(m, proto);
161
- return m;
162
- }
163
- constructor(kwargs) {
164
- if (!kwargs) {
165
- return;
166
- }
167
- Object.assign(this, kwargs);
168
- }
169
- toApiJson() {
170
- const toReturn = {};
171
- if (typeof this.groupPath !== 'undefined') {
172
- toReturn['groupPath'] = this.groupPath;
173
- }
174
- return toReturn;
175
- }
176
- }
177
- class NamespaceAccountGroupsForPartnerNamespace {
178
- static fromProto(proto) {
179
- let m = new NamespaceAccountGroupsForPartnerNamespace();
180
- m = Object.assign(m, proto);
181
- return m;
182
- }
183
- constructor(kwargs) {
184
- if (!kwargs) {
185
- return;
186
- }
187
- Object.assign(this, kwargs);
188
- }
189
- toApiJson() {
190
- const toReturn = {};
191
- if (typeof this.partnerId !== 'undefined') {
192
- toReturn['partnerId'] = this.partnerId;
193
- }
194
- return toReturn;
195
- }
196
- }
197
159
  class NamespaceGlobalNamespace {
198
160
  static fromProto(proto) {
199
161
  let m = new NamespaceGlobalNamespace();
@@ -224,12 +186,6 @@ class Namespace {
224
186
  if (proto.systemNamespace) {
225
187
  m.systemNamespace = NamespaceSystemNamespace.fromProto(proto.systemNamespace);
226
188
  }
227
- if (proto.accountGroupsForPartnerNamespace) {
228
- m.accountGroupsForPartnerNamespace = NamespaceAccountGroupsForPartnerNamespace.fromProto(proto.accountGroupsForPartnerNamespace);
229
- }
230
- if (proto.accountGroupsForGroupNamespace) {
231
- m.accountGroupsForGroupNamespace = NamespaceAccountGroupsForGroupNamespace.fromProto(proto.accountGroupsForGroupNamespace);
232
- }
233
189
  if (proto.globalNamespace) {
234
190
  m.globalNamespace = NamespaceGlobalNamespace.fromProto(proto.globalNamespace);
235
191
  }
@@ -252,12 +208,6 @@ class Namespace {
252
208
  if (typeof this.systemNamespace !== 'undefined' && this.systemNamespace !== null) {
253
209
  toReturn['systemNamespace'] = 'toApiJson' in this.systemNamespace ? this.systemNamespace.toApiJson() : this.systemNamespace;
254
210
  }
255
- if (typeof this.accountGroupsForPartnerNamespace !== 'undefined' && this.accountGroupsForPartnerNamespace !== null) {
256
- toReturn['accountGroupsForPartnerNamespace'] = 'toApiJson' in this.accountGroupsForPartnerNamespace ? this.accountGroupsForPartnerNamespace.toApiJson() : this.accountGroupsForPartnerNamespace;
257
- }
258
- if (typeof this.accountGroupsForGroupNamespace !== 'undefined' && this.accountGroupsForGroupNamespace !== null) {
259
- toReturn['accountGroupsForGroupNamespace'] = 'toApiJson' in this.accountGroupsForGroupNamespace ? this.accountGroupsForGroupNamespace.toApiJson() : this.accountGroupsForGroupNamespace;
260
- }
261
211
  if (typeof this.globalNamespace !== 'undefined' && this.globalNamespace !== null) {
262
212
  toReturn['globalNamespace'] = 'toApiJson' in this.globalNamespace ? this.globalNamespace.toApiJson() : this.globalNamespace;
263
213
  }
@@ -302,7 +252,7 @@ class NamespaceSystemNamespace {
302
252
  }
303
253
  }
304
254
 
305
- function enumStringToValue$9(enumRef, value) {
255
+ function enumStringToValue$a(enumRef, value) {
306
256
  if (typeof value === 'number') {
307
257
  return value;
308
258
  }
@@ -462,7 +412,7 @@ class FunctionParameter {
462
412
  m.items = FunctionParameter.fromProto(proto.items);
463
413
  }
464
414
  if (proto.location) {
465
- m.location = enumStringToValue$9(FunctionParameterParameterLocation, proto.location);
415
+ m.location = enumStringToValue$a(FunctionParameterParameterLocation, proto.location);
466
416
  }
467
417
  return m;
468
418
  }
@@ -536,7 +486,7 @@ class FunctionAuthStrategyUnspecifiedFunctionAuthStrategy {
536
486
  }
537
487
  }
538
488
 
539
- function enumStringToValue$8(enumRef, value) {
489
+ function enumStringToValue$9(enumRef, value) {
540
490
  if (typeof value === 'number') {
541
491
  return value;
542
492
  }
@@ -739,7 +689,7 @@ class PromptVersion {
739
689
  }
740
690
  }
741
691
 
742
- function enumStringToValue$7(enumRef, value) {
692
+ function enumStringToValue$8(enumRef, value) {
743
693
  if (typeof value === 'number') {
744
694
  return value;
745
695
  }
@@ -753,7 +703,7 @@ class Goal {
753
703
  m.namespace = Namespace.fromProto(proto.namespace);
754
704
  }
755
705
  if (proto.type) {
756
- m.type = enumStringToValue$7(GoalType, proto.type);
706
+ m.type = enumStringToValue$8(GoalType, proto.type);
757
707
  }
758
708
  if (proto.promptModules) {
759
709
  m.promptModules = proto.promptModules.map(PromptModule.fromProto);
@@ -765,7 +715,7 @@ class Goal {
765
715
  m.updated = new Date(proto.updated);
766
716
  }
767
717
  if (proto.supportedChannels) {
768
- m.supportedChannels = proto.supportedChannels.map((v) => enumStringToValue$7(GoalChannel, v));
718
+ m.supportedChannels = proto.supportedChannels.map((v) => enumStringToValue$8(GoalChannel, v));
769
719
  }
770
720
  return m;
771
721
  }
@@ -840,7 +790,7 @@ class GoalKey {
840
790
  }
841
791
  }
842
792
 
843
- function enumStringToValue$6(enumRef, value) {
793
+ function enumStringToValue$7(enumRef, value) {
844
794
  if (typeof value === 'number') {
845
795
  return value;
846
796
  }
@@ -870,7 +820,7 @@ class KeyValuePair {
870
820
  }
871
821
  }
872
822
 
873
- function enumStringToValue$5(enumRef, value) {
823
+ function enumStringToValue$6(enumRef, value) {
874
824
  if (typeof value === 'number') {
875
825
  return value;
876
826
  }
@@ -884,7 +834,7 @@ class Assistant {
884
834
  m.namespace = Namespace.fromProto(proto.namespace);
885
835
  }
886
836
  if (proto.type) {
887
- m.type = enumStringToValue$5(AssistantType, proto.type);
837
+ m.type = enumStringToValue$6(AssistantType, proto.type);
888
838
  }
889
839
  if (proto.config) {
890
840
  m.config = Config.fromProto(proto.config);
@@ -1142,7 +1092,7 @@ class ConfigVoiceConfig {
1142
1092
  let m = new ConfigVoiceConfig();
1143
1093
  m = Object.assign(m, proto);
1144
1094
  if (proto.vendorModel) {
1145
- m.vendorModel = enumStringToValue$5(VendorModel, proto.vendorModel);
1095
+ m.vendorModel = enumStringToValue$6(VendorModel, proto.vendorModel);
1146
1096
  }
1147
1097
  if (proto.modelConfig) {
1148
1098
  m.modelConfig = ModelConfig.fromProto(proto.modelConfig);
@@ -1167,7 +1117,7 @@ class ConfigVoiceConfig {
1167
1117
  }
1168
1118
  }
1169
1119
 
1170
- function enumStringToValue$4(enumRef, value) {
1120
+ function enumStringToValue$5(enumRef, value) {
1171
1121
  if (typeof value === 'number') {
1172
1122
  return value;
1173
1123
  }
@@ -1184,7 +1134,7 @@ class Connection {
1184
1134
  m.assistantKeys = proto.assistantKeys.map(AssistantKey.fromProto);
1185
1135
  }
1186
1136
  if (proto.supportedAssistantTypes) {
1187
- m.supportedAssistantTypes = proto.supportedAssistantTypes.map((v) => enumStringToValue$4(AssistantType, v));
1137
+ m.supportedAssistantTypes = proto.supportedAssistantTypes.map((v) => enumStringToValue$5(AssistantType, v));
1188
1138
  }
1189
1139
  return m;
1190
1140
  }
@@ -1259,7 +1209,7 @@ class ConnectionKey {
1259
1209
  }
1260
1210
  }
1261
1211
 
1262
- function enumStringToValue$3(enumRef, value) {
1212
+ function enumStringToValue$4(enumRef, value) {
1263
1213
  if (typeof value === 'number') {
1264
1214
  return value;
1265
1215
  }
@@ -1270,7 +1220,7 @@ class ChatAnswerFunctionExecutionJob {
1270
1220
  let m = new ChatAnswerFunctionExecutionJob();
1271
1221
  m = Object.assign(m, proto);
1272
1222
  if (proto.status) {
1273
- m.status = enumStringToValue$3(ChatAnswerFunctionExecutionJobStatus, proto.status);
1223
+ m.status = enumStringToValue$4(ChatAnswerFunctionExecutionJobStatus, proto.status);
1274
1224
  }
1275
1225
  if (proto.result) {
1276
1226
  m.result = ChatAnswerFunctionExecutionJobResult.fromProto(proto.result);
@@ -1331,7 +1281,7 @@ class ChatMessage {
1331
1281
  let m = new ChatMessage();
1332
1282
  m = Object.assign(m, proto);
1333
1283
  if (proto.role) {
1334
- m.role = enumStringToValue$3(ChatMessageRole, proto.role);
1284
+ m.role = enumStringToValue$4(ChatMessageRole, proto.role);
1335
1285
  }
1336
1286
  return m;
1337
1287
  }
@@ -1393,11 +1343,37 @@ class ChatUserInfo {
1393
1343
  if (typeof this.zipCode !== 'undefined') {
1394
1344
  toReturn['zipCode'] = this.zipCode;
1395
1345
  }
1346
+ if (typeof this.timezone !== 'undefined') {
1347
+ toReturn['timezone'] = this.timezone;
1348
+ }
1349
+ return toReturn;
1350
+ }
1351
+ }
1352
+ class ContextInfo {
1353
+ static fromProto(proto) {
1354
+ let m = new ContextInfo();
1355
+ m = Object.assign(m, proto);
1356
+ if (proto.variables) {
1357
+ m.variables = proto.variables.map(KeyValuePair.fromProto);
1358
+ }
1359
+ return m;
1360
+ }
1361
+ constructor(kwargs) {
1362
+ if (!kwargs) {
1363
+ return;
1364
+ }
1365
+ Object.assign(this, kwargs);
1366
+ }
1367
+ toApiJson() {
1368
+ const toReturn = {};
1369
+ if (typeof this.variables !== 'undefined' && this.variables !== null) {
1370
+ toReturn['variables'] = 'toApiJson' in this.variables ? this.variables.toApiJson() : this.variables;
1371
+ }
1396
1372
  return toReturn;
1397
1373
  }
1398
1374
  }
1399
1375
 
1400
- function enumStringToValue$2(enumRef, value) {
1376
+ function enumStringToValue$3(enumRef, value) {
1401
1377
  if (typeof value === 'number') {
1402
1378
  return value;
1403
1379
  }
@@ -1427,7 +1403,7 @@ class Access {
1427
1403
  }
1428
1404
  }
1429
1405
 
1430
- function enumStringToValue$1(enumRef, value) {
1406
+ function enumStringToValue$2(enumRef, value) {
1431
1407
  if (typeof value === 'number') {
1432
1408
  return value;
1433
1409
  }
@@ -1489,6 +1465,33 @@ class PagedResponseMetadata {
1489
1465
  }
1490
1466
  }
1491
1467
 
1468
+ function enumStringToValue$1(enumRef, value) {
1469
+ if (typeof value === 'number') {
1470
+ return value;
1471
+ }
1472
+ return enumRef[value];
1473
+ }
1474
+ class FieldMask {
1475
+ static fromProto(proto) {
1476
+ let m = new FieldMask();
1477
+ m = Object.assign(m, proto);
1478
+ return m;
1479
+ }
1480
+ constructor(kwargs) {
1481
+ if (!kwargs) {
1482
+ return;
1483
+ }
1484
+ Object.assign(this, kwargs);
1485
+ }
1486
+ toApiJson() {
1487
+ const toReturn = {};
1488
+ if (typeof this.paths !== 'undefined') {
1489
+ toReturn['paths'] = this.paths;
1490
+ }
1491
+ return toReturn;
1492
+ }
1493
+ }
1494
+
1492
1495
  function enumStringToValue(enumRef, value) {
1493
1496
  if (typeof value === 'number') {
1494
1497
  return value;
@@ -1576,6 +1579,58 @@ class SetAssistantConnectionsRequestConnectionState {
1576
1579
  return toReturn;
1577
1580
  }
1578
1581
  }
1582
+ class CreateAssistantRequest {
1583
+ static fromProto(proto) {
1584
+ let m = new CreateAssistantRequest();
1585
+ m = Object.assign(m, proto);
1586
+ if (proto.assistant) {
1587
+ m.assistant = Assistant.fromProto(proto.assistant);
1588
+ }
1589
+ if (proto.options) {
1590
+ m.options = CreateAssistantRequestOptions.fromProto(proto.options);
1591
+ }
1592
+ return m;
1593
+ }
1594
+ constructor(kwargs) {
1595
+ if (!kwargs) {
1596
+ return;
1597
+ }
1598
+ Object.assign(this, kwargs);
1599
+ }
1600
+ toApiJson() {
1601
+ const toReturn = {};
1602
+ if (typeof this.assistant !== 'undefined' && this.assistant !== null) {
1603
+ toReturn['assistant'] = 'toApiJson' in this.assistant ? this.assistant.toApiJson() : this.assistant;
1604
+ }
1605
+ if (typeof this.options !== 'undefined' && this.options !== null) {
1606
+ toReturn['options'] = 'toApiJson' in this.options ? this.options.toApiJson() : this.options;
1607
+ }
1608
+ return toReturn;
1609
+ }
1610
+ }
1611
+ class CreateAssistantResponse {
1612
+ static fromProto(proto) {
1613
+ let m = new CreateAssistantResponse();
1614
+ m = Object.assign(m, proto);
1615
+ if (proto.assistant) {
1616
+ m.assistant = Assistant.fromProto(proto.assistant);
1617
+ }
1618
+ return m;
1619
+ }
1620
+ constructor(kwargs) {
1621
+ if (!kwargs) {
1622
+ return;
1623
+ }
1624
+ Object.assign(this, kwargs);
1625
+ }
1626
+ toApiJson() {
1627
+ const toReturn = {};
1628
+ if (typeof this.assistant !== 'undefined' && this.assistant !== null) {
1629
+ toReturn['assistant'] = 'toApiJson' in this.assistant ? this.assistant.toApiJson() : this.assistant;
1630
+ }
1631
+ return toReturn;
1632
+ }
1633
+ }
1579
1634
  class CreateGoalRequest {
1580
1635
  static fromProto(proto) {
1581
1636
  let m = new CreateGoalRequest();
@@ -2036,12 +2091,15 @@ class ListGoalsRequestFilters {
2036
2091
  return toReturn;
2037
2092
  }
2038
2093
  }
2039
- class ListAllAssistantsAssociatedToConnectionRequestFilters {
2094
+ class ListConnectionsRequestFilters {
2040
2095
  static fromProto(proto) {
2041
- let m = new ListAllAssistantsAssociatedToConnectionRequestFilters();
2096
+ let m = new ListConnectionsRequestFilters();
2042
2097
  m = Object.assign(m, proto);
2043
- if (proto.type) {
2044
- m.type = enumStringToValue(AssistantType, proto.type);
2098
+ if (proto.namespace) {
2099
+ m.namespace = Namespace.fromProto(proto.namespace);
2100
+ }
2101
+ if (proto.assistantType) {
2102
+ m.assistantType = enumStringToValue(AssistantType, proto.assistantType);
2045
2103
  }
2046
2104
  return m;
2047
2105
  }
@@ -2053,8 +2111,11 @@ class ListAllAssistantsAssociatedToConnectionRequestFilters {
2053
2111
  }
2054
2112
  toApiJson() {
2055
2113
  const toReturn = {};
2056
- if (typeof this.type !== 'undefined') {
2057
- toReturn['type'] = this.type;
2114
+ if (typeof this.namespace !== 'undefined' && this.namespace !== null) {
2115
+ toReturn['namespace'] = 'toApiJson' in this.namespace ? this.namespace.toApiJson() : this.namespace;
2116
+ }
2117
+ if (typeof this.assistantType !== 'undefined') {
2118
+ toReturn['assistantType'] = this.assistantType;
2058
2119
  }
2059
2120
  return toReturn;
2060
2121
  }
@@ -2082,13 +2143,10 @@ class ListFunctionRequestFilters {
2082
2143
  return toReturn;
2083
2144
  }
2084
2145
  }
2085
- class ListAssistantRequestFilters {
2146
+ class ListAllAssistantsAssociatedToConnectionRequestFilters {
2086
2147
  static fromProto(proto) {
2087
- let m = new ListAssistantRequestFilters();
2148
+ let m = new ListAllAssistantsAssociatedToConnectionRequestFilters();
2088
2149
  m = Object.assign(m, proto);
2089
- if (proto.namespace) {
2090
- m.namespace = Namespace.fromProto(proto.namespace);
2091
- }
2092
2150
  if (proto.type) {
2093
2151
  m.type = enumStringToValue(AssistantType, proto.type);
2094
2152
  }
@@ -2102,22 +2160,22 @@ class ListAssistantRequestFilters {
2102
2160
  }
2103
2161
  toApiJson() {
2104
2162
  const toReturn = {};
2105
- if (typeof this.namespace !== 'undefined' && this.namespace !== null) {
2106
- toReturn['namespace'] = 'toApiJson' in this.namespace ? this.namespace.toApiJson() : this.namespace;
2107
- }
2108
2163
  if (typeof this.type !== 'undefined') {
2109
2164
  toReturn['type'] = this.type;
2110
2165
  }
2111
2166
  return toReturn;
2112
2167
  }
2113
2168
  }
2114
- class ListPromptModuleRequestFilters {
2169
+ class ListAssistantRequestFilters {
2115
2170
  static fromProto(proto) {
2116
- let m = new ListPromptModuleRequestFilters();
2171
+ let m = new ListAssistantRequestFilters();
2117
2172
  m = Object.assign(m, proto);
2118
2173
  if (proto.namespace) {
2119
2174
  m.namespace = Namespace.fromProto(proto.namespace);
2120
2175
  }
2176
+ if (proto.type) {
2177
+ m.type = enumStringToValue(AssistantType, proto.type);
2178
+ }
2121
2179
  return m;
2122
2180
  }
2123
2181
  constructor(kwargs) {
@@ -2131,19 +2189,19 @@ class ListPromptModuleRequestFilters {
2131
2189
  if (typeof this.namespace !== 'undefined' && this.namespace !== null) {
2132
2190
  toReturn['namespace'] = 'toApiJson' in this.namespace ? this.namespace.toApiJson() : this.namespace;
2133
2191
  }
2192
+ if (typeof this.type !== 'undefined') {
2193
+ toReturn['type'] = this.type;
2194
+ }
2134
2195
  return toReturn;
2135
2196
  }
2136
2197
  }
2137
- class ListConnectionsRequestFilters {
2198
+ class ListPromptModuleRequestFilters {
2138
2199
  static fromProto(proto) {
2139
- let m = new ListConnectionsRequestFilters();
2200
+ let m = new ListPromptModuleRequestFilters();
2140
2201
  m = Object.assign(m, proto);
2141
2202
  if (proto.namespace) {
2142
2203
  m.namespace = Namespace.fromProto(proto.namespace);
2143
2204
  }
2144
- if (proto.assistantType) {
2145
- m.assistantType = enumStringToValue(AssistantType, proto.assistantType);
2146
- }
2147
2205
  return m;
2148
2206
  }
2149
2207
  constructor(kwargs) {
@@ -2157,9 +2215,6 @@ class ListConnectionsRequestFilters {
2157
2215
  if (typeof this.namespace !== 'undefined' && this.namespace !== null) {
2158
2216
  toReturn['namespace'] = 'toApiJson' in this.namespace ? this.namespace.toApiJson() : this.namespace;
2159
2217
  }
2160
- if (typeof this.assistantType !== 'undefined') {
2161
- toReturn['assistantType'] = this.assistantType;
2162
- }
2163
2218
  return toReturn;
2164
2219
  }
2165
2220
  }
@@ -2185,6 +2240,9 @@ class GenerateChatAnswerRequest {
2185
2240
  if (proto.assistantKey) {
2186
2241
  m.assistantKey = AssistantKey.fromProto(proto.assistantKey);
2187
2242
  }
2243
+ if (proto.contextInfo) {
2244
+ m.contextInfo = ContextInfo.fromProto(proto.contextInfo);
2245
+ }
2188
2246
  return m;
2189
2247
  }
2190
2248
  constructor(kwargs) {
@@ -2213,6 +2271,9 @@ class GenerateChatAnswerRequest {
2213
2271
  if (typeof this.assistantKey !== 'undefined' && this.assistantKey !== null) {
2214
2272
  toReturn['assistantKey'] = 'toApiJson' in this.assistantKey ? this.assistantKey.toApiJson() : this.assistantKey;
2215
2273
  }
2274
+ if (typeof this.contextInfo !== 'undefined' && this.contextInfo !== null) {
2275
+ toReturn['contextInfo'] = 'toApiJson' in this.contextInfo ? this.contextInfo.toApiJson() : this.contextInfo;
2276
+ }
2216
2277
  return toReturn;
2217
2278
  }
2218
2279
  }
@@ -3076,6 +3137,9 @@ class ListAllAssistantsAssociatedToConnectionRequest {
3076
3137
  if (proto.filters) {
3077
3138
  m.filters = ListAllAssistantsAssociatedToConnectionRequestFilters.fromProto(proto.filters);
3078
3139
  }
3140
+ if (proto.fieldMask) {
3141
+ m.fieldMask = FieldMask.fromProto(proto.fieldMask);
3142
+ }
3079
3143
  return m;
3080
3144
  }
3081
3145
  constructor(kwargs) {
@@ -3092,6 +3156,9 @@ class ListAllAssistantsAssociatedToConnectionRequest {
3092
3156
  if (typeof this.filters !== 'undefined' && this.filters !== null) {
3093
3157
  toReturn['filters'] = 'toApiJson' in this.filters ? this.filters.toApiJson() : this.filters;
3094
3158
  }
3159
+ if (typeof this.fieldMask !== 'undefined' && this.fieldMask !== null) {
3160
+ toReturn['fieldMask'] = 'toApiJson' in this.fieldMask ? this.fieldMask.toApiJson() : this.fieldMask;
3161
+ }
3095
3162
  return toReturn;
3096
3163
  }
3097
3164
  }
@@ -3620,9 +3687,9 @@ class GenerateChatAnswerRequestOptions {
3620
3687
  return toReturn;
3621
3688
  }
3622
3689
  }
3623
- class UpsertAssistantRequestOptions {
3690
+ class CreateAssistantRequestOptions {
3624
3691
  static fromProto(proto) {
3625
- let m = new UpsertAssistantRequestOptions();
3692
+ let m = new CreateAssistantRequestOptions();
3626
3693
  m = Object.assign(m, proto);
3627
3694
  return m;
3628
3695
  }
@@ -3660,6 +3727,26 @@ class CreatePromptModuleVersionRequestOptions {
3660
3727
  return toReturn;
3661
3728
  }
3662
3729
  }
3730
+ class UpsertAssistantRequestOptions {
3731
+ static fromProto(proto) {
3732
+ let m = new UpsertAssistantRequestOptions();
3733
+ m = Object.assign(m, proto);
3734
+ return m;
3735
+ }
3736
+ constructor(kwargs) {
3737
+ if (!kwargs) {
3738
+ return;
3739
+ }
3740
+ Object.assign(this, kwargs);
3741
+ }
3742
+ toApiJson() {
3743
+ const toReturn = {};
3744
+ if (typeof this.applyDefaults !== 'undefined') {
3745
+ toReturn['applyDefaults'] = this.applyDefaults;
3746
+ }
3747
+ return toReturn;
3748
+ }
3749
+ }
3663
3750
  class SetAssistantConnectionsRequest {
3664
3751
  static fromProto(proto) {
3665
3752
  let m = new SetAssistantConnectionsRequest();
@@ -3689,6 +3776,35 @@ class SetAssistantConnectionsRequest {
3689
3776
  return toReturn;
3690
3777
  }
3691
3778
  }
3779
+ class UpdateAssistantRequest {
3780
+ static fromProto(proto) {
3781
+ let m = new UpdateAssistantRequest();
3782
+ m = Object.assign(m, proto);
3783
+ if (proto.assistant) {
3784
+ m.assistant = Assistant.fromProto(proto.assistant);
3785
+ }
3786
+ if (proto.fieldMask) {
3787
+ m.fieldMask = FieldMask.fromProto(proto.fieldMask);
3788
+ }
3789
+ return m;
3790
+ }
3791
+ constructor(kwargs) {
3792
+ if (!kwargs) {
3793
+ return;
3794
+ }
3795
+ Object.assign(this, kwargs);
3796
+ }
3797
+ toApiJson() {
3798
+ const toReturn = {};
3799
+ if (typeof this.assistant !== 'undefined' && this.assistant !== null) {
3800
+ toReturn['assistant'] = 'toApiJson' in this.assistant ? this.assistant.toApiJson() : this.assistant;
3801
+ }
3802
+ if (typeof this.fieldMask !== 'undefined' && this.fieldMask !== null) {
3803
+ toReturn['fieldMask'] = 'toApiJson' in this.fieldMask ? this.fieldMask.toApiJson() : this.fieldMask;
3804
+ }
3805
+ return toReturn;
3806
+ }
3807
+ }
3692
3808
  class UpdateGoalRequest {
3693
3809
  static fromProto(proto) {
3694
3810
  let m = new UpdateGoalRequest();
@@ -3924,6 +4040,15 @@ class AssistantApiService {
3924
4040
  return this.http.post(this._host + "/ai_assistants.v1alpha1.AssistantService/UpsertAssistant", request.toApiJson(), this.apiOptions())
3925
4041
  .pipe(map(resp => UpsertAssistantResponse.fromProto(resp)));
3926
4042
  }
4043
+ createAssistant(r) {
4044
+ const request = (r.toApiJson) ? r : new CreateAssistantRequest(r);
4045
+ return this.http.post(this._host + "/ai_assistants.v1alpha1.AssistantService/CreateAssistant", request.toApiJson(), this.apiOptions())
4046
+ .pipe(map(resp => CreateAssistantResponse.fromProto(resp)));
4047
+ }
4048
+ updateAssistant(r) {
4049
+ const request = (r.toApiJson) ? r : new UpdateAssistantRequest(r);
4050
+ return this.http.post(this._host + "/ai_assistants.v1alpha1.AssistantService/UpdateAssistant", request.toApiJson(), Object.assign(Object.assign({}, this.apiOptions()), { observe: 'response' }));
4051
+ }
3927
4052
  getAssistant(r) {
3928
4053
  const request = (r.toApiJson) ? r : new GetAssistantRequest(r);
3929
4054
  return this.http.post(this._host + "/ai_assistants.v1alpha1.AssistantService/GetAssistant", request.toApiJson(), this.apiOptions())
@@ -4306,5 +4431,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
4306
4431
  * Generated bundle index. Do not edit.
4307
4432
  */
4308
4433
 
4309
- export { Access, Assistant, AssistantApiService, AssistantKey, AssistantType, BuildDefaultAssistantRequest, BuildDefaultAssistantResponse, ChatAnswerFunctionExecutionJob, ChatAnswerFunctionExecutionJobResult, ChatAnswerFunctionExecutionJobStatus, ChatChannel, ChatMessage, ChatMessageRole, ChatUserInfo, Config, ConfigInboxConfig, ConfigVoiceConfig, ConfigurableGoal, Connection, ConnectionApiService, ConnectionKey, CreateGoalRequest, CreateGoalResponse, CreatePromptModuleRequest, CreatePromptModuleResponse, CreatePromptModuleVersionRequest, CreatePromptModuleVersionRequestOptions, CreatePromptRequest, DeepgramConfig, DeleteAssistantRequest, DeleteConnectionRequest, DeleteFunctionRequest, DeleteGoalRequest, DeletePromptModuleRequest, DeletePromptRequest, DeployPromptModuleRequest, DeployPromptRequest, ExecuteFunctionRequest, ExecuteFunctionResponse, Function, FunctionApiService, FunctionAuthStrategy, FunctionAuthStrategyPlatformManagedFunctionAuthStrategy, FunctionAuthStrategyUnspecifiedFunctionAuthStrategy, FunctionHeader, FunctionKey, FunctionParameter, FunctionParameterParameterLocation, GenerateChatAnswerRequest, GenerateChatAnswerRequestOptions, GenerateChatAnswerResponse, GetAssistantRequest, 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, Goal, GoalApiService, GoalChannel, GoalKey, GoalType, GoalsDisabledForAccountGroupRequest, GoalsDisabledForAccountGroupResponse, HostService, KeyValuePair, ListAllAssistantsAssociatedToConnectionRequest, ListAllAssistantsAssociatedToConnectionRequestFilters, ListAllAssistantsAssociatedToConnectionResponse, ListAssistantRequest, ListAssistantRequestFilters, ListAssistantResponse, ListConnectionsRequest, ListConnectionsRequestFilters, ListConnectionsResponse, ListFunctionRequest, ListFunctionRequestFilters, ListFunctionResponse, ListGoalsRequest, ListGoalsRequestFilters, ListGoalsResponse, ListPromptModuleRequest, ListPromptModuleRequestFilters, ListPromptModuleResponse, ListPromptModuleVersionsRequest, ListPromptModuleVersionsResponse, ListPromptRequest, ListPromptResponse, ListPromptVersionsRequest, ListPromptVersionsResponse, ModelConfig, Namespace, NamespaceAccountGroupNamespace, NamespaceAccountGroupsForGroupNamespace, NamespaceAccountGroupsForPartnerNamespace, NamespaceGlobalNamespace, NamespacePartnerNamespace, NamespaceSystemNamespace, OpenAIRealtimeConfig, OpenAIRealtimeConfigTurnDetection, PagedRequestOptions, PagedResponseMetadata, Prompt, PromptApiService, PromptModule, PromptModuleApiService, PromptModuleKey, PromptModuleVersion, PromptVersion, SetAssistantConnectionsRequest, SetAssistantConnectionsRequestConnectionState, UpdateGoalRequest, UpdatePromptModuleRequest, UpdatePromptRequest, UpsertAssistantRequest, UpsertAssistantRequestOptions, UpsertAssistantResponse, UpsertConnectionRequest, UpsertFunctionRequest, UpsertGoalRequest, VendorModel };
4434
+ export { Access, Assistant, AssistantApiService, AssistantKey, AssistantType, BuildDefaultAssistantRequest, BuildDefaultAssistantResponse, 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, DeployPromptModuleRequest, DeployPromptRequest, ExecuteFunctionRequest, ExecuteFunctionResponse, FieldMask, Function, FunctionApiService, FunctionAuthStrategy, FunctionAuthStrategyPlatformManagedFunctionAuthStrategy, FunctionAuthStrategyUnspecifiedFunctionAuthStrategy, FunctionHeader, FunctionKey, FunctionParameter, FunctionParameterParameterLocation, GenerateChatAnswerRequest, GenerateChatAnswerRequestOptions, GenerateChatAnswerResponse, GetAssistantRequest, 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, Goal, GoalApiService, GoalChannel, GoalKey, GoalType, GoalsDisabledForAccountGroupRequest, GoalsDisabledForAccountGroupResponse, HostService, KeyValuePair, ListAllAssistantsAssociatedToConnectionRequest, ListAllAssistantsAssociatedToConnectionRequestFilters, ListAllAssistantsAssociatedToConnectionResponse, ListAssistantRequest, ListAssistantRequestFilters, ListAssistantResponse, ListConnectionsRequest, ListConnectionsRequestFilters, ListConnectionsResponse, ListFunctionRequest, ListFunctionRequestFilters, ListFunctionResponse, ListGoalsRequest, ListGoalsRequestFilters, ListGoalsResponse, ListPromptModuleRequest, ListPromptModuleRequestFilters, ListPromptModuleResponse, ListPromptModuleVersionsRequest, ListPromptModuleVersionsResponse, ListPromptRequest, ListPromptResponse, ListPromptVersionsRequest, ListPromptVersionsResponse, ModelConfig, Namespace, NamespaceAccountGroupNamespace, NamespaceGlobalNamespace, NamespacePartnerNamespace, NamespaceSystemNamespace, OpenAIRealtimeConfig, OpenAIRealtimeConfigTurnDetection, PagedRequestOptions, PagedResponseMetadata, Prompt, PromptApiService, PromptModule, PromptModuleApiService, PromptModuleKey, PromptModuleVersion, PromptVersion, SetAssistantConnectionsRequest, SetAssistantConnectionsRequestConnectionState, UpdateAssistantRequest, UpdateGoalRequest, UpdatePromptModuleRequest, UpdatePromptRequest, UpsertAssistantRequest, UpsertAssistantRequestOptions, UpsertAssistantResponse, UpsertConnectionRequest, UpsertFunctionRequest, UpsertGoalRequest, VendorModel };
4310
4435
  //# sourceMappingURL=vendasta-ai-assistants.mjs.map