@vendasta/ai-assistants 0.47.1 → 0.49.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.
Files changed (39) hide show
  1. package/esm2020/lib/_internal/enums/assistant-type.enum.mjs +18 -0
  2. package/esm2020/lib/_internal/enums/assistant.enum.mjs +1 -12
  3. package/esm2020/lib/_internal/enums/constraints.enum.mjs +19 -0
  4. package/esm2020/lib/_internal/enums/index.mjs +5 -2
  5. package/esm2020/lib/_internal/enums/namespace.enum.mjs +15 -0
  6. package/esm2020/lib/_internal/function.api.service.mjs +6 -2
  7. package/esm2020/lib/_internal/interfaces/api.interface.mjs +1 -1
  8. package/esm2020/lib/_internal/interfaces/constraints.interface.mjs +8 -0
  9. package/esm2020/lib/_internal/interfaces/function.interface.mjs +1 -1
  10. package/esm2020/lib/_internal/interfaces/goal.interface.mjs +1 -1
  11. package/esm2020/lib/_internal/interfaces/index.mjs +1 -1
  12. package/esm2020/lib/_internal/objects/api.mjs +126 -70
  13. package/esm2020/lib/_internal/objects/constraints.mjs +101 -0
  14. package/esm2020/lib/_internal/objects/function.mjs +63 -1
  15. package/esm2020/lib/_internal/objects/goal.mjs +8 -1
  16. package/esm2020/lib/_internal/objects/index.mjs +4 -3
  17. package/esm2020/lib/_internal/prompt-module.api.service.mjs +7 -2
  18. package/fesm2015/vendasta-ai-assistants.mjs +354 -82
  19. package/fesm2015/vendasta-ai-assistants.mjs.map +1 -1
  20. package/fesm2020/vendasta-ai-assistants.mjs +354 -82
  21. package/fesm2020/vendasta-ai-assistants.mjs.map +1 -1
  22. package/lib/_internal/enums/assistant-type.enum.d.ts +10 -0
  23. package/lib/_internal/enums/assistant.enum.d.ts +0 -10
  24. package/lib/_internal/enums/constraints.enum.d.ts +10 -0
  25. package/lib/_internal/enums/index.d.ts +4 -1
  26. package/lib/_internal/enums/namespace.enum.d.ts +7 -0
  27. package/lib/_internal/function.api.service.d.ts +3 -2
  28. package/lib/_internal/interfaces/api.interface.d.ts +29 -19
  29. package/lib/_internal/interfaces/constraints.interface.d.ts +14 -0
  30. package/lib/_internal/interfaces/function.interface.d.ts +11 -0
  31. package/lib/_internal/interfaces/goal.interface.d.ts +2 -0
  32. package/lib/_internal/interfaces/index.d.ts +3 -2
  33. package/lib/_internal/objects/api.d.ts +52 -36
  34. package/lib/_internal/objects/constraints.d.ts +25 -0
  35. package/lib/_internal/objects/function.d.ts +17 -0
  36. package/lib/_internal/objects/goal.d.ts +2 -0
  37. package/lib/_internal/objects/index.d.ts +3 -2
  38. package/lib/_internal/prompt-module.api.service.d.ts +3 -2
  39. package/package.json +1 -1
@@ -26,6 +26,58 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
26
26
  args: [{ providedIn: 'root' }]
27
27
  }] });
28
28
 
29
+ // *********************************
30
+ // Code generated by sdkgen
31
+ // DO NOT EDIT!.
32
+ //
33
+ // Enums.
34
+ // *********************************
35
+ var NamespaceType;
36
+ (function (NamespaceType) {
37
+ NamespaceType[NamespaceType["NAMESPACE_TYPE_UNSPECIFIED"] = 0] = "NAMESPACE_TYPE_UNSPECIFIED";
38
+ NamespaceType[NamespaceType["NAMESPACE_TYPE_ACCOUNT_GROUP"] = 1] = "NAMESPACE_TYPE_ACCOUNT_GROUP";
39
+ NamespaceType[NamespaceType["NAMESPACE_TYPE_PARTNER"] = 2] = "NAMESPACE_TYPE_PARTNER";
40
+ NamespaceType[NamespaceType["NAMESPACE_TYPE_SYSTEM"] = 3] = "NAMESPACE_TYPE_SYSTEM";
41
+ NamespaceType[NamespaceType["NAMESPACE_TYPE_GLOBAL"] = 4] = "NAMESPACE_TYPE_GLOBAL";
42
+ })(NamespaceType || (NamespaceType = {}));
43
+
44
+ // *********************************
45
+ // Code generated by sdkgen
46
+ // DO NOT EDIT!.
47
+ //
48
+ // Enums.
49
+ // *********************************
50
+ var AssistantType;
51
+ (function (AssistantType) {
52
+ AssistantType[AssistantType["ASSISTANT_TYPE_UNSPECIFIED"] = 0] = "ASSISTANT_TYPE_UNSPECIFIED";
53
+ AssistantType[AssistantType["ASSISTANT_TYPE_SYSTEM"] = 1] = "ASSISTANT_TYPE_SYSTEM";
54
+ AssistantType[AssistantType["ASSISTANT_TYPE_INBOX"] = 2] = "ASSISTANT_TYPE_INBOX";
55
+ AssistantType[AssistantType["ASSISTANT_TYPE_SOCIAL_MARKETING"] = 3] = "ASSISTANT_TYPE_SOCIAL_MARKETING";
56
+ AssistantType[AssistantType["ASSISTANT_TYPE_VOICE_RECEPTIONIST"] = 4] = "ASSISTANT_TYPE_VOICE_RECEPTIONIST";
57
+ AssistantType[AssistantType["ASSISTANT_TYPE_CUSTOM"] = 5] = "ASSISTANT_TYPE_CUSTOM";
58
+ AssistantType[AssistantType["ASSISTANT_TYPE_SALES_COACH"] = 6] = "ASSISTANT_TYPE_SALES_COACH";
59
+ AssistantType[AssistantType["ASSISTANT_TYPE_REPUTATION_MANAGEMENT_REVIEW_AGENT"] = 7] = "ASSISTANT_TYPE_REPUTATION_MANAGEMENT_REVIEW_AGENT";
60
+ })(AssistantType || (AssistantType = {}));
61
+
62
+ // *********************************
63
+ // Code generated by sdkgen
64
+ // DO NOT EDIT!.
65
+ //
66
+ // Enums.
67
+ // *********************************
68
+ var Action;
69
+ (function (Action) {
70
+ Action[Action["ACTION_UNSPECIFIED"] = 0] = "ACTION_UNSPECIFIED";
71
+ Action[Action["ACTION_ASSIGN"] = 1] = "ACTION_ASSIGN";
72
+ Action[Action["ACTION_VIEW"] = 2] = "ACTION_VIEW";
73
+ })(Action || (Action = {}));
74
+ var Effect;
75
+ (function (Effect) {
76
+ Effect[Effect["EFFECT_UNSPECIFIED"] = 0] = "EFFECT_UNSPECIFIED";
77
+ Effect[Effect["EFFECT_ALLOW"] = 1] = "EFFECT_ALLOW";
78
+ Effect[Effect["EFFECT_DENY"] = 2] = "EFFECT_DENY";
79
+ })(Effect || (Effect = {}));
80
+
29
81
  // *********************************
