@vendasta/conversation 0.37.0 → 0.39.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/esm2020/lib/_internal/conversation.api.service.mjs +15 -2
- package/esm2020/lib/_internal/interfaces/api.interface.mjs +1 -1
- package/esm2020/lib/_internal/interfaces/field-mask.interface.mjs +8 -0
- package/esm2020/lib/_internal/interfaces/index.mjs +1 -1
- package/esm2020/lib/_internal/interfaces/message.interface.mjs +1 -1
- package/esm2020/lib/_internal/interfaces/widget.interface.mjs +1 -1
- package/esm2020/lib/_internal/objects/api.mjs +122 -5
- package/esm2020/lib/_internal/objects/field-mask.mjs +27 -0
- package/esm2020/lib/_internal/objects/index.mjs +4 -3
- package/esm2020/lib/_internal/objects/message.mjs +39 -1
- package/esm2020/lib/_internal/objects/widget.mjs +7 -1
- package/fesm2015/vendasta-conversation.mjs +226 -26
- package/fesm2015/vendasta-conversation.mjs.map +1 -1
- package/fesm2020/vendasta-conversation.mjs +226 -26
- package/fesm2020/vendasta-conversation.mjs.map +1 -1
- package/lib/_internal/conversation.api.service.d.ts +5 -2
- package/lib/_internal/interfaces/api.interface.d.ts +21 -2
- package/lib/_internal/interfaces/field-mask.interface.d.ts +3 -0
- package/lib/_internal/interfaces/index.d.ts +3 -2
- package/lib/_internal/interfaces/message.interface.d.ts +6 -0
- package/lib/_internal/interfaces/widget.interface.d.ts +2 -0
- package/lib/_internal/objects/api.d.ts +37 -6
- package/lib/_internal/objects/field-mask.d.ts +8 -0
- package/lib/_internal/objects/index.d.ts +3 -2
- package/lib/_internal/objects/message.d.ts +9 -0
- package/lib/_internal/objects/widget.d.ts +2 -0
- package/package.json +1 -1
|
@@ -151,7 +151,7 @@ var SetLastSeenRequestStatus;
|
|
|
151
151
|
// Enums Index.
|
|
152
152
|
// *********************************
|
|
153
153
|
|
|
154
|
-
function enumStringToValue$
|
|
154
|
+
function enumStringToValue$9(enumRef, value) {
|
|
155
155
|
if (typeof value === 'number') {
|
|
156
156
|
return value;
|
|
157
157
|
}
|
|
@@ -162,7 +162,7 @@ class Message {
|
|
|
162
162
|
let m = new Message();
|
|
163
163
|
m = Object.assign(m, proto);
|
|
164
164
|
if (proto.type) {
|
|
165
|
-
m.type = enumStringToValue$
|
|
165
|
+
m.type = enumStringToValue$9(MessageType, proto.type);
|
|
166
166
|
}
|
|
167
167
|
if (proto.created) {
|
|
168
168
|
m.created = new Date(proto.created);
|
|
@@ -173,6 +173,9 @@ class Message {
|
|
|
173
173
|
if (proto.deleted) {
|
|
174
174
|
m.deleted = new Date(proto.deleted);
|
|
175
175
|
}
|
|
176
|
+
if (proto.sendStatus) {
|
|
177
|
+
m.sendStatus = SendStatus.fromProto(proto.sendStatus);
|
|
178
|
+
}
|
|
176
179
|
return m;
|
|
177
180
|
}
|
|
178
181
|
constructor(kwargs) {
|
|
@@ -216,6 +219,9 @@ class Message {
|
|
|
216
219
|
if (typeof this.media !== 'undefined') {
|
|
217
220
|
toReturn['media'] = this.media;
|
|
218
221
|
}
|
|
222
|
+
if (typeof this.sendStatus !== 'undefined' && this.sendStatus !== null) {
|
|
223
|
+
toReturn['sendStatus'] = 'toApiJson' in this.sendStatus ? this.sendStatus.toApiJson() : this.sendStatus;
|
|
224
|
+
}
|
|
219
225
|
return toReturn;
|
|
220
226
|
}
|
|
221
227
|
}
|
|
@@ -224,7 +230,7 @@ class ParticipantMessageStatus {
|
|
|
224
230
|
let m = new ParticipantMessageStatus();
|
|
225
231
|
m = Object.assign(m, proto);
|
|
226
232
|
if (proto.status) {
|
|
227
|
-
m.status = enumStringToValue$
|
|
233
|
+
m.status = enumStringToValue$9(MessageStatus, proto.status);
|
|
228
234
|
}
|
|
229
235
|
if (proto.updated) {
|
|
230
236
|
m.updated = new Date(proto.updated);
|
|
@@ -254,8 +260,40 @@ class ParticipantMessageStatus {
|
|
|
254
260
|
return toReturn;
|
|
255
261
|
}
|
|
256
262
|
}
|
|
263
|
+
class SendStatus {
|
|
264
|
+
static fromProto(proto) {
|
|
265
|
+
let m = new SendStatus();
|
|
266
|
+
m = Object.assign(m, proto);
|
|
267
|
+
if (proto.status) {
|
|
268
|
+
m.status = enumStringToValue$9(MessageStatus, proto.status);
|
|
269
|
+
}
|
|
270
|
+
if (proto.created) {
|
|
271
|
+
m.created = new Date(proto.created);
|
|
272
|
+
}
|
|
273
|
+
return m;
|
|
274
|
+
}
|
|
275
|
+
constructor(kwargs) {
|
|
276
|
+
if (!kwargs) {
|
|
277
|
+
return;
|
|
278
|
+
}
|
|
279
|
+
Object.assign(this, kwargs);
|
|
280
|
+
}
|
|
281
|
+
toApiJson() {
|
|
282
|
+
const toReturn = {};
|
|
283
|
+
if (typeof this.status !== 'undefined') {
|
|
284
|
+
toReturn['status'] = this.status;
|
|
285
|
+
}
|
|
286
|
+
if (typeof this.reason !== 'undefined') {
|
|
287
|
+
toReturn['reason'] = this.reason;
|
|
288
|
+
}
|
|
289
|
+
if (typeof this.created !== 'undefined' && this.created !== null) {
|
|
290
|
+
toReturn['created'] = 'toApiJson' in this.created ? this.created.toApiJson() : this.created;
|
|
291
|
+
}
|
|
292
|
+
return toReturn;
|
|
293
|
+
}
|
|
294
|
+
}
|
|
257
295
|
|
|
258
|
-
function enumStringToValue$
|
|
296
|
+
function enumStringToValue$8(enumRef, value) {
|
|
259
297
|
if (typeof value === 'number') {
|
|
260
298
|
return value;
|
|
261
299
|
}
|
|
@@ -266,7 +304,7 @@ class SubjectParticipant {
|
|
|
266
304
|
let m = new SubjectParticipant();
|
|
267
305
|
m = Object.assign(m, proto);
|
|
268
306
|
if (proto.participantType) {
|
|
269
|
-
m.participantType = enumStringToValue$
|
|
307
|
+
m.participantType = enumStringToValue$8(GlobalParticipantType, proto.participantType);
|
|
270
308
|
}
|
|
271
309
|
return m;
|
|
272
310
|
}
|
|
@@ -288,7 +326,7 @@ class SubjectParticipant {
|
|
|
288
326
|
}
|
|
289
327
|
}
|
|
290
328
|
|
|
291
|
-
function enumStringToValue$
|
|
329
|
+
function enumStringToValue$7(enumRef, value) {
|
|
292
330
|
if (typeof value === 'number') {
|
|
293
331
|
return value;
|
|
294
332
|
}
|
|
@@ -299,7 +337,7 @@ class Conversation {
|
|
|
299
337
|
let m = new Conversation();
|
|
300
338
|
m = Object.assign(m, proto);
|
|
301
339
|
if (proto.channel) {
|
|
302
|
-
m.channel = enumStringToValue$
|
|
340
|
+
m.channel = enumStringToValue$7(ConversationChannel, proto.channel);
|
|
303
341
|
}
|
|
304
342
|
if (proto.created) {
|
|
305
343
|
m.created = new Date(proto.created);
|
|
@@ -314,7 +352,7 @@ class Conversation {
|
|
|
314
352
|
m.latestMsgSentTime = new Date(proto.latestMsgSentTime);
|
|
315
353
|
}
|
|
316
354
|
if (proto.originLocation) {
|
|
317
|
-
m.originLocation = enumStringToValue$
|
|
355
|
+
m.originLocation = enumStringToValue$7(PlatformLocation, proto.originLocation);
|
|
318
356
|
}
|
|
319
357
|
if (proto.lastSeenByParticipant) {
|
|
320
358
|
m.lastSeenByParticipant = proto.lastSeenByParticipant.map(LastSeenByParticipant.fromProto);
|
|
@@ -376,7 +414,7 @@ class ConversationKey {
|
|
|
376
414
|
m.subjectParticipants = proto.subjectParticipants.map(SubjectParticipant.fromProto);
|
|
377
415
|
}
|
|
378
416
|
if (proto.channel) {
|
|
379
|
-
m.channel = enumStringToValue$
|
|
417
|
+
m.channel = enumStringToValue$7(ConversationChannel, proto.channel);
|
|
380
418
|
}
|
|
381
419
|
return m;
|
|
382
420
|
}
|
|
@@ -427,7 +465,7 @@ class LastSeenByParticipant {
|
|
|
427
465
|
}
|
|
428
466
|
}
|
|
429
467
|
|
|
430
|
-
function enumStringToValue$
|
|
468
|
+
function enumStringToValue$6(enumRef, value) {
|
|
431
469
|
if (typeof value === 'number') {
|
|
432
470
|
return value;
|
|
433
471
|
}
|
|
@@ -473,10 +511,10 @@ class Participant {
|
|
|
473
511
|
let m = new Participant();
|
|
474
512
|
m = Object.assign(m, proto);
|
|
475
513
|
if (proto.location) {
|
|
476
|
-
m.location = enumStringToValue$
|
|
514
|
+
m.location = enumStringToValue$6(PlatformLocation, proto.location);
|
|
477
515
|
}
|
|
478
516
|
if (proto.channel) {
|
|
479
|
-
m.channel = enumStringToValue$
|
|
517
|
+
m.channel = enumStringToValue$6(ConversationChannel, proto.channel);
|
|
480
518
|
}
|
|
481
519
|
if (proto.created) {
|
|
482
520
|
m.created = new Date(proto.created);
|
|
@@ -488,7 +526,7 @@ class Participant {
|
|
|
488
526
|
m.deleted = new Date(proto.deleted);
|
|
489
527
|
}
|
|
490
528
|
if (proto.participantType) {
|
|
491
|
-
m.participantType = enumStringToValue$
|
|
529
|
+
m.participantType = enumStringToValue$6(ParticipantType, proto.participantType);
|
|
492
530
|
}
|
|
493
531
|
if (proto.address) {
|
|
494
532
|
m.address = Address.fromProto(proto.address);
|
|
@@ -565,13 +603,13 @@ class ParticipantKey {
|
|
|
565
603
|
let m = new ParticipantKey();
|
|
566
604
|
m = Object.assign(m, proto);
|
|
567
605
|
if (proto.location) {
|
|
568
|
-
m.location = enumStringToValue$
|
|
606
|
+
m.location = enumStringToValue$6(PlatformLocation, proto.location);
|
|
569
607
|
}
|
|
570
608
|
if (proto.channels) {
|
|
571
|
-
m.channels = proto.channels.map((v) => enumStringToValue$
|
|
609
|
+
m.channels = proto.channels.map((v) => enumStringToValue$6(ConversationChannel, v));
|
|
572
610
|
}
|
|
573
611
|
if (proto.participantType) {
|
|
574
|
-
m.participantType = enumStringToValue$
|
|
612
|
+
m.participantType = enumStringToValue$6(GlobalParticipantType, proto.participantType);
|
|
575
613
|
}
|
|
576
614
|
return m;
|
|
577
615
|
}
|
|
@@ -605,7 +643,7 @@ class ParticipantKey {
|
|
|
605
643
|
}
|
|
606
644
|
}
|
|
607
645
|
|
|
608
|
-
function enumStringToValue$
|
|
646
|
+
function enumStringToValue$5(enumRef, value) {
|
|
609
647
|
if (typeof value === 'number') {
|
|
610
648
|
return value;
|
|
611
649
|
}
|
|
@@ -635,7 +673,7 @@ class Access {
|
|
|
635
673
|
}
|
|
636
674
|
}
|
|
637
675
|
|
|
638
|
-
function enumStringToValue$
|
|
676
|
+
function enumStringToValue$4(enumRef, value) {
|
|
639
677
|
if (typeof value === 'number') {
|
|
640
678
|
return value;
|
|
641
679
|
}
|
|
@@ -689,7 +727,7 @@ class Configuration {
|
|
|
689
727
|
}
|
|
690
728
|
}
|
|
691
729
|
|
|
692
|
-
function enumStringToValue$
|
|
730
|
+
function enumStringToValue$3(enumRef, value) {
|
|
693
731
|
if (typeof value === 'number') {
|
|
694
732
|
return value;
|
|
695
733
|
}
|
|
@@ -722,7 +760,7 @@ class View {
|
|
|
722
760
|
}
|
|
723
761
|
}
|
|
724
762
|
|
|
725
|
-
function enumStringToValue$
|
|
763
|
+
function enumStringToValue$2(enumRef, value) {
|
|
726
764
|
if (typeof value === 'number') {
|
|
727
765
|
return value;
|
|
728
766
|
}
|
|
@@ -733,7 +771,7 @@ class Widget {
|
|
|
733
771
|
let m = new Widget();
|
|
734
772
|
m = Object.assign(m, proto);
|
|
735
773
|
if (proto.position) {
|
|
736
|
-
m.position = enumStringToValue$
|
|
774
|
+
m.position = enumStringToValue$2(WidgetPosition, proto.position);
|
|
737
775
|
}
|
|
738
776
|
if (proto.created) {
|
|
739
777
|
m.created = new Date(proto.created);
|
|
@@ -775,6 +813,39 @@ class Widget {
|
|
|
775
813
|
if (typeof this.updated !== 'undefined' && this.updated !== null) {
|
|
776
814
|
toReturn['updated'] = 'toApiJson' in this.updated ? this.updated.toApiJson() : this.updated;
|
|
777
815
|
}
|
|
816
|
+
if (typeof this.isEnabled !== 'undefined') {
|
|
817
|
+
toReturn['isEnabled'] = this.isEnabled;
|
|
818
|
+
}
|
|
819
|
+
if (typeof this.welcomeMessage !== 'undefined') {
|
|
820
|
+
toReturn['welcomeMessage'] = this.welcomeMessage;
|
|
821
|
+
}
|
|
822
|
+
return toReturn;
|
|
823
|
+
}
|
|
824
|
+
}
|
|
825
|
+
|
|
826
|
+
function enumStringToValue$1(enumRef, value) {
|
|
827
|
+
if (typeof value === 'number') {
|
|
828
|
+
return value;
|
|
829
|
+
}
|
|
830
|
+
return enumRef[value];
|
|
831
|
+
}
|
|
832
|
+
class FieldMask {
|
|
833
|
+
static fromProto(proto) {
|
|
834
|
+
let m = new FieldMask();
|
|
835
|
+
m = Object.assign(m, proto);
|
|
836
|
+
return m;
|
|
837
|
+
}
|
|
838
|
+
constructor(kwargs) {
|
|
839
|
+
if (!kwargs) {
|
|
840
|
+
return;
|
|
841
|
+
}
|
|
842
|
+
Object.assign(this, kwargs);
|
|
843
|
+
}
|
|
844
|
+
toApiJson() {
|
|
845
|
+
const toReturn = {};
|
|
846
|
+
if (typeof this.paths !== 'undefined') {
|
|
847
|
+
toReturn['paths'] = this.paths;
|
|
848
|
+
}
|
|
778
849
|
return toReturn;
|
|
779
850
|
}
|
|
780
851
|
}
|
|
@@ -1233,9 +1304,9 @@ class DeleteWidgetRequest {
|
|
|
1233
1304
|
return toReturn;
|
|
1234
1305
|
}
|
|
1235
1306
|
}
|
|
1236
|
-
class
|
|
1307
|
+
class SearchConversationsResponseDetailedConversation {
|
|
1237
1308
|
static fromProto(proto) {
|
|
1238
|
-
let m = new
|
|
1309
|
+
let m = new SearchConversationsResponseDetailedConversation();
|
|
1239
1310
|
m = Object.assign(m, proto);
|
|
1240
1311
|
if (proto.conversation) {
|
|
1241
1312
|
m.conversation = Conversation.fromProto(proto.conversation);
|
|
@@ -1268,9 +1339,9 @@ class GetMultiConversationDetailsResponseDetailedConversation {
|
|
|
1268
1339
|
return toReturn;
|
|
1269
1340
|
}
|
|
1270
1341
|
}
|
|
1271
|
-
class
|
|
1342
|
+
class GetMultiConversationDetailsResponseDetailedConversation {
|
|
1272
1343
|
static fromProto(proto) {
|
|
1273
|
-
let m = new
|
|
1344
|
+
let m = new GetMultiConversationDetailsResponseDetailedConversation();
|
|
1274
1345
|
m = Object.assign(m, proto);
|
|
1275
1346
|
if (proto.conversation) {
|
|
1276
1347
|
m.conversation = Conversation.fromProto(proto.conversation);
|
|
@@ -1688,6 +1759,49 @@ class GetMultiParticipantsResponse {
|
|
|
1688
1759
|
return toReturn;
|
|
1689
1760
|
}
|
|
1690
1761
|
}
|
|
1762
|
+
class GetMultiWidgetMessagesRequest {
|
|
1763
|
+
static fromProto(proto) {
|
|
1764
|
+
let m = new GetMultiWidgetMessagesRequest();
|
|
1765
|
+
m = Object.assign(m, proto);
|
|
1766
|
+
return m;
|
|
1767
|
+
}
|
|
1768
|
+
constructor(kwargs) {
|
|
1769
|
+
if (!kwargs) {
|
|
1770
|
+
return;
|
|
1771
|
+
}
|
|
1772
|
+
Object.assign(this, kwargs);
|
|
1773
|
+
}
|
|
1774
|
+
toApiJson() {
|
|
1775
|
+
const toReturn = {};
|
|
1776
|
+
if (typeof this.messageIds !== 'undefined') {
|
|
1777
|
+
toReturn['messageIds'] = this.messageIds;
|
|
1778
|
+
}
|
|
1779
|
+
return toReturn;
|
|
1780
|
+
}
|
|
1781
|
+
}
|
|
1782
|
+
class GetMultiWidgetMessagesResponse {
|
|
1783
|
+
static fromProto(proto) {
|
|
1784
|
+
let m = new GetMultiWidgetMessagesResponse();
|
|
1785
|
+
m = Object.assign(m, proto);
|
|
1786
|
+
if (proto.messages) {
|
|
1787
|
+
m.messages = proto.messages.map(Message.fromProto);
|
|
1788
|
+
}
|
|
1789
|
+
return m;
|
|
1790
|
+
}
|
|
1791
|
+
constructor(kwargs) {
|
|
1792
|
+
if (!kwargs) {
|
|
1793
|
+
return;
|
|
1794
|
+
}
|
|
1795
|
+
Object.assign(this, kwargs);
|
|
1796
|
+
}
|
|
1797
|
+
toApiJson() {
|
|
1798
|
+
const toReturn = {};
|
|
1799
|
+
if (typeof this.messages !== 'undefined' && this.messages !== null) {
|
|
1800
|
+
toReturn['messages'] = 'toApiJson' in this.messages ? this.messages.toApiJson() : this.messages;
|
|
1801
|
+
}
|
|
1802
|
+
return toReturn;
|
|
1803
|
+
}
|
|
1804
|
+
}
|
|
1691
1805
|
class GetParticipantsByKeyRequest {
|
|
1692
1806
|
static fromProto(proto) {
|
|
1693
1807
|
let m = new GetParticipantsByKeyRequest();
|
|
@@ -1740,6 +1854,29 @@ class GetParticipantsByKeyResponse {
|
|
|
1740
1854
|
return toReturn;
|
|
1741
1855
|
}
|
|
1742
1856
|
}
|
|
1857
|
+
class GetWidgetConversationResponse {
|
|
1858
|
+
static fromProto(proto) {
|
|
1859
|
+
let m = new GetWidgetConversationResponse();
|
|
1860
|
+
m = Object.assign(m, proto);
|
|
1861
|
+
if (proto.conversation) {
|
|
1862
|
+
m.conversation = Conversation.fromProto(proto.conversation);
|
|
1863
|
+
}
|
|
1864
|
+
return m;
|
|
1865
|
+
}
|
|
1866
|
+
constructor(kwargs) {
|
|
1867
|
+
if (!kwargs) {
|
|
1868
|
+
return;
|
|
1869
|
+
}
|
|
1870
|
+
Object.assign(this, kwargs);
|
|
1871
|
+
}
|
|
1872
|
+
toApiJson() {
|
|
1873
|
+
const toReturn = {};
|
|
1874
|
+
if (typeof this.conversation !== 'undefined' && this.conversation !== null) {
|
|
1875
|
+
toReturn['conversation'] = 'toApiJson' in this.conversation ? this.conversation.toApiJson() : this.conversation;
|
|
1876
|
+
}
|
|
1877
|
+
return toReturn;
|
|
1878
|
+
}
|
|
1879
|
+
}
|
|
1743
1880
|
class GetWidgetRequest {
|
|
1744
1881
|
static fromProto(proto) {
|
|
1745
1882
|
let m = new GetWidgetRequest();
|
|
@@ -2394,6 +2531,44 @@ class SendMessageResponse {
|
|
|
2394
2531
|
return toReturn;
|
|
2395
2532
|
}
|
|
2396
2533
|
}
|
|
2534
|
+
class SendWidgetMessageRequest {
|
|
2535
|
+
static fromProto(proto) {
|
|
2536
|
+
let m = new SendWidgetMessageRequest();
|
|
2537
|
+
m = Object.assign(m, proto);
|
|
2538
|
+
if (proto.type) {
|
|
2539
|
+
m.type = enumStringToValue(MessageType, proto.type);
|
|
2540
|
+
}
|
|
2541
|
+
if (proto.metadata) {
|
|
2542
|
+
m.metadata = proto.metadata.map(Metadata.fromProto);
|
|
2543
|
+
}
|
|
2544
|
+
if (proto.location) {
|
|
2545
|
+
m.location = enumStringToValue(PlatformLocation, proto.location);
|
|
2546
|
+
}
|
|
2547
|
+
return m;
|
|
2548
|
+
}
|
|
2549
|
+
constructor(kwargs) {
|
|
2550
|
+
if (!kwargs) {
|
|
2551
|
+
return;
|
|
2552
|
+
}
|
|
2553
|
+
Object.assign(this, kwargs);
|
|
2554
|
+
}
|
|
2555
|
+
toApiJson() {
|
|
2556
|
+
const toReturn = {};
|
|
2557
|
+
if (typeof this.type !== 'undefined') {
|
|
2558
|
+
toReturn['type'] = this.type;
|
|
2559
|
+
}
|
|
2560
|
+
if (typeof this.body !== 'undefined') {
|
|
2561
|
+
toReturn['body'] = this.body;
|
|
2562
|
+
}
|
|
2563
|
+
if (typeof this.metadata !== 'undefined' && this.metadata !== null) {
|
|
2564
|
+
toReturn['metadata'] = 'toApiJson' in this.metadata ? this.metadata.toApiJson() : this.metadata;
|
|
2565
|
+
}
|
|
2566
|
+
if (typeof this.location !== 'undefined') {
|
|
2567
|
+
toReturn['location'] = this.location;
|
|
2568
|
+
}
|
|
2569
|
+
return toReturn;
|
|
2570
|
+
}
|
|
2571
|
+
}
|
|
2397
2572
|
class SetLastSeenRequest {
|
|
2398
2573
|
static fromProto(proto) {
|
|
2399
2574
|
let m = new SetLastSeenRequest();
|
|
@@ -2482,6 +2657,9 @@ class UpdateWidgetRequest {
|
|
|
2482
2657
|
static fromProto(proto) {
|
|
2483
2658
|
let m = new UpdateWidgetRequest();
|
|
2484
2659
|
m = Object.assign(m, proto);
|
|
2660
|
+
if (proto.fieldMask) {
|
|
2661
|
+
m.fieldMask = FieldMask.fromProto(proto.fieldMask);
|
|
2662
|
+
}
|
|
2485
2663
|
return m;
|
|
2486
2664
|
}
|
|
2487
2665
|
constructor(kwargs) {
|
|
@@ -2504,6 +2682,15 @@ class UpdateWidgetRequest {
|
|
|
2504
2682
|
if (typeof this.allowedUrls !== 'undefined') {
|
|
2505
2683
|
toReturn['allowedUrls'] = this.allowedUrls;
|
|
2506
2684
|
}
|
|
2685
|
+
if (typeof this.welcomeMessage !== 'undefined') {
|
|
2686
|
+
toReturn['welcomeMessage'] = this.welcomeMessage;
|
|
2687
|
+
}
|
|
2688
|
+
if (typeof this.isEnabled !== 'undefined') {
|
|
2689
|
+
toReturn['isEnabled'] = this.isEnabled;
|
|
2690
|
+
}
|
|
2691
|
+
if (typeof this.fieldMask !== 'undefined' && this.fieldMask !== null) {
|
|
2692
|
+
toReturn['fieldMask'] = 'toApiJson' in this.fieldMask ? this.fieldMask.toApiJson() : this.fieldMask;
|
|
2693
|
+
}
|
|
2507
2694
|
return toReturn;
|
|
2508
2695
|
}
|
|
2509
2696
|
}
|
|
@@ -2735,6 +2922,19 @@ class ConversationApiService {
|
|
|
2735
2922
|
return this.http.post(this._host + "/conversation.v1.ConversationService/CreateWidgetConversation", request.toApiJson(), this.apiOptions())
|
|
2736
2923
|
.pipe(map(resp => CreateWidgetConversationResponse.fromProto(resp)));
|
|
2737
2924
|
}
|
|
2925
|
+
getMultiWidgetMessages(r) {
|
|
2926
|
+
const request = (r.toApiJson) ? r : new GetMultiWidgetMessagesRequest(r);
|
|
2927
|
+
return this.http.post(this._host + "/conversation.v1.ConversationService/GetMultiWidgetMessages", request.toApiJson(), this.apiOptions())
|
|
2928
|
+
.pipe(map(resp => GetMultiWidgetMessagesResponse.fromProto(resp)));
|
|
2929
|
+
}
|
|
2930
|
+
sendWidgetMessage(r) {
|
|
2931
|
+
const request = (r.toApiJson) ? r : new SendWidgetMessageRequest(r);
|
|
2932
|
+
return this.http.post(this._host + "/conversation.v1.ConversationService/SendWidgetMessage", request.toApiJson(), { ...this.apiOptions(), observe: 'response' });
|
|
2933
|
+
}
|
|
2934
|
+
getWidgetConversation() {
|
|
2935
|
+
return this.http.post(this._host + "/conversation.v1.ConversationService/GetWidgetConversation", {}, this.apiOptions())
|
|
2936
|
+
.pipe(map(resp => GetWidgetConversationResponse.fromProto(resp)));
|
|
2937
|
+
}
|
|
2738
2938
|
createWidget(r) {
|
|
2739
2939
|
const request = (r.toApiJson) ? r : new CreateWidgetRequest(r);
|
|
2740
2940
|
return this.http.post(this._host + "/conversation.v1.ConversationService/CreateWidget", request.toApiJson(), this.apiOptions())
|
|
@@ -2821,5 +3021,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
2821
3021
|
* Generated bundle index. Do not edit.
|
|
2822
3022
|
*/
|
|
2823
3023
|
|
|
2824
|
-
export { Access, AddConversationToConversationViewRequest, AddMultiParticipantsRequest, AddMultiParticipantsResponse, Address, Configuration, Conversation, ConversationApiService, ConversationChannel, ConversationKey, ConversationMessageCount, CreateConversationRequest, CreateConversationResponse, CreateMultiMessagesRequest, CreateWidgetConversationRequest, CreateWidgetConversationResponse, CreateWidgetRequest, CreateWidgetResponse, DeleteConversationRequest, DeleteMessageRequest, DeleteWidgetRequest, GetConfigurationRequest, GetConfigurationResponse, GetConversationByKeyRequest, GetConversationByKeyResponse, GetConversationViewsRequest, GetConversationViewsResponse, GetMessageRequest, GetMultiConfigurationRequest, GetMultiConfigurationResponse, GetMultiConversationDetailsRequest, GetMultiConversationDetailsResponse, GetMultiConversationDetailsResponseDetailedConversation, GetMultiConversationMessageCountRequest, GetMultiConversationMessageCountResponse, GetMultiConversationMessageCountResponseCountsEntry, GetMultiMessagesRequest, GetMultiMessagesResponse, GetMultiParticipantsRequest, GetMultiParticipantsResponse, GetParticipantsByKeyRequest, GetParticipantsByKeyResponse, GetWidgetRequest, GetWidgetResponse, GlobalParticipantType, InboxApiService, LastSeenByParticipant, ListMessagesRequest, ListMessagesRequestListMessagesFilters, ListMessagesResponse, ListWidgetsRequest, ListWidgetsResponse, LookupConversationsRequest, LookupConversationsRequestLookupConversationsFilters, LookupConversationsResponse, LookupConversationsResponseConversations, Media, Message, MessageStatus, MessageType, Metadata, MetadataDataEntry, MetadataIdentifier, PagedRequestOptions, PagedResponseMetadata, Participant, ParticipantKey, ParticipantMessageStatus, ParticipantType, PlatformLocation, ReceiveMessageRequest, ReceiveMessageRequestMetadataEntry, RemoveConversationFromConversationViewRequest, SearchConversationsRequest, SearchConversationsResponse, SearchConversationsResponseDetailedConversation, SendMessageRequest, SendMessageResponse, SetLastSeenRequest, SetLastSeenRequestStatus, SetLastSeenResponse, SortDirection, SubjectParticipant, UpdateMessageStatusRequest, UpdateWidgetRequest, UpdateWidgetResponse, UpsertConfigurationRequest, UpsertConfigurationResponse, View, ViewType, Widget, WidgetPosition };
|
|
3024
|
+
export { Access, AddConversationToConversationViewRequest, AddMultiParticipantsRequest, AddMultiParticipantsResponse, Address, Configuration, Conversation, ConversationApiService, ConversationChannel, ConversationKey, ConversationMessageCount, CreateConversationRequest, CreateConversationResponse, CreateMultiMessagesRequest, CreateWidgetConversationRequest, CreateWidgetConversationResponse, CreateWidgetRequest, CreateWidgetResponse, DeleteConversationRequest, DeleteMessageRequest, DeleteWidgetRequest, FieldMask, GetConfigurationRequest, GetConfigurationResponse, GetConversationByKeyRequest, GetConversationByKeyResponse, GetConversationViewsRequest, GetConversationViewsResponse, GetMessageRequest, GetMultiConfigurationRequest, GetMultiConfigurationResponse, GetMultiConversationDetailsRequest, GetMultiConversationDetailsResponse, GetMultiConversationDetailsResponseDetailedConversation, GetMultiConversationMessageCountRequest, GetMultiConversationMessageCountResponse, GetMultiConversationMessageCountResponseCountsEntry, GetMultiMessagesRequest, GetMultiMessagesResponse, GetMultiParticipantsRequest, GetMultiParticipantsResponse, GetMultiWidgetMessagesRequest, GetMultiWidgetMessagesResponse, GetParticipantsByKeyRequest, GetParticipantsByKeyResponse, GetWidgetConversationResponse, GetWidgetRequest, GetWidgetResponse, GlobalParticipantType, InboxApiService, LastSeenByParticipant, ListMessagesRequest, ListMessagesRequestListMessagesFilters, ListMessagesResponse, ListWidgetsRequest, ListWidgetsResponse, LookupConversationsRequest, LookupConversationsRequestLookupConversationsFilters, LookupConversationsResponse, LookupConversationsResponseConversations, Media, Message, MessageStatus, MessageType, Metadata, MetadataDataEntry, MetadataIdentifier, PagedRequestOptions, PagedResponseMetadata, Participant, ParticipantKey, ParticipantMessageStatus, ParticipantType, PlatformLocation, ReceiveMessageRequest, ReceiveMessageRequestMetadataEntry, RemoveConversationFromConversationViewRequest, SearchConversationsRequest, SearchConversationsResponse, SearchConversationsResponseDetailedConversation, SendMessageRequest, SendMessageResponse, SendStatus, SendWidgetMessageRequest, SetLastSeenRequest, SetLastSeenRequestStatus, SetLastSeenResponse, SortDirection, SubjectParticipant, UpdateMessageStatusRequest, UpdateWidgetRequest, UpdateWidgetResponse, UpsertConfigurationRequest, UpsertConfigurationResponse, View, ViewType, Widget, WidgetPosition };
|
|
2825
3025
|
//# sourceMappingURL=vendasta-conversation.mjs.map
|