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