@vendasta/ai-assistants 0.59.0 → 0.60.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.
@@ -230,6 +230,15 @@ var ListGoalsRequestSortingOrder;
230
230
  ListGoalsRequestSortingOrder[ListGoalsRequestSortingOrder["GOAL_SORTING_ORDER_ASCENDING"] = 0] = "GOAL_SORTING_ORDER_ASCENDING";
231
231
  ListGoalsRequestSortingOrder[ListGoalsRequestSortingOrder["GOAL_SORTING_ORDER_DESCENDING"] = 1] = "GOAL_SORTING_ORDER_DESCENDING";
232
232
  })(ListGoalsRequestSortingOrder || (ListGoalsRequestSortingOrder = {}));
233
+ var ValidationFailureAction;
234
+ (function (ValidationFailureAction) {
235
+ ValidationFailureAction[ValidationFailureAction["VALIDATION_FAILURE_ACTION_UNSPECIFIED"] = 0] = "VALIDATION_FAILURE_ACTION_UNSPECIFIED";
236
+ ValidationFailureAction[ValidationFailureAction["VALIDATION_FAILURE_ACTION_NONE"] = 1] = "VALIDATION_FAILURE_ACTION_NONE";
237
+ ValidationFailureAction[ValidationFailureAction["VALIDATION_FAILURE_ACTION_WARN"] = 2] = "VALIDATION_FAILURE_ACTION_WARN";
238
+ ValidationFailureAction[ValidationFailureAction["VALIDATION_FAILURE_ACTION_MODIFY"] = 3] = "VALIDATION_FAILURE_ACTION_MODIFY";
239
+ ValidationFailureAction[ValidationFailureAction["VALIDATION_FAILURE_ACTION_BLOCK"] = 4] = "VALIDATION_FAILURE_ACTION_BLOCK";
240
+ ValidationFailureAction[ValidationFailureAction["VALIDATION_FAILURE_ACTION_EXCEPTION"] = 5] = "VALIDATION_FAILURE_ACTION_EXCEPTION";
241
+ })(ValidationFailureAction || (ValidationFailureAction = {}));
233
242
 
234
243
  // *********************************
235
244
  // Code generated by sdkgen
@@ -1108,47 +1117,6 @@ function enumStringToValue$a(enumRef, value) {
1108
1117
  }
1109
1118
  return enumRef[value];
1110
1119
  }
