@vendasta/conversation 0.114.0 → 0.116.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.
- package/esm2022/lib/_internal/interfaces/api.interface.mjs +1 -1
- package/esm2022/lib/_internal/interfaces/index.mjs +1 -1
- package/esm2022/lib/_internal/objects/api.mjs +69 -48
- package/esm2022/lib/_internal/objects/index.mjs +3 -3
- package/fesm2022/vendasta-conversation.mjs +269 -248
- package/fesm2022/vendasta-conversation.mjs.map +1 -1
- package/lib/_internal/interfaces/api.interface.d.ts +8 -5
- package/lib/_internal/interfaces/index.d.ts +2 -2
- package/lib/_internal/objects/api.d.ts +17 -14
- package/lib/_internal/objects/index.d.ts +2 -2
- package/package.json +1 -1
|
@@ -247,6 +247,178 @@ function enumStringToValue$f(enumRef, value) {
|
|
|
247
247
|
}
|
|
248
248
|
return enumRef[value];
|
|
249
249
|
}
|
|
250
|
+
class AISystemMessage {
|
|
251
|
+
systemMessageId;
|
|
252
|
+
systemMessageBody;
|
|
253
|
+
iamUserId;
|
|
254
|
+
updated;
|
|
255
|
+
static fromProto(proto) {
|
|
256
|
+
let m = new AISystemMessage();
|
|
257
|
+
m = Object.assign(m, proto);
|
|
258
|
+
if (proto.updated) {
|
|
259
|
+
m.updated = new Date(proto.updated);
|
|
260
|
+
}
|
|
261
|
+
return m;
|
|
262
|
+
}
|
|
263
|
+
constructor(kwargs) {
|
|
264
|
+
if (!kwargs) {
|
|
265
|
+
return;
|
|
266
|
+
}
|
|
267
|
+
Object.assign(this, kwargs);
|
|
268
|
+
}
|
|
269
|
+
toApiJson() {
|
|
270
|
+
const toReturn = {};
|
|
271
|
+
if (typeof this.systemMessageId !== 'undefined') {
|
|
272
|
+
toReturn['systemMessageId'] = this.systemMessageId;
|
|
273
|
+
}
|
|
274
|
+
if (typeof this.systemMessageBody !== 'undefined') {
|
|
275
|
+
toReturn['systemMessageBody'] = this.systemMessageBody;
|
|
276
|
+
}
|
|
277
|
+
if (typeof this.iamUserId !== 'undefined') {
|
|
278
|
+
toReturn['iamUserId'] = this.iamUserId;
|
|
279
|
+
}
|
|
280
|
+
if (typeof this.updated !== 'undefined' && this.updated !== null) {
|
|
281
|
+
toReturn['updated'] = 'toApiJson' in this.updated ? this.updated.toApiJson() : this.updated;
|
|
282
|
+
}
|
|
283
|
+
return toReturn;
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
class GetAISystemMessageRequest {
|
|
287
|
+
systemMessageId;
|
|
288
|
+
static fromProto(proto) {
|
|
289
|
+
let m = new GetAISystemMessageRequest();
|
|
290
|
+
m = Object.assign(m, proto);
|
|
291
|
+
return m;
|
|
292
|
+
}
|
|
293
|
+
constructor(kwargs) {
|
|
294
|
+
if (!kwargs) {
|
|
295
|
+
return;
|
|
296
|
+
}
|
|
297
|
+
Object.assign(this, kwargs);
|
|
298
|
+
}
|
|
299
|
+
toApiJson() {
|
|
300
|
+
const toReturn = {};
|
|
301
|
+
if (typeof this.systemMessageId !== 'undefined') {
|
|
302
|
+
toReturn['systemMessageId'] = this.systemMessageId;
|
|
303
|
+
}
|
|
304
|
+
return toReturn;
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
class GetAISystemMessageResponse {
|
|
308
|
+
systemMessage;
|
|
309
|
+
static fromProto(proto) {
|
|
310
|
+
let m = new GetAISystemMessageResponse();
|
|
311
|
+
m = Object.assign(m, proto);
|
|
312
|
+
if (proto.systemMessage) {
|
|
313
|
+
m.systemMessage = AISystemMessage.fromProto(proto.systemMessage);
|
|
314
|
+
}
|
|
315
|
+
return m;
|
|
316
|
+
}
|
|
317
|
+
constructor(kwargs) {
|
|
318
|
+
if (!kwargs) {
|
|
319
|
+
return;
|
|
320
|
+
}
|
|
321
|
+
Object.assign(this, kwargs);
|
|
322
|
+
}
|
|
323
|
+
toApiJson() {
|
|
324
|
+
const toReturn = {};
|
|
325
|
+
if (typeof this.systemMessage !== 'undefined' && this.systemMessage !== null) {
|
|
326
|
+
toReturn['systemMessage'] = 'toApiJson' in this.systemMessage ? this.systemMessage.toApiJson() : this.systemMessage;
|
|
327
|
+
}
|
|
328
|
+
return toReturn;
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
class ListAISystemMessagesRequest {
|
|
332
|
+
cursor;
|
|
333
|
+
pageSize;
|
|
334
|
+
static fromProto(proto) {
|
|
335
|
+
let m = new ListAISystemMessagesRequest();
|
|
336
|
+
m = Object.assign(m, proto);
|
|
337
|
+
if (proto.pageSize) {
|
|
338
|
+
m.pageSize = parseInt(proto.pageSize, 10);
|
|
339
|
+
}
|
|
340
|
+
return m;
|
|
341
|
+
}
|
|
342
|
+
constructor(kwargs) {
|
|
343
|
+
if (!kwargs) {
|
|
344
|
+
return;
|
|
345
|
+
}
|
|
346
|
+
Object.assign(this, kwargs);
|
|
347
|
+
}
|
|
348
|
+
toApiJson() {
|
|
349
|
+
const toReturn = {};
|
|
350
|
+
if (typeof this.cursor !== 'undefined') {
|
|
351
|
+
toReturn['cursor'] = this.cursor;
|
|
352
|
+
}
|
|
353
|
+
if (typeof this.pageSize !== 'undefined') {
|
|
354
|
+
toReturn['pageSize'] = this.pageSize;
|
|
355
|
+
}
|
|
356
|
+
return toReturn;
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
class ListAISystemMessagesResponse {
|
|
360
|
+
aiSystemMessages;
|
|
361
|
+
nextCursor;
|
|
362
|
+
hasMore;
|
|
363
|
+
static fromProto(proto) {
|
|
364
|
+
let m = new ListAISystemMessagesResponse();
|
|
365
|
+
m = Object.assign(m, proto);
|
|
366
|
+
if (proto.aiSystemMessages) {
|
|
367
|
+
m.aiSystemMessages = proto.aiSystemMessages.map(AISystemMessage.fromProto);
|
|
368
|
+
}
|
|
369
|
+
return m;
|
|
370
|
+
}
|
|
371
|
+
constructor(kwargs) {
|
|
372
|
+
if (!kwargs) {
|
|
373
|
+
return;
|
|
374
|
+
}
|
|
375
|
+
Object.assign(this, kwargs);
|
|
376
|
+
}
|
|
377
|
+
toApiJson() {
|
|
378
|
+
const toReturn = {};
|
|
379
|
+
if (typeof this.aiSystemMessages !== 'undefined' && this.aiSystemMessages !== null) {
|
|
380
|
+
toReturn['aiSystemMessages'] = 'toApiJson' in this.aiSystemMessages ? this.aiSystemMessages.toApiJson() : this.aiSystemMessages;
|
|
381
|
+
}
|
|
382
|
+
if (typeof this.nextCursor !== 'undefined') {
|
|
383
|
+
toReturn['nextCursor'] = this.nextCursor;
|
|
384
|
+
}
|
|
385
|
+
if (typeof this.hasMore !== 'undefined') {
|
|
386
|
+
toReturn['hasMore'] = this.hasMore;
|
|
387
|
+
}
|
|
388
|
+
return toReturn;
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
class UpsertAISystemMessageRequest {
|
|
392
|
+
systemMessage;
|
|
393
|
+
static fromProto(proto) {
|
|
394
|
+
let m = new UpsertAISystemMessageRequest();
|
|
395
|
+
m = Object.assign(m, proto);
|
|
396
|
+
if (proto.systemMessage) {
|
|
397
|
+
m.systemMessage = AISystemMessage.fromProto(proto.systemMessage);
|
|
398
|
+
}
|
|
399
|
+
return m;
|
|
400
|
+
}
|
|
401
|
+
constructor(kwargs) {
|
|
402
|
+
if (!kwargs) {
|
|
403
|
+
return;
|
|
404
|
+
}
|
|
405
|
+
Object.assign(this, kwargs);
|
|
406
|
+
}
|
|
407
|
+
toApiJson() {
|
|
408
|
+
const toReturn = {};
|
|
409
|
+
if (typeof this.systemMessage !== 'undefined' && this.systemMessage !== null) {
|
|
410
|
+
toReturn['systemMessage'] = 'toApiJson' in this.systemMessage ? this.systemMessage.toApiJson() : this.systemMessage;
|
|
411
|
+
}
|
|
412
|
+
return toReturn;
|
|
413
|
+
}
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
function enumStringToValue$e(enumRef, value) {
|
|
417
|
+
if (typeof value === 'number') {
|
|
418
|
+
return value;
|
|
419
|
+
}
|
|
420
|
+
return enumRef[value];
|
|
421
|
+
}
|
|
250
422
|
class KeyValuePair {
|
|
251
423
|
key;
|
|
252
424
|
value;
|
|
@@ -279,7 +451,7 @@ class NamespaceDetail {
|
|
|
279
451
|
let m = new NamespaceDetail();
|
|
280
452
|
m = Object.assign(m, proto);
|
|
281
453
|
if (proto.participantType) {
|
|
282
|
-
m.participantType = enumStringToValue$
|
|
454
|
+
m.participantType = enumStringToValue$e(GlobalParticipantType, proto.participantType);
|
|
283
455
|
}
|
|
284
456
|
return m;
|
|
285
457
|
}
|
|
@@ -307,7 +479,7 @@ class SubjectParticipant {
|
|
|
307
479
|
let m = new SubjectParticipant();
|
|
308
480
|
m = Object.assign(m, proto);
|
|
309
481
|
if (proto.participantType) {
|
|
310
|
-
m.participantType = enumStringToValue$
|
|
482
|
+
m.participantType = enumStringToValue$e(GlobalParticipantType, proto.participantType);
|
|
311
483
|
}
|
|
312
484
|
return m;
|
|
313
485
|
}
|
|
@@ -329,7 +501,7 @@ class SubjectParticipant {
|
|
|
329
501
|
}
|
|
330
502
|
}
|
|
331
503
|
|
|
332
|
-
function enumStringToValue$
|
|
504
|
+
function enumStringToValue$d(enumRef, value) {
|
|
333
505
|
if (typeof value === 'number') {
|
|
334
506
|
return value;
|
|
335
507
|
}
|
|
@@ -389,7 +561,7 @@ class Conversation {
|
|
|
389
561
|
let m = new Conversation();
|
|
390
562
|
m = Object.assign(m, proto);
|
|
391
563
|
if (proto.channel) {
|
|
392
|
-
m.channel = enumStringToValue$
|
|
564
|
+
m.channel = enumStringToValue$d(ConversationChannel, proto.channel);
|
|
393
565
|
}
|
|
394
566
|
if (proto.created) {
|
|
395
567
|
m.created = new Date(proto.created);
|
|
@@ -404,7 +576,7 @@ class Conversation {
|
|
|
404
576
|
m.latestMsgSentTime = new Date(proto.latestMsgSentTime);
|
|
405
577
|
}
|
|
406
578
|
if (proto.originLocation) {
|
|
407
|
-
m.originLocation = enumStringToValue$
|
|
579
|
+
m.originLocation = enumStringToValue$d(PlatformLocation, proto.originLocation);
|
|
408
580
|
}
|
|
409
581
|
if (proto.lastSeenByParticipant) {
|
|
410
582
|
m.lastSeenByParticipant = proto.lastSeenByParticipant.map(LastSeenByParticipant.fromProto);
|
|
@@ -514,7 +686,7 @@ class ConversationKey {
|
|
|
514
686
|
m.subjectParticipants = proto.subjectParticipants.map(SubjectParticipant.fromProto);
|
|
515
687
|
}
|
|
516
688
|
if (proto.channel) {
|
|
517
|
-
m.channel = enumStringToValue$
|
|
689
|
+
m.channel = enumStringToValue$d(ConversationChannel, proto.channel);
|
|
518
690
|
}
|
|
519
691
|
return m;
|
|
520
692
|
}
|
|
@@ -626,7 +798,7 @@ class SubjectParticipantKey {
|
|
|
626
798
|
}
|
|
627
799
|
}
|
|
628
800
|
|
|
629
|
-
function enumStringToValue$
|
|
801
|
+
function enumStringToValue$c(enumRef, value) {
|
|
630
802
|
if (typeof value === 'number') {
|
|
631
803
|
return value;
|
|
632
804
|
}
|
|
@@ -673,7 +845,7 @@ class UIButton {
|
|
|
673
845
|
}
|
|
674
846
|
}
|
|
675
847
|
|
|
676
|
-
function enumStringToValue$
|
|
848
|
+
function enumStringToValue$b(enumRef, value) {
|
|
677
849
|
if (typeof value === 'number') {
|
|
678
850
|
return value;
|
|
679
851
|
}
|
|
@@ -700,7 +872,7 @@ class Message {
|
|
|
700
872
|
let m = new Message();
|
|
701
873
|
m = Object.assign(m, proto);
|
|
702
874
|
if (proto.type) {
|
|
703
|
-
m.type = enumStringToValue$
|
|
875
|
+
m.type = enumStringToValue$b(MessageType, proto.type);
|
|
704
876
|
}
|
|
705
877
|
if (proto.created) {
|
|
706
878
|
m.created = new Date(proto.created);
|
|
@@ -715,7 +887,7 @@ class Message {
|
|
|
715
887
|
m.sendStatus = SendStatus.fromProto(proto.sendStatus);
|
|
716
888
|
}
|
|
717
889
|
if (proto.channel) {
|
|
718
|
-
m.channel = enumStringToValue$
|
|
890
|
+
m.channel = enumStringToValue$b(ConversationChannel, proto.channel);
|
|
719
891
|
}
|
|
720
892
|
if (proto.metadata) {
|
|
721
893
|
m.metadata = proto.metadata.map(KeyValuePair.fromProto);
|
|
@@ -793,7 +965,7 @@ class ParticipantMessageStatus {
|
|
|
793
965
|
let m = new ParticipantMessageStatus();
|
|
794
966
|
m = Object.assign(m, proto);
|
|
795
967
|
if (proto.status) {
|
|
796
|
-
m.status = enumStringToValue$
|
|
968
|
+
m.status = enumStringToValue$b(MessageStatus, proto.status);
|
|
797
969
|
}
|
|
798
970
|
if (proto.updated) {
|
|
799
971
|
m.updated = new Date(proto.updated);
|
|
@@ -832,7 +1004,7 @@ class SendStatus {
|
|
|
832
1004
|
let m = new SendStatus();
|
|
833
1005
|
m = Object.assign(m, proto);
|
|
834
1006
|
if (proto.status) {
|
|
835
|
-
m.status = enumStringToValue$
|
|
1007
|
+
m.status = enumStringToValue$b(MessageStatus, proto.status);
|
|
836
1008
|
}
|
|
837
1009
|
if (proto.created) {
|
|
838
1010
|
m.created = new Date(proto.created);
|
|
@@ -869,7 +1041,7 @@ class UIComponent {
|
|
|
869
1041
|
let m = new UIComponent();
|
|
870
1042
|
m = Object.assign(m, proto);
|
|
871
1043
|
if (proto.type) {
|
|
872
|
-
m.type = enumStringToValue$
|
|
1044
|
+
m.type = enumStringToValue$b(UIComponentType, proto.type);
|
|
873
1045
|
}
|
|
874
1046
|
if (proto.button) {
|
|
875
1047
|
m.button = UIButton.fromProto(proto.button);
|
|
@@ -894,7 +1066,7 @@ class UIComponent {
|
|
|
894
1066
|
}
|
|
895
1067
|
}
|
|
896
1068
|
|
|
897
|
-
function enumStringToValue$
|
|
1069
|
+
function enumStringToValue$a(enumRef, value) {
|
|
898
1070
|
if (typeof value === 'number') {
|
|
899
1071
|
return value;
|
|
900
1072
|
}
|
|
@@ -965,10 +1137,10 @@ class Participant {
|
|
|
965
1137
|
let m = new Participant();
|
|
966
1138
|
m = Object.assign(m, proto);
|
|
967
1139
|
if (proto.location) {
|
|
968
|
-
m.location = enumStringToValue$
|
|
1140
|
+
m.location = enumStringToValue$a(PlatformLocation, proto.location);
|
|
969
1141
|
}
|
|
970
1142
|
if (proto.channel) {
|
|
971
|
-
m.channel = enumStringToValue$
|
|
1143
|
+
m.channel = enumStringToValue$a(ConversationChannel, proto.channel);
|
|
972
1144
|
}
|
|
973
1145
|
if (proto.created) {
|
|
974
1146
|
m.created = new Date(proto.created);
|
|
@@ -980,7 +1152,7 @@ class Participant {
|
|
|
980
1152
|
m.deleted = new Date(proto.deleted);
|
|
981
1153
|
}
|
|
982
1154
|
if (proto.participantType) {
|
|
983
|
-
m.participantType = enumStringToValue$
|
|
1155
|
+
m.participantType = enumStringToValue$a(ParticipantType, proto.participantType);
|
|
984
1156
|
}
|
|
985
1157
|
if (proto.address) {
|
|
986
1158
|
m.address = Address.fromProto(proto.address);
|
|
@@ -1070,13 +1242,13 @@ class ParticipantKey {
|
|
|
1070
1242
|
let m = new ParticipantKey();
|
|
1071
1243
|
m = Object.assign(m, proto);
|
|
1072
1244
|
if (proto.location) {
|
|
1073
|
-
m.location = enumStringToValue$
|
|
1245
|
+
m.location = enumStringToValue$a(PlatformLocation, proto.location);
|
|
1074
1246
|
}
|
|
1075
1247
|
if (proto.channels) {
|
|
1076
|
-
m.channels = proto.channels.map((v) => enumStringToValue$
|
|
1248
|
+
m.channels = proto.channels.map((v) => enumStringToValue$a(ConversationChannel, v));
|
|
1077
1249
|
}
|
|
1078
1250
|
if (proto.participantType) {
|
|
1079
|
-
m.participantType = enumStringToValue$
|
|
1251
|
+
m.participantType = enumStringToValue$a(GlobalParticipantType, proto.participantType);
|
|
1080
1252
|
}
|
|
1081
1253
|
if (proto.namespaceHierarchy) {
|
|
1082
1254
|
m.namespaceHierarchy = proto.namespaceHierarchy.map(NamespaceDetail.fromProto);
|
|
@@ -1116,7 +1288,7 @@ class ParticipantKey {
|
|
|
1116
1288
|
}
|
|
1117
1289
|
}
|
|
1118
1290
|
|
|
1119
|
-
function enumStringToValue$
|
|
1291
|
+
function enumStringToValue$9(enumRef, value) {
|
|
1120
1292
|
if (typeof value === 'number') {
|
|
1121
1293
|
return value;
|
|
1122
1294
|
}
|
|
@@ -1169,7 +1341,7 @@ class MCPOptions {
|
|
|
1169
1341
|
}
|
|
1170
1342
|
}
|
|
1171
1343
|
|
|
1172
|
-
function enumStringToValue$
|
|
1344
|
+
function enumStringToValue$8(enumRef, value) {
|
|
1173
1345
|
if (typeof value === 'number') {
|
|
1174
1346
|
return value;
|
|
1175
1347
|
}
|
|
@@ -1339,7 +1511,7 @@ class ProductFeature {
|
|
|
1339
1511
|
}
|
|
1340
1512
|
}
|
|
1341
1513
|
|
|
1342
|
-
function enumStringToValue$
|
|
1514
|
+
function enumStringToValue$7(enumRef, value) {
|
|
1343
1515
|
if (typeof value === 'number') {
|
|
1344
1516
|
return value;
|
|
1345
1517
|
}
|
|
@@ -1374,7 +1546,7 @@ class View {
|
|
|
1374
1546
|
}
|
|
1375
1547
|
}
|
|
1376
1548
|
|
|
1377
|
-
function enumStringToValue$
|
|
1549
|
+
function enumStringToValue$6(enumRef, value) {
|
|
1378
1550
|
if (typeof value === 'number') {
|
|
1379
1551
|
return value;
|
|
1380
1552
|
}
|
|
@@ -1433,7 +1605,7 @@ class Widget {
|
|
|
1433
1605
|
let m = new Widget();
|
|
1434
1606
|
m = Object.assign(m, proto);
|
|
1435
1607
|
if (proto.position) {
|
|
1436
|
-
m.position = enumStringToValue$
|
|
1608
|
+
m.position = enumStringToValue$6(WidgetPosition, proto.position);
|
|
1437
1609
|
}
|
|
1438
1610
|
if (proto.created) {
|
|
1439
1611
|
m.created = new Date(proto.created);
|
|
@@ -1524,7 +1696,7 @@ class Widget {
|
|
|
1524
1696
|
}
|
|
1525
1697
|
}
|
|
1526
1698
|
|
|
1527
|
-
function enumStringToValue$
|
|
1699
|
+
function enumStringToValue$5(enumRef, value) {
|
|
1528
1700
|
if (typeof value === 'number') {
|
|
1529
1701
|
return value;
|
|
1530
1702
|
}
|
|
@@ -1542,7 +1714,7 @@ class ResponseEvaluation {
|
|
|
1542
1714
|
let m = new ResponseEvaluation();
|
|
1543
1715
|
m = Object.assign(m, proto);
|
|
1544
1716
|
if (proto.sentiment) {
|
|
1545
|
-
m.sentiment = enumStringToValue$
|
|
1717
|
+
m.sentiment = enumStringToValue$5(EvaluationSentiment, proto.sentiment);
|
|
1546
1718
|
}
|
|
1547
1719
|
if (proto.createdAt) {
|
|
1548
1720
|
m.createdAt = new Date(proto.createdAt);
|
|
@@ -1585,7 +1757,7 @@ class ResponseEvaluation {
|
|
|
1585
1757
|
}
|
|
1586
1758
|
}
|
|
1587
1759
|
|
|
1588
|
-
function enumStringToValue$
|
|
1760
|
+
function enumStringToValue$4(enumRef, value) {
|
|
1589
1761
|
if (typeof value === 'number') {
|
|
1590
1762
|
return value;
|
|
1591
1763
|
}
|
|
@@ -1613,7 +1785,7 @@ class FieldMask {
|
|
|
1613
1785
|
}
|
|
1614
1786
|
}
|
|
1615
1787
|
|
|
1616
|
-
function enumStringToValue$
|
|
1788
|
+
function enumStringToValue$3(enumRef, value) {
|
|
1617
1789
|
if (typeof value === 'number') {
|
|
1618
1790
|
return value;
|
|
1619
1791
|
}
|
|
@@ -1656,178 +1828,6 @@ class MessageTemplate {
|
|
|
1656
1828
|
}
|
|
1657
1829
|
}
|
|
1658
1830
|
|
|
1659
|
-
function enumStringToValue$3(enumRef, value) {
|
|
1660
|
-
if (typeof value === 'number') {
|
|
1661
|
-
return value;
|
|
1662
|
-
}
|
|
1663
|
-
return enumRef[value];
|
|
1664
|
-
}
|
|
1665
|
-
class AISystemMessage {
|
|
1666
|
-
systemMessageId;
|
|
1667
|
-
systemMessageBody;
|
|
1668
|
-
iamUserId;
|
|
1669
|
-
updated;
|
|
1670
|
-
static fromProto(proto) {
|
|
1671
|
-
let m = new AISystemMessage();
|
|
1672
|
-
m = Object.assign(m, proto);
|
|
1673
|
-
if (proto.updated) {
|
|
1674
|
-
m.updated = new Date(proto.updated);
|
|
1675
|
-
}
|
|
1676
|
-
return m;
|
|
1677
|
-
}
|
|
1678
|
-
constructor(kwargs) {
|
|
1679
|
-
if (!kwargs) {
|
|
1680
|
-
return;
|
|
1681
|
-
}
|
|
1682
|
-
Object.assign(this, kwargs);
|
|
1683
|
-
}
|
|
1684
|
-
toApiJson() {
|
|
1685
|
-
const toReturn = {};
|
|
1686
|
-
if (typeof this.systemMessageId !== 'undefined') {
|
|
1687
|
-
toReturn['systemMessageId'] = this.systemMessageId;
|
|
1688
|
-
}
|
|
1689
|
-
if (typeof this.systemMessageBody !== 'undefined') {
|
|
1690
|
-
toReturn['systemMessageBody'] = this.systemMessageBody;
|
|
1691
|
-
}
|
|
1692
|
-
if (typeof this.iamUserId !== 'undefined') {
|
|
1693
|
-
toReturn['iamUserId'] = this.iamUserId;
|
|
1694
|
-
}
|
|
1695
|
-
if (typeof this.updated !== 'undefined' && this.updated !== null) {
|
|
1696
|
-
toReturn['updated'] = 'toApiJson' in this.updated ? this.updated.toApiJson() : this.updated;
|
|
1697
|
-
}
|
|
1698
|
-
return toReturn;
|
|
1699
|
-
}
|
|
1700
|
-
}
|
|
1701
|
-
class GetAISystemMessageRequest {
|
|
1702
|
-
systemMessageId;
|
|
1703
|
-
static fromProto(proto) {
|
|
1704
|
-
let m = new GetAISystemMessageRequest();
|
|
1705
|
-
m = Object.assign(m, proto);
|
|
1706
|
-
return m;
|
|
1707
|
-
}
|
|
1708
|
-
constructor(kwargs) {
|
|
1709
|
-
if (!kwargs) {
|
|
1710
|
-
return;
|
|
1711
|
-
}
|
|
1712
|
-
Object.assign(this, kwargs);
|
|
1713
|
-
}
|
|
1714
|
-
toApiJson() {
|
|
1715
|
-
const toReturn = {};
|
|
1716
|
-
if (typeof this.systemMessageId !== 'undefined') {
|
|
1717
|
-
toReturn['systemMessageId'] = this.systemMessageId;
|
|
1718
|
-
}
|
|
1719
|
-
return toReturn;
|
|
1720
|
-
}
|
|
1721
|
-
}
|
|
1722
|
-
class GetAISystemMessageResponse {
|
|
1723
|
-
systemMessage;
|
|
1724
|
-
static fromProto(proto) {
|
|
1725
|
-
let m = new GetAISystemMessageResponse();
|
|
1726
|
-
m = Object.assign(m, proto);
|
|
1727
|
-
if (proto.systemMessage) {
|
|
1728
|
-
m.systemMessage = AISystemMessage.fromProto(proto.systemMessage);
|
|
1729
|
-
}
|
|
1730
|
-
return m;
|
|
1731
|
-
}
|
|
1732
|
-
constructor(kwargs) {
|
|
1733
|
-
if (!kwargs) {
|
|
1734
|
-
return;
|
|
1735
|
-
}
|
|
1736
|
-
Object.assign(this, kwargs);
|
|
1737
|
-
}
|
|
1738
|
-
toApiJson() {
|
|
1739
|
-
const toReturn = {};
|
|
1740
|
-
if (typeof this.systemMessage !== 'undefined' && this.systemMessage !== null) {
|
|
1741
|
-
toReturn['systemMessage'] = 'toApiJson' in this.systemMessage ? this.systemMessage.toApiJson() : this.systemMessage;
|
|
1742
|
-
}
|
|
1743
|
-
return toReturn;
|
|
1744
|
-
}
|
|
1745
|
-
}
|
|
1746
|
-
class ListAISystemMessagesRequest {
|
|
1747
|
-
cursor;
|
|
1748
|
-
pageSize;
|
|
1749
|
-
static fromProto(proto) {
|
|
1750
|
-
let m = new ListAISystemMessagesRequest();
|
|
1751
|
-
m = Object.assign(m, proto);
|
|
1752
|
-
if (proto.pageSize) {
|
|
1753
|
-
m.pageSize = parseInt(proto.pageSize, 10);
|
|
1754
|
-
}
|
|
1755
|
-
return m;
|
|
1756
|
-
}
|
|
1757
|
-
constructor(kwargs) {
|
|
1758
|
-
if (!kwargs) {
|
|
1759
|
-
return;
|
|
1760
|
-
}
|
|
1761
|
-
Object.assign(this, kwargs);
|
|
1762
|
-
}
|
|
1763
|
-
toApiJson() {
|
|
1764
|
-
const toReturn = {};
|
|
1765
|
-
if (typeof this.cursor !== 'undefined') {
|
|
1766
|
-
toReturn['cursor'] = this.cursor;
|
|
1767
|
-
}
|
|
1768
|
-
if (typeof this.pageSize !== 'undefined') {
|
|
1769
|
-
toReturn['pageSize'] = this.pageSize;
|
|
1770
|
-
}
|
|
1771
|
-
return toReturn;
|
|
1772
|
-
}
|
|
1773
|
-
}
|
|
1774
|
-
class ListAISystemMessagesResponse {
|
|
1775
|
-
aiSystemMessages;
|
|
1776
|
-
nextCursor;
|
|
1777
|
-
hasMore;
|
|
1778
|
-
static fromProto(proto) {
|
|
1779
|
-
let m = new ListAISystemMessagesResponse();
|
|
1780
|
-
m = Object.assign(m, proto);
|
|
1781
|
-
if (proto.aiSystemMessages) {
|
|
1782
|
-
m.aiSystemMessages = proto.aiSystemMessages.map(AISystemMessage.fromProto);
|
|
1783
|
-
}
|
|
1784
|
-
return m;
|
|
1785
|
-
}
|
|
1786
|
-
constructor(kwargs) {
|
|
1787
|
-
if (!kwargs) {
|
|
1788
|
-
return;
|
|
1789
|
-
}
|
|
1790
|
-
Object.assign(this, kwargs);
|
|
1791
|
-
}
|
|
1792
|
-
toApiJson() {
|
|
1793
|
-
const toReturn = {};
|
|
1794
|
-
if (typeof this.aiSystemMessages !== 'undefined' && this.aiSystemMessages !== null) {
|
|
1795
|
-
toReturn['aiSystemMessages'] = 'toApiJson' in this.aiSystemMessages ? this.aiSystemMessages.toApiJson() : this.aiSystemMessages;
|
|
1796
|
-
}
|
|
1797
|
-
if (typeof this.nextCursor !== 'undefined') {
|
|
1798
|
-
toReturn['nextCursor'] = this.nextCursor;
|
|
1799
|
-
}
|
|
1800
|
-
if (typeof this.hasMore !== 'undefined') {
|
|
1801
|
-
toReturn['hasMore'] = this.hasMore;
|
|
1802
|
-
}
|
|
1803
|
-
return toReturn;
|
|
1804
|
-
}
|
|
1805
|
-
}
|
|
1806
|
-
class UpsertAISystemMessageRequest {
|
|
1807
|
-
systemMessage;
|
|
1808
|
-
static fromProto(proto) {
|
|
1809
|
-
let m = new UpsertAISystemMessageRequest();
|
|
1810
|
-
m = Object.assign(m, proto);
|
|
1811
|
-
if (proto.systemMessage) {
|
|
1812
|
-
m.systemMessage = AISystemMessage.fromProto(proto.systemMessage);
|
|
1813
|
-
}
|
|
1814
|
-
return m;
|
|
1815
|
-
}
|
|
1816
|
-
constructor(kwargs) {
|
|
1817
|
-
if (!kwargs) {
|
|
1818
|
-
return;
|
|
1819
|
-
}
|
|
1820
|
-
Object.assign(this, kwargs);
|
|
1821
|
-
}
|
|
1822
|
-
toApiJson() {
|
|
1823
|
-
const toReturn = {};
|
|
1824
|
-
if (typeof this.systemMessage !== 'undefined' && this.systemMessage !== null) {
|
|
1825
|
-
toReturn['systemMessage'] = 'toApiJson' in this.systemMessage ? this.systemMessage.toApiJson() : this.systemMessage;
|
|
1826
|
-
}
|
|
1827
|
-
return toReturn;
|
|
1828
|
-
}
|
|
1829
|
-
}
|
|
1830
|
-
|
|
1831
1831
|
function enumStringToValue$2(enumRef, value) {
|
|
1832
1832
|
if (typeof value === 'number') {
|
|
1833
1833
|
return value;
|
|
@@ -2785,27 +2785,22 @@ class DeleteWidgetRequest {
|
|
|
2785
2785
|
return toReturn;
|
|
2786
2786
|
}
|
|
2787
2787
|
}
|
|
2788
|
-
class
|
|
2788
|
+
class SearchConversationsResponseDetailedConversation {
|
|
2789
2789
|
conversation;
|
|
2790
|
+
latestMessage;
|
|
2790
2791
|
participants;
|
|
2791
|
-
summary;
|
|
2792
|
-
event;
|
|
2793
|
-
message;
|
|
2794
2792
|
static fromProto(proto) {
|
|
2795
|
-
let m = new
|
|
2793
|
+
let m = new SearchConversationsResponseDetailedConversation();
|
|
2796
2794
|
m = Object.assign(m, proto);
|
|
2797
2795
|
if (proto.conversation) {
|
|
2798
2796
|
m.conversation = Conversation.fromProto(proto.conversation);
|
|
2799
2797
|
}
|
|
2798
|
+
if (proto.latestMessage) {
|
|
2799
|
+
m.latestMessage = Message.fromProto(proto.latestMessage);
|
|
2800
|
+
}
|
|
2800
2801
|
if (proto.participants) {
|
|
2801
2802
|
m.participants = proto.participants.map(Participant.fromProto);
|
|
2802
2803
|
}
|
|
2803
|
-
if (proto.event) {
|
|
2804
|
-
m.event = Event.fromProto(proto.event);
|
|
2805
|
-
}
|
|
2806
|
-
if (proto.message) {
|
|
2807
|
-
m.message = Message.fromProto(proto.message);
|
|
2808
|
-
}
|
|
2809
2804
|
return m;
|
|
2810
2805
|
}
|
|
2811
2806
|
constructor(kwargs) {
|
|
@@ -2819,37 +2814,36 @@ class GetMultiConversationDetailsV2ResponseDetailedConversation {
|
|
|
2819
2814
|
if (typeof this.conversation !== 'undefined' && this.conversation !== null) {
|
|
2820
2815
|
toReturn['conversation'] = 'toApiJson' in this.conversation ? this.conversation.toApiJson() : this.conversation;
|
|
2821
2816
|
}
|
|
2817
|
+
if (typeof this.latestMessage !== 'undefined' && this.latestMessage !== null) {
|
|
2818
|
+
toReturn['latestMessage'] = 'toApiJson' in this.latestMessage ? this.latestMessage.toApiJson() : this.latestMessage;
|
|
2819
|
+
}
|
|
2822
2820
|
if (typeof this.participants !== 'undefined' && this.participants !== null) {
|
|
2823
2821
|
toReturn['participants'] = 'toApiJson' in this.participants ? this.participants.toApiJson() : this.participants;
|
|
2824
2822
|
}
|
|
2825
|
-
if (typeof this.summary !== 'undefined') {
|
|
2826
|
-
toReturn['summary'] = this.summary;
|
|
2827
|
-
}
|
|
2828
|
-
if (typeof this.event !== 'undefined' && this.event !== null) {
|
|
2829
|
-
toReturn['event'] = 'toApiJson' in this.event ? this.event.toApiJson() : this.event;
|
|
2830
|
-
}
|
|
2831
|
-
if (typeof this.message !== 'undefined' && this.message !== null) {
|
|
2832
|
-
toReturn['message'] = 'toApiJson' in this.message ? this.message.toApiJson() : this.message;
|
|
2833
|
-
}
|
|
2834
2823
|
return toReturn;
|
|
2835
2824
|
}
|
|
2836
2825
|
}
|
|
2837
|
-
class
|
|
2826
|
+
class GetMultiConversationDetailsV2ResponseDetailedConversation {
|
|
2838
2827
|
conversation;
|
|
2839
|
-
latestMessage;
|
|
2840
2828
|
participants;
|
|
2829
|
+
summary;
|
|
2830
|
+
event;
|
|
2831
|
+
message;
|
|
2841
2832
|
static fromProto(proto) {
|
|
2842
|
-
let m = new
|
|
2833
|
+
let m = new GetMultiConversationDetailsV2ResponseDetailedConversation();
|
|
2843
2834
|
m = Object.assign(m, proto);
|
|
2844
2835
|
if (proto.conversation) {
|
|
2845
2836
|
m.conversation = Conversation.fromProto(proto.conversation);
|
|
2846
2837
|
}
|
|
2847
|
-
if (proto.latestMessage) {
|
|
2848
|
-
m.latestMessage = Message.fromProto(proto.latestMessage);
|
|
2849
|
-
}
|
|
2850
2838
|
if (proto.participants) {
|
|
2851
2839
|
m.participants = proto.participants.map(Participant.fromProto);
|
|
2852
2840
|
}
|
|
2841
|
+
if (proto.event) {
|
|
2842
|
+
m.event = Event.fromProto(proto.event);
|
|
2843
|
+
}
|
|
2844
|
+
if (proto.message) {
|
|
2845
|
+
m.message = Message.fromProto(proto.message);
|
|
2846
|
+
}
|
|
2853
2847
|
return m;
|
|
2854
2848
|
}
|
|
2855
2849
|
constructor(kwargs) {
|
|
@@ -2863,12 +2857,18 @@ class SearchConversationsResponseDetailedConversation {
|
|
|
2863
2857
|
if (typeof this.conversation !== 'undefined' && this.conversation !== null) {
|
|
2864
2858
|
toReturn['conversation'] = 'toApiJson' in this.conversation ? this.conversation.toApiJson() : this.conversation;
|
|
2865
2859
|
}
|
|
2866
|
-
if (typeof this.latestMessage !== 'undefined' && this.latestMessage !== null) {
|
|
2867
|
-
toReturn['latestMessage'] = 'toApiJson' in this.latestMessage ? this.latestMessage.toApiJson() : this.latestMessage;
|
|
2868
|
-
}
|
|
2869
2860
|
if (typeof this.participants !== 'undefined' && this.participants !== null) {
|
|
2870
2861
|
toReturn['participants'] = 'toApiJson' in this.participants ? this.participants.toApiJson() : this.participants;
|
|
2871
2862
|
}
|
|
2863
|
+
if (typeof this.summary !== 'undefined') {
|
|
2864
|
+
toReturn['summary'] = this.summary;
|
|
2865
|
+
}
|
|
2866
|
+
if (typeof this.event !== 'undefined' && this.event !== null) {
|
|
2867
|
+
toReturn['event'] = 'toApiJson' in this.event ? this.event.toApiJson() : this.event;
|
|
2868
|
+
}
|
|
2869
|
+
if (typeof this.message !== 'undefined' && this.message !== null) {
|
|
2870
|
+
toReturn['message'] = 'toApiJson' in this.message ? this.message.toApiJson() : this.message;
|
|
2871
|
+
}
|
|
2872
2872
|
return toReturn;
|
|
2873
2873
|
}
|
|
2874
2874
|
}
|
|
@@ -3017,22 +3017,18 @@ class ExportConversationsResponse {
|
|
|
3017
3017
|
return toReturn;
|
|
3018
3018
|
}
|
|
3019
3019
|
}
|
|
3020
|
-
class
|
|
3020
|
+
class ListConversationExportsRequestFilterOptions {
|
|
3021
|
+
platformLocation;
|
|
3021
3022
|
subjectParticipant;
|
|
3022
|
-
startTime;
|
|
3023
|
-
endTime;
|
|
3024
3023
|
static fromProto(proto) {
|
|
3025
|
-
let m = new
|
|
3024
|
+
let m = new ListConversationExportsRequestFilterOptions();
|
|
3026
3025
|
m = Object.assign(m, proto);
|
|
3026
|
+
if (proto.platformLocation) {
|
|
3027
|
+
m.platformLocation = enumStringToValue(PlatformLocation, proto.platformLocation);
|
|
3028
|
+
}
|
|
3027
3029
|
if (proto.subjectParticipant) {
|
|
3028
3030
|
m.subjectParticipant = SubjectParticipant.fromProto(proto.subjectParticipant);
|
|
3029
3031
|
}
|
|
3030
|
-
if (proto.startTime) {
|
|
3031
|
-
m.startTime = new Date(proto.startTime);
|
|
3032
|
-
}
|
|
3033
|
-
if (proto.endTime) {
|
|
3034
|
-
m.endTime = new Date(proto.endTime);
|
|
3035
|
-
}
|
|
3036
3032
|
return m;
|
|
3037
3033
|
}
|
|
3038
3034
|
constructor(kwargs) {
|
|
@@ -3043,23 +3039,32 @@ class ExportConversationsRequestFilterOptions {
|
|
|
3043
3039
|
}
|
|
3044
3040
|
toApiJson() {
|
|
3045
3041
|
const toReturn = {};
|
|
3042
|
+
if (typeof this.platformLocation !== 'undefined') {
|
|
3043
|
+
toReturn['platformLocation'] = this.platformLocation;
|
|
3044
|
+
}
|
|
3046
3045
|
if (typeof this.subjectParticipant !== 'undefined' && this.subjectParticipant !== null) {
|
|
3047
3046
|
toReturn['subjectParticipant'] = 'toApiJson' in this.subjectParticipant ? this.subjectParticipant.toApiJson() : this.subjectParticipant;
|
|
3048
3047
|
}
|
|
3049
|
-
if (typeof this.startTime !== 'undefined' && this.startTime !== null) {
|
|
3050
|
-
toReturn['startTime'] = 'toApiJson' in this.startTime ? this.startTime.toApiJson() : this.startTime;
|
|
3051
|
-
}
|
|
3052
|
-
if (typeof this.endTime !== 'undefined' && this.endTime !== null) {
|
|
3053
|
-
toReturn['endTime'] = 'toApiJson' in this.endTime ? this.endTime.toApiJson() : this.endTime;
|
|
3054
|
-
}
|
|
3055
3048
|
return toReturn;
|
|
3056
3049
|
}
|
|
3057
3050
|
}
|
|
3058
|
-
class
|
|
3051
|
+
class ExportConversationsRequestFilterOptions {
|
|
3052
|
+
subjectParticipant;
|
|
3053
|
+
startTime;
|
|
3054
|
+
endTime;
|
|
3059
3055
|
platformLocation;
|
|
3060
3056
|
static fromProto(proto) {
|
|
3061
|
-
let m = new
|
|
3057
|
+
let m = new ExportConversationsRequestFilterOptions();
|
|
3062
3058
|
m = Object.assign(m, proto);
|
|
3059
|
+
if (proto.subjectParticipant) {
|
|
3060
|
+
m.subjectParticipant = SubjectParticipant.fromProto(proto.subjectParticipant);
|
|
3061
|
+
}
|
|
3062
|
+
if (proto.startTime) {
|
|
3063
|
+
m.startTime = new Date(proto.startTime);
|
|
3064
|
+
}
|
|
3065
|
+
if (proto.endTime) {
|
|
3066
|
+
m.endTime = new Date(proto.endTime);
|
|
3067
|
+
}
|
|
3063
3068
|
if (proto.platformLocation) {
|
|
3064
3069
|
m.platformLocation = enumStringToValue(PlatformLocation, proto.platformLocation);
|
|
3065
3070
|
}
|
|
@@ -3073,6 +3078,15 @@ class ListConversationExportsRequestFilterOptions {
|
|
|
3073
3078
|
}
|
|
3074
3079
|
toApiJson() {
|
|
3075
3080
|
const toReturn = {};
|
|
3081
|
+
if (typeof this.subjectParticipant !== 'undefined' && this.subjectParticipant !== null) {
|
|
3082
|
+
toReturn['subjectParticipant'] = 'toApiJson' in this.subjectParticipant ? this.subjectParticipant.toApiJson() : this.subjectParticipant;
|
|
3083
|
+
}
|
|
3084
|
+
if (typeof this.startTime !== 'undefined' && this.startTime !== null) {
|
|
3085
|
+
toReturn['startTime'] = 'toApiJson' in this.startTime ? this.startTime.toApiJson() : this.startTime;
|
|
3086
|
+
}
|
|
3087
|
+
if (typeof this.endTime !== 'undefined' && this.endTime !== null) {
|
|
3088
|
+
toReturn['endTime'] = 'toApiJson' in this.endTime ? this.endTime.toApiJson() : this.endTime;
|
|
3089
|
+
}
|
|
3076
3090
|
if (typeof this.platformLocation !== 'undefined') {
|
|
3077
3091
|
toReturn['platformLocation'] = this.platformLocation;
|
|
3078
3092
|
}
|
|
@@ -5561,9 +5575,13 @@ class SendWidgetMessageRequest {
|
|
|
5561
5575
|
}
|
|
5562
5576
|
class SendWidgetMessageResponse {
|
|
5563
5577
|
messageId;
|
|
5578
|
+
createdAt;
|
|
5564
5579
|
static fromProto(proto) {
|
|
5565
5580
|
let m = new SendWidgetMessageResponse();
|
|
5566
5581
|
m = Object.assign(m, proto);
|
|
5582
|
+
if (proto.createdAt) {
|
|
5583
|
+
m.createdAt = new Date(proto.createdAt);
|
|
5584
|
+
}
|
|
5567
5585
|
return m;
|
|
5568
5586
|
}
|
|
5569
5587
|
constructor(kwargs) {
|
|
@@ -5577,6 +5595,9 @@ class SendWidgetMessageResponse {
|
|
|
5577
5595
|
if (typeof this.messageId !== 'undefined') {
|
|
5578
5596
|
toReturn['messageId'] = this.messageId;
|
|
5579
5597
|
}
|
|
5598
|
+
if (typeof this.createdAt !== 'undefined' && this.createdAt !== null) {
|
|
5599
|
+
toReturn['createdAt'] = 'toApiJson' in this.createdAt ? this.createdAt.toApiJson() : this.createdAt;
|
|
5600
|
+
}
|
|
5580
5601
|
return toReturn;
|
|
5581
5602
|
}
|
|
5582
5603
|
}
|