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