@vendasta/ai-assistants 0.12.0 → 0.14.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.
@@ -67,6 +67,11 @@ var AssistantType;
67
67
  AssistantType[AssistantType["ASSISTANT_TYPE_SOCIAL_MARKETING"] = 3] = "ASSISTANT_TYPE_SOCIAL_MARKETING";
68
68
  AssistantType[AssistantType["ASSISTANT_TYPE_VOICE_RECEPTIONIST"] = 4] = "ASSISTANT_TYPE_VOICE_RECEPTIONIST";
69
69
  })(AssistantType || (AssistantType = {}));
70
+ var VendorModel;
71
+ (function (VendorModel) {
72
+ VendorModel[VendorModel["VENDOR_MODEL_UNSPECIFIED"] = 0] = "VENDOR_MODEL_UNSPECIFIED";
73
+ VendorModel[VendorModel["VENDOR_MODEL_OPEN_AI_REALTIME"] = 1] = "VENDOR_MODEL_OPEN_AI_REALTIME";
74
+ })(VendorModel || (VendorModel = {}));
70
75
 
71
76
  // *********************************
72
77
  // Code generated by sdkgen
@@ -787,6 +792,9 @@ class Config {
787
792
  if (proto.inboxConfig) {
788
793
  m.inboxConfig = ConfigInboxConfig.fromProto(proto.inboxConfig);
789
794
  }
795
+ if (proto.voiceConfig) {
796
+ m.voiceConfig = ConfigVoiceConfig.fromProto(proto.voiceConfig);
797
+ }
790
798
  return m;
791
799
  }
792
800
  constructor(kwargs) {
@@ -800,6 +808,9 @@ class Config {
800
808
  if (typeof this.inboxConfig !== 'undefined' && this.inboxConfig !== null) {
801
809
  toReturn['inboxConfig'] = 'toApiJson' in this.inboxConfig ? this.inboxConfig.toApiJson() : this.inboxConfig;
802
810
  }
811
+ if (typeof this.voiceConfig !== 'undefined' && this.voiceConfig !== null) {
812
+ toReturn['voiceConfig'] = 'toApiJson' in this.voiceConfig ? this.voiceConfig.toApiJson() : this.voiceConfig;
813
+ }
803
814
  return toReturn;
804
815
  }
805
816
  }
@@ -849,6 +860,110 @@ class ConfigInboxConfig {
849
860
  return toReturn;
850
861
  }
851
862
  }
