@vendasta/ai-assistants 0.14.0 → 0.16.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.
@@ -71,6 +71,7 @@ var VendorModel;
71
71
  (function (VendorModel) {
72
72
  VendorModel[VendorModel["VENDOR_MODEL_UNSPECIFIED"] = 0] = "VENDOR_MODEL_UNSPECIFIED";
73
73
  VendorModel[VendorModel["VENDOR_MODEL_OPEN_AI_REALTIME"] = 1] = "VENDOR_MODEL_OPEN_AI_REALTIME";
74
+ VendorModel[VendorModel["VENDOR_MODEL_DEEPGRAM"] = 2] = "VENDOR_MODEL_DEEPGRAM";
74
75
  })(VendorModel || (VendorModel = {}));
75
76
 
76
77
  // *********************************
@@ -92,6 +93,7 @@ var ChatChannel;
92
93
  ChatChannel[ChatChannel["CHAT_CHANNEL_UNSPECIFIED"] = 1] = "CHAT_CHANNEL_UNSPECIFIED";
93
94
  ChatChannel[ChatChannel["CHAT_CHANNEL_WEB"] = 2] = "CHAT_CHANNEL_WEB";
94
95
  ChatChannel[ChatChannel["CHAT_CHANNEL_SMS"] = 3] = "CHAT_CHANNEL_SMS";
96
+ ChatChannel[ChatChannel["CHAT_CHANNEL_WHATSAPP"] = 4] = "CHAT_CHANNEL_WHATSAPP";
95
97
  })(ChatChannel || (ChatChannel = {}));
96
98
  var ChatMessageRole;
