@vendasta/ai-assistants 0.20.0 → 0.23.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 (31) hide show
  1. package/esm2020/lib/_internal/enums/answer.enum.mjs +3 -1
  2. package/esm2020/lib/_internal/enums/function.enum.mjs +12 -0
  3. package/esm2020/lib/_internal/enums/index.mjs +2 -1
  4. package/esm2020/lib/_internal/goal.api.service.mjs +11 -2
  5. package/esm2020/lib/_internal/interfaces/api.interface.mjs +1 -1
  6. package/esm2020/lib/_internal/interfaces/assistant.interface.mjs +1 -1
  7. package/esm2020/lib/_internal/interfaces/function.interface.mjs +1 -1
  8. package/esm2020/lib/_internal/interfaces/index.mjs +1 -1
  9. package/esm2020/lib/_internal/objects/api.mjs +130 -44
  10. package/esm2020/lib/_internal/objects/assistant.mjs +8 -30
  11. package/esm2020/lib/_internal/objects/function.mjs +8 -1
  12. package/esm2020/lib/_internal/objects/index.mjs +4 -4
  13. package/esm2020/lib/_internal/prompt-module.api.service.mjs +4 -3
  14. package/fesm2015/vendasta-ai-assistants.mjs +201 -108
  15. package/fesm2015/vendasta-ai-assistants.mjs.map +1 -1
  16. package/fesm2020/vendasta-ai-assistants.mjs +201 -108
  17. package/fesm2020/vendasta-ai-assistants.mjs.map +1 -1
  18. package/lib/_internal/enums/answer.enum.d.ts +3 -1
  19. package/lib/_internal/enums/function.enum.d.ts +4 -0
  20. package/lib/_internal/enums/index.d.ts +1 -0
  21. package/lib/_internal/goal.api.service.d.ts +4 -2
  22. package/lib/_internal/interfaces/api.interface.d.ts +24 -12
  23. package/lib/_internal/interfaces/assistant.interface.d.ts +2 -5
  24. package/lib/_internal/interfaces/function.interface.d.ts +2 -0
  25. package/lib/_internal/interfaces/index.d.ts +3 -3
  26. package/lib/_internal/objects/api.d.ts +47 -23
  27. package/lib/_internal/objects/assistant.d.ts +2 -8
  28. package/lib/_internal/objects/function.d.ts +2 -0
  29. package/lib/_internal/objects/index.d.ts +3 -3
  30. package/lib/_internal/prompt-module.api.service.d.ts +2 -2
  31. package/package.json +1 -1
@@ -27,6 +27,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
27
27
  args: [{ providedIn: 'root' }]
28
28
  }] });
29
29
 
30
+ // *********************************
31
+ // Code generated by sdkgen
32
+ // DO NOT EDIT!.
33
+ //
34
+ // Enums.
35
+ // *********************************
36
+ var FunctionParameterParameterLocation;
37
+ (function (FunctionParameterParameterLocation) {
38
+ FunctionParameterParameterLocation[FunctionParameterParameterLocation["LOCATION_BODY"] = 0] = "LOCATION_BODY";
39
+ FunctionParameterParameterLocation[FunctionParameterParameterLocation["LOCATION_QUERY_PARAM"] = 1] = "LOCATION_QUERY_PARAM";
40
+ })(FunctionParameterParameterLocation || (FunctionParameterParameterLocation = {}));
41
+
30
42
  // *********************************
31
43
  // Code generated by sdkgen
32
44
  // DO NOT EDIT!.
@@ -95,6 +107,8 @@ var ChatChannel;
95
107
  ChatChannel[ChatChannel["CHAT_CHANNEL_WEB"] = 2] = "CHAT_CHANNEL_WEB";
96
108
  ChatChannel[ChatChannel["CHAT_CHANNEL_SMS"] = 3] = "CHAT_CHANNEL_SMS";
