@vendasta/ai-assistants 0.35.0 → 0.37.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.
@@ -115,6 +115,7 @@ var ChatChannel;
115
115
  ChatChannel[ChatChannel["CHAT_CHANNEL_INSTAGRAM"] = 7] = "CHAT_CHANNEL_INSTAGRAM";
116
116
  ChatChannel[ChatChannel["CHAT_CHANNEL_AUTOMATION"] = 8] = "CHAT_CHANNEL_AUTOMATION";
117
117
  ChatChannel[ChatChannel["CHAT_CHANNEL_PLATFORM"] = 9] = "CHAT_CHANNEL_PLATFORM";
118
+ ChatChannel[ChatChannel["CHAT_CHANNEL_SNAPSHOT"] = 10] = "CHAT_CHANNEL_SNAPSHOT";
118
119
  })(ChatChannel || (ChatChannel = {}));
119
120
  var ChatMessageRole;
120
121
  (function (ChatMessageRole) {
@@ -1467,6 +1468,55 @@ class DeleteTestCasesRequest {
1467
1468
  return toReturn;
1468
1469
  }
1469
1470
  }
1471
+ class GetTestRunRequest {
1472
+ static fromProto(proto) {
1473
+ let m = new GetTestRunRequest();
1474
+ m = Object.assign(m, proto);
1475
+ if (proto.assistant) {
1476
+ m.assistant = AssistantKey.fromProto(proto.assistant);
1477
+ }
1478
+ return m;
1479
+ }
1480
+ constructor(kwargs) {
1481
+ if (!kwargs) {
1482
+ return;
1483
+ }
1484
+ Object.assign(this, kwargs);
1485
+ }
1486
+ toApiJson() {
1487
+ const toReturn = {};
1488
+ if (typeof this.assistant !== 'undefined' && this.assistant !== null) {
1489
+ toReturn['assistant'] = 'toApiJson' in this.assistant ? this.assistant.toApiJson() : this.assistant;
1490
+ }
1491
+ if (typeof this.id !== 'undefined') {
1492
+ toReturn['id'] = this.id;
1493
+ }
1494
+ return toReturn;
1495
+ }
1496
+ }
1497
+ class GetTestRunResponse {
1498
+ static fromProto(proto) {
1499
+ let m = new GetTestRunResponse();
1500
+ m = Object.assign(m, proto);
1501
+ if (proto.testRun) {
1502
+ m.testRun = TestRun.fromProto(proto.testRun);
1503
+ }
1504
+ return m;
1505
+ }
1506
+ constructor(kwargs) {
1507
+ if (!kwargs) {
1508
+ return;
1509
+ }
1510
+ Object.assign(this, kwargs);
1511
+ }
1512
+ toApiJson() {
1513
+ const toReturn = {};
1514
+ if (typeof this.testRun !== 'undefined' && this.testRun !== null) {
1515
+ toReturn['testRun'] = 'toApiJson' in this.testRun ? this.testRun.toApiJson() : this.testRun;
1516
+ }
1517
+ return toReturn;
1518
+ }
1519
+ }
1470
1520
  class ListTestCasesByAssistantRequest {
1471
1521
  static fromProto(proto) {
1472
1522
  let m = new ListTestCasesByAssistantRequest();
@@ -1525,6 +1575,64 @@ class ListTestCasesByAssistantResponse {
1525
1575
  return toReturn;
1526
1576
  }
1527
1577
  }
1578
+ class ListTestRunsByAssistantRequest {
1579
+ static fromProto(proto) {
1580
+ let m = new ListTestRunsByAssistantRequest();
1581
+ m = Object.assign(m, proto);
1582
+ if (proto.assistant) {
1583
+ m.assistant = AssistantKey.fromProto(proto.assistant);
1584
+ }
1585
+ if (proto.pagingOptions) {
1586
+ m.pagingOptions = PagedRequestOptions.fromProto(proto.pagingOptions);
1587
+ }
1588
+ return m;
1589
+ }
1590
+ constructor(kwargs) {
1591
+ if (!kwargs) {
1592
+ return;
1593
+ }
1594
+ Object.assign(this, kwargs);
1595
+ }
1596
+ toApiJson() {
1597
+ const toReturn = {};
1598
+ if (typeof this.assistant !== 'undefined' && this.assistant !== null) {
1599
+ toReturn['assistant'] = 'toApiJson' in this.assistant ? this.assistant.toApiJson() : this.assistant;
1600
+ }
1601
+ if (typeof this.pagingOptions !== 'undefined' && this.pagingOptions !== null) {
1602
+ toReturn['pagingOptions'] = 'toApiJson' in this.pagingOptions ? this.pagingOptions.toApiJson() : this.pagingOptions;
1603
+ }
1604
+ return toReturn;
1605
+ }
1606
+ }
1607
+ class ListTestRunsByAssistantResponse {
1608
+ static fromProto(proto) {
1609
+ let m = new ListTestRunsByAssistantResponse();
1610
+ m = Object.assign(m, proto);
1611
+ if (proto.testRuns) {
1612
+ m.testRuns = proto.testRuns.map(TestRun.fromProto);
1613
+ }
1614
+ if (proto.pagingMetadata) {
1615
+ m.pagingMetadata = PagedResponseMetadata.fromProto(proto.pagingMetadata);
1616
+ }
1617
+ return m;
1618
+ }
1619
+ constructor(kwargs) {
1620
+ if (!kwargs) {
1621
+ return;
1622
+ }
1623
+ Object.assign(this, kwargs);
1624
+ }
1625
+ toApiJson() {
1626
+ const toReturn = {};
1627
+ if (typeof this.testRuns !== 'undefined' && this.testRuns !== null) {
1628
+ toReturn['testRuns'] = 'toApiJson' in this.testRuns ? this.testRuns.toApiJson() : this.testRuns;
1629
+ }
1630
+ if (typeof this.pagingMetadata !== 'undefined' && this.pagingMetadata !== null) {
1631
+ toReturn['pagingMetadata'] = 'toApiJson' in this.pagingMetadata ? this.pagingMetadata.toApiJson() : this.pagingMetadata;
1632
+ }
1633
+ return toReturn;
1634
+ }
1635
+ }
1528
1636
  class RunTestsRequest {
1529
1637
  static fromProto(proto) {
1530
1638
  let m = new RunTestsRequest();
@@ -1603,6 +1711,85 @@ class TestCase {
1603
1711
  return toReturn;
1604
1712
  }
1605
1713
  }
1714
+ class TestResult {
1715
+ static fromProto(proto) {
1716
+ let m = new TestResult();
1717
+ m = Object.assign(m, proto);
1718
+ if (proto.chatHistory) {
1719
+ m.chatHistory = proto.chatHistory.map(ChatMessage.fromProto);
1720
+ }
1721
+ return m;
1722
+ }
1723
+ constructor(kwargs) {
1724
+ if (!kwargs) {
1725
+ return;
1726
+ }
1727
+ Object.assign(this, kwargs);
1728
+ }
1729
+ toApiJson() {
1730
+ const toReturn = {};
1731
+ if (typeof this.id !== 'undefined') {
1732
+ toReturn['id'] = this.id;
1733
+ }
1734
+ if (typeof this.name !== 'undefined') {
1735
+ toReturn['name'] = this.name;
1736
+ }
1737
+ if (typeof this.chatHistory !== 'undefined' && this.chatHistory !== null) {
1738
+ toReturn['chatHistory'] = 'toApiJson' in this.chatHistory ? this.chatHistory.toApiJson() : this.chatHistory;
1739
+ }
1740
+ if (typeof this.expected !== 'undefined') {
1741
+ toReturn['expected'] = this.expected;
1742
+ }
1743
+ if (typeof this.evaluation !== 'undefined') {
1744
+ toReturn['evaluation'] = this.evaluation;
1745
+ }
1746
+ if (typeof this.status !== 'undefined') {
1747
+ toReturn['status'] = this.status;
1748
+ }
1749
+ if (typeof this.score !== 'undefined') {
1750
+ toReturn['score'] = this.score;
1751
+ }
1752
+ return toReturn;
1753
+ }
1754
+ }
1755
+ class TestRun {
1756
+ static fromProto(proto) {
1757
+ let m = new TestRun();
1758
+ m = Object.assign(m, proto);
1759
+ if (proto.testResults) {
1760
+ m.testResults = proto.testResults.map(TestResult.fromProto);
1761
+ }
1762
+ if (proto.created) {
1763
+ m.created = new Date(proto.created);
1764
+ }
1765
+ return m;
1766
+ }
1767
+ constructor(kwargs) {
1768
+ if (!kwargs) {
1769
+ return;
1770
+ }
1771
+ Object.assign(this, kwargs);
1772
+ }
1773
+ toApiJson() {
1774
+ const toReturn = {};
1775
+ if (typeof this.id !== 'undefined') {
1776
+ toReturn['id'] = this.id;
1777
+ }
1778
+ if (typeof this.status !== 'undefined') {
1779
+ toReturn['status'] = this.status;
1780
+ }
1781
+ if (typeof this.testFramework !== 'undefined') {
1782
+ toReturn['testFramework'] = this.testFramework;
1783
+ }
1784
+ if (typeof this.testResults !== 'undefined' && this.testResults !== null) {
1785
+ toReturn['testResults'] = 'toApiJson' in this.testResults ? this.testResults.toApiJson() : this.testResults;
1786
+ }
1787
+ if (typeof this.created !== 'undefined' && this.created !== null) {
1788
+ toReturn['created'] = 'toApiJson' in this.created ? this.created.toApiJson() : this.created;
1789
+ }
1790
+ return toReturn;
1791
+ }
1792
+ }
1606
1793
  class UpsertTestCasesRequest {
1607
1794
  static fromProto(proto) {
1608
1795
  let m = new UpsertTestCasesRequest();
@@ -4504,6 +4691,16 @@ class IntegrationTestApiService {
4504
4691
  return this.http.post(this._host + "/ai_assistants.v1alpha1.IntegrationTestService/RunTests", request.toApiJson(), this.apiOptions())
4505
4692
  .pipe(map(resp => RunTestsResponse.fromProto(resp)));
4506
4693
  }
4694
+ listTestRunsByAssistant(r) {
4695
+ const request = (r.toApiJson) ? r : new ListTestRunsByAssistantRequest(r);
4696
+ return this.http.post(this._host + "/ai_assistants.v1alpha1.IntegrationTestService/ListTestRunsByAssistant", request.toApiJson(), this.apiOptions())
4697
+ .pipe(map(resp => ListTestRunsByAssistantResponse.fromProto(resp)));
4698
+ }
4699
+ getTestRun(r) {
4700
+ const request = (r.toApiJson) ? r : new GetTestRunRequest(r);
4701
+ return this.http.post(this._host + "/ai_assistants.v1alpha1.IntegrationTestService/GetTestRun", request.toApiJson(), this.apiOptions())
4702
+ .pipe(map(resp => GetTestRunResponse.fromProto(resp)));
4703
+ }
4507
4704
  }
4508
4705
  IntegrationTestApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: IntegrationTestApiService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
4509
4706
  IntegrationTestApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: IntegrationTestApiService, providedIn: 'root' });
@@ -4681,5 +4878,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
4681
4878
  * Generated bundle index. Do not edit.
4682
4879
  */
4683
4880
 
4684
- export { Access, Assistant, AssistantApiService, AssistantKey, AssistantType, BuildDefaultAssistantRequest, BuildDefaultAssistantResponse, ChatAnswerFunctionExecutionJob, ChatAnswerFunctionExecutionJobResult, ChatAnswerFunctionExecutionJobStatus, ChatChannel, ChatMessage, ChatMessageRole, ChatUserInfo, Config, ConfigInboxConfig, ConfigVoiceConfig, ConfigurableGoal, Connection, ConnectionApiService, ConnectionKey, ContextInfo, CreateAssistantRequest, CreateAssistantRequestOptions, CreateAssistantResponse, CreateGoalRequest, CreateGoalResponse, CreatePromptModuleRequest, CreatePromptModuleResponse, CreatePromptModuleVersionRequest, CreatePromptModuleVersionRequestOptions, CreatePromptRequest, DeepgramConfig, DeleteAssistantRequest, DeleteConnectionRequest, DeleteFunctionRequest, DeleteGoalRequest, DeletePromptModuleRequest, DeletePromptRequest, DeleteTestCasesRequest, DeployPromptModuleRequest, DeployPromptRequest, ExecuteFunctionRequest, ExecuteFunctionResponse, FieldMask, Function, FunctionApiService, FunctionAuthStrategy, FunctionAuthStrategyPlatformManagedFunctionAuthStrategy, FunctionAuthStrategyUnspecifiedFunctionAuthStrategy, FunctionHeader, FunctionKey, FunctionParameter, FunctionParameterParameterLocation, GenerateChatAnswerRequest, GenerateChatAnswerRequestOptions, GenerateChatAnswerResponse, GetAssistantRequest, GetAssistantResponse, GetChatAnswerFunctionExecutionJobRequest, GetChatAnswerFunctionExecutionJobResponse, GetConnectionRequest, GetConnectionResponse, GetDeployedPromptModuleVersionRequest, GetDeployedPromptModuleVersionResponse, GetDeployedPromptVersionRequest, GetDeployedPromptVersionResponse, GetFunctionRequest, GetFunctionResponse, GetGoalRequest, GetGoalResponse, GetHydratedDeployedPromptModuleVersionRequest, GetHydratedDeployedPromptModuleVersionResponse, GetMultiDeployedPromptVersionRequest, GetMultiDeployedPromptVersionResponse, GetMultiFunctionRequest, GetMultiFunctionResponse, GetMultiGoalRequest, GetMultiGoalResponse, GetMultiHydratedDeployedPromptModuleVersionRequest, GetMultiHydratedDeployedPromptModuleVersionResponse, GetPromptModuleRequest, GetPromptModuleResponse, GetPromptModuleVersionRequest, GetPromptModuleVersionResponse, GetPromptRequest, GetPromptResponse, GetPromptVersionRequest, GetPromptVersionResponse, Goal, GoalApiService, GoalChannel, GoalKey, GoalType, GoalsDisabledForAccountGroupRequest, GoalsDisabledForAccountGroupResponse, HostService, IntegrationTestApiService, 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, ListTestCasesByAssistantRequest, ListTestCasesByAssistantResponse, ModelConfig, Namespace, NamespaceAccountGroupNamespace, NamespaceGlobalNamespace, NamespacePartnerNamespace, NamespaceSystemNamespace, OpenAIRealtimeConfig, OpenAIRealtimeConfigTurnDetection, PagedRequestOptions, PagedResponseMetadata, Prompt, PromptApiService, PromptModule, PromptModuleApiService, PromptModuleKey, PromptModuleVersion, PromptVersion, RunTestsRequest, RunTestsResponse, SetAssistantConnectionsRequest, SetAssistantConnectionsRequestConnectionState, TestCase, UpdateAssistantRequest, UpdateGoalRequest, UpdatePromptModuleRequest, UpdatePromptRequest, UpsertAssistantRequest, UpsertAssistantRequestOptions, UpsertAssistantResponse, UpsertConnectionRequest, UpsertFunctionRequest, UpsertGoalRequest, UpsertTestCasesRequest, VendorModel };
4881
+ export { Access, Assistant, AssistantApiService, AssistantKey, AssistantType, BuildDefaultAssistantRequest, BuildDefaultAssistantResponse, ChatAnswerFunctionExecutionJob, ChatAnswerFunctionExecutionJobResult, ChatAnswerFunctionExecutionJobStatus, ChatChannel, ChatMessage, ChatMessageRole, ChatUserInfo, Config, ConfigInboxConfig, ConfigVoiceConfig, ConfigurableGoal, Connection, ConnectionApiService, ConnectionKey, ContextInfo, CreateAssistantRequest, CreateAssistantRequestOptions, CreateAssistantResponse, CreateGoalRequest, CreateGoalResponse, CreatePromptModuleRequest, CreatePromptModuleResponse, CreatePromptModuleVersionRequest, CreatePromptModuleVersionRequestOptions, CreatePromptRequest, DeepgramConfig, DeleteAssistantRequest, DeleteConnectionRequest, DeleteFunctionRequest, DeleteGoalRequest, DeletePromptModuleRequest, DeletePromptRequest, DeleteTestCasesRequest, DeployPromptModuleRequest, DeployPromptRequest, ExecuteFunctionRequest, ExecuteFunctionResponse, FieldMask, Function, FunctionApiService, FunctionAuthStrategy, FunctionAuthStrategyPlatformManagedFunctionAuthStrategy, FunctionAuthStrategyUnspecifiedFunctionAuthStrategy, FunctionHeader, FunctionKey, FunctionParameter, FunctionParameterParameterLocation, GenerateChatAnswerRequest, GenerateChatAnswerRequestOptions, GenerateChatAnswerResponse, GetAssistantRequest, GetAssistantResponse, GetChatAnswerFunctionExecutionJobRequest, GetChatAnswerFunctionExecutionJobResponse, GetConnectionRequest, GetConnectionResponse, GetDeployedPromptModuleVersionRequest, GetDeployedPromptModuleVersionResponse, GetDeployedPromptVersionRequest, GetDeployedPromptVersionResponse, GetFunctionRequest, GetFunctionResponse, GetGoalRequest, GetGoalResponse, GetHydratedDeployedPromptModuleVersionRequest, GetHydratedDeployedPromptModuleVersionResponse, GetMultiDeployedPromptVersionRequest, GetMultiDeployedPromptVersionResponse, GetMultiFunctionRequest, GetMultiFunctionResponse, GetMultiGoalRequest, GetMultiGoalResponse, GetMultiHydratedDeployedPromptModuleVersionRequest, GetMultiHydratedDeployedPromptModuleVersionResponse, GetPromptModuleRequest, GetPromptModuleResponse, GetPromptModuleVersionRequest, GetPromptModuleVersionResponse, GetPromptRequest, GetPromptResponse, GetPromptVersionRequest, GetPromptVersionResponse, GetTestRunRequest, GetTestRunResponse, Goal, GoalApiService, GoalChannel, GoalKey, GoalType, GoalsDisabledForAccountGroupRequest, GoalsDisabledForAccountGroupResponse, HostService, IntegrationTestApiService, 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, ListTestCasesByAssistantRequest, ListTestCasesByAssistantResponse, ListTestRunsByAssistantRequest, ListTestRunsByAssistantResponse, ModelConfig, Namespace, NamespaceAccountGroupNamespace, NamespaceGlobalNamespace, NamespacePartnerNamespace, NamespaceSystemNamespace, OpenAIRealtimeConfig, OpenAIRealtimeConfigTurnDetection, PagedRequestOptions, PagedResponseMetadata, Prompt, PromptApiService, PromptModule, PromptModuleApiService, PromptModuleKey, PromptModuleVersion, PromptVersion, RunTestsRequest, RunTestsResponse, SetAssistantConnectionsRequest, SetAssistantConnectionsRequestConnectionState, TestCase, TestResult, TestRun, UpdateAssistantRequest, UpdateGoalRequest, UpdatePromptModuleRequest, UpdatePromptRequest, UpsertAssistantRequest, UpsertAssistantRequestOptions, UpsertAssistantResponse, UpsertConnectionRequest, UpsertFunctionRequest, UpsertGoalRequest, UpsertTestCasesRequest, VendorModel };
4685
4882
  //# sourceMappingURL=vendasta-ai-assistants.mjs.map