@vendasta/ai-assistants 0.29.0 → 0.30.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 +11 -2
- package/esm2020/lib/_internal/interfaces/answer.interface.mjs +1 -1
- package/esm2020/lib/_internal/interfaces/api.interface.mjs +1 -1
- package/esm2020/lib/_internal/interfaces/field-mask.interface.mjs +8 -0
- package/esm2020/lib/_internal/interfaces/index.mjs +1 -1
- package/esm2020/lib/_internal/objects/answer.mjs +4 -1
- package/esm2020/lib/_internal/objects/api.mjs +129 -27
- package/esm2020/lib/_internal/objects/field-mask.mjs +27 -0
- package/esm2020/lib/_internal/objects/index.mjs +3 -2
- package/fesm2015/vendasta-ai-assistants.mjs +185 -45
- package/fesm2015/vendasta-ai-assistants.mjs.map +1 -1
- package/fesm2020/vendasta-ai-assistants.mjs +185 -45
- package/fesm2020/vendasta-ai-assistants.mjs.map +1 -1
- package/lib/_internal/assistant.api.service.d.ts +4 -2
- package/lib/_internal/interfaces/answer.interface.d.ts +1 -0
- package/lib/_internal/interfaces/api.interface.d.ts +25 -10
- package/lib/_internal/interfaces/field-mask.interface.d.ts +3 -0
- package/lib/_internal/interfaces/index.d.ts +2 -1
- package/lib/_internal/objects/answer.d.ts +1 -0
- package/lib/_internal/objects/api.d.ts +41 -14
- package/lib/_internal/objects/field-mask.d.ts +8 -0
- package/lib/_internal/objects/index.d.ts +2 -1
- package/package.json +1 -1
|
@@ -127,7 +127,7 @@ var ChatMessageRole;
|
|
|
127
127
|
// Enums Index.
|
|
128
128
|
// *********************************
|
|
129
129
|
|
|
130
|
-
function enumStringToValue$
|
|
130
|
+
function enumStringToValue$b(enumRef, value) {
|
|
131
131
|
if (typeof value === 'number') {
|
|
132
132
|
return value;
|
|
133
133
|
}
|
|
@@ -301,7 +301,7 @@ class NamespaceSystemNamespace {
|
|
|
301
301
|
}
|
|
302
302
|
}
|
|
303
303
|
|
|
304
|
-
function enumStringToValue$
|
|
304
|
+
function enumStringToValue$a(enumRef, value) {
|
|
305
305
|
if (typeof value === 'number') {
|
|
306
306
|
return value;
|
|
307
307
|
}
|
|
@@ -461,7 +461,7 @@ class FunctionParameter {
|
|
|
461
461
|
m.items = FunctionParameter.fromProto(proto.items);
|
|
462
462
|
}
|
|
463
463
|
if (proto.location) {
|
|
464
|
-
m.location = enumStringToValue$
|
|
464
|
+
m.location = enumStringToValue$a(FunctionParameterParameterLocation, proto.location);
|
|
465
465
|
}
|
|
466
466
|
return m;
|
|
467
467
|
}
|
|
@@ -535,7 +535,7 @@ class FunctionAuthStrategyUnspecifiedFunctionAuthStrategy {
|
|
|
535
535
|
}
|
|
536
536
|
}
|
|
537
537
|
|
|
538
|
-
function enumStringToValue$
|
|
538
|
+
function enumStringToValue$9(enumRef, value) {
|
|
539
539
|
if (typeof value === 'number') {
|
|
540
540
|
return value;
|
|
541
541
|
}
|
|
@@ -738,7 +738,7 @@ class PromptVersion {
|
|
|
738
738
|
}
|
|
739
739
|
}
|
|
740
740
|
|
|
741
|
-
function enumStringToValue$
|
|
741
|
+
function enumStringToValue$8(enumRef, value) {
|
|
742
742
|
if (typeof value === 'number') {
|
|
743
743
|
return value;
|
|
744
744
|
}
|
|
@@ -752,7 +752,7 @@ class Goal {
|
|
|
752
752
|
m.namespace = Namespace.fromProto(proto.namespace);
|
|
753
753
|
}
|
|
754
754
|
if (proto.type) {
|
|
755
|
-
m.type = enumStringToValue$
|
|
755
|
+
m.type = enumStringToValue$8(GoalType, proto.type);
|
|
756
756
|
}
|
|
757
757
|
if (proto.promptModules) {
|
|
758
758
|
m.promptModules = proto.promptModules.map(PromptModule.fromProto);
|
|
@@ -764,7 +764,7 @@ class Goal {
|
|
|
764
764
|
m.updated = new Date(proto.updated);
|
|
765
765
|
}
|
|
766
766
|
if (proto.supportedChannels) {
|
|
767
|
-
m.supportedChannels = proto.supportedChannels.map((v) => enumStringToValue$
|
|
767
|
+
m.supportedChannels = proto.supportedChannels.map((v) => enumStringToValue$8(GoalChannel, v));
|
|
768
768
|
}
|
|
769
769
|
return m;
|
|
770
770
|
}
|
|
@@ -839,7 +839,7 @@ class GoalKey {
|
|
|
839
839
|
}
|
|
840
840
|
}
|
|
841
841
|
|
|
842
|
-
function enumStringToValue$
|
|
842
|
+
function enumStringToValue$7(enumRef, value) {
|
|
843
843
|
if (typeof value === 'number') {
|
|
844
844
|
return value;
|
|
845
845
|
}
|
|
@@ -869,7 +869,7 @@ class KeyValuePair {
|
|
|
869
869
|
}
|
|
870
870
|
}
|
|
871
871
|
|
|
872
|
-
function enumStringToValue$
|
|
872
|
+
function enumStringToValue$6(enumRef, value) {
|
|
873
873
|
if (typeof value === 'number') {
|
|
874
874
|
return value;
|
|
875
875
|
}
|
|
@@ -883,7 +883,7 @@ class Assistant {
|
|
|
883
883
|
m.namespace = Namespace.fromProto(proto.namespace);
|
|
884
884
|
}
|
|
885
885
|
if (proto.type) {
|
|
886
|
-
m.type = enumStringToValue$
|
|
886
|
+
m.type = enumStringToValue$6(AssistantType, proto.type);
|
|
887
887
|
}
|
|
888
888
|
if (proto.config) {
|
|
889
889
|
m.config = Config.fromProto(proto.config);
|
|
@@ -1141,7 +1141,7 @@ class ConfigVoiceConfig {
|
|
|
1141
1141
|
let m = new ConfigVoiceConfig();
|
|
1142
1142
|
m = Object.assign(m, proto);
|
|
1143
1143
|
if (proto.vendorModel) {
|
|
1144
|
-
m.vendorModel = enumStringToValue$
|
|
1144
|
+
m.vendorModel = enumStringToValue$6(VendorModel, proto.vendorModel);
|
|
1145
1145
|
}
|
|
1146
1146
|
if (proto.modelConfig) {
|
|
1147
1147
|
m.modelConfig = ModelConfig.fromProto(proto.modelConfig);
|
|
@@ -1166,7 +1166,7 @@ class ConfigVoiceConfig {
|
|
|
1166
1166
|
}
|
|
1167
1167
|
}
|
|
1168
1168
|
|
|
1169
|
-
function enumStringToValue$
|
|
1169
|
+
function enumStringToValue$5(enumRef, value) {
|
|
1170
1170
|
if (typeof value === 'number') {
|
|
1171
1171
|
return value;
|
|
1172
1172
|
}
|
|
@@ -1183,7 +1183,7 @@ class Connection {
|
|
|
1183
1183
|
m.assistantKeys = proto.assistantKeys.map(AssistantKey.fromProto);
|
|
1184
1184
|
}
|
|
1185
1185
|
if (proto.supportedAssistantTypes) {
|
|
1186
|
-
m.supportedAssistantTypes = proto.supportedAssistantTypes.map((v) => enumStringToValue$
|
|
1186
|
+
m.supportedAssistantTypes = proto.supportedAssistantTypes.map((v) => enumStringToValue$5(AssistantType, v));
|
|
1187
1187
|
}
|
|
1188
1188
|
return m;
|
|
1189
1189
|
}
|
|
@@ -1258,7 +1258,7 @@ class ConnectionKey {
|
|
|
1258
1258
|
}
|
|
1259
1259
|
}
|
|
1260
1260
|
|
|
1261
|
-
function enumStringToValue$
|
|
1261
|
+
function enumStringToValue$4(enumRef, value) {
|
|
1262
1262
|
if (typeof value === 'number') {
|
|
1263
1263
|
return value;
|
|
1264
1264
|
}
|
|
@@ -1269,7 +1269,7 @@ class ChatAnswerFunctionExecutionJob {
|
|
|
1269
1269
|
let m = new ChatAnswerFunctionExecutionJob();
|
|
1270
1270
|
m = Object.assign(m, proto);
|
|
1271
1271
|
if (proto.status) {
|
|
1272
|
-
m.status = enumStringToValue$
|
|
1272
|
+
m.status = enumStringToValue$4(ChatAnswerFunctionExecutionJobStatus, proto.status);
|
|
1273
1273
|
}
|
|
1274
1274
|
if (proto.result) {
|
|
1275
1275
|
m.result = ChatAnswerFunctionExecutionJobResult.fromProto(proto.result);
|
|
@@ -1330,7 +1330,7 @@ class ChatMessage {
|
|
|
1330
1330
|
let m = new ChatMessage();
|
|
1331
1331
|
m = Object.assign(m, proto);
|
|
1332
1332
|
if (proto.role) {
|
|
1333
|
-
m.role = enumStringToValue$
|
|
1333
|
+
m.role = enumStringToValue$4(ChatMessageRole, proto.role);
|
|
1334
1334
|
}
|
|
1335
1335
|
return m;
|
|
1336
1336
|
}
|
|
@@ -1392,11 +1392,14 @@ class ChatUserInfo {
|
|
|
1392
1392
|
if (typeof this.zipCode !== 'undefined') {
|
|
1393
1393
|
toReturn['zipCode'] = this.zipCode;
|
|
1394
1394
|
}
|
|
1395
|
+
if (typeof this.timezone !== 'undefined') {
|
|
1396
|
+
toReturn['timezone'] = this.timezone;
|
|
1397
|
+
}
|
|
1395
1398
|
return toReturn;
|
|
1396
1399
|
}
|
|
1397
1400
|
}
|
|
1398
1401
|
|
|
1399
|
-
function enumStringToValue$
|
|
1402
|
+
function enumStringToValue$3(enumRef, value) {
|
|
1400
1403
|
if (typeof value === 'number') {
|
|
1401
1404
|
return value;
|
|
1402
1405
|
}
|
|
@@ -1426,7 +1429,7 @@ class Access {
|
|
|
1426
1429
|
}
|
|
1427
1430
|
}
|
|
1428
1431
|
|
|
1429
|
-
function enumStringToValue$
|
|
1432
|
+
function enumStringToValue$2(enumRef, value) {
|
|
1430
1433
|
if (typeof value === 'number') {
|
|
1431
1434
|
return value;
|
|
1432
1435
|
}
|
|
@@ -1488,6 +1491,33 @@ class PagedResponseMetadata {
|
|
|
1488
1491
|
}
|
|
1489
1492
|
}
|
|
1490
1493
|
|
|
1494
|
+
function enumStringToValue$1(enumRef, value) {
|
|
1495
|
+
if (typeof value === 'number') {
|
|
1496
|
+
return value;
|
|
1497
|
+
}
|
|
1498
|
+
return enumRef[value];
|
|
1499
|
+
}
|
|
1500
|
+
class FieldMask {
|
|
1501
|
+
static fromProto(proto) {
|
|
1502
|
+
let m = new FieldMask();
|
|
1503
|
+
m = Object.assign(m, proto);
|
|
1504
|
+
return m;
|
|
1505
|
+
}
|
|
1506
|
+
constructor(kwargs) {
|
|
1507
|
+
if (!kwargs) {
|
|
1508
|
+
return;
|
|
1509
|
+
}
|
|
1510
|
+
Object.assign(this, kwargs);
|
|
1511
|
+
}
|
|
1512
|
+
toApiJson() {
|
|
1513
|
+
const toReturn = {};
|
|
1514
|
+
if (typeof this.paths !== 'undefined') {
|
|
1515
|
+
toReturn['paths'] = this.paths;
|
|
1516
|
+
}
|
|
1517
|
+
return toReturn;
|
|
1518
|
+
}
|
|
1519
|
+
}
|
|
1520
|
+
|
|
1491
1521
|
function enumStringToValue(enumRef, value) {
|
|
1492
1522
|
if (typeof value === 'number') {
|
|
1493
1523
|
return value;
|
|
@@ -1575,6 +1605,58 @@ class SetAssistantConnectionsRequestConnectionState {
|
|
|
1575
1605
|
return toReturn;
|
|
1576
1606
|
}
|
|
1577
1607
|
}
|
|
1608
|
+
class CreateAssistantRequest {
|
|
1609
|
+
static fromProto(proto) {
|
|
1610
|
+
let m = new CreateAssistantRequest();
|
|
1611
|
+
m = Object.assign(m, proto);
|
|
1612
|
+
if (proto.assistant) {
|
|
1613
|
+
m.assistant = Assistant.fromProto(proto.assistant);
|
|
1614
|
+
}
|
|
1615
|
+
if (proto.options) {
|
|
1616
|
+
m.options = CreateAssistantRequestOptions.fromProto(proto.options);
|
|
1617
|
+
}
|
|
1618
|
+
return m;
|
|
1619
|
+
}
|
|
1620
|
+
constructor(kwargs) {
|
|
1621
|
+
if (!kwargs) {
|
|
1622
|
+
return;
|
|
1623
|
+
}
|
|
1624
|
+
Object.assign(this, kwargs);
|
|
1625
|
+
}
|
|
1626
|
+
toApiJson() {
|
|
1627
|
+
const toReturn = {};
|
|
1628
|
+
if (typeof this.assistant !== 'undefined' && this.assistant !== null) {
|
|
1629
|
+
toReturn['assistant'] = 'toApiJson' in this.assistant ? this.assistant.toApiJson() : this.assistant;
|
|
1630
|
+
}
|
|
1631
|
+
if (typeof this.options !== 'undefined' && this.options !== null) {
|
|
1632
|
+
toReturn['options'] = 'toApiJson' in this.options ? this.options.toApiJson() : this.options;
|
|
1633
|
+
}
|
|
1634
|
+
return toReturn;
|
|
1635
|
+
}
|
|
1636
|
+
}
|
|
1637
|
+
class CreateAssistantResponse {
|
|
1638
|
+
static fromProto(proto) {
|
|
1639
|
+
let m = new CreateAssistantResponse();
|
|
1640
|
+
m = Object.assign(m, proto);
|
|
1641
|
+
if (proto.assistant) {
|
|
1642
|
+
m.assistant = Assistant.fromProto(proto.assistant);
|
|
1643
|
+
}
|
|
1644
|
+
return m;
|
|
1645
|
+
}
|
|
1646
|
+
constructor(kwargs) {
|
|
1647
|
+
if (!kwargs) {
|
|
1648
|
+
return;
|
|
1649
|
+
}
|
|
1650
|
+
Object.assign(this, kwargs);
|
|
1651
|
+
}
|
|
1652
|
+
toApiJson() {
|
|
1653
|
+
const toReturn = {};
|
|
1654
|
+
if (typeof this.assistant !== 'undefined' && this.assistant !== null) {
|
|
1655
|
+
toReturn['assistant'] = 'toApiJson' in this.assistant ? this.assistant.toApiJson() : this.assistant;
|
|
1656
|
+
}
|
|
1657
|
+
return toReturn;
|
|
1658
|
+
}
|
|
1659
|
+
}
|
|
1578
1660
|
class CreateGoalRequest {
|
|
1579
1661
|
static fromProto(proto) {
|
|
1580
1662
|
let m = new CreateGoalRequest();
|
|
@@ -2035,12 +2117,15 @@ class ListGoalsRequestFilters {
|
|
|
2035
2117
|
return toReturn;
|
|
2036
2118
|
}
|
|
2037
2119
|
}
|
|
2038
|
-
class
|
|
2120
|
+
class ListConnectionsRequestFilters {
|
|
2039
2121
|
static fromProto(proto) {
|
|
2040
|
-
let m = new
|
|
2122
|
+
let m = new ListConnectionsRequestFilters();
|
|
2041
2123
|
m = Object.assign(m, proto);
|
|
2042
|
-
if (proto.
|
|
2043
|
-
m.
|
|
2124
|
+
if (proto.namespace) {
|
|
2125
|
+
m.namespace = Namespace.fromProto(proto.namespace);
|
|
2126
|
+
}
|
|
2127
|
+
if (proto.assistantType) {
|
|
2128
|
+
m.assistantType = enumStringToValue(AssistantType, proto.assistantType);
|
|
2044
2129
|
}
|
|
2045
2130
|
return m;
|
|
2046
2131
|
}
|
|
@@ -2052,8 +2137,11 @@ class ListAllAssistantsAssociatedToConnectionRequestFilters {
|
|
|
2052
2137
|
}
|
|
2053
2138
|
toApiJson() {
|
|
2054
2139
|
const toReturn = {};
|
|
2055
|
-
if (typeof this.
|
|
2056
|
-
toReturn['
|
|
2140
|
+
if (typeof this.namespace !== 'undefined' && this.namespace !== null) {
|
|
2141
|
+
toReturn['namespace'] = 'toApiJson' in this.namespace ? this.namespace.toApiJson() : this.namespace;
|
|
2142
|
+
}
|
|
2143
|
+
if (typeof this.assistantType !== 'undefined') {
|
|
2144
|
+
toReturn['assistantType'] = this.assistantType;
|
|
2057
2145
|
}
|
|
2058
2146
|
return toReturn;
|
|
2059
2147
|
}
|
|
@@ -2081,13 +2169,10 @@ class ListFunctionRequestFilters {
|
|
|
2081
2169
|
return toReturn;
|
|
2082
2170
|
}
|
|
2083
2171
|
}
|
|
2084
|
-
class
|
|
2172
|
+
class ListAllAssistantsAssociatedToConnectionRequestFilters {
|
|
2085
2173
|
static fromProto(proto) {
|
|
2086
|
-
let m = new
|
|
2174
|
+
let m = new ListAllAssistantsAssociatedToConnectionRequestFilters();
|
|
2087
2175
|
m = Object.assign(m, proto);
|
|
2088
|
-
if (proto.namespace) {
|
|
2089
|
-
m.namespace = Namespace.fromProto(proto.namespace);
|
|
2090
|
-
}
|
|
2091
2176
|
if (proto.type) {
|
|
2092
2177
|
m.type = enumStringToValue(AssistantType, proto.type);
|
|
2093
2178
|
}
|
|
@@ -2101,22 +2186,22 @@ class ListAssistantRequestFilters {
|
|
|
2101
2186
|
}
|
|
2102
2187
|
toApiJson() {
|
|
2103
2188
|
const toReturn = {};
|
|
2104
|
-
if (typeof this.namespace !== 'undefined' && this.namespace !== null) {
|
|
2105
|
-
toReturn['namespace'] = 'toApiJson' in this.namespace ? this.namespace.toApiJson() : this.namespace;
|
|
2106
|
-
}
|
|
2107
2189
|
if (typeof this.type !== 'undefined') {
|
|
2108
2190
|
toReturn['type'] = this.type;
|
|
2109
2191
|
}
|
|
2110
2192
|
return toReturn;
|
|
2111
2193
|
}
|
|
2112
2194
|
}
|
|
2113
|
-
class
|
|
2195
|
+
class ListAssistantRequestFilters {
|
|
2114
2196
|
static fromProto(proto) {
|
|
2115
|
-
let m = new
|
|
2197
|
+
let m = new ListAssistantRequestFilters();
|
|
2116
2198
|
m = Object.assign(m, proto);
|
|
2117
2199
|
if (proto.namespace) {
|
|
2118
2200
|
m.namespace = Namespace.fromProto(proto.namespace);
|
|
2119
2201
|
}
|
|
2202
|
+
if (proto.type) {
|
|
2203
|
+
m.type = enumStringToValue(AssistantType, proto.type);
|
|
2204
|
+
}
|
|
2120
2205
|
return m;
|
|
2121
2206
|
}
|
|
2122
2207
|
constructor(kwargs) {
|
|
@@ -2130,19 +2215,19 @@ class ListPromptModuleRequestFilters {
|
|
|
2130
2215
|
if (typeof this.namespace !== 'undefined' && this.namespace !== null) {
|
|
2131
2216
|
toReturn['namespace'] = 'toApiJson' in this.namespace ? this.namespace.toApiJson() : this.namespace;
|
|
2132
2217
|
}
|
|
2218
|
+
if (typeof this.type !== 'undefined') {
|
|
2219
|
+
toReturn['type'] = this.type;
|
|
2220
|
+
}
|
|
2133
2221
|
return toReturn;
|
|
2134
2222
|
}
|
|
2135
2223
|
}
|
|
2136
|
-
class
|
|
2224
|
+
class ListPromptModuleRequestFilters {
|
|
2137
2225
|
static fromProto(proto) {
|
|
2138
|
-
let m = new
|
|
2226
|
+
let m = new ListPromptModuleRequestFilters();
|
|
2139
2227
|
m = Object.assign(m, proto);
|
|
2140
2228
|
if (proto.namespace) {
|
|
2141
2229
|
m.namespace = Namespace.fromProto(proto.namespace);
|
|
2142
2230
|
}
|
|
2143
|
-
if (proto.assistantType) {
|
|
2144
|
-
m.assistantType = enumStringToValue(AssistantType, proto.assistantType);
|
|
2145
|
-
}
|
|
2146
2231
|
return m;
|
|
2147
2232
|
}
|
|
2148
2233
|
constructor(kwargs) {
|
|
@@ -2156,9 +2241,6 @@ class ListConnectionsRequestFilters {
|
|
|
2156
2241
|
if (typeof this.namespace !== 'undefined' && this.namespace !== null) {
|
|
2157
2242
|
toReturn['namespace'] = 'toApiJson' in this.namespace ? this.namespace.toApiJson() : this.namespace;
|
|
2158
2243
|
}
|
|
2159
|
-
if (typeof this.assistantType !== 'undefined') {
|
|
2160
|
-
toReturn['assistantType'] = this.assistantType;
|
|
2161
|
-
}
|
|
2162
2244
|
return toReturn;
|
|
2163
2245
|
}
|
|
2164
2246
|
}
|
|
@@ -3619,9 +3701,9 @@ class GenerateChatAnswerRequestOptions {
|
|
|
3619
3701
|
return toReturn;
|
|
3620
3702
|
}
|
|
3621
3703
|
}
|
|
3622
|
-
class
|
|
3704
|
+
class CreateAssistantRequestOptions {
|
|
3623
3705
|
static fromProto(proto) {
|
|
3624
|
-
let m = new
|
|
3706
|
+
let m = new CreateAssistantRequestOptions();
|
|
3625
3707
|
m = Object.assign(m, proto);
|
|
3626
3708
|
return m;
|
|
3627
3709
|
}
|
|
@@ -3659,6 +3741,26 @@ class CreatePromptModuleVersionRequestOptions {
|
|
|
3659
3741
|
return toReturn;
|
|
3660
3742
|
}
|
|
3661
3743
|
}
|
|
3744
|
+
class UpsertAssistantRequestOptions {
|
|
3745
|
+
static fromProto(proto) {
|
|
3746
|
+
let m = new UpsertAssistantRequestOptions();
|
|
3747
|
+
m = Object.assign(m, proto);
|
|
3748
|
+
return m;
|
|
3749
|
+
}
|
|
3750
|
+
constructor(kwargs) {
|
|
3751
|
+
if (!kwargs) {
|
|
3752
|
+
return;
|
|
3753
|
+
}
|
|
3754
|
+
Object.assign(this, kwargs);
|
|
3755
|
+
}
|
|
3756
|
+
toApiJson() {
|
|
3757
|
+
const toReturn = {};
|
|
3758
|
+
if (typeof this.applyDefaults !== 'undefined') {
|
|
3759
|
+
toReturn['applyDefaults'] = this.applyDefaults;
|
|
3760
|
+
}
|
|
3761
|
+
return toReturn;
|
|
3762
|
+
}
|
|
3763
|
+
}
|
|
3662
3764
|
class SetAssistantConnectionsRequest {
|
|
3663
3765
|
static fromProto(proto) {
|
|
3664
3766
|
let m = new SetAssistantConnectionsRequest();
|
|
@@ -3688,6 +3790,35 @@ class SetAssistantConnectionsRequest {
|
|
|
3688
3790
|
return toReturn;
|
|
3689
3791
|
}
|
|
3690
3792
|
}
|
|
3793
|
+
class UpdateAssistantRequest {
|
|
3794
|
+
static fromProto(proto) {
|
|
3795
|
+
let m = new UpdateAssistantRequest();
|
|
3796
|
+
m = Object.assign(m, proto);
|
|
3797
|
+
if (proto.assistant) {
|
|
3798
|
+
m.assistant = Assistant.fromProto(proto.assistant);
|
|
3799
|
+
}
|
|
3800
|
+
if (proto.fieldMask) {
|
|
3801
|
+
m.fieldMask = FieldMask.fromProto(proto.fieldMask);
|
|
3802
|
+
}
|
|
3803
|
+
return m;
|
|
3804
|
+
}
|
|
3805
|
+
constructor(kwargs) {
|
|
3806
|
+
if (!kwargs) {
|
|
3807
|
+
return;
|
|
3808
|
+
}
|
|
3809
|
+
Object.assign(this, kwargs);
|
|
3810
|
+
}
|
|
3811
|
+
toApiJson() {
|
|
3812
|
+
const toReturn = {};
|
|
3813
|
+
if (typeof this.assistant !== 'undefined' && this.assistant !== null) {
|
|
3814
|
+
toReturn['assistant'] = 'toApiJson' in this.assistant ? this.assistant.toApiJson() : this.assistant;
|
|
3815
|
+
}
|
|
3816
|
+
if (typeof this.fieldMask !== 'undefined' && this.fieldMask !== null) {
|
|
3817
|
+
toReturn['fieldMask'] = 'toApiJson' in this.fieldMask ? this.fieldMask.toApiJson() : this.fieldMask;
|
|
3818
|
+
}
|
|
3819
|
+
return toReturn;
|
|
3820
|
+
}
|
|
3821
|
+
}
|
|
3691
3822
|
class UpdateGoalRequest {
|
|
3692
3823
|
static fromProto(proto) {
|
|
3693
3824
|
let m = new UpdateGoalRequest();
|
|
@@ -3923,6 +4054,15 @@ class AssistantApiService {
|
|
|
3923
4054
|
return this.http.post(this._host + "/ai_assistants.v1alpha1.AssistantService/UpsertAssistant", request.toApiJson(), this.apiOptions())
|
|
3924
4055
|
.pipe(map(resp => UpsertAssistantResponse.fromProto(resp)));
|
|
3925
4056
|
}
|
|
4057
|
+
createAssistant(r) {
|
|
4058
|
+
const request = (r.toApiJson) ? r : new CreateAssistantRequest(r);
|
|
4059
|
+
return this.http.post(this._host + "/ai_assistants.v1alpha1.AssistantService/CreateAssistant", request.toApiJson(), this.apiOptions())
|
|
4060
|
+
.pipe(map(resp => CreateAssistantResponse.fromProto(resp)));
|
|
4061
|
+
}
|
|
4062
|
+
updateAssistant(r) {
|
|
4063
|
+
const request = (r.toApiJson) ? r : new UpdateAssistantRequest(r);
|
|
4064
|
+
return this.http.post(this._host + "/ai_assistants.v1alpha1.AssistantService/UpdateAssistant", request.toApiJson(), { ...this.apiOptions(), observe: 'response' });
|
|
4065
|
+
}
|
|
3926
4066
|
getAssistant(r) {
|
|
3927
4067
|
const request = (r.toApiJson) ? r : new GetAssistantRequest(r);
|
|
3928
4068
|
return this.http.post(this._host + "/ai_assistants.v1alpha1.AssistantService/GetAssistant", request.toApiJson(), this.apiOptions())
|
|
@@ -4305,5 +4445,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
4305
4445
|
* Generated bundle index. Do not edit.
|
|
4306
4446
|
*/
|
|
4307
4447
|
|
|
4308
|
-
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, ExecuteFunctionRequest, ExecuteFunctionResponse, Function, FunctionApiService, FunctionAuthStrategy, FunctionAuthStrategyPlatformManagedFunctionAuthStrategy, FunctionAuthStrategyUnspecifiedFunctionAuthStrategy, FunctionHeader, FunctionKey, FunctionParameter, FunctionParameterParameterLocation, 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 };
|
|
4448
|
+
export { Access, Assistant, AssistantApiService, AssistantKey, AssistantType, BuildDefaultAssistantRequest, BuildDefaultAssistantResponse, ChatAnswerFunctionExecutionJob, ChatAnswerFunctionExecutionJobResult, ChatAnswerFunctionExecutionJobStatus, ChatChannel, ChatMessage, ChatMessageRole, ChatUserInfo, Config, ConfigInboxConfig, ConfigVoiceConfig, ConfigurableGoal, Connection, ConnectionApiService, ConnectionKey, CreateAssistantRequest, CreateAssistantRequestOptions, CreateAssistantResponse, CreateGoalRequest, CreateGoalResponse, CreatePromptModuleRequest, CreatePromptModuleResponse, CreatePromptModuleVersionRequest, CreatePromptModuleVersionRequestOptions, CreatePromptRequest, DeepgramConfig, DeleteAssistantRequest, DeleteConnectionRequest, DeleteFunctionRequest, DeleteGoalRequest, DeletePromptModuleRequest, DeletePromptRequest, DeployPromptModuleRequest, DeployPromptRequest, ExecuteFunctionRequest, ExecuteFunctionResponse, FieldMask, Function, FunctionApiService, FunctionAuthStrategy, FunctionAuthStrategyPlatformManagedFunctionAuthStrategy, FunctionAuthStrategyUnspecifiedFunctionAuthStrategy, FunctionHeader, FunctionKey, FunctionParameter, FunctionParameterParameterLocation, 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, UpdateAssistantRequest, UpdateGoalRequest, UpdatePromptModuleRequest, UpdatePromptRequest, UpsertAssistantRequest, UpsertAssistantRequestOptions, UpsertAssistantResponse, UpsertConnectionRequest, UpsertFunctionRequest, UpsertGoalRequest, VendorModel };
|
|
4309
4449
|
//# sourceMappingURL=vendasta-ai-assistants.mjs.map
|