@vendasta/ai-assistants 0.7.0 → 0.9.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 (31) hide show
  1. package/esm2020/lib/_internal/enums/goal.enum.mjs +5 -4
  2. package/esm2020/lib/_internal/function.api.service.mjs +58 -0
  3. package/esm2020/lib/_internal/index.mjs +2 -1
  4. package/esm2020/lib/_internal/interfaces/api.interface.mjs +1 -1
  5. package/esm2020/lib/_internal/interfaces/connection.interface.mjs +1 -1
  6. package/esm2020/lib/_internal/interfaces/function.interface.mjs +1 -1
  7. package/esm2020/lib/_internal/interfaces/index.mjs +1 -1
  8. package/esm2020/lib/_internal/interfaces/namespace.interface.mjs +1 -1
  9. package/esm2020/lib/_internal/objects/api.mjs +249 -17
  10. package/esm2020/lib/_internal/objects/connection.mjs +8 -1
  11. package/esm2020/lib/_internal/objects/function.mjs +92 -1
  12. package/esm2020/lib/_internal/objects/index.mjs +4 -4
  13. package/esm2020/lib/_internal/objects/namespace.mjs +79 -1
  14. package/fesm2015/vendasta-ai-assistants.mjs +478 -20
  15. package/fesm2015/vendasta-ai-assistants.mjs.map +1 -1
  16. package/fesm2020/vendasta-ai-assistants.mjs +478 -20
  17. package/fesm2020/vendasta-ai-assistants.mjs.map +1 -1
  18. package/lib/_internal/enums/goal.enum.d.ts +4 -3
  19. package/lib/_internal/function.api.service.d.ts +18 -0
  20. package/lib/_internal/index.d.ts +1 -0
  21. package/lib/_internal/interfaces/api.interface.d.ts +39 -6
  22. package/lib/_internal/interfaces/connection.interface.d.ts +2 -0
  23. package/lib/_internal/interfaces/function.interface.d.ts +18 -0
  24. package/lib/_internal/interfaces/index.d.ts +3 -3
  25. package/lib/_internal/interfaces/namespace.interface.d.ts +12 -0
  26. package/lib/_internal/objects/api.d.ts +72 -12
  27. package/lib/_internal/objects/connection.d.ts +2 -0
  28. package/lib/_internal/objects/function.d.ts +24 -0
  29. package/lib/_internal/objects/index.d.ts +3 -3
  30. package/lib/_internal/objects/namespace.d.ts +21 -0
  31. package/package.json +1 -1
@@ -36,9 +36,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
36
36
  var GoalType;
37
37
  (function (GoalType) {
38
38
  GoalType[GoalType["GOAL_TYPE_INVALID"] = 0] = "GOAL_TYPE_INVALID";
39
- GoalType[GoalType["GOAL_TYPE_KNOWLEDGE"] = 1] = "GOAL_TYPE_KNOWLEDGE";
40
- GoalType[GoalType["GOAL_TYPE_PERSONALITY"] = 2] = "GOAL_TYPE_PERSONALITY";
41
- GoalType[GoalType["GOAL_TYPE_CUSTOM"] = 3] = "GOAL_TYPE_CUSTOM";
39
+ GoalType[GoalType["GOAL_TYPE_OBJECTIVE"] = 1] = "GOAL_TYPE_OBJECTIVE";
40
+ GoalType[GoalType["GOAL_TYPE_KNOWLEDGE"] = 2] = "GOAL_TYPE_KNOWLEDGE";
41
+ GoalType[GoalType["GOAL_TYPE_PERSONALITY"] = 3] = "GOAL_TYPE_PERSONALITY";
42
+ GoalType[GoalType["GOAL_TYPE_CUSTOM"] = 4] = "GOAL_TYPE_CUSTOM";
42
43
  })(GoalType || (GoalType = {}));
43
44
 
44
45
  // *********************************
@@ -116,6 +117,66 @@ class NamespaceAccountGroupNamespace {
116
117
  return toReturn;
117
118
  }
118
119
  }
