@vendasta/ai-assistants 0.36.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.
@@ -1469,6 +1469,55 @@ class DeleteTestCasesRequest {
1469
1469
  return toReturn;
1470
1470
  }
1471
1471
  }
1472
+ class GetTestRunRequest {
1473
+ static fromProto(proto) {
1474
+ let m = new GetTestRunRequest();
1475
+ m = Object.assign(m, proto);
1476
+ if (proto.assistant) {
1477
+ m.assistant = AssistantKey.fromProto(proto.assistant);
1478
+ }
1479
+ return m;
1480
+ }
1481
+ constructor(kwargs) {
1482
+ if (!kwargs) {
1483
+ return;
1484
+ }
1485
+ Object.assign(this, kwargs);
1486
+ }
1487
+ toApiJson() {
1488
+ const toReturn = {};
1489
+ if (typeof this.assistant !== 'undefined' && this.assistant !== null) {
1490
+ toReturn['assistant'] = 'toApiJson' in this.assistant ? this.assistant.toApiJson() : this.assistant;
1491
+ }
1492
+ if (typeof this.id !== 'undefined') {
1493
+ toReturn['id'] = this.id;
1494
+ }
1495
+ return toReturn;
1496
+ }
1497
+ }
1498
+ class GetTestRunResponse {
1499
+ static fromProto(proto) {
1500
+ let m = new GetTestRunResponse();
1501
+ m = Object.assign(m, proto);
1502
+ if (proto.testRun) {
1503
+ m.testRun = TestRun.fromProto(proto.testRun);
1504
+ }
1505
+ return m;
1506
+ }
1507
+ constructor(kwargs) {
1508
+ if (!kwargs) {
1509
+ return;
1510
+ }
1511
+ Object.assign(this, kwargs);
1512
+ }
1513
+ toApiJson() {
1514
+ const toReturn = {};
1515
+ if (typeof this.testRun !== 'undefined' && this.testRun !== null) {
1516
+ toReturn['testRun'] = 'toApiJson' in this.testRun ? this.testRun.toApiJson() : this.testRun;
1517
+ }
1518
+ return toReturn;
1519
+ }
1520
+ }
1472
1521
  class ListTestCasesByAssistantRequest {
1473
1522
  static fromProto(proto) {
1474
1523
  let m = new ListTestCasesByAssistantRequest();
@@ -1527,6 +1576,64 @@ class ListTestCasesByAssistantResponse {
1527
1576
  return toReturn;
1528
1577
  }
1529
1578
  }
1579
+ class ListTestRunsByAssistantRequest {
1580
+ static fromProto(proto) {
1581
+ let m = new ListTestRunsByAssistantRequest();
1582
+ m = Object.assign(m, proto);
1583
+ if (proto.assistant) {
1584
+ m.assistant = AssistantKey.fromProto(proto.assistant);
1585
+ }
1586
+ if (proto.pagingOptions) {
1587
+ m.pagingOptions = PagedRequestOptions.fromProto(proto.pagingOptions);
1588
+ }
1589
+ return m;
1590
+ }
1591
+ constructor(kwargs) {
1592
+ if (!kwargs) {
1593
+ return;
1594
+ }
1595
+ Object.assign(this, kwargs);
1596
+ }
1597
+ toApiJson() {
1598
+ const toReturn = {};
1599
+ if (typeof this.assistant !== 'undefined' && this.assistant !== null) {
1600
+ toReturn['assistant'] = 'toApiJson' in this.assistant ? this.assistant.toApiJson() : this.assistant;
1601
+ }
1602
+ if (typeof this.pagingOptions !== 'undefined' && this.pagingOptions !== null) {
1603
+ toReturn['pagingOptions'] = 'toApiJson' in this.pagingOptions ? this.pagingOptions.toApiJson() : this.pagingOptions;
1604
+ }
1605
+ return toReturn;
1606
+ }
1607
+ }
1608
+ class ListTestRunsByAssistantResponse {
1609
+ static fromProto(proto) {
1610
+ let m = new ListTestRunsByAssistantResponse();
1611
+ m = Object.assign(m, proto);
1612
+ if (proto.testRuns) {
1613
+ m.testRuns = proto.testRuns.map(TestRun.fromProto);
1614
+ }
1615
+ if (proto.pagingMetadata) {
1616
+ m.pagingMetadata = PagedResponseMetadata.fromProto(proto.pagingMetadata);
1617
+ }
1618
+ return m;
1619
+ }
1620
+ constructor(kwargs) {
1621
+ if (!kwargs) {
1622
+ return;
1623
+ }
1624
+ Object.assign(this, kwargs);
1625
+ }
1626
+ toApiJson() {
1627
+ const toReturn = {};
1628
+ if (typeof this.testRuns !== 'undefined' && this.testRuns !== null) {
1629
+ toReturn['testRuns'] = 'toApiJson' in this.testRuns ? this.testRuns.toApiJson() : this.testRuns;
1630
+ }
1631
+ if (typeof this.pagingMetadata !== 'undefined' && this.pagingMetadata !== null) {
1632
+ toReturn['pagingMetadata'] = 'toApiJson' in this.pagingMetadata ? this.pagingMetadata.toApiJson() : this.pagingMetadata;
1633
+ }
1634
+ return toReturn;
1635
+ }
1636
+ }
1530
1637
  class RunTestsRequest {
1531
1638
  static fromProto(proto) {
1532
1639
  let m = new RunTestsRequest();
@@ -1605,6 +1712,85 @@ class TestCase {
1605
1712
  return toReturn;
1606
1713
  }
1607
1714
  }
1715
+ class TestResult {
1716
+ static fromProto(proto) {
1717
+ let m = new TestResult();
1718
+ m = Object.assign(m, proto);
1719
+ if (proto.chatHistory) {
1720
+ m.chatHistory = proto.chatHistory.map(ChatMessage.fromProto);
1721
+ }
1722
+ return m;
1723
+ }
1724
+ constructor(kwargs) {
1725
+ if (!kwargs) {
1726
+ return;
1727
+ }
1728
+ Object.assign(this, kwargs);
1729
+ }
1730
+ toApiJson() {
1731
+ const toReturn = {};
1732
+ if (typeof this.id !== 'undefined') {
1733
+ toReturn['id'] = this.id;
1734
+ }
1735
+ if (typeof this.name !== 'undefined') {
1736
+ toReturn['name'] = this.name;
1737
+ }
1738
+ if (typeof this.chatHistory !== 'undefined' && this.chatHistory !== null) {
1739
+ toReturn['chatHistory'] = 'toApiJson' in this.chatHistory ? this.chatHistory.toApiJson() : this.chatHistory;
1740
+ }
1741
+ if (typeof this.expected !== 'undefined') {
1742
+ toReturn['expected'] = this.expected;
1743
+ }
1744
+ if (typeof this.evaluation !== 'undefined') {
1745
+ toReturn['evaluation'] = this.evaluation;
1746
+ }
1747
+ if (typeof this.status !== 'undefined') {
1748
+ toReturn['status'] = this.status;
1749
+ }
1750
+ if (typeof this.score !== 'undefined') {
1751
+ toReturn['score'] = this.score;
1752
+ }
1753
+ return toReturn;
1754
+ }
1755
+ }
1756
+ class TestRun {
1757
+ static fromProto(proto) {
1758
+ let m = new TestRun();
1759
+ m = Object.assign(m, proto);
1760
+ if (proto.testResults) {
1761
+ m.testResults = proto.testResults.map(TestResult.fromProto);
1762
+ }
1763
+ if (proto.created) {
1764
+ m.created = new Date(proto.created);
1765
+ }
1766
+ return m;
1767
+ }
1768
+ constructor(kwargs) {
1769
+ if (!kwargs) {
1770
+ return;
1771
+ }
1772
+ Object.assign(this, kwargs);
1773
+ }
1774
+ toApiJson() {
1775
+ const toReturn = {};
1776
+ if (typeof this.id !== 'undefined') {
1777
+ toReturn['id'] = this.id;
1778
+ }
1779
+ if (typeof this.status !== 'undefined') {
1780
+ toReturn['status'] = this.status;
1781
+ }
1782
+ if (typeof this.testFramework !== 'undefined') {
1783
+ toReturn['testFramework'] = this.testFramework;
1784
+ }
1785
+ if (typeof this.testResults !== 'undefined' && this.testResults !== null) {
1786
+ toReturn['testResults'] = 'toApiJson' in this.testResults ? this.testResults.toApiJson() : this.testResults;
1787
+ }
1788
+ if (typeof this.created !== 'undefined' && this.created !== null) {
1789
+ toReturn['created'] = 'toApiJson' in this.created ? this.created.toApiJson() : this.created;
1790
+ }
1791
+ return toReturn;
1792
+ }
1793
+ }
1608
1794
  class UpsertTestCasesRequest {
1609
1795
  static fromProto(proto) {
1610
1796
  let m = new UpsertTestCasesRequest();
@@ -4506,6 +4692,16 @@ class IntegrationTestApiService {
4506
4692
  return this.http.post(this._host + "/ai_assistants.v1alpha1.IntegrationTestService/RunTests", request.toApiJson(), this.apiOptions())
4507
4693
  .pipe(map(resp => RunTestsResponse.fromProto(resp)));
4508
4694
  }
4695
+ listTestRunsByAssistant(r) {
4696
+ const request = (r.toApiJson) ? r : new ListTestRunsByAssistantRequest(r);
4697
+ return this.http.post(this._host + "/ai_assistants.v1alpha1.IntegrationTestService/ListTestRunsByAssistant", request.toApiJson(), this.apiOptions())
4698
+ .pipe(map(resp => ListTestRunsByAssistantResponse.fromProto(resp)));
4699
+ }
4700
+ getTestRun(r) {
4701
+ const request = (r.toApiJson) ? r : new GetTestRunRequest(r);
4702
+ return this.http.post(this._host + "/ai_assistants.v1alpha1.IntegrationTestService/GetTestRun", request.toApiJson(), this.apiOptions())
4703
+ .pipe(map(resp => GetTestRunResponse.fromProto(resp)));
4704
+ }
4509
4705
  }
4510
4706
  IntegrationTestApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: IntegrationTestApiService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
4511
4707
  IntegrationTestApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: IntegrationTestApiService, providedIn: 'root' });
@@ -4683,5 +4879,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
4683
4879
  * Generated bundle index. Do not edit.
4684
4880
  */
4685
4881
 
4686
- 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 };
4882
+ 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 };
4687
4883
  //# sourceMappingURL=vendasta-ai-assistants.mjs.map