863
+ class ModelConfig {
864
+ static fromProto(proto) {
865
+ let m = new ModelConfig();
866
+ m = Object.assign(m, proto);
867
+ if (proto.openaiRealtimeConfig) {
868
+ m.openaiRealtimeConfig = OpenAIRealtimeConfig.fromProto(proto.openaiRealtimeConfig);
869
+ }
870
+ return m;
871
+ }
872
+ constructor(kwargs) {
873
+ if (!kwargs) {
874
+ return;
875
+ }
876
+ Object.assign(this, kwargs);
877
+ }
878
+ toApiJson() {
879
+ const toReturn = {};
880
+ if (typeof this.openaiRealtimeConfig !== 'undefined' && this.openaiRealtimeConfig !== null) {
881
+ toReturn['openaiRealtimeConfig'] = 'toApiJson' in this.openaiRealtimeConfig ? this.openaiRealtimeConfig.toApiJson() : this.openaiRealtimeConfig;
882
+ }
883
+ return toReturn;
884
+ }
885
+ }
886
+ class OpenAIRealtimeConfig {
887
+ static fromProto(proto) {
888
+ let m = new OpenAIRealtimeConfig();
889
+ m = Object.assign(m, proto);
890
+ if (proto.turnDetection) {
891
+ m.turnDetection = OpenAIRealtimeConfigTurnDetection.fromProto(proto.turnDetection);
892
+ }
893
+ return m;
894
+ }
895
+ constructor(kwargs) {
896
+ if (!kwargs) {
897
+ return;
898
+ }
899
+ Object.assign(this, kwargs);
900
+ }
901
+ toApiJson() {
902
+ const toReturn = {};
903
+ if (typeof this.voice !== 'undefined') {
904
+ toReturn['voice'] = this.voice;
905
+ }
906
+ if (typeof this.turnDetection !== 'undefined' && this.turnDetection !== null) {
907
+ toReturn['turnDetection'] = 'toApiJson' in this.turnDetection ? this.turnDetection.toApiJson() : this.turnDetection;
908
+ }
909
+ return toReturn;
910
+ }
911
+ }
912
+ class OpenAIRealtimeConfigTurnDetection {
913
+ static fromProto(proto) {
914
+ let m = new OpenAIRealtimeConfigTurnDetection();
915
+ m = Object.assign(m, proto);
916
+ return m;
917
+ }
918
+ constructor(kwargs) {
919
+ if (!kwargs) {
920
+ return;
921
+ }
922
+ Object.assign(this, kwargs);
923
+ }
924
+ toApiJson() {
925
+ const toReturn = {};
926
+ if (typeof this.threshold !== 'undefined') {
927
+ toReturn['threshold'] = this.threshold;
928
+ }
929
+ if (typeof this.prefixPadding !== 'undefined') {
930
+ toReturn['prefixPadding'] = this.prefixPadding;
931
+ }
932
+ if (typeof this.silenceDuration !== 'undefined') {
933
+ toReturn['silenceDuration'] = this.silenceDuration;
934
+ }
935
+ return toReturn;
936
+ }
937
+ }
938
+ class ConfigVoiceConfig {
939
+ static fromProto(proto) {
940
+ let m = new ConfigVoiceConfig();
941
+ m = Object.assign(m, proto);
942
+ if (proto.vendorModel) {
943
+ m.vendorModel = enumStringToValue$6(VendorModel, proto.vendorModel);
944
+ }
945
+ if (proto.modelConfig) {
946
+ m.modelConfig = ModelConfig.fromProto(proto.modelConfig);
947
+ }
948
+ return m;
949
+ }
950
+ constructor(kwargs) {
951
+ if (!kwargs) {
952
+ return;
953
+ }
954
+ Object.assign(this, kwargs);
955
+ }
956
+ toApiJson() {
957
+ const toReturn = {};
958
+ if (typeof this.vendorModel !== 'undefined') {
959
+ toReturn['vendorModel'] = this.vendorModel;
960
+ }
961
+ if (typeof this.modelConfig !== 'undefined' && this.modelConfig !== null) {
962
+ toReturn['modelConfig'] = 'toApiJson' in this.modelConfig ? this.modelConfig.toApiJson() : this.modelConfig;
963
+ }
964
+ return toReturn;
965
+ }
966
+ }
852
967
 
