@vendasta/conversation 0.36.0 → 0.37.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 +31 -2
- package/esm2020/lib/_internal/enums/common.enum.mjs +2 -1
- package/esm2020/lib/_internal/enums/conversation.enum.mjs +2 -1
- package/esm2020/lib/_internal/enums/index.mjs +2 -1
- package/esm2020/lib/_internal/enums/participant.enum.mjs +2 -1
- package/esm2020/lib/_internal/enums/widget.enum.mjs +13 -0
- package/esm2020/lib/_internal/interfaces/api.interface.mjs +1 -1
- package/esm2020/lib/_internal/interfaces/configuration.interface.mjs +1 -1
- package/esm2020/lib/_internal/interfaces/index.mjs +1 -1
- package/esm2020/lib/_internal/interfaces/widget.interface.mjs +8 -0
- package/esm2020/lib/_internal/objects/api.mjs +274 -5
- package/esm2020/lib/_internal/objects/configuration.mjs +7 -1
- package/esm2020/lib/_internal/objects/index.mjs +3 -2
- package/esm2020/lib/_internal/objects/widget.mjs +58 -0
- package/fesm2015/vendasta-conversation.mjs +400 -24
- package/fesm2015/vendasta-conversation.mjs.map +1 -1
- package/fesm2020/vendasta-conversation.mjs +400 -24
- package/fesm2020/vendasta-conversation.mjs.map +1 -1
- package/lib/_internal/conversation.api.service.d.ts +8 -2
- package/lib/_internal/enums/common.enum.d.ts +2 -1
- package/lib/_internal/enums/conversation.enum.d.ts +2 -1
- package/lib/_internal/enums/index.d.ts +1 -0
- package/lib/_internal/enums/participant.enum.d.ts +2 -1
- package/lib/_internal/enums/widget.enum.d.ts +5 -0
- package/lib/_internal/interfaces/api.interface.d.ts +45 -2
- package/lib/_internal/interfaces/configuration.interface.d.ts +2 -0
- package/lib/_internal/interfaces/index.d.ts +2 -1
- package/lib/_internal/interfaces/widget.interface.d.ts +11 -0
- package/lib/_internal/objects/api.d.ts +82 -6
- package/lib/_internal/objects/configuration.d.ts +2 -0
- package/lib/_internal/objects/index.d.ts +2 -1
- package/lib/_internal/objects/widget.d.ts +16 -0
- package/package.json +1 -1
|
@@ -43,6 +43,7 @@ var GlobalParticipantType;
|
|
|
43
43
|
GlobalParticipantType[GlobalParticipantType["GLOBAL_PARTICIPANT_TYPE_DIGITAL_AGENT"] = 6] = "GLOBAL_PARTICIPANT_TYPE_DIGITAL_AGENT";
|
|
44
44
|
GlobalParticipantType[GlobalParticipantType["GLOBAL_PARTICIPANT_TYPE_VENDOR"] = 7] = "GLOBAL_PARTICIPANT_TYPE_VENDOR";
|
|
45
45
|
GlobalParticipantType[GlobalParticipantType["GLOBAL_PARTICIPANT_TYPE_OPENAI_BOT"] = 8] = "GLOBAL_PARTICIPANT_TYPE_OPENAI_BOT";
|
|
46
|
+
GlobalParticipantType[GlobalParticipantType["GLOBAL_PARTICIPANT_TYPE_ANONYMOUS"] = 9] = "GLOBAL_PARTICIPANT_TYPE_ANONYMOUS";
|
|
46
47
|
})(GlobalParticipantType || (GlobalParticipantType = {}));
|
|
47
48
|
var SortDirection;
|
|
48
49
|
(function (SortDirection) {
|
|
@@ -66,6 +67,7 @@ var ConversationChannel;
|
|
|
66
67
|
ConversationChannel[ConversationChannel["CONVERSATION_CHANNEL_OPENAI"] = 5] = "CONVERSATION_CHANNEL_OPENAI";
|
|
67
68
|
ConversationChannel[ConversationChannel["CONVERSATION_CHANNEL_EMAIL"] = 6] = "CONVERSATION_CHANNEL_EMAIL";
|
|
68
69
|
ConversationChannel[ConversationChannel["CONVERSATION_CHANNEL_GOOGLE_BUSINESS_COMMUNICATIONS"] = 7] = "CONVERSATION_CHANNEL_GOOGLE_BUSINESS_COMMUNICATIONS";
|
|
70
|
+
ConversationChannel[ConversationChannel["CONVERSATION_CHANNEL_WEB_CHAT"] = 8] = "CONVERSATION_CHANNEL_WEB_CHAT";
|
|
69
71
|
})(ConversationChannel || (ConversationChannel = {}));
|
|
70
72
|
var PlatformLocation;
|
|
71
73
|
(function (PlatformLocation) {
|
|
@@ -95,6 +97,7 @@ var ParticipantType;
|
|
|
95
97
|
ParticipantType[ParticipantType["PARTICIPANT_TYPE_DIGITAL_AGENT"] = 6] = "PARTICIPANT_TYPE_DIGITAL_AGENT";
|
|
96
98
|
ParticipantType[ParticipantType["PARTICIPANT_TYPE_VENDOR"] = 7] = "PARTICIPANT_TYPE_VENDOR";
|
|
97
99
|
ParticipantType[ParticipantType["PARTICIPANT_TYPE_OPENAI_BOT"] = 8] = "PARTICIPANT_TYPE_OPENAI_BOT";
|
|
100
|
+
ParticipantType[ParticipantType["PARTICIPANT_TYPE_ANONYMOUS"] = 9] = "PARTICIPANT_TYPE_ANONYMOUS";
|
|
98
101
|
})(ParticipantType || (ParticipantType = {}));
|
|
99
102
|
|
|
100
103
|
// *********************************
|
|
@@ -109,6 +112,19 @@ var ViewType;
|
|
|
109
112
|
ViewType[ViewType["VIEW_TYPE_FOLLOWING"] = 1] = "VIEW_TYPE_FOLLOWING";
|
|
110
113
|
})(ViewType || (ViewType = {}));
|
|
111
114
|
|
|
115
|
+
// *********************************
|
|
116
|
+
// Code generated by sdkgen
|
|
117
|
+
// DO NOT EDIT!.
|
|
118
|
+
//
|
|
119
|
+
// Enums.
|
|
120
|
+
// *********************************
|
|
121
|
+
var WidgetPosition;
|
|
122
|
+
(function (WidgetPosition) {
|
|
123
|
+
WidgetPosition[WidgetPosition["WIDGET_POSITION_UNSPECIFIED"] = 0] = "WIDGET_POSITION_UNSPECIFIED";
|
|
124
|
+
WidgetPosition[WidgetPosition["WIDGET_POSITION_RIGHT"] = 1] = "WIDGET_POSITION_RIGHT";
|
|
125
|
+
WidgetPosition[WidgetPosition["WIDGET_POSITION_LEFT"] = 2] = "WIDGET_POSITION_LEFT";
|
|
126
|
+
})(WidgetPosition || (WidgetPosition = {}));
|
|
127
|
+
|
|
112
128
|
// *********************************
|
|
113
129
|
// Code generated by sdkgen
|
|
114
130
|
// DO NOT EDIT!.
|
|
@@ -135,7 +151,7 @@ var SetLastSeenRequestStatus;
|
|
|
135
151
|
// Enums Index.
|
|
136
152
|
// *********************************
|
|
137
153
|
|
|
138
|
-
function enumStringToValue$
|
|
154
|
+
function enumStringToValue$8(enumRef, value) {
|
|
139
155
|
if (typeof value === 'number') {
|
|
140
156
|
return value;
|
|
141
157
|
}
|
|
@@ -146,7 +162,7 @@ class Message {
|
|
|
146
162
|
let m = new Message();
|
|
147
163
|
m = Object.assign(m, proto);
|
|
148
164
|
if (proto.type) {
|
|
149
|
-
m.type = enumStringToValue$
|
|
165
|
+
m.type = enumStringToValue$8(MessageType, proto.type);
|
|
150
166
|
}
|
|
151
167
|
if (proto.created) {
|
|
152
168
|
m.created = new Date(proto.created);
|
|
@@ -208,7 +224,7 @@ class ParticipantMessageStatus {
|
|
|
208
224
|
let m = new ParticipantMessageStatus();
|
|
209
225
|
m = Object.assign(m, proto);
|
|
210
226
|
if (proto.status) {
|
|
211
|
-
m.status = enumStringToValue$
|
|
227
|
+
m.status = enumStringToValue$8(MessageStatus, proto.status);
|
|
212
228
|
}
|
|
213
229
|
if (proto.updated) {
|
|
214
230
|
m.updated = new Date(proto.updated);
|
|
@@ -239,7 +255,7 @@ class ParticipantMessageStatus {
|
|
|
239
255
|
}
|
|
240
256
|
}
|
|
241
257
|
|
|
242
|
-
function enumStringToValue$
|
|
258
|
+
function enumStringToValue$7(enumRef, value) {
|
|
243
259
|
if (typeof value === 'number') {
|
|
244
260
|
return value;
|
|
245
261
|
}
|
|
@@ -250,7 +266,7 @@ class SubjectParticipant {
|
|
|
250
266
|
let m = new SubjectParticipant();
|
|
251
267
|
m = Object.assign(m, proto);
|
|
252
268
|
if (proto.participantType) {
|
|
253
|
-
m.participantType = enumStringToValue$
|
|
269
|
+
m.participantType = enumStringToValue$7(GlobalParticipantType, proto.participantType);
|
|
254
270
|
}
|
|
255
271
|
return m;
|
|
256
272
|
}
|
|
@@ -272,7 +288,7 @@ class SubjectParticipant {
|
|
|
272
288
|
}
|
|
273
289
|
}
|
|
274
290
|
|
|
275
|
-
function enumStringToValue$
|
|
291
|
+
function enumStringToValue$6(enumRef, value) {
|
|
276
292
|
if (typeof value === 'number') {
|
|
277
293
|
return value;
|
|
278
294
|
}
|
|
@@ -283,7 +299,7 @@ class Conversation {
|
|
|
283
299
|
let m = new Conversation();
|
|
284
300
|
m = Object.assign(m, proto);
|
|
285
301
|
if (proto.channel) {
|
|
286
|
-
m.channel = enumStringToValue$
|
|
302
|
+
m.channel = enumStringToValue$6(ConversationChannel, proto.channel);
|
|
287
303
|
}
|
|
288
304
|
if (proto.created) {
|
|
289
305
|
m.created = new Date(proto.created);
|
|
@@ -298,7 +314,7 @@ class Conversation {
|
|
|
298
314
|
m.latestMsgSentTime = new Date(proto.latestMsgSentTime);
|
|
299
315
|
}
|
|
300
316
|
if (proto.originLocation) {
|
|
301
|
-
m.originLocation = enumStringToValue$
|
|
317
|
+
m.originLocation = enumStringToValue$6(PlatformLocation, proto.originLocation);
|
|
302
318
|
}
|
|
303
319
|
if (proto.lastSeenByParticipant) {
|
|
304
320
|
m.lastSeenByParticipant = proto.lastSeenByParticipant.map(LastSeenByParticipant.fromProto);
|
|
@@ -360,7 +376,7 @@ class ConversationKey {
|
|
|
360
376
|
m.subjectParticipants = proto.subjectParticipants.map(SubjectParticipant.fromProto);
|
|
361
377
|
}
|
|
362
378
|
if (proto.channel) {
|
|
363
|
-
m.channel = enumStringToValue$
|
|
379
|
+
m.channel = enumStringToValue$6(ConversationChannel, proto.channel);
|
|
364
380
|
}
|
|
365
381
|
return m;
|
|
366
382
|
}
|
|
@@ -411,7 +427,7 @@ class LastSeenByParticipant {
|
|
|
411
427
|
}
|
|
412
428
|
}
|
|
413
429
|
|
|
414
|
-
function enumStringToValue$
|
|
430
|
+
function enumStringToValue$5(enumRef, value) {
|
|
415
431
|
if (typeof value === 'number') {
|
|
416
432
|
return value;
|
|
417
433
|
}
|
|
@@ -457,10 +473,10 @@ class Participant {
|
|
|
457
473
|
let m = new Participant();
|
|
458
474
|
m = Object.assign(m, proto);
|
|
459
475
|
if (proto.location) {
|
|
460
|
-
m.location = enumStringToValue$
|
|
476
|
+
m.location = enumStringToValue$5(PlatformLocation, proto.location);
|
|
461
477
|
}
|
|
462
478
|
if (proto.channel) {
|
|
463
|
-
m.channel = enumStringToValue$
|
|
479
|
+
m.channel = enumStringToValue$5(ConversationChannel, proto.channel);
|
|
464
480
|
}
|
|
465
481
|
if (proto.created) {
|
|
466
482
|
m.created = new Date(proto.created);
|
|
@@ -472,7 +488,7 @@ class Participant {
|
|
|
472
488
|
m.deleted = new Date(proto.deleted);
|
|
473
489
|
}
|
|
474
490
|
if (proto.participantType) {
|
|
475
|
-
m.participantType = enumStringToValue$
|
|
491
|
+
m.participantType = enumStringToValue$5(ParticipantType, proto.participantType);
|
|
476
492
|
}
|
|
477
493
|
if (proto.address) {
|
|
478
494
|
m.address = Address.fromProto(proto.address);
|
|
@@ -549,13 +565,13 @@ class ParticipantKey {
|
|
|
549
565
|
let m = new ParticipantKey();
|
|
550
566
|
m = Object.assign(m, proto);
|
|
551
567
|
if (proto.location) {
|
|
552
|
-
m.location = enumStringToValue$
|
|
568
|
+
m.location = enumStringToValue$5(PlatformLocation, proto.location);
|
|
553
569
|
}
|
|
554
570
|
if (proto.channels) {
|
|
555
|
-
m.channels = proto.channels.map((v) => enumStringToValue$
|
|
571
|
+
m.channels = proto.channels.map((v) => enumStringToValue$5(ConversationChannel, v));
|
|
556
572
|
}
|
|
557
573
|
if (proto.participantType) {
|
|
558
|
-
m.participantType = enumStringToValue$
|
|
574
|
+
m.participantType = enumStringToValue$5(GlobalParticipantType, proto.participantType);
|
|
559
575
|
}
|
|
560
576
|
return m;
|
|
561
577
|
}
|
|
@@ -589,7 +605,7 @@ class ParticipantKey {
|
|
|
589
605
|
}
|
|
590
606
|
}
|
|
591
607
|
|
|
592
|
-
function enumStringToValue$
|
|
608
|
+
function enumStringToValue$4(enumRef, value) {
|
|
593
609
|
if (typeof value === 'number') {
|
|
594
610
|
return value;
|
|
595
611
|
}
|
|
@@ -619,7 +635,7 @@ class Access {
|
|
|
619
635
|
}
|
|
620
636
|
}
|
|
621
637
|
|
|
622
|
-
function enumStringToValue$
|
|
638
|
+
function enumStringToValue$3(enumRef, value) {
|
|
623
639
|
if (typeof value === 'number') {
|
|
624
640
|
return value;
|
|
625
641
|
}
|
|
@@ -663,11 +679,17 @@ class Configuration {
|
|
|
663
679
|
if (typeof this.showAvailabilityMessage !== 'undefined') {
|
|
664
680
|
toReturn['showAvailabilityMessage'] = this.showAvailabilityMessage;
|
|
665
681
|
}
|
|
682
|
+
if (typeof this.googleBusinessMessagesEnabled !== 'undefined') {
|
|
683
|
+
toReturn['googleBusinessMessagesEnabled'] = this.googleBusinessMessagesEnabled;
|
|
684
|
+
}
|
|
685
|
+
if (typeof this.smsEnabled !== 'undefined') {
|
|
686
|
+
toReturn['smsEnabled'] = this.smsEnabled;
|
|
687
|
+
}
|
|
666
688
|
return toReturn;
|
|
667
689
|
}
|
|
668
690
|
}
|
|
669
691
|
|
|
670
|
-
function enumStringToValue$
|
|
692
|
+
function enumStringToValue$2(enumRef, value) {
|
|
671
693
|
if (typeof value === 'number') {
|
|
672
694
|
return value;
|
|
673
695
|
}
|
|
@@ -700,6 +722,63 @@ class View {
|
|
|
700
722
|
}
|
|
701
723
|
}
|
|
702
724
|
|
|
725
|
+
function enumStringToValue$1(enumRef, value) {
|
|
726
|
+
if (typeof value === 'number') {
|
|
727
|
+
return value;
|
|
728
|
+
}
|
|
729
|
+
return enumRef[value];
|
|
730
|
+
}
|
|
731
|
+
class Widget {
|
|
732
|
+
static fromProto(proto) {
|
|
733
|
+
let m = new Widget();
|
|
734
|
+
m = Object.assign(m, proto);
|
|
735
|
+
if (proto.position) {
|
|
736
|
+
m.position = enumStringToValue$1(WidgetPosition, proto.position);
|
|
737
|
+
}
|
|
738
|
+
if (proto.created) {
|
|
739
|
+
m.created = new Date(proto.created);
|
|
740
|
+
}
|
|
741
|
+
if (proto.updated) {
|
|
742
|
+
m.updated = new Date(proto.updated);
|
|
743
|
+
}
|
|
744
|
+
return m;
|
|
745
|
+
}
|
|
746
|
+
constructor(kwargs) {
|
|
747
|
+
if (!kwargs) {
|
|
748
|
+
return;
|
|
749
|
+
}
|
|
750
|
+
Object.assign(this, kwargs);
|
|
751
|
+
}
|
|
752
|
+
toApiJson() {
|
|
753
|
+
const toReturn = {};
|
|
754
|
+
if (typeof this.widgetId !== 'undefined') {
|
|
755
|
+
toReturn['widgetId'] = this.widgetId;
|
|
756
|
+
}
|
|
757
|
+
if (typeof this.name !== 'undefined') {
|
|
758
|
+
toReturn['name'] = this.name;
|
|
759
|
+
}
|
|
760
|
+
if (typeof this.namespace !== 'undefined') {
|
|
761
|
+
toReturn['namespace'] = this.namespace;
|
|
762
|
+
}
|
|
763
|
+
if (typeof this.color !== 'undefined') {
|
|
764
|
+
toReturn['color'] = this.color;
|
|
765
|
+
}
|
|
766
|
+
if (typeof this.allowedUrls !== 'undefined') {
|
|
767
|
+
toReturn['allowedUrls'] = this.allowedUrls;
|
|
768
|
+
}
|
|
769
|
+
if (typeof this.position !== 'undefined') {
|
|
770
|
+
toReturn['position'] = this.position;
|
|
771
|
+
}
|
|
772
|
+
if (typeof this.created !== 'undefined' && this.created !== null) {
|
|
773
|
+
toReturn['created'] = 'toApiJson' in this.created ? this.created.toApiJson() : this.created;
|
|
774
|
+
}
|
|
775
|
+
if (typeof this.updated !== 'undefined' && this.updated !== null) {
|
|
776
|
+
toReturn['updated'] = 'toApiJson' in this.updated ? this.updated.toApiJson() : this.updated;
|
|
777
|
+
}
|
|
778
|
+
return toReturn;
|
|
779
|
+
}
|
|
780
|
+
}
|
|
781
|
+
|
|
703
782
|
function enumStringToValue(enumRef, value) {
|
|
704
783
|
if (typeof value === 'number') {
|
|
705
784
|
return value;
|
|
@@ -973,6 +1052,104 @@ class CreateMultiMessagesRequest {
|
|
|
973
1052
|
return toReturn;
|
|
974
1053
|
}
|
|
975
1054
|
}
|
|
1055
|
+
class CreateWidgetConversationRequest {
|
|
1056
|
+
static fromProto(proto) {
|
|
1057
|
+
let m = new CreateWidgetConversationRequest();
|
|
1058
|
+
m = Object.assign(m, proto);
|
|
1059
|
+
return m;
|
|
1060
|
+
}
|
|
1061
|
+
constructor(kwargs) {
|
|
1062
|
+
if (!kwargs) {
|
|
1063
|
+
return;
|
|
1064
|
+
}
|
|
1065
|
+
Object.assign(this, kwargs);
|
|
1066
|
+
}
|
|
1067
|
+
toApiJson() {
|
|
1068
|
+
const toReturn = {};
|
|
1069
|
+
if (typeof this.widgetId !== 'undefined') {
|
|
1070
|
+
toReturn['widgetId'] = this.widgetId;
|
|
1071
|
+
}
|
|
1072
|
+
return toReturn;
|
|
1073
|
+
}
|
|
1074
|
+
}
|
|
1075
|
+
class CreateWidgetConversationResponse {
|
|
1076
|
+
static fromProto(proto) {
|
|
1077
|
+
let m = new CreateWidgetConversationResponse();
|
|
1078
|
+
m = Object.assign(m, proto);
|
|
1079
|
+
if (proto.conversation) {
|
|
1080
|
+
m.conversation = Conversation.fromProto(proto.conversation);
|
|
1081
|
+
}
|
|
1082
|
+
return m;
|
|
1083
|
+
}
|
|
1084
|
+
constructor(kwargs) {
|
|
1085
|
+
if (!kwargs) {
|
|
1086
|
+
return;
|
|
1087
|
+
}
|
|
1088
|
+
Object.assign(this, kwargs);
|
|
1089
|
+
}
|
|
1090
|
+
toApiJson() {
|
|
1091
|
+
const toReturn = {};
|
|
1092
|
+
if (typeof this.widgetParticipantToken !== 'undefined') {
|
|
1093
|
+
toReturn['widgetParticipantToken'] = this.widgetParticipantToken;
|
|
1094
|
+
}
|
|
1095
|
+
if (typeof this.conversation !== 'undefined' && this.conversation !== null) {
|
|
1096
|
+
toReturn['conversation'] = 'toApiJson' in this.conversation ? this.conversation.toApiJson() : this.conversation;
|
|
1097
|
+
}
|
|
1098
|
+
return toReturn;
|
|
1099
|
+
}
|
|
1100
|
+
}
|
|
1101
|
+
class CreateWidgetRequest {
|
|
1102
|
+
static fromProto(proto) {
|
|
1103
|
+
let m = new CreateWidgetRequest();
|
|
1104
|
+
m = Object.assign(m, proto);
|
|
1105
|
+
return m;
|
|
1106
|
+
}
|
|
1107
|
+
constructor(kwargs) {
|
|
1108
|
+
if (!kwargs) {
|
|
1109
|
+
return;
|
|
1110
|
+
}
|
|
1111
|
+
Object.assign(this, kwargs);
|
|
1112
|
+
}
|
|
1113
|
+
toApiJson() {
|
|
1114
|
+
const toReturn = {};
|
|
1115
|
+
if (typeof this.name !== 'undefined') {
|
|
1116
|
+
toReturn['name'] = this.name;
|
|
1117
|
+
}
|
|
1118
|
+
if (typeof this.namespace !== 'undefined') {
|
|
1119
|
+
toReturn['namespace'] = this.namespace;
|
|
1120
|
+
}
|
|
1121
|
+
if (typeof this.color !== 'undefined') {
|
|
1122
|
+
toReturn['color'] = this.color;
|
|
1123
|
+
}
|
|
1124
|
+
if (typeof this.allowedUrls !== 'undefined') {
|
|
1125
|
+
toReturn['allowedUrls'] = this.allowedUrls;
|
|
1126
|
+
}
|
|
1127
|
+
return toReturn;
|
|
1128
|
+
}
|
|
1129
|
+
}
|
|
1130
|
+
class CreateWidgetResponse {
|
|
1131
|
+
static fromProto(proto) {
|
|
1132
|
+
let m = new CreateWidgetResponse();
|
|
1133
|
+
m = Object.assign(m, proto);
|
|
1134
|
+
if (proto.widget) {
|
|
1135
|
+
m.widget = Widget.fromProto(proto.widget);
|
|
1136
|
+
}
|
|
1137
|
+
return m;
|
|
1138
|
+
}
|
|
1139
|
+
constructor(kwargs) {
|
|
1140
|
+
if (!kwargs) {
|
|
1141
|
+
return;
|
|
1142
|
+
}
|
|
1143
|
+
Object.assign(this, kwargs);
|
|
1144
|
+
}
|
|
1145
|
+
toApiJson() {
|
|
1146
|
+
const toReturn = {};
|
|
1147
|
+
if (typeof this.widget !== 'undefined' && this.widget !== null) {
|
|
1148
|
+
toReturn['widget'] = 'toApiJson' in this.widget ? this.widget.toApiJson() : this.widget;
|
|
1149
|
+
}
|
|
1150
|
+
return toReturn;
|
|
1151
|
+
}
|
|
1152
|
+
}
|
|
976
1153
|
class MetadataDataEntry {
|
|
977
1154
|
static fromProto(proto) {
|
|
978
1155
|
let m = new MetadataDataEntry();
|
|
@@ -1036,9 +1213,29 @@ class DeleteMessageRequest {
|
|
|
1036
1213
|
return toReturn;
|
|
1037
1214
|
}
|
|
1038
1215
|
}
|
|
1039
|
-
class
|
|
1216
|
+
class DeleteWidgetRequest {
|
|
1040
1217
|
static fromProto(proto) {
|
|
1041
|
-
let m = new
|
|
1218
|
+
let m = new DeleteWidgetRequest();
|
|
1219
|
+
m = Object.assign(m, proto);
|
|
1220
|
+
return m;
|
|
1221
|
+
}
|
|
1222
|
+
constructor(kwargs) {
|
|
1223
|
+
if (!kwargs) {
|
|
1224
|
+
return;
|
|
1225
|
+
}
|
|
1226
|
+
Object.assign(this, kwargs);
|
|
1227
|
+
}
|
|
1228
|
+
toApiJson() {
|
|
1229
|
+
const toReturn = {};
|
|
1230
|
+
if (typeof this.widgetId !== 'undefined') {
|
|
1231
|
+
toReturn['widgetId'] = this.widgetId;
|
|
1232
|
+
}
|
|
1233
|
+
return toReturn;
|
|
1234
|
+
}
|
|
1235
|
+
}
|
|
1236
|
+
class GetMultiConversationDetailsResponseDetailedConversation {
|
|
1237
|
+
static fromProto(proto) {
|
|
1238
|
+
let m = new GetMultiConversationDetailsResponseDetailedConversation();
|
|
1042
1239
|
m = Object.assign(m, proto);
|
|
1043
1240
|
if (proto.conversation) {
|
|
1044
1241
|
m.conversation = Conversation.fromProto(proto.conversation);
|
|
@@ -1071,9 +1268,9 @@ class SearchConversationsResponseDetailedConversation {
|
|
|
1071
1268
|
return toReturn;
|
|
1072
1269
|
}
|
|
1073
1270
|
}
|
|
1074
|
-
class
|
|
1271
|
+
class SearchConversationsResponseDetailedConversation {
|
|
1075
1272
|
static fromProto(proto) {
|
|
1076
|
-
let m = new
|
|
1273
|
+
let m = new SearchConversationsResponseDetailedConversation();
|
|
1077
1274
|
m = Object.assign(m, proto);
|
|
1078
1275
|
if (proto.conversation) {
|
|
1079
1276
|
m.conversation = Conversation.fromProto(proto.conversation);
|
|
@@ -1543,6 +1740,49 @@ class GetParticipantsByKeyResponse {
|
|
|
1543
1740
|
return toReturn;
|
|
1544
1741
|
}
|
|
1545
1742
|
}
|
|
1743
|
+
class GetWidgetRequest {
|
|
1744
|
+
static fromProto(proto) {
|
|
1745
|
+
let m = new GetWidgetRequest();
|
|
1746
|
+
m = Object.assign(m, proto);
|
|
1747
|
+
return m;
|
|
1748
|
+
}
|
|
1749
|
+
constructor(kwargs) {
|
|
1750
|
+
if (!kwargs) {
|
|
1751
|
+
return;
|
|
1752
|
+
}
|
|
1753
|
+
Object.assign(this, kwargs);
|
|
1754
|
+
}
|
|
1755
|
+
toApiJson() {
|
|
1756
|
+
const toReturn = {};
|
|
1757
|
+
if (typeof this.widgetId !== 'undefined') {
|
|
1758
|
+
toReturn['widgetId'] = this.widgetId;
|
|
1759
|
+
}
|
|
1760
|
+
return toReturn;
|
|
1761
|
+
}
|
|
1762
|
+
}
|
|
1763
|
+
class GetWidgetResponse {
|
|
1764
|
+
static fromProto(proto) {
|
|
1765
|
+
let m = new GetWidgetResponse();
|
|
1766
|
+
m = Object.assign(m, proto);
|
|
1767
|
+
if (proto.widget) {
|
|
1768
|
+
m.widget = Widget.fromProto(proto.widget);
|
|
1769
|
+
}
|
|
1770
|
+
return m;
|
|
1771
|
+
}
|
|
1772
|
+
constructor(kwargs) {
|
|
1773
|
+
if (!kwargs) {
|
|
1774
|
+
return;
|
|
1775
|
+
}
|
|
1776
|
+
Object.assign(this, kwargs);
|
|
1777
|
+
}
|
|
1778
|
+
toApiJson() {
|
|
1779
|
+
const toReturn = {};
|
|
1780
|
+
if (typeof this.widget !== 'undefined' && this.widget !== null) {
|
|
1781
|
+
toReturn['widget'] = 'toApiJson' in this.widget ? this.widget.toApiJson() : this.widget;
|
|
1782
|
+
}
|
|
1783
|
+
return toReturn;
|
|
1784
|
+
}
|
|
1785
|
+
}
|
|
1546
1786
|
class ListMessagesRequestListMessagesFilters {
|
|
1547
1787
|
static fromProto(proto) {
|
|
1548
1788
|
let m = new ListMessagesRequestListMessagesFilters();
|
|
@@ -1621,6 +1861,61 @@ class ListMessagesResponse {
|
|
|
1621
1861
|
return toReturn;
|
|
1622
1862
|
}
|
|
1623
1863
|
}
|
|
1864
|
+
class ListWidgetsRequest {
|
|
1865
|
+
static fromProto(proto) {
|
|
1866
|
+
let m = new ListWidgetsRequest();
|
|
1867
|
+
m = Object.assign(m, proto);
|
|
1868
|
+
if (proto.pagingOptions) {
|
|
1869
|
+
m.pagingOptions = PagedRequestOptions.fromProto(proto.pagingOptions);
|
|
1870
|
+
}
|
|
1871
|
+
return m;
|
|
1872
|
+
}
|
|
1873
|
+
constructor(kwargs) {
|
|
1874
|
+
if (!kwargs) {
|
|
1875
|
+
return;
|
|
1876
|
+
}
|
|
1877
|
+
Object.assign(this, kwargs);
|
|
1878
|
+
}
|
|
1879
|
+
toApiJson() {
|
|
1880
|
+
const toReturn = {};
|
|
1881
|
+
if (typeof this.namespace !== 'undefined') {
|
|
1882
|
+
toReturn['namespace'] = this.namespace;
|
|
1883
|
+
}
|
|
1884
|
+
if (typeof this.pagingOptions !== 'undefined' && this.pagingOptions !== null) {
|
|
1885
|
+
toReturn['pagingOptions'] = 'toApiJson' in this.pagingOptions ? this.pagingOptions.toApiJson() : this.pagingOptions;
|
|
1886
|
+
}
|
|
1887
|
+
return toReturn;
|
|
1888
|
+
}
|
|
1889
|
+
}
|
|
1890
|
+
class ListWidgetsResponse {
|
|
1891
|
+
static fromProto(proto) {
|
|
1892
|
+
let m = new ListWidgetsResponse();
|
|
1893
|
+
m = Object.assign(m, proto);
|
|
1894
|
+
if (proto.widgets) {
|
|
1895
|
+
m.widgets = proto.widgets.map(Widget.fromProto);
|
|
1896
|
+
}
|
|
1897
|
+
if (proto.pagingMetadata) {
|
|
1898
|
+
m.pagingMetadata = PagedResponseMetadata.fromProto(proto.pagingMetadata);
|
|
1899
|
+
}
|
|
1900
|
+
return m;
|
|
1901
|
+
}
|
|
1902
|
+
constructor(kwargs) {
|
|
1903
|
+
if (!kwargs) {
|
|
1904
|
+
return;
|
|
1905
|
+
}
|
|
1906
|
+
Object.assign(this, kwargs);
|
|
1907
|
+
}
|
|
1908
|
+
toApiJson() {
|
|
1909
|
+
const toReturn = {};
|
|
1910
|
+
if (typeof this.widgets !== 'undefined' && this.widgets !== null) {
|
|
1911
|
+
toReturn['widgets'] = 'toApiJson' in this.widgets ? this.widgets.toApiJson() : this.widgets;
|
|
1912
|
+
}
|
|
1913
|
+
if (typeof this.pagingMetadata !== 'undefined' && this.pagingMetadata !== null) {
|
|
1914
|
+
toReturn['pagingMetadata'] = 'toApiJson' in this.pagingMetadata ? this.pagingMetadata.toApiJson() : this.pagingMetadata;
|
|
1915
|
+
}
|
|
1916
|
+
return toReturn;
|
|
1917
|
+
}
|
|
1918
|
+
}
|
|
1624
1919
|
class LookupConversationsRequestLookupConversationsFilters {
|
|
1625
1920
|
static fromProto(proto) {
|
|
1626
1921
|
let m = new LookupConversationsRequestLookupConversationsFilters();
|
|
@@ -2183,6 +2478,58 @@ class UpdateMessageStatusRequest {
|
|
|
2183
2478
|
return toReturn;
|
|
2184
2479
|
}
|
|
2185
2480
|
}
|
|
2481
|
+
class UpdateWidgetRequest {
|
|
2482
|
+
static fromProto(proto) {
|
|
2483
|
+
let m = new UpdateWidgetRequest();
|
|
2484
|
+
m = Object.assign(m, proto);
|
|
2485
|
+
return m;
|
|
2486
|
+
}
|
|
2487
|
+
constructor(kwargs) {
|
|
2488
|
+
if (!kwargs) {
|
|
2489
|
+
return;
|
|
2490
|
+
}
|
|
2491
|
+
Object.assign(this, kwargs);
|
|
2492
|
+
}
|
|
2493
|
+
toApiJson() {
|
|
2494
|
+
const toReturn = {};
|
|
2495
|
+
if (typeof this.widgetId !== 'undefined') {
|
|
2496
|
+
toReturn['widgetId'] = this.widgetId;
|
|
2497
|
+
}
|
|
2498
|
+
if (typeof this.name !== 'undefined') {
|
|
2499
|
+
toReturn['name'] = this.name;
|
|
2500
|
+
}
|
|
2501
|
+
if (typeof this.color !== 'undefined') {
|
|
2502
|
+
toReturn['color'] = this.color;
|
|
2503
|
+
}
|
|
2504
|
+
if (typeof this.allowedUrls !== 'undefined') {
|
|
2505
|
+
toReturn['allowedUrls'] = this.allowedUrls;
|
|
2506
|
+
}
|
|
2507
|
+
return toReturn;
|
|
2508
|
+
}
|
|
2509
|
+
}
|
|
2510
|
+
class UpdateWidgetResponse {
|
|
2511
|
+
static fromProto(proto) {
|
|
2512
|
+
let m = new UpdateWidgetResponse();
|
|
2513
|
+
m = Object.assign(m, proto);
|
|
2514
|
+
if (proto.widget) {
|
|
2515
|
+
m.widget = Widget.fromProto(proto.widget);
|
|
2516
|
+
}
|
|
2517
|
+
return m;
|
|
2518
|
+
}
|
|
2519
|
+
constructor(kwargs) {
|
|
2520
|
+
if (!kwargs) {
|
|
2521
|
+
return;
|
|
2522
|
+
}
|
|
2523
|
+
Object.assign(this, kwargs);
|
|
2524
|
+
}
|
|
2525
|
+
toApiJson() {
|
|
2526
|
+
const toReturn = {};
|
|
2527
|
+
if (typeof this.widget !== 'undefined' && this.widget !== null) {
|
|
2528
|
+
toReturn['widget'] = 'toApiJson' in this.widget ? this.widget.toApiJson() : this.widget;
|
|
2529
|
+
}
|
|
2530
|
+
return toReturn;
|
|
2531
|
+
}
|
|
2532
|
+
}
|
|
2186
2533
|
class UpsertConfigurationRequest {
|
|
2187
2534
|
static fromProto(proto) {
|
|
2188
2535
|
let m = new UpsertConfigurationRequest();
|
|
@@ -2384,6 +2731,35 @@ class ConversationApiService {
|
|
|
2384
2731
|
const request = (r.toApiJson) ? r : new RemoveConversationFromConversationViewRequest(r);
|
|
2385
2732
|
return this.http.post(this._host + "/conversation.v1.ConversationService/RemoveConversationFromConversationView", request.toApiJson(), Object.assign(Object.assign({}, this.apiOptions()), { observe: 'response' }));
|
|
2386
2733
|
}
|
|
2734
|
+
createWidgetConversation(r) {
|
|
2735
|
+
const request = (r.toApiJson) ? r : new CreateWidgetConversationRequest(r);
|
|
2736
|
+
return this.http.post(this._host + "/conversation.v1.ConversationService/CreateWidgetConversation", request.toApiJson(), this.apiOptions())
|
|
2737
|
+
.pipe(map(resp => CreateWidgetConversationResponse.fromProto(resp)));
|
|
2738
|
+
}
|
|
2739
|
+
createWidget(r) {
|
|
2740
|
+
const request = (r.toApiJson) ? r : new CreateWidgetRequest(r);
|
|
2741
|
+
return this.http.post(this._host + "/conversation.v1.ConversationService/CreateWidget", request.toApiJson(), this.apiOptions())
|
|
2742
|
+
.pipe(map(resp => CreateWidgetResponse.fromProto(resp)));
|
|
2743
|
+
}
|
|
2744
|
+
getWidget(r) {
|
|
2745
|
+
const request = (r.toApiJson) ? r : new GetWidgetRequest(r);
|
|
2746
|
+
return this.http.post(this._host + "/conversation.v1.ConversationService/GetWidget", request.toApiJson(), this.apiOptions())
|
|
2747
|
+
.pipe(map(resp => GetWidgetResponse.fromProto(resp)));
|
|
2748
|
+
}
|
|
2749
|
+
updateWidget(r) {
|
|
2750
|
+
const request = (r.toApiJson) ? r : new UpdateWidgetRequest(r);
|
|
2751
|
+
return this.http.post(this._host + "/conversation.v1.ConversationService/UpdateWidget", request.toApiJson(), this.apiOptions())
|
|
2752
|
+
.pipe(map(resp => UpdateWidgetResponse.fromProto(resp)));
|
|
2753
|
+
}
|
|
2754
|
+
deleteWidget(r) {
|
|
2755
|
+
const request = (r.toApiJson) ? r : new DeleteWidgetRequest(r);
|
|
2756
|
+
return this.http.post(this._host + "/conversation.v1.ConversationService/DeleteWidget", request.toApiJson(), Object.assign(Object.assign({}, this.apiOptions()), { observe: 'response' }));
|
|
2757
|
+
}
|
|
2758
|
+
listWidgets(r) {
|
|
2759
|
+
const request = (r.toApiJson) ? r : new ListWidgetsRequest(r);
|
|
2760
|
+
return this.http.post(this._host + "/conversation.v1.ConversationService/ListWidgets", request.toApiJson(), this.apiOptions())
|
|
2761
|
+
.pipe(map(resp => ListWidgetsResponse.fromProto(resp)));
|
|
2762
|
+
}
|
|
2387
2763
|
}
|
|
2388
2764
|
ConversationApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ConversationApiService, deps: [{ token: i1.HttpClient }, { token: HostService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2389
2765
|
ConversationApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ConversationApiService, providedIn: 'root' });
|
|
@@ -2446,5 +2822,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
2446
2822
|
* Generated bundle index. Do not edit.
|
|
2447
2823
|
*/
|
|
2448
2824
|
|
|
2449
|
-
export { Access, AddConversationToConversationViewRequest, AddMultiParticipantsRequest, AddMultiParticipantsResponse, Address, Configuration, Conversation, ConversationApiService, ConversationChannel, ConversationKey, ConversationMessageCount, CreateConversationRequest, CreateConversationResponse, CreateMultiMessagesRequest, DeleteConversationRequest, DeleteMessageRequest, GetConfigurationRequest, GetConfigurationResponse, GetConversationByKeyRequest, GetConversationByKeyResponse, GetConversationViewsRequest, GetConversationViewsResponse, GetMessageRequest, GetMultiConfigurationRequest, GetMultiConfigurationResponse, GetMultiConversationDetailsRequest, GetMultiConversationDetailsResponse, GetMultiConversationDetailsResponseDetailedConversation, GetMultiConversationMessageCountRequest, GetMultiConversationMessageCountResponse, GetMultiConversationMessageCountResponseCountsEntry, GetMultiMessagesRequest, GetMultiMessagesResponse, GetMultiParticipantsRequest, GetMultiParticipantsResponse, GetParticipantsByKeyRequest, GetParticipantsByKeyResponse, GlobalParticipantType, InboxApiService, LastSeenByParticipant, ListMessagesRequest, ListMessagesRequestListMessagesFilters, ListMessagesResponse, 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, UpsertConfigurationRequest, UpsertConfigurationResponse, View, ViewType };
|
|
2825
|
+
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 };
|
|
2450
2826
|
//# sourceMappingURL=vendasta-conversation.mjs.map
|