@vendasta/conversation 0.68.0 → 0.70.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 (27) hide show
  1. package/esm2022/lib/_generated/host.service.mjs +3 -3
  2. package/esm2022/lib/_internal/ai-system-message.api.service.mjs +47 -0
  3. package/esm2022/lib/_internal/conversation.api.service.mjs +3 -3
  4. package/esm2022/lib/_internal/email.api.service.mjs +3 -3
  5. package/esm2022/lib/_internal/enums/api.enum.mjs +8 -1
  6. package/esm2022/lib/_internal/enums/index.mjs +2 -2
  7. package/esm2022/lib/_internal/inbox.api.service.mjs +3 -3
  8. package/esm2022/lib/_internal/index.mjs +2 -1
  9. package/esm2022/lib/_internal/interfaces/aisystemmessage.interface.mjs +8 -0
  10. package/esm2022/lib/_internal/interfaces/api.interface.mjs +1 -1
  11. package/esm2022/lib/_internal/interfaces/index.mjs +1 -1
  12. package/esm2022/lib/_internal/objects/aisystemmessage.mjs +172 -0
  13. package/esm2022/lib/_internal/objects/api.mjs +96 -9
  14. package/esm2022/lib/_internal/objects/index.mjs +3 -2
  15. package/fesm2022/vendasta-conversation.mjs +353 -47
  16. package/fesm2022/vendasta-conversation.mjs.map +1 -1
  17. package/lib/_internal/ai-system-message.api.service.d.ts +16 -0
  18. package/lib/_internal/enums/api.enum.d.ts +6 -0
  19. package/lib/_internal/enums/index.d.ts +1 -1
  20. package/lib/_internal/index.d.ts +1 -0
  21. package/lib/_internal/interfaces/aisystemmessage.interface.d.ts +24 -0
  22. package/lib/_internal/interfaces/api.interface.d.ts +15 -3
  23. package/lib/_internal/interfaces/index.d.ts +2 -1
  24. package/lib/_internal/objects/aisystemmessage.d.ts +44 -0
  25. package/lib/_internal/objects/api.d.ts +28 -7
  26. package/lib/_internal/objects/index.d.ts +2 -1
  27. package/package.json +1 -1
@@ -148,6 +148,13 @@ var EvaluationSentiment;
148
148
  //
149
149
  // Enums.
150
150
  // *********************************
151
+ var GetMessageTemplateRequestHydrationOptionsHydrationEntityEntityType;
152
+ (function (GetMessageTemplateRequestHydrationOptionsHydrationEntityEntityType) {
153
+ GetMessageTemplateRequestHydrationOptionsHydrationEntityEntityType[GetMessageTemplateRequestHydrationOptionsHydrationEntityEntityType["ENTITY_TYPE_UNDEFINED"] = 0] = "ENTITY_TYPE_UNDEFINED";
154
+ GetMessageTemplateRequestHydrationOptionsHydrationEntityEntityType[GetMessageTemplateRequestHydrationOptionsHydrationEntityEntityType["ENTITY_TYPE_PARTNER"] = 1] = "ENTITY_TYPE_PARTNER";
155
+ GetMessageTemplateRequestHydrationOptionsHydrationEntityEntityType[GetMessageTemplateRequestHydrationOptionsHydrationEntityEntityType["ENTITY_TYPE_ACCOUNT_GROUP"] = 2] = "ENTITY_TYPE_ACCOUNT_GROUP";
156
+ GetMessageTemplateRequestHydrationOptionsHydrationEntityEntityType[GetMessageTemplateRequestHydrationOptionsHydrationEntityEntityType["ENTITY_TYPE_CONTACT"] = 3] = "ENTITY_TYPE_CONTACT";
157
+ })(GetMessageTemplateRequestHydrationOptionsHydrationEntityEntityType || (GetMessageTemplateRequestHydrationOptionsHydrationEntityEntityType = {}));
151
158
  var MetadataIdentifier;
