@vendasta/ai-assistants 0.20.0 → 1.0.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/enums/answer.enum.mjs +3 -1
- package/esm2020/lib/_internal/goal.api.service.mjs +11 -2
- package/esm2020/lib/_internal/interfaces/api.interface.mjs +1 -1
- package/esm2020/lib/_internal/interfaces/assistant.interface.mjs +1 -1
- package/esm2020/lib/_internal/interfaces/index.mjs +1 -1
- package/esm2020/lib/_internal/objects/api.mjs +130 -44
- package/esm2020/lib/_internal/objects/assistant.mjs +8 -30
- package/esm2020/lib/_internal/objects/index.mjs +4 -4
- package/esm2020/lib/_internal/prompt-module.api.service.mjs +4 -3
- package/fesm2015/vendasta-ai-assistants.mjs +183 -108
- package/fesm2015/vendasta-ai-assistants.mjs.map +1 -1
- package/fesm2020/vendasta-ai-assistants.mjs +183 -108
- package/fesm2020/vendasta-ai-assistants.mjs.map +1 -1
- package/lib/_internal/enums/answer.enum.d.ts +3 -1
- package/lib/_internal/goal.api.service.d.ts +4 -2
- package/lib/_internal/interfaces/api.interface.d.ts +24 -12
- package/lib/_internal/interfaces/assistant.interface.d.ts +2 -5
- package/lib/_internal/interfaces/index.d.ts +3 -3
- package/lib/_internal/objects/api.d.ts +47 -23
- package/lib/_internal/objects/assistant.d.ts +2 -8
- package/lib/_internal/objects/index.d.ts +3 -3
- package/lib/_internal/prompt-module.api.service.d.ts +2 -2
- package/package.json +1 -1
|
@@ -94,6 +94,8 @@ var ChatChannel;
|
|
|
94
94
|
ChatChannel[ChatChannel["CHAT_CHANNEL_WEB"] = 2] = "CHAT_CHANNEL_WEB";
|
|
95
95
|
ChatChannel[ChatChannel["CHAT_CHANNEL_SMS"] = 3] = "CHAT_CHANNEL_SMS";
|
|
96
96
|
ChatChannel[ChatChannel["CHAT_CHANNEL_WHATSAPP"] = 4] = "CHAT_CHANNEL_WHATSAPP";
|
|
97
|
+
ChatChannel[ChatChannel["CHAT_CHANNEL_FACEBOOK"] = 5] = "CHAT_CHANNEL_FACEBOOK";
|
|
98
|
+
ChatChannel[ChatChannel["CHAT_CHANNEL_INSTAGRAM"] = 7] = "CHAT_CHANNEL_INSTAGRAM";
|
|
97
99
|
})(ChatChannel || (ChatChannel = {}));
|
|
98
100
|
var ChatMessageRole;
|
|
99
101
|
(function (ChatMessageRole) {
|
|
@@ -749,6 +751,36 @@ function enumStringToValue$6(enumRef, value) {
|
|
|
749
751
|
}
|
|
750
752
|
return enumRef[value];
|
|
751
753
|
}
|
|
754
|
+
class KeyValuePair {
|
|
755
|
+
static fromProto(proto) {
|
|
756
|
+
let m = new KeyValuePair();
|
|
757
|
+
m = Object.assign(m, proto);
|
|
758
|
+
return m;
|
|
759
|
+
}
|
|
760
|
+
constructor(kwargs) {
|
|
761
|
+
if (!kwargs) {
|
|
762
|
+
return;
|
|
763
|
+
}
|
|
764
|
+
Object.assign(this, kwargs);
|
|
765
|
+
}
|
|
766
|
+
toApiJson() {
|
|
767
|
+
const toReturn = {};
|
|
768
|
+
if (typeof this.key !== 'undefined') {
|
|
769
|
+
toReturn['key'] = this.key;
|
|
770
|
+
}
|
|
771
|
+
if (typeof this.value !== 'undefined') {
|
|
772
|
+
toReturn['value'] = this.value;
|
|
773
|
+
}
|
|
774
|
+
return toReturn;
|
|
775
|
+
}
|
|
776
|
+
}
|
|
777
|
+
|
|
778
|
+
function enumStringToValue$5(enumRef, value) {
|
|
779
|
+
if (typeof value === 'number') {
|
|
780
|
+
return value;
|
|
781
|
+
}
|
|
782
|
+
return enumRef[value];
|
|
783
|
+
}
|
|
752
784
|
class Assistant {
|
|
753
785
|
static fromProto(proto) {
|
|
754
786
|
let m = new Assistant();
|
|
@@ -757,7 +789,7 @@ class Assistant {
|
|
|
757
789
|
m.namespace = Namespace.fromProto(proto.namespace);
|
|
758
790
|
}
|
|
759
791
|
if (proto.type) {
|
|
760
|
-
m.type = enumStringToValue$
|
|
792
|
+
m.type = enumStringToValue$5(AssistantType, proto.type);
|
|
761
793
|
}
|
|
762
794
|
if (proto.config) {
|
|
763
795
|
m.config = Config.fromProto(proto.config);
|
|
@@ -825,29 +857,6 @@ class AssistantKey {
|
|
|
825
857
|
return toReturn;
|
|
826
858
|
}
|
|
827
859
|
}
|
|
828
|
-
class BookingConfig {
|
|
829
|
-
static fromProto(proto) {
|
|
830
|
-
let m = new BookingConfig();
|
|
831
|
-
m = Object.assign(m, proto);
|
|
832
|
-
return m;
|
|
833
|
-
}
|
|
834
|
-
constructor(kwargs) {
|
|
835
|
-
if (!kwargs) {
|
|
836
|
-
return;
|
|
837
|
-
}
|
|
838
|
-
Object.assign(this, kwargs);
|
|
839
|
-
}
|
|
840
|
-
toApiJson() {
|
|
841
|
-
const toReturn = {};
|
|
842
|
-
if (typeof this.calendarId !== 'undefined') {
|
|
843
|
-
toReturn['calendarId'] = this.calendarId;
|
|
844
|
-
}
|
|
845
|
-
if (typeof this.meetingTypeId !== 'undefined') {
|
|
846
|
-
toReturn['meetingTypeId'] = this.meetingTypeId;
|
|
847
|
-
}
|
|
848
|
-
return toReturn;
|
|
849
|
-
}
|
|
850
|
-
}
|
|
851
860
|
class Config {
|
|
852
861
|
static fromProto(proto) {
|
|
853
862
|
let m = new Config();
|
|
@@ -884,6 +893,9 @@ class ConfigurableGoal {
|
|
|
884
893
|
if (proto.goal) {
|
|
885
894
|
m.goal = Goal.fromProto(proto.goal);
|
|
886
895
|
}
|
|
896
|
+
if (proto.configuration) {
|
|
897
|
+
m.configuration = proto.configuration.map(KeyValuePair.fromProto);
|
|
898
|
+
}
|
|
887
899
|
return m;
|
|
888
900
|
}
|
|
889
901
|
constructor(kwargs) {
|
|
@@ -897,6 +909,9 @@ class ConfigurableGoal {
|
|
|
897
909
|
if (typeof this.goal !== 'undefined' && this.goal !== null) {
|
|
898
910
|
toReturn['goal'] = 'toApiJson' in this.goal ? this.goal.toApiJson() : this.goal;
|
|
899
911
|
}
|
|
912
|
+
if (typeof this.configuration !== 'undefined' && this.configuration !== null) {
|
|
913
|
+
toReturn['configuration'] = 'toApiJson' in this.configuration ? this.configuration.toApiJson() : this.configuration;
|
|
914
|
+
}
|
|
900
915
|
return toReturn;
|
|
901
916
|
}
|
|
902
917
|
}
|
|
@@ -924,9 +939,6 @@ class ConfigInboxConfig {
|
|
|
924
939
|
static fromProto(proto) {
|
|
925
940
|
let m = new ConfigInboxConfig();
|
|
926
941
|
m = Object.assign(m, proto);
|
|
927
|
-
if (proto.bookingConfig) {
|
|
928
|
-
m.bookingConfig = BookingConfig.fromProto(proto.bookingConfig);
|
|
929
|
-
}
|
|
930
942
|
return m;
|
|
931
943
|
}
|
|
932
944
|
constructor(kwargs) {
|
|
@@ -943,9 +955,6 @@ class ConfigInboxConfig {
|
|
|
943
955
|
if (typeof this.additionalInstructions !== 'undefined') {
|
|
944
956
|
toReturn['additionalInstructions'] = this.additionalInstructions;
|
|
945
957
|
}
|
|
946
|
-
if (typeof this.bookingConfig !== 'undefined' && this.bookingConfig !== null) {
|
|
947
|
-
toReturn['bookingConfig'] = 'toApiJson' in this.bookingConfig ? this.bookingConfig.toApiJson() : this.bookingConfig;
|
|
948
|
-
}
|
|
949
958
|
return toReturn;
|
|
950
959
|
}
|
|
951
960
|
}
|
|
@@ -1035,7 +1044,7 @@ class ConfigVoiceConfig {
|
|
|
1035
1044
|
let m = new ConfigVoiceConfig();
|
|
1036
1045
|
m = Object.assign(m, proto);
|
|
1037
1046
|
if (proto.vendorModel) {
|
|
1038
|
-
m.vendorModel = enumStringToValue$
|
|
1047
|
+
m.vendorModel = enumStringToValue$5(VendorModel, proto.vendorModel);
|
|
1039
1048
|
}
|
|
1040
1049
|
if (proto.modelConfig) {
|
|
1041
1050
|
m.modelConfig = ModelConfig.fromProto(proto.modelConfig);
|
|
@@ -1060,7 +1069,7 @@ class ConfigVoiceConfig {
|
|
|
1060
1069
|
}
|
|
1061
1070
|
}
|
|
1062
1071
|
|
|
1063
|
-
function enumStringToValue$
|
|
1072
|
+
function enumStringToValue$4(enumRef, value) {
|
|
1064
1073
|
if (typeof value === 'number') {
|
|
1065
1074
|
return value;
|
|
1066
1075
|
}
|
|
@@ -1077,7 +1086,7 @@ class Connection {
|
|
|
1077
1086
|
m.assistantKeys = proto.assistantKeys.map(AssistantKey.fromProto);
|
|
1078
1087
|
}
|
|
1079
1088
|
if (proto.supportedAssistantTypes) {
|
|
1080
|
-
m.supportedAssistantTypes = proto.supportedAssistantTypes.map((v) => enumStringToValue$
|
|
1089
|
+
m.supportedAssistantTypes = proto.supportedAssistantTypes.map((v) => enumStringToValue$4(AssistantType, v));
|
|
1081
1090
|
}
|
|
1082
1091
|
return m;
|
|
1083
1092
|
}
|
|
@@ -1152,36 +1161,6 @@ class ConnectionKey {
|
|
|
1152
1161
|
}
|
|
1153
1162
|
}
|
|
1154
1163
|
|
|
1155
|
-
function enumStringToValue$4(enumRef, value) {
|
|
1156
|
-
if (typeof value === 'number') {
|
|
1157
|
-
return value;
|
|
1158
|
-
}
|
|
1159
|
-
return enumRef[value];
|
|
1160
|
-
}
|
|
1161
|
-
class KeyValuePair {
|
|
1162
|
-
static fromProto(proto) {
|
|
1163
|
-
let m = new KeyValuePair();
|
|
1164
|
-
m = Object.assign(m, proto);
|
|
1165
|
-
return m;
|
|
1166
|
-
}
|
|
1167
|
-
constructor(kwargs) {
|
|
1168
|
-
if (!kwargs) {
|
|
1169
|
-
return;
|
|
1170
|
-
}
|
|
1171
|
-
Object.assign(this, kwargs);
|
|
1172
|
-
}
|
|
1173
|
-
toApiJson() {
|
|
1174
|
-
const toReturn = {};
|
|
1175
|
-
if (typeof this.key !== 'undefined') {
|
|
1176
|
-
toReturn['key'] = this.key;
|
|
1177
|
-
}
|
|
1178
|
-
if (typeof this.value !== 'undefined') {
|
|
1179
|
-
toReturn['value'] = this.value;
|
|
1180
|
-
}
|
|
1181
|
-
return toReturn;
|
|
1182
|
-
}
|
|
1183
|
-
}
|
|
1184
|
-
|
|
1185
1164
|
function enumStringToValue$3(enumRef, value) {
|
|
1186
1165
|
if (typeof value === 'number') {
|
|
1187
1166
|
return value;
|
|
@@ -1499,6 +1478,49 @@ class SetAssistantConnectionsRequestConnectionState {
|
|
|
1499
1478
|
return toReturn;
|
|
1500
1479
|
}
|
|
1501
1480
|
}
|
|
1481
|
+
class CreateGoalRequest {
|
|
1482
|
+
static fromProto(proto) {
|
|
1483
|
+
let m = new CreateGoalRequest();
|
|
1484
|
+
m = Object.assign(m, proto);
|
|
1485
|
+
if (proto.goal) {
|
|
1486
|
+
m.goal = Goal.fromProto(proto.goal);
|
|
1487
|
+
}
|
|
1488
|
+
return m;
|
|
1489
|
+
}
|
|
1490
|
+
constructor(kwargs) {
|
|
1491
|
+
if (!kwargs) {
|
|
1492
|
+
return;
|
|
1493
|
+
}
|
|
1494
|
+
Object.assign(this, kwargs);
|
|
1495
|
+
}
|
|
1496
|
+
toApiJson() {
|
|
1497
|
+
const toReturn = {};
|
|
1498
|
+
if (typeof this.goal !== 'undefined' && this.goal !== null) {
|
|
1499
|
+
toReturn['goal'] = 'toApiJson' in this.goal ? this.goal.toApiJson() : this.goal;
|
|
1500
|
+
}
|
|
1501
|
+
return toReturn;
|
|
1502
|
+
}
|
|
1503
|
+
}
|
|
1504
|
+
class CreateGoalResponse {
|
|
1505
|
+
static fromProto(proto) {
|
|
1506
|
+
let m = new CreateGoalResponse();
|
|
1507
|
+
m = Object.assign(m, proto);
|
|
1508
|
+
return m;
|
|
1509
|
+
}
|
|
1510
|
+
constructor(kwargs) {
|
|
1511
|
+
if (!kwargs) {
|
|
1512
|
+
return;
|
|
1513
|
+
}
|
|
1514
|
+
Object.assign(this, kwargs);
|
|
1515
|
+
}
|
|
1516
|
+
toApiJson() {
|
|
1517
|
+
const toReturn = {};
|
|
1518
|
+
if (typeof this.id !== 'undefined') {
|
|
1519
|
+
toReturn['id'] = this.id;
|
|
1520
|
+
}
|
|
1521
|
+
return toReturn;
|
|
1522
|
+
}
|
|
1523
|
+
}
|
|
1502
1524
|
class CreatePromptModuleRequest {
|
|
1503
1525
|
static fromProto(proto) {
|
|
1504
1526
|
let m = new CreatePromptModuleRequest();
|
|
@@ -1537,6 +1559,26 @@ class CreatePromptModuleRequest {
|
|
|
1537
1559
|
return toReturn;
|
|
1538
1560
|
}
|
|
1539
1561
|
}
|
|
1562
|
+
class CreatePromptModuleResponse {
|
|
1563
|
+
static fromProto(proto) {
|
|
1564
|
+
let m = new CreatePromptModuleResponse();
|
|
1565
|
+
m = Object.assign(m, proto);
|
|
1566
|
+
return m;
|
|
1567
|
+
}
|
|
1568
|
+
constructor(kwargs) {
|
|
1569
|
+
if (!kwargs) {
|
|
1570
|
+
return;
|
|
1571
|
+
}
|
|
1572
|
+
Object.assign(this, kwargs);
|
|
1573
|
+
}
|
|
1574
|
+
toApiJson() {
|
|
1575
|
+
const toReturn = {};
|
|
1576
|
+
if (typeof this.id !== 'undefined') {
|
|
1577
|
+
toReturn['id'] = this.id;
|
|
1578
|
+
}
|
|
1579
|
+
return toReturn;
|
|
1580
|
+
}
|
|
1581
|
+
}
|
|
1540
1582
|
class CreatePromptModuleVersionRequest {
|
|
1541
1583
|
static fromProto(proto) {
|
|
1542
1584
|
let m = new CreatePromptModuleVersionRequest();
|
|
@@ -1803,13 +1845,16 @@ class DeployPromptRequest {
|
|
|
1803
1845
|
return toReturn;
|
|
1804
1846
|
}
|
|
1805
1847
|
}
|
|
1806
|
-
class
|
|
1848
|
+
class ListConnectionsRequestFilters {
|
|
1807
1849
|
static fromProto(proto) {
|
|
1808
|
-
let m = new
|
|
1850
|
+
let m = new ListConnectionsRequestFilters();
|
|
1809
1851
|
m = Object.assign(m, proto);
|
|
1810
1852
|
if (proto.namespace) {
|
|
1811
1853
|
m.namespace = Namespace.fromProto(proto.namespace);
|
|
1812
1854
|
}
|
|
1855
|
+
if (proto.assistantType) {
|
|
1856
|
+
m.assistantType = enumStringToValue(AssistantType, proto.assistantType);
|
|
1857
|
+
}
|
|
1813
1858
|
return m;
|
|
1814
1859
|
}
|
|
1815
1860
|
constructor(kwargs) {
|
|
@@ -1823,19 +1868,19 @@ class ListPromptModuleRequestFilters {
|
|
|
1823
1868
|
if (typeof this.namespace !== 'undefined' && this.namespace !== null) {
|
|
1824
1869
|
toReturn['namespace'] = 'toApiJson' in this.namespace ? this.namespace.toApiJson() : this.namespace;
|
|
1825
1870
|
}
|
|
1871
|
+
if (typeof this.assistantType !== 'undefined') {
|
|
1872
|
+
toReturn['assistantType'] = this.assistantType;
|
|
1873
|
+
}
|
|
1826
1874
|
return toReturn;
|
|
1827
1875
|
}
|
|
1828
1876
|
}
|
|
1829
|
-
class
|
|
1877
|
+
class ListPromptModuleRequestFilters {
|
|
1830
1878
|
static fromProto(proto) {
|
|
1831
|
-
let m = new
|
|
1879
|
+
let m = new ListPromptModuleRequestFilters();
|
|
1832
1880
|
m = Object.assign(m, proto);
|
|
1833
1881
|
if (proto.namespace) {
|
|
1834
1882
|
m.namespace = Namespace.fromProto(proto.namespace);
|
|
1835
1883
|
}
|
|
1836
|
-
if (proto.assistantType) {
|
|
1837
|
-
m.assistantType = enumStringToValue(AssistantType, proto.assistantType);
|
|
1838
|
-
}
|
|
1839
1884
|
return m;
|
|
1840
1885
|
}
|
|
1841
1886
|
constructor(kwargs) {
|
|
@@ -1849,19 +1894,13 @@ class ListConnectionsRequestFilters {
|
|
|
1849
1894
|
if (typeof this.namespace !== 'undefined' && this.namespace !== null) {
|
|
1850
1895
|
toReturn['namespace'] = 'toApiJson' in this.namespace ? this.namespace.toApiJson() : this.namespace;
|
|
1851
1896
|
}
|
|
1852
|
-
if (typeof this.assistantType !== 'undefined') {
|
|
1853
|
-
toReturn['assistantType'] = this.assistantType;
|
|
1854
|
-
}
|
|
1855
1897
|
return toReturn;
|
|
1856
1898
|
}
|
|
1857
1899
|
}
|
|
1858
|
-
class
|
|
1900
|
+
class ListAllAssistantsAssociatedToConnectionRequestFilters {
|
|
1859
1901
|
static fromProto(proto) {
|
|
1860
|
-
let m = new
|
|
1902
|
+
let m = new ListAllAssistantsAssociatedToConnectionRequestFilters();
|
|
1861
1903
|
m = Object.assign(m, proto);
|
|
1862
|
-
if (proto.namespace) {
|
|
1863
|
-
m.namespace = Namespace.fromProto(proto.namespace);
|
|
1864
|
-
}
|
|
1865
1904
|
if (proto.type) {
|
|
1866
1905
|
m.type = enumStringToValue(AssistantType, proto.type);
|
|
1867
1906
|
}
|
|
@@ -1875,27 +1914,21 @@ class ListAssistantRequestFilters {
|
|
|
1875
1914
|
}
|
|
1876
1915
|
toApiJson() {
|
|
1877
1916
|
const toReturn = {};
|
|
1878
|
-
if (typeof this.namespace !== 'undefined' && this.namespace !== null) {
|
|
1879
|
-
toReturn['namespace'] = 'toApiJson' in this.namespace ? this.namespace.toApiJson() : this.namespace;
|
|
1880
|
-
}
|
|
1881
1917
|
if (typeof this.type !== 'undefined') {
|
|
1882
1918
|
toReturn['type'] = this.type;
|
|
1883
1919
|
}
|
|
1884
1920
|
return toReturn;
|
|
1885
1921
|
}
|
|
1886
1922
|
}
|
|
1887
|
-
class
|
|
1923
|
+
class ListAssistantRequestFilters {
|
|
1888
1924
|
static fromProto(proto) {
|
|
1889
|
-
let m = new
|
|
1925
|
+
let m = new ListAssistantRequestFilters();
|
|
1890
1926
|
m = Object.assign(m, proto);
|
|
1891
1927
|
if (proto.namespace) {
|
|
1892
1928
|
m.namespace = Namespace.fromProto(proto.namespace);
|
|
1893
1929
|
}
|
|
1894
1930
|
if (proto.type) {
|
|
1895
|
-
m.type = enumStringToValue(
|
|
1896
|
-
}
|
|
1897
|
-
if (proto.supportedChannels) {
|
|
1898
|
-
m.supportedChannels = proto.supportedChannels.map((v) => enumStringToValue(GoalChannel, v));
|
|
1931
|
+
m.type = enumStringToValue(AssistantType, proto.type);
|
|
1899
1932
|
}
|
|
1900
1933
|
return m;
|
|
1901
1934
|
}
|
|
@@ -1913,18 +1946,15 @@ class ListGoalsRequestFilters {
|
|
|
1913
1946
|
if (typeof this.type !== 'undefined') {
|
|
1914
1947
|
toReturn['type'] = this.type;
|
|
1915
1948
|
}
|
|
1916
|
-
if (typeof this.supportedChannels !== 'undefined') {
|
|
1917
|
-
toReturn['supportedChannels'] = this.supportedChannels;
|
|
1918
|
-
}
|
|
1919
1949
|
return toReturn;
|
|
1920
1950
|
}
|
|
1921
1951
|
}
|
|
1922
|
-
class
|
|
1952
|
+
class ListFunctionRequestFilters {
|
|
1923
1953
|
static fromProto(proto) {
|
|
1924
|
-
let m = new
|
|
1954
|
+
let m = new ListFunctionRequestFilters();
|
|
1925
1955
|
m = Object.assign(m, proto);
|
|
1926
|
-
if (proto.
|
|
1927
|
-
m.
|
|
1956
|
+
if (proto.namespace) {
|
|
1957
|
+
m.namespace = Namespace.fromProto(proto.namespace);
|
|
1928
1958
|
}
|
|
1929
1959
|
return m;
|
|
1930
1960
|
}
|
|
@@ -1936,19 +1966,25 @@ class ListAllAssistantsAssociatedToConnectionRequestFilters {
|
|
|
1936
1966
|
}
|
|
1937
1967
|
toApiJson() {
|
|
1938
1968
|
const toReturn = {};
|
|
1939
|
-
if (typeof this.
|
|
1940
|
-
toReturn['
|
|
1969
|
+
if (typeof this.namespace !== 'undefined' && this.namespace !== null) {
|
|
1970
|
+
toReturn['namespace'] = 'toApiJson' in this.namespace ? this.namespace.toApiJson() : this.namespace;
|
|
1941
1971
|
}
|
|
1942
1972
|
return toReturn;
|
|
1943
1973
|
}
|
|
1944
1974
|
}
|
|
1945
|
-
class
|
|
1975
|
+
class ListGoalsRequestFilters {
|
|
1946
1976
|
static fromProto(proto) {
|
|
1947
|
-
let m = new
|
|
1977
|
+
let m = new ListGoalsRequestFilters();
|
|
1948
1978
|
m = Object.assign(m, proto);
|
|
1949
1979
|
if (proto.namespace) {
|
|
1950
1980
|
m.namespace = Namespace.fromProto(proto.namespace);
|
|
1951
1981
|
}
|
|
1982
|
+
if (proto.type) {
|
|
1983
|
+
m.type = enumStringToValue(GoalType, proto.type);
|
|
1984
|
+
}
|
|
1985
|
+
if (proto.supportedChannels) {
|
|
1986
|
+
m.supportedChannels = proto.supportedChannels.map((v) => enumStringToValue(GoalChannel, v));
|
|
1987
|
+
}
|
|
1952
1988
|
return m;
|
|
1953
1989
|
}
|
|
1954
1990
|
constructor(kwargs) {
|
|
@@ -1962,6 +1998,12 @@ class ListFunctionRequestFilters {
|
|
|
1962
1998
|
if (typeof this.namespace !== 'undefined' && this.namespace !== null) {
|
|
1963
1999
|
toReturn['namespace'] = 'toApiJson' in this.namespace ? this.namespace.toApiJson() : this.namespace;
|
|
1964
2000
|
}
|
|
2001
|
+
if (typeof this.type !== 'undefined') {
|
|
2002
|
+
toReturn['type'] = this.type;
|
|
2003
|
+
}
|
|
2004
|
+
if (typeof this.supportedChannels !== 'undefined') {
|
|
2005
|
+
toReturn['supportedChannels'] = this.supportedChannels;
|
|
2006
|
+
}
|
|
1965
2007
|
return toReturn;
|
|
1966
2008
|
}
|
|
1967
2009
|
}
|
|
@@ -3387,9 +3429,9 @@ class ListPromptVersionsResponse {
|
|
|
3387
3429
|
return toReturn;
|
|
3388
3430
|
}
|
|
3389
3431
|
}
|
|
3390
|
-
class
|
|
3432
|
+
class CreatePromptModuleVersionRequestOptions {
|
|
3391
3433
|
static fromProto(proto) {
|
|
3392
|
-
let m = new
|
|
3434
|
+
let m = new CreatePromptModuleVersionRequestOptions();
|
|
3393
3435
|
m = Object.assign(m, proto);
|
|
3394
3436
|
return m;
|
|
3395
3437
|
}
|
|
@@ -3401,15 +3443,15 @@ class UpsertAssistantRequestOptions {
|
|
|
3401
3443
|
}
|
|
3402
3444
|
toApiJson() {
|
|
3403
3445
|
const toReturn = {};
|
|
3404
|
-
if (typeof this.
|
|
3405
|
-
toReturn['
|
|
3446
|
+
if (typeof this.shouldDeploy !== 'undefined') {
|
|
3447
|
+
toReturn['shouldDeploy'] = this.shouldDeploy;
|
|
3406
3448
|
}
|
|
3407
3449
|
return toReturn;
|
|
3408
3450
|
}
|
|
3409
3451
|
}
|
|
3410
|
-
class
|
|
3452
|
+
class UpsertAssistantRequestOptions {
|
|
3411
3453
|
static fromProto(proto) {
|
|
3412
|
-
let m = new
|
|
3454
|
+
let m = new UpsertAssistantRequestOptions();
|
|
3413
3455
|
m = Object.assign(m, proto);
|
|
3414
3456
|
return m;
|
|
3415
3457
|
}
|
|
@@ -3421,8 +3463,8 @@ class CreatePromptModuleVersionRequestOptions {
|
|
|
3421
3463
|
}
|
|
3422
3464
|
toApiJson() {
|
|
3423
3465
|
const toReturn = {};
|
|
3424
|
-
if (typeof this.
|
|
3425
|
-
toReturn['
|
|
3466
|
+
if (typeof this.applyDefaults !== 'undefined') {
|
|
3467
|
+
toReturn['applyDefaults'] = this.applyDefaults;
|
|
3426
3468
|
}
|
|
3427
3469
|
return toReturn;
|
|
3428
3470
|
}
|
|
@@ -3485,6 +3527,29 @@ class SetAssistantConnectionsRequest {
|
|
|
3485
3527
|
return toReturn;
|
|
3486
3528
|
}
|
|
3487
3529
|
}
|
|
3530
|
+
class UpdateGoalRequest {
|
|
3531
|
+
static fromProto(proto) {
|
|
3532
|
+
let m = new UpdateGoalRequest();
|
|
3533
|
+
m = Object.assign(m, proto);
|
|
3534
|
+
if (proto.goal) {
|
|
3535
|
+
m.goal = Goal.fromProto(proto.goal);
|
|
3536
|
+
}
|
|
3537
|
+
return m;
|
|
3538
|
+
}
|
|
3539
|
+
constructor(kwargs) {
|
|
3540
|
+
if (!kwargs) {
|
|
3541
|
+
return;
|
|
3542
|
+
}
|
|
3543
|
+
Object.assign(this, kwargs);
|
|
3544
|
+
}
|
|
3545
|
+
toApiJson() {
|
|
3546
|
+
const toReturn = {};
|
|
3547
|
+
if (typeof this.goal !== 'undefined' && this.goal !== null) {
|
|
3548
|
+
toReturn['goal'] = 'toApiJson' in this.goal ? this.goal.toApiJson() : this.goal;
|
|
3549
|
+
}
|
|
3550
|
+
return toReturn;
|
|
3551
|
+
}
|
|
3552
|
+
}
|
|
3488
3553
|
class UpdatePromptModuleRequest {
|
|
3489
3554
|
static fromProto(proto) {
|
|
3490
3555
|
let m = new UpdatePromptModuleRequest();
|
|
@@ -3864,6 +3929,15 @@ class GoalApiService {
|
|
|
3864
3929
|
const request = (r.toApiJson) ? r : new UpsertGoalRequest(r);
|
|
3865
3930
|
return this.http.post(this._host + "/ai_assistants.v1alpha1.GoalService/Upsert", request.toApiJson(), { ...this.apiOptions(), observe: 'response' });
|
|
3866
3931
|
}
|
|
3932
|
+
create(r) {
|
|
3933
|
+
const request = (r.toApiJson) ? r : new CreateGoalRequest(r);
|
|
3934
|
+
return this.http.post(this._host + "/ai_assistants.v1alpha1.GoalService/Create", request.toApiJson(), this.apiOptions())
|
|
3935
|
+
.pipe(map(resp => CreateGoalResponse.fromProto(resp)));
|
|
3936
|
+
}
|
|
3937
|
+
update(r) {
|
|
3938
|
+
const request = (r.toApiJson) ? r : new UpdateGoalRequest(r);
|
|
3939
|
+
return this.http.post(this._host + "/ai_assistants.v1alpha1.GoalService/Update", request.toApiJson(), { ...this.apiOptions(), observe: 'response' });
|
|
3940
|
+
}
|
|
3867
3941
|
get(r) {
|
|
3868
3942
|
const request = (r.toApiJson) ? r : new GetGoalRequest(r);
|
|
3869
3943
|
return this.http.post(this._host + "/ai_assistants.v1alpha1.GoalService/Get", request.toApiJson(), this.apiOptions())
|
|
@@ -3918,7 +3992,8 @@ class PromptModuleApiService {
|
|
|
3918
3992
|
}
|
|
3919
3993
|
create(r) {
|
|
3920
3994
|
const request = (r.toApiJson) ? r : new CreatePromptModuleRequest(r);
|
|
3921
|
-
return this.http.post(this._host + "/ai_assistants.v1alpha1.PromptModuleService/Create", request.toApiJson(),
|
|
3995
|
+
return this.http.post(this._host + "/ai_assistants.v1alpha1.PromptModuleService/Create", request.toApiJson(), this.apiOptions())
|
|
3996
|
+
.pipe(map(resp => CreatePromptModuleResponse.fromProto(resp)));
|
|
3922
3997
|
}
|
|
3923
3998
|
createVersion(r) {
|
|
3924
3999
|
const request = (r.toApiJson) ? r : new CreatePromptModuleVersionRequest(r);
|
|
@@ -4064,5 +4139,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
4064
4139
|
* Generated bundle index. Do not edit.
|
|
4065
4140
|
*/
|
|
4066
4141
|
|
|
4067
|
-
export { Access, Assistant, AssistantApiService, AssistantKey, AssistantType,
|
|
4142
|
+
export { Access, Assistant, AssistantApiService, AssistantKey, AssistantType, BuildDefaultAssistantRequest, BuildDefaultAssistantResponse, ChatAnswerFunctionExecutionJob, ChatAnswerFunctionExecutionJobResult, ChatAnswerFunctionExecutionJobStatus, ChatChannel, ChatMessage, ChatMessageRole, ChatUserInfo, Config, ConfigInboxConfig, ConfigVoiceConfig, ConfigurableGoal, Connection, ConnectionApiService, ConnectionKey, CreateGoalRequest, CreateGoalResponse, CreatePromptModuleRequest, CreatePromptModuleResponse, CreatePromptModuleVersionRequest, CreatePromptModuleVersionRequestOptions, CreatePromptRequest, DeepgramConfig, DeleteAssistantRequest, DeleteConnectionRequest, DeleteFunctionRequest, DeleteGoalRequest, DeletePromptModuleRequest, DeletePromptRequest, DeployPromptModuleRequest, DeployPromptRequest, Function, FunctionApiService, FunctionHeader, FunctionKey, FunctionParameter, 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, 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, ModelConfig, Namespace, NamespaceAccountGroupNamespace, NamespaceAccountGroupsForGroupNamespace, NamespaceAccountGroupsForPartnerNamespace, NamespaceGlobalNamespace, NamespacePartnerNamespace, NamespaceSystemNamespace, OpenAIRealtimeConfig, OpenAIRealtimeConfigTurnDetection, PagedRequestOptions, PagedResponseMetadata, Prompt, PromptApiService, PromptModule, PromptModuleApiService, PromptModuleKey, PromptModuleVersion, PromptVersion, SetAssistantConnectionsRequest, SetAssistantConnectionsRequestConnectionState, UpdateGoalRequest, UpdatePromptModuleRequest, UpdatePromptRequest, UpsertAssistantRequest, UpsertAssistantRequestOptions, UpsertAssistantResponse, UpsertConnectionRequest, UpsertFunctionRequest, UpsertGoalRequest, VendorModel };
|
|
4068
4143
|
//# sourceMappingURL=vendasta-ai-assistants.mjs.map
|