@vendasta/ai-assistants 0.4.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/connection.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/connection.mjs +4 -1
- package/esm2020/lib/_internal/objects/index.mjs +2 -2
- package/fesm2015/vendasta-ai-assistants.mjs +75 -13
- package/fesm2015/vendasta-ai-assistants.mjs.map +1 -1
- package/fesm2020/vendasta-ai-assistants.mjs +75 -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/connection.interface.d.ts +1 -0
- package/lib/_internal/interfaces/index.d.ts +1 -1
- package/lib/_internal/objects/api.d.ts +21 -7
- package/lib/_internal/objects/connection.d.ts +1 -0
- package/lib/_internal/objects/index.d.ts +1 -1
- package/package.json +1 -1
|
@@ -349,6 +349,9 @@ class Connection {
|
|
|
349
349
|
if (typeof this.iconUrl !== 'undefined') {
|
|
350
350
|
toReturn['iconUrl'] = this.iconUrl;
|
|
351
351
|
}
|
|
352
|
+
if (typeof this.isConnectionLocked !== 'undefined') {
|
|
353
|
+
toReturn['isConnectionLocked'] = this.isConnectionLocked;
|
|
354
|
+
}
|
|
352
355
|
return toReturn;
|
|
353
356
|
}
|
|
354
357
|
}
|
|
@@ -722,6 +725,32 @@ function enumStringToValue(enumRef, value) {
|
|
|
722
725
|
}
|
|
723
726
|
return enumRef[value];
|
|
724
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
|
+
}
|
|
725
754
|
class CreatePromptRequest {
|
|
726
755
|
static fromProto(proto) {
|
|
727
756
|
let m = new CreatePromptRequest();
|
|
@@ -872,12 +901,12 @@ class ListAssistantRequestFilters {
|
|
|
872
901
|
return toReturn;
|
|
873
902
|
}
|
|
874
903
|
}
|
|
875
|
-
class
|
|
904
|
+
class ListConnectionsRequestFilters {
|
|
876
905
|
static fromProto(proto) {
|
|
877
|
-
let m = new
|
|
906
|
+
let m = new ListConnectionsRequestFilters();
|
|
878
907
|
m = Object.assign(m, proto);
|
|
879
|
-
if (proto.
|
|
880
|
-
m.
|
|
908
|
+
if (proto.namespace) {
|
|
909
|
+
m.namespace = Namespace.fromProto(proto.namespace);
|
|
881
910
|
}
|
|
882
911
|
return m;
|
|
883
912
|
}
|
|
@@ -889,18 +918,18 @@ class ListAllAssistantsAssociatedToConnectionRequestFilters {
|
|
|
889
918
|
}
|
|
890
919
|
toApiJson() {
|
|
891
920
|
const toReturn = {};
|
|
892
|
-
if (typeof this.
|
|
893
|
-
toReturn['
|
|
921
|
+
if (typeof this.namespace !== 'undefined' && this.namespace !== null) {
|
|
922
|
+
toReturn['namespace'] = 'toApiJson' in this.namespace ? this.namespace.toApiJson() : this.namespace;
|
|
894
923
|
}
|
|
895
924
|
return toReturn;
|
|
896
925
|
}
|
|
897
926
|
}
|
|
898
|
-
class
|
|
927
|
+
class ListAllAssistantsAssociatedToConnectionRequestFilters {
|
|
899
928
|
static fromProto(proto) {
|
|
900
|
-
let m = new
|
|
929
|
+
let m = new ListAllAssistantsAssociatedToConnectionRequestFilters();
|
|
901
930
|
m = Object.assign(m, proto);
|
|
902
|
-
if (proto.
|
|
903
|
-
m.
|
|
931
|
+
if (proto.type) {
|
|
932
|
+
m.type = enumStringToValue(AssistantType, proto.type);
|
|
904
933
|
}
|
|
905
934
|
return m;
|
|
906
935
|
}
|
|
@@ -912,8 +941,8 @@ class ListConnectionsRequestFilters {
|
|
|
912
941
|
}
|
|
913
942
|
toApiJson() {
|
|
914
943
|
const toReturn = {};
|
|
915
|
-
if (typeof this.
|
|
916
|
-
toReturn['
|
|
944
|
+
if (typeof this.type !== 'undefined') {
|
|
945
|
+
toReturn['type'] = this.type;
|
|
917
946
|
}
|
|
918
947
|
return toReturn;
|
|
919
948
|
}
|
|
@@ -1635,6 +1664,35 @@ class GenerateChatAnswerRequestOptions {
|
|
|
1635
1664
|
return toReturn;
|
|
1636
1665
|
}
|
|
1637
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
|
+
}
|
|
1638
1696
|
class UpdatePromptRequest {
|
|
1639
1697
|
static fromProto(proto) {
|
|
1640
1698
|
let m = new UpdatePromptRequest();
|
|
@@ -1789,6 +1847,10 @@ class AssistantApiService {
|
|
|
1789
1847
|
return this.http.post(this._host + "/ai_assistants.v1alpha1.AssistantService/GetChatAnswerFunctionExecutionJob", request.toApiJson(), this.apiOptions())
|
|
1790
1848
|
.pipe(map(resp => GetChatAnswerFunctionExecutionJobResponse.fromProto(resp)));
|
|
1791
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
|
+
}
|
|
1792
1854
|
}
|
|
1793
1855
|
AssistantApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AssistantApiService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1794
1856
|
AssistantApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AssistantApiService, providedIn: 'root' });
|
|
@@ -1928,5 +1990,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
1928
1990
|
* Generated bundle index. Do not edit.
|
|
1929
1991
|
*/
|
|
1930
1992
|
|
|
1931
|
-
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 };
|
|
1932
1994
|
//# sourceMappingURL=vendasta-ai-assistants.mjs.map
|