97
99
  (function (ChatMessageRole) {
@@ -622,10 +624,10 @@ class Goal {
622
624
  m.type = enumStringToValue$7(GoalType, proto.type);
623
625
  }
624
626
  if (proto.promptModules) {
625
- m.promptModules = proto.promptModules.map(PromptModuleKey.fromProto);
627
+ m.promptModules = proto.promptModules.map(PromptModule.fromProto);
626
628
  }
627
629
  if (proto.functions) {
628
- m.functions = proto.functions.map(FunctionKey.fromProto);
630
+ m.functions = proto.functions.map(Function.fromProto);
629
631
  }
630
632
  if (proto.updated) {
631
633
  m.updated = new Date(proto.updated);
@@ -818,8 +820,8 @@ class ConfigurableGoal {
818
820
  static fromProto(proto) {
819
821
  let m = new ConfigurableGoal();
820
822
  m = Object.assign(m, proto);
821
- if (proto.goalKey) {
822
- m.goalKey = GoalKey.fromProto(proto.goalKey);
823
+ if (proto.goal) {
824
+ m.goal = Goal.fromProto(proto.goal);
823
825
  }
824
826
  return m;
825
827
  }
@@ -831,8 +833,28 @@ class ConfigurableGoal {
831
833
  }
832
834
  toApiJson() {
833
835
  const toReturn = {};
834
- if (typeof this.goalKey !== 'undefined' && this.goalKey !== null) {
835
- toReturn['goalKey'] = 'toApiJson' in this.goalKey ? this.goalKey.toApiJson() : this.goalKey;
836
+ if (typeof this.goal !== 'undefined' && this.goal !== null) {
837
+ toReturn['goal'] = 'toApiJson' in this.goal ? this.goal.toApiJson() : this.goal;
838
+ }
839
+ return toReturn;
840
+ }
841
+ }
842
+ class DeepgramConfig {
843
+ static fromProto(proto) {
844
+ let m = new DeepgramConfig();
845
+ m = Object.assign(m, proto);
846
+ return m;
847
+ }
848
+ constructor(kwargs) {
849
+ if (!kwargs) {
850
+ return;
851
+ }
852
+ Object.assign(this, kwargs);
853
+ }
854
+ toApiJson() {
855
+ const toReturn = {};
856
+ if (typeof this.voice !== 'undefined') {
857
+ toReturn['voice'] = this.voice;
836
858
  }
837
859
  return toReturn;
838
860
  }
@@ -867,6 +889,9 @@ class ModelConfig {
867
889
  if (proto.openaiRealtimeConfig) {
868
890
  m.openaiRealtimeConfig = OpenAIRealtimeConfig.fromProto(proto.openaiRealtimeConfig);
869
891
  }
892
+ if (proto.deepgramConfig) {
893
+ m.deepgramConfig = DeepgramConfig.fromProto(proto.deepgramConfig);
894
+ }
870
895
  return m;
871
896
  }
872
897
  constructor(kwargs) {
@@ -880,6 +905,9 @@ class ModelConfig {
880
905
  if (typeof this.openaiRealtimeConfig !== 'undefined' && this.openaiRealtimeConfig !== null) {
881
906
  toReturn['openaiRealtimeConfig'] = 'toApiJson' in this.openaiRealtimeConfig ? this.openaiRealtimeConfig.toApiJson() : this.openaiRealtimeConfig;
882
907
  }
908
+ if (typeof this.deepgramConfig !== 'undefined' && this.deepgramConfig !== null) {
909
+ toReturn['deepgramConfig'] = 'toApiJson' in this.deepgramConfig ? this.deepgramConfig.toApiJson() : this.deepgramConfig;
910
+ }
883
911
  return toReturn;
884
912
  }
885
913
  }
@@ -1650,19 +1678,13 @@ class DeployPromptRequest {
1650
1678
  return toReturn;
1651
1679
  }
1652
1680
  }
1653
- class ListGoalsRequestFilters {
1681
+ class ListPromptModuleRequestFilters {
1654
1682
  static fromProto(proto) {
1655
- let m = new ListGoalsRequestFilters();
1683
+ let m = new ListPromptModuleRequestFilters();
1656
1684
  m = Object.assign(m, proto);
1657
1685
  if (proto.namespace) {
1658
1686
  m.namespace = Namespace.fromProto(proto.namespace);
1659
1687
  }
1660
- if (proto.type) {
1661
- m.type = enumStringToValue(GoalType, proto.type);
1662
- }
1663
- if (proto.supportedChannels) {
1664
- m.supportedChannels = proto.supportedChannels.map((v) => enumStringToValue(GoalChannel, v));
1665
- }
1666
1688
  return m;
1667
1689
  }
1668
1690
  constructor(kwargs) {
@@ -1676,22 +1698,19 @@ class ListGoalsRequestFilters {
1676
1698
  if (typeof this.namespace !== 'undefined' && this.namespace !== null) {
1677
1699
  toReturn['namespace'] = 'toApiJson' in this.namespace ? this.namespace.toApiJson() : this.namespace;
1678
1700
  }
1679
- if (typeof this.type !== 'undefined') {
1680
- toReturn['type'] = this.type;
1681
- }
1682
- if (typeof this.supportedChannels !== 'undefined') {
1683
- toReturn['supportedChannels'] = this.supportedChannels;
1684
- }
1685
1701
  return toReturn;
1686
1702
  }
1687
1703
  }
1688
- class ListFunctionRequestFilters {
1704
+ class ListConnectionsRequestFilters {
1689
1705
  static fromProto(proto) {
1690
- let m = new ListFunctionRequestFilters();
1706
+ let m = new ListConnectionsRequestFilters();
1691
1707
  m = Object.assign(m, proto);
1692
1708
  if (proto.namespace) {
1693
1709
  m.namespace = Namespace.fromProto(proto.namespace);
1694
1710
  }
1711
+ if (proto.assistantType) {
1712
+ m.assistantType = enumStringToValue(AssistantType, proto.assistantType);
1713
+ }
1695
1714
  return m;
1696
1715
  }
1697
1716
  constructor(kwargs) {
@@ -1705,19 +1724,19 @@ class ListFunctionRequestFilters {
1705
1724
  if (typeof this.namespace !== 'undefined' && this.namespace !== null) {
1706
1725
  toReturn['namespace'] = 'toApiJson' in this.namespace ? this.namespace.toApiJson() : this.namespace;
1707
1726
  }
1727
+ if (typeof this.assistantType !== 'undefined') {
1728
+ toReturn['assistantType'] = this.assistantType;
1729
+ }
1708
1730
  return toReturn;
1709
1731
  }
1710
1732
  }
1711
- class ListAssistantRequestFilters {
1733
+ class ListFunctionRequestFilters {
1712
1734
  static fromProto(proto) {
1713
- let m = new ListAssistantRequestFilters();
1735
+ let m = new ListFunctionRequestFilters();
1714
1736
  m = Object.assign(m, proto);
1715
1737
  if (proto.namespace) {
1716
1738
  m.namespace = Namespace.fromProto(proto.namespace);
1717
1739
  }
1718
- if (proto.type) {
1719
- m.type = enumStringToValue(AssistantType, proto.type);
1720
- }
1721
1740
  return m;
1722
1741
  }
1723
1742
  constructor(kwargs) {
@@ -1731,18 +1750,21 @@ class ListAssistantRequestFilters {
1731
1750
  if (typeof this.namespace !== 'undefined' && this.namespace !== null) {
1732
1751
  toReturn['namespace'] = 'toApiJson' in this.namespace ? this.namespace.toApiJson() : this.namespace;
1733
1752
  }
1734
- if (typeof this.type !== 'undefined') {
1735
- toReturn['type'] = this.type;
1736
- }
1737
1753
  return toReturn;
1738
1754
  }
1739
1755
  }
1740
- class ListAllAssistantsAssociatedToConnectionRequestFilters {
1756
+ class ListGoalsRequestFilters {
1741
1757
  static fromProto(proto) {
1742
- let m = new ListAllAssistantsAssociatedToConnectionRequestFilters();
1758
+ let m = new ListGoalsRequestFilters();
1743
1759
  m = Object.assign(m, proto);
1760
+ if (proto.namespace) {
1761
+ m.namespace = Namespace.fromProto(proto.namespace);
1762
+ }
1744
1763
  if (proto.type) {
1745
- m.type = enumStringToValue(AssistantType, proto.type);
1764
+ m.type = enumStringToValue(GoalType, proto.type);
1765
+ }
1766
+ if (proto.supportedChannels) {
1767
+ m.supportedChannels = proto.supportedChannels.map((v) => enumStringToValue(GoalChannel, v));
1746
1768
  }
1747
1769
  return m;
1748
1770
  }
@@ -1754,21 +1776,24 @@ class ListAllAssistantsAssociatedToConnectionRequestFilters {
1754
1776
  }
1755
1777
  toApiJson() {
1756
1778
  const toReturn = {};
1779
+ if (typeof this.namespace !== 'undefined' && this.namespace !== null) {
1780
+ toReturn['namespace'] = 'toApiJson' in this.namespace ? this.namespace.toApiJson() : this.namespace;
1781
+ }
1757
1782
  if (typeof this.type !== 'undefined') {
1758
1783
  toReturn['type'] = this.type;
1759
1784
  }
1785
+ if (typeof this.supportedChannels !== 'undefined') {
1786
+ toReturn['supportedChannels'] = this.supportedChannels;
1787
+ }
1760
1788
  return toReturn;
1761
1789
  }
1762
1790
  }
1763
- class ListConnectionsRequestFilters {
1791
+ class ListAllAssistantsAssociatedToConnectionRequestFilters {
1764
1792
  static fromProto(proto) {
1765
- let m = new ListConnectionsRequestFilters();
1793
+ let m = new ListAllAssistantsAssociatedToConnectionRequestFilters();
1766
1794
  m = Object.assign(m, proto);
1767
- if (proto.namespace) {
1768
- m.namespace = Namespace.fromProto(proto.namespace);
1769
- }
1770
- if (proto.assistantType) {
1771
- m.assistantType = enumStringToValue(AssistantType, proto.assistantType);
1795
+ if (proto.type) {
1796
+ m.type = enumStringToValue(AssistantType, proto.type);
1772
1797
  }
1773
1798
  return m;
1774
1799
  }
@@ -1780,22 +1805,22 @@ class ListConnectionsRequestFilters {
1780
1805
  }
1781
1806
  toApiJson() {
1782
1807
  const toReturn = {};
1783
- if (typeof this.namespace !== 'undefined' && this.namespace !== null) {
1784
- toReturn['namespace'] = 'toApiJson' in this.namespace ? this.namespace.toApiJson() : this.namespace;
1785
- }
1786
- if (typeof this.assistantType !== 'undefined') {
1787
- toReturn['assistantType'] = this.assistantType;
1808
+ if (typeof this.type !== 'undefined') {
1809
+ toReturn['type'] = this.type;
1788
1810
  }
1789
1811
  return toReturn;
1790
1812
  }
1791
1813
  }
1792
- class ListPromptModuleRequestFilters {
1814
+ class ListAssistantRequestFilters {
1793
1815
  static fromProto(proto) {
1794
- let m = new ListPromptModuleRequestFilters();
1816
+ let m = new ListAssistantRequestFilters();
1795
1817
  m = Object.assign(m, proto);
1796
1818
  if (proto.namespace) {
1797
1819
  m.namespace = Namespace.fromProto(proto.namespace);
1798
1820
  }
1821
+ if (proto.type) {
1822
+ m.type = enumStringToValue(AssistantType, proto.type);
1823
+ }
1799
1824
  return m;
1800
1825
  }
1801
1826
  constructor(kwargs) {
@@ -1809,6 +1834,9 @@ class ListPromptModuleRequestFilters {
1809
1834
  if (typeof this.namespace !== 'undefined' && this.namespace !== null) {
1810
1835
  toReturn['namespace'] = 'toApiJson' in this.namespace ? this.namespace.toApiJson() : this.namespace;
1811
1836
  }
1837
+ if (typeof this.type !== 'undefined') {
1838
+ toReturn['type'] = this.type;
1839
+ }
1812
1840
  return toReturn;
1813
1841
  }
1814
1842
  }
@@ -3237,6 +3265,26 @@ class CreatePromptModuleVersionRequestOptions {
3237
3265
  return toReturn;
3238
3266
  }
3239
3267
  }
3268
+ class UpsertAssistantRequestOptions {
3269
+ static fromProto(proto) {
3270
+ let m = new UpsertAssistantRequestOptions();
3271
+ m = Object.assign(m, proto);
3272
+ return m;
3273
+ }
3274
+ constructor(kwargs) {
3275
+ if (!kwargs) {
3276
+ return;
3277
+ }
3278
+ Object.assign(this, kwargs);
3279
+ }
3280
+ toApiJson() {
3281
+ const toReturn = {};
3282
+ if (typeof this.applyDefaults !== 'undefined') {
3283
+ toReturn['applyDefaults'] = this.applyDefaults;
3284
+ }
3285
+ return toReturn;
3286
+ }
3287
+ }
3240
3288
  class SetAssistantConnectionsRequest {
3241
3289
  static fromProto(proto) {
3242
3290
  let m = new SetAssistantConnectionsRequest();
@@ -3331,6 +3379,9 @@ class UpsertAssistantRequest {
3331
3379
  if (proto.assistant) {
3332
3380
  m.assistant = Assistant.fromProto(proto.assistant);
3333
3381
  }
3382
+ if (proto.options) {
3383
+ m.options = UpsertAssistantRequestOptions.fromProto(proto.options);
3384
+ }
3334
3385
  return m;
3335
3386
  }
3336
3387
  constructor(kwargs) {
@@ -3344,6 +3395,9 @@ class UpsertAssistantRequest {
3344
3395
  if (typeof this.assistant !== 'undefined' && this.assistant !== null) {
3345
3396
  toReturn['assistant'] = 'toApiJson' in this.assistant ? this.assistant.toApiJson() : this.assistant;
3346
3397
  }
3398
+ if (typeof this.options !== 'undefined' && this.options !== null) {
3399
+ toReturn['options'] = 'toApiJson' in this.options ? this.options.toApiJson() : this.options;
3400
+ }
3347
3401
  return toReturn;
3348
3402
  }
3349
3403
  }
@@ -3829,5 +3883,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
3829
3883
  * Generated bundle index. Do not edit.
3830
3884
  */
3831
3885
 
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 };
3886
+ export { Access, Assistant, AssistantApiService, AssistantKey, AssistantType, ChatAnswerFunctionExecutionJob, ChatAnswerFunctionExecutionJobResult, ChatAnswerFunctionExecutionJobStatus, ChatChannel, ChatMessage, ChatMessageRole, ChatUserInfo, Config, ConfigInboxConfig, ConfigVoiceConfig, ConfigurableGoal, Connection, ConnectionApiService, ConnectionKey, CreatePromptModuleRequest, CreatePromptModuleVersionRequest, CreatePromptModuleVersionRequestOptions, CreatePromptRequest, DeepgramConfig, 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, UpsertAssistantRequestOptions, UpsertAssistantResponse, UpsertConnectionRequest, UpsertFunctionRequest, UpsertGoalRequest, VendorModel };
3833
3887
  //# sourceMappingURL=vendasta-ai-assistants.mjs.map