@vendasta/ai-assistants 0.6.0 → 0.8.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/assistant.enum.mjs +2 -1
- package/esm2020/lib/_internal/enums/goal.enum.mjs +14 -0
- package/esm2020/lib/_internal/enums/index.mjs +2 -1
- package/esm2020/lib/_internal/function.api.service.mjs +58 -0
- package/esm2020/lib/_internal/goal.api.service.mjs +58 -0
- package/esm2020/lib/_internal/index.mjs +4 -1
- 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/function.interface.mjs +2 -0
- package/esm2020/lib/_internal/interfaces/goal.interface.mjs +2 -0
- package/esm2020/lib/_internal/interfaces/index.mjs +1 -1
- package/esm2020/lib/_internal/interfaces/namespace.interface.mjs +1 -1
- package/esm2020/lib/_internal/interfaces/prompt.interface.mjs +1 -7
- package/esm2020/lib/_internal/objects/api.mjs +995 -74
- package/esm2020/lib/_internal/objects/assistant.mjs +31 -1
- package/esm2020/lib/_internal/objects/function.mjs +125 -0
- package/esm2020/lib/_internal/objects/goal.mjs +96 -0
- package/esm2020/lib/_internal/objects/index.mjs +7 -5
- package/esm2020/lib/_internal/objects/namespace.mjs +79 -1
- package/esm2020/lib/_internal/objects/prompt.mjs +119 -1
- package/esm2020/lib/_internal/prompt-module.api.service.mjs +81 -0
- package/fesm2015/vendasta-ai-assistants.mjs +2012 -462
- package/fesm2015/vendasta-ai-assistants.mjs.map +1 -1
- package/fesm2020/vendasta-ai-assistants.mjs +2012 -462
- package/fesm2020/vendasta-ai-assistants.mjs.map +1 -1
- package/lib/_internal/enums/assistant.enum.d.ts +2 -1
- package/lib/_internal/enums/goal.enum.d.ts +6 -0
- package/lib/_internal/enums/index.d.ts +1 -0
- package/lib/_internal/function.api.service.d.ts +18 -0
- package/lib/_internal/goal.api.service.d.ts +18 -0
- package/lib/_internal/index.d.ts +3 -0
- package/lib/_internal/interfaces/api.interface.d.ts +140 -4
- package/lib/_internal/interfaces/assistant.interface.d.ts +5 -0
- package/lib/_internal/interfaces/function.interface.d.ts +23 -0
- package/lib/_internal/interfaces/goal.interface.d.ts +19 -0
- package/lib/_internal/interfaces/index.d.ts +6 -4
- package/lib/_internal/interfaces/namespace.interface.d.ts +12 -0
- package/lib/_internal/interfaces/prompt.interface.d.ts +23 -0
- package/lib/_internal/objects/api.d.ts +249 -8
- package/lib/_internal/objects/assistant.d.ts +8 -0
- package/lib/_internal/objects/function.d.ts +34 -0
- package/lib/_internal/objects/goal.d.ts +27 -0
- package/lib/_internal/objects/index.d.ts +6 -4
- package/lib/_internal/objects/namespace.d.ts +21 -0
- package/lib/_internal/objects/prompt.d.ts +32 -0
- package/lib/_internal/prompt-module.api.service.d.ts +23 -0
- package/package.json +1 -1
|
@@ -27,6 +27,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
27
27
|
args: [{ providedIn: 'root' }]
|
|
28
28
|
}] });
|
|
29
29
|
|
|
30
|
+
// *********************************
|
|
31
|
+
// Code generated by sdkgen
|
|
32
|
+
// DO NOT EDIT!.
|
|
33
|
+
//
|
|
34
|
+
// Enums.
|
|
35
|
+
// *********************************
|
|
36
|
+
var GoalType;
|
|
37
|
+
(function (GoalType) {
|
|
38
|
+
GoalType[GoalType["GOAL_TYPE_INVALID"] = 0] = "GOAL_TYPE_INVALID";
|
|
39
|
+
GoalType[GoalType["GOAL_TYPE_KNOWLEDGE"] = 1] = "GOAL_TYPE_KNOWLEDGE";
|
|
40
|
+
GoalType[GoalType["GOAL_TYPE_PERSONALITY"] = 2] = "GOAL_TYPE_PERSONALITY";
|
|
41
|
+
GoalType[GoalType["GOAL_TYPE_CUSTOM"] = 3] = "GOAL_TYPE_CUSTOM";
|
|
42
|
+
})(GoalType || (GoalType = {}));
|
|
43
|
+
|
|
30
44
|
// *********************************
|
|
31
45
|
// Code generated by sdkgen
|
|
32
46
|
// DO NOT EDIT!.
|
|
@@ -39,6 +53,7 @@ var AssistantType;
|
|
|
39
53
|
AssistantType[AssistantType["ASSISTANT_TYPE_SYSTEM"] = 1] = "ASSISTANT_TYPE_SYSTEM";
|
|
40
54
|
AssistantType[AssistantType["ASSISTANT_TYPE_INBOX"] = 2] = "ASSISTANT_TYPE_INBOX";
|
|
41
55
|
AssistantType[AssistantType["ASSISTANT_TYPE_SOCIAL_MARKETING"] = 3] = "ASSISTANT_TYPE_SOCIAL_MARKETING";
|
|
56
|
+
AssistantType[AssistantType["ASSISTANT_TYPE_VOICE_RECEPTIONIST"] = 4] = "ASSISTANT_TYPE_VOICE_RECEPTIONIST";
|
|
42
57
|
})(AssistantType || (AssistantType = {}));
|
|
43
58
|
|
|
44
59
|
// *********************************
|
|
@@ -75,7 +90,7 @@ var ChatMessageRole;
|
|
|
75
90
|
// Enums Index.
|
|
76
91
|
// *********************************
|
|
77
92
|
|
|
78
|
-
function enumStringToValue$
|
|
93
|
+
function enumStringToValue$a(enumRef, value) {
|
|
79
94
|
if (typeof value === 'number') {
|
|
80
95
|
return value;
|
|
81
96
|
}
|
|
@@ -101,6 +116,66 @@ class NamespaceAccountGroupNamespace {
|
|
|
101
116
|
return toReturn;
|
|
102
117
|
}
|
|
103
118
|
}
|
|
119
|
+
class NamespaceAccountGroupsForGroupNamespace {
|
|
120
|
+
static fromProto(proto) {
|
|
121
|
+
let m = new NamespaceAccountGroupsForGroupNamespace();
|
|
122
|
+
m = Object.assign(m, proto);
|
|
123
|
+
return m;
|
|
124
|
+
}
|
|
125
|
+
constructor(kwargs) {
|
|
126
|
+
if (!kwargs) {
|
|
127
|
+
return;
|
|
128
|
+
}
|
|
129
|
+
Object.assign(this, kwargs);
|
|
130
|
+
}
|
|
131
|
+
toApiJson() {
|
|
132
|
+
const toReturn = {};
|
|
133
|
+
if (typeof this.groupId !== 'undefined') {
|
|
134
|
+
toReturn['groupId'] = this.groupId;
|
|
135
|
+
}
|
|
136
|
+
return toReturn;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
class NamespaceAccountGroupsForPartnerNamespace {
|
|
140
|
+
static fromProto(proto) {
|
|
141
|
+
let m = new NamespaceAccountGroupsForPartnerNamespace();
|
|
142
|
+
m = Object.assign(m, proto);
|
|
143
|
+
return m;
|
|
144
|
+
}
|
|
145
|
+
constructor(kwargs) {
|
|
146
|
+
if (!kwargs) {
|
|
147
|
+
return;
|
|
148
|
+
}
|
|
149
|
+
Object.assign(this, kwargs);
|
|
150
|
+
}
|
|
151
|
+
toApiJson() {
|
|
152
|
+
const toReturn = {};
|
|
153
|
+
if (typeof this.partnerId !== 'undefined') {
|
|
154
|
+
toReturn['partnerId'] = this.partnerId;
|
|
155
|
+
}
|
|
156
|
+
return toReturn;
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
class NamespaceGlobalNamespace {
|
|
160
|
+
static fromProto(proto) {
|
|
161
|
+
let m = new NamespaceGlobalNamespace();
|
|
162
|
+
m = Object.assign(m, proto);
|
|
163
|
+
return m;
|
|
164
|
+
}
|
|
165
|
+
constructor(kwargs) {
|
|
166
|
+
if (!kwargs) {
|
|
167
|
+
return;
|
|
168
|
+
}
|
|
169
|
+
Object.assign(this, kwargs);
|
|
170
|
+
}
|
|
171
|
+
toApiJson() {
|
|
172
|
+
const toReturn = {};
|
|
173
|
+
if (typeof this.contextId !== 'undefined') {
|
|
174
|
+
toReturn['contextId'] = this.contextId;
|
|
175
|
+
}
|
|
176
|
+
return toReturn;
|
|
177
|
+
}
|
|
178
|
+
}
|
|
104
179
|
class Namespace {
|
|
105
180
|
static fromProto(proto) {
|
|
106
181
|
let m = new Namespace();
|
|
@@ -114,6 +189,15 @@ class Namespace {
|
|
|
114
189
|
if (proto.systemNamespace) {
|
|
115
190
|
m.systemNamespace = NamespaceSystemNamespace.fromProto(proto.systemNamespace);
|
|
116
191
|
}
|
|
192
|
+
if (proto.accountGroupsForPartnerNamespace) {
|
|
193
|
+
m.accountGroupsForPartnerNamespace = NamespaceAccountGroupsForPartnerNamespace.fromProto(proto.accountGroupsForPartnerNamespace);
|
|
194
|
+
}
|
|
195
|
+
if (proto.accountGroupsForGroupNamespace) {
|
|
196
|
+
m.accountGroupsForGroupNamespace = NamespaceAccountGroupsForGroupNamespace.fromProto(proto.accountGroupsForGroupNamespace);
|
|
197
|
+
}
|
|
198
|
+
if (proto.globalNamespace) {
|
|
199
|
+
m.globalNamespace = NamespaceGlobalNamespace.fromProto(proto.globalNamespace);
|
|
200
|
+
}
|
|
117
201
|
return m;
|
|
118
202
|
}
|
|
119
203
|
constructor(kwargs) {
|
|
@@ -133,6 +217,15 @@ class Namespace {
|
|
|
133
217
|
if (typeof this.systemNamespace !== 'undefined' && this.systemNamespace !== null) {
|
|
134
218
|
toReturn['systemNamespace'] = 'toApiJson' in this.systemNamespace ? this.systemNamespace.toApiJson() : this.systemNamespace;
|
|
135
219
|
}
|
|
220
|
+
if (typeof this.accountGroupsForPartnerNamespace !== 'undefined' && this.accountGroupsForPartnerNamespace !== null) {
|
|
221
|
+
toReturn['accountGroupsForPartnerNamespace'] = 'toApiJson' in this.accountGroupsForPartnerNamespace ? this.accountGroupsForPartnerNamespace.toApiJson() : this.accountGroupsForPartnerNamespace;
|
|
222
|
+
}
|
|
223
|
+
if (typeof this.accountGroupsForGroupNamespace !== 'undefined' && this.accountGroupsForGroupNamespace !== null) {
|
|
224
|
+
toReturn['accountGroupsForGroupNamespace'] = 'toApiJson' in this.accountGroupsForGroupNamespace ? this.accountGroupsForGroupNamespace.toApiJson() : this.accountGroupsForGroupNamespace;
|
|
225
|
+
}
|
|
226
|
+
if (typeof this.globalNamespace !== 'undefined' && this.globalNamespace !== null) {
|
|
227
|
+
toReturn['globalNamespace'] = 'toApiJson' in this.globalNamespace ? this.globalNamespace.toApiJson() : this.globalNamespace;
|
|
228
|
+
}
|
|
136
229
|
return toReturn;
|
|
137
230
|
}
|
|
138
231
|
}
|
|
@@ -177,24 +270,24 @@ class NamespaceSystemNamespace {
|
|
|
177
270
|
}
|
|
178
271
|
}
|
|
179
272
|
|
|
180
|
-
function enumStringToValue$
|
|
273
|
+
function enumStringToValue$9(enumRef, value) {
|
|
181
274
|
if (typeof value === 'number') {
|
|
182
275
|
return value;
|
|
183
276
|
}
|
|
184
277
|
return enumRef[value];
|
|
185
278
|
}
|
|
186
|
-
class
|
|
279
|
+
class Function {
|
|
187
280
|
static fromProto(proto) {
|
|
188
|
-
let m = new
|
|
281
|
+
let m = new Function();
|
|
189
282
|
m = Object.assign(m, proto);
|
|
190
283
|
if (proto.namespace) {
|
|
191
284
|
m.namespace = Namespace.fromProto(proto.namespace);
|
|
192
285
|
}
|
|
193
|
-
if (proto.
|
|
194
|
-
m.
|
|
286
|
+
if (proto.functionParameters) {
|
|
287
|
+
m.functionParameters = proto.functionParameters.map(FunctionParameter.fromProto);
|
|
195
288
|
}
|
|
196
|
-
if (proto.
|
|
197
|
-
m.
|
|
289
|
+
if (proto.updated) {
|
|
290
|
+
m.updated = new Date(proto.updated);
|
|
198
291
|
}
|
|
199
292
|
return m;
|
|
200
293
|
}
|
|
@@ -212,24 +305,30 @@ class Assistant {
|
|
|
212
305
|
if (typeof this.namespace !== 'undefined' && this.namespace !== null) {
|
|
213
306
|
toReturn['namespace'] = 'toApiJson' in this.namespace ? this.namespace.toApiJson() : this.namespace;
|
|
214
307
|
}
|
|
215
|
-
if (typeof this.
|
|
216
|
-
toReturn['
|
|
308
|
+
if (typeof this.description !== 'undefined') {
|
|
309
|
+
toReturn['description'] = this.description;
|
|
217
310
|
}
|
|
218
|
-
if (typeof this.
|
|
219
|
-
toReturn['
|
|
311
|
+
if (typeof this.url !== 'undefined') {
|
|
312
|
+
toReturn['url'] = this.url;
|
|
220
313
|
}
|
|
221
|
-
if (typeof this.
|
|
222
|
-
toReturn['
|
|
314
|
+
if (typeof this.methodType !== 'undefined') {
|
|
315
|
+
toReturn['methodType'] = this.methodType;
|
|
223
316
|
}
|
|
224
|
-
if (typeof this.
|
|
225
|
-
toReturn['
|
|
317
|
+
if (typeof this.functionParameters !== 'undefined' && this.functionParameters !== null) {
|
|
318
|
+
toReturn['functionParameters'] = 'toApiJson' in this.functionParameters ? this.functionParameters.toApiJson() : this.functionParameters;
|
|
319
|
+
}
|
|
320
|
+
if (typeof this.generatesAnswer !== 'undefined') {
|
|
321
|
+
toReturn['generatesAnswer'] = this.generatesAnswer;
|
|
322
|
+
}
|
|
323
|
+
if (typeof this.updated !== 'undefined' && this.updated !== null) {
|
|
324
|
+
toReturn['updated'] = 'toApiJson' in this.updated ? this.updated.toApiJson() : this.updated;
|
|
226
325
|
}
|
|
227
326
|
return toReturn;
|
|
228
327
|
}
|
|
229
328
|
}
|
|
230
|
-
class
|
|
329
|
+
class FunctionKey {
|
|
231
330
|
static fromProto(proto) {
|
|
232
|
-
let m = new
|
|
331
|
+
let m = new FunctionKey();
|
|
233
332
|
m = Object.assign(m, proto);
|
|
234
333
|
if (proto.namespace) {
|
|
235
334
|
m.namespace = Namespace.fromProto(proto.namespace);
|
|
@@ -253,12 +352,15 @@ class AssistantKey {
|
|
|
253
352
|
return toReturn;
|
|
254
353
|
}
|
|
255
354
|
}
|
|
256
|
-
class
|
|
355
|
+
class FunctionParameter {
|
|
257
356
|
static fromProto(proto) {
|
|
258
|
-
let m = new
|
|
357
|
+
let m = new FunctionParameter();
|
|
259
358
|
m = Object.assign(m, proto);
|
|
260
|
-
if (proto.
|
|
261
|
-
m.
|
|
359
|
+
if (proto.properties) {
|
|
360
|
+
m.properties = proto.properties.map(FunctionParameter.fromProto);
|
|
361
|
+
}
|
|
362
|
+
if (proto.items) {
|
|
363
|
+
m.items = FunctionParameter.fromProto(proto.items);
|
|
262
364
|
}
|
|
263
365
|
return m;
|
|
264
366
|
}
|
|
@@ -270,51 +372,43 @@ class Config {
|
|
|
270
372
|
}
|
|
271
373
|
toApiJson() {
|
|
272
374
|
const toReturn = {};
|
|
273
|
-
if (typeof this.
|
|
274
|
-
toReturn['
|
|
375
|
+
if (typeof this.name !== 'undefined') {
|
|
376
|
+
toReturn['name'] = this.name;
|
|
275
377
|
}
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
}
|
|
279
|
-
class ConfigInboxConfig {
|
|
280
|
-
static fromProto(proto) {
|
|
281
|
-
let m = new ConfigInboxConfig();
|
|
282
|
-
m = Object.assign(m, proto);
|
|
283
|
-
return m;
|
|
284
|
-
}
|
|
285
|
-
constructor(kwargs) {
|
|
286
|
-
if (!kwargs) {
|
|
287
|
-
return;
|
|
378
|
+
if (typeof this.description !== 'undefined') {
|
|
379
|
+
toReturn['description'] = this.description;
|
|
288
380
|
}
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
toApiJson() {
|
|
292
|
-
const toReturn = {};
|
|
293
|
-
if (typeof this.leadCaptureEnabled !== 'undefined') {
|
|
294
|
-
toReturn['leadCaptureEnabled'] = this.leadCaptureEnabled;
|
|
381
|
+
if (typeof this.type !== 'undefined') {
|
|
382
|
+
toReturn['type'] = this.type;
|
|
295
383
|
}
|
|
296
|
-
if (typeof this.
|
|
297
|
-
toReturn['
|
|
384
|
+
if (typeof this.properties !== 'undefined' && this.properties !== null) {
|
|
385
|
+
toReturn['properties'] = 'toApiJson' in this.properties ? this.properties.toApiJson() : this.properties;
|
|
386
|
+
}
|
|
387
|
+
if (typeof this.items !== 'undefined' && this.items !== null) {
|
|
388
|
+
toReturn['items'] = 'toApiJson' in this.items ? this.items.toApiJson() : this.items;
|
|
389
|
+
}
|
|
390
|
+
if (typeof this.value !== 'undefined') {
|
|
391
|
+
toReturn['value'] = this.value;
|
|
298
392
|
}
|
|
299
393
|
return toReturn;
|
|
300
394
|
}
|
|
301
395
|
}
|
|
302
396
|
|
|
303
|
-
function enumStringToValue$
|
|
397
|
+
function enumStringToValue$8(enumRef, value) {
|
|
304
398
|
if (typeof value === 'number') {
|
|
305
399
|
return value;
|
|
306
400
|
}
|
|
307
401
|
return enumRef[value];
|
|
308
402
|
}
|
|
309
|
-
class
|
|
403
|
+
class Prompt {
|
|
310
404
|
static fromProto(proto) {
|
|
311
|
-
let m = new
|
|
405
|
+
let m = new Prompt();
|
|
312
406
|
m = Object.assign(m, proto);
|
|
313
|
-
if (proto.
|
|
314
|
-
m.
|
|
407
|
+
if (proto.updated) {
|
|
408
|
+
m.updated = new Date(proto.updated);
|
|
315
409
|
}
|
|
316
|
-
if (proto.
|
|
317
|
-
m.
|
|
410
|
+
if (proto.deployed) {
|
|
411
|
+
m.deployed = new Date(proto.deployed);
|
|
318
412
|
}
|
|
319
413
|
return m;
|
|
320
414
|
}
|
|
@@ -329,40 +423,34 @@ class Connection {
|
|
|
329
423
|
if (typeof this.id !== 'undefined') {
|
|
330
424
|
toReturn['id'] = this.id;
|
|
331
425
|
}
|
|
332
|
-
if (typeof this.
|
|
333
|
-
toReturn['
|
|
334
|
-
}
|
|
335
|
-
if (typeof this.name !== 'undefined') {
|
|
336
|
-
toReturn['name'] = this.name;
|
|
337
|
-
}
|
|
338
|
-
if (typeof this.configurationUrl !== 'undefined') {
|
|
339
|
-
toReturn['configurationUrl'] = this.configurationUrl;
|
|
340
|
-
}
|
|
341
|
-
if (typeof this.assistantKeys !== 'undefined' && this.assistantKeys !== null) {
|
|
342
|
-
toReturn['assistantKeys'] = 'toApiJson' in this.assistantKeys ? this.assistantKeys.toApiJson() : this.assistantKeys;
|
|
426
|
+
if (typeof this.deployedVersion !== 'undefined') {
|
|
427
|
+
toReturn['deployedVersion'] = this.deployedVersion;
|
|
343
428
|
}
|
|
344
|
-
if (typeof this.
|
|
345
|
-
toReturn['
|
|
429
|
+
if (typeof this.deployedBy !== 'undefined') {
|
|
430
|
+
toReturn['deployedBy'] = this.deployedBy;
|
|
346
431
|
}
|
|
347
|
-
if (typeof this.
|
|
348
|
-
toReturn['
|
|
432
|
+
if (typeof this.updated !== 'undefined' && this.updated !== null) {
|
|
433
|
+
toReturn['updated'] = 'toApiJson' in this.updated ? this.updated.toApiJson() : this.updated;
|
|
349
434
|
}
|
|
350
|
-
if (typeof this.
|
|
351
|
-
toReturn['
|
|
435
|
+
if (typeof this.description !== 'undefined') {
|
|
436
|
+
toReturn['description'] = this.description;
|
|
352
437
|
}
|
|
353
|
-
if (typeof this.
|
|
354
|
-
toReturn['
|
|
438
|
+
if (typeof this.deployed !== 'undefined' && this.deployed !== null) {
|
|
439
|
+
toReturn['deployed'] = 'toApiJson' in this.deployed ? this.deployed.toApiJson() : this.deployed;
|
|
355
440
|
}
|
|
356
441
|
return toReturn;
|
|
357
442
|
}
|
|
358
443
|
}
|
|
359
|
-
class
|
|
444
|
+
class PromptModule {
|
|
360
445
|
static fromProto(proto) {
|
|
361
|
-
let m = new
|
|
446
|
+
let m = new PromptModule();
|
|
362
447
|
m = Object.assign(m, proto);
|
|
363
448
|
if (proto.namespace) {
|
|
364
449
|
m.namespace = Namespace.fromProto(proto.namespace);
|
|
365
450
|
}
|
|
451
|
+
if (proto.updated) {
|
|
452
|
+
m.updated = new Date(proto.updated);
|
|
453
|
+
}
|
|
366
454
|
return m;
|
|
367
455
|
}
|
|
368
456
|
constructor(kwargs) {
|
|
@@ -379,23 +467,28 @@ class ConnectionKey {
|
|
|
379
467
|
if (typeof this.namespace !== 'undefined' && this.namespace !== null) {
|
|
380
468
|
toReturn['namespace'] = 'toApiJson' in this.namespace ? this.namespace.toApiJson() : this.namespace;
|
|
381
469
|
}
|
|
382
|
-
if (typeof this.
|
|
383
|
-
toReturn['
|
|
470
|
+
if (typeof this.name !== 'undefined') {
|
|
471
|
+
toReturn['name'] = this.name;
|
|
472
|
+
}
|
|
473
|
+
if (typeof this.deployedVersion !== 'undefined') {
|
|
474
|
+
toReturn['deployedVersion'] = this.deployedVersion;
|
|
475
|
+
}
|
|
476
|
+
if (typeof this.deployedBy !== 'undefined') {
|
|
477
|
+
toReturn['deployedBy'] = this.deployedBy;
|
|
478
|
+
}
|
|
479
|
+
if (typeof this.updated !== 'undefined' && this.updated !== null) {
|
|
480
|
+
toReturn['updated'] = 'toApiJson' in this.updated ? this.updated.toApiJson() : this.updated;
|
|
384
481
|
}
|
|
385
482
|
return toReturn;
|
|
386
483
|
}
|
|
387
484
|
}
|
|
388
|
-
|
|
389
|
-
function enumStringToValue$5(enumRef, value) {
|
|
390
|
-
if (typeof value === 'number') {
|
|
391
|
-
return value;
|
|
392
|
-
}
|
|
393
|
-
return enumRef[value];
|
|
394
|
-
}
|
|
395
|
-
class KeyValuePair {
|
|
485
|
+
class PromptModuleKey {
|
|
396
486
|
static fromProto(proto) {
|
|
397
|
-
let m = new
|
|
487
|
+
let m = new PromptModuleKey();
|
|
398
488
|
m = Object.assign(m, proto);
|
|
489
|
+
if (proto.namespace) {
|
|
490
|
+
m.namespace = Namespace.fromProto(proto.namespace);
|
|
491
|
+
}
|
|
399
492
|
return m;
|
|
400
493
|
}
|
|
401
494
|
constructor(kwargs) {
|
|
@@ -406,31 +499,24 @@ class KeyValuePair {
|
|
|
406
499
|
}
|
|
407
500
|
toApiJson() {
|
|
408
501
|
const toReturn = {};
|
|
409
|
-
if (typeof this.
|
|
410
|
-
toReturn['
|
|
502
|
+
if (typeof this.id !== 'undefined') {
|
|
503
|
+
toReturn['id'] = this.id;
|
|
411
504
|
}
|
|
412
|
-
if (typeof this.
|
|
413
|
-
toReturn['
|
|
505
|
+
if (typeof this.namespace !== 'undefined' && this.namespace !== null) {
|
|
506
|
+
toReturn['namespace'] = 'toApiJson' in this.namespace ? this.namespace.toApiJson() : this.namespace;
|
|
414
507
|
}
|
|
415
508
|
return toReturn;
|
|
416
509
|
}
|
|
417
510
|
}
|
|
418
|
-
|
|
419
|
-
function enumStringToValue$4(enumRef, value) {
|
|
420
|
-
if (typeof value === 'number') {
|
|
421
|
-
return value;
|
|
422
|
-
}
|
|
423
|
-
return enumRef[value];
|
|
424
|
-
}
|
|
425
|
-
class ChatAnswerFunctionExecutionJob {
|
|
511
|
+
class PromptModuleVersion {
|
|
426
512
|
static fromProto(proto) {
|
|
427
|
-
let m = new
|
|
513
|
+
let m = new PromptModuleVersion();
|
|
428
514
|
m = Object.assign(m, proto);
|
|
429
|
-
if (proto.
|
|
430
|
-
m.
|
|
515
|
+
if (proto.namespace) {
|
|
516
|
+
m.namespace = Namespace.fromProto(proto.namespace);
|
|
431
517
|
}
|
|
432
|
-
if (proto.
|
|
433
|
-
m.
|
|
518
|
+
if (proto.created) {
|
|
519
|
+
m.created = new Date(proto.created);
|
|
434
520
|
}
|
|
435
521
|
return m;
|
|
436
522
|
}
|
|
@@ -445,24 +531,30 @@ class ChatAnswerFunctionExecutionJob {
|
|
|
445
531
|
if (typeof this.id !== 'undefined') {
|
|
446
532
|
toReturn['id'] = this.id;
|
|
447
533
|
}
|
|
448
|
-
if (typeof this.
|
|
449
|
-
toReturn['
|
|
534
|
+
if (typeof this.namespace !== 'undefined' && this.namespace !== null) {
|
|
535
|
+
toReturn['namespace'] = 'toApiJson' in this.namespace ? this.namespace.toApiJson() : this.namespace;
|
|
450
536
|
}
|
|
451
|
-
if (typeof this.
|
|
452
|
-
toReturn['
|
|
537
|
+
if (typeof this.version !== 'undefined') {
|
|
538
|
+
toReturn['version'] = this.version;
|
|
453
539
|
}
|
|
454
|
-
if (typeof this.
|
|
455
|
-
toReturn['
|
|
540
|
+
if (typeof this.content !== 'undefined') {
|
|
541
|
+
toReturn['content'] = this.content;
|
|
542
|
+
}
|
|
543
|
+
if (typeof this.createdBy !== 'undefined') {
|
|
544
|
+
toReturn['createdBy'] = this.createdBy;
|
|
545
|
+
}
|
|
546
|
+
if (typeof this.created !== 'undefined' && this.created !== null) {
|
|
547
|
+
toReturn['created'] = 'toApiJson' in this.created ? this.created.toApiJson() : this.created;
|
|
456
548
|
}
|
|
457
549
|
return toReturn;
|
|
458
550
|
}
|
|
459
551
|
}
|
|
460
|
-
class
|
|
552
|
+
class PromptVersion {
|
|
461
553
|
static fromProto(proto) {
|
|
462
|
-
let m = new
|
|
554
|
+
let m = new PromptVersion();
|
|
463
555
|
m = Object.assign(m, proto);
|
|
464
|
-
if (proto.
|
|
465
|
-
m.
|
|
556
|
+
if (proto.created) {
|
|
557
|
+
m.created = new Date(proto.created);
|
|
466
558
|
}
|
|
467
559
|
return m;
|
|
468
560
|
}
|
|
@@ -474,21 +566,1202 @@ class ChatAnswerFunctionExecutionJobResult {
|
|
|
474
566
|
}
|
|
475
567
|
toApiJson() {
|
|
476
568
|
const toReturn = {};
|
|
569
|
+
if (typeof this.id !== 'undefined') {
|
|
570
|
+
toReturn['id'] = this.id;
|
|
571
|
+
}
|
|
572
|
+
if (typeof this.version !== 'undefined') {
|
|
573
|
+
toReturn['version'] = this.version;
|
|
574
|
+
}
|
|
477
575
|
if (typeof this.content !== 'undefined') {
|
|
478
576
|
toReturn['content'] = this.content;
|
|
479
577
|
}
|
|
480
|
-
if (typeof this.
|
|
481
|
-
toReturn['
|
|
578
|
+
if (typeof this.createdBy !== 'undefined') {
|
|
579
|
+
toReturn['createdBy'] = this.createdBy;
|
|
580
|
+
}
|
|
581
|
+
if (typeof this.created !== 'undefined' && this.created !== null) {
|
|
582
|
+
toReturn['created'] = 'toApiJson' in this.created ? this.created.toApiJson() : this.created;
|
|
482
583
|
}
|
|
483
584
|
return toReturn;
|
|
484
585
|
}
|
|
485
586
|
}
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
587
|
+
|
|
588
|
+
function enumStringToValue$7(enumRef, value) {
|
|
589
|
+
if (typeof value === 'number') {
|
|
590
|
+
return value;
|
|
591
|
+
}
|
|
592
|
+
return enumRef[value];
|
|
593
|
+
}
|
|
594
|
+
class Goal {
|
|
595
|
+
static fromProto(proto) {
|
|
596
|
+
let m = new Goal();
|
|
597
|
+
m = Object.assign(m, proto);
|
|
598
|
+
if (proto.namespace) {
|
|
599
|
+
m.namespace = Namespace.fromProto(proto.namespace);
|
|
600
|
+
}
|
|
601
|
+
if (proto.type) {
|
|
602
|
+
m.type = enumStringToValue$7(GoalType, proto.type);
|
|
603
|
+
}
|
|
604
|
+
if (proto.promptModules) {
|
|
605
|
+
m.promptModules = proto.promptModules.map(PromptModuleKey.fromProto);
|
|
606
|
+
}
|
|
607
|
+
if (proto.functions) {
|
|
608
|
+
m.functions = proto.functions.map(FunctionKey.fromProto);
|
|
609
|
+
}
|
|
610
|
+
if (proto.updated) {
|
|
611
|
+
m.updated = new Date(proto.updated);
|
|
612
|
+
}
|
|
613
|
+
return m;
|
|
614
|
+
}
|
|
615
|
+
constructor(kwargs) {
|
|
616
|
+
if (!kwargs) {
|
|
617
|
+
return;
|
|
618
|
+
}
|
|
619
|
+
Object.assign(this, kwargs);
|
|
620
|
+
}
|
|
621
|
+
toApiJson() {
|
|
622
|
+
const toReturn = {};
|
|
623
|
+
if (typeof this.id !== 'undefined') {
|
|
624
|
+
toReturn['id'] = this.id;
|
|
625
|
+
}
|
|
626
|
+
if (typeof this.namespace !== 'undefined' && this.namespace !== null) {
|
|
627
|
+
toReturn['namespace'] = 'toApiJson' in this.namespace ? this.namespace.toApiJson() : this.namespace;
|
|
628
|
+
}
|
|
629
|
+
if (typeof this.name !== 'undefined') {
|
|
630
|
+
toReturn['name'] = this.name;
|
|
631
|
+
}
|
|
632
|
+
if (typeof this.description !== 'undefined') {
|
|
633
|
+
toReturn['description'] = this.description;
|
|
634
|
+
}
|
|
635
|
+
if (typeof this.type !== 'undefined') {
|
|
636
|
+
toReturn['type'] = this.type;
|
|
637
|
+
}
|
|
638
|
+
if (typeof this.promptModules !== 'undefined' && this.promptModules !== null) {
|
|
639
|
+
toReturn['promptModules'] = 'toApiJson' in this.promptModules ? this.promptModules.toApiJson() : this.promptModules;
|
|
640
|
+
}
|
|
641
|
+
if (typeof this.functions !== 'undefined' && this.functions !== null) {
|
|
642
|
+
toReturn['functions'] = 'toApiJson' in this.functions ? this.functions.toApiJson() : this.functions;
|
|
643
|
+
}
|
|
644
|
+
if (typeof this.updatedBy !== 'undefined') {
|
|
645
|
+
toReturn['updatedBy'] = this.updatedBy;
|
|
646
|
+
}
|
|
647
|
+
if (typeof this.updated !== 'undefined' && this.updated !== null) {
|
|
648
|
+
toReturn['updated'] = 'toApiJson' in this.updated ? this.updated.toApiJson() : this.updated;
|
|
649
|
+
}
|
|
650
|
+
return toReturn;
|
|
651
|
+
}
|
|
652
|
+
}
|
|
653
|
+
class GoalKey {
|
|
654
|
+
static fromProto(proto) {
|
|
655
|
+
let m = new GoalKey();
|
|
656
|
+
m = Object.assign(m, proto);
|
|
657
|
+
if (proto.namespace) {
|
|
658
|
+
m.namespace = Namespace.fromProto(proto.namespace);
|
|
659
|
+
}
|
|
660
|
+
return m;
|
|
661
|
+
}
|
|
662
|
+
constructor(kwargs) {
|
|
663
|
+
if (!kwargs) {
|
|
664
|
+
return;
|
|
665
|
+
}
|
|
666
|
+
Object.assign(this, kwargs);
|
|
667
|
+
}
|
|
668
|
+
toApiJson() {
|
|
669
|
+
const toReturn = {};
|
|
670
|
+
if (typeof this.id !== 'undefined') {
|
|
671
|
+
toReturn['id'] = this.id;
|
|
672
|
+
}
|
|
673
|
+
if (typeof this.namespace !== 'undefined' && this.namespace !== null) {
|
|
674
|
+
toReturn['namespace'] = 'toApiJson' in this.namespace ? this.namespace.toApiJson() : this.namespace;
|
|
675
|
+
}
|
|
676
|
+
return toReturn;
|
|
677
|
+
}
|
|
678
|
+
}
|
|
679
|
+
|
|
680
|
+
function enumStringToValue$6(enumRef, value) {
|
|
681
|
+
if (typeof value === 'number') {
|
|
682
|
+
return value;
|
|
683
|
+
}
|
|
684
|
+
return enumRef[value];
|
|
685
|
+
}
|
|
686
|
+
class Assistant {
|
|
687
|
+
static fromProto(proto) {
|
|
688
|
+
let m = new Assistant();
|
|
689
|
+
m = Object.assign(m, proto);
|
|
690
|
+
if (proto.namespace) {
|
|
691
|
+
m.namespace = Namespace.fromProto(proto.namespace);
|
|
692
|
+
}
|
|
693
|
+
if (proto.type) {
|
|
694
|
+
m.type = enumStringToValue$6(AssistantType, proto.type);
|
|
695
|
+
}
|
|
696
|
+
if (proto.config) {
|
|
697
|
+
m.config = Config.fromProto(proto.config);
|
|
698
|
+
}
|
|
699
|
+
if (proto.configurableGoals) {
|
|
700
|
+
m.configurableGoals = proto.configurableGoals.map(ConfigurableGoal.fromProto);
|
|
701
|
+
}
|
|
702
|
+
return m;
|
|
703
|
+
}
|
|
704
|
+
constructor(kwargs) {
|
|
705
|
+
if (!kwargs) {
|
|
706
|
+
return;
|
|
707
|
+
}
|
|
708
|
+
Object.assign(this, kwargs);
|
|
709
|
+
}
|
|
710
|
+
toApiJson() {
|
|
711
|
+
const toReturn = {};
|
|
712
|
+
if (typeof this.id !== 'undefined') {
|
|
713
|
+
toReturn['id'] = this.id;
|
|
714
|
+
}
|
|
715
|
+
if (typeof this.namespace !== 'undefined' && this.namespace !== null) {
|
|
716
|
+
toReturn['namespace'] = 'toApiJson' in this.namespace ? this.namespace.toApiJson() : this.namespace;
|
|
717
|
+
}
|
|
718
|
+
if (typeof this.name !== 'undefined') {
|
|
719
|
+
toReturn['name'] = this.name;
|
|
720
|
+
}
|
|
721
|
+
if (typeof this.type !== 'undefined') {
|
|
722
|
+
toReturn['type'] = this.type;
|
|
723
|
+
}
|
|
724
|
+
if (typeof this.avatarUrl !== 'undefined') {
|
|
725
|
+
toReturn['avatarUrl'] = this.avatarUrl;
|
|
726
|
+
}
|
|
727
|
+
if (typeof this.config !== 'undefined' && this.config !== null) {
|
|
728
|
+
toReturn['config'] = 'toApiJson' in this.config ? this.config.toApiJson() : this.config;
|
|
729
|
+
}
|
|
730
|
+
if (typeof this.configurableGoals !== 'undefined' && this.configurableGoals !== null) {
|
|
731
|
+
toReturn['configurableGoals'] = 'toApiJson' in this.configurableGoals ? this.configurableGoals.toApiJson() : this.configurableGoals;
|
|
732
|
+
}
|
|
733
|
+
return toReturn;
|
|
734
|
+
}
|
|
735
|
+
}
|
|
736
|
+
class AssistantKey {
|
|
737
|
+
static fromProto(proto) {
|
|
738
|
+
let m = new AssistantKey();
|
|
739
|
+
m = Object.assign(m, proto);
|
|
740
|
+
if (proto.namespace) {
|
|
741
|
+
m.namespace = Namespace.fromProto(proto.namespace);
|
|
742
|
+
}
|
|
743
|
+
return m;
|
|
744
|
+
}
|
|
745
|
+
constructor(kwargs) {
|
|
746
|
+
if (!kwargs) {
|
|
747
|
+
return;
|
|
748
|
+
}
|
|
749
|
+
Object.assign(this, kwargs);
|
|
750
|
+
}
|
|
751
|
+
toApiJson() {
|
|
752
|
+
const toReturn = {};
|
|
753
|
+
if (typeof this.id !== 'undefined') {
|
|
754
|
+
toReturn['id'] = this.id;
|
|
755
|
+
}
|
|
756
|
+
if (typeof this.namespace !== 'undefined' && this.namespace !== null) {
|
|
757
|
+
toReturn['namespace'] = 'toApiJson' in this.namespace ? this.namespace.toApiJson() : this.namespace;
|
|
758
|
+
}
|
|
759
|
+
return toReturn;
|
|
760
|
+
}
|
|
761
|
+
}
|
|
762
|
+
class Config {
|
|
763
|
+
static fromProto(proto) {
|
|
764
|
+
let m = new Config();
|
|
765
|
+
m = Object.assign(m, proto);
|
|
766
|
+
if (proto.inboxConfig) {
|
|
767
|
+
m.inboxConfig = ConfigInboxConfig.fromProto(proto.inboxConfig);
|
|
768
|
+
}
|
|
769
|
+
return m;
|
|
770
|
+
}
|
|
771
|
+
constructor(kwargs) {
|
|
772
|
+
if (!kwargs) {
|
|
773
|
+
return;
|
|
774
|
+
}
|
|
775
|
+
Object.assign(this, kwargs);
|
|
776
|
+
}
|
|
777
|
+
toApiJson() {
|
|
778
|
+
const toReturn = {};
|
|
779
|
+
if (typeof this.inboxConfig !== 'undefined' && this.inboxConfig !== null) {
|
|
780
|
+
toReturn['inboxConfig'] = 'toApiJson' in this.inboxConfig ? this.inboxConfig.toApiJson() : this.inboxConfig;
|
|
781
|
+
}
|
|
782
|
+
return toReturn;
|
|
783
|
+
}
|
|
784
|
+
}
|
|
785
|
+
class ConfigurableGoal {
|
|
786
|
+
static fromProto(proto) {
|
|
787
|
+
let m = new ConfigurableGoal();
|
|
788
|
+
m = Object.assign(m, proto);
|
|
789
|
+
if (proto.goalKey) {
|
|
790
|
+
m.goalKey = GoalKey.fromProto(proto.goalKey);
|
|
791
|
+
}
|
|
792
|
+
return m;
|
|
793
|
+
}
|
|
794
|
+
constructor(kwargs) {
|
|
795
|
+
if (!kwargs) {
|
|
796
|
+
return;
|
|
797
|
+
}
|
|
798
|
+
Object.assign(this, kwargs);
|
|
799
|
+
}
|
|
800
|
+
toApiJson() {
|
|
801
|
+
const toReturn = {};
|
|
802
|
+
if (typeof this.goalKey !== 'undefined' && this.goalKey !== null) {
|
|
803
|
+
toReturn['goalKey'] = 'toApiJson' in this.goalKey ? this.goalKey.toApiJson() : this.goalKey;
|
|
804
|
+
}
|
|
805
|
+
return toReturn;
|
|
806
|
+
}
|
|
807
|
+
}
|
|
808
|
+
class ConfigInboxConfig {
|
|
809
|
+
static fromProto(proto) {
|
|
810
|
+
let m = new ConfigInboxConfig();
|
|
811
|
+
m = Object.assign(m, proto);
|
|
812
|
+
return m;
|
|
813
|
+
}
|
|
814
|
+
constructor(kwargs) {
|
|
815
|
+
if (!kwargs) {
|
|
816
|
+
return;
|
|
817
|
+
}
|
|
818
|
+
Object.assign(this, kwargs);
|
|
819
|
+
}
|
|
820
|
+
toApiJson() {
|
|
821
|
+
const toReturn = {};
|
|
822
|
+
if (typeof this.leadCaptureEnabled !== 'undefined') {
|
|
823
|
+
toReturn['leadCaptureEnabled'] = this.leadCaptureEnabled;
|
|
824
|
+
}
|
|
825
|
+
if (typeof this.additionalInstructions !== 'undefined') {
|
|
826
|
+
toReturn['additionalInstructions'] = this.additionalInstructions;
|
|
827
|
+
}
|
|
828
|
+
return toReturn;
|
|
829
|
+
}
|
|
830
|
+
}
|
|
831
|
+
|
|
832
|
+
function enumStringToValue$5(enumRef, value) {
|
|
833
|
+
if (typeof value === 'number') {
|
|
834
|
+
return value;
|
|
835
|
+
}
|
|
836
|
+
return enumRef[value];
|
|
837
|
+
}
|
|
838
|
+
class Connection {
|
|
839
|
+
static fromProto(proto) {
|
|
840
|
+
let m = new Connection();
|
|
841
|
+
m = Object.assign(m, proto);
|
|
842
|
+
if (proto.namespace) {
|
|
843
|
+
m.namespace = Namespace.fromProto(proto.namespace);
|
|
844
|
+
}
|
|
845
|
+
if (proto.assistantKeys) {
|
|
846
|
+
m.assistantKeys = proto.assistantKeys.map(AssistantKey.fromProto);
|
|
847
|
+
}
|
|
848
|
+
return m;
|
|
849
|
+
}
|
|
850
|
+
constructor(kwargs) {
|
|
851
|
+
if (!kwargs) {
|
|
852
|
+
return;
|
|
853
|
+
}
|
|
854
|
+
Object.assign(this, kwargs);
|
|
855
|
+
}
|
|
856
|
+
toApiJson() {
|
|
857
|
+
const toReturn = {};
|
|
858
|
+
if (typeof this.id !== 'undefined') {
|
|
859
|
+
toReturn['id'] = this.id;
|
|
860
|
+
}
|
|
861
|
+
if (typeof this.namespace !== 'undefined' && this.namespace !== null) {
|
|
862
|
+
toReturn['namespace'] = 'toApiJson' in this.namespace ? this.namespace.toApiJson() : this.namespace;
|
|
863
|
+
}
|
|
864
|
+
if (typeof this.name !== 'undefined') {
|
|
865
|
+
toReturn['name'] = this.name;
|
|
866
|
+
}
|
|
867
|
+
if (typeof this.configurationUrl !== 'undefined') {
|
|
868
|
+
toReturn['configurationUrl'] = this.configurationUrl;
|
|
869
|
+
}
|
|
870
|
+
if (typeof this.assistantKeys !== 'undefined' && this.assistantKeys !== null) {
|
|
871
|
+
toReturn['assistantKeys'] = 'toApiJson' in this.assistantKeys ? this.assistantKeys.toApiJson() : this.assistantKeys;
|
|
872
|
+
}
|
|
873
|
+
if (typeof this.connectionType !== 'undefined') {
|
|
874
|
+
toReturn['connectionType'] = this.connectionType;
|
|
875
|
+
}
|
|
876
|
+
if (typeof this.connectionTypeName !== 'undefined') {
|
|
877
|
+
toReturn['connectionTypeName'] = this.connectionTypeName;
|
|
878
|
+
}
|
|
879
|
+
if (typeof this.iconUrl !== 'undefined') {
|
|
880
|
+
toReturn['iconUrl'] = this.iconUrl;
|
|
881
|
+
}
|
|
882
|
+
if (typeof this.isConnectionLocked !== 'undefined') {
|
|
883
|
+
toReturn['isConnectionLocked'] = this.isConnectionLocked;
|
|
884
|
+
}
|
|
885
|
+
return toReturn;
|
|
886
|
+
}
|
|
887
|
+
}
|
|
888
|
+
class ConnectionKey {
|
|
889
|
+
static fromProto(proto) {
|
|
890
|
+
let m = new ConnectionKey();
|
|
891
|
+
m = Object.assign(m, proto);
|
|
892
|
+
if (proto.namespace) {
|
|
893
|
+
m.namespace = Namespace.fromProto(proto.namespace);
|
|
894
|
+
}
|
|
895
|
+
return m;
|
|
896
|
+
}
|
|
897
|
+
constructor(kwargs) {
|
|
898
|
+
if (!kwargs) {
|
|
899
|
+
return;
|
|
900
|
+
}
|
|
901
|
+
Object.assign(this, kwargs);
|
|
902
|
+
}
|
|
903
|
+
toApiJson() {
|
|
904
|
+
const toReturn = {};
|
|
905
|
+
if (typeof this.id !== 'undefined') {
|
|
906
|
+
toReturn['id'] = this.id;
|
|
907
|
+
}
|
|
908
|
+
if (typeof this.namespace !== 'undefined' && this.namespace !== null) {
|
|
909
|
+
toReturn['namespace'] = 'toApiJson' in this.namespace ? this.namespace.toApiJson() : this.namespace;
|
|
910
|
+
}
|
|
911
|
+
if (typeof this.connectionType !== 'undefined') {
|
|
912
|
+
toReturn['connectionType'] = this.connectionType;
|
|
913
|
+
}
|
|
914
|
+
return toReturn;
|
|
915
|
+
}
|
|
916
|
+
}
|
|
917
|
+
|
|
918
|
+
function enumStringToValue$4(enumRef, value) {
|
|
919
|
+
if (typeof value === 'number') {
|
|
920
|
+
return value;
|
|
921
|
+
}
|
|
922
|
+
return enumRef[value];
|
|
923
|
+
}
|
|
924
|
+
class KeyValuePair {
|
|
925
|
+
static fromProto(proto) {
|
|
926
|
+
let m = new KeyValuePair();
|
|
927
|
+
m = Object.assign(m, proto);
|
|
928
|
+
return m;
|
|
929
|
+
}
|
|
930
|
+
constructor(kwargs) {
|
|
931
|
+
if (!kwargs) {
|
|
932
|
+
return;
|
|
933
|
+
}
|
|
934
|
+
Object.assign(this, kwargs);
|
|
935
|
+
}
|
|
936
|
+
toApiJson() {
|
|
937
|
+
const toReturn = {};
|
|
938
|
+
if (typeof this.key !== 'undefined') {
|
|
939
|
+
toReturn['key'] = this.key;
|
|
940
|
+
}
|
|
941
|
+
if (typeof this.value !== 'undefined') {
|
|
942
|
+
toReturn['value'] = this.value;
|
|
943
|
+
}
|
|
944
|
+
return toReturn;
|
|
945
|
+
}
|
|
946
|
+
}
|
|
947
|
+
|
|
948
|
+
function enumStringToValue$3(enumRef, value) {
|
|
949
|
+
if (typeof value === 'number') {
|
|
950
|
+
return value;
|
|
951
|
+
}
|
|
952
|
+
return enumRef[value];
|
|
953
|
+
}
|
|
954
|
+
class ChatAnswerFunctionExecutionJob {
|
|
955
|
+
static fromProto(proto) {
|
|
956
|
+
let m = new ChatAnswerFunctionExecutionJob();
|
|
957
|
+
m = Object.assign(m, proto);
|
|
958
|
+
if (proto.status) {
|
|
959
|
+
m.status = enumStringToValue$3(ChatAnswerFunctionExecutionJobStatus, proto.status);
|
|
960
|
+
}
|
|
961
|
+
if (proto.result) {
|
|
962
|
+
m.result = ChatAnswerFunctionExecutionJobResult.fromProto(proto.result);
|
|
963
|
+
}
|
|
964
|
+
return m;
|
|
965
|
+
}
|
|
966
|
+
constructor(kwargs) {
|
|
967
|
+
if (!kwargs) {
|
|
968
|
+
return;
|
|
969
|
+
}
|
|
970
|
+
Object.assign(this, kwargs);
|
|
971
|
+
}
|
|
972
|
+
toApiJson() {
|
|
973
|
+
const toReturn = {};
|
|
974
|
+
if (typeof this.id !== 'undefined') {
|
|
975
|
+
toReturn['id'] = this.id;
|
|
976
|
+
}
|
|
977
|
+
if (typeof this.status !== 'undefined') {
|
|
978
|
+
toReturn['status'] = this.status;
|
|
979
|
+
}
|
|
980
|
+
if (typeof this.result !== 'undefined' && this.result !== null) {
|
|
981
|
+
toReturn['result'] = 'toApiJson' in this.result ? this.result.toApiJson() : this.result;
|
|
982
|
+
}
|
|
983
|
+
if (typeof this.nextJobId !== 'undefined') {
|
|
984
|
+
toReturn['nextJobId'] = this.nextJobId;
|
|
985
|
+
}
|
|
986
|
+
return toReturn;
|
|
987
|
+
}
|
|
988
|
+
}
|
|
989
|
+
class ChatAnswerFunctionExecutionJobResult {
|
|
990
|
+
static fromProto(proto) {
|
|
991
|
+
let m = new ChatAnswerFunctionExecutionJobResult();
|
|
992
|
+
m = Object.assign(m, proto);
|
|
993
|
+
if (proto.metadata) {
|
|
994
|
+
m.metadata = proto.metadata.map(KeyValuePair.fromProto);
|
|
995
|
+
}
|
|
996
|
+
return m;
|
|
997
|
+
}
|
|
998
|
+
constructor(kwargs) {
|
|
999
|
+
if (!kwargs) {
|
|
1000
|
+
return;
|
|
1001
|
+
}
|
|
1002
|
+
Object.assign(this, kwargs);
|
|
1003
|
+
}
|
|
1004
|
+
toApiJson() {
|
|
1005
|
+
const toReturn = {};
|
|
1006
|
+
if (typeof this.content !== 'undefined') {
|
|
1007
|
+
toReturn['content'] = this.content;
|
|
1008
|
+
}
|
|
1009
|
+
if (typeof this.metadata !== 'undefined' && this.metadata !== null) {
|
|
1010
|
+
toReturn['metadata'] = 'toApiJson' in this.metadata ? this.metadata.toApiJson() : this.metadata;
|
|
1011
|
+
}
|
|
1012
|
+
return toReturn;
|
|
1013
|
+
}
|
|
1014
|
+
}
|
|
1015
|
+
class ChatMessage {
|
|
1016
|
+
static fromProto(proto) {
|
|
1017
|
+
let m = new ChatMessage();
|
|
1018
|
+
m = Object.assign(m, proto);
|
|
1019
|
+
if (proto.role) {
|
|
1020
|
+
m.role = enumStringToValue$3(ChatMessageRole, proto.role);
|
|
1021
|
+
}
|
|
1022
|
+
return m;
|
|
1023
|
+
}
|
|
1024
|
+
constructor(kwargs) {
|
|
1025
|
+
if (!kwargs) {
|
|
1026
|
+
return;
|
|
1027
|
+
}
|
|
1028
|
+
Object.assign(this, kwargs);
|
|
1029
|
+
}
|
|
1030
|
+
toApiJson() {
|
|
1031
|
+
const toReturn = {};
|
|
1032
|
+
if (typeof this.role !== 'undefined') {
|
|
1033
|
+
toReturn['role'] = this.role;
|
|
1034
|
+
}
|
|
1035
|
+
if (typeof this.content !== 'undefined') {
|
|
1036
|
+
toReturn['content'] = this.content;
|
|
1037
|
+
}
|
|
1038
|
+
return toReturn;
|
|
1039
|
+
}
|
|
1040
|
+
}
|
|
1041
|
+
class ChatUserInfo {
|
|
1042
|
+
static fromProto(proto) {
|
|
1043
|
+
let m = new ChatUserInfo();
|
|
1044
|
+
m = Object.assign(m, proto);
|
|
1045
|
+
return m;
|
|
1046
|
+
}
|
|
1047
|
+
constructor(kwargs) {
|
|
1048
|
+
if (!kwargs) {
|
|
1049
|
+
return;
|
|
1050
|
+
}
|
|
1051
|
+
Object.assign(this, kwargs);
|
|
1052
|
+
}
|
|
1053
|
+
toApiJson() {
|
|
1054
|
+
const toReturn = {};
|
|
1055
|
+
if (typeof this.name !== 'undefined') {
|
|
1056
|
+
toReturn['name'] = this.name;
|
|
1057
|
+
}
|
|
1058
|
+
if (typeof this.email !== 'undefined') {
|
|
1059
|
+
toReturn['email'] = this.email;
|
|
1060
|
+
}
|
|
1061
|
+
if (typeof this.phone !== 'undefined') {
|
|
1062
|
+
toReturn['phone'] = this.phone;
|
|
1063
|
+
}
|
|
1064
|
+
if (typeof this.address1 !== 'undefined') {
|
|
1065
|
+
toReturn['address1'] = this.address1;
|
|
1066
|
+
}
|
|
1067
|
+
if (typeof this.address2 !== 'undefined') {
|
|
1068
|
+
toReturn['address2'] = this.address2;
|
|
1069
|
+
}
|
|
1070
|
+
if (typeof this.city !== 'undefined') {
|
|
1071
|
+
toReturn['city'] = this.city;
|
|
1072
|
+
}
|
|
1073
|
+
if (typeof this.state !== 'undefined') {
|
|
1074
|
+
toReturn['state'] = this.state;
|
|
1075
|
+
}
|
|
1076
|
+
if (typeof this.country !== 'undefined') {
|
|
1077
|
+
toReturn['country'] = this.country;
|
|
1078
|
+
}
|
|
1079
|
+
if (typeof this.zipCode !== 'undefined') {
|
|
1080
|
+
toReturn['zipCode'] = this.zipCode;
|
|
1081
|
+
}
|
|
1082
|
+
return toReturn;
|
|
1083
|
+
}
|
|
1084
|
+
}
|
|
1085
|
+
|
|
1086
|
+
function enumStringToValue$2(enumRef, value) {
|
|
1087
|
+
if (typeof value === 'number') {
|
|
1088
|
+
return value;
|
|
1089
|
+
}
|
|
1090
|
+
return enumRef[value];
|
|
1091
|
+
}
|
|
1092
|
+
class Access {
|
|
1093
|
+
static fromProto(proto) {
|
|
1094
|
+
let m = new Access();
|
|
1095
|
+
m = Object.assign(m, proto);
|
|
1096
|
+
return m;
|
|
1097
|
+
}
|
|
1098
|
+
constructor(kwargs) {
|
|
1099
|
+
if (!kwargs) {
|
|
1100
|
+
return;
|
|
1101
|
+
}
|
|
1102
|
+
Object.assign(this, kwargs);
|
|
1103
|
+
}
|
|
1104
|
+
toApiJson() {
|
|
1105
|
+
const toReturn = {};
|
|
1106
|
+
if (typeof this.scope !== 'undefined') {
|
|
1107
|
+
toReturn['scope'] = this.scope;
|
|
1108
|
+
}
|
|
1109
|
+
if (typeof this.public !== 'undefined') {
|
|
1110
|
+
toReturn['public'] = this.public;
|
|
1111
|
+
}
|
|
1112
|
+
return toReturn;
|
|
1113
|
+
}
|
|
1114
|
+
}
|
|
1115
|
+
|
|
1116
|
+
function enumStringToValue$1(enumRef, value) {
|
|
1117
|
+
if (typeof value === 'number') {
|
|
1118
|
+
return value;
|
|
1119
|
+
}
|
|
1120
|
+
return enumRef[value];
|
|
1121
|
+
}
|
|
1122
|
+
class PagedRequestOptions {
|
|
1123
|
+
static fromProto(proto) {
|
|
1124
|
+
let m = new PagedRequestOptions();
|
|
1125
|
+
m = Object.assign(m, proto);
|
|
1126
|
+
if (proto.pageSize) {
|
|
1127
|
+
m.pageSize = parseInt(proto.pageSize, 10);
|
|
1128
|
+
}
|
|
1129
|
+
return m;
|
|
1130
|
+
}
|
|
1131
|
+
constructor(kwargs) {
|
|
1132
|
+
if (!kwargs) {
|
|
1133
|
+
return;
|
|
1134
|
+
}
|
|
1135
|
+
Object.assign(this, kwargs);
|
|
1136
|
+
}
|
|
1137
|
+
toApiJson() {
|
|
1138
|
+
const toReturn = {};
|
|
1139
|
+
if (typeof this.cursor !== 'undefined') {
|
|
1140
|
+
toReturn['cursor'] = this.cursor;
|
|
1141
|
+
}
|
|
1142
|
+
if (typeof this.pageSize !== 'undefined') {
|
|
1143
|
+
toReturn['pageSize'] = this.pageSize;
|
|
1144
|
+
}
|
|
1145
|
+
return toReturn;
|
|
1146
|
+
}
|
|
1147
|
+
}
|
|
1148
|
+
class PagedResponseMetadata {
|
|
1149
|
+
static fromProto(proto) {
|
|
1150
|
+
let m = new PagedResponseMetadata();
|
|
1151
|
+
m = Object.assign(m, proto);
|
|
1152
|
+
if (proto.totalResults) {
|
|
1153
|
+
m.totalResults = parseInt(proto.totalResults, 10);
|
|
1154
|
+
}
|
|
1155
|
+
return m;
|
|
1156
|
+
}
|
|
1157
|
+
constructor(kwargs) {
|
|
1158
|
+
if (!kwargs) {
|
|
1159
|
+
return;
|
|
1160
|
+
}
|
|
1161
|
+
Object.assign(this, kwargs);
|
|
1162
|
+
}
|
|
1163
|
+
toApiJson() {
|
|
1164
|
+
const toReturn = {};
|
|
1165
|
+
if (typeof this.nextCursor !== 'undefined') {
|
|
1166
|
+
toReturn['nextCursor'] = this.nextCursor;
|
|
1167
|
+
}
|
|
1168
|
+
if (typeof this.hasMore !== 'undefined') {
|
|
1169
|
+
toReturn['hasMore'] = this.hasMore;
|
|
1170
|
+
}
|
|
1171
|
+
if (typeof this.totalResults !== 'undefined') {
|
|
1172
|
+
toReturn['totalResults'] = this.totalResults;
|
|
1173
|
+
}
|
|
1174
|
+
return toReturn;
|
|
1175
|
+
}
|
|
1176
|
+
}
|
|
1177
|
+
|
|
1178
|
+
function enumStringToValue(enumRef, value) {
|
|
1179
|
+
if (typeof value === 'number') {
|
|
1180
|
+
return value;
|
|
1181
|
+
}
|
|
1182
|
+
return enumRef[value];
|
|
1183
|
+
}
|
|
1184
|
+
class SetAssistantConnectionsRequestConnectionState {
|
|
1185
|
+
static fromProto(proto) {
|
|
1186
|
+
let m = new SetAssistantConnectionsRequestConnectionState();
|
|
1187
|
+
m = Object.assign(m, proto);
|
|
1188
|
+
if (proto.connectionKey) {
|
|
1189
|
+
m.connectionKey = ConnectionKey.fromProto(proto.connectionKey);
|
|
1190
|
+
}
|
|
1191
|
+
return m;
|
|
1192
|
+
}
|
|
1193
|
+
constructor(kwargs) {
|
|
1194
|
+
if (!kwargs) {
|
|
1195
|
+
return;
|
|
1196
|
+
}
|
|
1197
|
+
Object.assign(this, kwargs);
|
|
1198
|
+
}
|
|
1199
|
+
toApiJson() {
|
|
1200
|
+
const toReturn = {};
|
|
1201
|
+
if (typeof this.connectionKey !== 'undefined' && this.connectionKey !== null) {
|
|
1202
|
+
toReturn['connectionKey'] = 'toApiJson' in this.connectionKey ? this.connectionKey.toApiJson() : this.connectionKey;
|
|
1203
|
+
}
|
|
1204
|
+
if (typeof this.isAssociated !== 'undefined') {
|
|
1205
|
+
toReturn['isAssociated'] = this.isAssociated;
|
|
1206
|
+
}
|
|
1207
|
+
return toReturn;
|
|
1208
|
+
}
|
|
1209
|
+
}
|
|
1210
|
+
class CreatePromptModuleRequest {
|
|
1211
|
+
static fromProto(proto) {
|
|
1212
|
+
let m = new CreatePromptModuleRequest();
|
|
1213
|
+
m = Object.assign(m, proto);
|
|
1214
|
+
if (proto.namespace) {
|
|
1215
|
+
m.namespace = Namespace.fromProto(proto.namespace);
|
|
1216
|
+
}
|
|
1217
|
+
return m;
|
|
1218
|
+
}
|
|
1219
|
+
constructor(kwargs) {
|
|
1220
|
+
if (!kwargs) {
|
|
1221
|
+
return;
|
|
1222
|
+
}
|
|
1223
|
+
Object.assign(this, kwargs);
|
|
1224
|
+
}
|
|
1225
|
+
toApiJson() {
|
|
1226
|
+
const toReturn = {};
|
|
1227
|
+
if (typeof this.id !== 'undefined') {
|
|
1228
|
+
toReturn['id'] = this.id;
|
|
1229
|
+
}
|
|
1230
|
+
if (typeof this.namespace !== 'undefined' && this.namespace !== null) {
|
|
1231
|
+
toReturn['namespace'] = 'toApiJson' in this.namespace ? this.namespace.toApiJson() : this.namespace;
|
|
1232
|
+
}
|
|
1233
|
+
if (typeof this.content !== 'undefined') {
|
|
1234
|
+
toReturn['content'] = this.content;
|
|
1235
|
+
}
|
|
1236
|
+
return toReturn;
|
|
1237
|
+
}
|
|
1238
|
+
}
|
|
1239
|
+
class CreatePromptRequest {
|
|
1240
|
+
static fromProto(proto) {
|
|
1241
|
+
let m = new CreatePromptRequest();
|
|
1242
|
+
m = Object.assign(m, proto);
|
|
1243
|
+
return m;
|
|
1244
|
+
}
|
|
1245
|
+
constructor(kwargs) {
|
|
1246
|
+
if (!kwargs) {
|
|
1247
|
+
return;
|
|
1248
|
+
}
|
|
1249
|
+
Object.assign(this, kwargs);
|
|
1250
|
+
}
|
|
1251
|
+
toApiJson() {
|
|
1252
|
+
const toReturn = {};
|
|
1253
|
+
if (typeof this.id !== 'undefined') {
|
|
1254
|
+
toReturn['id'] = this.id;
|
|
1255
|
+
}
|
|
1256
|
+
if (typeof this.content !== 'undefined') {
|
|
1257
|
+
toReturn['content'] = this.content;
|
|
1258
|
+
}
|
|
1259
|
+
if (typeof this.description !== 'undefined') {
|
|
1260
|
+
toReturn['description'] = this.description;
|
|
1261
|
+
}
|
|
1262
|
+
return toReturn;
|
|
1263
|
+
}
|
|
1264
|
+
}
|
|
1265
|
+
class DeleteAssistantRequest {
|
|
1266
|
+
static fromProto(proto) {
|
|
1267
|
+
let m = new DeleteAssistantRequest();
|
|
1268
|
+
m = Object.assign(m, proto);
|
|
1269
|
+
if (proto.namespace) {
|
|
1270
|
+
m.namespace = Namespace.fromProto(proto.namespace);
|
|
1271
|
+
}
|
|
1272
|
+
return m;
|
|
1273
|
+
}
|
|
1274
|
+
constructor(kwargs) {
|
|
1275
|
+
if (!kwargs) {
|
|
1276
|
+
return;
|
|
1277
|
+
}
|
|
1278
|
+
Object.assign(this, kwargs);
|
|
1279
|
+
}
|
|
1280
|
+
toApiJson() {
|
|
1281
|
+
const toReturn = {};
|
|
1282
|
+
if (typeof this.id !== 'undefined') {
|
|
1283
|
+
toReturn['id'] = this.id;
|
|
1284
|
+
}
|
|
1285
|
+
if (typeof this.namespace !== 'undefined' && this.namespace !== null) {
|
|
1286
|
+
toReturn['namespace'] = 'toApiJson' in this.namespace ? this.namespace.toApiJson() : this.namespace;
|
|
1287
|
+
}
|
|
1288
|
+
return toReturn;
|
|
1289
|
+
}
|
|
1290
|
+
}
|
|
1291
|
+
class DeleteConnectionRequest {
|
|
1292
|
+
static fromProto(proto) {
|
|
1293
|
+
let m = new DeleteConnectionRequest();
|
|
1294
|
+
m = Object.assign(m, proto);
|
|
1295
|
+
if (proto.namespace) {
|
|
1296
|
+
m.namespace = Namespace.fromProto(proto.namespace);
|
|
1297
|
+
}
|
|
1298
|
+
return m;
|
|
1299
|
+
}
|
|
1300
|
+
constructor(kwargs) {
|
|
1301
|
+
if (!kwargs) {
|
|
1302
|
+
return;
|
|
1303
|
+
}
|
|
1304
|
+
Object.assign(this, kwargs);
|
|
1305
|
+
}
|
|
1306
|
+
toApiJson() {
|
|
1307
|
+
const toReturn = {};
|
|
1308
|
+
if (typeof this.id !== 'undefined') {
|
|
1309
|
+
toReturn['id'] = this.id;
|
|
1310
|
+
}
|
|
1311
|
+
if (typeof this.connectionType !== 'undefined') {
|
|
1312
|
+
toReturn['connectionType'] = this.connectionType;
|
|
1313
|
+
}
|
|
1314
|
+
if (typeof this.namespace !== 'undefined' && this.namespace !== null) {
|
|
1315
|
+
toReturn['namespace'] = 'toApiJson' in this.namespace ? this.namespace.toApiJson() : this.namespace;
|
|
1316
|
+
}
|
|
1317
|
+
return toReturn;
|
|
1318
|
+
}
|
|
1319
|
+
}
|
|
1320
|
+
class DeleteFunctionRequest {
|
|
1321
|
+
static fromProto(proto) {
|
|
1322
|
+
let m = new DeleteFunctionRequest();
|
|
1323
|
+
m = Object.assign(m, proto);
|
|
1324
|
+
if (proto.namespace) {
|
|
1325
|
+
m.namespace = Namespace.fromProto(proto.namespace);
|
|
1326
|
+
}
|
|
1327
|
+
return m;
|
|
1328
|
+
}
|
|
1329
|
+
constructor(kwargs) {
|
|
1330
|
+
if (!kwargs) {
|
|
1331
|
+
return;
|
|
1332
|
+
}
|
|
1333
|
+
Object.assign(this, kwargs);
|
|
1334
|
+
}
|
|
1335
|
+
toApiJson() {
|
|
1336
|
+
const toReturn = {};
|
|
1337
|
+
if (typeof this.id !== 'undefined') {
|
|
1338
|
+
toReturn['id'] = this.id;
|
|
1339
|
+
}
|
|
1340
|
+
if (typeof this.namespace !== 'undefined' && this.namespace !== null) {
|
|
1341
|
+
toReturn['namespace'] = 'toApiJson' in this.namespace ? this.namespace.toApiJson() : this.namespace;
|
|
1342
|
+
}
|
|
1343
|
+
return toReturn;
|
|
1344
|
+
}
|
|
1345
|
+
}
|
|
1346
|
+
class DeleteGoalRequest {
|
|
1347
|
+
static fromProto(proto) {
|
|
1348
|
+
let m = new DeleteGoalRequest();
|
|
1349
|
+
m = Object.assign(m, proto);
|
|
1350
|
+
if (proto.namespace) {
|
|
1351
|
+
m.namespace = Namespace.fromProto(proto.namespace);
|
|
1352
|
+
}
|
|
1353
|
+
return m;
|
|
1354
|
+
}
|
|
1355
|
+
constructor(kwargs) {
|
|
1356
|
+
if (!kwargs) {
|
|
1357
|
+
return;
|
|
1358
|
+
}
|
|
1359
|
+
Object.assign(this, kwargs);
|
|
1360
|
+
}
|
|
1361
|
+
toApiJson() {
|
|
1362
|
+
const toReturn = {};
|
|
1363
|
+
if (typeof this.id !== 'undefined') {
|
|
1364
|
+
toReturn['id'] = this.id;
|
|
1365
|
+
}
|
|
1366
|
+
if (typeof this.namespace !== 'undefined' && this.namespace !== null) {
|
|
1367
|
+
toReturn['namespace'] = 'toApiJson' in this.namespace ? this.namespace.toApiJson() : this.namespace;
|
|
1368
|
+
}
|
|
1369
|
+
return toReturn;
|
|
1370
|
+
}
|
|
1371
|
+
}
|
|
1372
|
+
class DeletePromptModuleRequest {
|
|
1373
|
+
static fromProto(proto) {
|
|
1374
|
+
let m = new DeletePromptModuleRequest();
|
|
1375
|
+
m = Object.assign(m, proto);
|
|
1376
|
+
if (proto.namespace) {
|
|
1377
|
+
m.namespace = Namespace.fromProto(proto.namespace);
|
|
1378
|
+
}
|
|
1379
|
+
return m;
|
|
1380
|
+
}
|
|
1381
|
+
constructor(kwargs) {
|
|
1382
|
+
if (!kwargs) {
|
|
1383
|
+
return;
|
|
1384
|
+
}
|
|
1385
|
+
Object.assign(this, kwargs);
|
|
1386
|
+
}
|
|
1387
|
+
toApiJson() {
|
|
1388
|
+
const toReturn = {};
|
|
1389
|
+
if (typeof this.id !== 'undefined') {
|
|
1390
|
+
toReturn['id'] = this.id;
|
|
1391
|
+
}
|
|
1392
|
+
if (typeof this.namespace !== 'undefined' && this.namespace !== null) {
|
|
1393
|
+
toReturn['namespace'] = 'toApiJson' in this.namespace ? this.namespace.toApiJson() : this.namespace;
|
|
1394
|
+
}
|
|
1395
|
+
return toReturn;
|
|
1396
|
+
}
|
|
1397
|
+
}
|
|
1398
|
+
class DeletePromptRequest {
|
|
1399
|
+
static fromProto(proto) {
|
|
1400
|
+
let m = new DeletePromptRequest();
|
|
1401
|
+
m = Object.assign(m, proto);
|
|
1402
|
+
return m;
|
|
1403
|
+
}
|
|
1404
|
+
constructor(kwargs) {
|
|
1405
|
+
if (!kwargs) {
|
|
1406
|
+
return;
|
|
1407
|
+
}
|
|
1408
|
+
Object.assign(this, kwargs);
|
|
1409
|
+
}
|
|
1410
|
+
toApiJson() {
|
|
1411
|
+
const toReturn = {};
|
|
1412
|
+
if (typeof this.id !== 'undefined') {
|
|
1413
|
+
toReturn['id'] = this.id;
|
|
1414
|
+
}
|
|
1415
|
+
return toReturn;
|
|
1416
|
+
}
|
|
1417
|
+
}
|
|
1418
|
+
class DeployPromptModuleRequest {
|
|
1419
|
+
static fromProto(proto) {
|
|
1420
|
+
let m = new DeployPromptModuleRequest();
|
|
1421
|
+
m = Object.assign(m, proto);
|
|
1422
|
+
if (proto.namespace) {
|
|
1423
|
+
m.namespace = Namespace.fromProto(proto.namespace);
|
|
1424
|
+
}
|
|
1425
|
+
return m;
|
|
1426
|
+
}
|
|
1427
|
+
constructor(kwargs) {
|
|
1428
|
+
if (!kwargs) {
|
|
1429
|
+
return;
|
|
1430
|
+
}
|
|
1431
|
+
Object.assign(this, kwargs);
|
|
1432
|
+
}
|
|
1433
|
+
toApiJson() {
|
|
1434
|
+
const toReturn = {};
|
|
1435
|
+
if (typeof this.id !== 'undefined') {
|
|
1436
|
+
toReturn['id'] = this.id;
|
|
1437
|
+
}
|
|
1438
|
+
if (typeof this.namespace !== 'undefined' && this.namespace !== null) {
|
|
1439
|
+
toReturn['namespace'] = 'toApiJson' in this.namespace ? this.namespace.toApiJson() : this.namespace;
|
|
1440
|
+
}
|
|
1441
|
+
if (typeof this.version !== 'undefined') {
|
|
1442
|
+
toReturn['version'] = this.version;
|
|
1443
|
+
}
|
|
1444
|
+
return toReturn;
|
|
1445
|
+
}
|
|
1446
|
+
}
|
|
1447
|
+
class DeployPromptRequest {
|
|
1448
|
+
static fromProto(proto) {
|
|
1449
|
+
let m = new DeployPromptRequest();
|
|
1450
|
+
m = Object.assign(m, proto);
|
|
1451
|
+
return m;
|
|
1452
|
+
}
|
|
1453
|
+
constructor(kwargs) {
|
|
1454
|
+
if (!kwargs) {
|
|
1455
|
+
return;
|
|
1456
|
+
}
|
|
1457
|
+
Object.assign(this, kwargs);
|
|
1458
|
+
}
|
|
1459
|
+
toApiJson() {
|
|
1460
|
+
const toReturn = {};
|
|
1461
|
+
if (typeof this.id !== 'undefined') {
|
|
1462
|
+
toReturn['id'] = this.id;
|
|
1463
|
+
}
|
|
1464
|
+
if (typeof this.version !== 'undefined') {
|
|
1465
|
+
toReturn['version'] = this.version;
|
|
1466
|
+
}
|
|
1467
|
+
return toReturn;
|
|
1468
|
+
}
|
|
1469
|
+
}
|
|
1470
|
+
class ListAllAssistantsAssociatedToConnectionRequestFilters {
|
|
1471
|
+
static fromProto(proto) {
|
|
1472
|
+
let m = new ListAllAssistantsAssociatedToConnectionRequestFilters();
|
|
1473
|
+
m = Object.assign(m, proto);
|
|
1474
|
+
if (proto.type) {
|
|
1475
|
+
m.type = enumStringToValue(AssistantType, proto.type);
|
|
1476
|
+
}
|
|
1477
|
+
return m;
|
|
1478
|
+
}
|
|
1479
|
+
constructor(kwargs) {
|
|
1480
|
+
if (!kwargs) {
|
|
1481
|
+
return;
|
|
1482
|
+
}
|
|
1483
|
+
Object.assign(this, kwargs);
|
|
1484
|
+
}
|
|
1485
|
+
toApiJson() {
|
|
1486
|
+
const toReturn = {};
|
|
1487
|
+
if (typeof this.type !== 'undefined') {
|
|
1488
|
+
toReturn['type'] = this.type;
|
|
1489
|
+
}
|
|
1490
|
+
return toReturn;
|
|
1491
|
+
}
|
|
1492
|
+
}
|
|
1493
|
+
class ListFunctionRequestFilters {
|
|
1494
|
+
static fromProto(proto) {
|
|
1495
|
+
let m = new ListFunctionRequestFilters();
|
|
1496
|
+
m = Object.assign(m, proto);
|
|
1497
|
+
if (proto.namespace) {
|
|
1498
|
+
m.namespace = Namespace.fromProto(proto.namespace);
|
|
1499
|
+
}
|
|
1500
|
+
return m;
|
|
1501
|
+
}
|
|
1502
|
+
constructor(kwargs) {
|
|
1503
|
+
if (!kwargs) {
|
|
1504
|
+
return;
|
|
1505
|
+
}
|
|
1506
|
+
Object.assign(this, kwargs);
|
|
1507
|
+
}
|
|
1508
|
+
toApiJson() {
|
|
1509
|
+
const toReturn = {};
|
|
1510
|
+
if (typeof this.namespace !== 'undefined' && this.namespace !== null) {
|
|
1511
|
+
toReturn['namespace'] = 'toApiJson' in this.namespace ? this.namespace.toApiJson() : this.namespace;
|
|
1512
|
+
}
|
|
1513
|
+
return toReturn;
|
|
1514
|
+
}
|
|
1515
|
+
}
|
|
1516
|
+
class ListConnectionsRequestFilters {
|
|
1517
|
+
static fromProto(proto) {
|
|
1518
|
+
let m = new ListConnectionsRequestFilters();
|
|
1519
|
+
m = Object.assign(m, proto);
|
|
1520
|
+
if (proto.namespace) {
|
|
1521
|
+
m.namespace = Namespace.fromProto(proto.namespace);
|
|
1522
|
+
}
|
|
1523
|
+
return m;
|
|
1524
|
+
}
|
|
1525
|
+
constructor(kwargs) {
|
|
1526
|
+
if (!kwargs) {
|
|
1527
|
+
return;
|
|
1528
|
+
}
|
|
1529
|
+
Object.assign(this, kwargs);
|
|
1530
|
+
}
|
|
1531
|
+
toApiJson() {
|
|
1532
|
+
const toReturn = {};
|
|
1533
|
+
if (typeof this.namespace !== 'undefined' && this.namespace !== null) {
|
|
1534
|
+
toReturn['namespace'] = 'toApiJson' in this.namespace ? this.namespace.toApiJson() : this.namespace;
|
|
1535
|
+
}
|
|
1536
|
+
return toReturn;
|
|
1537
|
+
}
|
|
1538
|
+
}
|
|
1539
|
+
class ListAssistantRequestFilters {
|
|
1540
|
+
static fromProto(proto) {
|
|
1541
|
+
let m = new ListAssistantRequestFilters();
|
|
1542
|
+
m = Object.assign(m, proto);
|
|
1543
|
+
if (proto.namespace) {
|
|
1544
|
+
m.namespace = Namespace.fromProto(proto.namespace);
|
|
1545
|
+
}
|
|
1546
|
+
if (proto.type) {
|
|
1547
|
+
m.type = enumStringToValue(AssistantType, proto.type);
|
|
1548
|
+
}
|
|
1549
|
+
return m;
|
|
1550
|
+
}
|
|
1551
|
+
constructor(kwargs) {
|
|
1552
|
+
if (!kwargs) {
|
|
1553
|
+
return;
|
|
1554
|
+
}
|
|
1555
|
+
Object.assign(this, kwargs);
|
|
1556
|
+
}
|
|
1557
|
+
toApiJson() {
|
|
1558
|
+
const toReturn = {};
|
|
1559
|
+
if (typeof this.namespace !== 'undefined' && this.namespace !== null) {
|
|
1560
|
+
toReturn['namespace'] = 'toApiJson' in this.namespace ? this.namespace.toApiJson() : this.namespace;
|
|
1561
|
+
}
|
|
1562
|
+
if (typeof this.type !== 'undefined') {
|
|
1563
|
+
toReturn['type'] = this.type;
|
|
1564
|
+
}
|
|
1565
|
+
return toReturn;
|
|
1566
|
+
}
|
|
1567
|
+
}
|
|
1568
|
+
class ListGoalsRequestFilters {
|
|
1569
|
+
static fromProto(proto) {
|
|
1570
|
+
let m = new ListGoalsRequestFilters();
|
|
1571
|
+
m = Object.assign(m, proto);
|
|
1572
|
+
if (proto.namespace) {
|
|
1573
|
+
m.namespace = Namespace.fromProto(proto.namespace);
|
|
1574
|
+
}
|
|
1575
|
+
return m;
|
|
1576
|
+
}
|
|
1577
|
+
constructor(kwargs) {
|
|
1578
|
+
if (!kwargs) {
|
|
1579
|
+
return;
|
|
1580
|
+
}
|
|
1581
|
+
Object.assign(this, kwargs);
|
|
1582
|
+
}
|
|
1583
|
+
toApiJson() {
|
|
1584
|
+
const toReturn = {};
|
|
1585
|
+
if (typeof this.namespace !== 'undefined' && this.namespace !== null) {
|
|
1586
|
+
toReturn['namespace'] = 'toApiJson' in this.namespace ? this.namespace.toApiJson() : this.namespace;
|
|
1587
|
+
}
|
|
1588
|
+
return toReturn;
|
|
1589
|
+
}
|
|
1590
|
+
}
|
|
1591
|
+
class ListPromptModuleRequestFilters {
|
|
1592
|
+
static fromProto(proto) {
|
|
1593
|
+
let m = new ListPromptModuleRequestFilters();
|
|
1594
|
+
m = Object.assign(m, proto);
|
|
1595
|
+
if (proto.namespace) {
|
|
1596
|
+
m.namespace = Namespace.fromProto(proto.namespace);
|
|
1597
|
+
}
|
|
1598
|
+
return m;
|
|
1599
|
+
}
|
|
1600
|
+
constructor(kwargs) {
|
|
1601
|
+
if (!kwargs) {
|
|
1602
|
+
return;
|
|
1603
|
+
}
|
|
1604
|
+
Object.assign(this, kwargs);
|
|
1605
|
+
}
|
|
1606
|
+
toApiJson() {
|
|
1607
|
+
const toReturn = {};
|
|
1608
|
+
if (typeof this.namespace !== 'undefined' && this.namespace !== null) {
|
|
1609
|
+
toReturn['namespace'] = 'toApiJson' in this.namespace ? this.namespace.toApiJson() : this.namespace;
|
|
1610
|
+
}
|
|
1611
|
+
return toReturn;
|
|
1612
|
+
}
|
|
1613
|
+
}
|
|
1614
|
+
class GenerateChatAnswerRequest {
|
|
1615
|
+
static fromProto(proto) {
|
|
1616
|
+
let m = new GenerateChatAnswerRequest();
|
|
1617
|
+
m = Object.assign(m, proto);
|
|
1618
|
+
if (proto.connectionKey) {
|
|
1619
|
+
m.connectionKey = ConnectionKey.fromProto(proto.connectionKey);
|
|
1620
|
+
}
|
|
1621
|
+
if (proto.chatHistory) {
|
|
1622
|
+
m.chatHistory = proto.chatHistory.map(ChatMessage.fromProto);
|
|
1623
|
+
}
|
|
1624
|
+
if (proto.chatUserInfo) {
|
|
1625
|
+
m.chatUserInfo = ChatUserInfo.fromProto(proto.chatUserInfo);
|
|
1626
|
+
}
|
|
1627
|
+
if (proto.chatChannel) {
|
|
1628
|
+
m.chatChannel = enumStringToValue(ChatChannel, proto.chatChannel);
|
|
1629
|
+
}
|
|
1630
|
+
if (proto.options) {
|
|
1631
|
+
m.options = GenerateChatAnswerRequestOptions.fromProto(proto.options);
|
|
1632
|
+
}
|
|
1633
|
+
return m;
|
|
1634
|
+
}
|
|
1635
|
+
constructor(kwargs) {
|
|
1636
|
+
if (!kwargs) {
|
|
1637
|
+
return;
|
|
1638
|
+
}
|
|
1639
|
+
Object.assign(this, kwargs);
|
|
1640
|
+
}
|
|
1641
|
+
toApiJson() {
|
|
1642
|
+
const toReturn = {};
|
|
1643
|
+
if (typeof this.connectionKey !== 'undefined' && this.connectionKey !== null) {
|
|
1644
|
+
toReturn['connectionKey'] = 'toApiJson' in this.connectionKey ? this.connectionKey.toApiJson() : this.connectionKey;
|
|
1645
|
+
}
|
|
1646
|
+
if (typeof this.chatHistory !== 'undefined' && this.chatHistory !== null) {
|
|
1647
|
+
toReturn['chatHistory'] = 'toApiJson' in this.chatHistory ? this.chatHistory.toApiJson() : this.chatHistory;
|
|
1648
|
+
}
|
|
1649
|
+
if (typeof this.chatUserInfo !== 'undefined' && this.chatUserInfo !== null) {
|
|
1650
|
+
toReturn['chatUserInfo'] = 'toApiJson' in this.chatUserInfo ? this.chatUserInfo.toApiJson() : this.chatUserInfo;
|
|
1651
|
+
}
|
|
1652
|
+
if (typeof this.chatChannel !== 'undefined') {
|
|
1653
|
+
toReturn['chatChannel'] = this.chatChannel;
|
|
1654
|
+
}
|
|
1655
|
+
if (typeof this.options !== 'undefined' && this.options !== null) {
|
|
1656
|
+
toReturn['options'] = 'toApiJson' in this.options ? this.options.toApiJson() : this.options;
|
|
1657
|
+
}
|
|
1658
|
+
return toReturn;
|
|
1659
|
+
}
|
|
1660
|
+
}
|
|
1661
|
+
class GenerateChatAnswerResponse {
|
|
1662
|
+
static fromProto(proto) {
|
|
1663
|
+
let m = new GenerateChatAnswerResponse();
|
|
1664
|
+
m = Object.assign(m, proto);
|
|
1665
|
+
if (proto.metadata) {
|
|
1666
|
+
m.metadata = proto.metadata.map(KeyValuePair.fromProto);
|
|
1667
|
+
}
|
|
1668
|
+
return m;
|
|
1669
|
+
}
|
|
1670
|
+
constructor(kwargs) {
|
|
1671
|
+
if (!kwargs) {
|
|
1672
|
+
return;
|
|
1673
|
+
}
|
|
1674
|
+
Object.assign(this, kwargs);
|
|
1675
|
+
}
|
|
1676
|
+
toApiJson() {
|
|
1677
|
+
const toReturn = {};
|
|
1678
|
+
if (typeof this.answer !== 'undefined') {
|
|
1679
|
+
toReturn['answer'] = this.answer;
|
|
1680
|
+
}
|
|
1681
|
+
if (typeof this.metadata !== 'undefined' && this.metadata !== null) {
|
|
1682
|
+
toReturn['metadata'] = 'toApiJson' in this.metadata ? this.metadata.toApiJson() : this.metadata;
|
|
1683
|
+
}
|
|
1684
|
+
if (typeof this.pendingJobId !== 'undefined') {
|
|
1685
|
+
toReturn['pendingJobId'] = this.pendingJobId;
|
|
1686
|
+
}
|
|
1687
|
+
return toReturn;
|
|
1688
|
+
}
|
|
1689
|
+
}
|
|
1690
|
+
class GetAssistantRequest {
|
|
1691
|
+
static fromProto(proto) {
|
|
1692
|
+
let m = new GetAssistantRequest();
|
|
1693
|
+
m = Object.assign(m, proto);
|
|
1694
|
+
if (proto.namespace) {
|
|
1695
|
+
m.namespace = Namespace.fromProto(proto.namespace);
|
|
1696
|
+
}
|
|
1697
|
+
return m;
|
|
1698
|
+
}
|
|
1699
|
+
constructor(kwargs) {
|
|
1700
|
+
if (!kwargs) {
|
|
1701
|
+
return;
|
|
1702
|
+
}
|
|
1703
|
+
Object.assign(this, kwargs);
|
|
1704
|
+
}
|
|
1705
|
+
toApiJson() {
|
|
1706
|
+
const toReturn = {};
|
|
1707
|
+
if (typeof this.id !== 'undefined') {
|
|
1708
|
+
toReturn['id'] = this.id;
|
|
1709
|
+
}
|
|
1710
|
+
if (typeof this.namespace !== 'undefined' && this.namespace !== null) {
|
|
1711
|
+
toReturn['namespace'] = 'toApiJson' in this.namespace ? this.namespace.toApiJson() : this.namespace;
|
|
1712
|
+
}
|
|
1713
|
+
return toReturn;
|
|
1714
|
+
}
|
|
1715
|
+
}
|
|
1716
|
+
class GetAssistantResponse {
|
|
1717
|
+
static fromProto(proto) {
|
|
1718
|
+
let m = new GetAssistantResponse();
|
|
1719
|
+
m = Object.assign(m, proto);
|
|
1720
|
+
if (proto.assistant) {
|
|
1721
|
+
m.assistant = Assistant.fromProto(proto.assistant);
|
|
1722
|
+
}
|
|
1723
|
+
return m;
|
|
1724
|
+
}
|
|
1725
|
+
constructor(kwargs) {
|
|
1726
|
+
if (!kwargs) {
|
|
1727
|
+
return;
|
|
1728
|
+
}
|
|
1729
|
+
Object.assign(this, kwargs);
|
|
1730
|
+
}
|
|
1731
|
+
toApiJson() {
|
|
1732
|
+
const toReturn = {};
|
|
1733
|
+
if (typeof this.assistant !== 'undefined' && this.assistant !== null) {
|
|
1734
|
+
toReturn['assistant'] = 'toApiJson' in this.assistant ? this.assistant.toApiJson() : this.assistant;
|
|
1735
|
+
}
|
|
1736
|
+
return toReturn;
|
|
1737
|
+
}
|
|
1738
|
+
}
|
|
1739
|
+
class GetChatAnswerFunctionExecutionJobRequest {
|
|
1740
|
+
static fromProto(proto) {
|
|
1741
|
+
let m = new GetChatAnswerFunctionExecutionJobRequest();
|
|
1742
|
+
m = Object.assign(m, proto);
|
|
1743
|
+
return m;
|
|
1744
|
+
}
|
|
1745
|
+
constructor(kwargs) {
|
|
1746
|
+
if (!kwargs) {
|
|
1747
|
+
return;
|
|
1748
|
+
}
|
|
1749
|
+
Object.assign(this, kwargs);
|
|
1750
|
+
}
|
|
1751
|
+
toApiJson() {
|
|
1752
|
+
const toReturn = {};
|
|
1753
|
+
if (typeof this.id !== 'undefined') {
|
|
1754
|
+
toReturn['id'] = this.id;
|
|
1755
|
+
}
|
|
1756
|
+
return toReturn;
|
|
1757
|
+
}
|
|
1758
|
+
}
|
|
1759
|
+
class GetChatAnswerFunctionExecutionJobResponse {
|
|
1760
|
+
static fromProto(proto) {
|
|
1761
|
+
let m = new GetChatAnswerFunctionExecutionJobResponse();
|
|
489
1762
|
m = Object.assign(m, proto);
|
|
490
|
-
if (proto.
|
|
491
|
-
m.
|
|
1763
|
+
if (proto.job) {
|
|
1764
|
+
m.job = ChatAnswerFunctionExecutionJob.fromProto(proto.job);
|
|
492
1765
|
}
|
|
493
1766
|
return m;
|
|
494
1767
|
}
|
|
@@ -500,19 +1773,19 @@ class ChatMessage {
|
|
|
500
1773
|
}
|
|
501
1774
|
toApiJson() {
|
|
502
1775
|
const toReturn = {};
|
|
503
|
-
if (typeof this.
|
|
504
|
-
toReturn['
|
|
505
|
-
}
|
|
506
|
-
if (typeof this.content !== 'undefined') {
|
|
507
|
-
toReturn['content'] = this.content;
|
|
1776
|
+
if (typeof this.job !== 'undefined' && this.job !== null) {
|
|
1777
|
+
toReturn['job'] = 'toApiJson' in this.job ? this.job.toApiJson() : this.job;
|
|
508
1778
|
}
|
|
509
1779
|
return toReturn;
|
|
510
1780
|
}
|
|
511
1781
|
}
|
|
512
|
-
class
|
|
1782
|
+
class GetConnectionRequest {
|
|
513
1783
|
static fromProto(proto) {
|
|
514
|
-
let m = new
|
|
1784
|
+
let m = new GetConnectionRequest();
|
|
515
1785
|
m = Object.assign(m, proto);
|
|
1786
|
+
if (proto.namespace) {
|
|
1787
|
+
m.namespace = Namespace.fromProto(proto.namespace);
|
|
1788
|
+
}
|
|
516
1789
|
return m;
|
|
517
1790
|
}
|
|
518
1791
|
constructor(kwargs) {
|
|
@@ -523,50 +1796,48 @@ class ChatUserInfo {
|
|
|
523
1796
|
}
|
|
524
1797
|
toApiJson() {
|
|
525
1798
|
const toReturn = {};
|
|
526
|
-
if (typeof this.
|
|
527
|
-
toReturn['
|
|
528
|
-
}
|
|
529
|
-
if (typeof this.email !== 'undefined') {
|
|
530
|
-
toReturn['email'] = this.email;
|
|
531
|
-
}
|
|
532
|
-
if (typeof this.phone !== 'undefined') {
|
|
533
|
-
toReturn['phone'] = this.phone;
|
|
1799
|
+
if (typeof this.id !== 'undefined') {
|
|
1800
|
+
toReturn['id'] = this.id;
|
|
534
1801
|
}
|
|
535
|
-
if (typeof this.
|
|
536
|
-
toReturn['
|
|
1802
|
+
if (typeof this.connectionType !== 'undefined') {
|
|
1803
|
+
toReturn['connectionType'] = this.connectionType;
|
|
537
1804
|
}
|
|
538
|
-
if (typeof this.
|
|
539
|
-
toReturn['
|
|
1805
|
+
if (typeof this.namespace !== 'undefined' && this.namespace !== null) {
|
|
1806
|
+
toReturn['namespace'] = 'toApiJson' in this.namespace ? this.namespace.toApiJson() : this.namespace;
|
|
540
1807
|
}
|
|
541
|
-
if (typeof this.
|
|
542
|
-
toReturn['
|
|
1808
|
+
if (typeof this.includeAssistantKeys !== 'undefined') {
|
|
1809
|
+
toReturn['includeAssistantKeys'] = this.includeAssistantKeys;
|
|
543
1810
|
}
|
|
544
|
-
|
|
545
|
-
|
|
1811
|
+
return toReturn;
|
|
1812
|
+
}
|
|
1813
|
+
}
|
|
1814
|
+
class GetConnectionResponse {
|
|
1815
|
+
static fromProto(proto) {
|
|
1816
|
+
let m = new GetConnectionResponse();
|
|
1817
|
+
m = Object.assign(m, proto);
|
|
1818
|
+
if (proto.connection) {
|
|
1819
|
+
m.connection = Connection.fromProto(proto.connection);
|
|
546
1820
|
}
|
|
547
|
-
|
|
548
|
-
|
|
1821
|
+
return m;
|
|
1822
|
+
}
|
|
1823
|
+
constructor(kwargs) {
|
|
1824
|
+
if (!kwargs) {
|
|
1825
|
+
return;
|
|
549
1826
|
}
|
|
550
|
-
|
|
551
|
-
|
|
1827
|
+
Object.assign(this, kwargs);
|
|
1828
|
+
}
|
|
1829
|
+
toApiJson() {
|
|
1830
|
+
const toReturn = {};
|
|
1831
|
+
if (typeof this.connection !== 'undefined' && this.connection !== null) {
|
|
1832
|
+
toReturn['connection'] = 'toApiJson' in this.connection ? this.connection.toApiJson() : this.connection;
|
|
552
1833
|
}
|
|
553
1834
|
return toReturn;
|
|
554
1835
|
}
|
|
555
1836
|
}
|
|
556
|
-
|
|
557
|
-
function enumStringToValue$3(enumRef, value) {
|
|
558
|
-
if (typeof value === 'number') {
|
|
559
|
-
return value;
|
|
560
|
-
}
|
|
561
|
-
return enumRef[value];
|
|
562
|
-
}
|
|
563
|
-
class Prompt {
|
|
1837
|
+
class GetDeployedPromptVersionRequest {
|
|
564
1838
|
static fromProto(proto) {
|
|
565
|
-
let m = new
|
|
1839
|
+
let m = new GetDeployedPromptVersionRequest();
|
|
566
1840
|
m = Object.assign(m, proto);
|
|
567
|
-
if (proto.updated) {
|
|
568
|
-
m.updated = new Date(proto.updated);
|
|
569
|
-
}
|
|
570
1841
|
return m;
|
|
571
1842
|
}
|
|
572
1843
|
constructor(kwargs) {
|
|
@@ -580,24 +1851,44 @@ class Prompt {
|
|
|
580
1851
|
if (typeof this.id !== 'undefined') {
|
|
581
1852
|
toReturn['id'] = this.id;
|
|
582
1853
|
}
|
|
583
|
-
|
|
584
|
-
|
|
1854
|
+
return toReturn;
|
|
1855
|
+
}
|
|
1856
|
+
}
|
|
1857
|
+
class GetDeployedPromptVersionResponse {
|
|
1858
|
+
static fromProto(proto) {
|
|
1859
|
+
let m = new GetDeployedPromptVersionResponse();
|
|
1860
|
+
m = Object.assign(m, proto);
|
|
1861
|
+
if (proto.prompt) {
|
|
1862
|
+
m.prompt = Prompt.fromProto(proto.prompt);
|
|
585
1863
|
}
|
|
586
|
-
if (
|
|
587
|
-
|
|
1864
|
+
if (proto.deployedPromptVersion) {
|
|
1865
|
+
m.deployedPromptVersion = PromptVersion.fromProto(proto.deployedPromptVersion);
|
|
588
1866
|
}
|
|
589
|
-
|
|
590
|
-
|
|
1867
|
+
return m;
|
|
1868
|
+
}
|
|
1869
|
+
constructor(kwargs) {
|
|
1870
|
+
if (!kwargs) {
|
|
1871
|
+
return;
|
|
1872
|
+
}
|
|
1873
|
+
Object.assign(this, kwargs);
|
|
1874
|
+
}
|
|
1875
|
+
toApiJson() {
|
|
1876
|
+
const toReturn = {};
|
|
1877
|
+
if (typeof this.prompt !== 'undefined' && this.prompt !== null) {
|
|
1878
|
+
toReturn['prompt'] = 'toApiJson' in this.prompt ? this.prompt.toApiJson() : this.prompt;
|
|
1879
|
+
}
|
|
1880
|
+
if (typeof this.deployedPromptVersion !== 'undefined' && this.deployedPromptVersion !== null) {
|
|
1881
|
+
toReturn['deployedPromptVersion'] = 'toApiJson' in this.deployedPromptVersion ? this.deployedPromptVersion.toApiJson() : this.deployedPromptVersion;
|
|
591
1882
|
}
|
|
592
1883
|
return toReturn;
|
|
593
1884
|
}
|
|
594
1885
|
}
|
|
595
|
-
class
|
|
1886
|
+
class GetFunctionRequest {
|
|
596
1887
|
static fromProto(proto) {
|
|
597
|
-
let m = new
|
|
1888
|
+
let m = new GetFunctionRequest();
|
|
598
1889
|
m = Object.assign(m, proto);
|
|
599
|
-
if (proto.
|
|
600
|
-
m.
|
|
1890
|
+
if (proto.namespace) {
|
|
1891
|
+
m.namespace = Namespace.fromProto(proto.namespace);
|
|
601
1892
|
}
|
|
602
1893
|
return m;
|
|
603
1894
|
}
|
|
@@ -612,32 +1903,19 @@ class PromptVersion {
|
|
|
612
1903
|
if (typeof this.id !== 'undefined') {
|
|
613
1904
|
toReturn['id'] = this.id;
|
|
614
1905
|
}
|
|
615
|
-
if (typeof this.
|
|
616
|
-
toReturn['
|
|
617
|
-
}
|
|
618
|
-
if (typeof this.content !== 'undefined') {
|
|
619
|
-
toReturn['content'] = this.content;
|
|
620
|
-
}
|
|
621
|
-
if (typeof this.createdBy !== 'undefined') {
|
|
622
|
-
toReturn['createdBy'] = this.createdBy;
|
|
623
|
-
}
|
|
624
|
-
if (typeof this.created !== 'undefined' && this.created !== null) {
|
|
625
|
-
toReturn['created'] = 'toApiJson' in this.created ? this.created.toApiJson() : this.created;
|
|
1906
|
+
if (typeof this.namespace !== 'undefined' && this.namespace !== null) {
|
|
1907
|
+
toReturn['namespace'] = 'toApiJson' in this.namespace ? this.namespace.toApiJson() : this.namespace;
|
|
626
1908
|
}
|
|
627
1909
|
return toReturn;
|
|
628
1910
|
}
|
|
629
1911
|
}
|
|
630
|
-
|
|
631
|
-
function enumStringToValue$2(enumRef, value) {
|
|
632
|
-
if (typeof value === 'number') {
|
|
633
|
-
return value;
|
|
634
|
-
}
|
|
635
|
-
return enumRef[value];
|
|
636
|
-
}
|
|
637
|
-
class Access {
|
|
1912
|
+
class GetFunctionResponse {
|
|
638
1913
|
static fromProto(proto) {
|
|
639
|
-
let m = new
|
|
1914
|
+
let m = new GetFunctionResponse();
|
|
640
1915
|
m = Object.assign(m, proto);
|
|
1916
|
+
if (proto.function) {
|
|
1917
|
+
m.function = Function.fromProto(proto.function);
|
|
1918
|
+
}
|
|
641
1919
|
return m;
|
|
642
1920
|
}
|
|
643
1921
|
constructor(kwargs) {
|
|
@@ -648,28 +1926,18 @@ class Access {
|
|
|
648
1926
|
}
|
|
649
1927
|
toApiJson() {
|
|
650
1928
|
const toReturn = {};
|
|
651
|
-
if (typeof this.
|
|
652
|
-
toReturn['
|
|
653
|
-
}
|
|
654
|
-
if (typeof this.public !== 'undefined') {
|
|
655
|
-
toReturn['public'] = this.public;
|
|
1929
|
+
if (typeof this.function !== 'undefined' && this.function !== null) {
|
|
1930
|
+
toReturn['function'] = 'toApiJson' in this.function ? this.function.toApiJson() : this.function;
|
|
656
1931
|
}
|
|
657
1932
|
return toReturn;
|
|
658
1933
|
}
|
|
659
1934
|
}
|
|
660
|
-
|
|
661
|
-
function enumStringToValue$1(enumRef, value) {
|
|
662
|
-
if (typeof value === 'number') {
|
|
663
|
-
return value;
|
|
664
|
-
}
|
|
665
|
-
return enumRef[value];
|
|
666
|
-
}
|
|
667
|
-
class PagedRequestOptions {
|
|
1935
|
+
class GetGoalRequest {
|
|
668
1936
|
static fromProto(proto) {
|
|
669
|
-
let m = new
|
|
1937
|
+
let m = new GetGoalRequest();
|
|
670
1938
|
m = Object.assign(m, proto);
|
|
671
|
-
if (proto.
|
|
672
|
-
m.
|
|
1939
|
+
if (proto.namespace) {
|
|
1940
|
+
m.namespace = Namespace.fromProto(proto.namespace);
|
|
673
1941
|
}
|
|
674
1942
|
return m;
|
|
675
1943
|
}
|
|
@@ -681,21 +1949,21 @@ class PagedRequestOptions {
|
|
|
681
1949
|
}
|
|
682
1950
|
toApiJson() {
|
|
683
1951
|
const toReturn = {};
|
|
684
|
-
if (typeof this.
|
|
685
|
-
toReturn['
|
|
1952
|
+
if (typeof this.id !== 'undefined') {
|
|
1953
|
+
toReturn['id'] = this.id;
|
|
686
1954
|
}
|
|
687
|
-
if (typeof this.
|
|
688
|
-
toReturn['
|
|
1955
|
+
if (typeof this.namespace !== 'undefined' && this.namespace !== null) {
|
|
1956
|
+
toReturn['namespace'] = 'toApiJson' in this.namespace ? this.namespace.toApiJson() : this.namespace;
|
|
689
1957
|
}
|
|
690
1958
|
return toReturn;
|
|
691
1959
|
}
|
|
692
1960
|
}
|
|
693
|
-
class
|
|
1961
|
+
class GetGoalResponse {
|
|
694
1962
|
static fromProto(proto) {
|
|
695
|
-
let m = new
|
|
1963
|
+
let m = new GetGoalResponse();
|
|
696
1964
|
m = Object.assign(m, proto);
|
|
697
|
-
if (proto.
|
|
698
|
-
m.
|
|
1965
|
+
if (proto.goal) {
|
|
1966
|
+
m.goal = Goal.fromProto(proto.goal);
|
|
699
1967
|
}
|
|
700
1968
|
return m;
|
|
701
1969
|
}
|
|
@@ -707,31 +1975,21 @@ class PagedResponseMetadata {
|
|
|
707
1975
|
}
|
|
708
1976
|
toApiJson() {
|
|
709
1977
|
const toReturn = {};
|
|
710
|
-
if (typeof this.
|
|
711
|
-
toReturn['
|
|
712
|
-
}
|
|
713
|
-
if (typeof this.hasMore !== 'undefined') {
|
|
714
|
-
toReturn['hasMore'] = this.hasMore;
|
|
715
|
-
}
|
|
716
|
-
if (typeof this.totalResults !== 'undefined') {
|
|
717
|
-
toReturn['totalResults'] = this.totalResults;
|
|
1978
|
+
if (typeof this.goal !== 'undefined' && this.goal !== null) {
|
|
1979
|
+
toReturn['goal'] = 'toApiJson' in this.goal ? this.goal.toApiJson() : this.goal;
|
|
718
1980
|
}
|
|
719
1981
|
return toReturn;
|
|
720
1982
|
}
|
|
721
1983
|
}
|
|
722
|
-
|
|
723
|
-
function enumStringToValue(enumRef, value) {
|
|
724
|
-
if (typeof value === 'number') {
|
|
725
|
-
return value;
|
|
726
|
-
}
|
|
727
|
-
return enumRef[value];
|
|
728
|
-
}
|
|
729
|
-
class SetAssistantConnectionsRequestConnectionState {
|
|
1984
|
+
class GetHydratedDeployedPromptModuleVersionRequest {
|
|
730
1985
|
static fromProto(proto) {
|
|
731
|
-
let m = new
|
|
1986
|
+
let m = new GetHydratedDeployedPromptModuleVersionRequest();
|
|
732
1987
|
m = Object.assign(m, proto);
|
|
733
|
-
if (proto.
|
|
734
|
-
m.
|
|
1988
|
+
if (proto.namespace) {
|
|
1989
|
+
m.namespace = Namespace.fromProto(proto.namespace);
|
|
1990
|
+
}
|
|
1991
|
+
if (proto.variables) {
|
|
1992
|
+
m.variables = proto.variables.map(KeyValuePair.fromProto);
|
|
735
1993
|
}
|
|
736
1994
|
return m;
|
|
737
1995
|
}
|
|
@@ -743,18 +2001,21 @@ class SetAssistantConnectionsRequestConnectionState {
|
|
|
743
2001
|
}
|
|
744
2002
|
toApiJson() {
|
|
745
2003
|
const toReturn = {};
|
|
746
|
-
if (typeof this.
|
|
747
|
-
toReturn['
|
|
2004
|
+
if (typeof this.id !== 'undefined') {
|
|
2005
|
+
toReturn['id'] = this.id;
|
|
748
2006
|
}
|
|
749
|
-
if (typeof this.
|
|
750
|
-
toReturn['
|
|
2007
|
+
if (typeof this.namespace !== 'undefined' && this.namespace !== null) {
|
|
2008
|
+
toReturn['namespace'] = 'toApiJson' in this.namespace ? this.namespace.toApiJson() : this.namespace;
|
|
2009
|
+
}
|
|
2010
|
+
if (typeof this.variables !== 'undefined' && this.variables !== null) {
|
|
2011
|
+
toReturn['variables'] = 'toApiJson' in this.variables ? this.variables.toApiJson() : this.variables;
|
|
751
2012
|
}
|
|
752
2013
|
return toReturn;
|
|
753
2014
|
}
|
|
754
2015
|
}
|
|
755
|
-
class
|
|
2016
|
+
class GetHydratedDeployedPromptModuleVersionResponse {
|
|
756
2017
|
static fromProto(proto) {
|
|
757
|
-
let m = new
|
|
2018
|
+
let m = new GetHydratedDeployedPromptModuleVersionResponse();
|
|
758
2019
|
m = Object.assign(m, proto);
|
|
759
2020
|
return m;
|
|
760
2021
|
}
|
|
@@ -766,22 +2027,16 @@ class CreatePromptRequest {
|
|
|
766
2027
|
}
|
|
767
2028
|
toApiJson() {
|
|
768
2029
|
const toReturn = {};
|
|
769
|
-
if (typeof this.id !== 'undefined') {
|
|
770
|
-
toReturn['id'] = this.id;
|
|
771
|
-
}
|
|
772
2030
|
if (typeof this.content !== 'undefined') {
|
|
773
2031
|
toReturn['content'] = this.content;
|
|
774
2032
|
}
|
|
775
2033
|
return toReturn;
|
|
776
2034
|
}
|
|
777
2035
|
}
|
|
778
|
-
class
|
|
2036
|
+
class GetMultiDeployedPromptVersionRequest {
|
|
779
2037
|
static fromProto(proto) {
|
|
780
|
-
let m = new
|
|
2038
|
+
let m = new GetMultiDeployedPromptVersionRequest();
|
|
781
2039
|
m = Object.assign(m, proto);
|
|
782
|
-
if (proto.namespace) {
|
|
783
|
-
m.namespace = Namespace.fromProto(proto.namespace);
|
|
784
|
-
}
|
|
785
2040
|
return m;
|
|
786
2041
|
}
|
|
787
2042
|
constructor(kwargs) {
|
|
@@ -792,21 +2047,21 @@ class DeleteAssistantRequest {
|
|
|
792
2047
|
}
|
|
793
2048
|
toApiJson() {
|
|
794
2049
|
const toReturn = {};
|
|
795
|
-
if (typeof this.
|
|
796
|
-
toReturn['
|
|
797
|
-
}
|
|
798
|
-
if (typeof this.namespace !== 'undefined' && this.namespace !== null) {
|
|
799
|
-
toReturn['namespace'] = 'toApiJson' in this.namespace ? this.namespace.toApiJson() : this.namespace;
|
|
2050
|
+
if (typeof this.ids !== 'undefined') {
|
|
2051
|
+
toReturn['ids'] = this.ids;
|
|
800
2052
|
}
|
|
801
2053
|
return toReturn;
|
|
802
2054
|
}
|
|
803
2055
|
}
|
|
804
|
-
class
|
|
2056
|
+
class GetMultiDeployedPromptVersionResponse {
|
|
805
2057
|
static fromProto(proto) {
|
|
806
|
-
let m = new
|
|
2058
|
+
let m = new GetMultiDeployedPromptVersionResponse();
|
|
807
2059
|
m = Object.assign(m, proto);
|
|
808
|
-
if (proto.
|
|
809
|
-
m.
|
|
2060
|
+
if (proto.prompts) {
|
|
2061
|
+
m.prompts = proto.prompts.map(Prompt.fromProto);
|
|
2062
|
+
}
|
|
2063
|
+
if (proto.deployedPromptVersions) {
|
|
2064
|
+
m.deployedPromptVersions = proto.deployedPromptVersions.map(PromptVersion.fromProto);
|
|
810
2065
|
}
|
|
811
2066
|
return m;
|
|
812
2067
|
}
|
|
@@ -818,22 +2073,45 @@ class DeleteConnectionRequest {
|
|
|
818
2073
|
}
|
|
819
2074
|
toApiJson() {
|
|
820
2075
|
const toReturn = {};
|
|
821
|
-
if (typeof this.
|
|
822
|
-
toReturn['
|
|
2076
|
+
if (typeof this.prompts !== 'undefined' && this.prompts !== null) {
|
|
2077
|
+
toReturn['prompts'] = 'toApiJson' in this.prompts ? this.prompts.toApiJson() : this.prompts;
|
|
823
2078
|
}
|
|
824
|
-
if (typeof this.
|
|
825
|
-
toReturn['
|
|
2079
|
+
if (typeof this.deployedPromptVersions !== 'undefined' && this.deployedPromptVersions !== null) {
|
|
2080
|
+
toReturn['deployedPromptVersions'] = 'toApiJson' in this.deployedPromptVersions ? this.deployedPromptVersions.toApiJson() : this.deployedPromptVersions;
|
|
826
2081
|
}
|
|
827
|
-
|
|
828
|
-
|
|
2082
|
+
return toReturn;
|
|
2083
|
+
}
|
|
2084
|
+
}
|
|
2085
|
+
class GetMultiFunctionRequest {
|
|
2086
|
+
static fromProto(proto) {
|
|
2087
|
+
let m = new GetMultiFunctionRequest();
|
|
2088
|
+
m = Object.assign(m, proto);
|
|
2089
|
+
if (proto.keys) {
|
|
2090
|
+
m.keys = proto.keys.map(FunctionKey.fromProto);
|
|
2091
|
+
}
|
|
2092
|
+
return m;
|
|
2093
|
+
}
|
|
2094
|
+
constructor(kwargs) {
|
|
2095
|
+
if (!kwargs) {
|
|
2096
|
+
return;
|
|
2097
|
+
}
|
|
2098
|
+
Object.assign(this, kwargs);
|
|
2099
|
+
}
|
|
2100
|
+
toApiJson() {
|
|
2101
|
+
const toReturn = {};
|
|
2102
|
+
if (typeof this.keys !== 'undefined' && this.keys !== null) {
|
|
2103
|
+
toReturn['keys'] = 'toApiJson' in this.keys ? this.keys.toApiJson() : this.keys;
|
|
829
2104
|
}
|
|
830
2105
|
return toReturn;
|
|
831
2106
|
}
|
|
832
2107
|
}
|
|
833
|
-
class
|
|
2108
|
+
class GetMultiFunctionResponse {
|
|
834
2109
|
static fromProto(proto) {
|
|
835
|
-
let m = new
|
|
2110
|
+
let m = new GetMultiFunctionResponse();
|
|
836
2111
|
m = Object.assign(m, proto);
|
|
2112
|
+
if (proto.functions) {
|
|
2113
|
+
m.functions = proto.functions.map(Function.fromProto);
|
|
2114
|
+
}
|
|
837
2115
|
return m;
|
|
838
2116
|
}
|
|
839
2117
|
constructor(kwargs) {
|
|
@@ -844,16 +2122,19 @@ class DeletePromptRequest {
|
|
|
844
2122
|
}
|
|
845
2123
|
toApiJson() {
|
|
846
2124
|
const toReturn = {};
|
|
847
|
-
if (typeof this.
|
|
848
|
-
toReturn['
|
|
2125
|
+
if (typeof this.functions !== 'undefined' && this.functions !== null) {
|
|
2126
|
+
toReturn['functions'] = 'toApiJson' in this.functions ? this.functions.toApiJson() : this.functions;
|
|
849
2127
|
}
|
|
850
2128
|
return toReturn;
|
|
851
2129
|
}
|
|
852
2130
|
}
|
|
853
|
-
class
|
|
2131
|
+
class GetMultiGoalRequest {
|
|
854
2132
|
static fromProto(proto) {
|
|
855
|
-
let m = new
|
|
2133
|
+
let m = new GetMultiGoalRequest();
|
|
856
2134
|
m = Object.assign(m, proto);
|
|
2135
|
+
if (proto.keys) {
|
|
2136
|
+
m.keys = proto.keys.map(GoalKey.fromProto);
|
|
2137
|
+
}
|
|
857
2138
|
return m;
|
|
858
2139
|
}
|
|
859
2140
|
constructor(kwargs) {
|
|
@@ -864,24 +2145,18 @@ class DeployPromptRequest {
|
|
|
864
2145
|
}
|
|
865
2146
|
toApiJson() {
|
|
866
2147
|
const toReturn = {};
|
|
867
|
-
if (typeof this.
|
|
868
|
-
toReturn['
|
|
869
|
-
}
|
|
870
|
-
if (typeof this.version !== 'undefined') {
|
|
871
|
-
toReturn['version'] = this.version;
|
|
2148
|
+
if (typeof this.keys !== 'undefined' && this.keys !== null) {
|
|
2149
|
+
toReturn['keys'] = 'toApiJson' in this.keys ? this.keys.toApiJson() : this.keys;
|
|
872
2150
|
}
|
|
873
2151
|
return toReturn;
|
|
874
2152
|
}
|
|
875
2153
|
}
|
|
876
|
-
class
|
|
2154
|
+
class GetMultiGoalResponse {
|
|
877
2155
|
static fromProto(proto) {
|
|
878
|
-
let m = new
|
|
2156
|
+
let m = new GetMultiGoalResponse();
|
|
879
2157
|
m = Object.assign(m, proto);
|
|
880
|
-
if (proto.
|
|
881
|
-
m.
|
|
882
|
-
}
|
|
883
|
-
if (proto.type) {
|
|
884
|
-
m.type = enumStringToValue(AssistantType, proto.type);
|
|
2158
|
+
if (proto.goals) {
|
|
2159
|
+
m.goals = proto.goals.map(Goal.fromProto);
|
|
885
2160
|
}
|
|
886
2161
|
return m;
|
|
887
2162
|
}
|
|
@@ -893,21 +2168,21 @@ class ListAssistantRequestFilters {
|
|
|
893
2168
|
}
|
|
894
2169
|
toApiJson() {
|
|
895
2170
|
const toReturn = {};
|
|
896
|
-
if (typeof this.
|
|
897
|
-
toReturn['
|
|
898
|
-
}
|
|
899
|
-
if (typeof this.type !== 'undefined') {
|
|
900
|
-
toReturn['type'] = this.type;
|
|
2171
|
+
if (typeof this.goals !== 'undefined' && this.goals !== null) {
|
|
2172
|
+
toReturn['goals'] = 'toApiJson' in this.goals ? this.goals.toApiJson() : this.goals;
|
|
901
2173
|
}
|
|
902
2174
|
return toReturn;
|
|
903
2175
|
}
|
|
904
2176
|
}
|
|
905
|
-
class
|
|
2177
|
+
class GetMultiHydratedDeployedPromptModuleVersionRequest {
|
|
906
2178
|
static fromProto(proto) {
|
|
907
|
-
let m = new
|
|
2179
|
+
let m = new GetMultiHydratedDeployedPromptModuleVersionRequest();
|
|
908
2180
|
m = Object.assign(m, proto);
|
|
909
|
-
if (proto.
|
|
910
|
-
m.
|
|
2181
|
+
if (proto.keys) {
|
|
2182
|
+
m.keys = proto.keys.map(PromptModuleKey.fromProto);
|
|
2183
|
+
}
|
|
2184
|
+
if (proto.variables) {
|
|
2185
|
+
m.variables = proto.variables.map(KeyValuePair.fromProto);
|
|
911
2186
|
}
|
|
912
2187
|
return m;
|
|
913
2188
|
}
|
|
@@ -919,19 +2194,19 @@ class ListConnectionsRequestFilters {
|
|
|
919
2194
|
}
|
|
920
2195
|
toApiJson() {
|
|
921
2196
|
const toReturn = {};
|
|
922
|
-
if (typeof this.
|
|
923
|
-
toReturn['
|
|
2197
|
+
if (typeof this.keys !== 'undefined' && this.keys !== null) {
|
|
2198
|
+
toReturn['keys'] = 'toApiJson' in this.keys ? this.keys.toApiJson() : this.keys;
|
|
2199
|
+
}
|
|
2200
|
+
if (typeof this.variables !== 'undefined' && this.variables !== null) {
|
|
2201
|
+
toReturn['variables'] = 'toApiJson' in this.variables ? this.variables.toApiJson() : this.variables;
|
|
924
2202
|
}
|
|
925
2203
|
return toReturn;
|
|
926
2204
|
}
|
|
927
2205
|
}
|
|
928
|
-
class
|
|
2206
|
+
class GetMultiHydratedDeployedPromptModuleVersionResponse {
|
|
929
2207
|
static fromProto(proto) {
|
|
930
|
-
let m = new
|
|
2208
|
+
let m = new GetMultiHydratedDeployedPromptModuleVersionResponse();
|
|
931
2209
|
m = Object.assign(m, proto);
|
|
932
|
-
if (proto.type) {
|
|
933
|
-
m.type = enumStringToValue(AssistantType, proto.type);
|
|
934
|
-
}
|
|
935
2210
|
return m;
|
|
936
2211
|
}
|
|
937
2212
|
constructor(kwargs) {
|
|
@@ -942,30 +2217,18 @@ class ListAllAssistantsAssociatedToConnectionRequestFilters {
|
|
|
942
2217
|
}
|
|
943
2218
|
toApiJson() {
|
|
944
2219
|
const toReturn = {};
|
|
945
|
-
if (typeof this.
|
|
946
|
-
toReturn['
|
|
2220
|
+
if (typeof this.contents !== 'undefined') {
|
|
2221
|
+
toReturn['contents'] = this.contents;
|
|
947
2222
|
}
|
|
948
2223
|
return toReturn;
|
|
949
2224
|
}
|
|
950
2225
|
}
|
|
951
|
-
class
|
|
2226
|
+
class GetPromptModuleRequest {
|
|
952
2227
|
static fromProto(proto) {
|
|
953
|
-
let m = new
|
|
2228
|
+
let m = new GetPromptModuleRequest();
|
|
954
2229
|
m = Object.assign(m, proto);
|
|
955
|
-
if (proto.
|
|
956
|
-
m.
|
|
957
|
-
}
|
|
958
|
-
if (proto.chatHistory) {
|
|
959
|
-
m.chatHistory = proto.chatHistory.map(ChatMessage.fromProto);
|
|
960
|
-
}
|
|
961
|
-
if (proto.chatUserInfo) {
|
|
962
|
-
m.chatUserInfo = ChatUserInfo.fromProto(proto.chatUserInfo);
|
|
963
|
-
}
|
|
964
|
-
if (proto.chatChannel) {
|
|
965
|
-
m.chatChannel = enumStringToValue(ChatChannel, proto.chatChannel);
|
|
966
|
-
}
|
|
967
|
-
if (proto.options) {
|
|
968
|
-
m.options = GenerateChatAnswerRequestOptions.fromProto(proto.options);
|
|
2230
|
+
if (proto.namespace) {
|
|
2231
|
+
m.namespace = Namespace.fromProto(proto.namespace);
|
|
969
2232
|
}
|
|
970
2233
|
return m;
|
|
971
2234
|
}
|
|
@@ -977,30 +2240,21 @@ class GenerateChatAnswerRequest {
|
|
|
977
2240
|
}
|
|
978
2241
|
toApiJson() {
|
|
979
2242
|
const toReturn = {};
|
|
980
|
-
if (typeof this.
|
|
981
|
-
toReturn['
|
|
982
|
-
}
|
|
983
|
-
if (typeof this.chatHistory !== 'undefined' && this.chatHistory !== null) {
|
|
984
|
-
toReturn['chatHistory'] = 'toApiJson' in this.chatHistory ? this.chatHistory.toApiJson() : this.chatHistory;
|
|
985
|
-
}
|
|
986
|
-
if (typeof this.chatUserInfo !== 'undefined' && this.chatUserInfo !== null) {
|
|
987
|
-
toReturn['chatUserInfo'] = 'toApiJson' in this.chatUserInfo ? this.chatUserInfo.toApiJson() : this.chatUserInfo;
|
|
988
|
-
}
|
|
989
|
-
if (typeof this.chatChannel !== 'undefined') {
|
|
990
|
-
toReturn['chatChannel'] = this.chatChannel;
|
|
2243
|
+
if (typeof this.id !== 'undefined') {
|
|
2244
|
+
toReturn['id'] = this.id;
|
|
991
2245
|
}
|
|
992
|
-
if (typeof this.
|
|
993
|
-
toReturn['
|
|
2246
|
+
if (typeof this.namespace !== 'undefined' && this.namespace !== null) {
|
|
2247
|
+
toReturn['namespace'] = 'toApiJson' in this.namespace ? this.namespace.toApiJson() : this.namespace;
|
|
994
2248
|
}
|
|
995
2249
|
return toReturn;
|
|
996
2250
|
}
|
|
997
2251
|
}
|
|
998
|
-
class
|
|
2252
|
+
class GetPromptModuleResponse {
|
|
999
2253
|
static fromProto(proto) {
|
|
1000
|
-
let m = new
|
|
2254
|
+
let m = new GetPromptModuleResponse();
|
|
1001
2255
|
m = Object.assign(m, proto);
|
|
1002
|
-
if (proto.
|
|
1003
|
-
m.
|
|
2256
|
+
if (proto.promptModule) {
|
|
2257
|
+
m.promptModule = PromptModule.fromProto(proto.promptModule);
|
|
1004
2258
|
}
|
|
1005
2259
|
return m;
|
|
1006
2260
|
}
|
|
@@ -1012,21 +2266,15 @@ class GenerateChatAnswerResponse {
|
|
|
1012
2266
|
}
|
|
1013
2267
|
toApiJson() {
|
|
1014
2268
|
const toReturn = {};
|
|
1015
|
-
if (typeof this.
|
|
1016
|
-
toReturn['
|
|
1017
|
-
}
|
|
1018
|
-
if (typeof this.metadata !== 'undefined' && this.metadata !== null) {
|
|
1019
|
-
toReturn['metadata'] = 'toApiJson' in this.metadata ? this.metadata.toApiJson() : this.metadata;
|
|
1020
|
-
}
|
|
1021
|
-
if (typeof this.pendingJobId !== 'undefined') {
|
|
1022
|
-
toReturn['pendingJobId'] = this.pendingJobId;
|
|
2269
|
+
if (typeof this.promptModule !== 'undefined' && this.promptModule !== null) {
|
|
2270
|
+
toReturn['promptModule'] = 'toApiJson' in this.promptModule ? this.promptModule.toApiJson() : this.promptModule;
|
|
1023
2271
|
}
|
|
1024
2272
|
return toReturn;
|
|
1025
2273
|
}
|
|
1026
2274
|
}
|
|
1027
|
-
class
|
|
2275
|
+
class GetPromptModuleVersionRequest {
|
|
1028
2276
|
static fromProto(proto) {
|
|
1029
|
-
let m = new
|
|
2277
|
+
let m = new GetPromptModuleVersionRequest();
|
|
1030
2278
|
m = Object.assign(m, proto);
|
|
1031
2279
|
if (proto.namespace) {
|
|
1032
2280
|
m.namespace = Namespace.fromProto(proto.namespace);
|
|
@@ -1047,15 +2295,18 @@ class GetAssistantRequest {
|
|
|
1047
2295
|
if (typeof this.namespace !== 'undefined' && this.namespace !== null) {
|
|
1048
2296
|
toReturn['namespace'] = 'toApiJson' in this.namespace ? this.namespace.toApiJson() : this.namespace;
|
|
1049
2297
|
}
|
|
2298
|
+
if (typeof this.version !== 'undefined') {
|
|
2299
|
+
toReturn['version'] = this.version;
|
|
2300
|
+
}
|
|
1050
2301
|
return toReturn;
|
|
1051
2302
|
}
|
|
1052
2303
|
}
|
|
1053
|
-
class
|
|
2304
|
+
class GetPromptModuleVersionResponse {
|
|
1054
2305
|
static fromProto(proto) {
|
|
1055
|
-
let m = new
|
|
2306
|
+
let m = new GetPromptModuleVersionResponse();
|
|
1056
2307
|
m = Object.assign(m, proto);
|
|
1057
|
-
if (proto.
|
|
1058
|
-
m.
|
|
2308
|
+
if (proto.promptModuleVersion) {
|
|
2309
|
+
m.promptModuleVersion = PromptModuleVersion.fromProto(proto.promptModuleVersion);
|
|
1059
2310
|
}
|
|
1060
2311
|
return m;
|
|
1061
2312
|
}
|
|
@@ -1067,15 +2318,15 @@ class GetAssistantResponse {
|
|
|
1067
2318
|
}
|
|
1068
2319
|
toApiJson() {
|
|
1069
2320
|
const toReturn = {};
|
|
1070
|
-
if (typeof this.
|
|
1071
|
-
toReturn['
|
|
2321
|
+
if (typeof this.promptModuleVersion !== 'undefined' && this.promptModuleVersion !== null) {
|
|
2322
|
+
toReturn['promptModuleVersion'] = 'toApiJson' in this.promptModuleVersion ? this.promptModuleVersion.toApiJson() : this.promptModuleVersion;
|
|
1072
2323
|
}
|
|
1073
2324
|
return toReturn;
|
|
1074
2325
|
}
|
|
1075
2326
|
}
|
|
1076
|
-
class
|
|
2327
|
+
class GetPromptRequest {
|
|
1077
2328
|
static fromProto(proto) {
|
|
1078
|
-
let m = new
|
|
2329
|
+
let m = new GetPromptRequest();
|
|
1079
2330
|
m = Object.assign(m, proto);
|
|
1080
2331
|
return m;
|
|
1081
2332
|
}
|
|
@@ -1093,12 +2344,12 @@ class GetChatAnswerFunctionExecutionJobRequest {
|
|
|
1093
2344
|
return toReturn;
|
|
1094
2345
|
}
|
|
1095
2346
|
}
|
|
1096
|
-
class
|
|
2347
|
+
class GetPromptResponse {
|
|
1097
2348
|
static fromProto(proto) {
|
|
1098
|
-
let m = new
|
|
2349
|
+
let m = new GetPromptResponse();
|
|
1099
2350
|
m = Object.assign(m, proto);
|
|
1100
|
-
if (proto.
|
|
1101
|
-
m.
|
|
2351
|
+
if (proto.prompt) {
|
|
2352
|
+
m.prompt = Prompt.fromProto(proto.prompt);
|
|
1102
2353
|
}
|
|
1103
2354
|
return m;
|
|
1104
2355
|
}
|
|
@@ -1110,19 +2361,16 @@ class GetChatAnswerFunctionExecutionJobResponse {
|
|
|
1110
2361
|
}
|
|
1111
2362
|
toApiJson() {
|
|
1112
2363
|
const toReturn = {};
|
|
1113
|
-
if (typeof this.
|
|
1114
|
-
toReturn['
|
|
2364
|
+
if (typeof this.prompt !== 'undefined' && this.prompt !== null) {
|
|
2365
|
+
toReturn['prompt'] = 'toApiJson' in this.prompt ? this.prompt.toApiJson() : this.prompt;
|
|
1115
2366
|
}
|
|
1116
2367
|
return toReturn;
|
|
1117
2368
|
}
|
|
1118
2369
|
}
|
|
1119
|
-
class
|
|
2370
|
+
class GetPromptVersionRequest {
|
|
1120
2371
|
static fromProto(proto) {
|
|
1121
|
-
let m = new
|
|
2372
|
+
let m = new GetPromptVersionRequest();
|
|
1122
2373
|
m = Object.assign(m, proto);
|
|
1123
|
-
if (proto.namespace) {
|
|
1124
|
-
m.namespace = Namespace.fromProto(proto.namespace);
|
|
1125
|
-
}
|
|
1126
2374
|
return m;
|
|
1127
2375
|
}
|
|
1128
2376
|
constructor(kwargs) {
|
|
@@ -1136,24 +2384,18 @@ class GetConnectionRequest {
|
|
|
1136
2384
|
if (typeof this.id !== 'undefined') {
|
|
1137
2385
|
toReturn['id'] = this.id;
|
|
1138
2386
|
}
|
|
1139
|
-
if (typeof this.
|
|
1140
|
-
toReturn['
|
|
1141
|
-
}
|
|
1142
|
-
if (typeof this.namespace !== 'undefined' && this.namespace !== null) {
|
|
1143
|
-
toReturn['namespace'] = 'toApiJson' in this.namespace ? this.namespace.toApiJson() : this.namespace;
|
|
1144
|
-
}
|
|
1145
|
-
if (typeof this.includeAssistantKeys !== 'undefined') {
|
|
1146
|
-
toReturn['includeAssistantKeys'] = this.includeAssistantKeys;
|
|
2387
|
+
if (typeof this.version !== 'undefined') {
|
|
2388
|
+
toReturn['version'] = this.version;
|
|
1147
2389
|
}
|
|
1148
2390
|
return toReturn;
|
|
1149
2391
|
}
|
|
1150
2392
|
}
|
|
1151
|
-
class
|
|
2393
|
+
class GetPromptVersionResponse {
|
|
1152
2394
|
static fromProto(proto) {
|
|
1153
|
-
let m = new
|
|
2395
|
+
let m = new GetPromptVersionResponse();
|
|
1154
2396
|
m = Object.assign(m, proto);
|
|
1155
|
-
if (proto.
|
|
1156
|
-
m.
|
|
2397
|
+
if (proto.promptVersion) {
|
|
2398
|
+
m.promptVersion = PromptVersion.fromProto(proto.promptVersion);
|
|
1157
2399
|
}
|
|
1158
2400
|
return m;
|
|
1159
2401
|
}
|
|
@@ -1165,16 +2407,22 @@ class GetConnectionResponse {
|
|
|
1165
2407
|
}
|
|
1166
2408
|
toApiJson() {
|
|
1167
2409
|
const toReturn = {};
|
|
1168
|
-
if (typeof this.
|
|
1169
|
-
toReturn['
|
|
2410
|
+
if (typeof this.promptVersion !== 'undefined' && this.promptVersion !== null) {
|
|
2411
|
+
toReturn['promptVersion'] = 'toApiJson' in this.promptVersion ? this.promptVersion.toApiJson() : this.promptVersion;
|
|
1170
2412
|
}
|
|
1171
2413
|
return toReturn;
|
|
1172
2414
|
}
|
|
1173
2415
|
}
|
|
1174
|
-
class
|
|
2416
|
+
class ListAllAssistantsAssociatedToConnectionRequest {
|
|
1175
2417
|
static fromProto(proto) {
|
|
1176
|
-
let m = new
|
|
2418
|
+
let m = new ListAllAssistantsAssociatedToConnectionRequest();
|
|
1177
2419
|
m = Object.assign(m, proto);
|
|
2420
|
+
if (proto.connectionKey) {
|
|
2421
|
+
m.connectionKey = ConnectionKey.fromProto(proto.connectionKey);
|
|
2422
|
+
}
|
|
2423
|
+
if (proto.filters) {
|
|
2424
|
+
m.filters = ListAllAssistantsAssociatedToConnectionRequestFilters.fromProto(proto.filters);
|
|
2425
|
+
}
|
|
1178
2426
|
return m;
|
|
1179
2427
|
}
|
|
1180
2428
|
constructor(kwargs) {
|
|
@@ -1185,21 +2433,21 @@ class GetDeployedPromptVersionRequest {
|
|
|
1185
2433
|
}
|
|
1186
2434
|
toApiJson() {
|
|
1187
2435
|
const toReturn = {};
|
|
1188
|
-
if (typeof this.
|
|
1189
|
-
toReturn['
|
|
2436
|
+
if (typeof this.connectionKey !== 'undefined' && this.connectionKey !== null) {
|
|
2437
|
+
toReturn['connectionKey'] = 'toApiJson' in this.connectionKey ? this.connectionKey.toApiJson() : this.connectionKey;
|
|
2438
|
+
}
|
|
2439
|
+
if (typeof this.filters !== 'undefined' && this.filters !== null) {
|
|
2440
|
+
toReturn['filters'] = 'toApiJson' in this.filters ? this.filters.toApiJson() : this.filters;
|
|
1190
2441
|
}
|
|
1191
2442
|
return toReturn;
|
|
1192
2443
|
}
|
|
1193
2444
|
}
|
|
1194
|
-
class
|
|
2445
|
+
class ListAllAssistantsAssociatedToConnectionResponse {
|
|
1195
2446
|
static fromProto(proto) {
|
|
1196
|
-
let m = new
|
|
2447
|
+
let m = new ListAllAssistantsAssociatedToConnectionResponse();
|
|
1197
2448
|
m = Object.assign(m, proto);
|
|
1198
|
-
if (proto.
|
|
1199
|
-
m.
|
|
1200
|
-
}
|
|
1201
|
-
if (proto.deployedPromptVersion) {
|
|
1202
|
-
m.deployedPromptVersion = PromptVersion.fromProto(proto.deployedPromptVersion);
|
|
2449
|
+
if (proto.assistants) {
|
|
2450
|
+
m.assistants = proto.assistants.map(Assistant.fromProto);
|
|
1203
2451
|
}
|
|
1204
2452
|
return m;
|
|
1205
2453
|
}
|
|
@@ -1211,19 +2459,22 @@ class GetDeployedPromptVersionResponse {
|
|
|
1211
2459
|
}
|
|
1212
2460
|
toApiJson() {
|
|
1213
2461
|
const toReturn = {};
|
|
1214
|
-
if (typeof this.
|
|
1215
|
-
toReturn['
|
|
1216
|
-
}
|
|
1217
|
-
if (typeof this.deployedPromptVersion !== 'undefined' && this.deployedPromptVersion !== null) {
|
|
1218
|
-
toReturn['deployedPromptVersion'] = 'toApiJson' in this.deployedPromptVersion ? this.deployedPromptVersion.toApiJson() : this.deployedPromptVersion;
|
|
2462
|
+
if (typeof this.assistants !== 'undefined' && this.assistants !== null) {
|
|
2463
|
+
toReturn['assistants'] = 'toApiJson' in this.assistants ? this.assistants.toApiJson() : this.assistants;
|
|
1219
2464
|
}
|
|
1220
2465
|
return toReturn;
|
|
1221
2466
|
}
|
|
1222
2467
|
}
|
|
1223
|
-
class
|
|
2468
|
+
class ListAssistantRequest {
|
|
1224
2469
|
static fromProto(proto) {
|
|
1225
|
-
let m = new
|
|
2470
|
+
let m = new ListAssistantRequest();
|
|
1226
2471
|
m = Object.assign(m, proto);
|
|
2472
|
+
if (proto.filters) {
|
|
2473
|
+
m.filters = ListAssistantRequestFilters.fromProto(proto.filters);
|
|
2474
|
+
}
|
|
2475
|
+
if (proto.pagingOptions) {
|
|
2476
|
+
m.pagingOptions = PagedRequestOptions.fromProto(proto.pagingOptions);
|
|
2477
|
+
}
|
|
1227
2478
|
return m;
|
|
1228
2479
|
}
|
|
1229
2480
|
constructor(kwargs) {
|
|
@@ -1234,21 +2485,24 @@ class GetMultiDeployedPromptVersionRequest {
|
|
|
1234
2485
|
}
|
|
1235
2486
|
toApiJson() {
|
|
1236
2487
|
const toReturn = {};
|
|
1237
|
-
if (typeof this.
|
|
1238
|
-
toReturn['
|
|
2488
|
+
if (typeof this.filters !== 'undefined' && this.filters !== null) {
|
|
2489
|
+
toReturn['filters'] = 'toApiJson' in this.filters ? this.filters.toApiJson() : this.filters;
|
|
2490
|
+
}
|
|
2491
|
+
if (typeof this.pagingOptions !== 'undefined' && this.pagingOptions !== null) {
|
|
2492
|
+
toReturn['pagingOptions'] = 'toApiJson' in this.pagingOptions ? this.pagingOptions.toApiJson() : this.pagingOptions;
|
|
1239
2493
|
}
|
|
1240
2494
|
return toReturn;
|
|
1241
2495
|
}
|
|
1242
2496
|
}
|
|
1243
|
-
class
|
|
2497
|
+
class ListAssistantResponse {
|
|
1244
2498
|
static fromProto(proto) {
|
|
1245
|
-
let m = new
|
|
2499
|
+
let m = new ListAssistantResponse();
|
|
1246
2500
|
m = Object.assign(m, proto);
|
|
1247
|
-
if (proto.
|
|
1248
|
-
m.
|
|
2501
|
+
if (proto.assistants) {
|
|
2502
|
+
m.assistants = proto.assistants.map(Assistant.fromProto);
|
|
1249
2503
|
}
|
|
1250
|
-
if (proto.
|
|
1251
|
-
m.
|
|
2504
|
+
if (proto.metadata) {
|
|
2505
|
+
m.metadata = PagedResponseMetadata.fromProto(proto.metadata);
|
|
1252
2506
|
}
|
|
1253
2507
|
return m;
|
|
1254
2508
|
}
|
|
@@ -1260,19 +2514,25 @@ class GetMultiDeployedPromptVersionResponse {
|
|
|
1260
2514
|
}
|
|
1261
2515
|
toApiJson() {
|
|
1262
2516
|
const toReturn = {};
|
|
1263
|
-
if (typeof this.
|
|
1264
|
-
toReturn['
|
|
2517
|
+
if (typeof this.assistants !== 'undefined' && this.assistants !== null) {
|
|
2518
|
+
toReturn['assistants'] = 'toApiJson' in this.assistants ? this.assistants.toApiJson() : this.assistants;
|
|
1265
2519
|
}
|
|
1266
|
-
if (typeof this.
|
|
1267
|
-
toReturn['
|
|
2520
|
+
if (typeof this.metadata !== 'undefined' && this.metadata !== null) {
|
|
2521
|
+
toReturn['metadata'] = 'toApiJson' in this.metadata ? this.metadata.toApiJson() : this.metadata;
|
|
1268
2522
|
}
|
|
1269
2523
|
return toReturn;
|
|
1270
2524
|
}
|
|
1271
2525
|
}
|
|
1272
|
-
class
|
|
2526
|
+
class ListConnectionsRequest {
|
|
1273
2527
|
static fromProto(proto) {
|
|
1274
|
-
let m = new
|
|
2528
|
+
let m = new ListConnectionsRequest();
|
|
1275
2529
|
m = Object.assign(m, proto);
|
|
2530
|
+
if (proto.filters) {
|
|
2531
|
+
m.filters = ListConnectionsRequestFilters.fromProto(proto.filters);
|
|
2532
|
+
}
|
|
2533
|
+
if (proto.pagingOptions) {
|
|
2534
|
+
m.pagingOptions = PagedRequestOptions.fromProto(proto.pagingOptions);
|
|
2535
|
+
}
|
|
1276
2536
|
return m;
|
|
1277
2537
|
}
|
|
1278
2538
|
constructor(kwargs) {
|
|
@@ -1283,18 +2543,27 @@ class GetPromptRequest {
|
|
|
1283
2543
|
}
|
|
1284
2544
|
toApiJson() {
|
|
1285
2545
|
const toReturn = {};
|
|
1286
|
-
if (typeof this.
|
|
1287
|
-
toReturn['
|
|
2546
|
+
if (typeof this.filters !== 'undefined' && this.filters !== null) {
|
|
2547
|
+
toReturn['filters'] = 'toApiJson' in this.filters ? this.filters.toApiJson() : this.filters;
|
|
2548
|
+
}
|
|
2549
|
+
if (typeof this.pagingOptions !== 'undefined' && this.pagingOptions !== null) {
|
|
2550
|
+
toReturn['pagingOptions'] = 'toApiJson' in this.pagingOptions ? this.pagingOptions.toApiJson() : this.pagingOptions;
|
|
2551
|
+
}
|
|
2552
|
+
if (typeof this.includeAssistantKeys !== 'undefined') {
|
|
2553
|
+
toReturn['includeAssistantKeys'] = this.includeAssistantKeys;
|
|
1288
2554
|
}
|
|
1289
2555
|
return toReturn;
|
|
1290
2556
|
}
|
|
1291
2557
|
}
|
|
1292
|
-
class
|
|
2558
|
+
class ListConnectionsResponse {
|
|
1293
2559
|
static fromProto(proto) {
|
|
1294
|
-
let m = new
|
|
2560
|
+
let m = new ListConnectionsResponse();
|
|
1295
2561
|
m = Object.assign(m, proto);
|
|
1296
|
-
if (proto.
|
|
1297
|
-
m.
|
|
2562
|
+
if (proto.connections) {
|
|
2563
|
+
m.connections = proto.connections.map(Connection.fromProto);
|
|
2564
|
+
}
|
|
2565
|
+
if (proto.metadata) {
|
|
2566
|
+
m.metadata = PagedResponseMetadata.fromProto(proto.metadata);
|
|
1298
2567
|
}
|
|
1299
2568
|
return m;
|
|
1300
2569
|
}
|
|
@@ -1306,16 +2575,25 @@ class GetPromptResponse {
|
|
|
1306
2575
|
}
|
|
1307
2576
|
toApiJson() {
|
|
1308
2577
|
const toReturn = {};
|
|
1309
|
-
if (typeof this.
|
|
1310
|
-
toReturn['
|
|
2578
|
+
if (typeof this.connections !== 'undefined' && this.connections !== null) {
|
|
2579
|
+
toReturn['connections'] = 'toApiJson' in this.connections ? this.connections.toApiJson() : this.connections;
|
|
2580
|
+
}
|
|
2581
|
+
if (typeof this.metadata !== 'undefined' && this.metadata !== null) {
|
|
2582
|
+
toReturn['metadata'] = 'toApiJson' in this.metadata ? this.metadata.toApiJson() : this.metadata;
|
|
1311
2583
|
}
|
|
1312
2584
|
return toReturn;
|
|
1313
2585
|
}
|
|
1314
2586
|
}
|
|
1315
|
-
class
|
|
2587
|
+
class ListFunctionRequest {
|
|
1316
2588
|
static fromProto(proto) {
|
|
1317
|
-
let m = new
|
|
2589
|
+
let m = new ListFunctionRequest();
|
|
1318
2590
|
m = Object.assign(m, proto);
|
|
2591
|
+
if (proto.filters) {
|
|
2592
|
+
m.filters = ListFunctionRequestFilters.fromProto(proto.filters);
|
|
2593
|
+
}
|
|
2594
|
+
if (proto.pagingOptions) {
|
|
2595
|
+
m.pagingOptions = PagedRequestOptions.fromProto(proto.pagingOptions);
|
|
2596
|
+
}
|
|
1319
2597
|
return m;
|
|
1320
2598
|
}
|
|
1321
2599
|
constructor(kwargs) {
|
|
@@ -1326,21 +2604,24 @@ class GetPromptVersionRequest {
|
|
|
1326
2604
|
}
|
|
1327
2605
|
toApiJson() {
|
|
1328
2606
|
const toReturn = {};
|
|
1329
|
-
if (typeof this.
|
|
1330
|
-
toReturn['
|
|
2607
|
+
if (typeof this.filters !== 'undefined' && this.filters !== null) {
|
|
2608
|
+
toReturn['filters'] = 'toApiJson' in this.filters ? this.filters.toApiJson() : this.filters;
|
|
1331
2609
|
}
|
|
1332
|
-
if (typeof this.
|
|
1333
|
-
toReturn['
|
|
2610
|
+
if (typeof this.pagingOptions !== 'undefined' && this.pagingOptions !== null) {
|
|
2611
|
+
toReturn['pagingOptions'] = 'toApiJson' in this.pagingOptions ? this.pagingOptions.toApiJson() : this.pagingOptions;
|
|
1334
2612
|
}
|
|
1335
2613
|
return toReturn;
|
|
1336
2614
|
}
|
|
1337
2615
|
}
|
|
1338
|
-
class
|
|
2616
|
+
class ListFunctionResponse {
|
|
1339
2617
|
static fromProto(proto) {
|
|
1340
|
-
let m = new
|
|
2618
|
+
let m = new ListFunctionResponse();
|
|
1341
2619
|
m = Object.assign(m, proto);
|
|
1342
|
-
if (proto.
|
|
1343
|
-
m.
|
|
2620
|
+
if (proto.functions) {
|
|
2621
|
+
m.functions = proto.functions.map(Function.fromProto);
|
|
2622
|
+
}
|
|
2623
|
+
if (proto.metadata) {
|
|
2624
|
+
m.metadata = PagedResponseMetadata.fromProto(proto.metadata);
|
|
1344
2625
|
}
|
|
1345
2626
|
return m;
|
|
1346
2627
|
}
|
|
@@ -1352,21 +2633,24 @@ class GetPromptVersionResponse {
|
|
|
1352
2633
|
}
|
|
1353
2634
|
toApiJson() {
|
|
1354
2635
|
const toReturn = {};
|
|
1355
|
-
if (typeof this.
|
|
1356
|
-
toReturn['
|
|
2636
|
+
if (typeof this.functions !== 'undefined' && this.functions !== null) {
|
|
2637
|
+
toReturn['functions'] = 'toApiJson' in this.functions ? this.functions.toApiJson() : this.functions;
|
|
2638
|
+
}
|
|
2639
|
+
if (typeof this.metadata !== 'undefined' && this.metadata !== null) {
|
|
2640
|
+
toReturn['metadata'] = 'toApiJson' in this.metadata ? this.metadata.toApiJson() : this.metadata;
|
|
1357
2641
|
}
|
|
1358
2642
|
return toReturn;
|
|
1359
2643
|
}
|
|
1360
2644
|
}
|
|
1361
|
-
class
|
|
2645
|
+
class ListGoalsRequest {
|
|
1362
2646
|
static fromProto(proto) {
|
|
1363
|
-
let m = new
|
|
2647
|
+
let m = new ListGoalsRequest();
|
|
1364
2648
|
m = Object.assign(m, proto);
|
|
1365
|
-
if (proto.connectionKey) {
|
|
1366
|
-
m.connectionKey = ConnectionKey.fromProto(proto.connectionKey);
|
|
1367
|
-
}
|
|
1368
2649
|
if (proto.filters) {
|
|
1369
|
-
m.filters =
|
|
2650
|
+
m.filters = ListGoalsRequestFilters.fromProto(proto.filters);
|
|
2651
|
+
}
|
|
2652
|
+
if (proto.pagingOptions) {
|
|
2653
|
+
m.pagingOptions = PagedRequestOptions.fromProto(proto.pagingOptions);
|
|
1370
2654
|
}
|
|
1371
2655
|
return m;
|
|
1372
2656
|
}
|
|
@@ -1378,21 +2662,24 @@ class ListAllAssistantsAssociatedToConnectionRequest {
|
|
|
1378
2662
|
}
|
|
1379
2663
|
toApiJson() {
|
|
1380
2664
|
const toReturn = {};
|
|
1381
|
-
if (typeof this.connectionKey !== 'undefined' && this.connectionKey !== null) {
|
|
1382
|
-
toReturn['connectionKey'] = 'toApiJson' in this.connectionKey ? this.connectionKey.toApiJson() : this.connectionKey;
|
|
1383
|
-
}
|
|
1384
2665
|
if (typeof this.filters !== 'undefined' && this.filters !== null) {
|
|
1385
2666
|
toReturn['filters'] = 'toApiJson' in this.filters ? this.filters.toApiJson() : this.filters;
|
|
1386
2667
|
}
|
|
2668
|
+
if (typeof this.pagingOptions !== 'undefined' && this.pagingOptions !== null) {
|
|
2669
|
+
toReturn['pagingOptions'] = 'toApiJson' in this.pagingOptions ? this.pagingOptions.toApiJson() : this.pagingOptions;
|
|
2670
|
+
}
|
|
1387
2671
|
return toReturn;
|
|
1388
2672
|
}
|
|
1389
2673
|
}
|
|
1390
|
-
class
|
|
2674
|
+
class ListGoalsResponse {
|
|
1391
2675
|
static fromProto(proto) {
|
|
1392
|
-
let m = new
|
|
2676
|
+
let m = new ListGoalsResponse();
|
|
1393
2677
|
m = Object.assign(m, proto);
|
|
1394
|
-
if (proto.
|
|
1395
|
-
m.
|
|
2678
|
+
if (proto.goals) {
|
|
2679
|
+
m.goals = proto.goals.map(Goal.fromProto);
|
|
2680
|
+
}
|
|
2681
|
+
if (proto.metadata) {
|
|
2682
|
+
m.metadata = PagedResponseMetadata.fromProto(proto.metadata);
|
|
1396
2683
|
}
|
|
1397
2684
|
return m;
|
|
1398
2685
|
}
|
|
@@ -1404,18 +2691,21 @@ class ListAllAssistantsAssociatedToConnectionResponse {
|
|
|
1404
2691
|
}
|
|
1405
2692
|
toApiJson() {
|
|
1406
2693
|
const toReturn = {};
|
|
1407
|
-
if (typeof this.
|
|
1408
|
-
toReturn['
|
|
2694
|
+
if (typeof this.goals !== 'undefined' && this.goals !== null) {
|
|
2695
|
+
toReturn['goals'] = 'toApiJson' in this.goals ? this.goals.toApiJson() : this.goals;
|
|
2696
|
+
}
|
|
2697
|
+
if (typeof this.metadata !== 'undefined' && this.metadata !== null) {
|
|
2698
|
+
toReturn['metadata'] = 'toApiJson' in this.metadata ? this.metadata.toApiJson() : this.metadata;
|
|
1409
2699
|
}
|
|
1410
2700
|
return toReturn;
|
|
1411
2701
|
}
|
|
1412
2702
|
}
|
|
1413
|
-
class
|
|
2703
|
+
class ListPromptModuleRequest {
|
|
1414
2704
|
static fromProto(proto) {
|
|
1415
|
-
let m = new
|
|
2705
|
+
let m = new ListPromptModuleRequest();
|
|
1416
2706
|
m = Object.assign(m, proto);
|
|
1417
2707
|
if (proto.filters) {
|
|
1418
|
-
m.filters =
|
|
2708
|
+
m.filters = ListPromptModuleRequestFilters.fromProto(proto.filters);
|
|
1419
2709
|
}
|
|
1420
2710
|
if (proto.pagingOptions) {
|
|
1421
2711
|
m.pagingOptions = PagedRequestOptions.fromProto(proto.pagingOptions);
|
|
@@ -1439,12 +2729,15 @@ class ListAssistantRequest {
|
|
|
1439
2729
|
return toReturn;
|
|
1440
2730
|
}
|
|
1441
2731
|
}
|
|
1442
|
-
class
|
|
2732
|
+
class ListPromptModuleResponse {
|
|
1443
2733
|
static fromProto(proto) {
|
|
1444
|
-
let m = new
|
|
2734
|
+
let m = new ListPromptModuleResponse();
|
|
1445
2735
|
m = Object.assign(m, proto);
|
|
1446
|
-
if (proto.
|
|
1447
|
-
m.
|
|
2736
|
+
if (proto.promptModules) {
|
|
2737
|
+
m.promptModules = proto.promptModules.map(PromptModule.fromProto);
|
|
2738
|
+
}
|
|
2739
|
+
if (proto.deployedPromptModuleVersions) {
|
|
2740
|
+
m.deployedPromptModuleVersions = proto.deployedPromptModuleVersions.map(PromptModuleVersion.fromProto);
|
|
1448
2741
|
}
|
|
1449
2742
|
if (proto.metadata) {
|
|
1450
2743
|
m.metadata = PagedResponseMetadata.fromProto(proto.metadata);
|
|
@@ -1459,8 +2752,11 @@ class ListAssistantResponse {
|
|
|
1459
2752
|
}
|
|
1460
2753
|
toApiJson() {
|
|
1461
2754
|
const toReturn = {};
|
|
1462
|
-
if (typeof this.
|
|
1463
|
-
toReturn['
|
|
2755
|
+
if (typeof this.promptModules !== 'undefined' && this.promptModules !== null) {
|
|
2756
|
+
toReturn['promptModules'] = 'toApiJson' in this.promptModules ? this.promptModules.toApiJson() : this.promptModules;
|
|
2757
|
+
}
|
|
2758
|
+
if (typeof this.deployedPromptModuleVersions !== 'undefined' && this.deployedPromptModuleVersions !== null) {
|
|
2759
|
+
toReturn['deployedPromptModuleVersions'] = 'toApiJson' in this.deployedPromptModuleVersions ? this.deployedPromptModuleVersions.toApiJson() : this.deployedPromptModuleVersions;
|
|
1464
2760
|
}
|
|
1465
2761
|
if (typeof this.metadata !== 'undefined' && this.metadata !== null) {
|
|
1466
2762
|
toReturn['metadata'] = 'toApiJson' in this.metadata ? this.metadata.toApiJson() : this.metadata;
|
|
@@ -1468,12 +2764,12 @@ class ListAssistantResponse {
|
|
|
1468
2764
|
return toReturn;
|
|
1469
2765
|
}
|
|
1470
2766
|
}
|
|
1471
|
-
class
|
|
2767
|
+
class ListPromptModuleVersionsRequest {
|
|
1472
2768
|
static fromProto(proto) {
|
|
1473
|
-
let m = new
|
|
2769
|
+
let m = new ListPromptModuleVersionsRequest();
|
|
1474
2770
|
m = Object.assign(m, proto);
|
|
1475
|
-
if (proto.
|
|
1476
|
-
m.
|
|
2771
|
+
if (proto.namespace) {
|
|
2772
|
+
m.namespace = Namespace.fromProto(proto.namespace);
|
|
1477
2773
|
}
|
|
1478
2774
|
if (proto.pagingOptions) {
|
|
1479
2775
|
m.pagingOptions = PagedRequestOptions.fromProto(proto.pagingOptions);
|
|
@@ -1488,24 +2784,24 @@ class ListConnectionsRequest {
|
|
|
1488
2784
|
}
|
|
1489
2785
|
toApiJson() {
|
|
1490
2786
|
const toReturn = {};
|
|
1491
|
-
if (typeof this.
|
|
1492
|
-
toReturn['
|
|
2787
|
+
if (typeof this.id !== 'undefined') {
|
|
2788
|
+
toReturn['id'] = this.id;
|
|
2789
|
+
}
|
|
2790
|
+
if (typeof this.namespace !== 'undefined' && this.namespace !== null) {
|
|
2791
|
+
toReturn['namespace'] = 'toApiJson' in this.namespace ? this.namespace.toApiJson() : this.namespace;
|
|
1493
2792
|
}
|
|
1494
2793
|
if (typeof this.pagingOptions !== 'undefined' && this.pagingOptions !== null) {
|
|
1495
2794
|
toReturn['pagingOptions'] = 'toApiJson' in this.pagingOptions ? this.pagingOptions.toApiJson() : this.pagingOptions;
|
|
1496
2795
|
}
|
|
1497
|
-
if (typeof this.includeAssistantKeys !== 'undefined') {
|
|
1498
|
-
toReturn['includeAssistantKeys'] = this.includeAssistantKeys;
|
|
1499
|
-
}
|
|
1500
2796
|
return toReturn;
|
|
1501
2797
|
}
|
|
1502
2798
|
}
|
|
1503
|
-
class
|
|
2799
|
+
class ListPromptModuleVersionsResponse {
|
|
1504
2800
|
static fromProto(proto) {
|
|
1505
|
-
let m = new
|
|
2801
|
+
let m = new ListPromptModuleVersionsResponse();
|
|
1506
2802
|
m = Object.assign(m, proto);
|
|
1507
|
-
if (proto.
|
|
1508
|
-
m.
|
|
2803
|
+
if (proto.promptModuleVersions) {
|
|
2804
|
+
m.promptModuleVersions = proto.promptModuleVersions.map(PromptModuleVersion.fromProto);
|
|
1509
2805
|
}
|
|
1510
2806
|
if (proto.metadata) {
|
|
1511
2807
|
m.metadata = PagedResponseMetadata.fromProto(proto.metadata);
|
|
@@ -1520,8 +2816,8 @@ class ListConnectionsResponse {
|
|
|
1520
2816
|
}
|
|
1521
2817
|
toApiJson() {
|
|
1522
2818
|
const toReturn = {};
|
|
1523
|
-
if (typeof this.
|
|
1524
|
-
toReturn['
|
|
2819
|
+
if (typeof this.promptModuleVersions !== 'undefined' && this.promptModuleVersions !== null) {
|
|
2820
|
+
toReturn['promptModuleVersions'] = 'toApiJson' in this.promptModuleVersions ? this.promptModuleVersions.toApiJson() : this.promptModuleVersions;
|
|
1525
2821
|
}
|
|
1526
2822
|
if (typeof this.metadata !== 'undefined' && this.metadata !== null) {
|
|
1527
2823
|
toReturn['metadata'] = 'toApiJson' in this.metadata ? this.metadata.toApiJson() : this.metadata;
|
|
@@ -1694,6 +2990,35 @@ class SetAssistantConnectionsRequest {
|
|
|
1694
2990
|
return toReturn;
|
|
1695
2991
|
}
|
|
1696
2992
|
}
|
|
2993
|
+
class UpdatePromptModuleRequest {
|
|
2994
|
+
static fromProto(proto) {
|
|
2995
|
+
let m = new UpdatePromptModuleRequest();
|
|
2996
|
+
m = Object.assign(m, proto);
|
|
2997
|
+
if (proto.namespace) {
|
|
2998
|
+
m.namespace = Namespace.fromProto(proto.namespace);
|
|
2999
|
+
}
|
|
3000
|
+
return m;
|
|
3001
|
+
}
|
|
3002
|
+
constructor(kwargs) {
|
|
3003
|
+
if (!kwargs) {
|
|
3004
|
+
return;
|
|
3005
|
+
}
|
|
3006
|
+
Object.assign(this, kwargs);
|
|
3007
|
+
}
|
|
3008
|
+
toApiJson() {
|
|
3009
|
+
const toReturn = {};
|
|
3010
|
+
if (typeof this.id !== 'undefined') {
|
|
3011
|
+
toReturn['id'] = this.id;
|
|
3012
|
+
}
|
|
3013
|
+
if (typeof this.namespace !== 'undefined' && this.namespace !== null) {
|
|
3014
|
+
toReturn['namespace'] = 'toApiJson' in this.namespace ? this.namespace.toApiJson() : this.namespace;
|
|
3015
|
+
}
|
|
3016
|
+
if (typeof this.content !== 'undefined') {
|
|
3017
|
+
toReturn['content'] = this.content;
|
|
3018
|
+
}
|
|
3019
|
+
return toReturn;
|
|
3020
|
+
}
|
|
3021
|
+
}
|
|
1697
3022
|
class UpdatePromptRequest {
|
|
1698
3023
|
static fromProto(proto) {
|
|
1699
3024
|
let m = new UpdatePromptRequest();
|
|
@@ -1714,6 +3039,9 @@ class UpdatePromptRequest {
|
|
|
1714
3039
|
if (typeof this.content !== 'undefined') {
|
|
1715
3040
|
toReturn['content'] = this.content;
|
|
1716
3041
|
}
|
|
3042
|
+
if (typeof this.description !== 'undefined') {
|
|
3043
|
+
toReturn['description'] = this.description;
|
|
3044
|
+
}
|
|
1717
3045
|
return toReturn;
|
|
1718
3046
|
}
|
|
1719
3047
|
}
|
|
@@ -1786,6 +3114,52 @@ class UpsertConnectionRequest {
|
|
|
1786
3114
|
return toReturn;
|
|
1787
3115
|
}
|
|
1788
3116
|
}
|
|
3117
|
+
class UpsertFunctionRequest {
|
|
3118
|
+
static fromProto(proto) {
|
|
3119
|
+
let m = new UpsertFunctionRequest();
|
|
3120
|
+
m = Object.assign(m, proto);
|
|
3121
|
+
if (proto.function) {
|
|
3122
|
+
m.function = Function.fromProto(proto.function);
|
|
3123
|
+
}
|
|
3124
|
+
return m;
|
|
3125
|
+
}
|
|
3126
|
+
constructor(kwargs) {
|
|
3127
|
+
if (!kwargs) {
|
|
3128
|
+
return;
|
|
3129
|
+
}
|
|
3130
|
+
Object.assign(this, kwargs);
|
|
3131
|
+
}
|
|
3132
|
+
toApiJson() {
|
|
3133
|
+
const toReturn = {};
|
|
3134
|
+
if (typeof this.function !== 'undefined' && this.function !== null) {
|
|
3135
|
+
toReturn['function'] = 'toApiJson' in this.function ? this.function.toApiJson() : this.function;
|
|
3136
|
+
}
|
|
3137
|
+
return toReturn;
|
|
3138
|
+
}
|
|
3139
|
+
}
|
|
3140
|
+
class UpsertGoalRequest {
|
|
3141
|
+
static fromProto(proto) {
|
|
3142
|
+
let m = new UpsertGoalRequest();
|
|
3143
|
+
m = Object.assign(m, proto);
|
|
3144
|
+
if (proto.goal) {
|
|
3145
|
+
m.goal = Goal.fromProto(proto.goal);
|
|
3146
|
+
}
|
|
3147
|
+
return m;
|
|
3148
|
+
}
|
|
3149
|
+
constructor(kwargs) {
|
|
3150
|
+
if (!kwargs) {
|
|
3151
|
+
return;
|
|
3152
|
+
}
|
|
3153
|
+
Object.assign(this, kwargs);
|
|
3154
|
+
}
|
|
3155
|
+
toApiJson() {
|
|
3156
|
+
const toReturn = {};
|
|
3157
|
+
if (typeof this.goal !== 'undefined' && this.goal !== null) {
|
|
3158
|
+
toReturn['goal'] = 'toApiJson' in this.goal ? this.goal.toApiJson() : this.goal;
|
|
3159
|
+
}
|
|
3160
|
+
return toReturn;
|
|
3161
|
+
}
|
|
3162
|
+
}
|
|
1789
3163
|
|
|
1790
3164
|
// *********************************
|
|
1791
3165
|
// Code generated by sdkgen
|
|
@@ -1906,6 +3280,182 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
1906
3280
|
args: [{ providedIn: 'root' }]
|
|
1907
3281
|
}] });
|
|
1908
3282
|
|
|
3283
|
+
// *********************************
|
|
3284
|
+
// Code generated by sdkgen
|
|
3285
|
+
// DO NOT EDIT!.
|
|
3286
|
+
//
|
|
3287
|
+
// API Service.
|
|
3288
|
+
// *********************************
|
|
3289
|
+
class FunctionApiService {
|
|
3290
|
+
constructor() {
|
|
3291
|
+
this.hostService = inject(HostService);
|
|
3292
|
+
this.http = inject(HttpClient);
|
|
3293
|
+
this._host = this.hostService.hostWithScheme;
|
|
3294
|
+
}
|
|
3295
|
+
apiOptions() {
|
|
3296
|
+
return {
|
|
3297
|
+
headers: new HttpHeaders({
|
|
3298
|
+
'Content-Type': 'application/json'
|
|
3299
|
+
}),
|
|
3300
|
+
withCredentials: true
|
|
3301
|
+
};
|
|
3302
|
+
}
|
|
3303
|
+
upsert(r) {
|
|
3304
|
+
const request = (r.toApiJson) ? r : new UpsertFunctionRequest(r);
|
|
3305
|
+
return this.http.post(this._host + "/ai_assistants.v1alpha1.FunctionService/Upsert", request.toApiJson(), Object.assign(Object.assign({}, this.apiOptions()), { observe: 'response' }));
|
|
3306
|
+
}
|
|
3307
|
+
get(r) {
|
|
3308
|
+
const request = (r.toApiJson) ? r : new GetFunctionRequest(r);
|
|
3309
|
+
return this.http.post(this._host + "/ai_assistants.v1alpha1.FunctionService/Get", request.toApiJson(), this.apiOptions())
|
|
3310
|
+
.pipe(map(resp => GetFunctionResponse.fromProto(resp)));
|
|
3311
|
+
}
|
|
3312
|
+
getMulti(r) {
|
|
3313
|
+
const request = (r.toApiJson) ? r : new GetMultiFunctionRequest(r);
|
|
3314
|
+
return this.http.post(this._host + "/ai_assistants.v1alpha1.FunctionService/GetMulti", request.toApiJson(), this.apiOptions())
|
|
3315
|
+
.pipe(map(resp => GetMultiFunctionResponse.fromProto(resp)));
|
|
3316
|
+
}
|
|
3317
|
+
list(r) {
|
|
3318
|
+
const request = (r.toApiJson) ? r : new ListFunctionRequest(r);
|
|
3319
|
+
return this.http.post(this._host + "/ai_assistants.v1alpha1.FunctionService/List", request.toApiJson(), this.apiOptions())
|
|
3320
|
+
.pipe(map(resp => ListFunctionResponse.fromProto(resp)));
|
|
3321
|
+
}
|
|
3322
|
+
delete(r) {
|
|
3323
|
+
const request = (r.toApiJson) ? r : new DeleteFunctionRequest(r);
|
|
3324
|
+
return this.http.post(this._host + "/ai_assistants.v1alpha1.FunctionService/Delete", request.toApiJson(), Object.assign(Object.assign({}, this.apiOptions()), { observe: 'response' }));
|
|
3325
|
+
}
|
|
3326
|
+
}
|
|
3327
|
+
FunctionApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: FunctionApiService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
3328
|
+
FunctionApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: FunctionApiService, providedIn: 'root' });
|
|
3329
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: FunctionApiService, decorators: [{
|
|
3330
|
+
type: Injectable,
|
|
3331
|
+
args: [{ providedIn: 'root' }]
|
|
3332
|
+
}] });
|
|
3333
|
+
|
|
3334
|
+
// *********************************
|
|
3335
|
+
// Code generated by sdkgen
|
|
3336
|
+
// DO NOT EDIT!.
|
|
3337
|
+
//
|
|
3338
|
+
// API Service.
|
|
3339
|
+
// *********************************
|
|
3340
|
+
class GoalApiService {
|
|
3341
|
+
constructor() {
|
|
3342
|
+
this.hostService = inject(HostService);
|
|
3343
|
+
this.http = inject(HttpClient);
|
|
3344
|
+
this._host = this.hostService.hostWithScheme;
|
|
3345
|
+
}
|
|
3346
|
+
apiOptions() {
|
|
3347
|
+
return {
|
|
3348
|
+
headers: new HttpHeaders({
|
|
3349
|
+
'Content-Type': 'application/json'
|
|
3350
|
+
}),
|
|
3351
|
+
withCredentials: true
|
|
3352
|
+
};
|
|
3353
|
+
}
|
|
3354
|
+
upsert(r) {
|
|
3355
|
+
const request = (r.toApiJson) ? r : new UpsertGoalRequest(r);
|
|
3356
|
+
return this.http.post(this._host + "/ai_assistants.v1alpha1.GoalService/Upsert", request.toApiJson(), Object.assign(Object.assign({}, this.apiOptions()), { observe: 'response' }));
|
|
3357
|
+
}
|
|
3358
|
+
get(r) {
|
|
3359
|
+
const request = (r.toApiJson) ? r : new GetGoalRequest(r);
|
|
3360
|
+
return this.http.post(this._host + "/ai_assistants.v1alpha1.GoalService/Get", request.toApiJson(), this.apiOptions())
|
|
3361
|
+
.pipe(map(resp => GetGoalResponse.fromProto(resp)));
|
|
3362
|
+
}
|
|
3363
|
+
getMulti(r) {
|
|
3364
|
+
const request = (r.toApiJson) ? r : new GetMultiGoalRequest(r);
|
|
3365
|
+
return this.http.post(this._host + "/ai_assistants.v1alpha1.GoalService/GetMulti", request.toApiJson(), this.apiOptions())
|
|
3366
|
+
.pipe(map(resp => GetMultiGoalResponse.fromProto(resp)));
|
|
3367
|
+
}
|
|
3368
|
+
delete(r) {
|
|
3369
|
+
const request = (r.toApiJson) ? r : new DeleteGoalRequest(r);
|
|
3370
|
+
return this.http.post(this._host + "/ai_assistants.v1alpha1.GoalService/Delete", request.toApiJson(), Object.assign(Object.assign({}, this.apiOptions()), { observe: 'response' }));
|
|
3371
|
+
}
|
|
3372
|
+
list(r) {
|
|
3373
|
+
const request = (r.toApiJson) ? r : new ListGoalsRequest(r);
|
|
3374
|
+
return this.http.post(this._host + "/ai_assistants.v1alpha1.GoalService/List", request.toApiJson(), this.apiOptions())
|
|
3375
|
+
.pipe(map(resp => ListGoalsResponse.fromProto(resp)));
|
|
3376
|
+
}
|
|
3377
|
+
}
|
|
3378
|
+
GoalApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: GoalApiService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
3379
|
+
GoalApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: GoalApiService, providedIn: 'root' });
|
|
3380
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: GoalApiService, decorators: [{
|
|
3381
|
+
type: Injectable,
|
|
3382
|
+
args: [{ providedIn: 'root' }]
|
|
3383
|
+
}] });
|
|
3384
|
+
|
|
3385
|
+
// *********************************
|
|
3386
|
+
// Code generated by sdkgen
|
|
3387
|
+
// DO NOT EDIT!.
|
|
3388
|
+
//
|
|
3389
|
+
// API Service.
|
|
3390
|
+
// *********************************
|
|
3391
|
+
class PromptModuleApiService {
|
|
3392
|
+
constructor() {
|
|
3393
|
+
this.hostService = inject(HostService);
|
|
3394
|
+
this.http = inject(HttpClient);
|
|
3395
|
+
this._host = this.hostService.hostWithScheme;
|
|
3396
|
+
}
|
|
3397
|
+
apiOptions() {
|
|
3398
|
+
return {
|
|
3399
|
+
headers: new HttpHeaders({
|
|
3400
|
+
'Content-Type': 'application/json'
|
|
3401
|
+
}),
|
|
3402
|
+
withCredentials: true
|
|
3403
|
+
};
|
|
3404
|
+
}
|
|
3405
|
+
create(r) {
|
|
3406
|
+
const request = (r.toApiJson) ? r : new CreatePromptModuleRequest(r);
|
|
3407
|
+
return this.http.post(this._host + "/ai_assistants.v1alpha1.PromptModuleService/Create", request.toApiJson(), Object.assign(Object.assign({}, this.apiOptions()), { observe: 'response' }));
|
|
3408
|
+
}
|
|
3409
|
+
get(r) {
|
|
3410
|
+
const request = (r.toApiJson) ? r : new GetPromptModuleRequest(r);
|
|
3411
|
+
return this.http.post(this._host + "/ai_assistants.v1alpha1.PromptModuleService/Get", request.toApiJson(), this.apiOptions())
|
|
3412
|
+
.pipe(map(resp => GetPromptModuleResponse.fromProto(resp)));
|
|
3413
|
+
}
|
|
3414
|
+
getVersion(r) {
|
|
3415
|
+
const request = (r.toApiJson) ? r : new GetPromptModuleVersionRequest(r);
|
|
3416
|
+
return this.http.post(this._host + "/ai_assistants.v1alpha1.PromptModuleService/GetVersion", request.toApiJson(), this.apiOptions())
|
|
3417
|
+
.pipe(map(resp => GetPromptModuleVersionResponse.fromProto(resp)));
|
|
3418
|
+
}
|
|
3419
|
+
getHydratedDeployedVersion(r) {
|
|
3420
|
+
const request = (r.toApiJson) ? r : new GetHydratedDeployedPromptModuleVersionRequest(r);
|
|
3421
|
+
return this.http.post(this._host + "/ai_assistants.v1alpha1.PromptModuleService/GetHydratedDeployedVersion", request.toApiJson(), this.apiOptions())
|
|
3422
|
+
.pipe(map(resp => GetHydratedDeployedPromptModuleVersionResponse.fromProto(resp)));
|
|
3423
|
+
}
|
|
3424
|
+
getMultiHydratedDeployedVersion(r) {
|
|
3425
|
+
const request = (r.toApiJson) ? r : new GetMultiHydratedDeployedPromptModuleVersionRequest(r);
|
|
3426
|
+
return this.http.post(this._host + "/ai_assistants.v1alpha1.PromptModuleService/GetMultiHydratedDeployedVersion", request.toApiJson(), this.apiOptions())
|
|
3427
|
+
.pipe(map(resp => GetMultiHydratedDeployedPromptModuleVersionResponse.fromProto(resp)));
|
|
3428
|
+
}
|
|
3429
|
+
update(r) {
|
|
3430
|
+
const request = (r.toApiJson) ? r : new UpdatePromptModuleRequest(r);
|
|
3431
|
+
return this.http.post(this._host + "/ai_assistants.v1alpha1.PromptModuleService/Update", request.toApiJson(), Object.assign(Object.assign({}, this.apiOptions()), { observe: 'response' }));
|
|
3432
|
+
}
|
|
3433
|
+
deploy(r) {
|
|
3434
|
+
const request = (r.toApiJson) ? r : new DeployPromptModuleRequest(r);
|
|
3435
|
+
return this.http.post(this._host + "/ai_assistants.v1alpha1.PromptModuleService/Deploy", request.toApiJson(), Object.assign(Object.assign({}, this.apiOptions()), { observe: 'response' }));
|
|
3436
|
+
}
|
|
3437
|
+
list(r) {
|
|
3438
|
+
const request = (r.toApiJson) ? r : new ListPromptModuleRequest(r);
|
|
3439
|
+
return this.http.post(this._host + "/ai_assistants.v1alpha1.PromptModuleService/List", request.toApiJson(), this.apiOptions())
|
|
3440
|
+
.pipe(map(resp => ListPromptModuleResponse.fromProto(resp)));
|
|
3441
|
+
}
|
|
3442
|
+
listVersions(r) {
|
|
3443
|
+
const request = (r.toApiJson) ? r : new ListPromptModuleVersionsRequest(r);
|
|
3444
|
+
return this.http.post(this._host + "/ai_assistants.v1alpha1.PromptModuleService/ListVersions", request.toApiJson(), this.apiOptions())
|
|
3445
|
+
.pipe(map(resp => ListPromptModuleVersionsResponse.fromProto(resp)));
|
|
3446
|
+
}
|
|
3447
|
+
delete(r) {
|
|
3448
|
+
const request = (r.toApiJson) ? r : new DeletePromptModuleRequest(r);
|
|
3449
|
+
return this.http.post(this._host + "/ai_assistants.v1alpha1.PromptModuleService/Delete", request.toApiJson(), Object.assign(Object.assign({}, this.apiOptions()), { observe: 'response' }));
|
|
3450
|
+
}
|
|
3451
|
+
}
|
|
3452
|
+
PromptModuleApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PromptModuleApiService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
3453
|
+
PromptModuleApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PromptModuleApiService, providedIn: 'root' });
|
|
3454
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PromptModuleApiService, decorators: [{
|
|
3455
|
+
type: Injectable,
|
|
3456
|
+
args: [{ providedIn: 'root' }]
|
|
3457
|
+
}] });
|
|
3458
|
+
|
|
1909
3459
|
// *********************************
|
|
1910
3460
|
// Code generated by sdkgen
|
|
1911
3461
|
// DO NOT EDIT!.
|
|
@@ -1991,5 +3541,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
1991
3541
|
* Generated bundle index. Do not edit.
|
|
1992
3542
|
*/
|
|
1993
3543
|
|
|
1994
|
-
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 };
|
|
3544
|
+
export { Access, Assistant, AssistantApiService, AssistantKey, AssistantType, ChatAnswerFunctionExecutionJob, ChatAnswerFunctionExecutionJobResult, ChatAnswerFunctionExecutionJobStatus, ChatChannel, ChatMessage, ChatMessageRole, ChatUserInfo, Config, ConfigInboxConfig, ConfigurableGoal, Connection, ConnectionApiService, ConnectionKey, CreatePromptModuleRequest, CreatePromptRequest, DeleteAssistantRequest, DeleteConnectionRequest, DeleteFunctionRequest, DeleteGoalRequest, DeletePromptModuleRequest, DeletePromptRequest, DeployPromptModuleRequest, DeployPromptRequest, Function, FunctionApiService, FunctionKey, FunctionParameter, GenerateChatAnswerRequest, GenerateChatAnswerRequestOptions, GenerateChatAnswerResponse, GetAssistantRequest, GetAssistantResponse, GetChatAnswerFunctionExecutionJobRequest, GetChatAnswerFunctionExecutionJobResponse, GetConnectionRequest, GetConnectionResponse, 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, GoalKey, GoalType, 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, Namespace, NamespaceAccountGroupNamespace, NamespaceAccountGroupsForGroupNamespace, NamespaceAccountGroupsForPartnerNamespace, NamespaceGlobalNamespace, NamespacePartnerNamespace, NamespaceSystemNamespace, PagedRequestOptions, PagedResponseMetadata, Prompt, PromptApiService, PromptModule, PromptModuleApiService, PromptModuleKey, PromptModuleVersion, PromptVersion, SetAssistantConnectionsRequest, SetAssistantConnectionsRequestConnectionState, UpdatePromptModuleRequest, UpdatePromptRequest, UpsertAssistantRequest, UpsertAssistantResponse, UpsertConnectionRequest, UpsertFunctionRequest, UpsertGoalRequest };
|
|
1995
3545
|
//# sourceMappingURL=vendasta-ai-assistants.mjs.map
|