@vendasta/ai-assistants 0.2.0 → 0.3.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.
@@ -1086,6 +1086,55 @@ class GetConnectionResponse {
1086
1086
  return toReturn;
1087
1087
  }
1088
1088
  }
1089
+ class GetDeployedPromptVersionRequest {
1090
+ static fromProto(proto) {
1091
+ let m = new GetDeployedPromptVersionRequest();
1092
+ m = Object.assign(m, proto);
1093
+ return m;
1094
+ }
1095
+ constructor(kwargs) {
1096
+ if (!kwargs) {
1097
+ return;
1098
+ }
1099
+ Object.assign(this, kwargs);
1100
+ }
1101
+ toApiJson() {
1102
+ const toReturn = {};
1103
+ if (typeof this.id !== 'undefined') {
1104
+ toReturn['id'] = this.id;
1105
+ }
1106
+ return toReturn;
1107
+ }
1108
+ }
1109
+ class GetDeployedPromptVersionResponse {
1110
+ static fromProto(proto) {
1111
+ let m = new GetDeployedPromptVersionResponse();
1112
+ m = Object.assign(m, proto);
1113
+ if (proto.prompt) {
1114
+ m.prompt = Prompt.fromProto(proto.prompt);
1115
+ }
1116
+ if (proto.deployedPromptVersion) {
1117
+ m.deployedPromptVersion = PromptVersion.fromProto(proto.deployedPromptVersion);
1118
+ }
1119
+ return m;
1120
+ }
1121
+ constructor(kwargs) {
1122
+ if (!kwargs) {
1123
+ return;
1124
+ }
1125
+ Object.assign(this, kwargs);
1126
+ }
1127
+ toApiJson() {
1128
+ const toReturn = {};
1129
+ if (typeof this.prompt !== 'undefined' && this.prompt !== null) {
1130
+ toReturn['prompt'] = 'toApiJson' in this.prompt ? this.prompt.toApiJson() : this.prompt;
1131
+ }
1132
+ if (typeof this.deployedPromptVersion !== 'undefined' && this.deployedPromptVersion !== null) {
1133
+ toReturn['deployedPromptVersion'] = 'toApiJson' in this.deployedPromptVersion ? this.deployedPromptVersion.toApiJson() : this.deployedPromptVersion;
1134
+ }
1135
+ return toReturn;
1136
+ }
1137
+ }
1089
1138
  class GetPromptRequest {
1090
1139
  static fromProto(proto) {
1091
1140
  let m = new GetPromptRequest();
@@ -1667,6 +1716,11 @@ class PromptApiService {
1667
1716
  return this.http.post(this._host + "/ai_assistants.v1alpha1.PromptService/GetVersion", request.toApiJson(), this.apiOptions())
1668
1717
  .pipe(map(resp => GetPromptVersionResponse.fromProto(resp)));
1669
1718
  }
1719
+ getDeployedVersion(r) {
1720
+ const request = (r.toApiJson) ? r : new GetDeployedPromptVersionRequest(r);
1721
+ return this.http.post(this._host + "/ai_assistants.v1alpha1.PromptService/GetDeployedVersion", request.toApiJson(), this.apiOptions())
1722
+ .pipe(map(resp => GetDeployedPromptVersionResponse.fromProto(resp)));
1723
+ }
1670
1724
  update(r) {
1671
1725
  const request = (r.toApiJson) ? r : new UpdatePromptRequest(r);
1672
1726
  return this.http.post(this._host + "/ai_assistants.v1alpha1.PromptService/Update", request.toApiJson(), { ...this.apiOptions(), observe: 'response' });
@@ -1708,5 +1762,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
1708
1762
  * Generated bundle index. Do not edit.
1709
1763
  */
1710
1764
 
1711
- export { Access, Assistant, AssistantApiService, AssistantType, ChatAnswerFunctionExecutionJob, ChatAnswerFunctionExecutionJobResult, ChatAnswerFunctionExecutionJobStatus, ChatChannel, ChatMessage, ChatMessageRole, ChatUserInfo, Config, ConfigInboxConfig, Connection, ConnectionApiService, ConnectionKey, CreatePromptRequest, DeleteAssistantRequest, DeleteConnectionRequest, DeletePromptRequest, DeployPromptRequest, GenerateChatAnswerRequest, GenerateChatAnswerRequestOptions, GenerateChatAnswerResponse, GetAssistantRequest, GetAssistantResponse, GetChatAnswerFunctionExecutionJobRequest, GetChatAnswerFunctionExecutionJobResponse, GetConnectionRequest, GetConnectionResponse, GetPromptRequest, GetPromptResponse, GetPromptVersionRequest, GetPromptVersionResponse, HostService, KeyValuePair, ListAssistantRequest, ListAssistantRequestFilters, ListAssistantResponse, ListConnectionsRequest, ListConnectionsRequestFilters, ListConnectionsResponse, ListPromptRequest, ListPromptResponse, ListPromptVersionsRequest, ListPromptVersionsResponse, Namespace, NamespaceAccountGroupNamespace, NamespacePartnerNamespace, NamespaceSystemNamespace, PagedRequestOptions, PagedResponseMetadata, Prompt, PromptApiService, PromptVersion, UpdatePromptRequest, UpsertAssistantRequest, UpsertAssistantResponse, UpsertConnectionRequest };
1765
+ export { Access, Assistant, AssistantApiService, AssistantType, ChatAnswerFunctionExecutionJob, ChatAnswerFunctionExecutionJobResult, ChatAnswerFunctionExecutionJobStatus, ChatChannel, ChatMessage, ChatMessageRole, ChatUserInfo, Config, ConfigInboxConfig, Connection, ConnectionApiService, ConnectionKey, CreatePromptRequest, DeleteAssistantRequest, DeleteConnectionRequest, DeletePromptRequest, DeployPromptRequest, GenerateChatAnswerRequest, GenerateChatAnswerRequestOptions, GenerateChatAnswerResponse, GetAssistantRequest, GetAssistantResponse, GetChatAnswerFunctionExecutionJobRequest, GetChatAnswerFunctionExecutionJobResponse, GetConnectionRequest, GetConnectionResponse, GetDeployedPromptVersionRequest, GetDeployedPromptVersionResponse, GetPromptRequest, GetPromptResponse, GetPromptVersionRequest, GetPromptVersionResponse, HostService, KeyValuePair, ListAssistantRequest, ListAssistantRequestFilters, ListAssistantResponse, ListConnectionsRequest, ListConnectionsRequestFilters, ListConnectionsResponse, ListPromptRequest, ListPromptResponse, ListPromptVersionsRequest, ListPromptVersionsResponse, Namespace, NamespaceAccountGroupNamespace, NamespacePartnerNamespace, NamespaceSystemNamespace, PagedRequestOptions, PagedResponseMetadata, Prompt, PromptApiService, PromptVersion, UpdatePromptRequest, UpsertAssistantRequest, UpsertAssistantResponse, UpsertConnectionRequest };
1712
1766
  //# sourceMappingURL=vendasta-ai-assistants.mjs.map