120
+ class NamespaceAccountGroupsForGroupNamespace {
121
+ static fromProto(proto) {
122
+ let m = new NamespaceAccountGroupsForGroupNamespace();
123
+ m = Object.assign(m, proto);
124
+ return m;
125
+ }
126
+ constructor(kwargs) {
127
+ if (!kwargs) {
128
+ return;
129
+ }
130
+ Object.assign(this, kwargs);
131
+ }
132
+ toApiJson() {
133
+ const toReturn = {};
134
+ if (typeof this.groupId !== 'undefined') {
135
+ toReturn['groupId'] = this.groupId;
136
+ }
137
+ return toReturn;
138
+ }
139
+ }
140
+ class NamespaceAccountGroupsForPartnerNamespace {
141
+ static fromProto(proto) {
142
+ let m = new NamespaceAccountGroupsForPartnerNamespace();
143
+ m = Object.assign(m, proto);
144
+ return m;
145
+ }
146
+ constructor(kwargs) {
147
+ if (!kwargs) {
148
+ return;
149
+ }
150
+ Object.assign(this, kwargs);
151
+ }
152
+ toApiJson() {
153
+ const toReturn = {};
154
+ if (typeof this.partnerId !== 'undefined') {
155
+ toReturn['partnerId'] = this.partnerId;
156
+ }
157
+ return toReturn;
158
+ }
159
+ }
160
+ class NamespaceGlobalNamespace {
161
+ static fromProto(proto) {
162
+ let m = new NamespaceGlobalNamespace();
163
+ m = Object.assign(m, proto);
164
+ return m;
165
+ }
166
+ constructor(kwargs) {
167
+ if (!kwargs) {
168
+ return;
169
+ }
170
+ Object.assign(this, kwargs);
171
+ }
172
+ toApiJson() {
173
+ const toReturn = {};
174
+ if (typeof this.contextId !== 'undefined') {
175
+ toReturn['contextId'] = this.contextId;
176
+ }
177
+ return toReturn;
178
+ }
179
+ }
119
180
  class Namespace {
120
181
  static fromProto(proto) {
121
182
  let m = new Namespace();
@@ -129,6 +190,15 @@ class Namespace {
129
190
  if (proto.systemNamespace) {
130
191
  m.systemNamespace = NamespaceSystemNamespace.fromProto(proto.systemNamespace);
131
192
  }
193
+ if (proto.accountGroupsForPartnerNamespace) {
194
+ m.accountGroupsForPartnerNamespace = NamespaceAccountGroupsForPartnerNamespace.fromProto(proto.accountGroupsForPartnerNamespace);
195
+ }
196
+ if (proto.accountGroupsForGroupNamespace) {
197
+ m.accountGroupsForGroupNamespace = NamespaceAccountGroupsForGroupNamespace.fromProto(proto.accountGroupsForGroupNamespace);
198
+ }
199
+ if (proto.globalNamespace) {
200
+ m.globalNamespace = NamespaceGlobalNamespace.fromProto(proto.globalNamespace);
201
+ }
132
202
  return m;
133
203
  }
134
204
  constructor(kwargs) {
@@ -148,6 +218,15 @@ class Namespace {
148
218
  if (typeof this.systemNamespace !== 'undefined' && this.systemNamespace !== null) {
149
219
  toReturn['systemNamespace'] = 'toApiJson' in this.systemNamespace ? this.systemNamespace.toApiJson() : this.systemNamespace;
150
220
  }
221
+ if (typeof this.accountGroupsForPartnerNamespace !== 'undefined' && this.accountGroupsForPartnerNamespace !== null) {
222
+ toReturn['accountGroupsForPartnerNamespace'] = 'toApiJson' in this.accountGroupsForPartnerNamespace ? this.accountGroupsForPartnerNamespace.toApiJson() : this.accountGroupsForPartnerNamespace;
223
+ }
224
+ if (typeof this.accountGroupsForGroupNamespace !== 'undefined' && this.accountGroupsForGroupNamespace !== null) {
225
+ toReturn['accountGroupsForGroupNamespace'] = 'toApiJson' in this.accountGroupsForGroupNamespace ? this.accountGroupsForGroupNamespace.toApiJson() : this.accountGroupsForGroupNamespace;
226
+ }
227
+ if (typeof this.globalNamespace !== 'undefined' && this.globalNamespace !== null) {
228
+ toReturn['globalNamespace'] = 'toApiJson' in this.globalNamespace ? this.globalNamespace.toApiJson() : this.globalNamespace;
229
+ }
151
230
  return toReturn;
152
231
  }
153
232
  }
@@ -198,6 +277,56 @@ function enumStringToValue$9(enumRef, value) {
198
277
  }
199
278
  return enumRef[value];
200
279
  }
280
+ class Function {
281
+ static fromProto(proto) {
282
+ let m = new Function();
283
+ m = Object.assign(m, proto);
284
+ if (proto.namespace) {
285
+ m.namespace = Namespace.fromProto(proto.namespace);
286
+ }
287
+ if (proto.functionParameters) {
288
+ m.functionParameters = proto.functionParameters.map(FunctionParameter.fromProto);
289
+ }
290
+ if (proto.updated) {
291
+ m.updated = new Date(proto.updated);
292
+ }
293
+ return m;
294
+ }
295
+ constructor(kwargs) {
296
+ if (!kwargs) {
297
+ return;
298
+ }
299
+ Object.assign(this, kwargs);
300
+ }
301
+ toApiJson() {
302
+ const toReturn = {};
303
+ if (typeof this.id !== 'undefined') {
304
+ toReturn['id'] = this.id;
305
+ }
306
+ if (typeof this.namespace !== 'undefined' && this.namespace !== null) {
307
+ toReturn['namespace'] = 'toApiJson' in this.namespace ? this.namespace.toApiJson() : this.namespace;
308
+ }
309
+ if (typeof this.description !== 'undefined') {
310
+ toReturn['description'] = this.description;
311
+ }
312
+ if (typeof this.url !== 'undefined') {
313
+ toReturn['url'] = this.url;
314
+ }
315
+ if (typeof this.methodType !== 'undefined') {
316
+ toReturn['methodType'] = this.methodType;
317
+ }
318
+ if (typeof this.functionParameters !== 'undefined' && this.functionParameters !== null) {
319
+ toReturn['functionParameters'] = 'toApiJson' in this.functionParameters ? this.functionParameters.toApiJson() : this.functionParameters;
320
+ }
321
+ if (typeof this.generatesAnswer !== 'undefined') {
322
+ toReturn['generatesAnswer'] = this.generatesAnswer;
323
+ }
324
+ if (typeof this.updated !== 'undefined' && this.updated !== null) {
325
+ toReturn['updated'] = 'toApiJson' in this.updated ? this.updated.toApiJson() : this.updated;
326
+ }
327
+ return toReturn;
328
+ }
329
+ }
201
330
  class FunctionKey {
202
331
  static fromProto(proto) {
203
332
  let m = new FunctionKey();
@@ -224,6 +353,47 @@ class FunctionKey {
224
353
  return toReturn;
225
354
  }
226
355
  }
356
+ class FunctionParameter {
357
+ static fromProto(proto) {
358
+ let m = new FunctionParameter();
359
+ m = Object.assign(m, proto);
360
+ if (proto.properties) {
361
+ m.properties = proto.properties.map(FunctionParameter.fromProto);
362
+ }
363
+ if (proto.items) {
364
+ m.items = FunctionParameter.fromProto(proto.items);
365
+ }
366
+ return m;
367
+ }
368
+ constructor(kwargs) {
369
+ if (!kwargs) {
370
+ return;
371
+ }
372
+ Object.assign(this, kwargs);
373
+ }
374
+ toApiJson() {
375
+ const toReturn = {};
376
+ if (typeof this.name !== 'undefined') {
377
+ toReturn['name'] = this.name;
378
+ }
379
+ if (typeof this.description !== 'undefined') {
380
+ toReturn['description'] = this.description;
381
+ }
382
+ if (typeof this.type !== 'undefined') {
383
+ toReturn['type'] = this.type;
384
+ }
385
+ if (typeof this.properties !== 'undefined' && this.properties !== null) {
386
+ toReturn['properties'] = 'toApiJson' in this.properties ? this.properties.toApiJson() : this.properties;
387
+ }
388
+ if (typeof this.items !== 'undefined' && this.items !== null) {
389
+ toReturn['items'] = 'toApiJson' in this.items ? this.items.toApiJson() : this.items;
390
+ }
391
+ if (typeof this.value !== 'undefined') {
392
+ toReturn['value'] = this.value;
393
+ }
394
+ return toReturn;
395
+ }
396
+ }
227
397
 
228
398
  function enumStringToValue$8(enumRef, value) {
229
399
  if (typeof value === 'number') {
@@ -676,6 +846,9 @@ class Connection {
676
846
  if (proto.assistantKeys) {
677
847
  m.assistantKeys = proto.assistantKeys.map(AssistantKey.fromProto);
678
848
  }
849
+ if (proto.supportedAssistantTypes) {
850
+ m.supportedAssistantTypes = proto.supportedAssistantTypes.map((v) => enumStringToValue$5(AssistantType, v));
851
+ }
679
852
  return m;
680
853
  }
681
854
  constructor(kwargs) {
@@ -713,6 +886,9 @@ class Connection {
713
886
  if (typeof this.isConnectionLocked !== 'undefined') {
714
887
  toReturn['isConnectionLocked'] = this.isConnectionLocked;
715
888
  }
889
+ if (typeof this.supportedAssistantTypes !== 'undefined') {
890
+ toReturn['supportedAssistantTypes'] = this.supportedAssistantTypes;
891
+ }
716
892
  return toReturn;
717
893
  }
718
894
  }
@@ -1148,6 +1324,32 @@ class DeleteConnectionRequest {
1148
1324
  return toReturn;
1149
1325
  }
1150
1326
  }
1327
+ class DeleteFunctionRequest {
1328
+ static fromProto(proto) {
1329
+ let m = new DeleteFunctionRequest();
1330
+ m = Object.assign(m, proto);
1331
+ if (proto.namespace) {
1332
+ m.namespace = Namespace.fromProto(proto.namespace);
1333
+ }
1334
+ return m;
1335
+ }
1336
+ constructor(kwargs) {
1337
+ if (!kwargs) {
1338
+ return;
1339
+ }
1340
+ Object.assign(this, kwargs);
1341
+ }
1342
+ toApiJson() {
1343
+ const toReturn = {};
1344
+ if (typeof this.id !== 'undefined') {
1345
+ toReturn['id'] = this.id;
1346
+ }
1347
+ if (typeof this.namespace !== 'undefined' && this.namespace !== null) {
1348
+ toReturn['namespace'] = 'toApiJson' in this.namespace ? this.namespace.toApiJson() : this.namespace;
1349
+ }
1350
+ return toReturn;
1351
+ }
1352
+ }
1151
1353
  class DeleteGoalRequest {
1152
1354
  static fromProto(proto) {
1153
1355
  let m = new DeleteGoalRequest();
@@ -1272,9 +1474,32 @@ class DeployPromptRequest {
1272
1474
  return toReturn;
1273
1475
  }
1274
1476
  }
1275
- class ListPromptModuleRequestFilters {
1477
+ class ListAllAssistantsAssociatedToConnectionRequestFilters {
1276
1478
  static fromProto(proto) {
1277
- let m = new ListPromptModuleRequestFilters();
1479
+ let m = new ListAllAssistantsAssociatedToConnectionRequestFilters();
1480
+ m = Object.assign(m, proto);
1481
+ if (proto.type) {
1482
+ m.type = enumStringToValue(AssistantType, proto.type);
1483
+ }
1484
+ return m;
1485
+ }
1486
+ constructor(kwargs) {
1487
+ if (!kwargs) {
1488
+ return;
1489
+ }
1490
+ Object.assign(this, kwargs);
1491
+ }
1492
+ toApiJson() {
1493
+ const toReturn = {};
1494
+ if (typeof this.type !== 'undefined') {
1495
+ toReturn['type'] = this.type;
1496
+ }
1497
+ return toReturn;
1498
+ }
1499
+ }
1500
+ class ListFunctionRequestFilters {
1501
+ static fromProto(proto) {
1502
+ let m = new ListFunctionRequestFilters();
1278
1503
  m = Object.assign(m, proto);
1279
1504
  if (proto.namespace) {
1280
1505
  m.namespace = Namespace.fromProto(proto.namespace);
@@ -1295,13 +1520,16 @@ class ListPromptModuleRequestFilters {
1295
1520
  return toReturn;
1296
1521
  }
1297
1522
  }
1298
- class ListGoalsRequestFilters {
1523
+ class ListConnectionsRequestFilters {
1299
1524
  static fromProto(proto) {
1300
- let m = new ListGoalsRequestFilters();
1525
+ let m = new ListConnectionsRequestFilters();
1301
1526
  m = Object.assign(m, proto);
1302
1527
  if (proto.namespace) {
1303
1528
  m.namespace = Namespace.fromProto(proto.namespace);
1304
1529
  }
1530
+ if (proto.assistantType) {
1531
+ m.assistantType = enumStringToValue(AssistantType, proto.assistantType);
1532
+ }
1305
1533
  return m;
1306
1534
  }
1307
1535
  constructor(kwargs) {
@@ -1315,13 +1543,19 @@ class ListGoalsRequestFilters {
1315
1543
  if (typeof this.namespace !== 'undefined' && this.namespace !== null) {
1316
1544
  toReturn['namespace'] = 'toApiJson' in this.namespace ? this.namespace.toApiJson() : this.namespace;
1317
1545
  }
1546
+ if (typeof this.assistantType !== 'undefined') {
1547
+ toReturn['assistantType'] = this.assistantType;
1548
+ }
1318
1549
  return toReturn;
1319
1550
  }
1320
1551
  }
1321
- class ListAllAssistantsAssociatedToConnectionRequestFilters {
1552
+ class ListAssistantRequestFilters {
1322
1553
  static fromProto(proto) {
1323
- let m = new ListAllAssistantsAssociatedToConnectionRequestFilters();
1554
+ let m = new ListAssistantRequestFilters();
1324
1555
  m = Object.assign(m, proto);
1556
+ if (proto.namespace) {
1557
+ m.namespace = Namespace.fromProto(proto.namespace);
1558
+ }
1325
1559
  if (proto.type) {
1326
1560
  m.type = enumStringToValue(AssistantType, proto.type);
1327
1561
  }
@@ -1335,15 +1569,18 @@ class ListAllAssistantsAssociatedToConnectionRequestFilters {
1335
1569
  }
1336
1570
  toApiJson() {
1337
1571
  const toReturn = {};
1572
+ if (typeof this.namespace !== 'undefined' && this.namespace !== null) {
1573
+ toReturn['namespace'] = 'toApiJson' in this.namespace ? this.namespace.toApiJson() : this.namespace;
1574
+ }
1338
1575
  if (typeof this.type !== 'undefined') {
1339
1576
  toReturn['type'] = this.type;
1340
1577
  }
1341
1578
  return toReturn;
1342
1579
  }
1343
1580
  }
1344
- class ListConnectionsRequestFilters {
1581
+ class ListGoalsRequestFilters {
1345
1582
  static fromProto(proto) {
1346
- let m = new ListConnectionsRequestFilters();
1583
+ let m = new ListGoalsRequestFilters();
1347
1584
  m = Object.assign(m, proto);
1348
1585
  if (proto.namespace) {
1349
1586
  m.namespace = Namespace.fromProto(proto.namespace);
@@ -1364,16 +1601,13 @@ class ListConnectionsRequestFilters {
1364
1601
  return toReturn;
1365
1602
  }
1366
1603
  }
1367
- class ListAssistantRequestFilters {
1604
+ class ListPromptModuleRequestFilters {
1368
1605
  static fromProto(proto) {
1369
- let m = new ListAssistantRequestFilters();
1606
+ let m = new ListPromptModuleRequestFilters();
1370
1607
  m = Object.assign(m, proto);
1371
1608
  if (proto.namespace) {
1372
1609
  m.namespace = Namespace.fromProto(proto.namespace);
1373
1610
  }
1374
- if (proto.type) {
1375
- m.type = enumStringToValue(AssistantType, proto.type);
1376
- }
1377
1611
  return m;
1378
1612
  }
1379
1613
  constructor(kwargs) {
@@ -1387,9 +1621,6 @@ class ListAssistantRequestFilters {
1387
1621
  if (typeof this.namespace !== 'undefined' && this.namespace !== null) {
1388
1622
  toReturn['namespace'] = 'toApiJson' in this.namespace ? this.namespace.toApiJson() : this.namespace;
1389
1623
  }
1390
- if (typeof this.type !== 'undefined') {
1391
- toReturn['type'] = this.type;
1392
- }
1393
1624
  return toReturn;
1394
1625
  }
1395
1626
  }
@@ -1665,6 +1896,55 @@ class GetDeployedPromptVersionResponse {
1665
1896
  return toReturn;
1666
1897
  }
1667
1898
  }
1899
+ class GetFunctionRequest {
1900
+ static fromProto(proto) {
1901
+ let m = new GetFunctionRequest();
1902
+ m = Object.assign(m, proto);
1903
+ if (proto.namespace) {
1904
+ m.namespace = Namespace.fromProto(proto.namespace);
1905
+ }
1906
+ return m;
1907
+ }
1908
+ constructor(kwargs) {
1909
+ if (!kwargs) {
1910
+ return;
1911
+ }
1912
+ Object.assign(this, kwargs);
1913
+ }
1914
+ toApiJson() {
1915
+ const toReturn = {};
1916
+ if (typeof this.id !== 'undefined') {
1917
+ toReturn['id'] = this.id;
1918
+ }
1919
+ if (typeof this.namespace !== 'undefined' && this.namespace !== null) {
1920
+ toReturn['namespace'] = 'toApiJson' in this.namespace ? this.namespace.toApiJson() : this.namespace;
1921
+ }
1922
+ return toReturn;
1923
+ }
1924
+ }
1925
+ class GetFunctionResponse {
1926
+ static fromProto(proto) {
1927
+ let m = new GetFunctionResponse();
1928
+ m = Object.assign(m, proto);
1929
+ if (proto.function) {
1930
+ m.function = Function.fromProto(proto.function);
1931
+ }
1932
+ return m;
1933
+ }
1934
+ constructor(kwargs) {
1935
+ if (!kwargs) {
1936
+ return;
1937
+ }
1938
+ Object.assign(this, kwargs);
1939
+ }
1940
+ toApiJson() {
1941
+ const toReturn = {};
1942
+ if (typeof this.function !== 'undefined' && this.function !== null) {
1943
+ toReturn['function'] = 'toApiJson' in this.function ? this.function.toApiJson() : this.function;
1944
+ }
1945
+ return toReturn;
1946
+ }
1947
+ }
1668
1948
  class GetGoalRequest {
1669
1949
  static fromProto(proto) {
1670
1950
  let m = new GetGoalRequest();
@@ -1815,6 +2095,52 @@ class GetMultiDeployedPromptVersionResponse {
1815
2095
  return toReturn;
1816
2096
  }
1817
2097
  }
2098
+ class GetMultiFunctionRequest {
2099
+ static fromProto(proto) {
2100
+ let m = new GetMultiFunctionRequest();
2101
+ m = Object.assign(m, proto);
2102
+ if (proto.keys) {
2103
+ m.keys = proto.keys.map(FunctionKey.fromProto);
2104
+ }
2105
+ return m;
2106
+ }
2107
+ constructor(kwargs) {
2108
+ if (!kwargs) {
2109
+ return;
2110
+ }
2111
+ Object.assign(this, kwargs);
2112
+ }
2113
+ toApiJson() {
2114
+ const toReturn = {};
2115
+ if (typeof this.keys !== 'undefined' && this.keys !== null) {
2116
+ toReturn['keys'] = 'toApiJson' in this.keys ? this.keys.toApiJson() : this.keys;
2117
+ }
2118
+ return toReturn;
2119
+ }
2120
+ }
2121
+ class GetMultiFunctionResponse {
2122
+ static fromProto(proto) {
2123
+ let m = new GetMultiFunctionResponse();
2124
+ m = Object.assign(m, proto);
2125
+ if (proto.functions) {
2126
+ m.functions = proto.functions.map(Function.fromProto);
2127
+ }
2128
+ return m;
2129
+ }
2130
+ constructor(kwargs) {
2131
+ if (!kwargs) {
2132
+ return;
2133
+ }
2134
+ Object.assign(this, kwargs);
2135
+ }
2136
+ toApiJson() {
2137
+ const toReturn = {};
2138
+ if (typeof this.functions !== 'undefined' && this.functions !== null) {
2139
+ toReturn['functions'] = 'toApiJson' in this.functions ? this.functions.toApiJson() : this.functions;
2140
+ }
2141
+ return toReturn;
2142
+ }
2143
+ }
1818
2144
  class GetMultiGoalRequest {
1819
2145
  static fromProto(proto) {
1820
2146
  let m = new GetMultiGoalRequest();
@@ -2271,6 +2597,64 @@ class ListConnectionsResponse {
2271
2597
  return toReturn;
2272
2598
  }
2273
2599
  }
2600
+ class ListFunctionRequest {
2601
+ static fromProto(proto) {
2602
+ let m = new ListFunctionRequest();
2603
+ m = Object.assign(m, proto);
2604
+ if (proto.filters) {
2605
+ m.filters = ListFunctionRequestFilters.fromProto(proto.filters);
2606
+ }
2607
+ if (proto.pagingOptions) {
2608
+ m.pagingOptions = PagedRequestOptions.fromProto(proto.pagingOptions);
2609
+ }
2610
+ return m;
2611
+ }
2612
+ constructor(kwargs) {
2613
+ if (!kwargs) {
2614
+ return;
2615
+ }
2616
+ Object.assign(this, kwargs);
2617
+ }
2618
+ toApiJson() {
2619
+ const toReturn = {};
2620
+ if (typeof this.filters !== 'undefined' && this.filters !== null) {
2621
+ toReturn['filters'] = 'toApiJson' in this.filters ? this.filters.toApiJson() : this.filters;
2622
+ }
2623
+ if (typeof this.pagingOptions !== 'undefined' && this.pagingOptions !== null) {
2624
+ toReturn['pagingOptions'] = 'toApiJson' in this.pagingOptions ? this.pagingOptions.toApiJson() : this.pagingOptions;
2625
+ }
2626
+ return toReturn;
2627
+ }
2628
+ }
2629
+ class ListFunctionResponse {
2630
+ static fromProto(proto) {
2631
+ let m = new ListFunctionResponse();
2632
+ m = Object.assign(m, proto);
2633
+ if (proto.functions) {
2634
+ m.functions = proto.functions.map(Function.fromProto);
2635
+ }
2636
+ if (proto.metadata) {
2637
+ m.metadata = PagedResponseMetadata.fromProto(proto.metadata);
2638
+ }
2639
+ return m;
2640
+ }
2641
+ constructor(kwargs) {
2642
+ if (!kwargs) {
2643
+ return;
2644
+ }
2645
+ Object.assign(this, kwargs);
2646
+ }
2647
+ toApiJson() {
2648
+ const toReturn = {};
2649
+ if (typeof this.functions !== 'undefined' && this.functions !== null) {
2650
+ toReturn['functions'] = 'toApiJson' in this.functions ? this.functions.toApiJson() : this.functions;
2651
+ }
2652
+ if (typeof this.metadata !== 'undefined' && this.metadata !== null) {
2653
+ toReturn['metadata'] = 'toApiJson' in this.metadata ? this.metadata.toApiJson() : this.metadata;
2654
+ }
2655
+ return toReturn;
2656
+ }
2657
+ }
2274
2658
  class ListGoalsRequest {
2275
2659
  static fromProto(proto) {
2276
2660
  let m = new ListGoalsRequest();
@@ -2743,6 +3127,29 @@ class UpsertConnectionRequest {
2743
3127
  return toReturn;
2744
3128
  }
2745
3129
  }
3130
+ class UpsertFunctionRequest {
3131
+ static fromProto(proto) {
3132
+ let m = new UpsertFunctionRequest();
3133
+ m = Object.assign(m, proto);
3134
+ if (proto.function) {
3135
+ m.function = Function.fromProto(proto.function);
3136
+ }
3137
+ return m;
3138
+ }
3139
+ constructor(kwargs) {
3140
+ if (!kwargs) {
3141
+ return;
3142
+ }
3143
+ Object.assign(this, kwargs);
3144
+ }
3145
+ toApiJson() {
3146
+ const toReturn = {};
3147
+ if (typeof this.function !== 'undefined' && this.function !== null) {
3148
+ toReturn['function'] = 'toApiJson' in this.function ? this.function.toApiJson() : this.function;
3149
+ }
3150
+ return toReturn;
3151
+ }
3152
+ }
2746
3153
  class UpsertGoalRequest {
2747
3154
  static fromProto(proto) {
2748
3155
  let m = new UpsertGoalRequest();
@@ -2886,6 +3293,57 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
2886
3293
  args: [{ providedIn: 'root' }]
2887
3294
  }] });
2888
3295
 
3296
+ // *********************************
3297
+ // Code generated by sdkgen
3298
+ // DO NOT EDIT!.
3299
+ //
3300
+ // API Service.
3301
+ // *********************************
3302
+ class FunctionApiService {
3303
+ constructor() {
3304
+ this.hostService = inject(HostService);
3305
+ this.http = inject(HttpClient);
3306
+ this._host = this.hostService.hostWithScheme;
3307
+ }
3308
+ apiOptions() {
3309
+ return {
3310
+ headers: new HttpHeaders({
3311
+ 'Content-Type': 'application/json'
3312
+ }),
3313
+ withCredentials: true
3314
+ };
3315
+ }
3316
+ upsert(r) {
3317
+ const request = (r.toApiJson) ? r : new UpsertFunctionRequest(r);
3318
+ return this.http.post(this._host + "/ai_assistants.v1alpha1.FunctionService/Upsert", request.toApiJson(), Object.assign(Object.assign({}, this.apiOptions()), { observe: 'response' }));
3319
+ }
3320
+ get(r) {
3321
+ const request = (r.toApiJson) ? r : new GetFunctionRequest(r);
3322
+ return this.http.post(this._host + "/ai_assistants.v1alpha1.FunctionService/Get", request.toApiJson(), this.apiOptions())
3323
+ .pipe(map(resp => GetFunctionResponse.fromProto(resp)));
3324
+ }
3325
+ getMulti(r) {
3326
+ const request = (r.toApiJson) ? r : new GetMultiFunctionRequest(r);
3327
+ return this.http.post(this._host + "/ai_assistants.v1alpha1.FunctionService/GetMulti", request.toApiJson(), this.apiOptions())
3328
+ .pipe(map(resp => GetMultiFunctionResponse.fromProto(resp)));
3329
+ }
3330
+ list(r) {
3331
+ const request = (r.toApiJson) ? r : new ListFunctionRequest(r);
3332
+ return this.http.post(this._host + "/ai_assistants.v1alpha1.FunctionService/List", request.toApiJson(), this.apiOptions())
3333
+ .pipe(map(resp => ListFunctionResponse.fromProto(resp)));
3334
+ }
3335
+ delete(r) {
3336
+ const request = (r.toApiJson) ? r : new DeleteFunctionRequest(r);
3337
+ return this.http.post(this._host + "/ai_assistants.v1alpha1.FunctionService/Delete", request.toApiJson(), Object.assign(Object.assign({}, this.apiOptions()), { observe: 'response' }));
3338
+ }
3339
+ }
3340
+ FunctionApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: FunctionApiService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
3341
+ FunctionApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: FunctionApiService, providedIn: 'root' });
3342
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: FunctionApiService, decorators: [{
3343
+ type: Injectable,
3344
+ args: [{ providedIn: 'root' }]
3345
+ }] });
3346
+
2889
3347
  // *********************************
2890
3348
  // Code generated by sdkgen
2891
3349
  // DO NOT EDIT!.
@@ -3096,5 +3554,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
3096
3554
  * Generated bundle index. Do not edit.
3097
3555
  */
3098
3556
 
3099
- export { Access, Assistant, AssistantApiService, AssistantKey, AssistantType, ChatAnswerFunctionExecutionJob, ChatAnswerFunctionExecutionJobResult, ChatAnswerFunctionExecutionJobStatus, ChatChannel, ChatMessage, ChatMessageRole, ChatUserInfo, Config, ConfigInboxConfig, ConfigurableGoal, Connection, ConnectionApiService, ConnectionKey, CreatePromptModuleRequest, CreatePromptRequest, DeleteAssistantRequest, DeleteConnectionRequest, DeleteGoalRequest, DeletePromptModuleRequest, DeletePromptRequest, DeployPromptModuleRequest, DeployPromptRequest, FunctionKey, GenerateChatAnswerRequest, GenerateChatAnswerRequestOptions, GenerateChatAnswerResponse, GetAssistantRequest, GetAssistantResponse, GetChatAnswerFunctionExecutionJobRequest, GetChatAnswerFunctionExecutionJobResponse, GetConnectionRequest, GetConnectionResponse, GetDeployedPromptVersionRequest, GetDeployedPromptVersionResponse, GetGoalRequest, GetGoalResponse, GetHydratedDeployedPromptModuleVersionRequest, GetHydratedDeployedPromptModuleVersionResponse, GetMultiDeployedPromptVersionRequest, GetMultiDeployedPromptVersionResponse, GetMultiGoalRequest, GetMultiGoalResponse, GetMultiHydratedDeployedPromptModuleVersionRequest, GetMultiHydratedDeployedPromptModuleVersionResponse, GetPromptModuleRequest, GetPromptModuleResponse, GetPromptModuleVersionRequest, GetPromptModuleVersionResponse, GetPromptRequest, GetPromptResponse, GetPromptVersionRequest, GetPromptVersionResponse, Goal, GoalApiService, GoalKey, GoalType, HostService, KeyValuePair, ListAllAssistantsAssociatedToConnectionRequest, ListAllAssistantsAssociatedToConnectionRequestFilters, ListAllAssistantsAssociatedToConnectionResponse, ListAssistantRequest, ListAssistantRequestFilters, ListAssistantResponse, ListConnectionsRequest, ListConnectionsRequestFilters, ListConnectionsResponse, ListGoalsRequest, ListGoalsRequestFilters, ListGoalsResponse, ListPromptModuleRequest, ListPromptModuleRequestFilters, ListPromptModuleResponse, ListPromptModuleVersionsRequest, ListPromptModuleVersionsResponse, ListPromptRequest, ListPromptResponse, ListPromptVersionsRequest, ListPromptVersionsResponse, Namespace, NamespaceAccountGroupNamespace, NamespacePartnerNamespace, NamespaceSystemNamespace, PagedRequestOptions, PagedResponseMetadata, Prompt, PromptApiService, PromptModule, PromptModuleApiService, PromptModuleKey, PromptModuleVersion, PromptVersion, SetAssistantConnectionsRequest, SetAssistantConnectionsRequestConnectionState, UpdatePromptModuleRequest, UpdatePromptRequest, UpsertAssistantRequest, UpsertAssistantResponse, UpsertConnectionRequest, UpsertGoalRequest };
3557
+ export { Access, Assistant, AssistantApiService, AssistantKey, AssistantType, ChatAnswerFunctionExecutionJob, ChatAnswerFunctionExecutionJobResult, ChatAnswerFunctionExecutionJobStatus, ChatChannel, ChatMessage, ChatMessageRole, ChatUserInfo, Config, ConfigInboxConfig, ConfigurableGoal, Connection, ConnectionApiService, ConnectionKey, CreatePromptModuleRequest, CreatePromptRequest, DeleteAssistantRequest, DeleteConnectionRequest, DeleteFunctionRequest, DeleteGoalRequest, DeletePromptModuleRequest, DeletePromptRequest, DeployPromptModuleRequest, DeployPromptRequest, Function, FunctionApiService, FunctionKey, FunctionParameter, GenerateChatAnswerRequest, GenerateChatAnswerRequestOptions, GenerateChatAnswerResponse, GetAssistantRequest, GetAssistantResponse, GetChatAnswerFunctionExecutionJobRequest, GetChatAnswerFunctionExecutionJobResponse, GetConnectionRequest, GetConnectionResponse, 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, GoalKey, GoalType, 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, Namespace, NamespaceAccountGroupNamespace, NamespaceAccountGroupsForGroupNamespace, NamespaceAccountGroupsForPartnerNamespace, NamespaceGlobalNamespace, NamespacePartnerNamespace, NamespaceSystemNamespace, PagedRequestOptions, PagedResponseMetadata, Prompt, PromptApiService, PromptModule, PromptModuleApiService, PromptModuleKey, PromptModuleVersion, PromptVersion, SetAssistantConnectionsRequest, SetAssistantConnectionsRequestConnectionState, UpdatePromptModuleRequest, UpdatePromptRequest, UpsertAssistantRequest, UpsertAssistantResponse, UpsertConnectionRequest, UpsertFunctionRequest, UpsertGoalRequest };
3100
3558
  //# sourceMappingURL=vendasta-ai-assistants.mjs.map