@vendasta/ai-assistants 0.1.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.
- package/esm2020/lib/_internal/interfaces/api.interface.mjs +1 -1
- package/esm2020/lib/_internal/interfaces/index.mjs +1 -1
- package/esm2020/lib/_internal/objects/api.mjs +56 -1
- package/esm2020/lib/_internal/objects/index.mjs +2 -2
- package/esm2020/lib/_internal/prompt.api.service.mjs +7 -2
- package/fesm2015/vendasta-ai-assistants.mjs +61 -1
- package/fesm2015/vendasta-ai-assistants.mjs.map +1 -1
- package/fesm2020/vendasta-ai-assistants.mjs +61 -1
- package/fesm2020/vendasta-ai-assistants.mjs.map +1 -1
- package/lib/_internal/interfaces/api.interface.d.ts +8 -0
- package/lib/_internal/interfaces/index.d.ts +1 -1
- package/lib/_internal/objects/api.d.ts +14 -0
- package/lib/_internal/objects/index.d.ts +1 -1
- package/lib/_internal/prompt.api.service.d.ts +3 -2
- package/package.json +1 -1
|
@@ -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();
|
|
@@ -1324,6 +1373,9 @@ class ListPromptResponse {
|
|
|
1324
1373
|
if (proto.prompts) {
|
|
1325
1374
|
m.prompts = proto.prompts.map(Prompt.fromProto);
|
|
1326
1375
|
}
|
|
1376
|
+
if (proto.deployedPromptVersions) {
|
|
1377
|
+
m.deployedPromptVersions = proto.deployedPromptVersions.map(PromptVersion.fromProto);
|
|
1378
|
+
}
|
|
1327
1379
|
if (proto.metadata) {
|
|
1328
1380
|
m.metadata = PagedResponseMetadata.fromProto(proto.metadata);
|
|
1329
1381
|
}
|
|
@@ -1340,6 +1392,9 @@ class ListPromptResponse {
|
|
|
1340
1392
|
if (typeof this.prompts !== 'undefined' && this.prompts !== null) {
|
|
1341
1393
|
toReturn['prompts'] = 'toApiJson' in this.prompts ? this.prompts.toApiJson() : this.prompts;
|
|
1342
1394
|
}
|
|
1395
|
+
if (typeof this.deployedPromptVersions !== 'undefined' && this.deployedPromptVersions !== null) {
|
|
1396
|
+
toReturn['deployedPromptVersions'] = 'toApiJson' in this.deployedPromptVersions ? this.deployedPromptVersions.toApiJson() : this.deployedPromptVersions;
|
|
1397
|
+
}
|
|
1343
1398
|
if (typeof this.metadata !== 'undefined' && this.metadata !== null) {
|
|
1344
1399
|
toReturn['metadata'] = 'toApiJson' in this.metadata ? this.metadata.toApiJson() : this.metadata;
|
|
1345
1400
|
}
|
|
@@ -1661,6 +1716,11 @@ class PromptApiService {
|
|
|
1661
1716
|
return this.http.post(this._host + "/ai_assistants.v1alpha1.PromptService/GetVersion", request.toApiJson(), this.apiOptions())
|
|
1662
1717
|
.pipe(map(resp => GetPromptVersionResponse.fromProto(resp)));
|
|
1663
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
|
+
}
|
|
1664
1724
|
update(r) {
|
|
1665
1725
|
const request = (r.toApiJson) ? r : new UpdatePromptRequest(r);
|
|
1666
1726
|
return this.http.post(this._host + "/ai_assistants.v1alpha1.PromptService/Update", request.toApiJson(), { ...this.apiOptions(), observe: 'response' });
|
|
@@ -1702,5 +1762,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
1702
1762
|
* Generated bundle index. Do not edit.
|
|
1703
1763
|
*/
|
|
1704
1764
|
|
|
1705
|
-
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 };
|
|
1706
1766
|
//# sourceMappingURL=vendasta-ai-assistants.mjs.map
|