1111
- class Prompt {
1112
- static fromProto(proto) {
1113
- let m = new Prompt();
1114
- m = Object.assign(m, proto);
1115
- if (proto.updated) {
1116
- m.updated = new Date(proto.updated);
1117
- }
1118
- if (proto.deployed) {
1119
- m.deployed = new Date(proto.deployed);
1120
- }
1121
- return m;
1122
- }
1123
- constructor(kwargs) {
1124
- if (!kwargs) {
1125
- return;
1126
- }
1127
- Object.assign(this, kwargs);
1128
- }
1129
- toApiJson() {
1130
- const toReturn = {};
1131
- if (typeof this.id !== 'undefined') {
1132
- toReturn['id'] = this.id;
1133
- }
1134
- if (typeof this.deployedVersion !== 'undefined') {
1135
- toReturn['deployedVersion'] = this.deployedVersion;
1136
- }
1137
- if (typeof this.deployedBy !== 'undefined') {
1138
- toReturn['deployedBy'] = this.deployedBy;
1139
- }
1140
- if (typeof this.updated !== 'undefined' && this.updated !== null) {
1141
- toReturn['updated'] = 'toApiJson' in this.updated ? this.updated.toApiJson() : this.updated;
1142
- }
1143
- if (typeof this.description !== 'undefined') {
1144
- toReturn['description'] = this.description;
1145
- }
1146
- if (typeof this.deployed !== 'undefined' && this.deployed !== null) {
1147
- toReturn['deployed'] = 'toApiJson' in this.deployed ? this.deployed.toApiJson() : this.deployed;
1148
- }
1149
- return toReturn;
1150
- }
1151
- }
1152
1120
  class PromptModule {
1153
1121
  static fromProto(proto) {
1154
1122
  let m = new PromptModule();
@@ -1269,41 +1237,6 @@ class PromptModuleVersion {
1269
1237
  return toReturn;
1270
1238
  }
1271
1239
  }
1272
- class PromptVersion {
1273
- static fromProto(proto) {
1274
- let m = new PromptVersion();
1275
- m = Object.assign(m, proto);
1276
- if (proto.created) {
1277
- m.created = new Date(proto.created);
1278
- }
1279
- return m;
1280
- }
1281
- constructor(kwargs) {
1282
- if (!kwargs) {
1283
- return;
1284
- }
1285
- Object.assign(this, kwargs);
1286
- }
1287
- toApiJson() {
1288
- const toReturn = {};
1289
- if (typeof this.id !== 'undefined') {
1290
- toReturn['id'] = this.id;
1291
- }
1292
- if (typeof this.version !== 'undefined') {
1293
- toReturn['version'] = this.version;
1294
- }
1295
- if (typeof this.content !== 'undefined') {
1296
- toReturn['content'] = this.content;
1297
- }
1298
- if (typeof this.createdBy !== 'undefined') {
1299
- toReturn['createdBy'] = this.createdBy;
1300
- }
1301
- if (typeof this.created !== 'undefined' && this.created !== null) {
1302
- toReturn['created'] = 'toApiJson' in this.created ? this.created.toApiJson() : this.created;
1303
- }
1304
- return toReturn;
1305
- }
1306
- }
1307
1240
 
1308
1241
  function enumStringToValue$9(enumRef, value) {
1309
1242
  if (typeof value === 'number') {
@@ -2827,32 +2760,6 @@ class SetAssistantConnectionsRequestConnectionState {
2827
2760
  return toReturn;
2828
2761
  }
2829
2762
  }
2830
- class StreamingGenerateChatAnswerResponseContentChunk {
2831
- static fromProto(proto) {
2832
- let m = new StreamingGenerateChatAnswerResponseContentChunk();
2833
- m = Object.assign(m, proto);
2834
- if (proto.contentType) {
2835
- m.contentType = enumStringToValue(StreamingGenerateChatAnswerResponseContentType, proto.contentType);
2836
- }
2837
- return m;
2838
- }
2839
- constructor(kwargs) {
2840
- if (!kwargs) {
2841
- return;
2842
- }
2843
- Object.assign(this, kwargs);
2844
- }
2845
- toApiJson() {
2846
- const toReturn = {};
2847
- if (typeof this.content !== 'undefined') {
2848
- toReturn['content'] = this.content;
2849
- }
2850
- if (typeof this.contentType !== 'undefined') {
2851
- toReturn['contentType'] = this.contentType;
2852
- }
2853
- return toReturn;
2854
- }
2855
- }
2856
2763
  class CreateAssistantRequest {
2857
2764
  static fromProto(proto) {
2858
2765
  let m = new CreateAssistantRequest();
@@ -3209,38 +3116,6 @@ class DeployPromptModuleRequest {
3209
3116
  return toReturn;
3210
3117
  }
3211
3118
  }
3212
- class StreamingGenerateChatAnswerResponseErrorChunk {
3213
- static fromProto(proto) {
3214
- let m = new StreamingGenerateChatAnswerResponseErrorChunk();
3215
- m = Object.assign(m, proto);
3216
- if (proto.errorDetails) {
3217
- m.errorDetails = proto.errorDetails.map(KeyValuePair.fromProto);
3218
- }
3219
- return m;
3220
- }
3221
- constructor(kwargs) {
3222
- if (!kwargs) {
3223
- return;
3224
- }
3225
- Object.assign(this, kwargs);
3226
- }
3227
- toApiJson() {
3228
- const toReturn = {};
3229
- if (typeof this.errorMessage !== 'undefined') {
3230
- toReturn['errorMessage'] = this.errorMessage;
3231
- }
3232
- if (typeof this.errorCode !== 'undefined') {
3233
- toReturn['errorCode'] = this.errorCode;
3234
- }
3235
- if (typeof this.errorDetails !== 'undefined' && this.errorDetails !== null) {
3236
- toReturn['errorDetails'] = 'toApiJson' in this.errorDetails ? this.errorDetails.toApiJson() : this.errorDetails;
3237
- }
3238
- if (typeof this.resumable !== 'undefined') {
3239
- toReturn['resumable'] = this.resumable;
3240
- }
3241
- return toReturn;
3242
- }
3243
- }
3244
3119
  class ExecuteFunctionRequest {
3245
3120
  static fromProto(proto) {
3246
3121
  let m = new ExecuteFunctionRequest();
@@ -3305,6 +3180,44 @@ class ExecuteFunctionResponse {
3305
3180
  return toReturn;
3306
3181
  }
3307
3182
  }
3183
+ class ListFunctionRequestFilters {
3184
+ static fromProto(proto) {
3185
+ let m = new ListFunctionRequestFilters();
3186
+ m = Object.assign(m, proto);
3187
+ if (proto.namespace) {
3188
+ m.namespace = Namespace.fromProto(proto.namespace);
3189
+ }
3190
+ if (proto.namespaces) {
3191
+ m.namespaces = proto.namespaces.map(Namespace.fromProto);
3192
+ }
3193
+ if (proto.constraintFilters) {
3194
+ m.constraintFilters = proto.constraintFilters.map(ConstraintFilter.fromProto);
3195
+ }
3196
+ return m;
3197
+ }
3198
+ constructor(kwargs) {
3199
+ if (!kwargs) {
3200
+ return;
3201
+ }
3202
+ Object.assign(this, kwargs);
3203
+ }
3204
+ toApiJson() {
3205
+ const toReturn = {};
3206
+ if (typeof this.namespace !== 'undefined' && this.namespace !== null) {
3207
+ toReturn['namespace'] = 'toApiJson' in this.namespace ? this.namespace.toApiJson() : this.namespace;
3208
+ }
3209
+ if (typeof this.namespaces !== 'undefined' && this.namespaces !== null) {
3210
+ toReturn['namespaces'] = 'toApiJson' in this.namespaces ? this.namespaces.toApiJson() : this.namespaces;
3211
+ }
3212
+ if (typeof this.mcpId !== 'undefined') {
3213
+ toReturn['mcpId'] = this.mcpId;
3214
+ }
3215
+ if (typeof this.constraintFilters !== 'undefined' && this.constraintFilters !== null) {
3216
+ toReturn['constraintFilters'] = 'toApiJson' in this.constraintFilters ? this.constraintFilters.toApiJson() : this.constraintFilters;
3217
+ }
3218
+ return toReturn;
3219
+ }
3220
+ }
3308
3221
  class ListGoalsRequestFilters {
3309
3222
  static fromProto(proto) {
3310
3223
  let m = new ListGoalsRequestFilters();
@@ -3364,13 +3277,16 @@ class ListGoalsRequestFilters {
3364
3277
  return toReturn;
3365
3278
  }
3366
3279
  }
3367
- class ListPromptModuleRequestFilters {
3280
+ class ListAssistantRequestFilters {
3368
3281
  static fromProto(proto) {
3369
- let m = new ListPromptModuleRequestFilters();
3282
+ let m = new ListAssistantRequestFilters();
3370
3283
  m = Object.assign(m, proto);
3371
3284
  if (proto.namespace) {
3372
3285
  m.namespace = Namespace.fromProto(proto.namespace);
3373
3286
  }
3287
+ if (proto.type) {
3288
+ m.type = enumStringToValue(AssistantType, proto.type);
3289
+ }
3374
3290
  return m;
3375
3291
  }
3376
3292
  constructor(kwargs) {
@@ -3384,16 +3300,16 @@ class ListPromptModuleRequestFilters {
3384
3300
  if (typeof this.namespace !== 'undefined' && this.namespace !== null) {
3385
3301
  toReturn['namespace'] = 'toApiJson' in this.namespace ? this.namespace.toApiJson() : this.namespace;
3386
3302
  }
3303
+ if (typeof this.type !== 'undefined') {
3304
+ toReturn['type'] = this.type;
3305
+ }
3387
3306
  return toReturn;
3388
3307
  }
3389
3308
  }
3390
- class ListAssistantRequestFilters {
3309
+ class ListAllAssistantsAssociatedToConnectionRequestFilters {
3391
3310
  static fromProto(proto) {
3392
- let m = new ListAssistantRequestFilters();
3311
+ let m = new ListAllAssistantsAssociatedToConnectionRequestFilters();
3393
3312
  m = Object.assign(m, proto);
3394
- if (proto.namespace) {
3395
- m.namespace = Namespace.fromProto(proto.namespace);
3396
- }
3397
3313
  if (proto.type) {
3398
3314
  m.type = enumStringToValue(AssistantType, proto.type);
3399
3315
  }
@@ -3407,25 +3323,19 @@ class ListAssistantRequestFilters {
3407
3323
  }
3408
3324
  toApiJson() {
3409
3325
  const toReturn = {};
3410
- if (typeof this.namespace !== 'undefined' && this.namespace !== null) {
3411
- toReturn['namespace'] = 'toApiJson' in this.namespace ? this.namespace.toApiJson() : this.namespace;
3412
- }
3413
3326
  if (typeof this.type !== 'undefined') {
3414
3327
  toReturn['type'] = this.type;
3415
3328
  }
3416
3329
  return toReturn;
3417
3330
  }
3418
3331
  }
3419
- class ListConnectionsRequestFilters {
3332
+ class ListPromptModuleRequestFilters {
3420
3333
  static fromProto(proto) {
3421
- let m = new ListConnectionsRequestFilters();
3334
+ let m = new ListPromptModuleRequestFilters();
3422
3335
  m = Object.assign(m, proto);
3423
3336
  if (proto.namespace) {
3424
3337
  m.namespace = Namespace.fromProto(proto.namespace);
3425
3338
  }
3426
- if (proto.assistantType) {
3427
- m.assistantType = enumStringToValue(AssistantType, proto.assistantType);
3428
- }
3429
3339
  return m;
3430
3340
  }
3431
3341
  constructor(kwargs) {
@@ -3439,24 +3349,18 @@ class ListConnectionsRequestFilters {
3439
3349
  if (typeof this.namespace !== 'undefined' && this.namespace !== null) {
3440
3350
  toReturn['namespace'] = 'toApiJson' in this.namespace ? this.namespace.toApiJson() : this.namespace;
3441
3351
  }
3442
- if (typeof this.assistantType !== 'undefined') {
3443
- toReturn['assistantType'] = this.assistantType;
3444
- }
3445
3352
  return toReturn;
3446
3353
  }
3447
3354
  }
3448
- class ListFunctionRequestFilters {
3355
+ class ListConnectionsRequestFilters {
3449
3356
  static fromProto(proto) {
3450
- let m = new ListFunctionRequestFilters();
3357
+ let m = new ListConnectionsRequestFilters();
3451
3358
  m = Object.assign(m, proto);
3452
3359
  if (proto.namespace) {
3453
3360
  m.namespace = Namespace.fromProto(proto.namespace);
3454
3361
  }
3455
- if (proto.namespaces) {
3456
- m.namespaces = proto.namespaces.map(Namespace.fromProto);
3457
- }
3458
- if (proto.constraintFilters) {
3459
- m.constraintFilters = proto.constraintFilters.map(ConstraintFilter.fromProto);
3362
+ if (proto.assistantType) {
3363
+ m.assistantType = enumStringToValue(AssistantType, proto.assistantType);
3460
3364
  }
3461
3365
  return m;
3462
3366
  }
@@ -3471,14 +3375,8 @@ class ListFunctionRequestFilters {
3471
3375
  if (typeof this.namespace !== 'undefined' && this.namespace !== null) {
3472
3376
  toReturn['namespace'] = 'toApiJson' in this.namespace ? this.namespace.toApiJson() : this.namespace;
3473
3377
  }
3474
- if (typeof this.namespaces !== 'undefined' && this.namespaces !== null) {
3475
- toReturn['namespaces'] = 'toApiJson' in this.namespaces ? this.namespaces.toApiJson() : this.namespaces;
3476
- }
3477
- if (typeof this.mcpId !== 'undefined') {
3478
- toReturn['mcpId'] = this.mcpId;
3479
- }
3480
- if (typeof this.constraintFilters !== 'undefined' && this.constraintFilters !== null) {
3481
- toReturn['constraintFilters'] = 'toApiJson' in this.constraintFilters ? this.constraintFilters.toApiJson() : this.constraintFilters;
3378
+ if (typeof this.assistantType !== 'undefined') {
3379
+ toReturn['assistantType'] = this.assistantType;
3482
3380
  }
3483
3381
  return toReturn;
3484
3382
  }
@@ -3512,12 +3410,30 @@ class ListAvailableModelsRequestFilters {
3512
3410
  return toReturn;
3513
3411
  }
3514
3412
  }
3515
- class ListAllAssistantsAssociatedToConnectionRequestFilters {
3413
+ class GenerateChatAnswerRequest {
3516
3414
  static fromProto(proto) {
3517
- let m = new ListAllAssistantsAssociatedToConnectionRequestFilters();
3415
+ let m = new GenerateChatAnswerRequest();
3518
3416
  m = Object.assign(m, proto);
3519
- if (proto.type) {
3520
- m.type = enumStringToValue(AssistantType, proto.type);
3417
+ if (proto.connectionKey) {
3418
+ m.connectionKey = ConnectionKey.fromProto(proto.connectionKey);
3419
+ }
3420
+ if (proto.chatHistory) {
3421
+ m.chatHistory = proto.chatHistory.map(ChatMessage.fromProto);
3422
+ }
3423
+ if (proto.chatUserInfo) {
3424
+ m.chatUserInfo = ChatUserInfo.fromProto(proto.chatUserInfo);
3425
+ }
3426
+ if (proto.chatChannel) {
3427
+ m.chatChannel = enumStringToValue(ChatChannel, proto.chatChannel);
3428
+ }
3429
+ if (proto.options) {
3430
+ m.options = GenerateChatAnswerRequestOptions.fromProto(proto.options);
3431
+ }
3432
+ if (proto.assistantKey) {
3433
+ m.assistantKey = AssistantKey.fromProto(proto.assistantKey);
3434
+ }
3435
+ if (proto.contextInfo) {
3436
+ m.contextInfo = ContextInfo.fromProto(proto.contextInfo);
3521
3437
  }
3522
3438
  return m;
3523
3439
  }
@@ -3529,184 +3445,39 @@ class ListAllAssistantsAssociatedToConnectionRequestFilters {
3529
3445
  }
3530
3446
  toApiJson() {
3531
3447
  const toReturn = {};
3532
- if (typeof this.type !== 'undefined') {
3533
- toReturn['type'] = this.type;
3448
+ if (typeof this.connectionKey !== 'undefined' && this.connectionKey !== null) {
3449
+ toReturn['connectionKey'] = 'toApiJson' in this.connectionKey ? this.connectionKey.toApiJson() : this.connectionKey;
3450
+ }
3451
+ if (typeof this.chatHistory !== 'undefined' && this.chatHistory !== null) {
3452
+ toReturn['chatHistory'] = 'toApiJson' in this.chatHistory ? this.chatHistory.toApiJson() : this.chatHistory;
3453
+ }
3454
+ if (typeof this.chatUserInfo !== 'undefined' && this.chatUserInfo !== null) {
3455
+ toReturn['chatUserInfo'] = 'toApiJson' in this.chatUserInfo ? this.chatUserInfo.toApiJson() : this.chatUserInfo;
3456
+ }
3457
+ if (typeof this.chatChannel !== 'undefined') {
3458
+ toReturn['chatChannel'] = this.chatChannel;
3459
+ }
3460
+ if (typeof this.options !== 'undefined' && this.options !== null) {
3461
+ toReturn['options'] = 'toApiJson' in this.options ? this.options.toApiJson() : this.options;
3462
+ }
3463
+ if (typeof this.assistantKey !== 'undefined' && this.assistantKey !== null) {
3464
+ toReturn['assistantKey'] = 'toApiJson' in this.assistantKey ? this.assistantKey.toApiJson() : this.assistantKey;
3465
+ }
3466
+ if (typeof this.contextInfo !== 'undefined' && this.contextInfo !== null) {
3467
+ toReturn['contextInfo'] = 'toApiJson' in this.contextInfo ? this.contextInfo.toApiJson() : this.contextInfo;
3534
3468
  }
3535
3469
  return toReturn;
3536
3470
  }
3537
3471
  }
3538
- class StreamingGenerateChatAnswerResponseFinalChunk {
3472
+ class GenerateChatAnswerResponse {
3539
3473
  static fromProto(proto) {
3540
- let m = new StreamingGenerateChatAnswerResponseFinalChunk();
3541
- m = Object.assign(m, proto);
3542
- return m;
3543
- }
3544
- constructor(kwargs) {
3545
- if (!kwargs) {
3546
- return;
3547
- }
3548
- Object.assign(this, kwargs);
3549
- }
3550
- toApiJson() {
3551
- const toReturn = {};
3552
- return toReturn;
3553
- }
3554
- }
3555
- class StreamingGenerateChatAnswerResponseFunctionCompleteChunk {
3556
- static fromProto(proto) {
3557
- let m = new StreamingGenerateChatAnswerResponseFunctionCompleteChunk();
3474
+ let m = new GenerateChatAnswerResponse();
3558
3475
  m = Object.assign(m, proto);
3559
3476
  if (proto.metadata) {
3560
3477
  m.metadata = proto.metadata.map(KeyValuePair.fromProto);
3561
3478
  }
3562
- return m;
3563
- }
3564
- constructor(kwargs) {
3565
- if (!kwargs) {
3566
- return;
3567
- }
3568
- Object.assign(this, kwargs);
3569
- }
3570
- toApiJson() {
3571
- const toReturn = {};
3572
- if (typeof this.functionName !== 'undefined') {
3573
- toReturn['functionName'] = this.functionName;
3574
- }
3575
- if (typeof this.result !== 'undefined') {
3576
- toReturn['result'] = this.result;
3577
- }
3578
- if (typeof this.metadata !== 'undefined' && this.metadata !== null) {
3579
- toReturn['metadata'] = 'toApiJson' in this.metadata ? this.metadata.toApiJson() : this.metadata;
3580
- }
3581
- if (typeof this.functionCallId !== 'undefined') {
3582
- toReturn['functionCallId'] = this.functionCallId;
3583
- }
3584
- return toReturn;
3585
- }
3586
- }
3587
- class StreamingGenerateChatAnswerResponseFunctionProgressChunk {
3588
- static fromProto(proto) {
3589
- let m = new StreamingGenerateChatAnswerResponseFunctionProgressChunk();
3590
- m = Object.assign(m, proto);
3591
- return m;
3592
- }
3593
- constructor(kwargs) {
3594
- if (!kwargs) {
3595
- return;
3596
- }
3597
- Object.assign(this, kwargs);
3598
- }
3599
- toApiJson() {
3600
- const toReturn = {};
3601
- if (typeof this.functionName !== 'undefined') {
3602
- toReturn['functionName'] = this.functionName;
3603
- }
3604
- if (typeof this.status !== 'undefined') {
3605
- toReturn['status'] = this.status;
3606
- }
3607
- if (typeof this.progressMessage !== 'undefined') {
3608
- toReturn['progressMessage'] = this.progressMessage;
3609
- }
3610
- if (typeof this.functionCallId !== 'undefined') {
3611
- toReturn['functionCallId'] = this.functionCallId;
3612
- }
3613
- return toReturn;
3614
- }
3615
- }
3616
- class StreamingGenerateChatAnswerResponseFunctionStartChunk {
3617
- static fromProto(proto) {
3618
- let m = new StreamingGenerateChatAnswerResponseFunctionStartChunk();
3619
- m = Object.assign(m, proto);
3620
- return m;
3621
- }
3622
- constructor(kwargs) {
3623
- if (!kwargs) {
3624
- return;
3625
- }
3626
- Object.assign(this, kwargs);
3627
- }
3628
- toApiJson() {
3629
- const toReturn = {};
3630
- if (typeof this.functionName !== 'undefined') {
3631
- toReturn['functionName'] = this.functionName;
3632
- }
3633
- if (typeof this.functionDescription !== 'undefined') {
3634
- toReturn['functionDescription'] = this.functionDescription;
3635
- }
3636
- if (typeof this.arguments !== 'undefined') {
3637
- toReturn['arguments'] = this.arguments;
3638
- }
3639
- if (typeof this.functionCallId !== 'undefined') {
3640
- toReturn['functionCallId'] = this.functionCallId;
3641
- }
3642
- return toReturn;
3643
- }
3644
- }
3645
- class GenerateChatAnswerRequest {
3646
- static fromProto(proto) {
3647
- let m = new GenerateChatAnswerRequest();
3648
- m = Object.assign(m, proto);
3649
- if (proto.connectionKey) {
3650
- m.connectionKey = ConnectionKey.fromProto(proto.connectionKey);
3651
- }
3652
- if (proto.chatHistory) {
3653
- m.chatHistory = proto.chatHistory.map(ChatMessage.fromProto);
3654
- }
3655
- if (proto.chatUserInfo) {
3656
- m.chatUserInfo = ChatUserInfo.fromProto(proto.chatUserInfo);
3657
- }
3658
- if (proto.chatChannel) {
3659
- m.chatChannel = enumStringToValue(ChatChannel, proto.chatChannel);
3660
- }
3661
- if (proto.options) {
3662
- m.options = GenerateChatAnswerRequestOptions.fromProto(proto.options);
3663
- }
3664
- if (proto.assistantKey) {
3665
- m.assistantKey = AssistantKey.fromProto(proto.assistantKey);
3666
- }
3667
- if (proto.contextInfo) {
3668
- m.contextInfo = ContextInfo.fromProto(proto.contextInfo);
3669
- }
3670
- return m;
3671
- }
3672
- constructor(kwargs) {
3673
- if (!kwargs) {
3674
- return;
3675
- }
3676
- Object.assign(this, kwargs);
3677
- }
3678
- toApiJson() {
3679
- const toReturn = {};
3680
- if (typeof this.connectionKey !== 'undefined' && this.connectionKey !== null) {
3681
- toReturn['connectionKey'] = 'toApiJson' in this.connectionKey ? this.connectionKey.toApiJson() : this.connectionKey;
3682
- }
3683
- if (typeof this.chatHistory !== 'undefined' && this.chatHistory !== null) {
3684
- toReturn['chatHistory'] = 'toApiJson' in this.chatHistory ? this.chatHistory.toApiJson() : this.chatHistory;
3685
- }
3686
- if (typeof this.chatUserInfo !== 'undefined' && this.chatUserInfo !== null) {
3687
- toReturn['chatUserInfo'] = 'toApiJson' in this.chatUserInfo ? this.chatUserInfo.toApiJson() : this.chatUserInfo;
3688
- }
3689
- if (typeof this.chatChannel !== 'undefined') {
3690
- toReturn['chatChannel'] = this.chatChannel;
3691
- }
3692
- if (typeof this.options !== 'undefined' && this.options !== null) {
3693
- toReturn['options'] = 'toApiJson' in this.options ? this.options.toApiJson() : this.options;
3694
- }
3695
- if (typeof this.assistantKey !== 'undefined' && this.assistantKey !== null) {
3696
- toReturn['assistantKey'] = 'toApiJson' in this.assistantKey ? this.assistantKey.toApiJson() : this.assistantKey;
3697
- }
3698
- if (typeof this.contextInfo !== 'undefined' && this.contextInfo !== null) {
3699
- toReturn['contextInfo'] = 'toApiJson' in this.contextInfo ? this.contextInfo.toApiJson() : this.contextInfo;
3700
- }
3701
- return toReturn;
3702
- }
3703
- }
3704
- class GenerateChatAnswerResponse {
3705
- static fromProto(proto) {
3706
- let m = new GenerateChatAnswerResponse();
3707
- m = Object.assign(m, proto);
3708
- if (proto.metadata) {
3709
- m.metadata = proto.metadata.map(KeyValuePair.fromProto);
3479
+ if (proto.validationResult) {
3480
+ m.validationResult = ValidationResult.fromProto(proto.validationResult);
3710
3481
  }
3711
3482
  return m;
3712
3483
  }
@@ -3727,6 +3498,9 @@ class GenerateChatAnswerResponse {
3727
3498
  if (typeof this.pendingJobId !== 'undefined') {
3728
3499
  toReturn['pendingJobId'] = this.pendingJobId;
3729
3500
  }
3501
+ if (typeof this.validationResult !== 'undefined' && this.validationResult !== null) {
3502
+ toReturn['validationResult'] = 'toApiJson' in this.validationResult ? this.validationResult.toApiJson() : this.validationResult;
3503
+ }
3730
3504
  return toReturn;
3731
3505
  }
3732
3506
  }
@@ -4938,32 +4712,9 @@ class ListTemplateVariablesResponse {
4938
4712
  return toReturn;
4939
4713
  }
4940
4714
  }
4941
- class StreamingGenerateChatAnswerResponseMetadataChunk {
4942
- static fromProto(proto) {
4943
- let m = new StreamingGenerateChatAnswerResponseMetadataChunk();
4944
- m = Object.assign(m, proto);
4945
- if (proto.metadata) {
4946
- m.metadata = proto.metadata.map(KeyValuePair.fromProto);
4947
- }
4948
- return m;
4949
- }
4950
- constructor(kwargs) {
4951
- if (!kwargs) {
4952
- return;
4953
- }
4954
- Object.assign(this, kwargs);
4955
- }
4956
- toApiJson() {
4957
- const toReturn = {};
4958
- if (typeof this.metadata !== 'undefined' && this.metadata !== null) {
4959
- toReturn['metadata'] = 'toApiJson' in this.metadata ? this.metadata.toApiJson() : this.metadata;
4960
- }
4961
- return toReturn;
4962
- }
4963
- }
4964
- class GetAssistantRequestOptions {
4715
+ class UpsertAssistantRequestOptions {
4965
4716
  static fromProto(proto) {
4966
- let m = new GetAssistantRequestOptions();
4717
+ let m = new UpsertAssistantRequestOptions();
4967
4718
  m = Object.assign(m, proto);
4968
4719
  return m;
4969
4720
  }
@@ -4975,8 +4726,8 @@ class GetAssistantRequestOptions {
4975
4726
  }
4976
4727
  toApiJson() {
4977
4728
  const toReturn = {};
4978
- if (typeof this.skipGoalsHydration !== 'undefined') {
4979
- toReturn['skipGoalsHydration'] = this.skipGoalsHydration;
4729
+ if (typeof this.applyDefaults !== 'undefined') {
4730
+ toReturn['applyDefaults'] = this.applyDefaults;
4980
4731
  }
4981
4732
  return toReturn;
4982
4733
  }
@@ -5001,9 +4752,9 @@ class GetMultiAssistantRequestOptions {
5001
4752
  return toReturn;
5002
4753
  }
5003
4754
  }
5004
- class UpsertAssistantRequestOptions {
4755
+ class CreatePromptModuleVersionRequestOptions {
5005
4756
  static fromProto(proto) {
5006
- let m = new UpsertAssistantRequestOptions();
4757
+ let m = new CreatePromptModuleVersionRequestOptions();
5007
4758
  m = Object.assign(m, proto);
5008
4759
  return m;
5009
4760
  }
@@ -5015,8 +4766,8 @@ class UpsertAssistantRequestOptions {
5015
4766
  }
5016
4767
  toApiJson() {
5017
4768
  const toReturn = {};
5018
- if (typeof this.applyDefaults !== 'undefined') {
5019
- toReturn['applyDefaults'] = this.applyDefaults;
4769
+ if (typeof this.shouldDeploy !== 'undefined') {
4770
+ toReturn['shouldDeploy'] = this.shouldDeploy;
5020
4771
  }
5021
4772
  return toReturn;
5022
4773
  }
@@ -5041,13 +4792,10 @@ class CreateAssistantRequestOptions {
5041
4792
  return toReturn;
5042
4793
  }
5043
4794
  }
5044
- class ExecuteFunctionRequestOptions {
4795
+ class GetAssistantRequestOptions {
5045
4796
  static fromProto(proto) {
5046
- let m = new ExecuteFunctionRequestOptions();
4797
+ let m = new GetAssistantRequestOptions();
5047
4798
  m = Object.assign(m, proto);
5048
- if (proto.contextInfo) {
5049
- m.contextInfo = ContextInfo.fromProto(proto.contextInfo);
5050
- }
5051
4799
  return m;
5052
4800
  }
5053
4801
  constructor(kwargs) {
@@ -5058,11 +4806,8 @@ class ExecuteFunctionRequestOptions {
5058
4806
  }
5059
4807
  toApiJson() {
5060
4808
  const toReturn = {};
5061
- if (typeof this.skipComputeTemplateVariables !== 'undefined') {
5062
- toReturn['skipComputeTemplateVariables'] = this.skipComputeTemplateVariables;
5063
- }
5064
- if (typeof this.contextInfo !== 'undefined' && this.contextInfo !== null) {
5065
- toReturn['contextInfo'] = 'toApiJson' in this.contextInfo ? this.contextInfo.toApiJson() : this.contextInfo;
4809
+ if (typeof this.skipGoalsHydration !== 'undefined') {
4810
+ toReturn['skipGoalsHydration'] = this.skipGoalsHydration;
5066
4811
  }
5067
4812
  return toReturn;
5068
4813
  }
@@ -5096,32 +4841,12 @@ class GenerateChatAnswerRequestOptions {
5096
4841
  return toReturn;
5097
4842
  }
5098
4843
  }
5099
- class CreatePromptModuleVersionRequestOptions {
5100
- static fromProto(proto) {
5101
- let m = new CreatePromptModuleVersionRequestOptions();
5102
- m = Object.assign(m, proto);
5103
- return m;
5104
- }
5105
- constructor(kwargs) {
5106
- if (!kwargs) {
5107
- return;
5108
- }
5109
- Object.assign(this, kwargs);
5110
- }
5111
- toApiJson() {
5112
- const toReturn = {};
5113
- if (typeof this.shouldDeploy !== 'undefined') {
5114
- toReturn['shouldDeploy'] = this.shouldDeploy;
5115
- }
5116
- return toReturn;
5117
- }
5118
- }
5119
- class ResumeStreamingGenerateChatAnswerRequest {
4844
+ class ExecuteFunctionRequestOptions {
5120
4845
  static fromProto(proto) {
5121
- let m = new ResumeStreamingGenerateChatAnswerRequest();
4846
+ let m = new ExecuteFunctionRequestOptions();
5122
4847
  m = Object.assign(m, proto);
5123
- if (proto.lastReceivedSequenceNumber) {
5124
- m.lastReceivedSequenceNumber = parseInt(proto.lastReceivedSequenceNumber, 10);
4848
+ if (proto.contextInfo) {
4849
+ m.contextInfo = ContextInfo.fromProto(proto.contextInfo);
5125
4850
  }
5126
4851
  return m;
5127
4852
  }
@@ -5133,11 +4858,11 @@ class ResumeStreamingGenerateChatAnswerRequest {
5133
4858
  }
5134
4859
  toApiJson() {
5135
4860
  const toReturn = {};
5136
- if (typeof this.streamId !== 'undefined') {
5137
- toReturn['streamId'] = this.streamId;
4861
+ if (typeof this.skipComputeTemplateVariables !== 'undefined') {
4862
+ toReturn['skipComputeTemplateVariables'] = this.skipComputeTemplateVariables;
5138
4863
  }
5139
- if (typeof this.lastReceivedSequenceNumber !== 'undefined') {
5140
- toReturn['lastReceivedSequenceNumber'] = this.lastReceivedSequenceNumber;
4864
+ if (typeof this.contextInfo !== 'undefined' && this.contextInfo !== null) {
4865
+ toReturn['contextInfo'] = 'toApiJson' in this.contextInfo ? this.contextInfo.toApiJson() : this.contextInfo;
5141
4866
  }
5142
4867
  return toReturn;
5143
4868
  }
@@ -5197,162 +4922,6 @@ class ListGoalsRequestSortOptions {
5197
4922
  return toReturn;
5198
4923
  }
5199
4924
  }
5200
- class StreamingGenerateChatAnswerResponseStartChunk {
5201
- static fromProto(proto) {
5202
- let m = new StreamingGenerateChatAnswerResponseStartChunk();
5203
- m = Object.assign(m, proto);
5204
- if (proto.metadata) {
5205
- m.metadata = proto.metadata.map(KeyValuePair.fromProto);
5206
- }
5207
- return m;
5208
- }
5209
- constructor(kwargs) {
5210
- if (!kwargs) {
5211
- return;
5212
- }
5213
- Object.assign(this, kwargs);
5214
- }
5215
- toApiJson() {
5216
- const toReturn = {};
5217
- if (typeof this.streamId !== 'undefined') {
5218
- toReturn['streamId'] = this.streamId;
5219
- }
5220
- if (typeof this.metadata !== 'undefined' && this.metadata !== null) {
5221
- toReturn['metadata'] = 'toApiJson' in this.metadata ? this.metadata.toApiJson() : this.metadata;
5222
- }
5223
- return toReturn;
5224
- }
5225
- }
5226
- class StreamingGenerateChatAnswerRequest {
5227
- static fromProto(proto) {
5228
- let m = new StreamingGenerateChatAnswerRequest();
5229
- m = Object.assign(m, proto);
5230
- if (proto.connectionKey) {
5231
- m.connectionKey = ConnectionKey.fromProto(proto.connectionKey);
5232
- }
5233
- if (proto.assistantKey) {
5234
- m.assistantKey = AssistantKey.fromProto(proto.assistantKey);
5235
- }
5236
- if (proto.chatHistory) {
5237
- m.chatHistory = proto.chatHistory.map(ChatMessage.fromProto);
5238
- }
5239
- if (proto.chatUserInfo) {
5240
- m.chatUserInfo = ChatUserInfo.fromProto(proto.chatUserInfo);
5241
- }
5242
- if (proto.chatChannel) {
5243
- m.chatChannel = enumStringToValue(ChatChannel, proto.chatChannel);
5244
- }
5245
- if (proto.contextInfo) {
5246
- m.contextInfo = ContextInfo.fromProto(proto.contextInfo);
5247
- }
5248
- if (proto.agentArchitecture) {
5249
- m.agentArchitecture = enumStringToValue(AgentArchitecture, proto.agentArchitecture);
5250
- }
5251
- return m;
5252
- }
5253
- constructor(kwargs) {
5254
- if (!kwargs) {
5255
- return;
5256
- }
5257
- Object.assign(this, kwargs);
5258
- }
5259
- toApiJson() {
5260
- const toReturn = {};
5261
- if (typeof this.connectionKey !== 'undefined' && this.connectionKey !== null) {
5262
- toReturn['connectionKey'] = 'toApiJson' in this.connectionKey ? this.connectionKey.toApiJson() : this.connectionKey;
5263
- }
5264
- if (typeof this.assistantKey !== 'undefined' && this.assistantKey !== null) {
5265
- toReturn['assistantKey'] = 'toApiJson' in this.assistantKey ? this.assistantKey.toApiJson() : this.assistantKey;
5266
- }
5267
- if (typeof this.chatHistory !== 'undefined' && this.chatHistory !== null) {
5268
- toReturn['chatHistory'] = 'toApiJson' in this.chatHistory ? this.chatHistory.toApiJson() : this.chatHistory;
5269
- }
5270
- if (typeof this.chatUserInfo !== 'undefined' && this.chatUserInfo !== null) {
5271
- toReturn['chatUserInfo'] = 'toApiJson' in this.chatUserInfo ? this.chatUserInfo.toApiJson() : this.chatUserInfo;
5272
- }
5273
- if (typeof this.chatChannel !== 'undefined') {
5274
- toReturn['chatChannel'] = this.chatChannel;
5275
- }
5276
- if (typeof this.contextInfo !== 'undefined' && this.contextInfo !== null) {
5277
- toReturn['contextInfo'] = 'toApiJson' in this.contextInfo ? this.contextInfo.toApiJson() : this.contextInfo;
5278
- }
5279
- if (typeof this.agentArchitecture !== 'undefined') {
5280
- toReturn['agentArchitecture'] = this.agentArchitecture;
5281
- }
5282
- return toReturn;
5283
- }
5284
- }
5285
- class StreamingGenerateChatAnswerResponse {
5286
- static fromProto(proto) {
5287
- let m = new StreamingGenerateChatAnswerResponse();
5288
- m = Object.assign(m, proto);
5289
- if (proto.sequenceNumber) {
5290
- m.sequenceNumber = parseInt(proto.sequenceNumber, 10);
5291
- }
5292
- if (proto.start) {
5293
- m.start = StreamingGenerateChatAnswerResponseStartChunk.fromProto(proto.start);
5294
- }
5295
- if (proto.content) {
5296
- m.content = StreamingGenerateChatAnswerResponseContentChunk.fromProto(proto.content);
5297
- }
5298
- if (proto.metadata) {
5299
- m.metadata = StreamingGenerateChatAnswerResponseMetadataChunk.fromProto(proto.metadata);
5300
- }
5301
- if (proto.functionStart) {
5302
- m.functionStart = StreamingGenerateChatAnswerResponseFunctionStartChunk.fromProto(proto.functionStart);
5303
- }
5304
- if (proto.functionProgress) {
5305
- m.functionProgress = StreamingGenerateChatAnswerResponseFunctionProgressChunk.fromProto(proto.functionProgress);
5306
- }
5307
- if (proto.functionComplete) {
5308
- m.functionComplete = StreamingGenerateChatAnswerResponseFunctionCompleteChunk.fromProto(proto.functionComplete);
5309
- }
5310
- if (proto.final) {
5311
- m.final = StreamingGenerateChatAnswerResponseFinalChunk.fromProto(proto.final);
5312
- }
5313
- if (proto.error) {
5314
- m.error = StreamingGenerateChatAnswerResponseErrorChunk.fromProto(proto.error);
5315
- }
5316
- return m;
5317
- }
5318
- constructor(kwargs) {
5319
- if (!kwargs) {
5320
- return;
5321
- }
5322
- Object.assign(this, kwargs);
5323
- }
5324
- toApiJson() {
5325
- const toReturn = {};
5326
- if (typeof this.sequenceNumber !== 'undefined') {
5327
- toReturn['sequenceNumber'] = this.sequenceNumber;
5328
- }
5329
- if (typeof this.start !== 'undefined' && this.start !== null) {
5330
- toReturn['start'] = 'toApiJson' in this.start ? this.start.toApiJson() : this.start;
5331
- }
5332
- if (typeof this.content !== 'undefined' && this.content !== null) {
5333
- toReturn['content'] = 'toApiJson' in this.content ? this.content.toApiJson() : this.content;
5334
- }
5335
- if (typeof this.metadata !== 'undefined' && this.metadata !== null) {
5336
- toReturn['metadata'] = 'toApiJson' in this.metadata ? this.metadata.toApiJson() : this.metadata;
5337
- }
5338
- if (typeof this.functionStart !== 'undefined' && this.functionStart !== null) {
5339
- toReturn['functionStart'] = 'toApiJson' in this.functionStart ? this.functionStart.toApiJson() : this.functionStart;
5340
- }
5341
- if (typeof this.functionProgress !== 'undefined' && this.functionProgress !== null) {
5342
- toReturn['functionProgress'] = 'toApiJson' in this.functionProgress ? this.functionProgress.toApiJson() : this.functionProgress;
5343
- }
5344
- if (typeof this.functionComplete !== 'undefined' && this.functionComplete !== null) {
5345
- toReturn['functionComplete'] = 'toApiJson' in this.functionComplete ? this.functionComplete.toApiJson() : this.functionComplete;
5346
- }
5347
- if (typeof this.final !== 'undefined' && this.final !== null) {
5348
- toReturn['final'] = 'toApiJson' in this.final ? this.final.toApiJson() : this.final;
5349
- }
5350
- if (typeof this.error !== 'undefined' && this.error !== null) {
5351
- toReturn['error'] = 'toApiJson' in this.error ? this.error.toApiJson() : this.error;
5352
- }
5353
- return toReturn;
5354
- }
5355
- }
5356
4925
  class UpdateAssistantRequest {
5357
4926
  static fromProto(proto) {
5358
4927
  let m = new UpdateAssistantRequest();
@@ -5601,6 +5170,232 @@ class ValidatePromptModuleResponse {
5601
5170
  return toReturn;
5602
5171
  }
5603
5172
  }
5173
+ class ValidatePromptModuleVersionsRequest {
5174
+ static fromProto(proto) {
5175
+ let m = new ValidatePromptModuleVersionsRequest();
5176
+ m = Object.assign(m, proto);
5177
+ if (proto.versions) {
5178
+ m.versions = proto.versions.map(PromptModuleVersion.fromProto);
5179
+ }
5180
+ return m;
5181
+ }
5182
+ constructor(kwargs) {
5183
+ if (!kwargs) {
5184
+ return;
5185
+ }
5186
+ Object.assign(this, kwargs);
5187
+ }
5188
+ toApiJson() {
5189
+ const toReturn = {};
5190
+ if (typeof this.versions !== 'undefined' && this.versions !== null) {
5191
+ toReturn['versions'] = 'toApiJson' in this.versions ? this.versions.toApiJson() : this.versions;
5192
+ }
5193
+ return toReturn;
5194
+ }
5195
+ }
5196
+ class ValidatePromptModuleVersionsResponse {
5197
+ static fromProto(proto) {
5198
+ let m = new ValidatePromptModuleVersionsResponse();
5199
+ m = Object.assign(m, proto);
5200
+ if (proto.results) {
5201
+ m.results = proto.results.map(ValidatePromptModuleVersionsResponseValidationResult.fromProto);
5202
+ }
5203
+ return m;
5204
+ }
5205
+ constructor(kwargs) {
5206
+ if (!kwargs) {
5207
+ return;
5208
+ }
5209
+ Object.assign(this, kwargs);
5210
+ }
5211
+ toApiJson() {
5212
+ const toReturn = {};
5213
+ if (typeof this.results !== 'undefined' && this.results !== null) {
5214
+ toReturn['results'] = 'toApiJson' in this.results ? this.results.toApiJson() : this.results;
5215
+ }
5216
+ if (typeof this.allValid !== 'undefined') {
5217
+ toReturn['allValid'] = this.allValid;
5218
+ }
5219
+ return toReturn;
5220
+ }
5221
+ }
5222
+ class ValidatePromptModulesRequest {
5223
+ static fromProto(proto) {
5224
+ let m = new ValidatePromptModulesRequest();
5225
+ m = Object.assign(m, proto);
5226
+ if (proto.promptModules) {
5227
+ m.promptModules = proto.promptModules.map(PromptModule.fromProto);
5228
+ }
5229
+ return m;
5230
+ }
5231
+ constructor(kwargs) {
5232
+ if (!kwargs) {
5233
+ return;
5234
+ }
5235
+ Object.assign(this, kwargs);
5236
+ }
5237
+ toApiJson() {
5238
+ const toReturn = {};
5239
+ if (typeof this.promptModules !== 'undefined' && this.promptModules !== null) {
5240
+ toReturn['promptModules'] = 'toApiJson' in this.promptModules ? this.promptModules.toApiJson() : this.promptModules;
5241
+ }
5242
+ return toReturn;
5243
+ }
5244
+ }
5245
+ class ValidatePromptModulesResponse {
5246
+ static fromProto(proto) {
5247
+ let m = new ValidatePromptModulesResponse();
5248
+ m = Object.assign(m, proto);
5249
+ if (proto.results) {
5250
+ m.results = proto.results.map(ValidatePromptModulesResponseValidationResult.fromProto);
5251
+ }
5252
+ return m;
5253
+ }
5254
+ constructor(kwargs) {
5255
+ if (!kwargs) {
5256
+ return;
5257
+ }
5258
+ Object.assign(this, kwargs);
5259
+ }
5260
+ toApiJson() {
5261
+ const toReturn = {};
5262
+ if (typeof this.results !== 'undefined' && this.results !== null) {
5263
+ toReturn['results'] = 'toApiJson' in this.results ? this.results.toApiJson() : this.results;
5264
+ }
5265
+ if (typeof this.allValid !== 'undefined') {
5266
+ toReturn['allValid'] = this.allValid;
5267
+ }
5268
+ return toReturn;
5269
+ }
5270
+ }
5271
+ class ValidatePromptModulesResponseValidationResult {
5272
+ static fromProto(proto) {
5273
+ let m = new ValidatePromptModulesResponseValidationResult();
5274
+ m = Object.assign(m, proto);
5275
+ if (proto.namespace) {
5276
+ m.namespace = Namespace.fromProto(proto.namespace);
5277
+ }
5278
+ return m;
5279
+ }
5280
+ constructor(kwargs) {
5281
+ if (!kwargs) {
5282
+ return;
5283
+ }
5284
+ Object.assign(this, kwargs);
5285
+ }
5286
+ toApiJson() {
5287
+ const toReturn = {};
5288
+ if (typeof this.id !== 'undefined') {
5289
+ toReturn['id'] = this.id;
5290
+ }
5291
+ if (typeof this.namespace !== 'undefined' && this.namespace !== null) {
5292
+ toReturn['namespace'] = 'toApiJson' in this.namespace ? this.namespace.toApiJson() : this.namespace;
5293
+ }
5294
+ if (typeof this.isValid !== 'undefined') {
5295
+ toReturn['isValid'] = this.isValid;
5296
+ }
5297
+ if (typeof this.errorMessage !== 'undefined') {
5298
+ toReturn['errorMessage'] = this.errorMessage;
5299
+ }
5300
+ return toReturn;
5301
+ }
5302
+ }
5303
+ class ValidatePromptModuleVersionsResponseValidationResult {
5304
+ static fromProto(proto) {
5305
+ let m = new ValidatePromptModuleVersionsResponseValidationResult();
5306
+ m = Object.assign(m, proto);
5307
+ if (proto.namespace) {
5308
+ m.namespace = Namespace.fromProto(proto.namespace);
5309
+ }
5310
+ return m;
5311
+ }
5312
+ constructor(kwargs) {
5313
+ if (!kwargs) {
5314
+ return;
5315
+ }
5316
+ Object.assign(this, kwargs);
5317
+ }
5318
+ toApiJson() {
5319
+ const toReturn = {};
5320
+ if (typeof this.id !== 'undefined') {
5321
+ toReturn['id'] = this.id;
5322
+ }
5323
+ if (typeof this.namespace !== 'undefined' && this.namespace !== null) {
5324
+ toReturn['namespace'] = 'toApiJson' in this.namespace ? this.namespace.toApiJson() : this.namespace;
5325
+ }
5326
+ if (typeof this.isValid !== 'undefined') {
5327
+ toReturn['isValid'] = this.isValid;
5328
+ }
5329
+ if (typeof this.errorMessage !== 'undefined') {
5330
+ toReturn['errorMessage'] = this.errorMessage;
5331
+ }
5332
+ return toReturn;
5333
+ }
5334
+ }
5335
+ class ValidationResult {
5336
+ static fromProto(proto) {
5337
+ let m = new ValidationResult();
5338
+ m = Object.assign(m, proto);
5339
+ if (proto.failureAction) {
5340
+ m.failureAction = enumStringToValue(ValidationFailureAction, proto.failureAction);
5341
+ }
5342
+ if (proto.violations) {
5343
+ m.violations = proto.violations.map(ValidationViolation.fromProto);
5344
+ }
5345
+ return m;
5346
+ }
5347
+ constructor(kwargs) {
5348
+ if (!kwargs) {
5349
+ return;
5350
+ }
5351
+ Object.assign(this, kwargs);
5352
+ }
5353
+ toApiJson() {
5354
+ const toReturn = {};
5355
+ if (typeof this.failureAction !== 'undefined') {
5356
+ toReturn['failureAction'] = this.failureAction;
5357
+ }
5358
+ if (typeof this.violations !== 'undefined' && this.violations !== null) {
5359
+ toReturn['violations'] = 'toApiJson' in this.violations ? this.violations.toApiJson() : this.violations;
5360
+ }
5361
+ return toReturn;
5362
+ }
5363
+ }
5364
+ class ValidationViolation {
5365
+ static fromProto(proto) {
5366
+ let m = new ValidationViolation();
5367
+ m = Object.assign(m, proto);
5368
+ if (proto.failureAction) {
5369
+ m.failureAction = enumStringToValue(ValidationFailureAction, proto.failureAction);
5370
+ }
5371
+ return m;
5372
+ }
5373
+ constructor(kwargs) {
5374
+ if (!kwargs) {
5375
+ return;
5376
+ }
5377
+ Object.assign(this, kwargs);
5378
+ }
5379
+ toApiJson() {
5380
+ const toReturn = {};
5381
+ if (typeof this.failureAction !== 'undefined') {
5382
+ toReturn['failureAction'] = this.failureAction;
5383
+ }
5384
+ if (typeof this.confidence !== 'undefined') {
5385
+ toReturn['confidence'] = this.confidence;
5386
+ }
5387
+ if (typeof this.message !== 'undefined') {
5388
+ toReturn['message'] = this.message;
5389
+ }
5390
+ if (typeof this.validatorName !== 'undefined') {
5391
+ toReturn['validatorName'] = this.validatorName;
5392
+ }
5393
+ if (typeof this.isInputValidation !== 'undefined') {
5394
+ toReturn['isInputValidation'] = this.isInputValidation;
5395
+ }
5396
+ return toReturn;
5397
+ }
5398
+ }
5604
5399
 
5605
5400
  // *********************************
5606
5401
  // Code generated by sdkgen
@@ -5677,16 +5472,6 @@ class AssistantApiService {
5677
5472
  return this.http.post(this._host + "/ai_assistants.v1alpha1.AssistantService/GenerateChatAnswer", request.toApiJson(), this.apiOptions())
5678
5473
  .pipe(map(resp => GenerateChatAnswerResponse.fromProto(resp)));
5679
5474
  }
5680
- streamingGenerateChatAnswer(r) {
5681
- const request = (r.toApiJson) ? r : new StreamingGenerateChatAnswerRequest(r);
5682
- return this.http.post(this._host + "/ai_assistants.v1alpha1.AssistantService/StreamingGenerateChatAnswer", request.toApiJson(), this.apiOptions())
5683
- .pipe(map(resp => StreamingGenerateChatAnswerResponse.fromProto(resp)));
5684
- }
5685
- resumeStreamingGenerateChatAnswer(r) {
5686
- const request = (r.toApiJson) ? r : new ResumeStreamingGenerateChatAnswerRequest(r);
5687
- return this.http.post(this._host + "/ai_assistants.v1alpha1.AssistantService/ResumeStreamingGenerateChatAnswer", request.toApiJson(), this.apiOptions())
5688
- .pipe(map(resp => StreamingGenerateChatAnswerResponse.fromProto(resp)));
5689
- }
5690
5475
  getChatAnswerFunctionExecutionJob(r) {
5691
5476
  const request = (r.toApiJson) ? r : new GetChatAnswerFunctionExecutionJobRequest(r);
5692
5477
  return this.http.post(this._host + "/ai_assistants.v1alpha1.AssistantService/GetChatAnswerFunctionExecutionJob", request.toApiJson(), this.apiOptions())
@@ -6044,6 +5829,16 @@ class PromptModuleApiService {
6044
5829
  return this.http.post(this._host + "/ai_assistants.v1alpha1.PromptModuleService/Validate", request.toApiJson(), this.apiOptions())
6045
5830
  .pipe(map(resp => ValidatePromptModuleResponse.fromProto(resp)));
6046
5831
  }
5832
+ validatePromptModules(r) {
5833
+ const request = (r.toApiJson) ? r : new ValidatePromptModulesRequest(r);
5834
+ return this.http.post(this._host + "/ai_assistants.v1alpha1.PromptModuleService/ValidatePromptModules", request.toApiJson(), this.apiOptions())
5835
+ .pipe(map(resp => ValidatePromptModulesResponse.fromProto(resp)));
5836
+ }
5837
+ validatePromptModuleVersions(r) {
5838
+ const request = (r.toApiJson) ? r : new ValidatePromptModuleVersionsRequest(r);
5839
+ return this.http.post(this._host + "/ai_assistants.v1alpha1.PromptModuleService/ValidatePromptModuleVersions", request.toApiJson(), this.apiOptions())
5840
+ .pipe(map(resp => ValidatePromptModuleVersionsResponse.fromProto(resp)));
5841
+ }
6047
5842
  }
6048
5843
  PromptModuleApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PromptModuleApiService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
6049
5844
  PromptModuleApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PromptModuleApiService, providedIn: 'root' });
@@ -6063,5 +5858,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
6063
5858
  * Generated bundle index. Do not edit.
6064
5859
  */
6065
5860
 
6066
- export { Access, Action, AgentArchitecture, Assistant, AssistantApiService, AssistantKey, AssistantType, BuildDefaultAssistantRequest, BuildDefaultAssistantResponse, CancelTestRunRequest, ChatAnswerFunctionExecutionJob, ChatAnswerFunctionExecutionJobResult, ChatAnswerFunctionExecutionJobStatus, ChatChannel, ChatContent, ChatMessage, ChatMessageRole, ChatUserInfo, Config, ConfigInboxConfig, ConfigVoiceConfig, ConfigurableGoal, Connection, ConnectionApiService, ConnectionKey, Constraint, ConstraintFilter, ContextInfo, CreateAssistantRequest, CreateAssistantRequestOptions, CreateAssistantResponse, CreateGoalRequest, CreateGoalResponse, CreateMCPFromIntegrationRequest, CreatePromptModuleRequest, CreatePromptModuleResponse, CreatePromptModuleVersionRequest, CreatePromptModuleVersionRequestOptions, DeepgramConfig, DeleteAssistantRequest, DeleteConnectionRequest, DeleteFunctionRequest, DeleteGoalRequest, DeleteMCPRequest, DeletePromptModuleRequest, DeleteTestCasesRequest, DeployPromptModuleRequest, Effect, ElevenLabsConfig, ExecuteFunctionRequest, ExecuteFunctionRequestOptions, ExecuteFunctionResponse, FieldMask, Function, FunctionApiService, FunctionAuthStrategy, FunctionAuthStrategyConnectedIntegrationAuthStrategy, FunctionAuthStrategyImpersonationAuthStrategy, FunctionAuthStrategyPlatformManagedFunctionAuthStrategy, FunctionAuthStrategyUnspecifiedFunctionAuthStrategy, FunctionHeader, FunctionKey, FunctionParameter, FunctionParameterParameterLocation, GenerateChatAnswerRequest, GenerateChatAnswerRequestOptions, GenerateChatAnswerResponse, GetAssistantRequest, GetAssistantRequestOptions, GetAssistantResponse, GetChatAnswerFunctionExecutionJobRequest, GetChatAnswerFunctionExecutionJobResponse, GetConnectionRequest, GetConnectionResponse, GetDeployedPromptModuleVersionRequest, GetDeployedPromptModuleVersionResponse, GetFunctionRequest, GetFunctionResponse, GetGoalRequest, GetGoalResponse, GetHydratedDeployedPromptModuleVersionRequest, GetHydratedDeployedPromptModuleVersionResponse, GetMultiAssistantRequest, GetMultiAssistantRequestOptions, GetMultiAssistantResponse, GetMultiFunctionRequest, GetMultiFunctionResponse, GetMultiGoalRequest, GetMultiGoalResponse, GetMultiHydratedDeployedPromptModuleVersionRequest, GetMultiHydratedDeployedPromptModuleVersionResponse, GetPromptModuleRequest, GetPromptModuleResponse, GetPromptModuleVersionRequest, GetPromptModuleVersionResponse, GetTestRunRequest, GetTestRunResponse, Goal, GoalApiService, GoalChannel, GoalKey, GoalType, GoalsDisabledForAccountGroupRequest, GoalsDisabledForAccountGroupResponse, HostService, ImageContent, IntegrationTestApiService, KeyValuePair, ListAllAssistantsAssociatedToConnectionRequest, ListAllAssistantsAssociatedToConnectionRequestFilters, ListAllAssistantsAssociatedToConnectionResponse, ListAssistantRequest, ListAssistantRequestFilters, ListAssistantResponse, ListAvailableModelsRequest, ListAvailableModelsRequestFilters, ListAvailableModelsResponse, ListConnectionsRequest, ListConnectionsRequestFilters, ListConnectionsResponse, ListFunctionRequest, ListFunctionRequestFilters, ListFunctionResponse, ListGoalsRequest, ListGoalsRequestFilters, ListGoalsRequestSortOptions, ListGoalsRequestSortingOrder, ListGoalsResponse, ListMCPToolsRequest, ListMCPToolsResponse, ListMCPsRequest, ListMCPsRequestFilters, ListMCPsResponse, ListPromptModuleRequest, ListPromptModuleRequestFilters, ListPromptModuleResponse, ListPromptModuleVersionsRequest, ListPromptModuleVersionsResponse, ListTemplateVariablesRequest, ListTemplateVariablesResponse, ListTestCasesByAssistantRequest, ListTestCasesByAssistantResponse, ListTestRunsByAssistantRequest, ListTestRunsByAssistantResponse, MCP, MCPOptions, Model, ModelConfig, ModelType, ModelVendor, Namespace, NamespaceAccountGroupNamespace, NamespaceGlobalNamespace, NamespacePartnerNamespace, NamespaceSystemNamespace, NamespaceType, OpenAIRealtimeConfig, OpenAIRealtimeConfigTurnDetection, PagedRequestOptions, PagedResponseMetadata, Prompt, PromptModule, PromptModuleApiService, PromptModuleKey, PromptModuleVersion, PromptVersion, ResumeStreamingGenerateChatAnswerRequest, RunTestsRequest, RunTestsResponse, Scope, SetAssistantConnectionsRequest, SetAssistantConnectionsRequestConnectionState, SortDirection, SortOptions, StreamingGenerateChatAnswerRequest, StreamingGenerateChatAnswerResponse, StreamingGenerateChatAnswerResponseContentChunk, StreamingGenerateChatAnswerResponseContentType, StreamingGenerateChatAnswerResponseErrorChunk, StreamingGenerateChatAnswerResponseFinalChunk, StreamingGenerateChatAnswerResponseFunctionCompleteChunk, StreamingGenerateChatAnswerResponseFunctionProgressChunk, StreamingGenerateChatAnswerResponseFunctionStartChunk, StreamingGenerateChatAnswerResponseMetadataChunk, StreamingGenerateChatAnswerResponseStartChunk, TemplateVariable, TestCase, TestResult, TestResultCitation, TestRun, UpdateAssistantRequest, UpdateGoalRequest, UpdatePromptModuleRequest, UpsertAssistantRequest, UpsertAssistantRequestOptions, UpsertAssistantResponse, UpsertConnectionRequest, UpsertFunctionRequest, UpsertGoalRequest, UpsertMCPRequest, UpsertTestCasesRequest, ValidatePromptModuleRequest, ValidatePromptModuleResponse, VendorModel };
5861
+ export { Access, Action, AgentArchitecture, Assistant, AssistantApiService, AssistantKey, AssistantType, BuildDefaultAssistantRequest, BuildDefaultAssistantResponse, CancelTestRunRequest, ChatAnswerFunctionExecutionJob, ChatAnswerFunctionExecutionJobResult, ChatAnswerFunctionExecutionJobStatus, ChatChannel, ChatContent, ChatMessage, ChatMessageRole, ChatUserInfo, Config, ConfigInboxConfig, ConfigVoiceConfig, ConfigurableGoal, Connection, ConnectionApiService, ConnectionKey, Constraint, ConstraintFilter, ContextInfo, CreateAssistantRequest, CreateAssistantRequestOptions, CreateAssistantResponse, CreateGoalRequest, CreateGoalResponse, CreateMCPFromIntegrationRequest, CreatePromptModuleRequest, CreatePromptModuleResponse, CreatePromptModuleVersionRequest, CreatePromptModuleVersionRequestOptions, DeepgramConfig, DeleteAssistantRequest, DeleteConnectionRequest, DeleteFunctionRequest, DeleteGoalRequest, DeleteMCPRequest, DeletePromptModuleRequest, DeleteTestCasesRequest, DeployPromptModuleRequest, Effect, ElevenLabsConfig, ExecuteFunctionRequest, ExecuteFunctionRequestOptions, ExecuteFunctionResponse, FieldMask, Function, FunctionApiService, FunctionAuthStrategy, FunctionAuthStrategyConnectedIntegrationAuthStrategy, FunctionAuthStrategyImpersonationAuthStrategy, FunctionAuthStrategyPlatformManagedFunctionAuthStrategy, FunctionAuthStrategyUnspecifiedFunctionAuthStrategy, FunctionHeader, FunctionKey, FunctionParameter, FunctionParameterParameterLocation, GenerateChatAnswerRequest, GenerateChatAnswerRequestOptions, GenerateChatAnswerResponse, GetAssistantRequest, GetAssistantRequestOptions, GetAssistantResponse, GetChatAnswerFunctionExecutionJobRequest, GetChatAnswerFunctionExecutionJobResponse, GetConnectionRequest, GetConnectionResponse, GetDeployedPromptModuleVersionRequest, GetDeployedPromptModuleVersionResponse, GetFunctionRequest, GetFunctionResponse, GetGoalRequest, GetGoalResponse, GetHydratedDeployedPromptModuleVersionRequest, GetHydratedDeployedPromptModuleVersionResponse, GetMultiAssistantRequest, GetMultiAssistantRequestOptions, GetMultiAssistantResponse, GetMultiFunctionRequest, GetMultiFunctionResponse, GetMultiGoalRequest, GetMultiGoalResponse, GetMultiHydratedDeployedPromptModuleVersionRequest, GetMultiHydratedDeployedPromptModuleVersionResponse, GetPromptModuleRequest, GetPromptModuleResponse, GetPromptModuleVersionRequest, GetPromptModuleVersionResponse, GetTestRunRequest, GetTestRunResponse, Goal, GoalApiService, GoalChannel, GoalKey, GoalType, GoalsDisabledForAccountGroupRequest, GoalsDisabledForAccountGroupResponse, HostService, ImageContent, IntegrationTestApiService, KeyValuePair, ListAllAssistantsAssociatedToConnectionRequest, ListAllAssistantsAssociatedToConnectionRequestFilters, ListAllAssistantsAssociatedToConnectionResponse, ListAssistantRequest, ListAssistantRequestFilters, ListAssistantResponse, ListAvailableModelsRequest, ListAvailableModelsRequestFilters, ListAvailableModelsResponse, ListConnectionsRequest, ListConnectionsRequestFilters, ListConnectionsResponse, ListFunctionRequest, ListFunctionRequestFilters, ListFunctionResponse, ListGoalsRequest, ListGoalsRequestFilters, ListGoalsRequestSortOptions, ListGoalsRequestSortingOrder, ListGoalsResponse, ListMCPToolsRequest, ListMCPToolsResponse, ListMCPsRequest, ListMCPsRequestFilters, ListMCPsResponse, ListPromptModuleRequest, ListPromptModuleRequestFilters, ListPromptModuleResponse, ListPromptModuleVersionsRequest, ListPromptModuleVersionsResponse, ListTemplateVariablesRequest, ListTemplateVariablesResponse, ListTestCasesByAssistantRequest, ListTestCasesByAssistantResponse, ListTestRunsByAssistantRequest, ListTestRunsByAssistantResponse, MCP, MCPOptions, Model, ModelConfig, ModelType, ModelVendor, Namespace, NamespaceAccountGroupNamespace, NamespaceGlobalNamespace, NamespacePartnerNamespace, NamespaceSystemNamespace, NamespaceType, OpenAIRealtimeConfig, OpenAIRealtimeConfigTurnDetection, PagedRequestOptions, PagedResponseMetadata, PromptModule, PromptModuleApiService, PromptModuleKey, PromptModuleVersion, RunTestsRequest, RunTestsResponse, Scope, SetAssistantConnectionsRequest, SetAssistantConnectionsRequestConnectionState, SortDirection, SortOptions, StreamingGenerateChatAnswerResponseContentType, TemplateVariable, TestCase, TestResult, TestResultCitation, TestRun, UpdateAssistantRequest, UpdateGoalRequest, UpdatePromptModuleRequest, UpsertAssistantRequest, UpsertAssistantRequestOptions, UpsertAssistantResponse, UpsertConnectionRequest, UpsertFunctionRequest, UpsertGoalRequest, UpsertMCPRequest, UpsertTestCasesRequest, ValidatePromptModuleRequest, ValidatePromptModuleResponse, ValidatePromptModuleVersionsRequest, ValidatePromptModuleVersionsResponse, ValidatePromptModuleVersionsResponseValidationResult, ValidatePromptModulesRequest, ValidatePromptModulesResponse, ValidatePromptModulesResponseValidationResult, ValidationFailureAction, ValidationResult, ValidationViolation, VendorModel };
6067
5862
  //# sourceMappingURL=vendasta-ai-assistants.mjs.map