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