97
109
  ChatChannel[ChatChannel["CHAT_CHANNEL_WHATSAPP"] = 4] = "CHAT_CHANNEL_WHATSAPP";
110
+ ChatChannel[ChatChannel["CHAT_CHANNEL_FACEBOOK"] = 5] = "CHAT_CHANNEL_FACEBOOK";
111
+ ChatChannel[ChatChannel["CHAT_CHANNEL_INSTAGRAM"] = 7] = "CHAT_CHANNEL_INSTAGRAM";
98
112
  })(ChatChannel || (ChatChannel = {}));
99
113
  var ChatMessageRole;
100
114
  (function (ChatMessageRole) {
@@ -408,6 +422,9 @@ class FunctionParameter {
408
422
  if (proto.items) {
409
423
  m.items = FunctionParameter.fromProto(proto.items);
410
424
  }
425
+ if (proto.location) {
426
+ m.location = enumStringToValue$9(FunctionParameterParameterLocation, proto.location);
427
+ }
411
428
  return m;
412
429
  }
413
430
  constructor(kwargs) {
@@ -436,6 +453,9 @@ class FunctionParameter {
436
453
  if (typeof this.value !== 'undefined') {
437
454
  toReturn['value'] = this.value;
438
455
  }
456
+ if (typeof this.location !== 'undefined') {
457
+ toReturn['location'] = this.location;
458
+ }
439
459
  return toReturn;
440
460
  }
441
461
  }
@@ -750,6 +770,36 @@ function enumStringToValue$6(enumRef, value) {
750
770
  }
751
771
  return enumRef[value];
752
772
  }
773
+ class KeyValuePair {
774
+ static fromProto(proto) {
775
+ let m = new KeyValuePair();
776
+ m = Object.assign(m, proto);
777
+ return m;
778
+ }
779
+ constructor(kwargs) {
780
+ if (!kwargs) {
781
+ return;
782
+ }
783
+ Object.assign(this, kwargs);
784
+ }
785
+ toApiJson() {
786
+ const toReturn = {};
787
+ if (typeof this.key !== 'undefined') {
788
+ toReturn['key'] = this.key;
789
+ }
790
+ if (typeof this.value !== 'undefined') {
791
+ toReturn['value'] = this.value;
792
+ }
793
+ return toReturn;
794
+ }
795
+ }
796
+
797
+ function enumStringToValue$5(enumRef, value) {
798
+ if (typeof value === 'number') {
799
+ return value;
800
+ }
801
+ return enumRef[value];
802
+ }
753
803
  class Assistant {
754
804
  static fromProto(proto) {
755
805
  let m = new Assistant();
@@ -758,7 +808,7 @@ class Assistant {
758
808
  m.namespace = Namespace.fromProto(proto.namespace);
759
809
  }
760
810
  if (proto.type) {
761
- m.type = enumStringToValue$6(AssistantType, proto.type);
811
+ m.type = enumStringToValue$5(AssistantType, proto.type);
762
812
  }
763
813
  if (proto.config) {
764
814
  m.config = Config.fromProto(proto.config);
@@ -826,29 +876,6 @@ class AssistantKey {
826
876
  return toReturn;
827
877
  }
828
878
  }
829
- class BookingConfig {
830
- static fromProto(proto) {
831
- let m = new BookingConfig();
832
- m = Object.assign(m, proto);
833
- return m;
834
- }
835
- constructor(kwargs) {
836
- if (!kwargs) {
837
- return;
838
- }
839
- Object.assign(this, kwargs);
840
- }
841
- toApiJson() {
842
- const toReturn = {};
843
- if (typeof this.calendarId !== 'undefined') {
844
- toReturn['calendarId'] = this.calendarId;
845
- }
846
- if (typeof this.meetingTypeId !== 'undefined') {
847
- toReturn['meetingTypeId'] = this.meetingTypeId;
848
- }
849
- return toReturn;
850
- }
851
- }
852
879
  class Config {
853
880
  static fromProto(proto) {
854
881
  let m = new Config();
@@ -885,6 +912,9 @@ class ConfigurableGoal {
885
912
  if (proto.goal) {
886
913
  m.goal = Goal.fromProto(proto.goal);
887
914
  }
915
+ if (proto.configuration) {
916
+ m.configuration = proto.configuration.map(KeyValuePair.fromProto);
917
+ }
888
918
  return m;
889
919
  }
890
920
  constructor(kwargs) {
@@ -898,6 +928,9 @@ class ConfigurableGoal {
898
928
  if (typeof this.goal !== 'undefined' && this.goal !== null) {
899
929
  toReturn['goal'] = 'toApiJson' in this.goal ? this.goal.toApiJson() : this.goal;
900
930
  }
931
+ if (typeof this.configuration !== 'undefined' && this.configuration !== null) {
932
+ toReturn['configuration'] = 'toApiJson' in this.configuration ? this.configuration.toApiJson() : this.configuration;
933
+ }
901
934
  return toReturn;
902
935
  }
903
936
  }
@@ -925,9 +958,6 @@ class ConfigInboxConfig {
925
958
  static fromProto(proto) {
926
959
  let m = new ConfigInboxConfig();
927
960
  m = Object.assign(m, proto);
928
- if (proto.bookingConfig) {
929
- m.bookingConfig = BookingConfig.fromProto(proto.bookingConfig);
930
- }
931
961
  return m;
932
962
  }
933
963
  constructor(kwargs) {
@@ -944,9 +974,6 @@ class ConfigInboxConfig {
944
974
  if (typeof this.additionalInstructions !== 'undefined') {
945
975
  toReturn['additionalInstructions'] = this.additionalInstructions;
946
976
  }
947
- if (typeof this.bookingConfig !== 'undefined' && this.bookingConfig !== null) {
948
- toReturn['bookingConfig'] = 'toApiJson' in this.bookingConfig ? this.bookingConfig.toApiJson() : this.bookingConfig;
949
- }
950
977
  return toReturn;
951
978
  }
952
979
  }
@@ -1036,7 +1063,7 @@ class ConfigVoiceConfig {
1036
1063
  let m = new ConfigVoiceConfig();
1037
1064
  m = Object.assign(m, proto);
1038
1065
  if (proto.vendorModel) {
1039
- m.vendorModel = enumStringToValue$6(VendorModel, proto.vendorModel);
1066
+ m.vendorModel = enumStringToValue$5(VendorModel, proto.vendorModel);
1040
1067
  }
1041
1068
  if (proto.modelConfig) {
1042
1069
  m.modelConfig = ModelConfig.fromProto(proto.modelConfig);
@@ -1061,7 +1088,7 @@ class ConfigVoiceConfig {
1061
1088
  }
1062
1089
  }
1063
1090
 
1064
- function enumStringToValue$5(enumRef, value) {
1091
+ function enumStringToValue$4(enumRef, value) {
1065
1092
  if (typeof value === 'number') {
1066
1093
  return value;
1067
1094
  }
@@ -1078,7 +1105,7 @@ class Connection {
1078
1105
  m.assistantKeys = proto.assistantKeys.map(AssistantKey.fromProto);
1079
1106
  }
1080
1107
  if (proto.supportedAssistantTypes) {
1081
- m.supportedAssistantTypes = proto.supportedAssistantTypes.map((v) => enumStringToValue$5(AssistantType, v));
1108
+ m.supportedAssistantTypes = proto.supportedAssistantTypes.map((v) => enumStringToValue$4(AssistantType, v));
1082
1109
  }
1083
1110
  return m;
1084
1111
  }
@@ -1153,36 +1180,6 @@ class ConnectionKey {
1153
1180
  }
1154
1181
  }
1155
1182
 
1156
- function enumStringToValue$4(enumRef, value) {
1157
- if (typeof value === 'number') {
1158
- return value;
1159
- }
1160
- return enumRef[value];
1161
- }
1162
- class KeyValuePair {
1163
- static fromProto(proto) {
1164
- let m = new KeyValuePair();
1165
- m = Object.assign(m, proto);
1166
- return m;
1167
- }
1168
- constructor(kwargs) {
1169
- if (!kwargs) {
1170
- return;
1171
- }
1172
- Object.assign(this, kwargs);
1173
- }
1174
- toApiJson() {
1175
- const toReturn = {};
1176
- if (typeof this.key !== 'undefined') {
1177
- toReturn['key'] = this.key;
1178
- }
1179
- if (typeof this.value !== 'undefined') {
1180
- toReturn['value'] = this.value;
1181
- }
1182
- return toReturn;
1183
- }
1184
- }
1185
-
1186
1183
  function enumStringToValue$3(enumRef, value) {
1187
1184
  if (typeof value === 'number') {
1188
1185
  return value;
@@ -1500,6 +1497,49 @@ class SetAssistantConnectionsRequestConnectionState {
1500
1497
  return toReturn;
1501
1498
  }
1502
1499
  }
1500
+ class CreateGoalRequest {
1501
+ static fromProto(proto) {
1502
+ let m = new CreateGoalRequest();
1503
+ m = Object.assign(m, proto);
1504
+ if (proto.goal) {
1505
+ m.goal = Goal.fromProto(proto.goal);
1506
+ }
1507
+ return m;
1508
+ }
1509
+ constructor(kwargs) {
1510
+ if (!kwargs) {
1511
+ return;
1512
+ }
1513
+ Object.assign(this, kwargs);
1514
+ }
1515
+ toApiJson() {
1516
+ const toReturn = {};
1517
+ if (typeof this.goal !== 'undefined' && this.goal !== null) {
1518
+ toReturn['goal'] = 'toApiJson' in this.goal ? this.goal.toApiJson() : this.goal;
1519
+ }
1520
+ return toReturn;
1521
+ }
1522
+ }
1523
+ class CreateGoalResponse {
1524
+ static fromProto(proto) {
1525
+ let m = new CreateGoalResponse();
1526
+ m = Object.assign(m, proto);
1527
+ return m;
1528
+ }
1529
+ constructor(kwargs) {
1530
+ if (!kwargs) {
1531
+ return;
1532
+ }
1533
+ Object.assign(this, kwargs);
1534
+ }
1535
+ toApiJson() {
1536
+ const toReturn = {};
1537
+ if (typeof this.id !== 'undefined') {
1538
+ toReturn['id'] = this.id;
1539
+ }
1540
+ return toReturn;
1541
+ }
1542
+ }
1503
1543
  class CreatePromptModuleRequest {
1504
1544
  static fromProto(proto) {
1505
1545
  let m = new CreatePromptModuleRequest();
@@ -1538,6 +1578,26 @@ class CreatePromptModuleRequest {
1538
1578
  return toReturn;
1539
1579
  }
1540
1580
  }
1581
+ class CreatePromptModuleResponse {
1582
+ static fromProto(proto) {
1583
+ let m = new CreatePromptModuleResponse();
1584
+ m = Object.assign(m, proto);
1585
+ return m;
1586
+ }
1587
+ constructor(kwargs) {
1588
+ if (!kwargs) {
1589
+ return;
1590
+ }
1591
+ Object.assign(this, kwargs);
1592
+ }
1593
+ toApiJson() {
1594
+ const toReturn = {};
1595
+ if (typeof this.id !== 'undefined') {
1596
+ toReturn['id'] = this.id;
1597
+ }
1598
+ return toReturn;
1599
+ }
1600
+ }
1541
1601
  class CreatePromptModuleVersionRequest {
1542
1602
  static fromProto(proto) {
1543
1603
  let m = new CreatePromptModuleVersionRequest();
@@ -1804,13 +1864,16 @@ class DeployPromptRequest {
1804
1864
  return toReturn;
1805
1865
  }
1806
1866
  }
1807
- class ListPromptModuleRequestFilters {
1867
+ class ListConnectionsRequestFilters {
1808
1868
  static fromProto(proto) {
1809
- let m = new ListPromptModuleRequestFilters();
1869
+ let m = new ListConnectionsRequestFilters();
1810
1870
  m = Object.assign(m, proto);
1811
1871
  if (proto.namespace) {
1812
1872
  m.namespace = Namespace.fromProto(proto.namespace);
1813
1873
  }
1874
+ if (proto.assistantType) {
1875
+ m.assistantType = enumStringToValue(AssistantType, proto.assistantType);
1876
+ }
1814
1877
  return m;
1815
1878
  }
1816
1879
  constructor(kwargs) {
@@ -1824,19 +1887,19 @@ class ListPromptModuleRequestFilters {
1824
1887
  if (typeof this.namespace !== 'undefined' && this.namespace !== null) {
1825
1888
  toReturn['namespace'] = 'toApiJson' in this.namespace ? this.namespace.toApiJson() : this.namespace;
1826
1889
  }
1890
+ if (typeof this.assistantType !== 'undefined') {
1891
+ toReturn['assistantType'] = this.assistantType;
1892
+ }
1827
1893
  return toReturn;
1828
1894
  }
1829
1895
  }
1830
- class ListConnectionsRequestFilters {
1896
+ class ListPromptModuleRequestFilters {
1831
1897
  static fromProto(proto) {
1832
- let m = new ListConnectionsRequestFilters();
1898
+ let m = new ListPromptModuleRequestFilters();
1833
1899
  m = Object.assign(m, proto);
1834
1900
  if (proto.namespace) {
1835
1901
  m.namespace = Namespace.fromProto(proto.namespace);
1836
1902
  }
1837
- if (proto.assistantType) {
1838
- m.assistantType = enumStringToValue(AssistantType, proto.assistantType);
1839
- }
1840
1903
  return m;
1841
1904
  }
1842
1905
  constructor(kwargs) {
@@ -1850,19 +1913,13 @@ class ListConnectionsRequestFilters {
1850
1913
  if (typeof this.namespace !== 'undefined' && this.namespace !== null) {
1851
1914
  toReturn['namespace'] = 'toApiJson' in this.namespace ? this.namespace.toApiJson() : this.namespace;
1852
1915
  }
1853
- if (typeof this.assistantType !== 'undefined') {
1854
- toReturn['assistantType'] = this.assistantType;
1855
- }
1856
1916
  return toReturn;
1857
1917
  }
1858
1918
  }
1859
- class ListAssistantRequestFilters {
1919
+ class ListAllAssistantsAssociatedToConnectionRequestFilters {
1860
1920
  static fromProto(proto) {
1861
- let m = new ListAssistantRequestFilters();
1921
+ let m = new ListAllAssistantsAssociatedToConnectionRequestFilters();
1862
1922
  m = Object.assign(m, proto);
1863
- if (proto.namespace) {
1864
- m.namespace = Namespace.fromProto(proto.namespace);
1865
- }
1866
1923
  if (proto.type) {
1867
1924
  m.type = enumStringToValue(AssistantType, proto.type);
1868
1925
  }
@@ -1876,27 +1933,21 @@ class ListAssistantRequestFilters {
1876
1933
  }
1877
1934
  toApiJson() {
1878
1935
  const toReturn = {};
1879
- if (typeof this.namespace !== 'undefined' && this.namespace !== null) {
1880
- toReturn['namespace'] = 'toApiJson' in this.namespace ? this.namespace.toApiJson() : this.namespace;
1881
- }
1882
1936
  if (typeof this.type !== 'undefined') {
1883
1937
  toReturn['type'] = this.type;
1884
1938
  }
1885
1939
  return toReturn;
1886
1940
  }
1887
1941
  }
1888
- class ListGoalsRequestFilters {
1942
+ class ListAssistantRequestFilters {
1889
1943
  static fromProto(proto) {
1890
- let m = new ListGoalsRequestFilters();
1944
+ let m = new ListAssistantRequestFilters();
1891
1945
  m = Object.assign(m, proto);
1892
1946
  if (proto.namespace) {
1893
1947
  m.namespace = Namespace.fromProto(proto.namespace);
1894
1948
  }
1895
1949
  if (proto.type) {
1896
- m.type = enumStringToValue(GoalType, proto.type);
1897
- }
1898
- if (proto.supportedChannels) {
1899
- m.supportedChannels = proto.supportedChannels.map((v) => enumStringToValue(GoalChannel, v));
1950
+ m.type = enumStringToValue(AssistantType, proto.type);
1900
1951
  }
1901
1952
  return m;
1902
1953
  }
@@ -1914,18 +1965,15 @@ class ListGoalsRequestFilters {
1914
1965
  if (typeof this.type !== 'undefined') {
1915
1966
  toReturn['type'] = this.type;
1916
1967
  }
1917
- if (typeof this.supportedChannels !== 'undefined') {
1918
- toReturn['supportedChannels'] = this.supportedChannels;
1919
- }
1920
1968
  return toReturn;
1921
1969
  }
1922
1970
  }
1923
- class ListAllAssistantsAssociatedToConnectionRequestFilters {
1971
+ class ListFunctionRequestFilters {
1924
1972
  static fromProto(proto) {
1925
- let m = new ListAllAssistantsAssociatedToConnectionRequestFilters();
1973
+ let m = new ListFunctionRequestFilters();
1926
1974
  m = Object.assign(m, proto);
1927
- if (proto.type) {
1928
- m.type = enumStringToValue(AssistantType, proto.type);
1975
+ if (proto.namespace) {
1976
+ m.namespace = Namespace.fromProto(proto.namespace);
1929
1977
  }
1930
1978
  return m;
1931
1979
  }
@@ -1937,19 +1985,25 @@ class ListAllAssistantsAssociatedToConnectionRequestFilters {
1937
1985
  }
1938
1986
  toApiJson() {
1939
1987
  const toReturn = {};
1940
- if (typeof this.type !== 'undefined') {
1941
- toReturn['type'] = this.type;
1988
+ if (typeof this.namespace !== 'undefined' && this.namespace !== null) {
1989
+ toReturn['namespace'] = 'toApiJson' in this.namespace ? this.namespace.toApiJson() : this.namespace;
1942
1990
  }
1943
1991
  return toReturn;
1944
1992
  }
1945
1993
  }
1946
- class ListFunctionRequestFilters {
1994
+ class ListGoalsRequestFilters {
1947
1995
  static fromProto(proto) {
1948
- let m = new ListFunctionRequestFilters();
1996
+ let m = new ListGoalsRequestFilters();
1949
1997
  m = Object.assign(m, proto);
1950
1998
  if (proto.namespace) {
1951
1999
  m.namespace = Namespace.fromProto(proto.namespace);
1952
2000
  }
2001
+ if (proto.type) {
2002
+ m.type = enumStringToValue(GoalType, proto.type);
2003
+ }
2004
+ if (proto.supportedChannels) {
2005
+ m.supportedChannels = proto.supportedChannels.map((v) => enumStringToValue(GoalChannel, v));
2006
+ }
1953
2007
  return m;
1954
2008
  }
1955
2009
  constructor(kwargs) {
@@ -1963,6 +2017,12 @@ class ListFunctionRequestFilters {
1963
2017
  if (typeof this.namespace !== 'undefined' && this.namespace !== null) {
1964
2018
  toReturn['namespace'] = 'toApiJson' in this.namespace ? this.namespace.toApiJson() : this.namespace;
1965
2019
  }
2020
+ if (typeof this.type !== 'undefined') {
2021
+ toReturn['type'] = this.type;
2022
+ }
2023
+ if (typeof this.supportedChannels !== 'undefined') {
2024
+ toReturn['supportedChannels'] = this.supportedChannels;
2025
+ }
1966
2026
  return toReturn;
1967
2027
  }
1968
2028
  }
@@ -3388,9 +3448,9 @@ class ListPromptVersionsResponse {
3388
3448
  return toReturn;
3389
3449
  }
3390
3450
  }
3391
- class UpsertAssistantRequestOptions {
3451
+ class CreatePromptModuleVersionRequestOptions {
3392
3452
  static fromProto(proto) {
3393
- let m = new UpsertAssistantRequestOptions();
3453
+ let m = new CreatePromptModuleVersionRequestOptions();
3394
3454
  m = Object.assign(m, proto);
3395
3455
  return m;
3396
3456
  }
@@ -3402,15 +3462,15 @@ class UpsertAssistantRequestOptions {
3402
3462
  }
3403
3463
  toApiJson() {
3404
3464
  const toReturn = {};
3405
- if (typeof this.applyDefaults !== 'undefined') {
3406
- toReturn['applyDefaults'] = this.applyDefaults;
3465
+ if (typeof this.shouldDeploy !== 'undefined') {
3466
+ toReturn['shouldDeploy'] = this.shouldDeploy;
3407
3467
  }
3408
3468
  return toReturn;
3409
3469
  }
3410
3470
  }
3411
- class CreatePromptModuleVersionRequestOptions {
3471
+ class UpsertAssistantRequestOptions {
3412
3472
  static fromProto(proto) {
3413
- let m = new CreatePromptModuleVersionRequestOptions();
3473
+ let m = new UpsertAssistantRequestOptions();
3414
3474
  m = Object.assign(m, proto);
3415
3475
  return m;
3416
3476
  }
@@ -3422,8 +3482,8 @@ class CreatePromptModuleVersionRequestOptions {
3422
3482
  }
3423
3483
  toApiJson() {
3424
3484
  const toReturn = {};
3425
- if (typeof this.shouldDeploy !== 'undefined') {
3426
- toReturn['shouldDeploy'] = this.shouldDeploy;
3485
+ if (typeof this.applyDefaults !== 'undefined') {
3486
+ toReturn['applyDefaults'] = this.applyDefaults;
3427
3487
  }
3428
3488
  return toReturn;
3429
3489
  }
@@ -3486,6 +3546,29 @@ class SetAssistantConnectionsRequest {
3486
3546
  return toReturn;
3487
3547
  }
3488
3548
  }
3549
+ class UpdateGoalRequest {
3550
+ static fromProto(proto) {
3551
+ let m = new UpdateGoalRequest();
3552
+ m = Object.assign(m, proto);
3553
+ if (proto.goal) {
3554
+ m.goal = Goal.fromProto(proto.goal);
3555
+ }
3556
+ return m;
3557
+ }
3558
+ constructor(kwargs) {
3559
+ if (!kwargs) {
3560
+ return;
3561
+ }
3562
+ Object.assign(this, kwargs);
3563
+ }
3564
+ toApiJson() {
3565
+ const toReturn = {};
3566
+ if (typeof this.goal !== 'undefined' && this.goal !== null) {
3567
+ toReturn['goal'] = 'toApiJson' in this.goal ? this.goal.toApiJson() : this.goal;
3568
+ }
3569
+ return toReturn;
3570
+ }
3571
+ }
3489
3572
  class UpdatePromptModuleRequest {
3490
3573
  static fromProto(proto) {
3491
3574
  let m = new UpdatePromptModuleRequest();
@@ -3865,6 +3948,15 @@ class GoalApiService {
3865
3948
  const request = (r.toApiJson) ? r : new UpsertGoalRequest(r);
3866
3949
  return this.http.post(this._host + "/ai_assistants.v1alpha1.GoalService/Upsert", request.toApiJson(), Object.assign(Object.assign({}, this.apiOptions()), { observe: 'response' }));
3867
3950
  }
3951
+ create(r) {
3952
+ const request = (r.toApiJson) ? r : new CreateGoalRequest(r);
3953
+ return this.http.post(this._host + "/ai_assistants.v1alpha1.GoalService/Create", request.toApiJson(), this.apiOptions())
3954
+ .pipe(map(resp => CreateGoalResponse.fromProto(resp)));
3955
+ }
3956
+ update(r) {
3957
+ const request = (r.toApiJson) ? r : new UpdateGoalRequest(r);
3958
+ return this.http.post(this._host + "/ai_assistants.v1alpha1.GoalService/Update", request.toApiJson(), Object.assign(Object.assign({}, this.apiOptions()), { observe: 'response' }));
3959
+ }
3868
3960
  get(r) {
3869
3961
  const request = (r.toApiJson) ? r : new GetGoalRequest(r);
3870
3962
  return this.http.post(this._host + "/ai_assistants.v1alpha1.GoalService/Get", request.toApiJson(), this.apiOptions())
@@ -3919,7 +4011,8 @@ class PromptModuleApiService {
3919
4011
  }
3920
4012
  create(r) {
3921
4013
  const request = (r.toApiJson) ? r : new CreatePromptModuleRequest(r);
3922
- return this.http.post(this._host + "/ai_assistants.v1alpha1.PromptModuleService/Create", request.toApiJson(), Object.assign(Object.assign({}, this.apiOptions()), { observe: 'response' }));
4014
+ return this.http.post(this._host + "/ai_assistants.v1alpha1.PromptModuleService/Create", request.toApiJson(), this.apiOptions())
4015
+ .pipe(map(resp => CreatePromptModuleResponse.fromProto(resp)));
3923
4016
  }
3924
4017
  createVersion(r) {
3925
4018
  const request = (r.toApiJson) ? r : new CreatePromptModuleVersionRequest(r);
@@ -4065,5 +4158,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
4065
4158
  * Generated bundle index. Do not edit.
4066
4159
  */
4067
4160
 
4068
- export { Access, Assistant, AssistantApiService, AssistantKey, AssistantType, BookingConfig, BuildDefaultAssistantRequest, BuildDefaultAssistantResponse, 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, FunctionHeader, 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, GoalsDisabledForAccountGroupRequest, GoalsDisabledForAccountGroupResponse, 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 };
4161
+ export { Access, Assistant, AssistantApiService, AssistantKey, AssistantType, BuildDefaultAssistantRequest, BuildDefaultAssistantResponse, ChatAnswerFunctionExecutionJob, ChatAnswerFunctionExecutionJobResult, ChatAnswerFunctionExecutionJobStatus, ChatChannel, ChatMessage, ChatMessageRole, ChatUserInfo, Config, ConfigInboxConfig, ConfigVoiceConfig, ConfigurableGoal, Connection, ConnectionApiService, ConnectionKey, CreateGoalRequest, CreateGoalResponse, CreatePromptModuleRequest, CreatePromptModuleResponse, CreatePromptModuleVersionRequest, CreatePromptModuleVersionRequestOptions, CreatePromptRequest, DeepgramConfig, DeleteAssistantRequest, DeleteConnectionRequest, DeleteFunctionRequest, DeleteGoalRequest, DeletePromptModuleRequest, DeletePromptRequest, DeployPromptModuleRequest, DeployPromptRequest, Function, FunctionApiService, FunctionHeader, FunctionKey, FunctionParameter, FunctionParameterParameterLocation, 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, GoalsDisabledForAccountGroupRequest, GoalsDisabledForAccountGroupResponse, 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, UpdateGoalRequest, UpdatePromptModuleRequest, UpdatePromptRequest, UpsertAssistantRequest, UpsertAssistantRequestOptions, UpsertAssistantResponse, UpsertConnectionRequest, UpsertFunctionRequest, UpsertGoalRequest, VendorModel };
4069
4162
  //# sourceMappingURL=vendasta-ai-assistants.mjs.map