853
968
  function enumStringToValue$5(enumRef, value) {
854
969
  if (typeof value === 'number') {
@@ -1276,6 +1391,9 @@ class CreatePromptModuleVersionRequest {
1276
1391
  if (proto.namespace) {
1277
1392
  m.namespace = Namespace.fromProto(proto.namespace);
1278
1393
  }
1394
+ if (proto.options) {
1395
+ m.options = CreatePromptModuleVersionRequestOptions.fromProto(proto.options);
1396
+ }
1279
1397
  return m;
1280
1398
  }
1281
1399
  constructor(kwargs) {
@@ -1295,6 +1413,9 @@ class CreatePromptModuleVersionRequest {
1295
1413
  if (typeof this.content !== 'undefined') {
1296
1414
  toReturn['content'] = this.content;
1297
1415
  }
1416
+ if (typeof this.options !== 'undefined' && this.options !== null) {
1417
+ toReturn['options'] = 'toApiJson' in this.options ? this.options.toApiJson() : this.options;
1418
+ }
1298
1419
  return toReturn;
1299
1420
  }
1300
1421
  }
@@ -1564,9 +1685,9 @@ class ListGoalsRequestFilters {
1564
1685
  return toReturn;
1565
1686
  }
1566
1687
  }
1567
- class ListPromptModuleRequestFilters {
1688
+ class ListFunctionRequestFilters {
1568
1689
  static fromProto(proto) {
1569
- let m = new ListPromptModuleRequestFilters();
1690
+ let m = new ListFunctionRequestFilters();
1570
1691
  m = Object.assign(m, proto);
1571
1692
  if (proto.namespace) {
1572
1693
  m.namespace = Namespace.fromProto(proto.namespace);
@@ -1587,13 +1708,16 @@ class ListPromptModuleRequestFilters {
1587
1708
  return toReturn;
1588
1709
  }
1589
1710
  }
1590
- class ListFunctionRequestFilters {
1711
+ class ListAssistantRequestFilters {
1591
1712
  static fromProto(proto) {
1592
- let m = new ListFunctionRequestFilters();
1713
+ let m = new ListAssistantRequestFilters();
1593
1714
  m = Object.assign(m, proto);
1594
1715
  if (proto.namespace) {
1595
1716
  m.namespace = Namespace.fromProto(proto.namespace);
1596
1717
  }
1718
+ if (proto.type) {
1719
+ m.type = enumStringToValue(AssistantType, proto.type);
1720
+ }
1597
1721
  return m;
1598
1722
  }
1599
1723
  constructor(kwargs) {
@@ -1607,6 +1731,9 @@ class ListFunctionRequestFilters {
1607
1731
  if (typeof this.namespace !== 'undefined' && this.namespace !== null) {
1608
1732
  toReturn['namespace'] = 'toApiJson' in this.namespace ? this.namespace.toApiJson() : this.namespace;
1609
1733
  }
1734
+ if (typeof this.type !== 'undefined') {
1735
+ toReturn['type'] = this.type;
1736
+ }
1610
1737
  return toReturn;
1611
1738
  }
1612
1739
  }
@@ -1633,15 +1760,15 @@ class ListAllAssistantsAssociatedToConnectionRequestFilters {
1633
1760
  return toReturn;
1634
1761
  }
1635
1762
  }
1636
- class ListAssistantRequestFilters {
1763
+ class ListConnectionsRequestFilters {
1637
1764
  static fromProto(proto) {
1638
- let m = new ListAssistantRequestFilters();
1765
+ let m = new ListConnectionsRequestFilters();
1639
1766
  m = Object.assign(m, proto);
1640
1767
  if (proto.namespace) {
1641
1768
  m.namespace = Namespace.fromProto(proto.namespace);
1642
1769
  }
1643
- if (proto.type) {
1644
- m.type = enumStringToValue(AssistantType, proto.type);
1770
+ if (proto.assistantType) {
1771
+ m.assistantType = enumStringToValue(AssistantType, proto.assistantType);
1645
1772
  }
1646
1773
  return m;
1647
1774
  }
@@ -1656,22 +1783,19 @@ class ListAssistantRequestFilters {
1656
1783
  if (typeof this.namespace !== 'undefined' && this.namespace !== null) {
1657
1784
  toReturn['namespace'] = 'toApiJson' in this.namespace ? this.namespace.toApiJson() : this.namespace;
1658
1785
  }
1659
- if (typeof this.type !== 'undefined') {
1660
- toReturn['type'] = this.type;
1786
+ if (typeof this.assistantType !== 'undefined') {
1787
+ toReturn['assistantType'] = this.assistantType;
1661
1788
  }
1662
1789
  return toReturn;
1663
1790
  }
1664
1791
  }
1665
- class ListConnectionsRequestFilters {
1792
+ class ListPromptModuleRequestFilters {
1666
1793
  static fromProto(proto) {
1667
- let m = new ListConnectionsRequestFilters();
1794
+ let m = new ListPromptModuleRequestFilters();
1668
1795
  m = Object.assign(m, proto);
1669
1796
  if (proto.namespace) {
1670
1797
  m.namespace = Namespace.fromProto(proto.namespace);
1671
1798
  }
1672
- if (proto.assistantType) {
1673
- m.assistantType = enumStringToValue(AssistantType, proto.assistantType);
1674
- }
1675
1799
  return m;
1676
1800
  }
1677
1801
  constructor(kwargs) {
@@ -1685,9 +1809,6 @@ class ListConnectionsRequestFilters {
1685
1809
  if (typeof this.namespace !== 'undefined' && this.namespace !== null) {
1686
1810
  toReturn['namespace'] = 'toApiJson' in this.namespace ? this.namespace.toApiJson() : this.namespace;
1687
1811
  }
1688
- if (typeof this.assistantType !== 'undefined') {
1689
- toReturn['assistantType'] = this.assistantType;
1690
- }
1691
1812
  return toReturn;
1692
1813
  }
1693
1814
  }
@@ -3096,6 +3217,26 @@ class GenerateChatAnswerRequestOptions {
3096
3217
  return toReturn;
3097
3218
  }
3098
3219
  }
3220
+ class CreatePromptModuleVersionRequestOptions {
3221
+ static fromProto(proto) {
3222
+ let m = new CreatePromptModuleVersionRequestOptions();
3223
+ m = Object.assign(m, proto);
3224
+ return m;
3225
+ }
3226
+ constructor(kwargs) {
3227
+ if (!kwargs) {
3228
+ return;
3229
+ }
3230
+ Object.assign(this, kwargs);
3231
+ }
3232
+ toApiJson() {
3233
+ const toReturn = {};
3234
+ if (typeof this.shouldDeploy !== 'undefined') {
3235
+ toReturn['shouldDeploy'] = this.shouldDeploy;
3236
+ }
3237
+ return toReturn;
3238
+ }
3239
+ }
3099
3240
  class SetAssistantConnectionsRequest {
3100
3241
  static fromProto(proto) {
3101
3242
  let m = new SetAssistantConnectionsRequest();
@@ -3688,5 +3829,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
3688
3829
  * Generated bundle index. Do not edit.
3689
3830
  */
3690
3831
 
3691
- export { Access, Assistant, AssistantApiService, AssistantKey, AssistantType, ChatAnswerFunctionExecutionJob, ChatAnswerFunctionExecutionJobResult, ChatAnswerFunctionExecutionJobStatus, ChatChannel, ChatMessage, ChatMessageRole, ChatUserInfo, Config, ConfigInboxConfig, ConfigurableGoal, Connection, ConnectionApiService, ConnectionKey, CreatePromptModuleRequest, CreatePromptModuleVersionRequest, CreatePromptRequest, DeleteAssistantRequest, DeleteConnectionRequest, DeleteFunctionRequest, DeleteGoalRequest, DeletePromptModuleRequest, DeletePromptRequest, DeployPromptModuleRequest, DeployPromptRequest, Function, FunctionApiService, FunctionKey, FunctionParameter, GenerateChatAnswerRequest, GenerateChatAnswerRequestOptions, GenerateChatAnswerResponse, GetAssistantRequest, GetAssistantResponse, GetChatAnswerFunctionExecutionJobRequest, GetChatAnswerFunctionExecutionJobResponse, GetConnectionRequest, GetConnectionResponse, GetDeployedPromptModuleVersionRequest, GetDeployedPromptModuleVersionResponse, GetDeployedPromptVersionRequest, GetDeployedPromptVersionResponse, GetFunctionRequest, GetFunctionResponse, GetGoalRequest, GetGoalResponse, GetHydratedDeployedPromptModuleVersionRequest, GetHydratedDeployedPromptModuleVersionResponse, GetMultiDeployedPromptVersionRequest, GetMultiDeployedPromptVersionResponse, GetMultiFunctionRequest, GetMultiFunctionResponse, GetMultiGoalRequest, GetMultiGoalResponse, GetMultiHydratedDeployedPromptModuleVersionRequest, GetMultiHydratedDeployedPromptModuleVersionResponse, GetPromptModuleRequest, GetPromptModuleResponse, GetPromptModuleVersionRequest, GetPromptModuleVersionResponse, GetPromptRequest, GetPromptResponse, GetPromptVersionRequest, GetPromptVersionResponse, Goal, GoalApiService, GoalChannel, GoalKey, GoalType, HostService, KeyValuePair, ListAllAssistantsAssociatedToConnectionRequest, ListAllAssistantsAssociatedToConnectionRequestFilters, ListAllAssistantsAssociatedToConnectionResponse, ListAssistantRequest, ListAssistantRequestFilters, ListAssistantResponse, ListConnectionsRequest, ListConnectionsRequestFilters, ListConnectionsResponse, ListFunctionRequest, ListFunctionRequestFilters, ListFunctionResponse, ListGoalsRequest, ListGoalsRequestFilters, ListGoalsResponse, ListPromptModuleRequest, ListPromptModuleRequestFilters, ListPromptModuleResponse, ListPromptModuleVersionsRequest, ListPromptModuleVersionsResponse, ListPromptRequest, ListPromptResponse, ListPromptVersionsRequest, ListPromptVersionsResponse, Namespace, NamespaceAccountGroupNamespace, NamespaceAccountGroupsForGroupNamespace, NamespaceAccountGroupsForPartnerNamespace, NamespaceGlobalNamespace, NamespacePartnerNamespace, NamespaceSystemNamespace, PagedRequestOptions, PagedResponseMetadata, Prompt, PromptApiService, PromptModule, PromptModuleApiService, PromptModuleKey, PromptModuleVersion, PromptVersion, SetAssistantConnectionsRequest, SetAssistantConnectionsRequestConnectionState, UpdatePromptModuleRequest, UpdatePromptRequest, UpsertAssistantRequest, UpsertAssistantResponse, UpsertConnectionRequest, UpsertFunctionRequest, UpsertGoalRequest };
3832
+ export { Access, Assistant, AssistantApiService, AssistantKey, AssistantType, ChatAnswerFunctionExecutionJob, ChatAnswerFunctionExecutionJobResult, ChatAnswerFunctionExecutionJobStatus, ChatChannel, ChatMessage, ChatMessageRole, ChatUserInfo, Config, ConfigInboxConfig, ConfigVoiceConfig, ConfigurableGoal, Connection, ConnectionApiService, ConnectionKey, CreatePromptModuleRequest, CreatePromptModuleVersionRequest, CreatePromptModuleVersionRequestOptions, CreatePromptRequest, DeleteAssistantRequest, DeleteConnectionRequest, DeleteFunctionRequest, DeleteGoalRequest, DeletePromptModuleRequest, DeletePromptRequest, DeployPromptModuleRequest, DeployPromptRequest, Function, FunctionApiService, FunctionKey, FunctionParameter, GenerateChatAnswerRequest, GenerateChatAnswerRequestOptions, GenerateChatAnswerResponse, GetAssistantRequest, GetAssistantResponse, GetChatAnswerFunctionExecutionJobRequest, GetChatAnswerFunctionExecutionJobResponse, GetConnectionRequest, GetConnectionResponse, GetDeployedPromptModuleVersionRequest, GetDeployedPromptModuleVersionResponse, GetDeployedPromptVersionRequest, GetDeployedPromptVersionResponse, GetFunctionRequest, GetFunctionResponse, GetGoalRequest, GetGoalResponse, GetHydratedDeployedPromptModuleVersionRequest, GetHydratedDeployedPromptModuleVersionResponse, GetMultiDeployedPromptVersionRequest, GetMultiDeployedPromptVersionResponse, GetMultiFunctionRequest, GetMultiFunctionResponse, GetMultiGoalRequest, GetMultiGoalResponse, GetMultiHydratedDeployedPromptModuleVersionRequest, GetMultiHydratedDeployedPromptModuleVersionResponse, GetPromptModuleRequest, GetPromptModuleResponse, GetPromptModuleVersionRequest, GetPromptModuleVersionResponse, GetPromptRequest, GetPromptResponse, GetPromptVersionRequest, GetPromptVersionResponse, Goal, GoalApiService, GoalChannel, GoalKey, GoalType, HostService, KeyValuePair, ListAllAssistantsAssociatedToConnectionRequest, ListAllAssistantsAssociatedToConnectionRequestFilters, ListAllAssistantsAssociatedToConnectionResponse, ListAssistantRequest, ListAssistantRequestFilters, ListAssistantResponse, ListConnectionsRequest, ListConnectionsRequestFilters, ListConnectionsResponse, ListFunctionRequest, ListFunctionRequestFilters, ListFunctionResponse, ListGoalsRequest, ListGoalsRequestFilters, ListGoalsResponse, ListPromptModuleRequest, ListPromptModuleRequestFilters, ListPromptModuleResponse, ListPromptModuleVersionsRequest, ListPromptModuleVersionsResponse, ListPromptRequest, ListPromptResponse, ListPromptVersionsRequest, ListPromptVersionsResponse, ModelConfig, Namespace, NamespaceAccountGroupNamespace, NamespaceAccountGroupsForGroupNamespace, NamespaceAccountGroupsForPartnerNamespace, NamespaceGlobalNamespace, NamespacePartnerNamespace, NamespaceSystemNamespace, OpenAIRealtimeConfig, OpenAIRealtimeConfigTurnDetection, PagedRequestOptions, PagedResponseMetadata, Prompt, PromptApiService, PromptModule, PromptModuleApiService, PromptModuleKey, PromptModuleVersion, PromptVersion, SetAssistantConnectionsRequest, SetAssistantConnectionsRequestConnectionState, UpdatePromptModuleRequest, UpdatePromptRequest, UpsertAssistantRequest, UpsertAssistantResponse, UpsertConnectionRequest, UpsertFunctionRequest, UpsertGoalRequest, VendorModel };
3692
3833
  //# sourceMappingURL=vendasta-ai-assistants.mjs.map