@vendasta/conversation 0.25.0 → 0.27.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/inbox.api.service.mjs +51 -0
- package/esm2020/lib/_internal/index.mjs +2 -1
- package/esm2020/lib/_internal/interfaces/api.interface.mjs +1 -1
- package/esm2020/lib/_internal/interfaces/common.interface.mjs +8 -0
- package/esm2020/lib/_internal/interfaces/configuration.interface.mjs +2 -0
- package/esm2020/lib/_internal/interfaces/conversation.interface.mjs +1 -7
- package/esm2020/lib/_internal/interfaces/index.mjs +1 -1
- package/esm2020/lib/_internal/objects/api.mjs +145 -5
- package/esm2020/lib/_internal/objects/common.mjs +34 -0
- package/esm2020/lib/_internal/objects/configuration.mjs +49 -0
- package/esm2020/lib/_internal/objects/conversation.mjs +2 -27
- package/esm2020/lib/_internal/objects/index.mjs +5 -3
- package/esm2020/lib/index.mjs +2 -1
- package/fesm2015/vendasta-conversation.mjs +277 -46
- package/fesm2015/vendasta-conversation.mjs.map +1 -1
- package/fesm2020/vendasta-conversation.mjs +277 -46
- package/fesm2020/vendasta-conversation.mjs.map +1 -1
- package/lib/_internal/inbox.api.service.d.ts +18 -0
- package/lib/_internal/index.d.ts +1 -0
- package/lib/_internal/interfaces/api.interface.d.ts +22 -2
- package/lib/_internal/interfaces/common.interface.d.ts +5 -0
- package/lib/_internal/interfaces/configuration.interface.d.ts +8 -0
- package/lib/_internal/interfaces/conversation.interface.d.ts +1 -4
- package/lib/_internal/interfaces/index.d.ts +4 -2
- package/lib/_internal/objects/api.d.ts +44 -6
- package/lib/_internal/objects/common.d.ts +10 -0
- package/lib/_internal/objects/configuration.d.ts +13 -0
- package/lib/_internal/objects/conversation.d.ts +1 -7
- package/lib/_internal/objects/index.d.ts +4 -2
- package/lib/index.d.ts +1 -0
- package/package.json +1 -1
|
@@ -111,7 +111,7 @@ var SetLastSeenRequestStatus;
|
|
|
111
111
|
|
|
112
112
|
// *********************************
|
|
113
113
|
|
|
114
|
-
function enumStringToValue$
|
|
114
|
+
function enumStringToValue$6(enumRef, value) {
|
|
115
115
|
if (typeof value === 'number') {
|
|
116
116
|
return value;
|
|
117
117
|
}
|
|
@@ -128,7 +128,7 @@ class Message {
|
|
|
128
128
|
let m = new Message();
|
|
129
129
|
m = Object.assign(m, proto);
|
|
130
130
|
if (proto.type) {
|
|
131
|
-
m.type = enumStringToValue$
|
|
131
|
+
m.type = enumStringToValue$6(MessageType, proto.type);
|
|
132
132
|
}
|
|
133
133
|
if (proto.created) {
|
|
134
134
|
m.created = new Date(proto.created);
|
|
@@ -190,7 +190,7 @@ class ParticipantMessageStatus {
|
|
|
190
190
|
let m = new ParticipantMessageStatus();
|
|
191
191
|
m = Object.assign(m, proto);
|
|
192
192
|
if (proto.status) {
|
|
193
|
-
m.status = enumStringToValue$
|
|
193
|
+
m.status = enumStringToValue$6(MessageStatus, proto.status);
|
|
194
194
|
}
|
|
195
195
|
if (proto.updated) {
|
|
196
196
|
m.updated = new Date(proto.updated);
|
|
@@ -215,7 +215,40 @@ class ParticipantMessageStatus {
|
|
|
215
215
|
}
|
|
216
216
|
}
|
|
217
217
|
|
|
218
|
-
function enumStringToValue$
|
|
218
|
+
function enumStringToValue$5(enumRef, value) {
|
|
219
|
+
if (typeof value === 'number') {
|
|
220
|
+
return value;
|
|
221
|
+
}
|
|
222
|
+
return enumRef[value];
|
|
223
|
+
}
|
|
224
|
+
class SubjectParticipant {
|
|
225
|
+
constructor(kwargs) {
|
|
226
|
+
if (!kwargs) {
|
|
227
|
+
return;
|
|
228
|
+
}
|
|
229
|
+
Object.assign(this, kwargs);
|
|
230
|
+
}
|
|
231
|
+
static fromProto(proto) {
|
|
232
|
+
let m = new SubjectParticipant();
|
|
233
|
+
m = Object.assign(m, proto);
|
|
234
|
+
if (proto.participantType) {
|
|
235
|
+
m.participantType = enumStringToValue$5(GlobalParticipantType, proto.participantType);
|
|
236
|
+
}
|
|
237
|
+
return m;
|
|
238
|
+
}
|
|
239
|
+
toApiJson() {
|
|
240
|
+
const toReturn = {};
|
|
241
|
+
if (typeof this.participantType !== 'undefined') {
|
|
242
|
+
toReturn['participantType'] = this.participantType;
|
|
243
|
+
}
|
|
244
|
+
if (typeof this.internalParticipantId !== 'undefined') {
|
|
245
|
+
toReturn['internalParticipantId'] = this.internalParticipantId;
|
|
246
|
+
}
|
|
247
|
+
return toReturn;
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
function enumStringToValue$4(enumRef, value) {
|
|
219
252
|
if (typeof value === 'number') {
|
|
220
253
|
return value;
|
|
221
254
|
}
|
|
@@ -232,7 +265,7 @@ class Conversation {
|
|
|
232
265
|
let m = new Conversation();
|
|
233
266
|
m = Object.assign(m, proto);
|
|
234
267
|
if (proto.channel) {
|
|
235
|
-
m.channel = enumStringToValue$
|
|
268
|
+
m.channel = enumStringToValue$4(ConversationChannel, proto.channel);
|
|
236
269
|
}
|
|
237
270
|
if (proto.created) {
|
|
238
271
|
m.created = new Date(proto.created);
|
|
@@ -247,7 +280,7 @@ class Conversation {
|
|
|
247
280
|
m.latestMsgSentTime = new Date(proto.latestMsgSentTime);
|
|
248
281
|
}
|
|
249
282
|
if (proto.originLocation) {
|
|
250
|
-
m.originLocation = enumStringToValue$
|
|
283
|
+
m.originLocation = enumStringToValue$4(PlatformLocation, proto.originLocation);
|
|
251
284
|
}
|
|
252
285
|
if (proto.lastSeenByParticipant) {
|
|
253
286
|
m.lastSeenByParticipant = proto.lastSeenByParticipant.map(LastSeenByParticipant.fromProto);
|
|
@@ -306,7 +339,7 @@ class ConversationKey {
|
|
|
306
339
|
m.subjectParticipants = proto.subjectParticipants.map(SubjectParticipant.fromProto);
|
|
307
340
|
}
|
|
308
341
|
if (proto.channel) {
|
|
309
|
-
m.channel = enumStringToValue$
|
|
342
|
+
m.channel = enumStringToValue$4(ConversationChannel, proto.channel);
|
|
310
343
|
}
|
|
311
344
|
return m;
|
|
312
345
|
}
|
|
@@ -350,34 +383,8 @@ class LastSeenByParticipant {
|
|
|
350
383
|
return toReturn;
|
|
351
384
|
}
|
|
352
385
|
}
|
|
353
|
-
class SubjectParticipant {
|
|
354
|
-
constructor(kwargs) {
|
|
355
|
-
if (!kwargs) {
|
|
356
|
-
return;
|
|
357
|
-
}
|
|
358
|
-
Object.assign(this, kwargs);
|
|
359
|
-
}
|
|
360
|
-
static fromProto(proto) {
|
|
361
|
-
let m = new SubjectParticipant();
|
|
362
|
-
m = Object.assign(m, proto);
|
|
363
|
-
if (proto.participantType) {
|
|
364
|
-
m.participantType = enumStringToValue$3(GlobalParticipantType, proto.participantType);
|
|
365
|
-
}
|
|
366
|
-
return m;
|
|
367
|
-
}
|
|
368
|
-
toApiJson() {
|
|
369
|
-
const toReturn = {};
|
|
370
|
-
if (typeof this.participantType !== 'undefined') {
|
|
371
|
-
toReturn['participantType'] = this.participantType;
|
|
372
|
-
}
|
|
373
|
-
if (typeof this.internalParticipantId !== 'undefined') {
|
|
374
|
-
toReturn['internalParticipantId'] = this.internalParticipantId;
|
|
375
|
-
}
|
|
376
|
-
return toReturn;
|
|
377
|
-
}
|
|
378
|
-
}
|
|
379
386
|
|
|
380
|
-
function enumStringToValue$
|
|
387
|
+
function enumStringToValue$3(enumRef, value) {
|
|
381
388
|
if (typeof value === 'number') {
|
|
382
389
|
return value;
|
|
383
390
|
}
|
|
@@ -429,10 +436,10 @@ class Participant {
|
|
|
429
436
|
let m = new Participant();
|
|
430
437
|
m = Object.assign(m, proto);
|
|
431
438
|
if (proto.location) {
|
|
432
|
-
m.location = enumStringToValue$
|
|
439
|
+
m.location = enumStringToValue$3(PlatformLocation, proto.location);
|
|
433
440
|
}
|
|
434
441
|
if (proto.channel) {
|
|
435
|
-
m.channel = enumStringToValue$
|
|
442
|
+
m.channel = enumStringToValue$3(ConversationChannel, proto.channel);
|
|
436
443
|
}
|
|
437
444
|
if (proto.created) {
|
|
438
445
|
m.created = new Date(proto.created);
|
|
@@ -444,7 +451,7 @@ class Participant {
|
|
|
444
451
|
m.deleted = new Date(proto.deleted);
|
|
445
452
|
}
|
|
446
453
|
if (proto.participantType) {
|
|
447
|
-
m.participantType = enumStringToValue$
|
|
454
|
+
m.participantType = enumStringToValue$3(ParticipantType, proto.participantType);
|
|
448
455
|
}
|
|
449
456
|
if (proto.address) {
|
|
450
457
|
m.address = Address.fromProto(proto.address);
|
|
@@ -521,13 +528,13 @@ class ParticipantKey {
|
|
|
521
528
|
let m = new ParticipantKey();
|
|
522
529
|
m = Object.assign(m, proto);
|
|
523
530
|
if (proto.location) {
|
|
524
|
-
m.location = enumStringToValue$
|
|
531
|
+
m.location = enumStringToValue$3(PlatformLocation, proto.location);
|
|
525
532
|
}
|
|
526
533
|
if (proto.channels) {
|
|
527
|
-
m.channels = proto.channels.map((v) => enumStringToValue$
|
|
534
|
+
m.channels = proto.channels.map((v) => enumStringToValue$3(ConversationChannel, v));
|
|
528
535
|
}
|
|
529
536
|
if (proto.participantType) {
|
|
530
|
-
m.participantType = enumStringToValue$
|
|
537
|
+
m.participantType = enumStringToValue$3(GlobalParticipantType, proto.participantType);
|
|
531
538
|
}
|
|
532
539
|
return m;
|
|
533
540
|
}
|
|
@@ -555,7 +562,7 @@ class ParticipantKey {
|
|
|
555
562
|
}
|
|
556
563
|
}
|
|
557
564
|
|
|
558
|
-
function enumStringToValue$
|
|
565
|
+
function enumStringToValue$2(enumRef, value) {
|
|
559
566
|
if (typeof value === 'number') {
|
|
560
567
|
return value;
|
|
561
568
|
}
|
|
@@ -585,6 +592,54 @@ class Access {
|
|
|
585
592
|
}
|
|
586
593
|
}
|
|
587
594
|
|
|
595
|
+
function enumStringToValue$1(enumRef, value) {
|
|
596
|
+
if (typeof value === 'number') {
|
|
597
|
+
return value;
|
|
598
|
+
}
|
|
599
|
+
return enumRef[value];
|
|
600
|
+
}
|
|
601
|
+
class Configuration {
|
|
602
|
+
constructor(kwargs) {
|
|
603
|
+
if (!kwargs) {
|
|
604
|
+
return;
|
|
605
|
+
}
|
|
606
|
+
Object.assign(this, kwargs);
|
|
607
|
+
}
|
|
608
|
+
static fromProto(proto) {
|
|
609
|
+
let m = new Configuration();
|
|
610
|
+
m = Object.assign(m, proto);
|
|
611
|
+
if (proto.subjectParticipant) {
|
|
612
|
+
m.subjectParticipant = SubjectParticipant.fromProto(proto.subjectParticipant);
|
|
613
|
+
}
|
|
614
|
+
if (proto.createdAt) {
|
|
615
|
+
m.createdAt = new Date(proto.createdAt);
|
|
616
|
+
}
|
|
617
|
+
if (proto.updatedAt) {
|
|
618
|
+
m.updatedAt = new Date(proto.updatedAt);
|
|
619
|
+
}
|
|
620
|
+
return m;
|
|
621
|
+
}
|
|
622
|
+
toApiJson() {
|
|
623
|
+
const toReturn = {};
|
|
624
|
+
if (typeof this.subjectParticipant !== 'undefined' && this.subjectParticipant !== null) {
|
|
625
|
+
toReturn['subjectParticipant'] = 'toApiJson' in this.subjectParticipant ? this.subjectParticipant.toApiJson() : this.subjectParticipant;
|
|
626
|
+
}
|
|
627
|
+
if (typeof this.createdAt !== 'undefined' && this.createdAt !== null) {
|
|
628
|
+
toReturn['createdAt'] = 'toApiJson' in this.createdAt ? this.createdAt.toApiJson() : this.createdAt;
|
|
629
|
+
}
|
|
630
|
+
if (typeof this.updatedAt !== 'undefined' && this.updatedAt !== null) {
|
|
631
|
+
toReturn['updatedAt'] = 'toApiJson' in this.updatedAt ? this.updatedAt.toApiJson() : this.updatedAt;
|
|
632
|
+
}
|
|
633
|
+
if (typeof this.availabilityMessage !== 'undefined') {
|
|
634
|
+
toReturn['availabilityMessage'] = this.availabilityMessage;
|
|
635
|
+
}
|
|
636
|
+
if (typeof this.showAvailabilityMessage !== 'undefined') {
|
|
637
|
+
toReturn['showAvailabilityMessage'] = this.showAvailabilityMessage;
|
|
638
|
+
}
|
|
639
|
+
return toReturn;
|
|
640
|
+
}
|
|
641
|
+
}
|
|
642
|
+
|
|
588
643
|
function enumStringToValue(enumRef, value) {
|
|
589
644
|
if (typeof value === 'number') {
|
|
590
645
|
return value;
|
|
@@ -895,7 +950,7 @@ class DeleteMessageRequest {
|
|
|
895
950
|
return toReturn;
|
|
896
951
|
}
|
|
897
952
|
}
|
|
898
|
-
class
|
|
953
|
+
class GetMultiConversationDetailsResponseDetailedConversation {
|
|
899
954
|
constructor(kwargs) {
|
|
900
955
|
if (!kwargs) {
|
|
901
956
|
return;
|
|
@@ -903,7 +958,7 @@ class SearchConversationsResponseDetailedConversation {
|
|
|
903
958
|
Object.assign(this, kwargs);
|
|
904
959
|
}
|
|
905
960
|
static fromProto(proto) {
|
|
906
|
-
let m = new
|
|
961
|
+
let m = new GetMultiConversationDetailsResponseDetailedConversation();
|
|
907
962
|
m = Object.assign(m, proto);
|
|
908
963
|
if (proto.conversation) {
|
|
909
964
|
m.conversation = Conversation.fromProto(proto.conversation);
|
|
@@ -930,7 +985,7 @@ class SearchConversationsResponseDetailedConversation {
|
|
|
930
985
|
return toReturn;
|
|
931
986
|
}
|
|
932
987
|
}
|
|
933
|
-
class
|
|
988
|
+
class SearchConversationsResponseDetailedConversation {
|
|
934
989
|
constructor(kwargs) {
|
|
935
990
|
if (!kwargs) {
|
|
936
991
|
return;
|
|
@@ -938,7 +993,7 @@ class GetMultiConversationDetailsResponseDetailedConversation {
|
|
|
938
993
|
Object.assign(this, kwargs);
|
|
939
994
|
}
|
|
940
995
|
static fromProto(proto) {
|
|
941
|
-
let m = new
|
|
996
|
+
let m = new SearchConversationsResponseDetailedConversation();
|
|
942
997
|
m = Object.assign(m, proto);
|
|
943
998
|
if (proto.conversation) {
|
|
944
999
|
m.conversation = Conversation.fromProto(proto.conversation);
|
|
@@ -965,6 +1020,52 @@ class GetMultiConversationDetailsResponseDetailedConversation {
|
|
|
965
1020
|
return toReturn;
|
|
966
1021
|
}
|
|
967
1022
|
}
|
|
1023
|
+
class GetConfigurationRequest {
|
|
1024
|
+
constructor(kwargs) {
|
|
1025
|
+
if (!kwargs) {
|
|
1026
|
+
return;
|
|
1027
|
+
}
|
|
1028
|
+
Object.assign(this, kwargs);
|
|
1029
|
+
}
|
|
1030
|
+
static fromProto(proto) {
|
|
1031
|
+
let m = new GetConfigurationRequest();
|
|
1032
|
+
m = Object.assign(m, proto);
|
|
1033
|
+
if (proto.subjectParticipant) {
|
|
1034
|
+
m.subjectParticipant = SubjectParticipant.fromProto(proto.subjectParticipant);
|
|
1035
|
+
}
|
|
1036
|
+
return m;
|
|
1037
|
+
}
|
|
1038
|
+
toApiJson() {
|
|
1039
|
+
const toReturn = {};
|
|
1040
|
+
if (typeof this.subjectParticipant !== 'undefined' && this.subjectParticipant !== null) {
|
|
1041
|
+
toReturn['subjectParticipant'] = 'toApiJson' in this.subjectParticipant ? this.subjectParticipant.toApiJson() : this.subjectParticipant;
|
|
1042
|
+
}
|
|
1043
|
+
return toReturn;
|
|
1044
|
+
}
|
|
1045
|
+
}
|
|
1046
|
+
class GetConfigurationResponse {
|
|
1047
|
+
constructor(kwargs) {
|
|
1048
|
+
if (!kwargs) {
|
|
1049
|
+
return;
|
|
1050
|
+
}
|
|
1051
|
+
Object.assign(this, kwargs);
|
|
1052
|
+
}
|
|
1053
|
+
static fromProto(proto) {
|
|
1054
|
+
let m = new GetConfigurationResponse();
|
|
1055
|
+
m = Object.assign(m, proto);
|
|
1056
|
+
if (proto.configuration) {
|
|
1057
|
+
m.configuration = Configuration.fromProto(proto.configuration);
|
|
1058
|
+
}
|
|
1059
|
+
return m;
|
|
1060
|
+
}
|
|
1061
|
+
toApiJson() {
|
|
1062
|
+
const toReturn = {};
|
|
1063
|
+
if (typeof this.configuration !== 'undefined' && this.configuration !== null) {
|
|
1064
|
+
toReturn['configuration'] = 'toApiJson' in this.configuration ? this.configuration.toApiJson() : this.configuration;
|
|
1065
|
+
}
|
|
1066
|
+
return toReturn;
|
|
1067
|
+
}
|
|
1068
|
+
}
|
|
968
1069
|
class GetConversationByKeyRequest {
|
|
969
1070
|
constructor(kwargs) {
|
|
970
1071
|
if (!kwargs) {
|
|
@@ -1031,6 +1132,52 @@ class GetMessageRequest {
|
|
|
1031
1132
|
return toReturn;
|
|
1032
1133
|
}
|
|
1033
1134
|
}
|
|
1135
|
+
class GetMultiConfigurationRequest {
|
|
1136
|
+
constructor(kwargs) {
|
|
1137
|
+
if (!kwargs) {
|
|
1138
|
+
return;
|
|
1139
|
+
}
|
|
1140
|
+
Object.assign(this, kwargs);
|
|
1141
|
+
}
|
|
1142
|
+
static fromProto(proto) {
|
|
1143
|
+
let m = new GetMultiConfigurationRequest();
|
|
1144
|
+
m = Object.assign(m, proto);
|
|
1145
|
+
if (proto.subjectParticipants) {
|
|
1146
|
+
m.subjectParticipants = proto.subjectParticipants.map(SubjectParticipant.fromProto);
|
|
1147
|
+
}
|
|
1148
|
+
return m;
|
|
1149
|
+
}
|
|
1150
|
+
toApiJson() {
|
|
1151
|
+
const toReturn = {};
|
|
1152
|
+
if (typeof this.subjectParticipants !== 'undefined' && this.subjectParticipants !== null) {
|
|
1153
|
+
toReturn['subjectParticipants'] = 'toApiJson' in this.subjectParticipants ? this.subjectParticipants.toApiJson() : this.subjectParticipants;
|
|
1154
|
+
}
|
|
1155
|
+
return toReturn;
|
|
1156
|
+
}
|
|
1157
|
+
}
|
|
1158
|
+
class GetMultiConfigurationResponse {
|
|
1159
|
+
constructor(kwargs) {
|
|
1160
|
+
if (!kwargs) {
|
|
1161
|
+
return;
|
|
1162
|
+
}
|
|
1163
|
+
Object.assign(this, kwargs);
|
|
1164
|
+
}
|
|
1165
|
+
static fromProto(proto) {
|
|
1166
|
+
let m = new GetMultiConfigurationResponse();
|
|
1167
|
+
m = Object.assign(m, proto);
|
|
1168
|
+
if (proto.configurations) {
|
|
1169
|
+
m.configurations = proto.configurations.map(Configuration.fromProto);
|
|
1170
|
+
}
|
|
1171
|
+
return m;
|
|
1172
|
+
}
|
|
1173
|
+
toApiJson() {
|
|
1174
|
+
const toReturn = {};
|
|
1175
|
+
if (typeof this.configurations !== 'undefined' && this.configurations !== null) {
|
|
1176
|
+
toReturn['configurations'] = 'toApiJson' in this.configurations ? this.configurations.toApiJson() : this.configurations;
|
|
1177
|
+
}
|
|
1178
|
+
return toReturn;
|
|
1179
|
+
}
|
|
1180
|
+
}
|
|
1034
1181
|
class GetMultiConversationDetailsRequest {
|
|
1035
1182
|
constructor(kwargs) {
|
|
1036
1183
|
if (!kwargs) {
|
|
@@ -1831,6 +1978,52 @@ class UpdateMessageStatusRequest {
|
|
|
1831
1978
|
return toReturn;
|
|
1832
1979
|
}
|
|
1833
1980
|
}
|
|
1981
|
+
class UpsertConfigurationRequest {
|
|
1982
|
+
constructor(kwargs) {
|
|
1983
|
+
if (!kwargs) {
|
|
1984
|
+
return;
|
|
1985
|
+
}
|
|
1986
|
+
Object.assign(this, kwargs);
|
|
1987
|
+
}
|
|
1988
|
+
static fromProto(proto) {
|
|
1989
|
+
let m = new UpsertConfigurationRequest();
|
|
1990
|
+
m = Object.assign(m, proto);
|
|
1991
|
+
if (proto.configuration) {
|
|
1992
|
+
m.configuration = Configuration.fromProto(proto.configuration);
|
|
1993
|
+
}
|
|
1994
|
+
return m;
|
|
1995
|
+
}
|
|
1996
|
+
toApiJson() {
|
|
1997
|
+
const toReturn = {};
|
|
1998
|
+
if (typeof this.configuration !== 'undefined' && this.configuration !== null) {
|
|
1999
|
+
toReturn['configuration'] = 'toApiJson' in this.configuration ? this.configuration.toApiJson() : this.configuration;
|
|
2000
|
+
}
|
|
2001
|
+
return toReturn;
|
|
2002
|
+
}
|
|
2003
|
+
}
|
|
2004
|
+
class UpsertConfigurationResponse {
|
|
2005
|
+
constructor(kwargs) {
|
|
2006
|
+
if (!kwargs) {
|
|
2007
|
+
return;
|
|
2008
|
+
}
|
|
2009
|
+
Object.assign(this, kwargs);
|
|
2010
|
+
}
|
|
2011
|
+
static fromProto(proto) {
|
|
2012
|
+
let m = new UpsertConfigurationResponse();
|
|
2013
|
+
m = Object.assign(m, proto);
|
|
2014
|
+
if (proto.configuration) {
|
|
2015
|
+
m.configuration = Configuration.fromProto(proto.configuration);
|
|
2016
|
+
}
|
|
2017
|
+
return m;
|
|
2018
|
+
}
|
|
2019
|
+
toApiJson() {
|
|
2020
|
+
const toReturn = {};
|
|
2021
|
+
if (typeof this.configuration !== 'undefined' && this.configuration !== null) {
|
|
2022
|
+
toReturn['configuration'] = 'toApiJson' in this.configuration ? this.configuration.toApiJson() : this.configuration;
|
|
2023
|
+
}
|
|
2024
|
+
return toReturn;
|
|
2025
|
+
}
|
|
2026
|
+
}
|
|
1834
2027
|
|
|
1835
2028
|
// *********************************
|
|
1836
2029
|
|
|
@@ -1971,11 +2164,49 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.6", ngImpor
|
|
|
1971
2164
|
args: [{ providedIn: 'root' }]
|
|
1972
2165
|
}], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: HostService }]; } });
|
|
1973
2166
|
|
|
2167
|
+
// *********************************
|
|
2168
|
+
class InboxApiService {
|
|
2169
|
+
constructor(http, hostService) {
|
|
2170
|
+
this.http = http;
|
|
2171
|
+
this.hostService = hostService;
|
|
2172
|
+
this._host = this.hostService.hostWithScheme;
|
|
2173
|
+
}
|
|
2174
|
+
apiOptions() {
|
|
2175
|
+
return {
|
|
2176
|
+
headers: new HttpHeaders({
|
|
2177
|
+
'Content-Type': 'application/json'
|
|
2178
|
+
}),
|
|
2179
|
+
withCredentials: true
|
|
2180
|
+
};
|
|
2181
|
+
}
|
|
2182
|
+
getConfiguration(r) {
|
|
2183
|
+
const request = (r.toApiJson) ? r : new GetConfigurationRequest(r);
|
|
2184
|
+
return this.http.post(this._host + "/conversation.v1.InboxService/GetConfiguration", request.toApiJson(), this.apiOptions())
|
|
2185
|
+
.pipe(map(resp => GetConfigurationResponse.fromProto(resp)));
|
|
2186
|
+
}
|
|
2187
|
+
getMultiConfiguration(r) {
|
|
2188
|
+
const request = (r.toApiJson) ? r : new GetMultiConfigurationRequest(r);
|
|
2189
|
+
return this.http.post(this._host + "/conversation.v1.InboxService/GetMultiConfiguration", request.toApiJson(), this.apiOptions())
|
|
2190
|
+
.pipe(map(resp => GetMultiConfigurationResponse.fromProto(resp)));
|
|
2191
|
+
}
|
|
2192
|
+
upsertConfiguration(r) {
|
|
2193
|
+
const request = (r.toApiJson) ? r : new UpsertConfigurationRequest(r);
|
|
2194
|
+
return this.http.post(this._host + "/conversation.v1.InboxService/UpsertConfiguration", request.toApiJson(), this.apiOptions())
|
|
2195
|
+
.pipe(map(resp => UpsertConfigurationResponse.fromProto(resp)));
|
|
2196
|
+
}
|
|
2197
|
+
}
|
|
2198
|
+
InboxApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: InboxApiService, deps: [{ token: i1.HttpClient }, { token: HostService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2199
|
+
InboxApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: InboxApiService, providedIn: 'root' });
|
|
2200
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: InboxApiService, decorators: [{
|
|
2201
|
+
type: Injectable,
|
|
2202
|
+
args: [{ providedIn: 'root' }]
|
|
2203
|
+
}], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: HostService }]; } });
|
|
2204
|
+
|
|
1974
2205
|
// *********************************
|
|
1975
2206
|
|
|
1976
2207
|
/**
|
|
1977
2208
|
* Generated bundle index. Do not edit.
|
|
1978
2209
|
*/
|
|
1979
2210
|
|
|
1980
|
-
export { Access, AddMultiParticipantsRequest, AddMultiParticipantsResponse, Address, Conversation, ConversationApiService, ConversationChannel, ConversationKey, ConversationMessageCount, CreateConversationRequest, CreateConversationResponse, CreateMultiMessagesRequest, DeleteConversationRequest, DeleteMessageRequest, GetConversationByKeyRequest, GetConversationByKeyResponse, GetMessageRequest, GetMultiConversationDetailsRequest, GetMultiConversationDetailsResponse, GetMultiConversationDetailsResponseDetailedConversation, GetMultiConversationMessageCountRequest, GetMultiConversationMessageCountResponse, GetMultiConversationMessageCountResponseCountsEntry, GetMultiMessagesRequest, GetMultiMessagesResponse, GetMultiParticipantsRequest, GetMultiParticipantsResponse, GetParticipantsByKeyRequest, GetParticipantsByKeyResponse, GlobalParticipantType, LastSeenByParticipant, ListMessagesRequest, ListMessagesRequestListMessagesFilters, ListMessagesResponse, LookupConversationsRequest, LookupConversationsRequestLookupConversationsFilters, LookupConversationsResponse, LookupConversationsResponseConversations, Message, MessageStatus, MessageType, Metadata, MetadataDataEntry, MetadataIdentifier, PagedRequestOptions, PagedResponseMetadata, Participant, ParticipantKey, ParticipantMessageStatus, ParticipantType, PlatformLocation, ReceiveMessageRequest, ReceiveMessageRequestMetadataEntry, SearchConversationsRequest, SearchConversationsResponse, SearchConversationsResponseDetailedConversation, SendMessageRequest, SendMessageResponse, SetLastSeenRequest, SetLastSeenRequestStatus, SetLastSeenResponse, SubjectParticipant, UpdateMessageStatusRequest };
|
|
2211
|
+
export { Access, AddMultiParticipantsRequest, AddMultiParticipantsResponse, Address, Configuration, Conversation, ConversationApiService, ConversationChannel, ConversationKey, ConversationMessageCount, CreateConversationRequest, CreateConversationResponse, CreateMultiMessagesRequest, DeleteConversationRequest, DeleteMessageRequest, GetConfigurationRequest, GetConfigurationResponse, GetConversationByKeyRequest, GetConversationByKeyResponse, 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, Message, MessageStatus, MessageType, Metadata, MetadataDataEntry, MetadataIdentifier, PagedRequestOptions, PagedResponseMetadata, Participant, ParticipantKey, ParticipantMessageStatus, ParticipantType, PlatformLocation, ReceiveMessageRequest, ReceiveMessageRequestMetadataEntry, SearchConversationsRequest, SearchConversationsResponse, SearchConversationsResponseDetailedConversation, SendMessageRequest, SendMessageResponse, SetLastSeenRequest, SetLastSeenRequestStatus, SetLastSeenResponse, SubjectParticipant, UpdateMessageStatusRequest, UpsertConfigurationRequest, UpsertConfigurationResponse };
|
|
1981
2212
|
//# sourceMappingURL=vendasta-conversation.mjs.map
|