@vendasta/conversation 0.47.0 → 0.49.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 +21 -2
- package/esm2020/lib/_internal/interfaces/api.interface.mjs +1 -1
- package/esm2020/lib/_internal/interfaces/index.mjs +1 -1
- package/esm2020/lib/_internal/interfaces/message-template.interface.mjs +8 -0
- package/esm2020/lib/_internal/interfaces/widget.interface.mjs +1 -1
- package/esm2020/lib/_internal/objects/api.mjs +201 -6
- package/esm2020/lib/_internal/objects/index.mjs +4 -3
- package/esm2020/lib/_internal/objects/message-template.mjs +33 -0
- package/esm2020/lib/_internal/objects/widget.mjs +33 -1
- package/fesm2015/vendasta-conversation.mjs +307 -29
- package/fesm2015/vendasta-conversation.mjs.map +1 -1
- package/fesm2020/vendasta-conversation.mjs +307 -29
- package/fesm2020/vendasta-conversation.mjs.map +1 -1
- package/lib/_internal/conversation.api.service.d.ts +6 -2
- package/lib/_internal/interfaces/api.interface.d.ts +31 -3
- package/lib/_internal/interfaces/index.d.ts +3 -2
- package/lib/_internal/interfaces/message-template.interface.d.ts +5 -0
- package/lib/_internal/interfaces/widget.interface.d.ts +6 -0
- package/lib/_internal/objects/api.d.ts +56 -7
- package/lib/_internal/objects/index.d.ts +3 -2
- package/lib/_internal/objects/message-template.d.ts +10 -0
- package/lib/_internal/objects/widget.d.ts +9 -0
- package/package.json +1 -1
|
@@ -152,7 +152,7 @@ var SetLastSeenRequestStatus;
|
|
|
152
152
|
// Enums Index.
|
|
153
153
|
// *********************************
|
|
154
154
|
|
|
155
|
-
function enumStringToValue$
|
|
155
|
+
function enumStringToValue$a(enumRef, value) {
|
|
156
156
|
if (typeof value === 'number') {
|
|
157
157
|
return value;
|
|
158
158
|
}
|
|
@@ -163,7 +163,7 @@ class SubjectParticipant {
|
|
|
163
163
|
let m = new SubjectParticipant();
|
|
164
164
|
m = Object.assign(m, proto);
|
|
165
165
|
if (proto.participantType) {
|
|
166
|
-
m.participantType = enumStringToValue$
|
|
166
|
+
m.participantType = enumStringToValue$a(GlobalParticipantType, proto.participantType);
|
|
167
167
|
}
|
|
168
168
|
return m;
|
|
169
169
|
}
|
|
@@ -185,7 +185,7 @@ class SubjectParticipant {
|
|
|
185
185
|
}
|
|
186
186
|
}
|
|
187
187
|
|
|
188
|
-
function enumStringToValue$
|
|
188
|
+
function enumStringToValue$9(enumRef, value) {
|
|
189
189
|
if (typeof value === 'number') {
|
|
190
190
|
return value;
|
|
191
191
|
}
|
|
@@ -196,7 +196,7 @@ class Conversation {
|
|
|
196
196
|
let m = new Conversation();
|
|
197
197
|
m = Object.assign(m, proto);
|
|
198
198
|
if (proto.channel) {
|
|
199
|
-
m.channel = enumStringToValue$
|
|
199
|
+
m.channel = enumStringToValue$9(ConversationChannel, proto.channel);
|
|
200
200
|
}
|
|
201
201
|
if (proto.created) {
|
|
202
202
|
m.created = new Date(proto.created);
|
|
@@ -211,7 +211,7 @@ class Conversation {
|
|
|
211
211
|
m.latestMsgSentTime = new Date(proto.latestMsgSentTime);
|
|
212
212
|
}
|
|
213
213
|
if (proto.originLocation) {
|
|
214
|
-
m.originLocation = enumStringToValue$
|
|
214
|
+
m.originLocation = enumStringToValue$9(PlatformLocation, proto.originLocation);
|
|
215
215
|
}
|
|
216
216
|
if (proto.lastSeenByParticipant) {
|
|
217
217
|
m.lastSeenByParticipant = proto.lastSeenByParticipant.map(LastSeenByParticipant.fromProto);
|
|
@@ -282,7 +282,7 @@ class ConversationKey {
|
|
|
282
282
|
m.subjectParticipants = proto.subjectParticipants.map(SubjectParticipant.fromProto);
|
|
283
283
|
}
|
|
284
284
|
if (proto.channel) {
|
|
285
|
-
m.channel = enumStringToValue$
|
|
285
|
+
m.channel = enumStringToValue$9(ConversationChannel, proto.channel);
|
|
286
286
|
}
|
|
287
287
|
return m;
|
|
288
288
|
}
|
|
@@ -333,7 +333,7 @@ class LastSeenByParticipant {
|
|
|
333
333
|
}
|
|
334
334
|
}
|
|
335
335
|
|
|
336
|
-
function enumStringToValue$
|
|
336
|
+
function enumStringToValue$8(enumRef, value) {
|
|
337
337
|
if (typeof value === 'number') {
|
|
338
338
|
return value;
|
|
339
339
|
}
|
|
@@ -344,7 +344,7 @@ class Message {
|
|
|
344
344
|
let m = new Message();
|
|
345
345
|
m = Object.assign(m, proto);
|
|
346
346
|
if (proto.type) {
|
|
347
|
-
m.type = enumStringToValue$
|
|
347
|
+
m.type = enumStringToValue$8(MessageType, proto.type);
|
|
348
348
|
}
|
|
349
349
|
if (proto.created) {
|
|
350
350
|
m.created = new Date(proto.created);
|
|
@@ -359,7 +359,7 @@ class Message {
|
|
|
359
359
|
m.sendStatus = SendStatus.fromProto(proto.sendStatus);
|
|
360
360
|
}
|
|
361
361
|
if (proto.channel) {
|
|
362
|
-
m.channel = enumStringToValue$
|
|
362
|
+
m.channel = enumStringToValue$8(ConversationChannel, proto.channel);
|
|
363
363
|
}
|
|
364
364
|
return m;
|
|
365
365
|
}
|
|
@@ -418,7 +418,7 @@ class ParticipantMessageStatus {
|
|
|
418
418
|
let m = new ParticipantMessageStatus();
|
|
419
419
|
m = Object.assign(m, proto);
|
|
420
420
|
if (proto.status) {
|
|
421
|
-
m.status = enumStringToValue$
|
|
421
|
+
m.status = enumStringToValue$8(MessageStatus, proto.status);
|
|
422
422
|
}
|
|
423
423
|
if (proto.updated) {
|
|
424
424
|
m.updated = new Date(proto.updated);
|
|
@@ -453,7 +453,7 @@ class SendStatus {
|
|
|
453
453
|
let m = new SendStatus();
|
|
454
454
|
m = Object.assign(m, proto);
|
|
455
455
|
if (proto.status) {
|
|
456
|
-
m.status = enumStringToValue$
|
|
456
|
+
m.status = enumStringToValue$8(MessageStatus, proto.status);
|
|
457
457
|
}
|
|
458
458
|
if (proto.created) {
|
|
459
459
|
m.created = new Date(proto.created);
|
|
@@ -481,7 +481,7 @@ class SendStatus {
|
|
|
481
481
|
}
|
|
482
482
|
}
|
|
483
483
|
|
|
484
|
-
function enumStringToValue$
|
|
484
|
+
function enumStringToValue$7(enumRef, value) {
|
|
485
485
|
if (typeof value === 'number') {
|
|
486
486
|
return value;
|
|
487
487
|
}
|
|
@@ -527,10 +527,10 @@ class Participant {
|
|
|
527
527
|
let m = new Participant();
|
|
528
528
|
m = Object.assign(m, proto);
|
|
529
529
|
if (proto.location) {
|
|
530
|
-
m.location = enumStringToValue$
|
|
530
|
+
m.location = enumStringToValue$7(PlatformLocation, proto.location);
|
|
531
531
|
}
|
|
532
532
|
if (proto.channel) {
|
|
533
|
-
m.channel = enumStringToValue$
|
|
533
|
+
m.channel = enumStringToValue$7(ConversationChannel, proto.channel);
|
|
534
534
|
}
|
|
535
535
|
if (proto.created) {
|
|
536
536
|
m.created = new Date(proto.created);
|
|
@@ -542,7 +542,7 @@ class Participant {
|
|
|
542
542
|
m.deleted = new Date(proto.deleted);
|
|
543
543
|
}
|
|
544
544
|
if (proto.participantType) {
|
|
545
|
-
m.participantType = enumStringToValue$
|
|
545
|
+
m.participantType = enumStringToValue$7(ParticipantType, proto.participantType);
|
|
546
546
|
}
|
|
547
547
|
if (proto.address) {
|
|
548
548
|
m.address = Address.fromProto(proto.address);
|
|
@@ -619,13 +619,13 @@ class ParticipantKey {
|
|
|
619
619
|
let m = new ParticipantKey();
|
|
620
620
|
m = Object.assign(m, proto);
|
|
621
621
|
if (proto.location) {
|
|
622
|
-
m.location = enumStringToValue$
|
|
622
|
+
m.location = enumStringToValue$7(PlatformLocation, proto.location);
|
|
623
623
|
}
|
|
624
624
|
if (proto.channels) {
|
|
625
|
-
m.channels = proto.channels.map((v) => enumStringToValue$
|
|
625
|
+
m.channels = proto.channels.map((v) => enumStringToValue$7(ConversationChannel, v));
|
|
626
626
|
}
|
|
627
627
|
if (proto.participantType) {
|
|
628
|
-
m.participantType = enumStringToValue$
|
|
628
|
+
m.participantType = enumStringToValue$7(GlobalParticipantType, proto.participantType);
|
|
629
629
|
}
|
|
630
630
|
return m;
|
|
631
631
|
}
|
|
@@ -659,7 +659,7 @@ class ParticipantKey {
|
|
|
659
659
|
}
|
|
660
660
|
}
|
|
661
661
|
|
|
662
|
-
function enumStringToValue$
|
|
662
|
+
function enumStringToValue$6(enumRef, value) {
|
|
663
663
|
if (typeof value === 'number') {
|
|
664
664
|
return value;
|
|
665
665
|
}
|
|
@@ -689,7 +689,7 @@ class Access {
|
|
|
689
689
|
}
|
|
690
690
|
}
|
|
691
691
|
|
|
692
|
-
function enumStringToValue$
|
|
692
|
+
function enumStringToValue$5(enumRef, value) {
|
|
693
693
|
if (typeof value === 'number') {
|
|
694
694
|
return value;
|
|
695
695
|
}
|
|
@@ -749,7 +749,7 @@ class Configuration {
|
|
|
749
749
|
}
|
|
750
750
|
}
|
|
751
751
|
|
|
752
|
-
function enumStringToValue$
|
|
752
|
+
function enumStringToValue$4(enumRef, value) {
|
|
753
753
|
if (typeof value === 'number') {
|
|
754
754
|
return value;
|
|
755
755
|
}
|
|
@@ -782,18 +782,44 @@ class View {
|
|
|
782
782
|
}
|
|
783
783
|
}
|
|
784
784
|
|
|
785
|
-
function enumStringToValue$
|
|
785
|
+
function enumStringToValue$3(enumRef, value) {
|
|
786
786
|
if (typeof value === 'number') {
|
|
787
787
|
return value;
|
|
788
788
|
}
|
|
789
789
|
return enumRef[value];
|
|
790
790
|
}
|
|
791
|
+
class DataSources {
|
|
792
|
+
static fromProto(proto) {
|
|
793
|
+
let m = new DataSources();
|
|
794
|
+
m = Object.assign(m, proto);
|
|
795
|
+
return m;
|
|
796
|
+
}
|
|
797
|
+
constructor(kwargs) {
|
|
798
|
+
if (!kwargs) {
|
|
799
|
+
return;
|
|
800
|
+
}
|
|
801
|
+
Object.assign(this, kwargs);
|
|
802
|
+
}
|
|
803
|
+
toApiJson() {
|
|
804
|
+
const toReturn = {};
|
|
805
|
+
if (typeof this.businessProfile !== 'undefined') {
|
|
806
|
+
toReturn['businessProfile'] = this.businessProfile;
|
|
807
|
+
}
|
|
808
|
+
if (typeof this.website !== 'undefined') {
|
|
809
|
+
toReturn['website'] = this.website;
|
|
810
|
+
}
|
|
811
|
+
if (typeof this.userInput !== 'undefined') {
|
|
812
|
+
toReturn['userInput'] = this.userInput;
|
|
813
|
+
}
|
|
814
|
+
return toReturn;
|
|
815
|
+
}
|
|
816
|
+
}
|
|
791
817
|
class Widget {
|
|
792
818
|
static fromProto(proto) {
|
|
793
819
|
let m = new Widget();
|
|
794
820
|
m = Object.assign(m, proto);
|
|
795
821
|
if (proto.position) {
|
|
796
|
-
m.position = enumStringToValue$
|
|
822
|
+
m.position = enumStringToValue$3(WidgetPosition, proto.position);
|
|
797
823
|
}
|
|
798
824
|
if (proto.created) {
|
|
799
825
|
m.created = new Date(proto.created);
|
|
@@ -801,6 +827,9 @@ class Widget {
|
|
|
801
827
|
if (proto.updated) {
|
|
802
828
|
m.updated = new Date(proto.updated);
|
|
803
829
|
}
|
|
830
|
+
if (proto.dataSources) {
|
|
831
|
+
m.dataSources = DataSources.fromProto(proto.dataSources);
|
|
832
|
+
}
|
|
804
833
|
return m;
|
|
805
834
|
}
|
|
806
835
|
constructor(kwargs) {
|
|
@@ -841,11 +870,14 @@ class Widget {
|
|
|
841
870
|
if (typeof this.welcomeMessage !== 'undefined') {
|
|
842
871
|
toReturn['welcomeMessage'] = this.welcomeMessage;
|
|
843
872
|
}
|
|
873
|
+
if (typeof this.dataSources !== 'undefined' && this.dataSources !== null) {
|
|
874
|
+
toReturn['dataSources'] = 'toApiJson' in this.dataSources ? this.dataSources.toApiJson() : this.dataSources;
|
|
875
|
+
}
|
|
844
876
|
return toReturn;
|
|
845
877
|
}
|
|
846
878
|
}
|
|
847
879
|
|
|
848
|
-
function enumStringToValue$
|
|
880
|
+
function enumStringToValue$2(enumRef, value) {
|
|
849
881
|
if (typeof value === 'number') {
|
|
850
882
|
return value;
|
|
851
883
|
}
|
|
@@ -872,6 +904,39 @@ class FieldMask {
|
|
|
872
904
|
}
|
|
873
905
|
}
|
|
874
906
|
|
|
907
|
+
function enumStringToValue$1(enumRef, value) {
|
|
908
|
+
if (typeof value === 'number') {
|
|
909
|
+
return value;
|
|
910
|
+
}
|
|
911
|
+
return enumRef[value];
|
|
912
|
+
}
|
|
913
|
+
class MessageTemplate {
|
|
914
|
+
static fromProto(proto) {
|
|
915
|
+
let m = new MessageTemplate();
|
|
916
|
+
m = Object.assign(m, proto);
|
|
917
|
+
return m;
|
|
918
|
+
}
|
|
919
|
+
constructor(kwargs) {
|
|
920
|
+
if (!kwargs) {
|
|
921
|
+
return;
|
|
922
|
+
}
|
|
923
|
+
Object.assign(this, kwargs);
|
|
924
|
+
}
|
|
925
|
+
toApiJson() {
|
|
926
|
+
const toReturn = {};
|
|
927
|
+
if (typeof this.templateId !== 'undefined') {
|
|
928
|
+
toReturn['templateId'] = this.templateId;
|
|
929
|
+
}
|
|
930
|
+
if (typeof this.name !== 'undefined') {
|
|
931
|
+
toReturn['name'] = this.name;
|
|
932
|
+
}
|
|
933
|
+
if (typeof this.content !== 'undefined') {
|
|
934
|
+
toReturn['content'] = this.content;
|
|
935
|
+
}
|
|
936
|
+
return toReturn;
|
|
937
|
+
}
|
|
938
|
+
}
|
|
939
|
+
|
|
875
940
|
function enumStringToValue(enumRef, value) {
|
|
876
941
|
if (typeof value === 'number') {
|
|
877
942
|
return value;
|
|
@@ -1116,6 +1181,58 @@ class CreateConversationResponse {
|
|
|
1116
1181
|
return toReturn;
|
|
1117
1182
|
}
|
|
1118
1183
|
}
|
|
1184
|
+
class CreateMessageTemplateRequest {
|
|
1185
|
+
static fromProto(proto) {
|
|
1186
|
+
let m = new CreateMessageTemplateRequest();
|
|
1187
|
+
m = Object.assign(m, proto);
|
|
1188
|
+
if (proto.template) {
|
|
1189
|
+
m.template = MessageTemplate.fromProto(proto.template);
|
|
1190
|
+
}
|
|
1191
|
+
if (proto.subjectParticipant) {
|
|
1192
|
+
m.subjectParticipant = SubjectParticipant.fromProto(proto.subjectParticipant);
|
|
1193
|
+
}
|
|
1194
|
+
return m;
|
|
1195
|
+
}
|
|
1196
|
+
constructor(kwargs) {
|
|
1197
|
+
if (!kwargs) {
|
|
1198
|
+
return;
|
|
1199
|
+
}
|
|
1200
|
+
Object.assign(this, kwargs);
|
|
1201
|
+
}
|
|
1202
|
+
toApiJson() {
|
|
1203
|
+
const toReturn = {};
|
|
1204
|
+
if (typeof this.template !== 'undefined' && this.template !== null) {
|
|
1205
|
+
toReturn['template'] = 'toApiJson' in this.template ? this.template.toApiJson() : this.template;
|
|
1206
|
+
}
|
|
1207
|
+
if (typeof this.subjectParticipant !== 'undefined' && this.subjectParticipant !== null) {
|
|
1208
|
+
toReturn['subjectParticipant'] = 'toApiJson' in this.subjectParticipant ? this.subjectParticipant.toApiJson() : this.subjectParticipant;
|
|
1209
|
+
}
|
|
1210
|
+
return toReturn;
|
|
1211
|
+
}
|
|
1212
|
+
}
|
|
1213
|
+
class CreateMessageTemplateResponse {
|
|
1214
|
+
static fromProto(proto) {
|
|
1215
|
+
let m = new CreateMessageTemplateResponse();
|
|
1216
|
+
m = Object.assign(m, proto);
|
|
1217
|
+
if (proto.template) {
|
|
1218
|
+
m.template = MessageTemplate.fromProto(proto.template);
|
|
1219
|
+
}
|
|
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.template !== 'undefined' && this.template !== null) {
|
|
1231
|
+
toReturn['template'] = 'toApiJson' in this.template ? this.template.toApiJson() : this.template;
|
|
1232
|
+
}
|
|
1233
|
+
return toReturn;
|
|
1234
|
+
}
|
|
1235
|
+
}
|
|
1119
1236
|
class CreateMultiMessagesRequest {
|
|
1120
1237
|
static fromProto(proto) {
|
|
1121
1238
|
let m = new CreateMultiMessagesRequest();
|
|
@@ -1195,6 +1312,9 @@ class CreateWidgetRequest {
|
|
|
1195
1312
|
static fromProto(proto) {
|
|
1196
1313
|
let m = new CreateWidgetRequest();
|
|
1197
1314
|
m = Object.assign(m, proto);
|
|
1315
|
+
if (proto.dataSources) {
|
|
1316
|
+
m.dataSources = DataSources.fromProto(proto.dataSources);
|
|
1317
|
+
}
|
|
1198
1318
|
return m;
|
|
1199
1319
|
}
|
|
1200
1320
|
constructor(kwargs) {
|
|
@@ -1220,6 +1340,9 @@ class CreateWidgetRequest {
|
|
|
1220
1340
|
if (typeof this.welcomeMessage !== 'undefined') {
|
|
1221
1341
|
toReturn['welcomeMessage'] = this.welcomeMessage;
|
|
1222
1342
|
}
|
|
1343
|
+
if (typeof this.dataSources !== 'undefined' && this.dataSources !== null) {
|
|
1344
|
+
toReturn['dataSources'] = 'toApiJson' in this.dataSources ? this.dataSources.toApiJson() : this.dataSources;
|
|
1345
|
+
}
|
|
1223
1346
|
return toReturn;
|
|
1224
1347
|
}
|
|
1225
1348
|
}
|
|
@@ -1309,6 +1432,26 @@ class DeleteMessageRequest {
|
|
|
1309
1432
|
return toReturn;
|
|
1310
1433
|
}
|
|
1311
1434
|
}
|
|
1435
|
+
class DeleteMessageTemplateRequest {
|
|
1436
|
+
static fromProto(proto) {
|
|
1437
|
+
let m = new DeleteMessageTemplateRequest();
|
|
1438
|
+
m = Object.assign(m, proto);
|
|
1439
|
+
return m;
|
|
1440
|
+
}
|
|
1441
|
+
constructor(kwargs) {
|
|
1442
|
+
if (!kwargs) {
|
|
1443
|
+
return;
|
|
1444
|
+
}
|
|
1445
|
+
Object.assign(this, kwargs);
|
|
1446
|
+
}
|
|
1447
|
+
toApiJson() {
|
|
1448
|
+
const toReturn = {};
|
|
1449
|
+
if (typeof this.templateId !== 'undefined') {
|
|
1450
|
+
toReturn['templateId'] = this.templateId;
|
|
1451
|
+
}
|
|
1452
|
+
return toReturn;
|
|
1453
|
+
}
|
|
1454
|
+
}
|
|
1312
1455
|
class DeleteWidgetRequest {
|
|
1313
1456
|
static fromProto(proto) {
|
|
1314
1457
|
let m = new DeleteWidgetRequest();
|
|
@@ -1329,9 +1472,9 @@ class DeleteWidgetRequest {
|
|
|
1329
1472
|
return toReturn;
|
|
1330
1473
|
}
|
|
1331
1474
|
}
|
|
1332
|
-
class
|
|
1475
|
+
class GetMultiConversationDetailsResponseDetailedConversation {
|
|
1333
1476
|
static fromProto(proto) {
|
|
1334
|
-
let m = new
|
|
1477
|
+
let m = new GetMultiConversationDetailsResponseDetailedConversation();
|
|
1335
1478
|
m = Object.assign(m, proto);
|
|
1336
1479
|
if (proto.conversation) {
|
|
1337
1480
|
m.conversation = Conversation.fromProto(proto.conversation);
|
|
@@ -1364,9 +1507,9 @@ class SearchConversationsResponseDetailedConversation {
|
|
|
1364
1507
|
return toReturn;
|
|
1365
1508
|
}
|
|
1366
1509
|
}
|
|
1367
|
-
class
|
|
1510
|
+
class SearchConversationsResponseDetailedConversation {
|
|
1368
1511
|
static fromProto(proto) {
|
|
1369
|
-
let m = new
|
|
1512
|
+
let m = new SearchConversationsResponseDetailedConversation();
|
|
1370
1513
|
m = Object.assign(m, proto);
|
|
1371
1514
|
if (proto.conversation) {
|
|
1372
1515
|
m.conversation = Conversation.fromProto(proto.conversation);
|
|
@@ -2040,6 +2183,64 @@ class GetWidgetResponse {
|
|
|
2040
2183
|
return toReturn;
|
|
2041
2184
|
}
|
|
2042
2185
|
}
|
|
2186
|
+
class ListMessageTemplateRequest {
|
|
2187
|
+
static fromProto(proto) {
|
|
2188
|
+
let m = new ListMessageTemplateRequest();
|
|
2189
|
+
m = Object.assign(m, proto);
|
|
2190
|
+
if (proto.subjectParticipant) {
|
|
2191
|
+
m.subjectParticipant = SubjectParticipant.fromProto(proto.subjectParticipant);
|
|
2192
|
+
}
|
|
2193
|
+
if (proto.pagingOptions) {
|
|
2194
|
+
m.pagingOptions = PagedRequestOptions.fromProto(proto.pagingOptions);
|
|
2195
|
+
}
|
|
2196
|
+
return m;
|
|
2197
|
+
}
|
|
2198
|
+
constructor(kwargs) {
|
|
2199
|
+
if (!kwargs) {
|
|
2200
|
+
return;
|
|
2201
|
+
}
|
|
2202
|
+
Object.assign(this, kwargs);
|
|
2203
|
+
}
|
|
2204
|
+
toApiJson() {
|
|
2205
|
+
const toReturn = {};
|
|
2206
|
+
if (typeof this.subjectParticipant !== 'undefined' && this.subjectParticipant !== null) {
|
|
2207
|
+
toReturn['subjectParticipant'] = 'toApiJson' in this.subjectParticipant ? this.subjectParticipant.toApiJson() : this.subjectParticipant;
|
|
2208
|
+
}
|
|
2209
|
+
if (typeof this.pagingOptions !== 'undefined' && this.pagingOptions !== null) {
|
|
2210
|
+
toReturn['pagingOptions'] = 'toApiJson' in this.pagingOptions ? this.pagingOptions.toApiJson() : this.pagingOptions;
|
|
2211
|
+
}
|
|
2212
|
+
return toReturn;
|
|
2213
|
+
}
|
|
2214
|
+
}
|
|
2215
|
+
class ListMessageTemplateResponse {
|
|
2216
|
+
static fromProto(proto) {
|
|
2217
|
+
let m = new ListMessageTemplateResponse();
|
|
2218
|
+
m = Object.assign(m, proto);
|
|
2219
|
+
if (proto.templates) {
|
|
2220
|
+
m.templates = proto.templates.map(MessageTemplate.fromProto);
|
|
2221
|
+
}
|
|
2222
|
+
if (proto.pagingMetadata) {
|
|
2223
|
+
m.pagingMetadata = PagedResponseMetadata.fromProto(proto.pagingMetadata);
|
|
2224
|
+
}
|
|
2225
|
+
return m;
|
|
2226
|
+
}
|
|
2227
|
+
constructor(kwargs) {
|
|
2228
|
+
if (!kwargs) {
|
|
2229
|
+
return;
|
|
2230
|
+
}
|
|
2231
|
+
Object.assign(this, kwargs);
|
|
2232
|
+
}
|
|
2233
|
+
toApiJson() {
|
|
2234
|
+
const toReturn = {};
|
|
2235
|
+
if (typeof this.templates !== 'undefined' && this.templates !== null) {
|
|
2236
|
+
toReturn['templates'] = 'toApiJson' in this.templates ? this.templates.toApiJson() : this.templates;
|
|
2237
|
+
}
|
|
2238
|
+
if (typeof this.pagingMetadata !== 'undefined' && this.pagingMetadata !== null) {
|
|
2239
|
+
toReturn['pagingMetadata'] = 'toApiJson' in this.pagingMetadata ? this.pagingMetadata.toApiJson() : this.pagingMetadata;
|
|
2240
|
+
}
|
|
2241
|
+
return toReturn;
|
|
2242
|
+
}
|
|
2243
|
+
}
|
|
2043
2244
|
class ListMessagesRequestListMessagesFilters {
|
|
2044
2245
|
static fromProto(proto) {
|
|
2045
2246
|
let m = new ListMessagesRequestListMessagesFilters();
|
|
@@ -2802,6 +3003,58 @@ class UpdateMessageStatusRequest {
|
|
|
2802
3003
|
return toReturn;
|
|
2803
3004
|
}
|
|
2804
3005
|
}
|
|
3006
|
+
class UpdateMessageTemplateRequest {
|
|
3007
|
+
static fromProto(proto) {
|
|
3008
|
+
let m = new UpdateMessageTemplateRequest();
|
|
3009
|
+
m = Object.assign(m, proto);
|
|
3010
|
+
if (proto.template) {
|
|
3011
|
+
m.template = MessageTemplate.fromProto(proto.template);
|
|
3012
|
+
}
|
|
3013
|
+
if (proto.fieldMask) {
|
|
3014
|
+
m.fieldMask = FieldMask.fromProto(proto.fieldMask);
|
|
3015
|
+
}
|
|
3016
|
+
return m;
|
|
3017
|
+
}
|
|
3018
|
+
constructor(kwargs) {
|
|
3019
|
+
if (!kwargs) {
|
|
3020
|
+
return;
|
|
3021
|
+
}
|
|
3022
|
+
Object.assign(this, kwargs);
|
|
3023
|
+
}
|
|
3024
|
+
toApiJson() {
|
|
3025
|
+
const toReturn = {};
|
|
3026
|
+
if (typeof this.template !== 'undefined' && this.template !== null) {
|
|
3027
|
+
toReturn['template'] = 'toApiJson' in this.template ? this.template.toApiJson() : this.template;
|
|
3028
|
+
}
|
|
3029
|
+
if (typeof this.fieldMask !== 'undefined' && this.fieldMask !== null) {
|
|
3030
|
+
toReturn['fieldMask'] = 'toApiJson' in this.fieldMask ? this.fieldMask.toApiJson() : this.fieldMask;
|
|
3031
|
+
}
|
|
3032
|
+
return toReturn;
|
|
3033
|
+
}
|
|
3034
|
+
}
|
|
3035
|
+
class UpdateMessageTemplateResponse {
|
|
3036
|
+
static fromProto(proto) {
|
|
3037
|
+
let m = new UpdateMessageTemplateResponse();
|
|
3038
|
+
m = Object.assign(m, proto);
|
|
3039
|
+
if (proto.template) {
|
|
3040
|
+
m.template = MessageTemplate.fromProto(proto.template);
|
|
3041
|
+
}
|
|
3042
|
+
return m;
|
|
3043
|
+
}
|
|
3044
|
+
constructor(kwargs) {
|
|
3045
|
+
if (!kwargs) {
|
|
3046
|
+
return;
|
|
3047
|
+
}
|
|
3048
|
+
Object.assign(this, kwargs);
|
|
3049
|
+
}
|
|
3050
|
+
toApiJson() {
|
|
3051
|
+
const toReturn = {};
|
|
3052
|
+
if (typeof this.template !== 'undefined' && this.template !== null) {
|
|
3053
|
+
toReturn['template'] = 'toApiJson' in this.template ? this.template.toApiJson() : this.template;
|
|
3054
|
+
}
|
|
3055
|
+
return toReturn;
|
|
3056
|
+
}
|
|
3057
|
+
}
|
|
2805
3058
|
class UpdateWidgetRequest {
|
|
2806
3059
|
static fromProto(proto) {
|
|
2807
3060
|
let m = new UpdateWidgetRequest();
|
|
@@ -2809,6 +3062,9 @@ class UpdateWidgetRequest {
|
|
|
2809
3062
|
if (proto.fieldMask) {
|
|
2810
3063
|
m.fieldMask = FieldMask.fromProto(proto.fieldMask);
|
|
2811
3064
|
}
|
|
3065
|
+
if (proto.dataSources) {
|
|
3066
|
+
m.dataSources = DataSources.fromProto(proto.dataSources);
|
|
3067
|
+
}
|
|
2812
3068
|
return m;
|
|
2813
3069
|
}
|
|
2814
3070
|
constructor(kwargs) {
|
|
@@ -2840,6 +3096,9 @@ class UpdateWidgetRequest {
|
|
|
2840
3096
|
if (typeof this.fieldMask !== 'undefined' && this.fieldMask !== null) {
|
|
2841
3097
|
toReturn['fieldMask'] = 'toApiJson' in this.fieldMask ? this.fieldMask.toApiJson() : this.fieldMask;
|
|
2842
3098
|
}
|
|
3099
|
+
if (typeof this.dataSources !== 'undefined' && this.dataSources !== null) {
|
|
3100
|
+
toReturn['dataSources'] = 'toApiJson' in this.dataSources ? this.dataSources.toApiJson() : this.dataSources;
|
|
3101
|
+
}
|
|
2843
3102
|
return toReturn;
|
|
2844
3103
|
}
|
|
2845
3104
|
}
|
|
@@ -3119,6 +3378,25 @@ class ConversationApiService {
|
|
|
3119
3378
|
return this.http.post(this._host + "/conversation.v1.ConversationService/GetWidgetConfig", request.toApiJson(), this.apiOptions())
|
|
3120
3379
|
.pipe(map(resp => GetWidgetConfigResponse.fromProto(resp)));
|
|
3121
3380
|
}
|
|
3381
|
+
listMessageTemplate(r) {
|
|
3382
|
+
const request = (r.toApiJson) ? r : new ListMessageTemplateRequest(r);
|
|
3383
|
+
return this.http.post(this._host + "/conversation.v1.ConversationService/ListMessageTemplate", request.toApiJson(), this.apiOptions())
|
|
3384
|
+
.pipe(map(resp => ListMessageTemplateResponse.fromProto(resp)));
|
|
3385
|
+
}
|
|
3386
|
+
deleteMessageTemplate(r) {
|
|
3387
|
+
const request = (r.toApiJson) ? r : new DeleteMessageTemplateRequest(r);
|
|
3388
|
+
return this.http.post(this._host + "/conversation.v1.ConversationService/DeleteMessageTemplate", request.toApiJson(), { ...this.apiOptions(), observe: 'response' });
|
|
3389
|
+
}
|
|
3390
|
+
createMessageTemplate(r) {
|
|
3391
|
+
const request = (r.toApiJson) ? r : new CreateMessageTemplateRequest(r);
|
|
3392
|
+
return this.http.post(this._host + "/conversation.v1.ConversationService/CreateMessageTemplate", request.toApiJson(), this.apiOptions())
|
|
3393
|
+
.pipe(map(resp => CreateMessageTemplateResponse.fromProto(resp)));
|
|
3394
|
+
}
|
|
3395
|
+
updateMessageTemplate(r) {
|
|
3396
|
+
const request = (r.toApiJson) ? r : new UpdateMessageTemplateRequest(r);
|
|
3397
|
+
return this.http.post(this._host + "/conversation.v1.ConversationService/UpdateMessageTemplate", request.toApiJson(), this.apiOptions())
|
|
3398
|
+
.pipe(map(resp => UpdateMessageTemplateResponse.fromProto(resp)));
|
|
3399
|
+
}
|
|
3122
3400
|
}
|
|
3123
3401
|
ConversationApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ConversationApiService, deps: [{ token: i1.HttpClient }, { token: HostService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
3124
3402
|
ConversationApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ConversationApiService, providedIn: 'root' });
|
|
@@ -3181,5 +3459,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
3181
3459
|
* Generated bundle index. Do not edit.
|
|
3182
3460
|
*/
|
|
3183
3461
|
|
|
3184
|
-
export { Access, AddConversationToConversationViewRequest, AddMultiParticipantsRequest, AddMultiParticipantsResponse, Address, Configuration, Conversation, ConversationApiService, ConversationChannel, ConversationKey, ConversationMessageCount, CreateConversationRequest, CreateConversationResponse, CreateMultiMessagesRequest, CreateWidgetConversationRequest, CreateWidgetConversationResponse, CreateWidgetRequest, CreateWidgetResponse, DeleteConversationRequest, DeleteMessageRequest, DeleteWidgetRequest, FieldMask, GetAvailableChannelsForConversationRequest, GetAvailableChannelsForConversationResponse, GetConfigurationRequest, GetConfigurationResponse, GetConversationByKeyRequest, GetConversationByKeyResponse, GetConversationViewsRequest, GetConversationViewsResponse, GetMessageRequest, GetMultiConfigurationRequest, GetMultiConfigurationResponse, GetMultiConversationDetailsRequest, GetMultiConversationDetailsResponse, GetMultiConversationDetailsResponseDetailedConversation, GetMultiConversationMessageCountRequest, GetMultiConversationMessageCountResponse, GetMultiConversationMessageCountResponseCountsEntry, GetMultiMessagesRequest, GetMultiMessagesResponse, GetMultiParticipantsRequest, GetMultiParticipantsResponse, GetMultiWidgetMessagesRequest, GetMultiWidgetMessagesResponse, GetParticipantsByKeyRequest, GetParticipantsByKeyResponse, GetWidgetConfigRequest, GetWidgetConfigResponse, 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, SendWidgetMessageResponse, SetLastSeenRequest, SetLastSeenRequestStatus, SetLastSeenResponse, SortDirection, SubjectParticipant, UpdateMessageStatusRequest, UpdateWidgetRequest, UpdateWidgetResponse, UpsertConfigurationRequest, UpsertConfigurationResponse, View, ViewType, Widget, WidgetPosition };
|
|
3462
|
+
export { Access, AddConversationToConversationViewRequest, AddMultiParticipantsRequest, AddMultiParticipantsResponse, Address, Configuration, Conversation, ConversationApiService, ConversationChannel, ConversationKey, ConversationMessageCount, CreateConversationRequest, CreateConversationResponse, CreateMessageTemplateRequest, CreateMessageTemplateResponse, CreateMultiMessagesRequest, CreateWidgetConversationRequest, CreateWidgetConversationResponse, CreateWidgetRequest, CreateWidgetResponse, DataSources, DeleteConversationRequest, DeleteMessageRequest, DeleteMessageTemplateRequest, DeleteWidgetRequest, FieldMask, GetAvailableChannelsForConversationRequest, GetAvailableChannelsForConversationResponse, GetConfigurationRequest, GetConfigurationResponse, GetConversationByKeyRequest, GetConversationByKeyResponse, GetConversationViewsRequest, GetConversationViewsResponse, GetMessageRequest, GetMultiConfigurationRequest, GetMultiConfigurationResponse, GetMultiConversationDetailsRequest, GetMultiConversationDetailsResponse, GetMultiConversationDetailsResponseDetailedConversation, GetMultiConversationMessageCountRequest, GetMultiConversationMessageCountResponse, GetMultiConversationMessageCountResponseCountsEntry, GetMultiMessagesRequest, GetMultiMessagesResponse, GetMultiParticipantsRequest, GetMultiParticipantsResponse, GetMultiWidgetMessagesRequest, GetMultiWidgetMessagesResponse, GetParticipantsByKeyRequest, GetParticipantsByKeyResponse, GetWidgetConfigRequest, GetWidgetConfigResponse, GetWidgetConversationResponse, GetWidgetRequest, GetWidgetResponse, GlobalParticipantType, InboxApiService, LastSeenByParticipant, ListMessageTemplateRequest, ListMessageTemplateResponse, ListMessagesRequest, ListMessagesRequestListMessagesFilters, ListMessagesResponse, ListWidgetsRequest, ListWidgetsResponse, LookupConversationsRequest, LookupConversationsRequestLookupConversationsFilters, LookupConversationsResponse, LookupConversationsResponseConversations, Media, Message, MessageStatus, MessageTemplate, MessageType, Metadata, MetadataDataEntry, MetadataIdentifier, PagedRequestOptions, PagedResponseMetadata, Participant, ParticipantKey, ParticipantMessageStatus, ParticipantType, PlatformLocation, ReceiveMessageRequest, ReceiveMessageRequestMetadataEntry, RemoveConversationFromConversationViewRequest, SearchConversationsRequest, SearchConversationsResponse, SearchConversationsResponseDetailedConversation, SendMessageRequest, SendMessageResponse, SendStatus, SendWidgetMessageRequest, SendWidgetMessageResponse, SetLastSeenRequest, SetLastSeenRequestStatus, SetLastSeenResponse, SortDirection, SubjectParticipant, UpdateMessageStatusRequest, UpdateMessageTemplateRequest, UpdateMessageTemplateResponse, UpdateWidgetRequest, UpdateWidgetResponse, UpsertConfigurationRequest, UpsertConfigurationResponse, View, ViewType, Widget, WidgetPosition };
|
|
3185
3463
|
//# sourceMappingURL=vendasta-conversation.mjs.map
|