30
82
  // Code generated by sdkgen
31
83
  // DO NOT EDIT!.
@@ -97,17 +149,6 @@ var ModelVendor;
97
149
  //
98
150
  // Enums.
99
151
  // *********************************
100
- var AssistantType;
101
- (function (AssistantType) {
102
- AssistantType[AssistantType["ASSISTANT_TYPE_UNSPECIFIED"] = 0] = "ASSISTANT_TYPE_UNSPECIFIED";
103
- AssistantType[AssistantType["ASSISTANT_TYPE_SYSTEM"] = 1] = "ASSISTANT_TYPE_SYSTEM";
104
- AssistantType[AssistantType["ASSISTANT_TYPE_INBOX"] = 2] = "ASSISTANT_TYPE_INBOX";
105
- AssistantType[AssistantType["ASSISTANT_TYPE_SOCIAL_MARKETING"] = 3] = "ASSISTANT_TYPE_SOCIAL_MARKETING";
106
- AssistantType[AssistantType["ASSISTANT_TYPE_VOICE_RECEPTIONIST"] = 4] = "ASSISTANT_TYPE_VOICE_RECEPTIONIST";
107
- AssistantType[AssistantType["ASSISTANT_TYPE_CUSTOM"] = 5] = "ASSISTANT_TYPE_CUSTOM";
108
- AssistantType[AssistantType["ASSISTANT_TYPE_SALES_COACH"] = 6] = "ASSISTANT_TYPE_SALES_COACH";
109
- AssistantType[AssistantType["ASSISTANT_TYPE_REPUTATION_MANAGEMENT_REVIEW_AGENT"] = 7] = "ASSISTANT_TYPE_REPUTATION_MANAGEMENT_REVIEW_AGENT";
110
- })(AssistantType || (AssistantType = {}));
111
152
  var VendorModel;
