@vendasta/ai-assistants 0.9.0 → 0.11.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.
@@ -131,8 +131,8 @@ class NamespaceAccountGroupsForGroupNamespace {
131
131
  }
132
132
  toApiJson() {
133
133
  const toReturn = {};
134
- if (typeof this.groupId !== 'undefined') {
135
- toReturn['groupId'] = this.groupId;
134
+ if (typeof this.groupPath !== 'undefined') {
135
+ toReturn['groupPath'] = this.groupPath;
136
136
  }
137
137
  return toReturn;
138
138
  }
@@ -452,6 +452,9 @@ class PromptModule {
452
452
  if (proto.updated) {
453
453
  m.updated = new Date(proto.updated);
454
454
  }
455
+ if (proto.deployed) {
456
+ m.deployed = new Date(proto.deployed);
457
+ }
455
458
  return m;
456
459
  }
457
460
  constructor(kwargs) {
@@ -471,6 +474,9 @@ class PromptModule {
471
474
  if (typeof this.name !== 'undefined') {
472
475
  toReturn['name'] = this.name;
473
476
  }
477
+ if (typeof this.description !== 'undefined') {
478
+ toReturn['description'] = this.description;
479
+ }
474
480
  if (typeof this.deployedVersion !== 'undefined') {
475
481
  toReturn['deployedVersion'] = this.deployedVersion;
476
482
  }
@@ -480,6 +486,9 @@ class PromptModule {
480
486
  if (typeof this.updated !== 'undefined' && this.updated !== null) {
481
487
  toReturn['updated'] = 'toApiJson' in this.updated ? this.updated.toApiJson() : this.updated;
482
488
  }
489
+ if (typeof this.deployed !== 'undefined' && this.deployed !== null) {
490
+ toReturn['deployed'] = 'toApiJson' in this.deployed ? this.deployed.toApiJson() : this.deployed;
491
+ }
483
492
  return toReturn;
484
493
  }
485
494
  }
@@ -1229,6 +1238,41 @@ class CreatePromptModuleRequest {
1229
1238
  }
1230
1239
  Object.assign(this, kwargs);
1231
1240
  }
1241
+ toApiJson() {
1242
+ const toReturn = {};
1243
+ if (typeof this.id !== 'undefined') {
1244
+ toReturn['id'] = this.id;
1245
+ }
1246
+ if (typeof this.namespace !== 'undefined' && this.namespace !== null) {
1247
+ toReturn['namespace'] = 'toApiJson' in this.namespace ? this.namespace.toApiJson() : this.namespace;
1248
+ }
1249
+ if (typeof this.name !== 'undefined') {
1250
+ toReturn['name'] = this.name;
1251
+ }
1252
+ if (typeof this.description !== 'undefined') {
1253
+ toReturn['description'] = this.description;
1254
+ }
1255
+ if (typeof this.content !== 'undefined') {
1256
+ toReturn['content'] = this.content;
1257
+ }
1258
+ return toReturn;
1259
+ }
1260
+ }
1261
+ class CreatePromptModuleVersionRequest {
1262
+ static fromProto(proto) {
1263
+ let m = new CreatePromptModuleVersionRequest();
1264
+ m = Object.assign(m, proto);
1265
+ if (proto.namespace) {
1266
+ m.namespace = Namespace.fromProto(proto.namespace);
1267
+ }
1268
+ return m;
1269
+ }
1270
+ constructor(kwargs) {
1271
+ if (!kwargs) {
1272
+ return;
1273
+ }
1274
+ Object.assign(this, kwargs);
1275
+ }
1232
1276
  toApiJson() {
1233
1277
  const toReturn = {};
1234
1278
  if (typeof this.id !== 'undefined') {
@@ -1474,12 +1518,12 @@ class DeployPromptRequest {
1474
1518
  return toReturn;
1475
1519
  }
1476
1520
  }
1477
- class ListAllAssistantsAssociatedToConnectionRequestFilters {
1521
+ class ListGoalsRequestFilters {
1478
1522
  static fromProto(proto) {
1479
- let m = new ListAllAssistantsAssociatedToConnectionRequestFilters();
1523
+ let m = new ListGoalsRequestFilters();
1480
1524
  m = Object.assign(m, proto);
1481
- if (proto.type) {
1482
- m.type = enumStringToValue(AssistantType, proto.type);
1525
+ if (proto.namespace) {
1526
+ m.namespace = Namespace.fromProto(proto.namespace);
1483
1527
  }
1484
1528
  return m;
1485
1529
  }
@@ -1491,15 +1535,15 @@ class ListAllAssistantsAssociatedToConnectionRequestFilters {
1491
1535
  }
1492
1536
  toApiJson() {
1493
1537
  const toReturn = {};
1494
- if (typeof this.type !== 'undefined') {
1495
- toReturn['type'] = this.type;
1538
+ if (typeof this.namespace !== 'undefined' && this.namespace !== null) {
1539
+ toReturn['namespace'] = 'toApiJson' in this.namespace ? this.namespace.toApiJson() : this.namespace;
1496
1540
  }
1497
1541
  return toReturn;
1498
1542
  }
1499
1543
  }
1500
- class ListFunctionRequestFilters {
1544
+ class ListPromptModuleRequestFilters {
1501
1545
  static fromProto(proto) {
1502
- let m = new ListFunctionRequestFilters();
1546
+ let m = new ListPromptModuleRequestFilters();
1503
1547
  m = Object.assign(m, proto);
1504
1548
  if (proto.namespace) {
1505
1549
  m.namespace = Namespace.fromProto(proto.namespace);
@@ -1520,16 +1564,13 @@ class ListFunctionRequestFilters {
1520
1564
  return toReturn;
1521
1565
  }
1522
1566
  }
1523
- class ListConnectionsRequestFilters {
1567
+ class ListFunctionRequestFilters {
1524
1568
  static fromProto(proto) {
1525
- let m = new ListConnectionsRequestFilters();
1569
+ let m = new ListFunctionRequestFilters();
1526
1570
  m = Object.assign(m, proto);
1527
1571
  if (proto.namespace) {
1528
1572
  m.namespace = Namespace.fromProto(proto.namespace);
1529
1573
  }
1530
- if (proto.assistantType) {
1531
- m.assistantType = enumStringToValue(AssistantType, proto.assistantType);
1532
- }
1533
1574
  return m;
1534
1575
  }
1535
1576
  constructor(kwargs) {
@@ -1543,19 +1584,13 @@ class ListConnectionsRequestFilters {
1543
1584
  if (typeof this.namespace !== 'undefined' && this.namespace !== null) {
1544
1585
  toReturn['namespace'] = 'toApiJson' in this.namespace ? this.namespace.toApiJson() : this.namespace;
1545
1586
  }
1546
- if (typeof this.assistantType !== 'undefined') {
1547
- toReturn['assistantType'] = this.assistantType;
1548
- }
1549
1587
  return toReturn;
1550
1588
  }
1551
1589
  }
1552
- class ListAssistantRequestFilters {
1590
+ class ListAllAssistantsAssociatedToConnectionRequestFilters {
1553
1591
  static fromProto(proto) {
1554
- let m = new ListAssistantRequestFilters();
1592
+ let m = new ListAllAssistantsAssociatedToConnectionRequestFilters();
1555
1593
  m = Object.assign(m, proto);
1556
- if (proto.namespace) {
1557
- m.namespace = Namespace.fromProto(proto.namespace);
1558
- }
1559
1594
  if (proto.type) {
1560
1595
  m.type = enumStringToValue(AssistantType, proto.type);
1561
1596
  }
@@ -1569,22 +1604,22 @@ class ListAssistantRequestFilters {
1569
1604
  }
1570
1605
  toApiJson() {
1571
1606
  const toReturn = {};
1572
- if (typeof this.namespace !== 'undefined' && this.namespace !== null) {
1573
- toReturn['namespace'] = 'toApiJson' in this.namespace ? this.namespace.toApiJson() : this.namespace;
1574
- }
1575
1607
  if (typeof this.type !== 'undefined') {
1576
1608
  toReturn['type'] = this.type;
1577
1609
  }
1578
1610
  return toReturn;
1579
1611
  }
1580
1612
  }
1581
- class ListGoalsRequestFilters {
1613
+ class ListAssistantRequestFilters {
1582
1614
  static fromProto(proto) {
1583
- let m = new ListGoalsRequestFilters();
1615
+ let m = new ListAssistantRequestFilters();
1584
1616
  m = Object.assign(m, proto);
1585
1617
  if (proto.namespace) {
1586
1618
  m.namespace = Namespace.fromProto(proto.namespace);
1587
1619
  }
1620
+ if (proto.type) {
1621
+ m.type = enumStringToValue(AssistantType, proto.type);
1622
+ }
1588
1623
  return m;
1589
1624
  }
1590
1625
  constructor(kwargs) {
@@ -1598,16 +1633,22 @@ class ListGoalsRequestFilters {
1598
1633
  if (typeof this.namespace !== 'undefined' && this.namespace !== null) {
1599
1634
  toReturn['namespace'] = 'toApiJson' in this.namespace ? this.namespace.toApiJson() : this.namespace;
1600
1635
  }
1636
+ if (typeof this.type !== 'undefined') {
1637
+ toReturn['type'] = this.type;
1638
+ }
1601
1639
  return toReturn;
1602
1640
  }
1603
1641
  }
1604
- class ListPromptModuleRequestFilters {
1642
+ class ListConnectionsRequestFilters {
1605
1643
  static fromProto(proto) {
1606
- let m = new ListPromptModuleRequestFilters();
1644
+ let m = new ListConnectionsRequestFilters();
1607
1645
  m = Object.assign(m, proto);
1608
1646
  if (proto.namespace) {
1609
1647
  m.namespace = Namespace.fromProto(proto.namespace);
1610
1648
  }
1649
+ if (proto.assistantType) {
1650
+ m.assistantType = enumStringToValue(AssistantType, proto.assistantType);
1651
+ }
1611
1652
  return m;
1612
1653
  }
1613
1654
  constructor(kwargs) {
@@ -1621,6 +1662,9 @@ class ListPromptModuleRequestFilters {
1621
1662
  if (typeof this.namespace !== 'undefined' && this.namespace !== null) {
1622
1663
  toReturn['namespace'] = 'toApiJson' in this.namespace ? this.namespace.toApiJson() : this.namespace;
1623
1664
  }
1665
+ if (typeof this.assistantType !== 'undefined') {
1666
+ toReturn['assistantType'] = this.assistantType;
1667
+ }
1624
1668
  return toReturn;
1625
1669
  }
1626
1670
  }
@@ -1847,6 +1891,61 @@ class GetConnectionResponse {
1847
1891
  return toReturn;
1848
1892
  }
1849
1893
  }
1894
+ class GetDeployedPromptModuleVersionRequest {
1895
+ static fromProto(proto) {
1896
+ let m = new GetDeployedPromptModuleVersionRequest();
1897
+ m = Object.assign(m, proto);
1898
+ if (proto.namespace) {
1899
+ m.namespace = Namespace.fromProto(proto.namespace);
1900
+ }
1901
+ return m;
1902
+ }
1903
+ constructor(kwargs) {
1904
+ if (!kwargs) {
1905
+ return;
1906
+ }
1907
+ Object.assign(this, kwargs);
1908
+ }
1909
+ toApiJson() {
1910
+ const toReturn = {};
1911
+ if (typeof this.id !== 'undefined') {
1912
+ toReturn['id'] = this.id;
1913
+ }
1914
+ if (typeof this.namespace !== 'undefined' && this.namespace !== null) {
1915
+ toReturn['namespace'] = 'toApiJson' in this.namespace ? this.namespace.toApiJson() : this.namespace;
1916
+ }
1917
+ return toReturn;
1918
+ }
1919
+ }
1920
+ class GetDeployedPromptModuleVersionResponse {
1921
+ static fromProto(proto) {
1922
+ let m = new GetDeployedPromptModuleVersionResponse();
1923
+ m = Object.assign(m, proto);
1924
+ if (proto.promptModule) {
1925
+ m.promptModule = PromptModule.fromProto(proto.promptModule);
1926
+ }
1927
+ if (proto.deployedPromptModuleVersion) {
1928
+ m.deployedPromptModuleVersion = PromptModuleVersion.fromProto(proto.deployedPromptModuleVersion);
1929
+ }
1930
+ return m;
1931
+ }
1932
+ constructor(kwargs) {
1933
+ if (!kwargs) {
1934
+ return;
1935
+ }
1936
+ Object.assign(this, kwargs);
1937
+ }
1938
+ toApiJson() {
1939
+ const toReturn = {};
1940
+ if (typeof this.promptModule !== 'undefined' && this.promptModule !== null) {
1941
+ toReturn['promptModule'] = 'toApiJson' in this.promptModule ? this.promptModule.toApiJson() : this.promptModule;
1942
+ }
1943
+ if (typeof this.deployedPromptModuleVersion !== 'undefined' && this.deployedPromptModuleVersion !== null) {
1944
+ toReturn['deployedPromptModuleVersion'] = 'toApiJson' in this.deployedPromptModuleVersion ? this.deployedPromptModuleVersion.toApiJson() : this.deployedPromptModuleVersion;
1945
+ }
1946
+ return toReturn;
1947
+ }
1948
+ }
1850
1949
  class GetDeployedPromptVersionRequest {
1851
1950
  static fromProto(proto) {
1852
1951
  let m = new GetDeployedPromptVersionRequest();
@@ -3026,8 +3125,11 @@ class UpdatePromptModuleRequest {
3026
3125
  if (typeof this.namespace !== 'undefined' && this.namespace !== null) {
3027
3126
  toReturn['namespace'] = 'toApiJson' in this.namespace ? this.namespace.toApiJson() : this.namespace;
3028
3127
  }
3029
- if (typeof this.content !== 'undefined') {
3030
- toReturn['content'] = this.content;
3128
+ if (typeof this.name !== 'undefined') {
3129
+ toReturn['name'] = this.name;
3130
+ }
3131
+ if (typeof this.description !== 'undefined') {
3132
+ toReturn['description'] = this.description;
3031
3133
  }
3032
3134
  return toReturn;
3033
3135
  }
@@ -3419,6 +3521,10 @@ class PromptModuleApiService {
3419
3521
  const request = (r.toApiJson) ? r : new CreatePromptModuleRequest(r);
3420
3522
  return this.http.post(this._host + "/ai_assistants.v1alpha1.PromptModuleService/Create", request.toApiJson(), Object.assign(Object.assign({}, this.apiOptions()), { observe: 'response' }));
3421
3523
  }
3524
+ createVersion(r) {
3525
+ const request = (r.toApiJson) ? r : new CreatePromptModuleVersionRequest(r);
3526
+ return this.http.post(this._host + "/ai_assistants.v1alpha1.PromptModuleService/CreateVersion", request.toApiJson(), Object.assign(Object.assign({}, this.apiOptions()), { observe: 'response' }));
3527
+ }
3422
3528
  get(r) {
3423
3529
  const request = (r.toApiJson) ? r : new GetPromptModuleRequest(r);
3424
3530
  return this.http.post(this._host + "/ai_assistants.v1alpha1.PromptModuleService/Get", request.toApiJson(), this.apiOptions())
@@ -3429,6 +3535,11 @@ class PromptModuleApiService {
3429
3535
  return this.http.post(this._host + "/ai_assistants.v1alpha1.PromptModuleService/GetVersion", request.toApiJson(), this.apiOptions())
3430
3536
  .pipe(map(resp => GetPromptModuleVersionResponse.fromProto(resp)));
3431
3537
  }
3538
+ getDeployedVersion(r) {
3539
+ const request = (r.toApiJson) ? r : new GetDeployedPromptModuleVersionRequest(r);
3540
+ return this.http.post(this._host + "/ai_assistants.v1alpha1.PromptModuleService/GetDeployedVersion", request.toApiJson(), this.apiOptions())
3541
+ .pipe(map(resp => GetDeployedPromptModuleVersionResponse.fromProto(resp)));
3542
+ }
3432
3543
  getHydratedDeployedVersion(r) {
3433
3544
  const request = (r.toApiJson) ? r : new GetHydratedDeployedPromptModuleVersionRequest(r);
3434
3545
  return this.http.post(this._host + "/ai_assistants.v1alpha1.PromptModuleService/GetHydratedDeployedVersion", request.toApiJson(), this.apiOptions())
@@ -3554,5 +3665,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
3554
3665
  * Generated bundle index. Do not edit.
3555
3666
  */
3556
3667
 
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 };
3668
+ export { Access, Assistant, AssistantApiService, AssistantKey, AssistantType, ChatAnswerFunctionExecutionJob, ChatAnswerFunctionExecutionJobResult, ChatAnswerFunctionExecutionJobStatus, ChatChannel, ChatMessage, ChatMessageRole, ChatUserInfo, Config, ConfigInboxConfig, ConfigurableGoal, Connection, ConnectionApiService, ConnectionKey, CreatePromptModuleRequest, CreatePromptModuleVersionRequest, CreatePromptRequest, DeleteAssistantRequest, DeleteConnectionRequest, DeleteFunctionRequest, DeleteGoalRequest, DeletePromptModuleRequest, DeletePromptRequest, DeployPromptModuleRequest, DeployPromptRequest, Function, FunctionApiService, FunctionKey, FunctionParameter, 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, 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 };
3558
3669
  //# sourceMappingURL=vendasta-ai-assistants.mjs.map