@vendasta/ai-assistants 0.5.0 → 0.6.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/assistant.api.service.mjs +6 -2
- 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 +69 -14
- package/esm2020/lib/_internal/objects/index.mjs +2 -2
- package/fesm2015/vendasta-ai-assistants.mjs +72 -13
- package/fesm2015/vendasta-ai-assistants.mjs.map +1 -1
- package/fesm2020/vendasta-ai-assistants.mjs +72 -13
- package/fesm2020/vendasta-ai-assistants.mjs.map +1 -1
- package/lib/_internal/assistant.api.service.d.ts +3 -2
- package/lib/_internal/interfaces/api.interface.d.ts +12 -4
- package/lib/_internal/interfaces/index.d.ts +1 -1
- package/lib/_internal/objects/api.d.ts +21 -7
- package/lib/_internal/objects/index.d.ts +1 -1
- package/package.json +1 -1
|
@@ -725,6 +725,32 @@ function enumStringToValue(enumRef, value) {
|
|
|
725
725
|
}
|
|
726
726
|
return enumRef[value];
|
|
727
727
|
}
|
|
728
|
+
class SetAssistantConnectionsRequestConnectionState {
|
|
729
|
+
static fromProto(proto) {
|
|
730
|
+
let m = new SetAssistantConnectionsRequestConnectionState();
|
|
731
|
+
m = Object.assign(m, proto);
|
|
732
|
+
if (proto.connectionKey) {
|
|
733
|
+
m.connectionKey = ConnectionKey.fromProto(proto.connectionKey);
|
|
734
|
+
}
|
|
735
|
+
return m;
|
|
736
|
+
}
|
|
737
|
+
constructor(kwargs) {
|
|
738
|
+
if (!kwargs) {
|
|
739
|
+
return;
|
|
740
|
+
}
|
|
741
|
+
Object.assign(this, kwargs);
|
|
742
|
+
}
|
|
743
|
+
toApiJson() {
|
|
744
|
+
const toReturn = {};
|
|
745
|
+
if (typeof this.connectionKey !== 'undefined' && this.connectionKey !== null) {
|
|
746
|
+
toReturn['connectionKey'] = 'toApiJson' in this.connectionKey ? this.connectionKey.toApiJson() : this.connectionKey;
|
|
747
|
+
}
|
|
748
|
+
if (typeof this.isAssociated !== 'undefined') {
|
|
749
|
+
toReturn['isAssociated'] = this.isAssociated;
|
|
750
|
+
}
|
|
751
|
+
return toReturn;
|
|
752
|
+
}
|
|
753
|
+
}
|
|
728
754
|
class CreatePromptRequest {
|
|
729
755
|
static fromProto(proto) {
|
|
730
756
|
let m = new CreatePromptRequest();
|
|
@@ -875,12 +901,12 @@ class ListAssistantRequestFilters {
|
|
|
875
901
|
return toReturn;
|
|
876
902
|
}
|
|
877
903
|
}
|
|
878
|
-
class
|
|
904
|
+
class ListConnectionsRequestFilters {
|
|
879
905
|
static fromProto(proto) {
|
|
880
|
-
let m = new
|
|
906
|
+
let m = new ListConnectionsRequestFilters();
|
|
881
907
|
m = Object.assign(m, proto);
|
|
882
|
-
if (proto.
|
|
883
|
-
m.
|
|
908
|
+
if (proto.namespace) {
|
|
909
|
+
m.namespace = Namespace.fromProto(proto.namespace);
|
|
884
910
|
}
|
|
885
911
|
return m;
|
|
886
912
|
}
|
|
@@ -892,18 +918,18 @@ class ListAllAssistantsAssociatedToConnectionRequestFilters {
|
|
|
892
918
|
}
|
|
893
919
|
toApiJson() {
|
|
894
920
|
const toReturn = {};
|
|
895
|
-
if (typeof this.
|
|
896
|
-
toReturn['
|
|
921
|
+
if (typeof this.namespace !== 'undefined' && this.namespace !== null) {
|
|
922
|
+
toReturn['namespace'] = 'toApiJson' in this.namespace ? this.namespace.toApiJson() : this.namespace;
|
|
897
923
|
}
|
|
898
924
|
return toReturn;
|
|
899
925
|
}
|
|
900
926
|
}
|
|
901
|
-
class
|
|
927
|
+
class ListAllAssistantsAssociatedToConnectionRequestFilters {
|
|
902
928
|
static fromProto(proto) {
|
|
903
|
-
let m = new
|
|
929
|
+
let m = new ListAllAssistantsAssociatedToConnectionRequestFilters();
|
|
904
930
|
m = Object.assign(m, proto);
|
|
905
|
-
if (proto.
|
|
906
|
-
m.
|
|
931
|
+
if (proto.type) {
|
|
932
|
+
m.type = enumStringToValue(AssistantType, proto.type);
|
|
907
933
|
}
|
|
908
934
|
return m;
|
|
909
935
|
}
|
|
@@ -915,8 +941,8 @@ class ListConnectionsRequestFilters {
|
|
|
915
941
|
}
|
|
916
942
|
toApiJson() {
|
|
917
943
|
const toReturn = {};
|
|
918
|
-
if (typeof this.
|
|
919
|
-
toReturn['
|
|
944
|
+
if (typeof this.type !== 'undefined') {
|
|
945
|
+
toReturn['type'] = this.type;
|
|
920
946
|
}
|
|
921
947
|
return toReturn;
|
|
922
948
|
}
|
|
@@ -1638,6 +1664,35 @@ class GenerateChatAnswerRequestOptions {
|
|
|
1638
1664
|
return toReturn;
|
|
1639
1665
|
}
|
|
1640
1666
|
}
|
|
1667
|
+
class SetAssistantConnectionsRequest {
|
|
1668
|
+
static fromProto(proto) {
|
|
1669
|
+
let m = new SetAssistantConnectionsRequest();
|
|
1670
|
+
m = Object.assign(m, proto);
|
|
1671
|
+
if (proto.associationStates) {
|
|
1672
|
+
m.associationStates = proto.associationStates.map(SetAssistantConnectionsRequestConnectionState.fromProto);
|
|
1673
|
+
}
|
|
1674
|
+
if (proto.assistantKey) {
|
|
1675
|
+
m.assistantKey = AssistantKey.fromProto(proto.assistantKey);
|
|
1676
|
+
}
|
|
1677
|
+
return m;
|
|
1678
|
+
}
|
|
1679
|
+
constructor(kwargs) {
|
|
1680
|
+
if (!kwargs) {
|
|
1681
|
+
return;
|
|
1682
|
+
}
|
|
1683
|
+
Object.assign(this, kwargs);
|
|
1684
|
+
}
|
|
1685
|
+
toApiJson() {
|
|
1686
|
+
const toReturn = {};
|
|
1687
|
+
if (typeof this.associationStates !== 'undefined' && this.associationStates !== null) {
|
|
1688
|
+
toReturn['associationStates'] = 'toApiJson' in this.associationStates ? this.associationStates.toApiJson() : this.associationStates;
|
|
1689
|
+
}
|
|
1690
|
+
if (typeof this.assistantKey !== 'undefined' && this.assistantKey !== null) {
|
|
1691
|
+
toReturn['assistantKey'] = 'toApiJson' in this.assistantKey ? this.assistantKey.toApiJson() : this.assistantKey;
|
|
1692
|
+
}
|
|
1693
|
+
return toReturn;
|
|
1694
|
+
}
|
|
1695
|
+
}
|
|
1641
1696
|
class UpdatePromptRequest {
|
|
1642
1697
|
static fromProto(proto) {
|
|
1643
1698
|
let m = new UpdatePromptRequest();
|
|
@@ -1792,6 +1847,10 @@ class AssistantApiService {
|
|
|
1792
1847
|
return this.http.post(this._host + "/ai_assistants.v1alpha1.AssistantService/GetChatAnswerFunctionExecutionJob", request.toApiJson(), this.apiOptions())
|
|
1793
1848
|
.pipe(map(resp => GetChatAnswerFunctionExecutionJobResponse.fromProto(resp)));
|
|
1794
1849
|
}
|
|
1850
|
+
setAssistantConnections(r) {
|
|
1851
|
+
const request = (r.toApiJson) ? r : new SetAssistantConnectionsRequest(r);
|
|
1852
|
+
return this.http.post(this._host + "/ai_assistants.v1alpha1.AssistantService/SetAssistantConnections", request.toApiJson(), { ...this.apiOptions(), observe: 'response' });
|
|
1853
|
+
}
|
|
1795
1854
|
}
|
|
1796
1855
|
AssistantApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AssistantApiService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1797
1856
|
AssistantApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AssistantApiService, providedIn: 'root' });
|
|
@@ -1931,5 +1990,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
1931
1990
|
* Generated bundle index. Do not edit.
|
|
1932
1991
|
*/
|
|
1933
1992
|
|
|
1934
|
-
export { Access, Assistant, AssistantApiService, AssistantKey, 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, GetMultiDeployedPromptVersionRequest, GetMultiDeployedPromptVersionResponse, GetPromptRequest, GetPromptResponse, GetPromptVersionRequest, GetPromptVersionResponse, HostService, KeyValuePair, ListAllAssistantsAssociatedToConnectionRequest, ListAllAssistantsAssociatedToConnectionRequestFilters, ListAllAssistantsAssociatedToConnectionResponse, ListAssistantRequest, ListAssistantRequestFilters, ListAssistantResponse, ListConnectionsRequest, ListConnectionsRequestFilters, ListConnectionsResponse, ListPromptRequest, ListPromptResponse, ListPromptVersionsRequest, ListPromptVersionsResponse, Namespace, NamespaceAccountGroupNamespace, NamespacePartnerNamespace, NamespaceSystemNamespace, PagedRequestOptions, PagedResponseMetadata, Prompt, PromptApiService, PromptVersion, UpdatePromptRequest, UpsertAssistantRequest, UpsertAssistantResponse, UpsertConnectionRequest };
|
|
1993
|
+
export { Access, Assistant, AssistantApiService, AssistantKey, 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, GetMultiDeployedPromptVersionRequest, GetMultiDeployedPromptVersionResponse, GetPromptRequest, GetPromptResponse, GetPromptVersionRequest, GetPromptVersionResponse, HostService, KeyValuePair, ListAllAssistantsAssociatedToConnectionRequest, ListAllAssistantsAssociatedToConnectionRequestFilters, ListAllAssistantsAssociatedToConnectionResponse, ListAssistantRequest, ListAssistantRequestFilters, ListAssistantResponse, ListConnectionsRequest, ListConnectionsRequestFilters, ListConnectionsResponse, ListPromptRequest, ListPromptResponse, ListPromptVersionsRequest, ListPromptVersionsResponse, Namespace, NamespaceAccountGroupNamespace, NamespacePartnerNamespace, NamespaceSystemNamespace, PagedRequestOptions, PagedResponseMetadata, Prompt, PromptApiService, PromptVersion, SetAssistantConnectionsRequest, SetAssistantConnectionsRequestConnectionState, UpdatePromptRequest, UpsertAssistantRequest, UpsertAssistantResponse, UpsertConnectionRequest };
|
|
1935
1994
|
//# sourceMappingURL=vendasta-ai-assistants.mjs.map
|