112
153
  (function (VendorModel) {
113
154
  VendorModel[VendorModel["VENDOR_MODEL_UNSPECIFIED"] = 0] = "VENDOR_MODEL_UNSPECIFIED";
@@ -169,7 +210,7 @@ var SortDirection;
169
210
  // Enums Index.
170
211
  // *********************************
171
212
 
172
- function enumStringToValue$d(enumRef, value) {
213
+ function enumStringToValue$e(enumRef, value) {
173
214
  if (typeof value === 'number') {
174
215
  return value;
175
216
  }
@@ -291,6 +332,106 @@ class NamespaceSystemNamespace {
291
332
  }
292
333
  }
293
334
 
335
+ function enumStringToValue$d(enumRef, value) {
336
+ if (typeof value === 'number') {
337
+ return value;
338
+ }
339
+ return enumRef[value];
340
+ }
341
+ class Constraint {
342
+ static fromProto(proto) {
343
+ let m = new Constraint();
344
+ m = Object.assign(m, proto);
345
+ if (proto.action) {
346
+ m.action = enumStringToValue$d(Action, proto.action);
347
+ }
348
+ if (proto.scope) {
349
+ m.scope = Scope.fromProto(proto.scope);
350
+ }
351
+ if (proto.effect) {
352
+ m.effect = enumStringToValue$d(Effect, proto.effect);
353
+ }
354
+ return m;
355
+ }
356
+ constructor(kwargs) {
357
+ if (!kwargs) {
358
+ return;
359
+ }
360
+ Object.assign(this, kwargs);
361
+ }
362
+ toApiJson() {
363
+ const toReturn = {};
364
+ if (typeof this.action !== 'undefined') {
365
+ toReturn['action'] = this.action;
366
+ }
367
+ if (typeof this.scope !== 'undefined' && this.scope !== null) {
368
+ toReturn['scope'] = 'toApiJson' in this.scope ? this.scope.toApiJson() : this.scope;
369
+ }
370
+ if (typeof this.effect !== 'undefined') {
371
+ toReturn['effect'] = this.effect;
372
+ }
373
+ return toReturn;
374
+ }
375
+ }
376
+ class ConstraintFilter {
377
+ static fromProto(proto) {
378
+ let m = new ConstraintFilter();
379
+ m = Object.assign(m, proto);
380
+ if (proto.action) {
381
+ m.action = enumStringToValue$d(Action, proto.action);
382
+ }
383
+ if (proto.scope) {
384
+ m.scope = Scope.fromProto(proto.scope);
385
+ }
386
+ return m;
387
+ }
388
+ constructor(kwargs) {
389
+ if (!kwargs) {
390
+ return;
391
+ }
392
+ Object.assign(this, kwargs);
393
+ }
394
+ toApiJson() {
395
+ const toReturn = {};
396
+ if (typeof this.action !== 'undefined') {
397
+ toReturn['action'] = this.action;
398
+ }
399
+ if (typeof this.scope !== 'undefined' && this.scope !== null) {
400
+ toReturn['scope'] = 'toApiJson' in this.scope ? this.scope.toApiJson() : this.scope;
401
+ }
402
+ return toReturn;
403
+ }
404
+ }
405
+ class Scope {
406
+ static fromProto(proto) {
407
+ let m = new Scope();
408
+ m = Object.assign(m, proto);
409
+ if (proto.assistantNamespaceType) {
410
+ m.assistantNamespaceType = enumStringToValue$d(NamespaceType, proto.assistantNamespaceType);
411
+ }
412
+ if (proto.assistantType) {
413
+ m.assistantType = enumStringToValue$d(AssistantType, proto.assistantType);
414
+ }
415
+ return m;
416
+ }
417
+ constructor(kwargs) {
418
+ if (!kwargs) {
419
+ return;
420
+ }
421
+ Object.assign(this, kwargs);
422
+ }
423
+ toApiJson() {
424
+ const toReturn = {};
425
+ if (typeof this.assistantNamespaceType !== 'undefined') {
426
+ toReturn['assistantNamespaceType'] = this.assistantNamespaceType;
427
+ }
428
+ if (typeof this.assistantType !== 'undefined') {
429
+ toReturn['assistantType'] = this.assistantType;
430
+ }
431
+ return toReturn;
432
+ }
433
+ }
434
+
294
435
  function enumStringToValue$c(enumRef, value) {
295
436
  if (typeof value === 'number') {
296
437
  return value;
@@ -359,6 +500,55 @@ function enumStringToValue$b(enumRef, value) {
359
500
  }
360
501
  return enumRef[value];
361
502
  }
503
+ class FunctionAuthStrategyConnectedIntegrationAuthStrategy {
504
+ static fromProto(proto) {
505
+ let m = new FunctionAuthStrategyConnectedIntegrationAuthStrategy();
506
+ m = Object.assign(m, proto);
507
+ return m;
508
+ }
509
+ constructor(kwargs) {
510
+ if (!kwargs) {
511
+ return;
512
+ }
513
+ Object.assign(this, kwargs);
514
+ }
515
+ toApiJson() {
516
+ const toReturn = {};
517
+ if (typeof this.connectionId !== 'undefined') {
518
+ toReturn['connectionId'] = this.connectionId;
519
+ }
520
+ return toReturn;
521
+ }
522
+ }
523
+ class CreateMCPFromIntegrationRequest {
524
+ static fromProto(proto) {
525
+ let m = new CreateMCPFromIntegrationRequest();
526
+ m = Object.assign(m, proto);
527
+ if (proto.namespace) {
528
+ m.namespace = Namespace.fromProto(proto.namespace);
529
+ }
530
+ return m;
531
+ }
532
+ constructor(kwargs) {
533
+ if (!kwargs) {
534
+ return;
535
+ }
536
+ Object.assign(this, kwargs);
537
+ }
538
+ toApiJson() {
539
+ const toReturn = {};
540
+ if (typeof this.namespace !== 'undefined' && this.namespace !== null) {
541
+ toReturn['namespace'] = 'toApiJson' in this.namespace ? this.namespace.toApiJson() : this.namespace;
542
+ }
543
+ if (typeof this.mcpId !== 'undefined') {
544
+ toReturn['mcpId'] = this.mcpId;
545
+ }
546
+ if (typeof this.connectionId !== 'undefined') {
547
+ toReturn['connectionId'] = this.connectionId;
548
+ }
549
+ return toReturn;
550
+ }
551
+ }
362
552
  class DeleteMCPRequest {
363
553
  static fromProto(proto) {
364
554
  let m = new DeleteMCPRequest();
@@ -430,6 +620,9 @@ class Function {
430
620
  if (proto.authStrategy) {
431
621
  m.authStrategy = FunctionAuthStrategy.fromProto(proto.authStrategy);
432
622
  }
623
+ if (proto.constraints) {
624
+ m.constraints = proto.constraints.map(Constraint.fromProto);
625
+ }
433
626
  return m;
434
627
  }
435
628
  constructor(kwargs) {
@@ -476,6 +669,9 @@ class Function {
476
669
  if (typeof this.mcpId !== 'undefined') {
477
670
  toReturn['mcpId'] = this.mcpId;
478
671
  }
672
+ if (typeof this.constraints !== 'undefined' && this.constraints !== null) {
673
+ toReturn['constraints'] = 'toApiJson' in this.constraints ? this.constraints.toApiJson() : this.constraints;
674
+ }
479
675
  return toReturn;
480
676
  }
481
677
  }
@@ -489,6 +685,9 @@ class FunctionAuthStrategy {
489
685
  if (proto.platformManaged) {
490
686
  m.platformManaged = FunctionAuthStrategyPlatformManagedFunctionAuthStrategy.fromProto(proto.platformManaged);
491
687
  }
688
+ if (proto.connectedIntegration) {
689
+ m.connectedIntegration = FunctionAuthStrategyConnectedIntegrationAuthStrategy.fromProto(proto.connectedIntegration);
690
+ }
492
691
  return m;
493
692
  }
494
693
  constructor(kwargs) {
@@ -505,6 +704,9 @@ class FunctionAuthStrategy {
505
704
  if (typeof this.platformManaged !== 'undefined' && this.platformManaged !== null) {
506
705
  toReturn['platformManaged'] = 'toApiJson' in this.platformManaged ? this.platformManaged.toApiJson() : this.platformManaged;
507
706
  }
707
+ if (typeof this.connectedIntegration !== 'undefined' && this.connectedIntegration !== null) {
708
+ toReturn['connectedIntegration'] = 'toApiJson' in this.connectedIntegration ? this.connectedIntegration.toApiJson() : this.connectedIntegration;
709
+ }
508
710
  return toReturn;
509
711
  }
510
712
  }
@@ -1077,6 +1279,9 @@ class Goal {
1077
1279
  if (proto.overrideOf) {
1078
1280
  m.overrideOf = GoalKey.fromProto(proto.overrideOf);
1079
1281
  }
1282
+ if (proto.constraints) {
1283
+ m.constraints = proto.constraints.map(Constraint.fromProto);
1284
+ }
1080
1285
  return m;
1081
1286
  }
1082
1287
  constructor(kwargs) {
@@ -1123,6 +1328,9 @@ class Goal {
1123
1328
  if (typeof this.overrideOf !== 'undefined' && this.overrideOf !== null) {
1124
1329
  toReturn['overrideOf'] = 'toApiJson' in this.overrideOf ? this.overrideOf.toApiJson() : this.overrideOf;
1125
1330
  }
1331
+ if (typeof this.constraints !== 'undefined' && this.constraints !== null) {
1332
+ toReturn['constraints'] = 'toApiJson' in this.constraints ? this.constraints.toApiJson() : this.constraints;
1333
+ }
1126
1334
  return toReturn;
1127
1335
  }
1128
1336
  }
@@ -3007,47 +3215,12 @@ class ExecuteFunctionResponse {
3007
3215
  return toReturn;
3008
3216
  }
3009
3217
  }
3010
- class ListFunctionRequestFilters {
3011
- static fromProto(proto) {
3012
- let m = new ListFunctionRequestFilters();
3013
- m = Object.assign(m, proto);
3014
- if (proto.namespace) {
3015
- m.namespace = Namespace.fromProto(proto.namespace);
3016
- }
3017
- if (proto.namespaces) {
3018
- m.namespaces = proto.namespaces.map(Namespace.fromProto);
3019
- }
3020
- return m;
3021
- }
3022
- constructor(kwargs) {
3023
- if (!kwargs) {
3024
- return;
3025
- }
3026
- Object.assign(this, kwargs);
3027
- }
3028
- toApiJson() {
3029
- const toReturn = {};
3030
- if (typeof this.namespace !== 'undefined' && this.namespace !== null) {
3031
- toReturn['namespace'] = 'toApiJson' in this.namespace ? this.namespace.toApiJson() : this.namespace;
3032
- }
3033
- if (typeof this.namespaces !== 'undefined' && this.namespaces !== null) {
3034
- toReturn['namespaces'] = 'toApiJson' in this.namespaces ? this.namespaces.toApiJson() : this.namespaces;
3035
- }
3036
- if (typeof this.mcpId !== 'undefined') {
3037
- toReturn['mcpId'] = this.mcpId;
3038
- }
3039
- return toReturn;
3040
- }
3041
- }
3042
- class ListAvailableModelsRequestFilters {
3218
+ class ListAllAssistantsAssociatedToConnectionRequestFilters {
3043
3219
  static fromProto(proto) {
3044
- let m = new ListAvailableModelsRequestFilters();
3220
+ let m = new ListAllAssistantsAssociatedToConnectionRequestFilters();
3045
3221
  m = Object.assign(m, proto);
3046
- if (proto.vendor) {
3047
- m.vendor = proto.vendor.map((v) => enumStringToValue(ModelVendor, v));
3048
- }
3049
3222
  if (proto.type) {
3050
- m.type = proto.type.map((v) => enumStringToValue(ModelType, v));
3223
+ m.type = enumStringToValue(AssistantType, proto.type);
3051
3224
  }
3052
3225
  return m;
3053
3226
  }
@@ -3059,9 +3232,6 @@ class ListAvailableModelsRequestFilters {
3059
3232
  }
3060
3233
  toApiJson() {
3061
3234
  const toReturn = {};
3062
- if (typeof this.vendor !== 'undefined') {
3063
- toReturn['vendor'] = this.vendor;
3064
- }
3065
3235
  if (typeof this.type !== 'undefined') {
3066
3236
  toReturn['type'] = this.type;
3067
3237
  }
@@ -3136,6 +3306,9 @@ class ListGoalsRequestFilters {
3136
3306
  if (proto.namespaces) {
3137
3307
  m.namespaces = proto.namespaces.map(Namespace.fromProto);
3138
3308
  }
3309
+ if (proto.constraintFilters) {
3310
+ m.constraintFilters = proto.constraintFilters.map(ConstraintFilter.fromProto);
3311
+ }
3139
3312
  return m;
3140
3313
  }
3141
3314
  constructor(kwargs) {
@@ -3158,15 +3331,21 @@ class ListGoalsRequestFilters {
3158
3331
  if (typeof this.namespaces !== 'undefined' && this.namespaces !== null) {
3159
3332
  toReturn['namespaces'] = 'toApiJson' in this.namespaces ? this.namespaces.toApiJson() : this.namespaces;
3160
3333
  }
3334
+ if (typeof this.constraintFilters !== 'undefined' && this.constraintFilters !== null) {
3335
+ toReturn['constraintFilters'] = 'toApiJson' in this.constraintFilters ? this.constraintFilters.toApiJson() : this.constraintFilters;
3336
+ }
3161
3337
  return toReturn;
3162
3338
  }
3163
3339
  }
3164
- class ListAllAssistantsAssociatedToConnectionRequestFilters {
3340
+ class ListAvailableModelsRequestFilters {
3165
3341
  static fromProto(proto) {
3166
- let m = new ListAllAssistantsAssociatedToConnectionRequestFilters();
3342
+ let m = new ListAvailableModelsRequestFilters();
3167
3343
  m = Object.assign(m, proto);
3344
+ if (proto.vendor) {
3345
+ m.vendor = proto.vendor.map((v) => enumStringToValue(ModelVendor, v));
3346
+ }
3168
3347
  if (proto.type) {
3169
- m.type = enumStringToValue(AssistantType, proto.type);
3348
+ m.type = proto.type.map((v) => enumStringToValue(ModelType, v));
3170
3349
  }
3171
3350
  return m;
3172
3351
  }
@@ -3178,12 +3357,53 @@ class ListAllAssistantsAssociatedToConnectionRequestFilters {
3178
3357
  }
3179
3358
  toApiJson() {
3180
3359
  const toReturn = {};
3360
+ if (typeof this.vendor !== 'undefined') {
3361
+ toReturn['vendor'] = this.vendor;
3362
+ }
3181
3363
  if (typeof this.type !== 'undefined') {
3182
3364
  toReturn['type'] = this.type;
3183
3365
  }
3184
3366
  return toReturn;
3185
3367
  }
3186
3368
  }
3369
+ class ListFunctionRequestFilters {
3370
+ static fromProto(proto) {
3371
+ let m = new ListFunctionRequestFilters();
3372
+ m = Object.assign(m, proto);
3373
+ if (proto.namespace) {
3374
+ m.namespace = Namespace.fromProto(proto.namespace);
3375
+ }
3376
+ if (proto.namespaces) {
3377
+ m.namespaces = proto.namespaces.map(Namespace.fromProto);
3378
+ }
3379
+ if (proto.constraintFilters) {
3380
+ m.constraintFilters = proto.constraintFilters.map(ConstraintFilter.fromProto);
3381
+ }
3382
+ return m;
3383
+ }
3384
+ constructor(kwargs) {
3385
+ if (!kwargs) {
3386
+ return;
3387
+ }
3388
+ Object.assign(this, kwargs);
3389
+ }
3390
+ toApiJson() {
3391
+ const toReturn = {};
3392
+ if (typeof this.namespace !== 'undefined' && this.namespace !== null) {
3393
+ toReturn['namespace'] = 'toApiJson' in this.namespace ? this.namespace.toApiJson() : this.namespace;
3394
+ }
3395
+ if (typeof this.namespaces !== 'undefined' && this.namespaces !== null) {
3396
+ toReturn['namespaces'] = 'toApiJson' in this.namespaces ? this.namespaces.toApiJson() : this.namespaces;
3397
+ }
3398
+ if (typeof this.mcpId !== 'undefined') {
3399
+ toReturn['mcpId'] = this.mcpId;
3400
+ }
3401
+ if (typeof this.constraintFilters !== 'undefined' && this.constraintFilters !== null) {
3402
+ toReturn['constraintFilters'] = 'toApiJson' in this.constraintFilters ? this.constraintFilters.toApiJson() : this.constraintFilters;
3403
+ }
3404
+ return toReturn;
3405
+ }
3406
+ }
3187
3407
  class ListAssistantRequestFilters {
3188
3408
  static fromProto(proto) {
3189
3409
  let m = new ListAssistantRequestFilters();
@@ -4757,13 +4977,10 @@ class ListPromptVersionsResponse {
4757
4977
  return toReturn;
4758
4978
  }
4759
4979
  }
4760
- class GenerateChatAnswerRequestOptions {
4980
+ class CreatePromptModuleVersionRequestOptions {
4761
4981
  static fromProto(proto) {
4762
- let m = new GenerateChatAnswerRequestOptions();
4982
+ let m = new CreatePromptModuleVersionRequestOptions();
4763
4983
  m = Object.assign(m, proto);
4764
- if (proto.maxTokens) {
4765
- m.maxTokens = parseInt(proto.maxTokens, 10);
4766
- }
4767
4984
  return m;
4768
4985
  }
4769
4986
  constructor(kwargs) {
@@ -4774,21 +4991,15 @@ class GenerateChatAnswerRequestOptions {
4774
4991
  }
4775
4992
  toApiJson() {
4776
4993
  const toReturn = {};
4777
- if (typeof this.includeAllCitations !== 'undefined') {
4778
- toReturn['includeAllCitations'] = this.includeAllCitations;
4779
- }
4780
- if (typeof this.enableAsyncFunctions !== 'undefined') {
4781
- toReturn['enableAsyncFunctions'] = this.enableAsyncFunctions;
4782
- }
4783
- if (typeof this.maxTokens !== 'undefined') {
4784
- toReturn['maxTokens'] = this.maxTokens;
4994
+ if (typeof this.shouldDeploy !== 'undefined') {
4995
+ toReturn['shouldDeploy'] = this.shouldDeploy;
4785
4996
  }
4786
4997
  return toReturn;
4787
4998
  }
4788
4999
  }
4789
- class GetMultiAssistantRequestOptions {
5000
+ class GetAssistantRequestOptions {
4790
5001
  static fromProto(proto) {
4791
- let m = new GetMultiAssistantRequestOptions();
5002
+ let m = new GetAssistantRequestOptions();
4792
5003
  m = Object.assign(m, proto);
4793
5004
  return m;
4794
5005
  }
@@ -4806,10 +5017,13 @@ class GetMultiAssistantRequestOptions {
4806
5017
  return toReturn;
4807
5018
  }
4808
5019
  }
4809
- class CreatePromptModuleVersionRequestOptions {
5020
+ class GenerateChatAnswerRequestOptions {
4810
5021
  static fromProto(proto) {
4811
- let m = new CreatePromptModuleVersionRequestOptions();
5022
+ let m = new GenerateChatAnswerRequestOptions();
4812
5023
  m = Object.assign(m, proto);
5024
+ if (proto.maxTokens) {
5025
+ m.maxTokens = parseInt(proto.maxTokens, 10);
5026
+ }
4813
5027
  return m;
4814
5028
  }
4815
5029
  constructor(kwargs) {
@@ -4820,15 +5034,21 @@ class CreatePromptModuleVersionRequestOptions {
4820
5034
  }
4821
5035
  toApiJson() {
4822
5036
  const toReturn = {};
4823
- if (typeof this.shouldDeploy !== 'undefined') {
4824
- toReturn['shouldDeploy'] = this.shouldDeploy;
5037
+ if (typeof this.includeAllCitations !== 'undefined') {
5038
+ toReturn['includeAllCitations'] = this.includeAllCitations;
5039
+ }
5040
+ if (typeof this.enableAsyncFunctions !== 'undefined') {
5041
+ toReturn['enableAsyncFunctions'] = this.enableAsyncFunctions;
5042
+ }
5043
+ if (typeof this.maxTokens !== 'undefined') {
5044
+ toReturn['maxTokens'] = this.maxTokens;
4825
5045
  }
4826
5046
  return toReturn;
4827
5047
  }
4828
5048
  }
4829
- class CreateAssistantRequestOptions {
5049
+ class UpsertAssistantRequestOptions {
4830
5050
  static fromProto(proto) {
4831
- let m = new CreateAssistantRequestOptions();
5051
+ let m = new UpsertAssistantRequestOptions();
4832
5052
  m = Object.assign(m, proto);
4833
5053
  return m;
4834
5054
  }
@@ -4846,9 +5066,9 @@ class CreateAssistantRequestOptions {
4846
5066
  return toReturn;
4847
5067
  }
4848
5068
  }
4849
- class UpsertAssistantRequestOptions {
5069
+ class CreateAssistantRequestOptions {
4850
5070
  static fromProto(proto) {
4851
- let m = new UpsertAssistantRequestOptions();
5071
+ let m = new CreateAssistantRequestOptions();
4852
5072
  m = Object.assign(m, proto);
4853
5073
  return m;
4854
5074
  }
@@ -4866,9 +5086,9 @@ class UpsertAssistantRequestOptions {
4866
5086
  return toReturn;
4867
5087
  }
4868
5088
  }
4869
- class GetAssistantRequestOptions {
5089
+ class GetMultiAssistantRequestOptions {
4870
5090
  static fromProto(proto) {
4871
- let m = new GetAssistantRequestOptions();
5091
+ let m = new GetMultiAssistantRequestOptions();
4872
5092
  m = Object.assign(m, proto);
4873
5093
  return m;
4874
5094
  }
@@ -5146,6 +5366,49 @@ class UpsertGoalRequest {
5146
5366
  return toReturn;
5147
5367
  }
5148
5368
  }
5369
+ class ValidatePromptModuleRequest {
5370
+ static fromProto(proto) {
5371
+ let m = new ValidatePromptModuleRequest();
5372
+ m = Object.assign(m, proto);
5373
+ return m;
5374
+ }
5375
+ constructor(kwargs) {
5376
+ if (!kwargs) {
5377
+ return;
5378
+ }
5379
+ Object.assign(this, kwargs);
5380
+ }
5381
+ toApiJson() {
5382
+ const toReturn = {};
5383
+ if (typeof this.content !== 'undefined') {
5384
+ toReturn['content'] = this.content;
5385
+ }
5386
+ return toReturn;
5387
+ }
5388
+ }
5389
+ class ValidatePromptModuleResponse {
5390
+ static fromProto(proto) {
5391
+ let m = new ValidatePromptModuleResponse();
5392
+ m = Object.assign(m, proto);
5393
+ return m;
5394
+ }
5395
+ constructor(kwargs) {
5396
+ if (!kwargs) {
5397
+ return;
5398
+ }
5399
+ Object.assign(this, kwargs);
5400
+ }
5401
+ toApiJson() {
5402
+ const toReturn = {};
5403
+ if (typeof this.isValid !== 'undefined') {
5404
+ toReturn['isValid'] = this.isValid;
5405
+ }
5406
+ if (typeof this.errorMessage !== 'undefined') {
5407
+ toReturn['errorMessage'] = this.errorMessage;
5408
+ }
5409
+ return toReturn;
5410
+ }
5411
+ }
5149
5412
 
5150
5413
  // *********************************
5151
5414
  // Code generated by sdkgen
@@ -5356,6 +5619,10 @@ class FunctionApiService {
5356
5619
  const request = (r.toApiJson) ? r : new DeleteMCPRequest(r);
5357
5620
  return this.http.post(this._host + "/ai_assistants.v1alpha1.FunctionService/DeleteMCP", request.toApiJson(), { ...this.apiOptions(), observe: 'response' });
5358
5621
  }
5622
+ createMcpFromIntegration(r) {
5623
+ const request = (r.toApiJson) ? r : new CreateMCPFromIntegrationRequest(r);
5624
+ return this.http.post(this._host + "/ai_assistants.v1alpha1.FunctionService/CreateMCPFromIntegration", request.toApiJson(), { ...this.apiOptions(), observe: 'response' });
5625
+ }
5359
5626
  }
5360
5627
  FunctionApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: FunctionApiService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
5361
5628
  FunctionApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: FunctionApiService, providedIn: 'root' });
@@ -5565,6 +5832,11 @@ class PromptModuleApiService {
5565
5832
  const request = (r.toApiJson) ? r : new DeletePromptModuleRequest(r);
5566
5833
  return this.http.post(this._host + "/ai_assistants.v1alpha1.PromptModuleService/Delete", request.toApiJson(), { ...this.apiOptions(), observe: 'response' });
5567
5834
  }
5835
+ validate(r) {
5836
+ const request = (r.toApiJson) ? r : new ValidatePromptModuleRequest(r);
5837
+ return this.http.post(this._host + "/ai_assistants.v1alpha1.PromptModuleService/Validate", request.toApiJson(), this.apiOptions())
5838
+ .pipe(map(resp => ValidatePromptModuleResponse.fromProto(resp)));
5839
+ }
5568
5840
  }
5569
5841
  PromptModuleApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PromptModuleApiService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
5570
5842
  PromptModuleApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PromptModuleApiService, providedIn: 'root' });
@@ -5658,5 +5930,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
5658
5930
  * Generated bundle index. Do not edit.
5659
5931
  */
5660
5932
 
5661
- export { Access, Assistant, AssistantApiService, AssistantKey, AssistantType, BuildDefaultAssistantRequest, BuildDefaultAssistantResponse, CancelTestRunRequest, ChatAnswerFunctionExecutionJob, ChatAnswerFunctionExecutionJobResult, ChatAnswerFunctionExecutionJobStatus, ChatChannel, ChatContent, ChatMessage, ChatMessageRole, ChatUserInfo, Config, ConfigInboxConfig, ConfigVoiceConfig, ConfigurableGoal, Connection, ConnectionApiService, ConnectionKey, ContextInfo, CreateAssistantRequest, CreateAssistantRequestOptions, CreateAssistantResponse, CreateGoalRequest, CreateGoalResponse, CreatePromptModuleRequest, CreatePromptModuleResponse, CreatePromptModuleVersionRequest, CreatePromptModuleVersionRequestOptions, CreatePromptRequest, DeepgramConfig, DeleteAssistantRequest, DeleteConnectionRequest, DeleteFunctionRequest, DeleteGoalRequest, DeleteMCPRequest, DeletePromptModuleRequest, DeletePromptRequest, DeleteTestCasesRequest, DeployPromptModuleRequest, DeployPromptRequest, ElevenLabsConfig, ExecuteFunctionRequest, ExecuteFunctionResponse, FieldMask, Function, FunctionApiService, FunctionAuthStrategy, FunctionAuthStrategyPlatformManagedFunctionAuthStrategy, FunctionAuthStrategyUnspecifiedFunctionAuthStrategy, FunctionHeader, FunctionKey, FunctionParameter, FunctionParameterParameterLocation, GenerateChatAnswerRequest, GenerateChatAnswerRequestOptions, GenerateChatAnswerResponse, GetAssistantRequest, GetAssistantRequestOptions, GetAssistantResponse, GetChatAnswerFunctionExecutionJobRequest, GetChatAnswerFunctionExecutionJobResponse, GetConnectionRequest, GetConnectionResponse, GetDeployedPromptModuleVersionRequest, GetDeployedPromptModuleVersionResponse, GetDeployedPromptVersionRequest, GetDeployedPromptVersionResponse, GetFunctionRequest, GetFunctionResponse, GetGoalRequest, GetGoalResponse, GetHydratedDeployedPromptModuleVersionRequest, GetHydratedDeployedPromptModuleVersionResponse, GetMultiAssistantRequest, GetMultiAssistantRequestOptions, GetMultiAssistantResponse, GetMultiDeployedPromptVersionRequest, GetMultiDeployedPromptVersionResponse, GetMultiFunctionRequest, GetMultiFunctionResponse, GetMultiGoalRequest, GetMultiGoalResponse, GetMultiHydratedDeployedPromptModuleVersionRequest, GetMultiHydratedDeployedPromptModuleVersionResponse, GetPromptModuleRequest, GetPromptModuleResponse, GetPromptModuleVersionRequest, GetPromptModuleVersionResponse, GetPromptRequest, GetPromptResponse, GetPromptVersionRequest, GetPromptVersionResponse, 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, ListGoalsResponse, ListMCPToolsRequest, ListMCPToolsResponse, ListMCPsRequest, ListMCPsRequestFilters, ListMCPsResponse, ListPromptModuleRequest, ListPromptModuleRequestFilters, ListPromptModuleResponse, ListPromptModuleVersionsRequest, ListPromptModuleVersionsResponse, ListPromptRequest, ListPromptResponse, ListPromptVersionsRequest, ListPromptVersionsResponse, ListTestCasesByAssistantRequest, ListTestCasesByAssistantResponse, ListTestRunsByAssistantRequest, ListTestRunsByAssistantResponse, MCP, MCPOptions, Model, ModelConfig, ModelType, ModelVendor, Namespace, NamespaceAccountGroupNamespace, NamespaceGlobalNamespace, NamespacePartnerNamespace, NamespaceSystemNamespace, OpenAIRealtimeConfig, OpenAIRealtimeConfigTurnDetection, PagedRequestOptions, PagedResponseMetadata, Prompt, PromptApiService, PromptModule, PromptModuleApiService, PromptModuleKey, PromptModuleVersion, PromptVersion, RunTestsRequest, RunTestsResponse, SetAssistantConnectionsRequest, SetAssistantConnectionsRequestConnectionState, SortDirection, SortOptions, TestCase, TestResult, TestResultCitation, TestRun, UpdateAssistantRequest, UpdateGoalRequest, UpdatePromptModuleRequest, UpdatePromptRequest, UpsertAssistantRequest, UpsertAssistantRequestOptions, UpsertAssistantResponse, UpsertConnectionRequest, UpsertFunctionRequest, UpsertGoalRequest, UpsertMCPRequest, UpsertTestCasesRequest, VendorModel };
5933
+ export { Access, Action, 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, CreatePromptRequest, DeepgramConfig, DeleteAssistantRequest, DeleteConnectionRequest, DeleteFunctionRequest, DeleteGoalRequest, DeleteMCPRequest, DeletePromptModuleRequest, DeletePromptRequest, DeleteTestCasesRequest, DeployPromptModuleRequest, DeployPromptRequest, Effect, ElevenLabsConfig, ExecuteFunctionRequest, ExecuteFunctionResponse, FieldMask, Function, FunctionApiService, FunctionAuthStrategy, FunctionAuthStrategyConnectedIntegrationAuthStrategy, FunctionAuthStrategyPlatformManagedFunctionAuthStrategy, FunctionAuthStrategyUnspecifiedFunctionAuthStrategy, FunctionHeader, FunctionKey, FunctionParameter, FunctionParameterParameterLocation, GenerateChatAnswerRequest, GenerateChatAnswerRequestOptions, GenerateChatAnswerResponse, GetAssistantRequest, GetAssistantRequestOptions, GetAssistantResponse, GetChatAnswerFunctionExecutionJobRequest, GetChatAnswerFunctionExecutionJobResponse, GetConnectionRequest, GetConnectionResponse, GetDeployedPromptModuleVersionRequest, GetDeployedPromptModuleVersionResponse, GetDeployedPromptVersionRequest, GetDeployedPromptVersionResponse, GetFunctionRequest, GetFunctionResponse, GetGoalRequest, GetGoalResponse, GetHydratedDeployedPromptModuleVersionRequest, GetHydratedDeployedPromptModuleVersionResponse, GetMultiAssistantRequest, GetMultiAssistantRequestOptions, GetMultiAssistantResponse, GetMultiDeployedPromptVersionRequest, GetMultiDeployedPromptVersionResponse, GetMultiFunctionRequest, GetMultiFunctionResponse, GetMultiGoalRequest, GetMultiGoalResponse, GetMultiHydratedDeployedPromptModuleVersionRequest, GetMultiHydratedDeployedPromptModuleVersionResponse, GetPromptModuleRequest, GetPromptModuleResponse, GetPromptModuleVersionRequest, GetPromptModuleVersionResponse, GetPromptRequest, GetPromptResponse, GetPromptVersionRequest, GetPromptVersionResponse, 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, ListGoalsResponse, ListMCPToolsRequest, ListMCPToolsResponse, ListMCPsRequest, ListMCPsRequestFilters, ListMCPsResponse, ListPromptModuleRequest, ListPromptModuleRequestFilters, ListPromptModuleResponse, ListPromptModuleVersionsRequest, ListPromptModuleVersionsResponse, ListPromptRequest, ListPromptResponse, ListPromptVersionsRequest, ListPromptVersionsResponse, ListTestCasesByAssistantRequest, ListTestCasesByAssistantResponse, ListTestRunsByAssistantRequest, ListTestRunsByAssistantResponse, MCP, MCPOptions, Model, ModelConfig, ModelType, ModelVendor, Namespace, NamespaceAccountGroupNamespace, NamespaceGlobalNamespace, NamespacePartnerNamespace, NamespaceSystemNamespace, NamespaceType, OpenAIRealtimeConfig, OpenAIRealtimeConfigTurnDetection, PagedRequestOptions, PagedResponseMetadata, Prompt, PromptApiService, PromptModule, PromptModuleApiService, PromptModuleKey, PromptModuleVersion, PromptVersion, RunTestsRequest, RunTestsResponse, Scope, SetAssistantConnectionsRequest, SetAssistantConnectionsRequestConnectionState, SortDirection, SortOptions, TestCase, TestResult, TestResultCitation, TestRun, UpdateAssistantRequest, UpdateGoalRequest, UpdatePromptModuleRequest, UpdatePromptRequest, UpsertAssistantRequest, UpsertAssistantRequestOptions, UpsertAssistantResponse, UpsertConnectionRequest, UpsertFunctionRequest, UpsertGoalRequest, UpsertMCPRequest, UpsertTestCasesRequest, ValidatePromptModuleRequest, ValidatePromptModuleResponse, VendorModel };
5662
5934
  //# sourceMappingURL=vendasta-ai-assistants.mjs.map