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