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