@vendasta/ai-assistants 0.14.0 → 0.15.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.
@@ -622,10 +622,10 @@ class Goal {
622
622
  m.type = enumStringToValue$7(GoalType, proto.type);
623
623
  }
624
624
  if (proto.promptModules) {
625
- m.promptModules = proto.promptModules.map(PromptModuleKey.fromProto);
625
+ m.promptModules = proto.promptModules.map(PromptModule.fromProto);
626
626
  }
627
627
  if (proto.functions) {
628
- m.functions = proto.functions.map(FunctionKey.fromProto);
628
+ m.functions = proto.functions.map(Function.fromProto);
629
629
  }
630
630
  if (proto.updated) {
631
631
  m.updated = new Date(proto.updated);
@@ -818,8 +818,8 @@ class ConfigurableGoal {
818
818
  static fromProto(proto) {
819
819
  let m = new ConfigurableGoal();
820
820
  m = Object.assign(m, proto);
821
- if (proto.goalKey) {
822
- m.goalKey = GoalKey.fromProto(proto.goalKey);
821
+ if (proto.goal) {
822
+ m.goal = Goal.fromProto(proto.goal);
823
823
  }
824
824
  return m;
825
825
  }
@@ -831,8 +831,8 @@ class ConfigurableGoal {
831
831
  }
832
832
  toApiJson() {
833
833
  const toReturn = {};
834
- if (typeof this.goalKey !== 'undefined' && this.goalKey !== null) {
835
- toReturn['goalKey'] = 'toApiJson' in this.goalKey ? this.goalKey.toApiJson() : this.goalKey;
834
+ if (typeof this.goal !== 'undefined' && this.goal !== null) {
835
+ toReturn['goal'] = 'toApiJson' in this.goal ? this.goal.toApiJson() : this.goal;
836
836
  }
837
837
  return toReturn;
838
838
  }
@@ -1650,19 +1650,13 @@ class DeployPromptRequest {
1650
1650
  return toReturn;
1651
1651
  }
1652
1652
  }
1653
- class ListGoalsRequestFilters {
1653
+ class ListPromptModuleRequestFilters {
1654
1654
  static fromProto(proto) {
1655
- let m = new ListGoalsRequestFilters();
1655
+ let m = new ListPromptModuleRequestFilters();
1656
1656
  m = Object.assign(m, proto);
1657
1657
  if (proto.namespace) {
1658
1658
  m.namespace = Namespace.fromProto(proto.namespace);
1659
1659
  }
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
1660
  return m;
1667
1661
  }
1668
1662
  constructor(kwargs) {
@@ -1676,22 +1670,19 @@ class ListGoalsRequestFilters {
1676
1670
  if (typeof this.namespace !== 'undefined' && this.namespace !== null) {
1677
1671
  toReturn['namespace'] = 'toApiJson' in this.namespace ? this.namespace.toApiJson() : this.namespace;
1678
1672
  }
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
1673
  return toReturn;
1686
1674
  }
1687
1675
  }
1688
- class ListFunctionRequestFilters {
1676
+ class ListConnectionsRequestFilters {
1689
1677
  static fromProto(proto) {
1690
- let m = new ListFunctionRequestFilters();
1678
+ let m = new ListConnectionsRequestFilters();
1691
1679
  m = Object.assign(m, proto);
1692
1680
  if (proto.namespace) {
1693
1681
  m.namespace = Namespace.fromProto(proto.namespace);
1694
1682
  }
1683
+ if (proto.assistantType) {
1684
+ m.assistantType = enumStringToValue(AssistantType, proto.assistantType);
1685
+ }
1695
1686
  return m;
1696
1687
  }
1697
1688
  constructor(kwargs) {
@@ -1705,19 +1696,19 @@ class ListFunctionRequestFilters {
1705
1696
  if (typeof this.namespace !== 'undefined' && this.namespace !== null) {
1706
1697
  toReturn['namespace'] = 'toApiJson' in this.namespace ? this.namespace.toApiJson() : this.namespace;
1707
1698
  }
1699
+ if (typeof this.assistantType !== 'undefined') {
1700
+ toReturn['assistantType'] = this.assistantType;
1701
+ }
1708
1702
  return toReturn;
1709
1703
  }
1710
1704
  }
1711
- class ListAssistantRequestFilters {
1705
+ class ListFunctionRequestFilters {
1712
1706
  static fromProto(proto) {
1713
- let m = new ListAssistantRequestFilters();
1707
+ let m = new ListFunctionRequestFilters();
1714
1708
  m = Object.assign(m, proto);
1715
1709
  if (proto.namespace) {
1716
1710
  m.namespace = Namespace.fromProto(proto.namespace);
1717
1711
  }
1718
- if (proto.type) {
1719
- m.type = enumStringToValue(AssistantType, proto.type);
1720
- }
1721
1712
  return m;
1722
1713
  }
1723
1714
  constructor(kwargs) {
@@ -1731,18 +1722,21 @@ class ListAssistantRequestFilters {
1731
1722
  if (typeof this.namespace !== 'undefined' && this.namespace !== null) {
1732
1723
  toReturn['namespace'] = 'toApiJson' in this.namespace ? this.namespace.toApiJson() : this.namespace;
1733
1724
  }
1734
- if (typeof this.type !== 'undefined') {
1735
- toReturn['type'] = this.type;
1736
- }
1737
1725
  return toReturn;
1738
1726
  }
1739
1727
  }
1740
- class ListAllAssistantsAssociatedToConnectionRequestFilters {
1728
+ class ListGoalsRequestFilters {
1741
1729
  static fromProto(proto) {
1742
- let m = new ListAllAssistantsAssociatedToConnectionRequestFilters();
1730
+ let m = new ListGoalsRequestFilters();
1743
1731
  m = Object.assign(m, proto);
1732
+ if (proto.namespace) {
1733
+ m.namespace = Namespace.fromProto(proto.namespace);
1734
+ }
1744
1735
  if (proto.type) {
1745
- m.type = enumStringToValue(AssistantType, proto.type);
1736
+ m.type = enumStringToValue(GoalType, proto.type);
1737
+ }
1738
+ if (proto.supportedChannels) {
1739
+ m.supportedChannels = proto.supportedChannels.map((v) => enumStringToValue(GoalChannel, v));
1746
1740
  }
1747
1741
  return m;
1748
1742
  }
@@ -1754,21 +1748,24 @@ class ListAllAssistantsAssociatedToConnectionRequestFilters {
1754
1748
  }
1755
1749
  toApiJson() {
1756
1750
  const toReturn = {};
1751
+ if (typeof this.namespace !== 'undefined' && this.namespace !== null) {
1752
+ toReturn['namespace'] = 'toApiJson' in this.namespace ? this.namespace.toApiJson() : this.namespace;
1753
+ }
1757
1754
  if (typeof this.type !== 'undefined') {
1758
1755
  toReturn['type'] = this.type;
1759
1756
  }
1757
+ if (typeof this.supportedChannels !== 'undefined') {
1758
+ toReturn['supportedChannels'] = this.supportedChannels;
1759
+ }
1760
1760
  return toReturn;
1761
1761
  }
1762
1762
  }
1763
- class ListConnectionsRequestFilters {
1763
+ class ListAllAssistantsAssociatedToConnectionRequestFilters {
1764
1764
  static fromProto(proto) {
1765
- let m = new ListConnectionsRequestFilters();
1765
+ let m = new ListAllAssistantsAssociatedToConnectionRequestFilters();
1766
1766
  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);
1767
+ if (proto.type) {
1768
+ m.type = enumStringToValue(AssistantType, proto.type);
1772
1769
  }
1773
1770
  return m;
1774
1771
  }
@@ -1780,22 +1777,22 @@ class ListConnectionsRequestFilters {
1780
1777
  }
1781
1778
  toApiJson() {
1782
1779
  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;
1780
+ if (typeof this.type !== 'undefined') {
1781
+ toReturn['type'] = this.type;
1788
1782
  }
1789
1783
  return toReturn;
1790
1784
  }
1791
1785
  }
1792
- class ListPromptModuleRequestFilters {
1786
+ class ListAssistantRequestFilters {
1793
1787
  static fromProto(proto) {
1794
- let m = new ListPromptModuleRequestFilters();
1788
+ let m = new ListAssistantRequestFilters();
1795
1789
  m = Object.assign(m, proto);
1796
1790
  if (proto.namespace) {
1797
1791
  m.namespace = Namespace.fromProto(proto.namespace);
1798
1792
  }
1793
+ if (proto.type) {
1794
+ m.type = enumStringToValue(AssistantType, proto.type);
1795
+ }
1799
1796
  return m;
1800
1797
  }
1801
1798
  constructor(kwargs) {
@@ -1809,6 +1806,9 @@ class ListPromptModuleRequestFilters {
1809
1806
  if (typeof this.namespace !== 'undefined' && this.namespace !== null) {
1810
1807
  toReturn['namespace'] = 'toApiJson' in this.namespace ? this.namespace.toApiJson() : this.namespace;
1811
1808
  }
1809
+ if (typeof this.type !== 'undefined') {
1810
+ toReturn['type'] = this.type;
1811
+ }
1812
1812
  return toReturn;
1813
1813
  }
1814
1814
  }
@@ -3237,6 +3237,26 @@ class CreatePromptModuleVersionRequestOptions {
3237
3237
  return toReturn;
3238
3238
  }
3239
3239
  }
3240
+ class UpsertAssistantRequestOptions {
3241
+ static fromProto(proto) {
3242
+ let m = new UpsertAssistantRequestOptions();
3243
+ m = Object.assign(m, proto);
3244
+ return m;
3245
+ }
3246
+ constructor(kwargs) {
3247
+ if (!kwargs) {
3248
+ return;
3249
+ }
3250
+ Object.assign(this, kwargs);
3251
+ }
3252
+ toApiJson() {
3253
+ const toReturn = {};
3254
+ if (typeof this.applyDefaults !== 'undefined') {
3255
+ toReturn['applyDefaults'] = this.applyDefaults;
3256
+ }
3257
+ return toReturn;
3258
+ }
3259
+ }
3240
3260
  class SetAssistantConnectionsRequest {
3241
3261
  static fromProto(proto) {
3242
3262
  let m = new SetAssistantConnectionsRequest();
@@ -3331,6 +3351,9 @@ class UpsertAssistantRequest {
3331
3351
  if (proto.assistant) {
3332
3352
  m.assistant = Assistant.fromProto(proto.assistant);
3333
3353
  }
3354
+ if (proto.options) {
3355
+ m.options = UpsertAssistantRequestOptions.fromProto(proto.options);
3356
+ }
3334
3357
  return m;
3335
3358
  }
3336
3359
  constructor(kwargs) {
@@ -3344,6 +3367,9 @@ class UpsertAssistantRequest {
3344
3367
  if (typeof this.assistant !== 'undefined' && this.assistant !== null) {
3345
3368
  toReturn['assistant'] = 'toApiJson' in this.assistant ? this.assistant.toApiJson() : this.assistant;
3346
3369
  }
3370
+ if (typeof this.options !== 'undefined' && this.options !== null) {
3371
+ toReturn['options'] = 'toApiJson' in this.options ? this.options.toApiJson() : this.options;
3372
+ }
3347
3373
  return toReturn;
3348
3374
  }
3349
3375
  }
@@ -3829,5 +3855,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
3829
3855
  * Generated bundle index. Do not edit.
3830
3856
  */
3831
3857
 
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 };
3858
+ 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, UpsertAssistantRequestOptions, UpsertAssistantResponse, UpsertConnectionRequest, UpsertFunctionRequest, UpsertGoalRequest, VendorModel };
3833
3859
  //# sourceMappingURL=vendasta-ai-assistants.mjs.map