152
159
  (function (MetadataIdentifier) {
153
160
  MetadataIdentifier[MetadataIdentifier["METADATA_IDENTIFIER_UNDEFINED"] = 0] = "METADATA_IDENTIFIER_UNDEFINED";
@@ -174,7 +181,7 @@ var Status;
174
181
  // Enums Index.
175
182
  // *********************************
176
183
 
177
- function enumStringToValue$a(enumRef, value) {
184
+ function enumStringToValue$b(enumRef, value) {
178
185
  if (typeof value === 'number') {
179
186
  return value;
180
187
  }
@@ -187,7 +194,7 @@ class NamespaceDetail {
187
194
  let m = new NamespaceDetail();
188
195
  m = Object.assign(m, proto);
189
196
  if (proto.participantType) {
190
- m.participantType = enumStringToValue$a(GlobalParticipantType, proto.participantType);
197
+ m.participantType = enumStringToValue$b(GlobalParticipantType, proto.participantType);
191
198
  }
192
199
  return m;
193
200
  }
@@ -215,7 +222,7 @@ class SubjectParticipant {
215
222
  let m = new SubjectParticipant();
216
223
  m = Object.assign(m, proto);
217
224
  if (proto.participantType) {
218
- m.participantType = enumStringToValue$a(GlobalParticipantType, proto.participantType);
225
+ m.participantType = enumStringToValue$b(GlobalParticipantType, proto.participantType);
219
226
  }
220
227
  return m;
221
228
  }
@@ -237,7 +244,7 @@ class SubjectParticipant {
237
244
  }
238
245
  }
239
246
 
240
- function enumStringToValue$9(enumRef, value) {
247
+ function enumStringToValue$a(enumRef, value) {
241
248
  if (typeof value === 'number') {
242
249
  return value;
243
250
  }
@@ -263,7 +270,7 @@ class Conversation {
263
270
  let m = new Conversation();
264
271
  m = Object.assign(m, proto);
265
272
  if (proto.channel) {
266
- m.channel = enumStringToValue$9(ConversationChannel, proto.channel);
273
+ m.channel = enumStringToValue$a(ConversationChannel, proto.channel);
267
274
  }
268
275
  if (proto.created) {
269
276
  m.created = new Date(proto.created);
@@ -278,7 +285,7 @@ class Conversation {
278
285
  m.latestMsgSentTime = new Date(proto.latestMsgSentTime);
279
286
  }
280
287
  if (proto.originLocation) {
281
- m.originLocation = enumStringToValue$9(PlatformLocation, proto.originLocation);
288
+ m.originLocation = enumStringToValue$a(PlatformLocation, proto.originLocation);
282
289
  }
283
290
  if (proto.lastSeenByParticipant) {
284
291
  m.lastSeenByParticipant = proto.lastSeenByParticipant.map(LastSeenByParticipant.fromProto);
@@ -355,7 +362,7 @@ class ConversationKey {
355
362
  m.subjectParticipants = proto.subjectParticipants.map(SubjectParticipant.fromProto);
356
363
  }
357
364
  if (proto.channel) {
358
- m.channel = enumStringToValue$9(ConversationChannel, proto.channel);
365
+ m.channel = enumStringToValue$a(ConversationChannel, proto.channel);
359
366
  }
360
367
  return m;
361
368
  }
@@ -408,7 +415,7 @@ class LastSeenByParticipant {
408
415
  }
409
416
  }
410
417
 
411
- function enumStringToValue$8(enumRef, value) {
418
+ function enumStringToValue$9(enumRef, value) {
412
419
  if (typeof value === 'number') {
413
420
  return value;
414
421
  }
@@ -459,7 +466,7 @@ class Message {
459
466
  let m = new Message();
460
467
  m = Object.assign(m, proto);
461
468
  if (proto.type) {
462
- m.type = enumStringToValue$8(MessageType, proto.type);
469
+ m.type = enumStringToValue$9(MessageType, proto.type);
463
470
  }
464
471
  if (proto.created) {
465
472
  m.created = new Date(proto.created);
@@ -474,7 +481,7 @@ class Message {
474
481
  m.sendStatus = SendStatus.fromProto(proto.sendStatus);
475
482
  }
476
483
  if (proto.channel) {
477
- m.channel = enumStringToValue$8(ConversationChannel, proto.channel);
484
+ m.channel = enumStringToValue$9(ConversationChannel, proto.channel);
478
485
  }
479
486
  if (proto.metadata) {
480
487
  m.metadata = proto.metadata.map(KeyValuePair.fromProto);
@@ -546,7 +553,7 @@ class ParticipantMessageStatus {
546
553
  let m = new ParticipantMessageStatus();
547
554
  m = Object.assign(m, proto);
548
555
  if (proto.status) {
549
- m.status = enumStringToValue$8(MessageStatus, proto.status);
556
+ m.status = enumStringToValue$9(MessageStatus, proto.status);
550
557
  }
551
558
  if (proto.updated) {
552
559
  m.updated = new Date(proto.updated);
@@ -584,7 +591,7 @@ class SendStatus {
584
591
  let m = new SendStatus();
585
592
  m = Object.assign(m, proto);
586
593
  if (proto.status) {
587
- m.status = enumStringToValue$8(MessageStatus, proto.status);
594
+ m.status = enumStringToValue$9(MessageStatus, proto.status);
588
595
  }
589
596
  if (proto.created) {
590
597
  m.created = new Date(proto.created);
@@ -612,7 +619,7 @@ class SendStatus {
612
619
  }
613
620
  }
614
621
 
615
- function enumStringToValue$7(enumRef, value) {
622
+ function enumStringToValue$8(enumRef, value) {
616
623
  if (typeof value === 'number') {
617
624
  return value;
618
625
  }
@@ -683,10 +690,10 @@ class Participant {
683
690
  let m = new Participant();
684
691
  m = Object.assign(m, proto);
685
692
  if (proto.location) {
686
- m.location = enumStringToValue$7(PlatformLocation, proto.location);
693
+ m.location = enumStringToValue$8(PlatformLocation, proto.location);
687
694
  }
688
695
  if (proto.channel) {
689
- m.channel = enumStringToValue$7(ConversationChannel, proto.channel);
696
+ m.channel = enumStringToValue$8(ConversationChannel, proto.channel);
690
697
  }
691
698
  if (proto.created) {
692
699
  m.created = new Date(proto.created);
@@ -698,7 +705,7 @@ class Participant {
698
705
  m.deleted = new Date(proto.deleted);
699
706
  }
700
707
  if (proto.participantType) {
701
- m.participantType = enumStringToValue$7(ParticipantType, proto.participantType);
708
+ m.participantType = enumStringToValue$8(ParticipantType, proto.participantType);
702
709
  }
703
710
  if (proto.address) {
704
711
  m.address = Address.fromProto(proto.address);
@@ -788,13 +795,13 @@ class ParticipantKey {
788
795
  let m = new ParticipantKey();
789
796
  m = Object.assign(m, proto);
790
797
  if (proto.location) {
791
- m.location = enumStringToValue$7(PlatformLocation, proto.location);
798
+ m.location = enumStringToValue$8(PlatformLocation, proto.location);
792
799
  }
793
800
  if (proto.channels) {
794
- m.channels = proto.channels.map((v) => enumStringToValue$7(ConversationChannel, v));
801
+ m.channels = proto.channels.map((v) => enumStringToValue$8(ConversationChannel, v));
795
802
  }
796
803
  if (proto.participantType) {
797
- m.participantType = enumStringToValue$7(GlobalParticipantType, proto.participantType);
804
+ m.participantType = enumStringToValue$8(GlobalParticipantType, proto.participantType);
798
805
  }
799
806
  if (proto.namespaceHierarchy) {
800
807
  m.namespaceHierarchy = proto.namespaceHierarchy.map(NamespaceDetail.fromProto);
@@ -834,7 +841,7 @@ class ParticipantKey {
834
841
  }
835
842
  }
836
843
 
837
- function enumStringToValue$6(enumRef, value) {
844
+ function enumStringToValue$7(enumRef, value) {
838
845
  if (typeof value === 'number') {
839
846
  return value;
840
847
  }
@@ -866,7 +873,7 @@ class Access {
866
873
  }
867
874
  }
868
875
 
869
- function enumStringToValue$5(enumRef, value) {
876
+ function enumStringToValue$6(enumRef, value) {
870
877
  if (typeof value === 'number') {
871
878
  return value;
872
879
  }
@@ -988,7 +995,7 @@ class ProductFeature {
988
995
  }
989
996
  }
990
997
 
991
- function enumStringToValue$4(enumRef, value) {
998
+ function enumStringToValue$5(enumRef, value) {
992
999
  if (typeof value === 'number') {
993
1000
  return value;
994
1001
  }
@@ -1023,7 +1030,7 @@ class View {
1023
1030
  }
1024
1031
  }
1025
1032
 
1026
- function enumStringToValue$3(enumRef, value) {
1033
+ function enumStringToValue$4(enumRef, value) {
1027
1034
  if (typeof value === 'number') {
1028
1035
  return value;
1029
1036
  }
@@ -1073,7 +1080,7 @@ class Widget {
1073
1080
  let m = new Widget();
1074
1081
  m = Object.assign(m, proto);
1075
1082
  if (proto.position) {
1076
- m.position = enumStringToValue$3(WidgetPosition, proto.position);
1083
+ m.position = enumStringToValue$4(WidgetPosition, proto.position);
1077
1084
  }
1078
1085
  if (proto.created) {
1079
1086
  m.created = new Date(proto.created);
@@ -1137,7 +1144,7 @@ class Widget {
1137
1144
  }
1138
1145
  }
1139
1146
 
1140
- function enumStringToValue$2(enumRef, value) {
1147
+ function enumStringToValue$3(enumRef, value) {
1141
1148
  if (typeof value === 'number') {
1142
1149
  return value;
1143
1150
  }
@@ -1165,7 +1172,7 @@ class FieldMask {
1165
1172
  }
1166
1173
  }
1167
1174
 
1168
- function enumStringToValue$1(enumRef, value) {
1175
+ function enumStringToValue$2(enumRef, value) {
1169
1176
  if (typeof value === 'number') {
1170
1177
  return value;
1171
1178
  }
@@ -1208,6 +1215,178 @@ class MessageTemplate {
1208
1215
  }
1209
1216
  }
1210
1217
 
1218
+ function enumStringToValue$1(enumRef, value) {
1219
+ if (typeof value === 'number') {
1220
+ return value;
1221
+ }
1222
+ return enumRef[value];
1223
+ }
1224
+ class AISystemMessage {
1225
+ systemMessageId;
1226
+ systemMessageBody;
1227
+ iamUserId;
1228
+ updated;
1229
+ static fromProto(proto) {
1230
+ let m = new AISystemMessage();
1231
+ m = Object.assign(m, proto);
1232
+ if (proto.updated) {
1233
+ m.updated = new Date(proto.updated);
1234
+ }
1235
+ return m;
1236
+ }
1237
+ constructor(kwargs) {
1238
+ if (!kwargs) {
1239
+ return;
1240
+ }
1241
+ Object.assign(this, kwargs);
1242
+ }
1243
+ toApiJson() {
1244
+ const toReturn = {};
1245
+ if (typeof this.systemMessageId !== 'undefined') {
1246
+ toReturn['systemMessageId'] = this.systemMessageId;
1247
+ }
1248
+ if (typeof this.systemMessageBody !== 'undefined') {
1249
+ toReturn['systemMessageBody'] = this.systemMessageBody;
1250
+ }
1251
+ if (typeof this.iamUserId !== 'undefined') {
1252
+ toReturn['iamUserId'] = this.iamUserId;
1253
+ }
1254
+ if (typeof this.updated !== 'undefined' && this.updated !== null) {
1255
+ toReturn['updated'] = 'toApiJson' in this.updated ? this.updated.toApiJson() : this.updated;
1256
+ }
1257
+ return toReturn;
1258
+ }
1259
+ }
1260
+ class GetAISystemMessageRequest {
1261
+ systemMessageId;
1262
+ static fromProto(proto) {
1263
+ let m = new GetAISystemMessageRequest();
1264
+ m = Object.assign(m, proto);
1265
+ return m;
1266
+ }
1267
+ constructor(kwargs) {
1268
+ if (!kwargs) {
1269
+ return;
1270
+ }
1271
+ Object.assign(this, kwargs);
1272
+ }
1273
+ toApiJson() {
1274
+ const toReturn = {};
1275
+ if (typeof this.systemMessageId !== 'undefined') {
1276
+ toReturn['systemMessageId'] = this.systemMessageId;
1277
+ }
1278
+ return toReturn;
1279
+ }
1280
+ }
1281
+ class GetAISystemMessageResponse {
1282
+ systemMessage;
1283
+ static fromProto(proto) {
1284
+ let m = new GetAISystemMessageResponse();
1285
+ m = Object.assign(m, proto);
1286
+ if (proto.systemMessage) {
1287
+ m.systemMessage = AISystemMessage.fromProto(proto.systemMessage);
1288
+ }
1289
+ return m;
1290
+ }
1291
+ constructor(kwargs) {
1292
+ if (!kwargs) {
1293
+ return;
1294
+ }
1295
+ Object.assign(this, kwargs);
1296
+ }
1297
+ toApiJson() {
1298
+ const toReturn = {};
1299
+ if (typeof this.systemMessage !== 'undefined' && this.systemMessage !== null) {
1300
+ toReturn['systemMessage'] = 'toApiJson' in this.systemMessage ? this.systemMessage.toApiJson() : this.systemMessage;
1301
+ }
1302
+ return toReturn;
1303
+ }
1304
+ }
1305
+ class ListAISystemMessagesRequest {
1306
+ cursor;
1307
+ pageSize;
1308
+ static fromProto(proto) {
1309
+ let m = new ListAISystemMessagesRequest();
1310
+ m = Object.assign(m, proto);
1311
+ if (proto.pageSize) {
1312
+ m.pageSize = parseInt(proto.pageSize, 10);
1313
+ }
1314
+ return m;
1315
+ }
1316
+ constructor(kwargs) {
1317
+ if (!kwargs) {
1318
+ return;
1319
+ }
1320
+ Object.assign(this, kwargs);
1321
+ }
1322
+ toApiJson() {
1323
+ const toReturn = {};
1324
+ if (typeof this.cursor !== 'undefined') {
1325
+ toReturn['cursor'] = this.cursor;
1326
+ }
1327
+ if (typeof this.pageSize !== 'undefined') {
1328
+ toReturn['pageSize'] = this.pageSize;
1329
+ }
1330
+ return toReturn;
1331
+ }
1332
+ }
1333
+ class ListAISystemMessagesResponse {
1334
+ aiSystemMessages;
1335
+ nextCursor;
1336
+ hasMore;
1337
+ static fromProto(proto) {
1338
+ let m = new ListAISystemMessagesResponse();
1339
+ m = Object.assign(m, proto);
1340
+ if (proto.aiSystemMessages) {
1341
+ m.aiSystemMessages = proto.aiSystemMessages.map(AISystemMessage.fromProto);
1342
+ }
1343
+ return m;
1344
+ }
1345
+ constructor(kwargs) {
1346
+ if (!kwargs) {
1347
+ return;
1348
+ }
1349
+ Object.assign(this, kwargs);
1350
+ }
1351
+ toApiJson() {
1352
+ const toReturn = {};
1353
+ if (typeof this.aiSystemMessages !== 'undefined' && this.aiSystemMessages !== null) {
1354
+ toReturn['aiSystemMessages'] = 'toApiJson' in this.aiSystemMessages ? this.aiSystemMessages.toApiJson() : this.aiSystemMessages;
1355
+ }
1356
+ if (typeof this.nextCursor !== 'undefined') {
1357
+ toReturn['nextCursor'] = this.nextCursor;
1358
+ }
1359
+ if (typeof this.hasMore !== 'undefined') {
1360
+ toReturn['hasMore'] = this.hasMore;
1361
+ }
1362
+ return toReturn;
1363
+ }
1364
+ }
1365
+ class UpsertAISystemMessageRequest {
1366
+ systemMessage;
1367
+ static fromProto(proto) {
1368
+ let m = new UpsertAISystemMessageRequest();
1369
+ m = Object.assign(m, proto);
1370
+ if (proto.systemMessage) {
1371
+ m.systemMessage = AISystemMessage.fromProto(proto.systemMessage);
1372
+ }
1373
+ return m;
1374
+ }
1375
+ constructor(kwargs) {
1376
+ if (!kwargs) {
1377
+ return;
1378
+ }
1379
+ Object.assign(this, kwargs);
1380
+ }
1381
+ toApiJson() {
1382
+ const toReturn = {};
1383
+ if (typeof this.systemMessage !== 'undefined' && this.systemMessage !== null) {
1384
+ toReturn['systemMessage'] = 'toApiJson' in this.systemMessage ? this.systemMessage.toApiJson() : this.systemMessage;
1385
+ }
1386
+ return toReturn;
1387
+ }
1388
+ }
1389
+
1211
1390
  function enumStringToValue(enumRef, value) {
1212
1391
  if (typeof value === 'number') {
1213
1392
  return value;
@@ -1901,13 +2080,12 @@ class DeleteWidgetRequest {
1901
2080
  return toReturn;
1902
2081
  }
1903
2082
  }
1904
- class GetMultiConversationDetailsResponseDetailedConversation {
2083
+ class SearchConversationsResponseDetailedConversation {
1905
2084
  conversation;
1906
2085
  latestMessage;
1907
2086
  participants;
1908
- summary;
1909
2087
  static fromProto(proto) {
1910
- let m = new GetMultiConversationDetailsResponseDetailedConversation();
2088
+ let m = new SearchConversationsResponseDetailedConversation();
1911
2089
  m = Object.assign(m, proto);
1912
2090
  if (proto.conversation) {
1913
2091
  m.conversation = Conversation.fromProto(proto.conversation);
@@ -1937,18 +2115,16 @@ class GetMultiConversationDetailsResponseDetailedConversation {
1937
2115
  if (typeof this.participants !== 'undefined' && this.participants !== null) {
1938
2116
  toReturn['participants'] = 'toApiJson' in this.participants ? this.participants.toApiJson() : this.participants;
1939
2117
  }
1940
- if (typeof this.summary !== 'undefined') {
1941
- toReturn['summary'] = this.summary;
1942
- }
1943
2118
  return toReturn;
1944
2119
  }
1945
2120
  }
1946
- class SearchConversationsResponseDetailedConversation {
2121
+ class GetMultiConversationDetailsResponseDetailedConversation {
1947
2122
  conversation;
1948
2123
  latestMessage;
1949
2124
  participants;
2125
+ summary;
1950
2126
  static fromProto(proto) {
1951
- let m = new SearchConversationsResponseDetailedConversation();
2127
+ let m = new GetMultiConversationDetailsResponseDetailedConversation();
1952
2128
  m = Object.assign(m, proto);
1953
2129
  if (proto.conversation) {
1954
2130
  m.conversation = Conversation.fromProto(proto.conversation);
@@ -1978,6 +2154,9 @@ class SearchConversationsResponseDetailedConversation {
1978
2154
  if (typeof this.participants !== 'undefined' && this.participants !== null) {
1979
2155
  toReturn['participants'] = 'toApiJson' in this.participants ? this.participants.toApiJson() : this.participants;
1980
2156
  }
2157
+ if (typeof this.summary !== 'undefined') {
2158
+ toReturn['summary'] = this.summary;
2159
+ }
1981
2160
  return toReturn;
1982
2161
  }
1983
2162
  }
@@ -2306,9 +2485,13 @@ class GetMessageRequest {
2306
2485
  }
2307
2486
  class GetMessageTemplateRequest {
2308
2487
  templateId;
2488
+ hydrationOptions;
2309
2489
  static fromProto(proto) {
2310
2490
  let m = new GetMessageTemplateRequest();
2311
2491
  m = Object.assign(m, proto);
2492
+ if (proto.hydrationOptions) {
2493
+ m.hydrationOptions = GetMessageTemplateRequestHydrationOptions.fromProto(proto.hydrationOptions);
2494
+ }
2312
2495
  return m;
2313
2496
  }
2314
2497
  constructor(kwargs) {
@@ -2322,17 +2505,24 @@ class GetMessageTemplateRequest {
2322
2505
  if (typeof this.templateId !== 'undefined') {
2323
2506
  toReturn['templateId'] = this.templateId;
2324
2507
  }
2508
+ if (typeof this.hydrationOptions !== 'undefined' && this.hydrationOptions !== null) {
2509
+ toReturn['hydrationOptions'] = 'toApiJson' in this.hydrationOptions ? this.hydrationOptions.toApiJson() : this.hydrationOptions;
2510
+ }
2325
2511
  return toReturn;
2326
2512
  }
2327
2513
  }
2328
2514
  class GetMessageTemplateResponse {
2329
2515
  template;
2516
+ hydrationInformation;
2330
2517
  static fromProto(proto) {
2331
2518
  let m = new GetMessageTemplateResponse();
2332
2519
  m = Object.assign(m, proto);
2333
2520
  if (proto.template) {
2334
2521
  m.template = MessageTemplate.fromProto(proto.template);
2335
2522
  }
2523
+ if (proto.hydrationInformation) {
2524
+ m.hydrationInformation = GetMessageTemplateResponseHydrationInformation.fromProto(proto.hydrationInformation);
2525
+ }
2336
2526
  return m;
2337
2527
  }
2338
2528
  constructor(kwargs) {
@@ -2346,6 +2536,9 @@ class GetMessageTemplateResponse {
2346
2536
  if (typeof this.template !== 'undefined' && this.template !== null) {
2347
2537
  toReturn['template'] = 'toApiJson' in this.template ? this.template.toApiJson() : this.template;
2348
2538
  }
2539
+ if (typeof this.hydrationInformation !== 'undefined' && this.hydrationInformation !== null) {
2540
+ toReturn['hydrationInformation'] = 'toApiJson' in this.hydrationInformation ? this.hydrationInformation.toApiJson() : this.hydrationInformation;
2541
+ }
2349
2542
  return toReturn;
2350
2543
  }
2351
2544
  }
@@ -2887,6 +3080,79 @@ class GetWidgetResponse {
2887
3080
  return toReturn;
2888
3081
  }
2889
3082
  }
3083
+ class GetMessageTemplateRequestHydrationOptionsHydrationEntity {
3084
+ entityType;
3085
+ entityId;
3086
+ static fromProto(proto) {
3087
+ let m = new GetMessageTemplateRequestHydrationOptionsHydrationEntity();
3088
+ m = Object.assign(m, proto);
3089
+ if (proto.entityType) {
3090
+ m.entityType = enumStringToValue(GetMessageTemplateRequestHydrationOptionsHydrationEntityEntityType, proto.entityType);
3091
+ }
3092
+ return m;
3093
+ }
3094
+ constructor(kwargs) {
3095
+ if (!kwargs) {
3096
+ return;
3097
+ }
3098
+ Object.assign(this, kwargs);
3099
+ }
3100
+ toApiJson() {
3101
+ const toReturn = {};
3102
+ if (typeof this.entityType !== 'undefined') {
3103
+ toReturn['entityType'] = this.entityType;
3104
+ }
3105
+ if (typeof this.entityId !== 'undefined') {
3106
+ toReturn['entityId'] = this.entityId;
3107
+ }
3108
+ return toReturn;
3109
+ }
3110
+ }
3111
+ class GetMessageTemplateResponseHydrationInformation {
3112
+ allFieldsHydrated;
3113
+ static fromProto(proto) {
3114
+ let m = new GetMessageTemplateResponseHydrationInformation();
3115
+ m = Object.assign(m, proto);
3116
+ return m;
3117
+ }
3118
+ constructor(kwargs) {
3119
+ if (!kwargs) {
3120
+ return;
3121
+ }
3122
+ Object.assign(this, kwargs);
3123
+ }
3124
+ toApiJson() {
3125
+ const toReturn = {};
3126
+ if (typeof this.allFieldsHydrated !== 'undefined') {
3127
+ toReturn['allFieldsHydrated'] = this.allFieldsHydrated;
3128
+ }
3129
+ return toReturn;
3130
+ }
3131
+ }
3132
+ class GetMessageTemplateRequestHydrationOptions {
3133
+ hydrationEntities;
3134
+ static fromProto(proto) {
3135
+ let m = new GetMessageTemplateRequestHydrationOptions();
3136
+ m = Object.assign(m, proto);
3137
+ if (proto.hydrationEntities) {
3138
+ m.hydrationEntities = proto.hydrationEntities.map(GetMessageTemplateRequestHydrationOptionsHydrationEntity.fromProto);
3139
+ }
3140
+ return m;
3141
+ }
3142
+ constructor(kwargs) {
3143
+ if (!kwargs) {
3144
+ return;
3145
+ }
3146
+ Object.assign(this, kwargs);
3147
+ }
3148
+ toApiJson() {
3149
+ const toReturn = {};
3150
+ if (typeof this.hydrationEntities !== 'undefined' && this.hydrationEntities !== null) {
3151
+ toReturn['hydrationEntities'] = 'toApiJson' in this.hydrationEntities ? this.hydrationEntities.toApiJson() : this.hydrationEntities;
3152
+ }
3153
+ return toReturn;
3154
+ }
3155
+ }
2890
3156
  class ListMessageTemplateRequest {
2891
3157
  subjectParticipant;
2892
3158
  pagingOptions;
@@ -4203,10 +4469,50 @@ class HostService {
4203
4469
  get hostWithScheme() {
4204
4470
  return 'https://' + this.host;
4205
4471
  }
4206
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: HostService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
4207
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: HostService, providedIn: 'root' });
4472
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: HostService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
4473
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: HostService, providedIn: 'root' });
4474
+ }
4475
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: HostService, decorators: [{
4476
+ type: Injectable,
4477
+ args: [{ providedIn: 'root' }]
4478
+ }] });
4479
+
4480
+ // *********************************
4481
+ // Code generated by sdkgen
4482
+ // DO NOT EDIT!.
4483
+ //
4484
+ // API Service.
4485
+ // *********************************
4486
+ class AISystemMessageApiService {
4487
+ hostService = inject(HostService);
4488
+ http = inject(HttpClient);
4489
+ _host = this.hostService.hostWithScheme;
4490
+ apiOptions() {
4491
+ return {
4492
+ headers: new HttpHeaders({
4493
+ 'Content-Type': 'application/json'
4494
+ }),
4495
+ withCredentials: true
4496
+ };
4497
+ }
4498
+ upsertAiSystemMessage(r) {
4499
+ const request = (r.toApiJson) ? r : new UpsertAISystemMessageRequest(r);
4500
+ return this.http.post(this._host + "/conversation.v1.AISystemMessageService/UpsertAISystemMessage", request.toApiJson(), { ...this.apiOptions(), observe: 'response' });
4501
+ }
4502
+ getAiSystemMessage(r) {
4503
+ const request = (r.toApiJson) ? r : new GetAISystemMessageRequest(r);
4504
+ return this.http.post(this._host + "/conversation.v1.AISystemMessageService/GetAISystemMessage", request.toApiJson(), this.apiOptions())
4505
+ .pipe(map(resp => GetAISystemMessageResponse.fromProto(resp)));
4506
+ }
4507
+ listAiSystemMessages(r) {
4508
+ const request = (r.toApiJson) ? r : new ListAISystemMessagesRequest(r);
4509
+ return this.http.post(this._host + "/conversation.v1.AISystemMessageService/ListAISystemMessages", request.toApiJson(), this.apiOptions())
4510
+ .pipe(map(resp => ListAISystemMessagesResponse.fromProto(resp)));
4511
+ }
4512
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: AISystemMessageApiService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
4513
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: AISystemMessageApiService, providedIn: 'root' });
4208
4514
  }
4209
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: HostService, decorators: [{
4515
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: AISystemMessageApiService, decorators: [{
4210
4516
  type: Injectable,
4211
4517
  args: [{ providedIn: 'root' }]
4212
4518
  }] });
@@ -4428,10 +4734,10 @@ class ConversationApiService {
4428
4734
  return this.http.post(this._host + "/conversation.v1.ConversationService/NewInboxLeadCaptured", request.toApiJson(), this.apiOptions())
4429
4735
  .pipe(map(resp => NewInboxLeadCapturedResponse.fromProto(resp)));
4430
4736
  }
4431
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: ConversationApiService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
4432
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: ConversationApiService, providedIn: 'root' });
4737
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ConversationApiService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
4738
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ConversationApiService, providedIn: 'root' });
4433
4739
  }
4434
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: ConversationApiService, decorators: [{
4740
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ConversationApiService, decorators: [{
4435
4741
  type: Injectable,
4436
4742
  args: [{ providedIn: 'root' }]
4437
4743
  }] });
@@ -4459,10 +4765,10 @@ class EmailApiService {
4459
4765
  return this.http.post(this._host + "/conversation.v1.EmailService/GetOwnerEmail", request.toApiJson(), this.apiOptions())
4460
4766
  .pipe(map(resp => GetOwnerEmailResponse.fromProto(resp)));
4461
4767
  }
4462
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: EmailApiService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
4463
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: EmailApiService, providedIn: 'root' });
4768
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: EmailApiService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
4769
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: EmailApiService, providedIn: 'root' });
4464
4770
  }
4465
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: EmailApiService, decorators: [{
4771
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: EmailApiService, decorators: [{
4466
4772
  type: Injectable,
4467
4773
  args: [{ providedIn: 'root' }]
4468
4774
  }] });
@@ -4505,10 +4811,10 @@ class InboxApiService {
4505
4811
  return this.http.post(this._host + "/conversation.v1.InboxService/UpsertProductFeature", request.toApiJson(), this.apiOptions())
4506
4812
  .pipe(map(resp => UpsertProductFeatureResponse.fromProto(resp)));
4507
4813
  }
4508
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: InboxApiService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
4509
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: InboxApiService, providedIn: 'root' });
4814
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: InboxApiService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
4815
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: InboxApiService, providedIn: 'root' });
4510
4816
  }
4511
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: InboxApiService, decorators: [{
4817
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: InboxApiService, decorators: [{
4512
4818
  type: Injectable,
4513
4819
  args: [{ providedIn: 'root' }]
4514
4820
  }] });
@@ -4524,5 +4830,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImpo
4524
4830
  * Generated bundle index. Do not edit.
4525
4831
  */
4526
4832
 
4527
- export { Access, AddConversationToConversationViewRequest, AddMultiParticipantsRequest, AddMultiParticipantsResponse, Address, CapturedLead, ChannelAvailability, ChannelStatus, Configuration, Conversation, ConversationApiService, ConversationChannel, ConversationKey, ConversationMessageCount, CreateConversationRequest, CreateConversationResponse, CreateMessageTemplateRequest, CreateMessageTemplateResponse, CreateMultiMessagesRequest, CreateWidgetConversationRequest, CreateWidgetConversationResponse, CreateWidgetRequest, CreateWidgetResponse, DataSources, DeleteConversationRequest, DeleteMessageRequest, DeleteMessageTemplateRequest, DeleteWidgetRequest, EmailApiService, EvaluateResponseRequest, EvaluationSentiment, FieldMask, GetAvailableChannelsForConversationRequest, GetAvailableChannelsForConversationResponse, GetConfigurationRequest, GetConfigurationResponse, GetConversationByKeyRequest, GetConversationByKeyResponse, GetConversationSummaryRequest, GetConversationSummaryResponse, GetConversationViewsRequest, GetConversationViewsResponse, GetMessageOptions, GetMessageRequest, GetMessageTemplateRequest, GetMessageTemplateResponse, GetMultiConfigurationRequest, GetMultiConfigurationResponse, GetMultiConversationDetailsRequest, GetMultiConversationDetailsResponse, GetMultiConversationDetailsResponseDetailedConversation, GetMultiConversationMessageCountRequest, GetMultiConversationMessageCountResponse, GetMultiConversationMessageCountResponseCountsEntry, GetMultiMessagesRequest, GetMultiMessagesResponse, GetMultiParticipantsRequest, GetMultiParticipantsResponse, GetMultiWidgetMessagesRequest, GetMultiWidgetMessagesResponse, GetOwnerEmailRequest, GetOwnerEmailResponse, GetParticipantsByKeyRequest, GetParticipantsByKeyResponse, GetWidgetConfigRequest, GetWidgetConfigResponse, GetWidgetConversationResponse, GetWidgetRequest, GetWidgetResponse, GlobalParticipantType, InboxApiService, KeyValuePair, LastSeenByParticipant, ListMessageTemplateRequest, ListMessageTemplateResponse, ListMessagesRequest, ListMessagesRequestListMessagesFilters, ListMessagesResponse, ListWidgetsRequest, ListWidgetsResponse, LookupConversationsRequest, LookupConversationsRequestLookupConversationsFilters, LookupConversationsResponse, LookupConversationsResponseConversations, Media, Message, MessageStatus, MessageTemplate, MessageType, Metadata, MetadataDataEntry, MetadataIdentifier, NamespaceDetail, NewInboxLeadCapturedRequest, NewInboxLeadCapturedResponse, PagedRequestOptions, PagedResponseMetadata, Participant, ParticipantKey, ParticipantMessageStatus, ParticipantType, PlatformLocation, ProductFeature, ReceiveMessageRequest, ReceiveMessageRequestMetadataEntry, RemoveConversationFromConversationViewRequest, SearchConversationsRequest, SearchConversationsResponse, SearchConversationsResponseDetailedConversation, SendMessageRequest, SendMessageResponse, SendStatus, SendWidgetMessageRequest, SendWidgetMessageResponse, SetLastSeenRequest, SetLastSeenRequestStatus, SetLastSeenResponse, SortDirection, Status, SubjectParticipant, UpdateConversationRequest, UpdateConversationResponse, UpdateMessageStatusRequest, UpdateMessageTemplateRequest, UpdateMessageTemplateResponse, UpdateWidgetRequest, UpdateWidgetResponse, UpsertConfigurationRequest, UpsertConfigurationResponse, UpsertProductFeatureRequest, UpsertProductFeatureResponse, View, ViewType, Widget, WidgetPosition };
4833
+ export { AISystemMessage, AISystemMessageApiService, Access, AddConversationToConversationViewRequest, AddMultiParticipantsRequest, AddMultiParticipantsResponse, Address, CapturedLead, ChannelAvailability, ChannelStatus, Configuration, Conversation, ConversationApiService, ConversationChannel, ConversationKey, ConversationMessageCount, CreateConversationRequest, CreateConversationResponse, CreateMessageTemplateRequest, CreateMessageTemplateResponse, CreateMultiMessagesRequest, CreateWidgetConversationRequest, CreateWidgetConversationResponse, CreateWidgetRequest, CreateWidgetResponse, DataSources, DeleteConversationRequest, DeleteMessageRequest, DeleteMessageTemplateRequest, DeleteWidgetRequest, EmailApiService, EvaluateResponseRequest, EvaluationSentiment, FieldMask, GetAISystemMessageRequest, GetAISystemMessageResponse, GetAvailableChannelsForConversationRequest, GetAvailableChannelsForConversationResponse, GetConfigurationRequest, GetConfigurationResponse, GetConversationByKeyRequest, GetConversationByKeyResponse, GetConversationSummaryRequest, GetConversationSummaryResponse, GetConversationViewsRequest, GetConversationViewsResponse, GetMessageOptions, GetMessageRequest, GetMessageTemplateRequest, GetMessageTemplateRequestHydrationOptions, GetMessageTemplateRequestHydrationOptionsHydrationEntity, GetMessageTemplateRequestHydrationOptionsHydrationEntityEntityType, GetMessageTemplateResponse, GetMessageTemplateResponseHydrationInformation, GetMultiConfigurationRequest, GetMultiConfigurationResponse, GetMultiConversationDetailsRequest, GetMultiConversationDetailsResponse, GetMultiConversationDetailsResponseDetailedConversation, GetMultiConversationMessageCountRequest, GetMultiConversationMessageCountResponse, GetMultiConversationMessageCountResponseCountsEntry, GetMultiMessagesRequest, GetMultiMessagesResponse, GetMultiParticipantsRequest, GetMultiParticipantsResponse, GetMultiWidgetMessagesRequest, GetMultiWidgetMessagesResponse, GetOwnerEmailRequest, GetOwnerEmailResponse, GetParticipantsByKeyRequest, GetParticipantsByKeyResponse, GetWidgetConfigRequest, GetWidgetConfigResponse, GetWidgetConversationResponse, GetWidgetRequest, GetWidgetResponse, GlobalParticipantType, InboxApiService, KeyValuePair, LastSeenByParticipant, ListAISystemMessagesRequest, ListAISystemMessagesResponse, ListMessageTemplateRequest, ListMessageTemplateResponse, ListMessagesRequest, ListMessagesRequestListMessagesFilters, ListMessagesResponse, ListWidgetsRequest, ListWidgetsResponse, LookupConversationsRequest, LookupConversationsRequestLookupConversationsFilters, LookupConversationsResponse, LookupConversationsResponseConversations, Media, Message, MessageStatus, MessageTemplate, MessageType, Metadata, MetadataDataEntry, MetadataIdentifier, NamespaceDetail, NewInboxLeadCapturedRequest, NewInboxLeadCapturedResponse, PagedRequestOptions, PagedResponseMetadata, Participant, ParticipantKey, ParticipantMessageStatus, ParticipantType, PlatformLocation, ProductFeature, ReceiveMessageRequest, ReceiveMessageRequestMetadataEntry, RemoveConversationFromConversationViewRequest, SearchConversationsRequest, SearchConversationsResponse, SearchConversationsResponseDetailedConversation, SendMessageRequest, SendMessageResponse, SendStatus, SendWidgetMessageRequest, SendWidgetMessageResponse, SetLastSeenRequest, SetLastSeenRequestStatus, SetLastSeenResponse, SortDirection, Status, SubjectParticipant, UpdateConversationRequest, UpdateConversationResponse, UpdateMessageStatusRequest, UpdateMessageTemplateRequest, UpdateMessageTemplateResponse, UpdateWidgetRequest, UpdateWidgetResponse, UpsertAISystemMessageRequest, UpsertConfigurationRequest, UpsertConfigurationResponse, UpsertProductFeatureRequest, UpsertProductFeatureResponse, View, ViewType, Widget, WidgetPosition };
4528
4834
  //# sourceMappingURL=vendasta-conversation.mjs.map